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

Class generated from inet/transportlayer/rtp/RtpParticipantInfo.msg:24 by opp_msgtool. 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 const ::inet::Ipv4AddressgetAddress () const
 
virtual ::inet::Ipv4AddressgetAddressForUpdate ()
 
virtual void setAddress (const ::inet::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 &)=delete
 
 RtpParticipantInfo_Base (const char *name=nullptr)
 
 RtpParticipantInfo_Base (const RtpParticipantInfo_Base &other)
 
RtpParticipantInfo_Baseoperator= (const RtpParticipantInfo_Base &other)
 

Protected Attributes

::inet::Ipv4Address address = Ipv4Address::UNSPECIFIED_ADDRESS
 
int RTPPort = PORT_UNDEF
 
int RTCPPort = PORT_UNDEF
 

Private Member Functions

void copy (const RtpParticipantInfo_Base &other)
 

Detailed Description

Class generated from inet/transportlayer/rtp/RtpParticipantInfo.msg:24 by opp_msgtool.

//
// 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;  //FIXME need revise, several custommized functions should be moved to a processing module
    abstract uint32_t 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

◆ RtpParticipantInfo_Base() [1/2]

inet::rtp::RtpParticipantInfo_Base::RtpParticipantInfo_Base ( const char *  name = nullptr)
protected

◆ RtpParticipantInfo_Base() [2/2]

inet::rtp::RtpParticipantInfo_Base::RtpParticipantInfo_Base ( const RtpParticipantInfo_Base other)
protected

◆ ~RtpParticipantInfo_Base()

virtual inet::rtp::RtpParticipantInfo_Base::~RtpParticipantInfo_Base ( )
virtual

Member Function Documentation

◆ copy()

void inet::rtp::RtpParticipantInfo_Base::copy ( const RtpParticipantInfo_Base other)
private

◆ dup()

virtual RtpParticipantInfo_Base* inet::rtp::RtpParticipantInfo_Base::dup ( ) const
inlineoverridevirtual

Reimplemented in inet::rtp::RtpParticipantInfo, inet::rtp::RtpReceiverInfo, and inet::rtp::RtpSenderInfo.

121 {throw omnetpp::cRuntimeError("You forgot to manually add a dup() function to class RtpParticipantInfo");}

◆ getAddress()

◆ getAddressForUpdate()

virtual ::inet::Ipv4Address& inet::rtp::RtpParticipantInfo_Base::getAddressForUpdate ( )
inline
129 { return const_cast<::inet::Ipv4Address&>(const_cast<RtpParticipantInfo_Base*>(this)->getAddress());}

◆ getRTCPPort()

virtual int inet::rtp::RtpParticipantInfo_Base::getRTCPPort ( ) const
virtual

◆ getRTPPort()

virtual int inet::rtp::RtpParticipantInfo_Base::getRTPPort ( ) const
virtual

◆ getSsrc()

virtual uint32_t inet::rtp::RtpParticipantInfo_Base::getSsrc ( ) const
pure virtual

◆ operator=()

RtpParticipantInfo_Base& inet::rtp::RtpParticipantInfo_Base::operator= ( const RtpParticipantInfo_Base other)
protected

◆ operator==()

bool inet::rtp::RtpParticipantInfo_Base::operator== ( const RtpParticipantInfo_Base )
protecteddelete

◆ parsimPack()

virtual void inet::rtp::RtpParticipantInfo_Base::parsimPack ( omnetpp::cCommBuffer *  b) const
overridevirtual

◆ parsimUnpack()

virtual void inet::rtp::RtpParticipantInfo_Base::parsimUnpack ( omnetpp::cCommBuffer *  b)
overridevirtual

◆ setAddress()

◆ setRTCPPort()

virtual void inet::rtp::RtpParticipantInfo_Base::setRTCPPort ( int  RTCPPort)
virtual

◆ setRTPPort()

virtual void inet::rtp::RtpParticipantInfo_Base::setRTPPort ( int  RTPPort)
virtual

◆ setSsrc()

virtual void inet::rtp::RtpParticipantInfo_Base::setSsrc ( uint32_t  ssrc)
pure virtual

Member Data Documentation

◆ address

::inet::Ipv4Address inet::rtp::RtpParticipantInfo_Base::address = Ipv4Address::UNSPECIFIED_ADDRESS
protected

◆ RTCPPort

int inet::rtp::RtpParticipantInfo_Base::RTCPPort = PORT_UNDEF
protected

◆ RTPPort

int inet::rtp::RtpParticipantInfo_Base::RTPPort = PORT_UNDEF
protected

The documentation for this class was generated from the following file:
inet::Ipv4Address
Ipv4 address.
Definition: Ipv4Address.h:34
inet::rtp::RtpParticipantInfo_Base::getAddress
virtual const ::inet::Ipv4Address & getAddress() const
inet::rtp::RtpParticipantInfo_Base::RtpParticipantInfo_Base
RtpParticipantInfo_Base(const char *name=nullptr)