mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-05 07:45:05 +00:00
Compare commits
125 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 | ||
|
|
55d8e6f205 | ||
|
|
4ef8e8cf14 | ||
|
|
e581219e32 | ||
|
|
d11e0db14a | ||
|
|
4c5b60bddb | ||
|
|
0b59dbe20d | ||
|
|
279eaaaf62 | ||
|
|
fd3e8d81f8 | ||
|
|
1dfdca0ab4 | ||
|
|
ba5ab18fad | ||
|
|
7caef808b7 | ||
|
|
fd7f708a83 | ||
|
|
966a6c194f | ||
|
|
dea7edaa1f | ||
|
|
75e74aa06b | ||
|
|
b671f4c77e | ||
|
|
26eedb684a | ||
|
|
0705c412fb | ||
|
|
b76178990d | ||
|
|
c2ce9b2249 | ||
|
|
a1465f55ba | ||
|
|
ea4192838d | ||
|
|
b8553bdb7c | ||
|
|
6e741c4d44 | ||
|
|
24d9873af2 | ||
|
|
7e7159e543 | ||
|
|
2cc5631672 | ||
|
|
4fcccfff0b | ||
|
|
531bda5c7f | ||
|
|
04e159c1d1 | ||
|
|
281bfc4147 | ||
|
|
c6e511131b | ||
|
|
35effa5e82 | ||
|
|
caf5a6812b | ||
|
|
99c4dc2266 | ||
|
|
1d47a60695 | ||
|
|
cde25c56e2 | ||
|
|
8da86c360c | ||
|
|
53fa0c0865 | ||
|
|
03cebb75ce | ||
|
|
fc8b4120c7 | ||
|
|
5ec96310c6 | ||
|
|
53d92555c8 | ||
|
|
42b94e3a47 | ||
|
|
4b37d68c0e | ||
|
|
b321fc7b76 | ||
|
|
41e9bead0b | ||
|
|
404f5c921b | ||
|
|
acfd82fa82 | ||
|
|
e387a5534b | ||
|
|
adbb76b87c | ||
|
|
230f29d3f8 | ||
|
|
6530856d28 | ||
|
|
5c560ae82f | ||
|
|
30c1b2755e | ||
|
|
49fcb9e394 | ||
|
|
3a3ccb0acd | ||
|
|
ff7a1838aa | ||
|
|
3a03fa31e8 | ||
|
|
f91930930b | ||
|
|
d8671ea73f | ||
|
|
72ec4de912 | ||
|
|
b9bc3bd0f3 | ||
|
|
8f440c3cb9 | ||
|
|
31536e7f97 | ||
|
|
8499338fac | ||
|
|
622749a37f | ||
|
|
bcd7efa911 | ||
|
|
b58b42c496 | ||
|
|
f7a41f08c4 | ||
|
|
7a7ab33fa4 | ||
|
|
dc9d285de0 | ||
|
|
2519fffb58 | ||
|
|
2eacaec577 | ||
|
|
dbec871500 | ||
|
|
03bcb5f338 |
5
.github/scripts/ZipBuildOutput.ps1
vendored
5
.github/scripts/ZipBuildOutput.ps1
vendored
@@ -10,7 +10,7 @@ Get-ChildItem ($destination)
|
|||||||
$exclusions = @(git submodule foreach --quiet 'echo $name')
|
$exclusions = @(git submodule foreach --quiet 'echo $name')
|
||||||
# Trying to get any .json schema files (not currently working)
|
# Trying to get any .json schema files (not currently working)
|
||||||
# Gets any files with the listed extensions.
|
# Gets any files with the listed extensions.
|
||||||
Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include "*.clz", "*.cpz", "*.cplz" | ForEach-Object {
|
Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include "*.clz", "*.cpz", "*.cplz", "*.dll" | ForEach-Object {
|
||||||
$allowed = $true;
|
$allowed = $true;
|
||||||
# Exclude any files in submodules
|
# Exclude any files in submodules
|
||||||
foreach ($exclude in $exclusions) {
|
foreach ($exclude in $exclusions) {
|
||||||
@@ -28,7 +28,8 @@ Write-Host "Getting matching files..."
|
|||||||
# Get any files from the output folder that match the following extensions
|
# Get any files from the output folder that match the following extensions
|
||||||
Get-ChildItem -Path $destination | Where-Object { ($_.Extension -eq ".clz") -or ($_.Extension -eq ".cpz" -or ($_.Extension -eq ".cplz")) } | ForEach-Object {
|
Get-ChildItem -Path $destination | Where-Object { ($_.Extension -eq ".clz") -or ($_.Extension -eq ".cpz" -or ($_.Extension -eq ".cplz")) } | ForEach-Object {
|
||||||
# Replace the extensions with dll and xml and create an array
|
# Replace the extensions with dll and xml and create an array
|
||||||
$filenames = @($($_ -replace "cpz|clz|cplz", "dll"), $($_ -replace "cpz|clz|cplz", "xml"))
|
# Removed dll file capture, as previous step should capture all of them. Add if needed-> $($_ -replace "cpz|clz|cplz", "dll"),
|
||||||
|
$filenames = @($($_ -replace "cpz|clz|cplz", "xml"))
|
||||||
Write-Host "Filenames:"
|
Write-Host "Filenames:"
|
||||||
Write-Host $filenames
|
Write-Host $filenames
|
||||||
if ($filenames.length -gt 0) {
|
if ($filenames.length -gt 0) {
|
||||||
|
|||||||
21
.github/workflows/docker.yml
vendored
21
.github/workflows/docker.yml
vendored
@@ -11,7 +11,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
# solution path doesn't need slashes unless there it is multiple folders deep
|
# 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_PATH: PepperDashEssentials
|
||||||
SOLUTION_FILE: PepperDashEssentials
|
SOLUTION_FILE: PepperDashEssentials
|
||||||
# Do not edit this, we're just creating it here
|
# Do not edit this, we're just creating it here
|
||||||
@@ -52,6 +52,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
Write-Output ${{ env.VERSION }}
|
Write-Output ${{ env.VERSION }}
|
||||||
./.github/scripts/UpdateAssemblyVersion.ps1 ${{ 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
|
# Build the solutions in the docker image
|
||||||
- name: Build Solution
|
- name: Build Solution
|
||||||
shell: powershell
|
shell: powershell
|
||||||
@@ -77,9 +83,15 @@ jobs:
|
|||||||
name: Version
|
name: Version
|
||||||
path: ${{env.GITHUB_HOME}}\output\version.txt
|
path: ${{env.GITHUB_HOME}}\output\version.txt
|
||||||
# Create the release on the source repo
|
# 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
|
- name: Create Release
|
||||||
id: create_release
|
id: create_release
|
||||||
# using contributor's version to allow for pointing at the right commit
|
# 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
|
uses: fleskesvor/create-release@feature/support-target-commitish
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ env.VERSION }}
|
tag_name: ${{ env.VERSION }}
|
||||||
@@ -89,6 +101,7 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# Upload the build package to the release
|
# Upload the build package to the release
|
||||||
- name: Upload Release Package
|
- name: Upload Release Package
|
||||||
|
if: contains(env.VERSION,'-rc-') || contains(env.VERSION,'-hotfix-')
|
||||||
id: upload_release
|
id: upload_release
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
with:
|
with:
|
||||||
@@ -103,6 +116,8 @@ jobs:
|
|||||||
needs: Build_Project
|
needs: Build_Project
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: check Github ref
|
||||||
|
run: ${{toJson(github.ref)}}
|
||||||
# Checkout the repo
|
# Checkout the repo
|
||||||
- name: Checkout Builds Repo
|
- name: Checkout Builds Repo
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
@@ -178,9 +193,11 @@ jobs:
|
|||||||
Public_Push_Output:
|
Public_Push_Output:
|
||||||
needs: Build_Project
|
needs: Build_Project
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
if: contains(github.ref, 'master') || contains(github.ref, 'release')
|
if: contains(github.ref, 'master') || contains(github.ref, '/release/')
|
||||||
steps:
|
steps:
|
||||||
# Checkout the repo
|
# Checkout the repo
|
||||||
|
- name: check Github ref
|
||||||
|
run: ${{toJson(github.ref)}}
|
||||||
- name: Checkout Builds Repo
|
- name: Checkout Builds Repo
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
9
.github/workflows/master.yml
vendored
9
.github/workflows/master.yml
vendored
@@ -32,9 +32,6 @@ jobs:
|
|||||||
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
||||||
git submodule sync --recursive
|
git submodule sync --recursive
|
||||||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
||||||
# Fetch all tags
|
|
||||||
- name: Fetch tags
|
|
||||||
run: git fetch --tags
|
|
||||||
# Generate the appropriate version number
|
# Generate the appropriate version number
|
||||||
- name: Set Version Number
|
- name: Set Version Number
|
||||||
shell: powershell
|
shell: powershell
|
||||||
@@ -47,6 +44,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
Write-Output ${{ env.VERSION }}
|
Write-Output ${{ env.VERSION }}
|
||||||
./.github/scripts/UpdateAssemblyVersion.ps1 ${{ 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
|
# Build the solutions in the docker image
|
||||||
- name: Build Solution
|
- name: Build Solution
|
||||||
shell: powershell
|
shell: powershell
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Bridges
|
namespace PepperDash.Essentials.Bridges
|
||||||
{
|
{
|
||||||
@@ -7,8 +6,7 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
/// Defines a device that uses the legacy JoinMapBase for its join map
|
/// Defines a device that uses the legacy JoinMapBase for its join map
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Obsolete("IBridgeAdvanced should be used going forward with JoinMapBaseAdvanced")]
|
[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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -26,6 +26,8 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
HttpLogoServer LogoServer;
|
HttpLogoServer LogoServer;
|
||||||
|
|
||||||
|
private CTimer _startTimer;
|
||||||
|
private const long StartupTime = 500;
|
||||||
|
|
||||||
public ControlSystem()
|
public ControlSystem()
|
||||||
: base()
|
: base()
|
||||||
@@ -39,6 +41,11 @@ namespace PepperDash.Essentials
|
|||||||
/// Entry point for the program
|
/// Entry point for the program
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public override void InitializeSystem()
|
public override void InitializeSystem()
|
||||||
|
{
|
||||||
|
_startTimer = new CTimer(StartSystem,StartupTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void StartSystem(object obj)
|
||||||
{
|
{
|
||||||
DeterminePlatform();
|
DeterminePlatform();
|
||||||
|
|
||||||
@@ -75,11 +82,11 @@ namespace PepperDash.Essentials
|
|||||||
}, "showconfig", "Shows the current running merged config", ConsoleAccessLevelEnum.AccessOperator);
|
}, "showconfig", "Shows the current running merged config", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
CrestronConsole.AddNewConsoleCommand(s =>
|
CrestronConsole.AddNewConsoleCommand(s =>
|
||||||
{
|
{
|
||||||
CrestronConsole.ConsoleCommandResponse("This system can be found at the following URLs:\r" +
|
CrestronConsole.ConsoleCommandResponse("This system can be found at the following URLs:\r" +
|
||||||
"System URL: {0}\r" +
|
"System URL: {0}\r" +
|
||||||
"Template URL: {1}", ConfigReader.ConfigObject.SystemUrl, ConfigReader.ConfigObject.TemplateUrl);
|
"Template URL: {1}", ConfigReader.ConfigObject.SystemUrl, ConfigReader.ConfigObject.TemplateUrl);
|
||||||
}, "portalinfo", "Shows portal URLS from configuration", ConsoleAccessLevelEnum.AccessOperator);
|
}, "portalinfo", "Shows portal URLS from configuration", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
|
|
||||||
if (!Debug.DoNotLoadOnNextBoot)
|
if (!Debug.DoNotLoadOnNextBoot)
|
||||||
|
|||||||
@@ -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.
|
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
|
## 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.
|
- 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).
|
- 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;
|
if (device == null) continue;
|
||||||
|
|
||||||
Debug.Console(1, this, "Linking Device: '{0}'", device.Key);
|
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.
|
|
||||||
//{
|
if (typeof (IBridge).IsAssignableFrom(device.GetType().GetCType()))
|
||||||
// Debug.Console(2, this, "'{0}' is IBridge", device.Key);
|
{
|
||||||
//}
|
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()))
|
if (!typeof (IBridgeAdvanced).IsAssignableFrom(device.GetType().GetCType()))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var bridge = device as IBridgeAdvanced;
|
var bridge = device as IBridgeAdvanced;
|
||||||
if (bridge != null) bridge.LinkToApi(Eisc, d.JoinStart, d.JoinMapKey, this);
|
if (bridge != null) bridge.LinkToApi(Eisc, d.JoinStart, d.JoinMapKey, this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,19 @@
|
|||||||
using System;
|
using System;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
|
using PepperDash.Core;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines a device that uses JoinMapBaseAdvanced for its join map
|
/// Defines a device that uses JoinMapBaseAdvanced for its join map
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IBridgeAdvanced
|
public interface IBridgeAdvanced:IKeyed
|
||||||
{
|
{
|
||||||
void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge);
|
void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public interface IBridge:IKeyed
|
||||||
|
{
|
||||||
|
void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,110 +1,66 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public class AirMediaControllerJoinMap : JoinMapBase
|
public class AirMediaControllerJoinMap : JoinMapBaseAdvanced
|
||||||
{
|
{
|
||||||
#region Digitals
|
[JoinName("IsOnline")]
|
||||||
/// <summary>
|
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
/// Indicates that the device is online when high
|
new JoinMetadata() { Label = "Air Media Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// </summary>
|
|
||||||
public uint IsOnline { get; set; }
|
[JoinName("IsInSession")]
|
||||||
/// <summary>
|
public JoinDataComplete IsInSession = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
|
||||||
/// Indicates that the device is in session when high
|
new JoinMetadata() { Label = "Air Media In Sharing Session", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// </summary>
|
|
||||||
public uint IsInSession { get; set; }
|
[JoinName("HdmiVideoSync")]
|
||||||
/// <summary>
|
public JoinDataComplete HdmiVideoSync = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
|
||||||
/// Indicates sync detected on HDMI input when high
|
new JoinMetadata() { Label = "Air Media Has HDMI Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// </summary>
|
|
||||||
public uint HdmiVideoSync { get; set; }
|
[JoinName("AutomaticInputRoutingEnabled")]
|
||||||
/// <summary>
|
public JoinDataComplete AutomaticInputRoutingEnabled = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
|
||||||
/// Set High to enable automatic input routing and low to disable. Feedback high when enabled
|
new JoinMetadata() { Label = "Air Media Automatic Input Routing Enable(d)", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// </summary>
|
|
||||||
public uint AutomaticInputRoutingEnabled { get; set; }
|
[JoinName("VideoOut")]
|
||||||
#endregion
|
public JoinDataComplete VideoOut = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "Air Media Video Route Select / Feedback", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
#region Analogs
|
|
||||||
/// <summary>
|
[JoinName("ErrorFB")]
|
||||||
/// Selects source and provides feedback
|
public JoinDataComplete ErrorFB = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "Air Media Error Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
|
||||||
public uint VideoOut { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("NumberOfUsersConnectedFB")]
|
||||||
/// Provided error feedback
|
public JoinDataComplete NumberOfUsersConnectedFB = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "Air Media Number of Users Connected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
|
||||||
public uint ErrorFB { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("LoginCode")]
|
||||||
/// Indicates the number of connected users as feedback
|
public JoinDataComplete LoginCode = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "Air Media Login Code Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
public uint NumberOfUsersConnectedFB { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("Name")]
|
||||||
/// Sets the login code and provides the current code as feedback
|
public JoinDataComplete Name = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "Air Media Device Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
public uint LoginCode { get; set; }
|
|
||||||
#endregion
|
[JoinName("ConnectionAddressFB")]
|
||||||
|
public JoinDataComplete ConnectionAddressFB = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
|
||||||
#region Serials
|
new JoinMetadata() { Label = "Air Media IP Address", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
/// <summary>
|
|
||||||
/// Provides the name defined in config as feedback
|
[JoinName("HostnameFB")]
|
||||||
/// </summary>
|
public JoinDataComplete HostnameFB = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
|
||||||
public uint Name { get; set; }
|
new JoinMetadata() { Label = "Air Media Hostname", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
/// <summary>
|
|
||||||
/// Provides the connection address as feedback
|
[JoinName("SerialNumberFeedback")]
|
||||||
/// </summary>
|
public JoinDataComplete SerialNumberFeedback = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
|
||||||
public uint ConnectionAddressFB { get; set; }
|
new JoinMetadata() { Label = "Air Media Serial Number", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
/// <summary>
|
|
||||||
/// Provides the hostname as feedback
|
public AirMediaControllerJoinMap(uint joinStart)
|
||||||
/// </summary>
|
: base(joinStart, typeof(AirMediaControllerJoinMap))
|
||||||
public uint HostnameFB { get; set; }
|
{
|
||||||
/// <summary>
|
}
|
||||||
/// Provides the serial number as feedback
|
|
||||||
/// </summary>
|
}
|
||||||
public uint SerialNumberFeedback { get; set; }
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
public AirMediaControllerJoinMap()
|
|
||||||
{
|
|
||||||
// Digital
|
|
||||||
IsOnline = 1;
|
|
||||||
IsInSession = 2;
|
|
||||||
HdmiVideoSync = 3;
|
|
||||||
AutomaticInputRoutingEnabled = 4;
|
|
||||||
|
|
||||||
// Analog
|
|
||||||
VideoOut = 1;
|
|
||||||
ErrorFB = 2;
|
|
||||||
NumberOfUsersConnectedFB = 3;
|
|
||||||
LoginCode = 4;
|
|
||||||
|
|
||||||
// Serial
|
|
||||||
Name = 1;
|
|
||||||
ConnectionAddressFB = 2;
|
|
||||||
HostnameFB = 3;
|
|
||||||
SerialNumberFeedback = 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
|
||||||
{
|
|
||||||
var joinOffset = joinStart - 1;
|
|
||||||
|
|
||||||
IsOnline = IsOnline + joinOffset;
|
|
||||||
IsInSession = IsInSession + joinOffset;
|
|
||||||
HdmiVideoSync = HdmiVideoSync + joinOffset;
|
|
||||||
AutomaticInputRoutingEnabled = AutomaticInputRoutingEnabled + joinOffset;
|
|
||||||
|
|
||||||
VideoOut = VideoOut + joinOffset;
|
|
||||||
ErrorFB = ErrorFB + joinOffset;
|
|
||||||
NumberOfUsersConnectedFB = NumberOfUsersConnectedFB + joinOffset;
|
|
||||||
LoginCode = LoginCode + joinOffset;
|
|
||||||
|
|
||||||
Name = Name + joinOffset;
|
|
||||||
ConnectionAddressFB = ConnectionAddressFB + joinOffset;
|
|
||||||
HostnameFB = HostnameFB + joinOffset;
|
|
||||||
SerialNumberFeedback = SerialNumberFeedback + joinOffset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,67 +1,46 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public class AppleTvJoinMap : JoinMapBase
|
public class AppleTvJoinMap : JoinMapBaseAdvanced
|
||||||
{
|
{
|
||||||
#region Digitals
|
[JoinName("UpArrow")]
|
||||||
/// <summary>
|
public JoinDataComplete UpArrow = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
/// Sends up arrow command while high
|
new JoinMetadata() { Label = "AppleTv Nav Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// </summary>
|
|
||||||
public uint UpArrow { get; set; }
|
[JoinName("DnArrow")]
|
||||||
/// <summary>
|
public JoinDataComplete DnArrow = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
|
||||||
/// Sends down arrow command while high
|
new JoinMetadata() { Label = "AppleTv Nav Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// </summary>
|
|
||||||
public uint DnArrow { get; set; }
|
[JoinName("LeftArrow")]
|
||||||
/// <summary>
|
public JoinDataComplete LeftArrow = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
|
||||||
/// Sends left arrow command while high
|
new JoinMetadata() { Label = "AppleTv Nav Left", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// </summary>
|
|
||||||
public uint LeftArrow { get; set; }
|
[JoinName("RightArrow")]
|
||||||
/// <summary>
|
public JoinDataComplete RightArrow = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
|
||||||
/// Sends right arrow command while high
|
new JoinMetadata() { Label = "AppleTv Nav Right", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// </summary>
|
|
||||||
public uint RightArrow { get; set; }
|
[JoinName("Menu")]
|
||||||
/// <summary>
|
public JoinDataComplete Menu = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
|
||||||
/// Sends menu command
|
new JoinMetadata() { Label = "AppleTv Menu", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// </summary>
|
|
||||||
public uint Menu { get; set; }
|
[JoinName("Select")]
|
||||||
/// <summary>
|
public JoinDataComplete Select = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 },
|
||||||
/// Sends select command
|
new JoinMetadata() { Label = "AppleTv Select", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// </summary>
|
|
||||||
public uint Select { get; set; }
|
[JoinName("PlayPause")]
|
||||||
/// <summary>
|
public JoinDataComplete PlayPause = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 },
|
||||||
/// Sends play/pause command
|
new JoinMetadata() { Label = "AppleTv Play/Pause", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// </summary>
|
|
||||||
public uint PlayPause { get; set; }
|
public AppleTvJoinMap(uint joinStart)
|
||||||
#endregion
|
: base(joinStart, typeof(AppleTvJoinMap))
|
||||||
|
{
|
||||||
public AppleTvJoinMap()
|
}
|
||||||
{
|
|
||||||
UpArrow = 1;
|
}
|
||||||
DnArrow = 2;
|
|
||||||
LeftArrow = 3;
|
|
||||||
RightArrow = 4;
|
|
||||||
Menu = 5;
|
|
||||||
Select = 6;
|
|
||||||
PlayPause = 7;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
|
||||||
{
|
|
||||||
var joinOffset = joinStart - 1;
|
|
||||||
|
|
||||||
UpArrow = UpArrow + joinOffset;
|
|
||||||
DnArrow = DnArrow + joinOffset;
|
|
||||||
LeftArrow = LeftArrow + joinOffset;
|
|
||||||
RightArrow = RightArrow + joinOffset;
|
|
||||||
Menu = Menu + joinOffset;
|
|
||||||
Select = Select + joinOffset;
|
|
||||||
PlayPause = PlayPause + joinOffset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,43 +1,34 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Crestron.SimplSharp.Reflection;
|
using Crestron.SimplSharp.Reflection;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public class C2nRthsControllerJoinMap:JoinMapBase
|
public class C2nRthsControllerJoinMap : JoinMapBaseAdvanced
|
||||||
{
|
{
|
||||||
public uint IsOnline { get; set; }
|
[JoinName("IsOnline")]
|
||||||
public uint Name { get; set; }
|
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
public uint Temperature { get; set; }
|
new JoinMetadata() { Label = "Temp Sensor Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint Humidity { get; set; }
|
|
||||||
public uint TemperatureFormat { get; set; }
|
[JoinName("TemperatureFormat")]
|
||||||
|
public JoinDataComplete TemperatureFormat = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
|
||||||
public C2nRthsControllerJoinMap()
|
new JoinMetadata() { Label = "Temp Sensor Unit Format", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
{
|
|
||||||
//digital
|
[JoinName("Temperature")]
|
||||||
IsOnline = 1;
|
public JoinDataComplete Temperature = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
|
||||||
TemperatureFormat = 2;
|
new JoinMetadata() { Label = "Temp Sensor Temperature Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
|
||||||
|
|
||||||
//Analog
|
[JoinName("Humidity")]
|
||||||
Temperature = 2;
|
public JoinDataComplete Humidity = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
|
||||||
Humidity = 3;
|
new JoinMetadata() { Label = "Temp Sensor Humidity Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
|
||||||
|
|
||||||
//serial
|
[JoinName("Name")]
|
||||||
Name = 1;
|
public JoinDataComplete Name = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "Temp Sensor Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
}
|
public C2nRthsControllerJoinMap(uint joinStart)
|
||||||
|
: base(joinStart, typeof(C2nRthsControllerJoinMap))
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
{
|
||||||
{
|
}
|
||||||
var joinOffset = joinStart - 1;
|
}
|
||||||
var properties =
|
|
||||||
GetType().GetCType().GetProperties().Where(p => p.PropertyType == typeof(uint)).ToList();
|
|
||||||
|
|
||||||
foreach (var propertyInfo in properties)
|
|
||||||
{
|
|
||||||
propertyInfo.SetValue(this, (uint)propertyInfo.GetValue(this, null) + joinOffset, null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,48 +1,47 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
using PepperDash.Essentials.Core;
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
|
{
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
[Obsolete("This Device will be moved to a plugin in a future update")]
|
||||||
{
|
public class DigitalLoggerJoinMap : JoinMapBase
|
||||||
public class DigitalLoggerJoinMap : JoinMapBase
|
{
|
||||||
{
|
public uint IsOnline { get; set; }
|
||||||
public uint IsOnline { get; set; }
|
public uint CircuitNames { get; set; }
|
||||||
public uint CircuitNames { get; set; }
|
public uint CircuitState { get; set; }
|
||||||
public uint CircuitState { get; set; }
|
public uint CircuitCycle { get; set; }
|
||||||
public uint CircuitCycle { get; set; }
|
public uint CircuitIsCritical { get; set; }
|
||||||
public uint CircuitIsCritical { get; set; }
|
public uint CircuitOnCmd { get; set; }
|
||||||
public uint CircuitOnCmd { get; set; }
|
public uint CircuitOffCmd { get; set; }
|
||||||
public uint CircuitOffCmd { get; set; }
|
|
||||||
|
public DigitalLoggerJoinMap()
|
||||||
public DigitalLoggerJoinMap()
|
{
|
||||||
{
|
// Digital
|
||||||
// Digital
|
IsOnline = 9;
|
||||||
IsOnline = 9;
|
CircuitState = 0;
|
||||||
CircuitState = 0;
|
CircuitCycle = 0;
|
||||||
CircuitCycle = 0;
|
CircuitIsCritical = 10;
|
||||||
CircuitIsCritical = 10;
|
CircuitOnCmd = 10;
|
||||||
CircuitOnCmd = 10;
|
CircuitOffCmd = 20;
|
||||||
CircuitOffCmd = 20;
|
// Serial
|
||||||
// Serial
|
CircuitNames = 0;
|
||||||
CircuitNames = 0;
|
// Analog
|
||||||
// Analog
|
}
|
||||||
}
|
|
||||||
|
public override void OffsetJoinNumbers(uint joinStart)
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
{
|
||||||
{
|
var joinOffset = joinStart - 1;
|
||||||
var joinOffset = joinStart - 1;
|
|
||||||
|
IsOnline = IsOnline + joinOffset;
|
||||||
IsOnline = IsOnline + joinOffset;
|
CircuitNames = CircuitNames + joinOffset;
|
||||||
CircuitNames = CircuitNames + joinOffset;
|
CircuitState = CircuitState + joinOffset;
|
||||||
CircuitState = CircuitState + joinOffset;
|
CircuitCycle = CircuitCycle + joinOffset;
|
||||||
CircuitCycle = CircuitCycle + joinOffset;
|
CircuitIsCritical = CircuitIsCritical + joinOffset;
|
||||||
CircuitIsCritical = CircuitIsCritical + joinOffset;
|
CircuitOnCmd = CircuitOnCmd + joinOffset;
|
||||||
CircuitOnCmd = CircuitOnCmd + joinOffset;
|
CircuitOffCmd = CircuitOffCmd + joinOffset;
|
||||||
CircuitOffCmd = CircuitOffCmd + joinOffset;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -70,7 +70,7 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
new JoinMetadata() { Label = "Is Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
new JoinMetadata() { Label = "Is Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
public DisplayControllerJoinMap(uint joinStart)
|
public DisplayControllerJoinMap(uint joinStart)
|
||||||
: base(joinStart, typeof(CameraControllerJoinMap))
|
: base(joinStart, typeof(DisplayControllerJoinMap))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,109 +1,65 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges {
|
namespace PepperDash.Essentials.Core.Bridges {
|
||||||
public class DmBladeChassisControllerJoinMap : JoinMapBase {
|
public class DmBladeChassisControllerJoinMap : JoinMapBaseAdvanced {
|
||||||
#region Digital/Analogs
|
|
||||||
#endregion
|
[JoinName("IsOnline")]
|
||||||
|
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 },
|
||||||
#region Digitals
|
new JoinMetadata() { Label = "DM Blade Chassis Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// <summary>
|
|
||||||
/// High when device is online
|
[JoinName("VideoSyncStatus")]
|
||||||
/// </summary>
|
public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 128 },
|
||||||
public uint IsOnline { get; set; }
|
new JoinMetadata() { Label = "DM Blade Input Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// <summary>
|
|
||||||
/// Range reports video sync feedback for each input
|
[JoinName("InputEndpointOnline")]
|
||||||
/// </summary>
|
public JoinDataComplete InputEndpointOnline = new JoinDataComplete(new JoinData() { JoinNumber = 501, JoinSpan = 128 },
|
||||||
public uint VideoSyncStatus { get; set; }
|
new JoinMetadata() { Label = "DM Blade Chassis Input Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// <summary>
|
|
||||||
/// Range reports high if corresponding input's endpoint is online
|
[JoinName("OutputEndpointOnline")]
|
||||||
/// </summary>
|
public JoinDataComplete OutputEndpointOnline = new JoinDataComplete(new JoinData() { JoinNumber = 701, JoinSpan = 128 },
|
||||||
public uint InputEndpointOnline { get; set; }
|
new JoinMetadata() { Label = "DM Blade Chassis Output Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// <summary>
|
|
||||||
/// Range reports high if corresponding output's endpoint is online
|
[JoinName("TxAdvancedIsPresent")]
|
||||||
/// </summary>
|
public JoinDataComplete TxAdvancedIsPresent = new JoinDataComplete(new JoinData() { JoinNumber = 1001, JoinSpan = 128 },
|
||||||
public uint OutputEndpointOnline { get; set; }
|
new JoinMetadata() { Label = "DM Blade Chassis Tx Advanced Is Present", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// <summary>
|
|
||||||
/// Range reports high if corresponding input's transmitter supports bridging as a separate device for detailed AV switching, HDCP control, etc.
|
[JoinName("OutputVideo")]
|
||||||
/// </summary>
|
public JoinDataComplete OutputVideo = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 128 },
|
||||||
public uint TxAdvancedIsPresent { get; set; } // indicates that there is an attached transmitter that should be bridged to be interacted with
|
new JoinMetadata() { Label = "DM Blade Chassis Output Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
#endregion
|
|
||||||
|
[JoinName("HdcpSupportState")]
|
||||||
#region Analogs
|
public JoinDataComplete HdcpSupportState = new JoinDataComplete(new JoinData() { JoinNumber = 1001, JoinSpan = 128 },
|
||||||
/// <summary>
|
new JoinMetadata() { Label = "DM Blade Chassis Input HDCP Support State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
|
||||||
/// Range sets and reports the current video source for the corresponding output
|
|
||||||
/// </summary>
|
[JoinName("HdcpSupportCapability")]
|
||||||
public uint OutputVideo { get; set; }
|
public JoinDataComplete HdcpSupportCapability = new JoinDataComplete(new JoinData() { JoinNumber = 1201, JoinSpan = 128 },
|
||||||
/// <summary>
|
new JoinMetadata() { Label = "DM Blade Chassis Input HDCP Support Capability", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
|
||||||
/// Range sets and reports the current HDCP state for the corresponding input card
|
|
||||||
/// </summary>
|
[JoinName("InputNames")]
|
||||||
public uint HdcpSupportState { get; set; }
|
public JoinDataComplete InputNames = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 128 },
|
||||||
/// <summary>
|
new JoinMetadata() { Label = "DM Blade Chassis Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
/// Range reports the highest supported HDCP state level for the corresponding input card
|
|
||||||
/// </summary>
|
[JoinName("OutputNames")]
|
||||||
public uint HdcpSupportCapability { get; set; }
|
public JoinDataComplete OutputNames = new JoinDataComplete(new JoinData() { JoinNumber = 301, JoinSpan = 128 },
|
||||||
#endregion
|
new JoinMetadata() { Label = "DM Blade Chassis Output Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
#region Serials
|
[JoinName("OutputCurrentVideoInputNames")]
|
||||||
/// <summary>
|
public JoinDataComplete OutputCurrentVideoInputNames = new JoinDataComplete(new JoinData() { JoinNumber = 2001, JoinSpan = 128 },
|
||||||
/// Range sets and reports the name for the corresponding input card
|
new JoinMetadata() { Label = "DM Blade Chassis Video Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
/// </summary>
|
|
||||||
public uint InputNames { get; set; }
|
[JoinName("InputCurrentResolution")]
|
||||||
/// <summary>
|
public JoinDataComplete InputCurrentResolution = new JoinDataComplete(new JoinData() { JoinNumber = 2401, JoinSpan = 128 },
|
||||||
/// Range sets and reports the name for the corresponding output card
|
new JoinMetadata() { Label = "DM Blade Chassis Input Current Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
/// </summary>
|
|
||||||
public uint OutputNames { get; set; }
|
public DmBladeChassisControllerJoinMap(uint joinStart)
|
||||||
/// <summary>
|
: base(joinStart, typeof(DmBladeChassisControllerJoinMap))
|
||||||
/// Range reports the name of the current video source for the corresponding output card
|
{
|
||||||
/// </summary>
|
}
|
||||||
public uint OutputCurrentVideoInputNames { get; set; }
|
|
||||||
/// <summary>
|
}
|
||||||
/// Range reports the current input resolution for each corresponding input card
|
}
|
||||||
/// </summary>
|
|
||||||
public uint InputCurrentResolution { get; set; }
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
public DmBladeChassisControllerJoinMap() {
|
|
||||||
//Digital/Analog
|
|
||||||
|
|
||||||
//Digital
|
|
||||||
IsOnline = 11;
|
|
||||||
VideoSyncStatus = 100; //101-299
|
|
||||||
InputEndpointOnline = 500; //501-699
|
|
||||||
OutputEndpointOnline = 700; //701-899
|
|
||||||
TxAdvancedIsPresent = 1000; //1001-1199
|
|
||||||
|
|
||||||
//Analog
|
|
||||||
OutputVideo = 100; //101-299
|
|
||||||
HdcpSupportState = 1000; //1001-1199
|
|
||||||
HdcpSupportCapability = 1200; //1201-1399
|
|
||||||
|
|
||||||
|
|
||||||
//Serial
|
|
||||||
InputNames = 100; //101-299
|
|
||||||
OutputNames = 300; //301-499
|
|
||||||
OutputCurrentVideoInputNames = 2000; //2001-2199
|
|
||||||
InputCurrentResolution = 2400; // 2401-2599
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OffsetJoinNumbers(uint joinStart) {
|
|
||||||
var joinOffset = joinStart - 1;
|
|
||||||
|
|
||||||
IsOnline = IsOnline + joinOffset;
|
|
||||||
OutputVideo = OutputVideo + joinOffset;
|
|
||||||
VideoSyncStatus = VideoSyncStatus + joinOffset;
|
|
||||||
InputNames = InputNames + joinOffset;
|
|
||||||
OutputNames = OutputNames + joinOffset;
|
|
||||||
OutputCurrentVideoInputNames = OutputCurrentVideoInputNames + joinOffset;
|
|
||||||
InputCurrentResolution = InputCurrentResolution + joinOffset;
|
|
||||||
InputEndpointOnline = InputEndpointOnline + joinOffset;
|
|
||||||
OutputEndpointOnline = OutputEndpointOnline + joinOffset;
|
|
||||||
HdcpSupportState = HdcpSupportState + joinOffset;
|
|
||||||
HdcpSupportCapability = HdcpSupportCapability + joinOffset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,151 +1,109 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public class DmChassisControllerJoinMap : JoinMapBase
|
public class DmChassisControllerJoinMap : JoinMapBaseAdvanced
|
||||||
{
|
{
|
||||||
#region Digital/Analogs
|
[JoinName("EnableAudioBreakaway")]
|
||||||
/// <summary>
|
public JoinDataComplete EnableAudioBreakaway = new JoinDataComplete(
|
||||||
/// Analog input sets System ID, output reports current ID as feedback.
|
new JoinData {JoinNumber = 4, JoinSpan = 1},
|
||||||
/// Digital input applies System ID, output is high when applying busy.
|
new JoinMetadata
|
||||||
/// </summary>
|
{
|
||||||
public uint SystemId { get; set; }
|
Label = "DM Chassis enable audio breakaway routing",
|
||||||
#endregion
|
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||||
|
JoinType = eJoinType.Digital
|
||||||
#region Digitals
|
});
|
||||||
/// <summary>
|
|
||||||
/// High when device is online
|
[JoinName("EnableUsbBreakaway")]
|
||||||
/// </summary>
|
public JoinDataComplete EnableUsbBreakaway = new JoinDataComplete(
|
||||||
public uint IsOnline { get; set; }
|
new JoinData { JoinNumber = 5, JoinSpan = 1 },
|
||||||
/// <summary>
|
new JoinMetadata
|
||||||
/// Range reports video sync feedback for each input
|
{
|
||||||
/// </summary>
|
Label = "DM Chassis enable USB breakaway routing",
|
||||||
public uint VideoSyncStatus { get; set; }
|
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||||
/// <summary>
|
JoinType = eJoinType.Digital
|
||||||
/// Range reports high if corresponding input's endpoint is online
|
});
|
||||||
/// </summary>
|
|
||||||
public uint InputEndpointOnline { get; set; }
|
[JoinName("SystemId")]
|
||||||
/// <summary>
|
public JoinDataComplete SystemId = new JoinDataComplete(new JoinData() { JoinNumber = 10, JoinSpan = 1 },
|
||||||
/// Range reports high if corresponding output's endpoint is online
|
new JoinMetadata() { Label = "DM Chassis SystemId Get/Set/Trigger/", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.DigitalAnalog });
|
||||||
/// </summary>
|
|
||||||
public uint OutputEndpointOnline { get; set; }
|
[JoinName("IsOnline")]
|
||||||
/// <summary>
|
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 },
|
||||||
/// Range reports high if corresponding input's transmitter supports bridging as a separate device for detailed AV switching, HDCP control, etc.
|
new JoinMetadata() { Label = "DM Chassis Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// </summary>
|
|
||||||
public uint TxAdvancedIsPresent { get; set; } // indicates that there is an attached transmitter that should be bridged to be interacted with
|
[JoinName("VideoSyncStatus")]
|
||||||
/// <summary>
|
public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 32 },
|
||||||
/// Range reports high if corresponding output is disabled by HDCP.
|
new JoinMetadata() { Label = "DM Input Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// </summary>
|
|
||||||
public uint OutputDisabledByHdcp { get; set; } // indicates that there is an attached transmitter that should be bridged to be interacted with
|
[JoinName("InputEndpointOnline")]
|
||||||
#endregion
|
public JoinDataComplete InputEndpointOnline = new JoinDataComplete(new JoinData() { JoinNumber = 501, JoinSpan = 32 },
|
||||||
|
new JoinMetadata() { Label = "DM Chassis Input Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
#region Analogs
|
|
||||||
/// <summary>
|
[JoinName("OutputEndpointOnline")]
|
||||||
/// Range sets and reports the current video source for the corresponding output
|
public JoinDataComplete OutputEndpointOnline = new JoinDataComplete(new JoinData() { JoinNumber = 701, JoinSpan = 32 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "DM Chassis Output Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint OutputVideo { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("TxAdvancedIsPresent")]
|
||||||
/// Range sets and reports the current audio source for the corresponding output
|
public JoinDataComplete TxAdvancedIsPresent = new JoinDataComplete(new JoinData() { JoinNumber = 1001, JoinSpan = 32 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "DM Chassis Tx Advanced Is Present", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint OutputAudio { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("OutputDisabledByHdcp")]
|
||||||
/// Range sets and reports the current Usb source for the corresponding output
|
public JoinDataComplete OutputDisabledByHdcp = new JoinDataComplete(new JoinData() { JoinNumber = 1201, JoinSpan = 32 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "DM Chassis Output Disabled by HDCP", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint OutputUsb { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("OutputVideo")]
|
||||||
/// Range sets and reports the current Usb source for the corresponding input
|
public JoinDataComplete OutputVideo = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 32 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "DM Chassis Output Video Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
public uint InputUsb { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("OutputAudio")]
|
||||||
/// Range sets and reports the current HDCP state for the corresponding input card
|
public JoinDataComplete OutputAudio = new JoinDataComplete(new JoinData() { JoinNumber = 301, JoinSpan = 32 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "DM Chassis Output Audio Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
public uint HdcpSupportState { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("OutputUsb")]
|
||||||
/// Range reports the highest supported HDCP state level for the corresponding input card
|
public JoinDataComplete OutputUsb = new JoinDataComplete(new JoinData() { JoinNumber = 501, JoinSpan = 32 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "DM Chassis Output USB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
public uint HdcpSupportCapability { get; set; }
|
|
||||||
#endregion
|
[JoinName("InputUsb")]
|
||||||
|
public JoinDataComplete InputUsb = new JoinDataComplete(new JoinData() { JoinNumber = 701, JoinSpan = 32 },
|
||||||
#region Serials
|
new JoinMetadata() { Label = "DM Chassis Input Usb Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
/// <summary>
|
|
||||||
/// Range sets and reports the name for the corresponding input card
|
[JoinName("HdcpSupportState")]
|
||||||
/// </summary>
|
public JoinDataComplete HdcpSupportState = new JoinDataComplete(new JoinData() { JoinNumber = 1001, JoinSpan = 32 },
|
||||||
public uint InputNames { get; set; }
|
new JoinMetadata() { Label = "DM Chassis Input HDCP Support State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
|
||||||
/// <summary>
|
|
||||||
/// Range sets and reports the name for the corresponding output card
|
[JoinName("HdcpSupportCapability")]
|
||||||
/// </summary>
|
public JoinDataComplete HdcpSupportCapability = new JoinDataComplete(new JoinData() { JoinNumber = 1201, JoinSpan = 32 },
|
||||||
public uint OutputNames { get; set; }
|
new JoinMetadata() { Label = "DM Chassis Input HDCP Support Capability", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
|
||||||
/// <summary>
|
|
||||||
/// Range reports the name of the current video source for the corresponding output card
|
[JoinName("InputNames")]
|
||||||
/// </summary>
|
public JoinDataComplete InputNames = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 32 },
|
||||||
public uint OutputCurrentVideoInputNames { get; set; }
|
new JoinMetadata() { Label = "DM Chassis Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
/// <summary>
|
|
||||||
/// Range reports the name of the current audio source for the corresponding output card
|
[JoinName("OutputNames")]
|
||||||
/// </summary>
|
public JoinDataComplete OutputNames = new JoinDataComplete(new JoinData() { JoinNumber = 301, JoinSpan = 32 },
|
||||||
public uint OutputCurrentAudioInputNames { get; set; }
|
new JoinMetadata() { Label = "DM Chassis Output Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
/// <summary>
|
|
||||||
/// Range reports the current input resolution for each corresponding input card
|
[JoinName("OutputCurrentVideoInputNames")]
|
||||||
/// </summary>
|
public JoinDataComplete OutputCurrentVideoInputNames = new JoinDataComplete(new JoinData() { JoinNumber = 2001, JoinSpan = 32 },
|
||||||
public uint InputCurrentResolution { get; set; }
|
new JoinMetadata() { Label = "DM Chassis Video Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
#endregion
|
|
||||||
|
[JoinName("OutputCurrentAudioInputNames")]
|
||||||
public DmChassisControllerJoinMap()
|
public JoinDataComplete OutputCurrentAudioInputNames = new JoinDataComplete(new JoinData() { JoinNumber = 2201, JoinSpan = 32 },
|
||||||
{
|
new JoinMetadata() { Label = "DM Chassis Audio Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
//Digital/Analog
|
|
||||||
SystemId = 10; // Analog sets/gets SystemId, digital input applies and provides feedback of ID change busy
|
[JoinName("InputCurrentResolution")]
|
||||||
|
public JoinDataComplete InputCurrentResolution = new JoinDataComplete(new JoinData() { JoinNumber = 2401, JoinSpan = 32 },
|
||||||
//Digital
|
new JoinMetadata() { Label = "DM Chassis Input Current Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
IsOnline = 11;
|
|
||||||
VideoSyncStatus = 100; //101-299
|
public DmChassisControllerJoinMap(uint joinStart)
|
||||||
InputEndpointOnline = 500; //501-699
|
: base(joinStart, typeof(DmChassisControllerJoinMap))
|
||||||
OutputEndpointOnline = 700; //701-899
|
{
|
||||||
TxAdvancedIsPresent = 1000; //1001-1199
|
}
|
||||||
OutputDisabledByHdcp = 1200; //1201-1399
|
}
|
||||||
|
}
|
||||||
//Analog
|
|
||||||
OutputVideo = 100; //101-299
|
|
||||||
OutputAudio = 300; //301-499
|
|
||||||
OutputUsb = 500; //501-699
|
|
||||||
InputUsb = 700; //701-899
|
|
||||||
HdcpSupportState = 1000; //1001-1199
|
|
||||||
HdcpSupportCapability = 1200; //1201-1399
|
|
||||||
|
|
||||||
|
|
||||||
//Serial
|
|
||||||
InputNames = 100; //101-299
|
|
||||||
OutputNames = 300; //301-499
|
|
||||||
OutputCurrentVideoInputNames = 2000; //2001-2199
|
|
||||||
OutputCurrentAudioInputNames = 2200; //2201-2399
|
|
||||||
InputCurrentResolution = 2400; // 2401-2599
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
|
||||||
{
|
|
||||||
var joinOffset = joinStart - 1;
|
|
||||||
|
|
||||||
SystemId = SystemId + joinOffset;
|
|
||||||
IsOnline = IsOnline + joinOffset;
|
|
||||||
OutputVideo = OutputVideo + joinOffset;
|
|
||||||
OutputAudio = OutputAudio + joinOffset;
|
|
||||||
OutputUsb = OutputUsb + joinOffset;
|
|
||||||
InputUsb = InputUsb + joinOffset;
|
|
||||||
VideoSyncStatus = VideoSyncStatus + joinOffset;
|
|
||||||
InputNames = InputNames + joinOffset;
|
|
||||||
OutputNames = OutputNames + joinOffset;
|
|
||||||
OutputCurrentVideoInputNames = OutputCurrentVideoInputNames + joinOffset;
|
|
||||||
OutputCurrentAudioInputNames = OutputCurrentAudioInputNames + joinOffset;
|
|
||||||
InputCurrentResolution = InputCurrentResolution + joinOffset;
|
|
||||||
InputEndpointOnline = InputEndpointOnline + joinOffset;
|
|
||||||
OutputEndpointOnline = OutputEndpointOnline + joinOffset;
|
|
||||||
HdcpSupportState = HdcpSupportState + joinOffset;
|
|
||||||
HdcpSupportCapability = HdcpSupportCapability + joinOffset;
|
|
||||||
OutputDisabledByHdcp = OutputDisabledByHdcp + joinOffset;
|
|
||||||
TxAdvancedIsPresent = TxAdvancedIsPresent + joinOffset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,75 +1,46 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
|
||||||
{
|
|
||||||
public class DmRmcControllerJoinMap : JoinMapBase
|
|
||||||
{
|
|
||||||
#region Digitals
|
|
||||||
/// <summary>
|
|
||||||
/// High when device is online (if not attached to a DMP3 or DM chassis with a CPU3 card
|
|
||||||
/// </summary>
|
|
||||||
public uint IsOnline { get; set; }
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Serials
|
|
||||||
/// <summary>
|
|
||||||
/// Reports the current output resolution
|
|
||||||
/// </summary>
|
|
||||||
public uint CurrentOutputResolution { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Reports the EDID manufacturer value
|
|
||||||
/// </summary>
|
|
||||||
public uint EdidManufacturer { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Reports the EDID Name value
|
|
||||||
/// </summary>
|
|
||||||
public uint EdidName { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Reports the EDID preffered timing value
|
|
||||||
/// </summary>
|
|
||||||
public uint EdidPrefferedTiming { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Reports the EDID serial number value
|
|
||||||
/// </summary>
|
|
||||||
public uint EdidSerialNumber { get; set; }
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Analogs
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
public uint AudioVideoSource { get; set; }
|
{
|
||||||
#endregion
|
public class DmRmcControllerJoinMap : JoinMapBaseAdvanced
|
||||||
|
{
|
||||||
|
[JoinName("IsOnline")]
|
||||||
|
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "DM RMC Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
public DmRmcControllerJoinMap()
|
[JoinName("CurrentOutputResolution")]
|
||||||
|
public JoinDataComplete CurrentOutputResolution = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "DM RMC Current Output Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
|
[JoinName("EdidManufacturer")]
|
||||||
|
public JoinDataComplete EdidManufacturer = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "DM RMC EDID Manufacturer", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
|
[JoinName("EdidName")]
|
||||||
|
public JoinDataComplete EdidName = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "DM RMC EDID Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
|
[JoinName("EdidPrefferedTiming")]
|
||||||
|
public JoinDataComplete EdidPrefferedTiming = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "DM RMC EDID Preferred Timing", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
|
[JoinName("EdidSerialNumber")]
|
||||||
|
public JoinDataComplete EdidSerialNumber = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "DM RMC EDID Serial Number", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
|
[JoinName("AudioVideoSource")]
|
||||||
|
public JoinDataComplete AudioVideoSource = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "DM RMC Audio Video Source Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
|
|
||||||
|
|
||||||
|
public DmRmcControllerJoinMap(uint joinStart)
|
||||||
|
: base(joinStart, typeof(DmRmcControllerJoinMap))
|
||||||
{
|
{
|
||||||
// Digital
|
|
||||||
IsOnline = 1;
|
|
||||||
|
|
||||||
// Serial
|
|
||||||
CurrentOutputResolution = 1;
|
|
||||||
EdidManufacturer = 2;
|
|
||||||
EdidName = 3;
|
|
||||||
EdidPrefferedTiming = 4;
|
|
||||||
EdidSerialNumber = 5;
|
|
||||||
|
|
||||||
//Analog
|
|
||||||
AudioVideoSource = 1;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
|
||||||
{
|
|
||||||
var joinOffset = joinStart - 1;
|
|
||||||
|
|
||||||
IsOnline = IsOnline + joinOffset;
|
|
||||||
CurrentOutputResolution = CurrentOutputResolution + joinOffset;
|
|
||||||
EdidManufacturer = EdidManufacturer + joinOffset;
|
|
||||||
EdidName = EdidName + joinOffset;
|
|
||||||
EdidPrefferedTiming = EdidPrefferedTiming + joinOffset;
|
|
||||||
EdidSerialNumber = EdidSerialNumber + joinOffset;
|
|
||||||
AudioVideoSource = AudioVideoSource + joinOffset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,98 +1,69 @@
|
|||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public class DmTxControllerJoinMap : JoinMapBase
|
public class DmTxControllerJoinMap : JoinMapBaseAdvanced
|
||||||
{
|
{
|
||||||
#region Digitals
|
[JoinName("IsOnline")]
|
||||||
/// <summary>
|
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
/// High when device is online (if not attached to a DMP3 or DM chassis with a CPU3 card
|
new JoinMetadata() { Label = "DM TX Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// </summary>
|
|
||||||
public uint IsOnline { get; set; }
|
[JoinName("VideoSyncStatus")]
|
||||||
/// <summary>
|
public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
|
||||||
/// High when video sync is detected
|
new JoinMetadata() { Label = "DM TX Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// </summary>
|
|
||||||
public uint VideoSyncStatus { get; set; }
|
[JoinName("FreeRunEnabled")]
|
||||||
/// <summary>
|
public JoinDataComplete FreeRunEnabled = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
|
||||||
///
|
new JoinMetadata() { Label = "DM TX Enable Free Run Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// </summary>
|
|
||||||
public uint FreeRunEnabled { get; set; }
|
[JoinName("Input1VideoSyncStatus")]
|
||||||
#endregion
|
public JoinDataComplete Input1VideoSyncStatus = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "Input 1 Video Sync Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
#region Analogs
|
|
||||||
/// <summary>
|
[JoinName("Input2VideoSyncStatus")]
|
||||||
/// Sets and reports the video source
|
public JoinDataComplete Input2VideoSyncStatus = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "Input 2 Video Sync Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint VideoInput { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("Input3VideoSyncStatus")]
|
||||||
/// Sets and reports the audio source
|
public JoinDataComplete Input3VideoSyncStatus = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "Input 3 Video Sync Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint AudioInput { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("CurrentInputResolution")]
|
||||||
/// Reports the highest supported HDCP state level for the corresponding input card
|
public JoinDataComplete CurrentInputResolution = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "DM TX Current Input Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
public uint HdcpSupportCapability { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("VideoInput")]
|
||||||
/// Sets and reports the current HDCP state for the corresponding input port
|
public JoinDataComplete VideoInput = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "DM TX Video Input Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
public uint Port1HdcpState { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("AudioInput")]
|
||||||
/// Sets and reports the current HDCP state for the corresponding input port
|
public JoinDataComplete AudioInput = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "DM TX Audio Input Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
public uint Port2HdcpState { get; set; }
|
|
||||||
|
[JoinName("HdcpSupportCapability")]
|
||||||
/// <summary>
|
public JoinDataComplete HdcpSupportCapability = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
|
||||||
/// Sets and reports the current VGA Brightness level
|
new JoinMetadata() { Label = "DM TX HDCP Support Capability", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
|
||||||
/// </summary>
|
|
||||||
public uint VgaBrightness { get; set; }
|
[JoinName("Port1HdcpState")]
|
||||||
|
public JoinDataComplete Port1HdcpState = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
|
||||||
/// <summary>
|
new JoinMetadata() { Label = "DM TX Port 1 HDCP State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
/// Sets and reports the current VGA Contrast level
|
|
||||||
/// </summary>
|
[JoinName("Port2HdcpState")]
|
||||||
public uint VgaContrast { get; set; }
|
public JoinDataComplete Port2HdcpState = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
|
||||||
#endregion
|
new JoinMetadata() { Label = "DM TX Port 2 HDCP State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
|
|
||||||
#region Serials
|
[JoinName("VgaBrightness")]
|
||||||
/// <summary>
|
public JoinDataComplete VgaBrightness = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 },
|
||||||
/// Reports the current input resolution
|
new JoinMetadata() { Label = "DM TX VGA Brightness", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
/// </summary>
|
|
||||||
public uint CurrentInputResolution { get; set; }
|
[JoinName("VgaContrast")]
|
||||||
#endregion
|
public JoinDataComplete VgaContrast = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "DM TX Online", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
|
|
||||||
public DmTxControllerJoinMap()
|
|
||||||
{
|
public DmTxControllerJoinMap(uint joinStart)
|
||||||
// Digital
|
: base(joinStart, typeof(DmTxControllerJoinMap))
|
||||||
IsOnline = 1;
|
{
|
||||||
VideoSyncStatus = 2;
|
}
|
||||||
FreeRunEnabled = 3;
|
}
|
||||||
// Serial
|
|
||||||
CurrentInputResolution = 1;
|
|
||||||
// Analog
|
|
||||||
VideoInput = 1;
|
|
||||||
AudioInput = 2;
|
|
||||||
HdcpSupportCapability = 3;
|
|
||||||
Port1HdcpState = 4;
|
|
||||||
Port2HdcpState = 5;
|
|
||||||
VgaBrightness = 6;
|
|
||||||
VgaContrast = 7;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
|
||||||
{
|
|
||||||
var joinOffset = joinStart - 1;
|
|
||||||
|
|
||||||
IsOnline = IsOnline + joinOffset;
|
|
||||||
VideoSyncStatus = VideoSyncStatus + joinOffset;
|
|
||||||
FreeRunEnabled = FreeRunEnabled + joinOffset;
|
|
||||||
CurrentInputResolution = CurrentInputResolution + joinOffset;
|
|
||||||
VideoInput = VideoInput + joinOffset;
|
|
||||||
AudioInput = AudioInput + joinOffset;
|
|
||||||
HdcpSupportCapability = HdcpSupportCapability + joinOffset;
|
|
||||||
Port1HdcpState = Port1HdcpState + joinOffset;
|
|
||||||
Port2HdcpState = Port2HdcpState + joinOffset;
|
|
||||||
VgaBrightness = VgaBrightness + joinOffset;
|
|
||||||
VgaContrast = VgaContrast + joinOffset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,69 +1,100 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public class DmpsAudioOutputControllerJoinMap : JoinMapBase
|
public class DmpsAudioOutputControllerJoinMap : JoinMapBaseAdvanced
|
||||||
{
|
{
|
||||||
#region Digital/Analog
|
|
||||||
/// <summary>
|
[JoinName("MasterVolumeLevel")]
|
||||||
/// Range of joins for Master Volume
|
public JoinDataComplete MasterVolumeLevel = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
/// Analog join 1 is volume level and feedback
|
new JoinMetadata() { Label = "Master Volume Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
/// Digital join 1 is Mute on and feedback
|
|
||||||
/// Digital join 2 is Mute off and feedback
|
[JoinName("MasterVolumeMuteOn")]
|
||||||
/// Digital join 3 is volume up
|
public JoinDataComplete MasterVolumeMuteOn = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
/// Digital join 4 is volume down
|
new JoinMetadata() { Label = "Master Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// </summary>
|
|
||||||
public uint MasterVolume { get; set; }
|
[JoinName("MasterVolumeMuteOff")]
|
||||||
/// <summary>
|
public JoinDataComplete MasterVolumeMuteOff = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
|
||||||
/// Range of joins for Source Volume
|
new JoinMetadata() { Label = "Master Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// Analog join 11 is volume level and feedback
|
|
||||||
/// Digital join 11 is Mute on and feedback
|
[JoinName("MasterVolumeUp")]
|
||||||
/// Digital join 12 is Mute off and feedback
|
public JoinDataComplete MasterVolumeUp = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
|
||||||
/// Digital join 13 is volume up
|
new JoinMetadata() { Label = "Master Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// Digital join 14 is volume down
|
|
||||||
/// </summary>
|
[JoinName("MasterVolumeDown")]
|
||||||
public uint SourceVolume { get; set; }
|
public JoinDataComplete MasterVolumeDown = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
|
||||||
/// <summary>
|
new JoinMetadata() { Label = "Master Volume Mute Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// Range of joins for Codec1 Volume (if applicable)
|
|
||||||
/// Analog join 21 is volume level and feedback
|
[JoinName("SourceVolumeLevel")]
|
||||||
/// Digital join 21 is Mute on and feedback
|
public JoinDataComplete SourceVolumeLevel = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 },
|
||||||
/// Digital join 22 is Mute off and feedback
|
new JoinMetadata() { Label = "Source Volume Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
/// Digital join 23 is volume up
|
|
||||||
/// Digital join 24 is volume down
|
[JoinName("SourceVolumeMuteOn")]
|
||||||
/// </summary>
|
public JoinDataComplete SourceVolumeMuteOn = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 },
|
||||||
public uint Codec1Volume { get; set; }
|
new JoinMetadata() { Label = "Source Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// <summary>
|
|
||||||
/// Range of joins for Codec2 Volume (if applicable)
|
[JoinName("SourceVolumeMuteOff")]
|
||||||
/// Analog join 31 is volume level and feedback
|
public JoinDataComplete SourceVolumeMuteOff = new JoinDataComplete(new JoinData() { JoinNumber = 12, JoinSpan = 1 },
|
||||||
/// Digital join 31 is Mute on and feedback
|
new JoinMetadata() { Label = "Source Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// Digital join 32 is Mute off and feedback
|
|
||||||
/// Digital join 33 is volume up
|
[JoinName("SourceVolumeUp")]
|
||||||
/// Digital join 34 is volume down
|
public JoinDataComplete SourceVolumeUp = new JoinDataComplete(new JoinData() { JoinNumber = 13, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "Source Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint Codec2Volume { get; set; }
|
|
||||||
#endregion
|
[JoinName("SourceVolumeDown")]
|
||||||
|
public JoinDataComplete SourceVolumeDown = new JoinDataComplete(new JoinData() { JoinNumber = 14, JoinSpan = 1 },
|
||||||
public DmpsAudioOutputControllerJoinMap()
|
new JoinMetadata() { Label = "Source Volume Mute Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
{
|
|
||||||
MasterVolume = 1; // 1-10
|
[JoinName("Codec1VolumeLevel")]
|
||||||
SourceVolume = 11; // 11-20
|
public JoinDataComplete Codec1VolumeLevel = new JoinDataComplete(new JoinData() { JoinNumber = 21, JoinSpan = 1 },
|
||||||
Codec1Volume = 21; // 21-30
|
new JoinMetadata() { Label = "Codec1 Volume Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
Codec2Volume = 31; // 31-40
|
|
||||||
}
|
[JoinName("Codec1VolumeMuteOn")]
|
||||||
|
public JoinDataComplete Codec1VolumeMuteOn = new JoinDataComplete(new JoinData() { JoinNumber = 21, JoinSpan = 1 },
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
new JoinMetadata() { Label = "Codec1 Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
{
|
|
||||||
var joinOffset = joinStart;
|
[JoinName("Codec1VolumeMuteOff")]
|
||||||
|
public JoinDataComplete Codec1VolumeMuteOff = new JoinDataComplete(new JoinData() { JoinNumber = 22, JoinSpan = 1 },
|
||||||
MasterVolume = MasterVolume + joinOffset;
|
new JoinMetadata() { Label = "Codec1 Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
SourceVolume = SourceVolume + joinOffset;
|
|
||||||
Codec1Volume = Codec1Volume + joinOffset;
|
[JoinName("Codec1VolumeUp")]
|
||||||
Codec2Volume = Codec2Volume + joinOffset;
|
public JoinDataComplete Codec1VolumeUp = new JoinDataComplete(new JoinData() { JoinNumber = 23, JoinSpan = 1 },
|
||||||
}
|
new JoinMetadata() { Label = "Codec1 Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
}
|
|
||||||
|
[JoinName("Codec1VolumeDown")]
|
||||||
|
public JoinDataComplete Codec1VolumeDown = new JoinDataComplete(new JoinData() { JoinNumber = 24, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "Codec1 Volume Mute Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
[JoinName("Codec2VolumeLevel")]
|
||||||
|
public JoinDataComplete Codec2VolumeLevel = new JoinDataComplete(new JoinData() { JoinNumber = 31, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "Codec2 Volume Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
|
|
||||||
|
[JoinName("Codec2VolumeMuteOn")]
|
||||||
|
public JoinDataComplete Codec2VolumeMuteOn = new JoinDataComplete(new JoinData() { JoinNumber = 31, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "Codec2 Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
[JoinName("Codec2VolumeMuteOff")]
|
||||||
|
public JoinDataComplete Codec2VolumeMuteOff = new JoinDataComplete(new JoinData() { JoinNumber = 32, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "Codec2 Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
[JoinName("Codec2VolumeUp")]
|
||||||
|
public JoinDataComplete Codec2VolumeUp = new JoinDataComplete(new JoinData() { JoinNumber = 33, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "Codec2 Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
[JoinName("Codec2VolumeDown")]
|
||||||
|
public JoinDataComplete Codec2VolumeDown = new JoinDataComplete(new JoinData() { JoinNumber = 34, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "Codec2 Volume Mute Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public DmpsAudioOutputControllerJoinMap(uint joinStart)
|
||||||
|
: base(joinStart, typeof(DmpsAudioOutputControllerJoinMap))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -7,121 +7,51 @@ using PepperDash.Essentials.Core;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public class DmpsRoutingControllerJoinMap : JoinMapBase
|
public class DmpsRoutingControllerJoinMap : JoinMapBaseAdvanced
|
||||||
{
|
{
|
||||||
#region Digitals
|
[JoinName("VideoSyncStatus")]
|
||||||
/// <summary>
|
public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 32 },
|
||||||
/// Range reports video sync feedback for each input
|
new JoinMetadata() { Label = "DM Input Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// </summary>
|
|
||||||
public uint VideoSyncStatus { get; set; }
|
[JoinName("InputEndpointOnline")]
|
||||||
/// <summary>
|
public JoinDataComplete InputEndpointOnline = new JoinDataComplete(new JoinData() { JoinNumber = 501, JoinSpan = 32 },
|
||||||
/// Range reports high if corresponding input's endpoint is online
|
new JoinMetadata() { Label = "DM Chassis Input Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// </summary>
|
|
||||||
public uint InputEndpointOnline { get; set; }
|
[JoinName("OutputEndpointOnline")]
|
||||||
/// <summary>
|
public JoinDataComplete OutputEndpointOnline = new JoinDataComplete(new JoinData() { JoinNumber = 701, JoinSpan = 32 },
|
||||||
/// Range reports high if corresponding output's endpoint is online
|
new JoinMetadata() { Label = "DM Chassis Output Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// </summary>
|
|
||||||
public uint OutputEndpointOnline { get; set; }
|
[JoinName("OutputVideo")]
|
||||||
#endregion
|
public JoinDataComplete OutputVideo = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 32 },
|
||||||
|
new JoinMetadata() { Label = "DM Chassis Output Video Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
|
|
||||||
#region Analogs
|
[JoinName("OutputAudio")]
|
||||||
/// <summary>
|
public JoinDataComplete OutputAudio = new JoinDataComplete(new JoinData() { JoinNumber = 301, JoinSpan = 32 },
|
||||||
/// Range sets and reports the current video source for the corresponding output
|
new JoinMetadata() { Label = "DM Chassis Output Audio Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
/// </summary>
|
|
||||||
public uint OutputVideo { get; set; }
|
[JoinName("InputNames")]
|
||||||
/// <summary>
|
public JoinDataComplete InputNames = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 32 },
|
||||||
/// Range sets and reports the current audio source for the corresponding output
|
new JoinMetadata() { Label = "DM Chassis Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
/// </summary>
|
|
||||||
public uint OutputAudio { get; set; }
|
[JoinName("OutputNames")]
|
||||||
/// <summary>
|
public JoinDataComplete OutputNames = new JoinDataComplete(new JoinData() { JoinNumber = 301, JoinSpan = 32 },
|
||||||
/// Range sets and reports the current Usb source for the corresponding output
|
new JoinMetadata() { Label = "DM Chassis Output Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
/// </summary>
|
|
||||||
//public uint OutputUsb { get; set; }
|
[JoinName("OutputCurrentVideoInputNames")]
|
||||||
///// <summary>
|
public JoinDataComplete OutputCurrentVideoInputNames = new JoinDataComplete(new JoinData() { JoinNumber = 2001, JoinSpan = 32 },
|
||||||
///// Range sets and reports the current Usb source for the corresponding input
|
new JoinMetadata() { Label = "DM Chassis Video Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
///// </summary>
|
|
||||||
//public uint InputUsb { get; set; }
|
[JoinName("OutputCurrentAudioInputNames")]
|
||||||
///// <summary>
|
public JoinDataComplete OutputCurrentAudioInputNames = new JoinDataComplete(new JoinData() { JoinNumber = 2201, JoinSpan = 32 },
|
||||||
///// Range sets and reports the current HDCP state for the corresponding input card
|
new JoinMetadata() { Label = "DM Chassis Audio Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
///// </summary>
|
|
||||||
//public uint HdcpSupportState { get; set; }
|
[JoinName("InputCurrentResolution")]
|
||||||
///// <summary>
|
public JoinDataComplete InputCurrentResolution = new JoinDataComplete(new JoinData() { JoinNumber = 2401, JoinSpan = 32 },
|
||||||
///// Range reports the highest supported HDCP state level for the corresponding input card
|
new JoinMetadata() { Label = "DM Chassis Input Current Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
///// </summary>
|
|
||||||
//public uint HdcpSupportCapability { get; set; }
|
public DmpsRoutingControllerJoinMap(uint joinStart)
|
||||||
#endregion
|
: base(joinStart, typeof(DmpsRoutingControllerJoinMap))
|
||||||
|
{
|
||||||
#region Serials
|
|
||||||
/// <summary>
|
|
||||||
/// Range sets and reports the name for the corresponding input card
|
|
||||||
/// </summary>
|
|
||||||
public uint InputNames { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Range sets and reports the name for the corresponding output card
|
|
||||||
/// </summary>
|
|
||||||
public uint OutputNames { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Range reports the name of the current video source for the corresponding output card
|
|
||||||
/// </summary>
|
|
||||||
public uint OutputCurrentVideoInputNames { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Range reports the name of the current audio source for the corresponding output card
|
|
||||||
/// </summary>
|
|
||||||
public uint OutputCurrentAudioInputNames { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Range reports the current input resolution for each corresponding input card
|
|
||||||
/// </summary>
|
|
||||||
public uint InputCurrentResolution { get; set; }
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
public DmpsRoutingControllerJoinMap()
|
|
||||||
{
|
|
||||||
//Digital
|
|
||||||
VideoSyncStatus = 100; //101-299
|
|
||||||
InputEndpointOnline = 500; //501-699
|
|
||||||
OutputEndpointOnline = 700; //701-899
|
|
||||||
|
|
||||||
//Analog
|
|
||||||
OutputVideo = 100; //101-299
|
|
||||||
OutputAudio = 300; //301-499
|
|
||||||
//OutputUsb = 500; //501-699
|
|
||||||
//InputUsb = 700; //701-899
|
|
||||||
VideoSyncStatus = 100; //101-299
|
|
||||||
//HdcpSupportState = 1000; //1001-1199
|
|
||||||
//HdcpSupportCapability = 1200; //1201-1399
|
|
||||||
|
|
||||||
|
|
||||||
//Serial
|
|
||||||
InputNames = 100; //101-299
|
|
||||||
OutputNames = 300; //301-499
|
|
||||||
OutputCurrentVideoInputNames = 2000; //2001-2199
|
|
||||||
OutputCurrentAudioInputNames = 2200; //2201-2399
|
|
||||||
InputCurrentResolution = 2400; // 2401-2599
|
|
||||||
InputEndpointOnline = 500; //501-699
|
|
||||||
OutputEndpointOnline = 700; //701-899
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
|
||||||
{
|
|
||||||
var joinOffset = joinStart - 1;
|
|
||||||
|
|
||||||
OutputVideo = OutputVideo + joinOffset;
|
|
||||||
OutputAudio = OutputAudio + joinOffset;
|
|
||||||
//OutputUsb = OutputUsb + joinOffset;
|
|
||||||
//InputUsb = InputUsb + joinOffset;
|
|
||||||
VideoSyncStatus = VideoSyncStatus + joinOffset;
|
|
||||||
InputNames = InputNames + joinOffset;
|
|
||||||
OutputNames = OutputNames + joinOffset;
|
|
||||||
OutputCurrentVideoInputNames = OutputCurrentVideoInputNames + joinOffset;
|
|
||||||
OutputCurrentAudioInputNames = OutputCurrentAudioInputNames + joinOffset;
|
|
||||||
InputCurrentResolution = InputCurrentResolution + joinOffset;
|
|
||||||
InputEndpointOnline = InputEndpointOnline + joinOffset;
|
|
||||||
OutputEndpointOnline = OutputEndpointOnline + joinOffset;
|
|
||||||
//HdcpSupportState = HdcpSupportState + joinOffset;
|
|
||||||
//HdcpSupportCapability = HdcpSupportCapability + joinOffset;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,33 +9,35 @@ using PepperDash.Essentials.Core;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public class GenericLightingJoinMap : JoinMapBase
|
public class GenericLightingJoinMap : JoinMapBaseAdvanced
|
||||||
{
|
{
|
||||||
public uint IsOnline { get; set; }
|
|
||||||
public uint SelectScene { get; set; }
|
[JoinName("IsOnline")]
|
||||||
public uint LightingSceneOffset { get; set; }
|
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
public uint ButtonVisibilityOffset { get; set; }
|
new JoinMetadata() { Label = "Lighting Controller Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint IntegrationIdSet { get; set; }
|
|
||||||
|
[JoinName("SelectScene")]
|
||||||
public GenericLightingJoinMap()
|
public JoinDataComplete SelectScene = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
{
|
new JoinMetadata() { Label = "Lighting Controller Select Scene By Index", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
// Digital
|
|
||||||
IsOnline = 1;
|
[JoinName("SelectSceneDirect")]
|
||||||
SelectScene = 1;
|
public JoinDataComplete SelectSceneDirect = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 10 },
|
||||||
IntegrationIdSet = 1;
|
new JoinMetadata() { Label = "Lighting Controller Select Scene", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.DigitalSerial });
|
||||||
LightingSceneOffset = 10;
|
|
||||||
ButtonVisibilityOffset = 40;
|
[JoinName("ButtonVisibility")]
|
||||||
// Analog
|
public JoinDataComplete ButtonVisibility = new JoinDataComplete(new JoinData() { JoinNumber = 41, JoinSpan = 10 },
|
||||||
}
|
new JoinMetadata() { Label = "Lighting Controller Button Visibility", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
[JoinName("IntegrationIdSet")]
|
||||||
{
|
public JoinDataComplete IntegrationIdSet = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
var joinOffset = joinStart - 1;
|
new JoinMetadata() { Label = "Lighting Controller Set Integration Id", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
IsOnline = IsOnline + joinOffset;
|
|
||||||
SelectScene = SelectScene + joinOffset;
|
|
||||||
LightingSceneOffset = LightingSceneOffset + joinOffset;
|
|
||||||
ButtonVisibilityOffset = ButtonVisibilityOffset + joinOffset;
|
public GenericLightingJoinMap(uint joinStart)
|
||||||
|
: base(joinStart, typeof(GenericLightingJoinMap))
|
||||||
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,25 +7,17 @@ using PepperDash.Essentials.Core;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public class GenericRelayControllerJoinMap : JoinMapBase
|
public class GenericRelayControllerJoinMap : JoinMapBaseAdvanced
|
||||||
{
|
{
|
||||||
#region Digitals
|
|
||||||
/// <summary>
|
|
||||||
/// Sets and reports the state of the relay (High = closed, Low = Open)
|
|
||||||
/// </summary>
|
|
||||||
public uint Relay { get; set; }
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
public GenericRelayControllerJoinMap()
|
[JoinName("Relay")]
|
||||||
{
|
public JoinDataComplete Relay = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
Relay = 1;
|
new JoinMetadata() { Label = "Device Relay State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
}
|
|
||||||
|
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
public GenericRelayControllerJoinMap(uint joinStart)
|
||||||
{
|
: base(joinStart, typeof(GenericRelayControllerJoinMap))
|
||||||
var joinOffset = joinStart - 1;
|
{
|
||||||
|
|
||||||
Relay = Relay + joinOffset;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,238 +1,176 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public class GlsOccupancySensorBaseJoinMap : JoinMapBase
|
public class GlsOccupancySensorBaseJoinMap : JoinMapBaseAdvanced
|
||||||
{
|
{
|
||||||
#region Digitals
|
[JoinName("IsOnline")]
|
||||||
|
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
/// <summary>
|
new JoinMetadata() { Label = "Occ Sensor Is Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// High when device is online
|
|
||||||
/// </summary>
|
[JoinName("ForceOccupied")]
|
||||||
public uint IsOnline { get; set; }
|
public JoinDataComplete ForceOccupied = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
|
||||||
/// <summary>
|
new JoinMetadata() { Label = "Occ Sensor Set to Occupied", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// Forces the device to report occupied status
|
|
||||||
/// </summary>
|
[JoinName("ForceVacant")]
|
||||||
public uint ForceOccupied { get; set; }
|
public JoinDataComplete ForceVacant = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
|
||||||
/// <summary>
|
new JoinMetadata() { Label = "Occ Sensor Set to Vacant", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// Forces the device to report vacant status
|
|
||||||
/// </summary>
|
[JoinName("EnableRawStates")]
|
||||||
public uint ForceVacant { get; set; }
|
public JoinDataComplete EnableRawStates = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
|
||||||
/// <summary>
|
new JoinMetadata() { Label = "Occ Sensor Enable Raw", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// Enables raw status reporting
|
|
||||||
/// </summary>
|
[JoinName("RoomOccupiedFeedback")]
|
||||||
public uint EnableRawStates { get; set; }
|
public JoinDataComplete RoomOccupiedFeedback = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
|
||||||
/// <summary>
|
new JoinMetadata() { Label = "Occ Sensor Room Is Occupied", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// High when raw occupancy is detected
|
|
||||||
/// </summary>
|
[JoinName("GraceOccupancyDetectedFeedback")]
|
||||||
public uint RawOccupancyFeedback { get; set; }
|
public JoinDataComplete GraceOccupancyDetectedFeedback = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
|
||||||
/// <summary>
|
new JoinMetadata() { Label = "Occ Sensor Grace Occupancy Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// High when PIR sensor detects motion
|
|
||||||
/// </summary>
|
[JoinName("RoomVacantFeedback")]
|
||||||
public uint RawOccupancyPirFeedback { get; set; }
|
public JoinDataComplete RoomVacantFeedback = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
|
||||||
/// <summary>
|
new JoinMetadata() { Label = "Occ Sensor Room Is Vacant", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// High when US sensor detects motion
|
|
||||||
/// </summary>
|
[JoinName("RawOccupancyFeedback")]
|
||||||
public uint RawOccupancyUsFeedback { get; set; }
|
public JoinDataComplete RawOccupancyFeedback = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
|
||||||
/// <summary>
|
new JoinMetadata() { Label = "Occ Sensor Raw Occupancy Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// High when occupancy is detected
|
|
||||||
/// </summary>
|
[JoinName("RawOccupancyPirFeedback")]
|
||||||
public uint RoomOccupiedFeedback { get; set; }
|
public JoinDataComplete RawOccupancyPirFeedback = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 },
|
||||||
/// <summary>
|
new JoinMetadata() { Label = "Occ Sensor Raw PIR Occupancy Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// Hich when occupancy is detected in the grace period
|
|
||||||
/// </summary>
|
[JoinName("RawOccupancyUsFeedback")]
|
||||||
public uint GraceOccupancyDetectedFeedback { get; set; }
|
public JoinDataComplete RawOccupancyUsFeedback = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 },
|
||||||
/// <summary>
|
new JoinMetadata() { Label = "Occ Sensor Raw US Occupancy Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// High when vacancy is detected
|
|
||||||
/// </summary>
|
[JoinName("EnableLedFlash")]
|
||||||
public uint RoomVacantFeedback { get; set; }
|
public JoinDataComplete EnableLedFlash = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "Occ Sensor Enable LED Flash", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// <summary>
|
|
||||||
/// Enables the LED Flash when set high
|
[JoinName("DisableLedFlash")]
|
||||||
/// </summary>
|
public JoinDataComplete DisableLedFlash = new JoinDataComplete(new JoinData() { JoinNumber = 12, JoinSpan = 1 },
|
||||||
public uint EnableLedFlash { get; set; }
|
new JoinMetadata() { Label = "Occ Sensor Disable LED Flash", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// <summary>
|
|
||||||
/// Disables the LED flash when set high
|
[JoinName("EnableShortTimeout")]
|
||||||
/// </summary>
|
public JoinDataComplete EnableShortTimeout = new JoinDataComplete(new JoinData() { JoinNumber = 13, JoinSpan = 1 },
|
||||||
public uint DisableLedFlash { get; set; }
|
new JoinMetadata() { Label = "Occ Sensor Enable Short Timeout", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// <summary>
|
|
||||||
/// Enables the Short Timeout
|
[JoinName("DisableShortTimeout")]
|
||||||
/// </summary>
|
public JoinDataComplete DisableShortTimeout = new JoinDataComplete(new JoinData() { JoinNumber = 14, JoinSpan = 1 },
|
||||||
public uint EnableShortTimeout { get; set; }
|
new JoinMetadata() { Label = "Occ Sensor Disable Short Timeout", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// <summary>
|
|
||||||
/// Disables the Short Timout
|
[JoinName("OrWhenVacated")]
|
||||||
/// </summary>
|
public JoinDataComplete OrWhenVacated = new JoinDataComplete(new JoinData() { JoinNumber = 15, JoinSpan = 1 },
|
||||||
public uint DisableShortTimeout { get; set; }
|
new JoinMetadata() { Label = "Occ Sensor Set To Vacant when Either Sensor is Vacant", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// <summary>
|
|
||||||
/// Set high to enable one technology to trigger occupancy
|
[JoinName("AndWhenVacated")]
|
||||||
/// </summary>
|
public JoinDataComplete AndWhenVacated = new JoinDataComplete(new JoinData() { JoinNumber = 16, JoinSpan = 1 },
|
||||||
public uint OrWhenVacated { get; set; }
|
new JoinMetadata() { Label = "Occ Sensor Set To Vacant when Both Sensors are Vacant", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// <summary>
|
|
||||||
/// Set high to require both technologies to trigger occupancy
|
[JoinName("EnableUsA")]
|
||||||
/// </summary>
|
public JoinDataComplete EnableUsA = new JoinDataComplete(new JoinData() { JoinNumber = 17, JoinSpan = 1 },
|
||||||
public uint AndWhenVacated { get; set; }
|
new JoinMetadata() { Label = "Occ Sensor Enable Ultrasonic Sensor A", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// <summary>
|
|
||||||
/// Enables Ultrasonic Sensor A
|
[JoinName("DisableUsA")]
|
||||||
/// </summary>
|
public JoinDataComplete DisableUsA = new JoinDataComplete(new JoinData() { JoinNumber = 18, JoinSpan = 1 },
|
||||||
public uint EnableUsA { get; set; }
|
new JoinMetadata() { Label = "Occ Sensor Disable Ultrasonic Sensor A", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// <summary>
|
|
||||||
/// Disables Ultrasonic Sensor A
|
[JoinName("EnableUsB")]
|
||||||
/// </summary>
|
public JoinDataComplete EnableUsB = new JoinDataComplete(new JoinData() { JoinNumber = 19, JoinSpan = 1 },
|
||||||
public uint DisableUsA { get; set; }
|
new JoinMetadata() { Label = "Occ Sensor Enable Ultrasonic Sensor B", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// <summary>
|
|
||||||
/// Enables Ultrasonic Sensor B
|
[JoinName("DisableUsB")]
|
||||||
/// </summary>
|
public JoinDataComplete DisableUsB = new JoinDataComplete(new JoinData() { JoinNumber = 20, JoinSpan = 1 },
|
||||||
public uint EnableUsB { get; set; }
|
new JoinMetadata() { Label = "Occ Sensor Disable Ultrasonic Sensor B", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// <summary>
|
|
||||||
/// Disables Ultrasonic Sensor B
|
[JoinName("EnablePir")]
|
||||||
/// </summary>
|
public JoinDataComplete EnablePir = new JoinDataComplete(new JoinData() { JoinNumber = 21, JoinSpan = 1 },
|
||||||
public uint DisableUsB { get; set; }
|
new JoinMetadata() { Label = "Occ Sensor Enable IR Sensor", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// <summary>
|
|
||||||
/// Enables Pir
|
[JoinName("DisablePir")]
|
||||||
/// </summary>
|
public JoinDataComplete DisablePir = new JoinDataComplete(new JoinData() { JoinNumber = 22, JoinSpan = 1 },
|
||||||
public uint EnablePir { get; set; }
|
new JoinMetadata() { Label = "Occ Sensor Disable IR Sensor", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// <summary>
|
|
||||||
/// Disables Pir
|
[JoinName("IncrementUsInOccupiedState")]
|
||||||
/// </summary>
|
public JoinDataComplete IncrementUsInOccupiedState = new JoinDataComplete(new JoinData() { JoinNumber = 23, JoinSpan = 1 },
|
||||||
public uint DisablePir { get; set; }
|
new JoinMetadata() { Label = "Occ Sensor Increment US Occupied State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint IncrementUsInOccupiedState { get; set; }
|
|
||||||
public uint DecrementUsInOccupiedState { get; set; }
|
[JoinName("DecrementUsInOccupiedState")]
|
||||||
public uint IncrementUsInVacantState { get; set; }
|
public JoinDataComplete DecrementUsInOccupiedState = new JoinDataComplete(new JoinData() { JoinNumber = 24, JoinSpan = 1 },
|
||||||
public uint DecrementUsInVacantState { get; set; }
|
new JoinMetadata() { Label = "Occ Sensor Decrement US Occupied State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint IncrementPirInOccupiedState { get; set; }
|
|
||||||
public uint DecrementPirInOccupiedState { get; set; }
|
[JoinName("IncrementUsInVacantState")]
|
||||||
public uint IncrementPirInVacantState { get; set; }
|
public JoinDataComplete IncrementUsInVacantState = new JoinDataComplete(new JoinData() { JoinNumber = 25, JoinSpan = 1 },
|
||||||
public uint DecrementPirInVacantState { get; set; }
|
new JoinMetadata() { Label = "Occ Sensor Increment US Vacant State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
#endregion
|
|
||||||
|
[JoinName("DecrementUsInVacantState")]
|
||||||
#region Analogs
|
public JoinDataComplete DecrementUsInVacantState = new JoinDataComplete(new JoinData() { JoinNumber = 26, JoinSpan = 1 },
|
||||||
/// <summary>
|
new JoinMetadata() { Label = "Occ Sensor Decrement US Vacant State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// Sets adn reports the remote timeout value
|
|
||||||
/// </summary>
|
[JoinName("IncrementPirInOccupiedState")]
|
||||||
public uint Timeout { get; set; }
|
public JoinDataComplete IncrementPirInOccupiedState = new JoinDataComplete(new JoinData() { JoinNumber = 27, JoinSpan = 1 },
|
||||||
/// <summary>
|
new JoinMetadata() { Label = "Occ Sensor Increment IR Occupied State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// Reports the local timeout value
|
|
||||||
/// </summary>
|
[JoinName("DecrementPirInOccupiedState")]
|
||||||
public uint TimeoutLocalFeedback { get; set; }
|
public JoinDataComplete DecrementPirInOccupiedState = new JoinDataComplete(new JoinData() { JoinNumber = 28, JoinSpan = 1 },
|
||||||
/// <summary>
|
new JoinMetadata() { Label = "Occ Sensor Decrement IR Occupied State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// Sets the minimum internal photo sensor value and reports the current level
|
|
||||||
/// </summary>
|
[JoinName("IncrementPirInVacantState")]
|
||||||
public uint InternalPhotoSensorValue { get; set; }
|
public JoinDataComplete IncrementPirInVacantState = new JoinDataComplete(new JoinData() { JoinNumber = 29, JoinSpan = 1 },
|
||||||
/// <summary>
|
new JoinMetadata() { Label = "Occ Sensor Increment IR Vacant State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// Sets the minimum external photo sensor value and reports the current level
|
|
||||||
/// </summary>
|
[JoinName("DecrementPirInVacantState")]
|
||||||
public uint ExternalPhotoSensorValue { get; set; }
|
public JoinDataComplete DecrementPirInVacantState = new JoinDataComplete(new JoinData() { JoinNumber = 30, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "Occ Sensor Decrement IR Vacant State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint UsSensitivityInOccupiedState { get; set; }
|
|
||||||
|
[JoinName("Timeout")]
|
||||||
public uint UsSensitivityInVacantState { get; set; }
|
public JoinDataComplete Timeout = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "Occ Sensor Timeout Value", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
public uint PirSensitivityInOccupiedState { get; set; }
|
|
||||||
|
[JoinName("TimeoutLocalFeedback")]
|
||||||
public uint PirSensitivityInVacantState { get; set; }
|
public JoinDataComplete TimeoutLocalFeedback = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
|
||||||
#endregion
|
new JoinMetadata() { Label = "Occ Sensor Local Timeout Value", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
|
||||||
|
|
||||||
#region Serial
|
[JoinName("InternalPhotoSensorValue")]
|
||||||
public uint Name { get; set; }
|
public JoinDataComplete InternalPhotoSensorValue = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
|
||||||
#endregion
|
new JoinMetadata() { Label = "Occ Sensor Internal PhotoSensor Value", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
|
||||||
|
|
||||||
public GlsOccupancySensorBaseJoinMap()
|
[JoinName("ExternalPhotoSensorValue")]
|
||||||
{
|
public JoinDataComplete ExternalPhotoSensorValue = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
|
||||||
IsOnline = 1;
|
new JoinMetadata() { Label = "Occ Sensor External PhotoSensor Value", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
|
||||||
ForceOccupied = 2;
|
|
||||||
ForceVacant = 3;
|
[JoinName("UsSensitivityInOccupiedState")]
|
||||||
EnableRawStates = 4;
|
public JoinDataComplete UsSensitivityInOccupiedState = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
|
||||||
RoomOccupiedFeedback = 2;
|
new JoinMetadata() { Label = "Occ Sensor Ultrasonic Sensitivity in Occupied State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
|
||||||
GraceOccupancyDetectedFeedback = 3;
|
|
||||||
RoomVacantFeedback = 4;
|
[JoinName("UsSensitivityInVacantState")]
|
||||||
RawOccupancyFeedback = 5;
|
public JoinDataComplete UsSensitivityInVacantState = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 },
|
||||||
RawOccupancyPirFeedback = 6;
|
new JoinMetadata() { Label = "Occ Sensor Ultrasonic Sensitivity in Vacant State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
|
||||||
RawOccupancyUsFeedback = 7;
|
|
||||||
EnableLedFlash = 11;
|
[JoinName("PirSensitivityInOccupiedState")]
|
||||||
DisableLedFlash = 12;
|
public JoinDataComplete PirSensitivityInOccupiedState = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 },
|
||||||
EnableShortTimeout = 13;
|
new JoinMetadata() { Label = "Occ Sensor PIR Sensitivity in Occupied State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
|
||||||
DisableShortTimeout = 14;
|
|
||||||
OrWhenVacated = 15;
|
[JoinName("PirSensitivityInVacantState")]
|
||||||
AndWhenVacated = 16;
|
public JoinDataComplete PirSensitivityInVacantState = new JoinDataComplete(new JoinData() { JoinNumber = 8, JoinSpan = 1 },
|
||||||
EnableUsA = 17;
|
new JoinMetadata() { Label = "Occ Sensor Ultrasonic Sensitivity in Vacant State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
|
||||||
DisableUsA = 18;
|
|
||||||
EnableUsB = 19;
|
[JoinName("Name")]
|
||||||
DisableUsB = 20;
|
public JoinDataComplete Name = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
EnablePir = 21;
|
new JoinMetadata() { Label = "Occ Sensor Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
DisablePir = 22;
|
|
||||||
IncrementUsInOccupiedState = 23;
|
|
||||||
DecrementUsInOccupiedState = 24;
|
|
||||||
IncrementUsInVacantState = 25;
|
public GlsOccupancySensorBaseJoinMap(uint joinStart)
|
||||||
DecrementUsInVacantState = 26;
|
: base(joinStart, typeof(GlsOccupancySensorBaseJoinMap))
|
||||||
IncrementPirInOccupiedState = 27;
|
{
|
||||||
DecrementPirInOccupiedState = 28;
|
}
|
||||||
IncrementPirInVacantState = 29;
|
|
||||||
DecrementPirInVacantState = 30;
|
}
|
||||||
|
}
|
||||||
Timeout = 1;
|
|
||||||
TimeoutLocalFeedback = 2;
|
|
||||||
InternalPhotoSensorValue = 3;
|
|
||||||
ExternalPhotoSensorValue = 4;
|
|
||||||
UsSensitivityInOccupiedState = 5;
|
|
||||||
UsSensitivityInVacantState = 6;
|
|
||||||
PirSensitivityInOccupiedState = 7;
|
|
||||||
PirSensitivityInVacantState = 8;
|
|
||||||
|
|
||||||
Name = 1;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
|
||||||
{
|
|
||||||
var joinOffset = joinStart - 1;
|
|
||||||
|
|
||||||
IsOnline = IsOnline + joinOffset;
|
|
||||||
ForceOccupied = ForceOccupied + joinOffset;
|
|
||||||
ForceVacant = ForceVacant + joinOffset;
|
|
||||||
EnableRawStates = EnableRawStates + joinOffset;
|
|
||||||
RoomOccupiedFeedback = RoomOccupiedFeedback + joinOffset;
|
|
||||||
GraceOccupancyDetectedFeedback = GraceOccupancyDetectedFeedback + joinOffset;
|
|
||||||
RoomVacantFeedback = RoomVacantFeedback + joinOffset;
|
|
||||||
RawOccupancyFeedback = RawOccupancyFeedback + joinOffset;
|
|
||||||
RawOccupancyPirFeedback = RawOccupancyPirFeedback + joinOffset;
|
|
||||||
RawOccupancyUsFeedback = RawOccupancyUsFeedback + joinOffset;
|
|
||||||
EnableLedFlash = EnableLedFlash + joinOffset;
|
|
||||||
DisableLedFlash = DisableLedFlash + joinOffset;
|
|
||||||
EnableShortTimeout = EnableShortTimeout + joinOffset;
|
|
||||||
DisableShortTimeout = DisableShortTimeout + joinOffset;
|
|
||||||
OrWhenVacated = OrWhenVacated + joinOffset;
|
|
||||||
AndWhenVacated = AndWhenVacated + joinOffset;
|
|
||||||
EnableUsA = EnableUsA + joinOffset;
|
|
||||||
DisableUsA = DisableUsA + joinOffset;
|
|
||||||
EnableUsB = EnableUsB + joinOffset;
|
|
||||||
DisableUsB = DisableUsB + joinOffset;
|
|
||||||
EnablePir = EnablePir + joinOffset;
|
|
||||||
DisablePir = DisablePir + joinOffset;
|
|
||||||
IncrementUsInOccupiedState = IncrementUsInOccupiedState + joinOffset;
|
|
||||||
DecrementUsInOccupiedState = DecrementUsInOccupiedState + joinOffset;
|
|
||||||
IncrementUsInVacantState = IncrementUsInVacantState + joinOffset;
|
|
||||||
DecrementUsInVacantState = DecrementUsInVacantState + joinOffset;
|
|
||||||
IncrementPirInOccupiedState = IncrementPirInOccupiedState + joinOffset;
|
|
||||||
DecrementPirInOccupiedState = DecrementPirInOccupiedState + joinOffset;
|
|
||||||
IncrementPirInVacantState = IncrementPirInVacantState + joinOffset;
|
|
||||||
DecrementPirInVacantState = DecrementPirInVacantState + joinOffset;
|
|
||||||
|
|
||||||
Timeout = Timeout + joinOffset;
|
|
||||||
TimeoutLocalFeedback = TimeoutLocalFeedback + joinOffset;
|
|
||||||
InternalPhotoSensorValue = InternalPhotoSensorValue + joinOffset;
|
|
||||||
ExternalPhotoSensorValue = ExternalPhotoSensorValue + joinOffset;
|
|
||||||
UsSensitivityInOccupiedState = UsSensitivityInOccupiedState + joinOffset;
|
|
||||||
UsSensitivityInVacantState = UsSensitivityInVacantState + joinOffset;
|
|
||||||
PirSensitivityInOccupiedState = PirSensitivityInOccupiedState + joinOffset;
|
|
||||||
PirSensitivityInVacantState = PirSensitivityInVacantState + joinOffset;
|
|
||||||
|
|
||||||
Name = Name + joinOffset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -7,113 +7,62 @@ using PepperDash.Essentials.Core;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public class HdMdxxxCEControllerJoinMap : JoinMapBase
|
public class HdMdxxxCEControllerJoinMap : JoinMapBaseAdvanced
|
||||||
{
|
{
|
||||||
#region Digitals
|
|
||||||
/// <summary>
|
|
||||||
/// High when the pair is online
|
|
||||||
/// </summary>
|
|
||||||
public uint IsOnline { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
[JoinName("IsOnline")]
|
||||||
/// High when the remote end device is online
|
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "Device Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint RemoteEndDetected { get; set; }
|
|
||||||
|
[JoinName("RemoteEndDetected")]
|
||||||
/// <summary>
|
public JoinDataComplete RemoteEndDetected = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
|
||||||
/// Sets Auto Route On and provides feedback
|
new JoinMetadata() { Label = "Device Remote End Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// </summary>
|
|
||||||
public uint AutoRouteOn { get; set; }
|
[JoinName("AutoRouteOn")]
|
||||||
|
public JoinDataComplete AutoRouteOn = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
|
||||||
/// <summary>
|
new JoinMetadata() { Label = "Device Auto Route On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// Sets Auto Route Off and provides feedback
|
|
||||||
/// </summary>
|
[JoinName("AutoRouteOff")]
|
||||||
public uint AutoRouteOff { get; set; }
|
public JoinDataComplete AutoRouteOff = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "Device Auto Route Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// <summary>
|
|
||||||
/// Sets Priority Routing On and provides feedback
|
[JoinName("PriorityRoutingOn")]
|
||||||
/// </summary>
|
public JoinDataComplete PriorityRoutingOn = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
|
||||||
public uint PriorityRoutingOn { get; set; }
|
new JoinMetadata() { Label = "Device Priority Routing On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
/// <summary>
|
[JoinName("PriorityRoutingOff")]
|
||||||
/// Sets Priority Routing Off and provides feedback
|
public JoinDataComplete PriorityRoutingOff = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "Device Priority Routing Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint PriorityRoutingOff { get; set; }
|
|
||||||
|
[JoinName("InputOnScreenDisplayEnabled")]
|
||||||
/// <summary>
|
public JoinDataComplete InputOnScreenDisplayEnabled = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 },
|
||||||
/// Enables OSD and provides feedback
|
new JoinMetadata() { Label = "Device Input OSD Enabled", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// </summary>
|
|
||||||
public uint InputOnScreenDisplayEnabled { get; set; }
|
[JoinName("InputOnScreenDisplayDisabled")]
|
||||||
|
public JoinDataComplete InputOnScreenDisplayDisabled = new JoinDataComplete(new JoinData() { JoinNumber = 8, JoinSpan = 1 },
|
||||||
/// <summary>
|
new JoinMetadata() { Label = "Device Input OSD Disabled", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// Disables OSD and provides feedback
|
|
||||||
/// </summary>
|
[JoinName("SyncDetected")]
|
||||||
public uint InputOnScreenDisplayDisabled { get; set; }
|
public JoinDataComplete SyncDetected = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 5 },
|
||||||
|
new JoinMetadata() { Label = "Device Sync Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// <summary>
|
|
||||||
/// Provides Video Sync Detected feedback for each input
|
[JoinName("VideoSource")]
|
||||||
/// </summary>
|
public JoinDataComplete VideoSource = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 5 },
|
||||||
public uint SyncDetected { get; set; }
|
new JoinMetadata() { Label = "Device Video Source Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
#endregion
|
|
||||||
|
[JoinName("SourceCount")]
|
||||||
#region Analogs
|
public JoinDataComplete SourceCount = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 5 },
|
||||||
/// <summary>
|
new JoinMetadata() { Label = "Device Video Source Count", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
|
||||||
/// Sets the video source for the receiver's HDMI out and provides feedback
|
|
||||||
/// </summary>
|
[JoinName("SourceNames")]
|
||||||
public uint VideoSource { get; set; }
|
public JoinDataComplete SourceNames = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 5 },
|
||||||
|
new JoinMetadata() { Label = "Device Video Source Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
/// <summary>
|
|
||||||
/// Indicates the number of sources supported by the Tx/Rx pair
|
|
||||||
/// </summary>
|
|
||||||
public uint SourceCount { get; set; }
|
public HdMdxxxCEControllerJoinMap(uint joinStart)
|
||||||
#endregion
|
: base(joinStart, typeof(HdMdxxxCEControllerJoinMap))
|
||||||
|
{
|
||||||
#region Serials
|
|
||||||
/// <summary>
|
|
||||||
/// Indicates the name of each input port
|
|
||||||
/// </summary>
|
|
||||||
public uint SourceNames { get; set; }
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
public HdMdxxxCEControllerJoinMap()
|
|
||||||
{
|
|
||||||
//Digital
|
|
||||||
IsOnline = 1;
|
|
||||||
RemoteEndDetected = 2;
|
|
||||||
AutoRouteOn = 3;
|
|
||||||
AutoRouteOff = 4;
|
|
||||||
PriorityRoutingOn = 5;
|
|
||||||
PriorityRoutingOff = 6;
|
|
||||||
InputOnScreenDisplayEnabled = 7;
|
|
||||||
InputOnScreenDisplayDisabled = 8;
|
|
||||||
SyncDetected = 10; // 11-15
|
|
||||||
|
|
||||||
//Analog
|
|
||||||
VideoSource = 1;
|
|
||||||
SourceCount = 2;
|
|
||||||
|
|
||||||
//Serials
|
|
||||||
SourceNames = 10; // 11-15
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
|
||||||
{
|
|
||||||
var joinOffset = joinStart - 1;
|
|
||||||
|
|
||||||
IsOnline = IsOnline + joinOffset;
|
|
||||||
RemoteEndDetected = RemoteEndDetected + joinOffset;
|
|
||||||
AutoRouteOn = AutoRouteOn + joinOffset;
|
|
||||||
AutoRouteOff = AutoRouteOff + joinOffset;
|
|
||||||
PriorityRoutingOn = PriorityRoutingOn + joinOffset;
|
|
||||||
PriorityRoutingOff = PriorityRoutingOff + joinOffset;
|
|
||||||
InputOnScreenDisplayEnabled = InputOnScreenDisplayEnabled + joinOffset;
|
|
||||||
InputOnScreenDisplayDisabled = InputOnScreenDisplayDisabled + joinOffset;
|
|
||||||
SyncDetected = SyncDetected + joinOffset;
|
|
||||||
|
|
||||||
VideoSource = VideoSource + joinOffset;
|
|
||||||
SourceCount = SourceCount + joinOffset;
|
|
||||||
|
|
||||||
SourceNames = SourceNames + joinOffset;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,25 +7,17 @@ using PepperDash.Essentials.Core;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public class IDigitalInputJoinMap : JoinMapBase
|
public class IDigitalInputJoinMap : JoinMapBaseAdvanced
|
||||||
{
|
{
|
||||||
#region Digitals
|
|
||||||
/// <summary>
|
|
||||||
/// Reports the state of the digital input
|
|
||||||
/// </summary>
|
|
||||||
public uint InputState { get; set; }
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
public IDigitalInputJoinMap()
|
[JoinName("InputState")]
|
||||||
{
|
public JoinDataComplete InputState = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
InputState = 1;
|
new JoinMetadata() { Label = "Room Email Url", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
}
|
|
||||||
|
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
public IDigitalInputJoinMap(uint joinStart)
|
||||||
{
|
: base(joinStart, typeof(IDigitalInputJoinMap))
|
||||||
var joinOffset = joinStart - 1;
|
{
|
||||||
|
|
||||||
InputState = InputState + joinOffset;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,204 +9,225 @@ using Crestron.SimplSharp.Reflection;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public class SetTopBoxControllerJoinMap : JoinMapBase
|
public class SetTopBoxControllerJoinMap : JoinMapBaseAdvanced
|
||||||
{
|
{
|
||||||
#region Digitals
|
[JoinName("PowerOn")]
|
||||||
public uint DvrList { get; set; } //
|
public JoinDataComplete PowerOn = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
public uint Replay { get; set; }
|
new JoinMetadata() { Label = "STB Power On", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint Up { get; set; } //
|
|
||||||
public uint Down { get; set; } //
|
[JoinName("PowerOff")]
|
||||||
public uint Left { get; set; } //
|
public JoinDataComplete PowerOff = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
|
||||||
public uint Right { get; set; } //
|
new JoinMetadata() { Label = "STB Power Off", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint Select { get; set; } //
|
|
||||||
public uint Menu { get; set; } //
|
[JoinName("PowerToggle")]
|
||||||
public uint Exit { get; set; } //
|
public JoinDataComplete PowerToggle = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
|
||||||
public uint Digit0 { get; set; } //
|
new JoinMetadata() { Label = "STB Power Toggle", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint Digit1 { get; set; } //
|
|
||||||
public uint Digit2 { get; set; } //
|
[JoinName("HasDpad")]
|
||||||
public uint Digit3 { get; set; } //
|
public JoinDataComplete HasDpad = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
|
||||||
public uint Digit4 { get; set; } //
|
new JoinMetadata() { Label = "STB Has DPad", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint Digit5 { get; set; } //
|
|
||||||
public uint Digit6 { get; set; } //
|
[JoinName("Up")]
|
||||||
public uint Digit7 { get; set; } //
|
public JoinDataComplete Up = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
|
||||||
public uint Digit8 { get; set; } //
|
new JoinMetadata() { Label = "STB Nav Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint Digit9 { get; set; } //
|
|
||||||
public uint Dash { get; set; } //
|
[JoinName("Down")]
|
||||||
public uint KeypadEnter { get; set; } //
|
public JoinDataComplete Down = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
|
||||||
public uint ChannelUp { get; set; } //
|
new JoinMetadata() { Label = "STB Nav Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint ChannelDown { get; set; } //
|
|
||||||
public uint LastChannel { get; set; } //
|
[JoinName("Left")]
|
||||||
public uint Guide { get; set; } //
|
public JoinDataComplete Left = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 },
|
||||||
public uint Info { get; set; } //
|
new JoinMetadata() { Label = "STB Nav Left", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint Red { get; set; } //
|
|
||||||
public uint Green { get; set; } //
|
[JoinName("Right")]
|
||||||
public uint Yellow { get; set; } //
|
public JoinDataComplete Right = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 },
|
||||||
public uint Blue { get; set; } //
|
new JoinMetadata() { Label = "STB Nav Right", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint ChapMinus { get; set; }
|
|
||||||
public uint ChapPlus { get; set; }
|
[JoinName("Select")]
|
||||||
public uint FFwd { get; set; } //
|
public JoinDataComplete Select = new JoinDataComplete(new JoinData() { JoinNumber = 8, JoinSpan = 1 },
|
||||||
public uint Pause { get; set; } //
|
new JoinMetadata() { Label = "STB Select", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint Play { get; set; } //
|
|
||||||
public uint Record { get; set; }
|
[JoinName("Menu")]
|
||||||
public uint Rewind { get; set; } //
|
public JoinDataComplete Menu = new JoinDataComplete(new JoinData() { JoinNumber = 9, JoinSpan = 1 },
|
||||||
public uint Stop { get; set; } //
|
new JoinMetadata() { Label = "STB Menu", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
public uint PowerOn { get; set; } //
|
[JoinName("Exit")]
|
||||||
public uint PowerOff { get; set; } //
|
public JoinDataComplete Exit = new JoinDataComplete(new JoinData() { JoinNumber = 10, JoinSpan = 1 },
|
||||||
public uint PowerToggle { get; set; } //
|
new JoinMetadata() { Label = "STB Exit", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
public uint HasKeypadAccessoryButton1 { get; set; }
|
[JoinName("HasNumeric")]
|
||||||
public uint HasKeypadAccessoryButton2 { get; set; }
|
public JoinDataComplete HasNumeric = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "STB Has Numeric", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint KeypadAccessoryButton1Press { get; set; }
|
|
||||||
public uint KeypadAccessoryButton2Press { get; set; }
|
[JoinName("Digit0")]
|
||||||
|
public JoinDataComplete Digit0 = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "STB Digit 0", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint HasDvr { get; set; }
|
|
||||||
public uint HasPresets { get; set; }
|
[JoinName("Digit1")]
|
||||||
public uint HasNumeric { get; set; }
|
public JoinDataComplete Digit1 = new JoinDataComplete(new JoinData() { JoinNumber = 12, JoinSpan = 1 },
|
||||||
public uint HasDpad { get; set; }
|
new JoinMetadata() { Label = "STB Digit 1", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
[JoinName("Digit2")]
|
||||||
#endregion
|
public JoinDataComplete Digit2 = new JoinDataComplete(new JoinData() { JoinNumber = 13, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "STB Digit 2", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
#region Analogs
|
|
||||||
|
[JoinName("Digit3")]
|
||||||
#endregion
|
public JoinDataComplete Digit3 = new JoinDataComplete(new JoinData() { JoinNumber = 14, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "STB Digit 3", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
#region Strings
|
|
||||||
public uint Name { get; set; }
|
[JoinName("Digit4")]
|
||||||
public uint LoadPresets { get; set; }
|
public JoinDataComplete Digit4 = new JoinDataComplete(new JoinData() { JoinNumber = 15, JoinSpan = 1 },
|
||||||
public uint KeypadAccessoryButton1Label { get; set; }
|
new JoinMetadata() { Label = "STB Digit 4", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint KeypadAccessoryButton2Label { get; set; }
|
|
||||||
|
[JoinName("Digit5")]
|
||||||
#endregion
|
public JoinDataComplete Digit5 = new JoinDataComplete(new JoinData() { JoinNumber = 16, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "STB Digit 5", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
public SetTopBoxControllerJoinMap()
|
|
||||||
{
|
[JoinName("Digit6")]
|
||||||
PowerOn = 1;
|
public JoinDataComplete Digit6 = new JoinDataComplete(new JoinData() { JoinNumber = 17, JoinSpan = 1 },
|
||||||
PowerOff = 2;
|
new JoinMetadata() { Label = "STB Digit 6", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
PowerToggle = 3;
|
|
||||||
|
[JoinName("Digit7")]
|
||||||
HasDpad = 4;
|
public JoinDataComplete Digit7 = new JoinDataComplete(new JoinData() { JoinNumber = 18, JoinSpan = 1 },
|
||||||
Up = 4;
|
new JoinMetadata() { Label = "STB Digit 7", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
Down = 5;
|
|
||||||
Left = 6;
|
[JoinName("Digit8")]
|
||||||
Right = 7;
|
public JoinDataComplete Digit8 = new JoinDataComplete(new JoinData() { JoinNumber = 19, JoinSpan = 1 },
|
||||||
Select = 8;
|
new JoinMetadata() { Label = "STB Digit 8", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
Menu = 9;
|
|
||||||
Exit = 10;
|
[JoinName("Digit9")]
|
||||||
|
public JoinDataComplete Digit9 = new JoinDataComplete(new JoinData() { JoinNumber = 20, JoinSpan = 1 },
|
||||||
HasNumeric = 11;
|
new JoinMetadata() { Label = "STB Digit 9", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
Digit0 = 11;
|
|
||||||
Digit1 = 12;
|
[JoinName("Dash")]
|
||||||
Digit2 = 13;
|
public JoinDataComplete Dash = new JoinDataComplete(new JoinData() { JoinNumber = 21, JoinSpan = 1 },
|
||||||
Digit3 = 14;
|
new JoinMetadata() { Label = "STB Dash", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
Digit4 = 15;
|
|
||||||
Digit5 = 16;
|
[JoinName("KeypadEnter")]
|
||||||
Digit6 = 17;
|
public JoinDataComplete KeypadEnter = new JoinDataComplete(new JoinData() { JoinNumber = 22, JoinSpan = 1 },
|
||||||
Digit7 = 18;
|
new JoinMetadata() { Label = "STB Keypad Enter", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
Digit8 = 19;
|
|
||||||
Digit9 = 20;
|
[JoinName("ChannelUp")]
|
||||||
Dash = 21;
|
public JoinDataComplete ChannelUp = new JoinDataComplete(new JoinData() { JoinNumber = 23, JoinSpan = 1 },
|
||||||
KeypadEnter = 22;
|
new JoinMetadata() { Label = "STB Channel Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
ChannelUp = 23;
|
|
||||||
ChannelDown = 24;
|
[JoinName("ChannelDown")]
|
||||||
LastChannel = 25;
|
public JoinDataComplete ChannelDown = new JoinDataComplete(new JoinData() { JoinNumber = 24, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "STB Channel Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
Guide = 26;
|
|
||||||
Info = 27;
|
[JoinName("LastChannel")]
|
||||||
Red = 28;
|
public JoinDataComplete LastChannel = new JoinDataComplete(new JoinData() { JoinNumber = 25, JoinSpan = 1 },
|
||||||
Green = 29;
|
new JoinMetadata() { Label = "STB Last Channel", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
Yellow = 30;
|
|
||||||
Blue = 31;
|
[JoinName("Guide")]
|
||||||
|
public JoinDataComplete Guide = new JoinDataComplete(new JoinData() { JoinNumber = 26, JoinSpan = 1 },
|
||||||
HasDvr = 32;
|
new JoinMetadata() { Label = "STB Guide", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
DvrList = 32;
|
|
||||||
Play = 33;
|
[JoinName("Info")]
|
||||||
Pause = 34;
|
public JoinDataComplete Info = new JoinDataComplete(new JoinData() { JoinNumber = 27, JoinSpan = 1 },
|
||||||
Stop = 35;
|
new JoinMetadata() { Label = "STB Info", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
FFwd = 36;
|
|
||||||
Rewind = 37;
|
[JoinName("Red")]
|
||||||
ChapPlus = 38;
|
public JoinDataComplete Red = new JoinDataComplete(new JoinData() { JoinNumber = 28, JoinSpan = 1 },
|
||||||
ChapMinus = 39;
|
new JoinMetadata() { Label = "STB Red", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
Replay = 40;
|
|
||||||
Record = 41;
|
[JoinName("Green")]
|
||||||
HasKeypadAccessoryButton1 = 42;
|
public JoinDataComplete Green = new JoinDataComplete(new JoinData() { JoinNumber = 29, JoinSpan = 1 },
|
||||||
KeypadAccessoryButton1Press = 42;
|
new JoinMetadata() { Label = "STB Green", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
HasKeypadAccessoryButton2 = 43;
|
|
||||||
KeypadAccessoryButton2Press = 43;
|
[JoinName("Yellow")]
|
||||||
|
public JoinDataComplete Yellow = new JoinDataComplete(new JoinData() { JoinNumber = 30, JoinSpan = 1 },
|
||||||
Name = 1;
|
new JoinMetadata() { Label = "STB Yellow", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
KeypadAccessoryButton1Label = 42;
|
|
||||||
KeypadAccessoryButton2Label = 43;
|
[JoinName("Blue")]
|
||||||
|
public JoinDataComplete Blue = new JoinDataComplete(new JoinData() { JoinNumber = 31, JoinSpan = 1 },
|
||||||
LoadPresets = 50;
|
new JoinMetadata() { Label = "STB Blue", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
}
|
|
||||||
|
[JoinName("HasDvr")]
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
public JoinDataComplete HasDvr = new JoinDataComplete(new JoinData() { JoinNumber = 32, JoinSpan = 1 },
|
||||||
{
|
new JoinMetadata() { Label = "STB Has DVR", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
var joinOffset = joinStart - 1;
|
|
||||||
|
[JoinName("DvrList")]
|
||||||
PowerOn += joinOffset;
|
public JoinDataComplete DvrList = new JoinDataComplete(new JoinData() { JoinNumber = 32, JoinSpan = 1 },
|
||||||
PowerOff += joinOffset;
|
new JoinMetadata() { Label = "STB DvrList", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
PowerToggle += joinOffset;
|
|
||||||
|
[JoinName("Play")]
|
||||||
HasDpad += joinOffset;
|
public JoinDataComplete Play = new JoinDataComplete(new JoinData() { JoinNumber = 33, JoinSpan = 1 },
|
||||||
Up += joinOffset;
|
new JoinMetadata() { Label = "STB Play", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
Down += joinOffset;
|
|
||||||
Left += joinOffset;
|
[JoinName("Pause")]
|
||||||
Right += joinOffset;
|
public JoinDataComplete Pause = new JoinDataComplete(new JoinData() { JoinNumber = 34, JoinSpan = 1 },
|
||||||
Select += joinOffset;
|
new JoinMetadata() { Label = "STB Pause", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
Menu += joinOffset;
|
|
||||||
Exit += joinOffset;
|
[JoinName("Stop")]
|
||||||
|
public JoinDataComplete Stop = new JoinDataComplete(new JoinData() { JoinNumber = 35, JoinSpan = 1 },
|
||||||
HasNumeric += joinOffset;
|
new JoinMetadata() { Label = "STB Stop", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
Digit0 += joinOffset;
|
|
||||||
Digit1 += joinOffset;
|
[JoinName("FFwd")]
|
||||||
Digit2 += joinOffset;
|
public JoinDataComplete FFwd = new JoinDataComplete(new JoinData() { JoinNumber = 36, JoinSpan = 1 },
|
||||||
Digit3 += joinOffset;
|
new JoinMetadata() { Label = "STB FFwd", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
Digit4 += joinOffset;
|
|
||||||
Digit5 += joinOffset;
|
[JoinName("Rewind")]
|
||||||
Digit6 += joinOffset;
|
public JoinDataComplete Rewind = new JoinDataComplete(new JoinData() { JoinNumber = 37, JoinSpan = 1 },
|
||||||
Digit7 += joinOffset;
|
new JoinMetadata() { Label = "STB Rewind", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
Digit8 += joinOffset;
|
|
||||||
Digit9 += joinOffset;
|
[JoinName("ChapPlus")]
|
||||||
Dash += joinOffset;
|
public JoinDataComplete ChapPlus = new JoinDataComplete(new JoinData() { JoinNumber = 38, JoinSpan = 1 },
|
||||||
KeypadEnter += joinOffset;
|
new JoinMetadata() { Label = "STB Chapter Plus", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
ChannelUp += joinOffset;
|
|
||||||
ChannelDown += joinOffset;
|
[JoinName("ChapMinus")]
|
||||||
LastChannel += joinOffset;
|
public JoinDataComplete ChapMinus = new JoinDataComplete(new JoinData() { JoinNumber = 39, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "STB Chapter Minus", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
Guide += joinOffset;
|
|
||||||
Info += joinOffset;
|
[JoinName("Replay")]
|
||||||
Red += joinOffset;
|
public JoinDataComplete Replay = new JoinDataComplete(new JoinData() { JoinNumber = 40, JoinSpan = 1 },
|
||||||
Green += joinOffset;
|
new JoinMetadata() { Label = "STB Replay", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
Yellow += joinOffset;
|
|
||||||
Blue += joinOffset;
|
[JoinName("Record")]
|
||||||
|
public JoinDataComplete Record = new JoinDataComplete(new JoinData() { JoinNumber = 41, JoinSpan = 1 },
|
||||||
HasDvr += joinOffset;
|
new JoinMetadata() { Label = "STB Record", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
DvrList += joinOffset;
|
|
||||||
Play += joinOffset;
|
[JoinName("HasKeypadAccessoryButton1")]
|
||||||
Pause += joinOffset;
|
public JoinDataComplete HasKeypadAccessoryButton1 = new JoinDataComplete(new JoinData() { JoinNumber = 42, JoinSpan = 1 },
|
||||||
Stop += joinOffset;
|
new JoinMetadata() { Label = "STB Has Keypad Accessory Button 1", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
FFwd += joinOffset;
|
|
||||||
Rewind += joinOffset;
|
[JoinName("HasKeypadAccessoryButton2")]
|
||||||
ChapPlus += joinOffset;
|
public JoinDataComplete HasKeypadAccessoryButton2 = new JoinDataComplete(new JoinData() { JoinNumber = 43, JoinSpan = 1 },
|
||||||
ChapMinus += joinOffset;
|
new JoinMetadata() { Label = "STB Has Keypad Accessory Button 2", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
Replay += joinOffset;
|
|
||||||
Record += joinOffset;
|
[JoinName("KeypadAccessoryButton1Press")]
|
||||||
HasKeypadAccessoryButton1 += joinOffset;
|
public JoinDataComplete KeypadAccessoryButton1Press = new JoinDataComplete(new JoinData() { JoinNumber = 42, JoinSpan = 2 },
|
||||||
KeypadAccessoryButton1Press += joinOffset;
|
new JoinMetadata() { Label = "STB Keypad Accessory Button 1 Press", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
HasKeypadAccessoryButton2 += joinOffset;
|
|
||||||
KeypadAccessoryButton2Press += joinOffset;
|
[JoinName("KeypadAccessoryButton2Press")]
|
||||||
|
public JoinDataComplete KeypadAccessoryButton2Press = new JoinDataComplete(new JoinData() { JoinNumber = 43, JoinSpan = 2 },
|
||||||
Name += joinOffset;
|
new JoinMetadata() { Label = "STB Keypad Accessory Button 2 Press", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
KeypadAccessoryButton1Label += joinOffset;
|
|
||||||
KeypadAccessoryButton2Label += joinOffset;
|
[JoinName("Name")]
|
||||||
|
public JoinDataComplete Name = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
LoadPresets += joinOffset;
|
new JoinMetadata() { Label = "STB Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
}
|
|
||||||
|
[JoinName("KeypadAccessoryButton1Label")]
|
||||||
|
public JoinDataComplete KeypadAccessoryButton1Label = new JoinDataComplete(new JoinData() { JoinNumber = 42, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "STB Keypad Accessory Button 1 Label", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
|
[JoinName("KeypadAccessoryButton2Label")]
|
||||||
|
public JoinDataComplete KeypadAccessoryButton2Label = new JoinDataComplete(new JoinData() { JoinNumber = 43, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "STB Keypad Accessory Button 1 Label", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
|
[JoinName("LoadPresets")]
|
||||||
|
public JoinDataComplete LoadPresets = new JoinDataComplete(new JoinData() { JoinNumber = 50, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "STB Load Presets", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
[JoinName("HasPresets")]
|
||||||
|
public JoinDataComplete HasPresets = new JoinDataComplete(new JoinData() { JoinNumber = 50, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "STB Load Presets", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public SetTopBoxControllerJoinMap(uint joinStart)
|
||||||
|
: base(joinStart, typeof(SetTopBoxControllerJoinMap))
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,46 +4,45 @@ using PepperDash.Essentials.Core;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public class StatusSignControllerJoinMap:JoinMapBase
|
public class StatusSignControllerJoinMap : JoinMapBaseAdvanced
|
||||||
{
|
{
|
||||||
public uint IsOnline { get; set; }
|
[JoinName("IsOnline")]
|
||||||
public uint Name { get; set; }
|
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
public uint RedLed { get; set; }
|
new JoinMetadata() { Label = "Status Sign Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
public uint GreenLed { get; set; }
|
|
||||||
public uint BlueLed { get; set; }
|
[JoinName("Name")]
|
||||||
public uint RedControl { get; set; }
|
public JoinDataComplete Name = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
public uint GreenControl { get; set; }
|
new JoinMetadata() { Label = "Status Sign Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
public uint BlueControl { get; set; }
|
|
||||||
|
[JoinName("RedControl")]
|
||||||
public StatusSignControllerJoinMap()
|
public JoinDataComplete RedControl = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
|
||||||
{
|
new JoinMetadata() { Label = "Status Red LED Enable / Disable", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
//digital
|
|
||||||
IsOnline = 1;
|
[JoinName("RedLed")]
|
||||||
RedControl = 2;
|
public JoinDataComplete RedLed = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
|
||||||
GreenControl = 3;
|
new JoinMetadata() { Label = "Status Red LED Intensity", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
BlueControl = 4;
|
|
||||||
|
[JoinName("GreenControl")]
|
||||||
//Analog
|
public JoinDataComplete GreenControl = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
|
||||||
RedLed = 2;
|
new JoinMetadata() { Label = "Status Green LED Enable / Disable", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
GreenLed = 3;
|
|
||||||
BlueLed = 4;
|
[JoinName("GreenLed")]
|
||||||
|
public JoinDataComplete GreenLed = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
|
||||||
//string
|
new JoinMetadata() { Label = "Status Green LED Intensity", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
Name = 1;
|
|
||||||
|
[JoinName("BlueControl")]
|
||||||
|
public JoinDataComplete BlueControl = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "Status Blue LED Enable / Disable", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
[JoinName("BlueLed")]
|
||||||
|
public JoinDataComplete BlueLed = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "Status Blue LED Intensity", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
|
|
||||||
|
|
||||||
|
public StatusSignControllerJoinMap(uint joinStart)
|
||||||
|
: base(joinStart, typeof(StatusSignControllerJoinMap))
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
|
||||||
{
|
|
||||||
var joinOffset = joinStart - 1;
|
|
||||||
var properties =
|
|
||||||
GetType().GetCType().GetProperties().Where(p => p.PropertyType == typeof (uint)).ToList();
|
|
||||||
|
|
||||||
foreach (var propertyInfo in properties)
|
|
||||||
{
|
|
||||||
propertyInfo.SetValue(this, (uint) propertyInfo.GetValue(this, null) + joinOffset, null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,225 +1,141 @@
|
|||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public class SystemMonitorJoinMap : JoinMapBase
|
public class SystemMonitorJoinMap : JoinMapBaseAdvanced
|
||||||
{
|
{
|
||||||
/// <summary>
|
[JoinName("TimeZone")]
|
||||||
/// Offset to indicate where the range of iterated program joins will start
|
public JoinDataComplete TimeZone = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "Processor Timezone", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
|
||||||
public uint ProgramStartJoin { get; set; }
|
|
||||||
|
[JoinName("TimeZoneName")]
|
||||||
/// <summary>
|
public JoinDataComplete TimeZoneName = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||||
/// Offset to indicate where the range of iterated Ethernet joins will start
|
new JoinMetadata() { Label = "Processor Timezone Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
/// </summary>
|
|
||||||
public uint EthernetStartJoin { get; set; }
|
[JoinName("IOControllerVersion")]
|
||||||
|
public JoinDataComplete IOControllerVersion = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
|
||||||
/// <summary>
|
new JoinMetadata() { Label = "Processor IO Controller Version", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
/// Offset between each program join set
|
|
||||||
/// </summary>
|
[JoinName("SnmpAppVersion")]
|
||||||
public uint ProgramOffsetJoin { get; set; }
|
public JoinDataComplete SnmpAppVersion = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "Processor SNMP App Version", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
/// <summary>
|
|
||||||
/// Offset between each Ethernet Interface join set
|
[JoinName("BACnetAppVersion")]
|
||||||
/// </summary>
|
public JoinDataComplete BACnetAppVersion = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
|
||||||
public uint EthernetOffsetJoin { get; set; }
|
new JoinMetadata() { Label = "Processor BACNet App Version", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
#region Digitals
|
[JoinName("ControllerVersion")]
|
||||||
/// <summary>
|
public JoinDataComplete ControllerVersion = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
|
||||||
/// Range Sets and reports whether the corresponding program slot is started
|
new JoinMetadata() { Label = "Processor Controller Version", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
/// </summary>
|
|
||||||
public uint ProgramStart { get; set; }
|
[JoinName("SerialNumber")]
|
||||||
/// <summary>
|
public JoinDataComplete SerialNumber = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 },
|
||||||
/// Range Sets and reports whether the corresponding program slot is stopped
|
new JoinMetadata() { Label = "Processor Serial Number", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
/// </summary>
|
|
||||||
public uint ProgramStop { get; set; }
|
[JoinName("Model")]
|
||||||
/// <summary>
|
public JoinDataComplete Model = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 },
|
||||||
/// Range Sets and reports whether the corresponding program is registered
|
new JoinMetadata() { Label = "Processor Model", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
/// </summary>
|
|
||||||
public uint ProgramRegister { get; set; }
|
[JoinName("Uptime")]
|
||||||
/// <summary>
|
public JoinDataComplete Uptime = new JoinDataComplete(new JoinData() { JoinNumber = 8, JoinSpan = 1 },
|
||||||
/// Range Sets and reports whether the corresponding program is unregistered
|
new JoinMetadata() { Label = "Processor Uptime", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
/// </summary>
|
|
||||||
public uint ProgramUnregister { get; set; }
|
[JoinName("LastBoot")]
|
||||||
#endregion
|
public JoinDataComplete LastBoot = new JoinDataComplete(new JoinData() { JoinNumber = 9, JoinSpan = 1 },
|
||||||
|
new JoinMetadata() { Label = "Processor Last Boot", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
#region Analogs
|
|
||||||
/// <summary>
|
[JoinName("ProgramOffsetJoin")]
|
||||||
/// Sets and reports the time zone
|
public JoinDataComplete ProgramOffsetJoin = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "All Program Data is offset between slots by 5 - First Joins Start at 11", JoinCapabilities = eJoinCapabilities.None, JoinType = eJoinType.None });
|
||||||
public uint TimeZone { get; set; }
|
|
||||||
#endregion
|
[JoinName("ProgramStart")]
|
||||||
|
public JoinDataComplete ProgramStart = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 },
|
||||||
#region Serials
|
new JoinMetadata() { Label = "Processor Program Start / Fb", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// <summary>
|
|
||||||
/// Reports the time zone name
|
[JoinName("ProgramStop")]
|
||||||
/// </summary>
|
public JoinDataComplete ProgramStop = new JoinDataComplete(new JoinData() { JoinNumber = 12, JoinSpan = 1 },
|
||||||
public uint TimeZoneName { get; set; }
|
new JoinMetadata() { Label = "Processor Program Stop / Fb", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// <summary>
|
|
||||||
/// Reports the IO Controller Version
|
[JoinName("ProgramRegister")]
|
||||||
/// </summary>
|
public JoinDataComplete ProgramRegister = new JoinDataComplete(new JoinData() { JoinNumber = 13, JoinSpan = 1 },
|
||||||
public uint IOControllerVersion { get; set; }
|
new JoinMetadata() { Label = "Processor Program Register / Fb", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// <summary>
|
|
||||||
/// Reports the SNMP App Version
|
[JoinName("ProgramUnregister")]
|
||||||
/// </summary>
|
public JoinDataComplete ProgramUnregister = new JoinDataComplete(new JoinData() { JoinNumber = 14, JoinSpan = 1 },
|
||||||
public uint SnmpAppVersion { get; set; }
|
new JoinMetadata() { Label = "Processor Program UnRegister / Fb", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
/// <summary>
|
|
||||||
/// Reports the BACnet App Version
|
[JoinName("ProgramName")]
|
||||||
/// </summary>
|
public JoinDataComplete ProgramName = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 },
|
||||||
public uint BACnetAppVersion { get; set; }
|
new JoinMetadata() { Label = "Processor Program Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
/// <summary>
|
|
||||||
/// Reports the firmware version
|
[JoinName("ProgramCompiledTime")]
|
||||||
/// </summary>
|
public JoinDataComplete ProgramCompiledTime = new JoinDataComplete(new JoinData() { JoinNumber = 12, JoinSpan = 1 },
|
||||||
public uint ControllerVersion { get; set; }
|
new JoinMetadata() { Label = "Processor Program Compile Time", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
/// <summary>
|
[JoinName("ProgramCrestronDatabaseVersion")]
|
||||||
/// Reports the name of the corresponding program
|
public JoinDataComplete ProgramCrestronDatabaseVersion = new JoinDataComplete(new JoinData() { JoinNumber = 13, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "Processor Program Database Version", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
public uint ProgramName { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("ProgramEnvironmentVersion")]
|
||||||
/// Reports the compile time of the corresponding program
|
public JoinDataComplete ProgramEnvironmentVersion = new JoinDataComplete(new JoinData() { JoinNumber = 14, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "Processor Program Environment Version", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
public uint ProgramCompiledTime { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("AggregatedProgramInfo")]
|
||||||
/// Reports the Crestron Database version of the corresponding program
|
public JoinDataComplete AggregatedProgramInfo = new JoinDataComplete(new JoinData() { JoinNumber = 15, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "Processor Program Aggregate Info Json", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
public uint ProgramCrestronDatabaseVersion { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("EthernetOffsetJoin")]
|
||||||
/// Reports the Environment Version of the corresponding program
|
public JoinDataComplete EthernetOffsetJoin = new JoinDataComplete(new JoinData() { JoinNumber = 15, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "All Ethernet Data is offset between Nics by 5 - First Joins Start at 76", JoinCapabilities = eJoinCapabilities.None, JoinType = eJoinType.None });
|
||||||
public uint ProgramEnvironmentVersion { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("HostName")]
|
||||||
/// Serialized JSON output that aggregates the program info of the corresponding program
|
public JoinDataComplete HostName = new JoinDataComplete(new JoinData() { JoinNumber = 76, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "Processor Ethernet Hostname", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
public uint AggregatedProgramInfo { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("CurrentIpAddress")]
|
||||||
/// Reports the controller serial number
|
public JoinDataComplete CurrentIpAddress = new JoinDataComplete(new JoinData() { JoinNumber = 77, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "Processor Ethernet Current Ip Address", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
public uint SerialNumber { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("CurrentSubnetMask")]
|
||||||
/// Reports the controller model
|
public JoinDataComplete CurrentSubnetMask = new JoinDataComplete(new JoinData() { JoinNumber = 78, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "Processor Ethernet Current Subnet Mask", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
public uint Model { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("CurrentDefaultGateway")]
|
||||||
/// Reports the Host name set on the corresponding interface
|
public JoinDataComplete CurrentDefaultGateway = new JoinDataComplete(new JoinData() { JoinNumber = 79, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "Processor Ethernet Current Default Gateway", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
public uint HostName { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("StaticIpAddress")]
|
||||||
/// Reports the Current IP address set on the corresponding interface. If DHCP is enabled, this will be the DHCP assigned address.
|
public JoinDataComplete StaticIpAddress = new JoinDataComplete(new JoinData() { JoinNumber = 80, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "Processor Ethernet Static Ip Address", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
public uint CurrentIpAddress { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("StaticSubnetMask")]
|
||||||
/// Reporst the Current Default Gateway set on the corresponding interface. If DHCP is enabled, this will be the DHCP assigned gateway
|
public JoinDataComplete StaticSubnetMask = new JoinDataComplete(new JoinData() { JoinNumber = 81, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "Processor Ethernet Static Subnet Mask", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
public uint CurrentDefaultGateway { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("StaticDefaultGateway")]
|
||||||
/// Reports the Current Subnet Mask set on the corresponding interface. If DHCP is enabled, this will be the DHCP assigned subnet mask
|
public JoinDataComplete StaticDefaultGateway = new JoinDataComplete(new JoinData() { JoinNumber = 82, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "Processor Ethernet Static Default Gateway", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
public uint CurrentSubnetMask { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("Domain")]
|
||||||
/// Reports the Static IP address set on the corresponding interface. If DHCP is disabled, this will match the Current IP address
|
public JoinDataComplete Domain = new JoinDataComplete(new JoinData() { JoinNumber = 83, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "Processor Ethernet Domain", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
public uint StaticIpAddress { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("DnsServer")]
|
||||||
/// Reporst the Static Default Gateway set on the corresponding interface. If DHCP is disabled, this will match the Current gateway
|
public JoinDataComplete DnsServer = new JoinDataComplete(new JoinData() { JoinNumber = 84, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "Processor Ethernet Dns Server", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
public uint StaticDefaultGateway { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("MacAddress")]
|
||||||
/// Reports the Current Subnet Mask set on the corresponding interface. If DHCP is enabled, this will be the DHCP assigned subnet mask
|
public JoinDataComplete MacAddress = new JoinDataComplete(new JoinData() { JoinNumber = 85, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "Processor Ethernet Mac Address", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
public uint StaticSubnetMask { get; set; }
|
|
||||||
/// <summary>
|
[JoinName("DhcpStatus")]
|
||||||
/// Reports the current DomainFeedback on the corresponding interface
|
public JoinDataComplete DhcpStatus = new JoinDataComplete(new JoinData() { JoinNumber = 86, JoinSpan = 1 },
|
||||||
/// </summary>
|
new JoinMetadata() { Label = "Processor Ethernet Dhcp Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
public uint Domain { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Reports the current DNS Servers on the corresponding interface
|
public SystemMonitorJoinMap(uint joinStart)
|
||||||
/// </summary>
|
: base(joinStart, typeof(SystemMonitorJoinMap))
|
||||||
public uint DnsServer { get; set; }
|
{
|
||||||
/// <summary>
|
}
|
||||||
/// Reports the MAC Address of the corresponding interface
|
}
|
||||||
/// </summary>
|
|
||||||
public uint MacAddress { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Reports the DHCP Status of the corresponding interface
|
|
||||||
/// </summary>
|
|
||||||
public uint DhcpStatus { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Reports the current uptime. Updated in 5 minute intervals.
|
|
||||||
/// </summary>
|
|
||||||
public uint Uptime { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Reports the date of the last boot
|
|
||||||
/// </summary>
|
|
||||||
public uint LastBoot { get; set; }
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
public SystemMonitorJoinMap()
|
|
||||||
{
|
|
||||||
TimeZone = 1;
|
|
||||||
|
|
||||||
TimeZoneName = 1;
|
|
||||||
IOControllerVersion = 2;
|
|
||||||
SnmpAppVersion = 3;
|
|
||||||
BACnetAppVersion = 4;
|
|
||||||
ControllerVersion = 5;
|
|
||||||
SerialNumber = 6;
|
|
||||||
Model = 7;
|
|
||||||
Uptime = 8;
|
|
||||||
LastBoot = 9;
|
|
||||||
|
|
||||||
|
|
||||||
ProgramStartJoin = 10;
|
|
||||||
|
|
||||||
ProgramOffsetJoin = 5;
|
|
||||||
|
|
||||||
// Offset in groups of 5 joins
|
|
||||||
ProgramStart = 1;
|
|
||||||
ProgramStop = 2;
|
|
||||||
ProgramRegister = 3;
|
|
||||||
ProgramUnregister = 4;
|
|
||||||
|
|
||||||
ProgramName = 1;
|
|
||||||
ProgramCompiledTime = 2;
|
|
||||||
ProgramCrestronDatabaseVersion = 3;
|
|
||||||
ProgramEnvironmentVersion = 4;
|
|
||||||
AggregatedProgramInfo = 5;
|
|
||||||
|
|
||||||
EthernetStartJoin = 75;
|
|
||||||
|
|
||||||
EthernetOffsetJoin = 15;
|
|
||||||
|
|
||||||
// Offset in groups of 15
|
|
||||||
HostName = 1;
|
|
||||||
CurrentIpAddress = 2;
|
|
||||||
CurrentSubnetMask = 3;
|
|
||||||
CurrentDefaultGateway = 4;
|
|
||||||
StaticIpAddress = 5;
|
|
||||||
StaticSubnetMask = 6;
|
|
||||||
StaticDefaultGateway = 7;
|
|
||||||
Domain = 8;
|
|
||||||
DnsServer = 9;
|
|
||||||
MacAddress = 10;
|
|
||||||
DhcpStatus = 11;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
|
||||||
{
|
|
||||||
var joinOffset = joinStart - 1;
|
|
||||||
|
|
||||||
TimeZone = TimeZone + joinOffset;
|
|
||||||
|
|
||||||
TimeZoneName = TimeZoneName + joinOffset;
|
|
||||||
IOControllerVersion = IOControllerVersion + joinOffset;
|
|
||||||
SnmpAppVersion = SnmpAppVersion + joinOffset;
|
|
||||||
BACnetAppVersion = BACnetAppVersion + joinOffset;
|
|
||||||
ControllerVersion = ControllerVersion + joinOffset;
|
|
||||||
|
|
||||||
// Sets the initial join value where the iterated program joins will begin
|
|
||||||
ProgramStartJoin = ProgramStartJoin + joinOffset;
|
|
||||||
EthernetStartJoin = EthernetStartJoin + joinOffset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -27,7 +27,16 @@ namespace PepperDash.Essentials.Core
|
|||||||
{
|
{
|
||||||
PropertiesConfig = CommFactory.GetControlPropertiesConfig(config);
|
PropertiesConfig = CommFactory.GetControlPropertiesConfig(config);
|
||||||
|
|
||||||
CommPort = CommFactory.CreateCommForDevice(config);
|
var commPort = CommFactory.CreateCommForDevice(config);
|
||||||
|
|
||||||
|
//Fixing decision to require '-comPorts' in delcaration for DGE in order to get a device with comports included
|
||||||
|
if (commPort == null)
|
||||||
|
{
|
||||||
|
config.Key = config.Key + "-comPorts";
|
||||||
|
commPort = CommFactory.CreateCommForDevice(config);
|
||||||
|
}
|
||||||
|
|
||||||
|
CommPort = commPort;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,6 +76,8 @@ namespace PepperDash.Essentials.Core
|
|||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<IBasicCommunicationJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<IBasicCommunicationJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
|
|
||||||
if (CommPort == null)
|
if (CommPort == null)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Unable to link device '{0}'. CommPort is null", Key);
|
Debug.Console(1, this, "Unable to link device '{0}'. CommPort is null", Key);
|
||||||
@@ -85,7 +96,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
trilist.SetStringSigAction(joinMap.SetPortConfig.JoinNumber, SetPortConfig);
|
trilist.SetStringSigAction(joinMap.SetPortConfig.JoinNumber, SetPortConfig);
|
||||||
|
|
||||||
|
|
||||||
var sComm = this as ISocketStatus;
|
var sComm = CommPort as ISocketStatus;
|
||||||
if (sComm == null) return;
|
if (sComm == null) return;
|
||||||
sComm.ConnectionChange += (s, a) =>
|
sComm.ConnectionChange += (s, a) =>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,90 +1,92 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using Crestron.SimplSharpPro.GeneralIO;
|
using Crestron.SimplSharpPro.GeneralIO;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
using PepperDash.Essentials.Core.Bridges;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.CrestronIO
|
namespace PepperDash.Essentials.Core.CrestronIO
|
||||||
{
|
{
|
||||||
[Description("Wrapper class for the C2N-RTHS sensor")]
|
[Description("Wrapper class for the C2N-RTHS sensor")]
|
||||||
public class C2nRthsController : CrestronGenericBridgeableBaseDevice
|
public class C2nRthsController : CrestronGenericBridgeableBaseDevice
|
||||||
{
|
{
|
||||||
private readonly C2nRths _device;
|
private readonly C2nRths _device;
|
||||||
|
|
||||||
public IntFeedback TemperatureFeedback { get; private set; }
|
public IntFeedback TemperatureFeedback { get; private set; }
|
||||||
public IntFeedback HumidityFeedback { get; private set; }
|
public IntFeedback HumidityFeedback { get; private set; }
|
||||||
|
|
||||||
public C2nRthsController(string key, string name, GenericBase hardware) : base(key, name, hardware)
|
public C2nRthsController(string key, string name, GenericBase hardware) : base(key, name, hardware)
|
||||||
{
|
{
|
||||||
_device = hardware as C2nRths;
|
_device = hardware as C2nRths;
|
||||||
|
|
||||||
TemperatureFeedback = new IntFeedback(() => _device.TemperatureFeedback.UShortValue);
|
TemperatureFeedback = new IntFeedback(() => _device.TemperatureFeedback.UShortValue);
|
||||||
HumidityFeedback = new IntFeedback(() => _device.HumidityFeedback.UShortValue);
|
HumidityFeedback = new IntFeedback(() => _device.HumidityFeedback.UShortValue);
|
||||||
|
|
||||||
if (_device != null) _device.BaseEvent += DeviceOnBaseEvent;
|
if (_device != null) _device.BaseEvent += DeviceOnBaseEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DeviceOnBaseEvent(GenericBase device, BaseEventArgs args)
|
private void DeviceOnBaseEvent(GenericBase device, BaseEventArgs args)
|
||||||
{
|
{
|
||||||
switch (args.EventId)
|
switch (args.EventId)
|
||||||
{
|
{
|
||||||
case C2nRths.TemperatureFeedbackEventId:
|
case C2nRths.TemperatureFeedbackEventId:
|
||||||
TemperatureFeedback.FireUpdate();
|
TemperatureFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
case C2nRths.HumidityFeedbackEventId:
|
case C2nRths.HumidityFeedbackEventId:
|
||||||
HumidityFeedback.FireUpdate();
|
HumidityFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetTemperatureFormat(bool setToC)
|
public void SetTemperatureFormat(bool setToC)
|
||||||
{
|
{
|
||||||
_device.TemperatureFormat.BoolValue = setToC;
|
_device.TemperatureFormat.BoolValue = setToC;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
var joinMap = new C2nRthsControllerJoinMap();
|
var joinMap = new C2nRthsControllerJoinMap(joinStart);
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<C2nRthsControllerJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<C2nRthsControllerJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
|
|
||||||
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
|
|
||||||
trilist.SetBoolSigAction(joinMap.TemperatureFormat, SetTemperatureFormat);
|
trilist.SetBoolSigAction(joinMap.TemperatureFormat.JoinNumber, SetTemperatureFormat);
|
||||||
|
|
||||||
IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
|
||||||
TemperatureFeedback.LinkInputSig(trilist.UShortInput[joinMap.Temperature]);
|
|
||||||
HumidityFeedback.LinkInputSig(trilist.UShortInput[joinMap.Humidity]);
|
IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
||||||
|
TemperatureFeedback.LinkInputSig(trilist.UShortInput[joinMap.Temperature.JoinNumber]);
|
||||||
trilist.StringInput[joinMap.Name].StringValue = Name;
|
HumidityFeedback.LinkInputSig(trilist.UShortInput[joinMap.Humidity.JoinNumber]);
|
||||||
}
|
|
||||||
}
|
trilist.StringInput[joinMap.Name.JoinNumber].StringValue = Name;
|
||||||
|
}
|
||||||
public class C2nRthsControllerFactory : EssentialsDeviceFactory<C2nRthsController>
|
}
|
||||||
{
|
|
||||||
public C2nRthsControllerFactory()
|
public class C2nRthsControllerFactory : EssentialsDeviceFactory<C2nRthsController>
|
||||||
{
|
{
|
||||||
TypeNames = new List<string>() { "c2nrths" };
|
public C2nRthsControllerFactory()
|
||||||
}
|
{
|
||||||
|
TypeNames = new List<string>() { "c2nrths" };
|
||||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
}
|
||||||
{
|
|
||||||
Debug.Console(1, "Factory Attempting to create new C2N-RTHS Device");
|
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||||
|
{
|
||||||
var control = CommFactory.GetControlPropertiesConfig(dc);
|
Debug.Console(1, "Factory Attempting to create new C2N-RTHS Device");
|
||||||
var cresnetId = control.CresnetIdInt;
|
|
||||||
|
var control = CommFactory.GetControlPropertiesConfig(dc);
|
||||||
return new C2nRthsController(dc.Key, dc.Name, new C2nRths(cresnetId, Global.ControlSystem));
|
var cresnetId = control.CresnetIdInt;
|
||||||
}
|
|
||||||
}
|
return new C2nRthsController(dc.Key, dc.Name, new C2nRths(cresnetId, Global.ControlSystem));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -44,22 +44,22 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
var joinMap = new IDigitalInputJoinMap();
|
var joinMap = new IDigitalInputJoinMap(joinStart);
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<IDigitalInputJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<IDigitalInputJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
// Link feedback for input state
|
// Link feedback for input state
|
||||||
InputStateFeedback.LinkInputSig(trilist.BooleanInput[joinMap.InputState]);
|
InputStateFeedback.LinkInputSig(trilist.BooleanInput[joinMap.InputState.JoinNumber]);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -70,15 +70,15 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
var joinMap = new GenericRelayControllerJoinMap();
|
var joinMap = new GenericRelayControllerJoinMap(joinStart);
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<GenericRelayControllerJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<GenericRelayControllerJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
|
|
||||||
if (RelayOutput == null)
|
if (RelayOutput == null)
|
||||||
{
|
{
|
||||||
@@ -88,7 +88,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
|||||||
|
|
||||||
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
trilist.SetBoolSigAction(joinMap.Relay, b =>
|
trilist.SetBoolSigAction(joinMap.Relay.JoinNumber, b =>
|
||||||
{
|
{
|
||||||
if (b)
|
if (b)
|
||||||
CloseRelay();
|
CloseRelay();
|
||||||
@@ -98,7 +98,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
|||||||
|
|
||||||
// feedback for relay state
|
// feedback for relay state
|
||||||
|
|
||||||
OutputIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Relay]);
|
OutputIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Relay.JoinNumber]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,182 +1,182 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using Crestron.SimplSharpPro.GeneralIO;
|
using Crestron.SimplSharpPro.GeneralIO;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
using PepperDash.Essentials.Core.Bridges;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.CrestronIO
|
namespace PepperDash.Essentials.Core.CrestronIO
|
||||||
{
|
{
|
||||||
[Description("Wrapper class for the Crestron StatusSign device")]
|
[Description("Wrapper class for the Crestron StatusSign device")]
|
||||||
public class StatusSignController : CrestronGenericBridgeableBaseDevice
|
public class StatusSignController : CrestronGenericBridgeableBaseDevice
|
||||||
{
|
{
|
||||||
private readonly StatusSign _device;
|
private readonly StatusSign _device;
|
||||||
|
|
||||||
public BoolFeedback RedLedEnabledFeedback { get; private set; }
|
public BoolFeedback RedLedEnabledFeedback { get; private set; }
|
||||||
public BoolFeedback GreenLedEnabledFeedback { get; private set; }
|
public BoolFeedback GreenLedEnabledFeedback { get; private set; }
|
||||||
public BoolFeedback BlueLedEnabledFeedback { get; private set; }
|
public BoolFeedback BlueLedEnabledFeedback { get; private set; }
|
||||||
|
|
||||||
public IntFeedback RedLedBrightnessFeedback { get; private set; }
|
public IntFeedback RedLedBrightnessFeedback { get; private set; }
|
||||||
public IntFeedback GreenLedBrightnessFeedback { get; private set; }
|
public IntFeedback GreenLedBrightnessFeedback { get; private set; }
|
||||||
public IntFeedback BlueLedBrightnessFeedback { get; private set; }
|
public IntFeedback BlueLedBrightnessFeedback { get; private set; }
|
||||||
|
|
||||||
public StatusSignController(string key, string name, GenericBase hardware) : base(key, name, hardware)
|
public StatusSignController(string key, string name, GenericBase hardware) : base(key, name, hardware)
|
||||||
{
|
{
|
||||||
_device = hardware as StatusSign;
|
_device = hardware as StatusSign;
|
||||||
|
|
||||||
RedLedEnabledFeedback =
|
RedLedEnabledFeedback =
|
||||||
new BoolFeedback(
|
new BoolFeedback(
|
||||||
() =>
|
() =>
|
||||||
_device.Leds[(uint) StatusSign.Led.eLedColor.Red]
|
_device.Leds[(uint) StatusSign.Led.eLedColor.Red]
|
||||||
.ControlFeedback.BoolValue);
|
.ControlFeedback.BoolValue);
|
||||||
GreenLedEnabledFeedback =
|
GreenLedEnabledFeedback =
|
||||||
new BoolFeedback(
|
new BoolFeedback(
|
||||||
() =>
|
() =>
|
||||||
_device.Leds[(uint) StatusSign.Led.eLedColor.Green]
|
_device.Leds[(uint) StatusSign.Led.eLedColor.Green]
|
||||||
.ControlFeedback.BoolValue);
|
.ControlFeedback.BoolValue);
|
||||||
BlueLedEnabledFeedback =
|
BlueLedEnabledFeedback =
|
||||||
new BoolFeedback(
|
new BoolFeedback(
|
||||||
() =>
|
() =>
|
||||||
_device.Leds[(uint) StatusSign.Led.eLedColor.Blue]
|
_device.Leds[(uint) StatusSign.Led.eLedColor.Blue]
|
||||||
.ControlFeedback.BoolValue);
|
.ControlFeedback.BoolValue);
|
||||||
|
|
||||||
RedLedBrightnessFeedback =
|
RedLedBrightnessFeedback =
|
||||||
new IntFeedback(() => (int) _device.Leds[(uint) StatusSign.Led.eLedColor.Red].BrightnessFeedback);
|
new IntFeedback(() => (int) _device.Leds[(uint) StatusSign.Led.eLedColor.Red].BrightnessFeedback);
|
||||||
GreenLedBrightnessFeedback =
|
GreenLedBrightnessFeedback =
|
||||||
new IntFeedback(() => (int) _device.Leds[(uint) StatusSign.Led.eLedColor.Green].BrightnessFeedback);
|
new IntFeedback(() => (int) _device.Leds[(uint) StatusSign.Led.eLedColor.Green].BrightnessFeedback);
|
||||||
BlueLedBrightnessFeedback =
|
BlueLedBrightnessFeedback =
|
||||||
new IntFeedback(() => (int) _device.Leds[(uint) StatusSign.Led.eLedColor.Blue].BrightnessFeedback);
|
new IntFeedback(() => (int) _device.Leds[(uint) StatusSign.Led.eLedColor.Blue].BrightnessFeedback);
|
||||||
|
|
||||||
if (_device != null) _device.BaseEvent += _device_BaseEvent;
|
if (_device != null) _device.BaseEvent += _device_BaseEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _device_BaseEvent(GenericBase device, BaseEventArgs args)
|
void _device_BaseEvent(GenericBase device, BaseEventArgs args)
|
||||||
{
|
{
|
||||||
switch (args.EventId)
|
switch (args.EventId)
|
||||||
{
|
{
|
||||||
case StatusSign.LedBrightnessFeedbackEventId:
|
case StatusSign.LedBrightnessFeedbackEventId:
|
||||||
RedLedBrightnessFeedback.FireUpdate();
|
RedLedBrightnessFeedback.FireUpdate();
|
||||||
GreenLedBrightnessFeedback.FireUpdate();
|
GreenLedBrightnessFeedback.FireUpdate();
|
||||||
BlueLedBrightnessFeedback.FireUpdate();
|
BlueLedBrightnessFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
case StatusSign.LedControlFeedbackEventId:
|
case StatusSign.LedControlFeedbackEventId:
|
||||||
RedLedEnabledFeedback.FireUpdate();
|
RedLedEnabledFeedback.FireUpdate();
|
||||||
GreenLedEnabledFeedback.FireUpdate();
|
GreenLedEnabledFeedback.FireUpdate();
|
||||||
BlueLedEnabledFeedback.FireUpdate();
|
BlueLedEnabledFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void EnableLedControl(bool red, bool green, bool blue)
|
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.Red].Control.BoolValue = red;
|
||||||
_device.Leds[(uint)StatusSign.Led.eLedColor.Green].Control.BoolValue = green;
|
_device.Leds[(uint)StatusSign.Led.eLedColor.Green].Control.BoolValue = green;
|
||||||
_device.Leds[(uint)StatusSign.Led.eLedColor.Blue].Control.BoolValue = blue;
|
_device.Leds[(uint)StatusSign.Led.eLedColor.Blue].Control.BoolValue = blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetColor(uint red, uint green, uint blue)
|
public void SetColor(uint red, uint green, uint blue)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_device.Leds[(uint)StatusSign.Led.eLedColor.Red].Brightness =
|
_device.Leds[(uint)StatusSign.Led.eLedColor.Red].Brightness =
|
||||||
(StatusSign.Led.eBrightnessPercentageValues)SimplSharpDeviceHelper.PercentToUshort(red);
|
(StatusSign.Led.eBrightnessPercentageValues)SimplSharpDeviceHelper.PercentToUshort(red);
|
||||||
}
|
}
|
||||||
catch (InvalidOperationException)
|
catch (InvalidOperationException)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Error converting value to Red LED brightness. value: {0}", red);
|
Debug.Console(1, this, "Error converting value to Red LED brightness. value: {0}", red);
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_device.Leds[(uint)StatusSign.Led.eLedColor.Green].Brightness =
|
_device.Leds[(uint)StatusSign.Led.eLedColor.Green].Brightness =
|
||||||
(StatusSign.Led.eBrightnessPercentageValues)SimplSharpDeviceHelper.PercentToUshort(green);
|
(StatusSign.Led.eBrightnessPercentageValues)SimplSharpDeviceHelper.PercentToUshort(green);
|
||||||
}
|
}
|
||||||
catch (InvalidOperationException)
|
catch (InvalidOperationException)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Error converting value to Green LED brightness. value: {0}", green);
|
Debug.Console(1, this, "Error converting value to Green LED brightness. value: {0}", green);
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_device.Leds[(uint)StatusSign.Led.eLedColor.Blue].Brightness =
|
_device.Leds[(uint)StatusSign.Led.eLedColor.Blue].Brightness =
|
||||||
(StatusSign.Led.eBrightnessPercentageValues)SimplSharpDeviceHelper.PercentToUshort(blue);
|
(StatusSign.Led.eBrightnessPercentageValues)SimplSharpDeviceHelper.PercentToUshort(blue);
|
||||||
}
|
}
|
||||||
catch (InvalidOperationException)
|
catch (InvalidOperationException)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Error converting value to Blue LED brightness. value: {0}", blue);
|
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)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
var joinMap = new StatusSignControllerJoinMap();
|
var joinMap = new StatusSignControllerJoinMap(joinStart);
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<StatusSignControllerJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<StatusSignControllerJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
|
|
||||||
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
trilist.SetBoolSigAction(joinMap.RedControl, b => EnableControl(trilist, joinMap, this));
|
trilist.SetBoolSigAction(joinMap.RedControl.JoinNumber, b => EnableControl(trilist, joinMap, this));
|
||||||
trilist.SetBoolSigAction(joinMap.GreenControl, b => EnableControl(trilist, joinMap, this));
|
trilist.SetBoolSigAction(joinMap.GreenControl.JoinNumber, b => EnableControl(trilist, joinMap, this));
|
||||||
trilist.SetBoolSigAction(joinMap.BlueControl, b => EnableControl(trilist, joinMap, this));
|
trilist.SetBoolSigAction(joinMap.BlueControl.JoinNumber, b => EnableControl(trilist, joinMap, this));
|
||||||
|
|
||||||
trilist.SetUShortSigAction(joinMap.RedLed, u => SetColor(trilist, joinMap, this));
|
trilist.SetUShortSigAction(joinMap.RedLed.JoinNumber, u => SetColor(trilist, joinMap, this));
|
||||||
trilist.SetUShortSigAction(joinMap.GreenLed, u => SetColor(trilist, joinMap, this));
|
trilist.SetUShortSigAction(joinMap.GreenLed.JoinNumber, u => SetColor(trilist, joinMap, this));
|
||||||
trilist.SetUShortSigAction(joinMap.BlueLed, u => SetColor(trilist, joinMap, this));
|
trilist.SetUShortSigAction(joinMap.BlueLed.JoinNumber, u => SetColor(trilist, joinMap, this));
|
||||||
|
|
||||||
trilist.StringInput[joinMap.Name].StringValue = Name;
|
trilist.StringInput[joinMap.Name.JoinNumber].StringValue = Name;
|
||||||
|
|
||||||
IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
||||||
RedLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RedControl]);
|
RedLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RedControl.JoinNumber]);
|
||||||
BlueLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.BlueControl]);
|
BlueLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.BlueControl.JoinNumber]);
|
||||||
GreenLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.GreenControl]);
|
GreenLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.GreenControl.JoinNumber]);
|
||||||
|
|
||||||
RedLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.RedLed]);
|
RedLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.RedLed.JoinNumber]);
|
||||||
BlueLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.BlueLed]);
|
BlueLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.BlueLed.JoinNumber]);
|
||||||
GreenLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.GreenLed]);
|
GreenLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.GreenLed.JoinNumber]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void EnableControl(BasicTriList triList, StatusSignControllerJoinMap joinMap,
|
private static void EnableControl(BasicTriList triList, StatusSignControllerJoinMap joinMap,
|
||||||
StatusSignController device)
|
StatusSignController device)
|
||||||
{
|
{
|
||||||
var redEnable = triList.BooleanOutput[joinMap.RedControl].BoolValue;
|
var redEnable = triList.BooleanOutput[joinMap.RedControl.JoinNumber].BoolValue;
|
||||||
var greenEnable = triList.BooleanOutput[joinMap.GreenControl].BoolValue;
|
var greenEnable = triList.BooleanOutput[joinMap.GreenControl.JoinNumber].BoolValue;
|
||||||
var blueEnable = triList.BooleanOutput[joinMap.BlueControl].BoolValue;
|
var blueEnable = triList.BooleanOutput[joinMap.BlueControl.JoinNumber].BoolValue;
|
||||||
device.EnableLedControl(redEnable, greenEnable, blueEnable);
|
device.EnableLedControl(redEnable, greenEnable, blueEnable);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void SetColor(BasicTriList triList, StatusSignControllerJoinMap joinMap,
|
private static void SetColor(BasicTriList triList, StatusSignControllerJoinMap joinMap,
|
||||||
StatusSignController device)
|
StatusSignController device)
|
||||||
{
|
{
|
||||||
var redBrightness = triList.UShortOutput[joinMap.RedLed].UShortValue;
|
var redBrightness = triList.UShortOutput[joinMap.RedLed.JoinNumber].UShortValue;
|
||||||
var greenBrightness = triList.UShortOutput[joinMap.GreenLed].UShortValue;
|
var greenBrightness = triList.UShortOutput[joinMap.GreenLed.JoinNumber].UShortValue;
|
||||||
var blueBrightness = triList.UShortOutput[joinMap.BlueLed].UShortValue;
|
var blueBrightness = triList.UShortOutput[joinMap.BlueLed.JoinNumber].UShortValue;
|
||||||
|
|
||||||
device.SetColor(redBrightness, greenBrightness, blueBrightness);
|
device.SetColor(redBrightness, greenBrightness, blueBrightness);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class StatusSignControllerFactory : EssentialsDeviceFactory<StatusSignController>
|
public class StatusSignControllerFactory : EssentialsDeviceFactory<StatusSignController>
|
||||||
{
|
{
|
||||||
public StatusSignControllerFactory()
|
public StatusSignControllerFactory()
|
||||||
{
|
{
|
||||||
TypeNames = new List<string>() { "statussign" };
|
TypeNames = new List<string>() { "statussign" };
|
||||||
}
|
}
|
||||||
|
|
||||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||||
{
|
{
|
||||||
Debug.Console(1, "Factory Attempting to create new StatusSign Device");
|
Debug.Console(1, "Factory Attempting to create new StatusSign Device");
|
||||||
|
|
||||||
var control = CommFactory.GetControlPropertiesConfig(dc);
|
var control = CommFactory.GetControlPropertiesConfig(dc);
|
||||||
var cresnetId = control.CresnetIdInt;
|
var cresnetId = control.CresnetIdInt;
|
||||||
|
|
||||||
return new StatusSignController(dc.Key, dc.Name, new StatusSign(cresnetId, Global.ControlSystem));
|
return new StatusSignController(dc.Key, dc.Name, new StatusSign(cresnetId, Global.ControlSystem));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,10 +5,6 @@ using System.Text;
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
|
||||||
using Crestron.SimplSharpPro.EthernetCommunication;
|
|
||||||
using Crestron.SimplSharpPro.UI;
|
|
||||||
using Crestron.SimplSharp.Reflection;
|
|
||||||
|
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
|
|
||||||
@@ -17,18 +13,23 @@ namespace PepperDash.Essentials.Core
|
|||||||
{
|
{
|
||||||
public static class DeviceManager
|
public static class DeviceManager
|
||||||
{
|
{
|
||||||
|
private static readonly CCriticalSection DeviceCriticalSection = new CCriticalSection();
|
||||||
|
private static readonly CEvent AllowAddDevicesCEvent = new CEvent(false, true);
|
||||||
//public static List<Device> Devices { get { return _Devices; } }
|
//public static List<Device> Devices { get { return _Devices; } }
|
||||||
//static List<Device> _Devices = new List<Device>();
|
//static List<Device> _Devices = new List<Device>();
|
||||||
|
|
||||||
static Dictionary<string, IKeyed> Devices = new Dictionary<string, IKeyed>(StringComparer.OrdinalIgnoreCase);
|
static readonly Dictionary<string, IKeyed> Devices = new Dictionary<string, IKeyed>(StringComparer.OrdinalIgnoreCase);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a copy of all the devices in a list
|
/// Returns a copy of all the devices in a list
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static List<IKeyed> AllDevices { get { return new List<IKeyed>(Devices.Values); } }
|
public static List<IKeyed> AllDevices { get { return new List<IKeyed>(Devices.Values); } }
|
||||||
|
|
||||||
|
public static bool AddDeviceEnabled;
|
||||||
|
|
||||||
public static void Initialize(CrestronControlSystem cs)
|
public static void Initialize(CrestronControlSystem cs)
|
||||||
{
|
{
|
||||||
|
AddDeviceEnabled = true;
|
||||||
CrestronConsole.AddNewConsoleCommand(ListDeviceCommStatuses, "devcommstatus", "Lists the communication status of all devices",
|
CrestronConsole.AddNewConsoleCommand(ListDeviceCommStatuses, "devcommstatus", "Lists the communication status of all devices",
|
||||||
ConsoleAccessLevelEnum.AccessOperator);
|
ConsoleAccessLevelEnum.AccessOperator);
|
||||||
CrestronConsole.AddNewConsoleCommand(ListDeviceFeedbacks, "devfb", "Lists current feedbacks",
|
CrestronConsole.AddNewConsoleCommand(ListDeviceFeedbacks, "devfb", "Lists current feedbacks",
|
||||||
@@ -37,18 +38,9 @@ namespace PepperDash.Essentials.Core
|
|||||||
ConsoleAccessLevelEnum.AccessOperator);
|
ConsoleAccessLevelEnum.AccessOperator);
|
||||||
CrestronConsole.AddNewConsoleCommand(DeviceJsonApi.DoDeviceActionWithJson, "devjson", "",
|
CrestronConsole.AddNewConsoleCommand(DeviceJsonApi.DoDeviceActionWithJson, "devjson", "",
|
||||||
ConsoleAccessLevelEnum.AccessOperator);
|
ConsoleAccessLevelEnum.AccessOperator);
|
||||||
CrestronConsole.AddNewConsoleCommand(s =>
|
CrestronConsole.AddNewConsoleCommand(s => CrestronConsole.ConsoleCommandResponse(DeviceJsonApi.GetProperties(s)), "devprops", "", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
{
|
CrestronConsole.AddNewConsoleCommand(s => CrestronConsole.ConsoleCommandResponse(DeviceJsonApi.GetMethods(s)), "devmethods", "", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
CrestronConsole.ConsoleCommandResponse(DeviceJsonApi.GetProperties(s));
|
CrestronConsole.AddNewConsoleCommand(s => CrestronConsole.ConsoleCommandResponse(DeviceJsonApi.GetApiMethods(s)), "apimethods", "", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
}, "devprops", "", ConsoleAccessLevelEnum.AccessOperator);
|
|
||||||
CrestronConsole.AddNewConsoleCommand(s =>
|
|
||||||
{
|
|
||||||
CrestronConsole.ConsoleCommandResponse(DeviceJsonApi.GetMethods(s));
|
|
||||||
}, "devmethods", "", ConsoleAccessLevelEnum.AccessOperator);
|
|
||||||
CrestronConsole.AddNewConsoleCommand(s =>
|
|
||||||
{
|
|
||||||
CrestronConsole.ConsoleCommandResponse(DeviceJsonApi.GetApiMethods(s));
|
|
||||||
}, "apimethods", "", ConsoleAccessLevelEnum.AccessOperator);
|
|
||||||
CrestronConsole.AddNewConsoleCommand(SimulateComReceiveOnDevice, "devsimreceive",
|
CrestronConsole.AddNewConsoleCommand(SimulateComReceiveOnDevice, "devsimreceive",
|
||||||
"Simulates incoming data on a com device", ConsoleAccessLevelEnum.AccessOperator);
|
"Simulates incoming data on a com device", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
}
|
}
|
||||||
@@ -58,47 +50,56 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static void ActivateAll()
|
public static void ActivateAll()
|
||||||
{
|
{
|
||||||
// PreActivate all devices
|
try
|
||||||
foreach (var d in Devices.Values)
|
{
|
||||||
{
|
DeviceCriticalSection.Enter();
|
||||||
try
|
AddDeviceEnabled = false;
|
||||||
{
|
// PreActivate all devices
|
||||||
if (d is Device)
|
foreach (var d in Devices.Values)
|
||||||
(d as Device).PreActivate();
|
{
|
||||||
}
|
try
|
||||||
catch (Exception e)
|
{
|
||||||
{
|
if (d is Device)
|
||||||
Debug.Console(0, d, "ERROR: Device PreActivation failure:\r{0}", e);
|
(d as Device).PreActivate();
|
||||||
}
|
}
|
||||||
}
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Console(0, d, "ERROR: Device PreActivation failure:\r{0}", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Activate all devices
|
// Activate all devices
|
||||||
foreach (var d in Devices.Values)
|
foreach (var d in Devices.Values)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (d is Device)
|
if (d is Device)
|
||||||
(d as Device).Activate();
|
(d as Device).Activate();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(0, d, "ERROR: Device Activation failure:\r{0}", e);
|
Debug.Console(0, d, "ERROR: Device Activation failure:\r{0}", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// PostActivate all devices
|
// PostActivate all devices
|
||||||
foreach (var d in Devices.Values)
|
foreach (var d in Devices.Values)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (d is Device)
|
if (d is Device)
|
||||||
(d as Device).PostActivate();
|
(d as Device).PostActivate();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(0, d, "ERROR: Device PostActivation failure:\r{0}", e);
|
Debug.Console(0, d, "ERROR: Device PostActivation failure:\r{0}", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
DeviceCriticalSection.Leave();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -106,11 +107,18 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static void DeactivateAll()
|
public static void DeactivateAll()
|
||||||
{
|
{
|
||||||
foreach (var d in Devices.Values)
|
try
|
||||||
{
|
{
|
||||||
if (d is Device)
|
DeviceCriticalSection.Enter();
|
||||||
(d as Device).Deactivate();
|
foreach (var d in Devices.Values.OfType<Device>())
|
||||||
}
|
{
|
||||||
|
d.Deactivate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
DeviceCriticalSection.Leave();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//static void ListMethods(string devKey)
|
//static void ListMethods(string devKey)
|
||||||
@@ -134,37 +142,37 @@ namespace PepperDash.Essentials.Core
|
|||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
static void ListDevices(string s)
|
private static void ListDevices(string s)
|
||||||
{
|
{
|
||||||
Debug.Console(0, "{0} Devices registered with Device Mangager:",Devices.Count);
|
Debug.Console(0, "{0} Devices registered with Device Manager:", Devices.Count);
|
||||||
var sorted = Devices.Values.ToList();
|
var sorted = Devices.Values.ToList();
|
||||||
sorted.Sort((a, b) => a.Key.CompareTo(b.Key));
|
sorted.Sort((a, b) => a.Key.CompareTo(b.Key));
|
||||||
|
|
||||||
foreach (var d in sorted)
|
foreach (var d in sorted)
|
||||||
{
|
{
|
||||||
var name = d is IKeyName ? (d as IKeyName).Name : "---";
|
var name = d is IKeyName ? (d as IKeyName).Name : "---";
|
||||||
Debug.Console(0, " [{0}] {1}", d.Key, name);
|
Debug.Console(0, " [{0}] {1}", d.Key, name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ListDeviceFeedbacks(string devKey)
|
private static void ListDeviceFeedbacks(string devKey)
|
||||||
{
|
{
|
||||||
var dev = GetDeviceForKey(devKey);
|
var dev = GetDeviceForKey(devKey);
|
||||||
if(dev == null)
|
if (dev == null)
|
||||||
{
|
{
|
||||||
Debug.Console(0, "Device '{0}' not found", devKey);
|
Debug.Console(0, "Device '{0}' not found", devKey);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var statusDev = dev as IHasFeedback;
|
var statusDev = dev as IHasFeedback;
|
||||||
if(statusDev == null)
|
if (statusDev == null)
|
||||||
{
|
{
|
||||||
Debug.Console(0, "Device '{0}' does not have visible feedbacks", devKey);
|
Debug.Console(0, "Device '{0}' does not have visible feedbacks", devKey);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
statusDev.DumpFeedbacksToConsole(true);
|
statusDev.DumpFeedbacksToConsole(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//static void ListDeviceCommands(string devKey)
|
//static void ListDeviceCommands(string devKey)
|
||||||
//{
|
//{
|
||||||
// var dev = GetDeviceForKey(devKey);
|
// var dev = GetDeviceForKey(devKey);
|
||||||
// if (dev == null)
|
// if (dev == null)
|
||||||
@@ -175,70 +183,97 @@ namespace PepperDash.Essentials.Core
|
|||||||
// Debug.Console(0, "This needs to be reworked. Stay tuned.", devKey);
|
// Debug.Console(0, "This needs to be reworked. Stay tuned.", devKey);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
static void ListDeviceCommStatuses(string input)
|
private static void ListDeviceCommStatuses(string input)
|
||||||
{
|
{
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
foreach (var dev in Devices.Values)
|
foreach (var dev in Devices.Values.OfType<ICommunicationMonitor>())
|
||||||
{
|
{
|
||||||
if (dev is ICommunicationMonitor)
|
sb.Append(string.Format("{0}: {1}\r", dev,
|
||||||
sb.Append(string.Format("{0}: {1}\r", dev.Key, (dev as ICommunicationMonitor).CommunicationMonitor.Status));
|
dev.CommunicationMonitor.Status));
|
||||||
}
|
}
|
||||||
CrestronConsole.ConsoleCommandResponse(sb.ToString());
|
CrestronConsole.ConsoleCommandResponse(sb.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//static void DoDeviceCommand(string command)
|
//static void DoDeviceCommand(string command)
|
||||||
//{
|
//{
|
||||||
// Debug.Console(0, "Not yet implemented. Stay tuned");
|
// Debug.Console(0, "Not yet implemented. Stay tuned");
|
||||||
//}
|
//}
|
||||||
|
|
||||||
public static void AddDevice(IKeyed newDev)
|
public static void AddDevice(IKeyed newDev)
|
||||||
{
|
{
|
||||||
// Check for device with same key
|
try
|
||||||
//var existingDevice = _Devices.FirstOrDefault(d => d.Key.Equals(newDev.Key, StringComparison.OrdinalIgnoreCase));
|
{
|
||||||
////// If it exists, remove or warn??
|
if (!DeviceCriticalSection.TryEnter())
|
||||||
//if (existingDevice != null)
|
{
|
||||||
if(Devices.ContainsKey(newDev.Key))
|
Debug.Console(0, Debug.ErrorLogLevel.Error, "Currently unable to add devices to Device Manager. Please try again");
|
||||||
{
|
return;
|
||||||
Debug.Console(0, newDev, "WARNING: A device with this key already exists. Not added to manager");
|
}
|
||||||
return;
|
// Check for device with same key
|
||||||
}
|
//var existingDevice = _Devices.FirstOrDefault(d => d.Key.Equals(newDev.Key, StringComparison.OrdinalIgnoreCase));
|
||||||
Devices.Add(newDev.Key, newDev);
|
////// If it exists, remove or warn??
|
||||||
//if (!(_Devices.Contains(newDev)))
|
//if (existingDevice != null)
|
||||||
// _Devices.Add(newDev);
|
|
||||||
|
if (!AddDeviceEnabled)
|
||||||
|
{
|
||||||
|
Debug.Console(0, Debug.ErrorLogLevel.Error, "All devices have been activated. Adding new devices is not allowed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Devices.ContainsKey(newDev.Key))
|
||||||
|
{
|
||||||
|
Debug.Console(0, newDev, "WARNING: A device with this key already exists. Not added to manager");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Devices.Add(newDev.Key, newDev);
|
||||||
|
//if (!(_Devices.Contains(newDev)))
|
||||||
|
// _Devices.Add(newDev);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
DeviceCriticalSection.Leave();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void RemoveDevice(IKeyed newDev)
|
public static void RemoveDevice(IKeyed newDev)
|
||||||
{
|
{
|
||||||
if(newDev == null)
|
try
|
||||||
return;
|
{
|
||||||
if (Devices.ContainsKey(newDev.Key))
|
DeviceCriticalSection.Enter();
|
||||||
Devices.Remove(newDev.Key);
|
if (newDev == null)
|
||||||
//if (_Devices.Contains(newDev))
|
return;
|
||||||
// _Devices.Remove(newDev);
|
if (Devices.ContainsKey(newDev.Key))
|
||||||
else
|
Devices.Remove(newDev.Key);
|
||||||
Debug.Console(0, "Device manager: Device '{0}' does not exist in manager. Cannot remove", newDev.Key);
|
//if (_Devices.Contains(newDev))
|
||||||
|
// _Devices.Remove(newDev);
|
||||||
|
else
|
||||||
|
Debug.Console(0, "Device manager: Device '{0}' does not exist in manager. Cannot remove", newDev.Key);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
DeviceCriticalSection.Leave();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IEnumerable<string> GetDeviceKeys()
|
public static IEnumerable<string> GetDeviceKeys()
|
||||||
{
|
{
|
||||||
//return _Devices.Select(d => d.Key).ToList();
|
//return _Devices.Select(d => d.Key).ToList();
|
||||||
return Devices.Keys;
|
return Devices.Keys;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IEnumerable<IKeyed> GetDevices()
|
public static IEnumerable<IKeyed> GetDevices()
|
||||||
{
|
{
|
||||||
//return _Devices.Select(d => d.Key).ToList();
|
//return _Devices.Select(d => d.Key).ToList();
|
||||||
return Devices.Values;
|
return Devices.Values;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IKeyed GetDeviceForKey(string key)
|
public static IKeyed GetDeviceForKey(string key)
|
||||||
{
|
{
|
||||||
//return _Devices.FirstOrDefault(d => d.Key.Equals(key, StringComparison.OrdinalIgnoreCase));
|
//return _Devices.FirstOrDefault(d => d.Key.Equals(key, StringComparison.OrdinalIgnoreCase));
|
||||||
if (key != null && Devices.ContainsKey(key))
|
if (key != null && Devices.ContainsKey(key))
|
||||||
return Devices[key];
|
return Devices[key];
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -256,7 +291,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
}
|
}
|
||||||
//Debug.Console(2, "**** {0} - {1} ****", match.Groups[1].Value, match.Groups[2].Value);
|
//Debug.Console(2, "**** {0} - {1} ****", match.Groups[1].Value, match.Groups[2].Value);
|
||||||
|
|
||||||
ComPortController com = GetDeviceForKey(match.Groups[1].Value) as ComPortController;
|
var com = GetDeviceForKey(match.Groups[1].Value) as ComPortController;
|
||||||
if (com == null)
|
if (com == null)
|
||||||
{
|
{
|
||||||
CrestronConsole.ConsoleCommandResponse("'{0}' is not a comm port device", match.Groups[1].Value);
|
CrestronConsole.ConsoleCommandResponse("'{0}' is not a comm port device", match.Groups[1].Value);
|
||||||
|
|||||||
@@ -126,7 +126,9 @@ namespace PepperDash.Essentials.Core
|
|||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<DisplayControllerJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<DisplayControllerJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
|
|
||||||
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
Debug.Console(0, "Linking to Display: {0}", displayDevice.Name);
|
Debug.Console(0, "Linking to Display: {0}", displayDevice.Name);
|
||||||
|
|||||||
@@ -27,6 +27,16 @@ namespace PepperDash.Essentials.Core
|
|||||||
return joinMap;
|
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>
|
/// <summary>
|
||||||
/// Attempts to find a custom join map by key and returns it deserialized if found
|
/// Attempts to find a custom join map by key and returns it deserialized if found
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -72,36 +72,33 @@ namespace PepperDash.Essentials.Core.Lighting
|
|||||||
|
|
||||||
protected GenericLightingJoinMap LinkLightingToApi(LightingBase lightingDevice, BasicTriList trilist, uint joinStart,
|
protected GenericLightingJoinMap LinkLightingToApi(LightingBase lightingDevice, BasicTriList trilist, uint joinStart,
|
||||||
string joinMapKey, EiscApiAdvanced bridge)
|
string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
var joinMap = new GenericLightingJoinMap();
|
var joinMap = new GenericLightingJoinMap(joinStart);
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<GenericLightingJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<GenericLightingJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
|
|
||||||
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
Debug.Console(0, "Linking to Lighting Type {0}", lightingDevice.GetType().Name.ToString());
|
Debug.Console(0, "Linking to Lighting Type {0}", lightingDevice.GetType().Name.ToString());
|
||||||
|
|
||||||
// GenericLighitng Actions & FeedBack
|
// GenericLighitng Actions & FeedBack
|
||||||
trilist.SetUShortSigAction(joinMap.SelectScene, u => lightingDevice.SelectScene(lightingDevice.LightingScenes[u]));
|
trilist.SetUShortSigAction(joinMap.SelectScene.JoinNumber, u => lightingDevice.SelectScene(lightingDevice.LightingScenes[u]));
|
||||||
|
|
||||||
var sceneIndex = 1;
|
var sceneIndex = 0;
|
||||||
foreach (var scene in lightingDevice.LightingScenes)
|
foreach (var scene in lightingDevice.LightingScenes)
|
||||||
{
|
{
|
||||||
var tempIndex = sceneIndex - 1;
|
trilist.SetSigTrueAction((uint)(joinMap.SelectSceneDirect.JoinNumber + sceneIndex), () => lightingDevice.SelectScene(lightingDevice.LightingScenes[sceneIndex]));
|
||||||
trilist.SetSigTrueAction((uint)(joinMap.LightingSceneOffset + sceneIndex), () => lightingDevice.SelectScene(lightingDevice.LightingScenes[tempIndex]));
|
scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.SelectSceneDirect.JoinNumber + sceneIndex)]);
|
||||||
scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)]);
|
trilist.StringInput[(uint)(joinMap.SelectSceneDirect.JoinNumber + sceneIndex)].StringValue = scene.Name;
|
||||||
trilist.StringInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)].StringValue = scene.Name;
|
trilist.BooleanInput[(uint)(joinMap.ButtonVisibility.JoinNumber + sceneIndex)].BoolValue = true;
|
||||||
trilist.BooleanInput[(uint)(joinMap.ButtonVisibilityOffset + sceneIndex)].BoolValue = true;
|
|
||||||
sceneIndex++;
|
sceneIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return joinMap;
|
return joinMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -201,30 +201,30 @@ namespace PepperDash.Essentials.Core.Monitoring
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
var joinMap = new SystemMonitorJoinMap();
|
var joinMap = new SystemMonitorJoinMap(joinStart);
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<SystemMonitorJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<SystemMonitorJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
|
|
||||||
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
Debug.Console(2, this, "Linking API starting at join: {0}", joinStart);
|
Debug.Console(2, this, "Linking API starting at join: {0}", joinStart);
|
||||||
|
|
||||||
TimeZoneFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeZone]);
|
TimeZoneFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeZone.JoinNumber]);
|
||||||
TimeZoneTextFeedback.LinkInputSig(trilist.StringInput[joinMap.TimeZoneName]);
|
TimeZoneTextFeedback.LinkInputSig(trilist.StringInput[joinMap.TimeZoneName.JoinNumber]);
|
||||||
|
|
||||||
IoControllerVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.IOControllerVersion]);
|
IoControllerVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.IOControllerVersion.JoinNumber]);
|
||||||
SnmpVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.SnmpAppVersion]);
|
SnmpVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.SnmpAppVersion.JoinNumber]);
|
||||||
BaCnetAppVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.BACnetAppVersion]);
|
BaCnetAppVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.BACnetAppVersion.JoinNumber]);
|
||||||
ControllerVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.ControllerVersion]);
|
ControllerVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.ControllerVersion.JoinNumber]);
|
||||||
SerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.SerialNumber]);
|
SerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.SerialNumber.JoinNumber]);
|
||||||
ModelFeedback.LinkInputSig(trilist.StringInput[joinMap.Model]);
|
ModelFeedback.LinkInputSig(trilist.StringInput[joinMap.Model.JoinNumber]);
|
||||||
UptimeFeedback.LinkInputSig(trilist.StringInput[joinMap.Uptime]);
|
UptimeFeedback.LinkInputSig(trilist.StringInput[joinMap.Uptime.JoinNumber]);
|
||||||
LastStartFeedback.LinkInputSig(trilist.StringInput[joinMap.LastBoot]);
|
LastStartFeedback.LinkInputSig(trilist.StringInput[joinMap.LastBoot.JoinNumber]);
|
||||||
|
|
||||||
// iterate the program status feedback collection and map all the joins
|
// iterate the program status feedback collection and map all the joins
|
||||||
LinkProgramInfoJoins(this, trilist, joinMap);
|
LinkProgramInfoJoins(this, trilist, joinMap);
|
||||||
@@ -233,65 +233,64 @@ namespace PepperDash.Essentials.Core.Monitoring
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void LinkEthernetInfoJoins(SystemMonitorController systemMonitorController, BasicTriList trilist, SystemMonitorJoinMap joinMap)
|
private static void LinkEthernetInfoJoins(SystemMonitorController systemMonitorController, BasicTriList trilist, SystemMonitorJoinMap joinMap)
|
||||||
{
|
{
|
||||||
var ethernetSlotJoinStart = joinMap.EthernetStartJoin;
|
uint ethernetSlotJoinStart = 0;
|
||||||
|
|
||||||
foreach (var fb in systemMonitorController.EthernetStatusFeedbackCollection)
|
foreach (var fb in systemMonitorController.EthernetStatusFeedbackCollection)
|
||||||
{
|
{
|
||||||
fb.Value.CurrentIpAddressFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.CurrentIpAddress]);
|
fb.Value.CurrentIpAddressFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.CurrentIpAddress.JoinNumber]);
|
||||||
fb.Value.CurrentSubnetMaskFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.CurrentSubnetMask]);
|
fb.Value.CurrentSubnetMaskFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.CurrentSubnetMask.JoinNumber]);
|
||||||
fb.Value.CurrentDefaultGatewayFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.CurrentDefaultGateway]);
|
fb.Value.CurrentDefaultGatewayFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.CurrentDefaultGateway.JoinNumber]);
|
||||||
fb.Value.StaticIpAddressFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.StaticIpAddress]);
|
fb.Value.StaticIpAddressFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.StaticIpAddress.JoinNumber]);
|
||||||
fb.Value.StaticSubnetMaskFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.StaticSubnetMask]);
|
fb.Value.StaticSubnetMaskFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.StaticSubnetMask.JoinNumber]);
|
||||||
fb.Value.StaticDefaultGatewayFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.StaticDefaultGateway]);
|
fb.Value.StaticDefaultGatewayFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.StaticDefaultGateway.JoinNumber]);
|
||||||
fb.Value.HostNameFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.HostName]);
|
fb.Value.HostNameFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.HostName.JoinNumber]);
|
||||||
fb.Value.MacAddressFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.MacAddress]);
|
fb.Value.MacAddressFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.MacAddress.JoinNumber]);
|
||||||
fb.Value.DomainFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.Domain]);
|
fb.Value.DomainFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.Domain.JoinNumber]);
|
||||||
fb.Value.DnsServerFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.DnsServer]);
|
fb.Value.DnsServerFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.DnsServer.JoinNumber]);
|
||||||
fb.Value.DhcpStatusFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.DhcpStatus]);
|
fb.Value.DhcpStatusFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.DhcpStatus.JoinNumber]);
|
||||||
|
|
||||||
ethernetSlotJoinStart += joinMap.EthernetOffsetJoin;
|
ethernetSlotJoinStart += joinMap.EthernetOffsetJoin.JoinNumber;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void LinkProgramInfoJoins(SystemMonitorController systemMonitorController, BasicTriList trilist,
|
private static void LinkProgramInfoJoins(SystemMonitorController systemMonitorController, BasicTriList trilist,
|
||||||
SystemMonitorJoinMap joinMap)
|
SystemMonitorJoinMap joinMap)
|
||||||
{
|
{
|
||||||
var programSlotJoinStart = joinMap.ProgramStartJoin;
|
uint programSlotJoinStart = 0;
|
||||||
|
|
||||||
foreach (var p in systemMonitorController.ProgramStatusFeedbackCollection)
|
foreach (var p in systemMonitorController.ProgramStatusFeedbackCollection)
|
||||||
{
|
{
|
||||||
var programNumber = p.Value.Program.Number;
|
var programNumber = p.Value.Program.Number;
|
||||||
|
|
||||||
trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramStart,
|
trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramStart.JoinNumber,
|
||||||
b => SystemMonitor.ProgramCollection[programNumber].OperatingState = eProgramOperatingState.Start);
|
b => SystemMonitor.ProgramCollection[programNumber].OperatingState = eProgramOperatingState.Start);
|
||||||
p.Value.ProgramStartedFeedback.LinkInputSig(trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramStart]);
|
p.Value.ProgramStartedFeedback.LinkInputSig(trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramStart.JoinNumber]);
|
||||||
|
|
||||||
trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramStop,
|
trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramStop.JoinNumber,
|
||||||
b => SystemMonitor.ProgramCollection[programNumber].OperatingState = eProgramOperatingState.Stop);
|
b => SystemMonitor.ProgramCollection[programNumber].OperatingState = eProgramOperatingState.Stop);
|
||||||
p.Value.ProgramStoppedFeedback.LinkInputSig(trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramStop]);
|
p.Value.ProgramStoppedFeedback.LinkInputSig(trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramStop.JoinNumber]);
|
||||||
|
|
||||||
trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramRegister,
|
trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramRegister.JoinNumber,
|
||||||
b => SystemMonitor.ProgramCollection[programNumber].RegistrationState = eProgramRegistrationState.Register);
|
b => SystemMonitor.ProgramCollection[programNumber].RegistrationState = eProgramRegistrationState.Register);
|
||||||
p.Value.ProgramRegisteredFeedback.LinkInputSig(
|
p.Value.ProgramRegisteredFeedback.LinkInputSig(
|
||||||
trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramRegister]);
|
trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramRegister.JoinNumber]);
|
||||||
|
|
||||||
trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramUnregister,
|
trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramUnregister.JoinNumber,
|
||||||
b => SystemMonitor.ProgramCollection[programNumber].RegistrationState = eProgramRegistrationState.Unregister);
|
b => SystemMonitor.ProgramCollection[programNumber].RegistrationState = eProgramRegistrationState.Unregister);
|
||||||
p.Value.ProgramUnregisteredFeedback.LinkInputSig(
|
p.Value.ProgramUnregisteredFeedback.LinkInputSig(
|
||||||
trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramUnregister]);
|
trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramUnregister.JoinNumber]);
|
||||||
|
|
||||||
p.Value.ProgramNameFeedback.LinkInputSig(trilist.StringInput[programSlotJoinStart + joinMap.ProgramName]);
|
p.Value.ProgramNameFeedback.LinkInputSig(trilist.StringInput[programSlotJoinStart + joinMap.ProgramName.JoinNumber]);
|
||||||
p.Value.ProgramCompileTimeFeedback.LinkInputSig(
|
p.Value.ProgramCompileTimeFeedback.LinkInputSig(
|
||||||
trilist.StringInput[programSlotJoinStart + joinMap.ProgramCompiledTime]);
|
trilist.StringInput[programSlotJoinStart + joinMap.ProgramCompiledTime.JoinNumber]);
|
||||||
p.Value.CrestronDataBaseVersionFeedback.LinkInputSig(
|
p.Value.CrestronDataBaseVersionFeedback.LinkInputSig(
|
||||||
trilist.StringInput[programSlotJoinStart + joinMap.ProgramCrestronDatabaseVersion]);
|
trilist.StringInput[programSlotJoinStart + joinMap.ProgramCrestronDatabaseVersion.JoinNumber]);
|
||||||
p.Value.EnvironmentVersionFeedback.LinkInputSig(
|
p.Value.EnvironmentVersionFeedback.LinkInputSig(
|
||||||
trilist.StringInput[programSlotJoinStart + joinMap.ProgramEnvironmentVersion]);
|
trilist.StringInput[programSlotJoinStart + joinMap.ProgramEnvironmentVersion.JoinNumber]);
|
||||||
p.Value.AggregatedProgramInfoFeedback.LinkInputSig(
|
p.Value.AggregatedProgramInfoFeedback.LinkInputSig(
|
||||||
trilist.StringInput[programSlotJoinStart + joinMap.AggregatedProgramInfo]);
|
trilist.StringInput[programSlotJoinStart + joinMap.AggregatedProgramInfo.JoinNumber]);
|
||||||
|
|
||||||
programSlotJoinStart = programSlotJoinStart + joinMap.ProgramOffsetJoin;
|
programSlotJoinStart = programSlotJoinStart + joinMap.ProgramOffsetJoin.JoinNumber;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,11 +29,12 @@ namespace PepperDash.Essentials.Core
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Flags]
|
||||||
public enum eRoutingSignalType
|
public enum eRoutingSignalType
|
||||||
{
|
{
|
||||||
Audio = 1,
|
Audio = 1,
|
||||||
Video = 2,
|
Video = 2,
|
||||||
AudioVideo = 4,
|
AudioVideo = Audio | Video,
|
||||||
UsbOutput = 8,
|
UsbOutput = 8,
|
||||||
UsbInput = 16
|
UsbInput = 16
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,43 +103,43 @@ namespace PepperDash.Essentials.DM.AirMedia
|
|||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
var joinMap = new AirMediaControllerJoinMap();
|
var joinMap = new AirMediaControllerJoinMap(joinStart);
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<AirMediaControllerJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<AirMediaControllerJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
|
|
||||||
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
Debug.Console(0, "Linking to Airmedia: {0}", Name);
|
Debug.Console(0, "Linking to Airmedia: {0}", Name);
|
||||||
|
|
||||||
trilist.StringInput[joinMap.Name].StringValue = Name;
|
trilist.StringInput[joinMap.Name.JoinNumber].StringValue = Name;
|
||||||
|
|
||||||
var commMonitor = this as ICommunicationMonitor;
|
var commMonitor = this as ICommunicationMonitor;
|
||||||
|
|
||||||
commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
||||||
|
|
||||||
IsInSessionFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsInSession]);
|
IsInSessionFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsInSession.JoinNumber]);
|
||||||
HdmiVideoSyncDetectedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.HdmiVideoSync]);
|
HdmiVideoSyncDetectedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.HdmiVideoSync.JoinNumber]);
|
||||||
|
|
||||||
trilist.SetSigTrueAction(joinMap.AutomaticInputRoutingEnabled, AirMedia.DisplayControl.EnableAutomaticRouting);
|
trilist.SetSigTrueAction(joinMap.AutomaticInputRoutingEnabled.JoinNumber, AirMedia.DisplayControl.EnableAutomaticRouting);
|
||||||
trilist.SetSigFalseAction(joinMap.AutomaticInputRoutingEnabled, AirMedia.DisplayControl.DisableAutomaticRouting);
|
trilist.SetSigFalseAction(joinMap.AutomaticInputRoutingEnabled.JoinNumber, AirMedia.DisplayControl.DisableAutomaticRouting);
|
||||||
AutomaticInputRoutingEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AutomaticInputRoutingEnabled]);
|
AutomaticInputRoutingEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AutomaticInputRoutingEnabled.JoinNumber]);
|
||||||
|
|
||||||
trilist.SetUShortSigAction(joinMap.VideoOut, (u) => SelectVideoOut(u));
|
trilist.SetUShortSigAction(joinMap.VideoOut.JoinNumber, (u) => SelectVideoOut(u));
|
||||||
|
|
||||||
VideoOutFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoOut]);
|
VideoOutFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoOut.JoinNumber]);
|
||||||
ErrorFeedback.LinkInputSig(trilist.UShortInput[joinMap.ErrorFB]);
|
ErrorFeedback.LinkInputSig(trilist.UShortInput[joinMap.ErrorFB.JoinNumber]);
|
||||||
NumberOfUsersConnectedFeedback.LinkInputSig(trilist.UShortInput[joinMap.NumberOfUsersConnectedFB]);
|
NumberOfUsersConnectedFeedback.LinkInputSig(trilist.UShortInput[joinMap.NumberOfUsersConnectedFB.JoinNumber]);
|
||||||
|
|
||||||
trilist.SetUShortSigAction(joinMap.LoginCode, (u) => AirMedia.AirMedia.LoginCode.UShortValue = u);
|
trilist.SetUShortSigAction(joinMap.LoginCode.JoinNumber, (u) => AirMedia.AirMedia.LoginCode.UShortValue = u);
|
||||||
LoginCodeFeedback.LinkInputSig(trilist.UShortInput[joinMap.LoginCode]);
|
LoginCodeFeedback.LinkInputSig(trilist.UShortInput[joinMap.LoginCode.JoinNumber]);
|
||||||
|
|
||||||
ConnectionAddressFeedback.LinkInputSig(trilist.StringInput[joinMap.ConnectionAddressFB]);
|
ConnectionAddressFeedback.LinkInputSig(trilist.StringInput[joinMap.ConnectionAddressFB.JoinNumber]);
|
||||||
HostnameFeedback.LinkInputSig(trilist.StringInput[joinMap.HostnameFB]);
|
HostnameFeedback.LinkInputSig(trilist.StringInput[joinMap.HostnameFB.JoinNumber]);
|
||||||
SerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.SerialNumberFeedback]);
|
SerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.SerialNumberFeedback.JoinNumber]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AirMedia_AirMediaChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args)
|
void AirMedia_AirMediaChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args)
|
||||||
|
|||||||
@@ -573,65 +573,65 @@ namespace PepperDash.Essentials.DM {
|
|||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
var joinMap = new DmBladeChassisControllerJoinMap();
|
var joinMap = new DmBladeChassisControllerJoinMap(joinStart);
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<DmBladeChassisControllerJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<DmBladeChassisControllerJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
|
||||||
|
|
||||||
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
||||||
|
|
||||||
// Link up outputs
|
// Link up outputs
|
||||||
for (uint i = 1; i <= Chassis.NumberOfOutputs; i++)
|
for (uint i = 1; i <= Chassis.NumberOfOutputs; i++)
|
||||||
{
|
{
|
||||||
var ioSlot = i;
|
var ioSlot = i;
|
||||||
|
var ioSlotJoin = ioSlot - 1;
|
||||||
|
|
||||||
// Control
|
// Control
|
||||||
trilist.SetUShortSigAction(joinMap.OutputVideo + ioSlot, o => ExecuteSwitch(o, ioSlot, eRoutingSignalType.Video));
|
trilist.SetUShortSigAction(joinMap.OutputVideo.JoinNumber + ioSlotJoin, o => ExecuteSwitch(o, ioSlot, eRoutingSignalType.Video));
|
||||||
|
|
||||||
if (TxDictionary.ContainsKey(ioSlot))
|
if (TxDictionary.ContainsKey(ioSlot))
|
||||||
{
|
{
|
||||||
Debug.Console(2, "Creating Tx Feedbacks {0}", ioSlot);
|
Debug.Console(2, "Creating Tx Feedbacks {0}", ioSlot);
|
||||||
var txKey = TxDictionary[ioSlot];
|
var txKey = TxDictionary[ioSlot];
|
||||||
var basicTxDevice = DeviceManager.GetDeviceForKey(txKey) as DmTxControllerBase;
|
var basicTxDevice = DeviceManager.GetDeviceForKey(txKey) as BasicDmTxControllerBase;
|
||||||
|
|
||||||
var advancedTxDevice = basicTxDevice as DmTxControllerBase;
|
var advancedTxDevice = basicTxDevice as DmTxControllerBase;
|
||||||
|
|
||||||
if (Chassis is DmMd128x128 || Chassis is DmMd64x64)
|
if (Chassis is DmMd128x128 || Chassis is DmMd64x64)
|
||||||
{
|
{
|
||||||
InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
|
InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (advancedTxDevice != null)
|
if (advancedTxDevice != null)
|
||||||
{
|
{
|
||||||
advancedTxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
|
advancedTxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]);
|
||||||
Debug.Console(2, "Linking Tx Online Feedback from Advanced Transmitter at input {0}", ioSlot);
|
Debug.Console(2, "Linking Tx Online Feedback from Advanced Transmitter at input {0}", ioSlot);
|
||||||
}
|
}
|
||||||
else if (InputEndpointOnlineFeedbacks[ioSlot] != null)
|
else if (InputEndpointOnlineFeedbacks[ioSlot] != null)
|
||||||
{
|
{
|
||||||
Debug.Console(2, "Linking Tx Online Feedback from Input Card {0}", ioSlot);
|
Debug.Console(2, "Linking Tx Online Feedback from Input Card {0}", ioSlot);
|
||||||
InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
|
InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (basicTxDevice != null && advancedTxDevice == null)
|
if (basicTxDevice != null && advancedTxDevice == null)
|
||||||
trilist.BooleanInput[joinMap.TxAdvancedIsPresent + ioSlot].BoolValue = true;
|
trilist.BooleanInput[joinMap.TxAdvancedIsPresent.JoinNumber + ioSlotJoin].BoolValue = true;
|
||||||
|
|
||||||
if (advancedTxDevice != null)
|
if (advancedTxDevice != null)
|
||||||
{
|
{
|
||||||
advancedTxDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
|
advancedTxDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Console(1, "Setting up actions and feedbacks on input card {0}", ioSlot);
|
Debug.Console(1, "Setting up actions and feedbacks on input card {0}", ioSlot);
|
||||||
VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
|
VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]);
|
||||||
|
|
||||||
var inputPort = InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)];
|
var inputPort = InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)];
|
||||||
if (inputPort != null)
|
if (inputPort != null)
|
||||||
@@ -649,15 +649,15 @@ namespace PepperDash.Essentials.DM {
|
|||||||
|
|
||||||
if (hdmiInPortWCec.HdcpSupportedLevel != eHdcpSupportedLevel.Unknown)
|
if (hdmiInPortWCec.HdcpSupportedLevel != eHdcpSupportedLevel.Unknown)
|
||||||
{
|
{
|
||||||
SetHdcpStateAction(true, hdmiInPortWCec, joinMap.HdcpSupportState + ioSlot, trilist);
|
SetHdcpStateAction(true, hdmiInPortWCec, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist);
|
||||||
}
|
}
|
||||||
|
|
||||||
InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]);
|
InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]);
|
||||||
|
|
||||||
if (InputCardHdcpCapabilityTypes.ContainsKey(ioSlot))
|
if (InputCardHdcpCapabilityTypes.ContainsKey(ioSlot))
|
||||||
trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = (ushort)InputCardHdcpCapabilityTypes[ioSlot];
|
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = (ushort)InputCardHdcpCapabilityTypes[ioSlot];
|
||||||
else
|
else
|
||||||
trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = 1;
|
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -675,14 +675,14 @@ namespace PepperDash.Essentials.DM {
|
|||||||
|
|
||||||
var dmInPortWCec = port as DMInputPortWithCec;
|
var dmInPortWCec = port as DMInputPortWithCec;
|
||||||
|
|
||||||
SetHdcpStateAction(PropertiesConfig.InputSlotSupportsHdcp2[ioSlot], dmInPortWCec, joinMap.HdcpSupportState + ioSlot, trilist);
|
SetHdcpStateAction(PropertiesConfig.InputSlotSupportsHdcp2[ioSlot], dmInPortWCec, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist);
|
||||||
|
|
||||||
InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]);
|
InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]);
|
||||||
|
|
||||||
if (InputCardHdcpCapabilityTypes.ContainsKey(ioSlot))
|
if (InputCardHdcpCapabilityTypes.ContainsKey(ioSlot))
|
||||||
trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = (ushort)InputCardHdcpCapabilityTypes[ioSlot];
|
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = (ushort)InputCardHdcpCapabilityTypes[ioSlot];
|
||||||
else
|
else
|
||||||
trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = 1;
|
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -690,7 +690,7 @@ namespace PepperDash.Essentials.DM {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
|
VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]);
|
||||||
|
|
||||||
var inputPort = InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)];
|
var inputPort = InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)];
|
||||||
if (inputPort != null)
|
if (inputPort != null)
|
||||||
@@ -699,8 +699,8 @@ namespace PepperDash.Essentials.DM {
|
|||||||
|
|
||||||
if (hdmiPort != null)
|
if (hdmiPort != null)
|
||||||
{
|
{
|
||||||
SetHdcpStateAction(true, hdmiPort, joinMap.HdcpSupportState + ioSlot, trilist);
|
SetHdcpStateAction(true, hdmiPort, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist);
|
||||||
InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]);
|
InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -711,7 +711,7 @@ namespace PepperDash.Essentials.DM {
|
|||||||
//var rxDevice = DeviceManager.GetDeviceForKey(rxKey) as DmRmcControllerBase;
|
//var rxDevice = DeviceManager.GetDeviceForKey(rxKey) as DmRmcControllerBase;
|
||||||
//var hdBaseTDevice = DeviceManager.GetDeviceForKey(rxKey) as DmHdBaseTControllerBase;
|
//var hdBaseTDevice = DeviceManager.GetDeviceForKey(rxKey) as DmHdBaseTControllerBase;
|
||||||
//if (hdBaseTDevice != null) {
|
//if (hdBaseTDevice != null) {
|
||||||
OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]);
|
OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline.JoinNumber + ioSlotJoin]);
|
||||||
//}
|
//}
|
||||||
//else if (rxDevice != null) {
|
//else if (rxDevice != null) {
|
||||||
// rxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]);
|
// rxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]);
|
||||||
@@ -719,12 +719,12 @@ namespace PepperDash.Essentials.DM {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Feedback
|
// Feedback
|
||||||
VideoOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputVideo + ioSlot]);
|
VideoOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputVideo.JoinNumber + ioSlotJoin]);
|
||||||
|
|
||||||
|
|
||||||
OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames + ioSlot]);
|
OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames.JoinNumber + ioSlotJoin]);
|
||||||
InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames + ioSlot]);
|
InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames.JoinNumber + ioSlotJoin]);
|
||||||
OutputVideoRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentVideoInputNames + ioSlot]);
|
OutputVideoRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentVideoInputNames.JoinNumber + ioSlotJoin]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -103,36 +103,36 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
var joinMap = new DmpsAudioOutputControllerJoinMap();
|
var joinMap = new DmpsAudioOutputControllerJoinMap(joinStart);
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<DmpsAudioOutputControllerJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<DmpsAudioOutputControllerJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
|
|
||||||
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
if (MasterVolumeLevel != null)
|
if (MasterVolumeLevel != null)
|
||||||
{
|
{
|
||||||
SetUpDmpsAudioOutputJoins(trilist, MasterVolumeLevel, joinMap.MasterVolume);
|
SetUpDmpsAudioOutputJoins(trilist, MasterVolumeLevel, joinMap.MasterVolumeLevel.JoinNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SourceVolumeLevel != null)
|
if (SourceVolumeLevel != null)
|
||||||
{
|
{
|
||||||
SetUpDmpsAudioOutputJoins(trilist, SourceVolumeLevel, joinMap.SourceVolume);
|
SetUpDmpsAudioOutputJoins(trilist, SourceVolumeLevel, joinMap.SourceVolumeLevel.JoinNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Codec1VolumeLevel != null)
|
if (Codec1VolumeLevel != null)
|
||||||
{
|
{
|
||||||
SetUpDmpsAudioOutputJoins(trilist, Codec1VolumeLevel, joinMap.Codec1Volume);
|
SetUpDmpsAudioOutputJoins(trilist, Codec1VolumeLevel, joinMap.Codec1VolumeLevel.JoinNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Codec2VolumeLevel != null)
|
if (Codec2VolumeLevel != null)
|
||||||
{
|
{
|
||||||
SetUpDmpsAudioOutputJoins(trilist, Codec2VolumeLevel, joinMap.Codec2Volume);
|
SetUpDmpsAudioOutputJoins(trilist, Codec2VolumeLevel, joinMap.Codec2VolumeLevel.JoinNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,15 +155,15 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
var joinMap = new DmpsRoutingControllerJoinMap();
|
var joinMap = new DmpsRoutingControllerJoinMap(joinStart);
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<DmpsRoutingControllerJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<DmpsRoutingControllerJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
|
|
||||||
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
@@ -172,7 +172,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
Debug.Console(2, this, "Linking Input Card {0}", i);
|
Debug.Console(2, this, "Linking Input Card {0}", i);
|
||||||
|
|
||||||
var ioSlot = i;
|
var ioSlot = i;
|
||||||
|
var ioSlotJoin = ioSlot - 1;
|
||||||
|
|
||||||
//if (TxDictionary.ContainsKey(ioSlot))
|
//if (TxDictionary.ContainsKey(ioSlot))
|
||||||
//{
|
//{
|
||||||
@@ -190,13 +191,13 @@ namespace PepperDash.Essentials.DM
|
|||||||
// // dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[ApiMap.TxVideoSyncStatus[ioSlot]]);
|
// // dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[ApiMap.TxVideoSyncStatus[ioSlot]]);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
if (VideoInputSyncFeedbacks[ioSlot] != null)
|
if (VideoInputSyncFeedbacks[ioSlot] != null)
|
||||||
VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
|
VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]);
|
||||||
|
|
||||||
if (InputNameFeedbacks[ioSlot] != null)
|
if (InputNameFeedbacks[ioSlot] != null)
|
||||||
InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames + ioSlot]);
|
InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames.JoinNumber + ioSlotJoin]);
|
||||||
|
|
||||||
trilist.SetStringSigAction(joinMap.InputNames + ioSlot, new Action<string>(s =>
|
trilist.SetStringSigAction(joinMap.InputNames.JoinNumber + ioSlotJoin, new Action<string>(s =>
|
||||||
{
|
{
|
||||||
var inputCard = Dmps.SwitcherInputs[ioSlot] as DMInput;
|
var inputCard = Dmps.SwitcherInputs[ioSlot] as DMInput;
|
||||||
|
|
||||||
@@ -209,20 +210,22 @@ namespace PepperDash.Essentials.DM
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
if (InputEndpointOnlineFeedbacks[ioSlot] != null)
|
if (InputEndpointOnlineFeedbacks[ioSlot] != null)
|
||||||
InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
|
InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (uint i = 1; i <= Dmps.NumberOfSwitcherOutputs; i++)
|
for (uint i = 1; i <= Dmps.NumberOfSwitcherOutputs; i++)
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "Linking Output Card {0}", i);
|
Debug.Console(2, this, "Linking Output Card {0}", i);
|
||||||
|
|
||||||
var ioSlot = i;
|
var ioSlot = i;
|
||||||
// Control
|
var ioSlotJoin = ioSlot - 1;
|
||||||
trilist.SetUShortSigAction(joinMap.OutputVideo + ioSlot, o => ExecuteSwitch(o, ioSlot, eRoutingSignalType.Video));
|
|
||||||
trilist.SetUShortSigAction(joinMap.OutputAudio + ioSlot, o => ExecuteSwitch(o, ioSlot, eRoutingSignalType.Audio));
|
|
||||||
|
|
||||||
trilist.SetStringSigAction(joinMap.OutputNames + ioSlot, s =>
|
// Control
|
||||||
|
trilist.SetUShortSigAction(joinMap.OutputVideo.JoinNumber + ioSlotJoin, o => ExecuteSwitch(o, ioSlot, eRoutingSignalType.Video));
|
||||||
|
trilist.SetUShortSigAction(joinMap.OutputAudio.JoinNumber + ioSlotJoin, o => ExecuteSwitch(o, ioSlot, eRoutingSignalType.Audio));
|
||||||
|
|
||||||
|
trilist.SetStringSigAction(joinMap.OutputNames.JoinNumber + ioSlotJoin, s =>
|
||||||
{
|
{
|
||||||
var outputCard = Dmps.SwitcherOutputs[ioSlot] as DMOutput;
|
var outputCard = Dmps.SwitcherOutputs[ioSlot] as DMOutput;
|
||||||
|
|
||||||
@@ -248,18 +251,18 @@ namespace PepperDash.Essentials.DM
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Feedback
|
// Feedback
|
||||||
if (VideoOutputFeedbacks[ioSlot] != null)
|
if (VideoOutputFeedbacks[ioSlot] != null)
|
||||||
VideoOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputVideo + ioSlot]);
|
VideoOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputVideo.JoinNumber + ioSlotJoin]);
|
||||||
if (AudioOutputFeedbacks[ioSlot] != null)
|
if (AudioOutputFeedbacks[ioSlot] != null)
|
||||||
AudioOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputAudio + ioSlot]);
|
AudioOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputAudio.JoinNumber + ioSlotJoin]);
|
||||||
if (OutputNameFeedbacks[ioSlot] != null)
|
if (OutputNameFeedbacks[ioSlot] != null)
|
||||||
OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames + ioSlot]);
|
OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames.JoinNumber + ioSlotJoin]);
|
||||||
if (OutputVideoRouteNameFeedbacks[ioSlot] != null)
|
if (OutputVideoRouteNameFeedbacks[ioSlot] != null)
|
||||||
OutputVideoRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentVideoInputNames + ioSlot]);
|
OutputVideoRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentVideoInputNames.JoinNumber + ioSlotJoin]);
|
||||||
if (OutputAudioRouteNameFeedbacks[ioSlot] != null)
|
if (OutputAudioRouteNameFeedbacks[ioSlot] != null)
|
||||||
OutputAudioRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentAudioInputNames + ioSlot]);
|
OutputAudioRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentAudioInputNames.JoinNumber + ioSlotJoin]);
|
||||||
if (OutputEndpointOnlineFeedbacks[ioSlot] != null)
|
if (OutputEndpointOnlineFeedbacks[ioSlot] != null)
|
||||||
OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]);
|
OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline.JoinNumber + ioSlotJoin]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -222,46 +222,47 @@ namespace PepperDash.Essentials.DM
|
|||||||
//public int NumberOfComPorts { get { return 1; } }
|
//public int NumberOfComPorts { get { return 1; } }
|
||||||
//#endregion
|
//#endregion
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
var joinMap = new HdMdxxxCEControllerJoinMap();
|
var joinMap = new HdMdxxxCEControllerJoinMap(joinStart);
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<HdMdxxxCEControllerJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<HdMdxxxCEControllerJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
|
|
||||||
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
||||||
RemoteEndDetectedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RemoteEndDetected]);
|
RemoteEndDetectedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RemoteEndDetected.JoinNumber]);
|
||||||
|
|
||||||
trilist.SetSigTrueAction(joinMap.AutoRouteOn, AutoRouteOn);
|
trilist.SetSigTrueAction(joinMap.AutoRouteOn.JoinNumber, AutoRouteOn);
|
||||||
AutoRouteOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AutoRouteOn]);
|
AutoRouteOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AutoRouteOn.JoinNumber]);
|
||||||
trilist.SetSigTrueAction(joinMap.AutoRouteOff, AutoRouteOff);
|
trilist.SetSigTrueAction(joinMap.AutoRouteOff.JoinNumber, AutoRouteOff);
|
||||||
AutoRouteOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.AutoRouteOff]);
|
AutoRouteOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.AutoRouteOff.JoinNumber]);
|
||||||
|
|
||||||
trilist.SetSigTrueAction(joinMap.PriorityRoutingOn, PriorityRouteOn);
|
trilist.SetSigTrueAction(joinMap.PriorityRoutingOn.JoinNumber, PriorityRouteOn);
|
||||||
PriorityRoutingOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PriorityRoutingOn]);
|
PriorityRoutingOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PriorityRoutingOn.JoinNumber]);
|
||||||
trilist.SetSigTrueAction(joinMap.PriorityRoutingOff, PriorityRouteOff);
|
trilist.SetSigTrueAction(joinMap.PriorityRoutingOff.JoinNumber, PriorityRouteOff);
|
||||||
PriorityRoutingOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PriorityRoutingOff]);
|
PriorityRoutingOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PriorityRoutingOff.JoinNumber]);
|
||||||
|
|
||||||
trilist.SetSigTrueAction(joinMap.InputOnScreenDisplayEnabled, OnScreenDisplayEnable);
|
trilist.SetSigTrueAction(joinMap.InputOnScreenDisplayEnabled.JoinNumber, OnScreenDisplayEnable);
|
||||||
InputOnScreenDisplayEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.InputOnScreenDisplayEnabled]);
|
InputOnScreenDisplayEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.InputOnScreenDisplayEnabled.JoinNumber]);
|
||||||
trilist.SetSigTrueAction(joinMap.AutoRouteOff, OnScreenDisplayDisable);
|
trilist.SetSigTrueAction(joinMap.AutoRouteOff.JoinNumber, OnScreenDisplayDisable);
|
||||||
InputOnScreenDisplayEnabledFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.InputOnScreenDisplayDisabled]);
|
InputOnScreenDisplayEnabledFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.InputOnScreenDisplayDisabled.JoinNumber]);
|
||||||
|
|
||||||
trilist.SetUShortSigAction(joinMap.VideoSource, (i) => ExecuteSwitch(i, null, eRoutingSignalType.Video | eRoutingSignalType.Audio));
|
trilist.SetUShortSigAction(joinMap.VideoSource.JoinNumber, (i) => ExecuteSwitch(i, null, eRoutingSignalType.Video | eRoutingSignalType.Audio));
|
||||||
VideoSourceFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoSource]);
|
VideoSourceFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoSource.JoinNumber]);
|
||||||
|
|
||||||
trilist.UShortInput[joinMap.SourceCount].UShortValue = (ushort)InputPorts.Count;
|
trilist.UShortInput[joinMap.SourceCount.JoinNumber].UShortValue = (ushort)InputPorts.Count;
|
||||||
|
|
||||||
foreach (var input in InputPorts)
|
foreach (var input in InputPorts)
|
||||||
{
|
{
|
||||||
var number = Convert.ToUInt16(input.Selector);
|
var number = Convert.ToUInt16(input.Selector);
|
||||||
SyncDetectedFeedbacks[number].LinkInputSig(trilist.BooleanInput[joinMap.SyncDetected + number]);
|
var numberJoin = (UInt16)(number - 1);
|
||||||
trilist.StringInput[joinMap.SourceNames + number].StringValue = input.Key;
|
SyncDetectedFeedbacks[number].LinkInputSig(trilist.BooleanInput[joinMap.SyncDetected.JoinNumber + numberJoin]);
|
||||||
|
trilist.StringInput[joinMap.SourceNames.JoinNumber + numberJoin].StringValue = input.Key;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,33 +4,39 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.UI;
|
using Crestron.SimplSharpPro.UI;
|
||||||
|
|
||||||
|
using Crestron.SimplSharpPro.DM;
|
||||||
|
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.DM.Endpoints.DGEs
|
namespace PepperDash.Essentials.DM.Endpoints.DGEs
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Wrapper class for DGE-100 and DM-DGE-200-C
|
/// Wrapper class for DGE-100 and DM-DGE-200-C
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DgeController : CrestronGenericBaseDevice, IComPorts, IIROutputPorts
|
public class Dge100Controller : CrestronGenericBaseDevice, IComPorts, IIROutputPorts, IHasBasicTriListWithSmartObject, ICec
|
||||||
{
|
{
|
||||||
public Dge100 DigitalGraphicsEngine { get; private set; }
|
private readonly Dge100 _dge;
|
||||||
|
|
||||||
public DeviceConfig DeviceConfig { get; private set; }
|
public BasicTriListWithSmartObject Panel { get { return _dge; } }
|
||||||
|
|
||||||
|
private DeviceConfig _dc;
|
||||||
|
|
||||||
CrestronTouchpanelPropertiesConfig PropertiesConfig;
|
CrestronTouchpanelPropertiesConfig PropertiesConfig;
|
||||||
|
|
||||||
public DgeController(string key, string name, Dge100 device, DeviceConfig dc, CrestronTouchpanelPropertiesConfig props)
|
public Dge100Controller(string key, string name, Dge100 device, DeviceConfig dc, CrestronTouchpanelPropertiesConfig props)
|
||||||
:base(key, name, device)
|
:base(key, name, device)
|
||||||
{
|
{
|
||||||
DigitalGraphicsEngine = device;
|
_dge = device;
|
||||||
|
|
||||||
DeviceConfig = dc;
|
_dc = dc;
|
||||||
|
|
||||||
PropertiesConfig = props;
|
PropertiesConfig = props;
|
||||||
}
|
}
|
||||||
@@ -39,12 +45,12 @@ namespace PepperDash.Essentials.DM.Endpoints.DGEs
|
|||||||
|
|
||||||
public CrestronCollection<ComPort> ComPorts
|
public CrestronCollection<ComPort> ComPorts
|
||||||
{
|
{
|
||||||
get { return DigitalGraphicsEngine.ComPorts; }
|
get { return _dge.ComPorts; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public int NumberOfComPorts
|
public int NumberOfComPorts
|
||||||
{
|
{
|
||||||
get { return DigitalGraphicsEngine.NumberOfComPorts; }
|
get { return _dge.NumberOfComPorts; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -53,22 +59,27 @@ namespace PepperDash.Essentials.DM.Endpoints.DGEs
|
|||||||
|
|
||||||
public CrestronCollection<IROutputPort> IROutputPorts
|
public CrestronCollection<IROutputPort> IROutputPorts
|
||||||
{
|
{
|
||||||
get { return DigitalGraphicsEngine.IROutputPorts; }
|
get { return _dge.IROutputPorts; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public int NumberOfIROutputPorts
|
public int NumberOfIROutputPorts
|
||||||
{
|
{
|
||||||
get { return DigitalGraphicsEngine.NumberOfIROutputPorts; }
|
get { return _dge.NumberOfIROutputPorts; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ICec Members
|
||||||
|
public Cec StreamCec { get { return _dge.HdmiOut.StreamCec; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DgeControllerFactory : EssentialsDeviceFactory<DgeController>
|
public class Dge100ControllerFactory : EssentialsDeviceFactory<Dge100Controller>
|
||||||
{
|
{
|
||||||
public DgeControllerFactory()
|
public Dge100ControllerFactory()
|
||||||
{
|
{
|
||||||
TypeNames = new List<string>() { "dge100", "dmdge200c" };
|
TypeNames = new List<string>() { "dge100" };
|
||||||
}
|
}
|
||||||
|
|
||||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||||
@@ -77,13 +88,11 @@ namespace PepperDash.Essentials.DM.Endpoints.DGEs
|
|||||||
var comm = CommFactory.GetControlPropertiesConfig(dc);
|
var comm = CommFactory.GetControlPropertiesConfig(dc);
|
||||||
var props = JsonConvert.DeserializeObject<CrestronTouchpanelPropertiesConfig>(dc.Properties.ToString());
|
var props = JsonConvert.DeserializeObject<CrestronTouchpanelPropertiesConfig>(dc.Properties.ToString());
|
||||||
|
|
||||||
Debug.Console(1, "Factory Attempting to create new DgeControllerm Device");
|
Debug.Console(1, "Factory Attempting to create new DgeController Device");
|
||||||
|
|
||||||
Dge100 dgeDevice = null;
|
Dge100 dgeDevice = null;
|
||||||
if (typeName == "dge100")
|
if (typeName == "dge100")
|
||||||
dgeDevice = new Dge100(comm.IpIdInt, Global.ControlSystem);
|
dgeDevice = new Dge100(comm.IpIdInt, Global.ControlSystem);
|
||||||
else if (typeName == "dmdge200c")
|
|
||||||
dgeDevice = new DmDge200C(comm.IpIdInt, Global.ControlSystem);
|
|
||||||
|
|
||||||
if (dgeDevice == null)
|
if (dgeDevice == null)
|
||||||
{
|
{
|
||||||
@@ -91,7 +100,7 @@ namespace PepperDash.Essentials.DM.Endpoints.DGEs
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var dgeController = new DgeController(dc.Key + "-comPorts", dc.Name, dgeDevice, dc, props);
|
var dgeController = new Dge100Controller(dc.Key, dc.Name, dgeDevice, dc, props);
|
||||||
|
|
||||||
return dgeController;
|
return dgeController;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
using Crestron.SimplSharpPro;
|
||||||
|
using Crestron.SimplSharpPro.UI;
|
||||||
|
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
using PepperDash.Core;
|
||||||
|
using PepperDash.Essentials.Core;
|
||||||
|
using PepperDash.Essentials.Core.Config;
|
||||||
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
|
|
||||||
|
using Crestron.SimplSharpPro.DM;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.DM.Endpoints.DGEs
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Wrapper class for DGE-100 and DM-DGE-200-C
|
||||||
|
/// </summary>
|
||||||
|
public class DmDge200CController : Dge100Controller, IRoutingInputsOutputs
|
||||||
|
{
|
||||||
|
private readonly DmDge200C _dge;
|
||||||
|
|
||||||
|
public RoutingInputPort DmIn { get; private set; }
|
||||||
|
public RoutingOutputPort HdmiOut { get; private set; }
|
||||||
|
|
||||||
|
public RoutingPortCollection<RoutingInputPort> InputPorts
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
private set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
private set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DmDge200CController(string key, string name, DmDge200C device, DeviceConfig dc, CrestronTouchpanelPropertiesConfig props)
|
||||||
|
: base(key, name, device, dc, props)
|
||||||
|
{
|
||||||
|
_dge = device;
|
||||||
|
|
||||||
|
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
||||||
|
eRoutingPortConnectionType.DmCat, 0, this);
|
||||||
|
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
||||||
|
eRoutingPortConnectionType.Hdmi, null, this);
|
||||||
|
|
||||||
|
|
||||||
|
InputPorts = new RoutingPortCollection<RoutingInputPort> { DmIn };
|
||||||
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> { HdmiOut };
|
||||||
|
|
||||||
|
// Set Ports for CEC
|
||||||
|
HdmiOut.Port = _dge.HdmiOut; ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class DmDge200CControllerFactory : EssentialsDeviceFactory<DmDge200CController>
|
||||||
|
{
|
||||||
|
public DmDge200CControllerFactory()
|
||||||
|
{
|
||||||
|
TypeNames = new List<string>() { "dmdge200c" };
|
||||||
|
}
|
||||||
|
|
||||||
|
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||||
|
{
|
||||||
|
var typeName = dc.Type.ToLower();
|
||||||
|
var comm = CommFactory.GetControlPropertiesConfig(dc);
|
||||||
|
var props = JsonConvert.DeserializeObject<CrestronTouchpanelPropertiesConfig>(dc.Properties.ToString());
|
||||||
|
|
||||||
|
Debug.Console(1, "Factory Attempting to create new DgeController Device");
|
||||||
|
|
||||||
|
DmDge200C dgeDevice = null;
|
||||||
|
|
||||||
|
if (typeName == "dmdge200c")
|
||||||
|
dgeDevice = new DmDge200C(comm.IpIdInt, Global.ControlSystem);
|
||||||
|
|
||||||
|
if (dgeDevice == null)
|
||||||
|
{
|
||||||
|
Debug.Console(1, "Unable to create DGE device");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var dgeController = new DmDge200CController(dc.Key , dc.Name, dgeDevice, dc, props);
|
||||||
|
|
||||||
|
return dgeController;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,11 +1,5 @@
|
|||||||
using System;
|
using Crestron.SimplSharp.Ssh;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.DM;
|
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
||||||
|
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
@@ -13,32 +7,25 @@ using PepperDash.Essentials.Core;
|
|||||||
namespace PepperDash.Essentials.DM
|
namespace PepperDash.Essentials.DM
|
||||||
{
|
{
|
||||||
public class HDBaseTRxController : DmHdBaseTControllerBase, IRoutingInputsOutputs,
|
public class HDBaseTRxController : DmHdBaseTControllerBase, IRoutingInputsOutputs,
|
||||||
IComPorts
|
IComPorts
|
||||||
{
|
{
|
||||||
public RoutingInputPort DmIn { get; private set; }
|
public RoutingInputPort DmIn { get; private set; }
|
||||||
public RoutingOutputPort HDBaseTSink { get; private set; }
|
public RoutingOutputPort HDBaseTSink { get; private set; }
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts
|
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingInputPort> { DmIn }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingOutputPort> { HDBaseTSink }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public HDBaseTRxController(string key, string name, HDRx3CB rmc)
|
public HDBaseTRxController(string key, string name, HDRx3CB rmc)
|
||||||
: base(key, name, rmc)
|
: base(key, name, rmc)
|
||||||
{
|
{
|
||||||
Rmc = rmc;
|
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
||||||
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
|
||||||
eRoutingPortConnectionType.DmCat, 0, this);
|
eRoutingPortConnectionType.DmCat, 0, this);
|
||||||
HDBaseTSink = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
HDBaseTSink = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
eRoutingPortConnectionType.Hdmi, null, this) {Port = Rmc};
|
||||||
|
|
||||||
// Set Ports for CEC
|
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
||||||
HDBaseTSink.Port = Rmc; // Unique case, this class has no HdmiOutput port and ICec is implemented on the receiver class itself
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HDBaseTSink};
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IComPorts Members
|
#region IComPorts Members
|
||||||
|
|||||||
@@ -1,12 +1,6 @@
|
|||||||
using System;
|
using Crestron.SimplSharpPro;
|
||||||
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;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
||||||
|
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
@@ -21,20 +15,14 @@ namespace PepperDash.Essentials.DM
|
|||||||
public class DmRmc100SController : DmRmcControllerBase, IRoutingInputsOutputs,
|
public class DmRmc100SController : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||||
IIROutputPorts, IComPorts, ICec
|
IIROutputPorts, IComPorts, ICec
|
||||||
{
|
{
|
||||||
public DmRmc100S Rmc { get; private set; }
|
private readonly DmRmc100S _rmc;
|
||||||
|
|
||||||
public RoutingInputPort DmIn { get; private set; }
|
public RoutingInputPort DmIn { get; private set; }
|
||||||
public RoutingOutputPort HdmiOut { get; private set; }
|
public RoutingOutputPort HdmiOut { get; private set; }
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts
|
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingInputPort> { DmIn }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingOutputPort> { HdmiOut }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Make a Crestron RMC and put it in here
|
/// Make a Crestron RMC and put it in here
|
||||||
@@ -42,20 +30,15 @@ namespace PepperDash.Essentials.DM
|
|||||||
public DmRmc100SController(string key, string name, DmRmc100S rmc)
|
public DmRmc100SController(string key, string name, DmRmc100S rmc)
|
||||||
: base(key, name, rmc)
|
: base(key, name, rmc)
|
||||||
{
|
{
|
||||||
Rmc = rmc;
|
_rmc = rmc;
|
||||||
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
|
||||||
|
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.DmCat, 0, this);
|
eRoutingPortConnectionType.DmCat, 0, this);
|
||||||
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
eRoutingPortConnectionType.Hdmi, null, this) {Port = _rmc};
|
||||||
|
|
||||||
// Set Ports for CEC
|
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
||||||
HdmiOut.Port = Rmc; // Unique case, this class has no HdmiOutput port and ICec is implemented on the receiver class itself
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut};
|
||||||
}
|
|
||||||
|
|
||||||
public override bool CustomActivate()
|
|
||||||
{
|
|
||||||
// Base does register and sets up comm monitoring.
|
|
||||||
return base.CustomActivate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
@@ -64,17 +47,17 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
|
|
||||||
#region IIROutputPorts Members
|
#region IIROutputPorts Members
|
||||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return Rmc.IROutputPorts; } }
|
public CrestronCollection<IROutputPort> IROutputPorts { get { return _rmc.IROutputPorts; } }
|
||||||
public int NumberOfIROutputPorts { get { return Rmc.NumberOfIROutputPorts; } }
|
public int NumberOfIROutputPorts { get { return _rmc.NumberOfIROutputPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IComPorts Members
|
#region IComPorts Members
|
||||||
public CrestronCollection<ComPort> ComPorts { get { return Rmc.ComPorts; } }
|
public CrestronCollection<ComPort> ComPorts { get { return _rmc.ComPorts; } }
|
||||||
public int NumberOfComPorts { get { return Rmc.NumberOfComPorts; } }
|
public int NumberOfComPorts { get { return _rmc.NumberOfComPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ICec Members
|
#region ICec Members
|
||||||
public Cec StreamCec { get { return Rmc.HdmiOutput.StreamCec; } }
|
public Cec StreamCec { get { return _rmc.HdmiOutput.StreamCec; } }
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,6 @@
|
|||||||
using System;
|
using Crestron.SimplSharpPro;
|
||||||
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;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
||||||
|
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
@@ -21,19 +15,20 @@ namespace PepperDash.Essentials.DM
|
|||||||
public class DmRmc150SController : DmRmcControllerBase, IRoutingInputsOutputs,
|
public class DmRmc150SController : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||||
IIROutputPorts, IComPorts, ICec
|
IIROutputPorts, IComPorts, ICec
|
||||||
{
|
{
|
||||||
public DmRmc150S Rmc { get; private set; }
|
private readonly DmRmc150S _rmc;
|
||||||
|
|
||||||
public RoutingInputPort DmIn { get; private set; }
|
public RoutingInputPort DmIn { get; private set; }
|
||||||
public RoutingOutputPort HdmiOut { get; private set; }
|
public RoutingOutputPort HdmiOut { get; private set; }
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts
|
public RoutingPortCollection<RoutingInputPort> InputPorts
|
||||||
{
|
{
|
||||||
get { return new RoutingPortCollection<RoutingInputPort> { DmIn }; }
|
get; private set;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
||||||
{
|
{
|
||||||
get { return new RoutingPortCollection<RoutingOutputPort> { HdmiOut }; }
|
get;
|
||||||
|
private set ;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -42,59 +37,43 @@ namespace PepperDash.Essentials.DM
|
|||||||
public DmRmc150SController(string key, string name, DmRmc150S rmc)
|
public DmRmc150SController(string key, string name, DmRmc150S rmc)
|
||||||
: base(key, name, rmc)
|
: base(key, name, rmc)
|
||||||
{
|
{
|
||||||
Rmc = rmc;
|
_rmc = rmc;
|
||||||
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.DmCat, 0, this);
|
eRoutingPortConnectionType.DmCat, 0, this);
|
||||||
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
eRoutingPortConnectionType.Hdmi, null, this);
|
||||||
|
|
||||||
EdidManufacturerFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
EdidManufacturerFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
||||||
EdidNameFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
EdidNameFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
||||||
EdidPreferredTimingFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
EdidPreferredTimingFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
||||||
EdidSerialNumberFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
EdidSerialNumberFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
||||||
|
|
||||||
//VideoOutputResolutionFeedback = new StringFeedback(() => Rmc.HdmiOutput.GetVideoResolutionString());
|
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
||||||
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut};
|
||||||
|
|
||||||
//Rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
_rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
||||||
Rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
|
||||||
|
|
||||||
// Set Ports for CEC
|
// Set Ports for CEC
|
||||||
HdmiOut.Port = Rmc.HdmiOutput;
|
HdmiOut.Port = _rmc.HdmiOutput;
|
||||||
}
|
}
|
||||||
|
|
||||||
//void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
|
|
||||||
//{
|
|
||||||
// if (args.EventId == EndpointOutputStreamEventIds.HorizontalResolutionFeedbackEventId || args.EventId == EndpointOutputStreamEventIds.VerticalResolutionFeedbackEventId ||
|
|
||||||
// args.EventId == EndpointOutputStreamEventIds.FramesPerSecondFeedbackEventId)
|
|
||||||
// {
|
|
||||||
// VideoOutputResolutionFeedback.FireUpdate();
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
||||||
{
|
{
|
||||||
if (args.EventId == ConnectedDeviceEventIds.ManufacturerEventId)
|
switch (args.EventId)
|
||||||
{
|
{
|
||||||
EdidManufacturerFeedback.FireUpdate();
|
case ConnectedDeviceEventIds.ManufacturerEventId:
|
||||||
|
EdidManufacturerFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
case ConnectedDeviceEventIds.NameEventId:
|
||||||
|
EdidNameFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
case ConnectedDeviceEventIds.PreferredTimingEventId:
|
||||||
|
EdidPreferredTimingFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
case ConnectedDeviceEventIds.SerialNumberEventId:
|
||||||
|
EdidSerialNumberFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.NameEventId)
|
|
||||||
{
|
|
||||||
EdidNameFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.PreferredTimingEventId)
|
|
||||||
{
|
|
||||||
EdidPreferredTimingFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.SerialNumberEventId)
|
|
||||||
{
|
|
||||||
EdidSerialNumberFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool CustomActivate()
|
|
||||||
{
|
|
||||||
// Base does register and sets up comm monitoring.
|
|
||||||
return base.CustomActivate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
@@ -103,17 +82,17 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
|
|
||||||
#region IIROutputPorts Members
|
#region IIROutputPorts Members
|
||||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return Rmc.IROutputPorts; } }
|
public CrestronCollection<IROutputPort> IROutputPorts { get { return _rmc.IROutputPorts; } }
|
||||||
public int NumberOfIROutputPorts { get { return Rmc.NumberOfIROutputPorts; } }
|
public int NumberOfIROutputPorts { get { return _rmc.NumberOfIROutputPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IComPorts Members
|
#region IComPorts Members
|
||||||
public CrestronCollection<ComPort> ComPorts { get { return Rmc.ComPorts; } }
|
public CrestronCollection<ComPort> ComPorts { get { return _rmc.ComPorts; } }
|
||||||
public int NumberOfComPorts { get { return Rmc.NumberOfComPorts; } }
|
public int NumberOfComPorts { get { return _rmc.NumberOfComPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ICec Members
|
#region ICec Members
|
||||||
public Cec StreamCec { get { return Rmc.HdmiOutput.StreamCec; } }
|
public Cec StreamCec { get { return _rmc.HdmiOutput.StreamCec; } }
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,4 @@
|
|||||||
using System;
|
using Crestron.SimplSharpPro;
|
||||||
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;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||||
@@ -21,19 +16,19 @@ namespace PepperDash.Essentials.DM
|
|||||||
public class DmRmc200CController : DmRmcControllerBase, IRoutingInputsOutputs,
|
public class DmRmc200CController : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||||
IIROutputPorts, IComPorts, ICec
|
IIROutputPorts, IComPorts, ICec
|
||||||
{
|
{
|
||||||
public DmRmc200C Rmc { get; private set; }
|
private readonly DmRmc200C _rmc;
|
||||||
|
|
||||||
public RoutingInputPort DmIn { get; private set; }
|
public RoutingInputPort DmIn { get; private set; }
|
||||||
public RoutingOutputPort HdmiOut { get; private set; }
|
public RoutingOutputPort HdmiOut { get; private set; }
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts
|
public RoutingPortCollection<RoutingInputPort> InputPorts
|
||||||
{
|
{
|
||||||
get { return new RoutingPortCollection<RoutingInputPort> { DmIn }; }
|
get; private set;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
||||||
{
|
{
|
||||||
get { return new RoutingPortCollection<RoutingOutputPort> { HdmiOut }; }
|
get; private set;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -42,24 +37,27 @@ namespace PepperDash.Essentials.DM
|
|||||||
public DmRmc200CController(string key, string name, DmRmc200C rmc)
|
public DmRmc200CController(string key, string name, DmRmc200C rmc)
|
||||||
: base(key, name, rmc)
|
: base(key, name, rmc)
|
||||||
{
|
{
|
||||||
Rmc = rmc;
|
_rmc = rmc;
|
||||||
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.DmCat, 0, this);
|
eRoutingPortConnectionType.DmCat, 0, this);
|
||||||
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
eRoutingPortConnectionType.Hdmi, null, this);
|
||||||
|
|
||||||
EdidManufacturerFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
EdidManufacturerFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
||||||
EdidNameFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
EdidNameFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
||||||
EdidPreferredTimingFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
EdidPreferredTimingFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
||||||
EdidSerialNumberFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
EdidSerialNumberFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
||||||
|
|
||||||
VideoOutputResolutionFeedback = new StringFeedback(() => Rmc.HdmiOutput.GetVideoResolutionString());
|
VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString());
|
||||||
|
|
||||||
Rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
_rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
||||||
Rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
_rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
||||||
|
|
||||||
|
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
||||||
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut};
|
||||||
|
|
||||||
// Set Ports for CEC
|
// Set Ports for CEC
|
||||||
HdmiOut.Port = Rmc.HdmiOutput;
|
HdmiOut.Port = _rmc.HdmiOutput;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
|
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
|
||||||
@@ -73,47 +71,40 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
||||||
{
|
{
|
||||||
if (args.EventId == ConnectedDeviceEventIds.ManufacturerEventId)
|
switch (args.EventId)
|
||||||
{
|
{
|
||||||
EdidManufacturerFeedback.FireUpdate();
|
case ConnectedDeviceEventIds.ManufacturerEventId:
|
||||||
}
|
EdidManufacturerFeedback.FireUpdate();
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.NameEventId)
|
break;
|
||||||
{
|
case ConnectedDeviceEventIds.NameEventId:
|
||||||
EdidNameFeedback.FireUpdate();
|
EdidNameFeedback.FireUpdate();
|
||||||
}
|
break;
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.PreferredTimingEventId)
|
case ConnectedDeviceEventIds.PreferredTimingEventId:
|
||||||
{
|
EdidPreferredTimingFeedback.FireUpdate();
|
||||||
EdidPreferredTimingFeedback.FireUpdate();
|
break;
|
||||||
}
|
case ConnectedDeviceEventIds.SerialNumberEventId:
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.SerialNumberEventId)
|
EdidSerialNumberFeedback.FireUpdate();
|
||||||
{
|
break;
|
||||||
EdidSerialNumberFeedback.FireUpdate();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CustomActivate()
|
|
||||||
{
|
|
||||||
// Base does register and sets up comm monitoring.
|
|
||||||
return base.CustomActivate();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
LinkDmRmcToApi(this, trilist, joinStart, joinMapKey, bridge);
|
LinkDmRmcToApi(this, trilist, joinStart, joinMapKey, bridge);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IIROutputPorts Members
|
#region IIROutputPorts Members
|
||||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return Rmc.IROutputPorts; } }
|
public CrestronCollection<IROutputPort> IROutputPorts { get { return _rmc.IROutputPorts; } }
|
||||||
public int NumberOfIROutputPorts { get { return Rmc.NumberOfIROutputPorts; } }
|
public int NumberOfIROutputPorts { get { return _rmc.NumberOfIROutputPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IComPorts Members
|
#region IComPorts Members
|
||||||
public CrestronCollection<ComPort> ComPorts { get { return Rmc.ComPorts; } }
|
public CrestronCollection<ComPort> ComPorts { get { return _rmc.ComPorts; } }
|
||||||
public int NumberOfComPorts { get { return Rmc.NumberOfComPorts; } }
|
public int NumberOfComPorts { get { return _rmc.NumberOfComPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ICec Members
|
#region ICec Members
|
||||||
public Cec StreamCec { get { return Rmc.HdmiOutput.StreamCec; } }
|
public Cec StreamCec { get { return _rmc.HdmiOutput.StreamCec; } }
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,4 @@
|
|||||||
using System;
|
using Crestron.SimplSharpPro;
|
||||||
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;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||||
@@ -21,20 +16,14 @@ namespace PepperDash.Essentials.DM
|
|||||||
public class DmRmc200S2Controller : DmRmcControllerBase, IRoutingInputsOutputs,
|
public class DmRmc200S2Controller : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||||
IIROutputPorts, IComPorts, ICec
|
IIROutputPorts, IComPorts, ICec
|
||||||
{
|
{
|
||||||
public DmRmc200S2 Rmc { get; private set; }
|
private readonly DmRmc200S2 _rmc;
|
||||||
|
|
||||||
public RoutingInputPort DmIn { get; private set; }
|
public RoutingInputPort DmIn { get; private set; }
|
||||||
public RoutingOutputPort HdmiOut { get; private set; }
|
public RoutingOutputPort HdmiOut { get; private set; }
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts
|
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingInputPort> { DmIn }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingOutputPort> { HdmiOut }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Make a Crestron RMC and put it in here
|
/// Make a Crestron RMC and put it in here
|
||||||
@@ -42,24 +31,27 @@ namespace PepperDash.Essentials.DM
|
|||||||
public DmRmc200S2Controller(string key, string name, DmRmc200S2 rmc)
|
public DmRmc200S2Controller(string key, string name, DmRmc200S2 rmc)
|
||||||
: base(key, name, rmc)
|
: base(key, name, rmc)
|
||||||
{
|
{
|
||||||
Rmc = rmc;
|
_rmc = rmc;
|
||||||
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.DmCat, 0, this);
|
eRoutingPortConnectionType.DmCat, 0, this);
|
||||||
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
eRoutingPortConnectionType.Hdmi, null, this);
|
||||||
|
|
||||||
EdidManufacturerFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
EdidManufacturerFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
||||||
EdidNameFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
EdidNameFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
||||||
EdidPreferredTimingFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
EdidPreferredTimingFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
||||||
EdidSerialNumberFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
EdidSerialNumberFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
||||||
|
|
||||||
VideoOutputResolutionFeedback = new StringFeedback(() => Rmc.HdmiOutput.GetVideoResolutionString());
|
VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString());
|
||||||
|
|
||||||
Rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
_rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
||||||
Rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
_rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
||||||
|
|
||||||
|
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
||||||
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut};
|
||||||
|
|
||||||
// Set Ports for CEC
|
// Set Ports for CEC
|
||||||
HdmiOut.Port = Rmc.HdmiOutput;
|
HdmiOut.Port = _rmc.HdmiOutput;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
|
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
|
||||||
@@ -73,28 +65,21 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
||||||
{
|
{
|
||||||
if (args.EventId == ConnectedDeviceEventIds.ManufacturerEventId)
|
switch (args.EventId)
|
||||||
{
|
{
|
||||||
EdidManufacturerFeedback.FireUpdate();
|
case ConnectedDeviceEventIds.ManufacturerEventId:
|
||||||
|
EdidManufacturerFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
case ConnectedDeviceEventIds.NameEventId:
|
||||||
|
EdidNameFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
case ConnectedDeviceEventIds.PreferredTimingEventId:
|
||||||
|
EdidPreferredTimingFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
case ConnectedDeviceEventIds.SerialNumberEventId:
|
||||||
|
EdidSerialNumberFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.NameEventId)
|
|
||||||
{
|
|
||||||
EdidNameFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.PreferredTimingEventId)
|
|
||||||
{
|
|
||||||
EdidPreferredTimingFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.SerialNumberEventId)
|
|
||||||
{
|
|
||||||
EdidSerialNumberFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool CustomActivate()
|
|
||||||
{
|
|
||||||
// Base does register and sets up comm monitoring.
|
|
||||||
return base.CustomActivate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
@@ -103,17 +88,17 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
|
|
||||||
#region IIROutputPorts Members
|
#region IIROutputPorts Members
|
||||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return Rmc.IROutputPorts; } }
|
public CrestronCollection<IROutputPort> IROutputPorts { get { return _rmc.IROutputPorts; } }
|
||||||
public int NumberOfIROutputPorts { get { return Rmc.NumberOfIROutputPorts; } }
|
public int NumberOfIROutputPorts { get { return _rmc.NumberOfIROutputPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IComPorts Members
|
#region IComPorts Members
|
||||||
public CrestronCollection<ComPort> ComPorts { get { return Rmc.ComPorts; } }
|
public CrestronCollection<ComPort> ComPorts { get { return _rmc.ComPorts; } }
|
||||||
public int NumberOfComPorts { get { return Rmc.NumberOfComPorts; } }
|
public int NumberOfComPorts { get { return _rmc.NumberOfComPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ICec Members
|
#region ICec Members
|
||||||
public Cec StreamCec { get { return Rmc.HdmiOutput.StreamCec; } }
|
public Cec StreamCec { get { return _rmc.HdmiOutput.StreamCec; } }
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,4 @@
|
|||||||
using System;
|
using Crestron.SimplSharpPro;
|
||||||
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;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||||
@@ -21,19 +16,16 @@ namespace PepperDash.Essentials.DM
|
|||||||
public class DmRmc200SController : DmRmcControllerBase, IRoutingInputsOutputs,
|
public class DmRmc200SController : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||||
IIROutputPorts, IComPorts, ICec
|
IIROutputPorts, IComPorts, ICec
|
||||||
{
|
{
|
||||||
public DmRmc200S Rmc { get; private set; }
|
private readonly DmRmc200S _rmc;
|
||||||
|
|
||||||
public RoutingInputPort DmIn { get; private set; }
|
public RoutingInputPort DmIn { get; private set; }
|
||||||
public RoutingOutputPort HdmiOut { get; private set; }
|
public RoutingOutputPort HdmiOut { get; private set; }
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts
|
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingInputPort> { DmIn }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
||||||
{
|
{
|
||||||
get { return new RoutingPortCollection<RoutingOutputPort> { HdmiOut }; }
|
get; private set;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -42,24 +34,27 @@ namespace PepperDash.Essentials.DM
|
|||||||
public DmRmc200SController(string key, string name, DmRmc200S rmc)
|
public DmRmc200SController(string key, string name, DmRmc200S rmc)
|
||||||
: base(key, name, rmc)
|
: base(key, name, rmc)
|
||||||
{
|
{
|
||||||
Rmc = rmc;
|
_rmc = rmc;
|
||||||
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.DmCat, 0, this);
|
eRoutingPortConnectionType.DmCat, 0, this);
|
||||||
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
eRoutingPortConnectionType.Hdmi, null, this);
|
||||||
|
|
||||||
EdidManufacturerFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
EdidManufacturerFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
||||||
EdidNameFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
EdidNameFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
||||||
EdidPreferredTimingFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
EdidPreferredTimingFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
||||||
EdidSerialNumberFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
EdidSerialNumberFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
||||||
|
|
||||||
VideoOutputResolutionFeedback = new StringFeedback(() => Rmc.HdmiOutput.GetVideoResolutionString());
|
VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString());
|
||||||
|
|
||||||
Rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
||||||
Rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut};
|
||||||
|
|
||||||
|
_rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
||||||
|
_rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
||||||
|
|
||||||
// Set Ports for CEC
|
// Set Ports for CEC
|
||||||
HdmiOut.Port = Rmc.HdmiOutput;
|
HdmiOut.Port = _rmc.HdmiOutput;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
|
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
|
||||||
@@ -73,47 +68,40 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
||||||
{
|
{
|
||||||
if (args.EventId == ConnectedDeviceEventIds.ManufacturerEventId)
|
switch (args.EventId)
|
||||||
{
|
{
|
||||||
EdidManufacturerFeedback.FireUpdate();
|
case ConnectedDeviceEventIds.ManufacturerEventId:
|
||||||
}
|
EdidManufacturerFeedback.FireUpdate();
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.NameEventId)
|
break;
|
||||||
{
|
case ConnectedDeviceEventIds.NameEventId:
|
||||||
EdidNameFeedback.FireUpdate();
|
EdidNameFeedback.FireUpdate();
|
||||||
}
|
break;
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.PreferredTimingEventId)
|
case ConnectedDeviceEventIds.PreferredTimingEventId:
|
||||||
{
|
EdidPreferredTimingFeedback.FireUpdate();
|
||||||
EdidPreferredTimingFeedback.FireUpdate();
|
break;
|
||||||
}
|
case ConnectedDeviceEventIds.SerialNumberEventId:
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.SerialNumberEventId)
|
EdidSerialNumberFeedback.FireUpdate();
|
||||||
{
|
break;
|
||||||
EdidSerialNumberFeedback.FireUpdate();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CustomActivate()
|
|
||||||
{
|
|
||||||
// Base does register and sets up comm monitoring.
|
|
||||||
return base.CustomActivate();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
LinkDmRmcToApi(this, trilist, joinStart, joinMapKey, bridge);
|
LinkDmRmcToApi(this, trilist, joinStart, joinMapKey, bridge);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IIROutputPorts Members
|
#region IIROutputPorts Members
|
||||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return Rmc.IROutputPorts; } }
|
public CrestronCollection<IROutputPort> IROutputPorts { get { return _rmc.IROutputPorts; } }
|
||||||
public int NumberOfIROutputPorts { get { return Rmc.NumberOfIROutputPorts; } }
|
public int NumberOfIROutputPorts { get { return _rmc.NumberOfIROutputPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IComPorts Members
|
#region IComPorts Members
|
||||||
public CrestronCollection<ComPort> ComPorts { get { return Rmc.ComPorts; } }
|
public CrestronCollection<ComPort> ComPorts { get { return _rmc.ComPorts; } }
|
||||||
public int NumberOfComPorts { get { return Rmc.NumberOfComPorts; } }
|
public int NumberOfComPorts { get { return _rmc.NumberOfComPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ICec Members
|
#region ICec Members
|
||||||
public Cec StreamCec { get { return Rmc.HdmiOutput.StreamCec; } }
|
public Cec StreamCec { get { return _rmc.HdmiOutput.StreamCec; } }
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,9 @@
|
|||||||
using System;
|
using Crestron.SimplSharpPro;
|
||||||
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;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
||||||
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
using PepperDash.Essentials.Core.Bridges;
|
||||||
|
|
||||||
@@ -21,21 +16,15 @@ namespace PepperDash.Essentials.DM
|
|||||||
public class DmRmc4kScalerCController : DmRmcControllerBase, IRoutingInputsOutputs, IBasicVolumeWithFeedback,
|
public class DmRmc4kScalerCController : DmRmcControllerBase, IRoutingInputsOutputs, IBasicVolumeWithFeedback,
|
||||||
IIROutputPorts, IComPorts, ICec, IRelayPorts
|
IIROutputPorts, IComPorts, ICec, IRelayPorts
|
||||||
{
|
{
|
||||||
public DmRmc4kScalerC Rmc { get; private set; }
|
private readonly DmRmc4kScalerC _rmc;
|
||||||
|
|
||||||
public RoutingInputPort DmIn { get; private set; }
|
public RoutingInputPort DmIn { get; private set; }
|
||||||
public RoutingOutputPort HdmiOut { get; private set; }
|
public RoutingOutputPort HdmiOut { get; private set; }
|
||||||
public RoutingOutputPort BalancedAudioOut { get; private set; }
|
public RoutingOutputPort BalancedAudioOut { get; private set; }
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts
|
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingInputPort> { DmIn }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingOutputPort> { HdmiOut, BalancedAudioOut }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Make a Crestron RMC and put it in here
|
/// Make a Crestron RMC and put it in here
|
||||||
@@ -43,30 +32,35 @@ namespace PepperDash.Essentials.DM
|
|||||||
public DmRmc4kScalerCController(string key, string name, DmRmc4kScalerC rmc)
|
public DmRmc4kScalerCController(string key, string name, DmRmc4kScalerC rmc)
|
||||||
: base(key, name, rmc)
|
: base(key, name, rmc)
|
||||||
{
|
{
|
||||||
Rmc = rmc;
|
_rmc = rmc;
|
||||||
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
|
||||||
|
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.DmCat, 0, this);
|
eRoutingPortConnectionType.DmCat, 0, this);
|
||||||
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
eRoutingPortConnectionType.Hdmi, null, this);
|
||||||
BalancedAudioOut = new RoutingOutputPort(DmPortName.BalancedAudioOut, eRoutingSignalType.Audio,
|
BalancedAudioOut = new RoutingOutputPort(DmPortName.BalancedAudioOut, eRoutingSignalType.Audio,
|
||||||
eRoutingPortConnectionType.LineAudio, null, this);
|
eRoutingPortConnectionType.LineAudio, null, this);
|
||||||
|
|
||||||
MuteFeedback = new BoolFeedback(() => false);
|
MuteFeedback = new BoolFeedback(() => false);
|
||||||
|
|
||||||
VolumeLevelFeedback = new IntFeedback("MainVolumeLevelFeedback", () =>
|
VolumeLevelFeedback = new IntFeedback("MainVolumeLevelFeedback", () =>
|
||||||
rmc.AudioOutput.VolumeFeedback.UShortValue);
|
rmc.AudioOutput.VolumeFeedback.UShortValue);
|
||||||
|
|
||||||
EdidManufacturerFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
EdidManufacturerFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
||||||
EdidNameFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
EdidNameFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
||||||
EdidPreferredTimingFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
EdidPreferredTimingFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
||||||
EdidSerialNumberFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
EdidSerialNumberFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
||||||
|
|
||||||
VideoOutputResolutionFeedback = new StringFeedback(() => Rmc.HdmiOutput.GetVideoResolutionString());
|
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
||||||
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut, BalancedAudioOut};
|
||||||
|
|
||||||
Rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString());
|
||||||
Rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
|
||||||
|
_rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
||||||
|
_rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
||||||
|
|
||||||
// Set Ports for CEC
|
// Set Ports for CEC
|
||||||
HdmiOut.Port = Rmc.HdmiOutput;
|
HdmiOut.Port = _rmc.HdmiOutput;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
|
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
|
||||||
@@ -80,62 +74,55 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
||||||
{
|
{
|
||||||
if (args.EventId == ConnectedDeviceEventIds.ManufacturerEventId)
|
switch (args.EventId)
|
||||||
{
|
{
|
||||||
EdidManufacturerFeedback.FireUpdate();
|
case ConnectedDeviceEventIds.ManufacturerEventId:
|
||||||
}
|
EdidManufacturerFeedback.FireUpdate();
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.NameEventId)
|
break;
|
||||||
{
|
case ConnectedDeviceEventIds.NameEventId:
|
||||||
EdidNameFeedback.FireUpdate();
|
EdidNameFeedback.FireUpdate();
|
||||||
}
|
break;
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.PreferredTimingEventId)
|
case ConnectedDeviceEventIds.PreferredTimingEventId:
|
||||||
{
|
EdidPreferredTimingFeedback.FireUpdate();
|
||||||
EdidPreferredTimingFeedback.FireUpdate();
|
break;
|
||||||
}
|
case ConnectedDeviceEventIds.SerialNumberEventId:
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.SerialNumberEventId)
|
EdidSerialNumberFeedback.FireUpdate();
|
||||||
{
|
break;
|
||||||
EdidSerialNumberFeedback.FireUpdate();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CustomActivate()
|
|
||||||
{
|
|
||||||
// Base does register and sets up comm monitoring.
|
|
||||||
return base.CustomActivate();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
LinkDmRmcToApi(this, trilist, joinStart, joinMapKey, bridge);
|
LinkDmRmcToApi(this, trilist, joinStart, joinMapKey, bridge);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IIROutputPorts Members
|
#region IIROutputPorts Members
|
||||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return Rmc.IROutputPorts; } }
|
public CrestronCollection<IROutputPort> IROutputPorts { get { return _rmc.IROutputPorts; } }
|
||||||
public int NumberOfIROutputPorts { get { return Rmc.NumberOfIROutputPorts; } }
|
public int NumberOfIROutputPorts { get { return _rmc.NumberOfIROutputPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IComPorts Members
|
#region IComPorts Members
|
||||||
public CrestronCollection<ComPort> ComPorts { get { return Rmc.ComPorts; } }
|
public CrestronCollection<ComPort> ComPorts { get { return _rmc.ComPorts; } }
|
||||||
public int NumberOfComPorts { get { return Rmc.NumberOfComPorts; } }
|
public int NumberOfComPorts { get { return _rmc.NumberOfComPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ICec Members
|
#region ICec Members
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the CEC stream directly from the HDMI port.
|
/// Gets the CEC stream directly from the HDMI port.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Cec StreamCec { get { return Rmc.HdmiOutput.StreamCec; } }
|
public Cec StreamCec { get { return _rmc.HdmiOutput.StreamCec; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IRelayPorts Members
|
#region IRelayPorts Members
|
||||||
|
|
||||||
public int NumberOfRelayPorts
|
public int NumberOfRelayPorts
|
||||||
{
|
{
|
||||||
get { return Rmc.NumberOfRelayPorts; }
|
get { return _rmc.NumberOfRelayPorts; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public CrestronCollection<Relay> RelayPorts
|
public CrestronCollection<Relay> RelayPorts
|
||||||
{
|
{
|
||||||
get { return Rmc.RelayPorts; }
|
get { return _rmc.RelayPorts; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -153,6 +140,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void MuteOff()
|
public void MuteOff()
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, this, "DM Endpoint {0} does not have a mute function", Key);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -160,11 +148,12 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void MuteOn()
|
public void MuteOn()
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, this, "DM Endpoint {0} does not have a mute function", Key);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetVolume(ushort level)
|
public void SetVolume(ushort level)
|
||||||
{
|
{
|
||||||
Rmc.AudioOutput.Volume.UShortValue = level;
|
_rmc.AudioOutput.Volume.UShortValue = level;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IntFeedback VolumeLevelFeedback
|
public IntFeedback VolumeLevelFeedback
|
||||||
@@ -182,22 +171,23 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void MuteToggle()
|
public void MuteToggle()
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, this, "DM Endpoint {0} does not have a mute function", Key);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void VolumeDown(bool pressRelease)
|
public void VolumeDown(bool pressRelease)
|
||||||
{
|
{
|
||||||
if (pressRelease)
|
if (pressRelease)
|
||||||
SigHelper.RampTimeScaled(Rmc.AudioOutput.Volume, 0, 4000);
|
SigHelper.RampTimeScaled(_rmc.AudioOutput.Volume, 0, 4000);
|
||||||
else
|
else
|
||||||
Rmc.AudioOutput.Volume.StopRamp();
|
_rmc.AudioOutput.Volume.StopRamp();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void VolumeUp(bool pressRelease)
|
public void VolumeUp(bool pressRelease)
|
||||||
{
|
{
|
||||||
if (pressRelease)
|
if (pressRelease)
|
||||||
SigHelper.RampTimeScaled(Rmc.AudioOutput.Volume, 65535, 4000);
|
SigHelper.RampTimeScaled(_rmc.AudioOutput.Volume, 65535, 4000);
|
||||||
else
|
else
|
||||||
Rmc.AudioOutput.Volume.StopRamp();
|
_rmc.AudioOutput.Volume.StopRamp();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
using System;
|
using Crestron.SimplSharpPro;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
using Crestron.SimplSharpPro;
|
|
||||||
using Crestron.SimplSharpPro.DM;
|
using Crestron.SimplSharpPro.DM;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
||||||
|
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
@@ -16,44 +10,39 @@ namespace PepperDash.Essentials.DM
|
|||||||
public class DmRmc4k100C1GController : DmHdBaseTControllerBase, IRoutingInputsOutputs,
|
public class DmRmc4k100C1GController : DmHdBaseTControllerBase, IRoutingInputsOutputs,
|
||||||
IIROutputPorts, IComPorts, ICec
|
IIROutputPorts, IComPorts, ICec
|
||||||
{
|
{
|
||||||
|
private readonly DmRmc4K100C1G _rmc;
|
||||||
public RoutingInputPort DmIn { get; private set; }
|
public RoutingInputPort DmIn { get; private set; }
|
||||||
public RoutingOutputPort HdmiOut { get; private set; }
|
public RoutingOutputPort HdmiOut { get; private set; }
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts
|
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingInputPort> { DmIn }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingOutputPort> { HdmiOut }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public DmRmc4k100C1GController(string key, string name, DmRmc4K100C1G rmc)
|
public DmRmc4k100C1GController(string key, string name, DmRmc4K100C1G rmc)
|
||||||
: base(key, name, rmc)
|
: base(key, name, rmc)
|
||||||
{
|
{
|
||||||
Rmc = rmc;
|
_rmc = rmc;
|
||||||
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.DmCat, 0, this);
|
eRoutingPortConnectionType.DmCat, 0, this);
|
||||||
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
eRoutingPortConnectionType.Hdmi, null, this) {Port = _rmc};
|
||||||
|
|
||||||
// Set Ports for CEC
|
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
||||||
HdmiOut.Port = Rmc; // Unique case, this class has no HdmiOutput port and ICec is implemented on the receiver class itself
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut};
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IIROutputPorts Members
|
#region IIROutputPorts Members
|
||||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return (Rmc as DmRmc4K100C1G).IROutputPorts; } }
|
public CrestronCollection<IROutputPort> IROutputPorts { get { return _rmc.IROutputPorts; } }
|
||||||
public int NumberOfIROutputPorts { get { return (Rmc as DmRmc4K100C1G).NumberOfIROutputPorts; } }
|
public int NumberOfIROutputPorts { get { return _rmc.NumberOfIROutputPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IComPorts Members
|
#region IComPorts Members
|
||||||
public CrestronCollection<ComPort> ComPorts { get { return Rmc.ComPorts; } }
|
public CrestronCollection<ComPort> ComPorts { get { return _rmc.ComPorts; } }
|
||||||
public int NumberOfComPorts { get { return Rmc.NumberOfComPorts; } }
|
public int NumberOfComPorts { get { return _rmc.NumberOfComPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ICec Members
|
#region ICec Members
|
||||||
public Cec StreamCec { get { return (Rmc as DmRmc4K100C1G).StreamCec; } }
|
public Cec StreamCec { get { return _rmc.StreamCec; } }
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,9 @@
|
|||||||
using System;
|
using Crestron.SimplSharpPro;
|
||||||
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;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
||||||
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
using PepperDash.Essentials.Core.Bridges;
|
||||||
|
|
||||||
@@ -21,21 +16,15 @@ namespace PepperDash.Essentials.DM
|
|||||||
public class DmRmc4kScalerCDspController : DmRmcControllerBase, IRoutingInputsOutputs, IBasicVolumeWithFeedback,
|
public class DmRmc4kScalerCDspController : DmRmcControllerBase, IRoutingInputsOutputs, IBasicVolumeWithFeedback,
|
||||||
IIROutputPorts, IComPorts, ICec, IRelayPorts
|
IIROutputPorts, IComPorts, ICec, IRelayPorts
|
||||||
{
|
{
|
||||||
public DmRmc4kScalerCDsp Rmc { get; private set; }
|
private readonly DmRmc4kScalerCDsp _rmc;
|
||||||
|
|
||||||
public RoutingInputPort DmIn { get; private set; }
|
public RoutingInputPort DmIn { get; private set; }
|
||||||
public RoutingOutputPort HdmiOut { get; private set; }
|
public RoutingOutputPort HdmiOut { get; private set; }
|
||||||
public RoutingOutputPort BalancedAudioOut { get; private set; }
|
public RoutingOutputPort BalancedAudioOut { get; private set; }
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts
|
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingInputPort> { DmIn }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingOutputPort> { HdmiOut, BalancedAudioOut }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Make a Crestron RMC and put it in here
|
/// Make a Crestron RMC and put it in here
|
||||||
@@ -43,10 +32,11 @@ namespace PepperDash.Essentials.DM
|
|||||||
public DmRmc4kScalerCDspController(string key, string name, DmRmc4kScalerCDsp rmc)
|
public DmRmc4kScalerCDspController(string key, string name, DmRmc4kScalerCDsp rmc)
|
||||||
: base(key, name, rmc)
|
: base(key, name, rmc)
|
||||||
{
|
{
|
||||||
Rmc = rmc;
|
_rmc = rmc;
|
||||||
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
|
||||||
|
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.DmCat, 0, this);
|
eRoutingPortConnectionType.DmCat, 0, this);
|
||||||
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
eRoutingPortConnectionType.Hdmi, null, this);
|
||||||
BalancedAudioOut = new RoutingOutputPort(DmPortName.BalancedAudioOut, eRoutingSignalType.Audio,
|
BalancedAudioOut = new RoutingOutputPort(DmPortName.BalancedAudioOut, eRoutingSignalType.Audio,
|
||||||
eRoutingPortConnectionType.LineAudio, null, this);
|
eRoutingPortConnectionType.LineAudio, null, this);
|
||||||
@@ -55,18 +45,21 @@ namespace PepperDash.Essentials.DM
|
|||||||
VolumeLevelFeedback = new IntFeedback("MainVolumeLevelFeedback", () =>
|
VolumeLevelFeedback = new IntFeedback("MainVolumeLevelFeedback", () =>
|
||||||
rmc.AudioOutput.VolumeFeedback.UShortValue);
|
rmc.AudioOutput.VolumeFeedback.UShortValue);
|
||||||
|
|
||||||
EdidManufacturerFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
EdidManufacturerFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
||||||
EdidNameFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
EdidNameFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
||||||
EdidPreferredTimingFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
EdidPreferredTimingFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
||||||
EdidSerialNumberFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
EdidSerialNumberFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
||||||
|
|
||||||
VideoOutputResolutionFeedback = new StringFeedback(() => Rmc.HdmiOutput.GetVideoResolutionString());
|
VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString());
|
||||||
|
|
||||||
Rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
||||||
Rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut, BalancedAudioOut};
|
||||||
|
|
||||||
|
_rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
||||||
|
_rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
||||||
|
|
||||||
// Set Ports for CEC
|
// Set Ports for CEC
|
||||||
HdmiOut.Port = Rmc.HdmiOutput;
|
HdmiOut.Port = _rmc.HdmiOutput;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
|
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
|
||||||
@@ -80,28 +73,21 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
||||||
{
|
{
|
||||||
if (args.EventId == ConnectedDeviceEventIds.ManufacturerEventId)
|
switch (args.EventId)
|
||||||
{
|
{
|
||||||
EdidManufacturerFeedback.FireUpdate();
|
case ConnectedDeviceEventIds.ManufacturerEventId:
|
||||||
|
EdidManufacturerFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
case ConnectedDeviceEventIds.NameEventId:
|
||||||
|
EdidNameFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
case ConnectedDeviceEventIds.PreferredTimingEventId:
|
||||||
|
EdidPreferredTimingFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
case ConnectedDeviceEventIds.SerialNumberEventId:
|
||||||
|
EdidSerialNumberFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.NameEventId)
|
|
||||||
{
|
|
||||||
EdidNameFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.PreferredTimingEventId)
|
|
||||||
{
|
|
||||||
EdidPreferredTimingFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.SerialNumberEventId)
|
|
||||||
{
|
|
||||||
EdidSerialNumberFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool CustomActivate()
|
|
||||||
{
|
|
||||||
// Base does register and sets up comm monitoring.
|
|
||||||
return base.CustomActivate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
@@ -110,32 +96,32 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
|
|
||||||
#region IIROutputPorts Members
|
#region IIROutputPorts Members
|
||||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return Rmc.IROutputPorts; } }
|
public CrestronCollection<IROutputPort> IROutputPorts { get { return _rmc.IROutputPorts; } }
|
||||||
public int NumberOfIROutputPorts { get { return Rmc.NumberOfIROutputPorts; } }
|
public int NumberOfIROutputPorts { get { return _rmc.NumberOfIROutputPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IComPorts Members
|
#region IComPorts Members
|
||||||
public CrestronCollection<ComPort> ComPorts { get { return Rmc.ComPorts; } }
|
public CrestronCollection<ComPort> ComPorts { get { return _rmc.ComPorts; } }
|
||||||
public int NumberOfComPorts { get { return Rmc.NumberOfComPorts; } }
|
public int NumberOfComPorts { get { return _rmc.NumberOfComPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ICec Members
|
#region ICec Members
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the CEC stream directly from the HDMI port.
|
/// Gets the CEC stream directly from the HDMI port.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Cec StreamCec { get { return Rmc.HdmiOutput.StreamCec; } }
|
public Cec StreamCec { get { return _rmc.HdmiOutput.StreamCec; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IRelayPorts Members
|
#region IRelayPorts Members
|
||||||
|
|
||||||
public int NumberOfRelayPorts
|
public int NumberOfRelayPorts
|
||||||
{
|
{
|
||||||
get { return Rmc.NumberOfRelayPorts; }
|
get { return _rmc.NumberOfRelayPorts; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public CrestronCollection<Relay> RelayPorts
|
public CrestronCollection<Relay> RelayPorts
|
||||||
{
|
{
|
||||||
get { return Rmc.RelayPorts; }
|
get { return _rmc.RelayPorts; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -153,6 +139,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void MuteOff()
|
public void MuteOff()
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, this, "DM Endpoint {0} does not have a mute function", Key);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -160,11 +147,12 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void MuteOn()
|
public void MuteOn()
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, this, "DM Endpoint {0} does not have a mute function", Key);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetVolume(ushort level)
|
public void SetVolume(ushort level)
|
||||||
{
|
{
|
||||||
Rmc.AudioOutput.Volume.UShortValue = level;
|
_rmc.AudioOutput.Volume.UShortValue = level;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IntFeedback VolumeLevelFeedback
|
public IntFeedback VolumeLevelFeedback
|
||||||
@@ -182,22 +170,23 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void MuteToggle()
|
public void MuteToggle()
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, this, "DM Endpoint {0} does not have a mute function", Key);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void VolumeDown(bool pressRelease)
|
public void VolumeDown(bool pressRelease)
|
||||||
{
|
{
|
||||||
if (pressRelease)
|
if (pressRelease)
|
||||||
SigHelper.RampTimeScaled(Rmc.AudioOutput.Volume, 0, 4000);
|
SigHelper.RampTimeScaled(_rmc.AudioOutput.Volume, 0, 4000);
|
||||||
else
|
else
|
||||||
Rmc.AudioOutput.Volume.StopRamp();
|
_rmc.AudioOutput.Volume.StopRamp();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void VolumeUp(bool pressRelease)
|
public void VolumeUp(bool pressRelease)
|
||||||
{
|
{
|
||||||
if (pressRelease)
|
if (pressRelease)
|
||||||
SigHelper.RampTimeScaled(Rmc.AudioOutput.Volume, 65535, 4000);
|
SigHelper.RampTimeScaled(_rmc.AudioOutput.Volume, 65535, 4000);
|
||||||
else
|
else
|
||||||
Rmc.AudioOutput.Volume.StopRamp();
|
_rmc.AudioOutput.Volume.StopRamp();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
using System;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
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;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
||||||
@@ -23,53 +17,55 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
_rmc = rmc;
|
_rmc = rmc;
|
||||||
|
|
||||||
/* removed this logic because it's done in the base constructor and doesn't need to be duplicated here
|
|
||||||
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
|
||||||
eRoutingPortConnectionType.DmCat, 0, this);
|
|
||||||
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
|
||||||
eRoutingPortConnectionType.Hdmi, null, this) {Port = _rmc};
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Set Ports for CEC
|
|
||||||
|
|
||||||
//TODO: We need to look at this class inheritance design...not so sure these properties need to be virtual and/or abstract.
|
|
||||||
EdidManufacturerFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
EdidManufacturerFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
||||||
EdidNameFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
EdidNameFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
||||||
EdidPreferredTimingFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
EdidPreferredTimingFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
||||||
EdidSerialNumberFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
EdidSerialNumberFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
||||||
|
|
||||||
_rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
_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)
|
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
|
||||||
{
|
{
|
||||||
if (args.EventId == EndpointOutputStreamEventIds.HorizontalResolutionFeedbackEventId || args.EventId == EndpointOutputStreamEventIds.VerticalResolutionFeedbackEventId ||
|
switch (args.EventId)
|
||||||
args.EventId == EndpointOutputStreamEventIds.FramesPerSecondFeedbackEventId)
|
|
||||||
{
|
{
|
||||||
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)
|
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
||||||
{
|
{
|
||||||
if (args.EventId == ConnectedDeviceEventIds.ManufacturerEventId)
|
switch (args.EventId)
|
||||||
{
|
{
|
||||||
EdidManufacturerFeedback.FireUpdate();
|
case ConnectedDeviceEventIds.ManufacturerEventId:
|
||||||
|
EdidManufacturerFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
case ConnectedDeviceEventIds.NameEventId:
|
||||||
|
EdidNameFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
case ConnectedDeviceEventIds.PreferredTimingEventId:
|
||||||
|
EdidPreferredTimingFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
case ConnectedDeviceEventIds.SerialNumberEventId:
|
||||||
|
EdidSerialNumberFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.NameEventId)
|
}*/
|
||||||
{
|
|
||||||
EdidNameFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.PreferredTimingEventId)
|
|
||||||
{
|
|
||||||
EdidPreferredTimingFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.SerialNumberEventId)
|
|
||||||
{
|
|
||||||
EdidSerialNumberFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
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;
|
using Crestron.SimplSharpPro.DM;
|
||||||
@@ -18,92 +14,82 @@ namespace PepperDash.Essentials.DM
|
|||||||
public class DmRmc4kZScalerCController : DmRmcControllerBase, IRmcRouting,
|
public class DmRmc4kZScalerCController : DmRmcControllerBase, IRmcRouting,
|
||||||
IIROutputPorts, IComPorts, ICec
|
IIROutputPorts, IComPorts, ICec
|
||||||
{
|
{
|
||||||
public DmRmc4kzScalerC Rmc { get; private set; }
|
private readonly DmRmc4kzScalerC _rmc;
|
||||||
|
|
||||||
public RoutingInputPort DmIn { get; private set; }
|
public RoutingInputPort DmIn { get; private set; }
|
||||||
public RoutingInputPort HdmiIn { get; private set; }
|
public RoutingInputPort HdmiIn { get; private set; }
|
||||||
public RoutingOutputPort HdmiOut { get; private set; }
|
public RoutingOutputPort HdmiOut { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The value of the current video source for the HDMI output on the receiver
|
/// The value of the current video source for the HDMI output on the receiver
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IntFeedback AudioVideoSourceNumericFeedback { get; private set; }
|
public IntFeedback AudioVideoSourceNumericFeedback { get; private set; }
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts
|
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingInputPort> { DmIn, HdmiIn }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingOutputPort> { HdmiOut }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public DmRmc4kZScalerCController(string key, string name, DmRmc4kzScalerC rmc)
|
public DmRmc4kZScalerCController(string key, string name, DmRmc4kzScalerC rmc)
|
||||||
: base(key, name, rmc)
|
: base(key, name, rmc)
|
||||||
{
|
{
|
||||||
Rmc = rmc;
|
_rmc = rmc;
|
||||||
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.DmCat, 0, this);
|
eRoutingPortConnectionType.DmCat, 0, this);
|
||||||
HdmiIn = new RoutingInputPort(DmPortName.HdmiIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
HdmiIn = new RoutingInputPort(DmPortName.HdmiIn, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.Hdmi, 0, this);
|
eRoutingPortConnectionType.Hdmi, 0, this);
|
||||||
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
eRoutingPortConnectionType.Hdmi, null, this);
|
||||||
|
|
||||||
EdidManufacturerFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
EdidManufacturerFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
||||||
EdidNameFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
EdidNameFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
||||||
EdidPreferredTimingFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
EdidPreferredTimingFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
||||||
EdidSerialNumberFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
EdidSerialNumberFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
||||||
|
|
||||||
VideoOutputResolutionFeedback = new StringFeedback(() => Rmc.HdmiOutput.GetVideoResolutionString());
|
VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString());
|
||||||
|
|
||||||
Rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn, HdmiIn};
|
||||||
Rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut};
|
||||||
|
|
||||||
|
_rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
||||||
|
_rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
||||||
|
|
||||||
// Set Ports for CEC
|
// Set Ports for CEC
|
||||||
HdmiOut.Port = Rmc.HdmiOutput;
|
HdmiOut.Port = _rmc.HdmiOutput;
|
||||||
|
|
||||||
AudioVideoSourceNumericFeedback = new IntFeedback(() => (ushort)(Rmc.SelectedSourceFeedback));
|
AudioVideoSourceNumericFeedback = new IntFeedback(() => (ushort)(_rmc.SelectedSourceFeedback));
|
||||||
}
|
}
|
||||||
|
|
||||||
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
|
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
|
||||||
{
|
{
|
||||||
if (args.EventId == EndpointOutputStreamEventIds.HorizontalResolutionFeedbackEventId || args.EventId == EndpointOutputStreamEventIds.VerticalResolutionFeedbackEventId ||
|
if (args.EventId == EndpointOutputStreamEventIds.HorizontalResolutionFeedbackEventId || args.EventId == EndpointOutputStreamEventIds.VerticalResolutionFeedbackEventId ||
|
||||||
args.EventId == EndpointOutputStreamEventIds.FramesPerSecondFeedbackEventId)
|
args.EventId == EndpointOutputStreamEventIds.FramesPerSecondFeedbackEventId)
|
||||||
{
|
{
|
||||||
VideoOutputResolutionFeedback.FireUpdate();
|
VideoOutputResolutionFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.EventId == EndpointOutputStreamEventIds.SelectedSourceFeedbackEventId)
|
if (args.EventId == EndpointOutputStreamEventIds.SelectedSourceFeedbackEventId)
|
||||||
{
|
{
|
||||||
AudioVideoSourceNumericFeedback.FireUpdate();
|
AudioVideoSourceNumericFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
|
||||||
{
|
|
||||||
if (args.EventId == ConnectedDeviceEventIds.ManufacturerEventId)
|
|
||||||
{
|
|
||||||
EdidManufacturerFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.NameEventId)
|
|
||||||
{
|
|
||||||
EdidNameFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.PreferredTimingEventId)
|
|
||||||
{
|
|
||||||
EdidPreferredTimingFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.SerialNumberEventId)
|
|
||||||
{
|
|
||||||
EdidSerialNumberFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CustomActivate()
|
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
||||||
{
|
{
|
||||||
// Base does register and sets up comm monitoring.
|
switch (args.EventId)
|
||||||
return base.CustomActivate();
|
{
|
||||||
|
case ConnectedDeviceEventIds.ManufacturerEventId:
|
||||||
|
EdidManufacturerFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
case ConnectedDeviceEventIds.NameEventId:
|
||||||
|
EdidNameFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
case ConnectedDeviceEventIds.PreferredTimingEventId:
|
||||||
|
EdidPreferredTimingFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
case ConnectedDeviceEventIds.SerialNumberEventId:
|
||||||
|
EdidSerialNumberFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
@@ -112,20 +98,20 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
|
|
||||||
#region IIROutputPorts Members
|
#region IIROutputPorts Members
|
||||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return Rmc.IROutputPorts; } }
|
public CrestronCollection<IROutputPort> IROutputPorts { get { return _rmc.IROutputPorts; } }
|
||||||
public int NumberOfIROutputPorts { get { return Rmc.NumberOfIROutputPorts; } }
|
public int NumberOfIROutputPorts { get { return _rmc.NumberOfIROutputPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IComPorts Members
|
#region IComPorts Members
|
||||||
public CrestronCollection<ComPort> ComPorts { get { return Rmc.ComPorts; } }
|
public CrestronCollection<ComPort> ComPorts { get { return _rmc.ComPorts; } }
|
||||||
public int NumberOfComPorts { get { return Rmc.NumberOfComPorts; } }
|
public int NumberOfComPorts { get { return _rmc.NumberOfComPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ICec Members
|
#region ICec Members
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the CEC stream directly from the HDMI port.
|
/// Gets the CEC stream directly from the HDMI port.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Cec StreamCec { get { return Rmc.HdmiOutput.StreamCec; } }
|
public Cec StreamCec { get { return _rmc.HdmiOutput.StreamCec; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
@@ -136,14 +122,14 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
var number = Convert.ToUInt16(inputSelector);
|
var number = Convert.ToUInt16(inputSelector);
|
||||||
|
|
||||||
Rmc.AudioVideoSource = (DmRmc4kzScalerC.eAudioVideoSource)number;
|
_rmc.AudioVideoSource = (DmRmc4kzScalerC.eAudioVideoSource)number;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType signalType)
|
public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType signalType)
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "Attempting a route from input {0} to HDMI Output", inputSelector);
|
Debug.Console(2, this, "Attempting a route from input {0} to HDMI Output", inputSelector);
|
||||||
|
|
||||||
Rmc.AudioVideoSource = (DmRmc4kzScalerC.eAudioVideoSource)inputSelector;
|
_rmc.AudioVideoSource = (DmRmc4kzScalerC.eAudioVideoSource)inputSelector;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
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;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
@@ -19,293 +14,298 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
[Description("Wrapper class for all DM-RMC variants")]
|
[Description("Wrapper class for all DM-RMC variants")]
|
||||||
public abstract class DmRmcControllerBase : CrestronGenericBridgeableBaseDevice
|
public abstract class DmRmcControllerBase : CrestronGenericBridgeableBaseDevice
|
||||||
{
|
{
|
||||||
public virtual StringFeedback VideoOutputResolutionFeedback { get; protected set; }
|
private readonly EndpointReceiverBase _rmc; //kept here just in case. Only property or method on this class that's not device-specific is the DMOutput that it's attached to.
|
||||||
public virtual StringFeedback EdidManufacturerFeedback { get; protected set; }
|
|
||||||
public virtual StringFeedback EdidNameFeedback { get; protected set; }
|
public StringFeedback VideoOutputResolutionFeedback { get; protected set; }
|
||||||
public virtual StringFeedback EdidPreferredTimingFeedback { get; protected set; }
|
public StringFeedback EdidManufacturerFeedback { get; protected set; }
|
||||||
public virtual StringFeedback EdidSerialNumberFeedback { get; protected set; }
|
public StringFeedback EdidNameFeedback { get; protected set; }
|
||||||
|
public StringFeedback EdidPreferredTimingFeedback { get; protected set; }
|
||||||
|
public StringFeedback EdidSerialNumberFeedback { get; protected set; }
|
||||||
|
|
||||||
protected DmRmcControllerBase(string key, string name, EndpointReceiverBase device)
|
protected DmRmcControllerBase(string key, string name, EndpointReceiverBase device)
|
||||||
: base(key, name, device)
|
: base(key, name, device)
|
||||||
{
|
{
|
||||||
|
_rmc = device;
|
||||||
// if wired to a chassis, skip registration step in base class
|
// if wired to a chassis, skip registration step in base class
|
||||||
if (device.DMOutput != null)
|
PreventRegistration = _rmc.DMOutput != null;
|
||||||
{
|
|
||||||
this.PreventRegistration = true;
|
|
||||||
}
|
|
||||||
AddToFeedbackList(VideoOutputResolutionFeedback, EdidManufacturerFeedback, EdidSerialNumberFeedback, EdidNameFeedback, EdidPreferredTimingFeedback);
|
AddToFeedbackList(VideoOutputResolutionFeedback, EdidManufacturerFeedback, EdidSerialNumberFeedback, EdidNameFeedback, EdidPreferredTimingFeedback);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void LinkDmRmcToApi(DmRmcControllerBase rmc, BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
protected void LinkDmRmcToApi(DmRmcControllerBase rmc, BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
var joinMap = new DmRmcControllerJoinMap();
|
var joinMap = new DmRmcControllerJoinMap(joinStart);
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<DmRmcControllerJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<DmRmcControllerJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
|
|
||||||
Debug.Console(1, rmc, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, rmc, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
rmc.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
rmc.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
||||||
if (rmc.VideoOutputResolutionFeedback != null)
|
if (rmc.VideoOutputResolutionFeedback != null)
|
||||||
rmc.VideoOutputResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentOutputResolution]);
|
rmc.VideoOutputResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentOutputResolution.JoinNumber]);
|
||||||
if (rmc.EdidManufacturerFeedback != null)
|
if (rmc.EdidManufacturerFeedback != null)
|
||||||
rmc.EdidManufacturerFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidManufacturer]);
|
rmc.EdidManufacturerFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidManufacturer.JoinNumber]);
|
||||||
if (rmc.EdidNameFeedback != null)
|
if (rmc.EdidNameFeedback != null)
|
||||||
rmc.EdidNameFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidName]);
|
rmc.EdidNameFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidName.JoinNumber]);
|
||||||
if (rmc.EdidPreferredTimingFeedback != null)
|
if (rmc.EdidPreferredTimingFeedback != null)
|
||||||
rmc.EdidPreferredTimingFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidPrefferedTiming]);
|
rmc.EdidPreferredTimingFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidPrefferedTiming.JoinNumber]);
|
||||||
if (rmc.EdidSerialNumberFeedback != null)
|
if (rmc.EdidSerialNumberFeedback != null)
|
||||||
rmc.EdidSerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidSerialNumber]);
|
rmc.EdidSerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidSerialNumber.JoinNumber]);
|
||||||
|
|
||||||
//If the device is an DM-RMC-4K-Z-SCALER-C
|
//If the device is an DM-RMC-4K-Z-SCALER-C
|
||||||
var routing = rmc as IRmcRouting;
|
var routing = rmc as IRmcRouting;
|
||||||
|
|
||||||
if (routing != null)
|
if (routing == null)
|
||||||
{
|
{
|
||||||
if (routing.AudioVideoSourceNumericFeedback != null)
|
return;
|
||||||
routing.AudioVideoSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.AudioVideoSource]);
|
|
||||||
|
|
||||||
trilist.SetUShortSigAction(joinMap.AudioVideoSource, (a) => routing.ExecuteNumericSwitch(a, 1, eRoutingSignalType.AudioVideo));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (routing.AudioVideoSourceNumericFeedback != null)
|
||||||
|
routing.AudioVideoSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.AudioVideoSource.JoinNumber]);
|
||||||
|
|
||||||
|
trilist.SetUShortSigAction(joinMap.AudioVideoSource.JoinNumber, a => routing.ExecuteNumericSwitch(a, 1, eRoutingSignalType.AudioVideo));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract class DmHdBaseTControllerBase : CrestronGenericBaseDevice
|
public abstract class DmHdBaseTControllerBase : CrestronGenericBaseDevice
|
||||||
{
|
{
|
||||||
public HDBaseTBase Rmc { get; protected set; }
|
protected HDBaseTBase Rmc;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Make a Crestron RMC and put it in here
|
/// Make a Crestron RMC and put it in here
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DmHdBaseTControllerBase(string key, string name, HDBaseTBase rmc)
|
protected DmHdBaseTControllerBase(string key, string name, HDBaseTBase rmc)
|
||||||
: base(key, name, rmc)
|
: base(key, name, rmc)
|
||||||
{
|
{
|
||||||
|
Rmc = rmc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DmRmcHelper
|
public class DmRmcHelper
|
||||||
{
|
{
|
||||||
/// <summary>
|
private static readonly Dictionary<string, Func<string, string, uint, CrestronGenericBaseDevice>> ProcessorFactoryDict;
|
||||||
/// A factory method for various DmTxControllers
|
private static readonly Dictionary<string, Func<string, string, DMOutput, CrestronGenericBaseDevice>> ChassisCpu3Dict;
|
||||||
/// </summary>
|
|
||||||
/// <param name="key"></param>
|
private static readonly Dictionary<string, Func<string, string, uint, DMOutput, CrestronGenericBaseDevice>>
|
||||||
/// <param name="name"></param>
|
ChassisDict;
|
||||||
/// <param name="props"></param>
|
|
||||||
/// <returns></returns>
|
static DmRmcHelper()
|
||||||
public static CrestronGenericBaseDevice GetDmRmcController(string key, string name, string typeName, DmRmcPropertiesConfig props)
|
{
|
||||||
|
ProcessorFactoryDict = new Dictionary<string, Func<string, string, uint, CrestronGenericBaseDevice>>
|
||||||
|
{
|
||||||
|
{"dmrmc100c", (k, n, i) => new DmRmcX100CController(k, n, new DmRmc100C(i, Global.ControlSystem))},
|
||||||
|
{"dmrmc100s", (k, n, i) => new DmRmc100SController(k, n, new DmRmc100S(i, Global.ControlSystem))},
|
||||||
|
{"dmrmc4k100c", (k, n, i) => new DmRmcX100CController(k, n, new DmRmc4k100C(i, Global.ControlSystem))},
|
||||||
|
{"dmrmc4kz100c", (k, n, i) => new DmRmc4kZ100CController(k, n, new DmRmc4kz100C(i, Global.ControlSystem))},
|
||||||
|
{"dmrmc150s", (k, n, i) => new DmRmc150SController(k, n, new DmRmc150S(i, Global.ControlSystem))},
|
||||||
|
{"dmrmc200c", (k, n, i) => new DmRmc200CController(k, n, new DmRmc200C(i, Global.ControlSystem))},
|
||||||
|
{"dmrmc200s", (k, n, i) => new DmRmc200SController(k, n, new DmRmc200S(i, Global.ControlSystem))},
|
||||||
|
{"dmrmc200s2", (k, n, i) => new DmRmc200S2Controller(k, n, new DmRmc200S2(i, Global.ControlSystem))},
|
||||||
|
{"dmrmcscalerc", (k, n, i) => new DmRmcScalerCController(k, n, new DmRmcScalerC(i, Global.ControlSystem))},
|
||||||
|
{"dmrmcscalers", (k, n, i) => new DmRmcScalerSController(k, n, new DmRmcScalerS(i, Global.ControlSystem))},
|
||||||
|
{
|
||||||
|
"dmrmcscalers2",
|
||||||
|
(k, n, i) => new DmRmcScalerS2Controller(k, n, new DmRmcScalerS2(i, Global.ControlSystem))
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dmrmc4kscalerc",
|
||||||
|
(k, n, i) => new DmRmc4kScalerCController(k, n, new DmRmc4kScalerC(i, Global.ControlSystem))
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dmrmc4kscalercdsp",
|
||||||
|
(k, n, i) => new DmRmc4kScalerCDspController(k, n, new DmRmc4kScalerCDsp(i, Global.ControlSystem))
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dmrmc4kzscalerc",
|
||||||
|
(k, n, i) => new DmRmc4kZScalerCController(k, n, new DmRmc4kzScalerC(i, Global.ControlSystem))
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
ChassisCpu3Dict = new Dictionary<string, Func<string, string, DMOutput, CrestronGenericBaseDevice>>
|
||||||
|
{
|
||||||
|
{"dmrmc100c", (k, n, d) => new DmRmcX100CController(k, n, new DmRmc100C(d))},
|
||||||
|
{"dmrmc100s", (k, n, d) => new DmRmc100SController(k, n, new DmRmc100S(d))},
|
||||||
|
{"dmrmc4k100c", (k, n, d) => new DmRmcX100CController(k, n, new DmRmc4k100C(d))},
|
||||||
|
{"dmrmc4kz100c", (k, n, d) => new DmRmc4kZ100CController(k, n, new DmRmc4kz100C(d))},
|
||||||
|
{"dmrmc150s", (k, n, d) => new DmRmc150SController(k, n, new DmRmc150S(d))},
|
||||||
|
{"dmrmc200c", (k, n, d) => new DmRmc200CController(k, n, new DmRmc200C(d))},
|
||||||
|
{"dmrmc200s", (k, n, d) => new DmRmc200SController(k, n, new DmRmc200S(d))},
|
||||||
|
{"dmrmc200s2", (k, n, d) => new DmRmc200S2Controller(k, n, new DmRmc200S2(d))},
|
||||||
|
{"dmrmcscalerc", (k, n, d) => new DmRmcScalerCController(k, n, new DmRmcScalerC(d))},
|
||||||
|
{"dmrmcscalers", (k, n, d) => new DmRmcScalerSController(k, n, new DmRmcScalerS(d))},
|
||||||
|
{
|
||||||
|
"dmrmcscalers2",
|
||||||
|
(k, n, d) => new DmRmcScalerS2Controller(k, n, new DmRmcScalerS2(d))
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dmrmc4kscalerc",
|
||||||
|
(k, n, d) => new DmRmc4kScalerCController(k, n, new DmRmc4kScalerC(d))
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dmrmc4kscalercdsp",
|
||||||
|
(k, n, d) => new DmRmc4kScalerCDspController(k, n, new DmRmc4kScalerCDsp(d))
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dmrmc4kzscalerc",
|
||||||
|
(k, n, d) => new DmRmc4kZScalerCController(k, n, new DmRmc4kzScalerC(d))
|
||||||
|
},
|
||||||
|
{"hdbasetrx", (k,n,d) => new HDBaseTRxController(k,n, new HDRx3CB(d))},
|
||||||
|
{"dmrmc4k100c1g", (k,n,d) => new DmRmc4k100C1GController(k,n, new DmRmc4K100C1G(d))}
|
||||||
|
};
|
||||||
|
|
||||||
|
ChassisDict = new Dictionary<string, Func<string, string, uint, DMOutput, CrestronGenericBaseDevice>>
|
||||||
|
{
|
||||||
|
{"dmrmc100c", (k, n, i, d) => new DmRmcX100CController(k, n, new DmRmc100C(i,d))},
|
||||||
|
{"dmrmc100s", (k, n,i, d) => new DmRmc100SController(k, n, new DmRmc100S(i,d))},
|
||||||
|
{"dmrmc4k100c", (k, n,i, d) => new DmRmcX100CController(k, n, new DmRmc4k100C(i,d))},
|
||||||
|
{"dmrmc4kz100c", (k, n,i, d) => new DmRmc4kZ100CController(k, n, new DmRmc4kz100C(i,d))},
|
||||||
|
{"dmrmc150s", (k, n,i, d) => new DmRmc150SController(k, n, new DmRmc150S(i,d))},
|
||||||
|
{"dmrmc200c", (k, n,i, d) => new DmRmc200CController(k, n, new DmRmc200C(i,d))},
|
||||||
|
{"dmrmc200s", (k, n,i, d) => new DmRmc200SController(k, n, new DmRmc200S(i,d))},
|
||||||
|
{"dmrmc200s2", (k, n,i, d) => new DmRmc200S2Controller(k, n, new DmRmc200S2(i,d))},
|
||||||
|
{"dmrmcscalerc", (k, n,i, d) => new DmRmcScalerCController(k, n, new DmRmcScalerC(i,d))},
|
||||||
|
{"dmrmcscalers", (k, n,i, d) => new DmRmcScalerSController(k, n, new DmRmcScalerS(i,d))},
|
||||||
|
{
|
||||||
|
"dmrmcscalers2",
|
||||||
|
(k, n,i, d) => new DmRmcScalerS2Controller(k, n, new DmRmcScalerS2(d))
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dmrmc4kscalerc",
|
||||||
|
(k, n,i, d) => new DmRmc4kScalerCController(k, n, new DmRmc4kScalerC(d))
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dmrmc4kscalercdsp",
|
||||||
|
(k, n,i, d) => new DmRmc4kScalerCDspController(k, n, new DmRmc4kScalerCDsp(d))
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dmrmc4kzscalerc",
|
||||||
|
(k, n,i, d) => new DmRmc4kZScalerCController(k, n, new DmRmc4kzScalerC(d))
|
||||||
|
},
|
||||||
|
{"hdbasetrx", (k,n,i,d) => new HDBaseTRxController(k,n, new HDRx3CB(d))},
|
||||||
|
{"dmrmc4k100c1g", (k,n,i,d) => new DmRmc4k100C1GController(k,n, new DmRmc4K100C1G(d))}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// A factory method for various DmRmcControllers
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="key">device key. Used to uniquely identify device</param>
|
||||||
|
/// <param name="name">device name</param>
|
||||||
|
/// <param name="typeName">device type name. Used to retrived the correct device</param>
|
||||||
|
/// <param name="props">Config from config file</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static CrestronGenericBaseDevice GetDmRmcController(string key, string name, string typeName, DmRmcPropertiesConfig props)
|
||||||
{
|
{
|
||||||
// switch on type name... later...
|
|
||||||
|
|
||||||
typeName = typeName.ToLower();
|
typeName = typeName.ToLower();
|
||||||
uint ipid = props.Control.IpIdInt; // Convert.ToUInt16(props.Id, 16);
|
var ipid = props.Control.IpIdInt;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// right here, we need to grab the tie line that associates this
|
|
||||||
// RMC with a chassis or processor. If the RMC input's tie line is not
|
|
||||||
// connected to a chassis, then it's parent is the processor.
|
|
||||||
// If the RMC is connected to a chassis, then we need to grab the
|
|
||||||
// output number from the tie line and use that to plug it in.
|
|
||||||
// Example of chassis-connected:
|
|
||||||
//{
|
|
||||||
// "sourceKey": "dmMd8x8-1",
|
|
||||||
// "sourcePort": "anyOut2",
|
|
||||||
// "destinationKey": "dmRmc100C-2",
|
|
||||||
// "destinationPort": "DmIn"
|
|
||||||
//}
|
|
||||||
|
|
||||||
// Tx -> RMC link:
|
|
||||||
//{
|
|
||||||
// "sourceKey": "dmTx201C-1",
|
|
||||||
// "sourcePort": "DmOut",
|
|
||||||
// "destinationKey": "dmRmc100C-2",
|
|
||||||
// "destinationPort": "DmIn"
|
|
||||||
//}
|
|
||||||
|
|
||||||
var tlc = TieLineCollection.Default;
|
|
||||||
// grab the tie line that has this key as
|
|
||||||
// THIS DOESN'T WORK BECAUSE THE RMC THAT WE NEED (THIS) HASN'T BEEN MADE
|
|
||||||
// YET AND THUS WILL NOT HAVE A TIE LINE...
|
|
||||||
var inputTieLine = tlc.FirstOrDefault(t =>
|
|
||||||
{
|
|
||||||
var d = t.DestinationPort.ParentDevice;
|
|
||||||
return d.Key.Equals(key, StringComparison.OrdinalIgnoreCase)
|
|
||||||
&& d is DmChassisController;
|
|
||||||
});
|
|
||||||
|
|
||||||
var pKey = props.ParentDeviceKey.ToLower();
|
var pKey = props.ParentDeviceKey.ToLower();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Non-DM-chassis endpoints
|
// Non-DM-chassis endpoints
|
||||||
if (pKey == "processor")
|
return pKey == "processor" ? GetDmRmcControllerForProcessor(key, name, typeName, ipid) : GetDmRmcControllerForChassis(key, name, typeName, props, pKey, ipid);
|
||||||
{
|
|
||||||
// Catch constructor failures, mainly dues to IPID
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (typeName.StartsWith("dmrmc100c"))
|
|
||||||
return new DmRmcX100CController(key, name, new DmRmc100C(ipid, Global.ControlSystem));
|
|
||||||
if (typeName.StartsWith("dmrmc100s"))
|
|
||||||
return new DmRmc100SController(key, name, new DmRmc100S(ipid, Global.ControlSystem));
|
|
||||||
if (typeName.StartsWith("dmrmc4k100c"))
|
|
||||||
return new DmRmcX100CController(key, name, new DmRmc4k100C(ipid, Global.ControlSystem));
|
|
||||||
if (typeName.StartsWith("dmrmc4kz100c"))
|
|
||||||
return new DmRmc4kZ100CController(key, name, new DmRmc4kz100C(ipid, Global.ControlSystem));
|
|
||||||
if (typeName.StartsWith("dmrmc150s"))
|
|
||||||
return new DmRmc150SController(key, name, new DmRmc150S(ipid, Global.ControlSystem));
|
|
||||||
if (typeName.StartsWith("dmrmc200c"))
|
|
||||||
return new DmRmc200CController(key, name, new DmRmc200C(ipid, Global.ControlSystem));
|
|
||||||
if (typeName.StartsWith("dmrmc200s"))
|
|
||||||
return new DmRmc200SController(key, name, new DmRmc200S(ipid, Global.ControlSystem));
|
|
||||||
if (typeName.StartsWith("dmrmc200s2"))
|
|
||||||
return new DmRmc200S2Controller(key, name, new DmRmc200S2(ipid, Global.ControlSystem));
|
|
||||||
if (typeName.StartsWith("dmrmcscalerc"))
|
|
||||||
return new DmRmcScalerCController(key, name, new DmRmcScalerC(ipid, Global.ControlSystem));
|
|
||||||
if (typeName.StartsWith("dmrmcscalers"))
|
|
||||||
return new DmRmcScalerSController(key, name, new DmRmcScalerS(ipid, Global.ControlSystem));
|
|
||||||
if (typeName.StartsWith("dmrmcscalers2"))
|
|
||||||
return new DmRmcScalerS2Controller(key, name, new DmRmcScalerS2(ipid, Global.ControlSystem));
|
|
||||||
if (typeName.StartsWith("dmrmc4kscalerc"))
|
|
||||||
return new DmRmc4kScalerCController(key, name, new DmRmc4kScalerC(ipid, Global.ControlSystem));
|
|
||||||
if (typeName.StartsWith("dmrmc4kscalercdsp"))
|
|
||||||
return new DmRmc4kScalerCDspController(key, name, new DmRmc4kScalerCDsp(ipid, Global.ControlSystem));
|
|
||||||
if (typeName.StartsWith("dmrmc4kzscalerc"))
|
|
||||||
return new DmRmc4kZScalerCController(key, name, new DmRmc4kzScalerC(ipid, Global.ControlSystem));
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
Debug.Console(0, "[{0}] WARNING: Cannot create DM-RMC device: {1}", key, e.Message);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Debug.Console(0, "Cannot create DM-RMC of type: '{0}'", typeName);
|
|
||||||
}
|
|
||||||
// Endpoints attached to DM Chassis
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var parentDev = DeviceManager.GetDeviceForKey(pKey);
|
|
||||||
if (!(parentDev is IDmSwitch))
|
|
||||||
{
|
|
||||||
Debug.Console(0, "Cannot create DM device '{0}'. '{1}' is not a DM Chassis.",
|
|
||||||
key, pKey);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
var chassis = (parentDev as IDmSwitch).Chassis;
|
|
||||||
var num = props.ParentOutputNumber;
|
|
||||||
if (num <= 0 || num > chassis.NumberOfOutputs)
|
|
||||||
{
|
|
||||||
Debug.Console(0, "Cannot create DM device '{0}'. Output number '{1}' is out of range",
|
|
||||||
key, num);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var controller = (parentDev as IDmSwitch);
|
|
||||||
controller.RxDictionary.Add(num, key);
|
|
||||||
}
|
|
||||||
// Catch constructor failures, mainly dues to IPID
|
|
||||||
try
|
|
||||||
{
|
|
||||||
|
|
||||||
// Must use different constructor for CPU3 chassis types. No IPID
|
|
||||||
if (chassis is DmMd8x8Cpu3 || chassis is DmMd16x16Cpu3 ||
|
|
||||||
chassis is DmMd32x32Cpu3 || chassis is DmMd8x8Cpu3rps ||
|
|
||||||
chassis is DmMd16x16Cpu3rps || chassis is DmMd32x32Cpu3rps ||
|
|
||||||
chassis is DmMd128x128 || chassis is DmMd64x64)
|
|
||||||
{
|
|
||||||
if (typeName.StartsWith("hdbasetrx"))
|
|
||||||
return new HDBaseTRxController(key, name, new HDRx3CB(chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmc4k100c1g"))
|
|
||||||
return new DmRmc4k100C1GController(key, name, new DmRmc4K100C1G(chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmc100c"))
|
|
||||||
return new DmRmcX100CController(key, name, new DmRmc100C(chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmc100s"))
|
|
||||||
return new DmRmc100SController(key, name, new DmRmc100S(chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmc4k100c"))
|
|
||||||
return new DmRmcX100CController(key, name, new DmRmc4k100C(chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmc4kz100c"))
|
|
||||||
return new DmRmc4kZ100CController(key, name, new DmRmc4kz100C(chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmc150s"))
|
|
||||||
return new DmRmc150SController(key, name, new DmRmc150S(chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmc200c"))
|
|
||||||
return new DmRmc200CController(key, name, new DmRmc200C(chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmc200s"))
|
|
||||||
return new DmRmc200SController(key, name, new DmRmc200S(chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmc200s2"))
|
|
||||||
return new DmRmc200S2Controller(key, name, new DmRmc200S2(chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmcscalerc"))
|
|
||||||
return new DmRmcScalerCController(key, name, new DmRmcScalerC(chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmcscalers"))
|
|
||||||
return new DmRmcScalerSController(key, name, new DmRmcScalerS(chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmcscalers2"))
|
|
||||||
return new DmRmcScalerS2Controller(key, name, new DmRmcScalerS2(chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmc4kscalerc"))
|
|
||||||
return new DmRmc4kScalerCController(key, name, new DmRmc4kScalerC(chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmc4kscalercdsp"))
|
|
||||||
return new DmRmc4kScalerCDspController(key, name, new DmRmc4kScalerCDsp(chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmc4kzscalerc"))
|
|
||||||
return new DmRmc4kZScalerCController(key, name, new DmRmc4kzScalerC(chassis.Outputs[num]));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (typeName.StartsWith("hdbasetrx"))
|
|
||||||
return new HDBaseTRxController(key, name, new HDRx3CB(ipid, chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmc4k100c1g"))
|
|
||||||
return new DmRmc4k100C1GController(key, name, new DmRmc4K100C1G(ipid, chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmc100c"))
|
|
||||||
return new DmRmcX100CController(key, name, new DmRmc100C(ipid, chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmc100s"))
|
|
||||||
return new DmRmc100SController(key, name, new DmRmc100S(ipid, chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmc4k100c"))
|
|
||||||
return new DmRmcX100CController(key, name, new DmRmc4k100C(ipid, chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmc4kz100c"))
|
|
||||||
return new DmRmc4kZ100CController(key, name, new DmRmc4kz100C(ipid, chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmc150s"))
|
|
||||||
return new DmRmc150SController(key, name, new DmRmc150S(ipid, chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmc200c"))
|
|
||||||
return new DmRmc200CController(key, name, new DmRmc200C(ipid, chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmc200s"))
|
|
||||||
return new DmRmc200SController(key, name, new DmRmc200S(ipid, chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmc200s2"))
|
|
||||||
return new DmRmc200S2Controller(key, name, new DmRmc200S2(ipid, chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmcscalerc"))
|
|
||||||
return new DmRmcScalerCController(key, name, new DmRmcScalerC(ipid, chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmcscalers"))
|
|
||||||
return new DmRmcScalerSController(key, name, new DmRmcScalerS(ipid, chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmcscalers2"))
|
|
||||||
return new DmRmcScalerS2Controller(key, name, new DmRmcScalerS2(ipid, chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmc4kscalerc"))
|
|
||||||
return new DmRmc4kScalerCController(key, name, new DmRmc4kScalerC(ipid, chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmc4kscalercdsp"))
|
|
||||||
return new DmRmc4kScalerCDspController(key, name, new DmRmc4kScalerCDsp(ipid, chassis.Outputs[num]));
|
|
||||||
if (typeName.StartsWith("dmrmc4kzscalerc"))
|
|
||||||
return new DmRmc4kZScalerCController(key, name, new DmRmc4kzScalerC(chassis.Outputs[num]));
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
Debug.Console(0, "[{0}] WARNING: Cannot create DM-RMC device: {1}", key, e.Message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static CrestronGenericBaseDevice GetDmRmcControllerForChassis(string key, string name, string typeName,
|
||||||
|
DmRmcPropertiesConfig props, string pKey, uint ipid)
|
||||||
|
{
|
||||||
|
var parentDev = DeviceManager.GetDeviceForKey(pKey);
|
||||||
|
if (!(parentDev is IDmSwitch))
|
||||||
|
{
|
||||||
|
Debug.Console(0, "Cannot create DM device '{0}'. '{1}' is not a DM Chassis.",
|
||||||
|
key, pKey);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var chassis = (parentDev as IDmSwitch).Chassis;
|
||||||
|
var num = props.ParentOutputNumber;
|
||||||
|
|
||||||
|
if (num <= 0 || num > chassis.NumberOfOutputs)
|
||||||
|
{
|
||||||
|
Debug.Console(0, "Cannot create DM device '{0}'. Output number '{1}' is out of range",
|
||||||
|
key, num);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var controller = parentDev as IDmSwitch;
|
||||||
|
controller.RxDictionary.Add(num, key);
|
||||||
|
// Catch constructor failures, mainly dues to IPID
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Must use different constructor for CPU3 chassis types. No IPID
|
||||||
|
if (chassis is DmMd8x8Cpu3 || chassis is DmMd16x16Cpu3 ||
|
||||||
|
chassis is DmMd32x32Cpu3 || chassis is DmMd8x8Cpu3rps ||
|
||||||
|
chassis is DmMd16x16Cpu3rps || chassis is DmMd32x32Cpu3rps ||
|
||||||
|
chassis is DmMd128x128 || chassis is DmMd64x64)
|
||||||
|
{
|
||||||
|
return GetDmRmcControllerForCpu3Chassis(key, name, typeName, chassis, num, parentDev);
|
||||||
|
}
|
||||||
|
|
||||||
|
return GetDmRmcControllerForCpu2Chassis(key, name, typeName, ipid, chassis, num, parentDev);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Console(0, "[{0}] WARNING: Cannot create DM-RMC device: {1}", key, e.Message);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static CrestronGenericBaseDevice GetDmRmcControllerForCpu2Chassis(string key, string name, string typeName,
|
||||||
|
uint ipid, Switch chassis, uint num, IKeyed parentDev)
|
||||||
|
{
|
||||||
|
Func<string, string, uint, DMOutput, CrestronGenericBaseDevice> handler;
|
||||||
|
if (ChassisDict.TryGetValue(typeName.ToLower(), out handler))
|
||||||
|
{
|
||||||
|
return handler(key, name, ipid, chassis.Outputs[num]);
|
||||||
|
}
|
||||||
|
Debug.Console(0, "Cannot create DM-RMC of type '{0}' with parent device {1}", typeName, parentDev.Key);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static CrestronGenericBaseDevice GetDmRmcControllerForCpu3Chassis(string key, string name, string typeName,
|
||||||
|
Switch chassis, uint num, IKeyed parentDev)
|
||||||
|
{
|
||||||
|
Func<string, string, DMOutput, CrestronGenericBaseDevice> cpu3Handler;
|
||||||
|
if (ChassisCpu3Dict.TryGetValue(typeName.ToLower(), out cpu3Handler))
|
||||||
|
{
|
||||||
|
return cpu3Handler(key, name, chassis.Outputs[num]);
|
||||||
|
}
|
||||||
|
Debug.Console(0, "Cannot create DM-RMC of type '{0}' with parent device {1}", typeName, parentDev.Key);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static CrestronGenericBaseDevice GetDmRmcControllerForProcessor(string key, string name, string typeName, uint ipid)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Func<string, string, uint, CrestronGenericBaseDevice> handler;
|
||||||
|
|
||||||
|
if (ProcessorFactoryDict.TryGetValue(typeName.ToLower(), out handler))
|
||||||
|
{
|
||||||
|
return handler(key, name, ipid);
|
||||||
|
}
|
||||||
|
Debug.Console(0, "Cannot create DM-RMC of type: '{0}'", typeName);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Console(0, "[{0}] WARNING: Cannot create DM-RMC device: {1}", key, e.Message);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DmRmcControllerFactory : EssentialsDeviceFactory<DmRmcControllerBase>
|
public class DmRmcControllerFactory : EssentialsDeviceFactory<DmRmcControllerBase>
|
||||||
{
|
{
|
||||||
public DmRmcControllerFactory()
|
public DmRmcControllerFactory()
|
||||||
{
|
{
|
||||||
TypeNames = new List<string>() { "hdbasetrx", "dmrmc4k100c1g", "dmrmc100c", "dmrmc100s", "dmrmc4k100c", "dmrmc150s",
|
TypeNames = new List<string>
|
||||||
|
{ "hdbasetrx", "dmrmc4k100c1g", "dmrmc100c", "dmrmc100s", "dmrmc4k100c", "dmrmc150s",
|
||||||
"dmrmc200c", "dmrmc200s", "dmrmc200s2", "dmrmcscalerc", "dmrmcscalers", "dmrmcscalers2", "dmrmc4kscalerc", "dmrmc4kscalercdsp",
|
"dmrmc200c", "dmrmc200s", "dmrmc200s2", "dmrmcscalerc", "dmrmcscalers", "dmrmcscalers2", "dmrmc4kscalerc", "dmrmc4kscalercdsp",
|
||||||
"dmrmc4kz100c", "dmrmckzscalerc" };
|
"dmrmc4kz100c", "dmrmckzscalerc" };
|
||||||
}
|
}
|
||||||
@@ -317,8 +317,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
Debug.Console(1, "Factory Attempting to create new DM-RMC Device");
|
Debug.Console(1, "Factory Attempting to create new DM-RMC Device");
|
||||||
|
|
||||||
var props = JsonConvert.DeserializeObject
|
var props = JsonConvert.DeserializeObject
|
||||||
<PepperDash.Essentials.DM.Config.DmRmcPropertiesConfig>(dc.Properties.ToString());
|
<DmRmcPropertiesConfig>(dc.Properties.ToString());
|
||||||
return PepperDash.Essentials.DM.DmRmcHelper.GetDmRmcController(dc.Key, dc.Name, type, props);
|
return DmRmcHelper.GetDmRmcController(dc.Key, dc.Name, type, props);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
using System;
|
using Crestron.SimplSharpPro;
|
||||||
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;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||||
@@ -21,20 +16,14 @@ namespace PepperDash.Essentials.DM
|
|||||||
public class DmRmcScalerCController : DmRmcControllerBase, IRoutingInputsOutputs,
|
public class DmRmcScalerCController : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||||
IIROutputPorts, IComPorts, ICec
|
IIROutputPorts, IComPorts, ICec
|
||||||
{
|
{
|
||||||
public DmRmcScalerC Rmc { get; private set; }
|
private readonly DmRmcScalerC _rmc;
|
||||||
|
|
||||||
public RoutingInputPort DmIn { get; private set; }
|
public RoutingInputPort DmIn { get; private set; }
|
||||||
public RoutingOutputPort HdmiOut { get; private set; }
|
public RoutingOutputPort HdmiOut { get; private set; }
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts
|
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingInputPort> { DmIn }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingOutputPort> { HdmiOut }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Make a Crestron RMC and put it in here
|
/// Make a Crestron RMC and put it in here
|
||||||
@@ -42,24 +31,27 @@ namespace PepperDash.Essentials.DM
|
|||||||
public DmRmcScalerCController(string key, string name, DmRmcScalerC rmc)
|
public DmRmcScalerCController(string key, string name, DmRmcScalerC rmc)
|
||||||
: base(key, name, rmc)
|
: base(key, name, rmc)
|
||||||
{
|
{
|
||||||
Rmc = rmc;
|
_rmc = rmc;
|
||||||
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.DmCat, 0, this);
|
eRoutingPortConnectionType.DmCat, 0, this);
|
||||||
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
eRoutingPortConnectionType.Hdmi, null, this);
|
||||||
|
|
||||||
EdidManufacturerFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
EdidManufacturerFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
||||||
EdidNameFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
EdidNameFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
||||||
EdidPreferredTimingFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
EdidPreferredTimingFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
||||||
EdidSerialNumberFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
EdidSerialNumberFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
||||||
|
|
||||||
VideoOutputResolutionFeedback = new StringFeedback(() => Rmc.HdmiOutput.GetVideoResolutionString());
|
VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString());
|
||||||
|
|
||||||
Rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
_rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
||||||
Rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
_rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
||||||
|
|
||||||
|
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
||||||
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut};
|
||||||
|
|
||||||
// Set Ports for CEC
|
// Set Ports for CEC
|
||||||
HdmiOut.Port = Rmc.HdmiOutput;
|
HdmiOut.Port = _rmc.HdmiOutput;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
|
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
|
||||||
@@ -73,50 +65,43 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
||||||
{
|
{
|
||||||
if (args.EventId == ConnectedDeviceEventIds.ManufacturerEventId)
|
switch (args.EventId)
|
||||||
{
|
{
|
||||||
EdidManufacturerFeedback.FireUpdate();
|
case ConnectedDeviceEventIds.ManufacturerEventId:
|
||||||
}
|
EdidManufacturerFeedback.FireUpdate();
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.NameEventId)
|
break;
|
||||||
{
|
case ConnectedDeviceEventIds.NameEventId:
|
||||||
EdidNameFeedback.FireUpdate();
|
EdidNameFeedback.FireUpdate();
|
||||||
}
|
break;
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.PreferredTimingEventId)
|
case ConnectedDeviceEventIds.PreferredTimingEventId:
|
||||||
{
|
EdidPreferredTimingFeedback.FireUpdate();
|
||||||
EdidPreferredTimingFeedback.FireUpdate();
|
break;
|
||||||
}
|
case ConnectedDeviceEventIds.SerialNumberEventId:
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.SerialNumberEventId)
|
EdidSerialNumberFeedback.FireUpdate();
|
||||||
{
|
break;
|
||||||
EdidSerialNumberFeedback.FireUpdate();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CustomActivate()
|
|
||||||
{
|
|
||||||
// Base does register and sets up comm monitoring.
|
|
||||||
return base.CustomActivate();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
LinkDmRmcToApi(this, trilist, joinStart, joinMapKey, bridge);
|
LinkDmRmcToApi(this, trilist, joinStart, joinMapKey, bridge);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IIROutputPorts Members
|
#region IIROutputPorts Members
|
||||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return Rmc.IROutputPorts; } }
|
public CrestronCollection<IROutputPort> IROutputPorts { get { return _rmc.IROutputPorts; } }
|
||||||
public int NumberOfIROutputPorts { get { return Rmc.NumberOfIROutputPorts; } }
|
public int NumberOfIROutputPorts { get { return _rmc.NumberOfIROutputPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IComPorts Members
|
#region IComPorts Members
|
||||||
public CrestronCollection<ComPort> ComPorts { get { return Rmc.ComPorts; } }
|
public CrestronCollection<ComPort> ComPorts { get { return _rmc.ComPorts; } }
|
||||||
public int NumberOfComPorts { get { return Rmc.NumberOfComPorts; } }
|
public int NumberOfComPorts { get { return _rmc.NumberOfComPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ICec Members
|
#region ICec Members
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the CEC stream directly from the HDMI port.
|
/// Gets the CEC stream directly from the HDMI port.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Cec StreamCec { get { return Rmc.HdmiOutput.StreamCec; } }
|
public Cec StreamCec { get { return _rmc.HdmiOutput.StreamCec; } }
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,4 @@
|
|||||||
using System;
|
using Crestron.SimplSharpPro;
|
||||||
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;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||||
@@ -21,20 +16,14 @@ namespace PepperDash.Essentials.DM
|
|||||||
public class DmRmcScalerS2Controller : DmRmcControllerBase, IRoutingInputsOutputs,
|
public class DmRmcScalerS2Controller : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||||
IIROutputPorts, IComPorts, ICec
|
IIROutputPorts, IComPorts, ICec
|
||||||
{
|
{
|
||||||
public DmRmcScalerS2 Rmc { get; private set; }
|
private readonly DmRmcScalerS2 _rmc;
|
||||||
|
|
||||||
public RoutingInputPort DmIn { get; private set; }
|
public RoutingInputPort DmIn { get; private set; }
|
||||||
public RoutingOutputPort HdmiOut { get; private set; }
|
public RoutingOutputPort HdmiOut { get; private set; }
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts
|
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingInputPort> { DmIn }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingOutputPort> { HdmiOut }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Make a Crestron RMC and put it in here
|
/// Make a Crestron RMC and put it in here
|
||||||
@@ -42,24 +31,27 @@ namespace PepperDash.Essentials.DM
|
|||||||
public DmRmcScalerS2Controller(string key, string name, DmRmcScalerS2 rmc)
|
public DmRmcScalerS2Controller(string key, string name, DmRmcScalerS2 rmc)
|
||||||
: base(key, name, rmc)
|
: base(key, name, rmc)
|
||||||
{
|
{
|
||||||
Rmc = rmc;
|
_rmc = rmc;
|
||||||
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.DmCat, 0, this);
|
eRoutingPortConnectionType.DmCat, 0, this);
|
||||||
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
eRoutingPortConnectionType.Hdmi, null, this);
|
||||||
|
|
||||||
EdidManufacturerFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
EdidManufacturerFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
||||||
EdidNameFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
EdidNameFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
||||||
EdidPreferredTimingFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
EdidPreferredTimingFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
||||||
EdidSerialNumberFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
EdidSerialNumberFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
||||||
|
|
||||||
VideoOutputResolutionFeedback = new StringFeedback(() => Rmc.HdmiOutput.GetVideoResolutionString());
|
VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString());
|
||||||
|
|
||||||
Rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
_rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
||||||
Rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
_rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
||||||
|
|
||||||
|
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
||||||
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut};
|
||||||
|
|
||||||
// Set Ports for CEC
|
// Set Ports for CEC
|
||||||
HdmiOut.Port = Rmc.HdmiOutput;
|
HdmiOut.Port = _rmc.HdmiOutput;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
|
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
|
||||||
@@ -73,29 +65,23 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
||||||
{
|
{
|
||||||
if (args.EventId == ConnectedDeviceEventIds.ManufacturerEventId)
|
switch (args.EventId)
|
||||||
{
|
{
|
||||||
EdidManufacturerFeedback.FireUpdate();
|
case ConnectedDeviceEventIds.ManufacturerEventId:
|
||||||
}
|
EdidManufacturerFeedback.FireUpdate();
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.NameEventId)
|
break;
|
||||||
{
|
case ConnectedDeviceEventIds.NameEventId:
|
||||||
EdidNameFeedback.FireUpdate();
|
EdidNameFeedback.FireUpdate();
|
||||||
}
|
break;
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.PreferredTimingEventId)
|
case ConnectedDeviceEventIds.PreferredTimingEventId:
|
||||||
{
|
EdidPreferredTimingFeedback.FireUpdate();
|
||||||
EdidPreferredTimingFeedback.FireUpdate();
|
break;
|
||||||
}
|
case ConnectedDeviceEventIds.SerialNumberEventId:
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.SerialNumberEventId)
|
EdidSerialNumberFeedback.FireUpdate();
|
||||||
{
|
break;
|
||||||
EdidSerialNumberFeedback.FireUpdate();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CustomActivate()
|
|
||||||
{
|
|
||||||
// Base does register and sets up comm monitoring.
|
|
||||||
return base.CustomActivate();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
@@ -103,20 +89,20 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
|
|
||||||
#region IIROutputPorts Members
|
#region IIROutputPorts Members
|
||||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return Rmc.IROutputPorts; } }
|
public CrestronCollection<IROutputPort> IROutputPorts { get { return _rmc.IROutputPorts; } }
|
||||||
public int NumberOfIROutputPorts { get { return Rmc.NumberOfIROutputPorts; } }
|
public int NumberOfIROutputPorts { get { return _rmc.NumberOfIROutputPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IComPorts Members
|
#region IComPorts Members
|
||||||
public CrestronCollection<ComPort> ComPorts { get { return Rmc.ComPorts; } }
|
public CrestronCollection<ComPort> ComPorts { get { return _rmc.ComPorts; } }
|
||||||
public int NumberOfComPorts { get { return Rmc.NumberOfComPorts; } }
|
public int NumberOfComPorts { get { return _rmc.NumberOfComPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ICec Members
|
#region ICec Members
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the CEC stream directly from the HDMI port.
|
/// Gets the CEC stream directly from the HDMI port.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Cec StreamCec { get { return Rmc.HdmiOutput.StreamCec; } }
|
public Cec StreamCec { get { return _rmc.HdmiOutput.StreamCec; } }
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,4 @@
|
|||||||
using System;
|
using Crestron.SimplSharpPro;
|
||||||
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;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||||
@@ -21,20 +16,14 @@ namespace PepperDash.Essentials.DM
|
|||||||
public class DmRmcScalerSController : DmRmcControllerBase, IRoutingInputsOutputs,
|
public class DmRmcScalerSController : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||||
IIROutputPorts, IComPorts, ICec
|
IIROutputPorts, IComPorts, ICec
|
||||||
{
|
{
|
||||||
public DmRmcScalerS Rmc { get; private set; }
|
private readonly DmRmcScalerS _rmc;
|
||||||
|
|
||||||
public RoutingInputPort DmIn { get; private set; }
|
public RoutingInputPort DmIn { get; private set; }
|
||||||
public RoutingOutputPort HdmiOut { get; private set; }
|
public RoutingOutputPort HdmiOut { get; private set; }
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts
|
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingInputPort> { DmIn }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingOutputPort> { HdmiOut }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Make a Crestron RMC and put it in here
|
/// Make a Crestron RMC and put it in here
|
||||||
@@ -42,24 +31,27 @@ namespace PepperDash.Essentials.DM
|
|||||||
public DmRmcScalerSController(string key, string name, DmRmcScalerS rmc)
|
public DmRmcScalerSController(string key, string name, DmRmcScalerS rmc)
|
||||||
: base(key, name, rmc)
|
: base(key, name, rmc)
|
||||||
{
|
{
|
||||||
Rmc = rmc;
|
_rmc = rmc;
|
||||||
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.DmCat, 0, this);
|
eRoutingPortConnectionType.DmCat, 0, this);
|
||||||
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
eRoutingPortConnectionType.Hdmi, null, this);
|
||||||
|
|
||||||
EdidManufacturerFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
EdidManufacturerFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
||||||
EdidNameFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
EdidNameFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
||||||
EdidPreferredTimingFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
EdidPreferredTimingFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
||||||
EdidSerialNumberFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
EdidSerialNumberFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
||||||
|
|
||||||
VideoOutputResolutionFeedback = new StringFeedback(() => Rmc.HdmiOutput.GetVideoResolutionString());
|
VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString());
|
||||||
|
|
||||||
Rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
_rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
||||||
Rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
_rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
||||||
|
|
||||||
|
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
||||||
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut};
|
||||||
|
|
||||||
// Set Ports for CEC
|
// Set Ports for CEC
|
||||||
HdmiOut.Port = Rmc.HdmiOutput;
|
HdmiOut.Port = _rmc.HdmiOutput;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
|
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
|
||||||
@@ -73,28 +65,21 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
||||||
{
|
{
|
||||||
if (args.EventId == ConnectedDeviceEventIds.ManufacturerEventId)
|
switch (args.EventId)
|
||||||
{
|
{
|
||||||
EdidManufacturerFeedback.FireUpdate();
|
case ConnectedDeviceEventIds.ManufacturerEventId:
|
||||||
|
EdidManufacturerFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
case ConnectedDeviceEventIds.NameEventId:
|
||||||
|
EdidNameFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
case ConnectedDeviceEventIds.PreferredTimingEventId:
|
||||||
|
EdidPreferredTimingFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
case ConnectedDeviceEventIds.SerialNumberEventId:
|
||||||
|
EdidSerialNumberFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.NameEventId)
|
|
||||||
{
|
|
||||||
EdidNameFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.PreferredTimingEventId)
|
|
||||||
{
|
|
||||||
EdidPreferredTimingFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
else if (args.EventId == ConnectedDeviceEventIds.SerialNumberEventId)
|
|
||||||
{
|
|
||||||
EdidSerialNumberFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool CustomActivate()
|
|
||||||
{
|
|
||||||
// Base does register and sets up comm monitoring.
|
|
||||||
return base.CustomActivate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
@@ -103,20 +88,20 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
|
|
||||||
#region IIROutputPorts Members
|
#region IIROutputPorts Members
|
||||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return Rmc.IROutputPorts; } }
|
public CrestronCollection<IROutputPort> IROutputPorts { get { return _rmc.IROutputPorts; } }
|
||||||
public int NumberOfIROutputPorts { get { return Rmc.NumberOfIROutputPorts; } }
|
public int NumberOfIROutputPorts { get { return _rmc.NumberOfIROutputPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IComPorts Members
|
#region IComPorts Members
|
||||||
public CrestronCollection<ComPort> ComPorts { get { return Rmc.ComPorts; } }
|
public CrestronCollection<ComPort> ComPorts { get { return _rmc.ComPorts; } }
|
||||||
public int NumberOfComPorts { get { return Rmc.NumberOfComPorts; } }
|
public int NumberOfComPorts { get { return _rmc.NumberOfComPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ICec Members
|
#region ICec Members
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the CEC stream directly from the HDMI port.
|
/// Gets the CEC stream directly from the HDMI port.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Cec StreamCec { get { return Rmc.HdmiOutput.StreamCec; } }
|
public Cec StreamCec { get { return _rmc.HdmiOutput.StreamCec; } }
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,6 @@
|
|||||||
using System;
|
using Crestron.SimplSharpPro;
|
||||||
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;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
||||||
|
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
@@ -21,20 +15,14 @@ namespace PepperDash.Essentials.DM
|
|||||||
public class DmRmcX100CController : DmRmcControllerBase, IRoutingInputsOutputs,
|
public class DmRmcX100CController : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||||
IIROutputPorts, IComPorts, ICec
|
IIROutputPorts, IComPorts, ICec
|
||||||
{
|
{
|
||||||
public DmRmc100C Rmc { get; protected set; }
|
private readonly DmRmc100C _rmc;
|
||||||
|
|
||||||
public RoutingInputPort DmIn { get; protected set; }
|
public RoutingInputPort DmIn { get; protected set; }
|
||||||
public RoutingOutputPort HdmiOut { get; protected set; }
|
public RoutingOutputPort HdmiOut { get; protected set; }
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts
|
public RoutingPortCollection<RoutingInputPort> InputPorts { get; protected set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingInputPort> { DmIn }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; protected set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingOutputPort> { HdmiOut }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Make a Crestron RMC and put it in here
|
/// Make a Crestron RMC and put it in here
|
||||||
@@ -42,20 +30,14 @@ namespace PepperDash.Essentials.DM
|
|||||||
public DmRmcX100CController(string key, string name, DmRmc100C rmc)
|
public DmRmcX100CController(string key, string name, DmRmc100C rmc)
|
||||||
: base(key, name, rmc)
|
: base(key, name, rmc)
|
||||||
{
|
{
|
||||||
Rmc = rmc;
|
_rmc = rmc;
|
||||||
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.DmCat, 0, this);
|
eRoutingPortConnectionType.DmCat, 0, this);
|
||||||
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
eRoutingPortConnectionType.Hdmi, null, this) {Port = _rmc};
|
||||||
|
|
||||||
// Set Ports for CEC
|
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
||||||
HdmiOut.Port = Rmc; // Unique case, this class has no HdmiOutput port and ICec is implemented on the receiver class itself
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut};
|
||||||
}
|
|
||||||
|
|
||||||
public override bool CustomActivate()
|
|
||||||
{
|
|
||||||
// Base does register and sets up comm monitoring.
|
|
||||||
return base.CustomActivate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
@@ -64,17 +46,17 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
|
|
||||||
#region IIROutputPorts Members
|
#region IIROutputPorts Members
|
||||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return Rmc.IROutputPorts; } }
|
public CrestronCollection<IROutputPort> IROutputPorts { get { return _rmc.IROutputPorts; } }
|
||||||
public int NumberOfIROutputPorts { get { return Rmc.NumberOfIROutputPorts; } }
|
public int NumberOfIROutputPorts { get { return _rmc.NumberOfIROutputPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IComPorts Members
|
#region IComPorts Members
|
||||||
public CrestronCollection<ComPort> ComPorts { get { return Rmc.ComPorts; } }
|
public CrestronCollection<ComPort> ComPorts { get { return _rmc.ComPorts; } }
|
||||||
public int NumberOfComPorts { get { return Rmc.NumberOfComPorts; } }
|
public int NumberOfComPorts { get { return _rmc.NumberOfComPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ICec Members
|
#region ICec Members
|
||||||
public Cec StreamCec { get { return Rmc.StreamCec; } }
|
public Cec StreamCec { get { return _rmc.StreamCec; } }
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
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;
|
using Crestron.SimplSharpPro.DM;
|
||||||
@@ -12,7 +8,6 @@ using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
|
|||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
using PepperDash.Essentials.Core.Bridges;
|
||||||
using PepperDash.Essentials.DM.Config;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.DM
|
namespace PepperDash.Essentials.DM
|
||||||
{
|
{
|
||||||
@@ -20,8 +15,9 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Controller class for all DM-TX-201C/S/F transmitters
|
/// Controller class for all DM-TX-201C/S/F transmitters
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DmTx200Controller : DmTxControllerBase, ITxRouting, IHasFeedback, IHasFreeRun, IVgaBrightnessContrastControls
|
[Description("Wrapper class for DM-TX-200-C Endpoint")]
|
||||||
|
public class DmTx200Controller : DmTxControllerBase, ITxRouting, IHasFreeRun, IVgaBrightnessContrastControls
|
||||||
{
|
{
|
||||||
public DmTx200C2G Tx { get; private set; }
|
public DmTx200C2G Tx { get; private set; }
|
||||||
|
|
||||||
@@ -33,6 +29,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
public IntFeedback VideoSourceNumericFeedback { get; protected set; }
|
public IntFeedback VideoSourceNumericFeedback { get; protected set; }
|
||||||
public IntFeedback AudioSourceNumericFeedback { get; protected set; }
|
public IntFeedback AudioSourceNumericFeedback { get; protected set; }
|
||||||
public IntFeedback HdmiInHdcpCapabilityFeedback { get; protected set; }
|
public IntFeedback HdmiInHdcpCapabilityFeedback { get; protected set; }
|
||||||
|
public BoolFeedback HdmiVideoSyncFeedback { get; protected set; }
|
||||||
|
public BoolFeedback VgaVideoSyncFeedback { get; protected set; }
|
||||||
|
|
||||||
public BoolFeedback FreeRunEnabledFeedback { get; protected set; }
|
public BoolFeedback FreeRunEnabledFeedback { get; protected set; }
|
||||||
|
|
||||||
@@ -50,15 +48,10 @@ namespace PepperDash.Essentials.DM
|
|||||||
Tx.VideoSourceFeedback == DmTx200Base.eSourceSelection.Analog ||
|
Tx.VideoSourceFeedback == DmTx200Base.eSourceSelection.Analog ||
|
||||||
Tx.VideoSourceFeedback == DmTx200Base.eSourceSelection.Disable)
|
Tx.VideoSourceFeedback == DmTx200Base.eSourceSelection.Disable)
|
||||||
return Tx.VideoSourceFeedback;
|
return Tx.VideoSourceFeedback;
|
||||||
else // auto
|
if (Tx.HdmiInput.SyncDetectedFeedback.BoolValue)
|
||||||
{
|
return DmTx200Base.eSourceSelection.Digital;
|
||||||
if (Tx.HdmiInput.SyncDetectedFeedback.BoolValue)
|
|
||||||
return DmTx200Base.eSourceSelection.Digital;
|
return Tx.VgaInput.SyncDetectedFeedback.BoolValue ? DmTx200Base.eSourceSelection.Analog : DmTx200Base.eSourceSelection.Disable;
|
||||||
else if (Tx.VgaInput.SyncDetectedFeedback.BoolValue)
|
|
||||||
return DmTx200Base.eSourceSelection.Analog;
|
|
||||||
else
|
|
||||||
return DmTx200Base.eSourceSelection.Disable;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,35 +97,28 @@ namespace PepperDash.Essentials.DM
|
|||||||
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
|
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
|
||||||
() => ActualActiveVideoInput.ToString());
|
() => ActualActiveVideoInput.ToString());
|
||||||
|
|
||||||
Tx.HdmiInput.InputStreamChange += new EndpointInputStreamChangeEventHandler(InputStreamChangeEvent);
|
Tx.HdmiInput.InputStreamChange += InputStreamChangeEvent;
|
||||||
|
Tx.VgaInput.InputStreamChange += VgaInputOnInputStreamChange;
|
||||||
Tx.BaseEvent += Tx_BaseEvent;
|
Tx.BaseEvent += Tx_BaseEvent;
|
||||||
Tx.OnlineStatusChange += new OnlineStatusChangeEventHandler(Tx_OnlineStatusChange);
|
Tx.OnlineStatusChange += Tx_OnlineStatusChange;
|
||||||
|
|
||||||
VideoSourceNumericFeedback = new IntFeedback(() =>
|
VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback);
|
||||||
{
|
AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.AudioSourceFeedback);
|
||||||
return (int)Tx.VideoSourceFeedback;
|
|
||||||
});
|
|
||||||
AudioSourceNumericFeedback = new IntFeedback(() =>
|
|
||||||
{
|
|
||||||
return (int)Tx.AudioSourceFeedback;
|
|
||||||
});
|
|
||||||
|
|
||||||
HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () =>
|
HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () => tx.HdmiInput.HdcpSupportOnFeedback.BoolValue ? 1 : 0);
|
||||||
{
|
|
||||||
if (tx.HdmiInput.HdcpSupportOnFeedback.BoolValue)
|
|
||||||
return 1;
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
});
|
|
||||||
|
|
||||||
HdcpSupportCapability = eHdcpCapabilityType.HdcpAutoSupport;
|
HdcpSupportCapability = eHdcpCapabilityType.HdcpAutoSupport;
|
||||||
|
|
||||||
|
HdmiVideoSyncFeedback = new BoolFeedback(() => tx.HdmiInput.SyncDetectedFeedback.BoolValue);
|
||||||
|
|
||||||
|
VgaVideoSyncFeedback = new BoolFeedback(() => tx.VgaInput.SyncDetectedFeedback.BoolValue);
|
||||||
|
|
||||||
FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled);
|
FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled);
|
||||||
|
|
||||||
VgaBrightnessFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.BrightnessFeedback.UShortValue);
|
VgaBrightnessFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.BrightnessFeedback.UShortValue);
|
||||||
VgaContrastFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.ContrastFeedback.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
|
var combinedFuncs = new VideoStatusFuncsWrapper
|
||||||
@@ -141,20 +127,13 @@ namespace PepperDash.Essentials.DM
|
|||||||
(ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital
|
(ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital
|
||||||
&& tx.HdmiInput.VideoAttributes.HdcpActiveFeedback.BoolValue),
|
&& tx.HdmiInput.VideoAttributes.HdcpActiveFeedback.BoolValue),
|
||||||
|
|
||||||
HdcpStateFeedbackFunc = () =>
|
HdcpStateFeedbackFunc = () => ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital ? tx.HdmiInput.VideoAttributes.HdcpStateFeedback.ToString() : "",
|
||||||
{
|
|
||||||
if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital)
|
|
||||||
return tx.HdmiInput.VideoAttributes.HdcpStateFeedback.ToString();
|
|
||||||
return "";
|
|
||||||
},
|
|
||||||
|
|
||||||
VideoResolutionFeedbackFunc = () =>
|
VideoResolutionFeedbackFunc = () =>
|
||||||
{
|
{
|
||||||
if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital)
|
if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital)
|
||||||
return tx.HdmiInput.VideoAttributes.GetVideoResolutionString();
|
return tx.HdmiInput.VideoAttributes.GetVideoResolutionString();
|
||||||
if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Analog)
|
return ActualActiveVideoInput == DmTx200Base.eSourceSelection.Analog ? tx.VgaInput.VideoAttributes.GetVideoResolutionString() : "";
|
||||||
return tx.VgaInput.VideoAttributes.GetVideoResolutionString();
|
|
||||||
return "";
|
|
||||||
},
|
},
|
||||||
VideoSyncFeedbackFunc = () =>
|
VideoSyncFeedbackFunc = () =>
|
||||||
(ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital
|
(ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital
|
||||||
@@ -167,14 +146,16 @@ namespace PepperDash.Essentials.DM
|
|||||||
};
|
};
|
||||||
|
|
||||||
AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn,
|
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,
|
AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,
|
||||||
AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback,
|
AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback,
|
||||||
AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback,
|
AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback,
|
||||||
AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiInHdcpCapabilityFeedback);
|
AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiInHdcpCapabilityFeedback, HdmiVideoSyncFeedback,
|
||||||
|
VgaVideoSyncFeedback);
|
||||||
|
|
||||||
// Set Ports for CEC
|
// Set Ports for CEC
|
||||||
HdmiInput.Port = Tx.HdmiInput;
|
HdmiInput.Port = Tx.HdmiInput;
|
||||||
@@ -182,18 +163,32 @@ namespace PepperDash.Essentials.DM
|
|||||||
DmOutput.Port = Tx.DmOutput;
|
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;
|
var id = args.EventId;
|
||||||
Debug.Console(2, this, "EventId {0}", args.EventId);
|
Debug.Console(2, this, "EventId {0}", args.EventId);
|
||||||
|
|
||||||
if (id == VideoControlsEventIds.BrightnessFeedbackEventId)
|
switch (id)
|
||||||
{
|
{
|
||||||
VgaBrightnessFeedback.FireUpdate();
|
case VideoControlsEventIds.BrightnessFeedbackEventId:
|
||||||
}
|
VgaBrightnessFeedback.FireUpdate();
|
||||||
else if (id == VideoControlsEventIds.ContrastFeedbackEventId)
|
break;
|
||||||
{
|
case VideoControlsEventIds.ContrastFeedbackEventId:
|
||||||
VgaContrastFeedback.FireUpdate();
|
VgaContrastFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -220,7 +215,18 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
LinkDmTxToApi(this, trilist, joinStart, joinMapKey, bridge);
|
var joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||||
|
|
||||||
|
if (HdmiVideoSyncFeedback != null)
|
||||||
|
{
|
||||||
|
HdmiVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]);
|
||||||
|
}
|
||||||
|
if (VgaVideoSyncFeedback != null)
|
||||||
|
{
|
||||||
|
VgaVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]);
|
||||||
|
}
|
||||||
|
|
||||||
|
LinkDmTxToApi(this, trilist, joinMap, bridge);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -229,14 +235,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// <param name="enable"></param>
|
/// <param name="enable"></param>
|
||||||
public void SetFreeRunEnabled(bool enable)
|
public void SetFreeRunEnabled(bool enable)
|
||||||
{
|
{
|
||||||
if (enable)
|
Tx.VgaInput.FreeRun = enable ? eDmFreeRunSetting.Enabled : eDmFreeRunSetting.Disabled;
|
||||||
{
|
|
||||||
Tx.VgaInput.FreeRun = eDmFreeRunSetting.Enabled;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Tx.VgaInput.FreeRun = eDmFreeRunSetting.Disabled;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -299,32 +298,35 @@ namespace PepperDash.Essentials.DM
|
|||||||
var id = args.EventId;
|
var id = args.EventId;
|
||||||
Debug.Console(2, this, "EventId {0}", 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);
|
case EndpointTransmitterBase.VideoSourceFeedbackEventId:
|
||||||
VideoSourceNumericFeedback.FireUpdate();
|
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
||||||
ActiveVideoInputFeedback.FireUpdate();
|
VideoSourceNumericFeedback.FireUpdate();
|
||||||
}
|
ActiveVideoInputFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
// ------------------------------ incomplete -----------------------------------------
|
case EndpointTransmitterBase.AudioSourceFeedbackEventId:
|
||||||
else if (id == EndpointTransmitterBase.AudioSourceFeedbackEventId)
|
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
||||||
{
|
AudioSourceNumericFeedback.FireUpdate();
|
||||||
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
break;
|
||||||
AudioSourceNumericFeedback.FireUpdate();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
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();
|
case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId:
|
||||||
}
|
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
||||||
else if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId)
|
break;
|
||||||
{
|
case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId:
|
||||||
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||||
|
HdmiVideoSyncFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -333,11 +335,12 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||||
{
|
{
|
||||||
if (eventId == EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
||||||
{
|
{
|
||||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
return;
|
||||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
|
||||||
}
|
}
|
||||||
|
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||||
|
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,29 +1,23 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using Crestron.SimplSharpPro;
|
||||||
using System.Linq;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using System.Text;
|
using Crestron.SimplSharpPro.DM;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
|
||||||
using Crestron.SimplSharpPro.DM;
|
using PepperDash.Core;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
using PepperDash.Essentials.Core;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
|
|
||||||
|
|
||||||
using PepperDash.Core;
|
|
||||||
using PepperDash.Essentials.Core;
|
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
using PepperDash.Essentials.Core.Bridges;
|
||||||
using PepperDash.Essentials.DM.Config;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.DM
|
namespace PepperDash.Essentials.DM
|
||||||
{
|
{
|
||||||
// using eVst = Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Controller class for all DM-TX-201C/S/F transmitters
|
/// Controller class for all DM-TX-201C/S/F transmitters
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DmTx201XController : DmTxControllerBase, ITxRouting, IHasFeedback, IHasFreeRun, IVgaBrightnessContrastControls
|
[Description("Wrapper class for DM-TX-201-C Endpoint")]
|
||||||
|
public class DmTx201CController : DmTxControllerBase, ITxRouting, IHasFreeRun, IVgaBrightnessContrastControls
|
||||||
{
|
{
|
||||||
public DmTx201S 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 HdmiInput { get; private set; }
|
||||||
public RoutingInputPortWithVideoStatuses VgaInput { get; private set; }
|
public RoutingInputPortWithVideoStatuses VgaInput { get; private set; }
|
||||||
@@ -34,6 +28,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
public IntFeedback VideoSourceNumericFeedback { get; protected set; }
|
public IntFeedback VideoSourceNumericFeedback { get; protected set; }
|
||||||
public IntFeedback AudioSourceNumericFeedback { get; protected set; }
|
public IntFeedback AudioSourceNumericFeedback { get; protected set; }
|
||||||
public IntFeedback HdmiInHdcpCapabilityFeedback { get; protected set; }
|
public IntFeedback HdmiInHdcpCapabilityFeedback { get; protected set; }
|
||||||
|
public BoolFeedback HdmiVideoSyncFeedback { get; protected set; }
|
||||||
|
public BoolFeedback VgaVideoSyncFeedback { get; protected set; }
|
||||||
|
|
||||||
public BoolFeedback FreeRunEnabledFeedback { get; protected set; }
|
public BoolFeedback FreeRunEnabledFeedback { get; protected set; }
|
||||||
|
|
||||||
@@ -90,7 +86,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// <param name="key"></param>
|
/// <param name="key"></param>
|
||||||
/// <param name="name"></param>
|
/// <param name="name"></param>
|
||||||
/// <param name="tx"></param>
|
/// <param name="tx"></param>
|
||||||
public DmTx201XController(string key, string name, DmTx201S tx)
|
public DmTx201CController(string key, string name, DmTx201C tx)
|
||||||
: base(key, name, tx)
|
: base(key, name, tx)
|
||||||
{
|
{
|
||||||
Tx = tx;
|
Tx = tx;
|
||||||
@@ -105,33 +101,29 @@ namespace PepperDash.Essentials.DM
|
|||||||
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
|
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
|
||||||
() => ActualActiveVideoInput.ToString());
|
() => ActualActiveVideoInput.ToString());
|
||||||
|
|
||||||
Tx.HdmiInput.InputStreamChange += new EndpointInputStreamChangeEventHandler(InputStreamChangeEvent);
|
Tx.HdmiInput.InputStreamChange += InputStreamChangeEvent;
|
||||||
|
Tx.VgaInput.InputStreamChange += VgaInputOnInputStreamChange;
|
||||||
Tx.BaseEvent += Tx_BaseEvent;
|
Tx.BaseEvent += Tx_BaseEvent;
|
||||||
Tx.OnlineStatusChange += new OnlineStatusChangeEventHandler(Tx_OnlineStatusChange);
|
Tx.OnlineStatusChange += new OnlineStatusChangeEventHandler(Tx_OnlineStatusChange);
|
||||||
|
|
||||||
VideoSourceNumericFeedback = new IntFeedback(() =>
|
VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback);
|
||||||
{
|
|
||||||
return (int)Tx.VideoSourceFeedback;
|
|
||||||
});
|
|
||||||
AudioSourceNumericFeedback = new IntFeedback(() =>
|
|
||||||
{
|
|
||||||
return (int)Tx.AudioSourceFeedback;
|
|
||||||
});
|
|
||||||
|
|
||||||
HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () =>
|
AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.AudioSourceFeedback);
|
||||||
{
|
|
||||||
if (tx.HdmiInput.HdcpSupportOnFeedback.BoolValue)
|
HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () =>
|
||||||
return 1;
|
(tx.HdmiInput.HdcpSupportOnFeedback.BoolValue ? 1 : 0));
|
||||||
else
|
|
||||||
return 0;
|
HdmiVideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInput.SyncDetectedFeedback.BoolValue);
|
||||||
});
|
|
||||||
|
VgaVideoSyncFeedback = new BoolFeedback(() => (bool)tx.VgaInput.SyncDetectedFeedback.BoolValue);
|
||||||
|
|
||||||
FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled);
|
FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled);
|
||||||
|
|
||||||
VgaBrightnessFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.BrightnessFeedback.UShortValue);
|
VgaBrightnessFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.BrightnessFeedback.UShortValue);
|
||||||
|
|
||||||
VgaContrastFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.ContrastFeedback.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;
|
HdcpSupportCapability = eHdcpCapabilityType.HdcpAutoSupport;
|
||||||
|
|
||||||
@@ -140,22 +132,18 @@ namespace PepperDash.Essentials.DM
|
|||||||
HdcpActiveFeedbackFunc = () =>
|
HdcpActiveFeedbackFunc = () =>
|
||||||
(ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital
|
(ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital
|
||||||
&& tx.HdmiInput.VideoAttributes.HdcpActiveFeedback.BoolValue),
|
&& tx.HdmiInput.VideoAttributes.HdcpActiveFeedback.BoolValue),
|
||||||
|
|
||||||
HdcpStateFeedbackFunc = () =>
|
HdcpStateFeedbackFunc = () => ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital ?
|
||||||
{
|
tx.HdmiInput.VideoAttributes.HdcpStateFeedback.ToString() : "",
|
||||||
if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital)
|
|
||||||
return tx.HdmiInput.VideoAttributes.HdcpStateFeedback.ToString();
|
|
||||||
return "";
|
|
||||||
},
|
|
||||||
|
|
||||||
VideoResolutionFeedbackFunc = () =>
|
VideoResolutionFeedbackFunc = () =>
|
||||||
{
|
{
|
||||||
if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital)
|
if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital)
|
||||||
return tx.HdmiInput.VideoAttributes.GetVideoResolutionString();
|
return tx.HdmiInput.VideoAttributes.GetVideoResolutionString();
|
||||||
if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Analog)
|
return ActualActiveVideoInput == DmTx200Base.eSourceSelection.Analog ?
|
||||||
return tx.VgaInput.VideoAttributes.GetVideoResolutionString();
|
tx.VgaInput.VideoAttributes.GetVideoResolutionString() : "";
|
||||||
return "";
|
|
||||||
},
|
},
|
||||||
|
|
||||||
VideoSyncFeedbackFunc = () =>
|
VideoSyncFeedbackFunc = () =>
|
||||||
(ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital
|
(ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital
|
||||||
&& tx.HdmiInput.SyncDetectedFeedback.BoolValue)
|
&& tx.HdmiInput.SyncDetectedFeedback.BoolValue)
|
||||||
@@ -176,7 +164,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,
|
AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,
|
||||||
AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback,
|
AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback,
|
||||||
AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback,
|
AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback,
|
||||||
AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiInHdcpCapabilityFeedback);
|
AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiInHdcpCapabilityFeedback, HdmiVideoSyncFeedback,
|
||||||
|
VgaVideoSyncFeedback);
|
||||||
|
|
||||||
// Set Ports for CEC
|
// Set Ports for CEC
|
||||||
HdmiInput.Port = Tx.HdmiInput;
|
HdmiInput.Port = Tx.HdmiInput;
|
||||||
@@ -188,15 +177,16 @@ namespace PepperDash.Essentials.DM
|
|||||||
void VideoControls_ControlChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args)
|
void VideoControls_ControlChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args)
|
||||||
{
|
{
|
||||||
var id = args.EventId;
|
var id = args.EventId;
|
||||||
Debug.Console(2, this, "EventId {0}", args.EventId);
|
Debug.Console(2, this, "EventId {0}", args.EventId);
|
||||||
|
|
||||||
if (id == VideoControlsEventIds.BrightnessFeedbackEventId)
|
switch (id)
|
||||||
{
|
{
|
||||||
VgaBrightnessFeedback.FireUpdate();
|
case VideoControlsEventIds.BrightnessFeedbackEventId:
|
||||||
}
|
VgaBrightnessFeedback.FireUpdate();
|
||||||
else if (id == VideoControlsEventIds.ContrastFeedbackEventId)
|
break;
|
||||||
{
|
case VideoControlsEventIds.ContrastFeedbackEventId:
|
||||||
VgaContrastFeedback.FireUpdate();
|
VgaContrastFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -206,6 +196,19 @@ namespace PepperDash.Essentials.DM
|
|||||||
VideoSourceNumericFeedback.FireUpdate();
|
VideoSourceNumericFeedback.FireUpdate();
|
||||||
AudioSourceNumericFeedback.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()
|
public override bool CustomActivate()
|
||||||
@@ -222,7 +225,18 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
LinkDmTxToApi(this, trilist, joinStart, joinMapKey, bridge);
|
var joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||||
|
|
||||||
|
if (HdmiVideoSyncFeedback != null)
|
||||||
|
{
|
||||||
|
HdmiVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]);
|
||||||
|
}
|
||||||
|
if (VgaVideoSyncFeedback != null)
|
||||||
|
{
|
||||||
|
VgaVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]);
|
||||||
|
}
|
||||||
|
|
||||||
|
LinkDmTxToApi(this, trilist, joinMap, bridge);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -230,15 +244,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="enable"></param>
|
/// <param name="enable"></param>
|
||||||
public void SetFreeRunEnabled(bool enable)
|
public void SetFreeRunEnabled(bool enable)
|
||||||
{
|
{
|
||||||
if (enable)
|
Tx.VgaInput.FreeRun = enable ? eDmFreeRunSetting.Enabled : eDmFreeRunSetting.Disabled;
|
||||||
{
|
|
||||||
Tx.VgaInput.FreeRun = eDmFreeRunSetting.Enabled;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Tx.VgaInput.FreeRun = eDmFreeRunSetting.Disabled;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -305,40 +312,40 @@ namespace PepperDash.Essentials.DM
|
|||||||
void Tx_BaseEvent(GenericBase device, BaseEventArgs args)
|
void Tx_BaseEvent(GenericBase device, BaseEventArgs args)
|
||||||
{
|
{
|
||||||
var id = args.EventId;
|
var id = args.EventId;
|
||||||
Debug.Console(2, this, "EventId {0}", 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);
|
case EndpointTransmitterBase.VideoSourceFeedbackEventId:
|
||||||
VideoSourceNumericFeedback.FireUpdate();
|
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
||||||
ActiveVideoInputFeedback.FireUpdate();
|
ActiveVideoInputFeedback.FireUpdate();
|
||||||
}
|
VideoSourceNumericFeedback.FireUpdate();
|
||||||
|
ActiveVideoInputFeedback.FireUpdate();
|
||||||
// ------------------------------ incomplete -----------------------------------------
|
break;
|
||||||
else if (id == EndpointTransmitterBase.AudioSourceFeedbackEventId)
|
case EndpointTransmitterBase.AudioSourceFeedbackEventId:
|
||||||
{
|
Debug.Console(2, this, " Audio Source : {0}", Tx.AudioSourceFeedback);
|
||||||
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
AudioSourceNumericFeedback.FireUpdate();
|
||||||
AudioSourceNumericFeedback.FireUpdate();
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
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>
|
/// <summary>
|
||||||
@@ -346,11 +353,12 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||||
{
|
{
|
||||||
if (eventId == EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
||||||
{
|
{
|
||||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
return;
|
||||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
}
|
||||||
}
|
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||||
|
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -0,0 +1,395 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.DM
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Controller class for all DM-TX-201S/F transmitters
|
||||||
|
/// </summary>
|
||||||
|
[Description("Wrapper class for DM-TX-201-S/F Endpoint")]
|
||||||
|
public class DmTx201SController : DmTxControllerBase, ITxRouting, IHasFreeRun, IVgaBrightnessContrastControls
|
||||||
|
{
|
||||||
|
public DmTx201S Tx { get; private set; }
|
||||||
|
|
||||||
|
public RoutingInputPortWithVideoStatuses HdmiInput { get; private set; }
|
||||||
|
public RoutingInputPortWithVideoStatuses VgaInput { get; private set; }
|
||||||
|
public RoutingOutputPort DmOutput { 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 HdmiInHdcpCapabilityFeedback { get; protected set; }
|
||||||
|
public BoolFeedback HdmiVideoSyncFeedback { get; protected set; }
|
||||||
|
public BoolFeedback VgaVideoSyncFeedback { get; protected set; }
|
||||||
|
|
||||||
|
public BoolFeedback FreeRunEnabledFeedback { get; protected set; }
|
||||||
|
|
||||||
|
public IntFeedback VgaBrightnessFeedback { get; protected set; }
|
||||||
|
public IntFeedback VgaContrastFeedback { get; protected set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Helps get the "real" inputs, including when in Auto
|
||||||
|
/// </summary>
|
||||||
|
public DmTx200Base.eSourceSelection ActualActiveVideoInput
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (Tx.VideoSourceFeedback == DmTx200Base.eSourceSelection.Digital ||
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public RoutingPortCollection<RoutingInputPort> InputPorts
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return new RoutingPortCollection<RoutingInputPort>
|
||||||
|
{
|
||||||
|
HdmiInput,
|
||||||
|
VgaInput,
|
||||||
|
AnyVideoInput
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return new RoutingPortCollection<RoutingOutputPort> { DmOutput, HdmiLoopOut };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="key"></param>
|
||||||
|
/// <param name="name"></param>
|
||||||
|
/// <param name="tx"></param>
|
||||||
|
public DmTx201SController(string key, string name, DmTx201S tx)
|
||||||
|
: base(key, name, tx)
|
||||||
|
{
|
||||||
|
Tx = tx;
|
||||||
|
|
||||||
|
HdmiInput = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn,
|
||||||
|
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, DmTx200Base.eSourceSelection.Digital, this,
|
||||||
|
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInput));
|
||||||
|
VgaInput = new RoutingInputPortWithVideoStatuses(DmPortName.VgaIn,
|
||||||
|
eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, DmTx200Base.eSourceSelection.Analog, this,
|
||||||
|
VideoStatusHelper.GetVgaInputStatusFuncs(tx.VgaInput));
|
||||||
|
|
||||||
|
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
|
||||||
|
() => ActualActiveVideoInput.ToString());
|
||||||
|
|
||||||
|
Tx.HdmiInput.InputStreamChange += InputStreamChangeEvent;
|
||||||
|
Tx.VgaInput.InputStreamChange += VgaInputOnInputStreamChange;
|
||||||
|
Tx.BaseEvent += Tx_BaseEvent;
|
||||||
|
Tx.OnlineStatusChange += new OnlineStatusChangeEventHandler(Tx_OnlineStatusChange);
|
||||||
|
|
||||||
|
VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback);
|
||||||
|
|
||||||
|
AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.AudioSourceFeedback);
|
||||||
|
|
||||||
|
HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () =>
|
||||||
|
(tx.HdmiInput.HdcpSupportOnFeedback.BoolValue ? 1 : 0));
|
||||||
|
|
||||||
|
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 += VideoControls_ControlChange;
|
||||||
|
|
||||||
|
HdcpSupportCapability = eHdcpCapabilityType.HdcpAutoSupport;
|
||||||
|
|
||||||
|
var combinedFuncs = new VideoStatusFuncsWrapper
|
||||||
|
{
|
||||||
|
HdcpActiveFeedbackFunc = () =>
|
||||||
|
(ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital
|
||||||
|
&& tx.HdmiInput.VideoAttributes.HdcpActiveFeedback.BoolValue),
|
||||||
|
|
||||||
|
HdcpStateFeedbackFunc = () => ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital ?
|
||||||
|
tx.HdmiInput.VideoAttributes.HdcpStateFeedback.ToString() : "",
|
||||||
|
|
||||||
|
VideoResolutionFeedbackFunc = () =>
|
||||||
|
{
|
||||||
|
if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital)
|
||||||
|
return tx.HdmiInput.VideoAttributes.GetVideoResolutionString();
|
||||||
|
return ActualActiveVideoInput == DmTx200Base.eSourceSelection.Analog ?
|
||||||
|
tx.VgaInput.VideoAttributes.GetVideoResolutionString() : "";
|
||||||
|
},
|
||||||
|
|
||||||
|
VideoSyncFeedbackFunc = () =>
|
||||||
|
(ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital
|
||||||
|
&& tx.HdmiInput.SyncDetectedFeedback.BoolValue)
|
||||||
|
|| (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Analog
|
||||||
|
&& tx.VgaInput.SyncDetectedFeedback.BoolValue)
|
||||||
|
|| (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Auto
|
||||||
|
&& (tx.VgaInput.SyncDetectedFeedback.BoolValue || tx.HdmiInput.SyncDetectedFeedback.BoolValue))
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn,
|
||||||
|
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
|
||||||
|
|
||||||
|
DmOutput = 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, HdmiInHdcpCapabilityFeedback, HdmiVideoSyncFeedback,
|
||||||
|
VgaVideoSyncFeedback);
|
||||||
|
|
||||||
|
// Set Ports for CEC
|
||||||
|
HdmiInput.Port = Tx.HdmiInput;
|
||||||
|
VgaInput.Port = Tx.VgaInput;
|
||||||
|
HdmiLoopOut.Port = Tx.HdmiOutput;
|
||||||
|
DmOutput.Port = Tx.DmOutput;
|
||||||
|
}
|
||||||
|
|
||||||
|
void VideoControls_ControlChange(object sender, Crestron.SimplSharpPro.DeviceSupport.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_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args)
|
||||||
|
{
|
||||||
|
ActiveVideoInputFeedback.FireUpdate();
|
||||||
|
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()
|
||||||
|
{
|
||||||
|
Tx.HdmiInput.InputStreamChange += (o, a) => FowardInputStreamChange(HdmiInput, a.EventId);
|
||||||
|
Tx.HdmiInput.VideoAttributes.AttributeChange += (o, a) => FireVideoAttributeChange(HdmiInput, a.EventId);
|
||||||
|
|
||||||
|
Tx.VgaInput.InputStreamChange += (o, a) => FowardInputStreamChange(VgaInput, a.EventId);
|
||||||
|
Tx.VgaInput.VideoAttributes.AttributeChange += (o, a) => FireVideoAttributeChange(VgaInput, 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 (HdmiVideoSyncFeedback != null)
|
||||||
|
{
|
||||||
|
HdmiVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]);
|
||||||
|
}
|
||||||
|
if (VgaVideoSyncFeedback != null)
|
||||||
|
{
|
||||||
|
VgaVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]);
|
||||||
|
}
|
||||||
|
|
||||||
|
LinkDmTxToApi(this, trilist, joinMap, bridge);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <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>
|
||||||
|
/// Switches the audio/video source based on the integer value (0-Auto, 1-HDMI, 2-VGA, 3-Disable)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <param name="output"></param>
|
||||||
|
/// <param name="type"></param>
|
||||||
|
public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type)
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
|
||||||
|
|
||||||
|
switch (input)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
{
|
||||||
|
ExecuteSwitch(DmTx200Base.eSourceSelection.Auto, null, type);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
ExecuteSwitch(HdmiInput.Selector, null, type);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
ExecuteSwitch(VgaInput.Selector, null, type);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 3:
|
||||||
|
{
|
||||||
|
ExecuteSwitch(DmTx200Base.eSourceSelection.Disable, null, type);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
||||||
|
{
|
||||||
|
if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
||||||
|
Tx.VideoSource = (DmTx200Base.eSourceSelection)inputSelector;
|
||||||
|
if ((signalType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
||||||
|
Tx.AudioSource = (DmTx200Base.eSourceSelection)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);
|
||||||
|
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}", 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <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 FireVideoAttributeChange(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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -19,12 +19,10 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
using eVst = DmTx401C.eSourceSelection;
|
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 DmTx401C Tx { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public RoutingInputPortWithVideoStatuses HdmiIn { get; private set; }
|
public RoutingInputPortWithVideoStatuses HdmiIn { get; private set; }
|
||||||
public RoutingInputPortWithVideoStatuses DisplayPortIn { get; private set; }
|
public RoutingInputPortWithVideoStatuses DisplayPortIn { get; private set; }
|
||||||
public RoutingInputPortWithVideoStatuses VgaIn { get; private set; }
|
public RoutingInputPortWithVideoStatuses VgaIn { get; private set; }
|
||||||
@@ -35,6 +33,9 @@ namespace PepperDash.Essentials.DM
|
|||||||
public IntFeedback VideoSourceNumericFeedback { get; protected set; }
|
public IntFeedback VideoSourceNumericFeedback { get; protected set; }
|
||||||
public IntFeedback AudioSourceNumericFeedback { get; protected set; }
|
public IntFeedback AudioSourceNumericFeedback { get; protected set; }
|
||||||
public IntFeedback HdmiInHdcpCapabilityFeedback { get; protected set; }
|
public IntFeedback HdmiInHdcpCapabilityFeedback { get; protected set; }
|
||||||
|
public BoolFeedback DisplayPortVideoSyncFeedback { get; protected set; }
|
||||||
|
public BoolFeedback HdmiVideoSyncFeedback { get; protected set; }
|
||||||
|
public BoolFeedback VgaVideoSyncFeedback { get; protected set; }
|
||||||
|
|
||||||
public BoolFeedback FreeRunEnabledFeedback { get; protected set; }
|
public BoolFeedback FreeRunEnabledFeedback { get; protected set; }
|
||||||
|
|
||||||
@@ -111,38 +112,38 @@ namespace PepperDash.Essentials.DM
|
|||||||
VideoStatusHelper.GetVgaInputStatusFuncs(tx.VgaInput));
|
VideoStatusHelper.GetVgaInputStatusFuncs(tx.VgaInput));
|
||||||
CompositeIn = new RoutingInputPortWithVideoStatuses(DmPortName.CompositeIn,
|
CompositeIn = new RoutingInputPortWithVideoStatuses(DmPortName.CompositeIn,
|
||||||
eRoutingSignalType.Video, eRoutingPortConnectionType.Composite, eVst.Composite, this,
|
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",
|
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
|
||||||
() => ActualVideoInput.ToString());
|
() => ActualVideoInput.ToString());
|
||||||
|
|
||||||
|
VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback);
|
||||||
|
|
||||||
VideoSourceNumericFeedback = new IntFeedback(() =>
|
AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.AudioSourceFeedback);
|
||||||
{
|
|
||||||
return (int)Tx.VideoSourceFeedback;
|
HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () => tx.HdmiInput.HdcpSupportOnFeedback.BoolValue ? 1 : 0);
|
||||||
});
|
|
||||||
AudioSourceNumericFeedback = new IntFeedback(() =>
|
|
||||||
{
|
|
||||||
return (int)Tx.AudioSourceFeedback;
|
|
||||||
});
|
|
||||||
|
|
||||||
HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () =>
|
HdcpSupportCapability = eHdcpCapabilityType.HdcpAutoSupport;
|
||||||
{
|
|
||||||
if (tx.HdmiInput.HdcpSupportOnFeedback.BoolValue)
|
DisplayPortVideoSyncFeedback = new BoolFeedback("DisplayPortVideoSync", () => (bool)tx.DisplayPortInput.SyncDetectedFeedback.BoolValue);
|
||||||
return 1;
|
|
||||||
else
|
HdmiVideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInput.SyncDetectedFeedback.BoolValue);
|
||||||
return 0;
|
|
||||||
});
|
VgaVideoSyncFeedback = new BoolFeedback(() => (bool)tx.VgaInput.SyncDetectedFeedback.BoolValue);
|
||||||
|
|
||||||
HdcpSupportCapability = eHdcpCapabilityType.HdcpAutoSupport;
|
|
||||||
|
|
||||||
FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled);
|
FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled);
|
||||||
|
|
||||||
VgaBrightnessFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.BrightnessFeedback.UShortValue);
|
VgaBrightnessFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.BrightnessFeedback.UShortValue);
|
||||||
|
|
||||||
VgaContrastFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.ContrastFeedback.UShortValue);
|
VgaContrastFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.ContrastFeedback.UShortValue);
|
||||||
|
|
||||||
tx.VgaInput.VideoControls.ControlChange += new Crestron.SimplSharpPro.DeviceSupport.GenericEventHandler(VideoControls_ControlChange);
|
|
||||||
|
|
||||||
var combinedFuncs = new VideoStatusFuncsWrapper
|
var combinedFuncs = new VideoStatusFuncsWrapper
|
||||||
{
|
{
|
||||||
@@ -193,7 +194,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,
|
AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,
|
||||||
AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback,
|
AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback,
|
||||||
AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback,
|
AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback,
|
||||||
AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiInHdcpCapabilityFeedback);
|
AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiInHdcpCapabilityFeedback, DisplayPortVideoSyncFeedback,
|
||||||
|
HdmiVideoSyncFeedback, VgaVideoSyncFeedback);
|
||||||
|
|
||||||
// Set Ports for CEC
|
// Set Ports for CEC
|
||||||
DisplayPortIn.Port = Tx.DisplayPortInput;
|
DisplayPortIn.Port = Tx.DisplayPortInput;
|
||||||
@@ -219,7 +221,18 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
LinkDmTxToApi(this, trilist, joinStart, joinMapKey, bridge);
|
var joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||||
|
|
||||||
|
if (HdmiVideoSyncFeedback != null)
|
||||||
|
{
|
||||||
|
HdmiVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]);
|
||||||
|
}
|
||||||
|
if (VgaVideoSyncFeedback != null)
|
||||||
|
{
|
||||||
|
VgaVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]);
|
||||||
|
}
|
||||||
|
|
||||||
|
LinkDmTxToApi(this, trilist, joinMap, bridge);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type)
|
public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type)
|
||||||
@@ -268,86 +281,82 @@ namespace PepperDash.Essentials.DM
|
|||||||
Tx.VideoSource = (eVst)inputSelector;
|
Tx.VideoSource = (eVst)inputSelector;
|
||||||
if ((signalType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
if ((signalType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
||||||
Tx.AudioSource = (eVst)inputSelector;
|
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)
|
/// <summary>
|
||||||
{
|
/// Enables or disables free run
|
||||||
var id = args.EventId;
|
/// </summary>
|
||||||
if (id == EndpointTransmitterBase.VideoSourceFeedbackEventId)
|
/// <param name="enable"></param>
|
||||||
{
|
public void SetFreeRunEnabled(bool enable)
|
||||||
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
{
|
||||||
VideoSourceNumericFeedback.FireUpdate();
|
Tx.VgaInput.FreeRun = enable ? eDmFreeRunSetting.Enabled : eDmFreeRunSetting.Disabled;
|
||||||
ActiveVideoInputFeedback.FireUpdate();
|
}
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
// ------------------------------ incomplete -----------------------------------------
|
/// Sets the VGA brightness level
|
||||||
else if (id == EndpointTransmitterBase.AudioSourceFeedbackEventId)
|
/// </summary>
|
||||||
{
|
/// <param name="level"></param>
|
||||||
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
public void SetVgaBrightness(ushort level)
|
||||||
AudioSourceNumericFeedback.FireUpdate();
|
{
|
||||||
}
|
Tx.VgaInput.VideoControls.Brightness.UShortValue = level;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoControls_ControlChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args)
|
/// <summary>
|
||||||
{
|
/// Sets the VGA contrast level
|
||||||
var id = args.EventId;
|
/// </summary>
|
||||||
Debug.Console(2, this, "EventId {0}", args.EventId);
|
/// <param name="level"></param>
|
||||||
|
public void SetVgaContrast(ushort level)
|
||||||
if (id == VideoControlsEventIds.BrightnessFeedbackEventId)
|
{
|
||||||
{
|
Tx.VgaInput.VideoControls.Contrast.UShortValue = level;
|
||||||
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>
|
/// <summary>
|
||||||
/// Relays the input stream change to the appropriate RoutingInputPort.
|
/// Relays the input stream change to the appropriate RoutingInputPort.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||||
{
|
{
|
||||||
if (eventId == EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
||||||
{
|
{
|
||||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
return;
|
||||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
}
|
||||||
}
|
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||||
}
|
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Relays the VideoAttributes change to a RoutingInputPort
|
/// Relays the VideoAttributes change to a RoutingInputPort
|
||||||
@@ -377,7 +386,51 @@ namespace PepperDash.Essentials.DM
|
|||||||
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||||
break;
|
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
|
#region IIROutputPorts Members
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using Crestron.SimplSharpPro.DM;
|
using Crestron.SimplSharpPro.DM;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
|
using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
|
||||||
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
using PepperDash.Essentials.Core.Bridges;
|
||||||
|
|
||||||
@@ -11,7 +12,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
using eVst = eX02VideoSourceType;
|
using eVst = eX02VideoSourceType;
|
||||||
using eAst = eX02AudioSourceType;
|
using eAst = eX02AudioSourceType;
|
||||||
|
|
||||||
public class DmTx4k100Controller : DmTxControllerBase, IRoutingInputsOutputs,
|
public class DmTx4k100Controller : BasicDmTxControllerBase, IRoutingInputsOutputs,
|
||||||
IIROutputPorts, IComPorts, ICec
|
IIROutputPorts, IComPorts, ICec
|
||||||
{
|
{
|
||||||
public DmTx4K100C1G Tx { get; private set; }
|
public DmTx4K100C1G Tx { get; private set; }
|
||||||
@@ -72,7 +73,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
LinkDmTxToApi(this, trilist, joinStart, joinMapKey, bridge);
|
Debug.Console(1, this, "No properties to link. Skipping device {0}", Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IIROutputPorts Members
|
#region IIROutputPorts Members
|
||||||
@@ -88,7 +89,5 @@ namespace PepperDash.Essentials.DM
|
|||||||
#region ICec Members
|
#region ICec Members
|
||||||
public Cec StreamCec { get { return Tx.StreamCec; } }
|
public Cec StreamCec { get { return Tx.StreamCec; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public override StringFeedback ActiveVideoInputFeedback { get; protected set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,355 +1,367 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
//using Crestron.SimplSharpPro.DeviceSupport;
|
//using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using Crestron.SimplSharpPro.DM;
|
using Crestron.SimplSharpPro.DM;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
|
using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
|
||||||
|
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
using PepperDash.Essentials.Core.Bridges;
|
||||||
using PepperDash.Essentials.DM.Config;
|
using PepperDash.Essentials.DM.Config;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.DM
|
namespace PepperDash.Essentials.DM
|
||||||
{
|
{
|
||||||
using eVst = Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType;
|
using eVst = Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType;
|
||||||
using eAst = Crestron.SimplSharpPro.DeviceSupport.eX02AudioSourceType;
|
using eAst = Crestron.SimplSharpPro.DeviceSupport.eX02AudioSourceType;
|
||||||
|
|
||||||
public class DmTx4k202CController : DmTxControllerBase, ITxRouting, IHasFeedback,
|
public class DmTx4k202CController : DmTxControllerBase, ITxRouting, IHasFeedback,
|
||||||
IIROutputPorts, IComPorts
|
IIROutputPorts, IComPorts
|
||||||
{
|
{
|
||||||
public DmTx4kX02CBase Tx { get; private set; }
|
public DmTx4k202C Tx { get; private set; }
|
||||||
|
|
||||||
public RoutingInputPortWithVideoStatuses HdmiIn1 { get; private set; }
|
public RoutingInputPortWithVideoStatuses HdmiIn1 { get; private set; }
|
||||||
public RoutingInputPortWithVideoStatuses HdmiIn2 { get; private set; }
|
public RoutingInputPortWithVideoStatuses HdmiIn2 { get; private set; }
|
||||||
public RoutingOutputPort DmOut { get; private set; }
|
public RoutingOutputPort DmOut { get; private set; }
|
||||||
public RoutingOutputPort HdmiLoopOut { get; private set; }
|
public RoutingOutputPort HdmiLoopOut { get; private set; }
|
||||||
|
|
||||||
public override StringFeedback ActiveVideoInputFeedback { get; protected set; }
|
public override StringFeedback ActiveVideoInputFeedback { get; protected set; }
|
||||||
public IntFeedback VideoSourceNumericFeedback { get; protected set; }
|
public IntFeedback VideoSourceNumericFeedback { get; protected set; }
|
||||||
public IntFeedback AudioSourceNumericFeedback { get; protected set; }
|
public IntFeedback AudioSourceNumericFeedback { get; protected set; }
|
||||||
public IntFeedback HdmiIn1HdcpCapabilityFeedback { get; protected set; }
|
public IntFeedback HdmiIn1HdcpCapabilityFeedback { get; protected set; }
|
||||||
public IntFeedback HdmiIn2HdcpCapabilityFeedback { get; protected set; }
|
public IntFeedback HdmiIn2HdcpCapabilityFeedback { get; protected set; }
|
||||||
|
public BoolFeedback Hdmi1VideoSyncFeedback { get; protected set; }
|
||||||
//public override IntFeedback HdcpSupportAllFeedback { get; protected set; }
|
public BoolFeedback Hdmi2VideoSyncFeedback { get; protected set; }
|
||||||
//public override ushort HdcpSupportCapability { get; protected set; }
|
|
||||||
|
//public override IntFeedback HdcpSupportAllFeedback { get; protected set; }
|
||||||
/// <summary>
|
//public override ushort HdcpSupportCapability { get; protected set; }
|
||||||
/// Helps get the "real" inputs, including when in Auto
|
|
||||||
/// </summary>
|
/// <summary>
|
||||||
public Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType ActualActiveVideoInput
|
/// Helps get the "real" inputs, including when in Auto
|
||||||
{
|
/// </summary>
|
||||||
get
|
public Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType ActualActiveVideoInput
|
||||||
{
|
{
|
||||||
if (Tx.VideoSourceFeedback != eVst.Auto)
|
get
|
||||||
return Tx.VideoSourceFeedback;
|
{
|
||||||
else // auto
|
if (Tx.VideoSourceFeedback != eVst.Auto)
|
||||||
{
|
return Tx.VideoSourceFeedback;
|
||||||
if (Tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
else // auto
|
||||||
return eVst.Hdmi1;
|
{
|
||||||
else if (Tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue)
|
if (Tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
||||||
return eVst.Hdmi2;
|
return eVst.Hdmi1;
|
||||||
else
|
else if (Tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue)
|
||||||
return eVst.AllDisabled;
|
return eVst.Hdmi2;
|
||||||
}
|
else
|
||||||
}
|
return eVst.AllDisabled;
|
||||||
}
|
}
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts
|
}
|
||||||
{
|
}
|
||||||
get
|
public RoutingPortCollection<RoutingInputPort> InputPorts
|
||||||
{
|
{
|
||||||
return new RoutingPortCollection<RoutingInputPort>
|
get
|
||||||
{
|
{
|
||||||
HdmiIn1,
|
return new RoutingPortCollection<RoutingInputPort>
|
||||||
HdmiIn2,
|
{
|
||||||
AnyVideoInput
|
HdmiIn1,
|
||||||
};
|
HdmiIn2,
|
||||||
}
|
AnyVideoInput
|
||||||
}
|
};
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
}
|
||||||
{
|
}
|
||||||
get
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
||||||
{
|
{
|
||||||
return new RoutingPortCollection<RoutingOutputPort> { DmOut, HdmiLoopOut };
|
get
|
||||||
}
|
{
|
||||||
}
|
return new RoutingPortCollection<RoutingOutputPort> { DmOut, HdmiLoopOut };
|
||||||
public DmTx4k202CController(string key, string name, DmTx4kX02CBase tx)
|
}
|
||||||
: base(key, name, tx)
|
}
|
||||||
{
|
public DmTx4k202CController(string key, string name, DmTx4k202C tx)
|
||||||
Tx = tx;
|
: base(key, name, tx)
|
||||||
|
{
|
||||||
HdmiIn1 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn1,
|
Tx = tx;
|
||||||
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this,
|
|
||||||
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[1]));
|
HdmiIn1 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn1,
|
||||||
HdmiIn2 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn2,
|
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this,
|
||||||
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi2, this,
|
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[1]));
|
||||||
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[2]));
|
HdmiIn2 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn2,
|
||||||
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
|
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi2, this,
|
||||||
() => ActualActiveVideoInput.ToString());
|
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;
|
Tx.HdmiInputs[1].InputStreamChange += InputStreamChangeEvent;
|
||||||
|
Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent;
|
||||||
VideoSourceNumericFeedback = new IntFeedback(() =>
|
Tx.BaseEvent += Tx_BaseEvent;
|
||||||
{
|
|
||||||
return (int)Tx.VideoSourceFeedback;
|
VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback);
|
||||||
});
|
|
||||||
AudioSourceNumericFeedback = new IntFeedback(() =>
|
AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.AudioSourceFeedback);
|
||||||
{
|
|
||||||
return (int)Tx.AudioSourceFeedback;
|
HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability", () => (int)tx.HdmiInputs[1].HdcpCapabilityFeedback);
|
||||||
});
|
|
||||||
|
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
||||||
HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability", () =>
|
|
||||||
{
|
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
||||||
return (int)tx.HdmiInputs[1].HdcpCapabilityFeedback;
|
|
||||||
});
|
Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue);
|
||||||
|
|
||||||
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () =>
|
Hdmi2VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue);
|
||||||
{
|
|
||||||
return (int)tx.HdmiInputs[2].HdcpCapabilityFeedback;
|
var combinedFuncs = new VideoStatusFuncsWrapper
|
||||||
});
|
{
|
||||||
|
HdcpActiveFeedbackFunc = () =>
|
||||||
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
(ActualActiveVideoInput == eVst.Hdmi1
|
||||||
|
&& tx.HdmiInputs[1].VideoAttributes.HdcpActiveFeedback.BoolValue)
|
||||||
var combinedFuncs = new VideoStatusFuncsWrapper
|
|| (ActualActiveVideoInput == eVst.Hdmi2
|
||||||
{
|
&& tx.HdmiInputs[2].VideoAttributes.HdcpActiveFeedback.BoolValue),
|
||||||
HdcpActiveFeedbackFunc = () =>
|
|
||||||
(ActualActiveVideoInput == eVst.Hdmi1
|
HdcpStateFeedbackFunc = () =>
|
||||||
&& tx.HdmiInputs[1].VideoAttributes.HdcpActiveFeedback.BoolValue)
|
{
|
||||||
|| (ActualActiveVideoInput == eVst.Hdmi2
|
if (ActualActiveVideoInput == eVst.Hdmi1)
|
||||||
&& tx.HdmiInputs[2].VideoAttributes.HdcpActiveFeedback.BoolValue),
|
return tx.HdmiInputs[1].VideoAttributes.HdcpStateFeedback.ToString();
|
||||||
|
if (ActualActiveVideoInput == eVst.Hdmi2)
|
||||||
HdcpStateFeedbackFunc = () =>
|
return tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString();
|
||||||
{
|
return "";
|
||||||
if (ActualActiveVideoInput == eVst.Hdmi1)
|
},
|
||||||
return tx.HdmiInputs[1].VideoAttributes.HdcpStateFeedback.ToString();
|
|
||||||
if (ActualActiveVideoInput == eVst.Hdmi2)
|
VideoResolutionFeedbackFunc = () =>
|
||||||
return tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString();
|
{
|
||||||
return "";
|
if (ActualActiveVideoInput == eVst.Hdmi1)
|
||||||
},
|
return tx.HdmiInputs[1].VideoAttributes.GetVideoResolutionString();
|
||||||
|
if (ActualActiveVideoInput == eVst.Hdmi2)
|
||||||
VideoResolutionFeedbackFunc = () =>
|
return tx.HdmiInputs[2].VideoAttributes.GetVideoResolutionString();
|
||||||
{
|
return "";
|
||||||
if (ActualActiveVideoInput == eVst.Hdmi1)
|
},
|
||||||
return tx.HdmiInputs[1].VideoAttributes.GetVideoResolutionString();
|
VideoSyncFeedbackFunc = () =>
|
||||||
if (ActualActiveVideoInput == eVst.Hdmi2)
|
(ActualActiveVideoInput == eVst.Hdmi1
|
||||||
return tx.HdmiInputs[2].VideoAttributes.GetVideoResolutionString();
|
&& tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
||||||
return "";
|
|| (ActualActiveVideoInput == eVst.Hdmi2
|
||||||
},
|
&& tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue)
|
||||||
VideoSyncFeedbackFunc = () =>
|
|
||||||
(ActualActiveVideoInput == eVst.Hdmi1
|
};
|
||||||
&& tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
|
||||||
|| (ActualActiveVideoInput == eVst.Hdmi2
|
AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn,
|
||||||
&& tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue)
|
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
|
||||||
|
|
||||||
};
|
DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
|
eRoutingPortConnectionType.DmCat, null, this);
|
||||||
AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn,
|
HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
|
eRoutingPortConnectionType.Hdmi, null, this);
|
||||||
|
|
||||||
DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
|
||||||
eRoutingPortConnectionType.DmCat, null, this);
|
AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,
|
||||||
HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback,
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback,
|
||||||
|
AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiIn1HdcpCapabilityFeedback, HdmiIn2HdcpCapabilityFeedback,
|
||||||
|
Hdmi1VideoSyncFeedback, Hdmi2VideoSyncFeedback);
|
||||||
AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,
|
|
||||||
AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback,
|
// Set Ports for CEC
|
||||||
AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback,
|
HdmiIn1.Port = Tx.HdmiInputs[1];
|
||||||
AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiIn1HdcpCapabilityFeedback, HdmiIn2HdcpCapabilityFeedback);
|
HdmiIn2.Port = Tx.HdmiInputs[2];
|
||||||
|
HdmiLoopOut.Port = Tx.HdmiOutput;
|
||||||
// Set Ports for CEC
|
DmOut.Port = Tx.DmOutput;
|
||||||
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);
|
||||||
public override bool CustomActivate()
|
Tx.HdmiInputs[1].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn1, a.EventId);
|
||||||
{
|
|
||||||
// Link up all of these damned events to the various RoutingPorts via a helper handler
|
Tx.HdmiInputs[2].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn2, a.EventId);
|
||||||
Tx.HdmiInputs[1].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn1, a.EventId);
|
Tx.HdmiInputs[2].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn2, a.EventId);
|
||||||
Tx.HdmiInputs[1].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn1, a.EventId);
|
|
||||||
|
// Base does register and sets up comm monitoring.
|
||||||
Tx.HdmiInputs[2].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn2, a.EventId);
|
return base.CustomActivate();
|
||||||
Tx.HdmiInputs[2].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn2, a.EventId);
|
}
|
||||||
|
|
||||||
// Base does register and sets up comm monitoring.
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
return base.CustomActivate();
|
{
|
||||||
}
|
var joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
if (Hdmi1VideoSyncFeedback != null)
|
||||||
{
|
{
|
||||||
LinkDmTxToApi(this, trilist, joinStart, joinMapKey, bridge);
|
Hdmi1VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]);
|
||||||
}
|
}
|
||||||
|
if (Hdmi2VideoSyncFeedback != null)
|
||||||
public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type)
|
{
|
||||||
{
|
Hdmi2VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]);
|
||||||
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
|
}
|
||||||
|
|
||||||
if (type == eRoutingSignalType.Video)
|
LinkDmTxToApi(this, trilist, joinMap, bridge);
|
||||||
{
|
}
|
||||||
switch (input)
|
|
||||||
{
|
public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type)
|
||||||
case 0:
|
{
|
||||||
{
|
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
|
||||||
ExecuteSwitch(eVst.Auto, null, type);
|
|
||||||
break;
|
switch (type)
|
||||||
}
|
{
|
||||||
case 1:
|
case eRoutingSignalType.Video:
|
||||||
{
|
switch (input)
|
||||||
ExecuteSwitch(HdmiIn1.Selector, null, type);
|
{
|
||||||
break;
|
case 0:
|
||||||
}
|
{
|
||||||
case 2:
|
ExecuteSwitch(eVst.Auto, null, type);
|
||||||
{
|
break;
|
||||||
ExecuteSwitch(HdmiIn2.Selector, null, type);
|
}
|
||||||
break;
|
case 1:
|
||||||
}
|
{
|
||||||
case 3:
|
ExecuteSwitch(HdmiIn1.Selector, null, type);
|
||||||
{
|
break;
|
||||||
ExecuteSwitch(eVst.AllDisabled, null, type);
|
}
|
||||||
break;
|
case 2:
|
||||||
}
|
{
|
||||||
}
|
ExecuteSwitch(HdmiIn2.Selector, null, type);
|
||||||
}
|
break;
|
||||||
else if (type == eRoutingSignalType.Audio)
|
}
|
||||||
{
|
case 3:
|
||||||
switch (input)
|
{
|
||||||
{
|
ExecuteSwitch(eVst.AllDisabled, null, type);
|
||||||
case 0:
|
break;
|
||||||
{
|
}
|
||||||
ExecuteSwitch(eAst.Auto, null, type);
|
}
|
||||||
break;
|
break;
|
||||||
}
|
case eRoutingSignalType.Audio:
|
||||||
case 1:
|
switch (input)
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eAst.Hdmi1, null, type);
|
case 0:
|
||||||
break;
|
{
|
||||||
}
|
ExecuteSwitch(eAst.Auto, null, type);
|
||||||
case 2:
|
break;
|
||||||
{
|
}
|
||||||
ExecuteSwitch(eAst.Hdmi2, null, type);
|
case 1:
|
||||||
break;
|
{
|
||||||
}
|
ExecuteSwitch(eAst.Hdmi1, null, type);
|
||||||
case 3:
|
break;
|
||||||
{
|
}
|
||||||
ExecuteSwitch(eAst.AllDisabled, null, type);
|
case 2:
|
||||||
break;
|
{
|
||||||
}
|
ExecuteSwitch(eAst.Hdmi2, null, type);
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
}
|
case 3:
|
||||||
|
{
|
||||||
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
ExecuteSwitch(eAst.AllDisabled, null, type);
|
||||||
{
|
break;
|
||||||
if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
}
|
||||||
Tx.VideoSource = (eVst)inputSelector;
|
}
|
||||||
if ((signalType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
break;
|
||||||
Tx.AudioSource = (eAst)inputSelector;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
||||||
{
|
{
|
||||||
Debug.Console(2, "{0} event {1} stream {2}", this.Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
||||||
|
Tx.VideoSource = (eVst)inputSelector;
|
||||||
if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId)
|
if ((signalType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
||||||
{
|
Tx.AudioSource = (eAst)inputSelector;
|
||||||
if (inputStream == Tx.HdmiInputs[1])
|
}
|
||||||
HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
|
||||||
else if (inputStream == Tx.HdmiInputs[2])
|
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||||
HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
{
|
||||||
}
|
Debug.Console(2, "{0} event {1} stream {2}", this.Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
||||||
else if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId)
|
|
||||||
{
|
switch (args.EventId)
|
||||||
if (inputStream == Tx.HdmiInputs[1])
|
{
|
||||||
HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId:
|
||||||
else if (inputStream == Tx.HdmiInputs[2])
|
if (inputStream == Tx.HdmiInputs[1]) HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
||||||
HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
if (inputStream == Tx.HdmiInputs[2]) HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
||||||
}
|
break;
|
||||||
}
|
case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId:
|
||||||
|
if (inputStream == Tx.HdmiInputs[1]) HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
||||||
void Tx_BaseEvent(GenericBase device, BaseEventArgs args)
|
if (inputStream == Tx.HdmiInputs[2]) HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
||||||
{
|
break;
|
||||||
var id = args.EventId;
|
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||||
if (id == EndpointTransmitterBase.VideoSourceFeedbackEventId)
|
if (inputStream == Tx.HdmiInputs[1]) Hdmi1VideoSyncFeedback.FireUpdate();
|
||||||
{
|
if (inputStream == Tx.HdmiInputs[2]) Hdmi2VideoSyncFeedback.FireUpdate();
|
||||||
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
break;
|
||||||
VideoSourceNumericFeedback.FireUpdate();
|
}
|
||||||
ActiveVideoInputFeedback.FireUpdate();
|
}
|
||||||
}
|
|
||||||
|
void Tx_BaseEvent(GenericBase device, BaseEventArgs args)
|
||||||
// ------------------------------ incomplete -----------------------------------------
|
{
|
||||||
else if (id == EndpointTransmitterBase.AudioSourceFeedbackEventId)
|
var id = args.EventId;
|
||||||
{
|
Debug.Console(2, this, "EventId {0}", args.EventId);
|
||||||
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
|
||||||
AudioSourceNumericFeedback.FireUpdate();
|
switch (id)
|
||||||
}
|
{
|
||||||
}
|
case EndpointTransmitterBase.VideoSourceFeedbackEventId:
|
||||||
|
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
||||||
/// <summary>
|
ActiveVideoInputFeedback.FireUpdate();
|
||||||
/// Relays the input stream change to the appropriate RoutingInputPort.
|
VideoSourceNumericFeedback.FireUpdate();
|
||||||
/// </summary>
|
ActiveVideoInputFeedback.FireUpdate();
|
||||||
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
break;
|
||||||
{
|
case EndpointTransmitterBase.AudioSourceFeedbackEventId:
|
||||||
if (eventId == EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
Debug.Console(2, this, " Audio Source : {0}", Tx.AudioSourceFeedback);
|
||||||
{
|
AudioSourceNumericFeedback.FireUpdate();
|
||||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
break;
|
||||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Relays the input stream change to the appropriate RoutingInputPort.
|
||||||
/// Relays the VideoAttributes change to a RoutingInputPort
|
/// </summary>
|
||||||
/// </summary>
|
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||||
void ForwardVideoAttributeChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
{
|
||||||
{
|
if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
||||||
//// LOCATION: Crestron.SimplSharpPro.DM.VideoAttributeEventIds
|
{
|
||||||
//Debug.Console(2, this, "VideoAttributes_AttributeChange event id={0} from {1}",
|
return;
|
||||||
// args.EventId, (sender as VideoAttributesEnhanced).Owner.GetType());
|
}
|
||||||
switch (eventId)
|
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||||
{
|
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||||
case VideoAttributeEventIds.HdcpActiveFeedbackEventId:
|
}
|
||||||
inputPort.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
|
||||||
AnyVideoInput.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
/// <summary>
|
||||||
break;
|
/// Relays the VideoAttributes change to a RoutingInputPort
|
||||||
case VideoAttributeEventIds.HdcpStateFeedbackEventId:
|
/// </summary>
|
||||||
inputPort.VideoStatus.HdcpStateFeedback.FireUpdate();
|
void ForwardVideoAttributeChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||||
AnyVideoInput.VideoStatus.HdcpStateFeedback.FireUpdate();
|
{
|
||||||
break;
|
//// LOCATION: Crestron.SimplSharpPro.DM.VideoAttributeEventIds
|
||||||
case VideoAttributeEventIds.HorizontalResolutionFeedbackEventId:
|
//Debug.Console(2, this, "VideoAttributes_AttributeChange event id={0} from {1}",
|
||||||
case VideoAttributeEventIds.VerticalResolutionFeedbackEventId:
|
// args.EventId, (sender as VideoAttributesEnhanced).Owner.GetType());
|
||||||
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
switch (eventId)
|
||||||
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
{
|
||||||
break;
|
case VideoAttributeEventIds.HdcpActiveFeedbackEventId:
|
||||||
case VideoAttributeEventIds.FramesPerSecondFeedbackEventId:
|
inputPort.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
||||||
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
AnyVideoInput.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
||||||
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
break;
|
||||||
break;
|
case VideoAttributeEventIds.HdcpStateFeedbackEventId:
|
||||||
}
|
inputPort.VideoStatus.HdcpStateFeedback.FireUpdate();
|
||||||
}
|
AnyVideoInput.VideoStatus.HdcpStateFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
case VideoAttributeEventIds.HorizontalResolutionFeedbackEventId:
|
||||||
|
case VideoAttributeEventIds.VerticalResolutionFeedbackEventId:
|
||||||
|
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||||
#region IIROutputPorts Members
|
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return Tx.IROutputPorts; } }
|
break;
|
||||||
public int NumberOfIROutputPorts { get { return Tx.NumberOfIROutputPorts; } }
|
case VideoAttributeEventIds.FramesPerSecondFeedbackEventId:
|
||||||
#endregion
|
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||||
|
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||||
#region IComPorts Members
|
break;
|
||||||
public CrestronCollection<ComPort> ComPorts { get { return Tx.ComPorts; } }
|
}
|
||||||
public int NumberOfComPorts { get { return Tx.NumberOfComPorts; } }
|
}
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
#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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -36,6 +36,9 @@ namespace PepperDash.Essentials.DM
|
|||||||
public IntFeedback AudioSourceNumericFeedback { get; protected set; }
|
public IntFeedback AudioSourceNumericFeedback { get; protected set; }
|
||||||
public IntFeedback HdmiIn1HdcpCapabilityFeedback { get; protected set; }
|
public IntFeedback HdmiIn1HdcpCapabilityFeedback { get; protected set; }
|
||||||
public IntFeedback HdmiIn2HdcpCapabilityFeedback { get; protected set; }
|
public IntFeedback HdmiIn2HdcpCapabilityFeedback { get; protected set; }
|
||||||
|
public BoolFeedback Hdmi1VideoSyncFeedback { get; protected set; }
|
||||||
|
public BoolFeedback Hdmi2VideoSyncFeedback { get; protected set; }
|
||||||
|
public BoolFeedback VgaVideoSyncFeedback { get; protected set; }
|
||||||
|
|
||||||
public BoolFeedback FreeRunEnabledFeedback { get; protected set; }
|
public BoolFeedback FreeRunEnabledFeedback { get; protected set; }
|
||||||
|
|
||||||
@@ -102,30 +105,25 @@ namespace PepperDash.Essentials.DM
|
|||||||
() => ActualActiveVideoInput.ToString());
|
() => ActualActiveVideoInput.ToString());
|
||||||
|
|
||||||
Tx.HdmiInputs[1].InputStreamChange += InputStreamChangeEvent;
|
Tx.HdmiInputs[1].InputStreamChange += InputStreamChangeEvent;
|
||||||
Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent;
|
Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent;
|
||||||
|
Tx.VgaInput.InputStreamChange += VgaInputOnInputStreamChange;
|
||||||
Tx.BaseEvent += Tx_BaseEvent;
|
Tx.BaseEvent += Tx_BaseEvent;
|
||||||
|
|
||||||
VideoSourceNumericFeedback = new IntFeedback(() =>
|
VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback);
|
||||||
{
|
AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.AudioSourceFeedback);
|
||||||
return (int)Tx.VideoSourceFeedback;
|
|
||||||
});
|
|
||||||
AudioSourceNumericFeedback = new IntFeedback(() =>
|
|
||||||
{
|
|
||||||
return (int)Tx.AudioSourceFeedback;
|
|
||||||
});
|
|
||||||
|
|
||||||
HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability", () =>
|
HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability", () => (int)tx.HdmiInputs[1].HdcpCapabilityFeedback);
|
||||||
{
|
|
||||||
return (int)tx.HdmiInputs[1].HdcpCapabilityFeedback;
|
|
||||||
});
|
|
||||||
|
|
||||||
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () =>
|
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
||||||
{
|
|
||||||
return (int)tx.HdmiInputs[2].HdcpCapabilityFeedback;
|
|
||||||
});
|
|
||||||
|
|
||||||
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
||||||
|
|
||||||
|
Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue);
|
||||||
|
|
||||||
|
Hdmi2VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue);
|
||||||
|
|
||||||
|
VgaVideoSyncFeedback = new BoolFeedback(() => (bool)tx.VgaInput.SyncDetectedFeedback.BoolValue);
|
||||||
|
|
||||||
FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled);
|
FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled);
|
||||||
|
|
||||||
VgaBrightnessFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.BrightnessFeedback.UShortValue);
|
VgaBrightnessFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.BrightnessFeedback.UShortValue);
|
||||||
@@ -146,9 +144,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
if (ActualActiveVideoInput == eVst.Hdmi1)
|
if (ActualActiveVideoInput == eVst.Hdmi1)
|
||||||
return tx.HdmiInputs[1].VideoAttributes.HdcpStateFeedback.ToString();
|
return tx.HdmiInputs[1].VideoAttributes.HdcpStateFeedback.ToString();
|
||||||
if (ActualActiveVideoInput == eVst.Hdmi2)
|
return ActualActiveVideoInput == eVst.Hdmi2 ? tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString() : "";
|
||||||
return tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString();
|
|
||||||
return "";
|
|
||||||
},
|
},
|
||||||
|
|
||||||
VideoResolutionFeedbackFunc = () =>
|
VideoResolutionFeedbackFunc = () =>
|
||||||
@@ -157,9 +153,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
return tx.HdmiInputs[1].VideoAttributes.GetVideoResolutionString();
|
return tx.HdmiInputs[1].VideoAttributes.GetVideoResolutionString();
|
||||||
if (ActualActiveVideoInput == eVst.Hdmi2)
|
if (ActualActiveVideoInput == eVst.Hdmi2)
|
||||||
return tx.HdmiInputs[2].VideoAttributes.GetVideoResolutionString();
|
return tx.HdmiInputs[2].VideoAttributes.GetVideoResolutionString();
|
||||||
if (ActualActiveVideoInput == eVst.Vga)
|
return ActualActiveVideoInput == eVst.Vga ? tx.VgaInput.VideoAttributes.GetVideoResolutionString() : "";
|
||||||
return tx.VgaInput.VideoAttributes.GetVideoResolutionString();
|
|
||||||
return "";
|
|
||||||
},
|
},
|
||||||
VideoSyncFeedbackFunc = () =>
|
VideoSyncFeedbackFunc = () =>
|
||||||
(ActualActiveVideoInput == eVst.Hdmi1
|
(ActualActiveVideoInput == eVst.Hdmi1
|
||||||
@@ -183,27 +177,42 @@ namespace PepperDash.Essentials.DM
|
|||||||
AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,
|
AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,
|
||||||
AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback,
|
AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback,
|
||||||
AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback,
|
AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback,
|
||||||
AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiIn1HdcpCapabilityFeedback, HdmiIn2HdcpCapabilityFeedback);
|
AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiIn1HdcpCapabilityFeedback, HdmiIn2HdcpCapabilityFeedback,
|
||||||
|
Hdmi1VideoSyncFeedback, Hdmi2VideoSyncFeedback, VgaVideoSyncFeedback);
|
||||||
|
|
||||||
// Set Ports for CEC
|
// Set Ports for CEC
|
||||||
HdmiIn1.Port = Tx.HdmiInputs[1];
|
HdmiIn1.Port = Tx.HdmiInputs[1];
|
||||||
HdmiIn2.Port = Tx.HdmiInputs[2];
|
HdmiIn2.Port = Tx.HdmiInputs[2];
|
||||||
HdmiLoopOut.Port = Tx.HdmiOutput;
|
HdmiLoopOut.Port = Tx.HdmiOutput;
|
||||||
DmOut.Port = Tx.DmOutput;
|
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)
|
void VideoControls_ControlChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args)
|
||||||
{
|
{
|
||||||
var id = args.EventId;
|
var id = args.EventId;
|
||||||
Debug.Console(2, this, "EventId {0}", args.EventId);
|
Debug.Console(2, this, "EventId {0}", args.EventId);
|
||||||
|
|
||||||
if (id == VideoControlsEventIds.BrightnessFeedbackEventId)
|
switch (id)
|
||||||
{
|
{
|
||||||
VgaBrightnessFeedback.FireUpdate();
|
case VideoControlsEventIds.BrightnessFeedbackEventId:
|
||||||
}
|
VgaBrightnessFeedback.FireUpdate();
|
||||||
else if (id == VideoControlsEventIds.ContrastFeedbackEventId)
|
break;
|
||||||
{
|
case VideoControlsEventIds.ContrastFeedbackEventId:
|
||||||
VgaContrastFeedback.FireUpdate();
|
VgaContrastFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -227,25 +236,33 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
LinkDmTxToApi(this, trilist, joinStart, joinMapKey, 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]);
|
||||||
|
}
|
||||||
|
if (VgaVideoSyncFeedback != null)
|
||||||
|
{
|
||||||
|
VgaVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input3VideoSyncStatus.JoinNumber]);
|
||||||
|
}
|
||||||
|
|
||||||
|
LinkDmTxToApi(this, trilist, joinMap, bridge);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enables or disables free run
|
/// Enables or disables free run
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="enable"></param>
|
/// <param name="enable"></param>
|
||||||
public void SetFreeRunEnabled(bool enable)
|
public void SetFreeRunEnabled(bool enable)
|
||||||
{
|
{
|
||||||
if (enable)
|
Tx.VgaInput.FreeRun = enable ? eDmFreeRunSetting.Enabled : eDmFreeRunSetting.Disabled;
|
||||||
{
|
}
|
||||||
Tx.VgaInput.FreeRun = eDmFreeRunSetting.Enabled;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Tx.VgaInput.FreeRun = eDmFreeRunSetting.Disabled;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the VGA brightness level
|
/// Sets the VGA brightness level
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -266,74 +283,75 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type)
|
public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type)
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
|
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
|
||||||
|
|
||||||
if (type == eRoutingSignalType.Video)
|
switch (type)
|
||||||
{
|
{
|
||||||
switch (input)
|
case eRoutingSignalType.Video:
|
||||||
{
|
switch (input)
|
||||||
case 0:
|
{
|
||||||
|
case 0:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eVst.Auto, null, type);
|
ExecuteSwitch(eVst.Auto, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(HdmiIn1.Selector, null, type);
|
ExecuteSwitch(HdmiIn1.Selector, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(HdmiIn2.Selector, null, type);
|
ExecuteSwitch(HdmiIn2.Selector, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(VgaIn.Selector, null, type);
|
ExecuteSwitch(VgaIn.Selector, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eVst.AllDisabled, null, type);
|
ExecuteSwitch(eVst.AllDisabled, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
else if (type == eRoutingSignalType.Audio)
|
case eRoutingSignalType.Audio:
|
||||||
{
|
switch (input)
|
||||||
switch (input)
|
{
|
||||||
{
|
case 0:
|
||||||
case 0:
|
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eAst.Auto, null, type);
|
ExecuteSwitch(eAst.Auto, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eAst.Hdmi1, null, type);
|
ExecuteSwitch(eAst.Hdmi1, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eAst.Hdmi2, null, type);
|
ExecuteSwitch(eAst.Hdmi2, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eAst.AudioIn, null, type);
|
ExecuteSwitch(eAst.AudioIn, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eAst.AllDisabled, null, type);
|
ExecuteSwitch(eAst.AllDisabled, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
||||||
{
|
{
|
||||||
if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
||||||
@@ -342,54 +360,52 @@ namespace PepperDash.Essentials.DM
|
|||||||
Tx.AudioSource = (eAst)inputSelector;
|
Tx.AudioSource = (eAst)inputSelector;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
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}", this.Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
||||||
|
|
||||||
if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId)
|
switch (args.EventId)
|
||||||
{
|
{
|
||||||
if (inputStream == Tx.HdmiInputs[1])
|
case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId:
|
||||||
HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
if (inputStream == Tx.HdmiInputs[1]) HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
||||||
else if (inputStream == Tx.HdmiInputs[2])
|
if (inputStream == Tx.HdmiInputs[2]) HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
||||||
HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
break;
|
||||||
}
|
case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId:
|
||||||
else if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId)
|
if (inputStream == Tx.HdmiInputs[1]) HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
||||||
{
|
if (inputStream == Tx.HdmiInputs[2]) HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
||||||
if (inputStream == Tx.HdmiInputs[1])
|
break;
|
||||||
HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||||
else if (inputStream == Tx.HdmiInputs[2])
|
if (inputStream == Tx.HdmiInputs[1]) Hdmi1VideoSyncFeedback.FireUpdate();
|
||||||
HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
if (inputStream == Tx.HdmiInputs[2]) Hdmi2VideoSyncFeedback.FireUpdate();
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
void Tx_BaseEvent(GenericBase device, BaseEventArgs args)
|
|
||||||
{
|
void Tx_BaseEvent(GenericBase device, BaseEventArgs args)
|
||||||
var id = args.EventId;
|
{
|
||||||
if (id == EndpointTransmitterBase.VideoSourceFeedbackEventId)
|
var id = args.EventId;
|
||||||
{
|
switch (id)
|
||||||
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
{
|
||||||
VideoSourceNumericFeedback.FireUpdate();
|
case EndpointTransmitterBase.VideoSourceFeedbackEventId:
|
||||||
ActiveVideoInputFeedback.FireUpdate();
|
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
||||||
}
|
VideoSourceNumericFeedback.FireUpdate();
|
||||||
|
ActiveVideoInputFeedback.FireUpdate();
|
||||||
// ------------------------------ incomplete -----------------------------------------
|
break;
|
||||||
else if (id == EndpointTransmitterBase.AudioSourceFeedbackEventId)
|
case EndpointTransmitterBase.AudioSourceFeedbackEventId:
|
||||||
{
|
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
||||||
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
AudioSourceNumericFeedback.FireUpdate();
|
||||||
AudioSourceNumericFeedback.FireUpdate();
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Relays the input stream change to the appropriate RoutingInputPort.
|
/// Relays the input stream change to the appropriate RoutingInputPort.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||||
{
|
{
|
||||||
if (eventId == EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId) return;
|
||||||
{
|
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -0,0 +1,304 @@
|
|||||||
|
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 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 DmTx4kz100Controller : DmTxControllerBase, IRoutingInputsOutputs, IHasFeedback,
|
||||||
|
IIROutputPorts, IComPorts, ICec
|
||||||
|
{
|
||||||
|
public DmTx4kz100C1G Tx { get; private set; }
|
||||||
|
|
||||||
|
public RoutingInputPortWithVideoStatuses HdmiInput { get; private set; }
|
||||||
|
public RoutingOutputPort DmOutput { get; private set; }
|
||||||
|
|
||||||
|
public override StringFeedback ActiveVideoInputFeedback { get; protected set; }
|
||||||
|
public IntFeedback HdmiInHdcpCapabilityFeedback { get; protected set; }
|
||||||
|
public BoolFeedback HdmiVideoSyncFeedback { get; protected set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Helps get the "real" inputs, including when in Auto
|
||||||
|
/// </summary>
|
||||||
|
public DmTx200Base.eSourceSelection ActualActiveVideoInput
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (Tx.VideoSourceFeedback == DmTx200Base.eSourceSelection.Digital ||
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public RoutingPortCollection<RoutingInputPort> InputPorts
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return new RoutingPortCollection<RoutingInputPort>
|
||||||
|
{
|
||||||
|
HdmiInput
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return new RoutingPortCollection<RoutingOutputPort> { DmOutput };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="key"></param>
|
||||||
|
/// <param name="name"></param>
|
||||||
|
/// <param name="tx"></param>
|
||||||
|
public DmTx4kz100Controller(string key, string name, DmTx4kz100C1G tx)
|
||||||
|
: base(key, name, tx)
|
||||||
|
{
|
||||||
|
Tx = tx;
|
||||||
|
|
||||||
|
HdmiInput = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn,
|
||||||
|
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, DmTx200Base.eSourceSelection.Digital, this,
|
||||||
|
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInput));
|
||||||
|
|
||||||
|
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
|
||||||
|
() => ActualActiveVideoInput.ToString());
|
||||||
|
|
||||||
|
Tx.HdmiInput.InputStreamChange += InputStreamChangeEvent;
|
||||||
|
Tx.BaseEvent += Tx_BaseEvent;
|
||||||
|
Tx.OnlineStatusChange += Tx_OnlineStatusChange;
|
||||||
|
|
||||||
|
|
||||||
|
HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () =>
|
||||||
|
{
|
||||||
|
if (tx.HdmiInput.HdcpSupportOnFeedback.BoolValue)
|
||||||
|
return 1;
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
|
|
||||||
|
HdcpSupportCapability = eHdcpCapabilityType.HdcpAutoSupport;
|
||||||
|
|
||||||
|
HdmiVideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInput.SyncDetectedFeedback.BoolValue);
|
||||||
|
|
||||||
|
|
||||||
|
var combinedFuncs = new VideoStatusFuncsWrapper
|
||||||
|
{
|
||||||
|
HdcpActiveFeedbackFunc = () =>
|
||||||
|
(ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital
|
||||||
|
&& tx.HdmiInput.VideoAttributes.HdcpActiveFeedback.BoolValue),
|
||||||
|
|
||||||
|
HdcpStateFeedbackFunc = () => ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital ? tx.HdmiInput.VideoAttributes.HdcpStateFeedback.ToString() : "",
|
||||||
|
|
||||||
|
VideoResolutionFeedbackFunc = () =>
|
||||||
|
{
|
||||||
|
if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital)
|
||||||
|
return tx.HdmiInput.VideoAttributes.GetVideoResolutionString();
|
||||||
|
return ActualActiveVideoInput == DmTx200Base.eSourceSelection.Analog ? tx.VgaInput.VideoAttributes.GetVideoResolutionString() : "";
|
||||||
|
},
|
||||||
|
VideoSyncFeedbackFunc = () =>
|
||||||
|
(ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital
|
||||||
|
&& tx.HdmiInput.SyncDetectedFeedback.BoolValue)
|
||||||
|
|| (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Analog
|
||||||
|
&& tx.VgaInput.SyncDetectedFeedback.BoolValue)
|
||||||
|
|| (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Auto
|
||||||
|
&& (tx.VgaInput.SyncDetectedFeedback.BoolValue || tx.HdmiInput.SyncDetectedFeedback.BoolValue))
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn,
|
||||||
|
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
|
||||||
|
|
||||||
|
DmOutput = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, null, this);
|
||||||
|
|
||||||
|
AddToFeedbackList(ActiveVideoInputFeedback,
|
||||||
|
AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback,
|
||||||
|
AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback,
|
||||||
|
AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiInHdcpCapabilityFeedback, HdmiVideoSyncFeedback
|
||||||
|
);
|
||||||
|
|
||||||
|
// Set Ports for CEC
|
||||||
|
HdmiInput.Port = Tx.HdmiInput;
|
||||||
|
DmOutput.Port = Tx.DmOutput;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Tx_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args)
|
||||||
|
{
|
||||||
|
ActiveVideoInputFeedback.FireUpdate();
|
||||||
|
HdmiVideoSyncFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool CustomActivate()
|
||||||
|
{
|
||||||
|
|
||||||
|
Tx.HdmiInput.InputStreamChange += (o, a) => FowardInputStreamChange(HdmiInput, a.EventId);
|
||||||
|
Tx.HdmiInput.VideoAttributes.AttributeChange += (o, a) => FireVideoAttributeChange(HdmiInput, 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 (HdmiVideoSyncFeedback != null)
|
||||||
|
{
|
||||||
|
HdmiVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]);
|
||||||
|
}
|
||||||
|
|
||||||
|
LinkDmTxToApi(this, trilist, joinMap, bridge);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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();
|
||||||
|
break;
|
||||||
|
case EndpointTransmitterBase.AudioSourceFeedbackEventId:
|
||||||
|
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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:
|
||||||
|
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId:
|
||||||
|
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||||
|
HdmiVideoSyncFeedback.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 FireVideoAttributeChange(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
|
||||||
|
|
||||||
|
#region ICec Members
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the CEC stream directly from the HDMI port.
|
||||||
|
/// </summary>
|
||||||
|
public Cec StreamCec { get { return Tx.HdmiInput.StreamCec; } }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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,347 +1,358 @@
|
|||||||
using System;
|
using Crestron.SimplSharpPro;
|
||||||
using System.Collections.Generic;
|
//using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using System.Linq;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using System.Text;
|
using Crestron.SimplSharpPro.DM;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
|
||||||
//using Crestron.SimplSharpPro.DeviceSupport;
|
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using PepperDash.Core;
|
||||||
using Crestron.SimplSharpPro.DM;
|
using PepperDash.Essentials.Core;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
using PepperDash.Essentials.Core.Bridges;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
|
|
||||||
|
namespace PepperDash.Essentials.DM
|
||||||
using PepperDash.Core;
|
{
|
||||||
using PepperDash.Essentials.Core;
|
using eVst = eX02VideoSourceType;
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
using eAst = eX02AudioSourceType;
|
||||||
using PepperDash.Essentials.DM.Config;
|
|
||||||
|
public class DmTx4kz302CController : DmTxControllerBase, ITxRouting,
|
||||||
namespace PepperDash.Essentials.DM
|
IIROutputPorts, IComPorts
|
||||||
{
|
{
|
||||||
using eVst = Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType;
|
public DmTx4kz302C Tx { get; private set; }
|
||||||
using eAst = Crestron.SimplSharpPro.DeviceSupport.eX02AudioSourceType;
|
|
||||||
|
public RoutingInputPortWithVideoStatuses HdmiIn1 { get; private set; }
|
||||||
public class DmTx4kz302CController : DmTxControllerBase, ITxRouting, IHasFeedback,
|
public RoutingInputPortWithVideoStatuses HdmiIn2 { get; private set; }
|
||||||
IIROutputPorts, IComPorts
|
public RoutingInputPortWithVideoStatuses DisplayPortIn { get; private set; }
|
||||||
{
|
public RoutingOutputPort DmOut { get; private set; }
|
||||||
public DmTx4kz302C Tx { get; private set; }
|
public RoutingOutputPort HdmiLoopOut { get; private set; }
|
||||||
|
|
||||||
public RoutingInputPortWithVideoStatuses HdmiIn1 { get; private set; }
|
public override StringFeedback ActiveVideoInputFeedback { get; protected set; }
|
||||||
public RoutingInputPortWithVideoStatuses HdmiIn2 { get; private set; }
|
public IntFeedback VideoSourceNumericFeedback { get; protected set; }
|
||||||
public RoutingInputPortWithVideoStatuses DisplayPortIn { get; private set; }
|
public IntFeedback AudioSourceNumericFeedback { get; protected set; }
|
||||||
public RoutingOutputPort DmOut { get; private set; }
|
public IntFeedback HdmiIn1HdcpCapabilityFeedback { get; protected set; }
|
||||||
public RoutingOutputPort HdmiLoopOut { get; private set; }
|
public IntFeedback HdmiIn2HdcpCapabilityFeedback { get; protected set; }
|
||||||
|
public BoolFeedback Hdmi1VideoSyncFeedback { get; protected set; }
|
||||||
public override StringFeedback ActiveVideoInputFeedback { get; protected set; }
|
public BoolFeedback Hdmi2VideoSyncFeedback { get; protected set; }
|
||||||
public IntFeedback VideoSourceNumericFeedback { get; protected set; }
|
public BoolFeedback DisplayPortVideoSyncFeedback { get; protected set; }
|
||||||
public IntFeedback AudioSourceNumericFeedback { get; protected set; }
|
|
||||||
public IntFeedback HdmiIn1HdcpCapabilityFeedback { get; protected set; }
|
//public override IntFeedback HdcpSupportAllFeedback { get; protected set; }
|
||||||
public IntFeedback HdmiIn2HdcpCapabilityFeedback { get; protected set; }
|
//public override ushort HdcpSupportCapability { get; protected set; }
|
||||||
|
|
||||||
//public override IntFeedback HdcpSupportAllFeedback { get; protected set; }
|
/// <summary>
|
||||||
//public override ushort HdcpSupportCapability { get; protected set; }
|
/// Helps get the "real" inputs, including when in Auto
|
||||||
|
/// </summary>
|
||||||
/// <summary>
|
public eX02VideoSourceType ActualActiveVideoInput
|
||||||
/// Helps get the "real" inputs, including when in Auto
|
{
|
||||||
/// </summary>
|
get
|
||||||
public Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType ActualActiveVideoInput
|
{
|
||||||
{
|
if (Tx.VideoSourceFeedback != eVst.Auto)
|
||||||
get
|
return Tx.VideoSourceFeedback;
|
||||||
{
|
if (Tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
||||||
if (Tx.VideoSourceFeedback != eVst.Auto)
|
return eVst.Hdmi1;
|
||||||
return Tx.VideoSourceFeedback;
|
if (Tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue)
|
||||||
else // auto
|
return eVst.Hdmi2;
|
||||||
{
|
|
||||||
if (Tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
return Tx.DisplayPortInput.SyncDetectedFeedback.BoolValue ? eVst.Vga : eVst.AllDisabled;
|
||||||
return eVst.Hdmi1;
|
}
|
||||||
else if (Tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue)
|
}
|
||||||
return eVst.Hdmi2;
|
public RoutingPortCollection<RoutingInputPort> InputPorts
|
||||||
else if (Tx.DisplayPortInput.SyncDetectedFeedback.BoolValue)
|
{
|
||||||
return eVst.Vga;
|
get
|
||||||
else
|
{
|
||||||
return eVst.AllDisabled;
|
return new RoutingPortCollection<RoutingInputPort>
|
||||||
}
|
{
|
||||||
}
|
HdmiIn1,
|
||||||
}
|
HdmiIn2,
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts
|
DisplayPortIn,
|
||||||
{
|
AnyVideoInput
|
||||||
get
|
};
|
||||||
{
|
}
|
||||||
return new RoutingPortCollection<RoutingInputPort>
|
}
|
||||||
{
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
||||||
HdmiIn1,
|
{
|
||||||
HdmiIn2,
|
get
|
||||||
DisplayPortIn,
|
{
|
||||||
AnyVideoInput
|
return new RoutingPortCollection<RoutingOutputPort> { DmOut, HdmiLoopOut };
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
}
|
public DmTx4kz302CController(string key, string name, DmTx4kz302C tx)
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
: base(key, name, tx)
|
||||||
{
|
{
|
||||||
get
|
Tx = tx;
|
||||||
{
|
|
||||||
return new RoutingPortCollection<RoutingOutputPort> { DmOut, HdmiLoopOut };
|
HdmiIn1 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn1,
|
||||||
}
|
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this,
|
||||||
}
|
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[1]));
|
||||||
public DmTx4kz302CController(string key, string name, DmTx4kz302C tx)
|
HdmiIn2 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn2,
|
||||||
: base(key, name, tx)
|
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi2, this,
|
||||||
{
|
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[2]));
|
||||||
Tx = tx;
|
DisplayPortIn = new RoutingInputPortWithVideoStatuses(DmPortName.VgaIn,
|
||||||
|
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DisplayPort, eVst.DisplayPort, this,
|
||||||
HdmiIn1 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn1,
|
VideoStatusHelper.GetDisplayPortInputStatusFuncs(tx.DisplayPortInput));
|
||||||
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this,
|
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
|
||||||
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[1]));
|
() => ActualActiveVideoInput.ToString());
|
||||||
HdmiIn2 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn2,
|
|
||||||
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi2, this,
|
Tx.HdmiInputs[1].InputStreamChange += InputStreamChangeEvent;
|
||||||
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[2]));
|
Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent;
|
||||||
DisplayPortIn = new RoutingInputPortWithVideoStatuses(DmPortName.VgaIn,
|
Tx.DisplayPortInput.InputStreamChange += DisplayPortInputStreamChange;
|
||||||
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DisplayPort, eVst.DisplayPort, this,
|
Tx.BaseEvent += Tx_BaseEvent;
|
||||||
VideoStatusHelper.GetDisplayPortInputStatusFuncs(tx.DisplayPortInput));
|
|
||||||
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
|
VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback);
|
||||||
() => ActualActiveVideoInput.ToString());
|
AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback);
|
||||||
|
|
||||||
Tx.HdmiInputs[1].InputStreamChange += InputStreamChangeEvent;
|
HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability", () => (int)tx.HdmiInputs[1].HdcpCapabilityFeedback);
|
||||||
Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent;
|
|
||||||
Tx.BaseEvent += Tx_BaseEvent;
|
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
||||||
|
|
||||||
VideoSourceNumericFeedback = new IntFeedback(() =>
|
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
||||||
{
|
|
||||||
return (int)Tx.VideoSourceFeedback;
|
Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue);
|
||||||
});
|
|
||||||
AudioSourceNumericFeedback = new IntFeedback(() =>
|
Hdmi2VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue);
|
||||||
{
|
|
||||||
return (int)Tx.AudioSourceFeedback;
|
DisplayPortVideoSyncFeedback = new BoolFeedback(() => (bool)tx.DisplayPortInput.SyncDetectedFeedback.BoolValue);
|
||||||
});
|
|
||||||
|
|
||||||
HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability", () =>
|
var combinedFuncs = new VideoStatusFuncsWrapper
|
||||||
{
|
{
|
||||||
return (int)tx.HdmiInputs[1].HdcpCapabilityFeedback;
|
HdcpActiveFeedbackFunc = () =>
|
||||||
});
|
(ActualActiveVideoInput == eVst.Hdmi1
|
||||||
|
&& tx.HdmiInputs[1].VideoAttributes.HdcpActiveFeedback.BoolValue)
|
||||||
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () =>
|
|| (ActualActiveVideoInput == eVst.Hdmi2
|
||||||
{
|
&& tx.HdmiInputs[2].VideoAttributes.HdcpActiveFeedback.BoolValue),
|
||||||
return (int)tx.HdmiInputs[2].HdcpCapabilityFeedback;
|
|
||||||
});
|
HdcpStateFeedbackFunc = () =>
|
||||||
|
{
|
||||||
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
if (ActualActiveVideoInput == eVst.Hdmi1)
|
||||||
|
return tx.HdmiInputs[1].VideoAttributes.HdcpStateFeedback.ToString();
|
||||||
|
return ActualActiveVideoInput == eVst.Hdmi2 ? tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString() : "";
|
||||||
var combinedFuncs = new VideoStatusFuncsWrapper
|
},
|
||||||
{
|
|
||||||
HdcpActiveFeedbackFunc = () =>
|
VideoResolutionFeedbackFunc = () =>
|
||||||
(ActualActiveVideoInput == eVst.Hdmi1
|
{
|
||||||
&& tx.HdmiInputs[1].VideoAttributes.HdcpActiveFeedback.BoolValue)
|
if (ActualActiveVideoInput == eVst.Hdmi1)
|
||||||
|| (ActualActiveVideoInput == eVst.Hdmi2
|
return tx.HdmiInputs[1].VideoAttributes.GetVideoResolutionString();
|
||||||
&& tx.HdmiInputs[2].VideoAttributes.HdcpActiveFeedback.BoolValue),
|
if (ActualActiveVideoInput == eVst.Hdmi2)
|
||||||
|
return tx.HdmiInputs[2].VideoAttributes.GetVideoResolutionString();
|
||||||
HdcpStateFeedbackFunc = () =>
|
return ActualActiveVideoInput == eVst.Vga ? tx.DisplayPortInput.VideoAttributes.GetVideoResolutionString() : "";
|
||||||
{
|
},
|
||||||
if (ActualActiveVideoInput == eVst.Hdmi1)
|
VideoSyncFeedbackFunc = () =>
|
||||||
return tx.HdmiInputs[1].VideoAttributes.HdcpStateFeedback.ToString();
|
(ActualActiveVideoInput == eVst.Hdmi1
|
||||||
if (ActualActiveVideoInput == eVst.Hdmi2)
|
&& tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
||||||
return tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString();
|
|| (ActualActiveVideoInput == eVst.Hdmi2
|
||||||
return "";
|
&& tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue)
|
||||||
},
|
|| (ActualActiveVideoInput == eVst.Vga
|
||||||
|
&& tx.DisplayPortInput.SyncDetectedFeedback.BoolValue)
|
||||||
VideoResolutionFeedbackFunc = () =>
|
|
||||||
{
|
};
|
||||||
if (ActualActiveVideoInput == eVst.Hdmi1)
|
|
||||||
return tx.HdmiInputs[1].VideoAttributes.GetVideoResolutionString();
|
AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn,
|
||||||
if (ActualActiveVideoInput == eVst.Hdmi2)
|
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
|
||||||
return tx.HdmiInputs[2].VideoAttributes.GetVideoResolutionString();
|
|
||||||
if (ActualActiveVideoInput == eVst.Vga)
|
DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
return tx.DisplayPortInput.VideoAttributes.GetVideoResolutionString();
|
eRoutingPortConnectionType.DmCat, null, this);
|
||||||
return "";
|
HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
},
|
eRoutingPortConnectionType.Hdmi, null, this);
|
||||||
VideoSyncFeedbackFunc = () =>
|
|
||||||
(ActualActiveVideoInput == eVst.Hdmi1
|
|
||||||
&& tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,
|
||||||
|| (ActualActiveVideoInput == eVst.Hdmi2
|
AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback,
|
||||||
&& tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue)
|
AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback,
|
||||||
|| (ActualActiveVideoInput == eVst.Vga
|
AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiIn1HdcpCapabilityFeedback, HdmiIn2HdcpCapabilityFeedback,
|
||||||
&& tx.DisplayPortInput.SyncDetectedFeedback.BoolValue)
|
Hdmi1VideoSyncFeedback, Hdmi2VideoSyncFeedback, DisplayPortVideoSyncFeedback);
|
||||||
|
|
||||||
};
|
// Set Ports for CEC
|
||||||
|
HdmiIn1.Port = Tx.HdmiInputs[1];
|
||||||
AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn,
|
HdmiIn2.Port = Tx.HdmiInputs[2];
|
||||||
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
|
HdmiLoopOut.Port = Tx.HdmiOutput;
|
||||||
|
DmOut.Port = Tx.DmOutput;
|
||||||
DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
}
|
||||||
eRoutingPortConnectionType.DmCat, null, this);
|
|
||||||
HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
void DisplayPortInputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
{
|
||||||
|
Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
||||||
|
|
||||||
AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,
|
switch (args.EventId)
|
||||||
AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback,
|
{
|
||||||
AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback,
|
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||||
AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiIn1HdcpCapabilityFeedback, HdmiIn2HdcpCapabilityFeedback);
|
DisplayPortVideoSyncFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
// 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);
|
||||||
public override bool CustomActivate()
|
Tx.HdmiInputs[1].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn1, a.EventId);
|
||||||
{
|
|
||||||
// Link up all of these damned events to the various RoutingPorts via a helper handler
|
Tx.HdmiInputs[2].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn2, a.EventId);
|
||||||
Tx.HdmiInputs[1].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn1, a.EventId);
|
Tx.HdmiInputs[2].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn2, a.EventId);
|
||||||
Tx.HdmiInputs[1].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn1, a.EventId);
|
|
||||||
|
Tx.DisplayPortInput.InputStreamChange += (o, a) => FowardInputStreamChange(DisplayPortIn, a.EventId);
|
||||||
Tx.HdmiInputs[2].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn2, a.EventId);
|
Tx.DisplayPortInput.VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(DisplayPortIn, a.EventId);
|
||||||
Tx.HdmiInputs[2].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn2, a.EventId);
|
|
||||||
|
// Base does register and sets up comm monitoring.
|
||||||
Tx.DisplayPortInput.InputStreamChange += (o, a) => FowardInputStreamChange(DisplayPortIn, a.EventId);
|
return base.CustomActivate();
|
||||||
Tx.DisplayPortInput.VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(DisplayPortIn, a.EventId);
|
}
|
||||||
|
|
||||||
// Base does register and sets up comm monitoring.
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
return base.CustomActivate();
|
{
|
||||||
}
|
var joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
if (Hdmi1VideoSyncFeedback != null)
|
||||||
{
|
{
|
||||||
LinkDmTxToApi(this, trilist, joinStart, joinMapKey, bridge);
|
Hdmi1VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]);
|
||||||
}
|
}
|
||||||
|
if (Hdmi2VideoSyncFeedback != null)
|
||||||
public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type)
|
{
|
||||||
{
|
Hdmi2VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]);
|
||||||
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
|
}
|
||||||
|
if (DisplayPortVideoSyncFeedback != null)
|
||||||
switch (input)
|
{
|
||||||
{
|
DisplayPortVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input3VideoSyncStatus.JoinNumber]);
|
||||||
case 0:
|
}
|
||||||
{
|
|
||||||
ExecuteSwitch(eVst.Auto, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
|
LinkDmTxToApi(this, trilist, joinMap, bridge);
|
||||||
break;
|
}
|
||||||
}
|
|
||||||
case 1:
|
public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type)
|
||||||
{
|
{
|
||||||
ExecuteSwitch(HdmiIn1.Selector, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
|
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
|
||||||
break;
|
|
||||||
}
|
switch (input)
|
||||||
case 2:
|
{
|
||||||
{
|
case 0:
|
||||||
ExecuteSwitch(HdmiIn2.Selector, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
|
{
|
||||||
break;
|
ExecuteSwitch(eVst.Auto, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
|
||||||
}
|
break;
|
||||||
case 3:
|
}
|
||||||
{
|
case 1:
|
||||||
ExecuteSwitch(DisplayPortIn.Selector, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
|
{
|
||||||
break;
|
ExecuteSwitch(HdmiIn1.Selector, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
|
||||||
}
|
break;
|
||||||
case 4:
|
}
|
||||||
{
|
case 2:
|
||||||
ExecuteSwitch(eVst.AllDisabled, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
|
{
|
||||||
break;
|
ExecuteSwitch(HdmiIn2.Selector, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
|
case 3:
|
||||||
|
{
|
||||||
}
|
ExecuteSwitch(DisplayPortIn.Selector, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
|
||||||
|
break;
|
||||||
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
}
|
||||||
{
|
case 4:
|
||||||
if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
{
|
||||||
Tx.VideoSource = (eVst)inputSelector;
|
ExecuteSwitch(eVst.AllDisabled, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
|
||||||
|
break;
|
||||||
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
||||||
{
|
{
|
||||||
Debug.Console(2, "{0} event {1} stream {2}", this.Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
||||||
|
Tx.VideoSource = (eVst)inputSelector;
|
||||||
if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId)
|
|
||||||
{
|
// NOTE: It's possible that this particular TX model may not like the AudioSource property being set.
|
||||||
if (inputStream == Tx.HdmiInputs[1])
|
// The SIMPL definition only shows a single analog for AudioVideo Source
|
||||||
HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
if ((signalType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
||||||
else if (inputStream == Tx.HdmiInputs[2])
|
//it doesn't
|
||||||
HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
Debug.Console(2, this, "Unable to execute audio-only switch for tx {0}", Key);
|
||||||
}
|
//Tx.AudioSource = (eAst)inputSelector;
|
||||||
else if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId)
|
}
|
||||||
{
|
|
||||||
if (inputStream == Tx.HdmiInputs[1])
|
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||||
HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
{
|
||||||
else if (inputStream == Tx.HdmiInputs[2])
|
Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
||||||
HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
|
||||||
}
|
switch (args.EventId)
|
||||||
}
|
{
|
||||||
|
case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId:
|
||||||
void Tx_BaseEvent(GenericBase device, BaseEventArgs args)
|
if (inputStream == Tx.HdmiInputs[1]) HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
||||||
{
|
if (inputStream == Tx.HdmiInputs[2]) HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
||||||
var id = args.EventId;
|
break;
|
||||||
if (id == EndpointTransmitterBase.VideoSourceFeedbackEventId)
|
case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId:
|
||||||
{
|
if (inputStream == Tx.HdmiInputs[1]) HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
||||||
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
if (inputStream == Tx.HdmiInputs[2]) HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
||||||
VideoSourceNumericFeedback.FireUpdate();
|
break;
|
||||||
ActiveVideoInputFeedback.FireUpdate();
|
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||||
}
|
if (inputStream == Tx.HdmiInputs[1]) Hdmi1VideoSyncFeedback.FireUpdate();
|
||||||
|
if (inputStream == Tx.HdmiInputs[2]) Hdmi2VideoSyncFeedback.FireUpdate();
|
||||||
// ------------------------------ incomplete -----------------------------------------
|
break;
|
||||||
else if (id == EndpointTransmitterBase.AudioSourceFeedbackEventId)
|
}
|
||||||
{
|
}
|
||||||
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
|
||||||
AudioSourceNumericFeedback.FireUpdate();
|
void Tx_BaseEvent(GenericBase device, BaseEventArgs args)
|
||||||
}
|
{
|
||||||
}
|
var id = args.EventId;
|
||||||
|
switch (id)
|
||||||
/// <summary>
|
{
|
||||||
/// Relays the input stream change to the appropriate RoutingInputPort.
|
case EndpointTransmitterBase.VideoSourceFeedbackEventId:
|
||||||
/// </summary>
|
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
||||||
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
VideoSourceNumericFeedback.FireUpdate();
|
||||||
{
|
ActiveVideoInputFeedback.FireUpdate();
|
||||||
if (eventId == EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
break;
|
||||||
{
|
case EndpointTransmitterBase.AudioSourceFeedbackEventId:
|
||||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
||||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
AudioSourceNumericFeedback.FireUpdate();
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/// <summary>
|
|
||||||
/// Relays the VideoAttributes change to a RoutingInputPort
|
/// <summary>
|
||||||
/// </summary>
|
/// Relays the input stream change to the appropriate RoutingInputPort.
|
||||||
void ForwardVideoAttributeChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
/// </summary>
|
||||||
{
|
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||||
//// LOCATION: Crestron.SimplSharpPro.DM.VideoAttributeEventIds
|
{
|
||||||
//Debug.Console(2, this, "VideoAttributes_AttributeChange event id={0} from {1}",
|
if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId) return;
|
||||||
// args.EventId, (sender as VideoAttributesEnhanced).Owner.GetType());
|
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||||
switch (eventId)
|
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||||
{
|
}
|
||||||
case VideoAttributeEventIds.HdcpActiveFeedbackEventId:
|
|
||||||
inputPort.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
/// <summary>
|
||||||
AnyVideoInput.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
/// Relays the VideoAttributes change to a RoutingInputPort
|
||||||
break;
|
/// </summary>
|
||||||
case VideoAttributeEventIds.HdcpStateFeedbackEventId:
|
void ForwardVideoAttributeChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||||
inputPort.VideoStatus.HdcpStateFeedback.FireUpdate();
|
{
|
||||||
AnyVideoInput.VideoStatus.HdcpStateFeedback.FireUpdate();
|
//// LOCATION: Crestron.SimplSharpPro.DM.VideoAttributeEventIds
|
||||||
break;
|
//Debug.Console(2, this, "VideoAttributes_AttributeChange event id={0} from {1}",
|
||||||
case VideoAttributeEventIds.HorizontalResolutionFeedbackEventId:
|
// args.EventId, (sender as VideoAttributesEnhanced).Owner.GetType());
|
||||||
case VideoAttributeEventIds.VerticalResolutionFeedbackEventId:
|
switch (eventId)
|
||||||
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
{
|
||||||
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
case VideoAttributeEventIds.HdcpActiveFeedbackEventId:
|
||||||
break;
|
inputPort.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
||||||
case VideoAttributeEventIds.FramesPerSecondFeedbackEventId:
|
AnyVideoInput.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
||||||
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
break;
|
||||||
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
case VideoAttributeEventIds.HdcpStateFeedbackEventId:
|
||||||
break;
|
inputPort.VideoStatus.HdcpStateFeedback.FireUpdate();
|
||||||
}
|
AnyVideoInput.VideoStatus.HdcpStateFeedback.FireUpdate();
|
||||||
}
|
break;
|
||||||
|
case VideoAttributeEventIds.HorizontalResolutionFeedbackEventId:
|
||||||
|
case VideoAttributeEventIds.VerticalResolutionFeedbackEventId:
|
||||||
#region IIROutputPorts Members
|
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return Tx.IROutputPorts; } }
|
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||||
public int NumberOfIROutputPorts { get { return Tx.NumberOfIROutputPorts; } }
|
break;
|
||||||
#endregion
|
case VideoAttributeEventIds.FramesPerSecondFeedbackEventId:
|
||||||
|
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||||
#region IComPorts Members
|
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||||
public CrestronCollection<ComPort> ComPorts { get { return Tx.ComPorts; } }
|
break;
|
||||||
public int NumberOfComPorts { get { return Tx.NumberOfComPorts; } }
|
}
|
||||||
#endregion
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
#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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -27,7 +27,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// <param name="name"></param>
|
/// <param name="name"></param>
|
||||||
/// <param name="props"></param>
|
/// <param name="props"></param>
|
||||||
/// <returns></returns>
|
/// <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...
|
// switch on type name... later...
|
||||||
|
|
||||||
@@ -43,12 +43,16 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
if(typeName.StartsWith("dmtx200"))
|
if(typeName.StartsWith("dmtx200"))
|
||||||
return new DmTx200Controller(key, name, new DmTx200C2G(ipid, Global.ControlSystem));
|
return new DmTx200Controller(key, name, new DmTx200C2G(ipid, Global.ControlSystem));
|
||||||
if (typeName.StartsWith("dmtx201"))
|
if (typeName.StartsWith("dmtx4kz100"))
|
||||||
return new DmTx201XController(key, name, new DmTx201S(ipid, Global.ControlSystem));
|
return new DmTx4kz100Controller(key, name, new DmTx4kz100C1G(ipid, Global.ControlSystem));
|
||||||
|
if (typeName.StartsWith("dmtx201c"))
|
||||||
|
return new DmTx201CController(key, name, new DmTx201C(ipid, Global.ControlSystem));
|
||||||
|
if (typeName.StartsWith("dmtx201s"))
|
||||||
|
return new DmTx201SController(key, name, new DmTx201S(ipid, Global.ControlSystem));
|
||||||
if (typeName.StartsWith("dmtx4k202"))
|
if (typeName.StartsWith("dmtx4k202"))
|
||||||
return new DmTx4k202CController(key, name, new DmTx4k202C(ipid, Global.ControlSystem));
|
return new DmTx4k202CController(key, name, new DmTx4k202C(ipid, Global.ControlSystem));
|
||||||
if (typeName.StartsWith("dmtx4kz202"))
|
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"))
|
if (typeName.StartsWith("dmtx4k302"))
|
||||||
return new DmTx4k302CController(key, name, new DmTx4k302C(ipid, Global.ControlSystem));
|
return new DmTx4k302CController(key, name, new DmTx4k302C(ipid, Global.ControlSystem));
|
||||||
if (typeName.StartsWith("dmtx4kz302"))
|
if (typeName.StartsWith("dmtx4kz302"))
|
||||||
@@ -100,14 +104,18 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
if (typeName.StartsWith("dmtx200"))
|
if (typeName.StartsWith("dmtx200"))
|
||||||
return new DmTx200Controller(key, name, new DmTx200C2G(chassis.Inputs[num]));
|
return new DmTx200Controller(key, name, new DmTx200C2G(chassis.Inputs[num]));
|
||||||
if (typeName.StartsWith("dmtx201"))
|
if (typeName.StartsWith("dmtx201c"))
|
||||||
return new DmTx201XController(key, name, new DmTx201C(chassis.Inputs[num]));
|
return new DmTx201CController(key, name, new DmTx201C(chassis.Inputs[num]));
|
||||||
|
if (typeName.StartsWith("dmtx201s"))
|
||||||
|
return new DmTx201SController(key, name, new DmTx201S(chassis.Inputs[num]));
|
||||||
if (typeName.StartsWith("dmtx4k100"))
|
if (typeName.StartsWith("dmtx4k100"))
|
||||||
return new DmTx4k100Controller(key, name, new DmTx4K100C1G(chassis.Inputs[num]));
|
return new DmTx4k100Controller(key, name, new DmTx4K100C1G(chassis.Inputs[num]));
|
||||||
|
if (typeName.StartsWith("dmtx4kz100"))
|
||||||
|
return new DmTx4kz100Controller(key, name, new DmTx4kz100C1G(chassis.Inputs[num]));
|
||||||
if (typeName.StartsWith("dmtx4k202"))
|
if (typeName.StartsWith("dmtx4k202"))
|
||||||
return new DmTx4k202CController(key, name, new DmTx4k202C(chassis.Inputs[num]));
|
return new DmTx4k202CController(key, name, new DmTx4k202C(chassis.Inputs[num]));
|
||||||
if (typeName.StartsWith("dmtx4kz202"))
|
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"))
|
if (typeName.StartsWith("dmtx4k302"))
|
||||||
return new DmTx4k302CController(key, name, new DmTx4k302C(chassis.Inputs[num]));
|
return new DmTx4k302CController(key, name, new DmTx4k302C(chassis.Inputs[num]));
|
||||||
if (typeName.StartsWith("dmtx4kz302"))
|
if (typeName.StartsWith("dmtx4kz302"))
|
||||||
@@ -119,14 +127,18 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
if (typeName.StartsWith("dmtx200"))
|
if (typeName.StartsWith("dmtx200"))
|
||||||
return new DmTx200Controller(key, name, new DmTx200C2G(ipid, chassis.Inputs[num]));
|
return new DmTx200Controller(key, name, new DmTx200C2G(ipid, chassis.Inputs[num]));
|
||||||
if (typeName.StartsWith("dmtx201"))
|
if (typeName.StartsWith("dmtx201c"))
|
||||||
return new DmTx201XController(key, name, new DmTx201C(ipid, chassis.Inputs[num]));
|
return new DmTx201CController(key, name, new DmTx201C(ipid, chassis.Inputs[num]));
|
||||||
|
if (typeName.StartsWith("dmtx201s"))
|
||||||
|
return new DmTx201SController(key, name, new DmTx201S(ipid, chassis.Inputs[num]));
|
||||||
if (typeName.StartsWith("dmtx4k100"))
|
if (typeName.StartsWith("dmtx4k100"))
|
||||||
return new DmTx4k100Controller(key, name, new DmTx4K100C1G(ipid, chassis.Inputs[num]));
|
return new DmTx4k100Controller(key, name, new DmTx4K100C1G(ipid, chassis.Inputs[num]));
|
||||||
|
if (typeName.StartsWith("dmtx4kz100"))
|
||||||
|
return new DmTx4kz100Controller(key, name, new DmTx4kz100C1G(ipid, chassis.Inputs[num]));
|
||||||
if (typeName.StartsWith("dmtx4k202"))
|
if (typeName.StartsWith("dmtx4k202"))
|
||||||
return new DmTx4k202CController(key, name, new DmTx4k202C(ipid, chassis.Inputs[num]));
|
return new DmTx4k202CController(key, name, new DmTx4k202C(ipid, chassis.Inputs[num]));
|
||||||
if (typeName.StartsWith("dmtx4kz202"))
|
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"))
|
if (typeName.StartsWith("dmtx4k302"))
|
||||||
return new DmTx4k302CController(key, name, new DmTx4k302C(ipid, chassis.Inputs[num]));
|
return new DmTx4k302CController(key, name, new DmTx4k302C(ipid, chassis.Inputs[num]));
|
||||||
if (typeName.StartsWith("dmtx4kz302"))
|
if (typeName.StartsWith("dmtx4kz302"))
|
||||||
@@ -145,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>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Description("Wrapper class for all DM-TX variants")]
|
[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 void SetPortHdcpCapability(eHdcpCapabilityType hdcpMode, uint port) { }
|
||||||
public virtual eHdcpCapabilityType HdcpSupportCapability { get; protected set; }
|
public virtual eHdcpCapabilityType HdcpSupportCapability { get; protected set; }
|
||||||
@@ -171,30 +192,26 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void LinkDmTxToApi(DmTxControllerBase tx, BasicTriList trilist, uint joinStart, string joinMapKey,
|
protected DmTxControllerJoinMap GetDmTxJoinMap(uint joinStart, string joinMapKey)
|
||||||
EiscApiAdvanced bridge)
|
{
|
||||||
{
|
var joinMap = new DmTxControllerJoinMap(joinStart);
|
||||||
var joinMap = new DmTxControllerJoinMap();
|
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<DmTxControllerJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<DmTxControllerJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
return joinMap;
|
||||||
|
}
|
||||||
|
|
||||||
if (tx.Hardware is DmHDBasedTEndPoint)
|
protected void LinkDmTxToApi(DmTxControllerBase tx, BasicTriList trilist, DmTxControllerJoinMap joinMap, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
Debug.Console(1, tx, "No properties to link. Skipping device {0}", tx.Name);
|
Debug.Console(1, tx, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
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]);
|
||||||
tx.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
tx.AnyVideoInput.VideoStatus.VideoResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentInputResolution.JoinNumber]);
|
||||||
tx.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus]);
|
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber].UShortValue = (ushort)tx.HdcpSupportCapability;
|
||||||
tx.AnyVideoInput.VideoStatus.VideoResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentInputResolution]);
|
|
||||||
trilist.UShortInput[joinMap.HdcpSupportCapability].UShortValue = (ushort)tx.HdcpSupportCapability;
|
|
||||||
|
|
||||||
bool hdcpTypeSimple;
|
bool hdcpTypeSimple;
|
||||||
|
|
||||||
@@ -207,15 +224,15 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
var txR = tx as ITxRouting;
|
var txR = tx as ITxRouting;
|
||||||
|
|
||||||
trilist.SetUShortSigAction(joinMap.VideoInput,
|
trilist.SetUShortSigAction(joinMap.VideoInput.JoinNumber,
|
||||||
i => txR.ExecuteNumericSwitch(i, 0, eRoutingSignalType.Video));
|
i => txR.ExecuteNumericSwitch(i, 0, eRoutingSignalType.Video));
|
||||||
trilist.SetUShortSigAction(joinMap.AudioInput,
|
trilist.SetUShortSigAction(joinMap.AudioInput.JoinNumber,
|
||||||
i => txR.ExecuteNumericSwitch(i, 0, eRoutingSignalType.Audio));
|
i => txR.ExecuteNumericSwitch(i, 0, eRoutingSignalType.Audio));
|
||||||
|
|
||||||
txR.VideoSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoInput]);
|
txR.VideoSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoInput.JoinNumber]);
|
||||||
txR.AudioSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.AudioInput]);
|
txR.AudioSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.AudioInput.JoinNumber]);
|
||||||
|
|
||||||
trilist.UShortInput[joinMap.HdcpSupportCapability].UShortValue = (ushort)tx.HdcpSupportCapability;
|
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber].UShortValue = (ushort)tx.HdcpSupportCapability;
|
||||||
|
|
||||||
if (txR.InputPorts[DmPortName.HdmiIn] != null)
|
if (txR.InputPorts[DmPortName.HdmiIn] != null)
|
||||||
{
|
{
|
||||||
@@ -225,14 +242,14 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
var intFeedback = tx.Feedbacks["HdmiInHdcpCapability"] as IntFeedback;
|
var intFeedback = tx.Feedbacks["HdmiInHdcpCapability"] as IntFeedback;
|
||||||
if (intFeedback != null)
|
if (intFeedback != null)
|
||||||
intFeedback.LinkInputSig(trilist.UShortInput[joinMap.Port1HdcpState]);
|
intFeedback.LinkInputSig(trilist.UShortInput[joinMap.Port1HdcpState.JoinNumber]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inputPort.ConnectionType == eRoutingPortConnectionType.Hdmi && inputPort.Port != null)
|
if (inputPort.ConnectionType == eRoutingPortConnectionType.Hdmi && inputPort.Port != null)
|
||||||
{
|
{
|
||||||
var port = inputPort.Port as EndpointHdmiInput;
|
var port = inputPort.Port as EndpointHdmiInput;
|
||||||
|
|
||||||
SetHdcpCapabilityAction(hdcpTypeSimple, port, joinMap.Port1HdcpState, trilist);
|
SetHdcpCapabilityAction(hdcpTypeSimple, port, joinMap.Port1HdcpState.JoinNumber, trilist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -244,14 +261,14 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
var intFeedback = tx.Feedbacks["HdmiIn1HdcpCapability"] as IntFeedback;
|
var intFeedback = tx.Feedbacks["HdmiIn1HdcpCapability"] as IntFeedback;
|
||||||
if (intFeedback != null)
|
if (intFeedback != null)
|
||||||
intFeedback.LinkInputSig(trilist.UShortInput[joinMap.Port1HdcpState]);
|
intFeedback.LinkInputSig(trilist.UShortInput[joinMap.Port1HdcpState.JoinNumber]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inputPort.ConnectionType == eRoutingPortConnectionType.Hdmi && inputPort.Port != null)
|
if (inputPort.ConnectionType == eRoutingPortConnectionType.Hdmi && inputPort.Port != null)
|
||||||
{
|
{
|
||||||
var port = inputPort.Port as EndpointHdmiInput;
|
var port = inputPort.Port as EndpointHdmiInput;
|
||||||
|
|
||||||
SetHdcpCapabilityAction(hdcpTypeSimple, port, joinMap.Port1HdcpState, trilist);
|
SetHdcpCapabilityAction(hdcpTypeSimple, port, joinMap.Port1HdcpState.JoinNumber, trilist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -263,14 +280,14 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
var intFeedback = tx.Feedbacks["HdmiIn2HdcpCapability"] as IntFeedback;
|
var intFeedback = tx.Feedbacks["HdmiIn2HdcpCapability"] as IntFeedback;
|
||||||
if (intFeedback != null)
|
if (intFeedback != null)
|
||||||
intFeedback.LinkInputSig(trilist.UShortInput[joinMap.Port1HdcpState]);
|
intFeedback.LinkInputSig(trilist.UShortInput[joinMap.Port1HdcpState.JoinNumber]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inputPort.ConnectionType == eRoutingPortConnectionType.Hdmi && inputPort.Port != null)
|
if (inputPort.ConnectionType == eRoutingPortConnectionType.Hdmi && inputPort.Port != null)
|
||||||
{
|
{
|
||||||
var port = inputPort.Port as EndpointHdmiInput;
|
var port = inputPort.Port as EndpointHdmiInput;
|
||||||
|
|
||||||
SetHdcpCapabilityAction(hdcpTypeSimple, port, joinMap.Port2HdcpState, trilist);
|
SetHdcpCapabilityAction(hdcpTypeSimple, port, joinMap.Port2HdcpState.JoinNumber, trilist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -279,19 +296,19 @@ namespace PepperDash.Essentials.DM
|
|||||||
var txFreeRun = tx as IHasFreeRun;
|
var txFreeRun = tx as IHasFreeRun;
|
||||||
if (txFreeRun != null)
|
if (txFreeRun != null)
|
||||||
{
|
{
|
||||||
txFreeRun.FreeRunEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.FreeRunEnabled]);
|
txFreeRun.FreeRunEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.FreeRunEnabled.JoinNumber]);
|
||||||
trilist.SetBoolSigAction(joinMap.FreeRunEnabled, new Action<bool>(txFreeRun.SetFreeRunEnabled));
|
trilist.SetBoolSigAction(joinMap.FreeRunEnabled.JoinNumber, txFreeRun.SetFreeRunEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
var txVga = tx as IVgaBrightnessContrastControls;
|
var txVga = tx as IVgaBrightnessContrastControls;
|
||||||
{
|
{
|
||||||
if (txVga == null) return;
|
if (txVga == null) return;
|
||||||
|
|
||||||
txVga.VgaBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.VgaBrightness]);
|
txVga.VgaBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.VgaBrightness.JoinNumber]);
|
||||||
txVga.VgaContrastFeedback.LinkInputSig(trilist.UShortInput[joinMap.VgaContrast]);
|
txVga.VgaContrastFeedback.LinkInputSig(trilist.UShortInput[joinMap.VgaContrast.JoinNumber]);
|
||||||
|
|
||||||
trilist.SetUShortSigAction(joinMap.VgaBrightness, txVga.SetVgaBrightness);
|
trilist.SetUShortSigAction(joinMap.VgaBrightness.JoinNumber, txVga.SetVgaBrightness);
|
||||||
trilist.SetUShortSigAction(joinMap.VgaContrast, txVga.SetVgaContrast);
|
trilist.SetUShortSigAction(joinMap.VgaContrast.JoinNumber, txVga.SetVgaContrast);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -327,7 +344,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
public DmTxControllerFactory()
|
public DmTxControllerFactory()
|
||||||
{
|
{
|
||||||
TypeNames = new List<string>() { "dmtx200c", "dmtx201c", "dmtx201s", "dmtx4k100c", "dmtx4k202c", "dmtx4kz202c", "dmtx4k302c", "dmtx4kz302c", "dmtx401c", "dmtx401s" };
|
TypeNames = new List<string>() { "dmtx200c", "dmtx201c", "dmtx201s", "dmtx4k100c", "dmtx4k202c", "dmtx4kz202c", "dmtx4k302c", "dmtx4kz302c",
|
||||||
|
"dmtx401c", "dmtx401s", "dmtx4k100c1g", "dmtx4kz100c1g" };
|
||||||
}
|
}
|
||||||
|
|
||||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -1,161 +1,165 @@
|
|||||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
<ProductVersion>9.0.30729</ProductVersion>
|
<ProductVersion>9.0.30729</ProductVersion>
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
<ProjectGuid>{9199CE8A-0C9F-4952-8672-3EED798B284F}</ProjectGuid>
|
<ProjectGuid>{9199CE8A-0C9F-4952-8672-3EED798B284F}</ProjectGuid>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>PepperDash_Essentials_DM</RootNamespace>
|
<RootNamespace>PepperDash_Essentials_DM</RootNamespace>
|
||||||
<AssemblyName>PepperDash_Essentials_DM</AssemblyName>
|
<AssemblyName>PepperDash_Essentials_DM</AssemblyName>
|
||||||
<ProjectTypeGuids>{0B4745B0-194B-4BB6-8E21-E9057CA92300};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
<ProjectTypeGuids>{0B4745B0-194B-4BB6-8E21-E9057CA92300};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||||
<PlatformFamilyName>WindowsCE</PlatformFamilyName>
|
<PlatformFamilyName>WindowsCE</PlatformFamilyName>
|
||||||
<PlatformID>E2BECB1F-8C8C-41ba-B736-9BE7D946A398</PlatformID>
|
<PlatformID>E2BECB1F-8C8C-41ba-B736-9BE7D946A398</PlatformID>
|
||||||
<OSVersion>5.0</OSVersion>
|
<OSVersion>5.0</OSVersion>
|
||||||
<DeployDirSuffix>SmartDeviceProject1</DeployDirSuffix>
|
<DeployDirSuffix>SmartDeviceProject1</DeployDirSuffix>
|
||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<NativePlatformName>Windows CE</NativePlatformName>
|
<NativePlatformName>Windows CE</NativePlatformName>
|
||||||
<FormFactorID>
|
<FormFactorID>
|
||||||
</FormFactorID>
|
</FormFactorID>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<AllowedReferenceRelatedFileExtensions>.allowedReferenceRelatedFileExtensions</AllowedReferenceRelatedFileExtensions>
|
<AllowedReferenceRelatedFileExtensions>.allowedReferenceRelatedFileExtensions</AllowedReferenceRelatedFileExtensions>
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>bin\</OutputPath>
|
<OutputPath>bin\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE;</DefineConstants>
|
<DefineConstants>DEBUG;TRACE;</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<NoStdLib>true</NoStdLib>
|
<NoStdLib>true</NoStdLib>
|
||||||
<NoConfig>true</NoConfig>
|
<NoConfig>true</NoConfig>
|
||||||
<GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
|
<GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<AllowedReferenceRelatedFileExtensions>.allowedReferenceRelatedFileExtensions</AllowedReferenceRelatedFileExtensions>
|
<AllowedReferenceRelatedFileExtensions>.allowedReferenceRelatedFileExtensions</AllowedReferenceRelatedFileExtensions>
|
||||||
<DebugType>none</DebugType>
|
<DebugType>none</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>bin\</OutputPath>
|
<OutputPath>bin\</OutputPath>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<NoStdLib>true</NoStdLib>
|
<NoStdLib>true</NoStdLib>
|
||||||
<NoConfig>true</NoConfig>
|
<NoConfig>true</NoConfig>
|
||||||
<GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
|
<GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Crestron.SimplSharpPro.DeviceSupport, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="Crestron.SimplSharpPro.DeviceSupport, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Crestron.SimplSharpPro.DM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="Crestron.SimplSharpPro.DM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Crestron.SimplSharpPro.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="Crestron.SimplSharpPro.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="mscorlib" />
|
<Reference Include="mscorlib" />
|
||||||
<Reference Include="PepperDash_Core, Version=1.0.26.30384, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="PepperDash_Core, Version=1.0.26.30384, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\pepperdashcore-builds\PepperDash_Core.dll</HintPath>
|
<HintPath>..\..\pepperdashcore-builds\PepperDash_Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SimplSharpHelperInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="SimplSharpHelperInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SimplSharpNewtonsoft, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="SimplSharpNewtonsoft, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SimplSharpPro, Version=1.5.3.17, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="SimplSharpPro, Version=1.5.3.17, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SimplSharpReflectionInterface, Version=1.0.5583.25238, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="SimplSharpReflectionInterface, Version=1.0.5583.25238, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="AirMedia\AirMediaPropertiesConfig.cs" />
|
<Compile Include="AirMedia\AirMediaPropertiesConfig.cs" />
|
||||||
<Compile Include="AirMedia\AirMediaController.cs" />
|
<Compile Include="AirMedia\AirMediaController.cs" />
|
||||||
<Compile Include="Chassis\DmBladeChassisController.cs" />
|
<Compile Include="Chassis\DmBladeChassisController.cs" />
|
||||||
<Compile Include="Chassis\DmCardAudioOutput.cs" />
|
<Compile Include="Chassis\DmCardAudioOutput.cs" />
|
||||||
<Compile Include="Chassis\DmChassisController.cs" />
|
<Compile Include="Chassis\DmChassisController.cs" />
|
||||||
<Compile Include="Chassis\DmpsAudioOutputController.cs" />
|
<Compile Include="Chassis\DmpsAudioOutputController.cs" />
|
||||||
<Compile Include="Chassis\DmpsInternalVirtualDmTxController.cs" />
|
<Compile Include="Chassis\DmpsInternalVirtualDmTxController.cs" />
|
||||||
<Compile Include="Chassis\DmpsRoutingController.cs" />
|
<Compile Include="Chassis\DmpsRoutingController.cs" />
|
||||||
<Compile Include="Chassis\HdMdNxM4kEController.cs" />
|
<Compile Include="Chassis\HdMdNxM4kEController.cs" />
|
||||||
<Compile Include="Endpoints\Receivers\DmRmc4kZ100CController.cs" />
|
<Compile Include="Endpoints\DGEs\DmDge200CController.cs" />
|
||||||
<Compile Include="Endpoints\Receivers\DmRmc4kZScalerCController.cs" />
|
<Compile Include="Endpoints\Receivers\DmRmc4kZ100CController.cs" />
|
||||||
<Compile Include="Endpoints\Transmitters\TxInterfaces.cs" />
|
<Compile Include="Endpoints\Receivers\DmRmc4kZScalerCController.cs" />
|
||||||
<Compile Include="IDmSwitch.cs" />
|
<Compile Include="Endpoints\Transmitters\DmTx4kz202CController.cs" />
|
||||||
<Compile Include="Config\DmpsRoutingConfig.cs" />
|
<Compile Include="Endpoints\Transmitters\DmTx201SController.cs" />
|
||||||
<Compile Include="Config\DmRmcConfig.cs" />
|
<Compile Include="Endpoints\Transmitters\DmTx4kz100Controller.cs" />
|
||||||
<Compile Include="Config\DmTxConfig.cs" />
|
<Compile Include="Endpoints\Transmitters\TxInterfaces.cs" />
|
||||||
<Compile Include="Config\DMChassisConfig.cs" />
|
<Compile Include="IDmSwitch.cs" />
|
||||||
<Compile Include="Config\HdMdNxM4kEPropertiesConfig.cs" />
|
<Compile Include="Config\DmpsRoutingConfig.cs" />
|
||||||
<Compile Include="Config\InputPropertiesConfig.cs" />
|
<Compile Include="Config\DmRmcConfig.cs" />
|
||||||
<Compile Include="DmPortName.cs" />
|
<Compile Include="Config\DmTxConfig.cs" />
|
||||||
<Compile Include="Endpoints\DGEs\DgeController.cs" />
|
<Compile Include="Config\DMChassisConfig.cs" />
|
||||||
<Compile Include="Endpoints\DGEs\DgePropertiesConfig.cs" />
|
<Compile Include="Config\HdMdNxM4kEPropertiesConfig.cs" />
|
||||||
<Compile Include="DmLite\HdMdxxxCEController.cs" />
|
<Compile Include="Config\InputPropertiesConfig.cs" />
|
||||||
<Compile Include="Endpoints\Receivers\DmHdBaseTEndpointController.cs" />
|
<Compile Include="DmPortName.cs" />
|
||||||
<Compile Include="Endpoints\Receivers\DmRmc100SController.cs" />
|
<Compile Include="Endpoints\DGEs\Dge100Controller.cs" />
|
||||||
<Compile Include="Endpoints\Receivers\DmRmc150SController.cs" />
|
<Compile Include="Endpoints\DGEs\DgePropertiesConfig.cs" />
|
||||||
<Compile Include="Endpoints\Receivers\DmRmc200CController.cs" />
|
<Compile Include="DmLite\HdMdxxxCEController.cs" />
|
||||||
<Compile Include="Endpoints\Receivers\DmRmc200S2Controller.cs" />
|
<Compile Include="Endpoints\Receivers\DmHdBaseTEndpointController.cs" />
|
||||||
<Compile Include="Endpoints\Receivers\DmRmc200SController.cs" />
|
<Compile Include="Endpoints\Receivers\DmRmc100SController.cs" />
|
||||||
<Compile Include="Endpoints\Receivers\DmRmc4k100C1GController.cs" />
|
<Compile Include="Endpoints\Receivers\DmRmc150SController.cs" />
|
||||||
<Compile Include="Endpoints\Receivers\DmRmc4KScalerCController.cs" />
|
<Compile Include="Endpoints\Receivers\DmRmc200CController.cs" />
|
||||||
<Compile Include="Endpoints\Receivers\DmRmc4kScalerCDspController.cs" />
|
<Compile Include="Endpoints\Receivers\DmRmc200S2Controller.cs" />
|
||||||
<Compile Include="Endpoints\Receivers\DmRmcScalerCController.cs" />
|
<Compile Include="Endpoints\Receivers\DmRmc200SController.cs" />
|
||||||
<Compile Include="Endpoints\Receivers\DmRmcX100CController.cs" />
|
<Compile Include="Endpoints\Receivers\DmRmc4k100C1GController.cs" />
|
||||||
<Compile Include="Endpoints\Receivers\DmRmcHelper.cs" />
|
<Compile Include="Endpoints\Receivers\DmRmc4KScalerCController.cs" />
|
||||||
<Compile Include="Endpoints\Receivers\DmRmcScalerS2Controller.cs" />
|
<Compile Include="Endpoints\Receivers\DmRmc4kScalerCDspController.cs" />
|
||||||
<Compile Include="Endpoints\Receivers\DmRmcScalerSController.cs" />
|
<Compile Include="Endpoints\Receivers\DmRmcScalerCController.cs" />
|
||||||
<Compile Include="Endpoints\Transmitters\DmTx200Controller.cs" />
|
<Compile Include="Endpoints\Receivers\DmRmcX100CController.cs" />
|
||||||
<Compile Include="Endpoints\Transmitters\DmTx401CController.cs" />
|
<Compile Include="Endpoints\Receivers\DmRmcHelper.cs" />
|
||||||
<Compile Include="Endpoints\Transmitters\DmTx4k100Controller.cs" />
|
<Compile Include="Endpoints\Receivers\DmRmcScalerS2Controller.cs" />
|
||||||
<Compile Include="Endpoints\Transmitters\DmTx4k202CController.cs" />
|
<Compile Include="Endpoints\Receivers\DmRmcScalerSController.cs" />
|
||||||
<Compile Include="Endpoints\Transmitters\DmTx4k302CController.cs" />
|
<Compile Include="Endpoints\Transmitters\DmTx200Controller.cs" />
|
||||||
<Compile Include="Endpoints\Transmitters\DmTx201CController.cs" />
|
<Compile Include="Endpoints\Transmitters\DmTx401CController.cs" />
|
||||||
<Compile Include="Endpoints\Transmitters\DmTx4kz302CController.cs" />
|
<Compile Include="Endpoints\Transmitters\DmTx4k100Controller.cs" />
|
||||||
<Compile Include="Endpoints\Transmitters\DmTxHelpers.cs" />
|
<Compile Include="Endpoints\Transmitters\DmTx4k202CController.cs" />
|
||||||
<Compile Include="Extensions.cs" />
|
<Compile Include="Endpoints\Transmitters\DmTx4k302CController.cs" />
|
||||||
<Compile Include="Config\DeviceFactory.cs" />
|
<Compile Include="Endpoints\Transmitters\DmTx201CController.cs" />
|
||||||
<Compile Include="IDmHdmiInputExtensions.cs" />
|
<Compile Include="Endpoints\Transmitters\DmTx4kz302CController.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Endpoints\Transmitters\DmTxHelpers.cs" />
|
||||||
<Compile Include="VideoStatusHelpers.cs" />
|
<Compile Include="Extensions.cs" />
|
||||||
<None Include="app.config" />
|
<Compile Include="Config\DeviceFactory.cs" />
|
||||||
<None Include="Properties\ControlSystem.cfg" />
|
<Compile Include="IDmHdmiInputExtensions.cs" />
|
||||||
</ItemGroup>
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<ItemGroup>
|
<Compile Include="VideoStatusHelpers.cs" />
|
||||||
<ProjectReference Include="..\..\Essentials Core\PepperDashEssentialsBase\PepperDash_Essentials_Core.csproj">
|
<None Include="app.config" />
|
||||||
<Project>{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}</Project>
|
<None Include="Properties\ControlSystem.cfg" />
|
||||||
<Name>PepperDash_Essentials_Core</Name>
|
</ItemGroup>
|
||||||
</ProjectReference>
|
<ItemGroup>
|
||||||
</ItemGroup>
|
<ProjectReference Include="..\..\Essentials Core\PepperDashEssentialsBase\PepperDash_Essentials_Core.csproj">
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
|
<Project>{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}</Project>
|
||||||
<ProjectExtensions>
|
<Name>PepperDash_Essentials_Core</Name>
|
||||||
<VisualStudio>
|
</ProjectReference>
|
||||||
</VisualStudio>
|
</ItemGroup>
|
||||||
</ProjectExtensions>
|
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
|
||||||
<PropertyGroup>
|
<ProjectExtensions>
|
||||||
<PostBuildEvent>rem S# Pro preparation will execute after these operations</PostBuildEvent>
|
<VisualStudio>
|
||||||
</PropertyGroup>
|
</VisualStudio>
|
||||||
|
</ProjectExtensions>
|
||||||
|
<PropertyGroup>
|
||||||
|
<PostBuildEvent>rem S# Pro preparation will execute after these operations</PostBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -85,8 +85,8 @@ namespace PepperDash.Essentials.Devices.Common.Environment.Lutron
|
|||||||
{
|
{
|
||||||
var joinMap = LinkLightingToApi(this, trilist, joinStart, joinMapKey, bridge);
|
var joinMap = LinkLightingToApi(this, trilist, joinStart, joinMapKey, bridge);
|
||||||
|
|
||||||
CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
||||||
trilist.SetStringSigAction(joinMap.IntegrationIdSet, s => IntegrationId = s);
|
trilist.SetStringSigAction(joinMap.IntegrationIdSet.JoinNumber , s => IntegrationId = s);
|
||||||
}
|
}
|
||||||
|
|
||||||
void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e)
|
void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e)
|
||||||
|
|||||||
@@ -67,6 +67,10 @@
|
|||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\pepperdashcore-builds\PepperDash_Core.dll</HintPath>
|
<HintPath>..\..\pepperdashcore-builds\PepperDash_Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="PepperDash_Essentials_Core, Version=0.0.0.22043, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\..\Essentials Core\PepperDashEssentialsBase\bin\PepperDash_Essentials_Core.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll</HintPath>
|
||||||
@@ -181,12 +185,6 @@
|
|||||||
<Compile Include="VideoCodec\ZoomRoom\ZoomRoomPropertiesConfig.cs" />
|
<Compile Include="VideoCodec\ZoomRoom\ZoomRoomPropertiesConfig.cs" />
|
||||||
<None Include="Properties\ControlSystem.cfg" />
|
<None Include="Properties\ControlSystem.cfg" />
|
||||||
</ItemGroup>
|
</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" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<VisualStudio>
|
<VisualStudio>
|
||||||
|
|||||||
@@ -446,6 +446,7 @@ namespace PepperDash.Essentials.Devices.Common.Occupancy
|
|||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<CenOdtOccupancySensorBaseJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<CenOdtOccupancySensorBaseJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
|
|
||||||
Debug.Console(1, occController, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, occController, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
|
|||||||
@@ -1,403 +1,403 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using Crestron.SimplSharpPro.GeneralIO;
|
using Crestron.SimplSharpPro.GeneralIO;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
using PepperDash.Essentials.Core.Bridges;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common.Occupancy
|
namespace PepperDash.Essentials.Devices.Common.Occupancy
|
||||||
{
|
{
|
||||||
public class GlsOccupancySensorBaseController : CrestronGenericBridgeableBaseDevice, IOccupancyStatusProvider
|
public class GlsOccupancySensorBaseController : CrestronGenericBridgeableBaseDevice, IOccupancyStatusProvider
|
||||||
{
|
{
|
||||||
public GlsOccupancySensorBase OccSensor { get; private set; }
|
public GlsOccupancySensorBase OccSensor { get; private set; }
|
||||||
|
|
||||||
public BoolFeedback RoomIsOccupiedFeedback { get; private set; }
|
public BoolFeedback RoomIsOccupiedFeedback { get; private set; }
|
||||||
|
|
||||||
public BoolFeedback GraceOccupancyDetectedFeedback { get; private set; }
|
public BoolFeedback GraceOccupancyDetectedFeedback { get; private set; }
|
||||||
|
|
||||||
public BoolFeedback RawOccupancyFeedback { get; private set; }
|
public BoolFeedback RawOccupancyFeedback { get; private set; }
|
||||||
|
|
||||||
public BoolFeedback PirSensorEnabledFeedback { get; private set; }
|
public BoolFeedback PirSensorEnabledFeedback { get; private set; }
|
||||||
|
|
||||||
public BoolFeedback LedFlashEnabledFeedback { get; private set; }
|
public BoolFeedback LedFlashEnabledFeedback { get; private set; }
|
||||||
|
|
||||||
public BoolFeedback ShortTimeoutEnabledFeedback { get; private set; }
|
public BoolFeedback ShortTimeoutEnabledFeedback { get; private set; }
|
||||||
|
|
||||||
public IntFeedback PirSensitivityInVacantStateFeedback { get; private set; }
|
public IntFeedback PirSensitivityInVacantStateFeedback { get; private set; }
|
||||||
|
|
||||||
public IntFeedback PirSensitivityInOccupiedStateFeedback { get; private set; }
|
public IntFeedback PirSensitivityInOccupiedStateFeedback { get; private set; }
|
||||||
|
|
||||||
public IntFeedback CurrentTimeoutFeedback { get; private set; }
|
public IntFeedback CurrentTimeoutFeedback { get; private set; }
|
||||||
|
|
||||||
public IntFeedback LocalTimoutFeedback { get; private set; }
|
public IntFeedback LocalTimoutFeedback { get; private set; }
|
||||||
|
|
||||||
public IntFeedback InternalPhotoSensorValue { get; set; }
|
public IntFeedback InternalPhotoSensorValue { get; set; }
|
||||||
|
|
||||||
public IntFeedback ExternalPhotoSensorValue { get; set; }
|
public IntFeedback ExternalPhotoSensorValue { get; set; }
|
||||||
|
|
||||||
// Debug properties
|
// Debug properties
|
||||||
public bool InTestMode { get; private set; }
|
public bool InTestMode { get; private set; }
|
||||||
|
|
||||||
public bool TestRoomIsOccupiedFeedback { get; private set; }
|
public bool TestRoomIsOccupiedFeedback { get; private set; }
|
||||||
|
|
||||||
public Func<bool> RoomIsOccupiedFeedbackFunc
|
public Func<bool> RoomIsOccupiedFeedbackFunc
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return () => InTestMode ? TestRoomIsOccupiedFeedback : OccSensor.OccupancyDetectedFeedback.BoolValue;
|
return () => InTestMode ? TestRoomIsOccupiedFeedback : OccSensor.OccupancyDetectedFeedback.BoolValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public GlsOccupancySensorBaseController(string key, string name, GlsOccupancySensorBase sensor)
|
public GlsOccupancySensorBaseController(string key, string name, GlsOccupancySensorBase sensor)
|
||||||
: base(key, name, sensor)
|
: base(key, name, sensor)
|
||||||
{
|
{
|
||||||
OccSensor = sensor;
|
OccSensor = sensor;
|
||||||
|
|
||||||
RoomIsOccupiedFeedback = new BoolFeedback(RoomIsOccupiedFeedbackFunc);
|
RoomIsOccupiedFeedback = new BoolFeedback(RoomIsOccupiedFeedbackFunc);
|
||||||
|
|
||||||
PirSensorEnabledFeedback = new BoolFeedback(() => OccSensor.PirEnabledFeedback.BoolValue);
|
PirSensorEnabledFeedback = new BoolFeedback(() => OccSensor.PirEnabledFeedback.BoolValue);
|
||||||
|
|
||||||
LedFlashEnabledFeedback = new BoolFeedback(() => OccSensor.LedFlashEnabledFeedback.BoolValue);
|
LedFlashEnabledFeedback = new BoolFeedback(() => OccSensor.LedFlashEnabledFeedback.BoolValue);
|
||||||
|
|
||||||
ShortTimeoutEnabledFeedback = new BoolFeedback(() => OccSensor.ShortTimeoutEnabledFeedback.BoolValue);
|
ShortTimeoutEnabledFeedback = new BoolFeedback(() => OccSensor.ShortTimeoutEnabledFeedback.BoolValue);
|
||||||
|
|
||||||
PirSensitivityInVacantStateFeedback = new IntFeedback(() => OccSensor.PirSensitivityInVacantStateFeedback.UShortValue);
|
PirSensitivityInVacantStateFeedback = new IntFeedback(() => OccSensor.PirSensitivityInVacantStateFeedback.UShortValue);
|
||||||
|
|
||||||
PirSensitivityInOccupiedStateFeedback = new IntFeedback(() => OccSensor.PirSensitivityInOccupiedStateFeedback.UShortValue);
|
PirSensitivityInOccupiedStateFeedback = new IntFeedback(() => OccSensor.PirSensitivityInOccupiedStateFeedback.UShortValue);
|
||||||
|
|
||||||
CurrentTimeoutFeedback = new IntFeedback(() => OccSensor.CurrentTimeoutFeedback.UShortValue);
|
CurrentTimeoutFeedback = new IntFeedback(() => OccSensor.CurrentTimeoutFeedback.UShortValue);
|
||||||
|
|
||||||
LocalTimoutFeedback = new IntFeedback(() => OccSensor.LocalTimeoutFeedback.UShortValue);
|
LocalTimoutFeedback = new IntFeedback(() => OccSensor.LocalTimeoutFeedback.UShortValue);
|
||||||
|
|
||||||
GraceOccupancyDetectedFeedback = new BoolFeedback(() => OccSensor.GraceOccupancyDetectedFeedback.BoolValue);
|
GraceOccupancyDetectedFeedback = new BoolFeedback(() => OccSensor.GraceOccupancyDetectedFeedback.BoolValue);
|
||||||
|
|
||||||
RawOccupancyFeedback = new BoolFeedback(() => OccSensor.RawOccupancyFeedback.BoolValue);
|
RawOccupancyFeedback = new BoolFeedback(() => OccSensor.RawOccupancyFeedback.BoolValue);
|
||||||
|
|
||||||
InternalPhotoSensorValue = new IntFeedback(() => OccSensor.InternalPhotoSensorValueFeedback.UShortValue);
|
InternalPhotoSensorValue = new IntFeedback(() => OccSensor.InternalPhotoSensorValueFeedback.UShortValue);
|
||||||
|
|
||||||
ExternalPhotoSensorValue = new IntFeedback(() => OccSensor.ExternalPhotoSensorValueFeedback.UShortValue);
|
ExternalPhotoSensorValue = new IntFeedback(() => OccSensor.ExternalPhotoSensorValueFeedback.UShortValue);
|
||||||
|
|
||||||
OccSensor.BaseEvent += new Crestron.SimplSharpPro.BaseEventHandler(OccSensor_BaseEvent);
|
OccSensor.BaseEvent += new Crestron.SimplSharpPro.BaseEventHandler(OccSensor_BaseEvent);
|
||||||
|
|
||||||
OccSensor.GlsOccupancySensorChange += new GlsOccupancySensorChangeEventHandler(OccSensor_GlsOccupancySensorChange);
|
OccSensor.GlsOccupancySensorChange += new GlsOccupancySensorChangeEventHandler(OccSensor_GlsOccupancySensorChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Catches events for feedbacks on the base class. Any extending wrapper class should call this delegate after it checks for it's own event IDs.
|
/// Catches events for feedbacks on the base class. Any extending wrapper class should call this delegate after it checks for it's own event IDs.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="device"></param>
|
/// <param name="device"></param>
|
||||||
/// <param name="args"></param>
|
/// <param name="args"></param>
|
||||||
protected virtual void OccSensor_GlsOccupancySensorChange(GlsOccupancySensorBase device, GlsOccupancySensorChangeEventArgs args)
|
protected virtual void OccSensor_GlsOccupancySensorChange(GlsOccupancySensorBase device, GlsOccupancySensorChangeEventArgs args)
|
||||||
{
|
{
|
||||||
if (args.EventId == GlsOccupancySensorBase.PirEnabledFeedbackEventId)
|
if (args.EventId == GlsOccupancySensorBase.PirEnabledFeedbackEventId)
|
||||||
PirSensorEnabledFeedback.FireUpdate();
|
PirSensorEnabledFeedback.FireUpdate();
|
||||||
else if (args.EventId == GlsOccupancySensorBase.LedFlashEnabledFeedbackEventId)
|
else if (args.EventId == GlsOccupancySensorBase.LedFlashEnabledFeedbackEventId)
|
||||||
LedFlashEnabledFeedback.FireUpdate();
|
LedFlashEnabledFeedback.FireUpdate();
|
||||||
else if (args.EventId == GlsOccupancySensorBase.ShortTimeoutEnabledFeedbackEventId)
|
else if (args.EventId == GlsOccupancySensorBase.ShortTimeoutEnabledFeedbackEventId)
|
||||||
ShortTimeoutEnabledFeedback.FireUpdate();
|
ShortTimeoutEnabledFeedback.FireUpdate();
|
||||||
else if (args.EventId == GlsOccupancySensorBase.PirSensitivityInOccupiedStateFeedbackEventId)
|
else if (args.EventId == GlsOccupancySensorBase.PirSensitivityInOccupiedStateFeedbackEventId)
|
||||||
PirSensitivityInOccupiedStateFeedback.FireUpdate();
|
PirSensitivityInOccupiedStateFeedback.FireUpdate();
|
||||||
else if (args.EventId == GlsOccupancySensorBase.PirSensitivityInVacantStateFeedbackEventId)
|
else if (args.EventId == GlsOccupancySensorBase.PirSensitivityInVacantStateFeedbackEventId)
|
||||||
PirSensitivityInVacantStateFeedback.FireUpdate();
|
PirSensitivityInVacantStateFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void OccSensor_BaseEvent(Crestron.SimplSharpPro.GenericBase device, Crestron.SimplSharpPro.BaseEventArgs args)
|
protected virtual void OccSensor_BaseEvent(Crestron.SimplSharpPro.GenericBase device, Crestron.SimplSharpPro.BaseEventArgs args)
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "GlsOccupancySensorChange EventId: {0}", args.EventId);
|
Debug.Console(2, this, "GlsOccupancySensorChange EventId: {0}", args.EventId);
|
||||||
|
|
||||||
if (args.EventId == Crestron.SimplSharpPro.GeneralIO.GlsOccupancySensorBase.RoomOccupiedFeedbackEventId
|
if (args.EventId == Crestron.SimplSharpPro.GeneralIO.GlsOccupancySensorBase.RoomOccupiedFeedbackEventId
|
||||||
|| args.EventId == Crestron.SimplSharpPro.GeneralIO.GlsOccupancySensorBase.RoomVacantFeedbackEventId)
|
|| args.EventId == Crestron.SimplSharpPro.GeneralIO.GlsOccupancySensorBase.RoomVacantFeedbackEventId)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Occupancy State: {0}", OccSensor.OccupancyDetectedFeedback.BoolValue);
|
Debug.Console(1, this, "Occupancy State: {0}", OccSensor.OccupancyDetectedFeedback.BoolValue);
|
||||||
RoomIsOccupiedFeedback.FireUpdate();
|
RoomIsOccupiedFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
else if (args.EventId == GlsOccupancySensorBase.TimeoutFeedbackEventId)
|
else if (args.EventId == GlsOccupancySensorBase.TimeoutFeedbackEventId)
|
||||||
CurrentTimeoutFeedback.FireUpdate();
|
CurrentTimeoutFeedback.FireUpdate();
|
||||||
else if (args.EventId == GlsOccupancySensorBase.TimeoutLocalFeedbackEventId)
|
else if (args.EventId == GlsOccupancySensorBase.TimeoutLocalFeedbackEventId)
|
||||||
LocalTimoutFeedback.FireUpdate();
|
LocalTimoutFeedback.FireUpdate();
|
||||||
else if (args.EventId == GlsOccupancySensorBase.GraceOccupancyDetectedFeedbackEventId)
|
else if (args.EventId == GlsOccupancySensorBase.GraceOccupancyDetectedFeedbackEventId)
|
||||||
GraceOccupancyDetectedFeedback.FireUpdate();
|
GraceOccupancyDetectedFeedback.FireUpdate();
|
||||||
else if (args.EventId == GlsOccupancySensorBase.RawOccupancyFeedbackEventId)
|
else if (args.EventId == GlsOccupancySensorBase.RawOccupancyFeedbackEventId)
|
||||||
RawOccupancyFeedback.FireUpdate();
|
RawOccupancyFeedback.FireUpdate();
|
||||||
else if (args.EventId == GlsOccupancySensorBase.InternalPhotoSensorValueFeedbackEventId)
|
else if (args.EventId == GlsOccupancySensorBase.InternalPhotoSensorValueFeedbackEventId)
|
||||||
InternalPhotoSensorValue.FireUpdate();
|
InternalPhotoSensorValue.FireUpdate();
|
||||||
else if (args.EventId == GlsOccupancySensorBase.ExternalPhotoSensorValueFeedbackEventId)
|
else if (args.EventId == GlsOccupancySensorBase.ExternalPhotoSensorValueFeedbackEventId)
|
||||||
ExternalPhotoSensorValue.FireUpdate();
|
ExternalPhotoSensorValue.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetTestMode(bool mode)
|
public void SetTestMode(bool mode)
|
||||||
{
|
{
|
||||||
InTestMode = mode;
|
InTestMode = mode;
|
||||||
|
|
||||||
Debug.Console(1, this, "In Mock Mode: '{0}'", InTestMode);
|
Debug.Console(1, this, "In Mock Mode: '{0}'", InTestMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetTestOccupiedState(bool state)
|
public void SetTestOccupiedState(bool state)
|
||||||
{
|
{
|
||||||
if (!InTestMode)
|
if (!InTestMode)
|
||||||
Debug.Console(1, "Mock mode not enabled");
|
Debug.Console(1, "Mock mode not enabled");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TestRoomIsOccupiedFeedback = state;
|
TestRoomIsOccupiedFeedback = state;
|
||||||
|
|
||||||
RoomIsOccupiedFeedback.FireUpdate();
|
RoomIsOccupiedFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enables or disables the PIR sensor
|
/// Enables or disables the PIR sensor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="state"></param>
|
/// <param name="state"></param>
|
||||||
public void SetPirEnable(bool state)
|
public void SetPirEnable(bool state)
|
||||||
{
|
{
|
||||||
if (state)
|
if (state)
|
||||||
{
|
{
|
||||||
OccSensor.EnablePir.BoolValue = state;
|
OccSensor.EnablePir.BoolValue = state;
|
||||||
OccSensor.DisablePir.BoolValue = !state;
|
OccSensor.DisablePir.BoolValue = !state;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OccSensor.EnablePir.BoolValue = state;
|
OccSensor.EnablePir.BoolValue = state;
|
||||||
OccSensor.DisablePir.BoolValue = !state;
|
OccSensor.DisablePir.BoolValue = !state;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enables or disables the LED Flash
|
/// Enables or disables the LED Flash
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="state"></param>
|
/// <param name="state"></param>
|
||||||
public void SetLedFlashEnable(bool state)
|
public void SetLedFlashEnable(bool state)
|
||||||
{
|
{
|
||||||
if (state)
|
if (state)
|
||||||
{
|
{
|
||||||
OccSensor.EnableLedFlash.BoolValue = state;
|
OccSensor.EnableLedFlash.BoolValue = state;
|
||||||
OccSensor.DisableLedFlash.BoolValue = !state;
|
OccSensor.DisableLedFlash.BoolValue = !state;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OccSensor.EnableLedFlash.BoolValue = state;
|
OccSensor.EnableLedFlash.BoolValue = state;
|
||||||
OccSensor.DisableLedFlash.BoolValue = !state;
|
OccSensor.DisableLedFlash.BoolValue = !state;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enables or disables short timeout based on state
|
/// Enables or disables short timeout based on state
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="state"></param>
|
/// <param name="state"></param>
|
||||||
public void SetShortTimeoutState(bool state)
|
public void SetShortTimeoutState(bool state)
|
||||||
{
|
{
|
||||||
if (state)
|
if (state)
|
||||||
{
|
{
|
||||||
OccSensor.EnableShortTimeout.BoolValue = state;
|
OccSensor.EnableShortTimeout.BoolValue = state;
|
||||||
OccSensor.DisableShortTimeout.BoolValue = !state;
|
OccSensor.DisableShortTimeout.BoolValue = !state;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OccSensor.EnableShortTimeout.BoolValue = state;
|
OccSensor.EnableShortTimeout.BoolValue = state;
|
||||||
OccSensor.DisableShortTimeout.BoolValue = !state;
|
OccSensor.DisableShortTimeout.BoolValue = !state;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void IncrementPirSensitivityInOccupiedState(bool pressRelease)
|
public void IncrementPirSensitivityInOccupiedState(bool pressRelease)
|
||||||
{
|
{
|
||||||
OccSensor.IncrementPirSensitivityInOccupiedState.BoolValue = pressRelease;
|
OccSensor.IncrementPirSensitivityInOccupiedState.BoolValue = pressRelease;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DecrementPirSensitivityInOccupiedState(bool pressRelease)
|
public void DecrementPirSensitivityInOccupiedState(bool pressRelease)
|
||||||
{
|
{
|
||||||
OccSensor.DecrementPirSensitivityInOccupiedState.BoolValue = pressRelease;
|
OccSensor.DecrementPirSensitivityInOccupiedState.BoolValue = pressRelease;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void IncrementPirSensitivityInVacantState(bool pressRelease)
|
public void IncrementPirSensitivityInVacantState(bool pressRelease)
|
||||||
{
|
{
|
||||||
OccSensor.IncrementPirSensitivityInVacantState.BoolValue = pressRelease;
|
OccSensor.IncrementPirSensitivityInVacantState.BoolValue = pressRelease;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DecrementPirSensitivityInVacantState(bool pressRelease)
|
public void DecrementPirSensitivityInVacantState(bool pressRelease)
|
||||||
{
|
{
|
||||||
OccSensor.DecrementPirSensitivityInVacantState.BoolValue = pressRelease;
|
OccSensor.DecrementPirSensitivityInVacantState.BoolValue = pressRelease;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ForceOccupied()
|
public void ForceOccupied()
|
||||||
{
|
{
|
||||||
OccSensor.ForceOccupied.BoolValue = true;
|
OccSensor.ForceOccupied.BoolValue = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ForceVacant()
|
public void ForceVacant()
|
||||||
{
|
{
|
||||||
OccSensor.ForceVacant.BoolValue = true;
|
OccSensor.ForceVacant.BoolValue = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void EnableRawStates(bool state)
|
public void EnableRawStates(bool state)
|
||||||
{
|
{
|
||||||
OccSensor.EnableRawStates.BoolValue = state;
|
OccSensor.EnableRawStates.BoolValue = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetRemoteTimeout(ushort time)
|
public void SetRemoteTimeout(ushort time)
|
||||||
{
|
{
|
||||||
OccSensor.RemoteTimeout.UShortValue = time;
|
OccSensor.RemoteTimeout.UShortValue = time;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetInternalPhotoSensorMinChange(ushort value)
|
public void SetInternalPhotoSensorMinChange(ushort value)
|
||||||
{
|
{
|
||||||
OccSensor.InternalPhotoSensorMinimumChange.UShortValue = value;
|
OccSensor.InternalPhotoSensorMinimumChange.UShortValue = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetExternalPhotoSensorMinChange(ushort value)
|
public void SetExternalPhotoSensorMinChange(ushort value)
|
||||||
{
|
{
|
||||||
OccSensor.ExternalPhotoSensorMinimumChange.UShortValue = value;
|
OccSensor.ExternalPhotoSensorMinimumChange.UShortValue = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected void LinkOccSensorToApi(GlsOccupancySensorBaseController occController, BasicTriList trilist,
|
protected void LinkOccSensorToApi(GlsOccupancySensorBaseController occController, BasicTriList trilist,
|
||||||
uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
var joinMap = new GlsOccupancySensorBaseJoinMap();
|
var joinMap = new GlsOccupancySensorBaseJoinMap(joinStart);
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<GlsOccupancySensorBaseJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<GlsOccupancySensorBaseJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
|
|
||||||
Debug.Console(1, occController, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, occController, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
#region Single and Dual Sensor Stuff
|
#region Single and Dual Sensor Stuff
|
||||||
occController.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
occController.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
||||||
trilist.StringInput[joinMap.Name].StringValue = occController.Name;
|
trilist.StringInput[joinMap.Name.JoinNumber].StringValue = occController.Name;
|
||||||
|
|
||||||
trilist.OnlineStatusChange += (d, args) =>
|
trilist.OnlineStatusChange += (d, args) =>
|
||||||
{
|
{
|
||||||
if (args.DeviceOnLine)
|
if (args.DeviceOnLine)
|
||||||
{
|
{
|
||||||
trilist.StringInput[joinMap.Name].StringValue = occController.Name;
|
trilist.StringInput[joinMap.Name.JoinNumber].StringValue = occController.Name;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Occupied status
|
// Occupied status
|
||||||
trilist.SetSigTrueAction(joinMap.ForceOccupied, occController.ForceOccupied);
|
trilist.SetSigTrueAction(joinMap.ForceOccupied.JoinNumber, occController.ForceOccupied);
|
||||||
trilist.SetSigTrueAction(joinMap.ForceVacant, occController.ForceVacant);
|
trilist.SetSigTrueAction(joinMap.ForceVacant.JoinNumber, occController.ForceVacant);
|
||||||
occController.RoomIsOccupiedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RoomOccupiedFeedback]);
|
occController.RoomIsOccupiedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RoomOccupiedFeedback.JoinNumber]);
|
||||||
occController.RoomIsOccupiedFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.RoomVacantFeedback]);
|
occController.RoomIsOccupiedFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.RoomVacantFeedback.JoinNumber]);
|
||||||
occController.RawOccupancyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyFeedback]);
|
occController.RawOccupancyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyFeedback.JoinNumber]);
|
||||||
trilist.SetBoolSigAction(joinMap.EnableRawStates, occController.EnableRawStates);
|
trilist.SetBoolSigAction(joinMap.EnableRawStates.JoinNumber, occController.EnableRawStates);
|
||||||
|
|
||||||
// Timouts
|
// Timouts
|
||||||
trilist.SetUShortSigAction(joinMap.Timeout, occController.SetRemoteTimeout);
|
trilist.SetUShortSigAction(joinMap.Timeout.JoinNumber, occController.SetRemoteTimeout);
|
||||||
occController.CurrentTimeoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.Timeout]);
|
occController.CurrentTimeoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.Timeout.JoinNumber]);
|
||||||
occController.LocalTimoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeoutLocalFeedback]);
|
occController.LocalTimoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeoutLocalFeedback.JoinNumber]);
|
||||||
|
|
||||||
// LED Flash
|
// LED Flash
|
||||||
trilist.SetSigTrueAction(joinMap.EnableLedFlash, () => occController.SetLedFlashEnable(true));
|
trilist.SetSigTrueAction(joinMap.EnableLedFlash.JoinNumber, () => occController.SetLedFlashEnable(true));
|
||||||
trilist.SetSigTrueAction(joinMap.DisableLedFlash, () => occController.SetLedFlashEnable(false));
|
trilist.SetSigTrueAction(joinMap.DisableLedFlash.JoinNumber, () => occController.SetLedFlashEnable(false));
|
||||||
occController.LedFlashEnabledFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.EnableLedFlash]);
|
occController.LedFlashEnabledFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.EnableLedFlash.JoinNumber]);
|
||||||
|
|
||||||
// Short Timeout
|
// Short Timeout
|
||||||
trilist.SetSigTrueAction(joinMap.EnableShortTimeout, () => occController.SetShortTimeoutState(true));
|
trilist.SetSigTrueAction(joinMap.EnableShortTimeout.JoinNumber, () => occController.SetShortTimeoutState(true));
|
||||||
trilist.SetSigTrueAction(joinMap.DisableShortTimeout, () => occController.SetShortTimeoutState(false));
|
trilist.SetSigTrueAction(joinMap.DisableShortTimeout.JoinNumber, () => occController.SetShortTimeoutState(false));
|
||||||
occController.ShortTimeoutEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableShortTimeout]);
|
occController.ShortTimeoutEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableShortTimeout.JoinNumber]);
|
||||||
|
|
||||||
// PIR Sensor
|
// PIR Sensor
|
||||||
trilist.SetSigTrueAction(joinMap.EnablePir, () => occController.SetPirEnable(true));
|
trilist.SetSigTrueAction(joinMap.EnablePir.JoinNumber, () => occController.SetPirEnable(true));
|
||||||
trilist.SetSigTrueAction(joinMap.DisablePir, () => occController.SetPirEnable(false));
|
trilist.SetSigTrueAction(joinMap.DisablePir.JoinNumber, () => occController.SetPirEnable(false));
|
||||||
occController.PirSensorEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnablePir]);
|
occController.PirSensorEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnablePir.JoinNumber]);
|
||||||
|
|
||||||
// PIR Sensitivity in Occupied State
|
// PIR Sensitivity in Occupied State
|
||||||
trilist.SetBoolSigAction(joinMap.IncrementPirInOccupiedState, occController.IncrementPirSensitivityInOccupiedState);
|
trilist.SetBoolSigAction(joinMap.IncrementPirInOccupiedState.JoinNumber, occController.IncrementPirSensitivityInOccupiedState);
|
||||||
trilist.SetBoolSigAction(joinMap.DecrementPirInOccupiedState, occController.DecrementPirSensitivityInOccupiedState);
|
trilist.SetBoolSigAction(joinMap.DecrementPirInOccupiedState.JoinNumber, occController.DecrementPirSensitivityInOccupiedState);
|
||||||
occController.PirSensitivityInOccupiedStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.PirSensitivityInOccupiedState]);
|
occController.PirSensitivityInOccupiedStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.PirSensitivityInOccupiedState.JoinNumber]);
|
||||||
|
|
||||||
// PIR Sensitivity in Vacant State
|
// PIR Sensitivity in Vacant State
|
||||||
trilist.SetBoolSigAction(joinMap.IncrementPirInVacantState, occController.IncrementPirSensitivityInVacantState);
|
trilist.SetBoolSigAction(joinMap.IncrementPirInVacantState.JoinNumber, occController.IncrementPirSensitivityInVacantState);
|
||||||
trilist.SetBoolSigAction(joinMap.DecrementPirInVacantState, occController.DecrementPirSensitivityInVacantState);
|
trilist.SetBoolSigAction(joinMap.DecrementPirInVacantState.JoinNumber, occController.DecrementPirSensitivityInVacantState);
|
||||||
occController.PirSensitivityInVacantStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.PirSensitivityInVacantState]);
|
occController.PirSensitivityInVacantStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.PirSensitivityInVacantState.JoinNumber]);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Dual Technology Sensor Stuff
|
#region Dual Technology Sensor Stuff
|
||||||
var odtOccController = occController as GlsOdtOccupancySensorController;
|
var odtOccController = occController as GlsOdtOccupancySensorController;
|
||||||
|
|
||||||
if (odtOccController == null) return;
|
if (odtOccController == null) return;
|
||||||
// OR When Vacated
|
// OR When Vacated
|
||||||
trilist.SetBoolSigAction(joinMap.OrWhenVacated, odtOccController.SetOrWhenVacatedState);
|
trilist.SetBoolSigAction(joinMap.OrWhenVacated.JoinNumber, odtOccController.SetOrWhenVacatedState);
|
||||||
odtOccController.OrWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.OrWhenVacated]);
|
odtOccController.OrWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.OrWhenVacated.JoinNumber]);
|
||||||
|
|
||||||
// AND When Vacated
|
// AND When Vacated
|
||||||
trilist.SetBoolSigAction(joinMap.AndWhenVacated, odtOccController.SetAndWhenVacatedState);
|
trilist.SetBoolSigAction(joinMap.AndWhenVacated.JoinNumber, odtOccController.SetAndWhenVacatedState);
|
||||||
odtOccController.AndWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AndWhenVacated]);
|
odtOccController.AndWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AndWhenVacated.JoinNumber]);
|
||||||
|
|
||||||
// Ultrasonic A Sensor
|
// Ultrasonic A Sensor
|
||||||
trilist.SetSigTrueAction(joinMap.EnableUsA, () => odtOccController.SetUsAEnable(true));
|
trilist.SetSigTrueAction(joinMap.EnableUsA.JoinNumber, () => odtOccController.SetUsAEnable(true));
|
||||||
trilist.SetSigTrueAction(joinMap.DisableUsA, () => odtOccController.SetUsAEnable(false));
|
trilist.SetSigTrueAction(joinMap.DisableUsA.JoinNumber, () => odtOccController.SetUsAEnable(false));
|
||||||
odtOccController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsA]);
|
odtOccController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsA.JoinNumber]);
|
||||||
|
|
||||||
// Ultrasonic B Sensor
|
// Ultrasonic B Sensor
|
||||||
trilist.SetSigTrueAction(joinMap.EnableUsB, () => odtOccController.SetUsBEnable(true));
|
trilist.SetSigTrueAction(joinMap.EnableUsB.JoinNumber, () => odtOccController.SetUsBEnable(true));
|
||||||
trilist.SetSigTrueAction(joinMap.DisableUsB, () => odtOccController.SetUsBEnable(false));
|
trilist.SetSigTrueAction(joinMap.DisableUsB.JoinNumber, () => odtOccController.SetUsBEnable(false));
|
||||||
odtOccController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsB]);
|
odtOccController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsB.JoinNumber]);
|
||||||
|
|
||||||
// US Sensitivity in Occupied State
|
// US Sensitivity in Occupied State
|
||||||
trilist.SetBoolSigAction(joinMap.IncrementUsInOccupiedState, odtOccController.IncrementUsSensitivityInOccupiedState);
|
trilist.SetBoolSigAction(joinMap.IncrementUsInOccupiedState.JoinNumber, odtOccController.IncrementUsSensitivityInOccupiedState);
|
||||||
trilist.SetBoolSigAction(joinMap.DecrementUsInOccupiedState, odtOccController.DecrementUsSensitivityInOccupiedState);
|
trilist.SetBoolSigAction(joinMap.DecrementUsInOccupiedState.JoinNumber, odtOccController.DecrementUsSensitivityInOccupiedState);
|
||||||
odtOccController.UltrasonicSensitivityInOccupiedStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.UsSensitivityInOccupiedState]);
|
odtOccController.UltrasonicSensitivityInOccupiedStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.UsSensitivityInOccupiedState.JoinNumber]);
|
||||||
|
|
||||||
// US Sensitivity in Vacant State
|
// US Sensitivity in Vacant State
|
||||||
trilist.SetBoolSigAction(joinMap.IncrementUsInVacantState, odtOccController.IncrementUsSensitivityInVacantState);
|
trilist.SetBoolSigAction(joinMap.IncrementUsInVacantState.JoinNumber, odtOccController.IncrementUsSensitivityInVacantState);
|
||||||
trilist.SetBoolSigAction(joinMap.DecrementUsInVacantState, odtOccController.DecrementUsSensitivityInVacantState);
|
trilist.SetBoolSigAction(joinMap.DecrementUsInVacantState.JoinNumber, odtOccController.DecrementUsSensitivityInVacantState);
|
||||||
odtOccController.UltrasonicSensitivityInVacantStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.UsSensitivityInVacantState]);
|
odtOccController.UltrasonicSensitivityInVacantStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.UsSensitivityInVacantState.JoinNumber]);
|
||||||
|
|
||||||
//Sensor Raw States
|
//Sensor Raw States
|
||||||
odtOccController.RawOccupancyPirFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyPirFeedback]);
|
odtOccController.RawOccupancyPirFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyPirFeedback.JoinNumber]);
|
||||||
odtOccController.RawOccupancyUsFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyUsFeedback]);
|
odtOccController.RawOccupancyUsFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyUsFeedback.JoinNumber]);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
LinkOccSensorToApi(this, trilist, joinStart, joinMapKey, bridge);
|
LinkOccSensorToApi(this, trilist, joinStart, joinMapKey, bridge);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GlsOccupancySensorBaseControllerFactory : EssentialsDeviceFactory<GlsOccupancySensorBaseController>
|
public class GlsOccupancySensorBaseControllerFactory : EssentialsDeviceFactory<GlsOccupancySensorBaseController>
|
||||||
{
|
{
|
||||||
public GlsOccupancySensorBaseControllerFactory()
|
public GlsOccupancySensorBaseControllerFactory()
|
||||||
{
|
{
|
||||||
TypeNames = new List<string>() { "glsoirccn" };
|
TypeNames = new List<string>() { "glsoirccn" };
|
||||||
}
|
}
|
||||||
|
|
||||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||||
{
|
{
|
||||||
Debug.Console(1, "Factory Attempting to create new GlsOccupancySensorBaseController Device");
|
Debug.Console(1, "Factory Attempting to create new GlsOccupancySensorBaseController Device");
|
||||||
|
|
||||||
var typeName = dc.Type.ToLower();
|
var typeName = dc.Type.ToLower();
|
||||||
var key = dc.Key;
|
var key = dc.Key;
|
||||||
var name = dc.Name;
|
var name = dc.Name;
|
||||||
var comm = CommFactory.GetControlPropertiesConfig(dc);
|
var comm = CommFactory.GetControlPropertiesConfig(dc);
|
||||||
|
|
||||||
GlsOccupancySensorBase occSensor = null;
|
GlsOccupancySensorBase occSensor = null;
|
||||||
|
|
||||||
occSensor = new GlsOirCCn(comm.CresnetIdInt, Global.ControlSystem);
|
occSensor = new GlsOirCCn(comm.CresnetIdInt, Global.ControlSystem);
|
||||||
|
|
||||||
if (occSensor != null)
|
if (occSensor != null)
|
||||||
{
|
{
|
||||||
return new GlsOccupancySensorBaseController(key, name, occSensor);
|
return new GlsOccupancySensorBaseController(key, name, occSensor);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Console(0, "ERROR: Unable to create Occupancy Sensor Device. Key: '{0}'", key);
|
Debug.Console(0, "ERROR: Unable to create Occupancy Sensor Device. Key: '{0}'", key);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -11,12 +11,14 @@ using Crestron.SimplSharp.Net.Http;
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
using PepperDash.Essentials.Core.Bridges;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
|
using PepperDash.Essentials;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common
|
namespace PepperDash.Essentials.Devices.Common
|
||||||
{
|
{
|
||||||
|
[Obsolete("This Device will be moved to a plugin in a future update")]
|
||||||
public class DigitalLogger : EssentialsBridgeableDevice
|
public class DigitalLogger : EssentialsBridgeableDevice
|
||||||
{
|
{
|
||||||
public IBasicCommunication Communication { get; private set; }
|
public IBasicCommunication Communication { get; private set; }
|
||||||
|
|||||||
@@ -373,93 +373,93 @@ namespace PepperDash.Essentials.Devices.Common
|
|||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
var joinMap = new SetTopBoxControllerJoinMap();
|
var joinMap = new SetTopBoxControllerJoinMap(joinStart);
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<SetTopBoxControllerJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<SetTopBoxControllerJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
|
|
||||||
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
Debug.Console(0, "Linking to Display: {0}", Name);
|
Debug.Console(0, "Linking to Display: {0}", Name);
|
||||||
|
|
||||||
trilist.StringInput[joinMap.Name].StringValue = Name;
|
trilist.StringInput[joinMap.Name.JoinNumber].StringValue = Name;
|
||||||
|
|
||||||
var stbBase = this as ISetTopBoxControls;
|
var stbBase = this as ISetTopBoxControls;
|
||||||
|
|
||||||
trilist.BooleanInput[joinMap.HasDpad].BoolValue = stbBase.HasDpad;
|
trilist.BooleanInput[joinMap.HasDpad.JoinNumber].BoolValue = stbBase.HasDpad;
|
||||||
trilist.BooleanInput[joinMap.HasNumeric].BoolValue = stbBase.HasNumeric;
|
trilist.BooleanInput[joinMap.HasNumeric.JoinNumber].BoolValue = stbBase.HasNumeric;
|
||||||
trilist.BooleanInput[joinMap.HasDvr].BoolValue = stbBase.HasDvr;
|
trilist.BooleanInput[joinMap.HasDvr.JoinNumber].BoolValue = stbBase.HasDvr;
|
||||||
trilist.BooleanInput[joinMap.HasPresets].BoolValue = stbBase.HasPresets;
|
trilist.BooleanInput[joinMap.HasPresets.JoinNumber].BoolValue = stbBase.HasPresets;
|
||||||
|
|
||||||
trilist.SetBoolSigAction(joinMap.DvrList, stbBase.DvrList);
|
trilist.SetBoolSigAction(joinMap.DvrList.JoinNumber, stbBase.DvrList);
|
||||||
trilist.SetBoolSigAction(joinMap.Replay, stbBase.Replay);
|
trilist.SetBoolSigAction(joinMap.Replay.JoinNumber, stbBase.Replay);
|
||||||
|
|
||||||
trilist.SetStringSigAction(joinMap.LoadPresets, stbBase.LoadPresets);
|
trilist.SetStringSigAction(joinMap.LoadPresets.JoinNumber, stbBase.LoadPresets);
|
||||||
|
|
||||||
var stbPower = this as IPower;
|
var stbPower = this as IPower;
|
||||||
|
|
||||||
trilist.SetSigTrueAction(joinMap.PowerOn, stbPower.PowerOn);
|
trilist.SetSigTrueAction(joinMap.PowerOn.JoinNumber, stbPower.PowerOn);
|
||||||
trilist.SetSigTrueAction(joinMap.PowerOff, stbPower.PowerOff);
|
trilist.SetSigTrueAction(joinMap.PowerOff.JoinNumber, stbPower.PowerOff);
|
||||||
trilist.SetSigTrueAction(joinMap.PowerToggle, stbPower.PowerToggle);
|
trilist.SetSigTrueAction(joinMap.PowerToggle.JoinNumber, stbPower.PowerToggle);
|
||||||
|
|
||||||
var stbDPad = this as IDPad;
|
var stbDPad = this as IDPad;
|
||||||
|
|
||||||
trilist.SetBoolSigAction(joinMap.Up, stbDPad.Up);
|
trilist.SetBoolSigAction(joinMap.Up.JoinNumber, stbDPad.Up);
|
||||||
trilist.SetBoolSigAction(joinMap.Down, stbDPad.Down);
|
trilist.SetBoolSigAction(joinMap.Down.JoinNumber, stbDPad.Down);
|
||||||
trilist.SetBoolSigAction(joinMap.Left, stbDPad.Left);
|
trilist.SetBoolSigAction(joinMap.Left.JoinNumber, stbDPad.Left);
|
||||||
trilist.SetBoolSigAction(joinMap.Right, stbDPad.Right);
|
trilist.SetBoolSigAction(joinMap.Right.JoinNumber, stbDPad.Right);
|
||||||
trilist.SetBoolSigAction(joinMap.Select, stbDPad.Select);
|
trilist.SetBoolSigAction(joinMap.Select.JoinNumber, stbDPad.Select);
|
||||||
trilist.SetBoolSigAction(joinMap.Menu, stbDPad.Menu);
|
trilist.SetBoolSigAction(joinMap.Menu.JoinNumber, stbDPad.Menu);
|
||||||
trilist.SetBoolSigAction(joinMap.Exit, stbDPad.Exit);
|
trilist.SetBoolSigAction(joinMap.Exit.JoinNumber, stbDPad.Exit);
|
||||||
|
|
||||||
var stbChannel = this as IChannel;
|
var stbChannel = this as IChannel;
|
||||||
trilist.SetBoolSigAction(joinMap.ChannelUp, stbChannel.ChannelUp);
|
trilist.SetBoolSigAction(joinMap.ChannelUp.JoinNumber, stbChannel.ChannelUp);
|
||||||
trilist.SetBoolSigAction(joinMap.ChannelDown, stbChannel.ChannelDown);
|
trilist.SetBoolSigAction(joinMap.ChannelDown.JoinNumber, stbChannel.ChannelDown);
|
||||||
trilist.SetBoolSigAction(joinMap.LastChannel, stbChannel.LastChannel);
|
trilist.SetBoolSigAction(joinMap.LastChannel.JoinNumber, stbChannel.LastChannel);
|
||||||
trilist.SetBoolSigAction(joinMap.Guide, stbChannel.Guide);
|
trilist.SetBoolSigAction(joinMap.Guide.JoinNumber, stbChannel.Guide);
|
||||||
trilist.SetBoolSigAction(joinMap.Info, stbChannel.Info);
|
trilist.SetBoolSigAction(joinMap.Info.JoinNumber, stbChannel.Info);
|
||||||
trilist.SetBoolSigAction(joinMap.Exit, stbChannel.Exit);
|
trilist.SetBoolSigAction(joinMap.Exit.JoinNumber, stbChannel.Exit);
|
||||||
|
|
||||||
var stbColor = this as IColor;
|
var stbColor = this as IColor;
|
||||||
trilist.SetBoolSigAction(joinMap.Red, stbColor.Red);
|
trilist.SetBoolSigAction(joinMap.Red.JoinNumber, stbColor.Red);
|
||||||
trilist.SetBoolSigAction(joinMap.Green, stbColor.Green);
|
trilist.SetBoolSigAction(joinMap.Green.JoinNumber, stbColor.Green);
|
||||||
trilist.SetBoolSigAction(joinMap.Yellow, stbColor.Yellow);
|
trilist.SetBoolSigAction(joinMap.Yellow.JoinNumber, stbColor.Yellow);
|
||||||
trilist.SetBoolSigAction(joinMap.Blue, stbColor.Blue);
|
trilist.SetBoolSigAction(joinMap.Blue.JoinNumber, stbColor.Blue);
|
||||||
|
|
||||||
var stbKeypad = this as ISetTopBoxNumericKeypad;
|
var stbKeypad = this as ISetTopBoxNumericKeypad;
|
||||||
|
|
||||||
trilist.StringInput[joinMap.KeypadAccessoryButton1Label].StringValue = stbKeypad.KeypadAccessoryButton1Label;
|
trilist.StringInput[joinMap.KeypadAccessoryButton1Label.JoinNumber].StringValue = stbKeypad.KeypadAccessoryButton1Label;
|
||||||
trilist.StringInput[joinMap.KeypadAccessoryButton2Label].StringValue = stbKeypad.KeypadAccessoryButton2Label;
|
trilist.StringInput[joinMap.KeypadAccessoryButton2Label.JoinNumber].StringValue = stbKeypad.KeypadAccessoryButton2Label;
|
||||||
|
|
||||||
trilist.BooleanInput[joinMap.HasKeypadAccessoryButton1].BoolValue = stbKeypad.HasKeypadAccessoryButton1;
|
trilist.BooleanInput[joinMap.HasKeypadAccessoryButton1.JoinNumber].BoolValue = stbKeypad.HasKeypadAccessoryButton1;
|
||||||
trilist.BooleanInput[joinMap.HasKeypadAccessoryButton2].BoolValue = stbKeypad.HasKeypadAccessoryButton2;
|
trilist.BooleanInput[joinMap.HasKeypadAccessoryButton2.JoinNumber].BoolValue = stbKeypad.HasKeypadAccessoryButton2;
|
||||||
|
|
||||||
trilist.SetBoolSigAction(joinMap.Digit0, stbKeypad.Digit0);
|
trilist.SetBoolSigAction(joinMap.Digit0.JoinNumber, stbKeypad.Digit0);
|
||||||
trilist.SetBoolSigAction(joinMap.Digit1, stbKeypad.Digit1);
|
trilist.SetBoolSigAction(joinMap.Digit1.JoinNumber, stbKeypad.Digit1);
|
||||||
trilist.SetBoolSigAction(joinMap.Digit2, stbKeypad.Digit2);
|
trilist.SetBoolSigAction(joinMap.Digit2.JoinNumber, stbKeypad.Digit2);
|
||||||
trilist.SetBoolSigAction(joinMap.Digit3, stbKeypad.Digit3);
|
trilist.SetBoolSigAction(joinMap.Digit3.JoinNumber, stbKeypad.Digit3);
|
||||||
trilist.SetBoolSigAction(joinMap.Digit4, stbKeypad.Digit4);
|
trilist.SetBoolSigAction(joinMap.Digit4.JoinNumber, stbKeypad.Digit4);
|
||||||
trilist.SetBoolSigAction(joinMap.Digit5, stbKeypad.Digit5);
|
trilist.SetBoolSigAction(joinMap.Digit5.JoinNumber, stbKeypad.Digit5);
|
||||||
trilist.SetBoolSigAction(joinMap.Digit6, stbKeypad.Digit6);
|
trilist.SetBoolSigAction(joinMap.Digit6.JoinNumber, stbKeypad.Digit6);
|
||||||
trilist.SetBoolSigAction(joinMap.Digit7, stbKeypad.Digit7);
|
trilist.SetBoolSigAction(joinMap.Digit7.JoinNumber, stbKeypad.Digit7);
|
||||||
trilist.SetBoolSigAction(joinMap.Digit8, stbKeypad.Digit8);
|
trilist.SetBoolSigAction(joinMap.Digit8.JoinNumber, stbKeypad.Digit8);
|
||||||
trilist.SetBoolSigAction(joinMap.Digit9, stbKeypad.Digit9);
|
trilist.SetBoolSigAction(joinMap.Digit9.JoinNumber, stbKeypad.Digit9);
|
||||||
trilist.SetBoolSigAction(joinMap.KeypadAccessoryButton1Press, stbKeypad.KeypadAccessoryButton1);
|
trilist.SetBoolSigAction(joinMap.KeypadAccessoryButton1Press.JoinNumber, stbKeypad.KeypadAccessoryButton1);
|
||||||
trilist.SetBoolSigAction(joinMap.KeypadAccessoryButton2Press, stbKeypad.KeypadAccessoryButton1);
|
trilist.SetBoolSigAction(joinMap.KeypadAccessoryButton2Press.JoinNumber, stbKeypad.KeypadAccessoryButton1);
|
||||||
trilist.SetBoolSigAction(joinMap.Dash, stbKeypad.Dash);
|
trilist.SetBoolSigAction(joinMap.Dash.JoinNumber, stbKeypad.Dash);
|
||||||
trilist.SetBoolSigAction(joinMap.KeypadEnter, stbKeypad.KeypadEnter);
|
trilist.SetBoolSigAction(joinMap.KeypadEnter.JoinNumber, stbKeypad.KeypadEnter);
|
||||||
|
|
||||||
var stbTransport = this as ITransport;
|
var stbTransport = this as ITransport;
|
||||||
trilist.SetBoolSigAction(joinMap.Play, stbTransport.Play);
|
trilist.SetBoolSigAction(joinMap.Play.JoinNumber, stbTransport.Play);
|
||||||
trilist.SetBoolSigAction(joinMap.Pause, stbTransport.Pause);
|
trilist.SetBoolSigAction(joinMap.Pause.JoinNumber, stbTransport.Pause);
|
||||||
trilist.SetBoolSigAction(joinMap.Rewind, stbTransport.Rewind);
|
trilist.SetBoolSigAction(joinMap.Rewind.JoinNumber, stbTransport.Rewind);
|
||||||
trilist.SetBoolSigAction(joinMap.FFwd, stbTransport.FFwd);
|
trilist.SetBoolSigAction(joinMap.FFwd.JoinNumber, stbTransport.FFwd);
|
||||||
trilist.SetBoolSigAction(joinMap.ChapMinus, stbTransport.ChapMinus);
|
trilist.SetBoolSigAction(joinMap.ChapMinus.JoinNumber, stbTransport.ChapMinus);
|
||||||
trilist.SetBoolSigAction(joinMap.ChapPlus, stbTransport.ChapPlus);
|
trilist.SetBoolSigAction(joinMap.ChapPlus.JoinNumber, stbTransport.ChapPlus);
|
||||||
trilist.SetBoolSigAction(joinMap.Stop, stbTransport.Stop);
|
trilist.SetBoolSigAction(joinMap.Stop.JoinNumber, stbTransport.Stop);
|
||||||
trilist.SetBoolSigAction(joinMap.Record, stbTransport.Record);
|
trilist.SetBoolSigAction(joinMap.Record.JoinNumber, stbTransport.Record);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,186 +1,186 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
using PepperDash.Essentials.Core.Bridges;
|
||||||
using PepperDash.Essentials.Core.Routing;
|
using PepperDash.Essentials.Core.Routing;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common
|
namespace PepperDash.Essentials.Devices.Common
|
||||||
{
|
{
|
||||||
public class AppleTV : EssentialsBridgeableDevice, IDPad, ITransport, IUiDisplayInfo, IRoutingOutputs
|
public class AppleTV : EssentialsBridgeableDevice, IDPad, ITransport, IUiDisplayInfo, IRoutingOutputs
|
||||||
{
|
{
|
||||||
|
|
||||||
public IrOutputPortController IrPort { get; private set; }
|
public IrOutputPortController IrPort { get; private set; }
|
||||||
public const string StandardDriverName = "Apple AppleTV-v2.ir";
|
public const string StandardDriverName = "Apple AppleTV-v2.ir";
|
||||||
public uint DisplayUiType { get { return DisplayUiConstants.TypeAppleTv; } }
|
public uint DisplayUiType { get { return DisplayUiConstants.TypeAppleTv; } }
|
||||||
|
|
||||||
public AppleTV(string key, string name, IrOutputPortController portCont)
|
public AppleTV(string key, string name, IrOutputPortController portCont)
|
||||||
: base(key, name)
|
: base(key, name)
|
||||||
{
|
{
|
||||||
IrPort = portCont;
|
IrPort = portCont;
|
||||||
DeviceManager.AddDevice(portCont);
|
DeviceManager.AddDevice(portCont);
|
||||||
|
|
||||||
HdmiOut = new RoutingOutputPort(RoutingPortNames.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
HdmiOut = new RoutingOutputPort(RoutingPortNames.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
eRoutingPortConnectionType.Hdmi, null, this);
|
||||||
AnyAudioOut = new RoutingOutputPort(RoutingPortNames.AnyAudioOut, eRoutingSignalType.Audio,
|
AnyAudioOut = new RoutingOutputPort(RoutingPortNames.AnyAudioOut, eRoutingSignalType.Audio,
|
||||||
eRoutingPortConnectionType.DigitalAudio, null, this);
|
eRoutingPortConnectionType.DigitalAudio, null, this);
|
||||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort> { HdmiOut, AnyAudioOut };
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> { HdmiOut, AnyAudioOut };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#region IDPad Members
|
#region IDPad Members
|
||||||
|
|
||||||
public void Up(bool pressRelease)
|
public void Up(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease("+", pressRelease);
|
IrPort.PressRelease("+", pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Down(bool pressRelease)
|
public void Down(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease("-", pressRelease);
|
IrPort.PressRelease("-", pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Left(bool pressRelease)
|
public void Left(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_TRACK_MINUS, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_TRACK_MINUS, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Right(bool pressRelease)
|
public void Right(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_TRACK_PLUS, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_TRACK_PLUS, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Select(bool pressRelease)
|
public void Select(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_ENTER, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_ENTER, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Menu(bool pressRelease)
|
public void Menu(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease("Menu", pressRelease);
|
IrPort.PressRelease("Menu", pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Exit(bool pressRelease)
|
public void Exit(bool pressRelease)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ITransport Members
|
#region ITransport Members
|
||||||
|
|
||||||
public void Play(bool pressRelease)
|
public void Play(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease("PLAY/PAUSE", pressRelease);
|
IrPort.PressRelease("PLAY/PAUSE", pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Pause(bool pressRelease)
|
public void Pause(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease("PLAY/PAUSE", pressRelease);
|
IrPort.PressRelease("PLAY/PAUSE", pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Not implemented
|
/// Not implemented
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pressRelease"></param>
|
/// <param name="pressRelease"></param>
|
||||||
public void Rewind(bool pressRelease)
|
public void Rewind(bool pressRelease)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Not implemented
|
/// Not implemented
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pressRelease"></param>
|
/// <param name="pressRelease"></param>
|
||||||
public void FFwd(bool pressRelease)
|
public void FFwd(bool pressRelease)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Not implemented
|
/// Not implemented
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pressRelease"></param>
|
/// <param name="pressRelease"></param>
|
||||||
public void ChapMinus(bool pressRelease)
|
public void ChapMinus(bool pressRelease)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Not implemented
|
/// Not implemented
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pressRelease"></param>
|
/// <param name="pressRelease"></param>
|
||||||
public void ChapPlus(bool pressRelease)
|
public void ChapPlus(bool pressRelease)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Not implemented
|
/// Not implemented
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pressRelease"></param>
|
/// <param name="pressRelease"></param>
|
||||||
public void Stop(bool pressRelease)
|
public void Stop(bool pressRelease)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Not implemented
|
/// Not implemented
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pressRelease"></param>
|
/// <param name="pressRelease"></param>
|
||||||
public void Record(bool pressRelease)
|
public void Record(bool pressRelease)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IRoutingOutputs Members
|
#region IRoutingOutputs Members
|
||||||
|
|
||||||
public RoutingOutputPort HdmiOut { get; private set; }
|
public RoutingOutputPort HdmiOut { get; private set; }
|
||||||
public RoutingOutputPort AnyAudioOut { get; private set; }
|
public RoutingOutputPort AnyAudioOut { get; private set; }
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
var joinMap = new AppleTvJoinMap();
|
var joinMap = new AppleTvJoinMap(joinStart);
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<AppleTvJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<AppleTvJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
|
|
||||||
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
Debug.Console(0, "Linking to Bridge Type {0}", GetType().Name);
|
Debug.Console(0, "Linking to Bridge Type {0}", GetType().Name);
|
||||||
|
|
||||||
trilist.SetBoolSigAction(joinMap.UpArrow, Up);
|
trilist.SetBoolSigAction(joinMap.UpArrow.JoinNumber, Up);
|
||||||
trilist.SetBoolSigAction(joinMap.DnArrow, Down);
|
trilist.SetBoolSigAction(joinMap.DnArrow.JoinNumber, Down);
|
||||||
trilist.SetBoolSigAction(joinMap.LeftArrow, Left);
|
trilist.SetBoolSigAction(joinMap.LeftArrow.JoinNumber, Left);
|
||||||
trilist.SetBoolSigAction(joinMap.RightArrow, Right);
|
trilist.SetBoolSigAction(joinMap.RightArrow.JoinNumber, Right);
|
||||||
trilist.SetBoolSigAction(joinMap.Select, Select);
|
trilist.SetBoolSigAction(joinMap.Select.JoinNumber, Select);
|
||||||
trilist.SetBoolSigAction(joinMap.Menu, Menu);
|
trilist.SetBoolSigAction(joinMap.Menu.JoinNumber, Menu);
|
||||||
trilist.SetBoolSigAction(joinMap.PlayPause, Play);
|
trilist.SetBoolSigAction(joinMap.PlayPause.JoinNumber, Play);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AppleTVFactory : EssentialsDeviceFactory<AppleTV>
|
public class AppleTVFactory : EssentialsDeviceFactory<AppleTV>
|
||||||
{
|
{
|
||||||
public AppleTVFactory()
|
public AppleTVFactory()
|
||||||
{
|
{
|
||||||
TypeNames = new List<string>() { "appletv" };
|
TypeNames = new List<string>() { "appletv" };
|
||||||
}
|
}
|
||||||
|
|
||||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||||
{
|
{
|
||||||
Debug.Console(1, "Factory Attempting to create new AppleTV Device");
|
Debug.Console(1, "Factory Attempting to create new AppleTV Device");
|
||||||
var irCont = IRPortHelper.GetIrOutputPortController(dc);
|
var irCont = IRPortHelper.GetIrOutputPortController(dc);
|
||||||
return new AppleTV(dc.Key, dc.Name, irCont);
|
return new AppleTV(dc.Key, dc.Name, irCont);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user