SqliteOutputManager class
Output manager that stores data in a database.
This output manager is done to save the output of the examples cttc-coexistence-indoor-scenario.cc and cttc-nr-wigig-interference.cc.
The class create a SQLite database which contains the following tables:
- sinr_results, which contains the SINR of every packet in the network
- mac_data_tx_failed which contains the count of MAC data transmission failed
- channel_occupancy which contains the time of channel occupancy divided per technology
- collision, which despite the name contains the number of simultaneous transmission per technology
- e2e, which contains the e2e IP statistics of the flow.
The data is saved through a call to each virtual method, that saves the inputs in the database. For an usage example, please look into the provided examples.
Base classes
- class OutputManager
- The OutputManager interface for storing the simulation data.
Constructors, destructors, conversion operators
- SqliteOutputManager(const std::string& dbName, double ueX, uint32_t seed, uint32_t run)
- SqliteOutputManager constructor.
Public functions
- void Close() override
- Correctly close the output manager.
- void MacDataTxFailed(uint32_t nodeId, uint32_t bytes) override
- Store the transmission failed at MAC level.
- void SimultaneousTxOtherTechnology(uint32_t nodeId) override
- Indicates that there is a simultaneuous transmission with another technology.
- void SinrStore(uint32_t nodeId, double sinr) override
- Store a SINR value.
- void StoreChannelOccupancyRateFor(const std::string& technology, double value) override
- Store the Technology occupancy rate.
- void StoreE2EStatsFor(const std::string& technology, double throughput, uint32_t txBytes, uint32_t rxBytes, double meanDelay, double meanJitter, const std::string& addr) override
- Store the E2E stats.
Function documentation
ns3:: SqliteOutputManager:: SqliteOutputManager(const std::string& dbName,
double ueX,
uint32_t seed,
uint32_t run)
SqliteOutputManager constructor.
| Parameters | |
|---|---|
| dbName | the database file name |
| ueX | distance of the UEs from the gnb (only for nr-wigig-interference) |
| seed | seed of the simulation |
| run | run id of the simulation |
void ns3:: SqliteOutputManager:: MacDataTxFailed(uint32_t nodeId,
uint32_t bytes) override
Store the transmission failed at MAC level.
| Parameters | |
|---|---|
| nodeId | Node id |
| bytes | Bytes that failed at MAC level |
void ns3:: SqliteOutputManager:: SimultaneousTxOtherTechnology(uint32_t nodeId) override
Indicates that there is a simultaneuous transmission with another technology.
| Parameters | |
|---|---|
| nodeId | ID of the node |
Each call to this method will be counted as one simultaneous transmission.
void ns3:: SqliteOutputManager:: SinrStore(uint32_t nodeId,
double sinr) override
Store a SINR value.
| Parameters | |
|---|---|
| nodeId | Node id |
| sinr | Value of SINR in dB |
void ns3:: SqliteOutputManager:: StoreChannelOccupancyRateFor(const std::string& technology,
double value) override
Store the Technology occupancy rate.
| Parameters | |
|---|---|
| technology | name of the technology |
| value | Channel occupancy rate (between 0 and 1) |
void ns3:: SqliteOutputManager:: StoreE2EStatsFor(const std::string& technology,
double throughput,
uint32_t txBytes,
uint32_t rxBytes,
double meanDelay,
double meanJitter,
const std::string& addr) override
Store the E2E stats.
| Parameters | |
|---|---|
| technology | Technology name |
| throughput | throughput |
| txBytes | Transmitted bytes |
| rxBytes | Received bytes |
| meanDelay | Average delay (per packet) |
| meanJitter | Average jitter (per packet) |
| addr | Destination address |