Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 3ebaf504d69f581a8834e53e04e712a5 > files > 106

gearbox-devel-9.11-6.fc14.i686.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>GearBox Project</title>

<link rel="icon" href="gbx_icon_cardbox_sky.png" type="image/png">
<link rel="shortcut icon" href="gbx_icon_cardbox_sky.png" type="image/png">

<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<!-- Google Analytics -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3583782-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
<!-- Returning you to your regular programming -->
</head><body>

<!-- Header -->

<table border="0" cellspacing="0" cellpadding="0">

<tr><!-- create row -->

<!-- spacer cell -->
<!-- #CC CC CC -->
<td rowspan="1" colspan="1" bgcolor="#EEEEEE">&nbsp;&nbsp;&nbsp;&nbsp;</td>

<!-- menu cell -->
<td width="170" rowspan="1" colspan="1" align="left" valign="top" bgcolor="#EEEEEE">


<p>&nbsp;</p>
<p align="center"><a href="index.html"><img src="gbx_logo_cardbox_sky_150x150.png"></a></p><br>

<strong>INTRODUCTION</strong><br>
<strong><a href="gbx_doc_overview.html" style="text-decoration:none">Overview</a></strong><br>
<strong><a href="gbx_doc_getting.html" style="text-decoration:none">Download and Install</a></strong><br>
<!-- <strong><a href="gbx_doc_quickstart.html" style="text-decoration:none">Quick Start</a></strong><br> -->
<strong><a href="gbx_doc_documentation.html" style="text-decoration:none">Documentation</a></strong><br>
<strong><a href="gbx_doc_publications.html" style="text-decoration:none">Publications</a></strong><br>
<br>

<strong>REPOSITORY</strong><br>
<strong><a href="group__gbx__libs.html" style="text-decoration:none">Libraries</a></strong><br>
<!-- <strong><a href="group__gbx__utils.html" style="text-decoration:none">Utilities</a></strong><br> -->
<br>

<strong>DEVELOPER</strong><br>

<!--<strong><a href="gbx_doc_tutorials.html" style="text-decoration:none">Tutorials</a></strong><br>
<strong><a href="group__gbx__examples.html" style="text-decoration:none">Examples</a></strong><br>-->
<strong><a href="gbx_doc_devguide.html" style="text-decoration:none">Dev Guide</a></strong><br>
<!-- 
<strong><a href="gbx_doc_faq.html" style="text-decoration:none">FAQ</a></strong><br>
-->
<strong><a href="http://cdash.acfr.usyd.edu.au/index.php?project=Gearbox" style="text-decoration:none">Dashboard</a></strong><br>
<!--<strong><a href="http://wiki2.cas.edu.au/orca">Wiki</a></strong><br>
login/pass: orca/orca<br>-->
<br>

<strong>PEOPLE</strong><br>
<strong><a href="gbx_doc_contributors.html" style="text-decoration:none">Contributors</a></strong><br>
<strong><a href="gbx_doc_users.html" style="text-decoration:none">Users</a></strong><br>
<br>

<a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=216468&amp;type=2" width="125" height="37" border="0" alt="SourceForge.net Logo" /></a><br>
<strong><a href="http://sourceforge.net/projects/gearbox">Project</a></strong><br>
<strong><a href="http://sourceforge.net/project/showfiles.php?group_id=216468">Download</a></strong><br>
<!--<strong><a href="http://sourceforge.net/tracker/?group_id=216468">Bugs/Feedback</a></strong><br>-->
<strong><a href="http://sourceforge.net/mail/?group_id=216468">Mailing lists</a></strong></p>
<p>&nbsp;</p>

</td><!-- /menu cell -->

<!-- one grey spacer cells -->
<td rowspan="1" colspan="1" bgcolor="#EEEEEE">&nbsp;&nbsp;&nbsp;&nbsp;</td>

<!-- one white spacer cells -->
<td rowspan="1" colspan="1">&nbsp;&nbsp;&nbsp;&nbsp;</td>

<!-- main content cell -->
<td rowspan="1" colspan="1" align="left" valign="top">


<!-- Generated by Doxygen 1.6.2-20100208 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <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="navpath"><a class="el" href="namespaceflexiport.html">flexiport</a>::<a class="el" href="classflexiport_1_1Port.html">Port</a>
  </div>
</div>
<div class="contents">
<h1>flexiport::Port Class Reference</h1><!-- doxytag: class="flexiport::Port" -->
<p>Base <a class="el" href="classflexiport_1_1Port.html" title="Base Port class.">Port</a> class.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="port_8h_source.html">port.h</a>&gt;</code></p>

<p>Inherited by <a class="el" href="classflexiport_1_1LogReaderPort.html">flexiport::LogReaderPort</a>, <a class="el" href="classflexiport_1_1LogWriterPort.html">flexiport::LogWriterPort</a>, <a class="el" href="classflexiport_1_1SerialPort.html">flexiport::SerialPort</a>, <a class="el" href="classflexiport_1_1TCPPort.html">flexiport::TCPPort</a>, <a class="el" href="classflexiport_1_1UDPPort.html">flexiport::UDPPort</a>, and PortWrap.</p>

<p><a href="classflexiport_1_1Port-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8c58be7e0aa0ee292ab47501520ff870"></a><!-- doxytag: member="flexiport::Port::Open" ref="a8c58be7e0aa0ee292ab47501520ff870" args="()=0" -->
virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#a8c58be7e0aa0ee292ab47501520ff870">Open</a> ()=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Open the port. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae98f3d3cd64267e60cd01377e7f07b67"></a><!-- doxytag: member="flexiport::Port::Close" ref="ae98f3d3cd64267e60cd01377e7f07b67" args="()=0" -->
virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#ae98f3d3cd64267e60cd01377e7f07b67">Close</a> ()=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Close the port. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual ssize_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#a7bbe4b1584b60a6eb01f59668b36f85a">Read</a> (void *const buffer, size_t count)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read from the port.  <a href="#a7bbe4b1584b60a6eb01f59668b36f85a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual ssize_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#ac21713744e9efa715b6c2c82e6dd4f39">ReadFull</a> (void *const buffer, size_t count)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read the requested quantity of data from the port.  <a href="#ac21713744e9efa715b6c2c82e6dd4f39"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual ssize_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#afb3b1e2bbff7a46343c6c28c80e5a33a">ReadString</a> (std::string &amp;buffer)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read a string.  <a href="#afb3b1e2bbff7a46343c6c28c80e5a33a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual ssize_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#a0f22252194f4892f6530fa316ceb3469">ReadUntil</a> (void *const buffer, size_t count, uint8_t terminator)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read data until a specified termination byte is received.  <a href="#a0f22252194f4892f6530fa316ceb3469"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual ssize_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#a9b17c8b174a19fd9ee2ff13759d81b83">ReadStringUntil</a> (std::string &amp;buffer, char terminator)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read a string until the specified termination character is received.  <a href="#a9b17c8b174a19fd9ee2ff13759d81b83"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual ssize_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#adccf67379fcdf9d48a7d89df7ee74e80">ReadLine</a> (char *const buffer, size_t count)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read a new-line terminated string of data.  <a href="#adccf67379fcdf9d48a7d89df7ee74e80"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual ssize_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#a36dedbec727a975c5828d5d4573d934d">ReadLine</a> (std::string &amp;buffer)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read a new-line terminated string of data.  <a href="#a36dedbec727a975c5828d5d4573d934d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual ssize_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#ab36b51dab15f3d21905b5618c45df336">Skip</a> (size_t count)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Dump data until the specified number of bytes have been read.  <a href="#ab36b51dab15f3d21905b5618c45df336"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual ssize_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#aaadaa3a7d6f0be222582a6d337275bb3">SkipUntil</a> (uint8_t terminator, unsigned int count)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read and dump data until the specified termination character has been seen count times.  <a href="#aaadaa3a7d6f0be222582a6d337275bb3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual ssize_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#a7614f5e9881e75e24d5c40d8c9f1af6c">BytesAvailable</a> ()=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of bytes waiting to be read at the port. Returns immediatly.  <a href="#a7614f5e9881e75e24d5c40d8c9f1af6c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual ssize_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#a2967c49bd23f95e7f325212c7947acd0">BytesAvailableWait</a> ()=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of bytes waiting after blocking for the timeout.  <a href="#a2967c49bd23f95e7f325212c7947acd0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual ssize_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#adb4dd81fc6112c621f159e6d2fbf1cf0">Write</a> (const void *const buffer, size_t count)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Write data to the port.  <a href="#adb4dd81fc6112c621f159e6d2fbf1cf0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual ssize_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#a2de8d0d14afbce7c54b04cdf007cc9b9">WriteFull</a> (const void *const buffer, size_t count)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Write all the data to the port.  <a href="#a2de8d0d14afbce7c54b04cdf007cc9b9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual ssize_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#a40fadb6b47ecbd7111e61aba3ac99fb2">WriteString</a> (const char *const buffer)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Write a string to the port.  <a href="#a40fadb6b47ecbd7111e61aba3ac99fb2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a668e5385701ea91188701d281d1472d8"></a><!-- doxytag: member="flexiport::Port::Flush" ref="a668e5385701ea91188701d281d1472d8" args="()=0" -->
virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#a668e5385701ea91188701d281d1472d8">Flush</a> ()=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flush the port's input and output buffers, discarding all data. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#a957408ef7418b31d457b74a9ff32d00d">Drain</a> ()=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Drain the port's output buffers.  <a href="#a957408ef7418b31d457b74a9ff32d00d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad87d1cf854d75b00c6429031a864ea75"></a><!-- doxytag: member="flexiport::Port::GetStatus" ref="ad87d1cf854d75b00c6429031a864ea75" args="() const " -->
virtual std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#ad87d1cf854d75b00c6429031a864ea75">GetStatus</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the status of the port (type, device, etc). <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a10305d725ccd4f53e872ef3316eabbcb"></a><!-- doxytag: member="flexiport::Port::GetPortType" ref="a10305d725ccd4f53e872ef3316eabbcb" args="() const " -->
std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#a10305d725ccd4f53e872ef3316eabbcb">GetPortType</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the port type. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad5d41a53a55a2d727237ad8d7e80cf1b"></a><!-- doxytag: member="flexiport::Port::SetDebug" ref="ad5d41a53a55a2d727237ad8d7e80cf1b" args="(int debug)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#ad5d41a53a55a2d727237ad8d7e80cf1b">SetDebug</a> (int debug)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the debug level. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa258404292ed68d0aa75398539accecb"></a><!-- doxytag: member="flexiport::Port::GetDebug" ref="aa258404292ed68d0aa75398539accecb" args="() const " -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#aa258404292ed68d0aa75398539accecb">GetDebug</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the debug level. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#a6e1e0f5a8961e466ea6caa480813d710">SetTimeout</a> (<a class="el" href="classflexiport_1_1Timeout.html">Timeout</a> timeout)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the timeout value. Set seconds to -1 to disable timeouts and block forever.  <a href="#a6e1e0f5a8961e466ea6caa480813d710"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a65d32c9aaebb37eaebf32c2a95f5ebeb"></a><!-- doxytag: member="flexiport::Port::GetTimeout" ref="a65d32c9aaebb37eaebf32c2a95f5ebeb" args="() const " -->
virtual <a class="el" href="classflexiport_1_1Timeout.html">Timeout</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#a65d32c9aaebb37eaebf32c2a95f5ebeb">GetTimeout</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the timeout. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab3371d50dde81994f079b6ed80f42922"></a><!-- doxytag: member="flexiport::Port::IsBlocking" ref="ab3371d50dde81994f079b6ed80f42922" args="() const " -->
virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#ab3371d50dde81994f079b6ed80f42922">IsBlocking</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the blocking property of the port. If the timeout is non-zero, the port will block. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8e4d30f95cbd4bcef448f5a71f6839db"></a><!-- doxytag: member="flexiport::Port::SetCanRead" ref="a8e4d30f95cbd4bcef448f5a71f6839db" args="(bool canRead)=0" -->
virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#a8e4d30f95cbd4bcef448f5a71f6839db">SetCanRead</a> (bool canRead)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the read permissions of the port. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4789e79b0f0e5f393c0dd2a08a00ffc0"></a><!-- doxytag: member="flexiport::Port::CanRead" ref="a4789e79b0f0e5f393c0dd2a08a00ffc0" args="() const " -->
virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#a4789e79b0f0e5f393c0dd2a08a00ffc0">CanRead</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the read permissions of the port. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a49216aa35eb7d0f4fead89bfc4886a49"></a><!-- doxytag: member="flexiport::Port::SetCanWrite" ref="a49216aa35eb7d0f4fead89bfc4886a49" args="(bool canWrite)=0" -->
virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#a49216aa35eb7d0f4fead89bfc4886a49">SetCanWrite</a> (bool canWrite)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the write permissions of the port. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0b97b8b3e58ad487dabb491c353faf0f"></a><!-- doxytag: member="flexiport::Port::CanWrite" ref="a0b97b8b3e58ad487dabb491c353faf0f" args="() const " -->
virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#a0b97b8b3e58ad487dabb491c353faf0f">CanWrite</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the write permissions of the port. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad5c7a6c8654f2f7bd6e12322207a6741"></a><!-- doxytag: member="flexiport::Port::IsOpen" ref="ad5c7a6c8654f2f7bd6e12322207a6741" args="() const =0" -->
virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflexiport_1_1Port.html#ad5c7a6c8654f2f7bd6e12322207a6741">IsOpen</a> () const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check if the port is open. <br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Base <a class="el" href="classflexiport_1_1Port.html" title="Base Port class.">Port</a> class. </p>
<p>This provides the base object from which specific port type implementations inherit.</p>
<p>All functions may throw exceptions of type <a class="el" href="classflexiport_1_1PortException.html">PortException</a>.</p>
<dl class="user"><dt><b>Options</b></dt><dd><ul>
<li>debug &lt;integer&gt;<ul>
<li>Debug level. Higher numbers give more information.</li>
<li>Default: 0 (no debug information)</li>
</ul>
</li>
<li>timeout &lt;float&gt;<ul>
<li>Time out on read/write, in seconds.microseconds.</li>
<li>A timeout of -1 disables timeouts, creating a port that will block forever.</li>
<li>Default: -1</li>
</ul>
</li>
<li>readonly, writeonly, readwrite<ul>
<li>Specify one type of permissions.</li>
<li>Default: readwrite</li>
</ul>
</li>
<li>alwaysopen<ul>
<li>The port should be open for as long as the object exists. It will be opened when constructed and if it closes unexpectedly, an attempt will be made to reopen it.</li>
<li>Default: off </li>
</ul>
</li>
</ul>
</dd></dl>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a7614f5e9881e75e24d5c40d8c9f1af6c"></a><!-- doxytag: member="flexiport::Port::BytesAvailable" ref="a7614f5e9881e75e24d5c40d8c9f1af6c" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual ssize_t flexiport::Port::BytesAvailable </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the number of bytes waiting to be read at the port. Returns immediatly. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of bytes available. Will not return less than zero. </dd></dl>

<p>Implemented in <a class="el" href="classflexiport_1_1LogReaderPort.html#aacc1da2259c22834189beb42ecc7bbc4">flexiport::LogReaderPort</a>, <a class="el" href="classflexiport_1_1LogWriterPort.html#a7c2693df217b21da90d0fb13816035ed">flexiport::LogWriterPort</a>, <a class="el" href="classflexiport_1_1SerialPort.html#a8200624c16fcb8f48cbfdb0c3ab300a0">flexiport::SerialPort</a>, <a class="el" href="classflexiport_1_1TCPPort.html#aa2ff5ec42124404cac21ad5e99ff031f">flexiport::TCPPort</a>, and <a class="el" href="classflexiport_1_1UDPPort.html#a276fbd4eb3c2f5f8b9bdd1dd94f191e4">flexiport::UDPPort</a>.</p>

<p>Referenced by <a class="el" href="logwriterport_8cpp_source.html#l00236">flexiport::LogWriterPort::BytesAvailable()</a>.</p>

</div>
</div>
<a class="anchor" id="a2967c49bd23f95e7f325212c7947acd0"></a><!-- doxytag: member="flexiport::Port::BytesAvailableWait" ref="a2967c49bd23f95e7f325212c7947acd0" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual ssize_t flexiport::Port::BytesAvailableWait </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the number of bytes waiting after blocking for the timeout. </p>
<p>Unlike <a class="el" href="classflexiport_1_1Port.html#a7614f5e9881e75e24d5c40d8c9f1af6c">BytesAvailable</a>, this function will wait for the timeout to occur if no data is available straight away.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of bytes waiting to be read, or -1 if a timeout occured. </dd></dl>

<p>Implemented in <a class="el" href="classflexiport_1_1LogReaderPort.html#a6dbeaab9198d9bc425fb5fb677f83c25">flexiport::LogReaderPort</a>, <a class="el" href="classflexiport_1_1LogWriterPort.html#a8b63015bc61759f1ad334c58e0f81b59">flexiport::LogWriterPort</a>, <a class="el" href="classflexiport_1_1SerialPort.html#a79b0737a60ad398d814f14dd2f6b74c6">flexiport::SerialPort</a>, <a class="el" href="classflexiport_1_1TCPPort.html#ab36d65613ffd037a3e685bb3bf28cdf6">flexiport::TCPPort</a>, and <a class="el" href="classflexiport_1_1UDPPort.html#a59b974d567e59b93ed44e65c85d7c6fa">flexiport::UDPPort</a>.</p>

<p>Referenced by <a class="el" href="logwriterport_8cpp_source.html#l00241">flexiport::LogWriterPort::BytesAvailableWait()</a>, and <a class="el" href="port_8cpp_source.html#l00072">ReadString()</a>.</p>

</div>
</div>
<a class="anchor" id="a957408ef7418b31d457b74a9ff32d00d"></a><!-- doxytag: member="flexiport::Port::Drain" ref="a957408ef7418b31d457b74a9ff32d00d" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void flexiport::Port::Drain </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Drain the port's output buffers. </p>
<p>Waits until timeout for the port to finish transmitting data in its output buffer. </p>

<p>Implemented in <a class="el" href="classflexiport_1_1LogReaderPort.html#a1a4a1a56eb1e15dfcd808b859ba20afb">flexiport::LogReaderPort</a>, <a class="el" href="classflexiport_1_1LogWriterPort.html#a470c6b564dcbbb0d26982e3f362ace43">flexiport::LogWriterPort</a>, <a class="el" href="classflexiport_1_1SerialPort.html#a97fe18bd3848379cb4226ea5c4ddd0a1">flexiport::SerialPort</a>, <a class="el" href="classflexiport_1_1TCPPort.html#a79b943f36c973d509d8c28042117ad6b">flexiport::TCPPort</a>, and <a class="el" href="classflexiport_1_1UDPPort.html#ae50f7894e5a6d462292f35da64e9590c">flexiport::UDPPort</a>.</p>

<p>Referenced by <a class="el" href="logwriterport_8cpp_source.html#l00270">flexiport::LogWriterPort::Drain()</a>.</p>

</div>
</div>
<a class="anchor" id="a7bbe4b1584b60a6eb01f59668b36f85a"></a><!-- doxytag: member="flexiport::Port::Read" ref="a7bbe4b1584b60a6eb01f59668b36f85a" args="(void *const buffer, size_t count)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual ssize_t flexiport::Port::Read </td>
          <td>(</td>
          <td class="paramtype">void *const &nbsp;</td>
          <td class="paramname"> <em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Read from the port. </p>
<p>Reads up to count bytes from the port into buffer. The exact behaviour of this function depends on the value of _timeout.</p>
<ul>
<li>When the timeout is non-zero, it will block until data is received or the timeout occurs.</li>
<li>When the timeout is zero, it will timeout immediatly if no data is available.</li>
<li>When the timeout is -1, it will block forever.</li>
</ul>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of bytes actually read, or -1 if a timeout occured. If zero is returned, this indicates that the port closed (and possibly reopened if set to do so). </dd></dl>

<p>Implemented in <a class="el" href="classflexiport_1_1LogReaderPort.html#a40dbab2df35f535153e4045d534ae576">flexiport::LogReaderPort</a>, <a class="el" href="classflexiport_1_1LogWriterPort.html#aaa41ffd589f2d0c1c76eace818582064">flexiport::LogWriterPort</a>, <a class="el" href="classflexiport_1_1SerialPort.html#aea5b5dbaa028e3111f16d73e8bebb9bd">flexiport::SerialPort</a>, <a class="el" href="classflexiport_1_1TCPPort.html#a21a4e8d56898d8481b70c6c9713f2417">flexiport::TCPPort</a>, and <a class="el" href="classflexiport_1_1UDPPort.html#ad310fedf85687caf8c85366d2b2d1d0a">flexiport::UDPPort</a>.</p>

<p>Referenced by <a class="el" href="logwriterport_8cpp_source.html#l00119">flexiport::LogWriterPort::Read()</a>, <a class="el" href="port_8cpp_source.html#l00072">ReadString()</a>, <a class="el" href="port_8cpp_source.html#l00160">ReadStringUntil()</a>, <a class="el" href="port_8cpp_source.html#l00115">ReadUntil()</a>, <a class="el" href="port_8cpp_source.html#l00209">Skip()</a>, and <a class="el" href="port_8cpp_source.html#l00245">SkipUntil()</a>.</p>

</div>
</div>
<a class="anchor" id="ac21713744e9efa715b6c2c82e6dd4f39"></a><!-- doxytag: member="flexiport::Port::ReadFull" ref="ac21713744e9efa715b6c2c82e6dd4f39" args="(void *const buffer, size_t count)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual ssize_t flexiport::Port::ReadFull </td>
          <td>(</td>
          <td class="paramtype">void *const &nbsp;</td>
          <td class="paramname"> <em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Read the requested quantity of data from the port. </p>
<p>Reads count bytes from the port into buffer. Similar to <a class="el" href="classflexiport_1_1Port.html#a7bbe4b1584b60a6eb01f59668b36f85a">Read</a>, but with the important difference that, rather than returning as soon as any data is received, it will continue trying to receive data until buffer is full or an error occurs. This function ignores the timeout setting and blocks anyway.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of bytes actually read. Timeouts will cause an exception (because they shouldn't happen). </dd></dl>

<p>Implemented in <a class="el" href="classflexiport_1_1LogReaderPort.html#a4b16ac3c4a6b30c6921a65e550935eca">flexiport::LogReaderPort</a>, <a class="el" href="classflexiport_1_1LogWriterPort.html#aec9d55571ed5f3d45f70df0803cd4c00">flexiport::LogWriterPort</a>, <a class="el" href="classflexiport_1_1SerialPort.html#aef912e0013bd23230b8d98d91c79d4ee">flexiport::SerialPort</a>, <a class="el" href="classflexiport_1_1TCPPort.html#a76eb4827bc6d3c245f5d05179941ab93">flexiport::TCPPort</a>, and <a class="el" href="classflexiport_1_1UDPPort.html#a21f4c4d1592f3afc9bd149224dfa27a0">flexiport::UDPPort</a>.</p>

<p>Referenced by <a class="el" href="logwriterport_8cpp_source.html#l00134">flexiport::LogWriterPort::ReadFull()</a>.</p>

</div>
</div>
<a class="anchor" id="a36dedbec727a975c5828d5d4573d934d"></a><!-- doxytag: member="flexiport::Port::ReadLine" ref="a36dedbec727a975c5828d5d4573d934d" args="(std::string &amp;buffer)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual ssize_t flexiport::Port::ReadLine </td>
          <td>(</td>
          <td class="paramtype">std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>buffer</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Read a new-line terminated string of data. </p>
<p>A convenience function that reads until a newline character (\n, 0x0A) is received and stores the received data in a string, . Good for text-based protocols that use newlines as message terminators.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>This function makes many calls to Read, each of which has an individual timeout. The maximum length of time this function make take may therefore be longer than one timeout.</dd>
<dd>
If the port is set to non-blocking mode (by setting the timeout to zero), this will effectively timeout immediatly when there is no data available, returning -1 irrespective of the quantity of data actually received before that point.</dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The length of the string (including the new line), or -1 if a timeout occured. </dd></dl>

</div>
</div>
<a class="anchor" id="adccf67379fcdf9d48a7d89df7ee74e80"></a><!-- doxytag: member="flexiport::Port::ReadLine" ref="adccf67379fcdf9d48a7d89df7ee74e80" args="(char *const buffer, size_t count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ssize_t flexiport::Port::ReadLine </td>
          <td>(</td>
          <td class="paramtype">char *const &nbsp;</td>
          <td class="paramname"> <em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Read a new-line terminated string of data. </p>
<p>A convenience function that reads until a newline character (\n, 0x0A) is received and stores the received data in a caller-provided buffer, buffer. Good for text-based protocols that use newlines as message terminators. Will not read more than count bytes.</p>
<p>buffer should include space for a NULL byte. count should reflect this. e.g. if you are expecting to receive a string "abcd\n", you should send a buffer that is 6 bytes long and make count = 6. This function will take into account the need for a NULL terminator when it receives data, receiving at most one less than count bytes. This NULL byte will not be included in the length of the received string returned from this function (just like strlen ()).</p>
<dl class="note"><dt><b>Note:</b></dt><dd>This function makes many calls to Read, each of which has an individual timeout. The maximum length of time this function may take may therefore be longer than one timeout.</dd>
<dd>
If the port is set to non-blocking mode (by setting the timeout to zero), this will effectively timeout immediately when there is no data available, returning -1 irrespective of the quantity of data actually received before that point.</dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The length of the string (including the new line), or -1 if a timeout occured. </dd></dl>

<p>References <a class="el" href="port_8cpp_source.html#l00115">ReadUntil()</a>.</p>

</div>
</div>
<a class="anchor" id="afb3b1e2bbff7a46343c6c28c80e5a33a"></a><!-- doxytag: member="flexiport::Port::ReadString" ref="afb3b1e2bbff7a46343c6c28c80e5a33a" args="(std::string &amp;buffer)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ssize_t flexiport::Port::ReadString </td>
          <td>(</td>
          <td class="paramtype">std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>buffer</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Read a string. </p>
<p>A convenience function that reads data from the port and returns it in a string. Behaves the same as <a class="el" href="classflexiport_1_1Port.html#a7bbe4b1584b60a6eb01f59668b36f85a">Read</a>.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The length of the string, or -1 if a timeout occured. </dd></dl>

<p>References <a class="el" href="classflexiport_1_1Port.html#a2967c49bd23f95e7f325212c7947acd0">BytesAvailableWait()</a>, and <a class="el" href="classflexiport_1_1Port.html#a7bbe4b1584b60a6eb01f59668b36f85a">Read()</a>.</p>

</div>
</div>
<a class="anchor" id="a9b17c8b174a19fd9ee2ff13759d81b83"></a><!-- doxytag: member="flexiport::Port::ReadStringUntil" ref="a9b17c8b174a19fd9ee2ff13759d81b83" args="(std::string &amp;buffer, char terminator)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ssize_t flexiport::Port::ReadStringUntil </td>
          <td>(</td>
          <td class="paramtype">std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&nbsp;</td>
          <td class="paramname"> <em>terminator</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Read a string until the specified termination character is received. </p>
<p>A convenience function that is similar to <a class="el" href="classflexiport_1_1Port.html#a0f22252194f4892f6530fa316ceb3469">ReadUntil</a>. The result is stored in a string. The terminator character is included in the returned string. Good for text-based protocols with a known message termination character.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>This function makes many calls to Read, each of which has an individual timeout. The maximum length of time this function make take may therefore be longer than one timeout.</dd>
<dd>
If the port is set to non-blocking mode (by setting the timeout to zero), this will effectively timeout immediatly when there is no data available, returning -1 irrespective of the quantity of data actually received before that point.</dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of bytes actually read (including the terminator), or -1 if a timeout occured. </dd></dl>

<p>Reimplemented in <a class="el" href="classflexiport_1_1UDPPort.html#aee853804bf02d8aca9adc08fab14ee87">flexiport::UDPPort</a>.</p>

<p>References <a class="el" href="port_8h_source.html#l00281">IsBlocking()</a>, and <a class="el" href="classflexiport_1_1Port.html#a7bbe4b1584b60a6eb01f59668b36f85a">Read()</a>.</p>

</div>
</div>
<a class="anchor" id="a0f22252194f4892f6530fa316ceb3469"></a><!-- doxytag: member="flexiport::Port::ReadUntil" ref="a0f22252194f4892f6530fa316ceb3469" args="(void *const buffer, size_t count, uint8_t terminator)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ssize_t flexiport::Port::ReadUntil </td>
          <td>(</td>
          <td class="paramtype">void *const &nbsp;</td>
          <td class="paramname"> <em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&nbsp;</td>
          <td class="paramname"> <em>terminator</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Read data until a specified termination byte is received. </p>
<p>Reads up to count bytes from the port into buffer, stopping when a byte matching terminator is received (included in the returned data). Otherwise behaves the same as <a class="el" href="classflexiport_1_1Port.html#a7bbe4b1584b60a6eb01f59668b36f85a">Read</a>.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>This function makes many calls to Read, each of which has an individual timeout. The maximum length of time this function make take may therefore be longer than one timeout.</dd>
<dd>
If the port is set to non-blocking mode (by setting the timeout to zero), this will effectively timeout immediatly when there is no data available, returning -1 irrespective of the quantity of data actually received before that point.</dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of bytes actually read (including the terminator), or -1 if a timeout occured. </dd></dl>

<p>Reimplemented in <a class="el" href="classflexiport_1_1UDPPort.html#a82296bf94266b3d4338623be3cd94139">flexiport::UDPPort</a>.</p>

<p>References <a class="el" href="port_8h_source.html#l00281">IsBlocking()</a>, and <a class="el" href="classflexiport_1_1Port.html#a7bbe4b1584b60a6eb01f59668b36f85a">Read()</a>.</p>

<p>Referenced by <a class="el" href="port_8cpp_source.html#l00201">ReadLine()</a>.</p>

</div>
</div>
<a class="anchor" id="a6e1e0f5a8961e466ea6caa480813d710"></a><!-- doxytag: member="flexiport::Port::SetTimeout" ref="a6e1e0f5a8961e466ea6caa480813d710" args="(Timeout timeout)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void flexiport::Port::SetTimeout </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classflexiport_1_1Timeout.html">Timeout</a>&nbsp;</td>
          <td class="paramname"> <em>timeout</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the timeout value. Set seconds to -1 to disable timeouts and block forever. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>On Mac OS X, the timer is reset each time data is received, making the timeout an inactivity timer in that there must be no data at all for the length of the timeout for it to trigger. This can potentially lead to very long blocking if the sender is sending data slightly faster than the timeout. </dd></dl>

<p>Implemented in <a class="el" href="classflexiport_1_1LogReaderPort.html#ae8a1d9f72e89a8e76ac00916d39f8997">flexiport::LogReaderPort</a>, <a class="el" href="classflexiport_1_1LogWriterPort.html#a1c0c20bcb6cbe05be56537bca28f6d0d">flexiport::LogWriterPort</a>, <a class="el" href="classflexiport_1_1SerialPort.html#ae6f8766ed97486b8b194aa0eb89299fc">flexiport::SerialPort</a>, <a class="el" href="classflexiport_1_1TCPPort.html#aa7390cfd0016ce83a285dd42d8a25d58">flexiport::TCPPort</a>, and <a class="el" href="classflexiport_1_1UDPPort.html#a99eff94d36f76d4ebea8429928c15c0c">flexiport::UDPPort</a>.</p>

<p>Referenced by <a class="el" href="logwriterport_8cpp_source.html#l00289">flexiport::LogWriterPort::SetTimeout()</a>.</p>

</div>
</div>
<a class="anchor" id="ab36b51dab15f3d21905b5618c45df336"></a><!-- doxytag: member="flexiport::Port::Skip" ref="ab36b51dab15f3d21905b5618c45df336" args="(size_t count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ssize_t flexiport::Port::Skip </td>
          <td>(</td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>count</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Dump data until the specified number of bytes have been read. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of bytes that were skipped, or -1 if a timeout occured. </dd></dl>

<p>Reimplemented in <a class="el" href="classflexiport_1_1LogWriterPort.html#af89b6e34ababdba8ee6467f75c7eb334">flexiport::LogWriterPort</a>, and <a class="el" href="classflexiport_1_1UDPPort.html#a8b860b67a0c93a5bed2e5a22c2bb6dcc">flexiport::UDPPort</a>.</p>

<p>References <a class="el" href="port_8h_source.html#l00281">IsBlocking()</a>, and <a class="el" href="classflexiport_1_1Port.html#a7bbe4b1584b60a6eb01f59668b36f85a">Read()</a>.</p>

</div>
</div>
<a class="anchor" id="aaadaa3a7d6f0be222582a6d337275bb3"></a><!-- doxytag: member="flexiport::Port::SkipUntil" ref="aaadaa3a7d6f0be222582a6d337275bb3" args="(uint8_t terminator, unsigned int count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ssize_t flexiport::Port::SkipUntil </td>
          <td>(</td>
          <td class="paramtype">uint8_t&nbsp;</td>
          <td class="paramname"> <em>terminator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Read and dump data until the specified termination character has been seen count times. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of bytes that were skipped, or -1 if a timeout occured. </dd></dl>

<p>Reimplemented in <a class="el" href="classflexiport_1_1LogWriterPort.html#ab888d664e96890df108d405b93628555">flexiport::LogWriterPort</a>, and <a class="el" href="classflexiport_1_1UDPPort.html#a9b9e08ef9f76a29c2cfe81b466dc470c">flexiport::UDPPort</a>.</p>

<p>References <a class="el" href="port_8h_source.html#l00281">IsBlocking()</a>, and <a class="el" href="classflexiport_1_1Port.html#a7bbe4b1584b60a6eb01f59668b36f85a">Read()</a>.</p>

</div>
</div>
<a class="anchor" id="adb4dd81fc6112c621f159e6d2fbf1cf0"></a><!-- doxytag: member="flexiport::Port::Write" ref="adb4dd81fc6112c621f159e6d2fbf1cf0" args="(const void *const buffer, size_t count)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual ssize_t flexiport::Port::Write </td>
          <td>(</td>
          <td class="paramtype">const void *const &nbsp;</td>
          <td class="paramname"> <em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write data to the port. </p>
<p>Simply writes count bytes of data from buffer to the port. If the port is blocking, this will block until it can write more when the port's output buffer is full, or until a timeout occurs. The buffer may become full during the write, in which case less than count bytes may be written.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of bytes actually written. May be 0 if the port's output buffer is already full and a timeout occurs. </dd></dl>

<p>Implemented in <a class="el" href="classflexiport_1_1LogReaderPort.html#ac8a1af3fb3b04d81383f3f08127b5b68">flexiport::LogReaderPort</a>, <a class="el" href="classflexiport_1_1LogWriterPort.html#ac22f166438c8a60aaae588a622aaaae0">flexiport::LogWriterPort</a>, <a class="el" href="classflexiport_1_1SerialPort.html#a788122a2d52b2df1d7aff1e426c58761">flexiport::SerialPort</a>, <a class="el" href="classflexiport_1_1TCPPort.html#af6139d8477a6d82938f262c46db80734">flexiport::TCPPort</a>, and <a class="el" href="classflexiport_1_1UDPPort.html#abf30f2c48bd455684b4bfc6b02005ef5">flexiport::UDPPort</a>.</p>

<p>Referenced by <a class="el" href="logwriterport_8cpp_source.html#l00250">flexiport::LogWriterPort::Write()</a>, <a class="el" href="port_8cpp_source.html#l00294">WriteFull()</a>, and <a class="el" href="port_8cpp_source.html#l00331">WriteString()</a>.</p>

</div>
</div>
<a class="anchor" id="a2de8d0d14afbce7c54b04cdf007cc9b9"></a><!-- doxytag: member="flexiport::Port::WriteFull" ref="a2de8d0d14afbce7c54b04cdf007cc9b9" args="(const void *const buffer, size_t count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ssize_t flexiport::Port::WriteFull </td>
          <td>(</td>
          <td class="paramtype">const void *const &nbsp;</td>
          <td class="paramname"> <em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write all the data to the port. </p>
<p>Similar to <a class="el" href="classflexiport_1_1Port.html#adb4dd81fc6112c621f159e6d2fbf1cf0">Write</a>, but will keep trying until all data is written to the port rather than just writing what it can and returning, even if a timeout occurs.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of bytes actually written. </dd></dl>

<p>References <a class="el" href="classflexiport_1_1Port.html#ad5c7a6c8654f2f7bd6e12322207a6741">IsOpen()</a>, and <a class="el" href="classflexiport_1_1Port.html#adb4dd81fc6112c621f159e6d2fbf1cf0">Write()</a>.</p>

</div>
</div>
<a class="anchor" id="a40fadb6b47ecbd7111e61aba3ac99fb2"></a><!-- doxytag: member="flexiport::Port::WriteString" ref="a40fadb6b47ecbd7111e61aba3ac99fb2" args="(const char *const buffer)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ssize_t flexiport::Port::WriteString </td>
          <td>(</td>
          <td class="paramtype">const char *const &nbsp;</td>
          <td class="paramname"> <em>buffer</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write a string to the port. </p>
<p>A convenience function that writes a null-terminated string to the port. Behaves identically to <a class="el" href="classflexiport_1_1Port.html#adb4dd81fc6112c621f159e6d2fbf1cf0">Write</a>. The NULL-terminator is *not* written to the port. If you want one, use write to send the whole string, or use this function followed by a call to write to write the NULL terminator.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of bytes actually written. May be 0 if the port's output buffer is already full and a timeout occurs. </dd></dl>

<p>References <a class="el" href="classflexiport_1_1Port.html#adb4dd81fc6112c621f159e6d2fbf1cf0">Write()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="port_8h_source.html">port.h</a></li>
<li>port.cpp</li>
</ul>
</div>

            </td>
            <td colspan="1">&nbsp;</td>
         </tr>
        </table>
<!-- end of table -->

 <hr size="1"><address style="align: right;"><small>Generated for GearBox by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.5 </small></address>
</body>
</html>