Class of SerialPort implement.
More...
|
| | SerialPort (File device, int baudrate) throws SecurityException, IOException |
| | Open serialport with mode 8,1,N,N. More...
|
| |
| | SerialPort (File device, int baudrate, int dataBits, int stopBits, char parity, char flowCtrl) throws SecurityException, IOException |
| | Open serialport with set mode, eg: new SerialPort(new File("/dev/ttyS1"), 8, 1, 'N', 'N') More...
|
| |
| InputStream | getInputStream () |
| | Read form serialport. More...
|
| |
| OutputStream | getOutputStream () |
| | Write to serialport. More...
|
| |
| void | close () |
| | Close the serialport. More...
|
| |
Class of SerialPort implement.
◆ SerialPort() [1/2]
| com.paydevice.smartpos.sdk.serialport.SerialPort.SerialPort |
( |
File |
device, |
|
|
int |
baudrate |
|
) |
| throws SecurityException, IOException |
Open serialport with mode 8,1,N,N.
- Parameters
-
- Returns
◆ SerialPort() [2/2]
| com.paydevice.smartpos.sdk.serialport.SerialPort.SerialPort |
( |
File |
device, |
|
|
int |
baudrate, |
|
|
int |
dataBits, |
|
|
int |
stopBits, |
|
|
char |
parity, |
|
|
char |
flowCtrl |
|
) |
| throws SecurityException, IOException |
Open serialport with set mode, eg: new SerialPort(new File("/dev/ttyS1"), 8, 1, 'N', 'N')
- Parameters
-
| device | serialport File, eg: new File("/dev/ttyS1") |
| dataBits | 5,6,7,8 |
| baudrate | 9600-4000000 |
| stopBits | stop bits 1,2 |
| parity | parity mode N/n,E/e,O/o (N-none, E-Even, O-Odd) |
| flowCtrl | flow control N/n,S/s,H/h (N-none, S-XON/XOFF, H-RTS/CTS) |
- Returns
◆ close()
| void com.paydevice.smartpos.sdk.serialport.SerialPort.close |
( |
| ) |
|
Close the serialport.
- Parameters
-
| fd | file description of serialport |
- Returns
◆ getInputStream()
| InputStream com.paydevice.smartpos.sdk.serialport.SerialPort.getInputStream |
( |
| ) |
|
Read form serialport.
- Returns
◆ getOutputStream()
| OutputStream com.paydevice.smartpos.sdk.serialport.SerialPort.getOutputStream |
( |
| ) |
|
Write to serialport.
- Returns
The documentation for this class was generated from the following file:
- src/com/paydevice/smartpos/sdk/serialport/SerialPort.java