ns3::SatSimpleChannel Class Reference

The satellite simple channel, for satellite public and backbone networks. More...

#include "satellite-simple-channel.h"

+ Inheritance diagram for ns3::SatSimpleChannel:
+ Collaboration diagram for ns3::SatSimpleChannel:

Public Member Functions

 SatSimpleChannel ()
 Default constructor. More...
 
virtual void Add (Ptr< SatSimpleNetDevice > device)
 Attached a net device to the channel. More...
 
virtual Ptr< NetDevice > GetDevice (std::size_t i) const
 
virtual std::size_t GetNDevices (void) const
 
virtual void Send (Ptr< Packet > p, uint16_t protocol, Mac48Address to, Mac48Address from, Ptr< SatSimpleNetDevice > sender)
 A packet is sent by a net device. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 Get the type ID. More...
 

Private Attributes

std::vector< Ptr< SatSimpleNetDevice > > m_devices
 

Detailed Description

The satellite simple channel, for satellite public and backbone networks.

Based on ns-3 SimpleChannel (implementation is identically same than in SimpleChannel, but needed to re-implemented in order to use by SatSimpleNetDevice)

Definition at line 40 of file satellite-simple-channel.h.

Constructor & Destructor Documentation

◆ SatSimpleChannel()

ns3::SatSimpleChannel::SatSimpleChannel ( )

Default constructor.

Definition at line 45 of file satellite-simple-channel.cc.

Member Function Documentation

◆ Add()

void ns3::SatSimpleChannel::Add ( Ptr< SatSimpleNetDevice device)
virtual

Attached a net device to the channel.

Parameters
devicethe device to attach to the channel

Definition at line 79 of file satellite-simple-channel.cc.

References m_devices.

◆ GetDevice()

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

Definition at line 93 of file satellite-simple-channel.cc.

References m_devices.

◆ GetNDevices()

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

Definition at line 86 of file satellite-simple-channel.cc.

References m_devices.

◆ GetTypeId()

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

Get the type ID.

Returns
the object TypeId

Definition at line 38 of file satellite-simple-channel.cc.

◆ Send()

void ns3::SatSimpleChannel::Send ( Ptr< Packet >  p,
uint16_t  protocol,
Mac48Address  to,
Mac48Address  from,
Ptr< SatSimpleNetDevice sender 
)
virtual

A packet is sent by a net device.

A receive event will be scheduled for all net device connected to the channel other than the net device who sent the packet

Parameters
ppacket to be sent
protocolprotocol number
toaddress to send packet to
fromaddress the packet is coming from
sendernet device who sent the packet

Definition at line 51 of file satellite-simple-channel.cc.

References m_devices, and ns3::SatSimpleNetDevice::Receive().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_devices

std::vector<Ptr<SatSimpleNetDevice> > ns3::SatSimpleChannel::m_devices
private

Definition at line 84 of file satellite-simple-channel.h.

Referenced by Add(), GetDevice(), GetNDevices(), and Send().


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