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

📄 ss7tranpar4.cpp

📁 VC6.0环境下的ss7isup部分的信令解释程序
💻 CPP
📖 第 1 页 / 共 2 页
字号:
		break;
	}	
	pCtrl->AddString(stroutput);
	lpar>>=2;

	stroutput=strbithead;
	stroutput+="bit GHE :Numbering plan Ind.";
	pCtrl->AddString(stroutput);
	tt=0x4;

	stroutput=strtranhead;
	for(i=0;i<3;i++)
	{
		ltemp=(lpar&tt)>>(2-i);
		switch (ltemp&1)
		{
			case 0:
				stroutput+="0";
			break;
			case 1:
				stroutput+="1";
			break;
			default:
			break;
		}
		tt>>=1;
	}
	switch (lpar&0x7)
	{
		case 0:
		case 2:
		case 7:
			stroutput+="__spare";
		break;
		case 1:
			stroutput+="__ISDN (Telephony) numbering plan (Recommendation E.164)";
		break;
			stroutput+="__spare";
		break;
		case 3:
			stroutput+="__Data numbering plan (Recommendation X.121)";
		break;
		case 4:
			stroutput+="__Telex numbering plan (Recommendation F.69)";
		break;
		case 5:
			stroutput+="__reserved for national use";
		break;
	}
	pCtrl->AddString(stroutput);

	stroutput=strbithead;
	stroutput+="bit F :Calling party number incomplete indicator (NI)";
	pCtrl->AddString(stroutput);
	stroutput=strtranhead;
	if ((lpar&0x8)==0)
	{
		stroutput+="0__complete";
	}
	else
		stroutput+="1__incomplete";
	pCtrl->AddString(stroutput);

	long j;

	stroutput=strbithead;
	stroutput+="byte 3-byte end:";
	stroutput+=str;
	stroutput+="__address signal";
	pCtrl->AddString(stroutput);

	long addressnum;
	addressnum=0;
	for(j=0;j<100;j++)
	{
		str1=str.Left(2);
		str.Delete(0,2);
		if (str.Find(",")!=-1)
			str.Delete(0,1);
		else
		{
				j=110;
		}
		lpar=strchangehex(str1);
		stroutput=strtranhead;
		strtemp.Format("address signal%d:",addressnum++);
		stroutput+=strtemp;
		//pCtrl->AddString(stroutput);
		tt=0x8;
		stroutput+=" ";
		for(i=0;i<4;i++)
		{
			ltemp=(lpar&tt)>>(3-i);
			switch (ltemp&1)
			{
				case 0:
					stroutput+="0";
				break;
				case 1:
					stroutput+="1";
				break;
				default:
				break;
			}
			tt>>=1;
		}

		strtemp.Format("%d",lpar&0x0F);
		stroutput+="__";
		stroutput+=strtemp;
		pCtrl->AddString(stroutput);



		lpar>>=4;
		stroutput=strtranhead;
		strtemp.Format("address signal%d:",addressnum++);
		stroutput+=strtemp;
		//pCtrl->AddString(stroutput);
		tt=0x8;
		stroutput+=" ";
		for(i=0;i<4;i++)
		{
			ltemp=(lpar&tt)>>(3-i);
			switch (ltemp&1)
			{
				case 0:
					stroutput+="0";
				break;
				case 1:
					stroutput+="1";
				break;
				default:
				break;
			}
			tt>>=1;
		}
		lpar&=0x0F;
		strtemp.Format("%d",lpar);
		stroutput+="__";
		stroutput+=strtemp;
		if ((j==110) && (ladroande==1))
		{
			stroutput+="(filled code)";
		}
		pCtrl->AddString(stroutput);
	}
}

void CSs7tranDlg:: tranpar_Redirection_information(CString str)
{
	long lpar;
	long ltemp,tt;
	long i;
	CString str1;
	CString stroutput;
	CString strtemp;
	CListBox *pCtrl = (CListBox *)GetDlgItem( IDC_LIST1 ) ; 	

	stroutput=str;
	stroutput+=":Redirection information";
	pCtrl->AddString(stroutput);


	str1=str.Left(2);
	str.Delete(0,3);
	lpar=strchangehex(str1);

	stroutput=strbithead;
	stroutput+="bit CBA :Nature of address indicator";
	pCtrl->AddString(stroutput);
	stroutput=strtranhead;
	tt=0x4;
	for(i=0;i<3;i++)
	{
		ltemp=(lpar&tt)>>(2-i);
		switch (ltemp&1)
		{
			case 0:
				stroutput+="0";
			break;
			case 1:
				stroutput+="1";
			break;
			default:
			break;
		}
		tt>>=1;
	}
	if ((lpar&0x7)==0)
		stroutput+="__no redirection";
	else if ((lpar&0x7)==1)
		stroutput+="__call rerouted";
	else if ((lpar&0x7)==2)
		stroutput+="__call rerouted, all redirection information presentation restricted";
	else if ((lpar&0x7)==3)
		stroutput+="__call diversion";
	else if ((lpar&0x7)==4)
		stroutput+="__call diversion, all redirection information presentation restricted";
	else if ((lpar&0x7)==5)
		stroutput+="__call rerouted, redirection number presentation restricted";
	else if ((lpar&0x7)==4)
		stroutput+="__call diversion, redirection number presentation restricted";
	else
		stroutput+="__spare";
	pCtrl->AddString(stroutput);
	lpar>>=3;

	stroutput=strbithead;
	stroutput+="bit D :Spare";
	pCtrl->AddString(stroutput);
	stroutput=strtranhead;
	tt=0x1;
	for(i=0;i<1;i++)
	{
		ltemp=(lpar&tt);
		switch (ltemp&1)
		{
			case 0:
				stroutput+="0";
			break;
			case 1:
				stroutput+="1";
			break;
			default:
			break;
		}
		tt>>=1;
	}
	lpar>>=1;

	stroutput=strbithead;
	stroutput+="bit HGFE :Original redirection reasons";
	pCtrl->AddString(stroutput);
	stroutput=strtranhead;
	tt=0x8;
	for(i=0;i<4;i++)
	{
		ltemp=(lpar&tt)>>(3-i);
		switch (ltemp&1)
		{
			case 0:
				stroutput+="0";
			break;
			case 1:
				stroutput+="1";
			break;
			default:
			break;
		}
		tt>>=1;
	}
	if ((lpar&0xF)==0)
		stroutput+="__unknown/not available";
	else if ((lpar&0xF)==1)
		stroutput+="__user busy";
	else if ((lpar&0xF)==2)
		stroutput+="__no reply";
	else if ((lpar&0xF)==3)
		stroutput+="__unconditional";
	else
		stroutput+="__spare";
	pCtrl->AddString(stroutput);


	str1=str.Left(2);
	str.Delete(0,2);
	lpar=strchangehex(str1);

	stroutput=strbithead;
	stroutput+="bit KJI :Redirection counter. Number of redirections the call has undergone expressed as a binary number between 1 and 5";
	pCtrl->AddString(stroutput);
	stroutput=strtranhead;
	tt=0x4;
	for(i=0;i<3;i++)
	{
		ltemp=(lpar&tt)>>(2-i);
		switch (ltemp&1)
		{
			case 0:
				stroutput+="0";
			break;
			case 1:
				stroutput+="1";
			break;
			default:
			break;
		}
		tt>>=1;
	}
	pCtrl->AddString(stroutput);
	lpar>>=3;

	stroutput=strbithead;
	stroutput+="bit L :Spare";
	pCtrl->AddString(stroutput);
	stroutput=strtranhead;
	tt=0x1;
	for(i=0;i<1;i++)
	{
		ltemp=(lpar&tt);
		switch (ltemp&1)
		{
			case 0:
				stroutput+="0";
			break;
			case 1:
				stroutput+="1";
			break;
			default:
			break;
		}
		tt>>=1;
	}
	lpar>>=1;

	stroutput=strbithead;
	stroutput+="bit PONM :Redirecting reason";
	pCtrl->AddString(stroutput);
	stroutput=strtranhead;
	tt=0x8;
	for(i=0;i<4;i++)
	{
		ltemp=(lpar&tt)>>(3-i);
		switch (ltemp&1)
		{
			case 0:
				stroutput+="0";
			break;
			case 1:
				stroutput+="1";
			break;
			default:
			break;
		}
		tt>>=1;
	}
	if ((lpar&0xF)==0)
		stroutput+="__unknown/not available";
	else if ((lpar&0xF)==1)
		stroutput+="__user busy";
	else if ((lpar&0xF)==2)
		stroutput+="__no reply";
	else if ((lpar&0xF)==3)
		stroutput+="__unconditional";
	else if ((lpar&0xF)==4)
		stroutput+="__deflection during alerting";
	else if ((lpar&0xF)==5)
		stroutput+="__deflection immediate response";
	else if ((lpar&0xF)==6)
		stroutput+="__mobile subscriber not reachable";
	else
		stroutput+="__spare";
	pCtrl->AddString(stroutput);
}

void CSs7tranDlg:: tranpar_Redirection_number(CString str)
{
	long lpar;
	long ltemp,tt;
	long i;
	long ladroande;
	CString stroutput;
	CString str1;
	CString strtemp;
	CListBox *pCtrl = (CListBox *)GetDlgItem( IDC_LIST1 ) ; 	

	ladroande=0;
	stroutput=str;
	stroutput+=":Redirection number";
	pCtrl->AddString(stroutput);


	str1=str.Left(2);
	str.Delete(0,3);
	lpar=strchangehex(str1);


	stroutput=strbithead;
	stroutput+="byte 1:";
	stroutput+=str1;
	pCtrl->AddString(stroutput);
	stroutput=strbithead;
	stroutput="bit GFEDCBA :Nature of address indicator";
	pCtrl->AddString(stroutput);
	tt=0x40;
	stroutput=strtranhead;
	for(i=0;i<7;i++)
	{
		ltemp=(lpar&tt)>>(6-i);
		switch (ltemp&1)
		{
			case 0:
				stroutput+="0";
			break;
			case 1:
				stroutput+="1";
			break;
			default:
			break;
		}
		tt>>=1;
	}
	if ((lpar&0x7F)==0)
		stroutput+="__spare";
	else if ((lpar&0x7F)==1)
		stroutput+="__subscriber number";
	else if ((lpar&0x7F)==2)
		stroutput+="__unknown";
	else if ((lpar&0x7F)==3)
		stroutput+="__national (significant) number";
	else if ((lpar&0x7F)==4)
		stroutput+="__international number";
	else if (((lpar&0x7F)>=5) && ((lpar&0x7F)<=0x6F))
		stroutput+="__spare";
	else if (((lpar&0x7F)>=0x70) && ((lpar&0x7F)<=0x7E))
		stroutput+="__reserved for national use";
	else if ((lpar&0x7F)==0x7F)
		stroutput+="__spare";
	else
		stroutput+="__spare";
	pCtrl->AddString(stroutput);
	
	stroutput=strbithead;
	stroutput+="bit F :Odd/even indicator";
	pCtrl->AddString(stroutput);
	stroutput=strtranhead;
	if ((lpar&0x80)==0x80)
	{
		stroutput+="1__odd number of address signals";
		ladroande=1;
	}
	else
	{
		stroutput+="0__even number of address signals";
		ladroande=0;
	}
	pCtrl->AddString(stroutput);


	str1=str.Left(2);
	str.Delete(0,3);
	lpar=strchangehex(str1);
	stroutput=strbithead;
	stroutput+="byte 2:";
	stroutput+=str1;
	pCtrl->AddString(stroutput);

	stroutput=strbithead;
	stroutput+="bit BA :Screening indicator";
	pCtrl->AddString(stroutput);
	tt=0x2;
	stroutput=strtranhead;
	for(i=0;i<2;i++)
	{
		ltemp=(lpar&tt)>>(1-i);
		switch (ltemp&1)
		{
			if (i==0)
			case 0:
				stroutput+="0";
			break;
			case 1:
				stroutput+="1";
			break;
			default:
			break;
		}
		tt>>=1;
	}
	switch (lpar&0x3)
	{
		case 0:
		case 2:
			stroutput+="__spare";
		break;
		case 1:
			stroutput+="__user provided, verified and passed";
		break;
		case 3:
			stroutput+="__network provided";
		break;
		default:
		break;
	}	
	pCtrl->AddString(stroutput);
	lpar>>=2;


	stroutput=strbithead;
	stroutput+="bit DC :Address presentation restricted (Pres. Restric.) indicator";
	pCtrl->AddString(stroutput);
	tt=0x2;
	stroutput=strtranhead;
	for(i=0;i<2;i++)
	{
		ltemp=(lpar&tt)>>(1-i);
		switch (ltemp&1)
		{
			case 0:
				stroutput+="0";
			break;
			case 1:
				stroutput+="1";
			break;
			default:
			break;
		}
		tt>>=1;
	}
	switch (lpar&0x3)
	{
		case 0:
			stroutput+="__presentation allowed";
		break;
		case 1:
			stroutput+="__presentation restricted";
		break;
		case 2:
			stroutput+="__address not available";
		break;
		case 3:
			stroutput+="__spare";
		break;
		default:
		break;
	}	
	pCtrl->AddString(stroutput);
	lpar>>=2;

	stroutput=strbithead;
	stroutput+="bit GHE :Numbering plan Ind.";
	pCtrl->AddString(stroutput);
	tt=0x4;

	stroutput=strtranhead;
	for(i=0;i<3;i++)
	{
		ltemp=(lpar&tt)>>(2-i);
		switch (ltemp&1)
		{
			case 0:
				stroutput+="0";
			break;
			case 1:
				stroutput+="1";
			break;
			default:
			break;
		}
		tt>>=1;
	}
	switch (lpar&0x7)
	{
		case 0:
		case 2:
		case 7:
			stroutput+="__spare";
		break;
		case 1:
			stroutput+="__ISDN (Telephony) numbering plan (Recommendation E.164)";
		break;
			stroutput+="__spare";
		break;
		case 3:
			stroutput+="__Data numbering plan (Recommendation X.121)";
		break;
		case 4:
			stroutput+="__Telex numbering plan (Recommendation F.69)";
		break;
		case 5:
			stroutput+="__reserved for national use";
		break;
	}
	pCtrl->AddString(stroutput);

	stroutput=strbithead;
	stroutput+="bit F :Calling party number incomplete indicator (NI)";
	pCtrl->AddString(stroutput);
	stroutput=strtranhead;
	if ((lpar&0x8)==0)
	{
		stroutput+="0__complete";
	}
	else
		stroutput+="1__incomplete";
	pCtrl->AddString(stroutput);

	long j;

	stroutput=strbithead;
	stroutput+="byte 3-byte end:";
	stroutput+=str;
	stroutput+="__address signal";
	pCtrl->AddString(stroutput);

	long addressnum;
	addressnum=0;
	for(j=0;j<100;j++)
	{
		str1=str.Left(2);
		str.Delete(0,2);
		if (str.Find(",")!=-1)
			str.Delete(0,1);
		else
		{
				j=110;
		}
		lpar=strchangehex(str1);
		stroutput=strtranhead;
		strtemp.Format("address signal%d:",addressnum++);
		stroutput+=strtemp;
		//pCtrl->AddString(stroutput);
		tt=0x8;
		stroutput+=" ";
		for(i=0;i<4;i++)
		{
			ltemp=(lpar&tt)>>(3-i);
			switch (ltemp&1)
			{
				case 0:
					stroutput+="0";
				break;
				case 1:
					stroutput+="1";
				break;
				default:
				break;
			}
			tt>>=1;
		}

		strtemp.Format("%d",lpar&0x0F);
		stroutput+="__";
		stroutput+=strtemp;
		pCtrl->AddString(stroutput);



		lpar>>=4;
		stroutput=strtranhead;
		strtemp.Format("address signal%d:",addressnum++);
		stroutput+=strtemp;
		//pCtrl->AddString(stroutput);
		tt=0x8;
		stroutput+=" ";
		for(i=0;i<4;i++)
		{
			ltemp=(lpar&tt)>>(3-i);
			switch (ltemp&1)
			{
				case 0:
					stroutput+="0";
				break;
				case 1:
					stroutput+="1";
				break;
				default:
				break;
			}
			tt>>=1;
		}
		lpar&=0x0F;
		strtemp.Format("%d",lpar);
		stroutput+="__";
		stroutput+=strtemp;
		if ((j==110) && (ladroande==1))
		{
			stroutput+="(filled code)";
		}
		pCtrl->AddString(stroutput);
	}
}

void CSs7tranDlg:: tranpar_Redirection_number_restriction(CString str)
{
	long lpar;
	long ltemp,tt;
	long i;
	CString str1;
	CString strtemp;
	CString stroutput;
	CListBox *pCtrl = (CListBox *)GetDlgItem( IDC_LIST1 ) ; 	

	stroutput=str;
	stroutput+=":Redirection number restriction parameter";
	pCtrl->AddString(stroutput);


	str1=str.Left(2);
	str.Delete(0,2);
	lpar=strchangehex(str1);

	stroutput=strbithead;
	stroutput+="bit BA :Presentation restricted indicator";
	pCtrl->AddString(stroutput);
	stroutput=strtranhead;
	tt=0x2;
	for(i=0;i<2;i++)
	{
		ltemp=(lpar&tt)>>(1-i);
		switch (ltemp&1)
		{
			case 0:
				stroutput+="0";
			break;
			case 1:
				stroutput+="1";
			break;
			default:
			break;
		}
		tt>>=1;
	}
	if ((lpar&0x3)==0)
		stroutput+="__Presentation allowed";
	else if ((lpar&0x3)==1)
		stroutput+="__Presentation restricted";
	else
		stroutput+="__spare";
	pCtrl->AddString(stroutput);
	lpar>>=2;

	stroutput=strbithead;
	stroutput+="bit HGFEDC :Spare";
	pCtrl->AddString(stroutput);
	tt=0x20;
	for(i=0;i<6;i++)
	{
		ltemp=(lpar&tt)>>(6-i);
		switch (ltemp&1)
		{
			if (i==0)
				stroutput+="     ";
			case 0:
				stroutput+="0";
			break;
			case 1:
				stroutput+="1";
			break;
			default:
			break;
		}
		tt>>=1;
	}
	pCtrl->AddString(stroutput);
}

void CSs7tranDlg:: tranpar_Remote_operations(CString str)
{
}

⌨️ 快捷键说明

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