29 NS_LOG_COMPONENT_DEFINE(
"LoraGatewayStatus");
34 NS_OBJECT_ENSURE_REGISTERED(LoraGatewayStatus);
39 static TypeId tid = TypeId(
"ns3::LoraGatewayStatus").AddConstructor<
LoraGatewayStatus>();
45 NS_LOG_FUNCTION(
this);
50 NS_LOG_FUNCTION(
this);
54 Ptr<NetDevice> netDevice,
55 Ptr<LorawanMacGateway> gwMac)
57 m_netDevice(netDevice),
59 m_nextTransmissionTime(Seconds(0))
61 NS_LOG_FUNCTION(
this);
67 NS_LOG_FUNCTION(
this);
75 NS_LOG_FUNCTION(
this);
92 Ptr<LorawanMacGateway>
101 NS_LOG_FUNCTION(
this << frequency);
108 NS_LOG_INFO(
"This gateway is already booked for a transmission");
115 NS_LOG_INFO(
"This gateway is currently transmitting");
120 Time waitingTime =
m_gatewayMac->GetWaitingTime(frequency);
121 if (waitingTime > Seconds(0))
123 NS_LOG_INFO(
"Gateway cannot be used because of duty cycle");
124 NS_LOG_INFO(
"Waiting time at current GW: " << waitingTime.GetSeconds() <<
" seconds");
135 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 ??? Remove !
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.