BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
ChecksumSensorDataFormatter.h
1 #pragma once
2 
3 #include "util/SensorDataFormatter.h"
4 
5 namespace BeeeOn {
6 
13 public:
15  ChecksumSensorDataFormatter(SensorDataFormatter::Ptr formatter);
16 
21  void setDelimiter(const std::string &delimiter);
22  void setFormatter(SensorDataFormatter::Ptr formatter);
23 
34  std::string format(const SensorData &data) override;
35 
36 private:
37  std::string m_delimiter;
38  SensorDataFormatter::Ptr m_formatter;
39 };
40 
41 }
ChecksumSensorDataFormatter is a wrapper around any SensorDataFormatter. Its job is to utilize the wr...
Definition: ChecksumSensorDataFormatter.h:12
Definition: SensorData.h:20
void setDelimiter(const std::string &delimiter)
Set delimiter between the prepended checksum and the actual data part formatted by the wrapped format...
Definition: ChecksumSensorDataFormatter.cpp:28
Definition: SensorDataFormatter.h:11
std::string format(const SensorData &data) override
Format the given data via the configured formatter and prepend checksum of the resulted string...
Definition: ChecksumSensorDataFormatter.cpp:38