Skip to main content

Crate uiharu_core

Crate uiharu_core 

Source
Expand description

uiharu, a streaming protocol decode engine: decoders run as resumable state machines over blocks of logic samples, exchange typed events through bounded streams with backpressure, and are wired into a checked decode graph.

Re-exports§

pub use exec::Exposed;
pub use exec::Pipeline;
pub use exec::PushError;
pub use exec::QueueStat;
pub use exec::RunReport;
pub use exec::Stats;
pub use graph::DynExposedRef;
pub use graph::DynInput;
pub use graph::DynOutput;
pub use graph::ExposedRef;
pub use graph::Graph;
pub use graph::GraphConfig;
pub use graph::GraphError;
pub use graph::InputRef;
pub use graph::NodeId;
pub use graph::OutputRef;
pub use graph::SourceHandle;
pub use graph::SourceId;
pub use graph::SourceSpec;
pub use node::Inbox;
pub use node::Io;
pub use node::Node;
pub use node::NodeCx;
pub use node::NodeFuture;
pub use node::NodeSpec;
pub use node::Outbox;
pub use node::ProgressSink;
pub use node::Provenance;
pub use node::Readable;
pub use node::Wait;
pub use node::ready_all;
pub use schema::EventSchema;
pub use schema::InputSpec;
pub use schema::OutputSpec;
pub use schema::PropValue;
pub use schema::Props;
pub use schema::Requirement;
pub use schema::Requires;
pub use schema::SchemaId;
pub use signal::BlockError;
pub use signal::Change;
pub use signal::ChannelMask;
pub use signal::LOGIC_SAMPLES;
pub use signal::Levels;
pub use signal::LogicBlock;
pub use signal::LogicBlockBuilder;
pub use signal::MAX_CHANNELS;
pub use signal::Sample;
pub use signal::SignalCursor;
pub use signal::SignalItem;
pub use stream::Broadcast;
pub use stream::Event;
pub use stream::Item;
pub use stream::ReaderId;
pub use time::Tick;
pub use time::TickRange;
pub use time::TimeBase;

Modules§

dsl
The runtime of decoders compiled from the DSL: what the backend emits generated code against (docs/dsl.md §3 and §5).
exec
Running a built graph: feeding sources, polling the nodes until nothing can move, and reading the exposed outputs.
graph
Building a decode graph: sources of logic samples, decoder nodes, the connections between their typed ports and the outputs exposed to the caller. Connecting checks that the ports agree on the schema and that the input’s requirements are met; building checks that every input is connected, that the graph has no cycle and that each node reads one time domain.
hex_u64
Integers wider than JSON readers keep exactly.
node
Decoders as the executor runs them: a node declares its ports, is started with its ports bound to queues, and runs as one future that reads through an Inbox or a SignalCursor and writes through an Outbox.
schema
What ports carry and what they require of each other: the identity of an event schema, the properties an output declares (word width, bit order, which lines are present …) and the requirements an input places on them. The graph checks them when ports are connected.
signal
Logic samples as decoders read them: blocks of bit-packed samples, and the cursor that walks a stream of blocks looking for edges and reading levels.
stream
Event streams: the envelope every event carries, the control items that travel with events, and the bounded broadcast queue that hands one producer’s items to every reader.
time
Time as decoders see it: ticks on a source’s sample clock, tick ranges and the time base that turns them into seconds. Decoders never work in seconds; everything they emit is placed in ticks so that results stay exact and comparable.