25 #include "ns3/nstime.h"    52     .SetGroupName (
"Stats")
    69   res = 
m_sqliteOut->SpinExec (
"CREATE TABLE IF NOT EXISTS Experiments (run, experiment, strategy, input, description text)");
    74                                   "INSERT INTO Experiments " \
    75                                   "(run, experiment, strategy, input, description)" \
    76                                   "values (?, ?, ?, ?, ?)");
    95   res = 
m_sqliteOut->WaitExec (
"CREATE TABLE IF NOT EXISTS " \
    96                                "Metadata ( run text, key text, value)");
   100                                   "INSERT INTO Metadata " \
   101                                   "(run, key, value)" \
   108       std::pair<std::string, std::string> blob = (*i);
   123       (*i)->Output (callback);
   136   m_db->WaitExec (
"CREATE TABLE IF NOT EXISTS Singletons " \
   137                   "( run text, name text, variable text, value )");
   139   m_db->WaitPrepare (&m_insertSingletonStatement, 
"INSERT INTO Singletons " \
   140                      "(run, name, variable, value)" \
   141                      "values (?, ?, ?, ?)");
   142   m_db->Bind (m_insertSingletonStatement, 1, m_runLabel);
   157   OutputSingleton (key,
variable + 
"-count", static_cast<double> (statSum->
getCount ()));
   188   m_db->SpinReset (m_insertSingletonStatement);
   189   m_db->Bind (m_insertSingletonStatement, 2, key);
   190   m_db->Bind (m_insertSingletonStatement, 3, 
variable);
   191   m_db->Bind (m_insertSingletonStatement, 4, val);
   192   m_db->SpinStep (m_insertSingletonStatement);
   201   m_db->SpinReset (m_insertSingletonStatement);
   202   m_db->Bind (m_insertSingletonStatement, 2, key);
   203   m_db->Bind (m_insertSingletonStatement, 3, 
variable);
   204   m_db->Bind (m_insertSingletonStatement, 4, val);
   205   m_db->SpinStep (m_insertSingletonStatement);
   215   m_db->SpinReset (m_insertSingletonStatement);
   216   m_db->Bind (m_insertSingletonStatement, 2, key);
   217   m_db->Bind (m_insertSingletonStatement, 3, 
variable);
   218   m_db->Bind (m_insertSingletonStatement, 4, val);
   219   m_db->SpinStep (m_insertSingletonStatement);
   229   m_db->SpinReset (m_insertSingletonStatement);
   230   m_db->Bind (m_insertSingletonStatement, 2, key);
   231   m_db->Bind (m_insertSingletonStatement, 3, 
variable);
   232   m_db->Bind (m_insertSingletonStatement, 4, val);
   233   m_db->SpinStep (m_insertSingletonStatement);
   243   m_db->SpinReset (m_insertSingletonStatement);
   244   m_db->Bind (m_insertSingletonStatement, 2, key);
   245   m_db->Bind (m_insertSingletonStatement, 3, 
variable);
   246   m_db->Bind (m_insertSingletonStatement, 4, val.
GetTimeStep ());
   247   m_db->SpinStep (m_insertSingletonStatement);
 DataCalculatorList::iterator DataCalculatorEnd()
Returns an iterator to the past-the-end of the DataCalculator list. 
Simulation virtual time values and global simulation resolution. 
  Abstract Data Output Interface class s 
Smart pointer class similar to boost::intrusive_ptr. 
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
virtual double getMin() const =0
Returns the minimum of the values. 
A C++ interface towards an SQLITE database. 
Abstract class for calculating statistical data. 
virtual double getSqrSum() const =0
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
virtual void Output(DataCollector &dc) override
Outputs information from the provided DataCollector. 
sqlite3_stmt * m_insertSingletonStatement
std::string GetInputLabel() const
Return the input label. 
std::string GetStrategyLabel() const
Return the strategy label. 
Class to generate OMNeT output. 
virtual double getStddev() const =0
Returns the standard deviation of the (weighted) observations. 
void OutputStatistic(std::string key, std::string variable, const StatisticalSummary *statSum)
Generates data statistics. 
MetadataList::iterator MetadataBegin()
Returns an iterator to the beginning of the metadata list. 
virtual double getMax() const =0
Returns the maximum of the values. 
std::string variable
variable or class member 
std::string GetExperimentLabel() const
Return the experiment label. 
virtual ~SqliteDataOutput() override
std::string GetDescription() const
Return the description label. 
std::string GetRunLabel() const
Return the runID label. 
void OutputSingleton(std::string key, std::string variable, int val)
Generates a single data output. 
std::string m_filePrefix
File prefix for the DataOutputInterface. 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
Outputs data in a format compatible with SQLite. 
virtual double getSum() const =0
Ptr< SQLiteOutput > m_db
Db. 
~SqliteOutputCallback()
Destructor. 
static TypeId GetTypeId(void)
Register this type. 
DataCalculatorList::iterator DataCalculatorBegin()
Returns an iterator to the beginning of the DataCalculator list. 
SqliteOutputCallback(const Ptr< SQLiteOutput > &db, std::string run)
Constructor. 
bool isNaN(double x)
true if x is NaN 
virtual long getCount() const =0
Returns the number of observations. 
a unique identifier for an interface. 
MetadataList::iterator MetadataEnd()
Returns an iterator to the past-the-end of the metadata list. 
TypeId SetParent(TypeId tid)
Set the parent TypeId. 
Ptr< SQLiteOutput > m_sqliteOut
Database. 
int64_t GetTimeStep(void) const
Get the raw time value, in the current resolution unit.