27 NS_LOG_COMPONENT_DEFINE(
"LoraGatewayStatus");
32 NS_OBJECT_ENSURE_REGISTERED(LoraGatewayStatus);
37 static TypeId tid = TypeId(
"ns3::LoraGatewayStatus").AddConstructor<
LoraGatewayStatus>();
43 NS_LOG_FUNCTION(
this);
48 NS_LOG_FUNCTION(
this);
52 Ptr<NetDevice> netDevice,
53 Ptr<LorawanMacGateway> gwMac)
55 m_netDevice(netDevice),
57 m_nextTransmissionTime(Seconds(0))
59 NS_LOG_FUNCTION(
this);
65 NS_LOG_FUNCTION(
this);
73 NS_LOG_FUNCTION(
this);
90 Ptr<LorawanMacGateway>
99 NS_LOG_FUNCTION(
this << frequency);
106 NS_LOG_INFO(
"This gateway is already booked for a transmission");
113 NS_LOG_INFO(
"This gateway is currently transmitting");
118 Time waitingTime =
m_gatewayMac->GetWaitingTime(frequency);
119 if (waitingTime > Seconds(0))
121 NS_LOG_INFO(
"Gateway cannot be used because of duty cycle");
122 NS_LOG_INFO(
"Waiting time at current GW: " << waitingTime.GetSeconds() <<
" seconds");
133 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.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.