black_box#
- hybrid_aif.composition.black_box(ins=None, outs=None)[source]#
An external process declared by its ports alone, as
(System, SystemParams).insmaps each in-port’s name to its type,outseach out-port’s, a type being(LEVEL, levels)or(FLOAT, width)(hybrid_aif.controls.LEVELandFLOAT). The System has one control node per in-port, with no action node and no reader, and one emission per out-port, with no parents and the static kernel"black_box", in the order given;System.black_boxholds every port’s type. The params hold nothing.Couple it as any component:
Identify("agent.a_v", "world.v")drives the in-portvwith an action node,Identify("world.fix", "agent.fix")feeds a modality from the out-portfix; the types of the two ends must agree, and an in-port nothing drives leaves the coupling open, whichrunrefuses. Step it underrunwith a custom step (a function of the step contract, orenv_step());System.portsreads its ports back.Refused: no port at all, a name given as both an in-port and an out-port, a dotted or empty name, a type that is not one of the two forms.