⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 svgsmadisp.cpp

📁 七号信令解码器
💻 CPP
📖 第 1 页 / 共 5 页
字号:
			 {bytedisp(0x0a)  //Progress indicator
			  bytedisp(0x0b)  //Progress indicator LI
			  *dispbuf++=0x0c; //location
			  *dispbuf++=0;
			  *dispbuf++=4;
			  *dispbuf++=*recbuf<<4;
			  *dispbuf++=0xcc;
			  *dispbuf++=0x0d; //coding standard
			  *dispbuf++=0;
			  *dispbuf++=2;
			  *dispbuf++=*recbuf<<1;
			  *dispbuf++=0xcc;
			  recbuf++;
			  *dispbuf++=0x0e; //Progress description
			  *dispbuf++=0;
			  *dispbuf++=7;
			  *dispbuf++=*recbuf<<1;
			  *dispbuf++=0xcc;
			  recbuf++;
			  displen+=15;
			 }//Progress indicator
			 if((*recbuf&0x7f)==0x7e)//User-user
			 {bytedisp(0x0d)  //IEI
			  procUSERtoUSER(0x0e);//User-user
			 }//User-user
			 break;

		 case 0x41://Alerting(MS to network)
			 if((*recbuf&0x7f)==0x1c) procVARInfoUnit(0x07);//Facility
			 if((*recbuf&0x7f)==0x7e)//User-user
			 {bytedisp(0x0a)  //IEI
			  procUSERtoUSER(0x0b);//User-user
			 }//User-user
			 if((*recbuf&0x7f)==0x7f)//SS version
			 {bytedisp(0x0e)  //IEI
			  procUSERtoUSER(0x0f);//User-user
			 }//User-user
			 break;

		 case 0x08://Call confirmed
		 case 0x48://Call confirmed
			 if((*recbuf&0xf0)==0xd0) {bytedisp(0x07)} //Repeat Indicator
			 if((*recbuf&0x7f)==0x04) procVARInfoUnit(0x08); //承载能力1
			 if((*recbuf&0x7f)==0x04) procVARInfoUnit(0x0b); //承载能力1
			 if((*recbuf&0x7f)==0x08)
			 {bytedisp(0x0e)  //IEI
			  procDTAPCCCause(0x0f);  //cause
			 }
			 break;

		 case 0x02://Call proceeding
		 case 0x42://Call proceeding
			 if((*recbuf&0xf0)==0xd0) {bytedisp(0x07)}//Repeat Indicator
			 if((*recbuf&0x7f)==0x04) procVARInfoUnit(0x08); //承载能力1
			 if((*recbuf&0x7f)==0x04) procVARInfoUnit(0x0b); //承载能力1
			 if((*recbuf&0x7f)==0x1c) procVARInfoUnit(0x0e); //承载能力1
			 if((*recbuf&0x7f)==0x1e)
			 {bytedisp(0x11)  //Progress indicator
			  bytedisp(0x12)  //LI
			  procPROGRESSIN(0x13);
			 }//Progress indicator
			 break;

		 case 0x39://Congestion control
		 case 0x79://Congestion control
			  *dispbuf++=0x07;//Congestion level
			  *dispbuf++=0;
			  *dispbuf++=4;
			  *dispbuf++=*recbuf<<4;
			  *dispbuf++=0xcc;
			  displen+=5;
			  recbuf++;
			 if((*recbuf&0x7f)==0x08)
			 {bytedisp(0x08)  //IEI
			  procDTAPCCCause(0x09);  //cause
			 }
			 break;

		 case 0x07://connect(network to MS)
			 if((*recbuf&0x7f)==0x1c) procVARInfoUnit(0x07);//Facility
			 if((*recbuf&0x7f)==0x1e)
			 {bytedisp(0x0a)  //Progress indicator
			  bytedisp(0x0b)  //LI
			  procPROGRESSIN(0x0c); //Progress indicator
			 }
			 if((*recbuf&0x7f)==0x4c)//Connected number
			 {bytedisp(0x0f)  //IEI
			  li=*recbuf;
			  bytedisp(0x10)  //LI
			  if((*recbuf&0x80)==0)//exist 3a
			  {*dispbuf++=0x11;  //Number plan identification
			   *dispbuf++=0;
			   *dispbuf++=4;
			   *dispbuf++=*recbuf<<4;
			   *dispbuf+=0xcc;
			   *dispbuf++=0x12; //type of Number
			   *dispbuf++=0;
			   *dispbuf++=3;
			   *dispbuf++=*recbuf<<1;
			   *dispbuf++=0xcc;
			   recbuf++;
			   *dispbuf++=0x13; //Screening indicator
			   *dispbuf++=0;
			   *dispbuf++=2;
			   *dispbuf++=*recbuf<<6;
			   *dispbuf++=0xcc;
			   *dispbuf++=0x14; //Presentation indicator
			   *dispbuf++=0;
			   *dispbuf++=2;
			   *dispbuf++=*recbuf<<1;
			   *dispbuf++=0xcc;
			   li-=2;
			   displen+=20;
			  }
			  else
			  {*dispbuf++=0x11;  //Number plan identification
			   *dispbuf++=0;
			   *dispbuf++=4;
			   *dispbuf++=*recbuf<<4;
			   *dispbuf++=0xcc;
			   *dispbuf++=0x12; //type of Number
			   *dispbuf++=0;
			   *dispbuf++=3;
			   *dispbuf++=*recbuf<<1;
			   *dispbuf++=0xcc;
			   recbuf++;
			   displen+=10;
			   li--;
			  }
			  *dispbuf++=0x15; //Number digit
			  *dispbuf++=0;
			  if((*(recbuf+li-1)&0xf0)==0xf0) *dispbuf++=li*8-4;
			  else *dispbuf++=li*8;
			  for(i=0;i<li;i++) {*dispbuf++=(*recbuf>>4)|(*recbuf<<4);recbuf++;}
			  *dispbuf++=0xcc;
			  displen+=li+3;
			 }//Connected number
			 if((*recbuf&0x7f)==0x4d)//Connected subaddress
			 {bytedisp(0x16)  //IEI
			  li=*recbuf;
			  bytedisp(0x17)  //LI
			  oddeven=*recbuf&0x08;
			  bytedisp(0x18)  //type of subaddr and odd/even indicator
			  li--;
			  *dispbuf++=0x19; //subaddr information
			  *dispbuf++=0;
			  if(oddeven==0x08) *dispbuf++=li*8-4;
			  else *dispbuf++=li*8;
			  for(i=0;i<li;i++) {*dispbuf++=(*recbuf>>4)|(*recbuf<<4);recbuf++;}
			  *dispbuf++=0xcc;
			  displen+=li+3;
			 }//Connected subaddress
			 if((*recbuf&0x7f)==0x7e)//User-user
			 {bytedisp(0x1a)  //IEI
			  procUSERtoUSER(0x1b);//User-user
			 }//User-user
			 break;

		 case 0x47://connect(MS to network)
			 if((*recbuf&0x7f)==0x1c) procVARInfoUnit(0x07);//Facility
			 if((*recbuf&0x7f)==0x1e)
			 if((*recbuf&0x7f)==0x4d)//Connected subaddress
			 {bytedisp(0x0a)  //IEI
			  li=*recbuf;
			  bytedisp(0x0b)  //LI
			  oddeven=*recbuf&0x08;
			  bytedisp(0x0c)  //type of subaddr and odd/even indicator
			  li--;
			  *dispbuf++=0x0d; //subaddr information
			  *dispbuf++=0;
			  if(oddeven==0x08) *dispbuf++=li*8-4;
			  else *dispbuf++=li*8;
			  for(i=0;i<li;i++) {*dispbuf++=(*recbuf>>4)|(*recbuf<<4);recbuf++;}
			  *dispbuf++=0xcc;
			  displen+=li+3;
			 }//Connected subaddress
			 if((*recbuf&0x7f)==0x7e)//User-user
			 {bytedisp(0x0e)  //IEI
			  procUSERtoUSER(0x0f);//User-user
			 }//User-user
			 if((*recbuf&0x7f)==0x7f)//SS version
			 {bytedisp(0x12)  //IEI
			  li=*recbuf;
			  bytedisp(0x13)  //LI
			  if(li!=0) {bytedisp(0x14)}  //SS version
			 }//SS version
			 break;

		 case 0x25://Disconnect(network to MS)
			 procDTAPCCCause(0x07);
			 if((*recbuf&0x7f)==0x1c) procVARInfoUnit(0x0d);//Facility
			 if((*recbuf&0x7f)==0x1e)
			 {bytedisp(0x10)  //Progress indicator
			  bytedisp(0x11)  //LI
			  procPROGRESSIN(0x12); //Progress indicator
			 }
			 if((*recbuf&0x7f)==0x7e)//User-user
			 {bytedisp(0x15)  //IEI
			  procUSERtoUSER(0x16);
			 }//User-user
			 break;

		 case 0x65://Disconnect(MS to network)
			 procDTAPCCCause(0x07);
			 if((*recbuf&0x7f)==0x1c) procVARInfoUnit(0x0d);//Facility
			 if((*recbuf&0x7f)==0x7e)//User-user
			 {bytedisp(0x10)  //IEI
			  procUSERtoUSER(0x11);//User-user
			 }//User-user
			 if((*recbuf&0x7f)==0x7f)//SS version
			 {bytedisp(0x14)  //IEI
			  li=*recbuf;
			  bytedisp(0x15)  //LI
			  if(li!=0) {bytedisp(0x16)}  //SS version
			 }//SS version
			 break;

		 case 0x4e://Emergency setup(MS to network)
			 if((*recbuf&0x7f)==0x04) //承载能力
			 {bytedisp(0x07)  //IEI
			  bytedisp(0x08)  //LI
			  bytedisp(0x09)  //承载能力
			 }//承载能力
			 break;

		 case 0x3a://Facility(network to MS)(0x3a)
			 li=*recbuf;
			 bytedisp(0x07)  //LI
			 *dispbuf++=0x08;//Facility
			 *dispbuf++=li;
			 for(i=0;i<li;i++) *dispbuf++=*recbuf++;
			 *dispbuf++=0xcc;
			 displen+=li+3;
			 break;

		 case 0x7a://Facility(MS to network)(0x3a)
			 li=*recbuf;
			 bytedisp(0x07)  //LI
			 *dispbuf++=0x08;//Facility
			 *dispbuf++=li;
			 for(i=0;i<li;i++) *dispbuf++=*recbuf++;
			 *dispbuf++=0xcc;
			 displen+=li+3;
			 if((*recbuf&0x7f)==0x7f)//SS version
			 {bytedisp(0x09)  //IEI
			  li=*recbuf;
			  bytedisp(0x0a)  //LI
			  if(li!=0) {bytedisp(0x0b)}  //SS version
			 }//SS version
			 break;

		 case 0x1a://Hold reject
		 case 0x5a://Hold reject
			 procDTAPCCCause(0x07);
			 break;

		 case 0x17://Modify
		 case 0x57://Modify
		 case 0x1f://Modify complete
		 case 0x5f://Modify complete
			 li=*recbuf;  //get 承载能力 len
			 bytedisp(0x07)  //承载能力 len
			 *dispbuf++=0x08;
			 *dispbuf++=li;
			 for(i=0;i<li;i++) *dispbuf++=*recbuf++;
			 *dispbuf++=0xcc;
			 displen+=li+3;
			 if((*recbuf&0x7f)==0x7c) procVARInfoUnit(0x09);//低层兼容性
			 if((*recbuf&0x7f)==0x7d)//高层兼容性
			 {bytedisp(0x0c)  //IEI
			  procHighLayerComp(0x0d);//高层兼容性	  
			 }//高层兼容性
			 if(*recbuf==0xa3) {bytedisp(0x13)} //Reverse call setup direction
			 break;

		 case 0x3e://Notify
		 case 0x7e://Notify
			 bytedisp(0x07)  //Notification indicator
			 break;

		 case 0x03://Progress
		 case 0x43://Progress
			 bytedisp(0x08)  //Progress indicator len
			 procPROGRESSIN(0x09); //Progress indicator
			 if((*recbuf&0x7f)==0x7e)//User-user
			 {bytedisp(0x0d)  //IEI
			  procUSERtoUSER(0x0e);//User-user
			 }//User-user
			 break;

		 case 0x2d://Release(network to MS)
			 if((*recbuf&0x7f)==0x08)//Cause
			 {bytedisp(0x07)  //IEI
			  procDTAPCCCause(0x08);//Cause
			 }//Cause
			 if((*recbuf&0x7f)==0x08)//second Cause
			 {bytedisp(0x0e)  //IEI
			  procDTAPCCCause(0x0f);//second Cause
			 }//second Cause
			 if((*recbuf&0x7f)==0x1c) procVARInfoUnit(0x15);//Facility
			 if((*recbuf&0x7f)==0x7e)//User-user
			 {bytedisp(0x18)  //IEI
			  procUSERtoUSER(0x19);//User-user
			 }//User-user
			 break;

		 case 0x6d://Release(MS to network)
			 if((*recbuf&0x7f)==0x08)//Cause
			 {bytedisp(0x07)  //IEI
			  procDTAPCCCause(0x08);//Cause
			 }//Cause
			 if((*recbuf&0x7f)==0x08)//second Cause
			 {bytedisp(0x0e)  //IEI
			  procDTAPCCCause(0x0f);//second Cause
			 }//second Cause
			 if((*recbuf&0x7f)==0x1c) procVARInfoUnit(0x15);//Facility
			 if((*recbuf&0x7f)==0x7e)//User-user
			 {bytedisp(0x18)  //IEI
			  procUSERtoUSER(0x19);//User-user
			 }//User-user
			 if((*recbuf&0x7f)==0x7f)//SS version
			 {bytedisp(0x1c)  //IEI
			  li=*recbuf;
			  bytedisp(0x1d)  //LI
			  if(li!=0) {bytedisp(0x1e)}  //SS version
			 }//SS version
			 break;

		 case 0x2a://Release complete(network to MS)
			 if((*recbuf&0x7f)==0x08)//Cause
			 {bytedisp(0x07)  //IEI
			  procDTAPCCCause(0x08);//Cause
			 }//Cause
			 if((*recbuf&0x7f)==0x1c) procVARInfoUnit(0x0e);//Facility
			 if((*recbuf&0x7f)==0x7e)//User-user
			 {bytedisp(0x11)  //IEI
			  procUSERtoUSER(0x12);//User-user
			 }//User-user
			 break;

		 case 0x6a://Release complete(MS to network)
			 if((*recbuf&0x7f)==0x08)//Cause
			 {bytedisp(0x07)  //IEI
			  procDTAPCCCause(0x08);//Cause
			 }//Cause
			 if((*recbuf&0x7f)==0x1c) procVARInfoUnit(0x0e);//Facility
			 if((*recbuf&0x7f)==0x7e)//User-user
			 {bytedisp(0x11)  //IEI
			  procUSERtoUSER(0x12);//User-user
			 }//User-user
			 if((*recbuf&0x7f)==0x7f)//SS version
			 {bytedisp(0x15)  //IEI
			  li=*recbuf;
			  bytedisp(0x16)  //LI
			  if(li!=0) {bytedisp(0x17)}  //SS version
			 }//SS version
			 break;

		 case 0x1e://Retrieve reject
		 case 0x5e://Retrieve reject
		 case 0x37://Start DTMF reject
		 case 0x77://Start DTMF reject
			  procDTAPCCCause(0x07);//Cause
			  break;

		 case 0x05://Setup(mobile terminated call establishment)
			 if((*recbuf&0xf0)==0xd0) {bytedisp(0x07)}  //BC repeat indicator
			 if((*recbuf&0x7f)==0x04) procVARInfoUnit(0x08);//承载能力1
			 if((*recbuf&0x7f)==0x04) procVARInfoUnit(0x0b);//承载能力2
			 if((*recbuf&0x7f)==0x1c) procVARInfoUnit(0x0e);//Facility
			 if((*recbuf&0x7f)==0x1e)//Progress indicator
			 {bytedisp(0x11)  //Progress indicator IEI
			  bytedisp(0x12)  //Progress indicator len
			  procPROGRESSIN(0x13); //Progress indicator
			 }//Progress indicator
			 if((*recbuf&0x7f)==0x34)//Signal
			 {bytedisp(0x16)  //Signal IEI
			  bytedisp(0x17)  //Signal
			 }//Signal
			 if((*recbuf&0x7f)==0x5c)//主叫号码
			 {bytedisp(0x18)  //主叫号码 IEI
			  li=*recbuf;  //get LI
			  bytedisp(0x19)  //主叫号码 li
			  *dispbuf++=0x1a; //Number plan identification
			  *dispbuf++=0;
			  *dispbuf++=4;
			  *dispbuf++=*recbuf<<4;
			  *dispbuf++=0xcc;
			  *dispbuf++=0x1b; //type of Number
			  *dispbuf++=0;
			  *dispbuf++=3;
			  *dispbuf++=*recbuf<<1;
			  *dispbuf++=0xcc;
			  displen+=10;
			  if((*recbuf&0x80)==0)
			  {recbuf++; li--;
			   *dispbuf++=0x1c; //Screening indicator
			   *dispbuf++=0;
			   *dispbuf++=2;
			   *dispbuf++=*recbuf<<6;
			   *dispbuf++=0xcc;
			   *dispbuf++=0x1d; //Presentation indicator
			   *dispbuf++=0;
			   *dispbuf++=2;
			   *dispbuf++=*recbuf<<1;
			   *dispbuf++=0xcc;
			   displen+=10;
			  }
			  recbuf++; li--;
			  if((*(recbuf+li-1)&0xf0)==0xf0)  //odd
			  {*dispbuf++=0x1e;  //主叫号码 Number digit
			   *dispbuf++=0;
			   *dispbuf++=li*8-4;
			   for(i=0;i<li;i++) 
			   {*dispbuf++=(*recbuf>>4)|(*recbuf<<4);recbuf++;}
			   *dispbuf++=0xcc;
			   displen+=li+3;
			  }//odd
			  else //even
			  {*dispbuf++=0x1e;  //主叫号码 Number digit
			   *dispbuf++=0;
			   *dispbuf++=li*8;
			   for(i=0;i<li;i++) 
			   {*dispbuf++=(*recbuf>>4)|(*recbuf<<4);recbuf++;}
			   *dispbuf++=0xcc;
			   displen+=li+3;
			  }//even
			 }//主叫号码
			 if((*recbuf&0x7f)==0x54)//主叫子地址
			 {bytedisp(0x1f)  //主叫子地址 IEI
			  procDTAPsubaddr(0x20);
			 }//主叫子地址
			 if((*recbuf&0x7f)==0x5e)//被叫号码
			 {bytedisp(0x23)  //被叫号码 IEI
			  procDTAPcalledNO(0x24);
			 }//被叫号码
			 if((*recbuf&0x7f)==0x6d)//被叫子地址
			 {bytedisp(0x28)  //被叫子地址 IEI
			  procDTAPsubaddr(0x29);
			 }//被叫子地址
			 if((*recbuf&0xf0)==0xd0) {bytedisp(0x2c)}  //LLC repear indicator
			 if((*recbuf&0x7f)==0x7c) procVARInfoUnit(0x2d);//低层兼容性1
			 if((*recbuf&0x7f)==0x7c) procVARInfoUnit(0x30);//低层兼容性2
			 if((*recbuf&0xf0)==0xd0) {bytedisp(0x33)}  //HLC repear indicator
			 if((*recbuf&0x7f)==0x7d)//高层兼容性1
			 {bytedisp(0x34)  //IEI
			  procHighLayerComp(0x35);//高层兼容性1
			 }//高层兼容性1
			 if((*recbuf&0x7f)==0x7d)//高层兼容性2
			 {bytedisp(0x3b)  //IEI
			  procHighLayerComp(0x3c);//高层兼容性2
			 }//高层兼容性2
			 if((*recbuf&0x7f)==0x7e)//User-user
			 {bytedisp(0x42)  //IEI
			  procUSERtoUSER(0x43);//User-user
			 }//User-user
			 break;

		 case 0x45://Setup(mobile originating establishment)
			 if((*recbuf&0xf0)==0xd0) {bytedisp(0x07)}  //BC repeat indicator
			 if((*recbuf&0x7f)==0x04) procVARInfoUnit(0x08);//承载能力1
			 if((*recbuf&0x7f)==0x04) procVARInfoUnit(0x0b);//承载能力2
			 if((*recbuf&0x7f)==0x1c) procVARInfoUnit(0x0e);//Facility
			 if((*recbuf&0x7f)==0x54)//主叫子地址
			 {bytedisp(0x11)  //主叫子地址 IEI
			  procDTAPsubaddr(0x12);
			 }//主叫子地址
			 if((*recbuf&0x7f)==0x5e)//被叫号码
			 {bytedisp(0x15)  //被叫号码 IEI
			  procDTAPcalledNO(0x16);
			 }//被叫号码
			 if((*recbuf&0x7f)==0x6d)//被叫子地址
			 {bytedisp(0x1a)  //被叫子地址 IEI
			  procDTAPsubaddr(0x1b);
			 }//被叫子地址
			 if((*recbuf&0xf0)==0xd0) {bytedisp(0x1e)}  //LLC repear indicator
			 if((*recbuf&0x7f)==0x7c) procVARInfoUnit(0x1f);//低层兼容性1
			 if((*recbuf&0x7f)==0x7c) procVARInfoUnit(0x22);//低层兼容性2
			 if((*recbuf&0xf0)==0xd0) {bytedisp(0x25)}  //HLC repear indicator
			 if((*recbuf&0x7f)==0x7d)//高层兼容性1
			 {bytedisp(0x26)  //IEI
			  procHighLayerComp(0x27);//高层兼容性1
			 }//高层兼容性1
			 if((*recbuf&0x7f)==0x7d)//高层兼容性2
			 {bytedisp(0x2d)  //IEI
			  procHighLayerComp(0x2e);//高层兼容性2
			 }//高层兼容性2
			 if((*recbuf&0x7f)==0x7e)//User-user
			 {bytedisp(0x34)  //IEI
			  procUSERtoUSER(0x35);//User-user
			 }//User-user
			 if((*recbuf&0x7f)==0x7f)//SS version
			 {bytedisp(0x38)  //IEI
			  li=*recbuf;
			  bytedisp(0x39)  //LI
			  if(li!=0) {bytedisp(0x3a)}  //SS version
			 }//SS version
			 if(*recbuf==0xa1) {bytedisp(0x3b)}  //CLIR suppression
			 if(*recbuf==0xa2) {bytedisp(0x3c)}  //CLIR invocation
			 break;

		 case 0x35://Start DTMF
		 case 0x75://Start DTMF
		 case 0x36://Start DTMF acknowledge
		 case 0x76://Start DTMF acknowledge
			 if((*recbuf&0x7f)==0x2c)//Keypad facility
			 {bytedisp(0x07)  //IEI
			  bytedisp(0x08)  //Keypad facility
			 }//Keypad facility
			 break;

		 case 0x3d://Status
		 case 0x7d://Status
			  procDTAPCCCause(0x07);//Cause
			  bytedisp(0x0d)  //Call state
			 if((*recbuf&0x7f)==0x2c)//Auxiliary states

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -