Exemple #1
0
 public override void SetCreate(ref ECMsg m, uint rawdata)
 {
     m.SetUp('S', 6, 1);
     m.ReqMsg[0] = 4;                                             // length
     Msger.AddAxis(m.K.Axis.Num, out m.ReqMsg[1], out m.ReqMsg[2]);
     Msger.AddData(myItem.Num, out m.ReqMsg[3], out m.ReqMsg[4]); // Opcode is myItem.Num
     m.ReqMsg[5]  = Msger.Chksum(m.ReqMsg);
     m.RplyMsg[0] = 0;                                            // clear reply for safety
 }
 public override void GetCreate(ref ECMsg m)
 {
     m.SetUp('G', 10, 1 + 14);
     m.ReqMsg[0] = 8;                                             // length
     Msger.AddAxis(m.K.Axis.Num, out m.ReqMsg[1], out m.ReqMsg[2]);
     Msger.AddData(0xB005, out m.ReqMsg[3], out m.ReqMsg[4]);     // Opcode
     Msger.AddHost(myAxis, out m.ReqMsg[5], out m.ReqMsg[6]);     // host/relay axis
     Msger.AddData(myItem.Num, out m.ReqMsg[7], out m.ReqMsg[8]); // Address is myItem.Num
     m.ReqMsg[9]  = Msger.Chksum(m.ReqMsg);
     m.RplyMsg[0] = 0;                                            // clear reply for safety
 }
 public override void SetCreate(ref ECMsg m, uint rawdata)
 {
     m.SetUp('S', 12, 1);
     m.ReqMsg[0] = 10;                                            // length
     Msger.AddAxis(m.K.Axis.Num, out m.ReqMsg[1], out m.ReqMsg[2]);
     Msger.AddData(0x9005, out m.ReqMsg[3], out m.ReqMsg[4]);     // Opcode
     Msger.AddData(myItem.Num, out m.ReqMsg[5], out m.ReqMsg[6]); // Address is myItem.Num
     Msger.AddData(rawdata, out m.ReqMsg[9], out m.ReqMsg[10], out m.ReqMsg[7], out m.ReqMsg[8]);
     m.ReqMsg[11] = Msger.Chksum(m.ReqMsg);
     m.RplyMsg[0] = 0;  // clear reply for safety
 }