API calls to access the SENT Receiver IP Core.
The API calls in this module provide functionality to configure and read SENT Receiver IP Core. Every api call in this module returns int indicating error or success status.
int fpgawb_SENT_Rx_Activate_Ch |
( |
void * |
handle, |
|
|
_fpgawb_ipcore_channel_t |
channel, |
|
|
uint |
enable |
|
) |
| |
This api call provides functionality to enable the SENT Receiver IP Core Channel. Input is a handle to the board, channel and enable. The parameter channel specifies the channel number of the IP Core and takes values from FPGAWB_IPCORE_CHANNEL_0 to FPGAWB_MAX_IPCORE_CHANNELS. The parameter enable takes values 0 or 1 and enable must be set to 1 to start configuring the IP Core Channel.
- Parameters
-
[in] | void | *handle (Handle pointer) |
[in] | _fpgawb_ipcore_channel_t | channel
FPGAWB_IPCORE_CHANNEL_0...FPGAWB_MAX_IPCORE_CHANNELS |
[in] | uint | enable |
- Returns
- int
#DRIVERNAME_LIB_NO_ERROR (successful)
#DRIVERNAME_LIB_BAD_HANDLE (no/bad handler supplied)
#DRIVERNAME_LIB_NOT_OPEN (device not open)
#DRIVERNAME_LIB_INVALID_ARG (invalid argument)
#DRIVERNAME_LIB_NO_LOCAL_REGION (local region not present)
#DRIVERNAME_LIB_NO_RESOURCE (SENT Receiver IP Core not present)
#FPGAWB_LIB_FPGAWB_ERROR_INVALID_ARG (Invalid argument specified in the api call)
int fpgawb_SENT_Rx_Configure_Ch |
( |
void * |
handle, |
|
|
_fpgawb_ipcore_channel_t |
channel, |
|
|
fpgawb_ipcore_sent_rx_configure_t * |
config |
|
) |
| |
This api call provides functionality to set up the SENT Receiver IP Core Channel's decoding parameters. Input is a handle to the board, channel and pointer to fpgawb_ipcore_sent_rx_configure_t struct. The parameter channel specifies the channel number of the IP Core and takes values from FPGAWB_IPCORE_CHANNEL_0 to FPGAWB_MAX_IPCORE_CHANNELS. The fpgawb_ipcore_sent_rx_configure_t struct has the number_of_data_nibbles which specifies number of data nibbles to be received and takes value 1 to 6.
- Parameters
-
[in] | void | *handle (Handle pointer) |
[in] | _fpgawb_ipcore_channel_t | channel
FPGAWB_IPCORE_CHANNEL_0...FPGAWB_MAX_IPCORE_CHANNELS |
[in] | fpgawb_ipcore_sent_rx_configure_t | *config
uint number_of_data_nibbles
|
- Returns
- int
#DRIVERNAME_LIB_NO_ERROR (successful)
#DRIVERNAME_LIB_BAD_HANDLE (no/bad handler supplied)
#DRIVERNAME_LIB_NOT_OPEN (device not open)
#DRIVERNAME_LIB_INVALID_ARG (invalid argument)
#DRIVERNAME_LIB_NO_LOCAL_REGION (local region not present)
#DRIVERNAME_LIB_NO_RESOURCE (SENT Receiver IP Core not present)
#FPGAWB_LIB_FPGAWB_ERROR_INVALID_ARG (Invalid argument specified in the api call)
int fpgawb_SENT_Rx_Get_Ch_Info |
( |
void * |
handle, |
|
|
_fpgawb_ipcore_channel_t |
channel, |
|
|
fpgawb_ipcore_sent_rx_info_t * |
info |
|
) |
| |
This api call provides functionality to get SENT Receiver IP Core Channel's Status information. Input is a handle to the board, channel and pointer to fpgawb_ipcore_sent_rx_info_t struct which has the status parameters read. The parameter channel specifies the channel number of the IP Core and takes values from FPGAWB_IPCORE_CHANNEL_0 to FPGAWB_MAX_IPCORE_CHANNELS. The fpgawb_ipcore_sent_rx_info_t struct has five fields state, message_count, number_of_fifo_entries, fifo_full and fifo_empty. The field state is set according to what pulse is currently being decoded and takes values 0-Status and Communication nibble, 1-Data nibble 1, 2-Data nibble 2, 3-Data nibble 3, 4-Data nibble 4, 5-Data nibble 5, 6-Data nibble 6, 7-CRC Checksum nibble, 8-Pause Pulse, A-Synchronization Pulse, E-Data nibble count undefined or out of range, F-Transmitter disabled. The field message_count is the number of messages received successfully without a break in synchronization and resets at 4095. The field fifo_entries is the number of entries currently in the FIFO. The field fifo_full is set to 1 if FIFO is full with 16 entries. The field fifo_empty is set to 1 is FIFO is empty.
- Parameters
-
[in] | void | *handle (Handle pointer) |
[in] | _fpgawb_ipcore_channel_t | channel
FPGAWB_IPCORE_CHANNEL_0...FPGAWB_MAX_IPCORE_CHANNELS |
[in] | fpgawb_ipcore_sent_rx_info_t | *info
uint state
uint message_count
uint number_of_fifo_entries
uint fifo_full
uint fifo_empty
|
- Returns
- int
#DRIVERNAME_LIB_NO_ERROR (successful)
#DRIVERNAME_LIB_BAD_HANDLE (no/bad handler supplied)
#DRIVERNAME_LIB_NOT_OPEN (device not open)
#DRIVERNAME_LIB_INVALID_ARG (invalid argument)
#DRIVERNAME_LIB_NO_LOCAL_REGION (local region not present)
#DRIVERNAME_LIB_NO_RESOURCE (SENT Receiver IP Core not present)
#FPGAWB_LIB_FPGAWB_ERROR_INVALID_ARG (Invalid argument specified in the api call)
int fpgawb_SENT_Rx_Get_Ip_Info |
( |
void * |
handle, |
|
|
fpgawb_ipcore_t * |
ip_core |
|
) |
| |
This api call returns SENT Receiver IP Core information. Input is a handle to the board and fpgawb_ipcore_t struct which is an inout parameter and is populated with IpCoreCode, MajorRevision, MinorRevision, IpCoreOffset and NumChans and returned to the user.
- Parameters
-
[in] | void | *handle (Handle pointer) |
[out] | fpgawb_ipcore_t | *ip_core (pointer to get fpgawb_ipcore_t struct)
uint IpCoreCode
uint MajorRevision
uint MinorRevision
uint IpCoreOffset
uint NumChans
|
- Returns
- int
#DRIVERNAME_LIB_NO_ERROR (successful)
#DRIVERNAME_LIB_BAD_HANDLE (no/bad handler supplied)
#DRIVERNAME_LIB_NOT_OPEN (device not open)
#DRIVERNAME_LIB_INVALID_ARG (invalid argument)
#FPGAWB_LIB_FPGAWB_ERROR_INVALID_ARG (Invalid argument specified in the api call)
int fpgawb_SENT_Rx_Read_Ch_Data |
( |
void * |
handle, |
|
|
_fpgawb_ipcore_channel_t |
channel, |
|
|
fpgawb_ipcore_sent_rx_data_t * |
data |
|
) |
| |
This api call provides functionality to read and decode the data received from the SENT Transmitter IP Core Channel. Input is a handle to the board, channel and pointer to fpgawb_ipcore_sent_rx_data_t struct which has the decoded data information. The parameter channel specifies the channel number of the IP Core and takes values from FPGAWB_IPCORE_CHANNEL_0 to FPGAWB_MAX_IPCORE_CHANNELS and takes value -1 if all channels should be executed in parallel. * The fpgawb_ipcore_sent_rx_data_t struct has twelve fields. The field type specifies the message format and takes values 0-Short, 1-Enhanced or 2-Fast. The field sent_id contains the SENT Ids for the short or enhanced message currently decoded. The ID's will be sent in the order in which they appear in the list. short_or_enhanced_data is the data received in short or enhanced format packet. number_of_data_nibbles specifies number of data nibbles received and takes value 1 to 6. data[MAX_SENT_NIBBLES] contains 1 to 6 data to be received. nshorts is the number of short messages expected to be received and takes value 1 to 4. nenhanceds is the number of enhanced messages expected to be received and takes value 1 to 512. enhanced_bit_id takes values 4 or 8 and indicates if the the SENT Ids used for enhanced message format is a 4 bit Id os a 8 bit Id. is_legacy_CRC takes values 0 or 1 and indicates mechanism to calculate the CRC Checksum nibble. CRC checksum is implemented as a series of shift left by 4 (multiply by 16) followed by a 256 array look-up. number_of_fifo_entries is the number of entries currently in the FIFO. error_rate is the number of packet misses divided by the number of packet hits.
- Parameters
-
[in] | void | *handle (Handle pointer) |
[in] | _fpgawb_ipcore_channel_t | channel
FPGAWB_IPCORE_CHANNEL_0...FPGAWB_MAX_IPCORE_CHANNELS |
[in] | fpgawb_ipcore_sent_rx_data_t | *data
uint type
uint sent_id
uint sent_id_from_file[MAX_SENT_ENHANCEDIDS]
uint short_or_enhanced_data
uint number_of_data_nibbles
uint data[MAX_SENT_NIBBLES]
uint nshorts
uint nenhanceds
uint enhanced_bit_id
uint is_legacy_CRC
uint number_of_fifo_entries
double error_rate
|
- Returns
- int
#DRIVERNAME_LIB_NO_ERROR (successful)
#DRIVERNAME_LIB_BAD_HANDLE (no/bad handler supplied)
#DRIVERNAME_LIB_NOT_OPEN (device not open)
#DRIVERNAME_LIB_INVALID_ARG (invalid argument)
#DRIVERNAME_LIB_NO_LOCAL_REGION (local region not present)
#DRIVERNAME_LIB_NO_RESOURCE (SENT Receiver IP Core not present)
#FPGAWB_LIB_FPGAWB_ERROR_INVALID_ARG (Invalid argument specified in the api call)