mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-22 00:45:04 +00:00
Compare commits
186 Commits
feature/Ge
...
v1.17.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4854018d7b | ||
|
|
078f35a91d | ||
|
|
dba07dced8 | ||
|
|
5ad232135c | ||
|
|
3f8e72f366 | ||
|
|
307b2f54a7 | ||
|
|
f73482e8ed | ||
|
|
e5a7641564 | ||
|
|
2b845ce4cb | ||
|
|
1f095e2fb3 | ||
|
|
2a7f491f62 | ||
|
|
2af603013d | ||
|
|
9aa890d404 | ||
|
|
de714f998b | ||
|
|
bcc07fb4cf | ||
|
|
a3651eac76 | ||
|
|
645d9d7098 | ||
|
|
b731f51c5a | ||
|
|
02c2dceedc | ||
|
|
bc1e9b070a | ||
|
|
781faa0431 | ||
|
|
87602c19d7 | ||
|
|
ade5596a18 | ||
|
|
c32ffdc1a8 | ||
|
|
a8285f211d | ||
|
|
6f38f4953e | ||
|
|
8230d95746 | ||
|
|
065726ee72 | ||
|
|
33a31ab931 | ||
|
|
b85377dccf | ||
|
|
e7c5e0566a | ||
|
|
cb2c117588 | ||
|
|
be34808ef0 | ||
|
|
7a4224e52a | ||
|
|
428f9f34bd | ||
|
|
78e49871c6 | ||
|
|
12e81af9e6 | ||
|
|
544a7a2d73 | ||
|
|
1d843c6c89 | ||
|
|
c72db72e7e | ||
|
|
9e588f4da5 | ||
|
|
4c466b425c | ||
|
|
d0aed1c1c5 | ||
|
|
bf966121f9 | ||
|
|
ecadb439b2 | ||
|
|
8c1553a026 | ||
|
|
9755724342 | ||
|
|
4d25c420e5 | ||
|
|
3190dacdf8 | ||
|
|
44add9aac6 | ||
|
|
5bb6405874 | ||
|
|
fed3d7e13a | ||
|
|
af848b9ca4 | ||
|
|
b52c13d8e8 | ||
|
|
26f9118154 | ||
|
|
bba3c347c6 | ||
|
|
be96adcc06 | ||
|
|
b245016420 | ||
|
|
19f2c6aa79 | ||
|
|
533ca05ac2 | ||
|
|
9c7777fbaa | ||
|
|
5530c91b75 | ||
|
|
67e0378806 | ||
|
|
1c5aca03d2 | ||
|
|
6f5fa2c3b8 | ||
|
|
3d760cbedc | ||
|
|
d713abf614 | ||
|
|
a64b5240ad | ||
|
|
c528fecb9a | ||
|
|
355e9cde12 | ||
|
|
1df8d3f617 | ||
|
|
2f1caff815 | ||
|
|
4da2f25c3d | ||
|
|
552a315ac0 | ||
|
|
99c35f14e1 | ||
|
|
5f2b916220 | ||
|
|
c7a16a46e9 | ||
|
|
d6334538c0 | ||
|
|
4f64022623 | ||
|
|
7ad638ea9a | ||
|
|
51d168b1d5 | ||
|
|
3179f3bf59 | ||
|
|
eba27d016d | ||
|
|
e5fe16122f | ||
|
|
ee9b191f85 | ||
|
|
d1d1d81165 | ||
|
|
6698dcb46e | ||
|
|
c8aa77fbc0 | ||
|
|
53b96d54e6 | ||
|
|
6c41b8e19d | ||
|
|
922119fdd6 | ||
|
|
86c1faa7cd | ||
|
|
75895604ed | ||
|
|
de6f8c7896 | ||
|
|
5a5e24a921 | ||
|
|
8b3bc523d2 | ||
|
|
ff04d49a1b | ||
|
|
55af6a96f6 | ||
|
|
a3561bc89b | ||
|
|
1a123ab6dc | ||
|
|
c0b0b35f6d | ||
|
|
1d60f2e069 | ||
|
|
bd97676050 | ||
|
|
8612fab4fe | ||
|
|
b9fd9f23a4 | ||
|
|
1e07e44279 | ||
|
|
1569c12450 | ||
|
|
6d020132cf | ||
|
|
7ecb2ecf6d | ||
|
|
393033b6c9 | ||
|
|
9fb16f30b0 | ||
|
|
8b6a9db7e0 | ||
|
|
5a67a4060d | ||
|
|
0fad667fab | ||
|
|
95c37872ad | ||
|
|
a5ad7ea48b | ||
|
|
14221f9613 | ||
|
|
334a62c329 | ||
|
|
e590c7cedb | ||
|
|
189c470603 | ||
|
|
4deee11d15 | ||
|
|
4bdac8d9e9 | ||
|
|
58e019992a | ||
|
|
da5d2d74f2 | ||
|
|
2afa9df705 | ||
|
|
1aa9590587 | ||
|
|
27bac4e83d | ||
|
|
4e33743f50 | ||
|
|
08af6370a6 | ||
|
|
97c0bddb48 | ||
|
|
316d545bda | ||
|
|
13df52ab49 | ||
|
|
527457baf5 | ||
|
|
d74c5de651 | ||
|
|
b06d0c0deb | ||
|
|
759fb1d729 | ||
|
|
3defd6b41b | ||
|
|
794cd3be5f | ||
|
|
68cbbee6a3 | ||
|
|
a50d758f70 | ||
|
|
aedac14feb | ||
|
|
93134cae5c | ||
|
|
555915b151 | ||
|
|
fa0f006b9b | ||
|
|
4c0fb6311b | ||
|
|
6538cecc3b | ||
|
|
44296cbc54 | ||
|
|
0dcf45fc84 | ||
|
|
4d2ce83e75 | ||
|
|
da4070bad0 | ||
|
|
d95692ba96 | ||
|
|
daf3f321bd | ||
|
|
269d82227d | ||
|
|
e8f20a4ca3 | ||
|
|
5fbacadd7f | ||
|
|
9c9b2952aa | ||
|
|
a7a4b75382 | ||
|
|
8d0f0c0c37 | ||
|
|
2b97b9bdc4 | ||
|
|
77f5dafdfe | ||
|
|
b5bf87c634 | ||
|
|
62f175c24a | ||
|
|
0cfcf61d6b | ||
|
|
4a0bacb27e | ||
|
|
a36901894d | ||
|
|
c047507997 | ||
|
|
ef719b0a64 | ||
|
|
c46409dc3f | ||
|
|
f73d6994b8 | ||
|
|
a787be6ccc | ||
|
|
f0ae0094dc | ||
|
|
fcd4b5d772 | ||
|
|
c3ba6d5c28 | ||
|
|
3f6b2f05a2 | ||
|
|
cab0b01a08 | ||
|
|
f4af1b6e7c | ||
|
|
a04bfd1fcb | ||
|
|
faaf8151df | ||
|
|
0ee6322684 | ||
|
|
c614347f29 | ||
|
|
43f06d2167 | ||
|
|
2ffe24fd93 | ||
|
|
515ffd07f0 | ||
|
|
16ea7a88be | ||
|
|
acd3bad1f2 | ||
|
|
0f3b0580f0 |
21
.github/workflows/EssentialsPlugins-builds-3-series-caller.yml
vendored
Normal file
21
.github/workflows/EssentialsPlugins-builds-3-series-caller.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
name: Build Essentials 1.X
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
getVersion:
|
||||||
|
uses: PepperDash/workflow-templates/.github/workflows/essentialsplugins-getversion.yml@main
|
||||||
|
secrets: inherit
|
||||||
|
build-3Series:
|
||||||
|
uses: PepperDash/workflow-templates/.github/workflows/essentials-3Series-builds.yml@main
|
||||||
|
secrets: inherit
|
||||||
|
needs: getVersion
|
||||||
|
if: needs.getVersion.outputs.newVersion == 'true'
|
||||||
|
with:
|
||||||
|
newVersion: ${{ needs.getVersion.outputs.newVersion }}
|
||||||
|
version: ${{ needs.getVersion.outputs.version }}
|
||||||
|
tag: ${{ needs.getVersion.outputs.tag }}
|
||||||
|
channel: ${{ needs.getVersion.outputs.channel }}
|
||||||
141
.github/workflows/docker.yml
vendored
141
.github/workflows/docker.yml
vendored
@@ -1,141 +0,0 @@
|
|||||||
name: Branch Build Using Docker
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- feature/*
|
|
||||||
- hotfix/*
|
|
||||||
- bugfix/*
|
|
||||||
- release/*
|
|
||||||
- development
|
|
||||||
|
|
||||||
env:
|
|
||||||
# solution path doesn't need slashes unless 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.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
|
|
||||||
- name: Create Release
|
|
||||||
id: create_release
|
|
||||||
# using contributor's version to allow for pointing at the right commit
|
|
||||||
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
|
|
||||||
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-2019
|
|
||||||
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
|
|
||||||
125
.github/workflows/main.yml
vendored
125
.github/workflows/main.yml
vendored
@@ -1,125 +0,0 @@
|
|||||||
name: main Build using Docker
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types:
|
|
||||||
- created
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
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: Release
|
|
||||||
# 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
|
|
||||||
# Generate the appropriate version number
|
|
||||||
- name: Set Version Number
|
|
||||||
shell: powershell
|
|
||||||
env:
|
|
||||||
TAG_NAME: ${{ github.event.release.tag_name }}
|
|
||||||
run: echo "VERSION=$($Env:TAG_NAME)" | 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
|
|
||||||
# Upload the build package to the release
|
|
||||||
- name: Upload Release Package
|
|
||||||
id: upload_release
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
with:
|
|
||||||
upload_url: ${{ github.event.release.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-2019
|
|
||||||
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
|
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -389,3 +389,4 @@ MigrationBackup/
|
|||||||
# Fody - auto-generated XML schema
|
# Fody - auto-generated XML schema
|
||||||
FodyWeavers.xsd
|
FodyWeavers.xsd
|
||||||
essentials-framework/Essentials Interfaces/PepperDash_Essentials_Interfaces/PepperDash_Essentials_Interfaces.csproj
|
essentials-framework/Essentials Interfaces/PepperDash_Essentials_Interfaces/PepperDash_Essentials_Interfaces.csproj
|
||||||
|
.DS_Store
|
||||||
|
|||||||
34
.releaserc.json
Normal file
34
.releaserc.json
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"plugins": [
|
||||||
|
[
|
||||||
|
"@semantic-release/commit-analyzer",
|
||||||
|
{
|
||||||
|
"releaseRules": [
|
||||||
|
{ "scope": "force-patch", "release": "patch" },
|
||||||
|
{ "scope": "no-release", "release": false }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@semantic-release/release-notes-generator",
|
||||||
|
["@semantic-release/changelog",
|
||||||
|
{
|
||||||
|
"changelogFile": "CHANGELOG.md"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"@semantic-release/exec",
|
||||||
|
{
|
||||||
|
"verifyReleaseCmd": "echo \"newVersion=true\" >> $GITHUB_OUTPUT",
|
||||||
|
"publishCmd": "echo \"version=${nextRelease.version}\" >> $GITHUB_OUTPUT && echo \"tag=${nextRelease.gitTag}\" >> $GITHUB_OUTPUT && echo \"type=${nextRelease.type}\" >> $GITHUB_OUTPUT && echo \"channel=${nextRelease.channel}\" >> $GITHUB_OUTPUT"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"branches": [
|
||||||
|
"maintenance-1x",
|
||||||
|
{
|
||||||
|
"name": "replace-me-feature-branch",
|
||||||
|
"prerelease": "replace-me-prerelease",
|
||||||
|
"channel": "replace-me-prerelease"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -91,8 +91,8 @@ we receive and the availability of resources to evaluate contributions, we antic
|
|||||||
project remains dynamic and relevant. This may affect our responsiveness and ability to accept pull requests
|
project remains dynamic and relevant. This may affect our responsiveness and ability to accept pull requests
|
||||||
quickly. This does not mean we are ignoring them.
|
quickly. This does not mean we are ignoring them.
|
||||||
- Not all innovative ideas need to be accepted as pull requests into this GitHub project to be valuable to the community.
|
- Not all innovative ideas need to be accepted as pull requests into this GitHub project to be valuable to the community.
|
||||||
There may be times when we recommend that you just share your code for some enhancement to Ghidra from your own
|
There may be times when we recommend that you just share your code for some enhancement to Essentials from your own
|
||||||
repository. As we identify and recognize extensions that are of general interest to the reverse engineering community, we
|
repository. As we identify and recognize extensions that are of general interest to Essentials, we
|
||||||
may seek to incorporate them with our baseline.
|
may seek to incorporate them with our baseline.
|
||||||
|
|
||||||
## Legal
|
## Legal
|
||||||
|
|||||||
@@ -1,49 +1,49 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||||
# Visual Studio 2008
|
# Visual Studio 2008
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDashEssentials", "PepperDashEssentials\PepperDashEssentials.csproj", "{1BED5BA9-88C4-4365-9362-6F4B128071D3}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDashEssentials", "src\PepperDashEssentials\PepperDashEssentials.csproj", "{1BED5BA9-88C4-4365-9362-6F4B128071D3}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
{892B761C-E479-44CE-BD74-243E9214AF13} = {892B761C-E479-44CE-BD74-243E9214AF13}
|
{892B761C-E479-44CE-BD74-243E9214AF13} = {892B761C-E479-44CE-BD74-243E9214AF13}
|
||||||
{9199CE8A-0C9F-4952-8672-3EED798B284F} = {9199CE8A-0C9F-4952-8672-3EED798B284F}
|
{9199CE8A-0C9F-4952-8672-3EED798B284F} = {9199CE8A-0C9F-4952-8672-3EED798B284F}
|
||||||
{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_Core", "essentials-framework\Essentials Core\PepperDashEssentialsBase\PepperDash_Essentials_Core.csproj", "{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDash_Essentials_Core", "src\essentials-framework\Essentials Core\PepperDashEssentialsBase\PepperDash_Essentials_Core.csproj", "{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}"
|
||||||
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", "src\essentials-framework\Essentials Devices Common\Essentials Devices Common\Essentials Devices Common.csproj", "{892B761C-E479-44CE-BD74-243E9214AF13}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
{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_DM", "essentials-framework\Essentials DM\Essentials_DM\PepperDash_Essentials_DM.csproj", "{9199CE8A-0C9F-4952-8672-3EED798B284F}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDash_Essentials_DM", "src\essentials-framework\Essentials DM\Essentials_DM\PepperDash_Essentials_DM.csproj", "{9199CE8A-0C9F-4952-8672-3EED798B284F}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} = {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}
|
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} = {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
Release|Any CPU = Release|Any CPU
|
Release|Any CPU = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{1BED5BA9-88C4-4365-9362-6F4B128071D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{1BED5BA9-88C4-4365-9362-6F4B128071D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{1BED5BA9-88C4-4365-9362-6F4B128071D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{1BED5BA9-88C4-4365-9362-6F4B128071D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{1BED5BA9-88C4-4365-9362-6F4B128071D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{1BED5BA9-88C4-4365-9362-6F4B128071D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{1BED5BA9-88C4-4365-9362-6F4B128071D3}.Release|Any CPU.Build.0 = Release|Any CPU
|
{1BED5BA9-88C4-4365-9362-6F4B128071D3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}.Release|Any CPU.Build.0 = Release|Any CPU
|
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{892B761C-E479-44CE-BD74-243E9214AF13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{892B761C-E479-44CE-BD74-243E9214AF13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{892B761C-E479-44CE-BD74-243E9214AF13}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{892B761C-E479-44CE-BD74-243E9214AF13}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{892B761C-E479-44CE-BD74-243E9214AF13}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{892B761C-E479-44CE-BD74-243E9214AF13}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{892B761C-E479-44CE-BD74-243E9214AF13}.Release|Any CPU.Build.0 = Release|Any CPU
|
{892B761C-E479-44CE-BD74-243E9214AF13}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{9199CE8A-0C9F-4952-8672-3EED798B284F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{9199CE8A-0C9F-4952-8672-3EED798B284F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{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
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core
|
|
||||||
{
|
|
||||||
public static class StringExtensions
|
|
||||||
{
|
|
||||||
public static string NullIfEmpty(this string s)
|
|
||||||
{
|
|
||||||
return string.IsNullOrEmpty(s) ? null : s;
|
|
||||||
}
|
|
||||||
public static string NullIfWhiteSpace(this string s)
|
|
||||||
{
|
|
||||||
return string.IsNullOrEmpty(s.Trim()) ? null : s;
|
|
||||||
}
|
|
||||||
public static string ReplaceIfNullOrEmpty(this string s, string newString)
|
|
||||||
{
|
|
||||||
return string.IsNullOrEmpty(s) ? newString : s;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,144 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
using Crestron.SimplSharpPro;
|
|
||||||
|
|
||||||
using PepperDash.Core;
|
|
||||||
using PepperDash.Essentials.Core;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Touchpanels
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// A wrapper class for the touchpanel portion of an MPC3 class process to allow for configurable
|
|
||||||
/// behavior of the keybad buttons
|
|
||||||
/// </summary>
|
|
||||||
public class Mpc3TouchpanelController : Device
|
|
||||||
{
|
|
||||||
MPC3Basic _Touchpanel;
|
|
||||||
|
|
||||||
Dictionary<string, KeypadButton> _Buttons;
|
|
||||||
|
|
||||||
public Mpc3TouchpanelController(string key, string name, CrestronControlSystem processor, Dictionary<string, KeypadButton> buttons)
|
|
||||||
: base(key, name)
|
|
||||||
{
|
|
||||||
_Touchpanel = processor.ControllerTouchScreenSlotDevice as MPC3Basic;
|
|
||||||
_Buttons = buttons;
|
|
||||||
|
|
||||||
_Touchpanel.ButtonStateChange += new Crestron.SimplSharpPro.DeviceSupport.ButtonEventHandler(_Touchpanel_ButtonStateChange);
|
|
||||||
|
|
||||||
AddPostActivationAction(() =>
|
|
||||||
{
|
|
||||||
// Link up the button feedbacks to the specified BoolFeedbacks
|
|
||||||
foreach (var button in _Buttons)
|
|
||||||
{
|
|
||||||
var feedbackConfig = button.Value.Feedback;
|
|
||||||
var device = DeviceManager.GetDeviceForKey(feedbackConfig.DeviceKey) as Device;
|
|
||||||
if (device != null)
|
|
||||||
{
|
|
||||||
var bKey = button.Key.ToLower();
|
|
||||||
|
|
||||||
var feedback = device.GetFeedbackProperty(feedbackConfig.FeedbackName);
|
|
||||||
|
|
||||||
var bFeedback = feedback as BoolFeedback;
|
|
||||||
var iFeedback = feedback as IntFeedback;
|
|
||||||
if (bFeedback != null)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (bKey == "power")
|
|
||||||
{
|
|
||||||
bFeedback.LinkCrestronFeedback(_Touchpanel.FeedbackPower);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else if (bKey == "mute")
|
|
||||||
{
|
|
||||||
bFeedback.LinkCrestronFeedback(_Touchpanel.FeedbackMute);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Link to the Crestron Feedback corresponding to the button number
|
|
||||||
bFeedback.LinkCrestronFeedback(_Touchpanel.Feedbacks[UInt16.Parse(button.Key)]);
|
|
||||||
}
|
|
||||||
else if (iFeedback != null)
|
|
||||||
{
|
|
||||||
if (bKey == "volumefeedback")
|
|
||||||
{
|
|
||||||
var volFeedback = feedback as IntFeedback;
|
|
||||||
// TODO: Figure out how to subsribe to a volume IntFeedback and link it to the voluem
|
|
||||||
volFeedback.LinkInputSig(_Touchpanel.VolumeBargraph);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Console(1, this, "Unable to get BoolFeedback with name: {0} from device: {1}", feedbackConfig.FeedbackName, device.Key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Console(1, this, "Unable to get device with key: {0}", feedbackConfig.DeviceKey);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
void _Touchpanel_ButtonStateChange(GenericBase device, Crestron.SimplSharpPro.DeviceSupport.ButtonEventArgs args)
|
|
||||||
{
|
|
||||||
Debug.Console(1, this, "Button {0} ({1}), {2}", args.Button.Number, args.Button.Name, args.NewButtonState);
|
|
||||||
var type = args.NewButtonState.ToString();
|
|
||||||
|
|
||||||
if (_Buttons.ContainsKey(args.Button.Number.ToString()))
|
|
||||||
{
|
|
||||||
Press(args.Button.Number.ToString(), type);
|
|
||||||
}
|
|
||||||
else if(_Buttons.ContainsKey(args.Button.Name.ToString()))
|
|
||||||
{
|
|
||||||
Press(args.Button.Name.ToString(), type);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Runs the function associated with this button/type. One of the following strings:
|
|
||||||
/// Pressed, Released, Tapped, DoubleTapped, Held, HeldReleased
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="number"></param>
|
|
||||||
/// <param name="type"></param>
|
|
||||||
public void Press(string number, string type)
|
|
||||||
{
|
|
||||||
// TODO: In future, consider modifying this to generate actions at device activation time
|
|
||||||
// to prevent the need to dynamically call the method via reflection on each button press
|
|
||||||
if (!_Buttons.ContainsKey(number)) { return; }
|
|
||||||
var but = _Buttons[number];
|
|
||||||
if (but.EventTypes.ContainsKey(type))
|
|
||||||
{
|
|
||||||
foreach (var a in but.EventTypes[type]) { DeviceJsonApi.DoDeviceAction(a); }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Represents the configuration of a keybad buggon
|
|
||||||
/// </summary>
|
|
||||||
public class KeypadButton
|
|
||||||
{
|
|
||||||
public Dictionary<string, DeviceActionWrapper[]> EventTypes { get; set; }
|
|
||||||
public KeypadButtonFeedback Feedback { get; set; }
|
|
||||||
|
|
||||||
public KeypadButton()
|
|
||||||
{
|
|
||||||
EventTypes = new Dictionary<string, DeviceActionWrapper[]>();
|
|
||||||
Feedback = new KeypadButtonFeedback();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public class KeypadButtonFeedback
|
|
||||||
{
|
|
||||||
public string DeviceKey { get; set; }
|
|
||||||
public string FeedbackName { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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.4.2" targetFramework="net35" allowedVersions="[1.0,2.0)"/>
|
||||||
</packages>
|
</packages>
|
||||||
|
|||||||
@@ -1,129 +1,129 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
using PepperDash.Essentials.Core.Bridges;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core.Routing;
|
using PepperDash.Essentials.Core.Routing;
|
||||||
using PepperDash.Essentials.Bridges;
|
using PepperDash.Essentials.Bridges;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.EthernetCommunication;
|
using Crestron.SimplSharpPro.EthernetCommunication;
|
||||||
|
|
||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Responsible for loading all of the device types for this library
|
/// Responsible for loading all of the device types for this library
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class BridgeFactory
|
public class BridgeFactory
|
||||||
{
|
{
|
||||||
public BridgeFactory()
|
public BridgeFactory()
|
||||||
{
|
{
|
||||||
var eiscApiAdvancedFactory = new EiscApiAdvancedFactory() as IDeviceFactory;
|
var eiscApiAdvancedFactory = new EiscApiAdvancedFactory() as IDeviceFactory;
|
||||||
eiscApiAdvancedFactory.LoadTypeFactories();
|
eiscApiAdvancedFactory.LoadTypeFactories();
|
||||||
|
|
||||||
var eiscApiFactory = new EiscApiFactory() as IDeviceFactory;
|
var eiscApiFactory = new EiscApiFactory() as IDeviceFactory;
|
||||||
eiscApiFactory.LoadTypeFactories();
|
eiscApiFactory.LoadTypeFactories();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CommBridge : Device
|
public class CommBridge : Device
|
||||||
{
|
{
|
||||||
public CommBridgeProperties Properties { get; private set; }
|
public CommBridgeProperties Properties { get; private set; }
|
||||||
|
|
||||||
public List<IBasicCommunication> CommDevices { get; private set; }
|
public List<IBasicCommunication> CommDevices { get; private set; }
|
||||||
|
|
||||||
public CommBridge(string key, string name, JToken properties)
|
public CommBridge(string key, string name, JToken properties)
|
||||||
: base(key, name)
|
: base(key, name)
|
||||||
{
|
{
|
||||||
Properties = JsonConvert.DeserializeObject<CommBridgeProperties>(properties.ToString());
|
Properties = JsonConvert.DeserializeObject<CommBridgeProperties>(properties.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CustomActivate()
|
public override bool CustomActivate()
|
||||||
{
|
{
|
||||||
// Create EiscApis
|
// Create EiscApis
|
||||||
if (Properties.Eiscs != null)
|
if (Properties.Eiscs != null)
|
||||||
{
|
{
|
||||||
foreach (var eisc in Properties.Eiscs)
|
foreach (var eisc in Properties.Eiscs)
|
||||||
{
|
{
|
||||||
var ApiEisc = new BridgeApiEisc(eisc.IpId, eisc.Hostname);
|
var ApiEisc = new BridgeApiEisc(eisc.IpId, eisc.Hostname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var deviceKey in Properties.CommDevices)
|
foreach (var deviceKey in Properties.CommDevices)
|
||||||
{
|
{
|
||||||
var device = DeviceManager.GetDeviceForKey(deviceKey);
|
var device = DeviceManager.GetDeviceForKey(deviceKey);
|
||||||
|
|
||||||
if (device != null)
|
if (device != null)
|
||||||
{
|
{
|
||||||
Debug.Console(0, "deviceKey {0} Found in Device Manager", device.Key);
|
Debug.Console(0, "deviceKey {0} Found in Device Manager", device.Key);
|
||||||
CommDevices.Add(device as IBasicCommunication);
|
CommDevices.Add(device as IBasicCommunication);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Console(0, "deviceKey {0} Not Found in Device Manager", deviceKey);
|
Debug.Console(0, "deviceKey {0} Not Found in Device Manager", deviceKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Iterate through all the CommDevices and link up their Actions and Feedbacks
|
// Iterate through all the CommDevices and link up their Actions and Feedbacks
|
||||||
|
|
||||||
Debug.Console(0, "Bridge {0} Activated", this.Name);
|
Debug.Console(0, "Bridge {0} Activated", this.Name);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class EiscBridgeProperties
|
public class EiscBridgeProperties
|
||||||
{
|
{
|
||||||
public string ParentDeviceKey { get; set; }
|
public string ParentDeviceKey { get; set; }
|
||||||
public eApiType ApiType { get; set; }
|
public eApiType ApiType { get; set; }
|
||||||
public List<EiscProperties> Eiscs { get; set; }
|
public List<EiscProperties> Eiscs { get; set; }
|
||||||
public string ApiOverrideFilePath { get; set; }
|
public string ApiOverrideFilePath { get; set; }
|
||||||
|
|
||||||
public class EiscProperties
|
public class EiscProperties
|
||||||
{
|
{
|
||||||
public string IpId { get; set; }
|
public string IpId { get; set; }
|
||||||
public string Hostname { get; set; }
|
public string Hostname { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CommBridgeProperties : EiscBridgeProperties
|
public class CommBridgeProperties : EiscBridgeProperties
|
||||||
{
|
{
|
||||||
public List<string> CommDevices { get; set; }
|
public List<string> CommDevices { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum eApiType { Eisc = 0 }
|
public enum eApiType { Eisc = 0 }
|
||||||
|
|
||||||
public class BridgeApiEisc
|
public class BridgeApiEisc
|
||||||
{
|
{
|
||||||
public uint Ipid { get; private set; }
|
public uint Ipid { get; private set; }
|
||||||
public ThreeSeriesTcpIpEthernetIntersystemCommunications Eisc { get; private set; }
|
public ThreeSeriesTcpIpEthernetIntersystemCommunications Eisc { get; private set; }
|
||||||
|
|
||||||
public BridgeApiEisc(string ipid, string hostname)
|
public BridgeApiEisc(string ipid, string hostname)
|
||||||
{
|
{
|
||||||
Ipid = (UInt32)int.Parse(ipid, System.Globalization.NumberStyles.HexNumber);
|
Ipid = (UInt32)int.Parse(ipid, System.Globalization.NumberStyles.HexNumber);
|
||||||
Eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(Ipid, hostname, Global.ControlSystem);
|
Eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(Ipid, hostname, Global.ControlSystem);
|
||||||
Eisc.Register();
|
Eisc.Register();
|
||||||
Eisc.SigChange += Eisc_SigChange;
|
Eisc.SigChange += Eisc_SigChange;
|
||||||
Debug.Console(0, "BridgeApiEisc Created at Ipid {0}", ipid);
|
Debug.Console(0, "BridgeApiEisc Created at Ipid {0}", ipid);
|
||||||
}
|
}
|
||||||
void Eisc_SigChange(object currentDevice, Crestron.SimplSharpPro.SigEventArgs args)
|
void Eisc_SigChange(object currentDevice, Crestron.SimplSharpPro.SigEventArgs args)
|
||||||
{
|
{
|
||||||
if (Debug.Level >= 1)
|
if (Debug.Level >= 1)
|
||||||
Debug.Console(1, "BridgeApiEisc change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue);
|
Debug.Console(1, "BridgeApiEisc change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue);
|
||||||
var uo = args.Sig.UserObject;
|
var uo = args.Sig.UserObject;
|
||||||
if (uo is Action<bool>)
|
if (uo is Action<bool>)
|
||||||
(uo as Action<bool>)(args.Sig.BoolValue);
|
(uo as Action<bool>)(args.Sig.BoolValue);
|
||||||
else if (uo is Action<ushort>)
|
else if (uo is Action<ushort>)
|
||||||
(uo as Action<ushort>)(args.Sig.UShortValue);
|
(uo as Action<ushort>)(args.Sig.UShortValue);
|
||||||
else if (uo is Action<string>)
|
else if (uo is Action<string>)
|
||||||
(uo as Action<string>)(args.Sig.StringValue);
|
(uo as Action<string>)(args.Sig.StringValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,90 +1,90 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core.Routing;
|
using PepperDash.Essentials.Core.Routing;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.EthernetCommunication;
|
using Crestron.SimplSharpPro.EthernetCommunication;
|
||||||
using PepperDash.Essentials.Bridges;
|
using PepperDash.Essentials.Bridges;
|
||||||
|
|
||||||
namespace PepperDash.Essentials {
|
namespace PepperDash.Essentials {
|
||||||
public class BridgeFactory {
|
public class BridgeFactory {
|
||||||
public static IKeyed GetDevice(PepperDash.Essentials.Core.Config.DeviceConfig dc) {
|
public static IKeyed GetDevice(PepperDash.Essentials.Core.Config.DeviceConfig dc) {
|
||||||
// ? why is this static JTA 2018-06-13?
|
// ? why is this static JTA 2018-06-13?
|
||||||
|
|
||||||
var key = dc.Key;
|
var key = dc.Key;
|
||||||
var name = dc.Name;
|
var name = dc.Name;
|
||||||
var type = dc.Type;
|
var type = dc.Type;
|
||||||
var properties = dc.Properties;
|
var properties = dc.Properties;
|
||||||
var propAnon = new { };
|
var propAnon = new { };
|
||||||
JsonConvert.DeserializeAnonymousType(dc.Properties.ToString(), propAnon);
|
JsonConvert.DeserializeAnonymousType(dc.Properties.ToString(), propAnon);
|
||||||
|
|
||||||
var typeName = dc.Type.ToLower();
|
var typeName = dc.Type.ToLower();
|
||||||
var groupName = dc.Group.ToLower();
|
var groupName = dc.Group.ToLower();
|
||||||
|
|
||||||
Debug.Console(2, "Name {0}, Key {1}, Type {2}, Properties {3}", name, key, type, properties.ToString());
|
Debug.Console(2, "Name {0}, Key {1}, Type {2}, Properties {3}", name, key, type, properties.ToString());
|
||||||
if (typeName == "essentialdm")
|
if (typeName == "essentialdm")
|
||||||
{
|
{
|
||||||
return new EssentialDM(key, name, properties);
|
return new EssentialDM(key, name, properties);
|
||||||
}
|
}
|
||||||
else if (typeName == "essentialcomm")
|
else if (typeName == "essentialcomm")
|
||||||
{
|
{
|
||||||
Debug.Console(2, "Launch Essential Comm");
|
Debug.Console(2, "Launch Essential Comm");
|
||||||
return new EssentialComm(key, name, properties);
|
return new EssentialComm(key, name, properties);
|
||||||
}
|
}
|
||||||
else if (typeName == "essentialdsp")
|
else if (typeName == "essentialdsp")
|
||||||
{
|
{
|
||||||
Debug.Console(2, "Launch EssentialDsp");
|
Debug.Console(2, "Launch EssentialDsp");
|
||||||
return new EssentialDsp(key, name, properties);
|
return new EssentialDsp(key, name, properties);
|
||||||
}
|
}
|
||||||
else if (typeName == "essentialstvone")
|
else if (typeName == "essentialstvone")
|
||||||
{
|
{
|
||||||
Debug.Console(2, "Launch essentialstvone");
|
Debug.Console(2, "Launch essentialstvone");
|
||||||
return new EssentialsTVOne(key, name, properties);
|
return new EssentialsTVOne(key, name, properties);
|
||||||
}
|
}
|
||||||
else if (typeName == "essentialslighting")
|
else if (typeName == "essentialslighting")
|
||||||
{
|
{
|
||||||
Debug.Console(2, "Launch essentialslighting");
|
Debug.Console(2, "Launch essentialslighting");
|
||||||
return new EssentialsLightsBridge(key, name, properties);
|
return new EssentialsLightsBridge(key, name, properties);
|
||||||
}
|
}
|
||||||
else if (typeName == "eiscapi")
|
else if (typeName == "eiscapi")
|
||||||
{
|
{
|
||||||
return new EiscApi(dc);
|
return new EiscApi(dc);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class BridgeApiEisc {
|
public class BridgeApiEisc {
|
||||||
public uint Ipid;
|
public uint Ipid;
|
||||||
public ThreeSeriesTcpIpEthernetIntersystemCommunications Eisc;
|
public ThreeSeriesTcpIpEthernetIntersystemCommunications Eisc;
|
||||||
public BridgeApiEisc(string ipid) {
|
public BridgeApiEisc(string ipid) {
|
||||||
Ipid = (UInt32)int.Parse(ipid, System.Globalization.NumberStyles.HexNumber);
|
Ipid = (UInt32)int.Parse(ipid, System.Globalization.NumberStyles.HexNumber);
|
||||||
Eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(Ipid, "127.0.0.2", Global.ControlSystem);
|
Eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(Ipid, "127.0.0.2", Global.ControlSystem);
|
||||||
Eisc.Register();
|
Eisc.Register();
|
||||||
Eisc.SigChange += Eisc_SigChange;
|
Eisc.SigChange += Eisc_SigChange;
|
||||||
Debug.Console(2, "BridgeApiEisc Created at Ipid {0}", ipid);
|
Debug.Console(2, "BridgeApiEisc Created at Ipid {0}", ipid);
|
||||||
}
|
}
|
||||||
void Eisc_SigChange(object currentDevice, Crestron.SimplSharpPro.SigEventArgs args) {
|
void Eisc_SigChange(object currentDevice, Crestron.SimplSharpPro.SigEventArgs args) {
|
||||||
if (Debug.Level >= 1)
|
if (Debug.Level >= 1)
|
||||||
Debug.Console(2, "DDVC EISC change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue);
|
Debug.Console(2, "DDVC EISC change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue);
|
||||||
var uo = args.Sig.UserObject;
|
var uo = args.Sig.UserObject;
|
||||||
if (uo is Action<bool>)
|
if (uo is Action<bool>)
|
||||||
(uo as Action<bool>)(args.Sig.BoolValue);
|
(uo as Action<bool>)(args.Sig.BoolValue);
|
||||||
else if (uo is Action<ushort>)
|
else if (uo is Action<ushort>)
|
||||||
(uo as Action<ushort>)(args.Sig.UShortValue);
|
(uo as Action<ushort>)(args.Sig.UShortValue);
|
||||||
else if (uo is Action<string>)
|
else if (uo is Action<string>)
|
||||||
(uo as Action<string>)(args.Sig.StringValue);
|
(uo as Action<string>)(args.Sig.StringValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,38 +1,38 @@
|
|||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.CrestronIO;
|
using PepperDash.Essentials.Core.CrestronIO;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public static class C2nRthsControllerApiExtensions
|
public static class C2nRthsControllerApiExtensions
|
||||||
{
|
{
|
||||||
public static void LinkToApi(this C2nRthsController device, BasicTriList triList, uint joinStart,
|
public static void LinkToApi(this C2nRthsController device, BasicTriList triList, uint joinStart,
|
||||||
string joinMapKey)
|
string joinMapKey)
|
||||||
{
|
{
|
||||||
var joinMap = new C2nRthsControllerJoinMap();
|
var joinMap = new C2nRthsControllerJoinMap();
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<C2nRthsControllerJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<C2nRthsControllerJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
joinMap.OffsetJoinNumbers(joinStart);
|
||||||
|
|
||||||
Debug.Console(1, device, "Linking to Trilist '{0}'", triList.ID.ToString("X"));
|
Debug.Console(1, device, "Linking to Trilist '{0}'", triList.ID.ToString("X"));
|
||||||
|
|
||||||
|
|
||||||
triList.SetBoolSigAction(joinMap.TemperatureFormat, device.SetTemperatureFormat);
|
triList.SetBoolSigAction(joinMap.TemperatureFormat, device.SetTemperatureFormat);
|
||||||
|
|
||||||
device.IsOnline.LinkInputSig(triList.BooleanInput[joinMap.IsOnline]);
|
device.IsOnline.LinkInputSig(triList.BooleanInput[joinMap.IsOnline]);
|
||||||
device.TemperatureFeedback.LinkInputSig(triList.UShortInput[joinMap.Temperature]);
|
device.TemperatureFeedback.LinkInputSig(triList.UShortInput[joinMap.Temperature]);
|
||||||
device.HumidityFeedback.LinkInputSig(triList.UShortInput[joinMap.Humidity]);
|
device.HumidityFeedback.LinkInputSig(triList.UShortInput[joinMap.Humidity]);
|
||||||
|
|
||||||
triList.StringInput[joinMap.Name].StringValue = device.Name;
|
triList.StringInput[joinMap.Name].StringValue = device.Name;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,169 +1,169 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Devices.Common;
|
using PepperDash.Essentials.Devices.Common;
|
||||||
using PepperDash.Essentials.Devices.Common.Cameras;
|
using PepperDash.Essentials.Devices.Common.Cameras;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public static class CameraControllerApiExtensions
|
public static class CameraControllerApiExtensions
|
||||||
{
|
{
|
||||||
public static void LinkToApi(this PepperDash.Essentials.Devices.Common.Cameras.CameraBase cameraDevice, BasicTriList trilist, uint joinStart, string joinMapKey, EiscApi bridge)
|
public static void LinkToApi(this PepperDash.Essentials.Devices.Common.Cameras.CameraBase cameraDevice, BasicTriList trilist, uint joinStart, string joinMapKey, EiscApi bridge)
|
||||||
{
|
{
|
||||||
CameraControllerJoinMap joinMap = new CameraControllerJoinMap(joinStart);
|
CameraControllerJoinMap joinMap = new CameraControllerJoinMap(joinStart);
|
||||||
|
|
||||||
// Adds the join map to the bridge
|
// Adds the join map to the bridge
|
||||||
bridge.AddJoinMap(cameraDevice.Key, joinMap);
|
bridge.AddJoinMap(cameraDevice.Key, joinMap);
|
||||||
|
|
||||||
var customJoins = JoinMapHelper.TryGetJoinMapAdvancedForDevice(joinMapKey);
|
var customJoins = JoinMapHelper.TryGetJoinMapAdvancedForDevice(joinMapKey);
|
||||||
|
|
||||||
if (customJoins != null)
|
if (customJoins != null)
|
||||||
{
|
{
|
||||||
joinMap.SetCustomJoinData(customJoins);
|
joinMap.SetCustomJoinData(customJoins);
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
Debug.Console(0, "Linking to Bridge Type {0}", cameraDevice.GetType().Name.ToString());
|
Debug.Console(0, "Linking to Bridge Type {0}", cameraDevice.GetType().Name.ToString());
|
||||||
|
|
||||||
var commMonitor = cameraDevice as ICommunicationMonitor;
|
var commMonitor = cameraDevice as ICommunicationMonitor;
|
||||||
commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
||||||
|
|
||||||
var ptzCamera = cameraDevice as IHasCameraPtzControl;
|
var ptzCamera = cameraDevice as IHasCameraPtzControl;
|
||||||
|
|
||||||
if (ptzCamera != null)
|
if (ptzCamera != null)
|
||||||
{
|
{
|
||||||
trilist.SetBoolSigAction(joinMap.PanLeft.JoinNumber, (b) =>
|
trilist.SetBoolSigAction(joinMap.PanLeft.JoinNumber, (b) =>
|
||||||
{
|
{
|
||||||
if (b)
|
if (b)
|
||||||
{
|
{
|
||||||
ptzCamera.PanLeft();
|
ptzCamera.PanLeft();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ptzCamera.PanStop();
|
ptzCamera.PanStop();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
trilist.SetBoolSigAction(joinMap.PanRight.JoinNumber, (b) =>
|
trilist.SetBoolSigAction(joinMap.PanRight.JoinNumber, (b) =>
|
||||||
{
|
{
|
||||||
if (b)
|
if (b)
|
||||||
{
|
{
|
||||||
ptzCamera.PanRight();
|
ptzCamera.PanRight();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ptzCamera.PanStop();
|
ptzCamera.PanStop();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
trilist.SetBoolSigAction(joinMap.TiltUp.JoinNumber, (b) =>
|
trilist.SetBoolSigAction(joinMap.TiltUp.JoinNumber, (b) =>
|
||||||
{
|
{
|
||||||
if (b)
|
if (b)
|
||||||
{
|
{
|
||||||
ptzCamera.TiltUp();
|
ptzCamera.TiltUp();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ptzCamera.TiltStop();
|
ptzCamera.TiltStop();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
trilist.SetBoolSigAction(joinMap.TiltDown.JoinNumber, (b) =>
|
trilist.SetBoolSigAction(joinMap.TiltDown.JoinNumber, (b) =>
|
||||||
{
|
{
|
||||||
if (b)
|
if (b)
|
||||||
{
|
{
|
||||||
ptzCamera.TiltDown();
|
ptzCamera.TiltDown();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ptzCamera.TiltStop();
|
ptzCamera.TiltStop();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
trilist.SetBoolSigAction(joinMap.ZoomIn.JoinNumber, (b) =>
|
trilist.SetBoolSigAction(joinMap.ZoomIn.JoinNumber, (b) =>
|
||||||
{
|
{
|
||||||
if (b)
|
if (b)
|
||||||
{
|
{
|
||||||
ptzCamera.ZoomIn();
|
ptzCamera.ZoomIn();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ptzCamera.ZoomStop();
|
ptzCamera.ZoomStop();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
trilist.SetBoolSigAction(joinMap.ZoomOut.JoinNumber, (b) =>
|
trilist.SetBoolSigAction(joinMap.ZoomOut.JoinNumber, (b) =>
|
||||||
{
|
{
|
||||||
if (b)
|
if (b)
|
||||||
{
|
{
|
||||||
ptzCamera.ZoomOut();
|
ptzCamera.ZoomOut();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ptzCamera.ZoomStop();
|
ptzCamera.ZoomStop();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cameraDevice is IPower)
|
if (cameraDevice is IPower)
|
||||||
{
|
{
|
||||||
var powerCamera = cameraDevice as IPower;
|
var powerCamera = cameraDevice as IPower;
|
||||||
trilist.SetSigTrueAction(joinMap.PowerOn.JoinNumber, () => powerCamera.PowerOn());
|
trilist.SetSigTrueAction(joinMap.PowerOn.JoinNumber, () => powerCamera.PowerOn());
|
||||||
trilist.SetSigTrueAction(joinMap.PowerOff.JoinNumber, () => powerCamera.PowerOff());
|
trilist.SetSigTrueAction(joinMap.PowerOff.JoinNumber, () => powerCamera.PowerOff());
|
||||||
|
|
||||||
powerCamera.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn.JoinNumber]);
|
powerCamera.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn.JoinNumber]);
|
||||||
powerCamera.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff.JoinNumber]);
|
powerCamera.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff.JoinNumber]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cameraDevice is ICommunicationMonitor)
|
if (cameraDevice is ICommunicationMonitor)
|
||||||
{
|
{
|
||||||
var monitoredCamera = cameraDevice as ICommunicationMonitor;
|
var monitoredCamera = cameraDevice as ICommunicationMonitor;
|
||||||
monitoredCamera.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
monitoredCamera.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cameraDevice is IHasCameraPresets)
|
if (cameraDevice is IHasCameraPresets)
|
||||||
{
|
{
|
||||||
// Set the preset lables when they change
|
// Set the preset lables when they change
|
||||||
var presetsCamera = cameraDevice as IHasCameraPresets;
|
var presetsCamera = cameraDevice as IHasCameraPresets;
|
||||||
presetsCamera.PresetsListHasChanged += new EventHandler<EventArgs>((o, a) =>
|
presetsCamera.PresetsListHasChanged += new EventHandler<EventArgs>((o, a) =>
|
||||||
{
|
{
|
||||||
for (int i = 1; i <= joinMap.NumberOfPresets.JoinNumber; i++)
|
for (int i = 1; i <= joinMap.NumberOfPresets.JoinNumber; i++)
|
||||||
{
|
{
|
||||||
int tempNum = i - 1;
|
int tempNum = i - 1;
|
||||||
|
|
||||||
string label = "" ;
|
string label = "" ;
|
||||||
|
|
||||||
var preset = presetsCamera.Presets.FirstOrDefault(p => p.ID.Equals(i));
|
var preset = presetsCamera.Presets.FirstOrDefault(p => p.ID.Equals(i));
|
||||||
|
|
||||||
if (preset != null)
|
if (preset != null)
|
||||||
label = preset.Description;
|
label = preset.Description;
|
||||||
|
|
||||||
trilist.SetString((ushort)(joinMap.PresetLabelStart.JoinNumber + tempNum), label);
|
trilist.SetString((ushort)(joinMap.PresetLabelStart.JoinNumber + tempNum), label);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
for (int i = 0; i < joinMap.NumberOfPresets.JoinNumber; i++)
|
for (int i = 0; i < joinMap.NumberOfPresets.JoinNumber; i++)
|
||||||
{
|
{
|
||||||
int tempNum = i;
|
int tempNum = i;
|
||||||
|
|
||||||
trilist.SetSigTrueAction((ushort)(joinMap.PresetRecallStart.JoinNumber + tempNum), () =>
|
trilist.SetSigTrueAction((ushort)(joinMap.PresetRecallStart.JoinNumber + tempNum), () =>
|
||||||
{
|
{
|
||||||
presetsCamera.PresetSelect(tempNum);
|
presetsCamera.PresetSelect(tempNum);
|
||||||
});
|
});
|
||||||
trilist.SetSigTrueAction((ushort)(joinMap.PresetSaveStart.JoinNumber + tempNum), () =>
|
trilist.SetSigTrueAction((ushort)(joinMap.PresetSaveStart.JoinNumber + tempNum), () =>
|
||||||
{
|
{
|
||||||
var label = trilist.GetString((ushort)(joinMap.PresetLabelStart.JoinNumber + tempNum));
|
var label = trilist.GetString((ushort)(joinMap.PresetLabelStart.JoinNumber + tempNum));
|
||||||
|
|
||||||
presetsCamera.PresetStore(tempNum, label);
|
presetsCamera.PresetStore(tempNum, label);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,120 +1,120 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Devices.Common;
|
using PepperDash.Essentials.Devices.Common;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Bridges
|
namespace PepperDash.Essentials.Bridges
|
||||||
{
|
{
|
||||||
public static class SamsungDisplayControllerApiExtensions
|
public static class SamsungDisplayControllerApiExtensions
|
||||||
{
|
{
|
||||||
public static void LinkToApi(this PepperDash.Essentials.Core.TwoWayDisplayBase displayDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
|
public static void LinkToApi(this PepperDash.Essentials.Core.TwoWayDisplayBase displayDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
|
||||||
{
|
{
|
||||||
var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DisplayControllerJoinMap;
|
var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DisplayControllerJoinMap;
|
||||||
|
|
||||||
if (joinMap == null)
|
if (joinMap == null)
|
||||||
{
|
{
|
||||||
joinMap = new DisplayControllerJoinMap();
|
joinMap = new DisplayControllerJoinMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
joinMap.OffsetJoinNumbers(joinStart);
|
||||||
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
Debug.Console(0, "Linking to lighting Type {0}", displayDevice.GetType().Name.ToString());
|
Debug.Console(0, "Linking to lighting Type {0}", displayDevice.GetType().Name.ToString());
|
||||||
|
|
||||||
var commMonitor = displayDevice as ICommunicationMonitor;
|
var commMonitor = displayDevice as ICommunicationMonitor;
|
||||||
commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
||||||
|
|
||||||
|
|
||||||
// Poewer Off
|
// Poewer Off
|
||||||
trilist.SetSigTrueAction(joinMap.PowerOff, () => displayDevice.PowerOff());
|
trilist.SetSigTrueAction(joinMap.PowerOff, () => displayDevice.PowerOff());
|
||||||
displayDevice.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff]);
|
displayDevice.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff]);
|
||||||
|
|
||||||
// Poewer On
|
// Poewer On
|
||||||
trilist.SetSigTrueAction(joinMap.PowerOn, () => displayDevice.PowerOn());
|
trilist.SetSigTrueAction(joinMap.PowerOn, () => displayDevice.PowerOn());
|
||||||
displayDevice.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn]);
|
displayDevice.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn]);
|
||||||
|
|
||||||
// GenericLighitng Actions & FeedBack
|
// GenericLighitng Actions & FeedBack
|
||||||
|
|
||||||
// int sceneIndex = 1;
|
// int sceneIndex = 1;
|
||||||
/*
|
/*
|
||||||
foreach (var scene in displayDevice.LightingScenes)
|
foreach (var scene in displayDevice.LightingScenes)
|
||||||
{
|
{
|
||||||
var tempIndex = sceneIndex - 1;
|
var tempIndex = sceneIndex - 1;
|
||||||
//trilist.SetSigTrueAction((uint)(joinMap.LightingSceneOffset + sceneIndex), () => displayDevice.SelectScene(displayDevice.LightingScenes[tempIndex]));
|
//trilist.SetSigTrueAction((uint)(joinMap.LightingSceneOffset + sceneIndex), () => displayDevice.SelectScene(displayDevice.LightingScenes[tempIndex]));
|
||||||
scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)]);
|
scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)]);
|
||||||
trilist.StringInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)].StringValue = scene.Name;
|
trilist.StringInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)].StringValue = scene.Name;
|
||||||
trilist.BooleanInput[(uint)(joinMap.ButtonVisibilityOffset + sceneIndex)].BoolValue = true;
|
trilist.BooleanInput[(uint)(joinMap.ButtonVisibilityOffset + sceneIndex)].BoolValue = true;
|
||||||
sceneIndex++;
|
sceneIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (displayDevice.GetType().Name.ToString() == "LutronQuantumArea")
|
if (displayDevice.GetType().Name.ToString() == "LutronQuantumArea")
|
||||||
{
|
{
|
||||||
var lutronDevice = displayDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea;
|
var lutronDevice = displayDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea;
|
||||||
lutronDevice.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
lutronDevice.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
||||||
trilist.SetStringSigAction(joinMap.IntegrationIdSet, s => lutronDevice.IntegrationId = s);
|
trilist.SetStringSigAction(joinMap.IntegrationIdSet, s => lutronDevice.IntegrationId = s);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
//ApiEisc.Eisc.SetStringSigAction(ApiMap.integrationID, (s) => { lutronLights.IntegrationId = s; });
|
//ApiEisc.Eisc.SetStringSigAction(ApiMap.integrationID, (s) => { lutronLights.IntegrationId = s; });
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
var lutronLights = displayDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea;
|
var lutronLights = displayDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea;
|
||||||
|
|
||||||
|
|
||||||
for (uint i = 1; i <= lightingBase.CircuitCount; i++)
|
for (uint i = 1; i <= lightingBase.CircuitCount; i++)
|
||||||
{
|
{
|
||||||
var circuit = i;
|
var circuit = i;
|
||||||
lightingBase.CircuitNameFeedbacks[circuit - 1].LinkInputSig(trilist.StringInput[joinMap.CircuitNames + circuit]);
|
lightingBase.CircuitNameFeedbacks[circuit - 1].LinkInputSig(trilist.StringInput[joinMap.CircuitNames + circuit]);
|
||||||
lightingBase.CircuitIsCritical[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitIsCritical + circuit]);
|
lightingBase.CircuitIsCritical[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitIsCritical + circuit]);
|
||||||
lightingBase.CircuitState[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitState + circuit]);
|
lightingBase.CircuitState[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitState + circuit]);
|
||||||
trilist.SetSigTrueAction(joinMap.CircuitCycle + circuit, () => lightingBase.CycleCircuit(circuit - 1));
|
trilist.SetSigTrueAction(joinMap.CircuitCycle + circuit, () => lightingBase.CycleCircuit(circuit - 1));
|
||||||
trilist.SetSigTrueAction(joinMap.CircuitOnCmd + circuit, () => lightingBase.TurnOnCircuit(circuit - 1));
|
trilist.SetSigTrueAction(joinMap.CircuitOnCmd + circuit, () => lightingBase.TurnOnCircuit(circuit - 1));
|
||||||
trilist.SetSigTrueAction(joinMap.CircuitOffCmd + circuit, () => lightingBase.TurnOffCircuit(circuit - 1));
|
trilist.SetSigTrueAction(joinMap.CircuitOffCmd + circuit, () => lightingBase.TurnOffCircuit(circuit - 1));
|
||||||
|
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class DisplayControllerJoinMap : JoinMapBase
|
public class DisplayControllerJoinMap : JoinMapBase
|
||||||
{
|
{
|
||||||
public uint IsOnline { get; set; }
|
public uint IsOnline { get; set; }
|
||||||
public uint PowerOff { get; set; }
|
public uint PowerOff { get; set; }
|
||||||
public uint PowerOn { get; set; }
|
public uint PowerOn { get; set; }
|
||||||
public uint SelectScene { get; set; }
|
public uint SelectScene { get; set; }
|
||||||
public uint LightingSceneOffset { get; set; }
|
public uint LightingSceneOffset { get; set; }
|
||||||
public uint ButtonVisibilityOffset { get; set; }
|
public uint ButtonVisibilityOffset { get; set; }
|
||||||
public uint IntegrationIdSet { get; set; }
|
public uint IntegrationIdSet { get; set; }
|
||||||
|
|
||||||
public DisplayControllerJoinMap()
|
public DisplayControllerJoinMap()
|
||||||
{
|
{
|
||||||
// Digital
|
// Digital
|
||||||
IsOnline = 1;
|
IsOnline = 1;
|
||||||
PowerOff = 1;
|
PowerOff = 1;
|
||||||
PowerOn = 2;
|
PowerOn = 2;
|
||||||
SelectScene = 1;
|
SelectScene = 1;
|
||||||
IntegrationIdSet = 1;
|
IntegrationIdSet = 1;
|
||||||
LightingSceneOffset = 10;
|
LightingSceneOffset = 10;
|
||||||
ButtonVisibilityOffset = 40;
|
ButtonVisibilityOffset = 40;
|
||||||
// Analog
|
// Analog
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
public override void OffsetJoinNumbers(uint joinStart)
|
||||||
{
|
{
|
||||||
var joinOffset = joinStart - 1;
|
var joinOffset = joinStart - 1;
|
||||||
|
|
||||||
IsOnline = IsOnline + joinOffset;
|
IsOnline = IsOnline + joinOffset;
|
||||||
PowerOff = PowerOff + joinOffset;
|
PowerOff = PowerOff + joinOffset;
|
||||||
PowerOn = PowerOn + joinOffset;
|
PowerOn = PowerOn + joinOffset;
|
||||||
SelectScene = SelectScene + joinOffset;
|
SelectScene = SelectScene + joinOffset;
|
||||||
LightingSceneOffset = LightingSceneOffset + joinOffset;
|
LightingSceneOffset = LightingSceneOffset + joinOffset;
|
||||||
ButtonVisibilityOffset = ButtonVisibilityOffset + joinOffset;
|
ButtonVisibilityOffset = ButtonVisibilityOffset + joinOffset;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -70,7 +70,7 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
catch (NullReferenceException)
|
catch (NullReferenceException)
|
||||||
{
|
{
|
||||||
Debug.ConsoleWithLog(0, this,
|
Debug.ConsoleWithLog(0, this,
|
||||||
"Please update the bridge config to use EiscBridgeAdvanced with this device: {0}", device.Key);
|
"Please update the bridge config to use eiscApiAdvanced with this device: {0}", device.Key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Debug.Console(1, this, "Devices Linked.");
|
Debug.Console(1, this, "Devices Linked.");
|
||||||
@@ -1,144 +1,144 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core.Routing;
|
using PepperDash.Essentials.Core.Routing;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.EthernetCommunication;
|
using Crestron.SimplSharpPro.EthernetCommunication;
|
||||||
using Crestron.SimplSharpPro.CrestronThread;
|
using Crestron.SimplSharpPro.CrestronThread;
|
||||||
|
|
||||||
namespace PepperDash.Essentials {
|
namespace PepperDash.Essentials {
|
||||||
public class EssentialCommConfig {
|
public class EssentialCommConfig {
|
||||||
public string[] EiscApiIpids;
|
public string[] EiscApiIpids;
|
||||||
public EssentialCommCommConnectionConfigs[] CommConnections;
|
public EssentialCommCommConnectionConfigs[] CommConnections;
|
||||||
}
|
}
|
||||||
public class EssentialCommCommConnectionConfigs {
|
public class EssentialCommCommConnectionConfigs {
|
||||||
public uint joinNumber {get; set; }
|
public uint joinNumber {get; set; }
|
||||||
public EssentialsControlPropertiesConfig control { get; set; }
|
public EssentialsControlPropertiesConfig control { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EssentialCommsPort {
|
public class EssentialCommsPort {
|
||||||
public IBasicCommunication Comm;
|
public IBasicCommunication Comm;
|
||||||
public IntFeedback StatusFeedback;
|
public IntFeedback StatusFeedback;
|
||||||
public BoolFeedback ConnectedFeedback;
|
public BoolFeedback ConnectedFeedback;
|
||||||
public List<EssentialComApiMap> Outputs = new List<EssentialComApiMap>();
|
public List<EssentialComApiMap> Outputs = new List<EssentialComApiMap>();
|
||||||
public String RxBuffer;
|
public String RxBuffer;
|
||||||
public EssentialCommsPort(EssentialsControlPropertiesConfig config, string keyPrefix) {
|
public EssentialCommsPort(EssentialsControlPropertiesConfig config, string keyPrefix) {
|
||||||
Comm = CommFactory.CreateCommForConfig(config, keyPrefix);
|
Comm = CommFactory.CreateCommForConfig(config, keyPrefix);
|
||||||
// var PortGather = new CommunicationGather(Comm, config.EndOfLineChar);
|
// var PortGather = new CommunicationGather(Comm, config.EndOfLineChar);
|
||||||
Comm.TextReceived += new EventHandler<GenericCommMethodReceiveTextArgs>(Communication_TextReceived);
|
Comm.TextReceived += new EventHandler<GenericCommMethodReceiveTextArgs>(Communication_TextReceived);
|
||||||
|
|
||||||
var socket = Comm as ISocketStatus;
|
var socket = Comm as ISocketStatus;
|
||||||
StatusFeedback = new IntFeedback(() => { return (int)socket.ClientStatus; });
|
StatusFeedback = new IntFeedback(() => { return (int)socket.ClientStatus; });
|
||||||
ConnectedFeedback = new BoolFeedback(() => { return Comm.IsConnected; });
|
ConnectedFeedback = new BoolFeedback(() => { return Comm.IsConnected; });
|
||||||
|
|
||||||
if (socket != null) {
|
if (socket != null) {
|
||||||
socket.ConnectionChange += new EventHandler<GenericSocketStatusChageEventArgs>(socket_ConnectionChange);
|
socket.ConnectionChange += new EventHandler<GenericSocketStatusChageEventArgs>(socket_ConnectionChange);
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e) {
|
void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e) {
|
||||||
StatusFeedback.FireUpdate();
|
StatusFeedback.FireUpdate();
|
||||||
ConnectedFeedback.FireUpdate();
|
ConnectedFeedback.FireUpdate();
|
||||||
if (e.Client.IsConnected) {
|
if (e.Client.IsConnected) {
|
||||||
// Tasks on connect
|
// Tasks on connect
|
||||||
} else {
|
} else {
|
||||||
// Cleanup items from this session
|
// Cleanup items from this session
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void Communication_TextReceived(object sender, GenericCommMethodReceiveTextArgs args) {
|
void Communication_TextReceived(object sender, GenericCommMethodReceiveTextArgs args) {
|
||||||
try {
|
try {
|
||||||
foreach (var Output in Outputs) {
|
foreach (var Output in Outputs) {
|
||||||
Output.Api.Eisc.StringInput[Output.Join].StringValue = args.Text;
|
Output.Api.Eisc.StringInput[Output.Join].StringValue = args.Text;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception) {
|
catch (Exception) {
|
||||||
throw new FormatException(string.Format("ERROR:{0}"));
|
throw new FormatException(string.Format("ERROR:{0}"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EssentialComm : Device {
|
public class EssentialComm : Device {
|
||||||
public EssentialCommConfig Properties;
|
public EssentialCommConfig Properties;
|
||||||
|
|
||||||
public CommunicationGather PortGather { get; private set; }
|
public CommunicationGather PortGather { get; private set; }
|
||||||
public List<BridgeApiEisc> Apis {get; set;}
|
public List<BridgeApiEisc> Apis {get; set;}
|
||||||
public Dictionary<string, StringFeedback> CommFeedbacks {get; private set; }
|
public Dictionary<string, StringFeedback> CommFeedbacks {get; private set; }
|
||||||
public StatusMonitorBase CommunicationMonitor { get; private set; }
|
public StatusMonitorBase CommunicationMonitor { get; private set; }
|
||||||
public Dictionary<uint, EssentialCommsPort> CommDictionary { get; private set; }
|
public Dictionary<uint, EssentialCommsPort> CommDictionary { get; private set; }
|
||||||
|
|
||||||
public EssentialComm(string key, string name, JToken properties) : base(key, name) {
|
public EssentialComm(string key, string name, JToken properties) : base(key, name) {
|
||||||
Properties = JsonConvert.DeserializeObject<EssentialCommConfig>(properties.ToString());
|
Properties = JsonConvert.DeserializeObject<EssentialCommConfig>(properties.ToString());
|
||||||
CommFeedbacks = new Dictionary<string, StringFeedback>();
|
CommFeedbacks = new Dictionary<string, StringFeedback>();
|
||||||
CommDictionary = new Dictionary<uint, EssentialCommsPort>();
|
CommDictionary = new Dictionary<uint, EssentialCommsPort>();
|
||||||
Apis = new List<BridgeApiEisc>();
|
Apis = new List<BridgeApiEisc>();
|
||||||
int commNumber = 1;
|
int commNumber = 1;
|
||||||
foreach (var commConfig in Properties.CommConnections) {
|
foreach (var commConfig in Properties.CommConnections) {
|
||||||
var commPort = new EssentialCommsPort(commConfig.control, string.Format("{0}-{1}", this.Key, commConfig.joinNumber));
|
var commPort = new EssentialCommsPort(commConfig.control, string.Format("{0}-{1}", this.Key, commConfig.joinNumber));
|
||||||
CommDictionary.Add(commConfig.joinNumber, commPort);
|
CommDictionary.Add(commConfig.joinNumber, commPort);
|
||||||
|
|
||||||
commNumber++;
|
commNumber++;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var Ipid in Properties.EiscApiIpids) {
|
foreach (var Ipid in Properties.EiscApiIpids) {
|
||||||
var ApiEisc = new BridgeApiEisc(Ipid);
|
var ApiEisc = new BridgeApiEisc(Ipid);
|
||||||
Apis.Add(ApiEisc);
|
Apis.Add(ApiEisc);
|
||||||
foreach (var commConnection in CommDictionary) {
|
foreach (var commConnection in CommDictionary) {
|
||||||
Debug.Console(2, "Joining Api{0} to comm {1}", Ipid, commConnection.Key);
|
Debug.Console(2, "Joining Api{0} to comm {1}", Ipid, commConnection.Key);
|
||||||
var tempComm = commConnection.Value;
|
var tempComm = commConnection.Value;
|
||||||
var tempJoin = (uint)commConnection.Key;
|
var tempJoin = (uint)commConnection.Key;
|
||||||
EssentialComApiMap ApiMap = new EssentialComApiMap(ApiEisc, (uint)tempJoin);
|
EssentialComApiMap ApiMap = new EssentialComApiMap(ApiEisc, (uint)tempJoin);
|
||||||
|
|
||||||
tempComm.Outputs.Add(ApiMap);
|
tempComm.Outputs.Add(ApiMap);
|
||||||
// Check for ApiMap Overide Values here
|
// Check for ApiMap Overide Values here
|
||||||
|
|
||||||
ApiEisc.Eisc.SetBoolSigAction(tempJoin, b => {if (b) { tempComm.Comm.Connect(); } else { tempComm.Comm.Disconnect(); }});
|
ApiEisc.Eisc.SetBoolSigAction(tempJoin, b => {if (b) { tempComm.Comm.Connect(); } else { tempComm.Comm.Disconnect(); }});
|
||||||
ApiEisc.Eisc.SetStringSigAction(tempJoin, s => tempComm.Comm.SendText(s));
|
ApiEisc.Eisc.SetStringSigAction(tempJoin, s => tempComm.Comm.SendText(s));
|
||||||
|
|
||||||
tempComm.StatusFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[tempJoin]);
|
tempComm.StatusFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[tempJoin]);
|
||||||
tempComm.ConnectedFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[tempJoin]);
|
tempComm.ConnectedFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[tempJoin]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
ApiEisc.Eisc.Register();
|
ApiEisc.Eisc.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public override bool CustomActivate()
|
public override bool CustomActivate()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Debug.Console(2, "Name {0} Activated", this.Name);
|
Debug.Console(2, "Name {0} Activated", this.Name);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
Debug.Console(0, "Bridge {0}", e);
|
Debug.Console(0, "Bridge {0}", e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public class EssentialComApiMap {
|
public class EssentialComApiMap {
|
||||||
public uint Join;
|
public uint Join;
|
||||||
public BridgeApiEisc Api;
|
public BridgeApiEisc Api;
|
||||||
public uint connectJoin;
|
public uint connectJoin;
|
||||||
public EssentialComApiMap(BridgeApiEisc api, uint join) {
|
public EssentialComApiMap(BridgeApiEisc api, uint join) {
|
||||||
Join = join;
|
Join = join;
|
||||||
Api = api;
|
Api = api;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,150 +1,150 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Essentials.DM;
|
using PepperDash.Essentials.DM;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core.Routing;
|
using PepperDash.Essentials.Core.Routing;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.EthernetCommunication;
|
using Crestron.SimplSharpPro.EthernetCommunication;
|
||||||
using Crestron.SimplSharpPro.DM;
|
using Crestron.SimplSharpPro.DM;
|
||||||
|
|
||||||
namespace PepperDash.Essentials {
|
namespace PepperDash.Essentials {
|
||||||
public class EssentialDM : PepperDash.Core.Device {
|
public class EssentialDM : PepperDash.Core.Device {
|
||||||
public EssentialDMProperties Properties;
|
public EssentialDMProperties Properties;
|
||||||
public List<BridgeApiEisc> BridgeApiEiscs;
|
public List<BridgeApiEisc> BridgeApiEiscs;
|
||||||
private PepperDash.Essentials.DM.DmChassisController DmSwitch;
|
private PepperDash.Essentials.DM.DmChassisController DmSwitch;
|
||||||
private EssentialDMApiMap ApiMap = new EssentialDMApiMap();
|
private EssentialDMApiMap ApiMap = new EssentialDMApiMap();
|
||||||
public EssentialDM(string key, string name, JToken properties)
|
public EssentialDM(string key, string name, JToken properties)
|
||||||
: base(key, name) {
|
: base(key, name) {
|
||||||
Properties = JsonConvert.DeserializeObject<EssentialDMProperties>(properties.ToString());
|
Properties = JsonConvert.DeserializeObject<EssentialDMProperties>(properties.ToString());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public override bool CustomActivate() {
|
public override bool CustomActivate() {
|
||||||
// Create EiscApis
|
// Create EiscApis
|
||||||
try {
|
try {
|
||||||
foreach (var device in DeviceManager.AllDevices) {
|
foreach (var device in DeviceManager.AllDevices) {
|
||||||
if (device.Key == this.Properties.connectionDeviceKey) {
|
if (device.Key == this.Properties.connectionDeviceKey) {
|
||||||
Debug.Console(2, "deviceKey {0} Matches", device.Key);
|
Debug.Console(2, "deviceKey {0} Matches", device.Key);
|
||||||
DmSwitch = DeviceManager.GetDeviceForKey(device.Key) as PepperDash.Essentials.DM.DmChassisController;
|
DmSwitch = DeviceManager.GetDeviceForKey(device.Key) as PepperDash.Essentials.DM.DmChassisController;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
else {
|
else {
|
||||||
Debug.Console(2, "deviceKey {0} doesn't match", device.Key);
|
Debug.Console(2, "deviceKey {0} doesn't match", device.Key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Properties.EiscApiIpids != null) {
|
if (Properties.EiscApiIpids != null) {
|
||||||
|
|
||||||
|
|
||||||
foreach (string Ipid in Properties.EiscApiIpids) {
|
foreach (string Ipid in Properties.EiscApiIpids) {
|
||||||
var ApiEisc = new BridgeApiEisc(Ipid);
|
var ApiEisc = new BridgeApiEisc(Ipid);
|
||||||
for (uint x = 1; x <= DmSwitch.Chassis.NumberOfInputs;x++ ) {
|
for (uint x = 1; x <= DmSwitch.Chassis.NumberOfInputs;x++ ) {
|
||||||
uint tempX = x;
|
uint tempX = x;
|
||||||
Debug.Console(2, "Creating EiscActions {0}", tempX);
|
Debug.Console(2, "Creating EiscActions {0}", tempX);
|
||||||
|
|
||||||
|
|
||||||
ApiEisc.Eisc.SetUShortSigAction(ApiMap.OutputVideoRoutes[tempX], u => DmSwitch.ExecuteSwitch(u, tempX, eRoutingSignalType.Video));
|
ApiEisc.Eisc.SetUShortSigAction(ApiMap.OutputVideoRoutes[tempX], u => DmSwitch.ExecuteSwitch(u, tempX, eRoutingSignalType.Video));
|
||||||
ApiEisc.Eisc.SetUShortSigAction(ApiMap.OutputAudioRoutes[tempX], u => DmSwitch.ExecuteSwitch(u, tempX, eRoutingSignalType.Audio));
|
ApiEisc.Eisc.SetUShortSigAction(ApiMap.OutputAudioRoutes[tempX], u => DmSwitch.ExecuteSwitch(u, tempX, eRoutingSignalType.Audio));
|
||||||
|
|
||||||
|
|
||||||
if (DmSwitch.TxDictionary.ContainsKey(tempX)) {
|
if (DmSwitch.TxDictionary.ContainsKey(tempX)) {
|
||||||
Debug.Console(2, "Creating Tx Feedbacks {0}", tempX);
|
Debug.Console(2, "Creating Tx Feedbacks {0}", tempX);
|
||||||
var TxKey = DmSwitch.TxDictionary[tempX];
|
var TxKey = DmSwitch.TxDictionary[tempX];
|
||||||
var TxDevice = DeviceManager.GetDeviceForKey(TxKey) as DmTxControllerBase;
|
var TxDevice = DeviceManager.GetDeviceForKey(TxKey) as DmTxControllerBase;
|
||||||
TxDevice.IsOnline.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.TxOnlineStatus[tempX]]);
|
TxDevice.IsOnline.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.TxOnlineStatus[tempX]]);
|
||||||
TxDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.TxVideoSyncStatus[tempX]]);
|
TxDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.TxVideoSyncStatus[tempX]]);
|
||||||
ApiEisc.Eisc.SetUShortSigAction((ApiMap.HdcpSupport[tempX]), u => TxDevice.SetHdcpSupportAll((ePdtHdcpSupport)(u)));
|
ApiEisc.Eisc.SetUShortSigAction((ApiMap.HdcpSupport[tempX]), u => TxDevice.SetHdcpSupportAll((ePdtHdcpSupport)(u)));
|
||||||
TxDevice.HdcpSupportAllFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.HdcpSupport[tempX]]);
|
TxDevice.HdcpSupportAllFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.HdcpSupport[tempX]]);
|
||||||
ApiEisc.Eisc.UShortInput[ApiMap.HdcpSupportCapability[tempX]].UShortValue = TxDevice.HdcpSupportCapability;
|
ApiEisc.Eisc.UShortInput[ApiMap.HdcpSupportCapability[tempX]].UShortValue = TxDevice.HdcpSupportCapability;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DmSwitch.VideoInputSyncFeedbacks[tempX].LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.TxVideoSyncStatus[tempX]]);
|
DmSwitch.VideoInputSyncFeedbacks[tempX].LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.TxVideoSyncStatus[tempX]]);
|
||||||
}
|
}
|
||||||
if (DmSwitch.RxDictionary.ContainsKey(tempX)) {
|
if (DmSwitch.RxDictionary.ContainsKey(tempX)) {
|
||||||
Debug.Console(2, "Creating Rx Feedbacks {0}", tempX);
|
Debug.Console(2, "Creating Rx Feedbacks {0}", tempX);
|
||||||
var RxKey = DmSwitch.RxDictionary[tempX];
|
var RxKey = DmSwitch.RxDictionary[tempX];
|
||||||
var RxDevice = DeviceManager.GetDeviceForKey(RxKey) as DmRmcControllerBase;
|
var RxDevice = DeviceManager.GetDeviceForKey(RxKey) as DmRmcControllerBase;
|
||||||
RxDevice.IsOnline.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.RxOnlineStatus[tempX]]);
|
RxDevice.IsOnline.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.RxOnlineStatus[tempX]]);
|
||||||
}
|
}
|
||||||
// DmSwitch.InputEndpointOnlineFeedbacks[(ushort)tempOutputNum].LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.OutputVideoRoutes[tempOutputNum]]);
|
// DmSwitch.InputEndpointOnlineFeedbacks[(ushort)tempOutputNum].LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.OutputVideoRoutes[tempOutputNum]]);
|
||||||
DmSwitch.VideoOutputFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.OutputVideoRoutes[tempX]]);
|
DmSwitch.VideoOutputFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.OutputVideoRoutes[tempX]]);
|
||||||
DmSwitch.AudioOutputFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.OutputAudioRoutes[tempX]]);
|
DmSwitch.AudioOutputFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.OutputAudioRoutes[tempX]]);
|
||||||
DmSwitch.InputNameFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.StringInput[ApiMap.InputNames[tempX]]);
|
DmSwitch.InputNameFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.StringInput[ApiMap.InputNames[tempX]]);
|
||||||
DmSwitch.OutputNameFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.StringInput[ApiMap.OutputNames[tempX]]);
|
DmSwitch.OutputNameFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.StringInput[ApiMap.OutputNames[tempX]]);
|
||||||
DmSwitch.OutputRouteNameFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.StringInput[ApiMap.OutputRouteNames[tempX]]);
|
DmSwitch.OutputRouteNameFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.StringInput[ApiMap.OutputRouteNames[tempX]]);
|
||||||
}
|
}
|
||||||
DmSwitch.IsOnline.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.ChassisOnline]);
|
DmSwitch.IsOnline.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.ChassisOnline]);
|
||||||
ApiEisc.Eisc.Register();
|
ApiEisc.Eisc.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Debug.Console(2, "Name {0} Activated", this.Name);
|
Debug.Console(2, "Name {0} Activated", this.Name);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
Debug.Console(2, "BRidge {0}", e);
|
Debug.Console(2, "BRidge {0}", e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class EssentialDMProperties {
|
public class EssentialDMProperties {
|
||||||
public string connectionDeviceKey;
|
public string connectionDeviceKey;
|
||||||
public string[] EiscApiIpids;
|
public string[] EiscApiIpids;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class EssentialDMApiMap {
|
public class EssentialDMApiMap {
|
||||||
public ushort ChassisOnline = 11;
|
public ushort ChassisOnline = 11;
|
||||||
public Dictionary<uint, ushort> OutputVideoRoutes;
|
public Dictionary<uint, ushort> OutputVideoRoutes;
|
||||||
public Dictionary<uint, ushort> OutputAudioRoutes;
|
public Dictionary<uint, ushort> OutputAudioRoutes;
|
||||||
public Dictionary<uint, ushort> TxOnlineStatus;
|
public Dictionary<uint, ushort> TxOnlineStatus;
|
||||||
public Dictionary<uint, ushort> RxOnlineStatus;
|
public Dictionary<uint, ushort> RxOnlineStatus;
|
||||||
public Dictionary<uint, ushort> TxVideoSyncStatus;
|
public Dictionary<uint, ushort> TxVideoSyncStatus;
|
||||||
public Dictionary<uint, ushort> InputNames;
|
public Dictionary<uint, ushort> InputNames;
|
||||||
public Dictionary<uint, ushort> OutputNames;
|
public Dictionary<uint, ushort> OutputNames;
|
||||||
public Dictionary<uint, ushort> OutputRouteNames;
|
public Dictionary<uint, ushort> OutputRouteNames;
|
||||||
public Dictionary<uint, ushort> HdcpSupport;
|
public Dictionary<uint, ushort> HdcpSupport;
|
||||||
public Dictionary<uint, ushort> HdcpSupportCapability;
|
public Dictionary<uint, ushort> HdcpSupportCapability;
|
||||||
|
|
||||||
public EssentialDMApiMap() {
|
public EssentialDMApiMap() {
|
||||||
OutputVideoRoutes = new Dictionary<uint, ushort>();
|
OutputVideoRoutes = new Dictionary<uint, ushort>();
|
||||||
OutputAudioRoutes = new Dictionary<uint, ushort>();
|
OutputAudioRoutes = new Dictionary<uint, ushort>();
|
||||||
TxOnlineStatus = new Dictionary<uint, ushort>();
|
TxOnlineStatus = new Dictionary<uint, ushort>();
|
||||||
RxOnlineStatus = new Dictionary<uint, ushort>();
|
RxOnlineStatus = new Dictionary<uint, ushort>();
|
||||||
TxVideoSyncStatus = new Dictionary<uint, ushort>();
|
TxVideoSyncStatus = new Dictionary<uint, ushort>();
|
||||||
InputNames = new Dictionary<uint, ushort>();
|
InputNames = new Dictionary<uint, ushort>();
|
||||||
OutputNames = new Dictionary<uint, ushort>();
|
OutputNames = new Dictionary<uint, ushort>();
|
||||||
OutputRouteNames = new Dictionary<uint, ushort>();
|
OutputRouteNames = new Dictionary<uint, ushort>();
|
||||||
HdcpSupport = new Dictionary<uint, ushort>();
|
HdcpSupport = new Dictionary<uint, ushort>();
|
||||||
HdcpSupportCapability = new Dictionary<uint, ushort>();
|
HdcpSupportCapability = new Dictionary<uint, ushort>();
|
||||||
|
|
||||||
for (uint x = 1; x <= 200; x++) {
|
for (uint x = 1; x <= 200; x++) {
|
||||||
// Debug.Console(0, "Init Value {0}", x);
|
// Debug.Console(0, "Init Value {0}", x);
|
||||||
uint tempNum = x;
|
uint tempNum = x;
|
||||||
HdcpSupportCapability[tempNum] = (ushort)(tempNum + 1200);
|
HdcpSupportCapability[tempNum] = (ushort)(tempNum + 1200);
|
||||||
HdcpSupport[tempNum] = (ushort)(tempNum + 1000);
|
HdcpSupport[tempNum] = (ushort)(tempNum + 1000);
|
||||||
OutputVideoRoutes[tempNum] = (ushort)(tempNum + 100);
|
OutputVideoRoutes[tempNum] = (ushort)(tempNum + 100);
|
||||||
OutputAudioRoutes[tempNum] = (ushort)(tempNum + 300);
|
OutputAudioRoutes[tempNum] = (ushort)(tempNum + 300);
|
||||||
TxOnlineStatus[tempNum] = (ushort)(tempNum + 500);
|
TxOnlineStatus[tempNum] = (ushort)(tempNum + 500);
|
||||||
RxOnlineStatus[tempNum] = (ushort)(tempNum + 700);
|
RxOnlineStatus[tempNum] = (ushort)(tempNum + 700);
|
||||||
TxVideoSyncStatus[tempNum] = (ushort)(tempNum + 100);
|
TxVideoSyncStatus[tempNum] = (ushort)(tempNum + 100);
|
||||||
InputNames[tempNum] = (ushort)(tempNum + 100);
|
InputNames[tempNum] = (ushort)(tempNum + 100);
|
||||||
OutputNames[tempNum] = (ushort)(tempNum + 300);
|
OutputNames[tempNum] = (ushort)(tempNum + 300);
|
||||||
OutputRouteNames[tempNum] = (ushort)(tempNum + 2000);
|
OutputRouteNames[tempNum] = (ushort)(tempNum + 2000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,217 +1,217 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Essentials.DM;
|
using PepperDash.Essentials.DM;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core.Routing;
|
using PepperDash.Essentials.Core.Routing;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.EthernetCommunication;
|
using Crestron.SimplSharpPro.EthernetCommunication;
|
||||||
using Crestron.SimplSharpPro.DM;
|
using Crestron.SimplSharpPro.DM;
|
||||||
|
|
||||||
namespace PepperDash.Essentials {
|
namespace PepperDash.Essentials {
|
||||||
public class EssentialDsp : PepperDash.Core.Device {
|
public class EssentialDsp : PepperDash.Core.Device {
|
||||||
public EssentialDspProperties Properties;
|
public EssentialDspProperties Properties;
|
||||||
public List<BridgeApiEisc> BridgeApiEiscs;
|
public List<BridgeApiEisc> BridgeApiEiscs;
|
||||||
private PepperDash.Essentials.Devices.Common.DSP.QscDsp Dsp;
|
private PepperDash.Essentials.Devices.Common.DSP.QscDsp Dsp;
|
||||||
private EssentialDspApiMap ApiMap = new EssentialDspApiMap();
|
private EssentialDspApiMap ApiMap = new EssentialDspApiMap();
|
||||||
public EssentialDsp(string key, string name, JToken properties)
|
public EssentialDsp(string key, string name, JToken properties)
|
||||||
: base(key, name) {
|
: base(key, name) {
|
||||||
Properties = JsonConvert.DeserializeObject<EssentialDspProperties>(properties.ToString());
|
Properties = JsonConvert.DeserializeObject<EssentialDspProperties>(properties.ToString());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public override bool CustomActivate() {
|
public override bool CustomActivate() {
|
||||||
// Create EiscApis
|
// Create EiscApis
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ICommunicationMonitor comm = null;
|
ICommunicationMonitor comm = null;
|
||||||
foreach (var device in DeviceManager.AllDevices)
|
foreach (var device in DeviceManager.AllDevices)
|
||||||
{
|
{
|
||||||
if (device.Key == this.Properties.connectionDeviceKey)
|
if (device.Key == this.Properties.connectionDeviceKey)
|
||||||
{
|
{
|
||||||
if (!(device is ICommunicationMonitor))
|
if (!(device is ICommunicationMonitor))
|
||||||
{
|
{
|
||||||
comm = device as ICommunicationMonitor;
|
comm = device as ICommunicationMonitor;
|
||||||
}
|
}
|
||||||
Debug.Console(2, "deviceKey {0} Matches", device.Key);
|
Debug.Console(2, "deviceKey {0} Matches", device.Key);
|
||||||
Dsp = DeviceManager.GetDeviceForKey(device.Key) as PepperDash.Essentials.Devices.Common.DSP.QscDsp;
|
Dsp = DeviceManager.GetDeviceForKey(device.Key) as PepperDash.Essentials.Devices.Common.DSP.QscDsp;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Console(2, "deviceKey {0} doesn't match", device.Key);
|
Debug.Console(2, "deviceKey {0} doesn't match", device.Key);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Properties.EiscApiIpids != null && Dsp != null)
|
if (Properties.EiscApiIpids != null && Dsp != null)
|
||||||
{
|
{
|
||||||
foreach (string Ipid in Properties.EiscApiIpids)
|
foreach (string Ipid in Properties.EiscApiIpids)
|
||||||
{
|
{
|
||||||
var ApiEisc = new BridgeApiEisc(Ipid);
|
var ApiEisc = new BridgeApiEisc(Ipid);
|
||||||
Debug.Console(2, "Connecting EiscApi {0} to {1}", ApiEisc.Ipid, Dsp.Name);
|
Debug.Console(2, "Connecting EiscApi {0} to {1}", ApiEisc.Ipid, Dsp.Name);
|
||||||
ushort x = 1;
|
ushort x = 1;
|
||||||
if (comm != null)
|
if (comm != null)
|
||||||
{
|
{
|
||||||
comm.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.Online]);
|
comm.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.Online]);
|
||||||
}
|
}
|
||||||
foreach (var channel in Dsp.LevelControlPoints)
|
foreach (var channel in Dsp.LevelControlPoints)
|
||||||
{
|
{
|
||||||
//var QscChannel = channel.Value as PepperDash.Essentials.Devices.Common.DSP.QscDspLevelControl;
|
//var QscChannel = channel.Value as PepperDash.Essentials.Devices.Common.DSP.QscDspLevelControl;
|
||||||
Debug.Console(2, "QscChannel {0} connect", x);
|
Debug.Console(2, "QscChannel {0} connect", x);
|
||||||
|
|
||||||
var genericChannel = channel.Value as IBasicVolumeWithFeedback;
|
var genericChannel = channel.Value as IBasicVolumeWithFeedback;
|
||||||
if (channel.Value.Enabled)
|
if (channel.Value.Enabled)
|
||||||
{
|
{
|
||||||
ApiEisc.Eisc.StringInput[ApiMap.channelName[x]].StringValue = channel.Value.LevelCustomName;
|
ApiEisc.Eisc.StringInput[ApiMap.channelName[x]].StringValue = channel.Value.LevelCustomName;
|
||||||
ApiEisc.Eisc.UShortInput[ApiMap.channelType[x]].UShortValue = (ushort)channel.Value.Type;
|
ApiEisc.Eisc.UShortInput[ApiMap.channelType[x]].UShortValue = (ushort)channel.Value.Type;
|
||||||
|
|
||||||
genericChannel.MuteFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.channelMuteToggle[x]]);
|
genericChannel.MuteFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.channelMuteToggle[x]]);
|
||||||
genericChannel.VolumeLevelFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.channelVolume[x]]);
|
genericChannel.VolumeLevelFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.channelVolume[x]]);
|
||||||
|
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.channelMuteToggle[x], () => genericChannel.MuteToggle());
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.channelMuteToggle[x], () => genericChannel.MuteToggle());
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.channelMuteOn[x], () => genericChannel.MuteOn());
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.channelMuteOn[x], () => genericChannel.MuteOn());
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.channelMuteOff[x], () => genericChannel.MuteOff());
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.channelMuteOff[x], () => genericChannel.MuteOff());
|
||||||
|
|
||||||
ApiEisc.Eisc.SetBoolSigAction(ApiMap.channelVolumeUp[x], b => genericChannel.VolumeUp(b));
|
ApiEisc.Eisc.SetBoolSigAction(ApiMap.channelVolumeUp[x], b => genericChannel.VolumeUp(b));
|
||||||
ApiEisc.Eisc.SetBoolSigAction(ApiMap.channelVolumeDown[x], b => genericChannel.VolumeDown(b));
|
ApiEisc.Eisc.SetBoolSigAction(ApiMap.channelVolumeDown[x], b => genericChannel.VolumeDown(b));
|
||||||
|
|
||||||
ApiEisc.Eisc.SetUShortSigAction(ApiMap.channelVolume[x], u => genericChannel.SetVolume(u));
|
ApiEisc.Eisc.SetUShortSigAction(ApiMap.channelVolume[x], u => genericChannel.SetVolume(u));
|
||||||
ApiEisc.Eisc.SetStringSigAction(ApiMap.presetString, s => Dsp.RunPreset(s));
|
ApiEisc.Eisc.SetStringSigAction(ApiMap.presetString, s => Dsp.RunPreset(s));
|
||||||
}
|
}
|
||||||
x++;
|
x++;
|
||||||
|
|
||||||
}
|
}
|
||||||
x = 1;
|
x = 1;
|
||||||
foreach (var preset in Dsp.PresetList)
|
foreach (var preset in Dsp.PresetList)
|
||||||
{
|
{
|
||||||
ApiEisc.Eisc.StringInput[ApiMap.presets[x]].StringValue = preset.label;
|
ApiEisc.Eisc.StringInput[ApiMap.presets[x]].StringValue = preset.label;
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.presets[x], () => Dsp.RunPresetNumber(x));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.presets[x], () => Dsp.RunPresetNumber(x));
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
foreach (var dialer in Dsp.Dialers)
|
foreach (var dialer in Dsp.Dialers)
|
||||||
{
|
{
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad0, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num0));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad0, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num0));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad1, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num1));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad1, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num1));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad2, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num2));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad2, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num2));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad3, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num3));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad3, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num3));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad4, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num4));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad4, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num4));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad5, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num5));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad5, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num5));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad6, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num6));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad6, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num6));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad7, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num7));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad7, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num7));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad8, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num8));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad8, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num8));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad9, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num9));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad9, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num9));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.KeypadStar, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Star));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.KeypadStar, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Star));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.KeypadPound, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Pound));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.KeypadPound, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Pound));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.KeypadClear, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Clear));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.KeypadClear, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Clear));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.KeypadBackspace, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Backspace));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.KeypadBackspace, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Backspace));
|
||||||
|
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Dial, () => dialer.Value.Dial());
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Dial, () => dialer.Value.Dial());
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.DoNotDisturbToggle, () => dialer.Value.DoNotDisturbToggle());
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.DoNotDisturbToggle, () => dialer.Value.DoNotDisturbToggle());
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.DoNotDisturbOn, () => dialer.Value.DoNotDisturbOn());
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.DoNotDisturbOn, () => dialer.Value.DoNotDisturbOn());
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.DoNotDisturbOff, () => dialer.Value.DoNotDisturbOff());
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.DoNotDisturbOff, () => dialer.Value.DoNotDisturbOff());
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.AutoAnswerToggle, () => dialer.Value.AutoAnswerToggle());
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.AutoAnswerToggle, () => dialer.Value.AutoAnswerToggle());
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.AutoAnswerOn, () => dialer.Value.AutoAnswerOn());
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.AutoAnswerOn, () => dialer.Value.AutoAnswerOn());
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.AutoAnswerOff, () => dialer.Value.AutoAnswerOff());
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.AutoAnswerOff, () => dialer.Value.AutoAnswerOff());
|
||||||
|
|
||||||
dialer.Value.DoNotDisturbFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.DoNotDisturbToggle]);
|
dialer.Value.DoNotDisturbFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.DoNotDisturbToggle]);
|
||||||
dialer.Value.DoNotDisturbFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.DoNotDisturbOn]);
|
dialer.Value.DoNotDisturbFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.DoNotDisturbOn]);
|
||||||
dialer.Value.DoNotDisturbFeedback.LinkComplementInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.DoNotDisturbOff]);
|
dialer.Value.DoNotDisturbFeedback.LinkComplementInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.DoNotDisturbOff]);
|
||||||
|
|
||||||
dialer.Value.AutoAnswerFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.AutoAnswerToggle]);
|
dialer.Value.AutoAnswerFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.AutoAnswerToggle]);
|
||||||
dialer.Value.AutoAnswerFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.AutoAnswerOn]);
|
dialer.Value.AutoAnswerFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.AutoAnswerOn]);
|
||||||
dialer.Value.AutoAnswerFeedback.LinkComplementInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.AutoAnswerOff]);
|
dialer.Value.AutoAnswerFeedback.LinkComplementInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.AutoAnswerOff]);
|
||||||
|
|
||||||
dialer.Value.OffHookFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.Dial]);
|
dialer.Value.OffHookFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.Dial]);
|
||||||
dialer.Value.DialStringFeedback.LinkInputSig(ApiEisc.Eisc.StringInput[ApiMap.DialString]);
|
dialer.Value.DialStringFeedback.LinkInputSig(ApiEisc.Eisc.StringInput[ApiMap.DialString]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Debug.Console(2, "Name {0} Activated", this.Name);
|
Debug.Console(2, "Name {0} Activated", this.Name);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
Debug.Console(0, "Bridge {0}", e);
|
Debug.Console(0, "Bridge {0}", e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class EssentialDspProperties {
|
public class EssentialDspProperties {
|
||||||
public string connectionDeviceKey;
|
public string connectionDeviceKey;
|
||||||
public string[] EiscApiIpids;
|
public string[] EiscApiIpids;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class EssentialDspApiMap {
|
public class EssentialDspApiMap {
|
||||||
public ushort Online = 1;
|
public ushort Online = 1;
|
||||||
public ushort presetString = 2000;
|
public ushort presetString = 2000;
|
||||||
public Dictionary<uint, ushort> channelMuteToggle;
|
public Dictionary<uint, ushort> channelMuteToggle;
|
||||||
public Dictionary<uint, ushort> channelMuteOn;
|
public Dictionary<uint, ushort> channelMuteOn;
|
||||||
public Dictionary<uint, ushort> channelMuteOff;
|
public Dictionary<uint, ushort> channelMuteOff;
|
||||||
public Dictionary<uint, ushort> channelVolume;
|
public Dictionary<uint, ushort> channelVolume;
|
||||||
public Dictionary<uint, ushort> channelType;
|
public Dictionary<uint, ushort> channelType;
|
||||||
public Dictionary<uint, ushort> channelName;
|
public Dictionary<uint, ushort> channelName;
|
||||||
public Dictionary<uint, ushort> channelVolumeUp;
|
public Dictionary<uint, ushort> channelVolumeUp;
|
||||||
public Dictionary<uint, ushort> channelVolumeDown;
|
public Dictionary<uint, ushort> channelVolumeDown;
|
||||||
public Dictionary<uint, ushort> presets;
|
public Dictionary<uint, ushort> presets;
|
||||||
public ushort DialString = 3100;
|
public ushort DialString = 3100;
|
||||||
public ushort Keypad0 = 3110;
|
public ushort Keypad0 = 3110;
|
||||||
public ushort Keypad1 = 3111;
|
public ushort Keypad1 = 3111;
|
||||||
public ushort Keypad2 = 3112;
|
public ushort Keypad2 = 3112;
|
||||||
public ushort Keypad3 = 3113;
|
public ushort Keypad3 = 3113;
|
||||||
public ushort Keypad4 = 3114;
|
public ushort Keypad4 = 3114;
|
||||||
public ushort Keypad5 = 3115;
|
public ushort Keypad5 = 3115;
|
||||||
public ushort Keypad6 = 3116;
|
public ushort Keypad6 = 3116;
|
||||||
public ushort Keypad7 = 3117;
|
public ushort Keypad7 = 3117;
|
||||||
public ushort Keypad8 = 3118;
|
public ushort Keypad8 = 3118;
|
||||||
public ushort Keypad9 = 3119;
|
public ushort Keypad9 = 3119;
|
||||||
public ushort KeypadStar = 3120;
|
public ushort KeypadStar = 3120;
|
||||||
public ushort KeypadPound = 3121;
|
public ushort KeypadPound = 3121;
|
||||||
public ushort KeypadClear = 3122;
|
public ushort KeypadClear = 3122;
|
||||||
public ushort KeypadBackspace = 3123;
|
public ushort KeypadBackspace = 3123;
|
||||||
public ushort Dial = 3124;
|
public ushort Dial = 3124;
|
||||||
public ushort DoNotDisturbToggle = 3132;
|
public ushort DoNotDisturbToggle = 3132;
|
||||||
public ushort DoNotDisturbOn = 3133;
|
public ushort DoNotDisturbOn = 3133;
|
||||||
public ushort DoNotDisturbOff = 3134;
|
public ushort DoNotDisturbOff = 3134;
|
||||||
public ushort AutoAnswerToggle = 3127;
|
public ushort AutoAnswerToggle = 3127;
|
||||||
public ushort AutoAnswerOn = 3125;
|
public ushort AutoAnswerOn = 3125;
|
||||||
public ushort AutoAnswerOff = 3126;
|
public ushort AutoAnswerOff = 3126;
|
||||||
|
|
||||||
public EssentialDspApiMap() {
|
public EssentialDspApiMap() {
|
||||||
channelMuteToggle = new Dictionary<uint, ushort>();
|
channelMuteToggle = new Dictionary<uint, ushort>();
|
||||||
channelMuteOn = new Dictionary<uint, ushort>();
|
channelMuteOn = new Dictionary<uint, ushort>();
|
||||||
channelMuteOff = new Dictionary<uint, ushort>();
|
channelMuteOff = new Dictionary<uint, ushort>();
|
||||||
channelVolume = new Dictionary<uint, ushort>();
|
channelVolume = new Dictionary<uint, ushort>();
|
||||||
channelName = new Dictionary<uint, ushort>();
|
channelName = new Dictionary<uint, ushort>();
|
||||||
channelType = new Dictionary<uint, ushort>();
|
channelType = new Dictionary<uint, ushort>();
|
||||||
presets = new Dictionary<uint, ushort>();
|
presets = new Dictionary<uint, ushort>();
|
||||||
channelVolumeUp = new Dictionary<uint, ushort>();
|
channelVolumeUp = new Dictionary<uint, ushort>();
|
||||||
channelVolumeDown = new Dictionary<uint, ushort>();
|
channelVolumeDown = new Dictionary<uint, ushort>();
|
||||||
for (uint x = 1; x <= 100; x++) {
|
for (uint x = 1; x <= 100; x++) {
|
||||||
uint tempNum = x;
|
uint tempNum = x;
|
||||||
presets[tempNum] = (ushort)(tempNum + 100);
|
presets[tempNum] = (ushort)(tempNum + 100);
|
||||||
channelMuteToggle[tempNum] = (ushort)(tempNum + 400);
|
channelMuteToggle[tempNum] = (ushort)(tempNum + 400);
|
||||||
channelMuteOn[tempNum] = (ushort)(tempNum + 600);
|
channelMuteOn[tempNum] = (ushort)(tempNum + 600);
|
||||||
channelMuteOff[tempNum] = (ushort)(tempNum + 800);
|
channelMuteOff[tempNum] = (ushort)(tempNum + 800);
|
||||||
channelVolume[tempNum] = (ushort)(tempNum + 200);
|
channelVolume[tempNum] = (ushort)(tempNum + 200);
|
||||||
channelName[tempNum] = (ushort)(tempNum + 200);
|
channelName[tempNum] = (ushort)(tempNum + 200);
|
||||||
channelType[tempNum] = (ushort)(tempNum + 400);
|
channelType[tempNum] = (ushort)(tempNum + 400);
|
||||||
channelVolumeUp[tempNum] = (ushort)(tempNum + 1000);
|
channelVolumeUp[tempNum] = (ushort)(tempNum + 1000);
|
||||||
channelVolumeDown[tempNum] = (ushort)(tempNum + 1200);
|
channelVolumeDown[tempNum] = (ushort)(tempNum + 1200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,98 +1,98 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Essentials.DM;
|
using PepperDash.Essentials.DM;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core.Routing;
|
using PepperDash.Essentials.Core.Routing;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.EthernetCommunication;
|
using Crestron.SimplSharpPro.EthernetCommunication;
|
||||||
using Crestron.SimplSharpPro.DM;
|
using Crestron.SimplSharpPro.DM;
|
||||||
|
|
||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
{
|
{
|
||||||
public class EssentialsTVOne : PepperDash.Core.Device
|
public class EssentialsTVOne : PepperDash.Core.Device
|
||||||
{
|
{
|
||||||
public EssentialTVOneProperties Properties;
|
public EssentialTVOneProperties Properties;
|
||||||
public List<BridgeApiEisc> BridgeApiEiscs;
|
public List<BridgeApiEisc> BridgeApiEiscs;
|
||||||
private PepperDash.Essentials.Devices.Common.TVOneCorio TVOneCorio;
|
private PepperDash.Essentials.Devices.Common.TVOneCorio TVOneCorio;
|
||||||
private EssentialsTVOneApiMap ApiMap = new EssentialsTVOneApiMap();
|
private EssentialsTVOneApiMap ApiMap = new EssentialsTVOneApiMap();
|
||||||
public EssentialsTVOne(string key, string name, JToken properties)
|
public EssentialsTVOne(string key, string name, JToken properties)
|
||||||
: base(key, name)
|
: base(key, name)
|
||||||
{
|
{
|
||||||
Properties = JsonConvert.DeserializeObject<EssentialTVOneProperties>(properties.ToString());
|
Properties = JsonConvert.DeserializeObject<EssentialTVOneProperties>(properties.ToString());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public override bool CustomActivate() {
|
public override bool CustomActivate() {
|
||||||
// Create EiscApis
|
// Create EiscApis
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
foreach (var device in DeviceManager.AllDevices)
|
foreach (var device in DeviceManager.AllDevices)
|
||||||
{
|
{
|
||||||
if (device.Key == this.Properties.connectionDeviceKey)
|
if (device.Key == this.Properties.connectionDeviceKey)
|
||||||
{
|
{
|
||||||
Debug.Console(2, "deviceKey {0} Matches", device.Key);
|
Debug.Console(2, "deviceKey {0} Matches", device.Key);
|
||||||
TVOneCorio = DeviceManager.GetDeviceForKey(device.Key) as PepperDash.Essentials.Devices.Common.TVOneCorio;
|
TVOneCorio = DeviceManager.GetDeviceForKey(device.Key) as PepperDash.Essentials.Devices.Common.TVOneCorio;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Console(2, "deviceKey {0} doesn't match", device.Key);
|
Debug.Console(2, "deviceKey {0} doesn't match", device.Key);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Properties.EiscApiIpids != null && TVOneCorio != null)
|
if (Properties.EiscApiIpids != null && TVOneCorio != null)
|
||||||
{
|
{
|
||||||
foreach (string Ipid in Properties.EiscApiIpids)
|
foreach (string Ipid in Properties.EiscApiIpids)
|
||||||
{
|
{
|
||||||
var ApiEisc = new BridgeApiEisc(Ipid);
|
var ApiEisc = new BridgeApiEisc(Ipid);
|
||||||
Debug.Console(2, "Connecting EiscApi {0} to {1}", ApiEisc.Ipid, TVOneCorio.Name);
|
Debug.Console(2, "Connecting EiscApi {0} to {1}", ApiEisc.Ipid, TVOneCorio.Name);
|
||||||
ushort x = 1;
|
ushort x = 1;
|
||||||
TVOneCorio.OnlineFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.Online]);
|
TVOneCorio.OnlineFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.Online]);
|
||||||
ApiEisc.Eisc.SetUShortSigAction(ApiMap.CallPreset, u => TVOneCorio.CallPreset(u));
|
ApiEisc.Eisc.SetUShortSigAction(ApiMap.CallPreset, u => TVOneCorio.CallPreset(u));
|
||||||
TVOneCorio.PresetFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.PresetFeedback]);
|
TVOneCorio.PresetFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.PresetFeedback]);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Debug.Console(2, "Name {0} Activated", this.Name);
|
Debug.Console(2, "Name {0} Activated", this.Name);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
Debug.Console(0, "Bridge {0}", e);
|
Debug.Console(0, "Bridge {0}", e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class EssentialTVOneProperties
|
public class EssentialTVOneProperties
|
||||||
{
|
{
|
||||||
public string connectionDeviceKey;
|
public string connectionDeviceKey;
|
||||||
public string[] EiscApiIpids;
|
public string[] EiscApiIpids;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class EssentialsTVOneApiMap
|
public class EssentialsTVOneApiMap
|
||||||
{
|
{
|
||||||
public ushort CallPreset = 1;
|
public ushort CallPreset = 1;
|
||||||
public ushort PresetFeedback = 1;
|
public ushort PresetFeedback = 1;
|
||||||
public ushort Online = 1;
|
public ushort Online = 1;
|
||||||
|
|
||||||
public EssentialsTVOneApiMap()
|
public EssentialsTVOneApiMap()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,74 +1,74 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Devices.Common;
|
using PepperDash.Essentials.Devices.Common;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public static class GenericLightingApiExtensions
|
public static class GenericLightingApiExtensions
|
||||||
{
|
{
|
||||||
public static void LinkToApi(this PepperDash.Essentials.Core.Lighting.LightingBase lightingDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
|
public static void LinkToApi(this PepperDash.Essentials.Core.Lighting.LightingBase lightingDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
|
||||||
{
|
{
|
||||||
GenericLightingJoinMap joinMap = new GenericLightingJoinMap();
|
GenericLightingJoinMap joinMap = new GenericLightingJoinMap();
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<GenericLightingJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<GenericLightingJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
joinMap.OffsetJoinNumbers(joinStart);
|
||||||
|
|
||||||
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
Debug.Console(0, "Linking to Lighting Type {0}", lightingDevice.GetType().Name.ToString());
|
Debug.Console(0, "Linking to Lighting Type {0}", lightingDevice.GetType().Name.ToString());
|
||||||
|
|
||||||
// GenericLighitng Actions & FeedBack
|
// GenericLighitng Actions & FeedBack
|
||||||
trilist.SetUShortSigAction(joinMap.SelectScene, u => lightingDevice.SelectScene(lightingDevice.LightingScenes[u]));
|
trilist.SetUShortSigAction(joinMap.SelectScene, u => lightingDevice.SelectScene(lightingDevice.LightingScenes[u]));
|
||||||
|
|
||||||
int sceneIndex = 1;
|
int sceneIndex = 1;
|
||||||
foreach (var scene in lightingDevice.LightingScenes)
|
foreach (var scene in lightingDevice.LightingScenes)
|
||||||
{
|
{
|
||||||
var tempIndex = sceneIndex - 1;
|
var tempIndex = sceneIndex - 1;
|
||||||
trilist.SetSigTrueAction((uint)(joinMap.LightingSceneOffset + sceneIndex), () => lightingDevice.SelectScene(lightingDevice.LightingScenes[tempIndex]));
|
trilist.SetSigTrueAction((uint)(joinMap.LightingSceneOffset + sceneIndex), () => lightingDevice.SelectScene(lightingDevice.LightingScenes[tempIndex]));
|
||||||
scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)]);
|
scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)]);
|
||||||
trilist.StringInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)].StringValue = scene.Name;
|
trilist.StringInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)].StringValue = scene.Name;
|
||||||
trilist.BooleanInput[(uint)(joinMap.ButtonVisibilityOffset + sceneIndex)].BoolValue = true;
|
trilist.BooleanInput[(uint)(joinMap.ButtonVisibilityOffset + sceneIndex)].BoolValue = true;
|
||||||
sceneIndex++;
|
sceneIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lightingDevice.GetType().Name.ToString() == "LutronQuantumArea")
|
if (lightingDevice.GetType().Name.ToString() == "LutronQuantumArea")
|
||||||
{
|
{
|
||||||
var lutronDevice = lightingDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea;
|
var lutronDevice = lightingDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea;
|
||||||
lutronDevice.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
lutronDevice.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
||||||
trilist.SetStringSigAction(joinMap.IntegrationIdSet, s => lutronDevice.IntegrationId = s);
|
trilist.SetStringSigAction(joinMap.IntegrationIdSet, s => lutronDevice.IntegrationId = s);
|
||||||
}
|
}
|
||||||
|
|
||||||
//ApiEisc.Eisc.SetStringSigAction(ApiMap.integrationID, (s) => { lutronLights.IntegrationId = s; });
|
//ApiEisc.Eisc.SetStringSigAction(ApiMap.integrationID, (s) => { lutronLights.IntegrationId = s; });
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
var lutronLights = lightingDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea;
|
var lutronLights = lightingDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea;
|
||||||
|
|
||||||
|
|
||||||
for (uint i = 1; i <= lightingBase.CircuitCount; i++)
|
for (uint i = 1; i <= lightingBase.CircuitCount; i++)
|
||||||
{
|
{
|
||||||
var circuit = i;
|
var circuit = i;
|
||||||
lightingBase.CircuitNameFeedbacks[circuit - 1].LinkInputSig(trilist.StringInput[joinMap.CircuitNames + circuit]);
|
lightingBase.CircuitNameFeedbacks[circuit - 1].LinkInputSig(trilist.StringInput[joinMap.CircuitNames + circuit]);
|
||||||
lightingBase.CircuitIsCritical[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitIsCritical + circuit]);
|
lightingBase.CircuitIsCritical[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitIsCritical + circuit]);
|
||||||
lightingBase.CircuitState[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitState + circuit]);
|
lightingBase.CircuitState[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitState + circuit]);
|
||||||
trilist.SetSigTrueAction(joinMap.CircuitCycle + circuit, () => lightingBase.CycleCircuit(circuit - 1));
|
trilist.SetSigTrueAction(joinMap.CircuitCycle + circuit, () => lightingBase.CycleCircuit(circuit - 1));
|
||||||
trilist.SetSigTrueAction(joinMap.CircuitOnCmd + circuit, () => lightingBase.TurnOnCircuit(circuit - 1));
|
trilist.SetSigTrueAction(joinMap.CircuitOnCmd + circuit, () => lightingBase.TurnOnCircuit(circuit - 1));
|
||||||
trilist.SetSigTrueAction(joinMap.CircuitOffCmd + circuit, () => lightingBase.TurnOffCircuit(circuit - 1));
|
trilist.SetSigTrueAction(joinMap.CircuitOffCmd + circuit, () => lightingBase.TurnOffCircuit(circuit - 1));
|
||||||
|
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,125 +1,125 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
|
|
||||||
using PepperDash.Essentials.Devices.Common.Occupancy;
|
using PepperDash.Essentials.Devices.Common.Occupancy;
|
||||||
|
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public static class GlsOccupancySensorBaseControllerApiExtensions
|
public static class GlsOccupancySensorBaseControllerApiExtensions
|
||||||
{
|
{
|
||||||
public static void LinkToApi(this GlsOccupancySensorBaseController occController, BasicTriList trilist, uint joinStart, string joinMapKey)
|
public static void LinkToApi(this GlsOccupancySensorBaseController occController, BasicTriList trilist, uint joinStart, string joinMapKey)
|
||||||
{
|
{
|
||||||
GlsOccupancySensorBaseJoinMap joinMap = new GlsOccupancySensorBaseJoinMap();
|
GlsOccupancySensorBaseJoinMap joinMap = new GlsOccupancySensorBaseJoinMap();
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<GlsOccupancySensorBaseJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<GlsOccupancySensorBaseJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
joinMap.OffsetJoinNumbers(joinStart);
|
||||||
|
|
||||||
Debug.Console(1, occController, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, occController, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
#region Single and Dual Sensor Stuff
|
#region Single and Dual Sensor Stuff
|
||||||
occController.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
occController.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
||||||
trilist.StringInput[joinMap.Name].StringValue = occController.Name;
|
trilist.StringInput[joinMap.Name].StringValue = occController.Name;
|
||||||
|
|
||||||
trilist.OnlineStatusChange += new Crestron.SimplSharpPro.OnlineStatusChangeEventHandler((d, args) =>
|
trilist.OnlineStatusChange += new Crestron.SimplSharpPro.OnlineStatusChangeEventHandler((d, args) =>
|
||||||
{
|
{
|
||||||
if (args.DeviceOnLine)
|
if (args.DeviceOnLine)
|
||||||
{
|
{
|
||||||
trilist.StringInput[joinMap.Name].StringValue = occController.Name;
|
trilist.StringInput[joinMap.Name].StringValue = occController.Name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// Occupied status
|
// Occupied status
|
||||||
trilist.SetSigTrueAction(joinMap.ForceOccupied, new Action(() => occController.ForceOccupied()));
|
trilist.SetSigTrueAction(joinMap.ForceOccupied, new Action(() => occController.ForceOccupied()));
|
||||||
trilist.SetSigTrueAction(joinMap.ForceVacant, new Action(() => occController.ForceVacant()));
|
trilist.SetSigTrueAction(joinMap.ForceVacant, new Action(() => occController.ForceVacant()));
|
||||||
occController.RoomIsOccupiedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RoomOccupiedFeedback]);
|
occController.RoomIsOccupiedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RoomOccupiedFeedback]);
|
||||||
occController.RoomIsOccupiedFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.RoomVacantFeedback]);
|
occController.RoomIsOccupiedFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.RoomVacantFeedback]);
|
||||||
occController.RawOccupancyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyFeedback]);
|
occController.RawOccupancyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyFeedback]);
|
||||||
trilist.SetBoolSigAction(joinMap.EnableRawStates, new Action<bool>((b) => occController.EnableRawStates(b)));
|
trilist.SetBoolSigAction(joinMap.EnableRawStates, new Action<bool>((b) => occController.EnableRawStates(b)));
|
||||||
|
|
||||||
// Timouts
|
// Timouts
|
||||||
trilist.SetUShortSigAction(joinMap.Timeout, new Action<ushort>((u) => occController.SetRemoteTimeout(u)));
|
trilist.SetUShortSigAction(joinMap.Timeout, new Action<ushort>((u) => occController.SetRemoteTimeout(u)));
|
||||||
occController.CurrentTimeoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.Timeout]);
|
occController.CurrentTimeoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.Timeout]);
|
||||||
occController.LocalTimoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeoutLocalFeedback]);
|
occController.LocalTimoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeoutLocalFeedback]);
|
||||||
|
|
||||||
// LED Flash
|
// LED Flash
|
||||||
trilist.SetSigTrueAction(joinMap.EnableLedFlash, new Action(() => occController.SetLedFlashEnable(true)));
|
trilist.SetSigTrueAction(joinMap.EnableLedFlash, new Action(() => occController.SetLedFlashEnable(true)));
|
||||||
trilist.SetSigTrueAction(joinMap.DisableLedFlash, new Action(() => occController.SetLedFlashEnable(false)));
|
trilist.SetSigTrueAction(joinMap.DisableLedFlash, new Action(() => occController.SetLedFlashEnable(false)));
|
||||||
occController.LedFlashEnabledFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.EnableLedFlash]);
|
occController.LedFlashEnabledFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.EnableLedFlash]);
|
||||||
|
|
||||||
// Short Timeout
|
// Short Timeout
|
||||||
trilist.SetSigTrueAction(joinMap.EnableShortTimeout, new Action(() => occController.SetShortTimeoutState(true)));
|
trilist.SetSigTrueAction(joinMap.EnableShortTimeout, new Action(() => occController.SetShortTimeoutState(true)));
|
||||||
trilist.SetSigTrueAction(joinMap.DisableShortTimeout, new Action(() => occController.SetShortTimeoutState(false)));
|
trilist.SetSigTrueAction(joinMap.DisableShortTimeout, new Action(() => occController.SetShortTimeoutState(false)));
|
||||||
occController.ShortTimeoutEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableShortTimeout]);
|
occController.ShortTimeoutEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableShortTimeout]);
|
||||||
|
|
||||||
// PIR Sensor
|
// PIR Sensor
|
||||||
trilist.SetSigTrueAction(joinMap.EnablePir, new Action(() => occController.SetPirEnable(true)));
|
trilist.SetSigTrueAction(joinMap.EnablePir, new Action(() => occController.SetPirEnable(true)));
|
||||||
trilist.SetSigTrueAction(joinMap.DisablePir, new Action(() => occController.SetPirEnable(false)));
|
trilist.SetSigTrueAction(joinMap.DisablePir, new Action(() => occController.SetPirEnable(false)));
|
||||||
occController.PirSensorEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnablePir]);
|
occController.PirSensorEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnablePir]);
|
||||||
|
|
||||||
// PIR Sensitivity in Occupied State
|
// PIR Sensitivity in Occupied State
|
||||||
trilist.SetBoolSigAction(joinMap.IncrementPirInOccupiedState, new Action<bool>((b) => occController.IncrementPirSensitivityInOccupiedState(b)));
|
trilist.SetBoolSigAction(joinMap.IncrementPirInOccupiedState, new Action<bool>((b) => occController.IncrementPirSensitivityInOccupiedState(b)));
|
||||||
trilist.SetBoolSigAction(joinMap.DecrementPirInOccupiedState, new Action<bool>((b) => occController.DecrementPirSensitivityInOccupiedState(b)));
|
trilist.SetBoolSigAction(joinMap.DecrementPirInOccupiedState, new Action<bool>((b) => occController.DecrementPirSensitivityInOccupiedState(b)));
|
||||||
occController.PirSensitivityInOccupiedStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.PirSensitivityInOccupiedState]);
|
occController.PirSensitivityInOccupiedStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.PirSensitivityInOccupiedState]);
|
||||||
|
|
||||||
// PIR Sensitivity in Vacant State
|
// PIR Sensitivity in Vacant State
|
||||||
trilist.SetBoolSigAction(joinMap.IncrementPirInVacantState, new Action<bool>((b) => occController.IncrementPirSensitivityInVacantState(b)));
|
trilist.SetBoolSigAction(joinMap.IncrementPirInVacantState, new Action<bool>((b) => occController.IncrementPirSensitivityInVacantState(b)));
|
||||||
trilist.SetBoolSigAction(joinMap.DecrementPirInVacantState, new Action<bool>((b) => occController.DecrementPirSensitivityInVacantState(b)));
|
trilist.SetBoolSigAction(joinMap.DecrementPirInVacantState, new Action<bool>((b) => occController.DecrementPirSensitivityInVacantState(b)));
|
||||||
occController.PirSensitivityInVacantStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.PirSensitivityInVacantState]);
|
occController.PirSensitivityInVacantStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.PirSensitivityInVacantState]);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Dual Technology Sensor Stuff
|
#region Dual Technology Sensor Stuff
|
||||||
var odtOccController = occController as GlsOdtOccupancySensorController;
|
var odtOccController = occController as GlsOdtOccupancySensorController;
|
||||||
|
|
||||||
if (odtOccController != null)
|
if (odtOccController != null)
|
||||||
{
|
{
|
||||||
// OR When Vacated
|
// OR When Vacated
|
||||||
trilist.SetBoolSigAction(joinMap.OrWhenVacated, new Action<bool>((b) => odtOccController.SetOrWhenVacatedState(b)));
|
trilist.SetBoolSigAction(joinMap.OrWhenVacated, new Action<bool>((b) => odtOccController.SetOrWhenVacatedState(b)));
|
||||||
odtOccController.OrWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.OrWhenVacated]);
|
odtOccController.OrWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.OrWhenVacated]);
|
||||||
|
|
||||||
// AND When Vacated
|
// AND When Vacated
|
||||||
trilist.SetBoolSigAction(joinMap.AndWhenVacated, new Action<bool>((b) => odtOccController.SetAndWhenVacatedState(b)));
|
trilist.SetBoolSigAction(joinMap.AndWhenVacated, new Action<bool>((b) => odtOccController.SetAndWhenVacatedState(b)));
|
||||||
odtOccController.AndWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AndWhenVacated]);
|
odtOccController.AndWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AndWhenVacated]);
|
||||||
|
|
||||||
// Ultrasonic A Sensor
|
// Ultrasonic A Sensor
|
||||||
trilist.SetSigTrueAction(joinMap.EnableUsA, new Action(() => odtOccController.SetUsAEnable(true)));
|
trilist.SetSigTrueAction(joinMap.EnableUsA, new Action(() => odtOccController.SetUsAEnable(true)));
|
||||||
trilist.SetSigTrueAction(joinMap.DisableUsA, new Action(() => odtOccController.SetUsAEnable(false)));
|
trilist.SetSigTrueAction(joinMap.DisableUsA, new Action(() => odtOccController.SetUsAEnable(false)));
|
||||||
odtOccController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsA]);
|
odtOccController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsA]);
|
||||||
|
|
||||||
// Ultrasonic B Sensor
|
// Ultrasonic B Sensor
|
||||||
trilist.SetSigTrueAction(joinMap.EnableUsB, new Action(() => odtOccController.SetUsBEnable(true)));
|
trilist.SetSigTrueAction(joinMap.EnableUsB, new Action(() => odtOccController.SetUsBEnable(true)));
|
||||||
trilist.SetSigTrueAction(joinMap.DisableUsB, new Action(() => odtOccController.SetUsBEnable(false)));
|
trilist.SetSigTrueAction(joinMap.DisableUsB, new Action(() => odtOccController.SetUsBEnable(false)));
|
||||||
odtOccController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsB]);
|
odtOccController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsB]);
|
||||||
|
|
||||||
// US Sensitivity in Occupied State
|
// US Sensitivity in Occupied State
|
||||||
trilist.SetBoolSigAction(joinMap.IncrementUsInOccupiedState, new Action<bool>((b) => odtOccController.IncrementUsSensitivityInOccupiedState(b)));
|
trilist.SetBoolSigAction(joinMap.IncrementUsInOccupiedState, new Action<bool>((b) => odtOccController.IncrementUsSensitivityInOccupiedState(b)));
|
||||||
trilist.SetBoolSigAction(joinMap.DecrementUsInOccupiedState, new Action<bool>((b) => odtOccController.DecrementUsSensitivityInOccupiedState(b)));
|
trilist.SetBoolSigAction(joinMap.DecrementUsInOccupiedState, new Action<bool>((b) => odtOccController.DecrementUsSensitivityInOccupiedState(b)));
|
||||||
odtOccController.UltrasonicSensitivityInOccupiedStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.UsSensitivityInOccupiedState]);
|
odtOccController.UltrasonicSensitivityInOccupiedStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.UsSensitivityInOccupiedState]);
|
||||||
|
|
||||||
// US Sensitivity in Vacant State
|
// US Sensitivity in Vacant State
|
||||||
trilist.SetBoolSigAction(joinMap.IncrementUsInVacantState, new Action<bool>((b) => odtOccController.IncrementUsSensitivityInVacantState(b)));
|
trilist.SetBoolSigAction(joinMap.IncrementUsInVacantState, new Action<bool>((b) => odtOccController.IncrementUsSensitivityInVacantState(b)));
|
||||||
trilist.SetBoolSigAction(joinMap.DecrementUsInVacantState, new Action<bool>((b) => odtOccController.DecrementUsSensitivityInVacantState(b)));
|
trilist.SetBoolSigAction(joinMap.DecrementUsInVacantState, new Action<bool>((b) => odtOccController.DecrementUsSensitivityInVacantState(b)));
|
||||||
odtOccController.UltrasonicSensitivityInVacantStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.UsSensitivityInVacantState]);
|
odtOccController.UltrasonicSensitivityInVacantStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.UsSensitivityInVacantState]);
|
||||||
|
|
||||||
//Sensor Raw States
|
//Sensor Raw States
|
||||||
odtOccController.RawOccupancyPirFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyPirFeedback]);
|
odtOccController.RawOccupancyPirFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyPirFeedback]);
|
||||||
odtOccController.RawOccupancyUsFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyUsFeedback]);
|
odtOccController.RawOccupancyUsFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyUsFeedback]);
|
||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,128 +1,128 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Devices.Common;
|
using PepperDash.Essentials.Devices.Common;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public static class IRSetTopBoxBaseApiExtensions
|
public static class IRSetTopBoxBaseApiExtensions
|
||||||
{
|
{
|
||||||
public static void LinkToApi(this PepperDash.Essentials.Devices.Common.IRSetTopBoxBase stbDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
|
public static void LinkToApi(this PepperDash.Essentials.Devices.Common.IRSetTopBoxBase stbDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
|
||||||
{
|
{
|
||||||
SetTopBoxControllerJoinMap joinMap = new SetTopBoxControllerJoinMap();
|
SetTopBoxControllerJoinMap joinMap = new SetTopBoxControllerJoinMap();
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<SetTopBoxControllerJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<SetTopBoxControllerJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
joinMap.OffsetJoinNumbers(joinStart);
|
||||||
|
|
||||||
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
Debug.Console(0, "Linking to Display: {0}", stbDevice.Name);
|
Debug.Console(0, "Linking to Display: {0}", stbDevice.Name);
|
||||||
|
|
||||||
trilist.StringInput[joinMap.Name].StringValue = stbDevice.Name;
|
trilist.StringInput[joinMap.Name].StringValue = stbDevice.Name;
|
||||||
|
|
||||||
var stbBase = stbDevice as ISetTopBoxControls;
|
var stbBase = stbDevice as ISetTopBoxControls;
|
||||||
if (stbBase != null)
|
if (stbBase != null)
|
||||||
{
|
{
|
||||||
trilist.BooleanInput[joinMap.HasDpad].BoolValue = stbBase.HasDpad;
|
trilist.BooleanInput[joinMap.HasDpad].BoolValue = stbBase.HasDpad;
|
||||||
trilist.BooleanInput[joinMap.HasNumeric].BoolValue = stbBase.HasNumeric;
|
trilist.BooleanInput[joinMap.HasNumeric].BoolValue = stbBase.HasNumeric;
|
||||||
trilist.BooleanInput[joinMap.HasDvr].BoolValue = stbBase.HasDvr;
|
trilist.BooleanInput[joinMap.HasDvr].BoolValue = stbBase.HasDvr;
|
||||||
trilist.BooleanInput[joinMap.HasPresets].BoolValue = stbBase.HasPresets;
|
trilist.BooleanInput[joinMap.HasPresets].BoolValue = stbBase.HasPresets;
|
||||||
|
|
||||||
trilist.SetBoolSigAction(joinMap.DvrList, (b) => stbBase.DvrList(b));
|
trilist.SetBoolSigAction(joinMap.DvrList, (b) => stbBase.DvrList(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Replay, (b) => stbBase.Replay(b));
|
trilist.SetBoolSigAction(joinMap.Replay, (b) => stbBase.Replay(b));
|
||||||
|
|
||||||
trilist.SetStringSigAction(joinMap.LoadPresets, (s) => stbBase.LoadPresets(s));
|
trilist.SetStringSigAction(joinMap.LoadPresets, (s) => stbBase.LoadPresets(s));
|
||||||
}
|
}
|
||||||
|
|
||||||
var stbPower = stbDevice as IPower;
|
var stbPower = stbDevice as IPower;
|
||||||
if (stbPower != null)
|
if (stbPower != null)
|
||||||
{
|
{
|
||||||
trilist.SetSigTrueAction(joinMap.PowerOn, () => stbPower.PowerOn());
|
trilist.SetSigTrueAction(joinMap.PowerOn, () => stbPower.PowerOn());
|
||||||
trilist.SetSigTrueAction(joinMap.PowerOff, () => stbPower.PowerOff());
|
trilist.SetSigTrueAction(joinMap.PowerOff, () => stbPower.PowerOff());
|
||||||
trilist.SetSigTrueAction(joinMap.PowerToggle, () => stbPower.PowerToggle());
|
trilist.SetSigTrueAction(joinMap.PowerToggle, () => stbPower.PowerToggle());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var stbDPad = stbDevice as IDPad;
|
var stbDPad = stbDevice as IDPad;
|
||||||
if (stbDPad != null)
|
if (stbDPad != null)
|
||||||
{
|
{
|
||||||
trilist.SetBoolSigAction(joinMap.Up, (b) => stbDPad.Up(b));
|
trilist.SetBoolSigAction(joinMap.Up, (b) => stbDPad.Up(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Down, (b) => stbDPad.Down(b));
|
trilist.SetBoolSigAction(joinMap.Down, (b) => stbDPad.Down(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Left, (b) => stbDPad.Left(b));
|
trilist.SetBoolSigAction(joinMap.Left, (b) => stbDPad.Left(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Right, (b) => stbDPad.Right(b));
|
trilist.SetBoolSigAction(joinMap.Right, (b) => stbDPad.Right(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Select, (b) => stbDPad.Select(b));
|
trilist.SetBoolSigAction(joinMap.Select, (b) => stbDPad.Select(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Menu, (b) => stbDPad.Menu(b));
|
trilist.SetBoolSigAction(joinMap.Menu, (b) => stbDPad.Menu(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Exit, (b) => stbDPad.Exit(b));
|
trilist.SetBoolSigAction(joinMap.Exit, (b) => stbDPad.Exit(b));
|
||||||
}
|
}
|
||||||
|
|
||||||
var stbChannel = stbDevice as IChannel;
|
var stbChannel = stbDevice as IChannel;
|
||||||
if (stbChannel != null)
|
if (stbChannel != null)
|
||||||
{
|
{
|
||||||
trilist.SetBoolSigAction(joinMap.ChannelUp, (b) => stbChannel.ChannelUp(b));
|
trilist.SetBoolSigAction(joinMap.ChannelUp, (b) => stbChannel.ChannelUp(b));
|
||||||
trilist.SetBoolSigAction(joinMap.ChannelDown, (b) => stbChannel.ChannelDown(b));
|
trilist.SetBoolSigAction(joinMap.ChannelDown, (b) => stbChannel.ChannelDown(b));
|
||||||
trilist.SetBoolSigAction(joinMap.LastChannel, (b) => stbChannel.LastChannel(b));
|
trilist.SetBoolSigAction(joinMap.LastChannel, (b) => stbChannel.LastChannel(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Guide, (b) => stbChannel.Guide(b));
|
trilist.SetBoolSigAction(joinMap.Guide, (b) => stbChannel.Guide(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Info, (b) => stbChannel.Info(b));
|
trilist.SetBoolSigAction(joinMap.Info, (b) => stbChannel.Info(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Exit, (b) => stbChannel.Exit(b));
|
trilist.SetBoolSigAction(joinMap.Exit, (b) => stbChannel.Exit(b));
|
||||||
}
|
}
|
||||||
|
|
||||||
var stbColor = stbDevice as IColor;
|
var stbColor = stbDevice as IColor;
|
||||||
if (stbColor != null)
|
if (stbColor != null)
|
||||||
{
|
{
|
||||||
trilist.SetBoolSigAction(joinMap.Red, (b) => stbColor.Red(b));
|
trilist.SetBoolSigAction(joinMap.Red, (b) => stbColor.Red(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Green, (b) => stbColor.Green(b));
|
trilist.SetBoolSigAction(joinMap.Green, (b) => stbColor.Green(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Yellow, (b) => stbColor.Yellow(b));
|
trilist.SetBoolSigAction(joinMap.Yellow, (b) => stbColor.Yellow(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Blue, (b) => stbColor.Blue(b));
|
trilist.SetBoolSigAction(joinMap.Blue, (b) => stbColor.Blue(b));
|
||||||
}
|
}
|
||||||
|
|
||||||
var stbKeypad = stbDevice as ISetTopBoxNumericKeypad;
|
var stbKeypad = stbDevice as ISetTopBoxNumericKeypad;
|
||||||
if (stbKeypad != null)
|
if (stbKeypad != null)
|
||||||
{
|
{
|
||||||
trilist.StringInput[joinMap.KeypadAccessoryButton1Label].StringValue = stbKeypad.KeypadAccessoryButton1Label;
|
trilist.StringInput[joinMap.KeypadAccessoryButton1Label].StringValue = stbKeypad.KeypadAccessoryButton1Label;
|
||||||
trilist.StringInput[joinMap.KeypadAccessoryButton2Label].StringValue = stbKeypad.KeypadAccessoryButton2Label;
|
trilist.StringInput[joinMap.KeypadAccessoryButton2Label].StringValue = stbKeypad.KeypadAccessoryButton2Label;
|
||||||
|
|
||||||
trilist.BooleanInput[joinMap.HasKeypadAccessoryButton1].BoolValue = stbKeypad.HasKeypadAccessoryButton1;
|
trilist.BooleanInput[joinMap.HasKeypadAccessoryButton1].BoolValue = stbKeypad.HasKeypadAccessoryButton1;
|
||||||
trilist.BooleanInput[joinMap.HasKeypadAccessoryButton2].BoolValue = stbKeypad.HasKeypadAccessoryButton2;
|
trilist.BooleanInput[joinMap.HasKeypadAccessoryButton2].BoolValue = stbKeypad.HasKeypadAccessoryButton2;
|
||||||
|
|
||||||
trilist.SetBoolSigAction(joinMap.Digit0, (b) => stbKeypad.Digit0(b));
|
trilist.SetBoolSigAction(joinMap.Digit0, (b) => stbKeypad.Digit0(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Digit1, (b) => stbKeypad.Digit1(b));
|
trilist.SetBoolSigAction(joinMap.Digit1, (b) => stbKeypad.Digit1(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Digit2, (b) => stbKeypad.Digit2(b));
|
trilist.SetBoolSigAction(joinMap.Digit2, (b) => stbKeypad.Digit2(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Digit3, (b) => stbKeypad.Digit3(b));
|
trilist.SetBoolSigAction(joinMap.Digit3, (b) => stbKeypad.Digit3(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Digit4, (b) => stbKeypad.Digit4(b));
|
trilist.SetBoolSigAction(joinMap.Digit4, (b) => stbKeypad.Digit4(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Digit5, (b) => stbKeypad.Digit5(b));
|
trilist.SetBoolSigAction(joinMap.Digit5, (b) => stbKeypad.Digit5(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Digit6, (b) => stbKeypad.Digit6(b));
|
trilist.SetBoolSigAction(joinMap.Digit6, (b) => stbKeypad.Digit6(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Digit7, (b) => stbKeypad.Digit7(b));
|
trilist.SetBoolSigAction(joinMap.Digit7, (b) => stbKeypad.Digit7(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Digit8, (b) => stbKeypad.Digit8(b));
|
trilist.SetBoolSigAction(joinMap.Digit8, (b) => stbKeypad.Digit8(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Digit9, (b) => stbKeypad.Digit9(b));
|
trilist.SetBoolSigAction(joinMap.Digit9, (b) => stbKeypad.Digit9(b));
|
||||||
trilist.SetBoolSigAction(joinMap.KeypadAccessoryButton1Press, (b) => stbKeypad.KeypadAccessoryButton1(b));
|
trilist.SetBoolSigAction(joinMap.KeypadAccessoryButton1Press, (b) => stbKeypad.KeypadAccessoryButton1(b));
|
||||||
trilist.SetBoolSigAction(joinMap.KeypadAccessoryButton2Press, (b) => stbKeypad.KeypadAccessoryButton1(b));
|
trilist.SetBoolSigAction(joinMap.KeypadAccessoryButton2Press, (b) => stbKeypad.KeypadAccessoryButton1(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Dash, (b) => stbKeypad.Dash(b));
|
trilist.SetBoolSigAction(joinMap.Dash, (b) => stbKeypad.Dash(b));
|
||||||
trilist.SetBoolSigAction(joinMap.KeypadEnter, (b) => stbKeypad.KeypadEnter(b));
|
trilist.SetBoolSigAction(joinMap.KeypadEnter, (b) => stbKeypad.KeypadEnter(b));
|
||||||
}
|
}
|
||||||
|
|
||||||
var stbTransport = stbDevice as ITransport;
|
var stbTransport = stbDevice as ITransport;
|
||||||
if (stbTransport != null)
|
if (stbTransport != null)
|
||||||
{
|
{
|
||||||
trilist.SetBoolSigAction(joinMap.Play, (b) => stbTransport.Play(b));
|
trilist.SetBoolSigAction(joinMap.Play, (b) => stbTransport.Play(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Pause, (b) => stbTransport.Pause(b));
|
trilist.SetBoolSigAction(joinMap.Pause, (b) => stbTransport.Pause(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Rewind, (b) => stbTransport.Rewind(b));
|
trilist.SetBoolSigAction(joinMap.Rewind, (b) => stbTransport.Rewind(b));
|
||||||
trilist.SetBoolSigAction(joinMap.FFwd, (b) => stbTransport.FFwd(b));
|
trilist.SetBoolSigAction(joinMap.FFwd, (b) => stbTransport.FFwd(b));
|
||||||
trilist.SetBoolSigAction(joinMap.ChapMinus, (b) => stbTransport.ChapMinus(b));
|
trilist.SetBoolSigAction(joinMap.ChapMinus, (b) => stbTransport.ChapMinus(b));
|
||||||
trilist.SetBoolSigAction(joinMap.ChapPlus, (b) => stbTransport.ChapPlus(b));
|
trilist.SetBoolSigAction(joinMap.ChapPlus, (b) => stbTransport.ChapPlus(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Stop, (b) => stbTransport.Stop(b));
|
trilist.SetBoolSigAction(joinMap.Stop, (b) => stbTransport.Stop(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Record, (b) => stbTransport.Record(b));
|
trilist.SetBoolSigAction(joinMap.Record, (b) => stbTransport.Record(b));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -38,12 +38,12 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
/// Reports the EDID serial number value
|
/// Reports the EDID serial number value
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public uint EdidSerialNumber { get; set; }
|
public uint EdidSerialNumber { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Analogs
|
#region Analogs
|
||||||
public uint AudioVideoSource { get; set; }
|
public uint AudioVideoSource { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public DmRmcControllerJoinMap()
|
public DmRmcControllerJoinMap()
|
||||||
{
|
{
|
||||||
// Digital
|
// Digital
|
||||||
@@ -56,7 +56,7 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
EdidPrefferedTiming = 4;
|
EdidPrefferedTiming = 4;
|
||||||
EdidSerialNumber = 5;
|
EdidSerialNumber = 5;
|
||||||
|
|
||||||
//Analog
|
//Analog
|
||||||
AudioVideoSource = 1;
|
AudioVideoSource = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
EdidManufacturer = EdidManufacturer + joinOffset;
|
EdidManufacturer = EdidManufacturer + joinOffset;
|
||||||
EdidName = EdidName + joinOffset;
|
EdidName = EdidName + joinOffset;
|
||||||
EdidPrefferedTiming = EdidPrefferedTiming + joinOffset;
|
EdidPrefferedTiming = EdidPrefferedTiming + joinOffset;
|
||||||
EdidSerialNumber = EdidSerialNumber + joinOffset;
|
EdidSerialNumber = EdidSerialNumber + joinOffset;
|
||||||
AudioVideoSource = AudioVideoSource + joinOffset;
|
AudioVideoSource = AudioVideoSource + joinOffset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,65 +1,65 @@
|
|||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.CrestronIO;
|
using PepperDash.Essentials.Core.CrestronIO;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public static class StatusSignDeviceApiExtensions
|
public static class StatusSignDeviceApiExtensions
|
||||||
{
|
{
|
||||||
public static void LinkToApi(this StatusSignController ssDevice, BasicTriList trilist, uint joinStart,
|
public static void LinkToApi(this StatusSignController ssDevice, BasicTriList trilist, uint joinStart,
|
||||||
string joinMapKey)
|
string joinMapKey)
|
||||||
{
|
{
|
||||||
var joinMap = new StatusSignControllerJoinMap();
|
var joinMap = new StatusSignControllerJoinMap();
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<StatusSignControllerJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<StatusSignControllerJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
joinMap.OffsetJoinNumbers(joinStart);
|
||||||
|
|
||||||
Debug.Console(1, ssDevice, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, ssDevice, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
trilist.SetBoolSigAction(joinMap.RedControl, b => EnableControl(trilist, joinMap, ssDevice));
|
trilist.SetBoolSigAction(joinMap.RedControl, b => EnableControl(trilist, joinMap, ssDevice));
|
||||||
trilist.SetBoolSigAction(joinMap.GreenControl, b => EnableControl(trilist, joinMap, ssDevice));
|
trilist.SetBoolSigAction(joinMap.GreenControl, b => EnableControl(trilist, joinMap, ssDevice));
|
||||||
trilist.SetBoolSigAction(joinMap.BlueControl, b => EnableControl(trilist, joinMap, ssDevice));
|
trilist.SetBoolSigAction(joinMap.BlueControl, b => EnableControl(trilist, joinMap, ssDevice));
|
||||||
|
|
||||||
trilist.SetUShortSigAction(joinMap.RedLed, u => SetColor(trilist, joinMap, ssDevice));
|
trilist.SetUShortSigAction(joinMap.RedLed, u => SetColor(trilist, joinMap, ssDevice));
|
||||||
trilist.SetUShortSigAction(joinMap.GreenLed, u => SetColor(trilist, joinMap, ssDevice));
|
trilist.SetUShortSigAction(joinMap.GreenLed, u => SetColor(trilist, joinMap, ssDevice));
|
||||||
trilist.SetUShortSigAction(joinMap.BlueLed, u => SetColor(trilist, joinMap, ssDevice));
|
trilist.SetUShortSigAction(joinMap.BlueLed, u => SetColor(trilist, joinMap, ssDevice));
|
||||||
|
|
||||||
trilist.StringInput[joinMap.Name].StringValue = ssDevice.Name;
|
trilist.StringInput[joinMap.Name].StringValue = ssDevice.Name;
|
||||||
|
|
||||||
ssDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
ssDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
||||||
ssDevice.RedLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RedControl]);
|
ssDevice.RedLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RedControl]);
|
||||||
ssDevice.BlueLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.BlueControl]);
|
ssDevice.BlueLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.BlueControl]);
|
||||||
ssDevice.GreenLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.GreenControl]);
|
ssDevice.GreenLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.GreenControl]);
|
||||||
|
|
||||||
ssDevice.RedLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.RedLed]);
|
ssDevice.RedLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.RedLed]);
|
||||||
ssDevice.BlueLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.BlueLed]);
|
ssDevice.BlueLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.BlueLed]);
|
||||||
ssDevice.GreenLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.GreenLed]);
|
ssDevice.GreenLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.GreenLed]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void EnableControl(BasicTriList triList, StatusSignControllerJoinMap joinMap,
|
private static void EnableControl(BasicTriList triList, StatusSignControllerJoinMap joinMap,
|
||||||
StatusSignController device)
|
StatusSignController device)
|
||||||
{
|
{
|
||||||
var redEnable = triList.BooleanOutput[joinMap.RedControl].BoolValue;
|
var redEnable = triList.BooleanOutput[joinMap.RedControl].BoolValue;
|
||||||
var greenEnable = triList.BooleanOutput[joinMap.GreenControl].BoolValue;
|
var greenEnable = triList.BooleanOutput[joinMap.GreenControl].BoolValue;
|
||||||
var blueEnable = triList.BooleanOutput[joinMap.BlueControl].BoolValue;
|
var blueEnable = triList.BooleanOutput[joinMap.BlueControl].BoolValue;
|
||||||
device.EnableLedControl(redEnable, greenEnable, blueEnable);
|
device.EnableLedControl(redEnable, greenEnable, blueEnable);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void SetColor(BasicTriList triList, StatusSignControllerJoinMap joinMap,
|
private static void SetColor(BasicTriList triList, StatusSignControllerJoinMap joinMap,
|
||||||
StatusSignController device)
|
StatusSignController device)
|
||||||
{
|
{
|
||||||
var redBrightness = triList.UShortOutput[joinMap.RedLed].UShortValue;
|
var redBrightness = triList.UShortOutput[joinMap.RedLed].UShortValue;
|
||||||
var greenBrightness = triList.UShortOutput[joinMap.GreenLed].UShortValue;
|
var greenBrightness = triList.UShortOutput[joinMap.GreenLed].UShortValue;
|
||||||
var blueBrightness = triList.UShortOutput[joinMap.BlueLed].UShortValue;
|
var blueBrightness = triList.UShortOutput[joinMap.BlueLed].UShortValue;
|
||||||
|
|
||||||
device.SetColor(redBrightness, greenBrightness, blueBrightness);
|
device.SetColor(redBrightness, greenBrightness, blueBrightness);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,47 +1,47 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharp.CrestronIO;
|
using Crestron.SimplSharp.CrestronIO;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharp.Reflection;
|
using Crestron.SimplSharp.Reflection;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
|
|
||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Responsible for loading all of the device types for this library
|
/// Responsible for loading all of the device types for this library
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DeviceFactory
|
public class DeviceFactory
|
||||||
{
|
{
|
||||||
|
|
||||||
public DeviceFactory()
|
public DeviceFactory()
|
||||||
{
|
{
|
||||||
var assy = Assembly.GetExecutingAssembly();
|
var assy = Assembly.GetExecutingAssembly();
|
||||||
PluginLoader.SetEssentialsAssembly(assy.GetName().Name, assy);
|
PluginLoader.SetEssentialsAssembly(assy.GetName().Name, assy);
|
||||||
|
|
||||||
var types = assy.GetTypes().Where(ct => typeof(IDeviceFactory).IsAssignableFrom(ct) && !ct.IsInterface && !ct.IsAbstract);
|
var types = assy.GetTypes().Where(ct => typeof(IDeviceFactory).IsAssignableFrom(ct) && !ct.IsInterface && !ct.IsAbstract);
|
||||||
|
|
||||||
if (types != null)
|
if (types != null)
|
||||||
{
|
{
|
||||||
foreach (var type in types)
|
foreach (var type in types)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var factory = (IDeviceFactory)Crestron.SimplSharp.Reflection.Activator.CreateInstance(type);
|
var factory = (IDeviceFactory)Crestron.SimplSharp.Reflection.Activator.CreateInstance(type);
|
||||||
factory.LoadTypeFactories();
|
factory.LoadTypeFactories();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to load type: '{1}' DeviceFactory: {0}", e, type.Name);
|
Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to load type: '{1}' DeviceFactory: {0}", e, type.Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,358 +1,358 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.Fusion;
|
using Crestron.SimplSharpPro.Fusion;
|
||||||
|
|
||||||
|
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Essentials.Core.Fusion;
|
using PepperDash.Essentials.Core.Fusion;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Fusion
|
namespace PepperDash.Essentials.Fusion
|
||||||
{
|
{
|
||||||
public class EssentialsHuddleVtc1FusionController : EssentialsHuddleSpaceFusionSystemControllerBase
|
public class EssentialsHuddleVtc1FusionController : EssentialsHuddleSpaceFusionSystemControllerBase
|
||||||
{
|
{
|
||||||
BooleanSigData CodecIsInCall;
|
BooleanSigData CodecIsInCall;
|
||||||
|
|
||||||
public EssentialsHuddleVtc1FusionController(IEssentialsHuddleVtc1Room room, uint ipId, string joinMapKey)
|
public EssentialsHuddleVtc1FusionController(IEssentialsHuddleVtc1Room room, uint ipId, string joinMapKey)
|
||||||
: base(room, ipId, joinMapKey)
|
: base(room, ipId, joinMapKey)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called in base class constructor before RVI and GUID files are built
|
/// Called in base class constructor before RVI and GUID files are built
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected override void ExecuteCustomSteps()
|
protected override void ExecuteCustomSteps()
|
||||||
{
|
{
|
||||||
SetUpCodec();
|
SetUpCodec();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a static asset for the codec and maps the joins to the main room symbol
|
/// Creates a static asset for the codec and maps the joins to the main room symbol
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void SetUpCodec()
|
void SetUpCodec()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var codec = (Room as IEssentialsHuddleVtc1Room).VideoCodec;
|
var codec = (Room as IEssentialsHuddleVtc1Room).VideoCodec;
|
||||||
|
|
||||||
if (codec == null)
|
if (codec == null)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Cannot link codec to Fusion because codec is null");
|
Debug.Console(1, this, "Cannot link codec to Fusion because codec is null");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
codec.UsageTracker = new UsageTracking(codec);
|
codec.UsageTracker = new UsageTracking(codec);
|
||||||
codec.UsageTracker.UsageIsTracked = true;
|
codec.UsageTracker.UsageIsTracked = true;
|
||||||
codec.UsageTracker.DeviceUsageEnded += UsageTracker_DeviceUsageEnded;
|
codec.UsageTracker.DeviceUsageEnded += UsageTracker_DeviceUsageEnded;
|
||||||
|
|
||||||
var codecPowerOnAction = new Action<bool>(b => { if (!b) codec.StandbyDeactivate(); });
|
var codecPowerOnAction = new Action<bool>(b => { if (!b) codec.StandbyDeactivate(); });
|
||||||
var codecPowerOffAction = new Action<bool>(b => { if (!b) codec.StandbyActivate(); });
|
var codecPowerOffAction = new Action<bool>(b => { if (!b) codec.StandbyActivate(); });
|
||||||
|
|
||||||
// Map FusionRoom Attributes:
|
// Map FusionRoom Attributes:
|
||||||
|
|
||||||
// Codec volume
|
// Codec volume
|
||||||
var codecVolume = FusionRoom.CreateOffsetUshortSig(JoinMap.VolumeFader1.JoinNumber, JoinMap.VolumeFader1.AttributeName, eSigIoMask.InputOutputSig);
|
var codecVolume = FusionRoom.CreateOffsetUshortSig(JoinMap.VolumeFader1.JoinNumber, JoinMap.VolumeFader1.AttributeName, eSigIoMask.InputOutputSig);
|
||||||
codecVolume.OutputSig.UserObject = new Action<ushort>(b => (codec as IBasicVolumeWithFeedback).SetVolume(b));
|
codecVolume.OutputSig.UserObject = new Action<ushort>(b => (codec as IBasicVolumeWithFeedback).SetVolume(b));
|
||||||
(codec as IBasicVolumeWithFeedback).VolumeLevelFeedback.LinkInputSig(codecVolume.InputSig);
|
(codec as IBasicVolumeWithFeedback).VolumeLevelFeedback.LinkInputSig(codecVolume.InputSig);
|
||||||
|
|
||||||
// In Call Status
|
// In Call Status
|
||||||
CodecIsInCall = FusionRoom.CreateOffsetBoolSig(JoinMap.VcCodecInCall.JoinNumber, JoinMap.VcCodecInCall.AttributeName, eSigIoMask.InputSigOnly);
|
CodecIsInCall = FusionRoom.CreateOffsetBoolSig(JoinMap.VcCodecInCall.JoinNumber, JoinMap.VcCodecInCall.AttributeName, eSigIoMask.InputSigOnly);
|
||||||
codec.CallStatusChange += new EventHandler<PepperDash.Essentials.Devices.Common.Codec.CodecCallStatusItemChangeEventArgs>(codec_CallStatusChange);
|
codec.CallStatusChange += new EventHandler<PepperDash.Essentials.Devices.Common.Codec.CodecCallStatusItemChangeEventArgs>(codec_CallStatusChange);
|
||||||
|
|
||||||
// Online status
|
// Online status
|
||||||
if (codec is ICommunicationMonitor)
|
if (codec is ICommunicationMonitor)
|
||||||
{
|
{
|
||||||
var c = codec as ICommunicationMonitor;
|
var c = codec as ICommunicationMonitor;
|
||||||
var codecOnline = FusionRoom.CreateOffsetBoolSig(JoinMap.VcCodecOnline.JoinNumber, JoinMap.VcCodecOnline.AttributeName, eSigIoMask.InputSigOnly);
|
var codecOnline = FusionRoom.CreateOffsetBoolSig(JoinMap.VcCodecOnline.JoinNumber, JoinMap.VcCodecOnline.AttributeName, eSigIoMask.InputSigOnly);
|
||||||
codecOnline.InputSig.BoolValue = c.CommunicationMonitor.Status == MonitorStatus.IsOk;
|
codecOnline.InputSig.BoolValue = c.CommunicationMonitor.Status == MonitorStatus.IsOk;
|
||||||
c.CommunicationMonitor.StatusChange += (o, a) =>
|
c.CommunicationMonitor.StatusChange += (o, a) =>
|
||||||
{
|
{
|
||||||
codecOnline.InputSig.BoolValue = a.Status == MonitorStatus.IsOk;
|
codecOnline.InputSig.BoolValue = a.Status == MonitorStatus.IsOk;
|
||||||
};
|
};
|
||||||
Debug.Console(0, this, "Linking '{0}' communication monitor to Fusion '{1}'", codec.Key, JoinMap.VcCodecOnline.AttributeName);
|
Debug.Console(0, this, "Linking '{0}' communication monitor to Fusion '{1}'", codec.Key, JoinMap.VcCodecOnline.AttributeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Codec IP Address
|
// Codec IP Address
|
||||||
bool codecHasIpInfo = false;
|
bool codecHasIpInfo = false;
|
||||||
var codecComm = codec.Communication;
|
var codecComm = codec.Communication;
|
||||||
|
|
||||||
string codecIpAddress = string.Empty;
|
string codecIpAddress = string.Empty;
|
||||||
int codecIpPort = 0;
|
int codecIpPort = 0;
|
||||||
|
|
||||||
StringSigData codecIpAddressSig;
|
StringSigData codecIpAddressSig;
|
||||||
StringSigData codecIpPortSig;
|
StringSigData codecIpPortSig;
|
||||||
|
|
||||||
if(codecComm is GenericSshClient)
|
if(codecComm is GenericSshClient)
|
||||||
{
|
{
|
||||||
codecIpAddress = (codecComm as GenericSshClient).Hostname;
|
codecIpAddress = (codecComm as GenericSshClient).Hostname;
|
||||||
codecIpPort = (codecComm as GenericSshClient).Port;
|
codecIpPort = (codecComm as GenericSshClient).Port;
|
||||||
codecHasIpInfo = true;
|
codecHasIpInfo = true;
|
||||||
}
|
}
|
||||||
else if (codecComm is GenericTcpIpClient)
|
else if (codecComm is GenericTcpIpClient)
|
||||||
{
|
{
|
||||||
codecIpAddress = (codecComm as GenericTcpIpClient).Hostname;
|
codecIpAddress = (codecComm as GenericTcpIpClient).Hostname;
|
||||||
codecIpPort = (codecComm as GenericTcpIpClient).Port;
|
codecIpPort = (codecComm as GenericTcpIpClient).Port;
|
||||||
codecHasIpInfo = true;
|
codecHasIpInfo = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (codecHasIpInfo)
|
if (codecHasIpInfo)
|
||||||
{
|
{
|
||||||
codecIpAddressSig = FusionRoom.CreateOffsetStringSig(JoinMap.VcCodecIpAddress.JoinNumber, JoinMap.VcCodecIpAddress.AttributeName, eSigIoMask.InputSigOnly);
|
codecIpAddressSig = FusionRoom.CreateOffsetStringSig(JoinMap.VcCodecIpAddress.JoinNumber, JoinMap.VcCodecIpAddress.AttributeName, eSigIoMask.InputSigOnly);
|
||||||
codecIpAddressSig.InputSig.StringValue = codecIpAddress;
|
codecIpAddressSig.InputSig.StringValue = codecIpAddress;
|
||||||
|
|
||||||
codecIpPortSig = FusionRoom.CreateOffsetStringSig(JoinMap.VcCodecIpPort.JoinNumber, JoinMap.VcCodecIpPort.AttributeName, eSigIoMask.InputSigOnly);
|
codecIpPortSig = FusionRoom.CreateOffsetStringSig(JoinMap.VcCodecIpPort.JoinNumber, JoinMap.VcCodecIpPort.AttributeName, eSigIoMask.InputSigOnly);
|
||||||
codecIpPortSig.InputSig.StringValue = codecIpPort.ToString();
|
codecIpPortSig.InputSig.StringValue = codecIpPort.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
var tempAsset = new FusionAsset();
|
var tempAsset = new FusionAsset();
|
||||||
|
|
||||||
var deviceConfig = ConfigReader.ConfigObject.Devices.FirstOrDefault(c => c.Key.Equals(codec.Key));
|
var deviceConfig = ConfigReader.ConfigObject.Devices.FirstOrDefault(c => c.Key.Equals(codec.Key));
|
||||||
|
|
||||||
if (FusionStaticAssets.ContainsKey(deviceConfig.Uid))
|
if (FusionStaticAssets.ContainsKey(deviceConfig.Uid))
|
||||||
{
|
{
|
||||||
tempAsset = FusionStaticAssets[deviceConfig.Uid];
|
tempAsset = FusionStaticAssets[deviceConfig.Uid];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Create a new asset
|
// Create a new asset
|
||||||
tempAsset = new FusionAsset(FusionRoomGuids.GetNextAvailableAssetNumber(FusionRoom), codec.Name, "Codec", "");
|
tempAsset = new FusionAsset(FusionRoomGuids.GetNextAvailableAssetNumber(FusionRoom), codec.Name, "Codec", "");
|
||||||
FusionStaticAssets.Add(deviceConfig.Uid, tempAsset);
|
FusionStaticAssets.Add(deviceConfig.Uid, tempAsset);
|
||||||
}
|
}
|
||||||
|
|
||||||
var codecAsset = FusionRoom.CreateStaticAsset(tempAsset.SlotNumber, tempAsset.Name, "Codec", tempAsset.InstanceId);
|
var codecAsset = FusionRoom.CreateStaticAsset(tempAsset.SlotNumber, tempAsset.Name, "Codec", tempAsset.InstanceId);
|
||||||
codecAsset.PowerOn.OutputSig.UserObject = codecPowerOnAction;
|
codecAsset.PowerOn.OutputSig.UserObject = codecPowerOnAction;
|
||||||
codecAsset.PowerOff.OutputSig.UserObject = codecPowerOffAction;
|
codecAsset.PowerOff.OutputSig.UserObject = codecPowerOffAction;
|
||||||
codec.StandbyIsOnFeedback.LinkComplementInputSig(codecAsset.PowerOn.InputSig);
|
codec.StandbyIsOnFeedback.LinkComplementInputSig(codecAsset.PowerOn.InputSig);
|
||||||
|
|
||||||
// TODO: Map relevant attributes on asset symbol
|
// TODO: Map relevant attributes on asset symbol
|
||||||
|
|
||||||
codecAsset.TrySetMakeModel(codec);
|
codecAsset.TrySetMakeModel(codec);
|
||||||
codecAsset.TryLinkAssetErrorToCommunication(codec);
|
codecAsset.TryLinkAssetErrorToCommunication(codec);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Error setting up codec in Fusion: {0}", e);
|
Debug.Console(1, this, "Error setting up codec in Fusion: {0}", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void codec_CallStatusChange(object sender, PepperDash.Essentials.Devices.Common.Codec.CodecCallStatusItemChangeEventArgs e)
|
void codec_CallStatusChange(object sender, PepperDash.Essentials.Devices.Common.Codec.CodecCallStatusItemChangeEventArgs e)
|
||||||
{
|
{
|
||||||
var codec = (Room as IEssentialsHuddleVtc1Room).VideoCodec;
|
var codec = (Room as IEssentialsHuddleVtc1Room).VideoCodec;
|
||||||
|
|
||||||
CodecIsInCall.InputSig.BoolValue = codec.IsInCall;
|
CodecIsInCall.InputSig.BoolValue = codec.IsInCall;
|
||||||
}
|
}
|
||||||
|
|
||||||
// These methods are overridden because they access the room class which is of a different type
|
// These methods are overridden because they access the room class which is of a different type
|
||||||
|
|
||||||
protected override void CreateSymbolAndBasicSigs(uint ipId)
|
protected override void CreateSymbolAndBasicSigs(uint ipId)
|
||||||
{
|
{
|
||||||
Debug.Console(0, this, "Creating Fusion Room symbol with GUID: {0} and IP-ID {1:X2}", RoomGuid, ipId);
|
Debug.Console(0, this, "Creating Fusion Room symbol with GUID: {0} and IP-ID {1:X2}", RoomGuid, ipId);
|
||||||
|
|
||||||
FusionRoom = new FusionRoom(ipId, Global.ControlSystem, Room.Name, RoomGuid);
|
FusionRoom = new FusionRoom(ipId, Global.ControlSystem, Room.Name, RoomGuid);
|
||||||
FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.Use();
|
FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.Use();
|
||||||
FusionRoom.ExtenderFusionRoomDataReservedSigs.Use();
|
FusionRoom.ExtenderFusionRoomDataReservedSigs.Use();
|
||||||
|
|
||||||
FusionRoom.Register();
|
FusionRoom.Register();
|
||||||
|
|
||||||
FusionRoom.FusionStateChange += FusionRoom_FusionStateChange;
|
FusionRoom.FusionStateChange += FusionRoom_FusionStateChange;
|
||||||
|
|
||||||
FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.DeviceExtenderSigChange += FusionRoomSchedule_DeviceExtenderSigChange;
|
FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.DeviceExtenderSigChange += FusionRoomSchedule_DeviceExtenderSigChange;
|
||||||
FusionRoom.ExtenderFusionRoomDataReservedSigs.DeviceExtenderSigChange += ExtenderFusionRoomDataReservedSigs_DeviceExtenderSigChange;
|
FusionRoom.ExtenderFusionRoomDataReservedSigs.DeviceExtenderSigChange += ExtenderFusionRoomDataReservedSigs_DeviceExtenderSigChange;
|
||||||
FusionRoom.OnlineStatusChange += FusionRoom_OnlineStatusChange;
|
FusionRoom.OnlineStatusChange += FusionRoom_OnlineStatusChange;
|
||||||
|
|
||||||
CrestronConsole.AddNewConsoleCommand(RequestFullRoomSchedule, "FusReqRoomSchedule", "Requests schedule of the room for the next 24 hours", ConsoleAccessLevelEnum.AccessOperator);
|
CrestronConsole.AddNewConsoleCommand(RequestFullRoomSchedule, "FusReqRoomSchedule", "Requests schedule of the room for the next 24 hours", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
CrestronConsole.AddNewConsoleCommand(ModifyMeetingEndTimeConsoleHelper, "FusReqRoomSchMod", "Ends or extends a meeting by the specified time", ConsoleAccessLevelEnum.AccessOperator);
|
CrestronConsole.AddNewConsoleCommand(ModifyMeetingEndTimeConsoleHelper, "FusReqRoomSchMod", "Ends or extends a meeting by the specified time", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
CrestronConsole.AddNewConsoleCommand(CreateAdHocMeeting, "FusCreateMeeting", "Creates and Ad Hoc meeting for on hour or until the next meeting", ConsoleAccessLevelEnum.AccessOperator);
|
CrestronConsole.AddNewConsoleCommand(CreateAdHocMeeting, "FusCreateMeeting", "Creates and Ad Hoc meeting for on hour or until the next meeting", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
// Room to fusion room
|
// Room to fusion room
|
||||||
Room.OnFeedback.LinkInputSig(FusionRoom.SystemPowerOn.InputSig);
|
Room.OnFeedback.LinkInputSig(FusionRoom.SystemPowerOn.InputSig);
|
||||||
|
|
||||||
// Moved to
|
// Moved to
|
||||||
CurrentRoomSourceNameSig = FusionRoom.CreateOffsetStringSig(JoinMap.Display1CurrentSourceName.JoinNumber, JoinMap.Display1CurrentSourceName.AttributeName, eSigIoMask.InputSigOnly);
|
CurrentRoomSourceNameSig = FusionRoom.CreateOffsetStringSig(JoinMap.Display1CurrentSourceName.JoinNumber, JoinMap.Display1CurrentSourceName.AttributeName, eSigIoMask.InputSigOnly);
|
||||||
// Don't think we need to get current status of this as nothing should be alive yet.
|
// Don't think we need to get current status of this as nothing should be alive yet.
|
||||||
(Room as IEssentialsHuddleVtc1Room).CurrentSourceChange += Room_CurrentSourceInfoChange;
|
(Room as IEssentialsHuddleVtc1Room).CurrentSourceChange += Room_CurrentSourceInfoChange;
|
||||||
|
|
||||||
|
|
||||||
FusionRoom.SystemPowerOn.OutputSig.SetSigFalseAction((Room as IEssentialsHuddleVtc1Room).PowerOnToDefaultOrLastSource);
|
FusionRoom.SystemPowerOn.OutputSig.SetSigFalseAction((Room as IEssentialsHuddleVtc1Room).PowerOnToDefaultOrLastSource);
|
||||||
FusionRoom.SystemPowerOff.OutputSig.SetSigFalseAction(() => (Room as IEssentialsHuddleVtc1Room).RunRouteAction("roomOff", Room.SourceListKey));
|
FusionRoom.SystemPowerOff.OutputSig.SetSigFalseAction(() => (Room as IEssentialsHuddleVtc1Room).RunRouteAction("roomOff", Room.SourceListKey));
|
||||||
|
|
||||||
|
|
||||||
CrestronEnvironment.EthernetEventHandler += CrestronEnvironment_EthernetEventHandler;
|
CrestronEnvironment.EthernetEventHandler += CrestronEnvironment_EthernetEventHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void SetUpSources()
|
protected override void SetUpSources()
|
||||||
{
|
{
|
||||||
// Sources
|
// Sources
|
||||||
var dict = ConfigReader.ConfigObject.GetSourceListForKey((Room as IEssentialsHuddleVtc1Room).SourceListKey);
|
var dict = ConfigReader.ConfigObject.GetSourceListForKey((Room as IEssentialsHuddleVtc1Room).SourceListKey);
|
||||||
if (dict != null)
|
if (dict != null)
|
||||||
{
|
{
|
||||||
// NEW PROCESS:
|
// NEW PROCESS:
|
||||||
// Make these lists and insert the fusion attributes by iterating these
|
// Make these lists and insert the fusion attributes by iterating these
|
||||||
var setTopBoxes = dict.Where(d => d.Value.SourceDevice is ISetTopBoxControls);
|
var setTopBoxes = dict.Where(d => d.Value.SourceDevice is ISetTopBoxControls);
|
||||||
uint i = 1;
|
uint i = 1;
|
||||||
foreach (var kvp in setTopBoxes)
|
foreach (var kvp in setTopBoxes)
|
||||||
{
|
{
|
||||||
TryAddRouteActionSigs(JoinMap.Display1DiscPlayerSourceStart.AttributeName + " " + i, JoinMap.Display1DiscPlayerSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice);
|
TryAddRouteActionSigs(JoinMap.Display1DiscPlayerSourceStart.AttributeName + " " + i, JoinMap.Display1DiscPlayerSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice);
|
||||||
i++;
|
i++;
|
||||||
if (i > JoinMap.Display1SetTopBoxSourceStart.JoinSpan) // We only have five spots
|
if (i > JoinMap.Display1SetTopBoxSourceStart.JoinSpan) // We only have five spots
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
var discPlayers = dict.Where(d => d.Value.SourceDevice is IDiscPlayerControls);
|
var discPlayers = dict.Where(d => d.Value.SourceDevice is IDiscPlayerControls);
|
||||||
i = 1;
|
i = 1;
|
||||||
foreach (var kvp in discPlayers)
|
foreach (var kvp in discPlayers)
|
||||||
{
|
{
|
||||||
TryAddRouteActionSigs(JoinMap.Display1DiscPlayerSourceStart.AttributeName + " " + i, JoinMap.Display1DiscPlayerSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice);
|
TryAddRouteActionSigs(JoinMap.Display1DiscPlayerSourceStart.AttributeName + " " + i, JoinMap.Display1DiscPlayerSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice);
|
||||||
i++;
|
i++;
|
||||||
if (i > 5) // We only have five spots
|
if (i > 5) // We only have five spots
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
var laptops = dict.Where(d => d.Value.SourceDevice is Core.Devices.Laptop);
|
var laptops = dict.Where(d => d.Value.SourceDevice is Core.Devices.Laptop);
|
||||||
i = 1;
|
i = 1;
|
||||||
foreach (var kvp in laptops)
|
foreach (var kvp in laptops)
|
||||||
{
|
{
|
||||||
TryAddRouteActionSigs(JoinMap.Display1LaptopSourceStart.AttributeName + " " + i, JoinMap.Display1LaptopSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice);
|
TryAddRouteActionSigs(JoinMap.Display1LaptopSourceStart.AttributeName + " " + i, JoinMap.Display1LaptopSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice);
|
||||||
i++;
|
i++;
|
||||||
if (i > JoinMap.Display1LaptopSourceStart.JoinSpan) // We only have ten spots???
|
if (i > JoinMap.Display1LaptopSourceStart.JoinSpan) // We only have ten spots???
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var kvp in dict)
|
foreach (var kvp in dict)
|
||||||
{
|
{
|
||||||
var usageDevice = kvp.Value.SourceDevice as IUsageTracking;
|
var usageDevice = kvp.Value.SourceDevice as IUsageTracking;
|
||||||
|
|
||||||
if (usageDevice != null)
|
if (usageDevice != null)
|
||||||
{
|
{
|
||||||
usageDevice.UsageTracker = new UsageTracking(usageDevice as Device);
|
usageDevice.UsageTracker = new UsageTracking(usageDevice as Device);
|
||||||
usageDevice.UsageTracker.UsageIsTracked = true;
|
usageDevice.UsageTracker.UsageIsTracked = true;
|
||||||
usageDevice.UsageTracker.DeviceUsageEnded += new EventHandler<DeviceUsageEventArgs>(UsageTracker_DeviceUsageEnded);
|
usageDevice.UsageTracker.DeviceUsageEnded += new EventHandler<DeviceUsageEventArgs>(UsageTracker_DeviceUsageEnded);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "WARNING: Config source list '{0}' not found for room '{1}'",
|
Debug.Console(1, this, "WARNING: Config source list '{0}' not found for room '{1}'",
|
||||||
(Room as IEssentialsHuddleVtc1Room).SourceListKey, Room.Key);
|
(Room as IEssentialsHuddleVtc1Room).SourceListKey, Room.Key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void SetUpDisplay()
|
protected override void SetUpDisplay()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//Setup Display Usage Monitoring
|
//Setup Display Usage Monitoring
|
||||||
|
|
||||||
var displays = DeviceManager.AllDevices.Where(d => d is DisplayBase);
|
var displays = DeviceManager.AllDevices.Where(d => d is DisplayBase);
|
||||||
|
|
||||||
// Consider updating this in multiple display systems
|
// Consider updating this in multiple display systems
|
||||||
|
|
||||||
foreach (DisplayBase display in displays)
|
foreach (DisplayBase display in displays)
|
||||||
{
|
{
|
||||||
display.UsageTracker = new UsageTracking(display);
|
display.UsageTracker = new UsageTracking(display);
|
||||||
display.UsageTracker.UsageIsTracked = true;
|
display.UsageTracker.UsageIsTracked = true;
|
||||||
display.UsageTracker.DeviceUsageEnded += new EventHandler<DeviceUsageEventArgs>(UsageTracker_DeviceUsageEnded);
|
display.UsageTracker.DeviceUsageEnded += new EventHandler<DeviceUsageEventArgs>(UsageTracker_DeviceUsageEnded);
|
||||||
}
|
}
|
||||||
|
|
||||||
var defaultDisplay = (Room as IEssentialsHuddleVtc1Room).DefaultDisplay as DisplayBase;
|
var defaultDisplay = (Room as IEssentialsHuddleVtc1Room).DefaultDisplay as DisplayBase;
|
||||||
if (defaultDisplay == null)
|
if (defaultDisplay == null)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Cannot link null display to Fusion because default display is null");
|
Debug.Console(1, this, "Cannot link null display to Fusion because default display is null");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var dispPowerOnAction = new Action<bool>(b => { if (!b) defaultDisplay.PowerOn(); });
|
var dispPowerOnAction = new Action<bool>(b => { if (!b) defaultDisplay.PowerOn(); });
|
||||||
var dispPowerOffAction = new Action<bool>(b => { if (!b) defaultDisplay.PowerOff(); });
|
var dispPowerOffAction = new Action<bool>(b => { if (!b) defaultDisplay.PowerOff(); });
|
||||||
|
|
||||||
// Display to fusion room sigs
|
// Display to fusion room sigs
|
||||||
FusionRoom.DisplayPowerOn.OutputSig.UserObject = dispPowerOnAction;
|
FusionRoom.DisplayPowerOn.OutputSig.UserObject = dispPowerOnAction;
|
||||||
FusionRoom.DisplayPowerOff.OutputSig.UserObject = dispPowerOffAction;
|
FusionRoom.DisplayPowerOff.OutputSig.UserObject = dispPowerOffAction;
|
||||||
|
|
||||||
var defaultDisplayTwoWay = defaultDisplay as IHasPowerControlWithFeedback;
|
var defaultDisplayTwoWay = defaultDisplay as IHasPowerControlWithFeedback;
|
||||||
if (defaultDisplayTwoWay != null)
|
if (defaultDisplayTwoWay != null)
|
||||||
{
|
{
|
||||||
defaultDisplayTwoWay.PowerIsOnFeedback.LinkInputSig(FusionRoom.DisplayPowerOn.InputSig);
|
defaultDisplayTwoWay.PowerIsOnFeedback.LinkInputSig(FusionRoom.DisplayPowerOn.InputSig);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defaultDisplay is IDisplayUsage)
|
if (defaultDisplay is IDisplayUsage)
|
||||||
(defaultDisplay as IDisplayUsage).LampHours.LinkInputSig(FusionRoom.DisplayUsage.InputSig);
|
(defaultDisplay as IDisplayUsage).LampHours.LinkInputSig(FusionRoom.DisplayUsage.InputSig);
|
||||||
|
|
||||||
MapDisplayToRoomJoins(1, JoinMap.Display1Start.JoinNumber, defaultDisplay);
|
MapDisplayToRoomJoins(1, JoinMap.Display1Start.JoinNumber, defaultDisplay);
|
||||||
|
|
||||||
var deviceConfig = ConfigReader.ConfigObject.Devices.FirstOrDefault(d => d.Key.Equals(defaultDisplay.Key));
|
var deviceConfig = ConfigReader.ConfigObject.Devices.FirstOrDefault(d => d.Key.Equals(defaultDisplay.Key));
|
||||||
|
|
||||||
//Check for existing asset in GUIDs collection
|
//Check for existing asset in GUIDs collection
|
||||||
|
|
||||||
var tempAsset = new FusionAsset();
|
var tempAsset = new FusionAsset();
|
||||||
|
|
||||||
if (FusionStaticAssets.ContainsKey(deviceConfig.Uid))
|
if (FusionStaticAssets.ContainsKey(deviceConfig.Uid))
|
||||||
{
|
{
|
||||||
tempAsset = FusionStaticAssets[deviceConfig.Uid];
|
tempAsset = FusionStaticAssets[deviceConfig.Uid];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Create a new asset
|
// Create a new asset
|
||||||
tempAsset = new FusionAsset(FusionRoomGuids.GetNextAvailableAssetNumber(FusionRoom), defaultDisplay.Name, "Display", "");
|
tempAsset = new FusionAsset(FusionRoomGuids.GetNextAvailableAssetNumber(FusionRoom), defaultDisplay.Name, "Display", "");
|
||||||
FusionStaticAssets.Add(deviceConfig.Uid, tempAsset);
|
FusionStaticAssets.Add(deviceConfig.Uid, tempAsset);
|
||||||
}
|
}
|
||||||
|
|
||||||
var dispAsset = FusionRoom.CreateStaticAsset(tempAsset.SlotNumber, tempAsset.Name, "Display", tempAsset.InstanceId);
|
var dispAsset = FusionRoom.CreateStaticAsset(tempAsset.SlotNumber, tempAsset.Name, "Display", tempAsset.InstanceId);
|
||||||
dispAsset.PowerOn.OutputSig.UserObject = dispPowerOnAction;
|
dispAsset.PowerOn.OutputSig.UserObject = dispPowerOnAction;
|
||||||
dispAsset.PowerOff.OutputSig.UserObject = dispPowerOffAction;
|
dispAsset.PowerOff.OutputSig.UserObject = dispPowerOffAction;
|
||||||
|
|
||||||
|
|
||||||
var defaultTwoWayDisplay = defaultDisplay as IHasPowerControlWithFeedback;
|
var defaultTwoWayDisplay = defaultDisplay as IHasPowerControlWithFeedback;
|
||||||
if (defaultTwoWayDisplay != null)
|
if (defaultTwoWayDisplay != null)
|
||||||
{
|
{
|
||||||
defaultTwoWayDisplay.PowerIsOnFeedback.LinkInputSig(FusionRoom.DisplayPowerOn.InputSig);
|
defaultTwoWayDisplay.PowerIsOnFeedback.LinkInputSig(FusionRoom.DisplayPowerOn.InputSig);
|
||||||
if (defaultDisplay is IDisplayUsage)
|
if (defaultDisplay is IDisplayUsage)
|
||||||
(defaultDisplay as IDisplayUsage).LampHours.LinkInputSig(FusionRoom.DisplayUsage.InputSig);
|
(defaultDisplay as IDisplayUsage).LampHours.LinkInputSig(FusionRoom.DisplayUsage.InputSig);
|
||||||
|
|
||||||
defaultTwoWayDisplay.PowerIsOnFeedback.LinkInputSig(dispAsset.PowerOn.InputSig);
|
defaultTwoWayDisplay.PowerIsOnFeedback.LinkInputSig(dispAsset.PowerOn.InputSig);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use extension methods
|
// Use extension methods
|
||||||
dispAsset.TrySetMakeModel(defaultDisplay);
|
dispAsset.TrySetMakeModel(defaultDisplay);
|
||||||
dispAsset.TryLinkAssetErrorToCommunication(defaultDisplay);
|
dispAsset.TryLinkAssetErrorToCommunication(defaultDisplay);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Error setting up display in Fusion: {0}", e);
|
Debug.Console(1, this, "Error setting up display in Fusion: {0}", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void MapDisplayToRoomJoins(int displayIndex, uint joinOffset, DisplayBase display)
|
protected override void MapDisplayToRoomJoins(int displayIndex, uint joinOffset, DisplayBase display)
|
||||||
{
|
{
|
||||||
string displayName = string.Format("Display {0} - ", displayIndex);
|
string displayName = string.Format("Display {0} - ", displayIndex);
|
||||||
|
|
||||||
|
|
||||||
if (display == (Room as IEssentialsHuddleVtc1Room).DefaultDisplay)
|
if (display == (Room as IEssentialsHuddleVtc1Room).DefaultDisplay)
|
||||||
{
|
{
|
||||||
// Power on
|
// Power on
|
||||||
var defaultDisplayPowerOn = FusionRoom.CreateOffsetBoolSig((uint)joinOffset, displayName + "Power On", eSigIoMask.InputOutputSig);
|
var defaultDisplayPowerOn = FusionRoom.CreateOffsetBoolSig((uint)joinOffset, displayName + "Power On", eSigIoMask.InputOutputSig);
|
||||||
defaultDisplayPowerOn.OutputSig.UserObject = new Action<bool>(b => { if (!b) display.PowerOn(); });
|
defaultDisplayPowerOn.OutputSig.UserObject = new Action<bool>(b => { if (!b) display.PowerOn(); });
|
||||||
|
|
||||||
// Power Off
|
// Power Off
|
||||||
var defaultDisplayPowerOff = FusionRoom.CreateOffsetBoolSig((uint)joinOffset + 1, displayName + "Power Off", eSigIoMask.InputOutputSig);
|
var defaultDisplayPowerOff = FusionRoom.CreateOffsetBoolSig((uint)joinOffset + 1, displayName + "Power Off", eSigIoMask.InputOutputSig);
|
||||||
defaultDisplayPowerOn.OutputSig.UserObject = new Action<bool>(b => { if (!b) display.PowerOff(); }); ;
|
defaultDisplayPowerOn.OutputSig.UserObject = new Action<bool>(b => { if (!b) display.PowerOff(); }); ;
|
||||||
|
|
||||||
var displayTwoWay = display as IHasPowerControlWithFeedback;
|
var displayTwoWay = display as IHasPowerControlWithFeedback;
|
||||||
if (displayTwoWay != null)
|
if (displayTwoWay != null)
|
||||||
{
|
{
|
||||||
displayTwoWay.PowerIsOnFeedback.LinkInputSig(defaultDisplayPowerOn.InputSig);
|
displayTwoWay.PowerIsOnFeedback.LinkInputSig(defaultDisplayPowerOn.InputSig);
|
||||||
displayTwoWay.PowerIsOnFeedback.LinkInputSig(defaultDisplayPowerOn.InputSig);
|
displayTwoWay.PowerIsOnFeedback.LinkInputSig(defaultDisplayPowerOn.InputSig);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Current Source
|
// Current Source
|
||||||
var defaultDisplaySourceNone = FusionRoom.CreateOffsetBoolSig((uint)joinOffset + 8, displayName + "Source None", eSigIoMask.InputOutputSig);
|
var defaultDisplaySourceNone = FusionRoom.CreateOffsetBoolSig((uint)joinOffset + 8, displayName + "Source None", eSigIoMask.InputOutputSig);
|
||||||
defaultDisplaySourceNone.OutputSig.UserObject = new Action<bool>(b => { if (!b) (Room as IEssentialsHuddleVtc1Room).RunRouteAction("roomOff", Room.SourceListKey); }); ;
|
defaultDisplaySourceNone.OutputSig.UserObject = new Action<bool>(b => { if (!b) (Room as IEssentialsHuddleVtc1Room).RunRouteAction("roomOff", Room.SourceListKey); }); ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,233 +1,233 @@
|
|||||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
<ProductVersion>9.0.30729</ProductVersion>
|
<ProductVersion>9.0.30729</ProductVersion>
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
<ProjectGuid>{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>PepperDashEssentials</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>
|
||||||
<PlatformID>E2BECB1F-8C8C-41ba-B736-9BE7D946A398</PlatformID>
|
<PlatformID>E2BECB1F-8C8C-41ba-B736-9BE7D946A398</PlatformID>
|
||||||
<OSVersion>5.0</OSVersion>
|
<OSVersion>5.0</OSVersion>
|
||||||
<DeployDirSuffix>SmartDeviceProject1</DeployDirSuffix>
|
<DeployDirSuffix>SmartDeviceProject1</DeployDirSuffix>
|
||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<NativePlatformName>Windows CE</NativePlatformName>
|
<NativePlatformName>Windows CE</NativePlatformName>
|
||||||
<FormFactorID>
|
<FormFactorID>
|
||||||
</FormFactorID>
|
</FormFactorID>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<AllowedReferenceRelatedFileExtensions>.allowedReferenceRelatedFileExtensions</AllowedReferenceRelatedFileExtensions>
|
<AllowedReferenceRelatedFileExtensions>.allowedReferenceRelatedFileExtensions</AllowedReferenceRelatedFileExtensions>
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>bin\</OutputPath>
|
<OutputPath>bin\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE;</DefineConstants>
|
<DefineConstants>DEBUG;TRACE;</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<NoStdLib>true</NoStdLib>
|
<NoStdLib>true</NoStdLib>
|
||||||
<NoConfig>true</NoConfig>
|
<NoConfig>true</NoConfig>
|
||||||
<GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
|
<GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<AllowedReferenceRelatedFileExtensions>.allowedReferenceRelatedFileExtensions</AllowedReferenceRelatedFileExtensions>
|
<AllowedReferenceRelatedFileExtensions>.allowedReferenceRelatedFileExtensions</AllowedReferenceRelatedFileExtensions>
|
||||||
<DebugType>none</DebugType>
|
<DebugType>none</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>bin\</OutputPath>
|
<OutputPath>bin\</OutputPath>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<NoStdLib>true</NoStdLib>
|
<NoStdLib>true</NoStdLib>
|
||||||
<NoConfig>true</NoConfig>
|
<NoConfig>true</NoConfig>
|
||||||
<GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
|
<GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Crestron.SimplSharpPro.DeviceSupport, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="Crestron.SimplSharpPro.DeviceSupport, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Crestron.SimplSharpPro.DM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="Crestron.SimplSharpPro.DM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Crestron.SimplSharpPro.EthernetCommunications, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="Crestron.SimplSharpPro.EthernetCommunications, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.EthernetCommunications.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.EthernetCommunications.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Crestron.SimplSharpPro.Fusion, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="Crestron.SimplSharpPro.Fusion, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Fusion.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Fusion.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Crestron.SimplSharpPro.Remotes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="Crestron.SimplSharpPro.Remotes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Remotes.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Remotes.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Crestron.SimplSharpPro.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="Crestron.SimplSharpPro.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="mscorlib" />
|
<Reference Include="mscorlib" />
|
||||||
<Reference Include="PepperDash_Core, Version=1.0.42.30563, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="PepperDash_Core, Version=1.3.3.32940, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\PepperDashCore\lib\net35\PepperDash_Core.dll</HintPath>
|
<HintPath>..\..\packages\PepperDashCore\lib\net35\PepperDash_Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SimplSharpHelperInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="SimplSharpHelperInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SimplSharpNewtonsoft, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="SimplSharpNewtonsoft, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SimplSharpPro, Version=1.5.3.17, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="SimplSharpPro, Version=1.5.3.17, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SimplSharpReflectionInterface, Version=1.0.5583.25238, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="SimplSharpReflectionInterface, Version=1.0.5583.25238, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SimplSharpTimerEventInterface, Version=1.0.6197.20052, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="SimplSharpTimerEventInterface, Version=1.0.6197.20052, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpTimerEventInterface.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpTimerEventInterface.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Audio\EssentialsVolumeLevelConfig.cs" />
|
<Compile Include="Audio\EssentialsVolumeLevelConfig.cs" />
|
||||||
<Compile Include="Bridges\EiscBridge.cs" />
|
<Compile Include="Bridges\EiscBridge.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\AirMediaControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\AirMediaControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\AppleTvJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\AppleTvJoinMap.cs" />
|
||||||
<Compile Include="Bridges\BridgeFactory.cs" />
|
<Compile Include="Bridges\BridgeFactory.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\C2nRthsControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\C2nRthsControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\CameraControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\CameraControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\DigitalLoggerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\DigitalLoggerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\DisplayControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\DisplayControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\DmBladeChassisControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\DmBladeChassisControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\DmChassisControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\DmChassisControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\DmpsAudioOutputControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\DmpsAudioOutputControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\DmpsRoutingControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\DmpsRoutingControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\DmRmcControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\DmRmcControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\DmTxControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\DmTxControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\GenericLightingJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\GenericLightingJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\GenericRelayControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\GenericRelayControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\GlsOccupancySensorBaseJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\GlsOccupancySensorBaseJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\HdMdxxxCEControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\HdMdxxxCEControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\IBasicCommunicationJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\IBasicCommunicationJoinMap.cs" />
|
||||||
<Compile Include="Bridges\IBridge.cs" />
|
<Compile Include="Bridges\IBridge.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\IDigitalInputJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\IDigitalInputJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\SetTopBoxControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\SetTopBoxControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\StatusSignControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\StatusSignControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\SystemMonitorJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\SystemMonitorJoinMap.cs" />
|
||||||
<Compile Include="Factory\DeviceFactory.cs" />
|
<Compile Include="Factory\DeviceFactory.cs" />
|
||||||
<Compile Include="Devices\Amplifier.cs" />
|
<Compile Include="Devices\Amplifier.cs" />
|
||||||
<Compile Include="ControlSystem.cs" />
|
<Compile Include="ControlSystem.cs" />
|
||||||
<Compile Include="Fusion\EssentialsHuddleVtc1FusionController.cs" />
|
<Compile Include="Fusion\EssentialsHuddleVtc1FusionController.cs" />
|
||||||
<Compile Include="Fusion\EssentialsTechRoomFusionSystemController.cs" />
|
<Compile Include="Fusion\EssentialsTechRoomFusionSystemController.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsDualDisplayRoomPropertiesConfig.cs" />
|
<Compile Include="Room\Config\EssentialsDualDisplayRoomPropertiesConfig.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsNDisplayRoomPropertiesConfig.cs" />
|
<Compile Include="Room\Config\EssentialsNDisplayRoomPropertiesConfig.cs" />
|
||||||
<Compile Include="Room\Config\SimplRoomPropertiesConfig.cs" />
|
<Compile Include="Room\Config\SimplRoomPropertiesConfig.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsPresentationPropertiesConfig.cs" />
|
<Compile Include="Room\Config\EssentialsPresentationPropertiesConfig.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsHuddleRoomPropertiesConfig.cs" />
|
<Compile Include="Room\Config\EssentialsHuddleRoomPropertiesConfig.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsHuddleVtc1PropertiesConfig.cs" />
|
<Compile Include="Room\Config\EssentialsHuddleVtc1PropertiesConfig.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsRoomEmergencyConfig.cs" />
|
<Compile Include="Room\Config\EssentialsRoomEmergencyConfig.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsTechRoomConfig.cs" />
|
<Compile Include="Room\Config\EssentialsTechRoomConfig.cs" />
|
||||||
<Compile Include="Room\Emergency\EsentialsRoomEmergencyContactClosure.cs" />
|
<Compile Include="Room\Emergency\EsentialsRoomEmergencyContactClosure.cs" />
|
||||||
<Compile Include="Room\Types\EssentialsCombinedHuddleVtc1Room.cs" />
|
<Compile Include="Room\Types\EssentialsCombinedHuddleVtc1Room.cs" />
|
||||||
<Compile Include="Room\Types\EssentialsDualDisplayRoom.cs" />
|
<Compile Include="Room\Types\EssentialsDualDisplayRoom.cs" />
|
||||||
<Compile Include="Room\Types\EssentialsHuddleVtc1Room.cs" />
|
<Compile Include="Room\Types\EssentialsHuddleVtc1Room.cs" />
|
||||||
<Compile Include="Room\Types\EssentialsNDisplayRoomBase.cs" />
|
<Compile Include="Room\Types\EssentialsNDisplayRoomBase.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsRoomConfig.cs" />
|
<Compile Include="Room\Config\EssentialsRoomConfig.cs" />
|
||||||
<Compile Include="Room\Types\EssentialsTechRoom.cs" />
|
<Compile Include="Room\Types\EssentialsTechRoom.cs" />
|
||||||
<Compile Include="Room\Types\Interfaces\IEssentialsHuddleSpaceRoom.cs" />
|
<Compile Include="Room\Types\Interfaces\IEssentialsHuddleSpaceRoom.cs" />
|
||||||
<Compile Include="Room\Types\Interfaces\IEssentialsHuddleVtc1Room.cs" />
|
<Compile Include="Room\Types\Interfaces\IEssentialsHuddleVtc1Room.cs" />
|
||||||
<Compile Include="UIDrivers\Environment Drivers\EssentialsEnvironmentDriver.cs" />
|
<Compile Include="UIDrivers\Environment Drivers\EssentialsEnvironmentDriver.cs" />
|
||||||
<Compile Include="UIDrivers\Environment Drivers\EssentialsLightingDriver.cs" />
|
<Compile Include="UIDrivers\Environment Drivers\EssentialsLightingDriver.cs" />
|
||||||
<Compile Include="UIDrivers\Environment Drivers\EssentialsShadeDriver.cs" />
|
<Compile Include="UIDrivers\Environment Drivers\EssentialsShadeDriver.cs" />
|
||||||
<Compile Include="UIDrivers\Essentials\EssentialsHeaderDriver.cs" />
|
<Compile Include="UIDrivers\Essentials\EssentialsHeaderDriver.cs" />
|
||||||
<Compile Include="UIDrivers\JoinedSigInterlock.cs" />
|
<Compile Include="UIDrivers\JoinedSigInterlock.cs" />
|
||||||
<Compile Include="UIDrivers\ScreenSaverController.cs" />
|
<Compile Include="UIDrivers\ScreenSaverController.cs" />
|
||||||
<Compile Include="UIDrivers\SigInterlock.cs" />
|
<Compile Include="UIDrivers\SigInterlock.cs" />
|
||||||
<Compile Include="UIDrivers\EssentialsHuddleVTC\EssentialsHuddlePresentationUiDriver.cs" />
|
<Compile Include="UIDrivers\EssentialsHuddleVTC\EssentialsHuddlePresentationUiDriver.cs" />
|
||||||
<Compile Include="UIDrivers\EssentialsHuddle\EssentialsHuddleTechPageDriver.cs" />
|
<Compile Include="UIDrivers\EssentialsHuddle\EssentialsHuddleTechPageDriver.cs" />
|
||||||
<Compile Include="UI\HttpLogoServer.cs" />
|
<Compile Include="UI\HttpLogoServer.cs" />
|
||||||
<Compile Include="UI\SmartObjectHeaderButtonList.cs" />
|
<Compile Include="UI\SmartObjectHeaderButtonList.cs" />
|
||||||
<Compile Include="UI\SubpageReferenceListCallStagingItem.cs" />
|
<Compile Include="UI\SubpageReferenceListCallStagingItem.cs" />
|
||||||
<Compile Include="UIDrivers\VC\EssentialsVideoCodecUiDriver.cs" />
|
<Compile Include="UIDrivers\VC\EssentialsVideoCodecUiDriver.cs" />
|
||||||
<Compile Include="UIDrivers\EssentialsHuddleVTC\EssentialsHuddleVtc1PanelAvFunctionsDriver.cs" />
|
<Compile Include="UIDrivers\EssentialsHuddleVTC\EssentialsHuddleVtc1PanelAvFunctionsDriver.cs" />
|
||||||
<Compile Include="UIDrivers\SourceChangeArgs.cs" />
|
<Compile Include="UIDrivers\SourceChangeArgs.cs" />
|
||||||
<Compile Include="UI\JoinConstants\UISmartObjectJoin.cs" />
|
<Compile Include="UI\JoinConstants\UISmartObjectJoin.cs" />
|
||||||
<Compile Include="UI\JoinConstants\UIStringlJoin.cs" />
|
<Compile Include="UI\JoinConstants\UIStringlJoin.cs" />
|
||||||
<Compile Include="UI\JoinConstants\UIUshortJoin.cs" />
|
<Compile Include="UI\JoinConstants\UIUshortJoin.cs" />
|
||||||
<Compile Include="UIDrivers\DualDisplayRouting.cs" />
|
<Compile Include="UIDrivers\DualDisplayRouting.cs" />
|
||||||
<Compile Include="UIDrivers\Essentials\EssentialsPresentationPanelAvFunctionsDriver.cs" />
|
<Compile Include="UIDrivers\Essentials\EssentialsPresentationPanelAvFunctionsDriver.cs" />
|
||||||
<Compile Include="UIDrivers\Page Drivers\SingleSubpageModalDriver.cs" />
|
<Compile Include="UIDrivers\Page Drivers\SingleSubpageModalDriver.cs" />
|
||||||
<Compile Include="UIDrivers\Essentials\EssentialsPanelMainInterfaceDriver.cs" />
|
<Compile Include="UIDrivers\Essentials\EssentialsPanelMainInterfaceDriver.cs" />
|
||||||
<Compile Include="UIDrivers\enums and base.cs" />
|
<Compile Include="UIDrivers\enums and base.cs" />
|
||||||
<Compile Include="UIDrivers\EssentialsHuddle\EssentialsHuddlePanelAvFunctionsDriver.cs" />
|
<Compile Include="UIDrivers\EssentialsHuddle\EssentialsHuddlePanelAvFunctionsDriver.cs" />
|
||||||
<Compile Include="UIDrivers\Page Drivers\SingleSubpageModalAndBackDriver.cs" />
|
<Compile Include="UIDrivers\Page Drivers\SingleSubpageModalAndBackDriver.cs" />
|
||||||
<Compile Include="UIDrivers\SmartObjectRoomsList.cs" />
|
<Compile Include="UIDrivers\SmartObjectRoomsList.cs" />
|
||||||
<Compile Include="UI\JoinConstants\UIBoolJoin.cs" />
|
<Compile Include="UI\JoinConstants\UIBoolJoin.cs" />
|
||||||
<Compile Include="UI\DualDisplaySourceSRLController.cs" />
|
<Compile Include="UI\DualDisplaySourceSRLController.cs" />
|
||||||
<Compile Include="UI\SubpageReferenceListActivityItem.cs" />
|
<Compile Include="UI\SubpageReferenceListActivityItem.cs" />
|
||||||
<Compile Include="Room\Types\EssentialsHuddleSpaceRoom.cs" />
|
<Compile Include="Room\Types\EssentialsHuddleSpaceRoom.cs" />
|
||||||
<Compile Include="UI\EssentialsTouchpanelController.cs" />
|
<Compile Include="UI\EssentialsTouchpanelController.cs" />
|
||||||
<Compile Include="UI\SubpageReferenceListSourceItem.cs" />
|
<Compile Include="UI\SubpageReferenceListSourceItem.cs" />
|
||||||
<None Include="app.config" />
|
<None Include="app.config" />
|
||||||
<EmbeddedResource Include="Example Configuration\EssentialsHuddleSpaceRoom\configurationFile-HuddleSpace-2-Source.json">
|
<EmbeddedResource Include="Example Configuration\EssentialsHuddleSpaceRoom\configurationFile-HuddleSpace-2-Source.json">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Example Configuration\EssentialsHuddleVtc1Room\configurationFile-mockVideoCodec_din-ap3_-_dm4x1.json">
|
<EmbeddedResource Include="Example Configuration\EssentialsHuddleVtc1Room\configurationFile-mockVideoCodec_din-ap3_-_dm4x1.json">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Example Configuration\SIMPLBridging\configurationFile-dmps3300c-avRouting.json">
|
<EmbeddedResource Include="Example Configuration\SIMPLBridging\configurationFile-dmps3300c-avRouting.json">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Example Configuration\SIMPLBridging\SIMPLBridgeExample_configurationFile.json">
|
<EmbeddedResource Include="Example Configuration\SIMPLBridging\SIMPLBridgeExample_configurationFile.json">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<None Include="Properties\ControlSystem.cfg" />
|
<None Include="Properties\ControlSystem.cfg" />
|
||||||
<EmbeddedResource Include="SGD\PepperDash Essentials iPad.sgd">
|
<EmbeddedResource Include="SGD\PepperDash Essentials iPad.sgd">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="SGD\PepperDash Essentials TSW-560.sgd">
|
<EmbeddedResource Include="SGD\PepperDash Essentials TSW-560.sgd">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="SGD\PepperDash Essentials TSW-760.sgd">
|
<EmbeddedResource Include="SGD\PepperDash Essentials TSW-760.sgd">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\essentials-framework\Essentials Core\PepperDashEssentialsBase\PepperDash_Essentials_Core.csproj">
|
<ProjectReference Include="..\essentials-framework\Essentials Core\PepperDashEssentialsBase\PepperDash_Essentials_Core.csproj">
|
||||||
<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-framework\Essentials Devices Common\Essentials Devices Common\Essentials Devices Common.csproj">
|
<ProjectReference Include="..\essentials-framework\Essentials Devices Common\Essentials Devices Common\Essentials Devices Common.csproj">
|
||||||
<Project>{892B761C-E479-44CE-BD74-243E9214AF13}</Project>
|
<Project>{892B761C-E479-44CE-BD74-243E9214AF13}</Project>
|
||||||
<Name>Essentials Devices Common</Name>
|
<Name>Essentials Devices Common</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\essentials-framework\Essentials DM\Essentials_DM\PepperDash_Essentials_DM.csproj">
|
<ProjectReference Include="..\essentials-framework\Essentials DM\Essentials_DM\PepperDash_Essentials_DM.csproj">
|
||||||
<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>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<VisualStudio>
|
<VisualStudio>
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>rem S# Pro preparation will execute after these operations</PostBuildEvent>
|
<PostBuildEvent>rem S# Pro preparation will execute after these operations</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ControlSystem>
|
<ControlSystem>
|
||||||
<Name>Test RMC3</Name>
|
<Name>Test RMC3</Name>
|
||||||
<Address>auto 192.168.1.40;username crestron</Address>
|
<Address>auto 192.168.1.40;username crestron</Address>
|
||||||
<ProgramSlot>Program01</ProgramSlot>
|
<ProgramSlot>Program01</ProgramSlot>
|
||||||
<Storage>Internal Flash</Storage>
|
<Storage>Internal Flash</Storage>
|
||||||
</ControlSystem>
|
</ControlSystem>
|
||||||
@@ -1,411 +1,411 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials;
|
using PepperDash.Essentials;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Room.Config
|
namespace PepperDash.Essentials.Room.Config
|
||||||
{
|
{
|
||||||
public class EssentialsRoomConfigHelper
|
public class EssentialsRoomConfigHelper
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a room object from this config data
|
/// Returns a room object from this config data
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static IKeyed GetRoomObject(DeviceConfig roomConfig)
|
public static IKeyed GetRoomObject(DeviceConfig roomConfig)
|
||||||
{
|
{
|
||||||
var typeName = roomConfig.Type.ToLower();
|
var typeName = roomConfig.Type.ToLower();
|
||||||
|
|
||||||
switch (typeName)
|
switch (typeName)
|
||||||
{
|
{
|
||||||
case "huddle" :
|
case "huddle" :
|
||||||
{
|
{
|
||||||
return new EssentialsHuddleSpaceRoom(roomConfig);
|
return new EssentialsHuddleSpaceRoom(roomConfig);
|
||||||
}
|
}
|
||||||
case "huddlevtc1" :
|
case "huddlevtc1" :
|
||||||
{
|
{
|
||||||
return new EssentialsHuddleVtc1Room(roomConfig);
|
return new EssentialsHuddleVtc1Room(roomConfig);
|
||||||
}
|
}
|
||||||
case "ddvc01bridge" :
|
case "ddvc01bridge" :
|
||||||
{
|
{
|
||||||
return new Device(roomConfig.Key, roomConfig.Name); // placeholder device that does nothing.
|
return new Device(roomConfig.Key, roomConfig.Name); // placeholder device that does nothing.
|
||||||
}
|
}
|
||||||
case "dualdisplay" :
|
case "dualdisplay" :
|
||||||
{
|
{
|
||||||
return new EssentialsDualDisplayRoom(roomConfig);
|
return new EssentialsDualDisplayRoom(roomConfig);
|
||||||
}
|
}
|
||||||
case "combinedhuddlevtc1" :
|
case "combinedhuddlevtc1" :
|
||||||
{
|
{
|
||||||
return new EssentialsCombinedHuddleVtc1Room(roomConfig);
|
return new EssentialsCombinedHuddleVtc1Room(roomConfig);
|
||||||
}
|
}
|
||||||
case "techroom" :
|
case "techroom" :
|
||||||
{
|
{
|
||||||
return new EssentialsTechRoom(roomConfig);
|
return new EssentialsTechRoom(roomConfig);
|
||||||
}
|
}
|
||||||
default :
|
default :
|
||||||
{
|
{
|
||||||
return Core.DeviceFactory.GetDevice(roomConfig);
|
return Core.DeviceFactory.GetDevice(roomConfig);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets and operating, standalone emergegncy object that can be plugged into a room.
|
/// Gets and operating, standalone emergegncy object that can be plugged into a room.
|
||||||
/// Returns null if there is no emergency defined
|
/// Returns null if there is no emergency defined
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static EssentialsRoomEmergencyBase GetEmergency(EssentialsRoomPropertiesConfig props, IEssentialsRoom room)
|
public static EssentialsRoomEmergencyBase GetEmergency(EssentialsRoomPropertiesConfig props, IEssentialsRoom room)
|
||||||
{
|
{
|
||||||
// This emergency
|
// This emergency
|
||||||
var emergency = props.Emergency;
|
var emergency = props.Emergency;
|
||||||
if (emergency != null)
|
if (emergency != null)
|
||||||
{
|
{
|
||||||
//switch on emergency type here. Right now only contact and shutdown
|
//switch on emergency type here. Right now only contact and shutdown
|
||||||
var e = new EssentialsRoomEmergencyContactClosure(room.Key + "-emergency", props.Emergency, room);
|
var e = new EssentialsRoomEmergencyContactClosure(room.Key + "-emergency", props.Emergency, room);
|
||||||
DeviceManager.AddDevice(e);
|
DeviceManager.AddDevice(e);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="props"></param>
|
/// <param name="props"></param>
|
||||||
/// <param name="room"></param>
|
/// <param name="room"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static Core.Privacy.MicrophonePrivacyController GetMicrophonePrivacy(
|
public static Core.Privacy.MicrophonePrivacyController GetMicrophonePrivacy(
|
||||||
EssentialsRoomPropertiesConfig props, IPrivacy room)
|
EssentialsRoomPropertiesConfig props, IPrivacy room)
|
||||||
{
|
{
|
||||||
var microphonePrivacy = props.MicrophonePrivacy;
|
var microphonePrivacy = props.MicrophonePrivacy;
|
||||||
if (microphonePrivacy == null)
|
if (microphonePrivacy == null)
|
||||||
{
|
{
|
||||||
Debug.Console(0, "Cannot create microphone privacy with null properties");
|
Debug.Console(0, "Cannot create microphone privacy with null properties");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// Get the MicrophonePrivacy device from the device manager
|
// Get the MicrophonePrivacy device from the device manager
|
||||||
var mP = (DeviceManager.GetDeviceForKey(props.MicrophonePrivacy.DeviceKey) as
|
var mP = (DeviceManager.GetDeviceForKey(props.MicrophonePrivacy.DeviceKey) as
|
||||||
Core.Privacy.MicrophonePrivacyController);
|
Core.Privacy.MicrophonePrivacyController);
|
||||||
// Set this room as the IPrivacy device
|
// Set this room as the IPrivacy device
|
||||||
if (mP == null)
|
if (mP == null)
|
||||||
{
|
{
|
||||||
Debug.Console(0, "ERROR: Selected device {0} is not MicrophonePrivacyController", props.MicrophonePrivacy.DeviceKey);
|
Debug.Console(0, "ERROR: Selected device {0} is not MicrophonePrivacyController", props.MicrophonePrivacy.DeviceKey);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
mP.SetPrivacyDevice(room);
|
mP.SetPrivacyDevice(room);
|
||||||
|
|
||||||
var behaviour = props.MicrophonePrivacy.Behaviour.ToLower();
|
var behaviour = props.MicrophonePrivacy.Behaviour.ToLower();
|
||||||
|
|
||||||
if (behaviour == null)
|
if (behaviour == null)
|
||||||
{
|
{
|
||||||
Debug.Console(0, "WARNING: No behaviour defined for MicrophonePrivacyController");
|
Debug.Console(0, "WARNING: No behaviour defined for MicrophonePrivacyController");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (behaviour == "trackroomstate")
|
if (behaviour == "trackroomstate")
|
||||||
{
|
{
|
||||||
// Tie LED enable to room power state
|
// Tie LED enable to room power state
|
||||||
var essRoom = room as IEssentialsRoom;
|
var essRoom = room as IEssentialsRoom;
|
||||||
essRoom.OnFeedback.OutputChange += (o, a) =>
|
essRoom.OnFeedback.OutputChange += (o, a) =>
|
||||||
{
|
{
|
||||||
if (essRoom.OnFeedback.BoolValue)
|
if (essRoom.OnFeedback.BoolValue)
|
||||||
mP.EnableLeds = true;
|
mP.EnableLeds = true;
|
||||||
else
|
else
|
||||||
mP.EnableLeds = false;
|
mP.EnableLeds = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
mP.EnableLeds = essRoom.OnFeedback.BoolValue;
|
mP.EnableLeds = essRoom.OnFeedback.BoolValue;
|
||||||
}
|
}
|
||||||
else if (behaviour == "trackcallstate")
|
else if (behaviour == "trackcallstate")
|
||||||
{
|
{
|
||||||
// Tie LED enable to room power state
|
// Tie LED enable to room power state
|
||||||
var inCallRoom = room as IHasInCallFeedback;
|
var inCallRoom = room as IHasInCallFeedback;
|
||||||
inCallRoom.InCallFeedback.OutputChange += (o, a) =>
|
inCallRoom.InCallFeedback.OutputChange += (o, a) =>
|
||||||
{
|
{
|
||||||
if (inCallRoom.InCallFeedback.BoolValue)
|
if (inCallRoom.InCallFeedback.BoolValue)
|
||||||
mP.EnableLeds = true;
|
mP.EnableLeds = true;
|
||||||
else
|
else
|
||||||
mP.EnableLeds = false;
|
mP.EnableLeds = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
mP.EnableLeds = inCallRoom.InCallFeedback.BoolValue;
|
mP.EnableLeds = inCallRoom.InCallFeedback.BoolValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
return mP;
|
return mP;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsRoomPropertiesConfig
|
public class EssentialsRoomPropertiesConfig
|
||||||
{
|
{
|
||||||
[JsonProperty("addresses")]
|
[JsonProperty("addresses")]
|
||||||
public EssentialsRoomAddressPropertiesConfig Addresses { get; set; }
|
public EssentialsRoomAddressPropertiesConfig Addresses { get; set; }
|
||||||
|
|
||||||
[JsonProperty("description")]
|
[JsonProperty("description")]
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
|
|
||||||
[JsonProperty("emergency")]
|
[JsonProperty("emergency")]
|
||||||
public EssentialsRoomEmergencyConfig Emergency { get; set; }
|
public EssentialsRoomEmergencyConfig Emergency { get; set; }
|
||||||
|
|
||||||
[JsonProperty("help")]
|
[JsonProperty("help")]
|
||||||
public EssentialsHelpPropertiesConfig Help { get; set; }
|
public EssentialsHelpPropertiesConfig Help { get; set; }
|
||||||
|
|
||||||
[JsonProperty("helpMessage")]
|
[JsonProperty("helpMessage")]
|
||||||
public string HelpMessage { get; set; }
|
public string HelpMessage { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Read this value to get the help message. It checks for the old and new config format.
|
/// Read this value to get the help message. It checks for the old and new config format.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string HelpMessageForDisplay
|
public string HelpMessageForDisplay
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if(Help != null && !string.IsNullOrEmpty(Help.Message))
|
if(Help != null && !string.IsNullOrEmpty(Help.Message))
|
||||||
{
|
{
|
||||||
return Help.Message;
|
return Help.Message;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return HelpMessage;
|
return HelpMessage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonProperty("environment")]
|
[JsonProperty("environment")]
|
||||||
public EssentialsEnvironmentPropertiesConfig Environment { get; set; }
|
public EssentialsEnvironmentPropertiesConfig Environment { get; set; }
|
||||||
|
|
||||||
[JsonProperty("logo")]
|
[JsonProperty("logo")]
|
||||||
public EssentialsLogoPropertiesConfig LogoLight { get; set; }
|
public EssentialsLogoPropertiesConfig LogoLight { get; set; }
|
||||||
|
|
||||||
[JsonProperty("logoDark")]
|
[JsonProperty("logoDark")]
|
||||||
public EssentialsLogoPropertiesConfig LogoDark { get; set; }
|
public EssentialsLogoPropertiesConfig LogoDark { get; set; }
|
||||||
|
|
||||||
[JsonProperty("microphonePrivacy")]
|
[JsonProperty("microphonePrivacy")]
|
||||||
public EssentialsRoomMicrophonePrivacyConfig MicrophonePrivacy { get; set; }
|
public EssentialsRoomMicrophonePrivacyConfig MicrophonePrivacy { get; set; }
|
||||||
|
|
||||||
[JsonProperty("occupancy")]
|
[JsonProperty("occupancy")]
|
||||||
public EssentialsRoomOccSensorConfig Occupancy { get; set; }
|
public EssentialsRoomOccSensorConfig Occupancy { get; set; }
|
||||||
|
|
||||||
[JsonProperty("oneButtonMeeting")]
|
[JsonProperty("oneButtonMeeting")]
|
||||||
public EssentialsOneButtonMeetingPropertiesConfig OneButtonMeeting { get; set; }
|
public EssentialsOneButtonMeetingPropertiesConfig OneButtonMeeting { get; set; }
|
||||||
|
|
||||||
[JsonProperty("shutdownVacancySeconds")]
|
[JsonProperty("shutdownVacancySeconds")]
|
||||||
public int ShutdownVacancySeconds { get; set; }
|
public int ShutdownVacancySeconds { get; set; }
|
||||||
|
|
||||||
[JsonProperty("shutdownPromptSeconds")]
|
[JsonProperty("shutdownPromptSeconds")]
|
||||||
public int ShutdownPromptSeconds { get; set; }
|
public int ShutdownPromptSeconds { get; set; }
|
||||||
|
|
||||||
[JsonProperty("tech")]
|
[JsonProperty("tech")]
|
||||||
public EssentialsRoomTechConfig Tech { get; set; }
|
public EssentialsRoomTechConfig Tech { get; set; }
|
||||||
|
|
||||||
[JsonProperty("volumes")]
|
[JsonProperty("volumes")]
|
||||||
public EssentialsRoomVolumesConfig Volumes { get; set; }
|
public EssentialsRoomVolumesConfig Volumes { get; set; }
|
||||||
|
|
||||||
[JsonProperty("fusion")]
|
[JsonProperty("fusion")]
|
||||||
public EssentialsRoomFusionConfig Fusion { get; set; }
|
public EssentialsRoomFusionConfig Fusion { get; set; }
|
||||||
|
|
||||||
[JsonProperty("essentialsRoomUiBehaviorConfig", NullValueHandling=NullValueHandling.Ignore)]
|
[JsonProperty("essentialsRoomUiBehaviorConfig", NullValueHandling=NullValueHandling.Ignore)]
|
||||||
public EssentialsRoomUiBehaviorConfig UiBehavior { get; set; }
|
public EssentialsRoomUiBehaviorConfig UiBehavior { get; set; }
|
||||||
|
|
||||||
[JsonProperty("zeroVolumeWhenSwtichingVolumeDevices")]
|
[JsonProperty("zeroVolumeWhenSwtichingVolumeDevices")]
|
||||||
public bool ZeroVolumeWhenSwtichingVolumeDevices { get; set; }
|
public bool ZeroVolumeWhenSwtichingVolumeDevices { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates if this room represents a combination of other rooms
|
/// Indicates if this room represents a combination of other rooms
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("isRoomCombinationScenario")]
|
[JsonProperty("isRoomCombinationScenario")]
|
||||||
public bool IsRoomCombinationScenario { get; set; }
|
public bool IsRoomCombinationScenario { get; set; }
|
||||||
|
|
||||||
public EssentialsRoomPropertiesConfig()
|
public EssentialsRoomPropertiesConfig()
|
||||||
{
|
{
|
||||||
LogoLight = new EssentialsLogoPropertiesConfig();
|
LogoLight = new EssentialsLogoPropertiesConfig();
|
||||||
LogoDark = new EssentialsLogoPropertiesConfig();
|
LogoDark = new EssentialsLogoPropertiesConfig();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EssentialsRoomUiBehaviorConfig
|
public class EssentialsRoomUiBehaviorConfig
|
||||||
{
|
{
|
||||||
[JsonProperty("disableActivityButtonsWhileWarmingCooling")]
|
[JsonProperty("disableActivityButtonsWhileWarmingCooling")]
|
||||||
public bool DisableActivityButtonsWhileWarmingCooling { get; set; }
|
public bool DisableActivityButtonsWhileWarmingCooling { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EssentialsAvRoomPropertiesConfig : EssentialsRoomPropertiesConfig
|
public class EssentialsAvRoomPropertiesConfig : EssentialsRoomPropertiesConfig
|
||||||
{
|
{
|
||||||
[JsonProperty("defaultAudioKey")]
|
[JsonProperty("defaultAudioKey")]
|
||||||
public string DefaultAudioKey { get; set; }
|
public string DefaultAudioKey { get; set; }
|
||||||
[JsonProperty("sourceListKey")]
|
[JsonProperty("sourceListKey")]
|
||||||
public string SourceListKey { get; set; }
|
public string SourceListKey { get; set; }
|
||||||
[JsonProperty("destinationListKey")]
|
[JsonProperty("destinationListKey")]
|
||||||
public string DestinationListKey { get; set; }
|
public string DestinationListKey { get; set; }
|
||||||
[JsonProperty("defaultSourceItem")]
|
[JsonProperty("defaultSourceItem")]
|
||||||
public string DefaultSourceItem { get; set; }
|
public string DefaultSourceItem { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates if the room supports advanced sharing
|
/// Indicates if the room supports advanced sharing
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("supportsAdvancedSharing")]
|
[JsonProperty("supportsAdvancedSharing")]
|
||||||
public bool SupportsAdvancedSharing { get; set; }
|
public bool SupportsAdvancedSharing { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates if non-tech users can change the share mode
|
/// Indicates if non-tech users can change the share mode
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("userCanChangeShareMode")]
|
[JsonProperty("userCanChangeShareMode")]
|
||||||
public bool UserCanChangeShareMode { get; set; }
|
public bool UserCanChangeShareMode { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EssentialsConferenceRoomPropertiesConfig : EssentialsAvRoomPropertiesConfig
|
public class EssentialsConferenceRoomPropertiesConfig : EssentialsAvRoomPropertiesConfig
|
||||||
{
|
{
|
||||||
[JsonProperty("videoCodecKey")]
|
[JsonProperty("videoCodecKey")]
|
||||||
public string VideoCodecKey { get; set; }
|
public string VideoCodecKey { get; set; }
|
||||||
[JsonProperty("audioCodecKey")]
|
[JsonProperty("audioCodecKey")]
|
||||||
public string AudioCodecKey { get; set; }
|
public string AudioCodecKey { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EssentialsEnvironmentPropertiesConfig
|
public class EssentialsEnvironmentPropertiesConfig
|
||||||
{
|
{
|
||||||
public bool Enabled { get; set; }
|
public bool Enabled { get; set; }
|
||||||
|
|
||||||
[JsonProperty("deviceKeys")]
|
[JsonProperty("deviceKeys")]
|
||||||
public List<string> DeviceKeys { get; set; }
|
public List<string> DeviceKeys { get; set; }
|
||||||
|
|
||||||
public EssentialsEnvironmentPropertiesConfig()
|
public EssentialsEnvironmentPropertiesConfig()
|
||||||
{
|
{
|
||||||
DeviceKeys = new List<string>();
|
DeviceKeys = new List<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EssentialsRoomFusionConfig
|
public class EssentialsRoomFusionConfig
|
||||||
{
|
{
|
||||||
public uint IpIdInt
|
public uint IpIdInt
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return Convert.ToUInt32(IpId, 16);
|
return Convert.ToUInt32(IpId, 16);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
throw new FormatException(string.Format("ERROR:Unable to convert IP ID: {0} to hex. Error:\n{1}", IpId));
|
throw new FormatException(string.Format("ERROR:Unable to convert IP ID: {0} to hex. Error:\n{1}", IpId));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonProperty("ipId")]
|
[JsonProperty("ipId")]
|
||||||
public string IpId { get; set; }
|
public string IpId { get; set; }
|
||||||
|
|
||||||
[JsonProperty("joinMapKey")]
|
[JsonProperty("joinMapKey")]
|
||||||
public string JoinMapKey { get; set; }
|
public string JoinMapKey { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EssentialsRoomMicrophonePrivacyConfig
|
public class EssentialsRoomMicrophonePrivacyConfig
|
||||||
{
|
{
|
||||||
[JsonProperty("deviceKey")]
|
[JsonProperty("deviceKey")]
|
||||||
public string DeviceKey { get; set; }
|
public string DeviceKey { get; set; }
|
||||||
|
|
||||||
[JsonProperty("behaviour")]
|
[JsonProperty("behaviour")]
|
||||||
public string Behaviour { get; set; }
|
public string Behaviour { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Properties for the help text box
|
/// Properties for the help text box
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsHelpPropertiesConfig
|
public class EssentialsHelpPropertiesConfig
|
||||||
{
|
{
|
||||||
[JsonProperty("message")]
|
[JsonProperty("message")]
|
||||||
public string Message { get; set; }
|
public string Message { get; set; }
|
||||||
|
|
||||||
[JsonProperty("showCallButton")]
|
[JsonProperty("showCallButton")]
|
||||||
public bool ShowCallButton { get; set; }
|
public bool ShowCallButton { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defaults to "Call Help Desk"
|
/// Defaults to "Call Help Desk"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("callButtonText")]
|
[JsonProperty("callButtonText")]
|
||||||
public string CallButtonText { get; set; }
|
public string CallButtonText { get; set; }
|
||||||
|
|
||||||
public EssentialsHelpPropertiesConfig()
|
public EssentialsHelpPropertiesConfig()
|
||||||
{
|
{
|
||||||
CallButtonText = "Call Help Desk";
|
CallButtonText = "Call Help Desk";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsOneButtonMeetingPropertiesConfig
|
public class EssentialsOneButtonMeetingPropertiesConfig
|
||||||
{
|
{
|
||||||
[JsonProperty("enable")]
|
[JsonProperty("enable")]
|
||||||
public bool Enable { get; set; }
|
public bool Enable { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EssentialsRoomAddressPropertiesConfig
|
public class EssentialsRoomAddressPropertiesConfig
|
||||||
{
|
{
|
||||||
[JsonProperty("phoneNumber")]
|
[JsonProperty("phoneNumber")]
|
||||||
public string PhoneNumber { get; set; }
|
public string PhoneNumber { get; set; }
|
||||||
|
|
||||||
[JsonProperty("sipAddress")]
|
[JsonProperty("sipAddress")]
|
||||||
public string SipAddress { get; set; }
|
public string SipAddress { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Properties for the room's logo on panels
|
/// Properties for the room's logo on panels
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsLogoPropertiesConfig
|
public class EssentialsLogoPropertiesConfig
|
||||||
{
|
{
|
||||||
[JsonProperty("type")]
|
[JsonProperty("type")]
|
||||||
public string Type { get; set; }
|
public string Type { get; set; }
|
||||||
|
|
||||||
[JsonProperty("url")]
|
[JsonProperty("url")]
|
||||||
public string Url { get; set; }
|
public string Url { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets either the custom URL, a local-to-processor URL, or null if it's a default logo
|
/// Gets either the custom URL, a local-to-processor URL, or null if it's a default logo
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string GetLogoUrlLight()
|
public string GetLogoUrlLight()
|
||||||
{
|
{
|
||||||
if (Type == "url")
|
if (Type == "url")
|
||||||
return Url;
|
return Url;
|
||||||
if (Type == "system")
|
if (Type == "system")
|
||||||
return string.Format("http://{0}:8080/logo.png",
|
return string.Format("http://{0}:8080/logo.png",
|
||||||
CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0));
|
CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetLogoUrlDark()
|
public string GetLogoUrlDark()
|
||||||
{
|
{
|
||||||
if (Type == "url")
|
if (Type == "url")
|
||||||
return Url;
|
return Url;
|
||||||
if (Type == "system")
|
if (Type == "system")
|
||||||
return string.Format("http://{0}:8080/logo-dark.png",
|
return string.Format("http://{0}:8080/logo-dark.png",
|
||||||
CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0));
|
CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents occupancy sensor(s) setup for a room
|
/// Represents occupancy sensor(s) setup for a room
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsRoomOccSensorConfig
|
public class EssentialsRoomOccSensorConfig
|
||||||
{
|
{
|
||||||
[JsonProperty("deviceKey")]
|
[JsonProperty("deviceKey")]
|
||||||
public string DeviceKey { get; set; }
|
public string DeviceKey { get; set; }
|
||||||
|
|
||||||
[JsonProperty("timeoutMinutes")]
|
[JsonProperty("timeoutMinutes")]
|
||||||
public int TimeoutMinutes { get; set; }
|
public int TimeoutMinutes { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EssentialsRoomTechConfig
|
public class EssentialsRoomTechConfig
|
||||||
{
|
{
|
||||||
[JsonProperty("password")]
|
[JsonProperty("password")]
|
||||||
public string Password { get; set; }
|
public string Password { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -226,7 +226,182 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Initialize()
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//if (DefaultAudioDevice is IBasicVolumeControls)
|
||||||
|
// DefaultVolumeControls = DefaultAudioDevice as IBasicVolumeControls;
|
||||||
|
//else if (DefaultAudioDevice is IHasVolumeDevice)
|
||||||
|
// DefaultVolumeControls = (DefaultAudioDevice as IHasVolumeDevice).VolumeDevice;
|
||||||
|
//CurrentVolumeControls = DefaultVolumeControls;
|
||||||
|
|
||||||
|
|
||||||
|
//// Combines call feedback from both codecs if available
|
||||||
|
//InCallFeedback = new BoolFeedback(() =>
|
||||||
|
//{
|
||||||
|
// bool inAudioCall = false;
|
||||||
|
// bool inVideoCall = false;
|
||||||
|
|
||||||
|
// if (AudioCodec != null)
|
||||||
|
// inAudioCall = AudioCodec.IsInCall;
|
||||||
|
|
||||||
|
// if (VideoCodec != null)
|
||||||
|
// inVideoCall = VideoCodec.IsInCall;
|
||||||
|
|
||||||
|
// if (inAudioCall || inVideoCall)
|
||||||
|
// return true;
|
||||||
|
// else
|
||||||
|
// return false;
|
||||||
|
//});
|
||||||
|
|
||||||
|
//SetupDisplays();
|
||||||
|
|
||||||
|
//// Get Microphone Privacy object, if any MUST HAPPEN AFTER setting InCallFeedback
|
||||||
|
//this.MicrophonePrivacy = EssentialsRoomConfigHelper.GetMicrophonePrivacy(PropertiesConfig, this);
|
||||||
|
|
||||||
|
//Debug.Console(2, this, "Microphone Privacy Config evaluated.");
|
||||||
|
|
||||||
|
//// Get emergency object, if any
|
||||||
|
//this.Emergency = EssentialsRoomConfigHelper.GetEmergency(PropertiesConfig, this);
|
||||||
|
|
||||||
|
//Debug.Console(2, this, "Emergency Config evaluated.");
|
||||||
|
|
||||||
|
|
||||||
|
//VideoCodec.CallStatusChange += (o, a) => this.InCallFeedback.FireUpdate();
|
||||||
|
//VideoCodec.IsReadyChange += (o, a) => { this.SetCodecExternalSources(); SetCodecBranding(); };
|
||||||
|
|
||||||
|
//if (AudioCodec != null)
|
||||||
|
// AudioCodec.CallStatusChange += (o, a) => this.InCallFeedback.FireUpdate();
|
||||||
|
|
||||||
|
//IsSharingFeedback = new BoolFeedback(() => VideoCodec.SharingContentIsOnFeedback.BoolValue);
|
||||||
|
//VideoCodec.SharingContentIsOnFeedback.OutputChange += (o, a) => this.IsSharingFeedback.FireUpdate();
|
||||||
|
|
||||||
|
//// link privacy to VC (for now?)
|
||||||
|
//PrivacyModeIsOnFeedback = new BoolFeedback(() => VideoCodec.PrivacyModeIsOnFeedback.BoolValue);
|
||||||
|
//VideoCodec.PrivacyModeIsOnFeedback.OutputChange += (o, a) => this.PrivacyModeIsOnFeedback.FireUpdate();
|
||||||
|
|
||||||
|
//CallTypeFeedback = new IntFeedback(() => 0);
|
||||||
|
|
||||||
|
SetSourceListKey();
|
||||||
|
|
||||||
|
//EnablePowerOnToLastSource = true;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Console(0, this, "Error Initializing Room: {0}", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetupDisplays()
|
||||||
|
{
|
||||||
|
//DefaultDisplay = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultDisplayKey) as IRoutingSinkWithSwitching;
|
||||||
|
|
||||||
|
var destinationList = ConfigReader.ConfigObject.DestinationLists[PropertiesConfig.DestinationListKey];
|
||||||
|
|
||||||
|
Displays.Clear();
|
||||||
|
|
||||||
|
foreach (var destination in destinationList)
|
||||||
|
{
|
||||||
|
var dest = destination.Value.SinkDevice as IRoutingSinkWithSwitching;
|
||||||
|
|
||||||
|
if (dest != null)
|
||||||
|
{
|
||||||
|
Displays.Add(dest);
|
||||||
|
}
|
||||||
|
|
||||||
|
var display = dest as DisplayBase;
|
||||||
|
if (display != null)
|
||||||
|
{
|
||||||
|
// Link power, warming, cooling to display
|
||||||
|
var dispTwoWay = display as IHasPowerControlWithFeedback;
|
||||||
|
if (dispTwoWay != null)
|
||||||
|
{
|
||||||
|
dispTwoWay.PowerIsOnFeedback.OutputChange -= PowerIsOnFeedback_OutputChange;
|
||||||
|
dispTwoWay.PowerIsOnFeedback.OutputChange += PowerIsOnFeedback_OutputChange;
|
||||||
|
|
||||||
|
if (dispTwoWay.PowerIsOnFeedback.BoolValue)
|
||||||
|
{
|
||||||
|
SetDefaultLevels();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
display.IsWarmingUpFeedback.OutputChange -= IsWarmingUpFeedback_OutputChange;
|
||||||
|
display.IsWarmingUpFeedback.OutputChange += IsWarmingUpFeedback_OutputChange;
|
||||||
|
|
||||||
|
display.IsCoolingDownFeedback.OutputChange -= IsCoolingDownFeedback_OutputChange;
|
||||||
|
display.IsCoolingDownFeedback.OutputChange += IsCoolingDownFeedback_OutputChange;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void IsCoolingDownFeedback_OutputChange(object sender, FeedbackEventArgs e)
|
||||||
|
{
|
||||||
|
IsCoolingDownFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
void IsWarmingUpFeedback_OutputChange(object sender, FeedbackEventArgs e)
|
||||||
|
{
|
||||||
|
IsWarmingUpFeedback.FireUpdate();
|
||||||
|
if (!IsWarmingUpFeedback.BoolValue)
|
||||||
|
(CurrentVolumeControls as IBasicVolumeWithFeedback).SetVolume(DefaultVolume);
|
||||||
|
}
|
||||||
|
|
||||||
|
void PowerIsOnFeedback_OutputChange(object sender, FeedbackEventArgs e)
|
||||||
|
{
|
||||||
|
var dispTwoWay = sender as IHasPowerControlWithFeedback;
|
||||||
|
|
||||||
|
if (dispTwoWay != null && dispTwoWay.PowerIsOnFeedback.BoolValue != OnFeedback.BoolValue)
|
||||||
|
{
|
||||||
|
//if (!dispTwoWay.PowerIsOnFeedback.BoolValue)
|
||||||
|
// CurrentSourceInfo = null;
|
||||||
|
OnFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void SetSourceListKey()
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(PropertiesConfig.SourceListKey))
|
||||||
|
{
|
||||||
|
SetSourceListKey(PropertiesConfig.SourceListKey);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SetSourceListKey(Key);
|
||||||
|
}
|
||||||
|
|
||||||
|
SetUpVideoCodec();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void CustomSetConfig(DeviceConfig config)
|
||||||
|
{
|
||||||
|
var newPropertiesConfig = JsonConvert.DeserializeObject<EssentialsHuddleVtc1PropertiesConfig>(config.Properties.ToString());
|
||||||
|
|
||||||
|
if (newPropertiesConfig != null)
|
||||||
|
PropertiesConfig = newPropertiesConfig;
|
||||||
|
|
||||||
|
ConfigWriter.UpdateRoomConfig(config);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Deactivate()
|
||||||
|
{
|
||||||
|
// Stop listining to this event when room deactivated
|
||||||
|
VideoCodec.IsReadyChange -= VideoCodec_IsReadyChange;
|
||||||
|
|
||||||
|
// Clear occupancy
|
||||||
|
RoomOccupancy = null;
|
||||||
|
|
||||||
|
Debug.Console(0, this, "Room '{0}' Deactivated", Name);
|
||||||
|
|
||||||
|
return base.Deactivate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool CustomActivate()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -267,127 +442,95 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
Debug.Console(2, this, "Emergency Config evaluated.");
|
Debug.Console(2, this, "Emergency Config evaluated.");
|
||||||
|
|
||||||
|
|
||||||
VideoCodec.CallStatusChange += (o, a) => this.InCallFeedback.FireUpdate();
|
|
||||||
VideoCodec.IsReadyChange += (o, a) => { this.SetCodecExternalSources(); SetCodecBranding(); };
|
|
||||||
|
|
||||||
if (AudioCodec != null)
|
if (AudioCodec != null)
|
||||||
AudioCodec.CallStatusChange += (o, a) => this.InCallFeedback.FireUpdate();
|
{
|
||||||
|
AudioCodec.CallStatusChange -= AudioCodec_CallStatusChange;
|
||||||
|
AudioCodec.CallStatusChange += AudioCodec_CallStatusChange;
|
||||||
|
}
|
||||||
|
|
||||||
|
VideoCodec.CallStatusChange -= VideoCodec_CallStatusChange;
|
||||||
|
VideoCodec.CallStatusChange += VideoCodec_CallStatusChange;
|
||||||
|
|
||||||
|
VideoCodec.IsReadyChange -= VideoCodec_IsReadyChange;
|
||||||
|
VideoCodec.IsReadyChange += VideoCodec_IsReadyChange;
|
||||||
|
|
||||||
|
VideoCodec.SharingContentIsOnFeedback.OutputChange -= SharingContentIsOnFeedback_OutputChange;
|
||||||
|
VideoCodec.SharingContentIsOnFeedback.OutputChange += SharingContentIsOnFeedback_OutputChange;
|
||||||
|
|
||||||
|
|
||||||
IsSharingFeedback = new BoolFeedback(() => VideoCodec.SharingContentIsOnFeedback.BoolValue);
|
IsSharingFeedback = new BoolFeedback(() => VideoCodec.SharingContentIsOnFeedback.BoolValue);
|
||||||
VideoCodec.SharingContentIsOnFeedback.OutputChange += (o, a) => this.IsSharingFeedback.FireUpdate();
|
|
||||||
|
|
||||||
// link privacy to VC (for now?)
|
// link privacy to VC (for now?)
|
||||||
PrivacyModeIsOnFeedback = new BoolFeedback(() => VideoCodec.PrivacyModeIsOnFeedback.BoolValue);
|
PrivacyModeIsOnFeedback = new BoolFeedback(() => VideoCodec.PrivacyModeIsOnFeedback.BoolValue);
|
||||||
VideoCodec.PrivacyModeIsOnFeedback.OutputChange += (o, a) => this.PrivacyModeIsOnFeedback.FireUpdate();
|
|
||||||
|
VideoCodec.PrivacyModeIsOnFeedback.OutputChange -= PrivacyModeIsOnFeedback_OutputChange;
|
||||||
|
VideoCodec.PrivacyModeIsOnFeedback.OutputChange += PrivacyModeIsOnFeedback_OutputChange;
|
||||||
|
|
||||||
CallTypeFeedback = new IntFeedback(() => 0);
|
CallTypeFeedback = new IntFeedback(() => 0);
|
||||||
|
|
||||||
SetSourceListKey();
|
SetSourceListKey();
|
||||||
|
|
||||||
EnablePowerOnToLastSource = true;
|
EnablePowerOnToLastSource = true;
|
||||||
|
|
||||||
|
|
||||||
|
// Add Occupancy object from config
|
||||||
|
if (PropertiesConfig.Occupancy != null)
|
||||||
|
{
|
||||||
|
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Setting Occupancy Provider for room");
|
||||||
|
this.SetRoomOccupancy(DeviceManager.GetDeviceForKey(PropertiesConfig.Occupancy.DeviceKey) as
|
||||||
|
IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.LogoUrlLightBkgnd = PropertiesConfig.LogoLight.GetLogoUrlLight();
|
||||||
|
this.LogoUrlDarkBkgnd = PropertiesConfig.LogoDark.GetLogoUrlDark();
|
||||||
|
|
||||||
|
this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem;
|
||||||
|
this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(0, this, "Error Initializing Room: {0}", e);
|
Debug.Console(0, this, "Error Activiating Room: {0}", e);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SetupDisplays()
|
|
||||||
{
|
|
||||||
//DefaultDisplay = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultDisplayKey) as IRoutingSinkWithSwitching;
|
|
||||||
|
|
||||||
var destinationList = ConfigReader.ConfigObject.DestinationLists[PropertiesConfig.DestinationListKey];
|
|
||||||
|
|
||||||
foreach (var destination in destinationList)
|
|
||||||
{
|
|
||||||
var dest = destination.Value.SinkDevice as IRoutingSinkWithSwitching;
|
|
||||||
|
|
||||||
if (dest != null)
|
|
||||||
{
|
|
||||||
Displays.Add(dest);
|
|
||||||
}
|
|
||||||
|
|
||||||
var display = dest as DisplayBase;
|
|
||||||
if (display != null)
|
|
||||||
{
|
|
||||||
// Link power, warming, cooling to display
|
|
||||||
var dispTwoWay = display as IHasPowerControlWithFeedback;
|
|
||||||
if (dispTwoWay != null)
|
|
||||||
{
|
|
||||||
dispTwoWay.PowerIsOnFeedback.OutputChange += (o, a) =>
|
|
||||||
{
|
|
||||||
if (dispTwoWay.PowerIsOnFeedback.BoolValue != OnFeedback.BoolValue)
|
|
||||||
{
|
|
||||||
//if (!dispTwoWay.PowerIsOnFeedback.BoolValue)
|
|
||||||
// CurrentSourceInfo = null;
|
|
||||||
OnFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
if (dispTwoWay.PowerIsOnFeedback.BoolValue)
|
|
||||||
{
|
|
||||||
SetDefaultLevels();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
display.IsWarmingUpFeedback.OutputChange += (o, a) =>
|
|
||||||
{
|
|
||||||
IsWarmingUpFeedback.FireUpdate();
|
|
||||||
if (!IsWarmingUpFeedback.BoolValue)
|
|
||||||
(CurrentVolumeControls as IBasicVolumeWithFeedback).SetVolume(DefaultVolume);
|
|
||||||
};
|
|
||||||
display.IsCoolingDownFeedback.OutputChange += (o, a) =>
|
|
||||||
{
|
|
||||||
IsCoolingDownFeedback.FireUpdate();
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SetSourceListKey()
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(PropertiesConfig.SourceListKey))
|
|
||||||
{
|
|
||||||
SetSourceListKey(PropertiesConfig.SourceListKey);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SetSourceListKey(Key);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SetCodecExternalSources();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void CustomSetConfig(DeviceConfig config)
|
|
||||||
{
|
|
||||||
var newPropertiesConfig = JsonConvert.DeserializeObject<EssentialsHuddleVtc1PropertiesConfig>(config.Properties.ToString());
|
|
||||||
|
|
||||||
if (newPropertiesConfig != null)
|
|
||||||
PropertiesConfig = newPropertiesConfig;
|
|
||||||
|
|
||||||
ConfigWriter.UpdateRoomConfig(config);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool CustomActivate()
|
|
||||||
{
|
|
||||||
// Add Occupancy object from config
|
|
||||||
if (PropertiesConfig.Occupancy != null)
|
|
||||||
{
|
|
||||||
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Setting Occupancy Provider for room");
|
|
||||||
this.SetRoomOccupancy(DeviceManager.GetDeviceForKey(PropertiesConfig.Occupancy.DeviceKey) as
|
|
||||||
IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.LogoUrlLightBkgnd = PropertiesConfig.LogoLight.GetLogoUrlLight();
|
|
||||||
this.LogoUrlDarkBkgnd = PropertiesConfig.LogoDark.GetLogoUrlDark();
|
|
||||||
|
|
||||||
this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem;
|
|
||||||
this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100);
|
|
||||||
|
|
||||||
|
Debug.Console(0, this, "Room '{0}' Activated", Name);
|
||||||
return base.CustomActivate();
|
return base.CustomActivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AudioCodec_CallStatusChange(object sender, CodecCallStatusItemChangeEventArgs e)
|
||||||
|
{
|
||||||
|
InCallFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
void PrivacyModeIsOnFeedback_OutputChange(object sender, FeedbackEventArgs e)
|
||||||
|
{
|
||||||
|
PrivacyModeIsOnFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
void VideoCodec_IsReadyChange(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
SetUpVideoCodec();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetUpVideoCodec()
|
||||||
|
{
|
||||||
|
SetCodecExternalSources();
|
||||||
|
SetCodecBranding();
|
||||||
|
}
|
||||||
|
|
||||||
|
void VideoCodec_CallStatusChange(object sender, CodecCallStatusItemChangeEventArgs e)
|
||||||
|
{
|
||||||
|
InCallFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SharingContentIsOnFeedback_OutputChange(object sender, FeedbackEventArgs e)
|
||||||
|
{
|
||||||
|
IsSharingFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -780,6 +923,8 @@ namespace PepperDash.Essentials
|
|||||||
videoCodecWithExternalSwitching.SetExternalSourceState(kvp.Key, PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.eExternalSourceMode.Ready);
|
videoCodecWithExternalSwitching.SetExternalSourceState(kvp.Key, PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.eExternalSourceMode.Ready);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Debug.Console(1, this, "Successfully set up codec external sources for room: {0}", Name);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,8 @@ using PepperDash.Essentials.Room.Config;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
{
|
{
|
||||||
public interface IEssentialsHuddleSpaceRoom : IEssentialsRoom, IHasCurrentSourceInfoChange, IRunRouteAction, IRunDefaultPresentRoute, IHasDefaultDisplay, IHasCurrentVolumeControls
|
public interface IEssentialsHuddleSpaceRoom : IEssentialsRoom, IHasCurrentSourceInfoChange, IRunRouteAction, IRunDefaultPresentRoute, IHasDefaultDisplay, IHasCurrentVolumeControls, IRoomOccupancy,
|
||||||
|
IEmergency, IMicrophonePrivacy
|
||||||
{
|
{
|
||||||
bool ExcludeFromGlobalFunctions { get; }
|
bool ExcludeFromGlobalFunctions { get; }
|
||||||
|
|
||||||
@@ -8,7 +8,8 @@ using PepperDash.Essentials.Devices.Common.AudioCodec;
|
|||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
{
|
{
|
||||||
public interface IEssentialsHuddleVtc1Room : IEssentialsRoom, IHasCurrentSourceInfoChange,
|
public interface IEssentialsHuddleVtc1Room : IEssentialsRoom, IHasCurrentSourceInfoChange,
|
||||||
IPrivacy, IHasCurrentVolumeControls, IRunRouteAction, IRunDefaultCallRoute, IHasVideoCodec, IHasAudioCodec, IHasDefaultDisplay, IHasInCallFeedback
|
IPrivacy, IHasCurrentVolumeControls, IRunRouteAction, IRunDefaultCallRoute, IHasVideoCodec, IHasAudioCodec, IHasDefaultDisplay, IHasInCallFeedback,
|
||||||
|
IRoomOccupancy, IEmergency, IMicrophonePrivacy
|
||||||
{
|
{
|
||||||
EssentialsHuddleVtc1PropertiesConfig PropertiesConfig { get; }
|
EssentialsHuddleVtc1PropertiesConfig PropertiesConfig { get; }
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user