27#include "ns3/application.h"
28#include "ns3/core-module.h"
29#include "ns3/network-module.h"
30#include "ns3/stats-module.h"
157 void Print(std::ostream& os)
const override;
void StopApplication() override
Application specific shutdown code.
uint32_t m_port
Listening port.
Ptr< Socket > m_socket
Receiving socket.
void DoDispose() override
Destructor implementation.
void SetDelayTracker(Ptr< TimeMinMaxAvgTotalCalculator > delay)
Set the delay tracker for received packets.
static TypeId GetTypeId()
Get the type ID.
void Receive(Ptr< Socket > socket)
Receive a packet.
Ptr< CounterCalculator<> > m_calc
Counter of the number of received packets.
void StartApplication() override
Application specific startup code.
void SetCounter(Ptr< CounterCalculator<> > calc)
Set the counter calculator for received packets.
Ptr< TimeMinMaxAvgTotalCalculator > m_delay
Delay calculator.
Ptr< Socket > m_socket
Sending socket.
void SendPacket()
Send a packet.
uint32_t m_count
Number of packets sent.
uint32_t m_destPort
Destination port.
Ptr< ConstantRandomVariable > m_interval
Rng for sending packets.
void StopApplication() override
Application specific shutdown code.
Ipv4Address m_destAddr
Destination address.
void DoDispose() override
Destructor implementation.
static TypeId GetTypeId()
Get the type ID.
EventId m_sendEvent
Send packet event.
uint32_t m_numPkts
Number of packets to send.
TracedCallback< Ptr< const Packet > > m_txTrace
Tx TracedCallback.
void StartApplication() override
Application specific startup code.
uint32_t m_pktSize
The packet size.
Timestamp tag - it carries when the packet has been sent.
void Print(std::ostream &os) const override
void Serialize(TagBuffer i) const override
static TypeId GetTypeId()
Get the type ID.
uint32_t GetSerializedSize() const override
void SetTimestamp(Time time)
Set the timestamp.
void Deserialize(TagBuffer i) override
Time GetTimestamp() const
Get the timestamp.
Time m_timestamp
Timestamp.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
The base class for all ns3 applications.
Template class CounterCalculator.
An identifier for simulation events.
Ipv4 addresses are stored in host order in this class.
tag a set of bytes in a packet
Simulation virtual time values and global simulation resolution.
Forward calls to a chain of Callback.
a unique identifier for an interface.
Every class exported by the ns3 library is enclosed in the ns3 namespace.