Il 23/10/2015 15:39, Adrian Godwin ha scritto:
> It's a really bad solution for communicating between two fast things
> over a slow channel (happy to expand on that but in a different thread
> please)
Happy to see more on this topic from your experience, feel free to start
a new discussion on that! :-)
So, the questions to ask In order to shape the API are:
How do these other devices behave with respect to RTS/CTS?
Will a device behave well, and stop transmitting, or does it spill the fifo?
If a device has a fifo that dumps, how much incoming data should be expected?
--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.
I'd just call it autoflow, because that is what it is... automatic.
I'm not sure that is applicable for the things you are
discussing. The difference between DTR (Data Terminal Ready)/DSR (Data
Set Ready) and RTS/CTS systems is that one is considered DTE (Data Terminal
Equipment) and the other is considered DCE (Data Carrier Equipment). The
former being "terminals" or things that looked like terminals to the
hardware/software, and the later being modems for all intents and
purposes. In the "old" days, DTR was a common control for flow,
being both used for terminals and just basic communication circuits, since in
those items you weren't too concerned with 100% error free connections.
RTS/CTS normally was used in higher rate communications or when the data needed
to be guaranteed complete, or like in a modem - when the endpoints were not
specifically defined. You also had the issue that as someone has
mentioned already - baud rates were no higher than 19.2 or 38.4 maximum, and
those overruns were handled by 16 byte FIFO chips in hardware, or tight
Interrupt service routines, just as bi-sync communications did (this is mid
1980's stuff) at the time. Obviously contributing to the problem is that
the original basis for RS232 was not well defined outside of the basic wiring
schematic. The timing that occurred when using for example Xon/Xoff relied
solely on if the receiving end could interrupt or poll fast enough to answer
before losing data pouring in. Ideally, you would handle these high speed
communications using a larger ring buffer and a dedicated hardware signal
combined with the software buffering, since the return handshake if using
Xon/Xoff is most likely is slower than the electrical handshake for those types
of physically connected devices.
I can give the history of these having both an intimate electronics knowledge,
and software background going back to the "wild west" of
things. As pertaining to the issues at hand, I can only offer this
wisdom. If the slowest rate of communication data at any point in the
circuit is "X" then the rest of it should only be required to perform
to that specification. So if you are only sending polled data for a time
stamp - it most likely doesn't need to run through a system at a ginormous baud
rate, slow works well - even 2400 baud has it's uses - however crude that
sounds.
And Dennis, you are quite correct from the standpoint of Ham radio, they have
grown rapidly in the last 30 years and now support many types of devices that
require data control. Some are just sheer waiting and re-polling, but I'm
not so sure that looking at how some of those devices were implemented wouldn't
give new light to the questions on handling data communications within these
libraries.