Example #1
0
 public void OnReceive(string _rcv_msg, ref SECS2_XML_MESSAGE _it)
 {
     /*
      * _rcv_msg =
      * <SECS2_XML_MESSAGE>
      *   <HEAD>
      *     <SystemByte> 00002 </SystemByte>
      *     <CMD> 3 </CMD>
      *     <Stream> 6 </Stream>
      *     <Function> 11 </Function>
      *   </HEAD>
      *   <BODY>
      *     <CEID> 1 </CEID>
      *     <REPORTS>
      *       <REPORT>
      *         <REPORTID> 1000 </REPORTID>
      *         <VARIABLES>
      *           <V> 25.0 </V>
      *           <V> 50.0 </V>
      *           <V> PASS </V>
      *         </VARIABLES>
      *       </REPORT>
      *     </REPORTS>
      *   </BODY>
      * </SECS2_XML_MESSAGE>
      */
     m_parser.ParseXml(_rcv_msg, ref _it);
 }
Example #2
0
        public int Send_S6F12_EventReportAck(eACKC6 _nACKC6)
        {
            int nErr = 0;
            SECS2_XML_MESSAGE Packet = new SECS2_XML_MESSAGE(MakeSystemByte(), (byte)eCMD.user, 6, 12);

            Packet.BODY.ACKC6 = (int)_nACKC6;

            nErr = do_Send(Packet);
            return(nErr);
        }
Example #3
0
        private int Send(SECS2_XML_MESSAGE _msg)
        {
            int nErr = 0;

            string sMsg = m_parser.MakeXml(_msg);

            // client_stream.Wirte( sMsg );

            return(nErr);
        }
Example #4
0
        private int do_Send(SECS2_XML_MESSAGE _packet)
        {
            int nErr = 0;

            string sMsg = m_parser.MakeXml(_packet);

            // socket stream writer로 write 해준다.
            // client_stream.Wirte( sMsg );

            return(nErr);
        }
Example #5
0
        public int Send_HostCommand(string _HostCmd, List <SECS2_XML_MESSAGEBODYCMD_PARAM> _CmdParams)
        {
            int nErr = 0;

            SECS2_XML_MESSAGE Packet = new SECS2_XML_MESSAGE(MakeSystemByte(), (byte)eCMD.user, 2, 41);

            Packet.BODY.RCMD = _HostCmd;
            int i = 0;

            foreach (SECS2_XML_MESSAGEBODYCMD_PARAM it in _CmdParams)
            {
                Packet.BODY.PARAMETERS[i].CPNAME  = it.CPNAME;
                Packet.BODY.PARAMETERS[i].CPVALUE = it.CPVALUE;
                i++;
            }

            nErr = Send(Packet);

            return(nErr);
        }
Example #6
0
        // Callback 함수.
        private void on_receive_tcp(string _msg)
        {
            SECS2_XML_MESSAGE item = new SECS2_XML_MESSAGE();

            m_tcp_comm.analyze_xml(_msg, ref item);
            if (item.HEAD.Stream == 2)
            {
                if (item.HEAD.Function == 41)
                {
                }
                else if (item.HEAD.Function == 42)
                {
                }
            }
            else if (item.HEAD.Stream == 6)
            {
                if (item.HEAD.Function == 11)
                {
                    if (item.BODY.CEID == 1) // production complete, 1개 제품 생산 완료.
                    {
                    }
                    else if (item.BODY.CEID == 2) // Lot Started
                    {
                    }
                    else if (item.BODY.CEID == 3) // Lot Complete
                    {
                    }
                    else if (item.BODY.CEID == 4) // Env Updated
                    {
                    }
                }
                else if (item.HEAD.Function == 12)
                {
                }
            }
            listBox_Log.Items.Add(_msg);
        }