/********************************************************************
版权所有：	
文件版本： V1.00
文件名称： Mmidata.h
生成日期： 2007年08月26日
作    者：
使用范围：

功    能：菜单调用的各种处理函数
更新信息：
更新日志1：
修改者:
修改日期:
修改内容:
修改原因:
*********************************************************************/
#ifndef MMIDATA_H_
#define MMIDATA_H_
#define MAX_KG_BITS		3			//最大控制字组合位
#define ITEMS_PER_KG   		16				// 1个控制字内的最大条目数

#define INDEX_NUM 2

typedef struct  Index_STRUCT // 通用索引结构体定义 
{
	UINT *pValue;
	int (*EnterFunc)(void);		
	UINT value[6];
	char  name[6][24];	
	char  str[24];
	BYTE bCurrent;
	BYTE num;
}INDEX_DEF;
typedef union SET_VALUE
{
	float ff;
	uint32_t tt;
}SET_VALUE;


typedef struct EVENT_SHOW
{
	EVENT_STRUCT tEv;
	BYTE   namestr[24];
	BYTE   valuestr[24];
	BYTE   str[5][24];
	WORD wCurrent;
	WORD wNumber;
	WORD wIndex;
	WORD year;
	WORD month;
	WORD day;
	WORD hour;
	WORD min;
	WORD sec;
	WORD ms;
	short   sParaCur;
	short   sParaNum;

}EVENT_SHOW;

extern EVENT_SHOW m_tEvent;
extern EVENT_SHOW m_tAutoEv;
extern char m_WarningStr[];    //提示信息字符
extern char m_errInf[];  // 错误信息保存
extern UINT m_ScreenNum;
extern DATA_MENU_DEF g_tDataMenu1;  //数据菜单定义
extern DATA_MENU_DEF g_tDataMenu2;  //数据菜单定义
extern DATA_MENU_DEF g_tExtraMenu;

extern UINT m_CurrentScreen;
extern char m_set_name[];  // 定值名称
extern char m_set_name_ext[];  // 定值名称
extern char m_set_inf[]; // 定值信息1 ，显示提示信息
extern INDEX_DEF g_tIndex[];  // 名称 值索引结构定义

extern UINT m_Password;               //密码
extern UINT m_NewPassword;         //密码修改时新密码

extern char m_strPassword[10];
extern char m_strPassword2[10];

extern char m_YdYcHalfOfRateValue[16];

extern UINT m_CtrlWord;  // 当前显示控制子
extern SET_VALUE m_SetBuf[];
extern TIME_SHOW m_SetTime;
extern TIME_SHOW m_ShowTime;

extern UINT m_SwNo;
extern WORD m_arrNetPara[];

extern BYTE strGprsInf[30][24];
extern int  g_gprs_info_num;
extern char m_equipstr[22]; 
extern WORD m_srcsection;
extern WORD m_dstsection;
extern WORD m_maxsection;
extern WORD m_selsection;
extern WORD m_sectionnum;

extern u8 bPubSetMenuShow[SET_PUB_NUM];
extern u8 bSwSetMenuShow[SET_NUM];
extern u8 bParaSetMenuShow[PARA_NUM];
extern u8 bCstSetMenuShow[CSTSET_NUM];

extern char m_selsec_char[10];

#ifdef FUNC_YT_HARD_YB
extern u32 tHardYBID[];
extern const int YT_SW_HARD_YB_NUM;
extern const int YT_PUB_HARD_YB_NUM;
extern const short sw_yt_hard_yb_index[];
extern const short pub_yt_hard_yb_index[];
	#ifdef FUNC_YT_MIX
	extern const char * mix_yt_index[];
	#endif
#endif

int mmd_IndexMenuKey(int key);
int mmd_EquipParaKey(int key);
int mmd_SetKey(int key);


int mmd_InitSetSolid(int value);
int mmd_RenewSet(void);
int mmd_CheckDzPassword(int value);
int mmd_CheckPubSet(int value);
void mmd_GetEventShow(EVENT_SHOW *pe,bool bPDA);

int mmd_GetDefaultSet(int value);
int mmd_SolidSet(int value);
int mmd_ChangeSet(const TSETTABLE *pSet,int num,SET_VALUE *setbuf);

int mmd_CheckParaPassword(int value);

int mmd_GetEvent(int value);
int mmd_GetNextEv(int value);
int mmd_GetVipEvent(int value);
int mmd_GetNextVip(int value);

int mmd_GetOpe(int value);
int mmd_GetNextOpe(int value);
int mmd_GetNextAutoSOE(int key);

bool CheckAutoSOE(void);
int mmd_GetMea(int value);
int mmd_GetYX(int value);
int  mmd_RenewYX(void);

int  mmd_RenewBoardYX(void);
int mmd_GetBoardYX(int value);
int mmd_TestDiDo(int value);
int  mmd_SetTime(int value);
int mmd_GetSectionInf(int value);
int  mmd_GetSetTime(int value);
int mmd_SetTime(int value);
int mmd_CheckXTPassword(int value); // 系统维护密码
int mmd_ClearSOE(int value); /*清除事件库 */
int mmd_SavePassWord(int value);
int mmd_TestHz(int value);
int mmd_InitEquipPara(int value);
int mmd_SaveEqupPara(int value);


void mmd_ReChangeSet(const TSETTABLE *pSet,int num,SET_VALUE *setbuf);

int mmd_GetDefaultEquipPara(int value);
int mmd_SolidEquipPara(int value);


  // 通道系数校正

int mmd_SaveAdjustValue(int value);



int mmd_StartAutojust(int value);



int  mmd_RenewMain(void);

int mmd_KeyMain(int key);
int mmd_EnterMainMenu(int key);
#ifdef GD_AREA_ZHUHAI_V2
void mmd_EnterAutoMenu(void);
#endif

int m_TestLed(int value);

int m_AutoLed(void);

int m_EscTestLed(int key);
int mmd_ClearOperateSOE(int value); /*清除操作记录 */

int mmd_RenewPubSet(void);

int mmd_InitPubSet(int value);
int mmd_RenewSwSet(void);
int mmd_InitSwSet(int value);
int mmd_SetSwKey(int key);
int mmd_SetPubKey(int key);


void mmd_GetSet(int setno,DATA_FIELD_DEF *pt,const TSETTABLE *pTable,SET_VALUE *setbuf);

int mmd_CstSetKey(int key);

int mmd_ChangeCstWord(int key);

int mmd_GetCstSet(int value);

int mmd_SolidCstSet(int value);

int mmd_GetEquipConfig(int value);

int mmd_GetInf(int value);
int mmd_GetConfigInf(int value);
int  mmd_InitDefaultEquipSet(int value);

int mmd_SoftReset(int value);
extern bool bSetChange;
int mmd_GetRmtYC(int value);
int mmd_GetRmtDD(int value);
int mmd_GetRmtYX(int value);
int  mmd_RenewRmtYX(void);
int  mmd_RenewRmtYC(void);
int mmd_GetRmtIndex(int value);
int mmd_GetRmtEV(int value);
int  mmd_RenewRmtEV(void);

int mmd_SendRmtYX(int value);

int mmd_SendRmtYC(int value);

int mmd_SendRmtDD(int value);


int mmd_Jump0(int value);

int mmd_BatActive(int value);
int mmd_BatActOff(int value);
int mmd_GetGPS(int value);
int  mmd_RenewInf(void);
int  mmd_RenewConfigInf(void);

int  mmd_RenewMeaPub(void);
int mmd_GetMeaPub(int value);

extern WORD g_sw_index;
int  mmd_RenewMeaSw(void);
int mmd_GetMeaSw(int value);
int mmd_ChangeSwMea(int key);
int mmd_ChangeYxBoard(int key);
int  mmd_RenewRmtDD(void);

int mmd_InitNetPara(int value);

int mmd_EquipNetParaKey(int key);


int  mmd_RenewBoardDo(void);
int mmd_GetBoardDO(int value);
int mmd_ChangeDoBoard(int key);

int  mmd_RenewPubYX(void);
int mmd_GetPubYX(int value);

int  mmd_RenewSwYX(void);
int mmd_GetSwYX(int value);
int mmd_ChangeYxSw(int key);

int mmd_BoardLedTest(int value);

int mmd_StartZljust1(int value);
int mmd_StartZljust2(int value);
int mmd_StartPowerAjust(int value);

int mmd_GetDebugInf(int value);
int mmd_GetFileInf(int value);

int mmd_GetGprsInf(int value);
int mmd_GetGooseInf(int value);
int mmd_gooseKey(int key);

int mmd_AuotGprsInf(void);
int mmd_GprsInfKey(int key);

int mmd_get_gprs_info(void);
int init_default_equip_set(int value);
int gprs_get_info(void);
int mmd_FreshTime(void);
int mmd_CheckRmtTbl(int value);

int  mmd_RenewFtuMea(void);
int mmd_GetFtuMea(int value);
int  mmd_RenewFtuYX(void);
int mmd_GetFtuYX(int value);
int mmd_GetFtuIfo(int value);

int mmd_RenewFtuSet(void);
int mmd_InitFtuSet(int value);
int mmd_SetFtuKey(int key);
int  mmd_RenewExtInf(void);
int mmd_freshmain(void);
void mmd_freshmainunit(bool bfirst);
extern unsigned char m_LockIcon[];
int mmd_mainimageKey(int key);

int mmd_ClearQUA(int value);
int mmd_ClearIMP(int value);
int mmd_FA_Unlock(int value);

int mmd_testKey(int key);
int mmd_DIDOTest(int value);

int mmd_ValueJump(void);

int  mmd_RenewSetGroup(void);
int mmd_InitSetGroup(int value);
int mmd_ChangeSetGroup(int key);
int mmd_SaveSetGroup(int value);
int mmd_InitSwSetGroup(int value);
int mmd_InitPubSetGroup(int value);


int  mmd_RenewSwSetGroup(void);
int  mmd_RenewPubSetGroup(void);

int mmd_ChangeSwSetGroup(int key);
int mmd_ChangePubSetGroup(int key);

int mmd_SetFtuSwKey(int key);
int mmd_SetFtuPubKey(int key);

int mmd_CheckSetSwPara(int value);
int mmd_CheckSetPubPara(int value);

extern WORD m_dstsection;
int mmd_InitChangeSection(int value);
int mmd_changesection(int value);
int mmd_menu_cfg_init(void);
void mmd_create_menufile(void);


int mmd_backPubSet(int value);

int  mmd_RenewPubSetGroup(void);


int mmd_InitPubSetGroup(int value);

int mmd_GetDefaultPubSet(int value);
int mmd_GetDefaultBhSet(int value);



int mmd_backBhSet(int value);
int  mmd_RenewBhSetGroup(void);
int mmd_InitBhSetGroup(int value);

int mmd_backParaSet(int value);
int  mmd_RenewParaSetGroup(void);
int mmd_InitParaSetGroup(int value);



int mmd_backCstSet(int value);
int  mmd_RenewCstSetGroup(void);
int mmd_InitCstSetGroup(int value);

int mmd_InitPubSet(int value);
int mmd_InitBhSet(int value);
int mmd_InitParaSet(int value);
int mmd_InitCstSet(int value);


int mmd_SavePubSet(int value);
int mmd_SaveBhSet(int value);
int mmd_SaveParaSet(int value);
int mmd_SaveCstSet(int value);

int mmd_SavePubPassword2(int value);
int mmd_SaveBhPassword2(int value);
int mmd_SaveParaPassword2(int value);
int mmd_SaveAzPassword2(int value);
int mmd_SetPubKey(int key);
int mmd_SetBhKey(int key);
int mmd_SetParaKey(int key);
int mmd_SetCstKey(int key);

int mmd_RenewBhSet(void);
int mmd_RenewParaSet(void);
int mmd_RenewCstSet(void);

int mmd_GetDefaultBhSet(int value);
int mmd_GetDefaultParaSet(int value);
int mmd_GetDefaultCstSet(int value);
int mmd_SaveYBSet(int value);
int mmd_InitYBSet(int value);
int mmd_SetYBKey(int key);
int mmd_RenewYBSet(void);
int mmd_initSection(int value);
int mmd_GetDefaultPubSet(int value);
int mmd_GetDefaultSwSet(int value);
int mmd_GetDefaultYBSet(int value);
int mmd_clearWarnStr(int val);

int mmd_InitAzSet(int value);
int mmd_SaveAzSet(int value);
int mmd_SetAzKey(int key);
int mmd_RenewAzSet(void);
int  mmd_RenewAzSetGroup(void);
int mmd_backAzSet(int value);
int mmd_InitAzSetGroup(int value);
int  mmd_RenewGooseKc(void);
int mmd_GetGooseKc(int value);
int mmd_GooseKcTest(int value);
int mmd_Stop61850(int value);
int  mmd_RenewGoose(void);
int mmd_GetGoose(int value);
int mmd_menu_cfg_init(void);
void mmd_create_menufile(void);
int mmd_copysection(int value);
int mmd_splitstr(unsigned char *str,int lcdsize) ;
int mmd_backBhSetPoll(int key);
int mmd_backPubSetPoll(int key);
int mmd_backAzSetPoll(int key);
int mmd_CheckCopyPassword(int value);
int mmd_SetGroupInit(int value);
int mmd_CheckSecValue(void);
void mmd_RefreshFAStatus(void);
int  mmd_RenewFAStatus(void);
int mmd_GetFaStatus(int value);
void mmd_RefreshFunmodSet(void);
int  mmd_RenewFunmodSet(void);
int mmd_GetFunmodSet(int value);
extern int mmd_GetDebugEvent(int value);
extern int mmd_GetNextDebug(int key);

extern char m_Ledgoose[12];
extern char m_Ledbh[12];
extern char m_Ledfa[12];
extern char m_Fa_sl[12];
extern char m_Bh_chr[12];
extern char m_Fa_chr[12];
extern char m_Goose_chr[12];
extern char m_Ledjzs[12];

extern char m_TzCount[12];
extern char m_HzCount[12];
extern bool g_bVipSoe_show;

extern char m_Mode_chr[20];
extern char m_Tqhz_chr[20];
extern char m_Zdjl_chr[20];
extern char m_StopFun_chr[20];
extern char m_Yftr_chr[20];

#ifdef FUN_SET_CHANGE_SOE
void  para_change_check_soe(float *pf,DWORD wAddr,WORD num,const  TSETTABLE *pTable);
#endif

#endif

/**************************endfiles***********************************/



