diff --git a/docs/v1.0/annotated.html b/docs/v1.0/annotated.html index 82221a5..6ce403b 100644 --- a/docs/v1.0/annotated.html +++ b/docs/v1.0/annotated.html @@ -104,13 +104,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
1.8.0
diff --git a/docs/v1.0/class_serial_1_1_scoped_read_lock.html b/docs/v1.0/class_serial_1_1_scoped_read_lock.html
index bb099ac..418c4bf 100644
--- a/docs/v1.0/class_serial_1_1_scoped_read_lock.html
+++ b/docs/v1.0/class_serial_1_1_scoped_read_lock.html
@@ -157,7 +157,7 @@ Public Member Functions
1.8.0
diff --git a/docs/v1.0/class_serial_1_1_scoped_write_lock.html b/docs/v1.0/class_serial_1_1_scoped_write_lock.html
index 965141b..291c4db 100644
--- a/docs/v1.0/class_serial_1_1_scoped_write_lock.html
+++ b/docs/v1.0/class_serial_1_1_scoped_write_lock.html
@@ -157,7 +157,7 @@ Public Member Functions
1.8.0
diff --git a/docs/v1.0/classes.html b/docs/v1.0/classes.html
index bbea460..87611ca 100644
--- a/docs/v1.0/classes.html
+++ b/docs/v1.0/classes.html
@@ -102,7 +102,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
T |
P |
1.8.0
diff --git a/docs/v1.0/classserial_1_1_i_o_exception.html b/docs/v1.0/classserial_1_1_i_o_exception.html
index f5058e4..5d8b453 100644
--- a/docs/v1.0/classserial_1_1_i_o_exception.html
+++ b/docs/v1.0/classserial_1_1_i_o_exception.html
@@ -250,7 +250,7 @@ Public Member Functions
1.8.0
diff --git a/docs/v1.0/classserial_1_1_port_not_opened_exception.html b/docs/v1.0/classserial_1_1_port_not_opened_exception.html
index 5487b93..69cd4e5 100644
--- a/docs/v1.0/classserial_1_1_port_not_opened_exception.html
+++ b/docs/v1.0/classserial_1_1_port_not_opened_exception.html
@@ -159,7 +159,7 @@ Public Member Functions
1.8.0
diff --git a/docs/v1.0/classserial_1_1_serial.html b/docs/v1.0/classserial_1_1_serial.html
index 85de31a..eb6d054 100644
--- a/docs/v1.0/classserial_1_1_serial.html
+++ b/docs/v1.0/classserial_1_1_serial.html
@@ -113,7 +113,7 @@ Data Structures
Class that provides a portable serial port interface.
| serial::Serial::Serial | +serial::Serial::Serial | ( | const std::string & | port = "", |
@@ -176,6 +176,12 @@ Public Member Functionsunsigned long | baudrate = 9600, |
+ |
| + | + | Timeout | +timeout = Timeout(), |
+ ||||
| @@ -213,6 +219,13 @@ Public Member Functions | |||||||
| port | A std::string containing the address of the serial port, which would be something like 'COM1' on Windows and '/dev/ttyS0' on Linux. |
| baudrate | An integer that represents the baudrate |
| timeout | A serial::Timeout struct that defines the timeout conditions for the serial port. |
| bytesize | Size of each byte in the serial transmission of data, default is eightbits, possible values are: fivebits, sixbits, sevenbits, eightbits | ||||||
| parity | Method of parity, default is parity_none, possible values are: parity_none, parity_odd, parity_even | ||||||
| stopbits | Number of stop bits used, default is stopbits_one, possible values are: stopbits_one, stopbits_one_point_five, stopbits_two | ||||||
| serial::timeout_t Serial::getTimeout | +serial::Timeout Serial::getTimeout | ( | ) | const | @@ -613,10 +626,10 @@ Public Member Functions|||
| std::invalid_argument | |||||||
| void Serial::setTimeout | +void Serial::setTimeout | ( | -serial::timeout_t & | +serial::Timeout & | timeout | ) |
Sets the timeout for reads and writes using the timeout_t struct.
-There are two basic conditions for timeout described here, the inter byte timeout is the maximum amount of time in milliseconds allowed between receiving bytes from the serial port. The second condition is where the total timeout expires during a read or write. The total timeout can be calculated as the multiplier times the number of requested bytes plus the constant. In this way a single constant time timeout can be specified with zero for the inter byte timeout and zero for the multiplier. Alternatively, you could have only an inter byte timeout and zero for both the constant and multiplier to prevent a total time timeout from occurring.You can use the multiplier to increase the total time timeout based on the number of bytes requested. The user can combine any of these timeout metrics in order to achieve the desired trade-off between efficiency and responsiveness.
+Sets the timeout for reads and writes using the Timeout struct.
+There are two timeout conditions described here:
+Read and write functions will return in one of three cases. When the reading or writing is complete, when a timeout occurs, or when an exception occurs.
| timeout | A timeout_t struct containing the inter byte timeout, and the read and write timeout constants and multipliers. |
| timeout | A serial::Timeout struct containing the inter byte timeout, and the read and write timeout constants and multipliers. |
{
- pimpl_->setTimeout (timeout);
+ pimpl_->setTimeout (timeout);
}
| void serial::Serial::setTimeout | +void serial::Serial::setTimeout | ( | long | inter_byte_timeout, | @@ -1360,10 +1385,10 @@ Public Member Functions
Returns true on CTS, DSR, RI, or CD changing.
+Blocks until CTS, DSR, RI, CD changes or something interrupts it.
Can throw an exception if an error occurs while waiting. You can check the status of CTS, DSR, RI, and CD once this returns. Uses TIOCMIWAIT via ioctl if available (mostly only on Linux) with a resolution of less than +-1ms and as good as +-0.2ms. Otherwise a polling method is used which can give +-2ms.
+| SerialException | |||||||
| bool | getCD () | ||||||
| void | setPort (const string &port) | ||||||
| string | getPort () const | ||||||
| void | setTimeout (timeout_t &timeout) | ||||||
| timeout_t | getTimeout () const | ||||||
| void | setTimeout (Timeout &timeout) | ||||||
| Timeout | getTimeout () const | ||||||
| void | setBaudrate (unsigned long baudrate) | ||||||
| unsigned long | getBaudrate () const | ||||||
| void | setBytesize (bytesize_t bytesize) | ||||||
| long serial::serial::Serial::SerialImpl::getTimeout | +long serial::serial::Serial::SerialImpl::getTimeout | ( | ) | const | @@ -913,12 +913,12 @@ Protected Member Functions|||
| timeout_t serial::serial::Serial::SerialImpl::getTimeout | +Timeout serial::serial::Serial::SerialImpl::getTimeout | ( | ) | const | @@ -1760,7 +1760,7 @@ Protected Member Functions|||
| void Serial::SerialImpl::setTimeout | +void Serial::SerialImpl::setTimeout | ( | long | timeout | ) | @@ -1775,14 +1775,14 @@ Protected Member Functions||
| void serial::serial::Serial::SerialImpl::setTimeout | +void serial::serial::Serial::SerialImpl::setTimeout | ( | -timeout_t & | +Timeout & | timeout | ) | |
| namespace | serial | ||||||
Data Structures | |||||||
| struct | timeout_t | ||||||
| struct | Timeout | ||||||
| class | Serial | ||||||
| class | SerialExecption | ||||||
| class | IOException | ||||||
@@ -116,7 +116,7 @@ Data Structures | |||
Data Structures | |||
| struct | serial::timeout_t | ||
| struct | serial::Timeout | ||
| class | serial::Serial | ||
| class | serial::SerialExecption | ||
| class | serial::IOException | ||
|
+ serial
+ 1.0
+
+ Cross-platform serial port library for C++
+ |
+
+
+
+
#include <serial.h>
+Public Member Functions | |
| Timeout (long inter_byte_timeout_=0, long read_timeout_constant_=0, long read_timeout_multiplier_=0, long write_timeout_constant_=0, long write_timeout_multiplier_=0) | |
+Data Fields | |
| long | inter_byte_timeout |
| long | read_timeout_constant |
| long | read_timeout_multiplier |
| long | write_timeout_constant |
| long | write_timeout_multiplier |
Structure for setting the timeout of the serial port, times are in milliseconds.
+| serial::Timeout::Timeout | +( | +long | +inter_byte_timeout_ = 0, |
+
| + | + | long | +read_timeout_constant_ = 0, |
+
| + | + | long | +read_timeout_multiplier_ = 0, |
+
| + | + | long | +write_timeout_constant_ = 0, |
+
| + | + | long | +write_timeout_multiplier_ = 0 |
+
| + | ) | + [inline] |
+
: inter_byte_timeout(inter_byte_timeout_), + read_timeout_constant(read_timeout_constant_), + read_timeout_multiplier(read_timeout_multiplier_), + write_timeout_constant(write_timeout_constant_), + write_timeout_multiplier(write_timeout_multiplier_) + {} +
| long serial::Timeout::inter_byte_timeout | +
Number of milliseconds between bytes received to timeout on.
+ +| long serial::Timeout::read_timeout_constant | +
A constant number of milliseconds to wait after calling read.
+ +| long serial::Timeout::read_timeout_multiplier | +
A multiplier against the number of requested bytes to wait after calling read.
+ +| long serial::Timeout::write_timeout_constant | +
A constant number of milliseconds to wait after calling write.
+ +| long serial::Timeout::write_timeout_multiplier | +
A multiplier against the number of requested bytes to wait after calling write.
+ +
+ 1.8.0
+
+
+
+
diff --git a/docs/v1.0/unix_8cc.html b/docs/v1.0/unix_8cc.html
index efc0abc..7f1fae0 100644
--- a/docs/v1.0/unix_8cc.html
+++ b/docs/v1.0/unix_8cc.html
@@ -119,7 +119,7 @@ Include dependency graph for unix.cc:

@@ -178,7 +178,7 @@ Functions |