#include <wireless.h>
Data Fields | |
unsigned int | groupCode |
void(* | timeout_handler )(void) |
void(* | handle_response )(int frame, int received) |
void(* | handle_receive )(char type, int source, unsigned char *packet, int length) |
void(* | unregister )(void) |
A PacketGroupHandler represents a packet group, and is used to register a packet group with the wireless library. It contains handlers for various events which can occur related to a packet group.
unsigned int PacketGroupHandler::groupCode |
The group code for this packet group. This number must be unique. The maximum number of packet groups is defined by WL_MAX_PACKET_GROUPS.
Referenced by wl_basic_register_handler(), wl_register_packet_group(), and wl_unregister_packet_group().
void(* PacketGroupHandler::handle_receive)(char type, int source, unsigned char *packet, int length) |
Called when we receive a packet from this group.
type | the packet type | |
source | the 16-bit address of the XBee this packet was sent from | |
packet | the packet received | |
length | the length of the packet |
Referenced by wl_basic_register_handler(), and wl_do().
void(* PacketGroupHandler::handle_response)(int frame, int received) |
Called when a transmit status packet is received from the XBee where the first four bits of the frame are the group code.
frame | the last four bits of the frame | |
received | is true if we received an ack, 0 if we did not. |
Referenced by wl_basic_register_handler(), and wl_do().
void(* PacketGroupHandler::timeout_handler)(void) |
Called every half second (not in interrupt, but in wl_do).
Referenced by wl_basic_register_handler().
void(* PacketGroupHandler::unregister)(void) |
Called for any cleanup when the network is turned off.
Referenced by wl_basic_register_handler(), wl_terminate(), and wl_unregister_packet_group().