-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
enhancementNew feature or requestNew feature or requestsw: APILibrary design, specification, and usageLibrary design, specification, and usage
Milestone
Description
Currently, backplane cycles read all inputs and write to all outputs. The Router API would allow custom mappings between inputs and outputs.
Example (loose concept, not final):
backplane
-- inputs
:addInput('fission', fissionReactor('right'))
:addInput('fusion', fusionReactor('left'))
:addInput('turbine', industrialTurbine('back'))
:addInput('induction', inductionMatrix('bottom'))
:addInput('securemodem', secureModem('top', 'abc123='))
-- routes
:routes(
route.from('fission', 'fusion') -- filter by adapter name
:match('*:status') -- pattern match metric names
:addOutput('status_board', indicatorGrid) -- add route-scoped output
:slow(), -- preferred cycle ring; backplane will update this route less frequently
route.from('*') -- process all adapters
:match('*:production_rate')
:addOutput('line', labelGrid)
route.from('induction')
:only('mekinduction:energy') -- match list of metrics exactly
:middleware(mw.calcDelta():interval('1t')) -- add route-scoped middleware
:fast() -- backplane will update this route more frequently
)
-- global outputs
:addOutput('log', helloWorld)
-- cycle scheduler with defined fast, normal, and slow ring speeds
backplane:cycleEvery('5t', '5s', '1m')Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestsw: APILibrary design, specification, and usageLibrary design, specification, and usage