diff --git a/doc/0.2/annotated.html b/doc/0.2/annotated.html
new file mode 100644
index 0000000..17ce425
--- /dev/null
+++ b/doc/0.2/annotated.html
@@ -0,0 +1,118 @@
+
+
+
+
+
+
Constructor & Destructor Documentation
+
+
+
+
+
: pimpl_(pimpl) {
+ this->pimpl_->readLock();
+ }
+
+
+
+
+
+
+
+
{
+ this->pimpl_->readUnlock();
+ }
+
+
+
+
The documentation for this class was generated from the following file:
+
+
+
+
+
+
+
diff --git a/doc/0.2/class_serial_1_1_scoped_write_lock.html b/doc/0.2/class_serial_1_1_scoped_write_lock.html
new file mode 100644
index 0000000..5cd2639
--- /dev/null
+++ b/doc/0.2/class_serial_1_1_scoped_write_lock.html
@@ -0,0 +1,166 @@
+
+
+
+
+
+
Constructor & Destructor Documentation
+
+
+
+
+
: pimpl_(pimpl) {
+ this->pimpl_->writeLock();
+ }
+
+
+
+
+
+
+
+
{
+ this->pimpl_->writeUnlock();
+ }
+
+
+
+
The documentation for this class was generated from the following file:
+
+
+
+
+
+
+
diff --git a/doc/0.2/classes.html b/doc/0.2/classes.html
new file mode 100644
index 0000000..9533600
--- /dev/null
+++ b/doc/0.2/classes.html
@@ -0,0 +1,119 @@
+
+
+
+
+
+
#include <serial.h>
+
+
Constructor & Destructor Documentation
+
+
+
+
+
: file_(file), line_(line), e_what_ (strerror (errnum)), errno_(errnum) {}
+
+
+
+
+
+
+
+
: file_(file), line_(line), e_what_ (description), errno_(0) {}
+
+
+
+
+
+
Member Function Documentation
+
+
+
+
+
+
+
{
+ std::stringstream ss;
+ if (errno_ == 0)
+ ss << "IO Exception: " << e_what_;
+ else
+ ss << "IO Exception (" << errno_ << "): " << e_what_;
+ ss << ", file " << file_ << ", line " << line_ << ".";
+ return ss.str ().c_str ();
+ }
+
+
+
+
The documentation for this class was generated from the following file:
+
+
+
+
+
+
+
diff --git a/doc/0.2/classserial_1_1_port_not_opened_exception.html b/doc/0.2/classserial_1_1_port_not_opened_exception.html
new file mode 100644
index 0000000..4fdc592
--- /dev/null
+++ b/doc/0.2/classserial_1_1_port_not_opened_exception.html
@@ -0,0 +1,168 @@
+
+
+
+
+
+
#include <serial.h>
+
+
Constructor & Destructor Documentation
+
+
+
+
+
: e_what_ (description) {}
+
+
+
+
Member Function Documentation
+
+
+
+
+
{
+ std::stringstream ss;
+ ss << e_what_ << " called before port was opened.";
+ return ss.str ().c_str ();
+ }
+
+
+
+
The documentation for this class was generated from the following file:
+
+
+
+
+
+
+
diff --git a/doc/0.2/classserial_1_1_serial.html b/doc/0.2/classserial_1_1_serial.html
new file mode 100644
index 0000000..188b3e4
--- /dev/null
+++ b/doc/0.2/classserial_1_1_serial.html
@@ -0,0 +1,1347 @@
+
+
+
+
+
+
#include <serial.h>
+
+
+Data Structures |
+| class | ScopedReadLock |
+| class | ScopedWriteLock |
+
+Public Member Functions |
+| | Serial (const std::string &port="", unsigned long baudrate=9600, long timeout=0, bytesize_t bytesize=eightbits, parity_t parity=parity_none, stopbits_t stopbits=stopbits_one, flowcontrol_t flowcontrol=flowcontrol_none) |
+| virtual | ~Serial () |
+| void | open () |
+| bool | isOpen () const |
+| void | close () |
+| size_t | available () |
+| size_t | read (unsigned char *buffer, size_t size) |
+| size_t | read (std::vector< unsigned char > &buffer, size_t size=1) |
+| size_t | read (std::string &buffer, size_t size=1) |
+| std::string | read (size_t size=1) |
+| size_t | readline (std::string &buffer, size_t size=65536, std::string eol="\n") |
+| std::string | readline (size_t size=65536, std::string eol="\n") |
+| std::vector< std::string > | readlines (size_t size=65536, std::string eol="\n") |
+| size_t | write (const unsigned char *data, size_t size) |
+| size_t | write (const std::vector< unsigned char > &data) |
+| size_t | write (const std::string &data) |
+| void | setPort (const std::string &port) |
+| std::string | getPort () const |
+| void | setTimeout (long timeout) |
+| long | getTimeout () const |
+| void | setBaudrate (unsigned long baudrate) |
+| unsigned long | getBaudrate () const |
+| void | setBytesize (bytesize_t bytesize) |
+| bytesize_t | getBytesize () const |
+| void | setParity (parity_t parity) |
+| parity_t | getParity () const |
+| void | setStopbits (stopbits_t stopbits) |
+| stopbits_t | getStopbits () const |
+| void | setFlowcontrol (flowcontrol_t flowcontrol) |
+| flowcontrol_t | getFlowcontrol () const |
+| void | flush () |
+| void | flushInput () |
+| void | flushOutput () |
+| void | sendBreak (int duration) |
+| void | setBreak (bool level=true) |
+| void | setRTS (bool level=true) |
+| void | setDTR (bool level=true) |
+| bool | getCTS () |
+| bool | getDSR () |
+| bool | getRI () |
+| bool | getCD () |
+
+
Detailed Description
+
Class that provides a portable serial port interface.
+
Constructor & Destructor Documentation
+
+
+
+
+
Constructor, creates a SerialPortBoost object and opens the port.
+
- Parameters:
-
+
+ | 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 buadrate |
+ | timeout | A long that represents the time (in milliseconds) until a timeout on reads occur. Setting this to zero (0) will cause reading to be non-blocking, i.e. the available data will be returned immediately, but it will not block to wait for more. Setting this to a number less than zero (-1) will result in infinite blocking behaviour, i.e. the serial port will block until either size bytes have been read or an exception has occured. |
+ | 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 |
+ | flowcontrol | Type of flowcontrol used, default is flowcontrol_none, possible values are: flowcontrol_none, flowcontrol_software, flowcontrol_hardware |
+ | buffer_size | The maximum size of the internal buffer, defaults to 256 bytes (2^8). |
+
+
+
+
- Exceptions:
-
+
+
+
+
+
+
+
+
+
Member Function Documentation
+
+
+
+
+
Return the number of characters in the buffer.
+
+
+
+
+
+
+
+
Closes the serial port.
+
{
+ pimpl_->close ();
+}
+
+
+
+
+
+
+
+
Flush the input and output buffers
+
{
+ ScopedReadLock(this->pimpl_);
+ ScopedWriteLock(this->pimpl_);
+ pimpl_->flush ();
+ read_cache_.clear ();
+}
+
+
+
+
+
+
+
+
Flush only the input buffer
+
{
+ ScopedReadLock(this->pimpl_);
+ pimpl_->flushInput ();
+}
+
+
+
+
+
+
+
+
Flush only the output buffer
+
{
+ ScopedWriteLock(this->pimpl_);
+ pimpl_->flushOutput ();
+ read_cache_.clear ();
+}
+
+
+
+
+
+
+
+
Gets the baudrate for the serial port.
+
- Returns:
- An integer that sets the baud rate for the serial port.
+
- See also:
- Serial::setBaudrate
+
- Exceptions:
-
+
+ | InvalidConfigurationException | |
+
+
+
+
+
+
+
+
+
+
+
Gets the bytesize for the serial port.
+
- See also:
- Serial::setBytesize
+
- Exceptions:
-
+
+ | InvalidConfigurationException | |
+
+
+
+
+
+
+
+
+
+
+
{
+ return pimpl_->getCD ();
+}
+
+
+
+
+
+
+
+
{
+ return pimpl_->getCTS ();
+}
+
+
+
+
+
+
+
+
{
+ return pimpl_->getDSR ();
+}
+
+
+
+
+
+
+
+
Gets the flow control for the serial port.
+
- See also:
- Serial::setFlowcontrol
+
- Exceptions:
-
+
+ | InvalidConfigurationException | |
+
+
+
+
+
+
+
+
+
+
+
Gets the parity for the serial port.
+
- See also:
- Serial::setParity
+
- Exceptions:
-
+
+ | InvalidConfigurationException | |
+
+
+
+
+
+
+
+
+
+
+
Gets the serial port identifier.
+
- See also:
- Serial::setPort
+
- Exceptions:
-
+
+ | InvalidConfigurationException | |
+
+
+
+
{
+ return pimpl_->getPort ();
+}
+
+
+
+
+
+
+
+
{
+ return pimpl_->getRI ();
+}
+
+
+
+
+
+
+
+
Gets the stopbits for the serial port.
+
- See also:
- Serial::setStopbits
+
- Exceptions:
-
+
+ | InvalidConfigurationException | |
+
+
+
+
+
+
+
+
+
+
+
+
+
Gets the open status of the serial port.
+
- Returns:
- Returns true if the port is open, false otherwise.
+
{
+ return pimpl_->isOpen ();
+}
+
+
+
+
+
+
+
+
Opens the serial port as long as the portname is set and the port isn't alreay open.
+
If the port is provided to the constructor then an explicit call to open is not needed.
+
- See also:
- Serial::Serial
+
- Exceptions:
-
+
+
+
+
{
+ pimpl_->open ();
+}
+
+
+
+
+
+
+
+
+ | size_t Serial::read |
+ ( |
+ unsigned char * |
+ buffer, |
+
+
+ |
+ |
+ size_t |
+ size |
+
+
+ |
+ ) |
+ | |
+
+
+
+
+
Read a given amount of bytes from the serial port.
+
If a timeout is set it may return less characters than requested. With no timeout it will block until the requested number of bytes have been read or until an exception occurs.
+
- Parameters:
-
+
+ | size | A size_t defining how many bytes to be read. |
+
+
+
+
- Returns:
- A std::string containing the data read.
+
{
+ ScopedReadLock (this->pimpl_);
+ return this->pimpl_->read (buffer, size);
+}
+
+
+
+
+
+
+
+
+ | size_t Serial::read |
+ ( |
+ std::vector< unsigned char > & |
+ buffer, |
+
+
+ |
+ |
+ size_t |
+ size = 1 |
+
+
+ |
+ ) |
+ | |
+
+
+
+
+
{
+ ScopedReadLock (this->pimpl_);
+ unsigned char *buffer_ = new unsigned char[size];
+ size_t bytes_read = this->pimpl_->read (buffer_, size);
+ buffer.insert (buffer.end (), buffer_, buffer_+bytes_read);
+ delete[] buffer_;
+ return bytes_read;
+}
+
+
+
+
+
+
+
+
+ | size_t Serial::read |
+ ( |
+ std::string & |
+ buffer, |
+
+
+ |
+ |
+ size_t |
+ size = 1 |
+
+
+ |
+ ) |
+ | |
+
+
+
+
+
{
+ ScopedReadLock (this->pimpl_);
+ unsigned char *buffer_ = new unsigned char[size];
+ size_t bytes_read = this->pimpl_->read (buffer_, size);
+ buffer.append (reinterpret_cast<const char*>(buffer_), bytes_read);
+ delete[] buffer_;
+ return bytes_read;
+}
+
+
+
+
+
+
+
+
{
+ std::string buffer;
+ this->read (buffer, size);
+ return buffer;
+}
+
+
+
+
+
+
+
+
+ | size_t serial::Serial::readline |
+ ( |
+ std::string & |
+ buffer, |
+
+
+ |
+ |
+ size_t |
+ size = 65536, |
+
+
+ |
+ |
+ std::string |
+ eol = "\n" |
+
+
+ |
+ ) |
+ | |
+
+
+
+
+
Reads in a line or until a given delimiter has been processed
+
Reads from the serial port until a single line has been read.
+
- Parameters:
-
+
+ | size | A maximum length of a line, defaults to 65536 (2^16) |
+ | eol | A string to match against for the EOL. |
+
+
+
+
- Returns:
- A std::string containing the line.
+
+
+
+
+
+
+
+
+ | std::string serial::Serial::readline |
+ ( |
+ size_t |
+ size = 65536, |
+
+
+ |
+ |
+ std::string |
+ eol = "\n" |
+
+
+ |
+ ) |
+ | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | vector< string > Serial::readlines |
+ ( |
+ size_t |
+ size = 65536, |
+
+
+ |
+ |
+ std::string |
+ eol = "\n" |
+
+
+ |
+ ) |
+ | |
+
+
+
+
+
Reads in multiple lines until the serail port times out.
+
This requires a timeout > 0 before it can be run. It will read until a timeout occurs and return a list of strings.
+
- Parameters:
-
+
+ | size | A maximum length of combined lines, defaults to 65536 (2^16) |
+ | eol | A string to match against for the EOL. |
+
+
+
+
- Returns:
- A vector<string> containing the lines.
+
{
+ ScopedReadLock (this->pimpl_);
+ std::vector<std::string> lines;
+ size_t eol_len = eol.length ();
+ unsigned char *buffer_ = static_cast<unsigned char*>
+ (alloca (size * sizeof (unsigned char)));
+ size_t read_so_far = 0;
+ size_t start_of_line = 0;
+ while (read_so_far < size) {
+ size_t bytes_read = this->read_ (buffer_+read_so_far, 1);
+ read_so_far += bytes_read;
+ if (bytes_read == 0) {
+ if (start_of_line != read_so_far) {
+ lines.push_back (
+ string (reinterpret_cast<const char*> (buffer_ + start_of_line),
+ read_so_far - start_of_line));
+ }
+ break;
+ }
+ if (string (reinterpret_cast<const char*>
+ (buffer_ + read_so_far - eol_len), eol_len) == eol) {
+
+ lines.push_back(
+ string(reinterpret_cast<const char*> (buffer_ + start_of_line),
+ read_so_far - start_of_line));
+ start_of_line = read_so_far;
+ }
+ if (read_so_far == size) {
+ if (start_of_line != read_so_far) {
+ lines.push_back(
+ string(reinterpret_cast<const char*> (buffer_ + start_of_line),
+ read_so_far - start_of_line));
+ }
+ break;
+ }
+ }
+ return lines;
+}
+
+
+
+
+
+
+
+
+
+
Sets the baudrate for the serial port.
+
Possible baudrates depends on the system but some safe baudrates include: 110, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 56000, 57600, 115200 Some other baudrates that are supported by some comports: 128000, 153600, 230400, 256000, 460800, 921600
+
- Parameters:
-
+
+ | baudrate | An integer that sets the baud rate for the serial port. |
+
+
+
+
- Exceptions:
-
+
+ | InvalidConfigurationException | |
+
+
+
+
+
+
+
+
+
+
+
+
+
Sets the bytesize for the serial port.
+
- Parameters:
-
+
+ | bytesize | Size of each byte in the serial transmission of data, default is eightbits, possible values are: fivebits, sixbits, sevenbits, eightbits |
+
+
+
+
- Exceptions:
-
+
+ | InvalidConfigurationException | |
+
+
+
+
+
+
+
+
+
+
+
{
+ pimpl_->setDTR (level);
+}
+
+
+
+
+
+
+
+
Sets the flow control for the serial port.
+
- Parameters:
-
+
+ | flowcontrol | Type of flowcontrol used, default is flowcontrol_none, possible values are: flowcontrol_none, flowcontrol_software, flowcontrol_hardware |
+
+
+
+
- Exceptions:
-
+
+ | InvalidConfigurationException | |
+
+
+
+
+
+
+
+
+
+
+
Sets the parity for the serial port.
+
- Parameters:
-
+
+ | parity | Method of parity, default is parity_none, possible values are: parity_none, parity_odd, parity_even |
+
+
+
+
- Exceptions:
-
+
+ | InvalidConfigurationException | |
+
+
+
+
+
+
+
+
+
+
+
Sets the serial port identifier.
+
- Parameters:
-
+
+ | port | A const std::string reference containing the address of the serial port, which would be something like 'COM1' on Windows and '/dev/ttyS0' on Linux. |
+
+
+
+
- Exceptions:
-
+
+ | InvalidConfigurationException | |
+
+
+
+
{
+ ScopedReadLock(this->pimpl_);
+ ScopedWriteLock(this->pimpl_);
+ bool was_open = pimpl_->isOpen ();
+ if (was_open) close();
+ pimpl_->setPort (port);
+ if (was_open) open ();
+}
+
+
+
+
+
+
+
+
{
+ pimpl_->setRTS (level);
+}
+
+
+
+
+
+
+
+
Sets the stopbits for the serial port.
+
- Parameters:
-
+
+ | stopbits | Number of stop bits used, default is stopbits_one, possible values are: stopbits_one, stopbits_one_point_five, stopbits_two |
+
+
+
+
- Exceptions:
-
+
+ | InvalidConfigurationException | |
+
+
+
+
+
+
+
+
+
+
+
Sets the timeout for reads in milliseconds.
+
- Parameters:
-
+
+ | timeout | A long that represents the time (in milliseconds) until a timeout on reads occur. Setting this to zero (0) will cause reading to be non-blocking, i.e. the available data will be returned immediately, but it will not block to wait for more. Setting this to a number less than zero (-1) will result in infinite blocking behaviour, i.e. the serial port will block until either size bytes have been read or an exception has occured. |
+
+
+
+
+
+
+
+
+
+
+
+ | size_t serial::Serial::write |
+ ( |
+ const unsigned char * |
+ data, |
+
+
+ |
+ |
+ size_t |
+ size |
+
+
+ |
+ ) |
+ | |
+
+
+
+
+
Write a string to the serial port.
+
- Parameters:
-
+
+ | data | A const reference containg the data to be written to the serial port. |
+
+
+
+
- Returns:
- A size_t representing the number of bytes actually written to the serial port.
+
+
+
+
+
+
+
+
The documentation for this class was generated from the following files:
+
+
+
+
+
+
+
diff --git a/doc/0.2/classserial_1_1_serial_exception_base.html b/doc/0.2/classserial_1_1_serial_exception_base.html
new file mode 100644
index 0000000..34a5906
--- /dev/null
+++ b/doc/0.2/classserial_1_1_serial_exception_base.html
@@ -0,0 +1,119 @@
+
+
+
+
+
+
#include <serial.h>
+
The documentation for this class was generated from the following file:
+
+
+
+
+
+
+
diff --git a/doc/0.2/classserial_1_1_serial_execption.html b/doc/0.2/classserial_1_1_serial_execption.html
new file mode 100644
index 0000000..7d0a8ae
--- /dev/null
+++ b/doc/0.2/classserial_1_1_serial_execption.html
@@ -0,0 +1,168 @@
+
+
+
+
+
+
#include <serial.h>
+
+
+Public Member Functions |
+| | SerialExecption (const char *description) |
+| virtual const char * | what () const throw () |
+
+
Constructor & Destructor Documentation
+
+
+
+
+
: e_what_ (description) {}
+
+
+
+
Member Function Documentation
+
+
+
+
+
{
+ std::stringstream ss;
+ ss << "SerialException " << e_what_ << " failed.";
+ return ss.str ().c_str ();
+ }
+
+
+
+
The documentation for this class was generated from the following file:
+
+
+
+
+
+
+
diff --git a/doc/0.2/classserial_1_1serial_1_1_serial_1_1_serial_impl.html b/doc/0.2/classserial_1_1serial_1_1_serial_1_1_serial_impl.html
new file mode 100644
index 0000000..acc72ec
--- /dev/null
+++ b/doc/0.2/classserial_1_1serial_1_1_serial_1_1_serial_impl.html
@@ -0,0 +1,1936 @@
+
+
+
+
+
+
#include <unix.h>
+
+
+Public Member Functions |
+| | SerialImpl (const string &port, unsigned long baudrate, long timeout, bytesize_t bytesize, parity_t parity, stopbits_t stopbits, flowcontrol_t flowcontrol) |
+| virtual | ~SerialImpl () |
+| void | open () |
+| void | close () |
+| bool | isOpen () const |
+| size_t | available () |
+| size_t | read (unsigned char *buf, size_t size=1) |
+| size_t | write (const string &data) |
+| void | flush () |
+| void | flushInput () |
+| void | flushOutput () |
+| void | sendBreak (int duration) |
+| void | setBreak (bool level) |
+| void | setRTS (bool level) |
+| void | setDTR (bool level) |
+| bool | getCTS () |
+| bool | getDSR () |
+| bool | getRI () |
+| bool | getCD () |
+| void | setPort (const string &port) |
+| string | getPort () const |
+| void | setTimeout (long timeout) |
+| long | getTimeout () const |
+| void | setBaudrate (unsigned long baudrate) |
+| unsigned long | getBaudrate () const |
+| void | setBytesize (bytesize_t bytesize) |
+| bytesize_t | getBytesize () const |
+| void | setParity (parity_t parity) |
+| parity_t | getParity () const |
+| void | setStopbits (stopbits_t stopbits) |
+| stopbits_t | getStopbits () const |
+| void | setFlowcontrol (flowcontrol_t flowcontrol) |
+| flowcontrol_t | getFlowcontrol () const |
+| void | readLock () |
+| void | readUnlock () |
+| void | writeLock () |
+| void | writeUnlock () |
+| | SerialImpl (const string &port, unsigned long baudrate, long timeout, bytesize_t bytesize, parity_t parity, stopbits_t stopbits, flowcontrol_t flowcontrol) |
+| virtual | ~SerialImpl () |
+| void | open () |
+| void | close () |
+| bool | isOpen () const |
+| size_t | available () |
+| size_t | read (char *buf, size_t size=1) |
+| size_t | write (const string &data) |
+| void | flush () |
+| void | flushInput () |
+| void | flushOutput () |
+| void | sendBreak (int duration) |
+| void | setBreak (bool level) |
+| void | setRTS (bool level) |
+| void | setDTR (bool level) |
+| bool | getCTS () |
+| bool | getDSR () |
+| bool | getRI () |
+| bool | getCD () |
+| void | setPort (const string &port) |
+| string | getPort () const |
+| void | setTimeout (long timeout) |
+| long | getTimeout () const |
+| void | setBaudrate (unsigned long baudrate) |
+| unsigned long | getBaudrate () const |
+| void | setBytesize (bytesize_t bytesize) |
+| bytesize_t | getBytesize () const |
+| void | setParity (parity_t parity) |
+| parity_t | getParity () const |
+| void | setStopbits (stopbits_t stopbits) |
+| stopbits_t | getStopbits () const |
+| void | setFlowcontrol (flowcontrol_t flowcontrol) |
+| flowcontrol_t | getFlowcontrol () const |
+
+Protected Member Functions |
+| void | reconfigurePort () |
+| void | reconfigurePort () |
+
+
Constructor & Destructor Documentation
+
+
+
+
+
+
+
+
+
: port_ (port), fd_ (-1), is_open_ (false), xonxoff_ (true), rtscts_ (false),
+ timeout_ (timeout), baudrate_ (baudrate), parity_ (parity),
+ bytesize_ (bytesize), stopbits_ (stopbits), flowcontrol_ (flowcontrol)
+{
+ pthread_mutex_init(&this->read_mutex, NULL);
+ pthread_mutex_init(&this->write_mutex, NULL);
+ if (port_.empty () == false)
+ open ();
+}
+
+
+
+
+
+
+
+
{
+ close();
+ pthread_mutex_destroy(&this->read_mutex);
+ pthread_mutex_destroy(&this->write_mutex);
+}
+
+
+
+
Member Function Documentation
+
+
+
+
+
{
+ if (!is_open_)
+ {
+ return 0;
+ }
+ int count = 0;
+ int result = ioctl (fd_, TIOCINQ, &count);
+ if (result == 0)
+ {
+ return static_cast<size_t> (count);
+ }
+ else
+ {
+ THROW (IOException, errno);
+ }
+}
+
+
+
+
+
+
+
+
+
+
{
+ if (is_open_ == true)
+ {
+ if (fd_ != -1)
+ {
+ ::close (fd_);
+ fd_ = -1;
+ }
+ is_open_ = false;
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{
+ if (is_open_ == false)
+ {
+ throw PortNotOpenedException ("Serial::flushInput");
+ }
+ tcflush (fd_, TCIFLUSH);
+}
+
+
+
+
+
+
+
+
+
+
{
+ if (is_open_ == false)
+ {
+ throw PortNotOpenedException ("Serial::flushOutput");
+ }
+ tcflush (fd_, TCOFLUSH);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{
+ if (is_open_ == false)
+ {
+ throw PortNotOpenedException ("Serial::getCD");
+ }
+ int s = ioctl (fd_, TIOCMGET, 0);
+ return (s & TIOCM_CD) != 0;
+}
+
+
+
+
+
+
+
+
+
+
{
+ if (is_open_ == false)
+ {
+ throw PortNotOpenedException ("Serial::getCTS");
+ }
+ int s = ioctl (fd_, TIOCMGET, 0);
+ return (s & TIOCM_CTS) != 0;
+}
+
+
+
+
+
+
+
+
+
+
{
+ if (is_open_ == false)
+ {
+ throw PortNotOpenedException ("Serial::getDSR");
+ }
+ int s = ioctl (fd_, TIOCMGET, 0);
+ return (s & TIOCM_DSR) != 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{
+ if (is_open_ == false)
+ {
+ throw PortNotOpenedException ("Serial::getRI");
+ }
+ int s = ioctl (fd_, TIOCMGET, 0);
+ return (s & TIOCM_RI) != 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{
+ if (port_.empty ())
+ {
+ throw invalid_argument ("Empty port is invalid.");
+ }
+ if (is_open_ == true)
+ {
+ throw SerialExecption ("Serial port already open.");
+ }
+
+ fd_ = ::open (port_.c_str(), O_RDWR | O_NOCTTY | O_NONBLOCK);
+
+ if (fd_ == -1)
+ {
+ switch (errno)
+ {
+ case EINTR:
+
+ open ();
+ return;
+ case ENFILE:
+ case EMFILE:
+ THROW (IOException, "Too many file handles open.");
+ default:
+ THROW (IOException, errno);
+ }
+ }
+
+ reconfigurePort();
+ is_open_ = true;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{
+ int result = pthread_mutex_lock(&this->read_mutex);
+ if (result) {
+ THROW (IOException, result);
+ }
+}
+
+
+
+
+
+
+
+
{
+ int result = pthread_mutex_unlock(&this->read_mutex);
+ if (result) {
+ THROW (IOException, result);
+ }
+}
+
+
+
+
+
+
+
+
{
+ if (fd_ == -1)
+ {
+
+ THROW (IOException, "Invalid file descriptor, is the serial port open?");
+ }
+
+ struct termios options;
+
+ if (tcgetattr(fd_, &options) == -1)
+ {
+ THROW (IOException, "::tcgetattr");
+ }
+
+
+ options.c_cflag |= (unsigned long) (CLOCAL|CREAD);
+ options.c_lflag &= (unsigned long) ~(ICANON|ECHO|ECHOE|ECHOK|ECHONL|
+ ISIG|IEXTEN);
+
+ options.c_oflag &= (unsigned long) ~(OPOST);
+ options.c_iflag &= (unsigned long) ~(INLCR|IGNCR|ICRNL|IGNBRK);
+#ifdef IUCLC
+ options.c_iflag &= (unsigned long) ~IUCLC;
+#endif
+#ifdef PARMRK
+ options.c_iflag &= (unsigned long) ~PARMRK;
+#endif
+
+
+ bool custom_baud = false;
+ speed_t baud;
+ switch (baudrate_)
+ {
+#ifdef B0
+ case 0: baud = B0; break;
+#endif
+#ifdef B50
+ case 50: baud = B50; break;
+#endif
+#ifdef B75
+ case 75: baud = B75; break;
+#endif
+#ifdef B110
+ case 110: baud = B110; break;
+#endif
+#ifdef B134
+ case 134: baud = B134; break;
+#endif
+#ifdef B150
+ case 150: baud = B150; break;
+#endif
+#ifdef B200
+ case 200: baud = B200; break;
+#endif
+#ifdef B300
+ case 300: baud = B300; break;
+#endif
+#ifdef B600
+ case 600: baud = B600; break;
+#endif
+#ifdef B1200
+ case 1200: baud = B1200; break;
+#endif
+#ifdef B1800
+ case 1800: baud = B1800; break;
+#endif
+#ifdef B2400
+ case 2400: baud = B2400; break;
+#endif
+#ifdef B4800
+ case 4800: baud = B4800; break;
+#endif
+#ifdef B7200
+ case 7200: baud = B7200; break;
+#endif
+#ifdef B9600
+ case 9600: baud = B9600; break;
+#endif
+#ifdef B14400
+ case 14400: baud = B14400; break;
+#endif
+#ifdef B19200
+ case 19200: baud = B19200; break;
+#endif
+#ifdef B28800
+ case 28800: baud = B28800; break;
+#endif
+#ifdef B57600
+ case 57600: baud = B57600; break;
+#endif
+#ifdef B76800
+ case 76800: baud = B76800; break;
+#endif
+#ifdef B38400
+ case 38400: baud = B38400; break;
+#endif
+#ifdef B115200
+ case 115200: baud = B115200; break;
+#endif
+#ifdef B128000
+ case 128000: baud = B128000; break;
+#endif
+#ifdef B153600
+ case 153600: baud = B153600; break;
+#endif
+#ifdef B230400
+ case 230400: baud = B230400; break;
+#endif
+#ifdef B256000
+ case 256000: baud = B256000; break;
+#endif
+#ifdef B460800
+ case 460800: baud = B460800; break;
+#endif
+#ifdef B921600
+ case 921600: baud = B921600; break;
+#endif
+ default:
+ custom_baud = true;
+
+#if defined(__APPLE__) && defined(__MACH__)
+#define IOSSIOSPEED _IOW('T', 2, speed_t)
+ int new_baud = static_cast<int> (baudrate_);
+ if (ioctl (fd_, IOSSIOSPEED, &new_baud, 1) < 0)
+ {
+ THROW (IOException, errno);
+ }
+
+#elif defined(__linux__)
+ struct serial_struct ser;
+ ioctl (fd_, TIOCGSERIAL, &ser);
+
+ ser.custom_divisor = ser.baud_base / baudrate_;
+
+ ser.flags &= ~ASYNC_SPD_MASK;
+ ser.flags |= ASYNC_SPD_CUST;
+
+ if (ioctl (fd_, TIOCSSERIAL, ser) < 0)
+ {
+ THROW (IOException, errno);
+ }
+#else
+ throw invalid_argument ("OS does not currently support custom bauds");
+#endif
+ }
+ if (custom_baud == false)
+ {
+#ifdef _BSD_SOURCE
+ ::cfsetspeed(&options, baud);
+#else
+ ::cfsetispeed(&options, baud);
+ ::cfsetospeed(&options, baud);
+#endif
+ }
+
+
+ options.c_cflag &= (unsigned long) ~CSIZE;
+ if (bytesize_ == eightbits)
+ options.c_cflag |= CS8;
+ else if (bytesize_ == sevenbits)
+ options.c_cflag |= CS7;
+ else if (bytesize_ == sixbits)
+ options.c_cflag |= CS6;
+ else if (bytesize_ == fivebits)
+ options.c_cflag |= CS5;
+ else
+ throw invalid_argument ("invalid char len");
+
+ if (stopbits_ == stopbits_one)
+ options.c_cflag &= (unsigned long) ~(CSTOPB);
+ else if (stopbits_ == stopbits_one_point_five)
+
+ options.c_cflag |= (CSTOPB);
+ else if (stopbits_ == stopbits_two)
+ options.c_cflag |= (CSTOPB);
+ else
+ throw invalid_argument ("invalid stop bit");
+
+ options.c_iflag &= (unsigned long) ~(INPCK|ISTRIP);
+ if (parity_ == parity_none)
+ {
+ options.c_cflag &= (unsigned long) ~(PARENB|PARODD);
+ }
+ else if (parity_ == parity_even)
+ {
+ options.c_cflag &= (unsigned long) ~(PARODD);
+ options.c_cflag |= (PARENB);
+ }
+ else if (parity_ == parity_odd)
+ {
+ options.c_cflag |= (PARENB|PARODD);
+ }
+ else
+ {
+ throw invalid_argument ("invalid parity");
+ }
+
+
+#ifdef IXANY
+ if (xonxoff_)
+ options.c_iflag |= (IXON|IXOFF);
+ else
+ options.c_iflag &= (unsigned long) ~(IXON|IXOFF|IXANY);
+#else
+ if (xonxoff_)
+ options.c_iflag |= (IXON|IXOFF);
+ else
+ options.c_iflag &= (unsigned long) ~(IXON|IXOFF);
+#endif
+
+#ifdef CRTSCTS
+ if (rtscts_)
+ options.c_cflag |= (CRTSCTS);
+ else
+ options.c_cflag &= (unsigned long) ~(CRTSCTS);
+#elif defined CNEW_RTSCTS
+ if (rtscts_)
+ options.c_cflag |= (CNEW_RTSCTS);
+ else
+ options.c_cflag &= (unsigned long) ~(CNEW_RTSCTS);
+#else
+#error "OS Support seems wrong."
+#endif
+
+
+
+
+
+ options.c_cc[VMIN] = 0;
+ options.c_cc[VTIME] = 0;
+
+
+ ::tcsetattr (fd_, TCSANOW, &options);
+}
+
+
+
+
+
+
+
+
+
+
{
+ if (is_open_ == false)
+ {
+ throw PortNotOpenedException ("Serial::sendBreak");
+ }
+ tcsendbreak (fd_, static_cast<int> (duration/4));
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{
+ if (is_open_ == false)
+ {
+ throw PortNotOpenedException ("Serial::setBreak");
+ }
+ if (level)
+ {
+ ioctl (fd_, TIOCSBRK);
+ }
+ else {
+ ioctl (fd_, TIOCCBRK);
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{
+ if (is_open_ == false)
+ {
+ throw PortNotOpenedException ("Serial::setDTR");
+ }
+ if (level)
+ {
+ ioctl (fd_, TIOCMBIS, TIOCM_DTR);
+ }
+ else
+ {
+ ioctl (fd_, TIOCMBIC, TIOCM_DTR);
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{
+ if (is_open_ == false)
+ {
+ throw PortNotOpenedException ("Serial::setRTS");
+ }
+ if (level)
+ {
+ ioctl (fd_, TIOCMBIS, TIOCM_RTS);
+ }
+ else {
+ ioctl (fd_, TIOCMBIC, TIOCM_RTS);
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{
+ timeout_ = timeout;
+}
+
+
+
+
+
+
+
+
+
+
{
+ if (is_open_ == false)
+ {
+ throw PortNotOpenedException ("Serial::write");
+ }
+
+ return static_cast<size_t> (::write (fd_, data.c_str (), data.length ()));
+}
+
+
+
+
+
+
+
+
+
+
{
+ int result = pthread_mutex_lock(&this->write_mutex);
+ if (result) {
+ THROW (IOException, result);
+ }
+}
+
+
+
+
+
+
+
+
{
+ int result = pthread_mutex_unlock(&this->write_mutex);
+ if (result) {
+ THROW (IOException, result);
+ }
+}
+
+
+
+
The documentation for this class was generated from the following files:
+
+
+
+
+
+
+
diff --git a/doc/0.2/closed.png b/doc/0.2/closed.png
new file mode 100644
index 0000000..b7d4bd9
Binary files /dev/null and b/doc/0.2/closed.png differ
diff --git a/doc/0.2/doxygen.css b/doc/0.2/doxygen.css
new file mode 100644
index 0000000..c151fde
--- /dev/null
+++ b/doc/0.2/doxygen.css
@@ -0,0 +1,1012 @@
+/* The standard CSS for doxygen */
+
+body, table, div, p, dl {
+ font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
+ font-size: 13px;
+ line-height: 1.3;
+}
+
+/* @group Heading Levels */
+
+h1 {
+ font-size: 150%;
+}
+
+.title {
+ font-size: 150%;
+ font-weight: bold;
+ margin: 10px 2px;
+}
+
+h2 {
+ font-size: 120%;
+}
+
+h3 {
+ font-size: 100%;
+}
+
+dt {
+ font-weight: bold;
+}
+
+div.multicol {
+ -moz-column-gap: 1em;
+ -webkit-column-gap: 1em;
+ -moz-column-count: 3;
+ -webkit-column-count: 3;
+}
+
+p.startli, p.startdd, p.starttd {
+ margin-top: 2px;
+}
+
+p.endli {
+ margin-bottom: 0px;
+}
+
+p.enddd {
+ margin-bottom: 4px;
+}
+
+p.endtd {
+ margin-bottom: 2px;
+}
+
+/* @end */
+
+caption {
+ font-weight: bold;
+}
+
+span.legend {
+ font-size: 70%;
+ text-align: center;
+}
+
+h3.version {
+ font-size: 90%;
+ text-align: center;
+}
+
+div.qindex, div.navtab{
+ background-color: #EBEFF6;
+ border: 1px solid #A3B4D7;
+ text-align: center;
+}
+
+div.qindex, div.navpath {
+ width: 100%;
+ line-height: 140%;
+}
+
+div.navtab {
+ margin-right: 15px;
+}
+
+/* @group Link Styling */
+
+a {
+ color: #3D578C;
+ font-weight: normal;
+ text-decoration: none;
+}
+
+.contents a:visited {
+ color: #4665A2;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+a.qindex {
+ font-weight: bold;
+}
+
+a.qindexHL {
+ font-weight: bold;
+ background-color: #9CAFD4;
+ color: #ffffff;
+ border: 1px double #869DCA;
+}
+
+.contents a.qindexHL:visited {
+ color: #ffffff;
+}
+
+a.el {
+ font-weight: bold;
+}
+
+a.elRef {
+}
+
+a.code, a.code:visited {
+ color: #4665A2;
+}
+
+a.codeRef, a.codeRef:visited {
+ color: #4665A2;
+}
+
+/* @end */
+
+dl.el {
+ margin-left: -1cm;
+}
+
+.fragment {
+ font-family: monospace, fixed;
+ font-size: 105%;
+}
+
+pre.fragment {
+ border: 1px solid #C4CFE5;
+ background-color: #FBFCFD;
+ padding: 4px 6px;
+ margin: 4px 8px 4px 2px;
+ overflow: auto;
+ word-wrap: break-word;
+ font-size: 9pt;
+ line-height: 125%;
+}
+
+div.ah {
+ background-color: black;
+ font-weight: bold;
+ color: #ffffff;
+ margin-bottom: 3px;
+ margin-top: 3px;
+ padding: 0.2em;
+ border: solid thin #333;
+ border-radius: 0.5em;
+ -webkit-border-radius: .5em;
+ -moz-border-radius: .5em;
+ box-shadow: 2px 2px 3px #999;
+ -webkit-box-shadow: 2px 2px 3px #999;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
+ background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
+}
+
+div.groupHeader {
+ margin-left: 16px;
+ margin-top: 12px;
+ font-weight: bold;
+}
+
+div.groupText {
+ margin-left: 16px;
+ font-style: italic;
+}
+
+body {
+ background-color: white;
+ color: black;
+ margin: 0;
+}
+
+div.contents {
+ margin-top: 10px;
+ margin-left: 8px;
+ margin-right: 8px;
+}
+
+td.indexkey {
+ background-color: #EBEFF6;
+ font-weight: bold;
+ border: 1px solid #C4CFE5;
+ margin: 2px 0px 2px 0;
+ padding: 2px 10px;
+ white-space: nowrap;
+ vertical-align: top;
+}
+
+td.indexvalue {
+ background-color: #EBEFF6;
+ border: 1px solid #C4CFE5;
+ padding: 2px 10px;
+ margin: 2px 0px;
+}
+
+tr.memlist {
+ background-color: #EEF1F7;
+}
+
+p.formulaDsp {
+ text-align: center;
+}
+
+img.formulaDsp {
+
+}
+
+img.formulaInl {
+ vertical-align: middle;
+}
+
+div.center {
+ text-align: center;
+ margin-top: 0px;
+ margin-bottom: 0px;
+ padding: 0px;
+}
+
+div.center img {
+ border: 0px;
+}
+
+address.footer {
+ text-align: right;
+ padding-right: 12px;
+}
+
+img.footer {
+ border: 0px;
+ vertical-align: middle;
+}
+
+/* @group Code Colorization */
+
+span.keyword {
+ color: #008000
+}
+
+span.keywordtype {
+ color: #604020
+}
+
+span.keywordflow {
+ color: #e08000
+}
+
+span.comment {
+ color: #800000
+}
+
+span.preprocessor {
+ color: #806020
+}
+
+span.stringliteral {
+ color: #002080
+}
+
+span.charliteral {
+ color: #008080
+}
+
+span.vhdldigit {
+ color: #ff00ff
+}
+
+span.vhdlchar {
+ color: #000000
+}
+
+span.vhdlkeyword {
+ color: #700070
+}
+
+span.vhdllogic {
+ color: #ff0000
+}
+
+blockquote {
+ background-color: #F7F8FB;
+ border-left: 2px solid #9CAFD4;
+ margin: 0 24px 0 4px;
+ padding: 0 12px 0 16px;
+}
+
+/* @end */
+
+/*
+.search {
+ color: #003399;
+ font-weight: bold;
+}
+
+form.search {
+ margin-bottom: 0px;
+ margin-top: 0px;
+}
+
+input.search {
+ font-size: 75%;
+ color: #000080;
+ font-weight: normal;
+ background-color: #e8eef2;
+}
+*/
+
+td.tiny {
+ font-size: 75%;
+}
+
+.dirtab {
+ padding: 4px;
+ border-collapse: collapse;
+ border: 1px solid #A3B4D7;
+}
+
+th.dirtab {
+ background: #EBEFF6;
+ font-weight: bold;
+}
+
+hr {
+ height: 0px;
+ border: none;
+ border-top: 1px solid #4A6AAA;
+}
+
+hr.footer {
+ height: 1px;
+}
+
+/* @group Member Descriptions */
+
+table.memberdecls {
+ border-spacing: 0px;
+ padding: 0px;
+}
+
+.mdescLeft, .mdescRight,
+.memItemLeft, .memItemRight,
+.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
+ background-color: #F9FAFC;
+ border: none;
+ margin: 4px;
+ padding: 1px 0 0 8px;
+}
+
+.mdescLeft, .mdescRight {
+ padding: 0px 8px 4px 8px;
+ color: #555;
+}
+
+.memItemLeft, .memItemRight, .memTemplParams {
+ border-top: 1px solid #C4CFE5;
+}
+
+.memItemLeft, .memTemplItemLeft {
+ white-space: nowrap;
+}
+
+.memItemRight {
+ width: 100%;
+}
+
+.memTemplParams {
+ color: #4665A2;
+ white-space: nowrap;
+}
+
+/* @end */
+
+/* @group Member Details */
+
+/* Styles for detailed member documentation */
+
+.memtemplate {
+ font-size: 80%;
+ color: #4665A2;
+ font-weight: normal;
+ margin-left: 9px;
+}
+
+.memnav {
+ background-color: #EBEFF6;
+ border: 1px solid #A3B4D7;
+ text-align: center;
+ margin: 2px;
+ margin-right: 15px;
+ padding: 2px;
+}
+
+.mempage {
+ width: 100%;
+}
+
+.memitem {
+ padding: 0;
+ margin-bottom: 10px;
+ margin-right: 5px;
+}
+
+.memname {
+ white-space: nowrap;
+ font-weight: bold;
+ margin-left: 6px;
+}
+
+.memproto, dl.reflist dt {
+ border-top: 1px solid #A8B8D9;
+ border-left: 1px solid #A8B8D9;
+ border-right: 1px solid #A8B8D9;
+ padding: 6px 0px 6px 0px;
+ color: #253555;
+ font-weight: bold;
+ text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
+ /* opera specific markup */
+ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ border-top-right-radius: 8px;
+ border-top-left-radius: 8px;
+ /* firefox specific markup */
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+ -moz-border-radius-topright: 8px;
+ -moz-border-radius-topleft: 8px;
+ /* webkit specific markup */
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ -webkit-border-top-right-radius: 8px;
+ -webkit-border-top-left-radius: 8px;
+ background-image:url('nav_f.png');
+ background-repeat:repeat-x;
+ background-color: #E2E8F2;
+
+}
+
+.memdoc, dl.reflist dd {
+ border-bottom: 1px solid #A8B8D9;
+ border-left: 1px solid #A8B8D9;
+ border-right: 1px solid #A8B8D9;
+ padding: 2px 5px;
+ background-color: #FBFCFD;
+ border-top-width: 0;
+ /* opera specific markup */
+ border-bottom-left-radius: 8px;
+ border-bottom-right-radius: 8px;
+ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ /* firefox specific markup */
+ -moz-border-radius-bottomleft: 8px;
+ -moz-border-radius-bottomright: 8px;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+ background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7);
+ /* webkit specific markup */
+ -webkit-border-bottom-left-radius: 8px;
+ -webkit-border-bottom-right-radius: 8px;
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7));
+}
+
+dl.reflist dt {
+ padding: 5px;
+}
+
+dl.reflist dd {
+ margin: 0px 0px 10px 0px;
+ padding: 5px;
+}
+
+.paramkey {
+ text-align: right;
+}
+
+.paramtype {
+ white-space: nowrap;
+}
+
+.paramname {
+ color: #602020;
+ white-space: nowrap;
+}
+.paramname em {
+ font-style: normal;
+}
+
+.params, .retval, .exception, .tparams {
+ border-spacing: 6px 2px;
+}
+
+.params .paramname, .retval .paramname {
+ font-weight: bold;
+ vertical-align: top;
+}
+
+.params .paramtype {
+ font-style: italic;
+ vertical-align: top;
+}
+
+.params .paramdir {
+ font-family: "courier new",courier,monospace;
+ vertical-align: top;
+}
+
+
+
+
+/* @end */
+
+/* @group Directory (tree) */
+
+/* for the tree view */
+
+.ftvtree {
+ font-family: sans-serif;
+ margin: 0px;
+}
+
+/* these are for tree view when used as main index */
+
+.directory {
+ font-size: 9pt;
+ font-weight: bold;
+ margin: 5px;
+}
+
+.directory h3 {
+ margin: 0px;
+ margin-top: 1em;
+ font-size: 11pt;
+}
+
+/*
+The following two styles can be used to replace the root node title
+with an image of your choice. Simply uncomment the next two styles,
+specify the name of your image and be sure to set 'height' to the
+proper pixel height of your image.
+*/
+
+/*
+.directory h3.swap {
+ height: 61px;
+ background-repeat: no-repeat;
+ background-image: url("yourimage.gif");
+}
+.directory h3.swap span {
+ display: none;
+}
+*/
+
+.directory > h3 {
+ margin-top: 0;
+}
+
+.directory p {
+ margin: 0px;
+ white-space: nowrap;
+}
+
+.directory div {
+ display: none;
+ margin: 0px;
+}
+
+.directory img {
+ vertical-align: -30%;
+}
+
+/* these are for tree view when not used as main index */
+
+.directory-alt {
+ font-size: 100%;
+ font-weight: bold;
+}
+
+.directory-alt h3 {
+ margin: 0px;
+ margin-top: 1em;
+ font-size: 11pt;
+}
+
+.directory-alt > h3 {
+ margin-top: 0;
+}
+
+.directory-alt p {
+ margin: 0px;
+ white-space: nowrap;
+}
+
+.directory-alt div {
+ display: none;
+ margin: 0px;
+}
+
+.directory-alt img {
+ vertical-align: -30%;
+}
+
+/* @end */
+
+div.dynheader {
+ margin-top: 8px;
+}
+
+address {
+ font-style: normal;
+ color: #2A3D61;
+}
+
+table.doxtable {
+ border-collapse:collapse;
+ margin-top: 4px;
+ margin-bottom: 4px;
+}
+
+table.doxtable td, table.doxtable th {
+ border: 1px solid #2D4068;
+ padding: 3px 7px 2px;
+}
+
+table.doxtable th {
+ background-color: #374F7F;
+ color: #FFFFFF;
+ font-size: 110%;
+ padding-bottom: 4px;
+ padding-top: 5px;
+}
+
+table.fieldtable {
+ width: 100%;
+ margin-bottom: 10px;
+ border: 1px solid #A8B8D9;
+ border-spacing: 0px;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
+ -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
+ box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
+}
+
+.fieldtable td, .fieldtable th {
+ padding: 3px 7px 2px;
+}
+
+.fieldtable td.fieldtype, .fieldtable td.fieldname {
+ white-space: nowrap;
+ border-right: 1px solid #A8B8D9;
+ border-bottom: 1px solid #A8B8D9;
+ vertical-align: top;
+}
+
+.fieldtable td.fielddoc {
+ border-bottom: 1px solid #A8B8D9;
+ width: 100%;
+}
+
+.fieldtable tr:last-child td {
+ border-bottom: none;
+}
+
+.fieldtable th {
+ background-image:url('nav_f.png');
+ background-repeat:repeat-x;
+ background-color: #E2E8F2;
+ font-size: 90%;
+ color: #253555;
+ padding-bottom: 4px;
+ padding-top: 5px;
+ text-align:left;
+ -moz-border-radius-topleft: 4px;
+ -moz-border-radius-topright: 4px;
+ -webkit-border-top-left-radius: 4px;
+ -webkit-border-top-right-radius: 4px;
+ border-top-left-radius: 4px;
+ border-top-right-radius: 4px;
+ border-bottom: 1px solid #A8B8D9;
+}
+
+
+.tabsearch {
+ top: 0px;
+ left: 10px;
+ height: 36px;
+ background-image: url('tab_b.png');
+ z-index: 101;
+ overflow: hidden;
+ font-size: 13px;
+}
+
+.navpath ul
+{
+ font-size: 11px;
+ background-image:url('tab_b.png');
+ background-repeat:repeat-x;
+ height:30px;
+ line-height:30px;
+ color:#8AA0CC;
+ border:solid 1px #C2CDE4;
+ overflow:hidden;
+ margin:0px;
+ padding:0px;
+}
+
+.navpath li
+{
+ list-style-type:none;
+ float:left;
+ padding-left:10px;
+ padding-right:15px;
+ background-image:url('bc_s.png');
+ background-repeat:no-repeat;
+ background-position:right;
+ color:#364D7C;
+}
+
+.navpath li.navelem a
+{
+ height:32px;
+ display:block;
+ text-decoration: none;
+ outline: none;
+}
+
+.navpath li.navelem a:hover
+{
+ color:#6884BD;
+}
+
+.navpath li.footer
+{
+ list-style-type:none;
+ float:right;
+ padding-left:10px;
+ padding-right:15px;
+ background-image:none;
+ background-repeat:no-repeat;
+ background-position:right;
+ color:#364D7C;
+ font-size: 8pt;
+}
+
+
+div.summary
+{
+ float: right;
+ font-size: 8pt;
+ padding-right: 5px;
+ width: 50%;
+ text-align: right;
+}
+
+div.summary a
+{
+ white-space: nowrap;
+}
+
+div.ingroups
+{
+ margin-left: 5px;
+ font-size: 8pt;
+ padding-left: 5px;
+ width: 50%;
+ text-align: left;
+}
+
+div.ingroups a
+{
+ white-space: nowrap;
+}
+
+div.header
+{
+ background-image:url('nav_h.png');
+ background-repeat:repeat-x;
+ background-color: #F9FAFC;
+ margin: 0px;
+ border-bottom: 1px solid #C4CFE5;
+}
+
+div.headertitle
+{
+ padding: 5px 5px 5px 7px;
+}
+
+dl
+{
+ padding: 0 0 0 10px;
+}
+
+/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */
+dl.section
+{
+ border-left:4px solid;
+ padding: 0 0 0 6px;
+}
+
+dl.note
+{
+ border-color: #D0C000;
+}
+
+dl.warning, dl.attention
+{
+ border-color: #FF0000;
+}
+
+dl.pre, dl.post, dl.invariant
+{
+ border-color: #00D000;
+}
+
+dl.deprecated
+{
+ border-color: #505050;
+}
+
+dl.todo
+{
+ border-color: #00C0E0;
+}
+
+dl.test
+{
+ border-color: #3030E0;
+}
+
+dl.bug
+{
+ border-color: #C08050;
+}
+
+dl.section dd {
+ margin-bottom: 6px;
+}
+
+
+#projectlogo
+{
+ text-align: center;
+ vertical-align: bottom;
+ border-collapse: separate;
+}
+
+#projectlogo img
+{
+ border: 0px none;
+}
+
+#projectname
+{
+ font: 300% Tahoma, Arial,sans-serif;
+ margin: 0px;
+ padding: 2px 0px;
+}
+
+#projectbrief
+{
+ font: 120% Tahoma, Arial,sans-serif;
+ margin: 0px;
+ padding: 0px;
+}
+
+#projectnumber
+{
+ font: 50% Tahoma, Arial,sans-serif;
+ margin: 0px;
+ padding: 0px;
+}
+
+#titlearea
+{
+ padding: 0px;
+ margin: 0px;
+ width: 100%;
+ border-bottom: 1px solid #5373B4;
+}
+
+.image
+{
+ text-align: center;
+}
+
+.dotgraph
+{
+ text-align: center;
+}
+
+.mscgraph
+{
+ text-align: center;
+}
+
+.caption
+{
+ font-weight: bold;
+}
+
+div.zoom
+{
+ border: 1px solid #90A5CE;
+}
+
+dl.citelist {
+ margin-bottom:50px;
+}
+
+dl.citelist dt {
+ color:#334975;
+ float:left;
+ font-weight:bold;
+ margin-right:10px;
+ padding:5px;
+}
+
+dl.citelist dd {
+ margin:2px 0;
+ padding:5px 0;
+}
+
+div.toc {
+ padding: 14px 25px;
+ background-color: #F4F6FA;
+ border: 1px solid #D8DFEE;
+ border-radius: 7px 7px 7px 7px;
+ float: right;
+ height: auto;
+ margin: 0 20px 10px 10px;
+ width: 200px;
+}
+
+div.toc li {
+ background: url("bdwn.png") no-repeat scroll 0 5px transparent;
+ font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif;
+ margin-top: 5px;
+ padding-left: 10px;
+ padding-top: 2px;
+}
+
+div.toc h3 {
+ font: bold 12px/1.2 Arial,FreeSans,sans-serif;
+ color: #4665A2;
+ border-bottom: 0 none;
+ margin: 0;
+}
+
+div.toc ul {
+ list-style: none outside none;
+ border: medium none;
+ padding: 0px;
+}
+
+div.toc li.level1 {
+ margin-left: 0px;
+}
+
+div.toc li.level2 {
+ margin-left: 15px;
+}
+
+div.toc li.level3 {
+ margin-left: 30px;
+}
+
+div.toc li.level4 {
+ margin-left: 45px;
+}
+
+
+@media print
+{
+ #top { display: none; }
+ #side-nav { display: none; }
+ #nav-path { display: none; }
+ body { overflow:visible; }
+ h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
+ .summary { display: none; }
+ .memitem { page-break-inside: avoid; }
+ #doc-content
+ {
+ margin-left:0 !important;
+ height:auto !important;
+ width:auto !important;
+ overflow:inherit;
+ display:inline;
+ }
+ pre.fragment
+ {
+ overflow: visible;
+ text-wrap: unrestricted;
+ white-space: -moz-pre-wrap; /* Moz */
+ white-space: -pre-wrap; /* Opera 4-6 */
+ white-space: -o-pre-wrap; /* Opera 7 */
+ white-space: pre-wrap; /* CSS3 */
+ word-wrap: break-word; /* IE 5.5+ */
+ }
+}
+
diff --git a/doc/0.2/doxygen.png b/doc/0.2/doxygen.png
new file mode 100644
index 0000000..635ed52
Binary files /dev/null and b/doc/0.2/doxygen.png differ
diff --git a/doc/0.2/files.html b/doc/0.2/files.html
new file mode 100644
index 0000000..a3031a2
--- /dev/null
+++ b/doc/0.2/files.html
@@ -0,0 +1,115 @@
+
+
+
+
+
Here is a list of all files with brief descriptions:
+
+
+
+
+
+
+
diff --git a/doc/0.2/functions.html b/doc/0.2/functions.html
new file mode 100644
index 0000000..dc97004
--- /dev/null
+++ b/doc/0.2/functions.html
@@ -0,0 +1,366 @@
+
+
+
+
+
Here is a list of all struct and union fields with links to the structures/unions they belong to:
+
+
- a -
+
+
+
- c -
+
+
+
- f -
+
+
+
- g -
+- getBaudrate()
+: serial::Serial
+, serial::serial::Serial::SerialImpl
+
+- getBytesize()
+: serial::Serial
+, serial::serial::Serial::SerialImpl
+
+- getCD()
+: serial::serial::Serial::SerialImpl
+, serial::Serial
+
+- getCTS()
+: serial::Serial
+, serial::serial::Serial::SerialImpl
+
+- getDSR()
+: serial::Serial
+, serial::serial::Serial::SerialImpl
+
+- getErrorNumber()
+: serial::IOException
+
+- getFlowcontrol()
+: serial::Serial
+, serial::serial::Serial::SerialImpl
+
+- getParity()
+: serial::Serial
+, serial::serial::Serial::SerialImpl
+
+- getPort()
+: serial::serial::Serial::SerialImpl
+, serial::Serial
+
+- getRI()
+: serial::serial::Serial::SerialImpl
+, serial::Serial
+
+- getStopbits()
+: serial::serial::Serial::SerialImpl
+, serial::Serial
+, serial::serial::Serial::SerialImpl
+
+- getTimeout()
+: serial::serial::Serial::SerialImpl
+, serial::Serial
+, serial::serial::Serial::SerialImpl
+
+
+
+
+
- i -
+
+
+
- o -
+
+
+
- p -
+
+
+
- r -
+
+
+
- s -
+- ScopedReadLock()
+: serial::Serial::ScopedReadLock
+
+- ScopedWriteLock()
+: serial::Serial::ScopedWriteLock
+
+- sendBreak()
+: serial::serial::Serial::SerialImpl
+, serial::Serial
+
+- Serial()
+: serial::Serial
+
+- SerialExecption()
+: serial::SerialExecption
+
+- SerialImpl()
+: serial::serial::Serial::SerialImpl
+
+- setBaudrate()
+: serial::Serial
+, serial::serial::Serial::SerialImpl
+
+- setBreak()
+: serial::Serial
+, serial::serial::Serial::SerialImpl
+
+- setBytesize()
+: serial::Serial
+, serial::serial::Serial::SerialImpl
+
+- setDTR()
+: serial::Serial
+, serial::serial::Serial::SerialImpl
+
+- setFlowcontrol()
+: serial::serial::Serial::SerialImpl
+, serial::Serial
+, serial::serial::Serial::SerialImpl
+
+- setParity()
+: serial::Serial
+, serial::serial::Serial::SerialImpl
+
+- setPort()
+: serial::serial::Serial::SerialImpl
+, serial::Serial
+
+- setRTS()
+: serial::serial::Serial::SerialImpl
+, serial::Serial
+
+- setStopbits()
+: serial::Serial
+, serial::serial::Serial::SerialImpl
+
+- setTimeout()
+: serial::Serial
+, serial::serial::Serial::SerialImpl
+
+
+
+
+
- w -
+
+
+
- ~ -
+
+
+
+
+
+
+
diff --git a/doc/0.2/functions_func.html b/doc/0.2/functions_func.html
new file mode 100644
index 0000000..5a64b89
--- /dev/null
+++ b/doc/0.2/functions_func.html
@@ -0,0 +1,366 @@
+
+
+
+
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+
+
+
+
+
+
+
diff --git a/doc/0.2/globals_defs.html b/doc/0.2/globals_defs.html
new file mode 100644
index 0000000..353106c
--- /dev/null
+++ b/doc/0.2/globals_defs.html
@@ -0,0 +1,118 @@
+
+
+
+
+
This page explains how to interpret the graphs that are generated by doxygen.
+
Consider the following example:
+
+class Invisible { };
+
+
+class Truncated : public Invisible { };
+
+
+class Undocumented { };
+
+
+class PublicBase : public Truncated { };
+
+
+template<class T> class Templ { };
+
+
+class ProtectedBase { };
+
+
+class PrivateBase { };
+
+
+class Used { };
+
+
+class Inherited : public PublicBase,
+ protected ProtectedBase,
+ private PrivateBase,
+ public Undocumented,
+ public Templ<int>
+{
+ private:
+ Used *m_usedClass;
+};
+ This will result in the following graph:
+
+

+
+The boxes in the above graph have the following meaning:
+
+-
+A filled gray box represents the struct or class for which the graph is generated.
+-
+A box with a black border denotes a documented struct or class.
+-
+A box with a grey border denotes an undocumented struct or class.
+-
+A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
+
+
The arrows have the following meaning:
+
+-
+A dark blue arrow is used to visualize a public inheritance relation between two classes.
+-
+A dark green arrow is used for protected inheritance.
+-
+A dark red arrow is used for private inheritance.
+-
+A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
+-
+A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
+
+
+
+
+
+
+
+
diff --git a/doc/0.2/graph_legend.md5 b/doc/0.2/graph_legend.md5
new file mode 100644
index 0000000..c0a4490
--- /dev/null
+++ b/doc/0.2/graph_legend.md5
@@ -0,0 +1 @@
+70d597617e34367275a35eeb8fb7ea07
\ No newline at end of file
diff --git a/doc/0.2/graph_legend.png b/doc/0.2/graph_legend.png
new file mode 100644
index 0000000..c68e946
Binary files /dev/null and b/doc/0.2/graph_legend.png differ
diff --git a/doc/0.2/index.html b/doc/0.2/index.html
new file mode 100644
index 0000000..bca69ec
--- /dev/null
+++ b/doc/0.2/index.html
@@ -0,0 +1,101 @@
+
+
+
+