sysIni.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. #ifndef __SYS_INI_H_
  2. #define __SYS_INI_H_
  3. #define APN_SEGMENT_MAX_LEN (30+1) //APN账号密码长度
  4. #define SYS_CONFIG "sys.ini"
  5. typedef enum{
  6. MODE_HS191x=0,
  7. MODE_HS580x
  8. }MODE_TYPEDEF;
  9. typedef enum{
  10. SER_HZ=0,
  11. SER_SD,
  12. SER_IP,
  13. SER_JIQUN,
  14. SER_US
  15. }SERVER_TYPEDEF;
  16. typedef enum{
  17. APN_APN1=0,
  18. APN_APN2,
  19. APN_APN3,
  20. APN_APN4
  21. }APN_TYPEDEF;
  22. typedef enum{
  23. TTS_UNICODE=0,
  24. TTS_GBK=1
  25. }TTS_CODETYPE;
  26. typedef struct{
  27. char pip[40];
  28. char gip[40];
  29. }__attribute__ ((packed)) SERVER_DEF;
  30. typedef struct{
  31. unsigned char defaultuse;//默认使用哪一个服 0 zh 1 sd
  32. SERVER_DEF zh;
  33. SERVER_DEF sd;
  34. SERVER_DEF ur;
  35. char ipFenFa[40];
  36. char jiqun[40];
  37. }__attribute__ ((packed)) SERVER_LISTTYPE;
  38. typedef struct{
  39. char account[APN_SEGMENT_MAX_LEN];
  40. char pass[APN_SEGMENT_MAX_LEN];
  41. }__attribute__ ((packed)) APN_NAMEDEF;
  42. typedef struct{
  43. unsigned char defaultuse;//默认使用哪一个APN
  44. unsigned char apnShowFlag;//是否显示出APN菜单
  45. char APN_Name[APN_SEGMENT_MAX_LEN];
  46. APN_NAMEDEF apnList[4];
  47. }__attribute__ ((packed)) APN_LISTTYPE;
  48. typedef struct{
  49. unsigned short proID;//省域ID
  50. unsigned short CityID;//市域ID
  51. unsigned char Manufacturers[5];//制造商
  52. unsigned char TerMod[20];//终端型号
  53. unsigned char TerID[7];//终端ID
  54. unsigned char PlateColor;//车牌颜色
  55. char Plate[8];//车辆标识
  56. }__attribute__ ((packed)) AUTH_REGDEF;
  57. typedef struct{
  58. unsigned char authCode[7];
  59. AUTH_REGDEF registerPara;
  60. }__attribute__ ((packed)) AUTH_TYPEDEF;
  61. typedef struct{
  62. unsigned char ConfigFlag;//0 表示此文件是最原始的,对MCU来说,可以理解为代码更新了,需要使用此文件的默认参数 1, 此文件不是最新的,已被使用过
  63. unsigned char Mode;//配置文件所属机型
  64. ///////////////////////////////////////
  65. //unsigned char reversed[50];//保留段
  66. // unsigned char VolumLv;
  67. unsigned char PF1Status; //PF1 按键 0 群组选择 1成员选择
  68. unsigned char SoundMode;
  69. unsigned char LcdPulse; //亮度
  70. unsigned char reversed[50-3];//保留段
  71. ///////////////////////////////////////
  72. char ttsMessage[20*4];//开机TTS播放 空则不播放
  73. unsigned char ttsCodeType;//TTS内容的编码类型
  74. unsigned char serverMenuPass[6];//服务菜单密码
  75. unsigned char messageResetFlag; //'R'表示复位文体消息 否则不复位
  76. unsigned int messageNewAddr;//新消息的地址
  77. unsigned short lcdParaList[5]; //LCD 屏显时间参数表
  78. unsigned char lcdParaDefaultIndex;//LCD当前使用屏显值索引
  79. unsigned char authType;//鉴权类型 3GPP
  80. SERVER_LISTTYPE serList;
  81. APN_LISTTYPE apnList;
  82. unsigned char netMode;//网络模式
  83. ///////////////以下是从内部flash移出来的///////////////////
  84. //unsigned char SoundMode; //0--室内模式 1--室外模式
  85. unsigned char KeySound;//提示音打开状态 0 关闭 1打开
  86. unsigned char gpsTimeIndex;//GPS上传时间索引
  87. AUTH_TYPEDEF authPara;//布标参数
  88. unsigned short gpsPort; //GPS服务器端口
  89. unsigned char pwrMode;//功耗模式
  90. unsigned char PcbNUm;
  91. unsigned char Miclv; //MIC增益
  92. unsigned char VolumLv; //SPK增益
  93. }__attribute__ ((packed)) SYSINI_HS191X_DEF;
  94. void newSysIniRead(void);
  95. extern SYSINI_HS191X_DEF newPara;
  96. extern int newSysiniIndex;
  97. extern char menu_key[6];
  98. extern const char invalidIp[];
  99. extern unsigned char UniToGBKIndex;
  100. char *getPIPAddr(void);
  101. char *getGIPAddr(void);
  102. char *getDOMAINAddr(void);
  103. extern char buBiaoAddrChange;
  104. //检查以下标志
  105. //save sys
  106. #endif