12 #ifndef ECL_THREADS_SERIAL_W32_HPP_ 
   13 #define ECL_THREADS_SERIAL_W32_HPP_ 
  127         Serial() : is_open(false), is_run(false), file_descriptor(INVALID_HANDLE_VALUE), error_handler(
NoError) {};
 
  189         bool open()
 const { 
return is_open; }
 
  202         long write(
const char &c);
 
  212         long write(
const char *s, 
unsigned long n);
 
  234         void block(
const long &timeout = 500);
 
  276     long read(
char *s, 
const unsigned long &n);
 
  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 {};