mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
Updates to SystemMonitorBridge
This commit is contained in:
@@ -3,10 +3,102 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
|
using Crestron.SimplSharpPro.Diagnostics;
|
||||||
|
|
||||||
|
using PepperDash.Core;
|
||||||
|
using PepperDash.Essentials.Core;
|
||||||
|
using PepperDash.Essentials.Core.Monitoring;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Bridges
|
namespace PepperDash.Essentials.Bridges
|
||||||
{
|
{
|
||||||
public class SystemMonitorBridge
|
public static class SystemMonitorBridge
|
||||||
{
|
{
|
||||||
|
public static void LinkToApi(this SystemMonitorController systemMonitorController, BasicTriList trilist, uint joinStart, string joinMapKey)
|
||||||
|
{
|
||||||
|
var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as SystemMonitorJoinMap;
|
||||||
|
|
||||||
|
if (joinMap == null)
|
||||||
|
joinMap = new SystemMonitorJoinMap();
|
||||||
|
|
||||||
|
joinMap.OffsetJoinNumbers(joinStart);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
foreach (var p in SystemMonitor.ProgramCollection)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SystemMonitorJoinMap : JoinMapBase
|
||||||
|
{
|
||||||
|
//Digital
|
||||||
|
public uint ProgramStart { get; set; }
|
||||||
|
public uint ProgramStop { get; set; }
|
||||||
|
public uint ProgramRegister { get; set; }
|
||||||
|
public uint ProgramUnregister { get; set; }
|
||||||
|
|
||||||
|
//Analog
|
||||||
|
public uint TimeZone { get; set; }
|
||||||
|
|
||||||
|
//Serial
|
||||||
|
public uint TimeZoneName { get; set; }
|
||||||
|
public uint IOControllerVersion { get; set; }
|
||||||
|
public uint SNMPAppVersion { get; set; }
|
||||||
|
public uint BACnetAppVersion { get; set; }
|
||||||
|
public uint ControllerVersion { get; set; }
|
||||||
|
|
||||||
|
public uint ProgramName { get; set; }
|
||||||
|
public uint ProgramCompiledTime { get; set; }
|
||||||
|
public uint ProgramCrestronDatabaseVersion { get; set; }
|
||||||
|
public uint ProgramEnvironmentVersion { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public SystemMonitorJoinMap()
|
||||||
|
{
|
||||||
|
TimeZone = 1;
|
||||||
|
|
||||||
|
TimeZoneName = 1;
|
||||||
|
IOControllerVersion = 2;
|
||||||
|
SNMPAppVersion = 3;
|
||||||
|
BACnetAppVersion = 4;
|
||||||
|
ControllerVersion = 5;
|
||||||
|
|
||||||
|
ProgramStart = 11;
|
||||||
|
ProgramStop = 12;
|
||||||
|
ProgramRegister = 13;
|
||||||
|
ProgramUnregister = 14;
|
||||||
|
|
||||||
|
ProgramName = 11;
|
||||||
|
ProgramCompiledTime = 12;
|
||||||
|
ProgramCrestronDatabaseVersion = 13;
|
||||||
|
ProgramEnvironmentVersion = 14;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OffsetJoinNumbers(uint joinStart)
|
||||||
|
{
|
||||||
|
var joinOffset = joinStart - 1;
|
||||||
|
|
||||||
|
TimeZone = TimeZone;
|
||||||
|
|
||||||
|
TimeZoneName = TimeZoneName + joinOffset;
|
||||||
|
IOControllerVersion = IOControllerVersion + joinOffset;
|
||||||
|
SNMPAppVersion = SNMPAppVersion + joinOffset;
|
||||||
|
BACnetAppVersion = BACnetAppVersion + joinOffset;
|
||||||
|
ControllerVersion = ControllerVersion + joinOffset;
|
||||||
|
|
||||||
|
ProgramStart = ProgramStart + joinOffset;
|
||||||
|
ProgramStop = ProgramStop + joinOffset;
|
||||||
|
ProgramRegister = ProgramRegister + joinOffset;
|
||||||
|
ProgramUnregister = ProgramUnregister;
|
||||||
|
|
||||||
|
ProgramName = ProgramName + joinOffset;
|
||||||
|
ProgramCompiledTime = ProgramCompiledTime + joinOffset;
|
||||||
|
ProgramCrestronDatabaseVersion = ProgramCrestronDatabaseVersion + joinOffset;
|
||||||
|
ProgramEnvironmentVersion = ProgramEnvironmentVersion + joinOffset;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -119,6 +119,7 @@
|
|||||||
<Compile Include="Bridges\DmRmcControllerBridge.cs" />
|
<Compile Include="Bridges\DmRmcControllerBridge.cs" />
|
||||||
<Compile Include="Bridges\IDigitalInputBridge.cs" />
|
<Compile Include="Bridges\IDigitalInputBridge.cs" />
|
||||||
<Compile Include="Bridges\JoinMapBase.cs" />
|
<Compile Include="Bridges\JoinMapBase.cs" />
|
||||||
|
<Compile Include="Bridges\SystemMonitorBridge.cs" />
|
||||||
<Compile Include="Configuration ORIGINAL\Builders\TPConfig.cs" />
|
<Compile Include="Configuration ORIGINAL\Builders\TPConfig.cs" />
|
||||||
<Compile Include="Configuration ORIGINAL\Configuration.cs" />
|
<Compile Include="Configuration ORIGINAL\Configuration.cs" />
|
||||||
<Compile Include="Configuration ORIGINAL\ConfigurationHelpers.cs" />
|
<Compile Include="Configuration ORIGINAL\ConfigurationHelpers.cs" />
|
||||||
|
|||||||
Submodule essentials-framework updated: 792f4e72d1...e180e52249
Reference in New Issue
Block a user