Micro-toolkit

microbus

Firmware modules need bounded event delivery without hidden allocation.

A small event bus copies payload bytes and supports synchronous publish or bounded deferred dispatch.

DevelopmentMITC99
Last verified
Not audited against current README/docs
Platform scope
Portable C99; integration depends on caller-provided adapters

What it solves

Firmware modules need bounded event delivery without hidden allocation.

How it works

1Publisher2copied event3subscriber / deferred queue

Use it when

Publish a sensor update synchronously
Queue deferred events for the main loop
Subscribe one handler to a topic

Quick Start

#include "mbus.h"
mbus_t bus; uint16_t mv=3300;
mbus_init(&bus,NULL);
mbus_subscribe(&bus,MBUS_TOPIC_SENSOR,on_sensor,NULL);
mbus_publish(&bus,MBUS_TOPIC_SENSOR,&mv,sizeof mv);
/* Expected: on_sensor receives a copied two-byte payload. */

Engineering evidence

  • Tests and configuration contracts are documented in the repository

Known limits

  • Default is single-context
  • General thread safety is not provided
  • Payload capacity and queue depth are compile-time bounded