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" 142 bool Detach (uint32_t deviceId);
uint32_t m_currentSrc
Device Id of the source that is currently transmitting on the channel.
Simulation virtual time values and 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.
virtual std::size_t GetNDevices(void) const
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.
DataRate m_bps
The assigned data rate of the channel.
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.
Ptr< CsmaNetDevice > GetCsmaDevice(std::size_t i) const
WireState
Current state of the channel.
bool IsActive(uint32_t deviceId)
Indicates if a net device is currently attached or detached from the channel.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void PropagationCompleteEvent()
Indicates that the channel has finished propagating the current packet.
int32_t GetDeviceNum(Ptr< CsmaNetDevice > device)
CsmaChannel & operator=(CsmaChannel const &o)
Operator = is declared but not implemented.
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
Is net device enabled to TX/RX.
DataRate GetDataRate(void)
Get the assigned data rate of the channel.
bool TransmitStart(Ptr< const Packet > p, uint32_t srcId)
Start transmitting a packet over the channel.
Ptr< CsmaNetDevice > devicePtr
Pointer to the net device.
virtual Ptr< NetDevice > GetDevice(std::size_t i) const
bool Reattach(uint32_t deviceId)
Reattach a previously detached net device to the channel.
a unique identifier for an interface.
static TypeId GetTypeId(void)
Get the type ID.