Revision 1823
new doxygen for libwireless
group__xbee.html | ||
---|---|---|
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
|
2 |
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
|
3 |
<title>Colony: XBee</title> |
|
4 |
<link href="tabs.css" rel="stylesheet" type="text/css"> |
|
5 |
<link href="doxygen.css" rel="stylesheet" type="text/css"> |
|
6 |
</head><body> |
|
7 |
<!-- Generated by Doxygen 1.5.8 --> |
|
1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
2 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
|
3 |
<head> |
|
4 |
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
|
5 |
<title>libwireless: XBee</title> |
|
6 |
<link href="tabs.css" rel="stylesheet" type="text/css"/> |
|
7 |
<link href="doxygen.css" rel="stylesheet" type="text/css"/> |
|
8 |
</head> |
|
9 |
<body> |
|
10 |
<!-- Generated by Doxygen 1.6.3 --> |
|
8 | 11 |
<div class="navigation" id="top"> |
9 | 12 |
<div class="tabs"> |
10 | 13 |
<ul> |
11 | 14 |
<li><a href="index.html"><span>Main Page</span></a></li> |
12 | 15 |
<li><a href="modules.html"><span>Modules</span></a></li> |
16 |
<li><a href="annotated.html"><span>Data Structures</span></a></li> |
|
13 | 17 |
<li><a href="files.html"><span>Files</span></a></li> |
14 | 18 |
</ul> |
15 | 19 |
</div> |
16 | 20 |
</div> |
17 | 21 |
<div class="contents"> |
18 |
<h1>XBee</h1>Interface with the XBee module.
|
|
19 |
<a href="#_details">More...</a>
|
|
20 |
<p> |
|
22 |
<h1>XBee</h1> |
|
23 |
<p>Interface with the XBee module.
|
|
24 |
<a href="#_details">More...</a></p>
|
|
21 | 25 |
<table border="0" cellpadding="0" cellspacing="0"> |
22 |
<tr><td></td></tr> |
|
23 |
<tr><td colspan="2"><br><h2>Modules</h2></td></tr> |
|
24 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee__const.html">xbee constants</a></td></tr> |
|
26 |
<tr><td colspan="2"><h2>Modules</h2></td></tr> |
|
27 |
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee__const.html">xbee constants</a></td></tr> |
|
25 | 28 |
|
26 |
<tr><td colspan="2"><br><h2>Functions</h2></td></tr> |
|
27 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g2fbd69862a11b6bcc5cfdb9f182bcdb9">xbee_send_read_at_command</a> (char *command)</td></tr> |
|
29 |
<p><tr><td class="mdescLeft"> </td><td class="mdescRight"><p>These are constants used for the xbee module. </p> |
|
30 |
<br/></td></tr> |
|
31 |
</p> |
|
32 |
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee__funcs.html">Xbee Functions</a></td></tr> |
|
28 | 33 |
|
29 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g3d5fbb6aae8dda99240ec38108a645af">xbee_lib_init</a> (void)</td></tr> |
|
34 |
<p><tr><td class="mdescLeft"> </td><td class="mdescRight"><p>These are the public xbee functions. </p> |
|
35 |
<br/></td></tr> |
|
36 |
</p> |
|
37 |
<tr><td colspan="2"><h2>Defines</h2></td></tr> |
|
38 |
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#ga614217d263be1fb1a5f76e2ff7be19a2">PORT</a> UDR1</td></tr> |
|
39 |
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaf8bfae90c5d6853fcfb487e05b9f50c8"></a><!-- doxytag: member="xbee::FLAG" ref="gaf8bfae90c5d6853fcfb487e05b9f50c8" args="" --> |
|
40 |
#define </td><td class="memItemRight" valign="bottom"><b>FLAG</b> (UCSR1A & (1<<RXC1))</td></tr> |
|
41 |
<tr><td colspan="2"><h2>Functions</h2></td></tr> |
|
42 |
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae6e8a8009a9ae0c59f25a496d1cf5a84"></a><!-- doxytag: member="xbee::ISR" ref="gae6e8a8009a9ae0c59f25a496d1cf5a84" args="(USART1_RX_vect)" --> |
|
43 |
</td><td class="memItemRight" valign="bottom"><b>ISR</b> (USART1_RX_vect)</td></tr> |
|
44 |
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gafe6b2efc8b84d41b224b65fe9a9b0f70"></a><!-- doxytag: member="xbee::xbee_basic_buf_add" ref="gafe6b2efc8b84d41b224b65fe9a9b0f70" args="(uint8_t *ptr, uint8_t byte)" --> |
|
45 |
int8_t </td><td class="memItemRight" valign="bottom"><b>xbee_basic_buf_add</b> (uint8_t *ptr, uint8_t byte)</td></tr> |
|
46 |
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga3aa01c87cec1f5836297de808c82a405"></a><!-- doxytag: member="xbee::xbee_basic_buf_get" ref="ga3aa01c87cec1f5836297de808c82a405" args="(uint8_t *ptr)" --> |
|
47 |
uint8_t </td><td class="memItemRight" valign="bottom"><b>xbee_basic_buf_get</b> (uint8_t *ptr)</td></tr> |
|
48 |
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga344c1c7c8bbd9bdb4903d3e9443edbbd"></a><!-- doxytag: member="xbee::xbee_other_buf_add" ref="ga344c1c7c8bbd9bdb4903d3e9443edbbd" args="(uint8_t *ptr, uint8_t byte)" --> |
|
49 |
int8_t </td><td class="memItemRight" valign="bottom"><b>xbee_other_buf_add</b> (uint8_t *ptr, uint8_t byte)</td></tr> |
|
50 |
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gac4c5f6ba46371313200945e6456a9942"></a><!-- doxytag: member="xbee::xbee_other_buf_get" ref="gac4c5f6ba46371313200945e6456a9942" args="(uint8_t *ptr)" --> |
|
51 |
uint8_t </td><td class="memItemRight" valign="bottom"><b>xbee_other_buf_get</b> (uint8_t *ptr)</td></tr> |
|
52 |
<tr><td class="memItemLeft" align="right" valign="top">int8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#ga335b40b15f89a8a0d26db9226812914e">check_last_receive</a> (uint16_t source, uint8_t framenum)</td></tr> |
|
53 |
<tr><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#ga8a4c7ae8201a7ca230fdb47bfa13d044">getStatus</a> (uint8_t mask)</td></tr> |
|
54 |
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaff39fc829e5307a35a062bcc6fac616f"></a><!-- doxytag: member="xbee::setStatus" ref="gaff39fc829e5307a35a062bcc6fac616f" args="(uint8_t mask, uint8_t value)" --> |
|
55 |
void </td><td class="memItemRight" valign="bottom"><b>setStatus</b> (uint8_t mask, uint8_t value)</td></tr> |
|
56 |
<tr><td class="memItemLeft" align="right" valign="top">int8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#ga31a4df97d6865a40123337045109b9f1">xbee_init</a> ()</td></tr> |
|
57 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize the XBee library. <a href="#ga31a4df97d6865a40123337045109b9f1"></a><br/></td></tr> |
|
58 |
<tr><td class="memItemLeft" align="right" valign="top">int8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#ga3fe446135ba896e6438a4fcd67154119">xbee_terminate</a> ()</td></tr> |
|
59 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Uninitialize the XBee library. <a href="#ga3fe446135ba896e6438a4fcd67154119"></a><br/></td></tr> |
|
60 |
<tr><td class="memItemLeft" align="right" valign="top">int8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#gaf29617dd4988f4b056f9476004ae5cbf">xbee_putc</a> (uint8_t c)</td></tr> |
|
61 |
<tr><td class="memItemLeft" align="right" valign="top">int16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#ga409ff62ddd9e22eaf745a50f688263fd">xbee_getc</a> (void)</td></tr> |
|
62 |
<tr><td class="memItemLeft" align="right" valign="top">int8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#gae564a6f5453934b0234a054fbc238fd3">xbee_getc_nb</a> (uint8_t *c)</td></tr> |
|
63 |
<tr><td class="memItemLeft" align="right" valign="top">int8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#gae75ee9a54a5811b8bc302dc2d70f0215">xbee_sendc</a> (uint8_t byte)</td></tr> |
|
64 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Send byte to the xbee in API mode. <a href="#gae75ee9a54a5811b8bc302dc2d70f0215"></a><br/></td></tr> |
|
65 |
<tr><td class="memItemLeft" align="right" valign="top">int8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#ga5805e267e3b6f4b7bdad7aa6dc65ee04">xbee_send</a> (uint8_t *buf, uint16_t size)</td></tr> |
|
66 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Send an array of bytes to the xbee in API mode. <a href="#ga5805e267e3b6f4b7bdad7aa6dc65ee04"></a><br/></td></tr> |
|
67 |
<tr><td class="memItemLeft" align="right" valign="top">int8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#ga2eb96c49811a1d9f2ccd1e1186915077">xbee_checksum_add</a> (uint8_t *buf, uint8_t len, uint8_t *sum)</td></tr> |
|
68 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Add a buffer to the checksum value. <a href="#ga2eb96c49811a1d9f2ccd1e1186915077"></a><br/></td></tr> |
|
69 |
<tr><td class="memItemLeft" align="right" valign="top">int8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#ga2a39ffce83d65d22aeefb41dfce2112f">xbee_send_header</a> (uint16_t len)</td></tr> |
|
70 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Send a frame header to the xbee. <a href="#ga2a39ffce83d65d22aeefb41dfce2112f"></a><br/></td></tr> |
|
71 |
<tr><td class="memItemLeft" align="right" valign="top">int8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#ga2694f3530e4cf256ff9e96600aea753c">xbee_send_read_at_command</a> (uint8_t *command)</td></tr> |
|
72 |
<tr><td class="memItemLeft" align="right" valign="top">int8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#gaae54f7208cfa786cb56d4d78ab3ceffe">xbee_send_packet</a> (uint8_t *packet, uint8_t len, uint16_t dest, uint8_t options, uint8_t frame)</td></tr> |
|
73 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Send a packet to the XBee. <a href="#gaae54f7208cfa786cb56d4d78ab3ceffe"></a><br/></td></tr> |
|
74 |
<tr><td class="memItemLeft" align="right" valign="top">int8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#gadbcb9cc8cf6afa28e6de8defb33f8196">xbee_set_pan</a> (uint16_t id)</td></tr> |
|
75 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the PAN ID for the XBee. <a href="#gadbcb9cc8cf6afa28e6de8defb33f8196"></a><br/></td></tr> |
|
76 |
<tr><td class="memItemLeft" align="right" valign="top">uint16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#gaa740c59073c6db9e00a2a2de10a95091">xbee_get_pan</a> ()</td></tr> |
|
77 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the XBee's PAN ID. <a href="#gaa740c59073c6db9e00a2a2de10a95091"></a><br/></td></tr> |
|
78 |
<tr><td class="memItemLeft" align="right" valign="top">int8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#ga4f67630ca81e5eae064bb58c3818d3fd">xbee_set_channel</a> (uint8_t channel)</td></tr> |
|
79 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the channel the XBee is currently using. <a href="#ga4f67630ca81e5eae064bb58c3818d3fd"></a><br/></td></tr> |
|
80 |
<tr><td class="memItemLeft" align="right" valign="top">int8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#ga319d4bccd5e6b09d2f377d2170104817">xbee_get_channel</a> (void)</td></tr> |
|
81 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the channel the XBee is currently using. <a href="#ga319d4bccd5e6b09d2f377d2170104817"></a><br/></td></tr> |
|
82 |
<tr><td class="memItemLeft" align="right" valign="top">uint16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#ga24d751120f5cded06a70d156c29261fc">xbee_get_address</a> (void)</td></tr> |
|
83 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the XBee's 16-bit address. <a href="#ga24d751120f5cded06a70d156c29261fc"></a><br/></td></tr> |
|
84 |
</table> |
|
85 |
<hr/><a name="_details"></a><h2>Detailed Description</h2> |
|
86 |
<p>Interface with the XBee module. </p> |
|
87 |
<hr/><h2>Define Documentation</h2> |
|
88 |
<a class="anchor" id="ga614217d263be1fb1a5f76e2ff7be19a2"></a><!-- doxytag: member="xbee.c::PORT" ref="ga614217d263be1fb1a5f76e2ff7be19a2" args="" --> |
|
89 |
<div class="memitem"> |
|
90 |
<div class="memproto"> |
|
91 |
<table class="memname"> |
|
92 |
<tr> |
|
93 |
<td class="memname">#define PORT UDR1</td> |
|
94 |
</tr> |
|
95 |
</table> |
|
96 |
</div> |
|
97 |
<div class="memdoc"> |
|
98 |
<p>Interrupt for the robot. Adds bytes received from the xbee to the buffer. </p> |
|
30 | 99 |
|
31 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize the XBee library. <a href="#g3d5fbb6aae8dda99240ec38108a645af"></a><br></td></tr> |
|
32 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g9334ac71dca1ddd697b1a35a361ade6a">xbee_terminate</a> (void)</td></tr> |
|
100 |
</div> |
|
101 |
</div> |
|
102 |
<hr/><h2>Function Documentation</h2> |
|
103 |
<a class="anchor" id="ga335b40b15f89a8a0d26db9226812914e"></a><!-- doxytag: member="xbee.c::check_last_receive" ref="ga335b40b15f89a8a0d26db9226812914e" args="(uint16_t source, uint8_t framenum)" --> |
|
104 |
<div class="memitem"> |
|
105 |
<div class="memproto"> |
|
106 |
<table class="memname"> |
|
107 |
<tr> |
|
108 |
<td class="memname">int8_t check_last_receive </td> |
|
109 |
<td>(</td> |
|
110 |
<td class="paramtype">uint16_t </td> |
|
111 |
<td class="paramname"> <em>source</em>, </td> |
|
112 |
</tr> |
|
113 |
<tr> |
|
114 |
<td class="paramkey"></td> |
|
115 |
<td></td> |
|
116 |
<td class="paramtype">uint8_t </td> |
|
117 |
<td class="paramname"> <em>framenum</em></td><td> </td> |
|
118 |
</tr> |
|
119 |
<tr> |
|
120 |
<td></td> |
|
121 |
<td>)</td> |
|
122 |
<td></td><td></td><td></td> |
|
123 |
</tr> |
|
124 |
</table> |
|
125 |
</div> |
|
126 |
<div class="memdoc"> |
|
127 |
<p>Checks if packet is a duplicate </p> |
|
33 | 128 |
|
34 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Uninitialize the XBee library. <a href="#g9334ac71dca1ddd697b1a35a361ade6a"></a><br></td></tr> |
|
35 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g7c44bc25fda954efde574ee8d735073c">xbee_send_packet</a> (char *packet, int len, int dest, char options, char frame)</td></tr> |
|
129 |
<p>References <a class="el" href="xbee_8c_source.html#l00722">getStatus()</a>, and <a class="el" href="wl__defs_8h_source.html#l00069">WL_SUCCESS</a>.</p> |
|
36 | 130 |
|
37 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Send a packet to the XBee. <a href="#g7c44bc25fda954efde574ee8d735073c"></a><br></td></tr> |
|
38 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g00fbdd9d849171588df736f8b608589d">xbee_get_packet</a> (unsigned char *packet)</td></tr> |
|
131 |
</div> |
|
132 |
</div> |
|
133 |
<a class="anchor" id="ga8a4c7ae8201a7ca230fdb47bfa13d044"></a><!-- doxytag: member="xbee.c::getStatus" ref="ga8a4c7ae8201a7ca230fdb47bfa13d044" args="(uint8_t mask)" --> |
|
134 |
<div class="memitem"> |
|
135 |
<div class="memproto"> |
|
136 |
<table class="memname"> |
|
137 |
<tr> |
|
138 |
<td class="memname">uint8_t getStatus </td> |
|
139 |
<td>(</td> |
|
140 |
<td class="paramtype">uint8_t </td> |
|
141 |
<td class="paramname"> <em>mask</em></td> |
|
142 |
<td> ) </td> |
|
143 |
<td><code> [inline]</code></td> |
|
144 |
</tr> |
|
145 |
</table> |
|
146 |
</div> |
|
147 |
<div class="memdoc"> |
|
148 |
<p>status functions </p> |
|
39 | 149 |
|
40 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get a packet from the XBee. <a href="#g00fbdd9d849171588df736f8b608589d"></a><br></td></tr> |
|
41 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#gde50cbefd7ba8d7361ce2654a298748b">xbee_set_pan_id</a> (int id)</td></tr> |
|
150 |
<p>Referenced by <a class="el" href="xbee_8c_source.html#l00685">check_last_receive()</a>, <a class="el" href="xbee_8c_source.html#l01725">xbee_get_address()</a>, <a class="el" href="xbee_8c_source.html#l01693">xbee_get_channel()</a>, <a class="el" href="xbee_8c_source.html#l01621">xbee_get_pan()</a>, <a class="el" href="xbee_8c_source.html#l00729">xbee_init()</a>, <a class="el" href="xbee_8c_source.html#l01015">xbee_sendc()</a>, <a class="el" href="xbee_8c_source.html#l01655">xbee_set_channel()</a>, and <a class="el" href="xbee_8c_source.html#l01586">xbee_set_pan()</a>.</p> |
|
42 | 151 |
|
43 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the PAN ID for the XBee. <a href="#gde50cbefd7ba8d7361ce2654a298748b"></a><br></td></tr> |
|
44 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g7755cd8db87703c9e9943153660b8052">xbee_get_pan_id</a> (void)</td></tr> |
|
152 |
</div> |
|
153 |
</div> |
|
154 |
<a class="anchor" id="ga2eb96c49811a1d9f2ccd1e1186915077"></a><!-- doxytag: member="xbee.c::xbee_checksum_add" ref="ga2eb96c49811a1d9f2ccd1e1186915077" args="(uint8_t *buf, uint8_t len, uint8_t *sum)" --> |
|
155 |
<div class="memitem"> |
|
156 |
<div class="memproto"> |
|
157 |
<table class="memname"> |
|
158 |
<tr> |
|
159 |
<td class="memname">int8_t xbee_checksum_add </td> |
|
160 |
<td>(</td> |
|
161 |
<td class="paramtype">uint8_t * </td> |
|
162 |
<td class="paramname"> <em>buf</em>, </td> |
|
163 |
</tr> |
|
164 |
<tr> |
|
165 |
<td class="paramkey"></td> |
|
166 |
<td></td> |
|
167 |
<td class="paramtype">uint8_t </td> |
|
168 |
<td class="paramname"> <em>len</em>, </td> |
|
169 |
</tr> |
|
170 |
<tr> |
|
171 |
<td class="paramkey"></td> |
|
172 |
<td></td> |
|
173 |
<td class="paramtype">uint8_t * </td> |
|
174 |
<td class="paramname"> <em>sum</em></td><td> </td> |
|
175 |
</tr> |
|
176 |
<tr> |
|
177 |
<td></td> |
|
178 |
<td>)</td> |
|
179 |
<td></td><td></td><td></td> |
|
180 |
</tr> |
|
181 |
</table> |
|
182 |
</div> |
|
183 |
<div class="memdoc"> |
|
45 | 184 |
|
46 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the XBee's PAN ID. <a href="#g7755cd8db87703c9e9943153660b8052"></a><br></td></tr> |
|
47 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#gb93170c493c5cdfd43a7b640c6ed1d14">xbee_set_channel</a> (int channel)</td></tr> |
|
185 |
<p>Add a buffer to the checksum value. </p> |
|
186 |
<p>Adds buf to the previous checksum total</p> |
|
187 |
<dl><dt><b>Parameters:</b></dt><dd> |
|
188 |
<table border="0" cellspacing="2" cellpadding="0"> |
|
189 |
<tr><td valign="top"></td><td valign="top"><em>buf</em> </td><td>a byte buffer to add to the checksum </td></tr> |
|
190 |
<tr><td valign="top"></td><td valign="top"><em>len</em> </td><td>the length of the buffer </td></tr> |
|
191 |
<tr><td valign="top"></td><td valign="top"><em>sum</em> </td><td>the previous sum</td></tr> |
|
192 |
</table> |
|
193 |
</dd> |
|
194 |
</dl> |
|
195 |
<dl class="return"><dt><b>Returns:</b></dt><dd>error code </dd></dl> |
|
48 | 196 |
|
49 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the channel the XBee is currently using. <a href="#gb93170c493c5cdfd43a7b640c6ed1d14"></a><br></td></tr> |
|
50 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g133706db81f69ba0a3c169b7a3f42d2a">xbee_get_channel</a> (void)</td></tr> |
|
197 |
<p>References <a class="el" href="wl__defs_8h_source.html#l00090">WL_ERROR_ARGUMENT</a>, and <a class="el" href="wl__defs_8h_source.html#l00069">WL_SUCCESS</a>.</p> |
|
51 | 198 |
|
52 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the channel the XBee is currently using. <a href="#g133706db81f69ba0a3c169b7a3f42d2a"></a><br></td></tr> |
|
53 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g7c53e8a8492494a61ca306875d633309">xbee_get_address</a> (void)</td></tr> |
|
199 |
<p>Referenced by <a class="el" href="wireless__send_8c_source.html#l00091">wl_send()</a>.</p> |
|
54 | 200 |
|
55 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the XBee's 16-bit address. <a href="#g7c53e8a8492494a61ca306875d633309"></a><br></td></tr> |
|
56 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g1e9e3c2abf0ff683ca8e591c3851cf0a"></a><!-- doxytag: member="xbee::xbee_set_com_port" ref="g1e9e3c2abf0ff683ca8e591c3851cf0a" args="(char *port)" --> |
|
57 |
void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g1e9e3c2abf0ff683ca8e591c3851cf0a">xbee_set_com_port</a> (char *port)</td></tr> |
|
201 |
</div> |
|
202 |
</div> |
|
203 |
<a class="anchor" id="ga24d751120f5cded06a70d156c29261fc"></a><!-- doxytag: member="xbee.c::xbee_get_address" ref="ga24d751120f5cded06a70d156c29261fc" args="(void)" --> |
|
204 |
<div class="memitem"> |
|
205 |
<div class="memproto"> |
|
206 |
<table class="memname"> |
|
207 |
<tr> |
|
208 |
<td class="memname">uint16_t xbee_get_address </td> |
|
209 |
<td>(</td> |
|
210 |
<td class="paramtype">void </td> |
|
211 |
<td class="paramname"></td> |
|
212 |
<td> ) </td> |
|
213 |
<td></td> |
|
214 |
</tr> |
|
215 |
</table> |
|
216 |
</div> |
|
217 |
<div class="memdoc"> |
|
58 | 218 |
|
59 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the com port on a computer, undefined on the robot. <br></td></tr>
|
|
60 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gfcfccfa7323041108202275eba913be7"></a><!-- doxytag: member="xbee::xbee_reset" ref="gfcfccfa7323041108202275eba913be7" args="(void)" -->
|
|
61 |
int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#gfcfccfa7323041108202275eba913be7">xbee_reset</a> (void)</td></tr>
|
|
219 |
<p>Get the XBee's 16-bit address. </p>
|
|
220 |
<p>Get the 16-bit address of the XBee. This is used to specify who to send messages to and who messages are from.</p>
|
|
221 |
<dl class="return"><dt><b>Returns:</b></dt><dd>the 16-bit address of the XBee. </dd></dl>
|
|
62 | 222 |
|
63 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Reset XBee. <br></td></tr> |
|
64 |
<tr><td colspan="2"><br><h2>Variables</h2></td></tr> |
|
65 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g65685824a9cbbc9da05be520d0d80d12"></a><!-- doxytag: member="xbee::arrival_buf" ref="g65685824a9cbbc9da05be520d0d80d12" args="[XBEE_BUFFER_SIZE]" --> |
|
66 |
char </td><td class="memItemRight" valign="bottom"><b>arrival_buf</b> [XBEE_BUFFER_SIZE]</td></tr> |
|
223 |
<p>References <a class="el" href="xbee_8c_source.html#l00722">getStatus()</a>, <a class="el" href="wl__defs_8h_source.html#l00117">WL_ERROR_XBEE_COMMAND_16BIT</a>, and <a class="el" href="xbee_8c_source.html#l01380">xbee_send_read_at_command()</a>.</p> |
|
67 | 224 |
|
68 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gb7ae7d59f0f2dabc258c678996b59b22"></a><!-- doxytag: member="xbee::buffer_last" ref="gb7ae7d59f0f2dabc258c678996b59b22" args="" --> |
|
69 |
volatile int </td><td class="memItemRight" valign="bottom"><b>buffer_last</b> = 0</td></tr> |
|
225 |
<p>Referenced by <a class="el" href="xbee_8c_source.html#l00729">xbee_init()</a>.</p> |
|
70 | 226 |
|
71 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga38080e2a4d6f0497f3c2faf487a0952"></a><!-- doxytag: member="xbee::buffer_first" ref="ga38080e2a4d6f0497f3c2faf487a0952" args="" --> |
|
72 |
volatile int </td><td class="memItemRight" valign="bottom"><b>buffer_first</b> = 0</td></tr> |
|
73 |
|
|
74 |
</table> |
|
75 |
<hr><a name="_details"></a><h2>Detailed Description</h2> |
|
76 |
Interface with the XBee module. <hr><h2>Function Documentation</h2> |
|
77 |
<a class="anchor" name="g7c53e8a8492494a61ca306875d633309"></a><!-- doxytag: member="xbee.c::xbee_get_address" ref="g7c53e8a8492494a61ca306875d633309" args="(void)" --> |
|
227 |
</div> |
|
228 |
</div> |
|
229 |
<a class="anchor" id="ga319d4bccd5e6b09d2f377d2170104817"></a><!-- doxytag: member="xbee.c::xbee_get_channel" ref="ga319d4bccd5e6b09d2f377d2170104817" args="(void)" --> |
|
78 | 230 |
<div class="memitem"> |
79 | 231 |
<div class="memproto"> |
80 | 232 |
<table class="memname"> |
81 | 233 |
<tr> |
82 |
<td class="memname">unsigned int xbee_get_address </td>
|
|
234 |
<td class="memname">int8_t xbee_get_channel </td>
|
|
83 | 235 |
<td>(</td> |
84 |
<td class="paramname"> </td> |
|
236 |
<td class="paramtype">void </td> |
|
237 |
<td class="paramname"></td> |
|
85 | 238 |
<td> ) </td> |
86 | 239 |
<td></td> |
87 | 240 |
</tr> |
... | ... | |
89 | 242 |
</div> |
90 | 243 |
<div class="memdoc"> |
91 | 244 |
|
92 |
<p> |
|
93 |
Get the 16-bit address of the XBee. This is used to specify who to send messages to and who messages are from.<p> |
|
94 |
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the 16-bit address of the XBee. </dd></dl> |
|
245 |
<p>Get the channel the XBee is currently using. </p> |
|
246 |
<p>Returns the channel which the XBee is currently using.</p> |
|
247 |
<dl class="return"><dt><b>Returns:</b></dt><dd>the channel the XBee is using</dd></dl> |
|
248 |
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__xbee__funcs.html#ga4f67630ca81e5eae064bb58c3818d3fd" title="Set the channel the XBee is currently using.">xbee_set_channel</a> </dd></dl> |
|
95 | 249 |
|
250 |
<p>References <a class="el" href="xbee_8c_source.html#l00722">getStatus()</a>, <a class="el" href="wl__defs_8h_source.html#l00114">WL_ERROR_XBEE_COMMAND</a>, and <a class="el" href="xbee_8c_source.html#l01380">xbee_send_read_at_command()</a>.</p> |
|
251 |
|
|
96 | 252 |
</div> |
97 |
</div><p>
|
|
98 |
<a class="anchor" name="g133706db81f69ba0a3c169b7a3f42d2a"></a><!-- doxytag: member="xbee.c::xbee_get_channel" ref="g133706db81f69ba0a3c169b7a3f42d2a" args="(void)" -->
|
|
253 |
</div> |
|
254 |
<a class="anchor" id="gaa740c59073c6db9e00a2a2de10a95091"></a><!-- doxytag: member="xbee.c::xbee_get_pan" ref="gaa740c59073c6db9e00a2a2de10a95091" args="()" -->
|
|
99 | 255 |
<div class="memitem"> |
100 | 256 |
<div class="memproto"> |
101 | 257 |
<table class="memname"> |
102 | 258 |
<tr> |
103 |
<td class="memname">int xbee_get_channel </td>
|
|
259 |
<td class="memname">uint16_t xbee_get_pan </td>
|
|
104 | 260 |
<td>(</td> |
105 | 261 |
<td class="paramtype">void </td> |
106 |
<td class="paramname"> </td>
|
|
262 |
<td class="paramname"></td> |
|
107 | 263 |
<td> ) </td> |
108 | 264 |
<td></td> |
109 | 265 |
</tr> |
... | ... | |
111 | 267 |
</div> |
112 | 268 |
<div class="memdoc"> |
113 | 269 |
|
114 |
<p> |
|
115 |
Returns the channel which the XBee is currently using.<p> |
|
116 |
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the channel the XBee is using</dd></dl> |
|
117 |
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__xbee.html#gb93170c493c5cdfd43a7b640c6ed1d14" title="Set the channel the XBee is currently using.">xbee_set_channel</a> </dd></dl> |
|
270 |
<p>Get the XBee's PAN ID. </p> |
|
271 |
<p>Get the PAN ID for the XBee.</p> |
|
272 |
<dl class="return"><dt><b>Returns:</b></dt><dd>the personal area network id, or XBEE_PAN_DEFAULT if it has not yet been set. </dd></dl> |
|
118 | 273 |
|
274 |
<p>References <a class="el" href="xbee_8c_source.html#l00722">getStatus()</a>, <a class="el" href="wl__defs_8h_source.html#l00117">WL_ERROR_XBEE_COMMAND_16BIT</a>, and <a class="el" href="xbee_8c_source.html#l01380">xbee_send_read_at_command()</a>.</p> |
|
275 |
|
|
119 | 276 |
</div> |
120 |
</div><p>
|
|
121 |
<a class="anchor" name="g00fbdd9d849171588df736f8b608589d"></a><!-- doxytag: member="xbee.c::xbee_get_packet" ref="g00fbdd9d849171588df736f8b608589d" args="(unsigned char *packet)" -->
|
|
277 |
</div> |
|
278 |
<a class="anchor" id="ga409ff62ddd9e22eaf745a50f688263fd"></a><!-- doxytag: member="xbee.c::xbee_getc" ref="ga409ff62ddd9e22eaf745a50f688263fd" args="(void)" -->
|
|
122 | 279 |
<div class="memitem"> |
123 | 280 |
<div class="memproto"> |
124 | 281 |
<table class="memname"> |
125 | 282 |
<tr> |
126 |
<td class="memname">int xbee_get_packet </td>
|
|
283 |
<td class="memname">int16_t xbee_getc </td>
|
|
127 | 284 |
<td>(</td> |
128 |
<td class="paramtype">unsigned char * </td>
|
|
129 |
<td class="paramname"> <em>dest</em> </td>
|
|
285 |
<td class="paramtype">void </td>
|
|
286 |
<td class="paramname"></td> |
|
130 | 287 |
<td> ) </td> |
131 | 288 |
<td></td> |
132 | 289 |
</tr> |
133 | 290 |
</table> |
134 | 291 |
</div> |
135 | 292 |
<div class="memdoc"> |
293 |
<p>Returns the first byte in the buffer received from xbee. This function blocks execution until a character has been received. xbee_init must be called before this function may be used.</p> |
|
294 |
<dl class="return"><dt><b>Returns:</b></dt><dd>the first character in the xbee buffer, -1 on error</dd></dl> |
|
295 |
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__xbee__funcs.html#ga35f6f209aee59fad0490a961587e014a" title="Initialize the XBee library.">xbee_init</a>, <a class="el" href="group__xbee.html#gae564a6f5453934b0234a054fbc238fd3">xbee_getc_nb</a> </dd></dl> |
|
136 | 296 |
|
137 |
<p> |
|
138 |
Reads a packet received from the XBee. This function is non-blocking. The resulting packet is stored in dest. Only returns transmission response packets and received packets. The returned packet does not include header information or the checksum. This method also handles special packets dealt with by the XBee library, and so should be called frequently while the XBee is in use.<br> |
|
139 |
<br> |
|
140 |
<p> |
|
141 |
The first byte of the packet will be either XBEE_TX_STATUS or XBEE_RX to indicated a response to a sent message or a received message, respectively.<br> |
|
142 |
<br> |
|
143 |
<p> |
|
144 |
For a status response packet:<br> |
|
145 |
The first byte will be XBEE_TX_STATUS.<br> |
|
146 |
The second byte will be the frame number.<br> |
|
147 |
The third byte will be the result. 0 indicates success, and nonzero indicates that an error ocurred in transmitting the packet.<br> |
|
148 |
<br> |
|
149 |
<p> |
|
150 |
For a received packet:<br> |
|
151 |
The first byte will be XBEE_RX.<br> |
|
152 |
The second and third bytes will be the 16-bit address of the packet's sender.<br> |
|
153 |
The fourth byte is the signal strength.<br> |
|
154 |
The fifth byte is 1 if the packet were sent to a specific address, and 2 if it is a broadcast packet.<br> |
|
155 |
<br> |
|
156 |
<p> |
|
157 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
|
297 |
</div> |
|
298 |
</div> |
|
299 |
<a class="anchor" id="gae564a6f5453934b0234a054fbc238fd3"></a><!-- doxytag: member="xbee.c::xbee_getc_nb" ref="gae564a6f5453934b0234a054fbc238fd3" args="(uint8_t *c)" --> |
|
300 |
<div class="memitem"> |
|
301 |
<div class="memproto"> |
|
302 |
<table class="memname"> |
|
303 |
<tr> |
|
304 |
<td class="memname">int8_t xbee_getc_nb </td> |
|
305 |
<td>(</td> |
|
306 |
<td class="paramtype">uint8_t * </td> |
|
307 |
<td class="paramname"> <em>c</em></td> |
|
308 |
<td> ) </td> |
|
309 |
<td></td> |
|
310 |
</tr> |
|
311 |
</table> |
|
312 |
</div> |
|
313 |
<div class="memdoc"> |
|
314 |
<p>Non blocking version of xbee_getc. If a byte is present in the buffer, it is returned, otherwise -1 is returned immediately. xbee_init must be called before this function can be used.</p> |
|
315 |
<dl><dt><b>Parameters:</b></dt><dd> |
|
158 | 316 |
<table border="0" cellspacing="2" cellpadding="0"> |
159 |
<tr><td valign="top"></td><td valign="top"><em>dest</em> </td><td>set to the packet data </td></tr>
|
|
317 |
<tr><td valign="top"></td><td valign="top"><em>c</em> </td><td>The received byte. This will be set if a byte has been received.</td></tr>
|
|
160 | 318 |
</table> |
319 |
</dd> |
|
161 | 320 |
</dl> |
162 |
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the length of the packet, or -1 if no packet is available </dd></dl> |
|
321 |
<dl class="return"><dt><b>Returns:</b></dt><dd>-1 If no byte is available, 0 otherwise, positive for error</dd></dl> |
|
322 |
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__xbee.html#ga409ff62ddd9e22eaf745a50f688263fd">xbee_getc</a> </dd></dl> |
|
163 | 323 |
|
324 |
<p>References <a class="el" href="wl__defs_8h_source.html#l00069">WL_SUCCESS</a>.</p> |
|
325 |
|
|
164 | 326 |
</div> |
165 |
</div><p>
|
|
166 |
<a class="anchor" name="g7755cd8db87703c9e9943153660b8052"></a><!-- doxytag: member="xbee.c::xbee_get_pan_id" ref="g7755cd8db87703c9e9943153660b8052" args="(void)" -->
|
|
327 |
</div> |
|
328 |
<a class="anchor" id="ga31a4df97d6865a40123337045109b9f1"></a><!-- doxytag: member="xbee.c::xbee_init" ref="ga31a4df97d6865a40123337045109b9f1" args="()" -->
|
|
167 | 329 |
<div class="memitem"> |
168 | 330 |
<div class="memproto"> |
169 | 331 |
<table class="memname"> |
170 | 332 |
<tr> |
171 |
<td class="memname">unsigned int xbee_get_pan_id </td>
|
|
333 |
<td class="memname">int8_t xbee_init </td>
|
|
172 | 334 |
<td>(</td> |
173 |
<td class="paramname"> </td> |
|
335 |
<td class="paramtype">void </td> |
|
336 |
<td class="paramname"></td> |
|
174 | 337 |
<td> ) </td> |
175 | 338 |
<td></td> |
176 | 339 |
</tr> |
... | ... | |
178 | 341 |
</div> |
179 | 342 |
<div class="memdoc"> |
180 | 343 |
|
181 |
<p> |
|
182 |
Get the PAN ID for the XBee.<p> |
|
183 |
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the personal area network id, or XBEE_PAN_DEFAULT if it has not yet been set. </dd></dl> |
|
344 |
<p>Initialize the XBee library. </p> |
|
345 |
<p>Initializes the XBee library so that other functions may be used. </p> |
|
184 | 346 |
|
347 |
<p>References <a class="el" href="xbee_8c_source.html#l00722">getStatus()</a>, <a class="el" href="wl__defs_8h_source.html#l00120">WL_ERROR_BAUD</a>, <a class="el" href="wl__defs_8h_source.html#l00075">WL_ERROR_INIT_ALREADY_INITD</a>, <a class="el" href="wl__defs_8h_source.html#l00117">WL_ERROR_XBEE_COMMAND_16BIT</a>, <a class="el" href="wl__defs_8h_source.html#l00069">WL_SUCCESS</a>, <a class="el" href="xbee_8c_source.html#l00087">xbee_basic_buf</a>, <a class="el" href="xbee_8c_source.html#l01725">xbee_get_address()</a>, and <a class="el" href="xbee_8c_source.html#l01586">xbee_set_pan()</a>.</p> |
|
348 |
|
|
349 |
<p>Referenced by <a class="el" href="wireless_8c_source.html#l00057">wl_init()</a>.</p> |
|
350 |
|
|
185 | 351 |
</div> |
186 |
</div><p>
|
|
187 |
<a class="anchor" name="g3d5fbb6aae8dda99240ec38108a645af"></a><!-- doxytag: member="xbee.c::xbee_lib_init" ref="g3d5fbb6aae8dda99240ec38108a645af" args="(void)" -->
|
|
352 |
</div> |
|
353 |
<a class="anchor" id="gaf29617dd4988f4b056f9476004ae5cbf"></a><!-- doxytag: member="xbee.c::xbee_putc" ref="gaf29617dd4988f4b056f9476004ae5cbf" args="(uint8_t c)" -->
|
|
188 | 354 |
<div class="memitem"> |
189 | 355 |
<div class="memproto"> |
190 | 356 |
<table class="memname"> |
191 | 357 |
<tr> |
192 |
<td class="memname">int xbee_lib_init </td>
|
|
358 |
<td class="memname">int8_t xbee_putc </td>
|
|
193 | 359 |
<td>(</td> |
194 |
<td class="paramname"> </td> |
|
360 |
<td class="paramtype">uint8_t </td> |
|
361 |
<td class="paramname"> <em>c</em></td> |
|
195 | 362 |
<td> ) </td> |
196 | 363 |
<td></td> |
197 | 364 |
</tr> |
198 | 365 |
</table> |
199 | 366 |
</div> |
200 | 367 |
<div class="memdoc"> |
368 |
<p>Sends a character to the XBee.</p> |
|
369 |
<dl><dt><b>Parameters:</b></dt><dd> |
|
370 |
<table border="0" cellspacing="2" cellpadding="0"> |
|
371 |
<tr><td valign="top"></td><td valign="top"><em>c</em> </td><td>the byte to send </td></tr> |
|
372 |
</table> |
|
373 |
</dd> |
|
374 |
</dl> |
|
375 |
<dl class="return"><dt><b>Returns:</b></dt><dd>0 for success, nonzero for failure </dd></dl> |
|
201 | 376 |
|
202 |
<p> |
|
203 |
Initializes the XBee library so that other functions may be used. |
|
377 |
<p>References <a class="el" href="wl__defs_8h_source.html#l00069">WL_SUCCESS</a>.</p> |
|
378 |
|
|
379 |
<p>Referenced by <a class="el" href="xbee_8c_source.html#l01332">xbee_send_header()</a>, and <a class="el" href="xbee_8c_source.html#l01432">xbee_send_packet()</a>.</p> |
|
380 |
|
|
204 | 381 |
</div> |
205 |
</div><p>
|
|
206 |
<a class="anchor" name="g7c44bc25fda954efde574ee8d735073c"></a><!-- doxytag: member="xbee.c::xbee_send_packet" ref="g7c44bc25fda954efde574ee8d735073c" args="(char *packet, int len, int dest, char options, char frame)" -->
|
|
382 |
</div> |
|
383 |
<a class="anchor" id="ga5805e267e3b6f4b7bdad7aa6dc65ee04"></a><!-- doxytag: member="xbee.c::xbee_send" ref="ga5805e267e3b6f4b7bdad7aa6dc65ee04" args="(uint8_t *buf, uint16_t size)" -->
|
|
207 | 384 |
<div class="memitem"> |
208 | 385 |
<div class="memproto"> |
209 | 386 |
<table class="memname"> |
210 | 387 |
<tr> |
211 |
<td class="memname">int xbee_send_packet </td>
|
|
388 |
<td class="memname">int8_t xbee_send </td>
|
|
212 | 389 |
<td>(</td> |
213 |
<td class="paramtype">char * </td> |
|
390 |
<td class="paramtype">uint8_t * </td> |
|
391 |
<td class="paramname"> <em>buf</em>, </td> |
|
392 |
</tr> |
|
393 |
<tr> |
|
394 |
<td class="paramkey"></td> |
|
395 |
<td></td> |
|
396 |
<td class="paramtype">uint16_t </td> |
|
397 |
<td class="paramname"> <em>size</em></td><td> </td> |
|
398 |
</tr> |
|
399 |
<tr> |
|
400 |
<td></td> |
|
401 |
<td>)</td> |
|
402 |
<td></td><td></td><td></td> |
|
403 |
</tr> |
|
404 |
</table> |
|
405 |
</div> |
|
406 |
<div class="memdoc"> |
|
407 |
|
|
408 |
<p>Send an array of bytes to the xbee in API mode. </p> |
|
409 |
<p>Send a buffer buf of size bytes to the XBee in API mode</p> |
|
410 |
<dl><dt><b>Parameters:</b></dt><dd> |
|
411 |
<table border="0" cellspacing="2" cellpadding="0"> |
|
412 |
<tr><td valign="top"></td><td valign="top"><em>buf</em> </td><td>the buffer of data to send </td></tr> |
|
413 |
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>the number of bytes to send </td></tr> |
|
414 |
</table> |
|
415 |
</dd> |
|
416 |
</dl> |
|
417 |
|
|
418 |
<p>References <a class="el" href="wl__defs_8h_source.html#l00093">WL_ERROR_SEND</a>, <a class="el" href="wl__defs_8h_source.html#l00069">WL_SUCCESS</a>, and <a class="el" href="xbee_8c_source.html#l01015">xbee_sendc()</a>.</p> |
|
419 |
|
|
420 |
<p>Referenced by <a class="el" href="wireless__send_8c_source.html#l00091">wl_send()</a>, and <a class="el" href="xbee_8c_source.html#l01432">xbee_send_packet()</a>.</p> |
|
421 |
|
|
422 |
</div> |
|
423 |
</div> |
|
424 |
<a class="anchor" id="ga2a39ffce83d65d22aeefb41dfce2112f"></a><!-- doxytag: member="xbee.c::xbee_send_header" ref="ga2a39ffce83d65d22aeefb41dfce2112f" args="(uint16_t len)" --> |
|
425 |
<div class="memitem"> |
|
426 |
<div class="memproto"> |
|
427 |
<table class="memname"> |
|
428 |
<tr> |
|
429 |
<td class="memname">int8_t xbee_send_header </td> |
|
430 |
<td>(</td> |
|
431 |
<td class="paramtype">uint16_t </td> |
|
432 |
<td class="paramname"> <em>len</em></td> |
|
433 |
<td> ) </td> |
|
434 |
<td></td> |
|
435 |
</tr> |
|
436 |
</table> |
|
437 |
</div> |
|
438 |
<div class="memdoc"> |
|
439 |
|
|
440 |
<p>Send a frame header to the xbee. </p> |
|
441 |
<p>Sends header information. Header information includes XBEE_FRAME_START and the packet length, as two bytes.</p> |
|
442 |
<dl><dt><b>Parameters:</b></dt><dd> |
|
443 |
<table border="0" cellspacing="2" cellpadding="0"> |
|
444 |
<tr><td valign="top"></td><td valign="top"><em>type</em> </td><td>the packet type </td></tr> |
|
445 |
<tr><td valign="top"></td><td valign="top"><em>len</em> </td><td>the size in bytes of the packet data </td></tr> |
|
446 |
</table> |
|
447 |
</dd> |
|
448 |
</dl> |
|
449 |
|
|
450 |
<p>References <a class="el" href="wl__defs_8h_source.html#l00093">WL_ERROR_SEND</a>, <a class="el" href="wl__defs_8h_source.html#l00069">WL_SUCCESS</a>, <a class="el" href="xbee_8c_source.html#l00945">xbee_putc()</a>, and <a class="el" href="xbee_8c_source.html#l01015">xbee_sendc()</a>.</p> |
|
451 |
|
|
452 |
<p>Referenced by <a class="el" href="wireless__send_8c_source.html#l00091">wl_send()</a>.</p> |
|
453 |
|
|
454 |
</div> |
|
455 |
</div> |
|
456 |
<a class="anchor" id="gaae54f7208cfa786cb56d4d78ab3ceffe"></a><!-- doxytag: member="xbee.c::xbee_send_packet" ref="gaae54f7208cfa786cb56d4d78ab3ceffe" args="(uint8_t *packet, uint8_t len, uint16_t dest, uint8_t options, uint8_t frame)" --> |
|
457 |
<div class="memitem"> |
|
458 |
<div class="memproto"> |
|
459 |
<table class="memname"> |
|
460 |
<tr> |
|
461 |
<td class="memname">int8_t xbee_send_packet </td> |
|
462 |
<td>(</td> |
|
463 |
<td class="paramtype">uint8_t * </td> |
|
214 | 464 |
<td class="paramname"> <em>packet</em>, </td> |
215 | 465 |
</tr> |
216 | 466 |
<tr> |
217 | 467 |
<td class="paramkey"></td> |
218 | 468 |
<td></td> |
219 |
<td class="paramtype">int </td>
|
|
469 |
<td class="paramtype">uint8_t </td>
|
|
220 | 470 |
<td class="paramname"> <em>len</em>, </td> |
221 | 471 |
</tr> |
222 | 472 |
<tr> |
223 | 473 |
<td class="paramkey"></td> |
224 | 474 |
<td></td> |
225 |
<td class="paramtype">int </td>
|
|
475 |
<td class="paramtype">uint16_t </td>
|
|
226 | 476 |
<td class="paramname"> <em>dest</em>, </td> |
227 | 477 |
</tr> |
228 | 478 |
<tr> |
229 | 479 |
<td class="paramkey"></td> |
230 | 480 |
<td></td> |
231 |
<td class="paramtype">char </td>
|
|
481 |
<td class="paramtype">uint8_t </td>
|
|
232 | 482 |
<td class="paramname"> <em>options</em>, </td> |
233 | 483 |
</tr> |
234 | 484 |
<tr> |
235 | 485 |
<td class="paramkey"></td> |
236 | 486 |
<td></td> |
237 |
<td class="paramtype">char </td>
|
|
487 |
<td class="paramtype">uint8_t </td>
|
|
238 | 488 |
<td class="paramname"> <em>frame</em></td><td> </td> |
239 | 489 |
</tr> |
240 | 490 |
<tr> |
... | ... | |
246 | 496 |
</div> |
247 | 497 |
<div class="memdoc"> |
248 | 498 |
|
249 |
<p> |
|
250 |
Send the specified packet.<p>
|
|
251 |
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
499 |
<p>Send a packet to the XBee. </p>
|
|
500 |
<p>Send the specified packet.</p>
|
|
501 |
<dl><dt><b>Parameters:</b></dt><dd> |
|
252 | 502 |
<table border="0" cellspacing="2" cellpadding="0"> |
253 | 503 |
<tr><td valign="top"></td><td valign="top"><em>packet</em> </td><td>the packet data to send </td></tr> |
254 | 504 |
<tr><td valign="top"></td><td valign="top"><em>len</em> </td><td>the number of bytes in the packet</td></tr> |
... | ... | |
256 | 506 |
<tr><td valign="top"></td><td valign="top"><em>options</em> </td><td>a combination of the flags XBEE_OPTIONS_NONE, XBEE_OPTIONS_DISABLE_RESPONSE and XBEE_OPTIONS_BROADCAST_ALL_PANS</td></tr> |
257 | 507 |
<tr><td valign="top"></td><td valign="top"><em>frame</em> </td><td>the frame number to associate this packet with. This will be used to identify the response when the XBee alerts us as to whether or not our message was received. </td></tr> |
258 | 508 |
</table> |
509 |
</dd> |
|
259 | 510 |
</dl> |
260 | 511 |
|
512 |
<p>References <a class="el" href="wl__defs_8h_source.html#l00090">WL_ERROR_ARGUMENT</a>, <a class="el" href="wl__defs_8h_source.html#l00093">WL_ERROR_SEND</a>, <a class="el" href="wl__defs_8h_source.html#l00069">WL_SUCCESS</a>, <a class="el" href="xbee_8c_source.html#l00945">xbee_putc()</a>, <a class="el" href="xbee_8c_source.html#l01038">xbee_send()</a>, and <a class="el" href="xbee_8c_source.html#l01015">xbee_sendc()</a>.</p> |
|
513 |
|
|
261 | 514 |
</div> |
262 |
</div><p>
|
|
263 |
<a class="anchor" name="g2fbd69862a11b6bcc5cfdb9f182bcdb9"></a><!-- doxytag: member="xbee.c::xbee_send_read_at_command" ref="g2fbd69862a11b6bcc5cfdb9f182bcdb9" args="(char *command)" -->
|
|
515 |
</div> |
|
516 |
<a class="anchor" id="ga2694f3530e4cf256ff9e96600aea753c"></a><!-- doxytag: member="xbee.c::xbee_send_read_at_command" ref="ga2694f3530e4cf256ff9e96600aea753c" args="(uint8_t *command)" -->
|
|
264 | 517 |
<div class="memitem"> |
265 | 518 |
<div class="memproto"> |
266 | 519 |
<table class="memname"> |
267 | 520 |
<tr> |
268 |
<td class="memname">int xbee_send_read_at_command </td>
|
|
521 |
<td class="memname">int8_t xbee_send_read_at_command </td>
|
|
269 | 522 |
<td>(</td> |
270 |
<td class="paramtype">char * </td>
|
|
271 |
<td class="paramname"> <em>command</em> </td>
|
|
523 |
<td class="paramtype">uint8_t * </td>
|
|
524 |
<td class="paramname"> <em>command</em></td> |
|
272 | 525 |
<td> ) </td> |
273 | 526 |
<td></td> |
274 | 527 |
</tr> |
275 | 528 |
</table> |
276 | 529 |
</div> |
277 | 530 |
<div class="memdoc"> |
278 |
|
|
279 |
<p> |
|
280 |
Sends an AT command to read a parameter.<p> |
|
281 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
|
531 |
<p>Sends an AT command to read a parameter.</p> |
|
532 |
<dl><dt><b>Parameters:</b></dt><dd> |
|
282 | 533 |
<table border="0" cellspacing="2" cellpadding="0"> |
283 | 534 |
<tr><td valign="top"></td><td valign="top"><em>command</em> </td><td>the AT command to send. For exmaple, use ID to read the PAN ID and MY to return the XBee ID. See the XBee reference guide for a complete listing. </td></tr> |
284 | 535 |
</table> |
536 |
</dd> |
|
285 | 537 |
</dl> |
286 | 538 |
|
539 |
<p>Referenced by <a class="el" href="xbee_8c_source.html#l01725">xbee_get_address()</a>, <a class="el" href="xbee_8c_source.html#l01693">xbee_get_channel()</a>, and <a class="el" href="xbee_8c_source.html#l01621">xbee_get_pan()</a>.</p> |
|
540 |
|
|
287 | 541 |
</div> |
288 |
</div><p>
|
|
289 |
<a class="anchor" name="gb93170c493c5cdfd43a7b640c6ed1d14"></a><!-- doxytag: member="xbee.c::xbee_set_channel" ref="gb93170c493c5cdfd43a7b640c6ed1d14" args="(int channel)" -->
|
|
542 |
</div> |
|
543 |
<a class="anchor" id="gae75ee9a54a5811b8bc302dc2d70f0215"></a><!-- doxytag: member="xbee.c::xbee_sendc" ref="gae75ee9a54a5811b8bc302dc2d70f0215" args="(uint8_t byte)" -->
|
|
290 | 544 |
<div class="memitem"> |
291 | 545 |
<div class="memproto"> |
292 | 546 |
<table class="memname"> |
293 | 547 |
<tr> |
294 |
<td class="memname">int xbee_set_channel </td>
|
|
548 |
<td class="memname">int8_t xbee_sendc </td>
|
|
295 | 549 |
<td>(</td> |
296 |
<td class="paramtype">int </td>
|
|
297 |
<td class="paramname"> <em>channel</em> </td>
|
|
550 |
<td class="paramtype">uint8_t </td>
|
|
551 |
<td class="paramname"> <em>byte</em></td>
|
|
298 | 552 |
<td> ) </td> |
299 | 553 |
<td></td> |
300 | 554 |
</tr> |
... | ... | |
302 | 556 |
</div> |
303 | 557 |
<div class="memdoc"> |
304 | 558 |
|
305 |
<p> |
|
306 |
Set the channel the XBee is using.<p>
|
|
307 |
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
559 |
<p>Send byte to the xbee in API mode. </p>
|
|
560 |
<p>Send byte to the xbee in API mode.</p>
|
|
561 |
<dl><dt><b>Parameters:</b></dt><dd> |
|
308 | 562 |
<table border="0" cellspacing="2" cellpadding="0"> |
563 |
<tr><td valign="top"></td><td valign="top"><em>byte</em> </td><td>the byte to be sent </td></tr> |
|
564 |
</table> |
|
565 |
</dd> |
|
566 |
</dl> |
|
567 |
|
|
568 |
<p>References <a class="el" href="xbee_8c_source.html#l00722">getStatus()</a>, and <a class="el" href="wl__defs_8h_source.html#l00069">WL_SUCCESS</a>.</p> |
|
569 |
|
|
570 |
<p>Referenced by <a class="el" href="wireless__send_8c_source.html#l00091">wl_send()</a>, <a class="el" href="xbee_8c_source.html#l01038">xbee_send()</a>, <a class="el" href="xbee_8c_source.html#l01332">xbee_send_header()</a>, and <a class="el" href="xbee_8c_source.html#l01432">xbee_send_packet()</a>.</p> |
|
571 |
|
|
572 |
</div> |
|
573 |
</div> |
|
574 |
<a class="anchor" id="ga4f67630ca81e5eae064bb58c3818d3fd"></a><!-- doxytag: member="xbee.c::xbee_set_channel" ref="ga4f67630ca81e5eae064bb58c3818d3fd" args="(uint8_t channel)" --> |
|
575 |
<div class="memitem"> |
|
576 |
<div class="memproto"> |
|
577 |
<table class="memname"> |
|
578 |
<tr> |
|
579 |
<td class="memname">int8_t xbee_set_channel </td> |
|
580 |
<td>(</td> |
|
581 |
<td class="paramtype">uint8_t </td> |
|
582 |
<td class="paramname"> <em>channel</em></td> |
|
583 |
<td> ) </td> |
|
584 |
<td></td> |
|
585 |
</tr> |
|
586 |
</table> |
|
587 |
</div> |
|
588 |
<div class="memdoc"> |
|
589 |
|
|
590 |
<p>Set the channel the XBee is currently using. </p> |
|
591 |
<p>Set the channel the XBee is using.</p> |
|
592 |
<dl><dt><b>Parameters:</b></dt><dd> |
|
593 |
<table border="0" cellspacing="2" cellpadding="0"> |
|
309 | 594 |
<tr><td valign="top"></td><td valign="top"><em>channel</em> </td><td>the channel the XBee will not use, between 0x0B and 0x1A</td></tr> |
310 | 595 |
</table> |
596 |
</dd> |
|
311 | 597 |
</dl> |
312 |
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__xbee.html#g133706db81f69ba0a3c169b7a3f42d2a" title="Get the channel the XBee is currently using.">xbee_get_channel</a> </dd></dl>
|
|
598 |
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__xbee__funcs.html#ga319d4bccd5e6b09d2f377d2170104817" title="Get the channel the XBee is currently using.">xbee_get_channel</a> </dd></dl>
|
|
313 | 599 |
|
600 |
<p>References <a class="el" href="xbee_8c_source.html#l00722">getStatus()</a>, <a class="el" href="wl__defs_8h_source.html#l00090">WL_ERROR_ARGUMENT</a>, <a class="el" href="wl__defs_8h_source.html#l00114">WL_ERROR_XBEE_COMMAND</a>, and <a class="el" href="wl__defs_8h_source.html#l00069">WL_SUCCESS</a>.</p> |
|
601 |
|
|
314 | 602 |
</div> |
315 |
</div><p>
|
|
316 |
<a class="anchor" name="gde50cbefd7ba8d7361ce2654a298748b"></a><!-- doxytag: member="xbee.c::xbee_set_pan_id" ref="gde50cbefd7ba8d7361ce2654a298748b" args="(int id)" -->
|
|
603 |
</div> |
|
604 |
<a class="anchor" id="gadbcb9cc8cf6afa28e6de8defb33f8196"></a><!-- doxytag: member="xbee.c::xbee_set_pan" ref="gadbcb9cc8cf6afa28e6de8defb33f8196" args="(uint16_t id)" -->
|
|
317 | 605 |
<div class="memitem"> |
318 | 606 |
<div class="memproto"> |
319 | 607 |
<table class="memname"> |
320 | 608 |
<tr> |
321 |
<td class="memname">int xbee_set_pan_id </td>
|
|
609 |
<td class="memname">int8_t xbee_set_pan </td>
|
|
322 | 610 |
<td>(</td> |
323 |
<td class="paramtype">int </td>
|
|
324 |
<td class="paramname"> <em>id</em> </td>
|
|
611 |
<td class="paramtype">uint16_t </td>
|
|
612 |
<td class="paramname"> <em>id</em></td> |
|
325 | 613 |
<td> ) </td> |
326 | 614 |
<td></td> |
327 | 615 |
</tr> |
... | ... | |
329 | 617 |
</div> |
330 | 618 |
<div class="memdoc"> |
331 | 619 |
|
332 |
<p> |
|
333 |
Sets the personal area network id.<p>
|
|
334 |
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
620 |
<p>Set the PAN ID for the XBee. </p>
|
|
621 |
<p>Sets the personal area network id.</p>
|
|
622 |
<dl><dt><b>Parameters:</b></dt><dd> |
|
335 | 623 |
<table border="0" cellspacing="2" cellpadding="0"> |
336 | 624 |
<tr><td valign="top"></td><td valign="top"><em>id</em> </td><td>the new personal area network (PAN) id </td></tr> |
337 | 625 |
</table> |
626 |
</dd> |
|
338 | 627 |
</dl> |
339 | 628 |
|
629 |
<p>References <a class="el" href="xbee_8c_source.html#l00722">getStatus()</a>, <a class="el" href="wl__defs_8h_source.html#l00114">WL_ERROR_XBEE_COMMAND</a>, and <a class="el" href="wl__defs_8h_source.html#l00069">WL_SUCCESS</a>.</p> |
|
630 |
|
|
631 |
<p>Referenced by <a class="el" href="xbee_8c_source.html#l00729">xbee_init()</a>.</p> |
|
632 |
|
|
340 | 633 |
</div> |
341 |
</div><p>
|
|
342 |
<a class="anchor" name="g9334ac71dca1ddd697b1a35a361ade6a"></a><!-- doxytag: member="xbee.c::xbee_terminate" ref="g9334ac71dca1ddd697b1a35a361ade6a" args="(void)" -->
|
|
634 |
</div> |
|
635 |
<a class="anchor" id="ga3fe446135ba896e6438a4fcd67154119"></a><!-- doxytag: member="xbee.c::xbee_terminate" ref="ga3fe446135ba896e6438a4fcd67154119" args="()" -->
|
|
343 | 636 |
<div class="memitem"> |
344 | 637 |
<div class="memproto"> |
345 | 638 |
<table class="memname"> |
346 | 639 |
<tr> |
347 |
<td class="memname">void xbee_terminate </td>
|
|
640 |
<td class="memname">int8_t xbee_terminate </td>
|
|
348 | 641 |
<td>(</td> |
349 |
<td class="paramname"> </td> |
|
642 |
<td class="paramtype">void </td> |
|
643 |
<td class="paramname"></td> |
|
350 | 644 |
<td> ) </td> |
351 | 645 |
<td></td> |
352 | 646 |
</tr> |
... | ... | |
354 | 648 |
</div> |
355 | 649 |
<div class="memdoc"> |
356 | 650 |
|
357 |
<p> |
|
358 |
Call when finished using the XBee library. This releases all sued resources. |
|
651 |
<p>Uninitialize the XBee library. </p> |
|
652 |
<p>Call when finished using the XBee library. </p> |
|
653 |
|
|
654 |
<p>References <a class="el" href="wl__defs_8h_source.html#l00081">WL_ERROR_TERMINATION_FAILED</a>, and <a class="el" href="wl__defs_8h_source.html#l00069">WL_SUCCESS</a>.</p> |
|
655 |
|
|
656 |
<p>Referenced by <a class="el" href="wireless_8c_source.html#l00087">wl_terminate()</a>.</p> |
|
657 |
|
|
359 | 658 |
</div> |
360 |
</div><p> |
|
361 | 659 |
</div> |
362 |
<hr size="1"><address style="text-align: right;"><small>Generated on Tue Nov 24 12:45:55 2009 for Colony by |
|
660 |
</div> |
|
661 |
<hr class="footer"/><address style="text-align: right;"><small>Generated on Thu May 6 13:17:00 2010 for libwireless by |
|
363 | 662 |
<a href="http://www.doxygen.org/index.html"> |
364 |
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
|
663 |
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
|
|
365 | 664 |
</body> |
366 | 665 |
</html> |
Also available in: Unified diff