Adding class LabRoom for IoTRelation testing with C++ IoTSlave
[iot2.git] / benchmarks / Cpp / Lifxtest / RoomSmart_Stub.cpp
diff --git a/benchmarks/Cpp/Lifxtest/RoomSmart_Stub.cpp b/benchmarks/Cpp/Lifxtest/RoomSmart_Stub.cpp
new file mode 100644 (file)
index 0000000..7650e52
--- /dev/null
@@ -0,0 +1,17 @@
+#include <iostream>
+#include <thread>
+#include "RoomSmart_Stub.hpp"
+
+// External create, destroy, and init functions
+extern "C" void* createRoomSmart_Stub(void** params) {
+       // Arguments: int _port, const char* _skeletonAddress, string _callbackAddress, int _rev, bool* _bResult, vector<int> _ports
+       return new RoomSmart_Stub(*((int*) params[0]), ((string*) params[1])->c_str(), *((string*) params[2]), *((int*) params[3]), (bool*) params[4], *((vector<int>*) params[5]));
+}
+
+
+extern "C" void destroyRoomSmart_Stub(void* t) {
+       RoomSmart_Stub* rss = (RoomSmart_Stub*) t;
+       delete rss;
+}
+
+