base.h
Go to the documentation of this file.
1 #ifndef CANOPEN_402_BASE_H
2 #define CANOPEN_402_BASE_H
3 
5 
6 namespace canopen
7 {
8 
9 class MotorBase : public canopen::Layer {
10 protected:
11  MotorBase(const std::string &name) : Layer(name) {}
12 public:
14  {
15  No_Mode = 0,
17  Velocity = 2,
20  Reserved = 5,
21  Homing = 6,
26  };
27  virtual bool setTarget(double val) = 0;
28  virtual bool enterModeAndWait(uint16_t mode) = 0;
29  virtual bool isModeSupported(uint16_t mode) = 0;
30  virtual uint16_t getMode() = 0;
32 
33  typedef boost::shared_ptr<MotorBase> MotorBaseSharedPtr;
34 
35  class Allocator {
36  public:
37  virtual MotorBaseSharedPtr allocate(const std::string &name, ObjectStorageSharedPtr storage, const canopen::Settings &settings) = 0;
38  virtual ~Allocator() {}
39  };
40 };
42 
43 }
44 
45 #endif
boost::shared_ptr< MotorBase > MotorBaseSharedPtr
Definition: base.h:33
virtual MotorBaseSharedPtr allocate(const std::string &name, ObjectStorageSharedPtr storage, const canopen::Settings &settings)=0
virtual bool enterModeAndWait(uint16_t mode)=0
MotorBase(const std::string &name)
Definition: base.h:11
const std::string name
virtual bool isModeSupported(uint16_t mode)=0
virtual uint16_t getMode()=0
virtual void registerDefaultModes(ObjectStorageSharedPtr storage)
Definition: base.h:31
ObjectStorage::ObjectStorageSharedPtr ObjectStorageSharedPtr
virtual bool setTarget(double val)=0


canopen_402
Author(s): Thiago de Freitas , Mathias Lüdtke
autogenerated on Fri May 14 2021 02:59:42