📄 classcopleymotionlibrary.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: CopleyMotionLibrary 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 Page</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a></div><h1>CopleyMotionLibrary Class Reference</h1><!-- doxytag: class="CopleyMotionLibrary" --><a href="classCopleyMotionLibrary-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>Copley Motion Libraries utility object. <p>This object defines a number of handy methods related to the libraries as a whole.<p>A single global CML object is created by the libraries automatically.<p><p>Definition at line <a class="el" href="CML_8h-source.html#l00089">89</a> of file <a class="el" href="CML_8h-source.html">CML.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"><a class="anchor" name="a0"></a><!-- doxytag: member="CopleyMotionLibrary::CopleyMotionLibrary" ref="a0" args="()" --> </td><td class="memItemRight" valign="bottom"><a class="el" href="classCopleyMotionLibrary.html#a0">CopleyMotionLibrary</a> ()</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor for the CopleyMotionLibrary object. <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classCopleyMotionLibrary.html#a1">~CopleyMotionLibrary</a> ()</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor for CopleyMotionLibrary object. <a href="#a1"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2"></a><!-- doxytag: member="CopleyMotionLibrary::GetVersionString" ref="a2" args="()" -->const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classCopleyMotionLibrary.html#a2">GetVersionString</a> ()</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Get the CML library version string. <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCopleyMotionLibrary.html#a3">SetDebugLevel</a> (<a class="el" href="CML_8h.html#a8">CML_LOG_LEVEL</a> level)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Set the debug message level. <a href="#a3"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCopleyMotionLibrary.html#a4">SetFlushLog</a> (bool flush)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Enable/Disable the flushing of the log file after each write. <a href="#a4"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCopleyMotionLibrary.html#a5">SetMaxLogSize</a> (<a class="el" href="CML__Utils_8h.html#a9">int32</a> max)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Set the max CML log file size. <a href="#a5"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCopleyMotionLibrary.html#a6">FlushLog</a> (void)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Flush the log file (if one is open). <a href="#a6"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCopleyMotionLibrary.html#a7">SetLogFile</a> (const char *fname)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Set the debug message log file name. <a href="#a7"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCopleyMotionLibrary.html#a8">Debug</a> (const char *fmt,...)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Write a debug message to the log file. <a href="#a8"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCopleyMotionLibrary.html#a9">Warn</a> (const char *fmt,...)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Write a warning message to the log file. <a href="#a9"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCopleyMotionLibrary.html#a10">Error</a> (const char *fmt,...)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Write an error message to the log file. <a href="#a10"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCopleyMotionLibrary.html#a11">LogCAN</a> (bool recv, struct <a class="el" href="structCanFrame.html">CanFrame</a> &frame)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Write the CAN frame to the log file. <a href="#a11"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="CML_8h.html#a8">CML_LOG_LEVEL</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classCopleyMotionLibrary.html#a12">GetDebugLevel</a> (void)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Return the debug level. <a href="#a12"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classCopleyMotionLibrary.html#a13">GetFlushLog</a> (void)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Get the state of the log flushing setting. <a href="#a13"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="CML__Utils_8h.html#a9">int32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classCopleyMotionLibrary.html#a14">GetMaxLogSize</a> (void)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Return the max log size. <a href="#a14"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classCopleyMotionLibrary.html#a15">GetLogFile</a> (void)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Return the name of the log file. <a href="#a15"></a><br></td></tr></table><hr><h2>Constructor & Destructor Documentation</h2><a class="anchor" name="a1"></a><!-- doxytag: member="CopleyMotionLibrary::~CopleyMotionLibrary" ref="a1" args="()" --><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="classCopleyMotionLibrary.html">CopleyMotionLibrary</a> </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Destructor for CopleyMotionLibrary object. <p>This simply closes the log file if one is open.<p>Definition at line <a class="el" href="CML_8cpp-source.html#l00057">57</a> of file <a class="el" href="CML_8cpp-source.html">CML.cpp</a>. </td> </tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="a8"></a><!-- doxytag: member="CopleyMotionLibrary::Debug" ref="a8" args="(const char *fmt,...)" --><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">void Debug </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const char * </td> <td class="mdname" nowrap> <em>fmt</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap> </td> <td class="mdname" nowrap> <em>...</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Write a debug message to the log file. <p>The debug level must be set >= LOG_DEBUG for this message to be written.<p>Note that message logging is only available if file support is enabled in the <a class="el" href="CML__Settings_8h.html">CML_Settings.h</a> file.<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>fmt</em> </td><td>A printf style format string</td></tr> </table></dl><p>Definition at line <a class="el" href="CML_8cpp-source.html#l00301">301</a> of file <a class="el" href="CML_8cpp-source.html">CML.cpp</a>. </td> </tr></table><a class="anchor" name="a10"></a><!-- doxytag: member="CopleyMotionLibrary::Error" ref="a10" args="(const char *fmt,...)" --><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">void <a class="el" href="classError.html">Error</a> </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const char * </td> <td class="mdname" nowrap> <em>fmt</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap> </td> <td class="mdname" nowrap> <em>...</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Write an error message to the log file. <p>The debug level must be set >= LOG_ERRORS for this message to be written.<p>Note that message logging is only available if file support is enabled in the <a class="el" href="CML__Settings_8h.html">CML_Settings.h</a> file.<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>fmt</em> </td><td>A printf style format string</td></tr> </table></dl><p>Definition at line <a class="el" href="CML_8cpp-source.html#l00371">371</a> of file <a class="el" href="CML_8cpp-source.html">CML.cpp</a>. </td> </tr></table><a class="anchor" name="a6"></a><!-- doxytag: member="CopleyMotionLibrary::FlushLog" ref="a6" 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">void FlushLog </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Flush the log file (if one is open). <p>This forces the log contents to be written to disk, thus preventing it from being lost if the program exits without calling the CML object destructor.<p>Definition at line <a class="el" href="CML_8cpp-source.html#l00146">146</a> of file <a class="el" href="CML_8cpp-source.html">CML.cpp</a>. </td> </tr></table><a class="anchor" name="a12"></a><!-- doxytag: member="CopleyMotionLibrary::GetDebugLevel" ref="a12" 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"><a class="el" href="CML_8h.html#a8">CML_LOG_LEVEL</a> GetDebugLevel </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Return the debug level. <p><dl compact><dt><b>Returns:</b></dt><dd>The debug level presently set </dd></dl><p>Definition at line <a class="el" href="CML_8h-source.html#l00117">117</a> of file <a class="el" href="CML_8h-source.html">CML.h</a>. </td> </tr></table><a class="anchor" name="a13"></a><!-- doxytag: member="CopleyMotionLibrary::GetFlushLog" ref="a13" 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">bool GetFlushLog </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Get the state of the log flushing setting. <p><dl compact><dt><b>Returns:</b></dt><dd>true if enabled. </dd></dl><p>Definition at line <a class="el" href="CML_8h-source.html#l00121">121</a> of file <a class="el" href="CML_8h-source.html">CML.h</a>. </td> </tr></table><a class="anchor" name="a15"></a><!-- doxytag: member="CopleyMotionLibrary::GetLogFile" ref="a15" 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">const char* GetLogFile </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -