PocTask.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. #ifndef __POC_TASK_H_
  2. #define __POC_TASK_H_
  3. #define POC_USER_NAME_LEN 36//24 //用户名长度
  4. #define POC_GROUP_NAME_LEN 36//24 //群组名长度
  5. #define POC_ALL_USERS_NUM 5//只需要装与显示时一页的数LIST_ROW就够了,采用动态更新方式
  6. #define POC_ALL_GROUPS_NUM 5//30 //本机所属的所有群组的个数
  7. #define POC_CMD_UP "AT+POC=10000007\r\n" //选组上键
  8. #define POC_CMD_DOWN "AT+POC=10000008\r\n" //选组下键
  9. #define POC_USER_ID_LEN 9 //8+1
  10. typedef struct{
  11. unsigned long ID;
  12. char status;//0 离线 1--在线(不在此群组) 2--在线(在此群组)
  13. char name[POC_USER_NAME_LEN];
  14. }SUT_POC_USER;
  15. typedef struct{
  16. unsigned long ID;
  17. unsigned short usernum;//组内成员个数
  18. char name[POC_GROUP_NAME_LEN];
  19. unsigned char status;
  20. }SUT_POC_GROUP;
  21. typedef struct{
  22. unsigned char Logined;//POC登陆状态 0--未登录 1--已登陆
  23. unsigned char FirstLogined;//首次登陆标志 0--未登陆 1--第一次已登陆
  24. unsigned char CardStatus; // 是否插卡
  25. unsigned char Speaker; //远程说话标志 1有人说 0无人说
  26. unsigned char TTS; //TTS播报标志 1有播报 0无播报
  27. unsigned char Mic; //Mic 0--关闭 1--打开
  28. unsigned char ModemPowerOn;//1--模块已上电 0--模块未上电
  29. unsigned char PPTpress;//PPT
  30. unsigned char ModemInactiveCt;//当模块启动后,每秒加1,收到模块AT则清零,当加到一定数值仍不清零则重启模块及UART。
  31. unsigned short PocLostCt;//当模块首次登陆系统后,如果再离线开始计数,每秒加1,直到模块再次登陆POC系统才清零,当加到一定数值仍不清零则重启模块及UART
  32. unsigned short UserOnLineNum;//组内在线成员个数
  33. unsigned short UserOnLineIndex; // 成员进退下标
  34. unsigned char QuickGroupUserCt; //快捷 群组成员状态倒计时
  35. //以下用于存储本机用户ID和用户名,本机所处的群组ID和群组明
  36. SUT_POC_USER LocalUser;
  37. SUT_POC_GROUP LocalGroup;
  38. //以下是当前群组所有成员
  39. unsigned short handleIndex;
  40. unsigned char GetOneUserFlag;
  41. unsigned char FillUserIndex;
  42. unsigned char UserNum_Update;
  43. unsigned char GroupNum_Update;
  44. int GroupsNum;
  45. char Callname[POC_USER_NAME_LEN];//??+4
  46. unsigned long CallID;
  47. SUT_POC_USER AllUsers[POC_ALL_USERS_NUM];
  48. SUT_POC_GROUP AllGroups[POC_ALL_GROUPS_NUM];
  49. char switchGroupID[8];
  50. unsigned char danHunStatus;//0 未单呼状态,1 单呼状态
  51. unsigned char statusChaned;//用来修复当低优先级用户一直在讲话,不释放,然后被抢麦,
  52. //只要抢麦者释放话语权后,低优先级用户显示出群组名字,再
  53. //被抢麦,都会显示有问题。第二次以后都会。
  54. unsigned char modemRstFlag;
  55. unsigned char loginResult;//登陆状态 0未登陆 1账号信息错误 2无网络连接 3 登陆成功 4 请插卡
  56. unsigned char codeType;//编码器选择
  57. unsigned char ExceptionReadNum; //期望读取个数
  58. unsigned char ListFillIndex;
  59. unsigned int ListCurOnlineNum;
  60. unsigned char ListUpdate;
  61. unsigned char ListType;
  62. unsigned char ListGetOneFlag;
  63. unsigned char HeadSetPtt;
  64. unsigned char UserIdTemp[POC_USER_ID_LEN];
  65. unsigned char GroupIdTemp[POC_USER_ID_LEN];
  66. }SUT_POC_STATUS;
  67. extern SUT_POC_STATUS sutPocStatus;
  68. extern int g_iModemVer;
  69. extern unsigned char g_iPocVer[20];
  70. extern unsigned long g_ulGroupID;
  71. char PocHandle(char *msg);
  72. void ExchangeHighLowByte(char *src,unsigned short lenth);
  73. char IndexReturnBySymbol(char *src,char Symbol,char num);
  74. void TTSdaxieguibi(char *src);
  75. #endif