equal
deleted
inserted
replaced
71 } |
71 } |
72 |
72 |
73 bool can_uvccm_win32::send(const Message *m) |
73 bool can_uvccm_win32::send(const Message *m) |
74 { |
74 { |
75 if (m_port == INVALID_HANDLE_VALUE) |
75 if (m_port == INVALID_HANDLE_VALUE) |
76 return false; |
76 return true; |
77 |
77 |
78 // build can_uvccm_win32 command string |
78 // build can_uvccm_win32 command string |
79 std::string can_cmd; |
79 std::string can_cmd; |
80 set_can_data(*m, can_cmd); |
80 set_can_data(*m, can_cmd); |
81 |
81 |
91 ::WaitForSingleObject(overlapped.hEvent, WRITE_TIMEOUT); |
91 ::WaitForSingleObject(overlapped.hEvent, WRITE_TIMEOUT); |
92 // get number of bytes written |
92 // get number of bytes written |
93 ::GetOverlappedResult(m_port, &overlapped, &bytes_written, FALSE); |
93 ::GetOverlappedResult(m_port, &overlapped, &bytes_written, FALSE); |
94 |
94 |
95 bool result = (bytes_written == can_cmd.size()); |
95 bool result = (bytes_written == can_cmd.size()); |
96 |
96 |
97 return result; |
97 return false; |
98 } |
98 } |
99 |
99 |
100 |
100 |
101 bool can_uvccm_win32::receive(Message *m) |
101 bool can_uvccm_win32::receive(Message *m) |
102 { |
102 { |