mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-16 14:05:03 +00:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
596b8bf29a | ||
|
|
87de4a4bf0 | ||
|
|
52343ddf7b | ||
|
|
854c2bcb6f | ||
|
|
0b9ed462b4 | ||
|
|
4dafa34b2e | ||
|
|
f1611da74c | ||
|
|
d588757eb6 | ||
|
|
5bb5c9e07f | ||
|
|
176c9d9835 | ||
|
|
6726e989a7 | ||
|
|
77fbee78a8 | ||
|
|
172e2fb744 | ||
|
|
f2b2825220 | ||
|
|
1b832409e4 | ||
|
|
969ba3c87c | ||
|
|
2b9615ad94 | ||
|
|
71098ca65d |
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -107,6 +107,11 @@ namespace PepperDash.Essentials.Bridges
|
||||
(device as DmpsRoutingController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
||||
continue;
|
||||
}
|
||||
else if (device is DmpsAudioOutputController)
|
||||
{
|
||||
(device as DmpsAudioOutputController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
||||
continue;
|
||||
}
|
||||
else if (device is DmTxControllerBase)
|
||||
{
|
||||
(device as DmTxControllerBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
||||
@@ -136,6 +141,11 @@ namespace PepperDash.Essentials.Bridges
|
||||
{
|
||||
(device as IBridge).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
||||
continue;
|
||||
}
|
||||
else if (device is HdMdxxxCEController)
|
||||
{
|
||||
(device as HdMdxxxCEController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
||||
continue;
|
||||
}
|
||||
//else if (device is LightingBase)
|
||||
//{
|
||||
|
||||
@@ -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<ushort>((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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<ushort>(o => dmChassis.ExecuteSwitch(o, ioSlot, eRoutingSignalType.UsbOutput)));
|
||||
trilist.SetUShortSigAction(joinMap.InputUsb + ioSlot, new Action<ushort>(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,23 +101,28 @@ namespace PepperDash.Essentials.Bridges
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
|
||||
|
||||
var inputPort = dmChassis.InputPorts[string.Format("inputCard{0}-hdmiIn", ioSlot)].Port as EndpointHdmiInput;
|
||||
}
|
||||
else
|
||||
{
|
||||
dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
|
||||
|
||||
var inputPort = dmChassis.InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)];
|
||||
if (inputPort != null)
|
||||
{
|
||||
//trilist.SetUShortSigAction((joinMap.HdcpSupport + ioSlot), u =>
|
||||
var hdmiPort = inputPort.Port as EndpointHdmiInput;
|
||||
|
||||
if (hdmiPort != null)
|
||||
{
|
||||
SetHdcpCapabilityAction(true, hdmiPort, joinMap.HdcpSupportState + ioSlot, trilist);
|
||||
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)
|
||||
@@ -128,7 +133,8 @@ namespace PepperDash.Essentials.Bridges
|
||||
{
|
||||
RxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Feedback
|
||||
dmChassis.VideoOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputVideo + ioSlot]);
|
||||
dmChassis.AudioOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputAudio + ioSlot]);
|
||||
@@ -198,88 +204,5 @@ namespace PepperDash.Essentials.Bridges
|
||||
}
|
||||
}
|
||||
|
||||
public class DmChassisControllerJoinMap : JoinMapBase
|
||||
{
|
||||
//Digital
|
||||
public uint SystemId { get; set; }
|
||||
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()
|
||||
{
|
||||
SystemId = 10;
|
||||
//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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharpPro.DM;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.DM;
|
||||
|
||||
namespace PepperDash.Essentials.Bridges
|
||||
{
|
||||
public static class DmpsAudioOutputControllerApiExtensions
|
||||
{
|
||||
public static void LinkToApi(this DmpsAudioOutputController dmAudioOutputController, BasicTriList trilist, uint joinStart, string joinMapKey)
|
||||
{
|
||||
var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DmpsAudioOutputControllerJoinMap;
|
||||
|
||||
if (joinMap == null)
|
||||
joinMap = new DmpsAudioOutputControllerJoinMap();
|
||||
|
||||
joinMap.OffsetJoinNumbers(joinStart);
|
||||
|
||||
Debug.Console(1, dmAudioOutputController, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||
|
||||
if (dmAudioOutputController.MasterVolumeLevel != null)
|
||||
{
|
||||
SetUpDmpsAudioOutputJoins(trilist, dmAudioOutputController.MasterVolumeLevel, joinMap.MasterVolume);
|
||||
}
|
||||
|
||||
if (dmAudioOutputController.SourceVolumeLevel != null)
|
||||
{
|
||||
SetUpDmpsAudioOutputJoins(trilist, dmAudioOutputController.SourceVolumeLevel, joinMap.SourceVolume);
|
||||
}
|
||||
|
||||
if (dmAudioOutputController.Codec1VolumeLevel != null)
|
||||
{
|
||||
SetUpDmpsAudioOutputJoins(trilist, dmAudioOutputController.Codec1VolumeLevel, joinMap.Codec1Volume);
|
||||
}
|
||||
|
||||
if (dmAudioOutputController.Codec2VolumeLevel != null)
|
||||
{
|
||||
SetUpDmpsAudioOutputJoins(trilist, dmAudioOutputController.Codec2VolumeLevel, joinMap.Codec2Volume);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void SetUpDmpsAudioOutputJoins(BasicTriList trilist, DmpsAudioOutput output, uint joinStart)
|
||||
{
|
||||
var volumeLevelJoin = joinStart;
|
||||
var muteOnJoin = joinStart;
|
||||
var muteOffJoin = joinStart + 1;
|
||||
var volumeUpJoin = joinStart + 2;
|
||||
var volumeDownJoin = joinStart + 3;
|
||||
|
||||
|
||||
trilist.SetUShortSigAction(volumeLevelJoin, new Action<ushort>(o => output.SetVolume(o)));
|
||||
output.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[volumeLevelJoin]);
|
||||
|
||||
trilist.SetSigTrueAction(muteOnJoin, new Action(output.MuteOn));
|
||||
output.MuteFeedback.LinkInputSig(trilist.BooleanInput[muteOnJoin]);
|
||||
trilist.SetSigTrueAction(muteOffJoin, new Action(output.MuteOff));
|
||||
output.MuteFeedback.LinkComplementInputSig(trilist.BooleanInput[muteOffJoin]);
|
||||
|
||||
trilist.SetBoolSigAction(volumeUpJoin, new Action<bool>(b => output.VolumeUp(b)));
|
||||
trilist.SetBoolSigAction(volumeDownJoin, new Action<bool>(b => output.VolumeDown(b)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
OutputEndpointOnline = 700;
|
||||
//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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
62
PepperDashEssentials/Bridges/HdMdxxxCEControllerBridge.cs
Normal file
62
PepperDashEssentials/Bridges/HdMdxxxCEControllerBridge.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharpPro.DM;
|
||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.DM;
|
||||
|
||||
namespace PepperDash.Essentials.Bridges
|
||||
{
|
||||
public static class HdMdxxxCEControllerApiExtensions
|
||||
{
|
||||
public static void LinkToApi(this HdMdxxxCEController hdMdPair, BasicTriList trilist, uint joinStart, string joinMapKey)
|
||||
{
|
||||
var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as HdMdxxxCEControllerJoinMap;
|
||||
|
||||
if (joinMap == null)
|
||||
joinMap = new HdMdxxxCEControllerJoinMap();
|
||||
|
||||
joinMap.OffsetJoinNumbers(joinStart);
|
||||
|
||||
Debug.Console(1, hdMdPair, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||
|
||||
hdMdPair.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
||||
hdMdPair.RemoteEndDetectedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RemoteEndDetected]);
|
||||
|
||||
trilist.SetSigTrueAction(joinMap.AutoRouteOn, new Action(() => hdMdPair.AutoRouteOn()));
|
||||
hdMdPair.AutoRouteOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AutoRouteOn]);
|
||||
trilist.SetSigTrueAction(joinMap.AutoRouteOff, new Action(() => hdMdPair.AutoRouteOff()));
|
||||
hdMdPair.AutoRouteOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.AutoRouteOff]);
|
||||
|
||||
trilist.SetSigTrueAction(joinMap.PriorityRoutingOn, new Action(() => hdMdPair.PriorityRouteOn()));
|
||||
hdMdPair.PriorityRoutingOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PriorityRoutingOn]);
|
||||
trilist.SetSigTrueAction(joinMap.PriorityRoutingOff, new Action(() => hdMdPair.PriorityRouteOff()));
|
||||
hdMdPair.PriorityRoutingOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PriorityRoutingOff]);
|
||||
|
||||
trilist.SetSigTrueAction(joinMap.InputOnScreenDisplayEnabled, new Action(() => hdMdPair.OnScreenDisplayEnable()));
|
||||
hdMdPair.InputOnScreenDisplayEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.InputOnScreenDisplayEnabled]);
|
||||
trilist.SetSigTrueAction(joinMap.AutoRouteOff, new Action(() => hdMdPair.OnScreenDisplayDisable()));
|
||||
hdMdPair.InputOnScreenDisplayEnabledFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.InputOnScreenDisplayDisabled]);
|
||||
|
||||
trilist.SetUShortSigAction(joinMap.VideoSource, new Action<ushort>((i) => hdMdPair.ExecuteSwitch(i, null, eRoutingSignalType.Video | eRoutingSignalType.Audio)));
|
||||
hdMdPair.VideoSourceFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoSource]);
|
||||
|
||||
trilist.UShortInput[joinMap.SourceCount].UShortValue = (ushort)hdMdPair.InputPorts.Count;
|
||||
|
||||
foreach (var input in hdMdPair.InputPorts)
|
||||
{
|
||||
var number = Convert.ToUInt16(input.Selector);
|
||||
hdMdPair.SyncDetectedFeedbacks[number].LinkInputSig(trilist.BooleanInput[joinMap.SyncDetected + number]);
|
||||
trilist.StringInput[joinMap.SourceNames + number].StringValue = input.Key;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<string>(s => comm.CommPort.SendText(s)));
|
||||
trilist.SetStringSigAction(joinMap.SetPortConfig + 1, new Action<string>(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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
/// <summary>
|
||||
/// Indicates that the device is online when high
|
||||
/// </summary>
|
||||
public uint IsOnline { get; set; }
|
||||
/// <summary>
|
||||
/// Indicates that the device is in session when high
|
||||
/// </summary>
|
||||
public uint IsInSession { get; set; }
|
||||
/// <summary>
|
||||
/// Indicates sync detected on HDMI input when high
|
||||
/// </summary>
|
||||
public uint HdmiVideoSync { get; set; }
|
||||
/// <summary>
|
||||
/// Set High to enable automatic input routing and low to disable. Feedback high when enabled
|
||||
/// </summary>
|
||||
public uint AutomaticInputRoutingEnabled { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Analogs
|
||||
/// <summary>
|
||||
/// Selects source and provides feedback
|
||||
/// </summary>
|
||||
public uint VideoOut { get; set; }
|
||||
/// <summary>
|
||||
/// Provided error feedback
|
||||
/// </summary>
|
||||
public uint ErrorFB { get; set; }
|
||||
/// <summary>
|
||||
/// Indicates the number of connected users as feedback
|
||||
/// </summary>
|
||||
public uint NumberOfUsersConnectedFB { get; set; }
|
||||
/// <summary>
|
||||
/// Sets the login code and provides the current code as feedback
|
||||
/// </summary>
|
||||
public uint LoginCode { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Serials
|
||||
/// <summary>
|
||||
/// Provides the name defined in config as feedback
|
||||
/// </summary>
|
||||
public uint Name { get; set; }
|
||||
/// <summary>
|
||||
/// Provides the connection address as feedback
|
||||
/// </summary>
|
||||
public uint ConnectionAddressFB { get; set; }
|
||||
/// <summary>
|
||||
/// Provides the hostname as feedback
|
||||
/// </summary>
|
||||
public uint HostnameFB { get; set; }
|
||||
/// <summary>
|
||||
/// Provides the serial number as feedback
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
66
PepperDashEssentials/Bridges/JoinMaps/AppleTvJoinMap.cs
Normal file
66
PepperDashEssentials/Bridges/JoinMaps/AppleTvJoinMap.cs
Normal file
@@ -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
|
||||
/// <summary>
|
||||
/// Sends up arrow command while high
|
||||
/// </summary>
|
||||
public uint UpArrow { get; set; }
|
||||
/// <summary>
|
||||
/// Sends down arrow command while high
|
||||
/// </summary>
|
||||
public uint DnArrow { get; set; }
|
||||
/// <summary>
|
||||
/// Sends left arrow command while high
|
||||
/// </summary>
|
||||
public uint LeftArrow { get; set; }
|
||||
/// <summary>
|
||||
/// Sends right arrow command while high
|
||||
/// </summary>
|
||||
public uint RightArrow { get; set; }
|
||||
/// <summary>
|
||||
/// Sends menu command
|
||||
/// </summary>
|
||||
public uint Menu { get; set; }
|
||||
/// <summary>
|
||||
/// Sends select command
|
||||
/// </summary>
|
||||
public uint Select { get; set; }
|
||||
/// <summary>
|
||||
/// Sends play/pause command
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
/// <summary>
|
||||
/// Turns the display off and reports power off feedback
|
||||
/// </summary>
|
||||
public uint PowerOff { get; set; }
|
||||
/// <summary>
|
||||
/// Turns the display on and repots power on feedback
|
||||
/// </summary>
|
||||
public uint PowerOn { get; set; }
|
||||
/// <summary>
|
||||
/// Indicates that the display device supports two way communication when high
|
||||
/// </summary>
|
||||
public uint IsTwoWayDisplay { get; set; }
|
||||
/// <summary>
|
||||
/// Increments the volume while high
|
||||
/// </summary>
|
||||
public uint VolumeUp { get; set; }
|
||||
/// <summary>
|
||||
/// Decrements teh volume while high
|
||||
/// </summary>
|
||||
public uint VolumeDown { get; set; }
|
||||
/// <summary>
|
||||
/// Toggles the mute state. Feedback is high when volume is muted
|
||||
/// </summary>
|
||||
public uint VolumeMute { get; set; }
|
||||
/// <summary>
|
||||
/// Range of digital joins to select inputs and report current input as feedback
|
||||
/// </summary>
|
||||
public uint InputSelectOffset { get; set; }
|
||||
/// <summary>
|
||||
/// Range of digital joins to report visibility for input buttons
|
||||
/// </summary>
|
||||
public uint ButtonVisibilityOffset { get; set; }
|
||||
/// <summary>
|
||||
/// High if the device is online
|
||||
/// </summary>
|
||||
public uint IsOnline { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Analogs
|
||||
/// <summary>
|
||||
/// Analog join to set the input and report current input as feedback
|
||||
/// </summary>
|
||||
public uint InputSelect { get; set; }
|
||||
/// <summary>
|
||||
/// Sets the volume level and reports the current level as feedback
|
||||
/// </summary>
|
||||
public uint VolumeLevel { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Serials
|
||||
/// <summary>
|
||||
/// Reports the name of the display as defined in config as feedback
|
||||
/// </summary>
|
||||
public uint Name { get; set; }
|
||||
/// <summary>
|
||||
/// Range of serial joins that reports the names of the inputs as feedback
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
/// <summary>
|
||||
/// Analog input sets System ID, output reports current ID as feedback.
|
||||
/// Digital input applies System ID, output is high when applying busy.
|
||||
/// </summary>
|
||||
public uint SystemId { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Digitals
|
||||
/// <summary>
|
||||
/// High when device is online
|
||||
/// </summary>
|
||||
public uint IsOnline { get; set; }
|
||||
/// <summary>
|
||||
/// Range reports video sync feedback for each input
|
||||
/// </summary>
|
||||
public uint VideoSyncStatus { get; set; }
|
||||
/// <summary>
|
||||
/// Range reports high if corresponding input's endpoint is online
|
||||
/// </summary>
|
||||
public uint InputEndpointOnline { get; set; }
|
||||
/// <summary>
|
||||
/// Range reports high if corresponding output's endpoint is online
|
||||
/// </summary>
|
||||
public uint OutputEndpointOnline { get; set; }
|
||||
/// <summary>
|
||||
/// Range reports high if corresponding input's transmitter supports bridging as a separate device for detailed AV switching, HDCP control, etc.
|
||||
/// </summary>
|
||||
public uint TxAdvancedIsPresent { get; set; } // indicates that there is an attached transmitter that should be bridged to be interacted with
|
||||
#endregion
|
||||
|
||||
#region Analogs
|
||||
/// <summary>
|
||||
/// Range sets and reports the current video source for the corresponding output
|
||||
/// </summary>
|
||||
public uint OutputVideo { get; set; }
|
||||
/// <summary>
|
||||
/// Range sets and reports the current audio source for the corresponding output
|
||||
/// </summary>
|
||||
public uint OutputAudio { get; set; }
|
||||
/// <summary>
|
||||
/// Range sets and reports the current Usb source for the corresponding output
|
||||
/// </summary>
|
||||
public uint OutputUsb { get; set; }
|
||||
/// <summary>
|
||||
/// Range sets and reports the current Usb source for the corresponding input
|
||||
/// </summary>
|
||||
public uint InputUsb { get; set; }
|
||||
/// <summary>
|
||||
/// Range sets and reports the current HDCP state for the corresponding input card
|
||||
/// </summary>
|
||||
public uint HdcpSupportState { get; set; }
|
||||
/// <summary>
|
||||
/// Range reports the highest supported HDCP state level for the corresponding input card
|
||||
/// </summary>
|
||||
public uint HdcpSupportCapability { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Serials
|
||||
/// <summary>
|
||||
/// Range sets and reports the name for the corresponding input card
|
||||
/// </summary>
|
||||
public uint InputNames { get; set; }
|
||||
/// <summary>
|
||||
/// Range sets and reports the name for the corresponding output card
|
||||
/// </summary>
|
||||
public uint OutputNames { get; set; }
|
||||
/// <summary>
|
||||
/// Range reports the name of the current video source for the corresponding output card
|
||||
/// </summary>
|
||||
public uint OutputCurrentVideoInputNames { get; set; }
|
||||
/// <summary>
|
||||
/// Range reports the name of the current audio source for the corresponding output card
|
||||
/// </summary>
|
||||
public uint OutputCurrentAudioInputNames { get; set; }
|
||||
/// <summary>
|
||||
/// Range reports the current input resolution for each corresponding input card
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
/// <summary>
|
||||
/// High when device is online (if not attached to a DMP3 or DM chassis with a CPU3 card
|
||||
/// </summary>
|
||||
public uint IsOnline { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Serials
|
||||
/// <summary>
|
||||
/// Reports the current output resolution
|
||||
/// </summary>
|
||||
public uint CurrentOutputResolution { get; set; }
|
||||
/// <summary>
|
||||
/// Reports the EDID manufacturer value
|
||||
/// </summary>
|
||||
public uint EdidManufacturer { get; set; }
|
||||
/// <summary>
|
||||
/// Reports the EDID Name value
|
||||
/// </summary>
|
||||
public uint EdidName { get; set; }
|
||||
/// <summary>
|
||||
/// Reports the EDID preffered timing value
|
||||
/// </summary>
|
||||
public uint EdidPrefferedTiming { get; set; }
|
||||
/// <summary>
|
||||
/// Reports the EDID serial number value
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
/// <summary>
|
||||
/// High when device is online (if not attached to a DMP3 or DM chassis with a CPU3 card
|
||||
/// </summary>
|
||||
public uint IsOnline { get; set; }
|
||||
/// <summary>
|
||||
/// High when video sync is detected
|
||||
/// </summary>
|
||||
public uint VideoSyncStatus { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Analogs
|
||||
/// <summary>
|
||||
/// Sets and reports the video source
|
||||
/// </summary>
|
||||
public uint VideoInput { get; set; }
|
||||
/// <summary>
|
||||
/// Sets and reports the audio source
|
||||
/// </summary>
|
||||
public uint AudioInput { get; set; }
|
||||
/// <summary>
|
||||
/// Reports the highest supported HDCP state level for the corresponding input card
|
||||
/// </summary>
|
||||
public uint HdcpSupportCapability { get; set; }
|
||||
/// <summary>
|
||||
/// Sets and reports the current HDCP state for the corresponding input port
|
||||
/// </summary>
|
||||
public uint Port1HdcpState { get; set; }
|
||||
/// <summary>
|
||||
/// Sets and reports the current HDCP state for the corresponding input port
|
||||
/// </summary>
|
||||
public uint Port2HdcpState { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Serials
|
||||
/// <summary>
|
||||
/// Reports the current input resolution
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
/// <summary>
|
||||
/// 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
|
||||
/// </summary>
|
||||
public uint MasterVolume { get; set; }
|
||||
/// <summary>
|
||||
/// 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
|
||||
/// </summary>
|
||||
public uint SourceVolume { get; set; }
|
||||
/// <summary>
|
||||
/// 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
|
||||
/// </summary>
|
||||
public uint Codec1Volume { get; set; }
|
||||
/// <summary>
|
||||
/// 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
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
/// <summary>
|
||||
/// Range reports video sync feedback for each input
|
||||
/// </summary>
|
||||
public uint VideoSyncStatus { get; set; }
|
||||
/// <summary>
|
||||
/// Range reports high if corresponding input's endpoint is online
|
||||
/// </summary>
|
||||
public uint InputEndpointOnline { get; set; }
|
||||
/// <summary>
|
||||
/// Range reports high if corresponding output's endpoint is online
|
||||
/// </summary>
|
||||
public uint OutputEndpointOnline { get; set; }
|
||||
#endregion
|
||||
|
||||
|
||||
#region Analogs
|
||||
/// <summary>
|
||||
/// Range sets and reports the current video source for the corresponding output
|
||||
/// </summary>
|
||||
public uint OutputVideo { get; set; }
|
||||
/// <summary>
|
||||
/// Range sets and reports the current audio source for the corresponding output
|
||||
/// </summary>
|
||||
public uint OutputAudio { get; set; }
|
||||
/// <summary>
|
||||
/// Range sets and reports the current Usb source for the corresponding output
|
||||
/// </summary>
|
||||
//public uint OutputUsb { get; set; }
|
||||
///// <summary>
|
||||
///// Range sets and reports the current Usb source for the corresponding input
|
||||
///// </summary>
|
||||
//public uint InputUsb { get; set; }
|
||||
///// <summary>
|
||||
///// Range sets and reports the current HDCP state for the corresponding input card
|
||||
///// </summary>
|
||||
//public uint HdcpSupportState { get; set; }
|
||||
///// <summary>
|
||||
///// Range reports the highest supported HDCP state level for the corresponding input card
|
||||
///// </summary>
|
||||
//public uint HdcpSupportCapability { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Serials
|
||||
/// <summary>
|
||||
/// Range sets and reports the name for the corresponding input card
|
||||
/// </summary>
|
||||
public uint InputNames { get; set; }
|
||||
/// <summary>
|
||||
/// Range sets and reports the name for the corresponding output card
|
||||
/// </summary>
|
||||
public uint OutputNames { get; set; }
|
||||
/// <summary>
|
||||
/// Range reports the name of the current video source for the corresponding output card
|
||||
/// </summary>
|
||||
public uint OutputCurrentVideoInputNames { get; set; }
|
||||
/// <summary>
|
||||
/// Range reports the name of the current audio source for the corresponding output card
|
||||
/// </summary>
|
||||
public uint OutputCurrentAudioInputNames { get; set; }
|
||||
/// <summary>
|
||||
/// Range reports the current input resolution for each corresponding input card
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
/// <summary>
|
||||
/// Sets and reports the state of the relay (High = closed, Low = Open)
|
||||
/// </summary>
|
||||
public uint Relay { get; set; }
|
||||
#endregion
|
||||
|
||||
public GenericRelayControllerJoinMap()
|
||||
{
|
||||
Relay = 1;
|
||||
}
|
||||
|
||||
public override void OffsetJoinNumbers(uint joinStart)
|
||||
{
|
||||
var joinOffset = joinStart - 1;
|
||||
|
||||
Relay = Relay + joinOffset;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
/// <summary>
|
||||
/// High when the pair is online
|
||||
/// </summary>
|
||||
public uint IsOnline { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// High when the remote end device is online
|
||||
/// </summary>
|
||||
public uint RemoteEndDetected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sets Auto Route On and provides feedback
|
||||
/// </summary>
|
||||
public uint AutoRouteOn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sets Auto Route Off and provides feedback
|
||||
/// </summary>
|
||||
public uint AutoRouteOff { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sets Priority Routing On and provides feedback
|
||||
/// </summary>
|
||||
public uint PriorityRoutingOn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sets Priority Routing Off and provides feedback
|
||||
/// </summary>
|
||||
public uint PriorityRoutingOff { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Enables OSD and provides feedback
|
||||
/// </summary>
|
||||
public uint InputOnScreenDisplayEnabled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Disables OSD and provides feedback
|
||||
/// </summary>
|
||||
public uint InputOnScreenDisplayDisabled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides Video Sync Detected feedback for each input
|
||||
/// </summary>
|
||||
public uint SyncDetected { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Analogs
|
||||
/// <summary>
|
||||
/// Sets the video source for the receiver's HDMI out and provides feedback
|
||||
/// </summary>
|
||||
public uint VideoSource { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates the number of sources supported by the Tx/Rx pair
|
||||
/// </summary>
|
||||
public uint SourceCount { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Serials
|
||||
/// <summary>
|
||||
/// Indicates the name of each input port
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
/// <summary>
|
||||
/// Set High to connect, Low to disconnect
|
||||
/// </summary>
|
||||
public uint Connect { get; set; }
|
||||
/// <summary>
|
||||
/// Reports Connected State (High = Connected)
|
||||
/// </summary>
|
||||
public uint Connected { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Analogs
|
||||
/// <summary>
|
||||
/// Reports the connections status value
|
||||
/// </summary>
|
||||
public uint Status { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Serials
|
||||
/// <summary>
|
||||
/// Data back from port
|
||||
/// </summary>
|
||||
public uint TextReceived { get; set; }
|
||||
/// <summary>
|
||||
/// Sends data to the port
|
||||
/// </summary>
|
||||
public uint SendText { get; set; }
|
||||
/// <summary>
|
||||
/// Takes a JSON serialized string that sets a COM port's parameters
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
/// <summary>
|
||||
/// Reports the state of the digital input
|
||||
/// </summary>
|
||||
public uint InputState { get; set; }
|
||||
#endregion
|
||||
|
||||
public IDigitalInputJoinMap()
|
||||
{
|
||||
InputState = 1;
|
||||
}
|
||||
|
||||
public override void OffsetJoinNumbers(uint joinStart)
|
||||
{
|
||||
var joinOffset = joinStart - 1;
|
||||
|
||||
InputState = InputState + joinOffset;
|
||||
}
|
||||
}
|
||||
}
|
||||
135
PepperDashEssentials/Bridges/JoinMaps/SystemMonitorJoinMap.cs
Normal file
135
PepperDashEssentials/Bridges/JoinMaps/SystemMonitorJoinMap.cs
Normal file
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// Offset to indicate where the range of iterated program joins will start
|
||||
/// </summary>
|
||||
public uint ProgramStartJoin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Offset between each program join set
|
||||
/// </summary>
|
||||
public uint ProgramOffsetJoin { get; set; }
|
||||
|
||||
#region Digitals
|
||||
/// <summary>
|
||||
/// Range Sets and reports whether the corresponding program slot is started
|
||||
/// </summary>
|
||||
public uint ProgramStart { get; set; }
|
||||
/// <summary>
|
||||
/// Range Sets and reports whether the corresponding program slot is stopped
|
||||
/// </summary>
|
||||
public uint ProgramStop { get; set; }
|
||||
/// <summary>
|
||||
/// Range Sets and reports whether the corresponding program is registered
|
||||
/// </summary>
|
||||
public uint ProgramRegister { get; set; }
|
||||
/// <summary>
|
||||
/// Range Sets and reports whether the corresponding program is unregistered
|
||||
/// </summary>
|
||||
public uint ProgramUnregister { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Analogs
|
||||
/// <summary>
|
||||
/// Sets and reports the time zone
|
||||
/// </summary>
|
||||
public uint TimeZone { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Serials
|
||||
/// <summary>
|
||||
/// Reports the time zone name
|
||||
/// </summary>
|
||||
public uint TimeZoneName { get; set; }
|
||||
/// <summary>
|
||||
/// Reports the IO Controller Version
|
||||
/// </summary>
|
||||
public uint IOControllerVersion { get; set; }
|
||||
/// <summary>
|
||||
/// Reports the SNMP App Version
|
||||
/// </summary>
|
||||
public uint SnmpAppVersion { get; set; }
|
||||
/// <summary>
|
||||
/// Reports the BACnet App Version
|
||||
/// </summary>
|
||||
public uint BACnetAppVersion { get; set; }
|
||||
/// <summary>
|
||||
/// Reports the firmware version
|
||||
/// </summary>
|
||||
public uint ControllerVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reports the name of the corresponding program
|
||||
/// </summary>
|
||||
public uint ProgramName { get; set; }
|
||||
/// <summary>
|
||||
/// Reports the compile time of the corresponding program
|
||||
/// </summary>
|
||||
public uint ProgramCompiledTime { get; set; }
|
||||
/// <summary>
|
||||
/// Reports the Crestron Database version of the corresponding program
|
||||
/// </summary>
|
||||
public uint ProgramCrestronDatabaseVersion { get; set; }
|
||||
/// <summary>
|
||||
/// Reports the Environment Version of the corresponding program
|
||||
/// </summary>
|
||||
public uint ProgramEnvironmentVersion { get; set; }
|
||||
/// <summary>
|
||||
/// Serialized JSON output that aggregates the program info of the corresponding program
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -63,88 +63,6 @@ namespace PepperDash.Essentials.Bridges
|
||||
|
||||
programSlotJoinStart = programSlotJoinStart + joinMap.ProgramOffsetJoin;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class SystemMonitorJoinMap : JoinMapBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Offset to indicate where the range of iterated program joins will start
|
||||
/// </summary>
|
||||
public uint ProgramStartJoin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Offset between each program join set
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -365,7 +365,10 @@ namespace PepperDash.Essentials
|
||||
Debug.Console(2, "Adding DmpsRoutingController for {0} to Device Manager.", this.ControllerPrompt);
|
||||
|
||||
var dmpsRoutingController = DmpsRoutingController.GetDmpsRoutingController("processor-avRouting", this.ControllerPrompt, new DM.Config.DmpsRoutingPropertiesConfig());
|
||||
|
||||
DeviceManager.AddDevice(dmpsRoutingController);
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -121,6 +121,7 @@
|
||||
<Compile Include="Bridges\BridgeFactory.cs" />
|
||||
<Compile Include="Bridges\CameraControllerBridge.cs" />
|
||||
<Compile Include="Bridges\AirMediaControllerBridge.cs" />
|
||||
<Compile Include="Bridges\DmpsAudioOutputControllerBridge.cs" />
|
||||
<Compile Include="Bridges\DmpsRoutingControllerBridge.cs" />
|
||||
<Compile Include="Bridges\DisplayControllerBridge.cs" />
|
||||
<Compile Include="Bridges\DigitalLoggerBridge.cs" />
|
||||
@@ -128,11 +129,25 @@
|
||||
<Compile Include="Bridges\DmTxControllerBridge.cs" />
|
||||
<Compile Include="Bridges\GenericLightingBridge.cs" />
|
||||
<Compile Include="Bridges\GenericRelayDeviceBridge.cs" />
|
||||
<Compile Include="Bridges\HdMdxxxCEControllerBridge.cs" />
|
||||
<Compile Include="Bridges\IBasicCommunicationBridge.cs" />
|
||||
<Compile Include="Bridges\DmRmcControllerBridge.cs" />
|
||||
<Compile Include="Bridges\IBridge.cs" />
|
||||
<Compile Include="Bridges\IDigitalInputBridge.cs" />
|
||||
<Compile Include="Bridges\JoinMapBase.cs" />
|
||||
<Compile Include="Bridges\JoinMaps\AirMediaControllerJoinMap.cs" />
|
||||
<Compile Include="Bridges\JoinMaps\AppleTvJoinMap.cs" />
|
||||
<Compile Include="Bridges\JoinMaps\DisplayControllerJoinMap.cs" />
|
||||
<Compile Include="Bridges\JoinMaps\DmChassisControllerJoinMap.cs" />
|
||||
<Compile Include="Bridges\JoinMaps\DmpsAudioOutputControllerJoinMap.cs" />
|
||||
<Compile Include="Bridges\JoinMaps\DmpsRoutingControllerJoinMap.cs" />
|
||||
<Compile Include="Bridges\JoinMaps\DmRmcControllerJoinMap.cs" />
|
||||
<Compile Include="Bridges\JoinMaps\DmTxControllerJoinMap.cs" />
|
||||
<Compile Include="Bridges\JoinMaps\GenericRelayControllerJoinMap.cs" />
|
||||
<Compile Include="Bridges\JoinMaps\HdMdxxxCEControllerJoinMap.cs" />
|
||||
<Compile Include="Bridges\JoinMaps\IBasicCommunicationJoinMap.cs" />
|
||||
<Compile Include="Bridges\JoinMaps\IDigitalInputJoinMap.cs" />
|
||||
<Compile Include="Bridges\JoinMaps\SystemMonitorJoinMap.cs" />
|
||||
<Compile Include="Bridges\SystemMonitorBridge.cs" />
|
||||
<Compile Include="Configuration ORIGINAL\Builders\TPConfig.cs" />
|
||||
<Compile Include="Configuration ORIGINAL\Configuration.cs" />
|
||||
|
||||
@@ -38,4 +38,6 @@ devjson:2 {"deviceKey":"codec-comms-ssh", "methodName":"Connect", "params": []}
|
||||
|
||||
devjson:1 {"deviceKey":"commBridge", "methodName":"ExecuteJoinAction", "params":[ 301, "digital", true ]}
|
||||
|
||||
devjson:2 {"deviceKey":"display01Comm-com", "methodName":"SendText", "params": [ "I'M GETTING TIRED OF THIS" ]}
|
||||
devjson:2 {"deviceKey":"display01Comm-com", "methodName":"SendText", "params": [ "I'M GETTING TIRED OF THIS" ]}
|
||||
|
||||
devjson:10 {"deviceKey":"dmLink-ssh", "methodName":"Connect", "params": []}
|
||||
@@ -287,7 +287,9 @@ namespace PepperDash.Essentials.DM
|
||||
{
|
||||
Debug.Console(2, this, "Adding input card '{0}', slot {1}", type, number);
|
||||
|
||||
if (type == "dmcHd")
|
||||
type = type.ToLower();
|
||||
|
||||
if (type == "dmchd")
|
||||
{
|
||||
var inputCard = new DmcHd(number, this.Chassis);
|
||||
var cecPort = inputCard.HdmiInput as ICec;
|
||||
@@ -299,7 +301,7 @@ namespace PepperDash.Essentials.DM
|
||||
var cecPort = inputCard.HdmiInput as ICec;
|
||||
AddHdmiInCardPorts(number, cecPort);
|
||||
}
|
||||
else if (type == "dmc4kHd")
|
||||
else if (type == "dmc4khd")
|
||||
{
|
||||
var inputCard = new Dmc4kHd(number, this.Chassis);
|
||||
var cecPort = inputCard.HdmiInput as ICec;
|
||||
@@ -311,125 +313,125 @@ namespace PepperDash.Essentials.DM
|
||||
var cecPort = inputCard.HdmiInput as ICec;
|
||||
AddHdmiInCardPorts(number, cecPort);
|
||||
}
|
||||
else if (type == "dmc4kzHd")
|
||||
else if (type == "dmc4kzhd")
|
||||
{
|
||||
var inputCard = new Dmc4kzHd(number, this.Chassis);
|
||||
var cecPort = inputCard.HdmiInput as ICec;
|
||||
AddHdmiInCardPorts(number, cecPort);
|
||||
}
|
||||
else if (type == "dmc4kzHdDsp")
|
||||
else if (type == "dmc4kzhddsp")
|
||||
{
|
||||
var inputCard = new Dmc4kzHdDsp(number, this.Chassis);
|
||||
var cecPort = inputCard.HdmiInput as ICec;
|
||||
AddHdmiInCardPorts(number, cecPort);
|
||||
}
|
||||
else if (type == "dmcC")
|
||||
else if (type == "dmcc")
|
||||
{
|
||||
new DmcC(number, this.Chassis);
|
||||
AddDmInCardPorts(number);
|
||||
}
|
||||
else if (type == "dmcCDsp")
|
||||
else if (type == "dmccdsp")
|
||||
{
|
||||
new DmcCDsp(number, this.Chassis);
|
||||
AddDmInCardPorts(number);
|
||||
}
|
||||
else if (type == "dmc4kC")
|
||||
else if (type == "dmc4kc")
|
||||
{
|
||||
new Dmc4kC(number, this.Chassis);
|
||||
AddDmInCardPorts(number);
|
||||
}
|
||||
else if (type == "dmc4kCDsp")
|
||||
else if (type == "dmc4kcdsp")
|
||||
{
|
||||
new Dmc4kCDsp(number, this.Chassis);
|
||||
AddDmInCardPorts(number);
|
||||
}
|
||||
else if (type == "dmc4kzC")
|
||||
else if (type == "dmc4kzc")
|
||||
{
|
||||
new Dmc4kzC(number, this.Chassis);
|
||||
AddDmInCardPorts(number);
|
||||
}
|
||||
else if (type == "dmc4kzCDsp")
|
||||
else if (type == "dmc4kzcdsp")
|
||||
{
|
||||
new Dmc4kzCDsp(number, this.Chassis);
|
||||
AddDmInCardPorts(number);
|
||||
}
|
||||
else if (type == "dmcCat")
|
||||
else if (type == "dmccat")
|
||||
{
|
||||
new DmcCat(number, this.Chassis);
|
||||
AddDmInCardPorts(number);
|
||||
}
|
||||
else if (type == "dmcCatDsp")
|
||||
else if (type == "dmccatdsp")
|
||||
{
|
||||
new DmcCatDsp(number, this.Chassis);
|
||||
AddDmInCardPorts(number);
|
||||
}
|
||||
else if (type == "dmcS")
|
||||
else if (type == "dmcs")
|
||||
{
|
||||
new DmcS(number, Chassis);
|
||||
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber);
|
||||
AddInCardHdmiAndAudioLoopPorts(number);
|
||||
}
|
||||
else if (type == "dmcSDsp")
|
||||
else if (type == "dmcsdsp")
|
||||
{
|
||||
new DmcSDsp(number, Chassis);
|
||||
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber);
|
||||
AddInCardHdmiAndAudioLoopPorts(number);
|
||||
}
|
||||
else if (type == "dmcS2")
|
||||
else if (type == "dmcs2")
|
||||
{
|
||||
new DmcS2(number, Chassis);
|
||||
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber);
|
||||
AddInCardHdmiAndAudioLoopPorts(number);
|
||||
}
|
||||
else if (type == "dmcS2Dsp")
|
||||
else if (type == "dmcs2dsp")
|
||||
{
|
||||
new DmcS2Dsp(number, Chassis);
|
||||
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber);
|
||||
AddInCardHdmiAndAudioLoopPorts(number);
|
||||
}
|
||||
else if (type == "dmcSdi")
|
||||
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")
|
||||
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")
|
||||
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")
|
||||
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")
|
||||
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")
|
||||
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")
|
||||
else if (type == "dmcvid4")
|
||||
{
|
||||
new DmcVid4(number, Chassis);
|
||||
AddInputPortWithDebug(number, "compositeIn1", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
|
||||
@@ -438,7 +440,7 @@ namespace PepperDash.Essentials.DM
|
||||
AddInputPortWithDebug(number, "compositeIn4", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
|
||||
AddInCardHdmiLoopPort(number);
|
||||
}
|
||||
else if (type == "dmcStr")
|
||||
else if (type == "dmcstr")
|
||||
{
|
||||
new DmcStr(number, Chassis);
|
||||
AddInputPortWithDebug(number, "streamIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming);
|
||||
@@ -476,46 +478,48 @@ namespace PepperDash.Essentials.DM
|
||||
/// <param name="number"></param>
|
||||
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")
|
||||
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")
|
||||
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")
|
||||
else if (type == "dmc4kcohd")
|
||||
{
|
||||
var outputCard = new Dmc4kCoHdSingle(number, Chassis);
|
||||
var cecPort1 = outputCard.Card1.HdmiOutput;
|
||||
AddDmcCoPorts(number, cecPort1);
|
||||
}
|
||||
else if (type == "dmc4kzCoHd")
|
||||
else if (type == "dmc4kzcohd")
|
||||
{
|
||||
var outputCard = new Dmc4kzCoHdSingle(number, Chassis);
|
||||
var cecPort1 = outputCard.Card1.HdmiOutput;
|
||||
AddDmcCoPorts(number, cecPort1);
|
||||
}
|
||||
else if (type == "dmcCoHd")
|
||||
else if (type == "dmccohd")
|
||||
{
|
||||
var outputCard = new DmcCoHdSingle(number, Chassis);
|
||||
var cecPort1 = outputCard.Card1.HdmiOutput;
|
||||
AddDmcCoPorts(number, cecPort1);
|
||||
}
|
||||
else if (type == "dmCatoHd")
|
||||
else if (type == "dmccatohd")
|
||||
{
|
||||
var outputCard = new DmcCatoHdSingle(number, Chassis);
|
||||
var cecPort1 = outputCard.Card1.HdmiOutput;
|
||||
AddDmcCoPorts(number, cecPort1);
|
||||
}
|
||||
else if (type == "dmcSoHd")
|
||||
else if (type == "dmcsohd")
|
||||
{
|
||||
var outputCard = new DmcSoHdSingle(number, Chassis);
|
||||
var cecPort1 = outputCard.Card1.HdmiOutput;
|
||||
@@ -524,7 +528,7 @@ namespace PepperDash.Essentials.DM
|
||||
AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber, 2 * (number - 1) + 2);
|
||||
|
||||
}
|
||||
else if (type == "dmcS2oHd")
|
||||
else if (type == "dmcs2ohd")
|
||||
{
|
||||
var outputCard = new DmcS2oHdSingle(number, Chassis);
|
||||
var cecPort1 = outputCard.Card1.HdmiOutput;
|
||||
|
||||
@@ -0,0 +1,285 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
|
||||
using Crestron.SimplSharpPro.DM;
|
||||
using Crestron.SimplSharpPro.DM.Cards;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
|
||||
using PepperDash.Essentials.DM.Config;
|
||||
|
||||
namespace PepperDash.Essentials.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// Exposes the volume levels for Program, Aux1 or Aux2 outputs on a DMPS3 chassis
|
||||
/// </summary>
|
||||
public class DmpsAudioOutputController : Device
|
||||
{
|
||||
Card.Dmps3OutputBase OutputCard;
|
||||
|
||||
public DmpsAudioOutput MasterVolumeLevel { get; private set; }
|
||||
public DmpsAudioOutput SourceVolumeLevel { get; private set; }
|
||||
public DmpsAudioOutput Codec1VolumeLevel { get; private set; }
|
||||
public DmpsAudioOutput Codec2VolumeLevel { get; private set; }
|
||||
|
||||
|
||||
public DmpsAudioOutputController(string key, string name, Card.Dmps3OutputBase card)
|
||||
: base(key, name)
|
||||
{
|
||||
OutputCard = card;
|
||||
|
||||
OutputCard.BaseDevice.DMOutputChange += new DMOutputEventHandler(BaseDevice_DMOutputChange);
|
||||
|
||||
MasterVolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Master);
|
||||
SourceVolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Source);
|
||||
|
||||
if (card is Card.Dmps3ProgramOutput)
|
||||
{
|
||||
//(card as Card.Dmps3ProgramOutput).OutputMixer.MicLevel
|
||||
//TODO: Hook up mic levels and mutes
|
||||
Codec1VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec1);
|
||||
Codec2VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec2);
|
||||
}
|
||||
else if (card is Card.Dmps3Aux1Output)
|
||||
{
|
||||
Codec2VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec2);
|
||||
}
|
||||
else if (card is Card.Dmps3Aux2Output)
|
||||
{
|
||||
Codec1VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec1);
|
||||
}
|
||||
}
|
||||
|
||||
void BaseDevice_DMOutputChange(Switch device, DMOutputEventArgs args)
|
||||
{
|
||||
switch (args.EventId)
|
||||
{
|
||||
case DMOutputEventIds.MasterVolumeFeedBackEventId:
|
||||
{
|
||||
MasterVolumeLevel.VolumeLevelFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
case DMOutputEventIds.MasterMuteOnFeedBackEventId:
|
||||
{
|
||||
MasterVolumeLevel.MuteFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
case DMOutputEventIds.SourceLevelFeedBackEventId:
|
||||
{
|
||||
SourceVolumeLevel.VolumeLevelFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
case DMOutputEventIds.Codec1LevelFeedBackEventId:
|
||||
{
|
||||
if(Codec1VolumeLevel != null)
|
||||
Codec1VolumeLevel.VolumeLevelFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
case DMOutputEventIds.Codec1MuteOnFeedBackEventId:
|
||||
{
|
||||
if (Codec1VolumeLevel != null)
|
||||
Codec1VolumeLevel.MuteFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
case DMOutputEventIds.Codec2LevelFeedBackEventId:
|
||||
{
|
||||
if (Codec2VolumeLevel != null)
|
||||
Codec2VolumeLevel.VolumeLevelFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
case DMOutputEventIds.Codec2MuteOnFeedBackEventId:
|
||||
{
|
||||
if (Codec2VolumeLevel != null)
|
||||
Codec2VolumeLevel.MuteFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class DmpsAudioOutput : IBasicVolumeWithFeedback
|
||||
{
|
||||
Card.Dmps3OutputBase Output;
|
||||
|
||||
UShortInputSig Level;
|
||||
|
||||
eDmpsLevelType Type;
|
||||
|
||||
public BoolFeedback MuteFeedback { get; private set; }
|
||||
public IntFeedback VolumeLevelFeedback { get; private set; }
|
||||
|
||||
Action MuteOnAction;
|
||||
Action MuteOffAction;
|
||||
Action<bool> VolumeUpAction;
|
||||
Action<bool> VolumeDownAction;
|
||||
|
||||
public DmpsAudioOutput(Card.Dmps3OutputBase output, eDmpsLevelType type)
|
||||
{
|
||||
Output = output;
|
||||
|
||||
Type = type;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case eDmpsLevelType.Master:
|
||||
{
|
||||
Level = output.MasterVolume;
|
||||
|
||||
MuteFeedback = new BoolFeedback( new Func<bool> (() => Output.MasterMuteOnFeedBack.BoolValue));
|
||||
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => Output.MasterVolumeFeedBack.UShortValue));
|
||||
MuteOnAction = new Action(Output.MasterMuteOn);
|
||||
MuteOffAction = new Action(Output.MasterMuteOff);
|
||||
VolumeUpAction = new Action<bool>((b) => Output.MasterVolumeUp.BoolValue = b);
|
||||
VolumeDownAction = new Action<bool>((b) => Output.MasterVolumeDown.BoolValue = b);
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
case eDmpsLevelType.MicsMaster:
|
||||
{
|
||||
Level = output.MicMasterLevel;
|
||||
|
||||
MuteFeedback = new BoolFeedback(new Func<bool>(() => Output.MicMasterMuteOnFeedBack.BoolValue));
|
||||
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => Output.MicMasterLevelFeedBack.UShortValue));
|
||||
MuteOnAction = new Action(Output.MicMasterMuteOn);
|
||||
MuteOffAction = new Action(Output.MicMasterMuteOff);
|
||||
VolumeUpAction = new Action<bool>((b) => Output.MicMasterLevelUp.BoolValue = b);
|
||||
VolumeDownAction = new Action<bool>((b) => Output.MicMasterLevelDown.BoolValue = b);
|
||||
|
||||
break;
|
||||
}
|
||||
case eDmpsLevelType.Source:
|
||||
{
|
||||
Level = output.SourceLevel;
|
||||
|
||||
MuteFeedback = new BoolFeedback(new Func<bool>(() => Output.SourceMuteOnFeedBack.BoolValue));
|
||||
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => Output.SourceLevelFeedBack.UShortValue));
|
||||
MuteOnAction = new Action(Output.SourceMuteOn);
|
||||
MuteOffAction = new Action(Output.SourceMuteOff);
|
||||
VolumeUpAction = new Action<bool>((b) => Output.SourceLevelUp.BoolValue = b);
|
||||
VolumeDownAction = new Action<bool>((b) => Output.SourceLevelDown.BoolValue = b);
|
||||
break;
|
||||
}
|
||||
case eDmpsLevelType.Codec1:
|
||||
{
|
||||
var programOutput = output as Card.Dmps3ProgramOutput;
|
||||
|
||||
if (programOutput != null)
|
||||
{
|
||||
Level = programOutput.Codec1Level;
|
||||
|
||||
MuteFeedback = new BoolFeedback(new Func<bool>(() => programOutput.CodecMute1OnFeedback.BoolValue));
|
||||
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => programOutput.Codec1LevelFeedback.UShortValue));
|
||||
MuteOnAction = new Action(programOutput.Codec1MuteOn);
|
||||
MuteOffAction = new Action(programOutput.Codec1MuteOff);
|
||||
VolumeUpAction = new Action<bool>((b) => programOutput.Codec1LevelUp.BoolValue = b);
|
||||
VolumeDownAction = new Action<bool>((b) => programOutput.Codec1LevelDown.BoolValue = b);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var auxOutput = output as Card.Dmps3Aux2Output;
|
||||
|
||||
Level = auxOutput.Codec1Level;
|
||||
|
||||
MuteFeedback = new BoolFeedback(new Func<bool>(() => auxOutput.CodecMute1OnFeedback.BoolValue));
|
||||
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => auxOutput.Codec1LevelFeedback.UShortValue));
|
||||
MuteOnAction = new Action(auxOutput.Codec1MuteOn);
|
||||
MuteOffAction = new Action(auxOutput.Codec1MuteOff);
|
||||
VolumeUpAction = new Action<bool>((b) => auxOutput.Codec1LevelUp.BoolValue = b);
|
||||
VolumeDownAction = new Action<bool>((b) => auxOutput.Codec1LevelDown.BoolValue = b);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case eDmpsLevelType.Codec2:
|
||||
{
|
||||
var programOutput = output as Card.Dmps3ProgramOutput;
|
||||
|
||||
if (programOutput != null)
|
||||
{
|
||||
Level = programOutput.Codec2Level;
|
||||
|
||||
MuteFeedback = new BoolFeedback(new Func<bool>(() => programOutput.CodecMute1OnFeedback.BoolValue));
|
||||
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => programOutput.Codec2LevelFeedback.UShortValue));
|
||||
MuteOnAction = new Action(programOutput.Codec2MuteOn);
|
||||
MuteOffAction = new Action(programOutput.Codec2MuteOff);
|
||||
VolumeUpAction = new Action<bool>((b) => programOutput.Codec2LevelUp.BoolValue = b);
|
||||
VolumeDownAction = new Action<bool>((b) => programOutput.Codec2LevelDown.BoolValue = b);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var auxOutput = output as Card.Dmps3Aux1Output;
|
||||
|
||||
Level = auxOutput.Codec2Level;
|
||||
|
||||
MuteFeedback = new BoolFeedback(new Func<bool>(() => auxOutput.CodecMute2OnFeedback.BoolValue));
|
||||
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => auxOutput.Codec2LevelFeedback.UShortValue));
|
||||
MuteOnAction = new Action(auxOutput.Codec2MuteOn);
|
||||
MuteOffAction = new Action(auxOutput.Codec2MuteOff);
|
||||
VolumeUpAction = new Action<bool>((b) => auxOutput.Codec2LevelUp.BoolValue = b);
|
||||
VolumeDownAction = new Action<bool>((b) => auxOutput.Codec2LevelDown.BoolValue = b);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#region IBasicVolumeWithFeedback Members
|
||||
|
||||
public void SetVolume(ushort level)
|
||||
{
|
||||
Level.UShortValue = level;
|
||||
}
|
||||
|
||||
public void MuteOn()
|
||||
{
|
||||
MuteOnAction();
|
||||
}
|
||||
|
||||
public void MuteOff()
|
||||
{
|
||||
MuteOffAction();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IBasicVolumeControls Members
|
||||
|
||||
public void VolumeUp(bool pressRelease)
|
||||
{
|
||||
VolumeUpAction(pressRelease);
|
||||
}
|
||||
|
||||
public void VolumeDown(bool pressRelease)
|
||||
{
|
||||
VolumeDownAction(pressRelease);
|
||||
}
|
||||
|
||||
public void MuteToggle()
|
||||
{
|
||||
if (MuteFeedback.BoolValue)
|
||||
MuteOff();
|
||||
else
|
||||
MuteOn();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
public enum eDmpsLevelType
|
||||
{
|
||||
Master,
|
||||
Source,
|
||||
MicsMaster,
|
||||
Codec1,
|
||||
Codec2,
|
||||
Mic
|
||||
}
|
||||
}
|
||||
@@ -309,6 +309,8 @@ namespace PepperDash.Essentials.DM
|
||||
{
|
||||
var airMediaInputCard = inputCard as Card.Dmps3AirMediaInput;
|
||||
|
||||
|
||||
|
||||
AddInputPortWithDebug(number, string.Format("AirMediaIn{0}", number), eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming);
|
||||
}
|
||||
}
|
||||
@@ -370,14 +372,31 @@ namespace PepperDash.Essentials.DM
|
||||
else if (outputCard is Card.Dmps3ProgramOutput)
|
||||
{
|
||||
AddAudioOnlyOutputPort(number, "Program");
|
||||
|
||||
var programOutput = new DmpsAudioOutputController(string.Format("processor-programAudioOutput"), "Program Audio Output", outputCard as Card.Dmps3OutputBase);
|
||||
|
||||
DeviceManager.AddDevice(programOutput);
|
||||
|
||||
return;
|
||||
}
|
||||
else if (outputCard is Card.Dmps3AuxOutput)
|
||||
{
|
||||
if(outputCard.CardInputOutputType == eCardInputOutputType.Dmps3Aux1Output)
|
||||
if (outputCard.CardInputOutputType == eCardInputOutputType.Dmps3Aux1Output)
|
||||
{
|
||||
AddAudioOnlyOutputPort(number, "Aux1");
|
||||
else if(outputCard.CardInputOutputType == eCardInputOutputType.Dmps3Aux2Output)
|
||||
|
||||
var aux1Output = new DmpsAudioOutputController(string.Format("processor-aux1AudioOutput"), "Program Audio Output", outputCard as Card.Dmps3OutputBase);
|
||||
|
||||
DeviceManager.AddDevice(aux1Output);
|
||||
}
|
||||
else if (outputCard.CardInputOutputType == eCardInputOutputType.Dmps3Aux2Output)
|
||||
{
|
||||
AddAudioOnlyOutputPort(number, "Aux2");
|
||||
|
||||
var aux2Output = new DmpsAudioOutputController(string.Format("processor-aux2AudioOutput"), "Program Audio Output", outputCard as Card.Dmps3OutputBase);
|
||||
|
||||
DeviceManager.AddDevice(aux2Output);
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if (outputCard is Card.Dmps3CodecOutput)
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharp.CrestronIO;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DM;
|
||||
using Crestron.SimplSharpPro.DM.AirMedia;
|
||||
using Crestron.SimplSharpPro.UI;
|
||||
|
||||
@@ -68,7 +69,24 @@ namespace PepperDash.Essentials.DM
|
||||
return PepperDash.Essentials.DM.Chassis.HdMdNxM4kEController.GetController(key, name, type, props);
|
||||
}
|
||||
|
||||
|
||||
else if (typeName.Equals("hdmd400ce") || typeName.Equals("hdmd300ce") || typeName.Equals("hdmd200ce") || typeName.Equals("hdmd200c1ge"))
|
||||
{
|
||||
var props = JsonConvert.DeserializeObject
|
||||
<PepperDash.Essentials.DM.HdMdxxxCEPropertiesConfig>(properties.ToString());
|
||||
|
||||
if (typeName.Equals("hdmd400ce"))
|
||||
return new PepperDash.Essentials.DM.HdMdxxxCEController(key, name,
|
||||
new HdMd400CE(props.Control.IpIdInt, props.Control.TcpSshProperties.Address, Global.ControlSystem));
|
||||
else if (typeName.Equals("hdmd300ce"))
|
||||
return new PepperDash.Essentials.DM.HdMdxxxCEController(key, name,
|
||||
new HdMd300CE(props.Control.IpIdInt, props.Control.TcpSshProperties.Address, Global.ControlSystem));
|
||||
else if (typeName.Equals("hdmd200ce"))
|
||||
return new PepperDash.Essentials.DM.HdMdxxxCEController(key, name,
|
||||
new HdMd200CE(props.Control.IpIdInt, props.Control.TcpSshProperties.Address, Global.ControlSystem));
|
||||
else if (typeName.Equals("hdmd200c1ge"))
|
||||
return new PepperDash.Essentials.DM.HdMdxxxCEController(key, name,
|
||||
new HdMd200C1GE(props.Control.IpIdInt, props.Control.TcpSshProperties.Address, Global.ControlSystem));
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,226 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DM;
|
||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
|
||||
namespace PepperDash.Essentials.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// Represent both a transmitter and receiver pair of the HD-MD-400-C-E / HD-MD-300-C-E / HD-MD-200-C-E kits
|
||||
/// </summary>
|
||||
public class HdMdxxxCEController : CrestronGenericBaseDevice, IRouting//, IComPorts
|
||||
{
|
||||
/// <summary>
|
||||
///// DmLite Ports
|
||||
///// </summary>
|
||||
//public RoutingOutputPort ToRx { get; private set; }
|
||||
//public RoutingInputPort FromTx { get; private set; }
|
||||
|
||||
public RoutingOutputPort HdmiOut { get; private set; }
|
||||
|
||||
public HdMdxxxCE TxRxPair { get; private set; }
|
||||
|
||||
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The value of the current video source for the HDMI output on the receiver
|
||||
/// </summary>
|
||||
public IntFeedback VideoSourceFeedback { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if Auto Route is on on the transmitter
|
||||
/// </summary>
|
||||
public BoolFeedback AutoRouteOnFeedback { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if Priority Routing is on on the transmitter
|
||||
/// </summary>
|
||||
public BoolFeedback PriorityRoutingOnFeedback { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// INdicates if the On Screen Display is enabled
|
||||
/// </summary>
|
||||
public BoolFeedback InputOnScreenDisplayEnabledFeedback { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if video sync is detected on each of the inputs
|
||||
/// </summary>
|
||||
public Dictionary<uint, BoolFeedback> SyncDetectedFeedbacks { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if the remote end device is detected
|
||||
/// </summary>
|
||||
public BoolFeedback RemoteEndDetectedFeedback { get; private set; }
|
||||
|
||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
||||
{
|
||||
get { return new RoutingPortCollection<RoutingOutputPort> { HdmiOut }; }
|
||||
}
|
||||
|
||||
public HdMdxxxCEController(string key, string name, HdMdxxxCE txRxPair)
|
||||
:base(key, name, txRxPair)
|
||||
{
|
||||
|
||||
TxRxPair = txRxPair;
|
||||
|
||||
RemoteEndDetectedFeedback = new BoolFeedback(() => TxRxPair.RemoteEndDetectedOnFeedback.BoolValue);
|
||||
|
||||
AutoRouteOnFeedback = new BoolFeedback(() => TxRxPair.ReceiverAutoModeOnFeedback.BoolValue);
|
||||
|
||||
PriorityRoutingOnFeedback = new BoolFeedback(() => TxRxPair.PriorityRoutingOnFeedback.BoolValue);
|
||||
|
||||
InputOnScreenDisplayEnabledFeedback = new BoolFeedback(() => TxRxPair.OnScreenDisplayEnabledFeedback.BoolValue);
|
||||
|
||||
InputPorts = new RoutingPortCollection<RoutingInputPort>();
|
||||
|
||||
SyncDetectedFeedbacks = new Dictionary<uint, BoolFeedback>();
|
||||
|
||||
// Add the HDMI input port on the receiver
|
||||
InputPorts.Add(new RoutingInputPort(DmPortName.Hdmi, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
eRoutingPortConnectionType.Hdmi, 1, this));
|
||||
|
||||
SyncDetectedFeedbacks.Add(1, new BoolFeedback( () => TxRxPair.HdmiInputs[1].VideoDetectedFeedback.BoolValue));
|
||||
|
||||
if(txRxPair is HdMd400CE)
|
||||
{
|
||||
InputPorts.Add(new RoutingInputPort(DmPortName.HdmiIn1, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
eRoutingPortConnectionType.Hdmi, 2, this));
|
||||
SyncDetectedFeedbacks.Add(2, new BoolFeedback(() => TxRxPair.HdmiInputs[2].VideoDetectedFeedback.BoolValue));
|
||||
|
||||
InputPorts.Add(new RoutingInputPort(DmPortName.HdmiIn2, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
eRoutingPortConnectionType.Hdmi, 3, this));
|
||||
SyncDetectedFeedbacks.Add(3, new BoolFeedback(() => TxRxPair.HdmiInputs[3].VideoDetectedFeedback.BoolValue));
|
||||
|
||||
InputPorts.Add(new RoutingInputPort(DmPortName.VgaIn, eRoutingSignalType.Video | eRoutingSignalType.Audio,
|
||||
eRoutingPortConnectionType.Vga, 4, this));
|
||||
SyncDetectedFeedbacks.Add(4, new BoolFeedback(() => TxRxPair.VgaInputs[1].VideoDetectedFeedback.BoolValue));
|
||||
|
||||
// Set Ports for CEC
|
||||
InputPorts[DmPortName.HdmiIn1].Port = TxRxPair.HdmiInputs[1];
|
||||
InputPorts[DmPortName.HdmiIn2].Port = TxRxPair.HdmiInputs[2];
|
||||
}
|
||||
else if (txRxPair is HdMd300CE)
|
||||
{
|
||||
InputPorts.Add(new RoutingInputPort(DmPortName.HdmiIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
eRoutingPortConnectionType.Hdmi, 2, this));
|
||||
SyncDetectedFeedbacks.Add(2, new BoolFeedback(() => TxRxPair.HdmiInputs[2].VideoDetectedFeedback.BoolValue));
|
||||
|
||||
InputPorts.Add(new RoutingInputPort(DmPortName.VgaIn, eRoutingSignalType.Video | eRoutingSignalType.Audio,
|
||||
eRoutingPortConnectionType.Vga, 3, this));
|
||||
SyncDetectedFeedbacks.Add(3, new BoolFeedback(() => TxRxPair.VgaInputs[1].VideoDetectedFeedback.BoolValue));
|
||||
|
||||
// Set Ports for CEC
|
||||
InputPorts[DmPortName.HdmiIn].Port = TxRxPair.HdmiInputs[1];
|
||||
}
|
||||
else if (txRxPair is HdMd200CE || txRxPair is HdMd200C1GE)
|
||||
{
|
||||
InputPorts.Add(new RoutingInputPort(DmPortName.HdmiIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
eRoutingPortConnectionType.Hdmi, 2, this));
|
||||
SyncDetectedFeedbacks.Add(2, new BoolFeedback(() => TxRxPair.HdmiInputs[2].VideoDetectedFeedback.BoolValue));
|
||||
|
||||
// Set Ports for CEC
|
||||
InputPorts[DmPortName.HdmiIn].Port = TxRxPair.HdmiInputs[1];
|
||||
}
|
||||
|
||||
//ToRx = new RoutingOutputPort(DmPortName.ToTx, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
// eRoutingPortConnectionType.DmCat, null, this);
|
||||
|
||||
//FromTx = new RoutingInputPort(DmPortName.FromTx, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
// eRoutingPortConnectionType.DmCat, null, this);
|
||||
|
||||
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
eRoutingPortConnectionType.Hdmi, null, this);
|
||||
|
||||
OutputPorts[DmPortName.HdmiOut].Port = TxRxPair.HdmiOutputs[1];
|
||||
|
||||
TxRxPair.DMInputChange += new DMInputEventHandler(TxRxPair_DMInputChange);
|
||||
TxRxPair.DMOutputChange += new DMOutputEventHandler(TxRxPair_DMOutputChange);
|
||||
TxRxPair.DMSystemChange += new DMSystemEventHandler(TxRxPair_DMSystemChange);
|
||||
|
||||
VideoSourceFeedback = new IntFeedback(() => (int)TxRxPair.HdmiOutputs[1].VideoOutFeedback.Number);
|
||||
}
|
||||
|
||||
void TxRxPair_DMSystemChange(Switch device, DMSystemEventArgs args)
|
||||
{
|
||||
if (args.EventId == DMSystemEventIds.RemoteEndDetectedEventId)
|
||||
RemoteEndDetectedFeedback.FireUpdate();
|
||||
else if (args.EventId == DMSystemEventIds.ReceiverAutoModeOnEventId)
|
||||
AutoRouteOnFeedback.FireUpdate();
|
||||
else if (args.EventId == DMSystemEventIds.PriorityRoutingOnEventId)
|
||||
PriorityRoutingOnFeedback.FireUpdate();
|
||||
else if (args.EventId == DMSystemEventIds.OnScreenDisplayEnabledEventId)
|
||||
InputOnScreenDisplayEnabledFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
void TxRxPair_DMOutputChange(Switch device, DMOutputEventArgs args)
|
||||
{
|
||||
if (args.EventId == DMOutputEventIds.VideoOutEventId)
|
||||
VideoSourceFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
void TxRxPair_DMInputChange(Switch device, DMInputEventArgs args)
|
||||
{
|
||||
if (args.EventId == DMInputEventIds.VideoDetectedEventId)
|
||||
SyncDetectedFeedbacks[args.Number].FireUpdate();
|
||||
}
|
||||
|
||||
public void AutoRouteOn()
|
||||
{
|
||||
TxRxPair.TransmitterAutoModeOn();
|
||||
}
|
||||
|
||||
public void AutoRouteOff()
|
||||
{
|
||||
TxRxPair.TransmitterAutoModeOff();
|
||||
}
|
||||
|
||||
public void PriorityRouteOn()
|
||||
{
|
||||
TxRxPair.PriorityRoutingOn();
|
||||
}
|
||||
|
||||
public void PriorityRouteOff()
|
||||
{
|
||||
TxRxPair.PriorityRoutingOff();
|
||||
}
|
||||
|
||||
public void OnScreenDisplayEnable()
|
||||
{
|
||||
TxRxPair.OnScreenDisplayEnabled();
|
||||
}
|
||||
|
||||
public void OnScreenDisplayDisable()
|
||||
{
|
||||
TxRxPair.OnScreenDisplayDisabled();
|
||||
}
|
||||
|
||||
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
||||
{
|
||||
var number = Convert.ToUInt32(inputSelector); // Cast can sometimes fail
|
||||
|
||||
var input = number == 0 ? null : TxRxPair.Inputs[number];
|
||||
|
||||
TxRxPair.HdmiOutputs[1].VideoOut = input;
|
||||
}
|
||||
|
||||
// This device has a different class for com ports which will make it hard to implement IComPorts....
|
||||
|
||||
//#region IComPorts Members
|
||||
//public CrestronCollection<ComPort> ComPorts { get { return TxRxPair.ComPorts as CrestronCollection<ComPort>; } }
|
||||
//public int NumberOfComPorts { get { return 1; } }
|
||||
//#endregion
|
||||
}
|
||||
|
||||
public class HdMdxxxCEPropertiesConfig
|
||||
{
|
||||
public ControlPropertiesConfig Control { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,8 @@ namespace PepperDash.Essentials.DM
|
||||
public const string DmOut = "DmOut";
|
||||
public const string DmOut1 = "DmOut1";
|
||||
public const string DmOut2 = "DmOut2";
|
||||
public const string FromTx = "FromTx";
|
||||
public const string Hdmi = "Hdmi";
|
||||
public const string HdmiIn = "HdmiIn";
|
||||
public const string HdmiIn1 = "HdmiIn1";
|
||||
public const string HdmiIn2 = "HdmiIn2";
|
||||
@@ -35,6 +37,7 @@ namespace PepperDash.Essentials.DM
|
||||
public const string HdmiOut = "HdmiOut";
|
||||
public const string Osd = "Osd";
|
||||
public const string SpdifIn = "SpdifIn";
|
||||
public const string ToTx = "ToTx";
|
||||
public const string VgaIn = "VgaIn";
|
||||
}
|
||||
}
|
||||
@@ -112,6 +112,8 @@ namespace PepperDash.Essentials.DM
|
||||
{
|
||||
if (typeName.StartsWith("dmrmc100c"))
|
||||
return new DmRmcX100CController(key, name, new DmRmc100C(ipid, Global.ControlSystem));
|
||||
if (typeName.StartsWith("dmrmc100s"))
|
||||
return new DmRmc100SController(key, name, new DmRmc100S(ipid, Global.ControlSystem));
|
||||
if (typeName.StartsWith("dmrmc4k100c"))
|
||||
return new DmRmcX100CController(key, name, new DmRmc4k100C(ipid, Global.ControlSystem));
|
||||
if (typeName.StartsWith("dmrmc4kz100c"))
|
||||
@@ -182,6 +184,8 @@ namespace PepperDash.Essentials.DM
|
||||
return new DmRmc4k100C1GController(key, name, new DmRmc4K100C1G(chassis.Outputs[num]));
|
||||
if (typeName.StartsWith("dmrmc100c"))
|
||||
return new DmRmcX100CController(key, name, new DmRmc100C(chassis.Outputs[num]));
|
||||
if (typeName.StartsWith("dmrmc100s"))
|
||||
return new DmRmc100SController(key, name, new DmRmc100S(chassis.Outputs[num]));
|
||||
if (typeName.StartsWith("dmrmc4k100c"))
|
||||
return new DmRmcX100CController(key, name, new DmRmc4k100C(chassis.Outputs[num]));
|
||||
if (typeName.StartsWith("dmrmc4kz100c"))
|
||||
@@ -213,6 +217,8 @@ namespace PepperDash.Essentials.DM
|
||||
return new DmRmc4k100C1GController(key, name, new DmRmc4K100C1G(ipid, chassis.Outputs[num]));
|
||||
if (typeName.StartsWith("dmrmc100c"))
|
||||
return new DmRmcX100CController(key, name, new DmRmc100C(ipid, chassis.Outputs[num]));
|
||||
if (typeName.StartsWith("dmrmc100s"))
|
||||
return new DmRmc100SController(key, name, new DmRmc100S(ipid, chassis.Outputs[num]));
|
||||
if (typeName.StartsWith("dmrmc4k100c"))
|
||||
return new DmRmcX100CController(key, name, new DmRmc4k100C(ipid, chassis.Outputs[num]));
|
||||
if (typeName.StartsWith("dmrmc4kz100c"))
|
||||
|
||||
@@ -168,6 +168,8 @@ namespace PepperDash.Essentials.DM
|
||||
&& tx.CvbsInput.SyncDetectedFeedback.BoolValue)
|
||||
};
|
||||
|
||||
AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn,
|
||||
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
|
||||
|
||||
DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
eRoutingPortConnectionType.DmCat, null, this);
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace PepperDash.Essentials.DM
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Console(0, "[{0}] WARNING: Cannot create DM-TX device: {1}", key, e.Message);
|
||||
Debug.Console(0, "[{0}] WARNING: Cannot create DM-TX device: {1}", key, e);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -132,7 +132,7 @@ namespace PepperDash.Essentials.DM
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Console(0, "[{0}] WARNING: Cannot create DM-TX device: {1}", key, e.Message);
|
||||
Debug.Console(0, "[{0}] WARNING: Cannot create DM-TX device: {1}", key, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -97,6 +97,7 @@
|
||||
<Compile Include="Cards REMOVE\DmInputCardBase.cs" />
|
||||
<Compile Include="Chassis\DmCardAudioOutput.cs" />
|
||||
<Compile Include="Chassis\DmChassisController.cs" />
|
||||
<Compile Include="Chassis\DmpsAudioOutputController.cs" />
|
||||
<Compile Include="Chassis\DmpsInternalVirtualDmTxController.cs" />
|
||||
<Compile Include="Chassis\DmpsRoutingController.cs" />
|
||||
<Compile Include="Chassis\HdMdNxM4kEController.cs" />
|
||||
@@ -112,6 +113,7 @@
|
||||
<Compile Include="Endpoints\NVX\DmNvxControllerBase.cs" />
|
||||
<Compile Include="Endpoints\DGEs\DgeController.cs" />
|
||||
<Compile Include="Endpoints\DGEs\DgePropertiesConfig.cs" />
|
||||
<Compile Include="DmLite\HdMdxxxCEController.cs" />
|
||||
<Compile Include="Endpoints\Receivers\DmHdBaseTEndpointController.cs" />
|
||||
<Compile Include="Endpoints\Receivers\DmRmc100SController.cs" />
|
||||
<Compile Include="Endpoints\Receivers\DmRmc150SController.cs" />
|
||||
|
||||
Reference in New Issue
Block a user