#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 ConexusPointer< Serial > | pointer |
typedef ConexusPointer< Serial > | pointer |
typedef ConexusPointer< Serial > | pointer |
Public Member Functions | |
virtual void | open (const std::string name, long unsigned mode=SERIAL_UNCHANGED) throw ( open_exception ) |
Opens the named serial port device in the specified mode. | |
virtual void | open () throw ( open_exception ) |
Will attempt to open the serial port if a device has been specified. | |
long unsigned | mode () |
std::string | device () |
Will return the string representing the device associated with this serial object. | |
void | set_device (const std::string &d, long unsigned mode=SERIAL_UNCHANGED) throw ( open_exception ) |
Sets the string representing the device associated with this serial object. | |
sigc::signal< void > | signal_device_changed () |
Serial (const std::string &device=std::string(), long unsigned mode=SERIAL_READ|SERIAL_WRITE) | |
virtual void | open (const std::string name, long unsigned mode=SERIAL_UNCHANGED) throw (open_exception) |
Opens the named serial port device in the specified mode. | |
virtual void | open () throw (open_exception) |
Will attempt to open the serial port if a device has been specified. | |
long unsigned | mode () |
std::string | device () |
Will return the string representing the device associated with this serial object. | |
void | set_device (const std::string &d, long unsigned mode=SERIAL_UNCHANGED) throw (open_exception) |
Sets the string representing the device associated with this serial object. | |
sigc::signal< void > | signal_device_changed () |
virtual const std::string & | object_type () |
Serial (const std::string &device=std::string(), long unsigned mode=SERIAL_READ|SERIAL_WRITE) | |
virtual void | open (const std::string name, long unsigned mode=SERIAL_UNCHANGED) throw (open_exception) |
Opens the named serial port device in the specified mode. | |
virtual void | open () throw (open_exception) |
Will attempt to open the serial port if a device has been specified. | |
long unsigned | mode () |
std::string | device () |
Will return the string representing the device associated with this serial object. | |
void | set_device (const std::string &d, long unsigned mode=SERIAL_UNCHANGED) throw (open_exception) |
Sets the string representing the device associated with this serial object. | |
sigc::signal< void > | signal_device_changed () |
virtual const std::string & | object_type () |
Static Public Member Functions | |
static Serial::pointer | create (const std::string &device=std::string(), long unsigned mode=SERIAL_READ|SERIAL_WRITE) |
static Serial::pointer | create (const std::string &device=std::string(), long unsigned mode=SERIAL_READ|SERIAL_WRITE) |
static Serial::pointer | create (const std::string &device=std::string(), long unsigned mode=SERIAL_READ|SERIAL_WRITE) |
Protected Member Functions | |
Serial (const std::string &device=std::string(), long unsigned mode=SERIAL_READ|SERIAL_WRITE) | |
Protected Attributes | |
std::string | m_device |
long unsigned | m_mode |
sigc::signal< void > | m_signal_device_changed |
sigc::signal< void > | m_signal_device_changed |
sigc::signal< void > | m_signal_device_changed |
void Conexus::Serial::open | ( | ) | throw ( open_exception ) [virtual] |
Will attempt to open the serial port if a device has been specified.
Otherwise an exception will be thrown.
Implements Conexus::Endpoint.
void Conexus::Serial::set_device | ( | const std::string & | d, | |
long unsigned | mode = SERIAL_UNCHANGED | |||
) | throw ( open_exception ) |
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.
virtual void Conexus::Serial::open | ( | ) | throw (open_exception) [virtual] |
Will attempt to open the serial port if a device has been specified.
Otherwise an exception will be thrown.
Implements Conexus::Endpoint.
void Conexus::Serial::set_device | ( | const std::string & | d, | |
long unsigned | mode = SERIAL_UNCHANGED | |||
) | throw (open_exception) |
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.
virtual void Conexus::Serial::open | ( | ) | throw (open_exception) [virtual] |
Will attempt to open the serial port if a device has been specified.
Otherwise an exception will be thrown.
Implements Conexus::Endpoint.
void Conexus::Serial::set_device | ( | const std::string & | d, | |
long unsigned | mode = SERIAL_UNCHANGED | |||
) | throw (open_exception) |
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.