public class SpecifiedCharacterMessage extends NetMessageBase implements INetMessage
| 构造器和说明 |
|---|
SpecifiedCharacterMessage(byte endCode)
使用固定的一个字符结尾作为当前的报文接收条件,来实例化一个对象
Instantiate an object using a fixed end of one character as the current message reception condition |
SpecifiedCharacterMessage(byte endCode1,
byte endCode2) |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
GetContentLengthByHeadBytes()
从当前的头子节文件中提取出接下来需要接收的数据长度
Extract the length of the data to be received from the current header file
|
byte |
getEndLength()
获取在结束字符之后剩余的固定字节长度
|
int |
ProtocolHeadBytesLength()
消息头的指令长度,第一次接受数据的长度
Instruction length of the message header, the length of the first received data
|
void |
setEndLength(byte value)
设置在结束字符之后剩余的固定字节长度,有些则还包含两个字节的校验码,这时该值就需要设置为2。
|
CheckHeadBytesLegal, getContentBytes, getHeadBytes, GetHeadBytesIdentity, getSendBytes, PependedUselesByteLength, setContentBytes, setHeadBytes, setSendBytesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitCheckHeadBytesLegal, getContentBytes, getHeadBytes, GetHeadBytesIdentity, getSendBytes, PependedUselesByteLength, setContentBytes, setHeadBytes, setSendBytespublic SpecifiedCharacterMessage(byte endCode)
endCode - 结尾的字符public SpecifiedCharacterMessage(byte endCode1,
byte endCode2)
public byte getEndLength()
public void setEndLength(byte value)
value - 固定字节长度信息public int ProtocolHeadBytesLength()
INetMessageProtocolHeadBytesLength 在接口中 INetMessagepublic int GetContentLengthByHeadBytes()
INetMessageGetContentLengthByHeadBytes 在接口中 INetMessageCopyright © 2022. All rights reserved.