Compounds | |
struct | lfc::posixPAL::serial::PortSettings |
contain port settings to save/restore. More... | |
Typedefs | |
typedef int | Handle |
serial port handle type. More... | |
Enumerations | |
enum | ErrorCodes { errOk, errGeneric, errNotSupported } |
Functions | |
int | init () |
init PAL. More... | |
int | cleanup () |
cleanup PAL. More... | |
int | open (Handle &handle, const char *name) |
open serial port. More... | |
int | close (Handle handle) |
close a serial port. More... | |
int | write (Handle handle, const void *buff, long count, long &writtenCount) |
write data to a serial device. More... | |
int | read (Handle handle, void *buff, long count, long &readCount) |
read data from a serial device. More... | |
int | flush (Handle handle) |
flush output buffer. More... | |
int | setup (Handle handle, const char *portSettings) |
set port settings (baud rate, parity, ...). More... | |
int | availableCount (Handle handle, long &count) |
get the number of bytes available in the input buffer. More... | |
int | setHardwareFlowControl (Handle handle, bool bEnable) |
enable/disable hardware flow control. More... | |
int | setSoftwareFlowControl (Handle handle, bool bEnable, char Xon, char Xoff) |
enable/disable software flow control. More... | |
int | setReadTimeouts (Handle handle, long timeout) |
set read timeouts. More... | |
int | setBlockingRead (Handle handle, bool bBlocking) |
enable/disable blocking read. More... | |
int | purgeBuffer (Handle handle, int flags) |
purge i/o buffers. More... | |
int | sendBreak (Handle handle) |
send a break (for 500ms). More... | |
int | getModemStatus (Handle handle, int &status) |
get modem status bits (DSR, DTR, RTS, CTS, DCD, RNG). More... | |
int | setDTR (Handle handle, bool bEnable) |
enable/disable DTR. More... | |
int | setRTS (Handle handle, bool bEnable) |
enable/disable RTS. More... | |
int | saveSettings (Handle handle, PortSettings &settings) |
save current port settings. More... | |
int | restoreSettings (Handle handle, const PortSettings &settings) |
restore current port settings. More... | |
const char * | message (int index) |
return the message coresponding to a return code. More... | |
Variables | |
const int | MAX_ERROR_CODE = 2 |
const char * | messagesTable [MAX_ERROR_CODE+1] |
const Handle | NULL_HANDLE = -1 |
a handle value designating an invalid handle. More... | |
const int | purgeInput = 0x0001 |
purge buffer flags. More... | |
const int | purgeOutput = 0x0002 |
purge buffer flags. More... | |
const int | mstatusDSR = 0x0001 |
modem status flags. More... | |
const int | mstatusDTR = 0x0002 |
modem status flags. More... | |
const int | mstatusRTS = 0x0004 |
modem status flags. More... | |
const int | mstatusCTS = 0x0008 |
modem status flags. More... | |
const int | mstatusDCD = 0x0010 |
modem status flags. More... | |
const int | mstatusRNG = 0x0020 |
modem status flags. More... |
need testing
|
serial port handle type.
|
|
|
|
init PAL.
|
|
cleanup PAL.
|
|
open serial port.
|
|
close a serial port.
|
|
write data to a serial device.
|
|
read data from a serial device.
|
|
flush output buffer.
|
|
set port settings (baud rate, parity, ...).
<S> where
|
|
get the number of bytes available in the input buffer.
|
|
enable/disable hardware flow control.
|
|
enable/disable software flow control.
|
|
set read timeouts.
|
|
enable/disable blocking read.
|
|
purge i/o buffers.
|
|
send a break (for 500ms).
|
|
get modem status bits (DSR, DTR, RTS, CTS, DCD, RNG).
|
|
enable/disable DTR.
|
|
enable/disable RTS.
|
|
save current port settings.
|
|
restore current port settings.
|
|
return the message coresponding to a return code.
|
|
|
|
Initial value: { "posixPAL::serial -- No error (ok)", "posixPAL::serial -- Generic error", "posixPAL::serial -- Not supported", } |
|
a handle value designating an invalid handle.
|
|
purge buffer flags.
|
|
purge buffer flags.
|
|
modem status flags.
|
|
modem status flags.
|
|
modem status flags.
|
|
modem status flags.
|
|
modem status flags.
|
|
modem status flags.
|