Quote:
Originally Posted by
dnar
Do you have a thermal sensor on the board? If so, the board temperature could be part of broadcast packet. Could be useful.
Not onboard, no; if it's used for TEC control, then there will be multiple offboard sensors, and an onboard one wouldn't add much.
Quote:
Why not include a command to enable/disable the watch dog? Could be useful for debugging.
Best to use a custom build for that. The watchdog can be disabled by JTAG if necessary, also.
Quote:
I am just curious as to how this will work from a synchronisation perspective as you will be buffering point data.
The host, at any given time, knows exactly what the device is playing back (modulo network latency) based on the status packets. Anything other than a straight up stream brings up the issue of "what do we do if the host hasn't told us what to do right now?"
Quote:
Your on-chip RTC has 1/100th second resolution I would assume.
There is no RTC. The chip does have timers that can be used for a tick clock, set to any division of the 50.000 MHz +/-30ppm reference.
Quote:
Should the playback command include a parameter to select the playback source? (net/SD)?
I'm only worrying about network streaming for now; other sources will come later.
Quote:
Will you support transferring network frames to the SD? That would be cool. Load the SD via the network, play from SD.
Patience! :P
Quote:
From what I see, you accept 16 bit values for point data, so unless you accept limit values for uint16_t control I don't see how you would detect invalid parameters.
Yeah, that should be changed to just "invalid command".
Quote:
Other than this, I also question the use of TCP. In the very least I would use TCP for control and UDP for point data frames. I am not sure what you expect the PC Software to do should it receive TCP NAK's to point data... If the NAK is due to a full buffer condition then the only course of action is to wait. This now get's very tricky to handle. How long do we wait before discarding the point data?
I would have preferred a system were the PC streams UDP data packets and the buffer level is reported, throttling the stream as required. Or a time synchronized method as I mentioned above (the PC should be able to know the buffer level at all times), although that does require the PC software to issue messages before they are to be displayed.
There's really no advantage to UDP over TCP for this application. TCP gives an ordered, reliable stream, and if we wanted to use UDP for this application we'd have to build that on top of UDP *anyway*. If packets are dropped on the network, or come in out of order, it is simply not safe for the laser to just hold still for a while or play points out of order. The PC can throttle the stream as needed with this setup, since each packet is ACKed with the buffer status. We also don't have to worry about splitting transmissions into MTU-sized units with TCP.
The usual reasons for UDP are situations where broadcast/multicast is needed (not here), or where the overhead of keeping connection state is too much (not here), or where the time that would be taken for a retransmission is excessive (not here, on a local switched LAN). TCP seems to make much more sense.