![]() | Defining New Data Types Inline |
When adding methods and properties 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, method return types, or property 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 method or property is to be created and using that newly defined enum.
As an example of creating a new enum when defining a method, after executing the Add Method command, and while still in edit mode, the following text can be used to create a ConfigureTrigger method that returns a newly created TriggerSource enum. enum.
ConfigureTrigger : 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:
ConfigureTrigger : 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.
See the Shorthand section of the Adding an Enumeration topic for details on enum creation shorthand.
![]() |
---|
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. |