Skip to content

2.2 Transmission Control Layer Controller

luosheng edited this page Jun 7, 2023 · 2 revisions

Packet Control Layer describe how to ranking and send receive packet, relative to IController in Modbus.Net.

Implementation

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.

inner 1

Interface

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.

outer 1

Home

Clone this wiki locally