Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > f2adb5ed02e83f2c51981c1b15594e22 > files > 103

libnjb-devel-2.2.7-1.fc14.x86_64.rpm

<!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"/>
<title>libnjb: /builddir/build/BUILD/libnjb-2.2.7/src/njbtime.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">libnjb&#160;<span id="projectnumber">2.2.7</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="dir_55a6aa4feb4da29582c8781b5e808e47.html">src</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">njbtime.c File Reference</div>  </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;stdlib.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="libnjb_8h_source.html">libnjb.h</a>&quot;</code><br/>
<code>#include &quot;njbtime.h&quot;</code><br/>
<code>#include &quot;njb_error.h&quot;</code><br/>
<code>#include &quot;defs.h&quot;</code><br/>
<code>#include &quot;base.h&quot;</code><br/>
<code>#include &quot;byteorder.h&quot;</code><br/>
</div><table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structnjb__time__struct.html">njb_time_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="njbtime_8c.html#a1592d006e576ff1ccfeca9ff283773f6">time_unpack</a> (void *data)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structnjb__time__struct.html">njb_time_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="njbtime_8c.html#a21e911c8e262165cc6413330ce8e09cb">time_unpack3</a> (void *data)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="njbtime_8c.html#a4f7a29c170277b10b63863b19d5d70d3">time_pack</a> (<a class="el" href="structnjb__time__struct.html">njb_time_t</a> *time)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="njbtime_8c.html#aa63ac6fcb9203c1b22443cd28d51cba6">time_pack3</a> (<a class="el" href="structnjb__time__struct.html">njb_time_t</a> *time)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="njbtime_8c.html#a60db410c9e82d9e61b1bf0be607922ed">__sub_depth</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>This file deals with the time structures used by the internal clock of the devices. </p>
</div><hr/><h2>Function Documentation</h2>
<a class="anchor" id="a4f7a29c170277b10b63863b19d5d70d3"></a><!-- doxytag: member="njbtime.c::time_pack" ref="a4f7a29c170277b10b63863b19d5d70d3" args="(njb_time_t *time)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* time_pack </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structnjb__time__struct.html">njb_time_t</a> *&#160;</td>
          <td class="paramname"><em>time</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Packs a libnjb time structure to the raw format used by the NJB1</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">time</td><td>the libnjb time structure to pack </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a pointer to raw bytes representing the NJB1 time structure in a newly allocated byte array. The caller shall free this memory after use. </dd></dl>

<p>References <a class="el" href="structnjb__time__struct.html#af8099ff42d8ebd590e33f676fcc2e6b0">njb_time_struct::day</a>, <a class="el" href="byteorder_8c.html#a922262997ca997a6645fb232e7d6c162">from_16bit_to_njb1_bytes()</a>, <a class="el" href="structnjb__time__struct.html#a3d1df33f2b06d60440f746d9735d6f0d">njb_time_struct::hours</a>, <a class="el" href="structnjb__time__struct.html#aad6d440031c3816280d6584c9ae503eb">njb_time_struct::minutes</a>, <a class="el" href="structnjb__time__struct.html#ae41964a3348673cdd219b847f886bbf9">njb_time_struct::month</a>, <a class="el" href="structnjb__time__struct.html#acd35e31eeac27b23ba9e34b646ded27d">njb_time_struct::seconds</a>, <a class="el" href="structnjb__time__struct.html#a227a86206933473fc61798d4d5e37683">njb_time_struct::weekday</a>, and <a class="el" href="structnjb__time__struct.html#ace156e46767b197b844936654dffb739">njb_time_struct::year</a>.</p>

</div>
</div>
<a class="anchor" id="aa63ac6fcb9203c1b22443cd28d51cba6"></a><!-- doxytag: member="njbtime.c::time_pack3" ref="aa63ac6fcb9203c1b22443cd28d51cba6" args="(njb_time_t *time)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* time_pack3 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structnjb__time__struct.html">njb_time_t</a> *&#160;</td>
          <td class="paramname"><em>time</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Packs a libnjb time structure to the raw format used by the series 3 devices.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">time</td><td>the libnjb time structure to pack </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a pointer to raw bytes representing the series 3 time structure in a newly allocated byte array. The caller shall free this memory after use. </dd></dl>

<p>References <a class="el" href="structnjb__time__struct.html#af8099ff42d8ebd590e33f676fcc2e6b0">njb_time_struct::day</a>, <a class="el" href="structnjb__time__struct.html#a3d1df33f2b06d60440f746d9735d6f0d">njb_time_struct::hours</a>, <a class="el" href="structnjb__time__struct.html#aad6d440031c3816280d6584c9ae503eb">njb_time_struct::minutes</a>, <a class="el" href="structnjb__time__struct.html#ae41964a3348673cdd219b847f886bbf9">njb_time_struct::month</a>, <a class="el" href="structnjb__time__struct.html#acd35e31eeac27b23ba9e34b646ded27d">njb_time_struct::seconds</a>, <a class="el" href="structnjb__time__struct.html#a227a86206933473fc61798d4d5e37683">njb_time_struct::weekday</a>, and <a class="el" href="structnjb__time__struct.html#ace156e46767b197b844936654dffb739">njb_time_struct::year</a>.</p>

</div>
</div>
<a class="anchor" id="a1592d006e576ff1ccfeca9ff283773f6"></a><!-- doxytag: member="njbtime.c::time_unpack" ref="a1592d006e576ff1ccfeca9ff283773f6" args="(void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structnjb__time__struct.html">njb_time_t</a>* time_unpack </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Unpacks a raw NJB1 time structure into libnjb representation.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>raw memory representing a NJB1 timestamp </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a libnjb time structure </dd></dl>

<p>References <a class="el" href="structnjb__time__struct.html#af8099ff42d8ebd590e33f676fcc2e6b0">njb_time_struct::day</a>, <a class="el" href="structnjb__time__struct.html#a3d1df33f2b06d60440f746d9735d6f0d">njb_time_struct::hours</a>, <a class="el" href="structnjb__time__struct.html#aad6d440031c3816280d6584c9ae503eb">njb_time_struct::minutes</a>, <a class="el" href="structnjb__time__struct.html#ae41964a3348673cdd219b847f886bbf9">njb_time_struct::month</a>, <a class="el" href="byteorder_8c.html#a77340c095fa6b6b32bea9f4132fc4081">njb1_bytes_to_16bit()</a>, <a class="el" href="structnjb__time__struct.html#acd35e31eeac27b23ba9e34b646ded27d">njb_time_struct::seconds</a>, <a class="el" href="structnjb__time__struct.html#a227a86206933473fc61798d4d5e37683">njb_time_struct::weekday</a>, and <a class="el" href="structnjb__time__struct.html#ace156e46767b197b844936654dffb739">njb_time_struct::year</a>.</p>

</div>
</div>
<a class="anchor" id="a21e911c8e262165cc6413330ce8e09cb"></a><!-- doxytag: member="njbtime.c::time_unpack3" ref="a21e911c8e262165cc6413330ce8e09cb" args="(void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structnjb__time__struct.html">njb_time_t</a>* time_unpack3 </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Unpacks a raw series 3 time structure into libnjb representation.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>raw memory representing a series 3 timestamp </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a libnjb time structure </dd></dl>

<p>References <a class="el" href="structnjb__time__struct.html#af8099ff42d8ebd590e33f676fcc2e6b0">njb_time_struct::day</a>, <a class="el" href="structnjb__time__struct.html#a3d1df33f2b06d60440f746d9735d6f0d">njb_time_struct::hours</a>, <a class="el" href="structnjb__time__struct.html#aad6d440031c3816280d6584c9ae503eb">njb_time_struct::minutes</a>, <a class="el" href="structnjb__time__struct.html#ae41964a3348673cdd219b847f886bbf9">njb_time_struct::month</a>, <a class="el" href="structnjb__time__struct.html#acd35e31eeac27b23ba9e34b646ded27d">njb_time_struct::seconds</a>, <a class="el" href="structnjb__time__struct.html#a227a86206933473fc61798d4d5e37683">njb_time_struct::weekday</a>, and <a class="el" href="structnjb__time__struct.html#ace156e46767b197b844936654dffb739">njb_time_struct::year</a>.</p>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="a60db410c9e82d9e61b1bf0be607922ed"></a><!-- doxytag: member="njbtime.c::__sub_depth" ref="a60db410c9e82d9e61b1bf0be607922ed" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="usb__io_8c.html#a60db410c9e82d9e61b1bf0be607922ed">__sub_depth</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The current subroutine depth for all of libnjb (global) </p>

</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sat Jun 25 2011 for libnjb by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>