Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » Serial.h recommended nonblocking write
Serial.h recommended nonblocking write [message #49902] Sat, 02 June 2018 11:51
luoganda is currently offline  luoganda
Messages: 169
Registered: November 2016
Experienced Member
on w7 Serial.Write timeout doesn't work! it blocks...
For Read it's not a problem, since there is Avail() func.

Using this does:
void SetWriteTimeout(dword ms){
  COMMTIMEOUTS ct;memset(&ct,0,sizeof(ct));
  ct.WriteTotalTimeoutConstant=ms;SetCommTimeouts(fd,&ct);
}


I don't know how about linux/mac,
but maybe that 'timeout' should be specified only by upper proposed func and thrown out from Write func for all platforms.

NOTE:
virtual com ports are being used from com0com, but i doubt that is an blocking issue...

[Updated on: Sat, 02 June 2018 11:56]

Report message to a moderator

Previous Topic: ANSI Escape and control sequence parser for U++
Next Topic: UPDATED PROTECT PACKAGE
Goto Forum:
  


Current Time: Fri Dec 03 05:47:11 CET 2021

Total time taken to generate the page: 0.00899 seconds