DIRECTORY DM, DragOpsCross, DMMBusModel; DMMBusModelImpl: CEDAR PROGRAM IMPORTS DM EXPORTS DMMBusModel = BEGIN OPEN DMMBusModel; numResetCycles: INT = 20; numRemainingResetCycles: INT; Create: PUBLIC PROC [] RETURNS [mbus: DM.Component] = { mbus _ NEW [DM.ComponentRec _ [ action: [Reset, PhA, EvPhA, PhB, EvPhB], history: NIL, componentType: $MBus, subComponents: NIL, specific: NEW [MBusSpecificRec]]]; }; MReset: PUBLIC PROC [mbus: DM.Component] RETURNS [BOOL] = { pvt: MBusSpecific _ NARROW[mbus.specific]; RETURN [pvt.mReset] }; DrMReset: PUBLIC PROC [mbus: DM.Component, value: BOOL] = { pvt: MBusSpecific _ NARROW[mbus.specific]; pvt.mReset _ value }; MnAdCycle: PUBLIC PROC [mbus: DM.Component] RETURNS [BOOL] = { pvt: MBusSpecific _ NARROW[mbus.specific]; RETURN [pvt.mnAdCycle] }; DrMnAdCycle: PUBLIC PROC [mbus: DM.Component, value: BOOL] = { pvt: MBusSpecific _ NARROW[mbus.specific]; pvt.mnAdCycle _ value }; MnShared: PUBLIC PROC [mbus: DM.Component] RETURNS [BOOL] = { pvt: MBusSpecific _ NARROW[mbus.specific]; RETURN [pvt.mnShared] }; DrMnShared: PUBLIC PROC [mbus: DM.Component, value: BOOL] = { pvt: MBusSpecific _ NARROW[mbus.specific]; pvt.mnShared _ value }; MnAbort: PUBLIC PROC [mbus: DM.Component] RETURNS [BOOL] = { pvt: MBusSpecific _ NARROW[mbus.specific]; RETURN [pvt.mnAbort] }; DrMnAbort: PUBLIC PROC [mbus: DM.Component, value: BOOL] = { pvt: MBusSpecific _ NARROW[mbus.specific]; pvt.mnAbort _ value }; MnDV: PUBLIC PROC [mbus: DM.Component] RETURNS [BOOL] = { pvt: MBusSpecific _ NARROW[mbus.specific]; RETURN [pvt.mnDV] }; DrMnDV: PUBLIC PROC [mbus: DM.Component, value: BOOL] = { pvt: MBusSpecific _ NARROW[mbus.specific]; pvt.mnDV _ value }; MnError: PUBLIC PROC [mbus: DM.Component] RETURNS [BOOL] = { pvt: MBusSpecific _ NARROW[mbus.specific]; RETURN [pvt.mnError] }; DrMnError: PUBLIC PROC [mbus: DM.Component, value: BOOL] = { pvt: MBusSpecific _ NARROW[mbus.specific]; pvt.mnError _ value }; MCmd: PUBLIC PROC [mbus: DM.Component] RETURNS [MCmdType] = { pvt: MBusSpecific _ NARROW[mbus.specific]; RETURN [pvt.mCmd] }; DrMCmd: PUBLIC PROC [mbus: DM.Component, mCmd: MCmdType] = { pvt: MBusSpecific _ NARROW[mbus.specific]; pvt.mCmd _ mCmd }; MData: PUBLIC PROC [mbus: DM.Component] RETURNS [DM.Word] = { pvt: MBusSpecific _ NARROW[mbus.specific]; RETURN [pvt.mData] }; DrMData: PUBLIC PROC [mbus: DM.Component, mData: DM.Word] = { pvt: MBusSpecific _ NARROW[mbus.specific]; pvt.mData _ mData }; MnHouseKeepingInProgress: PUBLIC PROC [mbus: DM.Component] RETURNS [BOOL] = { pvt: MBusSpecific _ NARROW[mbus.specific]; RETURN [pvt.mnHouseKeepingInProgress] }; DrMnHouseKeepingInProgress: PUBLIC PROC [mbus: DM.Component, value: BOOL] = { pvt: MBusSpecific _ NARROW[mbus.specific]; pvt.mnHouseKeepingInProgress _ value }; PhA: DM.ActionProc = { IF (numRemainingResetCycles _ numRemainingResetCycles-1) = 0 THEN DrMReset[component, FALSE]; }; EvPhA: DM.ActionProc = { }; PhB: DM.ActionProc = { }; EvPhB: DM.ActionProc = { pvt: MBusSpecific _ NARROW[component.specific]; component.history _ DM.ConsHistory[EvPhB, NEW[MBusSpecificRec _ pvt^], component.history] }; Reset: DM.ActionProc = { component.history _ NIL; numRemainingResetCycles _ numResetCycles; DrMReset[component, TRUE]; }; END. ŠDMMBusModelImpl.mesa Written By: Jean Vuillemin and Pradeep Sindhu Last Edited By: Pradeep Sindhu September 5, 1985 2:42:55 pm PDT ΚW˜™J™-J™?—J˜codešΟk ˜ Kšœ˜—J˜J˜šΟbœœ˜Kš ˜ Kšœœœ ˜-K–36 sp tabStops˜K•StartOfExpansionS -- [cache: CacheModels.Cache, addr: DragOpsCross.Word, fromJump: BOOL _ FALSE] -- šœœ˜Kšœœ˜K˜šΟnœœœœ˜7šœœœ˜Kšœ(˜(Kšœ œ˜ K˜Kšœœ˜Kšœ œ˜"—K˜—K˜š Πbnœœœœ œœ˜;Kšœœ˜*Kšœ ˜K˜K˜—š  œœœœœ˜;Kšœœ˜*K˜K˜—K˜š   œœœœ œœ˜>Kšœœ˜*Kšœ˜K˜—K˜š   œœœœœ˜>Kšœœ˜*Kšœ˜K˜—K˜š  œœœœ œœ˜=Kšœœ˜*Kšœ˜K˜—K˜š   œœœœœ˜=Kšœœ˜*Kšœ˜K˜—K˜š  œœœœ œœ˜