Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members  

cPacket Class Reference

#include <cpacket.h>

Inheritance diagram for cPacket::

cMessage cObject List of all members.

Public Methods

Constructors, destructor, assignment
 cPacket (const char *name=NULL, short protocol=0, short pdu=0)
 cPacket (const cPacket &m)
cPacket& operator= (const cPacket &m)
Redefined cObject member functions.
virtual cObjectdup () const
virtual const char* className () const
virtual const char* inspectorFactoryName () const
virtual void info (char *buf)
virtual int netPack ()
virtual int netUnpack ()
New attributes.
short protocol () const
short pdu () const
void setProtocol (short p)
void setPdu (short p)

Detailed Description

Network packet class. It adds protocol and PDU type to cMessage. The message kind must be either MK_PACKET or MK_INFO for cPackets.


Constructor & Destructor Documentation

cPacket::cPacket ( const char * name = NULL,
short protocol = 0,
short pdu = 0 ) [inline, explicit]
 

Constructor.

cPacket::cPacket ( const cPacket & m )
 

Copy constructor.


Member Function Documentation

const char * cPacket::className ( ) const [inline, virtual]
 

Returns pointer to a string containing the class name, "cPacket".

Reimplemented from cMessage.

cObject * cPacket::dup ( ) const [inline, virtual]
 

Creates and returns an exact copy of this object. See cObject for more details.

Reimplemented from cMessage.

void cPacket::info ( char * buf ) [virtual]
 

Produces a one-line description of object contents into the buffer passed as argument. See cObject for more details.

Reimplemented from cMessage.

const char * cPacket::inspectorFactoryName ( ) const [inline, virtual]
 

Returns the name of the inspector factory class associated with this class. See cObject for more details.

Reimplemented from cMessage.

int cPacket::netPack ( ) [virtual]
 

Serializes the object into a PVM or MPI send buffer. Used by the simulation kernel for parallel execution. See cObject for more details.

Reimplemented from cMessage.

int cPacket::netUnpack ( ) [virtual]
 

Deserializes the object from a PVM or MPI receive buffer Used by the simulation kernel for parallel execution. See cObject for more details.

Reimplemented from cMessage.

cPacket & cPacket::operator= ( const cPacket & m )
 

Assignment operator. The name member doesn't get copied; see cObject's operator=() for more details.

short cPacket::pdu ( ) const [inline]
 

Returns the PDU type.

short cPacket::protocol ( ) const [inline]
 

Returns the protocol ID.

void cPacket::setPdu ( short p ) [inline]
 

Sets the PDU type.

void cPacket::setProtocol ( short p ) [inline]
 

Sets the protocol ID.


The documentation for this class was generated from the following file:
Generated at Sat May 4 15:45:51 2002 for OMNeT++ by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001