public void GetNumActiveAlarmsFromSmartSUB(ISystemInterface systemInterface, ushort stationID) { SiteID siteID = new SiteID(stationID); DatabaseManagerStub databaseManager = new DatabaseManagerStub(systemInterface); databaseManager.GetActiveAlarms(siteID, (response, expected) => ExtractNumAlarms(response, expected, stationID, systemInterface)); }
public ref ObservableCollection <Alarms> GetActiveAlarmsFromSmartSUB(SystemInterface systemInterface, ushort stationID) { SiteID siteID = new SiteID(stationID); DatabaseManagerStub databaseManager = new DatabaseManagerStub(systemInterface); TimeSpan lookback; lookback = TimeSpan.FromDays(1); databaseManager.GetAlarmRecords(siteID, DateTime.UtcNow - lookback, DateTime.UtcNow, (response, expected) => ExtractActiveAlarms(response, expected, systemInterface)); return(ref allActiveAlarms); }