Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Crate map

AreaPathPurpose
Low-level CAN/J1939src/net/identifiers, address claim, TP/ETP, sessions
CAN transport seamsrc/net/can_transport.rs, src/net/can_adapter.rscrate-owned CanTransport boundary plus hosted adapter isolation
J1939 diagnosticssrc/j1939/DM messages and diagnostic helpers
ISOBUS servicessrc/isobus/VT, TC, FS, SC, AUX, guidance, implement data
NMEAsrc/nmea/NMEA 2000 and NMEA 0183 GNSS/navigation helpers
Hosted session facadesrc/session/sans-IO Session core, Plugins, Driver/Controls, presets, typed events in hosted builds
Embedded session facadesrc/embedded_session.rsno_std + alloc Session, Driver::poll_at, caller-owned transport loop
Fixed-capacity helperssrc/fixed.rsembedded queues, slots, byte buffers, and bounded message helpers
Timesrc/time.rsInstant — the monotonic timestamp injected into the sans-IO core
Lightweight geosrc/geo.rsprotocol-facing WGS/ECEF/local-frame types, with optional hosted concord conversions
VT storage blobssrc/vt_storage.rsstorage-agnostic VT stored-pool encode/decode for embedded-owned persistence
C ABIsrc/ffi.rsexported C surface
Pythonsrc/python/Python extension bindings
Examplesexamples/runnable API demonstrations

How to choose the right layer

NeedStart hereWhy
Decode or encode a single frame/payloadsrc/net/, src/j1939/, src/isobus/, src/nmea/lowest surface with byte-level types
Build an ECU-like applicationsrc/session/plugin-composed, sans-IO core + driver/handle split — see The session facade
Build MCU firmwaresrc/embedded_session.rs, src/net/can_transport.rs, src/fixed.rsboard-owned clock/CAN/storage with no_std + alloc; see no_std on microcontrollers
Build a common tractor/implement/VT/TC rolesrc/session/presets.rscurated plugin groups for a role
Expose to Csrc/ffi.rs and include/machbus.hstable opaque-handle API
Expose to Pythonsrc/python/Pythonic wrappers and event dictionaries
Prove behavior with executable samplesexamples/commands are documented in the examples chapters

Session plugins

In hosted/default machbus::session, each subsystem is a Plugin you .plug(...) and reach by type with session.get_mut::<P>() / controls.with_mut::<P>(...):

SubsystemPlugin (session::plugins)
Diagnostics (DM1)Diagnostics
GNSS / NMEA 2000Gnss
Virtual TerminalVtClient, VtServer
Task ControllerTcClient, TcServer
File ServerFsClient, FsServer
Implement messagesImplement
Sequence ControlScMaster, ScClient
TIMTim
PowertrainPowertrain
Heartbeat / Maintain PowerHeartbeat, MaintainPower
Shortcut Button / LanguageShortcutButton, LanguageCommand
Auxiliary / DM memoryAuxiliary, DmMemory
Functionalities / Group fn / Request2 / NAME mgmtControlFunctionalities, GroupFunction, Request2, NameManagement

See The session facade for the full surface.

Embedded builds do not expose every hosted plugin wrapper. They expose the caller-driven Session loop plus protocol components that can compile without std, including core network/J1939/NMEA helpers and heap-backed VT/TC/FS pump state. Use Feature flags and no_std on microcontrollers for the current embedded boundary.

Reaching a plugged subsystem

You reach any plugged subsystem by type and call its own methods: controls.with_mut::<P>(...) (or session.get_mut::<P>()). Both return None when that plugin was not plugged, so check the result rather than assuming the subsystem is present.