A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
frame-counter-update.cc File Reference
#include "ns3/building-allocator.h"
#include "ns3/building-penetration-loss.h"
#include "ns3/buildings-helper.h"
#include "ns3/callback.h"
#include "ns3/class-a-end-device-lorawan-mac.h"
#include "ns3/command-line.h"
#include "ns3/constant-position-mobility-model.h"
#include "ns3/correlated-shadowing-propagation-loss-model.h"
#include "ns3/double.h"
#include "ns3/end-device-lora-phy.h"
#include "ns3/forwarder-helper.h"
#include "ns3/gateway-lora-phy.h"
#include "ns3/gateway-lorawan-mac.h"
#include "ns3/log.h"
#include "ns3/lora-helper.h"
#include "ns3/lorawan-mac-header.h"
#include "ns3/mobility-helper.h"
#include "ns3/network-server-helper.h"
#include "ns3/node-container.h"
#include "ns3/one-shot-sender-helper.h"
#include "ns3/periodic-sender-helper.h"
#include "ns3/pointer.h"
#include "ns3/position-allocator.h"
#include "ns3/random-variable-stream.h"
#include "ns3/simulator.h"
#include <algorithm>
#include <ctime>
+ Include dependency graph for frame-counter-update.cc:

Go to the source code of this file.

Functions

void ChangeEndDevicePosition (Ptr< Node > endDevice, bool inRange)
 Set the position of an end device as either in range or out of range.
 
void OnMacPacketOutcome (uint8_t transmissions, bool successful, Time firstAttempt, Ptr< Packet > packet)
 Record the exit status of a MAC layer packet retransmission process of an end device.
 
void OnPhySentPacket (Ptr< const Packet > packet, uint32_t index)
 Record a packet TX start by the PHY layer of an end device.
 

Variables

int nGateways = 1
 Number of gateway nodes to create.
 
double simulationTimeSeconds = 3600
 Scenario duration (s) in simulated time.
 

Function Documentation

◆ ChangeEndDevicePosition()

void ChangeEndDevicePosition ( Ptr< Node endDevice,
bool  inRange 
)

Set the position of an end device as either in range or out of range.

Parameters
endDeviceA pointer to the Node of the end device.
inRangeWhether to set the end device in range or out of range.

Definition at line 115 of file frame-counter-update.cc.

References NS_LOG_INFO.

◆ OnMacPacketOutcome()

void OnMacPacketOutcome ( uint8_t  transmissions,
bool  successful,
Time  firstAttempt,
Ptr< Packet packet 
)

Record the exit status of a MAC layer packet retransmission process of an end device.

Parameters
transmissionsNumber of transmissions attempted during the process.
successfulWhether the retransmission procedure was successful.
firstAttemptTimestamp of the initial transmission attempt.
packetThe packet being retransmitted.

Definition at line 96 of file frame-counter-update.cc.

References NS_LOG_INFO.

◆ OnPhySentPacket()

void OnPhySentPacket ( Ptr< const Packet packet,
uint32_t  index 
)

Record a packet TX start by the PHY layer of an end device.

Parameters
packetThe packet being transmitted.
indexId of end device transmitting the packet.

Definition at line 71 of file frame-counter-update.cc.

References ns3::lorawan::LoraFrameHeader::GetFCnt(), and NS_LOG_DEBUG.

+ Here is the call graph for this function:

Variable Documentation

◆ nGateways

int nGateways = 1

Number of gateway nodes to create.

Definition at line 61 of file frame-counter-update.cc.

◆ simulationTimeSeconds

double simulationTimeSeconds = 3600

Scenario duration (s) in simulated time.

Definition at line 62 of file frame-counter-update.cc.