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

📄 msgqevlib.html

📁 Vxworks API操作系统和驱动程序设计API。压缩的HTML文件
💻 HTML
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/msgQEvLib.html - generated by refgen from msgQEvLib.c --> <title> msgQEvLib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.htm"><i>VxWorks API Reference :  OS Libraries</i></a></p></blockquote><h1>msgQEvLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>msgQEvLib</strong> - VxWorks events support for message queues </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><a href="./msgQEvLib.html#msgQEvStart">msgQEvStart</a>(&nbsp;)</b>  -  start event notification process for a message queue<br><b><a href="./msgQEvLib.html#msgQEvStop">msgQEvStop</a>(&nbsp;)</b>  -  stop event notification process for a message queue<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p><p>This library is an extension to <b><a href="./eventLib.html#top">eventLib</a></b>, the events library. Its purpose is to support events for message queues.<p>The functions in this library are used to control registration of tasks on amessage queue. The routine <b><a href="./msgQEvLib.html#msgQEvStart">msgQEvStart</a>(&nbsp;)</b> registers a task and starts thenotification process. The function <b><a href="./msgQEvLib.html#msgQEvStop">msgQEvStop</a>(&nbsp;)</b> un-registers the task, which stops the notification mechanism. <p>When a task is registered and a message arrives on the queue, the eventsspecified are sent to that task, on the condition that no other task is pendingon that message queue. However, if a <b><a href="./msgQLib.html#msgQReceive">msgQReceive</a>(&nbsp;)</b> is to be done afterwardsto get the message, there is no guarantee that it will still be available.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>msgQEvLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./eventLib.html#top">eventLib</a></b>,<i>VxWorks Programmer's Guide: Basic OS </i><p><hr><a name="msgQEvStart"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>msgQEvStart(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>msgQEvStart(&nbsp;)</strong> - start event notification process for a message queue</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS msgQEvStart    (    MSG_Q_ID msgQId,          /* msg Q for which to register events */    UINT32   events,          /* 32 possible events */    UINT8    options          /* event-related msg Q options */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine turns on the event notification process for a given messagequeue. When a message becomes available but not wanted in that particular message queue, the events specified will be sent to the taskregistered by this function. A task can overwrite its own registrationwithout first invoking <b><a href="./msgQEvLib.html#msgQEvStop">msgQEvStop</a>(&nbsp;)</b> or specifying the <b>ALLOW_OVERWRITE</b> option.<p>The <i>options</i> parameter is used for 3 user options:- Specify if the events are to be sent only once or every time a messagearrives until <b><a href="./msgQEvLib.html#msgQEvStop">msgQEvStop</a>(&nbsp;)</b> is called. The option <dl><dt><b>EVENTS_SEND_ONCE</b> (0x1)<dd>tells the message queue to send the events one time only.- Specify if another task can register itself while the current task isstill registered. If so, the current task registration is overwritten withoutany warning. The option <dt><b>EVENTS_ALLOW_OVERWRITE</b> (0x2)<dd>allow subsequent registrations to overwrite the current one.- Specify if events are to be sent right away in the case a message iswaiting to be picked up. The option<dt><b>EVENTS_SEND_IF_FREE</b> (0x4)<dd>tells the registration process to send events if a message is present on themessage queue.If none of those three options is to be used, then the option<dt><b>EVENTS_OPTIONS_NONE</b> (0x0)<dd>has to be passed to the <i>options</i> parameter.</dl></blockquote><h4>RETURNS</h4><blockquote><p>OK on success, or ERROR.<p></blockquote><h4>ERRNO</h4><blockquote><p><dl><dt><b>S_objLib_OBJ_ID_ERROR</b><dd>The message queue ID is invalid.<dt><b>S_eventLib_ALREADY_REGISTERED</b><dd>A task is already registered on the message queue.<dt><b>S_intLib_NOT_ISR_CALLABLE</b><dd>Routine has been called from interrupt level.<dt><b>S_eventLib_EVENTSEND_FAILED</b><dd>User chose to send events right away and that operation failed.<dt><b>S_eventLib_ZERO_EVENTS</b><dd>User passed in a value of zero to the <i>events</i> parameter.</dl></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./msgQEvLib.html#top">msgQEvLib</a></b>, <b><a href="./eventLib.html#top">eventLib</a></b>, <b><a href="./msgQLib.html#top">msgQLib</a></b>, <b><a href="./msgQEvLib.html#msgQEvStop">msgQEvStop</a>(&nbsp;)</b><hr><a name="msgQEvStop"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>msgQEvStop(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>msgQEvStop(&nbsp;)</strong> - stop event notification process for a message queue</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS msgQEvStop    (    MSG_Q_ID msgQId    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine turns off the event notification process for a given messagequeue. It thus allows another task to register itself for event notificationon that particular message queue.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK on success, or ERROR.<p></blockquote><h4>ERRNO</h4><blockquote><p><dl><dt><b>S_objLib_OBJ_ID_ERROR</b><dd>The message queue ID is invalid.<dt><b>S_intLib_NOT_ISR_CALLABLE</b><dd>Routine has been called from interrupt level.<dt><b>S_eventLib_TASK_NOT_REGISTERED</b><dd>Routine has not been called by registered task.</dl></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./msgQEvLib.html#top">msgQEvLib</a></b>, <b><a href="./eventLib.html#top">eventLib</a></b>, <b><a href="./msgQLib.html#top">msgQLib</a></b>, <b><a href="./msgQEvLib.html#msgQEvStart">msgQEvStart</a>(&nbsp;)</b></body></html>

⌨️ 快捷键说明

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