sprint 1-alpha
|
a serial (es RS232) communication object More...
#include <serial.h>
Public Member Functions | |
serial (LPCTSTR lpszComName) | |
bool | open (LPCTSTR lpszInput, bool read, bool write, bool async) |
Open a serial interface. Reading/Writing. | |
LPCOMMPROP | GetProp () |
returm COMMPROP serial properties | |
bool | good () const |
test if connection is valid | |
void | SetTimeouts (COMMTIMEOUTS *pcto) |
BOOL | SetState (DCB *dcb) |
BOOL | GetState (DCB *dcb) const |
bool | SetBaudRate (int rate) |
bool | SetParity (int parity) |
bool | SetFlowControl (int mode) |
BOOL | EscapeFunction (DWORD dwFunc) |
BOOL | GetModemStatus (LPDWORD lpModemStat) |
void | close () |
close the device | |
BOOL | Read (char *buffer, UINT uBufferSize, LPDWORD lpdwNumberOfBytesRead, LPDWORD lpdwStatus) |
win32 specific read | |
BOOL | Write (const char *buffer, UINT uBufferSize, LPDWORD lpdwNumberOfBytesWritten, LPDWORD lpdwStatus) |
win32 specific write | |
int | read (char *buf, int size) |
read bytes from serial | |
int | get () |
read a single char | |
int | write (const char *buf, int size) |
write data on serial | |
Static Public Member Functions | |
static bool | IsAvaiable (LPCTSTR lpszCommName) |
static BOOL | Configure (HWND hWnd, LPCTSTR lpszComName) |
static bool | Test (LPCTSTR lpszCommName, LPTSTR lpszMsgBuffer) |
static BOOL | TestDCB (LPCTSTR lpszCommName, DCB *test) |
static void | DCBString (LPSTR lpszBuffer, UINT uBufferLen, DCB *test) |
Public Attributes | |
HANDLE | hComm |
a serial (es RS232) communication object
sprint::io::serial::serial | ( | LPCTSTR | lpszComName | ) |
Open a serial interface for both reading/writing