A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
node-printer.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Lawrence Livermore National Laboratory
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Peter D. Barnes, Jr. <pdbarnes@llnl.gov>
7 */
8
9#include "node-printer.h"
10
11#include "log.h"
12#include "simulator.h" // GetContext()
13
14/**
15 * @file
16 * @ingroup simulator
17 * ns3::DefaultNodePrinter implementation.
18 */
19
20namespace ns3
21{
22
23NS_LOG_COMPONENT_DEFINE("NodePrinter");
24
25void
26DefaultNodePrinter(std::ostream& os)
27{
29 {
30 os << "-1";
31 }
32 else
33 {
35 }
36}
37
38} // namespace ns3
@ NO_CONTEXT
Flag for events not associated with any particular context.
Definition simulator.h:207
static uint32_t GetContext()
Get the current simulation context.
Definition simulator.cc:301
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:194
void DefaultNodePrinter(std::ostream &os)
Default node id printer implementation.
Debug message logging.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Declaration of ns3::NodePrinter function pointer type and ns3::DefaultNodePrinter function.
ns3::Simulator declaration.