org.marre.sms.transport.gsm
Class SerialComm

java.lang.Object
  extended byorg.marre.sms.transport.gsm.SerialComm
All Implemented Interfaces:
GsmComm

public class SerialComm
extends java.lang.Object
implements GsmComm

Simple Serial port comm.

Version:
$Id: SerialComm.java,v 1.7 2005/11/26 16:39:33 c95men Exp $
Author:
Markus Eriksson

Constructor Summary
SerialComm(java.lang.String appName, java.lang.String portName)
          Constructor.
 
Method Summary
 void close()
          Closes the connection to the device.
 void open()
          Opens a connection to the device.
 java.lang.String readLine()
          Reads one row of data from the device.
 java.lang.String readLine(java.lang.String find)
          Reads one row of data from the device or until we have read the find string.
 void send(java.lang.String row)
          Send data to the device.
 void setBitRate(java.lang.String theBitRate)
           
 void setDataBits(java.lang.String theDataBits)
           
 void setEcho(boolean echo)
           
 void setFlowControl(java.lang.String theFlowControl)
           
 void setParity(java.lang.String theParity)
           
 void setStopBits(java.lang.String theStopBits)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerialComm

public SerialComm(java.lang.String appName,
                  java.lang.String portName)
Constructor.

Parameters:
portName -
Method Detail

open

public void open()
          throws java.io.IOException
Description copied from interface: GsmComm
Opens a connection to the device.

Specified by:
open in interface GsmComm
Throws:
java.io.IOException

close

public void close()
Description copied from interface: GsmComm
Closes the connection to the device.

Specified by:
close in interface GsmComm

send

public void send(java.lang.String row)
          throws java.io.IOException
Description copied from interface: GsmComm
Send data to the device.

Specified by:
send in interface GsmComm
Parameters:
row -
Throws:
java.io.IOException

readLine

public java.lang.String readLine()
                          throws java.io.IOException
Description copied from interface: GsmComm
Reads one row of data from the device.

Specified by:
readLine in interface GsmComm
Returns:
Throws:
java.io.IOException

readLine

public java.lang.String readLine(java.lang.String find)
                          throws java.io.IOException
Description copied from interface: GsmComm
Reads one row of data from the device or until we have read the find string.

Specified by:
readLine in interface GsmComm
Parameters:
find -
Returns:
Throws:
java.io.IOException

setBitRate

public void setBitRate(java.lang.String theBitRate)

setDataBits

public void setDataBits(java.lang.String theDataBits)

setFlowControl

public void setFlowControl(java.lang.String theFlowControl)

setParity

public void setParity(java.lang.String theParity)

setStopBits

public void setStopBits(java.lang.String theStopBits)

setEcho

public void setEcho(boolean echo)


Copyright © 2002-2005 Markus Eriksson. All Rights Reserved.