classtrajectory.html

来自「美国COPLEY驱动器,程序开发工具之一.」· HTML 代码 · 共 210 行

HTML
210
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>Copley Motion Library: Trajectory Class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.4 --><div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div><h1>Trajectory Class Reference</h1><!-- doxytag: class="Trajectory" --><p>Inheritance diagram for Trajectory:<p><center><img src="classTrajectory.png" usemap="#Trajectory_map" border="0" alt=""></center><map name="Trajectory_map"><area href="classTrjScurve.html" alt="TrjScurve" shape="rect" coords="0,56,70,80"></map><a href="classTrajectory-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>Trajectory information class. <p>One of the control modes supported by the Copley Controls amplifiers is called interpolated position mode. This allows complex trajectories to be generated by the CANopen master controller, and streamed to one or more amplifiers in real time. Each point on the trajectory contains three pieces of information; Position, Velocity, and Time until the next point. For this reason, these trajectories are also often called PVT profiles.<p>The <a class="el" href="classAmp.html">Amp</a> object contains support for streaming a PVT trajectory down to the amplifier automatically (see <a class="el" href="classAmp.html#z13_0">Amp::SendTrajectory</a>). This virtual class provides the interface through which the trajectory data is retrieved by the <a class="el" href="classAmp.html">Amp</a> object.<p>Note that this pure virtual class provides no actual implementation code. The calculation of the trajectory points is the responsibility of the inheriting class.<p><p>Definition at line <a class="el" href="CML__Trajectory_8h-source.html#l00045">45</a> of file <a class="el" href="CML__Trajectory_8h-source.html">CML_Trajectory.h</a>.<table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="classError.html">Error</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTrajectory.html#a0">StartNew</a> (void)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Start a new trajectory.  <a href="#a0"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTrajectory.html#a1">Finish</a> (void)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Trajectory finished.  <a href="#a1"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTrajectory.html#a2">UseVelocityInfo</a> (void)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function indicates whether the velocity information returned by NextSegment should be used.  <a href="#a2"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="classError.html">Error</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTrajectory.html#a3">NextSegment</a> (<a class="el" href="CML__Utils_8h.html#a11">uunit</a> &amp;pos, <a class="el" href="CML__Utils_8h.html#a11">uunit</a> &amp;vel, <a class="el" href="CML__Utils_8h.html#a6">uint8</a> &amp;time)=0</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the next segment of position, velocity &amp; time info.  <a href="#a3"></a><br></td></tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="a1"></a><!-- doxytag: member="Trajectory::Finish" ref="a1" args="(void)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">virtual void Finish           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">void&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap><code> [inline, virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Trajectory finished. <p>This function is called by the <a class="el" href="classAmp.html">Amp</a> object when it is finished with the trajectory object and no longer holding a reference to it. Typically, this will happen after the <a class="el" href="classTrajectory.html#a3">Trajectory::NextSegment</a> function has returned a zero time value, although it can also occure when some external event causes the <a class="el" href="classAmp.html">Amp</a> object to abort a running trajectory. <p>Reimplemented in <a class="el" href="classTrjScurve.html#a6">TrjScurve</a>.<p>Definition at line <a class="el" href="CML__Trajectory_8h-source.html#l00061">61</a> of file <a class="el" href="CML__Trajectory_8h-source.html">CML_Trajectory.h</a>.    </td>  </tr></table><a class="anchor" name="a3"></a><!-- doxytag: member="Trajectory::NextSegment" ref="a3" args="(uunit &amp;pos, uunit &amp;vel, uint8 &amp;time)=0" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">virtual const <a class="el" href="classError.html">Error</a>* NextSegment           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="CML__Utils_8h.html#a11">uunit</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>pos</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="CML__Utils_8h.html#a11">uunit</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>vel</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="CML__Utils_8h.html#a6">uint8</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>time</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [pure virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Get the next segment of position, velocity &amp; time info. <p>Note that this function will be called from the high priority CANopen receiver task. Therefore, no lengthy processing should be done here.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>pos</em>&nbsp;</td><td>The new position value is returned here. This parameter is specified in "user units". See <a class="el" href="classAmp.html#z15_0">Amp::SetCountsPerUnit</a> for details.</td></tr>    <tr><td valign="top"></td><td valign="top"><em>vel</em>&nbsp;</td><td>The new velocity value is returned here. This parameter is specified in "user units". See <a class="el" href="classAmp.html#z15_0">Amp::SetCountsPerUnit</a> for details. Note that the velocity data will be ignored if the function <a class="el" href="classTrajectory.html#a2">UseVelocityInfo()</a> returns false. In this case the amplifier will use linear interpolation between points.</td></tr>    <tr><td valign="top"></td><td valign="top"><em>time</em>&nbsp;</td><td>The segment time is returned here. This is in milliseconds and ranges from 1 to 255. If zero is returned, this is the last frame in the profile.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>An error object. If this is not <a class="el" href="classError.html#s0">Error::OK</a>, then the segment data is assumed to be invalid. </dd></dl><p>Implemented in <a class="el" href="classTrjScurve.html#a7">TrjScurve</a>.    </td>  </tr></table><a class="anchor" name="a0"></a><!-- doxytag: member="Trajectory::StartNew" ref="a0" args="(void)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">virtual const <a class="el" href="classError.html">Error</a>* StartNew           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">void&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap><code> [inline, virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Start a new trajectory. <p>This function is called by <a class="el" href="classAmp.html#z13_0">Amp::SendTrajectory</a> before the first call to <a class="el" href="classTrajectory.html#a3">Trajectory::NextSegment</a>. It gives the trajectory object a chance to return an error indicating that it isn't ready to be sent. <dl compact><dt><b>Returns:</b></dt><dd>An error pointer if the trajectory object is not available, or NULL if it is ready to be sent. </dd></dl><p>Reimplemented in <a class="el" href="classTrjScurve.html#a5">TrjScurve</a>.<p>Definition at line <a class="el" href="CML__Trajectory_8h-source.html#l00054">54</a> of file <a class="el" href="CML__Trajectory_8h-source.html">CML_Trajectory.h</a>.    </td>  </tr></table><a class="anchor" name="a2"></a><!-- doxytag: member="Trajectory::UseVelocityInfo" ref="a2" args="(void)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">virtual bool UseVelocityInfo           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">void&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap><code> [inline, virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>This function indicates whether the velocity information returned by NextSegment should be used. <p>If this returns true, then the amplifier will operate in PVT mode and use cubic polynomial interpolation between trajectory segments. If this returns false, then the velocity returned by NextSegment will be ignored, and the amplifier will run in PT mode using linear interpolation between sets of points.<p><dl compact><dt><b>Returns:</b></dt><dd>true if velocity information should be used (default), or false if velocities should be ignored. </dd></dl><p>Definition at line <a class="el" href="CML__Trajectory_8h-source.html#l00072">72</a> of file <a class="el" href="CML__Trajectory_8h-source.html">CML_Trajectory.h</a>.    </td>  </tr></table><hr>The documentation for this class was generated from the following file:<ul><li><a class="el" href="CML__Trajectory_8h-source.html">CML_Trajectory.h</a></ul><hr><address style="align: right;"><small>Copley Motion Library, Copyright (c) 2002-2003<a href="http://www.copleycontrols.com"><img src="CCC_logo.gif" alt="Copley Controls Corp." align="middle" border=0 ></a></small></address></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?