#include <conexus/serial.h>
Inheritance diagram for Conexus::Serial:
It is likely that it will be extended one level deeper in the inheritance hierarchy and replaced by an ancestor that provides file I/O to be used with traditional files and with Unix named pipes.
Public Types | |
typedef boost::shared_ptr< Serial > | pointer |
Public Member Functions | |
Serial (const std::string &device=std::string(), unsigned long readwrite=READ|WRITE) | |
virtual void | open (const std::string name, int state=READ|WRITE) throw (open_error) |
Opens the named serial port device in the specified mode. | |
virtual void | open () throw (open_error) |
Will attempt to open the serial port if a device has been specified. | |
std::string | device () |
Will return the string representing the device associated with this serial object. | |
void | set_device (const std::string &d, long unsigned state=READ|WRITE) throw (open_error) |
Sets the string representing the device associated with this serial object. | |
sigc::signal< void > | signal_device_changed () |
virtual void | start (ReadWrite rw=Conexus::READ, bool use_dispatcher=false) |
virtual const std::string & | object_type () |
Static Public Member Functions | |
static Serial::pointer | create (const std::string &device=std::string(), unsigned long readwrite=READ|WRITE) |
Protected Attributes | |
std::string | m_device |
sigc::signal< void > | m_signal_device_changed |
|
Will attempt to open the serial port if a device has been specified. Otherwise an error will be thrown. Implements Conexus::Endpoint. |
|
Sets the string representing the device associated with this serial object. If the serial device is currently open and d is not equal to the current device, the current device will be closed. Also, if auto_open is set, the new device will be immediately opened. Additionally, this method checks whether the parameter d is the same as the current device, and parameter mode is the same as the current mode. If both are equal, the device will not be closed and reopened unless force=true. |