de.bsvrz.kex.tls.osi2osi3.osi2.tc57primary
Class SerialPortControl

java.lang.Object
  extended by de.bsvrz.kex.tls.osi2osi3.osi2.tc57primary.SerialPortControl
All Implemented Interfaces:
gnu.io.SerialPortEventListener, EventListener

public class SerialPortControl
extends Object
implements gnu.io.SerialPortEventListener

Klasse zum Senden und Empfangen von TC57-Telegrammen via serieller Schnittstelle.

Author:
Kappich Systemberatung

Constructor Summary
SerialPortControl()
           
 
Method Summary
 byte[] query(int waitTimeSinceLastReceive, byte[] sendBytes, int receiveTimeout)
           
 byte[] readBytes(long timeout)
           
 void serialEvent(gnu.io.SerialPortEvent serialPortEvent)
           
 void shutdown()
           
 void start(PropertyQueryInterface propertyQueryInterface, String applicationName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerialPortControl

public SerialPortControl()
Method Detail

start

public void start(PropertyQueryInterface propertyQueryInterface,
                  String applicationName)
           throws Exception
Throws:
Exception

shutdown

public void shutdown()

serialEvent

public void serialEvent(gnu.io.SerialPortEvent serialPortEvent)
Specified by:
serialEvent in interface gnu.io.SerialPortEventListener

query

public byte[] query(int waitTimeSinceLastReceive,
                    byte[] sendBytes,
                    int receiveTimeout)
             throws InterruptedException,
                    IOException
Throws:
InterruptedException
IOException

readBytes

public byte[] readBytes(long timeout)
                 throws InterruptedException
Throws:
InterruptedException