Logo Search packages:      
Sourcecode: pwlib version File versions

BOOL PModem::Open ( PConfig &  cfg  )  [virtual]

Open the modem serial port obtaining the parameters from standard variables in the configuration file. Note that it assumed that the correct configuration file section is already set.

TRUE if the modem serial port was successfully opened.
cfg  Configuration file to read parameters from.

Reimplemented from PSerialChannel.

Definition at line 194 of file modem.cxx.

References PSerialChannel::Open(), and Uninitialised.

  initCmd = cfg.GetString(ModemInit, "ATZ\\r\\w2sOK\\w100m");
  deinitCmd = cfg.GetString(ModemDeinit, "\\d2s+++\\d2sATH0\\r");
  preDialCmd = cfg.GetString(ModemPreDial, "ATDT");
  postDialCmd = cfg.GetString(ModemPostDial, "\\r");
  busyReply = cfg.GetString(ModemBusy, "BUSY");
  noCarrierReply = cfg.GetString(ModemNoCarrier, "NO CARRIER");
  connectReply = cfg.GetString(ModemConnect, "CONNECT");
  hangUpCmd = cfg.GetString(ModemHangUp, "\\d2s+++\\d2sATH0\\r");

  if (!PSerialChannel::Open(cfg))
    return FALSE;

  status = Uninitialised;
  return TRUE;

Generated by  Doxygen 1.6.0   Back to index