|
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 |