23 #include <ns3/boolean.h>
25 #include <ns3/packet.h>
26 #include <ns3/simulator.h>
27 #include <ns3/traced-callback.h>
28 #include <ns3/traffic-time-tag.h>
30 NS_LOG_COMPONENT_DEFINE(
"SatOnOffApplication");
35 NS_OBJECT_ENSURE_REGISTERED(SatOnOffApplication);
41 TypeId(
"ns3::SatOnOffApplication")
42 .SetParent<OnOffApplication>()
43 .AddConstructor<SatOnOffApplication>()
44 .AddAttribute(
"EnableStatisticsTags",
45 "If true, some tags will be added to each transmitted packet to assist "
46 "with statistics computation",
50 MakeBooleanChecker());
55 : m_isStatisticsTagsEnabled(false),
56 m_isConnectedWithTraceSource(false)
58 NS_LOG_FUNCTION(
this);
63 NS_LOG_FUNCTION(
this);
69 NS_LOG_FUNCTION(
this << enable);
81 TraceConnectWithoutContext(
"Tx",
88 TraceDisconnectWithoutContext(
"Tx",
104 packet->AddPacketTag(TrafficTimeTag(Simulator::Now()));
void SendPacketTrace(Ptr< const Packet > packet)
Trace callback for on-off application Tx.
bool m_isConnectedWithTraceSource
void EnableStatisticTags(bool enableStatus)
Enable or disable statistic tags.
bool m_isStatisticsTagsEnabled
EnableStatisticsTags attribute.
SatOnOffApplication()
Constructor for Satellite specific on-off application.
static TypeId GetTypeId(void)
bool IsStatisticTagsEnabled() const
Get enable status of statistic tags.
virtual ~SatOnOffApplication()
Destructor Satellite specific on-off application.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.