Software Library API naibrd 2.24.0
See all documentation at naii.docs.com
|
Functions | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_LoadBufferWithTimeOut32 (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *p_buffer, int32_t txCount, int32_t bufferLength, int32_t timeout_msec, int32_t *p_outwritten) |
Writes multiple bytes of data to the transmit FIFO for the specified Serial channel. The actual number of bytes placed in the buffer may be less than the length desired if the FIFO becomes full. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_ReceiveBufferWithTimeOut32 (int32_t cardIndex, int32_t module, int32_t channel, uint32_t outbuffer[], int32_t bufferLength, int32_t expectedCount, int32_t timeout_msec, int32_t *p_outreceived) |
Retrieves multiple bytes of data from the receive FIFO for the specified Serial channel. The number of data elements read may be less than the amount requested if the FIFO goes empty during the read. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_ReceiveHDLCPacket (int32_t cardIndex, int32_t module, int32_t channel, uint32_t outbuffer[], int32_t expectedCount, int32_t *p_outreceived, int32_t timeout_msec) |
Retrieves the buffer data for the specified serial channel associated with one(1) HDLC packet. When an HDLC packet is received OR the maximum count is read, the function returns. Otherwise, it blocks, waiting for data to be read or for the timeout to be reached. NOTE: This function extracts data from the fifo one element at a time, as opposed to naibrd_SER_ReceiveBufferWithTimeOut32() which extracts all of the data at once. For this reason, this API does not perform as efficiently as naibrd_SER_ReceiveBufferWithTimeOut32(). | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetTxBufferCnt (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *p_outcount) |
Retrieves the number of bytes in the Transmit FIFO for the specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SER_GetRxBufferCnt (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *p_outcount) |
Retrieves the number of bytes in the Receive FIFO for specified Serial channel. | |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SER_GetRxBufferCnt | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
uint32_t * | p_outcount ) |
Retrieves the number of bytes in the Receive FIFO for specified Serial channel.
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]). |
p_outcount | : (Output) Pointer where number of bytes in the receive FIFO is returned. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SER_GetTxBufferCnt | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
uint32_t * | p_outcount ) |
Retrieves the number of bytes in the Transmit FIFO for the specified Serial channel.
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]). |
p_outcount | : (Output) Pointer where number of bytes in the transmit FIFO is returned. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SER_LoadBufferWithTimeOut32 | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
uint32_t * | p_buffer, | ||
int32_t | txCount, | ||
int32_t | bufferLength, | ||
int32_t | timeout_msec, | ||
int32_t * | p_outwritten ) |
Writes multiple bytes of data to the transmit FIFO for the specified Serial channel. The actual number of bytes placed in the buffer may be less than the length desired if the FIFO becomes full.
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]). |
p_buffer | : (Input) Data buffer to write to the serial Tx buffer. |
txCount | : (Input) Amount of data to write (in bytes). |
bufferLength | : (Input) The size of the Tx buffer. (Should be the amount of elements in p_buffer). |
timeout_msec | : (Input) NAIBRD_FIFO_TIMEOUT_NONE to indicate not to wait for the FIFO to free up enough space for the data. Otherwise, a wait for maximum of the timeout_msec will occur until the FIFO if freed up to hold the data Use NAIBRD_FIFO_TIMEOUT_NONE to write to the Tx FIFO without waiting. |
p_outwritten | : (Output) Amount of data successfully written. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SER_ReceiveBufferWithTimeOut32 | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
uint32_t | outbuffer[], | ||
int32_t | bufferLength, | ||
int32_t | expectedCount, | ||
int32_t | timeout_msec, | ||
int32_t * | p_outreceived ) |
Retrieves multiple bytes of data from the receive FIFO for the specified Serial channel. The number of data elements read may be less than the amount requested if the FIFO goes empty during the read.
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]). |
outbuffer | : (Output) Buffer to store Rx data. |
bufferLength | : (Input) The size of the Rx buffer (This should be the amount of elements in outbuffer). |
expectedCount | : (Input) Maximum amount of data expected. |
BufferLength must be >= expectedCount.
timeout_msec | : (input) The maximum time allowed to perform the read operation irrespective of the amount of data in the FIFO. Use NAIBRD_FIFO_TIMEOUT_NONE to get whatever data is in the FIFO without waiting. |
p_outreceived | : (Output) Amount of data read from the fifo. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_SER_ReceiveHDLCPacket | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
uint32_t | outbuffer[], | ||
int32_t | expectedCount, | ||
int32_t * | p_outreceived, | ||
int32_t | timeout_msec ) |
Retrieves the buffer data for the specified serial channel associated with one(1) HDLC packet. When an HDLC packet is received OR the maximum count is read, the function returns. Otherwise, it blocks, waiting for data to be read or for the timeout to be reached. NOTE: This function extracts data from the fifo one element at a time, as opposed to naibrd_SER_ReceiveBufferWithTimeOut32() which extracts all of the data at once. For this reason, this API does not perform as efficiently as naibrd_SER_ReceiveBufferWithTimeOut32().
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]). |
outbuffer | : (Output) buffer to store Rx data. |
expectedCount | : (Input) Maximum amount of data expected. |
p_outreceived | : (Output) Amount of data successfully copied into 'buffer'. |
timeout_msec | : (Input) maximum time to wait for packet in milliseconds. |