LMS API Documentation v23.10.0
Loading...
Searching...
No Matches
LimeSuite.h
Go to the documentation of this file.
1
21#ifndef LMS7_API_H
22#define LMS7_API_H
23
24#include <stdint.h>
25#include <stdlib.h>
26#include "LMS7002M_parameters.h"
27
28#ifdef __cplusplus
29extern "C" {
30#else
31/* stdbool.h is not applicable for C++ programs, as the language inherently
32 * provides the bool type.
33 *
34 * Users of Visual Studio 2012 and earlier will need to supply a stdbool.h
35 * implementation, as it is not included with the toolchain. Visual Studio 2013
36 * onward supplies this header.
37 */
38#include <stdbool.h>
39#endif
40
41#if defined _WIN32 || defined __CYGWIN__
42# define CALL_CONV __cdecl
43# ifdef __GNUC__
44# define API_EXPORT __attribute__ ((dllexport))
45# else
46# define API_EXPORT __declspec(dllexport)
47# endif
48#elif defined _DOXYGEN_ONLY_
51# define API_EXPORT
54# define CALL_CONV
55#else
56# define API_EXPORT __attribute__ ((visibility ("default")))
57# define CALL_CONV
58#endif
59
61typedef double float_type;
62
64static const int LMS_SUCCESS = 0;
65
75typedef void lms_device_t;
76
78typedef char lms_info_str_t[256];
79
87API_EXPORT int CALL_CONV LMS_GetDeviceList(lms_info_str_t *dev_list);
88
103API_EXPORT int CALL_CONV LMS_Open(lms_device_t **device, const lms_info_str_t info,
104 void* args);
105
115API_EXPORT int CALL_CONV LMS_Close(lms_device_t *device);
116
128static const bool LMS_CH_TX = true;
129static const bool LMS_CH_RX = false;
130
132typedef char lms_name_t[16];
133
141
152
164API_EXPORT int CALL_CONV LMS_Init(lms_device_t *device);
165
176API_EXPORT int CALL_CONV LMS_GetNumChannels(lms_device_t *device, bool dir_tx);
177
189API_EXPORT int CALL_CONV LMS_EnableChannel(lms_device_t *device, bool dir_tx,
190 size_t chan, bool enabled);
191
205API_EXPORT int CALL_CONV LMS_SetSampleRate(lms_device_t *device, float_type rate,
206 size_t oversample);
207
221API_EXPORT int CALL_CONV LMS_GetSampleRate(lms_device_t *device, bool dir_tx,
222 size_t chan, float_type *host_Hz, float_type *rf_Hz);
232API_EXPORT int CALL_CONV LMS_GetSampleRateRange(lms_device_t *device, bool dir_tx,
233 lms_range_t *range);
234
251API_EXPORT int CALL_CONV LMS_SetLOFrequency(lms_device_t *device, bool dir_tx,
252 size_t chan, float_type frequency);
253
264API_EXPORT int CALL_CONV LMS_GetLOFrequency(lms_device_t *device, bool dir_tx,
265 size_t chan, float_type *frequency);
266
276API_EXPORT int CALL_CONV LMS_GetLOFrequencyRange(lms_device_t *device, bool dir_tx,
277 lms_range_t *range);
278
280enum
281{
289};
290
302API_EXPORT int CALL_CONV LMS_GetAntennaList(lms_device_t *dev, bool dir_tx,
303 size_t chan, lms_name_t *list);
304
315API_EXPORT int CALL_CONV LMS_SetAntenna(lms_device_t *dev, bool dir_tx,
316 size_t chan, size_t index);
317
327API_EXPORT int CALL_CONV LMS_GetAntenna(lms_device_t *dev, bool dir_tx,
328 size_t chan);
329
342API_EXPORT int CALL_CONV LMS_GetAntennaBW(lms_device_t *dev, bool dir_tx,
343 size_t chan, size_t index, lms_range_t *range);
344
364API_EXPORT int CALL_CONV LMS_SetNormalizedGain(lms_device_t *device, bool dir_tx,
365 size_t chan,float_type gain);
366
385API_EXPORT int CALL_CONV LMS_SetGaindB(lms_device_t *device, bool dir_tx,
386 size_t chan, unsigned gain);
387
405API_EXPORT int CALL_CONV LMS_GetNormalizedGain(lms_device_t *device, bool dir_tx,
406 size_t chan, float_type *gain);
423API_EXPORT int CALL_CONV LMS_GetGaindB(lms_device_t *device, bool dir_tx,
424 size_t chan, unsigned *gain);
425
437API_EXPORT int CALL_CONV LMS_SetLPFBW(lms_device_t *device, bool dir_tx,
438 size_t chan, float_type bandwidth);
439
452API_EXPORT int CALL_CONV LMS_GetLPFBW(lms_device_t *device, bool dir_tx,
453 size_t chan, float_type *bandwidth);
454
464API_EXPORT int CALL_CONV LMS_GetLPFBWRange(lms_device_t *device, bool dir_tx,
465 lms_range_t *range);
466
477API_EXPORT int CALL_CONV LMS_SetLPF(lms_device_t *device, bool dir_tx,
478 size_t chan, bool enable);
479
494API_EXPORT int CALL_CONV LMS_SetGFIRLPF(lms_device_t *device, bool dir_tx,
495 size_t chan, bool enabled, float_type bandwidth);
496
512API_EXPORT int CALL_CONV LMS_Calibrate(lms_device_t *device, bool dir_tx,
513 size_t chan, double bw, unsigned flags);
514
527API_EXPORT int CALL_CONV LMS_LoadConfig(lms_device_t *device, const char *filename);
528
537API_EXPORT int CALL_CONV LMS_SaveConfig(lms_device_t *device, const char *filename);
538
551API_EXPORT int CALL_CONV LMS_SetTestSignal(lms_device_t *device, bool dir_tx,
552 size_t chan, lms_testsig_t sig, int16_t dc_i, int16_t dc_q);
563API_EXPORT int CALL_CONV LMS_GetTestSignal(lms_device_t *device, bool dir_tx,
564 size_t chan, lms_testsig_t *sig);
565
575API_EXPORT int CALL_CONV LMS_GetChipTemperature(lms_device_t *dev, size_t ind,
576 float_type *temp);
577
589typedef enum
590{
591 LMS_GFIR1 = 0,
592 LMS_GFIR2,
593 LMS_GFIR3
595
597static const int LMS_NCO_VAL_COUNT = 16;
598
620API_EXPORT int CALL_CONV LMS_SetSampleRateDir(lms_device_t *device, bool dir_tx,
621 float_type rate, size_t oversample);
622
638API_EXPORT int CALL_CONV LMS_SetNCOFrequency(lms_device_t *device, bool dir_tx,
639 size_t chan, const float_type *freq, float_type pho);
640
653API_EXPORT int CALL_CONV LMS_GetNCOFrequency(lms_device_t *device, bool dir_tx,
654 size_t chan, float_type *freq, float_type *pho);
655
671API_EXPORT int CALL_CONV LMS_SetNCOPhase(lms_device_t *device, bool dir_tx,
672 size_t chan, const float_type *phases, float_type fcw);
673
686API_EXPORT int CALL_CONV LMS_GetNCOPhase(lms_device_t *device, bool dir_tx,
687 size_t chan, float_type *phases, float_type *fcw);
688
701API_EXPORT int CALL_CONV LMS_SetNCOIndex(lms_device_t *device, bool dir_tx,
702 size_t chan, int index, bool downconv);
703
713API_EXPORT int CALL_CONV LMS_GetNCOIndex(lms_device_t *device, bool dir_tx,
714 size_t chan);
715
729API_EXPORT int CALL_CONV LMS_SetGFIRCoeff(lms_device_t * device, bool dir_tx,
730 size_t chan, lms_gfir_t filt, const float_type* coef,size_t count);
731
744API_EXPORT int CALL_CONV LMS_GetGFIRCoeff(lms_device_t * device, bool dir_tx,
745 size_t chan, lms_gfir_t filt, float_type* coef);
746
758API_EXPORT int CALL_CONV LMS_SetGFIR(lms_device_t * device, bool dir_tx,
759 size_t chan, lms_gfir_t filt, bool enabled);
760
770API_EXPORT int CALL_CONV LMS_EnableCache(lms_device_t *dev, bool enable);
771
793API_EXPORT int CALL_CONV LMS_Reset(lms_device_t *device);
794
804API_EXPORT int CALL_CONV LMS_ReadLMSReg(lms_device_t *device, uint32_t address,
805 uint16_t *val);
806
816API_EXPORT int CALL_CONV LMS_WriteLMSReg(lms_device_t *device, uint32_t address,
817 uint16_t val);
818
828API_EXPORT int CALL_CONV LMS_ReadParam(lms_device_t *device,
829 struct LMS7Parameter param, uint16_t *val);
830
840API_EXPORT int CALL_CONV LMS_WriteParam(lms_device_t *device,
841 struct LMS7Parameter param, uint16_t val);
842
852API_EXPORT int CALL_CONV LMS_ReadFPGAReg(lms_device_t *device, uint32_t address,
853 uint16_t *val);
854
864API_EXPORT int CALL_CONV LMS_WriteFPGAReg(lms_device_t *device, uint32_t address,
865 uint16_t val);
866
873#define BOARD_PARAM_DAC 0
875#define BOARD_PARAM_TEMP 1
888API_EXPORT int CALL_CONV LMS_ReadCustomBoardParam(lms_device_t *device,
889 uint8_t id, float_type *val, lms_name_t units);
890
901API_EXPORT int CALL_CONV LMS_WriteCustomBoardParam(lms_device_t *device,
902 uint8_t id, float_type val, const lms_name_t units);
903
911#define LMS_CLOCK_REF 0x0000
913#define LMS_CLOCK_SXR 0x0001
915#define LMS_CLOCK_SXT 0x0002
917#define LMS_CLOCK_CGEN 0x0003
919#define LMS_CLOCK_RXTSP 0x0004
921#define LMS_CLOCK_TXTSP 0x0005
929#define LMS_CLOCK_EXTREF 0x0006
930
942API_EXPORT int CALL_CONV LMS_GetClockFreq(lms_device_t *dev, size_t clk_id,
943 float_type *freq);
944
955API_EXPORT int CALL_CONV LMS_SetClockFreq(lms_device_t *dev, size_t clk_id,
956 float_type freq);
957
969API_EXPORT int CALL_CONV LMS_VCTCXOWrite(lms_device_t * dev, uint16_t val);
970
980API_EXPORT int CALL_CONV LMS_VCTCXORead(lms_device_t * dev, uint16_t *val);
981
990API_EXPORT int CALL_CONV LMS_Synchronize(lms_device_t *dev, bool toChip);
991
999API_EXPORT int CALL_CONV LMS_GPIORead(lms_device_t *dev, uint8_t* buffer, size_t len);
1000
1008API_EXPORT int CALL_CONV LMS_GPIOWrite(lms_device_t *dev, const uint8_t* buffer, size_t len);
1009
1017API_EXPORT int CALL_CONV LMS_GPIODirRead(lms_device_t *dev, uint8_t* buffer, size_t len);
1018
1026API_EXPORT int CALL_CONV LMS_GPIODirWrite(lms_device_t *dev, const uint8_t* buffer, size_t len);
1027
1038typedef struct
1039{
1045 uint64_t timestamp;
1046
1052
1057
1059
1068#define LMS_ALIGN_CH_PHASE (1<<16)
1072typedef struct
1073{
1077 size_t handle;
1078
1080 bool isTx;
1081
1085 uint32_t channel;
1086
1088 uint32_t fifoSize;
1089
1097
1099 enum
1100 {
1101 LMS_FMT_F32=0,
1103 LMS_FMT_I12
1104 }dataFmt;
1105
1107 enum
1108 {
1109 LMS_LINK_FMT_DEFAULT=0,
1112 LMS_LINK_FMT_I12
1113 }linkFmt;
1115
1139
1149API_EXPORT int CALL_CONV LMS_SetupStream(lms_device_t *device, lms_stream_t *stream);
1150
1159API_EXPORT int CALL_CONV LMS_DestroyStream(lms_device_t *dev, lms_stream_t *stream);
1160
1168API_EXPORT int CALL_CONV LMS_StartStream(lms_stream_t *stream);
1169
1177API_EXPORT int CALL_CONV LMS_StopStream(lms_stream_t *stream);
1178
1191 API_EXPORT int CALL_CONV LMS_RecvStream(lms_stream_t *stream, void *samples,
1192 size_t sample_count, lms_stream_meta_t *meta, unsigned timeout_ms);
1193
1202API_EXPORT int CALL_CONV LMS_GetStreamStatus(lms_stream_t *stream, lms_stream_status_t* status);
1203
1215API_EXPORT int CALL_CONV LMS_SendStream(lms_stream_t *stream,
1216 const void *samples,size_t sample_count,
1217 const lms_stream_meta_t *meta, unsigned timeout_ms);
1218
1230API_EXPORT int CALL_CONV LMS_UploadWFM(lms_device_t *device, const void **samples,
1231 uint8_t chCount, size_t sample_count, int format);
1232
1240API_EXPORT int CALL_CONV LMS_EnableTxWFM(lms_device_t *device, unsigned chan, bool active);
1241
1260API_EXPORT int CALL_CONV LMS_GetProgramModes(lms_device_t *device, lms_name_t *list);
1261
1269typedef bool (*lms_prog_callback_t)(int bsent, int btotal, const char* progressMsg);
1270
1282API_EXPORT int CALL_CONV LMS_Program(lms_device_t *device, const char *data,
1283 size_t size, const lms_name_t mode, lms_prog_callback_t callback);
1284
1286typedef struct
1287{
1288 char deviceName[32];
1289 char expansionName[32];
1290 char firmwareVersion[16];
1291 char hardwareVersion[16];
1292 char protocolVersion[16];
1294 char gatewareVersion[16];
1295 char gatewareTargetBoard[32];
1297
1309API_EXPORT const lms_dev_info_t* CALL_CONV LMS_GetDeviceInfo(lms_device_t *device);
1310
1314API_EXPORT const char* LMS_GetLibraryVersion(void);
1315
1323API_EXPORT const char * CALL_CONV LMS_GetLastErrorMessage(void);
1324
1331#define LMS_LOG_CRITICAL 0
1333#define LMS_LOG_ERROR 1
1335#define LMS_LOG_WARNING 2
1337#define LMS_LOG_INFO 3
1339#define LMS_LOG_DEBUG 4
1348 typedef void (*LMS_LogHandler)(int lvl, const char *msg);
1349
1357
1360#ifdef __cplusplus
1361} //extern "C"
1362#endif
1363
1364#endif //LMS_SDR_INTERFACE_H
double float_type
Floating point data type.
Definition LimeSuite.h:61
static const int LMS_SUCCESS
convenience constant for good return code
Definition LimeSuite.h:64
static const int LMS_NCO_VAL_COUNT
Number of NCO frequency/phase offset values.
Definition LimeSuite.h:597
API_EXPORT int CALL_CONV LMS_GetNCOPhase(lms_device_t *device, bool dir_tx, size_t chan, float_type *phases, float_type *fcw)
API_EXPORT int CALL_CONV LMS_SetGFIR(lms_device_t *device, bool dir_tx, size_t chan, lms_gfir_t filt, bool enabled)
API_EXPORT int CALL_CONV LMS_EnableCache(lms_device_t *dev, bool enable)
API_EXPORT int CALL_CONV LMS_GetGFIRCoeff(lms_device_t *device, bool dir_tx, size_t chan, lms_gfir_t filt, float_type *coef)
API_EXPORT int CALL_CONV LMS_SetNCOFrequency(lms_device_t *device, bool dir_tx, size_t chan, const float_type *freq, float_type pho)
API_EXPORT int CALL_CONV LMS_SetNCOIndex(lms_device_t *device, bool dir_tx, size_t chan, int index, bool downconv)
lms_gfir_t
Enumeration of LMS7 GFIRS.
Definition LimeSuite.h:590
API_EXPORT int CALL_CONV LMS_SetSampleRateDir(lms_device_t *device, bool dir_tx, float_type rate, size_t oversample)
API_EXPORT int CALL_CONV LMS_SetNCOPhase(lms_device_t *device, bool dir_tx, size_t chan, const float_type *phases, float_type fcw)
API_EXPORT int CALL_CONV LMS_GetNCOIndex(lms_device_t *device, bool dir_tx, size_t chan)
API_EXPORT int CALL_CONV LMS_GetNCOFrequency(lms_device_t *device, bool dir_tx, size_t chan, float_type *freq, float_type *pho)
API_EXPORT int CALL_CONV LMS_SetGFIRCoeff(lms_device_t *device, bool dir_tx, size_t chan, lms_gfir_t filt, const float_type *coef, size_t count)
API_EXPORT int CALL_CONV LMS_GetTestSignal(lms_device_t *device, bool dir_tx, size_t chan, lms_testsig_t *sig)
API_EXPORT int CALL_CONV LMS_GetLPFBW(lms_device_t *device, bool dir_tx, size_t chan, float_type *bandwidth)
API_EXPORT int CALL_CONV LMS_GetLOFrequency(lms_device_t *device, bool dir_tx, size_t chan, float_type *frequency)
API_EXPORT int CALL_CONV LMS_SetGaindB(lms_device_t *device, bool dir_tx, size_t chan, unsigned gain)
API_EXPORT int CALL_CONV LMS_SaveConfig(lms_device_t *device, const char *filename)
API_EXPORT int CALL_CONV LMS_EnableChannel(lms_device_t *device, bool dir_tx, size_t chan, bool enabled)
API_EXPORT int CALL_CONV LMS_GetGaindB(lms_device_t *device, bool dir_tx, size_t chan, unsigned *gain)
API_EXPORT int CALL_CONV LMS_GetSampleRateRange(lms_device_t *device, bool dir_tx, lms_range_t *range)
API_EXPORT int CALL_CONV LMS_SetLOFrequency(lms_device_t *device, bool dir_tx, size_t chan, float_type frequency)
API_EXPORT int CALL_CONV LMS_Calibrate(lms_device_t *device, bool dir_tx, size_t chan, double bw, unsigned flags)
API_EXPORT int CALL_CONV LMS_GetLOFrequencyRange(lms_device_t *device, bool dir_tx, lms_range_t *range)
API_EXPORT int CALL_CONV LMS_SetSampleRate(lms_device_t *device, float_type rate, size_t oversample)
API_EXPORT int CALL_CONV LMS_GetSampleRate(lms_device_t *device, bool dir_tx, size_t chan, float_type *host_Hz, float_type *rf_Hz)
static const bool LMS_CH_RX
Convenience constants for RX selection.
Definition LimeSuite.h:129
char lms_name_t[16]
Definition LimeSuite.h:132
API_EXPORT int CALL_CONV LMS_LoadConfig(lms_device_t *device, const char *filename)
API_EXPORT int CALL_CONV LMS_GetAntenna(lms_device_t *dev, bool dir_tx, size_t chan)
API_EXPORT int CALL_CONV LMS_GetAntennaList(lms_device_t *dev, bool dir_tx, size_t chan, lms_name_t *list)
API_EXPORT int CALL_CONV LMS_Init(lms_device_t *device)
static const bool LMS_CH_TX
Convenience constants for TX selection.
Definition LimeSuite.h:128
API_EXPORT int CALL_CONV LMS_GetNormalizedGain(lms_device_t *device, bool dir_tx, size_t chan, float_type *gain)
API_EXPORT int CALL_CONV LMS_GetLPFBWRange(lms_device_t *device, bool dir_tx, lms_range_t *range)
API_EXPORT int CALL_CONV LMS_SetLPF(lms_device_t *device, bool dir_tx, size_t chan, bool enable)
API_EXPORT int CALL_CONV LMS_SetGFIRLPF(lms_device_t *device, bool dir_tx, size_t chan, bool enabled, float_type bandwidth)
API_EXPORT int CALL_CONV LMS_GetChipTemperature(lms_device_t *dev, size_t ind, float_type *temp)
API_EXPORT int CALL_CONV LMS_SetTestSignal(lms_device_t *device, bool dir_tx, size_t chan, lms_testsig_t sig, int16_t dc_i, int16_t dc_q)
API_EXPORT int CALL_CONV LMS_SetAntenna(lms_device_t *dev, bool dir_tx, size_t chan, size_t index)
API_EXPORT int CALL_CONV LMS_SetNormalizedGain(lms_device_t *device, bool dir_tx, size_t chan, float_type gain)
API_EXPORT int CALL_CONV LMS_SetLPFBW(lms_device_t *device, bool dir_tx, size_t chan, float_type bandwidth)
API_EXPORT int CALL_CONV LMS_GetAntennaBW(lms_device_t *dev, bool dir_tx, size_t chan, size_t index, lms_range_t *range)
lms_testsig_t
Definition LimeSuite.h:144
API_EXPORT int CALL_CONV LMS_GetNumChannels(lms_device_t *device, bool dir_tx)
@ LMS_PATH_TX1
TX port 1.
Definition LimeSuite.h:286
@ LMS_PATH_NONE
No active path (RX or TX)
Definition LimeSuite.h:282
@ LMS_PATH_TX2
TX port 2.
Definition LimeSuite.h:287
@ LMS_PATH_LNAW
RX LNA_W port.
Definition LimeSuite.h:285
@ LMS_PATH_LNAH
RX LNA_H port.
Definition LimeSuite.h:283
@ LMS_PATH_AUTO
Automatically select port (if supported)
Definition LimeSuite.h:288
@ LMS_PATH_LNAL
RX LNA_L port.
Definition LimeSuite.h:284
@ LMS_TESTSIG_DC
DC test signal.
Definition LimeSuite.h:150
@ LMS_TESTSIG_NCODIV8
Test signal from NCO half scale.
Definition LimeSuite.h:146
@ LMS_TESTSIG_NONE
Disable test signals. Return to normal operation.
Definition LimeSuite.h:145
@ LMS_TESTSIG_NCODIV4
Test signal from NCO half scale.
Definition LimeSuite.h:147
@ LMS_TESTSIG_NCODIV4F
Test signal from NCO full scale.
Definition LimeSuite.h:149
@ LMS_TESTSIG_NCODIV8F
Test signal from NCO full scale.
Definition LimeSuite.h:148
void lms_device_t
LMS Device handle.
Definition LimeSuite.h:75
API_EXPORT int CALL_CONV LMS_GetDeviceList(lms_info_str_t *dev_list)
char lms_info_str_t[256]
Convenience type for fixed length LMS Device information string.
Definition LimeSuite.h:78
API_EXPORT int CALL_CONV LMS_Open(lms_device_t **device, const lms_info_str_t info, void *args)
API_EXPORT int CALL_CONV LMS_Close(lms_device_t *device)
API_EXPORT int CALL_CONV LMS_WriteFPGAReg(lms_device_t *device, uint32_t address, uint16_t val)
API_EXPORT int CALL_CONV LMS_WriteParam(lms_device_t *device, struct LMS7Parameter param, uint16_t val)
API_EXPORT int CALL_CONV LMS_Synchronize(lms_device_t *dev, bool toChip)
API_EXPORT int CALL_CONV LMS_Reset(lms_device_t *device)
API_EXPORT int CALL_CONV LMS_GPIOWrite(lms_device_t *dev, const uint8_t *buffer, size_t len)
API_EXPORT int CALL_CONV LMS_WriteCustomBoardParam(lms_device_t *device, uint8_t id, float_type val, const lms_name_t units)
API_EXPORT int CALL_CONV LMS_GPIORead(lms_device_t *dev, uint8_t *buffer, size_t len)
API_EXPORT int CALL_CONV LMS_ReadFPGAReg(lms_device_t *device, uint32_t address, uint16_t *val)
API_EXPORT int CALL_CONV LMS_VCTCXOWrite(lms_device_t *dev, uint16_t val)
API_EXPORT int CALL_CONV LMS_GPIODirRead(lms_device_t *dev, uint8_t *buffer, size_t len)
API_EXPORT int CALL_CONV LMS_GetClockFreq(lms_device_t *dev, size_t clk_id, float_type *freq)
API_EXPORT int CALL_CONV LMS_GPIODirWrite(lms_device_t *dev, const uint8_t *buffer, size_t len)
API_EXPORT int CALL_CONV LMS_ReadCustomBoardParam(lms_device_t *device, uint8_t id, float_type *val, lms_name_t units)
API_EXPORT int CALL_CONV LMS_ReadLMSReg(lms_device_t *device, uint32_t address, uint16_t *val)
API_EXPORT int CALL_CONV LMS_SetClockFreq(lms_device_t *dev, size_t clk_id, float_type freq)
API_EXPORT int CALL_CONV LMS_ReadParam(lms_device_t *device, struct LMS7Parameter param, uint16_t *val)
API_EXPORT int CALL_CONV LMS_VCTCXORead(lms_device_t *dev, uint16_t *val)
API_EXPORT int CALL_CONV LMS_WriteLMSReg(lms_device_t *device, uint32_t address, uint16_t val)
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_GetStreamStatus(lms_stream_t *stream, lms_stream_status_t *status)
API_EXPORT int CALL_CONV LMS_StopStream(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_SetupStream(lms_device_t *device, 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_EnableTxWFM(lms_device_t *device, unsigned chan, bool active)
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_StartStream(lms_stream_t *stream)
API_EXPORT const lms_dev_info_t *CALL_CONV LMS_GetDeviceInfo(lms_device_t *device)
API_EXPORT int CALL_CONV LMS_GetProgramModes(lms_device_t *device, lms_name_t *list)
API_EXPORT const char * LMS_GetLibraryVersion(void)
Returns API library version.
API_EXPORT const char *CALL_CONV LMS_GetLastErrorMessage(void)
API_EXPORT int CALL_CONV LMS_Program(lms_device_t *device, const char *data, size_t size, const lms_name_t mode, lms_prog_callback_t callback)
API_EXPORT void LMS_RegisterLogHandler(LMS_LogHandler handler)
void(* LMS_LogHandler)(int lvl, const char *msg)
Definition LimeSuite.h:1348
bool(* lms_prog_callback_t)(int bsent, int btotal, const char *progressMsg)
Definition LimeSuite.h:1269
uint64_t boardSerialNumber
A unique board serial number.
Definition LimeSuite.h:1293
float_type step
Minimum value step.
Definition LimeSuite.h:139
float_type min
Minimum allowed value.
Definition LimeSuite.h:137
float_type max
Maximum allowed value.
Definition LimeSuite.h:138
float_type sampleRate
Currently not used.
Definition LimeSuite.h:1132
bool active
Indicates whether the stream is currently active.
Definition LimeSuite.h:1120
float_type linkRate
Data transfer rate (B/s) over the last 1 s per direction per LMS chip.
Definition LimeSuite.h:1134
uint32_t overrun
FIFO overrun count since the last call to LMS_GetStreamStatus()
Definition LimeSuite.h:1128
uint64_t timestamp
The most recently received Rx timestamp, or the last timestamp submitted to Tx.
Definition LimeSuite.h:1136
uint32_t underrun
FIFO underrun count since the last call to LMS_GetStreamStatus()
Definition LimeSuite.h:1126
uint32_t droppedPackets
Number of dropped packets by HW since the last call to LMS_GetStreamStatus()
Definition LimeSuite.h:1130
uint32_t fifoFilledCount
Number of samples in FIFO buffer.
Definition LimeSuite.h:1122
uint32_t fifoSize
Size (in samples) of FIFO buffer.
Definition LimeSuite.h:1124
uint32_t channel
Channel number, starts at 0. Can be combined with additional flags (Additional streaming options)
Definition LimeSuite.h:1085
float throughputVsLatency
Parameter for controlling configuration bias toward low latency or high data throughput range [0,...
Definition LimeSuite.h:1096
@ LMS_LINK_FMT_I16
16-bit integers
Definition LimeSuite.h:1111
size_t handle
Stream handle. Should not be modified manually. Assigned by LMS_SetupStream().
Definition LimeSuite.h:1077
bool isTx
Indicates whether stream is TX (true) or RX (false)
Definition LimeSuite.h:1080
@ LMS_FMT_I16
16-bit integers
Definition LimeSuite.h:1102
uint32_t fifoSize
FIFO size (in samples) used by stream.
Definition LimeSuite.h:1088