Project

General

Profile

Statistics
| Revision:

root / trunk / code / projects / libwireless / lib / wl_basic.h @ 1380

History | View | Annotate | Download (1.28 KB)

1
/**
2
 * @file wl_basic.h
3
 * @brief High Level Wireless Packet Sending-Receiving Functions
4
 *
5
 * Abstracted wireless functionality for sending and receiving packets
6
 *
7
 * @author Christopher Mar, Colony Project, CMU Robotics Club
8
 **/
9

    
10
/**
11
 * @defgroup wl_basic Wireless Basic
12
 * @brief Wireless abstraction for easily sending and receing packets.
13
 *
14
 * A high level abstraction of the wireless library.
15
 *
16
 * This will allow you to easily send and receive packets.
17
 *
18
 * @{
19
 **/
20

    
21
#ifndef WL_BASIC_H
22
#define WL_BASIC_H
23

    
24
#include <wireless.h>
25

    
26
#define WL_BASIC_GROUP 8
27

    
28
/** @brief init wireless for Basic Group **/
29
int wl_basic_init( void (*handle_receive) (char type, int source, unsigned char* packet, int length) );
30
/** @brief internal function to register a packet handler function **/
31
void wl_basic_register_handler( void (*handle_receive) (char type, int source, unsigned char* packet, int length) );
32
/** @brief send a packet to a single robot in Basic Group **/
33
void wl_basic_send_robot_packet( char type, char* data, int len, int dest );
34
/** @brief send a packet to all robots in Basic Group **/
35
void wl_basic_send_global_packet( char type, char* data, int len );
36

    
37
/** @brief PacketGroupHandler struct for Basic Group **/
38
PacketGroupHandler wl_basic_group_handler;
39

    
40
/** @} **/ // end defgroup
41

    
42
#endif
43