Difference between revisions of "Architecture:Specification of BABEL Interfaces"

From The BABEL Development Site
(Interfaces)
(Hardware Abstraction Drivers (HAD) interfaces)
Line 25: Line 25:
 
The next section (Modules) contains a list of existing modules and the corresponding implemented IFs.
 
The next section (Modules) contains a list of existing modules and the corresponding implemented IFs.
  
 +
=== DRV_IOBOARD ===
  
 +
<center>
 +
<table width="95%" border="1">
 +
<tr>
 +
<td align="center"><b><big>Interface name<br> (Names of service groups)</big></b></td>
 +
<td colspan="2" align="center"><b><big>BABEL services to implement</big></b></td>
 +
</tr>
 +
<tr>
 +
<td rowspan="8" align="center" valign="center">
 +
<big><code> DRV_IOBOARD  </code></big><br> <br>
 +
For devices with capabilities for at least one of the following: Controlling of sonars range sensors, servos, ADC and DAC.
 +
</td>
 +
<td> <!-- DECLARATION -->
 +
<cpp>
 +
::getCountADC(
 +
in short devIndex,
 +
out unsigned short count
 +
)
 +
</cpp>
 +
</td>
 +
<td> <!-- COMMENTS -->
 +
Returns the number of Analog-to-Digital converters (ADC) available as inputs on this device.
 +
</td>
 +
</tr>
  
 +
<tr>
 +
<td> <!-- DECLARATION -->
 +
<cpp>
 +
::getCountADC(
 +
in short devIndex,
 +
out unsigned short count
 +
)
 +
</cpp>
 +
</td>
 +
<td> <!-- COMMENTS -->
 +
Returns the number of Analog-to-Digital converters (ADC) available as inputs on this device.
 +
</td>
 +
</tr>
  
 +
</table>
 +
</center>
  
 
== Common Sensory Interface ==
 
== Common Sensory Interface ==

Revision as of 22:42, 17 May 2009

Previous: Overview Next: Modules


Interfaces

Overview

In this page we present a number of standardized interfaces (IFs) for each layer of modules in our architecture. One given module may implement only one or several such interfaces simultaneously, a specially common case in the HAD layer.

Each interface is implemented in one and only one BABEL service groups, whose services are specified here. Data types are given in the standard BABEL description language (BDL), with some small additions declared under the namespace BABEL::COMMON, as shown in this Appendix.

The input parameter "devIndex" deserves more discussion, since it solves the problem of multiple copies of hardware devices with just one software module. This parameter is a zero-based index which specifies which device is being referenced for each access. The number of different devices is stored in the RPD (see section 4). Only modules in layers 2 and 3 are supposed to know about this parameter, so high-level modules never need to worry about how many hardware devices are present on the robot.

Developers of HAD modules are strongly encouraged to do implement real support for "devIndex". For example, at module start-up, the RPD may be checked to discover how many devices are present on the robot and what are they parameters (configuration ".ini"-like text block). An internal list of objects can be hold within the BABEL module, one for each physical device, so each request is directed to the appropriate device.


Hardware Abstraction Drivers (HAD) interfaces

The next section (Modules) contains a list of existing modules and the corresponding implemented IFs.

DRV_IOBOARD

Interface name
(Names of service groups)
BABEL services to implement

DRV_IOBOARD

For devices with capabilities for at least one of the following: Controlling of sonars range sensors, servos, ADC and DAC.

<cpp>

getCountADC(

in short devIndex, out unsigned short count ) </cpp>

Returns the number of Analog-to-Digital converters (ADC) available as inputs on this device.

<cpp>

getCountADC(

in short devIndex, out unsigned short count ) </cpp>

Returns the number of Analog-to-Digital converters (ADC) available as inputs on this device.

Common Sensory Interface

Common Actions Interface