6#include "traffic-generator-3gpp-pose-control.h"
10#include "ns3/tcp-socket-factory.h"
11#include "ns3/trace-source-accessor.h"
12#include "ns3/uinteger.h"
17NS_LOG_COMPONENT_DEFINE(
"TrafficGenerator3gppPoseControl");
18NS_OBJECT_ENSURE_REGISTERED(TrafficGenerator3gppPoseControl);
24 TypeId(
"ns3::TrafficGenerator3gppPoseControl")
26 .SetGroupName(
"Applications")
28 .AddAttribute(
"PacketSize",
29 "The packet size in bytes.",
31 MakeUintegerAccessor(&TrafficGenerator3gppPoseControl::m_packetSize),
32 MakeUintegerChecker<uint32_t>())
33 .AddAttribute(
"Periodicity",
34 "The periodicity in milliseconds.",
36 MakeUintegerAccessor(&TrafficGenerator3gppPoseControl::m_periodicity),
37 MakeUintegerChecker<uint32_t>())
38 .AddAttribute(
"Remote",
39 "The address of the destination",
43 .AddAttribute(
"Protocol",
44 "The type of protocol to use.",
45 TypeIdValue(TcpSocketFactory::GetTypeId()),
49 "A new packet is created and is sent",
50 MakeTraceSourceAccessor(&TrafficGenerator::m_txTrace),
51 "ns3::TrafficGenerator::TxTracedCallback");
55TrafficGenerator3gppPoseControl::TrafficGenerator3gppPoseControl()
58 NS_LOG_FUNCTION(
this);
61TrafficGenerator3gppPoseControl::~TrafficGenerator3gppPoseControl()
63 NS_LOG_FUNCTION(
this);
67TrafficGenerator3gppPoseControl::StartApplication()
69 NS_LOG_FUNCTION(
this);
74TrafficGenerator3gppPoseControl::PacketBurstSent()
76 NS_LOG_FUNCTION(
this);
79 NS_ABORT_MSG(
"This function should not be called for the pose control traffic");
83TrafficGenerator3gppPoseControl::GenerateNextPacketBurstSize()
85 NS_LOG_FUNCTION(
this);
86 SetPacketBurstSizeInPackets(1);
90TrafficGenerator3gppPoseControl::GetNextPacketSize()
const
92 NS_LOG_FUNCTION(
this);
97TrafficGenerator3gppPoseControl::GetNextPacketTime()
const
99 NS_LOG_FUNCTION(
this);
100 return MilliSeconds(m_periodicity);
int64_t AssignStreams(int64_t stream) override
static TypeId GetTypeId()
Get the type ID.
void SetRemote(Address remote)
Sets the remote address.
bool SendPacketBurst()
Send another packet burst, which can be e.g., a file, or a video frame.
void SetProtocol(TypeId protocol)
Sets the protocol.