Package | Description |
---|---|
com.pi4j.io.serial | |
com.pi4j.io.serial.impl | |
com.pi4j.util |
Modifier and Type | Method and Description |
---|---|
SerialConfig |
SerialConfig.baud(Baud baud) |
SerialConfig |
SerialConfig.dataBits(DataBits dataBits) |
SerialConfig |
SerialConfig.device(String device) |
SerialConfig |
SerialConfig.flowControl(FlowControl flowControl) |
SerialConfig |
SerialConfig.parity(Parity parity) |
SerialConfig |
SerialConfig.stopBits(StopBits stopBits) |
Modifier and Type | Method and Description |
---|---|
void |
Serial.open(SerialConfig serialConfig)
This opens and initializes the serial port/device and sets the communication parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
SerialImpl.open(SerialConfig serialConfig)
This opens and initializes the serial port/device and sets the communication parameters.
|
Modifier and Type | Method and Description |
---|---|
static SerialConfig |
CommandArgumentParser.getSerialConfig(SerialConfig defaultConfig,
String... args)
This utility method searches for the following options:
"--device (device-path)" [DEFAULT: /dev/ttyAMA0]
"--baud (baud-rate)" [DEFAULT: 38400]
"--data-bits (5|6|7|8)" [DEFAULT: 8]
"--parity (none|odd|even)" [DEFAULT: none]
"--stop-bits (1|2)" [DEFAULT: 1]
"--flow-control (none|hardware|software)" [DEFAULT: none]
in the arguments array and returns a SerialConfig instance based on the option
values detected.
|
Modifier and Type | Method and Description |
---|---|
static SerialConfig |
CommandArgumentParser.getSerialConfig(SerialConfig defaultConfig,
String... args)
This utility method searches for the following options:
"--device (device-path)" [DEFAULT: /dev/ttyAMA0]
"--baud (baud-rate)" [DEFAULT: 38400]
"--data-bits (5|6|7|8)" [DEFAULT: 8]
"--parity (none|odd|even)" [DEFAULT: none]
"--stop-bits (1|2)" [DEFAULT: 1]
"--flow-control (none|hardware|software)" [DEFAULT: none]
in the arguments array and returns a SerialConfig instance based on the option
values detected.
|
Copyright © 2012–2021 Pi4J. All rights reserved.