setting.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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 paCnt;
  56. unsigned char reversed[48];//保留段
  57. ///////////////////////////////////////
  58. char ttsMessage[20*4];//开机TTS,空则不播放
  59. unsigned char ttsCodeType;//TTS编码类型
  60. unsigned char serverMenuPass[6];//服务器菜单密码
  61. unsigned char messageResetFlag;//'R'表示复位文件消息
  62. unsigned int messageNewAddr;//新消息的地址
  63. unsigned short lcdParaList[5];//LCD屏显时间参数
  64. unsigned char lcdParaDefaultIndex;//LCD当前使用的屏显索引
  65. unsigned char authType;//鉴权类型 3GPP
  66. SERVER_LISTTYPE serList;
  67. APN_LISTTYPE apnList;
  68. unsigned char netMode;//网络模式
  69. unsigned char SoundMode;//0室内 1 室外
  70. unsigned char KeySound;//提示音打开状态 0关闭 1打开
  71. unsigned char gpsTimeIndex;//GPS上传时间索引
  72. AUTH_TYPEDEF authPara;//部标参数
  73. unsigned short gpsPort;//GPS服务器端口
  74. unsigned char pwrMode;//功耗模式
  75. unsigned char lvl;//公网室内模式喇叭音量
  76. unsigned char boardLayout;//板层数
  77. unsigned char outDoorLvl;//公网室外模式喇叭音量
  78. unsigned char gpsEnable;//不支持,则默认不开GPS,且GPS菜单(不显示),如果支持,则自动强制bubiaoEnable支持
  79. unsigned char bubiaoEnable;//不支持,则无GPS,且无文本消息菜单(不显示)
  80. }SYSINI_HS191X_DEF;
  81. #pragma pack(pop)
  82. extern SYSINI_HS191X_DEF newPara;
  83. extern char showPIP[40];
  84. extern char showGIP[40];
  85. void sysIniSave(void);
  86. void sysIniRead(void);
  87. void readInfoNow(void);
  88. void setPocPara(char *pocPara,int len);
  89. char *getPIPAddr(void);
  90. char *getGIPAddr(void);
  91. char *getDOMAINAddr(void);
  92. char *getMenuKey(void);
  93. #endif