setting.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. #ifndef __SETTING__H_
  2. #define __SETTING__H_
  3. #define APN_SEGMENT_MAX_LEN (30+1)
  4. #define IMEI_SIZE 15
  5. void cmdSetting(char *msg);
  6. typedef enum{
  7. SERVER_HZ,
  8. SERVER_SD,
  9. SERVER_FENFA,
  10. SERVER_JIQUN,
  11. SERVER_UR,
  12. }SERVER_ENUM;
  13. #pragma pack(push)
  14. #pragma pack(1)
  15. typedef struct{
  16. char pip[40];
  17. char gip[40];
  18. }SERVER_DEF;
  19. typedef struct{
  20. unsigned char defaultuse;//默认使用哪一个服务 0 zh 1 sd
  21. SERVER_DEF zh;
  22. SERVER_DEF sd;
  23. SERVER_DEF ur;
  24. char ipFenFa[40];
  25. char jiqun[40];
  26. }SERVER_LISTTYPE;
  27. typedef struct{
  28. char account[APN_SEGMENT_MAX_LEN];
  29. char pass[APN_SEGMENT_MAX_LEN];
  30. }APN_NAMEDEF;
  31. typedef struct{
  32. unsigned char defaultuse;//默认使用哪一个APN
  33. unsigned char apnShowFlag;//是否显示出APN菜单
  34. char APN_Name[APN_SEGMENT_MAX_LEN];
  35. APN_NAMEDEF apnList[4];
  36. }APN_LISTTYPE;
  37. typedef struct{
  38. unsigned short proID;//省域ID
  39. unsigned short CityID;//市域ID
  40. unsigned char Manufacturers[5];//制造商
  41. unsigned char TerMod[20];//终端型号
  42. unsigned char TerID[7];//终端ID
  43. unsigned char PlateColor;//车牌颜色
  44. char Plate[8];//车辆标识
  45. }AUTH_REGDEF;
  46. typedef struct{
  47. unsigned char authCode[7];
  48. AUTH_REGDEF registerPara;
  49. }AUTH_TYPEDEF;
  50. typedef struct{
  51. unsigned char ConfigFlag;//0 表示刷新了代码后第一次运行
  52. unsigned char Mode;//配置文件所属机型
  53. ///////////////////////////////////////
  54. unsigned char spkVol;
  55. unsigned char reversed[49];//保留段
  56. ///////////////////////////////////////
  57. char ttsMessage[20*4];//开机TTS,空则不播放
  58. unsigned char ttsCodeType;//TTS编码类型
  59. unsigned char serverMenuPass[6];//服务器菜单密码
  60. unsigned char messageResetFlag;//'R'表示复位文件消息
  61. unsigned int messageNewAddr;//新消息的地址
  62. unsigned short lcdParaList[5];//LCD屏显时间参数
  63. unsigned char lcdParaDefaultIndex;//LCD当前使用的屏显索引
  64. unsigned char authType;//鉴权类型 3GPP
  65. SERVER_LISTTYPE serList;
  66. APN_LISTTYPE apnList;
  67. unsigned char netMode;//网络模式
  68. unsigned char SoundMode;//0室内 1 室外
  69. unsigned char KeySound;//提示音打开状态 0关闭 1打开
  70. unsigned char gpsTimeIndex;//GPS上传时间索引
  71. AUTH_TYPEDEF authPara;//部标参数
  72. unsigned short gpsPort;//GPS服务器端口
  73. unsigned char pwrMode;//功耗模式
  74. unsigned char lvl;//公网室内模式喇叭音量
  75. unsigned char boardLayout;//板层数
  76. unsigned char outDoorLvl;//公网室外模式喇叭音量
  77. unsigned char gpsEnable;//不支持,则默认不开GPS,且GPS菜单(不显示),如果支持,则自动强制bubiaoEnable支持
  78. unsigned char bubiaoEnable;//不支持,则无GPS,且无文本消息菜单(不显示)
  79. }SYSINI_HS191X_DEF;
  80. #pragma pack(pop)
  81. extern SYSINI_HS191X_DEF newPara;
  82. extern char showPIP[40];
  83. extern char showGIP[40];
  84. void sysIniSave(void);
  85. void sysIniRead(void);
  86. void readInfoNow(void);
  87. void setPocPara(char *pocPara,int len);
  88. char *getPIPAddr(void);
  89. char *getGIPAddr(void);
  90. char *getDOMAINAddr(void);
  91. char *getMenuKey(void);
  92. #endif