INET Framework for OMNeT++/OMNEST
inet::DefaultProtocolPrinter Class Reference

#include <ProtocolPrinter.h>

Inheritance diagram for inet::DefaultProtocolPrinter:
inet::ProtocolPrinter

Public Member Functions

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...
 

Member Function Documentation

◆ print()

void inet::DefaultProtocolPrinter::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 {
21  if (protocol == nullptr)
22  context.infoColumn << "(UNKNOWN) ";
23  else
24  context.infoColumn << "(UNIMPLEMENTED " << protocol->getDescriptiveName() << ") ";
25  if (auto byteCountChunk = dynamicPtrCast<const ByteCountChunk>(chunk))
26  context.infoColumn << byteCountChunk->getChunkLength();
27  else if (auto bitCountChunk = dynamicPtrCast<const BitCountChunk>(chunk))
28  context.infoColumn << bitCountChunk->getChunkLength();
29  else
30  context.infoColumn << chunk;
31 }

The documentation for this class was generated from the following files:
protocol
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down protocol
Definition: IUdp-gates.txt:25