#include <WiseRouteProtocolPrinter.h>
|
| virtual void | print (const Ptr< const Chunk > &chunk, const Protocol *protocol, const cMessagePrinter::Options *options, Context &context) const override |
| | Prints the given chunk of protocol according to options into context. More...
|
| |
◆ print()
| void inet::WiseRouteProtocolPrinter::print |
( |
const Ptr< const Chunk > & |
chunk, |
|
|
const Protocol * |
protocol, |
|
|
const cMessagePrinter::Options * |
options, |
|
|
Context & |
context |
|
) |
| const |
|
overridevirtual |
Prints the given chunk of protocol according to options into context.
Implements inet::ProtocolPrinter.
20 if (
auto header = dynamicPtrCast<const WiseRouteHeader>(chunk)) {
21 context.sourceColumn << header->getSourceAddress();
22 context.destinationColumn << header->getDestinationAddress();
23 B payloadLength = header->getPayloadLengthField();
24 context.infoColumn <<
"WiseRoute"
25 <<
" ttl:" << header->getNbHops();
26 auto payloadProtocol = header->getProtocol();
28 context.infoColumn <<
" payload:" << payloadProtocol->getName() <<
" " << payloadLength;
30 context.infoColumn <<
" payload: protocol(" << header->getProtocolId() <<
") " << payloadLength;
33 context.infoColumn <<
"(WiseRoute) " << chunk;
The documentation for this class was generated from the following files: