diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/AirMediaControllerJoinMap.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/AirMediaControllerJoinMap.cs
index 1c091233..c9a6c2b2 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/AirMediaControllerJoinMap.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/AirMediaControllerJoinMap.cs
@@ -1,110 +1,66 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Crestron.SimplSharp;
-using PepperDash.Essentials.Core;
-
-namespace PepperDash.Essentials.Core.Bridges
-{
- public class AirMediaControllerJoinMap : JoinMapBase
- {
- #region Digitals
- ///
- /// Indicates that the device is online when high
- ///
- public uint IsOnline { get; set; }
- ///
- /// Indicates that the device is in session when high
- ///
- public uint IsInSession { get; set; }
- ///
- /// Indicates sync detected on HDMI input when high
- ///
- public uint HdmiVideoSync { get; set; }
- ///
- /// Set High to enable automatic input routing and low to disable. Feedback high when enabled
- ///
- public uint AutomaticInputRoutingEnabled { get; set; }
- #endregion
-
- #region Analogs
- ///
- /// Selects source and provides feedback
- ///
- public uint VideoOut { get; set; }
- ///
- /// Provided error feedback
- ///
- public uint ErrorFB { get; set; }
- ///
- /// Indicates the number of connected users as feedback
- ///
- public uint NumberOfUsersConnectedFB { get; set; }
- ///
- /// Sets the login code and provides the current code as feedback
- ///
- public uint LoginCode { get; set; }
- #endregion
-
- #region Serials
- ///
- /// Provides the name defined in config as feedback
- ///
- public uint Name { get; set; }
- ///
- /// Provides the connection address as feedback
- ///
- public uint ConnectionAddressFB { get; set; }
- ///
- /// Provides the hostname as feedback
- ///
- public uint HostnameFB { get; set; }
- ///
- /// Provides the serial number as feedback
- ///
- public uint SerialNumberFeedback { get; set; }
- #endregion
-
- public AirMediaControllerJoinMap()
- {
- // Digital
- IsOnline = 1;
- IsInSession = 2;
- HdmiVideoSync = 3;
- AutomaticInputRoutingEnabled = 4;
-
- // Analog
- VideoOut = 1;
- ErrorFB = 2;
- NumberOfUsersConnectedFB = 3;
- LoginCode = 4;
-
- // Serial
- Name = 1;
- ConnectionAddressFB = 2;
- HostnameFB = 3;
- SerialNumberFeedback = 4;
- }
-
- public override void OffsetJoinNumbers(uint joinStart)
- {
- var joinOffset = joinStart - 1;
-
- IsOnline = IsOnline + joinOffset;
- IsInSession = IsInSession + joinOffset;
- HdmiVideoSync = HdmiVideoSync + joinOffset;
- AutomaticInputRoutingEnabled = AutomaticInputRoutingEnabled + joinOffset;
-
- VideoOut = VideoOut + joinOffset;
- ErrorFB = ErrorFB + joinOffset;
- NumberOfUsersConnectedFB = NumberOfUsersConnectedFB + joinOffset;
- LoginCode = LoginCode + joinOffset;
-
- Name = Name + joinOffset;
- ConnectionAddressFB = ConnectionAddressFB + joinOffset;
- HostnameFB = HostnameFB + joinOffset;
- SerialNumberFeedback = SerialNumberFeedback + joinOffset;
- }
- }
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Crestron.SimplSharp;
+using PepperDash.Essentials.Core;
+
+namespace PepperDash.Essentials.Core.Bridges
+{
+ public class AirMediaControllerJoinMap : JoinMapBaseAdvanced
+ {
+ [JoinName("IsOnline")]
+ public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Air Media Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("IsInSession")]
+ public JoinDataComplete IsInSession = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Air Media In Sharing Session", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("HdmiVideoSync")]
+ public JoinDataComplete HdmiVideoSync = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Air Media Has HDMI Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("AutomaticInputRoutingEnabled")]
+ public JoinDataComplete AutomaticInputRoutingEnabled = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Air Media Automatic Input Routing Enable(d)", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("VideoOut")]
+ public JoinDataComplete VideoOut = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Air Media Video Route Select / Feedback", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("ErrorFB")]
+ public JoinDataComplete ErrorFB = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Air Media Error Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("NumberOfUsersConnectedFB")]
+ public JoinDataComplete NumberOfUsersConnectedFB = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Air Media Number of Users Connected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("LoginCode")]
+ public JoinDataComplete LoginCode = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Air Media Login Code Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("Name")]
+ public JoinDataComplete Name = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Air Media Device Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("ConnectionAddressFB")]
+ public JoinDataComplete ConnectionAddressFB = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Air Media IP Address", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("HostnameFB")]
+ public JoinDataComplete HostnameFB = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Air Media Hostname", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("SerialNumberFeedback")]
+ public JoinDataComplete SerialNumberFeedback = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Air Media Serial Number", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ public AirMediaControllerJoinMap(uint joinStart)
+ : base(joinStart, typeof(AirMediaControllerJoinMap))
+ {
+ }
+
+ }
}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/AppleTvJoinMap.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/AppleTvJoinMap.cs
index aae9e37b..03abf902 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/AppleTvJoinMap.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/AppleTvJoinMap.cs
@@ -1,67 +1,46 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Crestron.SimplSharp;
-using PepperDash.Essentials.Core;
-
-namespace PepperDash.Essentials.Core.Bridges
-{
- public class AppleTvJoinMap : JoinMapBase
- {
- #region Digitals
- ///
- /// Sends up arrow command while high
- ///
- public uint UpArrow { get; set; }
- ///
- /// Sends down arrow command while high
- ///
- public uint DnArrow { get; set; }
- ///
- /// Sends left arrow command while high
- ///
- public uint LeftArrow { get; set; }
- ///
- /// Sends right arrow command while high
- ///
- public uint RightArrow { get; set; }
- ///
- /// Sends menu command
- ///
- public uint Menu { get; set; }
- ///
- /// Sends select command
- ///
- public uint Select { get; set; }
- ///
- /// Sends play/pause command
- ///
- public uint PlayPause { get; set; }
- #endregion
-
- public AppleTvJoinMap()
- {
- UpArrow = 1;
- DnArrow = 2;
- LeftArrow = 3;
- RightArrow = 4;
- Menu = 5;
- Select = 6;
- PlayPause = 7;
- }
-
- public override void OffsetJoinNumbers(uint joinStart)
- {
- var joinOffset = joinStart - 1;
-
- UpArrow = UpArrow + joinOffset;
- DnArrow = DnArrow + joinOffset;
- LeftArrow = LeftArrow + joinOffset;
- RightArrow = RightArrow + joinOffset;
- Menu = Menu + joinOffset;
- Select = Select + joinOffset;
- PlayPause = PlayPause + joinOffset;
- }
- }
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Crestron.SimplSharp;
+using PepperDash.Essentials.Core;
+
+namespace PepperDash.Essentials.Core.Bridges
+{
+ public class AppleTvJoinMap : JoinMapBaseAdvanced
+ {
+ [JoinName("UpArrow")]
+ public JoinDataComplete UpArrow = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "AppleTv Nav Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("DnArrow")]
+ public JoinDataComplete DnArrow = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
+ new JoinMetadata() { Label = "AppleTv Nav Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("LeftArrow")]
+ public JoinDataComplete LeftArrow = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
+ new JoinMetadata() { Label = "AppleTv Nav Left", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("RightArrow")]
+ public JoinDataComplete RightArrow = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
+ new JoinMetadata() { Label = "AppleTv Nav Right", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Menu")]
+ public JoinDataComplete Menu = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
+ new JoinMetadata() { Label = "AppleTv Menu", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Select")]
+ public JoinDataComplete Select = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 },
+ new JoinMetadata() { Label = "AppleTv Select", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("PlayPause")]
+ public JoinDataComplete PlayPause = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 },
+ new JoinMetadata() { Label = "AppleTv Play/Pause", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ public AppleTvJoinMap(uint joinStart)
+ : base(joinStart, typeof(AppleTvJoinMap))
+ {
+ }
+
+ }
}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/C2nRthsControllerJoinMap.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/C2nRthsControllerJoinMap.cs
index 2ef315b5..50429332 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/C2nRthsControllerJoinMap.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/C2nRthsControllerJoinMap.cs
@@ -1,43 +1,34 @@
-using System.Linq;
-using Crestron.SimplSharp.Reflection;
-using PepperDash.Essentials.Core;
-
-namespace PepperDash.Essentials.Core.Bridges
-{
- public class C2nRthsControllerJoinMap:JoinMapBase
- {
- public uint IsOnline { get; set; }
- public uint Name { get; set; }
- public uint Temperature { get; set; }
- public uint Humidity { get; set; }
- public uint TemperatureFormat { get; set; }
-
- public C2nRthsControllerJoinMap()
- {
- //digital
- IsOnline = 1;
- TemperatureFormat = 2;
-
- //Analog
- Temperature = 2;
- Humidity = 3;
-
- //serial
- Name = 1;
-
-
- }
-
- public override void OffsetJoinNumbers(uint joinStart)
- {
- var joinOffset = joinStart - 1;
- var properties =
- GetType().GetCType().GetProperties().Where(p => p.PropertyType == typeof(uint)).ToList();
-
- foreach (var propertyInfo in properties)
- {
- propertyInfo.SetValue(this, (uint)propertyInfo.GetValue(this, null) + joinOffset, null);
- }
- }
- }
+using System.Linq;
+using Crestron.SimplSharp.Reflection;
+using PepperDash.Essentials.Core;
+
+namespace PepperDash.Essentials.Core.Bridges
+{
+ public class C2nRthsControllerJoinMap : JoinMapBaseAdvanced
+ {
+ [JoinName("IsOnline")]
+ public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Temp Sensor Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("TemperatureFormat")]
+ public JoinDataComplete TemperatureFormat = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Temp Sensor Unit Format", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Temperature")]
+ public JoinDataComplete Temperature = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Temp Sensor Temperature Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("Humidity")]
+ public JoinDataComplete Humidity = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Temp Sensor Humidity Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("Name")]
+ public JoinDataComplete Name = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Temp Sensor Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ public C2nRthsControllerJoinMap(uint joinStart)
+ : base(joinStart, typeof(C2nRthsControllerJoinMap))
+ {
+ }
+ }
}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DigitalLoggerJoinMap.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DigitalLoggerJoinMap.cs
index df90a18b..13123ca0 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DigitalLoggerJoinMap.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DigitalLoggerJoinMap.cs
@@ -1,48 +1,47 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Crestron.SimplSharp;
-
-using PepperDash.Essentials.Core;
-
-namespace PepperDash.Essentials.Core.Bridges
-{
- public class DigitalLoggerJoinMap : JoinMapBase
- {
- public uint IsOnline { get; set; }
- public uint CircuitNames { get; set; }
- public uint CircuitState { get; set; }
- public uint CircuitCycle { get; set; }
- public uint CircuitIsCritical { get; set; }
- public uint CircuitOnCmd { get; set; }
- public uint CircuitOffCmd { get; set; }
-
- public DigitalLoggerJoinMap()
- {
- // Digital
- IsOnline = 9;
- CircuitState = 0;
- CircuitCycle = 0;
- CircuitIsCritical = 10;
- CircuitOnCmd = 10;
- CircuitOffCmd = 20;
- // Serial
- CircuitNames = 0;
- // Analog
- }
-
- public override void OffsetJoinNumbers(uint joinStart)
- {
- var joinOffset = joinStart - 1;
-
- IsOnline = IsOnline + joinOffset;
- CircuitNames = CircuitNames + joinOffset;
- CircuitState = CircuitState + joinOffset;
- CircuitCycle = CircuitCycle + joinOffset;
- CircuitIsCritical = CircuitIsCritical + joinOffset;
- CircuitOnCmd = CircuitOnCmd + joinOffset;
- CircuitOffCmd = CircuitOffCmd + joinOffset;
- }
- }
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Crestron.SimplSharp;
+
+namespace PepperDash.Essentials.Core.Bridges
+{
+ [Obsolete("This Device will be moved to a plugin in a future update")]
+ public class DigitalLoggerJoinMap : JoinMapBase
+ {
+ public uint IsOnline { get; set; }
+ public uint CircuitNames { get; set; }
+ public uint CircuitState { get; set; }
+ public uint CircuitCycle { get; set; }
+ public uint CircuitIsCritical { get; set; }
+ public uint CircuitOnCmd { get; set; }
+ public uint CircuitOffCmd { get; set; }
+
+ public DigitalLoggerJoinMap()
+ {
+ // Digital
+ IsOnline = 9;
+ CircuitState = 0;
+ CircuitCycle = 0;
+ CircuitIsCritical = 10;
+ CircuitOnCmd = 10;
+ CircuitOffCmd = 20;
+ // Serial
+ CircuitNames = 0;
+ // Analog
+ }
+
+ public override void OffsetJoinNumbers(uint joinStart)
+ {
+ var joinOffset = joinStart - 1;
+
+ IsOnline = IsOnline + joinOffset;
+ CircuitNames = CircuitNames + joinOffset;
+ CircuitState = CircuitState + joinOffset;
+ CircuitCycle = CircuitCycle + joinOffset;
+ CircuitIsCritical = CircuitIsCritical + joinOffset;
+ CircuitOnCmd = CircuitOnCmd + joinOffset;
+ CircuitOffCmd = CircuitOffCmd + joinOffset;
+ }
+ }
}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs
index 001d6f94..63e3041e 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs
@@ -1,109 +1,65 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Crestron.SimplSharp;
-using PepperDash.Essentials.Core;
-
-namespace PepperDash.Essentials.Core.Bridges {
- public class DmBladeChassisControllerJoinMap : JoinMapBase {
- #region Digital/Analogs
- #endregion
-
- #region Digitals
- ///
- /// High when device is online
- ///
- public uint IsOnline { get; set; }
- ///
- /// Range reports video sync feedback for each input
- ///
- public uint VideoSyncStatus { get; set; }
- ///
- /// Range reports high if corresponding input's endpoint is online
- ///
- public uint InputEndpointOnline { get; set; }
- ///
- /// Range reports high if corresponding output's endpoint is online
- ///
- public uint OutputEndpointOnline { get; set; }
- ///
- /// Range reports high if corresponding input's transmitter supports bridging as a separate device for detailed AV switching, HDCP control, etc.
- ///
- public uint TxAdvancedIsPresent { get; set; } // indicates that there is an attached transmitter that should be bridged to be interacted with
- #endregion
-
- #region Analogs
- ///
- /// Range sets and reports the current video source for the corresponding output
- ///
- public uint OutputVideo { get; set; }
- ///
- /// Range sets and reports the current HDCP state for the corresponding input card
- ///
- public uint HdcpSupportState { get; set; }
- ///
- /// Range reports the highest supported HDCP state level for the corresponding input card
- ///
- public uint HdcpSupportCapability { get; set; }
- #endregion
-
- #region Serials
- ///
- /// Range sets and reports the name for the corresponding input card
- ///
- public uint InputNames { get; set; }
- ///
- /// Range sets and reports the name for the corresponding output card
- ///
- public uint OutputNames { get; set; }
- ///
- /// Range reports the name of the current video source for the corresponding output card
- ///
- public uint OutputCurrentVideoInputNames { get; set; }
- ///
- /// Range reports the current input resolution for each corresponding input card
- ///
- public uint InputCurrentResolution { get; set; }
- #endregion
-
- public DmBladeChassisControllerJoinMap() {
- //Digital/Analog
-
- //Digital
- IsOnline = 11;
- VideoSyncStatus = 100; //101-299
- InputEndpointOnline = 500; //501-699
- OutputEndpointOnline = 700; //701-899
- TxAdvancedIsPresent = 1000; //1001-1199
-
- //Analog
- OutputVideo = 100; //101-299
- HdcpSupportState = 1000; //1001-1199
- HdcpSupportCapability = 1200; //1201-1399
-
-
- //Serial
- InputNames = 100; //101-299
- OutputNames = 300; //301-499
- OutputCurrentVideoInputNames = 2000; //2001-2199
- InputCurrentResolution = 2400; // 2401-2599
- }
-
- public override void OffsetJoinNumbers(uint joinStart) {
- var joinOffset = joinStart - 1;
-
- IsOnline = IsOnline + joinOffset;
- OutputVideo = OutputVideo + joinOffset;
- VideoSyncStatus = VideoSyncStatus + joinOffset;
- InputNames = InputNames + joinOffset;
- OutputNames = OutputNames + joinOffset;
- OutputCurrentVideoInputNames = OutputCurrentVideoInputNames + joinOffset;
- InputCurrentResolution = InputCurrentResolution + joinOffset;
- InputEndpointOnline = InputEndpointOnline + joinOffset;
- OutputEndpointOnline = OutputEndpointOnline + joinOffset;
- HdcpSupportState = HdcpSupportState + joinOffset;
- HdcpSupportCapability = HdcpSupportCapability + joinOffset;
- }
- }
-}
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Crestron.SimplSharp;
+using PepperDash.Essentials.Core;
+
+namespace PepperDash.Essentials.Core.Bridges {
+ public class DmBladeChassisControllerJoinMap : JoinMapBaseAdvanced {
+
+ [JoinName("IsOnline")]
+ public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 },
+ new JoinMetadata() { Label = "DM Blade Chassis Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("VideoSyncStatus")]
+ public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 128 },
+ new JoinMetadata() { Label = "DM Blade Input Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("InputEndpointOnline")]
+ public JoinDataComplete InputEndpointOnline = new JoinDataComplete(new JoinData() { JoinNumber = 501, JoinSpan = 128 },
+ new JoinMetadata() { Label = "DM Blade Chassis Input Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("OutputEndpointOnline")]
+ public JoinDataComplete OutputEndpointOnline = new JoinDataComplete(new JoinData() { JoinNumber = 701, JoinSpan = 128 },
+ new JoinMetadata() { Label = "DM Blade Chassis Output Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("TxAdvancedIsPresent")]
+ public JoinDataComplete TxAdvancedIsPresent = new JoinDataComplete(new JoinData() { JoinNumber = 1001, JoinSpan = 128 },
+ new JoinMetadata() { Label = "DM Blade Chassis Tx Advanced Is Present", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("OutputVideo")]
+ public JoinDataComplete OutputVideo = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 128 },
+ new JoinMetadata() { Label = "DM Blade Chassis Output Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("HdcpSupportState")]
+ public JoinDataComplete HdcpSupportState = new JoinDataComplete(new JoinData() { JoinNumber = 1001, JoinSpan = 128 },
+ new JoinMetadata() { Label = "DM Blade Chassis Input HDCP Support State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("HdcpSupportCapability")]
+ public JoinDataComplete HdcpSupportCapability = new JoinDataComplete(new JoinData() { JoinNumber = 1201, JoinSpan = 128 },
+ new JoinMetadata() { Label = "DM Blade Chassis Input HDCP Support Capability", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("InputNames")]
+ public JoinDataComplete InputNames = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 128 },
+ new JoinMetadata() { Label = "DM Blade Chassis Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("OutputNames")]
+ public JoinDataComplete OutputNames = new JoinDataComplete(new JoinData() { JoinNumber = 301, JoinSpan = 128 },
+ new JoinMetadata() { Label = "DM Blade Chassis Output Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("OutputCurrentVideoInputNames")]
+ public JoinDataComplete OutputCurrentVideoInputNames = new JoinDataComplete(new JoinData() { JoinNumber = 2001, JoinSpan = 128 },
+ new JoinMetadata() { Label = "DM Blade Chassis Video Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("InputCurrentResolution")]
+ public JoinDataComplete InputCurrentResolution = new JoinDataComplete(new JoinData() { JoinNumber = 2401, JoinSpan = 128 },
+ new JoinMetadata() { Label = "DM Blade Chassis Input Current Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ public DmBladeChassisControllerJoinMap(uint joinStart)
+ : base(joinStart, typeof(DmBladeChassisControllerJoinMap))
+ {
+ }
+
+ }
+}
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmChassisControllerJoinMap.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmChassisControllerJoinMap.cs
index 5059333f..9406678a 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmChassisControllerJoinMap.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmChassisControllerJoinMap.cs
@@ -1,151 +1,90 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Crestron.SimplSharp;
-using PepperDash.Essentials.Core;
-
-namespace PepperDash.Essentials.Core.Bridges
-{
- public class DmChassisControllerJoinMap : JoinMapBase
- {
-#region Digital/Analogs
- ///
- /// Analog input sets System ID, output reports current ID as feedback.
- /// Digital input applies System ID, output is high when applying busy.
- ///
- public uint SystemId { get; set; }
-#endregion
-
-#region Digitals
- ///
- /// High when device is online
- ///
- public uint IsOnline { get; set; }
- ///
- /// Range reports video sync feedback for each input
- ///
- public uint VideoSyncStatus { get; set; }
- ///
- /// Range reports high if corresponding input's endpoint is online
- ///
- public uint InputEndpointOnline { get; set; }
- ///
- /// Range reports high if corresponding output's endpoint is online
- ///
- public uint OutputEndpointOnline { get; set; }
- ///
- /// Range reports high if corresponding input's transmitter supports bridging as a separate device for detailed AV switching, HDCP control, etc.
- ///
- public uint TxAdvancedIsPresent { get; set; } // indicates that there is an attached transmitter that should be bridged to be interacted with
- ///
- /// Range reports high if corresponding output is disabled by HDCP.
- ///
- public uint OutputDisabledByHdcp { get; set; } // indicates that there is an attached transmitter that should be bridged to be interacted with
-#endregion
-
-#region Analogs
- ///
- /// Range sets and reports the current video source for the corresponding output
- ///
- public uint OutputVideo { get; set; }
- ///
- /// Range sets and reports the current audio source for the corresponding output
- ///
- public uint OutputAudio { get; set; }
- ///
- /// Range sets and reports the current Usb source for the corresponding output
- ///
- public uint OutputUsb { get; set; }
- ///
- /// Range sets and reports the current Usb source for the corresponding input
- ///
- public uint InputUsb { get; set; }
- ///
- /// Range sets and reports the current HDCP state for the corresponding input card
- ///
- public uint HdcpSupportState { get; set; }
- ///
- /// Range reports the highest supported HDCP state level for the corresponding input card
- ///
- public uint HdcpSupportCapability { get; set; }
-#endregion
-
-#region Serials
- ///
- /// Range sets and reports the name for the corresponding input card
- ///
- public uint InputNames { get; set; }
- ///
- /// Range sets and reports the name for the corresponding output card
- ///
- public uint OutputNames { get; set; }
- ///
- /// Range reports the name of the current video source for the corresponding output card
- ///
- public uint OutputCurrentVideoInputNames { get; set; }
- ///
- /// Range reports the name of the current audio source for the corresponding output card
- ///
- public uint OutputCurrentAudioInputNames { get; set; }
- ///
- /// Range reports the current input resolution for each corresponding input card
- ///
- public uint InputCurrentResolution { get; set; }
-#endregion
-
- public DmChassisControllerJoinMap()
- {
- //Digital/Analog
- SystemId = 10; // Analog sets/gets SystemId, digital input applies and provides feedback of ID change busy
-
- //Digital
- IsOnline = 11;
- VideoSyncStatus = 100; //101-299
- InputEndpointOnline = 500; //501-699
- OutputEndpointOnline = 700; //701-899
- TxAdvancedIsPresent = 1000; //1001-1199
- OutputDisabledByHdcp = 1200; //1201-1399
-
- //Analog
- OutputVideo = 100; //101-299
- OutputAudio = 300; //301-499
- OutputUsb = 500; //501-699
- InputUsb = 700; //701-899
- HdcpSupportState = 1000; //1001-1199
- HdcpSupportCapability = 1200; //1201-1399
-
-
- //Serial
- InputNames = 100; //101-299
- OutputNames = 300; //301-499
- OutputCurrentVideoInputNames = 2000; //2001-2199
- OutputCurrentAudioInputNames = 2200; //2201-2399
- InputCurrentResolution = 2400; // 2401-2599
- }
-
- public override void OffsetJoinNumbers(uint joinStart)
- {
- var joinOffset = joinStart - 1;
-
- SystemId = SystemId + joinOffset;
- IsOnline = IsOnline + joinOffset;
- OutputVideo = OutputVideo + joinOffset;
- OutputAudio = OutputAudio + joinOffset;
- OutputUsb = OutputUsb + joinOffset;
- InputUsb = InputUsb + joinOffset;
- VideoSyncStatus = VideoSyncStatus + joinOffset;
- InputNames = InputNames + joinOffset;
- OutputNames = OutputNames + joinOffset;
- OutputCurrentVideoInputNames = OutputCurrentVideoInputNames + joinOffset;
- OutputCurrentAudioInputNames = OutputCurrentAudioInputNames + joinOffset;
- InputCurrentResolution = InputCurrentResolution + joinOffset;
- InputEndpointOnline = InputEndpointOnline + joinOffset;
- OutputEndpointOnline = OutputEndpointOnline + joinOffset;
- HdcpSupportState = HdcpSupportState + joinOffset;
- HdcpSupportCapability = HdcpSupportCapability + joinOffset;
- OutputDisabledByHdcp = OutputDisabledByHdcp + joinOffset;
- TxAdvancedIsPresent = TxAdvancedIsPresent + joinOffset;
- }
- }
-}
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Crestron.SimplSharp;
+using PepperDash.Essentials.Core;
+
+namespace PepperDash.Essentials.Core.Bridges
+{
+ public class DmChassisControllerJoinMap : JoinMapBaseAdvanced
+ {
+
+ [JoinName("SystemId")]
+ public JoinDataComplete SystemId = new JoinDataComplete(new JoinData() { JoinNumber = 10, JoinSpan = 1 },
+ new JoinMetadata() { Label = "DM Chassis SystemId Get/Set/Trigger/", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.DigitalAnalog });
+
+ [JoinName("IsOnline")]
+ public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 },
+ new JoinMetadata() { Label = "DM Chassis Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("VideoSyncStatus")]
+ public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Input Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("InputEndpointOnline")]
+ public JoinDataComplete InputEndpointOnline = new JoinDataComplete(new JoinData() { JoinNumber = 501, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Chassis Input Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("OutputEndpointOnline")]
+ public JoinDataComplete OutputEndpointOnline = new JoinDataComplete(new JoinData() { JoinNumber = 701, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Chassis Output Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("TxAdvancedIsPresent")]
+ public JoinDataComplete TxAdvancedIsPresent = new JoinDataComplete(new JoinData() { JoinNumber = 1001, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Chassis Tx Advanced Is Present", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("OutputDisabledByHdcp")]
+ public JoinDataComplete OutputDisabledByHdcp = new JoinDataComplete(new JoinData() { JoinNumber = 1201, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Chassis Output Disabled by HDCP", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("OutputVideo")]
+ public JoinDataComplete OutputVideo = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Chassis Output Video Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("OutputAudio")]
+ public JoinDataComplete OutputAudio = new JoinDataComplete(new JoinData() { JoinNumber = 301, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Chassis Output Audio Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("OutputUsb")]
+ public JoinDataComplete OutputUsb = new JoinDataComplete(new JoinData() { JoinNumber = 501, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Chassis Output USB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("InputUsb")]
+ public JoinDataComplete InputUsb = new JoinDataComplete(new JoinData() { JoinNumber = 701, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Chassis Input Usb Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("HdcpSupportState")]
+ public JoinDataComplete HdcpSupportState = new JoinDataComplete(new JoinData() { JoinNumber = 1001, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Chassis Input HDCP Support State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("HdcpSupportCapability")]
+ public JoinDataComplete HdcpSupportCapability = new JoinDataComplete(new JoinData() { JoinNumber = 1201, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Chassis Input HDCP Support Capability", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("InputNames")]
+ public JoinDataComplete InputNames = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Chassis Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("OutputNames")]
+ public JoinDataComplete OutputNames = new JoinDataComplete(new JoinData() { JoinNumber = 301, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Chassis Output Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("OutputCurrentVideoInputNames")]
+ public JoinDataComplete OutputCurrentVideoInputNames = new JoinDataComplete(new JoinData() { JoinNumber = 2001, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Chassis Video Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("OutputCurrentAudioInputNames")]
+ public JoinDataComplete OutputCurrentAudioInputNames = new JoinDataComplete(new JoinData() { JoinNumber = 2201, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Chassis Audio Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("InputCurrentResolution")]
+ public JoinDataComplete InputCurrentResolution = new JoinDataComplete(new JoinData() { JoinNumber = 2401, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Chassis Input Current Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ public DmChassisControllerJoinMap(uint joinStart)
+ : base(joinStart, typeof(DmChassisControllerJoinMap))
+ {
+ }
+ }
+}
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmRmcControllerJoinMap.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmRmcControllerJoinMap.cs
index 94b9396b..537be416 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmRmcControllerJoinMap.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmRmcControllerJoinMap.cs
@@ -1,75 +1,46 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Crestron.SimplSharp;
-using PepperDash.Essentials.Core;
-
-namespace PepperDash.Essentials.Core.Bridges
-{
- public class DmRmcControllerJoinMap : JoinMapBase
- {
- #region Digitals
- ///
- /// High when device is online (if not attached to a DMP3 or DM chassis with a CPU3 card
- ///
- public uint IsOnline { get; set; }
- #endregion
-
- #region Serials
- ///
- /// Reports the current output resolution
- ///
- public uint CurrentOutputResolution { get; set; }
- ///
- /// Reports the EDID manufacturer value
- ///
- public uint EdidManufacturer { get; set; }
- ///
- /// Reports the EDID Name value
- ///
- public uint EdidName { get; set; }
- ///
- /// Reports the EDID preffered timing value
- ///
- public uint EdidPrefferedTiming { get; set; }
- ///
- /// Reports the EDID serial number value
- ///
- public uint EdidSerialNumber { get; set; }
- #endregion
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Crestron.SimplSharp;
+using PepperDash.Essentials.Core;
- #region Analogs
- public uint AudioVideoSource { get; set; }
- #endregion
+namespace PepperDash.Essentials.Core.Bridges
+{
+ public class DmRmcControllerJoinMap : JoinMapBaseAdvanced
+ {
+ [JoinName("IsOnline")]
+ public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "DM RMC Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
- public DmRmcControllerJoinMap()
+ [JoinName("CurrentOutputResolution")]
+ public JoinDataComplete CurrentOutputResolution = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "DM RMC Current Output Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("EdidManufacturer")]
+ public JoinDataComplete EdidManufacturer = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
+ new JoinMetadata() { Label = "DM RMC EDID Manufacturer", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("EdidName")]
+ public JoinDataComplete EdidName = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
+ new JoinMetadata() { Label = "DM RMC EDID Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("EdidPrefferedTiming")]
+ public JoinDataComplete EdidPrefferedTiming = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
+ new JoinMetadata() { Label = "DM RMC EDID Preferred Timing", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("EdidSerialNumber")]
+ public JoinDataComplete EdidSerialNumber = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
+ new JoinMetadata() { Label = "DM RMC EDID Serial Number", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("AudioVideoSource")]
+ public JoinDataComplete AudioVideoSource = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "DM RMC Audio Video Source Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+
+ public DmRmcControllerJoinMap(uint joinStart)
+ : base(joinStart, typeof(DmRmcControllerJoinMap))
{
- // Digital
- IsOnline = 1;
-
- // Serial
- CurrentOutputResolution = 1;
- EdidManufacturer = 2;
- EdidName = 3;
- EdidPrefferedTiming = 4;
- EdidSerialNumber = 5;
-
- //Analog
- AudioVideoSource = 1;
}
-
- public override void OffsetJoinNumbers(uint joinStart)
- {
- var joinOffset = joinStart - 1;
-
- IsOnline = IsOnline + joinOffset;
- CurrentOutputResolution = CurrentOutputResolution + joinOffset;
- EdidManufacturer = EdidManufacturer + joinOffset;
- EdidName = EdidName + joinOffset;
- EdidPrefferedTiming = EdidPrefferedTiming + joinOffset;
- EdidSerialNumber = EdidSerialNumber + joinOffset;
- AudioVideoSource = AudioVideoSource + joinOffset;
- }
- }
+ }
}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmTxControllerJoinMap.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmTxControllerJoinMap.cs
index b01da694..7032bad7 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmTxControllerJoinMap.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmTxControllerJoinMap.cs
@@ -2,97 +2,58 @@
namespace PepperDash.Essentials.Core.Bridges
{
- public class DmTxControllerJoinMap : JoinMapBase
+ public class DmTxControllerJoinMap : JoinMapBaseAdvanced
{
- #region Digitals
- ///
- /// High when device is online (if not attached to a DMP3 or DM chassis with a CPU3 card
- ///
- public uint IsOnline { get; set; }
- ///
- /// High when video sync is detected
- ///
- public uint VideoSyncStatus { get; set; }
- ///
- ///
- ///
- public uint FreeRunEnabled { get; set; }
- #endregion
-
- #region Analogs
- ///
- /// Sets and reports the video source
- ///
- public uint VideoInput { get; set; }
- ///
- /// Sets and reports the audio source
- ///
- public uint AudioInput { get; set; }
- ///
- /// Reports the highest supported HDCP state level for the corresponding input card
- ///
- public uint HdcpSupportCapability { get; set; }
- ///
- /// Sets and reports the current HDCP state for the corresponding input port
- ///
- public uint Port1HdcpState { get; set; }
- ///
- /// Sets and reports the current HDCP state for the corresponding input port
- ///
- public uint Port2HdcpState { get; set; }
-
- ///
- /// Sets and reports the current VGA Brightness level
- ///
- public uint VgaBrightness { get; set; }
-
- ///
- /// Sets and reports the current VGA Contrast level
- ///
- public uint VgaContrast { get; set; }
- #endregion
-
- #region Serials
- ///
- /// Reports the current input resolution
- ///
- public uint CurrentInputResolution { get; set; }
- #endregion
+ [JoinName("IsOnline")]
+ public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "DM TX Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("VideoSyncStatus")]
+ public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
+ new JoinMetadata() { Label = "DM TX Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("FreeRunEnabled")]
+ public JoinDataComplete FreeRunEnabled = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
+ new JoinMetadata() { Label = "DM TX Enable Free Run Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("CurrentInputResolution")]
+ public JoinDataComplete CurrentInputResolution = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "DM TX Current Input Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("VideoInput")]
+ public JoinDataComplete VideoInput = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "DM TX Video Input Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("AudioInput")]
+ public JoinDataComplete AudioInput = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
+ new JoinMetadata() { Label = "DM TX Audio Input Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("HdcpSupportCapability")]
+ public JoinDataComplete HdcpSupportCapability = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
+ new JoinMetadata() { Label = "DM TX HDCP Support Capability", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("Port1HdcpState")]
+ public JoinDataComplete Port1HdcpState = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
+ new JoinMetadata() { Label = "DM TX Port 1 HDCP State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("Port2HdcpState")]
+ public JoinDataComplete Port2HdcpState = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
+ new JoinMetadata() { Label = "DM TX Port 2 HDCP State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("VgaBrightness")]
+ public JoinDataComplete VgaBrightness = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 },
+ new JoinMetadata() { Label = "DM TX VGA Brightness", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("VgaContrast")]
+ public JoinDataComplete VgaContrast = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 },
+ new JoinMetadata() { Label = "DM TX Online", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+
+ public DmTxControllerJoinMap(uint joinStart)
+ : base(joinStart, typeof(DmTxControllerJoinMap))
+ {
+ }
- public DmTxControllerJoinMap()
- {
- // Digital
- IsOnline = 1;
- VideoSyncStatus = 2;
- FreeRunEnabled = 3;
- // Serial
- CurrentInputResolution = 1;
- // Analog
- VideoInput = 1;
- AudioInput = 2;
- HdcpSupportCapability = 3;
- Port1HdcpState = 4;
- Port2HdcpState = 5;
- VgaBrightness = 6;
- VgaContrast = 7;
- }
-
- public override void OffsetJoinNumbers(uint joinStart)
- {
- var joinOffset = joinStart - 1;
-
- IsOnline = IsOnline + joinOffset;
- VideoSyncStatus = VideoSyncStatus + joinOffset;
- FreeRunEnabled = FreeRunEnabled + joinOffset;
- CurrentInputResolution = CurrentInputResolution + joinOffset;
- VideoInput = VideoInput + joinOffset;
- AudioInput = AudioInput + joinOffset;
- HdcpSupportCapability = HdcpSupportCapability + joinOffset;
- Port1HdcpState = Port1HdcpState + joinOffset;
- Port2HdcpState = Port2HdcpState + joinOffset;
- VgaBrightness = VgaBrightness + joinOffset;
- VgaContrast = VgaContrast + joinOffset;
- }
}
}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs
index 125700b2..89686765 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs
@@ -1,69 +1,100 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Crestron.SimplSharp;
-using PepperDash.Essentials.Core;
-
-namespace PepperDash.Essentials.Core.Bridges
-{
- public class DmpsAudioOutputControllerJoinMap : JoinMapBase
- {
- #region Digital/Analog
- ///
- /// Range of joins for Master Volume
- /// Analog join 1 is volume level and feedback
- /// Digital join 1 is Mute on and feedback
- /// Digital join 2 is Mute off and feedback
- /// Digital join 3 is volume up
- /// Digital join 4 is volume down
- ///
- public uint MasterVolume { get; set; }
- ///
- /// Range of joins for Source Volume
- /// Analog join 11 is volume level and feedback
- /// Digital join 11 is Mute on and feedback
- /// Digital join 12 is Mute off and feedback
- /// Digital join 13 is volume up
- /// Digital join 14 is volume down
- ///
- public uint SourceVolume { get; set; }
- ///
- /// Range of joins for Codec1 Volume (if applicable)
- /// Analog join 21 is volume level and feedback
- /// Digital join 21 is Mute on and feedback
- /// Digital join 22 is Mute off and feedback
- /// Digital join 23 is volume up
- /// Digital join 24 is volume down
- ///
- public uint Codec1Volume { get; set; }
- ///
- /// Range of joins for Codec2 Volume (if applicable)
- /// Analog join 31 is volume level and feedback
- /// Digital join 31 is Mute on and feedback
- /// Digital join 32 is Mute off and feedback
- /// Digital join 33 is volume up
- /// Digital join 34 is volume down
- ///
- public uint Codec2Volume { get; set; }
- #endregion
-
- public DmpsAudioOutputControllerJoinMap()
- {
- MasterVolume = 1; // 1-10
- SourceVolume = 11; // 11-20
- Codec1Volume = 21; // 21-30
- Codec2Volume = 31; // 31-40
- }
-
- public override void OffsetJoinNumbers(uint joinStart)
- {
- var joinOffset = joinStart;
-
- MasterVolume = MasterVolume + joinOffset;
- SourceVolume = SourceVolume + joinOffset;
- Codec1Volume = Codec1Volume + joinOffset;
- Codec2Volume = Codec2Volume + joinOffset;
- }
- }
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Crestron.SimplSharp;
+using PepperDash.Essentials.Core;
+
+namespace PepperDash.Essentials.Core.Bridges
+{
+ public class DmpsAudioOutputControllerJoinMap : JoinMapBaseAdvanced
+ {
+
+ [JoinName("MasterVolumeLevel")]
+ public JoinDataComplete MasterVolumeLevel = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Master Volume Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("MasterVolumeMuteOn")]
+ public JoinDataComplete MasterVolumeMuteOn = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Master Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("MasterVolumeMuteOff")]
+ public JoinDataComplete MasterVolumeMuteOff = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Master Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("MasterVolumeUp")]
+ public JoinDataComplete MasterVolumeUp = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Master Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("MasterVolumeDown")]
+ public JoinDataComplete MasterVolumeDown = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Master Volume Mute Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("SourceVolumeLevel")]
+ public JoinDataComplete SourceVolumeLevel = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Source Volume Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("SourceVolumeMuteOn")]
+ public JoinDataComplete SourceVolumeMuteOn = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Source Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("SourceVolumeMuteOff")]
+ public JoinDataComplete SourceVolumeMuteOff = new JoinDataComplete(new JoinData() { JoinNumber = 12, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Source Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("SourceVolumeUp")]
+ public JoinDataComplete SourceVolumeUp = new JoinDataComplete(new JoinData() { JoinNumber = 13, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Source Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("SourceVolumeDown")]
+ public JoinDataComplete SourceVolumeDown = new JoinDataComplete(new JoinData() { JoinNumber = 14, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Source Volume Mute Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Codec1VolumeLevel")]
+ public JoinDataComplete Codec1VolumeLevel = new JoinDataComplete(new JoinData() { JoinNumber = 21, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Codec1 Volume Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("Codec1VolumeMuteOn")]
+ public JoinDataComplete Codec1VolumeMuteOn = new JoinDataComplete(new JoinData() { JoinNumber = 21, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Codec1 Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Codec1VolumeMuteOff")]
+ public JoinDataComplete Codec1VolumeMuteOff = new JoinDataComplete(new JoinData() { JoinNumber = 22, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Codec1 Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Codec1VolumeUp")]
+ public JoinDataComplete Codec1VolumeUp = new JoinDataComplete(new JoinData() { JoinNumber = 23, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Codec1 Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Codec1VolumeDown")]
+ public JoinDataComplete Codec1VolumeDown = new JoinDataComplete(new JoinData() { JoinNumber = 24, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Codec1 Volume Mute Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Codec2VolumeLevel")]
+ public JoinDataComplete Codec2VolumeLevel = new JoinDataComplete(new JoinData() { JoinNumber = 31, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Codec2 Volume Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("Codec2VolumeMuteOn")]
+ public JoinDataComplete Codec2VolumeMuteOn = new JoinDataComplete(new JoinData() { JoinNumber = 31, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Codec2 Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Codec2VolumeMuteOff")]
+ public JoinDataComplete Codec2VolumeMuteOff = new JoinDataComplete(new JoinData() { JoinNumber = 32, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Codec2 Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Codec2VolumeUp")]
+ public JoinDataComplete Codec2VolumeUp = new JoinDataComplete(new JoinData() { JoinNumber = 33, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Codec2 Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Codec2VolumeDown")]
+ public JoinDataComplete Codec2VolumeDown = new JoinDataComplete(new JoinData() { JoinNumber = 34, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Codec2 Volume Mute Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+
+
+ public DmpsAudioOutputControllerJoinMap(uint joinStart)
+ : base(joinStart, typeof(DmpsAudioOutputControllerJoinMap))
+ {
+ }
+ }
}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs
index b58611fe..dc0d6fba 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs
@@ -7,121 +7,51 @@ using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges
{
- public class DmpsRoutingControllerJoinMap : JoinMapBase
+ public class DmpsRoutingControllerJoinMap : JoinMapBaseAdvanced
{
- #region Digitals
- ///
- /// Range reports video sync feedback for each input
- ///
- public uint VideoSyncStatus { get; set; }
- ///
- /// Range reports high if corresponding input's endpoint is online
- ///
- public uint InputEndpointOnline { get; set; }
- ///
- /// Range reports high if corresponding output's endpoint is online
- ///
- public uint OutputEndpointOnline { get; set; }
- #endregion
-
-
- #region Analogs
- ///
- /// Range sets and reports the current video source for the corresponding output
- ///
- public uint OutputVideo { get; set; }
- ///
- /// Range sets and reports the current audio source for the corresponding output
- ///
- public uint OutputAudio { get; set; }
- ///
- /// Range sets and reports the current Usb source for the corresponding output
- ///
- //public uint OutputUsb { get; set; }
- /////
- ///// Range sets and reports the current Usb source for the corresponding input
- /////
- //public uint InputUsb { get; set; }
- /////
- ///// Range sets and reports the current HDCP state for the corresponding input card
- /////
- //public uint HdcpSupportState { get; set; }
- /////
- ///// Range reports the highest supported HDCP state level for the corresponding input card
- /////
- //public uint HdcpSupportCapability { get; set; }
- #endregion
-
- #region Serials
- ///
- /// Range sets and reports the name for the corresponding input card
- ///
- public uint InputNames { get; set; }
- ///
- /// Range sets and reports the name for the corresponding output card
- ///
- public uint OutputNames { get; set; }
- ///
- /// Range reports the name of the current video source for the corresponding output card
- ///
- public uint OutputCurrentVideoInputNames { get; set; }
- ///
- /// Range reports the name of the current audio source for the corresponding output card
- ///
- public uint OutputCurrentAudioInputNames { get; set; }
- ///
- /// Range reports the current input resolution for each corresponding input card
- ///
- public uint InputCurrentResolution { get; set; }
- #endregion
-
-
- public DmpsRoutingControllerJoinMap()
- {
- //Digital
- VideoSyncStatus = 100; //101-299
- InputEndpointOnline = 500; //501-699
- OutputEndpointOnline = 700; //701-899
-
- //Analog
- OutputVideo = 100; //101-299
- OutputAudio = 300; //301-499
- //OutputUsb = 500; //501-699
- //InputUsb = 700; //701-899
- VideoSyncStatus = 100; //101-299
- //HdcpSupportState = 1000; //1001-1199
- //HdcpSupportCapability = 1200; //1201-1399
-
-
- //Serial
- InputNames = 100; //101-299
- OutputNames = 300; //301-499
- OutputCurrentVideoInputNames = 2000; //2001-2199
- OutputCurrentAudioInputNames = 2200; //2201-2399
- InputCurrentResolution = 2400; // 2401-2599
- InputEndpointOnline = 500; //501-699
- OutputEndpointOnline = 700; //701-899
-
- }
-
- public override void OffsetJoinNumbers(uint joinStart)
- {
- var joinOffset = joinStart - 1;
-
- OutputVideo = OutputVideo + joinOffset;
- OutputAudio = OutputAudio + joinOffset;
- //OutputUsb = OutputUsb + joinOffset;
- //InputUsb = InputUsb + joinOffset;
- VideoSyncStatus = VideoSyncStatus + joinOffset;
- InputNames = InputNames + joinOffset;
- OutputNames = OutputNames + joinOffset;
- OutputCurrentVideoInputNames = OutputCurrentVideoInputNames + joinOffset;
- OutputCurrentAudioInputNames = OutputCurrentAudioInputNames + joinOffset;
- InputCurrentResolution = InputCurrentResolution + joinOffset;
- InputEndpointOnline = InputEndpointOnline + joinOffset;
- OutputEndpointOnline = OutputEndpointOnline + joinOffset;
- //HdcpSupportState = HdcpSupportState + joinOffset;
- //HdcpSupportCapability = HdcpSupportCapability + joinOffset;
+ [JoinName("VideoSyncStatus")]
+ public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Input Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("InputEndpointOnline")]
+ public JoinDataComplete InputEndpointOnline = new JoinDataComplete(new JoinData() { JoinNumber = 501, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Chassis Input Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("OutputEndpointOnline")]
+ public JoinDataComplete OutputEndpointOnline = new JoinDataComplete(new JoinData() { JoinNumber = 701, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Chassis Output Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("OutputVideo")]
+ public JoinDataComplete OutputVideo = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Chassis Output Video Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("OutputAudio")]
+ public JoinDataComplete OutputAudio = new JoinDataComplete(new JoinData() { JoinNumber = 301, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Chassis Output Audio Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("InputNames")]
+ public JoinDataComplete InputNames = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Chassis Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("OutputNames")]
+ public JoinDataComplete OutputNames = new JoinDataComplete(new JoinData() { JoinNumber = 301, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Chassis Output Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("OutputCurrentVideoInputNames")]
+ public JoinDataComplete OutputCurrentVideoInputNames = new JoinDataComplete(new JoinData() { JoinNumber = 2001, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Chassis Video Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("OutputCurrentAudioInputNames")]
+ public JoinDataComplete OutputCurrentAudioInputNames = new JoinDataComplete(new JoinData() { JoinNumber = 2201, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Chassis Audio Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("InputCurrentResolution")]
+ public JoinDataComplete InputCurrentResolution = new JoinDataComplete(new JoinData() { JoinNumber = 2401, JoinSpan = 32 },
+ new JoinMetadata() { Label = "DM Chassis Input Current Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ public DmpsRoutingControllerJoinMap(uint joinStart)
+ : base(joinStart, typeof(DmpsRoutingControllerJoinMap))
+ {
}
}
}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/GenericLightingJoinMap.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/GenericLightingJoinMap.cs
index 242be651..f639cff0 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/GenericLightingJoinMap.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/GenericLightingJoinMap.cs
@@ -9,33 +9,35 @@ using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges
{
- public class GenericLightingJoinMap : JoinMapBase
- {
- public uint IsOnline { get; set; }
- public uint SelectScene { get; set; }
- public uint LightingSceneOffset { get; set; }
- public uint ButtonVisibilityOffset { get; set; }
- public uint IntegrationIdSet { get; set; }
-
- public GenericLightingJoinMap()
- {
- // Digital
- IsOnline = 1;
- SelectScene = 1;
- IntegrationIdSet = 1;
- LightingSceneOffset = 10;
- ButtonVisibilityOffset = 40;
- // Analog
- }
-
- public override void OffsetJoinNumbers(uint joinStart)
- {
- var joinOffset = joinStart - 1;
-
- IsOnline = IsOnline + joinOffset;
- SelectScene = SelectScene + joinOffset;
- LightingSceneOffset = LightingSceneOffset + joinOffset;
- ButtonVisibilityOffset = ButtonVisibilityOffset + joinOffset;
+ public class GenericLightingJoinMap : JoinMapBaseAdvanced
+ {
+
+ [JoinName("IsOnline")]
+ public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Lighting Controller Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("SelectScene")]
+ public JoinDataComplete SelectScene = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Lighting Controller Select Scene By Index", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("SelectSceneDirect")]
+ public JoinDataComplete SelectSceneDirect = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 10 },
+ new JoinMetadata() { Label = "Lighting Controller Select Scene", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.DigitalSerial });
+
+ [JoinName("ButtonVisibility")]
+ public JoinDataComplete ButtonVisibility = new JoinDataComplete(new JoinData() { JoinNumber = 41, JoinSpan = 10 },
+ new JoinMetadata() { Label = "Lighting Controller Button Visibility", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("IntegrationIdSet")]
+ public JoinDataComplete IntegrationIdSet = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Lighting Controller Set Integration Id", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
+
+
+
+
+ public GenericLightingJoinMap(uint joinStart)
+ : base(joinStart, typeof(GenericLightingJoinMap))
+ {
}
}
}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs
index e4ccdfbd..894b7fd3 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs
@@ -7,25 +7,17 @@ using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges
{
- public class GenericRelayControllerJoinMap : JoinMapBase
+ public class GenericRelayControllerJoinMap : JoinMapBaseAdvanced
{
- #region Digitals
- ///
- /// Sets and reports the state of the relay (High = closed, Low = Open)
- ///
- public uint Relay { get; set; }
- #endregion
- public GenericRelayControllerJoinMap()
- {
- Relay = 1;
- }
-
- public override void OffsetJoinNumbers(uint joinStart)
- {
- var joinOffset = joinStart - 1;
-
- Relay = Relay + joinOffset;
+ [JoinName("Relay")]
+ public JoinDataComplete Relay = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Device Relay State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+
+ public GenericRelayControllerJoinMap(uint joinStart)
+ : base(joinStart, typeof(GenericRelayControllerJoinMap))
+ {
}
}
}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/GlsOccupancySensorBaseJoinMap.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/GlsOccupancySensorBaseJoinMap.cs
index 6e2cd175..15b927b2 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/GlsOccupancySensorBaseJoinMap.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/GlsOccupancySensorBaseJoinMap.cs
@@ -1,238 +1,176 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Crestron.SimplSharp;
-using PepperDash.Essentials.Core;
-
-namespace PepperDash.Essentials.Core.Bridges
-{
- public class GlsOccupancySensorBaseJoinMap : JoinMapBase
- {
- #region Digitals
-
- ///
- /// High when device is online
- ///
- public uint IsOnline { get; set; }
- ///
- /// Forces the device to report occupied status
- ///
- public uint ForceOccupied { get; set; }
- ///
- /// Forces the device to report vacant status
- ///
- public uint ForceVacant { get; set; }
- ///
- /// Enables raw status reporting
- ///
- public uint EnableRawStates { get; set; }
- ///
- /// High when raw occupancy is detected
- ///
- public uint RawOccupancyFeedback { get; set; }
- ///
- /// High when PIR sensor detects motion
- ///
- public uint RawOccupancyPirFeedback { get; set; }
- ///
- /// High when US sensor detects motion
- ///
- public uint RawOccupancyUsFeedback { get; set; }
- ///
- /// High when occupancy is detected
- ///
- public uint RoomOccupiedFeedback { get; set; }
- ///
- /// Hich when occupancy is detected in the grace period
- ///
- public uint GraceOccupancyDetectedFeedback { get; set; }
- ///
- /// High when vacancy is detected
- ///
- public uint RoomVacantFeedback { get; set; }
-
- ///
- /// Enables the LED Flash when set high
- ///
- public uint EnableLedFlash { get; set; }
- ///
- /// Disables the LED flash when set high
- ///
- public uint DisableLedFlash { get; set; }
- ///
- /// Enables the Short Timeout
- ///
- public uint EnableShortTimeout { get; set; }
- ///
- /// Disables the Short Timout
- ///
- public uint DisableShortTimeout { get; set; }
- ///
- /// Set high to enable one technology to trigger occupancy
- ///
- public uint OrWhenVacated { get; set; }
- ///
- /// Set high to require both technologies to trigger occupancy
- ///
- public uint AndWhenVacated { get; set; }
- ///
- /// Enables Ultrasonic Sensor A
- ///
- public uint EnableUsA { get; set; }
- ///
- /// Disables Ultrasonic Sensor A
- ///
- public uint DisableUsA { get; set; }
- ///
- /// Enables Ultrasonic Sensor B
- ///
- public uint EnableUsB { get; set; }
- ///
- /// Disables Ultrasonic Sensor B
- ///
- public uint DisableUsB { get; set; }
- ///
- /// Enables Pir
- ///
- public uint EnablePir { get; set; }
- ///
- /// Disables Pir
- ///
- public uint DisablePir { get; set; }
- public uint IncrementUsInOccupiedState { get; set; }
- public uint DecrementUsInOccupiedState { get; set; }
- public uint IncrementUsInVacantState { get; set; }
- public uint DecrementUsInVacantState { get; set; }
- public uint IncrementPirInOccupiedState { get; set; }
- public uint DecrementPirInOccupiedState { get; set; }
- public uint IncrementPirInVacantState { get; set; }
- public uint DecrementPirInVacantState { get; set; }
- #endregion
-
- #region Analogs
- ///
- /// Sets adn reports the remote timeout value
- ///
- public uint Timeout { get; set; }
- ///
- /// Reports the local timeout value
- ///
- public uint TimeoutLocalFeedback { get; set; }
- ///
- /// Sets the minimum internal photo sensor value and reports the current level
- ///
- public uint InternalPhotoSensorValue { get; set; }
- ///
- /// Sets the minimum external photo sensor value and reports the current level
- ///
- public uint ExternalPhotoSensorValue { get; set; }
-
- public uint UsSensitivityInOccupiedState { get; set; }
-
- public uint UsSensitivityInVacantState { get; set; }
-
- public uint PirSensitivityInOccupiedState { get; set; }
-
- public uint PirSensitivityInVacantState { get; set; }
- #endregion
-
- #region Serial
- public uint Name { get; set; }
- #endregion
-
- public GlsOccupancySensorBaseJoinMap()
- {
- IsOnline = 1;
- ForceOccupied = 2;
- ForceVacant = 3;
- EnableRawStates = 4;
- RoomOccupiedFeedback = 2;
- GraceOccupancyDetectedFeedback = 3;
- RoomVacantFeedback = 4;
- RawOccupancyFeedback = 5;
- RawOccupancyPirFeedback = 6;
- RawOccupancyUsFeedback = 7;
- EnableLedFlash = 11;
- DisableLedFlash = 12;
- EnableShortTimeout = 13;
- DisableShortTimeout = 14;
- OrWhenVacated = 15;
- AndWhenVacated = 16;
- EnableUsA = 17;
- DisableUsA = 18;
- EnableUsB = 19;
- DisableUsB = 20;
- EnablePir = 21;
- DisablePir = 22;
- IncrementUsInOccupiedState = 23;
- DecrementUsInOccupiedState = 24;
- IncrementUsInVacantState = 25;
- DecrementUsInVacantState = 26;
- IncrementPirInOccupiedState = 27;
- DecrementPirInOccupiedState = 28;
- IncrementPirInVacantState = 29;
- DecrementPirInVacantState = 30;
-
- Timeout = 1;
- TimeoutLocalFeedback = 2;
- InternalPhotoSensorValue = 3;
- ExternalPhotoSensorValue = 4;
- UsSensitivityInOccupiedState = 5;
- UsSensitivityInVacantState = 6;
- PirSensitivityInOccupiedState = 7;
- PirSensitivityInVacantState = 8;
-
- Name = 1;
-
- }
-
- public override void OffsetJoinNumbers(uint joinStart)
- {
- var joinOffset = joinStart - 1;
-
- IsOnline = IsOnline + joinOffset;
- ForceOccupied = ForceOccupied + joinOffset;
- ForceVacant = ForceVacant + joinOffset;
- EnableRawStates = EnableRawStates + joinOffset;
- RoomOccupiedFeedback = RoomOccupiedFeedback + joinOffset;
- GraceOccupancyDetectedFeedback = GraceOccupancyDetectedFeedback + joinOffset;
- RoomVacantFeedback = RoomVacantFeedback + joinOffset;
- RawOccupancyFeedback = RawOccupancyFeedback + joinOffset;
- RawOccupancyPirFeedback = RawOccupancyPirFeedback + joinOffset;
- RawOccupancyUsFeedback = RawOccupancyUsFeedback + joinOffset;
- EnableLedFlash = EnableLedFlash + joinOffset;
- DisableLedFlash = DisableLedFlash + joinOffset;
- EnableShortTimeout = EnableShortTimeout + joinOffset;
- DisableShortTimeout = DisableShortTimeout + joinOffset;
- OrWhenVacated = OrWhenVacated + joinOffset;
- AndWhenVacated = AndWhenVacated + joinOffset;
- EnableUsA = EnableUsA + joinOffset;
- DisableUsA = DisableUsA + joinOffset;
- EnableUsB = EnableUsB + joinOffset;
- DisableUsB = DisableUsB + joinOffset;
- EnablePir = EnablePir + joinOffset;
- DisablePir = DisablePir + joinOffset;
- IncrementUsInOccupiedState = IncrementUsInOccupiedState + joinOffset;
- DecrementUsInOccupiedState = DecrementUsInOccupiedState + joinOffset;
- IncrementUsInVacantState = IncrementUsInVacantState + joinOffset;
- DecrementUsInVacantState = DecrementUsInVacantState + joinOffset;
- IncrementPirInOccupiedState = IncrementPirInOccupiedState + joinOffset;
- DecrementPirInOccupiedState = DecrementPirInOccupiedState + joinOffset;
- IncrementPirInVacantState = IncrementPirInVacantState + joinOffset;
- DecrementPirInVacantState = DecrementPirInVacantState + joinOffset;
-
- Timeout = Timeout + joinOffset;
- TimeoutLocalFeedback = TimeoutLocalFeedback + joinOffset;
- InternalPhotoSensorValue = InternalPhotoSensorValue + joinOffset;
- ExternalPhotoSensorValue = ExternalPhotoSensorValue + joinOffset;
- UsSensitivityInOccupiedState = UsSensitivityInOccupiedState + joinOffset;
- UsSensitivityInVacantState = UsSensitivityInVacantState + joinOffset;
- PirSensitivityInOccupiedState = PirSensitivityInOccupiedState + joinOffset;
- PirSensitivityInVacantState = PirSensitivityInVacantState + joinOffset;
-
- Name = Name + joinOffset;
- }
- }
-
-}
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Crestron.SimplSharp;
+using PepperDash.Essentials.Core;
+
+namespace PepperDash.Essentials.Core.Bridges
+{
+ public class GlsOccupancySensorBaseJoinMap : JoinMapBaseAdvanced
+ {
+ [JoinName("IsOnline")]
+ public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Is Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("ForceOccupied")]
+ public JoinDataComplete ForceOccupied = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Set to Occupied", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("ForceVacant")]
+ public JoinDataComplete ForceVacant = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Set to Vacant", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("EnableRawStates")]
+ public JoinDataComplete EnableRawStates = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Enable Raw", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("RoomOccupiedFeedback")]
+ public JoinDataComplete RoomOccupiedFeedback = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Room Is Occupied", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("GraceOccupancyDetectedFeedback")]
+ public JoinDataComplete GraceOccupancyDetectedFeedback = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Grace Occupancy Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("RoomVacantFeedback")]
+ public JoinDataComplete RoomVacantFeedback = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Room Is Vacant", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("RawOccupancyFeedback")]
+ public JoinDataComplete RawOccupancyFeedback = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Raw Occupancy Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("RawOccupancyPirFeedback")]
+ public JoinDataComplete RawOccupancyPirFeedback = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Raw PIR Occupancy Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("RawOccupancyUsFeedback")]
+ public JoinDataComplete RawOccupancyUsFeedback = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Raw US Occupancy Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("EnableLedFlash")]
+ public JoinDataComplete EnableLedFlash = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Enable LED Flash", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("DisableLedFlash")]
+ public JoinDataComplete DisableLedFlash = new JoinDataComplete(new JoinData() { JoinNumber = 12, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Disable LED Flash", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("EnableShortTimeout")]
+ public JoinDataComplete EnableShortTimeout = new JoinDataComplete(new JoinData() { JoinNumber = 13, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Enable Short Timeout", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("DisableShortTimeout")]
+ public JoinDataComplete DisableShortTimeout = new JoinDataComplete(new JoinData() { JoinNumber = 14, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Disable Short Timeout", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("OrWhenVacated")]
+ public JoinDataComplete OrWhenVacated = new JoinDataComplete(new JoinData() { JoinNumber = 15, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Set To Vacant when Either Sensor is Vacant", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("AndWhenVacated")]
+ public JoinDataComplete AndWhenVacated = new JoinDataComplete(new JoinData() { JoinNumber = 16, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Set To Vacant when Both Sensors are Vacant", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("EnableUsA")]
+ public JoinDataComplete EnableUsA = new JoinDataComplete(new JoinData() { JoinNumber = 17, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Enable Ultrasonic Sensor A", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("DisableUsA")]
+ public JoinDataComplete DisableUsA = new JoinDataComplete(new JoinData() { JoinNumber = 18, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Disable Ultrasonic Sensor A", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("EnableUsB")]
+ public JoinDataComplete EnableUsB = new JoinDataComplete(new JoinData() { JoinNumber = 19, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Enable Ultrasonic Sensor B", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("DisableUsB")]
+ public JoinDataComplete DisableUsB = new JoinDataComplete(new JoinData() { JoinNumber = 20, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Disable Ultrasonic Sensor B", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("EnablePir")]
+ public JoinDataComplete EnablePir = new JoinDataComplete(new JoinData() { JoinNumber = 21, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Enable IR Sensor", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("DisablePir")]
+ public JoinDataComplete DisablePir = new JoinDataComplete(new JoinData() { JoinNumber = 22, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Disable IR Sensor", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("IncrementUsInOccupiedState")]
+ public JoinDataComplete IncrementUsInOccupiedState = new JoinDataComplete(new JoinData() { JoinNumber = 23, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Increment US Occupied State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("DecrementUsInOccupiedState")]
+ public JoinDataComplete DecrementUsInOccupiedState = new JoinDataComplete(new JoinData() { JoinNumber = 24, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Decrement US Occupied State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("IncrementUsInVacantState")]
+ public JoinDataComplete IncrementUsInVacantState = new JoinDataComplete(new JoinData() { JoinNumber = 25, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Increment US Vacant State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("DecrementUsInVacantState")]
+ public JoinDataComplete DecrementUsInVacantState = new JoinDataComplete(new JoinData() { JoinNumber = 26, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Decrement US Vacant State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("IncrementPirInOccupiedState")]
+ public JoinDataComplete IncrementPirInOccupiedState = new JoinDataComplete(new JoinData() { JoinNumber = 27, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Increment IR Occupied State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("DecrementPirInOccupiedState")]
+ public JoinDataComplete DecrementPirInOccupiedState = new JoinDataComplete(new JoinData() { JoinNumber = 28, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Decrement IR Occupied State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("IncrementPirInVacantState")]
+ public JoinDataComplete IncrementPirInVacantState = new JoinDataComplete(new JoinData() { JoinNumber = 29, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Increment IR Vacant State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("DecrementPirInVacantState")]
+ public JoinDataComplete DecrementPirInVacantState = new JoinDataComplete(new JoinData() { JoinNumber = 30, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Decrement IR Vacant State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Timeout")]
+ public JoinDataComplete Timeout = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Timeout Value", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("TimeoutLocalFeedback")]
+ public JoinDataComplete TimeoutLocalFeedback = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Local Timeout Value", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("InternalPhotoSensorValue")]
+ public JoinDataComplete InternalPhotoSensorValue = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Internal PhotoSensor Value", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("ExternalPhotoSensorValue")]
+ public JoinDataComplete ExternalPhotoSensorValue = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor External PhotoSensor Value", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("UsSensitivityInOccupiedState")]
+ public JoinDataComplete UsSensitivityInOccupiedState = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Ultrasonic Sensitivity in Occupied State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("UsSensitivityInVacantState")]
+ public JoinDataComplete UsSensitivityInVacantState = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Ultrasonic Sensitivity in Vacant State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("PirSensitivityInOccupiedState")]
+ public JoinDataComplete PirSensitivityInOccupiedState = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor PIR Sensitivity in Occupied State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("PirSensitivityInVacantState")]
+ public JoinDataComplete PirSensitivityInVacantState = new JoinDataComplete(new JoinData() { JoinNumber = 8, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Ultrasonic Sensitivity in Vacant State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("Name")]
+ public JoinDataComplete Name = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Occ Sensor Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+
+
+ public GlsOccupancySensorBaseJoinMap(uint joinStart)
+ : base(joinStart, typeof(GlsOccupancySensorBaseJoinMap))
+ {
+ }
+
+ }
+}
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs
index d3769838..825fc946 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs
@@ -7,113 +7,62 @@ using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges
{
- public class HdMdxxxCEControllerJoinMap : JoinMapBase
+ public class HdMdxxxCEControllerJoinMap : JoinMapBaseAdvanced
{
- #region Digitals
- ///
- /// High when the pair is online
- ///
- public uint IsOnline { get; set; }
- ///
- /// High when the remote end device is online
- ///
- public uint RemoteEndDetected { get; set; }
-
- ///
- /// Sets Auto Route On and provides feedback
- ///
- public uint AutoRouteOn { get; set; }
-
- ///
- /// Sets Auto Route Off and provides feedback
- ///
- public uint AutoRouteOff { get; set; }
-
- ///
- /// Sets Priority Routing On and provides feedback
- ///
- public uint PriorityRoutingOn { get; set; }
-
- ///
- /// Sets Priority Routing Off and provides feedback
- ///
- public uint PriorityRoutingOff { get; set; }
-
- ///
- /// Enables OSD and provides feedback
- ///
- public uint InputOnScreenDisplayEnabled { get; set; }
-
- ///
- /// Disables OSD and provides feedback
- ///
- public uint InputOnScreenDisplayDisabled { get; set; }
-
- ///
- /// Provides Video Sync Detected feedback for each input
- ///
- public uint SyncDetected { get; set; }
- #endregion
-
- #region Analogs
- ///
- /// Sets the video source for the receiver's HDMI out and provides feedback
- ///
- public uint VideoSource { get; set; }
-
- ///
- /// Indicates the number of sources supported by the Tx/Rx pair
- ///
- public uint SourceCount { get; set; }
- #endregion
-
- #region Serials
- ///
- /// Indicates the name of each input port
- ///
- public uint SourceNames { get; set; }
- #endregion
-
- public HdMdxxxCEControllerJoinMap()
- {
- //Digital
- IsOnline = 1;
- RemoteEndDetected = 2;
- AutoRouteOn = 3;
- AutoRouteOff = 4;
- PriorityRoutingOn = 5;
- PriorityRoutingOff = 6;
- InputOnScreenDisplayEnabled = 7;
- InputOnScreenDisplayDisabled = 8;
- SyncDetected = 10; // 11-15
-
- //Analog
- VideoSource = 1;
- SourceCount = 2;
-
- //Serials
- SourceNames = 10; // 11-15
- }
-
- public override void OffsetJoinNumbers(uint joinStart)
- {
- var joinOffset = joinStart - 1;
-
- IsOnline = IsOnline + joinOffset;
- RemoteEndDetected = RemoteEndDetected + joinOffset;
- AutoRouteOn = AutoRouteOn + joinOffset;
- AutoRouteOff = AutoRouteOff + joinOffset;
- PriorityRoutingOn = PriorityRoutingOn + joinOffset;
- PriorityRoutingOff = PriorityRoutingOff + joinOffset;
- InputOnScreenDisplayEnabled = InputOnScreenDisplayEnabled + joinOffset;
- InputOnScreenDisplayDisabled = InputOnScreenDisplayDisabled + joinOffset;
- SyncDetected = SyncDetected + joinOffset;
-
- VideoSource = VideoSource + joinOffset;
- SourceCount = SourceCount + joinOffset;
-
- SourceNames = SourceNames + joinOffset;
+ [JoinName("IsOnline")]
+ public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Device Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("RemoteEndDetected")]
+ public JoinDataComplete RemoteEndDetected = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Device Remote End Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("AutoRouteOn")]
+ public JoinDataComplete AutoRouteOn = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Device Auto Route On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("AutoRouteOff")]
+ public JoinDataComplete AutoRouteOff = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Device Auto Route Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("PriorityRoutingOn")]
+ public JoinDataComplete PriorityRoutingOn = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Device Priority Routing On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("PriorityRoutingOff")]
+ public JoinDataComplete PriorityRoutingOff = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Device Priority Routing Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("InputOnScreenDisplayEnabled")]
+ public JoinDataComplete InputOnScreenDisplayEnabled = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Device Input OSD Enabled", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("InputOnScreenDisplayDisabled")]
+ public JoinDataComplete InputOnScreenDisplayDisabled = new JoinDataComplete(new JoinData() { JoinNumber = 8, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Device Input OSD Disabled", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("SyncDetected")]
+ public JoinDataComplete SyncDetected = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 5 },
+ new JoinMetadata() { Label = "Device Sync Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("VideoSource")]
+ public JoinDataComplete VideoSource = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 5 },
+ new JoinMetadata() { Label = "Device Video Source Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("SourceCount")]
+ public JoinDataComplete SourceCount = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 5 },
+ new JoinMetadata() { Label = "Device Video Source Count", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("SourceNames")]
+ public JoinDataComplete SourceNames = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 5 },
+ new JoinMetadata() { Label = "Device Video Source Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+
+
+ public HdMdxxxCEControllerJoinMap(uint joinStart)
+ : base(joinStart, typeof(HdMdxxxCEControllerJoinMap))
+ {
}
}
}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/IDigitalInputJoinMap.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/IDigitalInputJoinMap.cs
index ba9bcc0f..a9e4ca6b 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/IDigitalInputJoinMap.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/IDigitalInputJoinMap.cs
@@ -7,25 +7,17 @@ using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges
{
- public class IDigitalInputJoinMap : JoinMapBase
+ public class IDigitalInputJoinMap : JoinMapBaseAdvanced
{
- #region Digitals
- ///
- /// Reports the state of the digital input
- ///
- public uint InputState { get; set; }
- #endregion
- public IDigitalInputJoinMap()
- {
- InputState = 1;
- }
-
- public override void OffsetJoinNumbers(uint joinStart)
- {
- var joinOffset = joinStart - 1;
-
- InputState = InputState + joinOffset;
+ [JoinName("InputState")]
+ public JoinDataComplete InputState = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Room Email Url", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+
+ public IDigitalInputJoinMap(uint joinStart)
+ : base(joinStart, typeof(IDigitalInputJoinMap))
+ {
}
}
}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/SetTopBoxControllerJoinMap.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/SetTopBoxControllerJoinMap.cs
index dc634ab3..d2058a2d 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/SetTopBoxControllerJoinMap.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/SetTopBoxControllerJoinMap.cs
@@ -9,204 +9,225 @@ using Crestron.SimplSharp.Reflection;
namespace PepperDash.Essentials.Core.Bridges
{
- public class SetTopBoxControllerJoinMap : JoinMapBase
+ public class SetTopBoxControllerJoinMap : JoinMapBaseAdvanced
{
- #region Digitals
- public uint DvrList { get; set; } //
- public uint Replay { get; set; }
- public uint Up { get; set; } //
- public uint Down { get; set; } //
- public uint Left { get; set; } //
- public uint Right { get; set; } //
- public uint Select { get; set; } //
- public uint Menu { get; set; } //
- public uint Exit { get; set; } //
- public uint Digit0 { get; set; } //
- public uint Digit1 { get; set; } //
- public uint Digit2 { get; set; } //
- public uint Digit3 { get; set; } //
- public uint Digit4 { get; set; } //
- public uint Digit5 { get; set; } //
- public uint Digit6 { get; set; } //
- public uint Digit7 { get; set; } //
- public uint Digit8 { get; set; } //
- public uint Digit9 { get; set; } //
- public uint Dash { get; set; } //
- public uint KeypadEnter { get; set; } //
- public uint ChannelUp { get; set; } //
- public uint ChannelDown { get; set; } //
- public uint LastChannel { get; set; } //
- public uint Guide { get; set; } //
- public uint Info { get; set; } //
- public uint Red { get; set; } //
- public uint Green { get; set; } //
- public uint Yellow { get; set; } //
- public uint Blue { get; set; } //
- public uint ChapMinus { get; set; }
- public uint ChapPlus { get; set; }
- public uint FFwd { get; set; } //
- public uint Pause { get; set; } //
- public uint Play { get; set; } //
- public uint Record { get; set; }
- public uint Rewind { get; set; } //
- public uint Stop { get; set; } //
-
- public uint PowerOn { get; set; } //
- public uint PowerOff { get; set; } //
- public uint PowerToggle { get; set; } //
-
- public uint HasKeypadAccessoryButton1 { get; set; }
- public uint HasKeypadAccessoryButton2 { get; set; }
-
- public uint KeypadAccessoryButton1Press { get; set; }
- public uint KeypadAccessoryButton2Press { get; set; }
-
-
- public uint HasDvr { get; set; }
- public uint HasPresets { get; set; }
- public uint HasNumeric { get; set; }
- public uint HasDpad { get; set; }
-
-
- #endregion
-
- #region Analogs
-
- #endregion
-
- #region Strings
- public uint Name { get; set; }
- public uint LoadPresets { get; set; }
- public uint KeypadAccessoryButton1Label { get; set; }
- public uint KeypadAccessoryButton2Label { get; set; }
-
- #endregion
-
- public SetTopBoxControllerJoinMap()
- {
- PowerOn = 1;
- PowerOff = 2;
- PowerToggle = 3;
-
- HasDpad = 4;
- Up = 4;
- Down = 5;
- Left = 6;
- Right = 7;
- Select = 8;
- Menu = 9;
- Exit = 10;
-
- HasNumeric = 11;
- Digit0 = 11;
- Digit1 = 12;
- Digit2 = 13;
- Digit3 = 14;
- Digit4 = 15;
- Digit5 = 16;
- Digit6 = 17;
- Digit7 = 18;
- Digit8 = 19;
- Digit9 = 20;
- Dash = 21;
- KeypadEnter = 22;
- ChannelUp = 23;
- ChannelDown = 24;
- LastChannel = 25;
-
- Guide = 26;
- Info = 27;
- Red = 28;
- Green = 29;
- Yellow = 30;
- Blue = 31;
-
- HasDvr = 32;
- DvrList = 32;
- Play = 33;
- Pause = 34;
- Stop = 35;
- FFwd = 36;
- Rewind = 37;
- ChapPlus = 38;
- ChapMinus = 39;
- Replay = 40;
- Record = 41;
- HasKeypadAccessoryButton1 = 42;
- KeypadAccessoryButton1Press = 42;
- HasKeypadAccessoryButton2 = 43;
- KeypadAccessoryButton2Press = 43;
-
- Name = 1;
- KeypadAccessoryButton1Label = 42;
- KeypadAccessoryButton2Label = 43;
-
- LoadPresets = 50;
- }
-
- public override void OffsetJoinNumbers(uint joinStart)
- {
- var joinOffset = joinStart - 1;
-
- PowerOn += joinOffset;
- PowerOff += joinOffset;
- PowerToggle += joinOffset;
-
- HasDpad += joinOffset;
- Up += joinOffset;
- Down += joinOffset;
- Left += joinOffset;
- Right += joinOffset;
- Select += joinOffset;
- Menu += joinOffset;
- Exit += joinOffset;
-
- HasNumeric += joinOffset;
- Digit0 += joinOffset;
- Digit1 += joinOffset;
- Digit2 += joinOffset;
- Digit3 += joinOffset;
- Digit4 += joinOffset;
- Digit5 += joinOffset;
- Digit6 += joinOffset;
- Digit7 += joinOffset;
- Digit8 += joinOffset;
- Digit9 += joinOffset;
- Dash += joinOffset;
- KeypadEnter += joinOffset;
- ChannelUp += joinOffset;
- ChannelDown += joinOffset;
- LastChannel += joinOffset;
-
- Guide += joinOffset;
- Info += joinOffset;
- Red += joinOffset;
- Green += joinOffset;
- Yellow += joinOffset;
- Blue += joinOffset;
-
- HasDvr += joinOffset;
- DvrList += joinOffset;
- Play += joinOffset;
- Pause += joinOffset;
- Stop += joinOffset;
- FFwd += joinOffset;
- Rewind += joinOffset;
- ChapPlus += joinOffset;
- ChapMinus += joinOffset;
- Replay += joinOffset;
- Record += joinOffset;
- HasKeypadAccessoryButton1 += joinOffset;
- KeypadAccessoryButton1Press += joinOffset;
- HasKeypadAccessoryButton2 += joinOffset;
- KeypadAccessoryButton2Press += joinOffset;
-
- Name += joinOffset;
- KeypadAccessoryButton1Label += joinOffset;
- KeypadAccessoryButton2Label += joinOffset;
-
- LoadPresets += joinOffset;
- }
-
+ [JoinName("PowerOn")]
+ public JoinDataComplete PowerOn = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Power On", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("PowerOff")]
+ public JoinDataComplete PowerOff = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Power Off", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("PowerToggle")]
+ public JoinDataComplete PowerToggle = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Power Toggle", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("HasDpad")]
+ public JoinDataComplete HasDpad = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Has DPad", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Up")]
+ public JoinDataComplete Up = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Nav Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Down")]
+ public JoinDataComplete Down = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Nav Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Left")]
+ public JoinDataComplete Left = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Nav Left", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Right")]
+ public JoinDataComplete Right = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Nav Right", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Select")]
+ public JoinDataComplete Select = new JoinDataComplete(new JoinData() { JoinNumber = 8, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Select", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Menu")]
+ public JoinDataComplete Menu = new JoinDataComplete(new JoinData() { JoinNumber = 9, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Menu", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Exit")]
+ public JoinDataComplete Exit = new JoinDataComplete(new JoinData() { JoinNumber = 10, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Exit", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("HasNumeric")]
+ public JoinDataComplete HasNumeric = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Has Numeric", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Digit0")]
+ public JoinDataComplete Digit0 = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Digit 0", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Digit1")]
+ public JoinDataComplete Digit1 = new JoinDataComplete(new JoinData() { JoinNumber = 12, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Digit 1", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Digit2")]
+ public JoinDataComplete Digit2 = new JoinDataComplete(new JoinData() { JoinNumber = 13, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Digit 2", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Digit3")]
+ public JoinDataComplete Digit3 = new JoinDataComplete(new JoinData() { JoinNumber = 14, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Digit 3", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Digit4")]
+ public JoinDataComplete Digit4 = new JoinDataComplete(new JoinData() { JoinNumber = 15, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Digit 4", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Digit5")]
+ public JoinDataComplete Digit5 = new JoinDataComplete(new JoinData() { JoinNumber = 16, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Digit 5", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Digit6")]
+ public JoinDataComplete Digit6 = new JoinDataComplete(new JoinData() { JoinNumber = 17, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Digit 6", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Digit7")]
+ public JoinDataComplete Digit7 = new JoinDataComplete(new JoinData() { JoinNumber = 18, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Digit 7", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Digit8")]
+ public JoinDataComplete Digit8 = new JoinDataComplete(new JoinData() { JoinNumber = 19, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Digit 8", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Digit9")]
+ public JoinDataComplete Digit9 = new JoinDataComplete(new JoinData() { JoinNumber = 20, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Digit 9", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Dash")]
+ public JoinDataComplete Dash = new JoinDataComplete(new JoinData() { JoinNumber = 21, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Dash", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("KeypadEnter")]
+ public JoinDataComplete KeypadEnter = new JoinDataComplete(new JoinData() { JoinNumber = 22, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Keypad Enter", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("ChannelUp")]
+ public JoinDataComplete ChannelUp = new JoinDataComplete(new JoinData() { JoinNumber = 23, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Channel Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("ChannelDown")]
+ public JoinDataComplete ChannelDown = new JoinDataComplete(new JoinData() { JoinNumber = 24, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Channel Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("LastChannel")]
+ public JoinDataComplete LastChannel = new JoinDataComplete(new JoinData() { JoinNumber = 25, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Last Channel", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Guide")]
+ public JoinDataComplete Guide = new JoinDataComplete(new JoinData() { JoinNumber = 26, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Guide", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Info")]
+ public JoinDataComplete Info = new JoinDataComplete(new JoinData() { JoinNumber = 27, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Info", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Red")]
+ public JoinDataComplete Red = new JoinDataComplete(new JoinData() { JoinNumber = 28, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Red", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Green")]
+ public JoinDataComplete Green = new JoinDataComplete(new JoinData() { JoinNumber = 29, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Green", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Yellow")]
+ public JoinDataComplete Yellow = new JoinDataComplete(new JoinData() { JoinNumber = 30, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Yellow", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Blue")]
+ public JoinDataComplete Blue = new JoinDataComplete(new JoinData() { JoinNumber = 31, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Blue", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("HasDvr")]
+ public JoinDataComplete HasDvr = new JoinDataComplete(new JoinData() { JoinNumber = 32, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Has DVR", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("DvrList")]
+ public JoinDataComplete DvrList = new JoinDataComplete(new JoinData() { JoinNumber = 32, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB DvrList", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Play")]
+ public JoinDataComplete Play = new JoinDataComplete(new JoinData() { JoinNumber = 33, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Play", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Pause")]
+ public JoinDataComplete Pause = new JoinDataComplete(new JoinData() { JoinNumber = 34, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Pause", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Stop")]
+ public JoinDataComplete Stop = new JoinDataComplete(new JoinData() { JoinNumber = 35, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Stop", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("FFwd")]
+ public JoinDataComplete FFwd = new JoinDataComplete(new JoinData() { JoinNumber = 36, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB FFwd", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Rewind")]
+ public JoinDataComplete Rewind = new JoinDataComplete(new JoinData() { JoinNumber = 37, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Rewind", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("ChapPlus")]
+ public JoinDataComplete ChapPlus = new JoinDataComplete(new JoinData() { JoinNumber = 38, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Chapter Plus", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("ChapMinus")]
+ public JoinDataComplete ChapMinus = new JoinDataComplete(new JoinData() { JoinNumber = 39, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Chapter Minus", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Replay")]
+ public JoinDataComplete Replay = new JoinDataComplete(new JoinData() { JoinNumber = 40, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Replay", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Record")]
+ public JoinDataComplete Record = new JoinDataComplete(new JoinData() { JoinNumber = 41, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Record", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("HasKeypadAccessoryButton1")]
+ public JoinDataComplete HasKeypadAccessoryButton1 = new JoinDataComplete(new JoinData() { JoinNumber = 42, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Has Keypad Accessory Button 1", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("HasKeypadAccessoryButton2")]
+ public JoinDataComplete HasKeypadAccessoryButton2 = new JoinDataComplete(new JoinData() { JoinNumber = 43, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Has Keypad Accessory Button 2", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("KeypadAccessoryButton1Press")]
+ public JoinDataComplete KeypadAccessoryButton1Press = new JoinDataComplete(new JoinData() { JoinNumber = 42, JoinSpan = 2 },
+ new JoinMetadata() { Label = "STB Keypad Accessory Button 1 Press", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("KeypadAccessoryButton2Press")]
+ public JoinDataComplete KeypadAccessoryButton2Press = new JoinDataComplete(new JoinData() { JoinNumber = 43, JoinSpan = 2 },
+ new JoinMetadata() { Label = "STB Keypad Accessory Button 2 Press", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Name")]
+ public JoinDataComplete Name = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("KeypadAccessoryButton1Label")]
+ public JoinDataComplete KeypadAccessoryButton1Label = new JoinDataComplete(new JoinData() { JoinNumber = 42, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Keypad Accessory Button 1 Label", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("KeypadAccessoryButton2Label")]
+ public JoinDataComplete KeypadAccessoryButton2Label = new JoinDataComplete(new JoinData() { JoinNumber = 43, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Keypad Accessory Button 1 Label", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("LoadPresets")]
+ public JoinDataComplete LoadPresets = new JoinDataComplete(new JoinData() { JoinNumber = 50, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Load Presets", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("HasPresets")]
+ public JoinDataComplete HasPresets = new JoinDataComplete(new JoinData() { JoinNumber = 50, JoinSpan = 1 },
+ new JoinMetadata() { Label = "STB Load Presets", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+
+
+ public SetTopBoxControllerJoinMap(uint joinStart)
+ : base(joinStart, typeof(SetTopBoxControllerJoinMap))
+ {
+ }
}
}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/StatusSignControllerJoinMap.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/StatusSignControllerJoinMap.cs
index 7efd049b..fc699c02 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/StatusSignControllerJoinMap.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/StatusSignControllerJoinMap.cs
@@ -4,46 +4,45 @@ using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges
{
- public class StatusSignControllerJoinMap:JoinMapBase
+ public class StatusSignControllerJoinMap : JoinMapBaseAdvanced
{
- public uint IsOnline { get; set; }
- public uint Name { get; set; }
- public uint RedLed { get; set; }
- public uint GreenLed { get; set; }
- public uint BlueLed { get; set; }
- public uint RedControl { get; set; }
- public uint GreenControl { get; set; }
- public uint BlueControl { get; set; }
-
- public StatusSignControllerJoinMap()
- {
- //digital
- IsOnline = 1;
- RedControl = 2;
- GreenControl = 3;
- BlueControl = 4;
-
- //Analog
- RedLed = 2;
- GreenLed = 3;
- BlueLed = 4;
-
- //string
- Name = 1;
-
-
+ [JoinName("IsOnline")]
+ public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Status Sign Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("Name")]
+ public JoinDataComplete Name = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Status Sign Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("RedControl")]
+ public JoinDataComplete RedControl = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Status Red LED Enable / Disable", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("RedLed")]
+ public JoinDataComplete RedLed = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Status Red LED Intensity", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("GreenControl")]
+ public JoinDataComplete GreenControl = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Status Green LED Enable / Disable", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("GreenLed")]
+ public JoinDataComplete GreenLed = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Status Green LED Intensity", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("BlueControl")]
+ public JoinDataComplete BlueControl = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Status Blue LED Enable / Disable", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("BlueLed")]
+ public JoinDataComplete BlueLed = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Status Blue LED Intensity", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
+
+
+ public StatusSignControllerJoinMap(uint joinStart)
+ : base(joinStart, typeof(StatusSignControllerJoinMap))
+ {
}
- public override void OffsetJoinNumbers(uint joinStart)
- {
- var joinOffset = joinStart - 1;
- var properties =
- GetType().GetCType().GetProperties().Where(p => p.PropertyType == typeof (uint)).ToList();
-
- foreach (var propertyInfo in properties)
- {
- propertyInfo.SetValue(this, (uint) propertyInfo.GetValue(this, null) + joinOffset, null);
- }
- }
}
}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/SystemMonitorJoinMap.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/SystemMonitorJoinMap.cs
index b2fd3dfd..a021eaaa 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/SystemMonitorJoinMap.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/SystemMonitorJoinMap.cs
@@ -1,225 +1,141 @@
-using PepperDash.Essentials.Core;
-
-namespace PepperDash.Essentials.Core.Bridges
-{
- public class SystemMonitorJoinMap : JoinMapBase
- {
- ///
- /// Offset to indicate where the range of iterated program joins will start
- ///
- public uint ProgramStartJoin { get; set; }
-
- ///
- /// Offset to indicate where the range of iterated Ethernet joins will start
- ///
- public uint EthernetStartJoin { get; set; }
-
- ///
- /// Offset between each program join set
- ///
- public uint ProgramOffsetJoin { get; set; }
-
- ///
- /// Offset between each Ethernet Interface join set
- ///
- public uint EthernetOffsetJoin { 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; }
- ///
- /// Reports the controller serial number
- ///
- public uint SerialNumber { get; set; }
- ///
- /// Reports the controller model
- ///
- public uint Model { get; set; }
- ///
- /// Reports the Host name set on the corresponding interface
- ///
- public uint HostName { get; set; }
- ///
- /// Reports the Current IP address set on the corresponding interface. If DHCP is enabled, this will be the DHCP assigned address.
- ///
- public uint CurrentIpAddress { get; set; }
- ///
- /// Reporst the Current Default Gateway set on the corresponding interface. If DHCP is enabled, this will be the DHCP assigned gateway
- ///
- public uint CurrentDefaultGateway { get; set; }
- ///
- /// Reports the Current Subnet Mask set on the corresponding interface. If DHCP is enabled, this will be the DHCP assigned subnet mask
- ///
- public uint CurrentSubnetMask { get; set; }
- ///
- /// Reports the Static IP address set on the corresponding interface. If DHCP is disabled, this will match the Current IP address
- ///
- public uint StaticIpAddress { get; set; }
- ///
- /// Reporst the Static Default Gateway set on the corresponding interface. If DHCP is disabled, this will match the Current gateway
- ///
- public uint StaticDefaultGateway { get; set; }
- ///
- /// Reports the Current Subnet Mask set on the corresponding interface. If DHCP is enabled, this will be the DHCP assigned subnet mask
- ///
- public uint StaticSubnetMask { get; set; }
- ///
- /// Reports the current DomainFeedback on the corresponding interface
- ///
- public uint Domain { get; set; }
- ///
- /// Reports the current DNS Servers on the corresponding interface
- ///
- public uint DnsServer { get; set; }
- ///
- /// Reports the MAC Address of the corresponding interface
- ///
- public uint MacAddress { get; set; }
- ///
- /// Reports the DHCP Status of the corresponding interface
- ///
- public uint DhcpStatus { get; set; }
-
- ///
- /// Reports the current uptime. Updated in 5 minute intervals.
- ///
- public uint Uptime { get; set; }
-
- ///
- /// Reports the date of the last boot
- ///
- public uint LastBoot { get; set; }
- #endregion
-
- public SystemMonitorJoinMap()
- {
- TimeZone = 1;
-
- TimeZoneName = 1;
- IOControllerVersion = 2;
- SnmpAppVersion = 3;
- BACnetAppVersion = 4;
- ControllerVersion = 5;
- SerialNumber = 6;
- Model = 7;
- Uptime = 8;
- LastBoot = 9;
-
-
- 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;
-
- EthernetStartJoin = 75;
-
- EthernetOffsetJoin = 15;
-
- // Offset in groups of 15
- HostName = 1;
- CurrentIpAddress = 2;
- CurrentSubnetMask = 3;
- CurrentDefaultGateway = 4;
- StaticIpAddress = 5;
- StaticSubnetMask = 6;
- StaticDefaultGateway = 7;
- Domain = 8;
- DnsServer = 9;
- MacAddress = 10;
- DhcpStatus = 11;
- }
-
- 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;
- EthernetStartJoin = EthernetStartJoin + joinOffset;
- }
- }
+using PepperDash.Essentials.Core;
+
+namespace PepperDash.Essentials.Core.Bridges
+{
+ public class SystemMonitorJoinMap : JoinMapBaseAdvanced
+ {
+ [JoinName("TimeZone")]
+ public JoinDataComplete TimeZone = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Timezone", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
+
+ [JoinName("TimeZoneName")]
+ public JoinDataComplete TimeZoneName = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Timezone Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("IOControllerVersion")]
+ public JoinDataComplete IOControllerVersion = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor IO Controller Version", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("SnmpAppVersion")]
+ public JoinDataComplete SnmpAppVersion = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor SNMP App Version", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("BACnetAppVersion")]
+ public JoinDataComplete BACnetAppVersion = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor BACNet App Version", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("ControllerVersion")]
+ public JoinDataComplete ControllerVersion = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Controller Version", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("SerialNumber")]
+ public JoinDataComplete SerialNumber = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Serial Number", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("Model")]
+ public JoinDataComplete Model = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Model", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("Uptime")]
+ public JoinDataComplete Uptime = new JoinDataComplete(new JoinData() { JoinNumber = 8, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Uptime", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("LastBoot")]
+ public JoinDataComplete LastBoot = new JoinDataComplete(new JoinData() { JoinNumber = 9, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Last Boot", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("ProgramOffsetJoin")]
+ public JoinDataComplete ProgramOffsetJoin = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
+ new JoinMetadata() { Label = "All Program Data is offset between slots by 5 - First Joins Start at 11", JoinCapabilities = eJoinCapabilities.None, JoinType = eJoinType.None });
+
+ [JoinName("ProgramStart")]
+ public JoinDataComplete ProgramStart = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Program Start / Fb", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("ProgramStop")]
+ public JoinDataComplete ProgramStop = new JoinDataComplete(new JoinData() { JoinNumber = 12, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Program Stop / Fb", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("ProgramRegister")]
+ public JoinDataComplete ProgramRegister = new JoinDataComplete(new JoinData() { JoinNumber = 13, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Program Register / Fb", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("ProgramUnregister")]
+ public JoinDataComplete ProgramUnregister = new JoinDataComplete(new JoinData() { JoinNumber = 14, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Program UnRegister / Fb", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
+
+ [JoinName("ProgramName")]
+ public JoinDataComplete ProgramName = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Program Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("ProgramCompiledTime")]
+ public JoinDataComplete ProgramCompiledTime = new JoinDataComplete(new JoinData() { JoinNumber = 12, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Program Compile Time", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("ProgramCrestronDatabaseVersion")]
+ public JoinDataComplete ProgramCrestronDatabaseVersion = new JoinDataComplete(new JoinData() { JoinNumber = 13, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Program Database Version", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("ProgramEnvironmentVersion")]
+ public JoinDataComplete ProgramEnvironmentVersion = new JoinDataComplete(new JoinData() { JoinNumber = 14, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Program Environment Version", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("AggregatedProgramInfo")]
+ public JoinDataComplete AggregatedProgramInfo = new JoinDataComplete(new JoinData() { JoinNumber = 15, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Program Aggregate Info Json", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("EthernetOffsetJoin")]
+ public JoinDataComplete EthernetOffsetJoin = new JoinDataComplete(new JoinData() { JoinNumber = 15, JoinSpan = 1 },
+ new JoinMetadata() { Label = "All Ethernet Data is offset between Nics by 5 - First Joins Start at 76", JoinCapabilities = eJoinCapabilities.None, JoinType = eJoinType.None });
+
+ [JoinName("HostName")]
+ public JoinDataComplete HostName = new JoinDataComplete(new JoinData() { JoinNumber = 76, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Ethernet Hostname", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("CurrentIpAddress")]
+ public JoinDataComplete CurrentIpAddress = new JoinDataComplete(new JoinData() { JoinNumber = 77, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Ethernet Current Ip Address", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("CurrentSubnetMask")]
+ public JoinDataComplete CurrentSubnetMask = new JoinDataComplete(new JoinData() { JoinNumber = 78, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Ethernet Current Subnet Mask", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("CurrentDefaultGateway")]
+ public JoinDataComplete CurrentDefaultGateway = new JoinDataComplete(new JoinData() { JoinNumber = 79, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Ethernet Current Default Gateway", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("StaticIpAddress")]
+ public JoinDataComplete StaticIpAddress = new JoinDataComplete(new JoinData() { JoinNumber = 80, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Ethernet Static Ip Address", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("StaticSubnetMask")]
+ public JoinDataComplete StaticSubnetMask = new JoinDataComplete(new JoinData() { JoinNumber = 81, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Ethernet Static Subnet Mask", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("StaticDefaultGateway")]
+ public JoinDataComplete StaticDefaultGateway = new JoinDataComplete(new JoinData() { JoinNumber = 82, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Ethernet Static Default Gateway", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("Domain")]
+ public JoinDataComplete Domain = new JoinDataComplete(new JoinData() { JoinNumber = 83, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Ethernet Domain", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("DnsServer")]
+ public JoinDataComplete DnsServer = new JoinDataComplete(new JoinData() { JoinNumber = 84, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Ethernet Dns Server", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("MacAddress")]
+ public JoinDataComplete MacAddress = new JoinDataComplete(new JoinData() { JoinNumber = 85, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Ethernet Mac Address", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+ [JoinName("DhcpStatus")]
+ public JoinDataComplete DhcpStatus = new JoinDataComplete(new JoinData() { JoinNumber = 86, JoinSpan = 1 },
+ new JoinMetadata() { Label = "Processor Ethernet Dhcp Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
+
+
+ public SystemMonitorJoinMap(uint joinStart)
+ : base(joinStart, typeof(SystemMonitorJoinMap))
+ {
+ }
+ }
}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/GenericComm.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/GenericComm.cs
index 523ffb78..86e59be2 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/GenericComm.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/GenericComm.cs
@@ -67,6 +67,8 @@ namespace PepperDash.Essentials.Core
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
+ bridge.AddJoinMap(Key, joinMap);
+
if (CommPort == null)
{
Debug.Console(1, this, "Unable to link device '{0}'. CommPort is null", Key);
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/C2nRts/C2nRthsController.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/C2nRts/C2nRthsController.cs
index 0bc48d80..728b2487 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/C2nRts/C2nRthsController.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/C2nRts/C2nRthsController.cs
@@ -1,90 +1,92 @@
-using System.Collections.Generic;
-using Crestron.SimplSharpPro;
-using Crestron.SimplSharpPro.DeviceSupport;
-using Crestron.SimplSharpPro.GeneralIO;
-using Newtonsoft.Json;
-using PepperDash.Core;
-using PepperDash.Essentials.Core.Bridges;
-using PepperDash.Essentials.Core.Config;
-
-
-namespace PepperDash.Essentials.Core.CrestronIO
-{
- [Description("Wrapper class for the C2N-RTHS sensor")]
- public class C2nRthsController : CrestronGenericBridgeableBaseDevice
- {
- private readonly C2nRths _device;
-
- public IntFeedback TemperatureFeedback { get; private set; }
- public IntFeedback HumidityFeedback { get; private set; }
-
- public C2nRthsController(string key, string name, GenericBase hardware) : base(key, name, hardware)
- {
- _device = hardware as C2nRths;
-
- TemperatureFeedback = new IntFeedback(() => _device.TemperatureFeedback.UShortValue);
- HumidityFeedback = new IntFeedback(() => _device.HumidityFeedback.UShortValue);
-
- if (_device != null) _device.BaseEvent += DeviceOnBaseEvent;
- }
-
- private void DeviceOnBaseEvent(GenericBase device, BaseEventArgs args)
- {
- switch (args.EventId)
- {
- case C2nRths.TemperatureFeedbackEventId:
- TemperatureFeedback.FireUpdate();
- break;
- case C2nRths.HumidityFeedbackEventId:
- HumidityFeedback.FireUpdate();
- break;
- }
- }
-
- public void SetTemperatureFormat(bool setToC)
- {
- _device.TemperatureFormat.BoolValue = setToC;
- }
-
- public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
- {
- var joinMap = new C2nRthsControllerJoinMap();
-
- var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
-
- if (!string.IsNullOrEmpty(joinMapSerialized))
- joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
-
- joinMap.OffsetJoinNumbers(joinStart);
-
- Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
-
-
- trilist.SetBoolSigAction(joinMap.TemperatureFormat, SetTemperatureFormat);
-
- IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
- TemperatureFeedback.LinkInputSig(trilist.UShortInput[joinMap.Temperature]);
- HumidityFeedback.LinkInputSig(trilist.UShortInput[joinMap.Humidity]);
-
- trilist.StringInput[joinMap.Name].StringValue = Name;
- }
- }
-
- public class C2nRthsControllerFactory : EssentialsDeviceFactory
- {
- public C2nRthsControllerFactory()
- {
- TypeNames = new List() { "c2nrths" };
- }
-
- public override EssentialsDevice BuildDevice(DeviceConfig dc)
- {
- Debug.Console(1, "Factory Attempting to create new C2N-RTHS Device");
-
- var control = CommFactory.GetControlPropertiesConfig(dc);
- var cresnetId = control.CresnetIdInt;
-
- return new C2nRthsController(dc.Key, dc.Name, new C2nRths(cresnetId, Global.ControlSystem));
- }
- }
+using System.Collections.Generic;
+using Crestron.SimplSharpPro;
+using Crestron.SimplSharpPro.DeviceSupport;
+using Crestron.SimplSharpPro.GeneralIO;
+using Newtonsoft.Json;
+using PepperDash.Core;
+using PepperDash.Essentials.Core.Bridges;
+using PepperDash.Essentials.Core.Config;
+
+
+namespace PepperDash.Essentials.Core.CrestronIO
+{
+ [Description("Wrapper class for the C2N-RTHS sensor")]
+ public class C2nRthsController : CrestronGenericBridgeableBaseDevice
+ {
+ private readonly C2nRths _device;
+
+ public IntFeedback TemperatureFeedback { get; private set; }
+ public IntFeedback HumidityFeedback { get; private set; }
+
+ public C2nRthsController(string key, string name, GenericBase hardware) : base(key, name, hardware)
+ {
+ _device = hardware as C2nRths;
+
+ TemperatureFeedback = new IntFeedback(() => _device.TemperatureFeedback.UShortValue);
+ HumidityFeedback = new IntFeedback(() => _device.HumidityFeedback.UShortValue);
+
+ if (_device != null) _device.BaseEvent += DeviceOnBaseEvent;
+ }
+
+ private void DeviceOnBaseEvent(GenericBase device, BaseEventArgs args)
+ {
+ switch (args.EventId)
+ {
+ case C2nRths.TemperatureFeedbackEventId:
+ TemperatureFeedback.FireUpdate();
+ break;
+ case C2nRths.HumidityFeedbackEventId:
+ HumidityFeedback.FireUpdate();
+ break;
+ }
+ }
+
+ public void SetTemperatureFormat(bool setToC)
+ {
+ _device.TemperatureFormat.BoolValue = setToC;
+ }
+
+ public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
+ {
+ var joinMap = new C2nRthsControllerJoinMap(joinStart);
+
+ var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
+
+ if (!string.IsNullOrEmpty(joinMapSerialized))
+ joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
+
+ bridge.AddJoinMap(Key, joinMap);
+
+ Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
+
+
+ trilist.SetBoolSigAction(joinMap.TemperatureFormat.JoinNumber, SetTemperatureFormat);
+
+
+
+ IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
+ TemperatureFeedback.LinkInputSig(trilist.UShortInput[joinMap.Temperature.JoinNumber]);
+ HumidityFeedback.LinkInputSig(trilist.UShortInput[joinMap.Humidity.JoinNumber]);
+
+ trilist.StringInput[joinMap.Name.JoinNumber].StringValue = Name;
+ }
+ }
+
+ public class C2nRthsControllerFactory : EssentialsDeviceFactory
+ {
+ public C2nRthsControllerFactory()
+ {
+ TypeNames = new List() { "c2nrths" };
+ }
+
+ public override EssentialsDevice BuildDevice(DeviceConfig dc)
+ {
+ Debug.Console(1, "Factory Attempting to create new C2N-RTHS Device");
+
+ var control = CommFactory.GetControlPropertiesConfig(dc);
+ var cresnetId = control.CresnetIdInt;
+
+ return new C2nRthsController(dc.Key, dc.Name, new C2nRths(cresnetId, Global.ControlSystem));
+ }
+ }
}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/GenericDigitalInputDevice.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/GenericDigitalInputDevice.cs
index 3d3383e9..774c7490 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/GenericDigitalInputDevice.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/GenericDigitalInputDevice.cs
@@ -44,22 +44,22 @@ namespace PepperDash.Essentials.Core.CrestronIO
}
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
- {
- var joinMap = new IDigitalInputJoinMap();
+ {
+ var joinMap = new IDigitalInputJoinMap(joinStart);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
- joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
-
- joinMap.OffsetJoinNumbers(joinStart);
+ joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
+
+ bridge.AddJoinMap(Key, joinMap);
try
{
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
// Link feedback for input state
- InputStateFeedback.LinkInputSig(trilist.BooleanInput[joinMap.InputState]);
+ InputStateFeedback.LinkInputSig(trilist.BooleanInput[joinMap.InputState.JoinNumber]);
}
catch (Exception e)
{
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Relay/GenericRelayDevice.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Relay/GenericRelayDevice.cs
index aac9de44..b79a8253 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Relay/GenericRelayDevice.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Relay/GenericRelayDevice.cs
@@ -70,15 +70,15 @@ namespace PepperDash.Essentials.Core.CrestronIO
#endregion
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
- {
- var joinMap = new GenericRelayControllerJoinMap();
+ {
+ var joinMap = new GenericRelayControllerJoinMap(joinStart);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
- joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
-
- joinMap.OffsetJoinNumbers(joinStart);
+ joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
+
+ bridge.AddJoinMap(Key, joinMap);
if (RelayOutput == null)
{
@@ -88,7 +88,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
- trilist.SetBoolSigAction(joinMap.Relay, b =>
+ trilist.SetBoolSigAction(joinMap.Relay.JoinNumber, b =>
{
if (b)
CloseRelay();
@@ -98,7 +98,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
// feedback for relay state
- OutputIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Relay]);
+ OutputIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Relay.JoinNumber]);
}
}
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/StatusSign/StatusSignController.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/StatusSign/StatusSignController.cs
index ca679bce..df8f778a 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/StatusSign/StatusSignController.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/StatusSign/StatusSignController.cs
@@ -110,53 +110,53 @@ namespace PepperDash.Essentials.Core.CrestronIO
}
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
- {
- var joinMap = new StatusSignControllerJoinMap();
+ {
+ var joinMap = new StatusSignControllerJoinMap(joinStart);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
- joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
-
- joinMap.OffsetJoinNumbers(joinStart);
+ joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
+
+ bridge.AddJoinMap(Key, joinMap);
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
- trilist.SetBoolSigAction(joinMap.RedControl, b => EnableControl(trilist, joinMap, this));
- trilist.SetBoolSigAction(joinMap.GreenControl, b => EnableControl(trilist, joinMap, this));
- trilist.SetBoolSigAction(joinMap.BlueControl, b => EnableControl(trilist, joinMap, this));
-
- trilist.SetUShortSigAction(joinMap.RedLed, u => SetColor(trilist, joinMap, this));
- trilist.SetUShortSigAction(joinMap.GreenLed, u => SetColor(trilist, joinMap, this));
- trilist.SetUShortSigAction(joinMap.BlueLed, u => SetColor(trilist, joinMap, this));
-
- trilist.StringInput[joinMap.Name].StringValue = Name;
-
- IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
- RedLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RedControl]);
- BlueLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.BlueControl]);
- GreenLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.GreenControl]);
-
- RedLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.RedLed]);
- BlueLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.BlueLed]);
- GreenLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.GreenLed]);
+ trilist.SetBoolSigAction(joinMap.RedControl.JoinNumber, b => EnableControl(trilist, joinMap, this));
+ trilist.SetBoolSigAction(joinMap.GreenControl.JoinNumber, b => EnableControl(trilist, joinMap, this));
+ trilist.SetBoolSigAction(joinMap.BlueControl.JoinNumber, b => EnableControl(trilist, joinMap, this));
+
+ trilist.SetUShortSigAction(joinMap.RedLed.JoinNumber, u => SetColor(trilist, joinMap, this));
+ trilist.SetUShortSigAction(joinMap.GreenLed.JoinNumber, u => SetColor(trilist, joinMap, this));
+ trilist.SetUShortSigAction(joinMap.BlueLed.JoinNumber, u => SetColor(trilist, joinMap, this));
+
+ trilist.StringInput[joinMap.Name.JoinNumber].StringValue = Name;
+
+ IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
+ RedLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RedControl.JoinNumber]);
+ BlueLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.BlueControl.JoinNumber]);
+ GreenLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.GreenControl.JoinNumber]);
+
+ RedLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.RedLed.JoinNumber]);
+ BlueLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.BlueLed.JoinNumber]);
+ GreenLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.GreenLed.JoinNumber]);
}
private static void EnableControl(BasicTriList triList, StatusSignControllerJoinMap joinMap,
StatusSignController device)
- {
- var redEnable = triList.BooleanOutput[joinMap.RedControl].BoolValue;
- var greenEnable = triList.BooleanOutput[joinMap.GreenControl].BoolValue;
- var blueEnable = triList.BooleanOutput[joinMap.BlueControl].BoolValue;
+ {
+ var redEnable = triList.BooleanOutput[joinMap.RedControl.JoinNumber].BoolValue;
+ var greenEnable = triList.BooleanOutput[joinMap.GreenControl.JoinNumber].BoolValue;
+ var blueEnable = triList.BooleanOutput[joinMap.BlueControl.JoinNumber].BoolValue;
device.EnableLedControl(redEnable, greenEnable, blueEnable);
}
private static void SetColor(BasicTriList triList, StatusSignControllerJoinMap joinMap,
StatusSignController device)
- {
- var redBrightness = triList.UShortOutput[joinMap.RedLed].UShortValue;
- var greenBrightness = triList.UShortOutput[joinMap.GreenLed].UShortValue;
- var blueBrightness = triList.UShortOutput[joinMap.BlueLed].UShortValue;
+ {
+ var redBrightness = triList.UShortOutput[joinMap.RedLed.JoinNumber].UShortValue;
+ var greenBrightness = triList.UShortOutput[joinMap.GreenLed.JoinNumber].UShortValue;
+ var blueBrightness = triList.UShortOutput[joinMap.BlueLed.JoinNumber].UShortValue;
device.SetColor(redBrightness, greenBrightness, blueBrightness);
}
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Display/DisplayBase.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Display/DisplayBase.cs
index 9f528322..90ca9e05 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Display/DisplayBase.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Display/DisplayBase.cs
@@ -126,7 +126,9 @@ namespace PepperDash.Essentials.Core
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
- joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
+ joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
+
+ bridge.AddJoinMap(Key, joinMap);
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
Debug.Console(0, "Linking to Display: {0}", displayDevice.Name);
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Lighting/LightingBase.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Lighting/LightingBase.cs
index c22745c0..66e90d97 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Lighting/LightingBase.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Lighting/LightingBase.cs
@@ -72,36 +72,33 @@ namespace PepperDash.Essentials.Core.Lighting
protected GenericLightingJoinMap LinkLightingToApi(LightingBase lightingDevice, BasicTriList trilist, uint joinStart,
string joinMapKey, EiscApiAdvanced bridge)
- {
- var joinMap = new GenericLightingJoinMap();
+ {
+ var joinMap = new GenericLightingJoinMap(joinStart);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
- joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
-
- joinMap.OffsetJoinNumbers(joinStart);
+ joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
+
+ bridge.AddJoinMap(Key, joinMap);
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
Debug.Console(0, "Linking to Lighting Type {0}", lightingDevice.GetType().Name.ToString());
- // GenericLighitng Actions & FeedBack
- trilist.SetUShortSigAction(joinMap.SelectScene, u => lightingDevice.SelectScene(lightingDevice.LightingScenes[u]));
+ // GenericLighitng Actions & FeedBack
+ trilist.SetUShortSigAction(joinMap.SelectScene.JoinNumber, u => lightingDevice.SelectScene(lightingDevice.LightingScenes[u]));
- var sceneIndex = 1;
+ var sceneIndex = 0;
foreach (var scene in lightingDevice.LightingScenes)
- {
- var tempIndex = sceneIndex - 1;
- trilist.SetSigTrueAction((uint)(joinMap.LightingSceneOffset + sceneIndex), () => lightingDevice.SelectScene(lightingDevice.LightingScenes[tempIndex]));
- scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)]);
- trilist.StringInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)].StringValue = scene.Name;
- trilist.BooleanInput[(uint)(joinMap.ButtonVisibilityOffset + sceneIndex)].BoolValue = true;
+ {
+ trilist.SetSigTrueAction((uint)(joinMap.SelectSceneDirect.JoinNumber + sceneIndex), () => lightingDevice.SelectScene(lightingDevice.LightingScenes[sceneIndex]));
+ scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.SelectSceneDirect.JoinNumber + sceneIndex)]);
+ trilist.StringInput[(uint)(joinMap.SelectSceneDirect.JoinNumber + sceneIndex)].StringValue = scene.Name;
+ trilist.BooleanInput[(uint)(joinMap.ButtonVisibility.JoinNumber + sceneIndex)].BoolValue = true;
sceneIndex++;
}
-
-
return joinMap;
}
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Monitoring/SystemMonitorController.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Monitoring/SystemMonitorController.cs
index 3f791467..e9d06304 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Monitoring/SystemMonitorController.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Monitoring/SystemMonitorController.cs
@@ -201,30 +201,30 @@ namespace PepperDash.Essentials.Core.Monitoring
}
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
- {
- var joinMap = new SystemMonitorJoinMap();
+ {
+ var joinMap = new SystemMonitorJoinMap(joinStart);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
- joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
-
- joinMap.OffsetJoinNumbers(joinStart);
+ joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
+
+ bridge.AddJoinMap(Key, joinMap);
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
Debug.Console(2, this, "Linking API starting at join: {0}", joinStart);
- TimeZoneFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeZone]);
- TimeZoneTextFeedback.LinkInputSig(trilist.StringInput[joinMap.TimeZoneName]);
-
- IoControllerVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.IOControllerVersion]);
- SnmpVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.SnmpAppVersion]);
- BaCnetAppVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.BACnetAppVersion]);
- ControllerVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.ControllerVersion]);
- SerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.SerialNumber]);
- ModelFeedback.LinkInputSig(trilist.StringInput[joinMap.Model]);
- UptimeFeedback.LinkInputSig(trilist.StringInput[joinMap.Uptime]);
- LastStartFeedback.LinkInputSig(trilist.StringInput[joinMap.LastBoot]);
+ TimeZoneFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeZone.JoinNumber]);
+ TimeZoneTextFeedback.LinkInputSig(trilist.StringInput[joinMap.TimeZoneName.JoinNumber]);
+
+ IoControllerVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.IOControllerVersion.JoinNumber]);
+ SnmpVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.SnmpAppVersion.JoinNumber]);
+ BaCnetAppVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.BACnetAppVersion.JoinNumber]);
+ ControllerVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.ControllerVersion.JoinNumber]);
+ SerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.SerialNumber.JoinNumber]);
+ ModelFeedback.LinkInputSig(trilist.StringInput[joinMap.Model.JoinNumber]);
+ UptimeFeedback.LinkInputSig(trilist.StringInput[joinMap.Uptime.JoinNumber]);
+ LastStartFeedback.LinkInputSig(trilist.StringInput[joinMap.LastBoot.JoinNumber]);
// iterate the program status feedback collection and map all the joins
LinkProgramInfoJoins(this, trilist, joinMap);
@@ -233,65 +233,64 @@ namespace PepperDash.Essentials.Core.Monitoring
}
private static void LinkEthernetInfoJoins(SystemMonitorController systemMonitorController, BasicTriList trilist, SystemMonitorJoinMap joinMap)
- {
- var ethernetSlotJoinStart = joinMap.EthernetStartJoin;
-
+ {
+ uint ethernetSlotJoinStart = 0;
foreach (var fb in systemMonitorController.EthernetStatusFeedbackCollection)
- {
- fb.Value.CurrentIpAddressFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.CurrentIpAddress]);
- fb.Value.CurrentSubnetMaskFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.CurrentSubnetMask]);
- fb.Value.CurrentDefaultGatewayFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.CurrentDefaultGateway]);
- fb.Value.StaticIpAddressFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.StaticIpAddress]);
- fb.Value.StaticSubnetMaskFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.StaticSubnetMask]);
- fb.Value.StaticDefaultGatewayFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.StaticDefaultGateway]);
- fb.Value.HostNameFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.HostName]);
- fb.Value.MacAddressFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.MacAddress]);
- fb.Value.DomainFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.Domain]);
- fb.Value.DnsServerFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.DnsServer]);
- fb.Value.DhcpStatusFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.DhcpStatus]);
+ {
+ fb.Value.CurrentIpAddressFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.CurrentIpAddress.JoinNumber]);
+ fb.Value.CurrentSubnetMaskFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.CurrentSubnetMask.JoinNumber]);
+ fb.Value.CurrentDefaultGatewayFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.CurrentDefaultGateway.JoinNumber]);
+ fb.Value.StaticIpAddressFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.StaticIpAddress.JoinNumber]);
+ fb.Value.StaticSubnetMaskFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.StaticSubnetMask.JoinNumber]);
+ fb.Value.StaticDefaultGatewayFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.StaticDefaultGateway.JoinNumber]);
+ fb.Value.HostNameFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.HostName.JoinNumber]);
+ fb.Value.MacAddressFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.MacAddress.JoinNumber]);
+ fb.Value.DomainFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.Domain.JoinNumber]);
+ fb.Value.DnsServerFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.DnsServer.JoinNumber]);
+ fb.Value.DhcpStatusFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.DhcpStatus.JoinNumber]);
- ethernetSlotJoinStart += joinMap.EthernetOffsetJoin;
+ ethernetSlotJoinStart += joinMap.EthernetOffsetJoin.JoinNumber;
}
}
private static void LinkProgramInfoJoins(SystemMonitorController systemMonitorController, BasicTriList trilist,
SystemMonitorJoinMap joinMap)
- {
- var programSlotJoinStart = joinMap.ProgramStartJoin;
+ {
+ uint programSlotJoinStart = 0;
foreach (var p in systemMonitorController.ProgramStatusFeedbackCollection)
{
- var programNumber = p.Value.Program.Number;
-
- trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramStart,
- b => SystemMonitor.ProgramCollection[programNumber].OperatingState = eProgramOperatingState.Start);
- p.Value.ProgramStartedFeedback.LinkInputSig(trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramStart]);
-
- trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramStop,
- b => SystemMonitor.ProgramCollection[programNumber].OperatingState = eProgramOperatingState.Stop);
- p.Value.ProgramStoppedFeedback.LinkInputSig(trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramStop]);
-
- trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramRegister,
+ var programNumber = p.Value.Program.Number;
+
+ trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramStart.JoinNumber,
+ b => SystemMonitor.ProgramCollection[programNumber].OperatingState = eProgramOperatingState.Start);
+ p.Value.ProgramStartedFeedback.LinkInputSig(trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramStart.JoinNumber]);
+
+ trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramStop.JoinNumber,
+ b => SystemMonitor.ProgramCollection[programNumber].OperatingState = eProgramOperatingState.Stop);
+ p.Value.ProgramStoppedFeedback.LinkInputSig(trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramStop.JoinNumber]);
+
+ trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramRegister.JoinNumber,
b => SystemMonitor.ProgramCollection[programNumber].RegistrationState = eProgramRegistrationState.Register);
- p.Value.ProgramRegisteredFeedback.LinkInputSig(
- trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramRegister]);
-
- trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramUnregister,
+ p.Value.ProgramRegisteredFeedback.LinkInputSig(
+ trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramRegister.JoinNumber]);
+
+ trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramUnregister.JoinNumber,
b => SystemMonitor.ProgramCollection[programNumber].RegistrationState = eProgramRegistrationState.Unregister);
- p.Value.ProgramUnregisteredFeedback.LinkInputSig(
- trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramUnregister]);
-
- p.Value.ProgramNameFeedback.LinkInputSig(trilist.StringInput[programSlotJoinStart + joinMap.ProgramName]);
- p.Value.ProgramCompileTimeFeedback.LinkInputSig(
- trilist.StringInput[programSlotJoinStart + joinMap.ProgramCompiledTime]);
- p.Value.CrestronDataBaseVersionFeedback.LinkInputSig(
- trilist.StringInput[programSlotJoinStart + joinMap.ProgramCrestronDatabaseVersion]);
- p.Value.EnvironmentVersionFeedback.LinkInputSig(
- trilist.StringInput[programSlotJoinStart + joinMap.ProgramEnvironmentVersion]);
- p.Value.AggregatedProgramInfoFeedback.LinkInputSig(
- trilist.StringInput[programSlotJoinStart + joinMap.AggregatedProgramInfo]);
-
- programSlotJoinStart = programSlotJoinStart + joinMap.ProgramOffsetJoin;
+ p.Value.ProgramUnregisteredFeedback.LinkInputSig(
+ trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramUnregister.JoinNumber]);
+
+ p.Value.ProgramNameFeedback.LinkInputSig(trilist.StringInput[programSlotJoinStart + joinMap.ProgramName.JoinNumber]);
+ p.Value.ProgramCompileTimeFeedback.LinkInputSig(
+ trilist.StringInput[programSlotJoinStart + joinMap.ProgramCompiledTime.JoinNumber]);
+ p.Value.CrestronDataBaseVersionFeedback.LinkInputSig(
+ trilist.StringInput[programSlotJoinStart + joinMap.ProgramCrestronDatabaseVersion.JoinNumber]);
+ p.Value.EnvironmentVersionFeedback.LinkInputSig(
+ trilist.StringInput[programSlotJoinStart + joinMap.ProgramEnvironmentVersion.JoinNumber]);
+ p.Value.AggregatedProgramInfoFeedback.LinkInputSig(
+ trilist.StringInput[programSlotJoinStart + joinMap.AggregatedProgramInfo.JoinNumber]);
+
+ programSlotJoinStart = programSlotJoinStart + joinMap.ProgramOffsetJoin.JoinNumber;
}
}
diff --git a/essentials-framework/Essentials DM/Essentials_DM/AirMedia/AirMediaController.cs b/essentials-framework/Essentials DM/Essentials_DM/AirMedia/AirMediaController.cs
index 8823ae75..72b4bc4c 100644
--- a/essentials-framework/Essentials DM/Essentials_DM/AirMedia/AirMediaController.cs
+++ b/essentials-framework/Essentials DM/Essentials_DM/AirMedia/AirMediaController.cs
@@ -103,43 +103,43 @@ namespace PepperDash.Essentials.DM.AirMedia
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
{
- var joinMap = new AirMediaControllerJoinMap();
+ var joinMap = new AirMediaControllerJoinMap(joinStart);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
- joinMap.OffsetJoinNumbers(joinStart);
+ bridge.AddJoinMap(Key, joinMap);
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
Debug.Console(0, "Linking to Airmedia: {0}", Name);
- trilist.StringInput[joinMap.Name].StringValue = Name;
+ trilist.StringInput[joinMap.Name.JoinNumber].StringValue = Name;
var commMonitor = this as ICommunicationMonitor;
- commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
+ commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
- IsInSessionFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsInSession]);
- HdmiVideoSyncDetectedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.HdmiVideoSync]);
+ IsInSessionFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsInSession.JoinNumber]);
+ HdmiVideoSyncDetectedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.HdmiVideoSync.JoinNumber]);
- trilist.SetSigTrueAction(joinMap.AutomaticInputRoutingEnabled, AirMedia.DisplayControl.EnableAutomaticRouting);
- trilist.SetSigFalseAction(joinMap.AutomaticInputRoutingEnabled, AirMedia.DisplayControl.DisableAutomaticRouting);
- AutomaticInputRoutingEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AutomaticInputRoutingEnabled]);
+ trilist.SetSigTrueAction(joinMap.AutomaticInputRoutingEnabled.JoinNumber, AirMedia.DisplayControl.EnableAutomaticRouting);
+ trilist.SetSigFalseAction(joinMap.AutomaticInputRoutingEnabled.JoinNumber, AirMedia.DisplayControl.DisableAutomaticRouting);
+ AutomaticInputRoutingEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AutomaticInputRoutingEnabled.JoinNumber]);
- trilist.SetUShortSigAction(joinMap.VideoOut, (u) => SelectVideoOut(u));
+ trilist.SetUShortSigAction(joinMap.VideoOut.JoinNumber, (u) => SelectVideoOut(u));
- VideoOutFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoOut]);
- ErrorFeedback.LinkInputSig(trilist.UShortInput[joinMap.ErrorFB]);
- NumberOfUsersConnectedFeedback.LinkInputSig(trilist.UShortInput[joinMap.NumberOfUsersConnectedFB]);
+ VideoOutFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoOut.JoinNumber]);
+ ErrorFeedback.LinkInputSig(trilist.UShortInput[joinMap.ErrorFB.JoinNumber]);
+ NumberOfUsersConnectedFeedback.LinkInputSig(trilist.UShortInput[joinMap.NumberOfUsersConnectedFB.JoinNumber]);
- trilist.SetUShortSigAction(joinMap.LoginCode, (u) => AirMedia.AirMedia.LoginCode.UShortValue = u);
- LoginCodeFeedback.LinkInputSig(trilist.UShortInput[joinMap.LoginCode]);
+ trilist.SetUShortSigAction(joinMap.LoginCode.JoinNumber, (u) => AirMedia.AirMedia.LoginCode.UShortValue = u);
+ LoginCodeFeedback.LinkInputSig(trilist.UShortInput[joinMap.LoginCode.JoinNumber]);
- ConnectionAddressFeedback.LinkInputSig(trilist.StringInput[joinMap.ConnectionAddressFB]);
- HostnameFeedback.LinkInputSig(trilist.StringInput[joinMap.HostnameFB]);
- SerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.SerialNumberFeedback]);
+ ConnectionAddressFeedback.LinkInputSig(trilist.StringInput[joinMap.ConnectionAddressFB.JoinNumber]);
+ HostnameFeedback.LinkInputSig(trilist.StringInput[joinMap.HostnameFB.JoinNumber]);
+ SerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.SerialNumberFeedback.JoinNumber]);
}
void AirMedia_AirMediaChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args)
diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmBladeChassisController.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmBladeChassisController.cs
index 5ce95c93..5e9c3151 100644
--- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmBladeChassisController.cs
+++ b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmBladeChassisController.cs
@@ -573,27 +573,27 @@ namespace PepperDash.Essentials.DM {
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
{
- var joinMap = new DmBladeChassisControllerJoinMap();
+ var joinMap = new DmBladeChassisControllerJoinMap(joinStart);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
-
- joinMap.OffsetJoinNumbers(joinStart);
+ bridge.AddJoinMap(Key, joinMap);
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
- IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
+ IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
// Link up outputs
for (uint i = 1; i <= Chassis.NumberOfOutputs; i++)
{
var ioSlot = i;
+ var ioSlotJoin = ioSlot - 1;
// Control
- trilist.SetUShortSigAction(joinMap.OutputVideo + ioSlot, o => ExecuteSwitch(o, ioSlot, eRoutingSignalType.Video));
+ trilist.SetUShortSigAction(joinMap.OutputVideo.JoinNumber + ioSlotJoin, o => ExecuteSwitch(o, ioSlot, eRoutingSignalType.Video));
if (TxDictionary.ContainsKey(ioSlot))
{
@@ -605,33 +605,33 @@ namespace PepperDash.Essentials.DM {
if (Chassis is DmMd128x128 || Chassis is DmMd64x64)
{
- InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
+ InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]);
}
else
{
if (advancedTxDevice != null)
{
- advancedTxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
+ advancedTxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]);
Debug.Console(2, "Linking Tx Online Feedback from Advanced Transmitter at input {0}", ioSlot);
}
else if (InputEndpointOnlineFeedbacks[ioSlot] != null)
{
Debug.Console(2, "Linking Tx Online Feedback from Input Card {0}", ioSlot);
- InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
+ InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]);
}
}
if (basicTxDevice != null && advancedTxDevice == null)
- trilist.BooleanInput[joinMap.TxAdvancedIsPresent + ioSlot].BoolValue = true;
+ trilist.BooleanInput[joinMap.TxAdvancedIsPresent.JoinNumber + ioSlotJoin].BoolValue = true;
if (advancedTxDevice != null)
{
- advancedTxDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
+ advancedTxDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]);
}
else
{
Debug.Console(1, "Setting up actions and feedbacks on input card {0}", ioSlot);
- VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
+ VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]);
var inputPort = InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)];
if (inputPort != null)
@@ -649,15 +649,15 @@ namespace PepperDash.Essentials.DM {
if (hdmiInPortWCec.HdcpSupportedLevel != eHdcpSupportedLevel.Unknown)
{
- SetHdcpStateAction(true, hdmiInPortWCec, joinMap.HdcpSupportState + ioSlot, trilist);
+ SetHdcpStateAction(true, hdmiInPortWCec, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist);
}
- InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]);
+ InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]);
if (InputCardHdcpCapabilityTypes.ContainsKey(ioSlot))
- trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = (ushort)InputCardHdcpCapabilityTypes[ioSlot];
+ trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = (ushort)InputCardHdcpCapabilityTypes[ioSlot];
else
- trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = 1;
+ trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = 1;
}
}
}
@@ -675,14 +675,14 @@ namespace PepperDash.Essentials.DM {
var dmInPortWCec = port as DMInputPortWithCec;
- SetHdcpStateAction(PropertiesConfig.InputSlotSupportsHdcp2[ioSlot], dmInPortWCec, joinMap.HdcpSupportState + ioSlot, trilist);
+ SetHdcpStateAction(PropertiesConfig.InputSlotSupportsHdcp2[ioSlot], dmInPortWCec, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist);
- InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]);
+ InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]);
if (InputCardHdcpCapabilityTypes.ContainsKey(ioSlot))
- trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = (ushort)InputCardHdcpCapabilityTypes[ioSlot];
+ trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = (ushort)InputCardHdcpCapabilityTypes[ioSlot];
else
- trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = 1;
+ trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = 1;
}
}
}
@@ -690,7 +690,7 @@ namespace PepperDash.Essentials.DM {
}
else
{
- VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
+ VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]);
var inputPort = InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)];
if (inputPort != null)
@@ -699,8 +699,8 @@ namespace PepperDash.Essentials.DM {
if (hdmiPort != null)
{
- SetHdcpStateAction(true, hdmiPort, joinMap.HdcpSupportState + ioSlot, trilist);
- InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]);
+ SetHdcpStateAction(true, hdmiPort, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist);
+ InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]);
}
}
}
@@ -711,7 +711,7 @@ namespace PepperDash.Essentials.DM {
//var rxDevice = DeviceManager.GetDeviceForKey(rxKey) as DmRmcControllerBase;
//var hdBaseTDevice = DeviceManager.GetDeviceForKey(rxKey) as DmHdBaseTControllerBase;
//if (hdBaseTDevice != null) {
- OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]);
+ OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline.JoinNumber + ioSlotJoin]);
//}
//else if (rxDevice != null) {
// rxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]);
@@ -719,12 +719,12 @@ namespace PepperDash.Essentials.DM {
}
// Feedback
- VideoOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputVideo + ioSlot]);
+ VideoOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputVideo.JoinNumber + ioSlotJoin]);
- OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames + ioSlot]);
- InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames + ioSlot]);
- OutputVideoRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentVideoInputNames + ioSlot]);
+ OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames.JoinNumber + ioSlotJoin]);
+ InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames.JoinNumber + ioSlotJoin]);
+ OutputVideoRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentVideoInputNames.JoinNumber + ioSlotJoin]);
}
}
diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs
index 7313aece..0af41f48 100644
--- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs
+++ b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs
@@ -1,1317 +1,1318 @@
-
-using System;
-using System.Collections.Generic;
-using Crestron.SimplSharp;
-using Crestron.SimplSharpPro.DeviceSupport;
-using Crestron.SimplSharpPro.DM;
-using Crestron.SimplSharpPro.DM.Cards;
-using Crestron.SimplSharpPro.DM.Endpoints;
-using Newtonsoft.Json;
-using PepperDash.Core;
-using PepperDash.Essentials.Core;
-using PepperDash.Essentials.Core.Bridges;
-using PepperDash.Essentials.DM.Config;
-using PepperDash.Essentials.Core.Config;
-
-namespace PepperDash.Essentials.DM
-{
- ///
- /// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
- ///
- ///
- [Description("Wrapper class for all DM-MD chassis variants from 8x8 to 128x128")]
- public class DmChassisController : CrestronGenericBridgeableBaseDevice, IDmSwitch, IRoutingInputsOutputs, IRouting, IHasFeedback
- {
- public DMChassisPropertiesConfig PropertiesConfig { get; set; }
-
- public Switch Chassis { get; private set; }
-
- // Feedbacks for EssentialDM
- public Dictionary VideoOutputFeedbacks { get; private set; }
- public Dictionary AudioOutputFeedbacks { get; private set; }
- public Dictionary VideoInputSyncFeedbacks { get; private set; }
- public Dictionary InputEndpointOnlineFeedbacks { get; private set; }
- public Dictionary OutputEndpointOnlineFeedbacks { get; private set; }
- public Dictionary InputNameFeedbacks { get; private set; }
- public Dictionary OutputNameFeedbacks { get; private set; }
- public Dictionary OutputVideoRouteNameFeedbacks { get; private set; }
- public Dictionary OutputAudioRouteNameFeedbacks { get; private set; }
- public Dictionary UsbOutputRoutedToFeebacks { get; private set; }
- public Dictionary UsbInputRoutedToFeebacks { get; private set; }
- public Dictionary OutputDisabledByHdcpFeedbacks { get; private set; }
-
- public IntFeedback SystemIdFeebdack { get; private set; }
- public BoolFeedback SystemIdBusyFeedback { get; private set; }
-
- public Dictionary InputCardHdcpCapabilityFeedbacks { get; private set; }
-
- public Dictionary InputCardHdcpCapabilityTypes { get; private set; }
-
- // Need a couple Lists of generic Backplane ports
- public RoutingPortCollection InputPorts { get; private set; }
- public RoutingPortCollection OutputPorts { get; private set; }
-
- public Dictionary TxDictionary { get; set; }
- public Dictionary RxDictionary { get; set; }
-
- //public Dictionary InputCards { get; private set; }
- //public Dictionary OutputCards { get; private set; }
-
- public Dictionary InputNames { get; set; }
- public Dictionary OutputNames { get; set; }
- public Dictionary VolumeControls { get; private set; }
-
- public const int RouteOffTime = 500;
- Dictionary RouteOffTimers = new Dictionary();
-
- ///
- /// Text that represents when an output has no source routed to it
- ///
- public string NoRouteText = "";
-
- ///
- /// Factory method to create a new chassis controller from config data. Limited to 8x8 right now
- ///
- public static DmChassisController GetDmChassisController(string key, string name,
- string type, DMChassisPropertiesConfig properties)
- {
- try
- {
- type = type.ToLower();
- uint ipid = properties.Control.IpIdInt;
-
- DmMDMnxn chassis = null;
- switch (type) {
- case "dmmd8x8":
- chassis = new DmMd8x8(ipid, Global.ControlSystem);
- break;
- case "dmmd8x8rps":
- chassis = new DmMd8x8rps(ipid, Global.ControlSystem);
- break;
- case "dmmd8x8cpu3":
- chassis = new DmMd8x8Cpu3(ipid, Global.ControlSystem);
- break;
- case "dmmd8x8cpu3rps":
- chassis = new DmMd8x8Cpu3rps(ipid, Global.ControlSystem);
- break;
- case "dmmd16x16":
- chassis = new DmMd16x16(ipid, Global.ControlSystem);
- break;
- case "dmmd16x16rps":
- chassis = new DmMd16x16rps(ipid, Global.ControlSystem);
- break;
- case "dmmd16x16cpu3":
- chassis = new DmMd16x16Cpu3(ipid, Global.ControlSystem);
- break;
- case "dmmd16x16cpu3rps":
- chassis = new DmMd16x16Cpu3rps(ipid, Global.ControlSystem);
- break;
- case "dmmd32x32":
- chassis = new DmMd32x32(ipid, Global.ControlSystem);
- break;
- case "dmmd32x32rps":
- chassis = new DmMd32x32rps(ipid, Global.ControlSystem);
- break;
- case "dmmd32x32cpu3":
- chassis = new DmMd32x32Cpu3(ipid, Global.ControlSystem);
- break;
- case "dmmd32x32cpu3rps":
- chassis = new DmMd32x32Cpu3rps(ipid, Global.ControlSystem);
- break;
- }
-
- if (chassis == null)
- return null;
-
- var controller = new DmChassisController(key, name, chassis);
-
- // add the cards and port names
- foreach (var kvp in properties.InputSlots)
- controller.AddInputCard(kvp.Value, kvp.Key);
-
- foreach (var kvp in properties.OutputSlots)
- controller.AddOutputCard(kvp.Value, kvp.Key);
-
- foreach (var kvp in properties.VolumeControls)
- {
- // get the card
- // check it for an audio-compatible type
- // make a something-something that will make it work
- // retire to mountain village
- var outNum = kvp.Key;
- var card = controller.Chassis.Outputs[outNum].Card;
- Audio.Output audio = null;
- if (card is DmcHdo)
- audio = (card as DmcHdo).Audio;
- else if (card is Dmc4kHdo)
- audio = (card as Dmc4kHdo).Audio;
- if (audio == null)
- continue;
-
- // wire up the audio to something here...
- controller.AddVolumeControl(outNum, audio);
- }
-
- controller.InputNames = properties.InputNames;
- controller.OutputNames = properties.OutputNames;
-
- if (!string.IsNullOrEmpty(properties.NoRouteText))
- {
- controller.NoRouteText = properties.NoRouteText;
- Debug.Console(1, controller, "Setting No Route Text value to: {0}", controller.NoRouteText);
- }
- else
- {
- Debug.Console(1, controller, "NoRouteText not specified. Defaulting to blank string.", controller.NoRouteText);
- }
-
- controller.PropertiesConfig = properties;
- return controller;
- }
- catch (Exception e)
- {
- Debug.Console(0, "Error creating DM chassis:\r{0}", e);
- }
-
- return null;
- }
-
- ///
- ///
- ///
- ///
- ///
- ///
- public DmChassisController(string key, string name, DmMDMnxn chassis)
- : base(key, name, chassis)
- {
- Chassis = chassis;
- InputPorts = new RoutingPortCollection();
- OutputPorts = new RoutingPortCollection();
- VolumeControls = new Dictionary();
- TxDictionary = new Dictionary();
- RxDictionary = new Dictionary();
- IsOnline.OutputChange += new EventHandler(IsOnline_OutputChange);
- Chassis.DMInputChange += new DMInputEventHandler(Chassis_DMInputChange);
- Chassis.DMSystemChange += new DMSystemEventHandler(Chassis_DMSystemChange);
- Chassis.DMOutputChange += new DMOutputEventHandler(Chassis_DMOutputChange);
- VideoOutputFeedbacks = new Dictionary();
- AudioOutputFeedbacks = new Dictionary();
- UsbOutputRoutedToFeebacks = new Dictionary();
- UsbInputRoutedToFeebacks = new Dictionary();
- OutputDisabledByHdcpFeedbacks = new Dictionary();
- VideoInputSyncFeedbacks = new Dictionary();
- InputNameFeedbacks = new Dictionary();
- OutputNameFeedbacks = new Dictionary();
- OutputVideoRouteNameFeedbacks = new Dictionary();
- OutputAudioRouteNameFeedbacks = new Dictionary();
- InputEndpointOnlineFeedbacks = new Dictionary();
- OutputEndpointOnlineFeedbacks = new Dictionary();
-
- SystemIdFeebdack = new IntFeedback(() => { return (Chassis as DmMDMnxn).SystemIdFeedback.UShortValue; });
- SystemIdBusyFeedback = new BoolFeedback(() => { return (Chassis as DmMDMnxn).SystemIdBusy.BoolValue; });
- InputCardHdcpCapabilityFeedbacks = new Dictionary();
- InputCardHdcpCapabilityTypes = new Dictionary();
-
- for (uint x = 1; x <= Chassis.NumberOfOutputs; x++)
- {
- var tempX = x;
-
- if (Chassis.Outputs[tempX] != null)
- {
- VideoOutputFeedbacks[tempX] = new IntFeedback(() => {
- if (Chassis.Outputs[tempX].VideoOutFeedback != null)
- return (ushort)Chassis.Outputs[tempX].VideoOutFeedback.Number;
-
- return 0;
- });
- AudioOutputFeedbacks[tempX] = new IntFeedback(() => {
- if (Chassis.Outputs[tempX].AudioOutFeedback != null)
- return (ushort)Chassis.Outputs[tempX].AudioOutFeedback.Number;
-
- return 0;
- });
- UsbOutputRoutedToFeebacks[tempX] = new IntFeedback(() => {
- if (Chassis.Outputs[tempX].USBRoutedToFeedback != null)
- return (ushort)Chassis.Outputs[tempX].USBRoutedToFeedback.Number;
-
- return 0;
- });
-
- OutputNameFeedbacks[tempX] = new StringFeedback(() => {
- if (Chassis.Outputs[tempX].NameFeedback != null)
- return Chassis.Outputs[tempX].NameFeedback.StringValue;
-
- return "";
- });
- OutputVideoRouteNameFeedbacks[tempX] = new StringFeedback(() => {
- if (Chassis.Outputs[tempX].VideoOutFeedback != null)
- return Chassis.Outputs[tempX].VideoOutFeedback.NameFeedback.StringValue;
-
- return NoRouteText;
- });
- OutputAudioRouteNameFeedbacks[tempX] = new StringFeedback(() => {
- if (Chassis.Outputs[tempX].AudioOutFeedback != null)
- return Chassis.Outputs[tempX].AudioOutFeedback.NameFeedback.StringValue;
-
- return NoRouteText;
- });
- OutputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => Chassis.Outputs[tempX].EndpointOnlineFeedback);
-
- OutputDisabledByHdcpFeedbacks[tempX] = new BoolFeedback(() => {
- var output = Chassis.Outputs[tempX];
-
- var hdmiTxOutput = output as Card.HdmiTx;
- if (hdmiTxOutput != null)
- return hdmiTxOutput.HdmiOutput.DisabledByHdcp.BoolValue;
-
- var dmHdmiOutput = output as Card.DmHdmiOutput;
- if (dmHdmiOutput != null)
- return dmHdmiOutput.DisabledByHdcpFeedback.BoolValue;
-
- var dmsDmOutAdvanced = output as Card.DmsDmOutAdvanced;
- if (dmsDmOutAdvanced != null)
- return dmsDmOutAdvanced.DisabledByHdcpFeedback.BoolValue;
-
- var dmps3HdmiAudioOutput = output as Card.Dmps3HdmiAudioOutput;
- if (dmps3HdmiAudioOutput != null)
- return dmps3HdmiAudioOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
-
- var dmps3HdmiOutput = output as Card.Dmps3HdmiOutput;
- if (dmps3HdmiOutput != null)
- return dmps3HdmiOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
-
- var dmps3HdmiOutputBackend = output as Card.Dmps3HdmiOutputBackend;
- if (dmps3HdmiOutputBackend != null)
- return dmps3HdmiOutputBackend.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
-
- // var hdRx4kX10HdmiOutput = output as HdRx4kX10HdmiOutput;
- // if (hdRx4kX10HdmiOutput != null)
- // return hdRx4kX10HdmiOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
-
- // var hdMdNxMHdmiOutput = output as HdMdNxMHdmiOutput;
- // if (hdMdNxMHdmiOutput != null)
- // return hdMdNxMHdmiOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
-
- return false;
- });
- }
-
- if (Chassis.Inputs[tempX] != null)
- {
- UsbInputRoutedToFeebacks[tempX] = new IntFeedback(() => {
- if (Chassis.Inputs[tempX].USBRoutedToFeedback != null)
- return (ushort)Chassis.Inputs[tempX].USBRoutedToFeedback.Number;
-
- return 0;
- });
- VideoInputSyncFeedbacks[tempX] = new BoolFeedback(() => {
- if (Chassis.Inputs[tempX].VideoDetectedFeedback != null)
- return Chassis.Inputs[tempX].VideoDetectedFeedback.BoolValue;
-
- return false;
- });
- InputNameFeedbacks[tempX] = new StringFeedback(() => {
- if (Chassis.Inputs[tempX].NameFeedback != null)
- return Chassis.Inputs[tempX].NameFeedback.StringValue;
-
- return "";
- });
-
- InputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => { return Chassis.Inputs[tempX].EndpointOnlineFeedback; });
-
- InputCardHdcpCapabilityFeedbacks[tempX] = new IntFeedback(() => {
- var inputCard = Chassis.Inputs[tempX];
-
- if (inputCard.Card is DmcHd)
- {
- InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
-
- if ((inputCard.Card as DmcHd).HdmiInput.HdcpSupportOnFeedback.BoolValue)
- return 1;
- return 0;
- }
-
- if (inputCard.Card is DmcHdDsp)
- {
- InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
-
- if ((inputCard.Card as DmcHdDsp).HdmiInput.HdcpSupportOnFeedback.BoolValue)
- return 1;
- return 0;
- }
- if (inputCard.Card is Dmc4kHdBase)
- {
- InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support;
- return (int)(inputCard.Card as Dmc4kHdBase).HdmiInput.HdcpReceiveCapability;
- }
- if (inputCard.Card is Dmc4kCBase)
- {
- if (PropertiesConfig.InputSlotSupportsHdcp2[tempX])
- {
- InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
- return (int)(inputCard.Card as Dmc4kCBase).DmInput.HdcpReceiveCapability;
- }
-
- if ((inputCard.Card as Dmc4kCBase).DmInput.HdcpSupportOnFeedback.BoolValue)
- return 1;
- return 0;
- }
- if (inputCard.Card is Dmc4kCDspBase)
- {
- if (PropertiesConfig.InputSlotSupportsHdcp2[tempX])
- {
- InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
- return (int)(inputCard.Card as Dmc4kCDspBase).DmInput.HdcpReceiveCapability;
- }
-
- if ((inputCard.Card as Dmc4kCDspBase).DmInput.HdcpSupportOnFeedback.BoolValue)
- return 1;
-
- return 0;
- }
- return 0;
- });
- }
- }
- }
-
- ///
- ///
- ///
- ///
- ///
- public void AddInputCard(string type, uint number)
- {
- Debug.Console(2, this, "Adding input card '{0}', slot {1}", type, number);
-
- type = type.ToLower();
-
- if (type == "dmchd")
- {
- var inputCard = new DmcHd(number, this.Chassis);
- var cecPort = inputCard.HdmiInput as ICec;
- AddHdmiInCardPorts(number, cecPort);
- }
- else if (type == "dmchddsp")
- {
- var inputCard = new DmcHdDsp(number, this.Chassis);
- var cecPort = inputCard.HdmiInput as ICec;
- AddHdmiInCardPorts(number, cecPort);
- }
- else if (type == "dmc4khd")
- {
- var inputCard = new Dmc4kHd(number, this.Chassis);
- var cecPort = inputCard.HdmiInput as ICec;
- AddHdmiInCardPorts(number, cecPort);
- }
- else if (type == "dmc4khddsp")
- {
- var inputCard = new Dmc4kHdDsp(number, this.Chassis);
- var cecPort = inputCard.HdmiInput as ICec;
- AddHdmiInCardPorts(number, cecPort);
- }
- else if (type == "dmc4kzhd")
- {
- var inputCard = new Dmc4kzHd(number, this.Chassis);
- var cecPort = inputCard.HdmiInput as ICec;
- AddHdmiInCardPorts(number, cecPort);
- }
- else if (type == "dmc4kzhddsp")
- {
- var inputCard = new Dmc4kzHdDsp(number, this.Chassis);
- var cecPort = inputCard.HdmiInput as ICec;
- AddHdmiInCardPorts(number, cecPort);
- }
- else if (type == "dmcc")
- {
- var inputCard = new DmcC(number, this.Chassis);
- var cecPort = inputCard.DmInput as ICec;
- AddDmInCardPorts(number, cecPort);
- }
- else if (type == "dmccdsp")
- {
- var inputCard = new DmcCDsp(number, this.Chassis);
- var cecPort = inputCard.DmInput as ICec;
- AddDmInCardPorts(number, cecPort);
- }
- else if (type == "dmc4kc")
- {
- var inputCard = new Dmc4kC(number, this.Chassis);
- var cecPort = inputCard.DmInput as ICec;
- AddDmInCardPorts(number, cecPort);
- }
- else if (type == "dmc4kcdsp")
- {
- var inputCard = new Dmc4kCDsp(number, this.Chassis);
- var cecPort = inputCard.DmInput as ICec;
- AddDmInCardPorts(number, cecPort);
- }
- else if (type == "dmc4kzc")
- {
- var inputCard = new Dmc4kzC(number, this.Chassis);
- var cecPort = inputCard.DmInput as ICec;
- AddDmInCardPorts(number, cecPort);
- }
- else if (type == "dmc4kzcdsp")
- {
- var inputCard = new Dmc4kzCDsp(number, this.Chassis);
- var cecPort = inputCard.DmInput as ICec;
- AddDmInCardPorts(number, cecPort);
- }
- else if (type == "dmccat")
- {
- new DmcCat(number, this.Chassis);
- AddDmInCardPorts(number);
- }
- else if (type == "dmccatdsp")
- {
- new DmcCatDsp(number, this.Chassis);
- AddDmInCardPorts(number);
- }
- else if (type == "dmcs")
- {
- new DmcS(number, Chassis);
- AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber);
- AddInCardHdmiAndAudioLoopPorts(number);
- }
- else if (type == "dmcsdsp")
- {
- new DmcSDsp(number, Chassis);
- AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber);
- AddInCardHdmiAndAudioLoopPorts(number);
- }
- else if (type == "dmcs2")
- {
- new DmcS2(number, Chassis);
- AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber);
- AddInCardHdmiAndAudioLoopPorts(number);
- }
- else if (type == "dmcs2dsp")
- {
- new DmcS2Dsp(number, Chassis);
- AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber);
- AddInCardHdmiAndAudioLoopPorts(number);
- }
- else if (type == "dmcsdi")
- {
- new DmcSdi(number, Chassis);
- AddInputPortWithDebug(number, "sdiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Sdi);
- AddOutputPortWithDebug(string.Format("inputCard{0}", number), "sdiOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.Sdi, null);
- AddInCardHdmiAndAudioLoopPorts(number);
- }
- else if (type == "dmcdvi")
- {
- new DmcDvi(number, Chassis);
- AddInputPortWithDebug(number, "dviIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Dvi);
- AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
- AddInCardHdmiLoopPort(number);
- }
- else if (type == "dmcvga")
- {
- new DmcVga(number, Chassis);
- AddInputPortWithDebug(number, "vgaIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Vga);
- AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
- AddInCardHdmiLoopPort(number);
- }
- else if (type == "dmcvidbnc")
- {
- new DmcVidBnc(number, Chassis);
- AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component);
- AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
- AddInCardHdmiLoopPort(number);
- }
- else if (type == "dmcvidrcaa")
- {
- new DmcVidRcaA(number, Chassis);
- AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component);
- AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
- AddInCardHdmiLoopPort(number);
- }
- else if (type == "dmcvidrcad")
- {
- new DmcVidRcaD(number, Chassis);
- AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component);
- AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.DigitalAudio);
- AddInCardHdmiLoopPort(number);
- }
- else if (type == "dmcvid4")
- {
- new DmcVid4(number, Chassis);
- AddInputPortWithDebug(number, "compositeIn1", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
- AddInputPortWithDebug(number, "compositeIn2", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
- AddInputPortWithDebug(number, "compositeIn3", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
- AddInputPortWithDebug(number, "compositeIn4", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
- AddInCardHdmiLoopPort(number);
- }
- else if (type == "dmcstr")
- {
- new DmcStr(number, Chassis);
- AddInputPortWithDebug(number, "streamIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming);
- AddInCardHdmiAndAudioLoopPorts(number);
- }
- }
-
- void AddDmInCardPorts(uint number)
- {
- AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat);
- AddInCardHdmiAndAudioLoopPorts(number);
- }
-
- void AddDmInCardPorts(uint number, ICec cecPort)
- {
- AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, cecPort);
- AddInCardHdmiAndAudioLoopPorts(number);
- }
-
- void AddHdmiInCardPorts(uint number, ICec cecPort)
- {
- AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort);
- AddInCardHdmiAndAudioLoopPorts(number);
- }
-
- void AddInCardHdmiAndAudioLoopPorts(uint number)
- {
- AddOutputPortWithDebug(string.Format("inputCard{0}", number), "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.Hdmi, null);
- AddOutputPortWithDebug(string.Format("inputCard{0}", number), "audioLoopOut", eRoutingSignalType.Audio, eRoutingPortConnectionType.Hdmi, null);
- }
-
- void AddInCardHdmiLoopPort(uint number)
- {
- AddOutputPortWithDebug(string.Format("inputCard{0}", number), "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.Hdmi, null);
- }
-
- ///
- ///
- ///
- ///
- ///
- public void AddOutputCard(string type, uint number)
- {
- type = type.ToLower();
-
- Debug.Console(2, this, "Adding output card '{0}', slot {1}", type, number);
- if (type == "dmc4khdo")
- {
- var outputCard = new Dmc4kHdoSingle(number, Chassis);
- var cecPort1 = outputCard.Card1.HdmiOutput;
- var cecPort2 = outputCard.Card2.HdmiOutput;
- AddDmcHdoPorts(number, cecPort1, cecPort2);
- }
- else if (type == "dmchdo")
- {
- var outputCard = new DmcHdoSingle(number, Chassis);
- var cecPort1 = outputCard.Card1.HdmiOutput;
- var cecPort2 = outputCard.Card2.HdmiOutput;
- AddDmcHdoPorts(number, cecPort1, cecPort2);
- }
- else if (type == "dmc4kcohd")
- {
- var outputCard = new Dmc4kCoHdSingle(number, Chassis);
- var cecPort1 = outputCard.Card1.HdmiOutput;
- AddDmcCoPorts(number, cecPort1);
- }
- else if (type == "dmc4kzcohd")
- {
- var outputCard = new Dmc4kzCoHdSingle(number, Chassis);
- var cecPort1 = outputCard.Card1.HdmiOutput;
- AddDmcCoPorts(number, cecPort1);
- }
- else if (type == "dmccohd")
- {
- var outputCard = new DmcCoHdSingle(number, Chassis);
- var cecPort1 = outputCard.Card1.HdmiOutput;
- AddDmcCoPorts(number, cecPort1);
- }
- else if (type == "dmccatohd")
- {
- var outputCard = new DmcCatoHdSingle(number, Chassis);
- var cecPort1 = outputCard.Card1.HdmiOutput;
- AddDmcCoPorts(number, cecPort1);
- }
- else if (type == "dmcsohd")
- {
- var outputCard = new DmcSoHdSingle(number, Chassis);
- var cecPort1 = outputCard.Card1.HdmiOutput;
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.DmMmFiber, 2 * (number - 1) + 1);
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.DmMmFiber, 2 * (number - 1) + 2);
- }
- else if (type == "dmcs2ohd")
- {
- var outputCard = new DmcS2oHdSingle(number, Chassis);
- var cecPort1 = outputCard.Card1.HdmiOutput;
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.DmSmFiber, 2 * (number - 1) + 1);
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.DmSmFiber, 2 * (number - 1) + 2);
- }
- else if (type == "dmcstro")
- {
- var outputCard = new DmcStroSingle(number, Chassis);
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "streamOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.Streaming, 2 * (number - 1) + 1);
- }
-
- else
- Debug.Console(1, this, " WARNING: Output card type '{0}' is not available", type);
- }
-
- void AddDmcHdoPorts(uint number, ICec cecPort1, ICec cecPort2)
- {
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "audioOut1", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio,
- 2 * (number - 1) + 1);
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 2, cecPort2);
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "audioOut2", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio,
- 2 * (number - 1) + 2);
- }
-
- void AddDmcCoPorts(uint number, ICec cecPort1)
- {
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.DmCat, 2 * (number - 1) + 1);
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.DmCat, 2 * (number - 1) + 2);
- }
-
- ///
- /// Adds InputPort
- ///
- void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType)
- {
- var portKey = string.Format("inputCard{0}--{1}", cardNum, portName);
- Debug.Console(2, this, "Adding input port '{0}'", portKey);
- var inputPort = new RoutingInputPort(portKey, sigType, portType, cardNum, this);
-
- InputPorts.Add(inputPort);
- }
-
- ///
- /// Adds InputPort and sets Port as ICec object
- ///
- void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, ICec cecPort)
- {
- var portKey = string.Format("inputCard{0}--{1}", cardNum, portName);
- Debug.Console(2, this, "Adding input port '{0}'", portKey);
- var inputPort = new RoutingInputPort(portKey, sigType, portType, cardNum, this);
-
- if (cecPort != null)
- inputPort.Port = cecPort;
-
- InputPorts.Add(inputPort);
- }
-
- ///
- /// Adds OutputPort
- ///
- void AddOutputPortWithDebug(string cardName, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector)
- {
- var portKey = string.Format("{0}--{1}", cardName, portName);
- Debug.Console(2, this, "Adding output port '{0}'", portKey);
- OutputPorts.Add(new RoutingOutputPort(portKey, sigType, portType, selector, this));
- }
-
- ///
- /// Adds OutputPort and sets Port as ICec object
- ///
- void AddOutputPortWithDebug(string cardName, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector, ICec cecPort)
- {
- var portKey = string.Format("{0}--{1}", cardName, portName);
- Debug.Console(2, this, "Adding output port '{0}'", portKey);
- var outputPort = new RoutingOutputPort(portKey, sigType, portType, selector, this);
-
- if (cecPort != null)
- outputPort.Port = cecPort;
-
- OutputPorts.Add(outputPort);
- }
-
- ///
- ///
- ///
- void AddVolumeControl(uint number, Audio.Output audio)
- {
- VolumeControls.Add(number, new DmCardAudioOutputController(audio));
- }
-
- //public void SetInputHdcpSupport(uint input, ePdtHdcpSupport hdcpSetting)
- //{
-
- //}
-
- void Chassis_DMSystemChange(Switch device, DMSystemEventArgs args)
- {
- switch (args.EventId)
- {
- case DMSystemEventIds.SystemIdEventId:
- {
- Debug.Console(2, this, "SystemIdEvent Value: {0}", (Chassis as DmMDMnxn).SystemIdFeedback.UShortValue);
- SystemIdFeebdack.FireUpdate();
- break;
- }
- case DMSystemEventIds.SystemIdBusyEventId:
- {
- Debug.Console(2, this, "SystemIdBusyEvent State: {0}", (Chassis as DmMDMnxn).SystemIdBusy.BoolValue);
- SystemIdBusyFeedback.FireUpdate();
- break;
- }
- }
- }
-
- void Chassis_DMInputChange(Switch device, DMInputEventArgs args)
- {
- switch (args.EventId)
- {
- case DMInputEventIds.EndpointOnlineEventId:
- {
- Debug.Console(2, this, "DM Input EndpointOnlineEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback);
- InputEndpointOnlineFeedbacks[args.Number].FireUpdate();
- break;
- }
- case DMInputEventIds.OnlineFeedbackEventId:
- {
- Debug.Console(2, this, "DM Input OnlineFeedbackEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback);
- InputEndpointOnlineFeedbacks[args.Number].FireUpdate();
- break;
- }
- case DMInputEventIds.VideoDetectedEventId:
- {
- Debug.Console(2, this, "DM Input {0} VideoDetectedEventId", args.Number);
- VideoInputSyncFeedbacks[args.Number].FireUpdate();
- break;
- }
- case DMInputEventIds.InputNameEventId:
- {
- Debug.Console(2, this, "DM Input {0} NameFeedbackEventId", args.Number);
- InputNameFeedbacks[args.Number].FireUpdate();
- break;
- }
- case DMInputEventIds.UsbRoutedToEventId:
- {
- Debug.Console(2, this, "DM Input {0} UsbRoutedToEventId", args.Number);
- if (UsbInputRoutedToFeebacks[args.Number] != null)
- UsbInputRoutedToFeebacks[args.Number].FireUpdate();
- else
- Debug.Console(1, this, "No index of {0} found in UsbInputRoutedToFeedbacks");
- break;
- }
- case DMInputEventIds.HdcpCapabilityFeedbackEventId:
- {
- Debug.Console(2, this, "DM Input {0} HdcpCapabilityFeedbackEventId", args.Number);
- if (InputCardHdcpCapabilityFeedbacks[args.Number] != null)
- InputCardHdcpCapabilityFeedbacks[args.Number].FireUpdate();
- else
- Debug.Console(1, this, "No index of {0} found in InputCardHdcpCapabilityFeedbacks");
- break;
- }
- default:
- {
- Debug.Console(2, this, "DMInputChange fired for Input {0} with Unhandled EventId: {1}", args.Number, args.EventId);
- break;
- }
- }
- }
-
- ///
- ///
- void Chassis_DMOutputChange(Switch device, DMOutputEventArgs args)
- {
- var output = args.Number;
-
- switch (args.EventId)
- {
- case DMOutputEventIds.VolumeEventId:
- {
- if (VolumeControls.ContainsKey(output))
- {
- VolumeControls[args.Number].VolumeEventFromChassis();
- }
-
- break;
- }
- case DMOutputEventIds.EndpointOnlineEventId:
- {
- Debug.Console(2, this, "Output {0} DMOutputEventIds.EndpointOnlineEventId fired. State: {1}", args.Number,
- Chassis.Outputs[output].EndpointOnlineFeedback);
- OutputEndpointOnlineFeedbacks[output].FireUpdate();
- break;
- }
- case DMOutputEventIds.OnlineFeedbackEventId:
- {
- Debug.Console(2, this, "Output {0} DMInputEventIds.OnlineFeedbackEventId fired. State: {1}", args.Number,
- Chassis.Outputs[output].EndpointOnlineFeedback);
- OutputEndpointOnlineFeedbacks[output].FireUpdate();
- break;
- }
- case DMOutputEventIds.VideoOutEventId:
- {
- if (Chassis.Outputs[output].VideoOutFeedback != null)
- Debug.Console(2, this, "DMSwitchVideo:{0} Routed Input:{1} Output:{2}'", this.Name, Chassis.Outputs[output].VideoOutFeedback.Number, output);
-
- if (VideoOutputFeedbacks.ContainsKey(output))
- VideoOutputFeedbacks[output].FireUpdate();
-
- if (OutputVideoRouteNameFeedbacks.ContainsKey(output))
- OutputVideoRouteNameFeedbacks[output].FireUpdate();
-
- break;
- }
- case DMOutputEventIds.AudioOutEventId:
- {
- if (Chassis.Outputs[output].AudioOutFeedback != null)
- Debug.Console(2, this, "DMSwitchAudio:{0} Routed Input:{1} Output:{2}'", this.Name, Chassis.Outputs[output].AudioOutFeedback.Number, output);
-
- if (AudioOutputFeedbacks.ContainsKey(output))
- AudioOutputFeedbacks[output].FireUpdate();
-
- if (OutputAudioRouteNameFeedbacks.ContainsKey(output))
- OutputAudioRouteNameFeedbacks[output].FireUpdate();
-
- break;
- }
- case DMOutputEventIds.OutputNameEventId:
- {
- Debug.Console(2, this, "DM Output {0} NameFeedbackEventId", output);
- OutputNameFeedbacks[output].FireUpdate();
- break;
- }
- case DMOutputEventIds.UsbRoutedToEventId:
- {
- Debug.Console(2, this, "DM Output {0} UsbRoutedToEventId", args.Number);
- UsbOutputRoutedToFeebacks[args.Number].FireUpdate();
- break;
- }
- case DMOutputEventIds.DisabledByHdcpEventId:
- {
- Debug.Console(2, this, "DM Output {0} DisabledByHdcpEventId", args.Number);
- OutputDisabledByHdcpFeedbacks[args.Number].FireUpdate();
- break;
- }
- default:
- {
- Debug.Console(2, this, "DMOutputChange fired for Output {0} with Unhandled EventId: {1}", args.Number, args.EventId);
- break;
- }
- }
- }
-
- ///
- ///
- ///
- ///
- void StartOffTimer(PortNumberType pnt)
- {
- if (RouteOffTimers.ContainsKey(pnt))
- return;
- RouteOffTimers[pnt] = new CTimer(o => { ExecuteSwitch(0, pnt.Number, pnt.Type); }, RouteOffTime);
- }
-
- // Send out sigs when coming online
- void IsOnline_OutputChange(object sender, EventArgs e)
- {
- if (IsOnline.BoolValue)
- {
- (Chassis as DmMDMnxn).EnableAudioBreakaway.BoolValue = true;
- (Chassis as DmMDMnxn).EnableUSBBreakaway.BoolValue = true;
-
- if (InputNames != null)
- foreach (var kvp in InputNames)
- Chassis.Inputs[kvp.Key].Name.StringValue = kvp.Value;
- if (OutputNames != null)
- foreach (var kvp in OutputNames)
- Chassis.Outputs[kvp.Key].Name.StringValue = kvp.Value;
- }
- }
-
- #region IRouting Members
- public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType sigType)
- {
- Debug.Console(2, this, "Making an awesome DM route from {0} to {1} {2}", inputSelector, outputSelector, sigType);
-
- var input = Convert.ToUInt32(inputSelector); // Cast can sometimes fail
- var output = Convert.ToUInt32(outputSelector);
-
- // Check to see if there's an off timer waiting on this and if so, cancel
- var key = new PortNumberType(output, sigType);
- if (input == 0)
- {
- StartOffTimer(key);
- }
- else
- {
- if (RouteOffTimers.ContainsKey(key))
- {
- Debug.Console(2, this, "{0} cancelling route off due to new source", output);
- RouteOffTimers[key].Stop();
- RouteOffTimers.Remove(key);
- }
- }
-
- var inCard = input == 0 ? null : Chassis.Inputs[input];
- var outCard = input == 0 ? null : Chassis.Outputs[output];
-
- // NOTE THAT BITWISE COMPARISONS - TO CATCH ALL ROUTING TYPES
- if ((sigType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
- {
- Chassis.VideoEnter.BoolValue = true;
- Chassis.Outputs[output].VideoOut = inCard;
- }
-
- if ((sigType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
- {
- (Chassis as DmMDMnxn).AudioEnter.BoolValue = true;
- Chassis.Outputs[output].AudioOut = inCard;
- }
-
- if ((sigType | eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput)
- {
- Chassis.USBEnter.BoolValue = true;
- if (Chassis.Outputs[output] != null)
- Chassis.Outputs[output].USBRoutedTo = inCard;
- }
-
- if ((sigType | eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput)
- {
- Chassis.USBEnter.BoolValue = true;
- if (Chassis.Inputs[input] != null)
- Chassis.Inputs[input].USBRoutedTo = outCard;
- }
- }
- #endregion
-
- public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
- {
- var joinMap = new DmChassisControllerJoinMap();
-
- var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
-
- if (!string.IsNullOrEmpty(joinMapSerialized))
- joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
-
-
- joinMap.OffsetJoinNumbers(joinStart);
-
- Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
-
- var chassis = Chassis as DmMDMnxn;
-
- IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
-
- trilist.SetUShortSigAction(joinMap.SystemId, o =>
- {
- if (chassis != null)
- chassis.SystemId.UShortValue = o;
- });
-
- trilist.SetSigTrueAction(joinMap.SystemId, () => {
- if (chassis != null) chassis.ApplySystemId();
- });
-
- SystemIdFeebdack.LinkInputSig(trilist.UShortInput[joinMap.SystemId]);
- SystemIdBusyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.SystemId]);
-
- // Link up outputs
- for (uint i = 1; i <= Chassis.NumberOfOutputs; i++)
- {
- var ioSlot = i;
-
- // Control
- trilist.SetUShortSigAction(joinMap.OutputVideo + ioSlot, o => ExecuteSwitch(o, ioSlot, eRoutingSignalType.Video));
- trilist.SetUShortSigAction(joinMap.OutputAudio + ioSlot, o => ExecuteSwitch(o, ioSlot, eRoutingSignalType.Audio));
- trilist.SetUShortSigAction(joinMap.OutputUsb + ioSlot, o => ExecuteSwitch(o, ioSlot, eRoutingSignalType.UsbOutput));
- trilist.SetUShortSigAction(joinMap.InputUsb + ioSlot, o => ExecuteSwitch(o, ioSlot, eRoutingSignalType.UsbInput));
-
- if (TxDictionary.ContainsKey(ioSlot))
- {
- Debug.Console(2, "Creating Tx Feedbacks {0}", ioSlot);
- var txKey = TxDictionary[ioSlot];
- var basicTxDevice = DeviceManager.GetDeviceForKey(txKey) as DmTxControllerBase;
-
- var advancedTxDevice = basicTxDevice;
-
- if (Chassis is DmMd8x8Cpu3 || Chassis is DmMd8x8Cpu3rps
- || Chassis is DmMd16x16Cpu3 || Chassis is DmMd16x16Cpu3rps
- || Chassis is DmMd32x32Cpu3 || Chassis is DmMd32x32Cpu3rps)
- {
- InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
- }
- else
- {
- if (advancedTxDevice != null)
- {
- advancedTxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
- Debug.Console(2, "Linking Tx Online Feedback from Advanced Transmitter at input {0}", ioSlot);
- }
- else if (InputEndpointOnlineFeedbacks[ioSlot] != null)
- {
- Debug.Console(2, "Linking Tx Online Feedback from Input Card {0}", ioSlot);
- InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
- }
- }
-
- if (basicTxDevice != null && advancedTxDevice == null)
- trilist.BooleanInput[joinMap.TxAdvancedIsPresent + ioSlot].BoolValue = true;
-
- if (advancedTxDevice != null)
- {
- advancedTxDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
- }
- else if (advancedTxDevice == null || basicTxDevice != null)
- {
- Debug.Console(1, "Setting up actions and feedbacks on input card {0}", ioSlot);
- VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
-
- var inputPort = InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)];
- if (inputPort != null)
- {
- Debug.Console(1, "Port value for input card {0} is set", ioSlot);
- var port = inputPort.Port;
-
- if (port != null)
- {
- if (port is HdmiInputWithCEC)
- {
- Debug.Console(1, "Port is HdmiInputWithCec");
-
- var hdmiInPortWCec = port as HdmiInputWithCEC;
-
- if (hdmiInPortWCec.HdcpSupportedLevel != eHdcpSupportedLevel.Unknown)
- {
- SetHdcpStateAction(true, hdmiInPortWCec, joinMap.HdcpSupportState + ioSlot, trilist);
- }
-
- InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]);
-
- if (InputCardHdcpCapabilityTypes.ContainsKey(ioSlot))
- trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = (ushort)InputCardHdcpCapabilityTypes[ioSlot];
- else
- trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = 1;
- }
- }
- }
- else
- {
- inputPort = InputPorts[string.Format("inputCard{0}--dmIn", ioSlot)];
-
- if (inputPort != null)
- {
- var port = inputPort.Port;
-
- if (port is DMInputPortWithCec)
- {
- Debug.Console(1, "Port is DMInputPortWithCec");
-
- var dmInPortWCec = port as DMInputPortWithCec;
-
- if (dmInPortWCec != null)
- {
- SetHdcpStateAction(PropertiesConfig.InputSlotSupportsHdcp2[ioSlot], dmInPortWCec, joinMap.HdcpSupportState + ioSlot, trilist);
- }
-
- InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]);
-
- if (InputCardHdcpCapabilityTypes.ContainsKey(ioSlot))
- trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = (ushort)InputCardHdcpCapabilityTypes[ioSlot];
- else
- trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = 1;
- }
- }
- }
- }
- }
- else
- {
- VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
-
- var inputPort = InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)];
- if (inputPort != null)
- {
- var hdmiPort = inputPort.Port as EndpointHdmiInput;
-
- if (hdmiPort != null)
- {
- SetHdcpStateAction(true, hdmiPort, joinMap.HdcpSupportState + ioSlot, trilist);
- InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]);
- }
- }
- }
-
- if (RxDictionary.ContainsKey(ioSlot))
- {
- Debug.Console(2, "Creating Rx Feedbacks {0}", ioSlot);
- var rxKey = RxDictionary[ioSlot];
- var rxDevice = DeviceManager.GetDeviceForKey(rxKey) as DmRmcControllerBase;
- var hdBaseTDevice = DeviceManager.GetDeviceForKey(rxKey) as DmHdBaseTControllerBase;
- if (Chassis is DmMd8x8Cpu3 || Chassis is DmMd8x8Cpu3rps
- || Chassis is DmMd16x16Cpu3 || Chassis is DmMd16x16Cpu3rps
- || Chassis is DmMd32x32Cpu3 || Chassis is DmMd32x32Cpu3rps || hdBaseTDevice != null)
- {
- OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]);
- }
- else if (rxDevice != null)
- {
- rxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]);
- }
- }
-
- // Feedback
- VideoOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputVideo + ioSlot]);
- AudioOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputAudio + ioSlot]);
- UsbOutputRoutedToFeebacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputUsb + ioSlot]);
- UsbInputRoutedToFeebacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.InputUsb + ioSlot]);
-
- OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames + ioSlot]);
- InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames + ioSlot]);
- OutputVideoRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentVideoInputNames + ioSlot]);
- OutputAudioRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentAudioInputNames + ioSlot]);
-
- OutputDisabledByHdcpFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputDisabledByHdcp + ioSlot]);
- }
- }
-
- private void SetHdcpStateAction(bool hdcpTypeSimple, HdmiInputWithCEC port, uint join, BasicTriList trilist)
- {
- if (hdcpTypeSimple)
- {
- trilist.SetUShortSigAction(join,
- s =>
- {
- if (s == 0)
- {
- port.HdcpSupportOff();
- }
- else if (s > 0)
- {
- port.HdcpSupportOn();
- }
- });
- }
- else
- {
- trilist.SetUShortSigAction(join,
- u =>
- {
- port.HdcpReceiveCapability = (eHdcpCapabilityType)u;
- });
- }
- }
-
- private void SetHdcpStateAction(bool hdcpTypeSimple, EndpointHdmiInput port, uint join, BasicTriList trilist)
- {
- if (hdcpTypeSimple)
- {
- trilist.SetUShortSigAction(join,
- s =>
- {
- if (s == 0)
- {
- port.HdcpSupportOff();
- }
- else if (s > 0)
- {
- port.HdcpSupportOn();
- }
- });
- }
- else
- {
- trilist.SetUShortSigAction(join,
- u =>
- {
- port.HdcpCapability = (eHdcpCapabilityType)u;
- });
- }
- }
-
- private void SetHdcpStateAction(bool supportsHdcp2, DMInputPortWithCec port, uint join, BasicTriList trilist)
- {
- if (!supportsHdcp2)
- {
- trilist.SetUShortSigAction(join,
- s =>
- {
- if (s == 0)
- {
- port.HdcpSupportOff();
- }
- else if (s > 0)
- {
- port.HdcpSupportOn();
- }
- });
- }
- else
- {
- trilist.SetUShortSigAction(join,
- u =>
- {
- port.HdcpReceiveCapability = (eHdcpCapabilityType)u;
- });
- }
- }
- }
-
- public struct PortNumberType
- {
- public uint Number { get; private set; }
- public eRoutingSignalType Type { get; private set; }
-
- public PortNumberType(uint number, eRoutingSignalType type)
- : this()
- {
- Number = number;
- Type = type;
- }
- }
-
- public class DmChassisControllerFactory : EssentialsDeviceFactory
- {
- public DmChassisControllerFactory()
- {
- TypeNames = new List() { "dmmd8x8", "dmmd8x8rps", "dmmd8x8cpu3", "dmmd8x8cpu3rps",
- "dmmd16x16", "dmmd16x16rps", "dmmd16x16cpu3", "dmmd16x16cpu3rps",
- "dmmd32x32", "dmmd32x32rps", "dmmd32x32cpu3", "dmmd32x32cpu3rps",
- "dmmd64x64", "dmmd128x128" };
- }
-
- public override EssentialsDevice BuildDevice(DeviceConfig dc)
- {
- var type = dc.Type.ToLower();
-
- Debug.Console(1, "Factory Attempting to create new DmChassisController Device");
-
- if (type.StartsWith("dmmd8x") || type.StartsWith("dmmd16x") || type.StartsWith("dmmd32x"))
- {
-
- var props = JsonConvert.DeserializeObject
- (dc.Properties.ToString());
- return PepperDash.Essentials.DM.DmChassisController.
- GetDmChassisController(dc.Key, dc.Name, type, props);
- }
- else if (type.StartsWith("dmmd128x") || type.StartsWith("dmmd64x"))
- {
- var props = JsonConvert.DeserializeObject
- (dc.Properties.ToString());
- return PepperDash.Essentials.DM.DmBladeChassisController.
- GetDmChassisController(dc.Key, dc.Name, type, props);
- }
-
- return null;
- }
- }
-
-}
-
+
+using System;
+using System.Collections.Generic;
+using Crestron.SimplSharp;
+using Crestron.SimplSharpPro.DeviceSupport;
+using Crestron.SimplSharpPro.DM;
+using Crestron.SimplSharpPro.DM.Cards;
+using Crestron.SimplSharpPro.DM.Endpoints;
+using Newtonsoft.Json;
+using PepperDash.Core;
+using PepperDash.Essentials.Core;
+using PepperDash.Essentials.Core.Bridges;
+using PepperDash.Essentials.DM.Config;
+using PepperDash.Essentials.Core.Config;
+
+namespace PepperDash.Essentials.DM
+{
+ ///
+ /// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
+ ///
+ ///
+ [Description("Wrapper class for all DM-MD chassis variants from 8x8 to 32x32")]
+ public class DmChassisController : CrestronGenericBridgeableBaseDevice, IDmSwitch, IRoutingInputsOutputs, IRouting, IHasFeedback
+ {
+ public DMChassisPropertiesConfig PropertiesConfig { get; set; }
+
+ public Switch Chassis { get; private set; }
+
+ // Feedbacks for EssentialDM
+ public Dictionary VideoOutputFeedbacks { get; private set; }
+ public Dictionary AudioOutputFeedbacks { get; private set; }
+ public Dictionary VideoInputSyncFeedbacks { get; private set; }
+ public Dictionary InputEndpointOnlineFeedbacks { get; private set; }
+ public Dictionary OutputEndpointOnlineFeedbacks { get; private set; }
+ public Dictionary InputNameFeedbacks { get; private set; }
+ public Dictionary OutputNameFeedbacks { get; private set; }
+ public Dictionary OutputVideoRouteNameFeedbacks { get; private set; }
+ public Dictionary OutputAudioRouteNameFeedbacks { get; private set; }
+ public Dictionary UsbOutputRoutedToFeebacks { get; private set; }
+ public Dictionary UsbInputRoutedToFeebacks { get; private set; }
+ public Dictionary OutputDisabledByHdcpFeedbacks { get; private set; }
+
+ public IntFeedback SystemIdFeebdack { get; private set; }
+ public BoolFeedback SystemIdBusyFeedback { get; private set; }
+
+ public Dictionary InputCardHdcpCapabilityFeedbacks { get; private set; }
+
+ public Dictionary InputCardHdcpCapabilityTypes { get; private set; }
+
+ // Need a couple Lists of generic Backplane ports
+ public RoutingPortCollection InputPorts { get; private set; }
+ public RoutingPortCollection OutputPorts { get; private set; }
+
+ public Dictionary TxDictionary { get; set; }
+ public Dictionary RxDictionary { get; set; }
+
+ //public Dictionary InputCards { get; private set; }
+ //public Dictionary OutputCards { get; private set; }
+
+ public Dictionary InputNames { get; set; }
+ public Dictionary OutputNames { get; set; }
+ public Dictionary VolumeControls { get; private set; }
+
+ public const int RouteOffTime = 500;
+ Dictionary RouteOffTimers = new Dictionary();
+
+ ///
+ /// Text that represents when an output has no source routed to it
+ ///
+ public string NoRouteText = "";
+
+ ///
+ /// Factory method to create a new chassis controller from config data. Limited to 8x8 right now
+ ///
+ public static DmChassisController GetDmChassisController(string key, string name,
+ string type, DMChassisPropertiesConfig properties)
+ {
+ try
+ {
+ type = type.ToLower();
+ uint ipid = properties.Control.IpIdInt;
+
+ DmMDMnxn chassis = null;
+ switch (type) {
+ case "dmmd8x8":
+ chassis = new DmMd8x8(ipid, Global.ControlSystem);
+ break;
+ case "dmmd8x8rps":
+ chassis = new DmMd8x8rps(ipid, Global.ControlSystem);
+ break;
+ case "dmmd8x8cpu3":
+ chassis = new DmMd8x8Cpu3(ipid, Global.ControlSystem);
+ break;
+ case "dmmd8x8cpu3rps":
+ chassis = new DmMd8x8Cpu3rps(ipid, Global.ControlSystem);
+ break;
+ case "dmmd16x16":
+ chassis = new DmMd16x16(ipid, Global.ControlSystem);
+ break;
+ case "dmmd16x16rps":
+ chassis = new DmMd16x16rps(ipid, Global.ControlSystem);
+ break;
+ case "dmmd16x16cpu3":
+ chassis = new DmMd16x16Cpu3(ipid, Global.ControlSystem);
+ break;
+ case "dmmd16x16cpu3rps":
+ chassis = new DmMd16x16Cpu3rps(ipid, Global.ControlSystem);
+ break;
+ case "dmmd32x32":
+ chassis = new DmMd32x32(ipid, Global.ControlSystem);
+ break;
+ case "dmmd32x32rps":
+ chassis = new DmMd32x32rps(ipid, Global.ControlSystem);
+ break;
+ case "dmmd32x32cpu3":
+ chassis = new DmMd32x32Cpu3(ipid, Global.ControlSystem);
+ break;
+ case "dmmd32x32cpu3rps":
+ chassis = new DmMd32x32Cpu3rps(ipid, Global.ControlSystem);
+ break;
+ }
+
+ if (chassis == null)
+ return null;
+
+ var controller = new DmChassisController(key, name, chassis);
+
+ // add the cards and port names
+ foreach (var kvp in properties.InputSlots)
+ controller.AddInputCard(kvp.Value, kvp.Key);
+
+ foreach (var kvp in properties.OutputSlots)
+ controller.AddOutputCard(kvp.Value, kvp.Key);
+
+ foreach (var kvp in properties.VolumeControls)
+ {
+ // get the card
+ // check it for an audio-compatible type
+ // make a something-something that will make it work
+ // retire to mountain village
+ var outNum = kvp.Key;
+ var card = controller.Chassis.Outputs[outNum].Card;
+ Audio.Output audio = null;
+ if (card is DmcHdo)
+ audio = (card as DmcHdo).Audio;
+ else if (card is Dmc4kHdo)
+ audio = (card as Dmc4kHdo).Audio;
+ if (audio == null)
+ continue;
+
+ // wire up the audio to something here...
+ controller.AddVolumeControl(outNum, audio);
+ }
+
+ controller.InputNames = properties.InputNames;
+ controller.OutputNames = properties.OutputNames;
+
+ if (!string.IsNullOrEmpty(properties.NoRouteText))
+ {
+ controller.NoRouteText = properties.NoRouteText;
+ Debug.Console(1, controller, "Setting No Route Text value to: {0}", controller.NoRouteText);
+ }
+ else
+ {
+ Debug.Console(1, controller, "NoRouteText not specified. Defaulting to blank string.", controller.NoRouteText);
+ }
+
+ controller.PropertiesConfig = properties;
+ return controller;
+ }
+ catch (Exception e)
+ {
+ Debug.Console(0, "Error creating DM chassis:\r{0}", e);
+ }
+
+ return null;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public DmChassisController(string key, string name, DmMDMnxn chassis)
+ : base(key, name, chassis)
+ {
+ Chassis = chassis;
+ InputPorts = new RoutingPortCollection();
+ OutputPorts = new RoutingPortCollection();
+ VolumeControls = new Dictionary();
+ TxDictionary = new Dictionary();
+ RxDictionary = new Dictionary();
+ IsOnline.OutputChange += new EventHandler(IsOnline_OutputChange);
+ Chassis.DMInputChange += new DMInputEventHandler(Chassis_DMInputChange);
+ Chassis.DMSystemChange += new DMSystemEventHandler(Chassis_DMSystemChange);
+ Chassis.DMOutputChange += new DMOutputEventHandler(Chassis_DMOutputChange);
+ VideoOutputFeedbacks = new Dictionary();
+ AudioOutputFeedbacks = new Dictionary();
+ UsbOutputRoutedToFeebacks = new Dictionary();
+ UsbInputRoutedToFeebacks = new Dictionary();
+ OutputDisabledByHdcpFeedbacks = new Dictionary();
+ VideoInputSyncFeedbacks = new Dictionary();
+ InputNameFeedbacks = new Dictionary();
+ OutputNameFeedbacks = new Dictionary();
+ OutputVideoRouteNameFeedbacks = new Dictionary();
+ OutputAudioRouteNameFeedbacks = new Dictionary();
+ InputEndpointOnlineFeedbacks = new Dictionary();
+ OutputEndpointOnlineFeedbacks = new Dictionary();
+
+ SystemIdFeebdack = new IntFeedback(() => { return (Chassis as DmMDMnxn).SystemIdFeedback.UShortValue; });
+ SystemIdBusyFeedback = new BoolFeedback(() => { return (Chassis as DmMDMnxn).SystemIdBusy.BoolValue; });
+ InputCardHdcpCapabilityFeedbacks = new Dictionary();
+ InputCardHdcpCapabilityTypes = new Dictionary();
+
+ for (uint x = 1; x <= Chassis.NumberOfOutputs; x++)
+ {
+ var tempX = x;
+
+ if (Chassis.Outputs[tempX] != null)
+ {
+ VideoOutputFeedbacks[tempX] = new IntFeedback(() => {
+ if (Chassis.Outputs[tempX].VideoOutFeedback != null)
+ return (ushort)Chassis.Outputs[tempX].VideoOutFeedback.Number;
+
+ return 0;
+ });
+ AudioOutputFeedbacks[tempX] = new IntFeedback(() => {
+ if (Chassis.Outputs[tempX].AudioOutFeedback != null)
+ return (ushort)Chassis.Outputs[tempX].AudioOutFeedback.Number;
+
+ return 0;
+ });
+ UsbOutputRoutedToFeebacks[tempX] = new IntFeedback(() => {
+ if (Chassis.Outputs[tempX].USBRoutedToFeedback != null)
+ return (ushort)Chassis.Outputs[tempX].USBRoutedToFeedback.Number;
+
+ return 0;
+ });
+
+ OutputNameFeedbacks[tempX] = new StringFeedback(() => {
+ if (Chassis.Outputs[tempX].NameFeedback != null)
+ return Chassis.Outputs[tempX].NameFeedback.StringValue;
+
+ return "";
+ });
+ OutputVideoRouteNameFeedbacks[tempX] = new StringFeedback(() => {
+ if (Chassis.Outputs[tempX].VideoOutFeedback != null)
+ return Chassis.Outputs[tempX].VideoOutFeedback.NameFeedback.StringValue;
+
+ return NoRouteText;
+ });
+ OutputAudioRouteNameFeedbacks[tempX] = new StringFeedback(() => {
+ if (Chassis.Outputs[tempX].AudioOutFeedback != null)
+ return Chassis.Outputs[tempX].AudioOutFeedback.NameFeedback.StringValue;
+
+ return NoRouteText;
+ });
+ OutputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => Chassis.Outputs[tempX].EndpointOnlineFeedback);
+
+ OutputDisabledByHdcpFeedbacks[tempX] = new BoolFeedback(() => {
+ var output = Chassis.Outputs[tempX];
+
+ var hdmiTxOutput = output as Card.HdmiTx;
+ if (hdmiTxOutput != null)
+ return hdmiTxOutput.HdmiOutput.DisabledByHdcp.BoolValue;
+
+ var dmHdmiOutput = output as Card.DmHdmiOutput;
+ if (dmHdmiOutput != null)
+ return dmHdmiOutput.DisabledByHdcpFeedback.BoolValue;
+
+ var dmsDmOutAdvanced = output as Card.DmsDmOutAdvanced;
+ if (dmsDmOutAdvanced != null)
+ return dmsDmOutAdvanced.DisabledByHdcpFeedback.BoolValue;
+
+ var dmps3HdmiAudioOutput = output as Card.Dmps3HdmiAudioOutput;
+ if (dmps3HdmiAudioOutput != null)
+ return dmps3HdmiAudioOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
+
+ var dmps3HdmiOutput = output as Card.Dmps3HdmiOutput;
+ if (dmps3HdmiOutput != null)
+ return dmps3HdmiOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
+
+ var dmps3HdmiOutputBackend = output as Card.Dmps3HdmiOutputBackend;
+ if (dmps3HdmiOutputBackend != null)
+ return dmps3HdmiOutputBackend.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
+
+ // var hdRx4kX10HdmiOutput = output as HdRx4kX10HdmiOutput;
+ // if (hdRx4kX10HdmiOutput != null)
+ // return hdRx4kX10HdmiOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
+
+ // var hdMdNxMHdmiOutput = output as HdMdNxMHdmiOutput;
+ // if (hdMdNxMHdmiOutput != null)
+ // return hdMdNxMHdmiOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
+
+ return false;
+ });
+ }
+
+ if (Chassis.Inputs[tempX] != null)
+ {
+ UsbInputRoutedToFeebacks[tempX] = new IntFeedback(() => {
+ if (Chassis.Inputs[tempX].USBRoutedToFeedback != null)
+ return (ushort)Chassis.Inputs[tempX].USBRoutedToFeedback.Number;
+
+ return 0;
+ });
+ VideoInputSyncFeedbacks[tempX] = new BoolFeedback(() => {
+ if (Chassis.Inputs[tempX].VideoDetectedFeedback != null)
+ return Chassis.Inputs[tempX].VideoDetectedFeedback.BoolValue;
+
+ return false;
+ });
+ InputNameFeedbacks[tempX] = new StringFeedback(() => {
+ if (Chassis.Inputs[tempX].NameFeedback != null)
+ return Chassis.Inputs[tempX].NameFeedback.StringValue;
+
+ return "";
+ });
+
+ InputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => { return Chassis.Inputs[tempX].EndpointOnlineFeedback; });
+
+ InputCardHdcpCapabilityFeedbacks[tempX] = new IntFeedback(() => {
+ var inputCard = Chassis.Inputs[tempX];
+
+ if (inputCard.Card is DmcHd)
+ {
+ InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
+
+ if ((inputCard.Card as DmcHd).HdmiInput.HdcpSupportOnFeedback.BoolValue)
+ return 1;
+ return 0;
+ }
+
+ if (inputCard.Card is DmcHdDsp)
+ {
+ InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
+
+ if ((inputCard.Card as DmcHdDsp).HdmiInput.HdcpSupportOnFeedback.BoolValue)
+ return 1;
+ return 0;
+ }
+ if (inputCard.Card is Dmc4kHdBase)
+ {
+ InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support;
+ return (int)(inputCard.Card as Dmc4kHdBase).HdmiInput.HdcpReceiveCapability;
+ }
+ if (inputCard.Card is Dmc4kCBase)
+ {
+ if (PropertiesConfig.InputSlotSupportsHdcp2[tempX])
+ {
+ InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
+ return (int)(inputCard.Card as Dmc4kCBase).DmInput.HdcpReceiveCapability;
+ }
+
+ if ((inputCard.Card as Dmc4kCBase).DmInput.HdcpSupportOnFeedback.BoolValue)
+ return 1;
+ return 0;
+ }
+ if (inputCard.Card is Dmc4kCDspBase)
+ {
+ if (PropertiesConfig.InputSlotSupportsHdcp2[tempX])
+ {
+ InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
+ return (int)(inputCard.Card as Dmc4kCDspBase).DmInput.HdcpReceiveCapability;
+ }
+
+ if ((inputCard.Card as Dmc4kCDspBase).DmInput.HdcpSupportOnFeedback.BoolValue)
+ return 1;
+
+ return 0;
+ }
+ return 0;
+ });
+ }
+ }
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public void AddInputCard(string type, uint number)
+ {
+ Debug.Console(2, this, "Adding input card '{0}', slot {1}", type, number);
+
+ type = type.ToLower();
+
+ if (type == "dmchd")
+ {
+ var inputCard = new DmcHd(number, this.Chassis);
+ var cecPort = inputCard.HdmiInput as ICec;
+ AddHdmiInCardPorts(number, cecPort);
+ }
+ else if (type == "dmchddsp")
+ {
+ var inputCard = new DmcHdDsp(number, this.Chassis);
+ var cecPort = inputCard.HdmiInput as ICec;
+ AddHdmiInCardPorts(number, cecPort);
+ }
+ else if (type == "dmc4khd")
+ {
+ var inputCard = new Dmc4kHd(number, this.Chassis);
+ var cecPort = inputCard.HdmiInput as ICec;
+ AddHdmiInCardPorts(number, cecPort);
+ }
+ else if (type == "dmc4khddsp")
+ {
+ var inputCard = new Dmc4kHdDsp(number, this.Chassis);
+ var cecPort = inputCard.HdmiInput as ICec;
+ AddHdmiInCardPorts(number, cecPort);
+ }
+ else if (type == "dmc4kzhd")
+ {
+ var inputCard = new Dmc4kzHd(number, this.Chassis);
+ var cecPort = inputCard.HdmiInput as ICec;
+ AddHdmiInCardPorts(number, cecPort);
+ }
+ else if (type == "dmc4kzhddsp")
+ {
+ var inputCard = new Dmc4kzHdDsp(number, this.Chassis);
+ var cecPort = inputCard.HdmiInput as ICec;
+ AddHdmiInCardPorts(number, cecPort);
+ }
+ else if (type == "dmcc")
+ {
+ var inputCard = new DmcC(number, this.Chassis);
+ var cecPort = inputCard.DmInput as ICec;
+ AddDmInCardPorts(number, cecPort);
+ }
+ else if (type == "dmccdsp")
+ {
+ var inputCard = new DmcCDsp(number, this.Chassis);
+ var cecPort = inputCard.DmInput as ICec;
+ AddDmInCardPorts(number, cecPort);
+ }
+ else if (type == "dmc4kc")
+ {
+ var inputCard = new Dmc4kC(number, this.Chassis);
+ var cecPort = inputCard.DmInput as ICec;
+ AddDmInCardPorts(number, cecPort);
+ }
+ else if (type == "dmc4kcdsp")
+ {
+ var inputCard = new Dmc4kCDsp(number, this.Chassis);
+ var cecPort = inputCard.DmInput as ICec;
+ AddDmInCardPorts(number, cecPort);
+ }
+ else if (type == "dmc4kzc")
+ {
+ var inputCard = new Dmc4kzC(number, this.Chassis);
+ var cecPort = inputCard.DmInput as ICec;
+ AddDmInCardPorts(number, cecPort);
+ }
+ else if (type == "dmc4kzcdsp")
+ {
+ var inputCard = new Dmc4kzCDsp(number, this.Chassis);
+ var cecPort = inputCard.DmInput as ICec;
+ AddDmInCardPorts(number, cecPort);
+ }
+ else if (type == "dmccat")
+ {
+ new DmcCat(number, this.Chassis);
+ AddDmInCardPorts(number);
+ }
+ else if (type == "dmccatdsp")
+ {
+ new DmcCatDsp(number, this.Chassis);
+ AddDmInCardPorts(number);
+ }
+ else if (type == "dmcs")
+ {
+ new DmcS(number, Chassis);
+ AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber);
+ AddInCardHdmiAndAudioLoopPorts(number);
+ }
+ else if (type == "dmcsdsp")
+ {
+ new DmcSDsp(number, Chassis);
+ AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber);
+ AddInCardHdmiAndAudioLoopPorts(number);
+ }
+ else if (type == "dmcs2")
+ {
+ new DmcS2(number, Chassis);
+ AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber);
+ AddInCardHdmiAndAudioLoopPorts(number);
+ }
+ else if (type == "dmcs2dsp")
+ {
+ new DmcS2Dsp(number, Chassis);
+ AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber);
+ AddInCardHdmiAndAudioLoopPorts(number);
+ }
+ else if (type == "dmcsdi")
+ {
+ new DmcSdi(number, Chassis);
+ AddInputPortWithDebug(number, "sdiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Sdi);
+ AddOutputPortWithDebug(string.Format("inputCard{0}", number), "sdiOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.Sdi, null);
+ AddInCardHdmiAndAudioLoopPorts(number);
+ }
+ else if (type == "dmcdvi")
+ {
+ new DmcDvi(number, Chassis);
+ AddInputPortWithDebug(number, "dviIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Dvi);
+ AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
+ AddInCardHdmiLoopPort(number);
+ }
+ else if (type == "dmcvga")
+ {
+ new DmcVga(number, Chassis);
+ AddInputPortWithDebug(number, "vgaIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Vga);
+ AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
+ AddInCardHdmiLoopPort(number);
+ }
+ else if (type == "dmcvidbnc")
+ {
+ new DmcVidBnc(number, Chassis);
+ AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component);
+ AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
+ AddInCardHdmiLoopPort(number);
+ }
+ else if (type == "dmcvidrcaa")
+ {
+ new DmcVidRcaA(number, Chassis);
+ AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component);
+ AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
+ AddInCardHdmiLoopPort(number);
+ }
+ else if (type == "dmcvidrcad")
+ {
+ new DmcVidRcaD(number, Chassis);
+ AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component);
+ AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.DigitalAudio);
+ AddInCardHdmiLoopPort(number);
+ }
+ else if (type == "dmcvid4")
+ {
+ new DmcVid4(number, Chassis);
+ AddInputPortWithDebug(number, "compositeIn1", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
+ AddInputPortWithDebug(number, "compositeIn2", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
+ AddInputPortWithDebug(number, "compositeIn3", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
+ AddInputPortWithDebug(number, "compositeIn4", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
+ AddInCardHdmiLoopPort(number);
+ }
+ else if (type == "dmcstr")
+ {
+ new DmcStr(number, Chassis);
+ AddInputPortWithDebug(number, "streamIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming);
+ AddInCardHdmiAndAudioLoopPorts(number);
+ }
+ }
+
+ void AddDmInCardPorts(uint number)
+ {
+ AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat);
+ AddInCardHdmiAndAudioLoopPorts(number);
+ }
+
+ void AddDmInCardPorts(uint number, ICec cecPort)
+ {
+ AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, cecPort);
+ AddInCardHdmiAndAudioLoopPorts(number);
+ }
+
+ void AddHdmiInCardPorts(uint number, ICec cecPort)
+ {
+ AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort);
+ AddInCardHdmiAndAudioLoopPorts(number);
+ }
+
+ void AddInCardHdmiAndAudioLoopPorts(uint number)
+ {
+ AddOutputPortWithDebug(string.Format("inputCard{0}", number), "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.Hdmi, null);
+ AddOutputPortWithDebug(string.Format("inputCard{0}", number), "audioLoopOut", eRoutingSignalType.Audio, eRoutingPortConnectionType.Hdmi, null);
+ }
+
+ void AddInCardHdmiLoopPort(uint number)
+ {
+ AddOutputPortWithDebug(string.Format("inputCard{0}", number), "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.Hdmi, null);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public void AddOutputCard(string type, uint number)
+ {
+ type = type.ToLower();
+
+ Debug.Console(2, this, "Adding output card '{0}', slot {1}", type, number);
+ if (type == "dmc4khdo")
+ {
+ var outputCard = new Dmc4kHdoSingle(number, Chassis);
+ var cecPort1 = outputCard.Card1.HdmiOutput;
+ var cecPort2 = outputCard.Card2.HdmiOutput;
+ AddDmcHdoPorts(number, cecPort1, cecPort2);
+ }
+ else if (type == "dmchdo")
+ {
+ var outputCard = new DmcHdoSingle(number, Chassis);
+ var cecPort1 = outputCard.Card1.HdmiOutput;
+ var cecPort2 = outputCard.Card2.HdmiOutput;
+ AddDmcHdoPorts(number, cecPort1, cecPort2);
+ }
+ else if (type == "dmc4kcohd")
+ {
+ var outputCard = new Dmc4kCoHdSingle(number, Chassis);
+ var cecPort1 = outputCard.Card1.HdmiOutput;
+ AddDmcCoPorts(number, cecPort1);
+ }
+ else if (type == "dmc4kzcohd")
+ {
+ var outputCard = new Dmc4kzCoHdSingle(number, Chassis);
+ var cecPort1 = outputCard.Card1.HdmiOutput;
+ AddDmcCoPorts(number, cecPort1);
+ }
+ else if (type == "dmccohd")
+ {
+ var outputCard = new DmcCoHdSingle(number, Chassis);
+ var cecPort1 = outputCard.Card1.HdmiOutput;
+ AddDmcCoPorts(number, cecPort1);
+ }
+ else if (type == "dmccatohd")
+ {
+ var outputCard = new DmcCatoHdSingle(number, Chassis);
+ var cecPort1 = outputCard.Card1.HdmiOutput;
+ AddDmcCoPorts(number, cecPort1);
+ }
+ else if (type == "dmcsohd")
+ {
+ var outputCard = new DmcSoHdSingle(number, Chassis);
+ var cecPort1 = outputCard.Card1.HdmiOutput;
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.DmMmFiber, 2 * (number - 1) + 1);
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.DmMmFiber, 2 * (number - 1) + 2);
+ }
+ else if (type == "dmcs2ohd")
+ {
+ var outputCard = new DmcS2oHdSingle(number, Chassis);
+ var cecPort1 = outputCard.Card1.HdmiOutput;
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.DmSmFiber, 2 * (number - 1) + 1);
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.DmSmFiber, 2 * (number - 1) + 2);
+ }
+ else if (type == "dmcstro")
+ {
+ var outputCard = new DmcStroSingle(number, Chassis);
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "streamOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.Streaming, 2 * (number - 1) + 1);
+ }
+
+ else
+ Debug.Console(1, this, " WARNING: Output card type '{0}' is not available", type);
+ }
+
+ void AddDmcHdoPorts(uint number, ICec cecPort1, ICec cecPort2)
+ {
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "audioOut1", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio,
+ 2 * (number - 1) + 1);
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 2, cecPort2);
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "audioOut2", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio,
+ 2 * (number - 1) + 2);
+ }
+
+ void AddDmcCoPorts(uint number, ICec cecPort1)
+ {
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.DmCat, 2 * (number - 1) + 1);
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.DmCat, 2 * (number - 1) + 2);
+ }
+
+ ///
+ /// Adds InputPort
+ ///
+ void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType)
+ {
+ var portKey = string.Format("inputCard{0}--{1}", cardNum, portName);
+ Debug.Console(2, this, "Adding input port '{0}'", portKey);
+ var inputPort = new RoutingInputPort(portKey, sigType, portType, cardNum, this);
+
+ InputPorts.Add(inputPort);
+ }
+
+ ///
+ /// Adds InputPort and sets Port as ICec object
+ ///
+ void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, ICec cecPort)
+ {
+ var portKey = string.Format("inputCard{0}--{1}", cardNum, portName);
+ Debug.Console(2, this, "Adding input port '{0}'", portKey);
+ var inputPort = new RoutingInputPort(portKey, sigType, portType, cardNum, this);
+
+ if (cecPort != null)
+ inputPort.Port = cecPort;
+
+ InputPorts.Add(inputPort);
+ }
+
+ ///
+ /// Adds OutputPort
+ ///
+ void AddOutputPortWithDebug(string cardName, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector)
+ {
+ var portKey = string.Format("{0}--{1}", cardName, portName);
+ Debug.Console(2, this, "Adding output port '{0}'", portKey);
+ OutputPorts.Add(new RoutingOutputPort(portKey, sigType, portType, selector, this));
+ }
+
+ ///
+ /// Adds OutputPort and sets Port as ICec object
+ ///
+ void AddOutputPortWithDebug(string cardName, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector, ICec cecPort)
+ {
+ var portKey = string.Format("{0}--{1}", cardName, portName);
+ Debug.Console(2, this, "Adding output port '{0}'", portKey);
+ var outputPort = new RoutingOutputPort(portKey, sigType, portType, selector, this);
+
+ if (cecPort != null)
+ outputPort.Port = cecPort;
+
+ OutputPorts.Add(outputPort);
+ }
+
+ ///
+ ///
+ ///
+ void AddVolumeControl(uint number, Audio.Output audio)
+ {
+ VolumeControls.Add(number, new DmCardAudioOutputController(audio));
+ }
+
+ //public void SetInputHdcpSupport(uint input, ePdtHdcpSupport hdcpSetting)
+ //{
+
+ //}
+
+ void Chassis_DMSystemChange(Switch device, DMSystemEventArgs args)
+ {
+ switch (args.EventId)
+ {
+ case DMSystemEventIds.SystemIdEventId:
+ {
+ Debug.Console(2, this, "SystemIdEvent Value: {0}", (Chassis as DmMDMnxn).SystemIdFeedback.UShortValue);
+ SystemIdFeebdack.FireUpdate();
+ break;
+ }
+ case DMSystemEventIds.SystemIdBusyEventId:
+ {
+ Debug.Console(2, this, "SystemIdBusyEvent State: {0}", (Chassis as DmMDMnxn).SystemIdBusy.BoolValue);
+ SystemIdBusyFeedback.FireUpdate();
+ break;
+ }
+ }
+ }
+
+ void Chassis_DMInputChange(Switch device, DMInputEventArgs args)
+ {
+ switch (args.EventId)
+ {
+ case DMInputEventIds.EndpointOnlineEventId:
+ {
+ Debug.Console(2, this, "DM Input EndpointOnlineEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback);
+ InputEndpointOnlineFeedbacks[args.Number].FireUpdate();
+ break;
+ }
+ case DMInputEventIds.OnlineFeedbackEventId:
+ {
+ Debug.Console(2, this, "DM Input OnlineFeedbackEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback);
+ InputEndpointOnlineFeedbacks[args.Number].FireUpdate();
+ break;
+ }
+ case DMInputEventIds.VideoDetectedEventId:
+ {
+ Debug.Console(2, this, "DM Input {0} VideoDetectedEventId", args.Number);
+ VideoInputSyncFeedbacks[args.Number].FireUpdate();
+ break;
+ }
+ case DMInputEventIds.InputNameEventId:
+ {
+ Debug.Console(2, this, "DM Input {0} NameFeedbackEventId", args.Number);
+ InputNameFeedbacks[args.Number].FireUpdate();
+ break;
+ }
+ case DMInputEventIds.UsbRoutedToEventId:
+ {
+ Debug.Console(2, this, "DM Input {0} UsbRoutedToEventId", args.Number);
+ if (UsbInputRoutedToFeebacks[args.Number] != null)
+ UsbInputRoutedToFeebacks[args.Number].FireUpdate();
+ else
+ Debug.Console(1, this, "No index of {0} found in UsbInputRoutedToFeedbacks");
+ break;
+ }
+ case DMInputEventIds.HdcpCapabilityFeedbackEventId:
+ {
+ Debug.Console(2, this, "DM Input {0} HdcpCapabilityFeedbackEventId", args.Number);
+ if (InputCardHdcpCapabilityFeedbacks[args.Number] != null)
+ InputCardHdcpCapabilityFeedbacks[args.Number].FireUpdate();
+ else
+ Debug.Console(1, this, "No index of {0} found in InputCardHdcpCapabilityFeedbacks");
+ break;
+ }
+ default:
+ {
+ Debug.Console(2, this, "DMInputChange fired for Input {0} with Unhandled EventId: {1}", args.Number, args.EventId);
+ break;
+ }
+ }
+ }
+
+ ///
+ ///
+ void Chassis_DMOutputChange(Switch device, DMOutputEventArgs args)
+ {
+ var output = args.Number;
+
+ switch (args.EventId)
+ {
+ case DMOutputEventIds.VolumeEventId:
+ {
+ if (VolumeControls.ContainsKey(output))
+ {
+ VolumeControls[args.Number].VolumeEventFromChassis();
+ }
+
+ break;
+ }
+ case DMOutputEventIds.EndpointOnlineEventId:
+ {
+ Debug.Console(2, this, "Output {0} DMOutputEventIds.EndpointOnlineEventId fired. State: {1}", args.Number,
+ Chassis.Outputs[output].EndpointOnlineFeedback);
+ OutputEndpointOnlineFeedbacks[output].FireUpdate();
+ break;
+ }
+ case DMOutputEventIds.OnlineFeedbackEventId:
+ {
+ Debug.Console(2, this, "Output {0} DMInputEventIds.OnlineFeedbackEventId fired. State: {1}", args.Number,
+ Chassis.Outputs[output].EndpointOnlineFeedback);
+ OutputEndpointOnlineFeedbacks[output].FireUpdate();
+ break;
+ }
+ case DMOutputEventIds.VideoOutEventId:
+ {
+ if (Chassis.Outputs[output].VideoOutFeedback != null)
+ Debug.Console(2, this, "DMSwitchVideo:{0} Routed Input:{1} Output:{2}'", this.Name, Chassis.Outputs[output].VideoOutFeedback.Number, output);
+
+ if (VideoOutputFeedbacks.ContainsKey(output))
+ VideoOutputFeedbacks[output].FireUpdate();
+
+ if (OutputVideoRouteNameFeedbacks.ContainsKey(output))
+ OutputVideoRouteNameFeedbacks[output].FireUpdate();
+
+ break;
+ }
+ case DMOutputEventIds.AudioOutEventId:
+ {
+ if (Chassis.Outputs[output].AudioOutFeedback != null)
+ Debug.Console(2, this, "DMSwitchAudio:{0} Routed Input:{1} Output:{2}'", this.Name, Chassis.Outputs[output].AudioOutFeedback.Number, output);
+
+ if (AudioOutputFeedbacks.ContainsKey(output))
+ AudioOutputFeedbacks[output].FireUpdate();
+
+ if (OutputAudioRouteNameFeedbacks.ContainsKey(output))
+ OutputAudioRouteNameFeedbacks[output].FireUpdate();
+
+ break;
+ }
+ case DMOutputEventIds.OutputNameEventId:
+ {
+ Debug.Console(2, this, "DM Output {0} NameFeedbackEventId", output);
+ OutputNameFeedbacks[output].FireUpdate();
+ break;
+ }
+ case DMOutputEventIds.UsbRoutedToEventId:
+ {
+ Debug.Console(2, this, "DM Output {0} UsbRoutedToEventId", args.Number);
+ UsbOutputRoutedToFeebacks[args.Number].FireUpdate();
+ break;
+ }
+ case DMOutputEventIds.DisabledByHdcpEventId:
+ {
+ Debug.Console(2, this, "DM Output {0} DisabledByHdcpEventId", args.Number);
+ OutputDisabledByHdcpFeedbacks[args.Number].FireUpdate();
+ break;
+ }
+ default:
+ {
+ Debug.Console(2, this, "DMOutputChange fired for Output {0} with Unhandled EventId: {1}", args.Number, args.EventId);
+ break;
+ }
+ }
+ }
+
+ ///
+ ///
+ ///
+ ///
+ void StartOffTimer(PortNumberType pnt)
+ {
+ if (RouteOffTimers.ContainsKey(pnt))
+ return;
+ RouteOffTimers[pnt] = new CTimer(o => { ExecuteSwitch(0, pnt.Number, pnt.Type); }, RouteOffTime);
+ }
+
+ // Send out sigs when coming online
+ void IsOnline_OutputChange(object sender, EventArgs e)
+ {
+ if (IsOnline.BoolValue)
+ {
+ (Chassis as DmMDMnxn).EnableAudioBreakaway.BoolValue = true;
+ (Chassis as DmMDMnxn).EnableUSBBreakaway.BoolValue = true;
+
+ if (InputNames != null)
+ foreach (var kvp in InputNames)
+ Chassis.Inputs[kvp.Key].Name.StringValue = kvp.Value;
+ if (OutputNames != null)
+ foreach (var kvp in OutputNames)
+ Chassis.Outputs[kvp.Key].Name.StringValue = kvp.Value;
+ }
+ }
+
+ #region IRouting Members
+ public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType sigType)
+ {
+ Debug.Console(2, this, "Making an awesome DM route from {0} to {1} {2}", inputSelector, outputSelector, sigType);
+
+ var input = Convert.ToUInt32(inputSelector); // Cast can sometimes fail
+ var output = Convert.ToUInt32(outputSelector);
+
+ // Check to see if there's an off timer waiting on this and if so, cancel
+ var key = new PortNumberType(output, sigType);
+ if (input == 0)
+ {
+ StartOffTimer(key);
+ }
+ else
+ {
+ if (RouteOffTimers.ContainsKey(key))
+ {
+ Debug.Console(2, this, "{0} cancelling route off due to new source", output);
+ RouteOffTimers[key].Stop();
+ RouteOffTimers.Remove(key);
+ }
+ }
+
+ var inCard = input == 0 ? null : Chassis.Inputs[input];
+ var outCard = input == 0 ? null : Chassis.Outputs[output];
+
+ // NOTE THAT BITWISE COMPARISONS - TO CATCH ALL ROUTING TYPES
+ if ((sigType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
+ {
+ Chassis.VideoEnter.BoolValue = true;
+ Chassis.Outputs[output].VideoOut = inCard;
+ }
+
+ if ((sigType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
+ {
+ (Chassis as DmMDMnxn).AudioEnter.BoolValue = true;
+ Chassis.Outputs[output].AudioOut = inCard;
+ }
+
+ if ((sigType | eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput)
+ {
+ Chassis.USBEnter.BoolValue = true;
+ if (Chassis.Outputs[output] != null)
+ Chassis.Outputs[output].USBRoutedTo = inCard;
+ }
+
+ if ((sigType | eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput)
+ {
+ Chassis.USBEnter.BoolValue = true;
+ if (Chassis.Inputs[input] != null)
+ Chassis.Inputs[input].USBRoutedTo = outCard;
+ }
+ }
+ #endregion
+
+ public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
+ {
+ var joinMap = new DmChassisControllerJoinMap(joinStart);
+
+ var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
+
+ if (!string.IsNullOrEmpty(joinMapSerialized))
+ joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
+
+ bridge.AddJoinMap(Key, joinMap);
+
+ Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
+
+ var chassis = Chassis as DmMDMnxn;
+
+ IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
+
+ trilist.SetUShortSigAction(joinMap.SystemId.JoinNumber, o =>
+ {
+ if (chassis != null)
+ chassis.SystemId.UShortValue = o;
+ });
+
+ trilist.SetSigTrueAction(joinMap.SystemId.JoinNumber, () =>
+ {
+ if (chassis != null) chassis.ApplySystemId();
+ });
+
+ SystemIdFeebdack.LinkInputSig(trilist.UShortInput[joinMap.SystemId.JoinNumber]);
+ SystemIdBusyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.SystemId.JoinNumber]);
+
+ // Link up outputs
+ for (uint i = 1; i <= Chassis.NumberOfOutputs; i++)
+ {
+ var ioSlot = i;
+ var ioSlotJoin = ioSlot - 1;
+
+ // Control
+ trilist.SetUShortSigAction(joinMap.OutputVideo.JoinNumber + ioSlotJoin, o => ExecuteSwitch(o, ioSlot, eRoutingSignalType.Video));
+ trilist.SetUShortSigAction(joinMap.OutputAudio.JoinNumber + ioSlotJoin, o => ExecuteSwitch(o, ioSlot, eRoutingSignalType.Audio));
+ trilist.SetUShortSigAction(joinMap.OutputUsb.JoinNumber + ioSlotJoin, o => ExecuteSwitch(o, ioSlot, eRoutingSignalType.UsbOutput));
+ trilist.SetUShortSigAction(joinMap.InputUsb.JoinNumber + ioSlotJoin, o => ExecuteSwitch(o, ioSlot, eRoutingSignalType.UsbInput));
+
+ if (TxDictionary.ContainsKey(ioSlot))
+ {
+ Debug.Console(2, "Creating Tx Feedbacks {0}", ioSlot);
+ var txKey = TxDictionary[ioSlot];
+ var basicTxDevice = DeviceManager.GetDeviceForKey(txKey) as DmTxControllerBase;
+
+ var advancedTxDevice = basicTxDevice;
+
+ if (Chassis is DmMd8x8Cpu3 || Chassis is DmMd8x8Cpu3rps
+ || Chassis is DmMd16x16Cpu3 || Chassis is DmMd16x16Cpu3rps
+ || Chassis is DmMd32x32Cpu3 || Chassis is DmMd32x32Cpu3rps)
+ {
+ InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]);
+ }
+ else
+ {
+ if (advancedTxDevice != null)
+ {
+ advancedTxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]);
+ Debug.Console(2, "Linking Tx Online Feedback from Advanced Transmitter at input {0}", ioSlot);
+ }
+ else if (InputEndpointOnlineFeedbacks[ioSlot] != null)
+ {
+ Debug.Console(2, "Linking Tx Online Feedback from Input Card {0}", ioSlot);
+ InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]);
+ }
+ }
+
+ if (basicTxDevice != null && advancedTxDevice == null)
+ trilist.BooleanInput[joinMap.TxAdvancedIsPresent.JoinNumber + ioSlotJoin].BoolValue = true;
+
+ if (advancedTxDevice != null)
+ {
+ advancedTxDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]);
+ }
+ else if (advancedTxDevice == null || basicTxDevice != null)
+ {
+ Debug.Console(1, "Setting up actions and feedbacks on input card {0}", ioSlot);
+ VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]);
+
+ var inputPort = InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)];
+ if (inputPort != null)
+ {
+ Debug.Console(1, "Port value for input card {0} is set", ioSlot);
+ var port = inputPort.Port;
+
+ if (port != null)
+ {
+ if (port is HdmiInputWithCEC)
+ {
+ Debug.Console(1, "Port is HdmiInputWithCec");
+
+ var hdmiInPortWCec = port as HdmiInputWithCEC;
+
+ if (hdmiInPortWCec.HdcpSupportedLevel != eHdcpSupportedLevel.Unknown)
+ {
+ SetHdcpStateAction(true, hdmiInPortWCec, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist);
+ }
+
+ InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]);
+
+ if (InputCardHdcpCapabilityTypes.ContainsKey(ioSlot))
+ trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = (ushort)InputCardHdcpCapabilityTypes[ioSlot];
+ else
+ trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = 1;
+ }
+ }
+ }
+ else
+ {
+ inputPort = InputPorts[string.Format("inputCard{0}--dmIn", ioSlot)];
+
+ if (inputPort != null)
+ {
+ var port = inputPort.Port;
+
+ if (port is DMInputPortWithCec)
+ {
+ Debug.Console(1, "Port is DMInputPortWithCec");
+
+ var dmInPortWCec = port as DMInputPortWithCec;
+
+ if (dmInPortWCec != null)
+ {
+ SetHdcpStateAction(PropertiesConfig.InputSlotSupportsHdcp2[ioSlot], dmInPortWCec, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist);
+ }
+
+ InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]);
+
+ if (InputCardHdcpCapabilityTypes.ContainsKey(ioSlot))
+ trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = (ushort)InputCardHdcpCapabilityTypes[ioSlot];
+ else
+ trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = 1;
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]);
+
+ var inputPort = InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)];
+ if (inputPort != null)
+ {
+ var hdmiPort = inputPort.Port as EndpointHdmiInput;
+
+ if (hdmiPort != null)
+ {
+ SetHdcpStateAction(true, hdmiPort, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist);
+ InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]);
+ }
+ }
+ }
+
+ if (RxDictionary.ContainsKey(ioSlot))
+ {
+ Debug.Console(2, "Creating Rx Feedbacks {0}", ioSlot);
+ var rxKey = RxDictionary[ioSlot];
+ var rxDevice = DeviceManager.GetDeviceForKey(rxKey) as DmRmcControllerBase;
+ var hdBaseTDevice = DeviceManager.GetDeviceForKey(rxKey) as DmHdBaseTControllerBase;
+ if (Chassis is DmMd8x8Cpu3 || Chassis is DmMd8x8Cpu3rps
+ || Chassis is DmMd16x16Cpu3 || Chassis is DmMd16x16Cpu3rps
+ || Chassis is DmMd32x32Cpu3 || Chassis is DmMd32x32Cpu3rps || hdBaseTDevice != null)
+ {
+ OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline.JoinNumber + ioSlotJoin]);
+ }
+ else if (rxDevice != null)
+ {
+ rxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline.JoinNumber + ioSlotJoin]);
+ }
+ }
+
+ // Feedback
+ VideoOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputVideo.JoinNumber + ioSlotJoin]);
+ AudioOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputAudio.JoinNumber + ioSlotJoin]);
+ UsbOutputRoutedToFeebacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputUsb.JoinNumber + ioSlotJoin]);
+ UsbInputRoutedToFeebacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.InputUsb.JoinNumber + ioSlotJoin]);
+
+ OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames.JoinNumber + ioSlotJoin]);
+ InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames.JoinNumber + ioSlotJoin]);
+ OutputVideoRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentVideoInputNames.JoinNumber + ioSlotJoin]);
+ OutputAudioRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentAudioInputNames.JoinNumber + ioSlotJoin]);
+
+ OutputDisabledByHdcpFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputDisabledByHdcp.JoinNumber + ioSlotJoin]);
+ }
+ }
+
+ private void SetHdcpStateAction(bool hdcpTypeSimple, HdmiInputWithCEC port, uint join, BasicTriList trilist)
+ {
+ if (hdcpTypeSimple)
+ {
+ trilist.SetUShortSigAction(join,
+ s =>
+ {
+ if (s == 0)
+ {
+ port.HdcpSupportOff();
+ }
+ else if (s > 0)
+ {
+ port.HdcpSupportOn();
+ }
+ });
+ }
+ else
+ {
+ trilist.SetUShortSigAction(join,
+ u =>
+ {
+ port.HdcpReceiveCapability = (eHdcpCapabilityType)u;
+ });
+ }
+ }
+
+ private void SetHdcpStateAction(bool hdcpTypeSimple, EndpointHdmiInput port, uint join, BasicTriList trilist)
+ {
+ if (hdcpTypeSimple)
+ {
+ trilist.SetUShortSigAction(join,
+ s =>
+ {
+ if (s == 0)
+ {
+ port.HdcpSupportOff();
+ }
+ else if (s > 0)
+ {
+ port.HdcpSupportOn();
+ }
+ });
+ }
+ else
+ {
+ trilist.SetUShortSigAction(join,
+ u =>
+ {
+ port.HdcpCapability = (eHdcpCapabilityType)u;
+ });
+ }
+ }
+
+ private void SetHdcpStateAction(bool supportsHdcp2, DMInputPortWithCec port, uint join, BasicTriList trilist)
+ {
+ if (!supportsHdcp2)
+ {
+ trilist.SetUShortSigAction(join,
+ s =>
+ {
+ if (s == 0)
+ {
+ port.HdcpSupportOff();
+ }
+ else if (s > 0)
+ {
+ port.HdcpSupportOn();
+ }
+ });
+ }
+ else
+ {
+ trilist.SetUShortSigAction(join,
+ u =>
+ {
+ port.HdcpReceiveCapability = (eHdcpCapabilityType)u;
+ });
+ }
+ }
+ }
+
+ public struct PortNumberType
+ {
+ public uint Number { get; private set; }
+ public eRoutingSignalType Type { get; private set; }
+
+ public PortNumberType(uint number, eRoutingSignalType type)
+ : this()
+ {
+ Number = number;
+ Type = type;
+ }
+ }
+
+ public class DmChassisControllerFactory : EssentialsDeviceFactory
+ {
+ public DmChassisControllerFactory()
+ {
+ TypeNames = new List() { "dmmd8x8", "dmmd8x8rps", "dmmd8x8cpu3", "dmmd8x8cpu3rps",
+ "dmmd16x16", "dmmd16x16rps", "dmmd16x16cpu3", "dmmd16x16cpu3rps",
+ "dmmd32x32", "dmmd32x32rps", "dmmd32x32cpu3", "dmmd32x32cpu3rps",
+ "dmmd64x64", "dmmd128x128" };
+ }
+
+ public override EssentialsDevice BuildDevice(DeviceConfig dc)
+ {
+ var type = dc.Type.ToLower();
+
+ Debug.Console(1, "Factory Attempting to create new DmChassisController Device");
+
+ if (type.StartsWith("dmmd8x") || type.StartsWith("dmmd16x") || type.StartsWith("dmmd32x"))
+ {
+
+ var props = JsonConvert.DeserializeObject
+ (dc.Properties.ToString());
+ return PepperDash.Essentials.DM.DmChassisController.
+ GetDmChassisController(dc.Key, dc.Name, type, props);
+ }
+ else if (type.StartsWith("dmmd128x") || type.StartsWith("dmmd64x"))
+ {
+ var props = JsonConvert.DeserializeObject
+ (dc.Properties.ToString());
+ return PepperDash.Essentials.DM.DmBladeChassisController.
+ GetDmChassisController(dc.Key, dc.Name, type, props);
+ }
+
+ return null;
+ }
+ }
+
+}
+
diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsAudioOutputController.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsAudioOutputController.cs
index d330d650..cc7fd7e4 100644
--- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsAudioOutputController.cs
+++ b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsAudioOutputController.cs
@@ -103,36 +103,36 @@ namespace PepperDash.Essentials.DM
}
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
- {
- var joinMap = new DmpsAudioOutputControllerJoinMap();
+ {
+ var joinMap = new DmpsAudioOutputControllerJoinMap(joinStart);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
- joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
-
- joinMap.OffsetJoinNumbers(joinStart);
+ joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
+
+ bridge.AddJoinMap(Key, joinMap);
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
if (MasterVolumeLevel != null)
{
- SetUpDmpsAudioOutputJoins(trilist, MasterVolumeLevel, joinMap.MasterVolume);
+ SetUpDmpsAudioOutputJoins(trilist, MasterVolumeLevel, joinMap.MasterVolumeLevel.JoinNumber);
}
if (SourceVolumeLevel != null)
{
- SetUpDmpsAudioOutputJoins(trilist, SourceVolumeLevel, joinMap.SourceVolume);
+ SetUpDmpsAudioOutputJoins(trilist, SourceVolumeLevel, joinMap.SourceVolumeLevel.JoinNumber);
}
if (Codec1VolumeLevel != null)
{
- SetUpDmpsAudioOutputJoins(trilist, Codec1VolumeLevel, joinMap.Codec1Volume);
+ SetUpDmpsAudioOutputJoins(trilist, Codec1VolumeLevel, joinMap.Codec1VolumeLevel.JoinNumber);
}
if (Codec2VolumeLevel != null)
{
- SetUpDmpsAudioOutputJoins(trilist, Codec2VolumeLevel, joinMap.Codec2Volume);
+ SetUpDmpsAudioOutputJoins(trilist, Codec2VolumeLevel, joinMap.Codec2VolumeLevel.JoinNumber);
}
}
diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsRoutingController.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsRoutingController.cs
index 4c4b256d..7d8ba747 100644
--- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsRoutingController.cs
+++ b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsRoutingController.cs
@@ -155,15 +155,15 @@ namespace PepperDash.Essentials.DM
}
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
- {
- var joinMap = new DmpsRoutingControllerJoinMap();
+ {
+ var joinMap = new DmpsRoutingControllerJoinMap(joinStart);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
- joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
-
- joinMap.OffsetJoinNumbers(joinStart);
+ joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
+
+ bridge.AddJoinMap(Key, joinMap);
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
@@ -172,7 +172,8 @@ namespace PepperDash.Essentials.DM
{
Debug.Console(2, this, "Linking Input Card {0}", i);
- var ioSlot = i;
+ var ioSlot = i;
+ var ioSlotJoin = ioSlot - 1;
//if (TxDictionary.ContainsKey(ioSlot))
//{
@@ -190,13 +191,13 @@ namespace PepperDash.Essentials.DM
// // dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[ApiMap.TxVideoSyncStatus[ioSlot]]);
//}
- if (VideoInputSyncFeedbacks[ioSlot] != null)
- VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
+ if (VideoInputSyncFeedbacks[ioSlot] != null)
+ VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]);
- if (InputNameFeedbacks[ioSlot] != null)
- InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames + ioSlot]);
-
- trilist.SetStringSigAction(joinMap.InputNames + ioSlot, new Action(s =>
+ if (InputNameFeedbacks[ioSlot] != null)
+ InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames.JoinNumber + ioSlotJoin]);
+
+ trilist.SetStringSigAction(joinMap.InputNames.JoinNumber + ioSlotJoin, new Action(s =>
{
var inputCard = Dmps.SwitcherInputs[ioSlot] as DMInput;
@@ -209,20 +210,22 @@ namespace PepperDash.Essentials.DM
}));
- if (InputEndpointOnlineFeedbacks[ioSlot] != null)
- InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
+ if (InputEndpointOnlineFeedbacks[ioSlot] != null)
+ InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]);
}
for (uint i = 1; i <= Dmps.NumberOfSwitcherOutputs; i++)
{
Debug.Console(2, this, "Linking Output Card {0}", i);
- var ioSlot = i;
- // Control
- trilist.SetUShortSigAction(joinMap.OutputVideo + ioSlot, o => ExecuteSwitch(o, ioSlot, eRoutingSignalType.Video));
- trilist.SetUShortSigAction(joinMap.OutputAudio + ioSlot, o => ExecuteSwitch(o, ioSlot, eRoutingSignalType.Audio));
+ var ioSlot = i;
+ var ioSlotJoin = ioSlot - 1;
- trilist.SetStringSigAction(joinMap.OutputNames + ioSlot, s =>
+ // Control
+ trilist.SetUShortSigAction(joinMap.OutputVideo.JoinNumber + ioSlotJoin, o => ExecuteSwitch(o, ioSlot, eRoutingSignalType.Video));
+ trilist.SetUShortSigAction(joinMap.OutputAudio.JoinNumber + ioSlotJoin, o => ExecuteSwitch(o, ioSlot, eRoutingSignalType.Audio));
+
+ trilist.SetStringSigAction(joinMap.OutputNames.JoinNumber + ioSlotJoin, s =>
{
var outputCard = Dmps.SwitcherOutputs[ioSlot] as DMOutput;
@@ -248,18 +251,18 @@ namespace PepperDash.Essentials.DM
});
// Feedback
- if (VideoOutputFeedbacks[ioSlot] != null)
- VideoOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputVideo + ioSlot]);
- if (AudioOutputFeedbacks[ioSlot] != null)
- AudioOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputAudio + ioSlot]);
- if (OutputNameFeedbacks[ioSlot] != null)
- OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames + ioSlot]);
- if (OutputVideoRouteNameFeedbacks[ioSlot] != null)
- OutputVideoRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentVideoInputNames + ioSlot]);
- if (OutputAudioRouteNameFeedbacks[ioSlot] != null)
- OutputAudioRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentAudioInputNames + ioSlot]);
- if (OutputEndpointOnlineFeedbacks[ioSlot] != null)
- OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]);
+ if (VideoOutputFeedbacks[ioSlot] != null)
+ VideoOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputVideo.JoinNumber + ioSlotJoin]);
+ if (AudioOutputFeedbacks[ioSlot] != null)
+ AudioOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputAudio.JoinNumber + ioSlotJoin]);
+ if (OutputNameFeedbacks[ioSlot] != null)
+ OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames.JoinNumber + ioSlotJoin]);
+ if (OutputVideoRouteNameFeedbacks[ioSlot] != null)
+ OutputVideoRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentVideoInputNames.JoinNumber + ioSlotJoin]);
+ if (OutputAudioRouteNameFeedbacks[ioSlot] != null)
+ OutputAudioRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentAudioInputNames.JoinNumber + ioSlotJoin]);
+ if (OutputEndpointOnlineFeedbacks[ioSlot] != null)
+ OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline.JoinNumber + ioSlotJoin]);
}
}
diff --git a/essentials-framework/Essentials DM/Essentials_DM/DmLite/HdMdxxxCEController.cs b/essentials-framework/Essentials DM/Essentials_DM/DmLite/HdMdxxxCEController.cs
index 59a318cd..4007e9f5 100644
--- a/essentials-framework/Essentials DM/Essentials_DM/DmLite/HdMdxxxCEController.cs
+++ b/essentials-framework/Essentials DM/Essentials_DM/DmLite/HdMdxxxCEController.cs
@@ -222,46 +222,47 @@ namespace PepperDash.Essentials.DM
//public int NumberOfComPorts { get { return 1; } }
//#endregion
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
- {
- var joinMap = new HdMdxxxCEControllerJoinMap();
+ {
+ var joinMap = new HdMdxxxCEControllerJoinMap(joinStart);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
- joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
-
- joinMap.OffsetJoinNumbers(joinStart);
+ joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
+
+ bridge.AddJoinMap(Key, joinMap);
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
- IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
- RemoteEndDetectedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RemoteEndDetected]);
-
- trilist.SetSigTrueAction(joinMap.AutoRouteOn, AutoRouteOn);
- AutoRouteOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AutoRouteOn]);
- trilist.SetSigTrueAction(joinMap.AutoRouteOff, AutoRouteOff);
- AutoRouteOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.AutoRouteOff]);
-
- trilist.SetSigTrueAction(joinMap.PriorityRoutingOn, PriorityRouteOn);
- PriorityRoutingOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PriorityRoutingOn]);
- trilist.SetSigTrueAction(joinMap.PriorityRoutingOff, PriorityRouteOff);
- PriorityRoutingOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PriorityRoutingOff]);
-
- trilist.SetSigTrueAction(joinMap.InputOnScreenDisplayEnabled, OnScreenDisplayEnable);
- InputOnScreenDisplayEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.InputOnScreenDisplayEnabled]);
- trilist.SetSigTrueAction(joinMap.AutoRouteOff, OnScreenDisplayDisable);
- InputOnScreenDisplayEnabledFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.InputOnScreenDisplayDisabled]);
-
- trilist.SetUShortSigAction(joinMap.VideoSource, (i) => ExecuteSwitch(i, null, eRoutingSignalType.Video | eRoutingSignalType.Audio));
- VideoSourceFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoSource]);
-
- trilist.UShortInput[joinMap.SourceCount].UShortValue = (ushort)InputPorts.Count;
+ IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
+ RemoteEndDetectedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RemoteEndDetected.JoinNumber]);
+
+ trilist.SetSigTrueAction(joinMap.AutoRouteOn.JoinNumber, AutoRouteOn);
+ AutoRouteOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AutoRouteOn.JoinNumber]);
+ trilist.SetSigTrueAction(joinMap.AutoRouteOff.JoinNumber, AutoRouteOff);
+ AutoRouteOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.AutoRouteOff.JoinNumber]);
+
+ trilist.SetSigTrueAction(joinMap.PriorityRoutingOn.JoinNumber, PriorityRouteOn);
+ PriorityRoutingOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PriorityRoutingOn.JoinNumber]);
+ trilist.SetSigTrueAction(joinMap.PriorityRoutingOff.JoinNumber, PriorityRouteOff);
+ PriorityRoutingOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PriorityRoutingOff.JoinNumber]);
+
+ trilist.SetSigTrueAction(joinMap.InputOnScreenDisplayEnabled.JoinNumber, OnScreenDisplayEnable);
+ InputOnScreenDisplayEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.InputOnScreenDisplayEnabled.JoinNumber]);
+ trilist.SetSigTrueAction(joinMap.AutoRouteOff.JoinNumber, OnScreenDisplayDisable);
+ InputOnScreenDisplayEnabledFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.InputOnScreenDisplayDisabled.JoinNumber]);
+
+ trilist.SetUShortSigAction(joinMap.VideoSource.JoinNumber, (i) => ExecuteSwitch(i, null, eRoutingSignalType.Video | eRoutingSignalType.Audio));
+ VideoSourceFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoSource.JoinNumber]);
+
+ trilist.UShortInput[joinMap.SourceCount.JoinNumber].UShortValue = (ushort)InputPorts.Count;
foreach (var input in InputPorts)
{
- var number = Convert.ToUInt16(input.Selector);
- SyncDetectedFeedbacks[number].LinkInputSig(trilist.BooleanInput[joinMap.SyncDetected + number]);
- trilist.StringInput[joinMap.SourceNames + number].StringValue = input.Key;
+ var number = Convert.ToUInt16(input.Selector);
+ var numberJoin = (UInt16)(number - 1);
+ SyncDetectedFeedbacks[number].LinkInputSig(trilist.BooleanInput[joinMap.SyncDetected.JoinNumber + numberJoin]);
+ trilist.StringInput[joinMap.SourceNames.JoinNumber + numberJoin].StringValue = input.Key;
}
}
}
diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcHelper.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcHelper.cs
index 91085fca..2f7f878c 100644
--- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcHelper.cs
+++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcHelper.cs
@@ -38,29 +38,29 @@ namespace PepperDash.Essentials.DM
}
protected void LinkDmRmcToApi(DmRmcControllerBase rmc, BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
- {
- var joinMap = new DmRmcControllerJoinMap();
+ {
+ var joinMap = new DmRmcControllerJoinMap(joinStart);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
- joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
-
- joinMap.OffsetJoinNumbers(joinStart);
+ joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
+
+ bridge.AddJoinMap(Key, joinMap);
Debug.Console(1, rmc, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
- rmc.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
+ rmc.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
if (rmc.VideoOutputResolutionFeedback != null)
- rmc.VideoOutputResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentOutputResolution]);
+ rmc.VideoOutputResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentOutputResolution.JoinNumber]);
if (rmc.EdidManufacturerFeedback != null)
- rmc.EdidManufacturerFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidManufacturer]);
+ rmc.EdidManufacturerFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidManufacturer.JoinNumber]);
if (rmc.EdidNameFeedback != null)
- rmc.EdidNameFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidName]);
+ rmc.EdidNameFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidName.JoinNumber]);
if (rmc.EdidPreferredTimingFeedback != null)
- rmc.EdidPreferredTimingFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidPrefferedTiming]);
+ rmc.EdidPreferredTimingFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidPrefferedTiming.JoinNumber]);
if (rmc.EdidSerialNumberFeedback != null)
- rmc.EdidSerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidSerialNumber]);
+ rmc.EdidSerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidSerialNumber.JoinNumber]);
//If the device is an DM-RMC-4K-Z-SCALER-C
var routing = rmc as IRmcRouting;
@@ -68,9 +68,9 @@ namespace PepperDash.Essentials.DM
if (routing != null)
{
if (routing.AudioVideoSourceNumericFeedback != null)
- routing.AudioVideoSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.AudioVideoSource]);
+ routing.AudioVideoSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.AudioVideoSource.JoinNumber]);
- trilist.SetUShortSigAction(joinMap.AudioVideoSource, (a) => routing.ExecuteNumericSwitch(a, 1, eRoutingSignalType.AudioVideo));
+ trilist.SetUShortSigAction(joinMap.AudioVideoSource.JoinNumber, (a) => routing.ExecuteNumericSwitch(a, 1, eRoutingSignalType.AudioVideo));
}
}
}
diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTxHelpers.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTxHelpers.cs
index 81a56008..d8a49717 100644
--- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTxHelpers.cs
+++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTxHelpers.cs
@@ -174,14 +174,14 @@ namespace PepperDash.Essentials.DM
protected void LinkDmTxToApi(DmTxControllerBase tx, BasicTriList trilist, uint joinStart, string joinMapKey,
EiscApiAdvanced bridge)
{
- var joinMap = new DmTxControllerJoinMap();
+ var joinMap = new DmTxControllerJoinMap(joinStart);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
- joinMap.OffsetJoinNumbers(joinStart);
+ bridge.AddJoinMap(Key, joinMap);
if (tx.Hardware is DmHDBasedTEndPoint)
{
@@ -191,10 +191,10 @@ namespace PepperDash.Essentials.DM
Debug.Console(1, tx, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
- tx.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
- tx.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus]);
- tx.AnyVideoInput.VideoStatus.VideoResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentInputResolution]);
- trilist.UShortInput[joinMap.HdcpSupportCapability].UShortValue = (ushort)tx.HdcpSupportCapability;
+ tx.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
+ tx.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber]);
+ tx.AnyVideoInput.VideoStatus.VideoResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentInputResolution.JoinNumber]);
+ trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber].UShortValue = (ushort)tx.HdcpSupportCapability;
bool hdcpTypeSimple;
@@ -207,15 +207,15 @@ namespace PepperDash.Essentials.DM
{
var txR = tx as ITxRouting;
- trilist.SetUShortSigAction(joinMap.VideoInput,
+ trilist.SetUShortSigAction(joinMap.VideoInput.JoinNumber,
i => txR.ExecuteNumericSwitch(i, 0, eRoutingSignalType.Video));
- trilist.SetUShortSigAction(joinMap.AudioInput,
+ trilist.SetUShortSigAction(joinMap.AudioInput.JoinNumber,
i => txR.ExecuteNumericSwitch(i, 0, eRoutingSignalType.Audio));
- txR.VideoSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoInput]);
- txR.AudioSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.AudioInput]);
+ txR.VideoSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoInput.JoinNumber]);
+ txR.AudioSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.AudioInput.JoinNumber]);
- trilist.UShortInput[joinMap.HdcpSupportCapability].UShortValue = (ushort)tx.HdcpSupportCapability;
+ trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber].UShortValue = (ushort)tx.HdcpSupportCapability;
if (txR.InputPorts[DmPortName.HdmiIn] != null)
{
@@ -225,14 +225,14 @@ namespace PepperDash.Essentials.DM
{
var intFeedback = tx.Feedbacks["HdmiInHdcpCapability"] as IntFeedback;
if (intFeedback != null)
- intFeedback.LinkInputSig(trilist.UShortInput[joinMap.Port1HdcpState]);
+ intFeedback.LinkInputSig(trilist.UShortInput[joinMap.Port1HdcpState.JoinNumber]);
}
if (inputPort.ConnectionType == eRoutingPortConnectionType.Hdmi && inputPort.Port != null)
{
var port = inputPort.Port as EndpointHdmiInput;
- SetHdcpCapabilityAction(hdcpTypeSimple, port, joinMap.Port1HdcpState, trilist);
+ SetHdcpCapabilityAction(hdcpTypeSimple, port, joinMap.Port1HdcpState.JoinNumber, trilist);
}
}
@@ -244,14 +244,14 @@ namespace PepperDash.Essentials.DM
{
var intFeedback = tx.Feedbacks["HdmiIn1HdcpCapability"] as IntFeedback;
if (intFeedback != null)
- intFeedback.LinkInputSig(trilist.UShortInput[joinMap.Port1HdcpState]);
+ intFeedback.LinkInputSig(trilist.UShortInput[joinMap.Port1HdcpState.JoinNumber]);
}
if (inputPort.ConnectionType == eRoutingPortConnectionType.Hdmi && inputPort.Port != null)
{
var port = inputPort.Port as EndpointHdmiInput;
- SetHdcpCapabilityAction(hdcpTypeSimple, port, joinMap.Port1HdcpState, trilist);
+ SetHdcpCapabilityAction(hdcpTypeSimple, port, joinMap.Port1HdcpState.JoinNumber, trilist);
}
}
@@ -263,14 +263,14 @@ namespace PepperDash.Essentials.DM
{
var intFeedback = tx.Feedbacks["HdmiIn2HdcpCapability"] as IntFeedback;
if (intFeedback != null)
- intFeedback.LinkInputSig(trilist.UShortInput[joinMap.Port1HdcpState]);
+ intFeedback.LinkInputSig(trilist.UShortInput[joinMap.Port1HdcpState.JoinNumber]);
}
if (inputPort.ConnectionType == eRoutingPortConnectionType.Hdmi && inputPort.Port != null)
{
var port = inputPort.Port as EndpointHdmiInput;
- SetHdcpCapabilityAction(hdcpTypeSimple, port, joinMap.Port2HdcpState, trilist);
+ SetHdcpCapabilityAction(hdcpTypeSimple, port, joinMap.Port2HdcpState.JoinNumber, trilist);
}
}
@@ -279,19 +279,19 @@ namespace PepperDash.Essentials.DM
var txFreeRun = tx as IHasFreeRun;
if (txFreeRun != null)
{
- txFreeRun.FreeRunEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.FreeRunEnabled]);
- trilist.SetBoolSigAction(joinMap.FreeRunEnabled, new Action(txFreeRun.SetFreeRunEnabled));
+ txFreeRun.FreeRunEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.FreeRunEnabled.JoinNumber]);
+ trilist.SetBoolSigAction(joinMap.FreeRunEnabled.JoinNumber, new Action(txFreeRun.SetFreeRunEnabled));
}
var txVga = tx as IVgaBrightnessContrastControls;
{
if (txVga == null) return;
- txVga.VgaBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.VgaBrightness]);
- txVga.VgaContrastFeedback.LinkInputSig(trilist.UShortInput[joinMap.VgaContrast]);
+ txVga.VgaBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.VgaBrightness.JoinNumber]);
+ txVga.VgaContrastFeedback.LinkInputSig(trilist.UShortInput[joinMap.VgaContrast.JoinNumber]);
- trilist.SetUShortSigAction(joinMap.VgaBrightness, txVga.SetVgaBrightness);
- trilist.SetUShortSigAction(joinMap.VgaContrast, txVga.SetVgaContrast);
+ trilist.SetUShortSigAction(joinMap.VgaBrightness.JoinNumber, txVga.SetVgaBrightness);
+ trilist.SetUShortSigAction(joinMap.VgaContrast.JoinNumber, txVga.SetVgaContrast);
}
}
diff --git a/essentials-framework/Essentials DM/Essentials_DM/PepperDash_Essentials_DM.csproj b/essentials-framework/Essentials DM/Essentials_DM/PepperDash_Essentials_DM.csproj
index e08b30f6..8467f92a 100644
--- a/essentials-framework/Essentials DM/Essentials_DM/PepperDash_Essentials_DM.csproj
+++ b/essentials-framework/Essentials DM/Essentials_DM/PepperDash_Essentials_DM.csproj
@@ -1,161 +1,161 @@
-
-
- Release
- AnyCPU
- 9.0.30729
- 2.0
- {9199CE8A-0C9F-4952-8672-3EED798B284F}
- Library
- Properties
- PepperDash_Essentials_DM
- PepperDash_Essentials_DM
- {0B4745B0-194B-4BB6-8E21-E9057CA92300};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- WindowsCE
- E2BECB1F-8C8C-41ba-B736-9BE7D946A398
- 5.0
- SmartDeviceProject1
- v3.5
- Windows CE
-
-
-
-
- .allowedReferenceRelatedFileExtensions
- true
- full
- false
- bin\
- DEBUG;TRACE;
- prompt
- 4
- 512
- true
- true
- off
-
-
- .allowedReferenceRelatedFileExtensions
- none
- true
- bin\
- prompt
- 4
- 512
- true
- true
- off
-
-
-
- False
- ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll
-
-
- False
- ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll
-
-
- False
- ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll
-
-
-
- False
- ..\..\pepperdashcore-builds\PepperDash_Core.dll
-
-
- False
- ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll
- False
-
-
- False
- ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll
- False
-
-
- False
- ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll
-
-
- False
- ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe
- False
-
-
- False
- ..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}
- PepperDash_Essentials_Core
-
-
-
-
-
-
-
-
- rem S# Pro preparation will execute after these operations
-
+
+
+ Release
+ AnyCPU
+ 9.0.30729
+ 2.0
+ {9199CE8A-0C9F-4952-8672-3EED798B284F}
+ Library
+ Properties
+ PepperDash_Essentials_DM
+ PepperDash_Essentials_DM
+ {0B4745B0-194B-4BB6-8E21-E9057CA92300};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ WindowsCE
+ E2BECB1F-8C8C-41ba-B736-9BE7D946A398
+ 5.0
+ SmartDeviceProject1
+ v3.5
+ Windows CE
+
+
+
+
+ .allowedReferenceRelatedFileExtensions
+ true
+ full
+ false
+ bin\
+ DEBUG;TRACE;
+ prompt
+ 4
+ 512
+ true
+ true
+ off
+
+
+ .allowedReferenceRelatedFileExtensions
+ none
+ true
+ bin\
+ prompt
+ 4
+ 512
+ true
+ true
+ off
+
+
+
+ False
+ ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll
+
+
+ False
+ ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll
+
+
+ False
+ ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll
+
+
+
+ False
+ ..\..\pepperdashcore-builds\PepperDash_Core.dll
+
+
+ False
+ ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll
+ False
+
+
+ False
+ ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll
+ False
+
+
+ False
+ ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll
+
+
+ False
+ ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe
+ False
+
+
+ False
+ ..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}
+ PepperDash_Essentials_Core
+
+
+
+
+
+
+
+
+ rem S# Pro preparation will execute after these operations
+
\ No newline at end of file
diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Environment/Lutron/LutronQuantum.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Environment/Lutron/LutronQuantum.cs
index 84cf46c2..23bbc913 100644
--- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Environment/Lutron/LutronQuantum.cs
+++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Environment/Lutron/LutronQuantum.cs
@@ -85,8 +85,8 @@ namespace PepperDash.Essentials.Devices.Common.Environment.Lutron
{
var joinMap = LinkLightingToApi(this, trilist, joinStart, joinMapKey, bridge);
- CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
- trilist.SetStringSigAction(joinMap.IntegrationIdSet, s => IntegrationId = s);
+ CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
+ trilist.SetStringSigAction(joinMap.IntegrationIdSet.JoinNumber , s => IntegrationId = s);
}
void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e)
diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj
index 4b24607c..83065b05 100644
--- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj
+++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj
@@ -67,6 +67,10 @@
False
..\..\pepperdashcore-builds\PepperDash_Core.dll
+
+ False
+ ..\..\Essentials Core\PepperDashEssentialsBase\bin\PepperDash_Essentials_Core.dll
+
False
..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll
@@ -181,12 +185,6 @@
-
-
- {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}
- PepperDash_Essentials_Core
-
-
diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Occupancy/GlsOccupancySensorBaseController.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Occupancy/GlsOccupancySensorBaseController.cs
index 18bdb1be..e494ab3b 100644
--- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Occupancy/GlsOccupancySensorBaseController.cs
+++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Occupancy/GlsOccupancySensorBaseController.cs
@@ -259,104 +259,104 @@ namespace PepperDash.Essentials.Devices.Common.Occupancy
protected void LinkOccSensorToApi(GlsOccupancySensorBaseController occController, BasicTriList trilist,
uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
- {
- var joinMap = new GlsOccupancySensorBaseJoinMap();
+ {
+ var joinMap = new GlsOccupancySensorBaseJoinMap(joinStart);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
- joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
-
- joinMap.OffsetJoinNumbers(joinStart);
+ joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
+
+ bridge.AddJoinMap(Key, joinMap);
Debug.Console(1, occController, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
#region Single and Dual Sensor Stuff
- occController.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
- trilist.StringInput[joinMap.Name].StringValue = occController.Name;
+ occController.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
+ trilist.StringInput[joinMap.Name.JoinNumber].StringValue = occController.Name;
trilist.OnlineStatusChange += (d, args) =>
{
if (args.DeviceOnLine)
- {
- trilist.StringInput[joinMap.Name].StringValue = occController.Name;
+ {
+ trilist.StringInput[joinMap.Name.JoinNumber].StringValue = occController.Name;
}
};
- // Occupied status
- trilist.SetSigTrueAction(joinMap.ForceOccupied, occController.ForceOccupied);
- trilist.SetSigTrueAction(joinMap.ForceVacant, occController.ForceVacant);
- occController.RoomIsOccupiedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RoomOccupiedFeedback]);
- occController.RoomIsOccupiedFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.RoomVacantFeedback]);
- occController.RawOccupancyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyFeedback]);
- trilist.SetBoolSigAction(joinMap.EnableRawStates, occController.EnableRawStates);
+ // Occupied status
+ trilist.SetSigTrueAction(joinMap.ForceOccupied.JoinNumber, occController.ForceOccupied);
+ trilist.SetSigTrueAction(joinMap.ForceVacant.JoinNumber, occController.ForceVacant);
+ occController.RoomIsOccupiedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RoomOccupiedFeedback.JoinNumber]);
+ occController.RoomIsOccupiedFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.RoomVacantFeedback.JoinNumber]);
+ occController.RawOccupancyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyFeedback.JoinNumber]);
+ trilist.SetBoolSigAction(joinMap.EnableRawStates.JoinNumber, occController.EnableRawStates);
- // Timouts
- trilist.SetUShortSigAction(joinMap.Timeout, occController.SetRemoteTimeout);
- occController.CurrentTimeoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.Timeout]);
- occController.LocalTimoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeoutLocalFeedback]);
+ // Timouts
+ trilist.SetUShortSigAction(joinMap.Timeout.JoinNumber, occController.SetRemoteTimeout);
+ occController.CurrentTimeoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.Timeout.JoinNumber]);
+ occController.LocalTimoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeoutLocalFeedback.JoinNumber]);
- // LED Flash
- trilist.SetSigTrueAction(joinMap.EnableLedFlash, () => occController.SetLedFlashEnable(true));
- trilist.SetSigTrueAction(joinMap.DisableLedFlash, () => occController.SetLedFlashEnable(false));
- occController.LedFlashEnabledFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.EnableLedFlash]);
+ // LED Flash
+ trilist.SetSigTrueAction(joinMap.EnableLedFlash.JoinNumber, () => occController.SetLedFlashEnable(true));
+ trilist.SetSigTrueAction(joinMap.DisableLedFlash.JoinNumber, () => occController.SetLedFlashEnable(false));
+ occController.LedFlashEnabledFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.EnableLedFlash.JoinNumber]);
- // Short Timeout
- trilist.SetSigTrueAction(joinMap.EnableShortTimeout, () => occController.SetShortTimeoutState(true));
- trilist.SetSigTrueAction(joinMap.DisableShortTimeout, () => occController.SetShortTimeoutState(false));
- occController.ShortTimeoutEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableShortTimeout]);
+ // Short Timeout
+ trilist.SetSigTrueAction(joinMap.EnableShortTimeout.JoinNumber, () => occController.SetShortTimeoutState(true));
+ trilist.SetSigTrueAction(joinMap.DisableShortTimeout.JoinNumber, () => occController.SetShortTimeoutState(false));
+ occController.ShortTimeoutEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableShortTimeout.JoinNumber]);
- // PIR Sensor
- trilist.SetSigTrueAction(joinMap.EnablePir, () => occController.SetPirEnable(true));
- trilist.SetSigTrueAction(joinMap.DisablePir, () => occController.SetPirEnable(false));
- occController.PirSensorEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnablePir]);
+ // PIR Sensor
+ trilist.SetSigTrueAction(joinMap.EnablePir.JoinNumber, () => occController.SetPirEnable(true));
+ trilist.SetSigTrueAction(joinMap.DisablePir.JoinNumber, () => occController.SetPirEnable(false));
+ occController.PirSensorEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnablePir.JoinNumber]);
- // PIR Sensitivity in Occupied State
- trilist.SetBoolSigAction(joinMap.IncrementPirInOccupiedState, occController.IncrementPirSensitivityInOccupiedState);
- trilist.SetBoolSigAction(joinMap.DecrementPirInOccupiedState, occController.DecrementPirSensitivityInOccupiedState);
- occController.PirSensitivityInOccupiedStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.PirSensitivityInOccupiedState]);
+ // PIR Sensitivity in Occupied State
+ trilist.SetBoolSigAction(joinMap.IncrementPirInOccupiedState.JoinNumber, occController.IncrementPirSensitivityInOccupiedState);
+ trilist.SetBoolSigAction(joinMap.DecrementPirInOccupiedState.JoinNumber, occController.DecrementPirSensitivityInOccupiedState);
+ occController.PirSensitivityInOccupiedStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.PirSensitivityInOccupiedState.JoinNumber]);
- // PIR Sensitivity in Vacant State
- trilist.SetBoolSigAction(joinMap.IncrementPirInVacantState, occController.IncrementPirSensitivityInVacantState);
- trilist.SetBoolSigAction(joinMap.DecrementPirInVacantState, occController.DecrementPirSensitivityInVacantState);
- occController.PirSensitivityInVacantStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.PirSensitivityInVacantState]);
+ // PIR Sensitivity in Vacant State
+ trilist.SetBoolSigAction(joinMap.IncrementPirInVacantState.JoinNumber, occController.IncrementPirSensitivityInVacantState);
+ trilist.SetBoolSigAction(joinMap.DecrementPirInVacantState.JoinNumber, occController.DecrementPirSensitivityInVacantState);
+ occController.PirSensitivityInVacantStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.PirSensitivityInVacantState.JoinNumber]);
#endregion
#region Dual Technology Sensor Stuff
var odtOccController = occController as GlsOdtOccupancySensorController;
if (odtOccController == null) return;
- // OR When Vacated
- trilist.SetBoolSigAction(joinMap.OrWhenVacated, odtOccController.SetOrWhenVacatedState);
- odtOccController.OrWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.OrWhenVacated]);
+ // OR When Vacated
+ trilist.SetBoolSigAction(joinMap.OrWhenVacated.JoinNumber, odtOccController.SetOrWhenVacatedState);
+ odtOccController.OrWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.OrWhenVacated.JoinNumber]);
- // AND When Vacated
- trilist.SetBoolSigAction(joinMap.AndWhenVacated, odtOccController.SetAndWhenVacatedState);
- odtOccController.AndWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AndWhenVacated]);
+ // AND When Vacated
+ trilist.SetBoolSigAction(joinMap.AndWhenVacated.JoinNumber, odtOccController.SetAndWhenVacatedState);
+ odtOccController.AndWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AndWhenVacated.JoinNumber]);
- // Ultrasonic A Sensor
- trilist.SetSigTrueAction(joinMap.EnableUsA, () => odtOccController.SetUsAEnable(true));
- trilist.SetSigTrueAction(joinMap.DisableUsA, () => odtOccController.SetUsAEnable(false));
- odtOccController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsA]);
+ // Ultrasonic A Sensor
+ trilist.SetSigTrueAction(joinMap.EnableUsA.JoinNumber, () => odtOccController.SetUsAEnable(true));
+ trilist.SetSigTrueAction(joinMap.DisableUsA.JoinNumber, () => odtOccController.SetUsAEnable(false));
+ odtOccController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsA.JoinNumber]);
- // Ultrasonic B Sensor
- trilist.SetSigTrueAction(joinMap.EnableUsB, () => odtOccController.SetUsBEnable(true));
- trilist.SetSigTrueAction(joinMap.DisableUsB, () => odtOccController.SetUsBEnable(false));
- odtOccController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsB]);
+ // Ultrasonic B Sensor
+ trilist.SetSigTrueAction(joinMap.EnableUsB.JoinNumber, () => odtOccController.SetUsBEnable(true));
+ trilist.SetSigTrueAction(joinMap.DisableUsB.JoinNumber, () => odtOccController.SetUsBEnable(false));
+ odtOccController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsB.JoinNumber]);
- // US Sensitivity in Occupied State
- trilist.SetBoolSigAction(joinMap.IncrementUsInOccupiedState, odtOccController.IncrementUsSensitivityInOccupiedState);
- trilist.SetBoolSigAction(joinMap.DecrementUsInOccupiedState, odtOccController.DecrementUsSensitivityInOccupiedState);
- odtOccController.UltrasonicSensitivityInOccupiedStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.UsSensitivityInOccupiedState]);
+ // US Sensitivity in Occupied State
+ trilist.SetBoolSigAction(joinMap.IncrementUsInOccupiedState.JoinNumber, odtOccController.IncrementUsSensitivityInOccupiedState);
+ trilist.SetBoolSigAction(joinMap.DecrementUsInOccupiedState.JoinNumber, odtOccController.DecrementUsSensitivityInOccupiedState);
+ odtOccController.UltrasonicSensitivityInOccupiedStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.UsSensitivityInOccupiedState.JoinNumber]);
- // US Sensitivity in Vacant State
- trilist.SetBoolSigAction(joinMap.IncrementUsInVacantState, odtOccController.IncrementUsSensitivityInVacantState);
- trilist.SetBoolSigAction(joinMap.DecrementUsInVacantState, odtOccController.DecrementUsSensitivityInVacantState);
- odtOccController.UltrasonicSensitivityInVacantStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.UsSensitivityInVacantState]);
+ // US Sensitivity in Vacant State
+ trilist.SetBoolSigAction(joinMap.IncrementUsInVacantState.JoinNumber, odtOccController.IncrementUsSensitivityInVacantState);
+ trilist.SetBoolSigAction(joinMap.DecrementUsInVacantState.JoinNumber, odtOccController.DecrementUsSensitivityInVacantState);
+ odtOccController.UltrasonicSensitivityInVacantStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.UsSensitivityInVacantState.JoinNumber]);
- //Sensor Raw States
- odtOccController.RawOccupancyPirFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyPirFeedback]);
- odtOccController.RawOccupancyUsFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyUsFeedback]);
+ //Sensor Raw States
+ odtOccController.RawOccupancyPirFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyPirFeedback.JoinNumber]);
+ odtOccController.RawOccupancyUsFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyUsFeedback.JoinNumber]);
#endregion
}
diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Power Controllers/Digitallogger.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Power Controllers/Digitallogger.cs
index 11a96537..2a079c97 100644
--- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Power Controllers/Digitallogger.cs
+++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Power Controllers/Digitallogger.cs
@@ -11,12 +11,14 @@ using Crestron.SimplSharp.Net.Http;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using PepperDash.Essentials.Core.Bridges;
-using PepperDash.Essentials.Core.Config;
+using PepperDash.Essentials.Core.Config;
+using PepperDash.Essentials;
+
namespace PepperDash.Essentials.Devices.Common
-{
-
+{
+ [Obsolete("This Device will be moved to a plugin in a future update")]
public class DigitalLogger : EssentialsBridgeableDevice
{
public IBasicCommunication Communication { get; private set; }
diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/SetTopBox/IRSetTopBoxBase.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/SetTopBox/IRSetTopBoxBase.cs
index 25d17eb4..8bf690a6 100644
--- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/SetTopBox/IRSetTopBoxBase.cs
+++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/SetTopBox/IRSetTopBoxBase.cs
@@ -373,93 +373,93 @@ namespace PepperDash.Essentials.Devices.Common
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
{
- var joinMap = new SetTopBoxControllerJoinMap();
+ var joinMap = new SetTopBoxControllerJoinMap(joinStart);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
- joinMap.OffsetJoinNumbers(joinStart);
+ bridge.AddJoinMap(Key, joinMap);
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
Debug.Console(0, "Linking to Display: {0}", Name);
- trilist.StringInput[joinMap.Name].StringValue = Name;
+ trilist.StringInput[joinMap.Name.JoinNumber].StringValue = Name;
var stbBase = this as ISetTopBoxControls;
- trilist.BooleanInput[joinMap.HasDpad].BoolValue = stbBase.HasDpad;
- trilist.BooleanInput[joinMap.HasNumeric].BoolValue = stbBase.HasNumeric;
- trilist.BooleanInput[joinMap.HasDvr].BoolValue = stbBase.HasDvr;
- trilist.BooleanInput[joinMap.HasPresets].BoolValue = stbBase.HasPresets;
+ trilist.BooleanInput[joinMap.HasDpad.JoinNumber].BoolValue = stbBase.HasDpad;
+ trilist.BooleanInput[joinMap.HasNumeric.JoinNumber].BoolValue = stbBase.HasNumeric;
+ trilist.BooleanInput[joinMap.HasDvr.JoinNumber].BoolValue = stbBase.HasDvr;
+ trilist.BooleanInput[joinMap.HasPresets.JoinNumber].BoolValue = stbBase.HasPresets;
- trilist.SetBoolSigAction(joinMap.DvrList, stbBase.DvrList);
- trilist.SetBoolSigAction(joinMap.Replay, stbBase.Replay);
+ trilist.SetBoolSigAction(joinMap.DvrList.JoinNumber, stbBase.DvrList);
+ trilist.SetBoolSigAction(joinMap.Replay.JoinNumber, stbBase.Replay);
- trilist.SetStringSigAction(joinMap.LoadPresets, stbBase.LoadPresets);
+ trilist.SetStringSigAction(joinMap.LoadPresets.JoinNumber, stbBase.LoadPresets);
var stbPower = this as IPower;
- trilist.SetSigTrueAction(joinMap.PowerOn, stbPower.PowerOn);
- trilist.SetSigTrueAction(joinMap.PowerOff, stbPower.PowerOff);
- trilist.SetSigTrueAction(joinMap.PowerToggle, stbPower.PowerToggle);
+ trilist.SetSigTrueAction(joinMap.PowerOn.JoinNumber, stbPower.PowerOn);
+ trilist.SetSigTrueAction(joinMap.PowerOff.JoinNumber, stbPower.PowerOff);
+ trilist.SetSigTrueAction(joinMap.PowerToggle.JoinNumber, stbPower.PowerToggle);
var stbDPad = this as IDPad;
- trilist.SetBoolSigAction(joinMap.Up, stbDPad.Up);
- trilist.SetBoolSigAction(joinMap.Down, stbDPad.Down);
- trilist.SetBoolSigAction(joinMap.Left, stbDPad.Left);
- trilist.SetBoolSigAction(joinMap.Right, stbDPad.Right);
- trilist.SetBoolSigAction(joinMap.Select, stbDPad.Select);
- trilist.SetBoolSigAction(joinMap.Menu, stbDPad.Menu);
- trilist.SetBoolSigAction(joinMap.Exit, stbDPad.Exit);
+ trilist.SetBoolSigAction(joinMap.Up.JoinNumber, stbDPad.Up);
+ trilist.SetBoolSigAction(joinMap.Down.JoinNumber, stbDPad.Down);
+ trilist.SetBoolSigAction(joinMap.Left.JoinNumber, stbDPad.Left);
+ trilist.SetBoolSigAction(joinMap.Right.JoinNumber, stbDPad.Right);
+ trilist.SetBoolSigAction(joinMap.Select.JoinNumber, stbDPad.Select);
+ trilist.SetBoolSigAction(joinMap.Menu.JoinNumber, stbDPad.Menu);
+ trilist.SetBoolSigAction(joinMap.Exit.JoinNumber, stbDPad.Exit);
var stbChannel = this as IChannel;
- trilist.SetBoolSigAction(joinMap.ChannelUp, stbChannel.ChannelUp);
- trilist.SetBoolSigAction(joinMap.ChannelDown, stbChannel.ChannelDown);
- trilist.SetBoolSigAction(joinMap.LastChannel, stbChannel.LastChannel);
- trilist.SetBoolSigAction(joinMap.Guide, stbChannel.Guide);
- trilist.SetBoolSigAction(joinMap.Info, stbChannel.Info);
- trilist.SetBoolSigAction(joinMap.Exit, stbChannel.Exit);
+ trilist.SetBoolSigAction(joinMap.ChannelUp.JoinNumber, stbChannel.ChannelUp);
+ trilist.SetBoolSigAction(joinMap.ChannelDown.JoinNumber, stbChannel.ChannelDown);
+ trilist.SetBoolSigAction(joinMap.LastChannel.JoinNumber, stbChannel.LastChannel);
+ trilist.SetBoolSigAction(joinMap.Guide.JoinNumber, stbChannel.Guide);
+ trilist.SetBoolSigAction(joinMap.Info.JoinNumber, stbChannel.Info);
+ trilist.SetBoolSigAction(joinMap.Exit.JoinNumber, stbChannel.Exit);
var stbColor = this as IColor;
- trilist.SetBoolSigAction(joinMap.Red, stbColor.Red);
- trilist.SetBoolSigAction(joinMap.Green, stbColor.Green);
- trilist.SetBoolSigAction(joinMap.Yellow, stbColor.Yellow);
- trilist.SetBoolSigAction(joinMap.Blue, stbColor.Blue);
+ trilist.SetBoolSigAction(joinMap.Red.JoinNumber, stbColor.Red);
+ trilist.SetBoolSigAction(joinMap.Green.JoinNumber, stbColor.Green);
+ trilist.SetBoolSigAction(joinMap.Yellow.JoinNumber, stbColor.Yellow);
+ trilist.SetBoolSigAction(joinMap.Blue.JoinNumber, stbColor.Blue);
var stbKeypad = this as ISetTopBoxNumericKeypad;
- trilist.StringInput[joinMap.KeypadAccessoryButton1Label].StringValue = stbKeypad.KeypadAccessoryButton1Label;
- trilist.StringInput[joinMap.KeypadAccessoryButton2Label].StringValue = stbKeypad.KeypadAccessoryButton2Label;
+ trilist.StringInput[joinMap.KeypadAccessoryButton1Label.JoinNumber].StringValue = stbKeypad.KeypadAccessoryButton1Label;
+ trilist.StringInput[joinMap.KeypadAccessoryButton2Label.JoinNumber].StringValue = stbKeypad.KeypadAccessoryButton2Label;
- trilist.BooleanInput[joinMap.HasKeypadAccessoryButton1].BoolValue = stbKeypad.HasKeypadAccessoryButton1;
- trilist.BooleanInput[joinMap.HasKeypadAccessoryButton2].BoolValue = stbKeypad.HasKeypadAccessoryButton2;
+ trilist.BooleanInput[joinMap.HasKeypadAccessoryButton1.JoinNumber].BoolValue = stbKeypad.HasKeypadAccessoryButton1;
+ trilist.BooleanInput[joinMap.HasKeypadAccessoryButton2.JoinNumber].BoolValue = stbKeypad.HasKeypadAccessoryButton2;
- trilist.SetBoolSigAction(joinMap.Digit0, stbKeypad.Digit0);
- trilist.SetBoolSigAction(joinMap.Digit1, stbKeypad.Digit1);
- trilist.SetBoolSigAction(joinMap.Digit2, stbKeypad.Digit2);
- trilist.SetBoolSigAction(joinMap.Digit3, stbKeypad.Digit3);
- trilist.SetBoolSigAction(joinMap.Digit4, stbKeypad.Digit4);
- trilist.SetBoolSigAction(joinMap.Digit5, stbKeypad.Digit5);
- trilist.SetBoolSigAction(joinMap.Digit6, stbKeypad.Digit6);
- trilist.SetBoolSigAction(joinMap.Digit7, stbKeypad.Digit7);
- trilist.SetBoolSigAction(joinMap.Digit8, stbKeypad.Digit8);
- trilist.SetBoolSigAction(joinMap.Digit9, stbKeypad.Digit9);
- trilist.SetBoolSigAction(joinMap.KeypadAccessoryButton1Press, stbKeypad.KeypadAccessoryButton1);
- trilist.SetBoolSigAction(joinMap.KeypadAccessoryButton2Press, stbKeypad.KeypadAccessoryButton1);
- trilist.SetBoolSigAction(joinMap.Dash, stbKeypad.Dash);
- trilist.SetBoolSigAction(joinMap.KeypadEnter, stbKeypad.KeypadEnter);
+ trilist.SetBoolSigAction(joinMap.Digit0.JoinNumber, stbKeypad.Digit0);
+ trilist.SetBoolSigAction(joinMap.Digit1.JoinNumber, stbKeypad.Digit1);
+ trilist.SetBoolSigAction(joinMap.Digit2.JoinNumber, stbKeypad.Digit2);
+ trilist.SetBoolSigAction(joinMap.Digit3.JoinNumber, stbKeypad.Digit3);
+ trilist.SetBoolSigAction(joinMap.Digit4.JoinNumber, stbKeypad.Digit4);
+ trilist.SetBoolSigAction(joinMap.Digit5.JoinNumber, stbKeypad.Digit5);
+ trilist.SetBoolSigAction(joinMap.Digit6.JoinNumber, stbKeypad.Digit6);
+ trilist.SetBoolSigAction(joinMap.Digit7.JoinNumber, stbKeypad.Digit7);
+ trilist.SetBoolSigAction(joinMap.Digit8.JoinNumber, stbKeypad.Digit8);
+ trilist.SetBoolSigAction(joinMap.Digit9.JoinNumber, stbKeypad.Digit9);
+ trilist.SetBoolSigAction(joinMap.KeypadAccessoryButton1Press.JoinNumber, stbKeypad.KeypadAccessoryButton1);
+ trilist.SetBoolSigAction(joinMap.KeypadAccessoryButton2Press.JoinNumber, stbKeypad.KeypadAccessoryButton1);
+ trilist.SetBoolSigAction(joinMap.Dash.JoinNumber, stbKeypad.Dash);
+ trilist.SetBoolSigAction(joinMap.KeypadEnter.JoinNumber, stbKeypad.KeypadEnter);
var stbTransport = this as ITransport;
- trilist.SetBoolSigAction(joinMap.Play, stbTransport.Play);
- trilist.SetBoolSigAction(joinMap.Pause, stbTransport.Pause);
- trilist.SetBoolSigAction(joinMap.Rewind, stbTransport.Rewind);
- trilist.SetBoolSigAction(joinMap.FFwd, stbTransport.FFwd);
- trilist.SetBoolSigAction(joinMap.ChapMinus, stbTransport.ChapMinus);
- trilist.SetBoolSigAction(joinMap.ChapPlus, stbTransport.ChapPlus);
- trilist.SetBoolSigAction(joinMap.Stop, stbTransport.Stop);
- trilist.SetBoolSigAction(joinMap.Record, stbTransport.Record);
+ trilist.SetBoolSigAction(joinMap.Play.JoinNumber, stbTransport.Play);
+ trilist.SetBoolSigAction(joinMap.Pause.JoinNumber, stbTransport.Pause);
+ trilist.SetBoolSigAction(joinMap.Rewind.JoinNumber, stbTransport.Rewind);
+ trilist.SetBoolSigAction(joinMap.FFwd.JoinNumber, stbTransport.FFwd);
+ trilist.SetBoolSigAction(joinMap.ChapMinus.JoinNumber, stbTransport.ChapMinus);
+ trilist.SetBoolSigAction(joinMap.ChapPlus.JoinNumber, stbTransport.ChapPlus);
+ trilist.SetBoolSigAction(joinMap.Stop.JoinNumber, stbTransport.Stop);
+ trilist.SetBoolSigAction(joinMap.Record.JoinNumber, stbTransport.Record);
}
}
diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Streaming/AppleTV.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Streaming/AppleTV.cs
index 1182d312..5d01ccc7 100644
--- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Streaming/AppleTV.cs
+++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Streaming/AppleTV.cs
@@ -1,186 +1,186 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Crestron.SimplSharp;
-using Crestron.SimplSharpPro;
-using Crestron.SimplSharpPro.DeviceSupport;
-using Newtonsoft.Json;
-using PepperDash.Core;
-using PepperDash.Essentials.Core;
-using PepperDash.Essentials.Core.Config;
-using PepperDash.Essentials.Core.Bridges;
-using PepperDash.Essentials.Core.Routing;
-
-namespace PepperDash.Essentials.Devices.Common
-{
- public class AppleTV : EssentialsBridgeableDevice, IDPad, ITransport, IUiDisplayInfo, IRoutingOutputs
- {
-
- public IrOutputPortController IrPort { get; private set; }
- public const string StandardDriverName = "Apple AppleTV-v2.ir";
- public uint DisplayUiType { get { return DisplayUiConstants.TypeAppleTv; } }
-
- public AppleTV(string key, string name, IrOutputPortController portCont)
- : base(key, name)
- {
- IrPort = portCont;
- DeviceManager.AddDevice(portCont);
-
- HdmiOut = new RoutingOutputPort(RoutingPortNames.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.Hdmi, null, this);
- AnyAudioOut = new RoutingOutputPort(RoutingPortNames.AnyAudioOut, eRoutingSignalType.Audio,
- eRoutingPortConnectionType.DigitalAudio, null, this);
- OutputPorts = new RoutingPortCollection { HdmiOut, AnyAudioOut };
- }
-
-
- #region IDPad Members
-
- public void Up(bool pressRelease)
- {
- IrPort.PressRelease("+", pressRelease);
- }
-
- public void Down(bool pressRelease)
- {
- IrPort.PressRelease("-", pressRelease);
- }
-
- public void Left(bool pressRelease)
- {
- IrPort.PressRelease(IROutputStandardCommands.IROut_TRACK_MINUS, pressRelease);
- }
-
- public void Right(bool pressRelease)
- {
- IrPort.PressRelease(IROutputStandardCommands.IROut_TRACK_PLUS, pressRelease);
- }
-
- public void Select(bool pressRelease)
- {
- IrPort.PressRelease(IROutputStandardCommands.IROut_ENTER, pressRelease);
- }
-
- public void Menu(bool pressRelease)
- {
- IrPort.PressRelease("Menu", pressRelease);
- }
-
- public void Exit(bool pressRelease)
- {
-
- }
-
- #endregion
-
- #region ITransport Members
-
- public void Play(bool pressRelease)
- {
- IrPort.PressRelease("PLAY/PAUSE", pressRelease);
- }
-
- public void Pause(bool pressRelease)
- {
- IrPort.PressRelease("PLAY/PAUSE", pressRelease);
- }
-
- ///
- /// Not implemented
- ///
- ///
- public void Rewind(bool pressRelease)
- {
- }
-
- ///
- /// Not implemented
- ///
- ///
- public void FFwd(bool pressRelease)
- {
- }
-
- ///
- /// Not implemented
- ///
- ///
- public void ChapMinus(bool pressRelease)
- {
- }
-
- ///
- /// Not implemented
- ///
- ///
- public void ChapPlus(bool pressRelease)
- {
- }
-
- ///
- /// Not implemented
- ///
- ///
- public void Stop(bool pressRelease)
- {
- }
-
- ///
- /// Not implemented
- ///
- ///
- public void Record(bool pressRelease)
- {
- }
-
- #endregion
-
- #region IRoutingOutputs Members
-
- public RoutingOutputPort HdmiOut { get; private set; }
- public RoutingOutputPort AnyAudioOut { get; private set; }
- public RoutingPortCollection OutputPorts { get; private set; }
-
- #endregion
-
- public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
- {
- var joinMap = new AppleTvJoinMap();
-
- var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
-
- if (!string.IsNullOrEmpty(joinMapSerialized))
- joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
-
- joinMap.OffsetJoinNumbers(joinStart);
-
- Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
- Debug.Console(0, "Linking to Bridge Type {0}", GetType().Name);
-
- trilist.SetBoolSigAction(joinMap.UpArrow, Up);
- trilist.SetBoolSigAction(joinMap.DnArrow, Down);
- trilist.SetBoolSigAction(joinMap.LeftArrow, Left);
- trilist.SetBoolSigAction(joinMap.RightArrow, Right);
- trilist.SetBoolSigAction(joinMap.Select, Select);
- trilist.SetBoolSigAction(joinMap.Menu, Menu);
- trilist.SetBoolSigAction(joinMap.PlayPause, Play);
- }
- }
-
- public class AppleTVFactory : EssentialsDeviceFactory
- {
- public AppleTVFactory()
- {
- TypeNames = new List() { "appletv" };
- }
-
- public override EssentialsDevice BuildDevice(DeviceConfig dc)
- {
- Debug.Console(1, "Factory Attempting to create new AppleTV Device");
- var irCont = IRPortHelper.GetIrOutputPortController(dc);
- return new AppleTV(dc.Key, dc.Name, irCont);
- }
- }
-
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Crestron.SimplSharp;
+using Crestron.SimplSharpPro;
+using Crestron.SimplSharpPro.DeviceSupport;
+using Newtonsoft.Json;
+using PepperDash.Core;
+using PepperDash.Essentials.Core;
+using PepperDash.Essentials.Core.Config;
+using PepperDash.Essentials.Core.Bridges;
+using PepperDash.Essentials.Core.Routing;
+
+namespace PepperDash.Essentials.Devices.Common
+{
+ public class AppleTV : EssentialsBridgeableDevice, IDPad, ITransport, IUiDisplayInfo, IRoutingOutputs
+ {
+
+ public IrOutputPortController IrPort { get; private set; }
+ public const string StandardDriverName = "Apple AppleTV-v2.ir";
+ public uint DisplayUiType { get { return DisplayUiConstants.TypeAppleTv; } }
+
+ public AppleTV(string key, string name, IrOutputPortController portCont)
+ : base(key, name)
+ {
+ IrPort = portCont;
+ DeviceManager.AddDevice(portCont);
+
+ HdmiOut = new RoutingOutputPort(RoutingPortNames.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.Hdmi, null, this);
+ AnyAudioOut = new RoutingOutputPort(RoutingPortNames.AnyAudioOut, eRoutingSignalType.Audio,
+ eRoutingPortConnectionType.DigitalAudio, null, this);
+ OutputPorts = new RoutingPortCollection { HdmiOut, AnyAudioOut };
+ }
+
+
+ #region IDPad Members
+
+ public void Up(bool pressRelease)
+ {
+ IrPort.PressRelease("+", pressRelease);
+ }
+
+ public void Down(bool pressRelease)
+ {
+ IrPort.PressRelease("-", pressRelease);
+ }
+
+ public void Left(bool pressRelease)
+ {
+ IrPort.PressRelease(IROutputStandardCommands.IROut_TRACK_MINUS, pressRelease);
+ }
+
+ public void Right(bool pressRelease)
+ {
+ IrPort.PressRelease(IROutputStandardCommands.IROut_TRACK_PLUS, pressRelease);
+ }
+
+ public void Select(bool pressRelease)
+ {
+ IrPort.PressRelease(IROutputStandardCommands.IROut_ENTER, pressRelease);
+ }
+
+ public void Menu(bool pressRelease)
+ {
+ IrPort.PressRelease("Menu", pressRelease);
+ }
+
+ public void Exit(bool pressRelease)
+ {
+
+ }
+
+ #endregion
+
+ #region ITransport Members
+
+ public void Play(bool pressRelease)
+ {
+ IrPort.PressRelease("PLAY/PAUSE", pressRelease);
+ }
+
+ public void Pause(bool pressRelease)
+ {
+ IrPort.PressRelease("PLAY/PAUSE", pressRelease);
+ }
+
+ ///
+ /// Not implemented
+ ///
+ ///
+ public void Rewind(bool pressRelease)
+ {
+ }
+
+ ///
+ /// Not implemented
+ ///
+ ///
+ public void FFwd(bool pressRelease)
+ {
+ }
+
+ ///
+ /// Not implemented
+ ///
+ ///
+ public void ChapMinus(bool pressRelease)
+ {
+ }
+
+ ///
+ /// Not implemented
+ ///
+ ///
+ public void ChapPlus(bool pressRelease)
+ {
+ }
+
+ ///
+ /// Not implemented
+ ///
+ ///
+ public void Stop(bool pressRelease)
+ {
+ }
+
+ ///
+ /// Not implemented
+ ///
+ ///
+ public void Record(bool pressRelease)
+ {
+ }
+
+ #endregion
+
+ #region IRoutingOutputs Members
+
+ public RoutingOutputPort HdmiOut { get; private set; }
+ public RoutingOutputPort AnyAudioOut { get; private set; }
+ public RoutingPortCollection OutputPorts { get; private set; }
+
+ #endregion
+
+ public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
+ {
+ var joinMap = new AppleTvJoinMap(joinStart);
+
+ var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
+
+ if (!string.IsNullOrEmpty(joinMapSerialized))
+ joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
+
+ bridge.AddJoinMap(Key, joinMap);
+
+ Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
+ Debug.Console(0, "Linking to Bridge Type {0}", GetType().Name);
+
+ trilist.SetBoolSigAction(joinMap.UpArrow.JoinNumber, Up);
+ trilist.SetBoolSigAction(joinMap.DnArrow.JoinNumber, Down);
+ trilist.SetBoolSigAction(joinMap.LeftArrow.JoinNumber, Left);
+ trilist.SetBoolSigAction(joinMap.RightArrow.JoinNumber, Right);
+ trilist.SetBoolSigAction(joinMap.Select.JoinNumber, Select);
+ trilist.SetBoolSigAction(joinMap.Menu.JoinNumber, Menu);
+ trilist.SetBoolSigAction(joinMap.PlayPause.JoinNumber, Play);
+ }
+ }
+
+ public class AppleTVFactory : EssentialsDeviceFactory
+ {
+ public AppleTVFactory()
+ {
+ TypeNames = new List() { "appletv" };
+ }
+
+ public override EssentialsDevice BuildDevice(DeviceConfig dc)
+ {
+ Debug.Console(1, "Factory Attempting to create new AppleTV Device");
+ var irCont = IRPortHelper.GetIrOutputPortController(dc);
+ return new AppleTV(dc.Key, dc.Name, irCont);
+ }
+ }
+
}
\ No newline at end of file