core: (fixes 2815) Config::Connect should throw warnings
This patch logs unconditionally when a trace path doesn't exist. We also provide FailSafe versions of Config::Connect and Config::ConnectWithoutContext. These should be used when you can't be sure that a trace path exists in the current model. This resolves the warnings from AnimationInterface::ConnectCallbacks() Credit to "InquisitivePenguin (GCI 2019) <>" for diagnosing this issue, opening the way to a solution.
This commit is contained in:
@@ -54,6 +54,7 @@ us a note on ns-developers mailing list.</p>
|
||||
<h1>Changes from ns-3.30 to ns-3.31</h1>
|
||||
<h2>New API:</h2>
|
||||
<ul>
|
||||
<li> New <b>...FailSafe ()</b> variants of the <b> Config </b> and <b>Config::MatchContainer</b> functions which set Attributes or connect TraceSources. These all return a boolean indicating if any attributes could be set (or trace sources connected). These are useful if you are not sure that the requested objects exist, for example in AnimationInterface.</li>
|
||||
<li> New attributes for <b> Ipv4L3Protocol</b> have been added to enable RFC 6621-based duplicate packet detection (DPD) (<b>EnableDuplicatePacketDetection</b>) and to control the cache expiration time (<b>DuplicateExpire</b>).</li>
|
||||
<li><b> MakeConsistent </b> method of <b> BuildingsHelper </b> class is
|
||||
deprecated and moved to <b> MobilityBuildingInfo </b> class. <b> DoInitialize </b>
|
||||
@@ -78,6 +79,7 @@ transmitted.</li>
|
||||
</ul>
|
||||
<h2>Changes to existing API:</h2>
|
||||
<ul>
|
||||
<li> Previously the <b>Config::Connect</b> and <b>Config::Set</b> families of functions would fail silently if the attribute or trace source didn't exist on the path given (typically due to spelling errors). Now those functions will throw a fatal error. If you need the old behavior use the new <b>...FailSafe ()</b> variants.</li>
|
||||
<li>The internal TCP API for <b>TcpCongestionOps</b> has been extended to support the <b>CongControl</b> method to allow for delivery rate estimation feedback to the congestion control mechanism.</li>
|
||||
<li>Functions <b>LteEnbPhy::ReceiveUlHarqFeedback</b> and <b>LteUePhy::ReceiveLteDlHarqFeedback</b> are renamed to <b>LteEnbPhy::ReportUlHarqFeedback</b> and <b>LteUePhy::EnqueueDlHarqFeedback</b>, respectively to avoid confusion about their functionality. <b>LteHelper</b> is updated accordingly.</li>
|
||||
<li>Now on, instead of <b>uint8_t</b>, <b>uint16_t</b> would be used to store a bandwidth value in LTE.</li>
|
||||
|
||||
@@ -463,7 +463,15 @@ default values.::
|
||||
|
||||
At this point, we have created a single :cpp:class:`Node` (``n0``)
|
||||
and a single :cpp:class:`PointToPointNetDevice` (``net0``),
|
||||
and added a :cpp:class:`DropTailQueue` (``q``) to ``net0``.
|
||||
added a :cpp:class:`DropTailQueue` (``q``) to ``net0``,
|
||||
which will be configured with a queue size limit of 80 packets.
|
||||
|
||||
As a final note, the :cpp:func:`Config::Set...()` functions
|
||||
will throw an error if the targeted Attribute does not exist at the path
|
||||
given. There are also "fail-safe" versions,
|
||||
:cpp:func:`Config::Set...FailSafe()`, if you can't be sure the Attribute
|
||||
exists. The fail-safe versions return `true` if at least one instance
|
||||
could be set.
|
||||
|
||||
Constructors, Helpers and ObjectFactory
|
||||
=======================================
|
||||
|
||||
@@ -294,6 +294,13 @@ congestion window in the TCP socket, the registered callback will be executed
|
||||
and the function ``CwndTracer`` will be called printing out the old and new
|
||||
values of the TCP congestion window.
|
||||
|
||||
As a final note, the :cpp:func:`Config::Connect...()` functions
|
||||
will throw an error if the targeted TraceSource does not exist at the path
|
||||
given. There are also "fail-safe" versions,
|
||||
:cpp:func:`Config::Connect...FailSafe()`, if you can't be sure the TraceSource
|
||||
exists. The fail-safe versions return `true` if at least one connection
|
||||
could be made.
|
||||
|
||||
Using the Tracing API
|
||||
*********************
|
||||
|
||||
|
||||
@@ -48,8 +48,8 @@ MatchContainer::MatchContainer (const std::vector<Ptr<Object> > &objects,
|
||||
const std::vector<std::string> &contexts,
|
||||
std::string path)
|
||||
: m_objects (objects),
|
||||
m_contexts (contexts),
|
||||
m_path (path)
|
||||
m_contexts (contexts),
|
||||
m_path (path)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << &objects << &contexts << path);
|
||||
}
|
||||
@@ -97,31 +97,63 @@ MatchContainer::Set (std::string name, const AttributeValue &value)
|
||||
for (Iterator tmp = Begin (); tmp != End (); ++tmp)
|
||||
{
|
||||
Ptr<Object> object = *tmp;
|
||||
// Let ObjectBase::SetAttribute raise any errors
|
||||
object->SetAttribute (name, value);
|
||||
}
|
||||
}
|
||||
bool
|
||||
MatchContainer::SetFailSafe (std::string name, const AttributeValue &value)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << name << &value);
|
||||
bool ok = false;
|
||||
for (Iterator tmp = Begin (); tmp != End (); ++tmp)
|
||||
{
|
||||
Ptr<Object> object = *tmp;
|
||||
ok |= object->SetAttributeFailSafe (name, value);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
void
|
||||
MatchContainer::Connect (std::string name, const CallbackBase &cb)
|
||||
{
|
||||
if (!ConnectFailSafe (name, cb))
|
||||
{
|
||||
NS_FATAL_ERROR ("Cound not connect callback to " << name);
|
||||
}
|
||||
}
|
||||
bool
|
||||
MatchContainer::ConnectFailSafe (std::string name, const CallbackBase &cb)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << name << &cb);
|
||||
NS_ASSERT (m_objects.size () == m_contexts.size ());
|
||||
bool ok = false;
|
||||
for (uint32_t i = 0; i < m_objects.size (); ++i)
|
||||
{
|
||||
Ptr<Object> object = m_objects[i];
|
||||
std::string ctx = m_contexts[i] + name;
|
||||
object->TraceConnect (name, ctx, cb);
|
||||
ok |= object->TraceConnect (name, ctx, cb);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
void
|
||||
MatchContainer::ConnectWithoutContext (std::string name, const CallbackBase &cb)
|
||||
{
|
||||
if (!ConnectWithoutContextFailSafe (name, cb))
|
||||
{
|
||||
NS_FATAL_ERROR ("Could not connect callback to " << name);
|
||||
}
|
||||
}
|
||||
bool
|
||||
MatchContainer::ConnectWithoutContextFailSafe (std::string name, const CallbackBase &cb)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << name << &cb);
|
||||
|
||||
bool ok = false;
|
||||
for (Iterator tmp = Begin (); tmp != End (); ++tmp)
|
||||
{
|
||||
Ptr<Object> object = *tmp;
|
||||
object->TraceConnectWithoutContext (name, cb);
|
||||
ok |= object->TraceConnectWithoutContext (name, cb);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
void
|
||||
MatchContainer::Disconnect (std::string name, const CallbackBase &cb)
|
||||
@@ -585,12 +617,16 @@ Resolver::DoArrayResolve (std::string path, const ObjectPtrContainerValue &conta
|
||||
class ConfigImpl : public Singleton<ConfigImpl>
|
||||
{
|
||||
public:
|
||||
// Keep Set and SetFailSafe since their errors are triggered
|
||||
// by the underlying ObjecBase functions.
|
||||
/** \copydoc Config::Set() */
|
||||
void Set (std::string path, const AttributeValue &value);
|
||||
/** \copydoc Config::ConnectWithoutContext() */
|
||||
void ConnectWithoutContext (std::string path, const CallbackBase &cb);
|
||||
/** \copydoc Config::Connect() */
|
||||
void Connect (std::string path, const CallbackBase &cb);
|
||||
/** \copydoc Config::SetFailSafe() */
|
||||
bool SetFailSafe (std::string path, const AttributeValue &value);
|
||||
/** \copydoc Config::ConnectWithoutContextFailSafe() */
|
||||
bool ConnectWithoutContextFailSafe (std::string path, const CallbackBase &cb);
|
||||
/** \copydoc Config::ConnectFailSafe() */
|
||||
bool ConnectFailSafe (std::string path, const CallbackBase &cb);
|
||||
/** \copydoc Config::DisconnectWithoutContext() */
|
||||
void DisconnectWithoutContext (std::string path, const CallbackBase &cb);
|
||||
/** \copydoc Config::Disconnect() */
|
||||
@@ -648,21 +684,24 @@ ConfigImpl::Set (std::string path, const AttributeValue &value)
|
||||
MatchContainer container = LookupMatches (root);
|
||||
container.Set (leaf, value);
|
||||
}
|
||||
void
|
||||
ConfigImpl::ConnectWithoutContext (std::string path, const CallbackBase &cb)
|
||||
bool
|
||||
ConfigImpl::SetFailSafe (std::string path, const AttributeValue &value)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << path << &value);
|
||||
|
||||
std::string root, leaf;
|
||||
ParsePath (path, &root, &leaf);
|
||||
MatchContainer container = LookupMatches (root);
|
||||
return container.SetFailSafe (leaf, value);
|
||||
}
|
||||
bool
|
||||
ConfigImpl::ConnectWithoutContextFailSafe (std::string path, const CallbackBase &cb)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << path << &cb);
|
||||
std::string root, leaf;
|
||||
ParsePath (path, &root, &leaf);
|
||||
MatchContainer container = LookupMatches (root);
|
||||
if (container.GetN () == 0)
|
||||
{
|
||||
std::size_t lastFwdSlash = root.rfind ("/");
|
||||
NS_LOG_WARN ("Failed to connect " << leaf <<
|
||||
", the Requested object name = " << root.substr (lastFwdSlash + 1) <<
|
||||
" does not exits on path " << root.substr (0, lastFwdSlash));
|
||||
}
|
||||
container.ConnectWithoutContext (leaf, cb);
|
||||
return container.ConnectWithoutContextFailSafe (leaf, cb);
|
||||
}
|
||||
void
|
||||
ConfigImpl::DisconnectWithoutContext (std::string path, const CallbackBase &cb)
|
||||
@@ -674,28 +713,21 @@ ConfigImpl::DisconnectWithoutContext (std::string path, const CallbackBase &cb)
|
||||
if (container.GetN () == 0)
|
||||
{
|
||||
std::size_t lastFwdSlash = root.rfind ("/");
|
||||
NS_LOG_WARN ("Failed to disconnect " << leaf <<
|
||||
", the Requested object name = " << root.substr (lastFwdSlash + 1) <<
|
||||
" does not exits on path " << root.substr (0, lastFwdSlash));
|
||||
NS_LOG_WARN ("Failed to disconnect " << leaf
|
||||
<< ", the Requested object name = " << root.substr (lastFwdSlash + 1)
|
||||
<< " does not exits on path " << root.substr (0, lastFwdSlash));
|
||||
}
|
||||
container.DisconnectWithoutContext (leaf, cb);
|
||||
}
|
||||
void
|
||||
ConfigImpl::Connect (std::string path, const CallbackBase &cb)
|
||||
bool
|
||||
ConfigImpl::ConnectFailSafe (std::string path, const CallbackBase &cb)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << path << &cb);
|
||||
|
||||
std::string root, leaf;
|
||||
ParsePath (path, &root, &leaf);
|
||||
MatchContainer container = LookupMatches (root);
|
||||
if (container.GetN () == 0)
|
||||
{
|
||||
std::size_t lastFwdSlash = root.rfind ("/");
|
||||
NS_LOG_WARN ("Failed to connect " << leaf <<
|
||||
", the Requested object name = " << root.substr (lastFwdSlash + 1) <<
|
||||
" does not exits on path " << root.substr (0, lastFwdSlash));
|
||||
}
|
||||
container.Connect (leaf, cb);
|
||||
return container.ConnectFailSafe (leaf, cb);
|
||||
}
|
||||
void
|
||||
ConfigImpl::Disconnect (std::string path, const CallbackBase &cb)
|
||||
@@ -708,9 +740,9 @@ ConfigImpl::Disconnect (std::string path, const CallbackBase &cb)
|
||||
if (container.GetN () == 0)
|
||||
{
|
||||
std::size_t lastFwdSlash = root.rfind ("/");
|
||||
NS_LOG_WARN ("Failed to disconnect " << leaf <<
|
||||
", the Requested object name = " << root.substr (lastFwdSlash + 1) <<
|
||||
" does not exits on path " << root.substr (0, lastFwdSlash));
|
||||
NS_LOG_WARN ("Failed to disconnect " << leaf
|
||||
<< ", the Requested object name = " << root.substr (lastFwdSlash + 1)
|
||||
<< " does not exits on path " << root.substr (0, lastFwdSlash));
|
||||
}
|
||||
container.Disconnect (leaf, cb);
|
||||
}
|
||||
@@ -721,10 +753,11 @@ ConfigImpl::LookupMatches (std::string path)
|
||||
NS_LOG_FUNCTION (this << path);
|
||||
class LookupMatchesResolver : public Resolver
|
||||
{
|
||||
public:
|
||||
public:
|
||||
LookupMatchesResolver (std::string path)
|
||||
: Resolver (path)
|
||||
{}
|
||||
{
|
||||
}
|
||||
virtual void DoOne (Ptr<Object> object, std::string path)
|
||||
{
|
||||
m_objects.push_back (object);
|
||||
@@ -803,12 +836,16 @@ void Reset (void)
|
||||
(*i)->ResetInitialValue ();
|
||||
}
|
||||
}
|
||||
|
||||
void Set (std::string path, const AttributeValue &value)
|
||||
{
|
||||
NS_LOG_FUNCTION (path << &value);
|
||||
ConfigImpl::Get ()->Set (path, value);
|
||||
}
|
||||
bool SetFailSafe (std::string path, const AttributeValue &value)
|
||||
{
|
||||
NS_LOG_FUNCTION (path << &value);
|
||||
return ConfigImpl::Get ()->SetFailSafe (path, value);
|
||||
}
|
||||
void SetDefault (std::string name, const AttributeValue &value)
|
||||
{
|
||||
NS_LOG_FUNCTION (name << &value);
|
||||
@@ -862,7 +899,12 @@ bool SetGlobalFailSafe (std::string name, const AttributeValue &value)
|
||||
void ConnectWithoutContext (std::string path, const CallbackBase &cb)
|
||||
{
|
||||
NS_LOG_FUNCTION (path << &cb);
|
||||
ConfigImpl::Get ()->ConnectWithoutContext (path, cb);
|
||||
ConnectWithoutContextFailSafe (path, cb);
|
||||
}
|
||||
bool ConnectWithoutContextFailSafe (std::string path, const CallbackBase &cb)
|
||||
{
|
||||
NS_LOG_FUNCTION (path << &cb);
|
||||
return ConfigImpl::Get ()->ConnectWithoutContextFailSafe (path, cb);
|
||||
}
|
||||
void DisconnectWithoutContext (std::string path, const CallbackBase &cb)
|
||||
{
|
||||
@@ -873,7 +915,16 @@ void
|
||||
Connect (std::string path, const CallbackBase &cb)
|
||||
{
|
||||
NS_LOG_FUNCTION (path << &cb);
|
||||
ConfigImpl::Get ()->Connect (path, cb);
|
||||
if (!ConnectFailSafe (path, cb))
|
||||
{
|
||||
NS_FATAL_ERROR ("Could not connect callback to " << name);
|
||||
}
|
||||
}
|
||||
bool
|
||||
ConnectFailSafe (std::string path, const CallbackBase &cb)
|
||||
{
|
||||
NS_LOG_FUNCTION (path << &cb);
|
||||
return ConfigImpl::Get ()->ConnectFailSafe (path, cb);
|
||||
}
|
||||
void
|
||||
Disconnect (std::string path, const CallbackBase &cb)
|
||||
|
||||
@@ -65,6 +65,11 @@ void Reset (void);
|
||||
* value.
|
||||
*/
|
||||
void Set (std::string path, const AttributeValue &value);
|
||||
/**
|
||||
* \copydoc Set()
|
||||
* \return \c true if any matching attributes could be set.
|
||||
*/
|
||||
bool SetFailSafe (std::string path, const AttributeValue &value);
|
||||
/**
|
||||
* \ingroup config
|
||||
* \param [in] name The full name of the attribute
|
||||
@@ -112,6 +117,11 @@ bool SetGlobalFailSafe (std::string name, const AttributeValue &value);
|
||||
* to them.
|
||||
*/
|
||||
void ConnectWithoutContext (std::string path, const CallbackBase &cb);
|
||||
/**
|
||||
* \copydoc ConnectWithoutContext()
|
||||
* \returns \c true if any trace sources could be connected.
|
||||
*/
|
||||
bool ConnectWithoutContextFailSafe (std::string path, const CallbackBase &cb);
|
||||
/**
|
||||
* \ingroup config
|
||||
* \param [in] path A path to match trace sources.
|
||||
@@ -131,6 +141,11 @@ void DisconnectWithoutContext (std::string path, const CallbackBase &cb);
|
||||
* context string upon trace event notification.
|
||||
*/
|
||||
void Connect (std::string path, const CallbackBase &cb);
|
||||
/**
|
||||
* \copydoc Connect()
|
||||
* \returns \c true if any trace sources could be connected.
|
||||
*/
|
||||
bool ConnectFailSafe (std::string path, const CallbackBase &cb);
|
||||
/**
|
||||
* \ingroup config
|
||||
* \param [in] path A path to match trace sources.
|
||||
@@ -204,6 +219,11 @@ public:
|
||||
* \sa ns3::Config::Set
|
||||
*/
|
||||
void Set (std::string name, const AttributeValue &value);
|
||||
/**
|
||||
* \copydoc Set()
|
||||
* \returns \c true if any attributes could be set.
|
||||
*/
|
||||
bool SetFailSafe (std::string name, const AttributeValue &value);
|
||||
/**
|
||||
* \param [in] name The name of the trace source to connect to
|
||||
* \param [in] cb The sink to connect to the trace source
|
||||
@@ -213,6 +233,11 @@ public:
|
||||
* \sa ns3::Config::Connect
|
||||
*/
|
||||
void Connect (std::string name, const CallbackBase &cb);
|
||||
/**
|
||||
* \copydoc Connect()
|
||||
* \returns \c true if any trace sources could be connected.
|
||||
*/
|
||||
bool ConnectFailSafe (std::string name, const CallbackBase &cb);
|
||||
/**
|
||||
* \param [in] name The name of the trace source to connect to
|
||||
* \param [in] cb The sink to connect to the trace source
|
||||
@@ -222,6 +247,11 @@ public:
|
||||
* \sa ns3::Config::ConnectWithoutContext
|
||||
*/
|
||||
void ConnectWithoutContext (std::string name, const CallbackBase &cb);
|
||||
/**
|
||||
* \copydoc ConnectWithoutContext()
|
||||
* \returns \c true if any trace sources could be connected.
|
||||
*/
|
||||
bool ConnectWithoutContextFailSafe (std::string name, const CallbackBase &cb);
|
||||
/**
|
||||
* \param [in] name The name of the trace source to disconnect from
|
||||
* \param [in] cb The sink to disconnect from the trace source
|
||||
|
||||
@@ -1626,109 +1626,109 @@ void
|
||||
AnimationInterface::ConnectCallbacks ()
|
||||
{
|
||||
// Connect the callbacks
|
||||
Config::Connect ("/ChannelList/*/TxRxPointToPoint",
|
||||
MakeCallback (&AnimationInterface::DevTxTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyTxPsduBegin",
|
||||
MakeCallback (&AnimationInterface::WifiPhyTxBeginTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyRxBegin",
|
||||
MakeCallback (&AnimationInterface::WifiPhyRxBeginTrace, this));
|
||||
Config::ConnectWithoutContext ("/NodeList/*/$ns3::MobilityModel/CourseChange",
|
||||
MakeCallback (&AnimationInterface::MobilityCourseChangeTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WimaxNetDevice/Tx",
|
||||
MakeCallback (&AnimationInterface::WimaxTxTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WimaxNetDevice/Rx",
|
||||
MakeCallback (&AnimationInterface::WimaxRxTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::LteNetDevice/Tx",
|
||||
MakeCallback (&AnimationInterface::LteTxTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::LteNetDevice/Rx",
|
||||
MakeCallback (&AnimationInterface::LteRxTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::CsmaNetDevice/PhyTxBegin",
|
||||
MakeCallback (&AnimationInterface::CsmaPhyTxBeginTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::CsmaNetDevice/PhyTxEnd",
|
||||
MakeCallback (&AnimationInterface::CsmaPhyTxEndTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::CsmaNetDevice/PhyRxEnd",
|
||||
MakeCallback (&AnimationInterface::CsmaPhyRxEndTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::CsmaNetDevice/MacRx",
|
||||
MakeCallback (&AnimationInterface::CsmaMacRxTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::UanNetDevice/Phy/PhyTxBegin",
|
||||
MakeCallback (&AnimationInterface::UanPhyGenTxTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::UanNetDevice/Phy/PhyRxBegin",
|
||||
MakeCallback (&AnimationInterface::UanPhyGenRxTrace, this));
|
||||
Config::Connect ("/NodeList/*/$ns3::BasicEnergySource/RemainingEnergy",
|
||||
MakeCallback (&AnimationInterface::RemainingEnergyTrace, this));
|
||||
|
||||
Config::ConnectFailSafe ("/ChannelList/*/TxRxPointToPoint",
|
||||
MakeCallback (&AnimationInterface::DevTxTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyTxPsduBegin",
|
||||
MakeCallback (&AnimationInterface::WifiPhyTxBeginTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyRxBegin",
|
||||
MakeCallback (&AnimationInterface::WifiPhyRxBeginTrace, this));
|
||||
Config::ConnectWithoutContextFailSafe ("/NodeList/*/$ns3::MobilityModel/CourseChange",
|
||||
MakeCallback (&AnimationInterface::MobilityCourseChangeTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::WimaxNetDevice/Tx",
|
||||
MakeCallback (&AnimationInterface::WimaxTxTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::WimaxNetDevice/Rx",
|
||||
MakeCallback (&AnimationInterface::WimaxRxTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::LteNetDevice/Tx",
|
||||
MakeCallback (&AnimationInterface::LteTxTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::LteNetDevice/Rx",
|
||||
MakeCallback (&AnimationInterface::LteRxTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::CsmaNetDevice/PhyTxBegin",
|
||||
MakeCallback (&AnimationInterface::CsmaPhyTxBeginTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::CsmaNetDevice/PhyTxEnd",
|
||||
MakeCallback (&AnimationInterface::CsmaPhyTxEndTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::CsmaNetDevice/PhyRxEnd",
|
||||
MakeCallback (&AnimationInterface::CsmaPhyRxEndTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::CsmaNetDevice/MacRx",
|
||||
MakeCallback (&AnimationInterface::CsmaMacRxTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::UanNetDevice/Phy/PhyTxBegin",
|
||||
MakeCallback (&AnimationInterface::UanPhyGenTxTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::UanNetDevice/Phy/PhyRxBegin",
|
||||
MakeCallback (&AnimationInterface::UanPhyGenRxTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/$ns3::BasicEnergySource/RemainingEnergy",
|
||||
MakeCallback (&AnimationInterface::RemainingEnergyTrace, this));
|
||||
|
||||
ConnectLte ();
|
||||
|
||||
Config::Connect ("/NodeList/*/$ns3::Ipv4L3Protocol/Tx",
|
||||
MakeCallback (&AnimationInterface::Ipv4TxTrace, this));
|
||||
Config::Connect ("/NodeList/*/$ns3::Ipv4L3Protocol/Rx",
|
||||
MakeCallback (&AnimationInterface::Ipv4RxTrace, this));
|
||||
Config::Connect ("/NodeList/*/$ns3::Ipv4L3Protocol/Drop",
|
||||
MakeCallback (&AnimationInterface::Ipv4DropTrace, this));
|
||||
|
||||
|
||||
Config::ConnectFailSafe ("/NodeList/*/$ns3::Ipv4L3Protocol/Tx",
|
||||
MakeCallback (&AnimationInterface::Ipv4TxTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/$ns3::Ipv4L3Protocol/Rx",
|
||||
MakeCallback (&AnimationInterface::Ipv4RxTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/$ns3::Ipv4L3Protocol/Drop",
|
||||
MakeCallback (&AnimationInterface::Ipv4DropTrace, this));
|
||||
|
||||
// Queue Enqueues
|
||||
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::AlohaNoackNetDevice/Queue/Enqueue",
|
||||
MakeCallback (&AnimationInterface::EnqueueTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::CsmaNetDevice/TxQueue/Enqueue",
|
||||
MakeCallback (&AnimationInterface::EnqueueTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::PointToPointNetDevice/TxQueue/Enqueue",
|
||||
MakeCallback (&AnimationInterface::EnqueueTrace, this));
|
||||
|
||||
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::AlohaNoackNetDevice/Queue/Enqueue",
|
||||
MakeCallback (&AnimationInterface::EnqueueTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::CsmaNetDevice/TxQueue/Enqueue",
|
||||
MakeCallback (&AnimationInterface::EnqueueTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::PointToPointNetDevice/TxQueue/Enqueue",
|
||||
MakeCallback (&AnimationInterface::EnqueueTrace, this));
|
||||
|
||||
// Queue Dequeues
|
||||
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::AlohaNoackNetDevice/Queue/Dequeue",
|
||||
MakeCallback (&AnimationInterface::DequeueTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::CsmaNetDevice/TxQueue/Dequeue",
|
||||
MakeCallback (&AnimationInterface::DequeueTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::PointToPointNetDevice/TxQueue/Dequeue",
|
||||
MakeCallback (&AnimationInterface::DequeueTrace, this));
|
||||
|
||||
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::AlohaNoackNetDevice/Queue/Dequeue",
|
||||
MakeCallback (&AnimationInterface::DequeueTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::CsmaNetDevice/TxQueue/Dequeue",
|
||||
MakeCallback (&AnimationInterface::DequeueTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::PointToPointNetDevice/TxQueue/Dequeue",
|
||||
MakeCallback (&AnimationInterface::DequeueTrace, this));
|
||||
|
||||
// Queue Drops
|
||||
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::AlohaNoackNetDevice/Queue/Drop",
|
||||
MakeCallback (&AnimationInterface::QueueDropTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::CsmaNetDevice/TxQueue/Drop",
|
||||
MakeCallback (&AnimationInterface::QueueDropTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::PointToPointNetDevice/TxQueue/Drop",
|
||||
MakeCallback (&AnimationInterface::QueueDropTrace, this));
|
||||
|
||||
|
||||
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::AlohaNoackNetDevice/Queue/Drop",
|
||||
MakeCallback (&AnimationInterface::QueueDropTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::CsmaNetDevice/TxQueue/Drop",
|
||||
MakeCallback (&AnimationInterface::QueueDropTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::PointToPointNetDevice/TxQueue/Drop",
|
||||
MakeCallback (&AnimationInterface::QueueDropTrace, this));
|
||||
|
||||
|
||||
// Wifi Mac
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/MacTx",
|
||||
MakeCallback (&AnimationInterface::WifiMacTxTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/MacTxDrop",
|
||||
MakeCallback (&AnimationInterface::WifiMacTxDropTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/MacRx",
|
||||
MakeCallback (&AnimationInterface::WifiMacRxTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/MacRxDrop",
|
||||
MakeCallback (&AnimationInterface::WifiMacRxDropTrace, this));
|
||||
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/MacTx",
|
||||
MakeCallback (&AnimationInterface::WifiMacTxTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/MacTxDrop",
|
||||
MakeCallback (&AnimationInterface::WifiMacTxDropTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/MacRx",
|
||||
MakeCallback (&AnimationInterface::WifiMacRxTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/MacRxDrop",
|
||||
MakeCallback (&AnimationInterface::WifiMacRxDropTrace, this));
|
||||
|
||||
// Wifi Phy
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyTxDrop",
|
||||
MakeCallback (&AnimationInterface::WifiPhyTxDropTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyRxDrop",
|
||||
MakeCallback (&AnimationInterface::WifiPhyRxDropTrace, this));
|
||||
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyTxDrop",
|
||||
MakeCallback (&AnimationInterface::WifiPhyTxDropTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyRxDrop",
|
||||
MakeCallback (&AnimationInterface::WifiPhyRxDropTrace, this));
|
||||
|
||||
// LrWpan
|
||||
Config::Connect ("NodeList/*/DeviceList/*/$ns3::LrWpanNetDevice/Phy/PhyTxBegin",
|
||||
MakeCallback (&AnimationInterface::LrWpanPhyTxBeginTrace, this));
|
||||
Config::Connect ("NodeList/*/DeviceList/*/$ns3::LrWpanNetDevice/Phy/PhyRxBegin",
|
||||
MakeCallback (&AnimationInterface::LrWpanPhyRxBeginTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::LrWpanNetDevice/Mac/MacTx",
|
||||
MakeCallback (&AnimationInterface::LrWpanMacTxTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::LrWpanNetDevice/Mac/MacTxDrop",
|
||||
MakeCallback (&AnimationInterface::LrWpanMacTxDropTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::LrWpanNetDevice/Mac/MacRx",
|
||||
MakeCallback (&AnimationInterface::LrWpanMacRxTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::LrWpanNetDevice/Mac/MacRxDrop",
|
||||
MakeCallback (&AnimationInterface::LrWpanMacRxDropTrace, this));
|
||||
|
||||
Config::ConnectFailSafe ("NodeList/*/DeviceList/*/$ns3::LrWpanNetDevice/Phy/PhyTxBegin",
|
||||
MakeCallback (&AnimationInterface::LrWpanPhyTxBeginTrace, this));
|
||||
Config::ConnectFailSafe ("NodeList/*/DeviceList/*/$ns3::LrWpanNetDevice/Phy/PhyRxBegin",
|
||||
MakeCallback (&AnimationInterface::LrWpanPhyRxBeginTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::LrWpanNetDevice/Mac/MacTx",
|
||||
MakeCallback (&AnimationInterface::LrWpanMacTxTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::LrWpanNetDevice/Mac/MacTxDrop",
|
||||
MakeCallback (&AnimationInterface::LrWpanMacTxDropTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::LrWpanNetDevice/Mac/MacRx",
|
||||
MakeCallback (&AnimationInterface::LrWpanMacRxTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::LrWpanNetDevice/Mac/MacRxDrop",
|
||||
MakeCallback (&AnimationInterface::LrWpanMacRxDropTrace, this));
|
||||
|
||||
// Wave
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WaveNetDevice/PhyEntities/*/$ns3::WifiPhy/PhyTxBegin",
|
||||
MakeCallback (&AnimationInterface::WavePhyTxBeginTrace, this));
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WaveNetDevice/PhyEntities/*/$ns3::WifiPhy/PhyRxBegin",
|
||||
MakeCallback (&AnimationInterface::WavePhyRxBeginTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::WaveNetDevice/PhyEntities/*/$ns3::WifiPhy/PhyTxBegin",
|
||||
MakeCallback (&AnimationInterface::WavePhyTxBeginTrace, this));
|
||||
Config::ConnectFailSafe ("/NodeList/*/DeviceList/*/$ns3::WaveNetDevice/PhyEntities/*/$ns3::WifiPhy/PhyRxBegin",
|
||||
MakeCallback (&AnimationInterface::WavePhyRxBeginTrace, this));
|
||||
}
|
||||
|
||||
Vector
|
||||
|
||||
Reference in New Issue
Block a user