+ This is a container of all traffic lights showing the same light configurtation.
+States:
+ LIGHT color of the whole group
+
+External Inputs:
+
+External Outputs:
+
+Constraints:
+
+Notes:
+#@@+{Container trafficLight List }#@@
+#@@+{Header File grtraf.h }#@@
+
+References:
ATTR lightState
DESC 151
+Summary:
+ current state required for the whole group, also visible for drivers
+Values:
+ #@@+{Type LIGHT}#@@
+Constraints:
+
+Notes:
+
+References:
SERV getBulbState
DESC 422
+Summary:
+The service is used to collect bulb status for the whole group. The returned list contains identities of all trafficLight inividuals having burned bulbs.
+Parameters:
+#@@+{Type List & }#@@
+#@@+{Call Arguments }#@@
+#@@+{Qualifier const }#@@
+
+Algorithm:
+fetch bulbState from all trafficLights in the group and create alist of those with are burned.
+
+Exceptions:
+
+Constraints:
+
+Notes:
+
+References:
SERV getColor
DESC 180
+Summary:
+ returns current LIGHT state for the group
+Parameters:
+#@@+{Type LIGHT}#@@ #@@+{Call Arguments}#@@
+Algorithm:
+
+Exceptions:
+
+Constraints:
+
+Notes:
+
+References:
SERV setColor
DESC 279
+Summary:
+ request to set light state/color for the entire group.
+Parameters:
+#@@+{Type void }#@@
+#@@+{Call Arguments LIGHT Ilight}#@@
+
+Algorithm:
+Propagate the required light state to all traffic lights contained in this group.
+
+
+Exceptions:
+
+Constraints:
+
+Notes:
OBJ: 0 705 265 syncUnit
DESC 171
+Summary:
+This is an external unit having all the logic for traffic control.
+
+States:
+
+External Inputs:
+
+External Outputs:
+
+Constraints:
+
+Notes:
+
+References:
OBJ: 0 420 425 timer
DESC 132
+Summary:
+
+States:
+
+External Inputs:
+
+External Outputs:
+
+Constraints:
+
+Notes:
+#@@+{Header File timex1.h}#@@
+References:
ATTR timeoutQueue
DESC 692
+Summary:
+Queue of requested timeouts
+Values:
+#@@+{Type REQuest }#@@
+#@@+{Specifier Static}#@@
+#@@+{Qualifier [MAX_STN]}#@@
+
+Constraints:
+The queue is a sorted list of the requests. The requests are sorted with these to be expired first in the beginning of the queue.
+The internal records contain:
+- time to expirationafter that the previous element in queue has expired. I.e. time to expiration is sum of timeout values of all preceeding elements.
+- ownIdentity of the object who requested the timeout
+- user supplied ownData (to be returned at expiration)
+
+Notes:
+
+MAX_STN is the highest number of requests that can be served. Here assumed 'enought large'
+
+
+References:
SERV internalTimer
DESC 582
+Summary:
+ The internal timer occurs every NN seconds, wich specified accuracy of the time-out handling.
+Internal timer is invoked when a NN-sec messages comes from the operating system.
+
+Parameters:
+#@@+{Type void}#@@ #@@+{Call Arguments }#@@
+
+Algorithm:
+subtract NN from time specification in all the elements in the queue and send messages to the objects which time requests expired.
+
+The receiving objects are addressed by their ownIdentites. The ownData submitted when the request was ordered are returned.
+#@@+{Call Arguments int secondsToTimeout, int ownIdentity, long ownData}#@@
+
+Algorithm:
+File the request into proper location in the queue (time to expiration).
+
+Exceptions:
+
+Constraints:
+If no memory to create the timer block a immediate timeout message is sent to the requesting object with an ERRor code.
+
+Notes:
+
+References:
FSMB
ACTN "find location where to add elem." 60 170 4 " "
ACTN "move rest of queue 1 step" 80 230 0 " "
ACTN "add elemet to queue" 95 295 1 " "
ACTN "recalc time for next elem" 80 350 2 " "
RECV "REQ timeout t" 110 110 5 " "
STAT "---" 135 35 -1 " "
STAT "---" 135 415 3 " "
FSME
OBJ: 0 75 465 trafficLight
DESC 234
+Summary:
+ a device showing instructions to drivers.
+States:
+ RED, YELLOW, GREEN
+External Inputs:
+ orders to set ligth state.
+External Outputs:
+ bulb alarms
+Constraints:
+
+Notes:
+ #@@+{Header File trlight.h}#@@
+References:
ATTR bulbState
DESC 177
+Summary:
+ contains info ia ny of bulbs is burned.
+Values:
+ TRUE - all OK
+ FALSE - at least one bulb is burned
+#@@+{Type BOOL }#@@
+
+Constraints:
+
+Notes:
+
+References:
ATTR lightState
DESC 122
+Summary:
+ current state, also visible for drivers
+Values:
+ #@@+{Type LIGHT}#@@
+Constraints:
+
+Notes:
+
+References:
SERV getBulbState
DESC 161
+Summary:
+ get bulb's Health state
+Parameters:
+#@@+{Type BOOL}#@@ #@@+{Call Arguments}#@@
+Algorithm:
+
+Exceptions:
+
+Constraints:
+
+Notes:
+
+References:
SERV ownCheck
DESC 553
+Summary:
+Own check is invoked when a timer message is received. Then the bulbs are checked for conductivity. If any is burned the bulb state is set to indicate the fault..
+
+Parameters:
+#@@+{Call Arguments BOOL ERRindicator, long ownData}#@@
+#@@+{Type void}#@@
+
+
+Algorithm:
+if ERRin is TRUE, discard the timer. and wait for a message with ERRind being FALSE.
+
+Otherwise perform a hardware self test to check conductivity of each bulb. If any one is burned set the bulbState to faulty..
+
+Exceptions:
+
+Constraints:
+
+Notes:
+
+References:
SERV setColor
DESC 185
+Summary:
+ request to set light state/color
+Parameters:
+#@@+{Type void }#@@
+#@@+{Call Arguments LIGHT Ilight}#@@
+Algorithm:
+
+Exceptions:
+
+Constraints:
+
+Notes:
+
+References:
SERV trafficLight
DESC 154
+Summary:
+ constructor
+Parameters:
+#@@+{Call Arguments LIGHT Ilight, int Ident}#@@
+Algorithm:
+
+Exceptions:
+
+Constraints:
+
+Notes:
+
+References:
CON2 w 3 6 "N" "1"
DESC 51
+Summary:
+
+Constraints:
+
+Notes:
+
+References:
CON2 m 2 5 "N" "1"
DESC 51
+Summary:
+
+Constraints:
+
+Notes:
+
+References:
CON2 m 2 3 "N" "1"
DESC 51
+Summary:
+
+Constraints:
+
+Notes:
+
+References:
CON3 -40 0 100
CON2 m 4 3 "N" "1"
DESC 51
+Summary:
+
+Constraints:
+
+Notes:
+
+References:
CON3 20 20 100
CON2 g 1 3 "N" "1"
DESC 51
+Summary:
+
+Constraints:
+
+Notes:
+
+References:
CON2 g 1 6 "N" "1"
DESC 51
+Summary:
+
+Constraints:
+
+Notes:
+
+References:
CON2 m 3 6 "N" "1"
DESC 106
+Summary:
+Flow of messages to control traffic lights in the group