182 |
std::cout << description << " : " << (int) byte << "/" << std::setw(2) << std::setfill('0') << std::hex << (int) byte << std::endl; |
std::cout << description << " : " << (int) byte << "/" << std::setw(2) << std::setfill('0') << std::hex << (int) byte << std::endl; |
183 |
std::cout << std::dec; |
std::cout << std::dec; |
184 |
} |
} |
|
|
|
|
/* |
|
|
void CSerial::writeBytes(UCVector out) |
|
|
{ |
|
|
unsigned long bytesWritten; |
|
|
unsigned int size = out.size(); |
|
|
unsigned char *buf = new unsigned char[size]; |
|
|
|
|
|
for (int i=0; i<size; i++) |
|
|
buf[i] = out[i]; |
|
|
|
|
|
WriteFile(mComport,buf,size,&bytesWritten,NULL); |
|
|
if (bytesWritten != size) |
|
|
{ |
|
|
std::string error = writeLastError(); |
|
|
CloseHandle(mComport); |
|
|
throw std::exception(error.c_str()); |
|
|
} |
|
|
delete[] buf; |
|
|
} |
|
|
*/ |
|
|
|
|
|
|
|
|
/* |
|
|
UCVector CSerial::readBytes(int maxcount) |
|
|
{ |
|
|
UCVector buf; |
|
|
|
|
|
|
|
|
|
|
|
return buf; |
|
|
} |
|
|
*/ |
|