class Place::Router::SignalGraph
- Place::Router::SignalGraph
- Reference
- Object
Overview
Structures and types for mapping between sys,mod,idx,io referencing and the underlying graph structure.
The SignalGraph class does not perform any direct interaction with devices, but does provide the ability to discover routes and available connectivity when may then be acted on.
Defined in:
place/router/signal_graph.crplace/router/signal_graph/edge.cr
place/router/signal_graph/mod.cr
place/router/signal_graph/node.cr
place/router/signal_graph/watchable.cr
Constant Summary
-
Mute =
Node::Mute.instance
Class Method Summary
-
.build(nodes : Enumerable(Node::Ref), links : Enumerable(Tuple(Node::Ref, Node::Ref)))
Construct a graph from a pre-parsed configuration.
Instance Method Summary
-
#[](node : Node::Ref)
Retrieves the labelled state for node.
-
#[](node_id)
Retrieves the labelled state for the signal node at node_id.
-
#input?(node : Node::Ref) : Bool
Checks if node is a system input.
-
#inputs(destination : Node::Ref)
Provide all signal nodes that can be routed to destination.
-
#inputs
Provide the signal nodes that form system inputs.
-
#output?(node : Node::Ref) : Bool
Checks if node is a system output.
-
#outputs
Provide the signal nodes that form system outputs.
-
#route(source : Node::Ref, destination : Node::Ref, max_dist = nil)
Find the signal path that connects source to dest, or
nil
if this is not possible.
Class Method Detail
Construct a graph from a pre-parsed configuration.
nodes must contain the set of all signal nodes that form the device inputs and outputs across the system. This includes those at the "edge" of the signal network (e.g. a input to a switcher) as well as inputs in use on intermediate devices (e.g. a input on a display, which in turn is attached to the switcher above).
links declares the interconnections between devices.
Modules associated with any of these nodes are then introspected for switching, input selection and mute control based on the interfaces they expose.
Instance Method Detail
Provide all signal nodes that can be routed to destination.
Find the signal path that connects source to dest, or nil
if this is
not possible.
Provides an Iterator
that provides labels across each node, the edge, and
subsequent node.