⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classerror.html

📁 美国COPLEY驱动器,程序开发工具之一.
💻 HTML
字号:
<!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: Error 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>Error Class Reference</h1><!-- doxytag: class="Error" --><p>Inheritance diagram for Error:<p><center><img src="classError.png" usemap="#Error_map" border="0" alt=""></center><map name="Error_map"><area href="classAmpFileError.html" alt="AmpFileError" shape="rect" coords="105,56,200,80"><area href="classCanError.html" alt="CanError" shape="rect" coords="105,112,200,136"><area href="classEventError.html" alt="EventError" shape="rect" coords="105,168,200,192"><area href="classFirmwareError.html" alt="FirmwareError" shape="rect" coords="105,224,200,248"><area href="classLinkError.html" alt="LinkError" shape="rect" coords="105,280,200,304"><area href="classPathError.html" alt="PathError" shape="rect" coords="105,336,200,360"><area href="classScurveError.html" alt="ScurveError" shape="rect" coords="105,392,200,416"><area href="classThreadError.html" alt="ThreadError" shape="rect" coords="105,448,200,472"></map><a href="classError-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>This class is the root class for all error codes returned by functions defined within the Motion Library. <p>Every error condition defined in the library has a constant, static error object associated with it. Pointers to these objects are returned from the various function calls.<p>All library functions that return an error object pointer will return a NULL pointer in the case of no error. This allows one to simply test the error pointer returned to determine if it indicates an error.<p>For example:<p><pre>	const Error *err = SomeFunctionCall();</pre><p><pre>	if( err )		printf( "Error: %%s\\n", err-&gt;<a class="el" href="classError.html#a0">toString()</a> );	else		printf( "no error\\n" );</pre><p><pre></pre><p>To test for a specific error condition, the following code can be used:<p><pre>	const Error *err = SomeFunctionCall();</pre><p><pre>	if( err == &amp;<a class="el" href="classThreadError.html#s2">ThreadError::Timeout</a> )		printf( "A timeout occurred\\n" );</pre><p>Note that the constructor used to create a new unique error code is protected, therefore only sub-classes of the Error object are allowed to create new unique error codes.<p><p>Definition at line <a class="el" href="CML__Error_8h-source.html#l00066">66</a> of file <a class="el" href="CML__Error_8h-source.html">CML_Error.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">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classError.html#a0">toString</a> () const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a C style string describing the error condition represented by this error object.  <a href="#a0"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="CML__Utils_8h.html#a8">uint16</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classError.html#a1">GetID</a> (void) const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return an integer ID that can be used to identify the error.  <a href="#a1"></a><br></td></tr><tr><td colspan="2"><br><h2>Static Public Attributes</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="s0"></a><!-- doxytag: member="Error::OK" ref="s0" args="" -->static const <a class="el" href="classError.html">Error</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classError.html#s0">OK</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A constant error object that represents no error. <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="s1"></a><!-- doxytag: member="Error::Unknown" ref="s1" args="" -->static const <a class="el" href="classError.html">Error</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classError.html#s1">Unknown</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An invalid error ID code was passed to Error::Lookup. <br></td></tr><tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classError.html#b0">Error</a> (<a class="el" href="CML__Utils_8h.html#a8">uint16</a> i, const char *desc)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor used to create an error object of a particular type.  <a href="#b0"></a><br></td></tr></table><hr><h2>Constructor &amp; Destructor Documentation</h2><a class="anchor" name="b0"></a><!-- doxytag: member="Error::Error" ref="b0" args="(uint16 i, const char *desc)" --><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"><a class="el" href="classError.html">Error</a>           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="CML__Utils_8h.html#a8">uint16</a>&nbsp;</td>          <td class="mdname" nowrap> <em>i</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const char *&nbsp;</td>          <td class="mdname" nowrap> <em>desc</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [inline, protected]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Constructor used to create an error object of a particular type. <p>This constructor is protected, so only sub-classes of the Error class can construct objects in this manner.<p>A unique ID coded and a description string must be provided with the new object.<p>Definition at line <a class="el" href="CML__Error_8h-source.html#l00121">121</a> of file <a class="el" href="CML__Error_8h-source.html">CML_Error.h</a>.    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="a1"></a><!-- doxytag: member="Error::GetID" ref="a1" args="(void) const " --><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"><a class="el" href="CML__Utils_8h.html#a8">uint16</a> GetID           </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> const<code> [inline]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Return an integer ID that can be used to identify the error. <p>Each error code in the system has a unique 16-bit integer identifier associated with it. This function can be used to return this identifier.<p>These ID codes are primarily intended for internal use by the Error object, they are only provided externally for use in system which require an integer error ID code to interface with other parts of the system. The function Error::Lookup can be used to convert the ID value back into an error object.<p><dl compact><dt><b>Returns:</b></dt><dd>The 16-bit integer ID value associated with this Error object.</dd></dl><p>Definition at line <a class="el" href="CML__Error_8h-source.html#l00106">106</a> of file <a class="el" href="CML__Error_8h-source.html">CML_Error.h</a>.    </td>  </tr></table><a class="anchor" name="a0"></a><!-- doxytag: member="Error::toString" ref="a0" args="() const " --><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">const char* toString           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap> const<code> [inline]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Return a C style string describing the error condition represented by this error object. <p><dl compact><dt><b>Returns:</b></dt><dd>A constant character string describing the error condition.</dd></dl><p>Definition at line <a class="el" href="CML__Error_8h-source.html#l00082">82</a> of file <a class="el" href="CML__Error_8h-source.html">CML_Error.h</a>.    </td>  </tr></table><hr>The documentation for this class was generated from the following file:<ul><li><a class="el" href="CML__Error_8h-source.html">CML_Error.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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -