I have a well developed project that has a CLI implemented with my own extensive set of commands and responses etc.
However I would very much like to leverage the fantastic set of tools and visualisers etc from MegunoLink.
My initial thought is to make up a filter that detects if the message format is one for MegunoLink and passes this onto the appropriate handler/stream whilst letting all others go through to my CLI.
Is this something others have done?
My project is running on a Teensy4.1 so I have plenty of resources available to do such an implementation.
Using MegunoLink command interface ontop of exiting CLI
From the UDP command handling example:
So it looks like the sort of thing I can implement in my CLI statemachine ie if message is prefixed with a '!' then invoke the DispatchCommand function as above.
Code: Select all
if (Length >0 && ReceiveBuffer[0] == '!')
{
TruncateAtNewLine(ReceiveBuffer);
Commands.DispatchCommand(ReceiveBuffer + 1, UdpConnection);
}