SmartPos SDK for Android  1.3.7
com.paydevice.smartpos.sdk.serialport.SerialPort Class Reference

Class of SerialPort implement. More...

Public Member Functions

 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...
 

Detailed Description

Class of SerialPort implement.

Constructor & Destructor Documentation

◆ 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
device
baudrate
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
deviceserialport File, eg: new File("/dev/ttyS1")
dataBits5,6,7,8
baudrate9600-4000000
stopBitsstop bits 1,2
parityparity mode N/n,E/e,O/o (N-none, E-Even, O-Odd)
flowCtrlflow control N/n,S/s,H/h (N-none, S-XON/XOFF, H-RTS/CTS)
Returns

Member Function Documentation

◆ close()

void com.paydevice.smartpos.sdk.serialport.SerialPort.close ( )

Close the serialport.

Parameters
fdfile 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: