![]() |
NimbRo ROS Soccer Package
|
Implements a single actuator. More...
#include <behaviour_actuators.h>
Public Member Functions | |
ActuatorBase (ActuatorManager *AMBase, const std::string &signalName=nullString) | |
Default constructor. More... | |
virtual | ~ActuatorBase () |
ActuatorBase object destructor. | |
virtual const std::type_info * | getTypeInfo () const =0 |
Update callback for the ActuatorBase object. Refer to the default override defined in Actuator::update() . More... | |
virtual bool | isCompatibleWith (const SensorBase *SBase) const =0 |
Abstract callback that should evaluate whether the current actuator is compatible the sensor SBase (can be bound to it). Refer to the default override Actuator::isCompatibleWith() . | |
std::string | getUniqueName (const ActuatorManager *AMBase) const |
Returns a unique actuator name. More... | |
ActuatorBase * | getBasePtr () |
Return a pointer to the underlying ActuatorBase object in the case of a derived actuator class. | |
Public Attributes | |
BehaviourManager *const | MBase |
Pointer to the parent behaviour manager. | |
BehaviourLayer *const | LBase |
Pointer to the parent behaviour layer. | |
ActuatorManager *const | AMBase |
Pointer to the parent actuator manager. | |
const std::string | signalName |
The name of the actuator, used as the lookup key for the BehaviourManager::findActuator() function. | |
Static Public Attributes | |
static const std::string | DEF_ACTUATOR_SIGNAL_NAME = "Actuator" |
Default actuator signal name used to generate a unique one, in the case that no name is provided by a derived actuator class. | |
Friends | |
class | ActuatorManager |
Implements a single actuator.
This class is the base class of all actuators that are used in an ActuatorManager.
|
explicit |
Default constructor.
Note that although the default value for the signalName
parameter is nullString
, this will not actually become the actuator's name if the parameter is omitted. This is just used to signal to the class's internals that it should generate a default name using the getUniqueName()
function. AMBase
must never be null or a segmentation fault will result!
AMBase | A pointer to the actuator manager that the actuator belongs to. |
signalName | The unique human-friendly name to give the actuator (null means auto-generate). This name is used by the sensor classes to look up and bind to the correct actuators. The name can be completely arbitrary, with the only restriction being that it can't be the null string, but recommended sample names include "ThisLayer/ActuatorName" and "Layer1/TargetX" , where ThisLayer and Layer1 are sample names of layers that own the actuators being constructed, and ActuatorName and TargetX are sample actuator-specific names. |
|
pure virtual |
Update callback for the ActuatorBase object. Refer to the default override defined in Actuator::update()
.
Abstract callback that should be overridden to return the type information of the actuator (i.e. a std::type_info
object). Refer to the default override Actuator::getTypeInfo()
.
Implemented in behaviourcontrol::Actuator< T >, behaviourcontrol::Actuator< long >, behaviourcontrol::Actuator< unsigned long >, behaviourcontrol::Actuator< double >, behaviourcontrol::Actuator< float >, behaviourcontrol::Actuator< int >, and behaviourcontrol::Actuator< bool >.
std::string ActuatorBase::getUniqueName | ( | const ActuatorManager * | AMBase | ) | const |
Returns a unique actuator name.
Automatically construct a unique name for the actuator, for situations where none is provided by the derived class. The name that results of this function will be unique as long as the user does not explicitly use the same name somewhere else, either before or after the construction of this actuator. If there are currently seven actuators in the AMBase
actuator manager, the generated name will be the concatenation of DEF_ACTUATOR_SIGNAL_NAME and "7".
AMBase | A non-null pointer to the parent actuator manager. |