Here's a library that works for both: maple and arduino.
It's a serial/rs485 protocol library for sending messages/commands + arguments and recipes for those. Half duplex.
Warning: uses malloc's (atleast in initial version..)
Free to use. Poorly documented, but examples help getting somewhere. Just don't connect anything RTS pin if you don't want use rs485 or similar.. Ofcourse if you decide to use this, don't use rts pin stuff at all if only using serial..
Get it from here: https://github.com/oskarirauta/commandInterpreter