INET Framework for OMNeT++/OMNEST
inet::sctp::SCTPMessage_Base Class Referenceabstract

Class generated from inet/transportlayer/sctp/SCTPMessage.msg:36 by nedtool. More...

#include <SCTPMessage_m.h>

Inheritance diagram for inet::sctp::SCTPMessage_Base:
inet::sctp::SCTPMessage

Public Member Functions

virtual ~SCTPMessage_Base ()
 
virtual SCTPMessage_Basedup () const override
 
virtual void parsimPack (omnetpp::cCommBuffer *b) const override
 
virtual void parsimUnpack (omnetpp::cCommBuffer *b) override
 
virtual uint16_t getSrcPort () const
 
virtual void setSrcPort (uint16_t srcPort)
 
virtual uint16_t getDestPort () const
 
virtual void setDestPort (uint16_t destPort)
 
virtual uint32_t getTag () const
 
virtual void setTag (uint32_t tag)
 
virtual bool getChecksumOk () const
 
virtual void setChecksumOk (bool checksumOk)
 
virtual void setChunksArraySize (unsigned int size)=0
 
virtual unsigned int getChunksArraySize () const =0
 
virtual cPacketPtrgetChunks (unsigned int k)=0
 
virtual const cPacketPtrgetChunks (unsigned int k) const
 
virtual void setChunks (unsigned int k, const cPacketPtr &chunks)=0
 

Protected Member Functions

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

Protected Attributes

uint16_t srcPort
 
uint16_t destPort
 
uint32_t tag
 
bool checksumOk
 

Private Member Functions

void copy (const SCTPMessage_Base &other)
 

Detailed Description

Class generated from inet/transportlayer/sctp/SCTPMessage.msg:36 by nedtool.

message SCTPMessage extends cPacket
{
    @customize(true);
    // Source Port
    uint16 srcPort;
    // Destination Port
    uint16 destPort;
    // Verification Tag
    uint32 tag;
    bool checksumOk;
    abstract cPacketPtr chunks[];
}

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

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

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

Register_Class(SCTPMessage)

Constructor & Destructor Documentation

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

Member Function Documentation

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

Reimplemented in inet::sctp::SCTPMessage.

105 {throw omnetpp::cRuntimeError("You forgot to manually add a dup() function to class SCTPMessage");}
virtual cPacketPtr& inet::sctp::SCTPMessage_Base::getChunks ( unsigned int  k)
pure virtual
virtual const cPacketPtr& inet::sctp::SCTPMessage_Base::getChunks ( unsigned int  k) const
inlinevirtual

Referenced by getChunks().

121 {return const_cast<SCTPMessage_Base*>(this)->getChunks(k);}
virtual cPacketPtr & getChunks(unsigned int k)=0
SCTPMessage_Base(const char *name=nullptr, short kind=0)
const double k
Definition: QAM16Modulation.cc:24
virtual unsigned int inet::sctp::SCTPMessage_Base::getChunksArraySize ( ) const
pure virtual

Implemented in inet::sctp::SCTPMessage.

SCTPMessage_Base& inet::sctp::SCTPMessage_Base::operator= ( const SCTPMessage_Base other)
protected
bool inet::sctp::SCTPMessage_Base::operator== ( const SCTPMessage_Base )
protected
virtual void inet::sctp::SCTPMessage_Base::parsimPack ( omnetpp::cCommBuffer *  b) const
overridevirtual
virtual void inet::sctp::SCTPMessage_Base::parsimUnpack ( omnetpp::cCommBuffer *  b)
overridevirtual
virtual void inet::sctp::SCTPMessage_Base::setChunks ( unsigned int  k,
const cPacketPtr chunks 
)
pure virtual
virtual void inet::sctp::SCTPMessage_Base::setChunksArraySize ( unsigned int  size)
pure virtual
virtual void inet::sctp::SCTPMessage_Base::setDestPort ( uint16_t  destPort)
virtual

Referenced by PacketDrill::buildSCTPPacket(), inet::PacketDrillApp::closeAllSockets(), inet::sctp::SCTPMessage::copy(), inet::sctp::SCTPNatHook::datagramPreRoutingHook(), inet::serializer::SCTPSerializer::parse(), inet::sctp::SCTPAssociation::processAddInAndOutResetRequestArrived(), inet::sctp::SCTPAssociation::processAsconfArrived(), inet::sctp::SCTPAssociation::sendAbort(), inet::sctp::SCTP::sendAbortFromMain(), inet::sctp::SCTPAssociation::sendAddInAndOutStreamsRequest(), inet::sctp::SCTPAssociation::sendAddOutgoingStreamsRequest(), inet::sctp::SCTPAssociation::sendAsconf(), inet::sctp::SCTPAssociation::sendAsconfAck(), inet::sctp::SCTPNatHook::sendBackError(), inet::sctp::SCTPAssociation::sendBundledOutgoingResetAndResponse(), inet::sctp::SCTPAssociation::sendCookieAck(), inet::sctp::SCTPAssociation::sendCookieEcho(), inet::sctp::SCTPAssociation::sendDoubleStreamResetResponse(), inet::sctp::SCTPAssociation::sendHeartbeat(), inet::sctp::SCTPAssociation::sendHeartbeatAck(), inet::sctp::SCTPAssociation::sendInitAck(), inet::sctp::SCTPAssociation::sendOutgoingRequestAndResponse(), inet::sctp::SCTPAssociation::sendOutgoingResetRequest(), inet::sctp::SCTPAssociation::sendShutdown(), inet::sctp::SCTPAssociation::sendShutdownAck(), inet::sctp::SCTPAssociation::sendShutdownComplete(), inet::sctp::SCTP::sendShutdownCompleteFromMain(), inet::sctp::SCTPAssociation::sendStreamResetRequest(), inet::sctp::SCTPAssociation::sendStreamResetResponse(), inet::sctp::SCTPAssociation::sendToIP(), and inet::sctp::SCTPMessage::setDestinationPort().

virtual void inet::sctp::SCTPMessage_Base::setSrcPort ( uint16_t  srcPort)
virtual

Referenced by PacketDrill::buildSCTPPacket(), inet::PacketDrillApp::closeAllSockets(), inet::sctp::SCTPMessage::copy(), inet::sctp::SCTPNatHook::datagramForwardHook(), inet::sctp::SCTPNatHook::datagramPreRoutingHook(), inet::serializer::SCTPSerializer::parse(), inet::sctp::SCTPAssociation::processAddInAndOutResetRequestArrived(), inet::sctp::SCTPAssociation::processAsconfArrived(), inet::sctp::SCTPAssociation::sendAbort(), inet::sctp::SCTP::sendAbortFromMain(), inet::sctp::SCTPAssociation::sendAddInAndOutStreamsRequest(), inet::sctp::SCTPAssociation::sendAddOutgoingStreamsRequest(), inet::sctp::SCTPAssociation::sendAsconf(), inet::sctp::SCTPAssociation::sendAsconfAck(), inet::sctp::SCTPNatHook::sendBackError(), inet::sctp::SCTPAssociation::sendBundledOutgoingResetAndResponse(), inet::sctp::SCTPAssociation::sendCookieAck(), inet::sctp::SCTPAssociation::sendCookieEcho(), inet::sctp::SCTPAssociation::sendDoubleStreamResetResponse(), inet::sctp::SCTPAssociation::sendHeartbeat(), inet::sctp::SCTPAssociation::sendHeartbeatAck(), inet::sctp::SCTPAssociation::sendInitAck(), inet::sctp::SCTPAssociation::sendOutgoingRequestAndResponse(), inet::sctp::SCTPAssociation::sendOutgoingResetRequest(), inet::sctp::SCTPAssociation::sendShutdown(), inet::sctp::SCTPAssociation::sendShutdownAck(), inet::sctp::SCTPAssociation::sendShutdownComplete(), inet::sctp::SCTP::sendShutdownCompleteFromMain(), inet::sctp::SCTPAssociation::sendStreamResetRequest(), inet::sctp::SCTPAssociation::sendStreamResetResponse(), inet::sctp::SCTPAssociation::sendToIP(), and inet::sctp::SCTPMessage::setSourcePort().

Member Data Documentation

bool inet::sctp::SCTPMessage_Base::checksumOk
protected
uint16_t inet::sctp::SCTPMessage_Base::destPort
protected
uint16_t inet::sctp::SCTPMessage_Base::srcPort
protected
uint32_t inet::sctp::SCTPMessage_Base::tag
protected

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