new system log for salimax alarms added
This commit is contained in:
parent
62f5630ab1
commit
f77a86c4fc
|
@ -26,7 +26,7 @@ public record StatusRecord
|
|||
public required RelaysRecord? Relays { get; init; }
|
||||
public required AmptStatus? PvOnDc { get; init; }
|
||||
public required Config Config { get; set; }
|
||||
public required SystemLog Log { get; set; } // TODO: init only
|
||||
public required SystemLog Log { get; init; } // TODO: init only
|
||||
|
||||
public required EssControl EssControl { get; set; } // TODO: init only
|
||||
public required StateMachine StateMachine { get; init; }
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
using InnovEnergy.App.SaliMax.DataTypes;
|
||||
|
||||
namespace InnovEnergy.App.SaliMax.Ess;
|
||||
|
||||
public record SystemLog
|
||||
{
|
||||
public required String? Message { get; init; }
|
||||
public required SalimaxAlarmState SalimaxAlarmState { get; init; }
|
||||
|
||||
public required String? Message { get; init; }
|
||||
public required SalimaxAlarmState SalimaxAlarmState { get; init; }
|
||||
public required List<AlarmOrWarning>? SalimaxAlarms { get; set; }
|
||||
public required List<AlarmOrWarning>? SalimaxWarnings { get; set; }
|
||||
}
|
|
@ -175,7 +175,7 @@ internal static class Program
|
|||
|
||||
StateMachine = StateMachine.Default,
|
||||
EssControl = EssControl.Default,
|
||||
Log = new SystemLog { SalimaxAlarmState = SalimaxAlarmState.Green, Message = null }, //TODO: Put real stuff
|
||||
Log = new SystemLog { SalimaxAlarmState = SalimaxAlarmState.Green, Message = null, SalimaxAlarms = null, SalimaxWarnings = null}, //TODO: Put real stuff
|
||||
Config = config // load from disk every iteration, so config can be changed while running
|
||||
};
|
||||
}
|
||||
|
@ -463,6 +463,9 @@ internal static class Program
|
|||
: salimaxAlarmsState; // this will be replaced by LedState
|
||||
|
||||
int.TryParse(s3Bucket?.Split("-")[0], out var installationId);
|
||||
|
||||
record.Log.SalimaxAlarms = alarmList;
|
||||
record.Log.SalimaxWarnings = warningList;
|
||||
|
||||
var returnedStatus = new StatusMessage
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue