示例#1
0
        internal byte[] GetCmd(string devid, DevFerryCmdE type, byte b1, byte b2, int int3)
        {
            FerryCmdStruct cmd = new FerryCmdStruct();

            cmd.Head     = ShiftBytes(SocketConst.FERRY_CMD_HEAD_KEY);
            cmd.DeviceID = byte.Parse(devid);
            cmd.Commond  = (byte)type;
            cmd.Value1   = b1;
            cmd.Value2   = b2;
            cmd.Value3   = ShiftBytes(int3);
            cmd.Tail     = ShiftBytes(SocketConst.TAIL_KEY);
            return(StructToBuffer(cmd));
        }
示例#2
0
 public void SendCmd(DevFerryCmdE type, byte b1, byte b2, int int3)
 {
     byte[] data = mProcess.GetCmd(mDev.memo, type, b1, b2, int3);
     SendMessage(data);
 }