Sending a simple packet with nuconnector

07/16/2013 03:39 qkuh#16
Quote:
Originally Posted by Schickl View Post
If the size is set 1, it doesn't matter
Because of the byte order 0x04 is in the first byte and 0x00 in the second
-> both methods would work that way
What do you mean by "set 1"? The byte order is not the point. The point is the missing 0 byte if you cast it to a byte.

e.g.

byte size (0x01)
ushort opcode (0x704f)
-> array-datalen = 3 -> array-data = 01 4f 70

ushort size (0x01)
ushort opcode (0x704f)
-> array-datalen = 4 -> array-data = 01 00 4f 70
07/18/2013 19:32 Schickl#17
Quote:
Originally Posted by qkuh View Post
What do you mean by "set 1"? The byte order is not the point. The point is the missing 0 byte if you cast it to a byte.

e.g.

byte size (0x01)
ushort opcode (0x704f)
-> array-datalen = 3 -> array-data = 01 4f 70

ushort size (0x01)
ushort opcode (0x704f)
-> array-datalen = 4 -> array-data = 01 00 4f 70
I was talking about the content and not the length of it
The conent is 0x04 and it doesn't matter if it's "04" only or "04 00"
As long as the size is set right ofc

-> It doesn't matter