The MEMBER keyword
MEMBER <name> <type> [<flags>]
The MEMBER keyword defines a name and data type mapping for fields
of a struct data type.
- <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 structure can have different children of type |
See the the reference page for the syntax of references in the dictionary.
ATTRIBUTE Foo 1 struct 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 |