mirror of https://github.com/ArduPilot/ardupilot
373 lines
18 KiB
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< type > 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 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 List</span></a></li>
|
|
<li><a href="classes.html"><span>Class Index</span></a></li>
|
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
|
<li><a href="functions.html"><span>Class Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="#pro-attribs">Protected Attributes</a> </div>
|
|
<div class="headertitle">
|
|
<h1>AP_Var< type > Class Template Reference</h1> </div>
|
|
</div>
|
|
<div class="contents">
|
|
<!-- doxytag: class="AP_Var" -->
|
|
<p><code>#include <<a class="el" href="_a_p___common_8h_source.html">AP_Common.h</a>></code></p>
|
|
|
|
<p>Inherited by <a class="el" href="class_a_p___e_e_prom_var.html">AP_EEPromVar< type ></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"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___var.html#a76488dc07d01ace3bf34ec4e00c3a061">AP_Var</a> (const type &data, const char *name="", const bool &sync=false)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___var.html#ac6d45de415b68d734876f3e4dd1e19f4">set</a> (const type &val)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">const type & </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 </td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___var.html#a7020d3d4f67e959ebf73268c3da5002a">setAsFloat</a> (const float &val)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">const float & </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 </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 </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 * </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 & </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 </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 </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 * </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 </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<class type><br/>
|
|
class AP_Var< type ></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 & Destructor Documentation</h2>
|
|
<a class="anchor" id="a76488dc07d01ace3bf34ec4e00c3a061"></a><!-- doxytag: member="AP_Var::AP_Var" ref="a76488dc07d01ace3bf34ec4e00c3a061" args="(const type &data, const char *name="", const bool &sync=false)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<class type > </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="class_a_p___var.html">AP_Var</a>< type >::<a class="el" href="class_a_p___var.html">AP_Var</a> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const type & </td>
|
|
<td class="paramname"> <em>data</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"> <em>name</em> = <code>""</code>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const bool & </td>
|
|
<td class="paramname"> <em>sync</em> = <code>false</code></td><td> </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<class type > </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const type& <a class="el" href="class_a_p___var.html">AP_Var</a>< type >::get </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </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<class type > </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const float& <a class="el" href="class_a_p___var.html">AP_Var</a>< type >::getAsFloat </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </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<class type > </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const char* <a class="el" href="class_a_p___var.html">AP_Var</a>< type >::getName </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </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<class type > </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const bool& <a class="el" href="class_a_p___var.html">AP_Var</a>< type >::getSync </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </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<class type > </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual void <a class="el" href="class_a_p___var.html">AP_Var</a>< type >::load </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </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<class type > </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual void <a class="el" href="class_a_p___var.html">AP_Var</a>< type >::save </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </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 &val)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<class type > </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void <a class="el" href="class_a_p___var.html">AP_Var</a>< type >::set </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const type & </td>
|
|
<td class="paramname"> <em>val</em></td>
|
|
<td> ) </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 &val)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<class type > </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void <a class="el" href="class_a_p___var.html">AP_Var</a>< type >::setAsFloat </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const float & </td>
|
|
<td class="paramname"> <em>val</em></td>
|
|
<td> ) </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<class type > </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void <a class="el" href="class_a_p___var.html">AP_Var</a>< type >::setSync </td>
|
|
<td>(</td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"> <em>sync</em></td>
|
|
<td> ) </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<class type > </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">type <a class="el" href="class_a_p___var.html">AP_Var</a>< type >::<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<class type > </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const char* <a class="el" href="class_a_p___var.html">AP_Var</a>< type >::<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<class type > </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool <a class="el" href="class_a_p___var.html">AP_Var</a>< type >::<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 <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.png" alt="doxygen"/></a></small></address>
|
|
</body>
|
|
</html>
|