00001
00035 #ifndef WIRELESS_H
00036 #define WIRELESS_H
00037
00038
00039
00043
00044
00045
00046
00047 #define WL_MAX_PACKET_GROUPS 16
00048
00079
00080
00081
00082 typedef struct
00083 {
00089
00090
00091 unsigned int groupCode;
00092
00097 void (*timeout_handler) (void);
00098
00108 void (*handle_response) (int frame, int received);
00109
00119 void (*handle_receive) (char type, int source, unsigned char* packet, int length);
00120
00124 void (*unregister) (void);
00125
00126 } PacketGroupHandler;
00127
00129 int wl_init(void);
00131 void wl_terminate(void);
00133 void wl_do(void);
00135 void wl_register_packet_group(PacketGroupHandler* h);
00137 void wl_unregister_packet_group(PacketGroupHandler* h);
00138
00140 int wl_send_robot_to_robot_global_packet(char group, char type, char* data, int len, int dest, char frame);
00142 int wl_send_robot_to_robot_packet(char group, char type, char* data, int len, int dest, char frame);
00144 int wl_send_global_packet(char group, char type, char* data, int len, char frame);
00146 void wl_send_pan_packet(char group, char type, char* data, int len, char frame);
00147
00149 int wl_set_pan(int pan);
00151 int wl_get_pan(void);
00153 int wl_set_channel(int channel);
00155 int wl_get_channel(void);
00157 int wl_get_xbee_id(void);
00159 void wl_set_com_port(char* port);
00160
00162
00163 #endif
00164