#include <Ieee80211MacHeaderSerializer.h>
◆ Ieee80211MacTrailerSerializer()
| inet::ieee80211::Ieee80211MacTrailerSerializer::Ieee80211MacTrailerSerializer |
( |
| ) |
|
|
inline |
38 : FieldsChunkSerializer() {}
◆ deserialize()
| const Ptr< Chunk > inet::ieee80211::Ieee80211MacTrailerSerializer::deserialize |
( |
MemoryInputStream & |
stream | ) |
const |
|
overrideprotectedvirtual |
Deserializes a chunk from a stream by reading the bytes at the current position of the stream.
The current stream position is updated according to the length of the returned chunk.
Implements inet::FieldsChunkSerializer.
611 auto macTrailer = makeShared<Ieee80211MacTrailer>();
612 auto fcs = stream.readUint32Be();
613 macTrailer->setFcs(fcs);
◆ serialize()
| void inet::ieee80211::Ieee80211MacTrailerSerializer::serialize |
( |
MemoryOutputStream & |
stream, |
|
|
const Ptr< const Chunk > & |
chunk |
|
) |
| const |
|
overrideprotectedvirtual |
Serializes a chunk into a stream by writing all bytes representing the chunk at the end of the stream.
Implements inet::FieldsChunkSerializer.
602 const auto& macTrailer = dynamicPtrCast<const Ieee80211MacTrailer>(chunk);
603 auto fcsMode = macTrailer->getFcsMode();
605 throw cRuntimeError(
"Cannot serialize Ieee80211FcsTrailer without properly computed FCS, try changing the value of the fcsMode parameter (e.g. in the Ieee80211Mac module)");
606 stream.writeUint32Be(macTrailer->getFcs());
The documentation for this class was generated from the following files: