-
Notifications
You must be signed in to change notification settings - Fork 139
4.5 Encapsulating Interface again for protocol API
parallelbgls edited this page Jun 29, 2017
·
1 revision
If you want to encapsulate interface again, please using Utility.
The reason is simple: utility is programmed based on protocol, bute Machine has already encapsulate again that read and write datas only using bytes.
Have a look with the GetCoil method, you can write this method like:
public bool GetCoil(int address)
{
var ans = _modbusUtility.GetDatas("0X " + address, 1);
int pos = 0, subpos = address;
return ValueHelper.GetInstance(Endian).GetBit(ans, ref pos, ref subpos) == 1;
}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