Chapter 103. Internals
The main CCB protocol control thread is provided by
src/ccb_protocol.c source file.
The control thread loops waiting for event flags indicating that some
CCB processing is required.
The main tasks of the control loop are monitoring slave packet reception timing and polling slaves as configured, to ensure they are still connected, and processing asynchronous RX packets from any of the available hardware ports. The CCB bus management messages are handled by this control loop; and validated client-application messages are forwarded to the client-application via a RX message queue for the client-application to use via the relevant read interface. The bus management code can also inject locally generated slave connect/disconnect messages into this RX queue for processing by the client-application (as per the CCB design).
src/ccb_protocol.c source also implements the
I/O driver layer used to present the “/dev/ccb” named
device, used by the client-application to allow messages to be sent and
received. This works in conjunction with
src/ccb_devio.c source that provides the
basic message<->packet framing/deframing support.
|2023-08-15||eCosPro Non-Commercial Public License|