35 #include "antennaprofileevent.pb.h" 37 class EMANE::Events::AntennaProfileEvent::Implementation
57 if(!msg.ParseFromString(serialization))
64 for(
const auto & profile : msg.profiles())
66 profiles.push_back({
static_cast<EMANE::NEMId>(profile.nemid()),
67 static_cast<EMANE::AntennaProfileId>(profile.profileid()),
68 profile.antennaazimuthdegrees(),
69 profile.antennaelevationdegrees()});
72 pImpl_.reset(
new Implementation{profiles});
77 pImpl_{
new Implementation{profiles}}{}
81 pImpl_{
new Implementation{rhs.getAntennaProfiles()}}{}
91 pImpl_{
new Implementation{{}}}
93 rval.pImpl_.swap(pImpl_);
98 rval.pImpl_.swap(pImpl_);
106 return pImpl_->getAntennaProfiles();
115 for(
auto & profile : pImpl_->getAntennaProfiles())
117 auto pAntennaProfileMessage = msg.add_profiles();
119 pAntennaProfileMessage->set_nemid(profile.getNEMId());
121 pAntennaProfileMessage->set_profileid(profile.getAntennaProfileId());
123 pAntennaProfileMessage->set_antennaazimuthdegrees(profile.getAntennaAzimuthDegrees());
125 pAntennaProfileMessage->set_antennaelevationdegrees(profile.getAntennaElevationDegrees());
128 if(!msg.SerializeToString(&serialization))
133 return serialization;
std::string Serialization
An antenna profile event is used to set the antenna profile selection and pointing information for on...
SerializationException is thrown when an exception occurs during serialization or deserialization of ...
Event interface is the base for all events.
AntennaProfileEvent(const Serialization &serialization)
const AntennaProfiles & getAntennaProfiles() const
Serialization serialize() const override
std::list< AntennaProfile > AntennaProfiles
AntennaProfileEvent & operator=(const AntennaProfileEvent &rhs)