20 SerialConnection(
const std::wstring& _comstring,
const DWORD& _baud = CBR_9600,
const BYTE& _bytesize = 8,
const BYTE& _parity = NOPARITY,
const BYTE& _stopbits = ONESTOPBIT);
26 void Send(
const std::string& _string);
31 std::vector<BYTE>
Receive(
const uint32_t& _toread,
const uint32_t& _waitfor = 100);
BOOL status
current status
void Send(const std::string &_string)
send command string over connection
bool initialized
is connection already initialized?
HANDLE hCom
the connection handle
std::vector< BYTE > Receive(const uint32_t &_toread, const uint32_t &_waitfor=100)
Receive bytes from connection, does only wait 100ms for the bytes to be ready, otherwise throws...
SerialConnection(const std::wstring &_comstring, const DWORD &_baud=CBR_9600, const BYTE &_bytesize=8, const BYTE &_parity=NOPARITY, const BYTE &_stopbits=ONESTOPBIT)
Initializes connection.
~SerialConnection(void)
Closes connection.
Class around a Win32 API serial connection.