Add static to Delete Daily data
This commit is contained in:
parent
17ff2210a7
commit
cd73ab0986
|
@ -49,7 +49,7 @@ public class AggregatedData
|
|||
}
|
||||
}
|
||||
|
||||
public void DeleteDailyData(String directory)
|
||||
public static void DeleteDailyData(String directory)
|
||||
{
|
||||
|
||||
var csvFiles = Directory.GetFiles(directory, "*.csv");
|
||||
|
|
|
@ -375,7 +375,46 @@ internal static class Program
|
|||
var i = 0;
|
||||
|
||||
foreach (var battery in record.Battery.Devices)
|
||||
{
|
||||
{
|
||||
if (battery.LimpBitMap == 0)
|
||||
{
|
||||
// "All String are Active".WriteLine();
|
||||
}
|
||||
else if (IsPowerOfTwo(battery.LimpBitMap))
|
||||
{
|
||||
"1 String is disabled".WriteLine();
|
||||
warningList.Add(new AlarmOrWarning
|
||||
{
|
||||
Date = DateTime.Now.ToString("yyyy-MM-dd"),
|
||||
Time = DateTime.Now.ToString("HH:mm:ss"),
|
||||
CreatedBy = "Battery node" + record.Config.Devices.BatteryNodes[i],
|
||||
Description = "1 String is disabled"
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
"2 or more string are disabled".WriteLine();
|
||||
|
||||
alarmList.Add(new AlarmOrWarning
|
||||
{
|
||||
Date = DateTime.Now.ToString("yyyy-MM-dd"),
|
||||
Time = DateTime.Now.ToString("HH:mm:ss"),
|
||||
CreatedBy = "Battery node" + record.Config.Devices.BatteryNodes[i],
|
||||
Description = "2 or more string are disabled"
|
||||
});
|
||||
}
|
||||
|
||||
foreach (var warning in record.Battery.Warnings)
|
||||
{
|
||||
warningList.Add(new AlarmOrWarning
|
||||
{
|
||||
Date = DateTime.Now.ToString("yyyy-MM-dd"),
|
||||
Time = DateTime.Now.ToString("HH:mm:ss"),
|
||||
CreatedBy = "Battery node" + record.Config.Devices.BatteryNodes[i],
|
||||
Description = warning
|
||||
});
|
||||
}
|
||||
|
||||
foreach (var alarm in battery.Alarms)
|
||||
{
|
||||
alarmList.Add(new AlarmOrWarning
|
||||
|
|
Loading…
Reference in New Issue