cChannel Class Reference
[Simulation core classes]

#include <cchannel.h>

Inheritance diagram for cChannel:

cObject cPolymorphic cBasicChannel List of all members.

Detailed Description

Base class for channels.

This channel doesn't delay or change messages. One can attach parameters (e.g. "cost").


Public Member Functions

Constructors, destructor, assignment
 cChannel (const cChannel &ch)
 cChannel (const char *name=NULL, cChannelType *l=NULL)
virtual ~cChannel ()
cChanneloperator= (const cChannel &msg)
Redefined cObject functions.
virtual cPolymorphicdup () const
virtual std::string info () const
virtual void forEachChild (cVisitor *v)
virtual void writeContents (std::ostream &os)
virtual void netPack (cCommBuffer *buffer)
virtual void netUnpack (cCommBuffer *buffer)
Channel information.
cGatefromGate () const
cChannelTypechannelType () const
Parameter list. TBD needs remove, etc. operators too!
virtual cParaddPar (const char *s)
virtual cParaddPar (cPar *p)
virtual cParpar (int n)
virtual cParpar (const char *s)
virtual int findPar (const char *s) const
virtual bool hasPar (const char *s) const
virtual cArrayparList ()
Internally used methods.
virtual bool deliver (cMessage *msg, simtime_t at)

Friends

class cGate


Constructor & Destructor Documentation

cChannel::cChannel const cChannel ch  ) 
 

Copy constructor.

cChannel::cChannel const char *  name = NULL,
cChannelType l = NULL
[explicit]
 

Constructor.

virtual cChannel::~cChannel  )  [virtual]
 

Destructor.


Member Function Documentation

virtual cPar& cChannel::addPar cPar p  )  [inline, virtual]
 

Add a parameter to the channel's parameter list.

Reimplemented in cBasicChannel.

virtual cPar& cChannel::addPar const char *  s  )  [inline, virtual]
 

Add a parameter to the channel's parameter list.

Reimplemented in cBasicChannel.

cChannelType* cChannel::channelType  )  const [inline]
 

Returns the channel type of the channel, if it has one.

virtual bool cChannel::deliver cMessage msg,
simtime_t  at
[virtual]
 

This function is called internally by the simulation kernel for transmission modelling.

A false return value means that the message object should be deleted by the caller; this can be used to model that the message was lost in the channel.

Reimplemented in cBasicChannel.

virtual cPolymorphic* cChannel::dup  )  const [inline, virtual]
 

Creates and returns an exact copy of this object.

See cObject for more details.

Reimplemented from cObject.

Reimplemented in cBasicChannel.

virtual int cChannel::findPar const char *  s  )  const [virtual]
 

Returns the index of the parameter with the given name in the channel's parameter list, or -1 if it could not be found.

virtual void cChannel::forEachChild cVisitor v  )  [virtual]
 

Calls v->visit(this) for each contained object.

See cObject for more details.

Reimplemented from cObject.

Reimplemented in cBasicChannel.

cGate* cChannel::fromGate  )  const [inline]
 

Returns the gate this channel is attached to.

virtual bool cChannel::hasPar const char *  s  )  const [inline, virtual]
 

Check if a parameter exists.

virtual std::string cChannel::info  )  const [virtual]
 

Produces a one-line description of object contents into the buffer passed as argument.

See cObject for more details.

Reimplemented from cPolymorphic.

Reimplemented in cBasicChannel.

virtual void cChannel::netPack cCommBuffer buffer  )  [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 cObject.

Reimplemented in cBasicChannel.

virtual void cChannel::netUnpack cCommBuffer buffer  )  [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 cObject.

Reimplemented in cBasicChannel.

cChannel& cChannel::operator= const cChannel msg  ) 
 

Assignment operator.

Duplication and the assignment operator work all right with cChannel. The name member doesn't get copied; see cObject's operator=() for more details.

virtual cPar& cChannel::par const char *  s  )  [virtual]
 

Returns the object with the given name in the channel's parameter list, converting it to a cPar.

virtual cPar& cChannel::par int  n  )  [virtual]
 

Returns the nth object in the channel's parameter list, converting it to a cPar.

virtual cArray& cChannel::parList  )  [virtual]
 

Returns the cArray member of the message which holds the parameters and other attached objects.

Parameters can be inserted, retrieved, looked up or deleted through cArray's member functions.

virtual void cChannel::writeContents std::ostream &  os  )  [virtual]
 

Writes textual information about this object to the stream.

See cObject for more details.

Reimplemented from cObject.

Reimplemented in cBasicChannel.


The documentation for this class was generated from the following file:
Generated on Sat Oct 21 17:47:56 2006 for OMNeT++/OMNEST Simulation Library by  doxygen 1.4.6