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.

A Flexible Object-Oriented <strong>Software</strong> Architecture 117<br />

The following two sub-sections will discuss the <strong>de</strong>sign of the middleware<br />

framework and the product line architecture in <strong>de</strong>tail. These elements of the<br />

overall architecture, the actual subject of the project, are <strong>de</strong>signated by gray<br />

boxes in the diagram of Figure 9-3.<br />

4. THE MIDDLEWARE FRAMEWORK<br />

As stated in the previous section, the primary <strong>de</strong>sign goal of the middleware<br />

framework was an abstraction from specifics of the un<strong>de</strong>rlying OS, hardware,<br />

and – if possible – implementation language. To achieve this, a standardized,<br />

object-oriented API nee<strong>de</strong>d to be <strong>de</strong>signed, encapsulating OS and hardware<br />

specifics. This API had to be sufficiently generic to support different product<br />

lines and yet sufficiently specific to significantly facilitate application <strong>de</strong>velopment.<br />

The most reasonable-seeming approach to the <strong>de</strong>sign of the middleware<br />

framework consisted in mapping elements of the SWCD plat<strong>for</strong>m’s feature<br />

mo<strong>de</strong>l (see Figure 9-1) to classes (a small portion of the mo<strong>de</strong>l is shown in<br />

Figure 9-4) and packages. Generally, atomic features were turned into classes,<br />

composite features into packages. Additional packages and classes were<br />

created <strong>for</strong> elements not covered by the hardware feature mo<strong>de</strong>l but <strong>for</strong> which<br />

abstractions had to be provi<strong>de</strong>d, such as means <strong>for</strong> handling concurrency.<br />

Classes were interrelated using refinement/abstraction, implementation, and<br />

generic <strong>de</strong>pen<strong>de</strong>ncy relations. Relations were <strong>de</strong>fined in such a fashion that<br />

hardware/OS <strong>de</strong>pen<strong>de</strong>ncies were kept within as few classes as possible,<br />

reducing the ef<strong>for</strong>t posed by adding support <strong>for</strong> a new plat<strong>for</strong>m later on.<br />

Common base and <strong>de</strong>dicated interface classes were used to capture commonalities<br />

among components of a kind, such as stream- or message-based<br />

communications components/classes.<br />

We furthermore tried to follow a number of framework (and software architecture<br />

in general) <strong>de</strong>sign gui<strong>de</strong>lines [5, 6], reduced <strong>de</strong>pen<strong>de</strong>ncies among<br />

packages to improve the ability to <strong>de</strong>velop packages separately from each<br />

other, and applied various <strong>de</strong>sign patterns [7, 8].<br />

As <strong>for</strong> abstraction from hardware and OS specifics, besi<strong>de</strong>s differences<br />

in the way, e.g., components are accessed, the OS-level support <strong>for</strong> specific<br />

components might vary or even be missing. Furthermore, there were<br />

components (such as GSM mo<strong>de</strong>ms or GPS modules) which are only<br />

rudimentarily supported at OS level (via generic drivers) – <strong>for</strong> these, the<br />

middleware framework should provi<strong>de</strong> a uni<strong>for</strong>m, higher-level API, also<br />

abstracting from specific mo<strong>de</strong>ls of a given type of component.<br />

To this end, the framework <strong>de</strong>sign had to accommodate three dimensions<br />

of variability:<br />

varying operating systems;

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

Saved successfully!

Ooh no, something went wrong!