Defining New Data Types Inline
When adding functions and attributes to a driver, it can be convenient to create the data types needed at the same time the method or property itself is being defined. Nimbus allows enums to be created and defined when entering new parameters, attribute types, or callback function return types. This is simpler than defining an enum ahead of time in one portion of the Driver Designer and then returning to where the desired function or attribute is to be created and using that newly defined enum.
As an example of creating a new enum when defining an attribute, after executing the Add Attribute command, and while still in edit mode, the following text can be used to create a StartTrigger attribute using a newly created TriggerSource enum. enum.
StartTrigger : new enum TriggerSource
In addition to creating the enum, the enum members can be defined at the same time as the enum, as in the following:
StartTrigger : new enum TriggerSource; Internal = 2, External = 0x15, Software = 47
The above example creates a new TriggerSource enum with three member, each with member numeric values specified.
The syntax for creating new enums inline can be used in the driver designer tree view for method return types, parameter types, and property types. It can also be used in the Type text boxes in the item editors for those items.
Download a complete CHM version of this documentation here.