Implementation

Overview

Dawn runtime is descriptor-driven. The descriptor binary defines which objects exist, how they are configured, and how they are connected.

A general implementation view is shown below.

skinparam componentStyle rectangle

package IOPackage {
     component IOFactory
     component IOHandler {
         collections IO
     }
}

package ProgPackage {
     component ProgFactory
     component ProgHandler {
             collections Prog
     }
}

package ProtoPackage {
     component ProtoFactory
     component ProtoHandler {
             collections Proto
     }
}

cloud ExternalWorld

package DescriptorPackage {
     component Descriptor {
        collections CDescObject
     }
}

IOFactory --> IO : create
ProgFactory --> Prog : create
ProtoFactory --> Proto : create

Descriptor --> IOFactory : define
Descriptor --> ProgFactory : define
Descriptor --> ProtoFactory : define

Prog <-> IO : get, set, manage VirtIO

IO <--> Proto : get, set
Proto -- ExternalWorld

Core Model

The core implementation element is Dawn Descriptor, a binary data array in memory that defines system objects and configuration payloads. Object model details are documented in Dawn Object.

Objects are created by factories from descriptor entries. Dawn uses three main object families:

  • Dawn IO: IO objects read from or write to OS resources and Dawn resources.

  • Dawn Prog: Program objects process IO data and manage virtual IO data flow.

  • Dawn Proto: Protocol objects expose IO data to external systems.

Common runtime utilities and abstractions are in Dawn Common. Porting interfaces are in Porting Layer.

Descriptor source and binary forms are summarized in Descriptor Format. Runtime loading and binary layout details are documented in Dawn Descriptor.

Special IO Components

Some IO classes are framework-facing control/bridge objects:

  • Virtual IO: virtual IO surface used by program pipelines.

  • Config IO: runtime get/set path for selected object configuration items.

  • Control IO: control command path to target objects.

  • Trigger IO: trigger command path to target objects.

  • Descriptor IO: descriptor data read access through IO API.

Deployment Patterns

Common device compositions:

  1. IO + PROTO: externally exposed node. Example: remote LED and button.

  2. IO + PROG: edge-processing node. Example: local LED sequencer.

  3. IO + PROG + PROTO: combined processing and external exposure node. Example: filtered sensor over BLE.

Repository Map

Main repository areas:

  • boards/: board and build configuration directories.

  • Documentation/: documentation sources.

  • dawn/include/: framework public headers.

  • dawn/src/: framework implementation.

  • dawn/apps/: Dawn app entry points.

  • dawn/tests/: unit tests.

  • descriptors/: reusable/example descriptor sources.

  • ntfc/: integration/system test scenarios.

  • tools/dawnpy/: core build/descriptor/tooling CLI.

  • tools/dawnpy-tests/: Dawn QA runner extension.

  • tools/dawnpy-serial/, tools/dawnpy-can/, tools/dawnpy-udp/, tools/dawnpy-modbus/: protocol-specific tooling extensions.

  • external/nuttx/ and external/apps/: integrated NuttX trees.

Build Composition

package ScenarioSpecific {
     database DawnDescriptor
     database DawnConfiguration
     database BoardSupport
     database UserObjects
}

collections DawnSource
cloud DawnBuild
rectangle DawnFirmware

DawnDescriptor --> DawnBuild
DawnConfiguration --> DawnBuild
BoardSupport --> DawnBuild
UserObjects --> DawnBuild
DawnSource --> DawnBuild

DawnBuild --> DawnFirmware

Build inputs:

  • DawnSource: Dawn framework code.

  • DawnDescriptor: descriptor binary used by the target.

  • DawnConfiguration: scenario and feature configuration.

  • BoardSupport: board/RTOS integration.

  • UserObjects: optional user-provided objects/factories.

Build output:

  • DawnFirmware: final firmware image.

Components

All IO/PROG/PROTO component pages follow the standardized template in Standardized Component Template.