INET Framework for OMNeT++/OMNEST
inet::physicallayer::SignalPacketModel Class Reference

#include <SignalPacketModel.h>

Inheritance diagram for inet::physicallayer::SignalPacketModel:
inet::physicallayer::ISignalPacketModel inet::IPrintableObject inet::physicallayer::ReceptionPacketModel inet::physicallayer::TransmissionPacketModel

Public Member Functions

 SignalPacketModel (const Packet *packet, bps bitrate)
 
virtual std::ostream & printToStream (std::ostream &stream, int level, int evFlags=0) const override
 Prints this object to the provided output stream. More...
 
virtual const PacketgetPacket () const override
 
virtual bps getBitrate () const override
 Returns the net bitrate (datarate) of the packet. More...
 
- Public Member Functions inherited from inet::IPrintableObject
virtual ~IPrintableObject ()
 
virtual std::string printToString () const
 
virtual std::string printToString (int level, int evFlags=0) const
 
virtual std::string getInfoStringRepresentation (int evFlags=0) const
 
virtual std::string getDetailStringRepresentation (int evFlags=0) const
 
virtual std::string getDebugStringRepresentation (int evFlags=0) const
 
virtual std::string getTraceStringRepresentation (int evFlags=0) const
 
virtual std::string getCompleteStringRepresentation (int evFlags=0) const
 

Protected Attributes

const Packetpacket
 
const bps bitrate
 

Additional Inherited Members

- Public Types inherited from inet::IPrintableObject
enum  PrintLevel {
  PRINT_LEVEL_TRACE, PRINT_LEVEL_DEBUG, PRINT_LEVEL_DETAIL, PRINT_LEVEL_INFO,
  PRINT_LEVEL_COMPLETE = INT_MIN
}
 
enum  PrintFlag { PRINT_FLAG_FORMATTED = (1 << 0), PRINT_FLAG_MULTILINE = (1 << 1) }
 

Constructor & Destructor Documentation

◆ SignalPacketModel()

inet::physicallayer::SignalPacketModel::SignalPacketModel ( const Packet packet,
bps  bitrate 
)
13  :
14  packet(packet),
16 {
17 }

Member Function Documentation

◆ getBitrate()

virtual bps inet::physicallayer::SignalPacketModel::getBitrate ( ) const
inlineoverridevirtual

Returns the net bitrate (datarate) of the packet.

Implements inet::physicallayer::ISignalPacketModel.

27 { return bitrate; }

◆ getPacket()

virtual const Packet* inet::physicallayer::SignalPacketModel::getPacket ( ) const
inlineoverridevirtual

Implements inet::physicallayer::ISignalPacketModel.

26 { return packet; }

◆ printToStream()

std::ostream & inet::physicallayer::SignalPacketModel::printToStream ( std::ostream &  stream,
int  level,
int  evFlags = 0 
) const
overridevirtual

Prints this object to the provided output stream.

Reimplemented from inet::IPrintableObject.

20 {
21  stream << "SignalPacketModel";
22  if (level <= PRINT_LEVEL_TRACE)
23  stream << EV_FIELD(packet);
24  return stream;
25 }

Member Data Documentation

◆ bitrate

const bps inet::physicallayer::SignalPacketModel::bitrate
protected

◆ packet

const Packet* inet::physicallayer::SignalPacketModel::packet
protected

Referenced by printToStream().


The documentation for this class was generated from the following files:
inet::physicallayer::SignalPacketModel::packet
const Packet * packet
Definition: SignalPacketModel.h:19
EV_FIELD
#define EV_FIELD(...)
Definition: INETDefs.h:112
inet::physicallayer::SignalPacketModel::bitrate
const bps bitrate
Definition: SignalPacketModel.h:20
inet::IPrintableObject::PRINT_LEVEL_TRACE
@ PRINT_LEVEL_TRACE
Definition: IPrintableObject.h:22