Robot Simulator of the Robotics Group for Self-Organization of Control: Motor Class Reference

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages
- Examples

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Motor Class Reference

Abstact base class for attachable motors. More...

`#include <motor.h>`

Inherited by DummyMotor, and Speaker.

Inheritance diagram for Motor:

[legend]
List of all members.

## Public Member Functions
| Motor ()
virtual | ~Motor ()
virtual void | init (Primitive *own)=0
| initialises motor with body of robot
virtual int | getMotorNumber () const =0
| return the dimensionality of this motor
virtual bool | act (GlobalData &globaldata)=0
| performs the actions, This is usually called in doInternalStuff() from the robot
virtual int | set (const motor *values, int length)=0
| sends the action commands to the motor.

## Detailed Description

Abstact base class for attachable motors.

## Constructor & Destructor Documentation

Motor | ( |  | ) | `[inline]`

virtual ~Motor | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

virtual bool act | ( | GlobalData & | globaldata | ) | `[pure virtual]`

performs the actions, This is usually called in doInternalStuff() from the robot

Implemented in DummyMotor, and Speaker.

virtual int getMotorNumber | ( |  | ) | const`[pure virtual]`

return the dimensionality of this motor

Implemented in DummyMotor, and Speaker.

virtual void init | ( | Primitive * | own | ) | `[pure virtual]`

initialises motor with body of robot

Implemented in DummyMotor, and Speaker.

virtual int set | ( | const motor * | values,
|  | int | length |
| ) |  |  | `[pure virtual]`

sends the action commands to the motor.

It returns the number of used values. (should be equal to getMotorNumber)

Implemented in DummyMotor, and Speaker.

The documentation for this class was generated from the following file:

- motor.h