From 10f5371ff3b88858f70d7e6288e0bbfe6aa91add Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Thu, 15 Aug 2024 15:20:08 -0700 Subject: [PATCH] doc: Update sample code in tutorial --- doc/tutorial/source/tracing.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/tutorial/source/tracing.rst b/doc/tutorial/source/tracing.rst index 8ba188d48..bd3d2c906 100644 --- a/doc/tutorial/source/tracing.rst +++ b/doc/tutorial/source/tracing.rst @@ -625,7 +625,7 @@ for "CourseChange" in your favorite editor. You should find .AddTraceSource("CourseChange", "The value of the position and/or velocity vector changed", MakeTraceSourceAccessor(&MobilityModel::m_courseChangeTrace), - "ns3::MobilityModel::CourseChangeCallback") + "ns3::MobilityModel::TracedCallback"); which should look very familiar at this point. @@ -634,14 +634,14 @@ variable in ``mobility-model.h`` you will find :: - TracedCallback> m_courseChangeTrace; + ns3::TracedCallback> m_courseChangeTrace; The type declaration ``TracedCallback`` identifies ``m_courseChangeTrace`` as a special list of Callbacks that can be hooked using the Config functions described above. The ``typedef`` for the callback function signature is also defined in the header file:: - typedef void (* CourseChangeCallback)(Ptr * model); + typedef void (*TracedCallback)(Ptr model); The ``MobilityModel`` class is designed to be a base class providing a common interface for all of the specific subclasses. If you search @@ -651,7 +651,7 @@ down to the end of the file, you will see a method defined called void MobilityModel::NotifyCourseChange() const { - m_courseChangeTrace(this); + m_courseChangeTrace(this); } Derived classes will call into this method whenever they do a course