Class adding methods linked to Lora, needed to be used in a satellite context. More...
#include "satellite-lora-phy-rx.h"
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 |
Class adding methods linked to Lora, needed to be used in a satellite context.
Definition at line 41 of file satellite-lora-phy-rx.h.
Definition at line 44 of file satellite-lora-phy-rx.h.
ns3::SatLoraPhyRx::SatLoraPhyRx | ( | ) |
Constructor and destructor.
Definition at line 39 of file satellite-lora-phy-rx.cc.
|
virtual |
Definition at line 44 of file satellite-lora-phy-rx.cc.
SatLoraPhyRx::State ns3::SatLoraPhyRx::GetState | ( | ) |
Definition at line 105 of file satellite-lora-phy-rx.cc.
References m_state.
|
static |
Definition at line 33 of file satellite-lora-phy-rx.cc.
bool ns3::SatLoraPhyRx::IsOnFrequency | ( | double | frequency | ) |
Whether this device is listening on the specified frequency or not.
frequency | The frequency to query. |
Definition at line 87 of file satellite-lora-phy-rx.cc.
References m_frequency.
bool ns3::SatLoraPhyRx::IsTransmitting | ( | void | ) |
Whether this device is transmitting or not.
Definition at line 81 of file satellite-lora-phy-rx.cc.
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.
The | frequency [MHz] to listen to. |
Definition at line 93 of file satellite-lora-phy-rx.cc.
References m_frequency.
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.
sf | The spreading factor to listen for. |
Definition at line 99 of file satellite-lora-phy-rx.cc.
References m_sf.
|
virtual |
Start receiving a packet.
Set a few actions then call mother class method.
rxParams | All 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.
void ns3::SatLoraPhyRx::SwitchToRx | ( | void | ) |
Switch to the RX state.
Definition at line 119 of file satellite-lora-phy-rx.cc.
void ns3::SatLoraPhyRx::SwitchToSleep | ( | void | ) |
Switch to the SLEEP state.
Definition at line 139 of file satellite-lora-phy-rx.cc.
void ns3::SatLoraPhyRx::SwitchToStandby | ( | void | ) |
Switch to the STANDBY state.
Definition at line 111 of file satellite-lora-phy-rx.cc.
void ns3::SatLoraPhyRx::SwitchToTx | ( | ) |
Switch to the TX state.
Definition at line 129 of file satellite-lora-phy-rx.cc.
|
private |
Definition at line 155 of file satellite-lora-phy-rx.h.
Referenced by IsOnFrequency(), and SetFrequency().
|
private |
Definition at line 158 of file satellite-lora-phy-rx.h.
Referenced by SetSpreadingFactor().
|
private |
Definition at line 152 of file satellite-lora-phy-rx.h.
Referenced by GetState(), StartRx(), SwitchToRx(), SwitchToSleep(), SwitchToStandby(), and SwitchToTx().