#include <SerialController.h>
§ Parity
Enumerator |
---|
Parity_None | |
Parity_Odd | |
Parity_Even | |
Parity_Mark | |
Parity_Space | |
§ StopBits
Enumerator |
---|
StopBits_One | |
StopBits_OneAndAHalf | |
StopBits_Two | |
§ SerialController()
SerialController::SerialController |
( |
| ) |
|
Constructor. Creates an object that represents a serial port.
§ ~SerialController()
SerialController::~SerialController |
( |
| ) |
|
|
virtual |
Destructor. Destroys the serial port object.
§ Close()
bool SerialController::Close |
( |
| ) |
|
|
virtual |
Close a serial port. Closes the serial port.
- Returns
- True if the port was closed successfully, or false if the port was already closed, or an error occurred.
- See also
- Open
Implements OpenZWave::Controller.
§ Open()
bool SerialController::Open |
( |
string const & |
_SerialControllerName | ) |
|
|
virtual |
Open a serial port. Attempts to open a serial port and initialize it with the specified paramters.
- Parameters
-
_SerialControllerName | The name of the port to open. For example, ttyS1 on Linux, or \. in Windows. |
- Returns
- True if the port was opened and configured successfully.
- See also
- Close, Read, Write
Implements OpenZWave::Controller.
§ SetBaud()
bool SerialController::SetBaud |
( |
uint32 const |
_baud | ) |
|
Set the serial port baud rate. The serial port must be closed for the setting to be accepted.
- Parameters
-
_baud | Integer containing the expected baud-rate of the serial connection. Most Z-Wave interfaces run at 115200 baud. |
- Returns
- True if the baud value was accepted.
- See also
- Open, Close
§ SetParity()
bool SerialController::SetParity |
( |
Parity const |
_parity | ) |
|
Set the serial port parity. The serial port must be closed for the setting to be accepted.
- Parameters
-
_parity | Parity enum value indicating the serial data's expected type of parity bits, if any. |
- Returns
- True if the parity value was accepted.
- See also
- Open, Close
§ SetStopBits()
bool SerialController::SetStopBits |
( |
StopBits const |
_stopBits | ) |
|
Set the serial port stop bits. The serial port must be closed for the setting to be accepted.
- Parameters
-
_stopBits | StopBits enum value indicating the serial data's expected number of stop-bits. |
- Returns
- True if the stop bits value was accepted.
- See also
- Open, Close
§ Write()
Write to a serial port. Attempts to write data to an open serial port.
- Parameters
-
_buffer | Pointer to a block of memory containing the data to be written. |
_length | Length in bytes of the data. |
- Returns
- The number of bytes written.
- See also
- Read, Open, Close
Implements OpenZWave::Controller.
§ SerialControllerImpl
The documentation for this class was generated from the following files: