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

dsModem Class Reference

#include <dsModem.h>

Inheritance diagram for dsModem:

dsSerial List of all members.

Public Types

enum  Answers {
  anNONE, anOK, anCONNECT, anRING,
  anNO_CARRIER, anERROR, anNO_DT, anBUSY,
  anNO_ANSWER, anRINGING, anVOICE
}

Public Methods

 dsModem (const char *tty, int speed, int flags=MODEM_8N1)
virtual ~dsModem ()
void initModem (const char *cmd, int wait)
void sendCmd (const char *cmd)
void sendDial (const char *cmd)
int readAnswer (std::ostream &os, int wait)
Answers parseAnswer (const char *answer)
bool testDCD ()
void Open (const char *tty, int speed, int flags)
void Open ()
void Close ()
void Lock (const char *tty, const char *lockdir="/var/run")
void UnLock (const char *tty, const char *lockdir="/var/run")
void setDtr (bool set=true)
void setRts (bool set=true)
bool testCts ()
int readQueueSize ()
void changeSpeed (int speed)
int Select (struct timeval *timeout, int op=OP_READ)
size_t Read (char *buf, size_t nbytes, int sec=10, int usec=0)
int ReadLine (std::ostream &os, int sec=10, int usec=0)
size_t Write (const char *buf, size_t nbytes)
int fd ()

Protected Attributes

int _flags
int _speed
char * _dev
termios * _oldtio
termios * _newtio
int _hSerial

Detailed Description

Extemsion of dsSerial class to make work with modem more convenient


Member Enumeration Documentation

enum dsModem::Answers
 

Enumeration values:
anNONE 
anOK 
anCONNECT 
anRING 
anNO_CARRIER 
anERROR 
anNO_DT 
anBUSY 
anNO_ANSWER 
anRINGING 
anVOICE 


Constructor & Destructor Documentation

dsModem::dsModem const char *    tty,
int    speed,
int    flags = MODEM_8N1
 

Open modem tty:

Parameters:
tty - tty port
speed - port baud rate

dsModem::~dsModem   [virtual]
 


Member Function Documentation

void dsSerial::changeSpeed int    speed [inherited]
 

void dsSerial::Close   [inherited]
 

int dsSerial::fd   [inherited]
 

void dsModem::initModem const char *    cmd,
int    wait
 

void dsSerial::Lock const char *    tty,
const char *    lockdir = "/var/run"
[inherited]
 

void dsSerial::Open   [inherited]
 

void dsSerial::Open const char *    tty,
int    speed,
int    flags
[inherited]
 

dsModem::Answers dsModem::parseAnswer const char *    answer
 

size_t dsSerial::Read char *    buf,
size_t    nbytes,
int    sec = 10,
int    usec = 0
[inherited]
 

int dsModem::readAnswer std::ostream &    os,
int    wait
 

int dsSerial::ReadLine std::ostream &    os,
int    sec = 10,
int    usec = 0
[inherited]
 

int dsSerial::readQueueSize   [inherited]
 

int dsSerial::Select struct timeval *    timeout,
int    op = OP_READ
[inherited]
 

void dsModem::sendCmd const char *    cmd
 

void dsModem::sendDial const char *    cmd
 

void dsSerial::setDtr bool    set = true [inherited]
 

void dsSerial::setRts bool    set = true [inherited]
 

bool dsSerial::testCts   [inherited]
 

bool dsModem::testDCD  
 

Test carier bit

void dsSerial::UnLock const char *    tty,
const char *    lockdir = "/var/run"
[inherited]
 

size_t dsSerial::Write const char *    buf,
size_t    nbytes
[inherited]
 


Member Data Documentation

char* dsSerial::_dev [protected, inherited]
 

int dsSerial::_flags [protected, inherited]
 

int dsSerial::_hSerial [protected, inherited]
 

termios* dsSerial::_newtio [protected, inherited]
 

termios* dsSerial::_oldtio [protected, inherited]
 

int dsSerial::_speed [protected, inherited]
 


The documentation for this class was generated from the following files:
Generated on Mon May 16 18:27:00 2005 for libdms4 by doxygen1.3-rc2