<!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>File Index</title>
    <link href="doxygen.css" rel="stylesheet" type="text/css">
  </head>
  <body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>dmxstat.h File Reference</h1>
<p><a href="dmxstat_8h_source.html">Go to the source code of this file.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="dmxstat_8h.html#ad38ec0be743fab83c032d231034d4d49">DMX_STAT_LENGTH</a>&nbsp;&nbsp;&nbsp;10</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="dmxstat_8h.html#a4cb43c9c7db58a10d8834a6b95a5c180">DMX_STAT_INTERVAL</a>&nbsp;&nbsp;&nbsp;1000</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="dmxstat_8h.html#aac0caef45e7427ea05d5425da659ac56">DMX_STAT_BINS</a>&nbsp;&nbsp;&nbsp;3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="dmxstat_8h.html#a8757af3ae82fef58d05e31523454065f">DMX_STAT_BIN0</a>&nbsp;&nbsp;&nbsp;10000</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="dmxstat_8h.html#a9c3e64f7fc0b5305bb6798b298ae6283">DMX_STAT_BINMULT</a>&nbsp;&nbsp;&nbsp;100</td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="dmxstat_8h.html#a3d01ce5487317c131c32e31f05489c58">dmxStatActivate</a> (const char *interval, const char *displays)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct__DMXStatInfo.html">DMXStatInfo</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="dmxstat_8h.html#a5637440dfb18ba8ccf47bde3037d93aa">dmxStatAlloc</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="dmxstat_8h.html#a33d0c28b9f5f129f4328a714f1da1db7">dmxStatFree</a> (<a class="el" href="struct__DMXStatInfo.html">DMXStatInfo</a> *)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="dmxstat_8h.html#a48ed41878576dd3ff9212deaecb2cc1f">dmxStatInit</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="dmxstat_8h.html#a1098a195e40df685aaf2fbc238884027">dmxStatSync</a> (<a class="el" href="struct__DMXScreenInfo.html">DMXScreenInfo</a> *dmxScreen, struct timeval *stop, struct timeval *start, unsigned long pending)</td></tr>
<tr><td colspan="2"><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="dmxstat_8h.html#abe67369da5135f53f058261d3c173927">dmxStatInterval</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Interface for statistic gathering interface. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="dmxstat_8c.html">dmxstat.c</a> </dd></dl>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a8757af3ae82fef58d05e31523454065f"></a><!-- doxytag: member="dmxstat.h::DMX_STAT_BIN0" ref="a8757af3ae82fef58d05e31523454065f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DMX_STAT_BIN0&nbsp;&nbsp;&nbsp;10000</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>us for bin[0] </p>

<p>Referenced by <a class="el" href="dmxstat_8c_source.html#l00139">dmxStatSync()</a>.</p>

</div>
</div>
<a class="anchor" id="a9c3e64f7fc0b5305bb6798b298ae6283"></a><!-- doxytag: member="dmxstat.h::DMX_STAT_BINMULT" ref="a9c3e64f7fc0b5305bb6798b298ae6283" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DMX_STAT_BINMULT&nbsp;&nbsp;&nbsp;100</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>multiplier for next bin[] </p>

<p>Referenced by <a class="el" href="dmxstat_8c_source.html#l00139">dmxStatSync()</a>.</p>

</div>
</div>
<a class="anchor" id="aac0caef45e7427ea05d5425da659ac56"></a><!-- doxytag: member="dmxstat.h::DMX_STAT_BINS" ref="aac0caef45e7427ea05d5425da659ac56" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DMX_STAT_BINS&nbsp;&nbsp;&nbsp;3</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>number of bins </p>

<p>Referenced by <a class="el" href="dmxstat_8c_source.html#l00163">dmxStatCallback()</a>, and <a class="el" href="dmxstat_8c_source.html#l00139">dmxStatSync()</a>.</p>

</div>
</div>
<a class="anchor" id="a4cb43c9c7db58a10d8834a6b95a5c180"></a><!-- doxytag: member="dmxstat.h::DMX_STAT_INTERVAL" ref="a4cb43c9c7db58a10d8834a6b95a5c180" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DMX_STAT_INTERVAL&nbsp;&nbsp;&nbsp;1000</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>msec between printouts </p>

<p>Referenced by <a class="el" href="dmxstat_8c_source.html#l00163">dmxStatCallback()</a>.</p>

</div>
</div>
<a class="anchor" id="ad38ec0be743fab83c032d231034d4d49"></a><!-- doxytag: member="dmxstat.h::DMX_STAT_LENGTH" ref="ad38ec0be743fab83c032d231034d4d49" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DMX_STAT_LENGTH&nbsp;&nbsp;&nbsp;10</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>number of events for moving average </p>

<p>Referenced by <a class="el" href="dmxstat_8c_source.html#l00128">dmxStatValue()</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a3d01ce5487317c131c32e31f05489c58"></a><!-- doxytag: member="dmxstat.h::dmxStatActivate" ref="a3d01ce5487317c131c32e31f05489c58" args="(const char *interval, const char *displays)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void dmxStatActivate </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>interval</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>displays</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Turn on XSync statistic gathering and printing. Print every <em>interval</em> seconds, with lines for the first <em>displays</em>. If <em>interval</em> is NULL, 1 will be used. If <em>displays</em> is NULL, 0 will be used (meaning a line for every display will be printed). Note that this function takes string arguments because it will usually be called from <a class="el" href="dmxinit_8c.html#a6ed0a235a6d852bfe0cc0250159a5daf">ddxProcessArgument</a> in <em><a class="el" href="dmxinit_8c.html">dmxinit.c</a></em>. </p>

<p>References <a class="el" href="dmxstat_8c_source.html#l00074">dmxStatDisplays</a>, and <a class="el" href="dmxstat_8c_source.html#l00073">dmxStatInterval</a>.</p>

<p>Referenced by <a class="el" href="dmxinit_8c_source.html#l00878">ddxProcessArgument()</a>.</p>

</div>
</div>
<a class="anchor" id="a5637440dfb18ba8ccf47bde3037d93aa"></a><!-- doxytag: member="dmxstat.h::dmxStatAlloc" ref="a5637440dfb18ba8ccf47bde3037d93aa" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct__DMXStatInfo.html">DMXStatInfo</a>* dmxStatAlloc </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Allocate a <em>DMXStatInfo</em> structure. </p>

<p>Referenced by <a class="el" href="dmxconfig_8c_source.html#l00176">dmxConfigAddDisplay()</a>.</p>

</div>
</div>
<a class="anchor" id="a33d0c28b9f5f129f4328a714f1da1db7"></a><!-- doxytag: member="dmxstat.h::dmxStatFree" ref="a33d0c28b9f5f129f4328a714f1da1db7" args="(DMXStatInfo *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void dmxStatFree </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct__DMXStatInfo.html">DMXStatInfo</a> *&nbsp;</td>
          <td class="paramname"> <em>pt</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Free the memory used by a <em>DMXStatInfo</em> structure. </p>

<p>Referenced by <a class="el" href="dmxinit_8c_source.html#l00561">InitOutput()</a>.</p>

</div>
</div>
<a class="anchor" id="a48ed41878576dd3ff9212deaecb2cc1f"></a><!-- doxytag: member="dmxstat.h::dmxStatInit" ref="a48ed41878576dd3ff9212deaecb2cc1f" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void dmxStatInit </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Try to initialize the statistic gathering and printing routines. Initialization only takes place if <a class="el" href="dmxstat_8h.html#a3d01ce5487317c131c32e31f05489c58">dmxStatActivate</a> has already been called. We don't need the same generation protection that we used in dmxSyncInit because our timer is always on a queue -- hence, server generation will always free it. </p>

<p>References <a class="el" href="dmxstat_8c_source.html#l00163">dmxStatCallback()</a>, <a class="el" href="dmxstat_8c_source.html#l00073">dmxStatInterval</a>, and <a class="el" href="dmxstat_8c_source.html#l00075">dmxStatTimer</a>.</p>

<p>Referenced by <a class="el" href="dmxinit_8c_source.html#l00561">InitOutput()</a>.</p>

</div>
</div>
<a class="anchor" id="a1098a195e40df685aaf2fbc238884027"></a><!-- doxytag: member="dmxstat.h::dmxStatSync" ref="a1098a195e40df685aaf2fbc238884027" args="(DMXScreenInfo *dmxScreen, struct timeval *stop, struct timeval *start, unsigned long pending)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void dmxStatSync </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct__DMXScreenInfo.html">DMXScreenInfo</a> *&nbsp;</td>
          <td class="paramname"> <em>dmxScreen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct timeval *&nbsp;</td>
          <td class="paramname"> <em>stop</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct timeval *&nbsp;</td>
          <td class="paramname"> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&nbsp;</td>
          <td class="paramname"> <em>pending</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Note that a XSync() was just done on <em>dmxScreen</em> with the <em>start</em> and <em>stop</em> times (from gettimeofday()) and the number of pending-but-not-yet-processed XSync requests. This routine is called from <a class="el" href="dmxsync_8c.html#a3f47aabdd830525720f7a01acbac91ef">dmxDoSync</a> in <em><a class="el" href="dmxsync_8c.html">dmxsync.c</a></em> </p>

<p>References <a class="el" href="dmxstat_8c_source.html#l00069">_DMXStatInfo::bins</a>, <a class="el" href="dmxstat_8h_source.html#l00043">DMX_STAT_BIN0</a>, <a class="el" href="dmxstat_8h_source.html#l00044">DMX_STAT_BINMULT</a>, <a class="el" href="dmxstat_8h_source.html#l00042">DMX_STAT_BINS</a>, <a class="el" href="dmxstat_8c_source.html#l00128">dmxStatValue()</a>, <a class="el" href="dmxstat_8c_source.html#l00067">_DMXStatInfo::pending</a>, <a class="el" href="dmx_8h_source.html#l00182">_DMXScreenInfo::stat</a>, <a class="el" href="dmxstat_8c_source.html#l00063">_DMXStatInfo::syncCount</a>, <a class="el" href="dmxstat_8c_source.html#l00066">_DMXStatInfo::usec</a>, and <a class="el" href="dmxstat_8c_source.html#l00079">usec()</a>.</p>

<p>Referenced by <a class="el" href="dmxsync_8c_source.html#l00063">dmxDoSync()</a>.</p>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="abe67369da5135f53f058261d3c173927"></a><!-- doxytag: member="dmxstat.h::dmxStatInterval" ref="abe67369da5135f53f058261d3c173927" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="dmxstat_8h.html#abe67369da5135f53f058261d3c173927">dmxStatInterval</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Only for <a class="el" href="dmxstat_8c.html">dmxstat.c</a> and <a class="el" href="dmxsync_8c.html">dmxsync.c</a> </p>

<p>Referenced by <a class="el" href="dmxsync_8c_source.html#l00063">dmxDoSync()</a>, <a class="el" href="dmxstat_8c_source.html#l00106">dmxStatActivate()</a>, <a class="el" href="dmxstat_8c_source.html#l00163">dmxStatCallback()</a>, and <a class="el" href="dmxstat_8c_source.html#l00216">dmxStatInit()</a>.</p>

</div>
</div>
</div>
    <hr>
    <address>
      <small>
        Generated June 29, 2004 for <a
        href="http://dmx.sourceforge.net">Distributed Multihead X</a> by
        <a href="http://www.doxygen.org/index.html">doxygen</a>
        1.3.4.
      </small>
    </addres>
    </hr>
  </body>
</html>