mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-07 08:45:06 +00:00
Compare commits
19 Commits
feature/Ge
...
2.0.0-beta
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7a9f76ee12 | ||
|
|
c8ccbe1fcf | ||
|
|
ff068b98ac | ||
|
|
665101b4c8 | ||
|
|
8a3c7ce6d4 | ||
|
|
55cd3036c8 | ||
|
|
de3f2004de | ||
|
|
0cfc727b08 | ||
|
|
0f8251ea8a | ||
|
|
13cbeb7605 | ||
|
|
2fd2b6787f | ||
|
|
dd48147fdb | ||
|
|
33c3c1ad30 | ||
|
|
f154ce2385 | ||
|
|
9a0cf05360 | ||
|
|
d2e4be162d | ||
|
|
9dbfd9bcae | ||
|
|
8d1ec183df | ||
|
|
d52941d91d |
23
.github/scripts/GenerateVersionNumber-2.0.0.ps1
vendored
Normal file
23
.github/scripts/GenerateVersionNumber-2.0.0.ps1
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
$latestVersion = [version]"2.0.0"
|
||||||
|
|
||||||
|
$newVersion = [version]$latestVersion
|
||||||
|
$phase = ""
|
||||||
|
$newVersionString = ""
|
||||||
|
|
||||||
|
switch -regex ($Env:GITHUB_REF) {
|
||||||
|
'^refs\/pull\/*.' {
|
||||||
|
$phase = 'beta';
|
||||||
|
$newVersionString = "{0}-{1}-{2}" -f $newVersion, $phase, $Env:GITHUB_RUN_NUMBER
|
||||||
|
}
|
||||||
|
'^refs\/heads\/feature-2.0.0\/*.' {
|
||||||
|
$phase = 'alpha'
|
||||||
|
$newVersionString = "{0}-{1}-{2}" -f $newVersion, $phase, $Env:GITHUB_RUN_NUMBER
|
||||||
|
}
|
||||||
|
'development-2.0.0' {
|
||||||
|
$phase = 'beta'
|
||||||
|
$newVersionString = "{0}-{1}-{2}" -f $newVersion, $phase, $Env:GITHUB_RUN_NUMBER
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Write-Output $newVersionString
|
||||||
307
.github/workflows/Build Essentials.yml
vendored
Normal file
307
.github/workflows/Build Essentials.yml
vendored
Normal file
@@ -0,0 +1,307 @@
|
|||||||
|
name: Build Essentials 2.0.0
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- feature-2.0.0/*
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- closed
|
||||||
|
branches:
|
||||||
|
- development-2.0.0
|
||||||
|
|
||||||
|
env:
|
||||||
|
# solution path doesn't need slashes unless there it is multiple folders deep
|
||||||
|
# solution name does not include extension. .sln is assumed
|
||||||
|
SOLUTION_PATH: PepperDashEssentials
|
||||||
|
SOLUTION_FILE: PepperDashEssentials
|
||||||
|
# Do not edit this, we're just creating it here
|
||||||
|
VERSION: 0.0.0-buildtype-buildnumber
|
||||||
|
# Defaults to debug for build type
|
||||||
|
BUILD_TYPE: Debug
|
||||||
|
# Defaults to main as the release branch. Change as necessary
|
||||||
|
RELEASE_BRANCH: main
|
||||||
|
jobs:
|
||||||
|
Build_Project:
|
||||||
|
runs-on: windows-2019
|
||||||
|
steps:
|
||||||
|
# First we checkout the source repo
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
# Fetch all tags
|
||||||
|
- name: Fetch tags
|
||||||
|
run: git fetch --tags
|
||||||
|
# Generate the appropriate version number
|
||||||
|
- name: Set Version Number
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
$version = ./.github/scripts/GenerateVersionNumber-2.0.0.ps1
|
||||||
|
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
|
# Use the version number to set the version of the assemblies
|
||||||
|
- name: Update AssemblyInfo.cs
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
./.github/scripts/UpdateAssemblyVersion.ps1 ${{ env.VERSION }}
|
||||||
|
- name: restore Nuget Packages
|
||||||
|
run: nuget install .\packages.config -OutputDirectory .\packages -ExcludeVersion
|
||||||
|
# Login to Docker
|
||||||
|
- name: Login to Docker
|
||||||
|
uses: azure/docker-login@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_TOKEN }}
|
||||||
|
# Build the solutions in the docker image
|
||||||
|
- name: Build Solution
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
Invoke-Expression "docker run --rm --mount type=bind,source=""$($Env:GITHUB_WORKSPACE)"",target=""c:/project"" pepperdash/sspbuilder c:\cihelpers\vsidebuild.exe -Solution ""c:\project\$($Env:SOLUTION_FILE).sln"" -BuildSolutionConfiguration $($ENV:BUILD_TYPE)"
|
||||||
|
# Zip up the output files as needed
|
||||||
|
- name: Zip Build Output
|
||||||
|
shell: powershell
|
||||||
|
run: ./.github/scripts/ZipBuildOutput.ps1
|
||||||
|
# Write the version to a file to be consumed by the push jobs
|
||||||
|
- name: Write Version
|
||||||
|
run: Write-Output "$($Env:VERSION)" | Out-File -FilePath "$($Env:GITHUB_HOME)\output\version.txt"
|
||||||
|
# Upload the build output as an artifact
|
||||||
|
- name: Upload Build Output
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: Build
|
||||||
|
path: ./${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip
|
||||||
|
# Upload the Version file as an artifact
|
||||||
|
- name: Upload version.txt
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: Version
|
||||||
|
path: ${{env.GITHUB_HOME}}\output\version.txt
|
||||||
|
# Create the release on the source repo
|
||||||
|
- name: Create tag for non-rc builds
|
||||||
|
if: contains(env.VERSION, 'alpha') || contains(env.VERSION, 'beta')
|
||||||
|
run: |
|
||||||
|
git tag $($Env:VERSION)
|
||||||
|
git push --tags origin
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
# using contributor's version to allow for pointing at the right commit
|
||||||
|
if: contains(env.VERSION,'-rc-') || contains(env.VERSION,'-hotfix-')
|
||||||
|
uses: fleskesvor/create-release@feature/support-target-commitish
|
||||||
|
with:
|
||||||
|
tag_name: ${{ env.VERSION }}
|
||||||
|
release_name: ${{ env.VERSION }}
|
||||||
|
prerelease: ${{contains('debug', env.BUILD_TYPE)}}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# Upload the build package to the release
|
||||||
|
- name: Upload Release Package
|
||||||
|
if: contains(env.VERSION,'-rc-') || contains(env.VERSION,'-hotfix-')
|
||||||
|
id: upload_release
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: ./${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip
|
||||||
|
asset_name: ${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip
|
||||||
|
asset_content_type: application/zip
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
Push_Nuget_Package:
|
||||||
|
needs: Build_Project
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- name: Download Build Version Info
|
||||||
|
uses: actions/download-artifact@v1
|
||||||
|
with:
|
||||||
|
name: Version
|
||||||
|
- name: Set Version Number
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
Get-ChildItem "./Version"
|
||||||
|
$version = Get-Content -Path ./Version/version.txt
|
||||||
|
Write-Host "Version: $version"
|
||||||
|
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
|
Remove-Item -Path ./Version/version.txt
|
||||||
|
Remove-Item -Path ./Version
|
||||||
|
- name: Download Build output
|
||||||
|
uses: actions/download-artifact@v1
|
||||||
|
with:
|
||||||
|
name: Build
|
||||||
|
path: ./
|
||||||
|
- name: Unzip Build file
|
||||||
|
run: |
|
||||||
|
Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\
|
||||||
|
Remove-Item -Path .\*.zip
|
||||||
|
- name: Copy Files to root & delete output directory
|
||||||
|
run: |
|
||||||
|
Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz")
|
||||||
|
Get-ChildItem -Path .\output\* | Copy-Item -Destination .\
|
||||||
|
Remove-Item -Path .\output -Recurse
|
||||||
|
- name: Add nuget.exe
|
||||||
|
uses: nuget/setup-nuget@v1
|
||||||
|
- name: Add Github Packages source
|
||||||
|
run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Add nuget.org API Key
|
||||||
|
run: nuget setApiKey ${{ secrets.NUGET_API_KEY }}
|
||||||
|
- name: Create nuget package
|
||||||
|
run: nuget pack "./PepperDash_Essentials_Core.nuspec" -version ${{ env.VERSION }}
|
||||||
|
- name: Publish nuget package to Github registry
|
||||||
|
run: nuget push **/*.nupkg -source github
|
||||||
|
- name: Publish nuget package to nuget.org
|
||||||
|
run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json
|
||||||
|
# This step always runs and pushes the build to the internal build rep
|
||||||
|
# Internal_Push_Output:
|
||||||
|
# needs: Build_Project
|
||||||
|
# runs-on: windows-latest
|
||||||
|
# steps:
|
||||||
|
# - name: check Github ref
|
||||||
|
# run: ${{toJson(github.ref)}}
|
||||||
|
# # Checkout the repo
|
||||||
|
# - name: Checkout Builds Repo
|
||||||
|
# uses: actions/checkout@v2
|
||||||
|
# with:
|
||||||
|
# token: ${{ secrets.BUILDS_TOKEN }}
|
||||||
|
# repository: PepperDash-Engineering/essentials-builds
|
||||||
|
# ref: ${{ Env.GITHUB_REF }}
|
||||||
|
# # Download the version artifact from the build job
|
||||||
|
# - name: Download Build Version Info
|
||||||
|
# uses: actions/download-artifact@v1
|
||||||
|
# with:
|
||||||
|
# name: Version
|
||||||
|
# - name: Check Directory
|
||||||
|
# run: Get-ChildItem "./"
|
||||||
|
# # Set the version number environment variable from the file we just downloaded
|
||||||
|
# - name: Set Version Number
|
||||||
|
# shell: powershell
|
||||||
|
# run: |
|
||||||
|
# Get-ChildItem "./Version"
|
||||||
|
# $version = Get-Content -Path ./Version/version.txt
|
||||||
|
# Write-Host "Version: $version"
|
||||||
|
# echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
|
# Remove-Item -Path ./Version/version.txt
|
||||||
|
# Remove-Item -Path ./Version
|
||||||
|
# # Checkout/Create the branch
|
||||||
|
# - name: Create new branch
|
||||||
|
# run: git checkout -b $($Env:GITHUB_REF -replace "refs/heads/")
|
||||||
|
# # Download the build output into the repo
|
||||||
|
# - name: Download Build output
|
||||||
|
# uses: actions/download-artifact@v1
|
||||||
|
# with:
|
||||||
|
# name: Build
|
||||||
|
# path: ./
|
||||||
|
# - name: Check directory
|
||||||
|
# run: Get-ChildItem ./
|
||||||
|
# # Unzip the build package file
|
||||||
|
# - name: Unzip Build file
|
||||||
|
# run: |
|
||||||
|
# Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\
|
||||||
|
# Remove-Item -Path .\*.zip
|
||||||
|
# - name: Check directory again
|
||||||
|
# run: Get-ChildItem ./
|
||||||
|
# # Copy Contents of output folder to root directory
|
||||||
|
# - name: Copy Files to root & delete output directory
|
||||||
|
# run: |
|
||||||
|
# Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz")
|
||||||
|
# Get-ChildItem -Path .\output\* | Copy-Item -Destination .\
|
||||||
|
# Remove-Item -Path .\output -Recurse
|
||||||
|
# # Commits the build output to the branch and tags it with the version
|
||||||
|
# - name: Commit build output and tag the commit
|
||||||
|
# shell: powershell
|
||||||
|
# run: |
|
||||||
|
# git config user.email "actions@pepperdash.com"
|
||||||
|
# git config user.name "GitHub Actions"
|
||||||
|
# git add .
|
||||||
|
# $commit = "Build $($Env:GITHUB_RUN_NUMBER) from commit: https://github.com/$($Env:GITHUB_REPOSITORY)/commit/$($Env:GITHUB_SHA)"
|
||||||
|
# Write-Host "Commit: $commit"
|
||||||
|
# git commit -m $commit
|
||||||
|
# git tag $($Env:VERSION)
|
||||||
|
# # Push the commit
|
||||||
|
# - name: Push to Builds Repo
|
||||||
|
# shell: powershell
|
||||||
|
# run: |
|
||||||
|
# $branch = $($Env:GITHUB_REF) -replace "refs/heads/"
|
||||||
|
# Write-Host "Branch: $branch"
|
||||||
|
# git push -u origin $($branch) --force
|
||||||
|
# # Push the tags
|
||||||
|
# - name: Push tags
|
||||||
|
# run: git push --tags origin
|
||||||
|
# - name: Check Directory
|
||||||
|
# run: Get-ChildItem ./
|
||||||
|
# # This step only runs if the branch is main or release/ runs and pushes the build to the public build repo
|
||||||
|
# Public_Push_Output:
|
||||||
|
# needs: Build_Project
|
||||||
|
# runs-on: windows-latest
|
||||||
|
# if: contains(github.ref, 'main') || contains(github.ref, '/release/')
|
||||||
|
# steps:
|
||||||
|
# # Checkout the repo
|
||||||
|
# - name: check Github ref
|
||||||
|
# run: ${{toJson(github.ref)}}
|
||||||
|
# - name: Checkout Builds Repo
|
||||||
|
# uses: actions/checkout@v2
|
||||||
|
# with:
|
||||||
|
# token: ${{ secrets.BUILDS_TOKEN }}
|
||||||
|
# repository: PepperDash/Essentials-Builds
|
||||||
|
# ref: ${{ Env.GITHUB_REF }}
|
||||||
|
# # Download the version artifact from the build job
|
||||||
|
# - name: Download Build Version Info
|
||||||
|
# uses: actions/download-artifact@v1
|
||||||
|
# with:
|
||||||
|
# name: Version
|
||||||
|
# - name: Check Directory
|
||||||
|
# run: Get-ChildItem "./"
|
||||||
|
# # Set the version number environment variable from the file we just downloaded
|
||||||
|
# - name: Set Version Number
|
||||||
|
# shell: powershell
|
||||||
|
# run: |
|
||||||
|
# Get-ChildItem "./Version"
|
||||||
|
# $version = Get-Content -Path ./Version/version.txt
|
||||||
|
# Write-Host "Version: $version"
|
||||||
|
# echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
|
# Remove-Item -Path ./Version/version.txt
|
||||||
|
# Remove-Item -Path ./Version
|
||||||
|
# # Checkout/Create the branch
|
||||||
|
# - name: Create new branch
|
||||||
|
# run: git checkout -b $($Env:GITHUB_REF -replace "refs/heads/")
|
||||||
|
# # Download the build output into the repo
|
||||||
|
# - name: Download Build output
|
||||||
|
# uses: actions/download-artifact@v1
|
||||||
|
# with:
|
||||||
|
# name: Build
|
||||||
|
# path: ./
|
||||||
|
# - name: Check directory
|
||||||
|
# run: Get-ChildItem ./
|
||||||
|
# # Unzip the build package file
|
||||||
|
# - name: Unzip Build file
|
||||||
|
# run: |
|
||||||
|
# Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\
|
||||||
|
# Remove-Item -Path .\*.zip
|
||||||
|
# - name: Check directory again
|
||||||
|
# run: Get-ChildItem ./
|
||||||
|
# # Copy Contents of output folder to root directory
|
||||||
|
# - name: Copy Files to root & delete output directory
|
||||||
|
# run: |
|
||||||
|
# Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz")
|
||||||
|
# Get-ChildItem -Path .\output\* | Copy-Item -Destination .\
|
||||||
|
# Remove-Item -Path .\output -Recurse
|
||||||
|
# # Commits the build output to the branch and tags it with the version
|
||||||
|
# - name: Commit build output and tag the commit
|
||||||
|
# shell: powershell
|
||||||
|
# run: |
|
||||||
|
# git config user.email "actions@pepperdash.com"
|
||||||
|
# git config user.name "GitHub Actions"
|
||||||
|
# git add .
|
||||||
|
# $commit = "Build $($Env:GITHUB_RUN_NUMBER) from commit: https://github.com/$($Env:GITHUB_REPOSITORY)/commit/$($Env:GITHUB_SHA)"
|
||||||
|
# Write-Host "Commit: $commit"
|
||||||
|
# git commit -m $commit
|
||||||
|
# git tag $($Env:VERSION)
|
||||||
|
# # Push the commit
|
||||||
|
# - name: Push to Builds Repo
|
||||||
|
# shell: powershell
|
||||||
|
# run: |
|
||||||
|
# $branch = $($Env:GITHUB_REF) -replace "refs/heads/"
|
||||||
|
# Write-Host "Branch: $branch"
|
||||||
|
# git push -u origin $($branch) --force
|
||||||
|
# # Push the tags
|
||||||
|
# - name: Push tags
|
||||||
|
# run: git push --tags origin
|
||||||
|
# - name: Check Directory
|
||||||
|
# run: Get-ChildItem ./
|
||||||
37
.github/workflows/add-issues-to-project.yml
vendored
Normal file
37
.github/workflows/add-issues-to-project.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
name: Add bugs to bugs project
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- labeled
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-secret:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
my-key: ${{ steps.my-key.outputs.defined }}
|
||||||
|
steps:
|
||||||
|
- id: my-key
|
||||||
|
if: "${{ env.MY_KEY != '' }}"
|
||||||
|
run: echo "::set-output name=defined::true"
|
||||||
|
env:
|
||||||
|
MY_KEY: ${{ secrets.PROJECT_URL }}
|
||||||
|
throw-error:
|
||||||
|
name: Check
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [check-secret]
|
||||||
|
if: needs.check-secret.outputs.my-key != 'true'
|
||||||
|
steps:
|
||||||
|
- run: echo "The Project URL Repo Secret is empty"
|
||||||
|
add-to-project:
|
||||||
|
name: Add issue to project
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [check-secret]
|
||||||
|
if: needs.check-secret.outputs.my-key == 'true'
|
||||||
|
steps:
|
||||||
|
- uses: actions/add-to-project@main
|
||||||
|
with:
|
||||||
|
project-url: ${{ secrets.PROJECT_URL }}
|
||||||
|
github-token: ${{ secrets.GH_PROJECTS_PASSWORD }}
|
||||||
|
|
||||||
@@ -9,6 +9,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDashEssentials", "Pep
|
|||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDash_Essentials_Core", "essentials-framework\Essentials Core\PepperDashEssentialsBase\PepperDash_Essentials_Core.csproj", "{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDash_Essentials_Core", "essentials-framework\Essentials Core\PepperDashEssentialsBase\PepperDash_Essentials_Core.csproj", "{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{E51D7C84-4906-486C-B2BA-EEB3B4E9731B} = {E51D7C84-4906-486C-B2BA-EEB3B4E9731B}
|
||||||
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Essentials Devices Common", "essentials-framework\Essentials Devices Common\Essentials Devices Common\Essentials Devices Common.csproj", "{892B761C-E479-44CE-BD74-243E9214AF13}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Essentials Devices Common", "essentials-framework\Essentials Devices Common\Essentials Devices Common\Essentials Devices Common.csproj", "{892B761C-E479-44CE-BD74-243E9214AF13}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
@@ -20,6 +23,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDash_Essentials_DM",
|
|||||||
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} = {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}
|
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} = {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDash_Essentials_Interfaces", "essentials-framework\Essentials Interfaces\PepperDash_Essentials_Interfaces\PepperDash_Essentials_Interfaces.csproj", "{E51D7C84-4906-486C-B2BA-EEB3B4E9731B}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -42,6 +47,10 @@ Global
|
|||||||
{9199CE8A-0C9F-4952-8672-3EED798B284F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{9199CE8A-0C9F-4952-8672-3EED798B284F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{9199CE8A-0C9F-4952-8672-3EED798B284F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{9199CE8A-0C9F-4952-8672-3EED798B284F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{9199CE8A-0C9F-4952-8672-3EED798B284F}.Release|Any CPU.Build.0 = Release|Any CPU
|
{9199CE8A-0C9F-4952-8672-3EED798B284F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{E51D7C84-4906-486C-B2BA-EEB3B4E9731B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{E51D7C84-4906-486C-B2BA-EEB3B4E9731B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{E51D7C84-4906-486C-B2BA-EEB3B4E9731B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{E51D7C84-4906-486C-B2BA-EEB3B4E9731B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ namespace PepperDash.Essentials
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// DSP/DMPS format: deviceKey--levelName, biampTesira-1--master
|
// DSP format: deviceKey--levelName, biampTesira-1--master
|
||||||
match = Regex.Match(DeviceKey, @"([-_\w]+)--(.+)");
|
match = Regex.Match(DeviceKey, @"([-_\w]+)--(.+)");
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
{
|
{
|
||||||
@@ -67,27 +67,6 @@ namespace PepperDash.Essentials
|
|||||||
if (dsp.LevelControlPoints.ContainsKey(levelTag)) // should always...
|
if (dsp.LevelControlPoints.ContainsKey(levelTag)) // should always...
|
||||||
return dsp.LevelControlPoints[levelTag];
|
return dsp.LevelControlPoints[levelTag];
|
||||||
}
|
}
|
||||||
|
|
||||||
var dmps = DeviceManager.GetDeviceForKey(devKey) as DmpsAudioOutputController;
|
|
||||||
if (dmps != null)
|
|
||||||
{
|
|
||||||
var levelTag = match.Groups[2].Value;
|
|
||||||
switch (levelTag)
|
|
||||||
{
|
|
||||||
case "master":
|
|
||||||
return dmps.MasterVolumeLevel;
|
|
||||||
case "source":
|
|
||||||
return dmps.SourceVolumeLevel;
|
|
||||||
case "micsmaster":
|
|
||||||
return dmps.MicsMasterVolumeLevel;
|
|
||||||
case "codec1":
|
|
||||||
return dmps.Codec1VolumeLevel;
|
|
||||||
case "codec2":
|
|
||||||
return dmps.Codec2VolumeLevel;
|
|
||||||
default:
|
|
||||||
return dmps.MasterVolumeLevel;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// No volume for some reason. We have failed as developers
|
// No volume for some reason. We have failed as developers
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,29 +47,28 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public override void InitializeSystem()
|
public override void InitializeSystem()
|
||||||
{
|
{
|
||||||
|
_startTimer = new CTimer(StartSystem,StartupTime);
|
||||||
|
|
||||||
|
|
||||||
// If the control system is a DMPS type, we need to wait to exit this method until all devices have had time to activate
|
// If the control system is a DMPS type, we need to wait to exit this method until all devices have had time to activate
|
||||||
// to allow any HD-BaseT DM endpoints to register first.
|
// to allow any HD-BaseT DM endpoints to register first.
|
||||||
bool preventInitializationComplete = Global.ControlSystemIsDmpsType;
|
if (Global.ControlSystemIsDmpsType)
|
||||||
if (preventInitializationComplete)
|
|
||||||
{
|
{
|
||||||
Debug.Console(1, "******************* InitializeSystem() Entering **********************");
|
Debug.Console(1, "******************* InitializeSystem() Entering **********************");
|
||||||
_startTimer = new CTimer(StartSystem, preventInitializationComplete, StartupTime);
|
|
||||||
_initializeEvent = new CEvent(true, false);
|
_initializeEvent = new CEvent();
|
||||||
|
|
||||||
DeviceManager.AllDevicesRegistered += (o, a) =>
|
DeviceManager.AllDevicesRegistered += (o, a) =>
|
||||||
{
|
{
|
||||||
_initializeEvent.Set();
|
_initializeEvent.Set();
|
||||||
|
Debug.Console(1, "******************* InitializeSystem() Exiting **********************");
|
||||||
};
|
};
|
||||||
|
|
||||||
_initializeEvent.Wait(30000);
|
_initializeEvent.Wait(30000);
|
||||||
Debug.Console(1, "******************* InitializeSystem() Exiting **********************");
|
|
||||||
SystemMonitor.ProgramInitialization.ProgramInitializationComplete = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_startTimer = new CTimer(StartSystem, preventInitializationComplete, StartupTime);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StartSystem(object preventInitialization)
|
private void StartSystem(object obj)
|
||||||
{
|
{
|
||||||
DeterminePlatform();
|
DeterminePlatform();
|
||||||
|
|
||||||
@@ -81,7 +80,7 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
CrestronConsole.AddNewConsoleCommand(PluginLoader.ReportAssemblyVersions, "reportversions", "Reports the versions of the loaded assemblies", ConsoleAccessLevelEnum.AccessOperator);
|
CrestronConsole.AddNewConsoleCommand(PluginLoader.ReportAssemblyVersions, "reportversions", "Reports the versions of the loaded assemblies", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
CrestronConsole.AddNewConsoleCommand(Core.DeviceFactory.GetDeviceFactoryTypes, "gettypes", "Gets the device types that can be built. Accepts a filter string.", ConsoleAccessLevelEnum.AccessOperator);
|
CrestronConsole.AddNewConsoleCommand(PepperDash.Essentials.Core.DeviceFactory.GetDeviceFactoryTypes, "gettypes", "Gets the device types that can be built. Accepts a filter string.", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
CrestronConsole.AddNewConsoleCommand(BridgeHelper.PrintJoinMap, "getjoinmap", "map(s) for bridge or device on bridge [brKey [devKey]]", ConsoleAccessLevelEnum.AccessOperator);
|
CrestronConsole.AddNewConsoleCommand(BridgeHelper.PrintJoinMap, "getjoinmap", "map(s) for bridge or device on bridge [brKey [devKey]]", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
@@ -93,26 +92,25 @@ namespace PepperDash.Essentials
|
|||||||
CrestronConsole.AddNewConsoleCommand(s =>
|
CrestronConsole.AddNewConsoleCommand(s =>
|
||||||
{
|
{
|
||||||
foreach (var tl in TieLineCollection.Default)
|
foreach (var tl in TieLineCollection.Default)
|
||||||
CrestronConsole.ConsoleCommandResponse(" {0}{1}", tl, CrestronEnvironment.NewLine);
|
CrestronConsole.ConsoleCommandResponse(" {0}\r\n", tl);
|
||||||
},
|
},
|
||||||
"listtielines", "Prints out all tie lines", ConsoleAccessLevelEnum.AccessOperator);
|
"listtielines", "Prints out all tie lines", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
CrestronConsole.AddNewConsoleCommand(s =>
|
CrestronConsole.AddNewConsoleCommand(s =>
|
||||||
{
|
{
|
||||||
CrestronConsole.ConsoleCommandResponse
|
CrestronConsole.ConsoleCommandResponse
|
||||||
("Current running configuration. This is the merged system and template configuration" + CrestronEnvironment.NewLine);
|
("Current running configuration. This is the merged system and template configuration");
|
||||||
CrestronConsole.ConsoleCommandResponse(Newtonsoft.Json.JsonConvert.SerializeObject
|
CrestronConsole.ConsoleCommandResponse(Newtonsoft.Json.JsonConvert.SerializeObject
|
||||||
(ConfigReader.ConfigObject, Newtonsoft.Json.Formatting.Indented));
|
(ConfigReader.ConfigObject, Newtonsoft.Json.Formatting.Indented));
|
||||||
}, "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(
|
CrestronConsole.ConsoleCommandResponse(
|
||||||
"This system can be found at the following URLs:{2}" +
|
"This system can be found at the following URLs:\r\n" +
|
||||||
"System URL: {0}{2}" +
|
"System URL: {0}\r\n" +
|
||||||
"Template URL: {1}{2}",
|
"Template URL: {1}",
|
||||||
ConfigReader.ConfigObject.SystemUrl,
|
ConfigReader.ConfigObject.SystemUrl,
|
||||||
ConfigReader.ConfigObject.TemplateUrl,
|
ConfigReader.ConfigObject.TemplateUrl),
|
||||||
CrestronEnvironment.NewLine),
|
|
||||||
"portalinfo",
|
"portalinfo",
|
||||||
"Shows portal URLS from configuration",
|
"Shows portal URLS from configuration",
|
||||||
ConsoleAccessLevelEnum.AccessOperator);
|
ConsoleAccessLevelEnum.AccessOperator);
|
||||||
@@ -127,10 +125,7 @@ namespace PepperDash.Essentials
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(bool)preventInitialization)
|
SystemMonitor.ProgramInitialization.ProgramInitializationComplete = true;
|
||||||
{
|
|
||||||
SystemMonitor.ProgramInitialization.ProgramInitializationComplete = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<ProjectGuid>{1BED5BA9-88C4-4365-9362-6F4B128071D3}</ProjectGuid>
|
<ProjectGuid>{1BED5BA9-88C4-4365-9362-6F4B128071D3}</ProjectGuid>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>PepperDashEssentials</RootNamespace>
|
<RootNamespace>PepperDash.Essentials</RootNamespace>
|
||||||
<AssemblyName>PepperDashEssentials</AssemblyName>
|
<AssemblyName>PepperDashEssentials</AssemblyName>
|
||||||
<ProjectTypeGuids>{0B4745B0-194B-4BB6-8E21-E9057CA92230};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
<ProjectTypeGuids>{0B4745B0-194B-4BB6-8E21-E9057CA92230};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||||
<PlatformFamilyName>WindowsCE</PlatformFamilyName>
|
<PlatformFamilyName>WindowsCE</PlatformFamilyName>
|
||||||
@@ -221,6 +221,10 @@
|
|||||||
<Project>{9199CE8A-0C9F-4952-8672-3EED798B284F}</Project>
|
<Project>{9199CE8A-0C9F-4952-8672-3EED798B284F}</Project>
|
||||||
<Name>PepperDash_Essentials_DM</Name>
|
<Name>PepperDash_Essentials_DM</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\essentials-framework\Essentials Interfaces\PepperDash_Essentials_Interfaces\PepperDash_Essentials_Interfaces.csproj">
|
||||||
|
<Project>{E51D7C84-4906-486C-B2BA-EEB3B4E9731B}</Project>
|
||||||
|
<Name>PepperDash_Essentials_Interfaces</Name>
|
||||||
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
using PepperDash.Essentials.Core;
|
||||||
|
using PepperDash.Essentials.Core.DeviceTypeInterfaces;
|
||||||
|
using PepperDash.Essentials.Room.Config;
|
||||||
|
using PepperDash.Essentials.Core.Devices;
|
||||||
|
using PepperDash.Essentials.Devices.Common.Codec;
|
||||||
|
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
||||||
|
using PepperDash.Essentials.Devices.Common.AudioCodec;
|
||||||
|
|
||||||
|
|
||||||
|
using PepperDash.Core;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials
|
||||||
|
{
|
||||||
|
public interface IEssentialsHuddleSpaceRoom : IEssentialsRoom, IHasCurrentSourceInfoChange, IRunRouteAction, IHasDefaultDisplay
|
||||||
|
{
|
||||||
|
bool ExcludeFromGlobalFunctions { get; }
|
||||||
|
|
||||||
|
void RunRouteAction(string routeKey);
|
||||||
|
|
||||||
|
EssentialsHuddleRoomPropertiesConfig PropertiesConfig { get; }
|
||||||
|
|
||||||
|
IBasicVolumeControls CurrentVolumeControls { get; }
|
||||||
|
|
||||||
|
event EventHandler<VolumeDeviceChangeEventArgs> CurrentVolumeDeviceChange;
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IEssentialsHuddleVtc1Room : IEssentialsRoom, IHasCurrentSourceInfoChange,
|
||||||
|
IHasCurrentVolumeControls, IRunRouteAction, IRunDefaultCallRoute, IHasVideoCodec, IHasAudioCodec, IHasDefaultDisplay
|
||||||
|
{
|
||||||
|
EssentialsHuddleVtc1PropertiesConfig PropertiesConfig { get; }
|
||||||
|
|
||||||
|
void RunRouteAction(string routeKey);
|
||||||
|
|
||||||
|
IHasScheduleAwareness ScheduleSource { get; }
|
||||||
|
|
||||||
|
string DefaultCodecRouteString { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -165,7 +165,7 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
|
|
||||||
Debug.Console(1, this, "Linking Device: '{0}'", device.Key);
|
Debug.Console(1, this, "Linking Device: '{0}'", device.Key);
|
||||||
|
|
||||||
if (!typeof(IBridgeAdvanced).IsAssignableFrom(device.GetType().GetCType()))
|
if (!typeof (IBridgeAdvanced).IsAssignableFrom(device.GetType().GetCType()))
|
||||||
{
|
{
|
||||||
Debug.Console(0, this, Debug.ErrorLogLevel.Notice,
|
Debug.Console(0, this, Debug.ErrorLogLevel.Notice,
|
||||||
"{0} is not compatible with this bridge type. Please use 'eiscapi' instead, or updae the device.",
|
"{0} is not compatible with this bridge type. Please use 'eiscapi' instead, or updae the device.",
|
||||||
@@ -442,7 +442,7 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
{
|
{
|
||||||
public EiscApiAdvancedFactory()
|
public EiscApiAdvancedFactory()
|
||||||
{
|
{
|
||||||
TypeNames = new List<string> { "eiscapiadv", "eiscapiadvanced", "eiscapiadvancedserver", "eiscapiadvancedclient", "vceiscapiadv", "vceiscapiadvanced" };
|
TypeNames = new List<string> { "eiscapiadv", "eiscapiadvanced", "eiscapiadvancedserver", "eiscapiadvancedclient", "vceiscapiadv", "vceiscapiadvanced" };
|
||||||
}
|
}
|
||||||
|
|
||||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||||
@@ -457,34 +457,34 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
{
|
{
|
||||||
case "eiscapiadv":
|
case "eiscapiadv":
|
||||||
case "eiscapiadvanced":
|
case "eiscapiadvanced":
|
||||||
{
|
{
|
||||||
eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(controlProperties.IpIdInt,
|
eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(controlProperties.IpIdInt,
|
||||||
controlProperties.TcpSshProperties.Address, Global.ControlSystem);
|
controlProperties.TcpSshProperties.Address, Global.ControlSystem);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "eiscapiadvancedserver":
|
case "eiscapiadvancedserver":
|
||||||
{
|
{
|
||||||
eisc = new EISCServer(controlProperties.IpIdInt, Global.ControlSystem);
|
eisc = new EISCServer(controlProperties.IpIdInt, Global.ControlSystem);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "eiscapiadvancedclient":
|
case "eiscapiadvancedclient":
|
||||||
{
|
{
|
||||||
eisc = new EISCClient(controlProperties.IpIdInt, controlProperties.TcpSshProperties.Address, Global.ControlSystem);
|
eisc = new EISCClient(controlProperties.IpIdInt, controlProperties.TcpSshProperties.Address, Global.ControlSystem);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "vceiscapiadv":
|
case "vceiscapiadv":
|
||||||
case "vceiscapiadvanced":
|
case "vceiscapiadvanced":
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(controlProperties.RoomId))
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(controlProperties.RoomId))
|
Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to build VC-4 EISC Client for device {0}. Room ID is missing or empty", dc.Key);
|
||||||
{
|
eisc = null;
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to build VC-4 EISC Client for device {0}. Room ID is missing or empty", dc.Key);
|
|
||||||
eisc = null;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
eisc = new VirtualControlEISCClient(controlProperties.IpIdInt, controlProperties.RoomId,
|
|
||||||
Global.ControlSystem);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
eisc = new VirtualControlEISCClient(controlProperties.IpIdInt, controlProperties.RoomId,
|
||||||
|
Global.ControlSystem);
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
eisc = null;
|
eisc = null;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -36,28 +36,6 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
public JoinDataComplete AudioVideoSource = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
|
public JoinDataComplete AudioVideoSource = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
|
||||||
new JoinMetadata { Description = "DM RMC Audio Video Source Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
new JoinMetadata { Description = "DM RMC Audio Video Source Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
|
|
||||||
[JoinName("HdcpSupportCapability")]
|
|
||||||
public JoinDataComplete HdcpSupportCapability = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "DM RMC HDCP Support Capability", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
|
|
||||||
|
|
||||||
[JoinName("Port1HdcpState")]
|
|
||||||
public JoinDataComplete Port1HdcpState = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "DM RMC Port 1 (DM) HDCP State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
|
||||||
|
|
||||||
[JoinName("Port2HdcpState")]
|
|
||||||
public JoinDataComplete Port2HdcpState = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "DM TX Port 2 (HDMI) HDCP State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
|
||||||
|
|
||||||
[JoinName("HdmiInputSync")]
|
|
||||||
public JoinDataComplete HdmiInputSync = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "DM RMC HDMI Input Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
[JoinName("HdcpInputPortCount")]
|
|
||||||
public JoinDataComplete HdcpInputPortCount = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Number of Input Ports that support HDCP", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor to use when instantiating this Join Map without inheriting from it
|
/// Constructor to use when instantiating this Join Map without inheriting from it
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -72,8 +50,7 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="joinStart">Join this join map will start at</param>
|
/// <param name="joinStart">Join this join map will start at</param>
|
||||||
/// <param name="type">Type of the child join map</param>
|
/// <param name="type">Type of the child join map</param>
|
||||||
protected DmRmcControllerJoinMap(uint joinStart, Type type)
|
protected DmRmcControllerJoinMap(uint joinStart, Type type) : base(joinStart, type)
|
||||||
: base(joinStart, type)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,16 +64,6 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
public JoinDataComplete VgaContrast = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 },
|
public JoinDataComplete VgaContrast = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 },
|
||||||
new JoinMetadata { Description = "DM TX Online", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
new JoinMetadata { Description = "DM TX Online", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
|
|
||||||
[JoinName("Port3HdcpState")]
|
|
||||||
public JoinDataComplete Port3HdcpState = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "DM TX Port 3 HDCP State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
|
||||||
|
|
||||||
[JoinName("HdcpInputPortCount")]
|
|
||||||
public JoinDataComplete HdcpInputPortCount = new JoinDataComplete(new JoinData { JoinNumber = 9, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Number of Input Ports that support HDCP", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor to use when instantiating this Join Map without inheriting from it
|
/// Constructor to use when instantiating this Join Map without inheriting from it
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -88,8 +78,7 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="joinStart">Join this join map will start at</param>
|
/// <param name="joinStart">Join this join map will start at</param>
|
||||||
/// <param name="type">Type of the child join map</param>
|
/// <param name="type">Type of the child join map</param>
|
||||||
protected DmTxControllerJoinMap(uint joinStart, Type type)
|
protected DmTxControllerJoinMap(uint joinStart, Type type) : base(joinStart, type)
|
||||||
: base(joinStart, type)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,23 +132,6 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
public JoinDataComplete DhcpStatus = new JoinDataComplete(new JoinData { JoinNumber = 86, JoinSpan = 1 },
|
public JoinDataComplete DhcpStatus = new JoinDataComplete(new JoinData { JoinNumber = 86, JoinSpan = 1 },
|
||||||
new JoinMetadata { Description = "Processor Ethernet Dhcp Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
new JoinMetadata { Description = "Processor Ethernet Dhcp Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
[JoinName("ProcessorRebot")]
|
|
||||||
public JoinDataComplete ProcessorReboot = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Reboot processor", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
[JoinName("IsAppliance")]
|
|
||||||
public JoinDataComplete IsAppliance = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Is appliance Fb", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
[JoinName("IsServer")]
|
|
||||||
public JoinDataComplete IsServer = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Is server Fb", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
[JoinName("ProgramReset")]
|
|
||||||
public JoinDataComplete ProgramReset = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Resets the program", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor to use when instantiating this Join Map without inheriting from it
|
/// Constructor to use when instantiating this Join Map without inheriting from it
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharp.Net.Http;
|
using Crestron.SimplSharp.Net.Http;
|
||||||
using Crestron.SimplSharp.Ssh;
|
|
||||||
using Crestron.SimplSharpPro.EthernetCommunication;
|
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
|
using PepperDash.Core.DebugThings;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core
|
namespace PepperDash.Essentials.Core
|
||||||
{
|
{
|
||||||
@@ -16,130 +17,52 @@ namespace PepperDash.Essentials.Core
|
|||||||
public GenericHttpClient(string key, string name, string hostname)
|
public GenericHttpClient(string key, string name, string hostname)
|
||||||
: base(key, name)
|
: base(key, name)
|
||||||
{
|
{
|
||||||
Client = new HttpClient {HostName = hostname};
|
Client = new HttpClient();
|
||||||
|
Client.HostName = hostname;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public GenericHttpClient(string key, string name, string hostname, GenericHttpClientConnectionOptions options)
|
/// <summary>
|
||||||
: base(key, name)
|
///
|
||||||
{
|
|
||||||
Client = new HttpClient
|
|
||||||
{
|
|
||||||
HostName = hostname,
|
|
||||||
Accept = options.Accept,
|
|
||||||
KeepAlive = options.KeepAlive,
|
|
||||||
Password = options.Password,
|
|
||||||
Timeout = options.Timeout,
|
|
||||||
TimeoutEnabled = options.TimeoutEnabled,
|
|
||||||
UserAgent = options.UserAgent,
|
|
||||||
UserName = options.UserName,
|
|
||||||
Version = options.Version
|
|
||||||
};
|
|
||||||
if (options.Port > 0) Client.Port = options.Port;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Send a HTTP Get Request to a client
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="path">Path to request node</param>
|
/// <param name="path"></param>
|
||||||
public void SendText(string path)
|
public void SendText(string path)
|
||||||
{
|
{
|
||||||
var url = string.Format("http://{0}/{1}", Client.HostName, path);
|
HttpClientRequest request = new HttpClientRequest();
|
||||||
var request = new HttpClientRequest()
|
string url = string.Format("http://{0}/{1}", Client.HostName, path);
|
||||||
{
|
request.Url = new UrlParser(url);
|
||||||
Url = new UrlParser(url)
|
HttpClient.DISPATCHASYNC_ERROR error = Client.DispatchAsyncEx(request, Response, request);
|
||||||
};
|
}
|
||||||
var error = Client.DispatchAsyncEx(request, Response, request);
|
public void SendText(string format, params object[] items)
|
||||||
}
|
{
|
||||||
|
HttpClientRequest request = new HttpClientRequest();
|
||||||
|
string url = string.Format("http://{0}/{1}", Client.HostName, string.Format(format, items));
|
||||||
|
request.Url = new UrlParser(url);
|
||||||
|
HttpClient.DISPATCHASYNC_ERROR error = Client.DispatchAsyncEx(request, Response, request);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
public void SendTextNoResponse(string format, params object[] items)
|
||||||
/// Send a HTTP Get Request to a client using a formatted string
|
{
|
||||||
/// </summary>
|
HttpClientRequest request = new HttpClientRequest();
|
||||||
/// <param name="format">Path</param>
|
string url = string.Format("http://{0}/{1}", Client.HostName, string.Format(format, items));
|
||||||
/// <param name="items">Parameters for Path String Formatting</param>
|
request.Url = new UrlParser(url);
|
||||||
public void SendText(string format, params object[] items)
|
Client.Dispatch(request);
|
||||||
{
|
}
|
||||||
var url = string.Format("http://{0}/{1}", Client.HostName, string.Format(format, items));
|
|
||||||
var request = new HttpClientRequest()
|
|
||||||
{
|
|
||||||
Url = new UrlParser(url)
|
|
||||||
};
|
|
||||||
var error = Client.DispatchAsyncEx(request, Response, request);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Send a unidirectional HTTP Get Request to a client using a formatted string
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="format">Path</param>
|
|
||||||
/// <param name="items">Parameters for Path String Formatting</param>
|
|
||||||
public void SendTextNoResponse(string format, params object[] items)
|
|
||||||
{
|
|
||||||
var url = string.Format("http://{0}/{1}", Client.HostName, string.Format(format, items));
|
|
||||||
var request = new HttpClientRequest()
|
|
||||||
{
|
|
||||||
Url = new UrlParser(url)
|
|
||||||
};
|
|
||||||
Client.Dispatch(request);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Send an HTTP Request of a specific request type
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="requestType">HTTP Request Type</param>
|
|
||||||
/// <param name="path">Path to request node</param>
|
|
||||||
public void SendText(RequestType requestType, string path)
|
|
||||||
{
|
|
||||||
var url = string.Format("http://{0}/{1}", Client.HostName, path);
|
|
||||||
var request = new HttpClientRequest()
|
|
||||||
{
|
|
||||||
Url = new UrlParser(url),
|
|
||||||
RequestType = requestType
|
|
||||||
};
|
|
||||||
var error = Client.DispatchAsyncEx(request, Response, request);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Send an HTTP Request of a specific request type using a formatted string
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="requestType">HTTP Request Type</param>
|
|
||||||
/// <param name="format">Path</param>
|
|
||||||
/// <param name="items">Parameters for Path String Formatting</param>
|
|
||||||
public void SendText(RequestType requestType, string format, params object[] items)
|
|
||||||
{
|
|
||||||
var url = string.Format("http://{0}/{1}", Client.HostName, string.Format(format, items));
|
|
||||||
var request = new HttpClientRequest()
|
|
||||||
{
|
|
||||||
Url = new UrlParser(url),
|
|
||||||
RequestType = requestType
|
|
||||||
};
|
|
||||||
var error = Client.DispatchAsyncEx(request, Response, request);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Send a unidirectional HTTP Request of a specific request type using a formatted string
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="requestType">HTTP Request Type</param>
|
|
||||||
/// <param name="format">Path</param>
|
|
||||||
/// <param name="items">Parameters for Path String Formatting</param>
|
|
||||||
public void SendTextNoResponse(RequestType requestType, string format, params object[] items)
|
|
||||||
{
|
|
||||||
var url = string.Format("http://{0}/{1}", Client.HostName, string.Format(format, items));
|
|
||||||
var request = new HttpClientRequest()
|
|
||||||
{
|
|
||||||
Url = new UrlParser(url)
|
|
||||||
};
|
|
||||||
Client.Dispatch(request);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Response(HttpClientResponse response, HTTP_CALLBACK_ERROR error, object request)
|
private void Response(HttpClientResponse response, HTTP_CALLBACK_ERROR error, object request)
|
||||||
{
|
{
|
||||||
if (error != HTTP_CALLBACK_ERROR.COMPLETED) return;
|
if (error == HTTP_CALLBACK_ERROR.COMPLETED)
|
||||||
var responseReceived = response;
|
{
|
||||||
|
var responseReceived = response;
|
||||||
|
|
||||||
|
if (responseReceived.ContentString.Length > 0)
|
||||||
|
{
|
||||||
|
if (ResponseRecived != null)
|
||||||
|
ResponseRecived(this, new GenericHttpClientEventArgs(responseReceived.ContentString, (request as HttpClientRequest).Url.ToString(), error));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (responseReceived.ContentString.Length <= 0) return;
|
|
||||||
if (ResponseRecived == null) return;
|
|
||||||
var httpClientRequest = request as HttpClientRequest;
|
|
||||||
if (httpClientRequest != null)
|
|
||||||
ResponseRecived(this, new GenericHttpClientEventArgs(responseReceived.ContentString, httpClientRequest.Url.ToString(), error));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -177,8 +100,6 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class GenericHttpClientEventArgs : EventArgs
|
public class GenericHttpClientEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
public string ResponseText { get; private set; }
|
public string ResponseText { get; private set; }
|
||||||
@@ -191,84 +112,4 @@ namespace PepperDash.Essentials.Core
|
|||||||
Error = error;
|
Error = error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Objedct to set parameters for HTTP Requests
|
|
||||||
/// </summary>
|
|
||||||
public class GenericHttpClientConnectionOptions
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets content types that are acceptable for the response. The default
|
|
||||||
/// value is "text/html, image/gif, image/jpeg, image/png, */*".
|
|
||||||
/// </summary>
|
|
||||||
[DefaultValue("text/html, image/gif, image/jpeg, image/png")]
|
|
||||||
public string Accept { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Controls whether to use HTTP Keep-Alive to keep the connection alive between
|
|
||||||
/// requests. If enabled (true) , once a request is made and a connection is
|
|
||||||
/// established, this connection is kept open and used for future requests. If
|
|
||||||
/// disabled, the connection is closed, and a new connection is created for future
|
|
||||||
/// requests.
|
|
||||||
/// </summary>
|
|
||||||
[DefaultValue(true)]
|
|
||||||
public bool KeepAlive { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// This property controls whether the request operation will do an automatic
|
|
||||||
/// timeout checking. If timeout handling is turned on (i.e. this property is
|
|
||||||
/// set to true) and a request takes longer than Timeout, it will be terminated.
|
|
||||||
/// </summary>
|
|
||||||
[DefaultValue(true)]
|
|
||||||
public bool TimeoutEnabled { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the maximum amount of time (in seconds) that a client will wait
|
|
||||||
/// for a server response within a single request. The default value is 60 seconds
|
|
||||||
/// (1 minute). The timeout handling can be activated via the TimeoutEnabled
|
|
||||||
/// property.
|
|
||||||
/// </summary>
|
|
||||||
[DefaultValue(60)]
|
|
||||||
public int Timeout { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the version identifier of the UserAgent. Can be used to mimic
|
|
||||||
/// particular browsers like Internet Explorer 6.0
|
|
||||||
/// </summary>
|
|
||||||
[DefaultValue("1.1")]
|
|
||||||
public string Version { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the identifier of the software being used to retrieve data via
|
|
||||||
/// the URL. Some custom HTTP servers check this HTTP header to provide content
|
|
||||||
/// optimized for particular HTTP browsers.
|
|
||||||
/// </summary>
|
|
||||||
[DefaultValue("Crestron SimplSharp HTTP Client")]
|
|
||||||
public string UserAgent { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Name that will be inserted into the Authorization HTTP header in the request
|
|
||||||
/// to the server.
|
|
||||||
/// </summary>
|
|
||||||
public string UserName { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Password that will be inserted into the Authorization HTTP header in the
|
|
||||||
/// request to the server.
|
|
||||||
/// </summary>
|
|
||||||
public string Password { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The server Port that you intend the client to connect to. If you do not
|
|
||||||
/// assign a port number on this property, the port number in the parsed URL
|
|
||||||
/// will be used. If a port number is assigned in the parsed URL, it will take
|
|
||||||
/// precedence over this property.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// If you do not assign a port number on this property, the port number in the
|
|
||||||
/// parsed URL will be used.
|
|
||||||
/// </remarks>
|
|
||||||
///
|
|
||||||
public int Port { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -379,28 +379,30 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// Prints a list of routing inputs and outputs by device key.
|
/// Prints a list of routing inputs and outputs by device key.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="s">Device key from which to report data</param>
|
/// <param name="s">Device key from which to report data</param>
|
||||||
public static void GetRoutingPorts(string s)
|
public static void GetRoutingPorts(string s)
|
||||||
{
|
{
|
||||||
var device = GetDeviceForKey(s);
|
var device = GetDeviceForKey(s);
|
||||||
|
|
||||||
if (device == null) return;
|
if (device == null) return;
|
||||||
var inputPorts = ((device as IRoutingInputs) != null) ? (device as IRoutingInputs).InputPorts : null;
|
var inputPorts = ((device as IRoutingInputs) != null) ? (device as IRoutingInputs).InputPorts : null;
|
||||||
var outputPorts = ((device as IRoutingOutputs) != null) ? (device as IRoutingOutputs).OutputPorts : null;
|
var outputPorts = ((device as IRoutingOutputs) != null) ? (device as IRoutingOutputs).OutputPorts : null;
|
||||||
if (inputPorts != null)
|
if (inputPorts != null)
|
||||||
{
|
{
|
||||||
CrestronConsole.ConsoleCommandResponse("Device {0} has {1} Input Ports:{2}", s, inputPorts.Count, CrestronEnvironment.NewLine);
|
Debug.Console(0, "Device {0} has {1} Input Ports:", s, inputPorts.Count);
|
||||||
foreach (var routingInputPort in inputPorts)
|
foreach (var routingInputPort in inputPorts)
|
||||||
{
|
{
|
||||||
CrestronConsole.ConsoleCommandResponse("{0}{1}", routingInputPort.Key, CrestronEnvironment.NewLine);
|
Debug.Console(0, "{0}", routingInputPort.Key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (outputPorts == null) return;
|
if (outputPorts != null)
|
||||||
CrestronConsole.ConsoleCommandResponse("Device {0} has {1} Output Ports:{2}", s, outputPorts.Count, CrestronEnvironment.NewLine);
|
{
|
||||||
foreach (var routingOutputPort in outputPorts)
|
Debug.Console(0, "Device {0} has {1} Output Ports:", s, outputPorts.Count);
|
||||||
{
|
foreach (var routingOutputPort in outputPorts)
|
||||||
CrestronConsole.ConsoleCommandResponse("{0}{1}", routingOutputPort.Key, CrestronEnvironment.NewLine);
|
{
|
||||||
}
|
Debug.Console(0, "{0}", routingOutputPort.Key);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Attempts to set the debug level of a device
|
/// Attempts to set the debug level of a device
|
||||||
@@ -433,7 +435,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
if (device == null)
|
if (device == null)
|
||||||
{
|
{
|
||||||
CrestronConsole.ConsoleCommandResponse("Unable to get device with key: {0}", deviceKey);
|
Debug.Console(0, "Unable to get device with key: {0}", deviceKey);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -445,7 +447,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
CrestronConsole.ConsoleCommandResponse("Unable to convert setting value. Please use off/rx/tx/both");
|
Debug.Console(0, "Unable to convert setting value. Please use off/rx/tx/both");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -456,18 +458,18 @@ namespace PepperDash.Essentials.Core
|
|||||||
var min = Convert.ToUInt32(timeout);
|
var min = Convert.ToUInt32(timeout);
|
||||||
|
|
||||||
device.StreamDebugging.SetDebuggingWithSpecificTimeout(debugSetting, min);
|
device.StreamDebugging.SetDebuggingWithSpecificTimeout(debugSetting, min);
|
||||||
CrestronConsole.ConsoleCommandResponse("Device: '{0}' debug level set to {1} for {2} minutes", deviceKey, debugSetting, min);
|
Debug.Console(0, "Device: '{0}' debug level set to {1} for {2} minutes", deviceKey, debugSetting, min);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
CrestronConsole.ConsoleCommandResponse("Unable to convert minutes or settings value. Please use an integer value for minutes. Error: {0}", e);
|
Debug.Console(0, "Unable to convert minutes or settings value. Please use an integer value for minutes. Errro: {0}", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
device.StreamDebugging.SetDebuggingWithDefaultTimeout(debugSetting);
|
device.StreamDebugging.SetDebuggingWithDefaultTimeout(debugSetting);
|
||||||
CrestronConsole.ConsoleCommandResponse("Device: '{0}' debug level set to {1} for default time (30 minutes)", deviceKey, debugSetting);
|
Debug.Console(0, "Device: '{0}' debug level set to {1} for default time (30 minutes)", deviceKey, debugSetting);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
@@ -9,7 +8,6 @@ namespace PepperDash_Essentials_Core.Devices
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interface for any device that is able to control it'spower and has a configurable reboot time
|
/// Interface for any device that is able to control it'spower and has a configurable reboot time
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Obsolete("PepperDash_Essentials_Core.Devices is Deprecated - use PepperDash.Essentials.Core")]
|
|
||||||
public interface IHasPowerCycle : IKeyName, IHasPowerControlWithFeedback
|
public interface IHasPowerCycle : IKeyName, IHasPowerControlWithFeedback
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -26,7 +24,6 @@ namespace PepperDash_Essentials_Core.Devices
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interface for any device that contains a collection of IHasPowerReboot Devices
|
/// Interface for any device that contains a collection of IHasPowerReboot Devices
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Obsolete("PepperDash_Essentials_Core.Devices is Deprecated - use PepperDash.Essentials.Core")]
|
|
||||||
public interface IHasControlledPowerOutlets : IKeyName
|
public interface IHasControlledPowerOutlets : IKeyName
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,87 +0,0 @@
|
|||||||
using Crestron.SimplSharp;
|
|
||||||
using PepperDash.Core;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interface for any device that has a battery that can be monitored
|
|
||||||
/// </summary>
|
|
||||||
public interface IHasBatteryStats : IKeyName
|
|
||||||
{
|
|
||||||
int BatteryPercentage { get; }
|
|
||||||
int BatteryCautionThresholdPercentage { get; }
|
|
||||||
int BatteryWarningThresholdPercentage { get; }
|
|
||||||
BoolFeedback BatteryIsWarningFeedback { get; }
|
|
||||||
BoolFeedback BatteryIsCautionFeedback { get; }
|
|
||||||
BoolFeedback BatteryIsOkFeedback { get; }
|
|
||||||
IntFeedback BatteryPercentageFeedback { get; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Interface for any device that has a battery that can be monitored and the ability to charge and discharge
|
|
||||||
/// </summary>
|
|
||||||
public interface IHasBatteryCharging : IHasBatteryStats
|
|
||||||
{
|
|
||||||
BoolFeedback BatteryIsCharging { get; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Interface for any device that has multiple batteries that can be monitored
|
|
||||||
/// </summary>
|
|
||||||
public interface IHasBatteries : IKeyName
|
|
||||||
{
|
|
||||||
ReadOnlyDictionary<string, IHasBatteryStats> Batteries { get; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IHasBatteryStatsExtended : IHasBatteryStats
|
|
||||||
{
|
|
||||||
int InputVoltage { get; }
|
|
||||||
int OutputVoltage { get; }
|
|
||||||
int InptuCurrent { get; }
|
|
||||||
int OutputCurrent { get; }
|
|
||||||
|
|
||||||
IntFeedback InputVoltageFeedback { get; }
|
|
||||||
IntFeedback OutputVoltageFeedback { get; }
|
|
||||||
IntFeedback InputCurrentFeedback { get; }
|
|
||||||
IntFeedback OutputCurrentFeedback { get; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Interface for any device that is able to control its power, has a configurable reboot time, and has batteries that can be monitored
|
|
||||||
/// </summary>
|
|
||||||
public interface IHasPowerCycleWithBattery : IHasPowerCycle, IHasBatteryStats
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Interface for any device that is able to control it's power and has a configurable reboot time
|
|
||||||
/// </summary>
|
|
||||||
public interface IHasPowerCycle : IKeyName, IHasPowerControlWithFeedback
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Delay between power off and power on for reboot
|
|
||||||
/// </summary>
|
|
||||||
int PowerCycleTimeMs { get; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Reboot outlet
|
|
||||||
/// </summary>
|
|
||||||
void PowerCycle();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Interface for any device that contains a collection of IHasPowerReboot Devices
|
|
||||||
/// </summary>
|
|
||||||
public interface IHasControlledPowerOutlets : IKeyName
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Collection of IPduOutlets
|
|
||||||
/// </summary>
|
|
||||||
ReadOnlyDictionary<int, IHasPowerCycle> PduOutlets { get; }
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -172,26 +172,33 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Prints the type names and associated metadata from the FactoryMethods collection.
|
/// Prints the type names and associated metadata from the FactoryMethods collection.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="filter"></param>
|
/// <param name="command"></param>
|
||||||
public static void GetDeviceFactoryTypes(string filter)
|
public static void GetDeviceFactoryTypes(string filter)
|
||||||
{
|
{
|
||||||
var types = !string.IsNullOrEmpty(filter)
|
Dictionary<string, DeviceFactoryWrapper> types = new Dictionary<string, DeviceFactoryWrapper>();
|
||||||
? FactoryMethods.Where(k => k.Key.Contains(filter)).ToDictionary(k => k.Key, k => k.Value)
|
|
||||||
: FactoryMethods;
|
|
||||||
|
|
||||||
CrestronConsole.ConsoleCommandResponse("Device Types:");
|
if (!string.IsNullOrEmpty(filter))
|
||||||
|
{
|
||||||
|
types = FactoryMethods.Where(k => k.Key.Contains(filter)).ToDictionary(k => k.Key, k => k.Value);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
types = FactoryMethods;
|
||||||
|
}
|
||||||
|
|
||||||
|
Debug.Console(0, "Device Types:");
|
||||||
|
|
||||||
foreach (var type in types.OrderBy(t => t.Key))
|
foreach (var type in types.OrderBy(t => t.Key))
|
||||||
{
|
{
|
||||||
var description = type.Value.Description;
|
var description = type.Value.Description;
|
||||||
var cType = "Not Specified by Plugin";
|
var cType = "Not Specified by Plugin";
|
||||||
|
|
||||||
if (type.Value.CType != null)
|
if(type.Value.CType != null)
|
||||||
{
|
{
|
||||||
cType = type.Value.CType.FullName;
|
cType = type.Value.CType.FullName;
|
||||||
}
|
}
|
||||||
|
|
||||||
CrestronConsole.ConsoleCommandResponse(
|
Debug.Console(0,
|
||||||
@"Type: '{0}'
|
@"Type: '{0}'
|
||||||
CType: '{1}'
|
CType: '{1}'
|
||||||
Description: {2}", type.Key, cType, description);
|
Description: {2}", type.Key, cType, description);
|
||||||
|
|||||||
@@ -21,37 +21,35 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="fileName"></param>
|
/// <param name="fileName"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static FileInfo[] GetFiles(string fileName)
|
public static FileInfo[] GetFiles(string fileName)
|
||||||
{
|
{
|
||||||
string fullFilePath = Global.FilePathPrefix + fileName;
|
DirectoryInfo dirInfo = new DirectoryInfo(Path.GetDirectoryName(fileName));
|
||||||
DirectoryInfo dirInfo = new DirectoryInfo(Path.GetDirectoryName(fullFilePath));
|
var files = dirInfo.GetFiles(Path.GetFileName(fileName));
|
||||||
var files = dirInfo.GetFiles(Path.GetFileName(fullFilePath));
|
Debug.Console(0, "FileIO found: {0}, {1}", files.Count(), fileName);
|
||||||
Debug.Console(0, "FileIO found: {0}, {1}", files.Count(), fullFilePath);
|
if (files.Count() > 0)
|
||||||
if (files.Count() > 0)
|
{
|
||||||
{
|
return files;
|
||||||
return files;
|
}
|
||||||
}
|
else
|
||||||
else
|
{
|
||||||
{
|
return null;
|
||||||
return null;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public static FileInfo GetFile(string fileName)
|
public static FileInfo GetFile(string fileName)
|
||||||
{
|
{
|
||||||
string fullFilePath = Global.FilePathPrefix + fileName;
|
DirectoryInfo dirInfo = new DirectoryInfo(Path.GetDirectoryName(fileName));
|
||||||
DirectoryInfo dirInfo = new DirectoryInfo(Path.GetDirectoryName(fullFilePath));
|
var files = dirInfo.GetFiles(Path.GetFileName(fileName));
|
||||||
var files = dirInfo.GetFiles(Path.GetFileName(fullFilePath));
|
Debug.Console(0, "FileIO found: {0}, {1}", files.Count(), fileName);
|
||||||
Debug.Console(0, "FileIO found: {0}, {1}", files.Count(), fullFilePath);
|
if (files.Count() > 0)
|
||||||
if (files.Count() > 0)
|
{
|
||||||
{
|
return files.FirstOrDefault();
|
||||||
return files.FirstOrDefault();
|
}
|
||||||
}
|
else
|
||||||
else
|
{
|
||||||
{
|
return null;
|
||||||
return null;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -83,7 +81,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
{
|
{
|
||||||
if (fileLock.TryEnter())
|
if (fileLock.TryEnter())
|
||||||
{
|
{
|
||||||
DirectoryInfo dirInfo = new DirectoryInfo(file.DirectoryName);
|
DirectoryInfo dirInfo = new DirectoryInfo(file.Name);
|
||||||
Debug.Console(2, "FileIO Getting Data {0}", file.FullName);
|
Debug.Console(2, "FileIO Getting Data {0}", file.FullName);
|
||||||
|
|
||||||
if (File.Exists(file.FullName))
|
if (File.Exists(file.FullName))
|
||||||
@@ -204,7 +202,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
public static void WriteDataToFile(string data, string filePath)
|
public static void WriteDataToFile(string data, string filePath)
|
||||||
{
|
{
|
||||||
Thread _WriteFileThread;
|
Thread _WriteFileThread;
|
||||||
_WriteFileThread = new Thread((O) => _WriteFileMethod(data, Global.FilePathPrefix + "/" + filePath), null, Thread.eThreadStartOptions.CreateSuspended);
|
_WriteFileThread = new Thread((O) => _WriteFileMethod(data, filePath), null, Thread.eThreadStartOptions.CreateSuspended);
|
||||||
_WriteFileThread.Priority = Thread.eThreadPriority.LowestPriority;
|
_WriteFileThread.Priority = Thread.eThreadPriority.LowestPriority;
|
||||||
_WriteFileThread.Start();
|
_WriteFileThread.Start();
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "New WriteFile Thread");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "New WriteFile Thread");
|
||||||
@@ -219,8 +217,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
{
|
{
|
||||||
if (fileLock.TryEnter())
|
if (fileLock.TryEnter())
|
||||||
{
|
{
|
||||||
|
using (StreamWriter sw = new StreamWriter(filePath))
|
||||||
using (StreamWriter sw = new StreamWriter(filePath))
|
|
||||||
{
|
{
|
||||||
sw.Write(data);
|
sw.Write(data);
|
||||||
sw.Flush();
|
sw.Flush();
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp.Reflection;
|
using Crestron.SimplSharp.Reflection;
|
||||||
using Crestron.SimplSharp.CrestronIO;
|
using Crestron.SimplSharp.CrestronIO;
|
||||||
@@ -101,22 +103,22 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void PrintJoinMapInfo()
|
public void PrintJoinMapInfo()
|
||||||
{
|
{
|
||||||
CrestronConsole.ConsoleCommandResponse("{0}:\n", GetType().Name);
|
Debug.Console(0, "{0}:\n", GetType().Name);
|
||||||
|
|
||||||
// Get the joins of each type and print them
|
// Get the joins of each type and print them
|
||||||
CrestronConsole.ConsoleCommandResponse("Digitals:");
|
Debug.Console(0, "Digitals:");
|
||||||
var digitals = Joins.Where(j => (j.Value.JoinType & eJoinType.Digital) == eJoinType.Digital).ToDictionary(j => j.Key, j => j.Value);
|
var digitals = Joins.Where(j => (j.Value.JoinType & eJoinType.Digital) == eJoinType.Digital).ToDictionary(j => j.Key, j => j.Value);
|
||||||
CrestronConsole.ConsoleCommandResponse("Found {0} Digital Joins", digitals.Count);
|
Debug.Console(2, "Found {0} Digital Joins", digitals.Count);
|
||||||
PrintJoinList(GetSortedJoins(digitals));
|
PrintJoinList(GetSortedJoins(digitals));
|
||||||
|
|
||||||
CrestronConsole.ConsoleCommandResponse("Analogs:");
|
Debug.Console(0, "Analogs:");
|
||||||
var analogs = Joins.Where(j => (j.Value.JoinType & eJoinType.Analog) == eJoinType.Analog).ToDictionary(j => j.Key, j => j.Value);
|
var analogs = Joins.Where(j => (j.Value.JoinType & eJoinType.Analog) == eJoinType.Analog).ToDictionary(j => j.Key, j => j.Value);
|
||||||
CrestronConsole.ConsoleCommandResponse("Found {0} Analog Joins", analogs.Count);
|
Debug.Console(2, "Found {0} Analog Joins", analogs.Count);
|
||||||
PrintJoinList(GetSortedJoins(analogs));
|
PrintJoinList(GetSortedJoins(analogs));
|
||||||
|
|
||||||
CrestronConsole.ConsoleCommandResponse("Serials:");
|
Debug.Console(0, "Serials:");
|
||||||
var serials = Joins.Where(j => (j.Value.JoinType & eJoinType.Serial) == eJoinType.Serial).ToDictionary(j => j.Key, j => j.Value);
|
var serials = Joins.Where(j => (j.Value.JoinType & eJoinType.Serial) == eJoinType.Serial).ToDictionary(j => j.Key, j => j.Value);
|
||||||
CrestronConsole.ConsoleCommandResponse("Found {0} Serial Joins", serials.Count);
|
Debug.Console(2, "Found {0} Serial Joins", serials.Count);
|
||||||
PrintJoinList(GetSortedJoins(serials));
|
PrintJoinList(GetSortedJoins(serials));
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -139,7 +141,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
{
|
{
|
||||||
foreach (var join in joins)
|
foreach (var join in joins)
|
||||||
{
|
{
|
||||||
CrestronConsole.ConsoleCommandResponse(
|
Debug.Console(0,
|
||||||
@"Join Number: {0} | Label: '{1}' | JoinSpan: '{2}' | Type: '{3}' | Capabilities: '{4}'",
|
@"Join Number: {0} | Label: '{1}' | JoinSpan: '{2}' | Type: '{3}' | Capabilities: '{4}'",
|
||||||
join.Value.JoinNumber,
|
join.Value.JoinNumber,
|
||||||
join.Value.Label,
|
join.Value.Label,
|
||||||
@@ -234,45 +236,25 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void PrintJoinMapInfo()
|
public void PrintJoinMapInfo()
|
||||||
{
|
{
|
||||||
var sb = JoinmapStringBuilder();
|
Debug.Console(0, "{0}:\n", GetType().Name);
|
||||||
|
|
||||||
CrestronConsole.ConsoleCommandResponse(sb.ToString());
|
|
||||||
}
|
|
||||||
|
|
||||||
private StringBuilder JoinmapStringBuilder()
|
|
||||||
{
|
|
||||||
var sb = new StringBuilder();
|
|
||||||
|
|
||||||
// Get the joins of each type and print them
|
// Get the joins of each type and print them
|
||||||
sb.AppendLine(String.Format("# {0}", GetType().Name));
|
Debug.Console(0, "Digitals:");
|
||||||
sb.AppendLine();
|
var digitals = Joins.Where(j => (j.Value.Metadata.JoinType & eJoinType.Digital) == eJoinType.Digital).ToDictionary(j => j.Key, j => j.Value);
|
||||||
sb.AppendLine("## Digitals");
|
Debug.Console(2, "Found {0} Digital Joins", digitals.Count);
|
||||||
sb.AppendLine();
|
PrintJoinList(GetSortedJoins(digitals));
|
||||||
// Get the joins of each type and print them
|
|
||||||
var digitals =
|
|
||||||
Joins.Where(j => (j.Value.Metadata.JoinType & eJoinType.Digital) == eJoinType.Digital)
|
|
||||||
.ToDictionary(j => j.Key, j => j.Value);
|
|
||||||
var digitalSb = AppendJoinList(GetSortedJoins(digitals));
|
|
||||||
digitalSb.AppendLine("## Analogs");
|
|
||||||
digitalSb.AppendLine();
|
|
||||||
|
|
||||||
var analogs =
|
Debug.Console(0, "Analogs:");
|
||||||
Joins.Where(j => (j.Value.Metadata.JoinType & eJoinType.Analog) == eJoinType.Analog)
|
var analogs = Joins.Where(j => (j.Value.Metadata.JoinType & eJoinType.Analog) == eJoinType.Analog).ToDictionary(j => j.Key, j => j.Value);
|
||||||
.ToDictionary(j => j.Key, j => j.Value);
|
Debug.Console(2, "Found {0} Analog Joins", analogs.Count);
|
||||||
var analogSb = AppendJoinList(GetSortedJoins(analogs));
|
PrintJoinList(GetSortedJoins(analogs));
|
||||||
analogSb.AppendLine("## Serials");
|
|
||||||
analogSb.AppendLine();
|
|
||||||
|
|
||||||
var serials =
|
Debug.Console(0, "Serials:");
|
||||||
Joins.Where(j => (j.Value.Metadata.JoinType & eJoinType.Serial) == eJoinType.Serial)
|
var serials = Joins.Where(j => (j.Value.Metadata.JoinType & eJoinType.Serial) == eJoinType.Serial).ToDictionary(j => j.Key, j => j.Value);
|
||||||
.ToDictionary(j => j.Key, j => j.Value);
|
Debug.Console(2, "Found {0} Serial Joins", serials.Count);
|
||||||
var serialSb = AppendJoinList(GetSortedJoins(serials));
|
PrintJoinList(GetSortedJoins(serials));
|
||||||
|
|
||||||
sb.EnsureCapacity(sb.Length + digitalSb.Length + analogSb.Length + serialSb.Length);
|
|
||||||
sb.Append(digitalSb).Append(analogSb).Append(serialSb);
|
|
||||||
return sb;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Prints the join information to console
|
/// Prints the join information to console
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -280,11 +262,37 @@ namespace PepperDash.Essentials.Core
|
|||||||
{
|
{
|
||||||
var pluginType = GetType().Name;
|
var pluginType = GetType().Name;
|
||||||
|
|
||||||
CrestronConsole.ConsoleCommandResponse("{0}:\n", pluginType);
|
Debug.Console(0, "{0}:\n", pluginType);
|
||||||
|
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
|
||||||
|
sb.AppendLine(String.Format("# {0}", GetType().Name));
|
||||||
|
sb.AppendLine(String.Format("Generated from '{0}' on bridge '{1}'", deviceKey, bridgeKey));
|
||||||
|
sb.AppendLine();
|
||||||
|
sb.AppendLine("## Digitals");
|
||||||
|
// Get the joins of each type and print them
|
||||||
|
var digitals = Joins.Where(j => (j.Value.Metadata.JoinType & eJoinType.Digital) == eJoinType.Digital).ToDictionary(j => j.Key, j => j.Value);
|
||||||
|
Debug.Console(2, "Found {0} Digital Joins", digitals.Count);
|
||||||
|
var digitalSb = AppendJoinList(GetSortedJoins(digitals));
|
||||||
|
digitalSb.AppendLine("## Analogs");
|
||||||
|
digitalSb.AppendLine();
|
||||||
|
|
||||||
WriteJoinmapMarkdown(JoinmapStringBuilder(), pluginType, bridgeKey, deviceKey);
|
Debug.Console(0, "Analogs:");
|
||||||
|
var analogs = Joins.Where(j => (j.Value.Metadata.JoinType & eJoinType.Analog) == eJoinType.Analog).ToDictionary(j => j.Key, j => j.Value);
|
||||||
|
Debug.Console(2, "Found {0} Analog Joins", analogs.Count);
|
||||||
|
var analogSb = AppendJoinList(GetSortedJoins(analogs));
|
||||||
|
analogSb.AppendLine("## Serials");
|
||||||
|
analogSb.AppendLine();
|
||||||
|
|
||||||
|
Debug.Console(0, "Serials:");
|
||||||
|
var serials = Joins.Where(j => (j.Value.Metadata.JoinType & eJoinType.Serial) == eJoinType.Serial).ToDictionary(j => j.Key, j => j.Value);
|
||||||
|
Debug.Console(2, "Found {0} Serial Joins", serials.Count);
|
||||||
|
var serialSb = AppendJoinList(GetSortedJoins(serials));
|
||||||
|
|
||||||
|
sb.EnsureCapacity(sb.Length + digitalSb.Length + analogSb.Length + serialSb.Length);
|
||||||
|
sb.Append(digitalSb).Append(analogSb).Append(serialSb);
|
||||||
|
|
||||||
|
WriteJoinmapMarkdown(sb, pluginType, bridgeKey, deviceKey);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -295,7 +303,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
using (var sw = new StreamWriter(fileName))
|
using (var sw = new StreamWriter(fileName))
|
||||||
{
|
{
|
||||||
sw.WriteLine(stringBuilder.ToString());
|
sw.WriteLine(stringBuilder.ToString());
|
||||||
CrestronConsole.ConsoleCommandResponse("Joinmap Readme generated and written to {0}", fileName);
|
Debug.Console(0, "Joinmap Readme generated and written to {0}", fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -305,7 +313,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="joins"></param>
|
/// <param name="joins"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
static List<KeyValuePair<string, JoinDataComplete>> GetSortedJoins(Dictionary<string, JoinDataComplete> joins)
|
List<KeyValuePair<string, JoinDataComplete>> GetSortedJoins(Dictionary<string, JoinDataComplete> joins)
|
||||||
{
|
{
|
||||||
var sortedJoins = joins.ToList();
|
var sortedJoins = joins.ToList();
|
||||||
|
|
||||||
@@ -314,6 +322,20 @@ namespace PepperDash.Essentials.Core
|
|||||||
return sortedJoins;
|
return sortedJoins;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PrintJoinList(List<KeyValuePair<string, JoinDataComplete>> joins)
|
||||||
|
{
|
||||||
|
foreach (var join in joins)
|
||||||
|
{
|
||||||
|
Debug.Console(0,
|
||||||
|
@"Join Number: {0} | JoinSpan: '{1}' | JoinName: {2} | Description: '{3}' | Type: '{4}' | Capabilities: '{5}'",
|
||||||
|
join.Value.JoinNumber,
|
||||||
|
join.Value.JoinSpan,
|
||||||
|
join.Key,
|
||||||
|
String.IsNullOrEmpty(join.Value.AttributeName) ? join.Value.Metadata.Label : join.Value.AttributeName,
|
||||||
|
join.Value.Metadata.JoinType.ToString(),
|
||||||
|
join.Value.Metadata.JoinCapabilities.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static StringBuilder AppendJoinList(List<KeyValuePair<string, JoinDataComplete>> joins)
|
static StringBuilder AppendJoinList(List<KeyValuePair<string, JoinDataComplete>> joins)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -43,20 +43,7 @@ namespace PepperDash.Essentials.Core.Monitoring
|
|||||||
public StringFeedback UptimeFeedback { get; set; }
|
public StringFeedback UptimeFeedback { get; set; }
|
||||||
public StringFeedback LastStartFeedback { get; set; }
|
public StringFeedback LastStartFeedback { get; set; }
|
||||||
|
|
||||||
public BoolFeedback IsApplianceFeedback { get; protected set; }
|
public SystemMonitorController(string key)
|
||||||
private bool _isApplianceFb
|
|
||||||
{
|
|
||||||
get { return CrestronEnvironment.DevicePlatform == eDevicePlatform.Appliance; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public BoolFeedback IsServerFeedback { get; protected set; }
|
|
||||||
private bool _isServerFb
|
|
||||||
{
|
|
||||||
get { return CrestronEnvironment.DevicePlatform == eDevicePlatform.Server; }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public SystemMonitorController(string key)
|
|
||||||
: base(key)
|
: base(key)
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "Adding SystemMonitorController.");
|
Debug.Console(2, this, "Adding SystemMonitorController.");
|
||||||
@@ -76,9 +63,6 @@ namespace PepperDash.Essentials.Core.Monitoring
|
|||||||
UptimeFeedback = new StringFeedback(() => _uptime);
|
UptimeFeedback = new StringFeedback(() => _uptime);
|
||||||
LastStartFeedback = new StringFeedback(()=> _lastStart);
|
LastStartFeedback = new StringFeedback(()=> _lastStart);
|
||||||
|
|
||||||
IsApplianceFeedback = new BoolFeedback(() => _isApplianceFb);
|
|
||||||
IsServerFeedback = new BoolFeedback(() => _isServerFb);
|
|
||||||
|
|
||||||
ProgramStatusFeedbackCollection = new Dictionary<uint, ProgramStatusFeedbacks>();
|
ProgramStatusFeedbackCollection = new Dictionary<uint, ProgramStatusFeedbacks>();
|
||||||
|
|
||||||
foreach (var prog in SystemMonitor.ProgramCollection)
|
foreach (var prog in SystemMonitor.ProgramCollection)
|
||||||
@@ -139,26 +123,6 @@ namespace PepperDash.Essentials.Core.Monitoring
|
|||||||
_uptime = uptimeRaw.Substring(forIndex + 4);
|
_uptime = uptimeRaw.Substring(forIndex + 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void ProcessorReboot()
|
|
||||||
{
|
|
||||||
if (CrestronEnvironment.DevicePlatform == eDevicePlatform.Server) return;
|
|
||||||
|
|
||||||
var response = string.Empty;
|
|
||||||
CrestronConsole.SendControlSystemCommand("reboot", ref response);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void ProgramReset(uint index)
|
|
||||||
{
|
|
||||||
if (CrestronEnvironment.DevicePlatform == eDevicePlatform.Server) return;
|
|
||||||
|
|
||||||
if (index <= 0 || index > 10) return;
|
|
||||||
|
|
||||||
var cmd = string.Format("progreset -p:{0}", index);
|
|
||||||
|
|
||||||
var response = string.Empty;
|
|
||||||
CrestronConsole.SendControlSystemCommand(cmd, ref response);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CrestronEnvironmentOnEthernetEventHandler(EthernetEventArgs ethernetEventArgs)
|
private void CrestronEnvironmentOnEthernetEventHandler(EthernetEventArgs ethernetEventArgs)
|
||||||
{
|
{
|
||||||
if (ethernetEventArgs.EthernetEventType != eEthernetEventType.LinkUp) return;
|
if (ethernetEventArgs.EthernetEventType != eEthernetEventType.LinkUp) return;
|
||||||
@@ -221,9 +185,6 @@ namespace PepperDash.Essentials.Core.Monitoring
|
|||||||
SerialNumberFeedback.FireUpdate();
|
SerialNumberFeedback.FireUpdate();
|
||||||
ModelFeedback.FireUpdate();
|
ModelFeedback.FireUpdate();
|
||||||
|
|
||||||
IsApplianceFeedback.FireUpdate();
|
|
||||||
IsServerFeedback.FireUpdate();
|
|
||||||
|
|
||||||
OnSystemMonitorPropertiesChanged();
|
OnSystemMonitorPropertiesChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -276,11 +237,6 @@ namespace PepperDash.Essentials.Core.Monitoring
|
|||||||
UptimeFeedback.LinkInputSig(trilist.StringInput[joinMap.Uptime.JoinNumber]);
|
UptimeFeedback.LinkInputSig(trilist.StringInput[joinMap.Uptime.JoinNumber]);
|
||||||
LastStartFeedback.LinkInputSig(trilist.StringInput[joinMap.LastBoot.JoinNumber]);
|
LastStartFeedback.LinkInputSig(trilist.StringInput[joinMap.LastBoot.JoinNumber]);
|
||||||
|
|
||||||
trilist.SetSigHeldAction(joinMap.ProcessorReboot.JoinNumber, 10000, ProcessorReboot);
|
|
||||||
|
|
||||||
IsApplianceFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsAppliance.JoinNumber]);
|
|
||||||
IsServerFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsServer.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);
|
||||||
|
|
||||||
@@ -345,13 +301,11 @@ namespace PepperDash.Essentials.Core.Monitoring
|
|||||||
p.Value.AggregatedProgramInfoFeedback.LinkInputSig(
|
p.Value.AggregatedProgramInfoFeedback.LinkInputSig(
|
||||||
trilist.StringInput[programSlotJoinStart + joinMap.AggregatedProgramInfo.JoinNumber]);
|
trilist.StringInput[programSlotJoinStart + joinMap.AggregatedProgramInfo.JoinNumber]);
|
||||||
|
|
||||||
trilist.SetSigHeldAction(programSlotJoinStart + joinMap.ProgramReset.JoinNumber, 10000, () => ProgramReset(programNumber));
|
|
||||||
|
|
||||||
programSlotJoinStart = programSlotJoinStart + joinMap.ProgramOffsetJoin.JoinSpan;
|
programSlotJoinStart = programSlotJoinStart + joinMap.ProgramOffsetJoin.JoinSpan;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//// Sets the time zone
|
//// Sets the time zone
|
||||||
//public void SetTimeZone(int timeZone)
|
//public void SetTimeZone(int timeZone)
|
||||||
//{
|
//{
|
||||||
// SystemMonitor.TimeZoneInformation.TimeZoneNumber = timeZone;
|
// SystemMonitor.TimeZoneInformation.TimeZoneNumber = timeZone;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<ProjectGuid>{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}</ProjectGuid>
|
<ProjectGuid>{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}</ProjectGuid>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>PepperDash_Essentials_Core</RootNamespace>
|
<RootNamespace>PepperDash.Essentials.Core</RootNamespace>
|
||||||
<AssemblyName>PepperDash_Essentials_Core</AssemblyName>
|
<AssemblyName>PepperDash_Essentials_Core</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>
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SimplSharpCWSHelperInterface, Version=2.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="SimplSharpCWSHelperInterface, Version=2.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCWSHelperInterface.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCWSHelperInterface.dll</HintPath>
|
||||||
</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>
|
||||||
@@ -200,7 +200,6 @@
|
|||||||
<Compile Include="Crestron IO\Relay\GenericRelayDevice.cs" />
|
<Compile Include="Crestron IO\Relay\GenericRelayDevice.cs" />
|
||||||
<Compile Include="Crestron IO\Relay\ISwitchedOutput.cs" />
|
<Compile Include="Crestron IO\Relay\ISwitchedOutput.cs" />
|
||||||
<Compile Include="Crestron IO\StatusSign\StatusSignController.cs" />
|
<Compile Include="Crestron IO\StatusSign\StatusSignController.cs" />
|
||||||
<Compile Include="Devices\PowerInterfaces.cs" />
|
|
||||||
<Compile Include="Web\RequestHandlers\AppDebugRequestHandler.cs" />
|
<Compile Include="Web\RequestHandlers\AppDebugRequestHandler.cs" />
|
||||||
<Compile Include="Web\RequestHandlers\GetFeedbacksForDeviceRequestHandler.cs" />
|
<Compile Include="Web\RequestHandlers\GetFeedbacksForDeviceRequestHandler.cs" />
|
||||||
<Compile Include="Web\EssentialsWebApiHelpers.cs" />
|
<Compile Include="Web\EssentialsWebApiHelpers.cs" />
|
||||||
@@ -418,6 +417,12 @@
|
|||||||
<None Include="app.config" />
|
<None Include="app.config" />
|
||||||
<None Include="Properties\ControlSystem.cfg" />
|
<None Include="Properties\ControlSystem.cfg" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\Essentials Interfaces\PepperDash_Essentials_Interfaces\PepperDash_Essentials_Interfaces.csproj">
|
||||||
|
<Project>{E51D7C84-4906-486C-B2BA-EEB3B4E9731B}</Project>
|
||||||
|
<Name>PepperDash_Essentials_Interfaces</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<VisualStudio>
|
<VisualStudio>
|
||||||
|
|||||||
@@ -194,13 +194,13 @@ namespace PepperDash.Essentials
|
|||||||
/// <param name="command"></param>
|
/// <param name="command"></param>
|
||||||
public static void ReportAssemblyVersions(string command)
|
public static void ReportAssemblyVersions(string command)
|
||||||
{
|
{
|
||||||
|
Debug.Console(0, "Loaded Assemblies:");
|
||||||
CrestronConsole.ConsoleCommandResponse("Loaded Assemblies:" + CrestronEnvironment.NewLine);
|
|
||||||
foreach (var assembly in LoadedAssemblies)
|
foreach (var assembly in LoadedAssemblies)
|
||||||
{
|
{
|
||||||
CrestronConsole.ConsoleCommandResponse("{0} Version: {1}" + CrestronEnvironment.NewLine, assembly.Name, assembly.Version);
|
Debug.Console(0, "{0} Version: {1}", assembly.Name, assembly.Version);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Moves any .dll assemblies not already loaded from the plugins folder to loadedPlugins folder
|
/// Moves any .dll assemblies not already loaded from the plugins folder to loadedPlugins folder
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharp.WebScripting;
|
using Crestron.SimplSharp.WebScripting;
|
||||||
|
using Crestron.SimplSharpPro.Diagnostics;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Core.Web;
|
using PepperDash.Core.Web;
|
||||||
using PepperDash.Essentials.Core.Web.RequestHandlers;
|
using PepperDash.Essentials.Core.Web.RequestHandlers;
|
||||||
@@ -17,13 +20,13 @@ namespace PepperDash.Essentials.Core.Web
|
|||||||
/// http(s)://{ipaddress}/cws/{basePath}
|
/// http(s)://{ipaddress}/cws/{basePath}
|
||||||
/// http(s)://{ipaddress}/VirtualControl/Rooms/{roomId}/cws/{basePath}
|
/// http(s)://{ipaddress}/VirtualControl/Rooms/{roomId}/cws/{basePath}
|
||||||
/// </example>
|
/// </example>
|
||||||
private readonly string _defaultBasePath = CrestronEnvironment.DevicePlatform == eDevicePlatform.Appliance
|
private readonly string _defaultBasePath =
|
||||||
? string.Format("/app{0:00}/api", InitialParametersClass.ApplicationNumber)
|
CrestronEnvironment.DevicePlatform == eDevicePlatform.Appliance ? string.Format("/app{0:00}/api", InitialParametersClass.ApplicationNumber) : "/api";
|
||||||
: "/api";
|
|
||||||
|
|
||||||
|
// TODO [ ] Reset debug levels to proper value Trace = 0, Info = 1, Verbose = 2
|
||||||
private const int DebugTrace = 0;
|
private const int DebugTrace = 0;
|
||||||
private const int DebugInfo = 1;
|
private const int DebugInfo = 0;
|
||||||
private const int DebugVerbose = 2;
|
private const int DebugVerbose = 0;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// CWS base path
|
/// CWS base path
|
||||||
@@ -95,6 +98,11 @@ namespace PepperDash.Essentials.Core.Web
|
|||||||
Name = "DevProps",
|
Name = "DevProps",
|
||||||
RouteHandler = new DevPropsRequestHandler()
|
RouteHandler = new DevPropsRequestHandler()
|
||||||
},
|
},
|
||||||
|
//new HttpCwsRoute("devprops/{key}")
|
||||||
|
//{
|
||||||
|
// Name = "DevProps",
|
||||||
|
// RouteHandler = new DevPropsRequestHandler()
|
||||||
|
//},
|
||||||
new HttpCwsRoute("devjson")
|
new HttpCwsRoute("devjson")
|
||||||
{
|
{
|
||||||
Name = "DevJson",
|
Name = "DevJson",
|
||||||
@@ -105,6 +113,11 @@ namespace PepperDash.Essentials.Core.Web
|
|||||||
Name = "SetDeviceStreamDebug",
|
Name = "SetDeviceStreamDebug",
|
||||||
RouteHandler = new SetDeviceStreamDebugRequestHandler()
|
RouteHandler = new SetDeviceStreamDebugRequestHandler()
|
||||||
},
|
},
|
||||||
|
//new HttpCwsRoute("setdevicestreamdebug/{deviceKey}/{state}")
|
||||||
|
//{
|
||||||
|
// Name = "SetDeviceStreamDebug",
|
||||||
|
// RouteHandler = new SetDeviceStreamDebugRequestHandler()
|
||||||
|
//},
|
||||||
new HttpCwsRoute("disableallstreamdebug")
|
new HttpCwsRoute("disableallstreamdebug")
|
||||||
{
|
{
|
||||||
Name = "DisableAllStreamDebug",
|
Name = "DisableAllStreamDebug",
|
||||||
@@ -160,7 +173,12 @@ namespace PepperDash.Essentials.Core.Web
|
|||||||
if (CrestronEnvironment.DevicePlatform == eDevicePlatform.Appliance)
|
if (CrestronEnvironment.DevicePlatform == eDevicePlatform.Appliance)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
RMC4>
|
||||||
WEBSERVER [ON | OFF | TIMEOUT <VALUE IN SECONDS> | MAXSESSIONSPERUSER <Number of sessions>]
|
WEBSERVER [ON | OFF | TIMEOUT <VALUE IN SECONDS> | MAXSESSIONSPERUSER <Number of sessions>]
|
||||||
|
WEBSERVER [TIMEOUT] will display current session timeout value
|
||||||
|
WEBSERVER MAXSESSIONSPERUSER will display current max web sessions per user
|
||||||
|
WEBSERVER ALLOWSHAREDSESSION will display whether 'samesite = none' would be set on cookies
|
||||||
|
No parameter - displays current setting
|
||||||
*/
|
*/
|
||||||
var response = string.Empty;
|
var response = string.Empty;
|
||||||
CrestronConsole.SendControlSystemCommand("webserver", ref response);
|
CrestronConsole.SendControlSystemCommand("webserver", ref response);
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
using Crestron.SimplSharp.WebScripting;
|
using System;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp.WebScripting;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Core.Web.RequestHandlers;
|
using PepperDash.Core.Web.RequestHandlers;
|
||||||
@@ -8,14 +10,25 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
public class AppDebugRequestHandler : WebApiBaseRequestHandler
|
public class AppDebugRequestHandler : WebApiBaseRequestHandler
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor
|
/// Handles CONNECT method requests
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <param name="context"></param>
|
||||||
/// base(true) enables CORS support by default
|
protected override void HandleConnect(HttpCwsContext context)
|
||||||
/// </remarks>
|
|
||||||
public AppDebugRequestHandler()
|
|
||||||
: base(true)
|
|
||||||
{
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles DELETE method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleDelete(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -24,7 +37,7 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
/// <param name="context"></param>
|
/// <param name="context"></param>
|
||||||
protected override void HandleGet(HttpCwsContext context)
|
protected override void HandleGet(HttpCwsContext context)
|
||||||
{
|
{
|
||||||
var appDebug = new AppDebug { Level = Debug.Level };
|
var appDebug = new AppDebug {Level = Debug.Level};
|
||||||
|
|
||||||
var body = JsonConvert.SerializeObject(appDebug, Formatting.Indented);
|
var body = JsonConvert.SerializeObject(appDebug, Formatting.Indented);
|
||||||
|
|
||||||
@@ -34,6 +47,39 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
context.Response.End();
|
context.Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles HEAD method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleHead(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles OPTIONS method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleOptions(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles PATCH method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePatch(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Handles POST method requests
|
/// Handles POST method requests
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -72,6 +118,28 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
context.Response.Write(responseBody, false);
|
context.Response.Write(responseBody, false);
|
||||||
context.Response.End();
|
context.Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles PUT method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePut(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles TRACE method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleTrace(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AppDebug
|
public class AppDebug
|
||||||
|
|||||||
@@ -5,17 +5,6 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
{
|
{
|
||||||
public class DefaultRequestHandler : WebApiBaseRequestHandler
|
public class DefaultRequestHandler : WebApiBaseRequestHandler
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Constructor
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// base(true) enables CORS support by default
|
|
||||||
/// </remarks>
|
|
||||||
public DefaultRequestHandler()
|
|
||||||
: base(true)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Handles CONNECT method requests
|
/// Handles CONNECT method requests
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Text;
|
||||||
using Crestron.SimplSharp.WebScripting;
|
using Crestron.SimplSharp.WebScripting;
|
||||||
using PepperDash.Core;
|
|
||||||
using PepperDash.Core.Web.RequestHandlers;
|
using PepperDash.Core.Web.RequestHandlers;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
||||||
@@ -8,14 +8,69 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
public class DevJsonRequestHandler : WebApiBaseRequestHandler
|
public class DevJsonRequestHandler : WebApiBaseRequestHandler
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor
|
/// Handles CONNECT method requests
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <param name="context"></param>
|
||||||
/// base(true) enables CORS support by default
|
protected override void HandleConnect(HttpCwsContext context)
|
||||||
/// </remarks>
|
|
||||||
public DevJsonRequestHandler()
|
|
||||||
: base(true)
|
|
||||||
{
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles DELETE method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleDelete(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles GET method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleGet(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles HEAD method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleHead(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles OPTIONS method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleOptions(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles PATCH method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePatch(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -53,14 +108,32 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Debug.Console(1, "Exception Message: {0}", ex.Message);
|
|
||||||
Debug.Console(2, "Exception Stack Trace: {0}", ex.StackTrace);
|
|
||||||
if(ex.InnerException != null) Debug.Console(2, "Exception Inner: {0}", ex.InnerException);
|
|
||||||
|
|
||||||
context.Response.StatusCode = 400;
|
context.Response.StatusCode = 400;
|
||||||
context.Response.StatusDescription = "Bad Request";
|
context.Response.StatusDescription = "Bad Request";
|
||||||
context.Response.End();
|
context.Response.End();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles PUT method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePut(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles TRACE method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleTrace(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,14 +8,25 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
public class DevListRequestHandler : WebApiBaseRequestHandler
|
public class DevListRequestHandler : WebApiBaseRequestHandler
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor
|
/// Handles CONNECT method requests
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <param name="context"></param>
|
||||||
/// base(true) enables CORS support by default
|
protected override void HandleConnect(HttpCwsContext context)
|
||||||
/// </remarks>
|
|
||||||
public DevListRequestHandler()
|
|
||||||
: base(true)
|
|
||||||
{
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles DELETE method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleDelete(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -47,5 +58,71 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
context.Response.Write(js, false);
|
context.Response.Write(js, false);
|
||||||
context.Response.End();
|
context.Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles HEAD method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleHead(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles OPTIONS method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleOptions(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles PATCH method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePatch(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles POST method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePost(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles PUT method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePut(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles TRACE method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleTrace(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Text;
|
using System;
|
||||||
|
using System.Text;
|
||||||
using Crestron.SimplSharp.WebScripting;
|
using Crestron.SimplSharp.WebScripting;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PepperDash.Core.Web.RequestHandlers;
|
using PepperDash.Core.Web.RequestHandlers;
|
||||||
@@ -8,14 +9,69 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
public class DevPropsRequestHandler : WebApiBaseRequestHandler
|
public class DevPropsRequestHandler : WebApiBaseRequestHandler
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor
|
/// Handles CONNECT method requests
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <param name="context"></param>
|
||||||
/// base(true) enables CORS support by default
|
protected override void HandleConnect(HttpCwsContext context)
|
||||||
/// </remarks>
|
|
||||||
public DevPropsRequestHandler()
|
|
||||||
: base(true)
|
|
||||||
{
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles DELETE method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleDelete(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles GET method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleGet(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles HEAD method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleHead(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles OPTIONS method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleOptions(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles PATCH method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePatch(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -72,5 +128,27 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
context.Response.Write(deviceProps, false);
|
context.Response.Write(deviceProps, false);
|
||||||
context.Response.End();
|
context.Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles PUT method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePut(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles TRACE method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleTrace(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,14 +6,69 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
public class DisableAllStreamDebugRequestHandler : WebApiBaseRequestHandler
|
public class DisableAllStreamDebugRequestHandler : WebApiBaseRequestHandler
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor
|
/// Handles CONNECT method requests
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <param name="context"></param>
|
||||||
/// base(true) enables CORS support by default
|
protected override void HandleConnect(HttpCwsContext context)
|
||||||
/// </remarks>
|
|
||||||
public DisableAllStreamDebugRequestHandler()
|
|
||||||
: base(true)
|
|
||||||
{
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles DELETE method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleDelete(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles GET method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleGet(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles HEAD method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleHead(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles OPTIONS method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleOptions(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles PATCH method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePatch(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -28,5 +83,27 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
context.Response.StatusDescription = "OK";
|
context.Response.StatusDescription = "OK";
|
||||||
context.Response.End();
|
context.Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles PUT method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePut(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles TRACE method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleTrace(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,14 +8,25 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
public class GetFeedbacksForDeviceRequestHandler : WebApiBaseRequestHandler
|
public class GetFeedbacksForDeviceRequestHandler : WebApiBaseRequestHandler
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor
|
/// Handles CONNECT method requests
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <param name="context"></param>
|
||||||
/// base(true) enables CORS support by default
|
protected override void HandleConnect(HttpCwsContext context)
|
||||||
/// </remarks>
|
|
||||||
public GetFeedbacksForDeviceRequestHandler()
|
|
||||||
: base(true)
|
|
||||||
{
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles DELETE method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleDelete(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -98,5 +109,71 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
context.Response.Write(js, false);
|
context.Response.Write(js, false);
|
||||||
context.Response.End();
|
context.Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles HEAD method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleHead(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles OPTIONS method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleOptions(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles PATCH method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePatch(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles POST method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePost(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles PUT method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePut(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles TRACE method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleTrace(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,14 +9,25 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
public class GetJoinMapForBridgeKeyRequestHandler : WebApiBaseRequestHandler
|
public class GetJoinMapForBridgeKeyRequestHandler : WebApiBaseRequestHandler
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor
|
/// Handles CONNECT method requests
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <param name="context"></param>
|
||||||
/// base(true) enables CORS support by default
|
protected override void HandleConnect(HttpCwsContext context)
|
||||||
/// </remarks>
|
|
||||||
public GetJoinMapForBridgeKeyRequestHandler()
|
|
||||||
: base(true)
|
|
||||||
{
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles DELETE method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleDelete(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -74,5 +85,73 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
context.Response.Write(js, false);
|
context.Response.Write(js, false);
|
||||||
context.Response.End();
|
context.Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles HEAD method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleHead(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles OPTIONS method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleOptions(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles PATCH method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePatch(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles POST method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePost(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles PUT method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePut(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles TRACE method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleTrace(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,14 +8,25 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
public class GetJoinMapForDeviceKeyRequestHandler : WebApiBaseRequestHandler
|
public class GetJoinMapForDeviceKeyRequestHandler : WebApiBaseRequestHandler
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor
|
/// Handles CONNECT method requests
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <param name="context"></param>
|
||||||
/// base(true) enables CORS support by default
|
protected override void HandleConnect(HttpCwsContext context)
|
||||||
/// </remarks>
|
|
||||||
public GetJoinMapForDeviceKeyRequestHandler()
|
|
||||||
: base(true)
|
|
||||||
{
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles DELETE method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleDelete(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -91,5 +102,71 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
context.Response.Write(js, false);
|
context.Response.Write(js, false);
|
||||||
context.Response.End();
|
context.Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles HEAD method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleHead(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles OPTIONS method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleOptions(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles PATCH method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePatch(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles POST method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePost(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles PUT method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePut(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles TRACE method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleTrace(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,14 +8,25 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
public class GetTypesByFilterRequestHandler : WebApiBaseRequestHandler
|
public class GetTypesByFilterRequestHandler : WebApiBaseRequestHandler
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor
|
/// Handles CONNECT method requests
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <param name="context"></param>
|
||||||
/// base(true) enables CORS support by default
|
protected override void HandleConnect(HttpCwsContext context)
|
||||||
/// </remarks>
|
|
||||||
public GetTypesByFilterRequestHandler()
|
|
||||||
: base(true)
|
|
||||||
{
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles DELETE method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleDelete(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -64,5 +75,71 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
context.Response.Write(js, false);
|
context.Response.Write(js, false);
|
||||||
context.Response.End();
|
context.Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles HEAD method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleHead(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles OPTIONS method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleOptions(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles PATCH method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePatch(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles POST method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePost(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles PUT method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePut(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles TRACE method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleTrace(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,14 +8,25 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
public class GetTypesRequestHandler : WebApiBaseRequestHandler
|
public class GetTypesRequestHandler : WebApiBaseRequestHandler
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor
|
/// Handles CONNECT method requests
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <param name="context"></param>
|
||||||
/// base(true) enables CORS support by default
|
protected override void HandleConnect(HttpCwsContext context)
|
||||||
/// </remarks>
|
|
||||||
public GetTypesRequestHandler()
|
|
||||||
: base(true)
|
|
||||||
{
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles DELETE method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleDelete(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -54,5 +65,71 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
context.Response.Write(js, false);
|
context.Response.Write(js, false);
|
||||||
context.Response.End();
|
context.Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles HEAD method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleHead(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles OPTIONS method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleOptions(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles PATCH method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePatch(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles POST method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePost(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles PUT method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePut(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles TRACE method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleTrace(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,14 +8,25 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
public class ReportVersionsRequestHandler : WebApiBaseRequestHandler
|
public class ReportVersionsRequestHandler : WebApiBaseRequestHandler
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor
|
/// Handles CONNECT method requests
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <param name="context"></param>
|
||||||
/// base(true) enables CORS support by default
|
protected override void HandleConnect(HttpCwsContext context)
|
||||||
/// </remarks>
|
|
||||||
public ReportVersionsRequestHandler()
|
|
||||||
: base(true)
|
|
||||||
{
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles DELETE method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleDelete(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -45,5 +56,71 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
context.Response.Write(js, false);
|
context.Response.Write(js, false);
|
||||||
context.Response.End();
|
context.Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles HEAD method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleHead(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles OPTIONS method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleOptions(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles PATCH method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePatch(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles POST method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePost(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles PUT method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePut(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles TRACE method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleTrace(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,14 +8,25 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
public class ShowConfigRequestHandler : WebApiBaseRequestHandler
|
public class ShowConfigRequestHandler : WebApiBaseRequestHandler
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor
|
/// Handles CONNECT method requests
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <param name="context"></param>
|
||||||
/// base(true) enables CORS support by default
|
protected override void HandleConnect(HttpCwsContext context)
|
||||||
/// </remarks>
|
|
||||||
public ShowConfigRequestHandler()
|
|
||||||
: base(true)
|
|
||||||
{
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles DELETE method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleDelete(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -33,5 +44,71 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||||||
context.Response.Write(config, false);
|
context.Response.Write(config, false);
|
||||||
context.Response.End();
|
context.Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles HEAD method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleHead(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles OPTIONS method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleOptions(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles PATCH method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePatch(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles POST method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePost(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles PUT method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandlePut(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles TRACE method requests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
protected override void HandleTrace(HttpCwsContext context)
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = 501;
|
||||||
|
context.Response.StatusDescription = "Not Implemented";
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -19,7 +19,7 @@ namespace PepperDash.Essentials.DM.AirMedia
|
|||||||
[Description("Wrapper class for an AM-200 or AM-300")]
|
[Description("Wrapper class for an AM-200 or AM-300")]
|
||||||
public class AirMediaController : CrestronGenericBridgeableBaseDevice, IRoutingNumericWithFeedback, IIROutputPorts, IComPorts
|
public class AirMediaController : CrestronGenericBridgeableBaseDevice, IRoutingNumericWithFeedback, IIROutputPorts, IComPorts
|
||||||
{
|
{
|
||||||
public Am3x00 AirMedia { get; private set; }
|
public AmX00 AirMedia { get; private set; }
|
||||||
|
|
||||||
public DeviceConfig DeviceConfig { get; private set; }
|
public DeviceConfig DeviceConfig { get; private set; }
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ namespace PepperDash.Essentials.DM.AirMedia
|
|||||||
public StringFeedback SerialNumberFeedback { get; private set; }
|
public StringFeedback SerialNumberFeedback { get; private set; }
|
||||||
public BoolFeedback AutomaticInputRoutingEnabledFeedback { get; private set; }
|
public BoolFeedback AutomaticInputRoutingEnabledFeedback { get; private set; }
|
||||||
|
|
||||||
public AirMediaController(string key, string name, Am3x00 device, DeviceConfig dc, AirMediaPropertiesConfig props)
|
public AirMediaController(string key, string name, AmX00 device, DeviceConfig dc, AirMediaPropertiesConfig props)
|
||||||
: base(key, name, device)
|
: base(key, name, device)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -95,31 +95,24 @@ namespace PepperDash.Essentials.DM.AirMedia
|
|||||||
|
|
||||||
AirMedia.AirMedia.AirMediaChange += new Crestron.SimplSharpPro.DeviceSupport.GenericEventHandler(AirMedia_AirMediaChange);
|
AirMedia.AirMedia.AirMediaChange += new Crestron.SimplSharpPro.DeviceSupport.GenericEventHandler(AirMedia_AirMediaChange);
|
||||||
|
|
||||||
IsInSessionFeedback = new BoolFeedback(() => AirMedia.AirMedia.StatusFeedback.UShortValue == 0);
|
IsInSessionFeedback = new BoolFeedback(new Func<bool>(() => AirMedia.AirMedia.StatusFeedback.UShortValue == 0));
|
||||||
ErrorFeedback = new IntFeedback(() => AirMedia.AirMedia.ErrorFeedback.UShortValue);
|
ErrorFeedback = new IntFeedback(new Func<int>(() => AirMedia.AirMedia.ErrorFeedback.UShortValue));
|
||||||
NumberOfUsersConnectedFeedback = new IntFeedback(() => AirMedia.AirMedia.NumberOfUsersConnectedFeedback.UShortValue);
|
NumberOfUsersConnectedFeedback = new IntFeedback(new Func<int>(() => AirMedia.AirMedia.NumberOfUsersConnectedFeedback.UShortValue));
|
||||||
LoginCodeFeedback = new IntFeedback(() => AirMedia.AirMedia.LoginCodeFeedback.UShortValue);
|
LoginCodeFeedback = new IntFeedback(new Func<int>(() => AirMedia.AirMedia.LoginCodeFeedback.UShortValue));
|
||||||
ConnectionAddressFeedback = new StringFeedback(() => AirMedia.AirMedia.ConnectionAddressFeedback.StringValue);
|
ConnectionAddressFeedback = new StringFeedback(new Func<string>(() => AirMedia.AirMedia.ConnectionAddressFeedback.StringValue));
|
||||||
HostnameFeedback = new StringFeedback(() => AirMedia.AirMedia.HostNameFeedback.StringValue);
|
HostnameFeedback = new StringFeedback(new Func<string>(() => AirMedia.AirMedia.HostNameFeedback.StringValue));
|
||||||
|
|
||||||
// TODO: Figure out if we can actually get the TSID/Serial
|
// TODO: Figure out if we can actually get the TSID/Serial
|
||||||
SerialNumberFeedback = new StringFeedback(() => "unknown");
|
SerialNumberFeedback = new StringFeedback(new Func<string>(() => "unknown"));
|
||||||
|
|
||||||
AirMedia.DisplayControl.DisplayControlChange += DisplayControl_DisplayControlChange;
|
AirMedia.DisplayControl.DisplayControlChange += new Crestron.SimplSharpPro.DeviceSupport.GenericEventHandler(DisplayControl_DisplayControlChange);
|
||||||
|
|
||||||
VideoOutFeedback = new IntFeedback(() => Convert.ToInt16(AirMedia.DisplayControl.VideoOutFeedback));
|
VideoOutFeedback = new IntFeedback(new Func<int>(() => Convert.ToInt16(AirMedia.DisplayControl.VideoOutFeedback)));
|
||||||
AutomaticInputRoutingEnabledFeedback = new BoolFeedback(() => AirMedia.DisplayControl.EnableAutomaticRoutingFeedback.BoolValue);
|
AutomaticInputRoutingEnabledFeedback = new BoolFeedback(new Func<bool>(() => AirMedia.DisplayControl.EnableAutomaticRoutingFeedback.BoolValue));
|
||||||
|
|
||||||
// Not all AirMedia versions support HDMI In like the 3200
|
AirMedia.HdmiIn.StreamChange += new Crestron.SimplSharpPro.DeviceSupport.StreamEventHandler(HdmiIn_StreamChange);
|
||||||
if (AirMedia.HdmiIn != null)
|
|
||||||
{
|
|
||||||
AirMedia.HdmiIn.StreamChange += HdmiIn_StreamChange;
|
|
||||||
HdmiVideoSyncDetectedFeedback = new BoolFeedback(() => AirMedia.HdmiIn.SyncDetectedFeedback.BoolValue);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return false if the AirMedia device doesn't support HDMI Input
|
HdmiVideoSyncDetectedFeedback = new BoolFeedback(new Func<bool>(() => AirMedia.HdmiIn.SyncDetectedFeedback.BoolValue));
|
||||||
HdmiVideoSyncDetectedFeedback = new BoolFeedback(() => false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CustomActivate()
|
public override bool CustomActivate()
|
||||||
@@ -129,7 +122,7 @@ namespace PepperDash.Essentials.DM.AirMedia
|
|||||||
else
|
else
|
||||||
AirMedia.DisplayControl.DisableAutomaticRouting();
|
AirMedia.DisplayControl.DisableAutomaticRouting();
|
||||||
|
|
||||||
return true;
|
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)
|
||||||
@@ -186,53 +179,31 @@ namespace PepperDash.Essentials.DM.AirMedia
|
|||||||
/// <param name="e">Arguments defined as IKeyName sender, output, input, and eRoutingSignalType</param>
|
/// <param name="e">Arguments defined as IKeyName sender, output, input, and eRoutingSignalType</param>
|
||||||
private void OnSwitchChange(RoutingNumericEventArgs e)
|
private void OnSwitchChange(RoutingNumericEventArgs e)
|
||||||
{
|
{
|
||||||
var handler = NumericSwitchChange;
|
var newEvent = NumericSwitchChange;
|
||||||
|
if (newEvent != null) newEvent(this, e);
|
||||||
if (handler == null) return;
|
|
||||||
|
|
||||||
handler(this, e);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AirMedia_AirMediaChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args)
|
void AirMedia_AirMediaChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args)
|
||||||
{
|
{
|
||||||
switch (args.EventId)
|
if (args.EventId == AirMediaInputSlot.AirMediaStatusFeedbackEventId)
|
||||||
{
|
IsInSessionFeedback.FireUpdate();
|
||||||
case AirMediaInputSlot.AirMediaStatusFeedbackEventId:
|
else if (args.EventId == AirMediaInputSlot.AirMediaErrorFeedbackEventId)
|
||||||
{
|
ErrorFeedback.FireUpdate();
|
||||||
IsInSessionFeedback.FireUpdate();
|
else if (args.EventId == AirMediaInputSlot.AirMediaNumberOfUserConnectedEventId)
|
||||||
break;
|
NumberOfUsersConnectedFeedback.FireUpdate();
|
||||||
}
|
else if (args.EventId == AirMediaInputSlot.AirMediaLoginCodeEventId)
|
||||||
case AirMediaInputSlot.AirMediaErrorFeedbackEventId:
|
LoginCodeFeedback.FireUpdate();
|
||||||
{
|
else if (args.EventId == AirMediaInputSlot.AirMediaConnectionAddressFeedbackEventId)
|
||||||
ErrorFeedback.FireUpdate();
|
ConnectionAddressFeedback.FireUpdate();
|
||||||
break;
|
else if (args.EventId == AirMediaInputSlot.AirMediaHostNameFeedbackEventId)
|
||||||
}
|
HostnameFeedback.FireUpdate();
|
||||||
case AirMediaInputSlot.AirMediaNumberOfUserConnectedEventId:
|
|
||||||
{
|
|
||||||
NumberOfUsersConnectedFeedback.FireUpdate();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case AirMediaInputSlot.AirMediaLoginCodeEventId:
|
|
||||||
{
|
|
||||||
LoginCodeFeedback.FireUpdate();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case AirMediaInputSlot.AirMediaConnectionAddressFeedbackEventId:
|
|
||||||
{
|
|
||||||
ConnectionAddressFeedback.FireUpdate();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case AirMediaInputSlot.AirMediaHostNameFeedbackEventId:
|
|
||||||
{
|
|
||||||
HostnameFeedback.FireUpdate();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisplayControl_DisplayControlChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args)
|
void DisplayControl_DisplayControlChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args)
|
||||||
{
|
{
|
||||||
|
if (args.EventId == AmX00.VideoOutFeedbackEventId)
|
||||||
|
{
|
||||||
VideoOutFeedback.FireUpdate();
|
VideoOutFeedback.FireUpdate();
|
||||||
|
|
||||||
var localInputPort =
|
var localInputPort =
|
||||||
@@ -240,7 +211,8 @@ namespace PepperDash.Essentials.DM.AirMedia
|
|||||||
|
|
||||||
OnSwitchChange(new RoutingNumericEventArgs(1, VideoOutFeedback.UShortValue, OutputPorts.First(),
|
OnSwitchChange(new RoutingNumericEventArgs(1, VideoOutFeedback.UShortValue, OutputPorts.First(),
|
||||||
localInputPort, eRoutingSignalType.AudioVideo));
|
localInputPort, eRoutingSignalType.AudioVideo));
|
||||||
|
}
|
||||||
|
else if (args.EventId == AmX00.EnableAutomaticRoutingFeedbackEventId)
|
||||||
AutomaticInputRoutingEnabledFeedback.FireUpdate();
|
AutomaticInputRoutingEnabledFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -370,7 +342,7 @@ namespace PepperDash.Essentials.DM.AirMedia
|
|||||||
{
|
{
|
||||||
public AirMediaControllerFactory()
|
public AirMediaControllerFactory()
|
||||||
{
|
{
|
||||||
TypeNames = new List<string>() { "am200", "am300", "am3200" };
|
TypeNames = new List<string>() { "am200", "am300" };
|
||||||
}
|
}
|
||||||
|
|
||||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||||
@@ -379,26 +351,12 @@ namespace PepperDash.Essentials.DM.AirMedia
|
|||||||
|
|
||||||
Debug.Console(1, "Factory Attempting to create new AirMedia Device");
|
Debug.Console(1, "Factory Attempting to create new AirMedia Device");
|
||||||
|
|
||||||
var props = dc.Properties.ToObject<AirMediaPropertiesConfig>();
|
var props = JsonConvert.DeserializeObject<AirMediaPropertiesConfig>(dc.Properties.ToString());
|
||||||
Am3x00 amDevice = null;
|
AmX00 amDevice = null;
|
||||||
switch (type)
|
if (type == "am200")
|
||||||
{
|
amDevice = new Crestron.SimplSharpPro.DM.AirMedia.Am200(props.Control.IpIdInt, Global.ControlSystem);
|
||||||
case "am200" :
|
else if (type == "am300")
|
||||||
{
|
amDevice = new Crestron.SimplSharpPro.DM.AirMedia.Am300(props.Control.IpIdInt, Global.ControlSystem);
|
||||||
amDevice = new Am200(props.Control.IpIdInt, Global.ControlSystem);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "am300" :
|
|
||||||
{
|
|
||||||
amDevice = new Am300(props.Control.IpIdInt, Global.ControlSystem);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "am3200" :
|
|
||||||
{
|
|
||||||
amDevice = new Am3200(props.Control.IpIdInt, Global.ControlSystem);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return new AirMediaController(dc.Key, dc.Name, amDevice, dc, props);
|
return new AirMediaController(dc.Key, dc.Name, amDevice, dc, props);
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
|
/// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DmBladeChassisController : CrestronGenericBridgeableBaseDevice, IDmSwitchWithEndpointOnlineFeedback, IRoutingNumericWithFeedback
|
public class DmBladeChassisController : CrestronGenericBridgeableBaseDevice, IDmSwitch, IRoutingNumericWithFeedback
|
||||||
{
|
{
|
||||||
private const string NonePortKey = "inputCard0--None";
|
private const string NonePortKey = "inputCard0--None";
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Description("Wrapper class for all DM-MD chassis variants from 8x8 to 32x32")]
|
[Description("Wrapper class for all DM-MD chassis variants from 8x8 to 32x32")]
|
||||||
public class DmChassisController : CrestronGenericBridgeableBaseDevice, IDmSwitchWithEndpointOnlineFeedback, IRoutingNumericWithFeedback
|
public class DmChassisController : CrestronGenericBridgeableBaseDevice, IDmSwitch, IRoutingNumericWithFeedback
|
||||||
{
|
{
|
||||||
private const string NonePortKey = "inputCard0--None";
|
private const string NonePortKey = "inputCard0--None";
|
||||||
public DMChassisPropertiesConfig PropertiesConfig { get; set; }
|
public DMChassisPropertiesConfig PropertiesConfig { get; set; }
|
||||||
|
|||||||
@@ -17,12 +17,11 @@ using PepperDash.Essentials.Core;
|
|||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using PepperDash.Essentials.Core.DeviceInfo;
|
using PepperDash.Essentials.Core.DeviceInfo;
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.DM.Endpoints.DGEs
|
namespace PepperDash.Essentials.DM.Endpoints.DGEs
|
||||||
{
|
{
|
||||||
[Description("Wrapper class for DGE-100")]
|
[Description("Wrapper class for DGE-100")]
|
||||||
public class Dge100Controller : CrestronGenericBaseDevice, IComPorts, IIROutputPorts, IHasBasicTriListWithSmartObject, ICec, IDeviceInfoProvider, IBridgeAdvanced
|
public class Dge100Controller : CrestronGenericBaseDevice, IComPorts, IIROutputPorts, IHasBasicTriListWithSmartObject, ICec, IDeviceInfoProvider
|
||||||
{
|
{
|
||||||
private const int CtpPort = 41795;
|
private const int CtpPort = 41795;
|
||||||
private readonly Dge100 _dge;
|
private readonly Dge100 _dge;
|
||||||
@@ -33,11 +32,8 @@ namespace PepperDash.Essentials.DM.Endpoints.DGEs
|
|||||||
|
|
||||||
private DeviceConfig _dc;
|
private DeviceConfig _dc;
|
||||||
|
|
||||||
public VideoStatusOutputs VideoStatusFeedbacks { get; private set; }
|
|
||||||
|
|
||||||
CrestronTouchpanelPropertiesConfig PropertiesConfig;
|
CrestronTouchpanelPropertiesConfig PropertiesConfig;
|
||||||
|
|
||||||
|
|
||||||
public Dge100Controller(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)
|
||||||
{
|
{
|
||||||
@@ -53,18 +49,6 @@ namespace PepperDash.Essentials.DM.Endpoints.DGEs
|
|||||||
_dc = dc;
|
_dc = dc;
|
||||||
|
|
||||||
PropertiesConfig = props;
|
PropertiesConfig = props;
|
||||||
|
|
||||||
var videoStatusFuncs = new VideoStatusFuncsWrapper
|
|
||||||
{
|
|
||||||
HdcpActiveFeedbackFunc = () => _dge.HdmiIn.HdcpSupportOnFeedback.BoolValue,
|
|
||||||
VideoResolutionFeedbackFunc = () => _dge.HdmiIn.VideoAttributes.GetVideoResolutionString(),
|
|
||||||
VideoSyncFeedbackFunc = () => _dge.HdmiIn.SyncDetectedFeedback.BoolValue,
|
|
||||||
};
|
|
||||||
|
|
||||||
VideoStatusFeedbacks = new VideoStatusOutputs(videoStatusFuncs);
|
|
||||||
|
|
||||||
_dge.HdmiIn.StreamChange += (s,a) => VideoStatusFeedbacks.FireAll();
|
|
||||||
_dge.HdmiIn.VideoAttributes.AttributeChange += (o, a) => VideoStatusFeedbacks.FireAll();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IComPorts Members
|
#region IComPorts Members
|
||||||
@@ -203,63 +187,6 @@ namespace PepperDash.Essentials.DM.Endpoints.DGEs
|
|||||||
handler(this, new DeviceInfoEventArgs(DeviceInfo));
|
handler(this, new DeviceInfoEventArgs(DeviceInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IBridgeAdvanced Members
|
|
||||||
|
|
||||||
public void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
|
||||||
{
|
|
||||||
var joinMap = new DgeJoinMap(joinStart);
|
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
|
||||||
joinMap = JsonConvert.DeserializeObject<DgeJoinMap>(joinMapSerialized);
|
|
||||||
|
|
||||||
if (bridge != null)
|
|
||||||
{
|
|
||||||
bridge.AddJoinMap(Key, joinMap);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
|
||||||
}
|
|
||||||
|
|
||||||
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
|
||||||
|
|
||||||
//Presses
|
|
||||||
trilist.SetSigTrueAction(joinMap.HdmiInHdcpOn.JoinNumber, () => _dge.HdmiIn.HdcpSupportOn());
|
|
||||||
trilist.SetSigTrueAction(joinMap.HdmiInHdcpOff.JoinNumber,() => _dge.HdmiIn.HdcpSupportOff());
|
|
||||||
trilist.SetSigTrueAction(joinMap.HdmiInHdcpToggle.JoinNumber, () => {
|
|
||||||
if(_dge.HdmiIn.HdcpSupportOnFeedback.BoolValue)
|
|
||||||
{
|
|
||||||
_dge.HdmiIn.HdcpSupportOff();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_dge.HdmiIn.HdcpSupportOn();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// Feedbacks
|
|
||||||
VideoStatusFeedbacks.HdcpActiveFeedback.LinkInputSig(trilist.BooleanInput[joinMap.HdmiInHdcpOn.JoinNumber]);
|
|
||||||
VideoStatusFeedbacks.HdcpActiveFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.HdmiInHdcpOff.JoinNumber]);
|
|
||||||
|
|
||||||
VideoStatusFeedbacks.VideoResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentInputResolution.JoinNumber]);
|
|
||||||
VideoStatusFeedbacks.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.SyncDetected.JoinNumber]);
|
|
||||||
|
|
||||||
IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
|
||||||
|
|
||||||
trilist.OnlineStatusChange += (o, a) =>
|
|
||||||
{
|
|
||||||
if (!a.DeviceOnLine) return;
|
|
||||||
|
|
||||||
VideoStatusFeedbacks.FireAll();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,50 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
using PepperDash.Essentials.Core;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.DM.Endpoints.DGEs
|
|
||||||
{
|
|
||||||
public class DgeJoinMap : JoinMapBaseAdvanced
|
|
||||||
{
|
|
||||||
[JoinName("IsOnline")]
|
|
||||||
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "DGE Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
[JoinName("CurrentInputResolution")]
|
|
||||||
public JoinDataComplete CurrentInputResolution = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "DGE Current Input Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
|
||||||
|
|
||||||
[JoinName("SyncDetected")]
|
|
||||||
public JoinDataComplete SyncDetected = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "DGE Sync Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
[JoinName("HdmiHdcpOn")]
|
|
||||||
public JoinDataComplete HdmiInHdcpOn = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "DGE HDMI HDCP State On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
[JoinName("HdmiHdcpOff")]
|
|
||||||
public JoinDataComplete HdmiInHdcpOff = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "DGE HDMI HDCP State Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
[JoinName("HdmiHdcpToggle")]
|
|
||||||
public JoinDataComplete HdmiInHdcpToggle = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "DGE HDMI HDCP State Toggle", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
public DgeJoinMap(uint joinStart)
|
|
||||||
: this(joinStart, typeof(DgeJoinMap))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Constructor to use when extending this Join map
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="joinStart">Join this join map will start at</param>
|
|
||||||
/// <param name="type">Type of the child join map</param>
|
|
||||||
protected DgeJoinMap(uint joinStart, Type type) : base(joinStart, type)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -58,37 +58,37 @@ namespace PepperDash.Essentials.DM.Endpoints.DGEs
|
|||||||
HdmiOut.Port = _dge.HdmiOut; ;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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,91 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
using Crestron.SimplSharpPro.DM;
|
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
|
||||||
using PepperDash.Essentials.Core;
|
|
||||||
|
|
||||||
namespace PepperDash_Essentials_DM
|
|
||||||
{
|
|
||||||
public interface IHasDmInHdcpSet
|
|
||||||
{
|
|
||||||
void SetDmInHdcpState(eHdcpCapabilityType hdcpState);
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IHasDmInHdcpGet
|
|
||||||
{
|
|
||||||
IntFeedback DmInHdcpStateFeedback { get; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IHasDmInHdcp : IHasDmInHdcpGet, IHasDmInHdcpSet
|
|
||||||
{
|
|
||||||
eHdcpCapabilityType DmInHdcpCapability { get; }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public interface IHasHdmiInHdcpSet
|
|
||||||
{
|
|
||||||
void SetHdmiInHdcpState(eHdcpCapabilityType hdcpState);
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IHasHdmiInHdcpGet
|
|
||||||
{
|
|
||||||
IntFeedback HdmiInHdcpStateFeedback { get; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IHasHdmiInHdcp : IHasHdmiInHdcpGet, IHasHdmiInHdcpSet
|
|
||||||
{
|
|
||||||
eHdcpCapabilityType HdmiInHdcpCapability { get; }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public interface IHasHdmiIn1HdcpSet
|
|
||||||
{
|
|
||||||
void SetHdmiIn1HdcpState(eHdcpCapabilityType hdcpState);
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IHasHdmiIn1HdcpGet
|
|
||||||
{
|
|
||||||
IntFeedback HdmiIn1HdcpStateFeedback { get; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IHasHdmiIn1Hdcp : IHasHdmiIn1HdcpGet, IHasHdmiIn1HdcpSet
|
|
||||||
{
|
|
||||||
eHdcpCapabilityType HdmiIn1HdcpCapability { get; }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public interface IHasHdmiIn2HdcpSet
|
|
||||||
{
|
|
||||||
void SetHdmiIn2HdcpState(eHdcpCapabilityType hdcpState);
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IHasHdmiIn2HdcpGet
|
|
||||||
{
|
|
||||||
IntFeedback HdmiInIn2HdcpStateFeedback { get; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IHasHdmi2InHdcp : IHasHdmiIn2HdcpGet, IHasHdmiIn2HdcpSet
|
|
||||||
{
|
|
||||||
eHdcpCapabilityType Hdmi2InHdcpCapability { get; }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public interface IHasDisplayPortInHdcpGet
|
|
||||||
{
|
|
||||||
IntFeedback DisplayPortInHdcpStateFeedback { get; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IHasDisplayPortInHdcpSet
|
|
||||||
{
|
|
||||||
void SetDisplayPortInHdcpState(eHdcpCapabilityType hdcpState);
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IHasDisplayPortInHdcp : IHasDisplayPortInHdcpGet, IHasDisplayPortInHdcpSet
|
|
||||||
{
|
|
||||||
eHdcpCapabilityType DisplayPortInHdcpCapability { get; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -28,8 +28,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
||||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HDBaseTSink};
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HDBaseTSink};
|
||||||
PreventRegistration = true;
|
|
||||||
rmc.Register();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
|
|||||||
@@ -6,68 +6,56 @@ using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
|||||||
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;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.DM
|
namespace PepperDash.Essentials.DM
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
|
/// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Description("Wrapper Class for DM-RMC-4K-SCALER-C")]
|
[Description("Wrapper Class for DM-RMC-4K-SCALER-C")]
|
||||||
public class DmRmc4kScalerCController : DmRmcControllerBase, IRoutingInputsOutputs, IBasicVolumeWithFeedback,
|
public class DmRmc4kScalerCController : DmRmcControllerBase, IRoutingInputsOutputs, IBasicVolumeWithFeedback,
|
||||||
IIROutputPorts, IComPorts, ICec, IRelayPorts, IHasDmInHdcp
|
IIROutputPorts, IComPorts, ICec, IRelayPorts
|
||||||
{
|
{
|
||||||
private readonly DmRmc4kScalerC _rmc;
|
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 { get; private set; }
|
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||||
|
|
||||||
public EndpointDmInputStreamWithCec DmInput { get; private set; }
|
/// <summary>
|
||||||
|
/// Make a Crestron RMC and put it in here
|
||||||
|
/// </summary>
|
||||||
|
public DmRmc4kScalerCController(string key, string name, DmRmc4kScalerC rmc)
|
||||||
|
: base(key, name, rmc)
|
||||||
|
{
|
||||||
|
_rmc = rmc;
|
||||||
|
|
||||||
public IntFeedback DmInHdcpStateFeedback { get; private set; }
|
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
||||||
|
eRoutingPortConnectionType.DmCat, 0, this);
|
||||||
|
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
||||||
|
eRoutingPortConnectionType.Hdmi, null, this);
|
||||||
|
BalancedAudioOut = new RoutingOutputPort(DmPortName.BalancedAudioOut, eRoutingSignalType.Audio,
|
||||||
|
eRoutingPortConnectionType.LineAudio, null, this);
|
||||||
|
|
||||||
|
MuteFeedback = new BoolFeedback(() => false);
|
||||||
|
|
||||||
|
VolumeLevelFeedback = new IntFeedback("MainVolumeLevelFeedback", () =>
|
||||||
/// <summary>
|
rmc.AudioOutput.VolumeFeedback.UShortValue);
|
||||||
/// Make a Crestron RMC and put it in here
|
|
||||||
/// </summary>
|
|
||||||
public DmRmc4kScalerCController(string key, string name, DmRmc4kScalerC rmc)
|
|
||||||
: base(key, name, rmc)
|
|
||||||
{
|
|
||||||
_rmc = rmc;
|
|
||||||
|
|
||||||
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
|
||||||
eRoutingPortConnectionType.DmCat, 0, this);
|
|
||||||
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
|
||||||
BalancedAudioOut = new RoutingOutputPort(DmPortName.BalancedAudioOut, eRoutingSignalType.Audio,
|
|
||||||
eRoutingPortConnectionType.LineAudio, null, this);
|
|
||||||
|
|
||||||
MuteFeedback = new BoolFeedback(() => false);
|
|
||||||
|
|
||||||
VolumeLevelFeedback = new IntFeedback("MainVolumeLevelFeedback", () =>
|
|
||||||
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);
|
||||||
|
|
||||||
InputPorts = new RoutingPortCollection<RoutingInputPort> { DmIn };
|
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
||||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort> { HdmiOut, BalancedAudioOut };
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut, BalancedAudioOut};
|
||||||
|
|
||||||
VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString());
|
VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString());
|
||||||
DmInHdcpStateFeedback = new IntFeedback("DmInHdcpCapability",
|
|
||||||
() => (int)_rmc.DmInput.HdcpCapabilityFeedback);
|
|
||||||
|
|
||||||
AddToFeedbackList(DmInHdcpStateFeedback);
|
|
||||||
|
|
||||||
|
|
||||||
_rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
_rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
||||||
_rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
_rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
||||||
@@ -104,117 +92,105 @@ 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)
|
||||||
{
|
{
|
||||||
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
|
||||||
|
|
||||||
#region IBasicVolumeWithFeedback Members
|
#region IBasicVolumeWithFeedback Members
|
||||||
|
|
||||||
public BoolFeedback MuteFeedback
|
public BoolFeedback MuteFeedback
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
private set;
|
private set;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Not implemented
|
/// Not implemented
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void MuteOff()
|
public void MuteOff()
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "DM Endpoint {0} does not have a mute function", Key);
|
Debug.Console(2, this, "DM Endpoint {0} does not have a mute function", Key);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Not implemented
|
/// Not implemented
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void MuteOn()
|
public void MuteOn()
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "DM Endpoint {0} does not have a mute function", Key);
|
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
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
private set;
|
private set;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IBasicVolumeControls Members
|
#region IBasicVolumeControls Members
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Not implemented
|
/// Not implemented
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void MuteToggle()
|
public void MuteToggle()
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "DM Endpoint {0} does not have a mute function", Key);
|
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
|
||||||
|
}
|
||||||
public eHdcpCapabilityType DmInHdcpCapability
|
|
||||||
{
|
|
||||||
get { return eHdcpCapabilityType.Hdcp2_2Support; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetDmInHdcpState(eHdcpCapabilityType hdcpState)
|
|
||||||
{
|
|
||||||
if (_rmc == null) return;
|
|
||||||
_rmc.DmInput.HdcpCapability = hdcpState;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -33,8 +33,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
||||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut};
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut};
|
||||||
PreventRegistration = true;
|
|
||||||
rmc.Register();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
|||||||
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;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.DM
|
namespace PepperDash.Essentials.DM
|
||||||
{
|
{
|
||||||
@@ -16,7 +15,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[Description("Wrapper Class for DM-RMC-4K-SCALER-C-DSP")]
|
[Description("Wrapper Class for DM-RMC-4K-SCALER-C-DSP")]
|
||||||
public class DmRmc4kScalerCDspController : DmRmcControllerBase, IRoutingInputsOutputs, IBasicVolumeWithFeedback,
|
public class DmRmc4kScalerCDspController : DmRmcControllerBase, IRoutingInputsOutputs, IBasicVolumeWithFeedback,
|
||||||
IIROutputPorts, IComPorts, ICec, IRelayPorts, IHasDmInHdcp
|
IIROutputPorts, IComPorts, ICec, IRelayPorts
|
||||||
{
|
{
|
||||||
private readonly DmRmc4kScalerCDsp _rmc;
|
private readonly DmRmc4kScalerCDsp _rmc;
|
||||||
|
|
||||||
@@ -28,11 +27,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||||
|
|
||||||
public EndpointDmInputStreamWithCec DmInput { get; private set; }
|
|
||||||
|
|
||||||
public IntFeedback DmInHdcpStateFeedback { get; private set; }
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Make a Crestron RMC and put it in here
|
/// Make a Crestron RMC and put it in here
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -59,12 +53,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString());
|
VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString());
|
||||||
|
|
||||||
DmInHdcpStateFeedback = new IntFeedback("DmInHdcpCapability",
|
|
||||||
() => (int) _rmc.DmInput.HdcpCapabilityFeedback);
|
|
||||||
|
|
||||||
AddToFeedbackList(DmInHdcpStateFeedback);
|
|
||||||
|
|
||||||
|
|
||||||
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
||||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut, BalancedAudioOut};
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut, BalancedAudioOut};
|
||||||
|
|
||||||
@@ -203,17 +191,5 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public eHdcpCapabilityType DmInHdcpCapability
|
|
||||||
{
|
|
||||||
get { return eHdcpCapabilityType.Hdcp2_2Support; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetDmInHdcpState(eHdcpCapabilityType hdcpState)
|
|
||||||
{
|
|
||||||
if (_rmc == null) return;
|
|
||||||
_rmc.DmInput.HdcpCapability = hdcpState;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,13 +9,12 @@ using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
|||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
using PepperDash.Essentials.Core.Bridges;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash_Essentials_DM;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.DM
|
namespace PepperDash.Essentials.DM
|
||||||
{
|
{
|
||||||
[Description("Wrapper Class for DM-RMC-4K-Z-SCALER-C")]
|
[Description("Wrapper Class for DM-RMC-4K-Z-SCALER-C")]
|
||||||
public class DmRmc4kZScalerCController : DmRmcControllerBase, IRmcRoutingWithFeedback,
|
public class DmRmc4kZScalerCController : DmRmcControllerBase, IRmcRoutingWithFeedback,
|
||||||
IIROutputPorts, IComPorts, ICec, IRelayPorts, IHasDmInHdcp, IHasHdmiInHdcp
|
IIROutputPorts, IComPorts, ICec, IRelayPorts
|
||||||
{
|
{
|
||||||
private readonly DmRmc4kzScalerC _rmc;
|
private readonly DmRmc4kzScalerC _rmc;
|
||||||
|
|
||||||
@@ -23,13 +22,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
public RoutingInputPort HdmiIn { get; private set; }
|
public RoutingInputPort HdmiIn { get; private set; }
|
||||||
public RoutingOutputPort HdmiOut { get; private set; }
|
public RoutingOutputPort HdmiOut { get; private set; }
|
||||||
|
|
||||||
public IntFeedback DmInHdcpStateFeedback { get; private set; }
|
|
||||||
public IntFeedback HdmiInHdcpStateFeedback { get; private set; }
|
|
||||||
|
|
||||||
public BoolFeedback HdmiVideoSyncFeedback { 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>
|
||||||
@@ -52,11 +44,11 @@ namespace PepperDash.Essentials.DM
|
|||||||
if (newEvent != null) newEvent(this, e);
|
if (newEvent != null) newEvent(this, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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.AudioVideo,
|
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.DmCat, 0, this)
|
eRoutingPortConnectionType.DmCat, 0, this)
|
||||||
{
|
{
|
||||||
@@ -70,16 +62,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
eRoutingPortConnectionType.Hdmi, null, this);
|
||||||
|
|
||||||
HdmiInHdcpStateFeedback = new IntFeedback("HdmiInHdcpCapability",
|
|
||||||
() => (int)_rmc.HdmiIn.HdcpCapabilityFeedback);
|
|
||||||
DmInHdcpStateFeedback = new IntFeedback("DmInHdcpCapability",
|
|
||||||
() => (int)_rmc.DmInput.HdcpCapabilityFeedback);
|
|
||||||
HdmiVideoSyncFeedback = new BoolFeedback("HdmiInVideoSync",
|
|
||||||
() => _rmc.HdmiIn.SyncDetectedFeedback.BoolValue);
|
|
||||||
|
|
||||||
AddToFeedbackList(HdmiInHdcpStateFeedback, DmInHdcpStateFeedback, HdmiVideoSyncFeedback);
|
|
||||||
|
|
||||||
|
|
||||||
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);
|
||||||
@@ -87,13 +69,11 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString());
|
VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString());
|
||||||
|
|
||||||
InputPorts = new RoutingPortCollection<RoutingInputPort> { DmIn, HdmiIn };
|
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn, HdmiIn};
|
||||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort> { HdmiOut };
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut};
|
||||||
|
|
||||||
_rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
_rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
||||||
_rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
_rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
||||||
_rmc.HdmiIn.InputStreamChange += InputStreamChangeEvent;
|
|
||||||
_rmc.DmInput.InputStreamChange += InputStreamChangeEvent;
|
|
||||||
|
|
||||||
_rmc.OnlineStatusChange += _rmc_OnlineStatusChange;
|
_rmc.OnlineStatusChange += _rmc_OnlineStatusChange;
|
||||||
|
|
||||||
@@ -103,20 +83,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
AudioVideoSourceNumericFeedback = new IntFeedback(() => (ushort)(_rmc.SelectedSourceFeedback));
|
AudioVideoSourceNumericFeedback = new IntFeedback(() => (ushort)(_rmc.SelectedSourceFeedback));
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
|
||||||
{
|
|
||||||
switch (args.EventId)
|
|
||||||
{
|
|
||||||
case EndpointInputStreamEventIds.HdcpCapabilityFeedbackEventId:
|
|
||||||
if (inputStream == _rmc.HdmiIn) HdmiInHdcpStateFeedback.FireUpdate();
|
|
||||||
if (inputStream == _rmc.DmInput) DmInHdcpStateFeedback.FireUpdate();
|
|
||||||
break;
|
|
||||||
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
|
||||||
if (inputStream == _rmc.HdmiIn) HdmiVideoSyncFeedback.FireUpdate();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void _rmc_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args)
|
private void _rmc_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args)
|
||||||
{
|
{
|
||||||
AudioVideoSourceNumericFeedback.FireUpdate();
|
AudioVideoSourceNumericFeedback.FireUpdate();
|
||||||
@@ -215,31 +181,5 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
public eHdcpCapabilityType DmInHdcpCapability
|
|
||||||
{
|
|
||||||
get { return eHdcpCapabilityType.Hdcp2_2Support; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetDmInHdcpState(eHdcpCapabilityType hdcpState)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (_rmc == null) return;
|
|
||||||
_rmc.DmInput.HdcpCapability = hdcpState;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public eHdcpCapabilityType HdmiInHdcpCapability
|
|
||||||
{
|
|
||||||
get { return eHdcpCapabilityType.Hdcp2_2Support; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetHdmiInHdcpState(eHdcpCapabilityType hdcpState)
|
|
||||||
{
|
|
||||||
if (_rmc == null) return;
|
|
||||||
_rmc.HdmiIn.HdcpCapability = hdcpState;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using Crestron.SimplSharpPro.DM;
|
using Crestron.SimplSharpPro.DM;
|
||||||
using Crestron.SimplSharpPro.DM.Cards;
|
using Crestron.SimplSharpPro.DM.Cards;
|
||||||
@@ -12,12 +11,11 @@ using PepperDash.Essentials.Core.Bridges;
|
|||||||
using PepperDash.Essentials.Core.DeviceInfo;
|
using PepperDash.Essentials.Core.DeviceInfo;
|
||||||
using PepperDash.Essentials.DM.Config;
|
using PepperDash.Essentials.DM.Config;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash_Essentials_DM;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.DM
|
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, IDeviceInfoProvider
|
public abstract class DmRmcControllerBase : CrestronGenericBridgeableBaseDevice, IDeviceInfoProvider
|
||||||
{
|
{
|
||||||
private const int CtpPort = 41795;
|
private const int CtpPort = 41795;
|
||||||
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.
|
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.
|
||||||
@@ -29,11 +27,11 @@ namespace PepperDash.Essentials.DM
|
|||||||
public StringFeedback EdidSerialNumberFeedback { 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;
|
_rmc = device;
|
||||||
|
|
||||||
// if wired to a chassis, skip registration step in base class
|
// if wired to a chassis, skip registration step in base class
|
||||||
PreventRegistration = _rmc.DMOutput != null;
|
PreventRegistration = _rmc.DMOutput != null;
|
||||||
|
|
||||||
AddToFeedbackList(VideoOutputResolutionFeedback, EdidManufacturerFeedback, EdidSerialNumberFeedback, EdidNameFeedback, EdidPreferredTimingFeedback);
|
AddToFeedbackList(VideoOutputResolutionFeedback, EdidManufacturerFeedback, EdidSerialNumberFeedback, EdidNameFeedback, EdidPreferredTimingFeedback);
|
||||||
@@ -76,79 +74,18 @@ namespace PepperDash.Essentials.DM
|
|||||||
if (rmc.EdidSerialNumberFeedback != null)
|
if (rmc.EdidSerialNumberFeedback != null)
|
||||||
rmc.EdidSerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidSerialNumber.JoinNumber]);
|
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 IRoutingInputsOutputs;
|
var routing = rmc as IRmcRouting;
|
||||||
|
|
||||||
trilist.UShortInput[joinMap.HdcpInputPortCount.JoinNumber].UShortValue = (ushort)(routing == null
|
|
||||||
? 1
|
|
||||||
: routing.InputPorts.Count);
|
|
||||||
|
|
||||||
if (routing == null)
|
if (routing == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var hdcpCapability = eHdcpCapabilityType.HdcpSupportOff;
|
|
||||||
if (routing.InputPorts[DmPortName.HdmiIn] != null)
|
|
||||||
{
|
|
||||||
var hdmiInHdcp = routing as IHasHdmiInHdcp;
|
|
||||||
if (hdmiInHdcp != null)
|
|
||||||
{
|
|
||||||
if (rmc.Feedbacks["HdmiInHdcpCapability"] != null)
|
|
||||||
{
|
|
||||||
var intFeedback = rmc.Feedbacks["HdmiInHdcpCapability"] as IntFeedback;
|
|
||||||
if (intFeedback != null)
|
|
||||||
intFeedback.LinkInputSig(trilist.UShortInput[joinMap.Port1HdcpState.JoinNumber]);
|
|
||||||
}
|
|
||||||
if (rmc.Feedbacks["HdmiInVideoSync"] != null)
|
|
||||||
{
|
|
||||||
var boolFeedback = rmc.Feedbacks["HdmiInVideoSync"] as BoolFeedback;
|
|
||||||
if (boolFeedback != null)
|
|
||||||
boolFeedback.LinkInputSig(trilist.BooleanInput[joinMap.HdmiInputSync.JoinNumber]);
|
|
||||||
}
|
|
||||||
hdcpCapability = hdmiInHdcp.HdmiInHdcpCapability > hdcpCapability
|
|
||||||
? hdmiInHdcp.HdmiInHdcpCapability
|
|
||||||
: hdcpCapability;
|
|
||||||
|
|
||||||
trilist.SetUShortSigAction(joinMap.Port1HdcpState.JoinNumber, a => hdmiInHdcp.SetHdmiInHdcpState((eHdcpCapabilityType)a));
|
if (routing.AudioVideoSourceNumericFeedback != null)
|
||||||
}
|
routing.AudioVideoSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.AudioVideoSource.JoinNumber]);
|
||||||
}
|
|
||||||
if (routing.InputPorts[DmPortName.DmIn] != null)
|
|
||||||
{
|
|
||||||
var dmInHdcp = rmc as IHasDmInHdcp;
|
|
||||||
|
|
||||||
if (dmInHdcp != null)
|
trilist.SetUShortSigAction(joinMap.AudioVideoSource.JoinNumber, a => routing.ExecuteNumericSwitch(a, 1, eRoutingSignalType.AudioVideo));
|
||||||
{
|
|
||||||
if (rmc.Feedbacks["DmInHdcpCapability"] != null)
|
|
||||||
{
|
|
||||||
var intFeedback = rmc.Feedbacks["DmInHdcpCapability"] as IntFeedback;
|
|
||||||
if (intFeedback != null)
|
|
||||||
intFeedback.LinkInputSig(trilist.UShortInput[joinMap.Port2HdcpState.JoinNumber]);
|
|
||||||
}
|
|
||||||
|
|
||||||
hdcpCapability = dmInHdcp.DmInHdcpCapability > hdcpCapability
|
|
||||||
? dmInHdcp.DmInHdcpCapability
|
|
||||||
: hdcpCapability;
|
|
||||||
|
|
||||||
|
|
||||||
trilist.SetUShortSigAction(joinMap.Port2HdcpState.JoinNumber, a => dmInHdcp.SetDmInHdcpState((eHdcpCapabilityType)a));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber].UShortValue = (ushort)hdcpCapability;
|
|
||||||
|
|
||||||
trilist.UShortInput[joinMap.HdcpInputPortCount.JoinNumber].UShortValue = (ushort)routing.InputPorts.Count;
|
|
||||||
|
|
||||||
var routingWithFeedback = routing as IRmcRouting;
|
|
||||||
if (routingWithFeedback == null) return;
|
|
||||||
|
|
||||||
if (routingWithFeedback.AudioVideoSourceNumericFeedback != null)
|
|
||||||
routingWithFeedback.AudioVideoSourceNumericFeedback.LinkInputSig(
|
|
||||||
trilist.UShortInput[joinMap.AudioVideoSource.JoinNumber]);
|
|
||||||
|
|
||||||
|
|
||||||
trilist.SetUShortSigAction(joinMap.AudioVideoSource.JoinNumber,
|
|
||||||
a => routingWithFeedback.ExecuteNumericSwitch(a, 1, eRoutingSignalType.AudioVideo));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Implementation of IDeviceInfoProvider
|
#region Implementation of IDeviceInfoProvider
|
||||||
@@ -265,17 +202,17 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DmRmcHelper
|
public class DmRmcHelper
|
||||||
{
|
{
|
||||||
private static readonly Dictionary<string, Func<string, string, uint, CrestronGenericBaseDevice>> ProcessorFactoryDict;
|
private static readonly Dictionary<string, Func<string, string, uint, CrestronGenericBaseDevice>> ProcessorFactoryDict;
|
||||||
private static readonly Dictionary<string, Func<string, string, DMOutput, CrestronGenericBaseDevice>> ChassisCpu3Dict;
|
private static readonly Dictionary<string, Func<string, string, DMOutput, CrestronGenericBaseDevice>> ChassisCpu3Dict;
|
||||||
|
|
||||||
private static readonly Dictionary<string, Func<string, string, uint, DMOutput, CrestronGenericBaseDevice>>
|
private static readonly Dictionary<string, Func<string, string, uint, DMOutput, CrestronGenericBaseDevice>>
|
||||||
ChassisDict;
|
ChassisDict;
|
||||||
|
|
||||||
static DmRmcHelper()
|
static DmRmcHelper()
|
||||||
{
|
{
|
||||||
ProcessorFactoryDict = new Dictionary<string, Func<string, string, uint, CrestronGenericBaseDevice>>
|
ProcessorFactoryDict = new Dictionary<string, Func<string, string, uint, CrestronGenericBaseDevice>>
|
||||||
{
|
{
|
||||||
{"dmrmc100c", (k, n, i) => new DmRmcX100CController(k, n, new DmRmc100C(i, Global.ControlSystem))},
|
{"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))},
|
{"dmrmc100s", (k, n, i) => new DmRmc100SController(k, n, new DmRmc100S(i, Global.ControlSystem))},
|
||||||
@@ -369,34 +306,31 @@ namespace PepperDash.Essentials.DM
|
|||||||
{"dmrmc4k100c1g", (k,n,i,d) => new DmRmc4k100C1GController(k,n, new DmRmc4K100C1G(i, d))}
|
{"dmrmc4k100c1g", (k,n,i,d) => new DmRmc4k100C1GController(k,n, new DmRmc4K100C1G(i, d))}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A factory method for various DmRmcControllers
|
/// A factory method for various DmRmcControllers
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key">device key. Used to uniquely identify device</param>
|
/// <param name="key">device key. Used to uniquely identify device</param>
|
||||||
/// <param name="name">device name</param>
|
/// <param name="name">device name</param>
|
||||||
/// <param name="typeName">device type name. Used to retrived the correct device</param>
|
/// <param name="typeName">device type name. Used to retrived the correct device</param>
|
||||||
/// <param name="props">Config from config file</param>
|
/// <param name="props">Config from config file</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static CrestronGenericBaseDevice GetDmRmcController(string key, string name, string typeName, DmRmcPropertiesConfig props)
|
public static CrestronGenericBaseDevice GetDmRmcController(string key, string name, string typeName, DmRmcPropertiesConfig props)
|
||||||
{
|
{
|
||||||
typeName = typeName.ToLower();
|
typeName = typeName.ToLower();
|
||||||
var ipid = props.Control.IpIdInt;
|
var ipid = props.Control.IpIdInt;
|
||||||
|
|
||||||
var pKey = props.ParentDeviceKey.ToLower();
|
var pKey = props.ParentDeviceKey.ToLower();
|
||||||
|
|
||||||
// Non-DM-chassis endpoints
|
// Non-DM-chassis endpoints
|
||||||
return pKey == "processor" ? GetDmRmcControllerForProcessor(key, name, typeName, ipid) : GetDmRmcControllerForChassis(key, name, typeName, props, pKey, ipid);
|
return pKey == "processor" ? GetDmRmcControllerForProcessor(key, name, typeName, ipid) : GetDmRmcControllerForChassis(key, name, typeName, props, pKey, ipid);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static CrestronGenericBaseDevice GetDmRmcControllerForChassis(string key, string name, string typeName,
|
private static CrestronGenericBaseDevice GetDmRmcControllerForChassis(string key, string name, string typeName,
|
||||||
DmRmcPropertiesConfig props, string pKey, uint ipid)
|
DmRmcPropertiesConfig props, string pKey, uint ipid)
|
||||||
{
|
{
|
||||||
var parentDev = DeviceManager.GetDeviceForKey(pKey);
|
var parentDev = DeviceManager.GetDeviceForKey(pKey);
|
||||||
CrestronGenericBaseDevice rx;
|
if (parentDev is DmpsRoutingController)
|
||||||
bool useChassisForOfflineFeedback = false;
|
{
|
||||||
|
|
||||||
if (parentDev is DmpsRoutingController)
|
|
||||||
{
|
|
||||||
var dmps = parentDev as DmpsRoutingController;
|
var dmps = parentDev as DmpsRoutingController;
|
||||||
//Check that the input is within range of this chassis' possible inputs
|
//Check that the input is within range of this chassis' possible inputs
|
||||||
var num = props.ParentOutputNumber;
|
var num = props.ParentOutputNumber;
|
||||||
@@ -408,37 +342,26 @@ namespace PepperDash.Essentials.DM
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// Must use different constructor for DMPS4K types. No IPID
|
// Must use different constructor for DMPS4K types. No IPID
|
||||||
if (Global.ControlSystemIsDmps4kType)
|
if (Global.ControlSystemIsDmps4kType || typeName == "hdbasetrx" || typeName == "dmrmc4k100c1g")
|
||||||
{
|
{
|
||||||
rx = GetDmRmcControllerForDmps4k(key, name, typeName, dmps, props.ParentOutputNumber);
|
var rmc = GetDmRmcControllerForDmps4k(key, name, typeName, dmps, props.ParentOutputNumber);
|
||||||
useChassisForOfflineFeedback = true;
|
Debug.Console(0, "DM endpoint output {0} is for Dmps4k, changing online feedback to chassis", num);
|
||||||
}
|
rmc.IsOnline.SetValueFunc(() => dmps.OutputEndpointOnlineFeedbacks[num].BoolValue);
|
||||||
else
|
|
||||||
{
|
|
||||||
rx = GetDmRmcControllerForDmps(key, name, typeName, ipid, dmps, props.ParentOutputNumber);
|
|
||||||
if (typeName == "hdbasetrx" || typeName == "dmrmc4k100c1g")
|
|
||||||
{
|
|
||||||
useChassisForOfflineFeedback = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (useChassisForOfflineFeedback)
|
|
||||||
{
|
|
||||||
Debug.Console(0, "DM endpoint output {0} does not have direct online feedback, changing online feedback to chassis", num);
|
|
||||||
rx.IsOnline.SetValueFunc(() => dmps.OutputEndpointOnlineFeedbacks[num].BoolValue);
|
|
||||||
dmps.OutputEndpointOnlineFeedbacks[num].OutputChange += (o, a) =>
|
dmps.OutputEndpointOnlineFeedbacks[num].OutputChange += (o, a) =>
|
||||||
{
|
{
|
||||||
foreach (var feedback in rx.Feedbacks)
|
foreach (var feedback in rmc.Feedbacks)
|
||||||
{
|
{
|
||||||
if (feedback != null)
|
if (feedback != null)
|
||||||
feedback.FireUpdate();
|
feedback.FireUpdate();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
return rmc;
|
||||||
}
|
}
|
||||||
return rx;
|
return GetDmRmcControllerForDmps(key, name, typeName, ipid, dmps, props.ParentOutputNumber);
|
||||||
}
|
}
|
||||||
else if (parentDev is IDmSwitchWithEndpointOnlineFeedback)
|
else if (parentDev is DmChassisController)
|
||||||
{
|
{
|
||||||
var controller = parentDev as IDmSwitchWithEndpointOnlineFeedback;
|
var controller = parentDev as DmChassisController;
|
||||||
var chassis = controller.Chassis;
|
var chassis = controller.Chassis;
|
||||||
var num = props.ParentOutputNumber;
|
var num = props.ParentOutputNumber;
|
||||||
Debug.Console(1, "Creating DM Chassis device '{0}'. Output number '{1}'.", key, num);
|
Debug.Console(1, "Creating DM Chassis device '{0}'. Output number '{1}'.", key, num);
|
||||||
@@ -457,33 +380,23 @@ namespace PepperDash.Essentials.DM
|
|||||||
if (chassis is DmMd8x8Cpu3 || chassis is DmMd16x16Cpu3 ||
|
if (chassis is DmMd8x8Cpu3 || chassis is DmMd16x16Cpu3 ||
|
||||||
chassis is DmMd32x32Cpu3 || chassis is DmMd8x8Cpu3rps ||
|
chassis is DmMd32x32Cpu3 || chassis is DmMd8x8Cpu3rps ||
|
||||||
chassis is DmMd16x16Cpu3rps || chassis is DmMd32x32Cpu3rps ||
|
chassis is DmMd16x16Cpu3rps || chassis is DmMd32x32Cpu3rps ||
|
||||||
chassis is DmMd128x128 || chassis is DmMd64x64)
|
chassis is DmMd128x128 || chassis is DmMd64x64
|
||||||
|
|| typeName == "hdbasetrx" || typeName == "dmrmc4k100c1g")
|
||||||
{
|
{
|
||||||
rx = GetDmRmcControllerForCpu3Chassis(key, name, typeName, chassis, num, parentDev);
|
var rmc = GetDmRmcControllerForCpu3Chassis(key, name, typeName, chassis, num, parentDev);
|
||||||
useChassisForOfflineFeedback = true;
|
Debug.Console(0, "DM endpoint output {0} is for Cpu3, changing online feedback to chassis", num);
|
||||||
}
|
rmc.IsOnline.SetValueFunc(() => controller.OutputEndpointOnlineFeedbacks[num].BoolValue);
|
||||||
else
|
|
||||||
{
|
|
||||||
rx = GetDmRmcControllerForCpu2Chassis(key, name, typeName, ipid, chassis, num, parentDev);
|
|
||||||
if (typeName == "hdbasetrx" || typeName == "dmrmc4k100c1g")
|
|
||||||
{
|
|
||||||
useChassisForOfflineFeedback = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (useChassisForOfflineFeedback)
|
|
||||||
{
|
|
||||||
Debug.Console(0, "DM endpoint output {0} does not have direct online feedback, changing online feedback to chassis", num);
|
|
||||||
rx.IsOnline.SetValueFunc(() => controller.OutputEndpointOnlineFeedbacks[num].BoolValue);
|
|
||||||
controller.OutputEndpointOnlineFeedbacks[num].OutputChange += (o, a) =>
|
controller.OutputEndpointOnlineFeedbacks[num].OutputChange += (o, a) =>
|
||||||
{
|
|
||||||
foreach (var feedback in rx.Feedbacks)
|
|
||||||
{
|
{
|
||||||
if (feedback != null)
|
foreach (var feedback in rmc.Feedbacks)
|
||||||
feedback.FireUpdate();
|
{
|
||||||
}
|
if (feedback != null)
|
||||||
};
|
feedback.FireUpdate();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return rmc;
|
||||||
}
|
}
|
||||||
return rx;
|
return GetDmRmcControllerForCpu2Chassis(key, name, typeName, ipid, chassis, num, parentDev);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -497,31 +410,31 @@ namespace PepperDash.Essentials.DM
|
|||||||
key, pKey);
|
key, pKey);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static CrestronGenericBaseDevice GetDmRmcControllerForCpu2Chassis(string key, string name, string typeName,
|
private static CrestronGenericBaseDevice GetDmRmcControllerForCpu2Chassis(string key, string name, string typeName,
|
||||||
uint ipid, Switch chassis, uint num, IKeyed parentDev)
|
uint ipid, Switch chassis, uint num, IKeyed parentDev)
|
||||||
{
|
{
|
||||||
Func<string, string, uint, DMOutput, CrestronGenericBaseDevice> handler;
|
Func<string, string, uint, DMOutput, CrestronGenericBaseDevice> handler;
|
||||||
if (ChassisDict.TryGetValue(typeName.ToLower(), out handler))
|
if (ChassisDict.TryGetValue(typeName.ToLower(), out handler))
|
||||||
{
|
{
|
||||||
return handler(key, name, ipid, chassis.Outputs[num]);
|
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);
|
Debug.Console(0, "Cannot create DM-RMC of type '{0}' with parent device {1}", typeName, parentDev.Key);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static CrestronGenericBaseDevice GetDmRmcControllerForCpu3Chassis(string key, string name, string typeName,
|
private static CrestronGenericBaseDevice GetDmRmcControllerForCpu3Chassis(string key, string name, string typeName,
|
||||||
Switch chassis, uint num, IKeyed parentDev)
|
Switch chassis, uint num, IKeyed parentDev)
|
||||||
{
|
{
|
||||||
Func<string, string, DMOutput, CrestronGenericBaseDevice> cpu3Handler;
|
Func<string, string, DMOutput, CrestronGenericBaseDevice> cpu3Handler;
|
||||||
if (ChassisCpu3Dict.TryGetValue(typeName.ToLower(), out cpu3Handler))
|
if (ChassisCpu3Dict.TryGetValue(typeName.ToLower(), out cpu3Handler))
|
||||||
{
|
{
|
||||||
return cpu3Handler(key, name, chassis.Outputs[num]);
|
return cpu3Handler(key, name, chassis.Outputs[num]);
|
||||||
}
|
}
|
||||||
Debug.Console(0, "Cannot create DM-RMC of type '{0}' with parent device {1}", typeName, parentDev.Key);
|
Debug.Console(0, "Cannot create DM-RMC of type '{0}' with parent device {1}", typeName, parentDev.Key);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static CrestronGenericBaseDevice GetDmRmcControllerForDmps(string key, string name, string typeName,
|
private static CrestronGenericBaseDevice GetDmRmcControllerForDmps(string key, string name, string typeName,
|
||||||
uint ipid, DmpsRoutingController controller, uint num)
|
uint ipid, DmpsRoutingController controller, uint num)
|
||||||
@@ -545,49 +458,51 @@ namespace PepperDash.Essentials.DM
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static CrestronGenericBaseDevice GetDmRmcControllerForDmps4k(string key, string name, string typeName,
|
private static CrestronGenericBaseDevice GetDmRmcControllerForDmps4k(string key, string name, string typeName,
|
||||||
DmpsRoutingController controller, uint num)
|
DmpsRoutingController controller, uint num)
|
||||||
{
|
{
|
||||||
Func<string, string, DMOutput, CrestronGenericBaseDevice> dmps4kHandler;
|
Func<string, string, DMOutput, CrestronGenericBaseDevice> dmps4kHandler;
|
||||||
if (ChassisCpu3Dict.TryGetValue(typeName.ToLower(), out dmps4kHandler))
|
if (ChassisCpu3Dict.TryGetValue(typeName.ToLower(), out dmps4kHandler))
|
||||||
{
|
{
|
||||||
var output = controller.Dmps.SwitcherOutputs[num] as DMOutput;
|
var output = controller.Dmps.SwitcherOutputs[num] as DMOutput;
|
||||||
|
|
||||||
if (output != null)
|
if (output != null)
|
||||||
{
|
{
|
||||||
return dmps4kHandler(key, name, output);
|
return dmps4kHandler(key, name, output);
|
||||||
}
|
}
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Error,
|
Debug.Console(0, Debug.ErrorLogLevel.Error,
|
||||||
"Cannot attach DM-RMC of type '{0}' to output {1} on DMPS-4K chassis. Output is not a DM Output.",
|
"Cannot attach DM-RMC of type '{0}' to output {1} on DMPS-4K chassis. Output is not a DM Output.",
|
||||||
typeName, num);
|
typeName, num);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "Cannot create DM-RMC of type '{0}' to output {1} on DMPS-4K chassis", typeName, num);
|
Debug.Console(0, Debug.ErrorLogLevel.Error, "Cannot create DM-RMC of type '{0}' to output {1} on DMPS-4K chassis", typeName, num);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static CrestronGenericBaseDevice GetDmRmcControllerForProcessor(string key, string name, string typeName, uint ipid)
|
private static CrestronGenericBaseDevice GetDmRmcControllerForProcessor(string key, string name, string typeName, uint ipid)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Func<string, string, uint, CrestronGenericBaseDevice> handler;
|
Func<string, string, uint, CrestronGenericBaseDevice> handler;
|
||||||
|
|
||||||
if (ProcessorFactoryDict.TryGetValue(typeName.ToLower(), out handler))
|
if (ProcessorFactoryDict.TryGetValue(typeName.ToLower(), out handler))
|
||||||
{
|
{
|
||||||
return handler(key, name, ipid);
|
return handler(key, name, ipid);
|
||||||
}
|
}
|
||||||
Debug.Console(0, "Cannot create DM-RMC of type: '{0}'", typeName);
|
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;
|
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>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -78,8 +78,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
IsOnline.SetValueFunc(() => controller.InputEndpointOnlineFeedbacks[num].BoolValue);
|
IsOnline.SetValueFunc(() => controller.InputEndpointOnlineFeedbacks[num].BoolValue);
|
||||||
controller.InputEndpointOnlineFeedbacks[num].OutputChange += (o, a) => IsOnline.FireUpdate();
|
controller.InputEndpointOnlineFeedbacks[num].OutputChange += (o, a) => IsOnline.FireUpdate();
|
||||||
}
|
}
|
||||||
PreventRegistration = true;
|
|
||||||
tx.Register();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
|
|||||||
@@ -127,23 +127,28 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
Tx.OnlineStatusChange += Tx_OnlineStatusChange;
|
Tx.OnlineStatusChange += Tx_OnlineStatusChange;
|
||||||
|
|
||||||
VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback);
|
VideoSourceNumericFeedback = new IntFeedback(() => (int) Tx.VideoSourceFeedback);
|
||||||
|
|
||||||
AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.AudioSourceFeedback);
|
AudioSourceNumericFeedback = new IntFeedback(() => (int) Tx.AudioSourceFeedback);
|
||||||
|
|
||||||
HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability",
|
HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability",
|
||||||
() => (int)tx.HdmiInputs[1].HdcpCapabilityFeedback);
|
() => (int) tx.HdmiInputs[1].HdcpCapabilityFeedback);
|
||||||
|
|
||||||
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability",
|
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability",
|
||||||
() => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
() => (int) tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
||||||
|
|
||||||
|
HdcpStateFeedback =
|
||||||
|
new IntFeedback(
|
||||||
|
() =>
|
||||||
|
tx.HdmiInputs[1].HdcpCapabilityFeedback > tx.HdmiInputs[2].HdcpCapabilityFeedback
|
||||||
|
? (int) tx.HdmiInputs[1].HdcpCapabilityFeedback
|
||||||
|
: (int) tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
||||||
|
|
||||||
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
||||||
|
|
||||||
HdcpStateFeedback = new IntFeedback(() => (int)HdcpSupportCapability);
|
Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool) tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue);
|
||||||
|
|
||||||
Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue);
|
Hdmi2VideoSyncFeedback = new BoolFeedback(() => (bool) tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue);
|
||||||
|
|
||||||
Hdmi2VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue);
|
|
||||||
|
|
||||||
var combinedFuncs = new VideoStatusFuncsWrapper
|
var combinedFuncs = new VideoStatusFuncsWrapper
|
||||||
{
|
{
|
||||||
@@ -244,50 +249,50 @@ namespace PepperDash.Essentials.DM
|
|||||||
switch (input)
|
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(eVst.AllDisabled, null, type);
|
ExecuteSwitch(eVst.AllDisabled, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 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.AllDisabled, null, type);
|
ExecuteSwitch(eAst.AllDisabled, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,22 +17,22 @@ 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;
|
||||||
|
|
||||||
[Description("Wrapper class for DM-TX-4K-302-C")]
|
[Description("Wrapper class for DM-TX-4K-302-C")]
|
||||||
public class DmTx4k302CController : DmTxControllerBase, ITxRoutingWithFeedback, IHasFeedback,
|
public class DmTx4k302CController : DmTxControllerBase, ITxRoutingWithFeedback, IHasFeedback,
|
||||||
IIROutputPorts, IComPorts, IHasFreeRun, IVgaBrightnessContrastControls
|
IIROutputPorts, IComPorts, IHasFreeRun, IVgaBrightnessContrastControls
|
||||||
{
|
{
|
||||||
public DmTx4k302C Tx { get; private set; }
|
public DmTx4k302C 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 RoutingInputPortWithVideoStatuses VgaIn { get; private set; }
|
public RoutingInputPortWithVideoStatuses VgaIn { 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; }
|
||||||
@@ -60,78 +60,78 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Helps get the "real" inputs, including when in Auto
|
/// Helps get the "real" inputs, including when in Auto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType ActualActiveVideoInput
|
public Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType ActualActiveVideoInput
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (Tx.VideoSourceFeedback != eVst.Auto)
|
if (Tx.VideoSourceFeedback != eVst.Auto)
|
||||||
return Tx.VideoSourceFeedback;
|
return Tx.VideoSourceFeedback;
|
||||||
else // auto
|
else // auto
|
||||||
{
|
{
|
||||||
if (Tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
if (Tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
||||||
return eVst.Hdmi1;
|
return eVst.Hdmi1;
|
||||||
else if (Tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue)
|
else if (Tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue)
|
||||||
return eVst.Hdmi2;
|
return eVst.Hdmi2;
|
||||||
else if (Tx.VgaInput.SyncDetectedFeedback.BoolValue)
|
else if (Tx.VgaInput.SyncDetectedFeedback.BoolValue)
|
||||||
return eVst.Vga;
|
return eVst.Vga;
|
||||||
else
|
else
|
||||||
return eVst.AllDisabled;
|
return eVst.AllDisabled;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts
|
public RoutingPortCollection<RoutingInputPort> InputPorts
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return new RoutingPortCollection<RoutingInputPort>
|
return new RoutingPortCollection<RoutingInputPort>
|
||||||
{
|
{
|
||||||
HdmiIn1,
|
HdmiIn1,
|
||||||
HdmiIn2,
|
HdmiIn2,
|
||||||
VgaIn,
|
VgaIn,
|
||||||
AnyVideoInput
|
AnyVideoInput
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return new RoutingPortCollection<RoutingOutputPort> { DmOut, HdmiLoopOut };
|
return new RoutingPortCollection<RoutingOutputPort> { DmOut, HdmiLoopOut };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public DmTx4k302CController(string key, string name, DmTx4k302C tx, bool preventRegistration)
|
public DmTx4k302CController(string key, string name, DmTx4k302C tx, bool preventRegistration)
|
||||||
: base(key, name, tx)
|
: base(key, name, tx)
|
||||||
{
|
{
|
||||||
Tx = tx;
|
Tx = tx;
|
||||||
PreventRegistration = preventRegistration;
|
PreventRegistration = preventRegistration;
|
||||||
|
|
||||||
HdmiIn1 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn1,
|
HdmiIn1 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn1,
|
||||||
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this,
|
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this,
|
||||||
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[1]))
|
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[1]))
|
||||||
{
|
{
|
||||||
FeedbackMatchObject = eVst.Hdmi1
|
FeedbackMatchObject = eVst.Hdmi1
|
||||||
};
|
};
|
||||||
HdmiIn2 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn2,
|
HdmiIn2 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn2,
|
||||||
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi2, this,
|
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi2, this,
|
||||||
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[2]))
|
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[2]))
|
||||||
{
|
{
|
||||||
FeedbackMatchObject = eVst.Hdmi2
|
FeedbackMatchObject = eVst.Hdmi2
|
||||||
};
|
};
|
||||||
|
|
||||||
VgaIn = new RoutingInputPortWithVideoStatuses(DmPortName.VgaIn,
|
VgaIn = new RoutingInputPortWithVideoStatuses(DmPortName.VgaIn,
|
||||||
eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, eVst.Vga, this,
|
eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, eVst.Vga, this,
|
||||||
VideoStatusHelper.GetVgaInputStatusFuncs(tx.VgaInput))
|
VideoStatusHelper.GetVgaInputStatusFuncs(tx.VgaInput))
|
||||||
{
|
{
|
||||||
FeedbackMatchObject = eVst.Vga
|
FeedbackMatchObject = eVst.Vga
|
||||||
};
|
};
|
||||||
|
|
||||||
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
|
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
|
||||||
() => 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.VgaInput.InputStreamChange += VgaInputOnInputStreamChange;
|
||||||
Tx.BaseEvent += Tx_BaseEvent;
|
Tx.BaseEvent += Tx_BaseEvent;
|
||||||
@@ -145,9 +145,14 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
||||||
|
|
||||||
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
HdcpStateFeedback =
|
||||||
|
new IntFeedback(
|
||||||
|
() =>
|
||||||
|
tx.HdmiInputs[1].HdcpCapabilityFeedback > tx.HdmiInputs[2].HdcpCapabilityFeedback
|
||||||
|
? (int)tx.HdmiInputs[1].HdcpCapabilityFeedback
|
||||||
|
: (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
||||||
|
|
||||||
HdcpStateFeedback = new IntFeedback(() => (int)HdcpSupportCapability);
|
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
||||||
|
|
||||||
Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue);
|
Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue);
|
||||||
|
|
||||||
@@ -163,46 +168,46 @@ namespace PepperDash.Essentials.DM
|
|||||||
tx.VgaInput.VideoControls.ControlChange += new Crestron.SimplSharpPro.DeviceSupport.GenericEventHandler(VideoControls_ControlChange);
|
tx.VgaInput.VideoControls.ControlChange += new Crestron.SimplSharpPro.DeviceSupport.GenericEventHandler(VideoControls_ControlChange);
|
||||||
|
|
||||||
|
|
||||||
var combinedFuncs = new VideoStatusFuncsWrapper
|
var combinedFuncs = new VideoStatusFuncsWrapper
|
||||||
{
|
{
|
||||||
HdcpActiveFeedbackFunc = () =>
|
HdcpActiveFeedbackFunc = () =>
|
||||||
(ActualActiveVideoInput == eVst.Hdmi1
|
(ActualActiveVideoInput == eVst.Hdmi1
|
||||||
&& tx.HdmiInputs[1].VideoAttributes.HdcpActiveFeedback.BoolValue)
|
&& tx.HdmiInputs[1].VideoAttributes.HdcpActiveFeedback.BoolValue)
|
||||||
|| (ActualActiveVideoInput == eVst.Hdmi2
|
|| (ActualActiveVideoInput == eVst.Hdmi2
|
||||||
&& tx.HdmiInputs[2].VideoAttributes.HdcpActiveFeedback.BoolValue),
|
&& tx.HdmiInputs[2].VideoAttributes.HdcpActiveFeedback.BoolValue),
|
||||||
|
|
||||||
HdcpStateFeedbackFunc = () =>
|
HdcpStateFeedbackFunc = () =>
|
||||||
{
|
{
|
||||||
if (ActualActiveVideoInput == eVst.Hdmi1)
|
if (ActualActiveVideoInput == eVst.Hdmi1)
|
||||||
return tx.HdmiInputs[1].VideoAttributes.HdcpStateFeedback.ToString();
|
return tx.HdmiInputs[1].VideoAttributes.HdcpStateFeedback.ToString();
|
||||||
return ActualActiveVideoInput == eVst.Hdmi2 ? tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString() : "";
|
return ActualActiveVideoInput == eVst.Hdmi2 ? tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString() : "";
|
||||||
},
|
},
|
||||||
|
|
||||||
VideoResolutionFeedbackFunc = () =>
|
VideoResolutionFeedbackFunc = () =>
|
||||||
{
|
{
|
||||||
if (ActualActiveVideoInput == eVst.Hdmi1)
|
if (ActualActiveVideoInput == eVst.Hdmi1)
|
||||||
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();
|
||||||
return ActualActiveVideoInput == eVst.Vga ? tx.VgaInput.VideoAttributes.GetVideoResolutionString() : "";
|
return ActualActiveVideoInput == eVst.Vga ? tx.VgaInput.VideoAttributes.GetVideoResolutionString() : "";
|
||||||
},
|
},
|
||||||
VideoSyncFeedbackFunc = () =>
|
VideoSyncFeedbackFunc = () =>
|
||||||
(ActualActiveVideoInput == eVst.Hdmi1
|
(ActualActiveVideoInput == eVst.Hdmi1
|
||||||
&& tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
&& tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
||||||
|| (ActualActiveVideoInput == eVst.Hdmi2
|
|| (ActualActiveVideoInput == eVst.Hdmi2
|
||||||
&& tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue)
|
&& tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue)
|
||||||
|| (ActualActiveVideoInput == eVst.Vga
|
|| (ActualActiveVideoInput == eVst.Vga
|
||||||
&& tx.VgaInput.SyncDetectedFeedback.BoolValue)
|
&& tx.VgaInput.SyncDetectedFeedback.BoolValue)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
eRoutingPortConnectionType.DmCat, null, this);
|
eRoutingPortConnectionType.DmCat, null, this);
|
||||||
HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
eRoutingPortConnectionType.Hdmi, null, this);
|
||||||
|
|
||||||
|
|
||||||
AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,
|
AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,
|
||||||
@@ -216,7 +221,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
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)
|
void VgaInputOnInputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||||
{
|
{
|
||||||
@@ -249,21 +254,21 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public override bool CustomActivate()
|
public override bool CustomActivate()
|
||||||
{
|
{
|
||||||
// Link up all of these damned events to the various RoutingPorts via a helper handler
|
// 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].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn1, a.EventId);
|
||||||
Tx.HdmiInputs[1].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(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].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn2, a.EventId);
|
||||||
Tx.HdmiInputs[2].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn2, a.EventId);
|
Tx.HdmiInputs[2].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn2, a.EventId);
|
||||||
|
|
||||||
Tx.VgaInput.InputStreamChange += (o, a) => FowardInputStreamChange(VgaIn, a.EventId);
|
Tx.VgaInput.InputStreamChange += (o, a) => FowardInputStreamChange(VgaIn, a.EventId);
|
||||||
Tx.VgaInput.VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(VgaIn, a.EventId);
|
Tx.VgaInput.VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(VgaIn, a.EventId);
|
||||||
|
|
||||||
// Base does register and sets up comm monitoring.
|
// Base does register and sets up comm monitoring.
|
||||||
return base.CustomActivate();
|
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)
|
||||||
{
|
{
|
||||||
@@ -324,60 +329,60 @@ namespace PepperDash.Essentials.DM
|
|||||||
switch (input)
|
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;
|
break;
|
||||||
case 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;
|
break;
|
||||||
}
|
}
|
||||||
@@ -448,54 +453,54 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <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) return;
|
if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId) return;
|
||||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Relays the VideoAttributes change to a RoutingInputPort
|
/// Relays the VideoAttributes change to a RoutingInputPort
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void ForwardVideoAttributeChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
void ForwardVideoAttributeChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||||
{
|
{
|
||||||
//// LOCATION: Crestron.SimplSharpPro.DM.VideoAttributeEventIds
|
//// LOCATION: Crestron.SimplSharpPro.DM.VideoAttributeEventIds
|
||||||
//Debug.Console(2, this, "VideoAttributes_AttributeChange event id={0} from {1}",
|
//Debug.Console(2, this, "VideoAttributes_AttributeChange event id={0} from {1}",
|
||||||
// args.EventId, (sender as VideoAttributesEnhanced).Owner.GetType());
|
// args.EventId, (sender as VideoAttributesEnhanced).Owner.GetType());
|
||||||
switch (eventId)
|
switch (eventId)
|
||||||
{
|
{
|
||||||
case VideoAttributeEventIds.HdcpActiveFeedbackEventId:
|
case VideoAttributeEventIds.HdcpActiveFeedbackEventId:
|
||||||
inputPort.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
inputPort.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
||||||
AnyVideoInput.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
AnyVideoInput.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
case VideoAttributeEventIds.HdcpStateFeedbackEventId:
|
case VideoAttributeEventIds.HdcpStateFeedbackEventId:
|
||||||
inputPort.VideoStatus.HdcpStateFeedback.FireUpdate();
|
inputPort.VideoStatus.HdcpStateFeedback.FireUpdate();
|
||||||
AnyVideoInput.VideoStatus.HdcpStateFeedback.FireUpdate();
|
AnyVideoInput.VideoStatus.HdcpStateFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
case VideoAttributeEventIds.HorizontalResolutionFeedbackEventId:
|
case VideoAttributeEventIds.HorizontalResolutionFeedbackEventId:
|
||||||
case VideoAttributeEventIds.VerticalResolutionFeedbackEventId:
|
case VideoAttributeEventIds.VerticalResolutionFeedbackEventId:
|
||||||
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||||
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
case VideoAttributeEventIds.FramesPerSecondFeedbackEventId:
|
case VideoAttributeEventIds.FramesPerSecondFeedbackEventId:
|
||||||
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||||
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#region IIROutputPorts Members
|
#region IIROutputPorts Members
|
||||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return Tx.IROutputPorts; } }
|
public CrestronCollection<IROutputPort> IROutputPorts { get { return Tx.IROutputPorts; } }
|
||||||
public int NumberOfIROutputPorts { get { return Tx.NumberOfIROutputPorts; } }
|
public int NumberOfIROutputPorts { get { return Tx.NumberOfIROutputPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IComPorts Members
|
#region IComPorts Members
|
||||||
public CrestronCollection<ComPort> ComPorts { get { return Tx.ComPorts; } }
|
public CrestronCollection<ComPort> ComPorts { get { return Tx.ComPorts; } }
|
||||||
public int NumberOfComPorts { get { return Tx.NumberOfComPorts; } }
|
public int NumberOfComPorts { get { return Tx.NumberOfComPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -72,7 +72,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
HdmiIn.Port = Tx;
|
HdmiIn.Port = Tx;
|
||||||
|
|
||||||
PreventRegistration = true;
|
PreventRegistration = true;
|
||||||
tx.Register();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
|
|
||||||
[Description("Wrapper class for DM-TX-4K-Z-302-C")]
|
[Description("Wrapper class for DM-TX-4K-Z-302-C")]
|
||||||
public class DmTx4kz302CController : DmTxControllerBase, ITxRoutingWithFeedback,
|
public class DmTx4kz302CController : DmTxControllerBase, ITxRoutingWithFeedback, IHasFeedback,
|
||||||
IIROutputPorts, IComPorts
|
IIROutputPorts, IComPorts
|
||||||
{
|
{
|
||||||
public DmTx4kz302C Tx { get; private set; }
|
public DmTx4kz302C Tx { get; private set; }
|
||||||
@@ -34,7 +34,6 @@ 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 IntFeedback DisplayPortInHdcpCapabilityFeedback { get; protected set; }
|
|
||||||
public BoolFeedback Hdmi1VideoSyncFeedback { get; protected set; }
|
public BoolFeedback Hdmi1VideoSyncFeedback { get; protected set; }
|
||||||
public BoolFeedback Hdmi2VideoSyncFeedback { get; protected set; }
|
public BoolFeedback Hdmi2VideoSyncFeedback { get; protected set; }
|
||||||
public BoolFeedback DisplayPortVideoSyncFeedback { get; protected set; }
|
public BoolFeedback DisplayPortVideoSyncFeedback { get; protected set; }
|
||||||
@@ -121,7 +120,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
Tx.HdmiInputs[1].InputStreamChange += InputStreamChangeEvent;
|
Tx.HdmiInputs[1].InputStreamChange += InputStreamChangeEvent;
|
||||||
Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent;
|
Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent;
|
||||||
Tx.DisplayPortInput.InputStreamChange += InputStreamChangeEvent;
|
Tx.DisplayPortInput.InputStreamChange += DisplayPortInputStreamChange;
|
||||||
Tx.BaseEvent += Tx_BaseEvent;
|
Tx.BaseEvent += Tx_BaseEvent;
|
||||||
Tx.OnlineStatusChange += Tx_OnlineStatusChange;
|
Tx.OnlineStatusChange += Tx_OnlineStatusChange;
|
||||||
|
|
||||||
@@ -131,32 +130,15 @@ namespace PepperDash.Essentials.DM
|
|||||||
HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability", () => (int)tx.HdmiInputs[1].HdcpCapabilityFeedback);
|
HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability", () => (int)tx.HdmiInputs[1].HdcpCapabilityFeedback);
|
||||||
|
|
||||||
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
||||||
DisplayPortInHdcpCapabilityFeedback = new IntFeedback("DisplayPortInHdcpCapability",
|
|
||||||
() => (int)tx.DisplayPortInput.HdcpCapabilityFeedback);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
HdcpStateFeedback =
|
HdcpStateFeedback =
|
||||||
new IntFeedback(
|
new IntFeedback(
|
||||||
() =>
|
() =>
|
||||||
tx.HdmiInputs[1].HdcpCapabilityFeedback > tx.HdmiInputs[2].HdcpCapabilityFeedback
|
tx.HdmiInputs[1].HdcpCapabilityFeedback > tx.HdmiInputs[2].HdcpCapabilityFeedback
|
||||||
? (int)tx.HdmiInputs[1].HdcpCapabilityFeedback
|
? (int)tx.HdmiInputs[1].HdcpCapabilityFeedback
|
||||||
: (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
: (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
||||||
*/
|
|
||||||
|
|
||||||
//yeah this is gross - but it's the quickest way to do this...
|
|
||||||
/*
|
|
||||||
HdcpStateFeedback = new IntFeedback(() => {
|
|
||||||
var states = new[] {(int) tx.DisplayPortInput.HdcpCapabilityFeedback, (int) tx.HdmiInputs[1].HdcpCapabilityFeedback, (int) tx.HdmiInputs[2].HdcpCapabilityFeedback};
|
|
||||||
|
|
||||||
return states.Max();
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
|
|
||||||
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
||||||
// I feel like we have had this as a misnomer for so long, that it really needed to be fixed
|
|
||||||
// All we were doing was reporting the best of the current statuses - not the actual capability of the device.
|
|
||||||
HdcpStateFeedback = new IntFeedback(() => (int)HdcpSupportCapability);
|
|
||||||
|
|
||||||
Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue);
|
Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue);
|
||||||
|
|
||||||
@@ -164,25 +146,20 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
DisplayPortVideoSyncFeedback = new BoolFeedback(() => (bool)tx.DisplayPortInput.SyncDetectedFeedback.BoolValue);
|
DisplayPortVideoSyncFeedback = new BoolFeedback(() => (bool)tx.DisplayPortInput.SyncDetectedFeedback.BoolValue);
|
||||||
|
|
||||||
|
|
||||||
var combinedFuncs = new VideoStatusFuncsWrapper
|
var combinedFuncs = new VideoStatusFuncsWrapper
|
||||||
{
|
{
|
||||||
HdcpActiveFeedbackFunc = () =>
|
HdcpActiveFeedbackFunc = () =>
|
||||||
(ActualActiveVideoInput == eVst.Hdmi1
|
(ActualActiveVideoInput == eVst.Hdmi1
|
||||||
&& tx.HdmiInputs[1].VideoAttributes.HdcpActiveFeedback.BoolValue)
|
&& tx.HdmiInputs[1].VideoAttributes.HdcpActiveFeedback.BoolValue)
|
||||||
|| (ActualActiveVideoInput == eVst.Hdmi2
|
|| (ActualActiveVideoInput == eVst.Hdmi2
|
||||||
&& tx.HdmiInputs[2].VideoAttributes.HdcpActiveFeedback.BoolValue)
|
&& tx.HdmiInputs[2].VideoAttributes.HdcpActiveFeedback.BoolValue),
|
||||||
|| (ActualActiveVideoInput == eVst.DisplayPort
|
|
||||||
&& tx.DisplayPortInput.VideoAttributes.HdcpActiveFeedback.BoolValue),
|
|
||||||
|
|
||||||
HdcpStateFeedbackFunc = () =>
|
HdcpStateFeedbackFunc = () =>
|
||||||
{
|
{
|
||||||
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 ActualActiveVideoInput == eVst.DisplayPort
|
|
||||||
? tx.DisplayPortInput.VideoAttributes.HdcpStateFeedback.ToString()
|
|
||||||
: "";
|
|
||||||
},
|
},
|
||||||
|
|
||||||
VideoResolutionFeedbackFunc = () =>
|
VideoResolutionFeedbackFunc = () =>
|
||||||
@@ -191,8 +168,6 @@ 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.DisplayPort)
|
|
||||||
return tx.DisplayPortInput.VideoAttributes.GetVideoResolutionString();
|
|
||||||
return ActualActiveVideoInput == eVst.Vga ? tx.DisplayPortInput.VideoAttributes.GetVideoResolutionString() : "";
|
return ActualActiveVideoInput == eVst.Vga ? tx.DisplayPortInput.VideoAttributes.GetVideoResolutionString() : "";
|
||||||
},
|
},
|
||||||
VideoSyncFeedbackFunc = () =>
|
VideoSyncFeedbackFunc = () =>
|
||||||
@@ -200,8 +175,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
&& tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
&& tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
||||||
|| (ActualActiveVideoInput == eVst.Hdmi2
|
|| (ActualActiveVideoInput == eVst.Hdmi2
|
||||||
&& tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue)
|
&& tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue)
|
||||||
|| (ActualActiveVideoInput == eVst.DisplayPort
|
|
||||||
&& tx.DisplayPortInput.SyncDetectedFeedback.BoolValue)
|
|
||||||
|| (ActualActiveVideoInput == eVst.Vga
|
|| (ActualActiveVideoInput == eVst.Vga
|
||||||
&& tx.DisplayPortInput.SyncDetectedFeedback.BoolValue)
|
&& tx.DisplayPortInput.SyncDetectedFeedback.BoolValue)
|
||||||
|
|
||||||
@@ -220,15 +193,28 @@ namespace PepperDash.Essentials.DM
|
|||||||
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, DisplayPortVideoSyncFeedback, DisplayPortInHdcpCapabilityFeedback);
|
Hdmi1VideoSyncFeedback, Hdmi2VideoSyncFeedback, DisplayPortVideoSyncFeedback);
|
||||||
|
|
||||||
|
// Set Ports for CEC
|
||||||
HdmiIn1.Port = Tx.HdmiInputs[1];
|
HdmiIn1.Port = Tx.HdmiInputs[1];
|
||||||
HdmiIn2.Port = Tx.HdmiInputs[2];
|
HdmiIn2.Port = Tx.HdmiInputs[2];
|
||||||
DisplayPortIn.Port = Tx.DisplayPortInput;
|
|
||||||
HdmiLoopOut.Port = Tx.HdmiOutput;
|
HdmiLoopOut.Port = Tx.HdmiOutput;
|
||||||
DmOut.Port = Tx.DmOutput;
|
DmOut.Port = Tx.DmOutput;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DisplayPortInputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||||
|
{
|
||||||
|
Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
||||||
|
|
||||||
|
switch (args.EventId)
|
||||||
|
{
|
||||||
|
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||||
|
DisplayPortVideoSyncFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public override bool CustomActivate()
|
public override bool CustomActivate()
|
||||||
{
|
{
|
||||||
@@ -270,40 +256,40 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
|
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
|
||||||
|
|
||||||
switch (input)
|
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(DisplayPortIn.Selector, null, type);
|
ExecuteSwitch(DisplayPortIn.Selector, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eVst.AllDisabled, null, type);
|
ExecuteSwitch(eVst.AllDisabled, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "Unable to execute numeric switch to input {0}", input);
|
Debug.Console(2, this, "Unable to execute numeric switch to input {0}", input);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -340,17 +326,11 @@ namespace PepperDash.Essentials.DM
|
|||||||
case EndpointInputStreamEventIds.HdcpCapabilityFeedbackEventId:
|
case EndpointInputStreamEventIds.HdcpCapabilityFeedbackEventId:
|
||||||
if (inputStream == Tx.HdmiInputs[1]) HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
if (inputStream == Tx.HdmiInputs[1]) HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
||||||
if (inputStream == Tx.HdmiInputs[2]) HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
if (inputStream == Tx.HdmiInputs[2]) HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
||||||
if (inputStream == Tx.DisplayPortInput) DisplayPortInHdcpCapabilityFeedback.FireUpdate();
|
|
||||||
|
|
||||||
Debug.Console(2, this, "DisplayPortHDCP Mode Trigger = {0}",
|
|
||||||
DisplayPortInHdcpCapabilityFeedback.IntValue);
|
|
||||||
|
|
||||||
HdcpStateFeedback.FireUpdate();
|
HdcpStateFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||||
if (inputStream == Tx.HdmiInputs[1]) Hdmi1VideoSyncFeedback.FireUpdate();
|
if (inputStream == Tx.HdmiInputs[1]) Hdmi1VideoSyncFeedback.FireUpdate();
|
||||||
if (inputStream == Tx.HdmiInputs[2]) Hdmi2VideoSyncFeedback.FireUpdate();
|
if (inputStream == Tx.HdmiInputs[2]) Hdmi2VideoSyncFeedback.FireUpdate();
|
||||||
if (inputStream == Tx.DisplayPortInput) DisplayPortVideoSyncFeedback.FireUpdate();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -433,6 +413,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#region IIROutputPorts Members
|
#region IIROutputPorts Members
|
||||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return Tx.IROutputPorts; } }
|
public CrestronCollection<IROutputPort> IROutputPorts { get { return Tx.IROutputPorts; } }
|
||||||
public int NumberOfIROutputPorts { get { return Tx.NumberOfIROutputPorts; } }
|
public int NumberOfIROutputPorts { get { return Tx.NumberOfIROutputPorts; } }
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
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;
|
||||||
@@ -16,8 +18,8 @@ using PepperDash.Essentials.Core.Config;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.DM
|
namespace PepperDash.Essentials.DM
|
||||||
{
|
{
|
||||||
public class DmTxHelper
|
public class DmTxHelper
|
||||||
{
|
{
|
||||||
|
|
||||||
public static BasicDmTxControllerBase GetDmTxForChassisWithoutIpId(string key, string name, string typeName, DMInput dmInput)
|
public static BasicDmTxControllerBase GetDmTxForChassisWithoutIpId(string key, string name, string typeName, DMInput dmInput)
|
||||||
{
|
{
|
||||||
@@ -42,7 +44,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
if (typeName.StartsWith("dmtx401"))
|
if (typeName.StartsWith("dmtx401"))
|
||||||
return new DmTx401CController(key, name, new DmTx401C(dmInput), true);
|
return new DmTx401CController(key, name, new DmTx401C(dmInput), true);
|
||||||
if (typeName.StartsWith("hdbasettx"))
|
if (typeName.StartsWith("hdbasettx"))
|
||||||
return new HDBaseTTxController(key, name, new HDTx3CB(dmInput));
|
new HDBaseTTxController(key, name, new HDTx3CB(dmInput));
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -75,32 +77,31 @@ namespace PepperDash.Essentials.DM
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A factory method for various DmTxControllers
|
/// A factory method for various DmTxControllers
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
/// <param name="key"></param>
|
||||||
/// <param name="name"></param>
|
/// <param name="name"></param>
|
||||||
/// <param name="props"></param>
|
/// <param name="props"></param>
|
||||||
/// <param name="typeName"></param>
|
/// <returns></returns>
|
||||||
/// <returns></returns>
|
|
||||||
public static BasicDmTxControllerBase 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...
|
||||||
|
|
||||||
typeName = typeName.ToLower();
|
typeName = typeName.ToLower();
|
||||||
//uint ipid = Convert.ToUInt16(props.Id, 16);
|
//uint ipid = Convert.ToUInt16(props.Id, 16);
|
||||||
var ipid = props.Control.IpIdInt;
|
var ipid = props.Control.IpIdInt;
|
||||||
var pKey = props.ParentDeviceKey.ToLower();
|
var pKey = props.ParentDeviceKey.ToLower();
|
||||||
|
|
||||||
if (pKey == "processor")
|
if (pKey == "processor")
|
||||||
{
|
{
|
||||||
// Catch constructor failures, mainly dues to IPID
|
// Catch constructor failures, mainly dues to IPID
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (typeName.StartsWith("dmtx200"))
|
if(typeName.StartsWith("dmtx200"))
|
||||||
return new DmTx200Controller(key, name, new DmTx200C2G(ipid, Global.ControlSystem), false);
|
return new DmTx200Controller(key, name, new DmTx200C2G(ipid, Global.ControlSystem), false);
|
||||||
if (typeName.StartsWith("dmtx201c"))
|
if (typeName.StartsWith("dmtx201c"))
|
||||||
return new DmTx201CController(key, name, new DmTx201C(ipid, Global.ControlSystem), false);
|
return new DmTx201CController(key, name, new DmTx201C(ipid, Global.ControlSystem), false);
|
||||||
if (typeName.StartsWith("dmtx201s"))
|
if (typeName.StartsWith("dmtx201s"))
|
||||||
return new DmTx201SController(key, name, new DmTx201S(ipid, Global.ControlSystem), false);
|
return new DmTx201SController(key, name, new DmTx201S(ipid, Global.ControlSystem), false);
|
||||||
if (typeName.StartsWith("dmtx4k202"))
|
if (typeName.StartsWith("dmtx4k202"))
|
||||||
@@ -111,36 +112,35 @@ namespace PepperDash.Essentials.DM
|
|||||||
return new DmTx4k302CController(key, name, new DmTx4k302C(ipid, Global.ControlSystem), false);
|
return new DmTx4k302CController(key, name, new DmTx4k302C(ipid, Global.ControlSystem), false);
|
||||||
if (typeName.StartsWith("dmtx4kz302"))
|
if (typeName.StartsWith("dmtx4kz302"))
|
||||||
return new DmTx4kz302CController(key, name, new DmTx4kz302C(ipid, Global.ControlSystem), false);
|
return new DmTx4kz302CController(key, name, new DmTx4kz302C(ipid, Global.ControlSystem), false);
|
||||||
if (typeName.StartsWith("dmtx401"))
|
if (typeName.StartsWith("dmtx401"))
|
||||||
return new DmTx401CController(key, name, new DmTx401C(ipid, Global.ControlSystem), false);
|
return new DmTx401CController(key, name, new DmTx401C(ipid, Global.ControlSystem), false);
|
||||||
Debug.Console(0, "{1} WARNING: Cannot create DM-TX of type: '{0}'", typeName, key);
|
Debug.Console(0, "{1} WARNING: Cannot create DM-TX of type: '{0}'", typeName, key);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(0, "[{0}] WARNING: Cannot create DM-TX device: {1}", key, e);
|
Debug.Console(0, "[{0}] WARNING: Cannot create DM-TX device: {1}", key, e);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var parentDev = DeviceManager.GetDeviceForKey(pKey);
|
var parentDev = DeviceManager.GetDeviceForKey(pKey);
|
||||||
DMInput dmInput;
|
DMInput dmInput;
|
||||||
BasicDmTxControllerBase tx;
|
BasicDmTxControllerBase tx;
|
||||||
bool useChassisForOfflineFeedback = false;
|
|
||||||
|
|
||||||
if (parentDev is IDmSwitchWithEndpointOnlineFeedback)
|
if (parentDev is DmChassisController)
|
||||||
{
|
{
|
||||||
// Get the Crestron chassis and link stuff up
|
// Get the Crestron chassis and link stuff up
|
||||||
var switchDev = (parentDev as IDmSwitchWithEndpointOnlineFeedback);
|
var switchDev = (parentDev as DmChassisController);
|
||||||
var chassis = switchDev.Chassis;
|
var chassis = switchDev.Chassis;
|
||||||
|
|
||||||
//Check that the input is within range of this chassis' possible inputs
|
//Check that the input is within range of this chassis' possible inputs
|
||||||
var num = props.ParentInputNumber;
|
var num = props.ParentInputNumber;
|
||||||
if (num <= 0 || num > chassis.NumberOfInputs)
|
if (num <= 0 || num > chassis.NumberOfInputs)
|
||||||
{
|
{
|
||||||
Debug.Console(0, "Cannot create DM device '{0}'. Input number '{1}' is out of range",
|
Debug.Console(0, "Cannot create DM device '{0}'. Input number '{1}' is out of range",
|
||||||
key, num);
|
key, num);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
switchDev.TxDictionary.Add(num, key);
|
switchDev.TxDictionary.Add(num, key);
|
||||||
dmInput = chassis.Inputs[num];
|
dmInput = chassis.Inputs[num];
|
||||||
@@ -155,23 +155,15 @@ namespace PepperDash.Essentials.DM
|
|||||||
chassis is DmMd128x128 || chassis is DmMd64x64)
|
chassis is DmMd128x128 || chassis is DmMd64x64)
|
||||||
{
|
{
|
||||||
tx = GetDmTxForChassisWithoutIpId(key, name, typeName, dmInput);
|
tx = GetDmTxForChassisWithoutIpId(key, name, typeName, dmInput);
|
||||||
useChassisForOfflineFeedback = true;
|
Debug.Console(0, "DM endpoint output {0} is for Cpu3, changing online feedback to chassis", num);
|
||||||
|
tx.IsOnline.SetValueFunc(() => switchDev.InputEndpointOnlineFeedbacks[num].BoolValue);
|
||||||
|
switchDev.InputEndpointOnlineFeedbacks[num].OutputChange += (o, a) => tx.IsOnline.FireUpdate();
|
||||||
|
return tx;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tx = GetDmTxForChassisWithIpId(key, name, typeName, ipid, dmInput);
|
return GetDmTxForChassisWithIpId(key, name, typeName, ipid, dmInput);
|
||||||
if (typeName == "hdbasettx" || typeName == "dmtx4k100c1g")
|
|
||||||
{
|
|
||||||
useChassisForOfflineFeedback = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (useChassisForOfflineFeedback)
|
|
||||||
{
|
|
||||||
Debug.Console(0, "DM endpoint output {0} does not have direct online feedback, changing online feedback to chassis", num);
|
|
||||||
tx.IsOnline.SetValueFunc(() => switchDev.InputEndpointOnlineFeedbacks[num].BoolValue);
|
|
||||||
switchDev.InputEndpointOnlineFeedbacks[num].OutputChange += (o, a) => tx.IsOnline.FireUpdate();
|
|
||||||
}
|
|
||||||
return tx;
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -179,8 +171,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(parentDev is DmpsRoutingController)
|
||||||
if (parentDev is DmpsRoutingController)
|
|
||||||
{
|
{
|
||||||
// Get the DMPS chassis and link stuff up
|
// Get the DMPS chassis and link stuff up
|
||||||
var dmpsDev = (parentDev as DmpsRoutingController);
|
var dmpsDev = (parentDev as DmpsRoutingController);
|
||||||
@@ -209,26 +200,18 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (Global.ControlSystemIsDmps4kType)
|
if(Global.ControlSystemIsDmps4kType)
|
||||||
{
|
{
|
||||||
tx = GetDmTxForChassisWithoutIpId(key, name, typeName, dmInput);
|
tx = GetDmTxForChassisWithoutIpId(key, name, typeName, dmInput);
|
||||||
useChassisForOfflineFeedback = true;
|
Debug.Console(0, "DM endpoint output {0} is for DMPS3-4K, changing online feedback to chassis", num);
|
||||||
|
tx.IsOnline.SetValueFunc(() => dmpsDev.InputEndpointOnlineFeedbacks[num].BoolValue);
|
||||||
|
dmpsDev.InputEndpointOnlineFeedbacks[num].OutputChange += (o, a) => tx.IsOnline.FireUpdate();
|
||||||
|
return tx;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tx = GetDmTxForChassisWithIpId(key, name, typeName, ipid, dmInput);
|
return GetDmTxForChassisWithIpId(key, name, typeName, ipid, dmInput);
|
||||||
if (typeName == "hdbasettx" || typeName == "dmtx4k100c1g")
|
|
||||||
{
|
|
||||||
useChassisForOfflineFeedback = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (useChassisForOfflineFeedback)
|
|
||||||
{
|
|
||||||
Debug.Console(0, "DM endpoint output {0} does not have direct online feedback, changing online feedback to chassis", num);
|
|
||||||
tx.IsOnline.SetValueFunc(() => dmpsDev.InputEndpointOnlineFeedbacks[num].BoolValue);
|
|
||||||
dmpsDev.InputEndpointOnlineFeedbacks[num].OutputChange += (o, a) => tx.IsOnline.FireUpdate();
|
|
||||||
}
|
|
||||||
return tx;
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -237,10 +220,13 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Console(0, "Cannot create DM device '{0}'. '{1}' is not a processor, DM Chassis or DMPS.", key, pKey);
|
else
|
||||||
return null;
|
{
|
||||||
}
|
Debug.Console(0, "Cannot create DM device '{0}'. '{1}' is not a processor, DM Chassis or DMPS.", key, pKey);
|
||||||
}
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public abstract class BasicDmTxControllerBase : CrestronGenericBridgeableBaseDevice
|
public abstract class BasicDmTxControllerBase : CrestronGenericBridgeableBaseDevice
|
||||||
{
|
{
|
||||||
@@ -251,21 +237,21 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Description("Wrapper class for all DM-TX variants")]
|
[Description("Wrapper class for all DM-TX variants")]
|
||||||
public abstract class DmTxControllerBase : BasicDmTxControllerBase
|
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; }
|
||||||
public abstract StringFeedback ActiveVideoInputFeedback { get; protected set; }
|
public abstract StringFeedback ActiveVideoInputFeedback { get; protected set; }
|
||||||
public RoutingInputPortWithVideoStatuses AnyVideoInput { get; protected set; }
|
public RoutingInputPortWithVideoStatuses AnyVideoInput { get; protected set; }
|
||||||
public IntFeedback HdcpStateFeedback { get; protected set; }
|
public IntFeedback HdcpStateFeedback { get; protected set; }
|
||||||
|
|
||||||
protected DmTxControllerBase(string key, string name, EndpointTransmitterBase hardware)
|
protected DmTxControllerBase(string key, string name, EndpointTransmitterBase hardware)
|
||||||
: base(key, name, hardware)
|
: base(key, name, hardware)
|
||||||
{
|
{
|
||||||
AddToFeedbackList(ActiveVideoInputFeedback);
|
AddToFeedbackList(ActiveVideoInputFeedback);
|
||||||
|
|
||||||
IsOnline.OutputChange += (currentDevice, args) =>
|
IsOnline.OutputChange += (currentDevice, args) =>
|
||||||
@@ -276,12 +262,11 @@ namespace PepperDash.Essentials.DM
|
|||||||
feedback.FireUpdate();
|
feedback.FireUpdate();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected DmTxControllerBase(string key, string name, DmHDBasedTEndPoint hardware)
|
protected DmTxControllerBase(string key, string name, DmHDBasedTEndPoint hardware) : base(key, name, hardware)
|
||||||
: base(key, name, hardware)
|
{
|
||||||
{
|
}
|
||||||
}
|
|
||||||
|
|
||||||
protected DmTxControllerJoinMap GetDmTxJoinMap(uint joinStart, string joinMapKey)
|
protected DmTxControllerJoinMap GetDmTxJoinMap(uint joinStart, string joinMapKey)
|
||||||
{
|
{
|
||||||
@@ -295,8 +280,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
return joinMap;
|
return joinMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void LinkDmTxToApi(DmTxControllerBase tx, BasicTriList trilist, DmTxControllerJoinMap joinMap, EiscApiAdvanced bridge)
|
protected void LinkDmTxToApi(DmTxControllerBase tx, BasicTriList trilist, DmTxControllerJoinMap joinMap, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
if (bridge != null)
|
if (bridge != null)
|
||||||
{
|
{
|
||||||
bridge.AddJoinMap(Key, joinMap);
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
@@ -306,7 +291,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Console(1, tx, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, tx, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
tx.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
tx.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
||||||
tx.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber]);
|
tx.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber]);
|
||||||
@@ -333,6 +318,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
txR.VideoSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoInput.JoinNumber]);
|
txR.VideoSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoInput.JoinNumber]);
|
||||||
txR.AudioSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.AudioInput.JoinNumber]);
|
txR.AudioSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.AudioInput.JoinNumber]);
|
||||||
|
|
||||||
|
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber].UShortValue = (ushort)tx.HdcpSupportCapability;
|
||||||
|
|
||||||
if (txR.InputPorts[DmPortName.HdmiIn] != null)
|
if (txR.InputPorts[DmPortName.HdmiIn] != null)
|
||||||
{
|
{
|
||||||
var inputPort = txR.InputPorts[DmPortName.HdmiIn];
|
var inputPort = txR.InputPorts[DmPortName.HdmiIn];
|
||||||
@@ -379,7 +366,7 @@ 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.Port2HdcpState.JoinNumber]);
|
intFeedback.LinkInputSig(trilist.UShortInput[joinMap.Port1HdcpState.JoinNumber]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inputPort.ConnectionType == eRoutingPortConnectionType.Hdmi && inputPort.Port != null)
|
if (inputPort.ConnectionType == eRoutingPortConnectionType.Hdmi && inputPort.Port != null)
|
||||||
@@ -390,40 +377,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (txR.InputPorts[DmPortName.DisplayPortIn] != null)
|
|
||||||
{
|
|
||||||
var inputPort = txR.InputPorts[DmPortName.DisplayPortIn];
|
|
||||||
|
|
||||||
if (tx.Feedbacks["DisplayPortInHdcpCapability"] != null)
|
|
||||||
{
|
|
||||||
|
|
||||||
var intFeedback = tx.Feedbacks["DisplayPortInHdcpCapability"] as IntFeedback;
|
|
||||||
if (intFeedback != null)
|
|
||||||
|
|
||||||
intFeedback.LinkInputSig(trilist.UShortInput[joinMap.Port3HdcpState.JoinNumber]);
|
|
||||||
|
|
||||||
if (inputPort.ConnectionType == eRoutingPortConnectionType.DisplayPort && inputPort.Port != null)
|
|
||||||
{
|
|
||||||
var port = inputPort.Port as EndpointDisplayPortInput;
|
|
||||||
SetHdcpCapabilityAction(port, joinMap.Port3HdcpState.JoinNumber, trilist);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
var hdcpInputPortCount =
|
|
||||||
(ushort)
|
|
||||||
txR.InputPorts.Where(
|
|
||||||
x => (x.Type == eRoutingSignalType.Video) || (x.Type == eRoutingSignalType.AudioVideo))
|
|
||||||
.Where(
|
|
||||||
x =>
|
|
||||||
(x.ConnectionType == eRoutingPortConnectionType.DmCat) ||
|
|
||||||
(x.ConnectionType == eRoutingPortConnectionType.Hdmi) ||
|
|
||||||
(x.ConnectionType == eRoutingPortConnectionType.DisplayPort))
|
|
||||||
.ToList().Count();
|
|
||||||
|
|
||||||
trilist.SetUshort(joinMap.HdcpInputPortCount.JoinNumber, hdcpInputPortCount);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var txFreeRun = tx as IHasFreeRun;
|
var txFreeRun = tx as IHasFreeRun;
|
||||||
@@ -471,40 +424,14 @@ namespace PepperDash.Essentials.DM
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
private void SetHdcpCapabilityAction(EndpointDisplayPortInput port, uint join,
|
|
||||||
BasicTriList trilist)
|
|
||||||
{
|
|
||||||
trilist.SetUShortSigAction(join,
|
|
||||||
s =>
|
|
||||||
{
|
|
||||||
Debug.Console(0, this, "Trying to set HDCP to {0} on port {1}", s, port.ToString());
|
|
||||||
port.HdcpCapability = (eHdcpCapabilityType) s;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public class DmTxControllerFactory : EssentialsDeviceFactory<DmTxControllerBase>
|
public class DmTxControllerFactory : EssentialsDeviceFactory<DmTxControllerBase>
|
||||||
{
|
{
|
||||||
public DmTxControllerFactory()
|
public DmTxControllerFactory()
|
||||||
{
|
{
|
||||||
TypeNames = new List<string>
|
TypeNames = new List<string>() { "dmtx200c", "dmtx201c", "dmtx201s", "dmtx4k100c", "dmtx4k202c", "dmtx4kz202c", "dmtx4k302c", "dmtx4kz302c",
|
||||||
{
|
"dmtx401c", "dmtx401s", "dmtx4k100c1g", "dmtx4kz100c1g", "hdbasettx" };
|
||||||
"dmtx200c",
|
|
||||||
"dmtx201c",
|
|
||||||
"dmtx201s",
|
|
||||||
"dmtx4k100c",
|
|
||||||
"dmtx4k202c",
|
|
||||||
"dmtx4kz202c",
|
|
||||||
"dmtx4k302c",
|
|
||||||
"dmtx4kz302c",
|
|
||||||
"dmtx401c",
|
|
||||||
"dmtx401s",
|
|
||||||
"dmtx4k100c1g",
|
|
||||||
"dmtx4kz100c1g",
|
|
||||||
"hdbasettx"
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||||
@@ -514,8 +441,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
Debug.Console(1, "Factory Attempting to create new DM-TX Device");
|
Debug.Console(1, "Factory Attempting to create new DM-TX Device");
|
||||||
|
|
||||||
var props = JsonConvert.DeserializeObject
|
var props = JsonConvert.DeserializeObject
|
||||||
<DmTxPropertiesConfig>(dc.Properties.ToString());
|
<PepperDash.Essentials.DM.Config.DmTxPropertiesConfig>(dc.Properties.ToString());
|
||||||
return DmTxHelper.GetDmTxController(dc.Key, dc.Name, type, props);
|
return PepperDash.Essentials.DM.DmTxHelper.GetDmTxController(dc.Key, dc.Name, type, props);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,9 +52,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
IsOnline.SetValueFunc(() => controller.InputEndpointOnlineFeedbacks[num].BoolValue);
|
IsOnline.SetValueFunc(() => controller.InputEndpointOnlineFeedbacks[num].BoolValue);
|
||||||
controller.InputEndpointOnlineFeedbacks[num].OutputChange += (o, a) => IsOnline.FireUpdate();
|
controller.InputEndpointOnlineFeedbacks[num].OutputChange += (o, a) => IsOnline.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
PreventRegistration = true;
|
|
||||||
tx.Register();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IRoutingInputs Members
|
#region IRoutingInputs Members
|
||||||
|
|||||||
@@ -16,17 +16,10 @@ using PepperDash.Essentials.Core;
|
|||||||
using PepperDash.Essentials.DM.Config;
|
using PepperDash.Essentials.DM.Config;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.DM {
|
namespace PepperDash.Essentials.DM {
|
||||||
public interface IDmSwitch
|
public interface IDmSwitch {
|
||||||
{
|
|
||||||
Switch Chassis { get; }
|
Switch Chassis { get; }
|
||||||
|
|
||||||
Dictionary<uint, string> TxDictionary { get; }
|
Dictionary<uint, string> TxDictionary { get; }
|
||||||
Dictionary<uint, string> RxDictionary { get; }
|
Dictionary<uint, string> RxDictionary { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IDmSwitchWithEndpointOnlineFeedback : IDmSwitch
|
|
||||||
{
|
|
||||||
Dictionary<uint, BoolFeedback> InputEndpointOnlineFeedbacks { get; }
|
|
||||||
Dictionary<uint, BoolFeedback> OutputEndpointOnlineFeedbacks { get; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -105,8 +105,6 @@
|
|||||||
<Compile Include="Chassis\HdMdNxM4kEBridgeableController.cs" />
|
<Compile Include="Chassis\HdMdNxM4kEBridgeableController.cs" />
|
||||||
<Compile Include="Chassis\HdMdNxM4kEController.cs" />
|
<Compile Include="Chassis\HdMdNxM4kEController.cs" />
|
||||||
<Compile Include="Config\InputPropertiesConfig.cs" />
|
<Compile Include="Config\InputPropertiesConfig.cs" />
|
||||||
<Compile Include="Endpoints\EndpointInterfaces.cs" />
|
|
||||||
<Compile Include="Endpoints\DGEs\DgeJoinMap.cs" />
|
|
||||||
<Compile Include="Endpoints\DGEs\DmDge200CController.cs" />
|
<Compile Include="Endpoints\DGEs\DmDge200CController.cs" />
|
||||||
<Compile Include="Endpoints\Receivers\DmRmc4kZ100CController.cs" />
|
<Compile Include="Endpoints\Receivers\DmRmc4kZ100CController.cs" />
|
||||||
<Compile Include="Endpoints\Receivers\DmRmc4kZScalerCController.cs" />
|
<Compile Include="Endpoints\Receivers\DmRmc4kZScalerCController.cs" />
|
||||||
@@ -160,6 +158,10 @@
|
|||||||
<Project>{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}</Project>
|
<Project>{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}</Project>
|
||||||
<Name>PepperDash_Essentials_Core</Name>
|
<Name>PepperDash_Essentials_Core</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\Essentials Interfaces\PepperDash_Essentials_Interfaces\PepperDash_Essentials_Interfaces.csproj">
|
||||||
|
<Project>{E51D7C84-4906-486C-B2BA-EEB3B4E9731B}</Project>
|
||||||
|
<Name>PepperDash_Essentials_Interfaces</Name>
|
||||||
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
|
|||||||
@@ -198,6 +198,10 @@
|
|||||||
<Project>{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}</Project>
|
<Project>{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}</Project>
|
||||||
<Name>PepperDash_Essentials_Core</Name>
|
<Name>PepperDash_Essentials_Core</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\Essentials Interfaces\PepperDash_Essentials_Interfaces\PepperDash_Essentials_Interfaces.csproj">
|
||||||
|
<Project>{E51D7C84-4906-486C-B2BA-EEB3B4E9731B}</Project>
|
||||||
|
<Name>PepperDash_Essentials_Interfaces</Name>
|
||||||
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
|
|||||||
@@ -0,0 +1,70 @@
|
|||||||
|
<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>{E51D7C84-4906-486C-B2BA-EEB3B4E9731B}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>PepperDash.Essentials.Interfaces</RootNamespace>
|
||||||
|
<AssemblyName>PepperDash_Essentials_Interfaces</AssemblyName>
|
||||||
|
<ProjectTypeGuids>{0B4745B0-194B-4BB6-8E21-E9057CA92500};{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\Release\</OutputPath>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<NoStdLib>true</NoStdLib>
|
||||||
|
<NoConfig>true</NoConfig>
|
||||||
|
<GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="mscorlib" />
|
||||||
|
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll</HintPath>
|
||||||
|
</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>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<None Include="Properties\ControlSystem.cfg" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<PostBuildEvent>rem S# preparation will execute after these operations</PostBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
[assembly: AssemblyTitle("PepperDash_Essentials_Interfaces")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("PepperDash_Essentials_Interfaces")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.*")]
|
||||||
|
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
<packages>
|
<packages>
|
||||||
<package id="PepperDashCore" version="1.2.1" targetFramework="net35" allowedVersions="[1.0,2.0)"/>
|
<package id="PepperDashCore" version="1.1.5-beta-317" targetFramework="net35" allowedVersions="[1.0,2.0)"/>
|
||||||
</packages>
|
</packages>
|
||||||
Reference in New Issue
Block a user