📄 ss7tranpar2.cpp
字号:
}
tt>>=1;
}
if ((lpar&0x7)==0)
stroutput+="__BCD even: (even number of digits)";
else if ((lpar&0x7)==1)
stroutput+="__BCD odd: (odd number of digits)";
else if ((lpar&0x7)==2)
stroutput+="__IA5 character";
else if ((lpar&0x7)==3)
stroutput+="__binary coded";
else
stroutput+="__spare";
pCtrl->AddString(stroutput);
for(i=0;i<100;i++)
{
str1=str.Left(1);
if (str1=="")
{
break;
}
str.Delete(0,1);
lpar=strchangehex(str1);
stroutput=" bit H-A :Digit";
pCtrl->AddString(stroutput);
tt=0x80;
for(i=0;i<8;i++)
{
ltemp=(lpar&tt)>>(8-i);
switch (ltemp&1)
{
if (i==0)
stroutput+=" ";
case 0:
stroutput+="0";
break;
case 1:
stroutput+="1";
break;
default:
break;
}
tt>>=1;
}
strtemp.Format("%d",lpar);
stroutput+="__";
stroutput+=strtemp;
pCtrl->AddString(stroutput);
}
*/
}
void CSs7tranDlg:: tranpar_Generic_notification(CString str)
{
long lpar;
long ltemp,tt;
long i;
CString str1;
CString strtemp;
CString stroutput;
CListBox *pCtrl = (CListBox *)GetDlgItem( IDC_LIST1 ) ;
stroutput=str;
stroutput+=":Generic notification indicator";
pCtrl->AddString(stroutput);
str1=str.Left(2);
str.Delete(0,2);
lpar=strchangehex(str1);
stroutput=strbithead;
stroutput+="bit GFEDCBA:Notification indicator";
pCtrl->AddString(stroutput);
stroutput=strtranhead;
tt=0x40;
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;
}
switch (lpar&0x7F)
{
case 0:
stroutput+="__user suspended";
break;
case 1:
stroutput+="__user resumed";
break;
case 2:
stroutput+="__bearer service change";
break;
case 3:
stroutput+="__discriminatorfor extension to ASN.1 encoded component";
break;
case 4:
stroutput+="__call completion delay";
break;
case 0x42:
stroutput+="__conference established";
break;
case 0x43:
stroutput+="__conference disconnected";
break;
case 0x44:
stroutput+="__other party added";
break;
case 0x45:
stroutput+="__isolated";
break;
case 0x46:
stroutput+="__reattached";
break;
case 0x47:
stroutput+="__other party isolated";
break;
case 0x48:
stroutput+="__other party reattached";
break;
case 0x49:
stroutput+="__other party split";
break;
case 0x4a:
stroutput+="__other party disconnected";
break;
case 0x4b:
stroutput+="__conference floating";
break;
case 0xc8:
stroutput+="__diversion activated (used in DSS 1)";
break;
case 0xc9:
stroutput+="__call transfer, alerting";
break;
case 0xca:
stroutput+="__call transfer, active";
break;
case 0xf9:
stroutput+="__remote hold";
break;
case 0xfa:
stroutput+="__remote retrieval";
break;
case 0xfb:
stroutput+="__call is diverting";
break;
default:
stroutput+="__not used";
break;
}
lpar>>=7;
pCtrl->AddString(stroutput);
stroutput=strbithead;
stroutput="bit H:Extension indicator";
pCtrl->AddString(stroutput);
stroutput=strtranhead;
if ((lpar&1)==0)
{
stroutput+="0__information continues in the next octet";
}
else
{
stroutput+="1__last octet";
}
pCtrl->AddString(stroutput);
}
void CSs7tranDlg:: tranpar_Generic_number(CString str)
{
long lpar;
long ltemp,tt;
long i;
long ladroande;
CString str1;
CString strtemp;
CString stroutput;
CListBox *pCtrl = (CListBox *)GetDlgItem( IDC_LIST1 ) ;
stroutput=str;
stroutput+=":Generic number";
pCtrl->AddString(stroutput);
ladroande=0;
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 HGFEDCBA :Number qualifier indicator";
pCtrl->AddString(stroutput);
stroutput=strtranhead;
tt=0x80;
for(i=0;i<8;i++)
{
ltemp=(lpar&tt)>>(7-i);
switch (ltemp&1)
{
case 0:
stroutput+="0";
break;
case 1:
stroutput+="1";
break;
default:
break;
}
tt>>=1;
}
if ((lpar&0xFF)==0)
stroutput+="__reserved (dialled digits)";
else if ((lpar&0xFF)==1)
stroutput+="__additional called number";
else if ((lpar&0xFF)==2)
stroutput+="__reserved (supplemental user provided calling number - failed network screening) ";
else if ((lpar&0xFF)==3)
stroutput+="__reserved (supplemental user provided calling number - not screened)";
else if ((lpar&0xFF)==4)
stroutput+="__reserved (redirecting terminating number) ";
else if ((lpar&0xFF)==5)
stroutput+="__additional connected number";
else if ((lpar&0xFF)==6)
stroutput+="__additional calling party number";
else if ((lpar&0xFF)==7)
stroutput+="__aadditional original called number";
else if ((lpar&0xFF)==8)
stroutput+="__additional redirecting number";
else if ((lpar&0xFF)==9)
stroutput+="__additional redirection number";
else if (((lpar&0xFF)>=0xa) && ((lpar&0xFF)<=0x7F))
stroutput+="__reserved (called freephone numbers) (spare)";
else if (((lpar&0xFF)>=0x80) && ((lpar&0xFF)<=0x8E))
stroutput+="__reserved for national use";
else if ((lpar&0xFF)==0xFF)
stroutput+="__reserved for expansion";
else
stroutput+="__spare";
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 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 3:";
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 :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 4-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_Generic_reference(CString str)
{
/*
long lpar;
long ltemp,tt;
long i;
CString str1;
CString strtemp;
CString stroutput;
CListBox *pCtrl = (CListBox *)GetDlgItem( IDC_LIST1 ) ;
stroutput=str;
stroutput+=":Generic reference (reserved)";
pCtrl->AddString(stroutput);
str1=str.Left(1);
str.Delete(0,1);
lpar=strchangehex(str1);
stroutput=" bit H-A :Reference qualifier indicator";
pCtrl->AddString(stroutput);
tt=0x80;
for(i=0;i<8;i++)
{
ltemp=(lpar&tt)>>(8-i);
switch (ltemp&1)
{
if (i==0)
stroutput+=" ";
case 0:
stroutput+="0";
break;
case 1:
stroutput+="1";
break;
default:
break;
}
tt>>=1;
}
if ((lpar&0xFF)==0)
stroutput+="__spare";
else if ((lpar&0xFF)==1)
stroutput+="__CCBS context identifier (for further study)";
else if ((lpar&0xFF)==2)
stroutput+="__reserved";
else if ((lpar&0xFF)==3)
stroutput+="__reserved";
else
stroutput+="__spare";
pCtrl->AddString(stroutput);
*/
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -