-
Notifications
You must be signed in to change notification settings - Fork 136
2.7 Device Application Layer Machine
Device Presentation Layer means a device that links to host software. It is an ecapsulution of Utility in Modbus.Net.
It is the high level API in Modbus.Net.
Machine in Modbus.Net has two parts: IMachineProperty and IMachineMethod.
-
IMachineProperty: All properties of a machine, including Id, Name, Addresses.
-
AddressUnit: Definitions of addresses.
AddressUnit describes communication addresses in a class. It has multiple definitions that makes the address easy to read by developers and users. It could be changed at any time.
-
AddressFormater: Formatting tool to an address.
AddressFormater change AddressUnit to a string definition, this string could be used for IUtility. It could be changed at any time.
-
AddressCombiner: Combination tool to many addresses.
AddressCombiner combine duplicated address into an address group, one group send one group of messages(often once) to the device and device will response in one protocol communication.
-
Endian: Endian of data storage.
BaseMachine need to import Endian at the same time because of the bytes reading and writing. It needs to reorganize and transform these datas in a proper way。
-
IMachineMethod: Method groups of a machine.
-
IMachineMethodData: Data reading and writing interface, inherit from IMachineMethod.
When machine read datas, it first combine addresses that require to read to one or multiple continus addresses, then change these AddressUnit groups into string address and read count, then send it to Utility.
When machine write datas, first it will read data once, and replace writing datas into the reading datas, finally send write data message into Utility to write replacing datas.
-
Only IMachineProperty will be shown to users, by there is a function in IMachineProperty called GetMachineMethods will show all functions in the method group interface.
BaseMachine has been implemented IMachineMethodData, including GetDatas(Async) and SetDatas(Async).
Modbus.Net Hangzhou Delian Science Technology Co.,Ltd. © 2023
-
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
- 3.1 Global Tools
- 3.2 Extends Protocol and ProtocolUnit according to protocol specification
- 3.3 Extends Connector to create a link method
- 3.4 Extends Machine and Utility, creating two apis
- 3.5 Extends API methods to Machine and Utility
- 3.6 Extends Formater, Translator and Combiner, Creating Encoding,Decoding,Combining methods for address
- 3.7 Extends Controller, to control message