📄 ss7tranpar4.cpp
字号:
#include "stdafx.h"
#include "ss7tran.h"
#include "ss7tranDlg.h"
#include "isup_def.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern char strchangehex(CString str1);
void CSs7tranDlg:: tranpar_Optional_backward_call_indicators(CString str)
{
long lpar;
long ltemp,tt;
long i;
CString str1;
CString stroutput;
CListBox *pCtrl = (CListBox *)GetDlgItem( IDC_LIST1 ) ;
stroutput=str;
stroutput+=":Optional backward call indicators";
pCtrl->AddString(stroutput);
str1=str.Left(2);
str.Delete(0,2);
lpar=strchangehex(str1);
stroutput=strbithead;
stroutput+="bit A:In-band information indicator";
pCtrl->AddString(stroutput);
stroutput=strtranhead;
ltemp=(lpar&1);
lpar>>=1;
switch (ltemp)
{
case 0:
stroutput+="0__no indication";
break;
case 1:
stroutput+="1__in-band information or an appropriate pattern is now available";
break;
default:
break;
}
pCtrl->AddString(stroutput);
stroutput=strbithead;
stroutput="bit B:Call diversion may occur indicator";
pCtrl->AddString(stroutput);
stroutput=strtranhead;
ltemp=(lpar&1);
lpar>>=1;
switch (ltemp)
{
case 0:
stroutput+="0__no indication";
break;
case 1:
stroutput+="1__call diversion may occur";
break;
default:
break;
}
pCtrl->AddString(stroutput);
stroutput=strbithead;
stroutput="bit C:Simple segmentation indicator";
pCtrl->AddString(stroutput);
stroutput=strtranhead;
ltemp=(lpar&1);
lpar>>=1;
switch (ltemp)
{
case 0:
stroutput+="0__no additional information will be sent";
break;
case 1:
stroutput+="1__additional information will be sent in a segmentation message";
break;
default:
break;
}
pCtrl->AddString(stroutput);
stroutput=strbithead;
stroutput="bit D:MLPP user indicator";
pCtrl->AddString(stroutput);
stroutput=strtranhead;
ltemp=(lpar&1);
lpar>>=1;
switch (ltemp)
{
case 0:
stroutput+="0__no indication";
break;
case 1:
stroutput+="1__MLPP user";
break;
default:
break;
}
pCtrl->AddString(stroutput);
stroutput=strbithead;
stroutput="bit HGFE:Reserved for national use";
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;
}
pCtrl->AddString(stroutput);
}
void CSs7tranDlg:: tranpar_Optional_forward_call_indicators(CString str)
{
long lpar;
long ltemp,tt;
long i;
CString stroutput;
CString str1;
CListBox *pCtrl = (CListBox *)GetDlgItem( IDC_LIST1 ) ;
stroutput=str;
stroutput+=":Optional forward call indicators";
pCtrl->AddString(stroutput);
str1=str.Left(2);
str.Delete(0,2);
lpar=strchangehex(str1);
stroutput=strbithead;
stroutput+="bit BA:Closed user group call indicator";
pCtrl->AddString(stroutput);
stroutput=strtranhead;
ltemp=(lpar&2);
lpar>>=2;
switch (ltemp)
{
case 0:
stroutput+="00__non-CUG call";
break;
case 1:
stroutput+="01__spare";
break;
case 2:
stroutput+="10__closed user group call, outgoing access allowed";
break;
case 3:
stroutput+="11__closed user group call, outgoing access not allowed";
break;
default:
break;
}
pCtrl->AddString(stroutput);
stroutput=strbithead;
stroutput+="bit C:Simple segmentation indicator";
stroutput=strtranhead;
pCtrl->AddString(stroutput);
ltemp=(lpar&1);
lpar>>=1;
switch (ltemp)
{
case 0:
stroutput+="0__no additional information will be sent";
break;
case 1:
stroutput+="1__additional information will be sent in a segmentation message";
break;
default:
break;
}
pCtrl->AddString(stroutput);
stroutput=strbithead;
stroutput="bit GFED:Spare";
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;
}
lpar>>=4;
pCtrl->AddString(stroutput);
stroutput=strbithead;
stroutput="bit H:Connected line identity request indicator";
pCtrl->AddString(stroutput);
stroutput=strtranhead;
ltemp=(lpar&1);
lpar>>=1;
switch (ltemp)
{
case 0:
stroutput+="0__not requested";
break;
case 1:
stroutput+="1__requested";
break;
default:
break;
}
pCtrl->AddString(stroutput);
}
void CSs7tranDlg:: tranpar_Original_called_number(CString str)
{
long lpar;
long ltemp,tt;
long i;
long ladroande;
CString str1;
CString stroutput;
CString strtemp;
CListBox *pCtrl = (CListBox *)GetDlgItem( IDC_LIST1 ) ;
stroutput=str;
stroutput+=":Original called 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 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 DCBA :spare";
pCtrl->AddString(stroutput);
tt=0x8;
stroutput=strtranhead;
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;
}
pCtrl->AddString(stroutput);
lpar>>=4;
stroutput=strbithead;
stroutput+="bit GHE :Numbering plan indicator";
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 :Internal network number indicator (INN ind.)";
pCtrl->AddString(stroutput);
stroutput=strtranhead;
if ((lpar&0x8)==0x0)
{
stroutput+="0__routing to internal network number allowed";
}
else
stroutput+="1__routing to internal network number not allowed";
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_Origination_ISC_point_code(CString str)
{
}
void CSs7tranDlg:: tranpar_Parameter_compatibility_information(CString str)
{
}
void CSs7tranDlg:: tranpar_Propagation_delay_counter(CString str)
{
}
void CSs7tranDlg:: tranpar_Range_and_status(CString str)
{
long lpar;
long ltemp,tt;
long i,j;
CString str1;
CString stroutput;
CString strtemp;
CListBox *pCtrl = (CListBox *)GetDlgItem( IDC_LIST1 ) ;
stroutput=str;
stroutput+=":Range and status";
pCtrl->AddString(stroutput);
str1=str.Left(2);
str.Delete(0,3);
lpar=strchangehex(str1);
stroutput=strbithead;
stroutput="bit HGFEDCBA :Range";
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;
}
stroutput="__";
strtemp.Format("%d",lpar);
stroutput+=strtemp;
pCtrl->AddString(stroutput);
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=strbithead;
stroutput="bit HGFEDCBA :status";
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;
}
}
}
void CSs7tranDlg:: tranpar_Redirecting_number(CString str)
{
long lpar;
long ltemp,tt;
long i;
long ladroande;
CString str1;
CString stroutput;
CString strtemp;
CListBox *pCtrl = (CListBox *)GetDlgItem( IDC_LIST1 ) ;
stroutput=str;
stroutput+=":Redirecting 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:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -