MCPcopy Create free account
hub / github.com/BatchDrake/SigDigger / deserializeFATs

Method deserializeFATs

Components/MainSpectrum.cpp:744–772  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

742}
743
744void
745MainSpectrum::deserializeFATs(void)
746{
747 Suscan::Singleton *sus = Suscan::Singleton::get_instance();
748 Suscan::Object bands;
749 unsigned int i, count, ndx = 0;
750
751 for (auto p = sus->getFirstFAT();
752 p != sus->getLastFAT();
753 p++) {
754 this->FATs.resize(ndx + 1);
755 this->FATs[ndx] = new FrequencyAllocationTable(p->getField("name").value());
756 bands = p->getField("bands");
757
758 SU_ATTEMPT(bands.getType() == SUSCAN_OBJECT_TYPE_SET);
759
760 count = bands.length();
761
762 for (i = 0; i < count; ++i) {
763 try {
764 this->FATs[ndx]->pushBand(deserializeFrequencyBand(bands[i]));
765 } catch (Suscan::Exception &) {
766 }
767 }
768
769 emit newBandPlan(QString::fromStdString(this->FATs[ndx]->getName()));
770 ++ndx;
771 }
772}
773
774////////////////////////////////// Getters ////////////////////////////////////
775bool

Callers 1

postLoadInitMethod · 0.45

Calls 7

getFirstFATMethod · 0.80
getLastFATMethod · 0.80
valueMethod · 0.80
getFieldMethod · 0.80
lengthMethod · 0.80
getTypeMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected