classiomodule.html

来自「美国COPLEY驱动器,程序开发工具之一.」· HTML 代码 · 共 386 行 · 第 1/5 页

HTML
386
字号
<!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: IOModule 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>IOModule Class Reference</h1><!-- doxytag: class="IOModule" --><!-- doxytag: inherits="Node" --><p>Inheritance diagram for IOModule:<p><center><img src="classIOModule.png" usemap="#IOModule_map" border="0" alt=""></center><map name="IOModule_map"><area href="classNode.html" alt="Node" shape="rect" coords="38,56,105,80"><area href="classThread.html" alt="Thread" shape="rect" coords="0,0,67,24"><area href="classReceiver.html" alt="Receiver" shape="rect" coords="77,0,144,24"></map><a href="classIOModule-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>Standard CANopen I/O module. <p>This class represents and I/O module device conforming to the DS401 CANopen specification. The class may be extended to provide additional manufacturer specific features.<p>Note that the CANopen standard defines a very large number of parameters that may be used with a standard I/O module. Of these, only a small subset are requred by the spec. In practice, it seems that most of the major manufacturers of CANopen I/O modules only implement the minimum required by the spec. The result is that many of the optional functions have not been tested with real hardware due to the lack of availability. Please contact Copley Controls if you believe that you have found a problem with any of these functions.<p>For the typical I/O module, you can expect the following functionality to be supported based on the type of I/O the module supports:<p>Digital Inputs: Reading the inputs via <a class="el" href="classPDO.html">PDO</a> or <a class="el" href="classSDO.html">SDO</a> in groups of 8 should be supported. Other features are optional.<p>Digital Outputs: Writing to the outputs via <a class="el" href="classPDO.html">PDO</a> or <a class="el" href="classSDO.html">SDO</a> in groups of 8 should be supported. Other features are optional.<p>Analog Inputs: Reading 16-bit analog inputs via <a class="el" href="classPDO.html">PDO</a> or <a class="el" href="classSDO.html">SDO</a> is normally supported. Other input sizes and features are optional.<p>Analog Outputs: Writing 16-bit analog outputs via <a class="el" href="classPDO.html">PDO</a> or <a class="el" href="classSDO.html">SDO</a> is normally supported. Other output sizes and features are optional.<p><p>Definition at line <a class="el" href="CML__IO_8h-source.html#l00340">340</a> of file <a class="el" href="CML__IO_8h-source.html">CML_IO.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">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIOModule.html#a0">IOModule</a> (void)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor for an I/O module.  <a href="#a0"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIOModule.html#a1">IOModule</a> (<a class="el" href="classCanOpen.html">CanOpen</a> &amp;<a class="el" href="classReceiver.html#p0">co</a>, <a class="el" href="CML__Utils_8h.html#a7">int16</a> nodeID)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct an IOModule object and initialize it using default settings.  <a href="#a1"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIOModule.html#a2">IOModule</a> (<a class="el" href="classCanOpen.html">CanOpen</a> &amp;<a class="el" href="classReceiver.html#p0">co</a>, <a class="el" href="CML__Utils_8h.html#a7">int16</a> nodeID, <a class="el" href="structIOModuleSettings.html">IOModuleSettings</a> &amp;settings)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct an IOModule object and initialize it using custom settings.  <a href="#a2"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3"></a><!-- doxytag: member="IOModule::~IOModule" ref="a3" args="()" -->virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIOModule.html#a3">~IOModule</a> ()</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Virtual destructor for the IOModule object. <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="classError.html">Error</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIOModule.html#a4">Init</a> (<a class="el" href="classCanOpen.html">CanOpen</a> &amp;<a class="el" href="classReceiver.html#p0">co</a>, <a class="el" href="CML__Utils_8h.html#a7">int16</a> nodeID)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize an I/O module using default settings.  <a href="#a4"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="classError.html">Error</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIOModule.html#a5">Init</a> (<a class="el" href="classCanOpen.html">CanOpen</a> &amp;<a class="el" href="classReceiver.html#p0">co</a>, <a class="el" href="CML__Utils_8h.html#a7">int16</a> nodeID, <a class="el" href="structIOModuleSettings.html">IOModuleSettings</a> &amp;settings)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize an I/O module using custom settings.  <a href="#a5"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="classError.html">Error</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIOModule.html#a6">WaitIOEvent</a> (<a class="el" href="CML__IO_8h.html#a92">IOMODULE_EVENTS</a> event, <a class="el" href="CML__Utils_8h.html#a9">int32</a> timeout=-1)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Wait on an event associated with this I/O module.  <a href="#a6"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="classError.html">Error</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIOModule.html#a7">WaitIOEvent</a> (<a class="el" href="classEvent.html">Event</a> &amp;e, <a class="el" href="CML__Utils_8h.html#a9">int32</a> timeout, <a class="el" href="CML__IO_8h.html#a92">IOMODULE_EVENTS</a> &amp;match)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Wait for an event associated with this I/O module.  <a href="#a7"></a><br></td></tr><tr><td colspan="2"><div class="groupHeader">Digital input control</div></td></tr><tr><td colspan="2"><div class="groupText">If the module contains digital inputs, these methods may be used to configure and read those inputs. The inputs may be read and controlled individually, or in groups of 8, 16 or 32 inputs.<p>All I/O modules should support access to digital inputs in groups of 8. Support for individual access or different groupings is optional under the spec. If a particular device does not support such groupings, an attempt to use them should return an error code.<p>Each input pin or group of pins is assigned an ID number used to access it. When single inputs are accessed, these ID numbers range from 0 (the first input) to N-1 (the last input), where N is the total number of input pins available on the module.<p>When groups of inputs are accessed as a unit, the group is assigned a number. The first group of inputs will be assigned ID number 0, the second will be ID 1, etc. The number of groups of a particular size will be the total number of inputs divided by the group size.<p>For example, to access the fifty third input pin individually you would use id number 52. To access it as part of a group of 8 inputs, you would access group number 6 (52/8). Input 52 would be bit 4 (528) of that group.<br><br></div></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="classError.html">Error</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIOModule.html#z19_0">DinGetIntEna</a> (bool &amp;value)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the current setting of the global interrupt enable for digital inputs.  <a href="#z19_0"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="classError.html">Error</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIOModule.html#z19_1">DinSetIntEna</a> (bool value)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the current setting of the global interrupt enable for digital inputs.  <a href="#z19_1"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="classError.html">Error</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIOModule.html#z19_2">DinGetCt</a> (<a class="el" href="CML__Utils_8h.html#a8">uint16</a> &amp;ct)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the number of individual inputs available on this device.  <a href="#z19_2"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="classError.html">Error</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIOModule.html#z19_3">DinRead</a> (<a class="el" href="CML__Utils_8h.html#a8">uint16</a> id, bool &amp;value, bool viaSDO=false)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read a single digital input.  <a href="#z19_3"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="classError.html">Error</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIOModule.html#z19_4">DinGetPol</a> (<a class="el" href="CML__Utils_8h.html#a8">uint16</a> id, bool &amp;value)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the current polarity settings for a digital input.  <a href="#z19_4"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="classError.html">Error</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIOModule.html#z19_5">DinSetPol</a> (<a class="el" href="CML__Utils_8h.html#a8">uint16</a> id, bool value)</td></tr>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?