Add ini Configuration File
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "VStarCam/Finder.h"
|
||||
#include <INIReader.h>
|
||||
#include <Logging.h>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
@@ -19,11 +20,19 @@ int main(int argc, char** argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
INIReader iniReader("VStarCamFinder.ini");
|
||||
if (iniReader.ParseError() != 0)
|
||||
{
|
||||
Logging::Log(Logging::Severity::Error, "Can't read VStarCamFinder.ini");
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::string ipAddress(argv[1]);
|
||||
std::string listenAddress = iniReader.Get("VStarCamFinder", "ListenAddress", "0.0.0.0");
|
||||
|
||||
int port = 0;
|
||||
|
||||
VStarCam::Finder finder("192.168.101.100");
|
||||
VStarCam::Finder finder(listenAddress);
|
||||
port = finder.GetPort(ipAddress);
|
||||
|
||||
if (port != 0)
|
||||
|
||||
Reference in New Issue
Block a user