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

📄 stopcycloc.java

📁 中国移动定位引擎的客户端
💻 JAVA
字号:
/**
* <p>Title: Smgp协议解析</p>
* <p>Description: SMGW 向MSP 下发短消息的操作包</p>
* <p>Company: 福富软件 </p>
* @author chenxin
* @version 1.0 $Date 2007-07-05
*/
package ffcs.lbp.le.message;

import java.io.IOException;
import java.nio.ByteBuffer;

import ffcs.lbp.MessageParseException;
import ffcs.lbp.le.message.tlv.TLVTable;
import ffcs.lbp.le.message.tlv.Tag;

public class StopCycLoc extends LeMessage {



	private TLVTable IsdnRange=null;
	
	


	
	
	public StopCycLoc() {
        super(StopCycLoc);
    }
	
	
	
	
	
	public int getBodyLength() {
	    int len =0;
	    if (IsdnRange!=null){
			len+=IsdnRange.getLength();
		}
 
        
        return len;
        
        
        
    }
	
	
	/**
     * 读取协议包的包体
     * @param buf ByteBuffer
     * @throws MessageParseException
     * @return boolean
     */
    protected boolean readBody(ByteBuffer buf) throws
            LeProtocolException{
    	int body_length=getPackLength()-HEADER_LENGTH;

	      	if (body_length>0){

	    	    byte[] bypeTmp=new byte[body_length];
				buf.get(bypeTmp);
				IsdnRange = new TLVTable();
				IsdnRange.readFrom(bypeTmp,0,body_length);
		
	    	}
    	return true;
    }


    /**
     * 读取协议包的包体
     * @param buf ByteBuffer
     * @return boolean
     */
    protected  boolean writeBody(ByteBuffer buf){
    	

    	return true;
    }

    /**
     * Convert this packet to a String. Not to be interpreted programmatically,
     * it's just dead handy for debugging!
     */
    public String toString() {

        StringBuffer sb=new StringBuffer("StopCycLoc:");
	    sb.append(super.toString());
	    
	    sb.append("IsdnRange");
        sb.append("=");
        if(IsdnRange!=null){
        sb.append(IsdnRange.toString());
        }
        sb.append(" ");
        
     

        
        return sb.toString();
        
    }





	public TLVTable getIsdnRange() {
		return IsdnRange;
	}





	public void setIsdnRange(TLVTable isdnRange) {
		IsdnRange = isdnRange;
	}



	
}

⌨️ 快捷键说明

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