|
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.
◆ LMS_DestroyStream()
Deallocate memory used by stream.
- Parameters
-
- Returns
- 0 on success, (-1) on failure
◆ LMS_EnableTxWFM()
API_EXPORT int CALL_CONV LMS_EnableTxWFM |
( |
lms_device_t * |
device, |
|
|
unsigned |
chan, |
|
|
bool |
active |
|
) |
| |
Enables/Disables transmitting of uploaded waveform
- Parameters
-
device | Device handle previously obtained by LMS_Open(). |
chan | Channel index |
active | Enable/Disable waveform playback |
- Returns
- 0 on success, (-1) on failure
◆ LMS_GetStreamStatus()
Get stream operation status
- Parameters
-
- Returns
- 0 on success, (-1) on failure
◆ LMS_RecvStream()
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.
- Parameters
-
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. |
- Returns
- number of samples received on success, (-1) on failure
◆ LMS_SendStream()
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.
- Parameters
-
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. |
- Returns
- number of samples send on success, (-1) on failure
◆ LMS_SetupStream()
Create new stream based on parameters passed in configuration structure. The structure is initialized with stream handle.
- Parameters
-
device | Device handle previously obtained by LMS_Open(). |
stream | Stream configuration .See the lms_stream_t description. |
- Returns
- 0 on success, (-1) on failure
◆ LMS_StartStream()
API_EXPORT int CALL_CONV LMS_StartStream |
( |
lms_stream_t * |
stream | ) |
|
Start stream
- Parameters
-
- Returns
- 0 on success, (-1) on failure
◆ LMS_StopStream()
API_EXPORT int CALL_CONV LMS_StopStream |
( |
lms_stream_t * |
stream | ) |
|
Stop stream
- Parameters
-
- Returns
- 0 on success, (-1) on failure
◆ LMS_UploadWFM()
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
- Parameters
-
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] |
- Returns
- 0 on success, (-1) on failure