7#include "ns3/applications-module.h"
34 .SetGroupName(
"Tutorial")
a polymophic address class
The base class for all ns3 applications.
Class for representing data rates.
uint64_t GetBitRate() const
Get the underlying bitrate.
bool IsPending() const
This method is syntactic sugar for !IsExpired().
Smart pointer class similar to boost::intrusive_ptr.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static void Cancel(const EventId &id)
Set the cancel bit on this event: the event's associated function will not be invoked when it expires...
virtual int Send(Ptr< Packet > p, uint32_t flags)=0
Send data (or dummy data) to the remote host.
virtual int Connect(const Address &address)=0
Initiate a connection to a remote host.
virtual int Close()=0
Close a socket.
virtual int Bind(const Address &address)=0
Allocate a local endpoint for this socket.
Simulation virtual time values and global simulation resolution.
Tutorial - a simple Application sending packets.
void StopApplication() override
Application specific shutdown code.
void ScheduleTx()
Schedule a new transmission.
static TypeId GetTypeId()
Register this type.
EventId m_sendEvent
Send event.
Ptr< Socket > m_socket
The transmission socket.
uint32_t m_packetsSent
The number of packets sent.
void SendPacket()
Send a packet.
Address m_peer
The destination address.
uint32_t m_packetSize
The packet size.
void Setup(Ptr< Socket > socket, Address address, uint32_t packetSize, uint32_t nPackets, DataRate dataRate)
Setup the socket.
void StartApplication() override
Application specific startup code.
DataRate m_dataRate
The data rate to use.
uint32_t m_nPackets
The number of packets to send.
bool m_running
True if the application is running.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Time Seconds(double value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static const uint32_t packetSize
Packet size generated at the AP.