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

📄 tup2.cpp

📁 7号信令协议2M链路协议解码程序源代码
💻 CPP
📖 第 1 页 / 共 5 页
字号:
// Tup2.cpp: implementation of the CTup2 class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "decode2.h"
#include "Tup2.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CTup2::CTup2()
{
    this->createH1h0Table();
	///////////////////////////////////
	///added by me
	this->createCallingTypeTable();
	this->create_msgID_BA_Table();
	this->create_msgID_DC_Table();
	this->create_msgID_FE_Table();
	this->create_msgID_G_Table();
	this->create_msgID_H_Table();
	this->create_msgID_I_Table();
	this->create_msgID_J_Table();
	this->create_msgID_K_Table();

	this->create_firstID_A_Table();
	this->create_firstID_B_Table();
	this->create_firstID_C_Table();
	this->create_firstID_D_Table();
	this->create_firstID_E_Table();
	this->create_firstID_F_Table();
	this->create_firstID_G_Table();

	this->create_callingLineID_BA_Table();
	this->create_callingLineID_C_Table();
	this->create_callingLineID_D_Table();

	this->create_respTypeID_A_Table();
	this->create_respTypeID_B_Table();
	this->create_respTypeID_C_Table();
	this->create_respTypeID_D_Table();
	this->create_respTypeID_E_Table();
	this->create_respTypeID_F_Table();
	this->create_respTypeID_G_Table();

	this->create_reqestTypeID_A_Table();
	this->create_reqestTypeID_B_Table();
	this->create_reqestTypeID_C_Table();
	this->create_reqestTypeID_D_Table();
	this->create_reqestTypeID_E_Table();
	this->create_reqestTypeID_F_Table();

	this->create_msgIndicator_BA_Table();
	this->create_msgIndicator_C_Table();
	this->create_msgIndicator_D_Table();
	this->create_msgIndicator_E_Table();
	this->create_msgIndicator_F_Table();

	this->create_GRM_blocking_Table();      //MGB,HGB,SGB
	this->create_GRM_blockingAck_Table();   //MBA,HBA,SBA
	this->create_GRM_unblocking_Table();    //MGU,HGU,SGU
	this->create_GRM_unblockingAck_Table(); //MUA,HUA,SUA
	this->create_GRM_resetAck_Table();      //GRA

}

CTup2::~CTup2()
{

}
void CTup2::createH1h0Table()
{
    int i;

    for(i=0; i<256; i++)
    {
        strcpy(m_h1h0Table[i], "RES");
    }
    strcpy(m_h1h0Table[0x06], "ANU");
    strcpy(m_h1h0Table[0x11], "IAM");
    strcpy(m_h1h0Table[0x12], "GSM");
    strcpy(m_h1h0Table[0x13], "GRQ");
    strcpy(m_h1h0Table[0x14], "ACM");
    strcpy(m_h1h0Table[0x15], "SEC");
    strcpy(m_h1h0Table[0x16], "ANC");
    strcpy(m_h1h0Table[0x17], "RLG");
    strcpy(m_h1h0Table[0x18], "MGB");
    strcpy(m_h1h0Table[0x1A], "ACC");
    strcpy(m_h1h0Table[0x1D], "OPR");
    strcpy(m_h1h0Table[0x1E], "SLB");
    strcpy(m_h1h0Table[0x1F], "MAL");
    strcpy(m_h1h0Table[0x21], "IAI");
    strcpy(m_h1h0Table[0x24], "CHG");
    strcpy(m_h1h0Table[0x25], "CGC");
    strcpy(m_h1h0Table[0x26], "ANN");
    strcpy(m_h1h0Table[0x27], "BLO");
    strcpy(m_h1h0Table[0x28], "MBA");
    strcpy(m_h1h0Table[0x2C], "MPM");
    strcpy(m_h1h0Table[0x2E], "STB");
    strcpy(m_h1h0Table[0x31], "SAM");
    strcpy(m_h1h0Table[0x32], "COT");
    strcpy(m_h1h0Table[0x35], "NNC");
    strcpy(m_h1h0Table[0x36], "CBK");
    strcpy(m_h1h0Table[0x37], "BLA");
    strcpy(m_h1h0Table[0x38], "MGU");
    strcpy(m_h1h0Table[0x41], "SAO");
    strcpy(m_h1h0Table[0x42], "CCF");
    strcpy(m_h1h0Table[0x45], "ADI");
    strcpy(m_h1h0Table[0x46], "CLF");
    strcpy(m_h1h0Table[0x47], "UBL");
    strcpy(m_h1h0Table[0x48], "MUA");
    strcpy(m_h1h0Table[0x55], "CFL");
    strcpy(m_h1h0Table[0x56], "RAN");
    strcpy(m_h1h0Table[0x57], "UBA");
    strcpy(m_h1h0Table[0x58], "HGB");
    strcpy(m_h1h0Table[0x65], "SSB");
    strcpy(m_h1h0Table[0x66], "FOT");
    strcpy(m_h1h0Table[0x67], "CCR");
    strcpy(m_h1h0Table[0x68], "HBA");
    strcpy(m_h1h0Table[0x75], "UNN");
    strcpy(m_h1h0Table[0x76], "CCL");
    strcpy(m_h1h0Table[0x77], "RSC");
    strcpy(m_h1h0Table[0x78], "HGU");
    strcpy(m_h1h0Table[0x85], "LOS");
    strcpy(m_h1h0Table[0x88], "HUA");
    strcpy(m_h1h0Table[0x95], "SST");
    strcpy(m_h1h0Table[0x98], "GRS");
    strcpy(m_h1h0Table[0xA5], "ACB");
    strcpy(m_h1h0Table[0xA8], "GRA");
    strcpy(m_h1h0Table[0xB5], "DPN");
    strcpy(m_h1h0Table[0xB8], "SGB");
    strcpy(m_h1h0Table[0xC5], "MPR");
    strcpy(m_h1h0Table[0xC8], "SBA");
    strcpy(m_h1h0Table[0xD8], "SGU");
    strcpy(m_h1h0Table[0xE8], "SUA");
    strcpy(m_h1h0Table[0xF5], "EUM");
}
////////////////////////////////////////////
/////table initional
//主叫用户类别
void CTup2::createCallingTypeTable()
{
	int i;
    for(i=0; i<64; i++)
    {
        strcpy(m_callingTable[i], "RES");
    }
    strcpy(m_callingTable[0x00], "未知来源");
	strcpy(m_callingTable[0x01], "话务员,法语");
    strcpy(m_callingTable[0x02], "话务员,英语");
	strcpy(m_callingTable[0x03], "话务员,德语");
    strcpy(m_callingTable[0x04], "话务员,俄语");
	strcpy(m_callingTable[0x05], "话务员,西班牙语");
    strcpy(m_callingTable[0x06], "双方协商采用的语言(汉语)");
	strcpy(m_callingTable[0x07], "双方协商采用的语言");
    strcpy(m_callingTable[0x08], "双方协商采用的语言(日语)");
	strcpy(m_callingTable[0x09], "国内话务员(具有插入性能)");
    strcpy(m_callingTable[0x0A], "普通用户");
	strcpy(m_callingTable[0x0B], "优先用户");
    strcpy(m_callingTable[0x0C], "数据呼叫");
	strcpy(m_callingTable[0x0D], "测试呼叫");

    strcpy(m_callingTable[0x10], "普通,免费");
	strcpy(m_callingTable[0x11], "普通,定期");
    strcpy(m_callingTable[0x12], "普通,用户表,立即");
	strcpy(m_callingTable[0x13], "普通,打印机,立即");
    strcpy(m_callingTable[0x14], "优先,免费");
	strcpy(m_callingTable[0x15], "优先,定期");

	strcpy(m_callingTable[0x18], "普通用户,在市-市局间使用");
}

void CTup2::create_msgID_BA_Table()
{
	strcpy(m_msgID_BA_Table[0x00], "市话用户号码");
	strcpy(m_msgID_BA_Table[0x01], "RES");
    strcpy(m_msgID_BA_Table[0x02], "国内有效号码");
	strcpy(m_msgID_BA_Table[0x03], "国际有效号码");
}

void CTup2::create_msgID_DC_Table()
{
	strcpy(m_msgID_DC_Table[0x00], "在接续中无卫星电路");
	strcpy(m_msgID_DC_Table[0x01], "在接续中有卫星电路");
    strcpy(m_msgID_DC_Table[0x02], "RES");
	strcpy(m_msgID_DC_Table[0x03], "RES");
}

void CTup2::create_msgID_FE_Table()
{
	strcpy(m_msgID_FE_Table[0x00], "不需要进行导通检验");
	strcpy(m_msgID_FE_Table[0x01], "该段电路需要进行导通检验");
    strcpy(m_msgID_FE_Table[0x02], "在前段电路进行了导通检验");
	strcpy(m_msgID_FE_Table[0x03], "RES");
}

void CTup2::create_msgID_G_Table()
{
	strcpy(m_msgID_G_Table[0x00], "未包括去话半回声抑制器");
	strcpy(m_msgID_G_Table[0x01], "包括了去话半回声抑制器");
}

void CTup2::create_msgID_H_Table()
{
	strcpy(m_msgID_H_Table[0x00], "不是国际来话呼叫");
	strcpy(m_msgID_H_Table[0x01], "是国际来话呼叫");
}

void CTup2::create_msgID_I_Table()
{
	strcpy(m_msgID_I_Table[0x00], "非改发呼叫");
	strcpy(m_msgID_I_Table[0x01], "改发呼叫");
}

void CTup2::create_msgID_J_Table()
{
	strcpy(m_msgID_J_Table[0x00], "可以选择模拟或数字话音电路");
	strcpy(m_msgID_J_Table[0x01], "需要全数字通路");
}
void CTup2::create_msgID_K_Table()
{
	strcpy(m_msgID_K_Table[0x00], "任何通道");
	strcpy(m_msgID_K_Table[0x01], "全部是No.7信令方式通道");
}


void CTup2::create_firstID_A_Table()
{	strcpy(m_firstID_A_Table[0x00], "未包括网路能力或用户性能信息");
	strcpy(m_firstID_A_Table[0x01], "包括网路能力或用户性能信息");
}

void CTup2::create_firstID_B_Table()
{	strcpy(m_firstID_B_Table[0x00], "未包括闭合用户群信息");
	strcpy(m_firstID_B_Table[0x01], "包括闭合用户群信息");
}
void CTup2::create_firstID_C_Table()
{	strcpy(m_firstID_C_Table[0x00], "未包括附加主叫用户信息");
	strcpy(m_firstID_D_Table[0x01], "包括附加主叫用户信息");
}
void CTup2::create_firstID_D_Table()
{	strcpy(m_firstID_D_Table[0x00], "未包括附加路由信息");
	strcpy(m_firstID_D_Table[0x01], "包括附加路由信息");
}
void CTup2::create_firstID_E_Table()
{	strcpy(m_firstID_E_Table[0x00], "未包括主叫用户线标识");
	strcpy(m_firstID_E_Table[0x01], "包括主叫用户线标识");
}
void CTup2::create_firstID_F_Table()
{	strcpy(m_firstID_F_Table[0x00], "未包括原被叫地址");
	strcpy(m_firstID_F_Table[0x01], "包括原被叫地址");
}
void CTup2::create_firstID_G_Table()
{	strcpy(m_firstID_G_Table[0x00], "未包括计费信息");
	strcpy(m_firstID_G_Table[0x01], "包括计费信息");
}


void CTup2::create_callingLineID_BA_Table()
{	strcpy(m_callingLineID_BA_Table[0x00], "市内用户号码");
	strcpy(m_callingLineID_BA_Table[0x01], "国内备用");
	strcpy(m_callingLineID_BA_Table[0x02], "国内有效号码");
	strcpy(m_callingLineID_BA_Table[0x03], "国际号码");
}

void CTup2::create_callingLineID_C_Table()
{	strcpy(m_callingLineID_C_Table[0x00], "未限制提供主叫用户线标识");
	strcpy(m_callingLineID_C_Table[0x01], "限制提供主叫用户线标识");
}

void CTup2::create_callingLineID_D_Table()
{	strcpy(m_callingLineID_D_Table[0x00], "未表示不全");
	strcpy(m_callingLineID_D_Table[0x01], "主叫用户线标识不全");
}

void CTup2::create_respTypeID_A_Table()
{	strcpy(m_respTypeID_A_Table[0x00], "未包括主叫用户类别");
	strcpy(m_respTypeID_A_Table[0x01], "包括主叫用户类别");
}

void CTup2::create_respTypeID_B_Table()
{	strcpy(m_respTypeID_B_Table[0x00], "未包括主叫用户线标识");
	strcpy(m_respTypeID_B_Table[0x01], "包括主叫用户线标识");
}

void CTup2::create_respTypeID_C_Table()
{	strcpy(m_respTypeID_C_Table[0x00], "未包括来话中继和转接交换局标识");
	strcpy(m_respTypeID_C_Table[0x01], "包括来话中继和转接交换局标识");
}
void CTup2::create_respTypeID_D_Table()
{	strcpy(m_respTypeID_D_Table[0x00], "未包括原被叫地址");
	strcpy(m_respTypeID_D_Table[0x01], "包括原被叫地址");
}
void CTup2::create_respTypeID_E_Table()
{	strcpy(m_respTypeID_E_Table[0x00], "未包括去话半回声抑制器");
	strcpy(m_respTypeID_E_Table[0x01], "包括去话半回声抑制器");
}
void CTup2::create_respTypeID_F_Table()
{	strcpy(m_respTypeID_F_Table[0x00], "不提供恶意呼叫识别");
	strcpy(m_respTypeID_F_Table[0x01], "提供恶意呼叫识别");
}
void CTup2::create_respTypeID_G_Table()
{	strcpy(m_respTypeID_G_Table[0x00], "不提供保持");
	strcpy(m_respTypeID_G_Table[0x01], "提供保持");
}

void CTup2::create_inTrunkTransitExID_BA_Table()
{	strcpy(m_inTrunkTransitExID_BA_Table[0x00], "备用");
	strcpy(m_inTrunkTransitExID_BA_Table[0x01], "信号点编码");
	strcpy(m_inTrunkTransitExID_BA_Table[0x02], "主叫用户线标识的可用部分");
	strcpy(m_inTrunkTransitExID_BA_Table[0x03], "备用");
}

void CTup2::create_reqestTypeID_A_Table()
{	strcpy(m_reqestTypeID_A_Table[0x00], "未请求主叫用户类型");
	strcpy(m_reqestTypeID_A_Table[0x01], "请求主叫用户类型");
}

void CTup2::create_reqestTypeID_B_Table()
{	strcpy(m_reqestTypeID_B_Table[0x00], "未请求主叫用户线标识");
	strcpy(m_reqestTypeID_B_Table[0x01], "请求主叫用户线标识");
}

void CTup2::create_reqestTypeID_C_Table()
{	strcpy(m_reqestTypeID_C_Table[0x00], "未请求原被叫地址");
	strcpy(m_reqestTypeID_C_Table[0x01], "请求原被叫地址");
}

void CTup2::create_reqestTypeID_D_Table()
{	strcpy(m_reqestTypeID_D_Table[0x00], "未遇到恶意呼叫识别");
	strcpy(m_reqestTypeID_D_Table[0x01], "遇到恶意呼叫识别");
}

void CTup2::create_reqestTypeID_E_Table()
{	strcpy(m_reqestTypeID_E_Table[0x00], "未请求保持");
	strcpy(m_reqestTypeID_E_Table[0x01], "请求保持");
}

void CTup2::create_reqestTypeID_F_Table()
{	strcpy(m_reqestTypeID_F_Table[0x00], "未请求去话半回声抑制器");
	strcpy(m_reqestTypeID_F_Table[0x01], "请求去话半回声抑制器");
}

void CTup2::create_msgIndicator_BA_Table()
{	strcpy(m_msgIndicator_BA_Table[0x00], "地址全信号");
	strcpy(m_msgIndicator_BA_Table[0x01], "地址全信号,计费");
	strcpy(m_msgIndicator_BA_Table[0x02], "地址全信号,免费");
	strcpy(m_msgIndicator_BA_Table[0x03], "地址全信号,投币式用户");
}

void CTup2::create_msgIndicator_C_Table()
{	strcpy(m_msgIndicator_C_Table[0x00], "未指示");
	strcpy(m_msgIndicator_C_Table[0x01], "用户闲");
}

void CTup2::create_msgIndicator_D_Table()
{	strcpy(m_msgIndicator_D_Table[0x00], "未包括来话半回声抑制器");
	strcpy(m_msgIndicator_D_Table[0x01], "包括来话半回声抑制器");
}

void CTup2::create_msgIndicator_E_Table()

⌨️ 快捷键说明

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