Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | Related Pages

cBasicChannel Class Reference
[Simulation core classes]

#include <cchannel.h>

Inheritance diagram for cBasicChannel:

cChannel cObject cPolymorphic List of all members.

Detailed Description

Channel that models delay, bit error rate and data rate.


Public Member Functions

Constructors, destructor, assignment
 cBasicChannel (const char *name=NULL)
 cBasicChannel (const cBasicChannel &ch)
virtual ~cBasicChannel ()
cBasicChannel & operator= (const cBasicChannel &msg)
Redefined cObject functions.
virtual cObject * dup () 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)
Setting and getting channel attributes.
virtual void setDelay (double d)
virtual void setError (double d)
virtual void setDatarate (double d)
virtual void setDisabled (bool d)
virtual void setDelay (cPar *p)
virtual void setError (cPar *p)
virtual void setDatarate (cPar *p)
virtual double delay () const
virtual double error () const
virtual double datarate () const
virtual bool disabled () const
Redefined cChannel methods.
virtual cPar & addPar (const char *s)
virtual cPar & addPar (cPar *p)
Transmission state.
virtual bool isBusy () const
virtual simtime_t transmissionFinishes () const
Internally used methods.
virtual bool deliver (cMessage *msg, simtime_t at)


Constructor & Destructor Documentation

cBasicChannel::cBasicChannel (  const char *  name = NULL  )  [explicit]
 

Constructor.

cBasicChannel::cBasicChannel (  const cBasicChannel &  ch  ) 
 

Copy constructor.

virtual cBasicChannel::~cBasicChannel (   )  [virtual]
 

Destructor.


Member Function Documentation

virtual cPar& cBasicChannel::addPar (  cPar *  p  )  [virtual]
 

Redefined to specially handle "delay", "error" and "datarate".

Reimplemented from cChannel.

virtual cPar& cBasicChannel::addPar (  const char *  s  )  [virtual]
 

Redefined to specially handle "delay", "error" and "datarate".

Reimplemented from cChannel.

virtual double cBasicChannel::datarate (   )  const [inline, virtual]
 

Returns the data rate of the channel.

virtual double cBasicChannel::delay (   )  const [inline, virtual]
 

Returns the delay of the channel.

virtual bool cBasicChannel::deliver (  cMessage *  msg,
simtime_t  at
)  [virtual]
 

Performs bit error rate, delay and transmission time modelling.

Reimplemented from cChannel.

virtual bool cBasicChannel::disabled (   )  const [inline, virtual]
 

Returns the "disabled" parameter of the channel.

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

Creates and returns an exact copy of this object.

See cObject for more details.

Reimplemented from cChannel.

virtual double cBasicChannel::error (   )  const [inline, virtual]
 

Returns the bit error rate of the channel.

virtual void cBasicChannel::forEachChild (  cVisitor *  v  )  [virtual]
 

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

See cObject for more details.

Reimplemented from cChannel.

virtual std::string cBasicChannel::info (   )  const [virtual]
 

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

See cObject for more details.

Reimplemented from cChannel.

virtual bool cBasicChannel::isBusy (   )  const [virtual]
 

Returns whether the sender gate is currently transmitting.

Transmission time of a message depends on the message length and the data rate assigned to the channel.

If no data rate is assigned to the channel, the result is false.

virtual void cBasicChannel::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 cChannel.

virtual void cBasicChannel::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 cChannel.

cBasicChannel& cBasicChannel::operator= (  const cBasicChannel &  msg  ) 
 

Assignment operator.

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

virtual void cBasicChannel::setDatarate (  cPar *  p  )  [virtual]
 

DEPRECATED.

virtual void cBasicChannel::setDatarate (  double  d  )  [virtual]
 

Sets the data rate parameter of the channel.

An alternative way of accessing this values is by par("datarate"). This value affects the transmission time of messages sent through the channel.

See also:
isBusy(), transmissionFinishes()

virtual void cBasicChannel::setDelay (  cPar *  p  )  [virtual]
 

DEPRECATED.

virtual void cBasicChannel::setDelay (  double  d  )  [virtual]
 

Sets the delay parameter of the channel.

An alternative way of accessing this values is by par("delay").

virtual void cBasicChannel::setDisabled (  bool  d  )  [virtual]
 

Sets the "disabled" parameter of the channel.

A disabled channel discards all messages sent on it.

virtual void cBasicChannel::setError (  cPar *  p  )  [virtual]
 

DEPRECATED.

virtual void cBasicChannel::setError (  double  d  )  [virtual]
 

Sets the bit error rate parameter of the channel.

An alternative way of accessing this values is by par("error"). When a message sent through the channel suffers at least one bit error, its bit error flag will be set.

See also:
cMessage::hasBitError()

virtual simtime_t cBasicChannel::transmissionFinishes (   )  const [inline, virtual]
 

Returns the simulation time the sender gate will finish transmitting.

The return value is only meaningful if isBusy() is true.

Transmission time of a message depends on the message length and the data rate assigned to the channel.

virtual void cBasicChannel::writeContents (  std::ostream &  os  )  [virtual]
 

Writes textual information about this object to the stream.

See cObject for more details.

Reimplemented from cChannel.


The documentation for this class was generated from the following file:
Generated on Fri Apr 1 12:25:33 2005 for OMNeT++/OMNEST Simulation Library by  doxygen 1.3.9.1