pathfinder

package
v0.0.0-...-75739c8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	ID     string
	Device base.Device
}

type SignalPathfinder

type SignalPathfinder struct {
	Devices  map[string]base.Device
	Expected int
	Actual   int
	Pending  map[string][]base.Port // a list of the 'pending' ports. Really what this is is the fact that we can't add switches piecemeal into the graph
}

func InitializeSignalPathfinder

func InitializeSignalPathfinder(devices []base.Device, expected int) SignalPathfinder

func (*SignalPathfinder) AddEdge

func (sp *SignalPathfinder) AddEdge(Device base.Device, port string) bool

we need to store the state so that we can later use it to trace the value

func (*SignalPathfinder) GetInputs

func (sp *SignalPathfinder) GetInputs() (map[string]base.Device, error)

returns a map of output -> input of all available paths. we assume that there is an entry for each output device - and will trace back as far as we can through that route we assume that all the 'edges' have been added

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL