|
LMS API Documentation v23.11.0
|
Topics | |
| Additional streaming options | |
| These can be combined with lms_stream_t::channel to enable additional streaming options. | |
Data Structures | |
| struct | lms_stream_meta_t |
| struct | lms_stream_t |
| struct | lms_stream_status_t |
Functions | |
| API_EXPORT int CALL_CONV | LMS_SetupStream (lms_device_t *device, lms_stream_t *stream) |
| API_EXPORT int CALL_CONV | LMS_DestroyStream (lms_device_t *dev, lms_stream_t *stream) |
| API_EXPORT int CALL_CONV | LMS_StartStream (lms_stream_t *stream) |
| API_EXPORT int CALL_CONV | LMS_StopStream (lms_stream_t *stream) |
| API_EXPORT int CALL_CONV | LMS_RecvStream (lms_stream_t *stream, void *samples, size_t sample_count, lms_stream_meta_t *meta, unsigned timeout_ms) |
| API_EXPORT int CALL_CONV | LMS_GetStreamStatus (lms_stream_t *stream, lms_stream_status_t *status) |
| API_EXPORT int CALL_CONV | LMS_SendStream (lms_stream_t *stream, const void *samples, size_t sample_count, const lms_stream_meta_t *meta, unsigned timeout_ms) |
| API_EXPORT int CALL_CONV | LMS_UploadWFM (lms_device_t *device, const void **samples, uint8_t chCount, size_t sample_count, int format) |
| API_EXPORT int CALL_CONV | LMS_EnableTxWFM (lms_device_t *device, unsigned chan, bool active) |
The functions in this section provides support for sending and receiving IQ data samples.
| API_EXPORT int CALL_CONV LMS_DestroyStream | ( | lms_device_t * | dev, |
| lms_stream_t * | stream ) |
Deallocate memory used by stream.
| dev | Device handle previously obtained by LMS_Open(). |
| stream | Stream structure previously initialized with LMS_SetupStream(). |
| API_EXPORT int CALL_CONV LMS_EnableTxWFM | ( | lms_device_t * | device, |
| unsigned | chan, | ||
| bool | active ) |
Enables/Disables transmitting of uploaded waveform
| device | Device handle previously obtained by LMS_Open(). |
| chan | Channel index |
| active | Enable/Disable waveform playback |
| API_EXPORT int CALL_CONV LMS_GetStreamStatus | ( | lms_stream_t * | stream, |
| lms_stream_status_t * | status ) |
Get stream operation status
| stream | structure previously initialized with LMS_SetupStream(). |
| status | Stream status. See the lms_stream_status_t for description |
| API_EXPORT int CALL_CONV LMS_RecvStream | ( | lms_stream_t * | stream, |
| void * | samples, | ||
| size_t | sample_count, | ||
| lms_stream_meta_t * | meta, | ||
| unsigned | timeout_ms ) |
Read samples from the FIFO of the specified stream. Sample buffer must be big enough to hold requested number of samples.
| stream | structure previously initialized with LMS_SetupStream(). |
| samples | sample buffer. |
| sample_count | Number of samples to read |
| meta | Metadata. See the lms_stream_meta_t description. |
| timeout_ms | how long to wait for data before timing out. |
| API_EXPORT int CALL_CONV LMS_SendStream | ( | lms_stream_t * | stream, |
| const void * | samples, | ||
| size_t | sample_count, | ||
| const lms_stream_meta_t * | meta, | ||
| unsigned | timeout_ms ) |
Write samples to the FIFO of the specified stream.
| stream | structure previously initialized with LMS_SetupStream(). |
| samples | sample buffer. |
| sample_count | Number of samples to write |
| meta | Metadata. See the lms_stream_meta_t description. |
| timeout_ms | how long to wait for data before timing out. |
| API_EXPORT int CALL_CONV LMS_SetupStream | ( | lms_device_t * | device, |
| lms_stream_t * | stream ) |
Create new stream based on parameters passed in configuration structure. The structure is initialized with stream handle.
| device | Device handle previously obtained by LMS_Open(). |
| stream | Stream configuration .See the lms_stream_t description. |
| API_EXPORT int CALL_CONV LMS_StartStream | ( | lms_stream_t * | stream | ) |
Start stream
| stream | Stream structure previously initialized with LMS_SetupStream(). |
| API_EXPORT int CALL_CONV LMS_StopStream | ( | lms_stream_t * | stream | ) |
Stop stream
| stream | Stream structure previously initialized with LMS_SetupStream(). |
| API_EXPORT int CALL_CONV LMS_UploadWFM | ( | lms_device_t * | device, |
| const void ** | samples, | ||
| uint8_t | chCount, | ||
| size_t | sample_count, | ||
| int | format ) |
Uploads waveform to on board memory for later use
| device | Device handle previously obtained by LMS_Open(). |
| samples | multiple channel samples data |
| chCount | number of waveform channels (1 or 2). |
| sample_count | number of samples in each channel. Must be multiple of 4 |
| format | waveform data format: 0 - int16 [-2048, 2047], 1 - int16 [-32768, 32767] 2 - float [-1.0, 1.0] |