Sophie

Sophie

distrib > Mandriva > 2007.0 > i586 > by-pkgid > ad1ba1135a9c9eeffc2e538163e00373 > files > 329

libCommonC++2_1.4-devel-1.4.1-1mdv2007.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>GNU CommonC++: ost::TTYStream Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.6 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li id="current"><a href="classes.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    <li><a href="examples.html"><span>Examples</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul></div>
<div class="nav">
<a class="el" href="namespaceost.html">ost</a>::<a class="el" href="classost_1_1_t_t_y_stream.html">TTYStream</a></div>
<h1>ost::TTYStream Class Reference</h1><!-- doxytag: class="ost::TTYStream" --><!-- doxytag: inherits="ost::Serial" -->TTY streams are used to represent serial connections that are fully "streamable" objects using C++ stream classes and friends.streamable tty serial I/O class.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="serial_8h-source.html">serial.h</a>&gt;</code>
<p>
<p>Inheritance diagram for ost::TTYStream:
<p><center><img src="classost_1_1_t_t_y_stream.png" usemap="#ost::TTYStream_map" border="0" alt=""></center>
<map name="ost::TTYStream_map">
<area href="classost_1_1_serial.html" alt="ost::Serial" shape="rect" coords="55,0,156,24">
<area href="classost_1_1_t_t_y_session.html" alt="ost::TTYSession" shape="rect" coords="0,112,101,136">
<area href="classost_1_1ttystream.html" alt="ost::ttystream" shape="rect" coords="111,112,212,136">
</map>
<a href="classost_1_1_t_t_y_stream-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_t_t_y_stream.html#8c9d3397e3250ede75a659103594befb">TTYStream</a> (const char *filename, <a class="el" href="thread_8h.html#f412159e5cef839836a5e7b19ee75d1c">timeout_t</a> to=0)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create and open a tty serial port.  <a href="#8c9d3397e3250ede75a659103594befb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_t_t_y_stream.html#f7367a91c7adc42f3d6d16f524e71aff">~TTYStream</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">End the tty stream and cleanup.  <a href="#f7367a91c7adc42f3d6d16f524e71aff"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_t_t_y_stream.html#10ec50ecf62fb6c5cda903389d96d127">setTimeout</a> (<a class="el" href="thread_8h.html#f412159e5cef839836a5e7b19ee75d1c">timeout_t</a> to)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the timeout control.  <a href="#10ec50ecf62fb6c5cda903389d96d127"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_t_t_y_stream.html#056469a50ef74e0885998f6254eef8e7">interactive</a> (bool flag)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set tty mode to buffered or "interactive".  <a href="#056469a50ef74e0885998f6254eef8e7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_t_t_y_stream.html#fd30bd70e73b573c1fd83a90bec64e27">sync</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flushes the stream input and out buffers, writes pending output.  <a href="#fd30bd70e73b573c1fd83a90bec64e27"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_t_t_y_stream.html#59694c06c96e9febb3b88cbd4984f4bf">isPending</a> (<a class="el" href="classost_1_1_serial.html#7acdd43b4d1766daa58bbb49352dd942">Pending</a> pend, <a class="el" href="thread_8h.html#f412159e5cef839836a5e7b19ee75d1c">timeout_t</a> <a class="el" href="classost_1_1_t_t_y_stream.html#da518ac8768e0e9336267f6f91846eb2">timeout</a>=TIMEOUT_INF)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the status of pending operations.  <a href="#59694c06c96e9febb3b88cbd4984f4bf"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_t_t_y_stream.html#a2709f21498713e4091ba1cc6471bf35">TTYStream</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This constructor is used to derive "ttystream", a more C++ style version of the <a class="el" href="classost_1_1_t_t_y_stream.html">TTYStream</a> class.  <a href="#a2709f21498713e4091ba1cc6471bf35"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_t_t_y_stream.html#83d30e56a2c603427ecf72cc113310ab">allocate</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Used to allocate the buffer space needed for iostream operations.  <a href="#83d30e56a2c603427ecf72cc113310ab"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_t_t_y_stream.html#e8071fe31f6009c8c5f5018d8a285fda">endStream</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Used to terminate the buffer space and clean up the tty connection.  <a href="#e8071fe31f6009c8c5f5018d8a285fda"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_t_t_y_stream.html#bb3276c12566b4dc4776efd3e1bee296">underflow</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This streambuf method is used to load the input buffer through the established tty serial port.  <a href="#bb3276c12566b4dc4776efd3e1bee296"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_t_t_y_stream.html#5bb4dfdd526e44bf5873113191f6c198">uflow</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This streambuf method is used for doing unbuffered reads through the establish tty serial port when in interactive mode.  <a href="#5bb4dfdd526e44bf5873113191f6c198"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_t_t_y_stream.html#c2534503380bf14d8fcee942461b396b">overflow</a> (int ch)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This streambuf method is used to write the output buffer through the established tty port.  <a href="#c2534503380bf14d8fcee942461b396b"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_t_t_y_stream.html#092b288b0699829784c318bceeb66b46">gbuf</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_t_t_y_stream.html#05574ac3124042f6fd7d7126b7d2dbde">pbuf</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="thread_8h.html#f412159e5cef839836a5e7b19ee75d1c">timeout_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_t_t_y_stream.html#da518ac8768e0e9336267f6f91846eb2">timeout</a></td></tr>

<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classost_1_1_t_t_y_stream.html">TTYStream</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_t_t_y_stream.html#b6365240297776a647b61ce829e3f0b7">crlf</a> (<a class="el" href="classost_1_1_t_t_y_stream.html">TTYStream</a> &amp;)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classost_1_1_t_t_y_stream.html">TTYStream</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_t_t_y_stream.html#975a537898714a55453793eaa2237c0d">lfcr</a> (<a class="el" href="classost_1_1_t_t_y_stream.html">TTYStream</a> &amp;)</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
TTY streams are used to represent serial connections that are fully "streamable" objects using C++ stream classes and friends.streamable tty serial I/O class. 
<p>
The first application relevant serial I/O class is the <a class="el" href="classost_1_1_t_t_y_stream.html">TTYStream</a> class. <a class="el" href="classost_1_1_t_t_y_stream.html">TTYStream</a> offers a linearly buffered "streaming" I/O session with the serial device. Furthermore, traditional C++ "stream" operators (&lt;&lt; and &gt;&gt;) may be used with the serial device. A more "true" to ANSI C++ library format "ttystream" is also available, and this supports an "open" method in which one can pass initial serial device parameters immediately following the device name in a single string, as in "/dev/tty3a:9600,7,e,1", as an example.<p>
The <a class="el" href="classost_1_1_t_t_y_session.html">TTYSession</a> aggragates a <a class="el" href="classost_1_1_t_t_y_stream.html">TTYStream</a> and a Common C++ <a class="el" href="classost_1_1_thread.html">Thread</a> which is assumed to be the execution context that will be used to perform actual I/O operations. This class is very anagolous to <a class="el" href="classost_1_1_t_c_p_session.html">TCPSession</a>.<p>
<dl compact><dt><b>Author:</b></dt><dd>David Sugar &lt;<a href="mailto:dyfet@ostel.com">dyfet@ostel.com</a>&gt; </dd></dl>

<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="a2709f21498713e4091ba1cc6471bf35"></a><!-- doxytag: member="ost::TTYStream::TTYStream" ref="a2709f21498713e4091ba1cc6471bf35" args="()" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">ost::TTYStream::TTYStream           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [protected]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
This constructor is used to derive "ttystream", a more C++ style version of the <a class="el" href="classost_1_1_t_t_y_stream.html">TTYStream</a> class. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="8c9d3397e3250ede75a659103594befb"></a><!-- doxytag: member="ost::TTYStream::TTYStream" ref="8c9d3397e3250ede75a659103594befb" args="(const char *filename, timeout_t to=0)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">ost::TTYStream::TTYStream           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>filename</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="thread_8h.html#f412159e5cef839836a5e7b19ee75d1c">timeout_t</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>to</em> = <code>0</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Create and open a tty serial port. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>filename</em>&nbsp;</td><td>char name of device to open. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>to</em>&nbsp;</td><td>default timeout. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="f7367a91c7adc42f3d6d16f524e71aff"></a><!-- doxytag: member="ost::TTYStream::~TTYStream" ref="f7367a91c7adc42f3d6d16f524e71aff" args="()" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">virtual ost::TTYStream::~TTYStream           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
End the tty stream and cleanup. 
<p>
    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="83d30e56a2c603427ecf72cc113310ab"></a><!-- doxytag: member="ost::TTYStream::allocate" ref="83d30e56a2c603427ecf72cc113310ab" args="(void)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void ost::TTYStream::allocate           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [protected]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Used to allocate the buffer space needed for iostream operations. 
<p>
This is based on MAX_INPUT.     </td>
  </tr>
</table>
<a class="anchor" name="e8071fe31f6009c8c5f5018d8a285fda"></a><!-- doxytag: member="ost::TTYStream::endStream" ref="e8071fe31f6009c8c5f5018d8a285fda" args="(void)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void ost::TTYStream::endStream           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [protected]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Used to terminate the buffer space and clean up the tty connection. 
<p>
This function is called by the destructor.     </td>
  </tr>
</table>
<a class="anchor" name="056469a50ef74e0885998f6254eef8e7"></a><!-- doxytag: member="ost::TTYStream::interactive" ref="056469a50ef74e0885998f6254eef8e7" args="(bool flag)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void ost::TTYStream::interactive           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">bool&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>flag</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set tty mode to buffered or "interactive". 
<p>
When interactive, all streamed I/O is directly sent to the serial port immediately.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>flag</em>&nbsp;</td><td>bool set to true to make interactive. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="59694c06c96e9febb3b88cbd4984f4bf"></a><!-- doxytag: member="ost::TTYStream::isPending" ref="59694c06c96e9febb3b88cbd4984f4bf" args="(Pending pend, timeout_t timeout=TIMEOUT_INF)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">bool ost::TTYStream::isPending           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="classost_1_1_serial.html#7acdd43b4d1766daa58bbb49352dd942">Pending</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>pend</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="thread_8h.html#f412159e5cef839836a5e7b19ee75d1c">timeout_t</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>timeout</em> = <code>TIMEOUT_INF</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the status of pending operations. 
<p>
This can be used to examine if input or output is waiting, or if an error has occured on the serial device. If read buffer contains data then input is ready and if write buffer contains data it is first flushed then checked.<p>
<dl compact><dt><b>Returns:</b></dt><dd>true if ready, false if timeout. </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pend</em>&nbsp;</td><td>ready check to perform. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>timeout</em>&nbsp;</td><td>in milliseconds. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="c2534503380bf14d8fcee942461b396b"></a><!-- doxytag: member="ost::TTYStream::overflow" ref="c2534503380bf14d8fcee942461b396b" args="(int ch)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int ost::TTYStream::overflow           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>ch</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [protected]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
This streambuf method is used to write the output buffer through the established tty port. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ch</em>&nbsp;</td><td>char to push through. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>char pushed through. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="10ec50ecf62fb6c5cda903389d96d127"></a><!-- doxytag: member="ost::TTYStream::setTimeout" ref="10ec50ecf62fb6c5cda903389d96d127" args="(timeout_t to)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void ost::TTYStream::setTimeout           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="thread_8h.html#f412159e5cef839836a5e7b19ee75d1c">timeout_t</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>to</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the timeout control. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>to</em>&nbsp;</td><td>timeout to use. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="fd30bd70e73b573c1fd83a90bec64e27"></a><!-- doxytag: member="ost::TTYStream::sync" ref="fd30bd70e73b573c1fd83a90bec64e27" args="(void)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int ost::TTYStream::sync           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Flushes the stream input and out buffers, writes pending output. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>0 on success. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="5bb4dfdd526e44bf5873113191f6c198"></a><!-- doxytag: member="ost::TTYStream::uflow" ref="5bb4dfdd526e44bf5873113191f6c198" args="(void)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int ost::TTYStream::uflow           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [protected]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
This streambuf method is used for doing unbuffered reads through the establish tty serial port when in interactive mode. 
<p>
Also this method will handle proper use of buffers if not in interative mode.<p>
<dl compact><dt><b>Returns:</b></dt><dd>char from tty serial port, EOF also possible. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="bb3276c12566b4dc4776efd3e1bee296"></a><!-- doxytag: member="ost::TTYStream::underflow" ref="bb3276c12566b4dc4776efd3e1bee296" args="(void)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int ost::TTYStream::underflow           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [protected]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
This streambuf method is used to load the input buffer through the established tty serial port. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>char from get buffer, EOF also possible. </dd></dl>
    </td>
  </tr>
</table>
<hr><h2>Friends And Related Function Documentation</h2>
<a class="anchor" name="b6365240297776a647b61ce829e3f0b7"></a><!-- doxytag: member="ost::TTYStream::crlf" ref="b6365240297776a647b61ce829e3f0b7" args="(TTYStream &amp;)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="classost_1_1_t_t_y_stream.html">TTYStream</a>&amp; crlf           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="classost_1_1_t_t_y_stream.html">TTYStream</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [friend]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="975a537898714a55453793eaa2237c0d"></a><!-- doxytag: member="ost::TTYStream::lfcr" ref="975a537898714a55453793eaa2237c0d" args="(TTYStream &amp;)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="classost_1_1_t_t_y_stream.html">TTYStream</a>&amp; lfcr           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="classost_1_1_t_t_y_stream.html">TTYStream</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [friend]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="092b288b0699829784c318bceeb66b46"></a><!-- doxytag: member="ost::TTYStream::gbuf" ref="092b288b0699829784c318bceeb66b46" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">char* <a class="el" href="classost_1_1_t_t_y_stream.html#092b288b0699829784c318bceeb66b46">ost::TTYStream::gbuf</a><code> [protected]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="05574ac3124042f6fd7d7126b7d2dbde"></a><!-- doxytag: member="ost::TTYStream::pbuf" ref="05574ac3124042f6fd7d7126b7d2dbde" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">char * <a class="el" href="classost_1_1_t_t_y_stream.html#05574ac3124042f6fd7d7126b7d2dbde">ost::TTYStream::pbuf</a><code> [protected]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="da518ac8768e0e9336267f6f91846eb2"></a><!-- doxytag: member="ost::TTYStream::timeout" ref="da518ac8768e0e9336267f6f91846eb2" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="thread_8h.html#f412159e5cef839836a5e7b19ee75d1c">timeout_t</a> <a class="el" href="classost_1_1_t_t_y_stream.html#da518ac8768e0e9336267f6f91846eb2">ost::TTYStream::timeout</a><code> [protected]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="serial_8h-source.html">serial.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Mon Jun 19 10:50:56 2006 for GNU CommonC++ by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
</body>
</html>