org.universAAL.lddi.fs20.connect
Class FHZ1000PC.FHZ1000SerialDevice
java.lang.Object
org.universAAL.lddi.fs20.connect.FHZ1000PC.FHZ1000SerialDevice
- All Implemented Interfaces:
- gnu.io.SerialPortEventListener, EventListener, FHZ1000PC.FHZ1000Device
- Enclosing class:
- FHZ1000PC
public class FHZ1000PC.FHZ1000SerialDevice
- extends Object
- implements FHZ1000PC.FHZ1000Device, gnu.io.SerialPortEventListener
When running on Linux, we access the USB-device via generic serial drivers for FTDI-chips.
This is done via this class.
- Author:
- Stefan Strömberg
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAX_WAIT_TIME_MS
protected final int MAX_WAIT_TIME_MS
- See Also:
- Constant Field Values
portList
protected Enumeration<gnu.io.CommPortIdentifier> portList
inputStream
protected InputStream inputStream
outputStream
protected OutputStream outputStream
serialPort
protected gnu.io.SerialPort serialPort
portId
protected gnu.io.CommPortIdentifier portId
m_CallbackActive
protected boolean m_CallbackActive
FHZ1000PC.FHZ1000SerialDevice
public FHZ1000PC.FHZ1000SerialDevice(String m_ComPort)
throws IOException
- Throws:
IOException
activate
public void activate()
throws IOException
- Specified by:
activate
in interface FHZ1000PC.FHZ1000Device
- Throws:
IOException
serialEvent
public void serialEvent(gnu.io.SerialPortEvent event)
- Specified by:
serialEvent
in interface gnu.io.SerialPortEventListener
write
public int write(byte[] data)
throws IOException
- Specified by:
write
in interface FHZ1000PC.FHZ1000Device
- Throws:
IOException
read
public byte[] read(int length)
throws IOException
- Specified by:
read
in interface FHZ1000PC.FHZ1000Device
- Throws:
IOException
deactivate
public void deactivate()
throws IOException
- Specified by:
deactivate
in interface FHZ1000PC.FHZ1000Device
- Throws:
IOException
Copyright © 2014 universAAL Consortium. All Rights Reserved.