<!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: The time manipulation API</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.3 --> <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 <span id="projectnumber">2.2.6</span></div> </td> </tr> </tbody> </table> </div> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li><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> <div class="header"> <div class="summary"> <a href="#func-members">Functions</a> </div> <div class="headertitle"> <h1>The time manipulation API</h1> </div> </div> <div class="contents"> <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> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__timeapi.html#gab81e4b0ec40afa88e68334d89ae3ba44">NJB_Get_Time</a> (<a class="el" href="structnjb__struct.html">njb_t</a> *njb)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__timeapi.html#ga257a1f0973dc7e3ed779eb55978de2a7">NJB_Set_Time</a> (<a class="el" href="structnjb__struct.html">njb_t</a> *njb, <a class="el" href="structnjb__time__struct.html">njb_time_t</a> *time)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__timeapi.html#gad520b434c17f481c42bf12f487e632ae">NJB_Destroy_Time</a> (<a class="el" href="structnjb__time__struct.html">njb_time_t</a> *time)</td></tr> </table> <hr/><h2>Function Documentation</h2> <a class="anchor" id="gad520b434c17f481c42bf12f487e632ae"></a><!-- doxytag: member="libnjb.h::NJB_Destroy_Time" ref="gad520b434c17f481c42bf12f487e632ae" args="(njb_time_t *time)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void NJB_Destroy_Time </td> <td>(</td> <td class="paramtype"><a class="el" href="structnjb__time__struct.html">njb_time_t</a> * </td> <td class="paramname"><em>time</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>This destroys a time stamp and frees up any memory used by it.</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">time</td><td>the time stamp to destroy. </td></tr> </table> </dd> </dl> <dl><dt><b>Examples: </b></dt><dd><a class="el" href="dumptime_8c-example.html#a16">dumptime.c</a>, and <a class="el" href="settime_8c-example.html#a17">settime.c</a>.</dd> </dl> </div> </div> <a class="anchor" id="gab81e4b0ec40afa88e68334d89ae3ba44"></a><!-- doxytag: member="libnjb.h::NJB_Get_Time" ref="gab81e4b0ec40afa88e68334d89ae3ba44" args="(njb_t *njb)" --> <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>* NJB_Get_Time </td> <td>(</td> <td class="paramtype"><a class="el" href="structnjb__struct.html">njb_t</a> * </td> <td class="paramname"><em>njb</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>This returns the current time stamp for the device.</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">njb</td><td>a pointer to the <code>njb_t</code> object to get the time from. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>a valid time stamp or NULL on failure. </dd></dl> <dl><dt><b>Examples: </b></dt><dd><a class="el" href="dumptime_8c-example.html#a8">dumptime.c</a>, and <a class="el" href="settime_8c-example.html#a15">settime.c</a>.</dd> </dl> <p>References <a class="el" href="structnjb__struct.html#a405f9cb824196553362aa8d4ad546c07">njb_struct::device_type</a>, and <a class="el" href="group__njbboxes.html#gad84011f40d11f1eae13f708cdc3c29fb">NJB_DEVICE_NJB1</a>.</p> </div> </div> <a class="anchor" id="ga257a1f0973dc7e3ed779eb55978de2a7"></a><!-- doxytag: member="libnjb.h::NJB_Set_Time" ref="ga257a1f0973dc7e3ed779eb55978de2a7" args="(njb_t *njb, njb_time_t *time)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int NJB_Set_Time </td> <td>(</td> <td class="paramtype"><a class="el" href="structnjb__struct.html">njb_t</a> * </td> <td class="paramname"><em>njb</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structnjb__time__struct.html">njb_time_t</a> * </td> <td class="paramname"><em>time</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>This sets the current time stamp for the device. (Sets the on-board clock.)</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">njb</td><td>a pointer to the <code>njb_t</code> object to set the timestamp on. </td></tr> <tr><td class="paramname">time</td><td>the new timestamp to use (time to set). </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>0 on success, -1 on failure. </dd></dl> <dl><dt><b>Examples: </b></dt><dd><a class="el" href="settime_8c-example.html#a16">settime.c</a>.</dd> </dl> <p>References <a class="el" href="structnjb__struct.html#a405f9cb824196553362aa8d4ad546c07">njb_struct::device_type</a>, <a class="el" href="group__njbboxes.html#gad84011f40d11f1eae13f708cdc3c29fb">NJB_DEVICE_NJB1</a>, and <a class="el" href="protocol_8c.html#ae5ea9fbb3859ec50540bcd9cf4a3f328">njb_verify_last_command()</a>.</p> </div> </div> </div> <hr class="footer"/><address class="footer"><small>Generated on Mon May 2 2011 06:05:24 for libnjb by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address> </body> </html>