A Discrete-Event Network Simulator
API
sqlite-data-output.h
Go to the documentation of this file.
1/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2008 Drexel 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 * Author: Joe Kopena (tjkopena@cs.drexel.edu)
19 */
20
21#ifndef SQLITE_DATA_OUTPUT_H
22#define SQLITE_DATA_OUTPUT_H
23
24#include "ns3/nstime.h"
25
27
28
29struct sqlite3_stmt;
30
31namespace ns3 {
32
33class SQLiteOutput;
34//------------------------------------------------------------
35//--------------------------------------------
42{
43public:
45 virtual ~SqliteDataOutput () override;
46
51 static TypeId GetTypeId (void);
52
53 virtual void Output (DataCollector &dc) override;
54
55private:
62 {
63public:
69 SqliteOutputCallback (const Ptr<SQLiteOutput> &db, std::string run);
70
75
82 void OutputStatistic (std::string key,
83 std::string variable,
84 const StatisticalSummary *statSum);
85
92 void OutputSingleton (std::string key,
93 std::string variable,
94 int val);
95
102 void OutputSingleton (std::string key,
103 std::string variable,
104 uint32_t val);
105
112 void OutputSingleton (std::string key,
113 std::string variable,
114 double val);
115
122 void OutputSingleton (std::string key,
123 std::string variable,
124 std::string val);
125
132 void OutputSingleton (std::string key,
133 std::string variable,
134 Time val);
135
136private:
138 std::string m_runLabel;
139
142 };
143
145};
146
147// end namespace ns3
148}
149
150
151#endif /* SQLITE_DATA_OUTPUT_H */
Collects data.
Callback class for the DataOutput classes.
Abstract Data Output Interface class s.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
sqlite3_stmt * m_insertSingletonStatement
Pointer to a Sqlite3 singleton statement.
void OutputSingleton(std::string key, std::string variable, int val)
Generates a single data output.
SqliteOutputCallback(const Ptr< SQLiteOutput > &db, std::string run)
Constructor.
void OutputStatistic(std::string key, std::string variable, const StatisticalSummary *statSum)
Generates data statistics.
Outputs data in a format compatible with SQLite.
virtual void Output(DataCollector &dc) override
Outputs information from the provided DataCollector.
Ptr< SQLiteOutput > m_sqliteOut
Database.
virtual ~SqliteDataOutput() override
static TypeId GetTypeId(void)
Register this type.
Abstract class for calculating statistical data.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:103
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.