2 #include "LightBulb_Skeleton.hpp"
4 #include <unordered_set>
6 #include "LifxLightBulb.cpp"
7 #include "IoTDeviceAddress.hpp"
9 // External create, destroy, and init functions
10 extern "C" void* createLightBulb_Skeleton(void** params) {
11 // Arguments: LightBulb *_mainObj, string _callbackAddress, int _port
12 return new LightBulb_Skeleton((LightBulb*) params[0], *((string*) params[1]), *((int*) params[2]));
16 extern "C" void destroyLightBulb_Skeleton(void* t) {
17 LightBulb_Skeleton* lbs = (LightBulb_Skeleton*) t;
22 extern "C" void initLightBulb_Skeleton(void* t) {
23 LightBulb_Skeleton* lbs = (LightBulb_Skeleton*) t;
28 int main(int argc, char *argv[])
31 string macAddress1 = "D073D5128E300000";
32 string devIPAddress1 = "192.168.2.126";
33 //string macAddress1 = "D073D50241DA0000";
34 //string devIPAddress1 = "192.168.2.232";
35 IoTDeviceAddress* devAddress1 = new IoTDeviceAddress(devIPAddress1, 43583, 56700, false, false);
36 unordered_set<void*>* myset1 = new unordered_set<void*>();
37 myset1->insert(devAddress1);
38 IoTSet<void*>* setDevAddress1 = new IoTSet<void*>(myset1);
39 LifxLightBulb *llb1 = new LifxLightBulb(setDevAddress1, macAddress1);
40 //cout << "Generated LifxLightBulb object!" << endl;
42 string callbackAddress = "localhost";
44 LightBulb_Skeleton *lbs = new LightBulb_Skeleton(llb1, callbackAddress, stubPort);
45 cout << "Successfully instantiated object and its skeleton!" << endl;