Binary 7

Okay. So I'm trying to interface to a system and the interface document has the message definition layed out pretty nice. There is one field in the data structure that's type is listed as "Binary 7".

I realize this is padding for data alignment. My question is, what would you think "Binary 7" mean? Is this a 7 bit field? A 7 byte field?
It's hard to say. Can you post the full description? Maybe the context will help us figure it out. Another option is to write some code using the message and examine it with a debugger or binary editor.
I found some notation that says it is an 8 byte field (although I believe it means two fields make up one data item). The field is defined as follows:

Field Name Type
------- ------- ------------
Field 5 Field05 Unsigned 1
Field 6 Padding06 Binary 7

Since Unsigned 1 is one byte (char), Padding06 must be 7 bytes. Should it be of the same type, char?
Should it be of the same type, char?

A byte is a byte is a byte. Since it's padding, you don't care about the value, so you can read it into whatever you want - although it would probably be most straightforward to do it as chars, since other data types will be an even number of bytes in size, so not much use for dealing with a block of 7 bytes.
Last edited on
Topic archived. No new replies allowed.