Main Page | Modules | Data Structures | File List | Data Fields

Alternating Bit Protocol

0.3

Package Contents

This package implements the Alternating Bit Protocal (AB-Protocol) in C with legOS/BrickOS system calls.

For more information on the alternating bit protocol, look here [FOLDOC]

The AB-protocol makes the communciations between Lego-RCXs reliable. The importance of a reliable protocol is undeniable since the standard communication primitives with LegOS/BrickOS, based on LNP guarantee only the integrity of packets, not their delivery.

This protocol implementation does not achive miracles : two bricks that are definately out of range will never communicate (unless using a nifty ad hoc protocol). The protocol will continue to try to send the message, and can notify the sender when the message was received.

This package is multi-threaded, robust, efficient and small (in that order).

The AB-Protocols interface

Three functions control the AB-Protocol : 1. The init_ab_protocol, which inits all data structures, 2. ab_swrite for synchronous message sending (the send function returns when the message is delivered) and 3. ab_awrite for asynchronous message sending (the send function returns immediately).

Look at the ab protocol interface module documentation for more details.

We used this implementation in highly asynchronous and multithreaded environment, and took special care to avoid race-conditions, this implementation should therefore be sufficiently robust to survive the more demanding developer.

License

This software is released under the Gnu Public License (GPL). Feel free.

Compiling

To compile the library, you must have legOS/BrickOS 0.2.6 (probably works with other versions too) and the h8300 cross-compiler (which is also needed to use legOS/BrickOS) installed.

Next, change LEGOS_ROOT in the Makefile in src/lib so it points to your legOS installation directory.

Launch Make to create the ablib.a library.

Any legos program should then #include "ab.h" (located in src/include) and the ablib.a file must be linked with the program.

Look at the example program.

Contacts/Version

Author:
Bram De Wachter (bdewacht a-t ulb d-o-t ac d-o-t be)

Nicolas Devos

Date:
April, 2004
Version:
0.3
Changelog


Generated on Sat Mar 12 16:18:17 2005 for Alternating Bit by doxygen 1.3.3