Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion examples/mqtt-connector-demo-common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Shared business logic for MQTT connector demos that runs identically on **MCU, edge, and cloud**.

For the STM32 and Linux walkthrough, including the host contract test and Cortex-M build command, see [Sharing a sensor reading across Embassy and Tokio](https://aimdb.dev/blog/building-aimdb-one-async-api).

## Overview

This crate demonstrates AimDB's core strength: **write once, run anywhere**.
Expand Down Expand Up @@ -33,7 +35,7 @@ The same monitor functions, data types, and business logic work across all platf

## Contents

- **Contracts** (`types`): `Temperature`, `TemperatureCommand`, `ButtonPress`. Their wire format is JSON through `#[derive(Linkable)]` on every target, `no_std + alloc` included. `catalog!` lists them, and `cargo test` checks their wire shapes against the committed `aimdb.lock` (`AIMDB_UPDATE_LOCK=1 cargo test` to accept a new contract or version).
- **Contracts** (`types`): `Temperature`, `TemperatureCommand`, `ButtonPress`. Their wire format is JSON through `#[derive(Linkable)]` on every target, `no_std + alloc` included. `catalog!` lists them, and `cargo test -p mqtt-connector-demo-common --features std` checks their wire shapes against the committed `aimdb.lock` (`AIMDB_UPDATE_LOCK=1 cargo test -p mqtt-connector-demo-common --features std` to accept a new contract or version).
- **Keys** (`keys`): `SensorKey`, `CommandKey`, each with its MQTT topic in `#[link_address]`.
- **Simulated thermometers** (`sim`): `SimThermometers` hands out one owned channel per sensor; `Thermometer::on(channel)` is an input for every record type built `From<Reading>`.
- **Monitors** (`monitors`): `temperature_logger`, `command_consumer`.
Expand Down