The SatPacketTrace implements a packet trace functionality. More...
#include "satellite-packet-trace.h"
Inheritance diagram for ns3::SatPacketTrace:
Collaboration diagram for ns3::SatPacketTrace:Public Member Functions | |
| SatPacketTrace () | |
| Constructor. More... | |
| virtual | ~SatPacketTrace () |
| Destructor. More... | |
| void | AddTraceEntry (Time now, SatEnums::SatPacketEvent_t packetEvent, SatEnums::SatNodeType_t nodeType, uint32_t nodeId, Mac48Address macAddress, SatEnums::SatLogLevel_t logLevel, SatEnums::SatLinkDir_t linkDir, std::string packetInfo) |
| Add a packet trace entry to the log. More... | |
| virtual void | DoDispose () |
| Dispose of this class instance. More... | |
| TypeId | GetInstanceTypeId () const |
Static Public Member Functions | |
| static TypeId | GetTypeId (void) |
| Get the type ID. More... | |
Private Member Functions | |
| void | PrintHeader () |
| Print header to the packet trace log. More... | |
Private Attributes | |
| std::string | m_fileName |
| File name of the packet trace log. More... | |
| Ptr< OutputStreamWrapper > | m_packetTraceStream |
| Stream wrapper used for packet traces. More... | |
The SatPacketTrace implements a packet trace functionality.
The movement of packet through the satellite stack can be traced in different protocol layers and direction.
Definition at line 44 of file satellite-packet-trace.h.
| ns3::SatPacketTrace::SatPacketTrace | ( | ) |
Constructor.
Definition at line 44 of file satellite-packet-trace.cc.
References m_fileName, m_packetTraceStream, and PrintHeader().
Here is the call graph for this function:
|
virtual |
Destructor.
Definition at line 58 of file satellite-packet-trace.cc.
| void ns3::SatPacketTrace::AddTraceEntry | ( | Time | now, |
| SatEnums::SatPacketEvent_t | packetEvent, | ||
| SatEnums::SatNodeType_t | nodeType, | ||
| uint32_t | nodeId, | ||
| Mac48Address | macAddress, | ||
| SatEnums::SatLogLevel_t | logLevel, | ||
| SatEnums::SatLinkDir_t | linkDir, | ||
| std::string | packetInfo | ||
| ) |
Add a packet trace entry to the log.
| now | Time time of a trace event |
| packetEvent | Packet event(SND, RCV, DRP, ENQ) |
| nodeType | Node type (UT, SAT, GW, NCC, TER) |
| nodeId | Node id |
| macAddress | MAC address |
| logLevel | Log level (ND, LLC, MAC, PHY, CH) |
| linkDir | Link direction (FWD, RTN) |
| packetInfo | Packet info (List of: Packet id, source MAC address, destination MAC address) |
TODO: Currently the packet trace logs all entries updated by the protocol layers. A filtering functionality may be implemented later, to restrict the amount of output data. The user may configure the filtering rules by attributes, e.g.
Definition at line 111 of file satellite-packet-trace.cc.
References ns3::SatEnums::GetLinkDirName(), ns3::SatEnums::GetLogLevelName(), ns3::SatEnums::GetNodeTypeName(), ns3::SatEnums::GetPacketEventName(), and m_packetTraceStream.
Referenced by ns3::SatBeamHelper::EnablePacketTrace().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Dispose of this class instance.
Definition at line 84 of file satellite-packet-trace.cc.
| TypeId ns3::SatPacketTrace::GetInstanceTypeId | ( | void | ) | const |
Definition at line 64 of file satellite-packet-trace.cc.
References GetTypeId().
Here is the call graph for this function:
|
static |
Get the type ID.
Definition at line 71 of file satellite-packet-trace.cc.
References m_fileName.
Referenced by GetInstanceTypeId().
Here is the caller graph for this function:
|
private |
Print header to the packet trace log.
Definition at line 91 of file satellite-packet-trace.cc.
References m_packetTraceStream.
Referenced by SatPacketTrace().
Here is the caller graph for this function:
|
private |
File name of the packet trace log.
Definition at line 100 of file satellite-packet-trace.h.
Referenced by SatPacketTrace(), and GetTypeId().
|
private |
Stream wrapper used for packet traces.
Definition at line 105 of file satellite-packet-trace.h.
Referenced by SatPacketTrace(), AddTraceEntry(), and PrintHeader().