Serialio.modem
Class SerModem

java.lang.Object
  extended bySerialio.modem.Modem
      extended bySerialio.modem.SerModem
All Implemented Interfaces:
java.util.EventListener, Serialio.SnoopListener, Serialio.SnoopLoopListener

public class SerModem
extends Modem

Creates a modem object.

  • Copyright (c) 1999-2003 Solutions Consulting, All Rights Reserved.

    created 1.0 19 Dec 2002 from Modem.java


    Field Summary
    protected  Serialio.SerOutputStream mos
               
     
    Fields inherited from class Serialio.modem.Modem
    ABORT, abortRequest, CONNECT, controlName, curLocale, DIAL_BLIND, DISCONNECT, eMsg, evMsg, GET_CONNECT, INITIALIZE, match, me, mip, mis, mTask, phoneNumber, rdBuf, rdCnt, sMsgs, spy, statusMsgNotify, STOP, STOP_WAIT_RING, stopRequest, stopWaitRing, WAIT_DONE, WAIT_RING
     
    Constructor Summary
    SerModem(ModemInterfaceProvider mip, Serialio.SerOutputStream os, Serialio.SerInputStream is)
              Creates a modem object
     
    Method Summary
     boolean cmdReply(byte[] snd, byte[] waitData, int tmo)
              send the dat, wait for data.
     void write(byte[] data)
              Write data to the output stream
     void write(java.lang.String data)
              Write data to the output stream
     
    Methods inherited from class Serialio.modem.Modem
    abort, checkInitialized, checkOpen, cmdReply, commandMode, contains, getConnectMsg, getConnectWaitTime, getModemStatusAcceptor, getNotifyBeforeModemEvent, getPhoneNumber, getShowModemData, getShowModemStatus, getShowModemStatusExpert, hexString, isInitialized, request, setConnectWaitTime, setDialCommand, setDTR, setInitCommand, setInitTime, setInterfaceProvider, setLocale, setModemStatusAcceptor, setNotifyBeforeModemEvent, setPhoneNumber, setShowModemData, setShowModemStatus, setShowModemStatusExpert, setStreams, snoopEvent, snoopLoopEvent, start, statusMsg, statusMsgExpert, statusMsgLn, stop
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    mos

    protected Serialio.SerOutputStream mos
    Constructor Detail

    SerModem

    public SerModem(ModemInterfaceProvider mip,
                    Serialio.SerOutputStream os,
                    Serialio.SerInputStream is)
    Creates a modem object

    Parameters:
    mip - the object providing the interface to the modem port
    os - the output stream the modem is connected to
    is - the input stream the modem is connected to
    Method Detail

    cmdReply

    public boolean cmdReply(byte[] snd,
                            byte[] waitData,
                            int tmo)
                     throws java.io.IOException,
                            java.lang.InterruptedException,
                            Serialio.ExTimeout
    send the dat, wait for data.

    Overrides:
    cmdReply in class Modem
    Parameters:
    snd - the data to send
    waitData - the data to wait for
    tmo - the timeout if waitData is not seen
    Throws:
    IOException, - InterruptedException
    java.io.IOException
    java.lang.InterruptedException
    Serialio.ExTimeout

    write

    public void write(java.lang.String data)
               throws java.io.IOException,
                      Serialio.ExTimeout
    Write data to the output stream

    Overrides:
    write in class Modem
    Throws:
    java.io.IOException
    Serialio.ExTimeout

    write

    public void write(byte[] data)
               throws java.io.IOException,
                      Serialio.ExTimeout
    Write data to the output stream

    Overrides:
    write in class Modem
    Throws:
    java.io.IOException
    Serialio.ExTimeout