ModbusSMA
v1.0.0
|
Reads the modbusSMA register definitions from a sqlite3 database. More...
#include <DataBase.hpp>
Classes | |
struct | DevEnum |
Information for one supported device. More... | |
Public Member Functions | |
DataBase (std::string _path=SMA_MODBUS_DEFAULT_DB) | |
Constructor. More... | |
DataBase (DataBase const &)=delete | |
void | operator= (DataBase const &)=delete |
ErrorCode | connect () |
Connect to the databes. | |
bool | validate () |
Validates the register database. | |
void | disconnect () |
Closes an open databese connection. | |
std::vector< std::string > | getTableList () |
Returns a vector of all tables. More... | |
std::vector< DevEnum > | getDeviceEnums () |
Returns a vector of all supported devices. More... | |
std::vector< Register > | getRegisters (std::string _table) |
Returns a vector of all registers supported by the device. More... | |
bool | isConnected () const |
Returns whether the DB is loaded. More... | |
Reads the modbusSMA register definitions from a sqlite3 database.
Definition at line 52 of file DataBase.hpp.
DataBase::DataBase | ( | std::string | _path = SMA_MODBUS_DEFAULT_DB | ) |
vector< DataBase::DevEnum > DataBase::getDeviceEnums | ( | ) |
Returns a vector of all supported devices.
An empty vector is returned on error.
Definition at line 205 of file DataBase.cpp.
vector< Register > DataBase::getRegisters | ( | std::string | _table | ) |
Returns a vector of all registers supported by the device.
An empty vector is returned on error.
_table | The device table from the DevEnum |
Definition at line 247 of file DataBase.cpp.
vector< string > DataBase::getTableList | ( | ) |
Returns a vector of all tables.
An empty vector is returned on error.
Definition at line 166 of file DataBase.cpp.
|
inline |
Returns whether the DB is loaded.
Definition at line 81 of file DataBase.hpp.