diff --git a/PepperDashEssentials/Bridges/AirMediaControllerBridge.cs b/PepperDashEssentials/Bridges/AirMediaControllerBridge.cs index 9a447c7d..c7542f11 100644 --- a/PepperDashEssentials/Bridges/AirMediaControllerBridge.cs +++ b/PepperDashEssentials/Bridges/AirMediaControllerBridge.cs @@ -25,9 +25,9 @@ namespace PepperDash.Essentials.Bridges joinMap.OffsetJoinNumbers(joinStart); Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - Debug.Console(0, "Linking to Bridge Type {0}", airMedia.GetType().Name.ToString()); + Debug.Console(0, "Linking to Airmedia: {0}", airMedia.Name); - trilist.StringInput[joinMap.Name].StringValue = airMedia.GetType().Name.ToString(); + trilist.StringInput[joinMap.Name].StringValue = airMedia.Name; var commMonitor = airMedia as ICommunicationMonitor; if (commMonitor != null) @@ -55,68 +55,5 @@ namespace PepperDash.Essentials.Bridges airMedia.HostnameFeedback.LinkInputSig(trilist.StringInput[joinMap.HostnameFB]); airMedia.SerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.SerialNumberFeedback]); } - - } - public class AirMediaControllerJoinMap : JoinMapBase - { - // Digital - public uint IsOnline { get; set; } - public uint IsInSession { get; set; } - public uint HdmiVideoSync { get; set; } - public uint AutomaticInputRoutingEnabled { get; set; } - - // Analog - public uint VideoOut { get; set; } - public uint ErrorFB { get; set; } - public uint NumberOfUsersConnectedFB { get; set; } - public uint LoginCode { get; set; } - - // Serial - public uint Name { get; set; } - public uint ConnectionAddressFB { get; set; } - public uint HostnameFB { get; set; } - public uint SerialNumberFeedback { get; set; } - - - 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; - } - } + } } \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/AppleTvBridge.cs b/PepperDashEssentials/Bridges/AppleTvBridge.cs index 0c39b78b..fe362aa3 100644 --- a/PepperDashEssentials/Bridges/AppleTvBridge.cs +++ b/PepperDashEssentials/Bridges/AppleTvBridge.cs @@ -36,40 +36,4 @@ namespace PepperDash.Essentials.Bridges trilist.SetBoolSigAction(joinMap.PlayPause, (b) => appleTv.Play(b)); } } - - public class AppleTvJoinMap : JoinMapBase - { - // Digital - public uint UpArrow { get; set; } - public uint DnArrow { get; set; } - public uint LeftArrow { get; set; } - public uint RightArrow { get; set; } - public uint Menu { get; set; } - public uint Select { get; set; } - public uint PlayPause { get; set; } - - 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; - } - } } \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/DisplayControllerBridge.cs b/PepperDashEssentials/Bridges/DisplayControllerBridge.cs index b9f31ad6..438255bf 100644 --- a/PepperDashEssentials/Bridges/DisplayControllerBridge.cs +++ b/PepperDashEssentials/Bridges/DisplayControllerBridge.cs @@ -29,9 +29,9 @@ namespace PepperDash.Essentials.Bridges joinMap.OffsetJoinNumbers(joinStart); Debug.Console(1, "Linking to Trilist '{0}'",trilist.ID.ToString("X")); - Debug.Console(0, "Linking to Bridge Type {0}", displayDevice.GetType().Name.ToString()); + Debug.Console(0, "Linking to Display: {0}", displayDevice.Name); - trilist.StringInput[joinMap.Name].StringValue = displayDevice.GetType().Name.ToString(); + trilist.StringInput[joinMap.Name].StringValue = displayDevice.Name; var commMonitor = displayDevice as ICommunicationMonitor; if (commMonitor != null) @@ -119,7 +119,8 @@ namespace PepperDash.Essentials.Bridges var volumeDisplayWithFeedback = volumeDisplay as IBasicVolumeWithFeedback; if(volumeDisplayWithFeedback != null) { - volumeDisplayWithFeedback.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[joinMap.VolumeLevelFB]); + trilist.SetUShortSigAction(joinMap.VolumeLevel, new Action((u) => volumeDisplayWithFeedback.SetVolume(u))); + volumeDisplayWithFeedback.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[joinMap.VolumeLevel]); volumeDisplayWithFeedback.MuteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VolumeMute]); } } @@ -148,75 +149,6 @@ namespace PepperDash.Essentials.Bridges InputNumberFeedback.FireUpdate(); } } - - - - - } - public class DisplayControllerJoinMap : JoinMapBase - { - // Digital - public uint PowerOff { get; set; } - public uint PowerOn { get; set; } - public uint IsTwoWayDisplay { get; set; } - public uint VolumeUp { get; set; } - public uint VolumeDown { get; set; } - public uint VolumeMute { get; set; } - public uint InputSelectOffset { get; set; } - public uint ButtonVisibilityOffset { get; set; } - public uint IsOnline { get; set; } - - // Analog - public uint InputSelect { get; set; } - public uint VolumeLevelFB { get; set; } - - // Serial - public uint Name { get; set; } - public uint InputNamesOffset { get; set; } - - - public DisplayControllerJoinMap() - { - // Digital - IsOnline = 50; - PowerOff = 1; - PowerOn = 2; - IsTwoWayDisplay = 3; - VolumeUp = 5; - VolumeDown = 6; - VolumeMute = 7; - - ButtonVisibilityOffset = 40; - InputSelectOffset = 10; - - // Analog - InputSelect = 11; - VolumeLevelFB = 5; - - // Serial - Name = 1; - InputNamesOffset = 10; - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - IsOnline = IsOnline + joinOffset; - PowerOff = PowerOff + joinOffset; - PowerOn = PowerOn + joinOffset; - IsTwoWayDisplay = IsTwoWayDisplay + joinOffset; - ButtonVisibilityOffset = ButtonVisibilityOffset + joinOffset; - Name = Name + joinOffset; - InputNamesOffset = InputNamesOffset + joinOffset; - InputSelectOffset = InputSelectOffset + joinOffset; - - InputSelect = InputSelect + joinOffset; - - VolumeUp = VolumeUp + joinOffset; - VolumeDown = VolumeDown + joinOffset; - VolumeMute = VolumeMute + joinOffset; - VolumeLevelFB = VolumeLevelFB + joinOffset; - } } + } \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/DmChassisControllerBridge.cs b/PepperDashEssentials/Bridges/DmChassisControllerBridge.cs index 90eea6b1..35398ae6 100644 --- a/PepperDashEssentials/Bridges/DmChassisControllerBridge.cs +++ b/PepperDashEssentials/Bridges/DmChassisControllerBridge.cs @@ -14,7 +14,7 @@ using PepperDash.Essentials.DM; namespace PepperDash.Essentials.Bridges { - public static class DmChassisControllerApiExtentions + public static class DmChassisControllerApiExtentions { public static void LinkToApi(this DmChassisController dmChassis, BasicTriList trilist, uint joinStart, string joinMapKey) { @@ -46,13 +46,13 @@ namespace PepperDash.Essentials.Bridges trilist.SetUShortSigAction(joinMap.OutputUsb + ioSlot, new Action(o => dmChassis.ExecuteSwitch(o, ioSlot, eRoutingSignalType.UsbOutput))); trilist.SetUShortSigAction(joinMap.InputUsb + ioSlot, new Action(o => dmChassis.ExecuteSwitch(o, ioSlot, eRoutingSignalType.UsbInput))); - if (dmChassis.TxDictionary.ContainsKey(ioSlot)) - { - Debug.Console(2, "Creating Tx Feedbacks {0}", ioSlot); - var txKey = dmChassis.TxDictionary[ioSlot]; + if (dmChassis.TxDictionary.ContainsKey(ioSlot)) + { + Debug.Console(2, "Creating Tx Feedbacks {0}", ioSlot); + var txKey = dmChassis.TxDictionary[ioSlot]; var basicTxDevice = DeviceManager.GetDeviceForKey(txKey) as BasicDmTxControllerBase; - var txDevice = basicTxDevice as DmTxControllerBase; + var txDevice = basicTxDevice as DmTxControllerBase; if (dmChassis.Chassis is DmMd8x8Cpu3 || dmChassis.Chassis is DmMd8x8Cpu3rps || dmChassis.Chassis is DmMd16x16Cpu3 || dmChassis.Chassis is DmMd16x16Cpu3rps @@ -68,7 +68,7 @@ namespace PepperDash.Essentials.Bridges } } - if(basicTxDevice != null && txDevice == null) + if (basicTxDevice != null && txDevice == null) trilist.BooleanInput[joinMap.TxAdvancedIsPresent + ioSlot].BoolValue = true; @@ -79,7 +79,7 @@ namespace PepperDash.Essentials.Bridges else { var inputPort = dmChassis.InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)]; - if(inputPort != null) + if (inputPort != null) { var hdmiInPort = inputPort.Port; @@ -101,10 +101,10 @@ namespace PepperDash.Essentials.Bridges } } } - } - else - { - dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]); + } + else + { + dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]); var inputPort = dmChassis.InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)]; if (inputPort != null) @@ -117,12 +117,12 @@ namespace PepperDash.Essentials.Bridges dmChassis.InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]); } } - } - if (dmChassis.RxDictionary.ContainsKey(ioSlot)) - { - Debug.Console(2, "Creating Rx Feedbacks {0}", ioSlot); - var RxKey = dmChassis.RxDictionary[ioSlot]; - var RxDevice = DeviceManager.GetDeviceForKey(RxKey) as DmRmcControllerBase; + } + if (dmChassis.RxDictionary.ContainsKey(ioSlot)) + { + Debug.Console(2, "Creating Rx Feedbacks {0}", ioSlot); + var RxKey = dmChassis.RxDictionary[ioSlot]; + var RxDevice = DeviceManager.GetDeviceForKey(RxKey) as DmRmcControllerBase; if (dmChassis.Chassis is DmMd8x8Cpu3 || dmChassis.Chassis is DmMd8x8Cpu3rps || dmChassis.Chassis is DmMd16x16Cpu3 || dmChassis.Chassis is DmMd16x16Cpu3rps || dmChassis.Chassis is DmMd32x32Cpu3 || dmChassis.Chassis is DmMd32x32Cpu3rps) @@ -133,7 +133,7 @@ namespace PepperDash.Essentials.Bridges { RxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]); } - } + } // Feedback dmChassis.VideoOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputVideo + ioSlot]); @@ -204,90 +204,5 @@ namespace PepperDash.Essentials.Bridges } } - public class DmChassisControllerJoinMap : JoinMapBase - { - // Digtal/Analog - public uint SystemId { get; set; } - - //Digital - public uint IsOnline { get; set; } - public uint OutputUsb { get; set; } - public uint InputUsb { get; set; } - public uint VideoSyncStatus { get; set; } - public uint InputEndpointOnline { get; set; } - public uint OutputEndpointOnline { get; set; } - public uint TxAdvancedIsPresent { get; set; } // indicates that there is an attached transmitter that should be bridged to be interacted with - - //Analog - public uint OutputVideo { get; set; } - public uint OutputAudio { get; set; } - public uint HdcpSupportState { get; set; } - public uint HdcpSupportCapability { get; set; } - - //SErial - public uint InputNames { get; set; } - public uint OutputNames { get; set; } - public uint OutputCurrentVideoInputNames { get; set; } - public uint OutputCurrentAudioInputNames { get; set; } - public uint InputCurrentResolution { get; set; } - - - - 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 - - //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 - HdcpSupportState = 1000; //1001-1199 - HdcpSupportCapability = 1200; //1201-1399 - } - - 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; - } - } } } \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/DmRmcControllerBridge.cs b/PepperDashEssentials/Bridges/DmRmcControllerBridge.cs index 318a3d0b..c2c63d43 100644 --- a/PepperDashEssentials/Bridges/DmRmcControllerBridge.cs +++ b/PepperDashEssentials/Bridges/DmRmcControllerBridge.cs @@ -36,40 +36,5 @@ namespace PepperDash.Essentials.Bridges if(rmc.EdidSerialNumberFeedback != null) rmc.EdidSerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidSerialNumber]); } - - public class DmRmcControllerJoinMap : JoinMapBase - { - public uint IsOnline { get; set; } - public uint CurrentOutputResolution { get; set; } - public uint EdidManufacturer { get; set; } - public uint EdidName { get; set; } - public uint EdidPrefferedTiming { get; set; } - public uint EdidSerialNumber { get; set; } - - public DmRmcControllerJoinMap() - { - // Digital - IsOnline = 1; - - // Serial - CurrentOutputResolution = 1; - EdidManufacturer = 2; - EdidName = 3; - EdidPrefferedTiming = 4; - EdidSerialNumber = 5; - } - - 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; - } - } } } \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/DmTxControllerBridge.cs b/PepperDashEssentials/Bridges/DmTxControllerBridge.cs index 906e189c..b8926f71 100644 --- a/PepperDashEssentials/Bridges/DmTxControllerBridge.cs +++ b/PepperDashEssentials/Bridges/DmTxControllerBridge.cs @@ -128,46 +128,6 @@ namespace PepperDash.Essentials.Bridges } } - public class DmTxControllerJoinMap : JoinMapBase - { - public uint IsOnline { get; set; } - public uint VideoSyncStatus { get; set; } - public uint CurrentInputResolution { get; set; } - public uint HdcpSupportCapability { get; set; } - public uint VideoInput { get; set; } - public uint AudioInput { get; set; } - public uint Port1HdcpState { get; set; } - public uint Port2HdcpState { get; set; } - - public DmTxControllerJoinMap() - { - // Digital - IsOnline = 1; - VideoSyncStatus = 2; - // Serial - CurrentInputResolution = 1; - // Analog - VideoInput = 1; - AudioInput = 2; - HdcpSupportCapability = 3; - Port1HdcpState = 4; - Port2HdcpState = 5; - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - IsOnline = IsOnline + joinOffset; - VideoSyncStatus = VideoSyncStatus + joinOffset; - CurrentInputResolution = CurrentInputResolution + joinOffset; - VideoInput = VideoInput + joinOffset; - AudioInput = AudioInput + joinOffset; - HdcpSupportCapability = HdcpSupportCapability + joinOffset; - Port1HdcpState = Port1HdcpState + joinOffset; - Port2HdcpState = Port2HdcpState + joinOffset; - } - } } } \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/DmpsAudioOutputControllerBridge.cs b/PepperDashEssentials/Bridges/DmpsAudioOutputControllerBridge.cs index 16f74716..8c6ac172 100644 --- a/PepperDashEssentials/Bridges/DmpsAudioOutputControllerBridge.cs +++ b/PepperDashEssentials/Bridges/DmpsAudioOutputControllerBridge.cs @@ -50,10 +50,10 @@ namespace PepperDash.Essentials.Bridges static void SetUpDmpsAudioOutputJoins(BasicTriList trilist, DmpsAudioOutput output, uint joinStart) { var volumeLevelJoin = joinStart; - var muteOnJoin = joinStart + 1; - var muteOffJoin = joinStart + 2; - var volumeUpJoin = joinStart + 3; - var volumeDownJoin = joinStart + 4; + var muteOnJoin = joinStart; + var muteOffJoin = joinStart + 1; + var volumeUpJoin = joinStart + 2; + var volumeDownJoin = joinStart + 3; trilist.SetUShortSigAction(volumeLevelJoin, new Action(o => output.SetVolume(o))); @@ -67,33 +67,5 @@ namespace PepperDash.Essentials.Bridges trilist.SetBoolSigAction(volumeUpJoin, new Action(b => output.VolumeUp(b))); trilist.SetBoolSigAction(volumeDownJoin, new Action(b => output.VolumeDown(b))); } - - public class DmpsAudioOutputControllerJoinMap: JoinMapBase - { - // Digital - public uint MasterVolume { get; set; } - public uint SourceVolume { get; set; } - public uint Codec1Volume { get; set; } - public uint Codec2Volume { get; set; } - - - 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 -1; - - MasterVolume = MasterVolume + joinOffset; - SourceVolume = SourceVolume + joinOffset; - Codec1Volume = Codec1Volume + joinOffset; - Codec2Volume = Codec2Volume + joinOffset; - } - } } } \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/DmpsRoutingControllerBridge.cs b/PepperDashEssentials/Bridges/DmpsRoutingControllerBridge.cs index 9071f234..79313de6 100644 --- a/PepperDashEssentials/Bridges/DmpsRoutingControllerBridge.cs +++ b/PepperDashEssentials/Bridges/DmpsRoutingControllerBridge.cs @@ -120,58 +120,5 @@ namespace PepperDash.Essentials.Bridges dmpsRouter.OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]); } } - - - public class DmpsRoutingControllerJoinMap : JoinMapBase - { - public uint OutputVideo { get; set; } - public uint OutputAudio { get; set; } - public uint VideoSyncStatus { get; set; } - public uint InputNames { get; set; } - public uint OutputNames { get; set; } - public uint OutputCurrentVideoInputNames { get; set; } - public uint OutputCurrentAudioInputNames { get; set; } - public uint InputCurrentResolution { get; set; } - public uint InputEndpointOnline { get; set; } - public uint OutputEndpointOnline { get; set; } - //public uint HdcpSupport { get; set; } - //public uint HdcpSupportCapability { get; set; } - - - public DmpsRoutingControllerJoinMap() - { - OutputVideo = 100; //101-299 - OutputAudio = 300; //301-499 - VideoSyncStatus = 100; //101-299 - 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 - //HdcpSupport = 1000; //1001-1199 - //HdcpSupportCapability = 1200; //1201-1399 - - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - OutputVideo = OutputVideo + joinOffset; - OutputAudio = OutputAudio + 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; - //HdcpSupport = HdcpSupport + joinOffset; - //HdcpSupportCapability = HdcpSupportCapability + joinOffset; - } - } } } \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/GenericRelayDeviceBridge.cs b/PepperDashEssentials/Bridges/GenericRelayDeviceBridge.cs index 3871a80e..aab4659d 100644 --- a/PepperDashEssentials/Bridges/GenericRelayDeviceBridge.cs +++ b/PepperDashEssentials/Bridges/GenericRelayDeviceBridge.cs @@ -45,22 +45,4 @@ namespace PepperDash.Essentials.Bridges } } - - public class GenericRelayControllerJoinMap : JoinMapBase - { - //Digital - public uint Relay { get; set; } - - public GenericRelayControllerJoinMap() - { - Relay = 1; - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - Relay = Relay + joinOffset; - } - } } \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/HdMdxxxCEControllerBridge.cs b/PepperDashEssentials/Bridges/HdMdxxxCEControllerBridge.cs index 1c21789c..4c488c90 100644 --- a/PepperDashEssentials/Bridges/HdMdxxxCEControllerBridge.cs +++ b/PepperDashEssentials/Bridges/HdMdxxxCEControllerBridge.cs @@ -57,116 +57,6 @@ namespace PepperDash.Essentials.Bridges trilist.StringInput[joinMap.SourceNames + number].StringValue = input.Key; } - } - - public class HdMdxxxCEControllerJoinMap : JoinMapBase - { - #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; - } - } + } } } \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/IBasicCommunicationBridge.cs b/PepperDashEssentials/Bridges/IBasicCommunicationBridge.cs index d2072a91..aa755af5 100644 --- a/PepperDashEssentials/Bridges/IBasicCommunicationBridge.cs +++ b/PepperDashEssentials/Bridges/IBasicCommunicationBridge.cs @@ -30,14 +30,14 @@ namespace PepperDash.Essentials.Bridges Debug.Console(1, comm, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); // this is a permanent event handler. This cannot be -= from event - comm.CommPort.TextReceived += (s, a) => - { - Debug.Console(2, comm, "RX: {0}", a.Text); - trilist.SetString(joinMap.TextReceived, a.Text); - }; + comm.CommPort.TextReceived += (s, a) => + { + Debug.Console(2, comm, "RX: {0}", a.Text); + trilist.SetString(joinMap.TextReceived, a.Text); + }; trilist.SetStringSigAction(joinMap.SendText, new Action(s => comm.CommPort.SendText(s))); trilist.SetStringSigAction(joinMap.SetPortConfig + 1, new Action(s => comm.SetPortConfig(s))); - + var sComm = comm.CommPort as ISocketStatus; if (sComm != null) @@ -62,46 +62,5 @@ namespace PepperDash.Essentials.Bridges })); } } - - - - public class IBasicCommunicationJoinMap : JoinMapBase - { - //Digital - public uint Connect { get; set; } - public uint Connected { get; set; } - - //Analog - public uint Status { get; set; } - - // Serial - public uint TextReceived { get; set; } - public uint SendText { get; set; } - public uint SetPortConfig { get; set; } - - - public IBasicCommunicationJoinMap() - { - TextReceived = 1; - SendText = 1; - SetPortConfig = 2; - Connect = 1; - Connected = 1; - Status = 1; - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - TextReceived = TextReceived + joinOffset; - SendText = SendText + joinOffset; - SetPortConfig = SetPortConfig + joinOffset; - Connect = Connect + joinOffset; - Connected = Connected + joinOffset; - Status = Status + joinOffset; - } - } } - } \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/IDigitalInputBridge.cs b/PepperDashEssentials/Bridges/IDigitalInputBridge.cs index c33329dd..7bd89aa2 100644 --- a/PepperDashEssentials/Bridges/IDigitalInputBridge.cs +++ b/PepperDashEssentials/Bridges/IDigitalInputBridge.cs @@ -14,10 +14,10 @@ namespace PepperDash.Essentials.Bridges { public static void LinkToApi(this IDigitalInput input, BasicTriList trilist, uint joinStart, string joinMapKey) { - var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as IDigitalInputApiJoinMap; + var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as IDigitalInputJoinMap; if (joinMap == null) - joinMap = new IDigitalInputApiJoinMap(); + joinMap = new IDigitalInputJoinMap(); joinMap.OffsetJoinNumbers(joinStart); @@ -35,25 +35,5 @@ namespace PepperDash.Essentials.Bridges return; } } - - - } - - public class IDigitalInputApiJoinMap : JoinMapBase - { - //Digital - public uint InputState { get; set; } - - public IDigitalInputApiJoinMap() - { - InputState = 1; - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - InputState = InputState + joinOffset; - } - } + } } \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/AirMediaControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/AirMediaControllerJoinMap.cs new file mode 100644 index 00000000..4cd65649 --- /dev/null +++ b/PepperDashEssentials/Bridges/JoinMaps/AirMediaControllerJoinMap.cs @@ -0,0 +1,109 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +namespace PepperDash.Essentials.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; + } + } +} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/AppleTvJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/AppleTvJoinMap.cs new file mode 100644 index 00000000..acab7925 --- /dev/null +++ b/PepperDashEssentials/Bridges/JoinMaps/AppleTvJoinMap.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +namespace PepperDash.Essentials.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; + } + } +} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/DisplayControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/DisplayControllerJoinMap.cs new file mode 100644 index 00000000..bd30a3b6 --- /dev/null +++ b/PepperDashEssentials/Bridges/JoinMaps/DisplayControllerJoinMap.cs @@ -0,0 +1,116 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +namespace PepperDash.Essentials.Bridges +{ + public class DisplayControllerJoinMap : JoinMapBase + { + #region Digitals + /// + /// Turns the display off and reports power off feedback + /// + public uint PowerOff { get; set; } + /// + /// Turns the display on and repots power on feedback + /// + public uint PowerOn { get; set; } + /// + /// Indicates that the display device supports two way communication when high + /// + public uint IsTwoWayDisplay { get; set; } + /// + /// Increments the volume while high + /// + public uint VolumeUp { get; set; } + /// + /// Decrements teh volume while high + /// + public uint VolumeDown { get; set; } + /// + /// Toggles the mute state. Feedback is high when volume is muted + /// + public uint VolumeMute { get; set; } + /// + /// Range of digital joins to select inputs and report current input as feedback + /// + public uint InputSelectOffset { get; set; } + /// + /// Range of digital joins to report visibility for input buttons + /// + public uint ButtonVisibilityOffset { get; set; } + /// + /// High if the device is online + /// + public uint IsOnline { get; set; } + #endregion + + #region Analogs + /// + /// Analog join to set the input and report current input as feedback + /// + public uint InputSelect { get; set; } + /// + /// Sets the volume level and reports the current level as feedback + /// + public uint VolumeLevel { get; set; } + #endregion + + #region Serials + /// + /// Reports the name of the display as defined in config as feedback + /// + public uint Name { get; set; } + /// + /// Range of serial joins that reports the names of the inputs as feedback + /// + public uint InputNamesOffset { get; set; } + #endregion + + public DisplayControllerJoinMap() + { + // Digital + IsOnline = 50; + PowerOff = 1; + PowerOn = 2; + IsTwoWayDisplay = 3; + VolumeUp = 5; + VolumeDown = 6; + VolumeMute = 7; + + ButtonVisibilityOffset = 40; + InputSelectOffset = 10; + + // Analog + InputSelect = 11; + VolumeLevel = 5; + + // Serial + Name = 1; + InputNamesOffset = 10; + } + + public override void OffsetJoinNumbers(uint joinStart) + { + var joinOffset = joinStart - 1; + + IsOnline = IsOnline + joinOffset; + PowerOff = PowerOff + joinOffset; + PowerOn = PowerOn + joinOffset; + IsTwoWayDisplay = IsTwoWayDisplay + joinOffset; + ButtonVisibilityOffset = ButtonVisibilityOffset + joinOffset; + Name = Name + joinOffset; + InputNamesOffset = InputNamesOffset + joinOffset; + InputSelectOffset = InputSelectOffset + joinOffset; + + InputSelect = InputSelect + joinOffset; + + VolumeUp = VolumeUp + joinOffset; + VolumeDown = VolumeDown + joinOffset; + VolumeMute = VolumeMute + joinOffset; + VolumeLevel = VolumeLevel + joinOffset; + } + } +} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/DmChassisControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/DmChassisControllerJoinMap.cs new file mode 100644 index 00000000..724d0c67 --- /dev/null +++ b/PepperDashEssentials/Bridges/JoinMaps/DmChassisControllerJoinMap.cs @@ -0,0 +1,146 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +namespace PepperDash.Essentials.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 +#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 + + //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; + + 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; + } + } +} diff --git a/PepperDashEssentials/Bridges/JoinMaps/DmRmcControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/DmRmcControllerJoinMap.cs new file mode 100644 index 00000000..bcd3c740 --- /dev/null +++ b/PepperDashEssentials/Bridges/JoinMaps/DmRmcControllerJoinMap.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +namespace PepperDash.Essentials.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 + + public DmRmcControllerJoinMap() + { + // Digital + IsOnline = 1; + + // Serial + CurrentOutputResolution = 1; + EdidManufacturer = 2; + EdidName = 3; + EdidPrefferedTiming = 4; + EdidSerialNumber = 5; + } + + 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; + } + } +} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/DmTxControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/DmTxControllerJoinMap.cs new file mode 100644 index 00000000..bd83c84b --- /dev/null +++ b/PepperDashEssentials/Bridges/JoinMaps/DmTxControllerJoinMap.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +namespace PepperDash.Essentials.Bridges +{ + public class DmTxControllerJoinMap : 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; } + /// + /// High when video sync is detected + /// + public uint VideoSyncStatus { 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; } + #endregion + + #region Serials + /// + /// Reports the current input resolution + /// + public uint CurrentInputResolution { get; set; } + #endregion + + + public DmTxControllerJoinMap() + { + // Digital + IsOnline = 1; + VideoSyncStatus = 2; + // Serial + CurrentInputResolution = 1; + // Analog + VideoInput = 1; + AudioInput = 2; + HdcpSupportCapability = 3; + Port1HdcpState = 4; + Port2HdcpState = 5; + } + + public override void OffsetJoinNumbers(uint joinStart) + { + var joinOffset = joinStart - 1; + + IsOnline = IsOnline + joinOffset; + VideoSyncStatus = VideoSyncStatus + joinOffset; + CurrentInputResolution = CurrentInputResolution + joinOffset; + VideoInput = VideoInput + joinOffset; + AudioInput = AudioInput + joinOffset; + HdcpSupportCapability = HdcpSupportCapability + joinOffset; + Port1HdcpState = Port1HdcpState + joinOffset; + Port2HdcpState = Port2HdcpState + joinOffset; + } + } +} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs new file mode 100644 index 00000000..18817a1e --- /dev/null +++ b/PepperDashEssentials/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +namespace PepperDash.Essentials.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; + } + } +} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs new file mode 100644 index 00000000..bb0f3df1 --- /dev/null +++ b/PepperDashEssentials/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs @@ -0,0 +1,126 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +namespace PepperDash.Essentials.Bridges +{ + public class DmpsRoutingControllerJoinMap : JoinMapBase + { + #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; + } + } +} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs new file mode 100644 index 00000000..ddba004a --- /dev/null +++ b/PepperDashEssentials/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +namespace PepperDash.Essentials.Bridges +{ + public class GenericRelayControllerJoinMap : JoinMapBase + { + #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; + } + } +} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs new file mode 100644 index 00000000..d5237951 --- /dev/null +++ b/PepperDashEssentials/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs @@ -0,0 +1,118 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +namespace PepperDash.Essentials.Bridges +{ + public class HdMdxxxCEControllerJoinMap : JoinMapBase + { + #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; + } + } +} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/IBasicCommunicationJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/IBasicCommunicationJoinMap.cs new file mode 100644 index 00000000..98fc9882 --- /dev/null +++ b/PepperDashEssentials/Bridges/JoinMaps/IBasicCommunicationJoinMap.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +namespace PepperDash.Essentials.Bridges +{ + public class IBasicCommunicationJoinMap : JoinMapBase + { + #region Digitals + /// + /// Set High to connect, Low to disconnect + /// + public uint Connect { get; set; } + /// + /// Reports Connected State (High = Connected) + /// + public uint Connected { get; set; } + #endregion + + #region Analogs + /// + /// Reports the connections status value + /// + public uint Status { get; set; } + #endregion + + #region Serials + /// + /// Data back from port + /// + public uint TextReceived { get; set; } + /// + /// Sends data to the port + /// + public uint SendText { get; set; } + /// + /// Takes a JSON serialized string that sets a COM port's parameters + /// + public uint SetPortConfig { get; set; } + #endregion + + public IBasicCommunicationJoinMap() + { + TextReceived = 1; + SendText = 1; + SetPortConfig = 2; + Connect = 1; + Connected = 1; + Status = 1; + } + + public override void OffsetJoinNumbers(uint joinStart) + { + var joinOffset = joinStart - 1; + + TextReceived = TextReceived + joinOffset; + SendText = SendText + joinOffset; + SetPortConfig = SetPortConfig + joinOffset; + Connect = Connect + joinOffset; + Connected = Connected + joinOffset; + Status = Status + joinOffset; + } + } +} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/IDigitalInputJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/IDigitalInputJoinMap.cs new file mode 100644 index 00000000..fefc0286 --- /dev/null +++ b/PepperDashEssentials/Bridges/JoinMaps/IDigitalInputJoinMap.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +namespace PepperDash.Essentials.Bridges +{ + public class IDigitalInputJoinMap : JoinMapBase + { + #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; + } + } +} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/SystemMonitorJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/SystemMonitorJoinMap.cs new file mode 100644 index 00000000..81860949 --- /dev/null +++ b/PepperDashEssentials/Bridges/JoinMaps/SystemMonitorJoinMap.cs @@ -0,0 +1,135 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +namespace PepperDash.Essentials.Bridges +{ + public class SystemMonitorJoinMap : JoinMapBase + { + /// + /// Offset to indicate where the range of iterated program joins will start + /// + public uint ProgramStartJoin { get; set; } + + /// + /// Offset between each program join set + /// + public uint ProgramOffsetJoin { get; set; } + + #region Digitals + /// + /// Range Sets and reports whether the corresponding program slot is started + /// + public uint ProgramStart { get; set; } + /// + /// Range Sets and reports whether the corresponding program slot is stopped + /// + public uint ProgramStop { get; set; } + /// + /// Range Sets and reports whether the corresponding program is registered + /// + public uint ProgramRegister { get; set; } + /// + /// Range Sets and reports whether the corresponding program is unregistered + /// + public uint ProgramUnregister { get; set; } + #endregion + + #region Analogs + /// + /// Sets and reports the time zone + /// + public uint TimeZone { get; set; } + #endregion + + #region Serials + /// + /// Reports the time zone name + /// + public uint TimeZoneName { get; set; } + /// + /// Reports the IO Controller Version + /// + public uint IOControllerVersion { get; set; } + /// + /// Reports the SNMP App Version + /// + public uint SnmpAppVersion { get; set; } + /// + /// Reports the BACnet App Version + /// + public uint BACnetAppVersion { get; set; } + /// + /// Reports the firmware version + /// + public uint ControllerVersion { get; set; } + + /// + /// Reports the name of the corresponding program + /// + public uint ProgramName { get; set; } + /// + /// Reports the compile time of the corresponding program + /// + public uint ProgramCompiledTime { get; set; } + /// + /// Reports the Crestron Database version of the corresponding program + /// + public uint ProgramCrestronDatabaseVersion { get; set; } + /// + /// Reports the Environment Version of the corresponding program + /// + public uint ProgramEnvironmentVersion { get; set; } + /// + /// Serialized JSON output that aggregates the program info of the corresponding program + /// + public uint AggregatedProgramInfo { get; set; } + #endregion + + public SystemMonitorJoinMap() + { + TimeZone = 1; + + TimeZoneName = 1; + IOControllerVersion = 2; + SnmpAppVersion = 3; + BACnetAppVersion = 4; + ControllerVersion = 5; + + + ProgramStartJoin = 10; + + ProgramOffsetJoin = 5; + + // Offset in groups of 5 joins + ProgramStart = 1; + ProgramStop = 2; + ProgramRegister = 3; + ProgramUnregister = 4; + + ProgramName = 1; + ProgramCompiledTime = 2; + ProgramCrestronDatabaseVersion = 3; + ProgramEnvironmentVersion = 4; + AggregatedProgramInfo = 5; + } + + public override void OffsetJoinNumbers(uint joinStart) + { + var joinOffset = joinStart - 1; + + TimeZone = TimeZone + joinOffset; + + TimeZoneName = TimeZoneName + joinOffset; + IOControllerVersion = IOControllerVersion + joinOffset; + SnmpAppVersion = SnmpAppVersion + joinOffset; + BACnetAppVersion = BACnetAppVersion + joinOffset; + ControllerVersion = ControllerVersion + joinOffset; + + // Sets the initial join value where the iterated program joins will begin + ProgramStartJoin = ProgramStartJoin + joinOffset; + } + } +} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/SystemMonitorBridge.cs b/PepperDashEssentials/Bridges/SystemMonitorBridge.cs index 4b8829b2..e9878be6 100644 --- a/PepperDashEssentials/Bridges/SystemMonitorBridge.cs +++ b/PepperDashEssentials/Bridges/SystemMonitorBridge.cs @@ -63,88 +63,6 @@ namespace PepperDash.Essentials.Bridges programSlotJoinStart = programSlotJoinStart + joinMap.ProgramOffsetJoin; } - - } - - - } - - public class SystemMonitorJoinMap : JoinMapBase - { - /// - /// Offset to indicate where the range of iterated program joins will start - /// - public uint ProgramStartJoin { get; set; } - - /// - /// Offset between each program join set - /// - public uint ProgramOffsetJoin { get; set; } - - //Digital - public uint ProgramStart { get; set; } - public uint ProgramStop { get; set; } - public uint ProgramRegister { get; set; } - public uint ProgramUnregister { get; set; } - - //Analog - public uint TimeZone { get; set; } - - //Serial - public uint TimeZoneName { get; set; } - public uint IOControllerVersion { get; set; } - public uint SnmpAppVersion { get; set; } - public uint BACnetAppVersion { get; set; } - public uint ControllerVersion { get; set; } - - public uint ProgramName { get; set; } - public uint ProgramCompiledTime { get; set; } - public uint ProgramCrestronDatabaseVersion { get; set; } - public uint ProgramEnvironmentVersion { get; set; } - public uint AggregatedProgramInfo { get; set; } - - public SystemMonitorJoinMap() - { - TimeZone = 1; - - TimeZoneName = 1; - IOControllerVersion = 2; - SnmpAppVersion = 3; - BACnetAppVersion = 4; - ControllerVersion = 5; - - - ProgramStartJoin = 10; - - ProgramOffsetJoin = 5; - - // Offset in groups of 5 joins - ProgramStart = 1; - ProgramStop = 2; - ProgramRegister = 3; - ProgramUnregister = 4; - - ProgramName = 1; - ProgramCompiledTime = 2; - ProgramCrestronDatabaseVersion = 3; - ProgramEnvironmentVersion = 4; - AggregatedProgramInfo = 5; - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - TimeZone = TimeZone + joinOffset; - - TimeZoneName = TimeZoneName + joinOffset; - IOControllerVersion = IOControllerVersion + joinOffset; - SnmpAppVersion = SnmpAppVersion + joinOffset; - BACnetAppVersion = BACnetAppVersion + joinOffset; - ControllerVersion = ControllerVersion + joinOffset; - - // Sets the initial join value where the iterated program joins will begin - ProgramStartJoin = ProgramStartJoin + joinOffset; } } } \ No newline at end of file diff --git a/PepperDashEssentials/PepperDashEssentials.csproj b/PepperDashEssentials/PepperDashEssentials.csproj index 65eda177..b4a01e80 100644 --- a/PepperDashEssentials/PepperDashEssentials.csproj +++ b/PepperDashEssentials/PepperDashEssentials.csproj @@ -135,6 +135,19 @@ + + + + + + + + + + + + +