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

📄 trglib.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/trgLib.html - generated by refgen from trgLib.c --> <title> trgLib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>VxWorks Reference Manual :  Libraries</i></a></p></blockquote><h1>trgLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>trgLib</strong> - trigger events control library  </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./trgLib.html#trgLibInit">trgLibInit</a></i>(&nbsp;)</b>  -  initialize the triggering library<br><b><i><a href="./trgLib.html#trgWorkQReset">trgWorkQReset</a></i>(&nbsp;)</b>  -  Resets the trigger work queue task and queue<br><b><i><a href="./trgLib.html#trgAdd">trgAdd</a></i>(&nbsp;)</b>  -  add a new trigger to the trigger list<br><b><i><a href="./trgLib.html#trgDelete">trgDelete</a></i>(&nbsp;)</b>  -  delete a trigger from the trigger list<br><b><i><a href="./trgLib.html#trgOn">trgOn</a></i>(&nbsp;)</b>  -  set triggering on<br><b><i><a href="./trgLib.html#trgOff">trgOff</a></i>(&nbsp;)</b>  -  set triggering off<br><b><i><a href="./trgLib.html#trgEnable">trgEnable</a></i>(&nbsp;)</b>  -  enable a trigger<br><b><i><a href="./trgLib.html#trgDisable">trgDisable</a></i>(&nbsp;)</b>  -  turn a trigger off<br><b><i><a href="./trgLib.html#trgChainSet">trgChainSet</a></i>(&nbsp;)</b>  -  chains two triggers<br><b><i><a href="./trgLib.html#trgEvent">trgEvent</a></i>(&nbsp;)</b>  -  trigger a user-defined event <br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p><p>This library provides the interface for triggering events.  The routinesprovide tools for creating, deleting, and controlling triggers.  However,in most cases it is preferable to use the GUI to create and managetriggers, since all order and dependency factors are automaticallyaccounted for there.<p>The event types are defined as in WindView. Triggering and WindView sharethe same instrumentation points. Furthermore, one of the main uses oftriggering is to start and stop WindView instrumentation.  Triggering isstarted by the routine <b><i><a href="./trgLib.html#trgOn">trgOn</a></i>(&nbsp;)</b>, which sets the shared variable <b>evtAction</b>.Once the variable is set, when an instrumented point is hit, <b><i>trgCheck</i>(&nbsp;)</b> iscalled. The routine looks for triggers that apply to this event.  Theroutine <b><i><a href="./trgLib.html#trgOff">trgOff</a></i>(&nbsp;)</b> stops triggering.  The routine <b><i><a href="./trgLib.html#trgEnable">trgEnable</a></i>(&nbsp;)</b> enables aspecific trigger that was previously disabled with <b><i><a href="./trgLib.html#trgDisable">trgDisable</a></i>(&nbsp;)</b>. (Atcreation time all triggers are enabled by default.) This routine alsochecks the number of triggers currently enabled, and when this is zero, itturns triggering off.<p></blockquote><h4>NOTE</h4><blockquote><p>It is important to create a trigger before calling <b><i><a href="./trgLib.html#trgOn">trgOn</a></i>(&nbsp;)</b>. <b><i><a href="./trgLib.html#trgOn">trgOn</a></i>(&nbsp;)</b>checks the trigger list to see if there is at least one trigger there, and ifnot, it exits without setting <b>evtAction</b>.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>trgLibP.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./trgLib.html#top">trgLib</a></b>, <i>WindView User's Guide </i><hr><a name="trgLibInit"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>trgLibInit</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>trgLibInit</i>(&nbsp;)</strong> - initialize the triggering library</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS trgLibInit (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes the trigger class. Triggers are VxWorks objects and therefore require a class to be initialized.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./trgLib.html#top">trgLib</a></b><hr><a name="trgWorkQReset"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>trgWorkQReset</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>trgWorkQReset</i>(&nbsp;)</strong> - Resets the trigger work queue task and queue</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS trgWorkQReset (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>When a trigger fires, if the assocated action requires a function to be calledin "safe" mode, a pointer to the required function will be placed on a queueknown as the "triggering work queue". A system task "tActDef" is spawned toaction these requests at task level. Should the user have need to reset thiswork queue (e.g. if a called task causes an exception which causes thetrgActDef task to be SUSPENDED, or if the queue gets out of sync and becomesunresponsive), <b><i><a href="./trgLib.html#trgWorkQReset">trgWorkQReset</a></i>(&nbsp;)</b> may be called.<p>Its effect is to delete the trigger work queue task and its associated resources and then recreate them. Any entries pending on the triggering workqueue will be lost. Calling this function with triggering on will result intriggering being turned off before the queue reset takes place. It is theresponsibility of the user to turn triggering back on.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the triggering task and its associated resourcescannot be deleted and recreated.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./trgLib.html#top">trgLib</a></b><hr><a name="trgAdd"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>trgAdd</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>trgAdd</i>(&nbsp;)</strong> - add a new trigger to the trigger list</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>TRIGGER_ID trgAdd    (    event_t   event,    int       status,    int       contextType,    UINT32    contextId,    OBJ_ID    objId,    int       conditional,    int       condType,    int *     condEx1,    int       condOp,    int       condEx2,    BOOL      disable,    TRIGGER * chain,    int       actionType,    FUNCPTR   actionFunc,    BOOL      actionDef,    int       actionArg    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine creates a new trigger and adds it to the proper trigger list.  Ittakes the following parameters:<dl><dt><i>event</i><dd>as defined in <b>eventP.h</b> for WindView, if given.<p><dt><i>status</i><dd>the initial status of the trigger (enabled or disabled).<p><dt><i>contextType</i><dd>the type of context where the event occurs.<p><dt><i>contextId</i><dd>the ID (if any) of the context where the event occurs.<p><dt><i>objectId</i><dd>if given and applicable.<p><dt><i>conditional</i><dd>the indicator that there is a condition on the trigger.<p><dt><i>condType</i><dd>the indicator that the condition is either a variable or a function.<p><dt><i>condEx1</i><dd>the first element in the comparison.<p><dt><i>condOp</i><dd>the type of operator (==, !=, <, <=, >, >=, |, &).<p><dt><i>condEx2</i><dd>the second element in the comparison (a constant).<p><dt><i>disable</i><dd>the indicator of whether the trigger must be disabled once it is hit.<p><dt><i>chain</i><dd>a pointer to another trigger associated to this one (if any).<p><dt><i>actionType</i><dd>

⌨️ 快捷键说明

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