| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #include <INIReader.h>
- #include <Timer.h>
- #include <unistd.h>
- #include <algorithm>
- #include <chrono>
- #include <deque>
- #include <iostream>
- #include <memory>
- #include <string>
- void print()
- {
- std::cout << "Print" << std::endl;
- }
- void TestINIReader()
- {
- INIReader reader("PresenceDetection.ini");
- std::string target = reader.Get("PresenceDetection", "Target", "");
- if (!target.empty())
- std::cout << "Error" << std::endl;
- std::cout << target.size() << " " << target << std::endl;
- bool unifi = reader.GetBoolean("PresenceDetection", "UniFi", false);
- if (unifi)
- std::cout << "UniFi On" << std::endl;
- else
- std::cout << "UniFi Off" << std::endl;
- bool test = reader.GetBoolean("PresenceDetection", "Test", false);
- if (test)
- std::cout << "Test On" << std::endl;
- else
- std::cout << "Test Off" << std::endl;
- }
- int main(int /*argc*/, char** /*argv[]*/)
- {
- TestINIReader();
- return 0;
- }
|