PacketGroupHandler Struct Reference
[WirelessWireless]

#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)


Detailed Description

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.


Field Documentation

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.

void(* PacketGroupHandler::handle_receive)(char type, int source, unsigned char *packet, int length)
 

Called when we receive a packet from this group.

Parameters:
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

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.

Parameters:
frame the last four bits of the frame
received is true if we received an ack, 0 if we did not.

void(* PacketGroupHandler::timeout_handler)(void)
 

Called every half second (not in interrupt, but in wl_do).

void(* PacketGroupHandler::unregister)(void)
 

Called for any cleanup when the network is turned off.


The documentation for this struct was generated from the following file:
Generated on Fri Sep 21 12:57:06 2007 for libwireless by  doxygen 1.4.6