10#ifndef UDP_TRACE_CLIENT_H
11#define UDP_TRACE_CLIENT_H
15#include "ns3/event-id.h"
16#include "ns3/ipv4-address.h"
a polymophic address class
An identifier for simulation events.
Smart pointer class similar to boost::intrusive_ptr.
Base class for source applications.
a unique identifier for an interface.
EventId m_sendEvent
Event to send the next packet.
void SetTraceFile(const std::string &filename)
Set the trace file to be used by the application.
void StopApplication() override
Application specific shutdown code.
Address GetRemote() const
Get the remote address (temporary function until deprecated attributes are removed)
static TypeId GetTypeId()
Get the type ID.
void Send()
Send a packet.
std::optional< uint16_t > m_peerPort
Remote peer port (deprecated) // NS_DEPRECATED_3_44.
void SetTraceLoop(bool traceLoop)
Set the trace loop flag.
uint32_t m_sent
Counter for sent packets.
std::vector< TraceEntry > m_entries
Entries in the trace to send.
uint32_t m_currentEntry
Current entry index.
void SetMaxPacketSize(uint16_t maxPacketSize)
Set the maximum packet size.
void LoadTrace()
Load current trace file.
void SetPort(uint16_t port)
Set the remote port (temporary function until deprecated attributes are removed)
void StartApplication() override
Application specific startup code.
static constexpr uint16_t DEFAULT_PORT
default port
void SetRemote(const Address &ip, uint16_t port)
set the remote address and port
void SendPacket(uint32_t size)
Send a packet of a given size.
bool m_traceLoop
Loop through the trace file.
uint16_t m_maxPacketSize
Maximum packet size to send (including the SeqTsHeader)
~UdpTraceClient() override
std::string m_traceFile
The location of the trace file.
static TraceEntry g_defaultEntries[]
Default trace to send.
uint16_t GetPort() const
Get the remote port (temporary function until deprecated attributes are removed)
uint16_t GetMaxPacketSize()
Return the maximum packet size.
void LoadDefaultTrace()
Load the default trace.
Ptr< Socket > m_socket
Socket.
#define NS_DEPRECATED_3_44(msg)
Tag for things deprecated in version ns-3.44.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t timeToSend
Time to send the frame.
uint32_t packetSize
Size of the frame.
char frameType
Frame type (I, P or B)