📄 classpmap.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: Pmap 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>Pmap Class Reference</h1><!-- doxytag: class="Pmap" --><p>Inheritance diagram for Pmap:<p><center><img src="classPmap.png" usemap="#Pmap_map" border="0" alt=""></center><map name="Pmap_map"><area href="classPmap16.html" alt="Pmap16" shape="rect" coords="0,56,67,80"><area href="classPmap24.html" alt="Pmap24" shape="rect" coords="77,56,144,80"><area href="classPmap32.html" alt="Pmap32" shape="rect" coords="154,56,221,80"><area href="classPmap8.html" alt="Pmap8" shape="rect" coords="231,56,298,80"><area href="classPmapRaw.html" alt="PmapRaw" shape="rect" coords="308,56,375,80"></map><a href="classPmap-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>This class allows variables to be mapped into a <a class="el" href="classPDO.html">PDO</a>. <p>This class can be used directly for transmit PDOs if the received data is not of interest (it will simply be discarded by the <a class="el" href="classPmap.html#a5">Set()</a> function. Using this for receive PDOs is not recommended since the <a class="el" href="classPmap.html#a4">Get()</a> function doesn't add any data to the output stream and therefore the data transmitted to the node will be undefined.<p><p>Definition at line <a class="el" href="CML__PDO_8h-source.html#l00066">66</a> of file <a class="el" href="CML__PDO_8h-source.html">CML_PDO.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="Pmap::Pmap" ref="a0" args="()" --> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPmap.html#a0">Pmap</a> ()</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor for a generic <a class="el" href="classPDO.html">PDO</a> mapping variable. <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPmap.html#a1">Pmap</a> (<a class="el" href="CML__Utils_8h.html#a8">uint16</a> <a class="el" href="classPmap.html#p0">index</a>, <a class="el" href="CML__Utils_8h.html#a2">byte</a> <a class="el" href="classPmap.html#p1">sub</a>, <a class="el" href="CML__Utils_8h.html#a2">byte</a> <a class="el" href="classPmap.html#p2">bits</a>)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Construct a generic <a class="el" href="classPDO.html">PDO</a> mapping variable and initialize it's size and object ID. <a href="#a1"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2"></a><!-- doxytag: member="Pmap::~Pmap" ref="a2" args="()" -->virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classPmap.html#a2">~Pmap</a> ()</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Virtual destructor. <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="classError.html">Error</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classPmap.html#a3">Init</a> (<a class="el" href="CML__Utils_8h.html#a8">uint16</a> <a class="el" href="classPmap.html#p0">index</a>, <a class="el" href="CML__Utils_8h.html#a2">byte</a> <a class="el" href="classPmap.html#p1">sub</a>, <a class="el" href="CML__Utils_8h.html#a2">byte</a> <a class="el" href="classPmap.html#p2">bits</a>)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize a generic <a class="el" href="classPDO.html">PDO</a> mapping variable. <a href="#a3"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPmap.html#a4">Get</a> (<a class="el" href="CML__Utils_8h.html#a2">byte</a> *cptr)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Called when a receive <a class="el" href="classPDO.html">PDO</a> is about to be transmitted. <a href="#a4"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPmap.html#a5">Set</a> (<a class="el" href="CML__Utils_8h.html#a2">byte</a> *cptr)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Called when a transmit <a class="el" href="classPDO.html">PDO</a> is received. <a href="#a5"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a6"></a><!-- doxytag: member="Pmap::GetMapCode" ref="a6" args="()" -->virtual <a class="el" href="CML__Utils_8h.html#a10">uint32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPmap.html#a6">GetMapCode</a> ()</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Return the 32-bit code used to identify this variable in the CANopen node's <a class="el" href="classPDO.html">PDO</a> mapping block. <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="CML__Utils_8h.html#a8">uint16</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPmap.html#a7">GetIndex</a> ()</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Get the object index associated with this variable. <a href="#a7"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="CML__Utils_8h.html#a2">byte</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPmap.html#a8">GetSub</a> ()</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Get the object sub-index associated with this variable. <a href="#a8"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="CML__Utils_8h.html#a2">byte</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPmap.html#a9">GetBits</a> ()</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Get the number of bits in this variable. <a href="#a9"></a><br></td></tr><tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p0"></a><!-- doxytag: member="Pmap::index" ref="p0" args="" --><a class="el" href="CML__Utils_8h.html#a8">uint16</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPmap.html#p0">index</a></td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">The 16-bit index of the object in the object dictionary. <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p1"></a><!-- doxytag: member="Pmap::sub" ref="p1" args="" --><a class="el" href="CML__Utils_8h.html#a2">byte</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPmap.html#p1">sub</a></td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">The 8-bit sub-index of the object in the object dictionary. <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p2"></a><!-- doxytag: member="Pmap::bits" ref="p2" args="" --><a class="el" href="CML__Utils_8h.html#a2">byte</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPmap.html#p2">bits</a></td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">The number of bits that this object takes up. <br></td></tr></table><hr><h2>Constructor & Destructor Documentation</h2><a class="anchor" name="a1"></a><!-- doxytag: member="Pmap::Pmap" ref="a1" args="(uint16 index, byte sub, byte bits)" --><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="classPmap.html">Pmap</a> </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="CML__Utils_8h.html#a8">uint16</a> </td> <td class="mdname" nowrap> <em>index</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#a2">byte</a> </td> <td class="mdname" nowrap> <em>sub</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#a2">byte</a> </td> <td class="mdname" nowrap> <em>bits</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"><code> [inline]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Construct a generic <a class="el" href="classPDO.html">PDO</a> mapping variable and initialize it's size and object ID. <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>index</em> </td><td>The index of the variable in the object dictionary </td></tr> <tr><td valign="top"></td><td valign="top"><em>sub</em> </td><td>The variable's sub-index in the object dictionary </td></tr> <tr><td valign="top"></td><td valign="top"><em>bits</em> </td><td>The size of the variable in bits </td></tr> </table></dl><p>Definition at line <a class="el" href="CML__PDO_8h-source.html#l00077">77</a> of file <a class="el" href="CML__PDO_8h-source.html">CML_PDO.h</a>. </td> </tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="a4"></a><!-- doxytag: member="Pmap::Get" ref="a4" args="(byte *cptr)" --><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 Get </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="CML__Utils_8h.html#a2">byte</a> * </td> <td class="mdname1" valign="top" nowrap> <em>cptr</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>Called when a receive <a class="el" href="classPDO.html">PDO</a> is about to be transmitted. <p>This virtual function does nothing and therefore objects of this generic type shouldn't be used when actually transmitting PDOs <p>Reimplemented in <a class="el" href="classPmapRaw.html#a2">PmapRaw</a>, <a class="el" href="classPmap32.html#a3">Pmap32</a>, <a class="el" href="classPmap24.html#a3">Pmap24</a>, <a class="el" href="classPmap16.html#a3">Pmap16</a>, and <a class="el" href="classPmap8.html#a3">Pmap8</a>.<p>Definition at line <a class="el" href="CML__PDO_8h-source.html#l00101">101</a> of file <a class="el" href="CML__PDO_8h-source.html">CML_PDO.h</a>. </td> </tr></table><a class="anchor" name="a9"></a><!-- doxytag: member="Pmap::GetBits" ref="a9" 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="CML__Utils_8h.html#a2">byte</a> GetBits </td> <td class="md" valign="top">( </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 + -