12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- /**********************************************************************************
- * File Name: Poc.c
- * Function Describe:device for Poc
- * Relate Module:
- * Explain: the modem must be using ZTE MC8332
- * Writer: ShiLiangWen
- * Date: 2015.7.10
- ***********************************************************************************/
- #define THIS_FILE_ID 15
- #include "includes.h"
- SUT_POC_STATUS sutPocStatus;
- /********************************************************************
- *********************************************************************/
- void PocHandle(char *msg)
- {
-
- static unsigned char sucPocSpkFlag=0;//标识POC语音是否处于打开状态
- char *pName;
- int i;
- if(msg[1]=='Z' && msg[4]=='S'){//+ZTTS:0
- if(!sucPocSpkFlag)SpeakerDisable();//TTS语音播放结束后,如果POC语音处于非打开状态,才关闭PA
- return;
- }
- //==============+POC:xxxx=============
- //+POC:820100000000 +POC:8201ffffffff
- //+POC:82 02 00002c8d 4b6dd58b3100300032000000 登陆成功,提示“测试102”
- if(msg[5]=='8' && msg[6]=='2'){
- if(msg[8]=='2'){
- sutPocStatus.Logined=1;
- if(0==sutPocStatus.FirstLogin){//如果是首次登陆,则打开音频功放,允许播放提示
- sutPocStatus.FirstLogin=1;
- SpeakerEnable();
- }
- strncpy(sutPocStatus.UserName,&msg[17],POC_USER_NAME_LEN);
- SetLedIndicator(IndStandby);
- }else{
- sutPocStatus.Logined=0;
- SpeakerDisable();
- SetLedIndicator(IndNoNet);
- }
- }
- //+POC:86 00 000000dc a47fc47e3300 0000 进入群组,提示“群组3”(群组ID为000000dc,群组名为“群组3”即a47fc47e3300)
- if(msg[5]=='8' && msg[6]=='6'){
- if(0==sutPocStatus.FirstLogin){//如果是首次登陆,则打开音频功放,允许播放提示
- sutPocStatus.FirstLogin=1;
- SpeakerEnable();
- }
- strncpy(sutPocStatus.GroupName,&msg[17],POC_GROUP_NAME_LEN);
- SetLedIndicator(IndStandby);
- }
-
- //+POC:8b0001--有语音说话 +POC:8b0000--语音结束
- if(msg[5]=='8' && msg[6]=='b'){
- if(msg[10]=='1'){
- sucPocSpkFlag=1;
- SpeakerEnable();
- SetLedIndicator(IndRX);
- }else if(msg[10]=='0'){
- sucPocSpkFlag=0;
- SpeakerDisable();
- SetLedIndicator(IndStandby);
- }
- }
- //+POC:8301
- if(msg[5]=='8' && msg[6]=='3'){
- if(msg[8]=='0'){
- sutPocStatus.Spker=0;
- }else if(msg[8]=='1'){
- sutPocStatus.Spker=1;
- }
- }
- }
|