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

#include <IDeviceFamily.h>

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

Public Member Functions

 IDeviceFamily (BaseLib::SharedObjects *bl, IFamilyEventSink *eventHandler, int32_t id, std::string name, FamilyType type)
 
virtual ~IDeviceFamily ()
 
FamilyType type ()
 
virtual bool enabled ()
 
virtual bool init ()=0
 
virtual void dispose ()
 
virtual bool lifetick ()=0
 
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 void load ()=0
 
virtual void save (bool full)=0
 
virtual std::string getName ()
 
virtual std::string handleCliCommand (std::string &command)=0
 
virtual void homegearStarted ()=0
 
virtual void homegearShuttingDown ()=0
 
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)=0
 
virtual PVariable listKnownDeviceTypes (PRpcClientInfo clientInfo, bool channels, std::set< std::string > &fields)=0
 
- 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 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
 
virtual std::shared_ptr< ICentralinitializeCentral (uint32_t deviceId, int32_t address, std::string serialNumber)=0
 
virtual void createCentral ()=0
 

Protected Attributes

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

§ IDeviceFamily()

BaseLib::Systems::IDeviceFamily::IDeviceFamily ( BaseLib::SharedObjects bl,
IFamilyEventSink eventHandler,
int32_t  id,
std::string  name,
FamilyType  type 
)

§ ~IDeviceFamily()

BaseLib::Systems::IDeviceFamily::~IDeviceFamily ( )
virtual

Member Function Documentation

§ createCentral()

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

§ deleteFamilySettingFromDatabase()

void BaseLib::Systems::IDeviceFamily::deleteFamilySettingFromDatabase ( const std::string &  name)
virtual

§ dispose()

virtual void BaseLib::Systems::IDeviceFamily::dispose ( )
inlinevirtual

Reimplemented in BaseLib::Systems::DeviceFamily.

§ enabled()

bool BaseLib::Systems::IDeviceFamily::enabled ( )
virtual

§ getFamily()

int32_t BaseLib::Systems::IDeviceFamily::getFamily ( )
virtual

§ getFamilySetting()

FamilySettings::PFamilySetting BaseLib::Systems::IDeviceFamily::getFamilySetting ( const std::string &  name)
virtual

§ getName()

std::string BaseLib::Systems::IDeviceFamily::getName ( )
virtual

§ getPairingInfo()

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

§ getParamsetDescription()

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

§ handleCliCommand()

virtual std::string BaseLib::Systems::IDeviceFamily::handleCliCommand ( std::string &  command)
pure virtual

§ homegearShuttingDown()

virtual void BaseLib::Systems::IDeviceFamily::homegearShuttingDown ( )
pure virtual

§ homegearStarted()

virtual void BaseLib::Systems::IDeviceFamily::homegearStarted ( )
pure virtual

§ init()

virtual bool BaseLib::Systems::IDeviceFamily::init ( )
pure virtual

§ initializeCentral()

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

§ lifetick()

virtual bool BaseLib::Systems::IDeviceFamily::lifetick ( )
pure virtual

§ listKnownDeviceTypes()

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

§ load()

virtual void BaseLib::Systems::IDeviceFamily::load ( )
pure virtual

§ lock()

void BaseLib::Systems::IDeviceFamily::lock ( )
virtual

§ locked()

bool BaseLib::Systems::IDeviceFamily::locked ( )
virtual

§ onAddWebserverEventHandler()

void BaseLib::Systems::IDeviceFamily::onAddWebserverEventHandler ( BaseLib::Rpc::IWebserverEventSink eventHandler,
std::map< int32_t, PEventHandler > &  eventHandlers 
)
overrideprotectedvirtual

§ onDecryptDeviceDescription()

void BaseLib::Systems::IDeviceFamily::onDecryptDeviceDescription ( int32_t  moduleId,
const std::vector< char > &  input,
std::vector< char > &  output 
)
overrideprotectedvirtual

§ onEvent()

void BaseLib::Systems::IDeviceFamily::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 
)
overrideprotected

§ onGetRoomIdByName()

uint64_t BaseLib::Systems::IDeviceFamily::onGetRoomIdByName ( std::string &  name)
overrideprotectedvirtual

§ onInvokeRpc()

BaseLib::PVariable BaseLib::Systems::IDeviceFamily::onInvokeRpc ( std::string &  methodName,
BaseLib::PArray parameters 
)
overrideprotectedvirtual

§ onRemoveWebserverEventHandler()

void BaseLib::Systems::IDeviceFamily::onRemoveWebserverEventHandler ( std::map< int32_t, PEventHandler > &  eventHandlers)
overrideprotectedvirtual

§ onRPCDeleteDevices()

void BaseLib::Systems::IDeviceFamily::onRPCDeleteDevices ( std::vector< uint64_t > &  ids,
std::shared_ptr< Variable deviceAddresses,
std::shared_ptr< Variable deviceInfo 
)
overrideprotected

§ onRPCEvent()

void BaseLib::Systems::IDeviceFamily::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 
)
overrideprotected

§ onRPCNewDevices()

void BaseLib::Systems::IDeviceFamily::onRPCNewDevices ( std::vector< uint64_t > &  ids,
std::shared_ptr< Variable deviceDescriptions 
)
overrideprotected

§ onRPCUpdateDevice()

void BaseLib::Systems::IDeviceFamily::onRPCUpdateDevice ( uint64_t  id,
int32_t  channel,
std::string  address,
int32_t  hint 
)
overrideprotectedvirtual

§ onRunScript()

void BaseLib::Systems::IDeviceFamily::onRunScript ( ScriptEngine::PScriptInfo scriptInfo,
bool  wait 
)
overrideprotectedvirtual

§ onServiceMessageEvent()

void BaseLib::Systems::IDeviceFamily::onServiceMessageEvent ( const PServiceMessage serviceMessage)
overrideprotectedvirtual

§ raiseAddWebserverEventHandler()

void BaseLib::Systems::IDeviceFamily::raiseAddWebserverEventHandler ( BaseLib::Rpc::IWebserverEventSink eventHandler,
std::map< int32_t, PEventHandler > &  eventHandlers 
)
protectedvirtual

§ raiseCheckLicense()

int32_t BaseLib::Systems::IDeviceFamily::raiseCheckLicense ( int32_t  moduleId,
int32_t  familyId,
int32_t  deviceId,
const std::string &  licenseKey 
)
protectedvirtual

§ raiseDecryptDeviceDescription()

void BaseLib::Systems::IDeviceFamily::raiseDecryptDeviceDescription ( int32_t  moduleId,
const std::vector< char > &  input,
std::vector< char > &  output 
)
protectedvirtual

§ raiseEvent()

void BaseLib::Systems::IDeviceFamily::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 
)
protectedvirtual

§ raiseGetRoomIdByName()

uint64_t BaseLib::Systems::IDeviceFamily::raiseGetRoomIdByName ( std::string &  name)
protectedvirtual

§ raiseInvokeRpc()

BaseLib::PVariable BaseLib::Systems::IDeviceFamily::raiseInvokeRpc ( std::string &  methodName,
BaseLib::PArray parameters 
)
protectedvirtual

§ raiseRemoveWebserverEventHandler()

void BaseLib::Systems::IDeviceFamily::raiseRemoveWebserverEventHandler ( std::map< int32_t, PEventHandler > &  eventHandlers)
protectedvirtual

§ raiseRPCDeleteDevices()

void BaseLib::Systems::IDeviceFamily::raiseRPCDeleteDevices ( std::vector< uint64_t > &  ids,
std::shared_ptr< Variable deviceAddresses,
std::shared_ptr< Variable deviceInfo 
)
protectedvirtual

§ raiseRPCEvent()

void BaseLib::Systems::IDeviceFamily::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 
)
protectedvirtual

§ raiseRPCNewDevices()

void BaseLib::Systems::IDeviceFamily::raiseRPCNewDevices ( std::vector< uint64_t > &  ids,
std::shared_ptr< Variable deviceDescriptions 
)
protectedvirtual

§ raiseRPCUpdateDevice()

void BaseLib::Systems::IDeviceFamily::raiseRPCUpdateDevice ( uint64_t  id,
int32_t  channel,
std::string  address,
int32_t  hint 
)
protectedvirtual

§ raiseRunScript()

void BaseLib::Systems::IDeviceFamily::raiseRunScript ( ScriptEngine::PScriptInfo scriptInfo,
bool  wait 
)
protectedvirtual

§ raiseServiceMessageEvent()

void BaseLib::Systems::IDeviceFamily::raiseServiceMessageEvent ( const PServiceMessage serviceMessage)
protectedvirtual

§ save()

virtual void BaseLib::Systems::IDeviceFamily::save ( bool  full)
pure virtual

§ setFamilySetting() [1/3]

void BaseLib::Systems::IDeviceFamily::setFamilySetting ( const std::string &  name,
const std::string &  value 
)
virtual

§ setFamilySetting() [2/3]

void BaseLib::Systems::IDeviceFamily::setFamilySetting ( const std::string &  name,
int32_t  value 
)
virtual

§ setFamilySetting() [3/3]

void BaseLib::Systems::IDeviceFamily::setFamilySetting ( const std::string &  name,
const std::vector< char > &  value 
)
virtual

§ type()

FamilyType BaseLib::Systems::IDeviceFamily::type ( )

§ unlock()

void BaseLib::Systems::IDeviceFamily::unlock ( )
virtual

Member Data Documentation

§ _bl

BaseLib::SharedObjects* BaseLib::Systems::IDeviceFamily::_bl = nullptr
protected

§ _disposed

bool BaseLib::Systems::IDeviceFamily::_disposed = false
protected

§ _locked

std::atomic_bool BaseLib::Systems::IDeviceFamily::_locked {false}
protected

§ _rpcDevices

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

§ _settings

std::shared_ptr<FamilySettings> BaseLib::Systems::IDeviceFamily::_settings
protected

§ _type

FamilyType BaseLib::Systems::IDeviceFamily::_type = FamilyType::unknown
protected

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