31 #include "ns3/callback.h"
32 #include "ns3/config.h"
34 #include "ns3/names.h"
35 #include "ns3/simulator.h"
39 NS_LOG_COMPONENT_DEFINE(
"SatFrameUserLoadProbe");
44 NS_OBJECT_ENSURE_REGISTERED(SatFrameUserLoadProbe);
50 TypeId(
"ns3::SatFrameUserLoadProbe")
52 .AddConstructor<SatFrameUserLoadProbe>()
53 .AddTraceSource(
"Output",
54 "The frame ID and the number of scheduled users that serve as the "
55 "output for this probe",
57 "ns3::SatFrameUserLoadProbe::FrameUserLoadCallback");
63 NS_LOG_FUNCTION(
this);
68 NS_LOG_FUNCTION(
this);
74 NS_LOG_FUNCTION(
this << frameId << utCount);
81 NS_LOG_FUNCTION(path << frameId << utCount);
82 Ptr<SatFrameUserLoadProbe> probe = Names::Find<SatFrameUserLoadProbe>(path);
83 NS_ASSERT_MSG(probe,
"Error: Can't find probe for path " << path);
84 probe->SetValue(frameId, utCount);
90 NS_LOG_FUNCTION(
this << traceSource << obj);
91 NS_LOG_DEBUG(
"Name of probe (if any) in names database: " << Names::FindPath(obj));
93 obj->TraceConnectWithoutContext(traceSource,
101 NS_LOG_FUNCTION(
this << path);
102 NS_LOG_DEBUG(
"Name of probe to search for in config database: " << path);
109 NS_LOG_FUNCTION(
this << frameId << utCount);
TracedCallback< uint32_t, uint32_t > m_output
Output trace, the frame ID and number of scheduled users.
virtual bool ConnectByObject(std::string traceSource, Ptr< Object > obj)
connect to a trace source attribute provided by a given object
void SetValue(uint32_t frameId, uint32_t utCount)
Set a probe value.
static TypeId GetTypeId()
Get the type ID.
SatFrameUserLoadProbe()
Default constructor.
static void SetValueByPath(std::string path, uint32_t frameId, uint32_t utCount)
Set a probe value by its name in the Config system.
virtual ~SatFrameUserLoadProbe()
Destructor for SatFrameUserLoadProbe.
void TraceSink(uint32_t frameId, uint32_t utCount)
Method to connect to an underlying ns3::TraceSource with arguments of type uint32_t and uint32_t.
virtual void ConnectByPath(std::string path)
connect to a trace source provided by a config path
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.