![]() |
OpenZWave Library 1.6.1914
|
Interface for controllers that implement a Serial Interface (USB Serial Port Emulation) More...
#include <SerialController.h>
Public Types | |
enum | Parity { Parity_None = 0 , Parity_Odd , Parity_Even , Parity_Mark , Parity_Space } |
enum | StopBits { StopBits_One = 0 , StopBits_OneAndAHalf = 1 , StopBits_Two = 2 } |
![]() | |
enum | { Timeout_Immediate = 0 , Timeout_Infinite = -1 } |
typedef void(* | pfnWaitNotification_t) (void *_context) |
Public Member Functions | |
SerialController () | |
virtual | ~SerialController () |
bool | SetBaud (uint32 const _baud) |
bool | SetParity (Parity const _parity) |
bool | SetStopBits (StopBits const _stopBits) |
bool | Open (string const &_SerialControllerName) |
bool | Close () |
uint32 | Write (uint8 *_buffer, uint32 _length) |
![]() | |
Controller () | |
virtual | ~Controller () |
virtual bool | Open (string const &_controllerName)=0 |
virtual bool | Close ()=0 |
virtual uint32 | Write (uint8 *_buffer, uint32 _length)=0 |
uint32 | Read (uint8 *_buffer, uint32 _length) |
![]() | |
Stream (uint32 _bufferSize) | |
void | SetSignalThreshold (uint32 _size) |
bool | Get (uint8 *_buffer, uint32 _size) |
bool | Put (uint8 *_buffer, uint32 _size) |
uint32 | GetDataSize () const |
void | Purge () |
![]() | |
void | AddWatcher (pfnWaitNotification_t _callback, void *_context) |
void | RemoveWatcher (pfnWaitNotification_t _callback, void *_context) |
![]() | |
Ref () | |
void | AddRef () |
int32 | Release () |
Friends | |
class | SerialControllerImpl |
Additional Inherited Members | |
![]() | |
static int32 | Single (Wait *_object, int32 _timeout=-1) |
static int32 | Multiple (Wait **_objects, uint32 _numObjects, int32 _timeout=-1) |
![]() | |
void | LogData (uint8 *_buffer, uint32 _size, const string &_function) |
virtual bool | IsSignalled () |
~Stream () | |
![]() | |
Wait () | |
virtual | ~Wait () |
void | Notify () |
virtual bool | IsSignalled ()=0 |
![]() | |
virtual | ~Ref () |
Interface for controllers that implement a Serial Interface (USB Serial Port Emulation)
OpenZWave::Internal::Platform::SerialController::SerialController | ( | ) |
Constructor. Creates an object that represents a serial port.
|
virtual |
Destructor. Destroys the serial port object.
|
virtual |
Close a serial port. Closes the serial port.
Implements OpenZWave::Internal::Platform::Controller.
|
virtual |
Open a serial port. Attempts to open a serial port and initialize it with the specified parameters.
_SerialControllerName | The name of the port to open. For example, ttyS1 on Linux, or \.\COM2 in Windows. |
Implements OpenZWave::Internal::Platform::Controller.
bool OpenZWave::Internal::Platform::SerialController::SetBaud | ( | uint32 const | _baud | ) |
bool OpenZWave::Internal::Platform::SerialController::SetParity | ( | Parity const | _parity | ) |
bool OpenZWave::Internal::Platform::SerialController::SetStopBits | ( | StopBits const | _stopBits | ) |
|
virtual |
Write to a serial port. Attempts to write data to an open serial port.
_buffer | Pointer to a block of memory containing the data to be written. |
_length | Length in bytes of the data. |
Implements OpenZWave::Internal::Platform::Controller.
|
friend |