#include "lora-periodic-sender.h"
Public Member Functions | |
LoraPeriodicSender () | |
~LoraPeriodicSender () | |
Time | GetInterval (void) const |
Get the sending inteval. More... | |
void | SendPacket (void) |
Send a packet using the LoraNetDevice's Send method. More... | |
void | SetInitialDelay (Time delay) |
Set the initial delay of this application. More... | |
void | SetInterval (Time interval) |
Set the sending interval. More... | |
void | SetPacketSize (uint8_t size) |
Set packet size. More... | |
void | SetPacketSizeRandomVariable (Ptr< RandomVariableStream > rv) |
Set if using randomness in the packet size. More... | |
void | StartApplication (void) |
Start the application by scheduling the first SendPacket event. More... | |
void | StopApplication (void) |
Stop the application. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Private Attributes | |
uint8_t | m_basePktSize |
The packet size. More... | |
Time | m_initialDelay |
The initial delay of this application. More... | |
Time | m_interval |
The interval between to consecutive send events. More... | |
Ptr< LorawanMac > | m_mac |
The MAC layer of this node. More... | |
Ptr< RandomVariableStream > | m_pktSizeRV |
The random variable that adds bytes to the packet size. More... | |
EventId | m_sendEvent |
The sending event scheduled as next. More... | |
Definition at line 37 of file lora-periodic-sender.h.
ns3::LoraPeriodicSender::LoraPeriodicSender | ( | ) |
Definition at line 59 of file lora-periodic-sender.cc.
ns3::LoraPeriodicSender::~LoraPeriodicSender | ( | ) |
Definition at line 69 of file lora-periodic-sender.cc.
Time ns3::LoraPeriodicSender::GetInterval | ( | void | ) | const |
Get the sending inteval.
Definition at line 82 of file lora-periodic-sender.cc.
References m_interval.
Referenced by GetTypeId().
|
static |
Definition at line 40 of file lora-periodic-sender.cc.
References GetInterval(), and SetInterval().
void ns3::LoraPeriodicSender::SendPacket | ( | void | ) |
Send a packet using the LoraNetDevice's Send method.
Definition at line 108 of file lora-periodic-sender.cc.
References m_basePktSize, m_interval, m_mac, m_pktSizeRV, and m_sendEvent.
Referenced by StartApplication().
void ns3::LoraPeriodicSender::SetInitialDelay | ( | Time | delay | ) |
Set the initial delay of this application.
Definition at line 89 of file lora-periodic-sender.cc.
References m_initialDelay.
void ns3::LoraPeriodicSender::SetInterval | ( | Time | interval | ) |
Set the sending interval.
interval | the interval between two packet sendings |
Definition at line 75 of file lora-periodic-sender.cc.
References m_interval.
Referenced by GetTypeId().
void ns3::LoraPeriodicSender::SetPacketSize | ( | uint8_t | size | ) |
void ns3::LoraPeriodicSender::SetPacketSizeRandomVariable | ( | Ptr< RandomVariableStream > | rv | ) |
Set if using randomness in the packet size.
Definition at line 96 of file lora-periodic-sender.cc.
References m_pktSizeRV.
void ns3::LoraPeriodicSender::StartApplication | ( | void | ) |
Start the application by scheduling the first SendPacket event.
Definition at line 132 of file lora-periodic-sender.cc.
References m_initialDelay, m_mac, m_sendEvent, and SendPacket().
void ns3::LoraPeriodicSender::StopApplication | ( | void | ) |
Stop the application.
Definition at line 164 of file lora-periodic-sender.cc.
References m_sendEvent.
|
private |
The packet size.
Definition at line 111 of file lora-periodic-sender.h.
Referenced by SendPacket(), and SetPacketSize().
|
private |
The initial delay of this application.
Definition at line 96 of file lora-periodic-sender.h.
Referenced by SetInitialDelay(), and StartApplication().
|
private |
The interval between to consecutive send events.
Definition at line 91 of file lora-periodic-sender.h.
Referenced by GetInterval(), SendPacket(), and SetInterval().
|
private |
The MAC layer of this node.
Definition at line 106 of file lora-periodic-sender.h.
Referenced by SendPacket(), and StartApplication().
|
private |
The random variable that adds bytes to the packet size.
Definition at line 116 of file lora-periodic-sender.h.
Referenced by SendPacket(), and SetPacketSizeRandomVariable().
|
private |
The sending event scheduled as next.
Definition at line 101 of file lora-periodic-sender.h.
Referenced by SendPacket(), StartApplication(), and StopApplication().