vxwwd.html
来自「vxworks相关论文」· HTML 代码 · 共 209 行
HTML
209 行
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/VXWWd.html - generated by refgen from /vobs/wpwr/docs/vxworks/ref/VXWWd.i --> <title> VXWWd </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>VXWWd</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>VXWWd</strong> - watchdog timer class</p></blockquote><h4>METHODS</h4><blockquote><p><p><b><i><a href="./VXWWd.html#VXWWd::VXWWd">VXWWd::VXWWd</a></i>( )</b> - construct a watchdog timer<br><b><i><a href="./VXWWd.html#VXWWd::VXWWd_1">VXWWd::VXWWd</a></i>( )</b> - construct a watchdog timer<br><b><i><a href="./VXWWd.html#VXWWd::~VXWWd">VXWWd::~VXWWd</a></i>( )</b> - destroy a watchdog timer<br><b><i><a href="./VXWWd.html#VXWWd::cancel">VXWWd::cancel</a></i>( )</b> - cancel a currently counting watchdog<br><b><i><a href="./VXWWd.html#VXWWd::start">VXWWd::start</a></i>( )</b> - start a watchdog timer<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library provides a general watchdog timer facility. Any task maycreate a watchdog timer and use it to run a specified routine inthe context of the system-clock ISR, after a specified delay.<p>Once a timer has been created, it can be started with<b><i><a href="./VXWWd.html#VXWWd::start">VXWWd::start</a></i>( )</b>. The <b><i><a href="./VXWWd.html#VXWWd::start">VXWWd::start</a></i>( )</b> routine specifies what routine to run, aparameter for that routine, and the amount of time (in ticks) beforethe routine is to be called. (The timeout value is in ticks asdetermined by the system clock; see <b><i><a href="./sysLib.html#sysClkRateSet">sysClkRateSet</a></i>( )</b> for moreinformation.) After the specified delay ticks have elapsed (unless<b><i><a href="./VXWWd.html#VXWWd::cancel">VXWWd::cancel</a></i>( )</b> is called first to cancel the timer) the timeout routine isinvoked with the parameter specified in the <b><i><a href="./VXWWd.html#VXWWd::start">VXWWd::start</a></i>( )</b> call. Thetimeout routine is invoked whether the task which started the watchdogis running, suspended, or deleted.<p>The timeout routine executes only once per <b><i><a href="./VXWWd.html#VXWWd::start">VXWWd::start</a></i>( )</b> invocation; thereis no need to cancel a timer with <b><i><a href="./VXWWd.html#VXWWd::cancel">VXWWd::cancel</a></i>( )</b> after it has expired, orin the expiration callback itself.<p>Note that the timeout routine is invoked at interrupt level, rather thanin the context of the task. Thus, there are restrictions on what theroutine may do. Watchdog routines are constrained to the same rulesas interrupt service routines. For example, they may not take semaphores,issue other calls that may block, or use I/O system routines like <b><i><a href="./fioLib.html#printf">printf</a></i>( )</b>.<p></blockquote><h4>EXAMPLE</h4><blockquote><p>In the fragment below, if <b><i>maybeSlowRoutine</i>( )</b> takes more than 60ticks, <b><i><a href="./logLib.html#logMsg">logMsg</a></i>( )</b> will be called with the string as a parameter,causing the message to be printed on the console. Normally, ofcourse, more significant corrective action would be taken.<pre> VXWWd *pWd = new VXWWd; pWd->start (60, logMsg, "Help, I've timed out!"); maybeSlowRoutine (); /* user-supplied routine */ delete pWd;</pre></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>vxwWdLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./VXWWd.html#top">VXWWd</a></b>, <b><a href="./wdLib.html#top">wdLib</a></b>, <b><a href="./logLib.html#top">logLib</a></b>, <i>VxWorks Programmer's Guide: Basic OS</i>, <i>VxWorks Programmer's Guide: C++ Development</i><p><p><hr><a name="VXWWd::VXWWd"></a><p align=right><a href="rtnIndex.html"><i>Wind Foundation Classes : Methods</i></a></p></blockquote><h1><i>VXWWd::VXWWd</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>VXWWd::VXWWd</i>( )</strong> - construct a watchdog timer</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre> VXWWd ()</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine creates a watchdog timer.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><i><a href="./VXWWd.html#VXWWd::~VXWWd">VXWWd::~VXWWd</a></i>( )</b><hr><a name="VXWWd::VXWWd_1"></a><p align=right><a href="rtnIndex.html"><i>Wind Foundation Classes : Methods</i></a></p></blockquote><h1><i>VXWWd::VXWWd</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>VXWWd::VXWWd</i>( )</strong> - construct a watchdog timer</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>VXWWd ( WDOG_ID aWdId )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine creates a watchdog timer from an existing <b>WDOG_ID</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><i><a href="./VXWWd.html#VXWWd::~VXWWd">VXWWd::~VXWWd</a></i>( )</b><hr><a name="VXWWd::~VXWWd"></a><p align=right><a href="rtnIndex.html"><i>Wind Foundation Classes : Methods</i></a></p></blockquote><h1><i>VXWWd::~VXWWd</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>VXWWd::~VXWWd</i>( )</strong> - destroy a watchdog timer</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre> ~VXWWd ()</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine destroys a watchdog timer. The watchdog will be removedfrom the timer queue if it has been started.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><i><a href="./VXWWd.html#VXWWd::VXWWd">VXWWd::VXWWd</a></i>( )</b><hr><a name="VXWWd::cancel"></a><p align=right><a href="rtnIndex.html"><i>Wind Foundation Classes : Methods</i></a></p></blockquote><h1><i>VXWWd::cancel</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>VXWWd::cancel</i>( )</strong> - cancel a currently counting watchdog</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre> STATUS cancel ()</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine cancels a currently running watchdog timer byzeroing its delay count. Watchdog timers may be canceled from interruptlevel.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the watchdog timer cannot be canceled.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><i><a href="./VXWWd.html#VXWWd::start">VXWWd::start</a></i>( )</b><hr><a name="VXWWd::start"></a><p align=right><a href="rtnIndex.html"><i>Wind Foundation Classes : Methods</i></a></p></blockquote><h1><i>VXWWd::start</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>VXWWd::start</i>( )</strong> - start a watchdog timer</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS start ( int delay, FUNCPTR pRoutine, int parameter )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine adds a watchdog timer to the system tick queue. Thespecified watchdog routine will be called from interrupt level afterthe specified number of ticks has elapsed. Watchdog timers may bestarted from interrupt level. <p>To replace either the timeout <i>delay</i> or the routine to be executed,call <b><i><a href="./VXWWd.html#VXWWd::start">VXWWd::start</a></i>( )</b> again; only the most recent<b><i><a href="./VXWWd.html#VXWWd::start">VXWWd::start</a></i>( )</b> on a given watchdog ID has any effect. (If yourapplication requires multiple watchdog routines, use <b><i><a href="./VXWWd.html#VXWWd::VXWWd">VXWWd::VXWWd</a></i>( )</b> togenerate separate a watchdog for each.) To cancel a watchdogtimer before the specified tick count is reached, call <b><i><a href="./VXWWd.html#VXWWd::cancel">VXWWd::cancel</a></i>( )</b>.<p>Watchdog timers execute only once, but some applications requireperiodically executing timers. To achieve this effect, the timerroutine itself must call <b><i><a href="./VXWWd.html#VXWWd::start">VXWWd::start</a></i>( )</b> to restart the timer on eachinvocation.<p></blockquote><h4>WARNING</h4><blockquote><p>The watchdog routine runs in the context of thesystem-clock ISR; thus, it is subject to all ISR restrictions.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the watchdog timer cannot be started.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><i><a href="./VXWWd.html#VXWWd::cancel">VXWWd::cancel</a></i>( )</b></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?