Csma Channel.
More...
#include <csma-channel.h>
List of all members.
Detailed Description
Csma Channel.
This class represents a simple Csma channel that can be used when many nodes are connected to one wire. It uses a single busy flag to indicate if the channel is currently in use. It does not take into account the distances between stations or the speed of light to determine collisions.
Member Function Documentation
Attach a given netdevice to this channel.
- Parameters:
-
| device | Device pointer to the netdevice to attach to the channel |
- Returns:
- The assigned device number
bool ns3::CsmaChannel::Detach |
( |
uint32_t |
deviceId |
) |
|
Detach a given netdevice from this channel.
The net device is marked as inactive and it is not allowed to receive or transmit packets
- Parameters:
-
| deviceId | The deviceID assigned to the net device when it was connected to the channel |
- Returns:
- True if the device is found and attached to the channel, false if the device is not currently connected to the channel or can't be found.
Detach a given netdevice from this channel.
The net device is marked as inactive and it is not allowed to receive or transmit packets
- Parameters:
-
| device | Device pointer to the netdevice to detach from the channel |
- Returns:
- True if the device is found and attached to the channel, false if the device is not currently connected to the channel or can't be found.
- Returns:
- Get a CsmaNetDevice pointer to a connected network device.
- Parameters:
-
| i | The deviceId of the net device for which we want the pointer. |
- Returns:
- Returns the pointer to the net device that is associated with deviceId i.
DataRate ns3::CsmaChannel::GetDataRate |
( |
void |
|
) |
|
Get the assigned data rate of the channel
- Returns:
- Returns the DataRate to be used by device transmitters. with deviceId i.
Time ns3::CsmaChannel::GetDelay |
( |
void |
|
) |
|
Get the assigned speed-of-light delay of the channel
- Returns:
- Returns the delay used by the channel.
virtual Ptr<NetDevice> ns3::CsmaChannel::GetDevice |
( |
uint32_t |
i |
) |
const [virtual] |
- Returns:
- Get a NetDevice pointer to a connected network device.
- Parameters:
-
| i | The index of the net device. |
- Returns:
- Returns the pointer to the net device that is associated with deviceId i.
Implements ns3::Channel.
- Returns:
- Returns the device number assigned to a net device by the channel
- Parameters:
-
| device | Device pointer to the netdevice for which the device number is needed |
virtual uint32_t ns3::CsmaChannel::GetNDevices |
( |
void |
|
) |
const [virtual] |
- Returns:
- Returns the total number of devices including devices that have been detached from the channel.
Implements ns3::Channel.
uint32_t ns3::CsmaChannel::GetNumActDevices |
( |
void |
|
) |
|
- Returns:
- Returns the number of net devices that are currently attached to the channel.
- Returns:
- Returns the state of the channel (IDLE -- free, TRANSMITTING -- busy, PROPAGATING - busy )
static TypeId ns3::CsmaChannel::GetTypeId |
( |
void |
|
) |
[static] |
This method returns the TypeId associated to ns3::CsmaChannel.
This object is accessible through the following paths with Config::Set and Config::Connect:
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::WimaxNetDevice/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::WimaxNetDevice/Phy/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::WimaxPhy/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/LinkManager/$ns3::Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/LinkManager/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/LinkManager/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/LinkManager/$ns3::WimaxNetDevice/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/LinkManager/$ns3::WimaxNetDevice/Phy/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/LinkManager/$ns3::WimaxPhy/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/SSManager/$ns3::Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/SSManager/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/SSManager/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/SSManager/$ns3::WimaxNetDevice/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/SSManager/$ns3::WimaxNetDevice/Phy/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/SSManager/$ns3::WimaxPhy/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::WimaxNetDevice/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::WimaxNetDevice/Phy/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::WimaxPhy/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/Classifier/$ns3::Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/Classifier/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/Classifier/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/Classifier/$ns3::WimaxNetDevice/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/Classifier/$ns3::WimaxNetDevice/Phy/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/Classifier/$ns3::WimaxPhy/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::WimaxNetDevice/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::WimaxNetDevice/Phy/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::WimaxPhy/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::WimaxNetDevice/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::WimaxNetDevice/Phy/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::WimaxPhy/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::WimaxPhy/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/LinkManager/$ns3::Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/LinkManager/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/LinkManager/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/LinkManager/$ns3::WimaxPhy/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/SSManager/$ns3::Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/SSManager/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/SSManager/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/SSManager/$ns3::WimaxPhy/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::WimaxPhy/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/Classifier/$ns3::Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/Classifier/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/Classifier/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/Classifier/$ns3::WimaxPhy/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::WimaxPhy/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::WimaxPhy/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BandwidthManager/$ns3::Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BandwidthManager/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BandwidthManager/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BandwidthManager/$ns3::WimaxPhy/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BurstProfileManager/$ns3::Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BurstProfileManager/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BurstProfileManager/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BurstProfileManager/$ns3::WimaxPhy/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/ConnectionManager/$ns3::Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/ConnectionManager/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/ConnectionManager/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/ConnectionManager/$ns3::WimaxPhy/Channel/$ns3::CsmaChannel
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Phy/Channel/$ns3::CsmaChannel
Attributes defined for this type:
-
DataRate: The transmission data rate to be provided to devices connected to the channel
-
Set with class: DataRateValue
-
Underlying type: DataRate
-
Initial value: 4294967295bps
-
Flags: construct write read
-
Delay: Transmission delay through the channel
-
Set with class: TimeValue
-
Underlying type: Time
-
Initial value: 0ns
-
Flags: construct write read
Attributes defined in parent class ns3::Channel:
-
Id: The id (unique integer) of this Channel.
No TraceSources defined for this type.
Reimplemented from ns3::Channel.
bool ns3::CsmaChannel::IsActive |
( |
uint32_t |
deviceId |
) |
|
Indicates if a net device is currently attached or detached from the channel.
- Parameters:
-
| deviceId | The ID that was assigned to the net device when it was attached to the channel. |
- Returns:
- Returns true if the net device is attached to the channel, false otherwise.
bool ns3::CsmaChannel::IsBusy |
( |
|
) |
|
Indicates if the channel is busy. The channel will only accept new packets for transmission if it is not busy.
- Returns:
- Returns true if the channel is busy and false if it is free.
void ns3::CsmaChannel::PropagationCompleteEvent |
( |
|
) |
|
Indicates that the channel has finished propagating the current packet. The channel is released and becomes free.
Calls the receive function of every active net device that is attached to the channel.
bool ns3::CsmaChannel::Reattach |
( |
uint32_t |
deviceId |
) |
|
Reattach a previously detached net device to the channel.
The net device is marked as active. It is now allowed to receive or transmit packets. The net device must have been previously attached to the channel using the attach function.
- Parameters:
-
| deviceId | The device ID assigned to the net device when it was connected to the channel |
- Returns:
- True if the device is found and is not attached to the channel, false if the device is currently connected to the channel or can't be found.
Reattach a previously detached net device to the channel.
The net device is marked as active. It is now allowed to receive or transmit packets. The net device must have been previously attached to the channel using the attach function.
- Parameters:
-
| device | Device pointer to the netdevice to detach from the channel |
- Returns:
- True if the device is found and is not attached to the channel, false if the device is currently connected to the channel or can't be found.
bool ns3::CsmaChannel::TransmitEnd |
( |
|
) |
|
Indicates that the net device has finished transmitting the packet over the channel.
The channel will stay busy until the packet has completely propagated to all net devices attached to the channel. The TransmitEnd function schedules the PropagationCompleteEvent which will free the channel for further transmissions. Stores the packet p as the m_currentPkt, the packet being currently transmitting.
- Returns:
- Returns true unless the source was detached before it completed its transmission.
bool ns3::CsmaChannel::TransmitStart |
( |
Ptr< Packet > |
p, |
|
|
uint32_t |
srcId | |
|
) |
| | |
Start transmitting a packet over the channel.
If the srcId belongs to a net device that is connected to the channel, packet transmission begins, and the channel becomes busy until the packet has completely reached all destinations.
- Parameters:
-
| p | A reference to the packet that will be transmitted over the channel |
| srcId | The device Id of the net device that wants to transmit on the channel. |
- Returns:
- True if the channel is not busy and the transmitting net device is currently active.
The documentation for this class was generated from the following files:
- src/devices/csma/csma-channel.h
- doc/introspected-doxygen.h