diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs
index 001d6f94..170eafc9 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs
@@ -6,104 +6,60 @@ 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;
+ 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 DM/Essentials_DM/Chassis/DmBladeChassisController.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmBladeChassisController.cs
index 5ce95c93..2637332f 100644
--- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmBladeChassisController.cs
+++ b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmBladeChassisController.cs
@@ -573,7 +573,7 @@ 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);
@@ -581,19 +581,19 @@ namespace PepperDash.Essentials.DM {
joinMap = JsonConvert.DeserializeObject(joinMapSerialized);
- joinMap.OffsetJoinNumbers(joinStart);
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]);
}
}