#include <TCPSegment_m.h>
Inheritance diagram for TCPSegment_Base:
TCPSegment.msg
by opp_msgc. message TCPSegment extends cMessage { properties: omitGetVerb = true; customize=true; fields:
short srcPort;
short destPort;
unsigned int sequenceNo;
unsigned int ackNo;
bool urgBit; bool ackBit; bool pshBit; bool rstBit; bool synBit; bool finBit;
unsigned long window;
unsigned long urgentPointer;
int payloadLength;
abstract TCPPayloadMessage payload[]; };
TCPSegment_Base is only useful if it gets subclassed, and TCPSegment is derived from it. The minimum code to be written for TCPSegment is the following:
class TCPSegment : public TCPSegment_Base { public: TCPSegment(const char *name=NULL, int kind=0) : TCPSegment_Base(name,kind) {} TCPSegment(const TCPSegment& other) : TCPSegment_Base(other.name()) {operator=(other);} TCPSegment& operator=(const TCPSegment& other) {TCPSegment_Base::operator=(other); return *this;} virtual cPolymorphic *dup() const {return new TCPSegment(*this);} // ADD CODE HERE to redefine and implement pure virtual functions from TCPSegment_Base };
The following should go into a .cc (.cpp) file:
Register_Class(TCPSegment);
Public Member Functions | |
virtual | ~TCPSegment_Base () |
virtual cPolymorphic * | dup () const |
virtual void | netPack (cCommBuffer *b) |
virtual void | netUnpack (cCommBuffer *b) |
virtual short | srcPort () const |
virtual void | setSrcPort (short srcPort_var) |
virtual short | destPort () const |
virtual void | setDestPort (short destPort_var) |
virtual unsigned int | sequenceNo () const |
virtual void | setSequenceNo (unsigned int sequenceNo_var) |
virtual unsigned int | ackNo () const |
virtual void | setAckNo (unsigned int ackNo_var) |
virtual bool | urgBit () const |
virtual void | setUrgBit (bool urgBit_var) |
virtual bool | ackBit () const |
virtual void | setAckBit (bool ackBit_var) |
virtual bool | pshBit () const |
virtual void | setPshBit (bool pshBit_var) |
virtual bool | rstBit () const |
virtual void | setRstBit (bool rstBit_var) |
virtual bool | synBit () const |
virtual void | setSynBit (bool synBit_var) |
virtual bool | finBit () const |
virtual void | setFinBit (bool finBit_var) |
virtual unsigned long | window () const |
virtual void | setWindow (unsigned long window_var) |
virtual unsigned long | urgentPointer () const |
virtual void | setUrgentPointer (unsigned long urgentPointer_var) |
virtual int | payloadLength () const |
virtual void | setPayloadLength (int payloadLength_var) |
virtual void | setPayloadArraySize (unsigned int size)=0 |
virtual unsigned int | payloadArraySize () const =0 |
virtual TCPPayloadMessage & | payload (unsigned int k)=0 |
virtual const TCPPayloadMessage & | payload (unsigned int k) const |
virtual void | setPayload (unsigned int k, const TCPPayloadMessage &payload_var)=0 |
Protected Member Functions | |
bool | operator== (const TCPSegment_Base &) |
TCPSegment_Base (const char *name=NULL, int kind=0) | |
TCPSegment_Base (const TCPSegment_Base &other) | |
TCPSegment_Base & | operator= (const TCPSegment_Base &other) |
Protected Attributes | |
short | srcPort_var |
short | destPort_var |
unsigned int | sequenceNo_var |
unsigned int | ackNo_var |
bool | urgBit_var |
bool | ackBit_var |
bool | pshBit_var |
bool | rstBit_var |
bool | synBit_var |
bool | finBit_var |
unsigned long | window_var |
unsigned long | urgentPointer_var |
int | payloadLength_var |
TCPSegment_Base::TCPSegment_Base | ( | const char * | name = NULL , |
|
int | kind = 0 | |||
) | [protected] |
TCPSegment_Base::TCPSegment_Base | ( | const TCPSegment_Base & | other | ) | [protected] |
virtual TCPSegment_Base::~TCPSegment_Base | ( | ) | [virtual] |
virtual bool TCPSegment_Base::ackBit | ( | ) | const [virtual] |
virtual unsigned int TCPSegment_Base::ackNo | ( | ) | const [virtual] |
virtual short TCPSegment_Base::destPort | ( | ) | const [virtual] |
virtual cPolymorphic* TCPSegment_Base::dup | ( | ) | const [inline, virtual] |
virtual bool TCPSegment_Base::finBit | ( | ) | const [virtual] |
virtual void TCPSegment_Base::netPack | ( | cCommBuffer * | b | ) | [virtual] |
virtual void TCPSegment_Base::netUnpack | ( | cCommBuffer * | b | ) | [virtual] |
TCPSegment_Base& TCPSegment_Base::operator= | ( | const TCPSegment_Base & | other | ) | [protected] |
bool TCPSegment_Base::operator== | ( | const TCPSegment_Base & | ) | [protected] |
virtual const TCPPayloadMessage& TCPSegment_Base::payload | ( | unsigned int | k | ) | const [inline, virtual] |
virtual TCPPayloadMessage& TCPSegment_Base::payload | ( | unsigned int | k | ) | [pure virtual] |
Implemented in TCPSegment.
virtual unsigned int TCPSegment_Base::payloadArraySize | ( | ) | const [pure virtual] |
Implemented in TCPSegment.
virtual int TCPSegment_Base::payloadLength | ( | ) | const [virtual] |
virtual bool TCPSegment_Base::pshBit | ( | ) | const [virtual] |
virtual bool TCPSegment_Base::rstBit | ( | ) | const [virtual] |
virtual unsigned int TCPSegment_Base::sequenceNo | ( | ) | const [virtual] |
virtual void TCPSegment_Base::setAckBit | ( | bool | ackBit_var | ) | [virtual] |
virtual void TCPSegment_Base::setAckNo | ( | unsigned int | ackNo_var | ) | [virtual] |
virtual void TCPSegment_Base::setDestPort | ( | short | destPort_var | ) | [virtual] |
virtual void TCPSegment_Base::setFinBit | ( | bool | finBit_var | ) | [virtual] |
virtual void TCPSegment_Base::setPayload | ( | unsigned int | k, | |
const TCPPayloadMessage & | payload_var | |||
) | [pure virtual] |
Implemented in TCPSegment.
virtual void TCPSegment_Base::setPayloadArraySize | ( | unsigned int | size | ) | [pure virtual] |
Implemented in TCPSegment.
virtual void TCPSegment_Base::setPayloadLength | ( | int | payloadLength_var | ) | [virtual] |
virtual void TCPSegment_Base::setPshBit | ( | bool | pshBit_var | ) | [virtual] |
virtual void TCPSegment_Base::setRstBit | ( | bool | rstBit_var | ) | [virtual] |
virtual void TCPSegment_Base::setSequenceNo | ( | unsigned int | sequenceNo_var | ) | [virtual] |
virtual void TCPSegment_Base::setSrcPort | ( | short | srcPort_var | ) | [virtual] |
virtual void TCPSegment_Base::setSynBit | ( | bool | synBit_var | ) | [virtual] |
virtual void TCPSegment_Base::setUrgBit | ( | bool | urgBit_var | ) | [virtual] |
virtual void TCPSegment_Base::setUrgentPointer | ( | unsigned long | urgentPointer_var | ) | [virtual] |
virtual void TCPSegment_Base::setWindow | ( | unsigned long | window_var | ) | [virtual] |
virtual short TCPSegment_Base::srcPort | ( | ) | const [virtual] |
virtual bool TCPSegment_Base::synBit | ( | ) | const [virtual] |
virtual bool TCPSegment_Base::urgBit | ( | ) | const [virtual] |
virtual unsigned long TCPSegment_Base::urgentPointer | ( | ) | const [virtual] |
virtual unsigned long TCPSegment_Base::window | ( | ) | const [virtual] |
bool TCPSegment_Base::ackBit_var [protected] |
unsigned int TCPSegment_Base::ackNo_var [protected] |
short TCPSegment_Base::destPort_var [protected] |
bool TCPSegment_Base::finBit_var [protected] |
int TCPSegment_Base::payloadLength_var [protected] |
bool TCPSegment_Base::pshBit_var [protected] |
bool TCPSegment_Base::rstBit_var [protected] |
unsigned int TCPSegment_Base::sequenceNo_var [protected] |
short TCPSegment_Base::srcPort_var [protected] |
bool TCPSegment_Base::synBit_var [protected] |
bool TCPSegment_Base::urgBit_var [protected] |
unsigned long TCPSegment_Base::urgentPointer_var [protected] |
unsigned long TCPSegment_Base::window_var [protected] |