Example Project
5.2 First Revision in 2006
5.2.3 Adding a Personal Navigation Device
Besides the MP3 CD Player, the major addition to the automotive multimedia product line in the revision of 2006 is a GPS personal navigation system. The device can use positioning information from satellites to calculate the car’s terrestrial position and then calculate routes using the included mapping material. Maps are provided in the NavMap format and there is navigational information for many countries from across the world. An examplary excerpt of the NavMap file provided with the navigation system can be seen in Listing 5.3.
To receive user input, the digital controls of the navigation device will be integrated into the rest of the user interface system of the car. Furthermore, an optional voice recognition mechanism is offered, which decodes voice commands of the driver and uses them to configure the navigation device. To communicate navigational information as output, the device uses both the speaker system and the display of the car. In this regard, the navigation system is very similar to the audio player, which utilizes the same system components. Thus, the feature PersonalNavigation is best realized by applying the evolution Duplicate Feature to the feature AudioPlayer. However, only the direct feature should be cloned but none of its descendants.
This option has to be reflected in the configuration dialog of the evolution. The process of applying Duplicate Feature to the feature AudioPlayer is shown in Figure 5.12.
The adequate remapping to duplicating a feature is to copy the feature mapping from the original to the newly created feature. In the concrete case, only the mappings to the speakers and volume control have to be copied. The display belongs to the core of the product line and mappings to the audio player class in the UML diagram and its outgoing associations are specific to the AudioPlayer feature. Thus, these mappings will not be reused in the Personal-Navigation feature so that they are excluded from the Copy Feature Mapping operation in the remapping dialog. In Figure 5.13, a screenshot of the remapping dialog for Copy Feature Mapping displaying the described configuration is shown. In Table 5.6, the resulting changes to the mapping model are displayed.
Table 5.6: Changes to the mapping model due to applying Duplicate Feature to the feature AudioPlayer.
The voice recognition feature is to be added as logical child of the personal navigation feature. For this purpose, an empty childgroup for the feature PersonalNavigation is created manually. With this group selected, the evolution Insert Feature is executed to create a new optional feature with a specified name. The same evolution is used to create the Maps feature, which represents the mapping material provided along with the navigation device. However, it is
Listing 5.3: Examplary excerpt from the NavMap file provided with the personal navigation
not possible to operate the navigation system without mapping material so that the Maps feature has to be made mandatory. This is done by using the evolution Transform to Mandatory Feature on the feature Maps. Furthermore, the group containing both newly created features requires its cardinality to be set to allow adequate selection of its features. This is done by applying the evolution Transform to And Group, which sets the minimum and maximum cardinality in a way that mandatory features have to be selected and optional features may be selected. An excerpt of the feature model reflecting the summary of these changes is displayed in Figure 5.14.
After adding new features and duplicating reusable parts of the existing realization, elements
Figure 5.12: Applying Duplicate Feature to the feature AudioPlayer.
a) screenshot of selecting the menu entry for the evolution
b) screenshot of the configuration dialog of the evolution
c) excerpt from the feature model showing the effects of the evolution
specific to the personal navigation device have to be incorporated into the solution space of the product line. For one, this is done on the design level in the UML diagram. The classes PersonalNavigation and VoiceRecognition are added along with their various incoming and outgoing associations. An excerpt from the UML diagram displaying the added elements is shown in Figure 5.15.
In addition, code is added to the Java class for the UI builder to create the user interface for the personal navigation device. The modified version of the source code is displayed in Listing 5.4.
After these modifications, the feature VoiceRecognition is mapped manually to the UML class with the same name and its outgoing association. The feature PersonalNavigation is mapped to its respective class and the outgoing associations to the speakers and the display as well as the incoming association from the user interface. Furthermore, the PersonalNavigation feature is also mapped to the respective lines of source code in the Java file for the UI builder that create the user interface for the personal navigation device. In addition, the feature Maps is mapped to the contents of the NavMap file. The relevant parts of the resulting mapping model are displayed in Table 5.7.
With these changes to the automotive multimedia product line, a personal navigation system can now be chosen as configuration option when purchasing the MAXI Cheetah.
Figure 5.13: Remapping dialog after applying Duplicate Feature to the feature AudioPlayer.
Figure 5.14: Excerpt from the feature model showing the newly created features Voice-Recognition and Maps.
Figure 5.15: Excerpt from the UML diagram showing the elements relevant to the personal navigation system.
+receiveVoiceCommand() PersonalNavigation VoiceRecognition
UserInterface Display
Speakers
Listing 5.4: Manually modified version of the Java source code of the method createUI() of the class UIBuilder.
public UserInterface createUI() {
UserInterface ui = new UserInterface();
//...
//build PersonalNavigation menu (block 3) Menu personalNavigationMenu = new Menu();
personalNavigationMenu.setName("Personal Navigation");
//...
ui.addMenu(personalNavigationMenu);
return ui;
}
Table 5.7: Manual changes to the mapping model to incorporate elements specific to the personal