Moving Java drivers; Creating iotruntime socket connections for C++; First version...
[iot2.git] / benchmarks / drivers / Cpp / LifxLightBulb / LifxLightBulb.cpp
diff --git a/benchmarks/drivers/Cpp/LifxLightBulb/LifxLightBulb.cpp b/benchmarks/drivers/Cpp/LifxLightBulb/LifxLightBulb.cpp
new file mode 100644 (file)
index 0000000..21b209c
--- /dev/null
@@ -0,0 +1,25 @@
+#include <iostream>
+#include <string>
+#include "LifxLightBulb.hpp"
+#include "IoTSet.hpp"
+#include "IoTDeviceAddress.hpp"
+
+using namespace std;
+
+int main(int argc, char *argv[])
+{
+       string macAddress = "D073D5128E300000";
+       string devIPAddress = "192.168.2.126";
+       IoTDeviceAddress devAddress(devIPAddress, 12345, 56700, false, false);
+       unordered_set<IoTDeviceAddress> myset = { devAddress };
+
+       IoTSet<IoTDeviceAddress> setDevAddress(myset);
+       LifxLightBulb *llb = new LifxLightBulb(setDevAddress, macAddress);
+       llb->init();
+
+       cout << "Generated LifxLightBulb object!" << endl;
+
+       delete llb;
+
+       return 0;
+}