📄 classcaninterface.html
字号:
<a class="anchor" name="b0"></a><!-- doxytag: member="CanInterface::RecvFrame" ref="b0" args="(CanFrame &frame, int32 timeout)" --><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 <a class="el" href="classError.html">Error</a> * RecvFrame </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="structCanFrame.html">CanFrame</a> & </td> <td class="mdname" nowrap> <em>frame</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#a9">int32</a> </td> <td class="mdname" nowrap> <em>timeout</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"><code> [protected, virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Receive the next CAN frame. <p>This is called by the public Recv function, and must be implemented by the actual CanInterace class. It handles the hardware specific details of reading a message from the network.<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>frame</em> </td><td>A reference to the frame object that will be filled by the read. </td></tr> <tr><td valign="top"></td><td valign="top"><em>timeout</em> </td><td>The timeout (ms) to wait for the frame. A timeout of 0 will return immediately if no data is available. A timeout of < 0 will wait forever. </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>A pointer to an error object, or NULL on success.</dd></dl><p>Definition at line <a class="el" href="Can_8cpp-source.html#l00094">94</a> of file <a class="el" href="Can_8cpp-source.html">Can.cpp</a>. </td> </tr></table><a class="anchor" name="a6"></a><!-- doxytag: member="CanInterface::SetBaud" ref="a6" args="(int32 baud)" --><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>* SetBaud </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="CML__Utils_8h.html#a9">int32</a> </td> <td class="mdname1" valign="top" nowrap> <em>baud</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline, virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Set the CAN interface baud rate. <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>baud</em> </td><td>In bits / second </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>A valid CAN error object</dd></dl><p>Definition at line <a class="el" href="CML__Can_8h-source.html#l00178">178</a> of file <a class="el" href="CML__Can_8h-source.html">CML_Can.h</a>. </td> </tr></table><a class="anchor" name="a3"></a><!-- doxytag: member="CanInterface::SetName" ref="a3" args="(const char *name)" --><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>* SetName </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const char * </td> <td class="mdname1" valign="top" nowrap> <em>name</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline, virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Set the name of the port. <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>name</em> </td><td>The port name. </td></tr> </table></dl><p>Definition at line <a class="el" href="CML__Can_8h-source.html#l00155">155</a> of file <a class="el" href="CML__Can_8h-source.html">CML_Can.h</a>. </td> </tr></table><a class="anchor" name="a8"></a><!-- doxytag: member="CanInterface::Xmit" ref="a8" args="(CanFrame &frame, int32 timeout=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">const <a class="el" href="classError.html">Error</a> * Xmit </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="structCanFrame.html">CanFrame</a> & </td> <td class="mdname" nowrap> <em>frame</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#a9">int32</a> </td> <td class="mdname" nowrap> <em>timeout</em> = <code>0</code></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 CAN frame to the CAN network. <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>frame</em> </td><td>A reference to the frame to write. </td></tr> <tr><td valign="top"></td><td valign="top"><em>timeout</em> </td><td>The time to wait for the frame to be successfully sent. If the timeout is 0, the frame is written to the output queue and the function returns without waiting for it to be sent. If the timeout is <0 then the function will delay forever. </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>A pointer to an error object, or NULL on success.</dd></dl><p>Definition at line <a class="el" href="Can_8cpp-source.html#l00068">68</a> of file <a class="el" href="Can_8cpp-source.html">Can.cpp</a>. </td> </tr></table><a class="anchor" name="b1"></a><!-- doxytag: member="CanInterface::XmitFrame" ref="b1" args="(CanFrame &frame, int32 timeout)" --><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 <a class="el" href="classError.html">Error</a> * XmitFrame </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="structCanFrame.html">CanFrame</a> & </td> <td class="mdname" nowrap> <em>frame</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#a9">int32</a> </td> <td class="mdname" nowrap> <em>timeout</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"><code> [protected, virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Write a CAN frame to the CAN network. <p>This is called by the public Xmit function, and must be implemented by the actual CanInterface class. It handles the hardware specific details of writing a message to the network.<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>frame</em> </td><td>A reference to the frame to write. </td></tr> <tr><td valign="top"></td><td valign="top"><em>timeout</em> </td><td>The time to wait for the frame to be successfully sent. If the timeout is 0, the frame is written to the output queue and the function returns without waiting for it to be sent. If the timeout is <0 then the function will delay forever. </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>A pointer to an error object, or NULL on success.</dd></dl><p>Definition at line <a class="el" href="Can_8cpp-source.html#l00100">100</a> of file <a class="el" href="Can_8cpp-source.html">Can.cpp</a>. </td> </tr></table><hr><h2>Member Data Documentation</h2><a class="anchor" name="p0"></a><!-- doxytag: member="CanInterface::portName" ref="p0" 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">const char* <a class="el" href="classCanInterface.html#p0">portName</a><code> [protected]</code> </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>This string is initialized by the default constructor. <p>It may be used to identify which CAN port to open, etc. <p>Definition at line <a class="el" href="CML__Can_8h-source.html#l00207">207</a> of file <a class="el" href="CML__Can_8h-source.html">CML_Can.h</a>. </td> </tr></table><hr>The documentation for this class was generated from the following files:<ul><li><a class="el" href="CML__Can_8h-source.html">CML_Can.h</a><li><a class="el" href="Can_8cpp-source.html">Can.cpp</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 + -