High-Level Driver Functions
- Updated2023-02-21
- 1 minute(s) read
Most of the discussion in This section focuses on the IVI attribute model, callbacks, and state caching mechanism. These concepts are important for the low-level implementation of instrument drivers. Most users, however, think in terms of actions, such as measuring or configuring a channel, rather than setting individual attributes. To provide a user-friendly API, instrument drivers must provide high-level functions that set and/or get the values of multiple instrument attributes. Depending on the instrument, it is often necessary to set related attributes in a particular order. The high-level functions handle these order dependencies. Examples of high-level functions for the Fluke 45 are FL45_ConfigureMeasurement , FL45_ConfigureTrigger, and FL45_Read.
IVI provides standardized interfaces for implementing range checking, status checking, simulation, and multithread safety. Users can enable or disable range checking, status checking, and simulation. Users also can use one instrument session in multiple execution threads. The high-level functions in each driver also must help implement these capabilities. The next four sections in This section explain what the IVI Engine does to implement the user capabilities and what the high-level driver functions must do.
The Programming Guidelines for Instrument Drivers section contains guidelines and example code that illustrate how high-level functions implement the user capabilities. Also, if you use the Tools»IVI Development»Create IVI Instrument Driver command to generate an instrument driver, the resulting source code contains skeleton code for high-level functions. The skeleton code follows the guidelines in Programming Guidelines for Instrument Drivers.