Software Library API naibrd 1.62
See all documentation at naii.docs.com
Built-in Test Functions

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_InitiateBIT (int32_t cardIndex, int32_t module, int32_t channel, bool_t waitForResult)
 Executes the CAN Built-in Test and returns the results. BIT takes the channel off line, executes the tests and then reconnects the channel. The results of the test are returned in the status if waitForResult = 1, otherwise the return value will be any of the statuses listed below with the exception of NAI_ERROR_TIMEOUT and NAI_ERROR_BIT_FAILED.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_CheckBITComplete (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outBitComplete)
 Retrieves the BIT status (complete or incomplete) of the channel specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetBITStatus (int32_t cardIndex, int32_t module, int32_t channel, nai_can_status_access_type_t type, bool_t *outBitStatus)
 Retrieves the BIT status of the channel specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_ClearBITStatus (int32_t cardIndex, int32_t module, int32_t channel)
 Clears the latched BIT status of the channel specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetBITInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t intEnable)
 Sets the BIT Interrupt Enable register value for the specified CAN channel. Setting the bits to 1 enabled interrupts. Status is reported in the BIT Interrupt Status register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetBITInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outIntEnable)
 Retrieves the BIT Interrupt Enable register value for the specified CAN channel. Setting the bits to 1 enabled interrupts. Status is reported in the BIT Interrupt Status register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetBITInterruptEdgeLevel (int32_t cardIndex, int32_t module, int32_t channel, bool_t edgeLevel)
 Sets the BIT Interrupt Edge/Level register value for the specified CAN channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetBITInterruptEdgeLevel (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outEdgeLevel)
 Retrieves the BIT Interrupt Edge/Level register value for the specified CAN channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetBITInterruptVector (int32_t cardIndex, int32_t module, uint32_t vector)
 Sets the BIT interrupt vector for the specified CAN module.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetBITInterruptVector (int32_t cardIndex, int32_t module, uint32_t *outvector)
 Retrieves the BIT interrupt vector for the specified CAN module.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetBITInterruptSteering (int32_t cardIndex, int32_t module, naibrd_int_steering_t steering)
 Sets the BIT Interrupt Steering which indicates the interrupt direction for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetBITInterruptSteering (int32_t cardIndex, int32_t module, naibrd_int_steering_t *outsteering)
 Retrieves the BIT Interrupt Steering which indicates the interrupt direction for the specified channel.
 

Detailed Description


Function Documentation

◆ naibrd_CAN_CheckBITComplete()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_CheckBITComplete ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t * outBitComplete )

Retrieves the BIT status (complete or incomplete) of the channel specified.

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]).
outBitComplete: (Output) 0 = BIT not done, 1 = BIT complete.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card 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_CAN_ClearBITStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_ClearBITStatus ( int32_t cardIndex,
int32_t module,
int32_t channel )

Clears the latched BIT status of the channel specified.

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]).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.

◆ naibrd_CAN_GetBITInterruptEdgeLevel()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetBITInterruptEdgeLevel ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t * outEdgeLevel )

Retrieves the BIT Interrupt Edge/Level register value for the specified CAN 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]).
outEdgeLevel: (Output)Bitmask of the trigger Mode of interrupts (0 = EDGE, 1 = LEVEL).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.

◆ naibrd_CAN_GetBITInterruptEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetBITInterruptEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t * outIntEnable )

Retrieves the BIT Interrupt Enable register value for the specified CAN channel. Setting the bits to 1 enabled interrupts. Status is reported in the BIT Interrupt Status register.

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]).
outIntEnable: (Output) Bitmask of interrupts to enable(1) and/or disable(0).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.

◆ naibrd_CAN_GetBITInterruptSteering()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetBITInterruptSteering ( int32_t cardIndex,
int32_t module,
naibrd_int_steering_t * outsteering )

Retrieves the BIT Interrupt Steering which indicates the interrupt direction for the specified 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]).
outsteering: (Output) Interrupt Steering: refer to naibrd_int_steering_t definition.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_VALUE when invalid group register type is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetBITInterruptVector()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetBITInterruptVector ( int32_t cardIndex,
int32_t module,
uint32_t * outvector )

Retrieves the BIT interrupt vector for the specified CAN module.

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]).
outvector: (Output) Interrupt vector.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetBITStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetBITStatus ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_can_status_access_type_t type,
bool_t * outBitStatus )

Retrieves the BIT status of the channel specified.

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]).
type: (Input) The status access type to read.
outBitStatus: (Output) Channel BIT Status (0 = pass, 1 = fail).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.

◆ naibrd_CAN_InitiateBIT()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_InitiateBIT ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t waitForResult )

Executes the CAN Built-in Test and returns the results. BIT takes the channel off line, executes the tests and then reconnects the channel. The results of the test are returned in the status if waitForResult = 1, otherwise the return value will be any of the statuses listed below with the exception of NAI_ERROR_TIMEOUT and NAI_ERROR_BIT_FAILED.

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]).
waitForResult: (Input) This allows this API to either wait for the BIT result before returning or return immediately after BIT is initiated. When returning immediately, please allow 5mS for the BIT to complete. Calling naibrd_CAN_GetBITStatus() after BIT is complete will return the results of the last executed test, regardless if this API returns immediately or after the test is complete.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card 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.
  • NAI_ERROR_TIMEOUT when BIT times out (does not finish in time allotted).
  • NAI_ERROR_BIT_FAILED when the BIT indicates a failure.

◆ naibrd_CAN_SetBITInterruptEdgeLevel()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetBITInterruptEdgeLevel ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t edgeLevel )

Sets the BIT Interrupt Edge/Level register value for the specified CAN 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]).
edgeLevel: (Input) Bitmask of the trigger Mode of interrupts (0 = EDGE, 1 = LEVEL).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.

◆ naibrd_CAN_SetBITInterruptEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetBITInterruptEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t intEnable )

Sets the BIT Interrupt Enable register value for the specified CAN channel. Setting the bits to 1 enabled interrupts. Status is reported in the BIT Interrupt Status register.

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]).
intEnable: (Input) Bitmask of interrupts to enable(1) and/or disable(0).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.

◆ naibrd_CAN_SetBITInterruptSteering()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetBITInterruptSteering ( int32_t cardIndex,
int32_t module,
naibrd_int_steering_t steering )

Sets the BIT Interrupt Steering which indicates the interrupt direction for the specified 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]).
steering: (Input) Interrupt Steering: refer to naibrd_int_steering_t definition.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_VALUE when invalid group register type is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetBITInterruptVector()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetBITInterruptVector ( int32_t cardIndex,
int32_t module,
uint32_t vector )

Sets the BIT interrupt vector for the specified CAN module.

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]).
vector: (Input) Interrupt vector.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.