123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
- <meta http-equiv="X-UA-Compatible" content="IE=9"/>
- <meta name="generator" content="Doxygen 1.8.10"/>
- <title>CoffeePi: timer Class Reference</title>
- <link href="tabs.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript" src="dynsections.js"></script>
- <link href="search/search.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="search/searchdata.js"></script>
- <script type="text/javascript" src="search/search.js"></script>
- <script type="text/javascript">
- $(document).ready(function() { init_search(); });
- </script>
- <link href="doxygen.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
- <div id="titlearea">
- <table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
- <td id="projectalign" style="padding-left: 0.5em;">
- <div id="projectname">CoffeePi
- </div>
- <div id="projectbrief">Coffee machine control for Raspberry Pi</div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.8.10 -->
- <script type="text/javascript">
- var searchBox = new SearchBox("searchBox", "search",false,'Search');
- </script>
- <div id="navrow1" class="tabs">
- <ul class="tablist">
- <li><a href="index.html"><span>Main Page</span></a></li>
- <li class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
- <li><a href="files.html"><span>Files</span></a></li>
- <li>
- <div id="MSearchBox" class="MSearchBoxInactive">
- <span class="left">
- <img id="MSearchSelect" src="search/mag_sel.png"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- alt=""/>
- <input type="text" id="MSearchField" value="Search" accesskey="S"
- onfocus="searchBox.OnSearchFieldFocus(true)"
- onblur="searchBox.OnSearchFieldFocus(false)"
- onkeyup="searchBox.OnSearchFieldChange(event)"/>
- </span><span class="right">
- <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
- </span>
- </div>
- </li>
- </ul>
- </div>
- <div id="navrow2" class="tabs2">
- <ul class="tablist">
- <li><a href="annotated.html"><span>Data Structures</span></a></li>
- <li><a href="classes.html"><span>Data Structure Index</span></a></li>
- <li><a href="functions.html"><span>Data Fields</span></a></li>
- </ul>
- </div>
- <!-- window showing the filter options -->
- <div id="MSearchSelectWindow"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- onkeydown="return searchBox.OnSearchSelectKey(event)">
- </div>
- <!-- iframe showing the search results (closed by default) -->
- <div id="MSearchResultsWindow">
- <iframe src="javascript:void(0)" frameborder="0"
- name="MSearchResults" id="MSearchResults">
- </iframe>
- </div>
- </div><!-- top -->
- <div class="header">
- <div class="summary">
- <a href="#pub-methods">Public Member Functions</a> |
- <a href="#pub-attribs">Data Fields</a> </div>
- <div class="headertitle">
- <div class="title">timer Class Reference</div> </div>
- </div><!--header-->
- <div class="contents">
- <p>Timer Class This class allows the creation of multiple timers that are based by a divider on a single system timer.
- <a href="classtimer.html#details">More...</a></p>
- <p><code>#include <<a class="el" href="timer_8h_source.html">timer.h</a>></code></p>
- <table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
- Public Member Functions</h2></td></tr>
- <tr class="memitem:a863dd9a194499a5ebbaf6937969916f2"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtimer.html#a863dd9a194499a5ebbaf6937969916f2">timer</a> (void(*handler)(void))</td></tr>
- <tr class="memdesc:a863dd9a194499a5ebbaf6937969916f2"><td class="mdescLeft"> </td><td class="mdescRight">Timer constructor Depending on the call of the constructor the handler will be called as thread or not. <a href="#a863dd9a194499a5ebbaf6937969916f2">More...</a><br /></td></tr>
- <tr class="separator:a863dd9a194499a5ebbaf6937969916f2"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a36730b19460d9576fe6d7535f969105a"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtimer.html#a36730b19460d9576fe6d7535f969105a">timer</a> (void *(*handler)(void *))</td></tr>
- <tr class="separator:a36730b19460d9576fe6d7535f969105a"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a0a4b48605728320ce7a5a825e34e16f2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtimer.html#a0a4b48605728320ce7a5a825e34e16f2">setDivider</a> (int divider)</td></tr>
- <tr class="memdesc:a0a4b48605728320ce7a5a825e34e16f2"><td class="mdescLeft"> </td><td class="mdescRight">sets the divider for this timer (based on system timer) <a href="#a0a4b48605728320ce7a5a825e34e16f2">More...</a><br /></td></tr>
- <tr class="separator:a0a4b48605728320ce7a5a825e34e16f2"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a3d5386a682a23df5c6a841ce8fc55bd4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classtimer.html#a3d5386a682a23df5c6a841ce8fc55bd4">getDivider</a> ()</td></tr>
- <tr class="memdesc:a3d5386a682a23df5c6a841ce8fc55bd4"><td class="mdescLeft"> </td><td class="mdescRight">reads the timer divider <a href="#a3d5386a682a23df5c6a841ce8fc55bd4">More...</a><br /></td></tr>
- <tr class="separator:a3d5386a682a23df5c6a841ce8fc55bd4"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a7d9f6d9f98d51534be127d57f497b345"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtimer.html#a7d9f6d9f98d51534be127d57f497b345">call</a> ()</td></tr>
- <tr class="memdesc:a7d9f6d9f98d51534be127d57f497b345"><td class="mdescLeft"> </td><td class="mdescRight">Calls the timer handler if enabled. <a href="#a7d9f6d9f98d51534be127d57f497b345">More...</a><br /></td></tr>
- <tr class="separator:a7d9f6d9f98d51534be127d57f497b345"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a9aa894a57748b2bdf3adce46f5736794"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtimer.html#a9aa894a57748b2bdf3adce46f5736794">start</a> ()</td></tr>
- <tr class="memdesc:a9aa894a57748b2bdf3adce46f5736794"><td class="mdescLeft"> </td><td class="mdescRight">enables the timer <a href="#a9aa894a57748b2bdf3adce46f5736794">More...</a><br /></td></tr>
- <tr class="separator:a9aa894a57748b2bdf3adce46f5736794"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a3218d61649e284071544b17c8c915ecc"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtimer.html#a3218d61649e284071544b17c8c915ecc">stop</a> ()</td></tr>
- <tr class="memdesc:a3218d61649e284071544b17c8c915ecc"><td class="mdescLeft"> </td><td class="mdescRight">disables the timer <a href="#a3218d61649e284071544b17c8c915ecc">More...</a><br /></td></tr>
- <tr class="separator:a3218d61649e284071544b17c8c915ecc"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:abbb117c0ae32aa48df5df60328e224f9"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classtimer.html#abbb117c0ae32aa48df5df60328e224f9">isActive</a> ()</td></tr>
- <tr class="memdesc:abbb117c0ae32aa48df5df60328e224f9"><td class="mdescLeft"> </td><td class="mdescRight">Returns the timers active state. <a href="#abbb117c0ae32aa48df5df60328e224f9">More...</a><br /></td></tr>
- <tr class="separator:abbb117c0ae32aa48df5df60328e224f9"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
- Data Fields</h2></td></tr>
- <tr class="memitem:a296c5e65582e19eaf61ae0bffa4071dc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classtimer.html">timer</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtimer.html#a296c5e65582e19eaf61ae0bffa4071dc">next</a></td></tr>
- <tr class="memdesc:a296c5e65582e19eaf61ae0bffa4071dc"><td class="mdescLeft"> </td><td class="mdescRight">contains the pointer on the next timer element of the list <a href="#a296c5e65582e19eaf61ae0bffa4071dc">More...</a><br /></td></tr>
- <tr class="separator:a296c5e65582e19eaf61ae0bffa4071dc"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
- <div class="textblock"><p>Timer Class This class allows the creation of multiple timers that are based by a divider on a single system timer. </p>
- </div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
- <a class="anchor" id="a863dd9a194499a5ebbaf6937969916f2"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">timer::timer </td>
- <td>(</td>
- <td class="paramtype">void(*)(void) </td>
- <td class="paramname"><em>handler</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Timer constructor Depending on the call of the constructor the handler will be called as thread or not. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">*handler</td><td>target pointer to the method </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a class="anchor" id="a36730b19460d9576fe6d7535f969105a"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">timer::timer </td>
- <td>(</td>
- <td class="paramtype">void *(*)(void *) </td>
- <td class="paramname"><em>handler</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- </div>
- </div>
- <h2 class="groupheader">Member Function Documentation</h2>
- <a class="anchor" id="a7d9f6d9f98d51534be127d57f497b345"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void timer::call </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Calls the timer handler if enabled. </p>
- </div>
- </div>
- <a class="anchor" id="a3d5386a682a23df5c6a841ce8fc55bd4"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int timer::getDivider </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>reads the timer divider </p>
- <dl class="section return"><dt>Returns</dt><dd>timer divider </dd></dl>
- </div>
- </div>
- <a class="anchor" id="abbb117c0ae32aa48df5df60328e224f9"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">bool timer::isActive </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Returns the timers active state. </p>
- <dl class="section return"><dt>Returns</dt><dd>true if active </dd></dl>
- </div>
- </div>
- <a class="anchor" id="a0a4b48605728320ce7a5a825e34e16f2"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void timer::setDivider </td>
- <td>(</td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>divider</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>sets the divider for this timer (based on system timer) </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">divider</td><td>integer timer divider </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a class="anchor" id="a9aa894a57748b2bdf3adce46f5736794"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void timer::start </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>enables the timer </p>
- </div>
- </div>
- <a class="anchor" id="a3218d61649e284071544b17c8c915ecc"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void timer::stop </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>disables the timer </p>
- </div>
- </div>
- <h2 class="groupheader">Field Documentation</h2>
- <a class="anchor" id="a296c5e65582e19eaf61ae0bffa4071dc"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classtimer.html">timer</a>* timer::next</td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>contains the pointer on the next timer element of the list </p>
- </div>
- </div>
- <hr/>The documentation for this class was generated from the following files:<ul>
- <li><a class="el" href="timer_8h_source.html">timer.h</a></li>
- <li><a class="el" href="timer_8cpp.html">timer.cpp</a></li>
- </ul>
- </div><!-- contents -->
- <!-- start footer part -->
- <hr class="footer"/><address class="footer"><small>
- Generated by  <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/>
- </a> 1.8.10
- </small></address>
- </body>
- </html>
|