libhomegear-base  0.7
Base library for Homegear and Homegear family modules.
BaseLib::DeviceDescription::Devices Class Reference

Class to work with the device description files of one device family. More...

#include <Devices.h>

Inheritance diagram for BaseLib::DeviceDescription::Devices:
BaseLib::IEvents

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< HomegearDeviceloadFile (std::string &filepath)
 
uint64_t getTypeNumberFromTypeId (const std::string &typeId)
 
uint64_t getTypeNumberFromProductId (const std::string &productId)
 
std::shared_ptr< HomegearDevicefind (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< VariablegetParamsetDescription (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 IEventSinkBasegetEventHandler ()
 

Protected Member Functions

std::shared_ptr< HomegearDeviceloadHomeMatic (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
 

Detailed Description

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.

Constructor & Destructor Documentation

§ Devices()

BaseLib::DeviceDescription::Devices::Devices ( BaseLib::SharedObjects baseLib,
IDevicesEventSink eventHandler,
int32_t  family 
)

§ ~Devices()

BaseLib::DeviceDescription::Devices::~Devices ( )
overridedefault

Member Function Documentation

§ clear()

void BaseLib::DeviceDescription::Devices::clear ( )

§ empty()

bool BaseLib::DeviceDescription::Devices::empty ( )
inline

§ find()

std::shared_ptr< HomegearDevice > BaseLib::DeviceDescription::Devices::find ( uint64_t  typeNumber,
uint32_t  firmwareVersion,
int32_t  countFromSysinfo = -1 
)

§ getIdTypeNumberMap()

std::unordered_map< std::string, uint64_t > BaseLib::DeviceDescription::Devices::getIdTypeNumberMap ( )

§ getKnownTypeNumbers()

std::unordered_set< uint64_t > BaseLib::DeviceDescription::Devices::getKnownTypeNumbers ( )

§ getParamsetDescription()

std::shared_ptr< Variable > BaseLib::DeviceDescription::Devices::getParamsetDescription ( PRpcClientInfo  clientInfo,
uint64_t  deviceId,
int32_t  firmwareVersion,
int32_t  channel,
ParameterGroup::Type::Enum  type 
)

§ getTypeNumberFromProductId()

uint64_t BaseLib::DeviceDescription::Devices::getTypeNumberFromProductId ( const std::string &  productId)

§ getTypeNumberFromTypeId()

uint64_t BaseLib::DeviceDescription::Devices::getTypeNumberFromTypeId ( const std::string &  typeId)

§ listKnownDeviceType()

PVariable BaseLib::DeviceDescription::Devices::listKnownDeviceType ( PRpcClientInfo  clientInfo,
std::shared_ptr< HomegearDevice > &  device,
PSupportedDevice  deviceType,
int32_t  channel,
std::set< std::string > &  fields 
)

§ listKnownDeviceTypes()

PVariable BaseLib::DeviceDescription::Devices::listKnownDeviceTypes ( PRpcClientInfo  clientInfo,
bool  channels,
std::set< std::string > &  fields 
)

§ load() [1/2]

void BaseLib::DeviceDescription::Devices::load ( )

§ load() [2/2]

void BaseLib::DeviceDescription::Devices::load ( std::string &  xmlPath)

§ loadFile()

std::shared_ptr< HomegearDevice > BaseLib::DeviceDescription::Devices::loadFile ( std::string &  filepath)

§ loadHomeMatic()

std::shared_ptr< HomegearDevice > BaseLib::DeviceDescription::Devices::loadHomeMatic ( std::string &  filepath)
protected

Member Data Documentation

§ _bl

BaseLib::SharedObjects* BaseLib::DeviceDescription::Devices::_bl = nullptr
protected

§ _devices

std::vector<std::shared_ptr<HomegearDevice> > BaseLib::DeviceDescription::Devices::_devices
protected

§ _devicesMutex

std::mutex BaseLib::DeviceDescription::Devices::_devicesMutex
protected

§ _dynamicDevices

std::vector<std::shared_ptr<HomegearDevice> > BaseLib::DeviceDescription::Devices::_dynamicDevices
protected

§ _family

int32_t BaseLib::DeviceDescription::Devices::_family = -1
protected

§ _translations

std::shared_ptr<DeviceDescription::DeviceTranslations> BaseLib::DeviceDescription::Devices::_translations
protected

The documentation for this class was generated from the following files: