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

📄 tagtpid.java

📁 c和windows通信的结构描述
💻 JAVA
字号:
package com.zte.ums.csp.api.pal.trace.entity.emf;
import java.io.*; 

import com.zte.ums.uep.api.psl.cadaptor.*;
 
/**
 * <p>文件描述: 该类是compiler.exe生成的Java类</p>
 * <p>版权所有: 版权所有(C)2002-2004</p>
 * <p>公   司: 深圳市中兴通讯股份有限公司</p>
 * <p>内容摘要: </p>
 * <p>其他说明: </p>
 * <p>修改记录1: </p>
 * <pre>
 *    修改日期:
 *    版 本 号:
 *    修 改 人:
 *    修改内容:
 * </pre>
 * <p>修改记录2:…</p>
 */
public class TAgtPID  implements Serializable,C2Java_Interface 
 {   
	/**
	 * 
	 */
	private static final long serialVersionUID = 5754489667810983674L;
//	/**
//	 * 后台主动构造一个要发送到前台的AgtPID
//	 * @param IsIntel
//	 * @param bureau
//	 * @param module
//	 * @param pno
//	 * @return
//	 */
//	public static TAgtPID createAgtPID(boolean IsIntel , int bureau , int module , long pno ) {
//		TPID pid = new TPID(IsIntel);
//		pid.setBureau(bureau);
//		pid.setwModule(module);
//		pid.setdwPno(pno);
//		
//		byte[] data = new byte[pid.getCLength()+2];
//		
//		TAgtPID agtPID = new TAgtPID(IsIntel);
//		agtPID.setwLength(pid.getCLength());
//		
//		
//		System.arraycopy(agtPID.getObjectBytes(),
//				0,
//				data,
//				0, 
//				2);
//		
//		System.arraycopy(pid.getObjectBytes(),
//				0, 
//				data,
//				2, 
//				pid.getCLength());
//		
//		return new TAgtPID(data,0,IsIntel);
//	}
//	
    /**
    /* 该类的一个建构函数,不应该使用该函数构造实例
     * @param  IsIntel 该Java类运行的机器数据存储格式是否为BigEndian
     * @author  compiler.exe
     */
	 public TAgtPID(boolean IsIntel){


		xuf_platform = IsIntel;
//		buf = new short[100];
	};
 
    /**
    /* 返回该Java类转换成的网上字节流
     * @author  compiler.exe
    */
	public byte[] getObjectBytes(){
		TLangAdaptor adaptor = new TLangAdaptor();
		adaptor.setPlatform(xuf_platform);
		adaptor.setPackNumber(xuf_packNumber);


		adaptor.add(wLength,"unsigned short");
//		for(xuf_0=0;xuf_0<wLength;xuf_0++)
//			adaptor.add(buf[xuf_0],"unsigned char");
		
		byte[] result = new byte[102];
		System.arraycopy( adaptor.getObjectBytes(), 0, result, 0,adaptor.getObjectBytes().length);
		System.arraycopy(pid.getObjectBytes(), 0, result, 2, pid.getLenInC());
		return result;
	};
 
	/**
	/* 该类的一个建构函数
	 * @param  xuf_input 网上接收到的字节流
	 * @param  xuf_index 字节流开始被解析的字节
	 * @param  IsIntel 该Java类运行的机器数据存储格式是否为BigEndian
	 * @author  compiler.exe
	*/
	public TAgtPID(byte xuf_input[],int xuf_index,boolean IsIntel){
		TLangAdaptor adaptor = new TLangAdaptor();
		xuf_platform=IsIntel;
		adaptor.setPlatform(xuf_platform);
		adaptor.setPackNumber(xuf_packNumber);

	
		xuf_index = xuf_index+0;//the packed bytes
		wLength = adaptor.getint(xuf_input,"unsigned short",xuf_index);
		xuf_index = xuf_index+2;
		xuf_index = xuf_index + 0; //the packed bytes
		pid = new TPID(xuf_input,xuf_index,IsIntel);
	};
 
	/**
	/* 将网上字节流转换到对象的成员变量中
	 * @param  xuf_input 网上接收到的字节流
	 * @param  xuf_index 字节流开始被解析的字节
	 * @author  compiler.exe
	*/
	public void parse(byte xuf_input[],int xuf_index){
		TLangAdaptor adaptor = new TLangAdaptor();
		adaptor.setPlatform(xuf_platform);
		adaptor.setPackNumber(xuf_packNumber);

	
		xuf_index = xuf_index+0;//the packed bytes
		wLength = adaptor.getint(xuf_input,"unsigned short",xuf_index);
		xuf_index = xuf_index+2;
		xuf_index = xuf_index + 0; //the packed bytes
		pid = new TPID(xuf_input,xuf_index,xuf_platform);
	};
 
	/**
	/* 返回该Java类转换成的字节流的字节个数
	 * @author  compiler.exe
	*/
	public int getCLength(){


		return 102;
	};
 
	/**
	/* 返回该Java类转换成的字节流的字节个数,实现C2Java_Interface新增的接口
	 * @author  compiler.exe
	*/
	public  int getLenInC(){
		return getCLength();
	}	

	private int wLength=16;
//	private short buf[]; 
	/**
	/* 获取struct的一个域的值
	 * @author  compiler.exe
	*/

	public int getwLength(){
		return wLength;
	}
 
//	/**
//	/* 获取struct的一个域的值
//	 * @author  compiler.exe
//	*/
//
//	public short[] getbuf(){
//		return buf;
//	}
 
	/**
	/* 设置struct的一个域的值
	 * @param struct的值
	 * @author  compiler.exe
	*/

	public void setwLength(int xuf_member){
		wLength= xuf_member;
	}
 
//	/**
//	/* 设置struct的一个域的值
//	 * @param struct的值
//	 * @author  compiler.exe
//	 * @deprecated
//	*/
//
//	 void setbuf(short xuf_member[],short defaultValue){
//		int  num_0=0;
//		int  xuf_0=0;
//
//
//		num_0=xuf_member.length;
//
//		for(xuf_0=0;xuf_0<buf.length;xuf_0++)
//		{
//			buf[xuf_0]=defaultValue; 
//                }
//		for(xuf_0=0;xuf_0<num_0;xuf_0++)
//		{
//			buf[xuf_0]=xuf_member[xuf_0];
//		}
//	}


	
	static private final int xuf_packNumber = 1;
	private boolean xuf_platform;
	
	
	private TPID pid ;
	
	public TPID getPid() {
		return pid;
	}

	public void setPid(TPID pid) {
		this.pid = pid;
	}
    
}

⌨️ 快捷键说明

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