/// <summary> /// Constructor for the vehicle service. This service relies on have GPS, Internet and SNTP to sync time correctly. If the SNTP is not /// available then the device time is used. /// </summary> /// <param name="locationService"></param> /// <param name="dataAnalyticsService"></param> /// <param name="sNTPService"></param> /// <param name="networkService"></param> /// <param name="timerService"></param> /// <param name="GLOSAWebService"></param> /// <param name="GLOSAWiFiService"></param> public VehicleService(IMvxMessenger messenger, IMvxLocationWatcher watcher, ILocationService locationService, IDataAnalyticsService dataAnalyticsService, ISNTPService sNTPService, INetworkService networkService, ITimerService timerService, IGLOSAWebService GLOSAWebService, IGLOSAWiFiService GLOSAWiFiService) { _GLOSAAnalyticsService = dataAnalyticsService; _sntpService = sNTPService; _networkService = networkService; _timerService = timerService; _GLOSAWebService = GLOSAWebService; _navigationService = new NavigationService(messenger, watcher, locationService); _GLOSAWiFiService = GLOSAWiFiService; _locationService = locationService; }
public GLOSAWebService(IDataAnalyticsService dataAnalyticsService) { _dataAnalyticsService = dataAnalyticsService; MAPDataLastSyncTime = new DateTime(1970, 1, 1); SPATRequestSyncTimes = new Dictionary <string, DateTime>(); MAPDataStore = new Dictionary <string, MapData>(); SPATDataStore = new Dictionary <string, SPAT>(); MAPRequestErrors = new Dictionary <string, int>(); SPATRequestErrors = new Dictionary <string, int>(); _httpClient = new HttpClient(new TraceHandler()); }
public static void LogMonitoring(IDataAnalyticsService dataService, GLOSAMonitoringLog monitoringLog) { Task.Run(() => dataService.SaveMonitoringLogAsync(monitoringLog)); }
public static void LogEvent(IDataAnalyticsService dataService, GLOSAEventLog eventLog) { Task.Run(() => dataService.SaveEventLogAsync(eventLog)); }