Skip to main content

Crate nucleus_trace

Crate nucleus_trace 

Source
Expand description

The Nucleus trace backend.

Wires the nucleus_itm decoder to a WebSocket fan-out so editor/browser dashboards can subscribe to live, structured trace events:

OpenOCD (SWO) ──▶ source ──▶ Decoder ──▶ Translator ──▶ JSON ──▶ WebSocket :7878

translate assigns meaning (port 0 = logs, ports 1–7 = typed variables), server owns the pipeline and client fan-out, and source supplies the bytes (OpenOCD TCP trace port or a captured-file replay). run_blocking is the synchronous entry point the CLI calls.

Re-exports§

pub use server::TraceServer;
pub use source::Source;
pub use translate::TraceEvent;
pub use translate::Translator;
pub use translate::VarType;
pub use translate::VariableMap;

Modules§

server
The trace daemon: decode pipeline + WebSocket fan-out.
source
Byte sources for the SWO trace stream, and OpenOCD setup over telnet.
translate
Turning raw ITM Packets into named, typed TraceEvents.

Structs§

TraceOptions
Options for run_blocking.

Constants§

DEFAULT_WS_PORT
The default WebSocket port (per the README/architecture).

Functions§

run_blocking
Run the trace daemon to completion (until the source ends), blocking on a fresh Tokio runtime so the caller stays synchronous.