Monitor power supply data for fault conditions
This commit is contained in:
@@ -29,6 +29,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace ProgramLib
|
||||
{
|
||||
/// <summary>
|
||||
/// Class to spawn thread to update power supply data on GUI
|
||||
/// </summary>
|
||||
internal class PowerSupplyGuiUpdateThread : BasicThread
|
||||
{
|
||||
private enum Events
|
||||
@@ -47,6 +50,9 @@ namespace ProgramLib
|
||||
|
||||
private Dictionary<string, PowerModuleDataModel> _powerModuleToPowerDataModelDict = new Dictionary<string, PowerModuleDataModel>();
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public PowerSupplyGuiUpdateThread()
|
||||
{
|
||||
_logger = LogManager.GetCurrentClassLogger();
|
||||
@@ -67,6 +73,11 @@ namespace ProgramLib
|
||||
_logger?.Debug($"Entering {this.GetType().Name}::{System.Reflection.MethodBase.GetCurrentMethod().Name}() ...");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method that executes on the thread.
|
||||
/// </summary>
|
||||
/// <param name=""></param>
|
||||
/// <returns></returns>
|
||||
protected override void DoWork()
|
||||
{
|
||||
_logger?.Debug($"{this.GetType().Name}::{System.Reflection.MethodBase.GetCurrentMethod().Name}() is running...");
|
||||
@@ -101,6 +112,11 @@ namespace ProgramLib
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update GUI with data
|
||||
/// </summary>
|
||||
/// <param name=""></param>
|
||||
/// <returns></returns>
|
||||
private void UpdatePowerSupplyGui()
|
||||
{
|
||||
int pollRateMs = 1000;
|
||||
|
||||
Reference in New Issue
Block a user