-
Notifications
You must be signed in to change notification settings - Fork 139
2.2 Transmission Control Layer Controller
Packet Control Layer describe how to ranking and send receive packet, relative to IController in Modbus.Net.
Developer should control message by him/herself. A data structure should be used to store and manage messages, and message should be used when Connector required.
Controller need telling Connector which received message is matching which send message at the same time.
FIFOController in Modbus.Net could be a sample. This is the easiest implementation to understand.
classDiagram
class IController {
+SendStart()
+SendStop()
+AddMessage(message)
+ConfirmMessage(key)
+ForceRemoveWaitingMessage(key)
}
class FifoController {
-queue: Queue
+SendStart()
+SendStop()
+AddMessage()
+ConfirmMessage()
}
class MatchDirectlySendController {
+AddMessage()
+ConfirmMessage()
}
IController <|-- FifoController
IController <|-- MatchDirectlySendController
IController has a switch, called SendStart and SendStop.
void SendStart();
void SendStop();AddMessage is called when Connector need to add message to Controller, and ConfirmMessage is called when Controller confirm which receive message in Connector is matching to send Message.
ForceRemoveWaitingMessage is used when Connector telling Controller to force remove message when timeout.
sequenceDiagram
participant Conn as IConnector
participant Ctrl as IController
Conn->>Ctrl: AddMessage(message)
Ctrl-->>Conn: GetNextMessage()
Conn->>Ctrl: ConfirmMessage(key)
Note over Conn,Ctrl: Controller manages message queue<br/>and matching
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