Onos need to have shorter radio messages,to improve long range comunication.
So the new messages will be:
Standard part to all messages :
"[S" 3 byte for the start of the message
2 bytes for the address of the node expressed in hex format max number is FF --> 255
1 byte for the type of msg expressed in ascii character
1 byte for the message id (a progressive number from ascii 0 to 9 to identify the message, first time will be 0 next 1 and so on)
"#]" 3 byte for the end of the message
The message to change the value of a generic digital object node will be:
3 bytes with "[S" for the start of the message
2 bytes for the address of the node expressed in hex format max number is FF --> 255
1 byte containing "d" for the type of msg , set digital object
2 bytes for the number of the object to change expressed in hexadecimal(for first object of the node it will be "0")
1 byte to tell arduino the value (0 or 1 ) to set the object
1 byte for the message id ,a progressive binary number from 0 to 255
3 bytes with "#]" to close the message
example: [S01d001x#] to set the first object (00) of the node to 1, (x is the id value)
[S01d000x#] to set the first object (00) of the node to 0, (x is the id value)
Onos need to have shorter radio messages,to improve long range comunication. So the new messages will be:
Standard part to all messages :
"[S" 3 byte for the start of the message 2 bytes for the address of the node expressed in hex format max number is FF --> 255 1 byte for the type of msg expressed in ascii character 1 byte for the message id (a progressive number from ascii 0 to 9 to identify the message, first time will be 0 next 1 and so on) "#]" 3 byte for the end of the message
The message to change the value of a generic digital object node will be:
3 bytes with "[S" for the start of the message 2 bytes for the address of the node expressed in hex format max number is FF --> 255 1 byte containing "d" for the type of msg , set digital object 2 bytes for the number of the object to change expressed in hexadecimal(for first object of the node it will be "0") 1 byte to tell arduino the value (0 or 1 ) to set the object 1 byte for the message id ,a progressive binary number from 0 to 255 3 bytes with "#]" to close the message example: [S01d001x#] to set the first object (00) of the node to 1, (x is the id value) [S01d000x#] to set the first object (00) of the node to 0, (x is the id value)