#ifndef STRUCT_TABLES_H
#define STRUCT_TABLES_H

/*!
  \file
  \brief 通信、及び制御用の構造体定義

  \author Satofumi KAMIMURA

  $Id: structTables.h 286 2008-10-20 09:40:22Z satofumi $
*/

#include "directDeviceCtrl.h"
#include "directWheelCtrl.h"
#include "modeCtrl.h"


/*!
  \brief 走行制御モジュール情報管理
*/
typedef struct {

  // system
  long version;
  int msec;
  long sec;
  unsigned short used_msec;

  // device
  encInfo_t enc[2];
  motorInfo_t mtr[2];
  directDeviceInfo_t direct[2];

  // framework
  wheelInfo_t whl[2];
  directWheelInfo_t directWhl[2];
  bodyInfo_t bodyInfo;
  bodyPosition_t bodyPos;
  coordinateInfo_t gl_crd;
  coordinateInfo_t gl_crd_offset;
  coordinateInfo_t run_crd;
  coordinateInfo_t run_crd_offset;
  velocityInfo_t velInfo;

  // manage
  modeInfo_t mode;

  // contorl
  velocityCtrlInfo_t straight;
  velocityCtrlInfo_t rotate;

  // additional
  unsigned long watch_dog_msec;
  unsigned long watch_dog_msec_max;

} runCtrl_t;

#endif /* !STRUCT_TABLES_H */
