MetriVis | Overview | Download | User Manual | Development |
Reference | Overview | Design Documentation | Reference Backend | Reference Frontend |
#include <MetriVis.h>
Public Member Functions | |
MetriVis () | |
Default constructor. | |
~MetriVis () | |
Deconstructor for MetriVis. | |
int | InitService () |
Initializes the service. | |
void | RunService () |
Main loop of the service. | |
void | StopService () |
Stops the services. | |
int | UninitService () |
Uninits the service. | |
void | set_port_number (int port_number) |
Sets the port number to a specific port. | |
void | set_max_cache_size (long max_cache_size) |
Interface function to max cache size. | |
void | set_db_file_name (std::string db_file_name) |
Interface function to file name. | |
Private Member Functions | |
MetriVis (const MetriVis &metrivis) | |
MetriVis & | operator= (MetriVis &metrivis) |
Private Attributes | |
volatile bool | running_ |
Variable indicating run state. | |
int | port_number_ |
The TCP port number to listen. | |
int | max_cache_size_ |
Maximal cache size (SQLDriver). | |
std::string | db_file_name_ |
File name of the data base. |
This class controlls the MetriVis service, from there the service may be started/stopped and configured.
metrivis::MetriVis::MetriVis | ( | ) |
Default constructor.
Constructor.
See header file for overview.
metrivis::MetriVis::~MetriVis | ( | ) |
int metrivis::MetriVis::InitService | ( | ) |
Initializes the service.
Initialize the service.
See header file for overview.
void metrivis::MetriVis::RunService | ( | ) |
Main loop of the service.
Starts running the service.
Starts running the service and actually waits until the HTTPDriver thread terminates. This is done to keep CPU usage low.
Blocking function. See header file for overview.
void metrivis::MetriVis::StopService | ( | ) |
Stops the services.
Stops the service.
This function stops the MetriVis service by stopping the HTTPDriver.
int metrivis::MetriVis::UninitService | ( | ) |
Uninits the service.
Uninitializes the service.
See header file for overview.
void metrivis::MetriVis::set_port_number | ( | int | port_number | ) | [inline] |
Sets the port number to a specific port.
In order for this to take affect, the port number needs to be set before MetriVis::InitService is called.
void metrivis::MetriVis::set_max_cache_size | ( | long | max_cache_size | ) | [inline] |
Interface function to max cache size.
cache_size,: | The maximal cache size in bytes. |
void metrivis::MetriVis::set_db_file_name | ( | std::string | db_file_name | ) | [inline] |
Interface function to file name.
db_file_name,: | The name of the db file. |