35 #include "otatransmitter.pb.h" 37 class EMANE::Controls::OTATransmitterControlMessage::Implementation
43 otaTransmitters_{otaTransmitters}{}
47 return otaTransmitters_;
54 EMANE::Controls::OTATransmitterControlMessage::
55 OTATransmitterControlMessage(
const OTATransmitterControlMessage & msg):
57 pImpl_{
new Implementation{*msg.pImpl_}}
62 EMANE::Controls::OTATransmitterControlMessage::
65 pImpl_{
new Implementation{otaTransmitters}}{}
70 return pImpl_->getOTATransmitters();
78 EMANEMessage::OTATransmitterControlMessage msg;
80 msg.ParseFromString(serialization);
82 if(!msg.ParseFromString(serialization))
87 for(
int i = 0; i < msg.nemid_size(); ++i)
89 otaTransmitters.insert(msg.nemid(i));
106 EMANEMessage::OTATransmitterControlMessage msg;
108 const OTATransmitters & otaTransmitters = pImpl_->getOTATransmitters();
110 OTATransmitters::const_iterator iter = otaTransmitters.begin();
112 for(; iter != otaTransmitters.end(); ++iter)
114 msg.add_nemid(*iter);
117 if(!msg.SerializeToString(&serialization))
122 return serialization;
std::set< NEMId > OTATransmitters
std::string Serialization
std::string serialize() const override
static OTATransmitterControlMessage * create(const Serialization &serialization)
SerializationException is thrown when an exception occurs during serialization or deserialization of ...
OTATransmitterControlMessage * clone() const override
const OTATransmitters & getOTATransmitters() const
The OTA Transmitter Control Message is by the emulator physical layer to specify the NEM Id of the so...
ControlMessage interface is the base for all control messages.
~OTATransmitterControlMessage()
ControlMessage(ControlMessageId id)