SoapySDR: Device.h Source File

| SoapySDR 0.8.1-ARCH Vendor and platform neutral SDR interface library

Loading...
Searching...
No Matches
Device.h
Go to the documentation of this file.
1
16
17#pragma once
18#include <SoapySDR/Config.h>
19#include <SoapySDR/Types.h>
20#include <SoapySDR/Constants.h>
21#include <SoapySDR/Errors.h>
22#include <SoapySDR/Device.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
29 typedef struct SoapySDRDevice SoapySDRDevice;
30
32 typedef struct SoapySDRStream SoapySDRStream;
33
42 SOAPY_SDR_API int SoapySDRDevice_lastStatus(void);
43
51 SOAPY_SDR_API const char *SoapySDRDevice_lastError(void);
52
59 SOAPY_SDR_API SoapySDRKwargs *SoapySDRDevice_enumerate(const SoapySDRKwargs *args, size_t *length);
60
68 SOAPY_SDR_API SoapySDRKwargs *SoapySDRDevice_enumerateStrArgs(const char *args, size_t *length);
69
79 SOAPY_SDR_API SoapySDRDevice *SoapySDRDevice_make(const SoapySDRKwargs *args);
80
90 SOAPY_SDR_API SoapySDRDevice *SoapySDRDevice_makeStrArgs(const char *args);
91
98 SOAPY_SDR_API int SoapySDRDevice_unmake(SoapySDRDevice *device);
99
100/*******************************************************************
101 * Parallel support
102 ******************************************************************/
103
113 SOAPY_SDR_API SoapySDRDevice **SoapySDRDevice_make_list(const SoapySDRKwargs *argsList, const size_t length);
114
124 SOAPY_SDR_API SoapySDRDevice **SoapySDRDevice_make_listStrArgs(const char* const *argsList, const size_t length);
125
136 SOAPY_SDR_API int SoapySDRDevice_unmake_list(SoapySDRDevice **devices, const size_t length);
137
138/*******************************************************************
139 * Identification API
140 ******************************************************************/
141
148 SOAPY_SDR_API char *SoapySDRDevice_getDriverKey(const SoapySDRDevice *device);
149
156 SOAPY_SDR_API char *SoapySDRDevice_getHardwareKey(const SoapySDRDevice *device);
157
166 SOAPY_SDR_API SoapySDRKwargs SoapySDRDevice_getHardwareInfo(const SoapySDRDevice *device);
167
168/*******************************************************************
169 * Channels API
170 ******************************************************************/
171
180 SOAPY_SDR_API int SoapySDRDevice_setFrontendMapping(SoapySDRDevice *device, const int direction, const char *mapping);
181
188 SOAPY_SDR_API char *SoapySDRDevice_getFrontendMapping(const SoapySDRDevice *device, const int direction);
189
196 SOAPY_SDR_API size_t SoapySDRDevice_getNumChannels(const SoapySDRDevice *device, const int direction);
197
205 SOAPY_SDR_API SoapySDRKwargs SoapySDRDevice_getChannelInfo(const SoapySDRDevice *device, const int direction, const size_t channel);
206
214 SOAPY_SDR_API bool SoapySDRDevice_getFullDuplex(const SoapySDRDevice *device, const int direction, const size_t channel);
215
216/*******************************************************************
217 * Stream API
218 ******************************************************************/
219
229 SOAPY_SDR_API char **SoapySDRDevice_getStreamFormats(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length);
230
241 SOAPY_SDR_API char *SoapySDRDevice_getNativeStreamFormat(const SoapySDRDevice *device, const int direction, const size_t channel, double *fullScale);
242
251 SOAPY_SDR_API SoapySDRArgInfo *SoapySDRDevice_getStreamArgsInfo(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length);
252
304 SOAPY_SDR_API SoapySDRStream *SoapySDRDevice_setupStream(SoapySDRDevice *device,
305 const int direction,
306 const char *format,
307 const size_t *channels,
308 const size_t numChans,
309 const SoapySDRKwargs *args);
310
317 SOAPY_SDR_API int SoapySDRDevice_closeStream(SoapySDRDevice *device, SoapySDRStream *stream);
318
329 SOAPY_SDR_API size_t SoapySDRDevice_getStreamMTU(const SoapySDRDevice *device, SoapySDRStream *stream);
330
349 SOAPY_SDR_API int SoapySDRDevice_activateStream(SoapySDRDevice *device,
350 SoapySDRStream *stream,
351 const int flags,
352 const long long timeNs,
353 const size_t numElems);
354
370 SOAPY_SDR_API int SoapySDRDevice_deactivateStream(SoapySDRDevice *device,
371 SoapySDRStream *stream,
372 const int flags,
373 const long long timeNs);
374
395 SOAPY_SDR_API int SoapySDRDevice_readStream(SoapySDRDevice *device,
396 SoapySDRStream *stream,
397 void * const *buffs,
398 const size_t numElems,
399 int *flags,
400 long long *timeNs,
401 const long timeoutUs);
402
423 SOAPY_SDR_API int SoapySDRDevice_writeStream(SoapySDRDevice *device,
424 SoapySDRStream *stream,
425 const void * const *buffs,
426 const size_t numElems,
427 int *flags,
428 const long long timeNs,
429 const long timeoutUs);
430
452 SOAPY_SDR_API int SoapySDRDevice_readStreamStatus(SoapySDRDevice *device,
453 SoapySDRStream *stream,
454 size_t *chanMask,
455 int *flags,
456 long long *timeNs,
457 const long timeoutUs);
458
459/*******************************************************************
460 * Direct buffer access API
461 ******************************************************************/
462
473 SOAPY_SDR_API size_t SoapySDRDevice_getNumDirectAccessBuffers(SoapySDRDevice *device, SoapySDRStream *stream);
474
489 SOAPY_SDR_API int SoapySDRDevice_getDirectAccessBufferAddrs(SoapySDRDevice *device, SoapySDRStream *stream, const size_t handle, void **buffs);
490
512 SOAPY_SDR_API int SoapySDRDevice_acquireReadBuffer(SoapySDRDevice *device,
513 SoapySDRStream *stream,
514 size_t *handle,
515 const void **buffs,
516 int *flags,
517 long long *timeNs,
518 const long timeoutUs);
519
528 SOAPY_SDR_API void SoapySDRDevice_releaseReadBuffer(SoapySDRDevice *device,
529 SoapySDRStream *stream,
530 const size_t handle);
531
551 SOAPY_SDR_API int SoapySDRDevice_acquireWriteBuffer(SoapySDRDevice *device,
552 SoapySDRStream *stream,
553 size_t *handle,
554 void **buffs,
555 const long timeoutUs);
556
573 SOAPY_SDR_API void SoapySDRDevice_releaseWriteBuffer(SoapySDRDevice *device,
574 SoapySDRStream *stream,
575 const size_t handle,
576 const size_t numElems,
577 int *flags,
578 const long long timeNs);
579
580/*******************************************************************
581 * Antenna API
582 ******************************************************************/
583
592 SOAPY_SDR_API char **SoapySDRDevice_listAntennas(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length);
593
602 SOAPY_SDR_API int SoapySDRDevice_setAntenna(SoapySDRDevice *device, const int direction, const size_t channel, const char *name);
603
611 SOAPY_SDR_API char *SoapySDRDevice_getAntenna(const SoapySDRDevice *device, const int direction, const size_t channel);
612
613/*******************************************************************
614 * Frontend corrections API
615 ******************************************************************/
616
624 SOAPY_SDR_API bool SoapySDRDevice_hasDCOffsetMode(const SoapySDRDevice *device, const int direction, const size_t channel);
625
634 SOAPY_SDR_API int SoapySDRDevice_setDCOffsetMode(SoapySDRDevice *device, const int direction, const size_t channel, const bool automatic);
635
643 SOAPY_SDR_API bool SoapySDRDevice_getDCOffsetMode(const SoapySDRDevice *device, const int direction, const size_t channel);
644
652 SOAPY_SDR_API bool SoapySDRDevice_hasDCOffset(const SoapySDRDevice *device, const int direction, const size_t channel);
653
663 SOAPY_SDR_API int SoapySDRDevice_setDCOffset(SoapySDRDevice *device, const int direction, const size_t channel, const double offsetI, const double offsetQ);
664
674 SOAPY_SDR_API int SoapySDRDevice_getDCOffset(const SoapySDRDevice *device, const int direction, const size_t channel, double *offsetI, double *offsetQ);
675
683 SOAPY_SDR_API bool SoapySDRDevice_hasIQBalance(const SoapySDRDevice *device, const int direction, const size_t channel);
684
694 SOAPY_SDR_API int SoapySDRDevice_setIQBalance(SoapySDRDevice *device, const int direction, const size_t channel, const double balanceI, const double balanceQ);
695
705 SOAPY_SDR_API int SoapySDRDevice_getIQBalance(const SoapySDRDevice *device, const int direction, const size_t channel, double *balanceI, double *balanceQ);
706
714 SOAPY_SDR_API bool SoapySDRDevice_hasIQBalanceMode(const SoapySDRDevice *device, const int direction, const size_t channel);
715
724 SOAPY_SDR_API int SoapySDRDevice_setIQBalanceMode(SoapySDRDevice *device, const int direction, const size_t channel, const bool automatic);
725
733 SOAPY_SDR_API bool SoapySDRDevice_getIQBalanceMode(const SoapySDRDevice *device, const int direction, const size_t channel);
734
742 SOAPY_SDR_API bool SoapySDRDevice_hasFrequencyCorrection(const SoapySDRDevice *device, const int direction, const size_t channel);
743
752 SOAPY_SDR_API int SoapySDRDevice_setFrequencyCorrection(SoapySDRDevice *device, const int direction, const size_t channel, const double value);
753
761 SOAPY_SDR_API double SoapySDRDevice_getFrequencyCorrection(const SoapySDRDevice *device, const int direction, const size_t channel);
762
763/*******************************************************************
764 * Gain API
765 ******************************************************************/
766
776 SOAPY_SDR_API char **SoapySDRDevice_listGains(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length);
777
785 SOAPY_SDR_API bool SoapySDRDevice_hasGainMode(const SoapySDRDevice *device, const int direction, const size_t channel);
786
795 SOAPY_SDR_API int SoapySDRDevice_setGainMode(SoapySDRDevice *device, const int direction, const size_t channel, const bool automatic);
796
804 SOAPY_SDR_API bool SoapySDRDevice_getGainMode(const SoapySDRDevice *device, const int direction, const size_t channel);
805
815 SOAPY_SDR_API int SoapySDRDevice_setGain(SoapySDRDevice *device, const int direction, const size_t channel, const double value);
816
826 SOAPY_SDR_API int SoapySDRDevice_setGainElement(SoapySDRDevice *device, const int direction, const size_t channel, const char *name, const double value);
827
835 SOAPY_SDR_API double SoapySDRDevice_getGain(const SoapySDRDevice *device, const int direction, const size_t channel);
836
845 SOAPY_SDR_API double SoapySDRDevice_getGainElement(const SoapySDRDevice *device, const int direction, const size_t channel, const char *name);
846
854 SOAPY_SDR_API SoapySDRRange SoapySDRDevice_getGainRange(const SoapySDRDevice *device, const int direction, const size_t channel);
855
864 SOAPY_SDR_API SoapySDRRange SoapySDRDevice_getGainElementRange(const SoapySDRDevice *device, const int direction, const size_t channel, const char *name);
865
866/*******************************************************************
867 * Frequency API
868 ******************************************************************/
869
899 SOAPY_SDR_API int SoapySDRDevice_setFrequency(SoapySDRDevice *device, const int direction, const size_t channel, const double frequency, const SoapySDRKwargs *args);
900
919 SOAPY_SDR_API int SoapySDRDevice_setFrequencyComponent(SoapySDRDevice *device, const int direction, const size_t channel, const char *name, const double frequency, const SoapySDRKwargs *args);
920
930 SOAPY_SDR_API double SoapySDRDevice_getFrequency(const SoapySDRDevice *device, const int direction, const size_t channel);
931
940 SOAPY_SDR_API double SoapySDRDevice_getFrequencyComponent(const SoapySDRDevice *device, const int direction, const size_t channel, const char *name);
941
951 SOAPY_SDR_API char **SoapySDRDevice_listFrequencies(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length);
952
961 SOAPY_SDR_API SoapySDRRange *SoapySDRDevice_getFrequencyRange(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length);
962
972 SOAPY_SDR_API SoapySDRRange *SoapySDRDevice_getFrequencyRangeComponent(const SoapySDRDevice *device, const int direction, const size_t channel, const char *name, size_t *length);
973
982 SOAPY_SDR_API SoapySDRArgInfo *SoapySDRDevice_getFrequencyArgsInfo(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length);
983
984/*******************************************************************
985 * Sample Rate API
986 ******************************************************************/
987
996 SOAPY_SDR_API int SoapySDRDevice_setSampleRate(SoapySDRDevice *device, const int direction, const size_t channel, const double rate);
997
1005 SOAPY_SDR_API double SoapySDRDevice_getSampleRate(const SoapySDRDevice *device, const int direction, const size_t channel);
1006
1016 SOAPY_SDR_API double *SoapySDRDevice_listSampleRates(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length);
1017
1026 SOAPY_SDR_API SoapySDRRange *SoapySDRDevice_getSampleRateRange(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length);
1027
1028/*******************************************************************
1029 * Bandwidth API
1030 ******************************************************************/
1031
1040 SOAPY_SDR_API int SoapySDRDevice_setBandwidth(SoapySDRDevice *device, const int direction, const size_t channel, const double bw);
1041
1049 SOAPY_SDR_API double SoapySDRDevice_getBandwidth(const SoapySDRDevice *device, const int direction, const size_t channel);
1050
1060 SOAPY_SDR_API double *SoapySDRDevice_listBandwidths(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length);
1061
1070 SOAPY_SDR_API SoapySDRRange *SoapySDRDevice_getBandwidthRange(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length);
1071
1072/*******************************************************************
1073 * Clocking API
1074 ******************************************************************/
1075
1082 SOAPY_SDR_API int SoapySDRDevice_setMasterClockRate(SoapySDRDevice *device, const double rate);
1083
1089 SOAPY_SDR_API double SoapySDRDevice_getMasterClockRate(const SoapySDRDevice *device);
1090
1097 SOAPY_SDR_API SoapySDRRange *SoapySDRDevice_getMasterClockRates(const SoapySDRDevice *device, size_t *length);
1098
1105 SOAPY_SDR_API int SoapySDRDevice_setReferenceClockRate(SoapySDRDevice *device, const double rate);
1106
1112 SOAPY_SDR_API double SoapySDRDevice_getReferenceClockRate(const SoapySDRDevice *device);
1113
1120 SOAPY_SDR_API SoapySDRRange *SoapySDRDevice_getReferenceClockRates(const SoapySDRDevice *device, size_t *length);
1121
1128 SOAPY_SDR_API char **SoapySDRDevice_listClockSources(const SoapySDRDevice *device, size_t *length);
1129
1136 SOAPY_SDR_API int SoapySDRDevice_setClockSource(SoapySDRDevice *device, const char *source);
1137
1143 SOAPY_SDR_API char *SoapySDRDevice_getClockSource(const SoapySDRDevice *device);
1144
1145/*******************************************************************
1146 * Time API
1147 ******************************************************************/
1148
1155 SOAPY_SDR_API char **SoapySDRDevice_listTimeSources(const SoapySDRDevice *device, size_t *length);
1156
1163 SOAPY_SDR_API int SoapySDRDevice_setTimeSource(SoapySDRDevice *device, const char *source);
1164
1170 SOAPY_SDR_API char *SoapySDRDevice_getTimeSource(const SoapySDRDevice *device);
1171
1178 SOAPY_SDR_API bool SoapySDRDevice_hasHardwareTime(const SoapySDRDevice *device, const char *what);
1179
1187 SOAPY_SDR_API long long SoapySDRDevice_getHardwareTime(const SoapySDRDevice *device, const char *what);
1188
1197 SOAPY_SDR_API int SoapySDRDevice_setHardwareTime(SoapySDRDevice *device, const long long timeNs, const char *what);
1198
1209 SOAPY_SDR_API int SoapySDRDevice_setCommandTime(SoapySDRDevice *device, const long long timeNs, const char *what);
1210
1211/*******************************************************************
1212 * Sensor API
1213 ******************************************************************/
1214
1222 SOAPY_SDR_API char **SoapySDRDevice_listSensors(const SoapySDRDevice *device, size_t *length);
1223
1231 SOAPY_SDR_API SoapySDRArgInfo SoapySDRDevice_getSensorInfo(const SoapySDRDevice *device, const char *key);
1232
1241 SOAPY_SDR_API char *SoapySDRDevice_readSensor(const SoapySDRDevice *device, const char *key);
1242
1252 SOAPY_SDR_API char **SoapySDRDevice_listChannelSensors(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length);
1253
1263 SOAPY_SDR_API SoapySDRArgInfo SoapySDRDevice_getChannelSensorInfo(const SoapySDRDevice *device, const int direction, const size_t channel, const char *key);
1264
1275 SOAPY_SDR_API char *SoapySDRDevice_readChannelSensor(const SoapySDRDevice *device, const int direction, const size_t channel, const char *key);
1276
1277/*******************************************************************
1278 * Register API
1279 ******************************************************************/
1280
1287 SOAPY_SDR_API char **SoapySDRDevice_listRegisterInterfaces(const SoapySDRDevice *device, size_t *length);
1288
1299 SOAPY_SDR_API int SoapySDRDevice_writeRegister(SoapySDRDevice *device, const char *name, const unsigned addr, const unsigned value);
1300
1308 SOAPY_SDR_API unsigned SoapySDRDevice_readRegister(const SoapySDRDevice *device, const char *name, const unsigned addr);
1309
1321 SOAPY_SDR_API int SoapySDRDevice_writeRegisters(SoapySDRDevice *device, const char *name, const unsigned addr, const unsigned *value, const size_t length);
1322
1333 SOAPY_SDR_API unsigned *SoapySDRDevice_readRegisters(const SoapySDRDevice *device, const char *name, const unsigned addr, size_t *length);
1334
1335/*******************************************************************
1336 * Settings API
1337 ******************************************************************/
1338
1345 SOAPY_SDR_API SoapySDRArgInfo *SoapySDRDevice_getSettingInfo(const SoapySDRDevice *device, size_t *length);
1346
1353 SOAPY_SDR_API SoapySDRArgInfo SoapySDRDevice_getSettingInfoWithKey(const SoapySDRDevice *device, const char *key);
1354
1363 SOAPY_SDR_API int SoapySDRDevice_writeSetting(SoapySDRDevice *device, const char *key, const char *value);
1364
1371 SOAPY_SDR_API char *SoapySDRDevice_readSetting(const SoapySDRDevice *device, const char *key);
1372
1381 SOAPY_SDR_API SoapySDRArgInfo *SoapySDRDevice_getChannelSettingInfo(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length);
1382
1391 SOAPY_SDR_API SoapySDRArgInfo SoapySDRDevice_getChannelSettingInfoWithKey(const SoapySDRDevice *device, const int direction, const size_t channel, const char *key);
1392
1403 SOAPY_SDR_API int SoapySDRDevice_writeChannelSetting(SoapySDRDevice *device, const int direction, const size_t channel, const char *key, const char *value);
1404
1413 SOAPY_SDR_API char *SoapySDRDevice_readChannelSetting(const SoapySDRDevice *device, const int direction, const size_t channel, const char *key);
1414
1415/*******************************************************************
1416 * GPIO API
1417 ******************************************************************/
1418
1424 SOAPY_SDR_API char **SoapySDRDevice_listGPIOBanks(const SoapySDRDevice *device, size_t *length);
1425
1433 SOAPY_SDR_API int SoapySDRDevice_writeGPIO(SoapySDRDevice *device, const char *bank, const unsigned value);
1434
1443 SOAPY_SDR_API int SoapySDRDevice_writeGPIOMasked(SoapySDRDevice *device, const char *bank, const unsigned value, const unsigned mask);
1444
1451 SOAPY_SDR_API unsigned SoapySDRDevice_readGPIO(const SoapySDRDevice *device, const char *bank);
1452
1461 SOAPY_SDR_API int SoapySDRDevice_writeGPIODir(SoapySDRDevice *device, const char *bank, const unsigned dir);
1462
1472 SOAPY_SDR_API int SoapySDRDevice_writeGPIODirMasked(SoapySDRDevice *device, const char *bank, const unsigned dir, const unsigned mask);
1473
1481 SOAPY_SDR_API unsigned SoapySDRDevice_readGPIODir(const SoapySDRDevice *device, const char *bank);
1482
1483/*******************************************************************
1484 * I2C API
1485 ******************************************************************/
1486
1497 SOAPY_SDR_API int SoapySDRDevice_writeI2C(SoapySDRDevice *device, const int addr, const char *data, const size_t numBytes);
1498
1510 SOAPY_SDR_API char *SoapySDRDevice_readI2C(SoapySDRDevice *device, const int addr, size_t *numBytes);
1511
1512/*******************************************************************
1513 * SPI API
1514 ******************************************************************/
1515
1531 SOAPY_SDR_API unsigned SoapySDRDevice_transactSPI(SoapySDRDevice *device, const int addr, const unsigned data, const size_t numBits);
1532
1533/*******************************************************************
1534 * UART API
1535 ******************************************************************/
1536
1543 SOAPY_SDR_API char **SoapySDRDevice_listUARTs(const SoapySDRDevice *device, size_t *length);
1544
1554 SOAPY_SDR_API int SoapySDRDevice_writeUART(SoapySDRDevice *device, const char *which, const char *data);
1555
1565 SOAPY_SDR_API char *SoapySDRDevice_readUART(const SoapySDRDevice *device, const char *which, const long timeoutUs);
1566
1567
1568/*******************************************************************
1569 * Native Access API
1570 ******************************************************************/
1571
1579 SOAPY_SDR_API void* SoapySDRDevice_getNativeDeviceHandle(const SoapySDRDevice *device);
1580
1581#ifdef __cplusplus
1582}
1583#endif
Config.h
SOAPY_SDR_API
#define SOAPY_SDR_API
Definition Config.h:41
Constants.h
Device.h
SoapySDRDevice_getMasterClockRate
SOAPY_SDR_API double SoapySDRDevice_getMasterClockRate(const SoapySDRDevice *device)
SoapySDRDevice_unmake_list
SOAPY_SDR_API int SoapySDRDevice_unmake_list(SoapySDRDevice **devices, const size_t length)
SoapySDRDevice_writeUART
SOAPY_SDR_API int SoapySDRDevice_writeUART(SoapySDRDevice *device, const char *which, const char *data)
SoapySDRDevice_setCommandTime
SOAPY_SDR_API int SoapySDRDevice_setCommandTime(SoapySDRDevice *device, const long long timeNs, const char *what)
SoapySDRDevice_setMasterClockRate
SOAPY_SDR_API int SoapySDRDevice_setMasterClockRate(SoapySDRDevice *device, const double rate)
SoapySDRDevice_hasIQBalanceMode
SOAPY_SDR_API bool SoapySDRDevice_hasIQBalanceMode(const SoapySDRDevice *device, const int direction, const size_t channel)
SoapySDRDevice_make
SOAPY_SDR_API SoapySDRDevice * SoapySDRDevice_make(const SoapySDRKwargs *args)
SoapySDRDevice_listSampleRates
SOAPY_SDR_API double * SoapySDRDevice_listSampleRates(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length)
SoapySDRDevice_writeGPIODirMasked
SOAPY_SDR_API int SoapySDRDevice_writeGPIODirMasked(SoapySDRDevice *device, const char *bank, const unsigned dir, const unsigned mask)
SoapySDRDevice_activateStream
SOAPY_SDR_API int SoapySDRDevice_activateStream(SoapySDRDevice *device, SoapySDRStream *stream, const int flags, const long long timeNs, const size_t numElems)
SoapySDRDevice_getStreamMTU
SOAPY_SDR_API size_t SoapySDRDevice_getStreamMTU(const SoapySDRDevice *device, SoapySDRStream *stream)
SoapySDRDevice_releaseReadBuffer
SOAPY_SDR_API void SoapySDRDevice_releaseReadBuffer(SoapySDRDevice *device, SoapySDRStream *stream, const size_t handle)
SoapySDRDevice_getClockSource
SOAPY_SDR_API char * SoapySDRDevice_getClockSource(const SoapySDRDevice *device)
SoapySDRDevice_listFrequencies
SOAPY_SDR_API char ** SoapySDRDevice_listFrequencies(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length)
SoapySDRDevice_getSensorInfo
SOAPY_SDR_API SoapySDRArgInfo SoapySDRDevice_getSensorInfo(const SoapySDRDevice *device, const char *key)
SoapySDRDevice_writeChannelSetting
SOAPY_SDR_API int SoapySDRDevice_writeChannelSetting(SoapySDRDevice *device, const int direction, const size_t channel, const char *key, const char *value)
SoapySDRDevice_hasDCOffsetMode
SOAPY_SDR_API bool SoapySDRDevice_hasDCOffsetMode(const SoapySDRDevice *device, const int direction, const size_t channel)
SoapySDRDevice_listUARTs
SOAPY_SDR_API char ** SoapySDRDevice_listUARTs(const SoapySDRDevice *device, size_t *length)
SoapySDRDevice_setAntenna
SOAPY_SDR_API int SoapySDRDevice_setAntenna(SoapySDRDevice *device, const int direction, const size_t channel, const char *name)
SoapySDRDevice_setHardwareTime
SOAPY_SDR_API int SoapySDRDevice_setHardwareTime(SoapySDRDevice *device, const long long timeNs, const char *what)
SoapySDRDevice_lastStatus
SOAPY_SDR_API int SoapySDRDevice_lastStatus(void)
SoapySDRDevice_getNativeStreamFormat
SOAPY_SDR_API char * SoapySDRDevice_getNativeStreamFormat(const SoapySDRDevice *device, const int direction, const size_t channel, double *fullScale)
SoapySDRDevice_getChannelSettingInfoWithKey
SOAPY_SDR_API SoapySDRArgInfo SoapySDRDevice_getChannelSettingInfoWithKey(const SoapySDRDevice *device, const int direction, const size_t channel, const char *key)
SoapySDRDevice_getFrequencyComponent
SOAPY_SDR_API double SoapySDRDevice_getFrequencyComponent(const SoapySDRDevice *device, const int direction, const size_t channel, const char *name)
SoapySDRDevice_setClockSource
SOAPY_SDR_API int SoapySDRDevice_setClockSource(SoapySDRDevice *device, const char *source)
SoapySDRDevice_readI2C
SOAPY_SDR_API char * SoapySDRDevice_readI2C(SoapySDRDevice *device, const int addr, size_t *numBytes)
SoapySDRDevice_setFrequency
SOAPY_SDR_API int SoapySDRDevice_setFrequency(SoapySDRDevice *device, const int direction, const size_t channel, const double frequency, const SoapySDRKwargs *args)
SoapySDRDevice_getNumChannels
SOAPY_SDR_API size_t SoapySDRDevice_getNumChannels(const SoapySDRDevice *device, const int direction)
SoapySDRDevice_make_list
SOAPY_SDR_API SoapySDRDevice ** SoapySDRDevice_make_list(const SoapySDRKwargs *argsList, const size_t length)
SoapySDRDevice_getGainRange
SOAPY_SDR_API SoapySDRRange SoapySDRDevice_getGainRange(const SoapySDRDevice *device, const int direction, const size_t channel)
SoapySDRDevice_listTimeSources
SOAPY_SDR_API char ** SoapySDRDevice_listTimeSources(const SoapySDRDevice *device, size_t *length)
SoapySDRDevice_setSampleRate
SOAPY_SDR_API int SoapySDRDevice_setSampleRate(SoapySDRDevice *device, const int direction, const size_t channel, const double rate)
SoapySDRDevice_getHardwareKey
SOAPY_SDR_API char * SoapySDRDevice_getHardwareKey(const SoapySDRDevice *device)
SoapySDRDevice_getDirectAccessBufferAddrs
SOAPY_SDR_API int SoapySDRDevice_getDirectAccessBufferAddrs(SoapySDRDevice *device, SoapySDRStream *stream, const size_t handle, void **buffs)
SoapySDRDevice_getHardwareInfo
SOAPY_SDR_API SoapySDRKwargs SoapySDRDevice_getHardwareInfo(const SoapySDRDevice *device)
SoapySDRDevice_getGainMode
SOAPY_SDR_API bool SoapySDRDevice_getGainMode(const SoapySDRDevice *device, const int direction, const size_t channel)
SoapySDRDevice_getFrequencyCorrection
SOAPY_SDR_API double SoapySDRDevice_getFrequencyCorrection(const SoapySDRDevice *device, const int direction, const size_t channel)
SoapySDRDevice_getIQBalance
SOAPY_SDR_API int SoapySDRDevice_getIQBalance(const SoapySDRDevice *device, const int direction, const size_t channel, double *balanceI, double *balanceQ)
SoapySDRDevice_listGains
SOAPY_SDR_API char ** SoapySDRDevice_listGains(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length)
SoapySDRDevice_getSampleRate
SOAPY_SDR_API double SoapySDRDevice_getSampleRate(const SoapySDRDevice *device, const int direction, const size_t channel)
SoapySDRDevice_readChannelSensor
SOAPY_SDR_API char * SoapySDRDevice_readChannelSensor(const SoapySDRDevice *device, const int direction, const size_t channel, const char *key)
SoapySDRDevice_listGPIOBanks
SOAPY_SDR_API char ** SoapySDRDevice_listGPIOBanks(const SoapySDRDevice *device, size_t *length)
SoapySDRDevice_makeStrArgs
SOAPY_SDR_API SoapySDRDevice * SoapySDRDevice_makeStrArgs(const char *args)
SoapySDRDevice_writeI2C
SOAPY_SDR_API int SoapySDRDevice_writeI2C(SoapySDRDevice *device, const int addr, const char *data, const size_t numBytes)
SoapySDRDevice_setupStream
SOAPY_SDR_API SoapySDRStream * SoapySDRDevice_setupStream(SoapySDRDevice *device, const int direction, const char *format, const size_t *channels, const size_t numChans, const SoapySDRKwargs *args)
SoapySDRDevice_setFrequencyComponent
SOAPY_SDR_API int SoapySDRDevice_setFrequencyComponent(SoapySDRDevice *device, const int direction, const size_t channel, const char *name, const double frequency, const SoapySDRKwargs *args)
SoapySDRDevice_deactivateStream
SOAPY_SDR_API int SoapySDRDevice_deactivateStream(SoapySDRDevice *device, SoapySDRStream *stream, const int flags, const long long timeNs)
SoapySDRDevice_unmake
SOAPY_SDR_API int SoapySDRDevice_unmake(SoapySDRDevice *device)
SoapySDRDevice_getChannelInfo
SOAPY_SDR_API SoapySDRKwargs SoapySDRDevice_getChannelInfo(const SoapySDRDevice *device, const int direction, const size_t channel)
SoapySDRDevice
struct SoapySDRDevice SoapySDRDevice
Forward declaration of device handle.
Definition Device.h:29
SoapySDRDevice_getChannelSensorInfo
SOAPY_SDR_API SoapySDRArgInfo SoapySDRDevice_getChannelSensorInfo(const SoapySDRDevice *device, const int direction, const size_t channel, const char *key)
SoapySDRDevice_readSensor
SOAPY_SDR_API char * SoapySDRDevice_readSensor(const SoapySDRDevice *device, const char *key)
SoapySDRDevice_getBandwidth
SOAPY_SDR_API double SoapySDRDevice_getBandwidth(const SoapySDRDevice *device, const int direction, const size_t channel)
SoapySDRDevice_readGPIODir
SOAPY_SDR_API unsigned SoapySDRDevice_readGPIODir(const SoapySDRDevice *device, const char *bank)
SoapySDRDevice_setDCOffsetMode
SOAPY_SDR_API int SoapySDRDevice_setDCOffsetMode(SoapySDRDevice *device, const int direction, const size_t channel, const bool automatic)
SoapySDRDevice_setGainMode
SOAPY_SDR_API int SoapySDRDevice_setGainMode(SoapySDRDevice *device, const int direction, const size_t channel, const bool automatic)
SoapySDRDevice_setIQBalanceMode
SOAPY_SDR_API int SoapySDRDevice_setIQBalanceMode(SoapySDRDevice *device, const int direction, const size_t channel, const bool automatic)
SoapySDRDevice_setGain
SOAPY_SDR_API int SoapySDRDevice_setGain(SoapySDRDevice *device, const int direction, const size_t channel, const double value)
SoapySDRDevice_hasFrequencyCorrection
SOAPY_SDR_API bool SoapySDRDevice_hasFrequencyCorrection(const SoapySDRDevice *device, const int direction, const size_t channel)
SoapySDRDevice_listRegisterInterfaces
SOAPY_SDR_API char ** SoapySDRDevice_listRegisterInterfaces(const SoapySDRDevice *device, size_t *length)
SoapySDRDevice_closeStream
SOAPY_SDR_API int SoapySDRDevice_closeStream(SoapySDRDevice *device, SoapySDRStream *stream)
SoapySDRDevice_transactSPI
SOAPY_SDR_API unsigned SoapySDRDevice_transactSPI(SoapySDRDevice *device, const int addr, const unsigned data, const size_t numBits)
SoapySDRDevice_writeRegister
SOAPY_SDR_API int SoapySDRDevice_writeRegister(SoapySDRDevice *device, const char *name, const unsigned addr, const unsigned value)
SoapySDRDevice_listSensors
SOAPY_SDR_API char ** SoapySDRDevice_listSensors(const SoapySDRDevice *device, size_t *length)
SoapySDRDevice_getGainElement
SOAPY_SDR_API double SoapySDRDevice_getGainElement(const SoapySDRDevice *device, const int direction, const size_t channel, const char *name)
SoapySDRDevice_getGainElementRange
SOAPY_SDR_API SoapySDRRange SoapySDRDevice_getGainElementRange(const SoapySDRDevice *device, const int direction, const size_t channel, const char *name)
SoapySDRDevice_hasGainMode
SOAPY_SDR_API bool SoapySDRDevice_hasGainMode(const SoapySDRDevice *device, const int direction, const size_t channel)
SoapySDRDevice_writeRegisters
SOAPY_SDR_API int SoapySDRDevice_writeRegisters(SoapySDRDevice *device, const char *name, const unsigned addr, const unsigned *value, const size_t length)
SoapySDRDevice_getFrequencyRange
SOAPY_SDR_API SoapySDRRange * SoapySDRDevice_getFrequencyRange(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length)
SoapySDRDevice_listBandwidths
SOAPY_SDR_API double * SoapySDRDevice_listBandwidths(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length)
SoapySDRDevice_enumerate
SOAPY_SDR_API SoapySDRKwargs * SoapySDRDevice_enumerate(const SoapySDRKwargs *args, size_t *length)
SoapySDRDevice_getChannelSettingInfo
SOAPY_SDR_API SoapySDRArgInfo * SoapySDRDevice_getChannelSettingInfo(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length)
SoapySDRDevice_writeGPIOMasked
SOAPY_SDR_API int SoapySDRDevice_writeGPIOMasked(SoapySDRDevice *device, const char *bank, const unsigned value, const unsigned mask)
SoapySDRDevice_getSettingInfo
SOAPY_SDR_API SoapySDRArgInfo * SoapySDRDevice_getSettingInfo(const SoapySDRDevice *device, size_t *length)
SoapySDRDevice_getHardwareTime
SOAPY_SDR_API long long SoapySDRDevice_getHardwareTime(const SoapySDRDevice *device, const char *what)
SoapySDRDevice_setReferenceClockRate
SOAPY_SDR_API int SoapySDRDevice_setReferenceClockRate(SoapySDRDevice *device, const double rate)
SoapySDRDevice_enumerateStrArgs
SOAPY_SDR_API SoapySDRKwargs * SoapySDRDevice_enumerateStrArgs(const char *args, size_t *length)
SoapySDRDevice_readSetting
SOAPY_SDR_API char * SoapySDRDevice_readSetting(const SoapySDRDevice *device, const char *key)
SoapySDRDevice_getDriverKey
SOAPY_SDR_API char * SoapySDRDevice_getDriverKey(const SoapySDRDevice *device)
SoapySDRDevice_setDCOffset
SOAPY_SDR_API int SoapySDRDevice_setDCOffset(SoapySDRDevice *device, const int direction, const size_t channel, const double offsetI, const double offsetQ)
SoapySDRDevice_hasHardwareTime
SOAPY_SDR_API bool SoapySDRDevice_hasHardwareTime(const SoapySDRDevice *device, const char *what)
SoapySDRDevice_getDCOffsetMode
SOAPY_SDR_API bool SoapySDRDevice_getDCOffsetMode(const SoapySDRDevice *device, const int direction, const size_t channel)
SoapySDRDevice_readRegister
SOAPY_SDR_API unsigned SoapySDRDevice_readRegister(const SoapySDRDevice *device, const char *name, const unsigned addr)
SoapySDRDevice_getFullDuplex
SOAPY_SDR_API bool SoapySDRDevice_getFullDuplex(const SoapySDRDevice *device, const int direction, const size_t channel)
SoapySDRDevice_releaseWriteBuffer
SOAPY_SDR_API void SoapySDRDevice_releaseWriteBuffer(SoapySDRDevice *device, SoapySDRStream *stream, const size_t handle, const size_t numElems, int *flags, const long long timeNs)
SoapySDRDevice_getNativeDeviceHandle
SOAPY_SDR_API void * SoapySDRDevice_getNativeDeviceHandle(const SoapySDRDevice *device)
SoapySDRDevice_listClockSources
SOAPY_SDR_API char ** SoapySDRDevice_listClockSources(const SoapySDRDevice *device, size_t *length)
SoapySDRDevice_listAntennas
SOAPY_SDR_API char ** SoapySDRDevice_listAntennas(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length)
SoapySDRDevice_readUART
SOAPY_SDR_API char * SoapySDRDevice_readUART(const SoapySDRDevice *device, const char *which, const long timeoutUs)
SoapySDRDevice_getFrequencyArgsInfo
SOAPY_SDR_API SoapySDRArgInfo * SoapySDRDevice_getFrequencyArgsInfo(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length)
SoapySDRDevice_writeGPIODir
SOAPY_SDR_API int SoapySDRDevice_writeGPIODir(SoapySDRDevice *device, const char *bank, const unsigned dir)
SoapySDRDevice_acquireWriteBuffer
SOAPY_SDR_API int SoapySDRDevice_acquireWriteBuffer(SoapySDRDevice *device, SoapySDRStream *stream, size_t *handle, void **buffs, const long timeoutUs)
SoapySDRDevice_writeGPIO
SOAPY_SDR_API int SoapySDRDevice_writeGPIO(SoapySDRDevice *device, const char *bank, const unsigned value)
SoapySDRDevice_getDCOffset
SOAPY_SDR_API int SoapySDRDevice_getDCOffset(const SoapySDRDevice *device, const int direction, const size_t channel, double *offsetI, double *offsetQ)
SoapySDRDevice_getBandwidthRange
SOAPY_SDR_API SoapySDRRange * SoapySDRDevice_getBandwidthRange(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length)
SoapySDRDevice_hasIQBalance
SOAPY_SDR_API bool SoapySDRDevice_hasIQBalance(const SoapySDRDevice *device, const int direction, const size_t channel)
SoapySDRDevice_getSampleRateRange
SOAPY_SDR_API SoapySDRRange * SoapySDRDevice_getSampleRateRange(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length)
SoapySDRDevice_getFrequency
SOAPY_SDR_API double SoapySDRDevice_getFrequency(const SoapySDRDevice *device, const int direction, const size_t channel)
SoapySDRDevice_getReferenceClockRates
SOAPY_SDR_API SoapySDRRange * SoapySDRDevice_getReferenceClockRates(const SoapySDRDevice *device, size_t *length)
SoapySDRDevice_setBandwidth
SOAPY_SDR_API int SoapySDRDevice_setBandwidth(SoapySDRDevice *device, const int direction, const size_t channel, const double bw)
SoapySDRDevice_getAntenna
SOAPY_SDR_API char * SoapySDRDevice_getAntenna(const SoapySDRDevice *device, const int direction, const size_t channel)
SoapySDRStream
struct SoapySDRStream SoapySDRStream
Forward declaration of stream handle.
Definition Device.h:32
SoapySDRDevice_acquireReadBuffer
SOAPY_SDR_API int SoapySDRDevice_acquireReadBuffer(SoapySDRDevice *device, SoapySDRStream *stream, size_t *handle, const void **buffs, int *flags, long long *timeNs, const long timeoutUs)
SoapySDRDevice_getNumDirectAccessBuffers
SOAPY_SDR_API size_t SoapySDRDevice_getNumDirectAccessBuffers(SoapySDRDevice *device, SoapySDRStream *stream)
SoapySDRDevice_readStream
SOAPY_SDR_API int SoapySDRDevice_readStream(SoapySDRDevice *device, SoapySDRStream *stream, void *const *buffs, const size_t numElems, int *flags, long long *timeNs, const long timeoutUs)
SoapySDRDevice_lastError
SOAPY_SDR_API const char * SoapySDRDevice_lastError(void)
SoapySDRDevice_readStreamStatus
SOAPY_SDR_API int SoapySDRDevice_readStreamStatus(SoapySDRDevice *device, SoapySDRStream *stream, size_t *chanMask, int *flags, long long *timeNs, const long timeoutUs)
SoapySDRDevice_getMasterClockRates
SOAPY_SDR_API SoapySDRRange * SoapySDRDevice_getMasterClockRates(const SoapySDRDevice *device, size_t *length)
SoapySDRDevice_getReferenceClockRate
SOAPY_SDR_API double SoapySDRDevice_getReferenceClockRate(const SoapySDRDevice *device)
SoapySDRDevice_setIQBalance
SOAPY_SDR_API int SoapySDRDevice_setIQBalance(SoapySDRDevice *device, const int direction, const size_t channel, const double balanceI, const double balanceQ)
SoapySDRDevice_getGain
SOAPY_SDR_API double SoapySDRDevice_getGain(const SoapySDRDevice *device, const int direction, const size_t channel)
SoapySDRDevice_readGPIO
SOAPY_SDR_API unsigned SoapySDRDevice_readGPIO(const SoapySDRDevice *device, const char *bank)
SoapySDRDevice_setFrontendMapping
SOAPY_SDR_API int SoapySDRDevice_setFrontendMapping(SoapySDRDevice *device, const int direction, const char *mapping)
SoapySDRDevice_writeStream
SOAPY_SDR_API int SoapySDRDevice_writeStream(SoapySDRDevice *device, SoapySDRStream *stream, const void *const *buffs, const size_t numElems, int *flags, const long long timeNs, const long timeoutUs)
SoapySDRDevice_getFrontendMapping
SOAPY_SDR_API char * SoapySDRDevice_getFrontendMapping(const SoapySDRDevice *device, const int direction)
SoapySDRDevice_setTimeSource
SOAPY_SDR_API int SoapySDRDevice_setTimeSource(SoapySDRDevice *device, const char *source)
SoapySDRDevice_hasDCOffset
SOAPY_SDR_API bool SoapySDRDevice_hasDCOffset(const SoapySDRDevice *device, const int direction, const size_t channel)
SoapySDRDevice_setFrequencyCorrection
SOAPY_SDR_API int SoapySDRDevice_setFrequencyCorrection(SoapySDRDevice *device, const int direction, const size_t channel, const double value)
SoapySDRDevice_getFrequencyRangeComponent
SOAPY_SDR_API SoapySDRRange * SoapySDRDevice_getFrequencyRangeComponent(const SoapySDRDevice *device, const int direction, const size_t channel, const char *name, size_t *length)
SoapySDRDevice_getIQBalanceMode
SOAPY_SDR_API bool SoapySDRDevice_getIQBalanceMode(const SoapySDRDevice *device, const int direction, const size_t channel)
SoapySDRDevice_getTimeSource
SOAPY_SDR_API char * SoapySDRDevice_getTimeSource(const SoapySDRDevice *device)
SoapySDRDevice_readRegisters
SOAPY_SDR_API unsigned * SoapySDRDevice_readRegisters(const SoapySDRDevice *device, const char *name, const unsigned addr, size_t *length)
SoapySDRDevice_writeSetting
SOAPY_SDR_API int SoapySDRDevice_writeSetting(SoapySDRDevice *device, const char *key, const char *value)
SoapySDRDevice_readChannelSetting
SOAPY_SDR_API char * SoapySDRDevice_readChannelSetting(const SoapySDRDevice *device, const int direction, const size_t channel, const char *key)
SoapySDRDevice_getStreamArgsInfo
SOAPY_SDR_API SoapySDRArgInfo * SoapySDRDevice_getStreamArgsInfo(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length)
SoapySDRDevice_setGainElement
SOAPY_SDR_API int SoapySDRDevice_setGainElement(SoapySDRDevice *device, const int direction, const size_t channel, const char *name, const double value)
SoapySDRDevice_getStreamFormats
SOAPY_SDR_API char ** SoapySDRDevice_getStreamFormats(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length)
SoapySDRDevice_make_listStrArgs
SOAPY_SDR_API SoapySDRDevice ** SoapySDRDevice_make_listStrArgs(const char *const *argsList, const size_t length)
SoapySDRDevice_listChannelSensors
SOAPY_SDR_API char ** SoapySDRDevice_listChannelSensors(const SoapySDRDevice *device, const int direction, const size_t channel, size_t *length)
SoapySDRDevice_getSettingInfoWithKey
SOAPY_SDR_API SoapySDRArgInfo SoapySDRDevice_getSettingInfoWithKey(const SoapySDRDevice *device, const char *key)
Errors.h
Types.h
SoapySDRArgInfo
Definition for argument info.
Definition Types.h:64
SoapySDRKwargs
Definition for a key/value string map.
Definition Types.h:35
SoapySDRRange
Definition for a min/max numeric range.
Definition Types.h:27