A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
stats
model
time-series-adaptor.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2013 University of Washington
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
* Author: Mitch Watrous (watrous@u.washington.edu)
19
*/
20
21
#ifndef TIME_SERIES_ADAPTOR_H
22
#define TIME_SERIES_ADAPTOR_H
23
24
#include "ns3/data-collection-object.h"
25
#include "ns3/object.h"
26
#include "ns3/type-id.h"
27
#include "ns3/traced-value.h"
28
29
namespace
ns3
{
30
48
class
TimeSeriesAdaptor
:
public
DataCollectionObject
49
{
50
public
:
55
static
TypeId
GetTypeId
(
void
);
56
57
TimeSeriesAdaptor
();
58
virtual
~TimeSeriesAdaptor
();
59
69
void
TraceSinkDouble
(
double
oldData,
double
newData);
70
80
void
TraceSinkBoolean
(
bool
oldData,
bool
newData);
81
91
void
TraceSinkUinteger8
(uint8_t oldData, uint8_t newData);
92
102
void
TraceSinkUinteger16
(uint16_t oldData, uint16_t newData);
103
113
void
TraceSinkUinteger32
(uint32_t oldData, uint32_t newData);
114
121
typedef
void (*
OutputTracedCallback
) (
const
double
now,
const
double
data
);
122
123
private
:
124
TracedCallback<double, double>
m_output
;
125
};
126
127
}
// namespace ns3
128
129
#endif // TIME_SERIES_ADAPTOR_H
ns3::DataCollectionObject
Base class for data collection framework objects.
Definition:
data-collection-object.h:37
ns3::TimeSeriesAdaptor
Takes probed values of different types and outputs the current time plus the value with both converte...
Definition:
time-series-adaptor.h:48
ns3::TracedCallback< double, double >
data
uint8_t data[writeSize]
Definition:
socket-bound-tcp-static-routing.cc:53
ns3::TimeSeriesAdaptor::TraceSinkUinteger32
void TraceSinkUinteger32(uint32_t oldData, uint32_t newData)
Trace sink for receiving data from uint32_t valued trace sources.
Definition:
time-series-adaptor.cc:106
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::TimeSeriesAdaptor::TraceSinkUinteger8
void TraceSinkUinteger8(uint8_t oldData, uint8_t newData)
Trace sink for receiving data from uint8_t valued trace sources.
Definition:
time-series-adaptor.cc:88
ns3::TimeSeriesAdaptor::TimeSeriesAdaptor
TimeSeriesAdaptor()
Definition:
time-series-adaptor.cc:52
ns3::TimeSeriesAdaptor::~TimeSeriesAdaptor
virtual ~TimeSeriesAdaptor()
Definition:
time-series-adaptor.cc:57
ns3::TimeSeriesAdaptor::OutputTracedCallback
void(* OutputTracedCallback)(const double now, const double data)
TracedCallback signature for output trace.
Definition:
time-series-adaptor.h:121
ns3::TimeSeriesAdaptor::TraceSinkUinteger16
void TraceSinkUinteger16(uint16_t oldData, uint16_t newData)
Trace sink for receiving data from uint16_t valued trace sources.
Definition:
time-series-adaptor.cc:97
ns3::TimeSeriesAdaptor::TraceSinkDouble
void TraceSinkDouble(double oldData, double newData)
Trace sink for receiving data from double valued trace sources.
Definition:
time-series-adaptor.cc:63
ns3::TimeSeriesAdaptor::TraceSinkBoolean
void TraceSinkBoolean(bool oldData, bool newData)
Trace sink for receiving data from bool valued trace sources.
Definition:
time-series-adaptor.cc:79
ns3::TimeSeriesAdaptor::m_output
TracedCallback< double, double > m_output
output trace
Definition:
time-series-adaptor.h:124
ns3::TimeSeriesAdaptor::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
time-series-adaptor.cc:37
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
Generated on Wed Nov 7 2018 10:02:10 for ns-3 by
1.8.14