Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

TTYfd Class Reference

#include <tty.H>

Inheritance diagram for TTYfd:

Inheritance graph
[legend]
Collaboration diagram for TTYfd:

Collaboration graph
[legend]
List of all members.

Public Types

enum  TTYparity { TTY_ODD, TTY_EVEN, TTY_NONE }

Public Member Functions

 TTYfd (FD_MANAGER *m, const char *dev, const char *name)
virtual ~TTYfd ()
virtual void sample ()
virtual int activate ()
virtual int deactivate ()
int open ()
int close ()
int not_configured (int, int)
int clear ()
int send_break (int duration)
void print_flags ()
int set_speed (long speed)
int set_stopbits (int num)
int set_charsize (short size)
int set_parity (TTYparity parity)
int set_min_and_time (int min_num_chars, int min_delay_between_chars_or_total_time)
int set_flags ()
int get_flags ()
int read_synchronized (char sentinel, int sentinel_bit, int which, int record_size, char *buf)
int read_synchronized (char sentinel, int record_size, char *buf)
int read_synchronized (int sentinel_bit, int record_size, char *buf)
int read_all (char *buf, int maxbytes)
int nread (char *buf, int readnum, int timeout_millisecs)
int drain ()
int write (const char *buf, int writenum, int timeout_millisecs)
int setup ()
virtual void reset ()
virtual void except ()
int fd ()

Protected Types

enum  { MAX_REC_SIZE = 128 }

Protected Attributes

char _dev [256]
char _synch_buf [MAX_REC_SIZE]
int _synch_pos
termios _ios_saved
termios _ios_current
FD_MANAGER_manager
int _fd

Static Protected Attributes

static int _timeout = 0

Detailed Description

Definition at line 77 of file tty.H.


Member Enumeration Documentation

anonymous enum [protected]
 

Enumerator:
MAX_REC_SIZE 

Definition at line 79 of file tty.H.

enum TTYfd::TTYparity
 

Enumerator:
TTY_ODD 
TTY_EVEN 
TTY_NONE 

Definition at line 96 of file tty.H.


Constructor & Destructor Documentation

TTYfd::TTYfd FD_MANAGER m,
const char *  dev,
const char *  name
 

Definition at line 894 of file tty.C.

References _dev, _timeout, Config::get_var_int(), Config::get_var_str(), and NULL_STR.

virtual TTYfd::~TTYfd  )  [inline, virtual]
 

Definition at line 102 of file tty.H.

References deactivate().


Member Function Documentation

int TTYfd::activate  )  [virtual]
 

Reimplemented in Tablet.

Definition at line 868 of file tty.C.

References _dev, _manager, FD_MANAGER::add(), clear(), open(), and setup().

Referenced by Tablet::activate().

int TTYfd::clear  ) 
 

Definition at line 195 of file tty.C.

References FD_EVENT::_fd, and HANDLE().

Referenced by activate(), and read_synchronized().

int TTYfd::close  ) 
 

Definition at line 801 of file tty.C.

References FD_EVENT::_fd, _ios_current, _ios_saved, HANDLE(), and set_flags().

Referenced by deactivate().

int TTYfd::deactivate  )  [virtual]
 

Definition at line 884 of file tty.C.

References FD_EVENT::_fd, _manager, close(), and FD_MANAGER::rem().

Referenced by ~TTYfd().

int TTYfd::drain  ) 
 

Definition at line 660 of file tty.C.

References FD_EVENT::_fd, and HANDLE().

virtual void FD_EVENT::except  )  [inline, virtual, inherited]
 

Definition at line 47 of file tty.H.

int FD_EVENT::fd  )  [inline, inherited]
 

Definition at line 48 of file tty.H.

References FD_EVENT::_fd.

Referenced by Network::connect_to(), NetStream::interpret(), and WIN_MANAGER::tty_to_id::ready().

int TTYfd::get_flags  ) 
 

Definition at line 155 of file tty.C.

References FD_EVENT::_fd, _ios_current, and HANDLE().

Referenced by open(), print_flags(), set_charsize(), set_min_and_time(), set_parity(), set_speed(), set_stopbits(), and setup().

int TTYfd::not_configured int  ,
int 
 

Definition at line 139 of file tty.C.

References _ios_current.

Referenced by nread(), read_all(), and set_min_and_time().

int TTYfd::nread char *  buf,
int  readnum,
int  timeout_millisecs
 

Definition at line 526 of file tty.C.

References FD_EVENT::_fd, HANDLE(), MILLISEC_TO_TIME, not_configured(), SELECT, set_min_and_time(), TTYdebug, VMIN_CHARACTERS, and VTIME_LENGTH.

Referenced by TabletMultimode::enqueue_available_tablet_events(), Tablet::mod_setting_bit(), and read_synchronized().

int TTYfd::open  ) 
 

Definition at line 832 of file tty.C.

References _dev, FD_EVENT::_fd, _ios_current, _ios_saved, get_flags(), and HANDLE().

Referenced by activate().

void TTYfd::print_flags  ) 
 

Definition at line 256 of file tty.C.

References _ios_current, brcase, cspeed(), and get_flags().

int TTYfd::read_all char *  buf,
int  maxbytes
 

Definition at line 474 of file tty.C.

References FD_EVENT::_fd, HANDLE(), not_configured(), set_min_and_time(), and TTYdebug.

int TTYfd::read_synchronized int  sentinel_bit,
int  record_size,
char *  buf
 

Definition at line 594 of file tty.C.

References read_synchronized().

int TTYfd::read_synchronized char  sentinel,
int  record_size,
char *  buf
 

Definition at line 584 of file tty.C.

References read_synchronized().

int TTYfd::read_synchronized char  sentinel,
int  sentinel_bit,
int  which,
int  record_size,
char *  buf
 

Definition at line 604 of file tty.C.

References _synch_buf, _synch_pos, _timeout, BIT, clear(), MAX_REC_SIZE, and nread().

Referenced by read_synchronized().

virtual void FD_EVENT::reset  )  [inline, virtual, inherited]
 

Reimplemented in TabletMultimode.

Definition at line 46 of file tty.H.

virtual void TTYfd::sample  )  [inline, virtual]
 

Implements FD_EVENT.

Reimplemented in TabletMultimode.

Definition at line 104 of file tty.H.

int TTYfd::send_break int  duration  ) 
 

Definition at line 211 of file tty.C.

References FD_EVENT::_fd, and HANDLE().

int TTYfd::set_charsize short  size  ) 
 

Definition at line 381 of file tty.C.

References _ios_current, get_flags(), int(), and set_flags().

Referenced by Tablet::activate().

int TTYfd::set_flags  ) 
 

Definition at line 178 of file tty.C.

References FD_EVENT::_fd, _ios_current, and HANDLE().

Referenced by close(), set_charsize(), set_min_and_time(), set_parity(), set_speed(), set_stopbits(), and setup().

int TTYfd::set_min_and_time int  min_num_chars,
int  min_delay_between_chars_or_total_time
 

Definition at line 443 of file tty.C.

References _ios_current, get_flags(), not_configured(), and set_flags().

Referenced by nread(), and read_all().

int TTYfd::set_parity TTYparity  parity  ) 
 

Definition at line 402 of file tty.C.

References _ios_current, brcase, get_flags(), set_flags(), TTY_EVEN, TTY_NONE, and TTY_ODD.

Referenced by Tablet::activate().

int TTYfd::set_speed long  speed  ) 
 

Definition at line 332 of file tty.C.

References _ios_current, get_flags(), and set_flags().

Referenced by Tablet::activate().

int TTYfd::set_stopbits int  num  ) 
 

Definition at line 355 of file tty.C.

References _ios_current, get_flags(), and set_flags().

Referenced by Tablet::activate().

int TTYfd::setup  ) 
 

Definition at line 731 of file tty.C.

References FD_EVENT::_fd, _ios_current, get_flags(), set_flags(), TRUE, VMIN_CHARACTERS, and VTIME_LENGTH.

Referenced by activate().

int TTYfd::write const char *  buf,
int  writenum,
int  timeout_millisecs
 

Definition at line 673 of file tty.C.

References FD_EVENT::_fd, HANDLE(), MILLISEC_TO_TIME, SELECT, and TTYdebug.

Referenced by Tablet::activate(), and Tablet::mod_setting_bit().


Member Data Documentation

char TTYfd::_dev[256] [protected]
 

Definition at line 80 of file tty.H.

Referenced by activate(), open(), Tablet::Tablet(), and TTYfd().

int FD_EVENT::_fd [protected, inherited]
 

Definition at line 41 of file tty.H.

Referenced by NetStream::_die(), NetStream::attached(), clear(), close(), Network::configure(), deactivate(), drain(), FD_EVENT::fd(), get_flags(), NetStream::NetStream(), NetStream::no_tcp_delay(), nread(), open(), read_all(), NetStream::read_from_net(), send_break(), NetStream::set_blocking(), set_flags(), setup(), Network::wait_for_connect(), write(), NetStream::write_to_net(), and NetStream::~NetStream().

struct termios TTYfd::_ios_current [protected]
 

Definition at line 85 of file tty.H.

Referenced by close(), get_flags(), not_configured(), open(), print_flags(), set_charsize(), set_flags(), set_min_and_time(), set_parity(), set_speed(), set_stopbits(), and setup().

struct termios TTYfd::_ios_saved [protected]
 

Definition at line 84 of file tty.H.

Referenced by close(), and open().

FD_MANAGER* TTYfd::_manager [protected]
 

Definition at line 93 of file tty.H.

Referenced by activate(), and deactivate().

char TTYfd::_synch_buf[MAX_REC_SIZE] [protected]
 

Definition at line 81 of file tty.H.

Referenced by read_synchronized().

int TTYfd::_synch_pos [protected]
 

Definition at line 82 of file tty.H.

Referenced by read_synchronized().

int TTYfd::_timeout = 0 [static, protected]
 

Definition at line 92 of file tty.H.

Referenced by TabletMultimode::enqueue_available_tablet_events(), read_synchronized(), and TTYfd().


The documentation for this class was generated from the following files:
Generated on Mon Sep 18 11:47:40 2006 for jot by  doxygen 1.4.4