Hi Everyone,
-- Happy New Year. I need to read from a com port. I am able to use:
I have obviously some flow control code but the above code does read bytes. The problem is if there isn't any data to read it seems to block the VM. Does anyone have any idea how I can see/peek ahead and not try to read until I know there is data present? Big picture: There is a program called SimpleSat that tracks satellites. It can be setup to output control information that can be used to aim an antenna at the satellite. I'm trying to capture that data and convert it to control a different device to move the antenna. To do this I am using com0com to setup a pair of virtual com ports where SimpleSat sends data to one side and another program (mine) can read from the other port of the pair. This seems to work other than the VM blocking problem because I don't know when data is present. All ideas are welcome. Lou You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Hi Everyone, Happy New Year. The problem is solved by defining and setting an instance of: OSCommtimeouts. Something like this:
Both result in the read returning with 0 bytes read when no data is present. The rest is easy. Lou On Monday, December 31, 2018 at 11:38:01 AM UTC-5, Louis LaBrunda wrote: -- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Sorry, I messed up the link. This should work:
-- OSCommtimeouts Lou On Tuesday, January 1, 2019 at 3:26:19 PM UTC-5, Louis LaBrunda wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Free forum by Nabble | Edit this page |