Revision 9d6ce1e385132dbc606744769c3bbe8464015198 (click the page title to view the current version)
Behavioral Modeling - Power Window
Modeling variability and structures with variability
Feature modeling
Metamodel
Model
Structural modeling
Metamodel
Model
Commands and requests.
Window motor
Window controller
Variability in structural models
Linking the feature with the optional component (structural variability)
The component pinchDetector is only required if we
support the feature pinchProtection.
Disabling
objectDetected port
Without the feature pinchProtection, the port
objectDetected should be inactive. Having the feature will
allow receiving the signal objectDetected.
Alphabet variability
The user request expressUp is only available when the
feature express is present.
Variability in Behavior Using Inheritance
Two kinds of window controllers:
With continuous chime
With intermittent chime
Variability in Behavior Using Strategy Pattern
We first define an abstract chiming strategy: chiming can be
audible but only if active (expressed by
nesting).
Concrete strategies:
Now we can parameterize the controller with a chiming strategy. Chiming should be active when moving up in express mode. The chime should be emitted only when the chiming is audible.
We can choose the chiming strategy using the following constraint:
