123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- #ifndef __SYS_INI_H_
- #define __SYS_INI_H_
- #define APN_SEGMENT_MAX_LEN (30+1) //APN账号密码长度
- #define SYS_CONFIG "sys.ini"
- typedef enum{
- MODE_HS191x=0,
- MODE_HS580x
- }MODE_TYPEDEF;
- typedef enum{
- SER_HZ=0,
- SER_SD,
- SER_IP,
- SER_JIQUN,
- SER_US
- }SERVER_TYPEDEF;
- typedef enum{
- APN_APN1=0,
- APN_APN2,
- APN_APN3,
- APN_APN4
- }APN_TYPEDEF;
- typedef enum{
- TTS_UNICODE=0,
- TTS_GBK=1
- }TTS_CODETYPE;
- typedef struct{
- char pip[40];
- char gip[40];
- }__attribute__ ((packed)) SERVER_DEF;
- typedef struct{
- unsigned char defaultuse;//默认使用哪一个服 0 zh 1 sd
- SERVER_DEF zh;
- SERVER_DEF sd;
- SERVER_DEF ur;
- char ipFenFa[40];
- char jiqun[40];
- }__attribute__ ((packed)) SERVER_LISTTYPE;
- typedef struct{
- char account[APN_SEGMENT_MAX_LEN];
- char pass[APN_SEGMENT_MAX_LEN];
- }__attribute__ ((packed)) APN_NAMEDEF;
- typedef struct{
- unsigned char defaultuse;//默认使用哪一个APN
- unsigned char apnShowFlag;//是否显示出APN菜单
- char APN_Name[APN_SEGMENT_MAX_LEN];
- APN_NAMEDEF apnList[4];
- }__attribute__ ((packed)) APN_LISTTYPE;
- typedef struct{
- unsigned short proID;//省域ID
- unsigned short CityID;//市域ID
- unsigned char Manufacturers[5];//制造商
- unsigned char TerMod[20];//终端型号
- unsigned char TerID[7];//终端ID
- unsigned char PlateColor;//车牌颜色
- char Plate[8];//车辆标识
- }__attribute__ ((packed)) AUTH_REGDEF;
- typedef struct{
- unsigned char authCode[7];
- AUTH_REGDEF registerPara;
- }__attribute__ ((packed)) AUTH_TYPEDEF;
- typedef struct{
- unsigned char ConfigFlag;//0 表示此文件是最原始的,对MCU来说,可以理解为代码更新了,需要使用此文件的默认参数 1, 此文件不是最新的,已被使用过
- unsigned char Mode;//配置文件所属机型
- ///////////////////////////////////////
- //unsigned char reversed[50];//保留段
- // unsigned char VolumLv;
- unsigned char PF1Status; //PF1 按键 0 群组选择 1成员选择
- unsigned char SoundMode;
- unsigned char LcdPulse; //亮度
- unsigned char reversed[50-3];//保留段
- ///////////////////////////////////////
- char ttsMessage[20*4];//开机TTS播放 空则不播放
- unsigned char ttsCodeType;//TTS内容的编码类型
- unsigned char serverMenuPass[6];//服务菜单密码
- unsigned char messageResetFlag; //'R'表示复位文体消息 否则不复位
- unsigned int messageNewAddr;//新消息的地址
- unsigned short lcdParaList[5]; //LCD 屏显时间参数表
- unsigned char lcdParaDefaultIndex;//LCD当前使用屏显值索引
- unsigned char authType;//鉴权类型 3GPP
- SERVER_LISTTYPE serList;
- APN_LISTTYPE apnList;
- unsigned char netMode;//网络模式
- ///////////////以下是从内部flash移出来的///////////////////
- //unsigned char SoundMode; //0--室内模式 1--室外模式
- unsigned char KeySound;//提示音打开状态 0 关闭 1打开
- unsigned char gpsTimeIndex;//GPS上传时间索引
- AUTH_TYPEDEF authPara;//布标参数
- unsigned short gpsPort; //GPS服务器端口
- unsigned char pwrMode;//功耗模式
- unsigned char PcbNUm;
- unsigned char Miclv; //MIC增益
- unsigned char VolumLv; //SPK增益
- }__attribute__ ((packed)) SYSINI_HS191X_DEF;
- void newSysIniRead(void);
- extern SYSINI_HS191X_DEF newPara;
- extern int newSysiniIndex;
- extern char menu_key[6];
- extern const char invalidIp[];
- extern unsigned char UniToGBKIndex;
- char *getPIPAddr(void);
- char *getGIPAddr(void);
- char *getDOMAINAddr(void);
- extern char buBiaoAddrChange;
- //检查以下标志
- //save sys
- #endif
|