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

Class generated from inet/transportlayer/rtp/RTPParticipantInfo.msg:40 by nedtool. More...

#include <RTPParticipantInfo_m.h>

Inheritance diagram for inet::rtp::RTPParticipantInfo_Base:
inet::rtp::RTPParticipantInfo inet::rtp::RTPReceiverInfo inet::rtp::RTPSenderInfo

Public Member Functions

virtual ~RTPParticipantInfo_Base ()
 
virtual RTPParticipantInfo_Basedup () const override
 
virtual void parsimPack (omnetpp::cCommBuffer *b) const override
 
virtual void parsimUnpack (omnetpp::cCommBuffer *b) override
 
virtual uint32_t getSsrc () const =0
 
virtual void setSsrc (uint32_t ssrc)=0
 
virtual IPv4AddressgetAddress ()
 
virtual const IPv4AddressgetAddress () const
 
virtual void setAddress (const IPv4Address &address)
 
virtual int getRTPPort () const
 
virtual void setRTPPort (int RTPPort)
 
virtual int getRTCPPort () const
 
virtual void setRTCPPort (int RTCPPort)
 

Protected Member Functions

bool operator== (const RTPParticipantInfo_Base &)
 
 RTPParticipantInfo_Base (const char *name=nullptr)
 
 RTPParticipantInfo_Base (const RTPParticipantInfo_Base &other)
 
RTPParticipantInfo_Baseoperator= (const RTPParticipantInfo_Base &other)
 

Protected Attributes

IPv4Address address
 
int RTPPort
 
int RTCPPort
 

Private Member Functions

void copy (const RTPParticipantInfo_Base &other)
 

Detailed Description

Class generated from inet/transportlayer/rtp/RTPParticipantInfo.msg:40 by nedtool.

//
// This class is a super class for classes intended for storing information
// about ~RTP end systems.
// It has two subclasses: RTPReceiverInformation which is used for storing
// information about other system participating in an ~RTP session.
// RTPSenderInformation is used by an ~RTP endsystem for storing information
// about itself.
// sa RTPReceiverInformation
// sa RTPSenderInformation
//
class RTPParticipantInfo extends cNamedObject
{
    @customize(true);  // see the generated C++ header for more info
    abstract uint32 ssrc;
    // Used for storing the ip address of this endsystem.
    IPv4Address address = IPv4Address::UNSPECIFIED_ADDRESS;
    // Used for storing the port for ~RTP by this endsystem.
    int RTPPort = PORT_UNDEF;
    // Used for storing the port for ~RTCP by this endsystem.
    int RTCPPort = PORT_UNDEF;
}

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

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

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

Register_Class(RTPParticipantInfo)

Constructor & Destructor Documentation

inet::rtp::RTPParticipantInfo_Base::RTPParticipantInfo_Base ( const char *  name = nullptr)
protected
inet::rtp::RTPParticipantInfo_Base::RTPParticipantInfo_Base ( const RTPParticipantInfo_Base other)
protected
virtual inet::rtp::RTPParticipantInfo_Base::~RTPParticipantInfo_Base ( )
virtual

Member Function Documentation

void inet::rtp::RTPParticipantInfo_Base::copy ( const RTPParticipantInfo_Base other)
private
virtual RTPParticipantInfo_Base* inet::rtp::RTPParticipantInfo_Base::dup ( ) const
inlineoverridevirtual

Reimplemented in inet::rtp::RTPParticipantInfo, inet::rtp::RTPReceiverInfo, and inet::rtp::RTPSenderInfo.

113 {throw omnetpp::cRuntimeError("You forgot to manually add a dup() function to class RTPParticipantInfo");}
virtual const IPv4Address& inet::rtp::RTPParticipantInfo_Base::getAddress ( ) const
inlinevirtual

Referenced by getAddress().

121 {return const_cast<RTPParticipantInfo_Base*>(this)->getAddress();}
virtual IPv4Address & getAddress()
RTPParticipantInfo_Base(const char *name=nullptr)
virtual int inet::rtp::RTPParticipantInfo_Base::getRTCPPort ( ) const
virtual
virtual int inet::rtp::RTPParticipantInfo_Base::getRTPPort ( ) const
virtual
virtual uint32_t inet::rtp::RTPParticipantInfo_Base::getSsrc ( ) const
pure virtual
RTPParticipantInfo_Base& inet::rtp::RTPParticipantInfo_Base::operator= ( const RTPParticipantInfo_Base other)
protected
bool inet::rtp::RTPParticipantInfo_Base::operator== ( const RTPParticipantInfo_Base )
protected
virtual void inet::rtp::RTPParticipantInfo_Base::parsimPack ( omnetpp::cCommBuffer *  b) const
overridevirtual
virtual void inet::rtp::RTPParticipantInfo_Base::parsimUnpack ( omnetpp::cCommBuffer *  b)
overridevirtual
virtual void inet::rtp::RTPParticipantInfo_Base::setRTCPPort ( int  RTCPPort)
virtual
virtual void inet::rtp::RTPParticipantInfo_Base::setRTPPort ( int  RTPPort)
virtual
virtual void inet::rtp::RTPParticipantInfo_Base::setSsrc ( uint32_t  ssrc)
pure virtual

Member Data Documentation

IPv4Address inet::rtp::RTPParticipantInfo_Base::address
protected
int inet::rtp::RTPParticipantInfo_Base::RTCPPort
protected
int inet::rtp::RTPParticipantInfo_Base::RTPPort
protected

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