BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions
BeeeOn::ZWaveMapperRegistry::Mapper Class Referenceabstract

Map the ZWaveNode-specific data to the BeeeOn-specific ones. It is assumed that the ZWaveNode instance (or its Value) passed into the Mapper is the one used by ZWaveMapperRegistry::lookup(). More...

#include <ZWaveMapperRegistry.h>

Inheritance diagram for BeeeOn::ZWaveMapperRegistry::Mapper:
BeeeOn::GenericZWaveMapperRegistry::GenericMapper

Public Types

typedef Poco::SharedPtr< MapperPtr
 

Public Member Functions

 Mapper (const ZWaveNode::Identity &id, const std::string &product)
 
virtual DeviceID buildID () const
 The mapper can sometimes need to mangle a device ID for a Z-Wave node. This is possible by overriding this method. More...
 
virtual std::string product () const
 
virtual std::list< ModuleTypetypes () const =0
 
Poco::Nullable< ModuleTypefindType (const ModuleID &id) const
 Find module type by ID.
 
virtual SensorValue convert (const ZWaveNode::Value &value) const =0
 
virtual ZWaveNode::Value convert (const ModuleID &id, double value) const
 

Protected Member Functions

ZWaveNode::Identity identity () const
 

Static Protected Member Functions

static DeviceID mangleID (const DeviceID &id, uint8_t bits)
 

Detailed Description

Map the ZWaveNode-specific data to the BeeeOn-specific ones. It is assumed that the ZWaveNode instance (or its Value) passed into the Mapper is the one used by ZWaveMapperRegistry::lookup().

Member Function Documentation

DeviceID ZWaveMapperRegistry::Mapper::buildID ( ) const
virtual

The mapper can sometimes need to mangle a device ID for a Z-Wave node. This is possible by overriding this method.

The default implementation builds the ID from the home ID and node ID.

Returns
ID of the given Z-Wave node identity

Reimplemented in BeeeOn::GenericZWaveMapperRegistry::GenericMapper.

virtual SensorValue BeeeOn::ZWaveMapperRegistry::Mapper::convert ( const ZWaveNode::Value value) const
pure virtual
Returns
SensorValue representation of the ZWaveNode::Value instance

Implemented in BeeeOn::GenericZWaveMapperRegistry::GenericMapper.

ZWaveNode::Value ZWaveMapperRegistry::Mapper::convert ( const ModuleID id,
double  value 
) const
virtual
Returns
Z-Wave value representing the given value of that module ID.
Exceptions
Poco::NotFoundExceptionif no such controllable module ID is available
Poco::NotImplementedExceptionwhen such module ID is unsupported for changes by this mapper

Reimplemented in BeeeOn::GenericZWaveMapperRegistry::GenericMapper.

string ZWaveMapperRegistry::Mapper::product ( ) const
virtual
Returns
fixed product name of the node if needed

Reimplemented in BeeeOn::GenericZWaveMapperRegistry::GenericMapper.

virtual std::list<ModuleType> BeeeOn::ZWaveMapperRegistry::Mapper::types ( ) const
pure virtual
Returns
list of ModuleType instance for a particular Z-Wave node type

Implemented in BeeeOn::GenericZWaveMapperRegistry::GenericMapper.


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