The base abstract class for the Motor hierarchy. More...

Inheritance diagram for Motor:

List of all members.

Public Member Functions

 Motor (ConfigurationParameters &params, QString prefix)
 Constructor and Configure.
 ~Motor ()
 Destructor.
QString name ()
 Return the name of the Sensor.
void save (ConfigurationParameters &params, QString prefix)
 Save the parameters into the ConfigurationParameters.
void setName (QString name)
 Use this method for changing the name of the Sensor.
virtual int size ()=0
 Return the number of neurons from which the Motor will get the output.
virtual void update ()=0
 Update the state of the Motor every time step; the actual behaviour is implemented in subclasses.

Static Public Member Functions

static void describe (QString type)
 Describe all the parameter for configuring the Motor.

Protected Member Functions

void checkAllNeededResourcesExist ()
 Checks whether all resources we need are existing and throws an exception if they aren't.
void resetNeededResourcesCheck ()
 Resets the check on needed resources so that the next call to checkAllNeededResourcesExist() will perform the full check and not the quick one.

Detailed Description

The base abstract class for the Motor hierarchy.

A Motor is an object that read data from the neural network and put that data into a resource converting it into the appropriate way In child class implement also the resourceChanged() function to get notified of resources creation/modification

Definition at line 152 of file neuroninterfaces.h.


Constructor & Destructor Documentation

Motor ( ConfigurationParameters params,
QString  prefix 
)

Constructor and Configure.

Parameters:
paramsis the ConfigurationParameters containing the parameters
prefixis the path prefix to the paramters for this Motor

Definition at line 82 of file neuroninterfaces.cpp.

References ConfigurationHelper::getString(), and Motor::setName().

~Motor ( )

Destructor.

Definition at line 89 of file neuroninterfaces.cpp.


Member Function Documentation

void resetNeededResourcesCheck ( ) [protected]

Resets the check on needed resources so that the next call to checkAllNeededResourcesExist() will perform the full check and not the quick one.

Call this if you get notified that a resource has been deleted so that we can check if it is available again when you need it

Definition at line 129 of file neuroninterfaces.cpp.

Referenced by FakeMotor::resourceChanged(), MarXbotMotor::resourceChanged(), and iCubMotor::resourceChanged().

void setName ( QString  name)

Use this method for changing the name of the Sensor.

Definition at line 110 of file neuroninterfaces.cpp.

References Motor::name().

Referenced by EvoRobotExperiment::configure(), and Motor::Motor().

virtual int size ( ) [pure virtual]

Return the number of neurons from which the Motor will get the output.

Warning:
this method has to be called in any situation; when re-implement it does not rely on conditions/variables available only after the initilization because this method might be called before the Motor initialization

Implemented in iCubArmRandomMotor, iCubArmPosToPostureMotor, iCubTorsoPosToPostureMotor, iCubArmMusclesMotor, iCubHandMusclesMotor, iCubTorsoMusclesMotor, iCubHeadMusclesMotor, iCubArmPosToVelMotor, iCubTorsoPosToVelMotor, iCubHeadPosToVelMotor, iCubHandPosToVelMotor, iCubConfigurableHandPosToVelMotor, iCubHeadVelocityMotor, iCubArmVelocityMotor, iCubTorsoVelocityMotor, MarXbotWheelVelocityMotor, and FakeMotor.

Referenced by EvoRobotExperiment::recreateNeuralNetwork().


The documentation for this class was generated from the following files: