ctp3-mon  0.3.0
 All Classes Functions Variables Pages
Ctp3SensorLTU.cpp
1 #include "Ctp3SensorLTU.h"
2 
3 Ctp3SensorLTU::Ctp3SensorLTU(std::string name) : ObSensor(name) {
7 }
12 }
13 
18 
19  _first = new Ctp3SensorLTU("value");
20  _second = new Ctp3SensorLTU("value");
21  _change = new Ctp3SensorLTU("change");
22 }
23 
28 
29  _logger->trace("Doing process '{}' ...", _name);
30 }
31 
32 void Ctp3SensorLTU::speed(ObSensor *s1, ObSensor *s2, int timeout) {
36 
37  _logger->trace("Doing speed '{}' {} {} {} ...", _name, (void *)s1, (void *)s2,
38  timeout);
39 }
40 
41 std::string Ctp3SensorLTU::json(const std::string name) const {
45 
46  std::string json;
47  // start ROOT
48  json += "\"";
49  json += name;
50  json += "\" : {";
51 
52  // CUSTOM json data structure
53  json += "\"testData\" : 0";
54 
55  // end ROOT
56  json += "}";
57 
58  return json;
59 }
void speed(ObSensor *s1, ObSensor *s2, int timeout=1000) override
void init() override
virtual ~Ctp3SensorLTU()
Ctp3SensorLTU(std::string _name={"tmpl"})
void process() override
std::string json(const std::string name={}) const override