Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages | Examples

LegsExample.h

#ifndef LEGSEXAMPLE_H
#define LEGSEXAMPLE_H

#include "aibolib.h"
#include "def.h"


enum SYSTEM_STATE{
  SYSTEM_START,
  MOVE_SLEEPING,
  SYSTEM_IDLE,
  SYSTEM_END,
};


class LegsExample: public Aibo {
public:
 
  LegsExample();
  virtual ~LegsExample(){};

  OSubject*    subject[numOfSubject];
  OObserver*   observer[numOfObserver];


  OStatus DoInit   (const OSystemEvent& event);
  OStatus DoStart  (const OSystemEvent& event);
  OStatus DoStop   (const OSystemEvent& event);
  OStatus DoDestroy(const OSystemEvent& event);
  
  void NotifyLegs(const OReadyEvent& event);


 protected:

  AiboLeg Legs;
  
  void MoveToBase();
  void MoveSleeping();

  SYSTEM_STATE State;

  static const int BASE_POS_MAX_COUNTER = 35;
  
  // array for delta (diff) angles  
  double Delta[NUM_LEG_JOINTS];

  int LegCounter;
  int BaseCounter;
};

#endif //define LIBTESTER_HH


tams Tim Baier AiboLib v0.2.4
Generated Thu Jan 19 11:54:28 2006 by doxygen 1.4.3