Hmm, this is an old thread! That project is long gone...
Yeah, sorry for the necropost.
![Tongue :P](https://www.eevblog.com/forum/Smileys/default/tongue.gif)
In more recent things, I've just been using a "SCPI-like" protocol. No need to go through the whole standard for something relatively simple, it's not like I've built many DSOs lately! But familiarity is good.
That's the thing. I always end up doing almost-but-not-quite SCPI/GPIB. As in implement just the absolute minimum set of instructions required. And for small projects it often means I'll just do some exceedingly lame strcmp based "parsing" as opposed to a proper parser with lex+yacc or whatever the crazy kids use these days.
The two main reasons (for me at least)
not to implement it according to standard would be:
- code size
- implementation cost (aka your hobby time that you never have enough of)
Relevance of code size as an argument depends a bit on what you run it on. On an stm32 with 1 Mb of flash it's not
that much of an issue.
Having to actually code the handlers is most of the work. So if you can find a library/framework that already does all of the standard scpi stuff then ideally you will mostly be spending time on the actual functionality you were going to do anyway in the minimalistic case. Put another way: if done right, doing it "properly" should have little or no overhead compared to the minimalistic implementation. And the bonus is that all the goodies you accumulate over the years will have a uniform interface. That way they might even work with other people's scpi gui/scripting lab tools, as opposed to just your own stuff.
So far that
scpi-parser looks promising. Even has some tcp and LwIP (on FreeRTOS) examples of an scpi server. Right now all I need is to feed it a string buffer to parse, but nice to know it also has some code for this.
The goal is to have a uniform command interface (SCPI) for future projects. And then your scripts and GUI's just have to emit these standardized commands. I use Qt on android to cobble together a pretty gui with some buttons. Bind the buttons to SCPI commands, emit over USB to serial dongle, and you're all set. Touch screen interface for your projects. Although to be fair, I end up using laptop + console far more often. But the android looks shiney.
![Grin ;D](https://www.eevblog.com/forum/Smileys/default/grin.gif)
Anyways, I'll stop
rambling thinking out loud and make me some tea.
![Tongue :P](https://www.eevblog.com/forum/Smileys/default/tongue.gif)