Difference between revisions of "DevGuide/DesignOverview"

From PaparazziUAV
Jump to navigation Jump to search
Line 19: Line 19:


=== Modularity ===
=== Modularity ===
[[Image:modularity.png]]
   -Separation of concerns
   -Separation of concerns
   -Maintenability
   -Maintenability
   -Interface
   -Interface
   -C provide no dedicated mechanism for modularity
   -C provide no dedicated mechanism for modularity
   -Main issues with modularity are modules configuration and dependancies
   -Main issues with modularity are configuration and dependancies
 
[[Image:dependancies_example.png]]
 
=== Hardware abstraction ===
 
  -Segregate hardware dependant modules
 
[[Image:hardware_abstraction.png]]
 
 
=== Runtime Efficiency ===
 
  bad :
<nowiki>
switch(UART) {
  case UART0 : UARTO_write(...); break;
  case UART1 : UART1_write(...); break;
}
</nowiki>
<nowiki>
good :
#define UartWrite(x) UART ## _write(x)
 
UartWrite(...);
</nowiki>

Revision as of 06:21, 13 May 2008

Functional Diagram

Functional diagram.png


Design Goals

-Static approach
-Modularity
-Hardware absraction
-Runtime efficiency

Static Approach

 -only "things that needs to be changed during flight are changeable
 -maximise compilation time resolutions
 advantages
   Error checking
   Efficiency
   Safety/Robustness

Modularity

Modularity.png

 -Separation of concerns
 -Maintenability
 -Interface
 -C provide no dedicated mechanism for modularity
 -Main issues with modularity are configuration and dependancies

Dependancies example.png

Hardware abstraction

 -Segregate hardware dependant modules

Hardware abstraction.png


Runtime Efficiency

 bad :

switch(UART) { case UART0 : UARTO_write(...); break; case UART1 : UART1_write(...); break; } good : #define UartWrite(x) UART ## _write(x) UartWrite(...);