Converts between Ieee80211FhssPhyHeader and binary network byte order IEEE 802.11 FHSS PHY header.
More...
#include <Ieee80211PhyHeaderSerializer.h>
Converts between Ieee80211FhssPhyHeader and binary network byte order IEEE 802.11 FHSS PHY header.
◆ Ieee80211FhssPhyHeaderSerializer()
| inet::physicallayer::Ieee80211FhssPhyHeaderSerializer::Ieee80211FhssPhyHeaderSerializer |
( |
| ) |
|
|
inline |
27 : FieldsChunkSerializer() {}
◆ deserialize()
| const Ptr< Chunk > inet::physicallayer::Ieee80211FhssPhyHeaderSerializer::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.
39 auto fhssPhyHeader = makeShared<Ieee80211FhssPhyHeader>();
40 fhssPhyHeader->setPlw(stream.readNBitsToUint64Be(12));
41 fhssPhyHeader->setPsf(stream.readUint4());
42 fhssPhyHeader->setCrc(stream.readUint16Be());
◆ serialize()
| void inet::physicallayer::Ieee80211FhssPhyHeaderSerializer::serialize |
( |
MemoryOutputStream & |
stream, |
|
|
const Ptr< const Chunk > & |
chunk |
|
) |
| const |
|
overrideprotectedvirtual |
FHSS.
Implements inet::FieldsChunkSerializer.
31 auto fhssPhyHeader = dynamicPtrCast<const Ieee80211FhssPhyHeader>(chunk);
32 stream.writeNBitsOfUint64Be(fhssPhyHeader->getPlw(), 12);
33 stream.writeUint4(fhssPhyHeader->getPsf());
34 stream.writeUint16Be(fhssPhyHeader->getCrc());
The documentation for this class was generated from the following files: