31 #include <ns3/boolean.h>
32 #include <ns3/double.h>
35 #include <ns3/object-factory.h>
36 #include <ns3/simulator.h>
41 NS_LOG_COMPONENT_DEFINE(
"SatPhyTx");
46 NS_OBJECT_ENSURE_REGISTERED(SatPhyTx);
50 m_state(RECONFIGURING),
53 m_defaultFadingValue()
55 NS_LOG_FUNCTION(
this);
60 NS_LOG_FUNCTION(
this);
66 NS_LOG_FUNCTION(
this);
85 os <<
"RECONFIGURING";
98 TypeId(
"ns3::SatPhyTx")
100 .AddAttribute(
"TxMode",
101 "Tx mode of this Phy Tx.",
107 "Transparent Tx mode"));
114 NS_LOG_FUNCTION(
this << gain_db);
122 NS_LOG_FUNCTION(
this);
130 Ptr<SatMobilityModel> m = DynamicCast<SatMobilityModel>(mobility);
145 NS_LOG_FUNCTION(
this << fadingValue);
153 NS_LOG_FUNCTION(
this << macAddress << channelType);
168 NS_LOG_FUNCTION(
this);
177 NS_LOG_FUNCTION(
this);
186 NS_LOG_FUNCTION(
this << m);
195 NS_LOG_FUNCTION(
this);
205 NS_LOG_FUNCTION(
this << c);
215 NS_LOG_FUNCTION(
this);
225 NS_LOG_FUNCTION(
this);
234 NS_LOG_FUNCTION(
this << newState);
235 NS_LOG_INFO(
this <<
" state: " <<
m_state <<
" -> " << newState);
242 NS_LOG_FUNCTION(
this << txParams);
243 NS_LOG_INFO(
"State: " <<
m_state);
248 NS_FATAL_ERROR(
"cannot TX while already TX: the MAC should avoid this");
280 NS_FATAL_ERROR(
"unknown state");
288 NS_LOG_FUNCTION(
this);
289 NS_LOG_INFO(
this <<
" state: " <<
m_state);
293 NS_FATAL_ERROR(
"SatPhyTx::EndTx - unexpected state!");
302 NS_LOG_FUNCTION(
this << satId);
309 NS_LOG_FUNCTION(
this << beamId);
316 NS_LOG_FUNCTION(
this);
324 NS_LOG_FUNCTION(
this);
ChannelType_t
Types of channel.
void SetDefaultFadingValue(double fadingValue)
Function for setting the default fading value.
void SetSatId(uint32_t satId)
Set the satellite id for all the transmissions from this SatPhyTx.
bool CanTransmit(void) const
Tell whether or not this channel can transmit data.
Ptr< SatAntennaGainPattern > m_antennaGainPattern
void SetChannel(Ptr< SatChannel > c)
double m_maxAntennaGain
Configured maximum antenna gain in linear.
double GetFadingValue(Address macAddress, SatEnums::ChannelType_t channelType)
Get fading value.
Ptr< MobilityModel > m_mobility
Ptr< MobilityModel > GetMobility()
void SetAntennaGainPattern(Ptr< SatAntennaGainPattern > agp, Ptr< SatMobilityModel > mobility)
bool IsTransmitting(void) const
Tell whether or not this channel is transmitting data.
void SetBeamId(uint32_t beamId)
Set the beam id for all the transmissions from this SatPhyTx.
double m_defaultFadingValue
Default fading value.
void ChangeState(State newState)
virtual void StartTx(Ptr< SatSignalParameters > txParams)
Start packet transmission to the channel.
void SetMobility(Ptr< MobilityModel > m)
Ptr< SatMobilityModel > m_satMobility
SatPhyTx()
Default constructor.
Ptr< SatBaseFading > m_fadingContainer
Fading container for fading model.
Ptr< SatChannel > GetChannel()
double GetAntennaGain(Ptr< MobilityModel > mobility)
Get antenna gain based on position or in case that antenna pattern is not configured,...
Ptr< SatChannel > m_channel
virtual ~SatPhyTx()
Destructor for SatPhyTx.
virtual void DoDispose()
Dispose of this class instance.
void SetMaxAntennaGain_Db(double gain_db)
Set the maximum Antenna gain in Db.
void SetFadingContainer(Ptr< SatBaseFading > fadingContainer)
Set fading container.
static TypeId GetTypeId(void)
inherited from Object
static T DbToLinear(T db)
Converts decibels to linear.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.
std::ostream & operator<<(std::ostream &os, const GeoCoordinate &coordinate)