public void TestCreateBatteryAlarmLow() { //GIVEN Telemetry telemetry = new Telemetry { Id = "1", DeviceId = "1", OccuredAt = DateTime.UtcNow, BatteryVoltage = 1.6, Pressure = 98500, Humidity = 40, Temperature = 20 }; Mock <IDeviceRepository> deviceRepo = new Mock <IDeviceRepository>(); Mock <IAlarmRepository> alarmRepo = new Mock <IAlarmRepository>(); //WHEN AlarmService service = new AlarmService(deviceRepo.Object, alarmRepo.Object); service.CreateBatteryAlarm(telemetry, "site1"); //THEN deviceRepo.Verify(o => o.AddAlarm("1", It.Is <Alarm>(e => e.AlarmGravity == Alarm.Gravity.Information && e.AlarmType == Alarm.Type.DeviceFailure && e.ShortDescription.ToLower().Contains("batterie") && e.Description.ToLower().Contains("50%"))), Times.Once); }
public void TestcreateFreezeAlarm44_sansFreeze_BD() { //GIVEN string deviceId = "1"; string siteId = "1"; DateTime dateRef = new DateTime(2018, 02, 14, 6, 0, 0); Mock <IDeviceRepository> deviceRepo = new Mock <IDeviceRepository>(); Mock <IFreezeRepository> freezeRepo = new Mock <IFreezeRepository>(); Dictionary <DateTime, FreezingProbability> dico = new Dictionary <DateTime, FreezingProbability>(); deviceRepo.Setup(o => o.GetCrossAlarmsByDevice("1", new DateTime(2018, 02, 14, 6, 0, 0), new DateTime(2018, 02, 14, 18, 0, 0))).Returns(new List <Alarm>() { new Alarm { Id = "6", Start = new DateTime(2018, 02, 10, 6, 0, 0), End = new DateTime(2018, 02, 14, 7, 0, 0) } }); // 44 dico.Add(dateRef, FreezingProbability.IMMINENT); dico.Add(dateRef.AddHours(12), FreezingProbability.IMMINENT); //WHEN AlarmService alarmService = new AlarmService(deviceRepo.Object, freezeRepo.Object); alarmService.CreateFreezeAlarm(deviceId, siteId, dico); //THEN deviceRepo.Verify(o => o.UpdateAlarm("1", "6", It.IsAny <DateTime>(), new DateTime(2018, 02, 14, 18, 0, 0)), Times.Once); }
public DevicesController(DeviceService deviceService, TelemetryService telemetryService, AlarmService alarmService, FreezeService freezeService) { this.deviceService = deviceService; this.telemetryService = telemetryService; this.alarmService = alarmService; this.freezeService = freezeService; }
public void CreateTemperatureAlarmmoins9950() { //GIVEN Telemetry telemetry = new Telemetry { Id = "2", DeviceId = "2", OccuredAt = DateTime.UtcNow, BatteryVoltage = 0.9, Pressure = 99800, Humidity = 42, Temperature = -88 }; Mock <IDeviceRepository> deviceRepo = new Mock <IDeviceRepository>(); Mock <IAlarmRepository> alarmRepo = new Mock <IAlarmRepository>(); //WHEN AlarmService service = new AlarmService(deviceRepo.Object, alarmRepo.Object); service.CreateTemperatureAlarm(telemetry, "site1"); //THEN deviceRepo.Verify(o => o.AddAlarm("2", It.Is <Alarm>(e => e.AlarmGravity == Alarm.Gravity.Information && e.AlarmType == Alarm.Type.DeviceFailure && e.ShortDescription.ToLower().Contains("température") && e.Description.ToLower().Contains("-50"))), Times.Once); }
public void CreateFreezingAlarmTest() { //GIVEN Telemetry telemetry = new Telemetry { Id = "2", DeviceId = "2", OccuredAt = DateTime.UtcNow, BatteryVoltage = 0.9, Pressure = 99800, Humidity = 42, Temperature = 0 }; DateTime dateStart = DateTime.UtcNow; DateTime dateEnd = new DateTime(); Mock <IDeviceRepository> deviceRepo = new Mock <IDeviceRepository>(); Mock <IAlarmRepository> alarmRepo = new Mock <IAlarmRepository>(); //WHEN AlarmService service = new AlarmService(deviceRepo.Object, alarmRepo.Object); service.CreateFreezingAlarm(telemetry, "site1", FreezeForecast.FreezingProbability.IMMINENT); deviceRepo.Verify(o => o.AddAlarm("2", It.Is <Alarm>(e => e.AlarmGravity == Alarm.Gravity.Critical && e.AlarmType == Alarm.Type.FreezeWarning && e.ShortDescription.ToLower().Contains("gel") && e.Description.ToLower().Contains("gel"))), Times.Once); }
/// <summary> /// Handles the Load event of the AlarmForm control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> private void AlarmForm_Load(object sender, EventArgs e) { _alarmService = new AlarmService(); _alarmService.OnErrorOccours += _alarmService_OnErrorOccours; _alarmService.StartPlaySound(); }
public JsonResult Get(AlarmData alarmData) { IAlarm alarmService; var alarmData2 = alarmData; if (alarmData2.AlarmId == Guid.Parse("aafea53a-3705-42ea-885a-e9bdf308ae31")) { alarmService = Mocks.For.AlarmSerice; alarmData2 = new AlarmData { AlarmId = Guid.NewGuid(), ArrivalTime = new DateTime(2018, 6, 8, 9, 30, 0), FromLat = 51.525246, FromLong = 0.084672, ToLat = 51.559098, ToLong = 0.074503 }; } else { alarmService = new AlarmService(new CityMapperClient()); } var alarmRequest = alarmService.CreateAlarm(alarmData2); return(new JsonResult(alarmRequest)); }
public string GetAlarmData() { DataTable table = AlarmService.GetRealtimeAlarmData(); string json = EasyUIJsonParser.DataGridJsonParser.DataTableToJson(table); return(json); }
public void Setup() { this.repository = Substitute.For <InMemoryAlarmRepository>(); this.timer = Substitute.For <ITimer>(); this.service = new AlarmService(this.repository, timer); this.service.Start(); }
public void RunAddAlarmTest() { //initialize Mock <IDeviceRepository> deviceRepoMock = new Mock <IDeviceRepository>(); Mock <ITelemetryRepository> telemetryRepoMock = new Mock <ITelemetryRepository>(); Mock <IFreezeRepository> freezeReop = new Mock <IFreezeRepository>(); int minMin = 1 * 60 + 5; int minMax = 2 * 60 + 5; deviceRepoMock.Setup(o => o.GetFailsCommunicationBetween(minMin, minMax)).Returns(deviceList); DeviceService deviceService = new DeviceService(deviceRepoMock.Object, telemetryRepoMock.Object); AlarmService alarmService = new AlarmService(deviceRepoMock.Object, freezeReop.Object); NotificationService notificationService = new NotificationService(deviceRepoMock.Object); Mock <ILogger> logger = new Mock <ILogger>(); CommunicationStateService communicationStateService = new CommunicationStateService(deviceService, alarmService, notificationService, logger.Object); //execute communicationStateService.Run(1, 2, Alarm.Gravity.Information); //tests // TODO : check tests (error) deviceRepoMock.Verify(o => o.UpdateStatusAlarm("1", It.IsAny <Alarm>()), Times.Never); deviceRepoMock.Verify(o => o.AddAlarm("1", It.IsAny <Alarm>()), Times.Once); }
public void TestcreateFreezeAlarm022_sansFreeze() { //GIVEN string deviceId = "1"; string siteId = "1"; DateTime dateRef = new DateTime(2018, 02, 14, 6, 0, 0); Mock <IDeviceRepository> deviceRepo = new Mock <IDeviceRepository>(); Mock <IFreezeRepository> freezeRepo = new Mock <IFreezeRepository>(); Dictionary <DateTime, FreezingProbability> dico = new Dictionary <DateTime, FreezingProbability>(); // 022 dico.Add(dateRef, FreezingProbability.ZERO); dico.Add(dateRef.AddHours(12), FreezingProbability.MEDIUM); dico.Add(dateRef.AddHours(24), FreezingProbability.MEDIUM); //WHEN AlarmService alarmService = new AlarmService(deviceRepo.Object, freezeRepo.Object); alarmService.CreateFreezeAlarm(deviceId, siteId, dico); //THEN deviceRepo.Verify(o => o.AddAlarm("1", It.Is <Alarm>(e => e.AlarmGravity == Alarm.Gravity.Critical && e.AlarmType == Alarm.Type.FreezeWarning && e.Description.Contains("14/02/2018") && e.Description.Contains("15/02/2018") && e.Description.Contains("gel") && e.Description.Contains("1") && e.ShortDescription.Contains("Gel") && e.ShortDescription.Contains("14/02/2018") && e.ShortDescription.Contains("15/02/2018") && e.Start == new DateTime(2018, 02, 14, 18, 0, 0) && e.End == new DateTime(2018, 02, 15, 06, 0, 0))), Times.Once); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, AlarmService alarmService) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Error"); // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } alarmService.Run(); //app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseRouting(); app.UseAuthentication(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); endpoints.MapBlazorHub(); endpoints.Map("Identity/Account/Register", Index); endpoints.MapFallbackToPage("/_Host"); }); }
public AlarmController() { _userLogService = new AspNetUsersLogService(); _userPassResetService = new AspNetUsersPasswordResetService(); _alarmService = new AlarmService(); _alarmTuneService = new AlarmTuneService(); _user_Alarm_Setting = new user_alarm_setting(); }
public PoolsController(PoolService poolService, TelemetryService telemetryService, AlarmService alarmService, UserManager <User> userManager, IMapper mapper) { this.poolService = poolService; this.telemetryService = telemetryService; this.alarmService = alarmService; this.userManager = userManager; this.mapper = mapper; }
public static async Task Run([TimerTrigger("0 0 18 * * *")] TimerInfo myTimer, TraceWriter log) { log.Info($"C# Timer trigger function executed at: {DateTime.Now}"); DependencyInjection.ConfigureInjection(log); using (var scope = DependencyInjection.Container.BeginLifetimeScope()) { FreezingAlgorithme algorithme = scope.Resolve <FreezingAlgorithme>(); DeviceService deviceService = scope.Resolve <DeviceService>(); NotificationService notificationService = scope.Resolve <NotificationService>(); FreezeService freezeService = scope.Resolve <FreezeService>(); AlarmService alarmService = scope.Resolve <AlarmService>(); OpenWeatherMapClient weatherClient = scope.Resolve <OpenWeatherMapClient>(); IList <Alarm> alarms = new List <Alarm>(); try { log.Info("Get latest telemtry"); Dictionary <Device, Telemetry> telemetries = deviceService.GetLatestTelemetryByDevice(); foreach (var item in telemetries) { OwmCurrentWeather current = await weatherClient.GetCurrentWeather(item.Key.Position.Latitude, item.Key.Position.Longitude); OwmForecastWeather forecast = await weatherClient.GetForecastWeather(item.Key.Position.Latitude, item.Key.Position.Longitude); log.Info($"Execute Algorithme (device {item.Key.Id})"); FreezeForecast freeze = await algorithme.Execute(item.Value, item.Key, current.Weather, forecast.Forecast, forecast.StationPosition); if (freeze == null) { log.Error($"Unable to calculate the freeze probability (no forecast)"); continue; } // TODO : complete process Dictionary <DateTime, FreezingProbability> averageFreezePrediction12h = freezeService.CalculAverageFreezePrediction12h(freeze.FreezingProbabilityList); log.Info($"Create alarms"); alarmService.CreateFreezeAlarm(item.Key.Id, item.Key.SiteId, averageFreezePrediction12h); log.Info($"Insert Freeze in Db"); freezeService.CreateFreezeAndThawByDevice(item.Key.Id, averageFreezePrediction12h); } notificationService.SendNotifications(alarms); log.Info($"Notifications sent at: {DateTime.Now}"); } catch (AlgorithmeException) { throw; } catch (Exception e) { log.Error(e.Message, e); throw; } } }
private async void GetAlarms() { try { var o_data = new ServiceResponseObject <ListAlarmResponse>(); using (var client = ClientHelper.GetClient(CrossSettings.Current.GetValueOrDefault("token", ""))) { AlarmService.InitializeClient(client); o_data = await AlarmService.GetAlarms(); if (o_data.Status == HttpStatusCode.OK) { Toast.MakeText(Activity, o_data.Message, ToastLength.Long).Show(); alarmlist = new List <AlarmBookModel>(); if (o_data.ResponseData.ALARMS_STATUS == null || o_data.ResponseData.ALARMS_STATUS.Count == 0) { StaticUser.NamePadeAbsenceSomething = "AlarmsActivity"; Android.App.FragmentTransaction transaction = this.FragmentManager.BeginTransaction(); NotFoundOrdersActivity content = new NotFoundOrdersActivity(); transaction.Replace(Resource.Id.frameDriverlayout, content); transaction.Commit(); } foreach (var alm in o_data.ResponseData.ALARMS_STATUS) { alarmlist.Add(new AlarmBookModel { Id = alm.id, Acknowledged = alm.acknowledged, Container_id = alm.container_id, Name = alm.name, Raised_At = alm.raised_at, IsDepot = (alm.depot == "1") ? true : false } ); } UpdateList(); lstAlarm.ItemClick += ListBoxes_ItemClick; } else { StaticUser.NamePadeAbsenceSomething = "AlarmsActivity"; Android.App.FragmentTransaction transaction = this.FragmentManager.BeginTransaction(); NotFoundOrdersActivity content = new NotFoundOrdersActivity(); transaction.Replace(Resource.Id.frameDriverlayout, content); transaction.Commit(); } } } catch (System.Exception ex) { Toast.MakeText(Activity, ex.Message, ToastLength.Long).Show(); } }
public static AlarmService CreateServiceWithoutCore() { var deviceStorage = new DeviceStorageAndroid(); var sqliteConnection = new SQLiteConnection(deviceStorage.GetFilePath("AlarmsSQLite.db3")); var itemDatabase = new ItemDatabaseGeneric(sqliteConnection); var alarmsRepo = new AlarmsRepository(itemDatabase); var service = new AlarmService(alarmsRepo); return(service); }
public App() { //SetCulture("en-US"); InitializeComponent(); DependencyService.Register <INavigation>(); DependencyService.Register <IAlarmsRepository>(); DependencyService.Register <IAlarmService>(); DependencyService.Register <IMessageBoxService>(); DependencyService.Register <ISpeechToText>(); DependencyService.Get <IAdMobInterstitial>().Start(); var navigationPage = new NavigationPage(new AlarmsPage()); navigationPage.On <iOS>().SetPrefersLargeTitles(true); MainPage = navigationPage; if (!isNotFirst) { var everdayBool = new bool[] { true, true, true, true, true, true, true }; var ListInitAlarm = new List <Alarm>() { new Alarm() { Name = "일어나서 이불개자", Days = new DaysOfWeek(everdayBool), Time = new TimeSpan(7, 0, 0), IsActive = false, Index = 0 }, new Alarm() { Name = "아침 운동 좋아", Days = new DaysOfWeek(everdayBool), Time = new TimeSpan(7, 30, 0), IsActive = false, Index = 1 }, new Alarm() { Name = "일단 침대에 눕자", Days = new DaysOfWeek(everdayBool), Time = new TimeSpan(23, 30, 0), IsActive = false, Index = 2 } }; foreach (var alarm in ListInitAlarm) { AlarmService.SaveAlarmAtLocal(alarm); } var welcomePage = AppIntro.CreateAppIntro(); welcomePage.Vibrate = false; MainPage.Navigation.PushModalAsync(welcomePage); Preferences.Set(nameof(isNotFirst), true); } Alarm.IsInitFinished = true; }
public HomeController() { this._alarmService = new AlarmService(); this._areaService = new AreaService(); this._stationService = new StationService(); this._deviceService = new DeviceService(); this._pointService = new PointService(); this._orderService = new OrderService(); this._valueService = new ValueService(); this._excelManager = new ExcelManager(); }
protected override void EstablishContext() { base.EstablishContext(); CommonCategory = new Mock <AlarmCategoryAbstract>(); CommonCategory.Setup(c => c.Id).Returns(0); AlarmService.Add(CommonCategory.Object); Category = new Mock <AlarmCategoryAbstract>(); Category.SetupProperty(c => c.HasActive); Category.SetupProperty(c => c.HasUnacknowledged); Category.Setup(c => c.Id).Returns(1); AlarmService.Add(Category.Object); }
public void TestRepoShouldNotBeCalledIfWatchIdIsNullOrEmpty(string watchId) { //Given var mockRepo = new Mock <IAlarmRepository>(); var service = new AlarmService(mockRepo.Object); //When mockRepo.Setup(mr => mr.ReadAllAlarmsWithSubs(It.IsAny <string>())).Returns(It.IsAny <List <AlarmWithSubscription> >()); //Then Assert.Throws <InvalidDataException>(() => service.GetAllAlarmsWithSubs(It.IsAny <string>())); mockRepo.Verify(mr => mr.ReadAllAlarmsWithSubs(It.IsAny <string>()), Times.Never); }
public AppClient() { this._userService = new UserService(); this._roleService = new RoleService(); this._alarmService = new AlarmService(); this._areaService = new AreaService(); this._stationService = new StationService(); this._deviceService = new DeviceService(); this._pointService = new PointService(); this._orderService = new OrderService(); this._valueService = new ValueService(); this._cacheManager = new CacheManager(); }
public void TestMethodShouldThrowExceptionIfAlarmWasNotFound() { //Given var mockRepo = new Mock <IAlarmRepository>(); var service = new AlarmService(mockRepo.Object); var alarmCode = 1; //When mockRepo.Setup(mr => mr.ReadAlarmByCode(It.IsAny <int>())).Returns(It.IsAny <AlarmSystem.Core.Entity.DB.Alarm>()); //Then Assert.Throws <EntityNotFoundException>(() => service.GetAlarmByCode(alarmCode)); mockRepo.Verify(mr => mr.ReadAlarmByCode(It.IsAny <int>()), Times.Once); }
public void TestGetAll() { //GIVEN Mock <IAlarmRepository> alarmRepo = new Mock <IAlarmRepository>(); AlarmService alarmService = new AlarmService(alarmRepo.Object); //WHEN alarmRepo.Setup(o => o.Count(It.IsAny <DeviceAlarmFilter>())).Returns(3).Verifiable(); alarmRepo.Setup(o => o.Get(It.IsAny <DeviceAlarmFilter>(), 5, 1)).Returns(new List <Alarm> { new Alarm { Id = "A45880", DeviceId = "", SiteId = "", IsActive = true, AlarmType = Alarm.Type.DeviceFailure, AlarmGravity = Alarm.Gravity.Information, OccuredAt = DateTime.UtcNow, ShortDescription = "humidité entre 30 et 39", Description = "L'humidité intérieur est anormale" }, new Alarm { Id = "A45881", DeviceId = "", SiteId = "", IsActive = true, AlarmType = Alarm.Type.DeviceFailure, AlarmGravity = Alarm.Gravity.Information, OccuredAt = DateTime.UtcNow, ShortDescription = "humidité entre 30 et 39", Description = "L'humidité intérieur est anormale" } }).Verifiable(); AlarmFilter alarmFilter = new AlarmFilter { AlarmType = Alarm.Type.DeviceFailure, Gravity = Alarm.Gravity.Critical }; var items = alarmService.GetAll(alarmFilter, rowsPerPage: 5, pageNumber: 1); Check.That(items.PageCount).IsEqualTo(1); Check.That(items.TotalItemsCount).IsEqualTo(3); Check.That(items.Items).HasSize(2); alarmRepo.VerifyAll(); }
public ParserImpl( IMemoryCache cache, HomeContext homeContext, AlarmService alarmService, ActiveMeasurePointService activeMeasurePointService, ILogger <Parser> logger) { _cache = cache; _db = homeContext; _alarmService = alarmService; _activeMeasurePointService = activeMeasurePointService; _logger = logger; _cache.TryGetValue(Strings.AlarmIds, out _alarmIds); }
public void TestcreateFreezeAlarm44_gel_gel_avecFreeze() { //GIVEN string deviceId = "1"; string siteId = "1"; DateTime dateRef = new DateTime(2018, 02, 14, 6, 0, 0); Mock <IDeviceRepository> deviceRepo = new Mock <IDeviceRepository>(); Mock <IFreezeRepository> freezeRepo = new Mock <IFreezeRepository>(); freezeRepo.Setup(o => o.GetLastFreezeByDevice("1")).Returns(new Freeze { Date = new DateTime(2018, 02, 14, 0, 0, 0), DeviceId = "1", TrustIndication = 4 }); deviceRepo.Setup(o => o.GetCrossAlarmsByDevice("1", new DateTime(2018, 02, 14, 6, 0, 0), new DateTime(2018, 02, 14, 18, 0, 0))).Returns(new List <Alarm>() { new Alarm() { Id = $"{"1"}-alarm{DateTime.UtcNow.ToString("yyyyMMddHHmmss")}", DeviceId = "1", SiteId = "1", IsActive = true, AlarmType = Alarm.Type.FreezeWarning, AlarmGravity = Alarm.Gravity.Critical, OccuredAt = DateTime.UtcNow, ShortDescription = "Gel", Description = "Gel", Start = new DateTime(2018, 02, 13, 6, 0, 0), End = new DateTime(2018, 02, 14, 6, 0, 0) } }); Dictionary <DateTime, FreezingProbability> dico = new Dictionary <DateTime, FreezingProbability>(); // 44 dico.Add(dateRef, FreezingProbability.IMMINENT); dico.Add(dateRef.AddHours(12), FreezingProbability.IMMINENT); //WHEN AlarmService alarmService = new AlarmService(deviceRepo.Object, freezeRepo.Object); alarmService.CreateFreezeAlarm(deviceId, siteId, dico); //THEN deviceRepo.Verify(o => o.UpdateAlarm("1", It.IsAny <string>(), It.IsAny <DateTime>(), new DateTime(2018, 02, 14, 18, 0, 0)), Times.Once); }
public void TestRepoShouldNotBeCalledIfAlarmIdIsNotValid(int alarmId) { //Given var mockRepo = new Mock <IAlarmRepository>(); var service = new AlarmService(mockRepo.Object); //When mockRepo.Setup(mr => mr.ReadAlarmById(It.IsAny <int>())).Returns(It.IsAny <AlarmSystem.Core.Entity.DB.Alarm>()); //Then Assert.Throws <InvalidDataException>(() => service.GetAlarmById(alarmId)); mockRepo.Verify(mr => mr.ReadAlarmById(It.IsAny <int>()), Times.Never); }
public void AlarmEventListen(AlarmService aAlarmService) { try { //lock (_eventLock) //{ _aAlarmService = aAlarmService;// _connection.SessionContext.AlarmService;//_connection.SessionContext.AlarmService; _aAlarmService.AlarmEventReceived += new EventHandler <AlarmEventArgs>(OnAlarmEventReceived); _aAlarmService.AlarmException += new EventHandler <Mirasys.Clients.Gateway.SDK.Events.ExceptionEventArgs>(OnAlarmException); //} } catch (Exception ex) { } }
public void TestRepoShouldThrowEntityNotFoundExceptionIfAlarmIsNull() { //Given var mockRepo = new Mock <IAlarmRepository>(); var service = new AlarmService(mockRepo.Object); var alarmId = 1; //When mockRepo.Setup(mr => mr.ReadAlarmById(It.IsAny <int>())).Returns(It.IsAny <AlarmSystem.Core.Entity.Dto.Alarm>()); //Then Assert.Throws <EntityNotFoundException>(() => service.GetAlarmById(alarmId)); }
public void MethodShouldCallGetMachinesWithSubsMethodFromRepoOnce() { //Given var mockRepo = new Mock <IAlarmRepository>(); var service = new AlarmService(mockRepo.Object); var watchId = "watch-id-1"; //When mockRepo.Setup(mr => mr.ReadAllAlarmsWithSubs(It.IsAny <string>())).Returns(It.IsAny <List <AlarmWithSubscription> >()); service.GetAllAlarmsWithSubs(watchId); //Then mockRepo.Verify(mr => mr.ReadAllAlarmsWithSubs(It.IsAny <string>()), Times.Once); }
public AlarmServiceBinder(AlarmService service) { alarmService = service; }