Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# MotorCommandsSender Class Reference

This class implements a sender for motor commands. More...

`#include <MotorCommandsSender.h>`

Inheritance diagram for MotorCommandsSender:

[legend]
Collaboration diagram for MotorCommandsSender:

[legend]
List of all members.

## Public Member Functions
| MotorCommandsSender (PlatformProcess *process, bool blocking)
| The constructor.
| ~MotorCommandsSender ()
| Destructor.
## Protected Member Functions
virtual void | preparePackage ()
| The function prepares a package.
virtual void | setPackage (const ObserverID &receiver)
| The functions sets a package for a receiver.
virtual void | freePackage ()
| The function frees the package.
## Static Private Member Functions
const char * | getPrimitiveJointName (int i)
| Returns OPENR Primitive Joint Name.
const char * | getPrimitiveLEDName (int i)
| Return OPENR Primitive LED Name.
## Private Attributes
OPrimitiveID | jointId [JointData::numOfJoint]
| The Open-R IDs of all joints.
bool | jointGainsSet
| A flag that states whether the joint gains were initialized.
MemoryRegionID | memID
| The memory region of the only package instance.
OCommandVectorData * | cmdVec
| A pointer to the data in the package.
RCRegion * | package
| The only instance of a package.
PIDData | lastPidData
| The last joint gains sent.
int | numOfLED
| The number of LEDs of the robot.

## Detailed Description

This class implements a sender for motor commands.

Definition at line 19 of file MotorCommandsSender.h.

## Constructor & Destructor Documentation

MotorCommandsSender::MotorCommandsSender | ( | PlatformProcess * | process,
|  | bool | blocking
| ) |

  | The constructor. Parameters:
  process | The process this sender is associated with.
  blocking | Decides whether this sender blocks the execution of the next frame until all connected receivers have requested a new package.
Definition at line 9 of file MotorCommandsSender.cpp. References cmdVec, getPrimitiveJointName(), getPrimitiveLEDName(), SystemCall::getRobotDesign(), jointId, memID, numOfLED, and VERIFY.

Here is the call graph for this function:

MotorCommandsSender::~MotorCommandsSender | ( |  | ) |

| Destructor. Definition at line 57 of file MotorCommandsSender.cpp. References memID, and VERIFY.

## Member Function Documentation

const char* MotorCommandsSender::getPrimitiveJointName | ( | int | i | ) | `[inline, static, private]`

| Returns OPENR Primitive Joint Name. Definition at line 33 of file MotorCommandsSender.h. References SystemCall::getRobotDesign(). Referenced by MotorCommandsSender().

Here is the call graph for this function:

const char* MotorCommandsSender::getPrimitiveLEDName | ( | int | i | ) | `[inline, static, private]`

| Return OPENR Primitive LED Name. Definition at line 91 of file MotorCommandsSender.h. References SystemCall::getRobotDesign(). Referenced by MotorCommandsSender().

Here is the call graph for this function:

void MotorCommandsSender::preparePackage | ( |  | ) | `[protected, virtual]`

| The function prepares a package. Reimplemented from SenderBase< MotorCommands >. Definition at line 62 of file MotorCommandsSender.cpp. References SystemCall::getRobotDesign(), and package.

Here is the call graph for this function:

void MotorCommandsSender::setPackage | ( | const ObserverID & | receiver | ) | `[protected, virtual]`

  | The functions sets a package for a receiver. Parameters:
  receiver | The receive the package will be sent to.
Reimplemented from SenderBase< MotorCommands >. Definition at line 164 of file MotorCommandsSender.cpp. References package, and VERIFY.

void MotorCommandsSender::freePackage | ( |  | ) | `[protected, virtual]`

| The function frees the package. Reimplemented from SenderBase< MotorCommands >. Definition at line 169 of file MotorCommandsSender.cpp.

## Member Data Documentation

OPrimitiveID MotorCommandsSender::jointId[JointData::numOfJoint]`[private]`

| The Open-R IDs of all joints. Definition at line 22 of file MotorCommandsSender.h. Referenced by MotorCommandsSender().

bool MotorCommandsSender::jointGainsSet`[private]`

| A flag that states whether the joint gains were initialized. Definition at line 23 of file MotorCommandsSender.h.

MemoryRegionID MotorCommandsSender::memID`[private]`

| The memory region of the only package instance. Definition at line 24 of file MotorCommandsSender.h. Referenced by MotorCommandsSender(), and ~MotorCommandsSender().

OCommandVectorData* MotorCommandsSender::cmdVec`[private]`

| A pointer to the data in the package. Definition at line 25 of file MotorCommandsSender.h. Referenced by MotorCommandsSender().

RCRegion* MotorCommandsSender::package`[private]`

| The only instance of a package. Definition at line 26 of file MotorCommandsSender.h. Referenced by preparePackage(), and setPackage().

PIDData MotorCommandsSender::lastPidData`[private]`

| The last joint gains sent. Definition at line 27 of file MotorCommandsSender.h.

int MotorCommandsSender::numOfLED`[private]`

| The number of LEDs of the robot. Definition at line 28 of file MotorCommandsSender.h. Referenced by MotorCommandsSender().

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

- Platform/Aperios1.3.2/MotorCommandsSender.h
- Platform/Aperios1.3.2/MotorCommandsSender.cpp