12 #ifndef ECL_THREADS_SERIAL_W32_HPP_ 13 #define ECL_THREADS_SERIAL_W32_HPP_ 19 #include <ecl/config.hpp> 28 #include <ecl/exceptions/standard_exception.hpp> 29 #include <ecl/utilities/parameter.hpp> 30 #include <ecl/threads/thread.hpp> 31 #include "serial_parameters.hpp" 127 Serial() : is_open(false), is_run(false), file_descriptor(INVALID_HANDLE_VALUE), error_handler(
NoError) {};
189 bool open()
const {
return is_open; }
289 PurgeComm( file_descriptor, PURGE_RXCLEAR );
290 PurgeComm( file_descriptor, PURGE_TXCLEAR );
297 void clearInputBuffer() { PurgeComm( file_descriptor, PURGE_RXCLEAR ); }
303 void clearOutputBuffer() { PurgeComm( file_descriptor, PURGE_TXCLEAR ); }
311 const Error& error()
const {
return error_handler; }
317 HANDLE file_descriptor;
318 OVERLAPPED m_osRead, m_osWrite;
322 Thread event_receiver;
331 friend void event_proc(
void* arg);
344 class is_sink<Serial> :
public True {};
352 class is_source<Serial> :
public True {};
360 class is_sourcesink<Serial> :
public True {};
#define ecl_throw_decl(exception)
Standard ecl throw exception declaration.
#define ecl_devices_PUBLIC
The primary error handler for ecl libraries.
#define ecl_assert_throw_decl(exception)
Assure throw exception declaration.