

#ifndef _AUTOMATION_H_
#define _AUTOMATION_H_

#include "types.h"

#define AUTOMATION_TASK_PRIORITY 3
#define AUTOMATION_STACK_SIZE    4096

#define RANDOM_TEST 1
#define SEQUENTIAL_TEST 2
#define RECORDED_TEST 3

#define TEST_ONCE 0
#define TEST_REPEAT 1

#define RANDOM_TIME_DELAY 0

#define SIG_IRTEST					50

enum{
	IR_REC_START = 0,
	IR_REC_STOP,
	IR_AUTOTEST_M,
	IR_AUTOTEST_F,
	IR_AUTOTEST_R,
	IR_AUTOTEST_END,
	IR_AUTOTEST_S,
};

typedef	void (* AutoMation_CallBack_t)(UINT32 KeyCode, UINT32 Param,  UINT8 KeyValue);

typedef struct _AutoCmdPool_t_
{
	UINT32 dCMD;
	UINT32 dParam;
	UINT32 dDelay;
}AutoCmdPool_t;

typedef struct _AutoCmdTable_t_
{
	UINT32 dCMD;
	char *pString;
}AutoCmdTable_t;

int AUTO_IF_Initialize(AutoMation_CallBack_t pfCallBack);

int AUTO_IF_SetRandomMaxnMin(UINT32 dMax, UINT32 dMin);

int AUTO_IF_Start(UINT32 dTestMethod, UINT8 bRepeat);

int AUTO_IF_Stop(void);

int AUTO_IF_Finalize(void);

void AUTO_IF_RecStart(void);

void AUTO_IF_RecStop(void);

int AUTO_IF_RecCmd(UINT32 dCmd, UINT32 dParam);

void AUTO_IF_ShowCmd(void);

int AUTO_IF_SetTable(AutoCmdPool_t* stTable, UINT32 dTableSize);

int AUTO_IF_Regist_SignalEvent(void);

#endif
