📄 classpserialchannel.html
字号:
<table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="classPSerialChannel.html#z349_0">Parity</a> PSerialChannel::GetParity </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get the parity of the serial port.<p><dl compact><dt><b>Returns: </b></dt><dd> current setting. </dl> </td> </tr></table><a name="z351_2" doxytag="PSerialChannel::GetPortNames"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="classPStringList.html">PStringList</a> PSerialChannel::GetPortNames </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [static]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get a list of the available serial ports. This returns a set of platform dependent strings which describe the serial ports of the computer. For example under unix it may be "ttyS0", under MS-DOS or NT it would be "COM1" and for the Macintosh it could be "Modem".<p><dl compact><dt><b>Returns: </b></dt><dd> list of strings for possible serial ports. </dl> </td> </tr></table><a name="z355_9" doxytag="PSerialChannel::GetRing"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> BOOL PSerialChannel::GetRing </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get the Ring Indicator signal of the serial port.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if the RI signal is asserted. </dl> </td> </tr></table><a name="z353_1" doxytag="PSerialChannel::GetSpeed"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> DWORD PSerialChannel::GetSpeed </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get the speed (baud rate) of the serial channel.<p><dl compact><dt><b>Returns: </b></dt><dd> current setting. </dl> </td> </tr></table><a name="z353_7" doxytag="PSerialChannel::GetStopBits"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> BYTE PSerialChannel::GetStopBits </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get the stop bits (1 or 2) of the serial port.<p><dl compact><dt><b>Returns: </b></dt><dd> current setting. </dl> </td> </tr></table><a name="z351_1" doxytag="PSerialChannel::Open"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual BOOL PSerialChannel::Open </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classPConfig.html">PConfig</a> & </td> <td class="mdname1" valign="top" nowrap> <em>cfg</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Open a serial channal. The channel is opened using attributes obtained from standard variables in the configuration file. Note that it assumed that the correct configuration file section is already set. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>cfg</em> </td><td>Configuration file to read serial port attributes from. </td></tr></table></dl><p>Reimplemented in <a class="el" href="classPModem.html#a5">PModem</a>. </td> </tr></table><a name="z351_0" doxytag="PSerialChannel::Open"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual BOOL PSerialChannel::Open </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPString.html">PString</a> & </td> <td class="mdname" nowrap> <em>port</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>DWORD </td> <td class="mdname" nowrap> <em>speed</em> = 0, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>BYTE </td> <td class="mdname" nowrap> <em>data</em> = 0, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="classPSerialChannel.html#z349_0">Parity</a> </td> <td class="mdname" nowrap> <em>parity</em> = DefaultParity, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>BYTE </td> <td class="mdname" nowrap> <em>stop</em> = 0, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="classPSerialChannel.html#z349_1">FlowControl</a> </td> <td class="mdname" nowrap> <em>inputFlow</em> = DefaultFlowControl, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="classPSerialChannel.html#z349_1">FlowControl</a> </td> <td class="mdname" nowrap> <em>outputFlow</em> = DefaultFlowControl</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Open a serial channal. The channel is opened it on the specified port and with the specified attributes. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>speed</em> </td><td>The name of the serial port to connect to. This is a platform dependent string and woiuld rarely be a literal. The static function <a class="el" href="classPSerialChannel.html#z351_2">GetPortNames()</a># can be used to find the platforms serial ports. </td></tr><tr><td valign=top><em>data</em> </td><td>Serial port speed or baud rate. The actual values possible here are platform dependent, but the standard value of 300, 1200, 2400, 4800, 9600, 19200, 38400 always be legal. </td></tr><tr><td valign=top><em>parity</em> </td><td>Number of data bits for serial port. The actual values possible here are platform dependent, but 7 and 8 should always be legal. </td></tr><tr><td valign=top><em>stop</em> </td><td>Parity for serial port. The actual values possible here are platform dependent, but <a class="el" href="classPSerialChannel.html#z349_0s1">NoParity</a>#, <a class="el" href="classPSerialChannel.html#z349_0s3">OddParity</a># and <a class="el" href="classPSerialChannel.html#z349_0s2">EvenParity</a># should always be legal. </td></tr><tr><td valign=top><em>inputFlow</em> </td><td>Number of stop bits for serial port. The actual values possible here are platform dependent, but 1 and 2 should always be legal. </td></tr><tr><td valign=top><em>outputFlow</em> </td><td>Flow control for data from the remote system into this conputer. Flow control for data from this conputer out to remote system. </td></tr></table></dl><p>Reimplemented in <a class="el" href="classPModem.html#a4">PModem</a>. </td> </tr></table><a name="z353_12" doxytag="PSerialChannel::SaveSettings"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual void PSerialChannel::SaveSettings </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classPConfig.html">PConfig</a> & </td> <td class="mdname1" valign="top" nowrap> <em>cfg</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Save the current port settings into the configuration file. Note that it assumed that the correct configuration file section is already set. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>cfg</em> </td><td>Configuration file to save setting into. </td></tr></table></dl><p>Reimplemented in <a class="el" href="classPModem.html#a6">PModem</a>. </td> </tr></table><a name="z355_4" doxytag="PSerialChannel::SetBreak"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void PSerialChannel::SetBreak </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">BOOL </td> <td class="mdname1" valign="top" nowrap> <em>state</em> = TRUE </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -