Software Library API naibrd 2.24.0
See all documentation at naii.docs.com
Buffer and Channel Status Functions

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_CAN_GetTxFIFOCount (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outcount)
 Get the number of words used in the Tx FIFO.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_CAN_GetRxFIFOCount (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outcount)
 Get the number of words used in the Rx FIFO.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_CAN_GetTxFIFOFrameCount (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outcount)
 Get the number of frames in the Tx FIFO.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_CAN_GetRxFIFOFrameCount (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outcount)
 Get the number of frames in the Rx FIFO.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_CAN_GetTxFIFOMessageWaiting (int32_t cardIndex, int32_t module, int32_t channel, bool_t *p_outmsgWaiting)
 Determine whether or not a Tx message is waiting to be transmitted.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_CAN_GetRxFIFOMessageWaiting (int32_t cardIndex, int32_t module, int32_t channel, bool_t *p_outmsgWaiting)
 Determine whether or not a Rx message is waiting to be received.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_CAN_GetLastError (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outlastError)
 Get the last error of a channel. For Gen 3 modules (P6 and PA), the valid error values are defined by the nai_can_error enumeration. For Gen 5 modules (CB1, CB2 and CB3), the valid error values will either be errors as defined in naibrd_CAN_GetBusStatus or naibrd_CAN_GetCommStatus.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_CAN_ResetLastError (int32_t cardIndex, int32_t module, int32_t channel)
 Resets the last error of a channel.
 

Detailed Description

Function Documentation

◆ naibrd_AR_CAN_GetLastError()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_CAN_GetLastError ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t * p_outlastError )

Get the last error of a channel. For Gen 3 modules (P6 and PA), the valid error values are defined by the nai_can_error enumeration. For Gen 5 modules (CB1, CB2 and CB3), the valid error values will either be errors as defined in naibrd_CAN_GetBusStatus or naibrd_CAN_GetCommStatus.

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]).
p_outlastError: (Output) The Last Error.
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_AR_CAN_GetRxFIFOCount()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_CAN_GetRxFIFOCount ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t * p_outcount )

Get the number of words used in the Rx FIFO.

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]).
p_outcount: (Output) Number of words currently in the Rx FIFO.
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_AR_CAN_GetRxFIFOFrameCount()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_CAN_GetRxFIFOFrameCount ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t * p_outcount )

Get the number of frames in the Rx FIFO.

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]).
p_outcount: (Output) Number of frames in the Rx FIFO.
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_AR_CAN_GetRxFIFOMessageWaiting()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_CAN_GetRxFIFOMessageWaiting ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t * p_outmsgWaiting )

Determine whether or not a Rx message is waiting to be received.

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]).
p_outmsgWaiting: (Output) Message waiting (NAI_TRUE: message is waiting, NAI_FALSE: no message waiting).
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_AR_CAN_GetTxFIFOCount()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_CAN_GetTxFIFOCount ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t * p_outcount )

Get the number of words used in the Tx FIFO.

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]).
p_outcount: (Output) Number of words currently in the Tx FIFO.
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_AR_CAN_GetTxFIFOFrameCount()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_CAN_GetTxFIFOFrameCount ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t * p_outcount )

Get the number of frames in the Tx FIFO.

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]).
p_outcount: (Output) Number of frames in the Tx FIFO.
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_AR_CAN_GetTxFIFOMessageWaiting()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_CAN_GetTxFIFOMessageWaiting ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t * p_outmsgWaiting )

Determine whether or not a Tx message is waiting to be transmitted.

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]).
p_outmsgWaiting: (Output) Message waiting (NAI_TRUE: message is waiting, NAI_FALSE: no message waiting).
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_AR_CAN_ResetLastError()

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

Resets the last error of a 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]).
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.