6 #include "model/ModuleID.h"
7 #include "model/ModuleType.h"
8 #include "util/Loggable.h"
9 #include "zwave/ZWaveMapperRegistry.h"
32 typedef Poco::SharedPtr<GenericMapper> Ptr;
52 std::string
product()
const override;
57 std::list<ModuleType>
types()
const override;
78 std::map<ZWaveNode::CommandClass, ModuleID> m_mapping;
79 std::map<ModuleID, ModuleType> m_modules;
100 std::map<std::pair<uint8_t, uint8_t>,
ModuleType> m_typesMapping;
111 std::map<std::pair<uint8_t, uint8_t>,
unsigned int> m_typesOrder;
ZWaveMapperRegistry is mostly intended to map Z-Wave specific data type hierarchy to BeeeOn ModuleTyp...
Definition: ZWaveMapperRegistry.h:22
DeviceID buildID() const override
Definition: GenericZWaveMapperRegistry.cpp:38
Mapper::Ptr resolve(const ZWaveNode &node) override
Definition: GenericZWaveMapperRegistry.cpp:296
Command class representation of a Z-Wave value. We support only a subset of command classes that are ...
Definition: ZWaveNode.h:48
static uint8_t ID_MANGLE_BITS
Mangle bits to be injected into device ID of Z-Wave devices that are using the GenericMapper.
Definition: GenericZWaveMapperRegistry.h:38
SensorValue convert(const ZWaveNode::Value &value) const override
Definition: GenericZWaveMapperRegistry.cpp:80
Value coming from the Z-Wave network. It holds some data (usually sensor data) and metadata to identi...
Definition: ZWaveNode.h:102
void loadTypesMapping(const std::string &file)
Load XML file with the types mapping between Z-Wave and BeeeOn.
Definition: SensorValue.h:14
Map the ZWaveNode-specific data to the BeeeOn-specific ones. It is assumed that the ZWaveNode instanc...
Definition: ZWaveMapperRegistry.h:31
void mapType(const ZWaveNode::CommandClass &cc, const ModuleType &type)
Record the given association between the given Z-Wave command class and BeeeOn ModuleType. When calling this method mutiple times, the order corresponds to an increasing ModuleID.
Definition: GenericZWaveMapperRegistry.cpp:48
Certain Z-Wave nodes can be mapped to the BeeeOn system generically. This allows to support any node ...
Definition: GenericZWaveMapperRegistry.h:26
Definition: GenericZWaveMapperRegistry.h:30
Definition: ModuleID.h:12
ZWaveNode represents information from the Z-Wave network about a particular node. Each Z-Wave node is...
Definition: ZWaveNode.h:22
std::string product() const override
Definition: GenericZWaveMapperRegistry.cpp:43
Definition: ModuleType.h:18
Definition: Loggable.h:19
void cannotConvert(const ZWaveNode::Value &value) const
Throw an exception when the given value cannot be converted into the BeeeOn representation.
Definition: GenericZWaveMapperRegistry.cpp:73
Definition: DeviceID.h:17
std::list< ModuleType > types() const override
Definition: GenericZWaveMapperRegistry.cpp:63
Identity of a Z-Wave node that can be used separately without any instance of the ZWaveNode class...
Definition: ZWaveNode.h:28