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>
32 NS_LOG_COMPONENT_DEFINE(
"SatOnOffApplication");
37 NS_OBJECT_ENSURE_REGISTERED(SatOnOffApplication);
43 TypeId(
"ns3::SatOnOffApplication")
44 .SetParent<OnOffApplication>()
45 .AddConstructor<SatOnOffApplication>()
46 .AddAttribute(
"EnableStatisticsTags",
47 "If true, some tags will be added to each transmitted packet to assist "
48 "with statistics computation",
52 MakeBooleanChecker());
57 : m_isStatisticsTagsEnabled(false),
58 m_isConnectedWithTraceSource(false)
60 NS_LOG_FUNCTION(
this);
65 NS_LOG_FUNCTION(
this);
71 NS_LOG_FUNCTION(
this << enable);
83 TraceConnectWithoutContext(
"Tx",
90 TraceDisconnectWithoutContext(
"Tx",
106 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.