Attributes for Status Simulation in IviDCPwr
When an IviDCPwr driver function is called, the driver queries whether NISDCPWR_ATTR_SIMULATE_STATUS_CODE is enabled. If enabled, the driver gets the appropriate function's simulation status code. If the value of the simulation status code represents a warning (has a positive value), then it is returned as the function's return status only if no other error or warning occurred before the function ends. If the value of the simulation status code represents an error (has a negative value), then it is returned as the function's return status only if no other error occurred before the function ends.
The following IviDCPwr functions do not support status code simulation:
- IviDCPwr_GetError
- IviDCPwr_ClearError
- IviDCPwr_GetNextInterchangeWarning
- IviDCPwr_ResetNextInterchangeWarning
- IviDCPwr_ClearNextInterchangeWarning
- IviDCPwr_GetNextCoercionRecord
- IviDCPwr_LockSession
- IviDCPwr_UnlockSession
- IviDCPwr_CheckAttribute
- IviDCPwr_GetAttribute
- IviDCPwr_SetAttribute
Each function supported by the IviDCPwr class driver has a corresponding attribute that determines the status code to return when status code simulation is enabled. The following table lists the status code attributes and the function for which they return a value. These attributes are all of type ViInt32, non-readable, and non-channel based.
Note In the following table, the literal string NISDCPWR_ATTR_ precedes all attribute names. |
IviDCPwr Attributes for Status Simulation
Attribute | Function |
---|---|
INIT_STATUS | IviDCPwr_init, IviDCPwr_InitWithOptions |
CLOSE_STATUS | IviDCPwr_close |
RESET_STATUS | IviDCPwr_reset |
SELF_TEST_STATUS | IviDCPwr_self_test |
ERROR_QUERY_STATUS | IviDCPwr_error_query |
ERROR_MESSAGE_STATUS | IviDCPwr_error_message |
REVISION_QUERY_STATUS | IviDCPwr_revision_query |
RESET_DEFAULT_STATUS | IviDCPwr_ResetWithDefault |
DISABLE_STATUS | IviDCPwr_Disable |
INVALIDATE_STATUS | IviDCPwr_InvalidateAllAttributes |
GET_CH_NAME_STATUS | IviDCPwr_GetChannelName |
CONFIGURE_OUTPUT_ENABLED_STATUS | IviDCPwr_ConfigureOutputEnabled |
CONFIGURE_OUTPUT_RANGE_STATUS | IviDCPwr_ConfigureOutputRange |
CONFIGURE_CURRENT_LIMIT_STATUS | IviDCPwr_ConfigureCurrentLimit |
CONFIGURE_OVP_STATUS | IviDCPwr_ConfigureOVP |
CONFIGURE_VOLTAGE_LEVEL_STATUS | IviDCPwr_ConfigureVoltageLevel |
QUERY_OUTPUT_STATE_STATUS | IviDCPwr_QueryOutputState |
QUERY_MAX_CURRENT_LIMIT_STATUS | IviDCPwr_QueryMaxCurrentLimit |
QUERY_MAX_VOLTAGE_LEVEL_STATUS | IviDCPwr_QueryMaxVoltageLevel |
RESET_OUTPUT_PROTECTION_STATUS | IviDCPwr_ResetOutputProtection |
CONFIGURE_TRIGGER_SOURCE_STATUS | IviDCPwr_ConfigureTriggerSource |
CONFIGURE_TRIGGERED_VOLTAGE_LEVEL_STATUS | IviDCPwr_ConfigureTriggered VoltageLevel |
CONFIGURE_TRIGGERED_CURRENT_LIMIT_STATUS | IviDCPwr_ConfigureTriggered CurrentLimit |
ABORT_STATUS | IviDCPwr_Abort |
INITIATE_STATUS | IviDCPwr_Initiate |
SEND_SOFTWARE_TRIGGER_STATUS | IviDCPwr_SendSoftwareTrigger |
MEASURE_STATUS | IviDCPwr_Measure |