Converts between EthernetPhyHeaderBase and binary (network byte order) Ethernet PHY header.
More...
#include <EthernetPhyHeaderSerializer.h>
Converts between EthernetPhyHeaderBase and binary (network byte order) Ethernet PHY header.
◆ EthernetPhyHeaderBaseSerializer()
| inet::physicallayer::EthernetPhyHeaderBaseSerializer::EthernetPhyHeaderBaseSerializer |
( |
| ) |
|
|
inline |
27 : FieldsChunkSerializer() {}
◆ deserialize()
| const Ptr< Chunk > inet::physicallayer::EthernetPhyHeaderBaseSerializer::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.
31 EthernetPhyHeaderSerializer serializer;
32 return serializer.deserialize(stream);
35 EthernetFragmentPhyHeaderSerializer serializer;
36 return serializer.deserialize(stream);
◆ serialize()
| void inet::physicallayer::EthernetPhyHeaderBaseSerializer::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.
24 throw cRuntimeError(
"Invalid operation");
The documentation for this class was generated from the following files: