//******************************************************************************
        //******************************************************************************
        //******************************************************************************
        // TestMsg.

        public static void initialize(TestMsg aMsg)
        {
            aMsg.mCode1 = 1101;
            aMsg.mCode2 = 1102;
            aMsg.mCode3 = 1103;
            aMsg.mCode4 = 1104;
        }
Beispiel #2
0
        //**************************************************************************
        // Create a new message based on a message type

        public override Ris.ByteContent createMsg(int aMessageType)
        {
            Ris.ByteContent tMsg = null;

            switch (aMessageType)
            {
            case MsgIdT.cTestMsg:
                tMsg = new TestMsg();
                break;

            case MsgIdT.cFirstMessageMsg:
                tMsg = new FirstMessageMsg();
                break;

            case MsgIdT.cStatusRequestMsg:
                tMsg = new StatusRequestMsg();
                break;

            case MsgIdT.cStatusResponseMsg:
                tMsg = new StatusResponseMsg();
                break;

            case MsgIdT.cDataMsg:
                tMsg = new DataMsg();
                break;

            default:
                break;
            }
            return(tMsg);
        }
 public static void show(TestMsg aMsg)
 {
     Prn.print(Prn.ThreadRun1, "ProtoComm.TestMsg");
     Prn.print(Prn.ThreadRun1, "Code1      {0}", aMsg.mCode1);
     Prn.print(Prn.ThreadRun1, "Code2      {0}", aMsg.mCode2);
     Prn.print(Prn.ThreadRun1, "Code3      {0}", aMsg.mCode3);
     Prn.print(Prn.ThreadRun1, "Code4      {0}", aMsg.mCode4);
 }
Beispiel #4
0
        //******************************************************************************
        // Message handler - TestMsg.

        void processRxMsg(TestMsg aMsg)
        {
            Prn.print(Prn.ThreadRun1, "NetworkThread.processRxMsg_TestMsg");
            Helper.show(aMsg);
        }