using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Bridges { public class SystemMonitorJoinMap : JoinMapBase { /// /// Offset to indicate where the range of iterated program joins will start /// public uint ProgramStartJoin { get; set; } /// /// Offset between each program join set /// public uint ProgramOffsetJoin { get; set; } #region Digitals /// /// Range Sets and reports whether the corresponding program slot is started /// public uint ProgramStart { get; set; } /// /// Range Sets and reports whether the corresponding program slot is stopped /// public uint ProgramStop { get; set; } /// /// Range Sets and reports whether the corresponding program is registered /// public uint ProgramRegister { get; set; } /// /// Range Sets and reports whether the corresponding program is unregistered /// public uint ProgramUnregister { get; set; } #endregion #region Analogs /// /// Sets and reports the time zone /// public uint TimeZone { get; set; } #endregion #region Serials /// /// Reports the time zone name /// public uint TimeZoneName { get; set; } /// /// Reports the IO Controller Version /// public uint IOControllerVersion { get; set; } /// /// Reports the SNMP App Version /// public uint SnmpAppVersion { get; set; } /// /// Reports the BACnet App Version /// public uint BACnetAppVersion { get; set; } /// /// Reports the firmware version /// public uint ControllerVersion { get; set; } /// /// Reports the name of the corresponding program /// public uint ProgramName { get; set; } /// /// Reports the compile time of the corresponding program /// public uint ProgramCompiledTime { get; set; } /// /// Reports the Crestron Database version of the corresponding program /// public uint ProgramCrestronDatabaseVersion { get; set; } /// /// Reports the Environment Version of the corresponding program /// public uint ProgramEnvironmentVersion { get; set; } /// /// Serialized JSON output that aggregates the program info of the corresponding program /// public uint AggregatedProgramInfo { get; set; } #endregion public SystemMonitorJoinMap() { TimeZone = 1; TimeZoneName = 1; IOControllerVersion = 2; SnmpAppVersion = 3; BACnetAppVersion = 4; ControllerVersion = 5; ProgramStartJoin = 10; ProgramOffsetJoin = 5; // Offset in groups of 5 joins ProgramStart = 1; ProgramStop = 2; ProgramRegister = 3; ProgramUnregister = 4; ProgramName = 1; ProgramCompiledTime = 2; ProgramCrestronDatabaseVersion = 3; ProgramEnvironmentVersion = 4; AggregatedProgramInfo = 5; } public override void OffsetJoinNumbers(uint joinStart) { var joinOffset = joinStart - 1; TimeZone = TimeZone + joinOffset; TimeZoneName = TimeZoneName + joinOffset; IOControllerVersion = IOControllerVersion + joinOffset; SnmpAppVersion = SnmpAppVersion + joinOffset; BACnetAppVersion = BACnetAppVersion + joinOffset; ControllerVersion = ControllerVersion + joinOffset; // Sets the initial join value where the iterated program joins will begin ProgramStartJoin = ProgramStartJoin + joinOffset; } } }