📄 cpfilter_h.html
字号:
<HTML><HEAD><TITLE>cpfilter.h File Reference</TITLE><LINK HREF="micro.css" REL="stylesheet" TYPE="text/css"></HEAD><BODY BGCOLOR="#FFFFFF"><a name="PageTop"></a><!------ Document Header -------------------------------------------><table border="0" cellspacing="0" cellpadding="0"><tr><td valign="bottom"><img src="pictures/maphead.gif" vspace="0" border="0" height="20"></td></tr></table><table border="0" cellspacing="0" cellpadding="0"><tr><td valign="bottom"><a href="index.html"><img src="pictures/button_index.gif" vspace="0" border="0" height="25"></a></td><td valign="bottom"><a href="files.html"><img src="pictures/button_files.gif" vspace="0" border="0" height="25"></a></td><td valign="bottom"><a href="globals.html"><img src="pictures/button_funcs.gif" vspace="0" border="0" height="25"></a></td><td valign="bottom" width="80"> </td><td valign="bottom"><a href="annotated.html"><img src="pictures/button_structs.gif" vspace="0" border="0" height="25"></a></td><td valign="bottom"><a href="functions.html"><img src="pictures/button_members.gif" vspace="0" border="0" height="25"></a></td></tr></table><hr noshade width=680 size=1 align=left><!------ Document Start --------------------------------------------><table width=680><tr><td><!-- Generated by Doxygen 1.2.6 --><h1>cpfilter.h File Reference</h1>CANpie filter functions. <a href="#_details">More...</a><p><code>#include "<a class="el" href="cpconst_h-source.html">cpconst.h</a>"</code><br><p><a href="cpfilter_h-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0><tr><td colspan=2><br><h2>Functions</h2></td></tr><tr><td nowrap align=right valign=top>_U08 Cp_PREFIX </td><td valign=bottom><a class="el" href="cpfilter_h.html#a0">CpFilterAll</a> (_U08 channel, _BIT enable)</td></tr><tr><td> </td><td><font size=-1><em>Set global filter.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>_U08 Cp_PREFIX </td><td valign=bottom><a class="el" href="cpfilter_h.html#a1">CpFilterMsg</a> (_U08 channel, _U16 id, _BIT enable)</td></tr><tr><td> </td><td><font size=-1><em>Set filter for single message.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>_U08 Cp_PREFIX </td><td valign=bottom><a class="el" href="cpfilter_h.html#a2">CpFilterTest</a> (_U08 channel, _U16 id)</td></tr><tr><td> </td><td><font size=-1><em>Test identifier.</em> <a href="#a2">More...</a><em></em></font><br><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>CANpie filter functions.<p><p><p> On its way to the Receive FIFO the CAN message must pass an optional software identifier filter. This software filter can be used by the programmer to enhance the capabilities of the CAN controller. The software filter only supports CAN standard frames (2.0A), because otherwise the overhead for extended frames would be too big. For transmission of messages the filter is not used.<p> <b> These functions are called by the CANpie framework. It is not intended to use them in an application program. </b><p><hr><h2>Function Documentation</h2><a name="a0" doxytag="cpfilter.h::CpFilterAll"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> _U08 Cp_PREFIX CpFilterAll ( </b></td> <td valign="bottom"><b>_U08 <em>channel</em>, </b></td> </tr> <tr> <td></td> <td><b>_BIT <em>enable</em> ) </b></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Set global filter.<p><dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>channel</em> </td><td>CAN channel of the hardware </td></tr><tr><td valign=top><em>enable</em> </td><td>TRUE for accepting all identifiers, FALSE for rejecting all identifiers<p></td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>Error code taken from the CpErr enumeration. If no error occured, the function will return CpErr_OK.<p></dl>This function enables or disables the reception of CAN messages. If the flag <b>enable</b> is set to TRUE, all incoming CAN messages are accepted. If the flag <b>enable</b> is set to FALSE, all CAN messages are rejected. Please notice that this function only works for standard messages (2.0A, 11 bit identifier). This function is called by the user function <a class="el" href="cpuser_h.html#a4">CpUserFilterAll</a>() if the member <b>SupportSWFilter</b> of the HDI structure (<a class="el" href="struct_CpStruct_HDI.html">CpStruct_HDI</a>) is set to TRUE and the driver does not use a firmware filter. </td> </tr></table><a name="a1" doxytag="cpfilter.h::CpFilterMsg"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> _U08 Cp_PREFIX CpFilterMsg ( </b></td> <td valign="bottom"><b>_U08 <em>channel</em>, </b></td> </tr> <tr> <td></td> <td><b>_U16 <em>id</em>, </b></td> </tr> <tr> <td></td> <td><b>_BIT <em>enable</em> ) </b></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Set filter for single message.<p><dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>channel</em> </td><td>CAN channel of the hardware </td></tr><tr><td valign=top><em>id</em> </td><td>value of the identifier </td></tr><tr><td valign=top><em>enable</em> </td><td>TRUE for accepting an identifier, FALSE for rejecting an identifier<p></td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>Error code taken from the CpErr enumeration. If no error occured, the function will return CpErr_OK.<p></dl>This function sets a filter for CAN messages. If the flag <b>enable</b> is set to TRUE, the CAN identifier <b>id</b> is accepted. If the flag <b>enable</b> is set to FALSE, the reception of messages with the identifier <b>id</b> is not possible. Please notice that this function only works for standard messages (2.0A, 11 bit identifier). This function is called by the user function <a class="el" href="cpuser_h.html#a5">CpUserFilterMsg</a>() if the member <b>SupportSWFilter</b> of the HDI structure (<a class="el" href="struct_CpStruct_HDI.html">CpStruct_HDI</a>) is set to TRUE and the driver does not use a firmware filter. </td> </tr></table><a name="a2" doxytag="cpfilter.h::CpFilterTest"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> _U08 Cp_PREFIX CpFilterTest ( </b></td> <td valign="bottom"><b>_U08 <em>channel</em>, </b></td> </tr> <tr> <td></td> <td><b>_U16 <em>id</em> ) </b></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Test identifier.<p><dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>channel</em> </td><td>CAN channel of the hardware </td></tr><tr><td valign=top><em>id</em> </td><td>value of the identifier<p></td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>CpErr_OK for accepting an identifier,<br> CpErr_GENERIC for rejecting an identifer<p></dl>This function is called by the framework to check if an identifier is valid.. </td> </tr></table></td></tr></table><!------ Document footer -------------------------------------------><p><br><map name="FooterMap"><area shape=rect coords=" 1, 1, 100, 20" href="#PageTop"><area shape=rect coords="400, 1, 500, 20" href="mailto:koppe@microcontrol.net?Subject=CANpie"></map><table width="600" border="0" bgcolor="#FFFFFF" cellspacing="0"><tr><td><IMG src="pictures/mapfoot.gif" border="0" usemap="#FooterMap"></td></tr><!------ print modification date -----------------------------------><tr><td align="right"><h4>Last modified: 10 Jul 2001</h4></td></tr></table> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -