root / trunk / code / lib / include / libwireless / wl_token_ring.h @ 48
History | View | Annotate | Download (1.53 KB)
1 | 18 | bcoltin | /**
|
---|---|---|---|
2 | * @file wl_token_ring.h
|
||
3 | * @brief Declarations for the token ring packet group
|
||
4 | *
|
||
5 | * Contains declarations for the token ring packet group.
|
||
6 | *
|
||
7 | * @author Brian Coltin, Colony Project, CMU Robotics Club
|
||
8 | **/
|
||
9 | |||
10 | /**
|
||
11 | * @defgroup tokenring Token Ring
|
||
12 | * @brief Wireless library token ring implementation
|
||
13 | *
|
||
14 | * This packet group is used to form a token ring, which
|
||
15 | * keeps track of the relative directions of the robots
|
||
16 | * from one another.
|
||
17 | *
|
||
18 | * @{
|
||
19 | **/
|
||
20 | |||
21 | /**@brief Register the token ring group with the wireless library.**/
|
||
22 | void wl_token_ring_register(void); |
||
23 | /**@brief Unregister the token ring group with the wirelss library.**/
|
||
24 | void wl_token_ring_unregister(void); |
||
25 | /**@brief Set the functions called to turn the bom on and off.**/
|
||
26 | void wl_token_ring_set_bom_functions(void (*on_function) (void), |
||
27 | void (*off_function) (void), int (*max_bom_function) (void)); |
||
28 | /**@brief Join the token ring **/
|
||
29 | void wl_token_ring_join(void); |
||
30 | /**@brief Leave the token ring **/
|
||
31 | void wl_token_ring_leave(void); |
||
32 | /**@brief Request a BOM flash from the specified robot **/
|
||
33 | void wl_token_request(int robot); |
||
34 | /**@brief Return the latest BOM reading between two robots **/
|
||
35 | int wl_token_get_sensor_reading(int source, int dest); |
||
36 | /**@brief Return the latest BOM reading between us and another robot **/
|
||
37 | int wl_token_get_my_sensor_reading(int dest); |
||
38 | 48 | jscheine | /**@brief Return the number of robots in the sensor matrix.*/
|
39 | int wl_token_get_num_robots(void); |
||
40 | /**@brief Return the number of non-null elements in the sensor matrix*/
|
||
41 | int wl_token_get_matrix_size(void); |
||
42 | 18 | bcoltin | |
43 | /** @} **/ //end token ring group |