/*-----------------------------------------------------------------------*/
/*   FS-MTS  1.0  Ver.                                                   */
/*   Copyright (C) 2000 FIRST SAIL                                       */
/*   All Rights Reserved                                                 */
/*   Warning:                                                            */
/*       This program author is GuoHeng,this system is protected         */
/*   by copyright law and international Treaties . Unauthorized          */
/*   reproduction of  distribution of this  system, or any portion       */
/*   of it , may result in severe civil and criminal penalties ,         */
/*   and will be prosecuted to the maximum extern possible under         */
/*   the law.                                                            */
/*                                                                       */
/*   Update Date:2002-06-25                                              */
/*   Update Time:22:35:00                                                */
/*-----------------------------------------------------------------------*/

#ifndef _SETTING_H_
#define _SETTING_H_

#define   EXTERNAL_TEMP      (0x01-1)
#define   EXTERNAL_JAM       (0x02-1)
#define   EXTERNAL_HIPOT     (0x03-1)
#define   EXTERNAL_POWERVOL  (0x04-1)
#define   EXTERNAL_POWERFREQ (0x05-1)
#define   EXTERNAL_HIGHVOL   (0x06-1)
#define   EXTERNAL_COIL      (0x07-1)

BOOL  FAR  IsTest(int nStart,int nEnd,int nFlags);
BOOL  FAR  IsTest(int nIndex);
BOOL  FAR  IsEnvironmentalMask(int nIndex);

float  GetExternalData(int nIndex);
void   SetExternalData(int nIndex,float fData);
float  GetExternalData2(int nIndex);
void  FAR SurgeStandand();//Surge Standand
BOOL  FAR CalculateStandand();
BOOL  FAR LoadStandand();
BOOL  FAR SaveStandand();
void  FAR SettingParameter();
BOOL  FAR LoadTest(ENVIRONMENTAL* pEnvironmental,CRegister *pRegister,int nUser);
BOOL  FAR WriteTest(ENVIRONMENTAL* pEnvironmental,CRegister *pRegister,int nUser,BOOL bWriteUser);
BOOL  FAR LoadTest();
BOOL  FAR WriteTest();
void  FAR ModelSetting();
void  FAR ModifyEnvironmentalMask();
BOOL  FAR DebugSettingMask();

BOOL  LoadStandandToXms();
BOOL  SaveStandandFromXms();
int CalcSurgeUserLocation(WORD *pwData,int nCount);


#endif