Project

General

Profile

Revision 1427

Added by Chris Mar almost 10 years ago

updated wl_basic code, docs, and test. it's ready to go.

View differences:

trunk/docs/libwireless/wireless_8h_source.html
76 76
<a name="l00163"></a>00163 <span class="preprocessor">#endif</span>
77 77
<a name="l00164"></a>00164 <span class="preprocessor"></span>
78 78
</pre></div></div>
79
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
79
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
80 80
<a href="http://www.doxygen.org/index.html">
81 81
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
82 82
</body>
trunk/docs/libwireless/wl__basic_8c.html
44 44
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">send a packet to all robots in Basic Group  <a href="group__wl__basic.html#ga72d4f604603ef2541b5f4d3ae467938e"></a><br/></td></tr>
45 45
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__basic.html#ga0ad976b2b61cca0081123606101c97cd">wl_basic_packet_receive_handler</a> (char type, int source, unsigned char *packet, int length)</td></tr>
46 46
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">internal default packet handler if none is specified on init  <a href="group__wl__basic.html#ga0ad976b2b61cca0081123606101c97cd"></a><br/></td></tr>
47
<tr><td class="memItemLeft" align="right" valign="top">unsigned char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__basic.html#gad10a8456bc3d30d22fe1dbd40b6e0dbb">wl_basic_do_default</a> (void)</td></tr>
48
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">wrapper for <a class="el" href="group__wireless.html#ga5c1f1a0e20fc718e59edc29246afd703" title="Perform wireless library functionality.">wl_do()</a> to return packet data buffer  <a href="group__wl__basic.html#gad10a8456bc3d30d22fe1dbd40b6e0dbb"></a><br/></td></tr>
47
<tr><td class="memItemLeft" align="right" valign="top">unsigned char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__basic.html#gac3f8a6f5c4d9c258ab9f29f9557632d0">wl_basic_do_default</a> (int *length)</td></tr>
48
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">wrapper for <a class="el" href="group__wireless.html#ga5c1f1a0e20fc718e59edc29246afd703" title="Perform wireless library functionality.">wl_do()</a> to return packet data buffer  <a href="group__wl__basic.html#gac3f8a6f5c4d9c258ab9f29f9557632d0"></a><br/></td></tr>
49 49
</table>
50 50
<hr/><a name="_details"></a><h2>Detailed Description</h2>
51 51
<p>High Level Wireless Packet Sending-Receiving Functions. </p>
52 52
<p>Abstracted wireless functionality for sending and receiving packets</p>
53 53
<dl class="author"><dt><b>Author:</b></dt><dd>Christopher Mar, Colony Project, CMU Robotics Club </dd></dl>
54 54
</div>
55
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
55
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
56 56
<a href="http://www.doxygen.org/index.html">
57 57
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
58 58
</body>
trunk/docs/libwireless/xbee_8c.html
103 103
<p>Implementation of low level communication with the XBee in API mode.</p>
104 104
<dl class="author"><dt><b>Author:</b></dt><dd>Brian Coltin, Colony Project, CMU Robotics Club </dd></dl>
105 105
</div>
106
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
106
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
107 107
<a href="http://www.doxygen.org/index.html">
108 108
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
109 109
</body>
trunk/docs/libwireless/wl__token__ring_8h_source.html
50 50
<a name="l00084"></a>00084 
51 51
<a name="l00085"></a>00085 <span class="preprocessor">#endif</span>
52 52
</pre></div></div>
53
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
53
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
54 54
<a href="http://www.doxygen.org/index.html">
55 55
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
56 56
</body>
trunk/docs/libwireless/globals_defs.html
69 69
</li>
70 70
</ul>
71 71
</div>
72
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
72
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
73 73
<a href="http://www.doxygen.org/index.html">
74 74
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
75 75
</body>
trunk/docs/libwireless/sensor__matrix_8c.html
61 61
<p>Implementation of a sensor matrix for storing localization implementation.</p>
62 62
<dl class="author"><dt><b>Author:</b></dt><dd>Brian Coltin, Colony Project, CMU Robotics Club </dd></dl>
63 63
</div>
64
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
64
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
65 65
<a href="http://www.doxygen.org/index.html">
66 66
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
67 67
</body>
trunk/docs/libwireless/structPacketGroupHandler.html
141 141
<li><a class="el" href="wireless_8h_source.html">wireless.h</a></li>
142 142
</ul>
143 143
</div>
144
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
144
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
145 145
<a href="http://www.doxygen.org/index.html">
146 146
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
147 147
</body>
trunk/docs/libwireless/structPacketInfo.html
52 52
<li><a class="el" href="wl__basic_8h_source.html">wl_basic.h</a></li>
53 53
</ul>
54 54
</div>
55
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
55
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
56 56
<a href="http://www.doxygen.org/index.html">
57 57
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
58 58
</body>
trunk/docs/libwireless/wireless_8h.html
94 94
</div>
95 95
</div>
96 96
</div>
97
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
97
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
98 98
<a href="http://www.doxygen.org/index.html">
99 99
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
100 100
</body>
trunk/docs/libwireless/group__wl__basic.html
43 43
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">send a packet to all robots in Basic Group  <a href="#ga72d4f604603ef2541b5f4d3ae467938e"></a><br/></td></tr>
44 44
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__basic.html#ga0ad976b2b61cca0081123606101c97cd">wl_basic_packet_receive_handler</a> (char type, int source, unsigned char *packet, int length)</td></tr>
45 45
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">internal default packet handler if none is specified on init  <a href="#ga0ad976b2b61cca0081123606101c97cd"></a><br/></td></tr>
46
<tr><td class="memItemLeft" align="right" valign="top">unsigned char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__basic.html#gad10a8456bc3d30d22fe1dbd40b6e0dbb">wl_basic_do_default</a> (void)</td></tr>
47
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">wrapper for <a class="el" href="group__wireless.html#ga5c1f1a0e20fc718e59edc29246afd703" title="Perform wireless library functionality.">wl_do()</a> to return packet data buffer  <a href="#gad10a8456bc3d30d22fe1dbd40b6e0dbb"></a><br/></td></tr>
46
<tr><td class="memItemLeft" align="right" valign="top">unsigned char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__basic.html#gac3f8a6f5c4d9c258ab9f29f9557632d0">wl_basic_do_default</a> (int *length)</td></tr>
47
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">wrapper for <a class="el" href="group__wireless.html#ga5c1f1a0e20fc718e59edc29246afd703" title="Perform wireless library functionality.">wl_do()</a> to return packet data buffer  <a href="#gac3f8a6f5c4d9c258ab9f29f9557632d0"></a><br/></td></tr>
48 48
<tr><td colspan="2"><h2>Variables</h2></td></tr>
49 49
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaf0fa88111d706ef4e8b3bda5bc32596c"></a><!-- doxytag: member="wl_basic::wl_basic_group_handler" ref="gaf0fa88111d706ef4e8b3bda5bc32596c" args="" -->
50 50
<a class="el" href="structPacketGroupHandler.html">PacketGroupHandler</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__basic.html#gaf0fa88111d706ef4e8b3bda5bc32596c">wl_basic_group_handler</a></td></tr>
......
58 58
<p>A high level abstraction of the wireless library.</p>
59 59
<p>This will allow you to easily send and receive packets. </p>
60 60
<hr/><h2>Function Documentation</h2>
61
<a class="anchor" id="gad10a8456bc3d30d22fe1dbd40b6e0dbb"></a><!-- doxytag: member="wl_basic.h::wl_basic_do_default" ref="gad10a8456bc3d30d22fe1dbd40b6e0dbb" args="(void)" -->
61
<a class="anchor" id="gac3f8a6f5c4d9c258ab9f29f9557632d0"></a><!-- doxytag: member="wl_basic.h::wl_basic_do_default" ref="gac3f8a6f5c4d9c258ab9f29f9557632d0" args="(int *length)" -->
62 62
<div class="memitem">
63 63
<div class="memproto">
64 64
      <table class="memname">
65 65
        <tr>
66 66
          <td class="memname">unsigned char* wl_basic_do_default </td>
67 67
          <td>(</td>
68
          <td class="paramtype">void&nbsp;</td>
69
          <td class="paramname"></td>
68
          <td class="paramtype">int *&nbsp;</td>
69
          <td class="paramname"> <em>length</em></td>
70 70
          <td>&nbsp;)&nbsp;</td>
71 71
          <td></td>
72 72
        </tr>
......
76 76

  
77 77
<p>wrapper for <a class="el" href="group__wireless.html#ga5c1f1a0e20fc718e59edc29246afd703" title="Perform wireless library functionality.">wl_do()</a> to return packet data buffer </p>
78 78
<p>Wrapper for <a class="el" href="group__wireless.html#ga5c1f1a0e20fc718e59edc29246afd703" title="Perform wireless library functionality.">wl_do()</a> for use with the Basic Wireless group. Can only be called if wl_basic_init_default and your packets are handled with the default packet handler. To access packet information, use <a class="el" href="structPacketInfo.html" title="struct that contains relevant packet information">PacketInfo</a> current_packet.</p>
79
<dl><dt><b>Parameters:</b></dt><dd>
80
  <table border="0" cellspacing="2" cellpadding="0">
81
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>a pointer to int to store the length of the data buffer</td></tr>
82
  </table>
83
  </dd>
84
</dl>
79 85
<dl class="return"><dt><b>Returns:</b></dt><dd>pointer to the data of the packet just received, 0 if no new packet </dd></dl>
80 86

  
81 87
<p>References <a class="el" href="wl__basic_8h_source.html#l00046">current_packet</a>, and <a class="el" href="wireless_8c_source.html#l00390">wl_do()</a>.</p>
......
323 329
</div>
324 330
</div>
325 331
</div>
326
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
332
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
327 333
<a href="http://www.doxygen.org/index.html">
328 334
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
329 335
</body>
trunk/docs/libwireless/wl__token__ring_8h.html
70 70
<p>Contains declarations for the token ring packet group.</p>
71 71
<dl class="author"><dt><b>Author:</b></dt><dd>Brian Coltin, Colony Project, CMU Robotics Club </dd></dl>
72 72
</div>
73
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
73
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
74 74
<a href="http://www.doxygen.org/index.html">
75 75
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
76 76
</body>
trunk/docs/libwireless/globals_func.html
76 76

  
77 77
<h3><a class="anchor" id="index_w">- w -</a></h3><ul>
78 78
<li>wl_basic_do_default()
79
: <a class="el" href="group__wl__basic.html#gad10a8456bc3d30d22fe1dbd40b6e0dbb">wl_basic.c</a>
80
, <a class="el" href="group__wl__basic.html#gad10a8456bc3d30d22fe1dbd40b6e0dbb">wl_basic.h</a>
79
: <a class="el" href="group__wl__basic.html#gac3f8a6f5c4d9c258ab9f29f9557632d0">wl_basic.c</a>
80
, <a class="el" href="group__wl__basic.html#gac3f8a6f5c4d9c258ab9f29f9557632d0">wl_basic.h</a>
81 81
</li>
82 82
<li>wl_basic_init()
83 83
: <a class="el" href="group__wl__basic.html#gaae4a8ae98cc33955ee20b6e481d47adf">wl_basic.h</a>
......
274 274
</li>
275 275
</ul>
276 276
</div>
277
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
277
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
278 278
<a href="http://www.doxygen.org/index.html">
279 279
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
280 280
</body>
trunk/docs/libwireless/group__xbee.html
361 361
</div>
362 362
</div>
363 363
</div>
364
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
364
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
365 365
<a href="http://www.doxygen.org/index.html">
366 366
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
367 367
</body>
trunk/docs/libwireless/xbee_8h_source.html
62 62
<a name="l00098"></a>00098 
63 63
<a name="l00099"></a>00099 <span class="preprocessor">#endif</span>
64 64
</pre></div></div>
65
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
65
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
66 66
<a href="http://www.doxygen.org/index.html">
67 67
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
68 68
</body>
trunk/docs/libwireless/structSensorMatrix.html
91 91
<li><a class="el" href="sensor__matrix_8h_source.html">sensor_matrix.h</a></li>
92 92
</ul>
93 93
</div>
94
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
94
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
95 95
<a href="http://www.doxygen.org/index.html">
96 96
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
97 97
</body>
trunk/docs/libwireless/functions.html
58 58
</li>
59 59
</ul>
60 60
</div>
61
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
61
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
62 62
<a href="http://www.doxygen.org/index.html">
63 63
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
64 64
</body>
trunk/docs/libwireless/group__sensormatrix.html
288 288
</div>
289 289
</div>
290 290
</div>
291
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
291
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
292 292
<a href="http://www.doxygen.org/index.html">
293 293
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
294 294
</body>
trunk/docs/libwireless/group__tokenring.html
440 440
</div>
441 441
</div>
442 442
</div>
443
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
443
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
444 444
<a href="http://www.doxygen.org/index.html">
445 445
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
446 446
</body>
trunk/docs/libwireless/annotated.html
31 31
  <tr><td class="indexkey"><a class="el" href="structSensorMatrix.html">SensorMatrix</a></td><td class="indexvalue"></td></tr>
32 32
</table>
33 33
</div>
34
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
34
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
35 35
<a href="http://www.doxygen.org/index.html">
36 36
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
37 37
</body>
trunk/docs/libwireless/globals_vars.html
42 42
</li>
43 43
</ul>
44 44
</div>
45
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
45
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
46 46
<a href="http://www.doxygen.org/index.html">
47 47
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
48 48
</body>
trunk/docs/libwireless/wl__basic_8h.html
52 52
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">send a packet to all robots in Basic Group  <a href="group__wl__basic.html#ga72d4f604603ef2541b5f4d3ae467938e"></a><br/></td></tr>
53 53
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__basic.html#ga0ad976b2b61cca0081123606101c97cd">wl_basic_packet_receive_handler</a> (char type, int source, unsigned char *packet, int length)</td></tr>
54 54
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">internal default packet handler if none is specified on init  <a href="group__wl__basic.html#ga0ad976b2b61cca0081123606101c97cd"></a><br/></td></tr>
55
<tr><td class="memItemLeft" align="right" valign="top">unsigned char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__basic.html#gad10a8456bc3d30d22fe1dbd40b6e0dbb">wl_basic_do_default</a> (void)</td></tr>
56
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">wrapper for <a class="el" href="group__wireless.html#ga5c1f1a0e20fc718e59edc29246afd703" title="Perform wireless library functionality.">wl_do()</a> to return packet data buffer  <a href="group__wl__basic.html#gad10a8456bc3d30d22fe1dbd40b6e0dbb"></a><br/></td></tr>
55
<tr><td class="memItemLeft" align="right" valign="top">unsigned char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__basic.html#gac3f8a6f5c4d9c258ab9f29f9557632d0">wl_basic_do_default</a> (int *length)</td></tr>
56
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">wrapper for <a class="el" href="group__wireless.html#ga5c1f1a0e20fc718e59edc29246afd703" title="Perform wireless library functionality.">wl_do()</a> to return packet data buffer  <a href="group__wl__basic.html#gac3f8a6f5c4d9c258ab9f29f9557632d0"></a><br/></td></tr>
57 57
<tr><td colspan="2"><h2>Variables</h2></td></tr>
58 58
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaf0fa88111d706ef4e8b3bda5bc32596c"></a><!-- doxytag: member="wl_basic.h::wl_basic_group_handler" ref="gaf0fa88111d706ef4e8b3bda5bc32596c" args="" -->
59 59
<a class="el" href="structPacketGroupHandler.html">PacketGroupHandler</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wl__basic.html#gaf0fa88111d706ef4e8b3bda5bc32596c">wl_basic_group_handler</a></td></tr>
......
67 67
<p>Abstracted wireless functionality for sending and receiving packets</p>
68 68
<dl class="author"><dt><b>Author:</b></dt><dd>Christopher Mar, Colony Project, CMU Robotics Club </dd></dl>
69 69
</div>
70
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
70
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
71 71
<a href="http://www.doxygen.org/index.html">
72 72
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
73 73
</body>
trunk/docs/libwireless/wl__defs_8h.html
68 68
<p>Contains definitions for wireless packet groups, packet types, debugging information, etc.</p>
69 69
<dl class="author"><dt><b>Author:</b></dt><dd>Brian Coltin, Colony Project, CMU Robotics Club </dd></dl>
70 70
</div>
71
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
71
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
72 72
<a href="http://www.doxygen.org/index.html">
73 73
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
74 74
</body>
trunk/docs/libwireless/xbee_8h.html
104 104
</div>
105 105
</div>
106 106
</div>
107
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
107
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
108 108
<a href="http://www.doxygen.org/index.html">
109 109
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
110 110
</body>
trunk/docs/libwireless/globals.html
84 84

  
85 85
<h3><a class="anchor" id="index_w">- w -</a></h3><ul>
86 86
<li>wl_basic_do_default()
87
: <a class="el" href="group__wl__basic.html#gad10a8456bc3d30d22fe1dbd40b6e0dbb">wl_basic.c</a>
88
, <a class="el" href="group__wl__basic.html#gad10a8456bc3d30d22fe1dbd40b6e0dbb">wl_basic.h</a>
87
: <a class="el" href="group__wl__basic.html#gac3f8a6f5c4d9c258ab9f29f9557632d0">wl_basic.c</a>
88
, <a class="el" href="group__wl__basic.html#gac3f8a6f5c4d9c258ab9f29f9557632d0">wl_basic.h</a>
89 89
</li>
90 90
<li>WL_BASIC_GROUP
91 91
: <a class="el" href="group__wl__basic.html#ga366b705160e22c2a6c4ea2c3c22e3485">wl_basic.h</a>
......
318 318
</li>
319 319
</ul>
320 320
</div>
321
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
321
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
322 322
<a href="http://www.doxygen.org/index.html">
323 323
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
324 324
</body>
trunk/docs/libwireless/wl__error__group_8h_source.html
34 34
<a name="l00065"></a>00065 
35 35
<a name="l00066"></a>00066 <span class="preprocessor">#endif</span>
36 36
</pre></div></div>
37
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
37
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
38 38
<a href="http://www.doxygen.org/index.html">
39 39
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
40 40
</body>
trunk/docs/libwireless/wireless_8c.html
78 78
<p>Implementation of the wireless library.</p>
79 79
<dl class="author"><dt><b>Author:</b></dt><dd>Brian Coltin, Colony Project, CMU Robotics Club </dd></dl>
80 80
</div>
81
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
81
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
82 82
<a href="http://www.doxygen.org/index.html">
83 83
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
84 84
</body>
trunk/docs/libwireless/wl__token__ring_8c.html
91 91
<p>Implementation of the token ring packet group.</p>
92 92
<dl class="author"><dt><b>Author:</b></dt><dd>Brian Coltin, Colony Project, CMU Robotics Club </dd></dl>
93 93
</div>
94
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
94
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
95 95
<a href="http://www.doxygen.org/index.html">
96 96
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
97 97
</body>
trunk/docs/libwireless/sensor__matrix_8h.html
63 63
<p>Contains functions and declarations for using sensor matrices.</p>
64 64
<dl class="author"><dt><b>Author:</b></dt><dd>Brian Coltin, Colony Project, CMU Robotics Club </dd></dl>
65 65
</div>
66
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
66
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
67 67
<a href="http://www.doxygen.org/index.html">
68 68
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
69 69
</body>
trunk/docs/libwireless/classes.html
31 31
</td><td><a class="el" href="structPacketGroupHandler.html">PacketGroupHandler</a>&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="structPacketInfo.html">PacketInfo</a>&nbsp;&nbsp;&nbsp;</td><td><a name="letter_S"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&nbsp;&nbsp;S&nbsp;&nbsp;</div></td></tr></table>
32 32
</td><td><a class="el" href="structSensorMatrix.html">SensorMatrix</a>&nbsp;&nbsp;&nbsp;</td></tr></table><div class="qindex"><a class="qindex" href="#letter_P">P</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_S">S</a></div>
33 33
</div>
34
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
34
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
35 35
<a href="http://www.doxygen.org/index.html">
36 36
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
37 37
</body>
trunk/docs/libwireless/wl__basic_8h_source.html
49 49
<a name="l00055"></a>00055 <span class="keywordtype">void</span> <a class="code" href="group__wl__basic.html#gad5d7334484e49cc3cb9ebe2cfc323115" title="send a packet to a single robot in Basic Group">wl_basic_send_robot_packet</a>( <span class="keywordtype">char</span> type, <span class="keywordtype">char</span>* data, <span class="keywordtype">int</span> len, <span class="keywordtype">int</span> dest );
50 50
<a name="l00057"></a>00057 <span class="keywordtype">void</span> <a class="code" href="group__wl__basic.html#ga72d4f604603ef2541b5f4d3ae467938e" title="send a packet to all robots in Basic Group">wl_basic_send_global_packet</a>( <span class="keywordtype">char</span> type, <span class="keywordtype">char</span>* data, <span class="keywordtype">int</span> len );
51 51
<a name="l00059"></a>00059 <span class="keywordtype">void</span> <a class="code" href="group__wl__basic.html#ga0ad976b2b61cca0081123606101c97cd" title="internal default packet handler if none is specified on init">wl_basic_packet_receive_handler</a>( <span class="keywordtype">char</span> type, <span class="keywordtype">int</span> source, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* packet, <span class="keywordtype">int</span> length );
52
<a name="l00061"></a>00061 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* <a class="code" href="group__wl__basic.html#gad10a8456bc3d30d22fe1dbd40b6e0dbb" title="wrapper for wl_do() to return packet data buffer">wl_basic_do_default</a>( <span class="keywordtype">void</span> ); <span class="comment">// end defgroup</span>
52
<a name="l00061"></a>00061 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* <a class="code" href="group__wl__basic.html#gac3f8a6f5c4d9c258ab9f29f9557632d0" title="wrapper for wl_do() to return packet data buffer">wl_basic_do_default</a>( <span class="keywordtype">int</span> *length ); <span class="comment">// end defgroup</span>
53 53
<a name="l00063"></a>00063 
54 54
<a name="l00064"></a>00064 <span class="preprocessor">#endif</span>
55 55
<a name="l00065"></a>00065 <span class="preprocessor"></span>
56 56
</pre></div></div>
57
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
57
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
58 58
<a href="http://www.doxygen.org/index.html">
59 59
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
60 60
</body>
trunk/docs/libwireless/wl__defs_8h_source.html
87 87
<a name="l00096"></a>00096 <span class="preprocessor">#endif</span>
88 88
<a name="l00097"></a>00097 <span class="preprocessor"></span>
89 89
</pre></div></div>
90
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
90
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
91 91
<a href="http://www.doxygen.org/index.html">
92 92
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
93 93
</body>
trunk/docs/libwireless/files.html
40 40
  <tr><td class="indexkey"><a class="el" href="xbee_8h.html">xbee.h</a> <a href="xbee_8h_source.html">[code]</a></td><td class="indexvalue">Contains definitions for using the XBee </td></tr>
41 41
</table>
42 42
</div>
43
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
43
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
44 44
<a href="http://www.doxygen.org/index.html">
45 45
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
46 46
</body>
trunk/docs/libwireless/functions_vars.html
58 58
</li>
59 59
</ul>
60 60
</div>
61
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
61
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
62 62
<a href="http://www.doxygen.org/index.html">
63 63
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
64 64
</body>
trunk/docs/libwireless/wl__error__group_8h.html
57 57
<p>A packet group for sending and receiving error messages.</p>
58 58
<dl class="author"><dt><b>Author:</b></dt><dd>Brian Coltin, Colony Project, CMU Robotics Club </dd></dl>
59 59
</div>
60
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
60
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
61 61
<a href="http://www.doxygen.org/index.html">
62 62
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
63 63
</body>
trunk/docs/libwireless/index.html
20 20
</div>
21 21
<div class="contents">
22 22
<h1>libwireless Documentation</h1><h3>1.0 </h3></div>
23
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
23
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
24 24
<a href="http://www.doxygen.org/index.html">
25 25
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
26 26
</body>
trunk/docs/libwireless/group__wlerror.html
111 111
</div>
112 112
</div>
113 113
</div>
114
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
114
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
115 115
<a href="http://www.doxygen.org/index.html">
116 116
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
117 117
</body>
trunk/docs/libwireless/modules.html
28 28
<li><a class="el" href="group__xbee.html">XBee</a></li>
29 29
</ul>
30 30
</div>
31
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
31
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
32 32
<a href="http://www.doxygen.org/index.html">
33 33
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
34 34
</body>
trunk/docs/libwireless/group__wireless.html
89 89

  
90 90
<p>References <a class="el" href="structPacketGroupHandler.html#a5c01636d72de2ddafc734ab754d93104">PacketGroupHandler::handle_receive</a>, <a class="el" href="structPacketGroupHandler.html#a045939030c6e2f2dd0d53b5718d9f902">PacketGroupHandler::handle_response</a>, <a class="el" href="xbee_8c_source.html#l00725">xbee_get_packet()</a>, <a class="el" href="xbee_8h_source.html#l00074">XBEE_RX</a>, and <a class="el" href="xbee_8h_source.html#l00072">XBEE_TX_STATUS</a>.</p>
91 91

  
92
<p>Referenced by <a class="el" href="wl__basic_8c_source.html#l00101">wl_basic_do_default()</a>.</p>
92
<p>Referenced by <a class="el" href="wl__basic_8c_source.html#l00103">wl_basic_do_default()</a>.</p>
93 93

  
94 94
</div>
95 95
</div>
......
604 604
</div>
605 605
</div>
606 606
</div>
607
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
607
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
608 608
<a href="http://www.doxygen.org/index.html">
609 609
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
610 610
</body>
trunk/docs/libwireless/sensor__matrix_8h_source.html
59 59
<a name="l00100"></a>00100 <span class="preprocessor">#endif</span>
60 60
<a name="l00101"></a>00101 <span class="preprocessor"></span>
61 61
</pre></div></div>
62
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 20 12:12:02 2009 for libwireless by&nbsp;
62
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 23 12:51:07 2009 for libwireless by&nbsp;
63 63
<a href="http://www.doxygen.org/index.html">
64 64
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
65 65
</body>
trunk/code/lib/include/libwireless/wl_basic.h
58 58
/** @brief internal default packet handler if none is specified on init **/
59 59
void wl_basic_packet_receive_handler( char type, int source, unsigned char* packet, int length );
60 60
/** @brief wrapper for wl_do() to return packet data buffer **/
61
unsigned char* wl_basic_do_default( void );
61
unsigned char* wl_basic_do_default( int *length );
62 62
/** @} **/ // end defgroup
63 63

  
64 64
#endif
trunk/code/projects/test/test_wireless.c
19 19
#include <wl_basic.h>
20 20

  
21 21
unsigned char* packet;
22
int length;
22 23

  
23 24
int testwireless(void) {
24 25
    int count = 0;
......
58 59
        wl_basic_send_global_packet(1, "b", 2);
59 60
        usb_puts("sent BLUE packet\r\n");
60 61
        while(count < 2) {
61
            packet = wl_basic_do_default();
62
            packet = wl_basic_do_default(&length);
62 63
            if (packet != 0) {
63
                if (current_packet.length > 0) {
64
                if (length > 0) {
64 65
                    if (packet[0] == 'r') {
65 66
                        orb_set_color(RED);
66 67
                        usb_puts("received RED packet\r\n");
......
77 78
    }
78 79
    else {
79 80
        while(count < 2) {
80
            packet = wl_basic_do_default();
81
            packet = wl_basic_do_default(&length);
81 82
            if (packet != 0) {
82
                if (current_packet.length > 0) {
83
                if (length > 0) {
83 84
                    if (packet[0] == 'r') {
84 85
                        orb_set_color(RED);
85 86
                        usb_puts("received RED packet\r\n");
trunk/code/projects/libwireless/lib/wl_basic.c
96 96
 *  are handled with the default packet handler.
97 97
 * To access packet information, use PacketInfo current_packet.
98 98
 *
99
 * @param length a pointer to int to store the length of the data buffer
100
 * 
99 101
 * @return pointer to the data of the packet just received, 0 if no new packet
100 102
 **/
101
unsigned char* wl_basic_do_default( void ) {
103
unsigned char* wl_basic_do_default( int *length ) {
102 104
    wl_do();
103 105
    if (current_packet.new_flag == 1) { 
104 106
        current_packet.new_flag = 0;
107
        *length = current_packet.length;
105 108
        return current_packet.data;
106 109
    }
107 110
    return 0;
trunk/code/projects/libwireless/lib/wl_basic.h
58 58
/** @brief internal default packet handler if none is specified on init **/
59 59
void wl_basic_packet_receive_handler( char type, int source, unsigned char* packet, int length );
60 60
/** @brief wrapper for wl_do() to return packet data buffer **/
61
unsigned char* wl_basic_do_default( void );
61
unsigned char* wl_basic_do_default( int *length );
62 62
/** @} **/ // end defgroup
63 63

  
64 64
#endif

Also available in: Unified diff