BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
IQRFTypeMappingParser.h
1 #pragma once
2 
3 #include <string>
4 
5 #include "util/XmlTypeMappingParser.h"
6 
7 namespace BeeeOn {
8 
12 struct IQRFType {
16  const unsigned int id;
17 
21  const unsigned int errorValue;
22 
26  const unsigned int wide;
27 
32  const double resolution;
33 
37  const bool signedFlag;
38 
39  std::string toString() const;
40 
41  bool operator <(const IQRFType &type) const;
42 };
43 
48 class IQRFTypeMappingParser : public XmlTypeMappingParser<IQRFType> {
49 public:
51  const std::string &mappingGroup, const std::string &techNode);
52 
53 protected:
63  IQRFType parseTechType(const Poco::XML::Node &node) override;
64 
65  std::string techTypeRepr(const IQRFType &type) override;
66 
67 private:
68  std::string m_techNode;
69 };
70 
71 }
Represents one IQRF type.
Definition: IQRFTypeMappingParser.h:12
const unsigned int errorValue
Value that specifies a sensor error.
Definition: IQRFTypeMappingParser.h:21
const unsigned int wide
Byte size of value.
Definition: IQRFTypeMappingParser.h:26
XmlTypeMappingParser is an abstract specialization of the TypeMappingParser. It is used to parse an e...
Definition: XmlTypeMappingParser.h:18
IQRFType parseTechType(const Poco::XML::Node &node) override
Parse the given DOM node and extract attributes:
Definition: IQRFTypeMappingParser.cpp:42
std::string techTypeRepr(const IQRFType &type) override
Definition: IQRFTypeMappingParser.cpp:89
const bool signedFlag
Represents if value is signed or not.
Definition: IQRFTypeMappingParser.h:37
const double resolution
The resolution indicates how near two neighboring measured values can be so that the sensor was able ...
Definition: IQRFTypeMappingParser.h:32
const unsigned int id
Sensor type identification in IQRF.
Definition: IQRFTypeMappingParser.h:16
IQRFTypeMappingParser can parse XML files defining mappings between IQRF types and BeeeOn ModuleTypes...
Definition: IQRFTypeMappingParser.h:48