PBusModelImpl.mesa
Written By: Jean Vuillemin and Pradeep Sindhu
Last Edited By: Pradeep Sindhu August 21, 1985 6:55:11 pm PDT
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.