INET Framework for OMNeT++/OMNEST
inet::rtp::RTCPPacket_Base Class Referenceabstract

Class generated from inet/transportlayer/rtp/RTCPPacket1.msg:34 by nedtool. More...

#include <RTCPPacket1_m.h>

Inheritance diagram for inet::rtp::RTCPPacket_Base:
inet::rtp::RTCPPacket inet::rtp::RTCPByePacket_Base inet::rtp::RTCPReceiverReportPacket_Base inet::rtp::RTCPSDESPacket_Base inet::rtp::RTCPByePacket inet::rtp::RTCPReceiverReportPacket inet::rtp::RTCPSDESPacket inet::rtp::RTCPSenderReportPacket_Base inet::rtp::RTCPSenderReportPacket

Public Member Functions

virtual ~RTCPPacket_Base ()
 
virtual RTCPPacket_Basedup () const override
 
virtual void parsimPack (omnetpp::cCommBuffer *b) const override
 
virtual void parsimUnpack (omnetpp::cCommBuffer *b) override
 
virtual int8_t getVersion () const
 
virtual void setVersion (int8_t version)
 
virtual bool getPadding () const
 
virtual void setPadding (bool padding)
 
virtual short getCount () const
 
virtual void setCount (short count)
 
virtual short getPacketType () const
 
virtual void setPacketType (short packetType)
 
virtual int getRtcpLength () const =0
 
virtual void setRtcpLength (int rtcpLength)=0
 

Protected Member Functions

bool operator== (const RTCPPacket_Base &)
 
 RTCPPacket_Base (const char *name=nullptr, short kind=0)
 
 RTCPPacket_Base (const RTCPPacket_Base &other)
 
RTCPPacket_Baseoperator= (const RTCPPacket_Base &other)
 

Protected Attributes

int8_t version
 
bool padding
 
short count
 
short packetType
 

Private Member Functions

void copy (const RTCPPacket_Base &other)
 

Detailed Description

Class generated from inet/transportlayer/rtp/RTCPPacket1.msg:34 by nedtool.

packet RTCPPacket
{
    byteLength = 4;
    @customize(true);  // see the generated C++ header for more info
    int8 version = 2;
    bool padding = 0;
    short count = 0;
    short packetType @enum(RTCPPacketType) = RTCP_PT_UNDEF;
    abstract int rtcpLength;
}

RTCPPacket_Base is only useful if it gets subclassed, and RTCPPacket is derived from it. The minimum code to be written for RTCPPacket is the following:

class INET_API RTCPPacket : public RTCPPacket_Base
{
  private:
    void copy(const RTCPPacket& other) { ... }
  public:
    RTCPPacket(const char *name=nullptr, short kind=0) : RTCPPacket_Base(name,kind) {}
    RTCPPacket(const RTCPPacket& other) : RTCPPacket_Base(other) {copy(other);}
    RTCPPacket& operator=(const RTCPPacket& other) {if (this==&other) return *this; RTCPPacket_Base::operator=(other); copy(other); return *this;}
    virtual RTCPPacket *dup() const override {return new RTCPPacket(*this);}
    // ADD CODE HERE to redefine and implement pure virtual functions from RTCPPacket_Base
};

The following should go into a .cc (.cpp) file:

Register_Class(RTCPPacket)

Constructor & Destructor Documentation

inet::rtp::RTCPPacket_Base::RTCPPacket_Base ( const char *  name = nullptr,
short  kind = 0 
)
protected
inet::rtp::RTCPPacket_Base::RTCPPacket_Base ( const RTCPPacket_Base other)
protected
virtual inet::rtp::RTCPPacket_Base::~RTCPPacket_Base ( )
virtual

Member Function Documentation

void inet::rtp::RTCPPacket_Base::copy ( const RTCPPacket_Base other)
private
virtual RTCPPacket_Base* inet::rtp::RTCPPacket_Base::dup ( ) const
inlineoverridevirtual
virtual short inet::rtp::RTCPPacket_Base::getCount ( ) const
virtual
virtual short inet::rtp::RTCPPacket_Base::getPacketType ( ) const
virtual
virtual bool inet::rtp::RTCPPacket_Base::getPadding ( ) const
virtual
virtual int inet::rtp::RTCPPacket_Base::getRtcpLength ( ) const
pure virtual

Implemented in inet::rtp::RTCPPacket.

virtual int8_t inet::rtp::RTCPPacket_Base::getVersion ( ) const
virtual
RTCPPacket_Base& inet::rtp::RTCPPacket_Base::operator= ( const RTCPPacket_Base other)
protected
bool inet::rtp::RTCPPacket_Base::operator== ( const RTCPPacket_Base )
protected
virtual void inet::rtp::RTCPPacket_Base::parsimPack ( omnetpp::cCommBuffer *  b) const
overridevirtual
virtual void inet::rtp::RTCPPacket_Base::parsimUnpack ( omnetpp::cCommBuffer *  b)
overridevirtual
virtual void inet::rtp::RTCPPacket_Base::setCount ( short  count)
virtual
virtual void inet::rtp::RTCPPacket_Base::setPacketType ( short  packetType)
virtual
virtual void inet::rtp::RTCPPacket_Base::setPadding ( bool  padding)
virtual
virtual void inet::rtp::RTCPPacket_Base::setRtcpLength ( int  rtcpLength)
pure virtual

Implemented in inet::rtp::RTCPPacket.

virtual void inet::rtp::RTCPPacket_Base::setVersion ( int8_t  version)
virtual

Member Data Documentation

short inet::rtp::RTCPPacket_Base::count
protected
short inet::rtp::RTCPPacket_Base::packetType
protected
bool inet::rtp::RTCPPacket_Base::padding
protected
int8_t inet::rtp::RTCPPacket_Base::version
protected

The documentation for this class was generated from the following file: