Esempio n. 1
0
 public static byte[] getRelayCommand(RelayOP op, int index)
 {
     byte[] outBuf = new byte[14];
        Array.Copy(MPBCommand, outBuf, outBuf.Length);
        outBuf[10] = (byte)op;
        outBuf[8] |= (byte)(0x1 << index);
        return outBuf;
 }
Esempio n. 2
0
File: MyMBP.cs Progetto: karlnet/mpb
        //public void ConnectMPB()
        //{
        //    LocalTcpClient = new TcpClient();
        //    LocalTcpClient.Connect(MPBIPAddress, RemoteServerPort);
        //}
        //public void DisConnectMPB()
        //{
        //    LocalTcpClient.Close();
        //}
        public void RelayProcess(RelayOP OP, int index)
        {
            byte[] outBuf = MPBProtocol.getRelayCommand(OP, index);

            //LocalTcpClient.GetStream().Write(outBuf, 0, outBuf.Length);
            MPBMsgQueue.Add(outBuf);
        }