00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef __XYPLATFORM_AXIS_SIMULATION__
00029 #define __XYPLATFORM_AXIS_SIMULATION__
00030
00031 #include "xyPlatformConstants.hpp"
00032 #include <device_drivers/SimulationAxis.hpp>
00033 #include <device_interface/AxisInterface.hpp>
00034 #include <execution/TemplateFactories.hpp>
00035 #include <execution/TaskContext.hpp>
00036
00037 namespace ORO_DeviceDriver
00038 {
00039
00040 class xyPlatformAxisSimulation
00041 {
00042 public:
00043 xyPlatformAxisSimulation();
00044 ~xyPlatformAxisSimulation();
00045
00046 std::vector<ORO_DeviceInterface::AxisInterface*> getAxes();
00047 void unlock(int axis);
00048 void lock(int axis);
00049 void stop(int axis);
00050 double getDriveValue(int axis);
00051 void addOffset(const std::vector<double>& offset);
00052 bool getReference(int axis);
00053 void writePosition(int axis, double q);
00054 bool prepareForUse(){return true;};
00055 bool prepareForShutdown(){return true;};
00056 ORO_Execution::TaskContext* getTaskContext();
00057
00058 private:
00059 std::vector<ORO_DeviceDriver::SimulationAxis*> _axes;
00060 std::vector<ORO_DeviceInterface::AxisInterface*> _axesInterface;
00061 std::vector<bool> _reference;
00062
00063 ORO_Execution::TaskContext _my_task_context;
00064 ORO_Execution::TemplateMethodFactory<xyPlatformAxisSimulation>* _my_factory;
00065 };
00066
00067 }
00068
00069 #endif // XYPLATFORM_AXIS_SIMULATION_HPP