core/bot.h File Reference

#include "device.h"

Include dependency graph for bot.h:


Functions

gboolean bot_initialize ()
gboolean bot_initialize_from_file (const gchar *filename)
BotDriverbot_get_driver (const gchar *driver_name)
BotDevicebot_get_device (const gchar *device_name)
void bot_mainloop ()
void bot_shutdown ()
void bot_register_device (BotDevice *device)

Function Documentation

BotDevice* bot_get_device ( const gchar *  device_name  ) 

Get a device by name.

Retrieve a registered device by name. The device will have been created already either by parsing a configuration file or by creating devices programmatically with bot_device_new and then registering them with bot_register_device.

Why is there this split?

Parameters:
device_name The name of the device
Returns:
The device requested, or NULL if it could not be located
Examples:
basic.c, and simple_controller.c.

BotDriver* bot_get_driver ( const gchar *  driver_name  ) 

Get a driver by name.

This returns the named driver, loading it as necessary.

Parameters:
driver_name The name of the driver
Returns:
The requested driver or NULL if it could not be located or initialized
Examples:
creating_devices_programmatically.c.

gboolean bot_initialize (  ) 

Initialize the devbot library.

This should be called before anything else.

Returns:
TRUE if initialization was successful, or FALSE otherwise.
Examples:
creating_devices_programmatically.c.

gboolean bot_initialize_from_file ( const gchar *  filename  ) 

Initialize the devbot library consulting a configuration file.

Parameters:
filename the configuration file to consult
Returns:
TRUE if initialization was successful, or FALSE otherwise.
Examples:
basic.c, and simple_controller.c.

void bot_mainloop (  ) 

Enter the devbot mainloop

Currently a NOP

void bot_register_device ( BotDevice device  ) 

Register a device

This is left optional so that users who don't care to use it can just ignore it. By so doing, they take on the responsibility of calling bot_device_free() at the end of a device's lifetime.

TODO: Review this decision

void bot_shutdown (  ) 

Shutdown the devbot library

It is not essential to call this before exiting your application, but frees internal data structures which can be useful in conjunction with memory checkers such as Valgrind.

Examples:
basic.c, creating_devices_programmatically.c, and simple_controller.c.


(c) 2006 Edinburgh Robotics Ltd.
Generated on Fri Feb 2 11:24:04 2007 for libbot by doxygen 1.5.1