A Discrete-Event Network Simulator
API
probe.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2011 Bucknell University
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Authors: L. Felipe Perrone (perrone@bucknell.edu)
19  * Tiago G. Rodrigues (tgr002@bucknell.edu)
20  */
21 
22 #ifndef PROBE_H
23 #define PROBE_H
24 
25 #include "ns3/data-collection-object.h"
26 #include "ns3/nstime.h"
27 
28 namespace ns3 {
29 
40 {
41 public:
46  static TypeId GetTypeId ();
47  Probe ();
48  virtual ~Probe ();
49 
53  virtual bool IsEnabled (void) const;
54 
62  virtual bool ConnectByObject (std::string traceSource, Ptr<Object> obj) = 0;
63 
72  virtual void ConnectByPath (std::string path) = 0;
73 
74 protected:
77 
80 
81 };
82 
83 } // namespace ns3
84 
85 #endif // PROBE_H
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
Base class for data collection framework objects.
static TypeId GetTypeId()
Get the type ID.
Definition: probe.cc:34
virtual bool IsEnabled(void) const
Definition: probe.cc:64
Time m_start
Time when logging starts.
Definition: probe.h:76
virtual ~Probe()
Definition: probe.cc:58
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void ConnectByPath(std::string path)=0
connect to a trace source provided by a config path
Time m_stop
Time when logging stops.
Definition: probe.h:79
Probe()
Definition: probe.cc:53
a unique identifier for an interface.
Definition: type-id.h:58
Base class for probes.
Definition: probe.h:39
virtual bool ConnectByObject(std::string traceSource, Ptr< Object > obj)=0
connect to a trace source attribute provided by a given object