コード例 #1
0
ファイル: FerryProcesser.cs プロジェクト: xyx-best/WCS_LH_YH
        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
ファイル: FerryTcp.cs プロジェクト: wsmyaopeng/WCS_JKR_YH
 public void SendCmd(DevFerryCmdE type, byte b1, byte b2, int int3)
 {
     byte[] data = mProcess.GetCmd(mDev.memo, type, b1, b2, int3);
     SendMessage(data);
 }