1ca3e53932a0f76db58eba8dce34e7927dbbb6e4
[iot2.git] / benchmarks / Cpp / Lifxtest / RoomSmart_Stub.cpp
1 #include <iostream>
2 #include <thread>
3 #include "RoomSmart_Stub.hpp"
4
5 // External create, destroy, and init functions
6 extern "C" void* createRoomSmart_Stub(void** params) {
7         // Arguments: int _port, const char* _skeletonAddress, string _callbackAddress, int _rev, bool* _bResult, vector<int> _ports
8         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]));
9 }
10
11
12 extern "C" void destroyRoomSmart_Stub(void* t) {
13         RoomSmart_Stub* rss = (RoomSmart_Stub*) t;
14         delete rss;
15 }
16
17
18 extern "C" void initRoomSmart_Stub(void* t) {
19         // TODO: We actually need init() in LabRoom class
20         // But, this is declared here just for the sake of consistency for Sentinel
21         // In this case, we need the symbol "init" when loading object handlers with .so files
22         //RoomSmart_Stub* rss = (RoomSmart_Stub*) t;
23         //rss->init();
24 }