// $Id$

#ifndef __GAIT_HH__
#define __GAIT_HH__
#include "Database.hh"
#include "gaitlist.hh"
#include "modeselect.hh"

//--------------------------------------------------------------------
//
//  class Gait
//

class Gait
{
public:
  // Constructor / Destructor
  Gait(DBClient* db, ModeSelect* ms);
  virtual ~Gait();
  
  void setmode(Gait_type g);
  virtual bool connectdb() = 0; // called to connect to robot databases
  virtual bool activate() = 0; // called to switch to a new gait
  virtual bool update(double x, double y, double z);  // update the parameters
                              // of the gait - speed, direction, etc
  
  virtual void setparam(int p); // set a parameter for this gait
  virtual void toggle(); // toggle a parameter
  virtual void toggle2(); // toggle another parameter
  
protected:
  DBClient& dbclient;         // db client to use to communicate with robot
  ModeSelect& modeselect;
  RemoteDBEntry* db_cmd;
  RemoteDBEntry* db_params;
  RemoteDBEntry* db_state;
};

#endif // __GAIT_HH__

