Base class providing common user-level ascii trace operations for helpers representing net devices. More...
#include "trace-helper.h"
Public Member Functions | |
AsciiTraceHelperForDevice () | |
Construct an AsciiTraceHelperForDevice. More... | |
virtual | ~AsciiTraceHelperForDevice () |
Destroy an AsciiTraceHelperForDevice. More... | |
void | EnableAscii (Ptr< OutputStreamWrapper > stream, NetDeviceContainer d) |
Enable ascii trace output on each device in the container which is of the appropriate type. More... | |
void | EnableAscii (Ptr< OutputStreamWrapper > stream, NodeContainer n) |
Enable ascii trace output on each device (which is of the appropriate type) in the nodes provided in the container. More... | |
void | EnableAscii (Ptr< OutputStreamWrapper > stream, Ptr< NetDevice > nd) |
Enable ascii trace output on the indicated net device. More... | |
void | EnableAscii (Ptr< OutputStreamWrapper > stream, std::string ndName) |
Enable ascii trace output the indicated net device using a device previously named using the ns-3 object name service. More... | |
void | EnableAscii (Ptr< OutputStreamWrapper > stream, uint32_t nodeid, uint32_t deviceid) |
Enable ascii trace output on the device specified by a global node-id (of a previously created node) and associated device-id. More... | |
void | EnableAscii (std::string prefix, NetDeviceContainer d) |
Enable ascii trace output on each device in the container which is of the appropriate type. More... | |
void | EnableAscii (std::string prefix, NodeContainer n) |
Enable ascii trace output on each device (which is of the appropriate type) in the nodes provided in the container. More... | |
void | EnableAscii (std::string prefix, Ptr< NetDevice > nd, bool explicitFilename=false) |
Enable ascii trace output on the indicated net device. More... | |
void | EnableAscii (std::string prefix, std::string ndName, bool explicitFilename=false) |
Enable ascii trace output the indicated net device using a device previously named using the ns-3 object name service. More... | |
void | EnableAscii (std::string prefix, uint32_t nodeid, uint32_t deviceid, bool explicitFilename) |
Enable ascii trace output on the device specified by a global node-id (of a previously created node) and associated device-id. More... | |
void | EnableAsciiAll (Ptr< OutputStreamWrapper > stream) |
Enable ascii trace output on each device (which is of the appropriate type) in the set of all nodes created in the simulation. More... | |
void | EnableAsciiAll (std::string prefix) |
Enable ascii trace output on each device (which is of the appropriate type) in the set of all nodes created in the simulation. More... | |
virtual void | EnableAsciiInternal (Ptr< OutputStreamWrapper > stream, std::string prefix, Ptr< NetDevice > nd, bool explicitFilename)=0 |
Enable ascii trace output on the indicated net device. More... | |
Private Member Functions | |
void | EnableAsciiImpl (Ptr< OutputStreamWrapper > stream, std::string prefix, NetDeviceContainer d) |
Enable ascii trace output on each device in the container which is of the appropriate type (implementation). More... | |
void | EnableAsciiImpl (Ptr< OutputStreamWrapper > stream, std::string prefix, NodeContainer n) |
Enable ascii trace output on each device (which is of the appropriate type) in the nodes provided in the container (implementation). More... | |
void | EnableAsciiImpl (Ptr< OutputStreamWrapper > stream, std::string prefix, Ptr< NetDevice > nd, bool explicitFilename) |
Enable ascii trace output the indicated net device (implementation). More... | |
void | EnableAsciiImpl (Ptr< OutputStreamWrapper > stream, std::string prefix, std::string ndName, bool explicitFilename) |
Enable ascii trace output the indicated net device using a device previously named using the ns-3 object name service (implementation). More... | |
void | EnableAsciiImpl (Ptr< OutputStreamWrapper > stream, std::string prefix, uint32_t nodeid, uint32_t deviceid, bool explicitFilename) |
Enable ascii trace output on the device specified by a global node-id (of a previously created node) and associated device-id (implementation) More... | |
Base class providing common user-level ascii trace operations for helpers representing net devices.
Definition at line 728 of file trace-helper.h.
|
inline |
Construct an AsciiTraceHelperForDevice.
Definition at line 734 of file trace-helper.h.
|
inlinevirtual |
Destroy an AsciiTraceHelperForDevice.
Definition at line 741 of file trace-helper.h.
void ns3::AsciiTraceHelperForDevice::EnableAscii | ( | Ptr< OutputStreamWrapper > | stream, |
NetDeviceContainer | d | ||
) |
Enable ascii trace output on each device in the container which is of the appropriate type.
stream | An OutputStreamWrapper representing an existing file to use when writing trace data. |
d | container of devices |
Definition at line 557 of file trace-helper.cc.
References EnableAsciiImpl().
void ns3::AsciiTraceHelperForDevice::EnableAscii | ( | Ptr< OutputStreamWrapper > | stream, |
NodeContainer | n | ||
) |
Enable ascii trace output on each device (which is of the appropriate type) in the nodes provided in the container.
stream | An OutputStreamWrapper representing an existing file to use when writing trace data. |
n | container of nodes. |
Definition at line 590 of file trace-helper.cc.
References EnableAsciiImpl().
void ns3::AsciiTraceHelperForDevice::EnableAscii | ( | Ptr< OutputStreamWrapper > | stream, |
Ptr< NetDevice > | nd | ||
) |
Enable ascii trace output on the indicated net device.
stream | An OutputStreamWrapper representing an existing file to use when writing trace data. |
nd | Net device for which you want to enable tracing. |
Definition at line 506 of file trace-helper.cc.
References EnableAsciiInternal().
void ns3::AsciiTraceHelperForDevice::EnableAscii | ( | Ptr< OutputStreamWrapper > | stream, |
std::string | ndName | ||
) |
Enable ascii trace output the indicated net device using a device previously named using the ns-3 object name service.
stream | An OutputStreamWrapper representing an existing file to use when writing trace data. |
ndName | The name of the net device in which you want to enable tracing. |
Definition at line 526 of file trace-helper.cc.
References EnableAsciiImpl().
void ns3::AsciiTraceHelperForDevice::EnableAscii | ( | Ptr< OutputStreamWrapper > | stream, |
uint32_t | nodeid, | ||
uint32_t | deviceid | ||
) |
Enable ascii trace output on the device specified by a global node-id (of a previously created node) and associated device-id.
stream | An OutputStreamWrapper representing an existing file to use when writing trace data. |
nodeid | The node identifier/number of the node on which to enable ascii tracing |
deviceid | The device identifier/index of the device on which to enable ascii tracing |
Definition at line 637 of file trace-helper.cc.
References EnableAsciiImpl().
void ns3::AsciiTraceHelperForDevice::EnableAscii | ( | std::string | prefix, |
NetDeviceContainer | d | ||
) |
Enable ascii trace output on each device in the container which is of the appropriate type.
prefix | Filename prefix to use for ascii files. |
d | container of devices |
Definition at line 548 of file trace-helper.cc.
References EnableAsciiImpl().
void ns3::AsciiTraceHelperForDevice::EnableAscii | ( | std::string | prefix, |
NodeContainer | n | ||
) |
Enable ascii trace output on each device (which is of the appropriate type) in the nodes provided in the container.
prefix | Filename prefix to use for ascii files. |
n | container of nodes. |
Definition at line 581 of file trace-helper.cc.
References EnableAsciiImpl().
void ns3::AsciiTraceHelperForDevice::EnableAscii | ( | std::string | prefix, |
Ptr< NetDevice > | nd, | ||
bool | explicitFilename = false |
||
) |
Enable ascii trace output on the indicated net device.
prefix | Filename prefix to use for ascii files. |
nd | Net device for which you want to enable tracing. |
explicitFilename | Treat the prefix as an explicit filename if true |
Definition at line 497 of file trace-helper.cc.
References EnableAsciiInternal().
Referenced by LrWpanAckTestCase::DoRun(), and Ns3TcpCubicTestCase::DoRun().
void ns3::AsciiTraceHelperForDevice::EnableAscii | ( | std::string | prefix, |
std::string | ndName, | ||
bool | explicitFilename = false |
||
) |
Enable ascii trace output the indicated net device using a device previously named using the ns-3 object name service.
prefix | filename prefix to use for ascii files. |
ndName | The name of the net device in which you want to enable tracing. |
explicitFilename | Treat the prefix as an explicit filename if true |
Definition at line 515 of file trace-helper.cc.
References EnableAsciiImpl().
void ns3::AsciiTraceHelperForDevice::EnableAscii | ( | std::string | prefix, |
uint32_t | nodeid, | ||
uint32_t | deviceid, | ||
bool | explicitFilename | ||
) |
Enable ascii trace output on the device specified by a global node-id (of a previously created node) and associated device-id.
prefix | Filename prefix to use when creating ascii trace files |
nodeid | The node identifier/number of the node on which to enable ascii tracing |
deviceid | The device identifier/index of the device on which to enable ascii tracing |
explicitFilename | Treat the prefix as an explicit filename if true |
Definition at line 648 of file trace-helper.cc.
References EnableAsciiImpl().
void ns3::AsciiTraceHelperForDevice::EnableAsciiAll | ( | Ptr< OutputStreamWrapper > | stream | ) |
Enable ascii trace output on each device (which is of the appropriate type) in the set of all nodes created in the simulation.
stream | An OutputStreamWrapper representing an existing file to use when writing trace data. |
Definition at line 628 of file trace-helper.cc.
References EnableAsciiImpl(), and ns3::NodeContainer::GetGlobal().
void ns3::AsciiTraceHelperForDevice::EnableAsciiAll | ( | std::string | prefix | ) |
Enable ascii trace output on each device (which is of the appropriate type) in the set of all nodes created in the simulation.
prefix | Filename prefix to use for ascii files. |
Definition at line 619 of file trace-helper.cc.
References EnableAsciiImpl(), and ns3::NodeContainer::GetGlobal().
Referenced by DsdvManetExample::CreateDevices(), MeshTest::CreateNodes(), and NeighborCacheExample::Run().
|
private |
Enable ascii trace output on each device in the container which is of the appropriate type (implementation).
stream | An OutputStreamWrapper representing an existing file to use when writing trace data. |
prefix | Filename prefix to use for ascii files. |
d | container of devices |
Definition at line 566 of file trace-helper.cc.
References ns3::NetDeviceContainer::Begin(), EnableAsciiInternal(), and ns3::NetDeviceContainer::End().
|
private |
Enable ascii trace output on each device (which is of the appropriate type) in the nodes provided in the container (implementation).
stream | An OutputStreamWrapper representing an existing file to use when writing trace data. |
prefix | Filename prefix to use for ascii files. |
n | container of nodes. |
Definition at line 599 of file trace-helper.cc.
References ns3::NetDeviceContainer::Add(), ns3::NodeContainer::Begin(), EnableAsciiImpl(), ns3::NodeContainer::End(), ns3::Node::GetDevice(), and ns3::Node::GetNDevices().
|
private |
Enable ascii trace output the indicated net device (implementation).
stream | An OutputStreamWrapper representing an existing file to use when writing trace data. |
prefix | filename prefix to use for ascii files. |
nd | Net device for which you want to enable tracing |
explicitFilename | Treat the prefix as an explicit filename if true |
|
private |
Enable ascii trace output the indicated net device using a device previously named using the ns-3 object name service (implementation).
stream | An OutputStreamWrapper representing an existing file to use when writing trace data. |
prefix | filename prefix to use for ascii files. |
ndName | The name of the net device in which you want to enable tracing. |
explicitFilename | Treat the prefix as an explicit filename if true |
Definition at line 535 of file trace-helper.cc.
References EnableAsciiInternal().
|
private |
Enable ascii trace output on the device specified by a global node-id (of a previously created node) and associated device-id (implementation)
stream | An OutputStreamWrapper representing an existing file to use when writing trace data. |
prefix | Filename prefix to use for ascii trace files. |
nodeid | The node identifier/number of the node on which to enable ascii tracing |
deviceid | The device identifier/index of the device on which to enable ascii tracing |
explicitFilename | Treat the prefix as an explicit filename if true |
Definition at line 660 of file trace-helper.cc.
References ns3::NodeContainer::Begin(), EnableAsciiInternal(), ns3::NodeContainer::End(), ns3::Node::GetDevice(), ns3::NodeContainer::GetGlobal(), ns3::Node::GetId(), ns3::Node::GetNDevices(), and NS_ABORT_MSG_IF.
Referenced by EnableAscii(), EnableAsciiAll(), and EnableAsciiImpl().
|
pure virtual |
Enable ascii trace output on the indicated net device.
The implementation is expected to use a provided Ptr<OutputStreamWrapper> if it is non-null. If the OutputStreamWrapper is null, the implementation is expected to use a provided prefix to construct a new file name for each net device using the rules described in the class overview.
If the prefix is provided, there will be one file per net device created. In this case, adding a trace context to the file would be pointless, so the device implementation is expected to TraceConnectWithoutContext.
If the output stream object is provided, there may be many different devices writing to a single file. In this case, the device adding a trace context could be important, so the device implementation is expected to TraceConnect.
stream | An OutputStreamWrapper representing an existing file to use when writing trace data. |
prefix | Filename prefix to use for ascii trace files. |
nd | Net device for which you want to enable tracing |
explicitFilename | Treat the prefix as an explicit filename if true |
Implemented in ns3::WimaxHelper, ns3::WifiPhyHelper, ns3::PointToPointHelper, ns3::LrWpanHelper, ns3::FdNetDeviceHelper, and ns3::CsmaHelper.
Referenced by EnableAscii(), and EnableAsciiImpl().