Library to provide a mechanism to make it easier to add RPC to custom code by using RPCFunction and RPCVariable objects. Also includes a class to receive and process RPC over serial.

Dependencies:   mbed-rpc

Dependents:   GSL_10-Pololu_A4983_STEPMOTORDRIVER Protodrive RPC_HTTP RPC_TestHack ... more

Files at this revision

API Documentation at this revision

Comitter:
MichaelW
Date:
Mon Mar 14 18:05:38 2016 +0000
Parent:
9:bcc2e05e5da4
Commit message:
Added adding RPC classes so that new objects can be created ver RPC; ; Not all the classes which were originally supported are still supported and there is an issue with the AnalogIn and AnalogOut so these are not supported here yet

Changed in this revision

SerialRPCInterface.cpp Show annotated file Show diff for this revision Revisions of this file
SerialRPCInterface.h Show annotated file Show diff for this revision Revisions of this file
mbed-rpc.lib Show annotated file Show diff for this revision Revisions of this file
diff -r bcc2e05e5da4 -r 9d82e28ffaea SerialRPCInterface.cpp
--- a/SerialRPCInterface.cpp	Sat Jan 23 22:28:00 2016 +0000
+++ b/SerialRPCInterface.cpp	Mon Mar 14 18:05:38 2016 +0000
@@ -40,24 +40,26 @@
 }
 
 void SerialRPCInterface::_RegClasses(void){
-    /*
+    
     //Register classes with base 
-    Base::add_rpc_class<AnalogIn>();
-    Base::add_rpc_class<DigitalIn>();
-    Base::add_rpc_class<DigitalOut>();
-    Base::add_rpc_class<DigitalInOut>();
-    Base::add_rpc_class<PwmOut>();
-    Base::add_rpc_class<Timer>();
-    Base::add_rpc_class<BusOut>();
-    Base::add_rpc_class<BusIn>();
-    Base::add_rpc_class<BusInOut>();
-    Base::add_rpc_class<Serial>();
+    #if DEVICE_ANALOGIN
+    //RPC::add_rpc_class<RpcAnalogIn>();
+    #endif
+    RPC::add_rpc_class<RpcDigitalIn>();
+    RPC::add_rpc_class<RpcDigitalOut>();
+    RPC::add_rpc_class<RpcDigitalInOut>();
+    RPC::add_rpc_class<RpcPwmOut>();
+    RPC::add_rpc_class<RpcTimer>();
+    //RPC::add_rpc_class<RpcBusOut>();
+    //RPC::add_rpc_class<RpcBusIn>();
+    //RPC::add_rpc_class<RpcBusInOut>();
+    RPC::add_rpc_class<RpcSerial>();
     
     //AnalogOut not avaliable on mbed LPC11U24 so only compile for other devices
-    #if !defined(TARGET_LPC11U24) 
-    Base::add_rpc_class<AnalogOut>();
+    #if DEVICE_ANALOGOUT
+    //RPC::add_rpc_class<RpcAnalogOut>();
     #endif
-    */
+    
 }
 
 void SerialRPCInterface::Disable(void){
diff -r bcc2e05e5da4 -r 9d82e28ffaea SerialRPCInterface.h
--- a/SerialRPCInterface.h	Sat Jan 23 22:28:00 2016 +0000
+++ b/SerialRPCInterface.h	Mon Mar 14 18:05:38 2016 +0000
@@ -34,6 +34,7 @@
 #include "mbed.h"
 #include "platform.h"
 #include "rpc.h"
+#include "RpcClasses.h"
 #include "RPCFunction.h"
 #include "RPCVariable.h"
 
diff -r bcc2e05e5da4 -r 9d82e28ffaea mbed-rpc.lib
--- a/mbed-rpc.lib	Sat Jan 23 22:28:00 2016 +0000
+++ b/mbed-rpc.lib	Mon Mar 14 18:05:38 2016 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/teams/mbed/code/mbed-rpc/#325e3da833e1
+http://developer.mbed.org/teams/mbed/code/mbed-rpc/#3b049dde55d7