diff --git a/doc/tutorial/source/tracing.rst b/doc/tutorial/source/tracing.rst index f186991fd..e036e058f 100644 --- a/doc/tutorial/source/tracing.rst +++ b/doc/tutorial/source/tracing.rst @@ -255,7 +255,7 @@ parameter, this could be declared like, `_ before writing code like this!) What you get from this is a variable named simply ``pfi`` that is initialized to the value 0. If you want to -initialize this pointer to something meaningful, you have to have a +initialize this pointer to something meaningful, you need to have a function with a matching signature. In this case, you could provide a function that looks like:: @@ -370,7 +370,7 @@ simple Object we can work with. .AddTraceSource ("MyInteger", "An integer value to trace.", MakeTraceSourceAccessor (&MyObject::m_myInt), - "ns3::Traced::Value::Int32Callback") + "ns3::TracedValueCallback::Int32") ; return tid; } @@ -399,11 +399,11 @@ The ``TracedValue<>`` declaration provides the infrastructure that drives the callback process. Any time the underlying value is changed the TracedValue mechanism will provide both the old and the new value of that variable, in this case an ``int32_t`` value. The trace -sink function for this TracedValue will need the signature +sink function ``traceSink`` for this TracedValue will need the signature :: - void (* TracedValueCallback)(const int32_t oldValue, const int32_t newValue); + void (* traceSink)(int32_t oldValue, int32_t newValue); All trace sinks hooking this trace source must have this signature. We'll discuss below how you can determine the required callback @@ -866,7 +866,7 @@ Repeating the "CourseChange" trace source entry from The callback signature is given as a link to the relevant ``typedef``, where we find - ``typedef void (* CourseChangeCallback)(const std::string context, Ptr * model);`` + ``typedef void (* CourseChangeCallback)(std::string context, Ptr * model);`` **TracedCallback** signature for course change notifications. @@ -932,7 +932,7 @@ Callback function that takes a string context, then the template arguments:: void - CourseChange (const std::string context, Ptr model) + CourseChange (std::string context, Ptr model) { ... } @@ -942,7 +942,7 @@ visible in your local file, you can add the keyword ``static`` and come up with:: static void - CourseChange (const std::string path, Ptr model) + CourseChange (std::string path, Ptr model) { ... } @@ -1204,11 +1204,12 @@ the callback process. On use of any of the operators above with a ``TracedValue`` it will provide both the old and the new value of that variable, in this case an ``int32_t`` value. By inspection of the ``TracedValue`` declaration, we know the trace sink function will have -arguments ``(const int32_t oldValue, const int32_t newValue)``. The +arguments ``(int32_t oldValue, int32_t newValue)``. The return type for a ``TracedValue`` callback function is always -``void``, so the expected callback signature will be:: +``void``, so the expected callback signature for the sink function +``traceSink`` will be:: - void (* TracedValueCallback)(const int32_t oldValue, const int32_t newValue); + void (* traceSink)(int32_t oldValue, int32_t newValue); The ``.AddTraceSource`` in the ``GetTypeId`` method provides the "hooks" used for connecting the trace source to the outside world @@ -1217,7 +1218,7 @@ agruments to ``AddTraceSource``: the Attribute name for the Config system, a help string, and the address of the TracedValue class data member. -The final string argument, "ns3::Traced::Value::Int32" in the example, +The final string argument, "ns3::TracedValueCallback::Int32" in the example, is the name of a ``typedef`` for the callback function signature. We require these signatures to be defined, and give the fully qualified type name to ``AddTraceSource``, so the API documentation can link a @@ -1271,12 +1272,12 @@ the list of TraceSources you will find * **CongestionWindow**: The TCP connnection's congestion window - Callback signature: **ns3::Traced::Value::Uint322Callback** + Callback signature: **ns3::TracedValueCallback::Uint32** Clicking on the callback ``typedef`` link we see the signature you now know to expect:: - typedef void(* ns3::Traced::Value::Int32Callback)(const int32_t oldValue, const int32_t newValue) + typedef void(* ns3::TracedValueCallback::Int32)(int32_t oldValue, int32_t newValue) You should now understand this code completely. If we have a pointer to the ``TcpNewReno``, we can ``TraceConnect`` to the diff --git a/examples/tutorial/fourth.cc b/examples/tutorial/fourth.cc index a28fda5b1..645141857 100644 --- a/examples/tutorial/fourth.cc +++ b/examples/tutorial/fourth.cc @@ -39,7 +39,7 @@ public: .AddTraceSource ("MyInteger", "An integer value to trace.", MakeTraceSourceAccessor (&MyObject::m_myInt), - "ns3::TracedValue::Int32Callback") + "ns3::TracedValueCallback::Int32") ; return tid; } diff --git a/src/core/model/nstime.h b/src/core/model/nstime.h index e63c9f756..6de2620cd 100644 --- a/src/core/model/nstime.h +++ b/src/core/model/nstime.h @@ -531,15 +531,6 @@ public: */ TimeWithUnit As (const enum Unit unit) const; - /** - * TracedValue callback signature for Time - * - * \param [in] oldValue Original value of the traced variable - * \param [in] newValue New value of the traced variable - */ - typedef void (* TracedValueCallback)(const Time oldValue, - const Time newValue); - private: /** How to convert between other units and the current unit. */ struct Information @@ -717,6 +708,17 @@ private: }; // class Time +namespace TracedValueCallback { + + /** + * TracedValue callback signature for Time + * + * \param [in] oldValue Original value of the traced variable + * \param [in] newValue New value of the traced variable + */ + typedef void (* Time)(Time oldValue, Time newValue); + +} // namespace TracedValueCallback /// Force static initialization of Time static bool NS_UNUSED_GLOBAL (g_TimeStaticInit) = Time::StaticInit (); diff --git a/src/core/model/traced-value.h b/src/core/model/traced-value.h index f003ec325..d425eecee 100644 --- a/src/core/model/traced-value.h +++ b/src/core/model/traced-value.h @@ -60,6 +60,32 @@ namespace ns3 { * - ns3::SequenceNumber32TracedValueCallback */ +/** + * \ingroup tracing + * + * \brief TracedValue Callback function types. + */ +namespace TracedValueCallback { + + /** + * TracedValue Callback signature for POD. + * + * \param [in] oldValue original value of the traced variable + * \param [in] newValue new value of the traced variable + * @{ + */ + typedef void (* Bool) (bool oldValue, bool newValue); + typedef void (* Int8) (int8_t oldValue, int8_t newValue); + typedef void (* Uint8) (uint8_t oldValue, uint8_t newValue); + typedef void (* Int16) (int16_t oldValue, int16_t newValue); + typedef void (* Uint16)(uint16_t oldValue, uint16_t newValue); + typedef void (* Int32) (int32_t oldValue, int32_t newValue); + typedef void (* Uint32)(uint32_t oldValue, uint32_t newValue); + typedef void (* Double)(double oldValue, double newValue); + /**@}*/ +} // namespace TracedValueCallback + + /** * \ingroup tracing * @@ -225,23 +251,6 @@ public: } /**@}*/ - /** - * TracedValue Callback signature for POD. - * - * \param [in] oldValue original value of the traced variable - * \param [in] newValue new value of the traced variable - * @{ - */ - typedef void (* BoolCallback) (const bool oldValue, const bool newValue); - typedef void (* Int8Callback) (const int8_t oldValue, const int8_t newValue); - typedef void (* Uint8Callback) (const uint8_t oldValue, const uint8_t newValue); - typedef void (* Int16Callback) (const int16_t oldValue, const int16_t newValue); - typedef void (* Uint16Callback)(const uint16_t oldValue, const uint16_t newValue); - typedef void (* Int32Callback) (const int32_t oldValue, const int32_t newValue); - typedef void (* Uint32Callback)(const uint32_t oldValue, const uint32_t newValue); - typedef void (* DoubleCallback)(const double oldValue, const double newValue); - /**@}*/ - private: /** The underlying value. */ T m_v; diff --git a/src/core/test/attribute-test-suite.cc b/src/core/test/attribute-test-suite.cc index 76fe17e38..a1c755aac 100644 --- a/src/core/test/attribute-test-suite.cc +++ b/src/core/test/attribute-test-suite.cc @@ -195,7 +195,7 @@ public: MakeValueClassTestChecker ()) .AddTraceSource ("Source1", "help test", MakeTraceSourceAccessor (&AttributeObjectTest::m_intSrc1), - "ns3::TracedValue::Int8Callback") + "ns3::TracedValueCallback::Int8") .AddTraceSource ("Source2", "help text", MakeTraceSourceAccessor (&AttributeObjectTest::m_cb), "ns3::AttributeObjectTest::NumericTracedCallback") diff --git a/src/core/test/config-test-suite.cc b/src/core/test/config-test-suite.cc index 0c1eeca96..db1f0cb0a 100644 --- a/src/core/test/config-test-suite.cc +++ b/src/core/test/config-test-suite.cc @@ -98,7 +98,7 @@ ConfigTestObject::GetTypeId (void) MakeIntegerChecker ()) .AddTraceSource ("Source", "XX", MakeTraceSourceAccessor (&ConfigTestObject::m_trace), - "ns3::TracedValue::Int16Callback") + "ns3::TracedValueCallback::Int16") ; return tid; } diff --git a/src/energy/model/basic-energy-harvester.cc b/src/energy/model/basic-energy-harvester.cc index 6c1da9d9f..fa88eb69b 100644 --- a/src/energy/model/basic-energy-harvester.cc +++ b/src/energy/model/basic-energy-harvester.cc @@ -55,11 +55,11 @@ BasicEnergyHarvester::GetTypeId (void) .AddTraceSource ("HarvestedPower", "Harvested power by the BasicEnergyHarvester.", MakeTraceSourceAccessor (&BasicEnergyHarvester::m_harvestedPower), - "ns3::TracedValue::DoubleCallback") + "ns3::TracedValueCallback::Double") .AddTraceSource ("TotalEnergyHarvested", "Total energy harvested by the harvester.", MakeTraceSourceAccessor (&BasicEnergyHarvester::m_totalEnergyHarvestedJ), - "ns3::TracedValue::DoubleCallback") + "ns3::TracedValueCallback::Double") ; return tid; } diff --git a/src/energy/model/basic-energy-source.cc b/src/energy/model/basic-energy-source.cc index 8799bb12e..70fb65fe7 100644 --- a/src/energy/model/basic-energy-source.cc +++ b/src/energy/model/basic-energy-source.cc @@ -69,7 +69,7 @@ BasicEnergySource::GetTypeId (void) .AddTraceSource ("RemainingEnergy", "Remaining energy at BasicEnergySource.", MakeTraceSourceAccessor (&BasicEnergySource::m_remainingEnergyJ), - "ns3::TracedValue::DoubleCallback") + "ns3::TracedValueCallback::Double") ; return tid; } diff --git a/src/energy/model/li-ion-energy-source.cc b/src/energy/model/li-ion-energy-source.cc index 9516c0085..6a290783e 100644 --- a/src/energy/model/li-ion-energy-source.cc +++ b/src/energy/model/li-ion-energy-source.cc @@ -106,7 +106,7 @@ LiIonEnergySource::GetTypeId (void) .AddTraceSource ("RemainingEnergy", "Remaining energy at BasicEnergySource.", MakeTraceSourceAccessor (&LiIonEnergySource::m_remainingEnergyJ), - "ns3::TracedValue::DoubleCallback") + "ns3::TracedValueCallback::Double") ; return tid; } diff --git a/src/energy/model/rv-battery-model.cc b/src/energy/model/rv-battery-model.cc index 4deb9a943..a8205a497 100644 --- a/src/energy/model/rv-battery-model.cc +++ b/src/energy/model/rv-battery-model.cc @@ -83,7 +83,7 @@ RvBatteryModel::GetTypeId (void) .AddTraceSource ("RvBatteryModelBatteryLevel", "RV battery model battery level.", MakeTraceSourceAccessor (&RvBatteryModel::m_batteryLevel), - "ns3::TracedValue::DoubleCallback") + "ns3::TracedValueCallback::Double") .AddTraceSource ("RvBatteryModelBatteryLifetime", "RV battery model battery lifetime.", MakeTraceSourceAccessor (&RvBatteryModel::m_lifetime), diff --git a/src/energy/model/simple-device-energy-model.cc b/src/energy/model/simple-device-energy-model.cc index 64d29f838..c1473e613 100644 --- a/src/energy/model/simple-device-energy-model.cc +++ b/src/energy/model/simple-device-energy-model.cc @@ -40,7 +40,7 @@ SimpleDeviceEnergyModel::GetTypeId (void) .AddTraceSource ("TotalEnergyConsumption", "Total energy consumption of the radio device.", MakeTraceSourceAccessor (&SimpleDeviceEnergyModel::m_totalEnergyConsumption), - "ns3::TracedValue::DoubleCallback") + "ns3::TracedValueCallback::Double") ; return tid; } diff --git a/src/internet/model/codel-queue.cc b/src/internet/model/codel-queue.cc index 7f0c18973..3c897230a 100644 --- a/src/internet/model/codel-queue.cc +++ b/src/internet/model/codel-queue.cc @@ -184,23 +184,23 @@ TypeId CoDelQueue::GetTypeId (void) .AddTraceSource ("Count", "CoDel count", MakeTraceSourceAccessor (&CoDelQueue::m_count), - "ns3::TracedValue::Uint32Callback") + "ns3::TracedValueCallback::Uint32") .AddTraceSource ("DropCount", "CoDel drop count", MakeTraceSourceAccessor (&CoDelQueue::m_dropCount), - "ns3::TracedValue::Uint32Callback") + "ns3::TracedValueCallback::Uint32") .AddTraceSource ("LastCount", "CoDel lastcount", MakeTraceSourceAccessor (&CoDelQueue::m_lastCount), - "ns3::TracedValue::Uint32Callback") + "ns3::TracedValueCallback::Uint32") .AddTraceSource ("DropState", "Dropping state", MakeTraceSourceAccessor (&CoDelQueue::m_dropping), - "ns3::TracedValue::BoolCallback") + "ns3::TracedValueCallback::Bool") .AddTraceSource ("BytesInQueue", "Number of bytes in the queue", MakeTraceSourceAccessor (&CoDelQueue::m_bytesInQueue), - "ns3::TracedValue::Uint32Callback") + "ns3::TracedValueCallback::Uint32") .AddTraceSource ("Sojourn", "Time in the queue", MakeTraceSourceAccessor (&CoDelQueue::m_sojourn), @@ -208,7 +208,7 @@ TypeId CoDelQueue::GetTypeId (void) .AddTraceSource ("DropNext", "Time until next packet drop", MakeTraceSourceAccessor (&CoDelQueue::m_dropNext), - "ns3::TracedValue::Uint32Callback") + "ns3::TracedValueCallback::Uint32") ; return tid; diff --git a/src/internet/model/nsc-tcp-socket-impl.cc b/src/internet/model/nsc-tcp-socket-impl.cc index a14569033..f8d7ec512 100644 --- a/src/internet/model/nsc-tcp-socket-impl.cc +++ b/src/internet/model/nsc-tcp-socket-impl.cc @@ -58,11 +58,11 @@ NscTcpSocketImpl::GetTypeId () .AddTraceSource ("CongestionWindow", "The TCP connection's congestion window", MakeTraceSourceAccessor (&NscTcpSocketImpl::m_cWnd), - "ns3::TracedValue::Uint32Callback") + "ns3::TracedValueCallback::Uint32") .AddTraceSource ("SlowStartThreshold", "TCP slow start threshold (bytes)", MakeTraceSourceAccessor (&NscTcpSocketImpl::m_ssThresh), - "ns3::TracedValue::Uint32Callback") + "ns3::TracedValueCallback::Uint32") .AddTraceSource ("State", "TCP state", MakeTraceSourceAccessor (&NscTcpSocketImpl::m_state), diff --git a/src/internet/model/tcp-socket-base.cc b/src/internet/model/tcp-socket-base.cc index 824ca025f..b8b180ad7 100644 --- a/src/internet/model/tcp-socket-base.cc +++ b/src/internet/model/tcp-socket-base.cc @@ -141,7 +141,7 @@ TcpSocketBase::GetTypeId (void) .AddTraceSource ("RWND", "Remote side's flow control window", MakeTraceSourceAccessor (&TcpSocketBase::m_rWnd), - "ns3::TracedValue::Uint32Callback") + "ns3::TracedValueCallback::Uint32") .AddTraceSource ("HighestRxSequence", "Highest sequence number received from peer", MakeTraceSourceAccessor (&TcpSocketBase::m_highRxMark), @@ -153,11 +153,11 @@ TcpSocketBase::GetTypeId (void) .AddTraceSource ("CongestionWindow", "The TCP connection's congestion window", MakeTraceSourceAccessor (&TcpSocketBase::m_cWnd), - "ns3::TracedValue::Uint32Callback") + "ns3::TracedValueCallback::Uint32") .AddTraceSource ("SlowStartThreshold", "TCP slow start threshold (bytes)", MakeTraceSourceAccessor (&TcpSocketBase::m_ssThresh), - "ns3::TracedValue::Uint32Callback") + "ns3::TracedValueCallback::Uint32") ; return tid; } diff --git a/src/internet/model/tcp-westwood.cc b/src/internet/model/tcp-westwood.cc index 78c9b0881..0e9346428 100644 --- a/src/internet/model/tcp-westwood.cc +++ b/src/internet/model/tcp-westwood.cc @@ -64,7 +64,7 @@ TcpWestwood::GetTypeId (void) MakeEnumChecker(TcpWestwood::WESTWOOD, "Westwood",TcpWestwood::WESTWOODPLUS, "WestwoodPlus")) .AddTraceSource("EstimatedBW", "The estimated bandwidth", MakeTraceSourceAccessor(&TcpWestwood::m_currentBW), - "ns3::TracedValue::DoubleCallback"); + "ns3::TracedValueCallback::Double"); return tid; } diff --git a/src/network/utils/sequence-number.h b/src/network/utils/sequence-number.h index 45585ff57..71344f522 100644 --- a/src/network/utils/sequence-number.h +++ b/src/network/utils/sequence-number.h @@ -482,6 +482,8 @@ typedef SequenceNumber SequenceNumber16; */ typedef SequenceNumber SequenceNumber8; +namespace TracedValueCallback { + /** * \ingroup network * TracedValue callback signature for SequenceNumber32 @@ -489,8 +491,10 @@ typedef SequenceNumber SequenceNumber8; * \param [in] oldValue original value of the traced variable * \param [in] newValue new value of the traced variable */ -typedef void (* SequenceNumber32TracedValueCallback)(const SequenceNumber32 oldValue, - const SequenceNumber32 newValue); +typedef void (* SequenceNumber32)(SequenceNumber32 oldValue, + SequenceNumber32 newValue); + +} // namespace TracedValueCallback } // namespace ns3 diff --git a/src/stats/examples/double-probe-example.cc b/src/stats/examples/double-probe-example.cc index 4dca248b3..19d29bb77 100644 --- a/src/stats/examples/double-probe-example.cc +++ b/src/stats/examples/double-probe-example.cc @@ -66,7 +66,7 @@ Emitter::GetTypeId (void) .AddTraceSource ("Counter", "sample counter", MakeTraceSourceAccessor (&Emitter::m_counter), - "ns3::TracedValue::DoubleCallback") + "ns3::TracedValueCallback::Double") ; return tid; } diff --git a/src/stats/examples/file-helper-example.cc b/src/stats/examples/file-helper-example.cc index 99e117cc9..e4a89c7e4 100644 --- a/src/stats/examples/file-helper-example.cc +++ b/src/stats/examples/file-helper-example.cc @@ -69,7 +69,7 @@ Emitter::GetTypeId (void) .AddTraceSource ("Counter", "sample counter", MakeTraceSourceAccessor (&Emitter::m_counter), - "ns3::TracedValue::DoubleCallback") + "ns3::TracedValueCallback::Double") ; return tid; } diff --git a/src/stats/examples/gnuplot-helper-example.cc b/src/stats/examples/gnuplot-helper-example.cc index c8e72706b..4619864a7 100644 --- a/src/stats/examples/gnuplot-helper-example.cc +++ b/src/stats/examples/gnuplot-helper-example.cc @@ -68,7 +68,7 @@ Emitter::GetTypeId (void) .AddTraceSource ("Counter", "sample counter", MakeTraceSourceAccessor (&Emitter::m_counter), - "ns3::TracedValue::DoubleCallback") + "ns3::TracedValueCallback::Double") ; return tid; } diff --git a/src/stats/model/boolean-probe.cc b/src/stats/model/boolean-probe.cc index 76a37e6fa..b44e52a21 100644 --- a/src/stats/model/boolean-probe.cc +++ b/src/stats/model/boolean-probe.cc @@ -44,7 +44,7 @@ BooleanProbe::GetTypeId () .AddTraceSource ( "Output", "The bool that serves as output for this probe", MakeTraceSourceAccessor (&BooleanProbe::m_output), - "ns3::TracedValue::BoolCallback") + "ns3::TracedValueCallback::Bool") ; return tid; } diff --git a/src/stats/model/double-probe.cc b/src/stats/model/double-probe.cc index e7512df2c..67f5360ff 100644 --- a/src/stats/model/double-probe.cc +++ b/src/stats/model/double-probe.cc @@ -44,7 +44,7 @@ DoubleProbe::GetTypeId () .AddTraceSource ( "Output", "The double that serves as output for this probe", MakeTraceSourceAccessor (&DoubleProbe::m_output), - "ns3::TracedValue::DoubleCallback") + "ns3::TracedValueCallback::Double") ; return tid; } diff --git a/src/stats/model/time-probe.cc b/src/stats/model/time-probe.cc index 3c6b6d4e1..bc2ef55b4 100644 --- a/src/stats/model/time-probe.cc +++ b/src/stats/model/time-probe.cc @@ -45,7 +45,7 @@ TimeProbe::GetTypeId () .AddTraceSource ("Output", "The double valued (units of seconds) probe output", MakeTraceSourceAccessor (&TimeProbe::m_output), - "ns3::TracedValue::DoubleCallback") + "ns3::TracedValueCallback::Double") ; return tid; } diff --git a/src/stats/model/uinteger-16-probe.cc b/src/stats/model/uinteger-16-probe.cc index 51b015e4c..afbf71d94 100644 --- a/src/stats/model/uinteger-16-probe.cc +++ b/src/stats/model/uinteger-16-probe.cc @@ -43,7 +43,7 @@ Uinteger16Probe::GetTypeId () .AddTraceSource ( "Output", "The uint16_t that serves as output for this probe", MakeTraceSourceAccessor (&Uinteger16Probe::m_output), - "ns3::TracedValue::Uint16Callback") + "ns3::TracedValueCallback::Uint16") ; return tid; } diff --git a/src/stats/model/uinteger-32-probe.cc b/src/stats/model/uinteger-32-probe.cc index 5104ec751..f8a87768d 100644 --- a/src/stats/model/uinteger-32-probe.cc +++ b/src/stats/model/uinteger-32-probe.cc @@ -43,7 +43,7 @@ Uinteger32Probe::GetTypeId () .AddTraceSource ( "Output", "The uint32_t that serves as output for this probe", MakeTraceSourceAccessor (&Uinteger32Probe::m_output), - "ns3::TracedValue::Uint32Callback") + "ns3::TracedValueCallback::Uint32") ; return tid; } diff --git a/src/stats/model/uinteger-8-probe.cc b/src/stats/model/uinteger-8-probe.cc index 14ddd95f9..b72822bf8 100644 --- a/src/stats/model/uinteger-8-probe.cc +++ b/src/stats/model/uinteger-8-probe.cc @@ -43,7 +43,7 @@ Uinteger8Probe::GetTypeId () .AddTraceSource ( "Output", "The uint8_t that serves as output for this probe", MakeTraceSourceAccessor (&Uinteger8Probe::m_output), - "ns3::TracedValue::Uint8Callback") + "ns3::TracedValueCallback::Uint8") ; return tid; } diff --git a/src/stats/test/double-probe-test-suite.cc b/src/stats/test/double-probe-test-suite.cc index 50e1f88e5..2f3b67673 100644 --- a/src/stats/test/double-probe-test-suite.cc +++ b/src/stats/test/double-probe-test-suite.cc @@ -64,7 +64,7 @@ SampleEmitter::GetTypeId (void) .SetParent () .AddTraceSource ("Emitter", "XX", MakeTraceSourceAccessor (&SampleEmitter::m_trace), - "ns3::TracedValue::DoubleCallback") + "ns3::TracedValueCallback::Double") ; return tid; } diff --git a/src/uan/model/acoustic-modem-energy-model.cc b/src/uan/model/acoustic-modem-energy-model.cc index fee758e98..164002f82 100644 --- a/src/uan/model/acoustic-modem-energy-model.cc +++ b/src/uan/model/acoustic-modem-energy-model.cc @@ -66,7 +66,7 @@ AcousticModemEnergyModel::GetTypeId (void) .AddTraceSource ("TotalEnergyConsumption", "Total energy consumption of the modem device.", MakeTraceSourceAccessor (&AcousticModemEnergyModel::m_totalEnergyConsumption), - "ns3::TracedValue::DoubleCallback") + "ns3::TracedValueCallback::Double") ; return tid; } diff --git a/src/wifi/model/wifi-radio-energy-model.cc b/src/wifi/model/wifi-radio-energy-model.cc index f1f100bd7..1298291ca 100644 --- a/src/wifi/model/wifi-radio-energy-model.cc +++ b/src/wifi/model/wifi-radio-energy-model.cc @@ -83,7 +83,7 @@ WifiRadioEnergyModel::GetTypeId (void) .AddTraceSource ("TotalEnergyConsumption", "Total energy consumption of the radio device.", MakeTraceSourceAccessor (&WifiRadioEnergyModel::m_totalEnergyConsumption), - "ns3::TracedValue::DoubleCallback") + "ns3::TracedValueCallback::Double") ; return tid; }