A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::SqliteDataOutput::SqliteOutputCallback Class Reference

Class to generate OMNeT output. More...

+ Inheritance diagram for ns3::SqliteDataOutput::SqliteOutputCallback:
+ Collaboration diagram for ns3::SqliteDataOutput::SqliteOutputCallback:

Public Member Functions

 SqliteOutputCallback (const Ptr< SQLiteOutput > &db, std::string run)
 Constructor.
 
 ~SqliteOutputCallback () override
 Destructor.
 
void OutputSingleton (std::string key, std::string variable, double val) override
 Generates a single data output.
 
void OutputSingleton (std::string key, std::string variable, int val) override
 Generates a single data output.
 
void OutputSingleton (std::string key, std::string variable, std::string val) override
 Generates a single data output.
 
void OutputSingleton (std::string key, std::string variable, Time val) override
 Generates a single data output.
 
void OutputSingleton (std::string key, std::string variable, uint32_t val) override
 Generates a single data output.
 
void OutputStatistic (std::string key, std::string variable, const StatisticalSummary *statSum) override
 Generates data statistics.
 
- Public Member Functions inherited from ns3::DataOutputCallback
virtual ~DataOutputCallback ()
 Destructor.
 
virtual void OutputSingleton (std::string key, std::string variable, double val)=0
 Associates the double value with the variable name for a specific output format.
 
virtual void OutputSingleton (std::string key, std::string variable, int val)=0
 Associates the integer value with the variable name for a specific output format.
 
virtual void OutputSingleton (std::string key, std::string variable, std::string val)=0
 Associates the string value with the variable name for a specific output format.
 
virtual void OutputSingleton (std::string key, std::string variable, Time val)=0
 Associates the Time value with the variable name for a specific output format.
 
virtual void OutputSingleton (std::string key, std::string variable, uint32_t val)=0
 Associates the uint32_t value with the variable name for a specific output format.
 
virtual void OutputStatistic (std::string key, std::string variable, const StatisticalSummary *statSum)=0
 Outputs the data from the specified StatisticalSummary.
 

Private Attributes

Ptr< SQLiteOutputm_db
 Db.
 
sqlite3_stmt * m_insertSingletonStatement
 Pointer to a Sqlite3 singleton statement.
 
std::string m_runLabel
 Run label.
 

Detailed Description

Class to generate OMNeT output.

Definition at line 61 of file sqlite-data-output.h.

Constructor & Destructor Documentation

◆ SqliteOutputCallback()

ns3::SqliteDataOutput::SqliteOutputCallback::SqliteOutputCallback ( const Ptr< SQLiteOutput > &  db,
std::string  run 
)

Constructor.

Parameters
dbpointer to the instance this object belongs to
runexperiment descriptor

Definition at line 142 of file sqlite-data-output.cc.

References m_db, m_insertSingletonStatement, m_runLabel, and NS_LOG_FUNCTION.

◆ ~SqliteOutputCallback()

ns3::SqliteDataOutput::SqliteOutputCallback::~SqliteOutputCallback ( )
override

Destructor.

Definition at line 159 of file sqlite-data-output.cc.

Member Function Documentation

◆ OutputSingleton() [1/5]

void ns3::SqliteDataOutput::SqliteOutputCallback::OutputSingleton ( std::string  key,
std::string  variable,
double  val 
)
overridevirtual

Generates a single data output.

Parameters
keythe SQL key to use
variablethe variable name
valthe value

Implements ns3::DataOutputCallback.

Definition at line 223 of file sqlite-data-output.cc.

References NS_LOG_FUNCTION.

◆ OutputSingleton() [2/5]

void ns3::SqliteDataOutput::SqliteOutputCallback::OutputSingleton ( std::string  key,
std::string  variable,
int  val 
)
overridevirtual

Generates a single data output.

Parameters
keythe SQL key to use
variablethe variable name
valthe value

Implements ns3::DataOutputCallback.

Definition at line 195 of file sqlite-data-output.cc.

References NS_LOG_FUNCTION.

◆ OutputSingleton() [3/5]

void ns3::SqliteDataOutput::SqliteOutputCallback::OutputSingleton ( std::string  key,
std::string  variable,
std::string  val 
)
overridevirtual

Generates a single data output.

Parameters
keythe SQL key to use
variablethe variable name
valthe value

Implements ns3::DataOutputCallback.

Definition at line 237 of file sqlite-data-output.cc.

References NS_LOG_FUNCTION.

◆ OutputSingleton() [4/5]

void ns3::SqliteDataOutput::SqliteOutputCallback::OutputSingleton ( std::string  key,
std::string  variable,
Time  val 
)
overridevirtual

Generates a single data output.

Parameters
keythe SQL key to use
variablethe variable name
valthe value

Implements ns3::DataOutputCallback.

Definition at line 251 of file sqlite-data-output.cc.

References ns3::Time::GetTimeStep(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ OutputSingleton() [5/5]

void ns3::SqliteDataOutput::SqliteOutputCallback::OutputSingleton ( std::string  key,
std::string  variable,
uint32_t  val 
)
overridevirtual

Generates a single data output.

Parameters
keythe SQL key to use
variablethe variable name
valthe value

Implements ns3::DataOutputCallback.

Definition at line 209 of file sqlite-data-output.cc.

References NS_LOG_FUNCTION.

◆ OutputStatistic()

void ns3::SqliteDataOutput::SqliteOutputCallback::OutputStatistic ( std::string  key,
std::string  variable,
const StatisticalSummary statSum 
)
overridevirtual

Generates data statistics.

Parameters
keythe SQL key to use
variablethe variable name
statSumthe stats to print

Implements ns3::DataOutputCallback.

Definition at line 165 of file sqlite-data-output.cc.

References ns3::StatisticalSummary::getCount(), ns3::StatisticalSummary::getMax(), ns3::StatisticalSummary::getMin(), ns3::StatisticalSummary::getSqrSum(), ns3::StatisticalSummary::getStddev(), ns3::StatisticalSummary::getSum(), ns3::isNaN(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_db

Ptr<SQLiteOutput> ns3::SqliteDataOutput::SqliteOutputCallback::m_db
private

Db.

Definition at line 127 of file sqlite-data-output.h.

Referenced by SqliteOutputCallback().

◆ m_insertSingletonStatement

sqlite3_stmt* ns3::SqliteDataOutput::SqliteOutputCallback::m_insertSingletonStatement
private

Pointer to a Sqlite3 singleton statement.

Definition at line 131 of file sqlite-data-output.h.

Referenced by SqliteOutputCallback().

◆ m_runLabel

std::string ns3::SqliteDataOutput::SqliteOutputCallback::m_runLabel
private

Run label.

Definition at line 128 of file sqlite-data-output.h.

Referenced by SqliteOutputCallback().


The documentation for this class was generated from the following files: