theallelectricsmartgrid

Message Routing and Smart Buses

This page covers input routing and LED/state bus transport used by UI/controller layers.

PadUI and PadUIGrid

Defined in private/src/PadUI.hpp.

PadUIGrid is a lightweight factory that generates PadUI handles for a route.

MessageInBus

Defined in private/src/MessageInBus.hpp.

MidiToMessageIn route typing

Route type controls how incoming MIDI packets are interpreted:

Both Wrld.Bldr and QuadLaunchpadTwister configure these route types during construction.

SmartBusGeneric and SmartBusColor

Defined in private/src/SmartBus.hpp.

SmartBusColor is SmartBusGeneric<Color>, used for controller LED output state.

Epoch/diff iteration model

The bus iterator uses epoch comparison:

This keeps output processing efficient for mostly-static LED frames.

Grid-to-bus publishing

AbstractGrid::OutputToBus(SmartBusColor* bus):

This is the primary bridge from sequencer/controller state to UI/controller LED state.