Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

MotionManagerMsg Struct Reference

A small header that precedes data sent by MotionManager between processes. More...

#include <MotionManagerMsg.h>

Inheritance diagram for MotionManagerMsg:

Detailed Description

A small header that precedes data sent by MotionManager between processes.

Typically this is broadcast to all processes using the MotionManager so each process has to update its own fields of MotionManager.

One tricky aspect is that with the IPC mechanisms on PLATFORM_LOCAL the originating process will get an "echo" of the message, whereas on PLATFORM_APERIOS it's set up so the sender doesn't get an echo of its own message. However, this complexity is handled by MotionManager, not here.

Definition at line 16 of file MotionManagerMsg.h.

List of all members.

Public Types

typedef unsigned short MC_ID
 the type to use when referring to MotionCommand ID's

Public Member Functions

 MotionManagerMsg ()
 constructor
virtual ~MotionManagerMsg ()
 virtual destructor
MC_ID getID () const
 Accessor for the id number, set by MotionManager::addMotion().

Static Public Attributes

static const MC_ID invalid_MC_ID = static_cast<MC_ID>(-1)
 for errors and undefined stuff

Private Types

enum  MsgType { addMotion, deleteMotion, unknown }
 

Denotes what type of message this is (see type).

More...

Private Member Functions

void setAdd (MC_ID id)
 Sets up the header as an add motion message.
void setDelete (MC_ID id)
 Sets up the header as an erase motion message.
void clearID ()
 resets the mc_id to invalid_MC_ID

Private Attributes

enum MotionManagerMsg::MsgType type
 Denotes what type of message this is (see type).
ProcessID::ProcessID_t creatorPID
 holds the process that this message was created/sent from
MC_ID mc_id
 The id of the MotionCommand this is in reference to.

Friends

class MotionManager

Member Typedef Documentation

typedef unsigned short MotionManagerMsg::MC_ID

the type to use when referring to MotionCommand ID's

Definition at line 18 of file MotionManagerMsg.h.


Member Enumeration Documentation

enum MotionManagerMsg::MsgType [private]

Denotes what type of message this is (see type).

Enumerator:
addMotion 

indicates the msg is actually MotionCommand to be added to the MotionManager

deleteMotion 

indicates the msg's mc_id references a MotionCommand to be removed from the MotionManager

unknown 

failsafe default until one of the others is set

Definition at line 37 of file MotionManagerMsg.h.


Constructor & Destructor Documentation

MotionManagerMsg::MotionManagerMsg (  ) 

constructor

Definition at line 24 of file MotionManagerMsg.h.

virtual MotionManagerMsg::~MotionManagerMsg (  )  [virtual]

virtual destructor

doesn't do anything, but don't remove it, otherwise this would no longer be a virtual base class

Definition at line 28 of file MotionManagerMsg.h.


Member Function Documentation

void MotionManagerMsg::clearID (  )  [private]

resets the mc_id to invalid_MC_ID

Definition at line 62 of file MotionManagerMsg.h.

void MotionManagerMsg::setAdd ( MC_ID  id  )  [private]

Sets up the header as an add motion message.

Definition at line 50 of file MotionManagerMsg.h.

void MotionManagerMsg::setDelete ( MC_ID  id  )  [private]

Sets up the header as an erase motion message.

Definition at line 56 of file MotionManagerMsg.h.

Referenced by MotionManager::removeMotion().


Friends And Related Function Documentation

friend class MotionManager [friend]

Definition at line 34 of file MotionManagerMsg.h.


Member Data Documentation

holds the process that this message was created/sent from

Definition at line 44 of file MotionManagerMsg.h.

Referenced by MotionManager::processMsg().

const MC_ID MotionManagerMsg::invalid_MC_ID = static_cast<MC_ID>(-1) [static]

for errors and undefined stuff

Definition at line 21 of file MotionManagerMsg.h.

Referenced by clearID().

The id of the MotionCommand this is in reference to.

Definition at line 47 of file MotionManagerMsg.h.

Referenced by clearID(), getID(), MotionManager::processMsg(), setAdd(), and setDelete().

Denotes what type of message this is (see type).

indicates what processing this message requires

Referenced by MotionManager::processMsg(), setAdd(), and setDelete().


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:13 2016 by Doxygen 1.6.3