39#include "../log/log.h" 
   45typedef HANDLE FILE_DESCRIPTOR;
 
   46#define INVALID_FILE_DESCRIPTOR INVALID_HANDLE_VALUE 
   50typedef int FILE_DESCRIPTOR;
 
   51#define INVALID_FILE_DESCRIPTOR -1 
   63    UART(
const std::string& devfile, 
int baud);
 
   64    bool Connect(
const std::string& devfile, 
int baud, 
bool dtrEnable = 
false);
 
   68    bool Read(
unsigned char* data, 
int len);
 
   69    bool Write(
const unsigned char* data, 
int len);
 
   71    FILE_DESCRIPTOR GetHandle()
 
   77            return m_socket.IsValid();
 
   79        return (m_fd != INVALID_FILE_DESCRIPTOR);
 
Declaration of Socket class.
 
Class representing a network socket.
Definition: Socket.h:63
 
Wrapper class for a serial port.
Definition: UART.h:59
 
void Close()
Disconnects from the serial port.
Definition: UART.cpp:256
 
UART()
Constructor.
Definition: UART.cpp:83
 
virtual ~UART()
Destructor.
Definition: UART.cpp:94
 
bool Connect(const std::string &devfile, int baud, bool dtrEnable=false)
Connects to a serial port.
Definition: UART.cpp:107