[Gambas-user] using events of serial ports for reading how_?
T Lee Davidson
t.lee.davidson at gmail.com
Sun Aug 12 02:47:40 CEST 2018
No, there should not "always be data to read". If the printer responds there should be data to read *after a certain amount of
time*. You have to give the printer/driver time to respond. Your program does not.
And, you cannot rightly say that the event is never raised if you do not allow time for that to happen, which, again, your
program does not. I queried a LAN connected printer with a PCL Echo command. It took over three seconds to receive the response.
Finally, if a Stream is being WATCHed, the program can (will?) hang if the Stream is not closed prior to application exit.
___
Lee
On 08/10/2018 08:04 AM, PICCORO McKAY Lenz wrote:
> 2018-08-09 23:12 GMT-04:00 T Lee Davidson <t.lee.davidson at gmail.com <mailto:t.lee.davidson at gmail.com>>:
>
> > it's suppost that the event raised automatically if there some data! right? as documentation!
>
> Yes, exactly, IF there is some data. How do you know there is data available that should trigger the _Read event?
>
> always after a write , will be a response, inclusivelly a garbage response if any! so "always be data to read"
>
> And, if there
> is indeed data available, how do you know for sure that the event isn't being triggered?
>
> due if i do not use the "rp" function, never raise the event!
>
> > somethings programs ends something not! get hang on "some where" here! i put pause and code does not pause!
> Well Gambas has no "Pause" statement, so I don't know what you mean.
>
> i mean the "play", "pause", "stop" from the ide in the tool bar or whatever named
>
>
>
>
> ___
> Lee
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
>
>
>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
More information about the User
mailing list