A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
pyviz.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 INESC Porto
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * C++ helper functions for use by the python visualizer (for things
7 * Python is too slow at).
8 *
9 * Author: Gustavo Carneiro <gjc@inescporto.pt>
10 */
11#ifndef NS3_PYVIZ_H
12#define NS3_PYVIZ_H
13
14#include "ns3/channel.h"
15#include "ns3/event-id.h"
16#include "ns3/ipv4-header.h"
17#include "ns3/ipv4-l3-protocol.h"
18#include "ns3/mac16-address.h"
19#include "ns3/mac48-address.h"
20#include "ns3/mac64-address.h"
21#include "ns3/node.h"
22#include "ns3/nstime.h"
23#include "ns3/packet.h"
24
25#include <map>
26#include <set>
27#include <variant>
28
29namespace ns3
30{
31namespace visualizer
32{
33
34/**
35 * TransmissionSample structure
36 */
38{
39 Ptr<Node> transmitter; //!< The source node of the transmission
40 Ptr<Node> receiver; //!< The destination node of the transmission (Null if broadcast)
41 Ptr<Channel> channel; //!< The channel reference used for the transmission
42 uint32_t bytes; //!< The number of bytes transmitted
43};
44
45/**
46 * PacketDropSample structure
47 */
49{
50 Ptr<Node> transmitter; //!< The transmitter node where the drop was registered
51 uint32_t bytes; //!< The number of bytes dropped
52};
53
54/**
55 * PacketSample structure.
56 */
58{
59 Time time; //!< The received or transmitted time of the sample.
60 Ptr<Packet> packet; //!< The packet reference
61 Ptr<NetDevice> device; //!< The NetDevice reference
62};
63
64/**
65 * TxPacketSample structure
66 */
68{
69 std::variant<Mac16Address, Mac48Address, Mac64Address> to; //!< The destination MAC address
70};
71
72/**
73 * RxPacketSample structure
74 */
76{
77 std::variant<Mac16Address, Mac48Address, Mac64Address> from; //!< The source MAC address
78};
79
80/**
81 * Structure to handle a sample of the last received, transmitted or drop packets
82 * in a node.
83 */
85{
86 std::vector<RxPacketSample> lastReceivedPackets; //!< Last received packets
87 std::vector<TxPacketSample> lastTransmittedPackets; //!< Last transmitted packets
88 std::vector<PacketSample> lastDroppedPackets; //!< Last dropped packets
89};
90
91/**
92 * The NetDeviceStatistics structure
93 */
95{
103
104 uint64_t transmittedBytes; //!< Transmitted bytes
105 uint64_t receivedBytes; //!< Received bytes
106 uint32_t transmittedPackets; //!< Transmitted packets
107 uint32_t receivedPackets; //!< Received packets
108};
109
110/**
111 * The NodeStatistics structure
112 */
114{
115 uint32_t nodeId; //!< Node ID
116 std::vector<NetDeviceStatistics> statistics; //!< Statistics
117};
118
119/**
120 * The PacketCaptureMode enumeration
121 */
123{
124 PACKET_CAPTURE_DISABLED = 1, //!< Packet capture is disabled
125 PACKET_CAPTURE_FILTER_HEADERS_OR, //!< Packet capture if any of the indicated headers is
126 //!< present
127 PACKET_CAPTURE_FILTER_HEADERS_AND, //!< Packet capture if all of the indicated headers are
128 //!< present
129};
130
131/**
132 * The PacketCaptureOptions structure
133 */
135{
136 std::set<TypeId> headers; //!< The headers
137 uint32_t numLastPackets; //!< Number of last packets
138 PacketCaptureMode mode; //!< The packet capture node
139};
140
141using TransmissionSampleList = std::vector<TransmissionSample>; //!< The transmission sample list
142using PacketDropSampleList = std::vector<PacketDropSample>; //!< The packet drop list
143
144/**
145 * @ingroup visualizer
146 *
147 * @brief helper class to be used by the visualizer
148 * @internal
149 *
150 * This class is not meant to be used by simulations. It is only
151 * meant to be used by the visualizer tool (PyViz). The only reason
152 * it is public is because Python bindings for it are needed,
153 * otherwise it should be considered private.
154 **/
155class PyViz
156{
157 public:
158 PyViz();
159 ~PyViz();
160
161 /**
162 * Run simulation until a given (simulated, absolute) time is reached.
163 *
164 * @param time the run time
165 */
166 void SimulatorRunUntil(Time time);
167
168 /**
169 * Get the stop time of the underlying visual simulator implementation.
170 *
171 * @return The stop time of the visual simulator implementation.
172 */
174
175 /**
176 * Pause function.
177 *
178 * @param message the pause message
179 */
180 static void Pause(const std::string& message);
181
182 /**
183 * Get pause message function.
184 *
185 * @returns the pause message
186 */
187 std::vector<std::string> GetPauseMessages() const;
188
189 /**
190 * Get transmission samples.
191 *
192 * @returns the transmission sample list
193 */
195
196 /**
197 * Get packet drop samples.
198 *
199 * @returns the packet drop sample list
200 */
202
203 /**
204 * Get last packets function.
205 *
206 * @param nodeId the node ID
207 * @returns the last packets
208 */
210
211 /**
212 * Set nodes of interest function.
213 *
214 * @param nodes the collection of nodes
215 */
216 void SetNodesOfInterest(std::set<uint32_t> nodes);
217
218 /**
219 * Get node statistics.
220 *
221 * @returns the node statistics
222 */
223 std::vector<NodeStatistics> GetNodesStatistics() const;
224
225 /**
226 * Set packet capture options function.
227 *
228 * @param nodeId the node ID
229 * @param options the capture options
230 */
232
233 /**
234 * Register drop trace path function.
235 *
236 * @param tracePath the path to trace
237 */
238 void RegisterDropTracePath(const std::string& tracePath);
239
240 /**
241 * Register CSMA like device function.
242 *
243 * @param deviceTypeName the device type name
244 */
245 void RegisterCsmaLikeDevice(const std::string& deviceTypeName);
246
247 /**
248 * Register WIFI like device function.
249 *
250 * @param deviceTypeName the device type name
251 */
252 void RegisterWifiLikeDevice(const std::string& deviceTypeName);
253
254 /**
255 * Register point to point like device function.
256 *
257 * @param deviceTypeName the device type name
258 */
259 void RegisterPointToPointLikeDevice(const std::string& deviceTypeName);
260
261 // Yes, I know, this is just a utility function, not really related to the class in any way.
262 /**
263 * Utility function - clips a line to a bounding box.
264 * @param [in] boundsX1 Bounding box, minimum X coord
265 * @param [in] boundsY1 Bounding box, minimum Y coord
266 * @param [in] boundsX2 Bounding box, maximum X coord
267 * @param [in] boundsY2 Bounding box, maximum Y coord
268 * @param [in,out] lineX1 Line, minimum X coord (any on input, clipped to the bounding box
269 * on output)
270 * @param [in,out] lineY1 Line, minimum Y coord (any on input, clipped to the bounding box
271 * on output)
272 * @param [in,out] lineX2 Line, maximum X coord (any on input, clipped to the bounding box
273 * on output)
274 * @param [in,out] lineY2 Line, maximum Y coord (any on input, clipped to the bounding box
275 * on output)
276 */
277 // -#- @lineX1(direction=inout); @lineY1(direction=inout); @lineX2(direction=inout);
278 // @lineY2(direction=inout) -#-
279 static void LineClipping(double boundsX1,
280 double boundsY1,
281 double boundsX2,
282 double boundsY2,
283 double& lineX1,
284 double& lineY1,
285 double& lineX2,
286 double& lineY2);
287
288 private:
289 /**
290 * Get packet capture options function.
291 *
292 * @param nodeId The node ID
293 * @param outOptions The packet capture options
294 * @returns True if successful
295 */
296 bool GetPacketCaptureOptions(uint32_t nodeId, const PacketCaptureOptions** outOptions) const;
297
298 /**
299 * Filter packet function.
300 *
301 * @param packet The packet
302 * @param options The capture options
303 * @returns True if successful
304 */
305 static bool FilterPacket(Ptr<const Packet> packet, const PacketCaptureOptions& options);
306
307 /**
308 * Find net device statistics function.
309 *
310 * @param node The node
311 * @param interface The interface number
312 * @returns The device statistics
313 */
314 inline NetDeviceStatistics& FindNetDeviceStatistics(int node, int interface);
315
316 /**
317 * Do pause function.
318 *
319 * @param message the pause message
320 */
321 void DoPause(const std::string& message);
322
323 /**
324 * Stop simulation callback function.
325 */
327
328 /////////////////////
329 // Trace callbacks //
330 /////////////////////
331
332 /**
333 * Network transmit common trace callback function.
334 *
335 * @param context the context
336 * @param packet the packet
337 * @param destination the destination MAC address
338 */
340 const std::string& context,
341 Ptr<const Packet> packet,
342 const std::variant<Mac16Address, Mac48Address, Mac64Address>& destination);
343
344 /**
345 * Network receive common trace callback function.
346 *
347 * @param context the context
348 * @param packet the packet
349 * @param source the source MAC address
350 */
351 void TraceNetDevRxCommon(const std::string& context,
352 Ptr<const Packet> packet,
353 const std::variant<Mac16Address, Mac48Address, Mac64Address>& source);
354
355 /**
356 * Wi-Fi transmit trace callback function.
357 *
358 * @param context the context
359 * @param packet the packet
360 */
361 void TraceNetDevTxWifi(std::string context, Ptr<const Packet> packet);
362
363 /**
364 * Wi-Fi receive trace callback function.
365 *
366 * @param context the context
367 * @param packet the packet
368 */
369 void TraceNetDevRxWifi(std::string context, Ptr<const Packet> packet);
370
371 /**
372 * Lr-Wpan transmit trace callback function.
373 *
374 * @param context the context
375 * @param packet the packet
376 */
377 void TraceNetDevTxLrWpan(std::string context, Ptr<const Packet> packet);
378
379 /**
380 * Lr-Wpan receive trace callback function.
381 *
382 * @param context the context
383 * @param packet the packet
384 */
385 void TraceNetDevRxLrWpan(std::string context, Ptr<const Packet> packet);
386
387 /**
388 * Queue drop trace callback function.
389 *
390 * @param context the context
391 * @param packet the packet
392 */
393 void TraceDevQueueDrop(std::string context, Ptr<const Packet> packet);
394
395 /**
396 * Ipv4 drop trace callback function.
397 *
398 * @param context the context
399 * @param hdr the header
400 * @param packet the packet
401 * @param reason the drop reason
402 * @param dummy_ipv4 the dummy Ipv4
403 * @param interface the interface
404 */
405 void TraceIpv4Drop(std::string context,
406 const ns3::Ipv4Header& hdr,
407 Ptr<const Packet> packet,
409 Ptr<Ipv4> dummy_ipv4,
410 uint32_t interface);
411
412 /**
413 * CSMA transmit trace callback function.
414 *
415 * @param context the context
416 * @param packet the packet
417 */
418 void TraceNetDevTxCsma(std::string context, Ptr<const Packet> packet);
419
420 /**
421 * CSMA receive trace callback function.
422 *
423 * @param context the context
424 * @param packet the packet
425 */
426 void TraceNetDevRxCsma(std::string context, Ptr<const Packet> packet);
427
428 /**
429 * CSMA promiscuous receive function.
430 *
431 * @param context the context
432 * @param packet the packet
433 */
434 void TraceNetDevPromiscRxCsma(std::string context, Ptr<const Packet> packet);
435
436 /**
437 * Point to point transmit trace callback function.
438 *
439 * @param context the context
440 * @param packet the packet
441 */
442 void TraceNetDevTxPointToPoint(std::string context, Ptr<const Packet> packet);
443
444 /**
445 * Point to point receive trace callback function.
446 *
447 * @param context the context
448 * @param packet the packet
449 */
450 void TraceNetDevRxPointToPoint(std::string context, Ptr<const Packet> packet);
451
452 /**
453 * LTE transmit trace callback function.
454 *
455 * @param context the context
456 * @param packet the packet
457 * @param destination the destination MAC address
458 */
459 void TraceNetDevTxLte(std::string context,
460 Ptr<const Packet> packet,
461 const Mac48Address& destination);
462 /**
463 * LTE receive trace callback function.
464 *
465 * @param context the context
466 * @param packet the packet
467 * @param source the MAC address of the source
468 */
469 void TraceNetDevRxLte(std::string context,
470 Ptr<const Packet> packet,
471 const Mac48Address& source);
472
473 /**
474 * The TxRecordValue structure
475 */
477 {
478 Time time; //!< The transmission time
479 Ptr<Node> srcNode; //!< The source node of the transmission
480 bool isBroadcast; //!< Broadcast flag
481 };
482
483 /**
484 * The TransmissionSampleKey structure
485 */
487 {
488 /**
489 * Less than operator
490 *
491 * @param other Object to compare
492 * @return True if less than
493 */
494 bool operator<(const TransmissionSampleKey& other) const;
495 /**
496 * Equality operator
497 *
498 * @param other Object to compare
499 * @return True if equal
500 */
501 bool operator==(const TransmissionSampleKey& other) const;
502 Ptr<Node> transmitter; //!< transmitter
503 Ptr<Node> receiver; //!< NULL if broadcast
504 Ptr<Channel> channel; //!< channel
505 };
506
507 /**
508 * The TransmissionSampleValue structure
509 */
511 {
512 uint32_t bytes; //!< The nuumber of bytes of the transmission sample
513 };
514
515 using TxRecordKey = std::pair<Ptr<Channel>, uint32_t>; //!< TxRecordKey type definition
516
517 std::map<uint32_t, PacketCaptureOptions> m_packetCaptureOptions; //!< Packet capture options
518 std::vector<std::string> m_pauseMessages; //!< Pause message
519 std::map<TxRecordKey, TxRecordValue> m_txRecords; //!< Transmit records
520 std::map<TransmissionSampleKey,
522 m_transmissionSamples; //!< Transmission samples
523 std::map<Ptr<Node>, uint32_t> m_packetDrops; //!< Packet drops
524 std::set<uint32_t> m_nodesOfInterest; //!< List of node IDs whose transmissions
525 //!< will be monitored
526 std::map<uint32_t, Time> m_packetsOfInterest; //!< List of packet UIDs that will be monitored
527 std::map<uint32_t, LastPacketsSample> m_lastPackets; //!< Last packets
528 std::map<uint32_t, std::vector<NetDeviceStatistics>> m_nodesStatistics; //!< Node statistics
529 bool m_stop; //!< Stop simulation flag
530 Time m_runUntil; //!< Indicates until when the simulation should run for its next step
531};
532
533} // namespace visualizer
534} // namespace ns3
535
536#endif /* NS3_PYVIZ_H */
Packet header for IPv4.
Definition ipv4-header.h:23
DropReason
Reason why a packet has been dropped.
an EUI-48 address
Smart pointer class similar to boost::intrusive_ptr.
Definition ptr.h:70
Simulation virtual time values and global simulation resolution.
Definition nstime.h:96
std::pair< Ptr< Channel >, uint32_t > TxRecordKey
TxRecordKey type definition.
Definition pyviz.h:515
void TraceNetDevTxLte(std::string context, Ptr< const Packet > packet, const Mac48Address &destination)
LTE transmit trace callback function.
Definition pyviz.cc:888
void SetNodesOfInterest(std::set< uint32_t > nodes)
Set nodes of interest function.
Definition pyviz.cc:948
void TraceNetDevRxCsma(std::string context, Ptr< const Packet > packet)
CSMA receive trace callback function.
Definition pyviz.cc:852
void SetPacketCaptureOptions(uint32_t nodeId, PacketCaptureOptions options)
Set packet capture options function.
Definition pyviz.cc:225
void TraceNetDevRxWifi(std::string context, Ptr< const Packet > packet)
Wi-Fi receive trace callback function.
Definition pyviz.cc:801
void TraceNetDevRxPointToPoint(std::string context, Ptr< const Packet > packet)
Point to point receive trace callback function.
Definition pyviz.cc:862
NetDeviceStatistics & FindNetDeviceStatistics(int node, int interface)
Find net device statistics function.
Definition pyviz.cc:388
void TraceDevQueueDrop(std::string context, Ptr< const Packet > packet)
Queue drop trace callback function.
Definition pyviz.cc:463
std::vector< NodeStatistics > GetNodesStatistics() const
Get node statistics.
Definition pyviz.cc:954
static bool FilterPacket(Ptr< const Packet > packet, const PacketCaptureOptions &options)
Filter packet function.
Definition pyviz.cc:421
std::map< TransmissionSampleKey, TransmissionSampleValue > m_transmissionSamples
Transmission samples.
Definition pyviz.h:522
void TraceNetDevPromiscRxCsma(std::string context, Ptr< const Packet > packet)
CSMA promiscuous receive function.
Definition pyviz.cc:870
Time GetSimulatorStopTime()
Get the stop time of the underlying visual simulator implementation.
Definition pyviz.cc:350
std::map< uint32_t, PacketCaptureOptions > m_packetCaptureOptions
Packet capture options.
Definition pyviz.h:517
std::vector< std::string > GetPauseMessages() const
Get pause message function.
Definition pyviz.cc:265
void TraceNetDevTxCommon(const std::string &context, Ptr< const Packet > packet, const std::variant< Mac16Address, Mac48Address, Mac64Address > &destination)
Network transmit common trace callback function.
Definition pyviz.cc:525
void TraceNetDevTxPointToPoint(std::string context, Ptr< const Packet > packet)
Point to point transmit trace callback function.
Definition pyviz.cc:673
std::map< uint32_t, Time > m_packetsOfInterest
List of packet UIDs that will be monitored.
Definition pyviz.h:526
void RegisterCsmaLikeDevice(const std::string &deviceTypeName)
Register CSMA like device function.
Definition pyviz.cc:179
void TraceNetDevRxCommon(const std::string &context, Ptr< const Packet > packet, const std::variant< Mac16Address, Mac48Address, Mac64Address > &source)
Network receive common trace callback function.
Definition pyviz.cc:683
std::set< uint32_t > m_nodesOfInterest
List of node IDs whose transmissions will be monitored.
Definition pyviz.h:524
void TraceNetDevTxWifi(std::string context, Ptr< const Packet > packet)
Wi-Fi transmit trace callback function.
Definition pyviz.cc:615
std::map< Ptr< Node >, uint32_t > m_packetDrops
Packet drops.
Definition pyviz.h:523
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.
Definition pyviz.cc:510
TransmissionSampleList GetTransmissionSamples() const
Get transmission samples.
Definition pyviz.cc:910
LastPacketsSample GetLastPackets(uint32_t nodeId) const
Get last packets function.
Definition pyviz.cc:966
std::map< uint32_t, LastPacketsSample > m_lastPackets
Last packets.
Definition pyviz.h:527
static void Pause(const std::string &message)
Pause function.
Definition pyviz.cc:258
bool m_stop
Stop simulation flag.
Definition pyviz.h:529
void RegisterPointToPointLikeDevice(const std::string &deviceTypeName)
Register point to point like device function.
Definition pyviz.cc:211
void TraceNetDevTxLrWpan(std::string context, Ptr< const Packet > packet)
Lr-Wpan transmit trace callback function.
Definition pyviz.cc:643
void RegisterWifiLikeDevice(const std::string &deviceTypeName)
Register WIFI like device function.
Definition pyviz.cc:197
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.
Definition pyviz.cc:982
std::map< TxRecordKey, TxRecordValue > m_txRecords
Transmit records.
Definition pyviz.h:519
void DoPause(const std::string &message)
Do pause function.
Definition pyviz.cc:249
void TraceNetDevRxLrWpan(std::string context, Ptr< const Packet > packet)
Lr-Wpan receive trace callback function.
Definition pyviz.cc:833
void SimulatorRunUntil(Time time)
Run simulation until a given (simulated, absolute) time is reached.
Definition pyviz.cc:285
void TraceNetDevRxLte(std::string context, Ptr< const Packet > packet, const Mac48Address &source)
LTE receive trace callback function.
Definition pyviz.cc:899
PacketDropSampleList GetPacketDropSamples() const
Get packet drop samples.
Definition pyviz.cc:930
std::map< uint32_t, std::vector< NetDeviceStatistics > > m_nodesStatistics
Node statistics.
Definition pyviz.h:528
Time m_runUntil
Indicates until when the simulation should run for its next step.
Definition pyviz.h:530
void RegisterDropTracePath(const std::string &tracePath)
Register drop trace path function.
Definition pyviz.cc:235
void TraceNetDevTxCsma(std::string context, Ptr< const Packet > packet)
CSMA transmit trace callback function.
Definition pyviz.cc:663
void CallbackStopSimulation()
Stop simulation callback function.
Definition pyviz.cc:274
std::vector< std::string > m_pauseMessages
Pause message.
Definition pyviz.h:518
bool GetPacketCaptureOptions(uint32_t nodeId, const PacketCaptureOptions **outOptions) const
Get packet capture options function.
Definition pyviz.cc:406
NodeContainer nodes
PacketCaptureMode
The PacketCaptureMode enumeration.
Definition pyviz.h:123
@ PACKET_CAPTURE_DISABLED
Packet capture is disabled.
Definition pyviz.h:124
@ PACKET_CAPTURE_FILTER_HEADERS_AND
Packet capture if all of the indicated headers are present.
Definition pyviz.h:127
@ PACKET_CAPTURE_FILTER_HEADERS_OR
Packet capture if any of the indicated headers is present.
Definition pyviz.h:125
std::vector< TransmissionSample > TransmissionSampleList
The transmission sample list.
Definition pyviz.h:141
std::vector< PacketDropSample > PacketDropSampleList
The packet drop list.
Definition pyviz.h:142
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Structure to handle a sample of the last received, transmitted or drop packets in a node.
Definition pyviz.h:85
std::vector< PacketSample > lastDroppedPackets
Last dropped packets.
Definition pyviz.h:88
std::vector< TxPacketSample > lastTransmittedPackets
Last transmitted packets.
Definition pyviz.h:87
std::vector< RxPacketSample > lastReceivedPackets
Last received packets.
Definition pyviz.h:86
The NetDeviceStatistics structure.
Definition pyviz.h:95
uint32_t transmittedPackets
Transmitted packets.
Definition pyviz.h:106
uint64_t receivedBytes
Received bytes.
Definition pyviz.h:105
uint64_t transmittedBytes
Transmitted bytes.
Definition pyviz.h:104
uint32_t receivedPackets
Received packets.
Definition pyviz.h:107
The NodeStatistics structure.
Definition pyviz.h:114
uint32_t nodeId
Node ID.
Definition pyviz.h:115
std::vector< NetDeviceStatistics > statistics
Statistics.
Definition pyviz.h:116
The PacketCaptureOptions structure.
Definition pyviz.h:135
uint32_t numLastPackets
Number of last packets.
Definition pyviz.h:137
std::set< TypeId > headers
The headers.
Definition pyviz.h:136
PacketCaptureMode mode
The packet capture node.
Definition pyviz.h:138
PacketDropSample structure.
Definition pyviz.h:49
uint32_t bytes
The number of bytes dropped.
Definition pyviz.h:51
Ptr< Node > transmitter
The transmitter node where the drop was registered.
Definition pyviz.h:50
PacketSample structure.
Definition pyviz.h:58
Ptr< Packet > packet
The packet reference.
Definition pyviz.h:60
Ptr< NetDevice > device
The NetDevice reference.
Definition pyviz.h:61
Time time
The received or transmitted time of the sample.
Definition pyviz.h:59
The TransmissionSampleKey structure.
Definition pyviz.h:487
bool operator==(const TransmissionSampleKey &other) const
Equality operator.
Definition pyviz.cc:380
bool operator<(const TransmissionSampleKey &other) const
Less than operator.
Definition pyviz.cc:358
Ptr< Node > receiver
NULL if broadcast.
Definition pyviz.h:503
The TransmissionSampleValue structure.
Definition pyviz.h:511
uint32_t bytes
The nuumber of bytes of the transmission sample.
Definition pyviz.h:512
The TxRecordValue structure.
Definition pyviz.h:477
Time time
The transmission time.
Definition pyviz.h:478
Ptr< Node > srcNode
The source node of the transmission.
Definition pyviz.h:479
bool isBroadcast
Broadcast flag.
Definition pyviz.h:480
RxPacketSample structure.
Definition pyviz.h:76
std::variant< Mac16Address, Mac48Address, Mac64Address > from
The source MAC address.
Definition pyviz.h:77
TransmissionSample structure.
Definition pyviz.h:38
Ptr< Channel > channel
The channel reference used for the transmission.
Definition pyviz.h:41
Ptr< Node > receiver
The destination node of the transmission (Null if broadcast).
Definition pyviz.h:40
Ptr< Node > transmitter
The source node of the transmission.
Definition pyviz.h:39
uint32_t bytes
The number of bytes transmitted.
Definition pyviz.h:42
TxPacketSample structure.
Definition pyviz.h:68
std::variant< Mac16Address, Mac48Address, Mac64Address > to
The destination MAC address.
Definition pyviz.h:69