/
Using an Enumeration Data Type
Using an Enumeration Data Type
You can use an enumeration data type for a datapoint or property. IzoT enumerations are defined as signed 8-bit types. Signed 8-bit enumerated types are not generally portable across different C compilers. To increase portability, the IzoT Interface Interpreter changes each enumeration to an assigned 8-bit scalar such as signed char, with C preprocessor definitions for the enumerated values.
Example
The IzoT Interface Interpreter generates the following code for a SNVT_config_src datapoint type, which implements the config_source_t enumeration.
typedef signed char config_source_t #define CFG_NUL -1 /* enum config_source_t */ #define CFG_LOCAL 0 /* enum config_source_t */ #define CFG_EXTERNAL 1 /* enum config_source_t */ typedef config_source_t SNVT_config_src
, multiple selections available,
Related content
Using a Union Data Type
Using a Union Data Type
More like this
Using a Bitfield Data Type
Using a Bitfield Data Type
More like this
Enum Element
Enum Element
More like this
Implementing a Block
Implementing a Block
More like this
Implementing a Device Property
Implementing a Device Property
More like this
Implementing a Device Datapoint
Implementing a Device Datapoint
More like this