21 #ifndef CSMA_CHANNEL_H
22 #define CSMA_CHANNEL_H
24 #include "ns3/channel.h"
26 #include "ns3/nstime.h"
27 #include "ns3/data-rate.h"
123 bool Detach (uint32_t deviceId);
uint32_t m_currentSrc
Device Id of the source that is currently transmitting on the channel.
keep track of time values and allow control of global simulation resolution
smart pointer class similar to boost::intrusive_ptr
WireState m_state
Current state of the channel.
uint32_t GetNumActDevices(void)
Channel is IDLE, no packet is being transmitted.
Abstract Channel Base Class.
std::vector< CsmaDeviceRec > m_deviceList
List of the net devices that have been or are currently connected to the channel. ...
Ptr< Packet > m_currentPkt
The Packet that is currently being transmitted on the channel (or last packet to have been transmitte...
Class for representing data rates.
virtual ~CsmaChannel()
Destroy a CsmaChannel.
Channel is BUSY, a packet is being written by a net device.
bool Detach(Ptr< CsmaNetDevice > device)
Detach a given netdevice from this channel.
virtual uint32_t GetNDevices(void) const
DataRate m_bps
The assigned data rate of the channel.
virtual Ptr< NetDevice > GetDevice(uint32_t i) const
Time m_delay
The assigned speed-of-light delay of the channel.
Time GetDelay(void)
Get the assigned speed-of-light delay of the channel.
int32_t Attach(Ptr< CsmaNetDevice > device)
Attach a given netdevice to this channel.
Channel is BUSY, packet is propagating to all attached net devices.
WireState
Current state of the channel.
bool IsActive(uint32_t deviceId)
Indicates if a net device is currently attached or detached from the channel.
void PropagationCompleteEvent()
Indicates that the channel has finished propagating the current packet.
CsmaDeviceRec()
Is net device enabled to TX/RX.
int32_t GetDeviceNum(Ptr< CsmaNetDevice > device)
CsmaChannel()
Create a CsmaChannel.
bool TransmitEnd()
Indicates that the net device has finished transmitting the packet over the channel.
bool IsBusy()
Indicates if the channel is busy.
bool active
Pointer to the net device.
DataRate GetDataRate(void)
Get the assigned data rate of the channel.
Ptr< CsmaNetDevice > GetCsmaDevice(uint32_t i) const
Ptr< CsmaNetDevice > devicePtr
bool Reattach(uint32_t deviceId)
Reattach a previously detached net device to the channel.
a unique identifier for an interface.
bool TransmitStart(Ptr< Packet > p, uint32_t srcId)
Start transmitting a packet over the channel.
static TypeId GetTypeId(void)
CsmaChannel & operator=(CsmaChannel const &)