ardupilot/libraries/doc/html/class_a_p___var.html

373 lines
18 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: AP_Var&lt; type &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> </div>
<div class="headertitle">
<h1>AP_Var&lt; type &gt; Class Template Reference</h1> </div>
</div>
<div class="contents">
<!-- doxytag: class="AP_Var" -->
<p><code>#include &lt;<a class="el" href="_a_p___common_8h_source.html">AP_Common.h</a>&gt;</code></p>
<p>Inherited by <a class="el" href="class_a_p___e_e_prom_var.html">AP_EEPromVar&lt; type &gt;</a>.</p>
<p><a href="class_a_p___var-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___var.html#a76488dc07d01ace3bf34ec4e00c3a061">AP_Var</a> (const type &amp;data, const char *name=&quot;&quot;, const bool &amp;sync=false)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___var.html#ac6d45de415b68d734876f3e4dd1e19f4">set</a> (const type &amp;val)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const type &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___var.html#a22c498cc35d5d69d1e4840bd4d9bacab">get</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___var.html#a7020d3d4f67e959ebf73268c3da5002a">setAsFloat</a> (const float &amp;val)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const float &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___var.html#a1677d6dcfb4ea5d6780633b60c94419d">getAsFloat</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___var.html#afa88a5ff01e70d17529c683016d62456">save</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___var.html#aa885a4c96d6e7b099bde8bde5669e407">load</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___var.html#aedd42dd2270968c5f834d851d7eee0dd">getName</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const bool &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___var.html#aa59a0e6a2da3cdbbf97cde09bb437af4">getSync</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___var.html#a76c043beeb6b2d7e82155657f4ac99e1">setSync</a> (bool sync)</td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">type&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___var.html#a03988b519ae71a3d59a74dede0b015f3">_data</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___var.html#a0df623830e9c63d95c840f9b8c1d65d6">_name</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___var.html#a45e789309835299b71050fda446b019a">_sync</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;class type&gt;<br/>
class AP_Var&lt; type &gt;</h3>
<p>The parameter template class. This class implements get/set/save/load etc for the abstract template type. </p>
<p>Definition at line <a class="el" href="_a_p___common_8h_source.html#l00092">92</a> of file <a class="el" href="_a_p___common_8h_source.html">AP_Common.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a76488dc07d01ace3bf34ec4e00c3a061"></a><!-- doxytag: member="AP_Var::AP_Var" ref="a76488dc07d01ace3bf34ec4e00c3a061" args="(const type &amp;data, const char *name=&quot;&quot;, const bool &amp;sync=false)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class type &gt; </div>
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_a_p___var.html">AP_Var</a>&lt; type &gt;::<a class="el" href="class_a_p___var.html">AP_Var</a> </td>
<td>(</td>
<td class="paramtype">const type &amp;&nbsp;</td>
<td class="paramname"> <em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>name</em> = <code>&quot;&quot;</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool &amp;&nbsp;</td>
<td class="paramname"> <em>sync</em> = <code>false</code></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The default constrcutor </p>
<p>Definition at line <a class="el" href="_a_p___common_8h_source.html#l00098">98</a> of file <a class="el" href="_a_p___common_8h_source.html">AP_Common.h</a>.</p>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a22c498cc35d5d69d1e4840bd4d9bacab"></a><!-- doxytag: member="AP_Var::get" ref="a22c498cc35d5d69d1e4840bd4d9bacab" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class type &gt; </div>
<table class="memname">
<tr>
<td class="memname">const type&amp; <a class="el" href="class_a_p___var.html">AP_Var</a>&lt; type &gt;::get </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the variable value. </p>
<p>Definition at line <a class="el" href="_a_p___common_8h_source.html#l00114">114</a> of file <a class="el" href="_a_p___common_8h_source.html">AP_Common.h</a>.</p>
</div>
</div>
<a class="anchor" id="a1677d6dcfb4ea5d6780633b60c94419d"></a><!-- doxytag: member="AP_Var::getAsFloat" ref="a1677d6dcfb4ea5d6780633b60c94419d" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class type &gt; </div>
<table class="memname">
<tr>
<td class="memname">const float&amp; <a class="el" href="class_a_p___var.html">AP_Var</a>&lt; type &gt;::getAsFloat </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the variable as a float </p>
<p>Definition at line <a class="el" href="_a_p___common_8h_source.html#l00129">129</a> of file <a class="el" href="_a_p___common_8h_source.html">AP_Common.h</a>.</p>
</div>
</div>
<a class="anchor" id="aedd42dd2270968c5f834d851d7eee0dd"></a><!-- doxytag: member="AP_Var::getName" ref="aedd42dd2270968c5f834d851d7eee0dd" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class type &gt; </div>
<table class="memname">
<tr>
<td class="memname">const char* <a class="el" href="class_a_p___var.html">AP_Var</a>&lt; type &gt;::getName </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the name. This is useful for ground stations. </p>
<p>Definition at line <a class="el" href="_a_p___common_8h_source.html#l00151">151</a> of file <a class="el" href="_a_p___common_8h_source.html">AP_Common.h</a>.</p>
</div>
</div>
<a class="anchor" id="aa59a0e6a2da3cdbbf97cde09bb437af4"></a><!-- doxytag: member="AP_Var::getSync" ref="aa59a0e6a2da3cdbbf97cde09bb437af4" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class type &gt; </div>
<table class="memname">
<tr>
<td class="memname">const bool&amp; <a class="el" href="class_a_p___var.html">AP_Var</a>&lt; type &gt;::getSync </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>If sync is true the a load will always occure before a get and a save will always occure before a set. </p>
<p>Definition at line <a class="el" href="_a_p___common_8h_source.html#l00157">157</a> of file <a class="el" href="_a_p___common_8h_source.html">AP_Common.h</a>.</p>
</div>
</div>
<a class="anchor" id="aa885a4c96d6e7b099bde8bde5669e407"></a><!-- doxytag: member="AP_Var::load" ref="aa885a4c96d6e7b099bde8bde5669e407" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class type &gt; </div>
<table class="memname">
<tr>
<td class="memname">virtual void <a class="el" href="class_a_p___var.html">AP_Var</a>&lt; type &gt;::load </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Load a variable from eeprom </p>
<p>Definition at line <a class="el" href="_a_p___common_8h_source.html#l00144">144</a> of file <a class="el" href="_a_p___common_8h_source.html">AP_Common.h</a>.</p>
</div>
</div>
<a class="anchor" id="afa88a5ff01e70d17529c683016d62456"></a><!-- doxytag: member="AP_Var::save" ref="afa88a5ff01e70d17529c683016d62456" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class type &gt; </div>
<table class="memname">
<tr>
<td class="memname">virtual void <a class="el" href="class_a_p___var.html">AP_Var</a>&lt; type &gt;::save </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Save a variable to eeprom </p>
<p>Definition at line <a class="el" href="_a_p___common_8h_source.html#l00137">137</a> of file <a class="el" href="_a_p___common_8h_source.html">AP_Common.h</a>.</p>
</div>
</div>
<a class="anchor" id="ac6d45de415b68d734876f3e4dd1e19f4"></a><!-- doxytag: member="AP_Var::set" ref="ac6d45de415b68d734876f3e4dd1e19f4" args="(const type &amp;val)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class type &gt; </div>
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="class_a_p___var.html">AP_Var</a>&lt; type &gt;::set </td>
<td>(</td>
<td class="paramtype">const type &amp;&nbsp;</td>
<td class="paramname"> <em>val</em></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set the variable value </p>
<p>Definition at line <a class="el" href="_a_p___common_8h_source.html#l00106">106</a> of file <a class="el" href="_a_p___common_8h_source.html">AP_Common.h</a>.</p>
</div>
</div>
<a class="anchor" id="a7020d3d4f67e959ebf73268c3da5002a"></a><!-- doxytag: member="AP_Var::setAsFloat" ref="a7020d3d4f67e959ebf73268c3da5002a" args="(const float &amp;val)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class type &gt; </div>
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="class_a_p___var.html">AP_Var</a>&lt; type &gt;::setAsFloat </td>
<td>(</td>
<td class="paramtype">const float &amp;&nbsp;</td>
<td class="paramname"> <em>val</em></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set the variable value as a float </p>
<p>Definition at line <a class="el" href="_a_p___common_8h_source.html#l00122">122</a> of file <a class="el" href="_a_p___common_8h_source.html">AP_Common.h</a>.</p>
</div>
</div>
<a class="anchor" id="a76c043beeb6b2d7e82155657f4ac99e1"></a><!-- doxytag: member="AP_Var::setSync" ref="a76c043beeb6b2d7e82155657f4ac99e1" args="(bool sync)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class type &gt; </div>
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="class_a_p___var.html">AP_Var</a>&lt; type &gt;::setSync </td>
<td>(</td>
<td class="paramtype">bool&nbsp;</td>
<td class="paramname"> <em>sync</em></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___common_8h_source.html#l00158">158</a> of file <a class="el" href="_a_p___common_8h_source.html">AP_Common.h</a>.</p>
</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a03988b519ae71a3d59a74dede0b015f3"></a><!-- doxytag: member="AP_Var::_data" ref="a03988b519ae71a3d59a74dede0b015f3" args="" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class type &gt; </div>
<table class="memname">
<tr>
<td class="memname">type <a class="el" href="class_a_p___var.html">AP_Var</a>&lt; type &gt;::<a class="el" href="class_a_p___var.html#a03988b519ae71a3d59a74dede0b015f3">_data</a><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___common_8h_source.html#l00161">161</a> of file <a class="el" href="_a_p___common_8h_source.html">AP_Common.h</a>.</p>
</div>
</div>
<a class="anchor" id="a0df623830e9c63d95c840f9b8c1d65d6"></a><!-- doxytag: member="AP_Var::_name" ref="a0df623830e9c63d95c840f9b8c1d65d6" args="" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class type &gt; </div>
<table class="memname">
<tr>
<td class="memname">const char* <a class="el" href="class_a_p___var.html">AP_Var</a>&lt; type &gt;::<a class="el" href="class_a_p___var.html#a0df623830e9c63d95c840f9b8c1d65d6">_name</a><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The data that is stored on the heap </p>
<p>Definition at line <a class="el" href="_a_p___common_8h_source.html#l00162">162</a> of file <a class="el" href="_a_p___common_8h_source.html">AP_Common.h</a>.</p>
</div>
</div>
<a class="anchor" id="a45e789309835299b71050fda446b019a"></a><!-- doxytag: member="AP_Var::_sync" ref="a45e789309835299b71050fda446b019a" args="" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class type &gt; </div>
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="class_a_p___var.html">AP_Var</a>&lt; type &gt;::<a class="el" href="class_a_p___var.html#a45e789309835299b71050fda446b019a">_sync</a><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The variable name, useful for gcs and terminal output </p>
<p>Definition at line <a class="el" href="_a_p___common_8h_source.html#l00163">163</a> of file <a class="el" href="_a_p___common_8h_source.html">AP_Common.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/home/jgoppert/Projects/ap/libraries/AP_Common/<a class="el" href="_a_p___common_8h_source.html">AP_Common.h</a></li>
</ul>
</div>
<hr class="footer"/><address class="footer"><small>
Generated for ArduPilot Libraries by&nbsp;<a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.png" alt="doxygen"/></a></small></address>
</body>
</html>