[Gambas-user] using events of serial ports for reading how_?
PICCORO McKAY Lenz
mckaygerhard at gmail.com
Wed Aug 8 23:57:16 CEST 2018
hi, me again! i modify a little now the class, with a auto null semaphore
as everybody said, if there's data in the port a read event will raise, but
there's not happened
i must manually send a read operation with my manual method to work.. why?
attached the project and also something when all the main.module lines
executed, programs does not end...
another question, i have a property (printermananger) that access to a
property in the printerclass
that behaviour are too complex or inneficient or improperty?
Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com
2018-08-07 12:52 GMT-04:00 PICCORO McKAY Lenz <mckaygerhard at gmail.com>:
> El mar., 7 de ago. de 2018 a la(s) 09:42, Tony Morehen
>
>> ...user space programs no longer need to deal with the low level details
>> of handshaking and flow control..... and just read and write to the serial
>> port as a stream.
>>
> ok as i write, so gambas handle all the manage of the information
> to read and write using stream and Eof, (wow so great! right? )
> in any case was a great information about the data workflow,, thanks
> anyway tony
>
>> One issue that may arise, the linux kernel only uses CTS/RTS for flow
>> control; it ignores DSR/DTS.
>>
> important information many thanks for that, This must be in the gambas
> wiki page of the seria port too
> i'll mark this mail and make a tutorial with better information
>
>
> El mar., 7 de ago. de 2018 a la(s) 12:06, T Lee Davidson
> > Even if any of them signal that data is available, the _Read event
> already does that for you.
> yeah i already know, it's hard to explain for me ...
>
> > Perhaps your goal could be accomplished by implementing a
> SerialPort.Read event handler
> NO, no more handlers or events, a normal procedimental methond
>
> > that adds the incoming data to a global accumulator,
> > and then manually reading the accumulator and clearing it once it's read.
> i want that in any moment can read the acumulator, and pas a command to
> modifi taht data
> again hard to explain and there's too much information to hide by the
> company
>
> > However, that may run into collisions and data integrity issues
> > if you try to manually read from, or clear, the accumulator
> > while the event handler is writing to it.
> yeah only if the data are not knowed but i really know parto of them
> of course we need implement a semaphore
>
> > Or, maybe using a Queue would meet your need:
> http://gambaswiki.org/wiki/comp/gb.data/queue .
> > (It's unfortunate that there's not much documentation on that.)
> a concurrent problem on the wiki, it's suppost to be first source of
> information and seems it's maillist
> i disagree that mailist be a source of information, a documentaiton it's
> the main tower of any project!
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180808/4f7a1924/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: prueba-printer-manager-0.0.3.tar.gz
Type: application/gzip
Size: 13982 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180808/4f7a1924/attachment-0001.gz>
More information about the User
mailing list