#include <ProbabilisticProtocolPrinter.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::ProbabilisticProtocolPrinter::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 ProbabilisticBroadcastHeader>(chunk)) {
21 context.sourceColumn << header->getSourceAddress();
22 context.destinationColumn << header->getDestinationAddress();
23 B payloadLength = header->getPayloadLengthField();
24 context.infoColumn <<
"Probabilistic";
25 auto payloadProtocol = header->getProtocol();
27 context.infoColumn <<
" payload:" << payloadProtocol->getName() <<
" " << payloadLength;
29 context.infoColumn <<
" payload: protocol(" << header->getProtocolId() <<
") " << payloadLength;
32 context.infoColumn <<
"(Probabilistic) " << chunk;
The documentation for this class was generated from the following files: