class Place::Router::SignalGraph

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.cr
place/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

Instance Method Summary

Class Method Detail

def self.build(nodes : Enumerable(Node::Ref), links : Enumerable(Tuple(Node::Ref, Node::Ref))) #

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.


[View source]

Instance Method Detail

def [](node : Node::Ref) #

Retrieves the labelled state for node.


[View source]
def [](node_id) #

Retrieves the labelled state for the signal node at node_id.


[View source]
def input?(node : Node::Ref) : Bool #

Checks if node is a system input.


[View source]
def inputs(destination : Node::Ref) #

Provide all signal nodes that can be routed to destination.


[View source]
def inputs #

Provide the signal nodes that form system inputs.


[View source]
def output?(node : Node::Ref) : Bool #

Checks if node is a system output.


[View source]
def outputs #

Provide the signal nodes that form system outputs.


[View source]
def 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.

Provides an Iterator that provides labels across each node, the edge, and subsequent node.


[View source]