root / branches / wireless / docs / libwireless / html / group__wl__functions.html @ 1823
History | View | Annotate | Download (33.9 KB)
1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
---|---|
2 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
3 |
<head>
|
4 |
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
5 |
<title>libwireless: Public API Functions</title> |
6 |
<link href="tabs.css" rel="stylesheet" type="text/css"/> |
7 |
<link href="doxygen.css" rel="stylesheet" type="text/css"/> |
8 |
</head>
|
9 |
<body>
|
10 |
<!-- Generated by Doxygen 1.6.3 -->
|
11 |
<div class="navigation" id="top"> |
12 |
<div class="tabs"> |
13 |
<ul>
|
14 |
<li><a href="index.html"><span>Main Page</span></a></li> |
15 |
<li><a href="modules.html"><span>Modules</span></a></li> |
16 |
<li><a href="annotated.html"><span>Data Structures</span></a></li> |
17 |
<li><a href="files.html"><span>Files</span></a></li> |
18 |
</ul>
|
19 |
</div>
|
20 |
</div>
|
21 |
<div class="contents"> |
22 |
<h1>Public API Functions<br/> |
23 |
<small>
|
24 |
[<a class="el" href="group__wireless.html">Wireless</a>]</small> |
25 |
</h1><table border="0" cellpadding="0" cellspacing="0"> |
26 |
<tr><td colspan="2"><h2>Functions</h2></td></tr> |
27 |
<tr><td class="memItemLeft" align="right" valign="top">int8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__functions.html#ga6a8d6179b1fe27f762937f0b47af2009">wl_init</a> (void)</td></tr> |
28 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize wireless. <a href="#ga6a8d6179b1fe27f762937f0b47af2009"></a><br/></td></tr> |
29 |
<tr><td class="memItemLeft" align="right" valign="top">int8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__functions.html#ga223f437c2bc8ab8a3ac2e0e06841120f">wl_terminate</a> (void)</td></tr> |
30 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Terminate wireless. <a href="#ga223f437c2bc8ab8a3ac2e0e06841120f"></a><br/></td></tr> |
31 |
<tr><td class="memItemLeft" align="right" valign="top">int16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__functions.html#gaf713b6ecbf2de78139990a40fe864d5e">wl_send</a> (uint8_t *data, uint8_t length, uint8_t group, uint8_t scope, uint16_t dest, uint8_t mode)</td></tr> |
32 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">The core send function. This will take all possible arguments and send all types of packets. <a href="#gaf713b6ecbf2de78139990a40fe864d5e"></a><br/></td></tr> |
33 |
<tr><td class="memItemLeft" align="right" valign="top">int16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__functions.html#gab0af7308304aed74eb281188b712e132">wl_send_global</a> (uint8_t *data, uint8_t length, uint8_t group)</td></tr> |
34 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Wrapper for core send function that will send a global packet across the current channel. <a href="#gab0af7308304aed74eb281188b712e132"></a><br/></td></tr> |
35 |
<tr><td class="memItemLeft" align="right" valign="top">int16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__functions.html#ga85cd4090dd284a4747dc8a56c1b215ad">wl_send_pan</a> (uint8_t *data, uint8_t length, uint8_t group)</td></tr> |
36 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Wrapper for core send function that will send a packet across the current channel on the current pan. <a href="#ga85cd4090dd284a4747dc8a56c1b215ad"></a><br/></td></tr> |
37 |
<tr><td class="memItemLeft" align="right" valign="top">int16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__functions.html#ga49160840045fda872a5e38432cc26988">wl_send_robot</a> (uint8_t *data, uint8_t length, uint8_t group, uint16_t dest, uint8_t mode)</td></tr> |
38 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Wrapper for core send function that will send a packet across the current channel to a specific robot. <a href="#ga49160840045fda872a5e38432cc26988"></a><br/></td></tr> |
39 |
<tr><td class="memItemLeft" align="right" valign="top">int16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__functions.html#ga226d89acb4f77a982a2167eb1773eff2">wl_send_basic</a> (uint8_t *data, uint8_t length)</td></tr> |
40 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Default (i.e. basic) send wrapper. <a href="#ga226d89acb4f77a982a2167eb1773eff2"></a><br/></td></tr> |
41 |
<tr><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__functions.html#ga15c9a01839696beb05d1e4f161d968b7">wl_ack_error</a> (void)</td></tr> |
42 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of acknowledgment errors. <a href="#ga15c9a01839696beb05d1e4f161d968b7"></a><br/></td></tr> |
43 |
<tr><td class="memItemLeft" align="right" valign="top">int8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__functions.html#gaa364aa4d9cc8c789f05401e8adf44785">wl_ack_check</a> (uint8_t packet)</td></tr> |
44 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Checks a specific packet for the acknowledgement status. <a href="#gaa364aa4d9cc8c789f05401e8adf44785"></a><br/></td></tr> |
45 |
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__functions.html#ga62e126abfcd382ec02524dd2f45a8a7b">wl_ack_reset</a> (void)</td></tr> |
46 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Resets acknowledgement statistics back to zero. <a href="#ga62e126abfcd382ec02524dd2f45a8a7b"></a><br/></td></tr> |
47 |
<tr><td class="memItemLeft" align="right" valign="top">int8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__functions.html#gaa5a965e3443e4b2b60243225c50ecca7">wl_get</a> (char *data, uint8_t length)</td></tr> |
48 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">The main receive function. Dispatches packets for registered handlers and returns next basic packet if available. <a href="#gaa5a965e3443e4b2b60243225c50ecca7"></a><br/></td></tr> |
49 |
<tr><td class="memItemLeft" align="right" valign="top">int8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__functions.html#gae2509e2b6bc61faa26d87b1d87881817">wl_get_basic</a> (char *data, uint8_t length)</td></tr> |
50 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the next basic packet if available. <a href="#gae2509e2b6bc61faa26d87b1d87881817"></a><br/></td></tr> |
51 |
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae91c1e1940dfbbd063fdcfb86049c64a"></a><!-- doxytag: member="wl_functions::wl_dispatch" ref="gae91c1e1940dfbbd063fdcfb86049c64a" args="(void)" --> |
52 |
int8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__functions.html#gae91c1e1940dfbbd063fdcfb86049c64a">wl_dispatch</a> (void)</td></tr> |
53 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Dispatches packets for registered handlers. <br/></td></tr> |
54 |
<tr><td class="memItemLeft" align="right" valign="top">int8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__functions.html#ga7aa57c04f65ff3c8fec591248ab82f86">wl_register_handler</a> (uint8_t group, FNPTR, uint8_t priority)</td></tr> |
55 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Function to register new packet handlers (for non-default groups only). <a href="#ga7aa57c04f65ff3c8fec591248ab82f86"></a><br/></td></tr> |
56 |
<tr><td class="memItemLeft" align="right" valign="top">int8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__functions.html#ga376508d5682b1b8c88ef8b5f911a3367">wl_unregister_handler</a> (uint8_t group)</td></tr> |
57 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Function to unregister existing packet handlers (for non-default groups only). <a href="#ga376508d5682b1b8c88ef8b5f911a3367"></a><br/></td></tr> |
58 |
</table>
|
59 |
<hr/><h2>Function Documentation</h2> |
60 |
<a class="anchor" id="gaa364aa4d9cc8c789f05401e8adf44785"></a><!-- doxytag: member="wireless.h::wl_ack_check" ref="gaa364aa4d9cc8c789f05401e8adf44785" args="(uint8_t packet)" --> |
61 |
<div class="memitem"> |
62 |
<div class="memproto"> |
63 |
<table class="memname"> |
64 |
<tr>
|
65 |
<td class="memname">int8_t wl_ack_check </td> |
66 |
<td>(</td> |
67 |
<td class="paramtype">uint8_t </td> |
68 |
<td class="paramname"> <em>packet</em></td> |
69 |
<td> ) </td> |
70 |
<td></td> |
71 |
</tr>
|
72 |
</table>
|
73 |
</div>
|
74 |
<div class="memdoc"> |
75 |
|
76 |
<p>Checks a specific packet for the acknowledgement status. </p> |
77 |
<p>acknowledgement error check check if a specific packet has been lost note: buffer will overflow every 255 packets</p> |
78 |
<dl><dt><b>Parameters:</b></dt><dd> |
79 |
<table border="0" cellspacing="2" cellpadding="0"> |
80 |
<tr><td valign="top"></td><td valign="top"><em>packet</em> </td><td>packet number</td></tr> |
81 |
</table>
|
82 |
</dd>
|
83 |
</dl>
|
84 |
<dl class="return"><dt><b>Returns:</b></dt><dd>{SENDING,ACK_OK,ACK_FAILURE,CCA_FAILURE} </dd></dl> |
85 |
|
86 |
<p>References <a class="el" href="wl__defs_8h_source.html#l00090">WL_ERROR_ARGUMENT</a>.</p> |
87 |
|
88 |
</div>
|
89 |
</div>
|
90 |
<a class="anchor" id="ga15c9a01839696beb05d1e4f161d968b7"></a><!-- doxytag: member="wireless.h::wl_ack_error" ref="ga15c9a01839696beb05d1e4f161d968b7" args="(void)" --> |
91 |
<div class="memitem"> |
92 |
<div class="memproto"> |
93 |
<table class="memname"> |
94 |
<tr>
|
95 |
<td class="memname">uint8_t wl_ack_error </td> |
96 |
<td>(</td> |
97 |
<td class="paramtype">void </td> |
98 |
<td class="paramname"></td> |
99 |
<td> ) </td> |
100 |
<td></td> |
101 |
</tr>
|
102 |
</table>
|
103 |
</div>
|
104 |
<div class="memdoc"> |
105 |
|
106 |
<p>Returns the number of acknowledgment errors. </p> |
107 |
<p>acknowledgment error check if any of the packets you have sent have been lost.</p> |
108 |
<p>note that all other error checking will be handled by library, so your user behavior won't have to worry about it</p> |
109 |
<dl class="return"><dt><b>Returns:</b></dt><dd>the # of packets lost (up to 255) </dd></dl> |
110 |
|
111 |
</div>
|
112 |
</div>
|
113 |
<a class="anchor" id="ga62e126abfcd382ec02524dd2f45a8a7b"></a><!-- doxytag: member="wireless.h::wl_ack_reset" ref="ga62e126abfcd382ec02524dd2f45a8a7b" args="(void)" --> |
114 |
<div class="memitem"> |
115 |
<div class="memproto"> |
116 |
<table class="memname"> |
117 |
<tr>
|
118 |
<td class="memname">void wl_ack_reset </td> |
119 |
<td>(</td> |
120 |
<td class="paramtype">void </td> |
121 |
<td class="paramname"></td> |
122 |
<td> ) </td> |
123 |
<td></td> |
124 |
</tr>
|
125 |
</table>
|
126 |
</div>
|
127 |
<div class="memdoc"> |
128 |
|
129 |
<p>Resets acknowledgement statistics back to zero. </p> |
130 |
<p>acknowledgement reset reset the acknowledgement buffer </p> |
131 |
|
132 |
</div>
|
133 |
</div>
|
134 |
<a class="anchor" id="gaa5a965e3443e4b2b60243225c50ecca7"></a><!-- doxytag: member="wireless.h::wl_get" ref="gaa5a965e3443e4b2b60243225c50ecca7" args="(char *data, uint8_t length)" --> |
135 |
<div class="memitem"> |
136 |
<div class="memproto"> |
137 |
<table class="memname"> |
138 |
<tr>
|
139 |
<td class="memname">int8_t wl_get </td> |
140 |
<td>(</td> |
141 |
<td class="paramtype">char * </td> |
142 |
<td class="paramname"> <em>data</em>, </td> |
143 |
</tr>
|
144 |
<tr>
|
145 |
<td class="paramkey"></td> |
146 |
<td></td> |
147 |
<td class="paramtype">uint8_t </td> |
148 |
<td class="paramname"> <em>length</em></td><td> </td> |
149 |
</tr>
|
150 |
<tr>
|
151 |
<td></td> |
152 |
<td>)</td> |
153 |
<td></td><td></td><td></td> |
154 |
</tr>
|
155 |
</table>
|
156 |
</div>
|
157 |
<div class="memdoc"> |
158 |
|
159 |
<p>The main receive function. Dispatches packets for registered handlers and returns next basic packet if available. </p> |
160 |
<p>the main receive function (similar to wl_do)</p> |
161 |
<p>when called, this function will receive the next packet on the default packet group it will also dispatch registered packet handler functions for any other packet groups it has received</p> |
162 |
<dl><dt><b>Parameters:</b></dt><dd> |
163 |
<table border="0" cellspacing="2" cellpadding="0"> |
164 |
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>an already-initialized array to store the default group packet data in </td></tr> |
165 |
<tr><td valign="top"></td><td valign="top"><em>length</em> </td><td>the length of the initialized data array</td></tr> |
166 |
</table>
|
167 |
</dd>
|
168 |
</dl>
|
169 |
<dl class="return"><dt><b>Returns:</b></dt><dd>the length of the used portion of data array or error (<0) </dd></dl> |
170 |
|
171 |
<p>References <a class="el" href="wireless__receive_8c_source.html#l00164">wl_dispatch()</a>, and <a class="el" href="wireless__receive_8c_source.html#l00100">wl_get_basic()</a>.</p> |
172 |
|
173 |
</div>
|
174 |
</div>
|
175 |
<a class="anchor" id="gae2509e2b6bc61faa26d87b1d87881817"></a><!-- doxytag: member="wireless.h::wl_get_basic" ref="gae2509e2b6bc61faa26d87b1d87881817" args="(char *data, uint8_t length)" --> |
176 |
<div class="memitem"> |
177 |
<div class="memproto"> |
178 |
<table class="memname"> |
179 |
<tr>
|
180 |
<td class="memname">int8_t wl_get_basic </td> |
181 |
<td>(</td> |
182 |
<td class="paramtype">char * </td> |
183 |
<td class="paramname"> <em>data</em>, </td> |
184 |
</tr>
|
185 |
<tr>
|
186 |
<td class="paramkey"></td> |
187 |
<td></td> |
188 |
<td class="paramtype">uint8_t </td> |
189 |
<td class="paramname"> <em>length</em></td><td> </td> |
190 |
</tr>
|
191 |
<tr>
|
192 |
<td></td> |
193 |
<td>)</td> |
194 |
<td></td><td></td><td></td> |
195 |
</tr>
|
196 |
</table>
|
197 |
</div>
|
198 |
<div class="memdoc"> |
199 |
|
200 |
<p>Returns the next basic packet if available. </p> |
201 |
<p>function to receive only packets on the default group this function is only meant to receive packets sent using <a class="el" href="group__wl__functions.html#ga226d89acb4f77a982a2167eb1773eff2" title="Default (i.e. basic) send wrapper.">wl_send_basic()</a></p> |
202 |
<dl><dt><b>Parameters:</b></dt><dd> |
203 |
<table border="0" cellspacing="2" cellpadding="0"> |
204 |
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>an already-initialized array to store the default group packet data in </td></tr> |
205 |
<tr><td valign="top"></td><td valign="top"><em>length</em> </td><td>the length of the initialized data array</td></tr> |
206 |
</table>
|
207 |
</dd>
|
208 |
</dl>
|
209 |
<dl class="return"><dt><b>Returns:</b></dt><dd>the length of the used portion of data array or error (<0) </dd></dl> |
210 |
|
211 |
<p>References <a class="el" href="wl__defs_8h_source.html#l00108">WL_ERROR_TOO_SMALL</a>, <a class="el" href="wl__defs_8h_source.html#l00069">WL_SUCCESS</a>, and <a class="el" href="xbee_8c_source.html#l00087">xbee_basic_buf</a>.</p> |
212 |
|
213 |
<p>Referenced by <a class="el" href="wireless__receive_8c_source.html#l00084">wl_get()</a>.</p> |
214 |
|
215 |
</div>
|
216 |
</div>
|
217 |
<a class="anchor" id="ga6a8d6179b1fe27f762937f0b47af2009"></a><!-- doxytag: member="wireless.h::wl_init" ref="ga6a8d6179b1fe27f762937f0b47af2009" args="(void)" --> |
218 |
<div class="memitem"> |
219 |
<div class="memproto"> |
220 |
<table class="memname"> |
221 |
<tr>
|
222 |
<td class="memname">int8_t wl_init </td> |
223 |
<td>(</td> |
224 |
<td class="paramtype">void </td> |
225 |
<td class="paramname"></td> |
226 |
<td> ) </td> |
227 |
<td></td> |
228 |
</tr>
|
229 |
</table>
|
230 |
</div>
|
231 |
<div class="memdoc"> |
232 |
|
233 |
<p>Initialize wireless. </p> |
234 |
<p>initialization function: set up xbee communication and packet handler infrastructure</p> |
235 |
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success, or error code </dd></dl> |
236 |
|
237 |
<p>References <a class="el" href="wireless_8h_source.html#l00108">INIT_YES</a>, <a class="el" href="wireless_8h_source.html#l00102">MAX_PACKET_GROUPS</a>, <a class="el" href="wl__defs_8h_source.html#l00075">WL_ERROR_INIT_ALREADY_INITD</a>, <a class="el" href="wl__defs_8h_source.html#l00072">WL_ERROR_INIT_FAILED</a>, <a class="el" href="wl__defs_8h_source.html#l00069">WL_SUCCESS</a>, and <a class="el" href="xbee_8c_source.html#l00729">xbee_init()</a>.</p> |
238 |
|
239 |
</div>
|
240 |
</div>
|
241 |
<a class="anchor" id="ga7aa57c04f65ff3c8fec591248ab82f86"></a><!-- doxytag: member="wireless.h::wl_register_handler" ref="ga7aa57c04f65ff3c8fec591248ab82f86" args="(uint8_t group, FNPTR, uint8_t priority)" --> |
242 |
<div class="memitem"> |
243 |
<div class="memproto"> |
244 |
<table class="memname"> |
245 |
<tr>
|
246 |
<td class="memname">int8_t wl_register_handler </td> |
247 |
<td>(</td> |
248 |
<td class="paramtype">uint8_t </td> |
249 |
<td class="paramname"> <em>group</em>, </td> |
250 |
</tr>
|
251 |
<tr>
|
252 |
<td class="paramkey"></td> |
253 |
<td></td> |
254 |
<td class="paramtype">FNPTR </td> |
255 |
<td class="paramname">, </td> |
256 |
</tr>
|
257 |
<tr>
|
258 |
<td class="paramkey"></td> |
259 |
<td></td> |
260 |
<td class="paramtype">uint8_t </td> |
261 |
<td class="paramname"> <em>priority</em></td><td> </td> |
262 |
</tr>
|
263 |
<tr>
|
264 |
<td></td> |
265 |
<td>)</td> |
266 |
<td></td><td></td><td></td> |
267 |
</tr>
|
268 |
</table>
|
269 |
</div>
|
270 |
<div class="memdoc"> |
271 |
|
272 |
<p>Function to register new packet handlers (for non-default groups only). </p> |
273 |
<p>function to register new packet handlers (for non-default groups only)</p> |
274 |
<dl><dt><b>Parameters:</b></dt><dd> |
275 |
<table border="0" cellspacing="2" cellpadding="0"> |
276 |
<tr><td valign="top"></td><td valign="top"><em>group</em> </td><td>the packet group number of the packets to handle with this function </td></tr> |
277 |
<tr><td valign="top"></td><td valign="top"><em>func</em> </td><td>the function pointer to the user-specified packet handler </td></tr> |
278 |
<tr><td valign="top"></td><td valign="top"><em>priority</em> </td><td>flag to set the priority of the function handler</td></tr> |
279 |
</table>
|
280 |
</dd>
|
281 |
</dl>
|
282 |
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success, or error code </dd></dl> |
283 |
|
284 |
<p>References <a class="el" href="wireless_8h_source.html#l00095">FUNC</a>, <a class="el" href="wireless_8h_source.html#l00105">INIT_NO</a>, <a class="el" href="wireless_8h_source.html#l00102">MAX_PACKET_GROUPS</a>, <a class="el" href="wl__defs_8h_source.html#l00084">WL_ERROR_FAILED_REGISTRATION</a>, <a class="el" href="wl__defs_8h_source.html#l00078">WL_ERROR_LIBRARY_NOT_INITD</a>, and <a class="el" href="wl__defs_8h_source.html#l00069">WL_SUCCESS</a>.</p> |
285 |
|
286 |
</div>
|
287 |
</div>
|
288 |
<a class="anchor" id="gaf713b6ecbf2de78139990a40fe864d5e"></a><!-- doxytag: member="wireless.h::wl_send" ref="gaf713b6ecbf2de78139990a40fe864d5e" args="(uint8_t *data, uint8_t length, uint8_t group, uint8_t scope, uint16_t dest, uint8_t mode)" --> |
289 |
<div class="memitem"> |
290 |
<div class="memproto"> |
291 |
<table class="memname"> |
292 |
<tr>
|
293 |
<td class="memname">int16_t wl_send </td> |
294 |
<td>(</td> |
295 |
<td class="paramtype">uint8_t * </td> |
296 |
<td class="paramname"> <em>data</em>, </td> |
297 |
</tr>
|
298 |
<tr>
|
299 |
<td class="paramkey"></td> |
300 |
<td></td> |
301 |
<td class="paramtype">uint8_t </td> |
302 |
<td class="paramname"> <em>length</em>, </td> |
303 |
</tr>
|
304 |
<tr>
|
305 |
<td class="paramkey"></td> |
306 |
<td></td> |
307 |
<td class="paramtype">uint8_t </td> |
308 |
<td class="paramname"> <em>group</em>, </td> |
309 |
</tr>
|
310 |
<tr>
|
311 |
<td class="paramkey"></td> |
312 |
<td></td> |
313 |
<td class="paramtype">uint8_t </td> |
314 |
<td class="paramname"> <em>scope</em>, </td> |
315 |
</tr>
|
316 |
<tr>
|
317 |
<td class="paramkey"></td> |
318 |
<td></td> |
319 |
<td class="paramtype">uint16_t </td> |
320 |
<td class="paramname"> <em>dest</em>, </td> |
321 |
</tr>
|
322 |
<tr>
|
323 |
<td class="paramkey"></td> |
324 |
<td></td> |
325 |
<td class="paramtype">uint8_t </td> |
326 |
<td class="paramname"> <em>mode</em></td><td> </td> |
327 |
</tr>
|
328 |
<tr>
|
329 |
<td></td> |
330 |
<td>)</td> |
331 |
<td></td><td></td><td></td> |
332 |
</tr>
|
333 |
</table>
|
334 |
</div>
|
335 |
<div class="memdoc"> |
336 |
|
337 |
<p>The core send function. This will take all possible arguments and send all types of packets. </p> |
338 |
<p>The core send function. This will take all possible arguments and send all types of packets.</p> |
339 |
<dl><dt><b>Parameters:</b></dt><dd> |
340 |
<table border="0" cellspacing="2" cellpadding="0"> |
341 |
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>pointer to the byte array of data to be included in the packet </td></tr> |
342 |
<tr><td valign="top"></td><td valign="top"><em>length</em> </td><td>the length of the data array </td></tr> |
343 |
<tr><td valign="top"></td><td valign="top"><em>group</em> </td><td>the packet group of the packet </td></tr> |
344 |
<tr><td valign="top"></td><td valign="top"><em>scope</em> </td><td>flag for sending global packet or your current PAN </td></tr> |
345 |
<tr><td valign="top"></td><td valign="top"><em>dest</em> </td><td>robot ID (for robot to robot packet) </td></tr> |
346 |
<tr><td valign="top"></td><td valign="top"><em>mode</em> </td><td>flag for using FAST or RELIABLE sending</td></tr> |
347 |
</table>
|
348 |
</dd>
|
349 |
</dl>
|
350 |
<dl class="return"><dt><b>Returns:</b></dt><dd>positive packet number for tracking acks, or error code </dd></dl> |
351 |
|
352 |
<p>References <a class="el" href="wireless_8h_source.html#l00086">ACK_OK</a>, <a class="el" href="wireless_8h_source.html#l00068">BROADCAST</a>, <a class="el" href="wireless_8h_source.html#l00074">FAST</a>, <a class="el" href="wireless_8h_source.html#l00062">GLOBAL</a>, <a class="el" href="wireless__send_8c_source.html#l00058">nextframe</a>, <a class="el" href="wireless_8h_source.html#l00065">PAN</a>, <a class="el" href="wireless_8h_source.html#l00071">RELIABLE</a>, <a class="el" href="wireless_8h_source.html#l00083">SENDING</a>, <a class="el" href="wl__defs_8h_source.html#l00105">WL_ERROR_MODE</a>, <a class="el" href="wl__defs_8h_source.html#l00099">WL_ERROR_SCOPE</a>, <a class="el" href="wl__defs_8h_source.html#l00093">WL_ERROR_SEND</a>, <a class="el" href="wl__defs_8h_source.html#l00111">WL_ERROR_SENDING_BUFFER_FULL</a>, <a class="el" href="wl__defs_8h_source.html#l00069">WL_SUCCESS</a>, <a class="el" href="xbee_8c_source.html#l01313">xbee_checksum_add()</a>, <a class="el" href="xbee_8h_source.html#l00080">XBEE_OPTIONS_BROADCAST_ALL_PANS</a>, <a class="el" href="xbee_8h_source.html#l00078">XBEE_OPTIONS_DISABLE_RESPONSE</a>, <a class="el" href="xbee_8h_source.html#l00076">XBEE_OPTIONS_NONE</a>, <a class="el" href="xbee_8c_source.html#l01038">xbee_send()</a>, <a class="el" href="xbee_8c_source.html#l01332">xbee_send_header()</a>, and <a class="el" href="xbee_8c_source.html#l01015">xbee_sendc()</a>.</p> |
353 |
|
354 |
<p>Referenced by <a class="el" href="wireless__send_8c_source.html#l00240">wl_send_basic()</a>, <a class="el" href="wireless__send_8c_source.html#l00200">wl_send_global()</a>, <a class="el" href="wireless__send_8c_source.html#l00213">wl_send_pan()</a>, and <a class="el" href="wireless__send_8c_source.html#l00228">wl_send_robot()</a>.</p> |
355 |
|
356 |
</div>
|
357 |
</div>
|
358 |
<a class="anchor" id="ga226d89acb4f77a982a2167eb1773eff2"></a><!-- doxytag: member="wireless.h::wl_send_basic" ref="ga226d89acb4f77a982a2167eb1773eff2" args="(uint8_t *data, uint8_t length)" --> |
359 |
<div class="memitem"> |
360 |
<div class="memproto"> |
361 |
<table class="memname"> |
362 |
<tr>
|
363 |
<td class="memname">int16_t wl_send_basic </td> |
364 |
<td>(</td> |
365 |
<td class="paramtype">uint8_t * </td> |
366 |
<td class="paramname"> <em>data</em>, </td> |
367 |
</tr>
|
368 |
<tr>
|
369 |
<td class="paramkey"></td> |
370 |
<td></td> |
371 |
<td class="paramtype">uint8_t </td> |
372 |
<td class="paramname"> <em>length</em></td><td> </td> |
373 |
</tr>
|
374 |
<tr>
|
375 |
<td></td> |
376 |
<td>)</td> |
377 |
<td></td><td></td><td></td> |
378 |
</tr>
|
379 |
</table>
|
380 |
</div>
|
381 |
<div class="memdoc"> |
382 |
|
383 |
<p>Default (i.e. basic) send wrapper. </p> |
384 |
<p>Default (i.e. basic) send wrapper.</p> |
385 |
<dl><dt><b>Parameters:</b></dt><dd> |
386 |
<table border="0" cellspacing="2" cellpadding="0"> |
387 |
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>pointer to the byte array of data to be included in the packet </td></tr> |
388 |
<tr><td valign="top"></td><td valign="top"><em>length</em> </td><td>the length of the data array</td></tr> |
389 |
</table>
|
390 |
</dd>
|
391 |
</dl>
|
392 |
<dl class="return"><dt><b>Returns:</b></dt><dd>positive packet number for tracking acks, or error code (TBD) </dd></dl> |
393 |
|
394 |
<p><p>Check if it needs to adjust according to data type. </p> |
395 |
</p>
|
396 |
|
397 |
<p>References <a class="el" href="wireless_8h_source.html#l00059">BASIC</a>, <a class="el" href="wireless_8h_source.html#l00068">BROADCAST</a>, <a class="el" href="wireless_8h_source.html#l00062">GLOBAL</a>, <a class="el" href="wireless_8h_source.html#l00071">RELIABLE</a>, and <a class="el" href="wireless__send_8c_source.html#l00091">wl_send()</a>.</p> |
398 |
|
399 |
</div>
|
400 |
</div>
|
401 |
<a class="anchor" id="gab0af7308304aed74eb281188b712e132"></a><!-- doxytag: member="wireless.h::wl_send_global" ref="gab0af7308304aed74eb281188b712e132" args="(uint8_t *data, uint8_t length, uint8_t group)" --> |
402 |
<div class="memitem"> |
403 |
<div class="memproto"> |
404 |
<table class="memname"> |
405 |
<tr>
|
406 |
<td class="memname">int16_t wl_send_global </td> |
407 |
<td>(</td> |
408 |
<td class="paramtype">uint8_t * </td> |
409 |
<td class="paramname"> <em>data</em>, </td> |
410 |
</tr>
|
411 |
<tr>
|
412 |
<td class="paramkey"></td> |
413 |
<td></td> |
414 |
<td class="paramtype">uint8_t </td> |
415 |
<td class="paramname"> <em>length</em>, </td> |
416 |
</tr>
|
417 |
<tr>
|
418 |
<td class="paramkey"></td> |
419 |
<td></td> |
420 |
<td class="paramtype">uint8_t </td> |
421 |
<td class="paramname"> <em>group</em></td><td> </td> |
422 |
</tr>
|
423 |
<tr>
|
424 |
<td></td> |
425 |
<td>)</td> |
426 |
<td></td><td></td><td></td> |
427 |
</tr>
|
428 |
</table>
|
429 |
</div>
|
430 |
<div class="memdoc"> |
431 |
|
432 |
<p>Wrapper for core send function that will send a global packet across the current channel. </p> |
433 |
<p>Wrapper for core send function that will send a global packet across the current channel.</p> |
434 |
<dl><dt><b>Parameters:</b></dt><dd> |
435 |
<table border="0" cellspacing="2" cellpadding="0"> |
436 |
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>pointer to the byte array of data to be included in the packet </td></tr> |
437 |
<tr><td valign="top"></td><td valign="top"><em>length</em> </td><td>the length of the data array </td></tr> |
438 |
<tr><td valign="top"></td><td valign="top"><em>group</em> </td><td>the packet group of the packet</td></tr> |
439 |
</table>
|
440 |
</dd>
|
441 |
</dl>
|
442 |
<dl class="return"><dt><b>Returns:</b></dt><dd>positive packet number for tracking acks, or error code </dd></dl> |
443 |
|
444 |
<p>References <a class="el" href="wireless_8h_source.html#l00068">BROADCAST</a>, <a class="el" href="wireless_8h_source.html#l00062">GLOBAL</a>, <a class="el" href="wireless_8h_source.html#l00071">RELIABLE</a>, and <a class="el" href="wireless__send_8c_source.html#l00091">wl_send()</a>.</p> |
445 |
|
446 |
</div>
|
447 |
</div>
|
448 |
<a class="anchor" id="ga85cd4090dd284a4747dc8a56c1b215ad"></a><!-- doxytag: member="wireless.h::wl_send_pan" ref="ga85cd4090dd284a4747dc8a56c1b215ad" args="(uint8_t *data, uint8_t length, uint8_t group)" --> |
449 |
<div class="memitem"> |
450 |
<div class="memproto"> |
451 |
<table class="memname"> |
452 |
<tr>
|
453 |
<td class="memname">int16_t wl_send_pan </td> |
454 |
<td>(</td> |
455 |
<td class="paramtype">uint8_t * </td> |
456 |
<td class="paramname"> <em>data</em>, </td> |
457 |
</tr>
|
458 |
<tr>
|
459 |
<td class="paramkey"></td> |
460 |
<td></td> |
461 |
<td class="paramtype">uint8_t </td> |
462 |
<td class="paramname"> <em>length</em>, </td> |
463 |
</tr>
|
464 |
<tr>
|
465 |
<td class="paramkey"></td> |
466 |
<td></td> |
467 |
<td class="paramtype">uint8_t </td> |
468 |
<td class="paramname"> <em>group</em></td><td> </td> |
469 |
</tr>
|
470 |
<tr>
|
471 |
<td></td> |
472 |
<td>)</td> |
473 |
<td></td><td></td><td></td> |
474 |
</tr>
|
475 |
</table>
|
476 |
</div>
|
477 |
<div class="memdoc"> |
478 |
|
479 |
<p>Wrapper for core send function that will send a packet across the current channel on the current pan. </p> |
480 |
<p>Wrapper for core send function that will send a packet across the current channel on the current pan.</p> |
481 |
<dl><dt><b>Parameters:</b></dt><dd> |
482 |
<table border="0" cellspacing="2" cellpadding="0"> |
483 |
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>pointer to the byte array of data to be included in the packet </td></tr> |
484 |
<tr><td valign="top"></td><td valign="top"><em>length</em> </td><td>the length of the data array </td></tr> |
485 |
<tr><td valign="top"></td><td valign="top"><em>group</em> </td><td>the packet group of the packet</td></tr> |
486 |
</table>
|
487 |
</dd>
|
488 |
</dl>
|
489 |
<dl class="return"><dt><b>Returns:</b></dt><dd>positive packet number for tracking acks, or error code (TBD) </dd></dl> |
490 |
|
491 |
<p>References <a class="el" href="wireless_8h_source.html#l00068">BROADCAST</a>, <a class="el" href="wireless_8h_source.html#l00065">PAN</a>, <a class="el" href="wireless_8h_source.html#l00071">RELIABLE</a>, and <a class="el" href="wireless__send_8c_source.html#l00091">wl_send()</a>.</p> |
492 |
|
493 |
</div>
|
494 |
</div>
|
495 |
<a class="anchor" id="ga49160840045fda872a5e38432cc26988"></a><!-- doxytag: member="wireless.h::wl_send_robot" ref="ga49160840045fda872a5e38432cc26988" args="(uint8_t *data, uint8_t length, uint8_t group, uint16_t dest, uint8_t mode)" --> |
496 |
<div class="memitem"> |
497 |
<div class="memproto"> |
498 |
<table class="memname"> |
499 |
<tr>
|
500 |
<td class="memname">int16_t wl_send_robot </td> |
501 |
<td>(</td> |
502 |
<td class="paramtype">uint8_t * </td> |
503 |
<td class="paramname"> <em>data</em>, </td> |
504 |
</tr>
|
505 |
<tr>
|
506 |
<td class="paramkey"></td> |
507 |
<td></td> |
508 |
<td class="paramtype">uint8_t </td> |
509 |
<td class="paramname"> <em>length</em>, </td> |
510 |
</tr>
|
511 |
<tr>
|
512 |
<td class="paramkey"></td> |
513 |
<td></td> |
514 |
<td class="paramtype">uint8_t </td> |
515 |
<td class="paramname"> <em>group</em>, </td> |
516 |
</tr>
|
517 |
<tr>
|
518 |
<td class="paramkey"></td> |
519 |
<td></td> |
520 |
<td class="paramtype">uint16_t </td> |
521 |
<td class="paramname"> <em>dest</em>, </td> |
522 |
</tr>
|
523 |
<tr>
|
524 |
<td class="paramkey"></td> |
525 |
<td></td> |
526 |
<td class="paramtype">uint8_t </td> |
527 |
<td class="paramname"> <em>mode</em></td><td> </td> |
528 |
</tr>
|
529 |
<tr>
|
530 |
<td></td> |
531 |
<td>)</td> |
532 |
<td></td><td></td><td></td> |
533 |
</tr>
|
534 |
</table>
|
535 |
</div>
|
536 |
<div class="memdoc"> |
537 |
|
538 |
<p>Wrapper for core send function that will send a packet across the current channel to a specific robot. </p> |
539 |
<p>Wrapper for core send function that will send a packet across the current channel to a specific robot.</p> |
540 |
<dl><dt><b>Parameters:</b></dt><dd> |
541 |
<table border="0" cellspacing="2" cellpadding="0"> |
542 |
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>pointer to the byte array of data to be included in the packet </td></tr> |
543 |
<tr><td valign="top"></td><td valign="top"><em>length</em> </td><td>the length of the data array </td></tr> |
544 |
<tr><td valign="top"></td><td valign="top"><em>group</em> </td><td>the packet group of the packet </td></tr> |
545 |
<tr><td valign="top"></td><td valign="top"><em>dest</em> </td><td>robot ID (for robot to robot packet) </td></tr> |
546 |
<tr><td valign="top"></td><td valign="top"><em>mode</em> </td><td>flag for using FAST or RELIABLE sending</td></tr> |
547 |
</table>
|
548 |
</dd>
|
549 |
</dl>
|
550 |
<dl class="return"><dt><b>Returns:</b></dt><dd>positive packet number for tracking acks, or error code (TBD) </dd></dl> |
551 |
|
552 |
<p>References <a class="el" href="wireless_8h_source.html#l00062">GLOBAL</a>, and <a class="el" href="wireless__send_8c_source.html#l00091">wl_send()</a>.</p> |
553 |
|
554 |
</div>
|
555 |
</div>
|
556 |
<a class="anchor" id="ga223f437c2bc8ab8a3ac2e0e06841120f"></a><!-- doxytag: member="wireless.h::wl_terminate" ref="ga223f437c2bc8ab8a3ac2e0e06841120f" args="(void)" --> |
557 |
<div class="memitem"> |
558 |
<div class="memproto"> |
559 |
<table class="memname"> |
560 |
<tr>
|
561 |
<td class="memname">int8_t wl_terminate </td> |
562 |
<td>(</td> |
563 |
<td class="paramtype">void </td> |
564 |
<td class="paramname"></td> |
565 |
<td> ) </td> |
566 |
<td></td> |
567 |
</tr>
|
568 |
</table>
|
569 |
</div>
|
570 |
<div class="memdoc"> |
571 |
|
572 |
<p>Terminate wireless. </p> |
573 |
<p>termination function: end xbee communication, deregister all handlers, etc</p> |
574 |
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success, or error code </dd></dl> |
575 |
|
576 |
<p>References <a class="el" href="wireless_8h_source.html#l00105">INIT_NO</a>, <a class="el" href="wireless_8h_source.html#l00102">MAX_PACKET_GROUPS</a>, <a class="el" href="wl__defs_8h_source.html#l00078">WL_ERROR_LIBRARY_NOT_INITD</a>, <a class="el" href="wl__defs_8h_source.html#l00081">WL_ERROR_TERMINATION_FAILED</a>, <a class="el" href="wl__defs_8h_source.html#l00069">WL_SUCCESS</a>, and <a class="el" href="xbee_8c_source.html#l00918">xbee_terminate()</a>.</p> |
577 |
|
578 |
</div>
|
579 |
</div>
|
580 |
<a class="anchor" id="ga376508d5682b1b8c88ef8b5f911a3367"></a><!-- doxytag: member="wireless.h::wl_unregister_handler" ref="ga376508d5682b1b8c88ef8b5f911a3367" args="(uint8_t group)" --> |
581 |
<div class="memitem"> |
582 |
<div class="memproto"> |
583 |
<table class="memname"> |
584 |
<tr>
|
585 |
<td class="memname">int8_t wl_unregister_handler </td> |
586 |
<td>(</td> |
587 |
<td class="paramtype">uint8_t </td> |
588 |
<td class="paramname"> <em>group</em></td> |
589 |
<td> ) </td> |
590 |
<td></td> |
591 |
</tr>
|
592 |
</table>
|
593 |
</div>
|
594 |
<div class="memdoc"> |
595 |
|
596 |
<p>Function to unregister existing packet handlers (for non-default groups only). </p> |
597 |
<p>function to unregister existing packet handlers (for non-default groups only)</p> |
598 |
<dl><dt><b>Parameters:</b></dt><dd> |
599 |
<table border="0" cellspacing="2" cellpadding="0"> |
600 |
<tr><td valign="top"></td><td valign="top"><em>group</em> </td><td>the packet group number of the handler to unregister</td></tr> |
601 |
</table>
|
602 |
</dd>
|
603 |
</dl>
|
604 |
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success, or error code </dd></dl> |
605 |
|
606 |
<p>References <a class="el" href="wireless_8h_source.html#l00095">FUNC</a>, <a class="el" href="wireless_8h_source.html#l00105">INIT_NO</a>, <a class="el" href="wireless_8h_source.html#l00102">MAX_PACKET_GROUPS</a>, <a class="el" href="wireless_8h_source.html#l00077">NORMAL_PRIORITY</a>, <a class="el" href="wl__defs_8h_source.html#l00087">WL_ERROR_FAILED_UNREGISTRATION</a>, <a class="el" href="wl__defs_8h_source.html#l00078">WL_ERROR_LIBRARY_NOT_INITD</a>, and <a class="el" href="wl__defs_8h_source.html#l00069">WL_SUCCESS</a>.</p> |
607 |
|
608 |
</div>
|
609 |
</div>
|
610 |
</div>
|
611 |
<hr class="footer"/><address style="text-align: right;"><small>Generated on Thu May 6 13:17:00 2010 for libwireless by |
612 |
<a href="http://www.doxygen.org/index.html"> |
613 |
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address> |
614 |
</body>
|
615 |
</html>
|