root / trunk / docs / libwireless / group__tokenring.html @ 1395
History | View | Annotate | Download (23.9 KB)
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>libwireless: Token Ring</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.9 -->
|
8 |
<div class="navigation" id="top"> |
9 |
<div class="tabs"> |
10 |
<ul>
|
11 |
<li><a href="index.html"><span>Main Page</span></a></li> |
12 |
<li><a href="modules.html"><span>Modules</span></a></li> |
13 |
<li><a href="annotated.html"><span>Data Structures</span></a></li> |
14 |
<li><a href="files.html"><span>Files</span></a></li> |
15 |
</ul>
|
16 |
</div>
|
17 |
</div>
|
18 |
<div class="contents"> |
19 |
<h1>Token Ring</h1>Wireless library token ring implementation. |
20 |
<a href="#_details">More...</a> |
21 |
<p>
|
22 |
<table border="0" cellpadding="0" cellspacing="0"> |
23 |
<tr><td></td></tr> |
24 |
<tr><td colspan="2"><br><h2>Functions</h2></td></tr> |
25 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__tokenring.html#g00fb5cca21a50d39aa1e82fdc679ca44">wl_token_ring_register</a> (void)</td></tr> |
26 |
|
27 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Register the token ring group with the wireless library. <a href="#g00fb5cca21a50d39aa1e82fdc679ca44"></a><br></td></tr> |
28 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__tokenring.html#gde3dd682b6a757bab6ce4cbc9c518f8e">wl_token_ring_unregister</a> (void)</td></tr> |
29 |
|
30 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Unregister the token ring group with the wirelss library. <a href="#gde3dd682b6a757bab6ce4cbc9c518f8e"></a><br></td></tr> |
31 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__tokenring.html#g0c407d5c215a97d58c67006bcc6e53ce">wl_token_ring_set_bom_functions</a> (void(*on_function)(void), void(*off_function)(void), int(*max_bom_function)(void))</td></tr> |
32 |
|
33 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the functions called to turn the bom on and off. <a href="#g0c407d5c215a97d58c67006bcc6e53ce"></a><br></td></tr> |
34 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__tokenring.html#ge1012b6d6c1c46b26a6c6da7e4ec7c88">wl_token_ring_join</a> (void)</td></tr> |
35 |
|
36 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Join the token ring. <a href="#ge1012b6d6c1c46b26a6c6da7e4ec7c88"></a><br></td></tr> |
37 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__tokenring.html#g6c2dd8742e100f63d4fb002707d1e85a">wl_token_ring_leave</a> (void)</td></tr> |
38 |
|
39 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Leave the token ring. <a href="#g6c2dd8742e100f63d4fb002707d1e85a"></a><br></td></tr> |
40 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__tokenring.html#g0c61bb8892aa5513706e00cd8ce5ca8b">wl_token_get_robots_in_ring</a> (void)</td></tr> |
41 |
|
42 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the number of robots in the token ring. <a href="#g0c61bb8892aa5513706e00cd8ce5ca8b"></a><br></td></tr> |
43 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__tokenring.html#g14e005f0b9582eca7e3585f247c4cd72">wl_token_is_robot_in_ring</a> (int robot)</td></tr> |
44 |
|
45 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return whether a given robot is in the token ring. <a href="#g14e005f0b9582eca7e3585f247c4cd72"></a><br></td></tr> |
46 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__tokenring.html#g37ab9fb00e9eef273b4d0fcda81a2620">wl_token_iterator_begin</a> (void)</td></tr> |
47 |
|
48 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Begin iterating through robots in the token ring. <a href="#g37ab9fb00e9eef273b4d0fcda81a2620"></a><br></td></tr> |
49 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__tokenring.html#gbd7dc40ee796a67e1160b2b2b8e7d02f">wl_token_iterator_has_next</a> (void)</td></tr> |
50 |
|
51 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns whether there are more robots to iterate through. <a href="#gbd7dc40ee796a67e1160b2b2b8e7d02f"></a><br></td></tr> |
52 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__tokenring.html#gd9196324178877770d8ffc91d40893c3">wl_token_iterator_next</a> (void)</td></tr> |
53 |
|
54 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the ID of the next robot in the token ring. <a href="#gd9196324178877770d8ffc91d40893c3"></a><br></td></tr> |
55 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__tokenring.html#gb4afd4b8e034d22d415f3c4a42a652fc">wl_token_get_sensor_reading</a> (int source, int dest)</td></tr> |
56 |
|
57 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the latest BOM reading between two robots. <a href="#gb4afd4b8e034d22d415f3c4a42a652fc"></a><br></td></tr> |
58 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__tokenring.html#g1938c1d79dd9438dcd413d6d26372877">wl_token_get_my_sensor_reading</a> (int dest)</td></tr> |
59 |
|
60 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the latest BOM reading between us and another robot. <a href="#g1938c1d79dd9438dcd413d6d26372877"></a><br></td></tr> |
61 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__tokenring.html#gf0d311d4feae71afc8bcb0b8c8e6ba57">wl_token_get_num_robots</a> (void)</td></tr> |
62 |
|
63 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the number of robots in the sensor matrix. <a href="#gf0d311d4feae71afc8bcb0b8c8e6ba57"></a><br></td></tr> |
64 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__tokenring.html#g5fe1508968d450a970b0d5417a06431d">wl_token_get_matrix_size</a> (void)</td></tr> |
65 |
|
66 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the number of non-null elements in the sensor matrix. <a href="#g5fe1508968d450a970b0d5417a06431d"></a><br></td></tr> |
67 |
</table>
|
68 |
<hr><a name="_details"></a><h2>Detailed Description</h2> |
69 |
Wireless library token ring implementation. |
70 |
<p>
|
71 |
This packet group is used to form a token ring, which keeps track of the relative directions of the robots from one another. <hr><h2>Function Documentation</h2> |
72 |
<a class="anchor" name="g5fe1508968d450a970b0d5417a06431d"></a><!-- doxytag: member="wl_token_ring.h::wl_token_get_matrix_size" ref="g5fe1508968d450a970b0d5417a06431d" args="(void)" --> |
73 |
<div class="memitem"> |
74 |
<div class="memproto"> |
75 |
<table class="memname"> |
76 |
<tr>
|
77 |
<td class="memname">int wl_token_get_matrix_size </td> |
78 |
<td>(</td> |
79 |
<td class="paramtype">void </td> |
80 |
<td class="paramname"> </td> |
81 |
<td> ) </td> |
82 |
<td></td> |
83 |
</tr>
|
84 |
</table>
|
85 |
</div>
|
86 |
<div class="memdoc"> |
87 |
|
88 |
<p>
|
89 |
Return the number of non-null elements in the sensor matrix. |
90 |
<p>
|
91 |
Returns the number of robots in the sensor matrix.<p>
|
92 |
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the number of robots in the sensor matrix </dd></dl> |
93 |
|
94 |
<p>References <a class="el" href="sensor__matrix_8c_source.html#l00159">sensor_matrix_get_size()</a>.</p> |
95 |
|
96 |
</div>
|
97 |
</div><p> |
98 |
<a class="anchor" name="g1938c1d79dd9438dcd413d6d26372877"></a><!-- doxytag: member="wl_token_ring.h::wl_token_get_my_sensor_reading" ref="g1938c1d79dd9438dcd413d6d26372877" args="(int dest)" --> |
99 |
<div class="memitem"> |
100 |
<div class="memproto"> |
101 |
<table class="memname"> |
102 |
<tr>
|
103 |
<td class="memname">int wl_token_get_my_sensor_reading </td> |
104 |
<td>(</td> |
105 |
<td class="paramtype">int </td> |
106 |
<td class="paramname"> <em>dest</em> </td> |
107 |
<td> ) </td> |
108 |
<td></td> |
109 |
</tr>
|
110 |
</table>
|
111 |
</div>
|
112 |
<div class="memdoc"> |
113 |
|
114 |
<p>
|
115 |
Return the latest BOM reading between us and another robot. |
116 |
<p>
|
117 |
Returns the BOM reading we have for robot dest.<p>
|
118 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
119 |
<table border="0" cellspacing="2" cellpadding="0"> |
120 |
<tr><td valign="top"></td><td valign="top"><em>dest</em> </td><td>the robot whose relative location is returned</td></tr> |
121 |
</table>
|
122 |
</dl>
|
123 |
<dl class="return" compact><dt><b>Returns:</b></dt><dd>a BOM reading from us to robot dest, in the range 0-15, or -1 if it is unkown </dd></dl> |
124 |
|
125 |
<p>References <a class="el" href="wireless_8c_source.html#l00235">wl_get_xbee_id()</a>, and <a class="el" href="wl__token__ring_8c_source.html#l00347">wl_token_get_sensor_reading()</a>.</p> |
126 |
|
127 |
</div>
|
128 |
</div><p> |
129 |
<a class="anchor" name="gf0d311d4feae71afc8bcb0b8c8e6ba57"></a><!-- doxytag: member="wl_token_ring.h::wl_token_get_num_robots" ref="gf0d311d4feae71afc8bcb0b8c8e6ba57" args="(void)" --> |
130 |
<div class="memitem"> |
131 |
<div class="memproto"> |
132 |
<table class="memname"> |
133 |
<tr>
|
134 |
<td class="memname">int wl_token_get_num_robots </td> |
135 |
<td>(</td> |
136 |
<td class="paramtype">void </td> |
137 |
<td class="paramname"> </td> |
138 |
<td> ) </td> |
139 |
<td></td> |
140 |
</tr>
|
141 |
</table>
|
142 |
</div>
|
143 |
<div class="memdoc"> |
144 |
|
145 |
<p>
|
146 |
Return the number of robots in the sensor matrix. |
147 |
<p>
|
148 |
Returns the number of robots currently in the token ring.<p>
|
149 |
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the number of robots in the token ring </dd></dl> |
150 |
|
151 |
<p>References <a class="el" href="sensor__matrix_8c_source.html#l00148">sensor_matrix_get_joined()</a>.</p> |
152 |
|
153 |
</div>
|
154 |
</div><p> |
155 |
<a class="anchor" name="g0c61bb8892aa5513706e00cd8ce5ca8b"></a><!-- doxytag: member="wl_token_ring.h::wl_token_get_robots_in_ring" ref="g0c61bb8892aa5513706e00cd8ce5ca8b" args="(void)" --> |
156 |
<div class="memitem"> |
157 |
<div class="memproto"> |
158 |
<table class="memname"> |
159 |
<tr>
|
160 |
<td class="memname">int wl_token_get_robots_in_ring </td> |
161 |
<td>(</td> |
162 |
<td class="paramtype">void </td> |
163 |
<td class="paramname"> </td> |
164 |
<td> ) </td> |
165 |
<td></td> |
166 |
</tr>
|
167 |
</table>
|
168 |
</div>
|
169 |
<div class="memdoc"> |
170 |
|
171 |
<p>
|
172 |
Return the number of robots in the token ring. |
173 |
<p>
|
174 |
Returns the number of robots in the token ring.<p>
|
175 |
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the number of robots in the token ring </dd></dl> |
176 |
|
177 |
<p>References <a class="el" href="sensor__matrix_8c_source.html#l00148">sensor_matrix_get_joined()</a>.</p> |
178 |
|
179 |
</div>
|
180 |
</div><p> |
181 |
<a class="anchor" name="gb4afd4b8e034d22d415f3c4a42a652fc"></a><!-- doxytag: member="wl_token_ring.h::wl_token_get_sensor_reading" ref="gb4afd4b8e034d22d415f3c4a42a652fc" args="(int source, int dest)" --> |
182 |
<div class="memitem"> |
183 |
<div class="memproto"> |
184 |
<table class="memname"> |
185 |
<tr>
|
186 |
<td class="memname">int wl_token_get_sensor_reading </td> |
187 |
<td>(</td> |
188 |
<td class="paramtype">int </td> |
189 |
<td class="paramname"> <em>source</em>, </td> |
190 |
</tr>
|
191 |
<tr>
|
192 |
<td class="paramkey"></td> |
193 |
<td></td> |
194 |
<td class="paramtype">int </td> |
195 |
<td class="paramname"> <em>dest</em></td><td> </td> |
196 |
</tr>
|
197 |
<tr>
|
198 |
<td></td> |
199 |
<td>)</td> |
200 |
<td></td><td></td><td></td> |
201 |
</tr>
|
202 |
</table>
|
203 |
</div>
|
204 |
<div class="memdoc"> |
205 |
|
206 |
<p>
|
207 |
Return the latest BOM reading between two robots. |
208 |
<p>
|
209 |
Returns the BOM reading robot source has for robot dest.<p>
|
210 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
211 |
<table border="0" cellspacing="2" cellpadding="0"> |
212 |
<tr><td valign="top"></td><td valign="top"><em>source</em> </td><td>the robot that made the BOM reading </td></tr> |
213 |
<tr><td valign="top"></td><td valign="top"><em>dest</em> </td><td>the robot whose relative location is returned</td></tr> |
214 |
</table>
|
215 |
</dl>
|
216 |
<dl class="return" compact><dt><b>Returns:</b></dt><dd>a BOM reading from robot source to robot dest, in the range 0-15, or -1 if it is unknown </dd></dl> |
217 |
|
218 |
<p>References <a class="el" href="sensor__matrix_8c_source.html#l00093">sensor_matrix_get_reading()</a>, <a class="el" href="wireless_8c_source.html#l00235">wl_get_xbee_id()</a>, and <a class="el" href="wl__token__ring_8c_source.html#l00394">wl_token_is_robot_in_ring()</a>.</p> |
219 |
|
220 |
<p>Referenced by <a class="el" href="wl__token__ring_8c_source.html#l00367">wl_token_get_my_sensor_reading()</a>.</p> |
221 |
|
222 |
</div>
|
223 |
</div><p> |
224 |
<a class="anchor" name="g14e005f0b9582eca7e3585f247c4cd72"></a><!-- doxytag: member="wl_token_ring.h::wl_token_is_robot_in_ring" ref="g14e005f0b9582eca7e3585f247c4cd72" args="(int robot)" --> |
225 |
<div class="memitem"> |
226 |
<div class="memproto"> |
227 |
<table class="memname"> |
228 |
<tr>
|
229 |
<td class="memname">int wl_token_is_robot_in_ring </td> |
230 |
<td>(</td> |
231 |
<td class="paramtype">int </td> |
232 |
<td class="paramname"> <em>robot</em> </td> |
233 |
<td> ) </td> |
234 |
<td></td> |
235 |
</tr>
|
236 |
</table>
|
237 |
</div>
|
238 |
<div class="memdoc"> |
239 |
|
240 |
<p>
|
241 |
Return whether a given robot is in the token ring. |
242 |
<p>
|
243 |
Returns true if the specified robot is in the token ring, false otherwise.<p>
|
244 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
245 |
<table border="0" cellspacing="2" cellpadding="0"> |
246 |
<tr><td valign="top"></td><td valign="top"><em>robot</em> </td><td>the robot to check for whether it is in the token ring </td></tr> |
247 |
</table>
|
248 |
</dl>
|
249 |
<dl class="return" compact><dt><b>Returns:</b></dt><dd>nonzero if the robot is in the token ring, zero otherwise </dd></dl> |
250 |
|
251 |
<p>References <a class="el" href="sensor__matrix_8c_source.html#l00134">sensor_matrix_get_in_ring()</a>.</p> |
252 |
|
253 |
<p>Referenced by <a class="el" href="wl__token__ring_8c_source.html#l00347">wl_token_get_sensor_reading()</a>.</p> |
254 |
|
255 |
</div>
|
256 |
</div><p> |
257 |
<a class="anchor" name="g37ab9fb00e9eef273b4d0fcda81a2620"></a><!-- doxytag: member="wl_token_ring.h::wl_token_iterator_begin" ref="g37ab9fb00e9eef273b4d0fcda81a2620" args="(void)" --> |
258 |
<div class="memitem"> |
259 |
<div class="memproto"> |
260 |
<table class="memname"> |
261 |
<tr>
|
262 |
<td class="memname">void wl_token_iterator_begin </td> |
263 |
<td>(</td> |
264 |
<td class="paramtype">void </td> |
265 |
<td class="paramname"> </td> |
266 |
<td> ) </td> |
267 |
<td></td> |
268 |
</tr>
|
269 |
</table>
|
270 |
</div>
|
271 |
<div class="memdoc"> |
272 |
|
273 |
<p>
|
274 |
Begin iterating through robots in the token ring. |
275 |
<p>
|
276 |
Begins iterating through the robots in the token ring.<p>
|
277 |
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__tokenring.html#gbd7dc40ee796a67e1160b2b2b8e7d02f" title="Returns whether there are more robots to iterate through.">wl_token_iterator_has_next</a>, <a class="el" href="group__tokenring.html#gd9196324178877770d8ffc91d40893c3" title="Returns the ID of the next robot in the token ring.">wl_token_iterator_next</a> </dd></dl> |
278 |
|
279 |
<p>References <a class="el" href="sensor__matrix_8c_source.html#l00134">sensor_matrix_get_in_ring()</a>, and <a class="el" href="sensor__matrix_8c_source.html#l00159">sensor_matrix_get_size()</a>.</p> |
280 |
|
281 |
</div>
|
282 |
</div><p> |
283 |
<a class="anchor" name="gbd7dc40ee796a67e1160b2b2b8e7d02f"></a><!-- doxytag: member="wl_token_ring.h::wl_token_iterator_has_next" ref="gbd7dc40ee796a67e1160b2b2b8e7d02f" args="(void)" --> |
284 |
<div class="memitem"> |
285 |
<div class="memproto"> |
286 |
<table class="memname"> |
287 |
<tr>
|
288 |
<td class="memname">int wl_token_iterator_has_next </td> |
289 |
<td>(</td> |
290 |
<td class="paramtype">void </td> |
291 |
<td class="paramname"> </td> |
292 |
<td> ) </td> |
293 |
<td></td> |
294 |
</tr>
|
295 |
</table>
|
296 |
</div>
|
297 |
<div class="memdoc"> |
298 |
|
299 |
<p>
|
300 |
Returns whether there are more robots to iterate through. |
301 |
<p>
|
302 |
Returns true if there are more robots in the token ring to iterate through, and false otherwise.<p>
|
303 |
<dl class="return" compact><dt><b>Returns:</b></dt><dd>nonzero if there are more robots to iterate through, zero otherwise</dd></dl> |
304 |
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__tokenring.html#g37ab9fb00e9eef273b4d0fcda81a2620" title="Begin iterating through robots in the token ring.">wl_token_iterator_begin</a>, <a class="el" href="group__tokenring.html#gd9196324178877770d8ffc91d40893c3" title="Returns the ID of the next robot in the token ring.">wl_token_iterator_next</a> </dd></dl> |
305 |
|
306 |
</div>
|
307 |
</div><p> |
308 |
<a class="anchor" name="gd9196324178877770d8ffc91d40893c3"></a><!-- doxytag: member="wl_token_ring.h::wl_token_iterator_next" ref="gd9196324178877770d8ffc91d40893c3" args="(void)" --> |
309 |
<div class="memitem"> |
310 |
<div class="memproto"> |
311 |
<table class="memname"> |
312 |
<tr>
|
313 |
<td class="memname">int wl_token_iterator_next </td> |
314 |
<td>(</td> |
315 |
<td class="paramtype">void </td> |
316 |
<td class="paramname"> </td> |
317 |
<td> ) </td> |
318 |
<td></td> |
319 |
</tr>
|
320 |
</table>
|
321 |
</div>
|
322 |
<div class="memdoc"> |
323 |
|
324 |
<p>
|
325 |
Returns the ID of the next robot in the token ring. |
326 |
<p>
|
327 |
Returns the next robot ID in the token ring.<p>
|
328 |
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the next robot ID in the token ring, or -1 if none exists</dd></dl> |
329 |
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__tokenring.html#g37ab9fb00e9eef273b4d0fcda81a2620" title="Begin iterating through robots in the token ring.">wl_token_iterator_begin</a>, <a class="el" href="group__tokenring.html#gbd7dc40ee796a67e1160b2b2b8e7d02f" title="Returns whether there are more robots to iterate through.">wl_token_iterator_has_next</a> </dd></dl> |
330 |
|
331 |
<p>References <a class="el" href="sensor__matrix_8c_source.html#l00134">sensor_matrix_get_in_ring()</a>, and <a class="el" href="sensor__matrix_8c_source.html#l00159">sensor_matrix_get_size()</a>.</p> |
332 |
|
333 |
</div>
|
334 |
</div><p> |
335 |
<a class="anchor" name="ge1012b6d6c1c46b26a6c6da7e4ec7c88"></a><!-- doxytag: member="wl_token_ring.h::wl_token_ring_join" ref="ge1012b6d6c1c46b26a6c6da7e4ec7c88" args="(void)" --> |
336 |
<div class="memitem"> |
337 |
<div class="memproto"> |
338 |
<table class="memname"> |
339 |
<tr>
|
340 |
<td class="memname">int wl_token_ring_join </td> |
341 |
<td>(</td> |
342 |
<td class="paramtype">void </td> |
343 |
<td class="paramname"> </td> |
344 |
<td> ) </td> |
345 |
<td></td> |
346 |
</tr>
|
347 |
</table>
|
348 |
</div>
|
349 |
<div class="memdoc"> |
350 |
|
351 |
<p>
|
352 |
Join the token ring. |
353 |
<p>
|
354 |
Causes the robot to join an existing token ring, or create one if no token ring exists. The token ring uses global and robot to robot packets, and does not rely on any PAN. |
355 |
<p>References <a class="el" href="wireless_8c_source.html#l00285">wl_send_global_packet()</a>.</p> |
356 |
|
357 |
</div>
|
358 |
</div><p> |
359 |
<a class="anchor" name="g6c2dd8742e100f63d4fb002707d1e85a"></a><!-- doxytag: member="wl_token_ring.h::wl_token_ring_leave" ref="g6c2dd8742e100f63d4fb002707d1e85a" args="(void)" --> |
360 |
<div class="memitem"> |
361 |
<div class="memproto"> |
362 |
<table class="memname"> |
363 |
<tr>
|
364 |
<td class="memname">void wl_token_ring_leave </td> |
365 |
<td>(</td> |
366 |
<td class="paramtype">void </td> |
367 |
<td class="paramname"> </td> |
368 |
<td> ) </td> |
369 |
<td></td> |
370 |
</tr>
|
371 |
</table>
|
372 |
</div>
|
373 |
<div class="memdoc"> |
374 |
|
375 |
<p>
|
376 |
Leave the token ring. |
377 |
<p>
|
378 |
Causes the robot to leave the token ring. The robot stops alerting others of its location, but continues storing the locations of other robots. |
379 |
</div>
|
380 |
</div><p> |
381 |
<a class="anchor" name="g00fb5cca21a50d39aa1e82fdc679ca44"></a><!-- doxytag: member="wl_token_ring.h::wl_token_ring_register" ref="g00fb5cca21a50d39aa1e82fdc679ca44" args="(void)" --> |
382 |
<div class="memitem"> |
383 |
<div class="memproto"> |
384 |
<table class="memname"> |
385 |
<tr>
|
386 |
<td class="memname">int wl_token_ring_register </td> |
387 |
<td>(</td> |
388 |
<td class="paramtype">void </td> |
389 |
<td class="paramname"> </td> |
390 |
<td> ) </td> |
391 |
<td></td> |
392 |
</tr>
|
393 |
</table>
|
394 |
</div>
|
395 |
<div class="memdoc"> |
396 |
|
397 |
<p>
|
398 |
Register the token ring group with the wireless library. |
399 |
<p>
|
400 |
Initialize the token ring packet group and register it with the wireless library. The robot will not join a token ring. |
401 |
<p>References <a class="el" href="sensor__matrix_8c_source.html#l00049">sensor_matrix_create()</a>, <a class="el" href="sensor__matrix_8c_source.html#l00111">sensor_matrix_set_in_ring()</a>, <a class="el" href="wireless_8c_source.html#l00235">wl_get_xbee_id()</a>, and <a class="el" href="wireless_8c_source.html#l00342">wl_register_packet_group()</a>.</p> |
402 |
|
403 |
</div>
|
404 |
</div><p> |
405 |
<a class="anchor" name="g0c407d5c215a97d58c67006bcc6e53ce"></a><!-- doxytag: member="wl_token_ring.h::wl_token_ring_set_bom_functions" ref="g0c407d5c215a97d58c67006bcc6e53ce" args="(void(*on_function)(void), void(*off_function)(void), int(*max_bom_function)(void))" --> |
406 |
<div class="memitem"> |
407 |
<div class="memproto"> |
408 |
<table class="memname"> |
409 |
<tr>
|
410 |
<td class="memname">void wl_token_ring_set_bom_functions </td> |
411 |
<td>(</td> |
412 |
<td class="paramtype">void(*)(void) </td> |
413 |
<td class="paramname"> <em>on_function</em>, </td> |
414 |
</tr>
|
415 |
<tr>
|
416 |
<td class="paramkey"></td> |
417 |
<td></td> |
418 |
<td class="paramtype">void(*)(void) </td> |
419 |
<td class="paramname"> <em>off_function</em>, </td> |
420 |
</tr>
|
421 |
<tr>
|
422 |
<td class="paramkey"></td> |
423 |
<td></td> |
424 |
<td class="paramtype">int(*)(void) </td> |
425 |
<td class="paramname"> <em>max_bom_function</em></td><td> </td> |
426 |
</tr>
|
427 |
<tr>
|
428 |
<td></td> |
429 |
<td>)</td> |
430 |
<td></td><td></td><td></td> |
431 |
</tr>
|
432 |
</table>
|
433 |
</div>
|
434 |
<div class="memdoc"> |
435 |
|
436 |
<p>
|
437 |
Set the functions called to turn the bom on and off. |
438 |
<p>
|
439 |
Sets the functions that are called when the BOM ought to be turned on or off. This could be used for things such as charging stations, which have multiple BOMs.<p>
|
440 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
441 |
<table border="0" cellspacing="2" cellpadding="0"> |
442 |
<tr><td valign="top"></td><td valign="top"><em>on_function</em> </td><td>the function to be called when the BOM should be turned on </td></tr> |
443 |
<tr><td valign="top"></td><td valign="top"><em>off_function</em> </td><td>the function to be called when the BOM should be turned off </td></tr> |
444 |
<tr><td valign="top"></td><td valign="top"><em>max_bom_function</em> </td><td>the function to be called when a measurement of the maximum BOM reading is needed. </td></tr> |
445 |
</table>
|
446 |
</dl>
|
447 |
|
448 |
</div>
|
449 |
</div><p> |
450 |
<a class="anchor" name="gde3dd682b6a757bab6ce4cbc9c518f8e"></a><!-- doxytag: member="wl_token_ring.h::wl_token_ring_unregister" ref="gde3dd682b6a757bab6ce4cbc9c518f8e" args="(void)" --> |
451 |
<div class="memitem"> |
452 |
<div class="memproto"> |
453 |
<table class="memname"> |
454 |
<tr>
|
455 |
<td class="memname">void wl_token_ring_unregister </td> |
456 |
<td>(</td> |
457 |
<td class="paramtype">void </td> |
458 |
<td class="paramname"> </td> |
459 |
<td> ) </td> |
460 |
<td></td> |
461 |
</tr>
|
462 |
</table>
|
463 |
</div>
|
464 |
<div class="memdoc"> |
465 |
|
466 |
<p>
|
467 |
Unregister the token ring group with the wirelss library. |
468 |
<p>
|
469 |
Removes the packet group from the wireless library. |
470 |
<p>References <a class="el" href="wireless_8c_source.html#l00362">wl_unregister_packet_group()</a>.</p> |
471 |
|
472 |
</div>
|
473 |
</div><p> |
474 |
</div>
|
475 |
<hr size="1"><address style="text-align: right;"><small>Generated on Tue Sep 8 19:59:17 2009 for libwireless by |
476 |
<a href="http://www.doxygen.org/index.html"> |
477 |
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> |
478 |
</body>
|
479 |
</html>
|