Converts between Ieee80211MsduSubframeHeader and binary network byte order IEEE 802.11 Msdu header.
More...
#include <Ieee80211MacHeaderSerializer.h>
Converts between Ieee80211MsduSubframeHeader and binary network byte order IEEE 802.11 Msdu header.
◆ Ieee80211MsduSubframeHeaderSerializer()
| inet::ieee80211::Ieee80211MsduSubframeHeaderSerializer::Ieee80211MsduSubframeHeaderSerializer |
( |
| ) |
|
|
inline |
51 : FieldsChunkSerializer() {}
◆ deserialize()
| const Ptr< Chunk > inet::ieee80211::Ieee80211MsduSubframeHeaderSerializer::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.
102 auto msduSubframe = makeShared<Ieee80211MsduSubframeHeader>();
103 msduSubframe->setDa(stream.readMacAddress());
104 msduSubframe->setSa(stream.readMacAddress());
105 msduSubframe->setLength(stream.readUint16Be());
◆ serialize()
| void inet::ieee80211::Ieee80211MsduSubframeHeaderSerializer::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.
94 auto msduSubframe = dynamicPtrCast<const Ieee80211MsduSubframeHeader>(chunk);
95 stream.writeMacAddress(msduSubframe->getDa());
96 stream.writeMacAddress(msduSubframe->getSa());
97 stream.writeUint16Be(msduSubframe->getLength());
The documentation for this class was generated from the following files: