refactor: rearrange and add solution for 4-series

This commit is contained in:
Andrew Welker
2023-02-07 15:45:01 -07:00
parent 7a9f76ee12
commit 0d515e5f0a
649 changed files with 45907 additions and 105752 deletions

View File

@@ -0,0 +1,57 @@
using System;
using PepperDash.Core;
namespace PepperDash.Essentials.Core
{
public interface IStatusMonitor
{
IKeyed Parent { get; }
event EventHandler<MonitorStatusChangeEventArgs> StatusChange;
MonitorStatus Status { get; }
string Message { get; }
BoolFeedback IsOnlineFeedback { get; set; }
void Start();
void Stop();
}
/// <summary>
/// Represents a class that has a basic communication monitoring
/// </summary>
public interface ICommunicationMonitor
{
StatusMonitorBase CommunicationMonitor { get; }
}
/// <summary>
/// StatusUnknown = 0, IsOk = 1, InWarning = 2, InError = 3
/// </summary>
public enum MonitorStatus
{
StatusUnknown = 0,
IsOk = 1,
InWarning = 2,
InError = 3
}
public class MonitorStatusChangeEventArgs : EventArgs
{
public MonitorStatus Status { get; private set; }
public string Message { get; private set; }
public MonitorStatusChangeEventArgs(MonitorStatus status)
{
Status = status;
Message = status == MonitorStatus.IsOk ? "" : status.ToString();
}
public MonitorStatusChangeEventArgs(MonitorStatus status, string message)
{
Status = status;
Message = message;
}
}
}