#include "my_string.h"
#include "ProtoInnerCan.h"
#include "RuntimeData.h"
#include "DoPrint.h"

extern "C"{
	#include "uart_printer_drv.h"
}

//时间 地址StrBrdFaultType
//信息类型 用户码 设备类型
//描述

const char TextHead[] = "\n--------------------------------\n\n\n\n";

int TDoPrint::GetPrintTextEndPst(char * pText)
{
	unsigned int i;
	if(pText[0] == 0)return -1;
	for(i=1;i<PrintEntry_Size;i++){
		if(pText[i] == 0){
			return i-1;
		}
	}
	return -1;
}

unsigned int TDoPrint::GetPrintTextLen(char * pText)
{
	unsigned int i;
	for(i=0;i<PrintEntry_Size;i++){
		if(pText[i] == 0){
			return i;
		}
	}
	return 0;
}

void TDoPrint::StrcatText(char * pSrc,char * pAdd)
{
	unsigned int Len_1,Len_2;
	unsigned int i,a;
	for(i=0;i<PrintEntry_Size;i++){
		if(pSrc[i] == 0){
			Len_1 = i;
			break;
		}
	}
	for(i=0;i<PrintEntry_Size;i++){
		if(pAdd[i] == 0){
			Len_2 = i;
			break;
		}
	}
	a = 0;
	for(i=Len_1;i<PrintEntry_Size;i++){
		pSrc[i] = pAdd[a];
		if(0 == pAdd[a])break;
		a++;
	}
}

void TDoPrint::FillTextWithDateTime()
{
	ClearPrintText();
	CoverDateTimeIllegal(EntryTmp.fData.Body, &DateTimeCovered);
	PrintText.body.DateAddr[ 0] = DateTimeCovered.Year / 16 % 10 + '0';
	PrintText.body.DateAddr[ 1] = DateTimeCovered.Year % 16 % 10 + '0';
	PrintText.body.DateAddr[ 2] = '/';
	PrintText.body.DateAddr[ 3] = DateTimeCovered.Month / 16 % 10 + '0';
	PrintText.body.DateAddr[ 4] = DateTimeCovered.Month % 16 % 10 + '0';
	PrintText.body.DateAddr[ 5] = '/';
	PrintText.body.DateAddr[ 6] = DateTimeCovered.Day / 16 % 10 + '0';
	PrintText.body.DateAddr[ 7] = DateTimeCovered.Day % 16 % 10 + '0';
	PrintText.body.DateAddr[ 8] = ' ';
	PrintText.body.DateAddr[ 9] = DateTimeCovered.Hour / 16 % 10 + '0';
	PrintText.body.DateAddr[10] = DateTimeCovered.Hour % 16 % 10 + '0';
	PrintText.body.DateAddr[11] = ':';
	PrintText.body.DateAddr[12] = DateTimeCovered.Minute / 16 % 10 + '0';
	PrintText.body.DateAddr[13] = DateTimeCovered.Minute % 16 % 10 + '0';
	PrintText.body.DateAddr[14] = ':';
	PrintText.body.DateAddr[15] = DateTimeCovered.Second / 16  % 10 + '0';
	PrintText.body.DateAddr[16] = DateTimeCovered.Second % 16 % 10 + '0';
	
	PrintText.body.DateAddr[17] = ' ';
	PrintText.body.DateAddr[18] = '\0';
}

void TDoPrint::FillCtlNum()
{
	if(EntryTmp.fData.Body.Splite.PCtlNum == 0){
		if(LanguageEnCn==0)TMyString::sAddOnStr("本机 ",PrintText.body.DateAddr);
		else TMyString::sAddOnStr("Local ",PrintText.body.DateAddr);
	}else{
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.PCtlNum,PrintText.body.DateAddr);
		TMyString::sAddOnStr(" ",PrintText.body.DateAddr);
	}
}

void TDoPrint::FillCtlNumNoSpace()
{
	if(EntryTmp.fData.Body.Splite.PCtlNum == 0){
		if(LanguageEnCn==0)TMyString::sAddOnStr("本机",PrintText.body.DateAddr);
		else TMyString::sAddOnStr("Local",PrintText.body.DateAddr); 
	}else{
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.PCtlNum,PrintText.body.DateAddr);
	}
}

void TDoPrint::FillTextWithPath()
{
	int aLen;
	unsigned int data, d,e;
	aLen = TMyString::sGetLen(PrintText.body.DateAddr);
	
	data = EntryTmp.fData.Body.Splite.PCtlNum;
	d = data/10;
	e = d % 10;
	PrintText.body.DateAddr[aLen + 0] = e + '0';
	e = data % 10;
	PrintText.body.DateAddr[aLen + 1] = e + '0';
	PrintText.body.DateAddr[aLen + 2] = '-';
		
	data = EntryTmp.fData.Body.Splite.P0;
	d = data/10;
	e = d % 10;
	PrintText.body.DateAddr[aLen + 3] = e + '0';
	e = data % 10;
	PrintText.body.DateAddr[aLen + 4] = e + '0';
	PrintText.body.DateAddr[aLen + 5] = '-';
		
	data = EntryTmp.fData.Body.Splite.P1;	
	d = data/100;
	e = d % 10;
	PrintText.body.DateAddr[aLen + 6] = e + '0';
	d = data/10;
	e = d % 10;
	PrintText.body.DateAddr[aLen + 7] = e + '0';
	e = data % 10;
	PrintText.body.DateAddr[aLen + 8] = e + '0';
	PrintText.body.DateAddr[aLen + 9] = ' ';
	
	PrintText.body.DateAddr[aLen +10] = ' ';
	PrintText.body.DateAddr[aLen +11] = '\0';
}

void TDoPrint::FillTextWithDType()
{
	unsigned char aType;
	aType = EntryTmp.fData.Body.Splite.dType;
	if(LanguageEnCn==0)TMyString::sAddOnStr(StrTypeShortName[aType],PrintText.body.Msg);
	else TMyString::sAddOnStr(StrTypeShortNameEn[aType],PrintText.body.Msg);
	TMyString::sAddOnStr(" ",PrintText.body.Msg);
}

void TDoPrint::FillText4PowerOff()
{
	FillTextWithDateTime();
	FillCtlNum();
	if(LanguageEnCn==0)TMyString::sAddOnStr("关机",PrintText.body.Msg);
	else TMyString::sAddOnStr("Power Off",PrintText.body.Msg);
}

void TDoPrint::FillText4PowerUp()
{
	FillTextWithDateTime();
	FillCtlNum();
	if(LanguageEnCn==0)TMyString::sAddOnStr("开机",PrintText.body.Msg);
	else TMyString::sAddOnStr("Power On",PrintText.body.Msg); 
}

void TDoPrint::FillText4MsgReset()
{
	FillTextWithDateTime();
	FillCtlNum();
	if(LanguageEnCn==0){
		TMyString::sAddOnStr("手动复位 ",PrintText.body.Msg);
		if(EntryTmp.fData.Body.Splite.Data1){
			TMyString::sAddOnStr("集中机呼叫执行 ",PrintText.body.Msg);
		}
	}else{
		TMyString::sAddOnStr("Manual Reset ",PrintText.body.Msg);
		if(EntryTmp.fData.Body.Splite.Data1){
			TMyString::sAddOnStr("Master Called",PrintText.body.Msg);
		}
	}
}

void TDoPrint::FillText4MsgMute()
{
	FillTextWithDateTime();
	FillCtlNum();
	if(LanguageEnCn==0)TMyString::sAddOnStr("手动消音",PrintText.body.Msg);
	else TMyString::sAddOnStr("Manual Mute",PrintText.body.Msg);
}

void TDoPrint::FillText4MsgMask()
{
	FillTextWithDateTime();
	FillCtlNum();
	FillTextWithPath();
	if(LanguageEnCn==0)TMyString::sAddOnStr("屏蔽部件",PrintText.body.Msg);
	else TMyString::sAddOnStr("Blocked",PrintText.body.Msg);
	FillTextWithDType();
}

void TDoPrint::FillText4MsgUnMask()
{
	FillTextWithDateTime();
	FillCtlNum();
	FillTextWithPath();
	if(LanguageEnCn==0)TMyString::sAddOnStr("取消屏蔽",PrintText.body.Msg);
	else TMyString::sAddOnStr("Blocking Cancelled",PrintText.body.Msg);
	FillTextWithDType();
}

void TDoPrint::FillText4MsgDateTimeSet()
{
	int aLen;
	FillTextWithDateTime();
	FillCtlNum();
	if(LanguageEnCn==0)TMyString::sAddOnStr(	"设置日期时间为:",PrintText.body.Msg);
	else TMyString::sAddOnStr(			"Set Date Time:",PrintText.body.Msg);
	
	aLen = TMyString::sGetLen(PrintText.body.Msg);
	if(aLen < 46){
		PrintText.body.Msg[aLen + 0] = EntryTmp.fData.Body.Splite.P0 / 16 % 10 + '0';
		PrintText.body.Msg[aLen + 1] = EntryTmp.fData.Body.Splite.P0 % 16 % 10 + '0';
		PrintText.body.Msg[aLen + 2] = '-';
		PrintText.body.Msg[aLen + 3] = EntryTmp.fData.Body.Splite.P1 / 16 % 10 + '0';
		PrintText.body.Msg[aLen + 4] = EntryTmp.fData.Body.Splite.P1 % 16 % 10 + '0';
		PrintText.body.Msg[aLen + 5] = '-';
		PrintText.body.Msg[aLen + 6] = EntryTmp.fData.Body.Splite.P2 / 16 % 10 + '0';
		PrintText.body.Msg[aLen + 7] = EntryTmp.fData.Body.Splite.P2 % 16 % 10 + '0';
		PrintText.body.Msg[aLen + 8] = ' ';
		PrintText.body.Msg[aLen + 9] = EntryTmp.fData.Body.Splite.Data1 / 16 % 10 + '0';
		PrintText.body.Msg[aLen +10] = EntryTmp.fData.Body.Splite.Data1 % 16 % 10 + '0';
		PrintText.body.Msg[aLen +11] = ':';
		PrintText.body.Msg[aLen +12] = EntryTmp.fData.Body.Splite.iByte0 / 16 % 10 + '0';
		PrintText.body.Msg[aLen +13] = EntryTmp.fData.Body.Splite.iByte0 % 16 % 10 + '0';
		PrintText.body.Msg[aLen +14] = ':';
		PrintText.body.Msg[aLen +15] = EntryTmp.fData.Body.Splite.iByte1 / 16  % 10 + '0';
		PrintText.body.Msg[aLen +16] = EntryTmp.fData.Body.Splite.iByte1 % 16 % 10 + '0';
		
		PrintText.body.Msg[aLen +17] = ' ';
		PrintText.body.Msg[aLen +18] = '\0';
	}
}

void TDoPrint::FillText4AllowSet()
{
	FillTextWithDateTime();
	FillCtlNum();
	if(LanguageEnCn==0){
		TMyString::sAddOnStr(		"设置允许状态:",PrintText.body.Msg);
		if(EntryTmp.fData.Body.Splite.Data1 & 0x01){
			TMyString::sAddOnStr("自动允许-",PrintText.body.Msg);
		}else{
			TMyString::sAddOnStr("自动禁止-",PrintText.body.Msg);
		}
		if(EntryTmp.fData.Body.Splite.Data1 & 0x02){
			TMyString::sAddOnStr("手动允许",PrintText.body.Msg);
		}else{
			TMyString::sAddOnStr("手动禁止",PrintText.body.Msg);
		}
	}else{
		TMyString::sAddOnStr(		"Set Status:",PrintText.body.Msg);
		if(EntryTmp.fData.Body.Splite.Data1 & 0x01){
			TMyString::sAddOnStr("Is Auto-",PrintText.body.Msg);
		}else{
			TMyString::sAddOnStr("Not Auto-",PrintText.body.Msg);
		}
		if(EntryTmp.fData.Body.Splite.Data1 & 0x02){
			TMyString::sAddOnStr("Is Manual",PrintText.body.Msg);
		}else{
			TMyString::sAddOnStr("Not Manual",PrintText.body.Msg);
		}
	}
}

void TDoPrint::FillText4AlramSetOnOff()
{
	FillTextWithDateTime();
	FillCtlNum();
	if(LanguageEnCn==0){
		TMyString::sAddOnStr("报警声光:",PrintText.body.Msg);
		if(EntryTmp.fData.Body.Splite.Data1){
			TMyString::sAddOnStr("启动",PrintText.body.Msg);
		}else{
			TMyString::sAddOnStr("停止",PrintText.body.Msg);
		}
	}else{
		TMyString::sAddOnStr("Alarm SL:",PrintText.body.Msg);
		if(EntryTmp.fData.Body.Splite.Data1){
			TMyString::sAddOnStr("Act ",PrintText.body.Msg);
		}else{
			TMyString::sAddOnStr("Stop",PrintText.body.Msg);
		}
	}
}

void TDoPrint::FillText4BusPadOn()
{
	FillTextWithDateTime();
	FillCtlNum();
	if(LanguageEnCn==0){
		TMyString::sAddOnStr("总线盘",PrintText.body.Msg);
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0,PrintText.body.Msg);
		TMyString::sAddOnStr(":按键",PrintText.body.Msg);
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1,PrintText.body.Msg);
		TMyString::sAddOnStr(":手动启动",PrintText.body.Msg);
	}else{
		TMyString::sAddOnStr("Bus Brd",PrintText.body.Msg);
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0,PrintText.body.Msg);
		TMyString::sAddOnStr(":Keypad",PrintText.body.Msg);
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1,PrintText.body.Msg);
		TMyString::sAddOnStr(":Act",PrintText.body.Msg);
	}
}

void TDoPrint::FillText4BusPadOff()
{
	FillTextWithDateTime();
	FillCtlNum();
	if(LanguageEnCn==0){
		TMyString::sAddOnStr("总线盘",PrintText.body.Msg);
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0,PrintText.body.Msg);
		TMyString::sAddOnStr(":按键",PrintText.body.Msg);
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1,PrintText.body.Msg);
		TMyString::sAddOnStr(":手动关闭",PrintText.body.Msg);
	}else{
		TMyString::sAddOnStr("Bus Brd",PrintText.body.Msg);
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0,PrintText.body.Msg);
		TMyString::sAddOnStr(":Keypad",PrintText.body.Msg);
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1,PrintText.body.Msg);
		TMyString::sAddOnStr(":Stop",PrintText.body.Msg);
	}
}

void TDoPrint::FillText4DirectPadManualAllowOn()
{
	FillTextWithDateTime();
	FillCtlNum();
	if(LanguageEnCn==0){
		TMyString::sAddOnStr("多线盘",PrintText.body.Msg);
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0,PrintText.body.Msg);
		TMyString::sAddOnStr(":允许操作",PrintText.body.Msg);
	}else{
		TMyString::sAddOnStr("Direct Brd",PrintText.body.Msg);
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0,PrintText.body.Msg);
		TMyString::sAddOnStr(":OPR Allow",PrintText.body.Msg);
	}
}

void TDoPrint::FillText4DirectPadManualAllowOff()
{
	FillTextWithDateTime();
	FillCtlNum();
	if(LanguageEnCn==0){
		TMyString::sAddOnStr("多线盘",PrintText.body.Msg);
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0,PrintText.body.Msg);
		TMyString::sAddOnStr(":禁止操作",PrintText.body.Msg);
	}else{
		TMyString::sAddOnStr("Direct Brd",PrintText.body.Msg);
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0,PrintText.body.Msg);
		TMyString::sAddOnStr(":Prohibit",PrintText.body.Msg);
	}
}

void TDoPrint::FillText4DirectPadNodeOn()
{
	FillTextWithDateTime();
	FillCtlNum();
	if(LanguageEnCn==0){
		TMyString::sAddOnStr("多线盘",PrintText.body.Msg);
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0,PrintText.body.Msg);
		TMyString::sAddOnStr(":节点",PrintText.body.Msg);
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1,PrintText.body.Msg);
		TMyString::sAddOnStr(":手动开启",PrintText.body.Msg);
	}else{
		TMyString::sAddOnStr("Direct Brd",PrintText.body.Msg);
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0,PrintText.body.Msg);
		TMyString::sAddOnStr(":Node",PrintText.body.Msg);
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1,PrintText.body.Msg);
		TMyString::sAddOnStr(":M-Act",PrintText.body.Msg);
	}
}

void TDoPrint::FillText4DirectPadNodeOff()
{
	FillTextWithDateTime();
	FillCtlNum();
	if(LanguageEnCn==0){
		TMyString::sAddOnStr("多线盘",PrintText.body.Msg);
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0,PrintText.body.Msg);
		TMyString::sAddOnStr(":节点",PrintText.body.Msg);
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1,PrintText.body.Msg);
		TMyString::sAddOnStr(":手动关闭",PrintText.body.Msg);
	}else{
		TMyString::sAddOnStr("Direct Brd",PrintText.body.Msg);
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0,PrintText.body.Msg);
		TMyString::sAddOnStr(":Node",PrintText.body.Msg);
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1,PrintText.body.Msg);
		TMyString::sAddOnStr(":M-Stop",PrintText.body.Msg);
	}
}

void TDoPrint::FillText4UserCheck()
{
	FillTextWithDateTime();
	FillCtlNum();
	if(LanguageEnCn==0)TMyString::sAddOnStr("检查",PrintText.body.Msg);
	else TMyString::sAddOnStr("Check",PrintText.body.Msg);
}

void TDoPrint::FillText4LinkageGo(unsigned char Data1)
{
	FillTextWithDateTime();
	FillCtlNum();
	if(LanguageEnCn==0){
		TMyString::sAddOnStr("联动执行",PrintText.body.Msg);
		if(Data1 == 0){
			TMyString::sAddOnStr("-区域机报告",PrintText.body.Msg);
		}else
		if(Data1 == 1){
			TMyString::sAddOnStr("-本机执行",PrintText.body.Msg);
		}else
		if(Data1 == 3){
			TMyString::sAddOnStr("-集中机呼叫执行",PrintText.body.Msg);
		}
	}else{
		TMyString::sAddOnStr("Link Exe",PrintText.body.Msg);
		if(Data1 == 0){
			TMyString::sAddOnStr("-Slave Report",PrintText.body.Msg);
		}else
		if(Data1 == 1){
			TMyString::sAddOnStr("-Local Action",PrintText.body.Msg);
		}else
		if(Data1 == 3){
			TMyString::sAddOnStr("-Master Call",PrintText.body.Msg);
		}
	}
}

void TDoPrint::AddOnFaultMsg()
{
	unsigned char aType;
	if( (EntryTmp.fData.Body.Splite.Data1 & 0xF0) == 0xC0){
			FillCtlNum();
			if(LanguageEnCn==0){
				if( (EntryTmp.fData.Body.Splite.P1 >= dADDR_HANDPAD_START) && (EntryTmp.fData.Body.Splite.P1 <= dADDR_HANDPAD_END) ){
					TMyString::sAddOnStr("总线盘 ",PrintText.body.Msg);
					TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1 -dADDR_HANDPAD_START +1,PrintText.body.Msg);
					TMyString::sAddOnStr(" 离线",PrintText.body.Msg);
				}
				if( (EntryTmp.fData.Body.Splite.P1 >= dADDR_DIRECTPAD_START) && (EntryTmp.fData.Body.Splite.P1 <= dADDR_DIRECTPAD_END) ){
					TMyString::sAddOnStr("多线盘 ",PrintText.body.Msg);
					TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1 -dADDR_DIRECTPAD_START +1,PrintText.body.Msg);
					TMyString::sAddOnStr(" 离线",PrintText.body.Msg);
				}
			}else{
				if( (EntryTmp.fData.Body.Splite.P1 >= dADDR_HANDPAD_START) && (EntryTmp.fData.Body.Splite.P1 <= dADDR_HANDPAD_END) ){
					TMyString::sAddOnStr("Bus Brd ",PrintText.body.Msg);
					TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1 -dADDR_HANDPAD_START +1,PrintText.body.Msg);
					TMyString::sAddOnStr(" Offline",PrintText.body.Msg);
				}
				if( (EntryTmp.fData.Body.Splite.P1 >= dADDR_DIRECTPAD_START) && (EntryTmp.fData.Body.Splite.P1 <= dADDR_DIRECTPAD_END) ){
					TMyString::sAddOnStr("Direct Brd ",PrintText.body.Msg);
					TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1 -dADDR_DIRECTPAD_START +1,PrintText.body.Msg);
					TMyString::sAddOnStr(" Offline",PrintText.body.Msg);
				}
			}
	}else
	if((EntryTmp.fData.Body.Splite.Data1 & 0xF0) == 0xD0){
		FillCtlNum();
		aType = EntryTmp.fData.Body.Splite.P2;
		if(LanguageEnCn==0){
			TMyString::sAddOnStr("设备故障 ",PrintText.body.Msg);
			if(aType < 32){
				TMyString::sAddOnStr(StrDevFaultType[aType],PrintText.body.Msg);
			}else{
				TMyString::sAddOnStr("未知类型",PrintText.body.Msg);
			}
		}else{
			TMyString::sAddOnStr("Dev Fail ",PrintText.body.Msg);
			if(aType < 32){
				TMyString::sAddOnStr(StrDevFaultTypeEn[aType],PrintText.body.Msg);
			}else{
				TMyString::sAddOnStr("Unknown Type",PrintText.body.Msg);
			}
		}

		TMyString::sAddOnStr(" ",PrintText.body.Msg);
		if( (aType == 15) || (aType == 16) ){
			TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1, PrintText.body.Msg);
			if(LanguageEnCn==0)TMyString::sAddOnStr(" 通讯故障",PrintText.body.Msg);
			else TMyString::sAddOnStr(" CommFail",PrintText.body.Msg);
			//if(EntryTmp.fData.Body.Splite.mType > 200){
			//	TMyString::sAddOnStr("通讯故障条目数:多于200",PrintText.body.Msg);
			//}else{
			//	TMyString::sAddOnStr("通讯故障条目数:",PrintText.body.Msg);
			//	TMyString::sAddOn3Dg(EntryTmp.fData.Body.Splite.mType, PrintText.body.Msg);
			//}
		}

	}else
	if((EntryTmp.fData.Body.Splite.Data1 & 0xF0) == 0xE0){
		FillCtlNum();
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0,PrintText.body.DateAddr);
		if(LanguageEnCn==0){
			TMyString::sAddOnStr("回路故障",PrintText.body.Msg);
		}else{
			TMyString::sAddOnStr("Loop Err",PrintText.body.Msg);
		}

	}else
	if((EntryTmp.fData.Body.Splite.Data1 & 0xF0) == 0xF0){
		//Board Error
		FillCtlNum();
		if(LanguageEnCn==0){
			TMyString::sAddOnStr("板卡故障 ",PrintText.body.Msg);
		}else{
			TMyString::sAddOnStr("BoardErr ",PrintText.body.Msg);
		}
		aType = EntryTmp.fData.Body.Splite.P2;
		if(aType == 10){
			TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1,PrintText.body.Msg);
			TMyString::sAddOnStr(" ",PrintText.body.Msg);
		}
		if(LanguageEnCn==0){
			if(aType < 32){
				TMyString::sAddOnStr(StrBrdFaultType[aType],PrintText.body.Msg);
			}else{
				TMyString::sAddOnStr("未知类型",PrintText.body.Msg);
			}
		}else{
			if(aType < 32){
				TMyString::sAddOnStr(StrBrdFaultTypeEn[aType],PrintText.body.Msg);
			}else{
				TMyString::sAddOnStr("-Unknown",PrintText.body.Msg);
			}
		}
	}else{
		//EpError
		FillCtlNumNoSpace();
		TMyString::sAddOnStr("-",PrintText.body.DateAddr);
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.DateAddr);
		TMyString::sAddOnStr("-",PrintText.body.DateAddr);
		TMyString::sAddOn3Dg(EntryTmp.fData.Body.Splite.P1, PrintText.body.DateAddr);
		TMyString::sAddOnStr(" ",PrintText.body.DateAddr);
		
		aType = EntryTmp.fData.Body.Splite.P2;
		if(LanguageEnCn==0){
			if(aType < 16){
				TMyString::sAddOnStr(StrEpFaultType[aType],PrintText.body.Msg);
			}else{
				TMyString::sAddOnStr("未知故障",PrintText.body.Msg);
			}
		}else{
			if(aType < 16){
				TMyString::sAddOnStr(StrEpFaultTypeEn[aType],PrintText.body.Msg);
			}else{
				TMyString::sAddOnStr("-Unknown",PrintText.body.Msg);
			}
		}
	}
}

void TDoPrint::OperateAddConfirmMsg(int NeedDrawCfg)
{
	volatile unsigned int SdAddr, Addr;
	unsigned int d,e;
	unsigned int data;
	unsigned char aP0;
	unsigned char aP1;
	unsigned char aType;
	
	if(NeedDrawCfg == 1){
		if((EntryTmp.fData.Body.Splite.Data1 & 0xF0) == 0x0){
			TMyString::sAddOnStr(" ",PrintText.body.Msg);
			aP0 = EntryTmp.fData.Body.Splite.P0;
			if( (aP0 >0) && (aP0 <=40) ){
				aType = EntryTmp.fData.Body.Splite.dType;
				if(LanguageEnCn==0)TMyString::sAddOnStr(StrTypeShortName[aType],PrintText.body.Msg);
				else TMyString::sAddOnStr(StrTypeShortNameEn[aType],PrintText.body.Msg);
			}else
			if( (aP0 >= dADDR_DIRECTPAD_START) && (aP0 <=dADDR_DIRECTPAD_START) ){
				if(LanguageEnCn==0)TMyString::sAddOnStr("多线盘节点 ",PrintText.body.Msg);
				else TMyString::sAddOnStr("Direct Node ",PrintText.body.Msg);
			}
		}
	}else
	if(NeedDrawCfg == 2){
		if((EntryTmp.fData.Body.Splite.Data1 & 0xF0) == 0x0){
			TMyString::sAddOnStr(" ",PrintText.body.Msg);
			aP0 = EntryTmp.fData.Body.Splite.P0;
			if( (aP0 >0) && (aP0 <=40) ){
				aType = EntryTmp.fData.Body.Splite.dType;
				if(LanguageEnCn==0)TMyString::sAddOnStr(StrTypeShortName[aType],PrintText.body.Msg);
				else TMyString::sAddOnStr(StrTypeShortNameEn[aType],PrintText.body.Msg);
			}else
			if( (aP0 >= dADDR_DIRECTPAD_START) && (aP0 <=dADDR_DIRECTPAD_START) ){
				if(LanguageEnCn==0)TMyString::sAddOnStr("多线盘节点 ",PrintText.body.Msg);
				else TMyString::sAddOnStr("Direct Node ",PrintText.body.Msg);
			}
		}
	}
}

void TDoPrint::DescpTextBufInsert(TRecordCommon aEntryTmp, unsigned int Descp)
{
	unsigned int d;
	
	if(Descp){
		GetDescpEntry(aEntryTmp);
		for(d=0;d<((15-7)*4);d++){
			PrintText.body.Dscp[d] = EntryTmp.D8[7*4+d];
			if(0 == PrintText.body.Dscp[d])break;
		}
		PrintText.body.Dscp[d] = '\n';
		PrintText.body.Dscp[d+1] = 0;
	}
}

void TDoPrint::DescpTextBufInsertByAssign(char *p)
{
	unsigned int d;
	if(p != nullptr){
		for(d=0;d<((15-7)*4);d++){
			PrintText.body.Dscp[d] = p[d];
			if(0 == PrintText.body.Dscp[d])break;
		}
		PrintText.body.Dscp[d] = '\n';
		PrintText.body.Dscp[d+1] = 0;
	}
}

void TDoPrint::FillOperateText(TRecordCommon OperateEntryTmp, int aForce)
{
	volatile unsigned int SdAddr, Addr;
	unsigned int d,e;
	unsigned int data;
	unsigned char aP0;
	unsigned char aP1;
	unsigned char aType;
	unsigned int ExpsInx;
	
	int NeedDisplayDescp;
	NeedDisplayDescp = 0;
	
	if(aForce ==0){
		if(PriterSetting.OnOff == 0)return;
		if( (PriterSetting.PrintSelected & (0x0040 + 0x0001)) ==0 )return;
	}

	
	//Operate History
	for(d=0; d<4; d++){
		EntryTmp.fData.Body.D32[d] = OperateEntryTmp.D32[d];
	}

	if(EntryTmp.fData.Body.Splite.mType == etOperate){
		switch(EntryTmp.fData.Body.Splite.Data0){
			case otPowerOff:
				FillText4PowerOff();
				break;
			
			case otPowerOn:
				FillText4PowerUp();
				break;
			
			case otReset:
				FillText4MsgReset();
				break;
				
			case otMute:
				FillText4MsgMute();
				break;
			
			case otMask:
				FillText4MsgMask();
				NeedDisplayDescp =1;
				break;
			
			case otUnMask:
				FillText4MsgUnMask();
				NeedDisplayDescp =1;
				break;
				
			case otRegiste:
				FillTextWithDateTime();
				FillCtlNum();
				if(EntryTmp.fData.Body.Splite.Data1 == 1){
					if(LanguageEnCn==0)TMyString::sAddOnStr(	"开始注册设备",PrintText.body.Msg);
					else TMyString::sAddOnStr(			"Dev Register",PrintText.body.Msg);
				}else
				if(EntryTmp.fData.Body.Splite.Data1 == 2){
					if(LanguageEnCn==0)TMyString::sAddOnStr(	"设备注册成功",PrintText.body.Msg);
					else TMyString::sAddOnStr(			"Registered OK",PrintText.body.Msg);
				}else
				if(EntryTmp.fData.Body.Splite.Data1 == 3){
					if(LanguageEnCn==0)TMyString::sAddOnStr(	"呼叫区域机注册",PrintText.body.Msg);
					else TMyString::sAddOnStr(			"Call Regional Reg",PrintText.body.Msg);
				}else
				if(EntryTmp.fData.Body.Splite.Data1 == 4){
					if(LanguageEnCn==0)TMyString::sAddOnStr(	"集中机呼叫注册",PrintText.body.Msg);
					else TMyString::sAddOnStr(			"Reg By Master ",PrintText.body.Msg);
				}
				break;
			
			case otUnRegiste:
				
				break;
			
			case otSetCanNetwork:
				FillTextWithDateTime();
				FillCtlNum();
				if(EntryTmp.fData.Body.Splite.Data1 == 1){
					if(LanguageEnCn==0)TMyString::sAddOnStr(	"设置本机为集中机:",PrintText.body.Msg);
					else TMyString::sAddOnStr(			"Set Local Master:",PrintText.body.Msg);
				}else
				if(EntryTmp.fData.Body.Splite.Data1 == 2){
					if(LanguageEnCn==0)TMyString::sAddOnStr(	"设置本机为区域机:",PrintText.body.Msg);
					else TMyString::sAddOnStr(			"Set Local Regional:",PrintText.body.Msg);
				}else{
					if(LanguageEnCn==0)TMyString::sAddOnStr(	"设置本机为单机:",PrintText.body.Msg);
					else TMyString::sAddOnStr(			"Set Stand Alone:",PrintText.body.Msg);
				}
				TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.Msg);
				break;
			
			case otCfgBoard:
				
				break;
			
			case otCfgCrt:
				
				break;
			
			case otCfgPriter:
				FillTextWithDateTime();
				FillCtlNum();
				if(LanguageEnCn==0){
					if(EntryTmp.fData.Body.Splite.Data1 == 0){
						TMyString::sAddOnStr("打印机关闭",PrintText.body.Msg);
					}else{
						TMyString::sAddOnStr("打印机开启",PrintText.body.Msg);
					}
					if(1){
						TMyString::sAddOnStr("打印:",PrintText.body.Msg);
						data = 0;
						if(EntryTmp.fData.Body.Splite.P0 & 0x01){
							TMyString::sAddOnStr("全部",PrintText.body.Msg);
							data++;
						  }
						  if(EntryTmp.fData.Body.Splite.P0 & 0x02){
							if(data)TMyString::sAddOnStr("+",PrintText.body.Msg);
							TMyString::sAddOnStr("火警",PrintText.body.Msg);
							data++;
						  }
						  if(EntryTmp.fData.Body.Splite.P0 & 0x04){
							if(data)TMyString::sAddOnStr("+",PrintText.body.Msg);
							TMyString::sAddOnStr("联动",PrintText.body.Msg);
							data++;
						  }
						  if(EntryTmp.fData.Body.Splite.P0 & 0x08){
							if(data)TMyString::sAddOnStr("+",PrintText.body.Msg);
							TMyString::sAddOnStr("监管",PrintText.body.Msg);
							data++;
						  }
						  if(EntryTmp.fData.Body.Splite.P0 & 0x10){
							if(data)TMyString::sAddOnStr("+",PrintText.body.Msg);
							TMyString::sAddOnStr("故障",PrintText.body.Msg);
							data++;
						  }
						  if(EntryTmp.fData.Body.Splite.P0 & 0x20){
							if(data)TMyString::sAddOnStr("+",PrintText.body.Msg);
							TMyString::sAddOnStr("屏蔽",PrintText.body.Msg);
							data++;
						  }
						  if(EntryTmp.fData.Body.Splite.P0 & 0x40){
							if(data)TMyString::sAddOnStr("+",PrintText.body.Msg);
							TMyString::sAddOnStr("操作",PrintText.body.Msg);
							data++;
						  }
						  if(EntryTmp.fData.Body.Splite.P0 & 0x80){
							if(data)TMyString::sAddOnStr("+",PrintText.body.Msg);
							TMyString::sAddOnStr("其他",PrintText.body.Msg);
							data++;
						  }
						  if(data == 0){
							TMyString::sAddOnStr("全部类型信息不打印",PrintText.body.Msg);
						  }
					}
				}else{
					if(EntryTmp.fData.Body.Splite.Data1 == 0){
						TMyString::sAddOnStr("Printer Off",PrintText.body.Msg);
					}else{
						TMyString::sAddOnStr("Printer On",PrintText.body.Msg);
					}
					if(1){
						TMyString::sAddOnStr("Print:",PrintText.body.Msg);
						data = 0;
						if(EntryTmp.fData.Body.Splite.P0 & 0x01){
							TMyString::sAddOnStr("All",PrintText.body.Msg);
							data++;
						  }
						  if(EntryTmp.fData.Body.Splite.P0 & 0x02){
							if(data)TMyString::sAddOnStr("+",PrintText.body.Msg);
							TMyString::sAddOnStr("Fire",PrintText.body.Msg);
							data++;
						  }
						  if(EntryTmp.fData.Body.Splite.P0 & 0x04){
							if(data)TMyString::sAddOnStr("+",PrintText.body.Msg);
							TMyString::sAddOnStr("Link",PrintText.body.Msg);
							data++;
						  }
						  if(EntryTmp.fData.Body.Splite.P0 & 0x08){
							if(data)TMyString::sAddOnStr("+",PrintText.body.Msg);
							TMyString::sAddOnStr("SUPV",PrintText.body.Msg);
							data++;
						  }
						  if(EntryTmp.fData.Body.Splite.P0 & 0x10){
							if(data)TMyString::sAddOnStr("+",PrintText.body.Msg);
							TMyString::sAddOnStr("Fail",PrintText.body.Msg);
							data++;
						  }
						  if(EntryTmp.fData.Body.Splite.P0 & 0x20){
							if(data)TMyString::sAddOnStr("+",PrintText.body.Msg);
							TMyString::sAddOnStr("Mask",PrintText.body.Msg);
							data++;
						  }
						  if(EntryTmp.fData.Body.Splite.P0 & 0x40){
							if(data)TMyString::sAddOnStr("+",PrintText.body.Msg);
							TMyString::sAddOnStr("OPR",PrintText.body.Msg);
							data++;
						  }
						  if(EntryTmp.fData.Body.Splite.P0 & 0x80){
							if(data)TMyString::sAddOnStr("+",PrintText.body.Msg);
							TMyString::sAddOnStr("Other",PrintText.body.Msg);
							data++;
						  }
						  if(data == 0){
							TMyString::sAddOnStr("All Type Not Print",PrintText.body.Msg);
						  }
					}
				}
				break;
			
			case otCfgDevice:
				
				NeedDisplayDescp = 1;
				break;
			
			case otCfgDateTime:
				FillText4MsgDateTimeSet();
				break;
				
			case otCfgPermissionAllow:
				
				break;
			
			case otAllowSet:
				FillText4AllowSet();
				break;
				
			case otAlramSetOnOff:
				FillText4AlramSetOnOff();
				break;
			
			case otBusPadOn:
				FillText4BusPadOn();
				break;
			
			case otBusPadOff:
				FillText4BusPadOff();
				break;
			
			case otDirectPadManualAllowOn:
				FillText4DirectPadManualAllowOn();
				break;
			
			case otDirectPadManualAllowOff:
				FillText4DirectPadManualAllowOff();
				break;
			
			case otDirectPadNodeOn:
				FillText4DirectPadNodeOn();
				break;
			
			case otDirectPadNodeOff:
				FillText4DirectPadNodeOff();
				break;
			
			case otUserCheck:
				FillText4UserCheck();
				break;
			
			case otLinkageGo:
				FillText4LinkageGo(EntryTmp.fData.Body.Splite.Data1);
				break;
			
			case otSetNwTime:
				FillTextWithDateTime();
				FillCtlNum();
				if(LanguageEnCn==0)TMyString::sAddOnStr(	"设置各区域机日期时间",PrintText.body.Msg);
				else TMyString::sAddOnStr(			"Set Regionals DateTime",PrintText.body.Msg);
				break;
			
			case otReqNwTime:
				FillTextWithDateTime();
				FillCtlNum();
				if(LanguageEnCn==0)TMyString::sAddOnStr(	"向集中机请求日期时间",PrintText.body.Msg);
				else TMyString::sAddOnStr(			"Get DateTime",PrintText.body.Msg);
				break;
			
			case otSelfCheck:
				FillTextWithDateTime();
				FillCtlNum();
				if(LanguageEnCn==0)TMyString::sAddOnStr("自检",PrintText.body.Msg);
				else TMyString::sAddOnStr("Self-Check",PrintText.body.Msg);
				break;
			
			case otSetManualAllowState:
				FillTextWithDateTime();
				FillCtlNum();
				if(LanguageEnCn==0){
					if(EntryTmp.fData.Body.Splite.Data1)TMyString::sAddOnStr("手动允许",PrintText.body.Msg);
					else TMyString::sAddOnStr("手动禁止",PrintText.body.Msg);
				}else{
					if(EntryTmp.fData.Body.Splite.Data1)TMyString::sAddOnStr("Manual Allow",PrintText.body.Msg);
					else TMyString::sAddOnStr("Manual Prohibit",PrintText.body.Msg);
				}
				break;
			
			case otSetAutoAllowState:
				FillTextWithDateTime();
				FillCtlNum();
				if(LanguageEnCn==0){
					if(EntryTmp.fData.Body.Splite.Data1)TMyString::sAddOnStr("自动允许",PrintText.body.Msg);
					else TMyString::sAddOnStr("自动禁止",PrintText.body.Msg);
				}else{
					if(EntryTmp.fData.Body.Splite.Data1)TMyString::sAddOnStr("Auto Enabled",PrintText.body.Msg);
					else TMyString::sAddOnStr("Auto Disabled",PrintText.body.Msg);
				}
				break;
			
			case otRemoteSetManualAllowState:
				FillTextWithDateTime();
				FillCtlNum();
				if(LanguageEnCn==0){
					if(EntryTmp.fData.Body.Splite.Data1)TMyString::sAddOnStr("手动允许-集中机呼叫执行",PrintText.body.Msg);
					else TMyString::sAddOnStr("手动禁止--集中机呼叫执行",PrintText.body.Msg);
				}else{
					if(EntryTmp.fData.Body.Splite.Data1)TMyString::sAddOnStr("Manual Allow-By Called",PrintText.body.Msg);
					else TMyString::sAddOnStr("Manual Prohibit-By Called",PrintText.body.Msg);
				}
				break;
			
			case otRemoteSetAutoAllowState:
				FillTextWithDateTime();
				FillCtlNum();
				if(LanguageEnCn==0){
					if(EntryTmp.fData.Body.Splite.Data1)TMyString::sAddOnStr("自动允许-集中机呼叫执行",PrintText.body.Msg);
					else TMyString::sAddOnStr("自动禁止--集中机呼叫执行",PrintText.body.Msg);
				}else{
					if(EntryTmp.fData.Body.Splite.Data1)TMyString::sAddOnStr("Auto Enabled-By Called",PrintText.body.Msg);
					else TMyString::sAddOnStr("Auto Disabled--By Called",PrintText.body.Msg);
				}
				break;
			
			case otReportManualAllowState:
				FillTextWithDateTime();
				FillCtlNum();
				if(LanguageEnCn==0){
					if(EntryTmp.fData.Body.Splite.Data1)TMyString::sAddOnStr("手动允许-区域机报告",PrintText.body.Msg);
					else TMyString::sAddOnStr("手动禁止-区域机报告",PrintText.body.Msg);
				}else{
					if(EntryTmp.fData.Body.Splite.Data1)TMyString::sAddOnStr("Manual Allow-Slaver",PrintText.body.Msg);
					else TMyString::sAddOnStr("Manual Prohibit-Slaver",PrintText.body.Msg);
				}
				break;
			
			case otReportAutoAllowState:
				FillTextWithDateTime();
				FillCtlNum();
				if(LanguageEnCn==0){
					if(EntryTmp.fData.Body.Splite.Data1)TMyString::sAddOnStr("自动允许-区域机报告",PrintText.body.Msg);
					else TMyString::sAddOnStr("自动禁止-区域机报告",PrintText.body.Msg);
				}else{
					if(EntryTmp.fData.Body.Splite.Data1)TMyString::sAddOnStr("Auto Enabled-Slaver",PrintText.body.Msg);
					else TMyString::sAddOnStr("Manual Prohibit-Slaver",PrintText.body.Msg);
				}
				break;
			
			case otFireConfirm:
				FillTextWithDateTime();
				FillCtlNumNoSpace();
				TMyString::sAddOnStr("-",PrintText.body.DateAddr);
				TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.DateAddr);
				TMyString::sAddOnStr("-",PrintText.body.DateAddr);
				TMyString::sAddOn3Dg(EntryTmp.fData.Body.Splite.P1, PrintText.body.DateAddr);
				if(LanguageEnCn==0)TMyString::sAddOnStr(" 火警确认 ",PrintText.body.Msg);
				else TMyString::sAddOnStr(" Fire Confirm ",PrintText.body.Msg);
				NeedDisplayDescp = 1;
				OperateAddConfirmMsg(1);
				break;
			
			case otFireRemoteConfirm:
				FillTextWithDateTime();
				FillCtlNumNoSpace();
				TMyString::sAddOnStr("-",PrintText.body.DateAddr);
				TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.DateAddr);
				TMyString::sAddOnStr("-",PrintText.body.DateAddr);
				TMyString::sAddOn3Dg(EntryTmp.fData.Body.Splite.P1, PrintText.body.DateAddr);
			
				if(LanguageEnCn==0)TMyString::sAddOnStr(" 火警远程确认 ",PrintText.body.Msg);
				else TMyString::sAddOnStr(" Fire Confirm Far ",PrintText.body.Msg);
				//TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.Data1, PrintText);
				NeedDisplayDescp = 1;
				OperateAddConfirmMsg(1);
				break;
			
			case otFaultConfirm:
				FillTextWithDateTime();
				if( (EntryTmp.fData.Body.Splite.Data1 & 0xF0) == 0){
					NeedDisplayDescp = 1;
				}
				AddOnFaultMsg();
				if(LanguageEnCn==0)TMyString::sAddOnStr(" 故障确认 ",PrintText.body.Msg);
				else TMyString::sAddOnStr(" Fail Confirm ",PrintText.body.Msg);
				OperateAddConfirmMsg(2);
				break;
				
			case otFaultRemoteConfirm:
				FillTextWithDateTime();
				if( (EntryTmp.fData.Body.Splite.Data1 & 0xF0) == 0){
					FillCtlNumNoSpace();
					TMyString::sAddOnStr("-",PrintText.body.DateAddr);
					TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.DateAddr);
					TMyString::sAddOnStr("-",PrintText.body.DateAddr);
					TMyString::sAddOn3Dg(EntryTmp.fData.Body.Splite.P1, PrintText.body.DateAddr);
					if(LanguageEnCn==0)TMyString::sAddOnStr(" 故障远程确认 ",PrintText.body.Msg);
					else TMyString::sAddOnStr(" Fail Confirm Far ",PrintText.body.Msg);
					TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P2, PrintText.body.Msg);
					NeedDisplayDescp = 1;
					OperateAddConfirmMsg(2);
				}else{
					FillCtlNum();
					if(LanguageEnCn==0)TMyString::sAddOnStr(" 故障远程确认 ",PrintText.body.Msg);
					else TMyString::sAddOnStr(" Fail Confirm Far ",PrintText.body.Msg);
					TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P2, PrintText.body.Msg);
					OperateAddConfirmMsg(2);
				}
				break;
				
			case otSetSmokeSensViaCircuit:
				FillTextWithDateTime();
				FillCtlNumNoSpace();
				TMyString::sAddOnStr("-",PrintText.body.DateAddr);
				TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.DateAddr);
				if(LanguageEnCn==0){
					if(EntryTmp.fData.Body.Splite.Data1 == 0){
						//TMyString::sAddOnStr(" 回路烟感设置敏感度为 低",PrintText.body.Msg);
						TMyString::sAddOnStr(" 回路烟感设置敏感度为 标准",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 1){
						//TMyString::sAddOnStr(" 回路烟感设置敏感度为 中",PrintText.body.Msg);
						TMyString::sAddOnStr(" 回路烟感设置敏感度为 高",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 2){
						//TMyString::sAddOnStr(" 回路烟感设置敏感度为 高",PrintText.body.Msg);
						TMyString::sAddOnStr(" 回路烟感设置敏感度为 未定义",PrintText.body.Msg);
					}else{
						TMyString::sAddOnStr(" 回路烟感设置敏感度为 未定义",PrintText.body.Msg);
					}
				}else{
					if(EntryTmp.fData.Body.Splite.Data1 == 0){
						//TMyString::sAddOnStr(	" 回路烟感设置敏感度为 低",PrintText.body.Msg);
						TMyString::sAddOnStr(  	" Set Loop Smoke Det:Std",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 1){
						//TMyString::sAddOnStr(	" 回路烟感设置敏感度为 中",PrintText.body.Msg);
						TMyString::sAddOnStr(	" Set Loop Smoke Det:High",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 2){
						//TMyString::sAddOnStr(	" 回路烟感设置敏感度为 高",PrintText.body.Msg);
						TMyString::sAddOnStr(	" Set Loop Smoke Det:----",PrintText.body.Msg);
					}else{
						TMyString::sAddOnStr(	" Set Loop Smoke Det:----",PrintText.body.Msg);
					}
				}
				break;
				
			case otSetSmokeSensViaAddr:
				FillTextWithDateTime();
				FillCtlNumNoSpace();
				TMyString::sAddOnStr("-",PrintText.body.DateAddr);
				TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.DateAddr);
				TMyString::sAddOnStr("-",PrintText.body.DateAddr);
				TMyString::sAddOn3Dg(EntryTmp.fData.Body.Splite.P1, PrintText.body.DateAddr);
				if(LanguageEnCn==0){
					if(EntryTmp.fData.Body.Splite.Data1 == 0){
						//TMyString::sAddOnStr(" 回路烟感设置敏感度为 低",PrintText.body.Msg);
						TMyString::sAddOnStr(" 烟感设置敏感度为 标准",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 1){
						//TMyString::sAddOnStr(" 回路烟感设置敏感度为 中",PrintText.body.Msg);
						TMyString::sAddOnStr(" 烟感设置敏感度为 高",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 2){
						//TMyString::sAddOnStr(" 回路烟感设置敏感度为 高",PrintText.body.Msg);
						TMyString::sAddOnStr(" 烟感设置敏感度为 未定义",PrintText.body.Msg);
					}else{
						TMyString::sAddOnStr(" 烟感设置敏感度为 未定义",PrintText.body.Msg);
					}
				}else{
					if(EntryTmp.fData.Body.Splite.Data1 == 0){
						//TMyString::sAddOnStr(	" 回路烟感设置敏感度为 低",PrintText.body.Msg);
						TMyString::sAddOnStr(	" Set Smoke Detector:Std",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 1){
						//TMyString::sAddOnStr(	" 回路烟感设置敏感度为 中",PrintText.body.Msg);
						TMyString::sAddOnStr(	" Set Smoke Detector:High",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 2){
						//TMyString::sAddOnStr(	" 回路烟感设置敏感度为 高",PrintText.body.Msg);
						TMyString::sAddOnStr(	" Set Smoke Detector:----",PrintText.body.Msg);
					}else{
						TMyString::sAddOnStr(	" Set Smoke Detector:----",PrintText.body.Msg);
					}
				}
				NeedDisplayDescp = 1;
				break;
				
			case otCleanUp:
				FillTextWithDateTime();
				FillCtlNum();
			//aPanel->Btn[0].Caption.FromStr("  清除回路终端设备的登记  ");
				//aPanel->Btn[1].Caption.FromStr("      清除总线盘配置      ");
				//aPanel->Btn[2].Caption.FromStr("      清除多线盘配置      ");
				//aPanel->Btn[3].Caption.FromStr("    清除所有联动表达式    ");
				//aPanel->Btn[4].Caption.FromStr("    清除本机终端设备注释  ");
				//aPanel->Btn[5].Caption.FromStr("       清除组网配置       ");
				//aPanel->Btn[6].Caption.FromStr("  清除网络加载的设备注释  ");
				//aPanel->Btn[7].Caption.FromStr("         预设描述         ");
				if(LanguageEnCn==0){
					if(EntryTmp.fData.Body.Splite.Data1 == 0){
						TMyString::sAddOnStr("清除回路注册",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 1){
						TMyString::sAddOnStr("清除总线盘配置",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 2){
						TMyString::sAddOnStr("清除多线盘配置",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 3){
						TMyString::sAddOnStr("清除所有联动表达式 ",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 4){
						TMyString::sAddOnStr("清除本机终端设备注释",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 5){
						TMyString::sAddOnStr("清除组网配置",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 6){
						TMyString::sAddOnStr("清除网络加载的设备注释",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 7){
						TMyString::sAddOnStr("清除用户码及指派类型",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 0xF0){
						TMyString::sAddOnStr("清除回路注册-中途退出",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 0xF3){
						TMyString::sAddOnStr("清除联动关系-中途退出",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 0xF4){
						TMyString::sAddOnStr("清除注释-中途退出",PrintText.body.Msg);
					}
				}else{
					if(EntryTmp.fData.Body.Splite.Data1 == 0){
						TMyString::sAddOnStr("Clear Loop Regist",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 1){
						TMyString::sAddOnStr("Clear Bus Pnl Config",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 2){
						TMyString::sAddOnStr("Clear Direct Config",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 3){
						TMyString::sAddOnStr("Clear All Linkage Expression ",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 4){
						TMyString::sAddOnStr("Clear All Endpoint Description",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 5){
						TMyString::sAddOnStr("Clear LAN Config",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 6){
						TMyString::sAddOnStr("Clear LAN Description",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 7){
						TMyString::sAddOnStr("Clear Usercode & Assigntype",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 0xF0){
						TMyString::sAddOnStr("Blocking,Clear Loop Regist",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 0xF3){
						TMyString::sAddOnStr("Blocking,Clear All Linkage Expressions",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 0xF4){
						TMyString::sAddOnStr("Blocking,Clear Descriptions",PrintText.body.Msg);
					}
				}
				break;
				
			case otLinkageExpsSaveRemove:
				FillTextWithDateTime();
				FillCtlNum();
				if(LanguageEnCn==0){
					if(EntryTmp.fData.Body.Splite.Data1 == 1){
						TMyString::sAddOnStr("保存一个联动表达式 编号:",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 0){
						TMyString::sAddOnStr("删除一个联动表达式 编号:",PrintText.body.Msg);
					}
				}else{
					if(EntryTmp.fData.Body.Splite.Data1 == 1){
						TMyString::sAddOnStr("Save Linkage Expression:",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 0){
						TMyString::sAddOnStr("Del Linkage Expression:",PrintText.body.Msg);
					}
				}
				ExpsInx = EntryTmp.fData.Body.Splite.P0;
				ExpsInx = ExpsInx * 256;
				ExpsInx = ExpsInx + EntryTmp.fData.Body.Splite.P1;
				TMyString::sAddOn4Dg(ExpsInx, PrintText.body.Msg);
				break;
				
			case otBusPadModify:
				FillTextWithDateTime();
				FillCtlNum();
				if(LanguageEnCn==0){
					TMyString::sAddOnStr("总线盘:",PrintText.body.Msg);
					TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.Msg);
					TMyString::sAddOnStr(" 按键号:",PrintText.body.Msg);
					TMyString::sAddOn3Dg(EntryTmp.fData.Body.Splite.P1, PrintText.body.Msg);
					TMyString::sAddOnStr(" 配置",PrintText.body.Msg);
				}else{
					TMyString::sAddOnStr("Bus Brd:",PrintText.body.Msg);
					TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.Msg);
					TMyString::sAddOnStr(" Keypad:",PrintText.body.Msg);
					TMyString::sAddOn3Dg(EntryTmp.fData.Body.Splite.P1, PrintText.body.Msg);
					TMyString::sAddOnStr(" Config",PrintText.body.Msg);
				}
				break;
			
			case otDirectPadModify:
				FillTextWithDateTime();
				FillCtlNum();
				if(LanguageEnCn==0){
					TMyString::sAddOnStr("多线盘:",PrintText.body.Msg);
					TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.Msg);
					TMyString::sAddOnStr(" 配置",PrintText.body.Msg);
				}else{
					TMyString::sAddOnStr("Direct Brd:",PrintText.body.Msg);
					TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.Msg);
					TMyString::sAddOnStr(" Config",PrintText.body.Msg);
				}
				break;
			
			case otDescpModify:
				FillTextWithDateTime();
				FillCtlNumNoSpace();
				if(EntryTmp.fData.Body.Splite.P0 <= dPORT_MAX_COUNT){
					TMyString::sAddOnStr("-",PrintText.body.DateAddr);
					TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.DateAddr);
					TMyString::sAddOnStr("-",PrintText.body.DateAddr);
					TMyString::sAddOn3Dg(EntryTmp.fData.Body.Splite.P1, PrintText.body.DateAddr);
					if(LanguageEnCn==0)TMyString::sAddOnStr(	" 回路设备描述更改 ",PrintText.body.Msg);
					else TMyString::sAddOnStr(			" Changed Dev Descp",PrintText.body.Msg);
					NeedDisplayDescp = 1;
				}else
				if(  (EntryTmp.fData.Body.Splite.P0 >= dADDR_DIRECTPAD_START) && (EntryTmp.fData.Body.Splite.P0 <= dADDR_DIRECTPAD_END) ){
					if(LanguageEnCn==0){
						TMyString::sAddOnStr(" 多线盘:",PrintText.body.Msg);
						TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0-dADDR_DIRECTPAD_START+1, PrintText.body.Msg);
						TMyString::sAddOnStr(" 节点:",PrintText.body.Msg);
						TMyString::sAddOn3Dg(EntryTmp.fData.Body.Splite.P1, PrintText.body.Msg);
						TMyString::sAddOnStr(" 描述更改 ",PrintText.body.Msg);
					}else{
						TMyString::sAddOnStr(" Direct:",PrintText.body.Msg);
						TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0-dADDR_DIRECTPAD_START+1, PrintText.body.Msg);
						TMyString::sAddOnStr(" Node:",PrintText.body.Msg);
						TMyString::sAddOn3Dg(EntryTmp.fData.Body.Splite.P1, PrintText.body.Msg);
						TMyString::sAddOnStr(" Changed Descp",PrintText.body.Msg);
					}
					NeedDisplayDescp = 1;
				}
				break;
				
			case otPassWdModify:
				FillTextWithDateTime();
				FillCtlNum();
				if(LanguageEnCn==0){
					if(EntryTmp.fData.Body.Splite.Data1 == 2){
						TMyString::sAddOnStr(" 二级密码更改",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 3){
						TMyString::sAddOnStr(" 三级密码更改",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 12){
						TMyString::sAddOnStr(" 系统故障,二级密码写入失败",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 13){
						TMyString::sAddOnStr(" 系统故障,三级密码写入失败",PrintText.body.Msg);
					}
				}else{
					if(EntryTmp.fData.Body.Splite.Data1 == 2){
						TMyString::sAddOnStr(" Change Password II",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 3){
						TMyString::sAddOnStr(" Change Password III",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 12){
						TMyString::sAddOnStr(" Sys Fault,Fail Password II",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 13){
						TMyString::sAddOnStr(" Sys Fault,Fail Password III",PrintText.body.Msg);
					}
				}
				break;
				
			case otRegisterByManual:
				FillTextWithDateTime();
				FillCtlNumNoSpace();
				TMyString::sAddOnStr("-",PrintText.body.DateAddr);
				TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.DateAddr);
				TMyString::sAddOnStr("-",PrintText.body.DateAddr);
				TMyString::sAddOn3Dg(EntryTmp.fData.Body.Splite.P1, PrintText.body.DateAddr);
				TMyString::sAddOnStr("~",PrintText.body.DateAddr);
				TMyString::sAddOn3Dg(EntryTmp.fData.Body.Splite.P2, PrintText.body.DateAddr);
				if(LanguageEnCn==0){
					if(EntryTmp.fData.Body.Splite.Data1){
						TMyString::sAddOnStr(" 手动注册,类型:",PrintText.body.Msg);
						TMyString::sAddOnStr(StrTypeShortName[EntryTmp.fData.Body.Splite.dType],PrintText.body.Msg);
					}else{
						TMyString::sAddOnStr(" 手动注册,删除",PrintText.body.Msg);
					}
				}else{
					if(EntryTmp.fData.Body.Splite.Data1){
						TMyString::sAddOnStr(" Manual Reg Type:",PrintText.body.Msg);
						TMyString::sAddOnStr(StrTypeShortNameEn[EntryTmp.fData.Body.Splite.dType],PrintText.body.Msg);
					}else{
						TMyString::sAddOnStr(" Manual Reg Delete",PrintText.body.Msg);
					}
				}
				break;
				
			case otAddRemoveNwCtl:
				FillTextWithDateTime();
				FillCtlNum();
				if(LanguageEnCn==0){
					if(EntryTmp.fData.Body.Splite.Data1 == 1){
						TMyString::sAddOnStr(" 手动添加区域机 ",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 2){
						TMyString::sAddOnStr(" 手动删除区域机 ",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 3){
						TMyString::sAddOnStr(" 手动添加集中机 ",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 4){
						TMyString::sAddOnStr(" 手动删除集中机 ",PrintText.body.Msg);
					}
				}else{
					if(EntryTmp.fData.Body.Splite.Data1 == 1){
						TMyString::sAddOnStr(" Manual Add Slaver ",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 2){
						TMyString::sAddOnStr(" Manual Del Slaver ",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 3){
						TMyString::sAddOnStr(" Manual Add Master ",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 4){
						TMyString::sAddOnStr(" Manual Del Master ",PrintText.body.Msg);
					}
				}
				TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.Msg);
				break;
				
			case otRegCanNetwork:
				FillTextWithDateTime();
				FillCtlNum();
				if(LanguageEnCn==0){
					if(EntryTmp.fData.Body.Splite.Data1 == 1){
						if(EntryTmp.fData.Body.Splite.P1){
							TMyString::sAddOnStr("本集中机注册区域机数量:",PrintText.body.Msg);
							TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1, PrintText.body.Msg);
						}else{
							TMyString::sAddOnStr("本集中机清除联机区域机",PrintText.body.Msg);
						}
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 2){
						if(EntryTmp.fData.Body.Splite.P1){
							TMyString::sAddOnStr("本区域机联机注册,集中机号:",PrintText.body.Msg);
							TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.Msg);
						}else{
							TMyString::sAddOnStr("本区域机联机清除,集中机号:",PrintText.body.Msg);
							TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.Msg);
						}
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 3){
						if(EntryTmp.fData.Body.Splite.P1){
							TMyString::sAddOnStr("设置网络共存集中机数量:",PrintText.body.Msg);
							TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.Msg);
						}else{
							TMyString::sAddOnStr("清除网络共存集中机:",PrintText.body.Msg);
							TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.Msg);
						}
					}
				}else{
					if(EntryTmp.fData.Body.Splite.Data1 == 1){
						if(EntryTmp.fData.Body.Splite.P1){
							TMyString::sAddOnStr("Slaver Count In Master:",PrintText.body.Msg);
							TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1, PrintText.body.Msg);
						}else{
							TMyString::sAddOnStr("Cleared Slavers In Master",PrintText.body.Msg);
						}
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 2){
						if(EntryTmp.fData.Body.Splite.P1){
							TMyString::sAddOnStr("Inject Num Of Master::",PrintText.body.Msg);
							TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.Msg);
						}else{
							TMyString::sAddOnStr("Cleared Master Conection",PrintText.body.Msg);
							TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.Msg);
						}
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 3){
						if(EntryTmp.fData.Body.Splite.P1){
							TMyString::sAddOnStr("Set Master Count:",PrintText.body.Msg);
							TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.Msg);
						}else{
							TMyString::sAddOnStr("Clear iConnected Master",PrintText.body.Msg);
							TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.Msg);
						}
					}
				}
				break;
				
			case  otClearNetworkCfg:
				FillTextWithDateTime();
				FillCtlNum();
				if(LanguageEnCn==0){
					if(EntryTmp.fData.Body.Splite.Data1 == 1){
						TMyString::sAddOnStr(" 清除所有区域机",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 2){
						TMyString::sAddOnStr(" 清除挂载的集中机",PrintText.body.Msg);
					}
				}else{
					if(EntryTmp.fData.Body.Splite.Data1 == 1){
						TMyString::sAddOnStr(" Clear All Slaver",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 2){
						TMyString::sAddOnStr(" Clear Link Master",PrintText.body.Msg);
					}
				}
				break;
				
			case  otBroadcastVa:
				FillTextWithDateTime();
				FillCtlNum();
				if(LanguageEnCn==0)TMyString::sAddOnStr("设置广播与声光 路径:",PrintText.body.Msg);
				else TMyString::sAddOnStr("Set BCT & SL Path:",PrintText.body.Msg);
				TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.Msg);
				TMyString::sAddOnStr("-",PrintText.body.Msg);
				TMyString::sAddOn3Dg(EntryTmp.fData.Body.Splite.P1, PrintText.body.Msg);
				if(LanguageEnCn==0){
					if(EntryTmp.fData.Body.Splite.Data1 == 0){
						TMyString::sAddOnStr(" 并行模式",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 1){
						TMyString::sAddOnStr(" 交替模式",PrintText.body.Msg);
					}
				}else{
					if(EntryTmp.fData.Body.Splite.Data1 == 0){
						TMyString::sAddOnStr(" Parallel Mode",PrintText.body.Msg);
					}else
					if(EntryTmp.fData.Body.Splite.Data1 == 1){
						TMyString::sAddOnStr(" Alternate Mode",PrintText.body.Msg);
					}
				}
				break;
			case otSetAllowState:
				FillTextWithDateTime();
				FillCtlNum();
				if(LanguageEnCn==0){
					if(EntryTmp.fData.Body.Splite.Data1 == 3)TMyString::sAddOnStr("自动允许,手动允许",PrintText.body.Msg);
					else if(EntryTmp.fData.Body.Splite.Data1 == 1)TMyString::sAddOnStr("自动允许,手动禁止",PrintText.body.Msg);
					else if(EntryTmp.fData.Body.Splite.Data1 == 2)TMyString::sAddOnStr("自动禁止,手动允许",PrintText.body.Msg);
					else TMyString::sAddOnStr("自动禁止,手动禁止",PrintText.body.Msg);
				}else{
					if(EntryTmp.fData.Body.Splite.Data1 == 3)TMyString::sAddOnStr("En Auto,En Manual",PrintText.body.Msg);
					else if(EntryTmp.fData.Body.Splite.Data1 == 1)TMyString::sAddOnStr("En Auto,Dis Manual",PrintText.body.Msg);
					else if(EntryTmp.fData.Body.Splite.Data1 == 2)TMyString::sAddOnStr("Dis Auto,En Manual",PrintText.body.Msg);
					else TMyString::sAddOnStr("Dis Auto,Dis Manual",PrintText.body.Msg);
				}
				break;
			case otRemoteSetAllowState:
				FillTextWithDateTime();
				FillCtlNum();
				if(LanguageEnCn==0){
					if(EntryTmp.fData.Body.Splite.Data1 == 3)TMyString::sAddOnStr("自动允许-手动允许-集中机呼叫执行",PrintText.body.Msg);
					else if(EntryTmp.fData.Body.Splite.Data1 == 1)TMyString::sAddOnStr("自动允许-手动禁止-集中机呼叫执行",PrintText.body.Msg);
					else if(EntryTmp.fData.Body.Splite.Data1 == 2)TMyString::sAddOnStr("自动禁止-手动允许-集中机呼叫执行",PrintText.body.Msg);
					else TMyString::sAddOnStr("自动禁止-手动禁止-集中机呼叫执行",PrintText.body.Msg);
				}else{
					if(EntryTmp.fData.Body.Splite.Data1 == 3)TMyString::sAddOnStr("En Auto,En Manual(Master Call)",PrintText.body.Msg);
					else if(EntryTmp.fData.Body.Splite.Data1 == 1)TMyString::sAddOnStr("En Auto,Dis Manual(Master Call)",PrintText.body.Msg);
					else if(EntryTmp.fData.Body.Splite.Data1 == 2)TMyString::sAddOnStr("Dis Auto,En Manual(Master Call)",PrintText.body.Msg);
					else TMyString::sAddOnStr("Dis Auto,Dis Manual(Master Call)",PrintText.body.Msg);
				}
				break;
			case otReportAllowState:
				FillTextWithDateTime();
				FillCtlNum();
				if(LanguageEnCn==0){
					if(EntryTmp.fData.Body.Splite.Data1 == 3)TMyString::sAddOnStr("自动允许-手动允许-区域机报告",PrintText.body.Msg);
					else if(EntryTmp.fData.Body.Splite.Data1 == 1)TMyString::sAddOnStr("自动允许-手动禁止-区域机报告",PrintText.body.Msg);
					else if(EntryTmp.fData.Body.Splite.Data1 == 1)TMyString::sAddOnStr("自动禁止-手动允许-区域机报告",PrintText.body.Msg);
					else TMyString::sAddOnStr("自动禁止-手动禁止-区域机报告",PrintText.body.Msg);
				}else{
					if(EntryTmp.fData.Body.Splite.Data1 == 3)TMyString::sAddOnStr("En Auto,En Manual(Slaver Report)",PrintText.body.Msg);
					else if(EntryTmp.fData.Body.Splite.Data1 == 1)TMyString::sAddOnStr("En Auto,Dis Manual(Slaver Report)",PrintText.body.Msg);
					else if(EntryTmp.fData.Body.Splite.Data1 == 1)TMyString::sAddOnStr("Dis Auto,En Manual(Slaver Report)",PrintText.body.Msg);
					else TMyString::sAddOnStr("Dis Auto,Dis Manual(Slaver Report)",PrintText.body.Msg);
				}
				break;
			
			default : break;
		}
		
		TMyString::sAddOnStr("\n",PrintText.body.Msg);
		DescpTextBufInsert(OperateEntryTmp, NeedDisplayDescp);
		SetBufInsert();
	}
}

void TDoPrint::GetDescpEntry(TRecordCommon DescpEntryTmp)
{
	volatile unsigned int aAddr ,i , aCsum, iP0;
	unsigned int aCn, aP0, aP1;
	
	if(DescpEntryTmp.Splite.PCtlNum == MainCtl.fData.Split.MyNum){
		aP0 = DescpEntryTmp.Splite.P0;
		aP1 = DescpEntryTmp.Splite.P1;
		if(aP0 && aP1){
			if(aP0 <= dPORT_MAX_COUNT){
				aP0--;
				aP1--;
			}else
			if( (aP0 >= dADDR_DIRECTPAD_START) && (aP0 <= dADDR_DIRECTPAD_END) ){
				aP0 = aP0 - dADDR_DIRECTPAD_START;
				aP1 = aP0 * dDIRECTCTL_KEY_MAX_COUNT + (aP1);
				aP0 = 40;
			}
			aAddr = dAddrSdRam_Descp + (aP0 * 256 * 32) + (aP1 * 32);
			for(i=7; i<15; i++){
				EntryTmp.D32[i] = *(volatile unsigned int *)(aAddr + (i-7) *4);
			}
		}else{
			for(i=7; i<15; i++){
				EntryTmp.D32[i] = 0;
			}
		}
	}else
	if( (DescpEntryTmp.Splite.PCtlNum) && (DescpEntryTmp.Splite.PCtlNum <= dNETWORK_MACHINE_COUNT) ){
		aCn = EntryTmp.fData.Body.Splite.PCtlNum -1;
		aP0 = EntryTmp.fData.Body.Splite.P0;
		aP1 = EntryTmp.fData.Body.Splite.P1;
		if(aP0 && aP1){
			if(aP0 <= dPORT_MAX_COUNT){
				aP0--;
			}else
			if( (aP0 >= dADDR_DIRECTPAD_START) && (aP0 <= dADDR_DIRECTPAD_END) ){
				aP0 = aP0 - dADDR_DIRECTPAD_START;
				aP1 = aP0 * dDIRECTCTL_KEY_MAX_COUNT + (aP1);
				aP0 = 40;
			}
			aAddr = dAddrSdRam_DescpNw + (aCn*dONE_CTRL_DESCP_BYTES)+(aP0*8192) + (aP1*32);
			for(i=7; i<15; i++){
				EntryTmp.D32[i] = *(volatile unsigned int *)(aAddr + (i-7) *4);
			}
		}else{
			for(i=7; i<15; i++){
				EntryTmp.D32[i] = 0;
			}
		}
	}else{
		for(i=7; i<15; i++){
			EntryTmp.D32[i] = 0;
		}
	}
}

void TDoPrint::FillFaultText(TRecordCommon FaultEntryTmp, int aForce)
{
	volatile unsigned int SdAddr, Addr;
	unsigned int d,e;
	unsigned int data;
	unsigned char aP0;
	unsigned char aP1;
	unsigned char aType;
	unsigned char len;
	int NeedDisplayDescp;
	unsigned int TextAddPst;
	
	NeedDisplayDescp = 0;
	
	if(aForce == 0){
		if(PriterSetting.OnOff ==0)return;
		if( (PriterSetting.PrintSelected & (0x0010 + 0x0001)) ==0)return;
	}

	
	//Fault History
	for(d=0; d<4; d++){
		EntryTmp.fData.Body.D32[d] = FaultEntryTmp.D32[d];
	}
	EntryTmp.fData.UserCode = FaultEntryTmp.Splite.UserCode;

	FillTextWithDateTime();
	
	TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.PCtlNum, PrintText.body.DateAddr);
	
	/*
	TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.DateAddr);
	TMyString::sAddOnStr("-",PrintText.body.DateAddr);
	
	data = EntryTmp.fData.Body.Splite.PCtlNum;
	d = data/10;
	e = d % 10;
	PrintText[18] = e + '0';
	e = data % 10;
	PrintText[19] = e + '0';
	PrintText[20] = '-';
	
	data = EntryTmp.fData.Body.Splite.P0;
	d = data/10;
	e = d % 10;
	PrintText[21] = e + '0';
	e = data % 10;
	PrintText[22] = e + '0';
	PrintText[23] = '-';
	
	PrintText[24] = '\0';
	*/
	if( (EntryTmp.fData.Body.Splite.Data1 & 0xF0) == 0xC0){
		if(LanguageEnCn==0){
			TMyString::sAddOnStr("故障 ",PrintText.body.Msg);
			if( (EntryTmp.fData.Body.Splite.P1 >= dADDR_HANDPAD_START) && (EntryTmp.fData.Body.Splite.P1 <= dADDR_HANDPAD_END) ){
				TMyString::sAddOnStr("总线盘 ",PrintText.body.Msg);
				TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1 -dADDR_HANDPAD_START +1,PrintText.body.Msg);
				if(EntryTmp.fData.Body.Splite.Data1 & 0x01)TMyString::sAddOnStr(" 离线",PrintText.body.Msg);
				else TMyString::sAddOnStr(" 恢复",PrintText.body.Msg);
			}
			if( (EntryTmp.fData.Body.Splite.P1 >= dADDR_DIRECTPAD_START) && (EntryTmp.fData.Body.Splite.P1 <= dADDR_DIRECTPAD_END) ){
				TMyString::sAddOnStr("直线盘 ",PrintText.body.Msg);
				TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1 -dADDR_DIRECTPAD_START +1,PrintText.body.Msg);
				if(EntryTmp.fData.Body.Splite.Data1 & 0x01)TMyString::sAddOnStr(" 离线",PrintText.body.Msg);
				else TMyString::sAddOnStr(" 恢复",PrintText.body.Msg);
			}
		}else{
			TMyString::sAddOnStr("Fail ",PrintText.body.Msg);
			if( (EntryTmp.fData.Body.Splite.P1 >= dADDR_HANDPAD_START) && (EntryTmp.fData.Body.Splite.P1 <= dADDR_HANDPAD_END) ){
				TMyString::sAddOnStr("BudPad Brd ",PrintText.body.Msg);
				TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1 -dADDR_HANDPAD_START +1,PrintText.body.Msg);
				if(EntryTmp.fData.Body.Splite.Data1 & 0x01)TMyString::sAddOnStr(" Offline",PrintText.body.Msg);
				else TMyString::sAddOnStr(" Recover",PrintText.body.Msg);
			}
			if( (EntryTmp.fData.Body.Splite.P1 >= dADDR_DIRECTPAD_START) && (EntryTmp.fData.Body.Splite.P1 <= dADDR_DIRECTPAD_END) ){
				TMyString::sAddOnStr("DirectPad Brd ",PrintText.body.Msg);
				TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1 -dADDR_DIRECTPAD_START +1,PrintText.body.Msg);
				if(EntryTmp.fData.Body.Splite.Data1 & 0x01)TMyString::sAddOnStr(" Offline",PrintText.body.Msg);
				else TMyString::sAddOnStr(" Recover",PrintText.body.Msg);
			}
		}
	}else
	if((EntryTmp.fData.Body.Splite.Data1 & 0xF0) == 0xD0){
		if(LanguageEnCn==0){
			TMyString::sAddOnStr("故障 ",PrintText.body.Msg);
			TMyString::sAddOnStr("设备故障 ",PrintText.body.Msg);
		}else{
			TMyString::sAddOnStr("Fail ",PrintText.body.Msg);
			TMyString::sAddOnStr("Dev Fail ",PrintText.body.Msg);
		}
		aType = EntryTmp.fData.Body.Splite.Data0;
		if(aType < 32){
			if( (aType == 15) || (aType == 16) ){
				TMyString::sAddOn2Dg(MainCtl.fData.Split.MyNum, PrintText.body.Msg);
				TMyString::sAddOnStr(" ", PrintText.body.Msg);
			}
			if(LanguageEnCn==0)TMyString::sAddOnStr(StrDevFaultType[aType],PrintText.body.Msg);
			else TMyString::sAddOnStr(StrDevFaultTypeEn[aType],PrintText.body.Msg);
		}else{
			if(LanguageEnCn==0)TMyString::sAddOnStr("未知类型",PrintText.body.Msg);
			else TMyString::sAddOnStr("Unknown",PrintText.body.Msg);
		}
		if( (EntryTmp.fData.Body.Splite.Data1 & 0x01) == 0){
			if( (aType == 15) || (aType == 16) ){
				TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1, PrintText.body.Msg);
				if(LanguageEnCn==0)TMyString::sAddOnStr(" 通讯故障",PrintText.body.Msg);
				else TMyString::sAddOnStr(" Comm Fail",PrintText.body.Msg);
			}else
			if( (aType == 19) || (aType == 20)  || (aType == 21) ){
				TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1, PrintText.body.Msg);
			}
			if(LanguageEnCn==0)TMyString::sAddOnStr(" 恢复",PrintText.body.Msg);
			else TMyString::sAddOnStr(" Recover",PrintText.body.Msg);
		}else{
			if( (aType == 15) || (aType == 16) ){
				//TMyString::sAddOnStr(StrDevFaultType[aType],PrintText.body.Msg);
				TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1, PrintText.body.Msg);
				if(LanguageEnCn==0)TMyString::sAddOnStr(" 通讯故障",PrintText.body.Msg);
				else TMyString::sAddOnStr(" Comm Fail",PrintText.body.Msg);
				//if(EntryTmp.fData.Body.Splite.mType > 200){
				//	TMyString::sAddOnStr("通讯故障条目数:多于200",PrintText.body.Msg);
				//}else{
				//	TMyString::sAddOnStr("通讯故障条目数:",PrintText.body.Msg);
				//	TMyString::sAddOn3Dg(EntryTmp.fData.Body.Splite.mType, PrintText.body.Msg);
				//}
			}else
			if( (aType == 19) || (aType == 20)  || (aType == 21)   || (aType == 23) ){
				TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1, PrintText.body.Msg);
			}
		}
	}else
	if((EntryTmp.fData.Body.Splite.Data1 & 0xF0) == 0xE0){
		//Cir Error
		TMyString::sAddOnStr("-",PrintText.body.DateAddr);
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.DateAddr);
		//TMyString::sAddOnStr("-",PrintText.body.DateAddr);
		if(LanguageEnCn==0){
			TMyString::sAddOnStr("故障 ",PrintText.body.Msg);
			if( (EntryTmp.fData.Body.Splite.Data1 & 0x01) == 0){
				TMyString::sAddOnStr("回路故障-恢复",PrintText.body.Msg);
			}else{
				TMyString::sAddOnStr("回路故障",PrintText.body.Msg);
			}
		}else{
			TMyString::sAddOnStr("Fail ",PrintText.body.Msg);
			if( (EntryTmp.fData.Body.Splite.Data1 & 0x01) == 0){
				TMyString::sAddOnStr("Loop Fail-Revocer",PrintText.body.Msg);
			}else{
				TMyString::sAddOnStr("Loop Fail",PrintText.body.Msg);
			}
		}
	}else
	if((EntryTmp.fData.Body.Splite.Data1 & 0xF0) == 0xF0){
		//Board Error
		if(LanguageEnCn==0){
			TMyString::sAddOnStr("故障 ",PrintText.body.Msg);
			TMyString::sAddOnStr("板卡故障 ",PrintText.body.Msg);
		}else{
			TMyString::sAddOnStr("Fail ",PrintText.body.Msg);
			TMyString::sAddOnStr("Brd Fail ",PrintText.body.Msg);
		}
		aType = EntryTmp.fData.Body.Splite.Data0;
		if(  	(aType == TBoardFaultType::LoopMotherBoard) ||
			(aType == TBoardFaultType::RegisteredData) ||
			(aType == TBoardFaultType::MaskedData) ||
			(aType == TBoardFaultType::StorageEpDType) ||
			(aType == TBoardFaultType::StorageEpAuxId) ||
			(aType == TBoardFaultType::StorageEpArea) ||
			(aType == TBoardFaultType::StorageEpAssignedType) ||
			(aType == TBoardFaultType::StorageEpSignalType) ||
			(aType == TBoardFaultType::StorageDirectPadCfg) ||
			(aType == TBoardFaultType::StoragePortDpSet)  ||
			(aType == TBoardFaultType::StorageBusPadCfg) ){
					TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P1,PrintText.body.Msg);
					TMyString::sAddOnStr(" ",PrintText.body.Msg);
		}else
		if( 	(aType == TBoardFaultType::StorageLinkExpressionPart1) || 
			(aType == TBoardFaultType::StorageLinkExpressionPart2) || 
			(aType == TBoardFaultType::StorageLinkExpressionPart3) || 
			(aType == TBoardFaultType::StorageLinkExpressionPart4) || 
			(aType == TBoardFaultType::StorageLinkExpressionPart5) || 
			(aType == TBoardFaultType::StorageLinkExpressionPart6) || 
			(aType == TBoardFaultType::StorageLinkExpressionPart7) || 
			(aType == TBoardFaultType::StorageLinkExpressionPart8) || 
			(aType == TBoardFaultType::StorageLinkExpressionPart9) ){
				unsigned short tInx = aType - static_cast<unsigned char>(TBoardFaultType::StorageLinkExpressionPart1);
				tInx = tInx * 256 + EntryTmp.fData.Body.Splite.P1;
				TMyString::sAddOn4Dg(tInx % 10000,PrintText.body.Msg);
				TMyString::sAddOnStr(" ",PrintText.body.Msg);
		}
		if(LanguageEnCn==0){
			if(aType < TBoardFaultType::MaxValue){
				TMyString::sAddOnStr(StrBrdFaultType[aType],PrintText.body.Msg);
			}else{
				TMyString::sAddOnStr("未知类型",PrintText.body.Msg);
			}
			if( (EntryTmp.fData.Body.Splite.Data1 & 0x01) == 0){
				TMyString::sAddOnStr(" 恢复",PrintText.body.Msg);
			}else{
				//TMyString::sAddOnStr(" 发生",PrintText);
			}
		}else{
			if(aType < TBoardFaultType::MaxValue){
				TMyString::sAddOnStr(StrBrdFaultTypeEn[aType],PrintText.body.Msg);
			}else{
				TMyString::sAddOnStr("Unknown",PrintText.body.Msg);
			}
			if( (EntryTmp.fData.Body.Splite.Data1 & 0x01) == 0){
				TMyString::sAddOnStr(" Revover",PrintText.body.Msg);
			}else{
				//TMyString::sAddOnStr(" 发生",PrintText);
			}
		}
	}else{
		//EpError
		NeedDisplayDescp = 0;
		
		TMyString::sAddOnStr("-",PrintText.body.DateAddr);
		TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.DateAddr);
		TMyString::sAddOnStr("-",PrintText.body.DateAddr);
		TMyString::sAddOn3Dg(EntryTmp.fData.Body.Splite.P1, PrintText.body.DateAddr);
		/*
		data = EntryTmp.fData.Body.Splite.P1;	
		d = data/100;
		e = d % 10;
		PrintText[24] = e + '0';
		d = data/10;
		e = d % 10;
		PrintText[25] = e + '0';
		e = data % 10;
		PrintText[26] = e + '0';
		PrintText[27] = ' ';
		PrintText[28] = '\0';
		*/
		if(LanguageEnCn==0)TMyString::sAddOnStr("故障 ",PrintText.body.Msg);
		else TMyString::sAddOnStr("Fail ",PrintText.body.Msg);
		//TextAddPst = GetPrintTextLen();
		
		aP0 = EntryTmp.fData.Body.Splite.P0;
		aP1 = EntryTmp.fData.Body.Splite.P1;
		
		data = 0;
		if( (aP0 >0) && (aP0 <=40) ){
			//data = Port[aP0-1].UcList[aP1-1].Full;
			data = EntryTmp.fData.UserCode;
			TMyString::sAddOn8Dg(data, PrintText.body.Msg);
		}else
		if( (aP0 >=dADDR_DIRECTPAD_START) && (aP0<=dADDR_DIRECTPAD_END) ){
			if( (aP1>=0) && (aP1<=dDIRECTCTL_KEY_MAX_COUNT) ){
				//data = DirectCtlBoard[aP0-dADDR_DIRECTPAD_START].UcList[aP1-1].Full;
				data = EntryTmp.fData.UserCode;
				TMyString::sAddOn8Dg(data, PrintText.body.Msg);
			}
		}
		/*
		d = data/10000;
		e = d % 10;
		PrintText[TextAddPst] = e + '0';
		d = data/1000;
		e = d % 10;
		PrintText[TextAddPst+1] = e + '0';
		d = data/100;
		e = d % 10;
		PrintText[TextAddPst+2] = e + '0';
		d = data/10;
		e = d % 10;
		PrintText[TextAddPst+3] = e + '0';
		e = data % 10;
		PrintText[TextAddPst+4] = e + '0';
		PrintText[TextAddPst+5] = ' ';

		PrintText[TextAddPst+6] = 0;
		*/
		TMyString::sAddOnStr(" ",PrintText.body.Msg);
		
		aType = EntryTmp.fData.Body.Splite.Data0;
		if(LanguageEnCn==0){
			if(aType < 16){
				TMyString::sAddOnStr(StrEpFaultType[aType],PrintText.body.Msg);
			}else{
				TMyString::sAddOnStr("未知故障",PrintText.body.Msg);
			}
			
			if(EntryTmp.fData.Body.Splite.Data1 == 0){
				TMyString::sAddOnStr("-恢复",PrintText.body.Msg);
			}else{
				//TMyString::sAddOnStr("-发生",PrintText);
			}
		}else{
			if(aType < 16){
				TMyString::sAddOnStr(StrEpFaultTypeEn[aType],PrintText.body.Msg);
			}else{
				TMyString::sAddOnStr("Unknown",PrintText.body.Msg);
			}
			
			if(EntryTmp.fData.Body.Splite.Data1 == 0){
				TMyString::sAddOnStr("-Revocer",PrintText.body.Msg);
			}else{
				//TMyString::sAddOnStr("-发生",PrintText);
			}
		}
		
		NeedDisplayDescp = 1;
		if(LanguageEnCn==0){
			if( (aP0 >0) && (aP0 <=40) ){
				aType = EntryTmp.fData.Body.Splite.dType;
				TMyString::sAddOnStr(StrTypeShortName[aType],PrintText.body.Msg);
			}else
			if( (aP0 >= dADDR_DIRECTPAD_START) && (aP0 <=dADDR_DIRECTPAD_START) ){
				TMyString::sAddOnStr("多线盘节点 ",PrintText.body.Msg);
			}
		}else{
			if( (aP0 >0) && (aP0 <=40) ){
				aType = EntryTmp.fData.Body.Splite.dType;
				TMyString::sAddOnStr(StrTypeShortNameEn[aType],PrintText.body.Msg);
			}else
			if( (aP0 >= dADDR_DIRECTPAD_START) && (aP0 <=dADDR_DIRECTPAD_START) ){
				TMyString::sAddOnStr("Direct Keypad Node ",PrintText.body.Msg);
			}
		}
	}
	
	TMyString::sAddOnStr("\n",PrintText.body.Msg);
	DescpTextBufInsert(FaultEntryTmp, NeedDisplayDescp);
	SetBufInsert();
}

void TDoPrint::FillLinkageText(TRecordCommon LinkageEntryTmp, int aForce)
{
	volatile unsigned int SdAddr, Addr;
	unsigned int d,e;
	unsigned int data;
	unsigned char aP0;
	unsigned char aP1;
	unsigned char aType;
	unsigned char len;
	int NeedDisplayDescp;
	unsigned int TextAddPst;
	
	NeedDisplayDescp = 0;
	
	if(aForce ==0){
		if(PriterSetting.OnOff ==0)return;
		if( (PriterSetting.PrintSelected & (0x0004 + 0x0001)) == 0)return;
	}

	
	//Linkage History
	for(d=0; d<4; d++){
		EntryTmp.fData.Body.D32[d] = LinkageEntryTmp.D32[d];
	}
	EntryTmp.fData.UserCode = LinkageEntryTmp.Splite.UserCode;

	FillTextWithDateTime();
	TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.PCtlNum, PrintText.body.DateAddr);
	TMyString::sAddOnStr("-",PrintText.body.DateAddr);
	TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.DateAddr);
	TMyString::sAddOnStr("-",PrintText.body.DateAddr);
	TMyString::sAddOn3Dg(EntryTmp.fData.Body.Splite.P1, PrintText.body.DateAddr);
	
	if(LanguageEnCn==0)TMyString::sAddOnStr("联动 ",PrintText.body.Msg);
	else TMyString::sAddOnStr("Link ",PrintText.body.Msg);
	//TextAddPst = GetPrintTextLen();

	aP0 = EntryTmp.fData.Body.Splite.P0;
	aP1 = EntryTmp.fData.Body.Splite.P1;
	
	data = 0;
	if( (aP0 >0) && (aP0 <=40) ){
		//data = Port[aP0-1].UcList[aP1-1].Full;
		data = EntryTmp.fData.UserCode;
		TMyString::sAddOn8Dg(data, PrintText.body.Msg);
	}else
	if( (aP0 >dADDR_DIRECTPAD_START) && (aP0<=dADDR_DIRECTPAD_END) ){
		if( (aP1>=0) && (aP1<=dDIRECTCTL_KEY_MAX_COUNT) ){
			//data = DirectCtlBoard[aP0-dADDR_DIRECTPAD_START].UcList[aP1-1].Full;
			data = EntryTmp.fData.UserCode;
			TMyString::sAddOn8Dg(data, PrintText.body.Msg);
		}
	}
	/*
	d = data/10000;
	e = d % 10;
	PrintText[TextAddPst] = e + '0';
	d = data/1000;
	e = d % 10;
	PrintText[TextAddPst+1] = e + '0';
	d = data/100;
	e = d % 10;
	PrintText[TextAddPst+2] = e + '0';
	d = data/10;
	e = d % 10;
	PrintText[TextAddPst+3] = e + '0';
	e = data % 10;
	PrintText[TextAddPst+4] = e + '0';
	PrintText[TextAddPst+5] = ' ';

	PrintText[TextAddPst+6] = 0;
	*/
	
	aP0 = EntryTmp.fData.Body.Splite.P0;
	aType = EntryTmp.fData.Body.Splite.dType;
	if(LanguageEnCn==0){
		if( (aP0 >0) && (aP0 <=40) ){
			TMyString::sAddOnStr(StrTypeShortName[aType],PrintText.body.Msg);
			NeedDisplayDescp = 1;
		}else
		if(  (aP0 >=dADDR_DIRECTPAD_START) && (aP0 <= dADDR_DIRECTPAD_END)  ){
			if(aType){
				TMyString::sAddOnStr(StrTypeShortName[aType],PrintText.body.Msg);
			}else{
				TMyString::sAddOnStr("多线盘节点",PrintText.body.Msg);
			}
			NeedDisplayDescp = 1;
		}
	}else{
		if( (aP0 >0) && (aP0 <=40) ){
			TMyString::sAddOnStr(StrTypeShortNameEn[aType],PrintText.body.Msg);
			NeedDisplayDescp = 1;
		}else
		if(  (aP0 >=dADDR_DIRECTPAD_START) && (aP0 <= dADDR_DIRECTPAD_END)  ){
			if(aType){
				TMyString::sAddOnStr(StrTypeShortNameEn[aType],PrintText.body.Msg);
			}else{
				TMyString::sAddOnStr("Direct Node",PrintText.body.Msg);
			}
			NeedDisplayDescp = 1;
		}
	}
	
	data = EntryTmp.fData.Body.Splite.iByte0;
	if(LanguageEnCn==0){
		if(data == 0x01){
			TMyString::sAddOnStr("-启动",PrintText.body.Msg);
		}else
		if(data == 0x02){
			TMyString::sAddOnStr("-区声光启动",PrintText.body.Msg);
		}else
		if(data == 0x03){
			TMyString::sAddOnStr("-反馈",PrintText.body.Msg);
		}else
		if(data == 0x04){
			TMyString::sAddOnStr("-反馈缺失",PrintText.body.Msg);
		}else
		if(data == 0x05){
			TMyString::sAddOnStr("-启动",PrintText.body.Msg);
		}else
		if(data == 0x06){
			ClearPrintText();
			FillTextWithDateTime();
			TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.PCtlNum, PrintText.body.DateAddr);
			TMyString::sAddOnStr("联动",PrintText.body.Msg);
			TMyString::sAddOnStr("-声光启动",PrintText.body.Msg);
		}else
		
		if(data == 0x07){
			ClearPrintText();
			FillTextWithDateTime();
			TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.PCtlNum, PrintText.body.DateAddr);
			TMyString::sAddOnStr("联动",PrintText.body.Msg);
			TMyString::sAddOnStr("-应答消钮",PrintText.body.Msg);
		}else
		if(data == 0xB1){
			TMyString::sAddOnStr("-停止",PrintText.body.Msg);
		}else
		if(data == 0xB3){
			TMyString::sAddOnStr("-反馈取消",PrintText.body.Msg);
		}else
		if(data == 0xB5){
			TMyString::sAddOnStr("-停止",PrintText.body.Msg);
		}else
		if(data == 0xB6){
			ClearPrintText();
			FillTextWithDateTime();
			TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.PCtlNum, PrintText.body.DateAddr);
			TMyString::sAddOnStr("联动",PrintText.body.Msg);
			TMyString::sAddOnStr("-声光停止",PrintText.body.Msg);
		}else
		if(data == 0xB7){
			ClearPrintText();
			FillTextWithDateTime();
			TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.PCtlNum, PrintText.body.DateAddr);
			TMyString::sAddOnStr("联动",PrintText.body.Msg);
			TMyString::sAddOnStr("-应答消钮取消",PrintText.body.Msg);
		}
	}else{
		if(data == 0x01){
			TMyString::sAddOnStr("-Act",PrintText.body.Msg);
		}else
		if(data == 0x02){
			TMyString::sAddOnStr("-Zone Alram On",PrintText.body.Msg);
		}else
		if(data == 0x03){
			TMyString::sAddOnStr("-FB",PrintText.body.Msg);
		}else
		if(data == 0x04){
			TMyString::sAddOnStr("-FB Miss",PrintText.body.Msg);
		}else
		if(data == 0x05){
			TMyString::sAddOnStr("-Act",PrintText.body.Msg);
		}else
		if(data == 0x06){
			ClearPrintText();
			FillTextWithDateTime();
			TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.PCtlNum, PrintText.body.DateAddr);
			TMyString::sAddOnStr("Link",PrintText.body.Msg);
			TMyString::sAddOnStr("-Alram On",PrintText.body.Msg);
		}else
		
		if(data == 0x07){
			ClearPrintText();
			FillTextWithDateTime();
			TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.PCtlNum, PrintText.body.DateAddr);
			TMyString::sAddOnStr("Link",PrintText.body.Msg);
			TMyString::sAddOnStr("-Hydrant Ack",PrintText.body.Msg);
		}else
		if(data == 0xB1){
			TMyString::sAddOnStr("-Stop",PrintText.body.Msg);
		}else
		if(data == 0xB3){
			TMyString::sAddOnStr("-FB Cancel",PrintText.body.Msg);
		}else
		if(data == 0xB5){
			TMyString::sAddOnStr("-Stop",PrintText.body.Msg);
		}else
		if(data == 0xB6){
			ClearPrintText();
			FillTextWithDateTime();
			TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.PCtlNum, PrintText.body.DateAddr);
			TMyString::sAddOnStr("Link",PrintText.body.Msg);
			TMyString::sAddOnStr("-Alram Stop",PrintText.body.Msg);
		}else
		if(data == 0xB7){
			ClearPrintText();
			FillTextWithDateTime();
			TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.PCtlNum, PrintText.body.DateAddr);
			TMyString::sAddOnStr("Link",PrintText.body.Msg);
			TMyString::sAddOnStr("-Hydrant Ack Cancel",PrintText.body.Msg);
		}
	}
	
	TMyString::sAddOnStr("\n",PrintText.body.Msg);
	DescpTextBufInsert(LinkageEntryTmp, NeedDisplayDescp);
	SetBufInsert();
}

void TDoPrint::FillFireText(TRecordCommon FireEntryTmp, int aForce)
{
	volatile unsigned int SdAddr, Addr;
	unsigned int d,e;
	unsigned int data;
	unsigned char aP0;
	unsigned char aP1;
	unsigned char aType;
	unsigned char len;
	int NeedDisplayDescp;
	unsigned int TextAddPst;
	unsigned char IsFrist;
	
	NeedDisplayDescp = 0;
	
	if(aForce ==0){
		if(PriterSetting.OnOff == 0)return;
		if( (PriterSetting.PrintSelected & (0x0002 + 0x0001)) ==0  )return;
	}
	
	//Fire History
	for(d=0; d<4; d++){
		EntryTmp.fData.Body.D32[d] = FireEntryTmp.D32[d];
	}
	EntryTmp.fData.UserCode = FireEntryTmp.Splite.UserCode;
	
	IsFrist = EntryTmp.fData.Body.Splite.Data1;
	
	FillTextWithDateTime();
	
	TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.PCtlNum, PrintText.body.DateAddr);
	TMyString::sAddOnStr("-",PrintText.body.DateAddr);
	TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.DateAddr);
	TMyString::sAddOnStr("-",PrintText.body.DateAddr);
	TMyString::sAddOn3Dg(EntryTmp.fData.Body.Splite.P1, PrintText.body.DateAddr);

	aP0 = EntryTmp.fData.Body.Splite.P0;
	aP1 = EntryTmp.fData.Body.Splite.P1;

	if((aP0)&&(aP0<=40)){
		
		if(LanguageEnCn==0){
			if(IsFrist)TMyString::sAddOnStr("首火警 ",PrintText.body.Msg);
			else TMyString::sAddOnStr("火警 ",PrintText.body.Msg);
		}else{
			if(IsFrist)TMyString::sAddOnStr("FirstFire ",PrintText.body.Msg);
			else TMyString::sAddOnStr("Fire ",PrintText.body.Msg);
		}
		//TextAddPst = GetPrintTextLen();
		
		data = EntryTmp.fData.UserCode;
		TMyString::sAddOn8Dg(data, PrintText.body.Msg);

		aP0--;
		aP1--;
		
		NeedDisplayDescp = 1;
		/*
		d = data/10000;
		e = d % 10;
		PrintText[TextAddPst] = e + '0';
		d = data/1000;
		e = d % 10;
		PrintText[TextAddPst+1] = e + '0';
		d = data/100;
		e = d % 10;
		PrintText[TextAddPst+2] = e + '0';
		d = data/10;
		e = d % 10;
		PrintText[TextAddPst+3] = e + '0';
		e = data % 10;
		PrintText[TextAddPst+4] = e + '0';
		PrintText[TextAddPst+5] = ' ';

		PrintText[TextAddPst+6] = 0;
		*/
		aType = EntryTmp.fData.Body.Splite.dType;
		if(LanguageEnCn==0)TMyString::sAddOnStr(StrTypeShortName[aType],PrintText.body.Msg);
		else TMyString::sAddOnStr(StrTypeShortNameEn[aType],PrintText.body.Msg);
	}else
	if( (aP0 >= dADDR_DIRECTPAD_START) && ( aP0 <= dADDR_DIRECTPAD_END)){
		NeedDisplayDescp = 1;
		if( (aP1>=0) && (aP1<=dDIRECTCTL_KEY_MAX_COUNT) ){
			//data = DirectCtlBoard[aP0-dADDR_DIRECTPAD_START].UcList[aP1-1].Full;
			data = EntryTmp.fData.UserCode;
			TMyString::sAddOn8Dg(data, PrintText.body.Msg);
		}
	}
	/*
	if( (aP0 >0) && (aP0 < 64) ){
		if(aP1 >0){
			if(aP0 < 40){
				aP0--;
				data = EpDev[aP0][aP1-1].fData.Split.UserCode;
			}else
			if(aP0 < 48){
				aP0-=41;
				data = HandCtlBoard[aP0].UserCodeList[aP1-1];
			}else
			if(aP0 < 56){
				aP0-=49;
				data = 0;//DirectCtlBoard[aP0].UserCodeList[aP1-1];
			}
		}
	}
	d = data/10000;
	e = d % 10;
	PrintText[28] = e + '0';
	d = data/1000;
	e = d % 10;
	PrintText[29] = e + '0';
	d = data/100;
	e = d % 10;
	PrintText[30] = e + '0';
	d = data/10;
	e = d % 10;
	PrintText[31] = e + '0';
	e = data % 10;
	PrintText[32] = e + '0';
	PrintText[33] = ' ';

	PrintText[34] = 0;
	
	aType = EntryTmp.fData.Body.Splite.dType;
	TMyString::sAddOnStr(StrTypeShortName[aType],PrintText);
	*/
	TMyString::sAddOnStr("\n",PrintText.body.Msg);
	DescpTextBufInsert(FireEntryTmp, NeedDisplayDescp);
	SetBufInsert();
}

void TDoPrint::FillSvText(TRecordCommon SvEntryTmp, int aForce)
{
	volatile unsigned int SdAddr, Addr;
	unsigned int d,e;
	unsigned int data;
	unsigned char aP0;
	unsigned char aP1;
	unsigned char aType;
	unsigned char len;
	int NeedDisplayDescp;
	unsigned int TextAddPst;
	
	NeedDisplayDescp = 0;
	
	if(aForce ==0){
		if(PriterSetting.OnOff == 0)return;
		if( (PriterSetting.PrintSelected & (0x0008 + 0x0001)) ==0 )return;
	}

	//Fire History
	for(d=0; d<4; d++){
		EntryTmp.fData.Body.D32[d] = SvEntryTmp.D32[d];
	}
	EntryTmp.fData.UserCode = SvEntryTmp.Splite.UserCode;
	
	FillTextWithDateTime();
	
	TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.PCtlNum, PrintText.body.DateAddr);
	TMyString::sAddOnStr("-",PrintText.body.DateAddr);
	TMyString::sAddOn2Dg(EntryTmp.fData.Body.Splite.P0, PrintText.body.DateAddr);
	TMyString::sAddOnStr("-",PrintText.body.DateAddr);
	TMyString::sAddOn3Dg(EntryTmp.fData.Body.Splite.P1, PrintText.body.DateAddr);

	aP0 = EntryTmp.fData.Body.Splite.P0;
	aP1 = EntryTmp.fData.Body.Splite.P1;
	if(LanguageEnCn==0)TMyString::sAddOnStr("监管 ",PrintText.body.Msg);
	else TMyString::sAddOnStr("SUPV ",PrintText.body.Msg);
	//TextAddPst = GetPrintTextLen();
	
	data = EntryTmp.fData.UserCode;
	TMyString::sAddOn8Dg(data, PrintText.body.Msg);
	
	aType = EntryTmp.fData.Body.Splite.dType;
	if(LanguageEnCn==0)TMyString::sAddOnStr(StrTypeShortName[aType],PrintText.body.Msg);
	else TMyString::sAddOnStr(StrTypeShortNameEn[aType],PrintText.body.Msg);
	
	data = EntryTmp.fData.Body.Splite.iByte0;
	if(data == 0x01){
			//TMyString::sAddOnStr("-启动",PrintText);
	}else
	if(data == 0x02){
			//TMyString::sAddOnStr("-区声光启动",PrintText);
	}else
	if(data == 0x03){
			//TMyString::sAddOnStr("-应答",PrintText);
	}else
	if(data == 0x04){
			//TMyString::sAddOnStr("-应答缺失",PrintText);
	}
	
	aP0 = EntryTmp.fData.Body.Splite.P0;
	aP1 = EntryTmp.fData.Body.Splite.P1;
	
	if(aP0 && aP1){
		if(aP0 <= dPORT_MAX_COUNT){
			NeedDisplayDescp = 1;
		}else
		if( (aP0 >= dADDR_DIRECTPAD_START) && (aP0 <= dADDR_DIRECTPAD_END) ){
			NeedDisplayDescp = 1;
		}
	}
	
	TMyString::sAddOnStr("\n",PrintText.body.Msg);
	DescpTextBufInsert(SvEntryTmp, NeedDisplayDescp);
	SetBufInsert();
}

void TDoPrint::Init()
{
	unsigned int i,a;
	
	State = 0;
	//Buf.WriteInx = 0;
	//Buf.ReadInx = 0;
	
	for(a=0;a<3;a++){
		for(i=0;i<128;i++){
			Buf.wEntry[a].D8[i] = 0;
		}
	}
	for(i=0;i<64;i++){
		PrintText.body.DateAddr[i] = 0;
		PrintText.body.Msg[i] = 0;
		PrintText.body.Dscp[i] = 0;
	}
}

void TDoPrint::ReInit()
{
	unsigned int i,a;
	
	State = 0;
	Buf.WriteInx = 0;
	Buf.ReadInx = 0;
	
	for(a=0;a<3;a++){
		for(i=0;i<128;i++){
			Buf.wEntry[a].D8[i] = 0;
		}
	}
	for(i=0;i<64;i++){
		PrintText.body.DateAddr[i] = 0;
		PrintText.body.Msg[i] = 0;
		PrintText.body.Dscp[i] = 0;
	}
}

void TDoPrint::ClearPrintText()
{
	unsigned int i;

	for(i=0;i<64;i++){
		PrintText.body.DateAddr[i] = 0;
		PrintText.body.Msg[i] = 0;
		PrintText.body.Dscp[i] = 0;
	}
}

void TDoPrint::Print()
{
	;
}

void TDoPrint::TryGetState()
{
	//Trigger to Sen a Read State Cmd
}

unsigned int TDoPrint::GetPrintState()
{
	return printer_is_busy();
}

void TDoPrint::SetBufInsertSequence()
{
	volatile unsigned int i = 0,a = 0;
	volatile unsigned int line = 0;
	volatile unsigned int len = 0;
	volatile unsigned int zh_num = 0;
	
	for(i=0;i<32;i++){
		Buf.wEntry[0].D32[i] = 0;
		Buf.wEntry[1].D32[i] = 0;
		Buf.wEntry[2].D32[i] = 0;
	}
	
	for(a=0;a<3;a++){
		len = GetPrintTextLen(PrintText.Text[a]);
		if(len){
			if(len%32)
				line = len/32 + 1;
			else
				line = len/32;
			
			if(1 == line){
				for(i=0;i<len;i++){
					Buf.wEntry[a].Body.Text[i] = PrintText.Text[a][i];
				}
				Buf.wEntry[a].Body.Len = len;
				Buf.wEntry[a].Body.Text[Buf.wEntry[a].Body.Len] = 0;
			}else
			if(2 == line){
				zh_num = 0;
				for(i=0;i<32;i++){
					if(PrintText.Text[a][i] > 0x7F)zh_num++;
					else zh_num = 0;
				}
				if(zh_num & 0x01){
					for(i = 0;i < (len-32+1);i++)
						PrintText.Text[a][len-i] = PrintText.Text[a][len-1-i];
					PrintText.Text[a][31] = ' ';
					len+=1;
				}
				
				if(64 == len){
					for(i=0;i<32;i++){
						Buf.wEntry[a].Body.Text[i] = PrintText.Text[a][i+32];
					}
					for(i=0;i<32;i++){
						Buf.wEntry[a].Body.Text[i+32] = PrintText.Text[a][i];
					}
				}else
				if(len < 64){
					for(i=0;i<(len-32);i++){
						Buf.wEntry[a].Body.Text[i] = PrintText.Text[a][i+32];
					}
					Buf.wEntry[a].Body.Text[len-32] = '\n';
					for(i=0;i<32;i++){
						Buf.wEntry[a].Body.Text[len-32+1+i] = PrintText.Text[a][i];
					}
					len+=1;
				}
				Buf.wEntry[a].Body.Len = len;
				Buf.wEntry[a].Body.Text[Buf.wEntry[a].Body.Len] = 0;
			}
		}
	}
}

void TDoPrint::BufInsert()
{
	volatile unsigned int aAddr, iLen, i;
	//------------------------------------line 1------------------------------------------
	if(Buf.wEntry[2].Body.Len){
		Buf.WriteInx++;
		
		if(Buf.WriteInx >= PrintBuf_Count)Buf.WriteInx = 0;
		aAddr = dAddrSdram_PrintBuf + (Buf.WriteInx * PrintEntry_Size);
		
		iLen = Buf.wEntry[2].Body.Len / 4 + 1;
		if(iLen >31)iLen = 31;
		for(i=0; i<iLen; i++)
			*(volatile unsigned int *)(aAddr + (i*4)) = Buf.wEntry[2].D32[i];
		*(volatile unsigned int *)(aAddr + (31*4)) = Buf.wEntry[2].Body.Len;
	}
	
	//------------------------------------line 2------------------------------------------
	if(Buf.wEntry[1].Body.Len){
		Buf.WriteInx++;
		
		if(Buf.WriteInx >= PrintBuf_Count)Buf.WriteInx = 0;
		aAddr = dAddrSdram_PrintBuf + (Buf.WriteInx * PrintEntry_Size);
	
	
		iLen = Buf.wEntry[1].Body.Len / 4 + 1;
		if(iLen >31)iLen = 31;
		for(i=0; i<iLen; i++)
			*(volatile unsigned int *)(aAddr + (i*4)) = Buf.wEntry[1].D32[i];
		*(volatile unsigned int *)(aAddr + (31*4)) = Buf.wEntry[1].Body.Len;
	}
	
	//------------------------------------line 3------------------------------------------
	Buf.WriteInx++;
	
	if(Buf.WriteInx >= PrintBuf_Count)Buf.WriteInx = 0;
	aAddr = dAddrSdram_PrintBuf + (Buf.WriteInx * PrintEntry_Size);

	iLen = Buf.wEntry[0].Body.Len / 4 + 1;
	if(iLen >31)iLen = 31;
	for(i=0; i<iLen; i++)
		*(volatile unsigned int *)(aAddr + (i*4)) = Buf.wEntry[0].D32[i];
	*(volatile unsigned int *)(aAddr + (31*4)) = Buf.wEntry[0].Body.Len;
	
	//----------------------------------line 4-----------------------------------
	Buf.wEntry[0].D32[0] = 0;
	
	StrcatText(Buf.wEntry[0].Body.Text, "\n--------------------------------\n\n\n");//len = 36
	Buf.WriteInx++;
	
	if(Buf.WriteInx >= PrintBuf_Count)Buf.WriteInx = 0;
	aAddr = dAddrSdram_PrintBuf + (Buf.WriteInx * PrintEntry_Size);
	
	iLen = 36 / 4;
	if(iLen >31)iLen = 31;
	for(i=0; i<iLen; i++)
		*(volatile unsigned int *)(aAddr + (i*4)) = Buf.wEntry[0].D32[i];
	*(volatile unsigned int *)(aAddr + (31*4)) = 36;
}	

void TDoPrint::SetBufInsert()
{
	SetBufInsertSequence();
	BufInsert();
}

void TDoPrint::PrintSection()
{
	if(Sections.DoingInx < Sections.sCount){
		//Fill Text To Uart's TDR.
		if(Buf.rEntry.Body.Len > 16){
			set_print_text(&Buf.rEntry.Body.Text[Sections.DoingInx*16],16);
			Buf.rEntry.Body.Len-=16;
		}else{
			set_print_text(&Buf.rEntry.Body.Text[Sections.DoingInx*16],Buf.rEntry.Body.Len);
			Buf.rEntry.Body.Len = 0;
		}
		
		Sections.DoingInx++;
		if(Sections.DoingInx >= Sections.sCount){
			Sections.oSequence = 0;
		}
	}else{
		Sections.oSequence = 0;
	}
}

void TDoPrint::BufFillPrintingBuf()
{
    unsigned int aAddr, i, iLen;
	
    Buf.ReadInx++;
    if(Buf.ReadInx >= PrintBuf_Count)Buf.ReadInx = 0;
    aAddr = dAddrSdram_PrintBuf + (Buf.ReadInx * PrintEntry_Size);
    
    Sections.AllTextCount = *(volatile unsigned int *)(aAddr + (31*4));
    Buf.rEntry.Body.Len = Sections.AllTextCount;
    
    if(Sections.AllTextCount % 4){
        iLen = Sections.AllTextCount / 4 +1;
    }else{
        iLen = Sections.AllTextCount / 4;
    }
    
    if(iLen >30)iLen = 30;
    for(i=0; i<iLen; i++)
        Buf.rEntry.D32[i] =*(volatile unsigned int *)(aAddr + i*4);    
    
    if(Sections.AllTextCount % 16){
        Sections.sCount = Sections.AllTextCount / 16 + 1;
    }else{
        Sections.sCount = Sections.AllTextCount / 16;
    }
    
    Sections.DoingInx = 0;
    
    Sections.oSequence = 1;
}

void TDoPrint::PrintHistory(int MsgType, TRecordCommon aEntryTmp, char *pDescp)
{
	if(MsgType == 0){
		FillFireText(aEntryTmp,1);
		DescpTextBufInsertByAssign(pDescp);
	}else
	if(MsgType == 1){
		FillLinkageText(aEntryTmp,1);
		DescpTextBufInsertByAssign(pDescp);
	}else
	if(MsgType == 2){
		FillSvText(aEntryTmp,1);
		DescpTextBufInsertByAssign(pDescp);
	}else
	if(MsgType == 3){
		FillFaultText(aEntryTmp,1);
		DescpTextBufInsertByAssign(pDescp);
	}else
	if(MsgType == 4){
		FillOperateText(aEntryTmp,1);
		DescpTextBufInsertByAssign(pDescp);
	}
}

void TDoPrint::oProcess()
{
	if(GetPrintState()){
		//Send a Get State Cmd
		
		//IsTryGetState = 0;
	}else
	if(Sections.oSequence){
		PrintSection();
	}else{
		if(Buf.ReadInx != Buf.WriteInx){
			BufFillPrintingBuf();
		}
	}
}	

void TDoPrint::iProcess()
{
	if(RecData[0]){
		
	}
}

void TDoPrint::Task10Ms()
{
	static unsigned int delay_tick = 0;
	delay_tick++;
	if(delay_tick > 9){//100ms
		delay_tick = 0;
		oProcess();
	}
}





















