PocTask.h 2.8 KB

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