base.h
Go to the documentation of this file.
00001 #ifndef CANOPEN_402_BASE_H
00002 #define CANOPEN_402_BASE_H
00003 
00004 #include <canopen_master/canopen.h>
00005 
00006 namespace canopen
00007 {
00008 
00009 class MotorBase : public canopen::Layer {
00010 protected:
00011     MotorBase(const std::string &name) : Layer(name) {}
00012 public:
00013     enum OperationMode
00014     {
00015         No_Mode = 0,
00016         Profiled_Position = 1,
00017         Velocity = 2,
00018         Profiled_Velocity = 3,
00019         Profiled_Torque = 4,
00020         Reserved = 5,
00021         Homing = 6,
00022         Interpolated_Position = 7,
00023         Cyclic_Synchronous_Position = 8,
00024         Cyclic_Synchronous_Velocity = 9,
00025         Cyclic_Synchronous_Torque = 10,
00026     };
00027     virtual bool setTarget(double val) = 0;
00028     virtual bool enterModeAndWait(uint16_t mode) = 0;
00029     virtual bool isModeSupported(uint16_t mode) = 0;
00030     virtual uint16_t getMode() = 0;
00031     virtual void registerDefaultModes(boost::shared_ptr<ObjectStorage> storage) {}
00032 
00033     class Allocator {
00034     public:
00035         virtual boost::shared_ptr<MotorBase> allocate(const std::string &name, boost::shared_ptr<ObjectStorage> storage, const canopen::Settings &settings) = 0;
00036         virtual ~Allocator() {}
00037     };
00038 };
00039 
00040 }
00041 
00042 #endif


canopen_402
Author(s): Thiago de Freitas , Mathias Lüdtke
autogenerated on Sun Sep 3 2017 03:10:49