1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> 3 <title> TemplateOsclTimer< Alloc > class Reference</title> 4 <link href="doxygen.css" rel="stylesheet" type="text/css"> 5 </head><body> 6 <!-- Generated by Doxygen 1.2.18 --> 7 <center> 8 <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> </center> 9 <hr><h1>OsclTimer< Alloc > Class Template Reference</h1><code>#include <<a class="el" href="oscl__timer_8h-source.html">oscl_timer.h</a>></code> 10 <p> 11 <p>Inheritance diagram for OsclTimer< Alloc >: 12 <p><center><img src="classOsclTimer.png" usemap="#OsclTimer< Alloc >_map" border="0" alt=""></center> 13 <map name="OsclTimer< Alloc >_map"> 14 <area href="classCallbackTimerObserver.html" alt="CallbackTimerObserver" shape="rect" coords="0,0,146,24"> 15 </map> 16 <table border=0 cellpadding=0 cellspacing=0> 17 <tr><td></td></tr> 18 <tr><td colspan=2><br><h2>Public Types</h2></td></tr> 19 <tr><td nowrap align=right valign=top>typedef <a class="el" href="classCallbackTimer.html">CallbackTimer</a>< Alloc > </td><td valign=bottom><a class="el" href="classOsclTimer.html#s0">callback_timer_type</a></td></tr> 20 <tr><td colspan=2><br><h2>Public Methods</h2></td></tr> 21 <tr><td nowrap align=right valign=top> </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> 22 <tr><td nowrap align=right valign=top>virtual </td><td valign=bottom><a class="el" href="classOsclTimer.html#a1">~OsclTimer</a> ()</td></tr> 23 <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classOsclTimer.html#a2">SetObserver</a> (<a class="el" href="classOsclTimerObserver.html">OsclTimerObserver</a> *obs)</td></tr> 24 <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classOsclTimer.html#a3">SetFrequency</a> (uint32 frequency)</td></tr> 25 <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classOsclTimer.html#a4">SetExactFrequency</a> (uint32 frequency)</td></tr> 26 <tr><td nowrap align=right valign=top>void </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> 27 <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classOsclTimer.html#a6">Cancel</a> (int32 timerID, int32 timeoutInfo=-1)</td></tr> 28 <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classOsclTimer.html#a7">Clear</a> ()</td></tr> 29 <tr><td colspan=2><br><h2>Protected Methods</h2></td></tr> 30 <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classOsclTimer.html#b0">TimerBaseElapsed</a> ()</td></tr> 31 <tr><td colspan=2><br><h2>Friends</h2></td></tr> 32 <tr><td nowrap align=right valign=top>class </td><td valign=bottom><a class="el" href="classOsclTimer.html#l0">CallbackTimer< Alloc ></a></td></tr> 33 </table> 34 <h3>template<class Alloc><br> 35 class OsclTimer< Alloc ></h3> 36 37 <hr><h2>Member Typedef Documentation</h2> 38 <a name="s0" doxytag="OsclTimer::callback_timer_type"></a><p> 39 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 40 <tr> 41 <td class="md"> 42 <table cellpadding="0" cellspacing="0" border="0"> 43 <tr> 44 <td class="md" colspan="4"> 45 template<class Alloc> </td> 46 </tr> 47 <tr> 48 <td class="md" nowrap valign="top"> typedef <a class="el" href="classCallbackTimer.html">CallbackTimer</a><Alloc> OsclTimer< Alloc >::callback_timer_type 49 </table> 50 </td> 51 </tr> 52 </table> 53 <table cellspacing=5 cellpadding=0 border=0> 54 <tr> 55 <td> 56 57 </td> 58 <td> 59 60 <p> 61 </td> 62 </tr> 63 </table> 64 <hr><h2>Constructor & Destructor Documentation</h2> 65 <a name="a0" doxytag="OsclTimer::OsclTimer"></a><p> 66 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 67 <tr> 68 <td class="md"> 69 <table cellpadding="0" cellspacing="0" border="0"> 70 <tr> 71 <td class="md" colspan="4"> 72 template<class Alloc> </td> 73 </tr> 74 <tr> 75 <td class="md" nowrap valign="top"> OsclTimer< Alloc >::OsclTimer </td> 76 <td class="md" valign="top">( </td> 77 <td class="md" nowrap valign="top">const char * </td> 78 <td class="mdname" nowrap> <em>name</em>, </td> 79 </tr> 80 <tr> 81 <td></td> 82 <td></td> 83 <td class="md" nowrap>uint32 </td> 84 <td class="mdname" nowrap> <em>frequency</em> = 1, </td> 85 </tr> 86 <tr> 87 <td></td> 88 <td></td> 89 <td class="md" nowrap>int32 </td> 90 <td class="mdname" nowrap> <em>priority</em> = OsclActiveObject::EPriorityNominal</td> 91 </tr> 92 <tr> 93 <td></td> 94 <td class="md">) </td> 95 <td class="md" colspan="2"></td> 96 </tr> 97 98 </table> 99 </td> 100 </tr> 101 </table> 102 <table cellspacing=5 cellpadding=0 border=0> 103 <tr> 104 <td> 105 106 </td> 107 <td> 108 109 <p> 110 Constructor<dl compact><dt><b>Parameters: </b></dt><dd> 111 <table border=0 cellspacing=2 cellpadding=0> 112 <tr><td valign=top><em>frequency</em> </td><td> 113 The frequency of the timer in cycles/second. A value of 1 means the timer will cycle in 1 second intervals. </td></tr> 114 </table> 115 </dl> </td> 116 </tr> 117 </table> 118 <a name="a1" doxytag="OsclTimer::~OsclTimer"></a><p> 119 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 120 <tr> 121 <td class="md"> 122 <table cellpadding="0" cellspacing="0" border="0"> 123 <tr> 124 <td class="md" colspan="4"> 125 template<class Alloc> </td> 126 </tr> 127 <tr> 128 <td class="md" nowrap valign="top"> OsclTimer< Alloc >::~OsclTimer </td> 129 <td class="md" valign="top">( </td> 130 <td class="mdname1" valign="top" nowrap> </td> 131 <td class="md" valign="top">) </td> 132 <td class="md" nowrap><code> [virtual]</code></td> 133 </tr> 134 135 </table> 136 </td> 137 </tr> 138 </table> 139 <table cellspacing=5 cellpadding=0 border=0> 140 <tr> 141 <td> 142 143 </td> 144 <td> 145 146 <p> 147 </td> 148 </tr> 149 </table> 150 <hr><h2>Member Function Documentation</h2> 151 <a name="a6" doxytag="OsclTimer::Cancel"></a><p> 152 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 153 <tr> 154 <td class="md"> 155 <table cellpadding="0" cellspacing="0" border="0"> 156 <tr> 157 <td class="md" colspan="4"> 158 template<class Alloc> </td> 159 </tr> 160 <tr> 161 <td class="md" nowrap valign="top"> void OsclTimer< Alloc >::Cancel </td> 162 <td class="md" valign="top">( </td> 163 <td class="md" nowrap valign="top">int32 </td> 164 <td class="mdname" nowrap> <em>timerID</em>, </td> 165 </tr> 166 <tr> 167 <td></td> 168 <td></td> 169 <td class="md" nowrap>int32 </td> 170 <td class="mdname" nowrap> <em>timeoutInfo</em> = -1</td> 171 </tr> 172 <tr> 173 <td></td> 174 <td class="md">) </td> 175 <td class="md" colspan="2"></td> 176 </tr> 177 178 </table> 179 </td> 180 </tr> 181 </table> 182 <table cellspacing=5 cellpadding=0 border=0> 183 <tr> 184 <td> 185 186 </td> 187 <td> 188 189 <p> 190 Cancel a timer<dl compact><dt><b>Parameters: </b></dt><dd> 191 <table border=0 cellspacing=2 cellpadding=0> 192 <tr><td valign=top><em>timerID</em> </td><td> 193 used to identify the timer to cancel. </td></tr> 194 <tr><td valign=top><em>timeoutInfo</em> </td><td> 195 if not set to -1, this value will be used as additional matching criteria to cancel a timer. </td></tr> 196 </table> 197 </dl> </td> 198 </tr> 199 </table> 200 <a name="a7" doxytag="OsclTimer::Clear"></a><p> 201 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 202 <tr> 203 <td class="md"> 204 <table cellpadding="0" cellspacing="0" border="0"> 205 <tr> 206 <td class="md" colspan="4"> 207 template<class Alloc> </td> 208 </tr> 209 <tr> 210 <td class="md" nowrap valign="top"> void OsclTimer< Alloc >::Clear </td> 211 <td class="md" valign="top">( </td> 212 <td class="mdname1" valign="top" nowrap> </td> 213 <td class="md" valign="top">) </td> 214 <td class="md" nowrap></td> 215 </tr> 216 217 </table> 218 </td> 219 </tr> 220 </table> 221 <table cellspacing=5 cellpadding=0 border=0> 222 <tr> 223 <td> 224 225 </td> 226 <td> 227 228 <p> 229 Cancel all pending timers. </td> 230 </tr> 231 </table> 232 <a name="a5" doxytag="OsclTimer::Request"></a><p> 233 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 234 <tr> 235 <td class="md"> 236 <table cellpadding="0" cellspacing="0" border="0"> 237 <tr> 238 <td class="md" colspan="4"> 239 template<class Alloc> </td> 240 </tr> 241 <tr> 242 <td class="md" nowrap valign="top"> void OsclTimer< Alloc >::Request </td> 243 <td class="md" valign="top">( </td> 244 <td class="md" nowrap valign="top">int32 </td> 245 <td class="mdname" nowrap> <em>timerID</em>, </td> 246 </tr> 247 <tr> 248 <td></td> 249 <td></td> 250 <td class="md" nowrap>int32 </td> 251 <td class="mdname" nowrap> <em>timeoutInfo</em>, </td> 252 </tr> 253 <tr> 254 <td></td> 255 <td></td> 256 <td class="md" nowrap>int32 </td> 257 <td class="mdname" nowrap> <em>cycles</em>, </td> 258 </tr> 259 <tr> 260 <td></td> 261 <td></td> 262 <td class="md" nowrap><a class="el" href="classOsclTimerObserver.html">OsclTimerObserver</a> * </td> 263 <td class="mdname" nowrap> <em>obs</em> = 0, </td> 264 </tr> 265 <tr> 266 <td></td> 267 <td></td> 268 <td class="md" nowrap>bool </td> 269 <td class="mdname" nowrap> <em>recurring</em> = 0</td> 270 </tr> 271 <tr> 272 <td></td> 273 <td class="md">) </td> 274 <td class="md" colspan="2"></td> 275 </tr> 276 277 </table> 278 </td> 279 </tr> 280 </table> 281 <table cellspacing=5 cellpadding=0 border=0> 282 <tr> 283 <td> 284 285 </td> 286 <td> 287 288 <p> 289 Request a timer<dl compact><dt><b>Parameters: </b></dt><dd> 290 <table border=0 cellspacing=2 cellpadding=0> 291 <tr><td valign=top><em>timerID</em> </td><td> 292 used to identify the timer for cancellation. This value will be returned as part of the timeout event. </td></tr> 293 <tr><td valign=top><em>timeoutInfo</em> </td><td> 294 for user info. Returned to the observer on a timeout event </td></tr> 295 <tr><td valign=top><em>cycles</em> </td><td> 296 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> 297 <tr><td valign=top><em>obs</em> </td><td> 298 a local observer object to be called on a timeout event. This observer overides the global observer if set. </td></tr> 299 </table> 300 </dl> </td> 301 </tr> 302 </table> 303 <a name="a4" doxytag="OsclTimer::SetExactFrequency"></a><p> 304 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 305 <tr> 306 <td class="md"> 307 <table cellpadding="0" cellspacing="0" border="0"> 308 <tr> 309 <td class="md" colspan="4"> 310 template<class Alloc> </td> 311 </tr> 312 <tr> 313 <td class="md" nowrap valign="top"> void OsclTimer< Alloc >::SetExactFrequency </td> 314 <td class="md" valign="top">( </td> 315 <td class="md" nowrap valign="top">uint32 </td> 316 <td class="mdname1" valign="top" nowrap> <em>frequency</em> </td> 317 <td class="md" valign="top">) </td> 318 <td class="md" nowrap></td> 319 </tr> 320 321 </table> 322 </td> 323 </tr> 324 </table> 325 <table cellspacing=5 cellpadding=0 border=0> 326 <tr> 327 <td> 328 329 </td> 330 <td> 331 332 <p> 333 Set the exact frequency of the timer in microsecond.<dl compact><dt><b>Parameters: </b></dt><dd> 334 <table border=0 cellspacing=2 cellpadding=0> 335 <tr><td valign=top><em>frequency</em> </td><td> 336 A value of 1 means the timer will cycle in one microsecond intervals, 1000 means millisecond intervals, etc. </td></tr> 337 </table> 338 </dl> </td> 339 </tr> 340 </table> 341 <a name="a3" doxytag="OsclTimer::SetFrequency"></a><p> 342 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 343 <tr> 344 <td class="md"> 345 <table cellpadding="0" cellspacing="0" border="0"> 346 <tr> 347 <td class="md" colspan="4"> 348 template<class Alloc> </td> 349 </tr> 350 <tr> 351 <td class="md" nowrap valign="top"> void OsclTimer< Alloc >::SetFrequency </td> 352 <td class="md" valign="top">( </td> 353 <td class="md" nowrap valign="top">uint32 </td> 354 <td class="mdname1" valign="top" nowrap> <em>frequency</em> </td> 355 <td class="md" valign="top">) </td> 356 <td class="md" nowrap></td> 357 </tr> 358 359 </table> 360 </td> 361 </tr> 362 </table> 363 <table cellspacing=5 cellpadding=0 border=0> 364 <tr> 365 <td> 366 367 </td> 368 <td> 369 370 <p> 371 Set the frequency of the timer in cycles/second.<dl compact><dt><b>Parameters: </b></dt><dd> 372 <table border=0 cellspacing=2 cellpadding=0> 373 <tr><td valign=top><em>frequency</em> </td><td> 374 A value of 1 means the timer will cycle in one second intervals, 1000 means millisecond intervals, etc. </td></tr> 375 </table> 376 </dl> </td> 377 </tr> 378 </table> 379 <a name="a2" doxytag="OsclTimer::SetObserver"></a><p> 380 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 381 <tr> 382 <td class="md"> 383 <table cellpadding="0" cellspacing="0" border="0"> 384 <tr> 385 <td class="md" colspan="4"> 386 template<class Alloc> </td> 387 </tr> 388 <tr> 389 <td class="md" nowrap valign="top"> void OsclTimer< Alloc >::SetObserver </td> 390 <td class="md" valign="top">( </td> 391 <td class="md" nowrap valign="top"><a class="el" href="classOsclTimerObserver.html">OsclTimerObserver</a> * </td> 392 <td class="mdname1" valign="top" nowrap> <em>obs</em> </td> 393 <td class="md" valign="top">) </td> 394 <td class="md" nowrap><code> [inline]</code></td> 395 </tr> 396 397 </table> 398 </td> 399 </tr> 400 </table> 401 <table cellspacing=5 cellpadding=0 border=0> 402 <tr> 403 <td> 404 405 </td> 406 <td> 407 408 <p> 409 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> 410 <table border=0 cellspacing=2 cellpadding=0> 411 <tr><td valign=top><em>obs</em> </td><td> 412 observer object. </td></tr> 413 </table> 414 </dl> </td> 415 </tr> 416 </table> 417 <a name="b0" doxytag="OsclTimer::TimerBaseElapsed"></a><p> 418 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 419 <tr> 420 <td class="md"> 421 <table cellpadding="0" cellspacing="0" border="0"> 422 <tr> 423 <td class="md" colspan="4"> 424 template<class Alloc> </td> 425 </tr> 426 <tr> 427 <td class="md" nowrap valign="top"> void OsclTimer< Alloc >::TimerBaseElapsed </td> 428 <td class="md" valign="top">( </td> 429 <td class="mdname1" valign="top" nowrap> </td> 430 <td class="md" valign="top">) </td> 431 <td class="md" nowrap><code> [protected, virtual]</code></td> 432 </tr> 433 434 </table> 435 </td> 436 </tr> 437 </table> 438 <table cellspacing=5 cellpadding=0 border=0> 439 <tr> 440 <td> 441 442 </td> 443 <td> 444 445 <p> 446 447 <p> 448 Implements <a class="el" href="classCallbackTimerObserver.html#a0">CallbackTimerObserver</a>. </td> 449 </tr> 450 </table> 451 <hr><h2>Friends And Related Function Documentation</h2> 452 <a name="l0" doxytag="OsclTimer::CallbackTimer< Alloc >"></a><p> 453 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 454 <tr> 455 <td class="md"> 456 <table cellpadding="0" cellspacing="0" border="0"> 457 <tr> 458 <td class="md" colspan="4"> 459 template<class Alloc> </td> 460 </tr> 461 <tr> 462 <td class="md" nowrap valign="top"> friend class <a class="el" href="classCallbackTimer.html">CallbackTimer</a>< Alloc ><code> [friend]</code> 463 </table> 464 </td> 465 </tr> 466 </table> 467 <table cellspacing=5 cellpadding=0 border=0> 468 <tr> 469 <td> 470 471 </td> 472 <td> 473 474 <p> 475 </td> 476 </tr> 477 </table> 478 <hr>The documentation for this class was generated from the following file:<ul> 479 <li><a class="el" href="oscl__timer_8h-source.html">oscl_timer.h</a></ul> 480 <hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small> 481 <address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small> 482 </small></address> 483 </body> 484 </html> 485