The MEMBER keyword
MEMBER <name> <type> [<flags>]
The MEMBER keyword defines a name and data type mapping for members
of a parent STRUCT definition. The definitions
preceding a MEMBER must be either another MEMBER, or be a STRUCT.
- <name>
-
The name of the attribute. The name can contain alphanumeric characters,
-, and_. The name should be short and descriptive.The name of this
MEMBERis defined only within the context of its parentSTRUCT. - <type>
-
A data type, or the special type
bit.A few data types can be marked up as being fixed size, by adding an "array-style" suffix, such as with
bit[3]. See below for details.
Only MEMBER definitions can contain bit fields. While bit
fields do not have to start and end on byte boundaries, changing from
a non-bit type to a bit type (and vice-versa) can only be done on
a byte boundary.
|
- <flags>
-
The flag field is optional, and is usually protocol-specific. See the FLAGS page for definitions of common flags.
Please see the protocol dictionaries for examples of these flags. Only the flags which are used in a protocol dictionary are valid, and those flags are only valid for that protocol dictionary.
The
keyflag can only be used forMEMBERs where the data type isuint8,uint16, oruint32.
Common flags and meanings
| Name | Description |
|---|---|
|
For fixed-size types, declare that the contents of the packet can have an array of this value. |
|
|
|
For |
|
This member is a "key" type. The struct can have different STRUCT children depending on the value of the key. |
STRUCT Foo MEMBER Bar bit[3] MEMBER Baz bit[5] MEMBER Name string
Fixed Size Data types
The following data types can be marked up as having fixed size, by
using an array suffix, e.g. octets[14].
Fixed Size types and meanings
| Keyword | Description |
|---|---|
|
Declare that this attribute uses |
|
Declare that this attribute uses |
|
Declare that this attribute uses |