libhomegear-base  0.7
Base library for Homegear and Homegear family modules.
BaseLib::Systems::DeviceFamily Class Referenceabstract

#include <DeviceFamily.h>

Inheritance diagram for BaseLib::Systems::DeviceFamily:
BaseLib::Systems::IDeviceFamily BaseLib::Systems::ICentral::ICentralEventSink BaseLib::DeviceDescription::Devices::IDevicesEventSink BaseLib::IEvents BaseLib::IEventSinkBase BaseLib::IEventSinkBase

Public Member Functions

 DeviceFamily (BaseLib::SharedObjects *bl, IFamilyEventSink *eventHandler, int32_t id, std::string name)
 
virtual bool init ()
 
virtual void dispose ()
 
virtual bool lifetick ()
 
virtual std::shared_ptr< DeviceDescription::DevicesgetRpcDevices ()
 
virtual void load ()
 
virtual void save (bool full)
 
virtual std::shared_ptr< ICentralgetCentral ()
 
virtual std::string handleCliCommand (std::string &command)
 
virtual bool hasPhysicalInterface ()
 
virtual std::shared_ptr< PhysicalInterfacesphysicalInterfaces ()
 
virtual void homegearStarted ()
 
virtual void homegearShuttingDown ()
 
virtual std::shared_ptr< VariablegetPairingInfo ()=0
 
virtual std::shared_ptr< VariablegetParamsetDescription (PRpcClientInfo clientInfo, int32_t deviceId, int32_t firmwareVersion, int32_t channel, ParameterGroup::Type::Enum type)
 
virtual PVariable listKnownDeviceTypes (PRpcClientInfo clientInfo, bool channels, std::set< std::string > &fields)
 
- Public Member Functions inherited from BaseLib::Systems::IDeviceFamily
 IDeviceFamily (BaseLib::SharedObjects *bl, IFamilyEventSink *eventHandler, int32_t id, std::string name, FamilyType type)
 
virtual ~IDeviceFamily ()
 
FamilyType type ()
 
virtual bool enabled ()
 
virtual void lock ()
 
virtual void unlock ()
 
virtual bool locked ()
 
virtual int32_t getFamily ()
 
virtual FamilySettings::PFamilySetting getFamilySetting (const std::string &name)
 
virtual void setFamilySetting (const std::string &name, const std::string &value)
 
virtual void setFamilySetting (const std::string &name, int32_t value)
 
virtual void setFamilySetting (const std::string &name, const std::vector< char > &value)
 
virtual void deleteFamilySettingFromDatabase (const std::string &name)
 
virtual std::string getName ()
 
- Public Member Functions inherited from BaseLib::Systems::ICentral::ICentralEventSink
virtual void onRPCEvent (std::string &source, uint64_t id, int32_t channel, std::string &deviceAddress, std::shared_ptr< std::vector< std::string >> &valueKeys, std::shared_ptr< std::vector< PVariable >> &values)=0
 
virtual void onRPCNewDevices (std::vector< uint64_t > &ids, PVariable deviceDescriptions)=0
 
virtual void onRPCDeleteDevices (std::vector< uint64_t > &ids, PVariable deviceAddresses, PVariable deviceInfo)=0
 
virtual void onEvent (std::string &source, uint64_t peerId, int32_t channel, std::shared_ptr< std::vector< std::string >> &variables, std::shared_ptr< std::vector< std::shared_ptr< BaseLib::Variable >>> &values)=0
 
- Public Member Functions inherited from BaseLib::IEventSinkBase
 IEventSinkBase ()
 
virtual ~IEventSinkBase ()
 
- Public Member Functions inherited from BaseLib::IEvents
 IEvents ()
 
virtual ~IEvents ()
 
virtual void setEventHandler (IEventSinkBase *eventHandler)
 
virtual void resetEventHandler ()
 
virtual IEventSinkBasegetEventHandler ()
 

Protected Member Functions

virtual std::shared_ptr< ICentralinitializeCentral (uint32_t deviceId, int32_t address, std::string serialNumber)=0
 
virtual void createCentral ()=0
 
- Protected Member Functions inherited from BaseLib::Systems::IDeviceFamily
virtual void raiseAddWebserverEventHandler (BaseLib::Rpc::IWebserverEventSink *eventHandler, std::map< int32_t, PEventHandler > &eventHandlers)
 
virtual void raiseRemoveWebserverEventHandler (std::map< int32_t, PEventHandler > &eventHandlers)
 
virtual void raiseRPCEvent (std::string &source, uint64_t id, int32_t channel, std::string &deviceAddress, std::shared_ptr< std::vector< std::string >> &valueKeys, std::shared_ptr< std::vector< std::shared_ptr< Variable >>> &values)
 
virtual void raiseRPCUpdateDevice (uint64_t id, int32_t channel, std::string address, int32_t hint)
 
virtual void raiseRPCNewDevices (std::vector< uint64_t > &ids, std::shared_ptr< Variable > deviceDescriptions)
 
virtual void raiseRPCDeleteDevices (std::vector< uint64_t > &ids, std::shared_ptr< Variable > deviceAddresses, std::shared_ptr< Variable > deviceInfo)
 
virtual void raiseEvent (std::string &source, uint64_t peerID, int32_t channel, std::shared_ptr< std::vector< std::string >> &variables, std::shared_ptr< std::vector< std::shared_ptr< Variable >>> &values)
 
virtual void raiseServiceMessageEvent (const PServiceMessage &serviceMessage)
 
virtual void raiseRunScript (ScriptEngine::PScriptInfo &scriptInfo, bool wait)
 
virtual BaseLib::PVariable raiseInvokeRpc (std::string &methodName, BaseLib::PArray &parameters)
 
virtual int32_t raiseCheckLicense (int32_t moduleId, int32_t familyId, int32_t deviceId, const std::string &licenseKey)
 
virtual uint64_t raiseGetRoomIdByName (std::string &name)
 
virtual void raiseDecryptDeviceDescription (int32_t moduleId, const std::vector< char > &input, std::vector< char > &output)
 
void onAddWebserverEventHandler (BaseLib::Rpc::IWebserverEventSink *eventHandler, std::map< int32_t, PEventHandler > &eventHandlers) override
 
void onRemoveWebserverEventHandler (std::map< int32_t, PEventHandler > &eventHandlers) override
 
void onRPCEvent (std::string &source, uint64_t id, int32_t channel, std::string &deviceAddress, std::shared_ptr< std::vector< std::string >> &valueKeys, std::shared_ptr< std::vector< std::shared_ptr< Variable >>> &values) override
 
void onRPCUpdateDevice (uint64_t id, int32_t channel, std::string address, int32_t hint) override
 
void onRPCNewDevices (std::vector< uint64_t > &ids, std::shared_ptr< Variable > deviceDescriptions) override
 
void onRPCDeleteDevices (std::vector< uint64_t > &ids, std::shared_ptr< Variable > deviceAddresses, std::shared_ptr< Variable > deviceInfo) override
 
void onEvent (std::string &source, uint64_t peerID, int32_t channel, std::shared_ptr< std::vector< std::string >> &variables, std::shared_ptr< std::vector< std::shared_ptr< Variable >>> &values) override
 
void onServiceMessageEvent (const PServiceMessage &serviceMessage) override
 
void onRunScript (ScriptEngine::PScriptInfo &scriptInfo, bool wait) override
 
BaseLib::PVariable onInvokeRpc (std::string &methodName, BaseLib::PArray &parameters) override
 
uint64_t onGetRoomIdByName (std::string &name) override
 
void onDecryptDeviceDescription (int32_t moduleId, const std::vector< char > &input, std::vector< char > &output) override
 

Protected Attributes

std::shared_ptr< ICentral_central
 
std::shared_ptr< PhysicalInterfaces_physicalInterfaces
 
std::shared_ptr< DeviceDescription::Devices_rpcDevices
 
- Protected Attributes inherited from BaseLib::Systems::IDeviceFamily
BaseLib::SharedObjects_bl = nullptr
 
FamilyType _type = FamilyType::unknown
 
std::shared_ptr< FamilySettings_settings
 
std::atomic_bool _locked {false}
 
bool _disposed = false
 
std::shared_ptr< DeviceDescription::Devices_rpcDevices
 
- Protected Attributes inherited from BaseLib::IEvents
IEventSinkBase_eventHandler = nullptr
 

Constructor & Destructor Documentation

§ DeviceFamily()

BaseLib::Systems::DeviceFamily::DeviceFamily ( BaseLib::SharedObjects bl,
IFamilyEventSink eventHandler,
int32_t  id,
std::string  name 
)

Member Function Documentation

§ createCentral()

virtual void BaseLib::Systems::DeviceFamily::createCentral ( )
protectedpure virtual

§ dispose()

void BaseLib::Systems::DeviceFamily::dispose ( )
virtual

Reimplemented from BaseLib::Systems::IDeviceFamily.

§ getCentral()

std::shared_ptr< ICentral > BaseLib::Systems::DeviceFamily::getCentral ( )
virtual

§ getPairingInfo()

virtual std::shared_ptr<Variable> BaseLib::Systems::DeviceFamily::getPairingInfo ( )
pure virtual

§ getParamsetDescription()

std::shared_ptr< Variable > BaseLib::Systems::DeviceFamily::getParamsetDescription ( PRpcClientInfo  clientInfo,
int32_t  deviceId,
int32_t  firmwareVersion,
int32_t  channel,
ParameterGroup::Type::Enum  type 
)
virtual

§ getRpcDevices()

std::shared_ptr< DeviceDescription::Devices > BaseLib::Systems::DeviceFamily::getRpcDevices ( )
virtual

§ handleCliCommand()

std::string BaseLib::Systems::DeviceFamily::handleCliCommand ( std::string &  command)
virtual

§ hasPhysicalInterface()

bool BaseLib::Systems::DeviceFamily::hasPhysicalInterface ( )
virtual

§ homegearShuttingDown()

void BaseLib::Systems::DeviceFamily::homegearShuttingDown ( )
virtual

§ homegearStarted()

void BaseLib::Systems::DeviceFamily::homegearStarted ( )
virtual

§ init()

bool BaseLib::Systems::DeviceFamily::init ( )
virtual

§ initializeCentral()

virtual std::shared_ptr<ICentral> BaseLib::Systems::DeviceFamily::initializeCentral ( uint32_t  deviceId,
int32_t  address,
std::string  serialNumber 
)
protectedpure virtual

§ lifetick()

bool BaseLib::Systems::DeviceFamily::lifetick ( )
virtual

§ listKnownDeviceTypes()

PVariable BaseLib::Systems::DeviceFamily::listKnownDeviceTypes ( PRpcClientInfo  clientInfo,
bool  channels,
std::set< std::string > &  fields 
)
virtual

§ load()

void BaseLib::Systems::DeviceFamily::load ( )
virtual

§ physicalInterfaces()

std::shared_ptr< PhysicalInterfaces > BaseLib::Systems::DeviceFamily::physicalInterfaces ( )
virtual

§ save()

void BaseLib::Systems::DeviceFamily::save ( bool  full)
virtual

Member Data Documentation

§ _central

std::shared_ptr<ICentral> BaseLib::Systems::DeviceFamily::_central
protected

§ _physicalInterfaces

std::shared_ptr<PhysicalInterfaces> BaseLib::Systems::DeviceFamily::_physicalInterfaces
protected

§ _rpcDevices

std::shared_ptr<DeviceDescription::Devices> BaseLib::Systems::DeviceFamily::_rpcDevices
protected

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