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 std::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
canopen::MotorBase::Profiled_Torque
@ Profiled_Torque
Definition: base.h:19
canopen::MotorBase::MotorBaseSharedPtr
std::shared_ptr< MotorBase > MotorBaseSharedPtr
Definition: base.h:33
canopen::MotorBase::isModeSupported
virtual bool isModeSupported(uint16_t mode)=0
canopen::MotorBaseSharedPtr
MotorBase::MotorBaseSharedPtr MotorBaseSharedPtr
Definition: base.h:41
canopen::MotorBase::No_Mode
@ No_Mode
Definition: base.h:15
canopen::MotorBase::Allocator
Definition: base.h:35
canopen.h
canopen::MotorBase::registerDefaultModes
virtual void registerDefaultModes(ObjectStorageSharedPtr storage)
Definition: base.h:31
canopen::MotorBase::Velocity
@ Velocity
Definition: base.h:17
canopen::MotorBase::Homing
@ Homing
Definition: base.h:21
canopen::MotorBase::Reserved
@ Reserved
Definition: base.h:20
canopen::MotorBase::Cyclic_Synchronous_Position
@ Cyclic_Synchronous_Position
Definition: base.h:23
canopen::MotorBase
Definition: base.h:9
canopen::MotorBase::Cyclic_Synchronous_Torque
@ Cyclic_Synchronous_Torque
Definition: base.h:25
canopen::MotorBase::Cyclic_Synchronous_Velocity
@ Cyclic_Synchronous_Velocity
Definition: base.h:24
canopen::MotorBase::Allocator::~Allocator
virtual ~Allocator()
Definition: base.h:38
canopen
canopen::MotorBase::getMode
virtual uint16_t getMode()=0
canopen::MotorBase::OperationMode
OperationMode
Definition: base.h:13
canopen::MotorBase::Interpolated_Position
@ Interpolated_Position
Definition: base.h:22
canopen::MotorBase::Profiled_Position
@ Profiled_Position
Definition: base.h:16
canopen::MotorBase::enterModeAndWait
virtual bool enterModeAndWait(uint16_t mode)=0
canopen::MotorBase::MotorBase
MotorBase(const std::string &name)
Definition: base.h:11
canopen::MotorBase::Profiled_Velocity
@ Profiled_Velocity
Definition: base.h:18
canopen::MotorBase::Allocator::allocate
virtual MotorBaseSharedPtr allocate(const std::string &name, ObjectStorageSharedPtr storage, const canopen::Settings &settings)=0
canopen::Layer::name
const std::string name
canopen::Layer
canopen::MotorBase::setTarget
virtual bool setTarget(double val)=0
canopen::ObjectStorageSharedPtr
ObjectStorage::ObjectStorageSharedPtr ObjectStorageSharedPtr


canopen_402
Author(s): Thiago de Freitas , Mathias Lüdtke
autogenerated on Wed Mar 2 2022 00:52:28