libhomegear-base
0.7
Base library for Homegear and Homegear family modules.
|
Class to work with the device description files of one device family. More...
#include <Devices.h>
Classes | |
class | IDevicesEventSink |
Public Member Functions | |
Devices (BaseLib::SharedObjects *baseLib, IDevicesEventSink *eventHandler, int32_t family) | |
~Devices () override=default | |
bool | empty () |
void | clear () |
void | load () |
void | load (std::string &xmlPath) |
std::shared_ptr< HomegearDevice > | loadFile (std::string &filepath) |
uint64_t | getTypeNumberFromTypeId (const std::string &typeId) |
uint64_t | getTypeNumberFromProductId (const std::string &productId) |
std::shared_ptr< HomegearDevice > | find (uint64_t typeNumber, uint32_t firmwareVersion, int32_t countFromSysinfo=-1) |
std::unordered_map< std::string, uint64_t > | getIdTypeNumberMap () |
std::unordered_set< uint64_t > | getKnownTypeNumbers () |
std::shared_ptr< Variable > | getParamsetDescription (PRpcClientInfo clientInfo, uint64_t deviceId, int32_t firmwareVersion, int32_t channel, ParameterGroup::Type::Enum type) |
PVariable | listKnownDeviceType (PRpcClientInfo clientInfo, std::shared_ptr< HomegearDevice > &device, PSupportedDevice deviceType, int32_t channel, std::set< std::string > &fields) |
PVariable | listKnownDeviceTypes (PRpcClientInfo clientInfo, bool channels, std::set< std::string > &fields) |
Public Member Functions inherited from BaseLib::IEvents | |
IEvents () | |
virtual | ~IEvents () |
virtual void | setEventHandler (IEventSinkBase *eventHandler) |
virtual void | resetEventHandler () |
virtual IEventSinkBase * | getEventHandler () |
Protected Member Functions | |
std::shared_ptr< HomegearDevice > | loadHomeMatic (std::string &filepath) |
Protected Attributes | |
BaseLib::SharedObjects * | _bl = nullptr |
int32_t | _family = -1 |
std::mutex | _devicesMutex |
std::vector< std::shared_ptr< HomegearDevice > > | _devices |
std::vector< std::shared_ptr< HomegearDevice > > | _dynamicDevices |
std::shared_ptr< DeviceDescription::DeviceTranslations > | _translations |
Protected Attributes inherited from BaseLib::IEvents | |
IEventSinkBase * | _eventHandler = nullptr |
Class to work with the device description files of one device family.
It is used to load all device description files, list all device descriptions and to find the correct description for a device.
BaseLib::DeviceDescription::Devices::Devices | ( | BaseLib::SharedObjects * | baseLib, |
IDevicesEventSink * | eventHandler, | ||
int32_t | family | ||
) |
|
overridedefault |
void BaseLib::DeviceDescription::Devices::clear | ( | ) |
|
inline |
std::shared_ptr< HomegearDevice > BaseLib::DeviceDescription::Devices::find | ( | uint64_t | typeNumber, |
uint32_t | firmwareVersion, | ||
int32_t | countFromSysinfo = -1 |
||
) |
std::unordered_map< std::string, uint64_t > BaseLib::DeviceDescription::Devices::getIdTypeNumberMap | ( | ) |
std::unordered_set< uint64_t > BaseLib::DeviceDescription::Devices::getKnownTypeNumbers | ( | ) |
std::shared_ptr< Variable > BaseLib::DeviceDescription::Devices::getParamsetDescription | ( | PRpcClientInfo | clientInfo, |
uint64_t | deviceId, | ||
int32_t | firmwareVersion, | ||
int32_t | channel, | ||
ParameterGroup::Type::Enum | type | ||
) |
uint64_t BaseLib::DeviceDescription::Devices::getTypeNumberFromProductId | ( | const std::string & | productId | ) |
uint64_t BaseLib::DeviceDescription::Devices::getTypeNumberFromTypeId | ( | const std::string & | typeId | ) |
PVariable BaseLib::DeviceDescription::Devices::listKnownDeviceType | ( | PRpcClientInfo | clientInfo, |
std::shared_ptr< HomegearDevice > & | device, | ||
PSupportedDevice | deviceType, | ||
int32_t | channel, | ||
std::set< std::string > & | fields | ||
) |
PVariable BaseLib::DeviceDescription::Devices::listKnownDeviceTypes | ( | PRpcClientInfo | clientInfo, |
bool | channels, | ||
std::set< std::string > & | fields | ||
) |
void BaseLib::DeviceDescription::Devices::load | ( | ) |
void BaseLib::DeviceDescription::Devices::load | ( | std::string & | xmlPath | ) |
std::shared_ptr< HomegearDevice > BaseLib::DeviceDescription::Devices::loadFile | ( | std::string & | filepath | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |