Public Member Functions | |
SerialActuator (const uint8_t id, const std::string name, const std::string description, SerialRW &serialRW, const std::string parametersString, std::mutex &mutex) | |
SerialActuator (const SerialActuator &)=delete | |
SerialActuator (SerialActuator &&)=delete | |
SerialActuator & | operator= (const SerialActuator &)=delete |
SerialActuator & | operator= (SerialActuator &&)=delete |
virtual void | ActuateImpl () override |
Update this Actuator using the modified parameters. More... | |
![]() | |
Actuator (const std::string name, const std::string description) | |
Create an actuator. More... | |
Actuator (const Actuator &)=delete | |
Actuator (Actuator &&)=delete | |
Actuator & | operator= (const Actuator &)=delete |
Actuator & | operator= (Actuator &&)=delete |
std::vector< std::string > | getAvailableParameters () |
Get the names of all available parameters. More... | |
bool | haveParameter (std::string name) |
Check if a parameter exists. More... | |
bool | haveParameters (std::vector< std::string > names) |
Check if multiple parameters exist. More... | |
virtual Parameter & | GetParameter (const std::string &name) |
Get a parameter by name. More... | |
virtual Parameter & | operator[] (const std::string &name) |
this forwards to GetParameter(name) More... | |
virtual std::map< std::string, Parameter * > | GetParameters (const std::vector< std::string > &names) |
Get multiple parameters by name. More... | |
void | Actuate () |
Apply the updated parameters. More... | |
void | clearActuateLoggerCallback () |
void | setActuateLoggerCallback (std::function< void(Actuator *, std::map< std::string, Parameter * > &)> cbfn) |
![]() | |
Device (const std::string name, const std::string description) | |
virtual const std::string & | getName () const |
virtual const std::string & | getDescription () const |
virtual std::string | ToString (void) |
![]() | |
int | getId () const |
Protected Member Functions | |
void | _ProcessParametersString (const std::string &s) |
![]() | |
void | registerParameter (Parameter *val) |
void | registerParameters (std::vector< Parameter * > parms) |
void | logActuation () |
![]() | |
SerialDevice (const int id) | |
Protected Attributes | |
SerialRW & | _serial |
std::mutex & | _serialMutex |
![]() | |
std::map< std::string, Parameter * > | _parametersList |
owned_mutex | _actuateMutex |
std::function< void(Actuator *, std::map< std::string, Parameter * > &)> | _actuateLoggerCallback |
bool | _actuateLoggerSet |
![]() | |
const std::string | _name |
const std::string | _description |
![]() | |
const int | _id |
|
overridevirtual |
Update this Actuator using the modified parameters.
This function must be implemented by a derived class. It will be called inside of the Actuate() function.
Implements twirre::Actuator.