Example #1
0
 private void decodeMessage(BlueBoxMessage message)
 {
     /* Get source - desitnation address */
     DestAddress[0] = message.MessageData[0];
     DestAddress[1] = message.MessageData[1];
     /* Get data */
     Data = new byte[message.MessageLength - 2];
     Array.Copy(message.MessageData, 2, Data, 0, message.MessageLength - 2);
 }
Example #2
0
        public static MessageINTF_CNTRL_CMD getObject(BlueBoxMessage message)
        {
            MessageINTF_CNTRL_CMD result_object = null;

            if (message != null)
            {
                if (BlueBoxMessage.INTF_CNTRL_CMD == message.MessageType)
                {
                    result_object = new MessageINTF_CNTRL_CMD();
                    result_object.decodeMessage(message);
                }
            }
            return(result_object);
        }
Example #3
0
        public static MessageTX_FRAME_CMD getObject(BlueBoxMessage message, byte[] src_address)
        {
            MessageTX_FRAME_CMD result_object = null;

            if (message != null)
            {
                if (BlueBoxMessage.TX_FRAME_CMD == message.MessageType)
                {
                    result_object = new MessageTX_FRAME_CMD();
                    result_object.decodeMessage(message);
                    result_object.SrcAddress = src_address;
                }
            }
            return(result_object);
        }
Example #4
0
        public static MessageRX_FRAME_IND getObject(BlueBoxMessage message, byte[] dest_address)
        {
            MessageRX_FRAME_IND result_object = null;

            if (message != null)
            {
                if (BlueBoxMessage.RX_FRAME_IND == message.MessageType)
                {
                    result_object = new MessageRX_FRAME_IND();
                    result_object.decodeMessage(message);
                    result_object.DestAddress = dest_address;
                }
            }
            return(result_object);
        }
Example #5
0
 private void decodeMessage(BlueBoxMessage message)
 {
     Address[0] = message.MessageData[1];
     Address[1] = message.MessageData[2];
 }