45 lines
924 B
C++
45 lines
924 B
C++
#include "Util/INIh.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()
|
|
{
|
|
PresenceDetection::Util::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;
|
|
}
|