B4J Programming Press on the image to return to the main documentation page.

jSerial

List of types:

Serial

Serial


Events:

None

Members:


  Close As Boolean

  CTS As Boolean [read only]

  DSR As Boolean [read only]

  DTR As Boolean [write only]

  GetInputStream As java.io.InputStream

  GetOutputStream As java.io.OutputStream

  Initialize (EventName As String)

  ListPorts As List

  Open (PortName As String)

  PURGE_RXABORT As Int

  PURGE_RXCLEAR As Int

  PURGE_TXABORT As Int

  PURGE_TXCLEAR As Int

  PurgePort (PurgeFlags As Int)

  ReadingThreadInterval As Int

  RTS As Boolean [write only]

  SendBreak (Duration As Int) As Boolean

  SetParams (BaudRate As Int, DataBits As Int, StopBits As Int, Parity As Int)

Members description:

Close As Boolean
Closes the port. Nothing happens if the port is not open.
CTS As Boolean [read only]
Gets the state of the CTS line.
DSR As Boolean [read only]
Gets the state of the DSR line.
DTR As Boolean [write only]
Sets the state of the DTR line.
GetInputStream As java.io.InputStream
Returns an InputStream that can be used with AsyncStreams.
GetOutputStream As java.io.OutputStream
Returns an OutputStream for working with AsyncStreams.
Initialize (EventName As String)
Initializes the object and sets the subs that will handle events (as of version 1.00 there are no events).
ListPorts As List
Returns a list with the ports names.
Open (PortName As String)
Opens a port.
PURGE_RXABORT As Int
PURGE_RXCLEAR As Int
PURGE_TXABORT As Int
PURGE_TXCLEAR As Int
PurgePort (PurgeFlags As Int)
Purges the input and output buffers. PurgeFlags should be one of the PURGE constants
or any combination (with Bit.Or).
ReadingThreadInterval As Int
Reading from the serial port is done with a background thread. ReadingThreadInterval sets the polling interval, in milliseconds.
Default value is 10.
RTS As Boolean [write only]
Sets the state of the RTS line.
SendBreak (Duration As Int) As Boolean
Sends a break signal.
SetParams (BaudRate As Int, DataBits As Int, StopBits As Int, Parity As Int)
Sets the connection parameters.
You should only call this method after the port was opened.
Top