Software Library API naibrd 2.24.0
See all documentation at naii.docs.com
naibrd_ref.c File Reference

Functions

static nai_status_t naibrd_REF_VerifyChannel (uint32_t modId, int32_t channel)
 
static nai_status_t naibrd_REF_VerifyChanMappedStatusType (naibrd_ref_chan_mapped_status_type_t statusType)
 
static nai_status_t naibrd_REF_VerifyEventMappedStatus (naibrd_ref_event_mapped_status_type_t statusType)
 
static nai_status_t naibrd_REF_VerifyEventMappedCategory (naibrd_ref_event_mapped_category_type_t categoryType)
 
static nai_status_t naibrd_REF_GetEventMappedCategoryInfo (naibrd_ref_event_mapped_status_type_t statusType, naibrd_ref_event_mapped_category_type_t *p_outcategoryType, uint32_t *p_outaccessIndex, uint32_t *p_outmask)
 
NAIBRDFUNC int32_t NAIAPI naibrd_REF_GetChannelCount (uint32_t modId)
 Returns the number of channels for the specified Reference Module ID.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_SetData (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ref_data_type_t type, float64_t data)
 Sets operational properties (voltage, frequencies, ect..) for the reference module. Data is specified as follows:
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_GetData (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ref_data_type_t type, float64_t *p_outdata)
 Retrieves operational properties (voltage, frequencies, ect..) for the reference module. Data is reported as follows:
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_GetMeasuredData (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ref_measured_type_t type, float64_t *p_outdata)
 Retrieves the measured operational values from the reference module. Measurements are reported as follows:
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_SetChannelEnable (int32_t cardIndex, int32_t module, int32_t channel, uint32_t value)
 Sets the control of a specific channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_GetChannelEnable (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *p_outvalue)
 Retrieves the control of a specific channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_SetChanStatusEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t enable)
 Enables/disables status reporting for the specified REF channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_GetChanStatusEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outenable)
 Retrieves the enabled/disabled state of status reporting for the specified REF channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_GetChanMappedStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ref_chan_mapped_status_type_t statusType, nai_status_bit_t *p_outstatusBit)
 Retrieves the status for the specified Reference channel with the output specified as follows:
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_ClearChanMappedStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ref_chan_mapped_status_type_t statusType)
 Clears the latched or realtime status for the specified REF channel and status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_GetEventMappedStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ref_event_mapped_status_type_t statusType, nai_status_bit_t *p_outstatusBit)
 Retrieves the status for the specified Reference channel with the output specified as follows:
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_ClearEventMappedStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ref_event_mapped_status_type_t statusType)
 Clears the latched status for the specified REF channel and status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_CheckPowerOnBITComplete (int32_t cardIndex, int32_t module, bool_t *p_outpbitComplete)
 Retrieves the Power-On BIT (PBIT) status (complete or incomplete) for the specified channel. The PBIT result will be in the BIT status register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_SetWatchdogQuietTime (int32_t cardIndex, int32_t module, uint32_t quietTime)
 Sets the quiet time duration for the watchdog timer. The watchdog timer is comprised of two parts: quiet time, and window. The quiet time is the time where a strobe is NOT expected to occur, and the window is the time where a SINGLE strobe is expected. A strobe is made by the application by calling naibrd_REF_WatchdogStrobe().
 
nai_status_t NAIAPI naibrd_REF_GetWatchdogQuietTime (int32_t cardIndex, int32_t module, uint32_t *p_outquietTime)
 Retrieves the quiet time duration for the watchdog timer. The watchdog timer is comprised of two parts: quiet time, and window. The quiet time is the time where a strobe is NOT expected to occur, and the window is the time where a SINGLE strobe is expected. A strobe is made by the application by calling naibrd_REF_WatchdogStrobe().
 
nai_status_t NAIAPI naibrd_REF_SetWatchdogWindow (int32_t cardIndex, int32_t module, uint32_t window)
 Sets the window that a call to naibrd_REF_WatchdogStrobe() will be made in. If a call to naibrd_REF_WatchdogStrobe() is not made by the application within the 'window' ('quiet time' + 'window'), the Watchdog Timer Fault will occur.
 
nai_status_t NAIAPI naibrd_REF_GetWatchdogWindow (int32_t cardIndex, int32_t module, uint32_t *p_outwindow)
 Retrieves the window that a call to naibrd_REF_WatchdogStrobe() will be made in. If a call to naibrd_REF_WatchdogStrobe() is not made by the application within the 'window' ('quiet time' + 'window'), the Watchdog Timer Fault will occur.
 
nai_status_t NAIAPI naibrd_REF_WatchdogStrobe (int32_t cardIndex, int32_t module)
 Strobes the Watchdog Timer. A SINGLE call to this function MUST be made by the application within the 'window' or a Watchdog Timer Fault will occur.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_SetReset (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ref_reset_type_t type)
 Resets the channel depending on the type received.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_SetResetAll (int32_t cardIndex, int32_t module, naibrd_ref_reset_type_t type)
 Resets all of the channel depending on the type received.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_GetModulePowerResetStatus (int32_t cardIndex, int32_t module, naibrd_ref_module_power_reset_status_type_t modulePowerResetStatusType, bool_t *p_outmodulePowerResetStatusBit)
 Retrieves the bit specified by the module power reset status type from the module power reset status register for the specified Reference module. Feature supported in Motherboard FPGA Version >= X.X.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_ClearModulePowerResetStatus (int32_t cardIndex, int32_t module, naibrd_ref_module_power_reset_status_type_t modulePowerResetStatusType)
 Clears the bit specified by the module power reset status type in the module power reset status register for the specified Reference module. Feature supported in Motherboard FPGA Version >= X.X.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_SetModulePowerReset (int32_t cardIndex, int32_t module, naibrd_ref_module_power_reset_type_t modulePowerResetType, bool_t modulePowerResetBit)
 Sets the bit specified by the module power reset type in the module power reset register for the specified Reference module. If the bit was set, the hardware will acknowledge it by setting the corresponding bit back to 0. Feature supported in Motherboard FPGA Version >= X.X.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_GetModulePowerReset (int32_t cardIndex, int32_t module, naibrd_ref_module_power_reset_type_t modulePowerResetType, bool_t *p_outmodulePowerResetBit)
 Retrieves the bit specified by the module power reset type from the module power reset register for the specified Reference module. Feature supported in Motherboard FPGA Version >= X.X.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_GetChannelRaw (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ref_register_type_t type, uint32_t *p_outrawData)
 Retrieves the raw register data of the type and channel specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_SetChannelRaw (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ref_register_type_t type, uint32_t rawData)
 Sets the raw register data of the type and channel specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_GetChanMappedStatusRaw (int32_t cardIndex, int32_t module, naibrd_ref_chan_mapped_status_type_t statusType, uint32_t *p_outstatusRaw)
 Retrieves the raw data value in the status register associated with the status type specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_ClearChanMappedStatusRaw (int32_t cardIndex, int32_t module, naibrd_ref_chan_mapped_status_type_t statusType, uint32_t clearStatusRaw)
 Retrieves the raw data value in the status register associated with the status type specified. Note: The result of attempting to clear a realtime status may be unpredictable.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_GetEventMappedStatusRaw (int32_t cardIndex, int32_t module, int32_t channel, nai_status_access_type_t accessType, naibrd_ref_event_mapped_category_type_t categoryType, uint32_t *p_outstatusRaw)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_ClearEventMappedStatusRaw (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ref_event_mapped_category_type_t categoryType, uint32_t statusRaw)
 

Variables

static const uint32_t naibrd_ref_gen5_channel_enable [NAI_REF_GEN5_CHANNELS] = NAI_REF_GEN5_CHANNEL_ENABLE_ADD
 
static const uint32_t naibrd_ref_gen5_overcurrent_reset [NAI_REF_GEN5_CHANNELS] = NAI_REF_GEN5_OVERCURRENT_RESET_ADD
 
static const uint32_t naibrd_ref_gen5_chan_mapped_interrupt_status [NAIBRD_REF_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
 
static const uint32_t naibrd_ref_gen5_event_mapped_interrupt_status [NAIBRD_REF_STATUS_EVENT_MAPPED_CATEGORY_TYPE_ENUM_COUNT][NAI_REF_GEN5_CHANNELS][2] = NAI_REF_GEN5_EVENT_MAPPED_STATUS_ADD
 
static const uint32_t naibrd_68CB6_LD6_gen5_overcurrent_reset [NAI_68CB6_LD6_GEN5_CHANNELS] = NAI_68CB6_LD6_GEN5_OVERCURRENT_RESET_ADD
 
static const uint32_t naibrd_ref_registers [NAIBRD_REF_MODULE_TYPE_ENUM_COUNT][NAIBRD_REF_REGISTER_TYPE_ENUM_COUNT][NAI_REF_GEN5_CHANNELS]
 

Function Documentation

◆ naibrd_REF_ClearEventMappedStatusRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_ClearEventMappedStatusRaw ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_ref_event_mapped_category_type_t categoryType,
uint32_t statusRaw )

◆ naibrd_REF_GetChanMappedStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_GetChanMappedStatus ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_ref_chan_mapped_status_type_t statusType,
nai_status_bit_t * p_outstatusBit )

Retrieves the status for the specified Reference channel with the output specified as follows:

* OVerCurrent            0x00000001
* 
Parameters
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]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
statusType: (Input) The status access type to read: refer to naibrd_ref_chan_mapped_status_type_t definition.
p_outstatusBit: (Output) Channel Status.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_REF_GetChanStatusEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_GetChanStatusEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t * outenable )

Retrieves the enabled/disabled state of status reporting for the specified REF channel.

Parameters
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]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
outenable: (Output) 0 if channel status reporting is disabled or 1 if channel status reporting is enabled.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_REF_GetEventMappedCategoryInfo()

static nai_status_t naibrd_REF_GetEventMappedCategoryInfo ( naibrd_ref_event_mapped_status_type_t statusType,
naibrd_ref_event_mapped_category_type_t * p_outcategoryType,
uint32_t * p_outaccessIndex,
uint32_t * p_outmask )
static

◆ naibrd_REF_GetEventMappedStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_GetEventMappedStatus ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_ref_event_mapped_status_type_t statusType,
nai_status_bit_t * p_outstatusBit )

Retrieves the status for the specified Reference channel with the output specified as follows:

* OVerCurrent            0x00000001
* 
Parameters
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]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
statusType: (Input) The status access type to read: refer to naibrd_ref_event_mapped_status_type_t definition.
p_outstatusBit: (Output) Channel Status.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_REF_GetEventMappedStatusRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_GetEventMappedStatusRaw ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_status_access_type_t accessType,
naibrd_ref_event_mapped_category_type_t categoryType,
uint32_t * p_outstatusRaw )

◆ naibrd_REF_SetChanStatusEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_SetChanStatusEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t enable )

Enables/disables status reporting for the specified REF channel.

Parameters
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]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
enable: (Input) 0 to disable or 1 to enable status reporting for a channel.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid enable parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_REF_VerifyChanMappedStatusType()

static nai_status_t naibrd_REF_VerifyChanMappedStatusType ( naibrd_ref_chan_mapped_status_type_t statusType)
static

◆ naibrd_REF_VerifyChannel()

static nai_status_t naibrd_REF_VerifyChannel ( uint32_t modId,
int32_t channel )
static

◆ naibrd_REF_VerifyEventMappedCategory()

static nai_status_t naibrd_REF_VerifyEventMappedCategory ( naibrd_ref_event_mapped_category_type_t categoryType)
static

◆ naibrd_REF_VerifyEventMappedStatus()

static nai_status_t naibrd_REF_VerifyEventMappedStatus ( naibrd_ref_event_mapped_status_type_t statusType)
static

Variable Documentation

◆ naibrd_68CB6_LD6_gen5_overcurrent_reset

const uint32_t naibrd_68CB6_LD6_gen5_overcurrent_reset[NAI_68CB6_LD6_GEN5_CHANNELS] = NAI_68CB6_LD6_GEN5_OVERCURRENT_RESET_ADD
static

◆ naibrd_ref_gen5_chan_mapped_interrupt_status

const uint32_t naibrd_ref_gen5_chan_mapped_interrupt_status[NAIBRD_REF_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
static
Initial value:
=
NAI_REF_GEN5_CHANNEL_MAPPED_STATUS_ADD

◆ naibrd_ref_gen5_channel_enable

const uint32_t naibrd_ref_gen5_channel_enable[NAI_REF_GEN5_CHANNELS] = NAI_REF_GEN5_CHANNEL_ENABLE_ADD
static

◆ naibrd_ref_gen5_event_mapped_interrupt_status

const uint32_t naibrd_ref_gen5_event_mapped_interrupt_status[NAIBRD_REF_STATUS_EVENT_MAPPED_CATEGORY_TYPE_ENUM_COUNT][NAI_REF_GEN5_CHANNELS][2] = NAI_REF_GEN5_EVENT_MAPPED_STATUS_ADD
static

◆ naibrd_ref_gen5_overcurrent_reset

const uint32_t naibrd_ref_gen5_overcurrent_reset[NAI_REF_GEN5_CHANNELS] = NAI_REF_GEN5_OVERCURRENT_RESET_ADD
static

◆ naibrd_ref_registers

const uint32_t naibrd_ref_registers[NAIBRD_REF_MODULE_TYPE_ENUM_COUNT][NAIBRD_REF_REGISTER_TYPE_ENUM_COUNT][NAI_REF_GEN5_CHANNELS]
static
Initial value:
=
{
{NAI_REF_GEN5_VOLTAGE_ADD, NAI_REF_GEN5_READ_VOLTAGE_ADD, NAI_REF_GEN5_FREQUENCY_ADD, NAI_REF_GEN5_READ_FREQUENCY_ADD,
NAI_REF_GEN5_CURRENT_LIMIT_ADD, NAI_REF_GEN5_READ_CURRENT_ADD},
{NAI_68CB6_LD6_GEN5_REG_VOLTAGE_ADD, NAI_68CB6_LD6_GEN5_REG_READ_VOLTAGE_ADD, NAI_68CB6_LD6_GEN5_REG_FREQUENCY_ADD,
NAI_68CB6_LD6_GEN5_REG_READ_FREQUENCY_ADD, NAI_68CB6_LD6_GEN5_REG_CURRENT_LIMIT_ADD, NAI_68CB6_LD6_GEN5_REG_READ_CURRENT_ADD}
}