39 fEstimatedNumCommonNeighbors_{},
40 fHiddenChannelActivity_{},
41 fAverageHiddenRxPowerMilliWatts_{},
42 fAverageCommonRxPowerMilliWatts_{}
60 return lastActivityTime_;
71 for(
auto & iter : prevUtilizationTypeMap_)
74 if(iter.first & msgTypeMask)
76 result += iter.second.totalUtilizationMicroseconds_;
88 return fHiddenChannelActivity_;
96 fHiddenChannelActivity_ = fActivity;
107 for(
auto & iter : prevUtilizationTypeMap_)
110 if(iter.first & msgTypeMask)
112 result += iter.second.totalNumPackets_;
124 return fEstimatedNumCommonNeighbors_;
133 fEstimatedNumCommonNeighbors_ = num;
141 return fAverageHiddenRxPowerMilliWatts_;
149 fAverageHiddenRxPowerMilliWatts_ = fAverageHiddenRxPowerMilliWatts;
156 return fAverageCommonRxPowerMilliWatts_;
163 fAverageCommonRxPowerMilliWatts_ = dAverageCommonRxPowerMilliWatts;
172 for(
auto & iter : prevUtilizationTypeMap_)
175 if(iter.first & msgTypeMask)
177 result += iter.second.fTotalRxPowerMilliWatts_;
189 prevUtilizationTypeMap_ = currUtilizationTypeMap_;
192 for(
auto & iter : currUtilizationTypeMap_)
204 float fRxPowerMilliWatts,
207 currUtilizationTypeMap_[type].update(numPackets, bandWidthMicroseconds, fRxPowerMilliWatts);
209 lastActivityTime_ = activityTime;
217 oneHopNbrSet_ = nbrs;
225 hiddenNbrSet_ = nbrs;
233 commonNbrSet_ = nbrs;
241 return oneHopNbrSet_;
248 return commonNbrSet_;
255 return hiddenNbrSet_;
262 return oneHopNbrSet_.find(
id) != oneHopNbrSet_.end();
269 return commonNbrSet_.find(
id) != commonNbrSet_.end();
276 return hiddenNbrSet_.find(
id) != hiddenNbrSet_.end();
void setAverageCommonRxPowerMilliWatts(float dAverageCommonRxPowerMilliWatts)
const std::uint8_t MSG_TYPE_UNICAST_CTS_CTRL
size_t getNumberOfPackets(std::uint8_t msgTypeMask) const
bool isOneHopNbr(EMANE::NEMId id) const
bool isCommonNbr(EMANE::NEMId id) const
void setEstimatedNumCommonNeighbors(float num)
EMANE::TimePoint getLastActivityTime() const
float getAverageHiddenRxPowerMilliWatts() const
const NbrSet & getHiddenNeighbors() const
void setAverageHiddenRxPowerMilliWatts(float dAverageHiddenRxPowerMilliWatts)
void setHiddenChannelActivity(float fActivity)
const NbrSet & getCommonNeighbors() const
Microseconds getUtilizationMicroseconds(std::uint8_t msgTypeMask) const
void setOneHopNeighbors(const NbrSet &nbrs)
float getRxPowerMilliWatts(std::uint8_t msgTypeMask) const
void updateChannelActivity(const Microseconds &utilizationMicroseconds, std::uint8_t type, const TimePoint &activityTime, float fRxPowerMilliWatts, size_t numPackets=1)
const std::uint8_t MSG_TYPE_BROADCAST_DATA
std::chrono::microseconds Microseconds
float getHiddenChannelActivity() const
float getAverageCommonRxPowerMilliWatts() const
void setHiddenNeighbors(const NbrSet &nbrs)
void setCommonNeighbors(const NbrSet &nbrs)
std::set< EMANE::NEMId > NbrSet
const std::uint8_t MSG_TYPE_UNICAST_DATA
bool isHiddenNbr(EMANE::NEMId id) const
Clock::time_point TimePoint
const NbrSet & getOneHopNeighbors() const
float getEstimatedNumCommonNeighbors() const
const std::uint8_t MSG_TYPE_UNICAST_RTS_CTS_DATA