Click or drag to resize

Function General Editor

Name

Name of the function. Function names must start with a capital letter and can contain only alphanumeric characters.

Return type

Return type of the function.

If an array is desired, append opening and closing square brakets ([]) to the type name. For example, to have the method return an array of double, enter Double[].

Tip Tip

The following syntax can be used in the Return type text box to create a new enum type and use that enum as the return type all in one operation:

new enum TriggerSource; Internal = 2, External = 0x15, Software = 47

See the topic Defining New Data Types Inline for more information on this feature.

Display

Display name that will be used to identify the function in the function tree.

Repeated capability

The repeated capability with which the function is associated.

Implementation

Choosing the Instrument command option instructs Nimbus to automatically generate all of the implementation code needed to send the specified command and to read a response if the Response text box is non-empty. Nimbus generates calls to standard VISA functions, such as viPrintf, viScanf, and viQueryf to send instrument commands and to receive instrument responses.

Choosing the Manual option requires the driver developer to provide the method implementation. This choice is often used for functions that rely upon non-message-based device communications, such as register-based devices or drivers that rely upon a support DLL.

Choosing the Manual with instrument command option is the same as Manual except that the Command and Response textboxes are enabled and used to populate the Instrument Command section of the driver help page for the function. This is useful for functions that require manual implementation but that ultimately rely upon an instrument command in their manually added code.

Important note Important

See the topic Fundamentals of Function and Attribute Implementation to understand how these options affect code generation and roundtripping.

Command

Specifies the command to send to the device. Nimbus supports a rich command and response formatting syntax, which can include the parameters, repeated capabilities, and more. Please see the topic Working With Instrument Commands for a detailed discussion of automatic command formatting.

Response

Specifies the format of the response to read back from the device. Nimbus supports a rich command formatting syntax, which can include the parameters, repeated capabilities, and more. Please see the topic Working With Instrument Commands for a detailed discussion of automatic command formatting.

If no response is specified, Nimbus will only send the command specified in the Command text box -- no response will be read from the device.

Use auto-generated preamble

For manual method implementations, Nimbus can be instructed to still generate pre-processing code for features such as parameter validation, state-caching, and range-checking. If unchecked, Nimbus will not generate any pre-processing code and the driver developer must supply all function logic.

Caution note Caution

It is recommended that this option remain checked. Many Nimbus features can be "short-circuited" if the standard Nimbus preamble code is not generated. This option is intended for advanced scenarios.

See Also

Download a complete CHM version of this documentation here.