点击或拖拽改变大小

ModbusInfo 方法

ModbusInfo 类型公开以下成员。

方法
  名称说明
公共方法静态成员AnalysisAddress
分析Modbus协议的地址信息,该地址适应于tcp及rtu模式
Analysis of the address information of Modbus protocol, the address is adapted to tcp and rtu mode
公共方法静态成员BuildReadModbusCommand(ModbusAddress, UInt16)
构建Modbus读取数据的核心报文,需要指定地址,长度,站号,是否起始地址0,默认的功能码应该根据bool或是字来区分
To construct the core message of Modbus reading data, you need to specify the address, length, station number, whether the starting address is 0, and the default function code should be distinguished according to bool or word
公共方法静态成员BuildReadModbusCommand(String, UInt16, Byte, Boolean, Byte)
构建Modbus读取数据的核心报文,需要指定地址,长度,站号,是否起始地址0,默认的功能码应该根据bool或是字来区分
To construct the core message of Modbus reading data, you need to specify the address, length, station number, whether the starting address is 0, and the default function code should be distinguished according to bool or word
公共方法静态成员BuildReadWriteModbusCommand
构建一个同时读写的命令报文,指定读取地址,读取长度,写入地址,写入的字节数据信息,然后整个命令返回读取成功的字节数据信息
公共方法静态成员BuildWriteBoolModbusCommand(ModbusAddress, Boolean)
构建Modbus写入bool数据的核心报文,需要指定地址,长度,站号,是否起始地址0,默认的功能码
To construct the core message that Modbus writes to bool data, you need to specify the address, length, station number, whether the starting address is 0, and the default function code
公共方法静态成员BuildWriteBoolModbusCommand(ModbusAddress, Boolean)
构建Modbus写入bool数组的核心报文,需要指定地址,长度,站号,是否起始地址0,默认的功能码
To construct the core message that Modbus writes to the bool array, you need to specify the address, length, station number, whether the starting address is 0, and the default function code
公共方法静态成员BuildWriteBoolModbusCommand(String, Boolean, Byte, Boolean, Byte)
构建Modbus写入bool数据的核心报文,需要指定地址,长度,站号,是否起始地址0,默认的功能码
To construct the core message that Modbus writes to bool data, you need to specify the address, length, station number, whether the starting address is 0, and the default function code
公共方法静态成员BuildWriteBoolModbusCommand(String, Boolean, Byte, Boolean, Byte)
构建Modbus写入bool数据的核心报文,需要指定地址,长度,站号,是否起始地址0,默认的功能码
To construct the core message that Modbus writes to bool data, you need to specify the address, length, station number, whether the starting address is 0, and the default function code
公共方法静态成员BuildWriteMaskModbusCommand(ModbusAddress, UInt16, UInt16)
构建Modbus写入掩码数据的核心报文,需要指定地址,长度,站号,是否起始地址0,默认的功能码
To construct the core message of Modbus writing mask data, you need to specify the address, length, station number, whether the starting address is 0, and the default function code
公共方法静态成员BuildWriteMaskModbusCommand(String, UInt16, UInt16, Byte, Boolean, Byte)
构建Modbus写入掩码的核心报文,需要指定地址,长度,站号,是否起始地址0,默认的功能码
To construct the Modbus write mask core message, you need to specify the address, length, station number, whether the starting address is 0, and the default function code
公共方法静态成员BuildWriteOneRegisterModbusCommand(ModbusAddress, Int16)
构建Modbus写入字数据的核心报文,需要指定地址,长度,站号,是否起始地址0,默认的功能码
To construct the core message of Modbus writing word data, you need to specify the address, length, station number, whether the starting address is 0, and the default function code
公共方法静态成员BuildWriteOneRegisterModbusCommand(ModbusAddress, UInt16)
构建Modbus写入字数据的核心报文,需要指定地址,长度,站号,是否起始地址0,默认的功能码
To construct the core message of Modbus writing word data, you need to specify the address, length, station number, whether the starting address is 0, and the default function code
公共方法静态成员BuildWriteWordModbusCommand(ModbusAddress, Byte)
构建Modbus写入字数据的核心报文,需要指定地址,长度,站号,是否起始地址0,默认的功能码
To construct the core message of Modbus writing word data, you need to specify the address, length, station number, whether the starting address is 0, and the default function code
公共方法静态成员BuildWriteWordModbusCommand(String, Byte, Byte, Boolean, Byte)
构建Modbus写入字数据的核心报文,需要指定地址,长度,站号,是否起始地址0,默认的功能码
To construct the core message of Modbus writing word data, you need to specify the address, length, station number, whether the starting address is 0, and the default function code
公共方法静态成员BuildWriteWordModbusCommand(String, Int16, Byte, Boolean, Byte)
构建Modbus写入字数据的核心报文,需要指定地址,长度,站号,是否起始地址0,默认的功能码
To construct the core message of Modbus writing word data, you need to specify the address, length, station number, whether the starting address is 0, and the default function code
公共方法静态成员BuildWriteWordModbusCommand(String, UInt16, Byte, Boolean, Byte)
构建Modbus写入字数据的核心报文,需要指定地址,长度,站号,是否起始地址0,默认的功能码
To construct the core message of Modbus writing word data, you need to specify the address, length, station number, whether the starting address is 0, and the default function code
公共方法静态成员CheckAsciiReceiveDataComplete(Byte)
当消息头报文的长度定义为-1的时候,则使用动态的长度信息,可以使用本方法来判断一个消息是否处于完整的状态。
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.
公共方法静态成员CheckAsciiReceiveDataComplete(Byte, Int32)
当消息头报文的长度定义为-1的时候,则使用动态的长度信息,可以使用本方法来判断一个消息是否处于完整的状态。
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.
公共方法静态成员CheckRtuMessageMatch
检查当前发送和接收的modbusrtu报文是否站号匹配,匹配返回 1,此处进行匹配的时候,还有一定的容错范围
公共方法静态成员CheckRtuReceiveDataComplete
当消息头报文的长度定义为-1的时候,则使用动态的长度信息,可以使用本方法来判断一个消息是否处于完整的状态。
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.
公共方法静态成员CheckServerRtuReceiveDataComplete
当消息头报文的长度定义为-1的时候,则使用动态的长度信息,可以使用本方法来判断一个消息是否处于完整的状态。
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 (继承自 Object。)
公共方法静态成员ExplodeRtuCommandToCore
将modbus-rtu的数据重新还原成modbus数据,移除CRC校验的内容
Restore the data of modbus-rtu to modbus data again, remove the content of CRC check
公共方法静态成员ExplodeTcpCommandToCore
将modbus-tcp的报文数据重新还原成modbus指令,移除6个字节的报文头数据
Re-modify the message data of modbus-tcp into the modbus command, remove the 6-byte message header data
公共方法静态成员ExtractActualData
从返回的modbus的书内容中,提取出真实的数据,适用于写入和读取操作
Extract real data from the content of the returned modbus book, suitable for writing and reading operations
受保护的方法Finalize (继承自 Object。)
公共方法静态成员GetDescriptionByErrorCode
通过错误码来获取到对应的文本消息
Get the corresponding text message through the error code
公共方法GetHashCode (继承自 Object。)
公共方法GetType (继承自 Object。)
受保护的方法MemberwiseClone (继承自 Object。)
公共方法静态成员PackCommandToRtu
将modbus指令打包成Modbus-Rtu指令,在报文的末尾添加CRC16的校验码
Pack the modbus instruction into Modbus-Rtu instruction, add CRC16 check code at the end of the message
公共方法静态成员PackCommandToTcp
将modbus指令打包成Modbus-Tcp指令,需要指定ID信息来添加6个字节的报文头
Pack the Modbus command into Modbus-Tcp command, you need to specify the ID information to add a 6-byte message header
公共方法ToString (继承自 Object。)
公共方法静态成员TransAsciiPackCommandToCore
将一个modbus-ascii的数据报文,转换成的modbus核心数据报文,移除首尾标记,移除LRC校验
Convert a Modbus-ascii data message into a Modbus core data message, remove the first and last tags, and remove the LRC check
公共方法静态成员TransModbusCoreToAsciiPackCommand
将一个modbus核心的数据报文,转换成modbus-ascii的数据报文,增加LRC校验,增加首尾标记数据
Convert a Modbus core data message into a Modbus-ascii data message, add LRC check, and add head and tail tag data
Top
扩展方法
  名称说明
公共扩展器方法ToJsonString
获取当前对象的JSON格式表示的字符串。
Gets the string represented by the JSON format of the current object.
(由 HslExtension 定义。)
Top
参见