From: Nate B. <n0...@n0...> - 2009-12-20 17:18:00
|
* Ekki Plicht (DF4OR) <ep...@pl...> [2009 Dec 20 09:32 -0600]: > Hi all, > sorry to be barging in like this, since I have never participated in this list > actively, just lurking. By all means, please feel free to discuss. As I see it, the *ctld daemons are intended to get more people involved. > I strongly second Pinos comment: > - The line terminator should be "\n" and nothing else. > - each line should tell the receiver, what it is about (i.e. token at the > beginning of _each_ and every line) > - items separated by whitespace (space, tab etc.), items containing whitespece > must be escaped (i.e. 'some\ item' or (better) be enclosed in quotes ("" or > ''). > > Event driven programming really asks for that. [snip] > Now what to do with mutli-line replies, like Nate wrote? > > Well, mark it with tokens at the beginning. Each line. Like so: > > dump Model name: FT-920 > dump Mfg name: Yaesu > dump Backend version: 0.3.5 > dump Backend copyright: LGPL > dump Backend status: Stable > > etc etc. I would even prefer to have the various items of a dump quoted, so > there is a clear structure: > <dumpkeyword> <item> <data> [<data> ...] > > like > dump "Backend version" 0.3.5 > dump "tuning steps" "10 Hz" "USB LSB CW" > > etc. Interesting. I'm unfamiliar with the gpsd protocol as with a lot of things. :-) Thanks for your candid experience. Realistically, we can have *ctld send anything we want. We need to be consistent in what we do and document it well. > The easier you make the protocol, the more likely are people (programmers) to > jump the bandwagon and participate. I have to admit that the less then ideal > protocol was (is) one reason for me, not to use rigctld or hamlib, at the > moment. The less than ideal protocol was due to making *ctld very similar to the user *ctl programs. At the time I wasn't sure whether there was a demand for this sort of tool. It hink now that it is obvious there is as there are many languages that hams wish to write in and it is proven to be impossible to support them all consistently with the Swig generated bindings. I think now that the concept is proven that we should do all we can to make *ctld programmer friendly. This is why I'm driving this discussion and why I want to see a lot of comments. :-) I ask everyone to continue to think about this and offer ideas. 73, de Nate >> -- "The optimist proclaims that we live in the best of all possible worlds. The pessimist fears this is true." Ham radio, Linux, bikes, and more: http://n0nb.us/index.html |