PacketGroupHandler Struct Reference
[Wireless]

#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

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.

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

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.

Parameters:
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().

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

Referenced by wl_basic_register_handler().

Called for any cleanup when the network is turned off.

Referenced by wl_basic_register_handler(), wl_terminate(), and wl_unregister_packet_group().


The documentation for this struct was generated from the following file:

Generated on Wed Sep 23 12:51:07 2009 for libwireless by  doxygen 1.6.1