The base abstract class for devices (sensors and motors) with noise. More...

Inheritance diagram for NoisyDevice:

Public Member Functions

 NoisyDevice (ConfigurationParameters &params, QString prefix)
 Constructor and Configure.
 ~NoisyDevice ()
 Destructor.
void save (ConfigurationParameters &params, QString prefix)
 Save the parameters into the ConfigurationParameters.
- Public Member Functions inherited from ParameterSettableInConstructor
 ParameterSettableInConstructor (ConfigurationParameters &, QString)
void addObserver (RuntimeParameterObserver *obs)
getRuntimeParameter (QString paramName)
virtual ParameterSettableUIgetUIManager ()
 ParameterSettable ()
virtual void postConfigureInitialization ()
void removeObserver (RuntimeParameterObserver *obs)
void setRuntimeParameter (QString paramName, T newvalue)
QString typeName () const

Static Public Member Functions

static void describe (QString type)
 Describe all the parameter for configuring the Sensor.
- Static Public Member Functions inherited from ParameterSettableInConstructor
static QString fullParameterDescriptionPath (QString type, QString param)
static QString fullSubgroupDescriptionPath (QString type, QString sub)

Protected Member Functions

double applyNoise (double v, double minValue, double maxValue) const
 Adds noise to the value.
- Protected Member Functions inherited from ParameterSettableInConstructor
void notifyChangesToParam (QString paramName)

Additional Inherited Members

- Public Types inherited from ParameterSettableInConstructor
enum  Property
- Public Attributes inherited from ParameterSettableInConstructor
 AllowMultiple
 Default
 IsList
 IsMandatory
- Static Public Attributes inherited from ParameterSettableInConstructor
static const double Infinity
static const int MaxInteger
static const int MinInteger
- Static Protected Member Functions inherited from ParameterSettableInConstructor
static Descriptor addTypeDescription (QString type, QString shortHelp, QString longHelp=QString(""))
static void setGraphicalEditor (QString type)

Detailed Description

The base abstract class for devices (sensors and motors) with noise.

This class provides parameters and a function to add noise. You can add either uniform noise or gaussian noise in a range. The parameters regarding noise are:

  • noiseType: set to either NoNoise, Uniform or Gaussian to select the type of distribution of noise (respectively no noise, uniform noise in a range or gaussian noise)
  • noiseRange: the range of noise. For uniform noise this is the actual range, (the distribution has zero mean and goes from -noiseRange/2 to noiseRange/2). For gaussian noise, this is four times the standard deviation (the distribution has zero mean and noiseRange/4 standard deviation: this means that about 95% of the values taken from the distribution will be between -noiseRange/2 and noiseRange/2) To apply noise in the code you have to use the applyNoise() function. The function takes the value to which noise should be applied and the expected range of the value and returns the value with added noise.

Definition at line 113 of file neuroninterfaces.h.

Constructor & Destructor Documentation

NoisyDevice ( ConfigurationParameters params,
QString  prefix 
)

Constructor and Configure.

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

Definition at line 31 of file neuroninterfaces.cpp.

References ConfigurationHelper::getDouble(), ConfigurationHelper::getString(), ConfigurationParameters::getValue(), and ConfigurationHelper::throwUserConfigError().

Destructor.

Definition at line 66 of file neuroninterfaces.cpp.

Member Function Documentation

double applyNoise ( double  v,
double  minValue,
double  maxValue 
) const
protected
void describe ( QString  type)
static

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