INET Framework for OMNeT++/OMNEST
inet::sctp::SctpAsconfAckChunk Class Reference

#include <SctpHeader.h>

Inheritance diagram for inet::sctp::SctpAsconfAckChunk:
inet::sctp::SctpAsconfAckChunk_Base inet::sctp::SctpChunk

Public Member Functions

 SctpAsconfAckChunk (const char *name=nullptr, int32_t kind=0)
 
 SctpAsconfAckChunk (const SctpAsconfAckChunk &other)
 
SctpAsconfAckChunkoperator= (const SctpAsconfAckChunk &other)
 
virtual SctpAsconfAckChunkdup () const override
 
virtual void setAsconfResponseArraySize (size_t size) override
 
virtual size_t getAsconfResponseArraySize () const override
 
virtual void setAsconfResponse (size_t k, SctpParameter *asconfResponse) override
 Generated but unused method, should not be called. More...
 
virtual void appendAsconfResponse (SctpParameter *asconfResponse) override
 
virtual void insertAsconfResponse (size_t k, SctpParameter *asconfResponse) override
 
virtual void eraseAsconfResponse (size_t k) override
 
virtual SctpParametergetAsconfResponse (size_t k) const override
 Returns the kth parameter in this SCTP Reset Chunk. More...
 
virtual void addAsconfResponse (SctpParameter *msg)
 Adds a message object to the SCTP packet. More...
 
virtual SctpParameterremoveAsconfResponse ()
 Removes and returns the first message object in this SCTP packet. More...
 
virtual void insertAsconfResponse (size_t k, SctpParameter *asconfResponse)=0
 
void insertAsconfResponse (SctpParameter *asconfResponse)
 
- Public Member Functions inherited from inet::sctp::SctpAsconfAckChunk_Base
virtual ~SctpAsconfAckChunk_Base ()
 
virtual void parsimPack (omnetpp::cCommBuffer *b) const override
 
virtual void parsimUnpack (omnetpp::cCommBuffer *b) override
 
virtual uint32_t getSerialNumber () const
 
virtual void setSerialNumber (uint32_t serialNumber)
 
virtual SctpParametergetAsconfResponseForUpdate (size_t k)
 
void insertAsconfResponse (SctpParameter *asconfResponse)
 
- Public Member Functions inherited from inet::sctp::SctpChunk
 SctpChunk (const char *name=nullptr)
 
 SctpChunk (const SctpChunk &other)
 
virtual ~SctpChunk ()
 
SctpChunkoperator= (const SctpChunk &other)
 
virtual uint8_t getSctpChunkType () const
 
virtual void setSctpChunkType (uint8_t sctpChunkType)
 
virtual uint32_t getFlags () const
 
virtual void setFlags (uint32_t flags)
 
virtual unsigned short getLength () const
 
virtual void setLength (unsigned short length)
 
virtual void setChunkNameArraySize (size_t size)
 
virtual size_t getChunkNameArraySize () const
 
virtual char getChunkName (size_t k) const
 
virtual void setChunkName (size_t k, char chunkName)
 
virtual void insertChunkName (size_t k, char chunkName)
 
void insertChunkName (char chunkName)
 
virtual void appendChunkName (char chunkName)
 
virtual void eraseChunkName (size_t k)
 

Protected Attributes

std::vector< SctpParameter * > parameterList
 
- Protected Attributes inherited from inet::sctp::SctpAsconfAckChunk_Base
uint32_t serialNumber = 0
 
- Protected Attributes inherited from inet::sctp::SctpChunk
uint8_t sctpChunkType = 0
 
uint32_t flags = 0
 
unsigned short length = 0
 
char * chunkName = nullptr
 
size_t chunkName_arraysize = 0
 

Additional Inherited Members

- Protected Member Functions inherited from inet::sctp::SctpAsconfAckChunk_Base
bool operator== (const SctpAsconfAckChunk_Base &)=delete
 
 SctpAsconfAckChunk_Base (const char *name=nullptr)
 
 SctpAsconfAckChunk_Base (const SctpAsconfAckChunk_Base &other)
 
SctpAsconfAckChunk_Baseoperator= (const SctpAsconfAckChunk_Base &other)
 
- Protected Member Functions inherited from inet::sctp::SctpChunk
bool operator== (const SctpChunk &)=delete
 

Constructor & Destructor Documentation

◆ SctpAsconfAckChunk() [1/2]

inet::sctp::SctpAsconfAckChunk::SctpAsconfAckChunk ( const char *  name = nullptr,
int32_t  kind = 0 
)
inline

◆ SctpAsconfAckChunk() [2/2]

inet::sctp::SctpAsconfAckChunk::SctpAsconfAckChunk ( const SctpAsconfAckChunk other)
inline
225 : SctpAsconfAckChunk_Base(other) { operator=(other); };

Member Function Documentation

◆ addAsconfResponse()

void inet::sctp::SctpAsconfAckChunk::addAsconfResponse ( SctpParameter msg)
virtual

Adds a message object to the SCTP packet.

The packet length will be adjusted

411 {
412  take(msg);
413  this->setByteLength(this->getByteLength() + ADD_PADDING(msg->getByteLength()));
414  parameterList.push_back(msg);
415 }

Referenced by operator=(), and inet::sctp::SctpAssociation::processAsconfArrived().

◆ appendAsconfResponse()

virtual void inet::sctp::SctpAsconfAckChunk::appendAsconfResponse ( SctpParameter asconfResponse)
inlineoverridevirtual

Implements inet::sctp::SctpAsconfAckChunk_Base.

235 { throw cRuntimeError("Unimplemented function"); }

◆ dup()

virtual SctpAsconfAckChunk* inet::sctp::SctpAsconfAckChunk::dup ( ) const
inlineoverridevirtual

Reimplemented from inet::sctp::SctpAsconfAckChunk_Base.

228 { return new SctpAsconfAckChunk(*this); }

Referenced by operator=().

◆ eraseAsconfResponse()

virtual void inet::sctp::SctpAsconfAckChunk::eraseAsconfResponse ( size_t  k)
inlineoverridevirtual

Implements inet::sctp::SctpAsconfAckChunk_Base.

238 { throw cRuntimeError("Unimplemented function"); }

◆ getAsconfResponse()

SctpParameter * inet::sctp::SctpAsconfAckChunk::getAsconfResponse ( size_t  k) const
overridevirtual

Returns the kth parameter in this SCTP Reset Chunk.

Implements inet::sctp::SctpAsconfAckChunk_Base.

401 {
402  return parameterList.at(k);
403 }

Referenced by inet::sctp::SctpAssociation::processAsconfAckArrived(), and inet::sctp::SctpHeaderSerializer::serialize().

◆ getAsconfResponseArraySize()

size_t inet::sctp::SctpAsconfAckChunk::getAsconfResponseArraySize ( ) const
overridevirtual

◆ insertAsconfResponse() [1/3]

void inet::sctp::SctpAsconfAckChunk_Base::insertAsconfResponse
inline
2166 {appendAsconfResponse(asconfResponse);}

◆ insertAsconfResponse() [2/3]

virtual void inet::sctp::SctpAsconfAckChunk::insertAsconfResponse ( size_t  k,
SctpParameter asconfResponse 
)
inlineoverridevirtual

Implements inet::sctp::SctpAsconfAckChunk_Base.

237 { throw cRuntimeError("Unimplemented function"); }

◆ insertAsconfResponse() [3/3]

virtual void inet::sctp::SctpAsconfAckChunk_Base::insertAsconfResponse

◆ operator=()

SctpAsconfAckChunk & inet::sctp::SctpAsconfAckChunk::operator= ( const SctpAsconfAckChunk other)
380 {
382 
383  this->setByteLength(SCTP_ADD_IP_CHUNK_LENGTH);
384  for (const auto& elem : other.parameterList)
385  addAsconfResponse((elem)->dup());
386 
387  return *this;
388 }

◆ removeAsconfResponse()

SctpParameter * inet::sctp::SctpAsconfAckChunk::removeAsconfResponse ( )
virtual

Removes and returns the first message object in this SCTP packet.

418 {
419  if (parameterList.empty())
420  return nullptr;
421 
422  SctpParameter *msg = parameterList.front();
423  parameterList.erase(parameterList.begin());
424  drop(msg);
425  this->setByteLength(this->getByteLength() + ADD_PADDING(msg->getByteLength()));
426  return msg;
427 }

◆ setAsconfResponse()

void inet::sctp::SctpAsconfAckChunk::setAsconfResponse ( size_t  k,
SctpParameter asconfResponse 
)
overridevirtual

Generated but unused method, should not be called.

Implements inet::sctp::SctpAsconfAckChunk_Base.

406 {
407  throw cException(this, "setAsconfresponse() not supported, use addAsconfResponse()");
408 }

◆ setAsconfResponseArraySize()

void inet::sctp::SctpAsconfAckChunk::setAsconfResponseArraySize ( size_t  size)
overridevirtual

Implements inet::sctp::SctpAsconfAckChunk_Base.

391 {
392  throw cException(this, "setAsconfResponseArraySize() not supported, use addAsconfResponse()");
393 }

Member Data Documentation

◆ parameterList

std::vector<SctpParameter *> inet::sctp::SctpAsconfAckChunk::parameterList
protected

The documentation for this class was generated from the following files:
inet::sctp::SctpAsconfAckChunk_Base::operator=
SctpAsconfAckChunk_Base & operator=(const SctpAsconfAckChunk_Base &other)
inet::sctp::SctpAsconfAckChunk::dup
virtual SctpAsconfAckChunk * dup() const override
Definition: SctpHeader.h:228
inet::sctp::SctpAsconfAckChunk::addAsconfResponse
virtual void addAsconfResponse(SctpParameter *msg)
Adds a message object to the SCTP packet.
Definition: SctpHeader.cc:410
inet::sctp::SctpAsconfAckChunk_Base::SctpAsconfAckChunk_Base
SctpAsconfAckChunk_Base(const char *name=nullptr)
SCTP_ADD_IP_CHUNK_LENGTH
#define SCTP_ADD_IP_CHUNK_LENGTH
Definition: SctpAssociation.h:222
inet::sctp::SctpAsconfAckChunk::appendAsconfResponse
virtual void appendAsconfResponse(SctpParameter *asconfResponse) override
Definition: SctpHeader.h:235
ADD_PADDING
#define ADD_PADDING(x)
Definition: SctpAssociation.h:252
inet::sctp::SctpAsconfAckChunk::parameterList
std::vector< SctpParameter * > parameterList
Definition: SctpHeader.h:221
inet::sctp::SctpAsconfAckChunk::SctpAsconfAckChunk
SctpAsconfAckChunk(const char *name=nullptr, int32_t kind=0)
Definition: SctpHeader.h:224
inet::physicallayer::k
const double k
Definition: Qam1024Modulation.cc:14
inet::sctp::SctpAsconfAckChunk::operator=
SctpAsconfAckChunk & operator=(const SctpAsconfAckChunk &other)
Definition: SctpHeader.cc:379