Software Library API naibrd 1.62
See all documentation at naii.docs.com
|
Functions | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetModuleCount (int32_t cardIndex, int32_t *moduleCount) |
Gets the number of modules a card has. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetModuleOffset (int32_t cardIndex, int32_t module, uint32_t *offset) |
Gets the offset of a module on the card. | |
NAIBRDFUNC uint32_t NAIAPI | naibrd_GetModuleID (int32_t cardIndex, int32_t module) |
Gets the ID of a module. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetModuleInfo (int32_t cardIndex, int32_t module, uint32_t *modid, uint32_t *modver, uint32_t *modrev, uint32_t *modspecial) |
Gets module information details. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetModuleRev (int32_t cardIndex, int32_t module, uint32_t *modprocrev, uint32_t *modfpgarev) |
Gets module proc and FPGA revision info details. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetModuleHardwareRev (int32_t cardIndex, int32_t module, uint32_t *modhardwarerev) |
Gets module hardware revision. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetModuleInfoEx (int32_t cardIndex, int32_t module, nai_module_info_type_t modInfoType, uint32_t *p_outmoduleInfo) |
Retrieves the raw module information corresponding to the specified module information type. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetModuleSeries (int32_t cardIndex, int32_t module, nai_series_t *p_outseries) |
Retrieves the module series type. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SetFloatingPointModeEnable (int32_t cardIndex, int32_t module, bool_t enable) |
Sets the module's floating point mode operation on or off. This call blocks until the FLOATING_POINT_CONVERSION_BUSY register is cleared. In floating point mode operation, some of the module's registers will switch from integer values to single-precision floating point values. In this mode, the offset and gain settings specified for each channel will be applied to scale the value read or written to the register. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SetFloatingPointModeEnable_NonBlocking (int32_t cardIndex, int32_t module, bool_t enable) |
Sets the module's register and naibrd library's (register shadow) floating point mode operation and returns immediately. This API does not wait for the HW to confirm that the conversion is complete. Call naibrd_GetFloatingPointModeConversionComplete(). to get the conversion status. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetFloatingPointModeConversionComplete (int32_t cardIndex, int32_t module, bool_t *p_outconversionComplete) |
Indicate when the toggle of floating point mode operation (on or off) is complete. This API checks the FLOATING_POINT_STATE register and indicates its state. In floating point mode operation, some of the module's registers will switch from integer values to single-precision floating point values. In this mode, the offset and gain settings specified for each channel will be applied to scale the value read or written to the register. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetFloatingPointModeEnable (int32_t cardIndex, int32_t module, bool_t *p_outenable) |
Retrieves the module's floating point mode operation. In floating point mode operation, some of the module's registers will switch from integer values to single-precision floating point values. In this mode, the offset and gain settings specified for each channel will be applied to scale the value read or written to the register. | |
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetFloatingPointModeConversionComplete | ( | int32_t | cardIndex, |
int32_t | module, | ||
bool_t * | p_outconversionComplete ) |
Indicate when the toggle of floating point mode operation (on or off) is complete. This API checks the FLOATING_POINT_STATE register and indicates its state. In floating point mode operation, some of the module's registers will switch from integer values to single-precision floating point values. In this mode, the offset and gain settings specified for each channel will be applied to scale the value read or written to the register.
cardIndex | : (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
p_outconversionComplete | : (Output) TRUE = conversion complete. FALSE = conversion busy in Integer mode. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetFloatingPointModeEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
bool_t * | p_outenable ) |
Retrieves the module's floating point mode operation. In floating point mode operation, some of the module's registers will switch from integer values to single-precision floating point values. In this mode, the offset and gain settings specified for each channel will be applied to scale the value read or written to the register.
cardIndex | : (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
p_outenable | : (Output) TRUE to enable the module to operate in Floating Point Mode. FALSE to operate in Integer mode. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleCount | ( | int32_t | cardIndex, |
int32_t * | moduleCount ) |
Gets the number of modules a card has.
cardIndex | : (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
moduleCount | : (Output) The number of modules the board has. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleHardwareRev | ( | int32_t | cardIndex, |
int32_t | module, | ||
uint32_t * | modhardwarerev ) |
Gets module hardware revision.
cardIndex | : (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
modhardwarerev | : (Output) The hardware revision of the module. |
NAIBRDFUNC uint32_t NAIAPI naibrd_GetModuleID | ( | int32_t | cardIndex, |
int32_t | module ) |
Gets the ID of a module.
cardIndex | : (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleInfo | ( | int32_t | cardIndex, |
int32_t | module, | ||
uint32_t * | modid, | ||
uint32_t * | modver, | ||
uint32_t * | modrev, | ||
uint32_t * | modspecial ) |
Gets module information details.
cardIndex | : (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
modid | : (Output) The ID of the module. |
modver | : (Output) The version of the module. |
modrev | : (Output) The revision of the module. |
modspecial | : (Output) The special code of the module. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleInfoEx | ( | int32_t | cardIndex, |
int32_t | module, | ||
nai_module_info_type_t | modInfoType, | ||
uint32_t * | p_outmoduleInfo ) |
Retrieves the raw module information corresponding to the specified module information type.
cardIndex | : (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
modInfoType | : (Input) Module Information type: refer to nai_module_info_type_t definition. |
p_outmoduleInfo | : (Output) Module information read from module. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleOffset | ( | int32_t | cardIndex, |
int32_t | module, | ||
uint32_t * | offset ) |
Gets the offset of a module on the card.
cardIndex | : (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
offset | : (Output) The offset of that module from the start of the board. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleRev | ( | int32_t | cardIndex, |
int32_t | module, | ||
uint32_t * | modprocrev, | ||
uint32_t * | modfpgarev ) |
Gets module proc and FPGA revision info details.
cardIndex | : (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
modprocrev | : (Output) The revision of the processor code. |
modfpgarev | : (Output) The revision of the FPGA code. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleSeries | ( | int32_t | cardIndex, |
int32_t | module, | ||
nai_series_t * | p_outseries ) |
Retrieves the module series type.
cardIndex | : (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
p_outseries | : (Output) Module Series Type. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetFloatingPointModeEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
bool_t | enable ) |
Sets the module's floating point mode operation on or off. This call blocks until the FLOATING_POINT_CONVERSION_BUSY register is cleared. In floating point mode operation, some of the module's registers will switch from integer values to single-precision floating point values. In this mode, the offset and gain settings specified for each channel will be applied to scale the value read or written to the register.
cardIndex | : (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
enable | : (Input) TRUE to enable the module to operate in Floating Point Mode. FALSE to operate in Integer mode. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetFloatingPointModeEnable_NonBlocking | ( | int32_t | cardIndex, |
int32_t | module, | ||
bool_t | enable ) |
Sets the module's register and naibrd library's (register shadow) floating point mode operation and returns immediately. This API does not wait for the HW to confirm that the conversion is complete. Call naibrd_GetFloatingPointModeConversionComplete(). to get the conversion status.
In floating point mode operation, some of the module's registers will switch from integer values to single-precision floating point values. In this mode, the offset and gain settings specified for each channel will be applied to scale the value read or written to the register.
Naibrd library shadows this register because accessing the local shadowed copy is quicker (via ethernet) than accessing the register. This is needed to convert data correctly. Every time data is read from a hardware register, the data will either be in single precision floating point (floating point mode = ON), or it will need to be converted via software (floating point mode = OFF). If the FloatingPointModeEnable register is accessed every time data is acquired (to determine whether floating Point mode is ON or OFF) there will be a performance hit (significant hit via Ethernet). For this reason, the FloatingPointModeEnable register is read on Open() and shadowed locally).
NOTE: THIS API WILL SET THE INTERNAL COPY OF THE FloatingPointEnable REGISTER WITHOUT BLOCKING ON THE FloatingPointState REGISTER! This can lead to inaccurate data readings if the internal conversion is not complete and the user accesses data registers. For this reason, the user MUST call naibrd_GetFloatingPointModeConversionComplete() to ensure the internal data conversion is complete before accessing any data registers.