------------------------SDT2>Controller----------------------------------------------------ObjectName----------------------------------------ObjectType----------------------------------------!%&()LinkEndpoints--------------------------------!%()HeadingText----------------------------------- Controller----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 5--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------()[8(! process Controller)]}----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*()[w(!GSDL)]}-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------()[(! l! 22!(d)[.(! l)[1(! 6)[4(! 6d! )]][ 7(! 65)][9a(! 6,! !S)[8(!; N!%()HeadingText-----------------------------------!%()PageOrdertCode-------------------------------DeclarationsaitOpened----------------------------WaitCentralWaitOpened---------------------------- !%&()LinkEndpoints--------------------------------Declarations-------------------------------------------------------------------------------------------------------------------------------------------- ---------------- --------EWTYPE DoorBaseType Array(DoorNoType, Pid) ENDNEWTYPE;)]][9^(! 6X,! !S)[8(! DCL CardData Charstring, CodeData KeyArrayType, CurrentPanel Pid, CurDoor DoorNoType, NextDoor Natural, DoorBase Doo rBaseType, NewPid Pid;)]][9d(! 6X! !S)[8(!w TIMER AllocTimer:=ALLOCTIMEOUT, CodeTimer:=CODETIMEOUT, CentralTimer:=CENTRALTIMEOUT, DoorTimer:=DOORTIMEOUT;)]]]]}d!)[8(! ()[(! l! 22!(d)[:(! l)[=(! 6)[@(! 6d! )]][ C(! 6d)][2g(! 6^! d!S)[8(! ) StartState WaitCode)][(!WaitAllocated_Idle_WaitCode)[WaitCentral6 ! d!WaitDoor_WaitOpenedCode (CodeData))][(! "][v(!^!"^)[6s(! 6^! d!S)[8(! NextDoor:=1)][|(!&!"&)[y(! 6^ &! d!S!)[8(! Allocate (NextDoor))][(!!")[6(! 6^! d!S)[8(! SET (AllocTimer))][(! R!"R )[(! 6R!Z)][3(! 6^R! d!S)[8(! Wait_ Allocated)]]]]]]]]]][3(! 6 ! ,!S)[8(()[(! l! 22!(d)[(! r)[(! 6)[(! 6d! )]][ (! 6I)][3(! 6X! ,!S)[8(! WaitCentral)][(!",EE^!"^,)[(! 6d^! d!S!)[8(! Start_ Register)][ (!!")[6i(! 6d! d!S)[8(! RESET (CentralTimer))][l(!X!"X)[ (! 62! ,!S!)[8(!! DisplayStartReg TO CurrentPanel)][(! R!"R )[(! 6R!Z)][3(! 6dR! d!S)[8(! Idle)]]]]]]]]][(!",EXEX^!"X^,)[(! 6^! d!S!)[8(! Registered)][(!XX!"XX)[6o(! 6! d!S)[8(! RESET (CentralTimer))][r(!XXX!"XXX)[(! 6! ,!S!)[8(!# DisplayRegistered TO CurrentPanel)][(!X XR!"XRX )[(! 6XR!Z)][3(! 6R! d!S)[8(! Idle)]]]]]]]]][(!",EE^!"^,)[(! 6^! d!S!)[8(! NotOk, Not_ Registered)][(!!")[6u(! 6! d!S)[8(! RESET (CentralTimer))][x(!X!"X)[(! 6R! ,!S!)[8(! DisplayNotOk TO CurrentPanel)][(! R!"R )[(! 6R!Z)][3(! 6R! d!S)[8(! Idle)]]]]]]]]][(!",ExEx^!"x^6()[(! l! 22!(d)[R(! l)[U(! 6)[X(! 6d! )]][ [(! 6m)][3f(! 6,! ,!S)[8(! WaitDoor)][(!!")[(! 6^! d!S!)[8(! SelectedDoor (CurDoor))][(!&X!"X&)[(! 6^X! d!S!)[8(! OpenDoor)][1(!&X!"X&)[7(! 6XX!! !S)[8(! TO D4(!4!5!7)[!(! Declarations!)[!(! StartState!)[!(! WaitAllocated_Idle_WaitCode!)[!(! WaitCentral!)[!(! WaitDoor_WaitOpene5! * (WaitAllocated))][(!"!")[(! 6X! ,!S!)[8(!0 AllocTimer, CodeTimer, CentralTimer, DoorTimer)][(!X!"X)[(! 6! d!S!)[8(! DisplayNotOk)][1(!R!"R)[7(! 6!! !S)[8(! TO CurrentPanel)]]][(!R!"R)[(! 6R!Z)][3p(! 6R! d!S)[8(! Idle)]]]]]]][(!"FF!"F)[(! 6! d!S!)[8(! Abort)][(!F&FX!"FX!F&)[6(! 6~X! !S)[8(!6 RESET (AllocTimer,CodeTimer, CentralTimer,DoorTimer))][(!F FR!"FRF )[(! 6FR!Z)][3=()[(! l! 22!(d)[F(! l)[I(! 6)[L(! 6d! )]][ O(! 6)][3(! 6^,! ,!S)[8(! W#aitAllocated)][(!"!")[(! 6! d!S!)[8(! Allocated (NewPid))][ (!X!"$X)[6 (! 6! d!S)[8(! RESET (AllocTimer))][(! !" )[6(! 6d ! ,!S)[8(! %DoorBase (NextDoor) :=NewPid)][(!!")[6(! 6! d!S)[8(! NextDoor:= NextDoor+1)][(!"Lee~!"&~L)[(! 6e!)][ (! 6^~! ,!S)[8(! NextDoor> DOORMAX)][0(!^,,F!",F^)[8('! 6E! false)][-(! 6F! d!S!)[8(! Allocate (NextDoor))][<(!,,!",,)[69(! 6! d!S)[(8(! SET (AllocTimer))][B(!,@,r!",r,@)[(! 6,r!Z)][3?(! 6r! d!S)[8(! WaitAllocated)]]]]]]][H(!)F!"F)[8(! 6! true)][E(! 6XF! d!S!)[8(! All_ Allocated)][N(!!"*)[(! 6!Z)][3K(! 6X! d!S)[8(! Idle)]]]]]]]]]]]]]]][(!!")[(! 6! + d!S!)[8(! Not_ Allocated)][$(!X!"X)[6!(! 6! d!S)[8(! RESET (AllocTimer))]['(!,~!"~)[)()]]]]]][(!"!")[(! 6! d!S!)[8(! AllocTimer)][*-(!"Xee~!"~X)[(! 6e!)][)()]]]]][3(! 6,! ,!S)[8(! Idle)][(!~~!."~~)[(! 6! d!S!)[8(! Card (CardData))][(!~X~!"~~X)[6(! 6! d!/S)[8(! CurrentPanel :=SENDER)][(!~~ !"~ ~)[6(! 6 ! d!S)[8(! SET (CodeTimer))][(!~~!"0~~)[(! 6~!Z)][3(! 6! d!S)[8(! WaitCode)]]]]]]]]]][3(! 6F,! ,!S)[8(! WaitCode)][(!1!")[(! 6x! d!S!)[8(! Code (CodeData))][(!X!"X)[6(! 6x! 2 d!S)[8(! RESET (CodeTimer))][(! !" )[(! 6F ! ,!S!)[8(!" CardAndCode (CardData, CodeData))][3(!!")[6(! 6x! d!S)[8(! SET (CentralTimer))][(!L~!"~L)[(! 6~>oorBase(CurDoor))]]][(!!")[6(! 6^! d!S)[8(! SET (DoorTimer))][(!R!"R)9d!)]]]]]}---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------,)[(! 6^! d!S!)[8(! Ok)][(!xx!"xx)[6{(! 6! d!S)[8(! RESET (C7entralTimer))][~(!xXx!"xxX)[(! 6! ,!S!)[8(! DisplayOk TO CurrentPanel)][(!x xR!"xR8x )[(! 6xR!Z)][3(! 6R! d!S)[8(! WaitDoor)]]]]]]]]]]]]}--------------------------------------------------------------------------------------------------------------[(! 6!Z)][3(! 6^! d!S)[8(! WaitOpened)]]]]]]]]]][3Q(! 6! ,!S)[8(! WaitOpened)][](!LL!":LL)[T(! 6! d!S!)[8(! Door_ Opened)][`(!L&LX!"LXL&)[6(! 6X! d!S)[8;(! RESET (DoorTimer))][(!LL!"LL)[W(! 6! ,!S!)[8(!# DisplayDoorOpened TO CurrentPanel)][c(!LL