Software Library API naibrd 2.24.0
See all documentation at naii.docs.com
|
Functions | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_AB_QueueTransmit32 (int32_t cardIndex, int32_t module, int32_t channel, bool_t isModeA, int32_t msgId, uint32_t *p_buffer, int32_t txCount) |
Queues a CAN AB message for transmit on the channels FIFO. The message will be sent once the TX_ENABLE bit is set in the channel's control register. If that bit is already set, the message will be transmitted immediately. If the Tx FIFO does not have enough space to hold the message, the function will return immediately with a value of NAI_ERROR_FULL. If the message is longer than NAI_AB_MAX_DATA_LEN, the function will return immediately with a value of NAI_ERROR_INVALID_RANGE. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_AB_Transmit32 (int32_t cardIndex, int32_t module, int32_t channel, bool_t isModeA, int32_t msgId, uint32_t *p_buffer, int32_t txCount) |
Queues a message to transmit on a CAN A/B channel's Tx FIFO, then enables the transmit bit in the channel's control word. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_AB_Receive32 (int32_t cardIndex, int32_t module, int32_t channel, bool_t *p_outisModeA, int32_t *p_outmsgId, uint32_t bufferLength, uint32_t *p_outbuffer, int32_t *p_outrxCount) |
Reads a CAN AB message off a channel. If there are no messages waiting, this function will return NAI_ERROR_EMPTY. If the format of the message on the fifo is invalid the function will return NAI_ERROR_MISMATCH. If the message exceeds buflen the function will fill as much as it can, discard the rest of the message, and return NAI_ERROR_MORE_DATA. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_J1939_QueueTransmit32 (int32_t cardIndex, int32_t module, int32_t channel, int32_t pgn, int32_t priority, int32_t destination, uint32_t *p_buffer, int32_t txCount) |
Queues a J1939 message, for transmit on the given channel. The message will be sent once the TX_ENABLE bit is set in the channel's control register. If that bit is already set, the message will be transmitted immediately. If the Tx FIFO does not have enough space to hold the message, the function will return immediately with a value of NAI_ERROR_FULL. If the message is longer than NAIBRD_CAN_J1939_MAX_DATA_LEN, the function will return immediately with a value of NAI_ERROR_INVALID_RANGE. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_J1939_Transmit32 (int32_t cardIndex, int32_t module, int32_t channel, int32_t pgn, int32_t priority, int32_t destination, uint32_t *p_buffer, int32_t txCount) |
Queues a message to transmit on a J1939 channel's Tx FIFO, then enables the transmit bit in the channel's control word. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_J1939_Receive32 (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outpgn, int32_t *p_outsource, int32_t *p_outdestination, uint32_t bufferLength, uint32_t *p_outbuffer, int32_t *p_outrxCount) |
Reads a J1939 message off a channel on a gen5 module. If there are no messages waiting, this function will return NAI_ERROR_EMPTY. If the format of the message on the fifo is invalid the function will return NAI_ERROR_MISMATCH. If the message exceeds buflen the function will fill as much as it can, discard the rest of the message, and return NAI_ERROR_MORE_DATA. | |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_AB_QueueTransmit32 | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t | isModeA, | ||
int32_t | msgId, | ||
uint32_t * | p_buffer, | ||
int32_t | txCount ) |
Queues a CAN AB message for transmit on the channels FIFO. The message will be sent once the TX_ENABLE bit is set in the channel's control register. If that bit is already set, the message will be transmitted immediately. If the Tx FIFO does not have enough space to hold the message, the function will return immediately with a value of NAI_ERROR_FULL. If the message is longer than NAI_AB_MAX_DATA_LEN, the function will return immediately with a value of NAI_ERROR_INVALID_RANGE.
This function provides optimized performance for 32 bit buffer writes.
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]). |
isModeA | : (Input) Mode (NAI_TRUE: CAN-A, NAI_FALSE: CAN-B.) |
msgId | : (Input) Message ID (11-bits for CAN-A, 29 bits for CAN-B). |
p_buffer | : (Input) Pointer to the buffer containing the message. |
txCount | : (Input) Length of the message (in bytes). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_AB_Receive32 | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t * | p_outisModeA, | ||
int32_t * | p_outmsgId, | ||
uint32_t | bufferLength, | ||
uint32_t * | p_outbuffer, | ||
int32_t * | p_outrxCount ) |
Reads a CAN AB message off a channel. If there are no messages waiting, this function will return NAI_ERROR_EMPTY. If the format of the message on the fifo is invalid the function will return NAI_ERROR_MISMATCH. If the message exceeds buflen the function will fill as much as it can, discard the rest of the message, and return NAI_ERROR_MORE_DATA.
This function provides optimized performance for 32 bit buffers.
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_outisModeA | : (Output) Pointer to a bool_t indicating CAN mode A or B (NAI_TRUE: CAN-A, NAI_FALSE: CAN-B). |
p_outmsgId | : (Output) Pointer to an integer to store the message ID. |
bufferLength | : (Input) Number of bytes allocated to the buffer passed in. |
*
p_outbuffer | : (Output) Buffer containing the received message. |
p_outrxCount | : (Output) Pointer to an integer containing the received message size (in bytes). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_AB_Transmit32 | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t | isModeA, | ||
int32_t | msgId, | ||
uint32_t * | p_buffer, | ||
int32_t | txCount ) |
Queues a message to transmit on a CAN A/B channel's Tx FIFO, then enables the transmit bit in the channel's control word.
This function provides optimized performance for 32 bit buffer writes.
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]). |
isModeA | : (Input) Mode (NAI_TRUE: CAN-A, NAI_FALSE: CAN-B.) |
msgId | : (Input) Message ID (11-bits for CAN-A, 29 bits for CAN-B). |
p_buffer | : (Input) Pointer to the buffer containing the message. |
txCount | : (Input) Length of the message (in bytes). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_J1939_QueueTransmit32 | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | pgn, | ||
int32_t | priority, | ||
int32_t | destination, | ||
uint32_t * | p_buffer, | ||
int32_t | txCount ) |
Queues a J1939 message, for transmit on the given channel. The message will be sent once the TX_ENABLE bit is set in the channel's control register. If that bit is already set, the message will be transmitted immediately. If the Tx FIFO does not have enough space to hold the message, the function will return immediately with a value of NAI_ERROR_FULL. If the message is longer than NAIBRD_CAN_J1939_MAX_DATA_LEN, the function will return immediately with a value of NAI_ERROR_INVALID_RANGE.
This function provides optimized performance for 32 bit buffer writes.
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]). |
pgn | : (Input) Parameter Group Number. |
priority | : (Input) Priority of the message (0 being highest and 7 being lowest). |
destination | : (Input) Destination of the message (0 to FE, or FF to broadcast). |
p_buffer | : (Input) Pointer to the buffer containing the message. |
txCount | : (Input) Length of the message (in bytes). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_J1939_Receive32 | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t * | p_outpgn, | ||
int32_t * | p_outsource, | ||
int32_t * | p_outdestination, | ||
uint32_t | bufferLength, | ||
uint32_t * | p_outbuffer, | ||
int32_t * | p_outrxCount ) |
Reads a J1939 message off a channel on a gen5 module. If there are no messages waiting, this function will return NAI_ERROR_EMPTY. If the format of the message on the fifo is invalid the function will return NAI_ERROR_MISMATCH. If the message exceeds buflen the function will fill as much as it can, discard the rest of the message, and return NAI_ERROR_MORE_DATA.
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_outpgn | : (Output) Pointer to a integer to store the Parameter Group Number. |
p_outsource | : (Output) Pointer to an integer to store the source of the message. |
p_outdestination | : (Output) Pointer to an integer to store the destination of the message (0 to FE, or FF to broadcast). |
bufferLength | : (Input) Number of bytes allocated to the buffer passed in. |
p_outbuffer | : (Output) Buffer containing the received message. Only the first byte of each word in the outbuffer contains the data. |
p_outrxCount | : (Output) Pointer to an integer containing the received message size (in bytes). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_J1939_Transmit32 | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | pgn, | ||
int32_t | priority, | ||
int32_t | destination, | ||
uint32_t * | p_buffer, | ||
int32_t | txCount ) |
Queues a message to transmit on a J1939 channel's Tx FIFO, then enables the transmit bit in the channel's control word.
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]). |
pgn | : (Input) Parameter Group Number. |
priority | : (Input) Priority of the message (0 being highest and 7 being lowest). |
destination | : (Input) Destination of the message (0 to FE, or FF to broadcast). |
p_buffer | : (Input) Pointer to the buffer containing the message. Buffer should be of type uint16_t* or uint32_t* |
txCount | : (Input) Length of the message (in bytes). |