A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::visualizer::PyViz Class Reference

helper class to be used by the visualizer More...

#include "pyviz.h"

Collaboration diagram for ns3::visualizer::PyViz:

Classes

struct  TransmissionSampleKey
 The TransmissionSampleKey structure. More...
struct  TransmissionSampleValue
 The TransmissionSampleValue structure. More...
struct  TxRecordValue
 The TxRecordValue structure. More...

Public Member Functions

 PyViz ()
 ~PyViz ()
LastPacketsSample GetLastPackets (uint32_t nodeId) const
 Get last packets function.
std::vector< NodeStatisticsGetNodesStatistics () const
 Get node statistics.
PacketDropSampleList GetPacketDropSamples () const
 Get packet drop samples.
std::vector< std::string > GetPauseMessages () const
 Get pause message function.
Time GetSimulatorStopTime ()
 Get the stop time of the underlying visual simulator implementation.
TransmissionSampleList GetTransmissionSamples () const
 Get transmission samples.
void RegisterCsmaLikeDevice (const std::string &deviceTypeName)
 Register CSMA like device function.
void RegisterDropTracePath (const std::string &tracePath)
 Register drop trace path function.
void RegisterPointToPointLikeDevice (const std::string &deviceTypeName)
 Register point to point like device function.
void RegisterWifiLikeDevice (const std::string &deviceTypeName)
 Register WIFI like device function.
void SetNodesOfInterest (std::set< uint32_t > nodes)
 Set nodes of interest function.
void SetPacketCaptureOptions (uint32_t nodeId, PacketCaptureOptions options)
 Set packet capture options function.
void SimulatorRunUntil (Time time)
 Run simulation until a given (simulated, absolute) time is reached.

Static Public Member Functions

static void LineClipping (double boundsX1, double boundsY1, double boundsX2, double boundsY2, double &lineX1, double &lineY1, double &lineX2, double &lineY2)
 Utility function - clips a line to a bounding box.
static void Pause (const std::string &message)
 Pause function.

Private Types

using TxRecordKey = std::pair<Ptr<Channel>, uint32_t>
 TxRecordKey type definition.

Private Member Functions

void CallbackStopSimulation ()
 Stop simulation callback function.
void DoPause (const std::string &message)
 Do pause function.
NetDeviceStatisticsFindNetDeviceStatistics (int node, int interface)
 Find net device statistics function.
bool GetPacketCaptureOptions (uint32_t nodeId, const PacketCaptureOptions **outOptions) const
 Get packet capture options function.
void TraceDevQueueDrop (std::string context, Ptr< const Packet > packet)
 Queue drop trace callback function.
void TraceIpv4Drop (std::string context, const ns3::Ipv4Header &hdr, Ptr< const Packet > packet, ns3::Ipv4L3Protocol::DropReason reason, Ptr< Ipv4 > dummy_ipv4, uint32_t interface)
 Ipv4 drop trace callback function.
void TraceNetDevPromiscRxCsma (std::string context, Ptr< const Packet > packet)
 CSMA promiscuous receive function.
void TraceNetDevRxCommon (const std::string &context, Ptr< const Packet > packet, const std::variant< Mac16Address, Mac48Address, Mac64Address > &source)
 Network receive common trace callback function.
void TraceNetDevRxCsma (std::string context, Ptr< const Packet > packet)
 CSMA receive trace callback function.
void TraceNetDevRxLrWpan (std::string context, Ptr< const Packet > packet)
 Lr-Wpan receive trace callback function.
void TraceNetDevRxLte (std::string context, Ptr< const Packet > packet, const Mac48Address &source)
 LTE receive trace callback function.
void TraceNetDevRxPointToPoint (std::string context, Ptr< const Packet > packet)
 Point to point receive trace callback function.
void TraceNetDevRxWifi (std::string context, Ptr< const Packet > packet)
 Wi-Fi receive trace callback function.
void TraceNetDevTxCommon (const std::string &context, Ptr< const Packet > packet, const std::variant< Mac16Address, Mac48Address, Mac64Address > &destination)
 Network transmit common trace callback function.
void TraceNetDevTxCsma (std::string context, Ptr< const Packet > packet)
 CSMA transmit trace callback function.
void TraceNetDevTxLrWpan (std::string context, Ptr< const Packet > packet)
 Lr-Wpan transmit trace callback function.
void TraceNetDevTxLte (std::string context, Ptr< const Packet > packet, const Mac48Address &destination)
 LTE transmit trace callback function.
void TraceNetDevTxPointToPoint (std::string context, Ptr< const Packet > packet)
 Point to point transmit trace callback function.
void TraceNetDevTxWifi (std::string context, Ptr< const Packet > packet)
 Wi-Fi transmit trace callback function.

Static Private Member Functions

static bool FilterPacket (Ptr< const Packet > packet, const PacketCaptureOptions &options)
 Filter packet function.

Private Attributes

std::map< uint32_t, LastPacketsSamplem_lastPackets
 Last packets.
std::set< uint32_tm_nodesOfInterest
 List of node IDs whose transmissions will be monitored.
std::map< uint32_t, std::vector< NetDeviceStatistics > > m_nodesStatistics
 Node statistics.
std::map< uint32_t, PacketCaptureOptionsm_packetCaptureOptions
 Packet capture options.
std::map< Ptr< Node >, uint32_tm_packetDrops
 Packet drops.
std::map< uint32_t, Timem_packetsOfInterest
 List of packet UIDs that will be monitored.
std::vector< std::string > m_pauseMessages
 Pause message.
Time m_runUntil
 Indicates until when the simulation should run for its next step.
bool m_stop
 Stop simulation flag.
std::map< TransmissionSampleKey, TransmissionSampleValuem_transmissionSamples
 Transmission samples.
std::map< TxRecordKey, TxRecordValuem_txRecords
 Transmit records.

Detailed Description

helper class to be used by the visualizer

Internal:

This class is not meant to be used by simulations. It is only meant to be used by the visualizer tool (PyViz). The only reason it is public is because Python bindings for it are needed, otherwise it should be considered private.

Definition at line 155 of file pyviz.h.

Member Typedef Documentation

◆ TxRecordKey

TxRecordKey type definition.

Definition at line 515 of file pyviz.h.

Constructor & Destructor Documentation

◆ PyViz()

◆ ~PyViz()

ns3::visualizer::PyViz::~PyViz ( )

Definition at line 240 of file pyviz.cc.

References ns3::visualizer::g_visualizer, NS_ASSERT, and NS_LOG_FUNCTION_NOARGS.

Member Function Documentation

◆ CallbackStopSimulation()

void ns3::visualizer::PyViz::CallbackStopSimulation ( )
private

Stop simulation callback function.

Definition at line 274 of file pyviz.cc.

References m_runUntil, m_stop, ns3::Simulator::Now(), NS_LOG_FUNCTION_NOARGS, and ns3::Simulator::Stop().

Referenced by SimulatorRunUntil().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DoPause()

void ns3::visualizer::PyViz::DoPause ( const std::string & message)
private

Do pause function.

Parameters
messagethe pause message

Definition at line 249 of file pyviz.cc.

References ns3::visualizer::g_visualizer, m_pauseMessages, m_stop, ns3::Simulator::Now(), NS_LOG_LOGIC, and ns3::Time::S.

Here is the call graph for this function:

◆ FilterPacket()

bool ns3::visualizer::PyViz::FilterPacket ( Ptr< const Packet > packet,
const PacketCaptureOptions & options )
staticprivate

Filter packet function.

Parameters
packetThe packet
optionsThe capture options
Returns
True if successful

Definition at line 421 of file pyviz.cc.

References ns3::PacketMetadata::ItemIterator::HasNext(), ns3::visualizer::PacketCaptureOptions::headers, ns3::visualizer::PacketCaptureOptions::mode, ns3::PacketMetadata::ItemIterator::Next(), NS_FATAL_ERROR, ns3::visualizer::PACKET_CAPTURE_DISABLED, ns3::visualizer::PACKET_CAPTURE_FILTER_HEADERS_AND, ns3::visualizer::PACKET_CAPTURE_FILTER_HEADERS_OR, and ns3::PacketMetadata::Item::tid.

Referenced by TraceDevQueueDrop(), TraceNetDevRxCommon(), and TraceNetDevTxCommon().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindNetDeviceStatistics()

NetDeviceStatistics & ns3::visualizer::PyViz::FindNetDeviceStatistics ( int node,
int interface )
inlineprivate

Find net device statistics function.

Parameters
nodeThe node
interfaceThe interface number
Returns
The device statistics

Definition at line 388 of file pyviz.cc.

References ns3::NodeList::GetNode(), and m_nodesStatistics.

Referenced by TraceNetDevRxCommon(), and TraceNetDevTxCommon().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetLastPackets()

LastPacketsSample ns3::visualizer::PyViz::GetLastPackets ( uint32_t nodeId) const

Get last packets function.

Parameters
nodeIdthe node ID
Returns
the last packets

Definition at line 966 of file pyviz.cc.

References m_lastPackets, and NS_LOG_DEBUG.

◆ GetNodesStatistics()

std::vector< NodeStatistics > ns3::visualizer::PyViz::GetNodesStatistics ( ) const

Get node statistics.

Returns
the node statistics

Definition at line 954 of file pyviz.cc.

References m_nodesStatistics.

◆ GetPacketCaptureOptions()

bool ns3::visualizer::PyViz::GetPacketCaptureOptions ( uint32_t nodeId,
const PacketCaptureOptions ** outOptions ) const
private

Get packet capture options function.

Parameters
nodeIdThe node ID
outOptionsThe packet capture options
Returns
True if successful

Definition at line 406 of file pyviz.cc.

References m_packetCaptureOptions.

Referenced by TraceDevQueueDrop(), TraceNetDevRxCommon(), and TraceNetDevTxCommon().

Here is the caller graph for this function:

◆ GetPacketDropSamples()

PacketDropSampleList ns3::visualizer::PyViz::GetPacketDropSamples ( ) const

Get packet drop samples.

Returns
the packet drop sample list

Definition at line 930 of file pyviz.cc.

References ns3::visualizer::PacketDropSample::bytes, ns3::Node::GetId(), m_packetDrops, NS_LOG_DEBUG, and ns3::visualizer::PacketDropSample::transmitter.

Here is the call graph for this function:

◆ GetPauseMessages()

std::vector< std::string > ns3::visualizer::PyViz::GetPauseMessages ( ) const

Get pause message function.

Returns
the pause message

Definition at line 265 of file pyviz.cc.

References ns3::visualizer::g_visualizer, m_pauseMessages, ns3::Simulator::Now(), NS_LOG_LOGIC, and ns3::Time::S.

Here is the call graph for this function:

◆ GetSimulatorStopTime()

Time ns3::visualizer::PyViz::GetSimulatorStopTime ( )

Get the stop time of the underlying visual simulator implementation.

Returns
The stop time of the visual simulator implementation.

Definition at line 350 of file pyviz.cc.

References ns3::DynamicCast(), and ns3::Simulator::GetImplementation().

Here is the call graph for this function:

◆ GetTransmissionSamples()

TransmissionSampleList ns3::visualizer::PyViz::GetTransmissionSamples ( ) const

Get transmission samples.

Returns
the transmission sample list

Definition at line 910 of file pyviz.cc.

References ns3::visualizer::TransmissionSample::bytes, ns3::visualizer::TransmissionSample::channel, ns3::Node::GetId(), m_transmissionSamples, NS_LOG_DEBUG, ns3::visualizer::TransmissionSample::receiver, and ns3::visualizer::TransmissionSample::transmitter.

Here is the call graph for this function:

◆ LineClipping()

void ns3::visualizer::PyViz::LineClipping ( double boundsX1,
double boundsY1,
double boundsX2,
double boundsY2,
double & lineX1,
double & lineY1,
double & lineX2,
double & lineY2 )
static

Utility function - clips a line to a bounding box.

Parameters
[in]boundsX1Bounding box, minimum X coord
[in]boundsY1Bounding box, minimum Y coord
[in]boundsX2Bounding box, maximum X coord
[in]boundsY2Bounding box, maximum Y coord
[in,out]lineX1Line, minimum X coord (any on input, clipped to the bounding box on output)
[in,out]lineY1Line, minimum Y coord (any on input, clipped to the bounding box on output)
[in,out]lineX2Line, maximum X coord (any on input, clipped to the bounding box on output)
[in,out]lineY2Line, maximum Y coord (any on input, clipped to the bounding box on output)

Definition at line 982 of file pyviz.cc.

References ns3::visualizer::FastClipping::ClipLine(), ns3::visualizer::FastClipping::Line::end, ns3::visualizer::FastClipping::Line::start, ns3::visualizer::FastClipping::Vector2::x, and ns3::visualizer::FastClipping::Vector2::y.

Here is the call graph for this function:

◆ Pause()

void ns3::visualizer::PyViz::Pause ( const std::string & message)
static

Pause function.

Parameters
messagethe pause message

Definition at line 258 of file pyviz.cc.

References ns3::visualizer::g_visualizer, and NS_ASSERT.

◆ RegisterCsmaLikeDevice()

void ns3::visualizer::PyViz::RegisterCsmaLikeDevice ( const std::string & deviceTypeName)

Register CSMA like device function.

Parameters
deviceTypeNamethe device type name

Definition at line 179 of file pyviz.cc.

References ns3::Config::Connect(), ns3::TypeId::LookupByName(), ns3::MakeCallback(), TraceNetDevPromiscRxCsma(), TraceNetDevRxCsma(), and TraceNetDevTxCsma().

Here is the call graph for this function:

◆ RegisterDropTracePath()

void ns3::visualizer::PyViz::RegisterDropTracePath ( const std::string & tracePath)

Register drop trace path function.

Parameters
tracePaththe path to trace

Definition at line 235 of file pyviz.cc.

References ns3::Config::Connect(), ns3::MakeCallback(), and TraceDevQueueDrop().

Here is the call graph for this function:

◆ RegisterPointToPointLikeDevice()

void ns3::visualizer::PyViz::RegisterPointToPointLikeDevice ( const std::string & deviceTypeName)

Register point to point like device function.

Parameters
deviceTypeNamethe device type name

Definition at line 211 of file pyviz.cc.

References ns3::Config::Connect(), ns3::TypeId::LookupByName(), ns3::MakeCallback(), TraceNetDevRxPointToPoint(), and TraceNetDevTxPointToPoint().

Here is the call graph for this function:

◆ RegisterWifiLikeDevice()

void ns3::visualizer::PyViz::RegisterWifiLikeDevice ( const std::string & deviceTypeName)

Register WIFI like device function.

Parameters
deviceTypeNamethe device type name

Definition at line 197 of file pyviz.cc.

References ns3::Config::Connect(), ns3::TypeId::LookupByName(), ns3::MakeCallback(), TraceNetDevRxWifi(), and TraceNetDevTxWifi().

Here is the call graph for this function:

◆ SetNodesOfInterest()

void ns3::visualizer::PyViz::SetNodesOfInterest ( std::set< uint32_t > nodes)

Set nodes of interest function.

Parameters
nodesthe collection of nodes

Definition at line 948 of file pyviz.cc.

References m_nodesOfInterest, and nodes.

◆ SetPacketCaptureOptions()

void ns3::visualizer::PyViz::SetPacketCaptureOptions ( uint32_t nodeId,
PacketCaptureOptions options )

Set packet capture options function.

Parameters
nodeIdthe node ID
optionsthe capture options

Definition at line 225 of file pyviz.cc.

References ns3::visualizer::PacketCaptureOptions::headers, m_packetCaptureOptions, ns3::visualizer::PacketCaptureOptions::mode, NS_LOG_DEBUG, and ns3::visualizer::PacketCaptureOptions::numLastPackets.

◆ SimulatorRunUntil()

void ns3::visualizer::PyViz::SimulatorRunUntil ( Time time)

Run simulation until a given (simulated, absolute) time is reached.

Parameters
timethe run time

Definition at line 285 of file pyviz.cc.

References CallbackStopSimulation(), ns3::DynamicCast(), ns3::Simulator::GetImplementation(), m_packetDrops, m_packetsOfInterest, m_pauseMessages, m_runUntil, m_stop, m_transmissionSamples, m_txRecords, ns3::Simulator::NO_CONTEXT, ns3::Simulator::Now(), NS_LOG_LOGIC, ns3::Simulator::ScheduleWithContext(), and ns3::Seconds().

Here is the call graph for this function:

◆ TraceDevQueueDrop()

void ns3::visualizer::PyViz::TraceDevQueueDrop ( std::string context,
Ptr< const Packet > packet )
private

Queue drop trace callback function.

Parameters
contextthe context
packetthe packet

Definition at line 463 of file pyviz.cc.

References ns3::visualizer::PacketSample::device, FilterPacket(), ns3::NodeList::GetNode(), GetPacketCaptureOptions(), ns3::visualizer::LastPacketsSample::lastDroppedPackets, m_lastPackets, m_nodesOfInterest, m_packetDrops, m_packetsOfInterest, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::visualizer::PacketCaptureOptions::numLastPackets, ns3::visualizer::PacketSample::packet, PathSplit(), and ns3::visualizer::PacketSample::time.

Referenced by PyViz(), RegisterDropTracePath(), and TraceIpv4Drop().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceIpv4Drop()

void ns3::visualizer::PyViz::TraceIpv4Drop ( std::string context,
const ns3::Ipv4Header & hdr,
Ptr< const Packet > packet,
ns3::Ipv4L3Protocol::DropReason reason,
Ptr< Ipv4 > dummy_ipv4,
uint32_t interface )
private

Ipv4 drop trace callback function.

Parameters
contextthe context
hdrthe header
packetthe packet
reasonthe drop reason
dummy_ipv4the dummy Ipv4
interfacethe interface

Definition at line 510 of file pyviz.cc.

References TraceDevQueueDrop().

Referenced by PyViz().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceNetDevPromiscRxCsma()

void ns3::visualizer::PyViz::TraceNetDevPromiscRxCsma ( std::string context,
Ptr< const Packet > packet )
private

CSMA promiscuous receive function.

Parameters
contextthe context
packetthe packet

Definition at line 870 of file pyviz.cc.

References ns3::EthernetHeader::GetDestination(), NS_ABORT_IF, ns3::NetDevice::PACKET_OTHERHOST, and TraceNetDevRxCommon().

Referenced by PyViz(), and RegisterCsmaLikeDevice().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceNetDevRxCommon()

void ns3::visualizer::PyViz::TraceNetDevRxCommon ( const std::string & context,
Ptr< const Packet > packet,
const std::variant< Mac16Address, Mac48Address, Mac64Address > & source )
private

Network receive common trace callback function.

Parameters
contextthe context
packetthe packet
sourcethe source MAC address

Definition at line 683 of file pyviz.cc.

References ns3::visualizer::PyViz::TransmissionSampleValue::bytes, ns3::visualizer::PacketSample::device, FilterPacket(), FindNetDeviceStatistics(), ns3::visualizer::RxPacketSample::from, ns3::Node::GetId(), ns3::NodeList::GetNode(), GetPacketCaptureOptions(), ns3::visualizer::LastPacketsSample::lastReceivedPackets, ns3::LOG_DEBUG, m_lastPackets, ns3::visualizer::PyVizPacketTag::m_packetId, m_packetsOfInterest, m_transmissionSamples, m_txRecords, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_WARN, ns3::visualizer::PacketCaptureOptions::numLastPackets, ns3::visualizer::PacketSample::packet, PathSplit(), ns3::visualizer::NetDeviceStatistics::receivedBytes, ns3::visualizer::NetDeviceStatistics::receivedPackets, ns3::visualizer::PyViz::TransmissionSampleKey::receiver, ns3::visualizer::PyViz::TxRecordValue::srcNode, ns3::visualizer::PacketSample::time, and ns3::visualizer::PyViz::TransmissionSampleKey::transmitter.

Referenced by TraceNetDevPromiscRxCsma(), TraceNetDevRxCsma(), TraceNetDevRxLrWpan(), TraceNetDevRxLte(), TraceNetDevRxPointToPoint(), and TraceNetDevRxWifi().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceNetDevRxCsma()

void ns3::visualizer::PyViz::TraceNetDevRxCsma ( std::string context,
Ptr< const Packet > packet )
private

CSMA receive trace callback function.

Parameters
contextthe context
packetthe packet

Definition at line 852 of file pyviz.cc.

References ns3::EthernetHeader::GetSource(), NS_ABORT_IF, and TraceNetDevRxCommon().

Referenced by PyViz(), and RegisterCsmaLikeDevice().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceNetDevRxLrWpan()

void ns3::visualizer::PyViz::TraceNetDevRxLrWpan ( std::string context,
Ptr< const Packet > packet )
private

Lr-Wpan receive trace callback function.

Parameters
contextthe context
packetthe packet

Definition at line 833 of file pyviz.cc.

References ns3::lrwpan::EXT_ADDR, ns3::lrwpan::LrWpanMacHeader::GetExtSrcAddr(), ns3::lrwpan::LrWpanMacHeader::GetShortSrcAddr(), ns3::lrwpan::LrWpanMacHeader::GetSrcAddrMode(), NS_ABORT_IF, and TraceNetDevRxCommon().

Referenced by PyViz().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceNetDevRxLte()

void ns3::visualizer::PyViz::TraceNetDevRxLte ( std::string context,
Ptr< const Packet > packet,
const Mac48Address & source )
private

LTE receive trace callback function.

Parameters
contextthe context
packetthe packet
sourcethe MAC address of the source

Definition at line 899 of file pyviz.cc.

References NS_LOG_FUNCTION, and TraceNetDevRxCommon().

Referenced by PyViz().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceNetDevRxPointToPoint()

void ns3::visualizer::PyViz::TraceNetDevRxPointToPoint ( std::string context,
Ptr< const Packet > packet )
private

Point to point receive trace callback function.

Parameters
contextthe context
packetthe packet

Definition at line 862 of file pyviz.cc.

References TraceNetDevRxCommon().

Referenced by PyViz(), and RegisterPointToPointLikeDevice().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceNetDevRxWifi()

void ns3::visualizer::PyViz::TraceNetDevRxWifi ( std::string context,
Ptr< const Packet > packet )
private

Wi-Fi receive trace callback function.

Parameters
contextthe context
packetthe packet

Definition at line 801 of file pyviz.cc.

References ns3::WifiMacHeader::GetAddr2(), ns3::WifiMacHeader::GetAddr3(), ns3::WifiMacHeader::GetAddr4(), ns3::WifiMacHeader::IsFromDs(), ns3::WifiMacHeader::IsToDs(), NS_ABORT_IF, NS_LOG_FUNCTION, and TraceNetDevRxCommon().

Referenced by PyViz(), and RegisterWifiLikeDevice().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceNetDevTxCommon()

void ns3::visualizer::PyViz::TraceNetDevTxCommon ( const std::string & context,
Ptr< const Packet > packet,
const std::variant< Mac16Address, Mac48Address, Mac64Address > & destination )
private

Network transmit common trace callback function.

Parameters
contextthe context
packetthe packet
destinationthe destination MAC address

Definition at line 525 of file pyviz.cc.

References ns3::visualizer::PacketSample::device, FilterPacket(), FindNetDeviceStatistics(), ns3::NodeList::GetNode(), GetPacketCaptureOptions(), ns3::visualizer::PyViz::TxRecordValue::isBroadcast, ns3::visualizer::LastPacketsSample::lastTransmittedPackets, m_lastPackets, m_nodesOfInterest, ns3::visualizer::PyVizPacketTag::m_packetId, m_packetsOfInterest, m_txRecords, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::visualizer::PacketCaptureOptions::numLastPackets, ns3::visualizer::PacketSample::packet, PathSplit(), ns3::visualizer::PacketSample::time, ns3::visualizer::TxPacketSample::to, ns3::visualizer::NetDeviceStatistics::transmittedBytes, and ns3::visualizer::NetDeviceStatistics::transmittedPackets.

Referenced by TraceNetDevTxCsma(), TraceNetDevTxLrWpan(), TraceNetDevTxLte(), TraceNetDevTxPointToPoint(), and TraceNetDevTxWifi().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceNetDevTxCsma()

void ns3::visualizer::PyViz::TraceNetDevTxCsma ( std::string context,
Ptr< const Packet > packet )
private

CSMA transmit trace callback function.

Parameters
contextthe context
packetthe packet

Definition at line 663 of file pyviz.cc.

References ns3::EthernetHeader::GetDestination(), NS_ABORT_IF, and TraceNetDevTxCommon().

Referenced by PyViz(), and RegisterCsmaLikeDevice().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceNetDevTxLrWpan()

void ns3::visualizer::PyViz::TraceNetDevTxLrWpan ( std::string context,
Ptr< const Packet > packet )
private

Lr-Wpan transmit trace callback function.

Parameters
contextthe context
packetthe packet

Definition at line 643 of file pyviz.cc.

References ns3::lrwpan::EXT_ADDR, ns3::lrwpan::LrWpanMacHeader::GetDstAddrMode(), ns3::lrwpan::LrWpanMacHeader::GetExtDstAddr(), ns3::lrwpan::LrWpanMacHeader::GetShortDstAddr(), NS_ABORT_IF, and TraceNetDevTxCommon().

Referenced by PyViz().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceNetDevTxLte()

void ns3::visualizer::PyViz::TraceNetDevTxLte ( std::string context,
Ptr< const Packet > packet,
const Mac48Address & destination )
private

LTE transmit trace callback function.

Parameters
contextthe context
packetthe packet
destinationthe destination MAC address

Definition at line 888 of file pyviz.cc.

References NS_LOG_FUNCTION, and TraceNetDevTxCommon().

Referenced by PyViz().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceNetDevTxPointToPoint()

void ns3::visualizer::PyViz::TraceNetDevTxPointToPoint ( std::string context,
Ptr< const Packet > packet )
private

Point to point transmit trace callback function.

Parameters
contextthe context
packetthe packet

Definition at line 673 of file pyviz.cc.

References TraceNetDevTxCommon().

Referenced by PyViz(), and RegisterPointToPointLikeDevice().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceNetDevTxWifi()

void ns3::visualizer::PyViz::TraceNetDevTxWifi ( std::string context,
Ptr< const Packet > packet )
private

Wi-Fi transmit trace callback function.

Parameters
contextthe context
packetthe packet

Definition at line 615 of file pyviz.cc.

References ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetAddr3(), ns3::WifiMacHeader::IsToDs(), NS_ABORT_IF, NS_LOG_FUNCTION, and TraceNetDevTxCommon().

Referenced by PyViz(), and RegisterWifiLikeDevice().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_lastPackets

std::map<uint32_t, LastPacketsSample> ns3::visualizer::PyViz::m_lastPackets
private

Last packets.

Definition at line 527 of file pyviz.h.

Referenced by GetLastPackets(), TraceDevQueueDrop(), TraceNetDevRxCommon(), and TraceNetDevTxCommon().

◆ m_nodesOfInterest

std::set<uint32_t> ns3::visualizer::PyViz::m_nodesOfInterest
private

List of node IDs whose transmissions will be monitored.

Definition at line 524 of file pyviz.h.

Referenced by SetNodesOfInterest(), TraceDevQueueDrop(), and TraceNetDevTxCommon().

◆ m_nodesStatistics

std::map<uint32_t, std::vector<NetDeviceStatistics> > ns3::visualizer::PyViz::m_nodesStatistics
private

Node statistics.

Definition at line 528 of file pyviz.h.

Referenced by FindNetDeviceStatistics(), and GetNodesStatistics().

◆ m_packetCaptureOptions

std::map<uint32_t, PacketCaptureOptions> ns3::visualizer::PyViz::m_packetCaptureOptions
private

Packet capture options.

Definition at line 517 of file pyviz.h.

Referenced by GetPacketCaptureOptions(), and SetPacketCaptureOptions().

◆ m_packetDrops

std::map<Ptr<Node>, uint32_t> ns3::visualizer::PyViz::m_packetDrops
private

Packet drops.

Definition at line 523 of file pyviz.h.

Referenced by GetPacketDropSamples(), SimulatorRunUntil(), and TraceDevQueueDrop().

◆ m_packetsOfInterest

std::map<uint32_t, Time> ns3::visualizer::PyViz::m_packetsOfInterest
private

List of packet UIDs that will be monitored.

Definition at line 526 of file pyviz.h.

Referenced by SimulatorRunUntil(), TraceDevQueueDrop(), TraceNetDevRxCommon(), and TraceNetDevTxCommon().

◆ m_pauseMessages

std::vector<std::string> ns3::visualizer::PyViz::m_pauseMessages
private

Pause message.

Definition at line 518 of file pyviz.h.

Referenced by DoPause(), GetPauseMessages(), and SimulatorRunUntil().

◆ m_runUntil

Time ns3::visualizer::PyViz::m_runUntil
private

Indicates until when the simulation should run for its next step.

Definition at line 530 of file pyviz.h.

Referenced by CallbackStopSimulation(), and SimulatorRunUntil().

◆ m_stop

bool ns3::visualizer::PyViz::m_stop
private

Stop simulation flag.

Definition at line 529 of file pyviz.h.

Referenced by CallbackStopSimulation(), DoPause(), and SimulatorRunUntil().

◆ m_transmissionSamples

std::map<TransmissionSampleKey, TransmissionSampleValue> ns3::visualizer::PyViz::m_transmissionSamples
private

Transmission samples.

Definition at line 522 of file pyviz.h.

Referenced by GetTransmissionSamples(), SimulatorRunUntil(), and TraceNetDevRxCommon().

◆ m_txRecords

std::map<TxRecordKey, TxRecordValue> ns3::visualizer::PyViz::m_txRecords
private

Transmit records.

Definition at line 519 of file pyviz.h.

Referenced by SimulatorRunUntil(), TraceNetDevRxCommon(), and TraceNetDevTxCommon().


The documentation for this class was generated from the following files: