Project

General

Profile

Statistics
| Revision:

root / trunk / docs / libwireless / sensor__matrix_8h_source.html @ 1395

History | View | Annotate | Download (5.91 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="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&nbsp;Page</span></a></li>
12
      <li><a href="modules.html"><span>Modules</span></a></li>
13
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
14
      <li class="current"><a href="files.html"><span>Files</span></a></li>
15
    </ul>
16
  </div>
17
  <div class="tabs">
18
    <ul>
19
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
20
      <li><a href="globals.html"><span>Globals</span></a></li>
21
    </ul>
22
  </div>
23
<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 
24
<a name="l00035"></a>00035 <span class="preprocessor">#ifndef SENSOR_MATRIX_H</span>
25
<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#define SENSOR_MATRIX_H</span>
26
<a name="l00037"></a>00037 <span class="preprocessor"></span>
27
<a name="l00038"></a>00038 
28
<a name="l00049"></a>00049 <span class="preprocessor">#define MAXIMUM_XBEE_ID         0x10</span>
29
<a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor">#define READING_UNKNOWN         0xFF</span>
30
<a name="l00051"></a>00051 <span class="preprocessor"></span>
31
<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>
32
<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>
33
<a name="l00059"></a>00059 <span class="comment">// Thus, pointers should be first, followed by int, followed by char.</span>
34
<a name="l00060"></a><a class="code" href="structSensorMatrix.html">00060</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>
35
<a name="l00061"></a>00061 {
36
<a name="l00065"></a><a class="code" href="structSensorMatrix.html#888d68ace5ba04bfc741241718bc297c">00065</a>         <span class="keywordtype">int</span> numJoined;
37
<a name="l00070"></a><a class="code" href="structSensorMatrix.html#b2317919ee816e791633d4dc239f45af">00070</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> joined[MAXIMUM_XBEE_ID];
38
<a name="l00071"></a>00071 
39
<a name="l00072"></a>00072         <span class="comment">// on the bayboard, we don't include the matrix to save memory.</span>
40
<a name="l00073"></a>00073 <span class="preprocessor">#ifndef BAYBOARD</span>
41
<a name="l00074"></a>00074 <span class="preprocessor"></span>
42
<a name="l00078"></a><a class="code" href="structSensorMatrix.html#85a82252ddabc13c586cceb9b2819b62">00078</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> matrix[MAXIMUM_XBEE_ID][MAXIMUM_XBEE_ID];
43
<a name="l00079"></a>00079 <span class="preprocessor">#endif</span>
44
<a name="l00080"></a>00080 <span class="preprocessor"></span>} <a class="code" href="structSensorMatrix.html">SensorMatrix</a>;
45
<a name="l00081"></a>00081 
46
<a name="l00083"></a>00083 <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>);
47
<a name="l00085"></a>00085 <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);
48
<a name="l00087"></a>00087 <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);
49
<a name="l00089"></a>00089 <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);
50
<a name="l00091"></a>00091 <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);
51
<a name="l00093"></a>00093 <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>);
52
<a name="l00095"></a>00095 <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>);
53
<a name="l00096"></a>00096  <span class="comment">//end defgroup</span>
54
<a name="l00098"></a>00098 
55
<a name="l00099"></a>00099 
56
<a name="l00100"></a>00100 <span class="preprocessor">#endif</span>
57
<a name="l00101"></a>00101 <span class="preprocessor"></span>
58
</pre></div></div>
59
<hr size="1"><address style="text-align: right;"><small>Generated on Tue Sep 8 19:59:17 2009 for libwireless by&nbsp;
60
<a href="http://www.doxygen.org/index.html">
61
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
62
</body>
63
</html>