root / trunk / docs / libwireless / sensor__matrix_8h-source.html @ 737
History | View | Annotate | Download (5.29 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: sensor_matrix.h Source File</title> |
4 |
<link href="doxygen.css" rel="stylesheet" type="text/css"> |
5 |
<link href="tabs.css" rel="stylesheet" type="text/css"> |
6 |
</head><body> |
7 |
<!-- Generated by Doxygen 1.5.3 -->
|
8 |
<div class="tabs"> |
9 |
<ul>
|
10 |
<li><a href="index.html"><span>Main Page</span></a></li> |
11 |
<li><a href="modules.html"><span>Modules</span></a></li> |
12 |
<li><a href="annotated.html"><span>Data Structures</span></a></li> |
13 |
<li class="current"><a href="files.html"><span>Files</span></a></li> |
14 |
</ul>
|
15 |
</div>
|
16 |
<h1>sensor_matrix.h</h1><a href="sensor__matrix_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 |
17 |
<a name="l00035"></a>00035 <span class="preprocessor">#ifndef SENSOR_MATRIX_H</span> |
18 |
<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#define SENSOR_MATRIX_H</span> |
19 |
<a name="l00037"></a>00037 <span class="preprocessor"></span> |
20 |
<a name="l00038"></a>00038 |
21 |
<a name="l00049"></a>00049 <span class="preprocessor">#define MAXIMUM_XBEE_ID 0x10</span> |
22 |
<a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor">#define READING_UNKNOWN 0xFF</span> |
23 |
<a name="l00051"></a>00051 <span class="preprocessor"></span> |
24 |
<a name="l00057"></a>00057 <span class="comment">//TODO: the order of member variables in this struct should be changed in case the compile packs the struct</span> |
25 |
<a name="l00058"></a>00058 <span class="comment">// In order to achieve the best packing, the variables should be listed in order of decreasing memory size.</span> |
26 |
<a name="l00059"></a>00059 <span class="comment">// Thus, pointers should be first, followed by int, followed by char.</span> |
27 |
<a name="l00060"></a><a class="code" href="structSensorMatrix.html">00060</a> <span class="keyword">typedef</span> <span class="keyword">struct</span> |
28 |
<a name="l00061"></a>00061 { |
29 |
<a name="l00065"></a><a class="code" href="structSensorMatrix.html#888d68ace5ba04bfc741241718bc297c">00065</a> <span class="keywordtype">int</span> numJoined; |
30 |
<a name="l00070"></a><a class="code" href="structSensorMatrix.html#85a82252ddabc13c586cceb9b2819b62">00070</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> matrix[MAXIMUM_XBEE_ID][MAXIMUM_XBEE_ID]; |
31 |
<a name="l00075"></a><a class="code" href="structSensorMatrix.html#b2317919ee816e791633d4dc239f45af">00075</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> joined[MAXIMUM_XBEE_ID]; |
32 |
<a name="l00076"></a>00076 } <a class="code" href="structSensorMatrix.html">SensorMatrix</a>; |
33 |
<a name="l00077"></a>00077 |
34 |
<a name="l00079"></a>00079 <span class="keywordtype">void</span> <a class="code" href="group__sensormatrix.html#g09523e52546e7929288795e1e5f0f9a8" title="Create a sensor matrix.">sensor_matrix_create</a>(<span class="keywordtype">void</span>); |
35 |
<a name="l00081"></a>00081 <span class="keywordtype">void</span> <a class="code" href="group__sensormatrix.html#gf251d97aeb23af9156c0527692819da7" title="Set a reading in a sensor matrix.">sensor_matrix_set_reading</a>(<span class="keywordtype">int</span> observer, <span class="keywordtype">int</span> robot, <span class="keywordtype">int</span> reading); |
36 |
<a name="l00083"></a>00083 <span class="keywordtype">int</span> <a class="code" href="group__sensormatrix.html#g031d5a4d15603e57379aad22da36e300" title="Get a reading in a sensor matrix.">sensor_matrix_get_reading</a>(<span class="keywordtype">int</span> observer, <span class="keywordtype">int</span> robot); |
37 |
<a name="l00085"></a>00085 <span class="keywordtype">void</span> <a class="code" href="group__sensormatrix.html#gea879c1d5f8a8a079066d8df005f3549" title="Set whether the robot is in the token ring.">sensor_matrix_set_in_ring</a>(<span class="keywordtype">int</span> robot, <span class="keywordtype">int</span> in); |
38 |
<a name="l00087"></a>00087 <span class="keywordtype">int</span> <a class="code" href="group__sensormatrix.html#gc668dfe28e56b5a314789d395eda3b27" title="Get whether the robot is in the sensor ring.">sensor_matrix_get_in_ring</a>(<span class="keywordtype">int</span> robot); |
39 |
<a name="l00089"></a>00089 <span class="keywordtype">int</span> <a class="code" href="group__sensormatrix.html#g3545800eec0adba2fc63604206b8fb24" title="Get the number of robots which have joined the token ring.">sensor_matrix_get_joined</a>(<span class="keywordtype">void</span>); |
40 |
<a name="l00091"></a>00091 <span class="keywordtype">int</span> <a class="code" href="group__sensormatrix.html#ga22a0851d1886ca29fc32e0692502f2d" title="Get the maximum size of the sensor matrix.">sensor_matrix_get_size</a>(<span class="keywordtype">void</span>); |
41 |
<a name="l00092"></a>00092 <span class="comment">//end defgroup</span> |
42 |
<a name="l00094"></a>00094 |
43 |
<a name="l00095"></a>00095 |
44 |
<a name="l00096"></a>00096 <span class="preprocessor">#endif</span> |
45 |
<a name="l00097"></a>00097 <span class="preprocessor"></span> |
46 |
</pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 28 17:49:53 2008 for libwireless by |
47 |
<a href="http://www.doxygen.org/index.html"> |
48 |
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> |
49 |
</body>
|
50 |
</html>
|