Lora-Map/mqtt-map/Program.cs

29 lines
1.0 KiB
C#
Raw Normal View History

2018-08-12 01:10:30 +02:00
using System;
using System.Collections.Generic;
using BlubbFish.Utils;
using BlubbFish.Utils.IoT.Connector;
namespace Fraunhofer.Fit.IoT.LoraMap {
2018-08-12 01:10:30 +02:00
class Program {
static void Main(String[] args) {
2019-03-07 14:58:41 +01:00
InIReader.SetSearchPath(new List<String>() { "/etc/loramap", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\loramap" });
2018-08-12 19:02:49 +02:00
if (!InIReader.ConfigExist("settings")) {
2019-03-07 14:58:41 +01:00
Helper.WriteError("settings.ini not found!");
2018-08-12 01:10:30 +02:00
Console.ReadLine();
return;
}
2018-12-30 20:50:20 +01:00
if(!InIReader.ConfigExist("requests")) {
2019-03-07 14:58:41 +01:00
Helper.WriteError("requests.ini not found!");
2018-12-30 20:50:20 +01:00
Console.ReadLine();
return;
}
2018-08-12 01:10:30 +02:00
InIReader ini = InIReader.GetInstance("settings");
ADataBackend b = (ADataBackend)ABackend.GetInstance(ini.GetSection("mqtt"), ABackend.BackendType.Data);
2019-01-29 18:09:45 +01:00
new Googlelocation(b, ini.GetSection("webserver"), InIReader.GetInstance("requests"));
2018-08-12 01:10:30 +02:00
while(true) {
System.Threading.Thread.Sleep(1000);
}
}
}
}