Exemplo n.º 1
0
 /// <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;
 }
Exemplo n.º 2
0
        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());
        }
Exemplo n.º 3
0
 public static void LogMonitoring(IDataAnalyticsService dataService, GLOSAMonitoringLog monitoringLog)
 {
     Task.Run(() => dataService.SaveMonitoringLogAsync(monitoringLog));
 }
Exemplo n.º 4
0
 public static void LogEvent(IDataAnalyticsService dataService, GLOSAEventLog eventLog)
 {
     Task.Run(() => dataService.SaveEventLogAsync(eventLog));
 }