When sending a single "BYTE" from messageport an error is received.
Sending :
Code: Select all
hw_message_port_send(id, 777, "BYTE",55)
Code: Select all
ERROR - logic.lua:17: Expected BYTE type, got number
Code: Select all
hw_message_port_send(id,777,"BYTE[0]",{55})
Which gives results of -
Code: Select all
breakdown of what we received follows :
Message ID = 777
payload->len = 1
payload->type = 0 : which is Byte
we are working with payload->data_byte
payload->data_byte[0] = 55
awaiting next message from air manager :
Code: Select all
hw_message_port_send(id,777,"BYTE[9]",{55})
Code: Select all
breakdown of what we received follows :
Message ID = 777
payload->len = 1
payload->type = 0 : which is Byte
we are working with payload->data_byte
payload->data_byte[0] = 55
Code: Select all
hw_message_port_send(id, 777, "BYTE[1]", { 0,1, 2, 3,4,5,6,7 } )
Code: Select all
breakdown of what we received follows :
Message ID = 777
payload->len = 8
payload->type = 0 : which is Byte
we are working with payload->data_byte
payload->data_byte[0] = 0
payload->data_byte[1] = 1
payload->data_byte[2] = 2
payload->data_byte[3] = 3
payload->data_byte[4] = 4
payload->data_byte[5] = 5
payload->data_byte[6] = 6
payload->data_byte[7] = 7
awaiting next message from air manager :
--------------------------
The following ALL work - for INT, FLOAT and STRING as expected -
an example and results from my diagnostics for a single "INT"
Code: Select all
hw_message_port_send(id, 777, "INT", -450)
Code: Select all
breakdown of what we received follows :
Message ID = 777
payload->len = 1
payload->type = 2 : which is Signed Integer
we are working with payload->data_int
payload->data_int[0] = -450
value in Hexadecimal = FFFFFE3E
value in Binary = 11111111111111111111111000111110
regards
Joe