Creating and modifying an enumerated nv or cp type, Creating and modifying a bitfield – Echelon NodeBuilder Resource Editor User Manual
Page 41

To remove a field, right-click the field in the left pane, and then click Remove Field on
the shortcut menu.
Creating and Modifying an Enumerated NV or CP Type
You can assign an enumerated type to a network variable type, configuration property
type, or a field in a structure or union. To create an enumerated type, follow these steps:
1. If the enumeration type you will use does not already exist, create it as described in
Creating and Modifying an Enumeration Type.
2. Create a new type as described in Creating and Modifying a Network Variable or
Configuration Property Type. In step 3, set Data Type to enumeration. Enum
Information appears in the dialog as shown in the following figure:
3. Set Enum Scope to the scope of the resource file set containing the enumeration
type. You can select an enumeration type from the resource file set containing the
type you are creating, or from any resource file set with a numerically lower scope
and matching program ID template. File Path is automatically updated to the path
of the resource file set with the appropriate scope and program ID type. Enum Set
is updated to contain all enumerations available in that resource file set.
4. Select the enumeration type to use in Enum Set. Minimum and Maximum display
the minimum and maximum values for the selected enumeration type. You can use
these values to further restrict the range of available values for this type.
5. Continue creating the network variable or configuration property type as described in
Creating and Modifying a Network Variable or Configuration Property Type.
Creating and Modifying a Bitfield
You can define a field of a structure as a bitfield. This data type is defined as a Neuron C
bitfield. A bitfield is packed into a byte that can have from 1 to 8 bitfields that can each
be 1 to 8 bits, for a total of no more than 8 bits per byte (for example, you can have one 8-
bit field, two 4-bit fields, or 8 1-bit fields in a byte, or various combinations of these).
Two subsequent bitfields whose total size exceeds the 8 bit boundary automatically cause
a gap of unused data between the fields. To create a bitfield, follow these steps:
1. Create a new structure or union type as described in Creating and Modifying a
Structure or Union NV or CP Type. Set Data Type to ENUMERATED for the
bitfield.
2. Enter the following information:
NodeBuilder Resource Editor User's Guide
33