⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vxwsmname.html

📁 vxworks相关论文
💻 HTML
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/VXWSmName.html - generated by refgen from /vobs/wpwr/docs/vxworks/ref/VXWSmName.i --> <title> VXWSmName </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>VxWorks Reference Manual :  Wind Foundation Classes</i></a></p></blockquote><h1>VXWSmName</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>VXWSmName</strong> - naming behavior common to all shared memory classes</p></blockquote><h4>METHODS</h4><blockquote><p><p><b><i><a href="./VXWSmName.html#VXWSmName::~VXWSmName">VXWSmName::~VXWSmName</a></i>(&nbsp;)</b>  -  remove an object from the shared memory objects name database (VxMP Option)<br><b><i><a href="./VXWSmName.html#VXWSmName::nameSet">VXWSmName::nameSet</a></i>(&nbsp;)</b>  -  define a name string in the shared-memory name database (VxMP Option)<br><b><i><a href="./VXWSmName.html#VXWSmName::nameGet">VXWSmName::nameGet</a></i>(&nbsp;)</b>  -  get name and type of a shared memory object (VxMP Option)<br><b><i><a href="./VXWSmName.html#VXWSmName::nameGet_1">VXWSmName::nameGet</a></i>(&nbsp;)</b>  -  get name of a shared memory object (VxMP Option)<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This class library provides facilities for managing entries in the sharedmemory objects name database.  The shared memory objects namedatabase associates a name and object type with a value and makesthat information available to all CPUs.  A name is an arbitrary,null-terminated string.  An object type is a small integer, and itsvalue is a global (shared) ID or a global shared memory address.<p>Names are added to the shared memory name database with<b><i>VXWSmName::VXWSmName</i>(&nbsp;)</b>.  They are removed by <b><i><a href="./VXWSmName.html#VXWSmName::~VXWSmName">VXWSmName::~VXWSmName</a></i>(&nbsp;)</b>.<p>Name database contents can be viewed using <b><i><a href="./smNameShow.html#smNameShow">smNameShow</a></i>(&nbsp;)</b>.<p>The maximum number of names to be entered in the database <b>SM_OBJ_MAX_NAME</b> isdefined in <b>configAll.h</b>.  This  value is used to determine the size of adedicated shared memory partition from which name database fields areallocated.<p>The estimated memory size required for the name database can be calculatedas follows:<p><pre>    &lt;name database pool size&gt; = SM_OBJ_MAX_NAME * 40 (bytes)</pre>The display facility for the shared memory objects name database is providedby smNameShow.<p></blockquote><h4>CONFIGURATION</h4><blockquote><p>Before routines in this library can be called, the shared memory objectfacility must be initialized by calling <b><i><a href="./usrSmObj.html#usrSmObjInit">usrSmObjInit</a></i>(&nbsp;)</b>, which is found in<b>src/config/usrSmObj.c</b>.  This is done automatically from the roottask, <b><i><a href="./usrConfig.html#usrRoot">usrRoot</a></i>(&nbsp;)</b>, in <b>usrConfig.c</b> if <b>INCLUDE_SM_OBJ</b> is defined in<b>configAll.h</b>.<p></blockquote><h4>AVAILABILITY</h4><blockquote><p>This module depends on code that is distributed as a component ofthe unbundled shared memory objects support option, VxMP.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>vxwSmNameLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./VXWSmName.html#top">VXWSmName</a></b>, <b><a href="./smNameLib.html#top">smNameLib</a></b>, <b><a href="./smNameShow.html#top">smNameShow</a></b>, <b>vxwSmLib</b>, <b><a href="./smObjShow.html#top">smObjShow</a></b>, <b><i><a href="./usrSmObj.html#usrSmObjInit">usrSmObjInit</a></i>(&nbsp;)</b>,  <i>VxWorks Programmer's Guide: Shared Memory Objects</i><p><p><hr><a name="VXWSmName::~VXWSmName"></a><p align=right><a href="rtnIndex.html"><i>Wind Foundation Classes :  Methods</i></a></p></blockquote><h1><i>VXWSmName::~VXWSmName</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>VXWSmName::~VXWSmName</i>(&nbsp;)</strong> - remove an object from the shared memory objects name database (VxMP Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>    virtual ~VXWSmName ()</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine removes an object from the shared memory objectsname database. <p></blockquote><h4>AVAILABILITY</h4><blockquote><p>This routine depends on code distributed as a component of the unbundledshared memory objects support option, VxMP.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the database is not initialized, or the name-database lock times out.<p></blockquote><h4>ERRNO</h4><blockquote><p><p>&nbsp;S_smNameLib_NOT_INITIALIZED&nbsp;&nbsp;<br>&nbsp;S_smObjLib_LOCK_TIMEOUT</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./VXWSmName.html#top">VXWSmName</a></b><hr><a name="VXWSmName::nameSet"></a><p align=right><a href="rtnIndex.html"><i>Wind Foundation Classes :  Methods</i></a></p></blockquote><h1><i>VXWSmName::nameSet</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>VXWSmName::nameSet</i>(&nbsp;)</strong> - define a name string in the shared-memory name database (VxMP Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>virtual STATUS nameSet    (    char * name    ) = 0</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine adds a name of the type appropriate for each derived classto the database of memory object names.<p>The <i>name</i> parameter is an arbitrary null-terminated string with a maximum of 20 characters, including EOS.<p>A name can be entered only once in the database, but there can be morethan one name associated with an object ID. <p></blockquote><h4>AVAILABILITY</h4><blockquote><p>This routine depends on the unbundled shared memoryobjects support option, VxMP.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if there is insufficient memory for <i>name</i> to be allocated, if <i>name</i> is already in the database, or if the database is already full.<p></blockquote><h4>ERRNO</h4><blockquote><p><p>&nbsp;S_smNameLib_NOT_INITIALIZED&nbsp;&nbsp;<br>&nbsp;S_smNameLib_NAME_TOO_LONG&nbsp;&nbsp;<br>&nbsp;S_smNameLib_NAME_ALREADY_EXIST&nbsp;<br>&nbsp;S_smNameLib_DATABASE_FULL&nbsp;<br>&nbsp;S_smObjLib_LOCK_TIMEOUT</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./VXWSmName.html#top">VXWSmName</a></b><hr><a name="VXWSmName::nameGet"></a><p align=right><a href="rtnIndex.html"><i>Wind Foundation Classes :  Methods</i></a></p></blockquote><h1><i>VXWSmName::nameGet</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>VXWSmName::nameGet</i>(&nbsp;)</strong> - get name and type of a shared memory object (VxMP Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS nameGet    (    char * name,    int *  pType,    int    waitType    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine searches the shared memory name database for an object matchingthis VXWSmName instance.  If the object is found, its name and type arecopied to the addresses pointed to by <i>name</i> and <i>pType</i>.  The value of<i>waitType</i> can be one of the following:<dl><dt><b>NO_WAIT</b> (0)<dd>The call returns immediately, even if the object value is not in the database<p><dt><b>WAIT_FOREVER</b> (-1)<dd> The call returns only when the object value is available in the database. </dl><p></blockquote><h4>AVAILABILITY</h4><blockquote><p>This routine depends on the unbundled shared memoryobjects support option, VxMP.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if <i>value</i> is not found or if the wait type is invalid.<p></blockquote><h4>ERRNO</h4><blockquote><p><p>&nbsp;S_smNameLib_NOT_INITIALIZED&nbsp;<br>&nbsp;S_smNameLib_VALUE_NOT_FOUND&nbsp;<br>&nbsp;S_smNameLib_INVALID_WAIT_TYPE&nbsp;&nbsp;<br>&nbsp;S_smObjLib_LOCK_TIMEOUT</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./VXWSmName.html#top">VXWSmName</a></b><hr><a name="VXWSmName::nameGet_1"></a><p align=right><a href="rtnIndex.html"><i>Wind Foundation Classes :  Methods</i></a></p></blockquote><h1><i>VXWSmName::nameGet</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>VXWSmName::nameGet</i>(&nbsp;)</strong> - get name of a shared memory object (VxMP Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS nameGet    (    char * name,    int    waitType    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine searches the shared memory name database for an object matchingthis VXWSmName instance.  If the object is found, its name is copiedto the address pointed to by <i>name</i>.  The value of <i>waitType</i> can be one of the following:<dl><dt><b>NO_WAIT</b> (0)<dd>The call returns immediately, even if the object value is not in the database<p><dt><b>WAIT_FOREVER</b> (-1)<dd> The call returns only when the object value is available in the database. </dl><p></blockquote><h4>AVAILABILITY</h4><blockquote><p>This routine depends on the unbundled shared memoryobjects support option, VxMP.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if <i>value</i> is not found or if the wait type is invalid.<p></blockquote><h4>ERRNO</h4><blockquote><p><p>&nbsp;S_smNameLib_NOT_INITIALIZED&nbsp;<br>&nbsp;S_smNameLib_VALUE_NOT_FOUND&nbsp;<br>&nbsp;S_smNameLib_INVALID_WAIT_TYPE&nbsp;&nbsp;<br>&nbsp;S_smObjLib_LOCK_TIMEOUT</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./VXWSmName.html#top">VXWSmName</a></b></body></html>

⌨️ 快捷键说明

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