Project

General

Profile

Revision 1578

added doxygen info for wireless branch

View differences:

branches/wireless/docs/libwireless/html/xbee_8c.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.c File Reference</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 -->
8
<div class="navigation" id="top">
9
  <div class="tabs">
10
    <ul>
11
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12
      <li><a href="modules.html"><span>Modules</span></a></li>
13
      <li class="current"><a href="files.html"><span>Files</span></a></li>
14
    </ul>
15
  </div>
16
  <div class="tabs">
17
    <ul>
18
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
19
      <li><a href="globals.html"><span>Globals</span></a></li>
20
    </ul>
21
  </div>
22
</div>
23
<div class="contents">
24
<h1>xbee.c File Reference</h1>XBee Interface.  
25
<a href="#_details">More...</a>
26
<p>
27
<code>#include &quot;<a class="el" href="xbee_8h-source.html">xbee.h</a>&quot;</code><br>
28
<code>#include &quot;<a class="el" href="wl__defs_8h-source.html">wl_defs.h</a>&quot;</code><br>
29
<code>#include &lt;time.h&gt;</code><br>
30
<code>#include &lt;fcntl.h&gt;</code><br>
31
<code>#include &lt;unistd.h&gt;</code><br>
32
<code>#include &lt;pthread.h&gt;</code><br>
33
<code>#include &lt;errno.h&gt;</code><br>
34
<code>#include &lt;termios.h&gt;</code><br>
35
<code>#include &lt;stdio.h&gt;</code><br>
36
<code>#include &lt;stdlib.h&gt;</code><br>
37
<code>#include &lt;string.h&gt;</code><br>
38
<table border="0" cellpadding="0" cellspacing="0">
39
<tr><td></td></tr>
40
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
41
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xbee_8c.html#fd0466c206d7e1f82ee407d114468e96">XBEE_PORT_DEFAULT</a>&nbsp;&nbsp;&nbsp;&quot;/dev/ttyUSB1&quot;</td></tr>
42

  
43
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e6bb9bb274d6750f954762454807a5a7"></a><!-- doxytag: member="xbee.c::XBEE_PAN_DEFAULT" ref="e6bb9bb274d6750f954762454807a5a7" args="" -->
44
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xbee_8c.html#e6bb9bb274d6750f954762454807a5a7">XBEE_PAN_DEFAULT</a>&nbsp;&nbsp;&nbsp;0xFFFF</td></tr>
45

  
46
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Unset PAN, uses XBee default. <br></td></tr>
47
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="35f8b9d8e01e788f1e29928cba29f215"></a><!-- doxytag: member="xbee.c::XBEE_CHANNEL_DEFAULT" ref="35f8b9d8e01e788f1e29928cba29f215" args="" -->
48
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xbee_8c.html#35f8b9d8e01e788f1e29928cba29f215">XBEE_CHANNEL_DEFAULT</a>&nbsp;&nbsp;&nbsp;0</td></tr>
49

  
50
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Unset channel, uses XBee default. <br></td></tr>
51
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="93bbd21f7965e1697350f950cedff5c4"></a><!-- doxytag: member="xbee.c::XBEE_BROADCAST" ref="93bbd21f7965e1697350f950cedff5c4" args="" -->
52
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xbee_8c.html#93bbd21f7965e1697350f950cedff5c4">XBEE_BROADCAST</a>&nbsp;&nbsp;&nbsp;0xFFFF</td></tr>
53

  
54
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Broadcast to all robots in the PAN. <br></td></tr>
55
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bca7356c2b8183fd41b5ca9a82dd962b"></a><!-- doxytag: member="xbee.c::XBEE_OPTIONS_NONE" ref="bca7356c2b8183fd41b5ca9a82dd962b" args="" -->
56
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xbee_8c.html#bca7356c2b8183fd41b5ca9a82dd962b">XBEE_OPTIONS_NONE</a>&nbsp;&nbsp;&nbsp;0x00</td></tr>
57

  
58
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">No special options. <br></td></tr>
59
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cf9509013302590dca5ce3db63c64609"></a><!-- doxytag: member="xbee.c::XBEE_OPTIONS_DISABLE_RESPONSE" ref="cf9509013302590dca5ce3db63c64609" args="" -->
60
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xbee_8c.html#cf9509013302590dca5ce3db63c64609">XBEE_OPTIONS_DISABLE_RESPONSE</a>&nbsp;&nbsp;&nbsp;0x01</td></tr>
61

  
62
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Do not receive a TX_STATUS message from this packet. <br></td></tr>
63
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="57382f888360b5b19f0de3b6f1f7c5a3"></a><!-- doxytag: member="xbee.c::XBEE_OPTIONS_BROADCAST_ALL_PANS" ref="57382f888360b5b19f0de3b6f1f7c5a3" args="" -->
64
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xbee_8c.html#57382f888360b5b19f0de3b6f1f7c5a3">XBEE_OPTIONS_BROADCAST_ALL_PANS</a>&nbsp;&nbsp;&nbsp;0x04</td></tr>
65

  
66
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Send the packet to all PANS. <br></td></tr>
67
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7840d8b64c8bec12d8b8d32e845a638a"></a><!-- doxytag: member="xbee.c::XBEE_TX_STATUS" ref="7840d8b64c8bec12d8b8d32e845a638a" args="" -->
68
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xbee_8c.html#7840d8b64c8bec12d8b8d32e845a638a">XBEE_TX_STATUS</a>&nbsp;&nbsp;&nbsp;0x89</td></tr>
69

  
70
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A transmit status packet. <br></td></tr>
71
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c2b1262a3a1eb4a9f7ead366af71c32c"></a><!-- doxytag: member="xbee.c::XBEE_RX" ref="c2b1262a3a1eb4a9f7ead366af71c32c" args="" -->
72
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xbee_8c.html#c2b1262a3a1eb4a9f7ead366af71c32c">XBEE_RX</a>&nbsp;&nbsp;&nbsp;0x81</td></tr>
73

  
74
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A packet received from another XBee. <br></td></tr>
75
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="72aa42b35714e06ac26df31b06a8bf39"></a><!-- doxytag: member="xbee.c::XBEE_FRAME_START" ref="72aa42b35714e06ac26df31b06a8bf39" args="" -->
76
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>XBEE_FRAME_START</b>&nbsp;&nbsp;&nbsp;0x7E</td></tr>
77

  
78
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="be7468473089e3cdd2ed85cac2244d49"></a><!-- doxytag: member="xbee.c::XBEE_GET_PACKET_TIMEOUT" ref="be7468473089e3cdd2ed85cac2244d49" args="" -->
79
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>XBEE_GET_PACKET_TIMEOUT</b>&nbsp;&nbsp;&nbsp;1000</td></tr>
80

  
81
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e0fc9d7b1078703227c91e1352b708c5"></a><!-- doxytag: member="xbee.c::XBEE_FRAME_STATUS" ref="e0fc9d7b1078703227c91e1352b708c5" args="" -->
82
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>XBEE_FRAME_STATUS</b>&nbsp;&nbsp;&nbsp;0x8A</td></tr>
83

  
84
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="106780ab66c38464e90af25ae3cc73de"></a><!-- doxytag: member="xbee.c::XBEE_FRAME_AT_COMMAND" ref="106780ab66c38464e90af25ae3cc73de" args="" -->
85
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>XBEE_FRAME_AT_COMMAND</b>&nbsp;&nbsp;&nbsp;0x08</td></tr>
86

  
87
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ac9e8cc2d9fdda49b77aed7d9380bfde"></a><!-- doxytag: member="xbee.c::XBEE_FRAME_AT_COMMAND_RESPONSE" ref="ac9e8cc2d9fdda49b77aed7d9380bfde" args="" -->
88
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>XBEE_FRAME_AT_COMMAND_RESPONSE</b>&nbsp;&nbsp;&nbsp;0x88</td></tr>
89

  
90
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="31af21123fe9b33803cdf96626776d32"></a><!-- doxytag: member="xbee.c::XBEE_FRAME_TX_REQUEST_64" ref="31af21123fe9b33803cdf96626776d32" args="" -->
91
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>XBEE_FRAME_TX_REQUEST_64</b>&nbsp;&nbsp;&nbsp;0x00</td></tr>
92

  
93
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="30aa14f9ad880c0bdcd15d7b6dfe4e84"></a><!-- doxytag: member="xbee.c::XBEE_FRAME_TX_REQUEST_16" ref="30aa14f9ad880c0bdcd15d7b6dfe4e84" args="" -->
94
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>XBEE_FRAME_TX_REQUEST_16</b>&nbsp;&nbsp;&nbsp;0x01</td></tr>
95

  
96
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="301ee4ce1fc94e5c6ccd160a0bfa83a7"></a><!-- doxytag: member="xbee.c::XBEE_FRAME_TX_STATUS" ref="301ee4ce1fc94e5c6ccd160a0bfa83a7" args="" -->
97
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>XBEE_FRAME_TX_STATUS</b>&nbsp;&nbsp;&nbsp;XBEE_TX_STATUS</td></tr>
98

  
99
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ba621d0a00f41acc7e059b5abf4802ad"></a><!-- doxytag: member="xbee.c::XBEE_FRAME_RX_64" ref="ba621d0a00f41acc7e059b5abf4802ad" args="" -->
100
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>XBEE_FRAME_RX_64</b>&nbsp;&nbsp;&nbsp;0x80</td></tr>
101

  
102
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5b80e57bcad9ccaa20022e8d4968ec66"></a><!-- doxytag: member="xbee.c::XBEE_FRAME_RX_16" ref="5b80e57bcad9ccaa20022e8d4968ec66" args="" -->
103
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>XBEE_FRAME_RX_16</b>&nbsp;&nbsp;&nbsp;XBEE_RX</td></tr>
104

  
105
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="63d0ecb125d464ea34524e090648f70f"></a><!-- doxytag: member="xbee.c::XBEE_BUFFER_SIZE" ref="63d0ecb125d464ea34524e090648f70f" args="" -->
106
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>XBEE_BUFFER_SIZE</b>&nbsp;&nbsp;&nbsp;128</td></tr>
107

  
108
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b30af815d6e9494361629440f14e3716"></a><!-- doxytag: member="xbee.c::PACKET_BUFFER_SIZE" ref="b30af815d6e9494361629440f14e3716" args="" -->
109
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>PACKET_BUFFER_SIZE</b>&nbsp;&nbsp;&nbsp;108</td></tr>
110

  
111
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
112
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xbee_8c.html#2fbd69862a11b6bcc5cfdb9f182bcdb9">xbee_send_read_at_command</a> (char *command)</td></tr>
113

  
114
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g3d5fbb6aae8dda99240ec38108a645af">xbee_lib_init</a> ()</td></tr>
115

  
116
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize the XBee library.  <a href="group__xbee.html#g3d5fbb6aae8dda99240ec38108a645af"></a><br></td></tr>
117
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g9334ac71dca1ddd697b1a35a361ade6a">xbee_terminate</a> ()</td></tr>
118

  
119
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Uninitialize the XBee library.  <a href="group__xbee.html#g9334ac71dca1ddd697b1a35a361ade6a"></a><br></td></tr>
120
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</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>
121

  
122
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Send a packet to the XBee.  <a href="group__xbee.html#g7c44bc25fda954efde574ee8d735073c"></a><br></td></tr>
123
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g00fbdd9d849171588df736f8b608589d">xbee_get_packet</a> (unsigned char *dest)</td></tr>
124

  
125
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a packet from the XBee.  <a href="group__xbee.html#g00fbdd9d849171588df736f8b608589d"></a><br></td></tr>
126
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#gde50cbefd7ba8d7361ce2654a298748b">xbee_set_pan_id</a> (int id)</td></tr>
127

  
128
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the PAN ID for the XBee.  <a href="group__xbee.html#gde50cbefd7ba8d7361ce2654a298748b"></a><br></td></tr>
129
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g7755cd8db87703c9e9943153660b8052">xbee_get_pan_id</a> ()</td></tr>
130

  
131
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the XBee's PAN ID.  <a href="group__xbee.html#g7755cd8db87703c9e9943153660b8052"></a><br></td></tr>
132
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#gb93170c493c5cdfd43a7b640c6ed1d14">xbee_set_channel</a> (int channel)</td></tr>
133

  
134
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the channel the XBee is currently using.  <a href="group__xbee.html#gb93170c493c5cdfd43a7b640c6ed1d14"></a><br></td></tr>
135
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g133706db81f69ba0a3c169b7a3f42d2a">xbee_get_channel</a> (void)</td></tr>
136

  
137
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the channel the XBee is currently using.  <a href="group__xbee.html#g133706db81f69ba0a3c169b7a3f42d2a"></a><br></td></tr>
138
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g7c53e8a8492494a61ca306875d633309">xbee_get_address</a> ()</td></tr>
139

  
140
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the XBee's 16-bit address.  <a href="group__xbee.html#g7c53e8a8492494a61ca306875d633309"></a><br></td></tr>
141
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g1e9e3c2abf0ff683ca8e591c3851cf0a"></a><!-- doxytag: member="xbee.c::xbee_set_com_port" ref="g1e9e3c2abf0ff683ca8e591c3851cf0a" args="(char *port)" -->
142
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g1e9e3c2abf0ff683ca8e591c3851cf0a">xbee_set_com_port</a> (char *port)</td></tr>
143

  
144
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the com port on a computer, undefined on the robot. <br></td></tr>
145
<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
146
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="65685824a9cbbc9da05be520d0d80d12"></a><!-- doxytag: member="xbee.c::arrival_buf" ref="65685824a9cbbc9da05be520d0d80d12" args="[XBEE_BUFFER_SIZE]" -->
147
char&nbsp;</td><td class="memItemRight" valign="bottom"><b>arrival_buf</b> [XBEE_BUFFER_SIZE]</td></tr>
148

  
149
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b7ae7d59f0f2dabc258c678996b59b22"></a><!-- doxytag: member="xbee.c::buffer_last" ref="b7ae7d59f0f2dabc258c678996b59b22" args="" -->
150
volatile int&nbsp;</td><td class="memItemRight" valign="bottom"><b>buffer_last</b> = 0</td></tr>
151

  
152
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a38080e2a4d6f0497f3c2faf487a0952"></a><!-- doxytag: member="xbee.c::buffer_first" ref="a38080e2a4d6f0497f3c2faf487a0952" args="" -->
153
volatile int&nbsp;</td><td class="memItemRight" valign="bottom"><b>buffer_first</b> = 0</td></tr>
154

  
155
</table>
156
<hr><a name="_details"></a><h2>Detailed Description</h2>
157
XBee Interface. 
158
<p>
159
Copyright (c) 2009 Colony Project<p>
160
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:<p>
161
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.<p>
162
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<p>
163
Implementation of low level communication with the XBee in API mode.<p>
164
<dl class="author" compact><dt><b>Author:</b></dt><dd>Colony Project, CMU Robotics Club </dd></dl>
165
<hr><h2>Define Documentation</h2>
166
<a class="anchor" name="fd0466c206d7e1f82ee407d114468e96"></a><!-- doxytag: member="xbee.c::XBEE_PORT_DEFAULT" ref="fd0466c206d7e1f82ee407d114468e96" args="" -->
167
<div class="memitem">
168
<div class="memproto">
169
      <table class="memname">
170
        <tr>
171
          <td class="memname">#define XBEE_PORT_DEFAULT&nbsp;&nbsp;&nbsp;&quot;/dev/ttyUSB1&quot;          </td>
172
        </tr>
173
      </table>
174
</div>
175
<div class="memdoc">
176

  
177
<p>
178
The port to use the XBee from on the computer. Also, a backup port if the other is used. 
179
</div>
180
</div><p>
181
<hr><h2>Function Documentation</h2>
182
<a class="anchor" name="2fbd69862a11b6bcc5cfdb9f182bcdb9"></a><!-- doxytag: member="xbee.c::xbee_send_read_at_command" ref="2fbd69862a11b6bcc5cfdb9f182bcdb9" args="(char *command)" -->
183
<div class="memitem">
184
<div class="memproto">
185
      <table class="memname">
186
        <tr>
187
          <td class="memname">int xbee_send_read_at_command           </td>
188
          <td>(</td>
189
          <td class="paramtype">char *&nbsp;</td>
190
          <td class="paramname"> <em>command</em>          </td>
191
          <td>&nbsp;)&nbsp;</td>
192
          <td></td>
193
        </tr>
194
      </table>
195
</div>
196
<div class="memdoc">
197

  
198
<p>
199
Sends an AT command to read a parameter.<p>
200
<dl compact><dt><b>Parameters:</b></dt><dd>
201
  <table border="0" cellspacing="2" cellpadding="0">
202
    <tr><td valign="top"></td><td valign="top"><em>command</em>&nbsp;</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>
203
  </table>
204
</dl>
205

  
206
</div>
207
</div><p>
208
</div>
209
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Nov 20 21:51:16 2009 for Colony by&nbsp;
210
<a href="http://www.doxygen.org/index.html">
211
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
212
</body>
213
</html>
branches/wireless/docs/libwireless/html/tabs.css
1
/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */
2

  
3
DIV.tabs
4
{
5
   float            : left;
6
   width            : 100%;
7
   background       : url("tab_b.gif") repeat-x bottom;
8
   margin-bottom    : 4px;
9
}
10

  
11
DIV.tabs UL
12
{
13
   margin           : 0px;
14
   padding-left     : 10px;
15
   list-style       : none;
16
}
17

  
18
DIV.tabs LI, DIV.tabs FORM
19
{
20
   display          : inline;
21
   margin           : 0px;
22
   padding          : 0px;
23
}
24

  
25
DIV.tabs FORM
26
{
27
   float            : right;
28
}
29

  
30
DIV.tabs A
31
{
32
   float            : left;
33
   background       : url("tab_r.gif") no-repeat right top;
34
   border-bottom    : 1px solid #84B0C7;
35
   font-size        : 80%;
36
   font-weight      : bold;
37
   text-decoration  : none;
38
}
39

  
40
DIV.tabs A:hover
41
{
42
   background-position: 100% -150px;
43
}
44

  
45
DIV.tabs A:link, DIV.tabs A:visited,
46
DIV.tabs A:active, DIV.tabs A:hover
47
{
48
       color: #1A419D;
49
}
50

  
51
DIV.tabs SPAN
52
{
53
   float            : left;
54
   display          : block;
55
   background       : url("tab_l.gif") no-repeat left top;
56
   padding          : 5px 9px;
57
   white-space      : nowrap;
58
}
59

  
60
DIV.tabs INPUT
61
{
62
   float            : right;
63
   display          : inline;
64
   font-size        : 1em;
65
}
66

  
67
DIV.tabs TD
68
{
69
   font-size        : 80%;
70
   font-weight      : bold;
71
   text-decoration  : none;
72
}
73

  
74

  
75

  
76
/* Commented Backslash Hack hides rule from IE5-Mac \*/
77
DIV.tabs SPAN {float : none;}
78
/* End IE5-Mac hack */
79

  
80
DIV.tabs A:hover SPAN
81
{
82
   background-position: 0% -150px;
83
}
84

  
85
DIV.tabs LI.current A
86
{
87
   background-position: 100% -150px;
88
   border-width     : 0px;
89
}
90

  
91
DIV.tabs LI.current SPAN
92
{
93
   background-position: 0% -150px;
94
   padding-bottom   : 6px;
95
}
96

  
97
DIV.navpath
98
{
99
   background       : none;
100
   border           : none;
101
   border-bottom    : 1px solid #84B0C7;
102
   text-align       : center;
103
   margin           : 2px;
104
   padding          : 2px;
105
}
branches/wireless/docs/libwireless/html/wl__defs_8h-source.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: wl_defs.h Source File</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 -->
8
<div class="navigation" id="top">
9
  <div class="tabs">
10
    <ul>
11
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12
      <li><a href="modules.html"><span>Modules</span></a></li>
13
      <li class="current"><a href="files.html"><span>Files</span></a></li>
14
    </ul>
15
  </div>
16
  <div class="tabs">
17
    <ul>
18
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
19
      <li><a href="globals.html"><span>Globals</span></a></li>
20
    </ul>
21
  </div>
22
<h1>wl_defs.h</h1><a href="wl__defs_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
23
<a name="l00035"></a>00035 <span class="preprocessor">#ifndef WL_DEFS_H</span>
24
<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#define WL_DEFS_H</span>
25
<a name="l00037"></a>00037 <span class="preprocessor"></span>
26
<a name="l00038"></a>00038 <span class="comment">// need this for C99 int types</span>
27
<a name="l00039"></a>00039 <span class="preprocessor">#ifndef STDINT_H</span>
28
<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#define STDINT_H</span>
29
<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#include &lt;stdint.h&gt;</span>
30
<a name="l00042"></a>00042 <span class="preprocessor">#endif</span>
31
<a name="l00043"></a>00043 <span class="preprocessor"></span>
32
<a name="l00044"></a>00044 <span class="comment">// ***** TODO: these next two defines should be moved to makefile options</span>
33
<a name="l00045"></a>00045 
34
<a name="l00046"></a>00046 <span class="comment">//comment out this line if using a computer hooked up to an xbee</span>
35
<a name="l00047"></a>00047 <span class="comment">//#define ROBOT</span>
36
<a name="l00048"></a>00048 
37
<a name="l00049"></a>00049 <span class="comment">//uncomment this line for debug information</span>
38
<a name="l00050"></a>00050 <span class="comment">//#define WL_DEBUG</span>
39
<a name="l00051"></a>00051 
40
<a name="l00052"></a>00052 
41
<a name="l00053"></a>00053 <span class="comment">// Error Codes</span>
42
<a name="l00054"></a>00054 
43
<a name="l00056"></a><a class="code" href="wl__defs_8h.html#798466231ef137f248b55dbfbce36fd7">00056</a> <span class="preprocessor">#define WL_ERROR_INIT_FAILED INT8_C(-1) </span>
44
<a name="l00057"></a>00057 <span class="preprocessor"></span>
45
<a name="l00058"></a><a class="code" href="wl__defs_8h.html#63e64a790913362ecf505e1a7e8347b8">00058</a> <span class="preprocessor">#define WL_ERROR_INIT_ALREADY_INITD INT8_C(-2) </span>
46
<a name="l00059"></a>00059 <span class="preprocessor"></span>
47
<a name="l00060"></a><a class="code" href="wl__defs_8h.html#099f03f9edae294ce4989433f73c141e">00060</a> <span class="preprocessor">#define WL_ERROR_LIBRARY_NOT_INITD INT8_C(-3) </span>
48
<a name="l00061"></a>00061 <span class="preprocessor"></span>
49
<a name="l00062"></a>00062 
50
<a name="l00063"></a>00063 <span class="preprocessor">#ifdef WL_DEBUG</span>
51
<a name="l00064"></a>00064 <span class="preprocessor"></span>
52
<a name="l00065"></a>00065 <span class="preprocessor">#ifdef ROBOT</span>
53
<a name="l00066"></a>00066 <span class="preprocessor"></span><span class="preprocessor">#include &lt;serial.h&gt;</span>
54
<a name="l00067"></a>00067 <span class="preprocessor">#define WL_DEBUG_PRINT( s ) usb_puts( s )</span>
55
<a name="l00068"></a>00068 <span class="preprocessor"></span><span class="preprocessor">#define WL_DEBUG_PRINT_CHAR( c ) usb_putc( c )</span>
56
<a name="l00069"></a>00069 <span class="preprocessor"></span><span class="preprocessor">#define WL_DEBUG_PRINT_INT( i ) usb_puti(i)</span>
57
<a name="l00070"></a>00070 <span class="preprocessor"></span><span class="preprocessor">#else</span>
58
<a name="l00071"></a>00071 <span class="preprocessor"></span><span class="preprocessor">#define WL_DEBUG_PRINT( s ) printf( s )</span>
59
<a name="l00072"></a>00072 <span class="preprocessor"></span><span class="preprocessor">#define WL_DEBUG_PRINT_CHAR( c ) printf("%c", c)</span>
60
<a name="l00073"></a>00073 <span class="preprocessor"></span><span class="preprocessor">#define WL_DEBUG_PRINT_INT( i ) printf("%i", i)</span>
61
<a name="l00074"></a>00074 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
62
<a name="l00075"></a>00075 <span class="preprocessor"></span>
63
<a name="l00076"></a>00076 <span class="preprocessor">#else</span>
64
<a name="l00077"></a>00077 <span class="preprocessor"></span>
65
<a name="l00078"></a>00078 <span class="preprocessor">#define WL_DEBUG_PRINT( s )</span>
66
<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">#define WL_DEBUG_PRINT_CHAR( c )</span>
67
<a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor">#define WL_DEBUG_PRINT_INT( i )</span>
68
<a name="l00081"></a>00081 <span class="preprocessor"></span>
69
<a name="l00082"></a>00082 <span class="preprocessor">#endif</span>
70
<a name="l00083"></a>00083 <span class="preprocessor"></span>
71
<a name="l00084"></a>00084 <span class="preprocessor">#endif</span>
72
</pre></div></div>
73
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Nov 20 21:51:16 2009 for Colony by&nbsp;
74
<a href="http://www.doxygen.org/index.html">
75
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
76
</body>
77
</html>
branches/wireless/docs/libwireless/html/xbee_8h-source.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.h Source File</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 -->
8
<div class="navigation" id="top">
9
  <div class="tabs">
10
    <ul>
11
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12
      <li><a href="modules.html"><span>Modules</span></a></li>
13
      <li class="current"><a href="files.html"><span>Files</span></a></li>
14
    </ul>
15
  </div>
16
  <div class="tabs">
17
    <ul>
18
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
19
      <li><a href="globals.html"><span>Globals</span></a></li>
20
    </ul>
21
  </div>
22
<h1>xbee.h</h1><a href="xbee_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
23
<a name="l00038"></a>00038 <span class="preprocessor">#ifndef XBEE_H</span>
24
<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#define XBEE_H</span>
25
<a name="l00040"></a>00040 <span class="preprocessor"></span>
26
<a name="l00041"></a>00041 <span class="comment">// need this for C99 int types</span>
27
<a name="l00042"></a>00042 <span class="preprocessor">#ifndef STDINT_H</span>
28
<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#define STDINT_H</span>
29
<a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#include &lt;stdint.h&gt;</span>
30
<a name="l00045"></a>00045 <span class="preprocessor">#endif</span>
31
<a name="l00046"></a>00046 <span class="preprocessor"></span>
32
<a name="l00047"></a>00047 
33
<a name="l00058"></a>00058 <span class="comment">// TODO: convert all int references to int16_t syntax (see stdint.h)</span>
34
<a name="l00059"></a>00059 
35
<a name="l00061"></a>00061 <span class="keywordtype">int</span> <a class="code" href="group__xbee.html#g3d5fbb6aae8dda99240ec38108a645af" title="Initialize the XBee library.">xbee_lib_init</a>(<span class="keywordtype">void</span>);
36
<a name="l00063"></a>00063 <span class="keywordtype">void</span> <a class="code" href="group__xbee.html#g9334ac71dca1ddd697b1a35a361ade6a" title="Uninitialize the XBee library.">xbee_terminate</a>(<span class="keywordtype">void</span>);
37
<a name="l00065"></a>00065 <span class="keywordtype">int</span> <a class="code" href="group__xbee.html#g00fbdd9d849171588df736f8b608589d" title="Get a packet from the XBee.">xbee_get_packet</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* packet);
38
<a name="l00067"></a>00067 <span class="keywordtype">int</span> <a class="code" href="group__xbee.html#g7c44bc25fda954efde574ee8d735073c" title="Send a packet to the XBee.">xbee_send_packet</a>(<span class="keywordtype">char</span>* packet, <span class="keywordtype">int</span> len, <span class="keywordtype">int</span> dest, <span class="keywordtype">char</span> options, <span class="keywordtype">char</span> frame);
39
<a name="l00069"></a>00069 <span class="keywordtype">int</span> <a class="code" href="group__xbee.html#gde50cbefd7ba8d7361ce2654a298748b" title="Set the PAN ID for the XBee.">xbee_set_pan_id</a>(<span class="keywordtype">int</span> <span class="keywordtype">id</span>);
40
<a name="l00071"></a>00071 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="group__xbee.html#g7755cd8db87703c9e9943153660b8052" title="Get the XBee&amp;#39;s PAN ID.">xbee_get_pan_id</a>(<span class="keywordtype">void</span>);
41
<a name="l00073"></a>00073 <span class="keywordtype">int</span> <a class="code" href="group__xbee.html#gb93170c493c5cdfd43a7b640c6ed1d14" title="Set the channel the XBee is currently using.">xbee_set_channel</a>(<span class="keywordtype">int</span> channel);
42
<a name="l00075"></a>00075 <span class="keywordtype">int</span> <a class="code" href="group__xbee.html#g133706db81f69ba0a3c169b7a3f42d2a" title="Get the channel the XBee is currently using.">xbee_get_channel</a>(<span class="keywordtype">void</span>);
43
<a name="l00077"></a>00077 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="group__xbee.html#g7c53e8a8492494a61ca306875d633309" title="Get the XBee&amp;#39;s 16-bit address.">xbee_get_address</a>(<span class="keywordtype">void</span>);
44
<a name="l00079"></a>00079 <span class="keywordtype">void</span> <a class="code" href="group__xbee.html#g1e9e3c2abf0ff683ca8e591c3851cf0a" title="Set the com port on a computer, undefined on the robot.">xbee_set_com_port</a>(<span class="keywordtype">char</span>* port);
45
<a name="l00081"></a>00081 <span class="keywordtype">int</span> <a class="code" href="group__xbee.html#gfcfccfa7323041108202275eba913be7" title="Reset XBee.">xbee_reset</a>(<span class="keywordtype">void</span>);
46
<a name="l00082"></a>00082  <span class="comment">//end defgroup</span>
47
<a name="l00084"></a>00084 
48
<a name="l00085"></a>00085 <span class="preprocessor">#endif</span>
49
</pre></div></div>
50
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Nov 20 21:51:16 2009 for Colony by&nbsp;
51
<a href="http://www.doxygen.org/index.html">
52
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
53
</body>
54
</html>
branches/wireless/docs/libwireless/html/wl__defs_8h.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: wl_defs.h File Reference</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 -->
8
<div class="navigation" id="top">
9
  <div class="tabs">
10
    <ul>
11
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12
      <li><a href="modules.html"><span>Modules</span></a></li>
13
      <li class="current"><a href="files.html"><span>Files</span></a></li>
14
    </ul>
15
  </div>
16
  <div class="tabs">
17
    <ul>
18
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
19
      <li><a href="globals.html"><span>Globals</span></a></li>
20
    </ul>
21
  </div>
22
</div>
23
<div class="contents">
24
<h1>wl_defs.h File Reference</h1>Definitions for Wireless.  
25
<a href="#_details">More...</a>
26
<p>
27
<code>#include &lt;stdint.h&gt;</code><br>
28

  
29
<p>
30
<a href="wl__defs_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
31
<tr><td></td></tr>
32
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
33
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="798466231ef137f248b55dbfbce36fd7"></a><!-- doxytag: member="wl_defs.h::WL_ERROR_INIT_FAILED" ref="798466231ef137f248b55dbfbce36fd7" args="" -->
34
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="wl__defs_8h.html#798466231ef137f248b55dbfbce36fd7">WL_ERROR_INIT_FAILED</a>&nbsp;&nbsp;&nbsp;INT8_C(-1)</td></tr>
35

  
36
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Error code for init failure. <br></td></tr>
37
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="63e64a790913362ecf505e1a7e8347b8"></a><!-- doxytag: member="wl_defs.h::WL_ERROR_INIT_ALREADY_INITD" ref="63e64a790913362ecf505e1a7e8347b8" args="" -->
38
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="wl__defs_8h.html#63e64a790913362ecf505e1a7e8347b8">WL_ERROR_INIT_ALREADY_INITD</a>&nbsp;&nbsp;&nbsp;INT8_C(-2)</td></tr>
39

  
40
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Error code for duplicate init calls. <br></td></tr>
41
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="099f03f9edae294ce4989433f73c141e"></a><!-- doxytag: member="wl_defs.h::WL_ERROR_LIBRARY_NOT_INITD" ref="099f03f9edae294ce4989433f73c141e" args="" -->
42
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="wl__defs_8h.html#099f03f9edae294ce4989433f73c141e">WL_ERROR_LIBRARY_NOT_INITD</a>&nbsp;&nbsp;&nbsp;INT8_C(-3)</td></tr>
43

  
44
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Error code for not calling init. <br></td></tr>
45
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="eaadbf5f5646a5b3ec10510b93ce2968"></a><!-- doxytag: member="wl_defs.h::WL_DEBUG_PRINT" ref="eaadbf5f5646a5b3ec10510b93ce2968" args="(s)" -->
46
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>WL_DEBUG_PRINT</b>(s)</td></tr>
47

  
48
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="29bb4a52f41ee104dbc7dc1db4d14695"></a><!-- doxytag: member="wl_defs.h::WL_DEBUG_PRINT_CHAR" ref="29bb4a52f41ee104dbc7dc1db4d14695" args="(c)" -->
49
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>WL_DEBUG_PRINT_CHAR</b>(c)</td></tr>
50

  
51
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5376a3f9ed20dca1ca62ab0082b17886"></a><!-- doxytag: member="wl_defs.h::WL_DEBUG_PRINT_INT" ref="5376a3f9ed20dca1ca62ab0082b17886" args="(i)" -->
52
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>WL_DEBUG_PRINT_INT</b>(i)</td></tr>
53

  
54
</table>
55
<hr><a name="_details"></a><h2>Detailed Description</h2>
56
Definitions for Wireless. 
57
<p>
58
Copyright (c) 2009 Colony Project<p>
59
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:<p>
60
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.<p>
61
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<p>
62
Contains definitions for wireless, debugging information, etc.<p>
63
<dl class="author" compact><dt><b>Author:</b></dt><dd>Colony Project, CMU Robotics Club </dd></dl>
64
</div>
65
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Nov 20 21:51:16 2009 for Colony by&nbsp;
66
<a href="http://www.doxygen.org/index.html">
67
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
68
</body>
69
</html>
branches/wireless/docs/libwireless/html/xbee_8h.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.h File Reference</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 -->
8
<div class="navigation" id="top">
9
  <div class="tabs">
10
    <ul>
11
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12
      <li><a href="modules.html"><span>Modules</span></a></li>
13
      <li class="current"><a href="files.html"><span>Files</span></a></li>
14
    </ul>
15
  </div>
16
  <div class="tabs">
17
    <ul>
18
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
19
      <li><a href="globals.html"><span>Globals</span></a></li>
20
    </ul>
21
  </div>
22
</div>
23
<div class="contents">
24
<h1>xbee.h File Reference</h1>Contains definitions for using the XBee.  
25
<a href="#_details">More...</a>
26
<p>
27
<code>#include &lt;stdint.h&gt;</code><br>
28

  
29
<p>
30
<a href="xbee_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
31
<tr><td></td></tr>
32
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
33
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g3d5fbb6aae8dda99240ec38108a645af">xbee_lib_init</a> (void)</td></tr>
34

  
35
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize the XBee library.  <a href="group__xbee.html#g3d5fbb6aae8dda99240ec38108a645af"></a><br></td></tr>
36
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g9334ac71dca1ddd697b1a35a361ade6a">xbee_terminate</a> (void)</td></tr>
37

  
38
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Uninitialize the XBee library.  <a href="group__xbee.html#g9334ac71dca1ddd697b1a35a361ade6a"></a><br></td></tr>
39
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g00fbdd9d849171588df736f8b608589d">xbee_get_packet</a> (unsigned char *packet)</td></tr>
40

  
41
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a packet from the XBee.  <a href="group__xbee.html#g00fbdd9d849171588df736f8b608589d"></a><br></td></tr>
42
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</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>
43

  
44
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Send a packet to the XBee.  <a href="group__xbee.html#g7c44bc25fda954efde574ee8d735073c"></a><br></td></tr>
45
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#gde50cbefd7ba8d7361ce2654a298748b">xbee_set_pan_id</a> (int id)</td></tr>
46

  
47
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the PAN ID for the XBee.  <a href="group__xbee.html#gde50cbefd7ba8d7361ce2654a298748b"></a><br></td></tr>
48
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g7755cd8db87703c9e9943153660b8052">xbee_get_pan_id</a> (void)</td></tr>
49

  
50
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the XBee's PAN ID.  <a href="group__xbee.html#g7755cd8db87703c9e9943153660b8052"></a><br></td></tr>
51
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#gb93170c493c5cdfd43a7b640c6ed1d14">xbee_set_channel</a> (int channel)</td></tr>
52

  
53
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the channel the XBee is currently using.  <a href="group__xbee.html#gb93170c493c5cdfd43a7b640c6ed1d14"></a><br></td></tr>
54
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g133706db81f69ba0a3c169b7a3f42d2a">xbee_get_channel</a> (void)</td></tr>
55

  
56
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the channel the XBee is currently using.  <a href="group__xbee.html#g133706db81f69ba0a3c169b7a3f42d2a"></a><br></td></tr>
57
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g7c53e8a8492494a61ca306875d633309">xbee_get_address</a> (void)</td></tr>
58

  
59
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the XBee's 16-bit address.  <a href="group__xbee.html#g7c53e8a8492494a61ca306875d633309"></a><br></td></tr>
60
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g1e9e3c2abf0ff683ca8e591c3851cf0a"></a><!-- doxytag: member="xbee.h::xbee_set_com_port" ref="g1e9e3c2abf0ff683ca8e591c3851cf0a" args="(char *port)" -->
61
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g1e9e3c2abf0ff683ca8e591c3851cf0a">xbee_set_com_port</a> (char *port)</td></tr>
62

  
63
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the com port on a computer, undefined on the robot. <br></td></tr>
64
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gfcfccfa7323041108202275eba913be7"></a><!-- doxytag: member="xbee.h::xbee_reset" ref="gfcfccfa7323041108202275eba913be7" args="(void)" -->
65
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#gfcfccfa7323041108202275eba913be7">xbee_reset</a> (void)</td></tr>
66

  
67
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reset XBee. <br></td></tr>
68
</table>
69
<hr><a name="_details"></a><h2>Detailed Description</h2>
70
Contains definitions for using the XBee. 
71
<p>
72
Copyright (c) 2009 Colony Project<p>
73
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:<p>
74
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.<p>
75
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<p>
76
Contains definitions for interfacing with the XBee module, from either a robot or a computer. To use a robot, define ROBOT in <a class="el" href="wl__defs_8h.html" title="Definitions for Wireless.">wl_defs.h</a>, and to use a computer, don't define ROBOT.<p>
77
<dl class="author" compact><dt><b>Author:</b></dt><dd>Colony Project, CMU Robotics Club </dd></dl>
78
</div>
79
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Nov 20 21:51:16 2009 for Colony by&nbsp;
80
<a href="http://www.doxygen.org/index.html">
81
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
82
</body>
83
</html>
branches/wireless/docs/libwireless/html/globals.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: Data Fields</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 -->
8
<div class="navigation" id="top">
9
  <div class="tabs">
10
    <ul>
11
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12
      <li><a href="modules.html"><span>Modules</span></a></li>
13
      <li class="current"><a href="files.html"><span>Files</span></a></li>
14
    </ul>
15
  </div>
16
  <div class="tabs">
17
    <ul>
18
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
19
      <li class="current"><a href="globals.html"><span>Globals</span></a></li>
20
    </ul>
21
  </div>
22
  <div class="tabs">
23
    <ul>
24
      <li class="current"><a href="globals.html"><span>All</span></a></li>
25
      <li><a href="globals_func.html"><span>Functions</span></a></li>
26
      <li><a href="globals_defs.html"><span>Defines</span></a></li>
27
    </ul>
28
  </div>
29
  <div class="tabs">
30
    <ul>
31
      <li><a href="#index_w"><span>w</span></a></li>
32
      <li><a href="#index_x"><span>x</span></a></li>
33
    </ul>
34
  </div>
35
</div>
36
<div class="contents">
37
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:
38
<p>
39
<h3><a class="anchor" name="index_w">- w -</a></h3><ul>
40
<li>wl_ack_error()
41
: <a class="el" href="group__wireless.html#g11aeeac54834f0357794ae60a7513acf">wireless.h</a>
42
<li>wl_dispatch()
43
: <a class="el" href="group__wireless.html#ge91c1e1940dfbbd063fdcfb86049c64a">wireless.h</a>
44
<li>WL_ERROR_INIT_ALREADY_INITD
45
: <a class="el" href="wl__defs_8h.html#63e64a790913362ecf505e1a7e8347b8">wl_defs.h</a>
46
<li>WL_ERROR_INIT_FAILED
47
: <a class="el" href="wl__defs_8h.html#798466231ef137f248b55dbfbce36fd7">wl_defs.h</a>
48
<li>WL_ERROR_LIBRARY_NOT_INITD
49
: <a class="el" href="wl__defs_8h.html#099f03f9edae294ce4989433f73c141e">wl_defs.h</a>
50
<li>wl_get()
51
: <a class="el" href="group__wireless.html#ga5a965e3443e4b2b60243225c50ecca7">wireless.h</a>
52
<li>wl_get_basic()
53
: <a class="el" href="group__wireless.html#ge2509e2b6bc61faa26d87b1d87881817">wireless.h</a>
54
<li>wl_init()
55
: <a class="el" href="group__wireless.html#g6a8d6179b1fe27f762937f0b47af2009">wireless.c</a>
56
<li>wl_register_handler()
57
: <a class="el" href="group__wireless.html#g8af34a6265a5d6af3a1525bb51e61d54">wireless.c</a>
58
<li>wl_send()
59
: <a class="el" href="group__wireless.html#gaa4e0d7014a74d0d59c08f9fbbf40bd7">wireless.h</a>
60
<li>wl_send_basic()
61
: <a class="el" href="group__wireless.html#ga8fb657e4d3bf7cb396f36e99fdd01a0">wireless.h</a>
62
<li>wl_send_global()
63
: <a class="el" href="group__wireless.html#gd92093466d82f3f0c732ffe8323228d2">wireless.h</a>
64
<li>wl_send_pan()
65
: <a class="el" href="group__wireless.html#g7886c2a37b7350211699dcabe48ff076">wireless.h</a>
66
<li>wl_send_robot()
67
: <a class="el" href="group__wireless.html#gbb08f7957bd0256c51f424fa770d3e60">wireless.h</a>
68
<li>wl_terminate()
69
: <a class="el" href="group__wireless.html#g223f437c2bc8ab8a3ac2e0e06841120f">wireless.c</a>
70
</ul>
71
<h3><a class="anchor" name="index_x">- x -</a></h3><ul>
72
<li>XBEE_BROADCAST
73
: <a class="el" href="xbee_8c.html#93bbd21f7965e1697350f950cedff5c4">xbee.c</a>
74
<li>XBEE_CHANNEL_DEFAULT
75
: <a class="el" href="xbee_8c.html#35f8b9d8e01e788f1e29928cba29f215">xbee.c</a>
76
<li>xbee_get_address()
77
: <a class="el" href="group__xbee.html#g7c53e8a8492494a61ca306875d633309">xbee.h</a>
78
, <a class="el" href="group__xbee.html#g7c53e8a8492494a61ca306875d633309">xbee.c</a>
79
<li>xbee_get_channel()
80
: <a class="el" href="group__xbee.html#g133706db81f69ba0a3c169b7a3f42d2a">xbee.c</a>
81
, <a class="el" href="group__xbee.html#g133706db81f69ba0a3c169b7a3f42d2a">xbee.h</a>
82
<li>xbee_get_packet()
83
: <a class="el" href="group__xbee.html#g00fbdd9d849171588df736f8b608589d">xbee.h</a>
84
, <a class="el" href="group__xbee.html#g00fbdd9d849171588df736f8b608589d">xbee.c</a>
85
<li>xbee_get_pan_id()
86
: <a class="el" href="group__xbee.html#g7755cd8db87703c9e9943153660b8052">xbee.c</a>
87
, <a class="el" href="group__xbee.html#g7755cd8db87703c9e9943153660b8052">xbee.h</a>
88
<li>xbee_lib_init()
89
: <a class="el" href="group__xbee.html#g3d5fbb6aae8dda99240ec38108a645af">xbee.c</a>
90
, <a class="el" href="group__xbee.html#g3d5fbb6aae8dda99240ec38108a645af">xbee.h</a>
91
<li>XBEE_OPTIONS_BROADCAST_ALL_PANS
92
: <a class="el" href="xbee_8c.html#57382f888360b5b19f0de3b6f1f7c5a3">xbee.c</a>
93
<li>XBEE_OPTIONS_DISABLE_RESPONSE
94
: <a class="el" href="xbee_8c.html#cf9509013302590dca5ce3db63c64609">xbee.c</a>
95
<li>XBEE_OPTIONS_NONE
96
: <a class="el" href="xbee_8c.html#bca7356c2b8183fd41b5ca9a82dd962b">xbee.c</a>
97
<li>XBEE_PAN_DEFAULT
98
: <a class="el" href="xbee_8c.html#e6bb9bb274d6750f954762454807a5a7">xbee.c</a>
99
<li>XBEE_PORT_DEFAULT
100
: <a class="el" href="xbee_8c.html#fd0466c206d7e1f82ee407d114468e96">xbee.c</a>
101
<li>xbee_reset()
102
: <a class="el" href="group__xbee.html#gfcfccfa7323041108202275eba913be7">xbee.h</a>
103
<li>XBEE_RX
104
: <a class="el" href="xbee_8c.html#c2b1262a3a1eb4a9f7ead366af71c32c">xbee.c</a>
105
<li>xbee_send_packet()
106
: <a class="el" href="group__xbee.html#g7c44bc25fda954efde574ee8d735073c">xbee.c</a>
107
, <a class="el" href="group__xbee.html#g7c44bc25fda954efde574ee8d735073c">xbee.h</a>
108
<li>xbee_send_read_at_command()
109
: <a class="el" href="xbee_8c.html#2fbd69862a11b6bcc5cfdb9f182bcdb9">xbee.c</a>
110
<li>xbee_set_channel()
111
: <a class="el" href="group__xbee.html#gb93170c493c5cdfd43a7b640c6ed1d14">xbee.c</a>
112
, <a class="el" href="group__xbee.html#gb93170c493c5cdfd43a7b640c6ed1d14">xbee.h</a>
113
<li>xbee_set_com_port()
114
: <a class="el" href="group__xbee.html#g1e9e3c2abf0ff683ca8e591c3851cf0a">xbee.h</a>
115
, <a class="el" href="group__xbee.html#g1e9e3c2abf0ff683ca8e591c3851cf0a">xbee.c</a>
116
<li>xbee_set_pan_id()
117
: <a class="el" href="group__xbee.html#gde50cbefd7ba8d7361ce2654a298748b">xbee.c</a>
118
, <a class="el" href="group__xbee.html#gde50cbefd7ba8d7361ce2654a298748b">xbee.h</a>
119
<li>xbee_terminate()
120
: <a class="el" href="group__xbee.html#g9334ac71dca1ddd697b1a35a361ade6a">xbee.c</a>
121
, <a class="el" href="group__xbee.html#g9334ac71dca1ddd697b1a35a361ade6a">xbee.h</a>
122
<li>XBEE_TX_STATUS
123
: <a class="el" href="xbee_8c.html#7840d8b64c8bec12d8b8d32e845a638a">xbee.c</a>
124
</ul>
125
</div>
126
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Nov 20 21:51:16 2009 for Colony by&nbsp;
127
<a href="http://www.doxygen.org/index.html">
128
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
129
</body>
130
</html>
branches/wireless/docs/libwireless/html/globals_defs.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: Data Fields</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 -->
8
<div class="navigation" id="top">
9
  <div class="tabs">
10
    <ul>
11
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12
      <li><a href="modules.html"><span>Modules</span></a></li>
13
      <li class="current"><a href="files.html"><span>Files</span></a></li>
14
    </ul>
15
  </div>
16
  <div class="tabs">
17
    <ul>
18
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
19
      <li class="current"><a href="globals.html"><span>Globals</span></a></li>
20
    </ul>
21
  </div>
22
  <div class="tabs">
23
    <ul>
24
      <li><a href="globals.html"><span>All</span></a></li>
25
      <li><a href="globals_func.html"><span>Functions</span></a></li>
26
      <li class="current"><a href="globals_defs.html"><span>Defines</span></a></li>
27
    </ul>
28
  </div>
29
</div>
30
<div class="contents">
31
&nbsp;
32
<p>
33
<ul>
34
<li>WL_ERROR_INIT_ALREADY_INITD
35
: <a class="el" href="wl__defs_8h.html#63e64a790913362ecf505e1a7e8347b8">wl_defs.h</a>
36
<li>WL_ERROR_INIT_FAILED
37
: <a class="el" href="wl__defs_8h.html#798466231ef137f248b55dbfbce36fd7">wl_defs.h</a>
38
<li>WL_ERROR_LIBRARY_NOT_INITD
39
: <a class="el" href="wl__defs_8h.html#099f03f9edae294ce4989433f73c141e">wl_defs.h</a>
40
<li>XBEE_BROADCAST
41
: <a class="el" href="xbee_8c.html#93bbd21f7965e1697350f950cedff5c4">xbee.c</a>
42
<li>XBEE_CHANNEL_DEFAULT
43
: <a class="el" href="xbee_8c.html#35f8b9d8e01e788f1e29928cba29f215">xbee.c</a>
44
<li>XBEE_OPTIONS_BROADCAST_ALL_PANS
45
: <a class="el" href="xbee_8c.html#57382f888360b5b19f0de3b6f1f7c5a3">xbee.c</a>
46
<li>XBEE_OPTIONS_DISABLE_RESPONSE
47
: <a class="el" href="xbee_8c.html#cf9509013302590dca5ce3db63c64609">xbee.c</a>
48
<li>XBEE_OPTIONS_NONE
49
: <a class="el" href="xbee_8c.html#bca7356c2b8183fd41b5ca9a82dd962b">xbee.c</a>
50
<li>XBEE_PAN_DEFAULT
51
: <a class="el" href="xbee_8c.html#e6bb9bb274d6750f954762454807a5a7">xbee.c</a>
52
<li>XBEE_PORT_DEFAULT
53
: <a class="el" href="xbee_8c.html#fd0466c206d7e1f82ee407d114468e96">xbee.c</a>
54
<li>XBEE_RX
55
: <a class="el" href="xbee_8c.html#c2b1262a3a1eb4a9f7ead366af71c32c">xbee.c</a>
56
<li>XBEE_TX_STATUS
57
: <a class="el" href="xbee_8c.html#7840d8b64c8bec12d8b8d32e845a638a">xbee.c</a>
58
</ul>
59
</div>
60
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Nov 20 21:51:16 2009 for Colony by&nbsp;
61
<a href="http://www.doxygen.org/index.html">
62
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
63
</body>
64
</html>
branches/wireless/docs/libwireless/html/wireless_8c.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: wireless.c File Reference</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 -->
8
<div class="navigation" id="top">
9
  <div class="tabs">
10
    <ul>
11
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12
      <li><a href="modules.html"><span>Modules</span></a></li>
13
      <li class="current"><a href="files.html"><span>Files</span></a></li>
14
    </ul>
15
  </div>
16
  <div class="tabs">
17
    <ul>
18
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
19
      <li><a href="globals.html"><span>Globals</span></a></li>
20
    </ul>
21
  </div>
22
</div>
23
<div class="contents">
24
<h1>wireless.c File Reference</h1>Wireless library.  
25
<a href="#_details">More...</a>
26
<p>
27
<code>#include &quot;<a class="el" href="wl__defs_8h-source.html">wl_defs.h</a>&quot;</code><br>
28
<code>#include &quot;<a class="el" href="wireless_8h-source.html">wireless.h</a>&quot;</code><br>
29
<table border="0" cellpadding="0" cellspacing="0">
30
<tr><td></td></tr>
31
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
32
<tr><td class="memItemLeft" nowrap align="right" valign="top">int8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wireless.html#g6a8d6179b1fe27f762937f0b47af2009">wl_init</a> (void)</td></tr>
33

  
34
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize wireless.  <a href="group__wireless.html#g6a8d6179b1fe27f762937f0b47af2009"></a><br></td></tr>
35
<tr><td class="memItemLeft" nowrap align="right" valign="top">int8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wireless.html#g223f437c2bc8ab8a3ac2e0e06841120f">wl_terminate</a> (void)</td></tr>
36

  
37
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Terminate wireless.  <a href="group__wireless.html#g223f437c2bc8ab8a3ac2e0e06841120f"></a><br></td></tr>
38
<tr><td class="memItemLeft" nowrap align="right" valign="top">int8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wireless.html#g8af34a6265a5d6af3a1525bb51e61d54">wl_register_handler</a> (uint8_t group, void(*func)(void), uint8_t priority)</td></tr>
39

  
40
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function to register new packet handlers (for non-default groups only).  <a href="group__wireless.html#g8af34a6265a5d6af3a1525bb51e61d54"></a><br></td></tr>
41
</table>
42
<hr><a name="_details"></a><h2>Detailed Description</h2>
43
Wireless library. 
44
<p>
45
Copyright (c) 2009 Colony Project<p>
46
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:<p>
47
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.<p>
48
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<p>
49
Implementation of high level wireless communication.<p>
50
<dl class="author" compact><dt><b>Author:</b></dt><dd>Colony Project, CMU Robotics Club </dd></dl>
51
</div>
52
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Nov 20 21:51:16 2009 for Colony by&nbsp;
53
<a href="http://www.doxygen.org/index.html">
54
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
55
</body>
56
</html>
branches/wireless/docs/libwireless/html/wireless__receive_8c.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: wireless_receive.c File Reference</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 -->
8
<div class="navigation" id="top">
9
  <div class="tabs">
10
    <ul>
11
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12
      <li><a href="modules.html"><span>Modules</span></a></li>
13
      <li class="current"><a href="files.html"><span>Files</span></a></li>
14
    </ul>
15
  </div>
16
  <div class="tabs">
17
    <ul>
18
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
19
      <li><a href="globals.html"><span>Globals</span></a></li>
20
    </ul>
21
  </div>
22
</div>
23
<div class="contents">
24
<h1>wireless_receive.c File Reference</h1>Wireless library receive functions.  
25
<a href="#_details">More...</a>
26
<p>
27
<code>#include &quot;<a class="el" href="wl__defs_8h-source.html">wl_defs.h</a>&quot;</code><br>
28
<code>#include &quot;<a class="el" href="wireless_8h-source.html">wireless.h</a>&quot;</code><br>
29
<table border="0" cellpadding="0" cellspacing="0">
30
<tr><td></td></tr>
31
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
32
<tr><td class="memItemLeft" nowrap align="right" valign="top">int8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wireless.html#ga5a965e3443e4b2b60243225c50ecca7">wl_get</a> (char *data, uint8_t length)</td></tr>
33

  
34
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The main receive function. Dispatches packets for registered handlers and returns next basic packet if available.  <a href="group__wireless.html#ga5a965e3443e4b2b60243225c50ecca7"></a><br></td></tr>
35
<tr><td class="memItemLeft" nowrap align="right" valign="top">int8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wireless.html#ge2509e2b6bc61faa26d87b1d87881817">wl_get_basic</a> (char *data, uint8_t length)</td></tr>
36

  
37
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the next basic packet if available.  <a href="group__wireless.html#ge2509e2b6bc61faa26d87b1d87881817"></a><br></td></tr>
38
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ge91c1e1940dfbbd063fdcfb86049c64a"></a><!-- doxytag: member="wireless_receive.c::wl_dispatch" ref="ge91c1e1940dfbbd063fdcfb86049c64a" args="(void)" -->
39
int8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wireless.html#ge91c1e1940dfbbd063fdcfb86049c64a">wl_dispatch</a> (void)</td></tr>
40

  
41
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Dispatches packets for registered handlers. <br></td></tr>
42
</table>
43
<hr><a name="_details"></a><h2>Detailed Description</h2>
44
Wireless library receive functions. 
45
<p>
46
Copyright (c) 2009 Colony Project<p>
47
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:<p>
48
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.<p>
49
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<p>
50
Implementation of high level wireless communication. This is the receive functions portion of the library.<p>
51
<dl class="author" compact><dt><b>Author:</b></dt><dd>Colony Project, CMU Robotics Club </dd></dl>
52
</div>
53
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Nov 20 21:51:16 2009 for Colony by&nbsp;
54
<a href="http://www.doxygen.org/index.html">
55
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
56
</body>
57
</html>
branches/wireless/docs/libwireless/html/wireless_8h-source.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: wireless.h Source File</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 -->
8
<div class="navigation" id="top">
9
  <div class="tabs">
10
    <ul>
11
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12
      <li><a href="modules.html"><span>Modules</span></a></li>
13
      <li class="current"><a href="files.html"><span>Files</span></a></li>
14
    </ul>
15
  </div>
16
  <div class="tabs">
17
    <ul>
18
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
19
      <li><a href="globals.html"><span>Globals</span></a></li>
20
    </ul>
21
  </div>
22
<h1>wireless.h</h1><a href="wireless_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
23
<a name="l00036"></a>00036 <span class="preprocessor">#ifndef WIRELESS_H</span>
24
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define WIRELESS_H</span>
25
<a name="l00038"></a>00038 <span class="preprocessor"></span>
26
<a name="l00039"></a>00039 <span class="comment">// need this for C99 int types</span>
27
<a name="l00040"></a>00040 <span class="preprocessor">#ifndef STDINT_H</span>
28
<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#define STDINT_H</span>
29
<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#include &lt;stdint.h&gt;</span>
30
<a name="l00043"></a>00043 <span class="preprocessor">#endif</span>
31
<a name="l00044"></a>00044 <span class="preprocessor"></span>
32
<a name="l00045"></a>00045 
33
<a name="l00056"></a>00056 <span class="comment">// the init function</span>
34
<a name="l00057"></a>00057 
35
<a name="l00059"></a>00059 int8_t <a class="code" href="group__wireless.html#g6a8d6179b1fe27f762937f0b47af2009" title="Initialize wireless.">wl_init</a>(<span class="keywordtype">void</span>);
36
<a name="l00060"></a>00060 
37
<a name="l00062"></a>00062 int8_t <a class="code" href="group__wireless.html#g223f437c2bc8ab8a3ac2e0e06841120f" title="Terminate wireless.">wl_terminate</a>(<span class="keywordtype">void</span>);
38
<a name="l00063"></a>00063 
39
<a name="l00064"></a>00064 
40
<a name="l00065"></a>00065 <span class="comment">// the send functions</span>
41
<a name="l00066"></a>00066 
42
<a name="l00068"></a>00068 int8_t <a class="code" href="group__wireless.html#gaa4e0d7014a74d0d59c08f9fbbf40bd7" title="The core send function. This will take all possible arguments and send all types...">wl_send</a>(<span class="keywordtype">char</span> *data, uint8_t length, uint8_t group, uint8_t scope, uint8_t dest, uint8_t mode);
43
<a name="l00069"></a>00069 
44
<a name="l00071"></a>00071 int8_t <a class="code" href="group__wireless.html#gd92093466d82f3f0c732ffe8323228d2" title="Wrapper for core send function that will send a global packet across the current...">wl_send_global</a>(<span class="keywordtype">char</span> *data, uint8_t length, uint8_t group);
45
<a name="l00072"></a>00072 
46
<a name="l00074"></a>00074 int8_t <a class="code" href="group__wireless.html#g7886c2a37b7350211699dcabe48ff076" title="Wrapper for core send function that will send a packet across the current channel...">wl_send_pan</a>(<span class="keywordtype">char</span> *data, uint8_t length, uint8_t group);
47
<a name="l00075"></a>00075 
48
<a name="l00077"></a>00077 int8_t <a class="code" href="group__wireless.html#gbb08f7957bd0256c51f424fa770d3e60" title="Wrapper for core send function that will send a packet across the current channel...">wl_send_robot</a>(<span class="keywordtype">char</span> *data, uint8_t length, uint8_t group, uint8_t dest, uint8_t mode);
49
<a name="l00078"></a>00078 
50
<a name="l00080"></a>00080 int8_t <a class="code" href="group__wireless.html#ga8fb657e4d3bf7cb396f36e99fdd01a0" title="Default (i.e. basic) send wrapper.">wl_send_basic</a>(<span class="keywordtype">char</span> *data, uint8_t length);
51
<a name="l00081"></a>00081 
52
<a name="l00082"></a>00082 
53
<a name="l00083"></a>00083 <span class="comment">// the ack function</span>
54
<a name="l00084"></a>00084 
55
<a name="l00086"></a>00086 int8_t <a class="code" href="group__wireless.html#g11aeeac54834f0357794ae60a7513acf" title="Returns the number of acknowledgment errors, and resets number to zero.">wl_ack_error</a>(<span class="keywordtype">void</span>);
56
<a name="l00087"></a>00087 
57
<a name="l00088"></a>00088 
58
<a name="l00089"></a>00089 <span class="comment">// the receive functions</span>
59
<a name="l00090"></a>00090 
60
<a name="l00092"></a>00092 int8_t <a class="code" href="group__wireless.html#ga5a965e3443e4b2b60243225c50ecca7" title="The main receive function. Dispatches packets for registered handlers and returns...">wl_get</a>(<span class="keywordtype">char</span> *data, uint8_t length);
61
<a name="l00093"></a>00093 
62
<a name="l00095"></a>00095 int8_t <a class="code" href="group__wireless.html#ge2509e2b6bc61faa26d87b1d87881817" title="Returns the next basic packet if available.">wl_get_basic</a>(<span class="keywordtype">char</span> *data, uint8_t length);
63
<a name="l00096"></a>00096 
64
<a name="l00098"></a>00098 int8_t <a class="code" href="group__wireless.html#ge91c1e1940dfbbd063fdcfb86049c64a" title="Dispatches packets for registered handlers.">wl_dispatch</a>(<span class="keywordtype">void</span>);
65
<a name="l00099"></a>00099 
66
<a name="l00100"></a>00100 
67
<a name="l00101"></a>00101 <span class="comment">// the group register function</span>
68
<a name="l00102"></a>00102 
69
<a name="l00104"></a>00104 int8_t <a class="code" href="group__wireless.html#g8af34a6265a5d6af3a1525bb51e61d54" title="Function to register new packet handlers (for non-default groups only).">wl_register_handler</a>(uint8_t group, <span class="keywordtype">void</span> (*func)(<span class="keywordtype">void</span>), uint8_t priority);
70
<a name="l00105"></a>00105 
71
<a name="l00106"></a>00106  <span class="comment">//end defgroup</span>
72
<a name="l00108"></a>00108 
73
<a name="l00109"></a>00109 <span class="preprocessor">#endif</span>
74
</pre></div></div>
75
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Nov 20 21:51:16 2009 for Colony by&nbsp;
76
<a href="http://www.doxygen.org/index.html">
77
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
78
</body>
79
</html>
branches/wireless/docs/libwireless/html/wireless_8h.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: wireless.h File Reference</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 -->
8
<div class="navigation" id="top">
9
  <div class="tabs">
10
    <ul>
11
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12
      <li><a href="modules.html"><span>Modules</span></a></li>
13
      <li class="current"><a href="files.html"><span>Files</span></a></li>
14
    </ul>
15
  </div>
16
  <div class="tabs">
17
    <ul>
18
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
19
      <li><a href="globals.html"><span>Globals</span></a></li>
20
    </ul>
21
  </div>
22
</div>
23
<div class="contents">
24
<h1>wireless.h File Reference</h1>Contains definitions for using the wireless library.  
25
<a href="#_details">More...</a>
26
<p>
27
<code>#include &lt;stdint.h&gt;</code><br>
28

  
29
<p>
30
<a href="wireless_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
31
<tr><td></td></tr>
32
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
33
<tr><td class="memItemLeft" nowrap align="right" valign="top">int8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wireless.html#g6a8d6179b1fe27f762937f0b47af2009">wl_init</a> (void)</td></tr>
34

  
35
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize wireless.  <a href="group__wireless.html#g6a8d6179b1fe27f762937f0b47af2009"></a><br></td></tr>
36
<tr><td class="memItemLeft" nowrap align="right" valign="top">int8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wireless.html#g223f437c2bc8ab8a3ac2e0e06841120f">wl_terminate</a> (void)</td></tr>
37

  
38
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Terminate wireless.  <a href="group__wireless.html#g223f437c2bc8ab8a3ac2e0e06841120f"></a><br></td></tr>
39
<tr><td class="memItemLeft" nowrap align="right" valign="top">int8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wireless.html#gaa4e0d7014a74d0d59c08f9fbbf40bd7">wl_send</a> (char *data, uint8_t length, uint8_t group, uint8_t scope, uint8_t dest, uint8_t mode)</td></tr>
40

  
41
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The core send function. This will take all possible arguments and send all types of packets.  <a href="group__wireless.html#gaa4e0d7014a74d0d59c08f9fbbf40bd7"></a><br></td></tr>
42
<tr><td class="memItemLeft" nowrap align="right" valign="top">int8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wireless.html#gd92093466d82f3f0c732ffe8323228d2">wl_send_global</a> (char *data, uint8_t length, uint8_t group)</td></tr>
43

  
44
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Wrapper for core send function that will send a global packet across the current channel.  <a href="group__wireless.html#gd92093466d82f3f0c732ffe8323228d2"></a><br></td></tr>
45
<tr><td class="memItemLeft" nowrap align="right" valign="top">int8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wireless.html#g7886c2a37b7350211699dcabe48ff076">wl_send_pan</a> (char *data, uint8_t length, uint8_t group)</td></tr>
46

  
47
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Wrapper for core send function that will send a packet across the current channel on the current pan.  <a href="group__wireless.html#g7886c2a37b7350211699dcabe48ff076"></a><br></td></tr>
48
<tr><td class="memItemLeft" nowrap align="right" valign="top">int8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wireless.html#gbb08f7957bd0256c51f424fa770d3e60">wl_send_robot</a> (char *data, uint8_t length, uint8_t group, uint8_t dest, uint8_t mode)</td></tr>
49

  
50
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Wrapper for core send function that will send a packet across the current channel to a specific robot.  <a href="group__wireless.html#gbb08f7957bd0256c51f424fa770d3e60"></a><br></td></tr>
51
<tr><td class="memItemLeft" nowrap align="right" valign="top">int8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wireless.html#ga8fb657e4d3bf7cb396f36e99fdd01a0">wl_send_basic</a> (char *data, uint8_t length)</td></tr>
52

  
53
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default (i.e. basic) send wrapper.  <a href="group__wireless.html#ga8fb657e4d3bf7cb396f36e99fdd01a0"></a><br></td></tr>
54
<tr><td class="memItemLeft" nowrap align="right" valign="top">int8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wireless.html#g11aeeac54834f0357794ae60a7513acf">wl_ack_error</a> (void)</td></tr>
55

  
56
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of acknowledgment errors, and resets number to zero.  <a href="group__wireless.html#g11aeeac54834f0357794ae60a7513acf"></a><br></td></tr>
57
<tr><td class="memItemLeft" nowrap align="right" valign="top">int8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wireless.html#ga5a965e3443e4b2b60243225c50ecca7">wl_get</a> (char *data, uint8_t length)</td></tr>
58

  
59
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The main receive function. Dispatches packets for registered handlers and returns next basic packet if available.  <a href="group__wireless.html#ga5a965e3443e4b2b60243225c50ecca7"></a><br></td></tr>
60
<tr><td class="memItemLeft" nowrap align="right" valign="top">int8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wireless.html#ge2509e2b6bc61faa26d87b1d87881817">wl_get_basic</a> (char *data, uint8_t length)</td></tr>
61

  
62
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the next basic packet if available.  <a href="group__wireless.html#ge2509e2b6bc61faa26d87b1d87881817"></a><br></td></tr>
63
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ge91c1e1940dfbbd063fdcfb86049c64a"></a><!-- doxytag: member="wireless.h::wl_dispatch" ref="ge91c1e1940dfbbd063fdcfb86049c64a" args="(void)" -->
64
int8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wireless.html#ge91c1e1940dfbbd063fdcfb86049c64a">wl_dispatch</a> (void)</td></tr>
65

  
66
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Dispatches packets for registered handlers. <br></td></tr>
67
<tr><td class="memItemLeft" nowrap align="right" valign="top">int8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wireless.html#g8af34a6265a5d6af3a1525bb51e61d54">wl_register_handler</a> (uint8_t group, void(*func)(void), uint8_t priority)</td></tr>
68

  
69
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function to register new packet handlers (for non-default groups only).  <a href="group__wireless.html#g8af34a6265a5d6af3a1525bb51e61d54"></a><br></td></tr>
70
</table>
71
<hr><a name="_details"></a><h2>Detailed Description</h2>
72
Contains definitions for using the wireless library. 
73
<p>
74
Copyright (c) 2009 Colony Project<p>
75
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:<p>
76
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.<p>
77
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<p>
78
Contains definitions for interfacing with the wireless library.<p>
79
<dl class="author" compact><dt><b>Author:</b></dt><dd>Colony Project, CMU Robotics Club </dd></dl>
80
</div>
81
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Nov 20 21:51:16 2009 for Colony by&nbsp;
82
<a href="http://www.doxygen.org/index.html">
83
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
84
</body>
85
</html>
branches/wireless/docs/libwireless/html/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 -->
8
<div class="navigation" id="top">
9
  <div class="tabs">
10
    <ul>
11
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12
      <li><a href="modules.html"><span>Modules</span></a></li>
13
      <li><a href="files.html"><span>Files</span></a></li>
14
    </ul>
15
  </div>
16
</div>
17
<div class="contents">
18
<h1>XBee</h1>Interface with the XBee module.  
19
<a href="#_details">More...</a>
20
<p>
21
<table border="0" cellpadding="0" cellspacing="0">
22
<tr><td></td></tr>
23
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
24
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g3d5fbb6aae8dda99240ec38108a645af">xbee_lib_init</a> (void)</td></tr>
25

  
26
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize the XBee library.  <a href="#g3d5fbb6aae8dda99240ec38108a645af"></a><br></td></tr>
27
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g9334ac71dca1ddd697b1a35a361ade6a">xbee_terminate</a> (void)</td></tr>
28

  
29
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Uninitialize the XBee library.  <a href="#g9334ac71dca1ddd697b1a35a361ade6a"></a><br></td></tr>
30
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g00fbdd9d849171588df736f8b608589d">xbee_get_packet</a> (unsigned char *packet)</td></tr>
31

  
32
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a packet from the XBee.  <a href="#g00fbdd9d849171588df736f8b608589d"></a><br></td></tr>
33
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</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>
34

  
35
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Send a packet to the XBee.  <a href="#g7c44bc25fda954efde574ee8d735073c"></a><br></td></tr>
36
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#gde50cbefd7ba8d7361ce2654a298748b">xbee_set_pan_id</a> (int id)</td></tr>
37

  
38
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the PAN ID for the XBee.  <a href="#gde50cbefd7ba8d7361ce2654a298748b"></a><br></td></tr>
39
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g7755cd8db87703c9e9943153660b8052">xbee_get_pan_id</a> (void)</td></tr>
40

  
41
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the XBee's PAN ID.  <a href="#g7755cd8db87703c9e9943153660b8052"></a><br></td></tr>
42
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#gb93170c493c5cdfd43a7b640c6ed1d14">xbee_set_channel</a> (int channel)</td></tr>
43

  
44
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the channel the XBee is currently using.  <a href="#gb93170c493c5cdfd43a7b640c6ed1d14"></a><br></td></tr>
45
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g133706db81f69ba0a3c169b7a3f42d2a">xbee_get_channel</a> (void)</td></tr>
46

  
47
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the channel the XBee is currently using.  <a href="#g133706db81f69ba0a3c169b7a3f42d2a"></a><br></td></tr>
48
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g7c53e8a8492494a61ca306875d633309">xbee_get_address</a> (void)</td></tr>
49

  
50
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the XBee's 16-bit address.  <a href="#g7c53e8a8492494a61ca306875d633309"></a><br></td></tr>
51
<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)" -->
52
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#g1e9e3c2abf0ff683ca8e591c3851cf0a">xbee_set_com_port</a> (char *port)</td></tr>
53

  
54
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the com port on a computer, undefined on the robot. <br></td></tr>
55
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gfcfccfa7323041108202275eba913be7"></a><!-- doxytag: member="xbee::xbee_reset" ref="gfcfccfa7323041108202275eba913be7" args="(void)" -->
56
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xbee.html#gfcfccfa7323041108202275eba913be7">xbee_reset</a> (void)</td></tr>
57

  
58
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reset XBee. <br></td></tr>
59
</table>
60
<hr><a name="_details"></a><h2>Detailed Description</h2>
61
Interface with the XBee module. 
62
<p>
63
Interface with the XBee module. <hr><h2>Function Documentation</h2>
64
<a class="anchor" name="g7c53e8a8492494a61ca306875d633309"></a><!-- doxytag: member="xbee.h::xbee_get_address" ref="g7c53e8a8492494a61ca306875d633309" args="(void)" -->
65
<div class="memitem">
66
<div class="memproto">
67
      <table class="memname">
68
        <tr>
69
          <td class="memname">unsigned int xbee_get_address           </td>
70
          <td>(</td>
71
          <td class="paramtype">void&nbsp;</td>
72
          <td class="paramname">          </td>
73
          <td>&nbsp;)&nbsp;</td>
74
          <td></td>
75
        </tr>
76
      </table>
77
</div>
78
<div class="memdoc">
79

  
80
<p>
81
Get the XBee's 16-bit address. 
82
<p>
83
Get the 16-bit address of the XBee. This is used to specify who to send messages to and who messages are from.<p>
84
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the 16-bit address of the XBee. </dd></dl>
85

  
86
</div>
87
</div><p>
88
<a class="anchor" name="g133706db81f69ba0a3c169b7a3f42d2a"></a><!-- doxytag: member="xbee.h::xbee_get_channel" ref="g133706db81f69ba0a3c169b7a3f42d2a" args="(void)" -->
89
<div class="memitem">
90
<div class="memproto">
91
      <table class="memname">
92
        <tr>
93
          <td class="memname">int xbee_get_channel           </td>
94
          <td>(</td>
95
          <td class="paramtype">void&nbsp;</td>
96
          <td class="paramname">          </td>
97
          <td>&nbsp;)&nbsp;</td>
98
          <td></td>
99
        </tr>
100
      </table>
101
</div>
102
<div class="memdoc">
103

  
104
<p>
105
Get the channel the XBee is currently using. 
106
<p>
107
Returns the channel which the XBee is currently using.<p>
108
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the channel the XBee is using</dd></dl>
109
<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>
110

  
111
</div>
112
</div><p>
113
<a class="anchor" name="g00fbdd9d849171588df736f8b608589d"></a><!-- doxytag: member="xbee.h::xbee_get_packet" ref="g00fbdd9d849171588df736f8b608589d" args="(unsigned char *packet)" -->
114
<div class="memitem">
115
<div class="memproto">
116
      <table class="memname">
117
        <tr>
118
          <td class="memname">int xbee_get_packet           </td>
119
          <td>(</td>
120
          <td class="paramtype">unsigned char *&nbsp;</td>
121
          <td class="paramname"> <em>dest</em>          </td>
122
          <td>&nbsp;)&nbsp;</td>
123
          <td></td>
124
        </tr>
125
      </table>
126
</div>
127
<div class="memdoc">
128

  
129
<p>
130
Get a packet from the XBee. 
131
<p>
132
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>
133
<br>
134
<p>
135
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>
136
<br>
137
<p>
138
For a status response packet:<br>
139
 The first byte will be XBEE_TX_STATUS.<br>
140
 The second byte will be the frame number.<br>
141
 The third byte will be the result. 0 indicates success, and nonzero indicates that an error ocurred in transmitting the packet.<br>
142
<br>
143
<p>
144
For a received packet:<br>
145
 The first byte will be XBEE_RX.<br>
146
 The second and third bytes will be the 16-bit address of the packet's sender.<br>
147
 The fourth byte is the signal strength.<br>
148
 The fifth byte is 1 if the packet were sent to a specific address, and 2 if it is a broadcast packet.<br>
149
<br>
150
<p>
151
<dl compact><dt><b>Parameters:</b></dt><dd>
152
  <table border="0" cellspacing="2" cellpadding="0">
153
    <tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</td><td>set to the packet data </td></tr>
154
  </table>
155
</dl>
156
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the length of the packet, or -1 if no packet is available </dd></dl>
157

  
158
</div>
159
</div><p>
160
<a class="anchor" name="g7755cd8db87703c9e9943153660b8052"></a><!-- doxytag: member="xbee.h::xbee_get_pan_id" ref="g7755cd8db87703c9e9943153660b8052" args="(void)" -->
161
<div class="memitem">
162
<div class="memproto">
163
      <table class="memname">
164
        <tr>
165
          <td class="memname">unsigned int xbee_get_pan_id           </td>
166
          <td>(</td>
167
          <td class="paramtype">void&nbsp;</td>
168
          <td class="paramname">          </td>
169
          <td>&nbsp;)&nbsp;</td>
170
          <td></td>
171
        </tr>
172
      </table>
173
</div>
174
<div class="memdoc">
175

  
176
<p>
177
Get the XBee's PAN ID. 
178
<p>
179
Get the PAN ID for the XBee.<p>
180
<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>
181

  
182
</div>
183
</div><p>
184
<a class="anchor" name="g3d5fbb6aae8dda99240ec38108a645af"></a><!-- doxytag: member="xbee.h::xbee_lib_init" ref="g3d5fbb6aae8dda99240ec38108a645af" args="(void)" -->
185
<div class="memitem">
186
<div class="memproto">
187
      <table class="memname">
188
        <tr>
189
          <td class="memname">int xbee_lib_init           </td>
190
          <td>(</td>
191
          <td class="paramtype">void&nbsp;</td>
192
          <td class="paramname">          </td>
193
          <td>&nbsp;)&nbsp;</td>
194
          <td></td>
195
        </tr>
196
      </table>
197
</div>
198
<div class="memdoc">
199

  
200
<p>
201
Initialize the XBee library. 
202
<p>
203
Initializes the XBee library so that other functions may be used. 
204
</div>
205
</div><p>
206
<a class="anchor" name="g7c44bc25fda954efde574ee8d735073c"></a><!-- doxytag: member="xbee.h::xbee_send_packet" ref="g7c44bc25fda954efde574ee8d735073c" args="(char *packet, int len, int dest, char options, char frame)" -->
207
<div class="memitem">
208
<div class="memproto">
209
      <table class="memname">
210
        <tr>
211
          <td class="memname">int xbee_send_packet           </td>
212
          <td>(</td>
213
          <td class="paramtype">char *&nbsp;</td>
214
          <td class="paramname"> <em>packet</em>, </td>
215
        </tr>
216
        <tr>
217
          <td class="paramkey"></td>
218
          <td></td>
219
          <td class="paramtype">int&nbsp;</td>
220
          <td class="paramname"> <em>len</em>, </td>
221
        </tr>
222
        <tr>
223
          <td class="paramkey"></td>
224
          <td></td>
225
          <td class="paramtype">int&nbsp;</td>
226
          <td class="paramname"> <em>dest</em>, </td>
227
        </tr>
228
        <tr>
229
          <td class="paramkey"></td>
230
          <td></td>
231
          <td class="paramtype">char&nbsp;</td>
232
          <td class="paramname"> <em>options</em>, </td>
233
        </tr>
234
        <tr>
235
          <td class="paramkey"></td>
236
          <td></td>
237
          <td class="paramtype">char&nbsp;</td>
238
          <td class="paramname"> <em>frame</em></td><td>&nbsp;</td>
239
        </tr>
240
        <tr>
241
          <td></td>
242
          <td>)</td>
243
          <td></td><td></td><td></td>
244
        </tr>
245
      </table>
246
</div>
247
<div class="memdoc">
248

  
249
<p>
250
Send a packet to the XBee. 
251
<p>
252
Send the specified packet.<p>
253
<dl compact><dt><b>Parameters:</b></dt><dd>
254
  <table border="0" cellspacing="2" cellpadding="0">
255
    <tr><td valign="top"></td><td valign="top"><em>packet</em>&nbsp;</td><td>the packet data to send </td></tr>
256
    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>the number of bytes in the packet</td></tr>
257
    <tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</td><td>the ID of the XBee to send the packet to, or XBEE_BROADCAST to send the message to all robots in the PAN.</td></tr>
258
    <tr><td valign="top"></td><td valign="top"><em>options</em>&nbsp;</td><td>a combination of the flags XBEE_OPTIONS_NONE, XBEE_OPTIONS_DISABLE_RESPONSE and XBEE_OPTIONS_BROADCAST_ALL_PANS</td></tr>
259
    <tr><td valign="top"></td><td valign="top"><em>frame</em>&nbsp;</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>
260
  </table>
261
</dl>
262

  
263
</div>
264
</div><p>
265
<a class="anchor" name="gb93170c493c5cdfd43a7b640c6ed1d14"></a><!-- doxytag: member="xbee.h::xbee_set_channel" ref="gb93170c493c5cdfd43a7b640c6ed1d14" args="(int channel)" -->
266
<div class="memitem">
267
<div class="memproto">
268
      <table class="memname">
269
        <tr>
270
          <td class="memname">int xbee_set_channel           </td>
271
          <td>(</td>
272
          <td class="paramtype">int&nbsp;</td>
273
          <td class="paramname"> <em>channel</em>          </td>
274
          <td>&nbsp;)&nbsp;</td>
275
          <td></td>
276
        </tr>
277
      </table>
278
</div>
279
<div class="memdoc">
280

  
281
<p>
282
Set the channel the XBee is currently using. 
283
<p>
284
Set the channel the XBee is using.<p>
285
<dl compact><dt><b>Parameters:</b></dt><dd>
286
  <table border="0" cellspacing="2" cellpadding="0">
287
    <tr><td valign="top"></td><td valign="top"><em>channel</em>&nbsp;</td><td>the channel the XBee will not use, between 0x0B and 0x1A</td></tr>
288
  </table>
289
</dl>
290
<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>
291

  
292
</div>
293
</div><p>
294
<a class="anchor" name="gde50cbefd7ba8d7361ce2654a298748b"></a><!-- doxytag: member="xbee.h::xbee_set_pan_id" ref="gde50cbefd7ba8d7361ce2654a298748b" args="(int id)" -->
295
<div class="memitem">
296
<div class="memproto">
297
      <table class="memname">
298
        <tr>
299
          <td class="memname">int xbee_set_pan_id           </td>
300
          <td>(</td>
301
          <td class="paramtype">int&nbsp;</td>
302
          <td class="paramname"> <em>id</em>          </td>
303
          <td>&nbsp;)&nbsp;</td>
304
          <td></td>
305
        </tr>
306
      </table>
307
</div>
308
<div class="memdoc">
309

  
310
<p>
311
Set the PAN ID for the XBee. 
312
<p>
313
Sets the personal area network id.<p>
314
<dl compact><dt><b>Parameters:</b></dt><dd>
315
  <table border="0" cellspacing="2" cellpadding="0">
316
    <tr><td valign="top"></td><td valign="top"><em>id</em>&nbsp;</td><td>the new personal area network (PAN) id </td></tr>
317
  </table>
318
</dl>
319

  
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff