|
1 | 1 | // Copyright (c) 2015-2020 Josh Blum |
2 | 2 | // Copyright (c) 2016-2016 Bastille Networks |
| 3 | +// Copyright (c) 2022 Nicholas Corgan |
3 | 4 | // SPDX-License-Identifier: BSL-1.0 |
4 | 5 |
|
5 | 6 | #include "SoapyClient.hpp" |
@@ -1273,6 +1274,20 @@ SoapySDR::ArgInfoList SoapyRemoteDevice::getSettingInfo(void) const |
1273 | 1274 | return result; |
1274 | 1275 | } |
1275 | 1276 |
|
| 1277 | +SoapySDR::ArgInfo SoapyRemoteDevice::getSettingInfo(const std::string &key) const |
| 1278 | +{ |
| 1279 | + std::lock_guard<std::mutex> lock(_mutex); |
| 1280 | + SoapyRPCPacker packer(_sock); |
| 1281 | + packer & SOAPY_REMOTE_GET_SPECIFIC_SETTING_INFO; |
| 1282 | + packer & key; |
| 1283 | + packer(); |
| 1284 | + |
| 1285 | + SoapyRPCUnpacker unpacker(_sock); |
| 1286 | + SoapySDR::ArgInfo result; |
| 1287 | + unpacker & result; |
| 1288 | + return result; |
| 1289 | +} |
| 1290 | + |
1276 | 1291 | void SoapyRemoteDevice::writeSetting(const std::string &key, const std::string &value) |
1277 | 1292 | { |
1278 | 1293 | std::lock_guard<std::mutex> lock(_mutex); |
@@ -1314,6 +1329,22 @@ SoapySDR::ArgInfoList SoapyRemoteDevice::getSettingInfo(const int direction, con |
1314 | 1329 | return result; |
1315 | 1330 | } |
1316 | 1331 |
|
| 1332 | +SoapySDR::ArgInfo SoapyRemoteDevice::getSettingInfo(const int direction, const size_t channel, const std::string &key) const |
| 1333 | +{ |
| 1334 | + std::lock_guard<std::mutex> lock(_mutex); |
| 1335 | + SoapyRPCPacker packer(_sock); |
| 1336 | + packer & SOAPY_REMOTE_GET_SPECIFIC_CHANNEL_SETTING_INFO; |
| 1337 | + packer & char(direction); |
| 1338 | + packer & int(channel); |
| 1339 | + packer & key; |
| 1340 | + packer(); |
| 1341 | + |
| 1342 | + SoapyRPCUnpacker unpacker(_sock); |
| 1343 | + SoapySDR::ArgInfo result; |
| 1344 | + unpacker & result; |
| 1345 | + return result; |
| 1346 | +} |
| 1347 | + |
1317 | 1348 | void SoapyRemoteDevice::writeSetting(const int direction, const size_t channel, const std::string &key, const std::string &value) |
1318 | 1349 | { |
1319 | 1350 | std::lock_guard<std::mutex> lock(_mutex); |
|
0 commit comments