25 Sensor(
const std::string name,
const std::string description);
42 virtual std::map<std::string, Value*> SenseAll();
44 virtual std::vector<std::string> getAvailableValues();
45 virtual bool haveValue(std::string name);
46 virtual bool haveValues(std::vector<std::string>);
48 virtual Value & peekValue(std::string name);
49 virtual std::map<std::string, Value*> peekValues(
const std::vector<std::string> &names);
52 virtual std::map<std::string, Value*> Sense_impl(
const std::vector<std::string> &names);
54 virtual void onSense(
const std::vector<std::string> &names);
55 Value & Sense(
const std::string &name);
56 std::map<std::string, Value*> Sense(
const std::vector<std::string> &names);
58 Value & operator[](
const std::string &name);
59 std::map<std::string, Value*> operator[](
const std::vector<std::string> &names);
61 virtual std::string ToString()
override;
63 void clearLoggerCallback();
64 void setLoggerCallback(std::function<
void(
Sensor *, std::map<std::string, Value*>&)> cbfn);
66 std::function<void(Sensor *, std::map<std::string, Value*>&)> _loggerCallback;
67 std::map<std::string, Value*> _valueList;
68 void registerValue(
Value* val);
69 void registerValues(std::vector<Value *> vals);