Point to Point ISL Channel. More...
#include "satellite-point-to-point-isl-channel.h"
Classes | |
class | Link |
Wire model for the PointToPointIslChannel. More... | |
Public Member Functions | |
PointToPointIslChannel () | |
Create a PointToPointIslChannel. More... | |
void | Attach (Ptr< PointToPointIslNetDevice > device) |
Attach a given netdevice to this channel. More... | |
virtual Ptr< NetDevice > | GetDevice (std::size_t i) const |
Get NetDevice corresponding to index i on this channel. More... | |
virtual std::size_t | GetNDevices (void) const |
Get number of devices on this channel. More... | |
Ptr< PointToPointIslNetDevice > | GetPointToPointIslDevice (std::size_t i) const |
Get PointToPointIslNetDevice corresponding to index i on this channel. More... | |
virtual bool | TransmitStart (Ptr< const Packet > p, Ptr< PointToPointIslNetDevice > src, Ptr< Node > dst, Time txTime) |
Transmit a packet over this channel. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Get the TypeId. More... | |
Protected Member Functions | |
Time | GetDelay (Ptr< MobilityModel > senderMobility, Ptr< MobilityModel > receiverMobility) const |
Get the delay between two nodes on this channel. More... | |
Ptr< PointToPointIslNetDevice > | GetDestination (uint32_t i) const |
Get the destination net-device. More... | |
Ptr< PointToPointIslNetDevice > | GetSource (uint32_t i) const |
Get the source net-device. More... | |
bool | IsInitialized (void) const |
Check to make sure the link is initialized. More... | |
Private Types | |
enum | WireState { INITIALIZING , IDLE , TRANSMITTING , PROPAGATING } |
Wire states. More... | |
Private Attributes | |
Link | m_link [N_DEVICES] |
Link model. More... | |
std::size_t | m_nDevices |
Devices of this channel. More... | |
double | m_propagationSpeed |
propagation speed on the channel More... | |
Static Private Attributes | |
static const std::size_t | N_DEVICES = 2 |
Each point to point link has exactly two net devices. More... | |
Point to Point ISL Channel.
Channel connecting two satellites
This class represents a very simple point to point channel. Think full duplex RS-232 or RS-422 with null modem and no handshaking. There is no multi-drop capability on this channel – there can be a maximum of two point-to-point net devices connected.
There are two "wires" in the channel. The first device connected gets the [0] wire to transmit on. The second device gets the [1] wire. There is a state (IDLE, TRANSMITTING) associated with each wire.
(PointToPointChannel with mobile nodes)
Definition at line 60 of file satellite-point-to-point-isl-channel.h.
|
private |
Wire states.
Definition at line 169 of file satellite-point-to-point-isl-channel.h.
ns3::PointToPointIslChannel::PointToPointIslChannel | ( | ) |
Create a PointToPointIslChannel.
Definition at line 54 of file satellite-point-to-point-isl-channel.cc.
void ns3::PointToPointIslChannel::Attach | ( | Ptr< PointToPointIslNetDevice > | device | ) |
Attach a given netdevice to this channel.
device | pointer to the netdevice to attach to the channel |
Definition at line 62 of file satellite-point-to-point-isl-channel.cc.
References IDLE, ns3::PointToPointIslChannel::Link::m_dst, m_link, m_nDevices, ns3::PointToPointIslChannel::Link::m_src, ns3::PointToPointIslChannel::Link::m_state, and N_DEVICES.
Referenced by ns3::PointToPointIslHelper::Install().
|
protected |
Get the delay between two nodes on this channel.
senderMobility | location of the sender |
receiverMobility | location of the receiver |
Definition at line 136 of file satellite-point-to-point-isl-channel.cc.
References m_propagationSpeed.
Referenced by TransmitStart().
|
protected |
Get the destination net-device.
i | the link requested |
Definition at line 155 of file satellite-point-to-point-isl-channel.cc.
References ns3::PointToPointIslChannel::Link::m_dst, and m_link.
|
virtual |
Get NetDevice corresponding to index i on this channel.
i | Index number of the device requested |
Definition at line 128 of file satellite-point-to-point-isl-channel.cc.
References GetPointToPointIslDevice().
|
virtual |
Get number of devices on this channel.
Definition at line 111 of file satellite-point-to-point-isl-channel.cc.
References m_nDevices.
Ptr< PointToPointIslNetDevice > ns3::PointToPointIslChannel::GetPointToPointIslDevice | ( | std::size_t | i | ) | const |
Get PointToPointIslNetDevice corresponding to index i on this channel.
i | Index number of the device requested |
Definition at line 119 of file satellite-point-to-point-isl-channel.cc.
References m_link, and ns3::PointToPointIslChannel::Link::m_src.
Referenced by GetDevice().
|
protected |
Get the source net-device.
i | the link (direction) requested |
Definition at line 147 of file satellite-point-to-point-isl-channel.cc.
References m_link, and ns3::PointToPointIslChannel::Link::m_src.
|
static |
Get the TypeId.
Definition at line 40 of file satellite-point-to-point-isl-channel.cc.
References m_propagationSpeed, and ns3::SatConstVariables::SPEED_OF_LIGHT.
|
protected |
Check to make sure the link is initialized.
Definition at line 163 of file satellite-point-to-point-isl-channel.cc.
References INITIALIZING, and m_link.
|
virtual |
Transmit a packet over this channel.
p | Packet to transmit |
src | source PointToPointIslNetDevice |
dst | node at the other end of the channel |
txTime | transmission time |
Definition at line 84 of file satellite-point-to-point-isl-channel.cc.
References GetDelay(), INITIALIZING, ns3::PointToPointIslChannel::Link::m_dst, m_link, ns3::PointToPointIslChannel::Link::m_src, and ns3::PointToPointIslNetDevice::Receive().
Link model.
Definition at line 202 of file satellite-point-to-point-isl-channel.h.
Referenced by Attach(), GetDestination(), GetPointToPointIslDevice(), GetSource(), IsInitialized(), and TransmitStart().
|
private |
Devices of this channel.
Definition at line 164 of file satellite-point-to-point-isl-channel.h.
Referenced by Attach(), and GetNDevices().
|
private |
propagation speed on the channel
Definition at line 163 of file satellite-point-to-point-isl-channel.h.
Referenced by GetDelay(), and GetTypeId().
|
staticprivate |
Each point to point link has exactly two net devices.
Definition at line 161 of file satellite-point-to-point-isl-channel.h.
Referenced by Attach().