Ross Bencina
2013-01-25 02:01:13 UTC
Hi All,
I have a question about field size limits in OSC. I'm trying to work out
where to use std::size_t in the oscpack interface (for 64 bit
compatibility), and where it might be more semantically correct to use
int32 or uint32.
The OSC spec (http://opensoundcontrol.org/spec-1_0) describes size
fields (bundle-element size field, blob size field) as int32 -- a signed
value.
Could someone please confirm whether or not the following statements are
correct:
- Given that <bundle-element size> and <blob size> fields are signed
int32, these fields MUST NOT have negative values (ie the highest value
bit of the 32 bit word MUST be zero).
- Given that a <bundle-element size> field is required to be a multiple
of 4, and is a signed int32, the maximum legal value of a bundle-element
size field is 0x7FFFFFFC (and further, must be a multiple of 4).
- Given that a blob size is a signed int32, and blob-data-plus-padding
is required to be 4 byte aligned, the maximum value of a blob size field
is 0x7FFFFFFC (but may take on any positive value in the range).
Thank you,
Ross.
I have a question about field size limits in OSC. I'm trying to work out
where to use std::size_t in the oscpack interface (for 64 bit
compatibility), and where it might be more semantically correct to use
int32 or uint32.
The OSC spec (http://opensoundcontrol.org/spec-1_0) describes size
fields (bundle-element size field, blob size field) as int32 -- a signed
value.
Could someone please confirm whether or not the following statements are
correct:
- Given that <bundle-element size> and <blob size> fields are signed
int32, these fields MUST NOT have negative values (ie the highest value
bit of the 32 bit word MUST be zero).
- Given that a <bundle-element size> field is required to be a multiple
of 4, and is a signed int32, the maximum legal value of a bundle-element
size field is 0x7FFFFFFC (and further, must be a multiple of 4).
- Given that a blob size is a signed int32, and blob-data-plus-padding
is required to be 4 byte aligned, the maximum value of a blob size field
is 0x7FFFFFFC (but may take on any positive value in the range).
Thank you,
Ross.