Public Member Functions | |
SerialSensor (const int id, const std::string name, const std::string description, SerialRW &serialRW, const std::string valuesString, std::mutex &mutex) | |
SerialSensor (const SerialSensor &)=delete | |
SerialSensor (SerialSensor &&)=delete | |
SerialSensor & | operator= (const SerialSensor &)=delete |
SerialSensor & | operator= (SerialSensor &&)=delete |
virtual std::map< std::string, Value * > | Sense_impl (const std::vector< std::string > &names) override |
Returns the updated requested values. More... | |
![]() | |
Sensor (const std::string name, const std::string description) | |
Sensor (const Sensor &)=delete | |
Sensor (Sensor &&)=delete | |
Sensor & | operator= (const Sensor &)=delete |
Sensor & | operator= (Sensor &&)=delete |
virtual std::map< std::string, Value * > | SenseAll () |
virtual std::vector< std::string > | getAvailableValues () |
virtual bool | haveValue (std::string name) |
virtual bool | haveValues (std::vector< std::string >) |
virtual Value & | peekValue (std::string name) |
virtual std::map< std::string, Value * > | peekValues (const std::vector< std::string > &names) |
virtual void | onSense (const std::vector< std::string > &names) |
Value & | Sense (const std::string &name) |
std::map< std::string, Value * > | Sense (const std::vector< std::string > &names) |
Value & | operator[] (const std::string &name) |
std::map< std::string, Value * > | operator[] (const std::vector< std::string > &names) |
virtual std::string | ToString () override |
void | clearLoggerCallback () |
void | setLoggerCallback (std::function< void(Sensor *, std::map< std::string, Value * > &)> cbfn) |
![]() | |
Device (const std::string name, const std::string description) | |
virtual const std::string & | getName () const |
virtual const std::string & | getDescription () const |
![]() | |
int | getId () const |
Protected Member Functions | |
void | _ProcessValuesString (const std::string &s) |
![]() | |
void | registerValue (Value *val) |
void | registerValues (std::vector< Value * > vals) |
![]() | |
SerialDevice (const int id) | |
Protected Attributes | |
SerialRW & | _serial |
std::mutex & | _serialMutex |
![]() | |
std::function< void(Sensor *, std::map< std::string, Value * > &)> | _loggerCallback |
std::map< std::string, Value * > | _valueList |
![]() | |
const std::string | _name |
const std::string | _description |
![]() | |
const int | _id |
|
overridevirtual |
Returns the updated requested values.
Duplicate names will be ignored If a given value name is invalid, ErrorValue will be returned for that name If the serial communication failed the old values will be returned
Reimplemented from twirre::Sensor.