blob: 918365ed98b8575f4ca4ff1eb004bb1050e37f45 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title> TemplateOsclTimer&lt; Alloc &gt; class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.18 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="globals.html">Globals</a> &nbsp; </center>
<hr><h1>OsclTimer&lt; Alloc &gt; Class Template Reference</h1><code>#include &lt;<a class="el" href="oscl__timer_8h-source.html">oscl_timer.h</a>&gt;</code>
<p>
<p>Inheritance diagram for OsclTimer&lt; Alloc &gt;:
<p><center><img src="classOsclTimer.png" usemap="#OsclTimer< Alloc >_map" border="0" alt=""></center>
<map name="OsclTimer< Alloc >_map">
<area href="classCallbackTimerObserver.html" alt="CallbackTimerObserver" shape="rect" coords="0,0,146,24">
</map>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Types</h2></td></tr>
<tr><td nowrap align=right valign=top>typedef <a class="el" href="classCallbackTimer.html">CallbackTimer</a>&lt; Alloc &gt;&nbsp;</td><td valign=bottom><a class="el" href="classOsclTimer.html#s0">callback_timer_type</a></td></tr>
<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classOsclTimer.html#a0">OsclTimer</a> (const char *name, uint32 frequency=1, int32 priority=OsclActiveObject::EPriorityNominal)</td></tr>
<tr><td nowrap align=right valign=top>virtual&nbsp;</td><td valign=bottom><a class="el" href="classOsclTimer.html#a1">~OsclTimer</a> ()</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classOsclTimer.html#a2">SetObserver</a> (<a class="el" href="classOsclTimerObserver.html">OsclTimerObserver</a> *obs)</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classOsclTimer.html#a3">SetFrequency</a> (uint32 frequency)</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classOsclTimer.html#a4">SetExactFrequency</a> (uint32 frequency)</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classOsclTimer.html#a5">Request</a> (int32 timerID, int32 timeoutInfo, int32 cycles, <a class="el" href="classOsclTimerObserver.html">OsclTimerObserver</a> *obs=0, bool recurring=0)</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classOsclTimer.html#a6">Cancel</a> (int32 timerID, int32 timeoutInfo=-1)</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classOsclTimer.html#a7">Clear</a> ()</td></tr>
<tr><td colspan=2><br><h2>Protected Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classOsclTimer.html#b0">TimerBaseElapsed</a> ()</td></tr>
<tr><td colspan=2><br><h2>Friends</h2></td></tr>
<tr><td nowrap align=right valign=top>class&nbsp;</td><td valign=bottom><a class="el" href="classOsclTimer.html#l0">CallbackTimer&lt; Alloc &gt;</a></td></tr>
</table>
<h3>template&lt;class Alloc&gt;<br>
class OsclTimer&lt; Alloc &gt;</h3>
<hr><h2>Member Typedef Documentation</h2>
<a name="s0" doxytag="OsclTimer::callback_timer_type"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template&lt;class Alloc&gt; </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> typedef <a class="el" href="classCallbackTimer.html">CallbackTimer</a>&lt;Alloc&gt; OsclTimer&lt; Alloc &gt;::callback_timer_type
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="a0" doxytag="OsclTimer::OsclTimer"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template&lt;class Alloc&gt; </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> OsclTimer&lt; Alloc &gt;::OsclTimer </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const char *&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>name</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>uint32&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>frequency</em> = 1, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>int32&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>priority</em> = OsclActiveObject::EPriorityNominal</td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Constructor<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>frequency</em>&nbsp;</td><td>
The frequency of the timer in cycles/second. A value of 1 means the timer will cycle in 1 second intervals. </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="a1" doxytag="OsclTimer::~OsclTimer"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template&lt;class Alloc&gt; </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> OsclTimer&lt; Alloc &gt;::~OsclTimer </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="a6" doxytag="OsclTimer::Cancel"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template&lt;class Alloc&gt; </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void OsclTimer&lt; Alloc &gt;::Cancel </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">int32&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>timerID</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>int32&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>timeoutInfo</em> = -1</td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Cancel a timer<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>timerID</em>&nbsp;</td><td>
used to identify the timer to cancel. </td></tr>
<tr><td valign=top><em>timeoutInfo</em>&nbsp;</td><td>
if not set to -1, this value will be used as additional matching criteria to cancel a timer. </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="a7" doxytag="OsclTimer::Clear"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template&lt;class Alloc&gt; </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void OsclTimer&lt; Alloc &gt;::Clear </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Cancel all pending timers. </td>
</tr>
</table>
<a name="a5" doxytag="OsclTimer::Request"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template&lt;class Alloc&gt; </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void OsclTimer&lt; Alloc &gt;::Request </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">int32&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>timerID</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>int32&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>timeoutInfo</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>int32&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>cycles</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap><a class="el" href="classOsclTimerObserver.html">OsclTimerObserver</a> *&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>obs</em> = 0, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>bool&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>recurring</em> = 0</td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Request a timer<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>timerID</em>&nbsp;</td><td>
used to identify the timer for cancellation. This value will be returned as part of the timeout event. </td></tr>
<tr><td valign=top><em>timeoutInfo</em>&nbsp;</td><td>
for user info. Returned to the observer on a timeout event </td></tr>
<tr><td valign=top><em>cycles</em>&nbsp;</td><td>
the number of cycles to wait before a timeout event. If the timer frequency is 1 and the cycles are set to 2, then the timeout event will occur in 2 seconds. </td></tr>
<tr><td valign=top><em>obs</em>&nbsp;</td><td>
a local observer object to be called on a timeout event. This observer overides the global observer if set. </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="a4" doxytag="OsclTimer::SetExactFrequency"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template&lt;class Alloc&gt; </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void OsclTimer&lt; Alloc &gt;::SetExactFrequency </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">uint32&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; <em>frequency</em> </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Set the exact frequency of the timer in microsecond.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>frequency</em>&nbsp;</td><td>
A value of 1 means the timer will cycle in one microsecond intervals, 1000 means millisecond intervals, etc. </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="a3" doxytag="OsclTimer::SetFrequency"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template&lt;class Alloc&gt; </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void OsclTimer&lt; Alloc &gt;::SetFrequency </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">uint32&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; <em>frequency</em> </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Set the frequency of the timer in cycles/second.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>frequency</em>&nbsp;</td><td>
A value of 1 means the timer will cycle in one second intervals, 1000 means millisecond intervals, etc. </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="a2" doxytag="OsclTimer::SetObserver"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template&lt;class Alloc&gt; </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void OsclTimer&lt; Alloc &gt;::SetObserver </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="classOsclTimerObserver.html">OsclTimerObserver</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; <em>obs</em> </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Set the global observer. Each timer can request a local observer, which if set overrides the global observer.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>obs</em>&nbsp;</td><td>
observer object. </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="b0" doxytag="OsclTimer::TimerBaseElapsed"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template&lt;class Alloc&gt; </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void OsclTimer&lt; Alloc &gt;::TimerBaseElapsed </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [protected, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
<p>
Implements <a class="el" href="classCallbackTimerObserver.html#a0">CallbackTimerObserver</a>. </td>
</tr>
</table>
<hr><h2>Friends And Related Function Documentation</h2>
<a name="l0" doxytag="OsclTimer::CallbackTimer< Alloc >"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template&lt;class Alloc&gt; </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> friend class <a class="el" href="classCallbackTimer.html">CallbackTimer</a>&lt; Alloc &gt;<code> [friend]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="oscl__timer_8h-source.html">oscl_timer.h</a></ul>
<hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
<address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
</small></address>
</body>
</html>