Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

IPCMotionHook.h

Go to the documentation of this file.
00001 //-*-c++-*-
00002 #ifndef INCLUDED_IPCMotionHook_h_
00003 #define INCLUDED_IPCMotionHook_h_
00004 
00005 #include "local/MotionHook.h"
00006 #include <list>
00007 
00008 class MessageQueueBase;
00009 class RCRegion;
00010 
00011 //! description of IPCMotionHook
00012 class IPCMotionHook : public MotionHook {
00013 public:
00014   IPCMotionHook(MessageQueueBase& q, MessageQueueBase& pidq) : MotionHook(), mq(q), pidmq(pidq), regions() {}
00015   virtual ~IPCMotionHook();
00016   
00017   virtual bool isConnected() { return true; }
00018   
00019   virtual void motionCheck(const float outputs[][NumOutputs]);
00020   virtual void updatePIDs(const std::vector<PIDUpdate>& pids);
00021   
00022 protected:
00023   MessageQueueBase& mq;
00024   MessageQueueBase& pidmq;
00025 
00026   static unsigned int count; //!< count of created regions
00027   RCRegion* getRegion();
00028   typedef std::list<RCRegion* > msgbuf_t; //!< type of collection of shared data regions
00029   msgbuf_t regions; //!< for efficiency, reuse old buffers -- oldest at front, most recently used at back
00030 };
00031 
00032 /*! @file
00033  * @brief 
00034  * @author Ethan Tira-Thompson (ejt) (Creator)
00035  */
00036 
00037 #endif

Tekkotsu Hardware Abstraction Layer 5.1CVS
Generated Mon May 9 05:01:38 2016 by Doxygen 1.6.3