Hi,
I'm using a derived Serialports class for handling all talking/listening on a Serialport. This class is referenced from a number of other classes.
What I basically want is that it handles each call separately, send a command, wait for a respose the given time and return the response or a timeout exception.
If another object is trying to talk during this time it's put on hold, and if the second objects Write timeout time is reached while on hold it will get a TimeOutException too.
One thing that complicates it is that the application have to move on as if no waiting is done. Another thing is I want it simple...
try
sResponse=myCommPort.CommandResponse(sCommand)
catch ex as TimeOutException
Debug.Print"Timed out"
catch ex as Exception
Stop
end try
Any help appreciated
/Kejpa