1
Buy/Sell/Wanted / Re: WTB (UK/EU)- Toroidal coil winder & bobbin coil winder
« Last post by coromonadalix on Today at 02:57:06 pm »For professional use ?
You surely know about diy ones ?
You surely know about diy ones ?
What works for me is a struct like this:Good tip for the ASCII 32 to 127. Thanks. I see that you use also var arguments. Any open source project of yours that you could share with us? I am also interested how do you do parsing. I am a hobby coder therefore quite an amateur.
struct TCommand
{
char *command;
void (*func)(int argc, char **argv);
char *helptext;
};
which is used to create an array with commands and help texts. I use a buffer which only receives text (>=32 <127). When a 13 is encountered, the input buffer is split by spaces, the space replaced by 0x00 to mark end of string and an array with pointers to each parameter is created. The first entry into the parameter array is the command. Iterate over the commands to find an match and call the callback function. Note that the callback function is exactly like the main function of a 'regular' C program.
Every piece of embedded software I have made or worked on has a CLI and this has been proven to be an immensly useful feature for development, integration testing and field debugging (logging & fault finding).
I had read that Siglent changed things recently in newer firmware... or maybe just newer models, I'm not sure... so I was curious if this script could reproduce my legit-purchased logic analyzer key for the SDS3000X HD, and nope... it's different.