Statistics
| Revision:

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

History | View | Annotate | Download (869 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
/**
17
 */
18
void colonet_run(void (*step)(void));
19

    
20
/** @brief Registers a new colonet message handler function.  If a message
21
 * with msgId is received, then handler will be called.
22
 *
23
 * @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
 *
28
 * @return -1 on error (invalid msgId), 0 on success
29
 */
30
int colonet_add_message(unsigned char msgId, void (*handler)(void));
31

    
32
void request_abs_position(void);
33
void get_absolute_position(int* x, int* y);
34

    
35
#endif