public override void SetCreate(ref ECMsg m, int gquant, uint rawdata) { m.SetUp('S', 6, 1); m.ReqMsg[0] = 4; // length Msger.AddGroup(m.K.Group.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, int gquant) { m.SetUp('G', 10, 1 + (gquant * 14)); m.ReqMsg[0] = 8; // length Msger.AddGroup(m.K.Group.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, int gquant, uint rawdata) { m.SetUp('S', 12, 1); m.ReqMsg[0] = 10; // length Msger.AddGroup(m.K.Group.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 }
public override void SetCreate(ref ECMsg m, uint rawdata) { m.SetUp('S', 10, 1); m.ReqMsg[0] = 8; // length Msger.AddAxis(m.K.Axis.Num, out m.ReqMsg[1], out m.ReqMsg[2]); Msger.AddData(0x9004, 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[7], out m.ReqMsg[8]); m.ReqMsg[9] = Msger.Chksum(m.ReqMsg); m.RplyMsg[0] = 0; // clear reply for safety }
private void Rx_TakUnsolCleanup() { // unsolicited goes around a few things and restarts // it has to build a new ECM message and output it // then back to servicing the original msg ECMsg m = new ECMsg(null); m.SetUp('U', 0, _xbf_i); // indexs + 1 'cause there's 0x4F precursor... Array.Copy(_xbf, m.RplyMsg, m.RplyMsg.Length); m.Stat = _xbf_stat; _out_q.Enqueue(m); RxTakState = TakeDataState.Initial; }