Software Library API naibrd 1.62
See all documentation at naii.docs.com
Interrupt Functions

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetInterruptEdgeLevel (int32_t cardIndex, int32_t module, nai_can_status_type_t type, uint32_t edgeLevel)
 Sets the Interrupt Edge/Level register value for the specified CAN channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetInterruptEdgeLevel (int32_t cardIndex, int32_t module, nai_can_status_type_t type, uint32_t *outEdgeLevel)
 Retrieves the Interrupt Edge/Level register value for the specified CAN channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetInterruptSteering (int32_t cardIndex, int32_t module, nai_can_status_type_t type, naibrd_int_steering_t steering)
 Sets the Interrupt Steering which indicates the interrupt direction for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetInterruptSteering (int32_t cardIndex, int32_t module, nai_can_status_type_t type, naibrd_int_steering_t *outsteering)
 Retrieves the Interrupt Steering which indicates the interrupt direction for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetStatus (int32_t cardIndex, int32_t module, int32_t channel, nai_can_status_type_t type, nai_status_bit_t *outstatusVal)
 Get the interrupt status for the specified channel. Valid interrupt status flags are defined by the nai_can_status_type enumeration.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetSWTData (int32_t cardIndex, int32_t module, int32_t channel, bool_t *updateOccured, bool_t *interruptOccured, nai_can_swt_fault_type_t *faultType, uint32_t *faultValue)
 Gets the information associated with the SWT (Short Wire Test) status for a specific channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_ClearStatus (int32_t cardIndex, int32_t module, int32_t channel, nai_can_status_type_t type)
 Set the interrupt enable bit for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetIntEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t enable)
 Set the interrupt enable bit for the specified channel. This call is specific to the RECV Status.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetIntEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outenable)
 Get the interrupt enable for the specified channel. This call is specific to the RECV Status.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetSWTIntEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t enable)
 Set the interrupt enable bit for the specified channel. This is specific to the SWT Status.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetSWTIntEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *enable)
 Gets the interrupt enable for the specified channel. This is specific to the SWT Status.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetIntVector (int32_t cardIndex, int32_t module, int32_t channel, nai_can_status_type_t type, int32_t intvector)
 Set the interrupt vector for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetIntVector (int32_t cardIndex, int32_t module, int32_t channel, nai_can_status_type_t type, int32_t *outintvector)
 Get the interrupt vector for the specified channel.
 

Detailed Description


Function Documentation

◆ naibrd_CAN_ClearStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_ClearStatus ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_can_status_type_t type )

Set the interrupt enable bit for the specified channel.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect 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) CAN Status Type - refer to nai_can_status_type_t definition.
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_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetIntEnable()

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

Get the interrupt enable for the specified channel. This call is specific to the RECV Status.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect 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) Interrupt enable (TRUE: Enable, FALSE: Disable).
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_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetInterruptEdgeLevel()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetInterruptEdgeLevel ( int32_t cardIndex,
int32_t module,
nai_can_status_type_t type,
uint32_t * outEdgeLevel )

Retrieves the 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]).
type: (Input) Status Type: refer to nai_can_status_type_t definition.
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.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetInterruptSteering()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetInterruptSteering ( int32_t cardIndex,
int32_t module,
nai_can_status_type_t type,
naibrd_int_steering_t * outsteering )

Retrieves the 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]).
type: (Input) Status Type: refer to nai_can_status_type_t definition.
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_GetIntVector()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetIntVector ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_can_status_type_t type,
int32_t * outintvector )

Get the interrupt vector for the specified channel.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect 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]). Not used for Gen5 boards.
type: (Input) Status Type: refer to nai_can_status_type_t definition. Use for Gen5 boards.
outintvector: (Output) Interrupt vector.
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_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetStatus ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_can_status_type_t type,
nai_status_bit_t * outstatusVal )

Get the interrupt status for the specified channel. Valid interrupt status flags are defined by the nai_can_status_type enumeration.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect 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) CAN Status Type - refer to nai_can_status_type_t definition.
outstatusVal: (Output) Interrupt 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_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetSWTData()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetSWTData ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t * updateOccured,
bool_t * interruptOccured,
nai_can_swt_fault_type_t * faultType,
uint32_t * faultValue )

Gets the information associated with the SWT (Short Wire Test) status for a specific channel.

NOTE: The Good Value is a Fault Value recorded after the first 16 transmissions for a particular channel. This recorded Good Value is the value that will be used as a benchmark for all future transmissions, when determining if the bus is faulty or not.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect 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]).
updateOccured: (Output) If TRUE the Fault Value from the most recent transmission is within tolerance of the Good Value.
interruptOccured: (Output) If TRUE the Fault Value from the most recent transmission is not within tolerance of the Good Value. This is an indicator that a fault has occurred.
faultType: (Output) A Value indicating what type of BUS problem caused the fault.
faultValue: (Output) Value of the measured signature for the specified Fault Type.
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_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetSWTIntEnable()

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

Gets the interrupt enable for the specified channel. This is specific to the SWT Status.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect 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: (Output) Interrupt enable (TRUE: Enable, FALSE: Disable).
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_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetIntEnable()

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

Set the interrupt enable bit for the specified channel. This call is specific to the RECV Status.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect 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) Interrupt enable (TRUE: Enable, FALSE: Disable).
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_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetInterruptEdgeLevel()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetInterruptEdgeLevel ( int32_t cardIndex,
int32_t module,
nai_can_status_type_t type,
uint32_t edgeLevel )

Sets the 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]).
type: (Input) Status Type: refer to nai_can_status_type_t definition.
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.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetInterruptSteering()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetInterruptSteering ( int32_t cardIndex,
int32_t module,
nai_can_status_type_t type,
naibrd_int_steering_t steering )

Sets the 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]).
type: (Input) Status Type: refer to nai_can_status_type_t definition.
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_SetIntVector()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetIntVector ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_can_status_type_t type,
int32_t intvector )

Set the interrupt vector for the specified channel.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect 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]). Not used for Gen5 boards.
type: (Input) Status Type: refer to nai_can_status_type_t definition. Use for Gen5 boards.
intvector: (Input) Interrupt vector.
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_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetSWTIntEnable()

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

Set the interrupt enable bit for the specified channel. This is specific to the SWT Status.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect 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) Interrupt enable (TRUE: Enable, FALSE: Disable).
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_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.