34 #include "shimheader.pb.h" 37 class EMANE::Models::TimingAnalysis::ShimHeaderMessage::Implementation
42 std::uint16_t packetId):
65 const std::uint16_t source_;
66 const std::uint16_t packetId_;
73 std::uint16_t packetId) :
74 pImpl_{
new Implementation{txTime, source, packetId}}
80 EMANEMessage::SHIMHeader message;
82 if(!message.ParseFromArray(p, len))
88 static_cast<std::uint16_t>(message.source()),
89 static_cast<std::uint16_t>(message.packetid())});
100 return pImpl_->getTxTime();
105 return pImpl_->getSource();
110 return pImpl_->getPacketId();
118 EMANEMessage::SHIMHeader message;
121 set_txtimemicroseconds(std::chrono::duration_cast<Microseconds>(pImpl_->getTxTime().
122 time_since_epoch()).count());
124 message.set_source(pImpl_->getSource());
126 message.set_packetid(pImpl_->getPacketId());
128 if(!message.SerializeToString(&serialization))
133 return serialization;
std::string Serialization
SerializationException is thrown when an exception occurs during serialization or deserialization of ...
std::chrono::microseconds Microseconds
Clock::time_point TimePoint