/* CIF SYSTEMDiagram */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ /* CIF Specific Geode Version @(V) tool=geodedit V4.1.2 format=SDL96 nested=yes cif=yes */ /* CIF Keep Specific Geode LastModified Thu Apr 06 11:18:38 2000 */ /* CIF Page DefaultPartition (2100, 2970) */ /* CIF Frame (41, 71), (1618, 1664) */ /* CIF Keep Specific Geode TextMode 0 */ /* CIF Keep Specific Geode Modified */ /* CIF Keep Specific Geode Preview 0 0 0 */ /* CIF Page newtypes (2100, 2970) */ /* CIF Frame (40, 40), (1074, 689) */ /* CIF Keep Specific Geode TextMode 0 */ /* CIF Keep Specific Geode Modified */ /* CIF Keep Specific Geode Preview 0 0 0 */ /* CIF Page signals (2100, 2970) */ /* CIF Frame (40, 40), (1500, 1290) */ /* CIF Keep Specific Geode TextMode 0 */ /* CIF Keep Specific Geode Modified */ /* CIF Keep Specific Geode Preview 0 0 0 */ SYSTEM tcs_s; /* CIF CurrentPage newtypes */ /* CIF TEXT (110, 114), (399, 73) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ synonym MAXFLOOR = 5; /* CIF End Text */ /* CIF TEXT (121, 219), (394, 135) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ syntype fl_t = uint8 constants 1:MAXFLOOR endsyntype; /* CIF End Text */ /* CIF TEXT (655, 79), (351, 198) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ newtype assignment_t struct fl fl_t; cap integer; endnewtype; /* CIF End Text */ /* CIF TEXT (655, 329), (351, 135) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ syntype uint8 = integer constants 0:255 endsyntype; /* CIF End Text */ /* CIF TEXT (667, 509), (327, 135) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ newtype pid_array_t array(fl_t, pid) endnewtype; /* CIF End Text */ /* CIF CurrentPage signals */ /* CIF TEXT (81, 151), (608, 304) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ signal n(fl_t), x(fl_t), r(fl_t), l(fl_t), u(fl_t), a(fl_t); signallist ee = n, x, r; signallist tcm = l, u, a; /* CIF End Text */ /* CIF CurrentPage DefaultPartition */ /* CIF CHANNEL (548, 427) , (548, 71) */ /* CIF TextPosition (558, 249) */ /* CIF TextPosition (558, 183) SignalList1 */ /* CIF Keep Specific Geode TextMode 3 */ /* CIF Keep Specific Geode TextMode 0 Siglist1 */ /* CIF Keep Specific Geode TextMode 0 Siglist2 */ /* CIF Keep Specific Geode Modified */ CHANNEL tcm FROM tcs_b TO ENV WITH (tcm); ENDCHANNEL; /* CIF CHANNEL (41, 502) , (460, 502) */ /* CIF TextPosition (235, 512) */ /* CIF TextPosition (307, 512) SignalList1 */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode TextMode 0 Siglist1 */ /* CIF Keep Specific Geode TextMode 0 Siglist2 */ /* CIF Keep Specific Geode Modified */ CHANNEL EE FROM ENV TO tcs_b WITH (ee); ENDCHANNEL; /* CIF CurrentPage DefaultPartition */ /* CIF BLOCK (460, 427), (250, 150) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ /* CIF Page DefaultPartition (2100, 2970) */ /* CIF Frame (109, 173), (1427, 743) */ /* CIF Keep Specific Geode TextMode 0 */ /* CIF Keep Specific Geode Modified */ /* CIF Keep Specific Geode Preview 0 0 0 */ BLOCK tcs_b /* CIF COMMENT (831, 482), (126, 73) */ /* CIF Keep Specific Geode TextMode 3 */ /* CIF Keep Specific Geode Modified */ COMMENT '#node'; /* CIF CurrentPage DefaultPartition */ /* CIF TEXT (1078, 241), (400, 200) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ signal report, assignment (assignment_t); /* CIF End Text */ /* CIF CurrentPage DefaultPartition */ /* CIF SIGNALROUTE (892, 691) , (892, 173) */ /* CIF TextPosition (902, 432) */ /* CIF TextPosition (902, 237) SignalList1 */ /* CIF Keep Specific Geode TextMode 3 */ /* CIF Keep Specific Geode TextMode 6 Siglist1 */ /* CIF Keep Specific Geode TextMode 6 Siglist2 */ /* CIF Keep Specific Geode Modified */ SIGNALROUTE tcm FROM room TO ENV WITH (tcm); /* CIF SIGNALROUTE (109, 501) , (373, 501) */ /* CIF TextPosition (225, 511) */ /* CIF TextPosition (292, 517) SignalList1 */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode TextMode 2 Siglist1 */ /* CIF Keep Specific Geode TextMode 2 Siglist2 */ /* CIF Keep Specific Geode Modified */ SIGNALROUTE ee FROM ENV TO disp WITH (ee); /* CIF SIGNALROUTE (573, 486) , (789, 486) , (789, 691) */ /* CIF TextPosition (799, 476) */ /* CIF TextPosition (532, 611) SignalList1 */ /* CIF TextPosition (593, 515) SignalList2 */ /* CIF Keep Specific Geode TextMode 3 */ /* CIF Keep Specific Geode TextMode 6 Siglist1 */ /* CIF Keep Specific Geode TextMode 2 Siglist2 */ /* CIF Keep Specific Geode Modified */ SIGNALROUTE int FROM disp TO room WITH (ee), assignment; FROM room TO disp WITH report; /* CIF CurrentPage DefaultPartition */ /* CIF CONNECT */ /* CIF Keep Specific Geode Position (872, 153) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ CONNECT tcm AND tcm; /* CIF CONNECT */ /* CIF Keep Specific Geode Position (89, 481) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ CONNECT EE AND ee; /* CIF CurrentPage DefaultPartition */ /* CIF PROCESS (736, 691), (372, 147) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ /* CIF Page DefaultPartition (2100, 2970) */ /* CIF Frame (20, 39), (1398, 974) */ /* CIF Keep Specific Geode TextMode 0 */ /* CIF Keep Specific Geode Modified */ /* CIF Keep Specific Geode Preview 0 0 0 */ PROCESS room (MAXFLOOR, MAXFLOOR) /* CIF COMMENT (966, 527), (200, 120) */ /* CIF Keep Specific Geode TextMode 3 */ /* CIF Keep Specific Geode Modified */ COMMENT '#priority(5)'; /* CIF CurrentPage DefaultPartition */ /* CIF TEXT (54, 556), (298, 259) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ dcl a assignment_t; dcl f fl_t; dcl maxp integer; dcl c integer; timer t := 5.0; /* CIF End Text */ /* CIF CurrentPage DefaultPartition */ /* CIF START (66, 144), (116, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ START ; /* CIF SET (52, 246), (145, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ SET (T); /* CIF NEXTSTATE (75, 348), (97, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ NEXTSTATE w4t; /* CIF CurrentPage DefaultPartition */ /* CIF STATE (1138, 79), (63, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ STATE E; /* CIF INPUT (1119, 181), (100, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ INPUT N, X; /* CIF OUTPUT (1091, 283), (155, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ OUTPUT A(f),L(f); /* CIF NEXTSTATE (1138, 385), (63, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ NEXTSTATE E; /* CIF End STATE */ ENDSTATE; /* CIF STATE (1304, 79), (58, 67) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ STATE *; /* CIF INPUT (1300, 181), (66, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ INPUT R; /* CIF TASK (1266, 283), (132, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ TASK c := 0; /* CIF OUTPUT (1284, 385), (97, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ OUTPUT U(f); /* CIF NEXTSTATE (1300, 487), (66, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ NEXTSTATE N; /* CIF End STATE */ ENDSTATE; /* CIF STATE (765, 79), (66, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ STATE N; /* CIF INPUT (765, 181), (66, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ INPUT N; /* CIF TASK (714, 283), (166, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ TASK c := c + 1; /* CIF NEXTSTATE (718, 512), (161, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ NEXTSTATE checking; /* CIF INPUT (946, 181), (66, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ INPUT X; /* CIF TASK (914, 283), (129, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ TASK c := c -1; /* CIF NEXTSTATE (899, 385), (161, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ NEXTSTATE checking; /* CIF End STATE */ ENDSTATE; /* CIF STATE (498, 79), (137, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ STATE w4asg; /* CIF INPUT (451, 181), (230, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ INPUT assignment(a); /* CIF TASK (446, 283), (240, 103) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ TASK f := a ! fl, maxp := a ! cap; /* CIF TASK (500, 417), (132, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ TASK C := 0; /* CIF OUTPUT (517, 519), (97, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ OUTPUT U(f); /* CIF NEXTSTATE (533, 621), (66, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ NEXTSTATE N; /* CIF End STATE */ ENDSTATE; /* CIF STATE (292, 79), (97, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ STATE w4t; /* CIF INPUT (236, 186), (99, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ INPUT t; /* CIF OUTPUT (224, 288), (124, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ OUTPUT report; /* CIF NEXTSTATE (217, 390), (137, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ NEXTSTATE w4asg; /* CIF SAVE (355, 181), (58, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ SAVE *; /* CIF End STATE */ ENDSTATE; /* CIF STATE (718, 512), (161, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ STATE checking; /* CIF SAVE (697, 614), (105, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ SAVE *; /* CIF ContinuousSignal (822, 614), (163, 134) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ PROVIDED c < 0 or c > maxp; /* CIF OUTPUT (852, 778), (103, 103) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ OUTPUT a(f), l(f); /* CIF NEXTSTATE (872, 911), (63, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ NEXTSTATE E; /* CIF ContinuousSignal (1005, 614), (163, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ PROVIDED c = maxp; /* CIF OUTPUT (1045, 716), (84, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ OUTPUT l(f); /* CIF NEXTSTATE (1054, 818), (66, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ NEXTSTATE N; /* CIF ContinuousSignal (1188, 614), (163, 134) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ PROVIDED c >= 0 and c < maxp; /* CIF OUTPUT (1222, 778), (95, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ OUTPUT u(f); /* CIF NEXTSTATE (1237, 880), (66, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ NEXTSTATE N; /* CIF End STATE */ ENDSTATE; ENDPROCESS; /* CIF PROCESS (373, 419), (200, 150) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ /* CIF Page initialization (2100, 2970) */ /* CIF Frame (20, 20), (1090, 877) */ /* CIF Keep Specific Geode TextMode 0 */ /* CIF Keep Specific Geode Modified */ /* CIF Keep Specific Geode Preview 0 0 0 */ /* CIF Page dispatching (2100, 2970) */ /* CIF Frame (20, 20), (579, 798) */ /* CIF Keep Specific Geode TextMode 0 */ /* CIF Keep Specific Geode Modified */ /* CIF Keep Specific Geode Preview 0 0 0 */ PROCESS disp (1,1) /* CIF COMMENT (416, 273), (200, 120) */ /* CIF Keep Specific Geode TextMode 3 */ /* CIF Keep Specific Geode Modified */ COMMENT '#priority (10)'; /* CIF CurrentPage initialization */ /* CIF TEXT (778, 60), (312, 98) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ dcl pids pid_array_t; dcl f fl_t := 1; /* CIF End Text */ /* CIF CurrentPage initialization */ /* CIF START (177, 223), (47, 70) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ START ; /* CIF NEXTSTATE (140, 322), (122, 70) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ NEXTSTATE w4rep; /* CIF CurrentPage initialization */ /* CIF STATE (555, 60), (122, 70) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ STATE w4rep; /* CIF INPUT (482, 164), (120, 70) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ INPUT report; /* CIF TASK (465, 263), (154, 98) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ TASK pids(f) := sender; /* CIF DECISION (514, 392), (55, 70) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ DECISION f; /* CIF ANSWER */ /* CIF Specific Geode Position (182, 492), (62, 70) */ /* CIF Line (542, 462), (542, 477), (213, 477), (213, 492) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ ( 1 ): /* CIF OUTPUT (40, 592), (346, 70) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ OUTPUT assignment((. 1,150 .)) to sender; /* CIF TASK (139, 692), (148, 70) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ TASK f := f + 1; /* CIF NEXTSTATE (185, 792), (56, 70) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ NEXTSTATE -; /* CIF ANSWER */ /* CIF Specific Geode Position (442, 492), (256, 65) */ /* CIF Line (542, 462), (542, 477), (570, 477), (570, 492) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ ( 2:MAXFLOOR -1 ): /* CIF OUTPUT (406, 587), (328, 70) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ OUTPUT assignment((. f,50 .)) to sender; /* CIF TASK (497, 686), (147, 70) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ TASK f := f + 1; /* CIF NEXTSTATE (542, 786), (57, 70) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ NEXTSTATE -; /* CIF ANSWER */ /* CIF Specific Geode Position (810, 492), (198, 70) */ /* CIF Line (542, 462), (542, 477), (909, 477), (909, 492) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ ( MAXFLOOR ): /* CIF OUTPUT (754, 592), (310, 70) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ OUTPUT assignment((. f,50 .)) to sender; /* CIF NEXTSTATE (861, 692), (96, 70) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ NEXTSTATE disp; /* CIF End DECISION */ ENDDECISION; /* CIF SAVE (630, 161), (59, 70) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ SAVE *; /* CIF End STATE */ ENDSTATE; /* CIF CurrentPage dispatching */ /* CIF STATE (279, 60), (100, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ STATE disp; /* CIF INPUT (133, 165), (95, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ INPUT n(f); /* CIF OUTPUT (96, 267), (169, 103) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ OUTPUT n to pids(f); /* CIF NEXTSTATE (151, 400), (58, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ NEXTSTATE -; /* CIF INPUT (250, 490), (95, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ INPUT x(f); /* CIF OUTPUT (213, 593), (169, 103) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ OUTPUT x to pids(f); /* CIF NEXTSTATE (269, 726), (58, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ NEXTSTATE -; /* CIF INPUT (365, 170), (89, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ INPUT r(f); /* CIF OUTPUT (325, 272), (169, 103) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ OUTPUT r to pids(f); /* CIF NEXTSTATE (381, 406), (58, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ NEXTSTATE -; /* CIF INPUT (455, 527), (124, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ INPUT report; /* CIF NEXTSTATE (488, 630), (58, 72) */ /* CIF Keep Specific Geode TextMode 4 */ /* CIF Keep Specific Geode Modified */ NEXTSTATE -; /* CIF End STATE */ ENDSTATE; ENDPROCESS; ENDBLOCK; /* CIF End SYSTEMDiagram */ ENDSYSTEM;