29NS_LOG_COMPONENT_DEFINE(
"LoraGatewayStatus");
40 TypeId(
"ns3::LoraGatewayStatus").SetParent<Object>().AddConstructor<LoraGatewayStatus>();
46 NS_LOG_FUNCTION(
this);
51 NS_LOG_FUNCTION(
this);
55 Ptr<NetDevice> netDevice,
56 Ptr<LorawanMacGateway> gwMac)
62 NS_LOG_FUNCTION(
this);
68 NS_LOG_FUNCTION(
this);
76 NS_LOG_FUNCTION(
this);
102 NS_LOG_FUNCTION(
this << frequency);
109 NS_LOG_INFO(
"This gateway is already booked for a transmission");
116 NS_LOG_INFO(
"This gateway is currently transmitting");
121 Time waitingTime =
m_gatewayMac->GetWaitingTime(frequency);
122 if (waitingTime > Seconds(0))
124 NS_LOG_INFO(
"Gateway cannot be used because of duty cycle");
125 NS_LOG_INFO(
"Waiting time at current GW: " << waitingTime.GetSeconds() <<
" seconds");
136 NS_LOG_FUNCTION(
this << nextTransmissionTime);
void SetNetDevice(Ptr< NetDevice > netDevice)
Set the NetDevice through which it's possible to contact this gateway from the server.
static TypeId GetTypeId(void)
Time m_nextTransmissionTime
This gateway's next transmission time.
Address GetAddress()
Get this gateway's P2P link address.
Ptr< NetDevice > GetNetDevice()
Get the NetDevice through which it's possible to contact this gateway from the server.
virtual ~LoraGatewayStatus()
Ptr< LorawanMacGateway > GetGatewayMac(void)
Get a pointer to this gateway's MAC instance.
void SetNextTransmissionTime(Time nextTransmissionTime)
void SetAddress(Address address)
Set this gateway's P2P link address.
Ptr< NetDevice > m_netDevice
The NetDevice through which to reach this gateway from the server.
Ptr< LorawanMacGateway > m_gatewayMac
The Mac layer of the gateway.
bool IsAvailableForTransmission(double frequency)
Set a pointer to this gateway's MAC instance.
Address m_address
The Address of the P2PNetDevice of this gateway // TODO useless ?
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.