#include <EchoProtocolPrinter.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::EchoProtocolPrinter::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 EchoPacket>(chunk)) {
21 context.infoColumn <<
"Echo";
22 switch (header->getType()) {
24 context.infoColumn <<
" request";
27 context.infoColumn <<
" reply";
30 context.infoColumn <<
" type=" << header->getType();
33 context.infoColumn <<
" id:" << header->getIdentifier() <<
" seq:" << header->getSeqNumber();
36 context.infoColumn <<
"(Echo) " << chunk;
The documentation for this class was generated from the following files: