<> <> <> DIRECTORY DM, DragOpsCross, PBusModel; PBusModelImpl: CEDAR PROGRAM EXPORTS PBusModel = BEGIN OPEN PBusModel; Create: PUBLIC PROC [] RETURNS [pbus: DM.Component] = { pbus _ NEW [DM.ComponentRec _ [ action: [Reset, PhA, EvPhA, PhB, EvPhB], history: NIL, componentType: $PBus, specific: NEW [PBusWires]]] }; PhA: DM.ActionProc = { }; EvPhA: DM.ActionProc = { wires: PBusWires _ NARROW[component.specific]; component.history _ CONS[wires, component.history] }; PhB: DM.ActionProc = { }; EvPhB: DM.ActionProc = { wires: PBusWires _ NARROW[component.specific]; component.history _ CONS[wires, component.history] }; Reset: DM.ActionProc = { component.history _ NIL }; END.