24 #include "MAContainerLocker.hpp" 25 #include "MACoreTypes.hpp" 27 #include "MASignal.hpp" 29 #include <boost/shared_ptr.hpp> 49 InterpolationSampling,
64 MADevice(
const std::string& name,
const std::string& display_name,
bool motor =
false);
67 static MA::DeviceList& GetDevices();
68 static MA::DeviceList& GetMotors();
69 static std::string GetMotorDisplayName(
const std::string& motor_name);
70 void BlockExpiredContainerSignal();
71 void UnblockJustExpiredSignal();
72 bool IsJustExpiredSignalBlocked()
const;
74 virtual void SetPower(
bool new_state);
75 bool IsPowerOn()
const;
76 void SetInMotion(
bool new_state);
77 bool IsInMotion()
const;
78 virtual bool IsOverloaded()
const;
79 float GetForce()
const;
82 const std::string& GetName()
const;
83 const std::string& GetDisplayName()
const;
90 void ClearGenerators();
91 void StartGenerators();
92 virtual bool RunGenerators();
94 float GetBlendedValue();
96 virtual void SetNextValue(
float new_value);
97 void SetSoftLimit(
float new_limit);
99 void ResetSoftLimit();
101 void ScaleGenerators(
float min,
float max,
float new_max);
103 void SetMinMaxValues(
float min,
float max);
105 bool HasGenerator()
const;
106 bool HasRealGenerator()
const;
107 void DumpGenerators()
const;
108 float GetNextValue()
const;
109 float GetMinValue()
const;
110 float GetMaxValue()
const;
111 float GetValueChange()
const;
112 bool HasSensorValue()
const;
113 float GetSensorValue()
const;
114 void SetRealSensorValue(
float new_value);
115 float GetRealSensorValue()
const;
116 void SetRealSensorValues(
const MC::FloatList& values);
117 const MC::FloatList& GetRealSensorValues()
const;
119 void SetSamplingMode(MA::SamplingType sampling_mode,
int param = 0);
120 MA::SamplingType GetSamplingMode()
const;
154 float RealSensorValue;
159 float PreviousRealSensorValue;
float SoftLimit
Optional soft limit for the device value.
int LastGeneratedValueTimestamp
Timestamp of the last generated value.
std::string DisplayName
Device display name.
float Force
Motor force value.
float LastGeneratedValue
The stored last generated value.
bool InMotion
Whenever the motor is in motion.
int SamplingCounter
A counter for sampling.
MA::GeneratorContainerList GeneratorContainers
Value generator containers.
float OverLoadLimitInIdle
Overload limit when in idle state.
Base class for the controllers.
float OverLoadLimitWhenMoving
Overload limit when moving.
bool PowerOn
Whenever switched on/off.
MA::SamplingType SamplingMode
Sampling mode.
MASignal< MADevice & > DeviceValueChangeSignalType
Device value change signal type.
MANum< float > NextValue
Next device value.
MC::FloatList RealSensorValues
High granularity sensor values.
Generator container class.
float SamplingDelta
Sampling delta to generate new values.
std::string Name
Device name.
MAController * Controller
The controller where the motor belongs to.
int SamplingInterval
Defines the sampling interval for the sensor device if needed.
#define MA_CONTAINER_LOCK_ID_VARIABLE(_container)
Declaring a variable ID for a container.
Base class for generators.
boost::shared_ptr< DeviceValueChangeSignalType > DeviceValueChangeSignal
Device value change signal.
bool Motor
Whenever it is a motor.