123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280 |
- <!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.cpp File 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><a href="annotated.html"><span>Data Structures</span></a></li>
- <li class="current"><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="files.html"><span>File List</span></a></li>
- <li><a href="globals.html"><span>Globals</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="#func-members">Functions</a> |
- <a href="#var-members">Variables</a> </div>
- <div class="headertitle">
- <div class="title">timer.cpp File Reference</div> </div>
- </div><!--header-->
- <div class="contents">
- <div class="textblock"><code>#include <csignal></code><br />
- <code>#include <stdio.h></code><br />
- <code>#include <stdlib.h></code><br />
- <code>#include <string.h></code><br />
- <code>#include <time.h></code><br />
- <code>#include <pthread.h></code><br />
- <code>#include <errno.h></code><br />
- <code>#include "<a class="el" href="global_8h_source.html">global.h</a>"</code><br />
- <code>#include "<a class="el" href="timer_8h_source.html">timer.h</a>"</code><br />
- <code>#include "<a class="el" href="logger_8h_source.html">logger.h</a>"</code><br />
- </div><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
- Functions</h2></td></tr>
- <tr class="memitem:a69a9ecb245422cbf03f28336a3cde462"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8cpp.html#a69a9ecb245422cbf03f28336a3cde462">timer_handler</a> (int sig, siginfo_t *si, void *uc)</td></tr>
- <tr class="memdesc:a69a9ecb245422cbf03f28336a3cde462"><td class="mdescLeft"> </td><td class="mdescRight">this method is called by the system timer and handles the other timers <a href="#a69a9ecb245422cbf03f28336a3cde462">More...</a><br /></td></tr>
- <tr class="separator:a69a9ecb245422cbf03f28336a3cde462"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a9e737e3249388fb2e50d868bad69c688"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8cpp.html#a9e737e3249388fb2e50d868bad69c688">initTimers</a> (void)</td></tr>
- <tr class="memdesc:a9e737e3249388fb2e50d868bad69c688"><td class="mdescLeft"> </td><td class="mdescRight">inits the system timer based on signals <a href="#a9e737e3249388fb2e50d868bad69c688">More...</a><br /></td></tr>
- <tr class="separator:a9e737e3249388fb2e50d868bad69c688"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a43ed436d8c1803ced3029a909320a841"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8cpp.html#a43ed436d8c1803ced3029a909320a841">stopTimers</a> (void)</td></tr>
- <tr class="memdesc:a43ed436d8c1803ced3029a909320a841"><td class="mdescLeft"> </td><td class="mdescRight">Stops all existing timers. <a href="#a43ed436d8c1803ced3029a909320a841">More...</a><br /></td></tr>
- <tr class="separator:a43ed436d8c1803ced3029a909320a841"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ae9859727c0e51a70b4ff5f47d2527a77"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8cpp.html#ae9859727c0e51a70b4ff5f47d2527a77">nullThread</a> (void *threadid)</td></tr>
- <tr class="memdesc:ae9859727c0e51a70b4ff5f47d2527a77"><td class="mdescLeft"> </td><td class="mdescRight">This is a dummy thread. <a href="#ae9859727c0e51a70b4ff5f47d2527a77">More...</a><br /></td></tr>
- <tr class="separator:ae9859727c0e51a70b4ff5f47d2527a77"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
- Variables</h2></td></tr>
- <tr class="memitem:a617a47c70795bcff659815ad0efd2266"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8cpp.html#a617a47c70795bcff659815ad0efd2266">counter</a> = 0</td></tr>
- <tr class="separator:a617a47c70795bcff659815ad0efd2266"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a0f94d5829b547df53531ff4c3ec325c0"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8cpp.html#a0f94d5829b547df53531ff4c3ec325c0">timercnt</a> = 10</td></tr>
- <tr class="separator:a0f94d5829b547df53531ff4c3ec325c0"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:acb6f6b56b317d16d17fd2f6df17547c3"><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="timer_8cpp.html#acb6f6b56b317d16d17fd2f6df17547c3">firstTimer</a> = NULL</td></tr>
- <tr class="separator:acb6f6b56b317d16d17fd2f6df17547c3"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a16ed619aa4eb3fda56a001d0d7a8975d"><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="timer_8cpp.html#a16ed619aa4eb3fda56a001d0d7a8975d">lastTimer</a> = NULL</td></tr>
- <tr class="separator:a16ed619aa4eb3fda56a001d0d7a8975d"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <h2 class="groupheader">Function Documentation</h2>
- <a class="anchor" id="a9e737e3249388fb2e50d868bad69c688"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void initTimers </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>inits the system timer based on signals </p>
- </div>
- </div>
- <a class="anchor" id="ae9859727c0e51a70b4ff5f47d2527a77"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void* nullThread </td>
- <td>(</td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>threadid</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>This is a dummy thread. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">*threadid</td><td>Thread ID </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a class="anchor" id="a43ed436d8c1803ced3029a909320a841"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void stopTimers </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Stops all existing timers. </p>
- </div>
- </div>
- <a class="anchor" id="a69a9ecb245422cbf03f28336a3cde462"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void timer_handler </td>
- <td>(</td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>sig</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">siginfo_t * </td>
- <td class="paramname"><em>si</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>uc</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>this method is called by the system timer and handles the other timers </p>
- </div>
- </div>
- <h2 class="groupheader">Variable Documentation</h2>
- <a class="anchor" id="a617a47c70795bcff659815ad0efd2266"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int counter = 0</td>
- </tr>
- </table>
- </div><div class="memdoc">
- </div>
- </div>
- <a class="anchor" id="acb6f6b56b317d16d17fd2f6df17547c3"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classtimer.html">timer</a>* firstTimer = NULL</td>
- </tr>
- </table>
- </div><div class="memdoc">
- </div>
- </div>
- <a class="anchor" id="a16ed619aa4eb3fda56a001d0d7a8975d"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classtimer.html">timer</a>* lastTimer = NULL</td>
- </tr>
- </table>
- </div><div class="memdoc">
- </div>
- </div>
- <a class="anchor" id="a0f94d5829b547df53531ff4c3ec325c0"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int timercnt = 10</td>
- </tr>
- </table>
- </div><div class="memdoc">
- </div>
- </div>
- </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>
|