||Initialize a specific number of regular and fast tracks (at system
||After pressing the buttonInit, for each track type send the
signal setTrackParams(trackType, ts1Dur, ts1Sig1Dur, sig1Ts2Dur, breakDur,
minDistDur) for setting the concrete values for the respective type
(taken from textFieldRTP1 (trackType = 'regular'); and
Then, send signal initTracks(nbrRegTracks, nbrFastTracks),
(taken from textFieldRT and textFieldFT).
The, send signal setCarPeriod and setTrainPeriod as described
After these initialization data have been transmitted, open a separate
window (Visualization) that shows the railway crossing in a graphical
||Set the gate to a specific state.
||If buttonCloseGate is pushed, send signal setGate(close);
If buttonOpenGate is pushed, send signal setGate(open).
||Set one (or all) signal(s) to a specific state.
||If buttonGoSignal is pushed, send the signal setSignal(track,
go), where track is taken from textFieldTrack; If buttonHaltSignal
is pushed, send signal setSignal(track, halt). The textFieldTrack
should contain the instanceName of the respective track, or the keyword
if all tracks are to be controlled.
||Display the statistics for the railway crossing (the number of trains,
the average waiting duration per track, etc.).
||Upon reception of the newTrackStatistics(trackName, ...) signal,
display the data for the respective track in the tableStats depending
on the trackName parameter.
||Set the periods for arriving and leaving cars, or create cars manually.
||If buttonSetCarPeriod is pushed, send the signal setCarPeriod(p1,p2),
where p1 is taken from textFieldCP1, and p2 is taken
If buttonCreateCar is pushed, send the signal createCar().
||Set the period for creating trains, or create trains manually.
||If buttonSetTrainPeriod is pushed, send the signal setTrainPeriod(trackName,
p1). Parameter trackName is taken from textFieldTrack2
and can be 'all', 'fast', 'regular' or the instanceName of the track. Param
is taken from textFieldCT1.
If buttonCreateTrain is pushed, send the signal createTrain(trackName),
where trackName is taken from TextFieldTrack2.
||Visualize all elements of the railway crossing in a dynamic manner
(i.e. show the trains moving, the gate opening and closing, ...).
||In a separate window, update the graphical information upon the reception
of on of the following signals:
- newGate(position); position = opened/closed
- newSignal(trackName, status); status = halt/go
- newTrainPos(trackName, position)
||Send an arbitrary signal.
||Upon pressing the buttonSend, send the signal and parameters
to the system as entered in textFieldG1.