add the version number amd new format of time.

This commit is contained in:
atef 2025-06-12 14:25:35 +02:00
parent e5d4b82a89
commit 7b4799429d
1 changed files with 7 additions and 6 deletions

View File

@ -1,4 +1,4 @@
#undef Amax #define Amax
#undef GridLimit #undef GridLimit
using System.Diagnostics; using System.Diagnostics;
@ -65,6 +65,7 @@ internal static class Program
// //
private const String _swVersionNumber =" V1.33.120625";
private static Boolean _curtailFlag = false; private static Boolean _curtailFlag = false;
private const String VpnServerIp = "10.2.0.11"; private const String VpnServerIp = "10.2.0.11";
private static Boolean _subscribedToQueue = false; private static Boolean _subscribedToQueue = false;
@ -171,7 +172,7 @@ internal static class Program
var battery = batteryDevices.Read(); var battery = batteryDevices.Read();
var pvOnAcGrid = pvOnAcGridDevice.Read(); var pvOnAcGrid = pvOnAcGridDevice.Read();
var pvOnAcIsland = pvOnAcIslandDevice.Read(); var pvOnAcIsland = pvOnAcIslandDevice.Read();
var doepek = doepkeDevice.Read(); var doepek = doepkeDevice.Read();
var gridBusToIslandBus = Topology.CalculateGridBusToIslandBusPower(pvOnAcIsland, loadOnAcIsland, acDc); var gridBusToIslandBus = Topology.CalculateGridBusToIslandBusPower(pvOnAcIsland, loadOnAcIsland, acDc);
@ -243,7 +244,7 @@ internal static class Program
StatusRecord RunIteration() StatusRecord RunIteration()
{ {
Watchdog.NotifyAlive(); Watchdog.NotifyAlive();
var record = ReadStatus(); var record = ReadStatus();
SendSalimaxStateAlarm(GetSalimaxStateAlarm(record), record); // to improve SendSalimaxStateAlarm(GetSalimaxStateAlarm(record), record); // to improve
@ -253,9 +254,8 @@ internal static class Program
record.AcDc.SystemControl.ApplyAcDcDefaultSettings(); record.AcDc.SystemControl.ApplyAcDcDefaultSettings();
record.DcDc.SystemControl.ApplyDcDcDefaultSettings(); record.DcDc.SystemControl.ApplyDcDcDefaultSettings();
Console.WriteLine(" Fails Counter = " + _failsCounter);
// Retries Control // Retries Control
//Console.WriteLine(" Fails Counter = " + _failsCounter);
/* if (record.StateMachine.State is not (28 or 23) ) /* if (record.StateMachine.State is not (28 or 23) )
{ {
// add a case 1 > RCD fail // add a case 1 > RCD fail
@ -285,7 +285,8 @@ internal static class Program
WriteControl(record); WriteControl(record);
$"{DateTime.Now.Round(UpdateInterval).ToUnixTime()} : {record.StateMachine.State}: {record.StateMachine.Message}".WriteLine(); $"{record.StateMachine.State}: {record.StateMachine.Message}".WriteLine();
$"{DateTime.Now.Round(UpdateInterval).ToUnixTime()} : {DateTime.Now.Round(UpdateInterval):dd/MM/yyyy} : {_swVersionNumber}".WriteLine();
record.CreateTopologyTextBlock().WriteLine(); record.CreateTopologyTextBlock().WriteLine();