Example #1
0
        void INotifyAgent.OnPrimaryIn(SECSTransaction t, ERRORS ErrorCode, string ErrorText)
        {
            try
            {
                SecsHelper.RecordSecsMessage(t.Primary);

                if (t.Primary.Stream == 1)
                {
                    switch (t.Primary.Function)
                    {
                    case 1:
                        t.Secondary.Root.Item("L").Item("MDLN").Value    = "";
                        t.Secondary.Root.Item("L").Item("SOFTREV").Value = "";
                        t.Reply();
                        break;

                    case 13:
                        t.Secondary.Root.Item("COMMACK").Value = 0;
                        t.Secondary.Root.Item("MDLN").Delete();
                        t.Secondary.Root.Item("SOFTREV").Delete();
                        t.Reply();
                        break;
                    }
                }
                else if (t.Primary.Stream == 5)
                {
                    if (t.Primary.Function == 1)
                    {
                        t.Secondary.Root.Item("ACKC5").Value = 0;
                        t.Reply();
                    }
                }
                else if (t.Primary.Stream == 6)
                {
                    if (t.Primary.Function == 11)
                    {
                        t.Secondary.Root.Item("ACKC6").Value = 0;
                        t.Reply();
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Host Primary In message Error:" + ex.Message);
            }
        }
Example #2
0
        public void OnPrimaryIn(SECSTransaction t, ERRORS ErrorCode, string ErrorText)
        {
            try
            {
                SecsHelper.RecordSecsMessage(t.Primary);

                if (t.Primary.Stream == 1)
                {
                    switch (t.Primary.Function)
                    {
                    case 1:
                        //SECSItem mdln = t.Secondary.Root.AddNew("L").AddNew("MDLN");
                        //mdln.Format = SECS_FORMAT.ASCII;
                        //mdln.Value = "";

                        //SECSItem softver = mdln.Duplicate();
                        //softver.Format = SECS_FORMAT.ASCII;
                        //softver.Value = "";
                        t.Secondary.Root.Item("L").Item("MDLN").Value    = "";
                        t.Secondary.Root.Item("L").Item("SOFTREV").Value = "";
                        t.Reply();
                        break;

                    case 13:
                        t.Secondary.Root.Item("COMMACK").Value = 0;
                        t.Secondary.Root.Item("MDLN").Delete();
                        t.Secondary.Root.Item("SOFTREV").Delete();
                        t.Reply();
                        break;
                    }
                }
                else if (t.Primary.Stream == 6)
                {
                    if (t.Primary.Function == 11)
                    {
                        t.Secondary.Root.Item("ACKC6").Value = 0;
                        t.Reply();
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Host Primary In message Error:" + ex.Message);
            }
        }
Example #3
0
        public void OnSecondaryIn(SECSTransaction t, ERRORS ErrorCode, string ErrorText)
        {
            SecsHelper.RecordSecsMessage(t.Secondary);
            if (t.Secondary.Stream == 1 && t.Secondary.Function == 4)
            {
                if (t.Tag == "QryHardBinQty")
                {
                    QueryHardBinQty(t);
                }
            }

            if (t.Secondary.Stream == 2 && t.Secondary.Function == 16)
            {
                RMDHandler(t);
            }

            if (t.Secondary.Stream == 2 && t.Secondary.Function == 42)
            {
                RMDHandler(t);
            }
        }
Example #4
0
 void INotifyAgent.OnSecondaryOut(SECSTransaction t, ERRORS ErrorCode, string ErrorText)
 {
     SecsHelper.RecordSecsMessage(t.Secondary);
 }
Example #5
0
 public void OnPrimaryOut(SECSTransaction t, ERRORS ErrorCode, string ErrorText)
 {
     SecsHelper.RecordSecsMessage(t.Primary);
 }
Example #6
0
 public void OnSecondaryOut(SECSTransaction t, ERRORS ErrorCode, string ErrorText)
 {
     //throw new NotImplementedException();
     SecsHelper.RecordSecsMessage(t.Secondary);
 }