A Discrete-Event Network Simulator
API
time-series-adaptor.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2013 University of Washington
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Mitch Watrous (watrous@u.washington.edu)
18 */
19
20#ifndef TIME_SERIES_ADAPTOR_H
21#define TIME_SERIES_ADAPTOR_H
22
23#include "ns3/data-collection-object.h"
24#include "ns3/object.h"
25#include "ns3/traced-value.h"
26#include "ns3/type-id.h"
27
28namespace ns3
29{
30
49{
50 public:
55 static TypeId GetTypeId();
56
58 ~TimeSeriesAdaptor() override;
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:
125};
126
127} // namespace ns3
128
129#endif // TIME_SERIES_ADAPTOR_H
Base class for data collection framework objects.
Takes probed values of different types and outputs the current time plus the value with both converte...
void TraceSinkUinteger8(uint8_t oldData, uint8_t newData)
Trace sink for receiving data from uint8_t valued trace sources.
void TraceSinkDouble(double oldData, double newData)
Trace sink for receiving data from double valued trace sources.
TracedCallback< double, double > m_output
output trace
void TraceSinkBoolean(bool oldData, bool newData)
Trace sink for receiving data from bool valued trace sources.
void(* OutputTracedCallback)(const double now, const double data)
TracedCallback signature for output trace.
void TraceSinkUinteger32(uint32_t oldData, uint32_t newData)
Trace sink for receiving data from uint32_t valued trace sources.
void TraceSinkUinteger16(uint16_t oldData, uint16_t newData)
Trace sink for receiving data from uint16_t valued trace sources.
static TypeId GetTypeId()
Get the type ID.
a unique identifier for an interface.
Definition: type-id.h:60
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t data[writeSize]