Finite-State Machines (FSM)
Let us focus on the ActionLogic components that contain the logic for the X-ray requests and actions. Use itemis CREATE to make an imperative/operational specification of its behavior using finite-state machines.
The external interface of your statechart should be:
interface request:
// the integer selects the projection. 0 = frontal, 1 = lateral and 2 = biplane
in event startLowVideo: integer
in event stopLowVideo: integer
in event startHighVideo: integer
in event stopHighVideo: integer
interface controller:
// the integer selects the projection. 0 = frontal, 1 = lateral and 2 = biplane
out event activateLowVideo: integer
out event activateHighVideo: integer
out event deactivate
The value (the integer) of an event identifies a specific projection.
Event values can be used in itemis CREATE as in the following example that directly forwards the value of an incoming event to an outgoing event:
request.startLowVideo
/ raise controller.activateLowVideo : valueof(request.startLowVideo)
You can assume that the startLowVideo
and stopLowVideo
requests alternate for each specific projection,
similarly for the startHighVideo
and stopHighVideo
. You have to take into account that there can be
multiple ongoing requests for low video with different projections, possibly mixed with multiple ongoing
requests for high video with different projections.
Hints
- Make sure your diagram gives an insightful overview of the system.
- You can put multiple
raise
actions on the same transition. - Start by modeling the situation in which, at most, 1 pedal is pressed at the same time before modeling combinations of pedal presses.
- The assignment leaves some degrees of freedom in the logic to be modeled. If your model tends to get very complicated, then please revisit the modeling decisions that you have made.
Submission
You need to hand in two itemis models:
- FSM model for a 1-plane system.
- In this model, the values of the events can be ignored.
- FSM model for a 2-plane system.
- In this model, the value of the events needs to be considered.
- Use the interface that was given above. You do not need explicit toggle selection requests.
For each itemis model, hand in the following items:
- itemis CREATE project (as it is in the repository)
- Screenshot of graphical statechart (included in pdf or markdown document)
- Textual modeling decisions as a pdf or markdown document (see the important remark in the Introduction)
To submit, create a 5-fsm
directory in your GitLab repository, and upload your models there.
Both models should have their own sub-directory.
Instructions on how to import the itemis CREATE projects
can be found below.