Digi XBee(R) ANSI C Host Library
route.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012 Digi International Inc.,
3  * All rights not expressly granted are reserved.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
7  * You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343
10  * =======================================================================
11  */
21 #ifndef XBEE_ROUTE_H
22 #define XBEE_ROUTE_H
23 
24 #include "xbee/device.h"
25 
27 
30 #define XBEE_ROUTE_MAX_ADDRESS_COUNT 11
31 
33 #define XBEE_FRAME_CREATE_SOURCE_ROUTE 0x21
34 typedef XBEE_PACKED(xbee_frame_create_source_route_t,
35 {
37  uint8_t frame_type;
38 
40  uint8_t frame_id;
41 
43  addr64 ieee_address;
44 
46  uint16_t network_address_be;
47 
49  uint8_t route_options;
50  #define XBEE_ROUTE_OPTIONS_NONE 0x00
51 
54  uint8_t address_count;
55 
58  uint16_t route_address_be[XBEE_ROUTE_MAX_ADDRESS_COUNT];
60 
61 
63 #define XBEE_FRAME_ROUTE_RECORD_INDICATOR 0xA1
64 typedef XBEE_PACKED(xbee_frame_route_record_indicator_t,
65 {
67  uint8_t frame_type;
68 
70  addr64 ieee_address;
71 
73  uint16_t network_address_be;
74 
76  uint8_t receive_options;
77 
80  uint8_t address_count;
81 
84  uint16_t route_address_be[XBEE_ROUTE_MAX_ADDRESS_COUNT];
86 
87 int xbee_route_dump_record_indicator( xbee_dev_t *xbee,
88  const void FAR *frame, uint16_t length, void FAR *context);
89 
94 #define XBEE_ROUTE_DUMP_RECORD_INDICATOR \
95  { XBEE_FRAME_ROUTE_RECORD_INDICATOR, 0, \
96  xbee_route_dump_record_indicator, NULL }
97 
99 #define XBEE_FRAME_ROUTE_MANY_TO_ONE_REQ 0xA3
100 typedef XBEE_PACKED(xbee_frame_route_many_to_one_req_t,
103 {
105  uint8_t frame_type;
106 
108  addr64 ieee_address;
109 
111  uint16_t network_address_be;
112 
114  uint8_t reserved;
116 
117 int xbee_route_dump_many_to_one_req( xbee_dev_t *xbee,
118  const void FAR *frame, uint16_t length, void FAR *context);
119 
124 #define XBEE_ROUTE_DUMP_MANY_TO_ONE_REQ \
125  { XBEE_FRAME_ROUTE_MANY_TO_ONE_REQ, 0, \
126  xbee_route_dump_many_to_one_req, NULL }
127 
129 
130 // If compiling in Dynamic C, automatically #use the appropriate C file.
131 #ifdef __DC__
132  #use "xbee_route.c"
133 #endif
134 
135 #endif
136 
#define FAR
On platforms with "far" pointers, define to the proper keyword; empty definition if not required...
Definition: platform.h:396
#define XBEE_BEGIN_DECLS
Macro defined to.
Definition: platform.h:41
The many-to-one route request indicator frame is sent out the serial port whenever a many-to-one rout...
Definition: route.h:115
XBEE_FRAME_ROUTE_RECORD_INDICATOR (0xA1)
Definition: route.h:85
unsigned short uint16_t
16-bit unsigned integer
Definition: platform_config.h:41
unsigned char uint8_t
8-bit unsigned integer
Definition: platform_config.h:39
XBEE_FRAME_CREATE_SOURCE_ROUTE (0x21)
Definition: route.h:59
Typedef used to hold a 64-bit IEEE address, represented as 8 bytes, 4 16-bit values or 2 32-bit value...
Definition: types.h:34
Definition: device.h:361
#define XBEE_END_DECLS
Macro defined to.
Definition: platform.h:42
#define XBEE_ROUTE_MAX_ADDRESS_COUNT
Number of addresses that can appear in a Create Source Route request or a Route Record Indicator fram...
Definition: route.h:30