ns3::SatLoraPhyRx Class Reference

Class adding methods linked to Lora, needed to be used in a satellite context. More...

#include "satellite-lora-phy-rx.h"

+ Inheritance diagram for ns3::SatLoraPhyRx:
+ Collaboration diagram for ns3::SatLoraPhyRx:

Public Types

enum  State { SLEEP , STANDBY , TX , RX }
 
- Public Types inherited from ns3::SatPhyRx
typedef Callback< void, uint32_t, uint32_t, uint32_t, uint8_t, double > AverageNormalizedOfferedLoadCallback
 
typedef Callback< void, uint32_t, uint32_t, Address, Address, double, bool > CnoCallback
 
typedef Callback< void, Ptr< SatSignalParameters >, bool > ReceiveCallback
 

Public Member Functions

 SatLoraPhyRx ()
 Constructor and destructor. More...
 
virtual ~SatLoraPhyRx ()
 
State GetState ()
 
bool IsOnFrequency (double frequency)
 Whether this device is listening on the specified frequency or not. More...
 
bool IsTransmitting (void)
 Whether this device is transmitting or not. More...
 
void SetFrequency (double frequencyMHz)
 Set the frequency this EndDevice will listen on. More...
 
void SetSpreadingFactor (uint8_t sf)
 Set the Spreading Factor this EndDevice will listen for. More...
 
virtual void StartRx (Ptr< SatSignalParameters > rxParams)
 Start receiving a packet. More...
 
void SwitchToRx ()
 Switch to the RX state. More...
 
void SwitchToSleep (void)
 Switch to the SLEEP state. More...
 
void SwitchToStandby (void)
 Switch to the STANDBY state. More...
 
void SwitchToTx ()
 Switch to the TX state. More...
 
- Public Member Functions inherited from ns3::SatPhyRx
 SatPhyRx ()
 Default constructor. More...
 
virtual ~SatPhyRx ()
 Destructor for SatPhyRx. More...
 
void BeginEndScheduling ()
 Begin frame/window end scheduling for processes utilizing frame length as interval. More...
 
void ConfigurePhyRxCarriers (Ptr< SatPhyRxCarrierConf > carrierConf, Ptr< SatSuperframeConf > superFrameConf)
 
virtual void DoDispose ()
 Dispose of this class instance. More...
 
Mac48Address GetAddress () const
 Get MAC address of this PHY/MAC. More...
 
double GetAntennaGain (Ptr< MobilityModel > mobility)
 Get antenna gain based on position or in case that antenna pattern is not configured, maximum configured gain is return. More...
 
uint32_t GetBeamId () const
 Get beam id of this receiver. More...
 
Ptr< NetDevice > GetDevice ()
 
double GetFadingValue (Address macAddress, SatEnums::ChannelType_t channelType)
 Get fading value. More...
 
double GetLosses ()
 Get configures RX losses, currently only antenna loss used. More...
 
Ptr< MobilityModel > GetMobility ()
 
double GetRxTemperatureK (Ptr< SatSignalParameters > rxParams)
 Method for querying the temperature of the chosen carrier. More...
 
uint32_t GetSatId () const
 Get satellite id of this receiver. More...
 
void SetAntennaGainPattern (Ptr< SatAntennaGainPattern > agp, Ptr< SatMobilityModel > mobility)
 
void SetAntennaLoss_Db (double loss_Db)
 Set the Antenna loss in Db. More...
 
void SetAverageNormalizedOfferedLoadCallback (SatPhyRx::AverageNormalizedOfferedLoadCallback cb)
 Set average normalized offered load callback. More...
 
void SetBeamId (uint32_t beamId)
 Set the beam id for all the transmissions from this SatPhyTx. More...
 
void SetCnoCallback (SatPhyRx::CnoCallback cb)
 Set C/N0 receiver. More...
 
void SetDefaultFadingValue (double fadingValue)
 Function for setting the default fading value. More...
 
void SetDevice (Ptr< NetDevice > d)
 
void SetFadingContainer (Ptr< SatBaseFading > fadingContainer)
 Set fading container. More...
 
void SetMaxAntennaGain_Db (double gain_Db)
 Set the maximum Antenna gain in Db. More...
 
void SetMobility (Ptr< MobilityModel > m)
 
void SetNodeInfo (const Ptr< SatNodeInfo > nodeInfo)
 Set the node info class. More...
 
void SetReceiveCallback (SatPhyRx::ReceiveCallback cb)
 Set the upper layer receive callback. More...
 
void SetSatId (uint32_t satId)
 Set the satellite id for all the transmissions from this SatPhyTx. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::SatPhyRx
static TypeId GetTypeId (void)
 inherited from Object More...
 

Private Attributes

double m_frequency
 
uint8_t m_sf
 
State m_state
 

Detailed Description

Class adding methods linked to Lora, needed to be used in a satellite context.

Definition at line 39 of file satellite-lora-phy-rx.h.

Member Enumeration Documentation

◆ State

Enumerator
SLEEP 

The PHY layer is sleeping.

During sleep, the device is not listening for incoming messages.

STANDBY 

The PHY layer is in STANDBY.

When the PHY is in this state, it's listening to the channel, and it's also ready to transmit data passed to it by the MAC layer.

TX 

The PHY layer is sending a packet.

During transmission, the device cannot receive any packet or send any additional packet.

RX 

The PHY layer is receiving a packet.

While the device is locked on an incoming packet, transmission is not possible.

Definition at line 42 of file satellite-lora-phy-rx.h.

Constructor & Destructor Documentation

◆ SatLoraPhyRx()

ns3::SatLoraPhyRx::SatLoraPhyRx ( )

Constructor and destructor.

Definition at line 39 of file satellite-lora-phy-rx.cc.

◆ ~SatLoraPhyRx()

ns3::SatLoraPhyRx::~SatLoraPhyRx ( )
virtual

Definition at line 44 of file satellite-lora-phy-rx.cc.

Member Function Documentation

◆ GetState()

SatLoraPhyRx::State ns3::SatLoraPhyRx::GetState ( )

Definition at line 105 of file satellite-lora-phy-rx.cc.

References m_state.

◆ GetTypeId()

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

Definition at line 33 of file satellite-lora-phy-rx.cc.

◆ IsOnFrequency()

bool ns3::SatLoraPhyRx::IsOnFrequency ( double  frequency)

Whether this device is listening on the specified frequency or not.

Parameters
frequencyThe frequency to query.
Returns
true if the device is listening on that frequency, false otherwise.

Definition at line 87 of file satellite-lora-phy-rx.cc.

References m_frequency.

◆ IsTransmitting()

bool ns3::SatLoraPhyRx::IsTransmitting ( void  )

Whether this device is transmitting or not.

Returns
true if the device is currently transmitting a packet, false otherwise.

Definition at line 81 of file satellite-lora-phy-rx.cc.

◆ SetFrequency()

void ns3::SatLoraPhyRx::SetFrequency ( double  frequencyMHz)

Set the frequency this EndDevice will listen on.

Should a packet be transmitted on a frequency different than that the EndDeviceLoraPhy is listening on, the packet will be discarded.

Parameters
Thefrequency [MHz] to listen to.

Definition at line 93 of file satellite-lora-phy-rx.cc.

References m_frequency.

◆ SetSpreadingFactor()

void ns3::SatLoraPhyRx::SetSpreadingFactor ( uint8_t  sf)

Set the Spreading Factor this EndDevice will listen for.

The EndDeviceLoraPhy object will not be able to lock on transmissions that use a different SF than the one it's listening for.

Parameters
sfThe spreading factor to listen for.

Definition at line 99 of file satellite-lora-phy-rx.cc.

References m_sf.

◆ StartRx()

void ns3::SatLoraPhyRx::StartRx ( Ptr< SatSignalParameters rxParams)
virtual

Start receiving a packet.

Set a few actions then call mother class method.

Parameters
rxParamsAll the info needed.

Reimplemented from ns3::SatPhyRx.

Definition at line 49 of file satellite-lora-phy-rx.cc.

References m_state, RX, SLEEP, STANDBY, ns3::SatPhyRx::StartRx(), and TX.

+ Here is the call graph for this function:

◆ SwitchToRx()

void ns3::SatLoraPhyRx::SwitchToRx ( void  )

Switch to the RX state.

Definition at line 119 of file satellite-lora-phy-rx.cc.

References m_state, RX, and STANDBY.

◆ SwitchToSleep()

void ns3::SatLoraPhyRx::SwitchToSleep ( void  )

Switch to the SLEEP state.

Definition at line 139 of file satellite-lora-phy-rx.cc.

References m_state, SLEEP, and STANDBY.

◆ SwitchToStandby()

void ns3::SatLoraPhyRx::SwitchToStandby ( void  )

Switch to the STANDBY state.

Definition at line 111 of file satellite-lora-phy-rx.cc.

References m_state, and STANDBY.

◆ SwitchToTx()

void ns3::SatLoraPhyRx::SwitchToTx ( )

Switch to the TX state.

Definition at line 129 of file satellite-lora-phy-rx.cc.

References m_state, RX, and TX.

Member Data Documentation

◆ m_frequency

double ns3::SatLoraPhyRx::m_frequency
private

Definition at line 153 of file satellite-lora-phy-rx.h.

Referenced by IsOnFrequency(), and SetFrequency().

◆ m_sf

uint8_t ns3::SatLoraPhyRx::m_sf
private

Definition at line 156 of file satellite-lora-phy-rx.h.

Referenced by SetSpreadingFactor().

◆ m_state

State ns3::SatLoraPhyRx::m_state
private

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