Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
00001 //-*-c++-*- 00002 #ifndef INCLUDED_MotionManagerMsg_h 00003 #define INCLUDED_MotionManagerMsg_h 00004 00005 //! A small header that preceeds data sent by MotionManager between processes 00006 struct MotionManagerMsg { 00007 //! the type to use when referring to MotionCommand ID's 00008 typedef unsigned short MC_ID; 00009 00010 //! constructor 00011 MotionManagerMsg() : type(unknown), mc_id(static_cast<MC_ID>(-1)) {} 00012 00013 //! virtual destructor 00014 /*! doesn't do anything, but don't remove it, otherwise this would no longer be a virtual base class */ 00015 virtual ~MotionManagerMsg() {} 00016 00017 //! Accessor for the id number, set by MotionManager::addMotion() 00018 MC_ID getID() const { return mc_id; } 00019 00020 private: 00021 friend class MotionManager; 00022 00023 //! Denotes what type of message this is 00024 enum MsgType { addMotion, deleteMotion, unknown } type; 00025 00026 //! The id of the MotionCommand this is in reference to 00027 MC_ID mc_id; 00028 00029 //! Sets up the header as an add motion message 00030 void setAdd(MC_ID id) { 00031 type=addMotion; 00032 mc_id=id; 00033 } 00034 00035 //! Sets up the header as an erase motion message 00036 void setDelete(MC_ID id) { 00037 type=deleteMotion; 00038 mc_id=id; 00039 } 00040 00041 }; 00042 00043 /*! @file 00044 * @brief Defines MotionManagerMsg, a small header used by MotionManager for sending messages between processes 00045 * @author ejt (Creator) 00046 * 00047 * $Author: ejt $ 00048 * $Name: tekkotsu-1_4_1 $ 00049 * $Revision: 1.2 $ 00050 * $State: Exp $ 00051 * $Date: 2003/03/09 02:45:23 $ 00052 */ 00053 00054 #endif // INCLUDED_MotionManagerMsg_h
Tekkotsu v1.4 |
Generated Sat Jul 19 00:06:31 2003 by Doxygen 1.3.2 |