libhomegear-base
0.7
Base library for Homegear and Homegear family modules.
|
This is the base library main class. More...
#include <BaseLib.h>
Public Member Functions | |
SharedObjects (const SharedObjects &)=delete | |
SharedObjects & | operator= (const SharedObjects &)=delete |
int64_t | getStartTime () |
Return the time of the creation of the object (the Homegear start time). More... | |
void | setStartTime (int64_t time) |
Set the start time. More... | |
SharedObjects (bool testMaxThreadCount=false) | |
Main constructor. More... | |
virtual | ~SharedObjects () |
Destructor. More... | |
Static Public Member Functions | |
static std::string | version () |
Returns the Homegear version. More... | |
Public Attributes | |
int32_t | debugLevel = 3 |
The current debug level for logging. More... | |
uid_t | userId = 0 |
gid_t | groupId = 0 |
std::atomic_bool | booting {true} |
True when Homegear is still starting. More... | |
std::atomic_bool | shuttingDown {false} |
True when Homegear received signal 15. More... | |
std::atomic_bool | slaveMode {false} |
True when Homegear runs in slave mode of a master/slave installation. More... | |
std::atomic_bool | maintenanceMode {false} |
True when maintenance mode is enabled. More... | |
FileDescriptorManager | fileDescriptorManager |
The FileDescriptorManager object where all file or socket descriptors should be registered. More... | |
SerialDeviceManager | serialDeviceManager |
The serial device manager can be used to access one serial device across multiple modules. More... | |
Settings | settings |
The main.conf settings. More... | |
std::shared_ptr< Database::IDatabaseController > | db |
Provides database access. More... | |
uint32_t | rpcPort = 0 |
Port, the non-ssl RPC server listens on. More... | |
Systems::UpdateInfo | deviceUpdateInfo |
Object to store information about running updates and to only allow one update at a time. More... | |
HelperFunctions | hf |
Functions to ease your life for a lot of standard operations. More... | |
Io | io |
Functions for io operations. More... | |
Output | out |
The main output object to print text to the standard and error output. More... | |
ThreadManager | threadManager |
The thread manager. More... | |
Systems::GlobalServiceMessages | globalServiceMessages |
Global service messages. More... | |
std::shared_ptr< Hgdc > | hgdc |
Homegear Daisy Chain. More... | |
Static Public Attributes | |
static sigset_t | defaultSignalMask |
Default signal mask. More... | |
This is the base library main class.
It is used to share objects and data between all modules and the main program.
|
delete |
|
explicit |
Main constructor.
testMaxThreadCount | If set to "true", the library tests the maximum number of threads possible. This takes some time. This is only relevant when using the thread manager. |
|
virtual |
Destructor.
int64_t BaseLib::SharedObjects::getStartTime | ( | ) |
Return the time of the creation of the object (the Homegear start time).
|
delete |
void BaseLib::SharedObjects::setStartTime | ( | int64_t | time | ) |
Set the start time.
|
static |
Returns the Homegear version.
std::atomic_bool BaseLib::SharedObjects::booting {true} |
True when Homegear is still starting.
It is set to false, when start up is complete and isOpen() of all interfaces is "true" (plus 30 seconds).
std::shared_ptr<Database::IDatabaseController> BaseLib::SharedObjects::db |
Provides database access.
int32_t BaseLib::SharedObjects::debugLevel = 3 |
The current debug level for logging.
|
static |
Default signal mask.
Systems::UpdateInfo BaseLib::SharedObjects::deviceUpdateInfo |
Object to store information about running updates and to only allow one update at a time.
FileDescriptorManager BaseLib::SharedObjects::fileDescriptorManager |
The FileDescriptorManager object where all file or socket descriptors should be registered.
This should be done to avoid errors as it can happen, that a closed file descriptor is reopened and suddenly valid again without the object using the old descriptor noticing it.
Systems::GlobalServiceMessages BaseLib::SharedObjects::globalServiceMessages |
Global service messages.
gid_t BaseLib::SharedObjects::groupId = 0 |
HelperFunctions BaseLib::SharedObjects::hf |
Functions to ease your life for a lot of standard operations.
As all methods are static, this variable is only kept for backwards compatibility.
std::shared_ptr<Hgdc> BaseLib::SharedObjects::hgdc |
Homegear Daisy Chain.
Io BaseLib::SharedObjects::io |
Functions for io operations.
std::atomic_bool BaseLib::SharedObjects::maintenanceMode {false} |
True when maintenance mode is enabled.
Output BaseLib::SharedObjects::out |
The main output object to print text to the standard and error output.
uint32_t BaseLib::SharedObjects::rpcPort = 0 |
Port, the non-ssl RPC server listens on.
SerialDeviceManager BaseLib::SharedObjects::serialDeviceManager |
The serial device manager can be used to access one serial device across multiple modules.
Settings BaseLib::SharedObjects::settings |
The main.conf settings.
std::atomic_bool BaseLib::SharedObjects::shuttingDown {false} |
True when Homegear received signal 15.
std::atomic_bool BaseLib::SharedObjects::slaveMode {false} |
True when Homegear runs in slave mode of a master/slave installation.
ThreadManager BaseLib::SharedObjects::threadManager |
The thread manager.
uid_t BaseLib::SharedObjects::userId = 0 |