📄 ss7tranpar2.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_Echo_control_information(CString str)
{
long lpar;
long ltemp;
CString str1;
CString stroutput;
CListBox *pCtrl = (CListBox *)GetDlgItem( IDC_LIST1 ) ;
stroutput=str;
stroutput+=":Echo control information";
pCtrl->AddString(stroutput);
str1=str.Left(2);
str.Delete(0,2);
lpar=strchangehex(str1);
stroutput=strbithead;
stroutput+="bit BA:Outgoing half echo control device response indicator";
pCtrl->AddString(stroutput);
stroutput=strtranhead;
ltemp=(lpar&3);
lpar>>=2;
switch (ltemp)
{
case 0:
stroutput+="00__No information";
break;
case 1:
stroutput+="01__Outgoing half echo control device not included";
break;
case 2:
stroutput+="10__Outgoing half echo control device included";
break;
case 3:
stroutput+="11__Spare";
break;
default:
break;
}
pCtrl->AddString(stroutput);
stroutput=strbithead;
stroutput+="bit DC:Incoming half echo control device response indicator";
pCtrl->AddString(stroutput);
stroutput=strtranhead;
ltemp=(lpar&3);
lpar>>=2;
switch (ltemp)
{
case 0:
stroutput+="00__No information";
break;
case 1:
stroutput+="01__Incoming half echo control device not included";
break;
case 2:
stroutput+="10__Incoming half echo control device included";
break;
case 3:
stroutput+="11__Spare";
break;
default:
break;
}
pCtrl->AddString(stroutput);
stroutput=strbithead;
stroutput="bit FE:Outgoing half echo control device request indicator";
pCtrl->AddString(stroutput);
stroutput=strtranhead;
ltemp=(lpar&3);
lpar>>=2;
switch (ltemp)
{
case 0:
stroutput+="00__No information";
break;
case 1:
stroutput+="01__Outgoing half echo control device activation request";
break;
case 2:
stroutput+="10__Outgoing half echo control device deactivation request";
break;
case 3:
stroutput+="11__Spare";
break;
default:
break;
}
pCtrl->AddString(stroutput);
stroutput=strbithead;
stroutput="bit HG:Incoming half echo control device request indicator";
pCtrl->AddString(stroutput);
stroutput=strtranhead;
ltemp=(lpar&3);
lpar>>=2;
switch (ltemp)
{
case 0:
stroutput+="00__No information";
break;
case 1:
stroutput+="01__Incoming half echo control device activation request";
break;
case 2:
stroutput+="10__Incoming half echo control device deactivation request";
break;
case 3:
stroutput+="11__Spare";
break;
default:
break;
}
pCtrl->AddString(stroutput);
}
void CSs7tranDlg:: tranpar_End_of_optional_parameters(CString str)
{
long lpar;
long ltemp,tt;
long i;
CString str1;
CString stroutput;
CListBox *pCtrl = (CListBox *)GetDlgItem( IDC_LIST1 ) ;
stroutput=str;
stroutput+=":End of optional parameters indicator";
pCtrl->AddString(stroutput);
str1=str.Left(2);
str.Delete(0,2);
lpar=strchangehex(str1);
stroutput=str;
stroutput+=":End_of_optional_parameters";
pCtrl->AddString(stroutput);
stroutput=strbithead;
stroutput+="bit HGFEDCBA";
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;
}
pCtrl->AddString(stroutput);
}
void CSs7tranDlg:: tranpar_Event_information(CString str)
{
long lpar;
long ltemp,tt;
long i;
CString str1;
CString stroutput;
CListBox *pCtrl = (CListBox *)GetDlgItem( IDC_LIST1 ) ;
stroutput=str;
stroutput+=":Event information";
pCtrl->AddString(stroutput);
str1=str.Left(2);
str.Delete(0,2);
lpar=strchangehex(str1);
stroutput=strbithead;
stroutput+="bit GFEDCBA:Event 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==0)
stroutput+="__spare";
else if (lpar==1)
stroutput+="__ALERTING";
else if (lpar==2)
stroutput+="__PROGRESS";
else if (lpar==3)
stroutput+="__in-band information or an appropriate pattern is now available";
else if (lpar==4)
stroutput+="__call forwarded on busy";
else if (lpar==5)
stroutput+="__call forwarded on no reply";
else if (lpar==6)
stroutput+="__call forwarded unconditional";
else
stroutput+="__spare";
pCtrl->AddString(stroutput);
stroutput=strbithead;
stroutput+="bit H:Event presentation restricted indicator";
pCtrl->AddString(stroutput);
stroutput=strtranhead;
if ((lpar&0x80)==0x80)
{
stroutput+="1__presentation restricted";
}
else
{
stroutput+="0__no indication";
}
pCtrl->AddString(stroutput);
}
void CSs7tranDlg:: tranpar_Facility_indicator(CString str)
{
long lpar;
long ltemp,tt;
long i;
CString str1;
CString stroutput;
CListBox *pCtrl = (CListBox *)GetDlgItem( IDC_LIST1 ) ;
stroutput=str;
stroutput+=":Facility indicator";
pCtrl->AddString(stroutput);
str1=str.Left(2);
str.Delete(0,2);
lpar=strchangehex(str1);
stroutput=strbithead;
stroutput+="bit HGFEDCBA:Event 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==0||lpar==1)
stroutput+="__spare";
else if (lpar==2)
stroutput+="__user-to-user service";
else
stroutput+="__spare";
pCtrl->AddString(stroutput);
}
void CSs7tranDlg:: tranpar_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+=":Forward call indicators";
pCtrl->AddString(stroutput);
str1=str.Left(2);
str.Delete(0,3);
lpar=strchangehex(str1);
stroutput=strbithead;
stroutput+="bit A:National/international call indicator";
pCtrl->AddString(stroutput);
stroutput=strtranhead;
ltemp=(lpar&1);
lpar>>=1;
switch (ltemp)
{
case 0:
stroutput+="0__call to be treated as a national call";
break;
case 1:
stroutput+="1__call to be treated as an international call";
break;
default:
break;
}
pCtrl->AddString(stroutput);
stroutput=strbithead;
stroutput+="bit CB:End-to-end method indicator";
pCtrl->AddString(stroutput);
stroutput=strtranhead;
ltemp=(lpar&3);
lpar>>=2;
switch (ltemp)
{
case 0:
stroutput+="00__no end-to-end method available (only link-by-link method available)";
break;
case 1:
stroutput+="01__pass along method available";
break;
case 2:
stroutput+="10__SCCP method available";
break;
case 3:
stroutput+="11__pass along and SCCP methods available ";
break;
default:
break;
}
pCtrl->AddString(stroutput);
stroutput=strbithead;
stroutput+="bit D:Interworking indicator";
pCtrl->AddString(stroutput);
stroutput=strtranhead;
ltemp=(lpar&1);
lpar>>=1;
switch (ltemp)
{
case 0:
stroutput+="0__no interworking encountered (No. 7 signalling all the way)";
break;
case 1:
stroutput+="1__interworking encountered";
break;
default:
break;
}
pCtrl->AddString(stroutput);
stroutput=strbithead;
stroutput+="bit E:End-to-end information indicator";
pCtrl->AddString(stroutput);
stroutput=strtranhead;
ltemp=(lpar&1);
lpar>>=1;
switch (ltemp)
{
case 0:
stroutput+="0__no end-to-end information available";
break;
case 1:
stroutput+="1__end-to-end information available";
break;
default:
break;
}
pCtrl->AddString(stroutput);
stroutput=strbithead;
stroutput+="bit F:ISDN user part indicator (Note)";
pCtrl->AddString(stroutput);
stroutput=strtranhead;
ltemp=(lpar&1);
lpar>>=1;
switch (ltemp)
{
case 0:
stroutput+="0__ISDN user part not used all the way";
break;
case 1:
stroutput+="1__ISDN user part used all the way";
break;
default:
break;
}
pCtrl->AddString(stroutput);
stroutput=strbithead;
stroutput+="bit HG:End-to-end method indicator";
pCtrl->AddString(stroutput);
stroutput=strtranhead;
ltemp=(lpar&3);
lpar>>=2;
switch (ltemp)
{
case 0:
stroutput+="00__ISDN user part preference indicator";
break;
case 1:
stroutput+="01__ISDN user part not required all the way";
break;
case 2:
stroutput+="10__ISDN user part required all the way";
break;
case 3:
stroutput+="11__spare";
break;
default:
break;
}
pCtrl->AddString(stroutput);
str1=str.Left(2);
str.Delete(0,2);
lpar=strchangehex(str1);
stroutput=strbithead;
stroutput+="bit I:ISDN access indicator";
pCtrl->AddString(stroutput);
stroutput=strtranhead;
ltemp=(lpar&1);
lpar>>=1;
switch (ltemp)
{
case 0:
stroutput+="0__originating access non-ISDN";
break;
case 1:
stroutput+="1__originating access ISDN";
break;
default:
break;
}
pCtrl->AddString(stroutput);
stroutput=strbithead;
stroutput+="bit KJ:End-to-end information indicator ";
pCtrl->AddString(stroutput);
stroutput=strtranhead;
ltemp=(lpar&3);
lpar>>=2;
switch (ltemp)
{
case 0:
stroutput+="00__no indication";
break;
case 1:
stroutput+="01__connectionless method available";
break;
case 2:
stroutput+="10__connection oriented method available";
break;
case 3:
stroutput+="11__connectionless and connection oriented methods available ";
break;
default:
break;
}
pCtrl->AddString(stroutput);
stroutput=strbithead;
stroutput+="bit L:Spare";
pCtrl->AddString(stroutput);
stroutput=strtranhead;
ltemp=(lpar&1);
lpar>>=1;
switch (ltemp)
{
case 0:
stroutput+="0";
break;
case 1:
stroutput+="1";
break;
default:
break;
}
pCtrl->AddString(stroutput);
stroutput=strbithead;
stroutput+="bit PONM:Reserved for national use";
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);
}
void CSs7tranDlg:: tranpar_Freephone_indicators(CString str)
{
//
}
void CSs7tranDlg:: tranpar_Generic_digits(CString str)
{
CString strtemp;
CString str1;
CString stroutput;
CListBox *pCtrl = (CListBox *)GetDlgItem( IDC_LIST1 ) ;
stroutput=str;
stroutput+=":Generic digits";
pCtrl->AddString(stroutput);
/*
str1=str.Left(2);
str.Delete(0,3);
lpar=strchangehex(str2);
stroutput=" bit E-A:Type of digits";
pCtrl->AddString(stroutput);
tt=0x10;
for(i=0;i<5;i++)
{
ltemp=(lpar&tt)>>(5-i);
switch (ltemp&1)
{
if (i==0)
stroutput+=" ";
case 0:
stroutput+="0";
break;
case 1:
stroutput+="1";
break;
default:
break;
}
tt>>=1;
}
if ((lpar&0x1F)==0)
stroutput+="__reserved for account code";
else if ((lpar&0x1F)==1)
stroutput+="__reserved for authorisation code";
else if ((lpar&0x1F)==2)
stroutput+="__reserved for private networking travelling class mark";
else if ((lpar&0x1F)==3)
stroutput+="__reserved for business communication group identity";
else if (((lpar&0x1F)>=4) && ((lpar&0x1F)<=0x0F))
stroutput+="__spare for international use";
else if (((lpar&0x1F)>=0x10) && ((lpar&0x1F)<=0x1E))
stroutput+="__spare for national use";
else if ((lpar&0x1F)==0x1F)
stroutput+="__reserved for extension";
pCtrl->AddString(stroutput);
lpar>>=5;
stroutput=" bit H-F:Encoding scheme";
pCtrl->AddString(stroutput);
tt=0x4;
for(i=0;i<3;i++)
{
ltemp=(lpar&tt)>>(3-i);
switch (ltemp&1)
{
if (i==0)
stroutput+=" ";
case 0:
stroutput+="0";
break;
case 1:
stroutput+="1";
break;
default:
break;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -