INET Framework for OMNeT++/OMNEST
inet::IGMPv3Query_Base Class Referenceabstract

Class generated from inet/networklayer/ipv4/IGMPMessage.msg:90 by nedtool. More...

#include <IGMPMessage_m.h>

Inheritance diagram for inet::IGMPv3Query_Base:
inet::IGMPv2Query inet::IGMPQuery inet::IGMPMessage inet::IGMPv3Query

Public Member Functions

virtual ~IGMPv3Query_Base ()
 
virtual IGMPv3Query_Basedup () const override
 
virtual void parsimPack (omnetpp::cCommBuffer *b) const override
 
virtual void parsimUnpack (omnetpp::cCommBuffer *b) override
 
virtual bool getSuppressRouterProc () const
 
virtual void setSuppressRouterProc (bool suppressRouterProc)
 
virtual unsigned char getRobustnessVariable () const
 
virtual void setRobustnessVariable (unsigned char robustnessVariable)
 
virtual unsigned char getQueryIntervalCode () const
 
virtual void setQueryIntervalCode (unsigned char queryIntervalCode)
 
virtual IPv4AddressVectorgetSourceList ()
 
virtual const IPv4AddressVectorgetSourceList () const
 
virtual void setSourceList (const IPv4AddressVector &sourceList)
 
virtual unsigned char getMaxRespCode () const =0
 
virtual void setMaxRespCode (unsigned char maxRespCode)=0
 
- Public Member Functions inherited from inet::IGMPv2Query
 IGMPv2Query (const char *name=nullptr, short kind=0)
 
 IGMPv2Query (const IGMPv2Query &other)
 
virtual ~IGMPv2Query ()
 
IGMPv2Queryoperator= (const IGMPv2Query &other)
 
virtual unsigned char getMaxRespTime () const
 
virtual void setMaxRespTime (unsigned char maxRespTime)
 
- Public Member Functions inherited from inet::IGMPQuery
 IGMPQuery (const char *name=nullptr, short kind=0)
 
 IGMPQuery (const IGMPQuery &other)
 
virtual ~IGMPQuery ()
 
IGMPQueryoperator= (const IGMPQuery &other)
 
virtual IPv4AddressgetGroupAddress ()
 
virtual const IPv4AddressgetGroupAddress () const
 
virtual void setGroupAddress (const IPv4Address &groupAddress)
 
- Public Member Functions inherited from inet::IGMPMessage
 IGMPMessage (const char *name=nullptr, short kind=0)
 
 IGMPMessage (const IGMPMessage &other)
 
virtual ~IGMPMessage ()
 
IGMPMessageoperator= (const IGMPMessage &other)
 
virtual int getType () const
 
virtual void setType (int type)
 

Protected Member Functions

bool operator== (const IGMPv3Query_Base &)
 
 IGMPv3Query_Base (const char *name=nullptr, short kind=0)
 
 IGMPv3Query_Base (const IGMPv3Query_Base &other)
 
IGMPv3Query_Baseoperator= (const IGMPv3Query_Base &other)
 
- Protected Member Functions inherited from inet::IGMPv2Query
bool operator== (const IGMPv2Query &)
 
- Protected Member Functions inherited from inet::IGMPQuery
bool operator== (const IGMPQuery &)
 
- Protected Member Functions inherited from inet::IGMPMessage
bool operator== (const IGMPMessage &)
 

Protected Attributes

bool suppressRouterProc
 
unsigned char robustnessVariable
 
unsigned char queryIntervalCode
 
IPv4AddressVector sourceList
 
- Protected Attributes inherited from inet::IGMPv2Query
unsigned char maxRespTime
 
- Protected Attributes inherited from inet::IGMPQuery
IPv4Address groupAddress
 
- Protected Attributes inherited from inet::IGMPMessage
int type
 

Private Member Functions

void copy (const IGMPv3Query_Base &other)
 

Detailed Description

Class generated from inet/networklayer/ipv4/IGMPMessage.msg:90 by nedtool.

//
// IGMPv3Query extends IGMPv2Query, because
// IGMPv2 routers must accept IGMPv3Query packets.
//
// Note: in IGMPv3Query the maxResponseTime field is
// renamed to maxResponseCode and it is interpreted
// differently than in IGMPv2.
packet IGMPv3Query extends IGMPv2Query
{
    @customize(true);
    bool suppressRouterProc;
    unsigned char robustnessVariable;
    unsigned char queryIntervalCode;
    IPv4AddressVector sourceList;
    abstract unsigned char maxRespCode;
}

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

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

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

Register_Class(IGMPv3Query)

Constructor & Destructor Documentation

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

Member Function Documentation

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

Reimplemented from inet::IGMPv2Query.

Reimplemented in inet::IGMPv3Query.

403 {throw omnetpp::cRuntimeError("You forgot to manually add a dup() function to class IGMPv3Query");}
virtual unsigned char inet::IGMPv3Query_Base::getMaxRespCode ( ) const
pure virtual

Implemented in inet::IGMPv3Query.

virtual unsigned char inet::IGMPv3Query_Base::getQueryIntervalCode ( ) const
virtual
virtual unsigned char inet::IGMPv3Query_Base::getRobustnessVariable ( ) const
virtual
virtual const IPv4AddressVector& inet::IGMPv3Query_Base::getSourceList ( ) const
inlinevirtual

Referenced by getSourceList().

415 {return const_cast<IGMPv3Query_Base*>(this)->getSourceList();}
virtual IPv4AddressVector & getSourceList()
IGMPv3Query_Base(const char *name=nullptr, short kind=0)
virtual bool inet::IGMPv3Query_Base::getSuppressRouterProc ( ) const
virtual
IGMPv3Query_Base& inet::IGMPv3Query_Base::operator= ( const IGMPv3Query_Base other)
protected
bool inet::IGMPv3Query_Base::operator== ( const IGMPv3Query_Base )
protected
virtual void inet::IGMPv3Query_Base::parsimPack ( omnetpp::cCommBuffer *  b) const
overridevirtual

Reimplemented from inet::IGMPv2Query.

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

Reimplemented from inet::IGMPv2Query.

virtual void inet::IGMPv3Query_Base::setMaxRespCode ( unsigned char  maxRespCode)
pure virtual

Implemented in inet::IGMPv3Query.

virtual void inet::IGMPv3Query_Base::setQueryIntervalCode ( unsigned char  queryIntervalCode)
virtual
virtual void inet::IGMPv3Query_Base::setRobustnessVariable ( unsigned char  robustnessVariable)
virtual
virtual void inet::IGMPv3Query_Base::setSourceList ( const IPv4AddressVector sourceList)
virtual
virtual void inet::IGMPv3Query_Base::setSuppressRouterProc ( bool  suppressRouterProc)
virtual

Member Data Documentation

unsigned char inet::IGMPv3Query_Base::queryIntervalCode
protected
unsigned char inet::IGMPv3Query_Base::robustnessVariable
protected
IPv4AddressVector inet::IGMPv3Query_Base::sourceList
protected
bool inet::IGMPv3Query_Base::suppressRouterProc
protected

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