conexus logo

Conexus::TTYInterface Class Reference

#include <tty_interface.h>

Inheritance diagram for Conexus::TTYInterface:

Inheritance graph
[legend]

List of all members.

Public Types

typedef ConexusPointer
< TTYInterface
pointer

Public Member Functions

 TTYInterface ()
virtual ~TTYInterface ()
virtual void drain ()=0
 waits until all output written to the object has been transmitted.
virtual void flush_input ()=0
 discards data received but not read
virtual void flush_output ()=0
 discards data written to the object but not transmitted
virtual void flush ()=0
 discards both data written to the object but not transmitted and data received but not read
virtual void suspend_output ()=0
 Suspends transmission of data by the object.
virtual void restart_output ()=0
 Resumes transmission of data by the object.
virtual void suspend_input ()=0
 Suspends reception of data by the object.
virtual void restart_input ()=0
 Resumes reception of data by the object.
virtual void set_input_speed (unsigned speed, SetOption option=SET_NOW)=0
 Sets the input line speed.
virtual void set_output_speed (unsigned speed, SetOption option=SET_NOW)=0
 Sets the output line speed.
virtual void set_speed (unsigned speed, SetOption option=SET_NOW)=0
 Sets both the input and output line speeds.
virtual unsigned input_speed ()=0
 Returns the current input line speed.
virtual unsigned output_speed ()=0
 Returns the current output line speed.
virtual void set_parity (Parity parity, ParityError error=PARITY_ERROR_IGNORE, SetOption option=SET_NOW)=0
 Sets parity mode.
virtual Parity parity ()=0
 Returns the current parity mode.
virtual ParityError parity_error ()=0
 Returns the current parity error mode.
virtual unsigned byte_size ()=0
 Get the current byte size in bits.
virtual void set_byte_size (unsigned size, SetOption option=SET_NOW)=0
 Sets the communication byte size Valid values are:
  • 5 bits-per-byte
  • 6 bits-per-byte
  • 7 bits-per-byte
  • 8 bits-per-byte (default) All other values are ignored.

virtual unsigned stop_bits ()=0
 Get the number of stop bits (1 or 2).
virtual void set_stop_bits (unsigned size, SetOption option=SET_NOW)=0
 Sets the stop bits; only values of 1 or 2 will be processed, all others will be ignored.
virtual FlowControl flow_control ()=0
 Returns the flow control method.
virtual void set_flow_control (FlowControl flowcontrol, SetOption option=SET_NOW)=0
 Sets the flow control flags according to the flow control method specified.
virtual bool is_carrier_detect_enabled ()=0
 True if the hardware carrier detect (DCD) is enabled, false otherwise.
virtual void enable_carrier_detect (bool enable=true, SetOption option=SET_NOW)=0
 Enables or disables a hardware carrier detect.
virtual bool is_receiver_enabled ()=0
 True if the receive side is enabled, false otherwise.
virtual void enable_receiver (bool enable=true, SetOption option=SET_NOW)=0
 If true the receiver will be enabled, and if false it will be disabled and no characters can be received.
virtual void open ()=0
virtual void open (const std::string &name, ReadWrite mode=READ_WRITE_UNCHANGED)=0
 Opens the TTY in the specified mode, storing the original terminal mode, to be restored on close.
virtual void close (bool force=false)=0
 Restores the original terminal modes on the tty.
virtual void inject (const std::string &buffer)=0
 Injects the input buffer into the input queue.
virtual bool is_reset_on_close_enabled ()=0
 True if the terminal will be reset to original characteristics on close.
virtual void enable_reset_on_close (bool reset=true)=0
 Set to true if the terminal should reset to original characteristics on close.
virtual sigc::signal< void > & signal_input_speed_changed ()=0
virtual sigc::signal< void > & signal_output_speed_changed ()=0
virtual sigc::signal< void > & signal_parity_changed ()=0
virtual sigc::signal< void > & signal_byte_size_changed ()=0
virtual sigc::signal< void > & signal_stop_bits_changed ()=0
virtual sigc::signal< void > & signal_flow_control_changed ()=0
virtual sigc::signal< void > & signal_carrier_detect_changed ()=0
virtual sigc::signal< void > & signal_receiver_changed ()=0


Detailed Description

Author:
Rick L Vinyard Jr

Member Typedef Documentation

Reimplemented from Conexus::SerialInterface.

Reimplemented in Conexus::TTY.


Constructor & Destructor Documentation

Conexus::TTYInterface::TTYInterface (  )  [inline]

virtual Conexus::TTYInterface::~TTYInterface (  )  [inline, virtual]


Member Function Documentation

virtual unsigned Conexus::TTYInterface::byte_size (  )  [pure virtual]

Get the current byte size in bits.

Implemented in Conexus::TTY.

virtual void Conexus::TTYInterface::close ( bool  force = false  )  [pure virtual]

Restores the original terminal modes on the tty.

Implemented in Conexus::TTY.

virtual void Conexus::TTYInterface::drain (  )  [pure virtual]

waits until all output written to the object has been transmitted.

Implemented in Conexus::TTY.

virtual void Conexus::TTYInterface::enable_carrier_detect ( bool  enable = true,
SetOption  option = SET_NOW 
) [pure virtual]

Enables or disables a hardware carrier detect.

If hardware carrier detect is enabled and this is a blocking TTY, an open will block until a DCD signal is received from the hardware (useful for modems). If this is not enabled, the TTY will behave as if the DCD is always asserted. The hardware carrier flag should usually be turned on for modems and off for local devices.

Implemented in Conexus::TTY.

virtual void Conexus::TTYInterface::enable_receiver ( bool  enable = true,
SetOption  option = SET_NOW 
) [pure virtual]

If true the receiver will be enabled, and if false it will be disabled and no characters can be received.

Implemented in Conexus::TTY.

virtual void Conexus::TTYInterface::enable_reset_on_close ( bool  reset = true  )  [pure virtual]

Set to true if the terminal should reset to original characteristics on close.

Implemented in Conexus::TTY.

virtual FlowControl Conexus::TTYInterface::flow_control (  )  [pure virtual]

Returns the flow control method.

Implemented in Conexus::TTY.

virtual void Conexus::TTYInterface::flush (  )  [pure virtual]

discards both data written to the object but not transmitted and data received but not read

Implemented in Conexus::TTY.

virtual void Conexus::TTYInterface::flush_input (  )  [pure virtual]

discards data received but not read

Implemented in Conexus::TTY.

virtual void Conexus::TTYInterface::flush_output (  )  [pure virtual]

discards data written to the object but not transmitted

Implemented in Conexus::TTY.

virtual void Conexus::TTYInterface::inject ( const std::string &  buffer  )  [pure virtual]

Injects the input buffer into the input queue.

Implemented in Conexus::TTY.

virtual unsigned Conexus::TTYInterface::input_speed (  )  [pure virtual]

Returns the current input line speed.

Implemented in Conexus::TTY.

virtual bool Conexus::TTYInterface::is_carrier_detect_enabled (  )  [pure virtual]

True if the hardware carrier detect (DCD) is enabled, false otherwise.

Implemented in Conexus::TTY.

virtual bool Conexus::TTYInterface::is_receiver_enabled (  )  [pure virtual]

True if the receive side is enabled, false otherwise.

If false, this TTY cannot receive characters.

Implemented in Conexus::TTY.

virtual bool Conexus::TTYInterface::is_reset_on_close_enabled (  )  [pure virtual]

True if the terminal will be reset to original characteristics on close.

Implemented in Conexus::TTY.

virtual void Conexus::TTYInterface::open ( const std::string &  name,
ReadWrite  mode = READ_WRITE_UNCHANGED 
) [pure virtual]

Opens the TTY in the specified mode, storing the original terminal mode, to be restored on close.

Implements Conexus::SerialInterface.

Implemented in Conexus::TTY.

virtual void Conexus::TTYInterface::open (  )  [pure virtual]

Implements Conexus::SerialInterface.

Implemented in Conexus::TTY.

virtual unsigned Conexus::TTYInterface::output_speed (  )  [pure virtual]

Returns the current output line speed.

Implemented in Conexus::TTY.

virtual Parity Conexus::TTYInterface::parity (  )  [pure virtual]

Returns the current parity mode.

Implemented in Conexus::TTY.

virtual ParityError Conexus::TTYInterface::parity_error (  )  [pure virtual]

Returns the current parity error mode.

Implemented in Conexus::TTY.

virtual void Conexus::TTYInterface::restart_input (  )  [pure virtual]

Resumes reception of data by the object.

Implemented in Conexus::TTY.

virtual void Conexus::TTYInterface::restart_output (  )  [pure virtual]

Resumes transmission of data by the object.

Implemented in Conexus::TTY.

virtual void Conexus::TTYInterface::set_byte_size ( unsigned  size,
SetOption  option = SET_NOW 
) [pure virtual]

Sets the communication byte size Valid values are:

  • 5 bits-per-byte
  • 6 bits-per-byte
  • 7 bits-per-byte
  • 8 bits-per-byte (default) All other values are ignored.

Implemented in Conexus::TTY.

virtual void Conexus::TTYInterface::set_flow_control ( FlowControl  flowcontrol,
SetOption  option = SET_NOW 
) [pure virtual]

Sets the flow control flags according to the flow control method specified.

If FLOW_CUSTOM is specified, no change will occur.

Implemented in Conexus::TTY.

virtual void Conexus::TTYInterface::set_input_speed ( unsigned  speed,
SetOption  option = SET_NOW 
) [pure virtual]

Sets the input line speed.

These are generally defined in /usr/include/bits/termios.h The following is the recognized list:

  • 0 (hang up)
  • 50
  • 75
  • 110
  • 134
  • 150
  • 200
  • 300
  • 600
  • 1200
  • 1800
  • 2400
  • 4800
  • 9600
  • 19200
  • 38400
  • 57600
  • 115200
  • 230400
  • 460800
  • 500000
  • 576000
  • 921600
  • 1000000
  • 1152000
  • 1500000
  • 2000000
  • 2500000
  • 3000000
  • 3500000
  • 4000000

Implemented in Conexus::TTY.

virtual void Conexus::TTYInterface::set_output_speed ( unsigned  speed,
SetOption  option = SET_NOW 
) [pure virtual]

Sets the output line speed.

Implemented in Conexus::TTY.

virtual void Conexus::TTYInterface::set_parity ( Parity  parity,
ParityError  error = PARITY_ERROR_IGNORE,
SetOption  option = SET_NOW 
) [pure virtual]

Sets parity mode.

Implemented in Conexus::TTY.

virtual void Conexus::TTYInterface::set_speed ( unsigned  speed,
SetOption  option = SET_NOW 
) [pure virtual]

Sets both the input and output line speeds.

Implemented in Conexus::TTY.

virtual void Conexus::TTYInterface::set_stop_bits ( unsigned  size,
SetOption  option = SET_NOW 
) [pure virtual]

Sets the stop bits; only values of 1 or 2 will be processed, all others will be ignored.

Implemented in Conexus::TTY.

virtual sigc::signal<void>& Conexus::TTYInterface::signal_byte_size_changed (  )  [pure virtual]

Implemented in Conexus::TTY.

virtual sigc::signal<void>& Conexus::TTYInterface::signal_carrier_detect_changed (  )  [pure virtual]

Implemented in Conexus::TTY.

virtual sigc::signal<void>& Conexus::TTYInterface::signal_flow_control_changed (  )  [pure virtual]

Implemented in Conexus::TTY.

virtual sigc::signal<void>& Conexus::TTYInterface::signal_input_speed_changed (  )  [pure virtual]

Implemented in Conexus::TTY.

virtual sigc::signal<void>& Conexus::TTYInterface::signal_output_speed_changed (  )  [pure virtual]

Implemented in Conexus::TTY.

virtual sigc::signal<void>& Conexus::TTYInterface::signal_parity_changed (  )  [pure virtual]

Implemented in Conexus::TTY.

virtual sigc::signal<void>& Conexus::TTYInterface::signal_receiver_changed (  )  [pure virtual]

Implemented in Conexus::TTY.

virtual sigc::signal<void>& Conexus::TTYInterface::signal_stop_bits_changed (  )  [pure virtual]

Implemented in Conexus::TTY.

virtual unsigned Conexus::TTYInterface::stop_bits (  )  [pure virtual]

Get the number of stop bits (1 or 2).

Implemented in Conexus::TTY.

virtual void Conexus::TTYInterface::suspend_input (  )  [pure virtual]

Suspends reception of data by the object.

Implemented in Conexus::TTY.

virtual void Conexus::TTYInterface::suspend_output (  )  [pure virtual]

Suspends transmission of data by the object.

Implemented in Conexus::TTY.


The documentation for this class was generated from the following file:

Generated on Wed Jul 8 15:51:21 2009 for conexus by doxygen 1.5.8