Dawn Proto
Dawn Proto - communication layer between external clients and Dawn objects.
Protocol objects expose external endpoints (serial, UDP, shell, CAN, BLE, etc.) and translate endpoint requests into operations on Dawn objects.
Overview
In Dawn architecture, PROTO is the gateway between remote/local clients
and internal object handlers.
Clients interact only with protocol endpoints.
Protocol implementations access objects through
dawn::CIOHandlerand object IDs.Access is limited to objects explicitly bound in descriptor configuration.
Common operations provided by protocols:
Read IO values (
getpath)Write IO values (
setpath)Subscribe/notify for event-driven updates (protocol dependent)
Read/write protocol-specific configuration items
Enumerate or query object information (protocol dependent)
Binding Model
Protocol to object association is descriptor-driven and happens during initialization:
Protocol objects are created from descriptor entries.
Protocol configuration is parsed in
configure().Protocol-specific bind configuration (
...IOBIND...items) is resolved to concrete IO object IDs.init()allocates runtime resources (buffers, endpoint state, optional notifier bindings).
Each protocol sees only objects listed in its own bind configuration items.
Simple protocols declare this list as config.bindings. Mapped protocols
derive the visible IO set from their mapping entries, such as CAN objects,
Modbus register groups, or BLE service characteristics. Objects not bound to
that protocol are not visible to it.
The exact bind item layout is protocol-specific (for example, one protocol may use multiple bind item types for different endpoint groups/services).
Lifecycle
Protocol lifecycle is managed by dawn::CProtoHandler:
init(): create protocol objects from descriptor and attach IO handler.initAll(): configure, resolve binds, and initialize each protocol.startAll()/stopAll(): activate or stop protocol endpoints.deinitAll(): release protocol resources.
Endpoint Model
Protocol classes define transport and wire format details, while sharing the same object access model:
Request/response operations map to IO
get/setand configuration reads/writes.Notify-capable protocols push updates to subscribed clients.
Endpoint resource ownership (thread/fd/socket/device state) is protocol-specific but follows the common lifecycle above.