Architectural overview
This page outlines the key concepts behind DevBot.Drivers, Devices and Interfaces
The three key concepts underlying DevBot are: drivers, devices and interfaces.Drivers
A driver provides support for a specific type of hardware connected in a specific way. Drivers are loaded dynamically at program execution time in response to requests from the configuration file parser or bot_get_driver() calls. At present drivers must be on the system LD_LIBRARY_PATH or in the current working directory. Drivers are represented by the opaque BotDriver data type.Devices
A driver's only purpose in life is to act as a factory for devices. A device represents a specific hardware item of the given type. The relationship between drivers and devices is therefore one-to-many. Device creation is encapsulated by the bot_device_new() function. As well as requiring a driver to be specified bot_device_new() requres a BotDeviceConfiguration argument. Devices are represented by the opaque BotDevice data type.Interfaces
Finally, device objects can support multiple interfaces. An interface represents a class of functionality or capability of a given device as determined by the type of device it is, its configuration, its state etc. A simple example of an interface is distance.h. An interface can be requested from a device using the bot_device_get_interface() function. Interfaces are referenced by global variables of the opaque BotInterface type e.g. BotDistanceInterface.An analogy
For those familiar with object-oriented programming a loose analogy is this: drivers are classes and devices are instances (objects). DevBot's interfaces may be thought of as similar to and used as though they were the same as interfaces in Java or C#. However, DevBot's interfaces are somewhat more flexible in that they can vary between devices of the same class (i.e. using the same driver) due to configuration or environmental considerations.So, for example if a particular device is configured with postion and orientation data, it might subsequently provide an interface exposing this in a uniform way.
API Conventions
Naming convention
Functions are prefixed by "bot_". Types are prefixed by "Bot". Global variables and constants are prefixed by "BOT_".Header locations
Relationship with Glib
DevBot utilizes Glib, the GNU utility library. For portability reasons we use its data types. It is strongly recommended that you consult the Glib documentation which may be found athttp://developer.gnome.org/doc/API/glib/
(c) 2006 Edinburgh Robotics Ltd.
Generated on Fri Feb 2 11:24:07 2007 for libbot by doxygen 1.5.1