setting.h 3.2 KB

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