Project

General

Profile

Statistics
| Revision:

root / trunk / code / projects / colonet / robot / colonet_dragonfly / colonet_dragonfly.h @ 680

History | View | Annotate | Download (869 Bytes)

1 11 emarinel
/** @file colonet.h
2
 * @brief Colonet library for colony robots
3
 * @author Eugene Marinelli
4
 * @date 10/26/06
5
 */
6
7
#ifndef COLONET_DRAGONFLY_H_
8 149 emarinel
#define COLONET_DRAGONFLY_H_
9 11 emarinel
10
#include <colonet_defs.h>
11
12 149 emarinel
/**
13 11 emarinel
 */
14 149 emarinel
int colonet_init(void);
15 11 emarinel
16 680 emarinel
/**
17
 */
18
void colonet_run(void (*step)(void));
19
20 11 emarinel
/** @brief Registers a new colonet message handler function.  If a message
21
 * with msgId is received, then handler will be called.
22 149 emarinel
 *
23 11 emarinel
 * @param msgId The message id of the handler to be registered.  Must be
24
 * between USER_DEFINED_MSG_ID_START and USER_DEFINED_MSG_ID_END
25
 * @param handler The function to be called if a colonet packet with message
26
 * id msgId is received
27 149 emarinel
 *
28 11 emarinel
 * @return -1 on error (invalid msgId), 0 on success
29
 */
30
int colonet_add_message(unsigned char msgId, void (*handler)(void));
31
32 519 emarinel
void request_abs_position(void);
33
void get_absolute_position(int* x, int* y);
34
35 11 emarinel
#endif