|

INTRODUCTION
Overview
Download and Install
Documentation
Publications
REPOSITORY
Libraries
DEVELOPER
Dev Guide
Dashboard
PEOPLE
Contributors
Users

Project
Download
Mailing lists
|
|
|
28 #ifndef __SERIALPORT_H
29 #define __SERIALPORT_H
75 SerialPort (std::map<std::string, std::string> options);
83 ssize_t Read ( void * const buffer, size_t count);
85 ssize_t ReadFull ( void * const buffer, size_t count);
87 ssize_t BytesAvailable ();
93 ssize_t BytesAvailableWait ();
95 ssize_t Write ( const void * const buffer, size_t count);
101 std::string GetStatus () const;
103 void SetTimeout ( Timeout timeout);
105 void SetCanRead ( bool canRead);
107 void SetCanWrite ( bool canWrite);
112 void SetBaudRate ( unsigned int baud);
125 unsigned int _dataBits;
126 unsigned int _stopBits;
127 typedef enum {PAR_NONE, PAR_EVEN, PAR_ODD} Parity;
132 void CheckPort ( bool read);
133 bool ProcessOption ( const std::string &option, const std::string &value);
135 bool IsDataAvailable ();
137 typedef enum {TIMED_OUT, DATA_AVAILABLE, CAN_WRITE} WaitStatus;
138 WaitStatus WaitForDataOrTimeout ();
139 WaitStatus WaitForWritableOrTimeout ();
141 void SetPortSettings ();
142 void SetPortTimeout ();
149 #endif // __SERIALPORT_H
|
|