PicoScenes API Docs
 
Loading...
Searching...
No Matches
SDRHardwareInformation.hxx
Go to the documentation of this file.
1//
2// Created by Zhiping Jiang on 2024/1/24.
3//
4
5#ifndef PICOSCENES_PLATFORM_SDRFRONTENDHARDWAREINFORMATION_HXX
6#define PICOSCENES_PLATFORM_SDRFRONTENDHARDWAREINFORMATION_HXX
7
8#include <vector>
9#include <string>
10#include <map>
11#include <cstdint>
12#include "PicoScenesCommons.hxx"
13
14#if defined(_WIN32) && defined(interface)
15#undef interface
16#endif
17
21enum class SDRDeviceCombinationType: uint8_t {
22 None = 0,
23 MIMOCable = 1,
24 Ethernet = 2
25};
26
31 bool isPrimary{false};
32 std::string ipAddress{};
33 std::string hostInterfaceName{};
34 std::string hostPortAddress{};
35 int linkSpeed{-1};
36 int MTU{-1};
39};
40
48 enum class SDRConnectionType: uint8_t {
49 Ethernet = 0,
50 USB = 1,
51 PCIe = 2,
52 UnSpecified = 255
53 };
54
56 std::vector<SDREthernetConnectionInterface> ethernetInterfaces{};
61 std::string combinationIdentifier{};
68 if (connectionType != SDRConnectionType::Ethernet) return nullptr;
69 auto it = std::find_if(ethernetInterfaces.begin(), ethernetInterfaces.end(),
70 [](const auto& iface) { return iface.isPrimary; });
71 if (it != ethernetInterfaces.end()) {
72 return &(*it);
73 }
74 return ethernetInterfaces.empty() ? nullptr : &ethernetInterfaces.front();
75 }
76
81 [[nodiscard]] bool isDualConnection() const {
82 return ethernetInterfaces.size() > 1;
83 }
84};
85
90 std::string serialNumber{};
91 std::string motherboardSerial{};
92 std::string frontendHardwareModel{};
93 std::vector<uint8_t> txChannelNumber{};
94 std::vector<uint8_t> rxChannelNumber{};
100 [[nodiscard]] int getNumTx() const { return txChannelNumber.size(); }
101
106 [[nodiscard]] int getNumRx() const { return rxChannelNumber.size(); }
107};
108
113 std::string serialNumber{};
114 std::string model{};
115 std::vector<std::shared_ptr<SDRFrontEndProfile>> frontends{};
116};
117
122 std::string name;
123 std::string serial{};
124 std::string model{};
125 std::string resource{};
126 std::string fpgaImage{};
127 PicoScenesDeviceType deviceType{PicoScenesDeviceType::Unknown};
128 PicoScenesDeviceSubtype deviceSubtype{PicoScenesDeviceSubtype::Unknown};
129 uint16_t deviceOrder{0};
131 std::map<std::string, std::string> inverseMap{};
132 std::vector<SDRMainBoardInfo> otherBoards{};
138 void merge(const SDRMainBoardInfo& other) {
139 // Add the other board to otherBoards
140 otherBoards.push_back(other);
141 }
142
147 [[nodiscard]] size_t getTotalBoardCount() const {
148 return 1 + otherBoards.size(); // Current board + other connected boards
149 }
150
155 // Clear existing map
156 inverseMap.clear();
157
158 // Add basic identifiers
159 if (!serial.empty()) inverseMap[serial] = "serial";
160 if (!name.empty()) inverseMap[name] = "name";
161 if (!resource.empty()) inverseMap[resource] = "resource";
162
163 // Add ethernet addresses if present
165 for (const auto& interface : connectionProfile.ethernetInterfaces) {
166 if (!interface.ipAddress.empty() && !inverseMap.contains(interface.ipAddress)) {
167 inverseMap[interface.ipAddress] = "addr";
168 }
169 }
170 }
171 }
172};
173
183public:
189 virtual std::vector<SDRMainBoardInfo> getAllHardwareBoards(bool refresh = false) {
190 if (refresh || boardInfoChanged) {
192 boardInfoChanged = false;
193 }
194 std::vector<SDRMainBoardInfo> allBoards{boardInfo};
195 allBoards.insert(allBoards.end(), boardInfo.otherBoards.begin(), boardInfo.otherBoards.end());
196 return allBoards;
197 }
198
206 virtual const SDRMainBoardInfo& getHardwareBoardByIndex(size_t boardIndex, bool refresh = false) {
207 if (refresh || boardInfoChanged) {
209 boardInfoChanged = false;
210 }
211 if (boardIndex == 0) return boardInfo;
212 if (boardIndex - 1 >= boardInfo.otherBoards.size()) {
213 throw std::out_of_range("Board index out of range");
214 }
215 return boardInfo.otherBoards[boardIndex - 1];
216 }
217
223 virtual size_t getHardwareBoardCount(bool refresh = false) {
224 if (refresh || boardInfoChanged) {
226 boardInfoChanged = false;
227 }
229 }
230
236 virtual const SDRMainBoardInfo& getHardwareBoardInfo(bool refresh = false) {
237 if (refresh || boardInfoChanged) {
239 boardInfoChanged = false;
240 }
241 return boardInfo;
242 }
243
249 virtual const std::vector<uint8_t>& getHardwareSupportedTxChannels(bool refresh = false) {
250 if (refresh || supportedChannelsChanged) {
253 }
254 return supportedTxChannels;
255 }
256
262 virtual const std::vector<uint8_t>& getHardwareSupportedRxChannels(bool refresh = false) {
263 if (refresh || supportedChannelsChanged) {
266 }
267 return supportedRxChannels;
268 }
269
276 virtual const std::vector<std::string>& getHardwareSupportedTxAntennas(uint8_t channel, bool refresh = false) {
277 if (refresh || supportedAntennasChanged) {
280 }
281 return supportedTxAntennas.at(channel);
282 }
283
290 virtual const std::vector<std::string>& getHardwareSupportedRxAntennas(uint8_t channel, bool refresh = false) {
291 if (refresh || supportedAntennasChanged) {
294 }
295 return supportedRxAntennas.at(channel);
296 }
297
303 virtual const std::vector<std::vector<std::string>>& getHardwareSupportedTxAntennas(bool refresh = false) {
304 if (refresh || supportedAntennasMapChanged) {
307 }
308 return supportedTxAntennas;
309 }
310
316 virtual const std::vector<std::vector<std::string>>& getHardwareSupportedRxAntennas(bool refresh = false) {
317 if (refresh || supportedAntennasMapChanged) {
320 }
321 return supportedRxAntennas;
322 }
323
330 virtual const std::pair<double, double>& getHardwareTxGainRange(uint8_t channel, bool refresh = false) {
331 if (refresh || gainRangesChanged) {
333 gainRangesChanged = false;
334 }
335 return txGainRanges.at(channel);
336 }
337
344 virtual const std::pair<double, double>& getHardwareRxGainRange(uint8_t channel, bool refresh = false) {
345 if (refresh || gainRangesChanged) {
347 gainRangesChanged = false;
348 }
349 return rxGainRanges.at(channel);
350 }
351
357 virtual const std::vector<std::pair<double, double>>& getHardwareTxGainRanges(bool refresh = false) {
358 if (refresh || gainRangesMapChanged) {
360 gainRangesMapChanged = false;
361 }
362 return txGainRanges;
363 }
364
370 virtual const std::vector<std::pair<double, double>>& getHardwareRxGainRanges(bool refresh = false) {
371 if (refresh || gainRangesMapChanged) {
373 gainRangesMapChanged = false;
374 }
375 return rxGainRanges;
376 }
377
384 virtual const std::pair<double, double>& getHardwareTxFrequencyRange(uint8_t channel, bool refresh = false) {
385 if (refresh || frequencyRangesChanged) {
388 }
389 return txFrequencyRanges.at(channel);
390 }
391
398 virtual const std::pair<double, double>& getHardwareRxFrequencyRange(uint8_t channel, bool refresh = false) {
399 if (refresh || frequencyRangesChanged) {
402 }
403 return rxFrequencyRanges.at(channel);
404 }
405
411 virtual const std::vector<std::pair<double, double>>& getHardwareTxFrequencyRanges(bool refresh = false) {
412 if (refresh || frequencyRangesMapChanged) {
415 }
416 return txFrequencyRanges;
417 }
418
424 virtual const std::vector<std::pair<double, double>>& getHardwareRxFrequencyRanges(bool refresh = false) {
425 if (refresh || frequencyRangesMapChanged) {
428 }
429 return rxFrequencyRanges;
430 }
431
438 virtual const std::pair<double, double>& getHardwareTxSamplingRateRange(uint8_t channel, bool refresh = false) {
439 if (refresh || samplingRateRangesChanged) {
442 }
443 return txSamplingRateRanges.at(channel);
444 }
445
452 virtual const std::pair<double, double>& getHardwareRxSamplingRateRange(uint8_t channel, bool refresh = false) {
453 if (refresh || samplingRateRangesChanged) {
456 }
457 return rxSamplingRateRanges.at(channel);
458 }
459
465 virtual const std::vector<std::pair<double, double>>& getHardwareTxSamplingRateRanges(bool refresh = false) {
466 if (refresh || samplingRateRangesMapChanged) {
469 }
471 }
472
478 virtual const std::vector<std::pair<double, double>>& getHardwareRxSamplingRateRanges(bool refresh = false) {
479 if (refresh || samplingRateRangesMapChanged) {
482 }
484 }
485
491 virtual const std::vector<double>& getHardwareSupportedMasterClockRates(bool refresh = false) {
492 if (refresh || masterClockRatesChanged) {
495 }
497 }
498
504 virtual const std::vector<std::string>& getHardwareSupportedClockAndTimeSources(bool refresh = false) {
505 if (refresh || clockAndTimeSourcesChanged) {
508 }
510 }
511
518 virtual const std::vector<std::string>& getHardwareSupportedSensors(uint8_t channel, bool refresh = false) {
519 if (refresh || sensorsChanged) {
521 sensorsChanged = false;
522 }
523 return supportedSensors.at(channel);
524 }
525
531 virtual const std::vector<std::vector<std::string>>& getAllHardwareSupportedSensors(bool refresh = false) {
532 if (refresh || sensorsMapChanged) {
534 sensorsMapChanged = false;
535 }
536 return supportedSensors;
537 }
538
544 virtual const std::vector<double>& getHardwareTemperatures(bool refresh = false) {
545 if (refresh || temperaturesChanged) {
547 }
548 return temperatureReadings;
549 }
550
557 virtual bool getHardwareAGCSupport(uint8_t channel, bool refresh = false) {
558 if (refresh || agcSupportChanged) {
560 agcSupportChanged = false;
561 }
562 return agcSupport.at(channel);
563 }
564
570 virtual const std::vector<bool>& getHardwareAGCSupport(bool refresh = false) {
571 if (refresh || agcSupportMapChanged) {
573 agcSupportMapChanged = false;
574 }
575 return agcSupport;
576 }
577
584 virtual const std::shared_ptr<SDRFrontEndProfile>& getHardwareFrontEndProfile(uint8_t channel, bool refresh = false) {
585 if (refresh || frontendProfilesChanged) {
588 }
589 return frontendProfiles.at(channel);
590 }
591
597 virtual const std::vector<std::shared_ptr<SDRFrontEndProfile>>& getHardwareFrontEndProfiles(bool refresh = false) {
598 if (refresh || frontendProfilesChanged) {
601 }
602 return frontendProfiles;
603 }
604
611 virtual const SDRDaughterboardProfile& getHardwareDaughterboardProfile(size_t index, bool refresh = false) {
612 if (refresh || frontendProfilesChanged) {
615 }
616 return daughterboardProfiles.at(index);
617 }
618
624 virtual const std::vector<SDRDaughterboardProfile>& getHardwareDaughterboardProfiles(bool refresh = false) {
625 if (refresh || frontendProfilesChanged) {
628 }
630 }
631
650
656 std::ostringstream info;
657 const auto& board = getHardwareBoardInfo();
658
659 // Get maximum line width for border
660 size_t maxWidth = 100; // wider width for better readability
661
662 // Top border
663 info << "\n" << std::string(maxWidth, '*') << "\n";
664 // Print information for each board
665 const auto& boards = getAllHardwareBoards();
666 for (size_t i = 0; i < boards.size(); i++) {
667 const auto& board = boards[i];
668 info << "* Board " << i << ": " << board.name
669 << " [Serial: " << board.serial
670 << ", Model: " << board.model
671 << ", FPGA: " << board.fpgaImage
672 << ", Subtype: " << DeviceSubtype2String(board.deviceSubtype) << "]\n";
673
674 // Print connectivity information
675 const auto& conn = board.connectionProfile;
676 info << "* Connection: " << (conn.connectionType == SDRConnectionProfile::SDRConnectionType::Ethernet ?
677 "Ethernet" :
678 conn.connectionType == SDRConnectionProfile::SDRConnectionType::PCIe ? "PCIe" :
679 conn.connectionType == SDRConnectionProfile::SDRConnectionType::USB ? "USB" : "Unknown") << "\n";
680
681 if (conn.connectionType == SDRConnectionProfile::SDRConnectionType::Ethernet) {
682 for (const auto& eth : conn.ethernetInterfaces) {
683 info << "* Interface: " << eth.hostInterfaceName
684 << "=" << eth.ipAddress << " Speed=" << eth.linkSpeed / 1000 << "GbE MTU=" << eth.MTU << "\n";
685 }
686 }
687 }
688
689 // Section separator
690 info << "*" << std::string(maxWidth-2, '-') << "\n";
691 const auto& masterClockRates = getHardwareSupportedMasterClockRates();
692 info << "* Supported Master Clock Rates: [";
693 if (!masterClockRates.empty()) {
694 auto minRate = *std::min_element(masterClockRates.begin(), masterClockRates.end()) / 1e6;
695 auto maxRate = *std::max_element(masterClockRates.begin(), masterClockRates.end()) / 1e6;
696 info << minRate << " MHz, " << maxRate << " MHz";
697 }
698 info << "]\n";
699 info << "* Available Channel #: Tx (Transmit)=";
700 const auto& txChannels = getHardwareSupportedTxChannels();
701 if (txChannels.empty()) {
702 info << "N/A";
703 } else {
704 info << "[";
705 for (size_t chIndex = 0; chIndex < txChannels.size(); ++chIndex) {
706 info << (chIndex == 0 ? "" : ", ") << static_cast<int>(txChannels[chIndex]);
707 }
708 info << "]";
709 }
710 info << ", and Rx (Receive)=";
711 const auto& rxChannels = getHardwareSupportedRxChannels();
712 if (rxChannels.empty()) {
713 info << "N/A";
714 } else {
715 info << "[";
716 for (size_t chIndex = 0; chIndex < rxChannels.size(); ++chIndex) {
717 info << (chIndex == 0 ? "" : ", ") << static_cast<int>(rxChannels[chIndex]);
718 }
719 info << "]";
720 }
721 info << "\n";
722
723 // Section separator
724 info << "*" << std::string(maxWidth-2, '-') << "\n";
725
726 // Combined Channel-Frontend-Antenna Mapping section
727 info << "* <Motherboard -> Channel # (Tx/Rx) -> Tx/Rx FrontEnd -> Available Antennas> Mapping: \n";
728
729 // Process Tx channels
731 const auto& daughterboards = getHardwareDaughterboardProfiles();
732
733 // Helper function to get motherboard info for a frontend
734 auto getMboardInfo = [&](const std::string& frontendSerial) -> std::string {
735 for (const auto& db : daughterboards) {
736 for (const auto& fe : db.frontends) {
737 if (fe->serialNumber == frontendSerial) {
738 return fe->motherboardSerial + " (" +
739 DeviceSubtype2String(board.deviceSubtype) + ")";
740 }
741 }
742 }
743 return "N/A";
744 };
745
746 for (size_t i = 0; i < txChannels.size(); i++) {
747 uint8_t ch = txChannels[i];
748
749 // Start with motherboard info
750 info << "* ";
751
752 // Frontend info to get motherboard info
753 std::string frontendSerial;
754 for (const auto& profile : frontendProfiles) {
755 if (std::find(profile->txChannelNumber.begin(), profile->txChannelNumber.end(), ch) != profile->txChannelNumber.end()) {
756 frontendSerial = profile->serialNumber;
757 break;
758 }
759 }
760
761 // Print motherboard info
762 info << getMboardInfo(frontendSerial) << " -> ";
763
764 // Channel info
765 info << static_cast<int>(ch) << " (Tx) -> ";
766
767 // Frontend info
768 bool foundFrontend = false;
769 for (const auto& profile : frontendProfiles) {
770 if (std::find(profile->txChannelNumber.begin(), profile->txChannelNumber.end(), ch) != profile->txChannelNumber.end()) {
771 info << profile->serialNumber;
772 if (!profile->frontendHardwareModel.empty()) {
773 info << " (" << profile->frontendHardwareModel << ")";
774 }
775 foundFrontend = true;
776 break;
777 }
778 }
779 if (!foundFrontend) {
780 info << "N/A";
781 }
782
783 // Antenna info
784 info << " -> ";
785 const auto& supportedAnts = getHardwareSupportedTxAntennas(ch);
786 if (supportedAnts.empty()) {
787 info << "None";
788 } else {
789 for (size_t j = 0; j < supportedAnts.size(); j++) {
790 if (supportedAnts[j].empty()) {
791 info << "None";
792 } else {
793 info << supportedAnts[j];
794 }
795 if (j < supportedAnts.size() - 1) {
796 info << ", ";
797 }
798 }
799 }
800 info << "\n";
801 }
802
803 // Process Rx channels
804 for (size_t i = 0; i < rxChannels.size(); i++) {
805 uint8_t ch = rxChannels[i];
806
807 // Start with motherboard info
808 info << "* ";
809
810 // Frontend info to get motherboard info
811 std::string frontendSerial;
812 for (const auto& profile : frontendProfiles) {
813 if (std::find(profile->rxChannelNumber.begin(), profile->rxChannelNumber.end(), ch) != profile->rxChannelNumber.end()) {
814 frontendSerial = profile->serialNumber;
815 break;
816 }
817 }
818
819 // Print motherboard info
820 info << getMboardInfo(frontendSerial) << " -> ";
821
822 // Channel info
823 info << static_cast<int>(ch) << " (Rx) -> ";
824
825 // Frontend info
826 bool foundFrontend = false;
827 for (const auto& profile : frontendProfiles) {
828 if (std::find(profile->rxChannelNumber.begin(), profile->rxChannelNumber.end(), ch) != profile->rxChannelNumber.end()) {
829 info << profile->serialNumber;
830 if (!profile->frontendHardwareModel.empty()) {
831 info << " (" << profile->frontendHardwareModel << ")";
832 }
833 foundFrontend = true;
834 break;
835 }
836 }
837 if (!foundFrontend) {
838 info << "N/A";
839 }
840
841 // Antenna info
842 info << " -> ";
843 const auto& supportedAnts = getHardwareSupportedRxAntennas(ch);
844 if (supportedAnts.empty()) {
845 info << "None";
846 } else {
847 for (size_t j = 0; j < supportedAnts.size(); j++) {
848 if (supportedAnts[j].empty()) {
849 info << "None";
850 } else {
851 info << supportedAnts[j];
852 }
853 if (j < supportedAnts.size() - 1) {
854 info << ", ";
855 }
856 }
857 }
858 info << "\n";
859 }
860
861 // Section separator
862 info << "*" << std::string(maxWidth-2, '-') << "\n";
863
864 // Channel Capabilities section
865 info << "* Channel Capabilities:\n";
866
867 // Process Tx channels capabilities
868 for (size_t i = 0; i < txChannels.size(); i++) {
869 uint8_t ch = txChannels[i];
870 info << "* # " << static_cast<int>(ch) << " (Tx):\n";
871
872 // Gain range
873 info << "* Gain -> " << std::fixed << std::setprecision(1)
874 << getHardwareTxGainRange(ch).first << " to "
875 << getHardwareTxGainRange(ch).second << " dB\n";
876
877 // Frequency range
878 info << "* Carrier Frequency -> " << std::fixed << std::setprecision(1)
879 << getHardwareTxFrequencyRange(ch).first/1e6 << " to "
880 << getHardwareTxFrequencyRange(ch).second/1e6 << " MHz\n";
881
882 // Sampling rate range
883 info << "* Sampling Rate -> " << std::fixed << std::setprecision(2)
884 << getHardwareTxSamplingRateRange(ch).first/1e6 << " to "
885 << getHardwareTxSamplingRateRange(ch).second/1e6 << " MHz\n";
886 }
887
888 // Process Rx channels capabilities including AGC support
889 const auto& agcSupport = getHardwareAGCSupport();
890 for (size_t i = 0; i < rxChannels.size(); i++) {
891 uint8_t ch = rxChannels[i];
892 info << "* # " << static_cast<int>(ch) << " (Rx):\n";
893
894 // Gain range
895 info << "* Gain -> " << std::fixed << std::setprecision(1)
896 << getHardwareRxGainRange(ch).first << " to "
897 << getHardwareRxGainRange(ch).second << " dB\n";
898
899 // Frequency range
900 info << "* Carrier Frequency -> " << std::fixed << std::setprecision(1)
901 << getHardwareRxFrequencyRange(ch).first/1e6 << " to "
902 << getHardwareRxFrequencyRange(ch).second/1e6 << " MHz\n";
903
904 // Sampling rate range
905 info << "* Sampling Rate -> " << std::fixed << std::setprecision(2)
906 << getHardwareRxSamplingRateRange(ch).first/1e6 << " to "
907 << getHardwareRxSamplingRateRange(ch).second/1e6 << " MHz\n";
908
909 // AGC support
910 if (i < agcSupport.size() && agcSupport[i]) {
911 info << "* AGC -> Supported\n";
912 } else {
913 info << "* AGC -> Not Supported\n";
914 }
915 }
916
917 // Bottom border
918 info << std::string(maxWidth, '*') << "\n";
919
920 return info.str();
921 }
922
923 virtual ~SDRDeviceHardwareInformation() = default;
924
925protected:
931
937
942 }
943
949
955
961
967
972 }
973
979
984 }
985
990 }
991
997
1003
1004 // Protected member variables with detailed documentation
1006 mutable bool boardInfoChanged{true};
1008 mutable std::vector<uint8_t> supportedTxChannels{};
1009 mutable std::vector<uint8_t> supportedRxChannels{};
1010 mutable bool supportedChannelsChanged{true};
1012 mutable std::vector<SDRDaughterboardProfile> daughterboardProfiles{};
1013 mutable std::vector<std::shared_ptr<SDRFrontEndProfile>> frontendProfiles{};
1014 mutable bool frontendProfilesChanged{true};
1016 mutable std::vector<std::vector<std::string>> supportedTxAntennas{};
1017 mutable std::vector<std::vector<std::string>> supportedRxAntennas{};
1018 mutable bool supportedAntennasChanged{true};
1019 mutable bool supportedAntennasMapChanged{true};
1021 mutable std::vector<std::pair<double, double>> txGainRanges{};
1022 mutable std::vector<std::pair<double, double>> rxGainRanges{};
1023 mutable bool gainRangesChanged{true};
1024 mutable bool gainRangesMapChanged{true};
1026 mutable std::vector<std::pair<double, double>> txFrequencyRanges{};
1027 mutable std::vector<std::pair<double, double>> rxFrequencyRanges{};
1028 mutable bool frequencyRangesChanged{true};
1029 mutable bool frequencyRangesMapChanged{true};
1031 mutable std::vector<std::pair<double, double>> txSamplingRateRanges{};
1032 mutable std::vector<std::pair<double, double>> rxSamplingRateRanges{};
1033 mutable bool samplingRateRangesChanged{true};
1034 mutable bool samplingRateRangesMapChanged{true};
1036 mutable std::vector<double> supportedMasterClockRates{};
1037 mutable bool masterClockRatesChanged{true};
1039 mutable std::vector<std::string> supportedClockAndTimeSources{};
1040 mutable bool clockAndTimeSourcesChanged{true};
1042 mutable std::vector<std::vector<std::string>> supportedSensors{};
1043 mutable bool sensorsChanged{true};
1044 mutable bool sensorsMapChanged{true};
1046 mutable std::vector<double> temperatureReadings{};
1047 mutable bool temperaturesChanged{true};
1049 mutable std::vector<bool> agcSupport{};
1050 mutable bool agcSupportChanged{true};
1051 mutable bool agcSupportMapChanged{true};
1052};
1053
1054#endif //PICOSCENES_PLATFORM_SDRFRONTENDHARDWAREINFORMATION_HXX
SDRDeviceCombinationType
Enumeration for device combination types in SDR systems.
Class providing comprehensive hardware information for SDR devices.
virtual const std::vector< std::string > & getHardwareSupportedClockAndTimeSources(bool refresh=false)
Get supported clock and time sources.
std::vector< std::string > supportedClockAndTimeSources
virtual ~SDRDeviceHardwareInformation()=default
virtual void refreshHardwareInfoForConnectionProfile()
Refresh connection profile information.
std::vector< std::vector< std::string > > supportedRxAntennas
virtual const std::vector< std::vector< std::string > > & getHardwareSupportedTxAntennas(bool refresh=false)
Get all supported Tx antennas.
std::vector< std::pair< double, double > > txGainRanges
virtual void refreshAllHardwareInfo()
Refresh all hardware information.
virtual void refreshHardwareInfoForFrequencyRanges()
Refresh frequency ranges information.
std::vector< std::pair< double, double > > rxGainRanges
virtual const std::shared_ptr< SDRFrontEndProfile > & getHardwareFrontEndProfile(uint8_t channel, bool refresh=false)
Get frontend profile for a specific channel.
std::vector< double > supportedMasterClockRates
virtual const std::vector< SDRDaughterboardProfile > & getHardwareDaughterboardProfiles(bool refresh=false)
Get all daughterboard profiles.
virtual const std::vector< double > & getHardwareTemperatures(bool refresh=false)
Get temperature readings.
std::vector< std::pair< double, double > > txFrequencyRanges
virtual const std::vector< uint8_t > & getHardwareSupportedTxChannels(bool refresh=false)
Get supported Tx channels.
virtual bool getHardwareAGCSupport(uint8_t channel, bool refresh=false)
Get AGC support for a specific channel.
virtual void refreshHardwareInfoForBoards()
Refresh boards information.
std::vector< std::pair< double, double > > txSamplingRateRanges
virtual const std::pair< double, double > & getHardwareTxFrequencyRange(uint8_t channel, bool refresh=false)
Get Tx frequency range for a specific channel.
virtual const SDRMainBoardInfo & getHardwareBoardByIndex(size_t boardIndex, bool refresh=false)
Get information for a specific board.
virtual void refreshHardwareInfoForSupportedChannels()
Refresh supported channels information.
std::vector< std::shared_ptr< SDRFrontEndProfile > > frontendProfiles
virtual void refreshHardwareInfoForSupportedAntennas()
Refresh supported antennas information.
virtual const std::pair< double, double > & getHardwareRxGainRange(uint8_t channel, bool refresh=false)
Get Rx gain range for a specific channel.
std::vector< std::pair< double, double > > rxSamplingRateRanges
virtual const std::vector< std::pair< double, double > > & getHardwareRxFrequencyRanges(bool refresh=false)
Get all Rx frequency ranges.
virtual const std::vector< bool > & getHardwareAGCSupport(bool refresh=false)
Get AGC support for all channels.
virtual const std::vector< std::pair< double, double > > & getHardwareRxGainRanges(bool refresh=false)
Get all Rx gain ranges.
virtual void refreshHardwareInfoForAGCSupport()
Refresh AGC support information.
virtual void refreshHardwareInfoForTemperatures()
Refresh temperature readings.
virtual size_t getHardwareBoardCount(bool refresh=false)
Get total number of hardware boards.
virtual const std::vector< std::string > & getHardwareSupportedSensors(uint8_t channel, bool refresh=false)
Get supported sensors for a specific channel.
virtual const std::vector< std::pair< double, double > > & getHardwareTxSamplingRateRanges(bool refresh=false)
Get all Tx sampling rate ranges.
virtual void refreshHardwareInfoForClockAndTimeSources()
Refresh clock and time sources information.
virtual const std::vector< double > & getHardwareSupportedMasterClockRates(bool refresh=false)
Get supported master clock rates.
virtual std::vector< SDRMainBoardInfo > getAllHardwareBoards(bool refresh=false)
Get all hardware boards information.
virtual const std::pair< double, double > & getHardwareRxFrequencyRange(uint8_t channel, bool refresh=false)
Get Rx frequency range for a specific channel.
virtual const std::pair< double, double > & getHardwareRxSamplingRateRange(uint8_t channel, bool refresh=false)
Get Rx sampling rate range for a specific channel.
std::vector< SDRDaughterboardProfile > daughterboardProfiles
virtual const std::vector< std::vector< std::string > > & getHardwareSupportedRxAntennas(bool refresh=false)
Get all supported Rx antennas.
virtual const std::pair< double, double > & getHardwareTxGainRange(uint8_t channel, bool refresh=false)
Get Tx gain range for a specific channel.
virtual const std::vector< std::string > & getHardwareSupportedRxAntennas(uint8_t channel, bool refresh=false)
Get supported Rx antennas for a specific channel.
virtual void refreshHardwareInfoForMasterClockRates()
Refresh master clock rates information.
virtual const std::vector< std::pair< double, double > > & getHardwareTxFrequencyRanges(bool refresh=false)
Get all Tx frequency ranges.
std::vector< std::pair< double, double > > rxFrequencyRanges
virtual const std::vector< std::pair< double, double > > & getHardwareTxGainRanges(bool refresh=false)
Get all Tx gain ranges.
virtual void refreshHardwareInfoForFrontEndProfiles()
Refresh frontend profiles information.
virtual void refreshHardwareInfoForGainRanges()
Refresh gain ranges information.
virtual const std::vector< std::shared_ptr< SDRFrontEndProfile > > & getHardwareFrontEndProfiles(bool refresh=false)
Get all frontend profiles.
virtual const std::vector< std::string > & getHardwareSupportedTxAntennas(uint8_t channel, bool refresh=false)
Get supported Tx antennas for a specific channel.
virtual const std::pair< double, double > & getHardwareTxSamplingRateRange(uint8_t channel, bool refresh=false)
Get Tx sampling rate range for a specific channel.
virtual const SDRDaughterboardProfile & getHardwareDaughterboardProfile(size_t index, bool refresh=false)
Get daughterboard profile at specific index.
std::vector< std::vector< std::string > > supportedTxAntennas
virtual void refreshHardwareInfoForSamplingRateRanges()
Refresh sampling rate ranges information.
std::vector< std::vector< std::string > > supportedSensors
virtual const std::vector< uint8_t > & getHardwareSupportedRxChannels(bool refresh=false)
Get supported Rx channels.
virtual void refreshHardwareInfoForSensors()
Refresh sensors information.
virtual const std::vector< std::pair< double, double > > & getHardwareRxSamplingRateRanges(bool refresh=false)
Get all Rx sampling rate ranges.
virtual const SDRMainBoardInfo & getHardwareBoardInfo(bool refresh=false)
Get main hardware board information.
std::string hardwareInformationSheet()
Generate a formatted information sheet about the hardware.
virtual const std::vector< std::vector< std::string > > & getAllHardwareSupportedSensors(bool refresh=false)
Get all supported sensors.
Structure containing connection profile information for SDR devices.
std::vector< SDREthernetConnectionInterface > ethernetInterfaces
bool isDualConnection() const
Check if device has dual connection.
SDRConnectionType
Enumeration for SDR connection types.
SDRDeviceCombinationType combinationType
const SDREthernetConnectionInterface * getPrimaryInterface() const
Get the primary Ethernet interface.
Structure containing daughterboard profile information.
std::vector< std::shared_ptr< SDRFrontEndProfile > > frontends
Structure containing detailed information about an Ethernet connection interface.
Structure containing frontend profile information.
std::vector< uint8_t > rxChannelNumber
int getNumTx() const
Get number of Tx channels.
int getNumRx() const
Get number of Rx channels.
std::vector< uint8_t > txChannelNumber
Structure containing main board information.
std::map< std::string, std::string > inverseMap
void buildInverseMap()
Build inverse mapping of identifiers.
PicoScenesDeviceType deviceType
std::vector< SDRMainBoardInfo > otherBoards
SDRConnectionProfile connectionProfile
void merge(const SDRMainBoardInfo &other)
Merge another board's information into this one.
size_t getTotalBoardCount() const
Get total number of boards.
PicoScenesDeviceSubtype deviceSubtype