Skip to content
Snippets Groups Projects
Commit 63ef488c authored by Raphael Grimm's avatar Raphael Grimm
Browse files

Add doxygen

parent b44f852c
No related branches found
No related tags found
No related merge requests found
......@@ -96,11 +96,16 @@ namespace armarx
* @brief runs the active Joint Controller and write the target values into the control device
* @param sensorValuesTimestamp
* @param timeSinceLastIteration
* @see writeTargetValues()
* @see writeTargetValues
*/
void rtRun(const IceUtil::Time& sensorValuesTimestamp, const IceUtil::Time& timeSinceLastIteration);
virtual void rtWriteTargetValues(const IceUtil::Time& sensorValuesTimestamp, const IceUtil::Time& timeSinceLastIteration);
/**
* @brief This is a hook for implementations to write the setpoints to a bus.
* @param sensorValuesTimestamp The timestamp of the current \ref SensorValueBase "SensorValues"
* @param timeSinceLastIteration The time delta between the last two updates of \ref SensorValueBase "SensorValues"
*/
virtual void rtWriteTargetValues(const IceUtil::Time& sensorValuesTimestamp, const IceUtil::Time& timeSinceLastIteration) {}
protected:
/**
* @brief adds the Joint controller to this ControlDevice
......@@ -110,10 +115,15 @@ namespace armarx
void addJointController(JointController* jointCtrl);
private:
friend class RobotUnitModule::Devices;
/// @brief The owning \ref RobotUnit. (is set when this \ref SensorDevice is added to the \ref RobotUnit)
std::atomic<RobotUnitModule::Devices*> owner;
/// @brief The \ref JointController "JointControllers" managed by this \ref ControlDevice
KeyValueVector<std::string, JointController*> jointControllers;
/// @brief The currently executed \ref JointController
JointController* activeJointController {nullptr};
/// @brief This \ref ControlDevice "ControlDevice's" emergency stop controller
JointController* jointEmergencyStopController {nullptr};
/// @brief This \ref ControlDevice "ControlDevice's" stop movement controller
JointController* jointStopMovementController {nullptr};
};
}
......@@ -175,7 +185,5 @@ namespace armarx
{
return jointControllers.keys();
}
inline void ControlDevice::rtWriteTargetValues(const IceUtil::Time& sensorValuesTimestamp, const IceUtil::Time& timeSinceLastIteration) {}
}
......@@ -40,6 +40,20 @@ namespace armarx
using namespace DeviceTags;
}
/**
* @brief This class represents some part of the robot providing sensor values.
*
* The \ref SensorValueBase "SensorValue" is accessed via \ref getSensorValue.
*
* A \ref SensorDevice could also represent a virtual sensor reporting some status of the software
* (e.g. Timings):
* Examples for \ref SensorValueBase "Sensorvalues" are:
* \li Position, Velocity, Torque, Current, Temperature of an actuator
* \li Forces and Torques of an Force-Torque-Sensor
* \li Timings of the \ref ControlThread
* \li Level of a battery power supply
* \li 3d Velocity of a mobile Platform
*/
class SensorDevice: public virtual DeviceBase
{
public:
......@@ -51,16 +65,28 @@ namespace armarx
/// @return The SensorDevice's sensor value
virtual const SensorValueBase* getSensorValue() const = 0;
/**
* @brief Returns the \ref SensorValueBase "SensorValue's" type as a string.
* @param withoutNamespaceSpecifier Whether namespace specifiers should be removed from the name.
* @return The \ref SensorValueBase "SensorValues" type as a string.
* @see getSensorValue
*/
std::string getSensorValueType(bool withoutNamespaceSpecifier = false) const;
/// @return The reporting frame name of this sensor (e.g. The frame some force torque values are in).
/// This may be empty for virtual sensors e.g. execution time sensors.
virtual std::string getReportingFrame() const;
virtual void rtReadSensorValues(const IceUtil::Time& sensorValuesTimestamp, const IceUtil::Time& timeSinceLastIteration);
/**
* @brief This is a hook for implementations to read the sensor value from a bus.
* @param sensorValuesTimestamp The current timestamp
* @param timeSinceLastIteration The time delta since the last call
*/
virtual void rtReadSensorValues(const IceUtil::Time& sensorValuesTimestamp, const IceUtil::Time& timeSinceLastIteration) {}
private:
friend class RobotUnitModule::Devices;
/// @brief The owning \ref RobotUnit. (is set when this \ref SensorDevice is added to the \ref RobotUnit)
std::atomic<RobotUnitModule::Devices*> owner;
};
......@@ -90,8 +116,6 @@ namespace armarx
return {};
}
inline void SensorDevice::rtReadSensorValues(const IceUtil::Time& sensorValuesTimestamp, const IceUtil::Time& timeSinceLastIteration) {}
template<class SensorValueType>
inline const SensorValueType* SensorDeviceTemplate<SensorValueType>::getSensorValue() const
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment