69 const std::uint16_t DROP_CODE_OUT_OF_BAND = 1;
70 const std::uint16_t DROP_CODE_RX_SENSITIVITY = 2;
71 const std::uint16_t DROP_CODE_PROPAGATIONMODEL = 3;
72 const std::uint16_t DROP_CODE_GAINMANAGER_LOCATION = 4;
73 const std::uint16_t DROP_CODE_GAINMANAGER_HORIZON = 5;
74 const std::uint16_t DROP_CODE_GAINMANAGER_ANTENNAPROFILE = 6;
75 const std::uint16_t DROP_CODE_NOT_FOI = 7;
76 const std::uint16_t DROP_CODE_SPECTRUM_CLAMP = 8;
77 const std::uint16_t DROP_CODE_FADINGMANAGER_LOCATION = 9;
78 const std::uint16_t DROP_CODE_FADINGMANAGER_ALGORITHM = 10;
79 const std::uint16_t DROP_CODE_FADINGMANAGER_SELECTION = 11;
93 const std::string FADINGMANAGER_PREFIX{
"fading."};
100 pSpectrumMonitor_{pSpectrumMonitor},
102 locationManager_{
id},
106 dReceiverSensitivitydBm_{},
109 u16TxSequenceNumber_{},
110 commonLayerStatistics_{STATISTIC_TABLE_LABELS,{},
"0"},
111 eventTablePublisher_{
id},
114 maxMessagePropagation_{},
115 maxSegmentDuration_{},
116 timeSyncThreshold_{},
118 dSystemNoiseFiguredB_{},
119 fadingManager_{id, pPlatformService,FADINGMANAGER_PREFIX}{}
131 "Defines the antenna gain in dBi and is valid only when" 132 " fixedantennagainenable is enabled.");
134 configRegistrar.registerNumeric<
bool>(
"fixedantennagainenable",
137 "Defines whether fixed antenna gain is used or whether" 138 " antenna profiles are in use.");
140 configRegistrar.registerNumeric<std::uint64_t>(
"bandwidth",
143 "Defines receiver bandwidth in Hz and also serves as the" 144 " default bandwidth for OTA transmissions when not provided" 148 configRegistrar.registerNumeric<std::uint64_t>(
"frequency",
151 "Defines the default transmit center frequency in Hz when not" 152 " provided by the MAC. This value is included in the Common PHY" 153 " Header of all transmitted OTA packets.",
156 configRegistrar.registerNumeric<std::uint64_t>(
"frequencyofinterest",
159 "Defines a set of center frequencies in Hz that are monitored" 160 " for reception as either in-band or out-of-band.",
161 std::numeric_limits<std::uint64_t>::min(),
162 std::numeric_limits<std::uint64_t>::max(),
164 std::numeric_limits<std::size_t>::max());
166 configRegistrar.registerNonNumeric<std::string>(
"noisemode",
169 "Defines the noise processing mode of operation:" 170 " none, all or outofband.",
173 "^(none|all|outofband)$");
176 configRegistrar.registerNumeric<std::uint64_t>(
"noisebinsize",
179 "Defines the noise bin size in microseconds and translates" 180 " into timing accuracy associated with aligning the start and" 181 " end of reception times of multiple packets for modeling of" 182 " interference effects.",
185 configRegistrar.registerNumeric<
bool>(
"noisemaxclampenable",
188 "Defines whether segment offset, segment duration and message" 189 " propagation associated with a received packet will be clamped" 190 " to their respective maximums defined by noisemaxsegmentoffset," 191 " noisemaxsegmentduration and noisemaxmessagepropagation. When" 192 " disabled, any packet with an above max value will be dropped.");
195 configRegistrar.registerNumeric<std::uint64_t>(
"noisemaxsegmentoffset",
198 "Noise maximum segment offset in microseconds.",
201 configRegistrar.registerNumeric<std::uint64_t>(
"noisemaxmessagepropagation",
204 "Noise maximum message propagation in microseconds.",
207 configRegistrar.registerNumeric<std::uint64_t>(
"noisemaxsegmentduration",
210 "Noise maximum segment duration in microseconds.",
213 configRegistrar.registerNumeric<std::uint64_t>(
"timesyncthreshold",
216 "Defines the time sync detection threshold in microseconds." 217 " If a received OTA message is more than this threshold, the" 218 " message reception time will be used as the source transmission" 219 " time instead of the time contained in the Common PHY Header." 220 " This allows the emulator to be used across distributed nodes" 221 " without time sync.",
224 configRegistrar.registerNonNumeric<std::string>(
"propagationmodel",
227 "Defines the pathloss mode of operation:" 228 " precomputed, 2ray or freespace.",
231 "^(precomputed|2ray|freespace)$");
233 configRegistrar.registerNumeric<
double>(
"systemnoisefigure",
236 "Defines the system noise figure in dB and is used to determine the" 237 " receiver sensitivity.");
239 configRegistrar.registerNumeric<std::uint16_t>(
"subid",
242 "Defines the emulator PHY subid used by multiple NEM" 243 " definitions. Once instantiated, these NEMs may be using the" 244 " same frequency. In order to differentiate between emulator" 245 " PHY instances for different waveforms, the subid is used as" 246 " part of the unique waveform identifying tuple: PHY Layer" 247 " Registration Id, emulator PHY subid and packet center" 251 configRegistrar.registerNumeric<
double>(
"txpower",
252 EMANE::ConfigurationProperties::DEFAULT |
255 "Defines the transmit power in dBm.");
277 pTimeSyncThresholdRewrite_ =
278 statisticRegistrar.registerNumeric<std::uint64_t>(
"numTimeSyncThresholdRewrite",
289 for(
const auto & item : update)
291 if(item.first ==
"bandwidth")
293 u64BandwidthHz_ = item.second[0].asUINT64();
297 "PHYI %03hu FrameworkPHY::%s: %s = %ju Hz",
303 else if(item.first ==
"fixedantennagain")
305 optionalFixedAntennaGaindBi_.first = item.second[0].asDouble();
309 "PHYI %03hu FrameworkPHY::%s: %s = %3.2f dBi",
313 optionalFixedAntennaGaindBi_.first);
316 else if(item.first ==
"fixedantennagainenable")
318 optionalFixedAntennaGaindBi_.second = item.second[0].asBool();
322 "PHYI %03hu FrameworkPHY::%s: %s = %s",
326 optionalFixedAntennaGaindBi_.second ?
"on" :
"off");
328 else if(item.first ==
"propagationmodel")
330 std::string sPropagationModel{item.second[0].asString()};
333 if(sPropagationModel ==
"precomputed")
337 else if(sPropagationModel ==
"2ray")
348 "PHYI %03hu FrameworkPHY::%s: %s = %s",
352 sPropagationModel.c_str());
354 else if(item.first ==
"noisemode")
356 std::string sNoiseMode{item.second[0].asString()};
359 if(sNoiseMode ==
"all")
363 else if(sNoiseMode ==
"none")
374 "PHYI %03hu FrameworkPHY::%s: %s = %s",
380 else if(item.first ==
"noisebinsize")
382 noiseBinSize_ =
Microseconds{item.second[0].asUINT64()};
386 "PHYI %03hu FrameworkPHY::%s: %s = %ju usec",
390 noiseBinSize_.count());
392 else if(item.first ==
"noisemaxclampenable")
394 bNoiseMaxClamp_ = item.second[0].asBool();
398 "PHYI %03hu FrameworkPHY::%s: %s = %s",
402 bNoiseMaxClamp_ ?
"on" :
"off");
404 else if(item.first ==
"noisemaxsegmentoffset")
406 maxSegmentOffset_ =
Microseconds{item.second[0].asUINT64()};
410 "PHYI %03hu FrameworkPHY::%s: %s = %ju usec",
414 maxSegmentOffset_.count());
416 else if(item.first ==
"noisemaxmessagepropagation")
418 maxMessagePropagation_ =
Microseconds{item.second[0].asUINT64()};
422 "PHYI %03hu FrameworkPHY::%s: %s = %ju usec",
426 maxMessagePropagation_.count());
428 else if(item.first ==
"noisemaxsegmentduration")
430 maxSegmentDuration_ =
Microseconds{item.second[0].asUINT64()};
434 "PHYI %03hu FrameworkPHY::%s: %s = %ju usec",
438 maxSegmentDuration_.count());
440 else if(item.first ==
"timesyncthreshold")
442 timeSyncThreshold_ =
Microseconds{item.second[0].asUINT64()};
446 "PHYI %03hu FrameworkPHY::%s: %s = %ju usec",
450 timeSyncThreshold_.count());
452 else if(item.first ==
"systemnoisefigure")
454 dSystemNoiseFiguredB_ = item.second[0].asDouble();
458 "PHYI %03hu FrameworkPHY::%s: %s = %3.2f dB",
462 dSystemNoiseFiguredB_);
465 else if(item.first ==
"frequencyofinterest")
467 for(
const auto & any : item.second)
469 std::uint64_t u64Value{any.asUINT64()};
472 if(foi.insert(u64Value).second)
476 "PHYI %03hu FrameworkPHY::%s: %s = %ju Hz",
484 throw makeException<ConfigureException>(
"FrameworkPHY duplicate frequency of interest found: %ju",
492 else if(item.first ==
"txpower")
494 dTxPowerdBm_ = item.second[0].asDouble();
498 "PHYI %03hu FrameworkPHY::%s: %s = %3.2f dBm",
505 else if(item.first ==
"frequency")
507 u64TxFrequencyHz_ = item.second[0].asUINT64();
511 "PHYI %03hu FrameworkPHY::%s: %s = %ju Hz",
517 else if(item.first ==
"subid")
519 u16SubId_ = item.second[0].asUINT16();
523 "PHYI %03hu FrameworkPHY::%s: %s = %hu",
531 if(!item.first.compare(0,FADINGMANAGER_PREFIX.size(),FADINGMANAGER_PREFIX))
533 fadingManagerConfiguration.push_back(item);
537 throw makeException<ConfigureException>(
"FrameworkPHY: Unexpected configuration item %s",
543 fadingManager_.
configure(fadingManagerConfiguration);
545 dReceiverSensitivitydBm_ =
THERMAL_NOISE_DB + dSystemNoiseFiguredB_ + 10.0 * log10(u64BandwidthHz_);
547 if((maxSegmentOffset_ + maxMessagePropagation_ + 2 * maxSegmentDuration_) % noiseBinSize_ !=
548 Microseconds::zero())
550 throw makeException<ConfigureException>(
"noisemaxsegmentoffset + noisemaxmessagepropagation" 551 " + 2 * noisemaxsegmentduration not evenly divisible by the" 561 maxMessagePropagation_,
571 "PHYI %03hu FrameworkPHY::%s",
580 "PHYI %03hu FrameworkPHY::%s",
589 "PHYI %03hu FrameworkPHY::%s",
599 for(
const auto & item : update)
601 if(item.first ==
"fixedantennagain")
603 optionalFixedAntennaGaindBi_.first = item.second[0].asDouble();
607 "PHYI %03hu FrameworkPHY::%s: %s = %3.2f dBi",
611 optionalFixedAntennaGaindBi_.first);
614 else if(item.first ==
"txpower")
616 dTxPowerdBm_ = item.second[0].asDouble();
620 "PHYI %03hu FrameworkPHY::%s: %s = %3.2f dBm",
628 if(!item.first.compare(0,FADINGMANAGER_PREFIX.size(),FADINGMANAGER_PREFIX))
630 fadingManagerConfiguration.push_back(item);
635 fadingManager_.
modify(fadingManagerConfiguration);
642 "PHYI %03hu FrameworkPHY::%s",
646 for(
const auto & pMessage : msgs)
648 switch(pMessage->getId())
652 const auto pAntennaProfileControlMessage =
657 pAntennaProfileControlMessage->getAntennaProfileId(),
658 pAntennaProfileControlMessage->getAntennaAzimuthDegrees(),
659 pAntennaProfileControlMessage->getAntennaElevationDegrees()}};
661 gainManager_.
update(profiles);
670 const auto pFrequencyOfInterestControlMessage =
676 "PHYI %03hu FrameworkPHY::%s Frequency of Interest Control Message",
680 u64BandwidthHz_ = pFrequencyOfInterestControlMessage->getBandwidthHz();
682 dReceiverSensitivitydBm_ =
685 pSpectrumMonitor_->
initialize(pFrequencyOfInterestControlMessage->getFrequencySet(),
691 maxMessagePropagation_,
703 "PHYI %03hu FrameworkPHY::%s, unexpected contoll message, ignore",
713 auto now = Clock::now();
719 "PHYI %03hu FrameworkPHY::%s src %hu, dst %hu",
723 pktInfo.getDestination());
728 std::uint64_t u64BandwidthHz{u64BandwidthHz_};
740 for(
const auto & pMessage : msgs)
742 switch(pMessage->getId())
746 const auto pTransmitterControlMessage =
753 "PHYI %03hu FrameworkPHY::%s Transmitter Control Message",
757 transmitters = pTransmitterControlMessage->getTransmitters();
760 std::for_each(transmitters.begin(),
762 [&otaTransmitters](
const Transmitter & transmitter)
764 otaTransmitters.insert(transmitter.getNEMId());
772 const auto pFrequencyControlMessage =
776 frequencySegments.clear();
778 for(
const auto & segment : pFrequencyControlMessage->getFrequencySegments())
782 if(segment.getFrequencyHz() == 0)
784 if(segment.getPowerdBm().second)
786 frequencySegments.push_back({u64TxFrequencyHz_,
787 segment.getPowerdBm().first,
788 segment.getDuration(),
789 segment.getOffset()});
793 frequencySegments.push_back({u64TxFrequencyHz_,
794 segment.getDuration(),
795 segment.getOffset()});
800 frequencySegments.push_back(segment);
806 if(pFrequencyControlMessage->getBandwidthHz() != 0)
814 "PHYI %03hu FrameworkPHY::%s Frequency Control Message",
823 const auto pAntennaProfileControlMessage =
828 "PHYI %03hu FrameworkPHY::%s Antenna Profile Control Message " 829 "profile %hu azimuth %lf elevation %lf",
832 pAntennaProfileControlMessage->getAntennaProfileId(),
833 pAntennaProfileControlMessage->getAntennaAzimuthDegrees(),
834 pAntennaProfileControlMessage->getAntennaElevationDegrees());
838 pAntennaProfileControlMessage->getAntennaProfileId(),
839 pAntennaProfileControlMessage->getAntennaAzimuthDegrees(),
840 pAntennaProfileControlMessage->getAntennaElevationDegrees()}};
842 gainManager_.
update(profiles);
852 const auto pTimestampControlMessage =
860 "PHYI %03hu FrameworkPHY::%s Time Stamp Control Message " 864 std::chrono::duration_cast<
DoubleSeconds>(txTimeStamp.time_since_epoch()).count());
871 const auto pFrequencyOfInterestControlMessage =
877 "PHYI %03hu FrameworkPHY::%s Frequency of Interest Control Message",
881 u64BandwidthHz_ = pFrequencyOfInterestControlMessage->getBandwidthHz();
883 dReceiverSensitivitydBm_ =
886 pSpectrumMonitor_->
initialize(pFrequencyOfInterestControlMessage->getFrequencySet(),
892 maxMessagePropagation_,
906 if(std::find_if(transmitters.begin(),
910 return transmitter.getNEMId() == this->
id_;
911 }) == transmitters.end())
913 transmitters.push_back({
id_,dTxPowerdBm_});
919 u16TxSequenceNumber_++,
924 optionalFixedAntennaGaindBi_};
929 "PHYI %03hu FrameworkPHY::%s Common PHY Header",
935 if(!otaTransmitters.empty())
937 downstreamControlMessages.
942 std::chrono::duration_cast<Microseconds>(Clock::now() - now));
964 "PHYI %03hu FrameworkPHY::%s Common PHY Header",
973 u16SubId_ == commonPHYHeader.
getSubId()};
983 std::vector<double> rxPowerSegments(frequencySegments.size(),0);
987 bool bHavePropagationDelay{};
989 std::vector<NEMId> transmitters{};
993 transmitters.push_back(transmitter.getNEMId());
996 auto locationPairInfoRet = locationManager_.
getLocationInfo(transmitter.getNEMId());
999 auto pathlossInfo = (*pPropagationModelAlgorithm_)(transmitter.getNEMId(),
1000 locationPairInfoRet.first,
1004 if(pathlossInfo.second)
1009 auto gainInfodBi = gainManager_.
determineGain(transmitter.getNEMId(),
1010 locationPairInfoRet.first,
1011 optionalFixedAntennaGaindBi_,
1017 using ReceivePowerPubisherUpdate = std::tuple<NEMId,std::uint64_t,double>;
1021 std::set<ReceivePowerPubisherUpdate> receivePowerTableUpdate{};
1025 FrequencySegments::const_iterator freqIter{frequencySegments.begin()};
1030 for(
const auto & dPathlossdB : pathlossInfo.first)
1032 auto optionalSegmentPowerdBm = freqIter->getPowerdBm();
1034 double powerdBm{(optionalSegmentPowerdBm.second ?
1035 optionalSegmentPowerdBm.first :
1036 transmitter.getPowerdBm()) +
1040 auto powerdBmInfo = fadingManager_.
calculate(transmitter.getNEMId(),
1042 locationPairInfoRet);
1046 receivePowerTableUpdate.insert(ReceivePowerPubisherUpdate{transmitter.getNEMId(),
1047 freqIter->getFrequencyHz(),
1048 powerdBmInfo.first});
1059 std::uint16_t u16Code{};
1061 const char * pzReason{};
1063 switch(powerdBmInfo.second)
1066 pzReason =
"fading missing location info";
1067 u16Code = DROP_CODE_FADINGMANAGER_LOCATION;
1070 pzReason =
"fading algorithm error/missing info";
1071 u16Code = DROP_CODE_FADINGMANAGER_ALGORITHM;
1074 pzReason =
"fading algorithm selection unkown";
1075 u16Code = DROP_CODE_FADINGMANAGER_SELECTION;
1078 pzReason =
"unknown";
1083 std::chrono::duration_cast<Microseconds>(Clock::now() - now),
1088 "PHYI %03hu FrameworkPHY::%s transmitter %hu," 1089 " src %hu, dst %hu, drop %s",
1092 transmitter.getNEMId(),
1093 pktInfo.getSource(),
1094 pktInfo.getDestination(),
1101 for(
const auto & entry : receivePowerTableUpdate)
1103 receivePowerTablePublisher_.
update(std::get<0>(entry),
1114 if(locationPairInfoRet.second && !bHavePropagationDelay)
1116 if(locationPairInfoRet.first.getDistanceMeters() > 0.0)
1119 Microseconds{
static_cast<std::uint64_t
>(std::round(locationPairInfoRet.first.getDistanceMeters() /
SOL_MPS * 1000000))};
1122 bHavePropagationDelay =
true;
1130 std::uint16_t u16Code{};
1132 const char * pzReason{};
1134 switch(gainInfodBi.second)
1137 pzReason =
"missing location info";
1138 u16Code = DROP_CODE_GAINMANAGER_LOCATION;
1141 pzReason =
"missing profile info";
1142 u16Code = DROP_CODE_GAINMANAGER_ANTENNAPROFILE;
1145 pzReason =
"below the horizon";
1146 u16Code = DROP_CODE_GAINMANAGER_HORIZON;
1149 pzReason =
"unknown";
1154 std::chrono::duration_cast<Microseconds>(Clock::now() - now),
1159 "PHYI %03hu FrameworkPHY::%s transmitter %hu, src %hu, dst %hu, drop %s",
1162 transmitter.getNEMId(),
1163 pktInfo.getSource(),
1164 pktInfo.getDestination(),
1177 std::chrono::duration_cast<Microseconds>(Clock::now() - now),
1178 DROP_CODE_PROPAGATIONMODEL);
1182 "PHYI %03hu FrameworkPHY::%s transmitter %hu, src %hu, dst %hu," 1183 " drop propagation model missing info",
1186 transmitter.getNEMId(),
1187 pktInfo.getSource(),
1188 pktInfo.getDestination());
1204 auto spectrumInfo = pSpectrumMonitor_->
update(now,
1217 bool bTreatAsInBand{};
1222 resultingFrequencySegments,
1223 bTreatAsInBand) = spectrumInfo;
1227 if(!resultingFrequencySegments.empty())
1230 std::chrono::duration_cast<Microseconds>(Clock::now() - now));
1235 "PHYI %03hu FrameworkPHY::%s src %hu, dst %hu," 1239 pktInfo.getSource(),
1240 pktInfo.getDestination());
1244 ++*pTimeSyncThresholdRewrite_;
1251 resultingFrequencySegments),
1255 dReceiverSensitivitydBm_)});
1261 std::chrono::duration_cast<Microseconds>(Clock::now() - now),
1262 DROP_CODE_RX_SENSITIVITY);
1266 "PHYI %03hu FrameworkPHY::%s src %hu, dst %hu," 1267 " drop below receiver sensitivity",
1270 pktInfo.getSource(),
1271 pktInfo.getDestination());
1281 std::chrono::duration_cast<Microseconds>(Clock::now() - now),
1286 "PHYI %03hu FrameworkPHY::%s src %hu, dst %hu," 1287 " drop one or more frequencies not in frequency of interest list",
1290 pktInfo.getSource(),
1291 pktInfo.getDestination());
1297 std::chrono::duration_cast<Microseconds>(Clock::now() - now),
1298 DROP_CODE_OUT_OF_BAND);
1302 "PHYI %03hu FrameworkPHY::%s src %hu, dst %hu," 1303 " drop out of band",
1306 pktInfo.getSource(),
1307 pktInfo.getDestination());
1315 std::chrono::duration_cast<Microseconds>(Clock::now() - now),
1316 DROP_CODE_SPECTRUM_CLAMP);
1320 "PHYI %03hu FrameworkPHY::%s src %hu, dst %hu," 1321 " drop spectrum out of bound %s",
1324 pktInfo.getSource(),
1325 pktInfo.getDestination(),
1333 std::chrono::duration_cast<Microseconds>(Clock::now() - now),
1334 DROP_CODE_OUT_OF_BAND);
1338 "PHYI %03hu FrameworkPHY::%s src %hu, dst %hu," 1339 " drop out of band",
1342 pktInfo.getSource(),
1343 pktInfo.getDestination());
1353 "PHYI %03hu FrameworkPHY::%s event id: %hu",
1363 gainManager_.
update(antennaProfile.getAntennaProfiles());
1364 eventTablePublisher_.
update(antennaProfile.getAntennaProfiles());
1369 "PHYI %03hu FrameworkPHY::%s antenna profile event: ",
1379 fadingManager_.
update(fadingSelection.getFadingSelections());
1380 eventTablePublisher_.
update(fadingSelection.getFadingSelections());
1385 "PHYI %03hu FrameworkPHY::%s fading selection event: ",
1394 locationManager_.
update(locationEvent.getLocations());
1395 eventTablePublisher_.
update(locationEvent.getLocations());
1400 "PHYI %03hu FrameworkPHY::%s location event: ",
1409 pPropagationModelAlgorithm_->update(pathlossEvent.getPathlosses());
1410 eventTablePublisher_.
update(pathlossEvent.getPathlosses());
1415 "PHYI %03hu FrameworkPHY::%s pathloss event: ",
std::set< NEMId > OTATransmitters
std::string Serialization
A Packet class that allows upstream processing to strip layer headers as the packet travels up the st...
const PacketInfo & getPacketInfo() const
void attachEvent(NEMId nemId, const Event &event)
The Registrar interface provides access to all of the emulator registrars.
The Transmitter Control Message is sent to the emulator physical layer to specify the NEM Id of the s...
void configure(const ConfigurationUpdate &update) override
virtual ConfigurationRegistrar & configurationRegistrar()=0
An antenna profile event is used to set the antenna profile selection and pointing information for on...
std::pair< double, GainStatus > determineGain(NEMId transmitterId, const LocationInfo &locationPairInfo, const std::pair< double, bool > &optionalRxFixedGaindBi, const std::pair< double, bool > &optionalTxFixedGaindBi) const
static OTATransmitterControlMessage * create(const Serialization &serialization)
#define LOGGER_VERBOSE_LOGGING(logger, level, fmt, args...)
Holds transmitter id and power level.
void update(const Events::Locations &locations)
virtual StatisticRegistrar & statisticRegistrar()=0
A pathloss event is used to set the pathloss from one or more transmitting NEMs to a receiving NEM...
void processOutbound(const UpstreamPacket &pkt, Microseconds delay, size_t dropCode={})
Interface used to create a PHY layer plugin implementation.
std::list< const ControlMessage * > ControlMessages
void processUpstreamPacket(const CommonPHYHeader &hdr, UpstreamPacket &pkt, const ControlMessages &msgs) override
An fading selection event is used to set the fading model for one or more NEMs.
void update(NEMId nemId, std::uint64_t u64Frequency, double dReceivePower, const TimePoint &rxTime)
Antenna Profile Control Message is sent to the emulator physical layer to update antenna profile sele...
SpectrumServiceException is thrown when an exception occurs during spectrum service processing...
void initialize(Registrar ®istrar)
void processEvent(const EventId &eventId, const Serialization &serialization) override
void update(const Events::Locations &locations)
void sendDownstreamPacket(const CommonPHYHeader &hdr, DownstreamPacket &pkt, const ControlMessages &msgs=DownstreamTransport::empty)
A location event is usd to set the position, orientation and velocity information for one or more NEM...
virtual EventRegistrar & eventRegistrar()=0
The Frequency of Interest Control Message is sent to the emulator physical layer to specify receive f...
void registerStatistics(StatisticRegistrar &statisticRegistrar)
Store source, destination, creation time and priority information for a packet.
static FrequencyControlMessage * create(std::uint64_t u64BandwidthHz, const FrequencySegments &frequencySegments)
std::uint64_t getBandwidthHz() const
void processConfiguration(const ConfigurationUpdate &update) override
void initialize(Registrar ®istrar) override
std::set< std::uint64_t > FrequencySet
const char * what() const
The Frequency Control Message is sent to the emulator physical layer to specify the frequency segment...
TimePoint getTimeStamp() const
#define LOGGER_VERBOSE_LOGGING_FN_VARGS(logger, level, fn, fmt, args...)
std::vector< std::string > StatisticTableLabels
const PacketInfo & getPacketInfo() const
void update(const Events::FadingSelections &fadingSelections)
void registerStatistics(StatisticRegistrar ®istrar)
Specialized packet the allows downstream processing to add layer specific headers as the packet trave...
std::tuple< TimePoint, Microseconds, Microseconds, FrequencySegments, bool > update(const TimePoint &now, const TimePoint &txTime, const Microseconds &propagationDelay, const FrequencySegments &segments, std::uint64_t u64SegmentBandwidthHz, const std::vector< double > &rxPowersMilliWatt, bool bInBand, const std::vector< NEMId > &transmitters)
void processDownstreamPacket(DownstreamPacket &pkt, const ControlMessages &msgs) override
const RegistrationId REGISTERED_EMANE_PHY_FRAMEWORK
std::chrono::microseconds Microseconds
std::chrono::duration< double > DoubleSeconds
std::pair< LocationInfo, bool > getLocationInfo(NEMId remoteNEMId)
void initialize(const FrequencySet &foi, std::uint64_t u64BandwidthHz, double dReceiverSensitivityMilliWatt, NoiseMode mode, const Microseconds &binSize, const Microseconds &maxOffset, const Microseconds &maxPropagation, const Microseconds &maxDuration, const Microseconds &timeSyncThreshold, bool bMaxClamp)
void processUpstreamPacket_i(const TimePoint &now, const CommonPHYHeader &hdr, UpstreamPacket &pkt, const ControlMessages &msgs)
void processDownstreamControl(const ControlMessages &msgs) override
void configure(const ConfigurationUpdate &update)
std::pair< double, FadingStatus > calculate(NEMId txNEMId, double dPowerdBm, const std::pair< LocationInfo, bool > &location)
std::list< FrequencySegment > FrequencySegments
std::vector< ConfigurationNameAnyValues > ConfigurationUpdate
void update(const Events::AntennaProfiles &antennaProfiles)
double DB_TO_MILLIWATT(double ddB)
static ReceivePropertiesControlMessage * create(const TimePoint &txTime, const Microseconds &propagation, const Microseconds &span, double dReceiverSensitivitydBm)
virtual void registerEvent(EventId eventId)=0
Time Stamp Control Message is sent to the emulator physical layer to specify the time that should be ...
void registerNumeric(const std::string &sName, const ConfigurationProperties &properties=ConfigurationProperties::NONE, const std::initializer_list< T > &values={}, const std::string &sUsage="", T minValue=std::numeric_limits< T >::lowest(), T maxValue=std::numeric_limits< T >::max(), std::size_t minOccurs=1, std::size_t maxOccurs=1, const std::string &sRegexPattern={})
Clock::time_point TimePoint
std::list< Transmitter > Transmitters
const double THERMAL_NOISE_DB
void sendUpstreamPacket(UpstreamPacket &pkt, const ControlMessages &msgs=empty)
#define LOGGER_STANDARD_LOGGING(logger, level, fmt, args...)
#define LOGGER_STANDARD_LOGGING_FN_VARGS(logger, level, fn, fmt, args...)
FrameworkPHY(NEMId id, PlatformServiceProvider *pPlatformService, SpectrumMonitor *pSpectrumMonitor)
virtual void sendEvent(NEMId nemId, const Event &event)=0
void modify(const ConfigurationUpdate &update)
std::list< AntennaProfile > AntennaProfiles
void processInbound(const UpstreamPacket &pkt)
void registerStatistics(StatisticRegistrar ®istrar)