| AdsNetMessage 类 | 
 继承层次
继承层次命名空间: HslCommunication.Core.IMessage
 语法
语法AdsNetMessage 类型公开以下成员。
 构造函数
构造函数| 名称 | 说明 | |
|---|---|---|
|  | AdsNetMessage | 初始化 AdsNetMessage 类的一个新实例 | 
 属性
属性| 名称 | 说明 | |
|---|---|---|
|  | ContentBytes | 
            消息内容字节(继承自 NetMessageBase。) Message content byte | 
|  | HeadBytes | 
            消息头字节(继承自 NetMessageBase。) Message header byte | 
|  | ProtocolHeadBytesLength | 
            消息头的指令长度,第一次接受数据的长度 Instruction length of the message header, the length of the first received data | 
|  | SendBytes | 
            发送的字节信息(继承自 NetMessageBase。) Byte information sent | 
 方法
方法| 名称 | 说明 | |
|---|---|---|
|  | CheckHeadBytesLegal | 
            检查头子节的合法性(继承自 NetMessageBase。) Check the legitimacy of the head subsection | 
|  | CheckMessageMatch | 
            检查发送的接收的报文是否是匹配的,如果匹配,则返回 1,  如果不匹配且直接返回错误,则返回 0,如果不匹配继续接收,直到匹配或是超时,则返回 -1(继承自 NetMessageBase。) If the packet is matched, 1 is returned. If the packet is not matched and an error is returned, 0 is returned. If the packet is not matched, -1 is returned until the packet is matched or times out | 
|  | CheckReceiveDataComplete | 
            当消息头报文的长度定义为-1的时候,则使用动态的长度信息,可以使用本方法来判断一个消息是否处于完整的状态。(继承自 NetMessageBase。) If the length of the message header is defined as -1, this method can be used to determine whether a message is in the complete state by using dynamic length information. | 
|  | Equals | Determines whether the specified object is equal to the current object.(继承自 Object。) | 
|  | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(继承自 Object。) | 
|  | GetContentLengthByHeadBytes | 
            从当前的头子节文件中提取出接下来需要接收的数据长度 Extract the length of the data to be received from the current header file | 
|  | GetHashCode | Serves as the default hash function.(继承自 Object。) | 
|  | GetHeadBytesIdentity | 
            获取头子节里的消息标识(继承自 NetMessageBase。) Get the message ID in the header subsection | 
|  | GetType | Gets the Type of the current instance.(继承自 Object。) | 
|  | MemberwiseClone | Creates a shallow copy of the current Object.(继承自 Object。) | 
|  | PependedUselesByteLength | 
            在接收头报文的时候,返回前置无效的报文头字节长度,默认为0,不处理(继承自 NetMessageBase。) When receiving a header message, return the header byte length of the invalid header, the default is 0, and no processing is performed. | 
|  | ToString | Returns a string that represents the current object.(继承自 NetMessageBase。) | 
 扩展方法
扩展方法| 名称 | 说明 | |
|---|---|---|
|  | ToJsonString | 
            获取当前对象的JSON格式表示的字符串。(由 HslExtension 定义。) Gets the string represented by the JSON format of the current object. | 
 参见
参见