mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-14 04:54:53 +00:00
Compare commits
59 Commits
1.5.2-beta
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ef7882955 | ||
|
|
3992aba843 | ||
|
|
b689a54936 | ||
|
|
1046672386 | ||
|
|
5853dd6617 | ||
|
|
a0ef356bac | ||
|
|
486d6db7d8 | ||
|
|
81d9261a73 | ||
|
|
2ace6ef6bc | ||
|
|
cc6d94b188 | ||
|
|
0525f76b6b | ||
|
|
345442e195 | ||
|
|
e94e8b60a6 | ||
|
|
4f4c8cba04 | ||
|
|
0a38442ac5 | ||
|
|
083a3662e0 | ||
|
|
37e1e50b94 | ||
|
|
862610b17d | ||
|
|
7bfc82c3cc | ||
|
|
f81fe3d01f | ||
|
|
4f5b649b1d | ||
|
|
d0ee05def9 | ||
|
|
dd0a52c1a2 | ||
|
|
76abd05830 | ||
|
|
102535cd04 | ||
|
|
e0e9fc2ce4 | ||
|
|
a657525562 | ||
|
|
496b70f73f | ||
|
|
19b3c51c25 | ||
|
|
476d661ece | ||
|
|
546cdacc0f | ||
|
|
b4605578ad | ||
|
|
39f25cc9db | ||
|
|
788aa33a3a | ||
|
|
46ecb676c0 | ||
|
|
19c4428dc8 | ||
|
|
25ddb95db5 | ||
|
|
43ff15ff5e | ||
|
|
406e6a912f | ||
|
|
57f1db17c3 | ||
|
|
c9d97e5cae | ||
|
|
f33763ce43 | ||
|
|
a192ec3117 | ||
|
|
f9ca609c1e | ||
|
|
b0a21a1c2f | ||
|
|
a4339bf5a4 | ||
|
|
06cc871432 | ||
|
|
45b6a09067 | ||
|
|
2085e14f24 | ||
|
|
622749a37f | ||
|
|
bcd7efa911 | ||
|
|
b58b42c496 | ||
|
|
f7a41f08c4 | ||
|
|
7a7ab33fa4 | ||
|
|
dc9d285de0 | ||
|
|
2519fffb58 | ||
|
|
2eacaec577 | ||
|
|
dbec871500 | ||
|
|
03bcb5f338 |
21
.github/workflows/docker.yml
vendored
21
.github/workflows/docker.yml
vendored
@@ -11,7 +11,7 @@ on:
|
||||
|
||||
env:
|
||||
# solution path doesn't need slashes unless there it is multiple folders deep
|
||||
# solution name does not include extension. .sln is assumed
|
||||
# solution name does not include extension. .sln is assumed
|
||||
SOLUTION_PATH: PepperDashEssentials
|
||||
SOLUTION_FILE: PepperDashEssentials
|
||||
# Do not edit this, we're just creating it here
|
||||
@@ -52,6 +52,12 @@ jobs:
|
||||
run: |
|
||||
Write-Output ${{ env.VERSION }}
|
||||
./.github/scripts/UpdateAssemblyVersion.ps1 ${{ env.VERSION }}
|
||||
# Login to Docker
|
||||
- name: Login to Docker
|
||||
uses: azure/docker-login@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_TOKEN }}
|
||||
# Build the solutions in the docker image
|
||||
- name: Build Solution
|
||||
shell: powershell
|
||||
@@ -77,9 +83,15 @@ jobs:
|
||||
name: Version
|
||||
path: ${{env.GITHUB_HOME}}\output\version.txt
|
||||
# Create the release on the source repo
|
||||
- name: Create tag for non-rc builds
|
||||
if: contains(env.VERSION, 'alpha') || contains(env.VERSION, 'beta')
|
||||
run: |
|
||||
git tag $($Env:VERSION)
|
||||
git push --tags origin
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
# using contributor's version to allow for pointing at the right commit
|
||||
if: contains(env.VERSION,'-rc-') || contains(env.VERSION,'-hotfix-')
|
||||
uses: fleskesvor/create-release@feature/support-target-commitish
|
||||
with:
|
||||
tag_name: ${{ env.VERSION }}
|
||||
@@ -89,6 +101,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Upload the build package to the release
|
||||
- name: Upload Release Package
|
||||
if: contains(env.VERSION,'-rc-') || contains(env.VERSION,'-hotfix-')
|
||||
id: upload_release
|
||||
uses: actions/upload-release-asset@v1
|
||||
with:
|
||||
@@ -103,6 +116,8 @@ jobs:
|
||||
needs: Build_Project
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: check Github ref
|
||||
run: ${{toJson(github.ref)}}
|
||||
# Checkout the repo
|
||||
- name: Checkout Builds Repo
|
||||
uses: actions/checkout@v2
|
||||
@@ -178,9 +193,11 @@ jobs:
|
||||
Public_Push_Output:
|
||||
needs: Build_Project
|
||||
runs-on: windows-latest
|
||||
if: contains(github.ref, 'master') || contains(github.ref, 'release')
|
||||
if: contains(github.ref, 'master') || contains(github.ref, '/release/')
|
||||
steps:
|
||||
# Checkout the repo
|
||||
- name: check Github ref
|
||||
run: ${{toJson(github.ref)}}
|
||||
- name: Checkout Builds Repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
|
||||
6
.github/workflows/master.yml
vendored
6
.github/workflows/master.yml
vendored
@@ -44,6 +44,12 @@ jobs:
|
||||
run: |
|
||||
Write-Output ${{ env.VERSION }}
|
||||
./.github/scripts/UpdateAssemblyVersion.ps1 ${{ env.VERSION }}
|
||||
# Login to Docker
|
||||
- name: Login to Docker
|
||||
uses: azure/docker-login@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_TOKEN }}
|
||||
# Build the solutions in the docker image
|
||||
- name: Build Solution
|
||||
shell: powershell
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
|
||||
namespace PepperDash.Essentials.Bridges
|
||||
{
|
||||
@@ -7,8 +6,7 @@ namespace PepperDash.Essentials.Bridges
|
||||
/// Defines a device that uses the legacy JoinMapBase for its join map
|
||||
/// </summary>
|
||||
[Obsolete("IBridgeAdvanced should be used going forward with JoinMapBaseAdvanced")]
|
||||
public interface IBridge
|
||||
public interface IBridge:Core.Bridges.IBridge
|
||||
{
|
||||
void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey);
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ PepperDash Essentials is an open source Crestron framework that can be configure
|
||||
Essentials Framework is a collection of C# / Simpl# Pro libraries that can be utilized in several different manners. It is currently operating as a 100% configuration-driven system, and can be extended to add different workflows and behaviors, either through the addition of further device "types" or via the plug-in mechanism. The framework is a collection of "things" that are all related and interconnected, but in general do not have dependencies on each other.
|
||||
|
||||
## Minimum Requirements
|
||||
- Essentials Framework runs on any Crestron 3-series processor or Crestron's VC-4 platform.
|
||||
- Essentials Framework runs on any Crestron 3-series processor, **4-series** processor or Crestron's VC-4 platform.
|
||||
- To edit and compile the source, Microsoft Visual Studio 2008 Professional with SP1 is required.
|
||||
- Crestron's Simpl# Plugin is also required (must be obtained from Crestron).
|
||||
|
||||
|
||||
BIN
docs/Essentials Plugin Loading Sequence.png
Normal file
BIN
docs/Essentials Plugin Loading Sequence.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 751 KiB |
@@ -110,15 +110,24 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
if (device == null) continue;
|
||||
|
||||
Debug.Console(1, this, "Linking Device: '{0}'", device.Key);
|
||||
//if (device is IBridge) // Check for this first to allow bridges in plugins to override existing bridges that apply to the same type.
|
||||
//{
|
||||
// Debug.Console(2, this, "'{0}' is IBridge", device.Key);
|
||||
//}
|
||||
|
||||
if (typeof (IBridge).IsAssignableFrom(device.GetType().GetCType()))
|
||||
{
|
||||
var basicBridge = device as IBridge;
|
||||
if (basicBridge != null)
|
||||
{
|
||||
Debug.Console(0, this, Debug.ErrorLogLevel.Notice,
|
||||
"Linking EiscApiAdvanced {0} to device {1} using obsolete join map. Please update the device's join map.",
|
||||
Key, device.Key);
|
||||
basicBridge.LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!typeof (IBridgeAdvanced).IsAssignableFrom(device.GetType().GetCType()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var bridge = device as IBridgeAdvanced;
|
||||
if (bridge != null) bridge.LinkToApi(Eisc, d.JoinStart, d.JoinMapKey, this);
|
||||
}
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
using System;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using PepperDash.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines a device that uses JoinMapBaseAdvanced for its join map
|
||||
/// </summary>
|
||||
public interface IBridgeAdvanced
|
||||
public interface IBridgeAdvanced:IKeyed
|
||||
{
|
||||
void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge);
|
||||
}
|
||||
|
||||
public interface IBridge:IKeyed
|
||||
{
|
||||
void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey);
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,25 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
public class DmChassisControllerJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
[JoinName("EnableAudioBreakaway")]
|
||||
public JoinDataComplete EnableAudioBreakaway = new JoinDataComplete(
|
||||
new JoinData {JoinNumber = 4, JoinSpan = 1},
|
||||
new JoinMetadata
|
||||
{
|
||||
Label = "DM Chassis enable audio breakaway routing",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("EnableUsbBreakaway")]
|
||||
public JoinDataComplete EnableUsbBreakaway = new JoinDataComplete(
|
||||
new JoinData { JoinNumber = 5, JoinSpan = 1 },
|
||||
new JoinMetadata
|
||||
{
|
||||
Label = "DM Chassis enable USB breakaway routing",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("SystemId")]
|
||||
public JoinDataComplete SystemId = new JoinDataComplete(new JoinData() { JoinNumber = 10, JoinSpan = 1 },
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace PepperDash.Essentials.Core
|
||||
trilist.SetStringSigAction(joinMap.SetPortConfig.JoinNumber, SetPortConfig);
|
||||
|
||||
|
||||
var sComm = this as ISocketStatus;
|
||||
var sComm = CommPort as ISocketStatus;
|
||||
if (sComm == null) return;
|
||||
sComm.ConnectionChange += (s, a) =>
|
||||
{
|
||||
|
||||
@@ -1,127 +1,127 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharpPro.GeneralIO;
|
||||
using Newtonsoft.Json;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
|
||||
namespace PepperDash.Essentials.Core.CrestronIO
|
||||
{
|
||||
[Description("Wrapper class for the Crestron StatusSign device")]
|
||||
public class StatusSignController : CrestronGenericBridgeableBaseDevice
|
||||
{
|
||||
private readonly StatusSign _device;
|
||||
|
||||
public BoolFeedback RedLedEnabledFeedback { get; private set; }
|
||||
public BoolFeedback GreenLedEnabledFeedback { get; private set; }
|
||||
public BoolFeedback BlueLedEnabledFeedback { get; private set; }
|
||||
|
||||
public IntFeedback RedLedBrightnessFeedback { get; private set; }
|
||||
public IntFeedback GreenLedBrightnessFeedback { get; private set; }
|
||||
public IntFeedback BlueLedBrightnessFeedback { get; private set; }
|
||||
|
||||
public StatusSignController(string key, string name, GenericBase hardware) : base(key, name, hardware)
|
||||
{
|
||||
_device = hardware as StatusSign;
|
||||
|
||||
RedLedEnabledFeedback =
|
||||
new BoolFeedback(
|
||||
() =>
|
||||
_device.Leds[(uint) StatusSign.Led.eLedColor.Red]
|
||||
.ControlFeedback.BoolValue);
|
||||
GreenLedEnabledFeedback =
|
||||
new BoolFeedback(
|
||||
() =>
|
||||
_device.Leds[(uint) StatusSign.Led.eLedColor.Green]
|
||||
.ControlFeedback.BoolValue);
|
||||
BlueLedEnabledFeedback =
|
||||
new BoolFeedback(
|
||||
() =>
|
||||
_device.Leds[(uint) StatusSign.Led.eLedColor.Blue]
|
||||
.ControlFeedback.BoolValue);
|
||||
|
||||
RedLedBrightnessFeedback =
|
||||
new IntFeedback(() => (int) _device.Leds[(uint) StatusSign.Led.eLedColor.Red].BrightnessFeedback);
|
||||
GreenLedBrightnessFeedback =
|
||||
new IntFeedback(() => (int) _device.Leds[(uint) StatusSign.Led.eLedColor.Green].BrightnessFeedback);
|
||||
BlueLedBrightnessFeedback =
|
||||
new IntFeedback(() => (int) _device.Leds[(uint) StatusSign.Led.eLedColor.Blue].BrightnessFeedback);
|
||||
|
||||
if (_device != null) _device.BaseEvent += _device_BaseEvent;
|
||||
}
|
||||
|
||||
void _device_BaseEvent(GenericBase device, BaseEventArgs args)
|
||||
{
|
||||
switch (args.EventId)
|
||||
{
|
||||
case StatusSign.LedBrightnessFeedbackEventId:
|
||||
RedLedBrightnessFeedback.FireUpdate();
|
||||
GreenLedBrightnessFeedback.FireUpdate();
|
||||
BlueLedBrightnessFeedback.FireUpdate();
|
||||
break;
|
||||
case StatusSign.LedControlFeedbackEventId:
|
||||
RedLedEnabledFeedback.FireUpdate();
|
||||
GreenLedEnabledFeedback.FireUpdate();
|
||||
BlueLedEnabledFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void EnableLedControl(bool red, bool green, bool blue)
|
||||
{
|
||||
_device.Leds[(uint) StatusSign.Led.eLedColor.Red].Control.BoolValue = red;
|
||||
_device.Leds[(uint)StatusSign.Led.eLedColor.Green].Control.BoolValue = green;
|
||||
_device.Leds[(uint)StatusSign.Led.eLedColor.Blue].Control.BoolValue = blue;
|
||||
}
|
||||
|
||||
public void SetColor(uint red, uint green, uint blue)
|
||||
{
|
||||
try
|
||||
{
|
||||
_device.Leds[(uint)StatusSign.Led.eLedColor.Red].Brightness =
|
||||
(StatusSign.Led.eBrightnessPercentageValues)SimplSharpDeviceHelper.PercentToUshort(red);
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
Debug.Console(1, this, "Error converting value to Red LED brightness. value: {0}", red);
|
||||
}
|
||||
try
|
||||
{
|
||||
_device.Leds[(uint)StatusSign.Led.eLedColor.Green].Brightness =
|
||||
(StatusSign.Led.eBrightnessPercentageValues)SimplSharpDeviceHelper.PercentToUshort(green);
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
Debug.Console(1, this, "Error converting value to Green LED brightness. value: {0}", green);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
_device.Leds[(uint)StatusSign.Led.eLedColor.Blue].Brightness =
|
||||
(StatusSign.Led.eBrightnessPercentageValues)SimplSharpDeviceHelper.PercentToUshort(blue);
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
Debug.Console(1, this, "Error converting value to Blue LED brightness. value: {0}", blue);
|
||||
}
|
||||
}
|
||||
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharpPro.GeneralIO;
|
||||
using Newtonsoft.Json;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
|
||||
namespace PepperDash.Essentials.Core.CrestronIO
|
||||
{
|
||||
[Description("Wrapper class for the Crestron StatusSign device")]
|
||||
public class StatusSignController : CrestronGenericBridgeableBaseDevice
|
||||
{
|
||||
private readonly StatusSign _device;
|
||||
|
||||
public BoolFeedback RedLedEnabledFeedback { get; private set; }
|
||||
public BoolFeedback GreenLedEnabledFeedback { get; private set; }
|
||||
public BoolFeedback BlueLedEnabledFeedback { get; private set; }
|
||||
|
||||
public IntFeedback RedLedBrightnessFeedback { get; private set; }
|
||||
public IntFeedback GreenLedBrightnessFeedback { get; private set; }
|
||||
public IntFeedback BlueLedBrightnessFeedback { get; private set; }
|
||||
|
||||
public StatusSignController(string key, string name, GenericBase hardware) : base(key, name, hardware)
|
||||
{
|
||||
var joinMap = new StatusSignControllerJoinMap(joinStart);
|
||||
|
||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||
|
||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||
_device = hardware as StatusSign;
|
||||
|
||||
RedLedEnabledFeedback =
|
||||
new BoolFeedback(
|
||||
() =>
|
||||
_device.Leds[(uint) StatusSign.Led.eLedColor.Red]
|
||||
.ControlFeedback.BoolValue);
|
||||
GreenLedEnabledFeedback =
|
||||
new BoolFeedback(
|
||||
() =>
|
||||
_device.Leds[(uint) StatusSign.Led.eLedColor.Green]
|
||||
.ControlFeedback.BoolValue);
|
||||
BlueLedEnabledFeedback =
|
||||
new BoolFeedback(
|
||||
() =>
|
||||
_device.Leds[(uint) StatusSign.Led.eLedColor.Blue]
|
||||
.ControlFeedback.BoolValue);
|
||||
|
||||
RedLedBrightnessFeedback =
|
||||
new IntFeedback(() => (int) _device.Leds[(uint) StatusSign.Led.eLedColor.Red].BrightnessFeedback);
|
||||
GreenLedBrightnessFeedback =
|
||||
new IntFeedback(() => (int) _device.Leds[(uint) StatusSign.Led.eLedColor.Green].BrightnessFeedback);
|
||||
BlueLedBrightnessFeedback =
|
||||
new IntFeedback(() => (int) _device.Leds[(uint) StatusSign.Led.eLedColor.Blue].BrightnessFeedback);
|
||||
|
||||
if (_device != null) _device.BaseEvent += _device_BaseEvent;
|
||||
}
|
||||
|
||||
void _device_BaseEvent(GenericBase device, BaseEventArgs args)
|
||||
{
|
||||
switch (args.EventId)
|
||||
{
|
||||
case StatusSign.LedBrightnessFeedbackEventId:
|
||||
RedLedBrightnessFeedback.FireUpdate();
|
||||
GreenLedBrightnessFeedback.FireUpdate();
|
||||
BlueLedBrightnessFeedback.FireUpdate();
|
||||
break;
|
||||
case StatusSign.LedControlFeedbackEventId:
|
||||
RedLedEnabledFeedback.FireUpdate();
|
||||
GreenLedEnabledFeedback.FireUpdate();
|
||||
BlueLedEnabledFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void EnableLedControl(bool red, bool green, bool blue)
|
||||
{
|
||||
_device.Leds[(uint) StatusSign.Led.eLedColor.Red].Control.BoolValue = red;
|
||||
_device.Leds[(uint)StatusSign.Led.eLedColor.Green].Control.BoolValue = green;
|
||||
_device.Leds[(uint)StatusSign.Led.eLedColor.Blue].Control.BoolValue = blue;
|
||||
}
|
||||
|
||||
public void SetColor(uint red, uint green, uint blue)
|
||||
{
|
||||
try
|
||||
{
|
||||
_device.Leds[(uint)StatusSign.Led.eLedColor.Red].Brightness =
|
||||
(StatusSign.Led.eBrightnessPercentageValues)SimplSharpDeviceHelper.PercentToUshort(red);
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
Debug.Console(1, this, "Error converting value to Red LED brightness. value: {0}", red);
|
||||
}
|
||||
try
|
||||
{
|
||||
_device.Leds[(uint)StatusSign.Led.eLedColor.Green].Brightness =
|
||||
(StatusSign.Led.eBrightnessPercentageValues)SimplSharpDeviceHelper.PercentToUshort(green);
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
Debug.Console(1, this, "Error converting value to Green LED brightness. value: {0}", green);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
_device.Leds[(uint)StatusSign.Led.eLedColor.Blue].Brightness =
|
||||
(StatusSign.Led.eBrightnessPercentageValues)SimplSharpDeviceHelper.PercentToUshort(blue);
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
Debug.Console(1, this, "Error converting value to Blue LED brightness. value: {0}", blue);
|
||||
}
|
||||
}
|
||||
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
var joinMap = new StatusSignControllerJoinMap(joinStart);
|
||||
|
||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||
|
||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||
joinMap = JsonConvert.DeserializeObject<StatusSignControllerJoinMap>(joinMapSerialized);
|
||||
|
||||
bridge.AddJoinMap(Key, joinMap);
|
||||
|
||||
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||
|
||||
bridge.AddJoinMap(Key, joinMap);
|
||||
|
||||
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||
|
||||
trilist.SetBoolSigAction(joinMap.RedControl.JoinNumber, b => EnableControl(trilist, joinMap, this));
|
||||
trilist.SetBoolSigAction(joinMap.GreenControl.JoinNumber, b => EnableControl(trilist, joinMap, this));
|
||||
trilist.SetBoolSigAction(joinMap.BlueControl.JoinNumber, b => EnableControl(trilist, joinMap, this));
|
||||
@@ -139,44 +139,44 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
|
||||
RedLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.RedLed.JoinNumber]);
|
||||
BlueLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.BlueLed.JoinNumber]);
|
||||
GreenLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.GreenLed.JoinNumber]);
|
||||
}
|
||||
|
||||
private static void EnableControl(BasicTriList triList, StatusSignControllerJoinMap joinMap,
|
||||
StatusSignController device)
|
||||
GreenLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.GreenLed.JoinNumber]);
|
||||
}
|
||||
|
||||
private static void EnableControl(BasicTriList triList, StatusSignControllerJoinMap joinMap,
|
||||
StatusSignController device)
|
||||
{
|
||||
var redEnable = triList.BooleanOutput[joinMap.RedControl.JoinNumber].BoolValue;
|
||||
var greenEnable = triList.BooleanOutput[joinMap.GreenControl.JoinNumber].BoolValue;
|
||||
var blueEnable = triList.BooleanOutput[joinMap.BlueControl.JoinNumber].BoolValue;
|
||||
device.EnableLedControl(redEnable, greenEnable, blueEnable);
|
||||
}
|
||||
|
||||
private static void SetColor(BasicTriList triList, StatusSignControllerJoinMap joinMap,
|
||||
StatusSignController device)
|
||||
var blueEnable = triList.BooleanOutput[joinMap.BlueControl.JoinNumber].BoolValue;
|
||||
device.EnableLedControl(redEnable, greenEnable, blueEnable);
|
||||
}
|
||||
|
||||
private static void SetColor(BasicTriList triList, StatusSignControllerJoinMap joinMap,
|
||||
StatusSignController device)
|
||||
{
|
||||
var redBrightness = triList.UShortOutput[joinMap.RedLed.JoinNumber].UShortValue;
|
||||
var greenBrightness = triList.UShortOutput[joinMap.GreenLed.JoinNumber].UShortValue;
|
||||
var blueBrightness = triList.UShortOutput[joinMap.BlueLed.JoinNumber].UShortValue;
|
||||
|
||||
device.SetColor(redBrightness, greenBrightness, blueBrightness);
|
||||
}
|
||||
}
|
||||
|
||||
public class StatusSignControllerFactory : EssentialsDeviceFactory<StatusSignController>
|
||||
{
|
||||
public StatusSignControllerFactory()
|
||||
{
|
||||
TypeNames = new List<string>() { "statussign" };
|
||||
}
|
||||
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.Console(1, "Factory Attempting to create new StatusSign Device");
|
||||
|
||||
var control = CommFactory.GetControlPropertiesConfig(dc);
|
||||
var cresnetId = control.CresnetIdInt;
|
||||
|
||||
return new StatusSignController(dc.Key, dc.Name, new StatusSign(cresnetId, Global.ControlSystem));
|
||||
}
|
||||
}
|
||||
var blueBrightness = triList.UShortOutput[joinMap.BlueLed.JoinNumber].UShortValue;
|
||||
|
||||
device.SetColor(redBrightness, greenBrightness, blueBrightness);
|
||||
}
|
||||
}
|
||||
|
||||
public class StatusSignControllerFactory : EssentialsDeviceFactory<StatusSignController>
|
||||
{
|
||||
public StatusSignControllerFactory()
|
||||
{
|
||||
TypeNames = new List<string>() { "statussign" };
|
||||
}
|
||||
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.Console(1, "Factory Attempting to create new StatusSign Device");
|
||||
|
||||
var control = CommFactory.GetControlPropertiesConfig(dc);
|
||||
var cresnetId = control.CresnetIdInt;
|
||||
|
||||
return new StatusSignController(dc.Key, dc.Name, new StatusSign(cresnetId, Global.ControlSystem));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,16 @@ namespace PepperDash.Essentials.Core
|
||||
return joinMap;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attempts to get the serialized join map from config
|
||||
/// </summary>
|
||||
/// <param name="joinMapKey"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetJoinMapForDevice(string joinMapKey)
|
||||
{
|
||||
return GetSerializedJoinMapForDevice(joinMapKey);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attempts to find a custom join map by key and returns it deserialized if found
|
||||
/// </summary>
|
||||
|
||||
@@ -599,7 +599,7 @@ namespace PepperDash.Essentials.DM {
|
||||
{
|
||||
Debug.Console(2, "Creating Tx Feedbacks {0}", ioSlot);
|
||||
var txKey = TxDictionary[ioSlot];
|
||||
var basicTxDevice = DeviceManager.GetDeviceForKey(txKey) as DmTxControllerBase;
|
||||
var basicTxDevice = DeviceManager.GetDeviceForKey(txKey) as BasicDmTxControllerBase;
|
||||
|
||||
var advancedTxDevice = basicTxDevice as DmTxControllerBase;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharpPro.DM;
|
||||
using Crestron.SimplSharpPro.DM.Cards;
|
||||
@@ -42,6 +43,8 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
public IntFeedback SystemIdFeebdack { get; private set; }
|
||||
public BoolFeedback SystemIdBusyFeedback { get; private set; }
|
||||
public BoolFeedback EnableAudioBreakawayFeedback { get; private set; }
|
||||
public BoolFeedback EnableUsbBreakawayFeedback { get; private set; }
|
||||
|
||||
public Dictionary<uint, IntFeedback> InputCardHdcpCapabilityFeedbacks { get; private set; }
|
||||
|
||||
@@ -210,6 +213,11 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
SystemIdFeebdack = new IntFeedback(() => { return (Chassis as DmMDMnxn).SystemIdFeedback.UShortValue; });
|
||||
SystemIdBusyFeedback = new BoolFeedback(() => { return (Chassis as DmMDMnxn).SystemIdBusy.BoolValue; });
|
||||
EnableAudioBreakawayFeedback =
|
||||
new BoolFeedback(() => (Chassis as DmMDMnxn).EnableAudioBreakawayFeedback.BoolValue);
|
||||
EnableUsbBreakawayFeedback =
|
||||
new BoolFeedback(() => (Chassis as DmMDMnxn).EnableUSBBreakawayFeedback.BoolValue);
|
||||
|
||||
InputCardHdcpCapabilityFeedbacks = new Dictionary<uint, IntFeedback>();
|
||||
InputCardHdcpCapabilityTypes = new Dictionary<uint, eHdcpCapabilityType>();
|
||||
|
||||
@@ -376,6 +384,11 @@ namespace PepperDash.Essentials.DM
|
||||
}
|
||||
}
|
||||
|
||||
private void ChassisOnBaseEvent(GenericBase device, BaseEventArgs args)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -768,6 +781,20 @@ namespace PepperDash.Essentials.DM
|
||||
SystemIdBusyFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
case DMSystemEventIds.AudioBreakawayEventId:
|
||||
{
|
||||
Debug.Console(2, this, "AudioBreakaway Event: value: {0}",
|
||||
(Chassis as DmMDMnxn).EnableAudioBreakawayFeedback.BoolValue);
|
||||
EnableAudioBreakawayFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
case DMSystemEventIds.USBBreakawayEventId:
|
||||
{
|
||||
Debug.Console(2, this, "USBBreakaway Event: value: {0}",
|
||||
(Chassis as DmMDMnxn).EnableUSBBreakawayFeedback.BoolValue);
|
||||
EnableUsbBreakawayFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -927,6 +954,10 @@ namespace PepperDash.Essentials.DM
|
||||
(Chassis as DmMDMnxn).EnableAudioBreakaway.BoolValue = true;
|
||||
(Chassis as DmMDMnxn).EnableUSBBreakaway.BoolValue = true;
|
||||
|
||||
|
||||
EnableAudioBreakawayFeedback.FireUpdate();
|
||||
EnableUsbBreakawayFeedback.FireUpdate();
|
||||
|
||||
if (InputNames != null)
|
||||
foreach (var kvp in InputNames)
|
||||
Chassis.Inputs[kvp.Key].Name.StringValue = kvp.Value;
|
||||
@@ -944,6 +975,10 @@ namespace PepperDash.Essentials.DM
|
||||
var input = Convert.ToUInt32(inputSelector); // Cast can sometimes fail
|
||||
var output = Convert.ToUInt32(outputSelector);
|
||||
|
||||
var chassisSize = (uint) Chassis.NumberOfInputs; //need this to determine USB routing values 8x8 -> 1-8 is inputs 1-8, 17-24 is outputs 1-8
|
||||
//16x16 1-16 is inputs 1-16, 17-32 is outputs 1-16
|
||||
//32x32 1-32 is inputs 1-32, 33-64 is outputs 1-32
|
||||
|
||||
// Check to see if there's an off timer waiting on this and if so, cancel
|
||||
var key = new PortNumberType(output, sigType);
|
||||
if (input == 0)
|
||||
@@ -964,30 +999,97 @@ namespace PepperDash.Essentials.DM
|
||||
var outCard = input == 0 ? null : Chassis.Outputs[output];
|
||||
|
||||
// NOTE THAT BITWISE COMPARISONS - TO CATCH ALL ROUTING TYPES
|
||||
if ((sigType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
||||
if ((sigType & eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
||||
{
|
||||
Chassis.VideoEnter.BoolValue = true;
|
||||
Chassis.Outputs[output].VideoOut = inCard;
|
||||
}
|
||||
|
||||
if ((sigType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
||||
if ((sigType & eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
||||
{
|
||||
(Chassis as DmMDMnxn).AudioEnter.BoolValue = true;
|
||||
Chassis.Outputs[output].AudioOut = inCard;
|
||||
}
|
||||
|
||||
if ((sigType | eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput)
|
||||
if ((sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput)
|
||||
{
|
||||
//using base here because USB can be routed between 2 output cards or 2 input cards
|
||||
DMInputOutputBase dmCard;
|
||||
|
||||
Debug.Console(2, this, "Executing USB Output switch.\r\n in:{0} output: {1}", input, output);
|
||||
|
||||
if (input > chassisSize)
|
||||
{
|
||||
//wanting to route an output to an output. Subtract chassis size and get output, unless it's 8x8
|
||||
//need this to determine USB routing values
|
||||
//8x8 -> 1-8 is inputs 1-8, 17-24 is outputs 1-8
|
||||
//16x16 1-16 is inputs 1-16, 17-32 is outputs 1-16
|
||||
//32x32 1-32 is inputs 1-32, 33-64 is outputs 1-32
|
||||
uint outputIndex;
|
||||
|
||||
if (chassisSize == 8)
|
||||
{
|
||||
outputIndex = input - 16;
|
||||
}
|
||||
else
|
||||
{
|
||||
outputIndex = input - chassisSize;
|
||||
}
|
||||
dmCard = Chassis.Outputs[outputIndex];
|
||||
}
|
||||
else
|
||||
{
|
||||
dmCard = inCard;
|
||||
}
|
||||
Chassis.USBEnter.BoolValue = true;
|
||||
if (Chassis.Outputs[output] != null)
|
||||
Chassis.Outputs[output].USBRoutedTo = inCard;
|
||||
{
|
||||
Debug.Console(2, this, "Routing USB for input {0} to {1}", Chassis.Outputs[input], dmCard);
|
||||
Chassis.Outputs[output].USBRoutedTo = dmCard;
|
||||
}
|
||||
}
|
||||
|
||||
if ((sigType | eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput)
|
||||
if ((sigType & eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput)
|
||||
{
|
||||
//using base here because USB can be routed between 2 output cards or 2 input cards
|
||||
DMInputOutputBase dmCard;
|
||||
|
||||
Debug.Console(2, this, "Executing USB Input switch.\r\n in:{0} output: {1}", input, output);
|
||||
|
||||
if (output > chassisSize)
|
||||
{
|
||||
//wanting to route an input to an output. Subtract chassis size and get output, unless it's 8x8
|
||||
//need this to determine USB routing values
|
||||
//8x8 -> 1-8 is inputs 1-8, 17-24 is outputs 1-8
|
||||
//16x16 1-16 is inputs 1-16, 17-32 is outputs 1-16
|
||||
//32x32 1-32 is inputs 1-32, 33-64 is outputs 1-32
|
||||
uint outputIndex;
|
||||
|
||||
if (chassisSize == 8)
|
||||
{
|
||||
outputIndex = input - 16;
|
||||
}
|
||||
else
|
||||
{
|
||||
outputIndex = input - chassisSize;
|
||||
}
|
||||
dmCard = Chassis.Outputs[outputIndex];
|
||||
}
|
||||
else
|
||||
{
|
||||
dmCard = Chassis.Inputs[input];
|
||||
}
|
||||
|
||||
|
||||
|
||||
Chassis.USBEnter.BoolValue = true;
|
||||
if (Chassis.Inputs[input] != null)
|
||||
Chassis.Inputs[input].USBRoutedTo = outCard;
|
||||
|
||||
if (Chassis.Inputs[output] == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Debug.Console(2, this, "Routing USB for input {0} to {1}", Chassis.Inputs[output], dmCard);
|
||||
Chassis.Inputs[output].USBRoutedTo = dmCard;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -1023,6 +1125,19 @@ namespace PepperDash.Essentials.DM
|
||||
SystemIdFeebdack.LinkInputSig(trilist.UShortInput[joinMap.SystemId.JoinNumber]);
|
||||
SystemIdBusyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.SystemId.JoinNumber]);
|
||||
|
||||
EnableAudioBreakawayFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableAudioBreakaway.JoinNumber]);
|
||||
EnableUsbBreakawayFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsbBreakaway.JoinNumber]);
|
||||
|
||||
trilist.OnlineStatusChange += (o, a) =>
|
||||
{
|
||||
if (!a.DeviceOnLine) return;
|
||||
|
||||
EnableAudioBreakawayFeedback.FireUpdate();
|
||||
EnableUsbBreakawayFeedback.FireUpdate();
|
||||
SystemIdBusyFeedback.FireUpdate();
|
||||
SystemIdFeebdack.FireUpdate();
|
||||
};
|
||||
|
||||
// Link up outputs
|
||||
for (uint i = 1; i <= Chassis.NumberOfOutputs; i++)
|
||||
{
|
||||
@@ -1039,9 +1154,9 @@ namespace PepperDash.Essentials.DM
|
||||
{
|
||||
Debug.Console(2, "Creating Tx Feedbacks {0}", ioSlot);
|
||||
var txKey = TxDictionary[ioSlot];
|
||||
var basicTxDevice = DeviceManager.GetDeviceForKey(txKey) as DmTxControllerBase;
|
||||
var basicTxDevice = DeviceManager.GetDeviceForKey(txKey) as BasicDmTxControllerBase;
|
||||
|
||||
var advancedTxDevice = basicTxDevice;
|
||||
var advancedTxDevice = basicTxDevice as DmTxControllerBase;
|
||||
|
||||
if (Chassis is DmMd8x8Cpu3 || Chassis is DmMd8x8Cpu3rps
|
||||
|| Chassis is DmMd16x16Cpu3 || Chassis is DmMd16x16Cpu3rps
|
||||
|
||||
@@ -23,18 +23,31 @@ namespace PepperDash.Essentials.DM
|
||||
EdidSerialNumberFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
||||
|
||||
_rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
||||
_rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
||||
|
||||
//removed to prevent NullReferenceException
|
||||
//_rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
||||
}
|
||||
|
||||
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
|
||||
{
|
||||
if (args.EventId == EndpointOutputStreamEventIds.HorizontalResolutionFeedbackEventId || args.EventId == EndpointOutputStreamEventIds.VerticalResolutionFeedbackEventId ||
|
||||
args.EventId == EndpointOutputStreamEventIds.FramesPerSecondFeedbackEventId)
|
||||
switch (args.EventId)
|
||||
{
|
||||
VideoOutputResolutionFeedback.FireUpdate();
|
||||
case EndpointOutputStreamEventIds.FramesPerSecondFeedbackEventId:
|
||||
case EndpointOutputStreamEventIds.VerticalResolutionFeedbackEventId:
|
||||
case EndpointOutputStreamEventIds.HorizontalResolutionFeedbackEventId:
|
||||
VideoOutputResolutionFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointOutputStreamEventIds.HotplugDetectedEventId:
|
||||
if (_rmc.HdmiOutput.ConnectedDevice == null) return;
|
||||
EdidManufacturerFeedback.FireUpdate();
|
||||
EdidNameFeedback.FireUpdate();
|
||||
EdidPreferredTimingFeedback.FireUpdate();
|
||||
EdidSerialNumberFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
||||
{
|
||||
switch (args.EventId)
|
||||
@@ -52,7 +65,7 @@ namespace PepperDash.Essentials.DM
|
||||
EdidSerialNumberFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharpPro.DM;
|
||||
@@ -12,7 +8,6 @@ using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
using PepperDash.Essentials.DM.Config;
|
||||
|
||||
namespace PepperDash.Essentials.DM
|
||||
{
|
||||
@@ -20,8 +15,9 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
/// <summary>
|
||||
/// Controller class for all DM-TX-201C/S/F transmitters
|
||||
/// </summary>
|
||||
public class DmTx200Controller : DmTxControllerBase, ITxRouting, IHasFeedback, IHasFreeRun, IVgaBrightnessContrastControls
|
||||
/// </summary>
|
||||
[Description("Wrapper class for DM-TX-200-C Endpoint")]
|
||||
public class DmTx200Controller : DmTxControllerBase, ITxRouting, IHasFreeRun, IVgaBrightnessContrastControls
|
||||
{
|
||||
public DmTx200C2G Tx { get; private set; }
|
||||
|
||||
@@ -52,15 +48,10 @@ namespace PepperDash.Essentials.DM
|
||||
Tx.VideoSourceFeedback == DmTx200Base.eSourceSelection.Analog ||
|
||||
Tx.VideoSourceFeedback == DmTx200Base.eSourceSelection.Disable)
|
||||
return Tx.VideoSourceFeedback;
|
||||
else // auto
|
||||
{
|
||||
if (Tx.HdmiInput.SyncDetectedFeedback.BoolValue)
|
||||
return DmTx200Base.eSourceSelection.Digital;
|
||||
else if (Tx.VgaInput.SyncDetectedFeedback.BoolValue)
|
||||
return DmTx200Base.eSourceSelection.Analog;
|
||||
else
|
||||
return DmTx200Base.eSourceSelection.Disable;
|
||||
}
|
||||
if (Tx.HdmiInput.SyncDetectedFeedback.BoolValue)
|
||||
return DmTx200Base.eSourceSelection.Digital;
|
||||
|
||||
return Tx.VgaInput.SyncDetectedFeedback.BoolValue ? DmTx200Base.eSourceSelection.Analog : DmTx200Base.eSourceSelection.Disable;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,45 +97,28 @@ namespace PepperDash.Essentials.DM
|
||||
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
|
||||
() => ActualActiveVideoInput.ToString());
|
||||
|
||||
Tx.HdmiInput.InputStreamChange += new EndpointInputStreamChangeEventHandler(InputStreamChangeEvent);
|
||||
Tx.HdmiInput.InputStreamChange += InputStreamChangeEvent;
|
||||
Tx.VgaInput.InputStreamChange += VgaInputOnInputStreamChange;
|
||||
Tx.BaseEvent += Tx_BaseEvent;
|
||||
Tx.OnlineStatusChange += new OnlineStatusChangeEventHandler(Tx_OnlineStatusChange);
|
||||
Tx.OnlineStatusChange += Tx_OnlineStatusChange;
|
||||
|
||||
VideoSourceNumericFeedback = new IntFeedback(() =>
|
||||
{
|
||||
return (int)Tx.VideoSourceFeedback;
|
||||
});
|
||||
AudioSourceNumericFeedback = new IntFeedback(() =>
|
||||
{
|
||||
return (int)Tx.AudioSourceFeedback;
|
||||
});
|
||||
VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback);
|
||||
AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.AudioSourceFeedback);
|
||||
|
||||
HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () =>
|
||||
{
|
||||
if (tx.HdmiInput.HdcpSupportOnFeedback.BoolValue)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
});
|
||||
HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () => tx.HdmiInput.HdcpSupportOnFeedback.BoolValue ? 1 : 0);
|
||||
|
||||
HdcpSupportCapability = eHdcpCapabilityType.HdcpAutoSupport;
|
||||
|
||||
HdmiVideoSyncFeedback = new BoolFeedback(() =>
|
||||
{
|
||||
return (bool)tx.HdmiInput.SyncDetectedFeedback.BoolValue;
|
||||
});
|
||||
HdmiVideoSyncFeedback = new BoolFeedback(() => tx.HdmiInput.SyncDetectedFeedback.BoolValue);
|
||||
|
||||
VgaVideoSyncFeedback = new BoolFeedback(() =>
|
||||
{
|
||||
return (bool)tx.VgaInput.SyncDetectedFeedback.BoolValue;
|
||||
});
|
||||
VgaVideoSyncFeedback = new BoolFeedback(() => tx.VgaInput.SyncDetectedFeedback.BoolValue);
|
||||
|
||||
FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled);
|
||||
|
||||
VgaBrightnessFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.BrightnessFeedback.UShortValue);
|
||||
VgaContrastFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.ContrastFeedback.UShortValue);
|
||||
|
||||
tx.VgaInput.VideoControls.ControlChange += new Crestron.SimplSharpPro.DeviceSupport.GenericEventHandler(VideoControls_ControlChange);
|
||||
tx.VgaInput.VideoControls.ControlChange += VideoControls_ControlChange;
|
||||
|
||||
|
||||
var combinedFuncs = new VideoStatusFuncsWrapper
|
||||
@@ -153,20 +127,13 @@ namespace PepperDash.Essentials.DM
|
||||
(ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital
|
||||
&& tx.HdmiInput.VideoAttributes.HdcpActiveFeedback.BoolValue),
|
||||
|
||||
HdcpStateFeedbackFunc = () =>
|
||||
{
|
||||
if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital)
|
||||
return tx.HdmiInput.VideoAttributes.HdcpStateFeedback.ToString();
|
||||
return "";
|
||||
},
|
||||
HdcpStateFeedbackFunc = () => ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital ? tx.HdmiInput.VideoAttributes.HdcpStateFeedback.ToString() : "",
|
||||
|
||||
VideoResolutionFeedbackFunc = () =>
|
||||
{
|
||||
if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital)
|
||||
return tx.HdmiInput.VideoAttributes.GetVideoResolutionString();
|
||||
if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Analog)
|
||||
return tx.VgaInput.VideoAttributes.GetVideoResolutionString();
|
||||
return "";
|
||||
return ActualActiveVideoInput == DmTx200Base.eSourceSelection.Analog ? tx.VgaInput.VideoAttributes.GetVideoResolutionString() : "";
|
||||
},
|
||||
VideoSyncFeedbackFunc = () =>
|
||||
(ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital
|
||||
@@ -179,9 +146,10 @@ namespace PepperDash.Essentials.DM
|
||||
};
|
||||
|
||||
AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn,
|
||||
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
|
||||
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
|
||||
|
||||
DmOutput = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, null, this);
|
||||
DmOutput = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
eRoutingPortConnectionType.DmCat, null, this);
|
||||
|
||||
AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,
|
||||
AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback,
|
||||
@@ -195,18 +163,32 @@ namespace PepperDash.Essentials.DM
|
||||
DmOutput.Port = Tx.DmOutput;
|
||||
}
|
||||
|
||||
void VideoControls_ControlChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args)
|
||||
private void VgaInputOnInputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||
{
|
||||
switch (args.EventId)
|
||||
{
|
||||
case EndpointInputStreamEventIds.FreeRunFeedbackEventId:
|
||||
FreeRunEnabledFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||
VgaVideoSyncFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void VideoControls_ControlChange(object sender, GenericEventArgs args)
|
||||
{
|
||||
var id = args.EventId;
|
||||
Debug.Console(2, this, "EventId {0}", args.EventId);
|
||||
|
||||
if (id == VideoControlsEventIds.BrightnessFeedbackEventId)
|
||||
switch (id)
|
||||
{
|
||||
VgaBrightnessFeedback.FireUpdate();
|
||||
}
|
||||
else if (id == VideoControlsEventIds.ContrastFeedbackEventId)
|
||||
{
|
||||
VgaContrastFeedback.FireUpdate();
|
||||
case VideoControlsEventIds.BrightnessFeedbackEventId:
|
||||
VgaBrightnessFeedback.FireUpdate();
|
||||
break;
|
||||
case VideoControlsEventIds.ContrastFeedbackEventId:
|
||||
VgaContrastFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,7 +215,7 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
DmTxControllerJoinMap joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||
var joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||
|
||||
if (HdmiVideoSyncFeedback != null)
|
||||
{
|
||||
@@ -253,14 +235,7 @@ namespace PepperDash.Essentials.DM
|
||||
/// <param name="enable"></param>
|
||||
public void SetFreeRunEnabled(bool enable)
|
||||
{
|
||||
if (enable)
|
||||
{
|
||||
Tx.VgaInput.FreeRun = eDmFreeRunSetting.Enabled;
|
||||
}
|
||||
else
|
||||
{
|
||||
Tx.VgaInput.FreeRun = eDmFreeRunSetting.Disabled;
|
||||
}
|
||||
Tx.VgaInput.FreeRun = enable ? eDmFreeRunSetting.Enabled : eDmFreeRunSetting.Disabled;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -323,32 +298,35 @@ namespace PepperDash.Essentials.DM
|
||||
var id = args.EventId;
|
||||
Debug.Console(2, this, "EventId {0}", args.EventId);
|
||||
|
||||
if (id == EndpointTransmitterBase.VideoSourceFeedbackEventId)
|
||||
switch (id)
|
||||
{
|
||||
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
||||
VideoSourceNumericFeedback.FireUpdate();
|
||||
ActiveVideoInputFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
// ------------------------------ incomplete -----------------------------------------
|
||||
else if (id == EndpointTransmitterBase.AudioSourceFeedbackEventId)
|
||||
{
|
||||
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
||||
AudioSourceNumericFeedback.FireUpdate();
|
||||
case EndpointTransmitterBase.VideoSourceFeedbackEventId:
|
||||
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
||||
VideoSourceNumericFeedback.FireUpdate();
|
||||
ActiveVideoInputFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointTransmitterBase.AudioSourceFeedbackEventId:
|
||||
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
||||
AudioSourceNumericFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||
{
|
||||
Debug.Console(2, "{0} event {1} stream {2}", this.Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
||||
Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
||||
|
||||
if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId)
|
||||
switch (args.EventId)
|
||||
{
|
||||
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
||||
}
|
||||
else if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId)
|
||||
{
|
||||
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
||||
case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId:
|
||||
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId:
|
||||
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||
HdmiVideoSyncFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -357,11 +335,12 @@ namespace PepperDash.Essentials.DM
|
||||
/// </summary>
|
||||
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||
{
|
||||
if (eventId == EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
||||
if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
||||
{
|
||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
return;
|
||||
}
|
||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,29 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharpPro.DM;
|
||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||
using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using System;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharpPro.DM;
|
||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||
using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
using PepperDash.Essentials.DM.Config;
|
||||
|
||||
namespace PepperDash.Essentials.DM
|
||||
{
|
||||
// using eVst = Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType;
|
||||
|
||||
/// <summary>
|
||||
/// Controller class for all DM-TX-201C/S/F transmitters
|
||||
/// </summary>
|
||||
public class DmTx201CController : DmTxControllerBase, ITxRouting, IHasFeedback, IHasFreeRun, IVgaBrightnessContrastControls
|
||||
/// </summary>
|
||||
[Description("Wrapper class for DM-TX-201-C Endpoint")]
|
||||
public class DmTx201CController : DmTxControllerBase, ITxRouting, IHasFreeRun, IVgaBrightnessContrastControls
|
||||
{
|
||||
public DmTx201C Tx { get; private set; } // uses the 201S class as it is the base class for the 201C
|
||||
public DmTx201C Tx { get; private set; }
|
||||
|
||||
public RoutingInputPortWithVideoStatuses HdmiInput { get; private set; }
|
||||
public RoutingInputPortWithVideoStatuses VgaInput { get; private set; }
|
||||
@@ -107,43 +101,29 @@ namespace PepperDash.Essentials.DM
|
||||
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
|
||||
() => ActualActiveVideoInput.ToString());
|
||||
|
||||
Tx.HdmiInput.InputStreamChange += new EndpointInputStreamChangeEventHandler(InputStreamChangeEvent);
|
||||
Tx.HdmiInput.InputStreamChange += InputStreamChangeEvent;
|
||||
Tx.VgaInput.InputStreamChange += VgaInputOnInputStreamChange;
|
||||
Tx.BaseEvent += Tx_BaseEvent;
|
||||
Tx.OnlineStatusChange += new OnlineStatusChangeEventHandler(Tx_OnlineStatusChange);
|
||||
|
||||
VideoSourceNumericFeedback = new IntFeedback(() =>
|
||||
{
|
||||
return (int)Tx.VideoSourceFeedback;
|
||||
});
|
||||
AudioSourceNumericFeedback = new IntFeedback(() =>
|
||||
{
|
||||
return (int)Tx.AudioSourceFeedback;
|
||||
});
|
||||
VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback);
|
||||
|
||||
HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () =>
|
||||
{
|
||||
if (tx.HdmiInput.HdcpSupportOnFeedback.BoolValue)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
});
|
||||
AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.AudioSourceFeedback);
|
||||
|
||||
HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () =>
|
||||
(tx.HdmiInput.HdcpSupportOnFeedback.BoolValue ? 1 : 0));
|
||||
|
||||
HdmiVideoSyncFeedback = new BoolFeedback(() =>
|
||||
{
|
||||
return (bool)tx.HdmiInput.SyncDetectedFeedback.BoolValue;
|
||||
});
|
||||
HdmiVideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInput.SyncDetectedFeedback.BoolValue);
|
||||
|
||||
VgaVideoSyncFeedback = new BoolFeedback(() =>
|
||||
{
|
||||
return (bool)tx.VgaInput.SyncDetectedFeedback.BoolValue;
|
||||
});
|
||||
VgaVideoSyncFeedback = new BoolFeedback(() => (bool)tx.VgaInput.SyncDetectedFeedback.BoolValue);
|
||||
|
||||
FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled);
|
||||
|
||||
VgaBrightnessFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.BrightnessFeedback.UShortValue);
|
||||
|
||||
VgaContrastFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.ContrastFeedback.UShortValue);
|
||||
|
||||
tx.VgaInput.VideoControls.ControlChange += new Crestron.SimplSharpPro.DeviceSupport.GenericEventHandler(VideoControls_ControlChange);
|
||||
tx.VgaInput.VideoControls.ControlChange += VideoControls_ControlChange;
|
||||
|
||||
HdcpSupportCapability = eHdcpCapabilityType.HdcpAutoSupport;
|
||||
|
||||
@@ -152,22 +132,18 @@ namespace PepperDash.Essentials.DM
|
||||
HdcpActiveFeedbackFunc = () =>
|
||||
(ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital
|
||||
&& tx.HdmiInput.VideoAttributes.HdcpActiveFeedback.BoolValue),
|
||||
|
||||
HdcpStateFeedbackFunc = () =>
|
||||
{
|
||||
if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital)
|
||||
return tx.HdmiInput.VideoAttributes.HdcpStateFeedback.ToString();
|
||||
return "";
|
||||
},
|
||||
|
||||
HdcpStateFeedbackFunc = () => ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital ?
|
||||
tx.HdmiInput.VideoAttributes.HdcpStateFeedback.ToString() : "",
|
||||
|
||||
VideoResolutionFeedbackFunc = () =>
|
||||
{
|
||||
if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital)
|
||||
return tx.HdmiInput.VideoAttributes.GetVideoResolutionString();
|
||||
if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Analog)
|
||||
return tx.VgaInput.VideoAttributes.GetVideoResolutionString();
|
||||
return "";
|
||||
return ActualActiveVideoInput == DmTx200Base.eSourceSelection.Analog ?
|
||||
tx.VgaInput.VideoAttributes.GetVideoResolutionString() : "";
|
||||
},
|
||||
|
||||
VideoSyncFeedbackFunc = () =>
|
||||
(ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital
|
||||
&& tx.HdmiInput.SyncDetectedFeedback.BoolValue)
|
||||
@@ -201,15 +177,16 @@ namespace PepperDash.Essentials.DM
|
||||
void VideoControls_ControlChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args)
|
||||
{
|
||||
var id = args.EventId;
|
||||
Debug.Console(2, this, "EventId {0}", args.EventId);
|
||||
|
||||
if (id == VideoControlsEventIds.BrightnessFeedbackEventId)
|
||||
{
|
||||
VgaBrightnessFeedback.FireUpdate();
|
||||
}
|
||||
else if (id == VideoControlsEventIds.ContrastFeedbackEventId)
|
||||
{
|
||||
VgaContrastFeedback.FireUpdate();
|
||||
Debug.Console(2, this, "EventId {0}", args.EventId);
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case VideoControlsEventIds.BrightnessFeedbackEventId:
|
||||
VgaBrightnessFeedback.FireUpdate();
|
||||
break;
|
||||
case VideoControlsEventIds.ContrastFeedbackEventId:
|
||||
VgaContrastFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -219,6 +196,19 @@ namespace PepperDash.Essentials.DM
|
||||
VideoSourceNumericFeedback.FireUpdate();
|
||||
AudioSourceNumericFeedback.FireUpdate();
|
||||
|
||||
}
|
||||
|
||||
private void VgaInputOnInputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||
{
|
||||
switch (args.EventId)
|
||||
{
|
||||
case EndpointInputStreamEventIds.FreeRunFeedbackEventId:
|
||||
FreeRunEnabledFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||
VgaVideoSyncFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CustomActivate()
|
||||
@@ -235,7 +225,7 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
DmTxControllerJoinMap joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||
var joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||
|
||||
if (HdmiVideoSyncFeedback != null)
|
||||
{
|
||||
@@ -254,15 +244,8 @@ namespace PepperDash.Essentials.DM
|
||||
/// </summary>
|
||||
/// <param name="enable"></param>
|
||||
public void SetFreeRunEnabled(bool enable)
|
||||
{
|
||||
if (enable)
|
||||
{
|
||||
Tx.VgaInput.FreeRun = eDmFreeRunSetting.Enabled;
|
||||
}
|
||||
else
|
||||
{
|
||||
Tx.VgaInput.FreeRun = eDmFreeRunSetting.Disabled;
|
||||
}
|
||||
{
|
||||
Tx.VgaInput.FreeRun = enable ? eDmFreeRunSetting.Enabled : eDmFreeRunSetting.Disabled;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -329,40 +312,40 @@ namespace PepperDash.Essentials.DM
|
||||
void Tx_BaseEvent(GenericBase device, BaseEventArgs args)
|
||||
{
|
||||
var id = args.EventId;
|
||||
Debug.Console(2, this, "EventId {0}", args.EventId);
|
||||
|
||||
if (id == EndpointTransmitterBase.VideoSourceFeedbackEventId)
|
||||
{
|
||||
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
||||
VideoSourceNumericFeedback.FireUpdate();
|
||||
ActiveVideoInputFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
// ------------------------------ incomplete -----------------------------------------
|
||||
else if (id == EndpointTransmitterBase.AudioSourceFeedbackEventId)
|
||||
{
|
||||
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
||||
AudioSourceNumericFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
Debug.Console(2, this, "EventId {0}", args.EventId);
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case EndpointTransmitterBase.VideoSourceFeedbackEventId:
|
||||
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
||||
ActiveVideoInputFeedback.FireUpdate();
|
||||
VideoSourceNumericFeedback.FireUpdate();
|
||||
ActiveVideoInputFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointTransmitterBase.AudioSourceFeedbackEventId:
|
||||
Debug.Console(2, this, " Audio Source : {0}", Tx.AudioSourceFeedback);
|
||||
AudioSourceNumericFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||
{
|
||||
Debug.Console(2, "{0} event {1} stream {2}", this.Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
||||
Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
||||
|
||||
switch (args.EventId)
|
||||
{
|
||||
case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId:
|
||||
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId:
|
||||
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||
HdmiVideoSyncFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
|
||||
if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId)
|
||||
{
|
||||
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
||||
}
|
||||
else if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId)
|
||||
{
|
||||
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
||||
}
|
||||
else if (args.EventId == EndpointInputStreamEventIds.FreeRunFeedbackEventId)
|
||||
{
|
||||
FreeRunEnabledFeedback.FireUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -370,11 +353,12 @@ namespace PepperDash.Essentials.DM
|
||||
/// </summary>
|
||||
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||
{
|
||||
if (eventId == EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
||||
{
|
||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
}
|
||||
if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
||||
{
|
||||
return;
|
||||
}
|
||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharpPro.DM;
|
||||
@@ -12,18 +8,16 @@ using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
using PepperDash.Essentials.DM.Config;
|
||||
|
||||
namespace PepperDash.Essentials.DM
|
||||
{
|
||||
// using eVst = Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType;
|
||||
|
||||
/// <summary>
|
||||
/// Controller class for all DM-TX-201C/S/F transmitters
|
||||
/// Controller class for all DM-TX-201S/F transmitters
|
||||
/// </summary>
|
||||
public class DmTx201SController : DmTxControllerBase, ITxRouting, IHasFeedback, IHasFreeRun, IVgaBrightnessContrastControls
|
||||
[Description("Wrapper class for DM-TX-201-S/F Endpoint")]
|
||||
public class DmTx201SController : DmTxControllerBase, ITxRouting, IHasFreeRun, IVgaBrightnessContrastControls
|
||||
{
|
||||
public DmTx201S Tx { get; private set; } // uses the 201S class as it is the base class for the 201C
|
||||
public DmTx201S Tx { get; private set; }
|
||||
|
||||
public RoutingInputPortWithVideoStatuses HdmiInput { get; private set; }
|
||||
public RoutingInputPortWithVideoStatuses VgaInput { get; private set; }
|
||||
@@ -107,43 +101,29 @@ namespace PepperDash.Essentials.DM
|
||||
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
|
||||
() => ActualActiveVideoInput.ToString());
|
||||
|
||||
Tx.HdmiInput.InputStreamChange += new EndpointInputStreamChangeEventHandler(InputStreamChangeEvent);
|
||||
Tx.HdmiInput.InputStreamChange += InputStreamChangeEvent;
|
||||
Tx.VgaInput.InputStreamChange += VgaInputOnInputStreamChange;
|
||||
Tx.BaseEvent += Tx_BaseEvent;
|
||||
Tx.OnlineStatusChange += new OnlineStatusChangeEventHandler(Tx_OnlineStatusChange);
|
||||
|
||||
VideoSourceNumericFeedback = new IntFeedback(() =>
|
||||
{
|
||||
return (int)Tx.VideoSourceFeedback;
|
||||
});
|
||||
AudioSourceNumericFeedback = new IntFeedback(() =>
|
||||
{
|
||||
return (int)Tx.AudioSourceFeedback;
|
||||
});
|
||||
VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback);
|
||||
|
||||
AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.AudioSourceFeedback);
|
||||
|
||||
HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () =>
|
||||
{
|
||||
if (tx.HdmiInput.HdcpSupportOnFeedback.BoolValue)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
});
|
||||
(tx.HdmiInput.HdcpSupportOnFeedback.BoolValue ? 1 : 0));
|
||||
|
||||
HdmiVideoSyncFeedback = new BoolFeedback(() =>
|
||||
{
|
||||
return (bool)tx.HdmiInput.SyncDetectedFeedback.BoolValue;
|
||||
});
|
||||
HdmiVideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInput.SyncDetectedFeedback.BoolValue);
|
||||
|
||||
VgaVideoSyncFeedback = new BoolFeedback(() =>
|
||||
{
|
||||
return (bool)tx.VgaInput.SyncDetectedFeedback.BoolValue;
|
||||
});
|
||||
VgaVideoSyncFeedback = new BoolFeedback(() => (bool)tx.VgaInput.SyncDetectedFeedback.BoolValue);
|
||||
|
||||
FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled);
|
||||
|
||||
VgaBrightnessFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.BrightnessFeedback.UShortValue);
|
||||
|
||||
VgaContrastFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.ContrastFeedback.UShortValue);
|
||||
|
||||
tx.VgaInput.VideoControls.ControlChange += new Crestron.SimplSharpPro.DeviceSupport.GenericEventHandler(VideoControls_ControlChange);
|
||||
tx.VgaInput.VideoControls.ControlChange += VideoControls_ControlChange;
|
||||
|
||||
HdcpSupportCapability = eHdcpCapabilityType.HdcpAutoSupport;
|
||||
|
||||
@@ -153,21 +133,17 @@ namespace PepperDash.Essentials.DM
|
||||
(ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital
|
||||
&& tx.HdmiInput.VideoAttributes.HdcpActiveFeedback.BoolValue),
|
||||
|
||||
HdcpStateFeedbackFunc = () =>
|
||||
{
|
||||
if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital)
|
||||
return tx.HdmiInput.VideoAttributes.HdcpStateFeedback.ToString();
|
||||
return "";
|
||||
},
|
||||
HdcpStateFeedbackFunc = () => ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital ?
|
||||
tx.HdmiInput.VideoAttributes.HdcpStateFeedback.ToString() : "",
|
||||
|
||||
VideoResolutionFeedbackFunc = () =>
|
||||
{
|
||||
if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital)
|
||||
return tx.HdmiInput.VideoAttributes.GetVideoResolutionString();
|
||||
if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Analog)
|
||||
return tx.VgaInput.VideoAttributes.GetVideoResolutionString();
|
||||
return "";
|
||||
return ActualActiveVideoInput == DmTx200Base.eSourceSelection.Analog ?
|
||||
tx.VgaInput.VideoAttributes.GetVideoResolutionString() : "";
|
||||
},
|
||||
|
||||
VideoSyncFeedbackFunc = () =>
|
||||
(ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital
|
||||
&& tx.HdmiInput.SyncDetectedFeedback.BoolValue)
|
||||
@@ -203,13 +179,14 @@ namespace PepperDash.Essentials.DM
|
||||
var id = args.EventId;
|
||||
Debug.Console(2, this, "EventId {0}", args.EventId);
|
||||
|
||||
if (id == VideoControlsEventIds.BrightnessFeedbackEventId)
|
||||
switch (id)
|
||||
{
|
||||
VgaBrightnessFeedback.FireUpdate();
|
||||
}
|
||||
else if (id == VideoControlsEventIds.ContrastFeedbackEventId)
|
||||
{
|
||||
VgaContrastFeedback.FireUpdate();
|
||||
case VideoControlsEventIds.BrightnessFeedbackEventId:
|
||||
VgaBrightnessFeedback.FireUpdate();
|
||||
break;
|
||||
case VideoControlsEventIds.ContrastFeedbackEventId:
|
||||
VgaContrastFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,6 +198,19 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
}
|
||||
|
||||
private void VgaInputOnInputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||
{
|
||||
switch (args.EventId)
|
||||
{
|
||||
case EndpointInputStreamEventIds.FreeRunFeedbackEventId:
|
||||
FreeRunEnabledFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||
VgaVideoSyncFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CustomActivate()
|
||||
{
|
||||
Tx.HdmiInput.InputStreamChange += (o, a) => FowardInputStreamChange(HdmiInput, a.EventId);
|
||||
@@ -235,7 +225,7 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
DmTxControllerJoinMap joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||
var joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||
|
||||
if (HdmiVideoSyncFeedback != null)
|
||||
{
|
||||
@@ -255,14 +245,7 @@ namespace PepperDash.Essentials.DM
|
||||
/// <param name="enable"></param>
|
||||
public void SetFreeRunEnabled(bool enable)
|
||||
{
|
||||
if (enable)
|
||||
{
|
||||
Tx.VgaInput.FreeRun = eDmFreeRunSetting.Enabled;
|
||||
}
|
||||
else
|
||||
{
|
||||
Tx.VgaInput.FreeRun = eDmFreeRunSetting.Disabled;
|
||||
}
|
||||
Tx.VgaInput.FreeRun = enable ? eDmFreeRunSetting.Enabled : eDmFreeRunSetting.Disabled;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -331,38 +314,38 @@ namespace PepperDash.Essentials.DM
|
||||
var id = args.EventId;
|
||||
Debug.Console(2, this, "EventId {0}", args.EventId);
|
||||
|
||||
if (id == EndpointTransmitterBase.VideoSourceFeedbackEventId)
|
||||
switch (id)
|
||||
{
|
||||
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
||||
VideoSourceNumericFeedback.FireUpdate();
|
||||
ActiveVideoInputFeedback.FireUpdate();
|
||||
case EndpointTransmitterBase.VideoSourceFeedbackEventId:
|
||||
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
||||
ActiveVideoInputFeedback.FireUpdate();
|
||||
VideoSourceNumericFeedback.FireUpdate();
|
||||
ActiveVideoInputFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointTransmitterBase.AudioSourceFeedbackEventId:
|
||||
Debug.Console(2, this, " Audio Source : {0}", Tx.AudioSourceFeedback);
|
||||
AudioSourceNumericFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
|
||||
// ------------------------------ incomplete -----------------------------------------
|
||||
else if (id == EndpointTransmitterBase.AudioSourceFeedbackEventId)
|
||||
{
|
||||
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
||||
AudioSourceNumericFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||
{
|
||||
Debug.Console(2, "{0} event {1} stream {2}", this.Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
||||
Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
||||
|
||||
if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId)
|
||||
switch (args.EventId)
|
||||
{
|
||||
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
||||
}
|
||||
else if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId)
|
||||
{
|
||||
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
||||
}
|
||||
else if (args.EventId == EndpointInputStreamEventIds.FreeRunFeedbackEventId)
|
||||
{
|
||||
FreeRunEnabledFeedback.FireUpdate();
|
||||
case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId:
|
||||
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId:
|
||||
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||
HdmiVideoSyncFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -370,11 +353,12 @@ namespace PepperDash.Essentials.DM
|
||||
/// </summary>
|
||||
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||
{
|
||||
if (eventId == EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
||||
if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
||||
{
|
||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
return;
|
||||
}
|
||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -19,12 +19,10 @@ namespace PepperDash.Essentials.DM
|
||||
{
|
||||
using eVst = DmTx401C.eSourceSelection;
|
||||
|
||||
public class DmTx401CController : DmTxControllerBase, ITxRouting, IHasFeedback, IIROutputPorts, IComPorts, IHasFreeRun, IVgaBrightnessContrastControls
|
||||
public class DmTx401CController : DmTxControllerBase, ITxRouting, IIROutputPorts, IComPorts, IHasFreeRun, IVgaBrightnessContrastControls
|
||||
{
|
||||
public DmTx401C Tx { get; private set; }
|
||||
|
||||
|
||||
|
||||
public RoutingInputPortWithVideoStatuses HdmiIn { get; private set; }
|
||||
public RoutingInputPortWithVideoStatuses DisplayPortIn { get; private set; }
|
||||
public RoutingInputPortWithVideoStatuses VgaIn { get; private set; }
|
||||
@@ -114,53 +112,38 @@ namespace PepperDash.Essentials.DM
|
||||
VideoStatusHelper.GetVgaInputStatusFuncs(tx.VgaInput));
|
||||
CompositeIn = new RoutingInputPortWithVideoStatuses(DmPortName.CompositeIn,
|
||||
eRoutingSignalType.Video, eRoutingPortConnectionType.Composite, eVst.Composite, this,
|
||||
VideoStatusHelper.GetVgaInputStatusFuncs(tx.VgaInput));
|
||||
VideoStatusHelper.GetVgaInputStatusFuncs(tx.VgaInput));
|
||||
|
||||
Tx.HdmiInput.InputStreamChange += HdmiInputStreamChangeEvent;
|
||||
Tx.DisplayPortInput.InputStreamChange += DisplayPortInputStreamChangeEvent;
|
||||
Tx.BaseEvent += Tx_BaseEvent;
|
||||
Tx.VgaInput.InputStreamChange += VgaInputOnInputStreamChange;
|
||||
tx.VgaInput.VideoControls.ControlChange += VideoControls_ControlChange;
|
||||
|
||||
Tx.BaseEvent += Tx_BaseEvent;
|
||||
|
||||
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
|
||||
() => ActualVideoInput.ToString());
|
||||
() => ActualVideoInput.ToString());
|
||||
|
||||
VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback);
|
||||
|
||||
VideoSourceNumericFeedback = new IntFeedback(() =>
|
||||
{
|
||||
return (int)Tx.VideoSourceFeedback;
|
||||
});
|
||||
AudioSourceNumericFeedback = new IntFeedback(() =>
|
||||
{
|
||||
return (int)Tx.AudioSourceFeedback;
|
||||
});
|
||||
AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.AudioSourceFeedback);
|
||||
|
||||
HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () => tx.HdmiInput.HdcpSupportOnFeedback.BoolValue ? 1 : 0);
|
||||
|
||||
HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () =>
|
||||
{
|
||||
if (tx.HdmiInput.HdcpSupportOnFeedback.BoolValue)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
});
|
||||
|
||||
HdcpSupportCapability = eHdcpCapabilityType.HdcpAutoSupport;
|
||||
|
||||
DisplayPortVideoSyncFeedback = new BoolFeedback("DisplayPortVideoSync", () =>
|
||||
{
|
||||
return (bool)tx.DisplayPortInput.SyncDetectedFeedback.BoolValue;
|
||||
});
|
||||
|
||||
HdmiVideoSyncFeedback = new BoolFeedback(() =>
|
||||
{
|
||||
return (bool)tx.HdmiInput.SyncDetectedFeedback.BoolValue;
|
||||
});
|
||||
|
||||
VgaVideoSyncFeedback = new BoolFeedback(() =>
|
||||
{
|
||||
return (bool)tx.VgaInput.SyncDetectedFeedback.BoolValue;
|
||||
});
|
||||
HdcpSupportCapability = eHdcpCapabilityType.HdcpAutoSupport;
|
||||
|
||||
DisplayPortVideoSyncFeedback = new BoolFeedback("DisplayPortVideoSync", () => (bool)tx.DisplayPortInput.SyncDetectedFeedback.BoolValue);
|
||||
|
||||
HdmiVideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInput.SyncDetectedFeedback.BoolValue);
|
||||
|
||||
VgaVideoSyncFeedback = new BoolFeedback(() => (bool)tx.VgaInput.SyncDetectedFeedback.BoolValue);
|
||||
|
||||
FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled);
|
||||
|
||||
VgaBrightnessFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.BrightnessFeedback.UShortValue);
|
||||
|
||||
VgaContrastFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.ContrastFeedback.UShortValue);
|
||||
|
||||
tx.VgaInput.VideoControls.ControlChange += new Crestron.SimplSharpPro.DeviceSupport.GenericEventHandler(VideoControls_ControlChange);
|
||||
|
||||
var combinedFuncs = new VideoStatusFuncsWrapper
|
||||
{
|
||||
@@ -238,7 +221,7 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
DmTxControllerJoinMap joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||
var joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||
|
||||
if (HdmiVideoSyncFeedback != null)
|
||||
{
|
||||
@@ -298,86 +281,82 @@ namespace PepperDash.Essentials.DM
|
||||
Tx.VideoSource = (eVst)inputSelector;
|
||||
if ((signalType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
||||
Tx.AudioSource = (eVst)inputSelector;
|
||||
}
|
||||
|
||||
void Tx_BaseEvent(GenericBase device, BaseEventArgs args)
|
||||
{
|
||||
var id = args.EventId;
|
||||
Debug.Console(2, this, "EventId {0}", args.EventId);
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case EndpointTransmitterBase.VideoSourceFeedbackEventId:
|
||||
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
||||
VideoSourceNumericFeedback.FireUpdate();
|
||||
ActiveVideoInputFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointTransmitterBase.AudioSourceFeedbackEventId:
|
||||
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
||||
AudioSourceNumericFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void VideoControls_ControlChange(object sender, GenericEventArgs args)
|
||||
{
|
||||
var id = args.EventId;
|
||||
Debug.Console(2, this, "EventId {0}", args.EventId);
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case VideoControlsEventIds.BrightnessFeedbackEventId:
|
||||
VgaBrightnessFeedback.FireUpdate();
|
||||
break;
|
||||
case VideoControlsEventIds.ContrastFeedbackEventId:
|
||||
VgaContrastFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Tx_BaseEvent(GenericBase device, BaseEventArgs args)
|
||||
{
|
||||
var id = args.EventId;
|
||||
if (id == EndpointTransmitterBase.VideoSourceFeedbackEventId)
|
||||
{
|
||||
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
||||
VideoSourceNumericFeedback.FireUpdate();
|
||||
ActiveVideoInputFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
// ------------------------------ incomplete -----------------------------------------
|
||||
else if (id == EndpointTransmitterBase.AudioSourceFeedbackEventId)
|
||||
{
|
||||
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
||||
AudioSourceNumericFeedback.FireUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
void VideoControls_ControlChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args)
|
||||
{
|
||||
var id = args.EventId;
|
||||
Debug.Console(2, this, "EventId {0}", args.EventId);
|
||||
|
||||
if (id == VideoControlsEventIds.BrightnessFeedbackEventId)
|
||||
{
|
||||
VgaBrightnessFeedback.FireUpdate();
|
||||
}
|
||||
else if (id == VideoControlsEventIds.ContrastFeedbackEventId)
|
||||
{
|
||||
VgaContrastFeedback.FireUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enables or disables free run
|
||||
/// </summary>
|
||||
/// <param name="enable"></param>
|
||||
public void SetFreeRunEnabled(bool enable)
|
||||
{
|
||||
if (enable)
|
||||
{
|
||||
Tx.VgaInput.FreeRun = eDmFreeRunSetting.Enabled;
|
||||
}
|
||||
else
|
||||
{
|
||||
Tx.VgaInput.FreeRun = eDmFreeRunSetting.Disabled;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the VGA brightness level
|
||||
/// </summary>
|
||||
/// <param name="level"></param>
|
||||
public void SetVgaBrightness(ushort level)
|
||||
{
|
||||
Tx.VgaInput.VideoControls.Brightness.UShortValue = level;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the VGA contrast level
|
||||
/// </summary>
|
||||
/// <param name="level"></param>
|
||||
public void SetVgaContrast(ushort level)
|
||||
{
|
||||
Tx.VgaInput.VideoControls.Contrast.UShortValue = level;
|
||||
|
||||
/// <summary>
|
||||
/// Enables or disables free run
|
||||
/// </summary>
|
||||
/// <param name="enable"></param>
|
||||
public void SetFreeRunEnabled(bool enable)
|
||||
{
|
||||
Tx.VgaInput.FreeRun = enable ? eDmFreeRunSetting.Enabled : eDmFreeRunSetting.Disabled;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the VGA brightness level
|
||||
/// </summary>
|
||||
/// <param name="level"></param>
|
||||
public void SetVgaBrightness(ushort level)
|
||||
{
|
||||
Tx.VgaInput.VideoControls.Brightness.UShortValue = level;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the VGA contrast level
|
||||
/// </summary>
|
||||
/// <param name="level"></param>
|
||||
public void SetVgaContrast(ushort level)
|
||||
{
|
||||
Tx.VgaInput.VideoControls.Contrast.UShortValue = level;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Relays the input stream change to the appropriate RoutingInputPort.
|
||||
/// </summary>
|
||||
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||
{
|
||||
if (eventId == EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
||||
{
|
||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
}
|
||||
}
|
||||
/// </summary>
|
||||
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||
{
|
||||
if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
||||
{
|
||||
return;
|
||||
}
|
||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Relays the VideoAttributes change to a RoutingInputPort
|
||||
@@ -407,7 +386,51 @@ namespace PepperDash.Essentials.DM
|
||||
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HdmiInputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||
{
|
||||
Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
||||
|
||||
switch (args.EventId)
|
||||
{
|
||||
case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId:
|
||||
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId:
|
||||
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||
HdmiVideoSyncFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void DisplayPortInputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||
{
|
||||
Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
||||
|
||||
switch (args.EventId)
|
||||
{
|
||||
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||
DisplayPortVideoSyncFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void VgaInputOnInputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||
{
|
||||
switch (args.EventId)
|
||||
{
|
||||
case EndpointInputStreamEventIds.FreeRunFeedbackEventId:
|
||||
FreeRunEnabledFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||
VgaVideoSyncFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#region IIROutputPorts Members
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharpPro.DM;
|
||||
using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
|
||||
@@ -11,7 +12,7 @@ namespace PepperDash.Essentials.DM
|
||||
using eVst = eX02VideoSourceType;
|
||||
using eAst = eX02AudioSourceType;
|
||||
|
||||
public class DmTx4k100Controller : DmTxControllerBase, IRoutingInputsOutputs,
|
||||
public class DmTx4k100Controller : BasicDmTxControllerBase, IRoutingInputsOutputs,
|
||||
IIROutputPorts, IComPorts, ICec
|
||||
{
|
||||
public DmTx4K100C1G Tx { get; private set; }
|
||||
@@ -72,9 +73,7 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
DmTxControllerJoinMap joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||
|
||||
LinkDmTxToApi(this, trilist, joinMap, bridge);
|
||||
Debug.Console(1, this, "No properties to link. Skipping device {0}", Name);
|
||||
}
|
||||
|
||||
#region IIROutputPorts Members
|
||||
@@ -90,7 +89,5 @@ namespace PepperDash.Essentials.DM
|
||||
#region ICec Members
|
||||
public Cec StreamCec { get { return Tx.StreamCec; } }
|
||||
#endregion
|
||||
|
||||
public override StringFeedback ActiveVideoInputFeedback { get; protected set; }
|
||||
}
|
||||
}
|
||||
@@ -1,379 +1,367 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
//using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharpPro.DM;
|
||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||
using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
using PepperDash.Essentials.DM.Config;
|
||||
|
||||
namespace PepperDash.Essentials.DM
|
||||
{
|
||||
using eVst = Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType;
|
||||
using eAst = Crestron.SimplSharpPro.DeviceSupport.eX02AudioSourceType;
|
||||
|
||||
public class DmTx4k202CController : DmTxControllerBase, ITxRouting, IHasFeedback,
|
||||
IIROutputPorts, IComPorts
|
||||
{
|
||||
public DmTx4kX02CBase Tx { get; private set; }
|
||||
|
||||
public RoutingInputPortWithVideoStatuses HdmiIn1 { get; private set; }
|
||||
public RoutingInputPortWithVideoStatuses HdmiIn2 { get; private set; }
|
||||
public RoutingOutputPort DmOut { get; private set; }
|
||||
public RoutingOutputPort HdmiLoopOut { get; private set; }
|
||||
|
||||
public override StringFeedback ActiveVideoInputFeedback { get; protected set; }
|
||||
public IntFeedback VideoSourceNumericFeedback { get; protected set; }
|
||||
public IntFeedback AudioSourceNumericFeedback { get; protected set; }
|
||||
public IntFeedback HdmiIn1HdcpCapabilityFeedback { get; protected set; }
|
||||
public IntFeedback HdmiIn2HdcpCapabilityFeedback { get; protected set; }
|
||||
public BoolFeedback Hdmi1VideoSyncFeedback { get; protected set; }
|
||||
public BoolFeedback Hdmi2VideoSyncFeedback { get; protected set; }
|
||||
|
||||
//public override IntFeedback HdcpSupportAllFeedback { get; protected set; }
|
||||
//public override ushort HdcpSupportCapability { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Helps get the "real" inputs, including when in Auto
|
||||
/// </summary>
|
||||
public Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType ActualActiveVideoInput
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Tx.VideoSourceFeedback != eVst.Auto)
|
||||
return Tx.VideoSourceFeedback;
|
||||
else // auto
|
||||
{
|
||||
if (Tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
||||
return eVst.Hdmi1;
|
||||
else if (Tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue)
|
||||
return eVst.Hdmi2;
|
||||
else
|
||||
return eVst.AllDisabled;
|
||||
}
|
||||
}
|
||||
}
|
||||
public RoutingPortCollection<RoutingInputPort> InputPorts
|
||||
{
|
||||
get
|
||||
{
|
||||
return new RoutingPortCollection<RoutingInputPort>
|
||||
{
|
||||
HdmiIn1,
|
||||
HdmiIn2,
|
||||
AnyVideoInput
|
||||
};
|
||||
}
|
||||
}
|
||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
||||
{
|
||||
get
|
||||
{
|
||||
return new RoutingPortCollection<RoutingOutputPort> { DmOut, HdmiLoopOut };
|
||||
}
|
||||
}
|
||||
public DmTx4k202CController(string key, string name, DmTx4kX02CBase tx)
|
||||
: base(key, name, tx)
|
||||
{
|
||||
Tx = tx;
|
||||
|
||||
HdmiIn1 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn1,
|
||||
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this,
|
||||
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[1]));
|
||||
HdmiIn2 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn2,
|
||||
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi2, this,
|
||||
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[2]));
|
||||
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
|
||||
() => ActualActiveVideoInput.ToString());
|
||||
|
||||
|
||||
|
||||
Tx.HdmiInputs[1].InputStreamChange += InputStreamChangeEvent;
|
||||
Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent;
|
||||
Tx.BaseEvent += Tx_BaseEvent;
|
||||
|
||||
VideoSourceNumericFeedback = new IntFeedback(() =>
|
||||
{
|
||||
return (int)Tx.VideoSourceFeedback;
|
||||
});
|
||||
AudioSourceNumericFeedback = new IntFeedback(() =>
|
||||
{
|
||||
return (int)Tx.AudioSourceFeedback;
|
||||
});
|
||||
|
||||
HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability", () =>
|
||||
{
|
||||
return (int)tx.HdmiInputs[1].HdcpCapabilityFeedback;
|
||||
});
|
||||
|
||||
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () =>
|
||||
{
|
||||
return (int)tx.HdmiInputs[2].HdcpCapabilityFeedback;
|
||||
});
|
||||
|
||||
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
||||
|
||||
Hdmi1VideoSyncFeedback = new BoolFeedback(() =>
|
||||
{
|
||||
return (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue;
|
||||
});
|
||||
|
||||
Hdmi2VideoSyncFeedback = new BoolFeedback(() =>
|
||||
{
|
||||
return (bool)tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue;
|
||||
});
|
||||
|
||||
var combinedFuncs = new VideoStatusFuncsWrapper
|
||||
{
|
||||
HdcpActiveFeedbackFunc = () =>
|
||||
(ActualActiveVideoInput == eVst.Hdmi1
|
||||
&& tx.HdmiInputs[1].VideoAttributes.HdcpActiveFeedback.BoolValue)
|
||||
|| (ActualActiveVideoInput == eVst.Hdmi2
|
||||
&& tx.HdmiInputs[2].VideoAttributes.HdcpActiveFeedback.BoolValue),
|
||||
|
||||
HdcpStateFeedbackFunc = () =>
|
||||
{
|
||||
if (ActualActiveVideoInput == eVst.Hdmi1)
|
||||
return tx.HdmiInputs[1].VideoAttributes.HdcpStateFeedback.ToString();
|
||||
if (ActualActiveVideoInput == eVst.Hdmi2)
|
||||
return tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString();
|
||||
return "";
|
||||
},
|
||||
|
||||
VideoResolutionFeedbackFunc = () =>
|
||||
{
|
||||
if (ActualActiveVideoInput == eVst.Hdmi1)
|
||||
return tx.HdmiInputs[1].VideoAttributes.GetVideoResolutionString();
|
||||
if (ActualActiveVideoInput == eVst.Hdmi2)
|
||||
return tx.HdmiInputs[2].VideoAttributes.GetVideoResolutionString();
|
||||
return "";
|
||||
},
|
||||
VideoSyncFeedbackFunc = () =>
|
||||
(ActualActiveVideoInput == eVst.Hdmi1
|
||||
&& tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
||||
|| (ActualActiveVideoInput == eVst.Hdmi2
|
||||
&& tx.HdmiInputs[2].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);
|
||||
HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
eRoutingPortConnectionType.Hdmi, null, this);
|
||||
|
||||
|
||||
AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,
|
||||
AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback,
|
||||
AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback,
|
||||
AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiIn1HdcpCapabilityFeedback, HdmiIn2HdcpCapabilityFeedback,
|
||||
Hdmi1VideoSyncFeedback, Hdmi2VideoSyncFeedback);
|
||||
|
||||
// Set Ports for CEC
|
||||
HdmiIn1.Port = Tx.HdmiInputs[1];
|
||||
HdmiIn2.Port = Tx.HdmiInputs[2];
|
||||
HdmiLoopOut.Port = Tx.HdmiOutput;
|
||||
DmOut.Port = Tx.DmOutput;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override bool CustomActivate()
|
||||
{
|
||||
// Link up all of these damned events to the various RoutingPorts via a helper handler
|
||||
Tx.HdmiInputs[1].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn1, a.EventId);
|
||||
Tx.HdmiInputs[1].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn1, a.EventId);
|
||||
|
||||
Tx.HdmiInputs[2].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn2, a.EventId);
|
||||
Tx.HdmiInputs[2].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn2, a.EventId);
|
||||
|
||||
// Base does register and sets up comm monitoring.
|
||||
return base.CustomActivate();
|
||||
}
|
||||
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
DmTxControllerJoinMap joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||
|
||||
if (Hdmi1VideoSyncFeedback != null)
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
//using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharpPro.DM;
|
||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||
using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
using PepperDash.Essentials.DM.Config;
|
||||
|
||||
namespace PepperDash.Essentials.DM
|
||||
{
|
||||
using eVst = Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType;
|
||||
using eAst = Crestron.SimplSharpPro.DeviceSupport.eX02AudioSourceType;
|
||||
|
||||
public class DmTx4k202CController : DmTxControllerBase, ITxRouting, IHasFeedback,
|
||||
IIROutputPorts, IComPorts
|
||||
{
|
||||
public DmTx4k202C Tx { get; private set; }
|
||||
|
||||
public RoutingInputPortWithVideoStatuses HdmiIn1 { get; private set; }
|
||||
public RoutingInputPortWithVideoStatuses HdmiIn2 { get; private set; }
|
||||
public RoutingOutputPort DmOut { get; private set; }
|
||||
public RoutingOutputPort HdmiLoopOut { get; private set; }
|
||||
|
||||
public override StringFeedback ActiveVideoInputFeedback { get; protected set; }
|
||||
public IntFeedback VideoSourceNumericFeedback { get; protected set; }
|
||||
public IntFeedback AudioSourceNumericFeedback { get; protected set; }
|
||||
public IntFeedback HdmiIn1HdcpCapabilityFeedback { get; protected set; }
|
||||
public IntFeedback HdmiIn2HdcpCapabilityFeedback { get; protected set; }
|
||||
public BoolFeedback Hdmi1VideoSyncFeedback { get; protected set; }
|
||||
public BoolFeedback Hdmi2VideoSyncFeedback { get; protected set; }
|
||||
|
||||
//public override IntFeedback HdcpSupportAllFeedback { get; protected set; }
|
||||
//public override ushort HdcpSupportCapability { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Helps get the "real" inputs, including when in Auto
|
||||
/// </summary>
|
||||
public Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType ActualActiveVideoInput
|
||||
{
|
||||
get
|
||||
{
|
||||
Hdmi1VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]);
|
||||
}
|
||||
if (Hdmi2VideoSyncFeedback != null)
|
||||
if (Tx.VideoSourceFeedback != eVst.Auto)
|
||||
return Tx.VideoSourceFeedback;
|
||||
else // auto
|
||||
{
|
||||
if (Tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
||||
return eVst.Hdmi1;
|
||||
else if (Tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue)
|
||||
return eVst.Hdmi2;
|
||||
else
|
||||
return eVst.AllDisabled;
|
||||
}
|
||||
}
|
||||
}
|
||||
public RoutingPortCollection<RoutingInputPort> InputPorts
|
||||
{
|
||||
get
|
||||
{
|
||||
Hdmi2VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]);
|
||||
}
|
||||
|
||||
LinkDmTxToApi(this, trilist, joinMap, bridge);
|
||||
}
|
||||
|
||||
public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type)
|
||||
{
|
||||
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
|
||||
|
||||
if (type == eRoutingSignalType.Video)
|
||||
{
|
||||
switch (input)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
ExecuteSwitch(eVst.Auto, null, type);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
ExecuteSwitch(HdmiIn1.Selector, null, type);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
ExecuteSwitch(HdmiIn2.Selector, null, type);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
ExecuteSwitch(eVst.AllDisabled, null, type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (type == eRoutingSignalType.Audio)
|
||||
{
|
||||
switch (input)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
ExecuteSwitch(eAst.Auto, null, type);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
ExecuteSwitch(eAst.Hdmi1, null, type);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
ExecuteSwitch(eAst.Hdmi2, null, type);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
ExecuteSwitch(eAst.AllDisabled, null, type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
||||
{
|
||||
if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
||||
Tx.VideoSource = (eVst)inputSelector;
|
||||
if ((signalType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
||||
Tx.AudioSource = (eAst)inputSelector;
|
||||
}
|
||||
|
||||
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||
{
|
||||
Debug.Console(2, "{0} event {1} stream {2}", this.Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
||||
|
||||
if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId)
|
||||
{
|
||||
if (inputStream == Tx.HdmiInputs[1])
|
||||
HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
||||
else if (inputStream == Tx.HdmiInputs[2])
|
||||
HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
||||
}
|
||||
else if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId)
|
||||
{
|
||||
if (inputStream == Tx.HdmiInputs[1])
|
||||
HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
||||
else if (inputStream == Tx.HdmiInputs[2])
|
||||
HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
void Tx_BaseEvent(GenericBase device, BaseEventArgs args)
|
||||
{
|
||||
var id = args.EventId;
|
||||
if (id == EndpointTransmitterBase.VideoSourceFeedbackEventId)
|
||||
{
|
||||
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
||||
VideoSourceNumericFeedback.FireUpdate();
|
||||
ActiveVideoInputFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
// ------------------------------ incomplete -----------------------------------------
|
||||
else if (id == EndpointTransmitterBase.AudioSourceFeedbackEventId)
|
||||
{
|
||||
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
||||
AudioSourceNumericFeedback.FireUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Relays the input stream change to the appropriate RoutingInputPort.
|
||||
/// </summary>
|
||||
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||
{
|
||||
if (eventId == EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
||||
{
|
||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Relays the VideoAttributes change to a RoutingInputPort
|
||||
/// </summary>
|
||||
void ForwardVideoAttributeChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||
{
|
||||
//// LOCATION: Crestron.SimplSharpPro.DM.VideoAttributeEventIds
|
||||
//Debug.Console(2, this, "VideoAttributes_AttributeChange event id={0} from {1}",
|
||||
// args.EventId, (sender as VideoAttributesEnhanced).Owner.GetType());
|
||||
switch (eventId)
|
||||
{
|
||||
case VideoAttributeEventIds.HdcpActiveFeedbackEventId:
|
||||
inputPort.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
||||
break;
|
||||
case VideoAttributeEventIds.HdcpStateFeedbackEventId:
|
||||
inputPort.VideoStatus.HdcpStateFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.HdcpStateFeedback.FireUpdate();
|
||||
break;
|
||||
case VideoAttributeEventIds.HorizontalResolutionFeedbackEventId:
|
||||
case VideoAttributeEventIds.VerticalResolutionFeedbackEventId:
|
||||
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||
break;
|
||||
case VideoAttributeEventIds.FramesPerSecondFeedbackEventId:
|
||||
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#region IIROutputPorts Members
|
||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return Tx.IROutputPorts; } }
|
||||
public int NumberOfIROutputPorts { get { return Tx.NumberOfIROutputPorts; } }
|
||||
#endregion
|
||||
|
||||
#region IComPorts Members
|
||||
public CrestronCollection<ComPort> ComPorts { get { return Tx.ComPorts; } }
|
||||
public int NumberOfComPorts { get { return Tx.NumberOfComPorts; } }
|
||||
#endregion
|
||||
}
|
||||
return new RoutingPortCollection<RoutingInputPort>
|
||||
{
|
||||
HdmiIn1,
|
||||
HdmiIn2,
|
||||
AnyVideoInput
|
||||
};
|
||||
}
|
||||
}
|
||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
||||
{
|
||||
get
|
||||
{
|
||||
return new RoutingPortCollection<RoutingOutputPort> { DmOut, HdmiLoopOut };
|
||||
}
|
||||
}
|
||||
public DmTx4k202CController(string key, string name, DmTx4k202C tx)
|
||||
: base(key, name, tx)
|
||||
{
|
||||
Tx = tx;
|
||||
|
||||
HdmiIn1 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn1,
|
||||
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this,
|
||||
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[1]));
|
||||
HdmiIn2 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn2,
|
||||
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi2, this,
|
||||
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[2]));
|
||||
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
|
||||
() => ActualActiveVideoInput.ToString());
|
||||
|
||||
|
||||
|
||||
Tx.HdmiInputs[1].InputStreamChange += InputStreamChangeEvent;
|
||||
Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent;
|
||||
Tx.BaseEvent += Tx_BaseEvent;
|
||||
|
||||
VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback);
|
||||
|
||||
AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.AudioSourceFeedback);
|
||||
|
||||
HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability", () => (int)tx.HdmiInputs[1].HdcpCapabilityFeedback);
|
||||
|
||||
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
||||
|
||||
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
||||
|
||||
Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue);
|
||||
|
||||
Hdmi2VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue);
|
||||
|
||||
var combinedFuncs = new VideoStatusFuncsWrapper
|
||||
{
|
||||
HdcpActiveFeedbackFunc = () =>
|
||||
(ActualActiveVideoInput == eVst.Hdmi1
|
||||
&& tx.HdmiInputs[1].VideoAttributes.HdcpActiveFeedback.BoolValue)
|
||||
|| (ActualActiveVideoInput == eVst.Hdmi2
|
||||
&& tx.HdmiInputs[2].VideoAttributes.HdcpActiveFeedback.BoolValue),
|
||||
|
||||
HdcpStateFeedbackFunc = () =>
|
||||
{
|
||||
if (ActualActiveVideoInput == eVst.Hdmi1)
|
||||
return tx.HdmiInputs[1].VideoAttributes.HdcpStateFeedback.ToString();
|
||||
if (ActualActiveVideoInput == eVst.Hdmi2)
|
||||
return tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString();
|
||||
return "";
|
||||
},
|
||||
|
||||
VideoResolutionFeedbackFunc = () =>
|
||||
{
|
||||
if (ActualActiveVideoInput == eVst.Hdmi1)
|
||||
return tx.HdmiInputs[1].VideoAttributes.GetVideoResolutionString();
|
||||
if (ActualActiveVideoInput == eVst.Hdmi2)
|
||||
return tx.HdmiInputs[2].VideoAttributes.GetVideoResolutionString();
|
||||
return "";
|
||||
},
|
||||
VideoSyncFeedbackFunc = () =>
|
||||
(ActualActiveVideoInput == eVst.Hdmi1
|
||||
&& tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
||||
|| (ActualActiveVideoInput == eVst.Hdmi2
|
||||
&& tx.HdmiInputs[2].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);
|
||||
HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
eRoutingPortConnectionType.Hdmi, null, this);
|
||||
|
||||
|
||||
AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,
|
||||
AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback,
|
||||
AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback,
|
||||
AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiIn1HdcpCapabilityFeedback, HdmiIn2HdcpCapabilityFeedback,
|
||||
Hdmi1VideoSyncFeedback, Hdmi2VideoSyncFeedback);
|
||||
|
||||
// Set Ports for CEC
|
||||
HdmiIn1.Port = Tx.HdmiInputs[1];
|
||||
HdmiIn2.Port = Tx.HdmiInputs[2];
|
||||
HdmiLoopOut.Port = Tx.HdmiOutput;
|
||||
DmOut.Port = Tx.DmOutput;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override bool CustomActivate()
|
||||
{
|
||||
// Link up all of these damned events to the various RoutingPorts via a helper handler
|
||||
Tx.HdmiInputs[1].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn1, a.EventId);
|
||||
Tx.HdmiInputs[1].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn1, a.EventId);
|
||||
|
||||
Tx.HdmiInputs[2].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn2, a.EventId);
|
||||
Tx.HdmiInputs[2].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn2, a.EventId);
|
||||
|
||||
// Base does register and sets up comm monitoring.
|
||||
return base.CustomActivate();
|
||||
}
|
||||
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
var joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||
|
||||
if (Hdmi1VideoSyncFeedback != null)
|
||||
{
|
||||
Hdmi1VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]);
|
||||
}
|
||||
if (Hdmi2VideoSyncFeedback != null)
|
||||
{
|
||||
Hdmi2VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]);
|
||||
}
|
||||
|
||||
LinkDmTxToApi(this, trilist, joinMap, bridge);
|
||||
}
|
||||
|
||||
public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type)
|
||||
{
|
||||
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case eRoutingSignalType.Video:
|
||||
switch (input)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
ExecuteSwitch(eVst.Auto, null, type);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
ExecuteSwitch(HdmiIn1.Selector, null, type);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
ExecuteSwitch(HdmiIn2.Selector, null, type);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
ExecuteSwitch(eVst.AllDisabled, null, type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case eRoutingSignalType.Audio:
|
||||
switch (input)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
ExecuteSwitch(eAst.Auto, null, type);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
ExecuteSwitch(eAst.Hdmi1, null, type);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
ExecuteSwitch(eAst.Hdmi2, null, type);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
ExecuteSwitch(eAst.AllDisabled, null, type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
||||
{
|
||||
if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
||||
Tx.VideoSource = (eVst)inputSelector;
|
||||
if ((signalType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
||||
Tx.AudioSource = (eAst)inputSelector;
|
||||
}
|
||||
|
||||
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||
{
|
||||
Debug.Console(2, "{0} event {1} stream {2}", this.Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
||||
|
||||
switch (args.EventId)
|
||||
{
|
||||
case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId:
|
||||
if (inputStream == Tx.HdmiInputs[1]) HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
||||
if (inputStream == Tx.HdmiInputs[2]) HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId:
|
||||
if (inputStream == Tx.HdmiInputs[1]) HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
||||
if (inputStream == Tx.HdmiInputs[2]) HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||
if (inputStream == Tx.HdmiInputs[1]) Hdmi1VideoSyncFeedback.FireUpdate();
|
||||
if (inputStream == Tx.HdmiInputs[2]) Hdmi2VideoSyncFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Tx_BaseEvent(GenericBase device, BaseEventArgs args)
|
||||
{
|
||||
var id = args.EventId;
|
||||
Debug.Console(2, this, "EventId {0}", args.EventId);
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case EndpointTransmitterBase.VideoSourceFeedbackEventId:
|
||||
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
||||
ActiveVideoInputFeedback.FireUpdate();
|
||||
VideoSourceNumericFeedback.FireUpdate();
|
||||
ActiveVideoInputFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointTransmitterBase.AudioSourceFeedbackEventId:
|
||||
Debug.Console(2, this, " Audio Source : {0}", Tx.AudioSourceFeedback);
|
||||
AudioSourceNumericFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Relays the input stream change to the appropriate RoutingInputPort.
|
||||
/// </summary>
|
||||
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||
{
|
||||
if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
||||
{
|
||||
return;
|
||||
}
|
||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Relays the VideoAttributes change to a RoutingInputPort
|
||||
/// </summary>
|
||||
void ForwardVideoAttributeChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||
{
|
||||
//// LOCATION: Crestron.SimplSharpPro.DM.VideoAttributeEventIds
|
||||
//Debug.Console(2, this, "VideoAttributes_AttributeChange event id={0} from {1}",
|
||||
// args.EventId, (sender as VideoAttributesEnhanced).Owner.GetType());
|
||||
switch (eventId)
|
||||
{
|
||||
case VideoAttributeEventIds.HdcpActiveFeedbackEventId:
|
||||
inputPort.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
||||
break;
|
||||
case VideoAttributeEventIds.HdcpStateFeedbackEventId:
|
||||
inputPort.VideoStatus.HdcpStateFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.HdcpStateFeedback.FireUpdate();
|
||||
break;
|
||||
case VideoAttributeEventIds.HorizontalResolutionFeedbackEventId:
|
||||
case VideoAttributeEventIds.VerticalResolutionFeedbackEventId:
|
||||
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||
break;
|
||||
case VideoAttributeEventIds.FramesPerSecondFeedbackEventId:
|
||||
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#region IIROutputPorts Members
|
||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return Tx.IROutputPorts; } }
|
||||
public int NumberOfIROutputPorts { get { return Tx.NumberOfIROutputPorts; } }
|
||||
#endregion
|
||||
|
||||
#region IComPorts Members
|
||||
public CrestronCollection<ComPort> ComPorts { get { return Tx.ComPorts; } }
|
||||
public int NumberOfComPorts { get { return Tx.NumberOfComPorts; } }
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -105,44 +105,24 @@ namespace PepperDash.Essentials.DM
|
||||
() => ActualActiveVideoInput.ToString());
|
||||
|
||||
Tx.HdmiInputs[1].InputStreamChange += InputStreamChangeEvent;
|
||||
Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent;
|
||||
Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent;
|
||||
Tx.VgaInput.InputStreamChange += VgaInputOnInputStreamChange;
|
||||
Tx.BaseEvent += Tx_BaseEvent;
|
||||
|
||||
VideoSourceNumericFeedback = new IntFeedback(() =>
|
||||
{
|
||||
return (int)Tx.VideoSourceFeedback;
|
||||
});
|
||||
AudioSourceNumericFeedback = new IntFeedback(() =>
|
||||
{
|
||||
return (int)Tx.AudioSourceFeedback;
|
||||
});
|
||||
VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback);
|
||||
AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.AudioSourceFeedback);
|
||||
|
||||
HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability", () =>
|
||||
{
|
||||
return (int)tx.HdmiInputs[1].HdcpCapabilityFeedback;
|
||||
});
|
||||
HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability", () => (int)tx.HdmiInputs[1].HdcpCapabilityFeedback);
|
||||
|
||||
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () =>
|
||||
{
|
||||
return (int)tx.HdmiInputs[2].HdcpCapabilityFeedback;
|
||||
});
|
||||
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
||||
|
||||
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
||||
|
||||
Hdmi1VideoSyncFeedback = new BoolFeedback(() =>
|
||||
{
|
||||
return (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue;
|
||||
});
|
||||
Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue);
|
||||
|
||||
Hdmi2VideoSyncFeedback = new BoolFeedback(() =>
|
||||
{
|
||||
return (bool)tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue;
|
||||
});
|
||||
Hdmi2VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue);
|
||||
|
||||
VgaVideoSyncFeedback = new BoolFeedback(() =>
|
||||
{
|
||||
return (bool)tx.VgaInput.SyncDetectedFeedback.BoolValue;
|
||||
});
|
||||
VgaVideoSyncFeedback = new BoolFeedback(() => (bool)tx.VgaInput.SyncDetectedFeedback.BoolValue);
|
||||
|
||||
FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled);
|
||||
|
||||
@@ -164,9 +144,7 @@ namespace PepperDash.Essentials.DM
|
||||
{
|
||||
if (ActualActiveVideoInput == eVst.Hdmi1)
|
||||
return tx.HdmiInputs[1].VideoAttributes.HdcpStateFeedback.ToString();
|
||||
if (ActualActiveVideoInput == eVst.Hdmi2)
|
||||
return tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString();
|
||||
return "";
|
||||
return ActualActiveVideoInput == eVst.Hdmi2 ? tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString() : "";
|
||||
},
|
||||
|
||||
VideoResolutionFeedbackFunc = () =>
|
||||
@@ -175,9 +153,7 @@ namespace PepperDash.Essentials.DM
|
||||
return tx.HdmiInputs[1].VideoAttributes.GetVideoResolutionString();
|
||||
if (ActualActiveVideoInput == eVst.Hdmi2)
|
||||
return tx.HdmiInputs[2].VideoAttributes.GetVideoResolutionString();
|
||||
if (ActualActiveVideoInput == eVst.Vga)
|
||||
return tx.VgaInput.VideoAttributes.GetVideoResolutionString();
|
||||
return "";
|
||||
return ActualActiveVideoInput == eVst.Vga ? tx.VgaInput.VideoAttributes.GetVideoResolutionString() : "";
|
||||
},
|
||||
VideoSyncFeedbackFunc = () =>
|
||||
(ActualActiveVideoInput == eVst.Hdmi1
|
||||
@@ -209,20 +185,34 @@ namespace PepperDash.Essentials.DM
|
||||
HdmiIn2.Port = Tx.HdmiInputs[2];
|
||||
HdmiLoopOut.Port = Tx.HdmiOutput;
|
||||
DmOut.Port = Tx.DmOutput;
|
||||
}
|
||||
}
|
||||
|
||||
void VgaInputOnInputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||
{
|
||||
switch (args.EventId)
|
||||
{
|
||||
case EndpointInputStreamEventIds.FreeRunFeedbackEventId:
|
||||
FreeRunEnabledFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||
VgaVideoSyncFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void VideoControls_ControlChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args)
|
||||
{
|
||||
var id = args.EventId;
|
||||
Debug.Console(2, this, "EventId {0}", args.EventId);
|
||||
|
||||
if (id == VideoControlsEventIds.BrightnessFeedbackEventId)
|
||||
{
|
||||
VgaBrightnessFeedback.FireUpdate();
|
||||
}
|
||||
else if (id == VideoControlsEventIds.ContrastFeedbackEventId)
|
||||
{
|
||||
VgaContrastFeedback.FireUpdate();
|
||||
switch (id)
|
||||
{
|
||||
case VideoControlsEventIds.BrightnessFeedbackEventId:
|
||||
VgaBrightnessFeedback.FireUpdate();
|
||||
break;
|
||||
case VideoControlsEventIds.ContrastFeedbackEventId:
|
||||
VgaContrastFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,7 +236,7 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
DmTxControllerJoinMap joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||
var joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||
|
||||
if (Hdmi1VideoSyncFeedback != null)
|
||||
{
|
||||
@@ -268,18 +258,11 @@ namespace PepperDash.Essentials.DM
|
||||
/// Enables or disables free run
|
||||
/// </summary>
|
||||
/// <param name="enable"></param>
|
||||
public void SetFreeRunEnabled(bool enable)
|
||||
{
|
||||
if (enable)
|
||||
{
|
||||
Tx.VgaInput.FreeRun = eDmFreeRunSetting.Enabled;
|
||||
}
|
||||
else
|
||||
{
|
||||
Tx.VgaInput.FreeRun = eDmFreeRunSetting.Disabled;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetFreeRunEnabled(bool enable)
|
||||
{
|
||||
Tx.VgaInput.FreeRun = enable ? eDmFreeRunSetting.Enabled : eDmFreeRunSetting.Disabled;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the VGA brightness level
|
||||
/// </summary>
|
||||
@@ -300,74 +283,75 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
|
||||
|
||||
public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type)
|
||||
{
|
||||
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
|
||||
|
||||
if (type == eRoutingSignalType.Video)
|
||||
{
|
||||
switch (input)
|
||||
{
|
||||
case 0:
|
||||
public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type)
|
||||
{
|
||||
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case eRoutingSignalType.Video:
|
||||
switch (input)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
ExecuteSwitch(eVst.Auto, null, type);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
case 1:
|
||||
{
|
||||
ExecuteSwitch(HdmiIn1.Selector, null, type);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
case 2:
|
||||
{
|
||||
ExecuteSwitch(HdmiIn2.Selector, null, type);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
case 3:
|
||||
{
|
||||
ExecuteSwitch(VgaIn.Selector, null, type);
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
case 4:
|
||||
{
|
||||
ExecuteSwitch(eVst.AllDisabled, null, type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (type == eRoutingSignalType.Audio)
|
||||
{
|
||||
switch (input)
|
||||
{
|
||||
case 0:
|
||||
}
|
||||
break;
|
||||
case eRoutingSignalType.Audio:
|
||||
switch (input)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
ExecuteSwitch(eAst.Auto, null, type);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
case 1:
|
||||
{
|
||||
ExecuteSwitch(eAst.Hdmi1, null, type);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
case 2:
|
||||
{
|
||||
ExecuteSwitch(eAst.Hdmi2, null, type);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
case 3:
|
||||
{
|
||||
ExecuteSwitch(eAst.AudioIn, null, type);
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
case 4:
|
||||
{
|
||||
ExecuteSwitch(eAst.AllDisabled, null, type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
||||
{
|
||||
if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
||||
@@ -376,54 +360,52 @@ namespace PepperDash.Essentials.DM
|
||||
Tx.AudioSource = (eAst)inputSelector;
|
||||
}
|
||||
|
||||
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||
{
|
||||
Debug.Console(2, "{0} event {1} stream {2}", this.Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
||||
|
||||
if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId)
|
||||
{
|
||||
if (inputStream == Tx.HdmiInputs[1])
|
||||
HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
||||
else if (inputStream == Tx.HdmiInputs[2])
|
||||
HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
||||
}
|
||||
else if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId)
|
||||
{
|
||||
if (inputStream == Tx.HdmiInputs[1])
|
||||
HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
||||
else if (inputStream == Tx.HdmiInputs[2])
|
||||
HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
void Tx_BaseEvent(GenericBase device, BaseEventArgs args)
|
||||
{
|
||||
var id = args.EventId;
|
||||
if (id == EndpointTransmitterBase.VideoSourceFeedbackEventId)
|
||||
{
|
||||
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
||||
VideoSourceNumericFeedback.FireUpdate();
|
||||
ActiveVideoInputFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
// ------------------------------ incomplete -----------------------------------------
|
||||
else if (id == EndpointTransmitterBase.AudioSourceFeedbackEventId)
|
||||
{
|
||||
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
||||
AudioSourceNumericFeedback.FireUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||
{
|
||||
Debug.Console(2, "{0} event {1} stream {2}", this.Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
||||
|
||||
switch (args.EventId)
|
||||
{
|
||||
case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId:
|
||||
if (inputStream == Tx.HdmiInputs[1]) HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
||||
if (inputStream == Tx.HdmiInputs[2]) HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId:
|
||||
if (inputStream == Tx.HdmiInputs[1]) HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
||||
if (inputStream == Tx.HdmiInputs[2]) HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||
if (inputStream == Tx.HdmiInputs[1]) Hdmi1VideoSyncFeedback.FireUpdate();
|
||||
if (inputStream == Tx.HdmiInputs[2]) Hdmi2VideoSyncFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Tx_BaseEvent(GenericBase device, BaseEventArgs args)
|
||||
{
|
||||
var id = args.EventId;
|
||||
switch (id)
|
||||
{
|
||||
case EndpointTransmitterBase.VideoSourceFeedbackEventId:
|
||||
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
||||
VideoSourceNumericFeedback.FireUpdate();
|
||||
ActiveVideoInputFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointTransmitterBase.AudioSourceFeedbackEventId:
|
||||
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
||||
AudioSourceNumericFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Relays the input stream change to the appropriate RoutingInputPort.
|
||||
/// </summary>
|
||||
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||
{
|
||||
if (eventId == EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
||||
{
|
||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
}
|
||||
{
|
||||
if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId) return;
|
||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -93,9 +93,9 @@ namespace PepperDash.Essentials.DM
|
||||
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
|
||||
() => ActualActiveVideoInput.ToString());
|
||||
|
||||
Tx.HdmiInput.InputStreamChange += new EndpointInputStreamChangeEventHandler(InputStreamChangeEvent);
|
||||
Tx.HdmiInput.InputStreamChange += InputStreamChangeEvent;
|
||||
Tx.BaseEvent += Tx_BaseEvent;
|
||||
Tx.OnlineStatusChange += new OnlineStatusChangeEventHandler(Tx_OnlineStatusChange);
|
||||
Tx.OnlineStatusChange += Tx_OnlineStatusChange;
|
||||
|
||||
|
||||
HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () =>
|
||||
@@ -108,10 +108,7 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
HdcpSupportCapability = eHdcpCapabilityType.HdcpAutoSupport;
|
||||
|
||||
HdmiVideoSyncFeedback = new BoolFeedback(() =>
|
||||
{
|
||||
return (bool)tx.HdmiInput.SyncDetectedFeedback.BoolValue;
|
||||
});
|
||||
HdmiVideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInput.SyncDetectedFeedback.BoolValue);
|
||||
|
||||
|
||||
var combinedFuncs = new VideoStatusFuncsWrapper
|
||||
@@ -120,20 +117,13 @@ namespace PepperDash.Essentials.DM
|
||||
(ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital
|
||||
&& tx.HdmiInput.VideoAttributes.HdcpActiveFeedback.BoolValue),
|
||||
|
||||
HdcpStateFeedbackFunc = () =>
|
||||
{
|
||||
if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital)
|
||||
return tx.HdmiInput.VideoAttributes.HdcpStateFeedback.ToString();
|
||||
return "";
|
||||
},
|
||||
HdcpStateFeedbackFunc = () => ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital ? tx.HdmiInput.VideoAttributes.HdcpStateFeedback.ToString() : "",
|
||||
|
||||
VideoResolutionFeedbackFunc = () =>
|
||||
{
|
||||
if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital)
|
||||
return tx.HdmiInput.VideoAttributes.GetVideoResolutionString();
|
||||
if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Analog)
|
||||
return tx.VgaInput.VideoAttributes.GetVideoResolutionString();
|
||||
return "";
|
||||
return ActualActiveVideoInput == DmTx200Base.eSourceSelection.Analog ? tx.VgaInput.VideoAttributes.GetVideoResolutionString() : "";
|
||||
},
|
||||
VideoSyncFeedbackFunc = () =>
|
||||
(ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital
|
||||
@@ -180,7 +170,7 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
DmTxControllerJoinMap joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||
var joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||
|
||||
if (HdmiVideoSyncFeedback != null)
|
||||
{
|
||||
@@ -196,14 +186,7 @@ namespace PepperDash.Essentials.DM
|
||||
/// <param name="enable"></param>
|
||||
public void SetFreeRunEnabled(bool enable)
|
||||
{
|
||||
if (enable)
|
||||
{
|
||||
Tx.VgaInput.FreeRun = eDmFreeRunSetting.Enabled;
|
||||
}
|
||||
else
|
||||
{
|
||||
Tx.VgaInput.FreeRun = eDmFreeRunSetting.Disabled;
|
||||
}
|
||||
Tx.VgaInput.FreeRun = enable ? eDmFreeRunSetting.Enabled : eDmFreeRunSetting.Disabled;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -230,16 +213,15 @@ namespace PepperDash.Essentials.DM
|
||||
var id = args.EventId;
|
||||
Debug.Console(2, this, "EventId {0}", args.EventId);
|
||||
|
||||
if (id == EndpointTransmitterBase.VideoSourceFeedbackEventId)
|
||||
switch (id)
|
||||
{
|
||||
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
||||
ActiveVideoInputFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
// ------------------------------ incomplete -----------------------------------------
|
||||
else if (id == EndpointTransmitterBase.AudioSourceFeedbackEventId)
|
||||
{
|
||||
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
||||
case EndpointTransmitterBase.VideoSourceFeedbackEventId:
|
||||
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
||||
ActiveVideoInputFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointTransmitterBase.AudioSourceFeedbackEventId:
|
||||
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,13 +229,17 @@ namespace PepperDash.Essentials.DM
|
||||
{
|
||||
Debug.Console(2, "{0} event {1} stream {2}", this.Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
||||
|
||||
if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId)
|
||||
switch (args.EventId)
|
||||
{
|
||||
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
||||
}
|
||||
else if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId)
|
||||
{
|
||||
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
||||
case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId:
|
||||
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId:
|
||||
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||
HdmiVideoSyncFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -262,11 +248,9 @@ namespace PepperDash.Essentials.DM
|
||||
/// </summary>
|
||||
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||
{
|
||||
if (eventId == EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
||||
{
|
||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
}
|
||||
if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId) return;
|
||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -0,0 +1,359 @@
|
||||
using Crestron.SimplSharpPro;
|
||||
//using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharpPro.DM;
|
||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||
using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
|
||||
namespace PepperDash.Essentials.DM
|
||||
{
|
||||
using eVst = eX02VideoSourceType;
|
||||
using eAst = eX02AudioSourceType;
|
||||
|
||||
public class DmTx4kz202CController : DmTxControllerBase, ITxRouting,
|
||||
IIROutputPorts, IComPorts
|
||||
{
|
||||
public DmTx4kz202C Tx { get; private set; }
|
||||
|
||||
public RoutingInputPortWithVideoStatuses HdmiIn1 { get; private set; }
|
||||
public RoutingInputPortWithVideoStatuses HdmiIn2 { get; private set; }
|
||||
public RoutingOutputPort DmOut { get; private set; }
|
||||
public RoutingOutputPort HdmiLoopOut { get; private set; }
|
||||
|
||||
public override StringFeedback ActiveVideoInputFeedback { get; protected set; }
|
||||
public IntFeedback VideoSourceNumericFeedback { get; protected set; }
|
||||
public IntFeedback AudioSourceNumericFeedback { get; protected set; }
|
||||
public IntFeedback HdmiIn1HdcpCapabilityFeedback { get; protected set; }
|
||||
public IntFeedback HdmiIn2HdcpCapabilityFeedback { get; protected set; }
|
||||
public BoolFeedback Hdmi1VideoSyncFeedback { get; protected set; }
|
||||
public BoolFeedback Hdmi2VideoSyncFeedback { get; protected set; }
|
||||
|
||||
//public override IntFeedback HdcpSupportAllFeedback { get; protected set; }
|
||||
//public override ushort HdcpSupportCapability { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Helps get the "real" inputs, including when in Auto
|
||||
/// </summary>
|
||||
public eX02VideoSourceType ActualActiveVideoInput
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Tx.VideoSourceFeedback != eVst.Auto)
|
||||
return Tx.VideoSourceFeedback;
|
||||
|
||||
if (Tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
||||
return eVst.Hdmi1;
|
||||
|
||||
return Tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue ? eVst.Hdmi2 : eVst.AllDisabled;
|
||||
}
|
||||
}
|
||||
public RoutingPortCollection<RoutingInputPort> InputPorts
|
||||
{
|
||||
get
|
||||
{
|
||||
return new RoutingPortCollection<RoutingInputPort>
|
||||
{
|
||||
HdmiIn1,
|
||||
HdmiIn2,
|
||||
AnyVideoInput
|
||||
};
|
||||
}
|
||||
}
|
||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
||||
{
|
||||
get
|
||||
{
|
||||
return new RoutingPortCollection<RoutingOutputPort> { DmOut, HdmiLoopOut };
|
||||
}
|
||||
}
|
||||
public DmTx4kz202CController(string key, string name, DmTx4kz202C tx)
|
||||
: base(key, name, tx)
|
||||
{
|
||||
Tx = tx;
|
||||
|
||||
HdmiIn1 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn1,
|
||||
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this,
|
||||
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[1]));
|
||||
HdmiIn2 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn2,
|
||||
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi2, this,
|
||||
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[2]));
|
||||
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
|
||||
() => ActualActiveVideoInput.ToString());
|
||||
|
||||
|
||||
|
||||
Tx.HdmiInputs[1].InputStreamChange += InputStreamChangeEvent;
|
||||
Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent;
|
||||
Tx.BaseEvent += Tx_BaseEvent;
|
||||
|
||||
VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback);
|
||||
|
||||
//Return VideoSourceFeedback here as DM-TX-4KZ-202-C does not support audio breakaway
|
||||
AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback);
|
||||
|
||||
HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability", () => (int)tx.HdmiInputs[1].HdcpCapabilityFeedback);
|
||||
|
||||
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
||||
|
||||
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
||||
|
||||
Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue);
|
||||
|
||||
Hdmi2VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue);
|
||||
|
||||
var combinedFuncs = new VideoStatusFuncsWrapper
|
||||
{
|
||||
HdcpActiveFeedbackFunc = () =>
|
||||
(ActualActiveVideoInput == eVst.Hdmi1
|
||||
&& tx.HdmiInputs[1].VideoAttributes.HdcpActiveFeedback.BoolValue)
|
||||
|| (ActualActiveVideoInput == eVst.Hdmi2
|
||||
&& tx.HdmiInputs[2].VideoAttributes.HdcpActiveFeedback.BoolValue),
|
||||
|
||||
HdcpStateFeedbackFunc = () =>
|
||||
{
|
||||
if (ActualActiveVideoInput == eVst.Hdmi1)
|
||||
return tx.HdmiInputs[1].VideoAttributes.HdcpStateFeedback.ToString();
|
||||
if (ActualActiveVideoInput == eVst.Hdmi2)
|
||||
return tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString();
|
||||
return "";
|
||||
},
|
||||
|
||||
VideoResolutionFeedbackFunc = () =>
|
||||
{
|
||||
if (ActualActiveVideoInput == eVst.Hdmi1)
|
||||
return tx.HdmiInputs[1].VideoAttributes.GetVideoResolutionString();
|
||||
if (ActualActiveVideoInput == eVst.Hdmi2)
|
||||
return tx.HdmiInputs[2].VideoAttributes.GetVideoResolutionString();
|
||||
return "";
|
||||
},
|
||||
VideoSyncFeedbackFunc = () =>
|
||||
(ActualActiveVideoInput == eVst.Hdmi1
|
||||
&& tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
||||
|| (ActualActiveVideoInput == eVst.Hdmi2
|
||||
&& tx.HdmiInputs[2].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);
|
||||
HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
eRoutingPortConnectionType.Hdmi, null, this);
|
||||
|
||||
|
||||
AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,
|
||||
AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback,
|
||||
AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback,
|
||||
AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiIn1HdcpCapabilityFeedback, HdmiIn2HdcpCapabilityFeedback,
|
||||
Hdmi1VideoSyncFeedback, Hdmi2VideoSyncFeedback);
|
||||
|
||||
// Set Ports for CEC
|
||||
HdmiIn1.Port = Tx.HdmiInputs[1];
|
||||
HdmiIn2.Port = Tx.HdmiInputs[2];
|
||||
HdmiLoopOut.Port = Tx.HdmiOutput;
|
||||
DmOut.Port = Tx.DmOutput;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override bool CustomActivate()
|
||||
{
|
||||
// Link up all of these damned events to the various RoutingPorts via a helper handler
|
||||
Tx.HdmiInputs[1].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn1, a.EventId);
|
||||
Tx.HdmiInputs[1].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn1, a.EventId);
|
||||
|
||||
Tx.HdmiInputs[2].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn2, a.EventId);
|
||||
Tx.HdmiInputs[2].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn2, a.EventId);
|
||||
|
||||
// Base does register and sets up comm monitoring.
|
||||
return base.CustomActivate();
|
||||
}
|
||||
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
var joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||
|
||||
if (Hdmi1VideoSyncFeedback != null)
|
||||
{
|
||||
Hdmi1VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]);
|
||||
}
|
||||
if (Hdmi2VideoSyncFeedback != null)
|
||||
{
|
||||
Hdmi2VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]);
|
||||
}
|
||||
|
||||
LinkDmTxToApi(this, trilist, joinMap, bridge);
|
||||
}
|
||||
|
||||
public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type)
|
||||
{
|
||||
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case eRoutingSignalType.Video:
|
||||
switch (input)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
ExecuteSwitch(eVst.Auto, null, type);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
ExecuteSwitch(HdmiIn1.Selector, null, type);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
ExecuteSwitch(HdmiIn2.Selector, null, type);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
ExecuteSwitch(eVst.AllDisabled, null, type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case eRoutingSignalType.Audio:
|
||||
switch (input)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
ExecuteSwitch(eAst.Auto, null, type);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
ExecuteSwitch(eAst.Hdmi1, null, type);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
ExecuteSwitch(eAst.Hdmi2, null, type);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
ExecuteSwitch(eAst.AllDisabled, null, type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
||||
{
|
||||
if ((signalType & eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
||||
Tx.VideoSource = (eVst)inputSelector;
|
||||
if(((signalType & eRoutingSignalType.Audio) == eRoutingSignalType.Audio))
|
||||
Debug.Console(2, this, "Unable to execute audio-only switch for tx {0}", Key);
|
||||
}
|
||||
|
||||
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||
{
|
||||
Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
||||
|
||||
switch (args.EventId)
|
||||
{
|
||||
case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId:
|
||||
if (inputStream == Tx.HdmiInputs[1]) HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
||||
if (inputStream == Tx.HdmiInputs[2]) HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId:
|
||||
if (inputStream == Tx.HdmiInputs[1]) HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
||||
if (inputStream == Tx.HdmiInputs[2]) HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||
if (inputStream == Tx.HdmiInputs[1]) Hdmi1VideoSyncFeedback.FireUpdate();
|
||||
if (inputStream == Tx.HdmiInputs[2]) Hdmi2VideoSyncFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Tx_BaseEvent(GenericBase device, BaseEventArgs args)
|
||||
{
|
||||
var id = args.EventId;
|
||||
Debug.Console(2, this, "EventId {0}", args.EventId);
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case EndpointTransmitterBase.VideoSourceFeedbackEventId:
|
||||
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
||||
ActiveVideoInputFeedback.FireUpdate();
|
||||
VideoSourceNumericFeedback.FireUpdate();
|
||||
AudioSourceNumericFeedback.FireUpdate();
|
||||
ActiveVideoInputFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointTransmitterBase.AudioSourceFeedbackEventId:
|
||||
Debug.Console(2, this, " Audio Source : {0}", Tx.AudioSourceFeedback);
|
||||
AudioSourceNumericFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Relays the input stream change to the appropriate RoutingInputPort.
|
||||
/// </summary>
|
||||
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||
{
|
||||
if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
||||
{
|
||||
return;
|
||||
}
|
||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Relays the VideoAttributes change to a RoutingInputPort
|
||||
/// </summary>
|
||||
void ForwardVideoAttributeChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||
{
|
||||
//// LOCATION: Crestron.SimplSharpPro.DM.VideoAttributeEventIds
|
||||
//Debug.Console(2, this, "VideoAttributes_AttributeChange event id={0} from {1}",
|
||||
// args.EventId, (sender as VideoAttributesEnhanced).Owner.GetType());
|
||||
switch (eventId)
|
||||
{
|
||||
case VideoAttributeEventIds.HdcpActiveFeedbackEventId:
|
||||
inputPort.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
||||
break;
|
||||
case VideoAttributeEventIds.HdcpStateFeedbackEventId:
|
||||
inputPort.VideoStatus.HdcpStateFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.HdcpStateFeedback.FireUpdate();
|
||||
break;
|
||||
case VideoAttributeEventIds.HorizontalResolutionFeedbackEventId:
|
||||
case VideoAttributeEventIds.VerticalResolutionFeedbackEventId:
|
||||
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||
break;
|
||||
case VideoAttributeEventIds.FramesPerSecondFeedbackEventId:
|
||||
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#region IIROutputPorts Members
|
||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return Tx.IROutputPorts; } }
|
||||
public int NumberOfIROutputPorts { get { return Tx.NumberOfIROutputPorts; } }
|
||||
#endregion
|
||||
|
||||
#region IComPorts Members
|
||||
public CrestronCollection<ComPort> ComPorts { get { return Tx.ComPorts; } }
|
||||
public int NumberOfComPorts { get { return Tx.NumberOfComPorts; } }
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro;
|
||||
//using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharpPro.DM;
|
||||
@@ -13,14 +8,13 @@ using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
using PepperDash.Essentials.DM.Config;
|
||||
|
||||
namespace PepperDash.Essentials.DM
|
||||
{
|
||||
using eVst = Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType;
|
||||
using eAst = Crestron.SimplSharpPro.DeviceSupport.eX02AudioSourceType;
|
||||
using eVst = eX02VideoSourceType;
|
||||
using eAst = eX02AudioSourceType;
|
||||
|
||||
public class DmTx4kz302CController : DmTxControllerBase, ITxRouting, IHasFeedback,
|
||||
public class DmTx4kz302CController : DmTxControllerBase, ITxRouting,
|
||||
IIROutputPorts, IComPorts
|
||||
{
|
||||
public DmTx4kz302C Tx { get; private set; }
|
||||
@@ -46,23 +40,18 @@ namespace PepperDash.Essentials.DM
|
||||
/// <summary>
|
||||
/// Helps get the "real" inputs, including when in Auto
|
||||
/// </summary>
|
||||
public Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType ActualActiveVideoInput
|
||||
public eX02VideoSourceType ActualActiveVideoInput
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Tx.VideoSourceFeedback != eVst.Auto)
|
||||
return Tx.VideoSourceFeedback;
|
||||
else // auto
|
||||
{
|
||||
if (Tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
||||
return eVst.Hdmi1;
|
||||
else if (Tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue)
|
||||
return eVst.Hdmi2;
|
||||
else if (Tx.DisplayPortInput.SyncDetectedFeedback.BoolValue)
|
||||
return eVst.Vga;
|
||||
else
|
||||
return eVst.AllDisabled;
|
||||
}
|
||||
if (Tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
||||
return eVst.Hdmi1;
|
||||
if (Tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue)
|
||||
return eVst.Hdmi2;
|
||||
|
||||
return Tx.DisplayPortInput.SyncDetectedFeedback.BoolValue ? eVst.Vga : eVst.AllDisabled;
|
||||
}
|
||||
}
|
||||
public RoutingPortCollection<RoutingInputPort> InputPorts
|
||||
@@ -104,43 +93,23 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
Tx.HdmiInputs[1].InputStreamChange += InputStreamChangeEvent;
|
||||
Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent;
|
||||
Tx.DisplayPortInput.InputStreamChange += DisplayPortInputStreamChange;
|
||||
Tx.BaseEvent += Tx_BaseEvent;
|
||||
|
||||
VideoSourceNumericFeedback = new IntFeedback(() =>
|
||||
{
|
||||
return (int)Tx.VideoSourceFeedback;
|
||||
});
|
||||
AudioSourceNumericFeedback = new IntFeedback(() =>
|
||||
{
|
||||
return (int)Tx.AudioSourceFeedback;
|
||||
});
|
||||
VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback);
|
||||
AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback);
|
||||
|
||||
HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability", () =>
|
||||
{
|
||||
return (int)tx.HdmiInputs[1].HdcpCapabilityFeedback;
|
||||
});
|
||||
HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability", () => (int)tx.HdmiInputs[1].HdcpCapabilityFeedback);
|
||||
|
||||
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () =>
|
||||
{
|
||||
return (int)tx.HdmiInputs[2].HdcpCapabilityFeedback;
|
||||
});
|
||||
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
||||
|
||||
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
||||
|
||||
Hdmi1VideoSyncFeedback = new BoolFeedback(() =>
|
||||
{
|
||||
return (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue;
|
||||
});
|
||||
Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue);
|
||||
|
||||
Hdmi2VideoSyncFeedback = new BoolFeedback(() =>
|
||||
{
|
||||
return (bool)tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue;
|
||||
});
|
||||
Hdmi2VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue);
|
||||
|
||||
DisplayPortVideoSyncFeedback = new BoolFeedback(() =>
|
||||
{
|
||||
return (bool)tx.DisplayPortInput.SyncDetectedFeedback.BoolValue;
|
||||
});
|
||||
DisplayPortVideoSyncFeedback = new BoolFeedback(() => (bool)tx.DisplayPortInput.SyncDetectedFeedback.BoolValue);
|
||||
|
||||
|
||||
var combinedFuncs = new VideoStatusFuncsWrapper
|
||||
@@ -155,9 +124,7 @@ namespace PepperDash.Essentials.DM
|
||||
{
|
||||
if (ActualActiveVideoInput == eVst.Hdmi1)
|
||||
return tx.HdmiInputs[1].VideoAttributes.HdcpStateFeedback.ToString();
|
||||
if (ActualActiveVideoInput == eVst.Hdmi2)
|
||||
return tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString();
|
||||
return "";
|
||||
return ActualActiveVideoInput == eVst.Hdmi2 ? tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString() : "";
|
||||
},
|
||||
|
||||
VideoResolutionFeedbackFunc = () =>
|
||||
@@ -166,9 +133,7 @@ namespace PepperDash.Essentials.DM
|
||||
return tx.HdmiInputs[1].VideoAttributes.GetVideoResolutionString();
|
||||
if (ActualActiveVideoInput == eVst.Hdmi2)
|
||||
return tx.HdmiInputs[2].VideoAttributes.GetVideoResolutionString();
|
||||
if (ActualActiveVideoInput == eVst.Vga)
|
||||
return tx.DisplayPortInput.VideoAttributes.GetVideoResolutionString();
|
||||
return "";
|
||||
return ActualActiveVideoInput == eVst.Vga ? tx.DisplayPortInput.VideoAttributes.GetVideoResolutionString() : "";
|
||||
},
|
||||
VideoSyncFeedbackFunc = () =>
|
||||
(ActualActiveVideoInput == eVst.Hdmi1
|
||||
@@ -202,6 +167,18 @@ namespace PepperDash.Essentials.DM
|
||||
DmOut.Port = Tx.DmOutput;
|
||||
}
|
||||
|
||||
void DisplayPortInputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||
{
|
||||
Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
||||
|
||||
switch (args.EventId)
|
||||
{
|
||||
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||
DisplayPortVideoSyncFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override bool CustomActivate()
|
||||
@@ -222,7 +199,7 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
DmTxControllerJoinMap joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||
var joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||
|
||||
if (Hdmi1VideoSyncFeedback != null)
|
||||
{
|
||||
@@ -284,44 +261,46 @@ namespace PepperDash.Essentials.DM
|
||||
// NOTE: It's possible that this particular TX model may not like the AudioSource property being set.
|
||||
// The SIMPL definition only shows a single analog for AudioVideo Source
|
||||
if ((signalType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
||||
Tx.AudioSource = (eAst)inputSelector;
|
||||
//it doesn't
|
||||
Debug.Console(2, this, "Unable to execute audio-only switch for tx {0}", Key);
|
||||
//Tx.AudioSource = (eAst)inputSelector;
|
||||
}
|
||||
|
||||
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||
{
|
||||
Debug.Console(2, "{0} event {1} stream {2}", this.Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
||||
Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
||||
|
||||
if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId)
|
||||
switch (args.EventId)
|
||||
{
|
||||
if (inputStream == Tx.HdmiInputs[1])
|
||||
HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
||||
else if (inputStream == Tx.HdmiInputs[2])
|
||||
HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
||||
}
|
||||
else if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId)
|
||||
{
|
||||
if (inputStream == Tx.HdmiInputs[1])
|
||||
HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
||||
else if (inputStream == Tx.HdmiInputs[2])
|
||||
HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
||||
case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId:
|
||||
if (inputStream == Tx.HdmiInputs[1]) HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
||||
if (inputStream == Tx.HdmiInputs[2]) HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId:
|
||||
if (inputStream == Tx.HdmiInputs[1]) HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
||||
if (inputStream == Tx.HdmiInputs[2]) HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||
if (inputStream == Tx.HdmiInputs[1]) Hdmi1VideoSyncFeedback.FireUpdate();
|
||||
if (inputStream == Tx.HdmiInputs[2]) Hdmi2VideoSyncFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Tx_BaseEvent(GenericBase device, BaseEventArgs args)
|
||||
{
|
||||
var id = args.EventId;
|
||||
if (id == EndpointTransmitterBase.VideoSourceFeedbackEventId)
|
||||
switch (id)
|
||||
{
|
||||
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
||||
VideoSourceNumericFeedback.FireUpdate();
|
||||
ActiveVideoInputFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
// ------------------------------ incomplete -----------------------------------------
|
||||
else if (id == EndpointTransmitterBase.AudioSourceFeedbackEventId)
|
||||
{
|
||||
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
||||
AudioSourceNumericFeedback.FireUpdate();
|
||||
case EndpointTransmitterBase.VideoSourceFeedbackEventId:
|
||||
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
||||
VideoSourceNumericFeedback.FireUpdate();
|
||||
ActiveVideoInputFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointTransmitterBase.AudioSourceFeedbackEventId:
|
||||
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
||||
AudioSourceNumericFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -330,11 +309,9 @@ namespace PepperDash.Essentials.DM
|
||||
/// </summary>
|
||||
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||
{
|
||||
if (eventId == EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
||||
{
|
||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
}
|
||||
if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId) return;
|
||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace PepperDash.Essentials.DM
|
||||
/// <param name="name"></param>
|
||||
/// <param name="props"></param>
|
||||
/// <returns></returns>
|
||||
public static DmTxControllerBase GetDmTxController(string key, string name, string typeName, DmTxPropertiesConfig props)
|
||||
public static BasicDmTxControllerBase GetDmTxController(string key, string name, string typeName, DmTxPropertiesConfig props)
|
||||
{
|
||||
// switch on type name... later...
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace PepperDash.Essentials.DM
|
||||
if (typeName.StartsWith("dmtx4k202"))
|
||||
return new DmTx4k202CController(key, name, new DmTx4k202C(ipid, Global.ControlSystem));
|
||||
if (typeName.StartsWith("dmtx4kz202"))
|
||||
return new DmTx4k202CController(key, name, new DmTx4kz202C(ipid, Global.ControlSystem));
|
||||
return new DmTx4kz202CController(key, name, new DmTx4kz202C(ipid, Global.ControlSystem));
|
||||
if (typeName.StartsWith("dmtx4k302"))
|
||||
return new DmTx4k302CController(key, name, new DmTx4k302C(ipid, Global.ControlSystem));
|
||||
if (typeName.StartsWith("dmtx4kz302"))
|
||||
@@ -115,7 +115,7 @@ namespace PepperDash.Essentials.DM
|
||||
if (typeName.StartsWith("dmtx4k202"))
|
||||
return new DmTx4k202CController(key, name, new DmTx4k202C(chassis.Inputs[num]));
|
||||
if (typeName.StartsWith("dmtx4kz202"))
|
||||
return new DmTx4k202CController(key, name, new DmTx4kz202C(chassis.Inputs[num]));
|
||||
return new DmTx4kz202CController(key, name, new DmTx4kz202C(chassis.Inputs[num]));
|
||||
if (typeName.StartsWith("dmtx4k302"))
|
||||
return new DmTx4k302CController(key, name, new DmTx4k302C(chassis.Inputs[num]));
|
||||
if (typeName.StartsWith("dmtx4kz302"))
|
||||
@@ -138,7 +138,7 @@ namespace PepperDash.Essentials.DM
|
||||
if (typeName.StartsWith("dmtx4k202"))
|
||||
return new DmTx4k202CController(key, name, new DmTx4k202C(ipid, chassis.Inputs[num]));
|
||||
if (typeName.StartsWith("dmtx4kz202"))
|
||||
return new DmTx4k202CController(key, name, new DmTx4kz202C(ipid, chassis.Inputs[num]));
|
||||
return new DmTx4kz202CController(key, name, new DmTx4kz202C(ipid, chassis.Inputs[num]));
|
||||
if (typeName.StartsWith("dmtx4k302"))
|
||||
return new DmTx4k302CController(key, name, new DmTx4k302C(ipid, chassis.Inputs[num]));
|
||||
if (typeName.StartsWith("dmtx4kz302"))
|
||||
@@ -157,11 +157,20 @@ namespace PepperDash.Essentials.DM
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class BasicDmTxControllerBase : CrestronGenericBridgeableBaseDevice
|
||||
{
|
||||
protected BasicDmTxControllerBase(string key, string name, GenericBase hardware)
|
||||
: base(key, name, hardware)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Description("Wrapper class for all DM-TX variants")]
|
||||
public abstract class DmTxControllerBase : CrestronGenericBridgeableBaseDevice
|
||||
public abstract class DmTxControllerBase : BasicDmTxControllerBase
|
||||
{
|
||||
public virtual void SetPortHdcpCapability(eHdcpCapabilityType hdcpMode, uint port) { }
|
||||
public virtual eHdcpCapabilityType HdcpSupportCapability { get; protected set; }
|
||||
@@ -197,13 +206,7 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
protected void LinkDmTxToApi(DmTxControllerBase tx, BasicTriList trilist, DmTxControllerJoinMap joinMap, EiscApiAdvanced bridge)
|
||||
{
|
||||
if (tx.Hardware is DmHDBasedTEndPoint)
|
||||
{
|
||||
Debug.Console(1, tx, "No properties to link. Skipping device {0}", tx.Name);
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Console(1, tx, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||
Debug.Console(1, tx, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||
|
||||
tx.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
||||
tx.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber]);
|
||||
@@ -294,7 +297,7 @@ namespace PepperDash.Essentials.DM
|
||||
if (txFreeRun != null)
|
||||
{
|
||||
txFreeRun.FreeRunEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.FreeRunEnabled.JoinNumber]);
|
||||
trilist.SetBoolSigAction(joinMap.FreeRunEnabled.JoinNumber, new Action<bool>(txFreeRun.SetFreeRunEnabled));
|
||||
trilist.SetBoolSigAction(joinMap.FreeRunEnabled.JoinNumber, txFreeRun.SetFreeRunEnabled);
|
||||
}
|
||||
|
||||
var txVga = tx as IVgaBrightnessContrastControls;
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{9199CE8A-0C9F-4952-8672-3EED798B284F}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>PepperDash.Essentials.DM</RootNamespace>
|
||||
<AssemblyName>PepperDash_Essentials_DM</AssemblyName>
|
||||
<ProjectTypeGuids>{0B4745B0-194B-4BB6-8E21-E9057CA92300};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<PlatformFamilyName>WindowsCE</PlatformFamilyName>
|
||||
<PlatformID>E2BECB1F-8C8C-41ba-B736-9BE7D946A398</PlatformID>
|
||||
<OSVersion>5.0</OSVersion>
|
||||
<DeployDirSuffix>SmartDeviceProject1</DeployDirSuffix>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<NativePlatformName>Windows CE</NativePlatformName>
|
||||
<FormFactorID>
|
||||
</FormFactorID>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<AllowedReferenceRelatedFileExtensions>.allowedReferenceRelatedFileExtensions</AllowedReferenceRelatedFileExtensions>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoConfig>true</NoConfig>
|
||||
<GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<AllowedReferenceRelatedFileExtensions>.allowedReferenceRelatedFileExtensions</AllowedReferenceRelatedFileExtensions>
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoConfig>true</NoConfig>
|
||||
<GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Crestron.SimplSharpPro.DeviceSupport, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Crestron.SimplSharpPro.DM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Crestron.SimplSharpPro.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="mscorlib" />
|
||||
<Reference Include="PepperDash_Core, Version=1.0.26.30384, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\pepperdashcore-builds\PepperDash_Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="SimplSharpHelperInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="SimplSharpNewtonsoft, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SimplSharpPro, Version=1.5.3.17, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="SimplSharpReflectionInterface, Version=1.0.5583.25238, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AirMedia\AirMediaPropertiesConfig.cs" />
|
||||
<Compile Include="AirMedia\AirMediaController.cs" />
|
||||
<Compile Include="Chassis\DmBladeChassisController.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" />
|
||||
<Compile Include="Endpoints\Transmitters\TxInterfaces.cs" />
|
||||
<Compile Include="IDmSwitch.cs" />
|
||||
<Compile Include="Config\DmpsRoutingConfig.cs" />
|
||||
<Compile Include="Config\DmRmcConfig.cs" />
|
||||
<Compile Include="Config\DmTxConfig.cs" />
|
||||
<Compile Include="Config\DMChassisConfig.cs" />
|
||||
<Compile Include="Config\HdMdNxM4kEPropertiesConfig.cs" />
|
||||
<Compile Include="Config\InputPropertiesConfig.cs" />
|
||||
<Compile Include="DmPortName.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" />
|
||||
<Compile Include="Endpoints\Receivers\DmRmc200CController.cs" />
|
||||
<Compile Include="Endpoints\Receivers\DmRmc200S2Controller.cs" />
|
||||
<Compile Include="Endpoints\Receivers\DmRmc200SController.cs" />
|
||||
<Compile Include="Endpoints\Receivers\DmRmc4k100C1GController.cs" />
|
||||
<Compile Include="Endpoints\Receivers\DmRmc4KScalerCController.cs" />
|
||||
<Compile Include="Endpoints\Receivers\DmRmc4kScalerCDspController.cs" />
|
||||
<Compile Include="Endpoints\Receivers\DmRmcScalerCController.cs" />
|
||||
<Compile Include="Endpoints\Receivers\DmRmcX100CController.cs" />
|
||||
<Compile Include="Endpoints\Receivers\DmRmcHelper.cs" />
|
||||
<Compile Include="Endpoints\Receivers\DmRmcScalerS2Controller.cs" />
|
||||
<Compile Include="Endpoints\Receivers\DmRmcScalerSController.cs" />
|
||||
<Compile Include="Endpoints\Transmitters\DmTx200Controller.cs" />
|
||||
<Compile Include="Endpoints\Transmitters\DmTx401CController.cs" />
|
||||
<Compile Include="Endpoints\Transmitters\DmTx4k100Controller.cs" />
|
||||
<Compile Include="Endpoints\Transmitters\DmTx4k202CController.cs" />
|
||||
<Compile Include="Endpoints\Transmitters\DmTx4k302CController.cs" />
|
||||
<Compile Include="Endpoints\Transmitters\DmTx201CController.cs" />
|
||||
<Compile Include="Endpoints\Transmitters\DmTx4kz302CController.cs" />
|
||||
<Compile Include="Endpoints\Transmitters\DmTxHelpers.cs" />
|
||||
<Compile Include="Extensions.cs" />
|
||||
<Compile Include="Config\DeviceFactory.cs" />
|
||||
<Compile Include="IDmHdmiInputExtensions.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="VideoStatusHelpers.cs" />
|
||||
<None Include="app.config" />
|
||||
<None Include="Properties\ControlSystem.cfg" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Essentials Core\PepperDashEssentialsBase\PepperDash_Essentials_Core.csproj">
|
||||
<Project>{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}</Project>
|
||||
<Name>PepperDash_Essentials_Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>rem S# Pro preparation will execute after these operations</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -84,7 +84,7 @@
|
||||
</Reference>
|
||||
<Reference Include="SimplSharpReflectionInterface, Version=1.0.5583.25238, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll</HintPath>
|
||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
@@ -103,6 +103,7 @@
|
||||
<Compile Include="Endpoints\DGEs\DmDge200CController.cs" />
|
||||
<Compile Include="Endpoints\Receivers\DmRmc4kZ100CController.cs" />
|
||||
<Compile Include="Endpoints\Receivers\DmRmc4kZScalerCController.cs" />
|
||||
<Compile Include="Endpoints\Transmitters\DmTx4kz202CController.cs" />
|
||||
<Compile Include="Endpoints\Transmitters\DmTx201SController.cs" />
|
||||
<Compile Include="Endpoints\Transmitters\DmTx4kz100Controller.cs" />
|
||||
<Compile Include="Endpoints\Transmitters\TxInterfaces.cs" />
|
||||
|
||||
Reference in New Issue
Block a user