Utility Functionality
Utility Functionality.
Typedefs |
|
| typedef void * | sl_rtl_util_libitem |
|
Utility library item.
|
|
Enumerations |
|
| enum | sl_rtl_util_parameter { SL_RTL_UTIL_PARAMETER_AMOUNT_OF_FILTERING = 0 } |
|
Util parameter.
|
|
Detailed Description
Utility Functionality.
These functions provide supporting functionality such as conversions, additional filtering, diagnostics, and setup functions.
Typedef Documentation
◆ sl_rtl_util_libitem
| typedef void* sl_rtl_util_libitem |
Utility library item.
Enumeration Type Documentation
◆ sl_rtl_util_parameter
Function Documentation
◆ sl_rtl_util_init()
| enum sl_rtl_error_code sl_rtl_util_init | ( | sl_rtl_util_libitem * |
item
|
) |
Initialize the Util libitem instance.
- Parameters
-
[in] itemPointer to the libitem to be initialized
- Returns
- SL_RTL_ERROR_SUCCESS if successful
◆ sl_rtl_util_deinit()
| enum sl_rtl_error_code sl_rtl_util_deinit | ( | sl_rtl_util_libitem * |
item
|
) |
Deinitialize a Util libitem instance.
- Parameters
-
[in] itemPointer to the libitem to be deinitialized
- Returns
- SL_RTL_ERROR_SUCCESS if successful
◆ sl_rtl_util_set_parameter()
| enum sl_rtl_error_code sl_rtl_util_set_parameter | ( | sl_rtl_util_libitem * |
item,
|
| enum sl_rtl_util_parameter |
parameter,
|
||
| float |
value
|
||
| ) |
Set util parameters.
- Parameters
-
[in] itemPointer to the initialized Util libitem [in] parameterParameter to change [in] valueValue of the parameter
- Returns
- SL_RTL_ERROR_SUCCESS if successful
◆ sl_rtl_util_filter()
| enum sl_rtl_error_code sl_rtl_util_filter | ( | sl_rtl_util_libitem * |
item,
|
| float |
value_in,
|
||
| float * |
value_out
|
||
| ) |
Filter a value using the moving average.
- Parameters
-
[in] itemPointer to the initialized Util libitem [in] value_inValue to be fed to the filter [out] value_outPointer to the filtered value
- Returns
- SL_RTL_ERROR_SUCCESS if successful
◆ sl_rtl_util_rssi2distance()
| enum sl_rtl_error_code sl_rtl_util_rssi2distance | ( | float |
tx_power,
|
| float |
rssi,
|
||
| float * |
distance_out
|
||
| ) |
Convert an RSSI-value to distance in meters.
- Parameters
-
[in] itemPointer to the initialized Util libitem [in] tx_powerReference RSSI value of the TX-device at 1.0 m distance in dBm, for example -45.0f [in] rssiMeasured RSSI from the receiver [out] distance_outDistance in meters
- Returns
- SL_RTL_ERROR_SUCCESS if successful
◆ sl_rtl_util_iq_sample_qa_setup()
| enum sl_rtl_error_code sl_rtl_util_iq_sample_qa_setup | ( | sl_rtl_util_libitem * |
item,
|
| uint32_t |
level,
|
||
| uint32_t |
num_antennas,
|
||
| bool |
raw_samples
|
||
| ) |
Set up the IQ sample quality analysis.
- Parameters
-
[in] itemPointer to the initialized Util libitem [in] levelAnalysis level [in] num_antennasThe number of antennas in the array [in] raw_samplesData contains raw samples instead of picked ones
- Returns
- SL_RTL_ERROR_SUCCESS if successful
◆ sl_rtl_util_iq_sample_qa_set_parameters()
| enum sl_rtl_error_code sl_rtl_util_iq_sample_qa_set_parameters | ( | sl_rtl_util_libitem * |
item,
|
| uint32_t |
sample_rate,
|
||
| uint8_t |
sample_offset,
|
||
| uint8_t |
samples_in_slot,
|
||
| uint8_t |
number_of_channels
|
||
| ) |
Set up parameters for the IQ sample quality analysis.
- Parameters
-
[in] itemPointer to the initialized Util libitem [in] sample_rateThe sampling rate [in] sample_offsetThe offset for the picked sample in the sampling slot [in] samples_in_slotNumber of samples in the sampling slot [in] number_of_channelsNumber of radio channels
- Returns
- SL_RTL_ERROR_SUCCESS if successful
◆ sl_rtl_util_iq_sample_qa_set_downsampling_factor()
| enum sl_rtl_error_code sl_rtl_util_iq_sample_qa_set_downsampling_factor | ( | sl_rtl_util_libitem * |
item,
|
| float |
dsf
|
||
| ) |
Set up IQ sample QA downsampling ratio.
Set the downsampling factor used during the antenna samples (related to the sampling rate of the reference period)
- Parameters
-
[in] itemPointer to the initialized Util libitem [in] dsfThe downsampling factor
- Returns
- SL_RTL_ERROR_SUCCESS if successful
◆ sl_rtl_util_iq_sample_qa_set_data_offset()
| enum sl_rtl_error_code sl_rtl_util_iq_sample_qa_set_data_offset | ( | sl_rtl_util_libitem * |
item,
|
| uint32_t |
offset
|
||
| ) |
Set data samples offset.
Set the offset for the data samples from the start of the reference period. The use of this function is optional and, if not given, the default values are used.
- Parameters
-
[in] itemPointer to the initialized Util libitem [in] offsetThe data samples' offset
- Returns
- SL_RTL_ERROR_SUCCESS if successful
◆ sl_rtl_util_iq_sample_qa_set_switch_pattern()
| enum sl_rtl_error_code sl_rtl_util_iq_sample_qa_set_switch_pattern | ( | sl_rtl_util_libitem * |
item,
|
| uint32_t |
size,
|
||
| uint32_t * |
pattern
|
||
| ) |
Set the switch pattern for the IQ sample quality.
- Parameters
-
[in] itemPointer to the initialized Util libitem [in] sizeThe size of the switch pattern [in] patternArray of integers representing the switch pattern
- Returns
- SL_RTL_ERROR_SUCCESS if successful
◆ sl_rtl_util_iq_sample_qa_add_reference()
| enum sl_rtl_error_code sl_rtl_util_iq_sample_qa_add_reference | ( | sl_rtl_util_libitem * |
item,
|
| uint32_t |
num_samples,
|
||
| float * |
i_samples,
|
||
| float * |
q_samples
|
||
| ) |
Feed the IQ sample quality analysis the reference period data.
- Parameters
-
[in] itemPointer to the initialized Util libitem [in] num_samplesThe size of data [in] i_samplesI-part of the sample data [in] q_samplesQ-part of the sample data
- Returns
- SL_RTL_ERROR_SUCCESS if successful
◆ sl_rtl_util_iq_sample_qa_add_data()
| enum sl_rtl_error_code sl_rtl_util_iq_sample_qa_add_data | ( | sl_rtl_util_libitem * |
item,
|
| uint32_t |
num_snapshots,
|
||
| float ** |
i_samples,
|
||
| float ** |
q_samples,
|
||
| uint8_t |
channel
|
||
| ) |
Feed the IQ sample quality analysis the antenna data.
- Parameters
-
[in] itemPointer to the initialized Util libitem [in] num_snapshotsThe size of the data [in] i_samplesI-part of the sample data [in] q_samplesQ-part of the sample data [in] channelRadio channel the packet is using.
- Returns
- SL_RTL_ERROR_SUCCESS if successful
◆ sl_rtl_util_iq_sample_qa_get_results()
| uint32_t sl_rtl_util_iq_sample_qa_get_results | ( | sl_rtl_util_libitem * |
item
|
) |
Get the overall results of the IQ sample quality analysis.
- Parameters
-
[in] itemPointer to the initialized Util libitem
- Returns
- Bitmask of the failing tests, zero if everything passed
◆ sl_rtl_util_iq_sample_qa_get_details()
| enum sl_rtl_error_code sl_rtl_util_iq_sample_qa_get_details | ( | sl_rtl_util_libitem * |
item,
|
| sl_rtl_clib_iq_sample_qa_dataset_t * |
iq_sample_qa_results,
|
||
| sl_rtl_clib_iq_sample_qa_antenna_data_t * |
antenna_data
|
||
| ) |
Get the detailed results of the IQ sample quality analysis.
- Parameters
-
[in] itemPointer to the initialized Util libitem [out] iq_sample_qa_resultsThe data structure with data related to the previous data packet [out] antenna_dataThe array of antenna-specific results
- Returns
- SL_RTL_ERROR_SUCCESS if successful
◆ sl_rtl_util_iq_sample_qa_get_channel_details()
| enum sl_rtl_error_code sl_rtl_util_iq_sample_qa_get_channel_details | ( | sl_rtl_util_libitem * |
item,
|
| uint8_t |
channel,
|
||
| sl_rtl_clib_iq_sample_qa_dataset_t * |
iq_sample_qa_results,
|
||
| sl_rtl_clib_iq_sample_qa_antenna_data_t * |
antenna_data
|
||
| ) |
Get the detailed results of the IQ sample quality analysis for the specified radio channel.
- Parameters
-
[in] itemPointer to the initialized Util libitem [in] channelRadio channel to show results for. [out] iq_sample_qa_resultsThe data structure with data related to the last data packet using the requested channel [out] antenna_dataThe array of antenna specific results
- Returns
- SL_RTL_ERROR_SUCCESS if successful
◆ sl_rtl_util_iq_sample_qa_code2string()
| char* sl_rtl_util_iq_sample_qa_code2string | ( | char * |
buf,
|
| int |
size,
|
||
| uint32_t |
code
|
||
| ) |
Write the IQ sample quality analysis code as human readable strings in the provided buffer.
- Parameters
-
[in] bufBuffer for the results to be written [in] sizeSize of the buffer [in] codeThe results previously received from the sl_rtl_util_iq_sample_qa_get_results()
- Returns
- pointer to the buffer containing data, or to a constant string