/****************************************************
 *  LineTracer.h                                         
 *  Created on: 2012/04/17 11:45:42                      
 *  Implementation of the Class LineTracer       
 *  Original author: hiroyuki.watanabe                     
 ****************************************************/

#if !defined(EA_A3652FAE_045C_41a8_986D_C461104931F4__INCLUDED_)
#define EA_A3652FAE_045C_41a8_986D_C461104931F4__INCLUDED_


#include "kernel.h"
#include "kernel_id.h"

#include "Direction.h"
#include "IsOnline.h"

#include "Motor.h"
#include "TouchSensor.h"
#include "LightSensor.h"
#include "GyroSensor.h"

/*状態の定義列挙値*/
typedef enum _LT_STATE
{
	RUN,
	STOP,
} LT_STATE;

// 属性を保持するための構造体の定義
typedef struct LineTracer
{
	unsigned int speed;
	DIRECTION direction;
	LT_STATE state;
	Motor *leftMotor;
	Motor *rightMotor;
	TouchSensor *touchSensor;
	LightSensor *lightSensor;
	GyroSensor *gyroSensor;
} LineTracer;

void LineTracer_init(LineTracer* this);
void LineTracer_traceLine(LineTracer* this);
void LineTracer_RUN_entry(LineTracer* this);

#endif /*!defined(EA_A3652FAE_045C_41a8_986D_C461104931F4__INCLUDED_)*/

