A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
probe.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2011 Bucknell University
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Authors: L. Felipe Perrone (perrone@bucknell.edu)
7
* Tiago G. Rodrigues (tgr002@bucknell.edu)
8
*/
9
10
#ifndef PROBE_H
11
#define PROBE_H
12
13
#include "
data-collection-object.h
"
14
15
#include "ns3/nstime.h"
16
17
namespace
ns3
18
{
19
20
/**
21
* @ingroup probes
22
*
23
* Base class for probes.
24
*
25
* This class provides general functionality to control each
26
* probe and the data generated by it.
27
*/
28
29
class
Probe
:
public
DataCollectionObject
30
{
31
public
:
32
/**
33
* @brief Get the type ID.
34
* @return the object TypeId
35
*/
36
static
TypeId
GetTypeId
();
37
Probe
();
38
~Probe
()
override
;
39
40
/**
41
* @return true if Probe is currently enabled
42
*/
43
bool
IsEnabled
()
const override
;
44
45
/**
46
* @brief connect to a trace source attribute provided by a given object
47
*
48
* @param traceSource the name of the attribute TraceSource to connect to
49
* @param obj ns3::Object to connect to
50
* @return true if the trace source was successfully connected
51
*/
52
virtual
bool
ConnectByObject
(std::string traceSource,
Ptr<Object>
obj) = 0;
53
54
/**
55
* @brief connect to a trace source provided by a config path
56
*
57
* @param path Config path to bind to
58
*
59
* Note, if an invalid path is provided, the probe will not be connected
60
* to anything.
61
*/
62
virtual
void
ConnectByPath
(std::string path) = 0;
63
64
protected
:
65
/// Time when logging starts.
66
Time
m_start
;
67
68
/// Time when logging stops.
69
Time
m_stop
;
70
};
71
72
}
// namespace ns3
73
74
#endif
// PROBE_H
ns3::DataCollectionObject
Base class for data collection framework objects.
Definition
data-collection-object.h:28
ns3::Probe
Base class for probes.
Definition
probe.h:30
ns3::Probe::m_start
Time m_start
Time when logging starts.
Definition
probe.h:66
ns3::Probe::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
probe.cc:24
ns3::Probe::IsEnabled
bool IsEnabled() const override
Definition
probe.cc:54
ns3::Probe::ConnectByObject
virtual bool ConnectByObject(std::string traceSource, Ptr< Object > obj)=0
connect to a trace source attribute provided by a given object
ns3::Probe::m_stop
Time m_stop
Time when logging stops.
Definition
probe.h:69
ns3::Probe::~Probe
~Probe() override
Definition
probe.cc:48
ns3::Probe::ConnectByPath
virtual void ConnectByPath(std::string path)=0
connect to a trace source provided by a config path
ns3::Probe::Probe
Probe()
Definition
probe.cc:43
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition
nstime.h:94
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
data-collection-object.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
stats
model
probe.h
Generated on Sat Nov 9 2024 19:36:21 for ns-3 by
1.11.0