#include <EthernetMacHeaderSerializer.h>
◆ EthernetFcsSerializer()
| inet::EthernetFcsSerializer::EthernetFcsSerializer |
( |
| ) |
|
|
inline |
71 : FieldsChunkSerializer() {}
◆ deserialize()
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.
93 auto ethernetFcs = makeShared<EthernetFcs>();
94 ethernetFcs->setFcs(stream.readUint32Be());
◆ serialize()
| void inet::EthernetFcsSerializer::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.
85 const auto& ethernetFcs = staticPtrCast<const EthernetFcs>(chunk);
87 throw cRuntimeError(
"Cannot serialize Ethernet FCS without a properly computed FCS");
88 stream.writeUint32Be(ethernetFcs->getFcs());
The documentation for this class was generated from the following files: