?? triareastop.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 TriAreaStop extends LeMessage {
private TLVTable IsdnRange=null;
public TriAreaStop() {
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=super.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("CycLoc:");
sb.append(super.toString());
sb.append("IsdnRange");
sb.append("=");
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 + -