Exemplo n.º 1
0
 private byte[] buildBuffer(byte type, byte[] message)
 {
     byte[] buffer = this.buildBufferWithHeader();
     buffer = this.appendData(buffer, new byte[1]);
     buffer = this.appendData(buffer, type);
     buffer = this.appendData(buffer, message.Length);
     buffer = this.appendData(buffer, message);
     byte[] arg_3D_1 = buffer;
     byte[] expr_35  = buffer;
     return(this.appendData(arg_3D_1, BroadcastModel.computeCheckSum(expr_35, expr_35.Length)));
 }
Exemplo n.º 2
0
        private bool isCheckSum(byte[] recBytes)
        {
            int checkSum = (int)BroadcastModel.computeCheckSum(recBytes, recBytes.Length - 1);

            return(Convert.ToInt32(recBytes.Skip(recBytes.Length - 1).Take(1).ToArray <byte>().GetValue(0)) == checkSum);
        }