Code written by Paul Rabbat, Angel Daruna, Jarel Hawkins, and Cordel Williams

Dependencies:   4DGL-uLCD-SE EthernetInterface HTTPClient NTPClient PinDetect SDFileSystem mbed-rpc mbed-rtos mbed wave_player

Fork of ECE4180_FinalProject by Angel Daruna

Revision:
0:0a99e3fc2a46
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RPCType.cpp	Sat Nov 15 19:36:44 2014 +0000
@@ -0,0 +1,33 @@
+#include "mbed.h"
+#include "mbed_rpc.h"
+#include "RPCType.h"
+
+RPCType::RPCType(): supported_types(){}
+
+RPCType& RPCType::instance()
+{
+    static RPCType t;
+    return t;
+}
+
+void RPCType::register_types()
+{
+    RPCType &t = instance();
+    RPC::add_rpc_class<RpcAlarm>();
+    t.supported_types.push_back("Alarm");
+    RPC::add_rpc_class<RpcDigitalOut>();
+    t.supported_types.push_back("DigitalOut");
+}
+
+bool RPCType::is_supported_type(char *type)
+{
+    for(std::list<char*>::iterator itor = instance().supported_types.begin();
+        itor != instance().supported_types.end();
+        ++itor)
+        if(!strcmp(*itor,type))
+            return true;
+
+    return false;
+}
+
+