root / trunk / code / projects / colonet / robot / colonet_dragonfly / colonet_dragonfly.h @ 519
History | View | Annotate | Download (822 Bytes)
1 |
/** @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 |
#define COLONET_DRAGONFLY_H_
|
9 |
|
10 |
#include <colonet_defs.h> |
11 |
|
12 |
/**
|
13 |
*/
|
14 |
int colonet_init(void); |
15 |
|
16 |
/** @brief Registers a new colonet message handler function. If a message
|
17 |
* with msgId is received, then handler will be called.
|
18 |
*
|
19 |
* @param msgId The message id of the handler to be registered. Must be
|
20 |
* between USER_DEFINED_MSG_ID_START and USER_DEFINED_MSG_ID_END
|
21 |
* @param handler The function to be called if a colonet packet with message
|
22 |
* id msgId is received
|
23 |
*
|
24 |
* @return -1 on error (invalid msgId), 0 on success
|
25 |
*/
|
26 |
int colonet_add_message(unsigned char msgId, void (*handler)(void)); |
27 |
|
28 |
void request_abs_position(void); |
29 |
void get_absolute_position(int* x, int* y); |
30 |
|
31 |
#endif
|