Repository navigation
3.6 Extends Formater, Translator and Combiner, Creating Encoding,Decoding,Combining methods for address
parallelbgls edited this page Jun 29, 2017
·
2 revisions
-
AddressTranslator has two methods:
- AddressTranslate is to translate a string address to AddressUnit.
- GetAreaByteLength is that, an address has how many bytes in an area. For example, 40001 and 40002 in Modbus has 2 bytes length, so GetAdreaByteLength for "4X" returns 2.
-
AddressFormater is to format an AddressUnit to a string address used for BaseUtility. It has two methods:
- First FormatAddress: FormatAddress with no subaddress.
- Second FormatAddress: FormatAddress with subaddress.
-
AddressCombiner means how to combine duplicated AddressUnits into some AddressUnit groups. It has only one function called Combine, means how to combine AddressUnit.
- The parameter of Combine means AddressUnits waiting to combine.
- The return value is: from which AddressUnit to start, get how many addresses, and there are multiple messages like above.
- Please remember there is a parameter in contructor called "max length", means the max combination length. It shows that the continus combination addresses has a max byte length. This length is decided by protocol, which may communicate failed when real byte length for each communication unit is larger than max byte length.
Modbus.Net © 2016-2026 Hangzhou Delian Science Technology Co.,Ltd. | Licensed under MIT
- 1-概要介绍
- 2-Modbus.Net主体框架规范
- 3-利用Modbus.Net实现一个协议
- 4-使用Modbus.Net
- 5-Modbus.Net.Modbus
- 6-Modbus.Net.Siemens
- 7-Modbus.Net.HJ212
- 8-调试与Issue提交
- 1-Overview
-
2-Specification of Modbus.Net main framework
- 2.1-Modbus.Net Architecture
- 2.2-Transmission Control Layer Controller
- 2.3-Transmission Link Layer Connector
- 2.4-Concrete Protocol Layer ProtocolLinker
- 2.5-Abstract Protocol Layer Protocol
- 2.6-Protocol Presentation Layer Utility
- 2.7-Device Application Layer Machine
- 2.8-Task Application Layer MachineJob
- 3-Using Modbus.Net to implement a protocol
- 4-Using Modbus.Net
- 5-Modbus.Net.Modbus
- 6-Modbus.Net.Siemens
- 7-Modbus.Net.HJ212
- 8-Debug method and issue upload