[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The class CsmaChannel models the actual transmission medium. There is no fixed limit for the number of devices connected to the channel. The CsmaChannel models a data rate and a speed-of-light delay which can be accessed via the attributes "DataRate" and "Delay" respectively. The data rate provided to the channel is used to set the data rates used by the transmitter sections of the CSMA devices connected to the channel. There is no way to independently set data rates in the devices. Since the data rate is only used to calculate a delay time, there is no limitation (other than by the data type holding the value) on the speed at which CSMA channels and devices can operate; and no restriction based on any kind of PHY characteristics.
The CsmaChannel has three states, IDLE
, TRANSMITTING
and
PROPAGATING
. These three states are "seen" instantaneously by all
devices on the channel. By this we mean that if one device begins or ends a
simulated transmission, all devices on the channel are immediately
aware of the change in state. There is no time during which one device may
see an IDLE
channel while another device physically further away in
the collision domain may have begun transmitting with the associated signals
not propagated down the channel to other devices. Thus there is no need for
collision detection in the CsmaChannel model and it is not implemented in any
way.
We do, as the name indicates, have a Carrier Sense aspect to the model.
Since the simulator is single threaded, access to the common channel will
be serialized by the simulator. This provides a deterministic mechanism
for contending for the channel. The channel is allocated (transitioned from
state IDLE
to state TRANSMITTING
) on a first-come first-served
basis. The channel always goes through a three state process:
IDLE -> TRANSMITTING -> PROPAGATING -> IDLE
The TRANSMITTING
state models the time during which the source net device
is actually wiggling the signals on the wire. The PROPAGATING
state
models the time after the last bit was sent, when the signal is propagating down
the wire to the "far end."
The transition to the TRANSMITTING
state is driven by a call to
CsmaChannel::TransmitStart which is called by the net device that
transmits the packet. It is the responsibility of that device to end the
transmission with a call to CsmaChannel::TransmitEnd at the appropriate
simulation time that reflects the time elapsed to put all of the packet bits
on the wire. When TransmitEnd is called, the channel schedules an event
corresponding to a single speed-of-light delay. This delay applies to all
net devices on the channel identically. You can think of a symmetrical hub
in which the packet bits propagate to a central location and then back out
equal length cables to the other devices on the channel. The single “speed
of light” delay then corresponds to the time it takes for: 1) a singal to
propagate from one CsmaNetDevice through its cable to the hub; plus 2) the
time it takes for the hub to forward the packet out a port; plus 3) the time
it takes for the signal in question to propagate to the destination net
device.
The CsmaChannel models a broadcast medium so the packet is delivered to all of the devices on the channel (including the source) at the end of the propagation time. It is the responsibility of the sending device to determine whether or not it receives a packet broadcast over the channel.
The CsmaChannel provides following Attributes:
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
This document was generated on July, 4 2009 using texi2html 1.78.