The SatellitePhyTx models the physical layer transmitter of satellite system. More...
#include "satellite-phy-tx.h"
Public Types | |
enum | SatPhyTxMode_t { NORMAL , TRANSPARENT } |
enum | State { IDLE , TX , RECONFIGURING } |
PHY states. More... | |
Public Member Functions | |
SatPhyTx () | |
Default constructor. More... | |
virtual | ~SatPhyTx () |
Destructor for SatPhyTx. More... | |
bool | CanTransmit (void) const |
Tell whether or not this channel can transmit data. More... | |
void | ClearChannel () |
virtual void | DoDispose () |
Dispose of this class instance. 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... | |
Ptr< SatChannel > | GetChannel () |
double | GetFadingValue (Address macAddress, SatEnums::ChannelType_t channelType) |
Get fading value. More... | |
Ptr< MobilityModel > | GetMobility () |
bool | IsTransmitting (void) const |
Tell whether or not this channel is transmitting data. More... | |
void | SetAntennaGainPattern (Ptr< SatAntennaGainPattern > agp, Ptr< SatMobilityModel > mobility) |
void | SetBeamId (uint32_t beamId) |
Set the beam id for all the transmissions from this SatPhyTx. More... | |
void | SetChannel (Ptr< SatChannel > c) |
void | SetDefaultFadingValue (double fadingValue) |
Function for setting the default fading value. More... | |
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 | SetSatId (uint32_t satId) |
Set the satellite id for all the transmissions from this SatPhyTx. More... | |
virtual void | StartTx (Ptr< SatSignalParameters > txParams) |
Start packet transmission to the channel. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
inherited from Object More... | |
Protected Member Functions | |
virtual void | EndTx () |
Private Member Functions | |
void | ChangeState (State newState) |
Private Attributes | |
Ptr< SatAntennaGainPattern > | m_antennaGainPattern |
uint32_t | m_beamId |
Ptr< SatChannel > | m_channel |
double | m_defaultFadingValue |
Default fading value. More... | |
Ptr< SatBaseFading > | m_fadingContainer |
Fading container for fading model. More... | |
double | m_maxAntennaGain |
Configured maximum antenna gain in linear. More... | |
Ptr< MobilityModel > | m_mobility |
uint32_t | m_satId |
Ptr< SatMobilityModel > | m_satMobility |
State | m_state |
SatPhyTxMode_t | m_txMode |
The SatellitePhyTx models the physical layer transmitter of satellite system.
Definition at line 51 of file satellite-phy-tx.h.
Enumerator | |
---|---|
NORMAL | |
TRANSPARENT |
Definition at line 54 of file satellite-phy-tx.h.
enum ns3::SatPhyTx::State |
ns3::SatPhyTx::SatPhyTx | ( | ) |
Default constructor.
Definition at line 48 of file satellite-phy-tx.cc.
|
virtual |
Destructor for SatPhyTx.
Definition at line 58 of file satellite-phy-tx.cc.
bool ns3::SatPhyTx::CanTransmit | ( | void | ) | const |
Tell whether or not this channel can transmit data.
Definition at line 322 of file satellite-phy-tx.cc.
References m_state, and RECONFIGURING.
|
private |
Definition at line 232 of file satellite-phy-tx.cc.
References m_state.
Referenced by ClearChannel(), EndTx(), SetChannel(), and StartTx().
void ns3::SatPhyTx::ClearChannel | ( | ) |
Definition at line 213 of file satellite-phy-tx.cc.
References ChangeState(), m_channel, and RECONFIGURING.
|
virtual |
Dispose of this class instance.
Definition at line 64 of file satellite-phy-tx.cc.
References m_channel, m_fadingContainer, and m_mobility.
|
protectedvirtual |
Reimplemented in ns3::SatLoraPhyTx.
Definition at line 286 of file satellite-phy-tx.cc.
References ChangeState(), IDLE, m_state, and TX.
Referenced by ns3::SatLoraPhyTx::EndTx(), and StartTx().
double ns3::SatPhyTx::GetAntennaGain | ( | Ptr< MobilityModel > | mobility | ) |
Get antenna gain based on position or in case that antenna pattern is not configured, maximum configured gain is return.
mobility | Mobility used to get gain from antenna pattern |
If antenna gain pattern is not set, we use the set maximum antenna gain.
Definition at line 120 of file satellite-phy-tx.cc.
References m_antennaGainPattern, m_maxAntennaGain, and m_satMobility.
Ptr< SatChannel > ns3::SatPhyTx::GetChannel | ( | void | ) |
Definition at line 223 of file satellite-phy-tx.cc.
References m_channel.
double ns3::SatPhyTx::GetFadingValue | ( | Address | macAddress, |
SatEnums::ChannelType_t | channelType | ||
) |
Get fading value.
macAddress | MAC address |
channelType | channel type |
Definition at line 151 of file satellite-phy-tx.cc.
References m_defaultFadingValue, and m_fadingContainer.
Ptr< MobilityModel > ns3::SatPhyTx::GetMobility | ( | ) |
Definition at line 175 of file satellite-phy-tx.cc.
References m_mobility.
|
static |
inherited from Object
Definition at line 95 of file satellite-phy-tx.cc.
References m_txMode, NORMAL, and TRANSPARENT.
bool ns3::SatPhyTx::IsTransmitting | ( | void | ) | const |
Tell whether or not this channel is transmitting data.
Definition at line 314 of file satellite-phy-tx.cc.
Referenced by ns3::SatLoraPhyTx::IsTransmitting().
void ns3::SatPhyTx::SetAntennaGainPattern | ( | Ptr< SatAntennaGainPattern > | agp, |
Ptr< SatMobilityModel > | mobility | ||
) |
Definition at line 193 of file satellite-phy-tx.cc.
References m_antennaGainPattern, and m_satMobility.
void ns3::SatPhyTx::SetBeamId | ( | uint32_t | beamId | ) |
Set the beam id for all the transmissions from this SatPhyTx.
beamId | the Beam Identifier |
Definition at line 307 of file satellite-phy-tx.cc.
References m_beamId.
void ns3::SatPhyTx::SetChannel | ( | Ptr< SatChannel > | c | ) |
Definition at line 203 of file satellite-phy-tx.cc.
References ChangeState(), IDLE, and m_channel.
void ns3::SatPhyTx::SetDefaultFadingValue | ( | double | fadingValue | ) |
Function for setting the default fading value.
fadingValue | default fading value |
Definition at line 143 of file satellite-phy-tx.cc.
References m_defaultFadingValue.
void ns3::SatPhyTx::SetFadingContainer | ( | Ptr< SatBaseFading > | fadingContainer | ) |
Set fading container.
fadingContainer | fading container |
Definition at line 166 of file satellite-phy-tx.cc.
References m_fadingContainer.
void ns3::SatPhyTx::SetMaxAntennaGain_Db | ( | double | gain_db | ) |
Set the maximum Antenna gain in Db.
gain_db | maximum antenna gain in Dbs |
Definition at line 112 of file satellite-phy-tx.cc.
References ns3::SatUtils::DbToLinear(), and m_maxAntennaGain.
void ns3::SatPhyTx::SetMobility | ( | Ptr< MobilityModel > | m | ) |
Definition at line 184 of file satellite-phy-tx.cc.
References m_mobility.
void ns3::SatPhyTx::SetSatId | ( | uint32_t | satId | ) |
Set the satellite id for all the transmissions from this SatPhyTx.
satId | the satellite Identifier |
Definition at line 300 of file satellite-phy-tx.cc.
References m_satId.
|
virtual |
Start packet transmission to the channel.
txParams | Transmission parameters for a packet |
The SatPhyTx is mapped to a spot-beam, which means that there may be several carriers handled by the same SatPhyTx. This is why the SatPhyTx state machine needs to be overtaken, thus the SatPhyTx is allowed to send several overlapping packets; in different carriers though. TODO: The SatPhyTx state machine may need some (code quality) improvements. E.g. different inherited implementations may be done for satellite and terrestrial domain nodes.
Reimplemented in ns3::SatLoraPhyTx.
Definition at line 240 of file satellite-phy-tx.cc.
References ChangeState(), EndTx(), IDLE, m_channel, m_state, m_txMode, RECONFIGURING, TRANSPARENT, and TX.
Referenced by ns3::SatLoraPhyTx::StartTx().
|
private |
Definition at line 179 of file satellite-phy-tx.h.
Referenced by GetAntennaGain(), and SetAntennaGainPattern().
|
private |
Definition at line 193 of file satellite-phy-tx.h.
Referenced by SetBeamId().
|
private |
Definition at line 174 of file satellite-phy-tx.h.
Referenced by ClearChannel(), DoDispose(), GetChannel(), SetChannel(), and StartTx().
|
private |
Default fading value.
Definition at line 204 of file satellite-phy-tx.h.
Referenced by GetFadingValue(), and SetDefaultFadingValue().
|
private |
Fading container for fading model.
Definition at line 199 of file satellite-phy-tx.h.
Referenced by DoDispose(), GetFadingValue(), and SetFadingContainer().
|
private |
Configured maximum antenna gain in linear.
Definition at line 189 of file satellite-phy-tx.h.
Referenced by GetAntennaGain(), and SetMaxAntennaGain_Db().
|
private |
Definition at line 173 of file satellite-phy-tx.h.
Referenced by DoDispose(), GetMobility(), and SetMobility().
|
private |
Definition at line 192 of file satellite-phy-tx.h.
Referenced by SetSatId().
|
private |
Definition at line 184 of file satellite-phy-tx.h.
Referenced by GetAntennaGain(), and SetAntennaGainPattern().
|
private |
Definition at line 191 of file satellite-phy-tx.h.
Referenced by CanTransmit(), ChangeState(), EndTx(), IsTransmitting(), and StartTx().
|
private |
Definition at line 194 of file satellite-phy-tx.h.
Referenced by GetTypeId(), and StartTx().