Improved RPC library with added bounds checking to stop memory corruption, removed memory leaks, Arduino pin names, better object discovery.
Fork of mbed-rpc by
I have added bounds checking in both Argument and Reply classes to stop existing buffer over-runs in both classes.
Added the ability to discover the name and class of an RPC object to allow better discovery of existing objects on a server. Removed a memory leak with externally created RPC objects. Ensured consistency so that externally created objects can't be deleted using the RPC interface and are correctly listed after RPC::clear.
Updated RPCVariable to use references instead of pointers to ensure that the compiler checks that there is always a valid backing variable. Also removed RPC new/delete functionality as this is not valid. Added a specialisation of RPCVariable to allow for strings to be read and written via RPC.
Added Arduino pin names to parse_pins, currently only for FRDM boards but same code should work for others just need to add them to the #ifdef.
Files at revision 10:7511acfaa62d
Name | Size | Actions |
---|---|---|
[up] | ||
Arguments.cpp | 4411 | Revisions Annotate |
Arguments.h | 1468 | Revisions Annotate |
RPCFunction.cpp | 1471 | Revisions Annotate |
RPCFunction.h | 1703 | Revisions Annotate |
RPCVariable.h | 3266 | Revisions Annotate |
RpcClasses.h | 11885 | Revisions Annotate |
mbed_rpc.h | 794 | Revisions Annotate |
parse_pins.cpp | 5301 | Revisions Annotate |
parse_pins.h | 794 | Revisions Annotate |
rpc.cpp | 6315 | Revisions Annotate |
rpc.h | 9482 | Revisions Annotate |