ns3::PointToPointIslChannel Class Reference

Point to Point ISL Channel. More...

#include "satellite-point-to-point-isl-channel.h"

+ Inheritance diagram for ns3::PointToPointIslChannel:
+ Collaboration diagram for ns3::PointToPointIslChannel:

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< PointToPointIslNetDeviceGetPointToPointIslDevice (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< PointToPointIslNetDeviceGetDestination (uint32_t i) const
 Get the destination net-device. More...
 
Ptr< PointToPointIslNetDeviceGetSource (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...
 

Detailed Description

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 56 of file satellite-point-to-point-isl-channel.h.

Member Enumeration Documentation

◆ WireState

Wire states.

Enumerator
INITIALIZING 

Initializing state.

IDLE 

Idle state (no transmission from NetDevice)

TRANSMITTING 

Transmitting state (data being transmitted from NetDevice.

PROPAGATING 

Propagating state (data is being propagated in the channel.

Definition at line 165 of file satellite-point-to-point-isl-channel.h.

Constructor & Destructor Documentation

◆ PointToPointIslChannel()

ns3::PointToPointIslChannel::PointToPointIslChannel ( )

Create a PointToPointIslChannel.

Definition at line 51 of file satellite-point-to-point-isl-channel.cc.

Member Function Documentation

◆ Attach()

void ns3::PointToPointIslChannel::Attach ( Ptr< PointToPointIslNetDevice device)

Attach a given netdevice to this channel.

Parameters
devicepointer to the netdevice to attach to the channel

Definition at line 59 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().

+ Here is the caller graph for this function:

◆ GetDelay()

Time ns3::PointToPointIslChannel::GetDelay ( Ptr< MobilityModel >  senderMobility,
Ptr< MobilityModel >  receiverMobility 
) const
protected

Get the delay between two nodes on this channel.

Parameters
senderMobilitylocation of the sender
receiverMobilitylocation of the receiver
Returns
Time delay

Definition at line 133 of file satellite-point-to-point-isl-channel.cc.

References m_propagationSpeed.

Referenced by TransmitStart().

+ Here is the caller graph for this function:

◆ GetDestination()

Ptr< PointToPointIslNetDevice > ns3::PointToPointIslChannel::GetDestination ( uint32_t  i) const
protected

Get the destination net-device.

Parameters
ithe link requested
Returns
Ptr to destination PointToPointIslNetDevice for the specified link

Definition at line 151 of file satellite-point-to-point-isl-channel.cc.

References ns3::PointToPointIslChannel::Link::m_dst, and m_link.

◆ GetDevice()

Ptr< NetDevice > ns3::PointToPointIslChannel::GetDevice ( std::size_t  i) const
virtual

Get NetDevice corresponding to index i on this channel.

Parameters
iIndex number of the device requested
Returns
Ptr to NetDevice requested

Definition at line 125 of file satellite-point-to-point-isl-channel.cc.

References GetPointToPointIslDevice().

+ Here is the call graph for this function:

◆ GetNDevices()

std::size_t ns3::PointToPointIslChannel::GetNDevices ( void  ) const
virtual

Get number of devices on this channel.

Returns
number of devices on this channel

Definition at line 108 of file satellite-point-to-point-isl-channel.cc.

References m_nDevices.

◆ GetPointToPointIslDevice()

Ptr< PointToPointIslNetDevice > ns3::PointToPointIslChannel::GetPointToPointIslDevice ( std::size_t  i) const

Get PointToPointIslNetDevice corresponding to index i on this channel.

Parameters
iIndex number of the device requested
Returns
Ptr to PointToPointIslNetDevice requested

Definition at line 116 of file satellite-point-to-point-isl-channel.cc.

References m_link, and ns3::PointToPointIslChannel::Link::m_src.

Referenced by GetDevice().

+ Here is the caller graph for this function:

◆ GetSource()

Ptr< PointToPointIslNetDevice > ns3::PointToPointIslChannel::GetSource ( uint32_t  i) const
protected

Get the source net-device.

Parameters
ithe link (direction) requested
Returns
Ptr to source PointToPointIslNetDevice for the specified link

Definition at line 143 of file satellite-point-to-point-isl-channel.cc.

References m_link, and ns3::PointToPointIslChannel::Link::m_src.

◆ GetTypeId()

TypeId ns3::PointToPointIslChannel::GetTypeId ( void  )
static

Get the TypeId.

Returns
The TypeId for this class

Definition at line 37 of file satellite-point-to-point-isl-channel.cc.

References m_propagationSpeed, and ns3::SatConstVariables::SPEED_OF_LIGHT.

◆ IsInitialized()

bool ns3::PointToPointIslChannel::IsInitialized ( void  ) const
protected

Check to make sure the link is initialized.

Returns
true if initialized, asserts otherwise

Definition at line 159 of file satellite-point-to-point-isl-channel.cc.

References INITIALIZING, and m_link.

◆ TransmitStart()

bool ns3::PointToPointIslChannel::TransmitStart ( Ptr< const Packet >  p,
Ptr< PointToPointIslNetDevice src,
Ptr< Node >  dst,
Time  txTime 
)
virtual

Transmit a packet over this channel.

Parameters
pPacket to transmit
srcsource PointToPointIslNetDevice
dstnode at the other end of the channel
txTimetransmission time
Returns
true if successful (always true)

Definition at line 81 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().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_link

Link ns3::PointToPointIslChannel::m_link[N_DEVICES]
private

◆ m_nDevices

std::size_t ns3::PointToPointIslChannel::m_nDevices
private

Devices of this channel.

Definition at line 160 of file satellite-point-to-point-isl-channel.h.

Referenced by Attach(), and GetNDevices().

◆ m_propagationSpeed

double ns3::PointToPointIslChannel::m_propagationSpeed
private

propagation speed on the channel

Definition at line 159 of file satellite-point-to-point-isl-channel.h.

Referenced by GetDelay(), and GetTypeId().

◆ N_DEVICES

const std::size_t ns3::PointToPointIslChannel::N_DEVICES = 2
staticprivate

Each point to point link has exactly two net devices.

Definition at line 157 of file satellite-point-to-point-isl-channel.h.

Referenced by Attach().


The documentation for this class was generated from the following files: