|Modifier and Type||Method and Description|
Interpret a character sequence as parity specification.
Determine the baud rate from an baud index.
Event type as String.
Data flow control mode as String.
Fetch an object on an implementing class, optionally open the port.
Parity as String.
Text representation of the interface's state.
public static String parityAsString(int parity)
SerialDefs) "--" is returned.
public static String eventAsString(int eventType)
public static StringBuilder flowControlAsText(StringBuilder bastel, int flowControlMode)
flowControlModewill be interpreted according to
SerialDefs's flow control constants and appended as character sequence to
bastel- StringBuilder to append to; if null
bastelis made with an initial capacity of 20
public static StringBuilder stateAsString(StringBuilder sb, SerialDefs port)
sbas three line text.
sb- StringBuilder to append to; if null
sbis made with initial capacity of 180
port- the implementation, the state of which shall be reported
public static int asParity(CharSequence parityString)
SerialDefsparity constant and its value returned.
public static int baudRate(int baudIndex)
baudIndexin the range 0 to 12 will be interpreted as the number / index of one of the usual (standard) baud rates:
baudIndex) values >= 60 will be returned unchanged as they may be special baut rates.
baudIndex- Index 0..12 or itself a rate (if >= 60)
public static SerialDefs newInstance(CharSequence implClass, CharSequence portName)
SerialDefsmaking it by its parameterless Constructor. If the parameter
implClassdoes not denominate a fitting class "de.frame4j.io.SerNimpl" will be taken.
SerialDefsobject fails, null is returned.
portNameis not empty it will be tried to connect the
SerialDefsobject just made by
openSerial(portName). The parameter
portNamemay also be a list (according to the rules of the method
prepParams(portName, null, false)) of port names. that will be tried one by one until success or end of list.
open/ to connect can be checked by
isReady()of the object returned. In the case of a supplied port name list
getPortName()will return the single port name used / connected to in the end.
implClass- the implementing classes name; default is de.frame4j.io.SerNimpl
portName- operation system / platform name or names of the serial port to optionally connect; e.g "COM2" or a list like "COM2 serialB"; null or empty means no opening connecting to be tried by using
TextHelper.prepParams(CharSequence, String, boolean)