29.01.2015 Views

Embedded Software for SoC - Grupo de Mecatrônica EESC/USP

Embedded Software for SoC - Grupo de Mecatrônica EESC/USP

Embedded Software for SoC - Grupo de Mecatrônica EESC/USP

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

120 Chapter 9<br />

the tracker application was to be <strong>de</strong>ployed should be allowed to vary significantly,<br />

both with respect to core components (processor, OS) and <strong>de</strong>pen<strong>de</strong>ncy<br />

on specific auxiliary components. This means that the product line had to<br />

accommodate products ranging from, e.g., multiply-connected SWCDs (via<br />

GSM/GPRS and further means) to the extreme of isolated <strong>de</strong>vices that only<br />

per<strong>for</strong>m data logging.<br />

Since the handling of hardware specifics is <strong>de</strong>legated to the middleware,<br />

product line mo<strong>de</strong>ling can focus on merely using the components supported<br />

by the middleware framework and accounting <strong>for</strong> configurability rather than<br />

also having to cope with hardware and OS specifics.<br />

While UML lacks the means to natively <strong>de</strong>al with variability and configurability,<br />

an intuitive, stereotype-based notation was suggested by Clauß [10],<br />

which became the approach chosen to represent the product line’s variability<br />

in UML (<strong>for</strong> an example, see the use case diagram of Figure 9-5).<br />

A number of advanced techniques <strong>for</strong> achieving implementation-level<br />

configurability were consi<strong>de</strong>red and evaluated, including composition filters,<br />

aspect-oriented programming, subject-oriented programming, and generative<br />

programming. However, all of these approaches require either a particular<br />

implementation language or <strong>de</strong>dicated tools to be put into practice. The<br />

resulting lack in flexibility and the run-time overhead of some of these<br />

concepts ma<strong>de</strong> us take a simpler yet language- and tool-in<strong>de</strong>pen<strong>de</strong>nt approach,<br />

exploiting specifics of the variabilities encountered in the tracker application’s<br />

specification.<br />

Compared to software product lines sold as stand-alone products, the tracker<br />

application’s variability was special in that available hardware features<br />

<strong>de</strong>termined the software features to be provi<strong>de</strong>d – further arbitrary restrictions<br />

were neither planned nor required. This fact effectively reduced the complexity<br />

of the variability requirements by binding software features to hardware<br />

features – which were, <strong>for</strong> the most part, mo<strong>de</strong>led as classes in the middleware<br />

framework.<br />

Based on these consi<strong>de</strong>rations, a number of techniques were selected and<br />

combined in our approach:<br />

specialization through inheritance (based on interfaces and base classes<br />

provi<strong>de</strong>d by the middleware) and the Factory pattern [6]<br />

instantiation and passing of objects con<strong>for</strong>ming to certain interfaces and<br />

base classes – or lack thereof – were used to <strong>de</strong>termine whether or not<br />

certain software features are to be present<br />

instantiation of thread classes associated with particular types of components<br />

with strict encapsulation of component-specific functionality, <strong>de</strong>pen<strong>de</strong>nt<br />

on whether or not instances of the respective component classes were<br />

created and passed to the constructor of a central, coordinating thread class<br />

optimization by the compiler/linker, preventing unused classes’ co<strong>de</strong> from<br />

being inclu<strong>de</strong>d in the application’s binary<br />

use of a configuration object [5] to handle parametric variabilities (such<br />

as timeouts, queue lengths, etc.)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!