|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bankframe.services.devices.MCASerialPort
Abstract superclass for all MCA serial port devices.
Field Summary | |
static java.lang.String |
SERIALPORT_BAUD
Baud Rate setting field in the BankframeDevices.properties file. |
static java.lang.String |
SERIALPORT_COMMDRIVER
Communications Driver setting field in the BankframeDevices.properties file. |
static java.lang.String |
SERIALPORT_DATABITS
Data Bits setting field in the BankframeDevices.properties file. |
static java.lang.String |
SERIALPORT_FLOWCONTROL
Flowcontrol setting field in the BankframeDevices.properties file. |
static java.lang.String |
SERIALPORT_NAME
Port Name setting field in the BankframeDevices.properties file. |
static java.lang.String |
SERIALPORT_PARITY
Parity setting field in the BankframeDevices.properties file. |
static java.lang.String |
SERIALPORT_STOPBITS
Stop Bits setting field in the BankframeDevices.properties file. |
Fields inherited from interface javax.comm.CommPortOwnershipListener |
PORT_OWNED, PORT_OWNERSHIP_REQUESTED, PORT_UNOWNED |
Constructor Summary | |
MCASerialPort(java.lang.String deviceName)
MCA SerialPort constructor. |
|
MCASerialPort(java.lang.String deviceName,
java.lang.String noInit)
|
Method Summary | |
int |
available()
This method gets the number of bytes that can be read without blocking |
void |
close()
This method closes the device. |
void |
disableNotifications()
This method disables notifications |
void |
disableReceiveFraming()
This method disables receive framing |
void |
disableReceiveThreshold()
This method disables thresh hold for receive |
void |
disableReceiveTimeout()
This method disables receive timeout |
void |
enableNotifications(boolean b)
This method enables notifications |
void |
enableReceiveFraming(int framingByte)
This method enables receive framing |
void |
enableReceiveThreshold(int thresh)
This method enables thresh hold for receive |
void |
enableReceiveTimeout(int rcvTimeout)
This method enables receive timeout |
int |
getBaudRate()
This method gets the baud rate |
java.io.BufferedInputStream |
getBufferedInputStream()
This method gets Buffered input stream. |
int |
getDataBits()
This method gets the number of data bits |
java.lang.String |
getDeviceName()
This method gets the device name |
int |
getFlowControlMode()
This method gets flow control mode |
java.io.InputStream |
getInputStream()
This method gets input stream. |
java.io.OutputStream |
getOutputStream()
This method gets output stream. |
int |
getParity()
This method gets parity |
java.lang.Object |
getReceivedData()
This method gets the last received data from the device |
int |
getReceiveFramingByte()
This method gets Receive Framing byte |
int |
getReceiveThreshold()
This method gets Receive Threshold |
int |
getReceiveTimeout()
This method gets Receive Timeout |
int |
getStopBits()
This method gets stop bits |
boolean |
isCD()
This method gets the state of the Carrier Detect bit in the UART |
boolean |
isCTS()
This method gets the state of the Clear To Send bit in the UART |
boolean |
isDSR()
This method gets the state of the Data Set Ready bit in the UART |
boolean |
isDTR()
This method gets the state of the Data Terminal Ready bit in the UART |
boolean |
isReceiveFramingEnabled()
This method tests if receive framing enabled |
boolean |
isReceiveThresholdEnabled()
This method tests of receive thresh hold enabled |
boolean |
isReceiveTimeoutEnabled()
This method tests if receive thresh timeout enabled |
boolean |
isRI()
This method gets the state of the Ring Indicator bit in the UART |
boolean |
isRTS()
This method gets the state of the Request To Send bit in the UART |
void |
open()
This method opens the serial device using the port name "serialport.portname=..." specified in the BankframeDevices.properties file for the name deviceName. |
void |
ownershipChange(int type)
This method implements method for CommPortOwnershipListener Interface |
int |
read()
This method reads the next byte from buffered inputstream. |
int |
read(byte[] bytes,
int off,
int len)
This method reads bytes from buffered inputstream. |
void |
restartInputThread()
This method is called by the open( ) method. |
void |
sendBreak(int millis)
This method sends break to serial port |
void |
setDeviceName(java.lang.String deviceName)
This method sets the device name |
void |
setDTR(boolean dtr)
This method sets the Data Terminal Ready bit in the UART |
void |
setFlowControlMode(int flowControl)
This method sets flow control mode for serial device |
void |
setRcvFifoTrigger(int trigger)
Deprecated. This was advisory only. |
void |
setRTS(boolean rts)
This method sets the Request To Send bit in the UART |
void |
setSerialPortParams(int baud,
int databits,
int stopbits,
int parity)
This method sets the serial port paramaters for this device |
java.lang.String |
toString()
This method gets a string representation of the communications port |
java.lang.Object |
waitforDataAvailable(int timeOut)
This method clears the received data value and goes into a wait cycle for a specified time until a new value is received on the serial port If timeout = 0 then the wait cycle is infinite. |
void |
write(byte[] bytes)
This method writes bytes to output stream |
void |
write(int theByte)
This method writes a byte to output stream |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String SERIALPORT_COMMDRIVER
public static final java.lang.String SERIALPORT_NAME
public static final java.lang.String SERIALPORT_BAUD
public static final java.lang.String SERIALPORT_DATABITS
public static final java.lang.String SERIALPORT_STOPBITS
public static final java.lang.String SERIALPORT_PARITY
public static final java.lang.String SERIALPORT_FLOWCONTROL
Constructor Detail |
public MCASerialPort(java.lang.String deviceName, java.lang.String noInit) throws DeviceException
public MCASerialPort(java.lang.String deviceName) throws DeviceException
deviceName
- is the unique String name for this device
DeviceException
Method Detail |
public int available() throws DeviceException
java.io.IOException
DeviceException
public void close()
close
in interface MCADevice
public void disableNotifications()
public void disableReceiveFraming()
public void disableReceiveThreshold()
public void disableReceiveTimeout()
public void enableNotifications(boolean b)
public void enableReceiveFraming(int framingByte) throws DeviceException
DeviceException
public void enableReceiveThreshold(int thresh) throws DeviceException
DeviceException
public void enableReceiveTimeout(int rcvTimeout) throws DeviceException
DeviceException
public int getBaudRate()
public java.io.BufferedInputStream getBufferedInputStream()
public int getDataBits()
public java.lang.String getDeviceName()
getDeviceName
in interface MCADevice
public int getFlowControlMode()
public java.io.InputStream getInputStream()
public java.io.OutputStream getOutputStream()
public int getParity()
public java.lang.Object getReceivedData()
public int getReceiveFramingByte()
public int getReceiveThreshold()
public int getReceiveTimeout()
public int getStopBits()
public boolean isCD()
public boolean isCTS()
public boolean isDSR()
public boolean isDTR()
public boolean isReceiveFramingEnabled()
public boolean isReceiveThresholdEnabled()
public boolean isReceiveTimeoutEnabled()
public boolean isRI()
public boolean isRTS()
public void open() throws DeviceException
open
in interface MCADevice
DeviceException
public void ownershipChange(int type)
ownershipChange
in interface javax.comm.CommPortOwnershipListener
public int read() throws DeviceException
DeviceException
public int read(byte[] bytes, int off, int len) throws DeviceException
DeviceException
public void restartInputThread()
public void sendBreak(int millis)
public void setDeviceName(java.lang.String deviceName)
setDeviceName
in interface MCADevice
deviceName
- is the unique String name for this devicepublic void setDTR(boolean dtr)
public void setFlowControlMode(int flowControl) throws DeviceException
DeviceException
public void setRcvFifoTrigger(int trigger)
public void setRTS(boolean rts)
public void setSerialPortParams(int baud, int databits, int stopbits, int parity) throws DeviceException
javax.comm.UnsupportedCommOperationException
DeviceException
public java.lang.String toString()
public java.lang.Object waitforDataAvailable(int timeOut)
public void write(byte[] bytes) throws DeviceException
DeviceException
public void write(int theByte) throws DeviceException
DeviceException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |