43 {
"NEM",
"Latitude",
"Longitude",
"Altitude",
"Pitch",
"Roll",
"Yaw",
"Azimuth",
"Elevation",
"Magnitude"},
45 "Shows the location event information received");
49 {
"NEM",
"Forward Pathloss",
"Reverse Pathloss"},
51 "Shows the precomputed pathloss information received");
53 pAntennaProfileTable_ =
55 {
"NEM",
"Antenna Profile",
"Antenna Azimuth",
"Antenna Elevation"},
57 "Shows the antenna profile information received");
59 pFadingSelectionTable_ =
63 "Shows the selected fading model information received");
70 for(
const auto & location : locations)
72 auto targetNEM = location.getNEMId();
74 if(locationNEMSet_.find(targetNEM) == locationNEMSet_.end())
76 auto position = location.getPosition();
78 auto optionalOrientation = location.getOrientation();
80 auto optionalVelocity = location.getVelocity();
82 pLocationTable_->
addRow(targetNEM,{
Any{targetNEM},
83 Any{position.getLatitudeDegrees()},
84 Any{position.getLongitudeDegrees()},
85 Any{position.getAltitudeMeters()},
86 Any{optionalOrientation.first.getPitchDegrees()},
87 Any{optionalOrientation.first.getRollDegrees()},
88 Any{optionalOrientation.first.getYawDegrees()},
89 Any{optionalVelocity.first.getAzimuthDegrees()},
90 Any{optionalVelocity.first.getElevationDegrees()},
91 Any{optionalVelocity.first.getMagnitudeMetersPerSecond()}});
93 locationNEMSet_.insert(targetNEM);
97 auto position = location.getPosition();
99 auto optionalOrientation = location.getOrientation();
101 auto optionalVelocity = location.getVelocity();
103 pLocationTable_->
setCell(targetNEM,1,
Any{position.getLatitudeDegrees()});
104 pLocationTable_->
setCell(targetNEM,2,
Any{position.getLongitudeDegrees()});
105 pLocationTable_->
setCell(targetNEM,3,
Any{position.getAltitudeMeters()});
107 if(optionalOrientation.second)
109 pLocationTable_->
setCell(targetNEM,4,
Any{optionalOrientation.first.getPitchDegrees()});
110 pLocationTable_->
setCell(targetNEM,5,
Any{optionalOrientation.first.getRollDegrees()});
111 pLocationTable_->
setCell(targetNEM,6,
Any{optionalOrientation.first.getYawDegrees()});
114 if(optionalVelocity.second)
116 pLocationTable_->
setCell(targetNEM,7,
Any{optionalVelocity.first.getAzimuthDegrees()});
117 pLocationTable_->
setCell(targetNEM,8,
Any{optionalVelocity.first.getElevationDegrees()});
118 pLocationTable_->
setCell(targetNEM,9,
Any{optionalVelocity.first.getMagnitudeMetersPerSecond()});
127 for(
const auto & pathloss : pathlosses)
129 auto targetNEM = pathloss.getNEMId();
131 std::vector<Any> row{
Any{targetNEM},
132 Any{pathloss.getForwardPathlossdB()},
133 Any{pathloss.getReversePathlossdB()}};
135 if(pathlossNEMSet_.find(targetNEM) == pathlossNEMSet_.end())
137 pPathlossTable_->
addRow(targetNEM,row);
139 pathlossNEMSet_.insert(targetNEM);
143 pPathlossTable_->
setRow(targetNEM,row);
151 for(
const auto & profile : profiles)
153 auto targetNEM = profile.getNEMId();
155 std::vector<Any> row{
Any{targetNEM},
156 Any{profile.getAntennaProfileId()},
157 Any{profile.getAntennaAzimuthDegrees()},
158 Any{profile.getAntennaElevationDegrees()}};
160 if(antennaProfileNEMSet_.find(targetNEM) == antennaProfileNEMSet_.end())
162 pAntennaProfileTable_->
addRow(targetNEM,row);
164 antennaProfileNEMSet_.insert(targetNEM);
168 pAntennaProfileTable_->
setRow(targetNEM,row);
175 for(
const auto & selection : selections)
177 auto targetNEM = selection.getNEMId();
179 std::string sModel{
"unknown"};
181 switch(selection.getFadingModel())
191 std::vector<Any> row{
Any{targetNEM},
194 if(fadingSelectionNEMSet_.find(targetNEM) == fadingSelectionNEMSet_.end())
196 pFadingSelectionTable_->
addRow(targetNEM,row);
198 fadingSelectionNEMSet_.insert(targetNEM);
202 pFadingSelectionTable_->
setRow(targetNEM,row);
void setCell(const Key &key, std::size_t columnIndex, const Any &any)
void update(const Events::Locations &locations)
void setRow(const Key &key, const std::vector< Any > &anys)
std::list< Pathloss > Pathlosses
The StatisticRegistrar allows NEM layers to register statistics and statistic tables. Statistics and Statistic tables are owned by the emulator framework and a borrowed reference is returned to the registering NEM layer.
void registerStatistics(StatisticRegistrar ®istrar)
StatisticTable< Key, Compare, scolumn > * registerTable(const std::string &sName, const StatisticTableLabels &labels, const StatisticProperties &properties=StatisticProperties::NONE, const std::string &sDescription="")
std::list< Location > Locations
void addRow(const Key &key, const std::vector< Any > &anys={})
std::list< FadingSelection > FadingSelections
EventTablePublisher(NEMId nemId)
The Any class can contain an instance of one of any type in its support type set. ...
std::list< AntennaProfile > AntennaProfiles