FakeMotor adds a number of additional outputs that actually do not control any real motors but are useful to control or to modulate other neurons. More...

Public Member Functions | |
FakeMotor (ConfigurationParameters ¶ms, QString prefix) | |
Constructor and Configure. | |
~FakeMotor () | |
Destructor. | |
void | save (ConfigurationParameters ¶ms, QString prefix) |
Save the parameters of the FakeMotor into the ConfigurationParameters. | |
int | size () |
Return the number of neurons This correspond to the paramenter nMotors present into the ConfigurationParameters used for configuring the FakeMotor. | |
void | update () |
Update the state of the Motor every time step. | |
![]() | |
Motor (ConfigurationParameters ¶ms, QString prefix) | |
Constructor and Configure. | |
~Motor () | |
Destructor. | |
QString | name () |
Return the name of the Sensor. | |
void | save (ConfigurationParameters ¶ms, QString prefix) |
Save the parameters into the ConfigurationParameters. | |
void | setName (QString name) |
Use this method for changing the name of the Sensor. | |
![]() | |
ParameterSettableInConstructor (ConfigurationParameters &, QString) | |
void | addObserver (RuntimeParameterObserver *obs) |
T | getRuntimeParameter (QString paramName) |
virtual ParameterSettableUI * | getUIManager () |
ParameterSettable () | |
virtual void | postConfigureInitialization () |
void | removeObserver (RuntimeParameterObserver *obs) |
void | setRuntimeParameter (QString paramName, T newvalue) |
QString | typeName () const |
![]() | |
void | addObserver (RuntimeParameterObserver *obs) |
T | getRuntimeParameter (QString paramName) |
void | removeObserver (RuntimeParameterObserver *obs) |
void | setRuntimeParameter (QString paramName, T newvalue) |
QString | typeName () const |
![]() | |
void | addUsableResource (QString resource) |
void | addUsableResources (QStringList resources) |
void | declareResource (QString name, T *resource, QString lockBuddy="") |
void | deleteResource (QString name) |
T * | getResource (QString name, bool *resourceExists=NULL) |
bool | hasResource (QString name) const |
void | removeAllUsableResources () |
void | removeUsableResource (QString resource) |
void | removeUsableResources (QStringList resources) |
virtual void | shareResourcesWith (ResourcesUser *buddy) |
void | usableResources (QStringList resources) |
bool | usedResourcesExist (QStringList *nonExistingResources=NULL) const |
Static Public Member Functions | |
static void | describe (QString type) |
Describe all the parameter for configuring the FakeMotor. | |
![]() | |
static void | describe (QString type) |
Describe all the parameter for configuring the Motor. | |
![]() | |
static void | describe (QString type) |
static QString | fullParameterDescriptionPath (QString type, QString param) |
static QString | fullSubgroupDescriptionPath (QString type, QString sub) |
![]() | |
static void | describe (QString type) |
static QString | fullParameterDescriptionPath (QString type, QString param) |
static QString | fullSubgroupDescriptionPath (QString type, QString sub) |
Protected Member Functions | |
void | resourceChanged (QString resourceName, ResourceChangeType changeType) |
The function called when a resource used here is changed. | |
![]() | |
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. | |
![]() | |
void | notifyChangesToParam (QString paramName) |
![]() | |
void | notifyChangesToParam (QString paramName) |
![]() | |
T * | getResource () |
ResourcesUser & | operator= (const ResourcesUser &other) |
ResourcesUser () | |
ResourcesUser (const ResourcesUser &other) | |
![]() | |
ResourcesUser (const ResourcesUser &other) | |
virtual void | notifyResourceChange (ResourceHandler *resource, ResourceChangeType changeType)=0 |
ResourcesUser & | operator= (const ResourcesUser &other) |
Protected Attributes | |
int | nFakeMotors |
the number of neurons associated to FakeMotor | |
Additional Inherited Members | |
![]() | |
enum | Property |
![]() | |
typedef Resource::ResourceChangeType | ResourceChangeType |
![]() | |
AllowMultiple | |
Default | |
IsList | |
IsMandatory | |
![]() | |
static const double | Infinity |
static const int | MaxInteger |
static const int | MinInteger |
![]() | |
static Descriptor | addTypeDescription (QString type, QString shortHelp, QString longHelp=QString("")) |
Detailed Description
FakeMotor adds a number of additional outputs that actually do not control any real motors but are useful to control or to modulate other neurons.
Constructor & Destructor Documentation
FakeMotor | ( | ConfigurationParameters & | params, |
QString | prefix | ||
) |
Constructor and Configure.
- Parameters
-
params is the ConfigurationParameters containing the parameters prefix is the path prefix to the paramters for this Motor
Definition at line 34 of file motors.cpp.
References ConfigurationHelper::getInt(), FakeMotor::nFakeMotors, and ConcurrentResourcesUser::usableResources().
~FakeMotor | ( | ) |
Destructor.
Definition at line 43 of file motors.cpp.
Member Function Documentation
|
static |
Describe all the parameter for configuring the FakeMotor.
Definition at line 53 of file motors.cpp.
References ParameterSettableInConstructor::addTypeDescription(), ParameterSettable::IntDescriptor::def(), Motor::describe(), ParameterSettable::Descriptor::describeInt(), ParameterSettable::IntDescriptor::help(), ParameterSettableInConstructor::IsMandatory, ParameterSettable::IntDescriptor::limits(), and ParameterSettable::IntDescriptor::props().
|
protectedvirtual |
The function called when a resource used here is changed.
- Parameters
-
resourceName the name of the resource that has changed. chageType the type of change the resource has gone through (whether it was created, modified or deleted)
Reimplemented from ConcurrentResourcesUser.
Definition at line 68 of file motors.cpp.
References Logger::info(), Motor::name(), NeuronsIterator::nextNeuron(), FakeMotor::nFakeMotors, Motor::resetNeededResourcesCheck(), NeuronsIterator::setCurrentBlock(), and NeuronsIterator::setGraphicProperties().
|
virtual |
Save the parameters of the FakeMotor into the ConfigurationParameters.
- Parameters
-
params is the ConfigurationParameters where save the parameters prefix is the path prefix for the parameters to save
Implements ParameterSettableInConstructor.
Definition at line 47 of file motors.cpp.
References ConfigurationParameters::createParameter(), FakeMotor::nFakeMotors, Motor::save(), and ConfigurationParameters::startObjectParameters().
|
virtual |
Return the number of neurons This correspond to the paramenter nMotors present into the ConfigurationParameters used for configuring the FakeMotor.
Implements Motor.
Definition at line 64 of file motors.cpp.
References FakeMotor::nFakeMotors.
|
virtual |
Update the state of the Motor every time step.
Implements Motor.
Definition at line 59 of file motors.cpp.
References Motor::checkAllNeededResourcesExist().
Member Data Documentation
|
protected |
the number of neurons associated to FakeMotor
Definition at line 69 of file motors.h.
Referenced by FakeMotor::FakeMotor(), FakeMotor::resourceChanged(), FakeMotor::save(), and FakeMotor::size().
The documentation for this class was generated from the following files:
- experiments/include/motors.h
- experiments/src/motors.cpp