diff --git a/.github/workflows/Build Essentials.yml b/.github/workflows/Build Essentials.yml deleted file mode 100644 index 0194884c..00000000 --- a/.github/workflows/Build Essentials.yml +++ /dev/null @@ -1,307 +0,0 @@ -name: Build Essentials 2.0.0 - -on: - push: - branches: - - feature-2.0.0/* - pull_request: - types: - - closed - branches: - - development-2.0.0 - -env: - # solution path doesn't need slashes unless there it is multiple folders deep - # solution name does not include extension. .sln is assumed - SOLUTION_PATH: PepperDashEssentials - SOLUTION_FILE: PepperDashEssentials - # Do not edit this, we're just creating it here - VERSION: 0.0.0-buildtype-buildnumber - # Defaults to debug for build type - BUILD_TYPE: Debug - # Defaults to main as the release branch. Change as necessary - RELEASE_BRANCH: main -jobs: - Build_Project: - runs-on: windows-2019 - steps: - # First we checkout the source repo - - name: Checkout repo - uses: actions/checkout@v2 - with: - fetch-depth: 0 - # Fetch all tags - - name: Fetch tags - run: git fetch --tags - # Generate the appropriate version number - - name: Set Version Number - shell: powershell - run: | - $version = ./.github/scripts/GenerateVersionNumber-2.0.0.ps1 - echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - # Use the version number to set the version of the assemblies - - name: Update AssemblyInfo.cs - shell: powershell - run: | - ./.github/scripts/UpdateAssemblyVersion.ps1 ${{ env.VERSION }} - - name: restore Nuget Packages - run: nuget install .\packages.config -OutputDirectory .\packages -ExcludeVersion - # Login to Docker - - name: Login to Docker - uses: azure/docker-login@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_TOKEN }} - # Build the solutions in the docker image - - name: Build Solution - shell: powershell - run: | - Invoke-Expression "docker run --rm --mount type=bind,source=""$($Env:GITHUB_WORKSPACE)"",target=""c:/project"" pepperdash/sspbuilder c:\cihelpers\vsidebuild.exe -Solution ""c:\project\$($Env:SOLUTION_FILE).sln"" -BuildSolutionConfiguration $($ENV:BUILD_TYPE)" - # Zip up the output files as needed - - name: Zip Build Output - shell: powershell - run: ./.github/scripts/ZipBuildOutput.ps1 - # Write the version to a file to be consumed by the push jobs - - name: Write Version - run: Write-Output "$($Env:VERSION)" | Out-File -FilePath "$($Env:GITHUB_HOME)\output\version.txt" - # Upload the build output as an artifact - - name: Upload Build Output - uses: actions/upload-artifact@v1 - with: - name: Build - path: ./${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip - # Upload the Version file as an artifact - - name: Upload version.txt - uses: actions/upload-artifact@v1 - with: - name: Version - path: ${{env.GITHUB_HOME}}\output\version.txt - # Create the release on the source repo - - name: Create tag for non-rc builds - if: contains(env.VERSION, 'alpha') || contains(env.VERSION, 'beta') - run: | - git tag $($Env:VERSION) - git push --tags origin - - name: Create Release - id: create_release - # using contributor's version to allow for pointing at the right commit - if: contains(env.VERSION,'-rc-') || contains(env.VERSION,'-hotfix-') - uses: fleskesvor/create-release@feature/support-target-commitish - with: - tag_name: ${{ env.VERSION }} - release_name: ${{ env.VERSION }} - prerelease: ${{contains('debug', env.BUILD_TYPE)}} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # Upload the build package to the release - - name: Upload Release Package - if: contains(env.VERSION,'-rc-') || contains(env.VERSION,'-hotfix-') - id: upload_release - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip - asset_name: ${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip - asset_content_type: application/zip - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - Push_Nuget_Package: - needs: Build_Project - runs-on: windows-latest - steps: - - name: Download Build Version Info - uses: actions/download-artifact@v1 - with: - name: Version - - name: Set Version Number - shell: powershell - run: | - Get-ChildItem "./Version" - $version = Get-Content -Path ./Version/version.txt - Write-Host "Version: $version" - echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - Remove-Item -Path ./Version/version.txt - Remove-Item -Path ./Version - - name: Download Build output - uses: actions/download-artifact@v1 - with: - name: Build - path: ./ - - name: Unzip Build file - run: | - Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\ - Remove-Item -Path .\*.zip - - name: Copy Files to root & delete output directory - run: | - Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz") - Get-ChildItem -Path .\output\* | Copy-Item -Destination .\ - Remove-Item -Path .\output -Recurse - - name: Add nuget.exe - uses: nuget/setup-nuget@v1 - - name: Add Github Packages source - run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }} - - name: Add nuget.org API Key - run: nuget setApiKey ${{ secrets.NUGET_API_KEY }} - - name: Create nuget package - run: nuget pack "./PepperDash_Essentials_Core.nuspec" -version ${{ env.VERSION }} - - name: Publish nuget package to Github registry - run: nuget push **/*.nupkg -source github - - name: Publish nuget package to nuget.org - run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json - # This step always runs and pushes the build to the internal build rep - # Internal_Push_Output: - # needs: Build_Project - # runs-on: windows-latest - # steps: - # - name: check Github ref - # run: ${{toJson(github.ref)}} - # # Checkout the repo - # - name: Checkout Builds Repo - # uses: actions/checkout@v2 - # with: - # token: ${{ secrets.BUILDS_TOKEN }} - # repository: PepperDash-Engineering/essentials-builds - # ref: ${{ Env.GITHUB_REF }} - # # Download the version artifact from the build job - # - name: Download Build Version Info - # uses: actions/download-artifact@v1 - # with: - # name: Version - # - name: Check Directory - # run: Get-ChildItem "./" - # # Set the version number environment variable from the file we just downloaded - # - name: Set Version Number - # shell: powershell - # run: | - # Get-ChildItem "./Version" - # $version = Get-Content -Path ./Version/version.txt - # Write-Host "Version: $version" - # echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - # Remove-Item -Path ./Version/version.txt - # Remove-Item -Path ./Version - # # Checkout/Create the branch - # - name: Create new branch - # run: git checkout -b $($Env:GITHUB_REF -replace "refs/heads/") - # # Download the build output into the repo - # - name: Download Build output - # uses: actions/download-artifact@v1 - # with: - # name: Build - # path: ./ - # - name: Check directory - # run: Get-ChildItem ./ - # # Unzip the build package file - # - name: Unzip Build file - # run: | - # Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\ - # Remove-Item -Path .\*.zip - # - name: Check directory again - # run: Get-ChildItem ./ - # # Copy Contents of output folder to root directory - # - name: Copy Files to root & delete output directory - # run: | - # Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz") - # Get-ChildItem -Path .\output\* | Copy-Item -Destination .\ - # Remove-Item -Path .\output -Recurse - # # Commits the build output to the branch and tags it with the version - # - name: Commit build output and tag the commit - # shell: powershell - # run: | - # git config user.email "actions@pepperdash.com" - # git config user.name "GitHub Actions" - # git add . - # $commit = "Build $($Env:GITHUB_RUN_NUMBER) from commit: https://github.com/$($Env:GITHUB_REPOSITORY)/commit/$($Env:GITHUB_SHA)" - # Write-Host "Commit: $commit" - # git commit -m $commit - # git tag $($Env:VERSION) - # # Push the commit - # - name: Push to Builds Repo - # shell: powershell - # run: | - # $branch = $($Env:GITHUB_REF) -replace "refs/heads/" - # Write-Host "Branch: $branch" - # git push -u origin $($branch) --force - # # Push the tags - # - name: Push tags - # run: git push --tags origin - # - name: Check Directory - # run: Get-ChildItem ./ - # # This step only runs if the branch is main or release/ runs and pushes the build to the public build repo - # Public_Push_Output: - # needs: Build_Project - # runs-on: windows-latest - # if: contains(github.ref, 'main') || contains(github.ref, '/release/') - # steps: - # # Checkout the repo - # - name: check Github ref - # run: ${{toJson(github.ref)}} - # - name: Checkout Builds Repo - # uses: actions/checkout@v2 - # with: - # token: ${{ secrets.BUILDS_TOKEN }} - # repository: PepperDash/Essentials-Builds - # ref: ${{ Env.GITHUB_REF }} - # # Download the version artifact from the build job - # - name: Download Build Version Info - # uses: actions/download-artifact@v1 - # with: - # name: Version - # - name: Check Directory - # run: Get-ChildItem "./" - # # Set the version number environment variable from the file we just downloaded - # - name: Set Version Number - # shell: powershell - # run: | - # Get-ChildItem "./Version" - # $version = Get-Content -Path ./Version/version.txt - # Write-Host "Version: $version" - # echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - # Remove-Item -Path ./Version/version.txt - # Remove-Item -Path ./Version - # # Checkout/Create the branch - # - name: Create new branch - # run: git checkout -b $($Env:GITHUB_REF -replace "refs/heads/") - # # Download the build output into the repo - # - name: Download Build output - # uses: actions/download-artifact@v1 - # with: - # name: Build - # path: ./ - # - name: Check directory - # run: Get-ChildItem ./ - # # Unzip the build package file - # - name: Unzip Build file - # run: | - # Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\ - # Remove-Item -Path .\*.zip - # - name: Check directory again - # run: Get-ChildItem ./ - # # Copy Contents of output folder to root directory - # - name: Copy Files to root & delete output directory - # run: | - # Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz") - # Get-ChildItem -Path .\output\* | Copy-Item -Destination .\ - # Remove-Item -Path .\output -Recurse - # # Commits the build output to the branch and tags it with the version - # - name: Commit build output and tag the commit - # shell: powershell - # run: | - # git config user.email "actions@pepperdash.com" - # git config user.name "GitHub Actions" - # git add . - # $commit = "Build $($Env:GITHUB_RUN_NUMBER) from commit: https://github.com/$($Env:GITHUB_REPOSITORY)/commit/$($Env:GITHUB_SHA)" - # Write-Host "Commit: $commit" - # git commit -m $commit - # git tag $($Env:VERSION) - # # Push the commit - # - name: Push to Builds Repo - # shell: powershell - # run: | - # $branch = $($Env:GITHUB_REF) -replace "refs/heads/" - # Write-Host "Branch: $branch" - # git push -u origin $($branch) --force - # # Push the tags - # - name: Push tags - # run: git push --tags origin - # - name: Check Directory - # run: Get-ChildItem ./ diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index e654fa68..23b077a4 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -3,17 +3,16 @@ name: Branch Build Using Docker on: push: branches: - - feature/* - - hotfix/* - - bugfix/* - - release/* - - development + - feature-2.0.0/* + - hotfix-2.0.0/* + - release-2.0.0/* + - development-2.0.0 env: - # solution path doesn't need slashes unless it is multiple folders deep + # solution path doesn't need slashes unless there it is multiple folders deep # solution name does not include extension. .sln is assumed - SOLUTION_PATH: PepperDashEssentials - SOLUTION_FILE: PepperDashEssentials + SOLUTION_PATH: . + SOLUTION_FILE: PepperDash.Essentials # Do not edit this, we're just creating it here VERSION: 0.0.0-buildtype-buildnumber # Defaults to debug for build type @@ -21,121 +20,75 @@ env: # 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 + Build_Project_4-Series: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 - name: Set Version Number + id: setVersion 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 }} + $latestVersion = [version]"2.0.0" + + $newVersion = [version]$latestVersion + $phase = "" + $newVersionString = "" + + switch -regex ($Env:GITHUB_REF) { + '^refs\/pull\/*.' { + $phase = 'beta'; + $newVersionString = "{0}-{1}-{2}" -f $newVersion, $phase, $Env:GITHUB_RUN_NUMBER + } + '^refs\/heads\/hotfix-2.0.0\/*.' { + $phase = 'hotfix' + $newVersionString = "{0}-{1}-{2}" -f $newVersion, $phase, $Env:GITHUB_RUN_NUMBER + } + '^refs\/heads\/release-2.0.0\/*.' { + $splitRef = $Env:GITHUB_REF -split "/" + $version = [version]($splitRef[-1] -replace "v", "") + $phase = 'rc' + $newVersionString = "{0}-{1}-{2}" -f $version, $phase, $Env:GITHUB_RUN_NUMBER + } + '^refs\/heads\/feature-2.0.0\/*.' { + $phase = 'alpha' + $newVersionString = "{0}-{1}-{2}" -f $newVersion, $phase, $Env:GITHUB_RUN_NUMBER + } + 'development-2.0.0' { + $phase = 'beta' + $newVersionString = "{0}-{1}-{2}" -f $newVersion, $phase, $Env:GITHUB_RUN_NUMBER + } + } + echo "version=$newVersionString" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append + - name: Setup MS Build + uses: microsoft/setup-msbuild@v1.1 - 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 }} + run: nuget restore .\$($Env:SOLUTION_FILE).sln # Build the solutions in the docker image - - name: Build Solution - shell: powershell + - name: Build Solution + run: msbuild .\$($Env:SOLUTION_FILE).sln /p:Platform="Any CPU" /p:Configuration="Debug" /p:Version="${{ steps.setVersion.outputs.version }}" -m + - name: Create tag for non-rc builds + if: contains(steps.setVersion.outputs.version, 'alpha') 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 + git tag ${{ steps.setVersion.outputs.version }} + git push --tags origin + # Create the release on the source repo - 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 +# if: contains(steps.setVersion.outputs.version,'-rc-') || +# contains(steps.setVersion.outputs.version,'-hotfix-') || +# contains(steps.setVersion.outputs.version, '-beta-') + uses: ncipollo/release-action@v1 with: - tag_name: ${{ env.VERSION }} - release_name: ${{ env.VERSION }} + artifacts: 'output\*.*(cpz|cplz)' + generateReleaseNotes: true 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 + tag: ${{ steps.setVersion.outputs.version }} + - name: Setup Nuget + run: | + nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username pepperdash -password ${{ secrets.GITHUB_TOKEN }} + nuget setApiKey ${{ secrets.GITHUB_TOKEN }} -Source github + nuget setApiKey ${{ secrets.NUGET_API_KEY }} -Source https://api.nuget.org/v3/index.json + - name: Publish to Nuget + run: nuget push .\output\*.nupkg -Source https://api.nuget.org/v3/index.json + - name: Publish to Github Nuget + run: nuget push .\output\*.nupkg -Source github \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index abcc8419..608fc7b5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,9 +3,9 @@ name: main Build using Docker on: release: types: - - created + - published branches: - - main + - main-2.0.0 env: # solution path doesn't need slashes unless there it is multiple folders deep # solution name does not include extension. .sln is assumed @@ -23,103 +23,33 @@ jobs: steps: # First we checkout the source repo - name: Checkout repo - uses: actions/checkout@v2 - with: - fetch-depth: 0 + uses: actions/checkout@v3 # Generate the appropriate version number - name: Set Version Number shell: powershell + id: setVersion 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 }} + run: echo "VERSION=$($Env:TAG_NAME)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append + - name: Setup MS Build + uses: microsoft/setup-msbuild@v1.1 - name: restore Nuget Packages - run: nuget install .\packages.config -OutputDirectory .\packages -ExcludeVersion - # Login to Docker - - name: Login to Docker - uses: azure/docker-login@v1 + run: nuget restore .\$($Env:SOLUTION_FILE).sln + - name: Build Solution + run: msbuild .\$($Env:SOLUTION_FILE).sln /p:Platform="Any CPU" /p:Configuration="Debug" /p:Version="${{ steps.setVersion.outputs.version }}" -m + - name: Upload Release + id: create_release + uses: ncipollo/release-action@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 + updateRelease: true + artifacts: 'output\*.*(cpz|cplz)' + tag: ${{ steps.setVersion.outputs.version }} + - name: Setup Nuget + run: | + nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username pepperdash -password ${{ secrets.GITHUB_TOKEN }} + nuget setApiKey ${{ secrets.GITHUB_TOKEN }} -Source github + nuget setApiKey ${{ secrets.NUGET_API_KEY }} -Source https://api.nuget.org/v3/index.json + - name: Publish to Nuget + run: nuget push .\output\*.nupkg -Source https://api.nuget.org/v3/index.json + - name: Publish to Github Nuget + run: nuget push .\output\*.nupkg -Source github \ No newline at end of file diff --git a/PepperDash.Essentials.sln b/PepperDash.Essentials.sln new file mode 100644 index 00000000..4a9ffd83 --- /dev/null +++ b/PepperDash.Essentials.sln @@ -0,0 +1,43 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33213.308 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDash.Essentials.Devices.Common", "src\PepperDash.Essentials.Devices.Common\PepperDash.Essentials.Devices.Common.csproj", "{53E204B7-97DD-441D-A96C-721DF014DF82}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDash.Essentials.DM", "src\PepperDash.Essentials.DM\PepperDash.Essentials.DM.csproj", "{08EB4B98-9B4D-455A-81E0-4F913E08ADB5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDash.Essentials", "src\PepperDash.Essentials\PepperDash.Essentials.csproj", "{CB3B11BA-625C-4D35-B663-FDC5BE9A230E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDash.Essentials.Core", "src\PepperDash.Essentials.Core\PepperDash.Essentials.Core.csproj", "{3D192FED-8FFC-4CB5-B5F7-BA307ABA254B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {53E204B7-97DD-441D-A96C-721DF014DF82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {53E204B7-97DD-441D-A96C-721DF014DF82}.Debug|Any CPU.Build.0 = Debug|Any CPU + {53E204B7-97DD-441D-A96C-721DF014DF82}.Release|Any CPU.ActiveCfg = Release|Any CPU + {53E204B7-97DD-441D-A96C-721DF014DF82}.Release|Any CPU.Build.0 = Release|Any CPU + {08EB4B98-9B4D-455A-81E0-4F913E08ADB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {08EB4B98-9B4D-455A-81E0-4F913E08ADB5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {08EB4B98-9B4D-455A-81E0-4F913E08ADB5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {08EB4B98-9B4D-455A-81E0-4F913E08ADB5}.Release|Any CPU.Build.0 = Release|Any CPU + {CB3B11BA-625C-4D35-B663-FDC5BE9A230E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CB3B11BA-625C-4D35-B663-FDC5BE9A230E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CB3B11BA-625C-4D35-B663-FDC5BE9A230E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CB3B11BA-625C-4D35-B663-FDC5BE9A230E}.Release|Any CPU.Build.0 = Release|Any CPU + {3D192FED-8FFC-4CB5-B5F7-BA307ABA254B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3D192FED-8FFC-4CB5-B5F7-BA307ABA254B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3D192FED-8FFC-4CB5-B5F7-BA307ABA254B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3D192FED-8FFC-4CB5-B5F7-BA307ABA254B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {6907A4BF-7201-47CF-AAB1-3597F3B8E1C3} + EndGlobalSection +EndGlobal diff --git a/PepperDashEssentials.sln b/PepperDashEssentials.sln deleted file mode 100644 index d49b4ed1..00000000 --- a/PepperDashEssentials.sln +++ /dev/null @@ -1,58 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDashEssentials", "PepperDashEssentials\PepperDashEssentials.csproj", "{1BED5BA9-88C4-4365-9362-6F4B128071D3}" - ProjectSection(ProjectDependencies) = postProject - {892B761C-E479-44CE-BD74-243E9214AF13} = {892B761C-E479-44CE-BD74-243E9214AF13} - {9199CE8A-0C9F-4952-8672-3EED798B284F} = {9199CE8A-0C9F-4952-8672-3EED798B284F} - {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} = {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDash_Essentials_Core", "essentials-framework\Essentials Core\PepperDashEssentialsBase\PepperDash_Essentials_Core.csproj", "{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}" - ProjectSection(ProjectDependencies) = postProject - {E51D7C84-4906-486C-B2BA-EEB3B4E9731B} = {E51D7C84-4906-486C-B2BA-EEB3B4E9731B} - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Essentials Devices Common", "essentials-framework\Essentials Devices Common\Essentials Devices Common\Essentials Devices Common.csproj", "{892B761C-E479-44CE-BD74-243E9214AF13}" - ProjectSection(ProjectDependencies) = postProject - {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} = {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} - EndProjectSection -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}" - ProjectSection(ProjectDependencies) = postProject - {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} = {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDash_Essentials_Interfaces", "essentials-framework\Essentials Interfaces\PepperDash_Essentials_Interfaces\PepperDash_Essentials_Interfaces.csproj", "{E51D7C84-4906-486C-B2BA-EEB3B4E9731B}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {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}.Release|Any CPU.ActiveCfg = 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.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.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.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.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.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.Build.0 = Release|Any CPU - {E51D7C84-4906-486C-B2BA-EEB3B4E9731B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E51D7C84-4906-486C-B2BA-EEB3B4E9731B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E51D7C84-4906-486C-B2BA-EEB3B4E9731B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E51D7C84-4906-486C-B2BA-EEB3B4E9731B}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/PepperDashEssentials/Bridges/._EssentialsLightsBridge.cs b/PepperDashEssentials/Bridges/._EssentialsLightsBridge.cs deleted file mode 100644 index 069fb4b1..00000000 Binary files a/PepperDashEssentials/Bridges/._EssentialsLightsBridge.cs and /dev/null differ diff --git a/PepperDashEssentials/Bridges/AirMediaControllerBridge.cs b/PepperDashEssentials/Bridges/AirMediaControllerBridge.cs deleted file mode 100644 index 869c5614..00000000 --- a/PepperDashEssentials/Bridges/AirMediaControllerBridge.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Devices.Common; -using PepperDash.Essentials.DM.AirMedia; - -using Newtonsoft.Json; - -namespace PepperDash.Essentials.Core.Bridges -{ - public static class AirMediaControllerApiExtensions - { - public static void LinkToApi(this AirMediaController airMedia, BasicTriList trilist, uint joinStart, string joinMapKey) - { - AirMediaControllerJoinMap joinMap = new AirMediaControllerJoinMap(); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - joinMap.OffsetJoinNumbers(joinStart); - - Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - Debug.Console(0, "Linking to Airmedia: {0}", airMedia.Name); - - trilist.StringInput[joinMap.Name].StringValue = airMedia.Name; - - var commMonitor = airMedia as ICommunicationMonitor; - if (commMonitor != null) - { - commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]); - } - - airMedia.IsInSessionFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsInSession]); - airMedia.HdmiVideoSyncDetectedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.HdmiVideoSync]); - - trilist.SetSigTrueAction(joinMap.AutomaticInputRoutingEnabled, new Action( airMedia.AirMedia.DisplayControl.EnableAutomaticRouting)); - trilist.SetSigFalseAction(joinMap.AutomaticInputRoutingEnabled, new Action( airMedia.AirMedia.DisplayControl.DisableAutomaticRouting)); - airMedia.AutomaticInputRoutingEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AutomaticInputRoutingEnabled]); - - trilist.SetUShortSigAction(joinMap.VideoOut, new Action((u) => airMedia.SelectVideoOut(u))); - - airMedia.VideoOutFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoOut]); - airMedia.ErrorFeedback.LinkInputSig(trilist.UShortInput[joinMap.ErrorFB]); - airMedia.NumberOfUsersConnectedFeedback.LinkInputSig(trilist.UShortInput[joinMap.NumberOfUsersConnectedFB]); - - trilist.SetUShortSigAction(joinMap.LoginCode, new Action((u) => airMedia.AirMedia.AirMedia.LoginCode.UShortValue = u)); - airMedia.LoginCodeFeedback.LinkInputSig(trilist.UShortInput[joinMap.LoginCode]); - - airMedia.ConnectionAddressFeedback.LinkInputSig(trilist.StringInput[joinMap.ConnectionAddressFB]); - airMedia.HostnameFeedback.LinkInputSig(trilist.StringInput[joinMap.HostnameFB]); - airMedia.SerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.SerialNumberFeedback]); - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/AppleTvBridge.cs b/PepperDashEssentials/Bridges/AppleTvBridge.cs deleted file mode 100644 index 3c2bb0af..00000000 --- a/PepperDashEssentials/Bridges/AppleTvBridge.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Devices.Common; - -using Newtonsoft.Json; - -namespace PepperDash.Essentials.Core.Bridges -{ - public static class AppleTvApiExtensions - { - public static void LinkToApi(this AppleTV appleTv, BasicTriList trilist, uint joinStart, string joinMapKey) - { - AppleTvJoinMap joinMap = new AppleTvJoinMap(); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if(!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - joinMap.OffsetJoinNumbers(joinStart); - - Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - Debug.Console(0, "Linking to Bridge Type {0}", appleTv.GetType().Name.ToString()); - - trilist.SetBoolSigAction(joinMap.UpArrow, (b) => appleTv.Up(b)); - trilist.SetBoolSigAction(joinMap.DnArrow, (b) => appleTv.Down(b)); - trilist.SetBoolSigAction(joinMap.LeftArrow, (b) => appleTv.Left(b)); - trilist.SetBoolSigAction(joinMap.RightArrow, (b) => appleTv.Right(b)); - trilist.SetBoolSigAction(joinMap.Select, (b) => appleTv.Select(b)); - trilist.SetBoolSigAction(joinMap.Menu, (b) => appleTv.Menu(b)); - trilist.SetBoolSigAction(joinMap.PlayPause, (b) => appleTv.Play(b)); - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/BridgeFactory.cs b/PepperDashEssentials/Bridges/BridgeFactory.cs deleted file mode 100644 index c17d4642..00000000 --- a/PepperDashEssentials/Bridges/BridgeFactory.cs +++ /dev/null @@ -1,129 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Bridges; -using PepperDash.Essentials.Core.Config; -using PepperDash.Core; -using PepperDash.Essentials.Core.Routing; -using PepperDash.Essentials.Bridges; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.EthernetCommunication; - -namespace PepperDash.Essentials -{ - /// - /// Responsible for loading all of the device types for this library - /// - public class BridgeFactory - { - public BridgeFactory() - { - var eiscApiAdvancedFactory = new EiscApiAdvancedFactory() as IDeviceFactory; - eiscApiAdvancedFactory.LoadTypeFactories(); - - var eiscApiFactory = new EiscApiFactory() as IDeviceFactory; - eiscApiFactory.LoadTypeFactories(); - } - - } - - public class CommBridge : Device - { - public CommBridgeProperties Properties { get; private set; } - - public List CommDevices { get; private set; } - - public CommBridge(string key, string name, JToken properties) - : base(key, name) - { - Properties = JsonConvert.DeserializeObject(properties.ToString()); - } - - public override bool CustomActivate() - { - // Create EiscApis - if (Properties.Eiscs != null) - { - foreach (var eisc in Properties.Eiscs) - { - var ApiEisc = new BridgeApiEisc(eisc.IpId, eisc.Hostname); - } - } - - foreach (var deviceKey in Properties.CommDevices) - { - var device = DeviceManager.GetDeviceForKey(deviceKey); - - if (device != null) - { - Debug.Console(0, "deviceKey {0} Found in Device Manager", device.Key); - CommDevices.Add(device as IBasicCommunication); - } - else - { - Debug.Console(0, "deviceKey {0} Not Found in Device Manager", deviceKey); - } - } - - // Iterate through all the CommDevices and link up their Actions and Feedbacks - - Debug.Console(0, "Bridge {0} Activated", this.Name); - - return true; - } - } - - - public class EiscBridgeProperties - { - public string ParentDeviceKey { get; set; } - public eApiType ApiType { get; set; } - public List Eiscs { get; set; } - public string ApiOverrideFilePath { get; set; } - - public class EiscProperties - { - public string IpId { get; set; } - public string Hostname { get; set; } - } - } - - public class CommBridgeProperties : EiscBridgeProperties - { - public List CommDevices { get; set; } - } - - public enum eApiType { Eisc = 0 } - - public class BridgeApiEisc - { - public uint Ipid { get; private set; } - public ThreeSeriesTcpIpEthernetIntersystemCommunications Eisc { get; private set; } - - public BridgeApiEisc(string ipid, string hostname) - { - Ipid = (UInt32)int.Parse(ipid, System.Globalization.NumberStyles.HexNumber); - Eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(Ipid, hostname, Global.ControlSystem); - Eisc.Register(); - Eisc.SigChange += Eisc_SigChange; - Debug.Console(0, "BridgeApiEisc Created at Ipid {0}", ipid); - } - void Eisc_SigChange(object currentDevice, Crestron.SimplSharpPro.SigEventArgs args) - { - if (Debug.Level >= 1) - Debug.Console(1, "BridgeApiEisc change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue); - var uo = args.Sig.UserObject; - if (uo is Action) - (uo as Action)(args.Sig.BoolValue); - else if (uo is Action) - (uo as Action)(args.Sig.UShortValue); - else if (uo is Action) - (uo as Action)(args.Sig.StringValue); - } - } -} diff --git a/PepperDashEssentials/Bridges/Bridges.BridgeFactory.cs b/PepperDashEssentials/Bridges/Bridges.BridgeFactory.cs deleted file mode 100644 index 18dd0c71..00000000 --- a/PepperDashEssentials/Bridges/Bridges.BridgeFactory.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; -using PepperDash.Core; -using PepperDash.Essentials.Core.Routing; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.EthernetCommunication; -using PepperDash.Essentials.Bridges; - -namespace PepperDash.Essentials { - public class BridgeFactory { - public static IKeyed GetDevice(PepperDash.Essentials.Core.Config.DeviceConfig dc) { - // ? why is this static JTA 2018-06-13? - - var key = dc.Key; - var name = dc.Name; - var type = dc.Type; - var properties = dc.Properties; - var propAnon = new { }; - JsonConvert.DeserializeAnonymousType(dc.Properties.ToString(), propAnon); - - var typeName = dc.Type.ToLower(); - var groupName = dc.Group.ToLower(); - - Debug.Console(2, "Name {0}, Key {1}, Type {2}, Properties {3}", name, key, type, properties.ToString()); - if (typeName == "essentialdm") - { - return new EssentialDM(key, name, properties); - } - else if (typeName == "essentialcomm") - { - Debug.Console(2, "Launch Essential Comm"); - return new EssentialComm(key, name, properties); - } - else if (typeName == "essentialdsp") - { - Debug.Console(2, "Launch EssentialDsp"); - return new EssentialDsp(key, name, properties); - } - else if (typeName == "essentialstvone") - { - Debug.Console(2, "Launch essentialstvone"); - return new EssentialsTVOne(key, name, properties); - } - else if (typeName == "essentialslighting") - { - Debug.Console(2, "Launch essentialslighting"); - return new EssentialsLightsBridge(key, name, properties); - } - else if (typeName == "eiscapi") - { - return new EiscApi(dc); - } - return null; - } - } - public class BridgeApiEisc { - public uint Ipid; - public ThreeSeriesTcpIpEthernetIntersystemCommunications Eisc; - public BridgeApiEisc(string ipid) { - Ipid = (UInt32)int.Parse(ipid, System.Globalization.NumberStyles.HexNumber); - Eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(Ipid, "127.0.0.2", Global.ControlSystem); - Eisc.Register(); - Eisc.SigChange += Eisc_SigChange; - Debug.Console(2, "BridgeApiEisc Created at Ipid {0}", ipid); - } - void Eisc_SigChange(object currentDevice, Crestron.SimplSharpPro.SigEventArgs args) { - if (Debug.Level >= 1) - Debug.Console(2, "DDVC EISC change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue); - var uo = args.Sig.UserObject; - if (uo is Action) - (uo as Action)(args.Sig.BoolValue); - else if (uo is Action) - (uo as Action)(args.Sig.UShortValue); - else if (uo is Action) - (uo as Action)(args.Sig.StringValue); - } - } - - } - - - - \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/C2nRthsControllerBridge.cs b/PepperDashEssentials/Bridges/C2nRthsControllerBridge.cs deleted file mode 100644 index 931ee231..00000000 --- a/PepperDashEssentials/Bridges/C2nRthsControllerBridge.cs +++ /dev/null @@ -1,38 +0,0 @@ -using Crestron.SimplSharpPro.DeviceSupport; -using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.CrestronIO; - -namespace PepperDash.Essentials.Core.Bridges -{ - public static class C2nRthsControllerApiExtensions - { - public static void LinkToApi(this C2nRthsController device, BasicTriList triList, uint joinStart, - string joinMapKey) - { - var joinMap = new C2nRthsControllerJoinMap(); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - joinMap.OffsetJoinNumbers(joinStart); - - Debug.Console(1, device, "Linking to Trilist '{0}'", triList.ID.ToString("X")); - - - triList.SetBoolSigAction(joinMap.TemperatureFormat, device.SetTemperatureFormat); - - device.IsOnline.LinkInputSig(triList.BooleanInput[joinMap.IsOnline]); - device.TemperatureFeedback.LinkInputSig(triList.UShortInput[joinMap.Temperature]); - device.HumidityFeedback.LinkInputSig(triList.UShortInput[joinMap.Humidity]); - - triList.StringInput[joinMap.Name].StringValue = device.Name; - - - } - - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/CameraControllerBridge.cs b/PepperDashEssentials/Bridges/CameraControllerBridge.cs deleted file mode 100644 index 6a3771d3..00000000 --- a/PepperDashEssentials/Bridges/CameraControllerBridge.cs +++ /dev/null @@ -1,169 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Devices.Common; -using PepperDash.Essentials.Devices.Common.Cameras; - -using Newtonsoft.Json; - -namespace PepperDash.Essentials.Core.Bridges -{ - public static class CameraControllerApiExtensions - { - 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); - - // Adds the join map to the bridge - bridge.AddJoinMap(cameraDevice.Key, joinMap); - - var customJoins = JoinMapHelper.TryGetJoinMapAdvancedForDevice(joinMapKey); - - if (customJoins != null) - { - joinMap.SetCustomJoinData(customJoins); - } - - Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - Debug.Console(0, "Linking to Bridge Type {0}", cameraDevice.GetType().Name.ToString()); - - var commMonitor = cameraDevice as ICommunicationMonitor; - commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); - - var ptzCamera = cameraDevice as IHasCameraPtzControl; - - if (ptzCamera != null) - { - trilist.SetBoolSigAction(joinMap.PanLeft.JoinNumber, (b) => - { - if (b) - { - ptzCamera.PanLeft(); - } - else - { - ptzCamera.PanStop(); - } - }); - trilist.SetBoolSigAction(joinMap.PanRight.JoinNumber, (b) => - { - if (b) - { - ptzCamera.PanRight(); - } - else - { - ptzCamera.PanStop(); - } - }); - - trilist.SetBoolSigAction(joinMap.TiltUp.JoinNumber, (b) => - { - if (b) - { - ptzCamera.TiltUp(); - } - else - { - ptzCamera.TiltStop(); - } - }); - trilist.SetBoolSigAction(joinMap.TiltDown.JoinNumber, (b) => - { - if (b) - { - ptzCamera.TiltDown(); - } - else - { - ptzCamera.TiltStop(); - } - }); - - trilist.SetBoolSigAction(joinMap.ZoomIn.JoinNumber, (b) => - { - if (b) - { - ptzCamera.ZoomIn(); - } - else - { - ptzCamera.ZoomStop(); - } - }); - - trilist.SetBoolSigAction(joinMap.ZoomOut.JoinNumber, (b) => - { - if (b) - { - ptzCamera.ZoomOut(); - } - else - { - ptzCamera.ZoomStop(); - } - }); - } - - if (cameraDevice is IPower) - { - var powerCamera = cameraDevice as IPower; - trilist.SetSigTrueAction(joinMap.PowerOn.JoinNumber, () => powerCamera.PowerOn()); - trilist.SetSigTrueAction(joinMap.PowerOff.JoinNumber, () => powerCamera.PowerOff()); - - powerCamera.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn.JoinNumber]); - powerCamera.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff.JoinNumber]); - } - - if (cameraDevice is ICommunicationMonitor) - { - var monitoredCamera = cameraDevice as ICommunicationMonitor; - monitoredCamera.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); - } - - if (cameraDevice is IHasCameraPresets) - { - // Set the preset lables when they change - var presetsCamera = cameraDevice as IHasCameraPresets; - presetsCamera.PresetsListHasChanged += new EventHandler((o, a) => - { - for (int i = 1; i <= joinMap.NumberOfPresets.JoinNumber; i++) - { - int tempNum = i - 1; - - string label = "" ; - - var preset = presetsCamera.Presets.FirstOrDefault(p => p.ID.Equals(i)); - - if (preset != null) - label = preset.Description; - - trilist.SetString((ushort)(joinMap.PresetLabelStart.JoinNumber + tempNum), label); - } - }); - - for (int i = 0; i < joinMap.NumberOfPresets.JoinNumber; i++) - { - int tempNum = i; - - trilist.SetSigTrueAction((ushort)(joinMap.PresetRecallStart.JoinNumber + tempNum), () => - { - presetsCamera.PresetSelect(tempNum); - }); - trilist.SetSigTrueAction((ushort)(joinMap.PresetSaveStart.JoinNumber + tempNum), () => - { - var label = trilist.GetString((ushort)(joinMap.PresetLabelStart.JoinNumber + tempNum)); - - presetsCamera.PresetStore(tempNum, label); - }); - } - } - } - } - -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/DmChassisControllerBridge.cs b/PepperDashEssentials/Bridges/DmChassisControllerBridge.cs deleted file mode 100644 index 6522a5f0..00000000 --- a/PepperDashEssentials/Bridges/DmChassisControllerBridge.cs +++ /dev/null @@ -1,288 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.DM; -using Crestron.SimplSharpPro.DM.Endpoints; -using Crestron.SimplSharpPro.DM.Endpoints.Transmitters; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.DM; - -using Newtonsoft.Json; - -namespace PepperDash.Essentials.Core.Bridges -{ - public static class DmChassisControllerApiExtentions - { - public static void LinkToApi(this DmChassisController dmChassis, BasicTriList trilist, uint joinStart, string joinMapKey) - { - DmChassisControllerJoinMap joinMap = new DmChassisControllerJoinMap(); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - - joinMap.OffsetJoinNumbers(joinStart); - - Debug.Console(1, dmChassis, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - - var chassis = dmChassis.Chassis as DmMDMnxn; - - dmChassis.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]); - - trilist.SetUShortSigAction(joinMap.SystemId, new Action(o => chassis.SystemId.UShortValue = o)); - trilist.SetSigTrueAction(joinMap.SystemId, new Action(() => chassis.ApplySystemId())); - - dmChassis.SystemIdFeebdack.LinkInputSig(trilist.UShortInput[joinMap.SystemId]); - dmChassis.SystemIdBusyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.SystemId]); - - // Link up outputs - for (uint i = 1; i <= dmChassis.Chassis.NumberOfOutputs; i++) - { - var ioSlot = i; - - // Control - trilist.SetUShortSigAction(joinMap.OutputVideo + ioSlot, new Action(o => dmChassis.ExecuteSwitch(o, ioSlot, eRoutingSignalType.Video))); - trilist.SetUShortSigAction(joinMap.OutputAudio + ioSlot, new Action(o => dmChassis.ExecuteSwitch(o, ioSlot, eRoutingSignalType.Audio))); - trilist.SetUShortSigAction(joinMap.OutputUsb + ioSlot, new Action(o => dmChassis.ExecuteSwitch(o, ioSlot, eRoutingSignalType.UsbOutput))); - trilist.SetUShortSigAction(joinMap.InputUsb + ioSlot, new Action(o => dmChassis.ExecuteSwitch(o, ioSlot, eRoutingSignalType.UsbInput))); - - if (dmChassis.TxDictionary.ContainsKey(ioSlot)) - { - Debug.Console(2, "Creating Tx Feedbacks {0}", ioSlot); - var txKey = dmChassis.TxDictionary[ioSlot]; - var basicTxDevice = DeviceManager.GetDeviceForKey(txKey) as BasicDmTxControllerBase; - - var advancedTxDevice = basicTxDevice as DmTxControllerBase; - - if (dmChassis.Chassis is DmMd8x8Cpu3 || dmChassis.Chassis is DmMd8x8Cpu3rps - || dmChassis.Chassis is DmMd16x16Cpu3 || dmChassis.Chassis is DmMd16x16Cpu3rps - || dmChassis.Chassis is DmMd32x32Cpu3 || dmChassis.Chassis is DmMd32x32Cpu3rps) - { - dmChassis.InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]); - } - else - { - if (advancedTxDevice != null) - { - advancedTxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]); - Debug.Console(2, "Linking Tx Online Feedback from Advanced Transmitter at input {0}", ioSlot); - } - else if (dmChassis.InputEndpointOnlineFeedbacks[ioSlot] != null) - { - Debug.Console(2, "Linking Tx Online Feedback from Input Card {0}", ioSlot); - dmChassis.InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]); - } - } - - if (basicTxDevice != null && advancedTxDevice == null) - trilist.BooleanInput[joinMap.TxAdvancedIsPresent + ioSlot].BoolValue = true; - - if (advancedTxDevice != null) - { - advancedTxDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]); - } - else if(advancedTxDevice == null || basicTxDevice != null) - { - Debug.Console(1, "Setting up actions and feedbacks on input card {0}", ioSlot); - dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]); - - var inputPort = dmChassis.InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)]; - if (inputPort != null) - { - Debug.Console(1, "Port value for input card {0} is set", ioSlot); - var port = inputPort.Port; - - if (port != null) - { - if (port is HdmiInputWithCEC) - { - Debug.Console(1, "Port is HdmiInputWithCec"); - - var hdmiInPortWCec = port as HdmiInputWithCEC; - - if (hdmiInPortWCec.HdcpSupportedLevel != eHdcpSupportedLevel.Unknown) - { - SetHdcpStateAction(true, hdmiInPortWCec, joinMap.HdcpSupportState + ioSlot, trilist); - } - - dmChassis.InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]); - - if(dmChassis.InputCardHdcpCapabilityTypes.ContainsKey(ioSlot)) - trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = (ushort)dmChassis.InputCardHdcpCapabilityTypes[ioSlot]; - else - trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = 1; - } - } - } - else - { - inputPort = dmChassis.InputPorts[string.Format("inputCard{0}--dmIn", ioSlot)]; - - if(inputPort != null) - { - var port = inputPort.Port; - - if (port is DMInputPortWithCec) - { - Debug.Console(1, "Port is DMInputPortWithCec"); - - var dmInPortWCec = port as DMInputPortWithCec; - - if (dmInPortWCec != null) - { - SetHdcpStateAction(dmChassis.PropertiesConfig.InputSlotSupportsHdcp2[ioSlot], dmInPortWCec, joinMap.HdcpSupportState + ioSlot, trilist); - } - - dmChassis.InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]); - - if (dmChassis.InputCardHdcpCapabilityTypes.ContainsKey(ioSlot)) - trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = (ushort)dmChassis.InputCardHdcpCapabilityTypes[ioSlot]; - else - trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = 1; - } - } - } - } - } - else - { - dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]); - - var inputPort = dmChassis.InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)]; - if (inputPort != null) - { - var hdmiPort = inputPort.Port as EndpointHdmiInput; - - if (hdmiPort != null) - { - SetHdcpStateAction(true, hdmiPort, joinMap.HdcpSupportState + ioSlot, trilist); - dmChassis.InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]); - } - } - } - - if (dmChassis.RxDictionary.ContainsKey(ioSlot)) - { - Debug.Console(2, "Creating Rx Feedbacks {0}", ioSlot); - var rxKey = dmChassis.RxDictionary[ioSlot]; - var rxDevice = DeviceManager.GetDeviceForKey(rxKey) as DmRmcControllerBase; - var hdBaseTDevice = DeviceManager.GetDeviceForKey(rxKey) as DmHdBaseTControllerBase; - if (dmChassis.Chassis is DmMd8x8Cpu3 || dmChassis.Chassis is DmMd8x8Cpu3rps - || dmChassis.Chassis is DmMd16x16Cpu3 || dmChassis.Chassis is DmMd16x16Cpu3rps - || dmChassis.Chassis is DmMd32x32Cpu3 || dmChassis.Chassis is DmMd32x32Cpu3rps || hdBaseTDevice != null) - { - dmChassis.OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]); - } - else if (rxDevice != null) - { - rxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]); - } - } - - // Feedback - dmChassis.VideoOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputVideo + ioSlot]); - dmChassis.AudioOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputAudio + ioSlot]); - dmChassis.UsbOutputRoutedToFeebacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputUsb + ioSlot]); - dmChassis.UsbInputRoutedToFeebacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.InputUsb + ioSlot]); - - dmChassis.OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames + ioSlot]); - dmChassis.InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames + ioSlot]); - dmChassis.OutputVideoRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentVideoInputNames + ioSlot]); - dmChassis.OutputAudioRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentAudioInputNames + ioSlot]); - - dmChassis.OutputDisabledByHdcpFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputDisabledByHdcp + ioSlot]); - } - } - - static void SetHdcpStateAction(bool hdcpTypeSimple, HdmiInputWithCEC port, uint join, BasicTriList trilist) - { - if (hdcpTypeSimple) - { - trilist.SetUShortSigAction(join, - new Action(s => - { - if (s == 0) - { - port.HdcpSupportOff(); - } - else if (s > 0) - { - port.HdcpSupportOn(); - } - })); - } - else - { - trilist.SetUShortSigAction(join, - new Action(u => - { - port.HdcpReceiveCapability = (eHdcpCapabilityType)u; - })); - } - } - - static void SetHdcpStateAction(bool hdcpTypeSimple, EndpointHdmiInput port, uint join, BasicTriList trilist) - { - if (hdcpTypeSimple) - { - trilist.SetUShortSigAction(join, - new Action(s => - { - if (s == 0) - { - port.HdcpSupportOff(); - } - else if (s > 0) - { - port.HdcpSupportOn(); - } - })); - } - else - { - trilist.SetUShortSigAction(join, - new Action(u => - { - port.HdcpCapability = (eHdcpCapabilityType)u; - })); - } - } - - static void SetHdcpStateAction(bool supportsHdcp2, DMInputPortWithCec port, uint join, BasicTriList trilist) - { - if (!supportsHdcp2) - { - trilist.SetUShortSigAction(join, - new Action(s => - { - if (s == 0) - { - port.HdcpSupportOff(); - } - else if (s > 0) - { - port.HdcpSupportOn(); - } - })); - } - else - { - trilist.SetUShortSigAction(join, - new Action(u => - { - port.HdcpReceiveCapability = (eHdcpCapabilityType)u; - })); - } - } - - } - -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/DmRmcControllerBridge.cs b/PepperDashEssentials/Bridges/DmRmcControllerBridge.cs deleted file mode 100644 index 5609cf03..00000000 --- a/PepperDashEssentials/Bridges/DmRmcControllerBridge.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.DM; - -using Newtonsoft.Json; - -namespace PepperDash.Essentials.Core.Bridges -{ - public static class DmRmcControllerApiExtensions - { - public static void LinkToApi(this DmRmcControllerBase rmc, BasicTriList trilist, uint joinStart, string joinMapKey) - { - DmRmcControllerJoinMap joinMap = new DmRmcControllerJoinMap(); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - joinMap.OffsetJoinNumbers(joinStart); - - Debug.Console(1, rmc, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - - rmc.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]); - if(rmc.VideoOutputResolutionFeedback != null) - rmc.VideoOutputResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentOutputResolution]); - if(rmc.EdidManufacturerFeedback != null) - rmc.EdidManufacturerFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidManufacturer]); - if(rmc.EdidNameFeedback != null) - rmc.EdidNameFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidName]); - if(rmc.EdidPreferredTimingFeedback != null) - rmc.EdidPreferredTimingFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidPrefferedTiming]); - if(rmc.EdidSerialNumberFeedback != null) - rmc.EdidSerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidSerialNumber]); - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/DmTxControllerBridge.cs b/PepperDashEssentials/Bridges/DmTxControllerBridge.cs deleted file mode 100644 index c565f41e..00000000 --- a/PepperDashEssentials/Bridges/DmTxControllerBridge.cs +++ /dev/null @@ -1,153 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DM; -using Crestron.SimplSharpPro.DM.Endpoints; -using Crestron.SimplSharpPro.DM.Endpoints.Transmitters; -using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.DM; - -using Newtonsoft.Json; - -namespace PepperDash.Essentials.Core.Bridges -{ - public static class DmTxControllerApiExtensions - { - public static void LinkToApi(this DmTxControllerBase tx, BasicTriList trilist, uint joinStart, string joinMapKey) - { - DmTxControllerJoinMap joinMap = new DmTxControllerJoinMap(); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - joinMap.OffsetJoinNumbers(joinStart); - - Debug.Console(1, tx, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - - tx.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]); - tx.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus]); - tx.AnyVideoInput.VideoStatus.VideoResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentInputResolution]); - trilist.UShortInput[joinMap.HdcpSupportCapability].UShortValue = (ushort)tx.HdcpSupportCapability; - - bool hdcpTypeSimple; - - if (tx.Hardware is DmTx4kX02CBase || tx.Hardware is DmTx4kzX02CBase) - hdcpTypeSimple = false; - else - hdcpTypeSimple = true; - - if (tx is ITxRouting) - { - var txR = tx as ITxRouting; - - trilist.SetUShortSigAction(joinMap.VideoInput, - new Action(i => txR.ExecuteNumericSwitch(i, 0, eRoutingSignalType.Video))); - trilist.SetUShortSigAction(joinMap.AudioInput, - new Action(i => txR.ExecuteNumericSwitch(i, 0, eRoutingSignalType.Audio))); - - txR.VideoSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoInput]); - txR.AudioSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.AudioInput]); - - trilist.UShortInput[joinMap.HdcpSupportCapability].UShortValue = (ushort)tx.HdcpSupportCapability; - - if (txR.InputPorts[DmPortName.HdmiIn] != null) - { - var inputPort = txR.InputPorts[DmPortName.HdmiIn]; - - if (tx.Feedbacks["HdmiInHdcpCapability"] != null) - (tx.Feedbacks["HdmiInHdcpCapability"] as IntFeedback).LinkInputSig(trilist.UShortInput[joinMap.Port1HdcpState]); - - if (inputPort.ConnectionType == eRoutingPortConnectionType.Hdmi && inputPort.Port != null) - { - var port = inputPort.Port as EndpointHdmiInput; - - SetHdcpCapabilityAction(hdcpTypeSimple, port, joinMap.Port1HdcpState, trilist); - } - } - - if (txR.InputPorts[DmPortName.HdmiIn1] != null) - { - var inputPort = txR.InputPorts[DmPortName.HdmiIn1]; - - if (tx.Feedbacks["HdmiIn1HdcpCapability"] != null) - (tx.Feedbacks["HdmiIn1HdcpCapability"] as IntFeedback).LinkInputSig(trilist.UShortInput[joinMap.Port1HdcpState]); - - if (inputPort.ConnectionType == eRoutingPortConnectionType.Hdmi && inputPort.Port != null) - { - var port = inputPort.Port as EndpointHdmiInput; - - SetHdcpCapabilityAction(hdcpTypeSimple, port, joinMap.Port1HdcpState, trilist); - } - } - - if (txR.InputPorts[DmPortName.HdmiIn2] != null) - { - var inputPort = txR.InputPorts[DmPortName.HdmiIn2]; - - if (tx.Feedbacks["HdmiIn2HdcpCapability"] != null) - (tx.Feedbacks["HdmiIn2HdcpCapability"] as IntFeedback).LinkInputSig(trilist.UShortInput[joinMap.Port1HdcpState]); - - if (inputPort.ConnectionType == eRoutingPortConnectionType.Hdmi && inputPort.Port != null) - { - var port = inputPort.Port as EndpointHdmiInput; - - SetHdcpCapabilityAction(hdcpTypeSimple, port, joinMap.Port2HdcpState, trilist); - } - } - - } - - var txFreeRun = tx as IHasFreeRun; - if (txFreeRun != null) - { - txFreeRun.FreeRunEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.FreeRunEnabled]); - trilist.SetBoolSigAction(joinMap.FreeRunEnabled, new Action(b => txFreeRun.SetFreeRunEnabled(b))); - } - - var txVga = tx as IVgaBrightnessContrastControls; - { - txVga.VgaBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.VgaBrightness]); - txVga.VgaContrastFeedback.LinkInputSig(trilist.UShortInput[joinMap.VgaContrast]); - - trilist.SetUShortSigAction(joinMap.VgaBrightness, new Action(u => txVga.SetVgaBrightness(u))); - trilist.SetUShortSigAction(joinMap.VgaContrast, new Action(u => txVga.SetVgaContrast(u))); - } - } - - static void SetHdcpCapabilityAction(bool hdcpTypeSimple, EndpointHdmiInput port, uint join, BasicTriList trilist) - { - if (hdcpTypeSimple) - { - trilist.SetUShortSigAction(join, - new Action(s => - { - if (s == 0) - { - port.HdcpSupportOff(); - } - else if (s > 0) - { - port.HdcpSupportOn(); - } - })); - } - else - { - trilist.SetUShortSigAction(join, - new Action(s => - { - port.HdcpCapability = (eHdcpCapabilityType)s; - })); - } - } - - - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/DmpsAudioOutputControllerBridge.cs b/PepperDashEssentials/Bridges/DmpsAudioOutputControllerBridge.cs deleted file mode 100644 index eec058da..00000000 --- a/PepperDashEssentials/Bridges/DmpsAudioOutputControllerBridge.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.DM; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.DM; - -using Newtonsoft.Json; - -namespace PepperDash.Essentials.Core.Bridges -{ - public static class DmpsAudioOutputControllerApiExtensions - { - public static void LinkToApi(this DmpsAudioOutputController dmAudioOutputController, BasicTriList trilist, uint joinStart, string joinMapKey) - { - DmpsAudioOutputControllerJoinMap joinMap = new DmpsAudioOutputControllerJoinMap(); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - joinMap.OffsetJoinNumbers(joinStart); - - Debug.Console(1, dmAudioOutputController, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - - if (dmAudioOutputController.MasterVolumeLevel != null) - { - SetUpDmpsAudioOutputJoins(trilist, dmAudioOutputController.MasterVolumeLevel, joinMap.MasterVolume); - } - - if (dmAudioOutputController.SourceVolumeLevel != null) - { - SetUpDmpsAudioOutputJoins(trilist, dmAudioOutputController.SourceVolumeLevel, joinMap.SourceVolume); - } - - if (dmAudioOutputController.Codec1VolumeLevel != null) - { - SetUpDmpsAudioOutputJoins(trilist, dmAudioOutputController.Codec1VolumeLevel, joinMap.Codec1Volume); - } - - if (dmAudioOutputController.Codec2VolumeLevel != null) - { - SetUpDmpsAudioOutputJoins(trilist, dmAudioOutputController.Codec2VolumeLevel, joinMap.Codec2Volume); - } - - } - - static void SetUpDmpsAudioOutputJoins(BasicTriList trilist, DmpsAudioOutput output, uint joinStart) - { - var volumeLevelJoin = joinStart; - var muteOnJoin = joinStart; - var muteOffJoin = joinStart + 1; - var volumeUpJoin = joinStart + 2; - var volumeDownJoin = joinStart + 3; - - - trilist.SetUShortSigAction(volumeLevelJoin, new Action(o => output.SetVolume(o))); - output.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[volumeLevelJoin]); - - trilist.SetSigTrueAction(muteOnJoin, new Action(output.MuteOn)); - output.MuteFeedback.LinkInputSig(trilist.BooleanInput[muteOnJoin]); - trilist.SetSigTrueAction(muteOffJoin, new Action(output.MuteOff)); - output.MuteFeedback.LinkComplementInputSig(trilist.BooleanInput[muteOffJoin]); - - trilist.SetBoolSigAction(volumeUpJoin, new Action(b => output.VolumeUp(b))); - trilist.SetBoolSigAction(volumeDownJoin, new Action(b => output.VolumeDown(b))); - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/DmpsRoutingControllerBridge.cs b/PepperDashEssentials/Bridges/DmpsRoutingControllerBridge.cs deleted file mode 100644 index ea775039..00000000 --- a/PepperDashEssentials/Bridges/DmpsRoutingControllerBridge.cs +++ /dev/null @@ -1,128 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.DM; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.DM; - -using Newtonsoft.Json; - -namespace PepperDash.Essentials.Core.Bridges -{ - public static class DmpsRoutingControllerApiExtentions - { - public static void LinkToApi(this DmpsRoutingController dmpsRouter, BasicTriList trilist, uint joinStart, string joinMapKey) - { - DmpsRoutingControllerJoinMap joinMap = new DmpsRoutingControllerJoinMap(); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - joinMap.OffsetJoinNumbers(joinStart); - - Debug.Console(1, dmpsRouter, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - - // Link up outputs - for (uint i = 1; i <= dmpsRouter.Dmps.NumberOfSwitcherInputs; i++) - { - Debug.Console(2, dmpsRouter, "Linking Input Card {0}", i); - - var ioSlot = i; - - //if (dmpsRouter.TxDictionary.ContainsKey(ioSlot)) - //{ - // Debug.Console(2, "Creating Tx Feedbacks {0}", ioSlot); - // var TxKey = dmpsRouter.TxDictionary[ioSlot]; - // var TxDevice = DeviceManager.GetDeviceForKey(TxKey) as DmTxControllerBase; - // //TxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]); - // // TxDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]); - // // trilist.SetUShortSigAction((ApiMap.HdcpSupport[ioSlot]), u => TxDevice.SetHdcpSupportAll((ePdtHdcpSupport)(u))); - // // TxDevice.HdcpSupportAllFeedback.LinkInputSig(trilist.UShortInput[joinMap. + ioSlot]); - // // trilist.UShortInput[ApiMap.HdcpSupportCapability[ioSlot]].UShortValue = TxDevice.HdcpSupportCapability; - //} - //else - //{ - // // dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[ApiMap.TxVideoSyncStatus[ioSlot]]); - //} - - if(dmpsRouter.VideoInputSyncFeedbacks[ioSlot] != null) - dmpsRouter.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]); - - if (dmpsRouter.InputNameFeedbacks[ioSlot] != null) - dmpsRouter.InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames + ioSlot]); - - trilist.SetStringSigAction(joinMap.InputNames + ioSlot, new Action(s => - { - var inputCard = dmpsRouter.Dmps.SwitcherInputs[ioSlot] as DMInput; - - if (inputCard != null) - { - if (inputCard.NameFeedback != null && !string.IsNullOrEmpty(inputCard.NameFeedback.StringValue) && inputCard.NameFeedback.StringValue != s) - if(inputCard.Name != null) - inputCard.Name.StringValue = s; - } - })); - - - if(dmpsRouter.InputEndpointOnlineFeedbacks[ioSlot] != null) - dmpsRouter.InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]); - } - - for (uint i = 1; i <= dmpsRouter.Dmps.NumberOfSwitcherOutputs; i++) - { - Debug.Console(2, dmpsRouter, "Linking Output Card {0}", i); - - var ioSlot = i; - // Control - trilist.SetUShortSigAction(joinMap.OutputVideo + ioSlot, new Action(o => dmpsRouter.ExecuteSwitch(o, ioSlot, eRoutingSignalType.Video))); - trilist.SetUShortSigAction(joinMap.OutputAudio + ioSlot, new Action(o => dmpsRouter.ExecuteSwitch(o, ioSlot, eRoutingSignalType.Audio))); - - trilist.SetStringSigAction(joinMap.OutputNames + ioSlot, new Action(s => - { - var outputCard = dmpsRouter.Dmps.SwitcherOutputs[ioSlot] as DMOutput; - - //Debug.Console(2, dmpsRouter, "Output Name String Sig Action for Output Card {0}", ioSlot); - - if (outputCard != null) - { - //Debug.Console(2, dmpsRouter, "Card Type: {0}", outputCard.CardInputOutputType); - - if (!(outputCard is Crestron.SimplSharpPro.DM.Cards.Card.Dmps3CodecOutput) && outputCard.NameFeedback != null) - { - if (!string.IsNullOrEmpty(outputCard.NameFeedback.StringValue)) - { - //Debug.Console(2, dmpsRouter, "NameFeedabck: {0}", outputCard.NameFeedback.StringValue); - - if (outputCard.NameFeedback.StringValue != s && outputCard.Name != null) - { - outputCard.Name.StringValue = s; - } - } - } - } - })); - - // Feedback - if(dmpsRouter.VideoOutputFeedbacks[ioSlot] != null) - dmpsRouter.VideoOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputVideo + ioSlot]); - if (dmpsRouter.AudioOutputFeedbacks[ioSlot] != null) - dmpsRouter.AudioOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputAudio + ioSlot]); - if (dmpsRouter.OutputNameFeedbacks[ioSlot] != null) - dmpsRouter.OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames + ioSlot]); - if (dmpsRouter.OutputVideoRouteNameFeedbacks[ioSlot] != null) - dmpsRouter.OutputVideoRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentVideoInputNames + ioSlot]); - if (dmpsRouter.OutputAudioRouteNameFeedbacks[ioSlot] != null) - dmpsRouter.OutputAudioRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentAudioInputNames + ioSlot]); - if (dmpsRouter.OutputEndpointOnlineFeedbacks[ioSlot] != null) - dmpsRouter.OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]); - } - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/DspControllerBridge.cs b/PepperDashEssentials/Bridges/DspControllerBridge.cs deleted file mode 100644 index 9dd018fb..00000000 --- a/PepperDashEssentials/Bridges/DspControllerBridge.cs +++ /dev/null @@ -1,120 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Devices.Common; - -namespace PepperDash.Essentials.Bridges -{ - public static class SamsungDisplayControllerApiExtensions - { - public static void LinkToApi(this PepperDash.Essentials.Core.TwoWayDisplayBase displayDevice, BasicTriList trilist, uint joinStart, string joinMapKey) - { - var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DisplayControllerJoinMap; - - if (joinMap == null) - { - joinMap = new DisplayControllerJoinMap(); - } - - joinMap.OffsetJoinNumbers(joinStart); - Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - Debug.Console(0, "Linking to lighting Type {0}", displayDevice.GetType().Name.ToString()); - - var commMonitor = displayDevice as ICommunicationMonitor; - commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]); - - - // Poewer Off - trilist.SetSigTrueAction(joinMap.PowerOff, () => displayDevice.PowerOff()); - displayDevice.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff]); - - // Poewer On - trilist.SetSigTrueAction(joinMap.PowerOn, () => displayDevice.PowerOn()); - displayDevice.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn]); - - // GenericLighitng Actions & FeedBack - - // int sceneIndex = 1; - /* - foreach (var scene in displayDevice.LightingScenes) - { - var tempIndex = sceneIndex - 1; - //trilist.SetSigTrueAction((uint)(joinMap.LightingSceneOffset + sceneIndex), () => displayDevice.SelectScene(displayDevice.LightingScenes[tempIndex])); - scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)]); - trilist.StringInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)].StringValue = scene.Name; - trilist.BooleanInput[(uint)(joinMap.ButtonVisibilityOffset + sceneIndex)].BoolValue = true; - sceneIndex++; - } - - if (displayDevice.GetType().Name.ToString() == "LutronQuantumArea") - { - var lutronDevice = displayDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea; - lutronDevice.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]); - trilist.SetStringSigAction(joinMap.IntegrationIdSet, s => lutronDevice.IntegrationId = s); - } - */ - //ApiEisc.Eisc.SetStringSigAction(ApiMap.integrationID, (s) => { lutronLights.IntegrationId = s; }); - - - /* - var lutronLights = displayDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea; - - - for (uint i = 1; i <= lightingBase.CircuitCount; i++) - { - var circuit = i; - lightingBase.CircuitNameFeedbacks[circuit - 1].LinkInputSig(trilist.StringInput[joinMap.CircuitNames + circuit]); - lightingBase.CircuitIsCritical[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitIsCritical + circuit]); - lightingBase.CircuitState[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitState + circuit]); - trilist.SetSigTrueAction(joinMap.CircuitCycle + circuit, () => lightingBase.CycleCircuit(circuit - 1)); - trilist.SetSigTrueAction(joinMap.CircuitOnCmd + circuit, () => lightingBase.TurnOnCircuit(circuit - 1)); - trilist.SetSigTrueAction(joinMap.CircuitOffCmd + circuit, () => lightingBase.TurnOffCircuit(circuit - 1)); - - } - */ - } - } - public class DisplayControllerJoinMap : JoinMapBase - { - public uint IsOnline { get; set; } - public uint PowerOff { get; set; } - public uint PowerOn { get; set; } - public uint SelectScene { get; set; } - public uint LightingSceneOffset { get; set; } - public uint ButtonVisibilityOffset { get; set; } - public uint IntegrationIdSet { get; set; } - - public DisplayControllerJoinMap() - { - // Digital - IsOnline = 1; - PowerOff = 1; - PowerOn = 2; - SelectScene = 1; - IntegrationIdSet = 1; - LightingSceneOffset = 10; - ButtonVisibilityOffset = 40; - // Analog - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - IsOnline = IsOnline + joinOffset; - PowerOff = PowerOff + joinOffset; - PowerOn = PowerOn + joinOffset; - SelectScene = SelectScene + joinOffset; - LightingSceneOffset = LightingSceneOffset + joinOffset; - ButtonVisibilityOffset = ButtonVisibilityOffset + joinOffset; - - - - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/EiscBridge.cs b/PepperDashEssentials/Bridges/EiscBridge.cs deleted file mode 100644 index 21a220ef..00000000 --- a/PepperDashEssentials/Bridges/EiscBridge.cs +++ /dev/null @@ -1,196 +0,0 @@ -using System; -using System.Collections.Generic; -using Crestron.SimplSharp.Reflection; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.EthernetCommunication; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Bridges; -using PepperDash.Essentials.Core.Config; - -namespace PepperDash.Essentials.Bridges -{ - [Obsolete("Please use 'eiscapiadvanced' in configurations going forward")] - public class EiscApi : BridgeApi - { - public EiscApiPropertiesConfig PropertiesConfig { get; private set; } - - public ThreeSeriesTcpIpEthernetIntersystemCommunications Eisc { get; private set; } - - public EiscApi(DeviceConfig dc) : - base(dc.Key) - { - PropertiesConfig = dc.Properties.ToObject(); - //PropertiesConfig = JsonConvert.DeserializeObject(dc.Properties.ToString()); - - Eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(PropertiesConfig.Control.IpIdInt, PropertiesConfig.Control.TcpSshProperties.Address, Global.ControlSystem); - - Eisc.SigChange += Eisc_SigChange; - - AddPostActivationAction(() => - { - Debug.Console(1, this, "Linking Devices..."); - - foreach (var d in PropertiesConfig.Devices) - { - var device = DeviceManager.GetDeviceForKey(d.DeviceKey); - - if (device == null) continue; - - Debug.Console(1, this, "Linking Device: '{0}'", device.Key); - if (typeof(IBridge).IsAssignableFrom(device.GetType().GetCType())) // Check for this first to allow bridges in plugins to override existing bridges that apply to the same type. - { - Debug.Console(2, this, "'{0}' is IBridge", device.Key); - - var dev = device as IBridge; - - if (dev == null) - { - Debug.Console(0, this, Debug.ErrorLogLevel.Error, "Cast to IBridge failed for {0}"); - continue; - } - - dev.LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); - } - if (!typeof(IBridgeAdvanced).IsAssignableFrom(device.GetType().GetCType())) continue; - Debug.Console(2, this, "'{0}' is IBridgeAdvanced", device.Key); - - var advDev = device as IBridgeAdvanced; - - if (advDev == null) - { - Debug.Console(0, this, Debug.ErrorLogLevel.Error, "Cast to IBridgeAdvanced failed for {0}"); - continue; - } - - try - { - advDev.LinkToApi(Eisc, d.JoinStart, d.JoinMapKey, null); - } - catch (NullReferenceException) - { - Debug.ConsoleWithLog(0, this, - "Please update the bridge config to use EiscBridgeAdvanced with this device: {0}", device.Key); - } - } - Debug.Console(1, this, "Devices Linked."); - - var registerResult = Eisc.Register(); - - if (registerResult != eDeviceRegistrationUnRegistrationResponse.Success) - { - Debug.Console(2, this, Debug.ErrorLogLevel.Error, "Registration result: {0}", registerResult); - return; - } - - Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "EISC registration successful"); - }); - } - - /// - /// Used for debugging to trigger an action based on a join number and type - /// - /// - /// - /// - public void ExecuteJoinAction(uint join, string type, object state) - { - try - { - switch (type.ToLower()) - { - case "digital": - { - var uo = Eisc.BooleanOutput[join].UserObject as Action; - if (uo != null) - { - Debug.Console(1, this, "Executing Action: {0}", uo.ToString()); - uo(Convert.ToBoolean(state)); - } - else - Debug.Console(1, this, "User Action is null. Nothing to Execute"); - break; - } - case "analog": - { - var uo = Eisc.BooleanOutput[join].UserObject as Action; - if (uo != null) - { - Debug.Console(1, this, "Executing Action: {0}", uo.ToString()); - uo(Convert.ToUInt16(state)); - } - else - Debug.Console(1, this, "User Action is null. Nothing to Execute"); break; - } - case "serial": - { - var uo = Eisc.BooleanOutput[join].UserObject as Action; - if (uo != null) - { - Debug.Console(1, this, "Executing Action: {0}", uo.ToString()); - uo(Convert.ToString(state)); - } - else - Debug.Console(1, this, "User Action is null. Nothing to Execute"); - break; - } - default: - { - Debug.Console(1, "Unknown join type. Use digital/serial/analog"); - break; - } - } - } - catch (Exception e) - { - Debug.Console(1, this, "Error: {0}", e); - } - - } - - /// - /// Handles incoming sig changes - /// - /// - /// - void Eisc_SigChange(object currentDevice, SigEventArgs args) - { - try - { - if (Debug.Level >= 1) - Debug.Console(2, this, "EiscApi change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue); - var uo = args.Sig.UserObject; - - if (uo == null) return; - - Debug.Console(2, this, "Executing Action: {0}", uo.ToString()); - if (uo is Action) - (uo as Action)(args.Sig.BoolValue); - else if (uo is Action) - (uo as Action)(args.Sig.UShortValue); - else if (uo is Action) - (uo as Action)(args.Sig.StringValue); - } - catch (Exception e) - { - Debug.Console(2, this, "Error in Eisc_SigChange handler: {0}", e); - } - } - } - - public class EiscApiFactory : EssentialsDeviceFactory - { - public EiscApiFactory() - { - TypeNames = new List() { "eiscapi" }; - } - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - Debug.Console(1, "Factory Attempting to create new EiscApi Device"); - - return new EiscApi(dc); - } - } - -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/EssentialComms.cs b/PepperDashEssentials/Bridges/EssentialComms.cs deleted file mode 100644 index 461715fc..00000000 --- a/PepperDashEssentials/Bridges/EssentialComms.cs +++ /dev/null @@ -1,144 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; -using PepperDash.Core; -using PepperDash.Essentials.Core.Routing; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.EthernetCommunication; -using Crestron.SimplSharpPro.CrestronThread; - -namespace PepperDash.Essentials { - public class EssentialCommConfig { - public string[] EiscApiIpids; - public EssentialCommCommConnectionConfigs[] CommConnections; - } - public class EssentialCommCommConnectionConfigs { - public uint joinNumber {get; set; } - public EssentialsControlPropertiesConfig control { get; set; } - } - - public class EssentialCommsPort { - public IBasicCommunication Comm; - public IntFeedback StatusFeedback; - public BoolFeedback ConnectedFeedback; - public List Outputs = new List(); - public String RxBuffer; - public EssentialCommsPort(EssentialsControlPropertiesConfig config, string keyPrefix) { - Comm = CommFactory.CreateCommForConfig(config, keyPrefix); - // var PortGather = new CommunicationGather(Comm, config.EndOfLineChar); - Comm.TextReceived += new EventHandler(Communication_TextReceived); - - var socket = Comm as ISocketStatus; - StatusFeedback = new IntFeedback(() => { return (int)socket.ClientStatus; }); - ConnectedFeedback = new BoolFeedback(() => { return Comm.IsConnected; }); - - if (socket != null) { - socket.ConnectionChange += new EventHandler(socket_ConnectionChange); - } else { - } - - } - void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e) { - StatusFeedback.FireUpdate(); - ConnectedFeedback.FireUpdate(); - if (e.Client.IsConnected) { - // Tasks on connect - } else { - // Cleanup items from this session - } - } - void Communication_TextReceived(object sender, GenericCommMethodReceiveTextArgs args) { - try { - foreach (var Output in Outputs) { - Output.Api.Eisc.StringInput[Output.Join].StringValue = args.Text; - } - - } - catch (Exception) { - throw new FormatException(string.Format("ERROR:{0}")); - } - } - } - - public class EssentialComm : Device { - public EssentialCommConfig Properties; - - public CommunicationGather PortGather { get; private set; } - public List Apis {get; set;} - public Dictionary CommFeedbacks {get; private set; } - public StatusMonitorBase CommunicationMonitor { get; private set; } - public Dictionary CommDictionary { get; private set; } - - public EssentialComm(string key, string name, JToken properties) : base(key, name) { - Properties = JsonConvert.DeserializeObject(properties.ToString()); - CommFeedbacks = new Dictionary(); - CommDictionary = new Dictionary(); - Apis = new List(); - int commNumber = 1; - foreach (var commConfig in Properties.CommConnections) { - var commPort = new EssentialCommsPort(commConfig.control, string.Format("{0}-{1}", this.Key, commConfig.joinNumber)); - CommDictionary.Add(commConfig.joinNumber, commPort); - - commNumber++; - } - - foreach (var Ipid in Properties.EiscApiIpids) { - var ApiEisc = new BridgeApiEisc(Ipid); - Apis.Add(ApiEisc); - foreach (var commConnection in CommDictionary) { - Debug.Console(2, "Joining Api{0} to comm {1}", Ipid, commConnection.Key); - var tempComm = commConnection.Value; - var tempJoin = (uint)commConnection.Key; - EssentialComApiMap ApiMap = new EssentialComApiMap(ApiEisc, (uint)tempJoin); - - tempComm.Outputs.Add(ApiMap); - // Check for ApiMap Overide Values here - - ApiEisc.Eisc.SetBoolSigAction(tempJoin, b => {if (b) { tempComm.Comm.Connect(); } else { tempComm.Comm.Disconnect(); }}); - ApiEisc.Eisc.SetStringSigAction(tempJoin, s => tempComm.Comm.SendText(s)); - - tempComm.StatusFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[tempJoin]); - tempComm.ConnectedFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[tempJoin]); - - - - } - ApiEisc.Eisc.Register(); - } - } - - - - public override bool CustomActivate() - { - try { - - - - Debug.Console(2, "Name {0} Activated", this.Name); - return true; - } - catch (Exception e) { - Debug.Console(0, "Bridge {0}", e); - return false; - } - } - - - } - public class EssentialComApiMap { - public uint Join; - public BridgeApiEisc Api; - public uint connectJoin; - public EssentialComApiMap(BridgeApiEisc api, uint join) { - Join = join; - Api = api; - } - } - } \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/EssentialDM.cs b/PepperDashEssentials/Bridges/EssentialDM.cs deleted file mode 100644 index f03f174b..00000000 --- a/PepperDashEssentials/Bridges/EssentialDM.cs +++ /dev/null @@ -1,150 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; -using PepperDash.Essentials.DM; -using PepperDash.Core; -using PepperDash.Essentials.Core.Routing; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.EthernetCommunication; -using Crestron.SimplSharpPro.DM; - -namespace PepperDash.Essentials { - public class EssentialDM : PepperDash.Core.Device { - public EssentialDMProperties Properties; - public List BridgeApiEiscs; - private PepperDash.Essentials.DM.DmChassisController DmSwitch; - private EssentialDMApiMap ApiMap = new EssentialDMApiMap(); - public EssentialDM(string key, string name, JToken properties) - : base(key, name) { - Properties = JsonConvert.DeserializeObject(properties.ToString()); - - - } - public override bool CustomActivate() { - // Create EiscApis - try { - foreach (var device in DeviceManager.AllDevices) { - if (device.Key == this.Properties.connectionDeviceKey) { - Debug.Console(2, "deviceKey {0} Matches", device.Key); - DmSwitch = DeviceManager.GetDeviceForKey(device.Key) as PepperDash.Essentials.DM.DmChassisController; - - } - - - else { - Debug.Console(2, "deviceKey {0} doesn't match", device.Key); - } - } - if (Properties.EiscApiIpids != null) { - - - foreach (string Ipid in Properties.EiscApiIpids) { - var ApiEisc = new BridgeApiEisc(Ipid); - for (uint x = 1; x <= DmSwitch.Chassis.NumberOfInputs;x++ ) { - uint tempX = x; - Debug.Console(2, "Creating EiscActions {0}", tempX); - - - 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)); - - - if (DmSwitch.TxDictionary.ContainsKey(tempX)) { - Debug.Console(2, "Creating Tx Feedbacks {0}", tempX); - var TxKey = DmSwitch.TxDictionary[tempX]; - var TxDevice = DeviceManager.GetDeviceForKey(TxKey) as DmTxControllerBase; - TxDevice.IsOnline.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.TxOnlineStatus[tempX]]); - TxDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.TxVideoSyncStatus[tempX]]); - ApiEisc.Eisc.SetUShortSigAction((ApiMap.HdcpSupport[tempX]), u => TxDevice.SetHdcpSupportAll((ePdtHdcpSupport)(u))); - TxDevice.HdcpSupportAllFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.HdcpSupport[tempX]]); - ApiEisc.Eisc.UShortInput[ApiMap.HdcpSupportCapability[tempX]].UShortValue = TxDevice.HdcpSupportCapability; - } - else { - DmSwitch.VideoInputSyncFeedbacks[tempX].LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.TxVideoSyncStatus[tempX]]); - } - if (DmSwitch.RxDictionary.ContainsKey(tempX)) { - Debug.Console(2, "Creating Rx Feedbacks {0}", tempX); - var RxKey = DmSwitch.RxDictionary[tempX]; - var RxDevice = DeviceManager.GetDeviceForKey(RxKey) as DmRmcControllerBase; - RxDevice.IsOnline.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.RxOnlineStatus[tempX]]); - } - // DmSwitch.InputEndpointOnlineFeedbacks[(ushort)tempOutputNum].LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.OutputVideoRoutes[tempOutputNum]]); - DmSwitch.VideoOutputFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.OutputVideoRoutes[tempX]]); - DmSwitch.AudioOutputFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.OutputAudioRoutes[tempX]]); - DmSwitch.InputNameFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.StringInput[ApiMap.InputNames[tempX]]); - DmSwitch.OutputNameFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.StringInput[ApiMap.OutputNames[tempX]]); - DmSwitch.OutputRouteNameFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.StringInput[ApiMap.OutputRouteNames[tempX]]); - } - DmSwitch.IsOnline.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.ChassisOnline]); - ApiEisc.Eisc.Register(); - } - } - - - - Debug.Console(2, "Name {0} Activated", this.Name); - return true; - } - catch (Exception e) { - Debug.Console(2, "BRidge {0}", e); - return false; - } - } - } - public class EssentialDMProperties { - public string connectionDeviceKey; - public string[] EiscApiIpids; - - - } - - - public class EssentialDMApiMap { - public ushort ChassisOnline = 11; - public Dictionary OutputVideoRoutes; - public Dictionary OutputAudioRoutes; - public Dictionary TxOnlineStatus; - public Dictionary RxOnlineStatus; - public Dictionary TxVideoSyncStatus; - public Dictionary InputNames; - public Dictionary OutputNames; - public Dictionary OutputRouteNames; - public Dictionary HdcpSupport; - public Dictionary HdcpSupportCapability; - - public EssentialDMApiMap() { - OutputVideoRoutes = new Dictionary(); - OutputAudioRoutes = new Dictionary(); - TxOnlineStatus = new Dictionary(); - RxOnlineStatus = new Dictionary(); - TxVideoSyncStatus = new Dictionary(); - InputNames = new Dictionary(); - OutputNames = new Dictionary(); - OutputRouteNames = new Dictionary(); - HdcpSupport = new Dictionary(); - HdcpSupportCapability = new Dictionary(); - - for (uint x = 1; x <= 200; x++) { - // Debug.Console(0, "Init Value {0}", x); - uint tempNum = x; - HdcpSupportCapability[tempNum] = (ushort)(tempNum + 1200); - HdcpSupport[tempNum] = (ushort)(tempNum + 1000); - OutputVideoRoutes[tempNum] = (ushort)(tempNum + 100); - OutputAudioRoutes[tempNum] = (ushort)(tempNum + 300); - TxOnlineStatus[tempNum] = (ushort)(tempNum + 500); - RxOnlineStatus[tempNum] = (ushort)(tempNum + 700); - TxVideoSyncStatus[tempNum] = (ushort)(tempNum + 100); - InputNames[tempNum] = (ushort)(tempNum + 100); - OutputNames[tempNum] = (ushort)(tempNum + 300); - OutputRouteNames[tempNum] = (ushort)(tempNum + 2000); - } - } - } - } - \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/EssentialDsp.cs b/PepperDashEssentials/Bridges/EssentialDsp.cs deleted file mode 100644 index d8aed442..00000000 --- a/PepperDashEssentials/Bridges/EssentialDsp.cs +++ /dev/null @@ -1,217 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; -using PepperDash.Essentials.DM; -using PepperDash.Core; -using PepperDash.Essentials.Core.Routing; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.EthernetCommunication; -using Crestron.SimplSharpPro.DM; - -namespace PepperDash.Essentials { - public class EssentialDsp : PepperDash.Core.Device { - public EssentialDspProperties Properties; - public List BridgeApiEiscs; - private PepperDash.Essentials.Devices.Common.DSP.QscDsp Dsp; - private EssentialDspApiMap ApiMap = new EssentialDspApiMap(); - public EssentialDsp(string key, string name, JToken properties) - : base(key, name) { - Properties = JsonConvert.DeserializeObject(properties.ToString()); - - - } - public override bool CustomActivate() { - // Create EiscApis - - try - { - ICommunicationMonitor comm = null; - foreach (var device in DeviceManager.AllDevices) - { - if (device.Key == this.Properties.connectionDeviceKey) - { - if (!(device is ICommunicationMonitor)) - { - comm = device as ICommunicationMonitor; - } - Debug.Console(2, "deviceKey {0} Matches", device.Key); - Dsp = DeviceManager.GetDeviceForKey(device.Key) as PepperDash.Essentials.Devices.Common.DSP.QscDsp; - break; - } - else - { - Debug.Console(2, "deviceKey {0} doesn't match", device.Key); - - } - } - if (Properties.EiscApiIpids != null && Dsp != null) - { - foreach (string Ipid in Properties.EiscApiIpids) - { - var ApiEisc = new BridgeApiEisc(Ipid); - Debug.Console(2, "Connecting EiscApi {0} to {1}", ApiEisc.Ipid, Dsp.Name); - ushort x = 1; - if (comm != null) - { - comm.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.Online]); - } - foreach (var channel in Dsp.LevelControlPoints) - { - //var QscChannel = channel.Value as PepperDash.Essentials.Devices.Common.DSP.QscDspLevelControl; - Debug.Console(2, "QscChannel {0} connect", x); - - var genericChannel = channel.Value as IBasicVolumeWithFeedback; - if (channel.Value.Enabled) - { - ApiEisc.Eisc.StringInput[ApiMap.channelName[x]].StringValue = channel.Value.LevelCustomName; - ApiEisc.Eisc.UShortInput[ApiMap.channelType[x]].UShortValue = (ushort)channel.Value.Type; - - genericChannel.MuteFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.channelMuteToggle[x]]); - genericChannel.VolumeLevelFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.channelVolume[x]]); - - ApiEisc.Eisc.SetSigTrueAction(ApiMap.channelMuteToggle[x], () => genericChannel.MuteToggle()); - ApiEisc.Eisc.SetSigTrueAction(ApiMap.channelMuteOn[x], () => genericChannel.MuteOn()); - ApiEisc.Eisc.SetSigTrueAction(ApiMap.channelMuteOff[x], () => genericChannel.MuteOff()); - - ApiEisc.Eisc.SetBoolSigAction(ApiMap.channelVolumeUp[x], b => genericChannel.VolumeUp(b)); - ApiEisc.Eisc.SetBoolSigAction(ApiMap.channelVolumeDown[x], b => genericChannel.VolumeDown(b)); - - ApiEisc.Eisc.SetUShortSigAction(ApiMap.channelVolume[x], u => genericChannel.SetVolume(u)); - ApiEisc.Eisc.SetStringSigAction(ApiMap.presetString, s => Dsp.RunPreset(s)); - } - x++; - - } - x = 1; - foreach (var preset in Dsp.PresetList) - { - ApiEisc.Eisc.StringInput[ApiMap.presets[x]].StringValue = preset.label; - ApiEisc.Eisc.SetSigTrueAction(ApiMap.presets[x], () => Dsp.RunPresetNumber(x)); - x++; - } - 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.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.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.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.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.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.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.KeypadBackspace, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Backspace)); - - ApiEisc.Eisc.SetSigTrueAction(ApiMap.Dial, () => dialer.Value.Dial()); - ApiEisc.Eisc.SetSigTrueAction(ApiMap.DoNotDisturbToggle, () => dialer.Value.DoNotDisturbToggle()); - ApiEisc.Eisc.SetSigTrueAction(ApiMap.DoNotDisturbOn, () => dialer.Value.DoNotDisturbOn()); - ApiEisc.Eisc.SetSigTrueAction(ApiMap.DoNotDisturbOff, () => dialer.Value.DoNotDisturbOff()); - ApiEisc.Eisc.SetSigTrueAction(ApiMap.AutoAnswerToggle, () => dialer.Value.AutoAnswerToggle()); - ApiEisc.Eisc.SetSigTrueAction(ApiMap.AutoAnswerOn, () => dialer.Value.AutoAnswerOn()); - 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.DoNotDisturbOn]); - 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.AutoAnswerOn]); - dialer.Value.AutoAnswerFeedback.LinkComplementInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.AutoAnswerOff]); - - dialer.Value.OffHookFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.Dial]); - dialer.Value.DialStringFeedback.LinkInputSig(ApiEisc.Eisc.StringInput[ApiMap.DialString]); - } - } - } - - - - - Debug.Console(2, "Name {0} Activated", this.Name); - return true; - } - catch (Exception e) { - Debug.Console(0, "Bridge {0}", e); - return false; - } - } - } - public class EssentialDspProperties { - public string connectionDeviceKey; - public string[] EiscApiIpids; - - - } - - - public class EssentialDspApiMap { - public ushort Online = 1; - public ushort presetString = 2000; - public Dictionary channelMuteToggle; - public Dictionary channelMuteOn; - public Dictionary channelMuteOff; - public Dictionary channelVolume; - public Dictionary channelType; - public Dictionary channelName; - public Dictionary channelVolumeUp; - public Dictionary channelVolumeDown; - public Dictionary presets; - public ushort DialString = 3100; - public ushort Keypad0 = 3110; - public ushort Keypad1 = 3111; - public ushort Keypad2 = 3112; - public ushort Keypad3 = 3113; - public ushort Keypad4 = 3114; - public ushort Keypad5 = 3115; - public ushort Keypad6 = 3116; - public ushort Keypad7 = 3117; - public ushort Keypad8 = 3118; - public ushort Keypad9 = 3119; - public ushort KeypadStar = 3120; - public ushort KeypadPound = 3121; - public ushort KeypadClear = 3122; - public ushort KeypadBackspace = 3123; - public ushort Dial = 3124; - public ushort DoNotDisturbToggle = 3132; - public ushort DoNotDisturbOn = 3133; - public ushort DoNotDisturbOff = 3134; - public ushort AutoAnswerToggle = 3127; - public ushort AutoAnswerOn = 3125; - public ushort AutoAnswerOff = 3126; - - public EssentialDspApiMap() { - channelMuteToggle = new Dictionary(); - channelMuteOn = new Dictionary(); - channelMuteOff = new Dictionary(); - channelVolume = new Dictionary(); - channelName = new Dictionary(); - channelType = new Dictionary(); - presets = new Dictionary(); - channelVolumeUp = new Dictionary(); - channelVolumeDown = new Dictionary(); - for (uint x = 1; x <= 100; x++) { - uint tempNum = x; - presets[tempNum] = (ushort)(tempNum + 100); - channelMuteToggle[tempNum] = (ushort)(tempNum + 400); - channelMuteOn[tempNum] = (ushort)(tempNum + 600); - channelMuteOff[tempNum] = (ushort)(tempNum + 800); - channelVolume[tempNum] = (ushort)(tempNum + 200); - channelName[tempNum] = (ushort)(tempNum + 200); - channelType[tempNum] = (ushort)(tempNum + 400); - channelVolumeUp[tempNum] = (ushort)(tempNum + 1000); - channelVolumeDown[tempNum] = (ushort)(tempNum + 1200); - } - } - } - } - \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/EssentialTVOne.cs b/PepperDashEssentials/Bridges/EssentialTVOne.cs deleted file mode 100644 index 12fb0c49..00000000 --- a/PepperDashEssentials/Bridges/EssentialTVOne.cs +++ /dev/null @@ -1,98 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; -using PepperDash.Essentials.DM; -using PepperDash.Core; -using PepperDash.Essentials.Core.Routing; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.EthernetCommunication; -using Crestron.SimplSharpPro.DM; - -namespace PepperDash.Essentials -{ - public class EssentialsTVOne : PepperDash.Core.Device - { - public EssentialTVOneProperties Properties; - public List BridgeApiEiscs; - private PepperDash.Essentials.Devices.Common.TVOneCorio TVOneCorio; - private EssentialsTVOneApiMap ApiMap = new EssentialsTVOneApiMap(); - public EssentialsTVOne(string key, string name, JToken properties) - : base(key, name) - { - Properties = JsonConvert.DeserializeObject(properties.ToString()); - - - } - public override bool CustomActivate() { - // Create EiscApis - try - { - foreach (var device in DeviceManager.AllDevices) - { - if (device.Key == this.Properties.connectionDeviceKey) - { - Debug.Console(2, "deviceKey {0} Matches", device.Key); - TVOneCorio = DeviceManager.GetDeviceForKey(device.Key) as PepperDash.Essentials.Devices.Common.TVOneCorio; - break; - } - else - { - Debug.Console(2, "deviceKey {0} doesn't match", device.Key); - - } - } - if (Properties.EiscApiIpids != null && TVOneCorio != null) - { - foreach (string Ipid in Properties.EiscApiIpids) - { - var ApiEisc = new BridgeApiEisc(Ipid); - Debug.Console(2, "Connecting EiscApi {0} to {1}", ApiEisc.Ipid, TVOneCorio.Name); - ushort x = 1; - TVOneCorio.OnlineFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.Online]); - ApiEisc.Eisc.SetUShortSigAction(ApiMap.CallPreset, u => TVOneCorio.CallPreset(u)); - TVOneCorio.PresetFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.PresetFeedback]); - - } - } - - - - - Debug.Console(2, "Name {0} Activated", this.Name); - return true; - } - catch (Exception e) { - Debug.Console(0, "Bridge {0}", e); - return false; - } - } - } - public class EssentialTVOneProperties - { - public string connectionDeviceKey; - public string[] EiscApiIpids; - - - } - - - public class EssentialsTVOneApiMap - { - public ushort CallPreset = 1; - public ushort PresetFeedback = 1; - public ushort Online = 1; - - public EssentialsTVOneApiMap() - { - - - } - - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/GenericLightingBridge.cs b/PepperDashEssentials/Bridges/GenericLightingBridge.cs deleted file mode 100644 index 5365b813..00000000 --- a/PepperDashEssentials/Bridges/GenericLightingBridge.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Devices.Common; - -using Newtonsoft.Json; - -namespace PepperDash.Essentials.Core.Bridges -{ - public static class GenericLightingApiExtensions - { - public static void LinkToApi(this PepperDash.Essentials.Core.Lighting.LightingBase lightingDevice, BasicTriList trilist, uint joinStart, string joinMapKey) - { - GenericLightingJoinMap joinMap = new GenericLightingJoinMap(); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - joinMap.OffsetJoinNumbers(joinStart); - - Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - - Debug.Console(0, "Linking to Lighting Type {0}", lightingDevice.GetType().Name.ToString()); - - // GenericLighitng Actions & FeedBack - trilist.SetUShortSigAction(joinMap.SelectScene, u => lightingDevice.SelectScene(lightingDevice.LightingScenes[u])); - - int sceneIndex = 1; - foreach (var scene in lightingDevice.LightingScenes) - { - var tempIndex = sceneIndex - 1; - trilist.SetSigTrueAction((uint)(joinMap.LightingSceneOffset + sceneIndex), () => lightingDevice.SelectScene(lightingDevice.LightingScenes[tempIndex])); - scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)]); - trilist.StringInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)].StringValue = scene.Name; - trilist.BooleanInput[(uint)(joinMap.ButtonVisibilityOffset + sceneIndex)].BoolValue = true; - sceneIndex++; - } - - if (lightingDevice.GetType().Name.ToString() == "LutronQuantumArea") - { - var lutronDevice = lightingDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea; - lutronDevice.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]); - trilist.SetStringSigAction(joinMap.IntegrationIdSet, s => lutronDevice.IntegrationId = s); - } - - //ApiEisc.Eisc.SetStringSigAction(ApiMap.integrationID, (s) => { lutronLights.IntegrationId = s; }); - - - /* - var lutronLights = lightingDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea; - - - for (uint i = 1; i <= lightingBase.CircuitCount; i++) - { - var circuit = i; - lightingBase.CircuitNameFeedbacks[circuit - 1].LinkInputSig(trilist.StringInput[joinMap.CircuitNames + circuit]); - lightingBase.CircuitIsCritical[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitIsCritical + circuit]); - lightingBase.CircuitState[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitState + circuit]); - trilist.SetSigTrueAction(joinMap.CircuitCycle + circuit, () => lightingBase.CycleCircuit(circuit - 1)); - trilist.SetSigTrueAction(joinMap.CircuitOnCmd + circuit, () => lightingBase.TurnOnCircuit(circuit - 1)); - trilist.SetSigTrueAction(joinMap.CircuitOffCmd + circuit, () => lightingBase.TurnOffCircuit(circuit - 1)); - - } - */ - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/GenericRelayDeviceBridge.cs b/PepperDashEssentials/Bridges/GenericRelayDeviceBridge.cs deleted file mode 100644 index 8175f115..00000000 --- a/PepperDashEssentials/Bridges/GenericRelayDeviceBridge.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.CrestronIO; - -using Newtonsoft.Json; - -namespace PepperDash.Essentials.Core.Bridges -{ - public static class GenericRelayDeviceApiExtensions - { - public static void LinkToApi(this GenericRelayDevice relay, BasicTriList trilist, uint joinStart, string joinMapKey) - { - GenericRelayControllerJoinMap joinMap = new GenericRelayControllerJoinMap(); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - joinMap.OffsetJoinNumbers(joinStart); - - if (relay.RelayOutput == null) - { - Debug.Console(1, relay, "Unable to link device '{0}'. Relay is null", relay.Key); - return; - } - - Debug.Console(1, relay, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - - trilist.SetBoolSigAction(joinMap.Relay, new Action(b => - { - if (b) - relay.CloseRelay(); - else - relay.OpenRelay(); - })); - - // feedback for relay state - - relay.OutputIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Relay]); - } - - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/GlsOccupancySensorBaseControllerBridge.cs b/PepperDashEssentials/Bridges/GlsOccupancySensorBaseControllerBridge.cs deleted file mode 100644 index b073750c..00000000 --- a/PepperDashEssentials/Bridges/GlsOccupancySensorBaseControllerBridge.cs +++ /dev/null @@ -1,125 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Essentials.Devices.Common.Occupancy; - -using PepperDash.Essentials.Core; -using PepperDash.Core; - -using Newtonsoft.Json; - -namespace PepperDash.Essentials.Core.Bridges -{ - public static class GlsOccupancySensorBaseControllerApiExtensions - { - public static void LinkToApi(this GlsOccupancySensorBaseController occController, BasicTriList trilist, uint joinStart, string joinMapKey) - { - GlsOccupancySensorBaseJoinMap joinMap = new GlsOccupancySensorBaseJoinMap(); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - joinMap.OffsetJoinNumbers(joinStart); - - Debug.Console(1, occController, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - - #region Single and Dual Sensor Stuff - occController.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]); - trilist.StringInput[joinMap.Name].StringValue = occController.Name; - - trilist.OnlineStatusChange += new Crestron.SimplSharpPro.OnlineStatusChangeEventHandler((d, args) => - { - if (args.DeviceOnLine) - { - trilist.StringInput[joinMap.Name].StringValue = occController.Name; - } - } - ); - - // Occupied status - trilist.SetSigTrueAction(joinMap.ForceOccupied, new Action(() => occController.ForceOccupied())); - trilist.SetSigTrueAction(joinMap.ForceVacant, new Action(() => occController.ForceVacant())); - occController.RoomIsOccupiedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RoomOccupiedFeedback]); - occController.RoomIsOccupiedFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.RoomVacantFeedback]); - occController.RawOccupancyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyFeedback]); - trilist.SetBoolSigAction(joinMap.EnableRawStates, new Action((b) => occController.EnableRawStates(b))); - - // Timouts - trilist.SetUShortSigAction(joinMap.Timeout, new Action((u) => occController.SetRemoteTimeout(u))); - occController.CurrentTimeoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.Timeout]); - occController.LocalTimoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeoutLocalFeedback]); - - // LED Flash - trilist.SetSigTrueAction(joinMap.EnableLedFlash, new Action(() => occController.SetLedFlashEnable(true))); - trilist.SetSigTrueAction(joinMap.DisableLedFlash, new Action(() => occController.SetLedFlashEnable(false))); - occController.LedFlashEnabledFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.EnableLedFlash]); - - // Short Timeout - trilist.SetSigTrueAction(joinMap.EnableShortTimeout, new Action(() => occController.SetShortTimeoutState(true))); - trilist.SetSigTrueAction(joinMap.DisableShortTimeout, new Action(() => occController.SetShortTimeoutState(false))); - occController.ShortTimeoutEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableShortTimeout]); - - // PIR Sensor - trilist.SetSigTrueAction(joinMap.EnablePir, new Action(() => occController.SetPirEnable(true))); - trilist.SetSigTrueAction(joinMap.DisablePir, new Action(() => occController.SetPirEnable(false))); - occController.PirSensorEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnablePir]); - - // PIR Sensitivity in Occupied State - trilist.SetBoolSigAction(joinMap.IncrementPirInOccupiedState, new Action((b) => occController.IncrementPirSensitivityInOccupiedState(b))); - trilist.SetBoolSigAction(joinMap.DecrementPirInOccupiedState, new Action((b) => occController.DecrementPirSensitivityInOccupiedState(b))); - occController.PirSensitivityInOccupiedStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.PirSensitivityInOccupiedState]); - - // PIR Sensitivity in Vacant State - trilist.SetBoolSigAction(joinMap.IncrementPirInVacantState, new Action((b) => occController.IncrementPirSensitivityInVacantState(b))); - trilist.SetBoolSigAction(joinMap.DecrementPirInVacantState, new Action((b) => occController.DecrementPirSensitivityInVacantState(b))); - occController.PirSensitivityInVacantStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.PirSensitivityInVacantState]); - #endregion - - #region Dual Technology Sensor Stuff - var odtOccController = occController as GlsOdtOccupancySensorController; - - if (odtOccController != null) - { - // OR When Vacated - trilist.SetBoolSigAction(joinMap.OrWhenVacated, new Action((b) => odtOccController.SetOrWhenVacatedState(b))); - odtOccController.OrWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.OrWhenVacated]); - - // AND When Vacated - trilist.SetBoolSigAction(joinMap.AndWhenVacated, new Action((b) => odtOccController.SetAndWhenVacatedState(b))); - odtOccController.AndWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AndWhenVacated]); - - // Ultrasonic A Sensor - trilist.SetSigTrueAction(joinMap.EnableUsA, new Action(() => odtOccController.SetUsAEnable(true))); - trilist.SetSigTrueAction(joinMap.DisableUsA, new Action(() => odtOccController.SetUsAEnable(false))); - odtOccController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsA]); - - // Ultrasonic B Sensor - trilist.SetSigTrueAction(joinMap.EnableUsB, new Action(() => odtOccController.SetUsBEnable(true))); - trilist.SetSigTrueAction(joinMap.DisableUsB, new Action(() => odtOccController.SetUsBEnable(false))); - odtOccController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsB]); - - // US Sensitivity in Occupied State - trilist.SetBoolSigAction(joinMap.IncrementUsInOccupiedState, new Action((b) => odtOccController.IncrementUsSensitivityInOccupiedState(b))); - trilist.SetBoolSigAction(joinMap.DecrementUsInOccupiedState, new Action((b) => odtOccController.DecrementUsSensitivityInOccupiedState(b))); - odtOccController.UltrasonicSensitivityInOccupiedStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.UsSensitivityInOccupiedState]); - - // US Sensitivity in Vacant State - trilist.SetBoolSigAction(joinMap.IncrementUsInVacantState, new Action((b) => odtOccController.IncrementUsSensitivityInVacantState(b))); - trilist.SetBoolSigAction(joinMap.DecrementUsInVacantState, new Action((b) => odtOccController.DecrementUsSensitivityInVacantState(b))); - odtOccController.UltrasonicSensitivityInVacantStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.UsSensitivityInVacantState]); - - //Sensor Raw States - odtOccController.RawOccupancyPirFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyPirFeedback]); - odtOccController.RawOccupancyUsFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyUsFeedback]); - - } - #endregion - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/HdMdxxxCEControllerBridge.cs b/PepperDashEssentials/Bridges/HdMdxxxCEControllerBridge.cs deleted file mode 100644 index bf6fdb54..00000000 --- a/PepperDashEssentials/Bridges/HdMdxxxCEControllerBridge.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.DM; -using Crestron.SimplSharpPro.DM.Endpoints; -using Crestron.SimplSharpPro.DM.Endpoints.Receivers; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.DM; - -using Newtonsoft.Json; - -namespace PepperDash.Essentials.Core.Bridges -{ - public static class HdMdxxxCEControllerApiExtensions - { - public static void LinkToApi(this HdMdxxxCEController hdMdPair, BasicTriList trilist, uint joinStart, string joinMapKey) - { - HdMdxxxCEControllerJoinMap joinMap = new HdMdxxxCEControllerJoinMap(); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - joinMap.OffsetJoinNumbers(joinStart); - - Debug.Console(1, hdMdPair, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - - hdMdPair.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]); - hdMdPair.RemoteEndDetectedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RemoteEndDetected]); - - trilist.SetSigTrueAction(joinMap.AutoRouteOn, new Action(() => hdMdPair.AutoRouteOn())); - hdMdPair.AutoRouteOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AutoRouteOn]); - trilist.SetSigTrueAction(joinMap.AutoRouteOff, new Action(() => hdMdPair.AutoRouteOff())); - hdMdPair.AutoRouteOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.AutoRouteOff]); - - trilist.SetSigTrueAction(joinMap.PriorityRoutingOn, new Action(() => hdMdPair.PriorityRouteOn())); - hdMdPair.PriorityRoutingOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PriorityRoutingOn]); - trilist.SetSigTrueAction(joinMap.PriorityRoutingOff, new Action(() => hdMdPair.PriorityRouteOff())); - hdMdPair.PriorityRoutingOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PriorityRoutingOff]); - - trilist.SetSigTrueAction(joinMap.InputOnScreenDisplayEnabled, new Action(() => hdMdPair.OnScreenDisplayEnable())); - hdMdPair.InputOnScreenDisplayEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.InputOnScreenDisplayEnabled]); - trilist.SetSigTrueAction(joinMap.AutoRouteOff, new Action(() => hdMdPair.OnScreenDisplayDisable())); - hdMdPair.InputOnScreenDisplayEnabledFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.InputOnScreenDisplayDisabled]); - - trilist.SetUShortSigAction(joinMap.VideoSource, new Action((i) => hdMdPair.ExecuteSwitch(i, null, eRoutingSignalType.Video | eRoutingSignalType.Audio))); - hdMdPair.VideoSourceFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoSource]); - - trilist.UShortInput[joinMap.SourceCount].UShortValue = (ushort)hdMdPair.InputPorts.Count; - - foreach (var input in hdMdPair.InputPorts) - { - var number = Convert.ToUInt16(input.Selector); - hdMdPair.SyncDetectedFeedbacks[number].LinkInputSig(trilist.BooleanInput[joinMap.SyncDetected + number]); - trilist.StringInput[joinMap.SourceNames + number].StringValue = input.Key; - } - - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/IBasicCommunicationBridge.cs b/PepperDashEssentials/Bridges/IBasicCommunicationBridge.cs deleted file mode 100644 index b23860d3..00000000 --- a/PepperDashEssentials/Bridges/IBasicCommunicationBridge.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Core; -using PepperDash.Essentials.Core; - -using Newtonsoft.Json; - -namespace PepperDash.Essentials.Core.Bridges -{ - public static class IBasicCommunicationApiExtensions - { - public static void LinkToApi(this GenericComm comm, BasicTriList trilist, uint joinStart, string joinMapKey) - { - IBasicCommunicationJoinMap joinMap = new IBasicCommunicationJoinMap(); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - joinMap.OffsetJoinNumbers(joinStart); - - if (comm.CommPort == null) - { - Debug.Console(1, comm, "Unable to link device '{0}'. CommPort is null", comm.Key); - return; - } - - Debug.Console(1, comm, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - - // this is a permanent event handler. This cannot be -= from event - comm.CommPort.TextReceived += (s, a) => - { - Debug.Console(2, comm, "RX: {0}", a.Text); - trilist.SetString(joinMap.TextReceived, a.Text); - }; - trilist.SetStringSigAction(joinMap.SendText, new Action(s => comm.CommPort.SendText(s))); - trilist.SetStringSigAction(joinMap.SetPortConfig, new Action(s => comm.SetPortConfig(s))); - - - var sComm = comm.CommPort as ISocketStatus; - if (sComm != null) - { - sComm.ConnectionChange += (s, a) => - { - trilist.SetUshort(joinMap.Status, (ushort)(a.Client.ClientStatus)); - trilist.SetBool(joinMap.Connected, a.Client.ClientStatus == - Crestron.SimplSharp.CrestronSockets.SocketStatus.SOCKET_STATUS_CONNECTED); - }; - - trilist.SetBoolSigAction(joinMap.Connect, new Action(b => - { - if (b) - { - sComm.Connect(); - } - else - { - sComm.Disconnect(); - } - })); - } - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/IBridge.cs b/PepperDashEssentials/Bridges/IBridge.cs deleted file mode 100644 index 497985c7..00000000 --- a/PepperDashEssentials/Bridges/IBridge.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using Crestron.SimplSharpPro.DeviceSupport; - -namespace PepperDash.Essentials.Bridges -{ - /// - /// Defines a device that uses the legacy JoinMapBase for its join map - /// - [Obsolete("IBridgeAdvanced should be used going forward with JoinMapBaseAdvanced")] - public interface IBridge - { - void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey); - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/IDigitalInputBridge.cs b/PepperDashEssentials/Bridges/IDigitalInputBridge.cs deleted file mode 100644 index 078e0b13..00000000 --- a/PepperDashEssentials/Bridges/IDigitalInputBridge.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.CrestronIO; - -using Newtonsoft.Json; - -namespace PepperDash.Essentials.Core.Bridges -{ - public static class IDigitalInputApiExtenstions - { - public static void LinkToApi(this IDigitalInput input, BasicTriList trilist, uint joinStart, string joinMapKey) - { - IDigitalInputJoinMap joinMap = new IDigitalInputJoinMap(); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - joinMap.OffsetJoinNumbers(joinStart); - - try - { - Debug.Console(1, input as Device, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - - // Link feedback for input state - input.InputStateFeedback.LinkInputSig(trilist.BooleanInput[joinMap.InputState]); - } - catch (Exception e) - { - Debug.Console(1, input as Device, "Unable to link device '{0}'. Input is null", (input as Device).Key); - Debug.Console(1, input as Device, "Error: {0}", e); - return; - } - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/IRSetTopBoxBaseBridge.cs b/PepperDashEssentials/Bridges/IRSetTopBoxBaseBridge.cs deleted file mode 100644 index 76e5b5ee..00000000 --- a/PepperDashEssentials/Bridges/IRSetTopBoxBaseBridge.cs +++ /dev/null @@ -1,128 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Devices.Common; - -using Newtonsoft.Json; - -namespace PepperDash.Essentials.Core.Bridges -{ - public static class IRSetTopBoxBaseApiExtensions - { - public static void LinkToApi(this PepperDash.Essentials.Devices.Common.IRSetTopBoxBase stbDevice, BasicTriList trilist, uint joinStart, string joinMapKey) - { - SetTopBoxControllerJoinMap joinMap = new SetTopBoxControllerJoinMap(); - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - joinMap.OffsetJoinNumbers(joinStart); - - Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - Debug.Console(0, "Linking to Display: {0}", stbDevice.Name); - - trilist.StringInput[joinMap.Name].StringValue = stbDevice.Name; - - var stbBase = stbDevice as ISetTopBoxControls; - if (stbBase != null) - { - trilist.BooleanInput[joinMap.HasDpad].BoolValue = stbBase.HasDpad; - trilist.BooleanInput[joinMap.HasNumeric].BoolValue = stbBase.HasNumeric; - trilist.BooleanInput[joinMap.HasDvr].BoolValue = stbBase.HasDvr; - trilist.BooleanInput[joinMap.HasPresets].BoolValue = stbBase.HasPresets; - - trilist.SetBoolSigAction(joinMap.DvrList, (b) => stbBase.DvrList(b)); - trilist.SetBoolSigAction(joinMap.Replay, (b) => stbBase.Replay(b)); - - trilist.SetStringSigAction(joinMap.LoadPresets, (s) => stbBase.LoadPresets(s)); - } - - var stbPower = stbDevice as IPower; - if (stbPower != null) - { - trilist.SetSigTrueAction(joinMap.PowerOn, () => stbPower.PowerOn()); - trilist.SetSigTrueAction(joinMap.PowerOff, () => stbPower.PowerOff()); - trilist.SetSigTrueAction(joinMap.PowerToggle, () => stbPower.PowerToggle()); - - } - - var stbDPad = stbDevice as IDPad; - if (stbDPad != null) - { - trilist.SetBoolSigAction(joinMap.Up, (b) => stbDPad.Up(b)); - trilist.SetBoolSigAction(joinMap.Down, (b) => stbDPad.Down(b)); - trilist.SetBoolSigAction(joinMap.Left, (b) => stbDPad.Left(b)); - trilist.SetBoolSigAction(joinMap.Right, (b) => stbDPad.Right(b)); - trilist.SetBoolSigAction(joinMap.Select, (b) => stbDPad.Select(b)); - trilist.SetBoolSigAction(joinMap.Menu, (b) => stbDPad.Menu(b)); - trilist.SetBoolSigAction(joinMap.Exit, (b) => stbDPad.Exit(b)); - } - - var stbChannel = stbDevice as IChannel; - if (stbChannel != null) - { - trilist.SetBoolSigAction(joinMap.ChannelUp, (b) => stbChannel.ChannelUp(b)); - trilist.SetBoolSigAction(joinMap.ChannelDown, (b) => stbChannel.ChannelDown(b)); - trilist.SetBoolSigAction(joinMap.LastChannel, (b) => stbChannel.LastChannel(b)); - trilist.SetBoolSigAction(joinMap.Guide, (b) => stbChannel.Guide(b)); - trilist.SetBoolSigAction(joinMap.Info, (b) => stbChannel.Info(b)); - trilist.SetBoolSigAction(joinMap.Exit, (b) => stbChannel.Exit(b)); - } - - var stbColor = stbDevice as IColor; - if (stbColor != null) - { - trilist.SetBoolSigAction(joinMap.Red, (b) => stbColor.Red(b)); - trilist.SetBoolSigAction(joinMap.Green, (b) => stbColor.Green(b)); - trilist.SetBoolSigAction(joinMap.Yellow, (b) => stbColor.Yellow(b)); - trilist.SetBoolSigAction(joinMap.Blue, (b) => stbColor.Blue(b)); - } - - var stbKeypad = stbDevice as ISetTopBoxNumericKeypad; - if (stbKeypad != null) - { - trilist.StringInput[joinMap.KeypadAccessoryButton1Label].StringValue = stbKeypad.KeypadAccessoryButton1Label; - trilist.StringInput[joinMap.KeypadAccessoryButton2Label].StringValue = stbKeypad.KeypadAccessoryButton2Label; - - trilist.BooleanInput[joinMap.HasKeypadAccessoryButton1].BoolValue = stbKeypad.HasKeypadAccessoryButton1; - trilist.BooleanInput[joinMap.HasKeypadAccessoryButton2].BoolValue = stbKeypad.HasKeypadAccessoryButton2; - - trilist.SetBoolSigAction(joinMap.Digit0, (b) => stbKeypad.Digit0(b)); - trilist.SetBoolSigAction(joinMap.Digit1, (b) => stbKeypad.Digit1(b)); - trilist.SetBoolSigAction(joinMap.Digit2, (b) => stbKeypad.Digit2(b)); - trilist.SetBoolSigAction(joinMap.Digit3, (b) => stbKeypad.Digit3(b)); - trilist.SetBoolSigAction(joinMap.Digit4, (b) => stbKeypad.Digit4(b)); - trilist.SetBoolSigAction(joinMap.Digit5, (b) => stbKeypad.Digit5(b)); - trilist.SetBoolSigAction(joinMap.Digit6, (b) => stbKeypad.Digit6(b)); - trilist.SetBoolSigAction(joinMap.Digit7, (b) => stbKeypad.Digit7(b)); - trilist.SetBoolSigAction(joinMap.Digit8, (b) => stbKeypad.Digit8(b)); - trilist.SetBoolSigAction(joinMap.Digit9, (b) => stbKeypad.Digit9(b)); - trilist.SetBoolSigAction(joinMap.KeypadAccessoryButton1Press, (b) => stbKeypad.KeypadAccessoryButton1(b)); - trilist.SetBoolSigAction(joinMap.KeypadAccessoryButton2Press, (b) => stbKeypad.KeypadAccessoryButton1(b)); - trilist.SetBoolSigAction(joinMap.Dash, (b) => stbKeypad.Dash(b)); - trilist.SetBoolSigAction(joinMap.KeypadEnter, (b) => stbKeypad.KeypadEnter(b)); - } - - var stbTransport = stbDevice as ITransport; - if (stbTransport != null) - { - trilist.SetBoolSigAction(joinMap.Play, (b) => stbTransport.Play(b)); - trilist.SetBoolSigAction(joinMap.Pause, (b) => stbTransport.Pause(b)); - trilist.SetBoolSigAction(joinMap.Rewind, (b) => stbTransport.Rewind(b)); - trilist.SetBoolSigAction(joinMap.FFwd, (b) => stbTransport.FFwd(b)); - trilist.SetBoolSigAction(joinMap.ChapMinus, (b) => stbTransport.ChapMinus(b)); - trilist.SetBoolSigAction(joinMap.ChapPlus, (b) => stbTransport.ChapPlus(b)); - trilist.SetBoolSigAction(joinMap.Stop, (b) => stbTransport.Stop(b)); - trilist.SetBoolSigAction(joinMap.Record, (b) => stbTransport.Record(b)); - - } - - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/AirMediaControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/AirMediaControllerJoinMap.cs deleted file mode 100644 index 5b02c05b..00000000 --- a/PepperDashEssentials/Bridges/JoinMaps/AirMediaControllerJoinMap.cs +++ /dev/null @@ -1,111 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Bridges -{ - [Obsolete("Please use version PepperDash.Essentials.Core.Bridges")] - public class AirMediaControllerJoinMap : JoinMapBase - { - #region Digitals - /// - /// Indicates that the device is online when high - /// - public uint IsOnline { get; set; } - /// - /// Indicates that the device is in session when high - /// - public uint IsInSession { get; set; } - /// - /// Indicates sync detected on HDMI input when high - /// - public uint HdmiVideoSync { get; set; } - /// - /// Set High to enable automatic input routing and low to disable. Feedback high when enabled - /// - public uint AutomaticInputRoutingEnabled { get; set; } - #endregion - - #region Analogs - /// - /// Selects source and provides feedback - /// - public uint VideoOut { get; set; } - /// - /// Provided error feedback - /// - public uint ErrorFB { get; set; } - /// - /// Indicates the number of connected users as feedback - /// - public uint NumberOfUsersConnectedFB { get; set; } - /// - /// Sets the login code and provides the current code as feedback - /// - public uint LoginCode { get; set; } - #endregion - - #region Serials - /// - /// Provides the name defined in config as feedback - /// - public uint Name { get; set; } - /// - /// Provides the connection address as feedback - /// - public uint ConnectionAddressFB { get; set; } - /// - /// Provides the hostname as feedback - /// - public uint HostnameFB { get; set; } - /// - /// Provides the serial number as feedback - /// - public uint SerialNumberFeedback { get; set; } - #endregion - - public AirMediaControllerJoinMap() - { - // Digital - IsOnline = 1; - IsInSession = 2; - HdmiVideoSync = 3; - AutomaticInputRoutingEnabled = 4; - - // Analog - VideoOut = 1; - ErrorFB = 2; - NumberOfUsersConnectedFB = 3; - LoginCode = 4; - - // Serial - Name = 1; - ConnectionAddressFB = 2; - HostnameFB = 3; - SerialNumberFeedback = 4; - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - IsOnline = IsOnline + joinOffset; - IsInSession = IsInSession + joinOffset; - HdmiVideoSync = HdmiVideoSync + joinOffset; - AutomaticInputRoutingEnabled = AutomaticInputRoutingEnabled + joinOffset; - - VideoOut = VideoOut + joinOffset; - ErrorFB = ErrorFB + joinOffset; - NumberOfUsersConnectedFB = NumberOfUsersConnectedFB + joinOffset; - LoginCode = LoginCode + joinOffset; - - Name = Name + joinOffset; - ConnectionAddressFB = ConnectionAddressFB + joinOffset; - HostnameFB = HostnameFB + joinOffset; - SerialNumberFeedback = SerialNumberFeedback + joinOffset; - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/AppleTvJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/AppleTvJoinMap.cs deleted file mode 100644 index ac84ee31..00000000 --- a/PepperDashEssentials/Bridges/JoinMaps/AppleTvJoinMap.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Bridges -{ - [Obsolete("Please use version PepperDash.Essentials.Core.Bridges")] - public class AppleTvJoinMap : JoinMapBase - { - #region Digitals - /// - /// Sends up arrow command while high - /// - public uint UpArrow { get; set; } - /// - /// Sends down arrow command while high - /// - public uint DnArrow { get; set; } - /// - /// Sends left arrow command while high - /// - public uint LeftArrow { get; set; } - /// - /// Sends right arrow command while high - /// - public uint RightArrow { get; set; } - /// - /// Sends menu command - /// - public uint Menu { get; set; } - /// - /// Sends select command - /// - public uint Select { get; set; } - /// - /// Sends play/pause command - /// - public uint PlayPause { get; set; } - #endregion - - public AppleTvJoinMap() - { - UpArrow = 1; - DnArrow = 2; - LeftArrow = 3; - RightArrow = 4; - Menu = 5; - Select = 6; - PlayPause = 7; - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - UpArrow = UpArrow + joinOffset; - DnArrow = DnArrow + joinOffset; - LeftArrow = LeftArrow + joinOffset; - RightArrow = RightArrow + joinOffset; - Menu = Menu + joinOffset; - Select = Select + joinOffset; - PlayPause = PlayPause + joinOffset; - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/C2nRthsControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/C2nRthsControllerJoinMap.cs deleted file mode 100644 index bbf8268d..00000000 --- a/PepperDashEssentials/Bridges/JoinMaps/C2nRthsControllerJoinMap.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Linq; -using Crestron.SimplSharp.Reflection; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Bridges -{ - [Obsolete("Please use version PepperDash.Essentials.Core.Bridges")] - public class C2nRthsControllerJoinMap:JoinMapBase - { - public uint IsOnline { get; set; } - public uint Name { get; set; } - public uint Temperature { get; set; } - public uint Humidity { get; set; } - public uint TemperatureFormat { get; set; } - - public C2nRthsControllerJoinMap() - { - //digital - IsOnline = 1; - TemperatureFormat = 2; - - //Analog - Temperature = 2; - Humidity = 3; - - //serial - Name = 1; - - - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - var properties = - GetType().GetCType().GetProperties().Where(p => p.PropertyType == typeof(uint)).ToList(); - - foreach (var propertyInfo in properties) - { - propertyInfo.SetValue(this, (uint)propertyInfo.GetValue(this, null) + joinOffset, null); - } - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/CameraControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/CameraControllerJoinMap.cs deleted file mode 100644 index 1546ff23..00000000 --- a/PepperDashEssentials/Bridges/JoinMaps/CameraControllerJoinMap.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Bridges -{ - /// - /// Join map for CameraBase devices - /// - /// - [Obsolete("Please use version PepperDash.Essentials.Core.Bridges")] - public class CameraControllerJoinMap : JoinMapBaseAdvanced - { - [JoinName("TiltUp")] - public JoinDataComplete TiltUp = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 }, new JoinMetadata() { Label = "Tilt Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - [JoinName("TiltDown")] - public JoinDataComplete TiltDown = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 }, new JoinMetadata() { Label = "Tilt Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - [JoinName("PanLeft")] - public JoinDataComplete PanLeft = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 }, new JoinMetadata() { Label = "Pan Left", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - [JoinName("PanRight")] - public JoinDataComplete PanRight = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 }, new JoinMetadata() { Label = "Pan Right", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - [JoinName("ZoomIn")] - public JoinDataComplete ZoomIn = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 }, new JoinMetadata() { Label = "Zoom In", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - [JoinName("ZoomOut")] - public JoinDataComplete ZoomOut = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 }, new JoinMetadata() { Label = "Zoom Out", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("IsOnline")] - public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 9, JoinSpan = 1 }, new JoinMetadata() { Label = "Is Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - [JoinName("PowerOn")] - public JoinDataComplete PowerOn = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 }, new JoinMetadata() { Label = "Power On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - [JoinName("PowerOff")] - public JoinDataComplete PowerOff = new JoinDataComplete(new JoinData() { JoinNumber = 8, JoinSpan = 1 }, new JoinMetadata() { Label = "Power Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("NumberOfPresets")] - public JoinDataComplete NumberOfPresets = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 }, new JoinMetadata() { Label = "Tells Essentials the number of defined presets", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog }); - [JoinName("PresetRecallStart")] - public JoinDataComplete PresetRecallStart = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 20 }, new JoinMetadata() { Label = "Preset Recall Start", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - [JoinName("PresetLabelStart")] - public JoinDataComplete PresetLabelStart = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 20 }, new JoinMetadata() { Label = "Preset Label Start", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial }); - [JoinName("PresetSaveStart")] - public JoinDataComplete PresetSaveStart = new JoinDataComplete(new JoinData() { JoinNumber = 31, JoinSpan = 20 }, new JoinMetadata() { Label = "Preset Save Start", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("CameraModeAuto")] - public JoinDataComplete CameraModeAuto = new JoinDataComplete(new JoinData() { JoinNumber = 51, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Mode Auto", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - [JoinName("CameraModeManual")] - public JoinDataComplete CameraModeManual = new JoinDataComplete(new JoinData() { JoinNumber = 52, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Mode Manual", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - [JoinName("CameraModeOff")] - public JoinDataComplete CameraModeOff = new JoinDataComplete(new JoinData() { JoinNumber = 53, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Mode Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("SupportsCameraModeAuto")] - public JoinDataComplete SupportsCameraModeAuto = new JoinDataComplete(new JoinData() { JoinNumber = 55, JoinSpan = 1 }, new JoinMetadata() { Label = "Supports Camera Mode Auto", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - [JoinName("SupportsCameraModeOff")] - public JoinDataComplete SupportsCameraModeOff = new JoinDataComplete(new JoinData() { JoinNumber = 56, JoinSpan = 1 }, new JoinMetadata() { Label = "Supports Camera Mode Off", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - [JoinName("SupportsPresets")] - public JoinDataComplete SupportsPresets = new JoinDataComplete(new JoinData() { JoinNumber = 57, JoinSpan = 1 }, new JoinMetadata() { Label = "Supports Presets", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - public CameraControllerJoinMap(uint joinStart) - : base(joinStart, typeof(CameraControllerJoinMap)) - { - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/DigitalLoggerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/DigitalLoggerJoinMap.cs deleted file mode 100644 index 3f4c8c43..00000000 --- a/PepperDashEssentials/Bridges/JoinMaps/DigitalLoggerJoinMap.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Bridges -{ - [Obsolete("Please use version PepperDash.Essentials.Core.Bridges")] - public class DigitalLoggerJoinMap : JoinMapBase - { - public uint IsOnline { get; set; } - public uint CircuitNames { get; set; } - public uint CircuitState { get; set; } - public uint CircuitCycle { get; set; } - public uint CircuitIsCritical { get; set; } - public uint CircuitOnCmd { get; set; } - public uint CircuitOffCmd { get; set; } - - public DigitalLoggerJoinMap() - { - // Digital - IsOnline = 9; - CircuitState = 0; - CircuitCycle = 0; - CircuitIsCritical = 10; - CircuitOnCmd = 10; - CircuitOffCmd = 20; - // Serial - CircuitNames = 0; - // Analog - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - IsOnline = IsOnline + joinOffset; - CircuitNames = CircuitNames + joinOffset; - CircuitState = CircuitState + joinOffset; - CircuitCycle = CircuitCycle + joinOffset; - CircuitIsCritical = CircuitIsCritical + joinOffset; - CircuitOnCmd = CircuitOnCmd + joinOffset; - CircuitOffCmd = CircuitOffCmd + joinOffset; - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/DisplayControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/DisplayControllerJoinMap.cs deleted file mode 100644 index 48671d24..00000000 --- a/PepperDashEssentials/Bridges/JoinMaps/DisplayControllerJoinMap.cs +++ /dev/null @@ -1,118 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Bridges -{ - [Obsolete("Please use version PepperDash.Essentials.Core.Bridges")] - public class DisplayControllerJoinMap : JoinMapBase - { - #region Digitals - /// - /// Turns the display off and reports power off feedback - /// - public uint PowerOff { get; set; } - /// - /// Turns the display on and repots power on feedback - /// - public uint PowerOn { get; set; } - /// - /// Indicates that the display device supports two way communication when high - /// - public uint IsTwoWayDisplay { get; set; } - /// - /// Increments the volume while high - /// - public uint VolumeUp { get; set; } - /// - /// Decrements teh volume while high - /// - public uint VolumeDown { get; set; } - /// - /// Toggles the mute state. Feedback is high when volume is muted - /// - public uint VolumeMute { get; set; } - /// - /// Range of digital joins to select inputs and report current input as feedback - /// - public uint InputSelectOffset { get; set; } - /// - /// Range of digital joins to report visibility for input buttons - /// - public uint ButtonVisibilityOffset { get; set; } - /// - /// High if the device is online - /// - public uint IsOnline { get; set; } - #endregion - - #region Analogs - /// - /// Analog join to set the input and report current input as feedback - /// - public uint InputSelect { get; set; } - /// - /// Sets the volume level and reports the current level as feedback - /// - public uint VolumeLevel { get; set; } - #endregion - - #region Serials - /// - /// Reports the name of the display as defined in config as feedback - /// - public uint Name { get; set; } - /// - /// Range of serial joins that reports the names of the inputs as feedback - /// - public uint InputNamesOffset { get; set; } - #endregion - - public DisplayControllerJoinMap() - { - // Digital - IsOnline = 50; - PowerOff = 1; - PowerOn = 2; - IsTwoWayDisplay = 3; - VolumeUp = 5; - VolumeDown = 6; - VolumeMute = 7; - - ButtonVisibilityOffset = 40; - InputSelectOffset = 10; - - // Analog - InputSelect = 11; - VolumeLevel = 5; - - // Serial - Name = 1; - InputNamesOffset = 10; - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - IsOnline = IsOnline + joinOffset; - PowerOff = PowerOff + joinOffset; - PowerOn = PowerOn + joinOffset; - IsTwoWayDisplay = IsTwoWayDisplay + joinOffset; - ButtonVisibilityOffset = ButtonVisibilityOffset + joinOffset; - Name = Name + joinOffset; - InputNamesOffset = InputNamesOffset + joinOffset; - InputSelectOffset = InputSelectOffset + joinOffset; - - InputSelect = InputSelect + joinOffset; - - VolumeUp = VolumeUp + joinOffset; - VolumeDown = VolumeDown + joinOffset; - VolumeMute = VolumeMute + joinOffset; - VolumeLevel = VolumeLevel + joinOffset; - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs deleted file mode 100644 index 0779523a..00000000 --- a/PepperDashEssentials/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs +++ /dev/null @@ -1,110 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Bridges { - [Obsolete("Please use version PepperDash.Essentials.Core.Bridges")] - public class DmBladeChassisControllerJoinMap : JoinMapBase { - #region Digital/Analogs - #endregion - - #region Digitals - /// - /// High when device is online - /// - public uint IsOnline { get; set; } - /// - /// Range reports video sync feedback for each input - /// - public uint VideoSyncStatus { get; set; } - /// - /// Range reports high if corresponding input's endpoint is online - /// - public uint InputEndpointOnline { get; set; } - /// - /// Range reports high if corresponding output's endpoint is online - /// - public uint OutputEndpointOnline { get; set; } - /// - /// Range reports high if corresponding input's transmitter supports bridging as a separate device for detailed AV switching, HDCP control, etc. - /// - public uint TxAdvancedIsPresent { get; set; } // indicates that there is an attached transmitter that should be bridged to be interacted with - #endregion - - #region Analogs - /// - /// Range sets and reports the current video source for the corresponding output - /// - public uint OutputVideo { get; set; } - /// - /// Range sets and reports the current HDCP state for the corresponding input card - /// - public uint HdcpSupportState { get; set; } - /// - /// Range reports the highest supported HDCP state level for the corresponding input card - /// - public uint HdcpSupportCapability { get; set; } - #endregion - - #region Serials - /// - /// Range sets and reports the name for the corresponding input card - /// - public uint InputNames { get; set; } - /// - /// Range sets and reports the name for the corresponding output card - /// - public uint OutputNames { get; set; } - /// - /// Range reports the name of the current video source for the corresponding output card - /// - public uint OutputCurrentVideoInputNames { get; set; } - /// - /// Range reports the current input resolution for each corresponding input card - /// - public uint InputCurrentResolution { get; set; } - #endregion - - public DmBladeChassisControllerJoinMap() { - //Digital/Analog - - //Digital - IsOnline = 11; - VideoSyncStatus = 100; //101-299 - InputEndpointOnline = 500; //501-699 - OutputEndpointOnline = 700; //701-899 - TxAdvancedIsPresent = 1000; //1001-1199 - - //Analog - OutputVideo = 100; //101-299 - HdcpSupportState = 1000; //1001-1199 - HdcpSupportCapability = 1200; //1201-1399 - - - //Serial - InputNames = 100; //101-299 - OutputNames = 300; //301-499 - OutputCurrentVideoInputNames = 2000; //2001-2199 - InputCurrentResolution = 2400; // 2401-2599 - } - - public override void OffsetJoinNumbers(uint joinStart) { - var joinOffset = joinStart - 1; - - IsOnline = IsOnline + joinOffset; - OutputVideo = OutputVideo + joinOffset; - VideoSyncStatus = VideoSyncStatus + joinOffset; - InputNames = InputNames + joinOffset; - OutputNames = OutputNames + joinOffset; - OutputCurrentVideoInputNames = OutputCurrentVideoInputNames + joinOffset; - InputCurrentResolution = InputCurrentResolution + joinOffset; - InputEndpointOnline = InputEndpointOnline + joinOffset; - OutputEndpointOnline = OutputEndpointOnline + joinOffset; - HdcpSupportState = HdcpSupportState + joinOffset; - HdcpSupportCapability = HdcpSupportCapability + joinOffset; - } - } -} diff --git a/PepperDashEssentials/Bridges/JoinMaps/DmChassisControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/DmChassisControllerJoinMap.cs deleted file mode 100644 index ba00306d..00000000 --- a/PepperDashEssentials/Bridges/JoinMaps/DmChassisControllerJoinMap.cs +++ /dev/null @@ -1,164 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Bridges -{ - [Obsolete("Please use version PepperDash.Essentials.Core.Bridges")] - public class DmChassisControllerJoinMap : JoinMapBase - { -#region Digital/Analogs - /// - /// Analog input sets System ID, output reports current ID as feedback. - /// Digital input applies System ID, output is high when applying busy. - /// - public uint SystemId { get; set; } -#endregion - -#region Digitals - /// - /// High when device is online - /// - public uint IsOnline { get; set; } - /// - /// Range reports video sync feedback for each input - /// - public uint VideoSyncStatus { get; set; } - /// - /// Range reports high if corresponding input's endpoint is online - /// - public uint InputEndpointOnline { get; set; } - /// - /// Range reports high if corresponding output's endpoint is online - /// - public uint OutputEndpointOnline { get; set; } - /// - /// Range reports high if corresponding input's transmitter supports bridging as a separate device for detailed AV switching, HDCP control, etc. - /// - public uint TxAdvancedIsPresent { get; set; } // indicates that there is an attached transmitter that should be bridged to be interacted with - /// - /// Range reports high if corresponding output is disabled by HDCP. - /// - public uint OutputDisabledByHdcp { get; set; } // indicates that there is an attached transmitter that should be bridged to be interacted with -#endregion - -#region Analogs - /// - /// Range sets and reports the current video source for the corresponding output - /// - public uint OutputVideo { get; set; } - /// - /// Range sets and reports the current audio source for the corresponding output - /// - public uint OutputAudio { get; set; } - /// - /// Range sets and reports the current Usb source for the corresponding output - /// - public uint OutputUsb { get; set; } - /// - /// Range sets and reports the current Usb source for the corresponding input - /// - public uint InputUsb { get; set; } - /// - /// Range sets and reports the current HDCP state for the corresponding input card - /// - public uint HdcpSupportState { get; set; } - /// - /// Range reports the highest supported HDCP state level for the corresponding input card - /// - public uint HdcpSupportCapability { get; set; } - /// - /// DM Chassis Stream Input Start (1), Stop (2), Pause (3) with Feedback - /// - public uint InputStreamCardStatus { get; set; } - /// - /// DM Chassis Stream Output Start (1), Stop (2), Pause (3) with Feedback - /// - public uint OutputStreamCardStatus { get; set; } -#endregion - -#region Serials - /// - /// Range sets and reports the name for the corresponding input card - /// - public uint InputNames { get; set; } - /// - /// Range sets and reports the name for the corresponding output card - /// - public uint OutputNames { get; set; } - /// - /// Range reports the name of the current video source for the corresponding output card - /// - public uint OutputCurrentVideoInputNames { get; set; } - /// - /// Range reports the name of the current audio source for the corresponding output card - /// - public uint OutputCurrentAudioInputNames { get; set; } - /// - /// Range reports the current input resolution for each corresponding input card - /// - public uint InputCurrentResolution { get; set; } -#endregion - - public DmChassisControllerJoinMap() - { - //Digital/Analog - SystemId = 10; // Analog sets/gets SystemId, digital input applies and provides feedback of ID change busy - - //Digital - IsOnline = 11; - VideoSyncStatus = 100; //101-299 - InputEndpointOnline = 500; //501-699 - OutputEndpointOnline = 700; //701-899 - TxAdvancedIsPresent = 1000; //1001-1199 - OutputDisabledByHdcp = 1200; //1201-1399 - - //Analog - OutputVideo = 100; //101-299 - OutputAudio = 300; //301-499 - OutputUsb = 500; //501-699 - InputUsb = 700; //701-899 - HdcpSupportState = 1000; //1001-1199 - HdcpSupportCapability = 1200; //1201-1399 - InputStreamCardStatus = 1500; //1501-1532 - OutputStreamCardStatus = 1600; //1601-1632 - - - //Serial - InputNames = 100; //101-299 - OutputNames = 300; //301-499 - OutputCurrentVideoInputNames = 2000; //2001-2199 - OutputCurrentAudioInputNames = 2200; //2201-2399 - InputCurrentResolution = 2400; // 2401-2599 - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - SystemId = SystemId + joinOffset; - IsOnline = IsOnline + joinOffset; - OutputVideo = OutputVideo + joinOffset; - OutputAudio = OutputAudio + joinOffset; - OutputUsb = OutputUsb + joinOffset; - InputUsb = InputUsb + joinOffset; - VideoSyncStatus = VideoSyncStatus + joinOffset; - InputNames = InputNames + joinOffset; - OutputNames = OutputNames + joinOffset; - OutputCurrentVideoInputNames = OutputCurrentVideoInputNames + joinOffset; - OutputCurrentAudioInputNames = OutputCurrentAudioInputNames + joinOffset; - InputCurrentResolution = InputCurrentResolution + joinOffset; - InputEndpointOnline = InputEndpointOnline + joinOffset; - OutputEndpointOnline = OutputEndpointOnline + joinOffset; - HdcpSupportState = HdcpSupportState + joinOffset; - HdcpSupportCapability = HdcpSupportCapability + joinOffset; - InputStreamCardStatus = InputStreamCardStatus + joinOffset; - OutputStreamCardStatus = OutputStreamCardStatus + joinOffset; - OutputDisabledByHdcp = OutputDisabledByHdcp + joinOffset; - TxAdvancedIsPresent = TxAdvancedIsPresent + joinOffset; - } - } -} diff --git a/PepperDashEssentials/Bridges/JoinMaps/DmRmcControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/DmRmcControllerJoinMap.cs deleted file mode 100644 index 3d7cec8d..00000000 --- a/PepperDashEssentials/Bridges/JoinMaps/DmRmcControllerJoinMap.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Bridges -{ - [Obsolete("Please use version PepperDash.Essentials.Core.Bridges")] - public class DmRmcControllerJoinMap : JoinMapBase - { - #region Digitals - /// - /// High when device is online (if not attached to a DMP3 or DM chassis with a CPU3 card - /// - public uint IsOnline { get; set; } - #endregion - - #region Serials - /// - /// Reports the current output resolution - /// - public uint CurrentOutputResolution { get; set; } - /// - /// Reports the EDID manufacturer value - /// - public uint EdidManufacturer { get; set; } - /// - /// Reports the EDID Name value - /// - public uint EdidName { get; set; } - /// - /// Reports the EDID preffered timing value - /// - public uint EdidPrefferedTiming { get; set; } - /// - /// Reports the EDID serial number value - /// - public uint EdidSerialNumber { get; set; } - #endregion - - #region Analogs - public uint AudioVideoSource { get; set; } - #endregion - - public DmRmcControllerJoinMap() - { - // Digital - IsOnline = 1; - - // Serial - CurrentOutputResolution = 1; - EdidManufacturer = 2; - EdidName = 3; - EdidPrefferedTiming = 4; - EdidSerialNumber = 5; - - //Analog - AudioVideoSource = 1; - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - IsOnline = IsOnline + joinOffset; - CurrentOutputResolution = CurrentOutputResolution + joinOffset; - EdidManufacturer = EdidManufacturer + joinOffset; - EdidName = EdidName + joinOffset; - EdidPrefferedTiming = EdidPrefferedTiming + joinOffset; - EdidSerialNumber = EdidSerialNumber + joinOffset; - AudioVideoSource = AudioVideoSource + joinOffset; - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/DmTxControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/DmTxControllerJoinMap.cs deleted file mode 100644 index f84134a1..00000000 --- a/PepperDashEssentials/Bridges/JoinMaps/DmTxControllerJoinMap.cs +++ /dev/null @@ -1,100 +0,0 @@ -using System; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Bridges -{ - [Obsolete("Please use version PepperDash.Essentials.Core.Bridges")] - public class DmTxControllerJoinMap : JoinMapBase - { - #region Digitals - /// - /// High when device is online (if not attached to a DMP3 or DM chassis with a CPU3 card - /// - public uint IsOnline { get; set; } - /// - /// High when video sync is detected - /// - public uint VideoSyncStatus { get; set; } - /// - /// - /// - public uint FreeRunEnabled { get; set; } - #endregion - - #region Analogs - /// - /// Sets and reports the video source - /// - public uint VideoInput { get; set; } - /// - /// Sets and reports the audio source - /// - public uint AudioInput { get; set; } - /// - /// Reports the highest supported HDCP state level for the corresponding input card - /// - public uint HdcpSupportCapability { get; set; } - /// - /// Sets and reports the current HDCP state for the corresponding input port - /// - public uint Port1HdcpState { get; set; } - /// - /// Sets and reports the current HDCP state for the corresponding input port - /// - public uint Port2HdcpState { get; set; } - - /// - /// Sets and reports the current VGA Brightness level - /// - public uint VgaBrightness { get; set; } - - /// - /// Sets and reports the current VGA Contrast level - /// - public uint VgaContrast { get; set; } - #endregion - - #region Serials - /// - /// Reports the current input resolution - /// - public uint CurrentInputResolution { get; set; } - #endregion - - - public DmTxControllerJoinMap() - { - // Digital - IsOnline = 1; - VideoSyncStatus = 2; - FreeRunEnabled = 3; - // Serial - CurrentInputResolution = 1; - // Analog - VideoInput = 1; - AudioInput = 2; - HdcpSupportCapability = 3; - Port1HdcpState = 4; - Port2HdcpState = 5; - VgaBrightness = 6; - VgaContrast = 7; - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - IsOnline = IsOnline + joinOffset; - VideoSyncStatus = VideoSyncStatus + joinOffset; - FreeRunEnabled = FreeRunEnabled + joinOffset; - CurrentInputResolution = CurrentInputResolution + joinOffset; - VideoInput = VideoInput + joinOffset; - AudioInput = AudioInput + joinOffset; - HdcpSupportCapability = HdcpSupportCapability + joinOffset; - Port1HdcpState = Port1HdcpState + joinOffset; - Port2HdcpState = Port2HdcpState + joinOffset; - VgaBrightness = VgaBrightness + joinOffset; - VgaContrast = VgaContrast + joinOffset; - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs deleted file mode 100644 index 47c7d50d..00000000 --- a/PepperDashEssentials/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Bridges -{ - [Obsolete("Please use version PepperDash.Essentials.Core.Bridges")] - public class DmpsAudioOutputControllerJoinMap : JoinMapBase - { - #region Digital/Analog - /// - /// Range of joins for Master Volume - /// Analog join 1 is volume level and feedback - /// Digital join 1 is Mute on and feedback - /// Digital join 2 is Mute off and feedback - /// Digital join 3 is volume up - /// Digital join 4 is volume down - /// - public uint MasterVolume { get; set; } - /// - /// Range of joins for Source Volume - /// Analog join 11 is volume level and feedback - /// Digital join 11 is Mute on and feedback - /// Digital join 12 is Mute off and feedback - /// Digital join 13 is volume up - /// Digital join 14 is volume down - /// - public uint SourceVolume { get; set; } - /// - /// Range of joins for Codec1 Volume (if applicable) - /// Analog join 21 is volume level and feedback - /// Digital join 21 is Mute on and feedback - /// Digital join 22 is Mute off and feedback - /// Digital join 23 is volume up - /// Digital join 24 is volume down - /// - public uint Codec1Volume { get; set; } - /// - /// Range of joins for Codec2 Volume (if applicable) - /// Analog join 31 is volume level and feedback - /// Digital join 31 is Mute on and feedback - /// Digital join 32 is Mute off and feedback - /// Digital join 33 is volume up - /// Digital join 34 is volume down - /// - public uint Codec2Volume { get; set; } - #endregion - - public DmpsAudioOutputControllerJoinMap() - { - MasterVolume = 1; // 1-10 - SourceVolume = 11; // 11-20 - Codec1Volume = 21; // 21-30 - Codec2Volume = 31; // 31-40 - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart; - - MasterVolume = MasterVolume + joinOffset; - SourceVolume = SourceVolume + joinOffset; - Codec1Volume = Codec1Volume + joinOffset; - Codec2Volume = Codec2Volume + joinOffset; - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs deleted file mode 100644 index 308dddf0..00000000 --- a/PepperDashEssentials/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs +++ /dev/null @@ -1,128 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Bridges -{ - [Obsolete("Please use version PepperDash.Essentials.Core.Bridges")] - public class DmpsRoutingControllerJoinMap : JoinMapBase - { - #region Digitals - /// - /// Range reports video sync feedback for each input - /// - public uint VideoSyncStatus { get; set; } - /// - /// Range reports high if corresponding input's endpoint is online - /// - public uint InputEndpointOnline { get; set; } - /// - /// Range reports high if corresponding output's endpoint is online - /// - public uint OutputEndpointOnline { get; set; } - #endregion - - - #region Analogs - /// - /// Range sets and reports the current video source for the corresponding output - /// - public uint OutputVideo { get; set; } - /// - /// Range sets and reports the current audio source for the corresponding output - /// - public uint OutputAudio { get; set; } - /// - /// Range sets and reports the current Usb source for the corresponding output - /// - //public uint OutputUsb { get; set; } - ///// - ///// Range sets and reports the current Usb source for the corresponding input - ///// - //public uint InputUsb { get; set; } - ///// - ///// Range sets and reports the current HDCP state for the corresponding input card - ///// - //public uint HdcpSupportState { get; set; } - ///// - ///// Range reports the highest supported HDCP state level for the corresponding input card - ///// - //public uint HdcpSupportCapability { get; set; } - #endregion - - #region Serials - /// - /// Range sets and reports the name for the corresponding input card - /// - public uint InputNames { get; set; } - /// - /// Range sets and reports the name for the corresponding output card - /// - public uint OutputNames { get; set; } - /// - /// Range reports the name of the current video source for the corresponding output card - /// - public uint OutputCurrentVideoInputNames { get; set; } - /// - /// Range reports the name of the current audio source for the corresponding output card - /// - public uint OutputCurrentAudioInputNames { get; set; } - /// - /// Range reports the current input resolution for each corresponding input card - /// - public uint InputCurrentResolution { get; set; } - #endregion - - - public DmpsRoutingControllerJoinMap() - { - //Digital - VideoSyncStatus = 100; //101-299 - InputEndpointOnline = 500; //501-699 - OutputEndpointOnline = 700; //701-899 - - //Analog - OutputVideo = 100; //101-299 - OutputAudio = 300; //301-499 - //OutputUsb = 500; //501-699 - //InputUsb = 700; //701-899 - VideoSyncStatus = 100; //101-299 - //HdcpSupportState = 1000; //1001-1199 - //HdcpSupportCapability = 1200; //1201-1399 - - - //Serial - InputNames = 100; //101-299 - OutputNames = 300; //301-499 - OutputCurrentVideoInputNames = 2000; //2001-2199 - OutputCurrentAudioInputNames = 2200; //2201-2399 - InputCurrentResolution = 2400; // 2401-2599 - InputEndpointOnline = 500; //501-699 - OutputEndpointOnline = 700; //701-899 - - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - OutputVideo = OutputVideo + joinOffset; - OutputAudio = OutputAudio + joinOffset; - //OutputUsb = OutputUsb + joinOffset; - //InputUsb = InputUsb + joinOffset; - VideoSyncStatus = VideoSyncStatus + joinOffset; - InputNames = InputNames + joinOffset; - OutputNames = OutputNames + joinOffset; - OutputCurrentVideoInputNames = OutputCurrentVideoInputNames + joinOffset; - OutputCurrentAudioInputNames = OutputCurrentAudioInputNames + joinOffset; - InputCurrentResolution = InputCurrentResolution + joinOffset; - InputEndpointOnline = InputEndpointOnline + joinOffset; - OutputEndpointOnline = OutputEndpointOnline + joinOffset; - //HdcpSupportState = HdcpSupportState + joinOffset; - //HdcpSupportCapability = HdcpSupportCapability + joinOffset; - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/GenericLightingJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/GenericLightingJoinMap.cs deleted file mode 100644 index 3bc9b19a..00000000 --- a/PepperDashEssentials/Bridges/JoinMaps/GenericLightingJoinMap.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -using PepperDash.Essentials.Core; - - -namespace PepperDash.Essentials.Bridges -{ - [Obsolete("Please use version PepperDash.Essentials.Core.Bridges")] - public class GenericLightingJoinMap : JoinMapBase - { - public uint IsOnline { get; set; } - public uint SelectScene { get; set; } - public uint LightingSceneOffset { get; set; } - public uint ButtonVisibilityOffset { get; set; } - public uint IntegrationIdSet { get; set; } - - public GenericLightingJoinMap() - { - // Digital - IsOnline = 1; - SelectScene = 1; - IntegrationIdSet = 1; - LightingSceneOffset = 10; - ButtonVisibilityOffset = 40; - // Analog - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - IsOnline = IsOnline + joinOffset; - SelectScene = SelectScene + joinOffset; - LightingSceneOffset = LightingSceneOffset + joinOffset; - ButtonVisibilityOffset = ButtonVisibilityOffset + joinOffset; - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs deleted file mode 100644 index 56b50724..00000000 --- a/PepperDashEssentials/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Bridges -{ - [Obsolete("Please use version PepperDash.Essentials.Core.Bridges")] - public class GenericRelayControllerJoinMap : JoinMapBase - { - #region Digitals - /// - /// Sets and reports the state of the relay (High = closed, Low = Open) - /// - public uint Relay { get; set; } - #endregion - - public GenericRelayControllerJoinMap() - { - Relay = 1; - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - Relay = Relay + joinOffset; - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/GlsOccupancySensorBaseJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/GlsOccupancySensorBaseJoinMap.cs deleted file mode 100644 index 800f516c..00000000 --- a/PepperDashEssentials/Bridges/JoinMaps/GlsOccupancySensorBaseJoinMap.cs +++ /dev/null @@ -1,239 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Bridges -{ - [Obsolete("Please use version PepperDash.Essentials.Core.Bridges")] - public class GlsOccupancySensorBaseJoinMap : JoinMapBase - { - #region Digitals - - /// - /// High when device is online - /// - public uint IsOnline { get; set; } - /// - /// Forces the device to report occupied status - /// - public uint ForceOccupied { get; set; } - /// - /// Forces the device to report vacant status - /// - public uint ForceVacant { get; set; } - /// - /// Enables raw status reporting - /// - public uint EnableRawStates { get; set; } - /// - /// High when raw occupancy is detected - /// - public uint RawOccupancyFeedback { get; set; } - /// - /// High when PIR sensor detects motion - /// - public uint RawOccupancyPirFeedback { get; set; } - /// - /// High when US sensor detects motion - /// - public uint RawOccupancyUsFeedback { get; set; } - /// - /// High when occupancy is detected - /// - public uint RoomOccupiedFeedback { get; set; } - /// - /// Hich when occupancy is detected in the grace period - /// - public uint GraceOccupancyDetectedFeedback { get; set; } - /// - /// High when vacancy is detected - /// - public uint RoomVacantFeedback { get; set; } - - /// - /// Enables the LED Flash when set high - /// - public uint EnableLedFlash { get; set; } - /// - /// Disables the LED flash when set high - /// - public uint DisableLedFlash { get; set; } - /// - /// Enables the Short Timeout - /// - public uint EnableShortTimeout { get; set; } - /// - /// Disables the Short Timout - /// - public uint DisableShortTimeout { get; set; } - /// - /// Set high to enable one technology to trigger occupancy - /// - public uint OrWhenVacated { get; set; } - /// - /// Set high to require both technologies to trigger occupancy - /// - public uint AndWhenVacated { get; set; } - /// - /// Enables Ultrasonic Sensor A - /// - public uint EnableUsA { get; set; } - /// - /// Disables Ultrasonic Sensor A - /// - public uint DisableUsA { get; set; } - /// - /// Enables Ultrasonic Sensor B - /// - public uint EnableUsB { get; set; } - /// - /// Disables Ultrasonic Sensor B - /// - public uint DisableUsB { get; set; } - /// - /// Enables Pir - /// - public uint EnablePir { get; set; } - /// - /// Disables Pir - /// - public uint DisablePir { get; set; } - public uint IncrementUsInOccupiedState { get; set; } - public uint DecrementUsInOccupiedState { get; set; } - public uint IncrementUsInVacantState { get; set; } - public uint DecrementUsInVacantState { get; set; } - public uint IncrementPirInOccupiedState { get; set; } - public uint DecrementPirInOccupiedState { get; set; } - public uint IncrementPirInVacantState { get; set; } - public uint DecrementPirInVacantState { get; set; } - #endregion - - #region Analogs - /// - /// Sets adn reports the remote timeout value - /// - public uint Timeout { get; set; } - /// - /// Reports the local timeout value - /// - public uint TimeoutLocalFeedback { get; set; } - /// - /// Sets the minimum internal photo sensor value and reports the current level - /// - public uint InternalPhotoSensorValue { get; set; } - /// - /// Sets the minimum external photo sensor value and reports the current level - /// - public uint ExternalPhotoSensorValue { get; set; } - - public uint UsSensitivityInOccupiedState { get; set; } - - public uint UsSensitivityInVacantState { get; set; } - - public uint PirSensitivityInOccupiedState { get; set; } - - public uint PirSensitivityInVacantState { get; set; } - #endregion - - #region Serial - public uint Name { get; set; } - #endregion - - public GlsOccupancySensorBaseJoinMap() - { - IsOnline = 1; - ForceOccupied = 2; - ForceVacant = 3; - EnableRawStates = 4; - RoomOccupiedFeedback = 2; - GraceOccupancyDetectedFeedback = 3; - RoomVacantFeedback = 4; - RawOccupancyFeedback = 5; - RawOccupancyPirFeedback = 6; - RawOccupancyUsFeedback = 7; - EnableLedFlash = 11; - DisableLedFlash = 12; - EnableShortTimeout = 13; - DisableShortTimeout = 14; - OrWhenVacated = 15; - AndWhenVacated = 16; - EnableUsA = 17; - DisableUsA = 18; - EnableUsB = 19; - DisableUsB = 20; - EnablePir = 21; - DisablePir = 22; - IncrementUsInOccupiedState = 23; - DecrementUsInOccupiedState = 24; - IncrementUsInVacantState = 25; - DecrementUsInVacantState = 26; - IncrementPirInOccupiedState = 27; - DecrementPirInOccupiedState = 28; - IncrementPirInVacantState = 29; - DecrementPirInVacantState = 30; - - Timeout = 1; - TimeoutLocalFeedback = 2; - InternalPhotoSensorValue = 3; - ExternalPhotoSensorValue = 4; - UsSensitivityInOccupiedState = 5; - UsSensitivityInVacantState = 6; - PirSensitivityInOccupiedState = 7; - PirSensitivityInVacantState = 8; - - Name = 1; - - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - IsOnline = IsOnline + joinOffset; - ForceOccupied = ForceOccupied + joinOffset; - ForceVacant = ForceVacant + joinOffset; - EnableRawStates = EnableRawStates + joinOffset; - RoomOccupiedFeedback = RoomOccupiedFeedback + joinOffset; - GraceOccupancyDetectedFeedback = GraceOccupancyDetectedFeedback + joinOffset; - RoomVacantFeedback = RoomVacantFeedback + joinOffset; - RawOccupancyFeedback = RawOccupancyFeedback + joinOffset; - RawOccupancyPirFeedback = RawOccupancyPirFeedback + joinOffset; - RawOccupancyUsFeedback = RawOccupancyUsFeedback + joinOffset; - EnableLedFlash = EnableLedFlash + joinOffset; - DisableLedFlash = DisableLedFlash + joinOffset; - EnableShortTimeout = EnableShortTimeout + joinOffset; - DisableShortTimeout = DisableShortTimeout + joinOffset; - OrWhenVacated = OrWhenVacated + joinOffset; - AndWhenVacated = AndWhenVacated + joinOffset; - EnableUsA = EnableUsA + joinOffset; - DisableUsA = DisableUsA + joinOffset; - EnableUsB = EnableUsB + joinOffset; - DisableUsB = DisableUsB + joinOffset; - EnablePir = EnablePir + joinOffset; - DisablePir = DisablePir + joinOffset; - IncrementUsInOccupiedState = IncrementUsInOccupiedState + joinOffset; - DecrementUsInOccupiedState = DecrementUsInOccupiedState + joinOffset; - IncrementUsInVacantState = IncrementUsInVacantState + joinOffset; - DecrementUsInVacantState = DecrementUsInVacantState + joinOffset; - IncrementPirInOccupiedState = IncrementPirInOccupiedState + joinOffset; - DecrementPirInOccupiedState = DecrementPirInOccupiedState + joinOffset; - IncrementPirInVacantState = IncrementPirInVacantState + joinOffset; - DecrementPirInVacantState = DecrementPirInVacantState + joinOffset; - - Timeout = Timeout + joinOffset; - TimeoutLocalFeedback = TimeoutLocalFeedback + joinOffset; - InternalPhotoSensorValue = InternalPhotoSensorValue + joinOffset; - ExternalPhotoSensorValue = ExternalPhotoSensorValue + joinOffset; - UsSensitivityInOccupiedState = UsSensitivityInOccupiedState + joinOffset; - UsSensitivityInVacantState = UsSensitivityInVacantState + joinOffset; - PirSensitivityInOccupiedState = PirSensitivityInOccupiedState + joinOffset; - PirSensitivityInVacantState = PirSensitivityInVacantState + joinOffset; - - Name = Name + joinOffset; - } - } - -} diff --git a/PepperDashEssentials/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs deleted file mode 100644 index d9fad27e..00000000 --- a/PepperDashEssentials/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs +++ /dev/null @@ -1,120 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Bridges -{ - [Obsolete("Please use version PepperDash.Essentials.Core.Bridges")] - public class HdMdxxxCEControllerJoinMap : JoinMapBase - { - #region Digitals - /// - /// High when the pair is online - /// - public uint IsOnline { get; set; } - - /// - /// High when the remote end device is online - /// - public uint RemoteEndDetected { get; set; } - - /// - /// Sets Auto Route On and provides feedback - /// - public uint AutoRouteOn { get; set; } - - /// - /// Sets Auto Route Off and provides feedback - /// - public uint AutoRouteOff { get; set; } - - /// - /// Sets Priority Routing On and provides feedback - /// - public uint PriorityRoutingOn { get; set; } - - /// - /// Sets Priority Routing Off and provides feedback - /// - public uint PriorityRoutingOff { get; set; } - - /// - /// Enables OSD and provides feedback - /// - public uint InputOnScreenDisplayEnabled { get; set; } - - /// - /// Disables OSD and provides feedback - /// - public uint InputOnScreenDisplayDisabled { get; set; } - - /// - /// Provides Video Sync Detected feedback for each input - /// - public uint SyncDetected { get; set; } - #endregion - - #region Analogs - /// - /// Sets the video source for the receiver's HDMI out and provides feedback - /// - public uint VideoSource { get; set; } - - /// - /// Indicates the number of sources supported by the Tx/Rx pair - /// - public uint SourceCount { get; set; } - #endregion - - #region Serials - /// - /// Indicates the name of each input port - /// - public uint SourceNames { get; set; } - #endregion - - public HdMdxxxCEControllerJoinMap() - { - //Digital - IsOnline = 1; - RemoteEndDetected = 2; - AutoRouteOn = 3; - AutoRouteOff = 4; - PriorityRoutingOn = 5; - PriorityRoutingOff = 6; - InputOnScreenDisplayEnabled = 7; - InputOnScreenDisplayDisabled = 8; - SyncDetected = 10; // 11-15 - - //Analog - VideoSource = 1; - SourceCount = 2; - - //Serials - SourceNames = 10; // 11-15 - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - IsOnline = IsOnline + joinOffset; - RemoteEndDetected = RemoteEndDetected + joinOffset; - AutoRouteOn = AutoRouteOn + joinOffset; - AutoRouteOff = AutoRouteOff + joinOffset; - PriorityRoutingOn = PriorityRoutingOn + joinOffset; - PriorityRoutingOff = PriorityRoutingOff + joinOffset; - InputOnScreenDisplayEnabled = InputOnScreenDisplayEnabled + joinOffset; - InputOnScreenDisplayDisabled = InputOnScreenDisplayDisabled + joinOffset; - SyncDetected = SyncDetected + joinOffset; - - VideoSource = VideoSource + joinOffset; - SourceCount = SourceCount + joinOffset; - - SourceNames = SourceNames + joinOffset; - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/IBasicCommunicationJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/IBasicCommunicationJoinMap.cs deleted file mode 100644 index c8939ef8..00000000 --- a/PepperDashEssentials/Bridges/JoinMaps/IBasicCommunicationJoinMap.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Bridges -{ - [Obsolete("Please use version PepperDash.Essentials.Core.Bridges")] - public class IBasicCommunicationJoinMap : JoinMapBase - { - #region Digitals - /// - /// Set High to connect, Low to disconnect - /// - public uint Connect { get; set; } - /// - /// Reports Connected State (High = Connected) - /// - public uint Connected { get; set; } - #endregion - - #region Analogs - /// - /// Reports the connections status value - /// - public uint Status { get; set; } - #endregion - - #region Serials - /// - /// Data back from port - /// - public uint TextReceived { get; set; } - /// - /// Sends data to the port - /// - public uint SendText { get; set; } - /// - /// Takes a JSON serialized string that sets a COM port's parameters - /// - public uint SetPortConfig { get; set; } - #endregion - - public IBasicCommunicationJoinMap() - { - TextReceived = 1; - SendText = 1; - SetPortConfig = 2; - Connect = 1; - Connected = 1; - Status = 1; - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - TextReceived = TextReceived + joinOffset; - SendText = SendText + joinOffset; - SetPortConfig = SetPortConfig + joinOffset; - Connect = Connect + joinOffset; - Connected = Connected + joinOffset; - Status = Status + joinOffset; - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/IDigitalInputJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/IDigitalInputJoinMap.cs deleted file mode 100644 index a4c4aaa9..00000000 --- a/PepperDashEssentials/Bridges/JoinMaps/IDigitalInputJoinMap.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Bridges -{ - [Obsolete("Please use version PepperDash.Essentials.Core.Bridges")] - public class IDigitalInputJoinMap : JoinMapBase - { - #region Digitals - /// - /// Reports the state of the digital input - /// - public uint InputState { get; set; } - #endregion - - public IDigitalInputJoinMap() - { - InputState = 1; - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - InputState = InputState + joinOffset; - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/SetTopBoxControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/SetTopBoxControllerJoinMap.cs deleted file mode 100644 index 20b0d9a9..00000000 --- a/PepperDashEssentials/Bridges/JoinMaps/SetTopBoxControllerJoinMap.cs +++ /dev/null @@ -1,213 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Essentials.Core; -using Crestron.SimplSharp.Reflection; - - -namespace PepperDash.Essentials.Bridges -{ - [Obsolete("Please use version PepperDash.Essentials.Core.Bridges")] - public class SetTopBoxControllerJoinMap : JoinMapBase - { - #region Digitals - public uint DvrList { get; set; } // - public uint Replay { get; set; } - public uint Up { get; set; } // - public uint Down { get; set; } // - public uint Left { get; set; } // - public uint Right { get; set; } // - public uint Select { get; set; } // - public uint Menu { get; set; } // - public uint Exit { get; set; } // - public uint Digit0 { get; set; } // - public uint Digit1 { get; set; } // - public uint Digit2 { get; set; } // - public uint Digit3 { get; set; } // - public uint Digit4 { get; set; } // - public uint Digit5 { get; set; } // - public uint Digit6 { get; set; } // - public uint Digit7 { get; set; } // - public uint Digit8 { get; set; } // - public uint Digit9 { get; set; } // - public uint Dash { get; set; } // - public uint KeypadEnter { get; set; } // - public uint ChannelUp { get; set; } // - public uint ChannelDown { get; set; } // - public uint LastChannel { get; set; } // - public uint Guide { get; set; } // - public uint Info { get; set; } // - public uint Red { get; set; } // - public uint Green { get; set; } // - public uint Yellow { get; set; } // - public uint Blue { get; set; } // - public uint ChapMinus { get; set; } - public uint ChapPlus { get; set; } - public uint FFwd { get; set; } // - public uint Pause { get; set; } // - public uint Play { get; set; } // - public uint Record { get; set; } - public uint Rewind { get; set; } // - public uint Stop { get; set; } // - - public uint PowerOn { get; set; } // - public uint PowerOff { get; set; } // - public uint PowerToggle { get; set; } // - - public uint HasKeypadAccessoryButton1 { get; set; } - public uint HasKeypadAccessoryButton2 { get; set; } - - public uint KeypadAccessoryButton1Press { get; set; } - public uint KeypadAccessoryButton2Press { get; set; } - - - public uint HasDvr { get; set; } - public uint HasPresets { get; set; } - public uint HasNumeric { get; set; } - public uint HasDpad { get; set; } - - - #endregion - - #region Analogs - - #endregion - - #region Strings - public uint Name { get; set; } - public uint LoadPresets { get; set; } - public uint KeypadAccessoryButton1Label { get; set; } - public uint KeypadAccessoryButton2Label { get; set; } - - #endregion - - public SetTopBoxControllerJoinMap() - { - PowerOn = 1; - PowerOff = 2; - PowerToggle = 3; - - HasDpad = 4; - Up = 4; - Down = 5; - Left = 6; - Right = 7; - Select = 8; - Menu = 9; - Exit = 10; - - HasNumeric = 11; - Digit0 = 11; - Digit1 = 12; - Digit2 = 13; - Digit3 = 14; - Digit4 = 15; - Digit5 = 16; - Digit6 = 17; - Digit7 = 18; - Digit8 = 19; - Digit9 = 20; - Dash = 21; - KeypadEnter = 22; - ChannelUp = 23; - ChannelDown = 24; - LastChannel = 25; - - Guide = 26; - Info = 27; - Red = 28; - Green = 29; - Yellow = 30; - Blue = 31; - - HasDvr = 32; - DvrList = 32; - Play = 33; - Pause = 34; - Stop = 35; - FFwd = 36; - Rewind = 37; - ChapPlus = 38; - ChapMinus = 39; - Replay = 40; - Record = 41; - HasKeypadAccessoryButton1 = 42; - KeypadAccessoryButton1Press = 42; - HasKeypadAccessoryButton2 = 43; - KeypadAccessoryButton2Press = 43; - - Name = 1; - KeypadAccessoryButton1Label = 42; - KeypadAccessoryButton2Label = 43; - - LoadPresets = 50; - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - PowerOn += joinOffset; - PowerOff += joinOffset; - PowerToggle += joinOffset; - - HasDpad += joinOffset; - Up += joinOffset; - Down += joinOffset; - Left += joinOffset; - Right += joinOffset; - Select += joinOffset; - Menu += joinOffset; - Exit += joinOffset; - - HasNumeric += joinOffset; - Digit0 += joinOffset; - Digit1 += joinOffset; - Digit2 += joinOffset; - Digit3 += joinOffset; - Digit4 += joinOffset; - Digit5 += joinOffset; - Digit6 += joinOffset; - Digit7 += joinOffset; - Digit8 += joinOffset; - Digit9 += joinOffset; - Dash += joinOffset; - KeypadEnter += joinOffset; - ChannelUp += joinOffset; - ChannelDown += joinOffset; - LastChannel += joinOffset; - - Guide += joinOffset; - Info += joinOffset; - Red += joinOffset; - Green += joinOffset; - Yellow += joinOffset; - Blue += joinOffset; - - HasDvr += joinOffset; - DvrList += joinOffset; - Play += joinOffset; - Pause += joinOffset; - Stop += joinOffset; - FFwd += joinOffset; - Rewind += joinOffset; - ChapPlus += joinOffset; - ChapMinus += joinOffset; - Replay += joinOffset; - Record += joinOffset; - HasKeypadAccessoryButton1 += joinOffset; - KeypadAccessoryButton1Press += joinOffset; - HasKeypadAccessoryButton2 += joinOffset; - KeypadAccessoryButton2Press += joinOffset; - - Name += joinOffset; - KeypadAccessoryButton1Label += joinOffset; - KeypadAccessoryButton2Label += joinOffset; - - LoadPresets += joinOffset; - } - - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/StatusSignControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/StatusSignControllerJoinMap.cs deleted file mode 100644 index 3d8916a7..00000000 --- a/PepperDashEssentials/Bridges/JoinMaps/StatusSignControllerJoinMap.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using System.Linq; -using Crestron.SimplSharp.Reflection; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Bridges -{ - [Obsolete("Please use version PepperDash.Essentials.Core.Bridges")] - public class StatusSignControllerJoinMap:JoinMapBase - { - public uint IsOnline { get; set; } - public uint Name { get; set; } - public uint RedLed { get; set; } - public uint GreenLed { get; set; } - public uint BlueLed { get; set; } - public uint RedControl { get; set; } - public uint GreenControl { get; set; } - public uint BlueControl { get; set; } - - public StatusSignControllerJoinMap() - { - //digital - IsOnline = 1; - RedControl = 2; - GreenControl = 3; - BlueControl = 4; - - //Analog - RedLed = 2; - GreenLed = 3; - BlueLed = 4; - - //string - Name = 1; - - - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - var properties = - GetType().GetCType().GetProperties().Where(p => p.PropertyType == typeof (uint)).ToList(); - - foreach (var propertyInfo in properties) - { - propertyInfo.SetValue(this, (uint) propertyInfo.GetValue(this, null) + joinOffset, null); - } - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/SystemMonitorJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/SystemMonitorJoinMap.cs deleted file mode 100644 index fe59416a..00000000 --- a/PepperDashEssentials/Bridges/JoinMaps/SystemMonitorJoinMap.cs +++ /dev/null @@ -1,227 +0,0 @@ -using System; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Bridges -{ - [Obsolete("Please use version PepperDash.Essentials.Core.Bridges")] - public class SystemMonitorJoinMap : JoinMapBase - { - /// - /// Offset to indicate where the range of iterated program joins will start - /// - public uint ProgramStartJoin { get; set; } - - /// - /// Offset to indicate where the range of iterated Ethernet joins will start - /// - public uint EthernetStartJoin { get; set; } - - /// - /// Offset between each program join set - /// - public uint ProgramOffsetJoin { get; set; } - - /// - /// Offset between each Ethernet Interface join set - /// - public uint EthernetOffsetJoin { get; set; } - - #region Digitals - /// - /// Range Sets and reports whether the corresponding program slot is started - /// - public uint ProgramStart { get; set; } - /// - /// Range Sets and reports whether the corresponding program slot is stopped - /// - public uint ProgramStop { get; set; } - /// - /// Range Sets and reports whether the corresponding program is registered - /// - public uint ProgramRegister { get; set; } - /// - /// Range Sets and reports whether the corresponding program is unregistered - /// - public uint ProgramUnregister { get; set; } - #endregion - - #region Analogs - /// - /// Sets and reports the time zone - /// - public uint TimeZone { get; set; } - #endregion - - #region Serials - /// - /// Reports the time zone name - /// - public uint TimeZoneName { get; set; } - /// - /// Reports the IO Controller Version - /// - public uint IOControllerVersion { get; set; } - /// - /// Reports the SNMP App Version - /// - public uint SnmpAppVersion { get; set; } - /// - /// Reports the BACnet App Version - /// - public uint BACnetAppVersion { get; set; } - /// - /// Reports the firmware version - /// - public uint ControllerVersion { get; set; } - - /// - /// Reports the name of the corresponding program - /// - public uint ProgramName { get; set; } - /// - /// Reports the compile time of the corresponding program - /// - public uint ProgramCompiledTime { get; set; } - /// - /// Reports the Crestron Database version of the corresponding program - /// - public uint ProgramCrestronDatabaseVersion { get; set; } - /// - /// Reports the Environment Version of the corresponding program - /// - public uint ProgramEnvironmentVersion { get; set; } - /// - /// Serialized JSON output that aggregates the program info of the corresponding program - /// - public uint AggregatedProgramInfo { get; set; } - /// - /// Reports the controller serial number - /// - public uint SerialNumber { get; set; } - /// - /// Reports the controller model - /// - public uint Model { get; set; } - /// - /// Reports the Host name set on the corresponding interface - /// - public uint HostName { get; set; } - /// - /// Reports the Current IP address set on the corresponding interface. If DHCP is enabled, this will be the DHCP assigned address. - /// - public uint CurrentIpAddress { get; set; } - /// - /// Reporst the Current Default Gateway set on the corresponding interface. If DHCP is enabled, this will be the DHCP assigned gateway - /// - public uint CurrentDefaultGateway { get; set; } - /// - /// Reports the Current Subnet Mask set on the corresponding interface. If DHCP is enabled, this will be the DHCP assigned subnet mask - /// - public uint CurrentSubnetMask { get; set; } - /// - /// Reports the Static IP address set on the corresponding interface. If DHCP is disabled, this will match the Current IP address - /// - public uint StaticIpAddress { get; set; } - /// - /// Reporst the Static Default Gateway set on the corresponding interface. If DHCP is disabled, this will match the Current gateway - /// - public uint StaticDefaultGateway { get; set; } - /// - /// Reports the Current Subnet Mask set on the corresponding interface. If DHCP is enabled, this will be the DHCP assigned subnet mask - /// - public uint StaticSubnetMask { get; set; } - /// - /// Reports the current DomainFeedback on the corresponding interface - /// - public uint Domain { get; set; } - /// - /// Reports the current DNS Servers on the corresponding interface - /// - public uint DnsServer { get; set; } - /// - /// Reports the MAC Address of the corresponding interface - /// - public uint MacAddress { get; set; } - /// - /// Reports the DHCP Status of the corresponding interface - /// - public uint DhcpStatus { get; set; } - - /// - /// Reports the current uptime. Updated in 5 minute intervals. - /// - public uint Uptime { get; set; } - - /// - /// Reports the date of the last boot - /// - public uint LastBoot { get; set; } - #endregion - - public SystemMonitorJoinMap() - { - TimeZone = 1; - - TimeZoneName = 1; - IOControllerVersion = 2; - SnmpAppVersion = 3; - BACnetAppVersion = 4; - ControllerVersion = 5; - SerialNumber = 6; - Model = 7; - Uptime = 8; - LastBoot = 9; - - - ProgramStartJoin = 10; - - ProgramOffsetJoin = 5; - - // Offset in groups of 5 joins - ProgramStart = 1; - ProgramStop = 2; - ProgramRegister = 3; - ProgramUnregister = 4; - - ProgramName = 1; - ProgramCompiledTime = 2; - ProgramCrestronDatabaseVersion = 3; - ProgramEnvironmentVersion = 4; - AggregatedProgramInfo = 5; - - EthernetStartJoin = 75; - - EthernetOffsetJoin = 15; - - // Offset in groups of 15 - HostName = 1; - CurrentIpAddress = 2; - CurrentSubnetMask = 3; - CurrentDefaultGateway = 4; - StaticIpAddress = 5; - StaticSubnetMask = 6; - StaticDefaultGateway = 7; - Domain = 8; - DnsServer = 9; - MacAddress = 10; - DhcpStatus = 11; - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - TimeZone = TimeZone + joinOffset; - - TimeZoneName = TimeZoneName + joinOffset; - IOControllerVersion = IOControllerVersion + joinOffset; - SnmpAppVersion = SnmpAppVersion + joinOffset; - BACnetAppVersion = BACnetAppVersion + joinOffset; - ControllerVersion = ControllerVersion + joinOffset; - - // Sets the initial join value where the iterated program joins will begin - ProgramStartJoin = ProgramStartJoin + joinOffset; - EthernetStartJoin = EthernetStartJoin + joinOffset; - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/StatusSignControllerBridge.cs b/PepperDashEssentials/Bridges/StatusSignControllerBridge.cs deleted file mode 100644 index 0b35677d..00000000 --- a/PepperDashEssentials/Bridges/StatusSignControllerBridge.cs +++ /dev/null @@ -1,65 +0,0 @@ -using Crestron.SimplSharpPro.DeviceSupport; -using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.CrestronIO; - -namespace PepperDash.Essentials.Core.Bridges -{ - public static class StatusSignDeviceApiExtensions - { - public static void LinkToApi(this StatusSignController ssDevice, BasicTriList trilist, uint joinStart, - string joinMapKey) - { - var joinMap = new StatusSignControllerJoinMap(); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - joinMap.OffsetJoinNumbers(joinStart); - - Debug.Console(1, ssDevice, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - - trilist.SetBoolSigAction(joinMap.RedControl, b => EnableControl(trilist, joinMap, ssDevice)); - trilist.SetBoolSigAction(joinMap.GreenControl, 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.GreenLed, u => SetColor(trilist, joinMap, ssDevice)); - trilist.SetUShortSigAction(joinMap.BlueLed, u => SetColor(trilist, joinMap, ssDevice)); - - trilist.StringInput[joinMap.Name].StringValue = ssDevice.Name; - - ssDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]); - ssDevice.RedLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RedControl]); - ssDevice.BlueLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.BlueControl]); - ssDevice.GreenLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.GreenControl]); - - ssDevice.RedLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.RedLed]); - ssDevice.BlueLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.BlueLed]); - ssDevice.GreenLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.GreenLed]); - - } - - private static void EnableControl(BasicTriList triList, StatusSignControllerJoinMap joinMap, - StatusSignController device) - { - var redEnable = triList.BooleanOutput[joinMap.RedControl].BoolValue; - var greenEnable = triList.BooleanOutput[joinMap.GreenControl].BoolValue; - var blueEnable = triList.BooleanOutput[joinMap.BlueControl].BoolValue; - device.EnableLedControl(redEnable, greenEnable, blueEnable); - } - - private static void SetColor(BasicTriList triList, StatusSignControllerJoinMap joinMap, - StatusSignController device) - { - var redBrightness = triList.UShortOutput[joinMap.RedLed].UShortValue; - var greenBrightness = triList.UShortOutput[joinMap.GreenLed].UShortValue; - var blueBrightness = triList.UShortOutput[joinMap.BlueLed].UShortValue; - - device.SetColor(redBrightness, greenBrightness, blueBrightness); - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/SystemMonitorBridge.cs b/PepperDashEssentials/Bridges/SystemMonitorBridge.cs deleted file mode 100644 index 5999c500..00000000 --- a/PepperDashEssentials/Bridges/SystemMonitorBridge.cs +++ /dev/null @@ -1,108 +0,0 @@ -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.Diagnostics; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Monitoring; - -using Newtonsoft.Json; - -namespace PepperDash.Essentials.Core.Bridges -{ - public static class SystemMonitorBridge - { - public static void LinkToApi(this SystemMonitorController systemMonitorController, BasicTriList trilist, uint joinStart, string joinMapKey) - { - var joinMap = new SystemMonitorJoinMap(); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if(!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - joinMap.OffsetJoinNumbers(joinStart); - - Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - Debug.Console(2, systemMonitorController, "Linking API starting at join: {0}", joinStart); - - systemMonitorController.TimeZoneFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeZone]); - systemMonitorController.TimeZoneTextFeedback.LinkInputSig(trilist.StringInput[joinMap.TimeZoneName]); - - systemMonitorController.IoControllerVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.IOControllerVersion]); - systemMonitorController.SnmpVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.SnmpAppVersion]); - systemMonitorController.BaCnetAppVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.BACnetAppVersion]); - systemMonitorController.ControllerVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.ControllerVersion]); - systemMonitorController.SerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.SerialNumber]); - systemMonitorController.ModelFeedback.LinkInputSig(trilist.StringInput[joinMap.Model]); - systemMonitorController.UptimeFeedback.LinkInputSig(trilist.StringInput[joinMap.Uptime]); - systemMonitorController.LastStartFeedback.LinkInputSig(trilist.StringInput[joinMap.LastBoot]); - - // iterate the program status feedback collection and map all the joins - LinkProgramInfoJoins(systemMonitorController, trilist, joinMap); - - LinkEthernetInfoJoins(systemMonitorController, trilist, joinMap); - } - - private static void LinkEthernetInfoJoins(SystemMonitorController systemMonitorController, BasicTriList trilist, SystemMonitorJoinMap joinMap) - { - var ethernetSlotJoinStart = joinMap.EthernetStartJoin; - - foreach (var fb in systemMonitorController.EthernetStatusFeedbackCollection) - { - fb.Value.CurrentIpAddressFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.CurrentIpAddress]); - fb.Value.CurrentSubnetMaskFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.CurrentSubnetMask]); - fb.Value.CurrentDefaultGatewayFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.CurrentDefaultGateway]); - fb.Value.StaticIpAddressFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.StaticIpAddress]); - fb.Value.StaticSubnetMaskFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.StaticSubnetMask]); - fb.Value.StaticDefaultGatewayFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.StaticDefaultGateway]); - fb.Value.HostNameFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.HostName]); - fb.Value.MacAddressFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.MacAddress]); - fb.Value.DomainFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.Domain]); - fb.Value.DnsServerFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.DnsServer]); - fb.Value.DhcpStatusFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.DhcpStatus]); - - ethernetSlotJoinStart += joinMap.EthernetOffsetJoin; - } - } - - private static void LinkProgramInfoJoins(SystemMonitorController systemMonitorController, BasicTriList trilist, - SystemMonitorJoinMap joinMap) - { - var programSlotJoinStart = joinMap.ProgramStartJoin; - - foreach (var p in systemMonitorController.ProgramStatusFeedbackCollection) - { - var programNumber = p.Value.Program.Number; - - trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramStart, - b => SystemMonitor.ProgramCollection[programNumber].OperatingState = eProgramOperatingState.Start); - p.Value.ProgramStartedFeedback.LinkInputSig(trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramStart]); - - trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramStop, - b => SystemMonitor.ProgramCollection[programNumber].OperatingState = eProgramOperatingState.Stop); - p.Value.ProgramStoppedFeedback.LinkInputSig(trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramStop]); - - trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramRegister, - b => SystemMonitor.ProgramCollection[programNumber].RegistrationState = eProgramRegistrationState.Register); - p.Value.ProgramRegisteredFeedback.LinkInputSig( - trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramRegister]); - - trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramUnregister, - b => SystemMonitor.ProgramCollection[programNumber].RegistrationState = eProgramRegistrationState.Unregister); - p.Value.ProgramUnregisteredFeedback.LinkInputSig( - trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramUnregister]); - - p.Value.ProgramNameFeedback.LinkInputSig(trilist.StringInput[programSlotJoinStart + joinMap.ProgramName]); - p.Value.ProgramCompileTimeFeedback.LinkInputSig( - trilist.StringInput[programSlotJoinStart + joinMap.ProgramCompiledTime]); - p.Value.CrestronDataBaseVersionFeedback.LinkInputSig( - trilist.StringInput[programSlotJoinStart + joinMap.ProgramCrestronDatabaseVersion]); - p.Value.EnvironmentVersionFeedback.LinkInputSig( - trilist.StringInput[programSlotJoinStart + joinMap.ProgramEnvironmentVersion]); - p.Value.AggregatedProgramInfoFeedback.LinkInputSig( - trilist.StringInput[programSlotJoinStart + joinMap.AggregatedProgramInfo]); - - programSlotJoinStart = programSlotJoinStart + joinMap.ProgramOffsetJoin; - } - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Fusion/FusionSystemController.cs.orig b/PepperDashEssentials/Fusion/FusionSystemController.cs.orig deleted file mode 100644 index f783b3c7..00000000 --- a/PepperDashEssentials/Fusion/FusionSystemController.cs.orig +++ /dev/null @@ -1,1415 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Crestron.SimplSharp; -using Crestron.SimplSharp.CrestronIO; -using Crestron.SimplSharp.CrestronXml; -using Crestron.SimplSharp.CrestronXml.Serialization; -using Crestron.SimplSharp.CrestronXmlLinq; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.Fusion; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; - -using PepperDash.Core; -using PepperDash.Essentials; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Devices.Common; - - - -namespace PepperDash.Essentials.Fusion -{ - public class EssentialsHuddleSpaceFusionSystemController : Device - { - public event EventHandler ScheduleChange; - public event EventHandler MeetingEndWarning; - public event EventHandler NextMeetingBeginWarning; - - FusionRoom FusionRoom; - EssentialsHuddleSpaceRoom Room; - Dictionary SourceToFeedbackSigs = - new Dictionary(); - - //BooleanSigData OccupancyStatusSig; - - StatusMonitorCollection ErrorMessageRollUp; - - StringSigData CurrentRoomSourceNameSig; - - #region System Info Sigs - //StringSigData SystemName; - //StringSigData Model; - //StringSigData SerialNumber; - //StringSigData Uptime; - #endregion - - - #region Processor Info Sigs - StringSigData Ip1; - StringSigData Ip2; - StringSigData Gateway; - StringSigData Hostname; - StringSigData Domain; - StringSigData Dns1; - StringSigData Dns2; - StringSigData Mac1; - StringSigData Mac2; - StringSigData NetMask1; - StringSigData NetMask2; - StringSigData Firmware; - - StringSigData[] Program = new StringSigData[10]; - #endregion - - #region Default Display Source Sigs - - BooleanSigData[] Source = new BooleanSigData[10]; - - #endregion - - RoomSchedule CurrentSchedule; - - Event NextMeeting; - - Event CurrentMeeting; - - string RoomGuid - { - get - { - return GUIDs.RoomGuid; - } - - } - - uint IpId; - - FusionRoomGuids GUIDs; - - bool GuidFileExists; - - bool IsRegisteredForSchedulePushNotifications = false; - - CTimer PollTimer = null; - - CTimer PushNotificationTimer = null; - - // Default poll time is 5 min unless overridden by config value - public long SchedulePollInterval = 300000; - - public long PushNotificationTimeout = 5000; - - Dictionary FusionStaticAssets; - - FusionOccupancySensorAsset FusionOccSensor; - - //ScheduleResponseEvent NextMeeting; - - public EssentialsHuddleSpaceFusionSystemController(EssentialsHuddleSpaceRoom room, uint ipId) - : base(room.Key + "-fusion") - { - - Room = room; - - IpId = ipId; - - FusionStaticAssets = new Dictionary(); - - GUIDs = new FusionRoomGuids(); - - var mac = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_MAC_ADDRESS, 0); - - var slot = Global.ControlSystem.ProgramNumber; - - string guidFilePath = string.Format(@"\NVRAM\Program{0}\{1}-FusionGuids.json", Global.ControlSystem.ProgramNumber, InitialParametersClass.ProgramIDTag); - - GuidFileExists = File.Exists(guidFilePath); - - if (GuidFileExists) - { - ReadGuidFile(guidFilePath); - } - else - { - GUIDs = new FusionRoomGuids(Room.Name, ipId, GUIDs.GenerateNewRoomGuid(slot, mac), FusionStaticAssets); - } - - CreateSymbolAndBasicSigs(IpId); - SetUpSources(); - SetUpCommunitcationMonitors(); - SetUpDisplay(); - SetUpError(); - //SetUpOccupancy(); - - // Make it so! - FusionRVI.GenerateFileForAllFusionDevices(); - - GenerateGuidFile(guidFilePath); - } - - /// - /// Generates the guid file in NVRAM. If the file already exists it will be overwritten. - /// - /// path for the file - void GenerateGuidFile(string filePath) - { - if (string.IsNullOrEmpty(filePath)) - { - Debug.Console(0, this, "Error writing guid file. No path specified."); - return; - } - - CCriticalSection _fileLock = new CCriticalSection(); - - try - { - if (_fileLock == null || _fileLock.Disposed) - return; - - _fileLock.Enter(); - - Debug.Console(1, this, "Writing GUIDs to file"); - - if (FusionOccSensor == null) - GUIDs = new FusionRoomGuids(Room.Name, IpId, RoomGuid, FusionStaticAssets); - else - GUIDs = new FusionRoomGuids(Room.Name, IpId, RoomGuid, FusionStaticAssets, FusionOccSensor); - - var JSON = JsonConvert.SerializeObject(GUIDs, Newtonsoft.Json.Formatting.Indented); - - using (StreamWriter sw = new StreamWriter(filePath)) - { - sw.Write(JSON); - sw.Flush(); - } - - Debug.Console(1, this, "Guids successfully written to file '{0}'", filePath); - - } - catch (Exception e) - { - Debug.Console(0, this, "Error writing guid file: {0}", e); - } - finally - { - if (_fileLock != null && !_fileLock.Disposed) - _fileLock.Leave(); - } - } - - /// - /// Reads the guid file from NVRAM - /// - /// path for te file - void ReadGuidFile(string filePath) - { - if(string.IsNullOrEmpty(filePath)) - { - Debug.Console(0, this, "Error reading guid file. No path specified."); - return; - } - - CCriticalSection _fileLock = new CCriticalSection(); - - try - { - if(_fileLock == null || _fileLock.Disposed) - return; - - _fileLock.Enter(); - - if(File.Exists(filePath)) - { - var JSON = File.ReadToEnd(filePath, Encoding.ASCII); - - GUIDs = JsonConvert.DeserializeObject(JSON); - - IpId = GUIDs.IpId; - - FusionStaticAssets = GUIDs.StaticAssets; - - } - - Debug.Console(0, this, "Fusion Guids successfully read from file:"); - - Debug.Console(1, this, "\nRoom Name: {0}\nIPID: {1:x}\n RoomGuid: {2}", Room.Name, IpId, RoomGuid); - - foreach (KeyValuePair item in FusionStaticAssets) - { - Debug.Console(1, this, "\nAsset Name: {0}\nAsset No: {1}\n Guid: {2}", item.Value.Name, item.Value.SlotNumber, item.Value.InstanceId); - } - } - catch (Exception e) - { - Debug.Console(0, this, "Error reading guid file: {0}", e); - } - finally - { - if(_fileLock != null && !_fileLock.Disposed) - _fileLock.Leave(); - } - - } - - void CreateSymbolAndBasicSigs(uint ipId) - { - Debug.Console(1, this, "Creating Fusion Room symbol with GUID: {0}", RoomGuid); - - FusionRoom = new FusionRoom(ipId, Global.ControlSystem, Room.Name, RoomGuid); - FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.Use(); - FusionRoom.ExtenderFusionRoomDataReservedSigs.Use(); - - FusionRoom.Register(); - - FusionRoom.FusionStateChange += new FusionStateEventHandler(FusionRoom_FusionStateChange); - - FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.DeviceExtenderSigChange += new DeviceExtenderJoinChangeEventHandler(FusionRoomSchedule_DeviceExtenderSigChange); - FusionRoom.ExtenderFusionRoomDataReservedSigs.DeviceExtenderSigChange += new DeviceExtenderJoinChangeEventHandler(ExtenderFusionRoomDataReservedSigs_DeviceExtenderSigChange); - FusionRoom.OnlineStatusChange += new OnlineStatusChangeEventHandler(FusionRoom_OnlineStatusChange); - - 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(CreateAsHocMeeting, "FusCreateMeeting", "Creates and Ad Hoc meeting for on hour or until the next meeting", ConsoleAccessLevelEnum.AccessOperator); - - // Room to fusion room - Room.OnFeedback.LinkInputSig(FusionRoom.SystemPowerOn.InputSig); - - // Moved to - CurrentRoomSourceNameSig = FusionRoom.CreateOffsetStringSig(84, "Display 1 - Current Source", eSigIoMask.InputSigOnly); - // Don't think we need to get current status of this as nothing should be alive yet. - Room.CurrentSingleSourceChange += new SourceInfoChangeHandler(Room_CurrentSourceInfoChange); - - - FusionRoom.SystemPowerOn.OutputSig.SetSigFalseAction(Room.PowerOnToDefaultOrLastSource); - FusionRoom.SystemPowerOff.OutputSig.SetSigFalseAction(() => Room.RunRouteAction("roomOff")); - // NO!! room.RoomIsOn.LinkComplementInputSig(FusionRoom.SystemPowerOff.InputSig); - FusionRoom.ErrorMessage.InputSig.StringValue = - "3: 7 Errors: This is a really long error message;This is a really long error message;This is a really long error message;This is a really long error message;This is a really long error message;This is a really long error message;This is a really long error message;"; - - GetProcessorEthernetValues(); - - GetSystemInfo(); - - GetProcessorInfo(); - - CrestronEnvironment.EthernetEventHandler += new EthernetEventHandler(CrestronEnvironment_EthernetEventHandler); - } - - void CrestronEnvironment_EthernetEventHandler(EthernetEventArgs ethernetEventArgs) - { - if (ethernetEventArgs.EthernetEventType == eEthernetEventType.LinkUp) - { - GetProcessorEthernetValues(); - } - } - - void GetSystemInfo() - { - //SystemName.InputSig.StringValue = Room.Name; - //Model.InputSig.StringValue = InitialParametersClass.ControllerPromptName; - //SerialNumber.InputSig.StringValue = InitialParametersClass. - - string response = string.Empty; - - var systemReboot = FusionRoom.CreateOffsetBoolSig(74, "Processor - Reboot", eSigIoMask.OutputSigOnly); - systemReboot.OutputSig.SetSigFalseAction(() => CrestronConsole.SendControlSystemCommand("reboot", ref response)); - } - - void GetProcessorEthernetValues() - { - Ip1 = FusionRoom.CreateOffsetStringSig(50, "Info - Processor - IP 1", eSigIoMask.InputSigOnly); - Ip2 = FusionRoom.CreateOffsetStringSig(51, "Info - Processor - IP 2", eSigIoMask.InputSigOnly); - Gateway = FusionRoom.CreateOffsetStringSig(52, "Info - Processor - Gateway", eSigIoMask.InputSigOnly); - Hostname = FusionRoom.CreateOffsetStringSig(53, "Info - Processor - Hostname", eSigIoMask.InputSigOnly); - Domain = FusionRoom.CreateOffsetStringSig(54, "Info - Processor - Domain", eSigIoMask.InputSigOnly); - Dns1 = FusionRoom.CreateOffsetStringSig(55, "Info - Processor - DNS 1", eSigIoMask.InputSigOnly); - Dns2 = FusionRoom.CreateOffsetStringSig(56, "Info - Processor - DNS 2", eSigIoMask.InputSigOnly); - Mac1 = FusionRoom.CreateOffsetStringSig(57, "Info - Processor - MAC 1", eSigIoMask.InputSigOnly); - Mac2 = FusionRoom.CreateOffsetStringSig(58, "Info - Processor - MAC 2", eSigIoMask.InputSigOnly); - NetMask1 = FusionRoom.CreateOffsetStringSig(59, "Info - Processor - Net Mask 1", eSigIoMask.InputSigOnly); - NetMask2 = FusionRoom.CreateOffsetStringSig(60, "Info - Processor - Net Mask 2", eSigIoMask.InputSigOnly); - - // Interface =0 - Ip1.InputSig.StringValue = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0); - Gateway.InputSig.StringValue = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_ROUTER, 0); - Hostname.InputSig.StringValue = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_HOSTNAME, 0); - Domain.InputSig.StringValue = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_DOMAIN_NAME, 0); - - var dnsServers = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_DNS_SERVER, 0).Split(','); - Dns1.InputSig.StringValue = dnsServers[0]; - if (dnsServers.Length > 1) - Dns2.InputSig.StringValue = dnsServers[1]; - - Mac1.InputSig.StringValue = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_MAC_ADDRESS, 0); - NetMask1.InputSig.StringValue = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_MASK, 0); - - // Interface 1 - - if (InitialParametersClass.NumberOfEthernetInterfaces > 1) // Only get these values if the processor has more than 1 NIC - { - Ip2.InputSig.StringValue = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 1); - Mac2.InputSig.StringValue = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_MAC_ADDRESS, 1); - NetMask2.InputSig.StringValue = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_MASK, 1); - } - } - - void GetProcessorInfo() - { - //SystemName = FusionRoom.CreateOffsetStringSig(50, "Info - Processor - System Name", eSigIoMask.InputSigOnly); - //Model = FusionRoom.CreateOffsetStringSig(51, "Info - Processor - Model", eSigIoMask.InputSigOnly); - //SerialNumber = FusionRoom.CreateOffsetStringSig(52, "Info - Processor - Serial Number", eSigIoMask.InputSigOnly); - //Uptime = FusionRoom.CreateOffsetStringSig(53, "Info - Processor - Uptime", eSigIoMask.InputSigOnly); - - Firmware = FusionRoom.CreateOffsetStringSig(61, "Info - Processor - Firmware", eSigIoMask.InputSigOnly); - - for (int i = 0; i < Global.ControlSystem.NumProgramsSupported; i++) - { - var join = 62 + i; - var progNum = i + 1; - Program[i] = FusionRoom.CreateOffsetStringSig((uint)join, string.Format("Info - Processor - Program {0}", progNum), eSigIoMask.InputSigOnly); - } - - Firmware.InputSig.StringValue = InitialParametersClass.FirmwareVersion; - - //var programs = ProcessorProgReg.GetProcessorProgReg(); - - //for (int i = 1; i < Global.ControlSystem.NumProgramsSupported; i++) - //{ - // var join = 62 + i; - // var progNum = i + 1; - // if (programs[i].Exists) - // Program[i].InputSig.StringValue = programs[i].Name; - //} - - } - - void GetTouchpanelInfo() - { - // TODO Get IP and Project Name from TP - } - - void FusionRoom_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) - { - if (args.DeviceOnLine) - { - CrestronEnvironment.Sleep(200); - - // Send Push Notification Action request: - - string requestID = "InitialPushRequest"; - - - string actionRequest = - string.Format("\n{0}\n", requestID) + - "RegisterPushModel\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n"; - - Debug.Console(2, this, "Sending Fusion ActionRequest: \n{0}", actionRequest); - - FusionRoom.ExtenderFusionRoomDataReservedSigs.ActionQuery.StringValue = actionRequest; - - - // Request current Fusion Server Time - - string timeRequestID = "TimeRequest"; - - string timeRequest = string.Format("{0}", timeRequestID); - - FusionRoom.ExtenderFusionRoomDataReservedSigs.LocalDateTimeQuery.StringValue = timeRequest; - } - - } - - /// - /// Generates a room schedule request for this room for the next 24 hours. - /// - /// string identifying this request. Used with a corresponding ScheduleResponse value - public void RequestFullRoomSchedule(object callbackObject) - { - DateTime now = DateTime.Today; - - string currentTime = now.ToString("s"); - - string requestTest = - string.Format("FullSchedleRequest{0}{1}24", RoomGuid, currentTime); - - Debug.Console(2, this, "Sending Fusion ScheduleQuery: \n{0}", requestTest); - - FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.ScheduleQuery.StringValue = requestTest; - - if (IsRegisteredForSchedulePushNotifications) - PushNotificationTimer.Stop(); - } - - /// - /// Wrapper method to allow console commands to modify the current meeting end time - /// - /// meetingID extendTime - public void ModifyMeetingEndTimeConsoleHelper(string command) - { - string requestID; - string meetingID = null; - int extendMinutes = -1; - - requestID = "ModifyMeetingTest12345"; - - try - { - var tokens = command.Split(' '); - - meetingID = tokens[0]; - extendMinutes = Int32.Parse(tokens[1]); - - } - catch (Exception e) - { - Debug.Console(1, this, "Error parsing console command: {0}", e); - } - - ModifyMeetingEndTime(requestID, extendMinutes); - - } - - /// - /// Ends or Extends the current meeting by the specified number of minutes. - /// - /// Number of minutes to extend the meeting. A value of 0 will end the meeting. - public void ModifyMeetingEndTime(string requestID, int extendMinutes) - { - if(CurrentMeeting == null) - { - Debug.Console(1, this, "No meeting in progress. Unable to modify end time."); - return; - } - - if (extendMinutes > -1) - { - if(extendMinutes > 0) - { - var extendTime = CurrentMeeting.dtEnd - DateTime.Now; - double extendMinutesRaw = extendTime.TotalMinutes; - - extendMinutes = extendMinutes + (int)Math.Round(extendMinutesRaw); - } - - - string requestTest = string.Format( - "{0}{1}MeetingChange" - , requestID, RoomGuid, CurrentMeeting.MeetingID, extendMinutes); - - Debug.Console(1, this, "Sending MeetingChange Request: \n{0}", requestTest); - - FusionRoom.ExtenderFusionRoomDataReservedSigs.ActionQuery.StringValue = requestTest; - } - else - { - Debug.Console(1, this, "Invalid time specified"); - } - - - } - - /// - /// Creates and Ad Hoc meeting with a duration of 1 hour, or until the next meeting if in less than 1 hour. - /// - public void CreateAsHocMeeting(string command) - { - string requestID = "CreateAdHocMeeting"; - - DateTime now = DateTime.Now.AddMinutes(1); - - now.AddSeconds(-now.Second); - - // Assume 1 hour meeting if possible - DateTime dtEnd = now.AddHours(1); - - // Check if room is available for 1 hour before next meeting - if (NextMeeting != null) - { - var roomAvailable = NextMeeting.dtEnd.Subtract(dtEnd); - - if (roomAvailable.TotalMinutes < 60) - { - /// Room not available for full hour, book until next meeting starts - dtEnd = NextMeeting.dtEnd; - } - } - - string createMeetingRequest = - "" + - string.Format("{0}", requestID) + - string.Format("{0}", RoomGuid) + - "" + - string.Format("{0}", now.ToString("s")) + - string.Format("{0}", dtEnd.ToString("s")) + - "AdHoc Meeting" + - "Room User" + - "Example Message" + - "" + - ""; - - Debug.Console(2, this, "Sending CreateMeeting Request: \n{0}", createMeetingRequest); - - FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.CreateMeeting.StringValue = createMeetingRequest; - - //Debug.Console(1, this, "Sending CreateMeeting Request: \n{0}", command); - - //FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.CreateMeeting.StringValue = command; - - } - - /// - /// Event handler method for Device Extender sig changes - /// - /// - /// - void ExtenderFusionRoomDataReservedSigs_DeviceExtenderSigChange(DeviceExtender currentDeviceExtender, SigEventArgs args) - { - Debug.Console(2, this, "Event: {0}\n Sig: {1}\nFusionResponse:\n{2}", args.Event, args.Sig.Name, args.Sig.StringValue); - - - if (args.Sig == FusionRoom.ExtenderFusionRoomDataReservedSigs.ActionQueryResponse) - { - try - { - XmlDocument message = new XmlDocument(); - - message.LoadXml(args.Sig.StringValue); - - var actionResponse = message["ActionResponse"]; - - if (actionResponse != null) - { - var requestID = actionResponse["RequestID"]; - - if (requestID.InnerText == "InitialPushRequest") - { - if (actionResponse["ActionID"].InnerText == "RegisterPushModel") - { - var parameters = actionResponse["Parameters"]; - - foreach (XmlElement parameter in parameters) - { - if (parameter.HasAttributes) - { - var attributes = parameter.Attributes; - - if (attributes["ID"].Value == "Registered") - { - var isRegistered = Int32.Parse(attributes["Value"].Value); - - if (isRegistered == 1) - { - IsRegisteredForSchedulePushNotifications = true; - - if (PollTimer != null && !PollTimer.Disposed) - { - PollTimer.Stop(); - PollTimer.Dispose(); - } - - PushNotificationTimer = new CTimer(RequestFullRoomSchedule, null, PushNotificationTimeout, PushNotificationTimeout); - - PushNotificationTimer.Reset(PushNotificationTimeout, PushNotificationTimeout); - } - else if (isRegistered == 0) - { - IsRegisteredForSchedulePushNotifications = false; - - if (PushNotificationTimer != null && !PushNotificationTimer.Disposed) - { - PushNotificationTimer.Stop(); - PushNotificationTimer.Dispose(); - } - - PollTimer = new CTimer(RequestFullRoomSchedule, null, SchedulePollInterval, SchedulePollInterval); - - PollTimer.Reset(SchedulePollInterval, SchedulePollInterval); - } - } - } - } - } - } - } - } - catch (Exception e) - { - Debug.Console(1, this, "Error parsing ActionQueryResponse: {0}", e); - } - } - else if (args.Sig == FusionRoom.ExtenderFusionRoomDataReservedSigs.LocalDateTimeQueryResponse) - { - try - { - XmlDocument message = new XmlDocument(); - - message.LoadXml(args.Sig.StringValue); - - var localDateTimeResponse = message["LocalTimeResponse"]; - - if (localDateTimeResponse != null) - { - var localDateTime = localDateTimeResponse["LocalDateTime"]; - - if (localDateTime != null) - { - var tempLocalDateTime = localDateTime.InnerText; - - DateTime currentTime = DateTime.Parse(tempLocalDateTime); - - Debug.Console(1, this, "DateTime from Fusion Server: {0}", currentTime); - - // Parse time and date from response and insert values - CrestronEnvironment.SetTimeAndDate((ushort)currentTime.Hour, (ushort)currentTime.Minute, (ushort)currentTime.Second, (ushort)currentTime.Month, (ushort)currentTime.Day, (ushort)currentTime.Year); - - Debug.Console(1, this, "Processor time set to {0}", CrestronEnvironment.GetLocalTime()); - } - } - } - catch (Exception e) - { - Debug.Console(1, this, "Error parsing LocalDateTimeQueryResponse: {0}", e); - } - } - } - - /// - /// Event handler method for Device Extender sig changes - /// - /// - /// - void FusionRoomSchedule_DeviceExtenderSigChange(DeviceExtender currentDeviceExtender, SigEventArgs args) - { - Debug.Console(2, this, "Scehdule Response Event: {0}\n Sig: {1}\nFusionResponse:\n{2}", args.Event, args.Sig.Name, args.Sig.StringValue); - - - if (args.Sig == FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.ScheduleResponse) - { - try - { - ScheduleResponse scheduleResponse = new ScheduleResponse(); - - XmlDocument message = new XmlDocument(); - - message.LoadXml(args.Sig.StringValue); - - var response = message["ScheduleResponse"]; - - if (response != null) - { - // Check for push notification - if (response["RequestID"].InnerText == "RVRequest") - { - var action = response["Action"]; - - if (action.OuterXml.IndexOf("RequestSchedule") > -1) - { - PushNotificationTimer.Reset(PushNotificationTimeout, PushNotificationTimeout); - } - } - else // Not a push notification - { - CurrentSchedule = new RoomSchedule(); // Clear Current Schedule - CurrentMeeting = null; // Clear Current Meeting - NextMeeting = null; // Clear Next Meeting - - bool isNextMeeting = false; - - foreach (XmlElement element in message.FirstChild.ChildNodes) - { - if (element.Name == "RequestID") - { - scheduleResponse.RequestID = element.InnerText; - } - else if (element.Name == "RoomID") - { - scheduleResponse.RoomID = element.InnerText; - } - else if (element.Name == "RoomName") - { - scheduleResponse.RoomName = element.InnerText; - } - else if (element.Name == "Event") - { - Debug.Console(2, this, "Event Found:\n{0}", element.OuterXml); - - XmlReader reader = new XmlReader(element.OuterXml); - - Event tempEvent = new Event(); - - tempEvent = CrestronXMLSerialization.DeSerializeObject(reader); - - scheduleResponse.Events.Add(tempEvent); - - // Check is this is the current event - if (tempEvent.dtStart <= DateTime.Now && tempEvent.dtEnd >= DateTime.Now) - { - CurrentMeeting = tempEvent; // Set Current Meeting - isNextMeeting = true; // Flag that next element is next meeting - } - - if (isNextMeeting) - { - NextMeeting = tempEvent; // Set Next Meeting - isNextMeeting = false; - } - - CurrentSchedule.Meetings.Add(tempEvent); - } - - } - - PrintTodaysSchedule(); - - if (!IsRegisteredForSchedulePushNotifications) - PollTimer.Reset(SchedulePollInterval, SchedulePollInterval); - - // Fire Schedule Change Event - var handler = ScheduleChange; - - if (handler != null) - { - handler(this, new ScheduleChangeEventArgs() { Schedule = CurrentSchedule }); - } - - } - } - - - - } - catch (Exception e) - { - Debug.Console(1, this, "Error parsing ScheduleResponse: {0}", e); - } - } - else if (args.Sig == FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.CreateResponse) - { - Debug.Console(2, this, "Create Meeting Response Event: {0}\n Sig: {1}\nFusionResponse:\n{2}", args.Event, args.Sig.Name, args.Sig.StringValue); - } - - } - - /// - /// Prints today's schedule to console for debugging - /// - void PrintTodaysSchedule() - { - if (Debug.Level > 1) - { - if (CurrentSchedule.Meetings.Count > 0) - { - Debug.Console(1, this, "Today's Schedule for '{0}'\n", Room.Name); - - foreach (Event e in CurrentSchedule.Meetings) - { - Debug.Console(1, this, "Subject: {0}", e.Subject); - Debug.Console(1, this, "Organizer: {0}", e.Organizer); - Debug.Console(1, this, "MeetingID: {0}", e.MeetingID); - Debug.Console(1, this, "Start Time: {0}", e.dtStart); - Debug.Console(1, this, "End Time: {0}", e.dtEnd); - Debug.Console(1, this, "Duration: {0}\n", e.DurationInMinutes); - } - } - } - } - - void SetUpSources() - { - // Sources - var dict = ConfigReader.ConfigObject.GetSourceListForKey(Room.SourceListKey); - if (dict != null) - { - // NEW PROCESS: - // Make these lists and insert the fusion attributes by iterating these - var setTopBoxes = dict.Where(d => d.Value.SourceDevice is ISetTopBoxControls); - uint i = 1; - foreach (var kvp in setTopBoxes) - { - TryAddRouteActionSigs("Display 1 - Source TV " + i, 188 + i, kvp.Key, kvp.Value.SourceDevice); - i++; - if (i > 5) // We only have five spots - break; - } - - var discPlayers = dict.Where(d => d.Value.SourceDevice is IDiscPlayerControls); - i = 1; - foreach (var kvp in discPlayers) - { - TryAddRouteActionSigs("Display 1 - Source DVD " + i, 181 + i, kvp.Key, kvp.Value.SourceDevice); - i++; - if (i > 5) // We only have five spots - break; - } - - var laptops = dict.Where(d => d.Value.SourceDevice is Laptop); - i = 1; - foreach (var kvp in laptops) - { - TryAddRouteActionSigs("Display 1 - Source Laptop " + i, 166 + i, kvp.Key, kvp.Value.SourceDevice); - i++; - if (i > 10) // We only have ten spots??? - break; - } - - foreach (var kvp in dict) - { - var usageDevice = kvp.Value.SourceDevice as IUsageTracking; - - if (usageDevice != null) - { - usageDevice.UsageTracker = new UsageTracking(usageDevice as Device); - usageDevice.UsageTracker.UsageIsTracked = true; - usageDevice.UsageTracker.DeviceUsageEnded += new EventHandler(UsageTracker_DeviceUsageEnded); - } - } - - } - else - { - Debug.Console(1, this, "WARNING: Config source list '{0}' not found for room '{1}'", - Room.SourceListKey, Room.Key); - } - } - - /// - /// Collects usage data from source and sends to Fusion - /// - /// - /// - void UsageTracker_DeviceUsageEnded(object sender, DeviceUsageEventArgs e) - { - var deviceTracker = sender as UsageTracking; - - var configDevice = ConfigReader.ConfigObject.Devices.Where(d => d.Key.Equals(deviceTracker.Parent)); - - string group = ConfigReader.GetGroupForDeviceKey(deviceTracker.Parent.Key); - - string currentMeetingId = "-"; - - if (CurrentMeeting != null) - currentMeetingId = CurrentMeeting.MeetingID; - - //String Format: "USAGE||[Date YYYY-MM-DD]||[Time HH-mm-ss]||TIME||[Asset_Type]||[Asset_Name]||[Minutes_used]||[Asset_ID]||[Meeting_ID]" - // [Asset_ID] property does not appear to be used in Crestron SSI examples. They are sending "-" instead so that's what is replicated here - string deviceUsage = string.Format("USAGE||{0}||{1}||TIME||{2}||{3}||-||{4}||-||{5}||{6}||\r\n", e.UsageEndTime.ToString("yyyy-MM-dd"), e.UsageEndTime.ToString("HH:mm:ss"), - group, deviceTracker.Parent.Name, e.MinutesUsed, "-", currentMeetingId); - - Debug.Console(1, this, "Device usage for: {0} ended at {1}. In use for {2} minutes", deviceTracker.Parent.Name, e.UsageEndTime, e.MinutesUsed); - - FusionRoom.DeviceUsage.InputSig.StringValue = deviceUsage; - - Debug.Console(1, this, "Device usage string: {0}", deviceUsage); - } - - - void TryAddRouteActionSigs(string attrName, uint attrNum, string routeKey, Device pSrc) - { - Debug.Console(2, this, "Creating attribute '{0}' with join {1} for source {2}", - attrName, attrNum, pSrc.Key); - try - { - var sigD = FusionRoom.CreateOffsetBoolSig(attrNum, attrName, eSigIoMask.InputOutputSig); - // Need feedback when this source is selected - // Event handler, added below, will compare source changes with this sig dict - SourceToFeedbackSigs.Add(pSrc, sigD.InputSig); - - // And respond to selection in Fusion - sigD.OutputSig.SetSigFalseAction(() => Room.RunRouteAction(routeKey)); - } - catch (Exception) - { - Debug.Console(2, this, "Error creating Fusion signal {0} {1} for device '{2}'. THIS NEEDS REWORKING", attrNum, attrName, pSrc.Key); - } - } - - /// - /// - /// - void SetUpCommunitcationMonitors() - { - // Attach to all room's devices with monitors. - //foreach (var dev in DeviceManager.Devices) - foreach (var dev in DeviceManager.GetDevices()) - { - if (!(dev is ICommunicationMonitor)) - continue; - - var keyNum = ExtractNumberFromKey(dev.Key); - if (keyNum == -1) - { - Debug.Console(1, this, "WARNING: Cannot link device '{0}' to numbered Fusion monitoring attributes", - dev.Key); - continue; - } - string attrName = null; - uint attrNum = Convert.ToUInt32(keyNum); - -<<<<<<< HEAD - - - if (dev is BasicTriListWithSmartObject) - { - if (attrNum > 10) - continue; - attrName = "Online - Touch Panel " + attrNum; - attrNum += 150; - } - // add xpanel here - - //if (dev is Crestron.SimplSharpPro.UI.XpanelForSmartGraphics) - //{ - // if (attrNum > 10) - // continue; - // attrName = "Online - XPanel " + attrNum; - // attrNum += 160; - //} -======= - if (dev is EssentialsTouchpanelController) - { - if ((dev as EssentialsTouchpanelController).Panel is Crestron.SimplSharpPro.DeviceSupport.TswFt5Button) - { - if (attrNum > 10) - continue; - attrName = "Online - Touch Panel " + attrNum; - attrNum += 150; - } - else if ((dev as EssentialsTouchpanelController).Panel is Crestron.SimplSharpPro.UI.XpanelForSmartGraphics) - { - if (attrNum > 10) - continue; - attrName = "Online - XPanel " + attrNum; - attrNum += 160; - } - } ->>>>>>> origin/feature/cisco-spark - - //else - if (dev is DisplayBase) - { - if (attrNum > 10) - continue; - attrName = "Online - Display " + attrNum; - attrNum += 170; - } - //else if (dev is DvdDeviceBase) - //{ - // if (attrNum > 5) - // continue; - // attrName = "Device Ok - DVD " + attrNum; - // attrNum += 260; - //} - // add set top box - - // add Cresnet roll-up - - // add DM-devices roll-up - - if (attrName != null) - { - // Link comm status to sig and update - var sigD = FusionRoom.CreateOffsetBoolSig(attrNum, attrName, eSigIoMask.InputSigOnly); - var smd = dev as ICommunicationMonitor; - sigD.InputSig.BoolValue = smd.CommunicationMonitor.Status == MonitorStatus.IsOk; - smd.CommunicationMonitor.StatusChange += (o, a) => - { sigD.InputSig.BoolValue = a.Status == MonitorStatus.IsOk; }; - Debug.Console(0, this, "Linking '{0}' communication monitor to Fusion '{1}'", dev.Key, attrName); - } - } - } - - void SetUpDisplay() - { - try - { - //Setup Display Usage Monitoring - - var displays = DeviceManager.AllDevices.Where(d => d is DisplayBase); - - // Consider updating this in multiple display systems - - foreach (DisplayBase display in displays) - { - display.UsageTracker = new UsageTracking(display); - display.UsageTracker.UsageIsTracked = true; - display.UsageTracker.DeviceUsageEnded += new EventHandler(UsageTracker_DeviceUsageEnded); - } - - var defaultDisplay = Room.DefaultDisplay as DisplayBase; - if (defaultDisplay == null) - { - Debug.Console(1, this, "Cannot link null display to Fusion"); - return; - } - - var dispPowerOnAction = new Action(b => { if (!b) defaultDisplay.PowerOn(); }); - var dispPowerOffAction = new Action(b => { if (!b) defaultDisplay.PowerOff(); }); - - // Display to fusion room sigs - FusionRoom.DisplayPowerOn.OutputSig.UserObject = dispPowerOnAction; - FusionRoom.DisplayPowerOff.OutputSig.UserObject = dispPowerOffAction; - defaultDisplay.PowerIsOnFeedback.LinkInputSig(FusionRoom.DisplayPowerOn.InputSig); - if (defaultDisplay is IDisplayUsage) - (defaultDisplay as IDisplayUsage).LampHours.LinkInputSig(FusionRoom.DisplayUsage.InputSig); - - - - MapDisplayToRoomJoins(1, 158, defaultDisplay); - - - var deviceConfig = ConfigReader.ConfigObject.Devices.FirstOrDefault(d => d.Key.Equals(defaultDisplay.Key)); - - //Check for existing asset in GUIDs collection - - var tempAsset = new FusionAsset(); - - if (FusionStaticAssets.ContainsKey(deviceConfig.Uid)) - { - tempAsset = FusionStaticAssets[deviceConfig.Uid]; - } - else - { - // Create a new asset - tempAsset = new FusionAsset(FusionRoomGuids.GetNextAvailableAssetNumber(FusionRoom), defaultDisplay.Name, "Display", ""); - FusionStaticAssets.Add(deviceConfig.Uid, tempAsset); - } - - var dispAsset = FusionRoom.CreateStaticAsset(tempAsset.SlotNumber, tempAsset.Name, "Display", tempAsset.InstanceId); - dispAsset.PowerOn.OutputSig.UserObject = dispPowerOnAction; - dispAsset.PowerOff.OutputSig.UserObject = dispPowerOffAction; - defaultDisplay.PowerIsOnFeedback.LinkInputSig(dispAsset.PowerOn.InputSig); - // NO!! display.PowerIsOn.LinkComplementInputSig(dispAsset.PowerOff.InputSig); - // Use extension methods - dispAsset.TrySetMakeModel(defaultDisplay); - dispAsset.TryLinkAssetErrorToCommunication(defaultDisplay); - } - catch (Exception e) - { - Debug.Console(1, this, "Error setting up display in Fusion: {0}", e); - } - - } - - /// - /// Maps room attributes to a display at a specified index - /// - /// - /// a - void MapDisplayToRoomJoins(int displayIndex, int joinOffset, DisplayBase display) - { - string displayName = string.Format("Display {0} - ", displayIndex); - - - if(display == Room.DefaultDisplay) - { - // Display volume - var defaultDisplayVolume = FusionRoom.CreateOffsetUshortSig(50, "Volume - Fader01", eSigIoMask.InputOutputSig); - defaultDisplayVolume.OutputSig.UserObject = new Action(b => (display as IBasicVolumeWithFeedback).SetVolume(b)); - (display as IBasicVolumeWithFeedback).VolumeLevelFeedback.LinkInputSig(defaultDisplayVolume.InputSig); - - // Power on - var defaultDisplayPowerOn = FusionRoom.CreateOffsetBoolSig((uint)joinOffset, displayName + "Power On", eSigIoMask.InputOutputSig); - defaultDisplayPowerOn.OutputSig.UserObject = new Action(b => { if (!b) display.PowerOn(); }); - display.PowerIsOnFeedback.LinkInputSig(defaultDisplayPowerOn.InputSig); - - // Power Off - var defaultDisplayPowerOff = FusionRoom.CreateOffsetBoolSig((uint)joinOffset + 1, displayName + "Power Off", eSigIoMask.InputOutputSig); - defaultDisplayPowerOn.OutputSig.UserObject = new Action(b => { if (!b) display.PowerOff(); }); ; - display.PowerIsOnFeedback.LinkInputSig(defaultDisplayPowerOn.InputSig); - - // Current Source - var defaultDisplaySourceNone = FusionRoom.CreateOffsetBoolSig((uint)joinOffset + 8, displayName + "Source None", eSigIoMask.InputOutputSig); - defaultDisplaySourceNone.OutputSig.UserObject = new Action(b => { if (!b) Room.RunRouteAction("roomOff"); }); ; - - //var dict = ConfigReader.ConfigObject.GetSourceListForKey(Room.SourceListKey); - - //foreach (var item in dict) - //{ - // if(item.Key != "roomOff") - // { - // var defaultDisplaySource = FusionRoom.CreateOffsetBoolSig((uint)joinOffset + (uint)item.Value.Order + 9 , string.Format("{0}Source {1}", displayIndex, item.Value.Order), eSigIoMask.InputOutputSig); - // defaultDisplaySource.OutputSig.UserObject = new Action(b => { if (!b) Room.RunRouteAction(item.Key); }); - - // //defaultDisplaySource.InputSig = Source[item.Value.Order].InputSig; - // } - - //} - } - } - - //void Room_CurrentSingleSourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type) - //{ - // for (int i = 1; i <= Source.Length; i++) - // { - // Source[i].InputSig.BoolValue = false; - // } - - // Source[info.Order].InputSig.BoolValue = true; - - // // Need to check for current source key against source list and update Source[] BooleanSigData as appropriate - - //} - - void SetUpError() - { - // Roll up ALL device errors - ErrorMessageRollUp = new StatusMonitorCollection(this); - foreach (var dev in DeviceManager.GetDevices()) - { - var md = dev as ICommunicationMonitor; - if (md != null) - { - ErrorMessageRollUp.AddMonitor(md.CommunicationMonitor); - Debug.Console(2, this, "Adding '{0}' to room's overall error monitor", md.CommunicationMonitor.Parent.Key); - } - } - ErrorMessageRollUp.Start(); - FusionRoom.ErrorMessage.InputSig.StringValue = ErrorMessageRollUp.Message; - ErrorMessageRollUp.StatusChange += (o, a) => - { - FusionRoom.ErrorMessage.InputSig.StringValue = ErrorMessageRollUp.Message; - }; - - } - - void SetUpOccupancy() - { - - // Need to have the room occupancy object first and somehow determine the slot number of the Occupancy asset but will not be able to use the UID from config likely. - // Consider defining an object just for Room Occupancy (either eAssetType.Occupancy Sensor (local) or eAssetType.RemoteOccupancySensor (from Fusion sched. panel)) and reserving slot 4 for that asset (statics would start at 5) - - //if (Room.OccupancyObj != null) - //{ - - var tempOccAsset = GUIDs.OccupancyAsset; - - if(tempOccAsset == null) - { - FusionOccSensor = new FusionOccupancySensorAsset(eAssetType.OccupancySensor); - tempOccAsset = FusionOccSensor; - } - - var occSensorAsset = FusionRoom.CreateOccupancySensorAsset(tempOccAsset.SlotNumber, tempOccAsset.Name, "Occupancy Sensor", tempOccAsset.InstanceId); - - occSensorAsset.RoomOccupied.AddSigToRVIFile = true; - - var occSensorShutdownMinutes = FusionRoom.CreateOffsetUshortSig(70, "Occ Shutdown - Minutes", eSigIoMask.InputOutputSig); - - // Tie to method on occupancy object - //occSensorShutdownMinutes.OutputSig.UserObject(new Action(ushort)(b => Room.OccupancyObj.SetShutdownMinutes(b)); - - - // use Room.OccObject.RoomOccupiedFeedback.LinkInputSig(occSensorAsset.InputSig); - //} - } - - /// - /// Helper to get the number from the end of a device's key string - /// - /// -1 if no number matched - int ExtractNumberFromKey(string key) - { - var capture = System.Text.RegularExpressions.Regex.Match(key, @"\D+(\d+)"); - if (!capture.Success) - return -1; - else return Convert.ToInt32(capture.Groups[1].Value); - } - - /// - /// Event handler for when room source changes - /// - void Room_CurrentSourceInfoChange(EssentialsRoomBase room, SourceListItem info, ChangeType type) - { - // Handle null. Nothing to do when switching from or to null - if (info == null || info.SourceDevice == null) - return; - - var dev = info.SourceDevice; - if (type == ChangeType.WillChange) - { - if (SourceToFeedbackSigs.ContainsKey(dev)) - SourceToFeedbackSigs[dev].BoolValue = false; - } - else - { - if (SourceToFeedbackSigs.ContainsKey(dev)) - SourceToFeedbackSigs[dev].BoolValue = true; - var name = (room == null ? "" : room.Name); - CurrentRoomSourceNameSig.InputSig.StringValue = info.SourceDevice.Name; - } - } - - void FusionRoom_FusionStateChange(FusionBase device, FusionStateEventArgs args) - { - - // The sig/UO method: Need separate handlers for fixed and user sigs, all flavors, - // even though they all contain sigs. - - var sigData = (args.UserConfiguredSigDetail as BooleanSigDataFixedName); - if (sigData != null) - { - var outSig = sigData.OutputSig; - if (outSig.UserObject is Action) - (outSig.UserObject as Action).Invoke(outSig.BoolValue); - else if (outSig.UserObject is Action) - (outSig.UserObject as Action).Invoke(outSig.UShortValue); - else if (outSig.UserObject is Action) - (outSig.UserObject as Action).Invoke(outSig.StringValue); - return; - } - - var attrData = (args.UserConfiguredSigDetail as BooleanSigData); - if (attrData != null) - { - var outSig = attrData.OutputSig; - if (outSig.UserObject is Action) - (outSig.UserObject as Action).Invoke(outSig.BoolValue); - else if (outSig.UserObject is Action) - (outSig.UserObject as Action).Invoke(outSig.UShortValue); - else if (outSig.UserObject is Action) - (outSig.UserObject as Action).Invoke(outSig.StringValue); - return; - } - - } - } - - - public static class FusionRoomExtensions - { - /// - /// Creates and returns a fusion attribute. The join number will match the established Simpl - /// standard of 50+, and will generate a 50+ join in the RVI. It calls - /// FusionRoom.AddSig with join number - 49 - /// - /// The new attribute - public static BooleanSigData CreateOffsetBoolSig(this FusionRoom fr, uint number, string name, eSigIoMask mask) - { - if (number < 50) throw new ArgumentOutOfRangeException("number", "Cannot be less than 50"); - number -= 49; - fr.AddSig(eSigType.Bool, number, name, mask); - return fr.UserDefinedBooleanSigDetails[number]; - } - - /// - /// Creates and returns a fusion attribute. The join number will match the established Simpl - /// standard of 50+, and will generate a 50+ join in the RVI. It calls - /// FusionRoom.AddSig with join number - 49 - /// - /// The new attribute - public static UShortSigData CreateOffsetUshortSig(this FusionRoom fr, uint number, string name, eSigIoMask mask) - { - if (number < 50) throw new ArgumentOutOfRangeException("number", "Cannot be less than 50"); - number -= 49; - fr.AddSig(eSigType.UShort, number, name, mask); - return fr.UserDefinedUShortSigDetails[number]; - } - - /// - /// Creates and returns a fusion attribute. The join number will match the established Simpl - /// standard of 50+, and will generate a 50+ join in the RVI. It calls - /// FusionRoom.AddSig with join number - 49 - /// - /// The new attribute - public static StringSigData CreateOffsetStringSig(this FusionRoom fr, uint number, string name, eSigIoMask mask) - { - if (number < 50) throw new ArgumentOutOfRangeException("number", "Cannot be less than 50"); - number -= 49; - fr.AddSig(eSigType.String, number, name, mask); - return fr.UserDefinedStringSigDetails[number]; - } - - /// - /// Creates and returns a static asset - /// - /// the new asset - public static FusionStaticAsset CreateStaticAsset(this FusionRoom fr, uint number, string name, string type, string instanceId) - { - Debug.Console(0, "Adding Fusion Static Asset '{0}' to slot {1} with GUID: '{2}'", name, number, instanceId); - - fr.AddAsset(eAssetType.StaticAsset, number, name, type, instanceId); - return fr.UserConfigurableAssetDetails[number].Asset as FusionStaticAsset; - } - - public static FusionOccupancySensor CreateOccupancySensorAsset(this FusionRoom fr, uint number, string name, string type, string instanceId) - { - Debug.Console(0, "Adding Fusion Occupancy Sensor Asset '{0}' to slot {1} with GUID: '{2}'", name, number, instanceId); - - fr.AddAsset(eAssetType.OccupancySensor, number, name, type, instanceId); - return fr.UserConfigurableAssetDetails[number].Asset as FusionOccupancySensor; - } - } - - //************************************************************************************************ - /// - /// Extensions to enhance Fusion room, asset and signal creation. - /// - public static class FusionStaticAssetExtensions - { - /// - /// Tries to set a Fusion asset with the make and model of a device. - /// If the provided Device is IMakeModel, will set the corresponding parameters on the fusion static asset. - /// Otherwise, does nothing. - /// - public static void TrySetMakeModel(this FusionStaticAsset asset, Device device) - { - var mm = device as IMakeModel; - if (mm != null) - { - asset.ParamMake.Value = mm.DeviceMake; - asset.ParamModel.Value = mm.DeviceModel; - } - } - - /// - /// Tries to attach the AssetError input on a Fusion asset to a Device's - /// CommunicationMonitor.StatusChange event. Does nothing if the device is not - /// IStatusMonitor - /// - /// - /// - public static void TryLinkAssetErrorToCommunication(this FusionStaticAsset asset, Device device) - { - if (device is ICommunicationMonitor) - { - var monitor = (device as ICommunicationMonitor).CommunicationMonitor; - monitor.StatusChange += (o, a) => - { - // Link connected and error inputs on asset - asset.Connected.InputSig.BoolValue = a.Status == MonitorStatus.IsOk; - asset.AssetError.InputSig.StringValue = a.Status.ToString(); - }; - // set current value - asset.Connected.InputSig.BoolValue = monitor.Status == MonitorStatus.IsOk; - asset.AssetError.InputSig.StringValue = monitor.Status.ToString(); - } - } - } - - -} \ No newline at end of file diff --git a/PepperDashEssentials/PepperDash Essentials TSW-760.sgd b/PepperDashEssentials/PepperDash Essentials TSW-760.sgd deleted file mode 100644 index e8a75d91..00000000 --- a/PepperDashEssentials/PepperDash Essentials TSW-760.sgd +++ /dev/null @@ -1,19857 +0,0 @@ -[ -ObjTp=FSgntr -Sgntr=SGD -RelVrs=3 -VTProeVer=6.1.05 -Schema=1 -CRCGUID=6C002F1C-3D96-4EBF-A0D9-8A124BE8F48A -] -;================================================================================ -[ -ObjTp=Hd -ProjectFile=PepperDash Essentials TSW-760.vtp -VtpGuid=D8D5F125-CB35-42E9-8AE3-4142597FD2C5 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials TSW-760_[C.AC] Keypad_AC DTMF Keypad_2.ced -Hint=AC DTMF Keypad_2 (Smart Object ID=1101) -Code=1 -SGControlType=Simple Keypad -SGControlName=AC DTMF Keypad_2 -GUID=F2A259FE-82AD-4085-B5A6-22D7B034458C -SmplCName=PepperDash Essentials TSW-760_[C.AC] Keypad_AC DTMF Keypad_2.ced -SMWRev=4.02.19 -Expand=expand_random -HelpID=10061 -;Define the number of inputs, outputs and parameters -MinVariableInputs=12 -MaxVariableInputs=12 -MinVariableOutputs=12 -MaxVariableOutputs=12 -NumFixedParams=1 -MinVariableInputsList2=0 -MaxVariableInputsList2=0 -MinVariableOutputsList2=0 -MaxVariableOutputsList2=0 -MinVariableInputsList3=0 -MaxVariableInputsList3=0 -MinVariableOutputsList3=0 -MaxVariableOutputsList3=0 -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -OutputCue1=1 -OutputSigType1=Digital -InputCue2=[~UNUSED3~] -InputSigType2=Digital -OutputCue2=2 -OutputSigType2=Digital -InputCue3=[~UNUSED3~] -InputSigType3=Digital -OutputCue3=3 -OutputSigType3=Digital -InputCue4=[~UNUSED3~] -InputSigType4=Digital -OutputCue4=4 -OutputSigType4=Digital -InputCue5=[~UNUSED3~] -InputSigType5=Digital -OutputCue5=5 -OutputSigType5=Digital -InputCue6=[~UNUSED3~] -InputSigType6=Digital -OutputCue6=6 -OutputSigType6=Digital -InputCue7=[~UNUSED3~] -InputSigType7=Digital -OutputCue7=7 -OutputSigType7=Digital -InputCue8=[~UNUSED3~] -InputSigType8=Digital -OutputCue8=8 -OutputSigType8=Digital -InputCue9=[~UNUSED3~] -InputSigType9=Digital -OutputCue9=9 -OutputSigType9=Digital -InputCue10=[~UNUSED3~] -InputSigType10=Digital -OutputCue10=0 -OutputSigType10=Digital -InputCue11=[~UNUSED3~] -InputSigType11=Digital -OutputCue11=* -OutputSigType11=Digital -InputCue12=[~UNUSED3~] -InputSigType12=Digital -OutputCue12=/# -OutputSigType12=Digital -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=1 -CedH=1 -SmartObjId=1101d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=1 -Tp=1 -HD=TRUE -DV=1101d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=1 -Name=PepperDash Essentials TSW-760_[C.AC] Keypad_AC DTMF Keypad_2.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials TSW-760_[D.VC] Directory_Directory List.ced -Hint=Directory List (Smart Object ID=1202) -Code=2 -SGControlType=Dynamic Button List Vertical -SGControlName=Directory List -GUID=79060F3C-D3A4-4A8D-ACF0-CB2376A31702 -SmplCName=PepperDash Essentials TSW-760_[D.VC] Directory_Directory List.ced -SMWRev=4.02.20 -Expand=expand_random -HelpID=10112 -Render=8 -;Define the number of inputs, outputs and parameters -MinVariableInputs=6016 -MaxVariableInputs=6016 -MinVariableOutputs=6016 -MaxVariableOutputs=6016 -NumFixedParams=1 -MinVariableInputsList2=2012 -MaxVariableInputsList2=2012 -MinVariableOutputsList2=2012 -MaxVariableOutputsList2=2012 -MinVariableInputsList3=4014 -MaxVariableInputsList3=4014 -MinVariableOutputsList3=4014 -MaxVariableOutputsList3=4014 -InputSigType1=Digital -OutputSigType1=Digital -InputList2SigType1=Analog -OutputList2SigType1=Analog -InputList3SigType1=Serial -OutputList3SigType1=Serial - -;Define the cues, and signal types each input, output and parameter. -InputCue1=Disable Redraw -InputSigType1=Digital -InputCue2=[~UNUSED3~] -InputSigType2=Digital -InputCue3=[~UNUSED2~] -InputSigType3=Digital -InputCue4=[~UNUSED2~] -InputSigType4=Digital -InputCue5=[~UNUSED2~] -InputSigType5=Digital -InputCue6=[~UNUSED2~] -InputSigType6=Digital -InputCue7=[~UNUSED2~] -InputSigType7=Digital -InputCue8=[~UNUSED2~] -InputSigType8=Digital -InputCue9=[~UNUSED2~] -InputSigType9=Digital -InputCue10=[~UNUSED2~] -InputSigType10=Digital -InputCue11=[~BeginGroup~]Press -InputSigType11=Digital -InputCue12=Item 1 Selected -InputSigType12=Digital -InputCue13=Item 2 Selected -InputSigType13=Digital -InputCue14=Item 3 Selected -InputSigType14=Digital -InputCue15=Item 4 Selected -InputSigType15=Digital -InputCue16=Item 5 Selected -InputSigType16=Digital -InputCue17=Item 6 Selected -InputSigType17=Digital -InputCue18=Item 7 Selected -InputSigType18=Digital -InputCue19=Item 8 Selected -InputSigType19=Digital -InputCue20=Item 9 Selected -InputSigType20=Digital -InputCue21=Item 10 Selected -InputSigType21=Digital -InputCue22=Item 11 Selected -InputSigType22=Digital -InputCue23=Item 12 Selected -InputSigType23=Digital -InputCue24=Item 13 Selected -InputSigType24=Digital -InputCue25=Item 14 Selected -InputSigType25=Digital -InputCue26=Item 15 Selected -InputSigType26=Digital -InputCue27=Item 16 Selected -InputSigType27=Digital -InputCue28=Item 17 Selected -InputSigType28=Digital -InputCue29=Item 18 Selected -InputSigType29=Digital -InputCue30=Item 19 Selected -InputSigType30=Digital -InputCue31=Item 20 Selected -InputSigType31=Digital -InputCue32=Item 21 Selected -InputSigType32=Digital -InputCue33=Item 22 Selected -InputSigType33=Digital -InputCue34=Item 23 Selected -InputSigType34=Digital -InputCue35=Item 24 Selected -InputSigType35=Digital -InputCue36=Item 25 Selected -InputSigType36=Digital -InputCue37=Item 26 Selected -InputSigType37=Digital -InputCue38=Item 27 Selected -InputSigType38=Digital -InputCue39=Item 28 Selected -InputSigType39=Digital -InputCue40=Item 29 Selected -InputSigType40=Digital -InputCue41=Item 30 Selected -InputSigType41=Digital -InputCue42=Item 31 Selected -InputSigType42=Digital -InputCue43=Item 32 Selected -InputSigType43=Digital -InputCue44=Item 33 Selected -InputSigType44=Digital -InputCue45=Item 34 Selected -InputSigType45=Digital -InputCue46=Item 35 Selected -InputSigType46=Digital -InputCue47=Item 36 Selected -InputSigType47=Digital -InputCue48=Item 37 Selected -InputSigType48=Digital -InputCue49=Item 38 Selected -InputSigType49=Digital -InputCue50=Item 39 Selected -InputSigType50=Digital -InputCue51=Item 40 Selected -InputSigType51=Digital -InputCue52=Item 41 Selected -InputSigType52=Digital -InputCue53=Item 42 Selected -InputSigType53=Digital -InputCue54=Item 43 Selected -InputSigType54=Digital -InputCue55=Item 44 Selected -InputSigType55=Digital -InputCue56=Item 45 Selected -InputSigType56=Digital -InputCue57=Item 46 Selected -InputSigType57=Digital -InputCue58=Item 47 Selected -InputSigType58=Digital -InputCue59=Item 48 Selected -InputSigType59=Digital -InputCue60=Item 49 Selected -InputSigType60=Digital -InputCue61=Item 50 Selected -InputSigType61=Digital -InputCue62=Item 51 Selected -InputSigType62=Digital -InputCue63=Item 52 Selected -InputSigType63=Digital -InputCue64=Item 53 Selected -InputSigType64=Digital -InputCue65=Item 54 Selected -InputSigType65=Digital -InputCue66=Item 55 Selected -InputSigType66=Digital -InputCue67=Item 56 Selected -InputSigType67=Digital -InputCue68=Item 57 Selected -InputSigType68=Digital -InputCue69=Item 58 Selected -InputSigType69=Digital -InputCue70=Item 59 Selected -InputSigType70=Digital -InputCue71=Item 60 Selected -InputSigType71=Digital -InputCue72=Item 61 Selected -InputSigType72=Digital -InputCue73=Item 62 Selected -InputSigType73=Digital -InputCue74=Item 63 Selected -InputSigType74=Digital -InputCue75=Item 64 Selected -InputSigType75=Digital -InputCue76=Item 65 Selected -InputSigType76=Digital -InputCue77=Item 66 Selected -InputSigType77=Digital -InputCue78=Item 67 Selected -InputSigType78=Digital -InputCue79=Item 68 Selected -InputSigType79=Digital -InputCue80=Item 69 Selected -InputSigType80=Digital -InputCue81=Item 70 Selected -InputSigType81=Digital -InputCue82=Item 71 Selected -InputSigType82=Digital -InputCue83=Item 72 Selected -InputSigType83=Digital -InputCue84=Item 73 Selected -InputSigType84=Digital -InputCue85=Item 74 Selected -InputSigType85=Digital -InputCue86=Item 75 Selected -InputSigType86=Digital -InputCue87=Item 76 Selected -InputSigType87=Digital -InputCue88=Item 77 Selected -InputSigType88=Digital -InputCue89=Item 78 Selected -InputSigType89=Digital -InputCue90=Item 79 Selected -InputSigType90=Digital -InputCue91=Item 80 Selected -InputSigType91=Digital -InputCue92=Item 81 Selected -InputSigType92=Digital -InputCue93=Item 82 Selected -InputSigType93=Digital -InputCue94=Item 83 Selected -InputSigType94=Digital -InputCue95=Item 84 Selected -InputSigType95=Digital -InputCue96=Item 85 Selected -InputSigType96=Digital -InputCue97=Item 86 Selected -InputSigType97=Digital -InputCue98=Item 87 Selected -InputSigType98=Digital -InputCue99=Item 88 Selected -InputSigType99=Digital -InputCue100=Item 89 Selected -InputSigType100=Digital -InputCue101=Item 90 Selected -InputSigType101=Digital -InputCue102=Item 91 Selected -InputSigType102=Digital -InputCue103=Item 92 Selected -InputSigType103=Digital -InputCue104=Item 93 Selected -InputSigType104=Digital -InputCue105=Item 94 Selected -InputSigType105=Digital -InputCue106=Item 95 Selected -InputSigType106=Digital -InputCue107=Item 96 Selected -InputSigType107=Digital -InputCue108=Item 97 Selected -InputSigType108=Digital -InputCue109=Item 98 Selected -InputSigType109=Digital -InputCue110=Item 99 Selected -InputSigType110=Digital -InputCue111=Item 100 Selected -InputSigType111=Digital -InputCue112=Item 101 Selected -InputSigType112=Digital -InputCue113=Item 102 Selected -InputSigType113=Digital -InputCue114=Item 103 Selected -InputSigType114=Digital -InputCue115=Item 104 Selected -InputSigType115=Digital -InputCue116=Item 105 Selected -InputSigType116=Digital -InputCue117=Item 106 Selected -InputSigType117=Digital -InputCue118=Item 107 Selected -InputSigType118=Digital -InputCue119=Item 108 Selected -InputSigType119=Digital -InputCue120=Item 109 Selected -InputSigType120=Digital -InputCue121=Item 110 Selected -InputSigType121=Digital -InputCue122=Item 111 Selected -InputSigType122=Digital -InputCue123=Item 112 Selected -InputSigType123=Digital -InputCue124=Item 113 Selected -InputSigType124=Digital -InputCue125=Item 114 Selected -InputSigType125=Digital -InputCue126=Item 115 Selected -InputSigType126=Digital -InputCue127=Item 116 Selected -InputSigType127=Digital -InputCue128=Item 117 Selected -InputSigType128=Digital -InputCue129=Item 118 Selected -InputSigType129=Digital -InputCue130=Item 119 Selected -InputSigType130=Digital -InputCue131=Item 120 Selected -InputSigType131=Digital -InputCue132=Item 121 Selected -InputSigType132=Digital -InputCue133=Item 122 Selected -InputSigType133=Digital -InputCue134=Item 123 Selected -InputSigType134=Digital -InputCue135=Item 124 Selected -InputSigType135=Digital -InputCue136=Item 125 Selected -InputSigType136=Digital -InputCue137=Item 126 Selected -InputSigType137=Digital -InputCue138=Item 127 Selected -InputSigType138=Digital -InputCue139=Item 128 Selected -InputSigType139=Digital -InputCue140=Item 129 Selected -InputSigType140=Digital -InputCue141=Item 130 Selected -InputSigType141=Digital -InputCue142=Item 131 Selected -InputSigType142=Digital -InputCue143=Item 132 Selected -InputSigType143=Digital -InputCue144=Item 133 Selected -InputSigType144=Digital -InputCue145=Item 134 Selected -InputSigType145=Digital -InputCue146=Item 135 Selected -InputSigType146=Digital -InputCue147=Item 136 Selected -InputSigType147=Digital -InputCue148=Item 137 Selected -InputSigType148=Digital -InputCue149=Item 138 Selected -InputSigType149=Digital -InputCue150=Item 139 Selected -InputSigType150=Digital -InputCue151=Item 140 Selected -InputSigType151=Digital -InputCue152=Item 141 Selected -InputSigType152=Digital -InputCue153=Item 142 Selected -InputSigType153=Digital -InputCue154=Item 143 Selected -InputSigType154=Digital -InputCue155=Item 144 Selected -InputSigType155=Digital -InputCue156=Item 145 Selected -InputSigType156=Digital -InputCue157=Item 146 Selected -InputSigType157=Digital -InputCue158=Item 147 Selected -InputSigType158=Digital -InputCue159=Item 148 Selected -InputSigType159=Digital -InputCue160=Item 149 Selected -InputSigType160=Digital -InputCue161=Item 150 Selected -InputSigType161=Digital -InputCue162=Item 151 Selected -InputSigType162=Digital -InputCue163=Item 152 Selected -InputSigType163=Digital -InputCue164=Item 153 Selected -InputSigType164=Digital -InputCue165=Item 154 Selected -InputSigType165=Digital -InputCue166=Item 155 Selected -InputSigType166=Digital -InputCue167=Item 156 Selected -InputSigType167=Digital -InputCue168=Item 157 Selected -InputSigType168=Digital -InputCue169=Item 158 Selected -InputSigType169=Digital -InputCue170=Item 159 Selected -InputSigType170=Digital -InputCue171=Item 160 Selected -InputSigType171=Digital -InputCue172=Item 161 Selected -InputSigType172=Digital -InputCue173=Item 162 Selected -InputSigType173=Digital -InputCue174=Item 163 Selected -InputSigType174=Digital -InputCue175=Item 164 Selected -InputSigType175=Digital -InputCue176=Item 165 Selected -InputSigType176=Digital -InputCue177=Item 166 Selected -InputSigType177=Digital -InputCue178=Item 167 Selected -InputSigType178=Digital -InputCue179=Item 168 Selected -InputSigType179=Digital -InputCue180=Item 169 Selected -InputSigType180=Digital -InputCue181=Item 170 Selected -InputSigType181=Digital -InputCue182=Item 171 Selected -InputSigType182=Digital -InputCue183=Item 172 Selected -InputSigType183=Digital -InputCue184=Item 173 Selected -InputSigType184=Digital -InputCue185=Item 174 Selected -InputSigType185=Digital -InputCue186=Item 175 Selected -InputSigType186=Digital -InputCue187=Item 176 Selected -InputSigType187=Digital -InputCue188=Item 177 Selected -InputSigType188=Digital -InputCue189=Item 178 Selected -InputSigType189=Digital -InputCue190=Item 179 Selected -InputSigType190=Digital -InputCue191=Item 180 Selected -InputSigType191=Digital -InputCue192=Item 181 Selected -InputSigType192=Digital -InputCue193=Item 182 Selected -InputSigType193=Digital -InputCue194=Item 183 Selected -InputSigType194=Digital -InputCue195=Item 184 Selected -InputSigType195=Digital -InputCue196=Item 185 Selected -InputSigType196=Digital -InputCue197=Item 186 Selected -InputSigType197=Digital -InputCue198=Item 187 Selected -InputSigType198=Digital -InputCue199=Item 188 Selected -InputSigType199=Digital -InputCue200=Item 189 Selected -InputSigType200=Digital -InputCue201=Item 190 Selected -InputSigType201=Digital -InputCue202=Item 191 Selected -InputSigType202=Digital -InputCue203=Item 192 Selected -InputSigType203=Digital -InputCue204=Item 193 Selected -InputSigType204=Digital -InputCue205=Item 194 Selected -InputSigType205=Digital -InputCue206=Item 195 Selected -InputSigType206=Digital -InputCue207=Item 196 Selected -InputSigType207=Digital -InputCue208=Item 197 Selected -InputSigType208=Digital -InputCue209=Item 198 Selected -InputSigType209=Digital -InputCue210=Item 199 Selected -InputSigType210=Digital -InputCue211=Item 200 Selected -InputSigType211=Digital -InputCue212=Item 201 Selected -InputSigType212=Digital -InputCue213=Item 202 Selected -InputSigType213=Digital -InputCue214=Item 203 Selected -InputSigType214=Digital -InputCue215=Item 204 Selected -InputSigType215=Digital -InputCue216=Item 205 Selected -InputSigType216=Digital -InputCue217=Item 206 Selected -InputSigType217=Digital -InputCue218=Item 207 Selected -InputSigType218=Digital -InputCue219=Item 208 Selected -InputSigType219=Digital -InputCue220=Item 209 Selected -InputSigType220=Digital -InputCue221=Item 210 Selected -InputSigType221=Digital -InputCue222=Item 211 Selected -InputSigType222=Digital -InputCue223=Item 212 Selected -InputSigType223=Digital -InputCue224=Item 213 Selected -InputSigType224=Digital -InputCue225=Item 214 Selected -InputSigType225=Digital -InputCue226=Item 215 Selected -InputSigType226=Digital -InputCue227=Item 216 Selected -InputSigType227=Digital -InputCue228=Item 217 Selected -InputSigType228=Digital -InputCue229=Item 218 Selected -InputSigType229=Digital -InputCue230=Item 219 Selected -InputSigType230=Digital -InputCue231=Item 220 Selected -InputSigType231=Digital -InputCue232=Item 221 Selected -InputSigType232=Digital -InputCue233=Item 222 Selected -InputSigType233=Digital -InputCue234=Item 223 Selected -InputSigType234=Digital -InputCue235=Item 224 Selected -InputSigType235=Digital -InputCue236=Item 225 Selected -InputSigType236=Digital -InputCue237=Item 226 Selected -InputSigType237=Digital -InputCue238=Item 227 Selected -InputSigType238=Digital -InputCue239=Item 228 Selected -InputSigType239=Digital -InputCue240=Item 229 Selected -InputSigType240=Digital -InputCue241=Item 230 Selected -InputSigType241=Digital -InputCue242=Item 231 Selected -InputSigType242=Digital -InputCue243=Item 232 Selected -InputSigType243=Digital -InputCue244=Item 233 Selected -InputSigType244=Digital -InputCue245=Item 234 Selected -InputSigType245=Digital -InputCue246=Item 235 Selected -InputSigType246=Digital -InputCue247=Item 236 Selected -InputSigType247=Digital -InputCue248=Item 237 Selected -InputSigType248=Digital -InputCue249=Item 238 Selected -InputSigType249=Digital -InputCue250=Item 239 Selected -InputSigType250=Digital -InputCue251=Item 240 Selected -InputSigType251=Digital -InputCue252=Item 241 Selected -InputSigType252=Digital -InputCue253=Item 242 Selected -InputSigType253=Digital -InputCue254=Item 243 Selected -InputSigType254=Digital -InputCue255=Item 244 Selected -InputSigType255=Digital -InputCue256=Item 245 Selected -InputSigType256=Digital -InputCue257=Item 246 Selected -InputSigType257=Digital -InputCue258=Item 247 Selected -InputSigType258=Digital -InputCue259=Item 248 Selected -InputSigType259=Digital -InputCue260=Item 249 Selected -InputSigType260=Digital -InputCue261=Item 250 Selected -InputSigType261=Digital -InputCue262=Item 251 Selected -InputSigType262=Digital -InputCue263=Item 252 Selected -InputSigType263=Digital -InputCue264=Item 253 Selected -InputSigType264=Digital -InputCue265=Item 254 Selected -InputSigType265=Digital -InputCue266=Item 255 Selected -InputSigType266=Digital -InputCue267=[~UNUSED2~] -InputSigType267=Digital|Analog|Serial|String -InputCue2012=[~EndGroup~]Press -InputSigType2012=Digital -InputCue2013=[~BeginGroup~]Enable -InputSigType2013=Digital -InputCue2014=Item 1 Enabled -InputSigType2014=Digital -InputCue2015=Item 2 Enabled -InputSigType2015=Digital -InputCue2016=Item 3 Enabled -InputSigType2016=Digital -InputCue2017=Item 4 Enabled -InputSigType2017=Digital -InputCue2018=Item 5 Enabled -InputSigType2018=Digital -InputCue2019=Item 6 Enabled -InputSigType2019=Digital -InputCue2020=Item 7 Enabled -InputSigType2020=Digital -InputCue2021=Item 8 Enabled -InputSigType2021=Digital -InputCue2022=Item 9 Enabled -InputSigType2022=Digital -InputCue2023=Item 10 Enabled -InputSigType2023=Digital -InputCue2024=Item 11 Enabled -InputSigType2024=Digital -InputCue2025=Item 12 Enabled -InputSigType2025=Digital -InputCue2026=Item 13 Enabled -InputSigType2026=Digital -InputCue2027=Item 14 Enabled -InputSigType2027=Digital -InputCue2028=Item 15 Enabled -InputSigType2028=Digital -InputCue2029=Item 16 Enabled -InputSigType2029=Digital -InputCue2030=Item 17 Enabled -InputSigType2030=Digital -InputCue2031=Item 18 Enabled -InputSigType2031=Digital -InputCue2032=Item 19 Enabled -InputSigType2032=Digital -InputCue2033=Item 20 Enabled -InputSigType2033=Digital -InputCue2034=Item 21 Enabled -InputSigType2034=Digital -InputCue2035=Item 22 Enabled -InputSigType2035=Digital -InputCue2036=Item 23 Enabled -InputSigType2036=Digital -InputCue2037=Item 24 Enabled -InputSigType2037=Digital -InputCue2038=Item 25 Enabled -InputSigType2038=Digital -InputCue2039=Item 26 Enabled -InputSigType2039=Digital -InputCue2040=Item 27 Enabled -InputSigType2040=Digital -InputCue2041=Item 28 Enabled -InputSigType2041=Digital -InputCue2042=Item 29 Enabled -InputSigType2042=Digital -InputCue2043=Item 30 Enabled -InputSigType2043=Digital -InputCue2044=Item 31 Enabled -InputSigType2044=Digital -InputCue2045=Item 32 Enabled -InputSigType2045=Digital -InputCue2046=Item 33 Enabled -InputSigType2046=Digital -InputCue2047=Item 34 Enabled -InputSigType2047=Digital -InputCue2048=Item 35 Enabled -InputSigType2048=Digital -InputCue2049=Item 36 Enabled -InputSigType2049=Digital -InputCue2050=Item 37 Enabled -InputSigType2050=Digital -InputCue2051=Item 38 Enabled -InputSigType2051=Digital -InputCue2052=Item 39 Enabled -InputSigType2052=Digital -InputCue2053=Item 40 Enabled -InputSigType2053=Digital -InputCue2054=Item 41 Enabled -InputSigType2054=Digital -InputCue2055=Item 42 Enabled -InputSigType2055=Digital -InputCue2056=Item 43 Enabled -InputSigType2056=Digital -InputCue2057=Item 44 Enabled -InputSigType2057=Digital -InputCue2058=Item 45 Enabled -InputSigType2058=Digital -InputCue2059=Item 46 Enabled -InputSigType2059=Digital -InputCue2060=Item 47 Enabled -InputSigType2060=Digital -InputCue2061=Item 48 Enabled -InputSigType2061=Digital -InputCue2062=Item 49 Enabled -InputSigType2062=Digital -InputCue2063=Item 50 Enabled -InputSigType2063=Digital -InputCue2064=Item 51 Enabled -InputSigType2064=Digital -InputCue2065=Item 52 Enabled -InputSigType2065=Digital -InputCue2066=Item 53 Enabled -InputSigType2066=Digital -InputCue2067=Item 54 Enabled -InputSigType2067=Digital -InputCue2068=Item 55 Enabled -InputSigType2068=Digital -InputCue2069=Item 56 Enabled -InputSigType2069=Digital -InputCue2070=Item 57 Enabled -InputSigType2070=Digital -InputCue2071=Item 58 Enabled -InputSigType2071=Digital -InputCue2072=Item 59 Enabled -InputSigType2072=Digital -InputCue2073=Item 60 Enabled -InputSigType2073=Digital -InputCue2074=Item 61 Enabled -InputSigType2074=Digital -InputCue2075=Item 62 Enabled -InputSigType2075=Digital -InputCue2076=Item 63 Enabled -InputSigType2076=Digital -InputCue2077=Item 64 Enabled -InputSigType2077=Digital -InputCue2078=Item 65 Enabled -InputSigType2078=Digital -InputCue2079=Item 66 Enabled -InputSigType2079=Digital -InputCue2080=Item 67 Enabled -InputSigType2080=Digital -InputCue2081=Item 68 Enabled -InputSigType2081=Digital -InputCue2082=Item 69 Enabled -InputSigType2082=Digital -InputCue2083=Item 70 Enabled -InputSigType2083=Digital -InputCue2084=Item 71 Enabled -InputSigType2084=Digital -InputCue2085=Item 72 Enabled -InputSigType2085=Digital -InputCue2086=Item 73 Enabled -InputSigType2086=Digital -InputCue2087=Item 74 Enabled -InputSigType2087=Digital -InputCue2088=Item 75 Enabled -InputSigType2088=Digital -InputCue2089=Item 76 Enabled -InputSigType2089=Digital -InputCue2090=Item 77 Enabled -InputSigType2090=Digital -InputCue2091=Item 78 Enabled -InputSigType2091=Digital -InputCue2092=Item 79 Enabled -InputSigType2092=Digital -InputCue2093=Item 80 Enabled -InputSigType2093=Digital -InputCue2094=Item 81 Enabled -InputSigType2094=Digital -InputCue2095=Item 82 Enabled -InputSigType2095=Digital -InputCue2096=Item 83 Enabled -InputSigType2096=Digital -InputCue2097=Item 84 Enabled -InputSigType2097=Digital -InputCue2098=Item 85 Enabled -InputSigType2098=Digital -InputCue2099=Item 86 Enabled -InputSigType2099=Digital -InputCue2100=Item 87 Enabled -InputSigType2100=Digital -InputCue2101=Item 88 Enabled -InputSigType2101=Digital -InputCue2102=Item 89 Enabled -InputSigType2102=Digital -InputCue2103=Item 90 Enabled -InputSigType2103=Digital -InputCue2104=Item 91 Enabled -InputSigType2104=Digital -InputCue2105=Item 92 Enabled -InputSigType2105=Digital -InputCue2106=Item 93 Enabled -InputSigType2106=Digital -InputCue2107=Item 94 Enabled -InputSigType2107=Digital -InputCue2108=Item 95 Enabled -InputSigType2108=Digital -InputCue2109=Item 96 Enabled -InputSigType2109=Digital -InputCue2110=Item 97 Enabled -InputSigType2110=Digital -InputCue2111=Item 98 Enabled -InputSigType2111=Digital -InputCue2112=Item 99 Enabled -InputSigType2112=Digital -InputCue2113=Item 100 Enabled -InputSigType2113=Digital -InputCue2114=Item 101 Enabled -InputSigType2114=Digital -InputCue2115=Item 102 Enabled -InputSigType2115=Digital -InputCue2116=Item 103 Enabled -InputSigType2116=Digital -InputCue2117=Item 104 Enabled -InputSigType2117=Digital -InputCue2118=Item 105 Enabled -InputSigType2118=Digital -InputCue2119=Item 106 Enabled -InputSigType2119=Digital -InputCue2120=Item 107 Enabled -InputSigType2120=Digital -InputCue2121=Item 108 Enabled -InputSigType2121=Digital -InputCue2122=Item 109 Enabled -InputSigType2122=Digital -InputCue2123=Item 110 Enabled -InputSigType2123=Digital -InputCue2124=Item 111 Enabled -InputSigType2124=Digital -InputCue2125=Item 112 Enabled -InputSigType2125=Digital -InputCue2126=Item 113 Enabled -InputSigType2126=Digital -InputCue2127=Item 114 Enabled -InputSigType2127=Digital -InputCue2128=Item 115 Enabled -InputSigType2128=Digital -InputCue2129=Item 116 Enabled -InputSigType2129=Digital -InputCue2130=Item 117 Enabled -InputSigType2130=Digital -InputCue2131=Item 118 Enabled -InputSigType2131=Digital -InputCue2132=Item 119 Enabled -InputSigType2132=Digital -InputCue2133=Item 120 Enabled -InputSigType2133=Digital -InputCue2134=Item 121 Enabled -InputSigType2134=Digital -InputCue2135=Item 122 Enabled -InputSigType2135=Digital -InputCue2136=Item 123 Enabled -InputSigType2136=Digital -InputCue2137=Item 124 Enabled -InputSigType2137=Digital -InputCue2138=Item 125 Enabled -InputSigType2138=Digital -InputCue2139=Item 126 Enabled -InputSigType2139=Digital -InputCue2140=Item 127 Enabled -InputSigType2140=Digital -InputCue2141=Item 128 Enabled -InputSigType2141=Digital -InputCue2142=Item 129 Enabled -InputSigType2142=Digital -InputCue2143=Item 130 Enabled -InputSigType2143=Digital -InputCue2144=Item 131 Enabled -InputSigType2144=Digital -InputCue2145=Item 132 Enabled -InputSigType2145=Digital -InputCue2146=Item 133 Enabled -InputSigType2146=Digital -InputCue2147=Item 134 Enabled -InputSigType2147=Digital -InputCue2148=Item 135 Enabled -InputSigType2148=Digital -InputCue2149=Item 136 Enabled -InputSigType2149=Digital -InputCue2150=Item 137 Enabled -InputSigType2150=Digital -InputCue2151=Item 138 Enabled -InputSigType2151=Digital -InputCue2152=Item 139 Enabled -InputSigType2152=Digital -InputCue2153=Item 140 Enabled -InputSigType2153=Digital -InputCue2154=Item 141 Enabled -InputSigType2154=Digital -InputCue2155=Item 142 Enabled -InputSigType2155=Digital -InputCue2156=Item 143 Enabled -InputSigType2156=Digital -InputCue2157=Item 144 Enabled -InputSigType2157=Digital -InputCue2158=Item 145 Enabled -InputSigType2158=Digital -InputCue2159=Item 146 Enabled -InputSigType2159=Digital -InputCue2160=Item 147 Enabled -InputSigType2160=Digital -InputCue2161=Item 148 Enabled -InputSigType2161=Digital -InputCue2162=Item 149 Enabled -InputSigType2162=Digital -InputCue2163=Item 150 Enabled -InputSigType2163=Digital -InputCue2164=Item 151 Enabled -InputSigType2164=Digital -InputCue2165=Item 152 Enabled -InputSigType2165=Digital -InputCue2166=Item 153 Enabled -InputSigType2166=Digital -InputCue2167=Item 154 Enabled -InputSigType2167=Digital -InputCue2168=Item 155 Enabled -InputSigType2168=Digital -InputCue2169=Item 156 Enabled -InputSigType2169=Digital -InputCue2170=Item 157 Enabled -InputSigType2170=Digital -InputCue2171=Item 158 Enabled -InputSigType2171=Digital -InputCue2172=Item 159 Enabled -InputSigType2172=Digital -InputCue2173=Item 160 Enabled -InputSigType2173=Digital -InputCue2174=Item 161 Enabled -InputSigType2174=Digital -InputCue2175=Item 162 Enabled -InputSigType2175=Digital -InputCue2176=Item 163 Enabled -InputSigType2176=Digital -InputCue2177=Item 164 Enabled -InputSigType2177=Digital -InputCue2178=Item 165 Enabled -InputSigType2178=Digital -InputCue2179=Item 166 Enabled -InputSigType2179=Digital -InputCue2180=Item 167 Enabled -InputSigType2180=Digital -InputCue2181=Item 168 Enabled -InputSigType2181=Digital -InputCue2182=Item 169 Enabled -InputSigType2182=Digital -InputCue2183=Item 170 Enabled -InputSigType2183=Digital -InputCue2184=Item 171 Enabled -InputSigType2184=Digital -InputCue2185=Item 172 Enabled -InputSigType2185=Digital -InputCue2186=Item 173 Enabled -InputSigType2186=Digital -InputCue2187=Item 174 Enabled -InputSigType2187=Digital -InputCue2188=Item 175 Enabled -InputSigType2188=Digital -InputCue2189=Item 176 Enabled -InputSigType2189=Digital -InputCue2190=Item 177 Enabled -InputSigType2190=Digital -InputCue2191=Item 178 Enabled -InputSigType2191=Digital -InputCue2192=Item 179 Enabled -InputSigType2192=Digital -InputCue2193=Item 180 Enabled -InputSigType2193=Digital -InputCue2194=Item 181 Enabled -InputSigType2194=Digital -InputCue2195=Item 182 Enabled -InputSigType2195=Digital -InputCue2196=Item 183 Enabled -InputSigType2196=Digital -InputCue2197=Item 184 Enabled -InputSigType2197=Digital -InputCue2198=Item 185 Enabled -InputSigType2198=Digital -InputCue2199=Item 186 Enabled -InputSigType2199=Digital -InputCue2200=Item 187 Enabled -InputSigType2200=Digital -InputCue2201=Item 188 Enabled -InputSigType2201=Digital -InputCue2202=Item 189 Enabled -InputSigType2202=Digital -InputCue2203=Item 190 Enabled -InputSigType2203=Digital -InputCue2204=Item 191 Enabled -InputSigType2204=Digital -InputCue2205=Item 192 Enabled -InputSigType2205=Digital -InputCue2206=Item 193 Enabled -InputSigType2206=Digital -InputCue2207=Item 194 Enabled -InputSigType2207=Digital -InputCue2208=Item 195 Enabled -InputSigType2208=Digital -InputCue2209=Item 196 Enabled -InputSigType2209=Digital -InputCue2210=Item 197 Enabled -InputSigType2210=Digital -InputCue2211=Item 198 Enabled -InputSigType2211=Digital -InputCue2212=Item 199 Enabled -InputSigType2212=Digital -InputCue2213=Item 200 Enabled -InputSigType2213=Digital -InputCue2214=Item 201 Enabled -InputSigType2214=Digital -InputCue2215=Item 202 Enabled -InputSigType2215=Digital -InputCue2216=Item 203 Enabled -InputSigType2216=Digital -InputCue2217=Item 204 Enabled -InputSigType2217=Digital -InputCue2218=Item 205 Enabled -InputSigType2218=Digital -InputCue2219=Item 206 Enabled -InputSigType2219=Digital -InputCue2220=Item 207 Enabled -InputSigType2220=Digital -InputCue2221=Item 208 Enabled -InputSigType2221=Digital -InputCue2222=Item 209 Enabled -InputSigType2222=Digital -InputCue2223=Item 210 Enabled -InputSigType2223=Digital -InputCue2224=Item 211 Enabled -InputSigType2224=Digital -InputCue2225=Item 212 Enabled -InputSigType2225=Digital -InputCue2226=Item 213 Enabled -InputSigType2226=Digital -InputCue2227=Item 214 Enabled -InputSigType2227=Digital -InputCue2228=Item 215 Enabled -InputSigType2228=Digital -InputCue2229=Item 216 Enabled -InputSigType2229=Digital -InputCue2230=Item 217 Enabled -InputSigType2230=Digital -InputCue2231=Item 218 Enabled -InputSigType2231=Digital -InputCue2232=Item 219 Enabled -InputSigType2232=Digital -InputCue2233=Item 220 Enabled -InputSigType2233=Digital -InputCue2234=Item 221 Enabled -InputSigType2234=Digital -InputCue2235=Item 222 Enabled -InputSigType2235=Digital -InputCue2236=Item 223 Enabled -InputSigType2236=Digital -InputCue2237=Item 224 Enabled -InputSigType2237=Digital -InputCue2238=Item 225 Enabled -InputSigType2238=Digital -InputCue2239=Item 226 Enabled -InputSigType2239=Digital -InputCue2240=Item 227 Enabled -InputSigType2240=Digital -InputCue2241=Item 228 Enabled -InputSigType2241=Digital -InputCue2242=Item 229 Enabled -InputSigType2242=Digital -InputCue2243=Item 230 Enabled -InputSigType2243=Digital -InputCue2244=Item 231 Enabled -InputSigType2244=Digital -InputCue2245=Item 232 Enabled -InputSigType2245=Digital -InputCue2246=Item 233 Enabled -InputSigType2246=Digital -InputCue2247=Item 234 Enabled -InputSigType2247=Digital -InputCue2248=Item 235 Enabled -InputSigType2248=Digital -InputCue2249=Item 236 Enabled -InputSigType2249=Digital -InputCue2250=Item 237 Enabled -InputSigType2250=Digital -InputCue2251=Item 238 Enabled -InputSigType2251=Digital -InputCue2252=Item 239 Enabled -InputSigType2252=Digital -InputCue2253=Item 240 Enabled -InputSigType2253=Digital -InputCue2254=Item 241 Enabled -InputSigType2254=Digital -InputCue2255=Item 242 Enabled -InputSigType2255=Digital -InputCue2256=Item 243 Enabled -InputSigType2256=Digital -InputCue2257=Item 244 Enabled -InputSigType2257=Digital -InputCue2258=Item 245 Enabled -InputSigType2258=Digital -InputCue2259=Item 246 Enabled -InputSigType2259=Digital -InputCue2260=Item 247 Enabled -InputSigType2260=Digital -InputCue2261=Item 248 Enabled -InputSigType2261=Digital -InputCue2262=Item 249 Enabled -InputSigType2262=Digital -InputCue2263=Item 250 Enabled -InputSigType2263=Digital -InputCue2264=Item 251 Enabled -InputSigType2264=Digital -InputCue2265=Item 252 Enabled -InputSigType2265=Digital -InputCue2266=Item 253 Enabled -InputSigType2266=Digital -InputCue2267=Item 254 Enabled -InputSigType2267=Digital -InputCue2268=Item 255 Enabled -InputSigType2268=Digital -InputCue2269=[~UNUSED2~] -InputSigType2269=Digital|Analog|Serial|String -InputCue4014=[~EndGroup~]Enable -InputSigType4014=Digital -InputCue4015=[~BeginGroup~]Visible -InputSigType4015=Digital -InputCue4016=Item 1 Visible -InputSigType4016=Digital -InputCue4017=Item 2 Visible -InputSigType4017=Digital -InputCue4018=Item 3 Visible -InputSigType4018=Digital -InputCue4019=Item 4 Visible -InputSigType4019=Digital -InputCue4020=Item 5 Visible -InputSigType4020=Digital -InputCue4021=Item 6 Visible -InputSigType4021=Digital -InputCue4022=Item 7 Visible -InputSigType4022=Digital -InputCue4023=Item 8 Visible -InputSigType4023=Digital -InputCue4024=Item 9 Visible -InputSigType4024=Digital -InputCue4025=Item 10 Visible -InputSigType4025=Digital -InputCue4026=Item 11 Visible -InputSigType4026=Digital -InputCue4027=Item 12 Visible -InputSigType4027=Digital -InputCue4028=Item 13 Visible -InputSigType4028=Digital -InputCue4029=Item 14 Visible -InputSigType4029=Digital -InputCue4030=Item 15 Visible -InputSigType4030=Digital -InputCue4031=Item 16 Visible -InputSigType4031=Digital -InputCue4032=Item 17 Visible -InputSigType4032=Digital -InputCue4033=Item 18 Visible -InputSigType4033=Digital -InputCue4034=Item 19 Visible -InputSigType4034=Digital -InputCue4035=Item 20 Visible -InputSigType4035=Digital -InputCue4036=Item 21 Visible -InputSigType4036=Digital -InputCue4037=Item 22 Visible -InputSigType4037=Digital -InputCue4038=Item 23 Visible -InputSigType4038=Digital -InputCue4039=Item 24 Visible -InputSigType4039=Digital -InputCue4040=Item 25 Visible -InputSigType4040=Digital -InputCue4041=Item 26 Visible -InputSigType4041=Digital -InputCue4042=Item 27 Visible -InputSigType4042=Digital -InputCue4043=Item 28 Visible -InputSigType4043=Digital -InputCue4044=Item 29 Visible -InputSigType4044=Digital -InputCue4045=Item 30 Visible -InputSigType4045=Digital -InputCue4046=Item 31 Visible -InputSigType4046=Digital -InputCue4047=Item 32 Visible -InputSigType4047=Digital -InputCue4048=Item 33 Visible -InputSigType4048=Digital -InputCue4049=Item 34 Visible -InputSigType4049=Digital -InputCue4050=Item 35 Visible -InputSigType4050=Digital -InputCue4051=Item 36 Visible -InputSigType4051=Digital -InputCue4052=Item 37 Visible -InputSigType4052=Digital -InputCue4053=Item 38 Visible -InputSigType4053=Digital -InputCue4054=Item 39 Visible -InputSigType4054=Digital -InputCue4055=Item 40 Visible -InputSigType4055=Digital -InputCue4056=Item 41 Visible -InputSigType4056=Digital -InputCue4057=Item 42 Visible -InputSigType4057=Digital -InputCue4058=Item 43 Visible -InputSigType4058=Digital -InputCue4059=Item 44 Visible -InputSigType4059=Digital -InputCue4060=Item 45 Visible -InputSigType4060=Digital -InputCue4061=Item 46 Visible -InputSigType4061=Digital -InputCue4062=Item 47 Visible -InputSigType4062=Digital -InputCue4063=Item 48 Visible -InputSigType4063=Digital -InputCue4064=Item 49 Visible -InputSigType4064=Digital -InputCue4065=Item 50 Visible -InputSigType4065=Digital -InputCue4066=Item 51 Visible -InputSigType4066=Digital -InputCue4067=Item 52 Visible -InputSigType4067=Digital -InputCue4068=Item 53 Visible -InputSigType4068=Digital -InputCue4069=Item 54 Visible -InputSigType4069=Digital -InputCue4070=Item 55 Visible -InputSigType4070=Digital -InputCue4071=Item 56 Visible -InputSigType4071=Digital -InputCue4072=Item 57 Visible -InputSigType4072=Digital -InputCue4073=Item 58 Visible -InputSigType4073=Digital -InputCue4074=Item 59 Visible -InputSigType4074=Digital -InputCue4075=Item 60 Visible -InputSigType4075=Digital -InputCue4076=Item 61 Visible -InputSigType4076=Digital -InputCue4077=Item 62 Visible -InputSigType4077=Digital -InputCue4078=Item 63 Visible -InputSigType4078=Digital -InputCue4079=Item 64 Visible -InputSigType4079=Digital -InputCue4080=Item 65 Visible -InputSigType4080=Digital -InputCue4081=Item 66 Visible -InputSigType4081=Digital -InputCue4082=Item 67 Visible -InputSigType4082=Digital -InputCue4083=Item 68 Visible -InputSigType4083=Digital -InputCue4084=Item 69 Visible -InputSigType4084=Digital -InputCue4085=Item 70 Visible -InputSigType4085=Digital -InputCue4086=Item 71 Visible -InputSigType4086=Digital -InputCue4087=Item 72 Visible -InputSigType4087=Digital -InputCue4088=Item 73 Visible -InputSigType4088=Digital -InputCue4089=Item 74 Visible -InputSigType4089=Digital -InputCue4090=Item 75 Visible -InputSigType4090=Digital -InputCue4091=Item 76 Visible -InputSigType4091=Digital -InputCue4092=Item 77 Visible -InputSigType4092=Digital -InputCue4093=Item 78 Visible -InputSigType4093=Digital -InputCue4094=Item 79 Visible -InputSigType4094=Digital -InputCue4095=Item 80 Visible -InputSigType4095=Digital -InputCue4096=Item 81 Visible -InputSigType4096=Digital -InputCue4097=Item 82 Visible -InputSigType4097=Digital -InputCue4098=Item 83 Visible -InputSigType4098=Digital -InputCue4099=Item 84 Visible -InputSigType4099=Digital -InputCue4100=Item 85 Visible -InputSigType4100=Digital -InputCue4101=Item 86 Visible -InputSigType4101=Digital -InputCue4102=Item 87 Visible -InputSigType4102=Digital -InputCue4103=Item 88 Visible -InputSigType4103=Digital -InputCue4104=Item 89 Visible -InputSigType4104=Digital -InputCue4105=Item 90 Visible -InputSigType4105=Digital -InputCue4106=Item 91 Visible -InputSigType4106=Digital -InputCue4107=Item 92 Visible -InputSigType4107=Digital -InputCue4108=Item 93 Visible -InputSigType4108=Digital -InputCue4109=Item 94 Visible -InputSigType4109=Digital -InputCue4110=Item 95 Visible -InputSigType4110=Digital -InputCue4111=Item 96 Visible -InputSigType4111=Digital -InputCue4112=Item 97 Visible -InputSigType4112=Digital -InputCue4113=Item 98 Visible -InputSigType4113=Digital -InputCue4114=Item 99 Visible -InputSigType4114=Digital -InputCue4115=Item 100 Visible -InputSigType4115=Digital -InputCue4116=Item 101 Visible -InputSigType4116=Digital -InputCue4117=Item 102 Visible -InputSigType4117=Digital -InputCue4118=Item 103 Visible -InputSigType4118=Digital -InputCue4119=Item 104 Visible -InputSigType4119=Digital -InputCue4120=Item 105 Visible -InputSigType4120=Digital -InputCue4121=Item 106 Visible -InputSigType4121=Digital -InputCue4122=Item 107 Visible -InputSigType4122=Digital -InputCue4123=Item 108 Visible -InputSigType4123=Digital -InputCue4124=Item 109 Visible -InputSigType4124=Digital -InputCue4125=Item 110 Visible -InputSigType4125=Digital -InputCue4126=Item 111 Visible -InputSigType4126=Digital -InputCue4127=Item 112 Visible -InputSigType4127=Digital -InputCue4128=Item 113 Visible -InputSigType4128=Digital -InputCue4129=Item 114 Visible -InputSigType4129=Digital -InputCue4130=Item 115 Visible -InputSigType4130=Digital -InputCue4131=Item 116 Visible -InputSigType4131=Digital -InputCue4132=Item 117 Visible -InputSigType4132=Digital -InputCue4133=Item 118 Visible -InputSigType4133=Digital -InputCue4134=Item 119 Visible -InputSigType4134=Digital -InputCue4135=Item 120 Visible -InputSigType4135=Digital -InputCue4136=Item 121 Visible -InputSigType4136=Digital -InputCue4137=Item 122 Visible -InputSigType4137=Digital -InputCue4138=Item 123 Visible -InputSigType4138=Digital -InputCue4139=Item 124 Visible -InputSigType4139=Digital -InputCue4140=Item 125 Visible -InputSigType4140=Digital -InputCue4141=Item 126 Visible -InputSigType4141=Digital -InputCue4142=Item 127 Visible -InputSigType4142=Digital -InputCue4143=Item 128 Visible -InputSigType4143=Digital -InputCue4144=Item 129 Visible -InputSigType4144=Digital -InputCue4145=Item 130 Visible -InputSigType4145=Digital -InputCue4146=Item 131 Visible -InputSigType4146=Digital -InputCue4147=Item 132 Visible -InputSigType4147=Digital -InputCue4148=Item 133 Visible -InputSigType4148=Digital -InputCue4149=Item 134 Visible -InputSigType4149=Digital -InputCue4150=Item 135 Visible -InputSigType4150=Digital -InputCue4151=Item 136 Visible -InputSigType4151=Digital -InputCue4152=Item 137 Visible -InputSigType4152=Digital -InputCue4153=Item 138 Visible -InputSigType4153=Digital -InputCue4154=Item 139 Visible -InputSigType4154=Digital -InputCue4155=Item 140 Visible -InputSigType4155=Digital -InputCue4156=Item 141 Visible -InputSigType4156=Digital -InputCue4157=Item 142 Visible -InputSigType4157=Digital -InputCue4158=Item 143 Visible -InputSigType4158=Digital -InputCue4159=Item 144 Visible -InputSigType4159=Digital -InputCue4160=Item 145 Visible -InputSigType4160=Digital -InputCue4161=Item 146 Visible -InputSigType4161=Digital -InputCue4162=Item 147 Visible -InputSigType4162=Digital -InputCue4163=Item 148 Visible -InputSigType4163=Digital -InputCue4164=Item 149 Visible -InputSigType4164=Digital -InputCue4165=Item 150 Visible -InputSigType4165=Digital -InputCue4166=Item 151 Visible -InputSigType4166=Digital -InputCue4167=Item 152 Visible -InputSigType4167=Digital -InputCue4168=Item 153 Visible -InputSigType4168=Digital -InputCue4169=Item 154 Visible -InputSigType4169=Digital -InputCue4170=Item 155 Visible -InputSigType4170=Digital -InputCue4171=Item 156 Visible -InputSigType4171=Digital -InputCue4172=Item 157 Visible -InputSigType4172=Digital -InputCue4173=Item 158 Visible -InputSigType4173=Digital -InputCue4174=Item 159 Visible -InputSigType4174=Digital -InputCue4175=Item 160 Visible -InputSigType4175=Digital -InputCue4176=Item 161 Visible -InputSigType4176=Digital -InputCue4177=Item 162 Visible -InputSigType4177=Digital -InputCue4178=Item 163 Visible -InputSigType4178=Digital -InputCue4179=Item 164 Visible -InputSigType4179=Digital -InputCue4180=Item 165 Visible -InputSigType4180=Digital -InputCue4181=Item 166 Visible -InputSigType4181=Digital -InputCue4182=Item 167 Visible -InputSigType4182=Digital -InputCue4183=Item 168 Visible -InputSigType4183=Digital -InputCue4184=Item 169 Visible -InputSigType4184=Digital -InputCue4185=Item 170 Visible -InputSigType4185=Digital -InputCue4186=Item 171 Visible -InputSigType4186=Digital -InputCue4187=Item 172 Visible -InputSigType4187=Digital -InputCue4188=Item 173 Visible -InputSigType4188=Digital -InputCue4189=Item 174 Visible -InputSigType4189=Digital -InputCue4190=Item 175 Visible -InputSigType4190=Digital -InputCue4191=Item 176 Visible -InputSigType4191=Digital -InputCue4192=Item 177 Visible -InputSigType4192=Digital -InputCue4193=Item 178 Visible -InputSigType4193=Digital -InputCue4194=Item 179 Visible -InputSigType4194=Digital -InputCue4195=Item 180 Visible -InputSigType4195=Digital -InputCue4196=Item 181 Visible -InputSigType4196=Digital -InputCue4197=Item 182 Visible -InputSigType4197=Digital -InputCue4198=Item 183 Visible -InputSigType4198=Digital -InputCue4199=Item 184 Visible -InputSigType4199=Digital -InputCue4200=Item 185 Visible -InputSigType4200=Digital -InputCue4201=Item 186 Visible -InputSigType4201=Digital -InputCue4202=Item 187 Visible -InputSigType4202=Digital -InputCue4203=Item 188 Visible -InputSigType4203=Digital -InputCue4204=Item 189 Visible -InputSigType4204=Digital -InputCue4205=Item 190 Visible -InputSigType4205=Digital -InputCue4206=Item 191 Visible -InputSigType4206=Digital -InputCue4207=Item 192 Visible -InputSigType4207=Digital -InputCue4208=Item 193 Visible -InputSigType4208=Digital -InputCue4209=Item 194 Visible -InputSigType4209=Digital -InputCue4210=Item 195 Visible -InputSigType4210=Digital -InputCue4211=Item 196 Visible -InputSigType4211=Digital -InputCue4212=Item 197 Visible -InputSigType4212=Digital -InputCue4213=Item 198 Visible -InputSigType4213=Digital -InputCue4214=Item 199 Visible -InputSigType4214=Digital -InputCue4215=Item 200 Visible -InputSigType4215=Digital -InputCue4216=Item 201 Visible -InputSigType4216=Digital -InputCue4217=Item 202 Visible -InputSigType4217=Digital -InputCue4218=Item 203 Visible -InputSigType4218=Digital -InputCue4219=Item 204 Visible -InputSigType4219=Digital -InputCue4220=Item 205 Visible -InputSigType4220=Digital -InputCue4221=Item 206 Visible -InputSigType4221=Digital -InputCue4222=Item 207 Visible -InputSigType4222=Digital -InputCue4223=Item 208 Visible -InputSigType4223=Digital -InputCue4224=Item 209 Visible -InputSigType4224=Digital -InputCue4225=Item 210 Visible -InputSigType4225=Digital -InputCue4226=Item 211 Visible -InputSigType4226=Digital -InputCue4227=Item 212 Visible -InputSigType4227=Digital -InputCue4228=Item 213 Visible -InputSigType4228=Digital -InputCue4229=Item 214 Visible -InputSigType4229=Digital -InputCue4230=Item 215 Visible -InputSigType4230=Digital -InputCue4231=Item 216 Visible -InputSigType4231=Digital -InputCue4232=Item 217 Visible -InputSigType4232=Digital -InputCue4233=Item 218 Visible -InputSigType4233=Digital -InputCue4234=Item 219 Visible -InputSigType4234=Digital -InputCue4235=Item 220 Visible -InputSigType4235=Digital -InputCue4236=Item 221 Visible -InputSigType4236=Digital -InputCue4237=Item 222 Visible -InputSigType4237=Digital -InputCue4238=Item 223 Visible -InputSigType4238=Digital -InputCue4239=Item 224 Visible -InputSigType4239=Digital -InputCue4240=Item 225 Visible -InputSigType4240=Digital -InputCue4241=Item 226 Visible -InputSigType4241=Digital -InputCue4242=Item 227 Visible -InputSigType4242=Digital -InputCue4243=Item 228 Visible -InputSigType4243=Digital -InputCue4244=Item 229 Visible -InputSigType4244=Digital -InputCue4245=Item 230 Visible -InputSigType4245=Digital -InputCue4246=Item 231 Visible -InputSigType4246=Digital -InputCue4247=Item 232 Visible -InputSigType4247=Digital -InputCue4248=Item 233 Visible -InputSigType4248=Digital -InputCue4249=Item 234 Visible -InputSigType4249=Digital -InputCue4250=Item 235 Visible -InputSigType4250=Digital -InputCue4251=Item 236 Visible -InputSigType4251=Digital -InputCue4252=Item 237 Visible -InputSigType4252=Digital -InputCue4253=Item 238 Visible -InputSigType4253=Digital -InputCue4254=Item 239 Visible -InputSigType4254=Digital -InputCue4255=Item 240 Visible -InputSigType4255=Digital -InputCue4256=Item 241 Visible -InputSigType4256=Digital -InputCue4257=Item 242 Visible -InputSigType4257=Digital -InputCue4258=Item 243 Visible -InputSigType4258=Digital -InputCue4259=Item 244 Visible -InputSigType4259=Digital -InputCue4260=Item 245 Visible -InputSigType4260=Digital -InputCue4261=Item 246 Visible -InputSigType4261=Digital -InputCue4262=Item 247 Visible -InputSigType4262=Digital -InputCue4263=Item 248 Visible -InputSigType4263=Digital -InputCue4264=Item 249 Visible -InputSigType4264=Digital -InputCue4265=Item 250 Visible -InputSigType4265=Digital -InputCue4266=Item 251 Visible -InputSigType4266=Digital -InputCue4267=Item 252 Visible -InputSigType4267=Digital -InputCue4268=Item 253 Visible -InputSigType4268=Digital -InputCue4269=Item 254 Visible -InputSigType4269=Digital -InputCue4270=Item 255 Visible -InputSigType4270=Digital -InputCue4271=[~UNUSED2~] -InputSigType4271=Digital|Analog|Serial|String -InputCue6016=[~EndGroup~]Visible -InputSigType6016=Digital -OutputCue1=[~UNUSED3~] -OutputSigType1=Digital -OutputCue2=Is Moving -OutputSigType2=Digital -OutputCue3=[~UNUSED2~] -OutputSigType3=Digital -OutputCue4=[~UNUSED2~] -OutputSigType4=Digital -OutputCue5=[~UNUSED2~] -OutputSigType5=Digital -OutputCue6=[~UNUSED2~] -OutputSigType6=Digital -OutputCue7=[~UNUSED2~] -OutputSigType7=Digital -OutputCue8=[~UNUSED2~] -OutputSigType8=Digital -OutputCue9=[~UNUSED2~] -OutputSigType9=Digital -OutputCue10=[~UNUSED2~] -OutputSigType10=Digital -OutputCue11=[~BeginGroup~]Press -OutputSigType11=Digital -OutputCue12=Item 1 Pressed -OutputSigType12=Digital -OutputCue13=Item 2 Pressed -OutputSigType13=Digital -OutputCue14=Item 3 Pressed -OutputSigType14=Digital -OutputCue15=Item 4 Pressed -OutputSigType15=Digital -OutputCue16=Item 5 Pressed -OutputSigType16=Digital -OutputCue17=Item 6 Pressed -OutputSigType17=Digital -OutputCue18=Item 7 Pressed -OutputSigType18=Digital -OutputCue19=Item 8 Pressed -OutputSigType19=Digital -OutputCue20=Item 9 Pressed -OutputSigType20=Digital -OutputCue21=Item 10 Pressed -OutputSigType21=Digital -OutputCue22=Item 11 Pressed -OutputSigType22=Digital -OutputCue23=Item 12 Pressed -OutputSigType23=Digital -OutputCue24=Item 13 Pressed -OutputSigType24=Digital -OutputCue25=Item 14 Pressed -OutputSigType25=Digital -OutputCue26=Item 15 Pressed -OutputSigType26=Digital -OutputCue27=Item 16 Pressed -OutputSigType27=Digital -OutputCue28=Item 17 Pressed -OutputSigType28=Digital -OutputCue29=Item 18 Pressed -OutputSigType29=Digital -OutputCue30=Item 19 Pressed -OutputSigType30=Digital -OutputCue31=Item 20 Pressed -OutputSigType31=Digital -OutputCue32=Item 21 Pressed -OutputSigType32=Digital -OutputCue33=Item 22 Pressed -OutputSigType33=Digital -OutputCue34=Item 23 Pressed -OutputSigType34=Digital -OutputCue35=Item 24 Pressed -OutputSigType35=Digital -OutputCue36=Item 25 Pressed -OutputSigType36=Digital -OutputCue37=Item 26 Pressed -OutputSigType37=Digital -OutputCue38=Item 27 Pressed -OutputSigType38=Digital -OutputCue39=Item 28 Pressed -OutputSigType39=Digital -OutputCue40=Item 29 Pressed -OutputSigType40=Digital -OutputCue41=Item 30 Pressed -OutputSigType41=Digital -OutputCue42=Item 31 Pressed -OutputSigType42=Digital -OutputCue43=Item 32 Pressed -OutputSigType43=Digital -OutputCue44=Item 33 Pressed -OutputSigType44=Digital -OutputCue45=Item 34 Pressed -OutputSigType45=Digital -OutputCue46=Item 35 Pressed -OutputSigType46=Digital -OutputCue47=Item 36 Pressed -OutputSigType47=Digital -OutputCue48=Item 37 Pressed -OutputSigType48=Digital -OutputCue49=Item 38 Pressed -OutputSigType49=Digital -OutputCue50=Item 39 Pressed -OutputSigType50=Digital -OutputCue51=Item 40 Pressed -OutputSigType51=Digital -OutputCue52=Item 41 Pressed -OutputSigType52=Digital -OutputCue53=Item 42 Pressed -OutputSigType53=Digital -OutputCue54=Item 43 Pressed -OutputSigType54=Digital -OutputCue55=Item 44 Pressed -OutputSigType55=Digital -OutputCue56=Item 45 Pressed -OutputSigType56=Digital -OutputCue57=Item 46 Pressed -OutputSigType57=Digital -OutputCue58=Item 47 Pressed -OutputSigType58=Digital -OutputCue59=Item 48 Pressed -OutputSigType59=Digital -OutputCue60=Item 49 Pressed -OutputSigType60=Digital -OutputCue61=Item 50 Pressed -OutputSigType61=Digital -OutputCue62=Item 51 Pressed -OutputSigType62=Digital -OutputCue63=Item 52 Pressed -OutputSigType63=Digital -OutputCue64=Item 53 Pressed -OutputSigType64=Digital -OutputCue65=Item 54 Pressed -OutputSigType65=Digital -OutputCue66=Item 55 Pressed -OutputSigType66=Digital -OutputCue67=Item 56 Pressed -OutputSigType67=Digital -OutputCue68=Item 57 Pressed -OutputSigType68=Digital -OutputCue69=Item 58 Pressed -OutputSigType69=Digital -OutputCue70=Item 59 Pressed -OutputSigType70=Digital -OutputCue71=Item 60 Pressed -OutputSigType71=Digital -OutputCue72=Item 61 Pressed -OutputSigType72=Digital -OutputCue73=Item 62 Pressed -OutputSigType73=Digital -OutputCue74=Item 63 Pressed -OutputSigType74=Digital -OutputCue75=Item 64 Pressed -OutputSigType75=Digital -OutputCue76=Item 65 Pressed -OutputSigType76=Digital -OutputCue77=Item 66 Pressed -OutputSigType77=Digital -OutputCue78=Item 67 Pressed -OutputSigType78=Digital -OutputCue79=Item 68 Pressed -OutputSigType79=Digital -OutputCue80=Item 69 Pressed -OutputSigType80=Digital -OutputCue81=Item 70 Pressed -OutputSigType81=Digital -OutputCue82=Item 71 Pressed -OutputSigType82=Digital -OutputCue83=Item 72 Pressed -OutputSigType83=Digital -OutputCue84=Item 73 Pressed -OutputSigType84=Digital -OutputCue85=Item 74 Pressed -OutputSigType85=Digital -OutputCue86=Item 75 Pressed -OutputSigType86=Digital -OutputCue87=Item 76 Pressed -OutputSigType87=Digital -OutputCue88=Item 77 Pressed -OutputSigType88=Digital -OutputCue89=Item 78 Pressed -OutputSigType89=Digital -OutputCue90=Item 79 Pressed -OutputSigType90=Digital -OutputCue91=Item 80 Pressed -OutputSigType91=Digital -OutputCue92=Item 81 Pressed -OutputSigType92=Digital -OutputCue93=Item 82 Pressed -OutputSigType93=Digital -OutputCue94=Item 83 Pressed -OutputSigType94=Digital -OutputCue95=Item 84 Pressed -OutputSigType95=Digital -OutputCue96=Item 85 Pressed -OutputSigType96=Digital -OutputCue97=Item 86 Pressed -OutputSigType97=Digital -OutputCue98=Item 87 Pressed -OutputSigType98=Digital -OutputCue99=Item 88 Pressed -OutputSigType99=Digital -OutputCue100=Item 89 Pressed -OutputSigType100=Digital -OutputCue101=Item 90 Pressed -OutputSigType101=Digital -OutputCue102=Item 91 Pressed -OutputSigType102=Digital -OutputCue103=Item 92 Pressed -OutputSigType103=Digital -OutputCue104=Item 93 Pressed -OutputSigType104=Digital -OutputCue105=Item 94 Pressed -OutputSigType105=Digital -OutputCue106=Item 95 Pressed -OutputSigType106=Digital -OutputCue107=Item 96 Pressed -OutputSigType107=Digital -OutputCue108=Item 97 Pressed -OutputSigType108=Digital -OutputCue109=Item 98 Pressed -OutputSigType109=Digital -OutputCue110=Item 99 Pressed -OutputSigType110=Digital -OutputCue111=Item 100 Pressed -OutputSigType111=Digital -OutputCue112=Item 101 Pressed -OutputSigType112=Digital -OutputCue113=Item 102 Pressed -OutputSigType113=Digital -OutputCue114=Item 103 Pressed -OutputSigType114=Digital -OutputCue115=Item 104 Pressed -OutputSigType115=Digital -OutputCue116=Item 105 Pressed -OutputSigType116=Digital -OutputCue117=Item 106 Pressed -OutputSigType117=Digital -OutputCue118=Item 107 Pressed -OutputSigType118=Digital -OutputCue119=Item 108 Pressed -OutputSigType119=Digital -OutputCue120=Item 109 Pressed -OutputSigType120=Digital -OutputCue121=Item 110 Pressed -OutputSigType121=Digital -OutputCue122=Item 111 Pressed -OutputSigType122=Digital -OutputCue123=Item 112 Pressed -OutputSigType123=Digital -OutputCue124=Item 113 Pressed -OutputSigType124=Digital -OutputCue125=Item 114 Pressed -OutputSigType125=Digital -OutputCue126=Item 115 Pressed -OutputSigType126=Digital -OutputCue127=Item 116 Pressed -OutputSigType127=Digital -OutputCue128=Item 117 Pressed -OutputSigType128=Digital -OutputCue129=Item 118 Pressed -OutputSigType129=Digital -OutputCue130=Item 119 Pressed -OutputSigType130=Digital -OutputCue131=Item 120 Pressed -OutputSigType131=Digital -OutputCue132=Item 121 Pressed -OutputSigType132=Digital -OutputCue133=Item 122 Pressed -OutputSigType133=Digital -OutputCue134=Item 123 Pressed -OutputSigType134=Digital -OutputCue135=Item 124 Pressed -OutputSigType135=Digital -OutputCue136=Item 125 Pressed -OutputSigType136=Digital -OutputCue137=Item 126 Pressed -OutputSigType137=Digital -OutputCue138=Item 127 Pressed -OutputSigType138=Digital -OutputCue139=Item 128 Pressed -OutputSigType139=Digital -OutputCue140=Item 129 Pressed -OutputSigType140=Digital -OutputCue141=Item 130 Pressed -OutputSigType141=Digital -OutputCue142=Item 131 Pressed -OutputSigType142=Digital -OutputCue143=Item 132 Pressed -OutputSigType143=Digital -OutputCue144=Item 133 Pressed -OutputSigType144=Digital -OutputCue145=Item 134 Pressed -OutputSigType145=Digital -OutputCue146=Item 135 Pressed -OutputSigType146=Digital -OutputCue147=Item 136 Pressed -OutputSigType147=Digital -OutputCue148=Item 137 Pressed -OutputSigType148=Digital -OutputCue149=Item 138 Pressed -OutputSigType149=Digital -OutputCue150=Item 139 Pressed -OutputSigType150=Digital -OutputCue151=Item 140 Pressed -OutputSigType151=Digital -OutputCue152=Item 141 Pressed -OutputSigType152=Digital -OutputCue153=Item 142 Pressed -OutputSigType153=Digital -OutputCue154=Item 143 Pressed -OutputSigType154=Digital -OutputCue155=Item 144 Pressed -OutputSigType155=Digital -OutputCue156=Item 145 Pressed -OutputSigType156=Digital -OutputCue157=Item 146 Pressed -OutputSigType157=Digital -OutputCue158=Item 147 Pressed -OutputSigType158=Digital -OutputCue159=Item 148 Pressed -OutputSigType159=Digital -OutputCue160=Item 149 Pressed -OutputSigType160=Digital -OutputCue161=Item 150 Pressed -OutputSigType161=Digital -OutputCue162=Item 151 Pressed -OutputSigType162=Digital -OutputCue163=Item 152 Pressed -OutputSigType163=Digital -OutputCue164=Item 153 Pressed -OutputSigType164=Digital -OutputCue165=Item 154 Pressed -OutputSigType165=Digital -OutputCue166=Item 155 Pressed -OutputSigType166=Digital -OutputCue167=Item 156 Pressed -OutputSigType167=Digital -OutputCue168=Item 157 Pressed -OutputSigType168=Digital -OutputCue169=Item 158 Pressed -OutputSigType169=Digital -OutputCue170=Item 159 Pressed -OutputSigType170=Digital -OutputCue171=Item 160 Pressed -OutputSigType171=Digital -OutputCue172=Item 161 Pressed -OutputSigType172=Digital -OutputCue173=Item 162 Pressed -OutputSigType173=Digital -OutputCue174=Item 163 Pressed -OutputSigType174=Digital -OutputCue175=Item 164 Pressed -OutputSigType175=Digital -OutputCue176=Item 165 Pressed -OutputSigType176=Digital -OutputCue177=Item 166 Pressed -OutputSigType177=Digital -OutputCue178=Item 167 Pressed -OutputSigType178=Digital -OutputCue179=Item 168 Pressed -OutputSigType179=Digital -OutputCue180=Item 169 Pressed -OutputSigType180=Digital -OutputCue181=Item 170 Pressed -OutputSigType181=Digital -OutputCue182=Item 171 Pressed -OutputSigType182=Digital -OutputCue183=Item 172 Pressed -OutputSigType183=Digital -OutputCue184=Item 173 Pressed -OutputSigType184=Digital -OutputCue185=Item 174 Pressed -OutputSigType185=Digital -OutputCue186=Item 175 Pressed -OutputSigType186=Digital -OutputCue187=Item 176 Pressed -OutputSigType187=Digital -OutputCue188=Item 177 Pressed -OutputSigType188=Digital -OutputCue189=Item 178 Pressed -OutputSigType189=Digital -OutputCue190=Item 179 Pressed -OutputSigType190=Digital -OutputCue191=Item 180 Pressed -OutputSigType191=Digital -OutputCue192=Item 181 Pressed -OutputSigType192=Digital -OutputCue193=Item 182 Pressed -OutputSigType193=Digital -OutputCue194=Item 183 Pressed -OutputSigType194=Digital -OutputCue195=Item 184 Pressed -OutputSigType195=Digital -OutputCue196=Item 185 Pressed -OutputSigType196=Digital -OutputCue197=Item 186 Pressed -OutputSigType197=Digital -OutputCue198=Item 187 Pressed -OutputSigType198=Digital -OutputCue199=Item 188 Pressed -OutputSigType199=Digital -OutputCue200=Item 189 Pressed -OutputSigType200=Digital -OutputCue201=Item 190 Pressed -OutputSigType201=Digital -OutputCue202=Item 191 Pressed -OutputSigType202=Digital -OutputCue203=Item 192 Pressed -OutputSigType203=Digital -OutputCue204=Item 193 Pressed -OutputSigType204=Digital -OutputCue205=Item 194 Pressed -OutputSigType205=Digital -OutputCue206=Item 195 Pressed -OutputSigType206=Digital -OutputCue207=Item 196 Pressed -OutputSigType207=Digital -OutputCue208=Item 197 Pressed -OutputSigType208=Digital -OutputCue209=Item 198 Pressed -OutputSigType209=Digital -OutputCue210=Item 199 Pressed -OutputSigType210=Digital -OutputCue211=Item 200 Pressed -OutputSigType211=Digital -OutputCue212=Item 201 Pressed -OutputSigType212=Digital -OutputCue213=Item 202 Pressed -OutputSigType213=Digital -OutputCue214=Item 203 Pressed -OutputSigType214=Digital -OutputCue215=Item 204 Pressed -OutputSigType215=Digital -OutputCue216=Item 205 Pressed -OutputSigType216=Digital -OutputCue217=Item 206 Pressed -OutputSigType217=Digital -OutputCue218=Item 207 Pressed -OutputSigType218=Digital -OutputCue219=Item 208 Pressed -OutputSigType219=Digital -OutputCue220=Item 209 Pressed -OutputSigType220=Digital -OutputCue221=Item 210 Pressed -OutputSigType221=Digital -OutputCue222=Item 211 Pressed -OutputSigType222=Digital -OutputCue223=Item 212 Pressed -OutputSigType223=Digital -OutputCue224=Item 213 Pressed -OutputSigType224=Digital -OutputCue225=Item 214 Pressed -OutputSigType225=Digital -OutputCue226=Item 215 Pressed -OutputSigType226=Digital -OutputCue227=Item 216 Pressed -OutputSigType227=Digital -OutputCue228=Item 217 Pressed -OutputSigType228=Digital -OutputCue229=Item 218 Pressed -OutputSigType229=Digital -OutputCue230=Item 219 Pressed -OutputSigType230=Digital -OutputCue231=Item 220 Pressed -OutputSigType231=Digital -OutputCue232=Item 221 Pressed -OutputSigType232=Digital -OutputCue233=Item 222 Pressed -OutputSigType233=Digital -OutputCue234=Item 223 Pressed -OutputSigType234=Digital -OutputCue235=Item 224 Pressed -OutputSigType235=Digital -OutputCue236=Item 225 Pressed -OutputSigType236=Digital -OutputCue237=Item 226 Pressed -OutputSigType237=Digital -OutputCue238=Item 227 Pressed -OutputSigType238=Digital -OutputCue239=Item 228 Pressed -OutputSigType239=Digital -OutputCue240=Item 229 Pressed -OutputSigType240=Digital -OutputCue241=Item 230 Pressed -OutputSigType241=Digital -OutputCue242=Item 231 Pressed -OutputSigType242=Digital -OutputCue243=Item 232 Pressed -OutputSigType243=Digital -OutputCue244=Item 233 Pressed -OutputSigType244=Digital -OutputCue245=Item 234 Pressed -OutputSigType245=Digital -OutputCue246=Item 235 Pressed -OutputSigType246=Digital -OutputCue247=Item 236 Pressed -OutputSigType247=Digital -OutputCue248=Item 237 Pressed -OutputSigType248=Digital -OutputCue249=Item 238 Pressed -OutputSigType249=Digital -OutputCue250=Item 239 Pressed -OutputSigType250=Digital -OutputCue251=Item 240 Pressed -OutputSigType251=Digital -OutputCue252=Item 241 Pressed -OutputSigType252=Digital -OutputCue253=Item 242 Pressed -OutputSigType253=Digital -OutputCue254=Item 243 Pressed -OutputSigType254=Digital -OutputCue255=Item 244 Pressed -OutputSigType255=Digital -OutputCue256=Item 245 Pressed -OutputSigType256=Digital -OutputCue257=Item 246 Pressed -OutputSigType257=Digital -OutputCue258=Item 247 Pressed -OutputSigType258=Digital -OutputCue259=Item 248 Pressed -OutputSigType259=Digital -OutputCue260=Item 249 Pressed -OutputSigType260=Digital -OutputCue261=Item 250 Pressed -OutputSigType261=Digital -OutputCue262=Item 251 Pressed -OutputSigType262=Digital -OutputCue263=Item 252 Pressed -OutputSigType263=Digital -OutputCue264=Item 253 Pressed -OutputSigType264=Digital -OutputCue265=Item 254 Pressed -OutputSigType265=Digital -OutputCue266=Item 255 Pressed -OutputSigType266=Digital -OutputCue267=[~UNUSED2~] -OutputSigType267=Digital|Analog|Serial|String -OutputCue2012=[~EndGroup~]Press -OutputSigType2012=Digital -OutputCue2013=[~BeginGroup~]Enable -OutputSigType2013=Digital -OutputCue2014=[~UNUSED3~] -OutputSigType2014=Digital -OutputCue2015=[~UNUSED3~] -OutputSigType2015=Digital -OutputCue2016=[~UNUSED3~] -OutputSigType2016=Digital -OutputCue2017=[~UNUSED3~] -OutputSigType2017=Digital -OutputCue2018=[~UNUSED3~] -OutputSigType2018=Digital -OutputCue2019=[~UNUSED3~] -OutputSigType2019=Digital -OutputCue2020=[~UNUSED3~] -OutputSigType2020=Digital -OutputCue2021=[~UNUSED3~] -OutputSigType2021=Digital -OutputCue2022=[~UNUSED3~] -OutputSigType2022=Digital -OutputCue2023=[~UNUSED3~] -OutputSigType2023=Digital -OutputCue2024=[~UNUSED3~] -OutputSigType2024=Digital -OutputCue2025=[~UNUSED3~] -OutputSigType2025=Digital -OutputCue2026=[~UNUSED3~] -OutputSigType2026=Digital -OutputCue2027=[~UNUSED3~] -OutputSigType2027=Digital -OutputCue2028=[~UNUSED3~] -OutputSigType2028=Digital -OutputCue2029=[~UNUSED3~] -OutputSigType2029=Digital -OutputCue2030=[~UNUSED3~] -OutputSigType2030=Digital -OutputCue2031=[~UNUSED3~] -OutputSigType2031=Digital -OutputCue2032=[~UNUSED3~] -OutputSigType2032=Digital -OutputCue2033=[~UNUSED3~] -OutputSigType2033=Digital -OutputCue2034=[~UNUSED3~] -OutputSigType2034=Digital -OutputCue2035=[~UNUSED3~] -OutputSigType2035=Digital -OutputCue2036=[~UNUSED3~] -OutputSigType2036=Digital -OutputCue2037=[~UNUSED3~] -OutputSigType2037=Digital -OutputCue2038=[~UNUSED3~] -OutputSigType2038=Digital -OutputCue2039=[~UNUSED3~] -OutputSigType2039=Digital -OutputCue2040=[~UNUSED3~] -OutputSigType2040=Digital -OutputCue2041=[~UNUSED3~] -OutputSigType2041=Digital -OutputCue2042=[~UNUSED3~] -OutputSigType2042=Digital -OutputCue2043=[~UNUSED3~] -OutputSigType2043=Digital -OutputCue2044=[~UNUSED3~] -OutputSigType2044=Digital -OutputCue2045=[~UNUSED3~] -OutputSigType2045=Digital -OutputCue2046=[~UNUSED3~] -OutputSigType2046=Digital -OutputCue2047=[~UNUSED3~] -OutputSigType2047=Digital -OutputCue2048=[~UNUSED3~] -OutputSigType2048=Digital -OutputCue2049=[~UNUSED3~] -OutputSigType2049=Digital -OutputCue2050=[~UNUSED3~] -OutputSigType2050=Digital -OutputCue2051=[~UNUSED3~] -OutputSigType2051=Digital -OutputCue2052=[~UNUSED3~] -OutputSigType2052=Digital -OutputCue2053=[~UNUSED3~] -OutputSigType2053=Digital -OutputCue2054=[~UNUSED3~] -OutputSigType2054=Digital -OutputCue2055=[~UNUSED3~] -OutputSigType2055=Digital -OutputCue2056=[~UNUSED3~] -OutputSigType2056=Digital -OutputCue2057=[~UNUSED3~] -OutputSigType2057=Digital -OutputCue2058=[~UNUSED3~] -OutputSigType2058=Digital -OutputCue2059=[~UNUSED3~] -OutputSigType2059=Digital -OutputCue2060=[~UNUSED3~] -OutputSigType2060=Digital -OutputCue2061=[~UNUSED3~] -OutputSigType2061=Digital -OutputCue2062=[~UNUSED3~] -OutputSigType2062=Digital -OutputCue2063=[~UNUSED3~] -OutputSigType2063=Digital -OutputCue2064=[~UNUSED3~] -OutputSigType2064=Digital -OutputCue2065=[~UNUSED3~] -OutputSigType2065=Digital -OutputCue2066=[~UNUSED3~] -OutputSigType2066=Digital -OutputCue2067=[~UNUSED3~] -OutputSigType2067=Digital -OutputCue2068=[~UNUSED3~] -OutputSigType2068=Digital -OutputCue2069=[~UNUSED3~] -OutputSigType2069=Digital -OutputCue2070=[~UNUSED3~] -OutputSigType2070=Digital -OutputCue2071=[~UNUSED3~] -OutputSigType2071=Digital -OutputCue2072=[~UNUSED3~] -OutputSigType2072=Digital -OutputCue2073=[~UNUSED3~] -OutputSigType2073=Digital -OutputCue2074=[~UNUSED3~] -OutputSigType2074=Digital -OutputCue2075=[~UNUSED3~] -OutputSigType2075=Digital -OutputCue2076=[~UNUSED3~] -OutputSigType2076=Digital -OutputCue2077=[~UNUSED3~] -OutputSigType2077=Digital -OutputCue2078=[~UNUSED3~] -OutputSigType2078=Digital -OutputCue2079=[~UNUSED3~] -OutputSigType2079=Digital -OutputCue2080=[~UNUSED3~] -OutputSigType2080=Digital -OutputCue2081=[~UNUSED3~] -OutputSigType2081=Digital -OutputCue2082=[~UNUSED3~] -OutputSigType2082=Digital -OutputCue2083=[~UNUSED3~] -OutputSigType2083=Digital -OutputCue2084=[~UNUSED3~] -OutputSigType2084=Digital -OutputCue2085=[~UNUSED3~] -OutputSigType2085=Digital -OutputCue2086=[~UNUSED3~] -OutputSigType2086=Digital -OutputCue2087=[~UNUSED3~] -OutputSigType2087=Digital -OutputCue2088=[~UNUSED3~] -OutputSigType2088=Digital -OutputCue2089=[~UNUSED3~] -OutputSigType2089=Digital -OutputCue2090=[~UNUSED3~] -OutputSigType2090=Digital -OutputCue2091=[~UNUSED3~] -OutputSigType2091=Digital -OutputCue2092=[~UNUSED3~] -OutputSigType2092=Digital -OutputCue2093=[~UNUSED3~] -OutputSigType2093=Digital -OutputCue2094=[~UNUSED3~] -OutputSigType2094=Digital -OutputCue2095=[~UNUSED3~] -OutputSigType2095=Digital -OutputCue2096=[~UNUSED3~] -OutputSigType2096=Digital -OutputCue2097=[~UNUSED3~] -OutputSigType2097=Digital -OutputCue2098=[~UNUSED3~] -OutputSigType2098=Digital -OutputCue2099=[~UNUSED3~] -OutputSigType2099=Digital -OutputCue2100=[~UNUSED3~] -OutputSigType2100=Digital -OutputCue2101=[~UNUSED3~] -OutputSigType2101=Digital -OutputCue2102=[~UNUSED3~] -OutputSigType2102=Digital -OutputCue2103=[~UNUSED3~] -OutputSigType2103=Digital -OutputCue2104=[~UNUSED3~] -OutputSigType2104=Digital -OutputCue2105=[~UNUSED3~] -OutputSigType2105=Digital -OutputCue2106=[~UNUSED3~] -OutputSigType2106=Digital -OutputCue2107=[~UNUSED3~] -OutputSigType2107=Digital -OutputCue2108=[~UNUSED3~] -OutputSigType2108=Digital -OutputCue2109=[~UNUSED3~] -OutputSigType2109=Digital -OutputCue2110=[~UNUSED3~] -OutputSigType2110=Digital -OutputCue2111=[~UNUSED3~] -OutputSigType2111=Digital -OutputCue2112=[~UNUSED3~] -OutputSigType2112=Digital -OutputCue2113=[~UNUSED3~] -OutputSigType2113=Digital -OutputCue2114=[~UNUSED3~] -OutputSigType2114=Digital -OutputCue2115=[~UNUSED3~] -OutputSigType2115=Digital -OutputCue2116=[~UNUSED3~] -OutputSigType2116=Digital -OutputCue2117=[~UNUSED3~] -OutputSigType2117=Digital -OutputCue2118=[~UNUSED3~] -OutputSigType2118=Digital -OutputCue2119=[~UNUSED3~] -OutputSigType2119=Digital -OutputCue2120=[~UNUSED3~] -OutputSigType2120=Digital -OutputCue2121=[~UNUSED3~] -OutputSigType2121=Digital -OutputCue2122=[~UNUSED3~] -OutputSigType2122=Digital -OutputCue2123=[~UNUSED3~] -OutputSigType2123=Digital -OutputCue2124=[~UNUSED3~] -OutputSigType2124=Digital -OutputCue2125=[~UNUSED3~] -OutputSigType2125=Digital -OutputCue2126=[~UNUSED3~] -OutputSigType2126=Digital -OutputCue2127=[~UNUSED3~] -OutputSigType2127=Digital -OutputCue2128=[~UNUSED3~] -OutputSigType2128=Digital -OutputCue2129=[~UNUSED3~] -OutputSigType2129=Digital -OutputCue2130=[~UNUSED3~] -OutputSigType2130=Digital -OutputCue2131=[~UNUSED3~] -OutputSigType2131=Digital -OutputCue2132=[~UNUSED3~] -OutputSigType2132=Digital -OutputCue2133=[~UNUSED3~] -OutputSigType2133=Digital -OutputCue2134=[~UNUSED3~] -OutputSigType2134=Digital -OutputCue2135=[~UNUSED3~] -OutputSigType2135=Digital -OutputCue2136=[~UNUSED3~] -OutputSigType2136=Digital -OutputCue2137=[~UNUSED3~] -OutputSigType2137=Digital -OutputCue2138=[~UNUSED3~] -OutputSigType2138=Digital -OutputCue2139=[~UNUSED3~] -OutputSigType2139=Digital -OutputCue2140=[~UNUSED3~] -OutputSigType2140=Digital -OutputCue2141=[~UNUSED3~] -OutputSigType2141=Digital -OutputCue2142=[~UNUSED3~] -OutputSigType2142=Digital -OutputCue2143=[~UNUSED3~] -OutputSigType2143=Digital -OutputCue2144=[~UNUSED3~] -OutputSigType2144=Digital -OutputCue2145=[~UNUSED3~] -OutputSigType2145=Digital -OutputCue2146=[~UNUSED3~] -OutputSigType2146=Digital -OutputCue2147=[~UNUSED3~] -OutputSigType2147=Digital -OutputCue2148=[~UNUSED3~] -OutputSigType2148=Digital -OutputCue2149=[~UNUSED3~] -OutputSigType2149=Digital -OutputCue2150=[~UNUSED3~] -OutputSigType2150=Digital -OutputCue2151=[~UNUSED3~] -OutputSigType2151=Digital -OutputCue2152=[~UNUSED3~] -OutputSigType2152=Digital -OutputCue2153=[~UNUSED3~] -OutputSigType2153=Digital -OutputCue2154=[~UNUSED3~] -OutputSigType2154=Digital -OutputCue2155=[~UNUSED3~] -OutputSigType2155=Digital -OutputCue2156=[~UNUSED3~] -OutputSigType2156=Digital -OutputCue2157=[~UNUSED3~] -OutputSigType2157=Digital -OutputCue2158=[~UNUSED3~] -OutputSigType2158=Digital -OutputCue2159=[~UNUSED3~] -OutputSigType2159=Digital -OutputCue2160=[~UNUSED3~] -OutputSigType2160=Digital -OutputCue2161=[~UNUSED3~] -OutputSigType2161=Digital -OutputCue2162=[~UNUSED3~] -OutputSigType2162=Digital -OutputCue2163=[~UNUSED3~] -OutputSigType2163=Digital -OutputCue2164=[~UNUSED3~] -OutputSigType2164=Digital -OutputCue2165=[~UNUSED3~] -OutputSigType2165=Digital -OutputCue2166=[~UNUSED3~] -OutputSigType2166=Digital -OutputCue2167=[~UNUSED3~] -OutputSigType2167=Digital -OutputCue2168=[~UNUSED3~] -OutputSigType2168=Digital -OutputCue2169=[~UNUSED3~] -OutputSigType2169=Digital -OutputCue2170=[~UNUSED3~] -OutputSigType2170=Digital -OutputCue2171=[~UNUSED3~] -OutputSigType2171=Digital -OutputCue2172=[~UNUSED3~] -OutputSigType2172=Digital -OutputCue2173=[~UNUSED3~] -OutputSigType2173=Digital -OutputCue2174=[~UNUSED3~] -OutputSigType2174=Digital -OutputCue2175=[~UNUSED3~] -OutputSigType2175=Digital -OutputCue2176=[~UNUSED3~] -OutputSigType2176=Digital -OutputCue2177=[~UNUSED3~] -OutputSigType2177=Digital -OutputCue2178=[~UNUSED3~] -OutputSigType2178=Digital -OutputCue2179=[~UNUSED3~] -OutputSigType2179=Digital -OutputCue2180=[~UNUSED3~] -OutputSigType2180=Digital -OutputCue2181=[~UNUSED3~] -OutputSigType2181=Digital -OutputCue2182=[~UNUSED3~] -OutputSigType2182=Digital -OutputCue2183=[~UNUSED3~] -OutputSigType2183=Digital -OutputCue2184=[~UNUSED3~] -OutputSigType2184=Digital -OutputCue2185=[~UNUSED3~] -OutputSigType2185=Digital -OutputCue2186=[~UNUSED3~] -OutputSigType2186=Digital -OutputCue2187=[~UNUSED3~] -OutputSigType2187=Digital -OutputCue2188=[~UNUSED3~] -OutputSigType2188=Digital -OutputCue2189=[~UNUSED3~] -OutputSigType2189=Digital -OutputCue2190=[~UNUSED3~] -OutputSigType2190=Digital -OutputCue2191=[~UNUSED3~] -OutputSigType2191=Digital -OutputCue2192=[~UNUSED3~] -OutputSigType2192=Digital -OutputCue2193=[~UNUSED3~] -OutputSigType2193=Digital -OutputCue2194=[~UNUSED3~] -OutputSigType2194=Digital -OutputCue2195=[~UNUSED3~] -OutputSigType2195=Digital -OutputCue2196=[~UNUSED3~] -OutputSigType2196=Digital -OutputCue2197=[~UNUSED3~] -OutputSigType2197=Digital -OutputCue2198=[~UNUSED3~] -OutputSigType2198=Digital -OutputCue2199=[~UNUSED3~] -OutputSigType2199=Digital -OutputCue2200=[~UNUSED3~] -OutputSigType2200=Digital -OutputCue2201=[~UNUSED3~] -OutputSigType2201=Digital -OutputCue2202=[~UNUSED3~] -OutputSigType2202=Digital -OutputCue2203=[~UNUSED3~] -OutputSigType2203=Digital -OutputCue2204=[~UNUSED3~] -OutputSigType2204=Digital -OutputCue2205=[~UNUSED3~] -OutputSigType2205=Digital -OutputCue2206=[~UNUSED3~] -OutputSigType2206=Digital -OutputCue2207=[~UNUSED3~] -OutputSigType2207=Digital -OutputCue2208=[~UNUSED3~] -OutputSigType2208=Digital -OutputCue2209=[~UNUSED3~] -OutputSigType2209=Digital -OutputCue2210=[~UNUSED3~] -OutputSigType2210=Digital -OutputCue2211=[~UNUSED3~] -OutputSigType2211=Digital -OutputCue2212=[~UNUSED3~] -OutputSigType2212=Digital -OutputCue2213=[~UNUSED3~] -OutputSigType2213=Digital -OutputCue2214=[~UNUSED3~] -OutputSigType2214=Digital -OutputCue2215=[~UNUSED3~] -OutputSigType2215=Digital -OutputCue2216=[~UNUSED3~] -OutputSigType2216=Digital -OutputCue2217=[~UNUSED3~] -OutputSigType2217=Digital -OutputCue2218=[~UNUSED3~] -OutputSigType2218=Digital -OutputCue2219=[~UNUSED3~] -OutputSigType2219=Digital -OutputCue2220=[~UNUSED3~] -OutputSigType2220=Digital -OutputCue2221=[~UNUSED3~] -OutputSigType2221=Digital -OutputCue2222=[~UNUSED3~] -OutputSigType2222=Digital -OutputCue2223=[~UNUSED3~] -OutputSigType2223=Digital -OutputCue2224=[~UNUSED3~] -OutputSigType2224=Digital -OutputCue2225=[~UNUSED3~] -OutputSigType2225=Digital -OutputCue2226=[~UNUSED3~] -OutputSigType2226=Digital -OutputCue2227=[~UNUSED3~] -OutputSigType2227=Digital -OutputCue2228=[~UNUSED3~] -OutputSigType2228=Digital -OutputCue2229=[~UNUSED3~] -OutputSigType2229=Digital -OutputCue2230=[~UNUSED3~] -OutputSigType2230=Digital -OutputCue2231=[~UNUSED3~] -OutputSigType2231=Digital -OutputCue2232=[~UNUSED3~] -OutputSigType2232=Digital -OutputCue2233=[~UNUSED3~] -OutputSigType2233=Digital -OutputCue2234=[~UNUSED3~] -OutputSigType2234=Digital -OutputCue2235=[~UNUSED3~] -OutputSigType2235=Digital -OutputCue2236=[~UNUSED3~] -OutputSigType2236=Digital -OutputCue2237=[~UNUSED3~] -OutputSigType2237=Digital -OutputCue2238=[~UNUSED3~] -OutputSigType2238=Digital -OutputCue2239=[~UNUSED3~] -OutputSigType2239=Digital -OutputCue2240=[~UNUSED3~] -OutputSigType2240=Digital -OutputCue2241=[~UNUSED3~] -OutputSigType2241=Digital -OutputCue2242=[~UNUSED3~] -OutputSigType2242=Digital -OutputCue2243=[~UNUSED3~] -OutputSigType2243=Digital -OutputCue2244=[~UNUSED3~] -OutputSigType2244=Digital -OutputCue2245=[~UNUSED3~] -OutputSigType2245=Digital -OutputCue2246=[~UNUSED3~] -OutputSigType2246=Digital -OutputCue2247=[~UNUSED3~] -OutputSigType2247=Digital -OutputCue2248=[~UNUSED3~] -OutputSigType2248=Digital -OutputCue2249=[~UNUSED3~] -OutputSigType2249=Digital -OutputCue2250=[~UNUSED3~] -OutputSigType2250=Digital -OutputCue2251=[~UNUSED3~] -OutputSigType2251=Digital -OutputCue2252=[~UNUSED3~] -OutputSigType2252=Digital -OutputCue2253=[~UNUSED3~] -OutputSigType2253=Digital -OutputCue2254=[~UNUSED3~] -OutputSigType2254=Digital -OutputCue2255=[~UNUSED3~] -OutputSigType2255=Digital -OutputCue2256=[~UNUSED3~] -OutputSigType2256=Digital -OutputCue2257=[~UNUSED3~] -OutputSigType2257=Digital -OutputCue2258=[~UNUSED3~] -OutputSigType2258=Digital -OutputCue2259=[~UNUSED3~] -OutputSigType2259=Digital -OutputCue2260=[~UNUSED3~] -OutputSigType2260=Digital -OutputCue2261=[~UNUSED3~] -OutputSigType2261=Digital -OutputCue2262=[~UNUSED3~] -OutputSigType2262=Digital -OutputCue2263=[~UNUSED3~] -OutputSigType2263=Digital -OutputCue2264=[~UNUSED3~] -OutputSigType2264=Digital -OutputCue2265=[~UNUSED3~] -OutputSigType2265=Digital -OutputCue2266=[~UNUSED3~] -OutputSigType2266=Digital -OutputCue2267=[~UNUSED3~] -OutputSigType2267=Digital -OutputCue2268=[~UNUSED3~] -OutputSigType2268=Digital -OutputCue2269=[~UNUSED2~] -OutputSigType2269=Digital|Analog|Serial|String -OutputCue4014=[~EndGroup~]Enable -OutputSigType4014=Digital -OutputCue4015=[~BeginGroup~]Visible -OutputSigType4015=Digital -OutputCue4016=[~UNUSED3~] -OutputSigType4016=Digital -OutputCue4017=[~UNUSED3~] -OutputSigType4017=Digital -OutputCue4018=[~UNUSED3~] -OutputSigType4018=Digital -OutputCue4019=[~UNUSED3~] -OutputSigType4019=Digital -OutputCue4020=[~UNUSED3~] -OutputSigType4020=Digital -OutputCue4021=[~UNUSED3~] -OutputSigType4021=Digital -OutputCue4022=[~UNUSED3~] -OutputSigType4022=Digital -OutputCue4023=[~UNUSED3~] -OutputSigType4023=Digital -OutputCue4024=[~UNUSED3~] -OutputSigType4024=Digital -OutputCue4025=[~UNUSED3~] -OutputSigType4025=Digital -OutputCue4026=[~UNUSED3~] -OutputSigType4026=Digital -OutputCue4027=[~UNUSED3~] -OutputSigType4027=Digital -OutputCue4028=[~UNUSED3~] -OutputSigType4028=Digital -OutputCue4029=[~UNUSED3~] -OutputSigType4029=Digital -OutputCue4030=[~UNUSED3~] -OutputSigType4030=Digital -OutputCue4031=[~UNUSED3~] -OutputSigType4031=Digital -OutputCue4032=[~UNUSED3~] -OutputSigType4032=Digital -OutputCue4033=[~UNUSED3~] -OutputSigType4033=Digital -OutputCue4034=[~UNUSED3~] -OutputSigType4034=Digital -OutputCue4035=[~UNUSED3~] -OutputSigType4035=Digital -OutputCue4036=[~UNUSED3~] -OutputSigType4036=Digital -OutputCue4037=[~UNUSED3~] -OutputSigType4037=Digital -OutputCue4038=[~UNUSED3~] -OutputSigType4038=Digital -OutputCue4039=[~UNUSED3~] -OutputSigType4039=Digital -OutputCue4040=[~UNUSED3~] -OutputSigType4040=Digital -OutputCue4041=[~UNUSED3~] -OutputSigType4041=Digital -OutputCue4042=[~UNUSED3~] -OutputSigType4042=Digital -OutputCue4043=[~UNUSED3~] -OutputSigType4043=Digital -OutputCue4044=[~UNUSED3~] -OutputSigType4044=Digital -OutputCue4045=[~UNUSED3~] -OutputSigType4045=Digital -OutputCue4046=[~UNUSED3~] -OutputSigType4046=Digital -OutputCue4047=[~UNUSED3~] -OutputSigType4047=Digital -OutputCue4048=[~UNUSED3~] -OutputSigType4048=Digital -OutputCue4049=[~UNUSED3~] -OutputSigType4049=Digital -OutputCue4050=[~UNUSED3~] -OutputSigType4050=Digital -OutputCue4051=[~UNUSED3~] -OutputSigType4051=Digital -OutputCue4052=[~UNUSED3~] -OutputSigType4052=Digital -OutputCue4053=[~UNUSED3~] -OutputSigType4053=Digital -OutputCue4054=[~UNUSED3~] -OutputSigType4054=Digital -OutputCue4055=[~UNUSED3~] -OutputSigType4055=Digital -OutputCue4056=[~UNUSED3~] -OutputSigType4056=Digital -OutputCue4057=[~UNUSED3~] -OutputSigType4057=Digital -OutputCue4058=[~UNUSED3~] -OutputSigType4058=Digital -OutputCue4059=[~UNUSED3~] -OutputSigType4059=Digital -OutputCue4060=[~UNUSED3~] -OutputSigType4060=Digital -OutputCue4061=[~UNUSED3~] -OutputSigType4061=Digital -OutputCue4062=[~UNUSED3~] -OutputSigType4062=Digital -OutputCue4063=[~UNUSED3~] -OutputSigType4063=Digital -OutputCue4064=[~UNUSED3~] -OutputSigType4064=Digital -OutputCue4065=[~UNUSED3~] -OutputSigType4065=Digital -OutputCue4066=[~UNUSED3~] -OutputSigType4066=Digital -OutputCue4067=[~UNUSED3~] -OutputSigType4067=Digital -OutputCue4068=[~UNUSED3~] -OutputSigType4068=Digital -OutputCue4069=[~UNUSED3~] -OutputSigType4069=Digital -OutputCue4070=[~UNUSED3~] -OutputSigType4070=Digital -OutputCue4071=[~UNUSED3~] -OutputSigType4071=Digital -OutputCue4072=[~UNUSED3~] -OutputSigType4072=Digital -OutputCue4073=[~UNUSED3~] -OutputSigType4073=Digital -OutputCue4074=[~UNUSED3~] -OutputSigType4074=Digital -OutputCue4075=[~UNUSED3~] -OutputSigType4075=Digital -OutputCue4076=[~UNUSED3~] -OutputSigType4076=Digital -OutputCue4077=[~UNUSED3~] -OutputSigType4077=Digital -OutputCue4078=[~UNUSED3~] -OutputSigType4078=Digital -OutputCue4079=[~UNUSED3~] -OutputSigType4079=Digital -OutputCue4080=[~UNUSED3~] -OutputSigType4080=Digital -OutputCue4081=[~UNUSED3~] -OutputSigType4081=Digital -OutputCue4082=[~UNUSED3~] -OutputSigType4082=Digital -OutputCue4083=[~UNUSED3~] -OutputSigType4083=Digital -OutputCue4084=[~UNUSED3~] -OutputSigType4084=Digital -OutputCue4085=[~UNUSED3~] -OutputSigType4085=Digital -OutputCue4086=[~UNUSED3~] -OutputSigType4086=Digital -OutputCue4087=[~UNUSED3~] -OutputSigType4087=Digital -OutputCue4088=[~UNUSED3~] -OutputSigType4088=Digital -OutputCue4089=[~UNUSED3~] -OutputSigType4089=Digital -OutputCue4090=[~UNUSED3~] -OutputSigType4090=Digital -OutputCue4091=[~UNUSED3~] -OutputSigType4091=Digital -OutputCue4092=[~UNUSED3~] -OutputSigType4092=Digital -OutputCue4093=[~UNUSED3~] -OutputSigType4093=Digital -OutputCue4094=[~UNUSED3~] -OutputSigType4094=Digital -OutputCue4095=[~UNUSED3~] -OutputSigType4095=Digital -OutputCue4096=[~UNUSED3~] -OutputSigType4096=Digital -OutputCue4097=[~UNUSED3~] -OutputSigType4097=Digital -OutputCue4098=[~UNUSED3~] -OutputSigType4098=Digital -OutputCue4099=[~UNUSED3~] -OutputSigType4099=Digital -OutputCue4100=[~UNUSED3~] -OutputSigType4100=Digital -OutputCue4101=[~UNUSED3~] -OutputSigType4101=Digital -OutputCue4102=[~UNUSED3~] -OutputSigType4102=Digital -OutputCue4103=[~UNUSED3~] -OutputSigType4103=Digital -OutputCue4104=[~UNUSED3~] -OutputSigType4104=Digital -OutputCue4105=[~UNUSED3~] -OutputSigType4105=Digital -OutputCue4106=[~UNUSED3~] -OutputSigType4106=Digital -OutputCue4107=[~UNUSED3~] -OutputSigType4107=Digital -OutputCue4108=[~UNUSED3~] -OutputSigType4108=Digital -OutputCue4109=[~UNUSED3~] -OutputSigType4109=Digital -OutputCue4110=[~UNUSED3~] -OutputSigType4110=Digital -OutputCue4111=[~UNUSED3~] -OutputSigType4111=Digital -OutputCue4112=[~UNUSED3~] -OutputSigType4112=Digital -OutputCue4113=[~UNUSED3~] -OutputSigType4113=Digital -OutputCue4114=[~UNUSED3~] -OutputSigType4114=Digital -OutputCue4115=[~UNUSED3~] -OutputSigType4115=Digital -OutputCue4116=[~UNUSED3~] -OutputSigType4116=Digital -OutputCue4117=[~UNUSED3~] -OutputSigType4117=Digital -OutputCue4118=[~UNUSED3~] -OutputSigType4118=Digital -OutputCue4119=[~UNUSED3~] -OutputSigType4119=Digital -OutputCue4120=[~UNUSED3~] -OutputSigType4120=Digital -OutputCue4121=[~UNUSED3~] -OutputSigType4121=Digital -OutputCue4122=[~UNUSED3~] -OutputSigType4122=Digital -OutputCue4123=[~UNUSED3~] -OutputSigType4123=Digital -OutputCue4124=[~UNUSED3~] -OutputSigType4124=Digital -OutputCue4125=[~UNUSED3~] -OutputSigType4125=Digital -OutputCue4126=[~UNUSED3~] -OutputSigType4126=Digital -OutputCue4127=[~UNUSED3~] -OutputSigType4127=Digital -OutputCue4128=[~UNUSED3~] -OutputSigType4128=Digital -OutputCue4129=[~UNUSED3~] -OutputSigType4129=Digital -OutputCue4130=[~UNUSED3~] -OutputSigType4130=Digital -OutputCue4131=[~UNUSED3~] -OutputSigType4131=Digital -OutputCue4132=[~UNUSED3~] -OutputSigType4132=Digital -OutputCue4133=[~UNUSED3~] -OutputSigType4133=Digital -OutputCue4134=[~UNUSED3~] -OutputSigType4134=Digital -OutputCue4135=[~UNUSED3~] -OutputSigType4135=Digital -OutputCue4136=[~UNUSED3~] -OutputSigType4136=Digital -OutputCue4137=[~UNUSED3~] -OutputSigType4137=Digital -OutputCue4138=[~UNUSED3~] -OutputSigType4138=Digital -OutputCue4139=[~UNUSED3~] -OutputSigType4139=Digital -OutputCue4140=[~UNUSED3~] -OutputSigType4140=Digital -OutputCue4141=[~UNUSED3~] -OutputSigType4141=Digital -OutputCue4142=[~UNUSED3~] -OutputSigType4142=Digital -OutputCue4143=[~UNUSED3~] -OutputSigType4143=Digital -OutputCue4144=[~UNUSED3~] -OutputSigType4144=Digital -OutputCue4145=[~UNUSED3~] -OutputSigType4145=Digital -OutputCue4146=[~UNUSED3~] -OutputSigType4146=Digital -OutputCue4147=[~UNUSED3~] -OutputSigType4147=Digital -OutputCue4148=[~UNUSED3~] -OutputSigType4148=Digital -OutputCue4149=[~UNUSED3~] -OutputSigType4149=Digital -OutputCue4150=[~UNUSED3~] -OutputSigType4150=Digital -OutputCue4151=[~UNUSED3~] -OutputSigType4151=Digital -OutputCue4152=[~UNUSED3~] -OutputSigType4152=Digital -OutputCue4153=[~UNUSED3~] -OutputSigType4153=Digital -OutputCue4154=[~UNUSED3~] -OutputSigType4154=Digital -OutputCue4155=[~UNUSED3~] -OutputSigType4155=Digital -OutputCue4156=[~UNUSED3~] -OutputSigType4156=Digital -OutputCue4157=[~UNUSED3~] -OutputSigType4157=Digital -OutputCue4158=[~UNUSED3~] -OutputSigType4158=Digital -OutputCue4159=[~UNUSED3~] -OutputSigType4159=Digital -OutputCue4160=[~UNUSED3~] -OutputSigType4160=Digital -OutputCue4161=[~UNUSED3~] -OutputSigType4161=Digital -OutputCue4162=[~UNUSED3~] -OutputSigType4162=Digital -OutputCue4163=[~UNUSED3~] -OutputSigType4163=Digital -OutputCue4164=[~UNUSED3~] -OutputSigType4164=Digital -OutputCue4165=[~UNUSED3~] -OutputSigType4165=Digital -OutputCue4166=[~UNUSED3~] -OutputSigType4166=Digital -OutputCue4167=[~UNUSED3~] -OutputSigType4167=Digital -OutputCue4168=[~UNUSED3~] -OutputSigType4168=Digital -OutputCue4169=[~UNUSED3~] -OutputSigType4169=Digital -OutputCue4170=[~UNUSED3~] -OutputSigType4170=Digital -OutputCue4171=[~UNUSED3~] -OutputSigType4171=Digital -OutputCue4172=[~UNUSED3~] -OutputSigType4172=Digital -OutputCue4173=[~UNUSED3~] -OutputSigType4173=Digital -OutputCue4174=[~UNUSED3~] -OutputSigType4174=Digital -OutputCue4175=[~UNUSED3~] -OutputSigType4175=Digital -OutputCue4176=[~UNUSED3~] -OutputSigType4176=Digital -OutputCue4177=[~UNUSED3~] -OutputSigType4177=Digital -OutputCue4178=[~UNUSED3~] -OutputSigType4178=Digital -OutputCue4179=[~UNUSED3~] -OutputSigType4179=Digital -OutputCue4180=[~UNUSED3~] -OutputSigType4180=Digital -OutputCue4181=[~UNUSED3~] -OutputSigType4181=Digital -OutputCue4182=[~UNUSED3~] -OutputSigType4182=Digital -OutputCue4183=[~UNUSED3~] -OutputSigType4183=Digital -OutputCue4184=[~UNUSED3~] -OutputSigType4184=Digital -OutputCue4185=[~UNUSED3~] -OutputSigType4185=Digital -OutputCue4186=[~UNUSED3~] -OutputSigType4186=Digital -OutputCue4187=[~UNUSED3~] -OutputSigType4187=Digital -OutputCue4188=[~UNUSED3~] -OutputSigType4188=Digital -OutputCue4189=[~UNUSED3~] -OutputSigType4189=Digital -OutputCue4190=[~UNUSED3~] -OutputSigType4190=Digital -OutputCue4191=[~UNUSED3~] -OutputSigType4191=Digital -OutputCue4192=[~UNUSED3~] -OutputSigType4192=Digital -OutputCue4193=[~UNUSED3~] -OutputSigType4193=Digital -OutputCue4194=[~UNUSED3~] -OutputSigType4194=Digital -OutputCue4195=[~UNUSED3~] -OutputSigType4195=Digital -OutputCue4196=[~UNUSED3~] -OutputSigType4196=Digital -OutputCue4197=[~UNUSED3~] -OutputSigType4197=Digital -OutputCue4198=[~UNUSED3~] -OutputSigType4198=Digital -OutputCue4199=[~UNUSED3~] -OutputSigType4199=Digital -OutputCue4200=[~UNUSED3~] -OutputSigType4200=Digital -OutputCue4201=[~UNUSED3~] -OutputSigType4201=Digital -OutputCue4202=[~UNUSED3~] -OutputSigType4202=Digital -OutputCue4203=[~UNUSED3~] -OutputSigType4203=Digital -OutputCue4204=[~UNUSED3~] -OutputSigType4204=Digital -OutputCue4205=[~UNUSED3~] -OutputSigType4205=Digital -OutputCue4206=[~UNUSED3~] -OutputSigType4206=Digital -OutputCue4207=[~UNUSED3~] -OutputSigType4207=Digital -OutputCue4208=[~UNUSED3~] -OutputSigType4208=Digital -OutputCue4209=[~UNUSED3~] -OutputSigType4209=Digital -OutputCue4210=[~UNUSED3~] -OutputSigType4210=Digital -OutputCue4211=[~UNUSED3~] -OutputSigType4211=Digital -OutputCue4212=[~UNUSED3~] -OutputSigType4212=Digital -OutputCue4213=[~UNUSED3~] -OutputSigType4213=Digital -OutputCue4214=[~UNUSED3~] -OutputSigType4214=Digital -OutputCue4215=[~UNUSED3~] -OutputSigType4215=Digital -OutputCue4216=[~UNUSED3~] -OutputSigType4216=Digital -OutputCue4217=[~UNUSED3~] -OutputSigType4217=Digital -OutputCue4218=[~UNUSED3~] -OutputSigType4218=Digital -OutputCue4219=[~UNUSED3~] -OutputSigType4219=Digital -OutputCue4220=[~UNUSED3~] -OutputSigType4220=Digital -OutputCue4221=[~UNUSED3~] -OutputSigType4221=Digital -OutputCue4222=[~UNUSED3~] -OutputSigType4222=Digital -OutputCue4223=[~UNUSED3~] -OutputSigType4223=Digital -OutputCue4224=[~UNUSED3~] -OutputSigType4224=Digital -OutputCue4225=[~UNUSED3~] -OutputSigType4225=Digital -OutputCue4226=[~UNUSED3~] -OutputSigType4226=Digital -OutputCue4227=[~UNUSED3~] -OutputSigType4227=Digital -OutputCue4228=[~UNUSED3~] -OutputSigType4228=Digital -OutputCue4229=[~UNUSED3~] -OutputSigType4229=Digital -OutputCue4230=[~UNUSED3~] -OutputSigType4230=Digital -OutputCue4231=[~UNUSED3~] -OutputSigType4231=Digital -OutputCue4232=[~UNUSED3~] -OutputSigType4232=Digital -OutputCue4233=[~UNUSED3~] -OutputSigType4233=Digital -OutputCue4234=[~UNUSED3~] -OutputSigType4234=Digital -OutputCue4235=[~UNUSED3~] -OutputSigType4235=Digital -OutputCue4236=[~UNUSED3~] -OutputSigType4236=Digital -OutputCue4237=[~UNUSED3~] -OutputSigType4237=Digital -OutputCue4238=[~UNUSED3~] -OutputSigType4238=Digital -OutputCue4239=[~UNUSED3~] -OutputSigType4239=Digital -OutputCue4240=[~UNUSED3~] -OutputSigType4240=Digital -OutputCue4241=[~UNUSED3~] -OutputSigType4241=Digital -OutputCue4242=[~UNUSED3~] -OutputSigType4242=Digital -OutputCue4243=[~UNUSED3~] -OutputSigType4243=Digital -OutputCue4244=[~UNUSED3~] -OutputSigType4244=Digital -OutputCue4245=[~UNUSED3~] -OutputSigType4245=Digital -OutputCue4246=[~UNUSED3~] -OutputSigType4246=Digital -OutputCue4247=[~UNUSED3~] -OutputSigType4247=Digital -OutputCue4248=[~UNUSED3~] -OutputSigType4248=Digital -OutputCue4249=[~UNUSED3~] -OutputSigType4249=Digital -OutputCue4250=[~UNUSED3~] -OutputSigType4250=Digital -OutputCue4251=[~UNUSED3~] -OutputSigType4251=Digital -OutputCue4252=[~UNUSED3~] -OutputSigType4252=Digital -OutputCue4253=[~UNUSED3~] -OutputSigType4253=Digital -OutputCue4254=[~UNUSED3~] -OutputSigType4254=Digital -OutputCue4255=[~UNUSED3~] -OutputSigType4255=Digital -OutputCue4256=[~UNUSED3~] -OutputSigType4256=Digital -OutputCue4257=[~UNUSED3~] -OutputSigType4257=Digital -OutputCue4258=[~UNUSED3~] -OutputSigType4258=Digital -OutputCue4259=[~UNUSED3~] -OutputSigType4259=Digital -OutputCue4260=[~UNUSED3~] -OutputSigType4260=Digital -OutputCue4261=[~UNUSED3~] -OutputSigType4261=Digital -OutputCue4262=[~UNUSED3~] -OutputSigType4262=Digital -OutputCue4263=[~UNUSED3~] -OutputSigType4263=Digital -OutputCue4264=[~UNUSED3~] -OutputSigType4264=Digital -OutputCue4265=[~UNUSED3~] -OutputSigType4265=Digital -OutputCue4266=[~UNUSED3~] -OutputSigType4266=Digital -OutputCue4267=[~UNUSED3~] -OutputSigType4267=Digital -OutputCue4268=[~UNUSED3~] -OutputSigType4268=Digital -OutputCue4269=[~UNUSED3~] -OutputSigType4269=Digital -OutputCue4270=[~UNUSED3~] -OutputSigType4270=Digital -OutputCue4271=[~UNUSED2~] -OutputSigType4271=Digital|Analog|Serial|String -OutputCue6016=[~EndGroup~]Visible -OutputSigType6016=Digital -InputList2Cue1=[~UNUSED3~] -InputList2SigType1=Analog -InputList2Cue2=[~UNUSED3~] -InputList2SigType2=Analog -InputList2Cue3=Scroll To Item -InputList2SigType3=Analog -InputList2Cue4=Set Number of Items -InputList2SigType4=Analog -InputList2Cue5=[~UNUSED2~] -InputList2SigType5=Analog -InputList2Cue6=[~UNUSED2~] -InputList2SigType6=Analog -InputList2Cue7=[~UNUSED2~] -InputList2SigType7=Analog -InputList2Cue8=[~UNUSED2~] -InputList2SigType8=Analog -InputList2Cue9=[~UNUSED2~] -InputList2SigType9=Analog -InputList2Cue10=[~UNUSED2~] -InputList2SigType10=Analog -InputList2Cue11=[~BeginGroup~]Item Icons -InputList2SigType11=Analog -InputList2Cue12=Set Item 1 Icon Analog -InputList2SigType12=Analog -InputList2Cue13=Set Item 2 Icon Analog -InputList2SigType13=Analog -InputList2Cue14=Set Item 3 Icon Analog -InputList2SigType14=Analog -InputList2Cue15=Set Item 4 Icon Analog -InputList2SigType15=Analog -InputList2Cue16=Set Item 5 Icon Analog -InputList2SigType16=Analog -InputList2Cue17=Set Item 6 Icon Analog -InputList2SigType17=Analog -InputList2Cue18=Set Item 7 Icon Analog -InputList2SigType18=Analog -InputList2Cue19=Set Item 8 Icon Analog -InputList2SigType19=Analog -InputList2Cue20=Set Item 9 Icon Analog -InputList2SigType20=Analog -InputList2Cue21=Set Item 10 Icon Analog -InputList2SigType21=Analog -InputList2Cue22=Set Item 11 Icon Analog -InputList2SigType22=Analog -InputList2Cue23=Set Item 12 Icon Analog -InputList2SigType23=Analog -InputList2Cue24=Set Item 13 Icon Analog -InputList2SigType24=Analog -InputList2Cue25=Set Item 14 Icon Analog -InputList2SigType25=Analog -InputList2Cue26=Set Item 15 Icon Analog -InputList2SigType26=Analog -InputList2Cue27=Set Item 16 Icon Analog -InputList2SigType27=Analog -InputList2Cue28=Set Item 17 Icon Analog -InputList2SigType28=Analog -InputList2Cue29=Set Item 18 Icon Analog -InputList2SigType29=Analog -InputList2Cue30=Set Item 19 Icon Analog -InputList2SigType30=Analog -InputList2Cue31=Set Item 20 Icon Analog -InputList2SigType31=Analog -InputList2Cue32=Set Item 21 Icon Analog -InputList2SigType32=Analog -InputList2Cue33=Set Item 22 Icon Analog -InputList2SigType33=Analog -InputList2Cue34=Set Item 23 Icon Analog -InputList2SigType34=Analog -InputList2Cue35=Set Item 24 Icon Analog -InputList2SigType35=Analog -InputList2Cue36=Set Item 25 Icon Analog -InputList2SigType36=Analog -InputList2Cue37=Set Item 26 Icon Analog -InputList2SigType37=Analog -InputList2Cue38=Set Item 27 Icon Analog -InputList2SigType38=Analog -InputList2Cue39=Set Item 28 Icon Analog -InputList2SigType39=Analog -InputList2Cue40=Set Item 29 Icon Analog -InputList2SigType40=Analog -InputList2Cue41=Set Item 30 Icon Analog -InputList2SigType41=Analog -InputList2Cue42=Set Item 31 Icon Analog -InputList2SigType42=Analog -InputList2Cue43=Set Item 32 Icon Analog -InputList2SigType43=Analog -InputList2Cue44=Set Item 33 Icon Analog -InputList2SigType44=Analog -InputList2Cue45=Set Item 34 Icon Analog -InputList2SigType45=Analog -InputList2Cue46=Set Item 35 Icon Analog -InputList2SigType46=Analog -InputList2Cue47=Set Item 36 Icon Analog -InputList2SigType47=Analog -InputList2Cue48=Set Item 37 Icon Analog -InputList2SigType48=Analog -InputList2Cue49=Set Item 38 Icon Analog -InputList2SigType49=Analog -InputList2Cue50=Set Item 39 Icon Analog -InputList2SigType50=Analog -InputList2Cue51=Set Item 40 Icon Analog -InputList2SigType51=Analog -InputList2Cue52=Set Item 41 Icon Analog -InputList2SigType52=Analog -InputList2Cue53=Set Item 42 Icon Analog -InputList2SigType53=Analog -InputList2Cue54=Set Item 43 Icon Analog -InputList2SigType54=Analog -InputList2Cue55=Set Item 44 Icon Analog -InputList2SigType55=Analog -InputList2Cue56=Set Item 45 Icon Analog -InputList2SigType56=Analog -InputList2Cue57=Set Item 46 Icon Analog -InputList2SigType57=Analog -InputList2Cue58=Set Item 47 Icon Analog -InputList2SigType58=Analog -InputList2Cue59=Set Item 48 Icon Analog -InputList2SigType59=Analog -InputList2Cue60=Set Item 49 Icon Analog -InputList2SigType60=Analog -InputList2Cue61=Set Item 50 Icon Analog -InputList2SigType61=Analog -InputList2Cue62=Set Item 51 Icon Analog -InputList2SigType62=Analog -InputList2Cue63=Set Item 52 Icon Analog -InputList2SigType63=Analog -InputList2Cue64=Set Item 53 Icon Analog -InputList2SigType64=Analog -InputList2Cue65=Set Item 54 Icon Analog -InputList2SigType65=Analog -InputList2Cue66=Set Item 55 Icon Analog -InputList2SigType66=Analog -InputList2Cue67=Set Item 56 Icon Analog -InputList2SigType67=Analog -InputList2Cue68=Set Item 57 Icon Analog -InputList2SigType68=Analog -InputList2Cue69=Set Item 58 Icon Analog -InputList2SigType69=Analog -InputList2Cue70=Set Item 59 Icon Analog -InputList2SigType70=Analog -InputList2Cue71=Set Item 60 Icon Analog -InputList2SigType71=Analog -InputList2Cue72=Set Item 61 Icon Analog -InputList2SigType72=Analog -InputList2Cue73=Set Item 62 Icon Analog -InputList2SigType73=Analog -InputList2Cue74=Set Item 63 Icon Analog -InputList2SigType74=Analog -InputList2Cue75=Set Item 64 Icon Analog -InputList2SigType75=Analog -InputList2Cue76=Set Item 65 Icon Analog -InputList2SigType76=Analog -InputList2Cue77=Set Item 66 Icon Analog -InputList2SigType77=Analog -InputList2Cue78=Set Item 67 Icon Analog -InputList2SigType78=Analog -InputList2Cue79=Set Item 68 Icon Analog -InputList2SigType79=Analog -InputList2Cue80=Set Item 69 Icon Analog -InputList2SigType80=Analog -InputList2Cue81=Set Item 70 Icon Analog -InputList2SigType81=Analog -InputList2Cue82=Set Item 71 Icon Analog -InputList2SigType82=Analog -InputList2Cue83=Set Item 72 Icon Analog -InputList2SigType83=Analog -InputList2Cue84=Set Item 73 Icon Analog -InputList2SigType84=Analog -InputList2Cue85=Set Item 74 Icon Analog -InputList2SigType85=Analog -InputList2Cue86=Set Item 75 Icon Analog -InputList2SigType86=Analog -InputList2Cue87=Set Item 76 Icon Analog -InputList2SigType87=Analog -InputList2Cue88=Set Item 77 Icon Analog -InputList2SigType88=Analog -InputList2Cue89=Set Item 78 Icon Analog -InputList2SigType89=Analog -InputList2Cue90=Set Item 79 Icon Analog -InputList2SigType90=Analog -InputList2Cue91=Set Item 80 Icon Analog -InputList2SigType91=Analog -InputList2Cue92=Set Item 81 Icon Analog -InputList2SigType92=Analog -InputList2Cue93=Set Item 82 Icon Analog -InputList2SigType93=Analog -InputList2Cue94=Set Item 83 Icon Analog -InputList2SigType94=Analog -InputList2Cue95=Set Item 84 Icon Analog -InputList2SigType95=Analog -InputList2Cue96=Set Item 85 Icon Analog -InputList2SigType96=Analog -InputList2Cue97=Set Item 86 Icon Analog -InputList2SigType97=Analog -InputList2Cue98=Set Item 87 Icon Analog -InputList2SigType98=Analog -InputList2Cue99=Set Item 88 Icon Analog -InputList2SigType99=Analog -InputList2Cue100=Set Item 89 Icon Analog -InputList2SigType100=Analog -InputList2Cue101=Set Item 90 Icon Analog -InputList2SigType101=Analog -InputList2Cue102=Set Item 91 Icon Analog -InputList2SigType102=Analog -InputList2Cue103=Set Item 92 Icon Analog -InputList2SigType103=Analog -InputList2Cue104=Set Item 93 Icon Analog -InputList2SigType104=Analog -InputList2Cue105=Set Item 94 Icon Analog -InputList2SigType105=Analog -InputList2Cue106=Set Item 95 Icon Analog -InputList2SigType106=Analog -InputList2Cue107=Set Item 96 Icon Analog -InputList2SigType107=Analog -InputList2Cue108=Set Item 97 Icon Analog -InputList2SigType108=Analog -InputList2Cue109=Set Item 98 Icon Analog -InputList2SigType109=Analog -InputList2Cue110=Set Item 99 Icon Analog -InputList2SigType110=Analog -InputList2Cue111=Set Item 100 Icon Analog -InputList2SigType111=Analog -InputList2Cue112=Set Item 101 Icon Analog -InputList2SigType112=Analog -InputList2Cue113=Set Item 102 Icon Analog -InputList2SigType113=Analog -InputList2Cue114=Set Item 103 Icon Analog -InputList2SigType114=Analog -InputList2Cue115=Set Item 104 Icon Analog -InputList2SigType115=Analog -InputList2Cue116=Set Item 105 Icon Analog -InputList2SigType116=Analog -InputList2Cue117=Set Item 106 Icon Analog -InputList2SigType117=Analog -InputList2Cue118=Set Item 107 Icon Analog -InputList2SigType118=Analog -InputList2Cue119=Set Item 108 Icon Analog -InputList2SigType119=Analog -InputList2Cue120=Set Item 109 Icon Analog -InputList2SigType120=Analog -InputList2Cue121=Set Item 110 Icon Analog -InputList2SigType121=Analog -InputList2Cue122=Set Item 111 Icon Analog -InputList2SigType122=Analog -InputList2Cue123=Set Item 112 Icon Analog -InputList2SigType123=Analog -InputList2Cue124=Set Item 113 Icon Analog -InputList2SigType124=Analog -InputList2Cue125=Set Item 114 Icon Analog -InputList2SigType125=Analog -InputList2Cue126=Set Item 115 Icon Analog -InputList2SigType126=Analog -InputList2Cue127=Set Item 116 Icon Analog -InputList2SigType127=Analog -InputList2Cue128=Set Item 117 Icon Analog -InputList2SigType128=Analog -InputList2Cue129=Set Item 118 Icon Analog -InputList2SigType129=Analog -InputList2Cue130=Set Item 119 Icon Analog -InputList2SigType130=Analog -InputList2Cue131=Set Item 120 Icon Analog -InputList2SigType131=Analog -InputList2Cue132=Set Item 121 Icon Analog -InputList2SigType132=Analog -InputList2Cue133=Set Item 122 Icon Analog -InputList2SigType133=Analog -InputList2Cue134=Set Item 123 Icon Analog -InputList2SigType134=Analog -InputList2Cue135=Set Item 124 Icon Analog -InputList2SigType135=Analog -InputList2Cue136=Set Item 125 Icon Analog -InputList2SigType136=Analog -InputList2Cue137=Set Item 126 Icon Analog -InputList2SigType137=Analog -InputList2Cue138=Set Item 127 Icon Analog -InputList2SigType138=Analog -InputList2Cue139=Set Item 128 Icon Analog -InputList2SigType139=Analog -InputList2Cue140=Set Item 129 Icon Analog -InputList2SigType140=Analog -InputList2Cue141=Set Item 130 Icon Analog -InputList2SigType141=Analog -InputList2Cue142=Set Item 131 Icon Analog -InputList2SigType142=Analog -InputList2Cue143=Set Item 132 Icon Analog -InputList2SigType143=Analog -InputList2Cue144=Set Item 133 Icon Analog -InputList2SigType144=Analog -InputList2Cue145=Set Item 134 Icon Analog -InputList2SigType145=Analog -InputList2Cue146=Set Item 135 Icon Analog -InputList2SigType146=Analog -InputList2Cue147=Set Item 136 Icon Analog -InputList2SigType147=Analog -InputList2Cue148=Set Item 137 Icon Analog -InputList2SigType148=Analog -InputList2Cue149=Set Item 138 Icon Analog -InputList2SigType149=Analog -InputList2Cue150=Set Item 139 Icon Analog -InputList2SigType150=Analog -InputList2Cue151=Set Item 140 Icon Analog -InputList2SigType151=Analog -InputList2Cue152=Set Item 141 Icon Analog -InputList2SigType152=Analog -InputList2Cue153=Set Item 142 Icon Analog -InputList2SigType153=Analog -InputList2Cue154=Set Item 143 Icon Analog -InputList2SigType154=Analog -InputList2Cue155=Set Item 144 Icon Analog -InputList2SigType155=Analog -InputList2Cue156=Set Item 145 Icon Analog -InputList2SigType156=Analog -InputList2Cue157=Set Item 146 Icon Analog -InputList2SigType157=Analog -InputList2Cue158=Set Item 147 Icon Analog -InputList2SigType158=Analog -InputList2Cue159=Set Item 148 Icon Analog -InputList2SigType159=Analog -InputList2Cue160=Set Item 149 Icon Analog -InputList2SigType160=Analog -InputList2Cue161=Set Item 150 Icon Analog -InputList2SigType161=Analog -InputList2Cue162=Set Item 151 Icon Analog -InputList2SigType162=Analog -InputList2Cue163=Set Item 152 Icon Analog -InputList2SigType163=Analog -InputList2Cue164=Set Item 153 Icon Analog -InputList2SigType164=Analog -InputList2Cue165=Set Item 154 Icon Analog -InputList2SigType165=Analog -InputList2Cue166=Set Item 155 Icon Analog -InputList2SigType166=Analog -InputList2Cue167=Set Item 156 Icon Analog -InputList2SigType167=Analog -InputList2Cue168=Set Item 157 Icon Analog -InputList2SigType168=Analog -InputList2Cue169=Set Item 158 Icon Analog -InputList2SigType169=Analog -InputList2Cue170=Set Item 159 Icon Analog -InputList2SigType170=Analog -InputList2Cue171=Set Item 160 Icon Analog -InputList2SigType171=Analog -InputList2Cue172=Set Item 161 Icon Analog -InputList2SigType172=Analog -InputList2Cue173=Set Item 162 Icon Analog -InputList2SigType173=Analog -InputList2Cue174=Set Item 163 Icon Analog -InputList2SigType174=Analog -InputList2Cue175=Set Item 164 Icon Analog -InputList2SigType175=Analog -InputList2Cue176=Set Item 165 Icon Analog -InputList2SigType176=Analog -InputList2Cue177=Set Item 166 Icon Analog -InputList2SigType177=Analog -InputList2Cue178=Set Item 167 Icon Analog -InputList2SigType178=Analog -InputList2Cue179=Set Item 168 Icon Analog -InputList2SigType179=Analog -InputList2Cue180=Set Item 169 Icon Analog -InputList2SigType180=Analog -InputList2Cue181=Set Item 170 Icon Analog -InputList2SigType181=Analog -InputList2Cue182=Set Item 171 Icon Analog -InputList2SigType182=Analog -InputList2Cue183=Set Item 172 Icon Analog -InputList2SigType183=Analog -InputList2Cue184=Set Item 173 Icon Analog -InputList2SigType184=Analog -InputList2Cue185=Set Item 174 Icon Analog -InputList2SigType185=Analog -InputList2Cue186=Set Item 175 Icon Analog -InputList2SigType186=Analog -InputList2Cue187=Set Item 176 Icon Analog -InputList2SigType187=Analog -InputList2Cue188=Set Item 177 Icon Analog -InputList2SigType188=Analog -InputList2Cue189=Set Item 178 Icon Analog -InputList2SigType189=Analog -InputList2Cue190=Set Item 179 Icon Analog -InputList2SigType190=Analog -InputList2Cue191=Set Item 180 Icon Analog -InputList2SigType191=Analog -InputList2Cue192=Set Item 181 Icon Analog -InputList2SigType192=Analog -InputList2Cue193=Set Item 182 Icon Analog -InputList2SigType193=Analog -InputList2Cue194=Set Item 183 Icon Analog -InputList2SigType194=Analog -InputList2Cue195=Set Item 184 Icon Analog -InputList2SigType195=Analog -InputList2Cue196=Set Item 185 Icon Analog -InputList2SigType196=Analog -InputList2Cue197=Set Item 186 Icon Analog -InputList2SigType197=Analog -InputList2Cue198=Set Item 187 Icon Analog -InputList2SigType198=Analog -InputList2Cue199=Set Item 188 Icon Analog -InputList2SigType199=Analog -InputList2Cue200=Set Item 189 Icon Analog -InputList2SigType200=Analog -InputList2Cue201=Set Item 190 Icon Analog -InputList2SigType201=Analog -InputList2Cue202=Set Item 191 Icon Analog -InputList2SigType202=Analog -InputList2Cue203=Set Item 192 Icon Analog -InputList2SigType203=Analog -InputList2Cue204=Set Item 193 Icon Analog -InputList2SigType204=Analog -InputList2Cue205=Set Item 194 Icon Analog -InputList2SigType205=Analog -InputList2Cue206=Set Item 195 Icon Analog -InputList2SigType206=Analog -InputList2Cue207=Set Item 196 Icon Analog -InputList2SigType207=Analog -InputList2Cue208=Set Item 197 Icon Analog -InputList2SigType208=Analog -InputList2Cue209=Set Item 198 Icon Analog -InputList2SigType209=Analog -InputList2Cue210=Set Item 199 Icon Analog -InputList2SigType210=Analog -InputList2Cue211=Set Item 200 Icon Analog -InputList2SigType211=Analog -InputList2Cue212=Set Item 201 Icon Analog -InputList2SigType212=Analog -InputList2Cue213=Set Item 202 Icon Analog -InputList2SigType213=Analog -InputList2Cue214=Set Item 203 Icon Analog -InputList2SigType214=Analog -InputList2Cue215=Set Item 204 Icon Analog -InputList2SigType215=Analog -InputList2Cue216=Set Item 205 Icon Analog -InputList2SigType216=Analog -InputList2Cue217=Set Item 206 Icon Analog -InputList2SigType217=Analog -InputList2Cue218=Set Item 207 Icon Analog -InputList2SigType218=Analog -InputList2Cue219=Set Item 208 Icon Analog -InputList2SigType219=Analog -InputList2Cue220=Set Item 209 Icon Analog -InputList2SigType220=Analog -InputList2Cue221=Set Item 210 Icon Analog -InputList2SigType221=Analog -InputList2Cue222=Set Item 211 Icon Analog -InputList2SigType222=Analog -InputList2Cue223=Set Item 212 Icon Analog -InputList2SigType223=Analog -InputList2Cue224=Set Item 213 Icon Analog -InputList2SigType224=Analog -InputList2Cue225=Set Item 214 Icon Analog -InputList2SigType225=Analog -InputList2Cue226=Set Item 215 Icon Analog -InputList2SigType226=Analog -InputList2Cue227=Set Item 216 Icon Analog -InputList2SigType227=Analog -InputList2Cue228=Set Item 217 Icon Analog -InputList2SigType228=Analog -InputList2Cue229=Set Item 218 Icon Analog -InputList2SigType229=Analog -InputList2Cue230=Set Item 219 Icon Analog -InputList2SigType230=Analog -InputList2Cue231=Set Item 220 Icon Analog -InputList2SigType231=Analog -InputList2Cue232=Set Item 221 Icon Analog -InputList2SigType232=Analog -InputList2Cue233=Set Item 222 Icon Analog -InputList2SigType233=Analog -InputList2Cue234=Set Item 223 Icon Analog -InputList2SigType234=Analog -InputList2Cue235=Set Item 224 Icon Analog -InputList2SigType235=Analog -InputList2Cue236=Set Item 225 Icon Analog -InputList2SigType236=Analog -InputList2Cue237=Set Item 226 Icon Analog -InputList2SigType237=Analog -InputList2Cue238=Set Item 227 Icon Analog -InputList2SigType238=Analog -InputList2Cue239=Set Item 228 Icon Analog -InputList2SigType239=Analog -InputList2Cue240=Set Item 229 Icon Analog -InputList2SigType240=Analog -InputList2Cue241=Set Item 230 Icon Analog -InputList2SigType241=Analog -InputList2Cue242=Set Item 231 Icon Analog -InputList2SigType242=Analog -InputList2Cue243=Set Item 232 Icon Analog -InputList2SigType243=Analog -InputList2Cue244=Set Item 233 Icon Analog -InputList2SigType244=Analog -InputList2Cue245=Set Item 234 Icon Analog -InputList2SigType245=Analog -InputList2Cue246=Set Item 235 Icon Analog -InputList2SigType246=Analog -InputList2Cue247=Set Item 236 Icon Analog -InputList2SigType247=Analog -InputList2Cue248=Set Item 237 Icon Analog -InputList2SigType248=Analog -InputList2Cue249=Set Item 238 Icon Analog -InputList2SigType249=Analog -InputList2Cue250=Set Item 239 Icon Analog -InputList2SigType250=Analog -InputList2Cue251=Set Item 240 Icon Analog -InputList2SigType251=Analog -InputList2Cue252=Set Item 241 Icon Analog -InputList2SigType252=Analog -InputList2Cue253=Set Item 242 Icon Analog -InputList2SigType253=Analog -InputList2Cue254=Set Item 243 Icon Analog -InputList2SigType254=Analog -InputList2Cue255=Set Item 244 Icon Analog -InputList2SigType255=Analog -InputList2Cue256=Set Item 245 Icon Analog -InputList2SigType256=Analog -InputList2Cue257=Set Item 246 Icon Analog -InputList2SigType257=Analog -InputList2Cue258=Set Item 247 Icon Analog -InputList2SigType258=Analog -InputList2Cue259=Set Item 248 Icon Analog -InputList2SigType259=Analog -InputList2Cue260=Set Item 249 Icon Analog -InputList2SigType260=Analog -InputList2Cue261=Set Item 250 Icon Analog -InputList2SigType261=Analog -InputList2Cue262=Set Item 251 Icon Analog -InputList2SigType262=Analog -InputList2Cue263=Set Item 252 Icon Analog -InputList2SigType263=Analog -InputList2Cue264=Set Item 253 Icon Analog -InputList2SigType264=Analog -InputList2Cue265=Set Item 254 Icon Analog -InputList2SigType265=Analog -InputList2Cue266=Set Item 255 Icon Analog -InputList2SigType266=Analog -InputList2Cue267=[~UNUSED2~] -InputList2SigType267=Digital|Analog|Serial|String -InputList2Cue2012=[~EndGroup~]Item Icons -InputList2SigType2012=Analog -OutputList2Cue1=Item Clicked -OutputList2SigType1=Analog -OutputList2Cue2=Item Held -OutputList2SigType2=Analog -OutputList2Cue3=[~UNUSED3~] -OutputList2SigType3=Analog -OutputList2Cue4=[~UNUSED3~] -OutputList2SigType4=Analog -OutputList2Cue5=[~UNUSED2~] -OutputList2SigType5=Analog -OutputList2Cue6=[~UNUSED2~] -OutputList2SigType6=Analog -OutputList2Cue7=[~UNUSED2~] -OutputList2SigType7=Analog -OutputList2Cue8=[~UNUSED2~] -OutputList2SigType8=Analog -OutputList2Cue9=[~UNUSED2~] -OutputList2SigType9=Analog -OutputList2Cue10=[~UNUSED2~] -OutputList2SigType10=Analog -OutputList2Cue11=[~BeginGroup~]Item Icons -OutputList2SigType11=Analog -OutputList2Cue12=[~UNUSED3~] -OutputList2SigType12=Analog -OutputList2Cue13=[~UNUSED3~] -OutputList2SigType13=Analog -OutputList2Cue14=[~UNUSED3~] -OutputList2SigType14=Analog -OutputList2Cue15=[~UNUSED3~] -OutputList2SigType15=Analog -OutputList2Cue16=[~UNUSED3~] -OutputList2SigType16=Analog -OutputList2Cue17=[~UNUSED3~] -OutputList2SigType17=Analog -OutputList2Cue18=[~UNUSED3~] -OutputList2SigType18=Analog -OutputList2Cue19=[~UNUSED3~] -OutputList2SigType19=Analog -OutputList2Cue20=[~UNUSED3~] -OutputList2SigType20=Analog -OutputList2Cue21=[~UNUSED3~] -OutputList2SigType21=Analog -OutputList2Cue22=[~UNUSED3~] -OutputList2SigType22=Analog -OutputList2Cue23=[~UNUSED3~] -OutputList2SigType23=Analog -OutputList2Cue24=[~UNUSED3~] -OutputList2SigType24=Analog -OutputList2Cue25=[~UNUSED3~] -OutputList2SigType25=Analog -OutputList2Cue26=[~UNUSED3~] -OutputList2SigType26=Analog -OutputList2Cue27=[~UNUSED3~] -OutputList2SigType27=Analog -OutputList2Cue28=[~UNUSED3~] -OutputList2SigType28=Analog -OutputList2Cue29=[~UNUSED3~] -OutputList2SigType29=Analog -OutputList2Cue30=[~UNUSED3~] -OutputList2SigType30=Analog -OutputList2Cue31=[~UNUSED3~] -OutputList2SigType31=Analog -OutputList2Cue32=[~UNUSED3~] -OutputList2SigType32=Analog -OutputList2Cue33=[~UNUSED3~] -OutputList2SigType33=Analog -OutputList2Cue34=[~UNUSED3~] -OutputList2SigType34=Analog -OutputList2Cue35=[~UNUSED3~] -OutputList2SigType35=Analog -OutputList2Cue36=[~UNUSED3~] -OutputList2SigType36=Analog -OutputList2Cue37=[~UNUSED3~] -OutputList2SigType37=Analog -OutputList2Cue38=[~UNUSED3~] -OutputList2SigType38=Analog -OutputList2Cue39=[~UNUSED3~] -OutputList2SigType39=Analog -OutputList2Cue40=[~UNUSED3~] -OutputList2SigType40=Analog -OutputList2Cue41=[~UNUSED3~] -OutputList2SigType41=Analog -OutputList2Cue42=[~UNUSED3~] -OutputList2SigType42=Analog -OutputList2Cue43=[~UNUSED3~] -OutputList2SigType43=Analog -OutputList2Cue44=[~UNUSED3~] -OutputList2SigType44=Analog -OutputList2Cue45=[~UNUSED3~] -OutputList2SigType45=Analog -OutputList2Cue46=[~UNUSED3~] -OutputList2SigType46=Analog -OutputList2Cue47=[~UNUSED3~] -OutputList2SigType47=Analog -OutputList2Cue48=[~UNUSED3~] -OutputList2SigType48=Analog -OutputList2Cue49=[~UNUSED3~] -OutputList2SigType49=Analog -OutputList2Cue50=[~UNUSED3~] -OutputList2SigType50=Analog -OutputList2Cue51=[~UNUSED3~] -OutputList2SigType51=Analog -OutputList2Cue52=[~UNUSED3~] -OutputList2SigType52=Analog -OutputList2Cue53=[~UNUSED3~] -OutputList2SigType53=Analog -OutputList2Cue54=[~UNUSED3~] -OutputList2SigType54=Analog -OutputList2Cue55=[~UNUSED3~] -OutputList2SigType55=Analog -OutputList2Cue56=[~UNUSED3~] -OutputList2SigType56=Analog -OutputList2Cue57=[~UNUSED3~] -OutputList2SigType57=Analog -OutputList2Cue58=[~UNUSED3~] -OutputList2SigType58=Analog -OutputList2Cue59=[~UNUSED3~] -OutputList2SigType59=Analog -OutputList2Cue60=[~UNUSED3~] -OutputList2SigType60=Analog -OutputList2Cue61=[~UNUSED3~] -OutputList2SigType61=Analog -OutputList2Cue62=[~UNUSED3~] -OutputList2SigType62=Analog -OutputList2Cue63=[~UNUSED3~] -OutputList2SigType63=Analog -OutputList2Cue64=[~UNUSED3~] -OutputList2SigType64=Analog -OutputList2Cue65=[~UNUSED3~] -OutputList2SigType65=Analog -OutputList2Cue66=[~UNUSED3~] -OutputList2SigType66=Analog -OutputList2Cue67=[~UNUSED3~] -OutputList2SigType67=Analog -OutputList2Cue68=[~UNUSED3~] -OutputList2SigType68=Analog -OutputList2Cue69=[~UNUSED3~] -OutputList2SigType69=Analog -OutputList2Cue70=[~UNUSED3~] -OutputList2SigType70=Analog -OutputList2Cue71=[~UNUSED3~] -OutputList2SigType71=Analog -OutputList2Cue72=[~UNUSED3~] -OutputList2SigType72=Analog -OutputList2Cue73=[~UNUSED3~] -OutputList2SigType73=Analog -OutputList2Cue74=[~UNUSED3~] -OutputList2SigType74=Analog -OutputList2Cue75=[~UNUSED3~] -OutputList2SigType75=Analog -OutputList2Cue76=[~UNUSED3~] -OutputList2SigType76=Analog -OutputList2Cue77=[~UNUSED3~] -OutputList2SigType77=Analog -OutputList2Cue78=[~UNUSED3~] -OutputList2SigType78=Analog -OutputList2Cue79=[~UNUSED3~] -OutputList2SigType79=Analog -OutputList2Cue80=[~UNUSED3~] -OutputList2SigType80=Analog -OutputList2Cue81=[~UNUSED3~] -OutputList2SigType81=Analog -OutputList2Cue82=[~UNUSED3~] -OutputList2SigType82=Analog -OutputList2Cue83=[~UNUSED3~] -OutputList2SigType83=Analog -OutputList2Cue84=[~UNUSED3~] -OutputList2SigType84=Analog -OutputList2Cue85=[~UNUSED3~] -OutputList2SigType85=Analog -OutputList2Cue86=[~UNUSED3~] -OutputList2SigType86=Analog -OutputList2Cue87=[~UNUSED3~] -OutputList2SigType87=Analog -OutputList2Cue88=[~UNUSED3~] -OutputList2SigType88=Analog -OutputList2Cue89=[~UNUSED3~] -OutputList2SigType89=Analog -OutputList2Cue90=[~UNUSED3~] -OutputList2SigType90=Analog -OutputList2Cue91=[~UNUSED3~] -OutputList2SigType91=Analog -OutputList2Cue92=[~UNUSED3~] -OutputList2SigType92=Analog -OutputList2Cue93=[~UNUSED3~] -OutputList2SigType93=Analog -OutputList2Cue94=[~UNUSED3~] -OutputList2SigType94=Analog -OutputList2Cue95=[~UNUSED3~] -OutputList2SigType95=Analog -OutputList2Cue96=[~UNUSED3~] -OutputList2SigType96=Analog -OutputList2Cue97=[~UNUSED3~] -OutputList2SigType97=Analog -OutputList2Cue98=[~UNUSED3~] -OutputList2SigType98=Analog -OutputList2Cue99=[~UNUSED3~] -OutputList2SigType99=Analog -OutputList2Cue100=[~UNUSED3~] -OutputList2SigType100=Analog -OutputList2Cue101=[~UNUSED3~] -OutputList2SigType101=Analog -OutputList2Cue102=[~UNUSED3~] -OutputList2SigType102=Analog -OutputList2Cue103=[~UNUSED3~] -OutputList2SigType103=Analog -OutputList2Cue104=[~UNUSED3~] -OutputList2SigType104=Analog -OutputList2Cue105=[~UNUSED3~] -OutputList2SigType105=Analog -OutputList2Cue106=[~UNUSED3~] -OutputList2SigType106=Analog -OutputList2Cue107=[~UNUSED3~] -OutputList2SigType107=Analog -OutputList2Cue108=[~UNUSED3~] -OutputList2SigType108=Analog -OutputList2Cue109=[~UNUSED3~] -OutputList2SigType109=Analog -OutputList2Cue110=[~UNUSED3~] -OutputList2SigType110=Analog -OutputList2Cue111=[~UNUSED3~] -OutputList2SigType111=Analog -OutputList2Cue112=[~UNUSED3~] -OutputList2SigType112=Analog -OutputList2Cue113=[~UNUSED3~] -OutputList2SigType113=Analog -OutputList2Cue114=[~UNUSED3~] -OutputList2SigType114=Analog -OutputList2Cue115=[~UNUSED3~] -OutputList2SigType115=Analog -OutputList2Cue116=[~UNUSED3~] -OutputList2SigType116=Analog -OutputList2Cue117=[~UNUSED3~] -OutputList2SigType117=Analog -OutputList2Cue118=[~UNUSED3~] -OutputList2SigType118=Analog -OutputList2Cue119=[~UNUSED3~] -OutputList2SigType119=Analog -OutputList2Cue120=[~UNUSED3~] -OutputList2SigType120=Analog -OutputList2Cue121=[~UNUSED3~] -OutputList2SigType121=Analog -OutputList2Cue122=[~UNUSED3~] -OutputList2SigType122=Analog -OutputList2Cue123=[~UNUSED3~] -OutputList2SigType123=Analog -OutputList2Cue124=[~UNUSED3~] -OutputList2SigType124=Analog -OutputList2Cue125=[~UNUSED3~] -OutputList2SigType125=Analog -OutputList2Cue126=[~UNUSED3~] -OutputList2SigType126=Analog -OutputList2Cue127=[~UNUSED3~] -OutputList2SigType127=Analog -OutputList2Cue128=[~UNUSED3~] -OutputList2SigType128=Analog -OutputList2Cue129=[~UNUSED3~] -OutputList2SigType129=Analog -OutputList2Cue130=[~UNUSED3~] -OutputList2SigType130=Analog -OutputList2Cue131=[~UNUSED3~] -OutputList2SigType131=Analog -OutputList2Cue132=[~UNUSED3~] -OutputList2SigType132=Analog -OutputList2Cue133=[~UNUSED3~] -OutputList2SigType133=Analog -OutputList2Cue134=[~UNUSED3~] -OutputList2SigType134=Analog -OutputList2Cue135=[~UNUSED3~] -OutputList2SigType135=Analog -OutputList2Cue136=[~UNUSED3~] -OutputList2SigType136=Analog -OutputList2Cue137=[~UNUSED3~] -OutputList2SigType137=Analog -OutputList2Cue138=[~UNUSED3~] -OutputList2SigType138=Analog -OutputList2Cue139=[~UNUSED3~] -OutputList2SigType139=Analog -OutputList2Cue140=[~UNUSED3~] -OutputList2SigType140=Analog -OutputList2Cue141=[~UNUSED3~] -OutputList2SigType141=Analog -OutputList2Cue142=[~UNUSED3~] -OutputList2SigType142=Analog -OutputList2Cue143=[~UNUSED3~] -OutputList2SigType143=Analog -OutputList2Cue144=[~UNUSED3~] -OutputList2SigType144=Analog -OutputList2Cue145=[~UNUSED3~] -OutputList2SigType145=Analog -OutputList2Cue146=[~UNUSED3~] -OutputList2SigType146=Analog -OutputList2Cue147=[~UNUSED3~] -OutputList2SigType147=Analog -OutputList2Cue148=[~UNUSED3~] -OutputList2SigType148=Analog -OutputList2Cue149=[~UNUSED3~] -OutputList2SigType149=Analog -OutputList2Cue150=[~UNUSED3~] -OutputList2SigType150=Analog -OutputList2Cue151=[~UNUSED3~] -OutputList2SigType151=Analog -OutputList2Cue152=[~UNUSED3~] -OutputList2SigType152=Analog -OutputList2Cue153=[~UNUSED3~] -OutputList2SigType153=Analog -OutputList2Cue154=[~UNUSED3~] -OutputList2SigType154=Analog -OutputList2Cue155=[~UNUSED3~] -OutputList2SigType155=Analog -OutputList2Cue156=[~UNUSED3~] -OutputList2SigType156=Analog -OutputList2Cue157=[~UNUSED3~] -OutputList2SigType157=Analog -OutputList2Cue158=[~UNUSED3~] -OutputList2SigType158=Analog -OutputList2Cue159=[~UNUSED3~] -OutputList2SigType159=Analog -OutputList2Cue160=[~UNUSED3~] -OutputList2SigType160=Analog -OutputList2Cue161=[~UNUSED3~] -OutputList2SigType161=Analog -OutputList2Cue162=[~UNUSED3~] -OutputList2SigType162=Analog -OutputList2Cue163=[~UNUSED3~] -OutputList2SigType163=Analog -OutputList2Cue164=[~UNUSED3~] -OutputList2SigType164=Analog -OutputList2Cue165=[~UNUSED3~] -OutputList2SigType165=Analog -OutputList2Cue166=[~UNUSED3~] -OutputList2SigType166=Analog -OutputList2Cue167=[~UNUSED3~] -OutputList2SigType167=Analog -OutputList2Cue168=[~UNUSED3~] -OutputList2SigType168=Analog -OutputList2Cue169=[~UNUSED3~] -OutputList2SigType169=Analog -OutputList2Cue170=[~UNUSED3~] -OutputList2SigType170=Analog -OutputList2Cue171=[~UNUSED3~] -OutputList2SigType171=Analog -OutputList2Cue172=[~UNUSED3~] -OutputList2SigType172=Analog -OutputList2Cue173=[~UNUSED3~] -OutputList2SigType173=Analog -OutputList2Cue174=[~UNUSED3~] -OutputList2SigType174=Analog -OutputList2Cue175=[~UNUSED3~] -OutputList2SigType175=Analog -OutputList2Cue176=[~UNUSED3~] -OutputList2SigType176=Analog -OutputList2Cue177=[~UNUSED3~] -OutputList2SigType177=Analog -OutputList2Cue178=[~UNUSED3~] -OutputList2SigType178=Analog -OutputList2Cue179=[~UNUSED3~] -OutputList2SigType179=Analog -OutputList2Cue180=[~UNUSED3~] -OutputList2SigType180=Analog -OutputList2Cue181=[~UNUSED3~] -OutputList2SigType181=Analog -OutputList2Cue182=[~UNUSED3~] -OutputList2SigType182=Analog -OutputList2Cue183=[~UNUSED3~] -OutputList2SigType183=Analog -OutputList2Cue184=[~UNUSED3~] -OutputList2SigType184=Analog -OutputList2Cue185=[~UNUSED3~] -OutputList2SigType185=Analog -OutputList2Cue186=[~UNUSED3~] -OutputList2SigType186=Analog -OutputList2Cue187=[~UNUSED3~] -OutputList2SigType187=Analog -OutputList2Cue188=[~UNUSED3~] -OutputList2SigType188=Analog -OutputList2Cue189=[~UNUSED3~] -OutputList2SigType189=Analog -OutputList2Cue190=[~UNUSED3~] -OutputList2SigType190=Analog -OutputList2Cue191=[~UNUSED3~] -OutputList2SigType191=Analog -OutputList2Cue192=[~UNUSED3~] -OutputList2SigType192=Analog -OutputList2Cue193=[~UNUSED3~] -OutputList2SigType193=Analog -OutputList2Cue194=[~UNUSED3~] -OutputList2SigType194=Analog -OutputList2Cue195=[~UNUSED3~] -OutputList2SigType195=Analog -OutputList2Cue196=[~UNUSED3~] -OutputList2SigType196=Analog -OutputList2Cue197=[~UNUSED3~] -OutputList2SigType197=Analog -OutputList2Cue198=[~UNUSED3~] -OutputList2SigType198=Analog -OutputList2Cue199=[~UNUSED3~] -OutputList2SigType199=Analog -OutputList2Cue200=[~UNUSED3~] -OutputList2SigType200=Analog -OutputList2Cue201=[~UNUSED3~] -OutputList2SigType201=Analog -OutputList2Cue202=[~UNUSED3~] -OutputList2SigType202=Analog -OutputList2Cue203=[~UNUSED3~] -OutputList2SigType203=Analog -OutputList2Cue204=[~UNUSED3~] -OutputList2SigType204=Analog -OutputList2Cue205=[~UNUSED3~] -OutputList2SigType205=Analog -OutputList2Cue206=[~UNUSED3~] -OutputList2SigType206=Analog -OutputList2Cue207=[~UNUSED3~] -OutputList2SigType207=Analog -OutputList2Cue208=[~UNUSED3~] -OutputList2SigType208=Analog -OutputList2Cue209=[~UNUSED3~] -OutputList2SigType209=Analog -OutputList2Cue210=[~UNUSED3~] -OutputList2SigType210=Analog -OutputList2Cue211=[~UNUSED3~] -OutputList2SigType211=Analog -OutputList2Cue212=[~UNUSED3~] -OutputList2SigType212=Analog -OutputList2Cue213=[~UNUSED3~] -OutputList2SigType213=Analog -OutputList2Cue214=[~UNUSED3~] -OutputList2SigType214=Analog -OutputList2Cue215=[~UNUSED3~] -OutputList2SigType215=Analog -OutputList2Cue216=[~UNUSED3~] -OutputList2SigType216=Analog -OutputList2Cue217=[~UNUSED3~] -OutputList2SigType217=Analog -OutputList2Cue218=[~UNUSED3~] -OutputList2SigType218=Analog -OutputList2Cue219=[~UNUSED3~] -OutputList2SigType219=Analog -OutputList2Cue220=[~UNUSED3~] -OutputList2SigType220=Analog -OutputList2Cue221=[~UNUSED3~] -OutputList2SigType221=Analog -OutputList2Cue222=[~UNUSED3~] -OutputList2SigType222=Analog -OutputList2Cue223=[~UNUSED3~] -OutputList2SigType223=Analog -OutputList2Cue224=[~UNUSED3~] -OutputList2SigType224=Analog -OutputList2Cue225=[~UNUSED3~] -OutputList2SigType225=Analog -OutputList2Cue226=[~UNUSED3~] -OutputList2SigType226=Analog -OutputList2Cue227=[~UNUSED3~] -OutputList2SigType227=Analog -OutputList2Cue228=[~UNUSED3~] -OutputList2SigType228=Analog -OutputList2Cue229=[~UNUSED3~] -OutputList2SigType229=Analog -OutputList2Cue230=[~UNUSED3~] -OutputList2SigType230=Analog -OutputList2Cue231=[~UNUSED3~] -OutputList2SigType231=Analog -OutputList2Cue232=[~UNUSED3~] -OutputList2SigType232=Analog -OutputList2Cue233=[~UNUSED3~] -OutputList2SigType233=Analog -OutputList2Cue234=[~UNUSED3~] -OutputList2SigType234=Analog -OutputList2Cue235=[~UNUSED3~] -OutputList2SigType235=Analog -OutputList2Cue236=[~UNUSED3~] -OutputList2SigType236=Analog -OutputList2Cue237=[~UNUSED3~] -OutputList2SigType237=Analog -OutputList2Cue238=[~UNUSED3~] -OutputList2SigType238=Analog -OutputList2Cue239=[~UNUSED3~] -OutputList2SigType239=Analog -OutputList2Cue240=[~UNUSED3~] -OutputList2SigType240=Analog -OutputList2Cue241=[~UNUSED3~] -OutputList2SigType241=Analog -OutputList2Cue242=[~UNUSED3~] -OutputList2SigType242=Analog -OutputList2Cue243=[~UNUSED3~] -OutputList2SigType243=Analog -OutputList2Cue244=[~UNUSED3~] -OutputList2SigType244=Analog -OutputList2Cue245=[~UNUSED3~] -OutputList2SigType245=Analog -OutputList2Cue246=[~UNUSED3~] -OutputList2SigType246=Analog -OutputList2Cue247=[~UNUSED3~] -OutputList2SigType247=Analog -OutputList2Cue248=[~UNUSED3~] -OutputList2SigType248=Analog -OutputList2Cue249=[~UNUSED3~] -OutputList2SigType249=Analog -OutputList2Cue250=[~UNUSED3~] -OutputList2SigType250=Analog -OutputList2Cue251=[~UNUSED3~] -OutputList2SigType251=Analog -OutputList2Cue252=[~UNUSED3~] -OutputList2SigType252=Analog -OutputList2Cue253=[~UNUSED3~] -OutputList2SigType253=Analog -OutputList2Cue254=[~UNUSED3~] -OutputList2SigType254=Analog -OutputList2Cue255=[~UNUSED3~] -OutputList2SigType255=Analog -OutputList2Cue256=[~UNUSED3~] -OutputList2SigType256=Analog -OutputList2Cue257=[~UNUSED3~] -OutputList2SigType257=Analog -OutputList2Cue258=[~UNUSED3~] -OutputList2SigType258=Analog -OutputList2Cue259=[~UNUSED3~] -OutputList2SigType259=Analog -OutputList2Cue260=[~UNUSED3~] -OutputList2SigType260=Analog -OutputList2Cue261=[~UNUSED3~] -OutputList2SigType261=Analog -OutputList2Cue262=[~UNUSED3~] -OutputList2SigType262=Analog -OutputList2Cue263=[~UNUSED3~] -OutputList2SigType263=Analog -OutputList2Cue264=[~UNUSED3~] -OutputList2SigType264=Analog -OutputList2Cue265=[~UNUSED3~] -OutputList2SigType265=Analog -OutputList2Cue266=[~UNUSED3~] -OutputList2SigType266=Analog -OutputList2Cue267=[~UNUSED2~] -OutputList2SigType267=Digital|Analog|Serial|String -OutputList2Cue2012=[~EndGroup~]Item Icons -OutputList2SigType2012=Analog -InputList3Cue1=[~UNUSED2~] -InputList3SigType1=Serial -InputList3Cue2=[~UNUSED2~] -InputList3SigType2=Serial -InputList3Cue3=[~UNUSED2~] -InputList3SigType3=Serial -InputList3Cue4=[~UNUSED2~] -InputList3SigType4=Serial -InputList3Cue5=[~UNUSED2~] -InputList3SigType5=Serial -InputList3Cue6=[~UNUSED2~] -InputList3SigType6=Serial -InputList3Cue7=[~UNUSED2~] -InputList3SigType7=Serial -InputList3Cue8=[~UNUSED2~] -InputList3SigType8=Serial -InputList3Cue9=[~UNUSED2~] -InputList3SigType9=Serial -InputList3Cue10=[~UNUSED2~] -InputList3SigType10=Serial -InputList3Cue11=[~BeginGroup~]Item Texts -InputList3SigType11=Serial -InputList3Cue12=Set Item 1 Text -InputList3SigType12=Serial -InputList3Cue13=Set Item 2 Text -InputList3SigType13=Serial -InputList3Cue14=Set Item 3 Text -InputList3SigType14=Serial -InputList3Cue15=Set Item 4 Text -InputList3SigType15=Serial -InputList3Cue16=Set Item 5 Text -InputList3SigType16=Serial -InputList3Cue17=Set Item 6 Text -InputList3SigType17=Serial -InputList3Cue18=Set Item 7 Text -InputList3SigType18=Serial -InputList3Cue19=Set Item 8 Text -InputList3SigType19=Serial -InputList3Cue20=Set Item 9 Text -InputList3SigType20=Serial -InputList3Cue21=Set Item 10 Text -InputList3SigType21=Serial -InputList3Cue22=Set Item 11 Text -InputList3SigType22=Serial -InputList3Cue23=Set Item 12 Text -InputList3SigType23=Serial -InputList3Cue24=Set Item 13 Text -InputList3SigType24=Serial -InputList3Cue25=Set Item 14 Text -InputList3SigType25=Serial -InputList3Cue26=Set Item 15 Text -InputList3SigType26=Serial -InputList3Cue27=Set Item 16 Text -InputList3SigType27=Serial -InputList3Cue28=Set Item 17 Text -InputList3SigType28=Serial -InputList3Cue29=Set Item 18 Text -InputList3SigType29=Serial -InputList3Cue30=Set Item 19 Text -InputList3SigType30=Serial -InputList3Cue31=Set Item 20 Text -InputList3SigType31=Serial -InputList3Cue32=Set Item 21 Text -InputList3SigType32=Serial -InputList3Cue33=Set Item 22 Text -InputList3SigType33=Serial -InputList3Cue34=Set Item 23 Text -InputList3SigType34=Serial -InputList3Cue35=Set Item 24 Text -InputList3SigType35=Serial -InputList3Cue36=Set Item 25 Text -InputList3SigType36=Serial -InputList3Cue37=Set Item 26 Text -InputList3SigType37=Serial -InputList3Cue38=Set Item 27 Text -InputList3SigType38=Serial -InputList3Cue39=Set Item 28 Text -InputList3SigType39=Serial -InputList3Cue40=Set Item 29 Text -InputList3SigType40=Serial -InputList3Cue41=Set Item 30 Text -InputList3SigType41=Serial -InputList3Cue42=Set Item 31 Text -InputList3SigType42=Serial -InputList3Cue43=Set Item 32 Text -InputList3SigType43=Serial -InputList3Cue44=Set Item 33 Text -InputList3SigType44=Serial -InputList3Cue45=Set Item 34 Text -InputList3SigType45=Serial -InputList3Cue46=Set Item 35 Text -InputList3SigType46=Serial -InputList3Cue47=Set Item 36 Text -InputList3SigType47=Serial -InputList3Cue48=Set Item 37 Text -InputList3SigType48=Serial -InputList3Cue49=Set Item 38 Text -InputList3SigType49=Serial -InputList3Cue50=Set Item 39 Text -InputList3SigType50=Serial -InputList3Cue51=Set Item 40 Text -InputList3SigType51=Serial -InputList3Cue52=Set Item 41 Text -InputList3SigType52=Serial -InputList3Cue53=Set Item 42 Text -InputList3SigType53=Serial -InputList3Cue54=Set Item 43 Text -InputList3SigType54=Serial -InputList3Cue55=Set Item 44 Text -InputList3SigType55=Serial -InputList3Cue56=Set Item 45 Text -InputList3SigType56=Serial -InputList3Cue57=Set Item 46 Text -InputList3SigType57=Serial -InputList3Cue58=Set Item 47 Text -InputList3SigType58=Serial -InputList3Cue59=Set Item 48 Text -InputList3SigType59=Serial -InputList3Cue60=Set Item 49 Text -InputList3SigType60=Serial -InputList3Cue61=Set Item 50 Text -InputList3SigType61=Serial -InputList3Cue62=Set Item 51 Text -InputList3SigType62=Serial -InputList3Cue63=Set Item 52 Text -InputList3SigType63=Serial -InputList3Cue64=Set Item 53 Text -InputList3SigType64=Serial -InputList3Cue65=Set Item 54 Text -InputList3SigType65=Serial -InputList3Cue66=Set Item 55 Text -InputList3SigType66=Serial -InputList3Cue67=Set Item 56 Text -InputList3SigType67=Serial -InputList3Cue68=Set Item 57 Text -InputList3SigType68=Serial -InputList3Cue69=Set Item 58 Text -InputList3SigType69=Serial -InputList3Cue70=Set Item 59 Text -InputList3SigType70=Serial -InputList3Cue71=Set Item 60 Text -InputList3SigType71=Serial -InputList3Cue72=Set Item 61 Text -InputList3SigType72=Serial -InputList3Cue73=Set Item 62 Text -InputList3SigType73=Serial -InputList3Cue74=Set Item 63 Text -InputList3SigType74=Serial -InputList3Cue75=Set Item 64 Text -InputList3SigType75=Serial -InputList3Cue76=Set Item 65 Text -InputList3SigType76=Serial -InputList3Cue77=Set Item 66 Text -InputList3SigType77=Serial -InputList3Cue78=Set Item 67 Text -InputList3SigType78=Serial -InputList3Cue79=Set Item 68 Text -InputList3SigType79=Serial -InputList3Cue80=Set Item 69 Text -InputList3SigType80=Serial -InputList3Cue81=Set Item 70 Text -InputList3SigType81=Serial -InputList3Cue82=Set Item 71 Text -InputList3SigType82=Serial -InputList3Cue83=Set Item 72 Text -InputList3SigType83=Serial -InputList3Cue84=Set Item 73 Text -InputList3SigType84=Serial -InputList3Cue85=Set Item 74 Text -InputList3SigType85=Serial -InputList3Cue86=Set Item 75 Text -InputList3SigType86=Serial -InputList3Cue87=Set Item 76 Text -InputList3SigType87=Serial -InputList3Cue88=Set Item 77 Text -InputList3SigType88=Serial -InputList3Cue89=Set Item 78 Text -InputList3SigType89=Serial -InputList3Cue90=Set Item 79 Text -InputList3SigType90=Serial -InputList3Cue91=Set Item 80 Text -InputList3SigType91=Serial -InputList3Cue92=Set Item 81 Text -InputList3SigType92=Serial -InputList3Cue93=Set Item 82 Text -InputList3SigType93=Serial -InputList3Cue94=Set Item 83 Text -InputList3SigType94=Serial -InputList3Cue95=Set Item 84 Text -InputList3SigType95=Serial -InputList3Cue96=Set Item 85 Text -InputList3SigType96=Serial -InputList3Cue97=Set Item 86 Text -InputList3SigType97=Serial -InputList3Cue98=Set Item 87 Text -InputList3SigType98=Serial -InputList3Cue99=Set Item 88 Text -InputList3SigType99=Serial -InputList3Cue100=Set Item 89 Text -InputList3SigType100=Serial -InputList3Cue101=Set Item 90 Text -InputList3SigType101=Serial -InputList3Cue102=Set Item 91 Text -InputList3SigType102=Serial -InputList3Cue103=Set Item 92 Text -InputList3SigType103=Serial -InputList3Cue104=Set Item 93 Text -InputList3SigType104=Serial -InputList3Cue105=Set Item 94 Text -InputList3SigType105=Serial -InputList3Cue106=Set Item 95 Text -InputList3SigType106=Serial -InputList3Cue107=Set Item 96 Text -InputList3SigType107=Serial -InputList3Cue108=Set Item 97 Text -InputList3SigType108=Serial -InputList3Cue109=Set Item 98 Text -InputList3SigType109=Serial -InputList3Cue110=Set Item 99 Text -InputList3SigType110=Serial -InputList3Cue111=Set Item 100 Text -InputList3SigType111=Serial -InputList3Cue112=Set Item 101 Text -InputList3SigType112=Serial -InputList3Cue113=Set Item 102 Text -InputList3SigType113=Serial -InputList3Cue114=Set Item 103 Text -InputList3SigType114=Serial -InputList3Cue115=Set Item 104 Text -InputList3SigType115=Serial -InputList3Cue116=Set Item 105 Text -InputList3SigType116=Serial -InputList3Cue117=Set Item 106 Text -InputList3SigType117=Serial -InputList3Cue118=Set Item 107 Text -InputList3SigType118=Serial -InputList3Cue119=Set Item 108 Text -InputList3SigType119=Serial -InputList3Cue120=Set Item 109 Text -InputList3SigType120=Serial -InputList3Cue121=Set Item 110 Text -InputList3SigType121=Serial -InputList3Cue122=Set Item 111 Text -InputList3SigType122=Serial -InputList3Cue123=Set Item 112 Text -InputList3SigType123=Serial -InputList3Cue124=Set Item 113 Text -InputList3SigType124=Serial -InputList3Cue125=Set Item 114 Text -InputList3SigType125=Serial -InputList3Cue126=Set Item 115 Text -InputList3SigType126=Serial -InputList3Cue127=Set Item 116 Text -InputList3SigType127=Serial -InputList3Cue128=Set Item 117 Text -InputList3SigType128=Serial -InputList3Cue129=Set Item 118 Text -InputList3SigType129=Serial -InputList3Cue130=Set Item 119 Text -InputList3SigType130=Serial -InputList3Cue131=Set Item 120 Text -InputList3SigType131=Serial -InputList3Cue132=Set Item 121 Text -InputList3SigType132=Serial -InputList3Cue133=Set Item 122 Text -InputList3SigType133=Serial -InputList3Cue134=Set Item 123 Text -InputList3SigType134=Serial -InputList3Cue135=Set Item 124 Text -InputList3SigType135=Serial -InputList3Cue136=Set Item 125 Text -InputList3SigType136=Serial -InputList3Cue137=Set Item 126 Text -InputList3SigType137=Serial -InputList3Cue138=Set Item 127 Text -InputList3SigType138=Serial -InputList3Cue139=Set Item 128 Text -InputList3SigType139=Serial -InputList3Cue140=Set Item 129 Text -InputList3SigType140=Serial -InputList3Cue141=Set Item 130 Text -InputList3SigType141=Serial -InputList3Cue142=Set Item 131 Text -InputList3SigType142=Serial -InputList3Cue143=Set Item 132 Text -InputList3SigType143=Serial -InputList3Cue144=Set Item 133 Text -InputList3SigType144=Serial -InputList3Cue145=Set Item 134 Text -InputList3SigType145=Serial -InputList3Cue146=Set Item 135 Text -InputList3SigType146=Serial -InputList3Cue147=Set Item 136 Text -InputList3SigType147=Serial -InputList3Cue148=Set Item 137 Text -InputList3SigType148=Serial -InputList3Cue149=Set Item 138 Text -InputList3SigType149=Serial -InputList3Cue150=Set Item 139 Text -InputList3SigType150=Serial -InputList3Cue151=Set Item 140 Text -InputList3SigType151=Serial -InputList3Cue152=Set Item 141 Text -InputList3SigType152=Serial -InputList3Cue153=Set Item 142 Text -InputList3SigType153=Serial -InputList3Cue154=Set Item 143 Text -InputList3SigType154=Serial -InputList3Cue155=Set Item 144 Text -InputList3SigType155=Serial -InputList3Cue156=Set Item 145 Text -InputList3SigType156=Serial -InputList3Cue157=Set Item 146 Text -InputList3SigType157=Serial -InputList3Cue158=Set Item 147 Text -InputList3SigType158=Serial -InputList3Cue159=Set Item 148 Text -InputList3SigType159=Serial -InputList3Cue160=Set Item 149 Text -InputList3SigType160=Serial -InputList3Cue161=Set Item 150 Text -InputList3SigType161=Serial -InputList3Cue162=Set Item 151 Text -InputList3SigType162=Serial -InputList3Cue163=Set Item 152 Text -InputList3SigType163=Serial -InputList3Cue164=Set Item 153 Text -InputList3SigType164=Serial -InputList3Cue165=Set Item 154 Text -InputList3SigType165=Serial -InputList3Cue166=Set Item 155 Text -InputList3SigType166=Serial -InputList3Cue167=Set Item 156 Text -InputList3SigType167=Serial -InputList3Cue168=Set Item 157 Text -InputList3SigType168=Serial -InputList3Cue169=Set Item 158 Text -InputList3SigType169=Serial -InputList3Cue170=Set Item 159 Text -InputList3SigType170=Serial -InputList3Cue171=Set Item 160 Text -InputList3SigType171=Serial -InputList3Cue172=Set Item 161 Text -InputList3SigType172=Serial -InputList3Cue173=Set Item 162 Text -InputList3SigType173=Serial -InputList3Cue174=Set Item 163 Text -InputList3SigType174=Serial -InputList3Cue175=Set Item 164 Text -InputList3SigType175=Serial -InputList3Cue176=Set Item 165 Text -InputList3SigType176=Serial -InputList3Cue177=Set Item 166 Text -InputList3SigType177=Serial -InputList3Cue178=Set Item 167 Text -InputList3SigType178=Serial -InputList3Cue179=Set Item 168 Text -InputList3SigType179=Serial -InputList3Cue180=Set Item 169 Text -InputList3SigType180=Serial -InputList3Cue181=Set Item 170 Text -InputList3SigType181=Serial -InputList3Cue182=Set Item 171 Text -InputList3SigType182=Serial -InputList3Cue183=Set Item 172 Text -InputList3SigType183=Serial -InputList3Cue184=Set Item 173 Text -InputList3SigType184=Serial -InputList3Cue185=Set Item 174 Text -InputList3SigType185=Serial -InputList3Cue186=Set Item 175 Text -InputList3SigType186=Serial -InputList3Cue187=Set Item 176 Text -InputList3SigType187=Serial -InputList3Cue188=Set Item 177 Text -InputList3SigType188=Serial -InputList3Cue189=Set Item 178 Text -InputList3SigType189=Serial -InputList3Cue190=Set Item 179 Text -InputList3SigType190=Serial -InputList3Cue191=Set Item 180 Text -InputList3SigType191=Serial -InputList3Cue192=Set Item 181 Text -InputList3SigType192=Serial -InputList3Cue193=Set Item 182 Text -InputList3SigType193=Serial -InputList3Cue194=Set Item 183 Text -InputList3SigType194=Serial -InputList3Cue195=Set Item 184 Text -InputList3SigType195=Serial -InputList3Cue196=Set Item 185 Text -InputList3SigType196=Serial -InputList3Cue197=Set Item 186 Text -InputList3SigType197=Serial -InputList3Cue198=Set Item 187 Text -InputList3SigType198=Serial -InputList3Cue199=Set Item 188 Text -InputList3SigType199=Serial -InputList3Cue200=Set Item 189 Text -InputList3SigType200=Serial -InputList3Cue201=Set Item 190 Text -InputList3SigType201=Serial -InputList3Cue202=Set Item 191 Text -InputList3SigType202=Serial -InputList3Cue203=Set Item 192 Text -InputList3SigType203=Serial -InputList3Cue204=Set Item 193 Text -InputList3SigType204=Serial -InputList3Cue205=Set Item 194 Text -InputList3SigType205=Serial -InputList3Cue206=Set Item 195 Text -InputList3SigType206=Serial -InputList3Cue207=Set Item 196 Text -InputList3SigType207=Serial -InputList3Cue208=Set Item 197 Text -InputList3SigType208=Serial -InputList3Cue209=Set Item 198 Text -InputList3SigType209=Serial -InputList3Cue210=Set Item 199 Text -InputList3SigType210=Serial -InputList3Cue211=Set Item 200 Text -InputList3SigType211=Serial -InputList3Cue212=Set Item 201 Text -InputList3SigType212=Serial -InputList3Cue213=Set Item 202 Text -InputList3SigType213=Serial -InputList3Cue214=Set Item 203 Text -InputList3SigType214=Serial -InputList3Cue215=Set Item 204 Text -InputList3SigType215=Serial -InputList3Cue216=Set Item 205 Text -InputList3SigType216=Serial -InputList3Cue217=Set Item 206 Text -InputList3SigType217=Serial -InputList3Cue218=Set Item 207 Text -InputList3SigType218=Serial -InputList3Cue219=Set Item 208 Text -InputList3SigType219=Serial -InputList3Cue220=Set Item 209 Text -InputList3SigType220=Serial -InputList3Cue221=Set Item 210 Text -InputList3SigType221=Serial -InputList3Cue222=Set Item 211 Text -InputList3SigType222=Serial -InputList3Cue223=Set Item 212 Text -InputList3SigType223=Serial -InputList3Cue224=Set Item 213 Text -InputList3SigType224=Serial -InputList3Cue225=Set Item 214 Text -InputList3SigType225=Serial -InputList3Cue226=Set Item 215 Text -InputList3SigType226=Serial -InputList3Cue227=Set Item 216 Text -InputList3SigType227=Serial -InputList3Cue228=Set Item 217 Text -InputList3SigType228=Serial -InputList3Cue229=Set Item 218 Text -InputList3SigType229=Serial -InputList3Cue230=Set Item 219 Text -InputList3SigType230=Serial -InputList3Cue231=Set Item 220 Text -InputList3SigType231=Serial -InputList3Cue232=Set Item 221 Text -InputList3SigType232=Serial -InputList3Cue233=Set Item 222 Text -InputList3SigType233=Serial -InputList3Cue234=Set Item 223 Text -InputList3SigType234=Serial -InputList3Cue235=Set Item 224 Text -InputList3SigType235=Serial -InputList3Cue236=Set Item 225 Text -InputList3SigType236=Serial -InputList3Cue237=Set Item 226 Text -InputList3SigType237=Serial -InputList3Cue238=Set Item 227 Text -InputList3SigType238=Serial -InputList3Cue239=Set Item 228 Text -InputList3SigType239=Serial -InputList3Cue240=Set Item 229 Text -InputList3SigType240=Serial -InputList3Cue241=Set Item 230 Text -InputList3SigType241=Serial -InputList3Cue242=Set Item 231 Text -InputList3SigType242=Serial -InputList3Cue243=Set Item 232 Text -InputList3SigType243=Serial -InputList3Cue244=Set Item 233 Text -InputList3SigType244=Serial -InputList3Cue245=Set Item 234 Text -InputList3SigType245=Serial -InputList3Cue246=Set Item 235 Text -InputList3SigType246=Serial -InputList3Cue247=Set Item 236 Text -InputList3SigType247=Serial -InputList3Cue248=Set Item 237 Text -InputList3SigType248=Serial -InputList3Cue249=Set Item 238 Text -InputList3SigType249=Serial -InputList3Cue250=Set Item 239 Text -InputList3SigType250=Serial -InputList3Cue251=Set Item 240 Text -InputList3SigType251=Serial -InputList3Cue252=Set Item 241 Text -InputList3SigType252=Serial -InputList3Cue253=Set Item 242 Text -InputList3SigType253=Serial -InputList3Cue254=Set Item 243 Text -InputList3SigType254=Serial -InputList3Cue255=Set Item 244 Text -InputList3SigType255=Serial -InputList3Cue256=Set Item 245 Text -InputList3SigType256=Serial -InputList3Cue257=Set Item 246 Text -InputList3SigType257=Serial -InputList3Cue258=Set Item 247 Text -InputList3SigType258=Serial -InputList3Cue259=Set Item 248 Text -InputList3SigType259=Serial -InputList3Cue260=Set Item 249 Text -InputList3SigType260=Serial -InputList3Cue261=Set Item 250 Text -InputList3SigType261=Serial -InputList3Cue262=Set Item 251 Text -InputList3SigType262=Serial -InputList3Cue263=Set Item 252 Text -InputList3SigType263=Serial -InputList3Cue264=Set Item 253 Text -InputList3SigType264=Serial -InputList3Cue265=Set Item 254 Text -InputList3SigType265=Serial -InputList3Cue266=Set Item 255 Text -InputList3SigType266=Serial -InputList3Cue267=[~UNUSED2~] -InputList3SigType267=Digital|Analog|Serial|String -InputList3Cue2012=[~EndGroup~]Item Texts -InputList3SigType2012=Serial -InputList3Cue2013=[~BeginGroup~]Item Icons -InputList3SigType2013=Serial -InputList3Cue2014=Set Item 1 Icon Serial -InputList3SigType2014=Serial -InputList3Cue2015=Set Item 2 Icon Serial -InputList3SigType2015=Serial -InputList3Cue2016=Set Item 3 Icon Serial -InputList3SigType2016=Serial -InputList3Cue2017=Set Item 4 Icon Serial -InputList3SigType2017=Serial -InputList3Cue2018=Set Item 5 Icon Serial -InputList3SigType2018=Serial -InputList3Cue2019=Set Item 6 Icon Serial -InputList3SigType2019=Serial -InputList3Cue2020=Set Item 7 Icon Serial -InputList3SigType2020=Serial -InputList3Cue2021=Set Item 8 Icon Serial -InputList3SigType2021=Serial -InputList3Cue2022=Set Item 9 Icon Serial -InputList3SigType2022=Serial -InputList3Cue2023=Set Item 10 Icon Serial -InputList3SigType2023=Serial -InputList3Cue2024=Set Item 11 Icon Serial -InputList3SigType2024=Serial -InputList3Cue2025=Set Item 12 Icon Serial -InputList3SigType2025=Serial -InputList3Cue2026=Set Item 13 Icon Serial -InputList3SigType2026=Serial -InputList3Cue2027=Set Item 14 Icon Serial -InputList3SigType2027=Serial -InputList3Cue2028=Set Item 15 Icon Serial -InputList3SigType2028=Serial -InputList3Cue2029=Set Item 16 Icon Serial -InputList3SigType2029=Serial -InputList3Cue2030=Set Item 17 Icon Serial -InputList3SigType2030=Serial -InputList3Cue2031=Set Item 18 Icon Serial -InputList3SigType2031=Serial -InputList3Cue2032=Set Item 19 Icon Serial -InputList3SigType2032=Serial -InputList3Cue2033=Set Item 20 Icon Serial -InputList3SigType2033=Serial -InputList3Cue2034=Set Item 21 Icon Serial -InputList3SigType2034=Serial -InputList3Cue2035=Set Item 22 Icon Serial -InputList3SigType2035=Serial -InputList3Cue2036=Set Item 23 Icon Serial -InputList3SigType2036=Serial -InputList3Cue2037=Set Item 24 Icon Serial -InputList3SigType2037=Serial -InputList3Cue2038=Set Item 25 Icon Serial -InputList3SigType2038=Serial -InputList3Cue2039=Set Item 26 Icon Serial -InputList3SigType2039=Serial -InputList3Cue2040=Set Item 27 Icon Serial -InputList3SigType2040=Serial -InputList3Cue2041=Set Item 28 Icon Serial -InputList3SigType2041=Serial -InputList3Cue2042=Set Item 29 Icon Serial -InputList3SigType2042=Serial -InputList3Cue2043=Set Item 30 Icon Serial -InputList3SigType2043=Serial -InputList3Cue2044=Set Item 31 Icon Serial -InputList3SigType2044=Serial -InputList3Cue2045=Set Item 32 Icon Serial -InputList3SigType2045=Serial -InputList3Cue2046=Set Item 33 Icon Serial -InputList3SigType2046=Serial -InputList3Cue2047=Set Item 34 Icon Serial -InputList3SigType2047=Serial -InputList3Cue2048=Set Item 35 Icon Serial -InputList3SigType2048=Serial -InputList3Cue2049=Set Item 36 Icon Serial -InputList3SigType2049=Serial -InputList3Cue2050=Set Item 37 Icon Serial -InputList3SigType2050=Serial -InputList3Cue2051=Set Item 38 Icon Serial -InputList3SigType2051=Serial -InputList3Cue2052=Set Item 39 Icon Serial -InputList3SigType2052=Serial -InputList3Cue2053=Set Item 40 Icon Serial -InputList3SigType2053=Serial -InputList3Cue2054=Set Item 41 Icon Serial -InputList3SigType2054=Serial -InputList3Cue2055=Set Item 42 Icon Serial -InputList3SigType2055=Serial -InputList3Cue2056=Set Item 43 Icon Serial -InputList3SigType2056=Serial -InputList3Cue2057=Set Item 44 Icon Serial -InputList3SigType2057=Serial -InputList3Cue2058=Set Item 45 Icon Serial -InputList3SigType2058=Serial -InputList3Cue2059=Set Item 46 Icon Serial -InputList3SigType2059=Serial -InputList3Cue2060=Set Item 47 Icon Serial -InputList3SigType2060=Serial -InputList3Cue2061=Set Item 48 Icon Serial -InputList3SigType2061=Serial -InputList3Cue2062=Set Item 49 Icon Serial -InputList3SigType2062=Serial -InputList3Cue2063=Set Item 50 Icon Serial -InputList3SigType2063=Serial -InputList3Cue2064=Set Item 51 Icon Serial -InputList3SigType2064=Serial -InputList3Cue2065=Set Item 52 Icon Serial -InputList3SigType2065=Serial -InputList3Cue2066=Set Item 53 Icon Serial -InputList3SigType2066=Serial -InputList3Cue2067=Set Item 54 Icon Serial -InputList3SigType2067=Serial -InputList3Cue2068=Set Item 55 Icon Serial -InputList3SigType2068=Serial -InputList3Cue2069=Set Item 56 Icon Serial -InputList3SigType2069=Serial -InputList3Cue2070=Set Item 57 Icon Serial -InputList3SigType2070=Serial -InputList3Cue2071=Set Item 58 Icon Serial -InputList3SigType2071=Serial -InputList3Cue2072=Set Item 59 Icon Serial -InputList3SigType2072=Serial -InputList3Cue2073=Set Item 60 Icon Serial -InputList3SigType2073=Serial -InputList3Cue2074=Set Item 61 Icon Serial -InputList3SigType2074=Serial -InputList3Cue2075=Set Item 62 Icon Serial -InputList3SigType2075=Serial -InputList3Cue2076=Set Item 63 Icon Serial -InputList3SigType2076=Serial -InputList3Cue2077=Set Item 64 Icon Serial -InputList3SigType2077=Serial -InputList3Cue2078=Set Item 65 Icon Serial -InputList3SigType2078=Serial -InputList3Cue2079=Set Item 66 Icon Serial -InputList3SigType2079=Serial -InputList3Cue2080=Set Item 67 Icon Serial -InputList3SigType2080=Serial -InputList3Cue2081=Set Item 68 Icon Serial -InputList3SigType2081=Serial -InputList3Cue2082=Set Item 69 Icon Serial -InputList3SigType2082=Serial -InputList3Cue2083=Set Item 70 Icon Serial -InputList3SigType2083=Serial -InputList3Cue2084=Set Item 71 Icon Serial -InputList3SigType2084=Serial -InputList3Cue2085=Set Item 72 Icon Serial -InputList3SigType2085=Serial -InputList3Cue2086=Set Item 73 Icon Serial -InputList3SigType2086=Serial -InputList3Cue2087=Set Item 74 Icon Serial -InputList3SigType2087=Serial -InputList3Cue2088=Set Item 75 Icon Serial -InputList3SigType2088=Serial -InputList3Cue2089=Set Item 76 Icon Serial -InputList3SigType2089=Serial -InputList3Cue2090=Set Item 77 Icon Serial -InputList3SigType2090=Serial -InputList3Cue2091=Set Item 78 Icon Serial -InputList3SigType2091=Serial -InputList3Cue2092=Set Item 79 Icon Serial -InputList3SigType2092=Serial -InputList3Cue2093=Set Item 80 Icon Serial -InputList3SigType2093=Serial -InputList3Cue2094=Set Item 81 Icon Serial -InputList3SigType2094=Serial -InputList3Cue2095=Set Item 82 Icon Serial -InputList3SigType2095=Serial -InputList3Cue2096=Set Item 83 Icon Serial -InputList3SigType2096=Serial -InputList3Cue2097=Set Item 84 Icon Serial -InputList3SigType2097=Serial -InputList3Cue2098=Set Item 85 Icon Serial -InputList3SigType2098=Serial -InputList3Cue2099=Set Item 86 Icon Serial -InputList3SigType2099=Serial -InputList3Cue2100=Set Item 87 Icon Serial -InputList3SigType2100=Serial -InputList3Cue2101=Set Item 88 Icon Serial -InputList3SigType2101=Serial -InputList3Cue2102=Set Item 89 Icon Serial -InputList3SigType2102=Serial -InputList3Cue2103=Set Item 90 Icon Serial -InputList3SigType2103=Serial -InputList3Cue2104=Set Item 91 Icon Serial -InputList3SigType2104=Serial -InputList3Cue2105=Set Item 92 Icon Serial -InputList3SigType2105=Serial -InputList3Cue2106=Set Item 93 Icon Serial -InputList3SigType2106=Serial -InputList3Cue2107=Set Item 94 Icon Serial -InputList3SigType2107=Serial -InputList3Cue2108=Set Item 95 Icon Serial -InputList3SigType2108=Serial -InputList3Cue2109=Set Item 96 Icon Serial -InputList3SigType2109=Serial -InputList3Cue2110=Set Item 97 Icon Serial -InputList3SigType2110=Serial -InputList3Cue2111=Set Item 98 Icon Serial -InputList3SigType2111=Serial -InputList3Cue2112=Set Item 99 Icon Serial -InputList3SigType2112=Serial -InputList3Cue2113=Set Item 100 Icon Serial -InputList3SigType2113=Serial -InputList3Cue2114=Set Item 101 Icon Serial -InputList3SigType2114=Serial -InputList3Cue2115=Set Item 102 Icon Serial -InputList3SigType2115=Serial -InputList3Cue2116=Set Item 103 Icon Serial -InputList3SigType2116=Serial -InputList3Cue2117=Set Item 104 Icon Serial -InputList3SigType2117=Serial -InputList3Cue2118=Set Item 105 Icon Serial -InputList3SigType2118=Serial -InputList3Cue2119=Set Item 106 Icon Serial -InputList3SigType2119=Serial -InputList3Cue2120=Set Item 107 Icon Serial -InputList3SigType2120=Serial -InputList3Cue2121=Set Item 108 Icon Serial -InputList3SigType2121=Serial -InputList3Cue2122=Set Item 109 Icon Serial -InputList3SigType2122=Serial -InputList3Cue2123=Set Item 110 Icon Serial -InputList3SigType2123=Serial -InputList3Cue2124=Set Item 111 Icon Serial -InputList3SigType2124=Serial -InputList3Cue2125=Set Item 112 Icon Serial -InputList3SigType2125=Serial -InputList3Cue2126=Set Item 113 Icon Serial -InputList3SigType2126=Serial -InputList3Cue2127=Set Item 114 Icon Serial -InputList3SigType2127=Serial -InputList3Cue2128=Set Item 115 Icon Serial -InputList3SigType2128=Serial -InputList3Cue2129=Set Item 116 Icon Serial -InputList3SigType2129=Serial -InputList3Cue2130=Set Item 117 Icon Serial -InputList3SigType2130=Serial -InputList3Cue2131=Set Item 118 Icon Serial -InputList3SigType2131=Serial -InputList3Cue2132=Set Item 119 Icon Serial -InputList3SigType2132=Serial -InputList3Cue2133=Set Item 120 Icon Serial -InputList3SigType2133=Serial -InputList3Cue2134=Set Item 121 Icon Serial -InputList3SigType2134=Serial -InputList3Cue2135=Set Item 122 Icon Serial -InputList3SigType2135=Serial -InputList3Cue2136=Set Item 123 Icon Serial -InputList3SigType2136=Serial -InputList3Cue2137=Set Item 124 Icon Serial -InputList3SigType2137=Serial -InputList3Cue2138=Set Item 125 Icon Serial -InputList3SigType2138=Serial -InputList3Cue2139=Set Item 126 Icon Serial -InputList3SigType2139=Serial -InputList3Cue2140=Set Item 127 Icon Serial -InputList3SigType2140=Serial -InputList3Cue2141=Set Item 128 Icon Serial -InputList3SigType2141=Serial -InputList3Cue2142=Set Item 129 Icon Serial -InputList3SigType2142=Serial -InputList3Cue2143=Set Item 130 Icon Serial -InputList3SigType2143=Serial -InputList3Cue2144=Set Item 131 Icon Serial -InputList3SigType2144=Serial -InputList3Cue2145=Set Item 132 Icon Serial -InputList3SigType2145=Serial -InputList3Cue2146=Set Item 133 Icon Serial -InputList3SigType2146=Serial -InputList3Cue2147=Set Item 134 Icon Serial -InputList3SigType2147=Serial -InputList3Cue2148=Set Item 135 Icon Serial -InputList3SigType2148=Serial -InputList3Cue2149=Set Item 136 Icon Serial -InputList3SigType2149=Serial -InputList3Cue2150=Set Item 137 Icon Serial -InputList3SigType2150=Serial -InputList3Cue2151=Set Item 138 Icon Serial -InputList3SigType2151=Serial -InputList3Cue2152=Set Item 139 Icon Serial -InputList3SigType2152=Serial -InputList3Cue2153=Set Item 140 Icon Serial -InputList3SigType2153=Serial -InputList3Cue2154=Set Item 141 Icon Serial -InputList3SigType2154=Serial -InputList3Cue2155=Set Item 142 Icon Serial -InputList3SigType2155=Serial -InputList3Cue2156=Set Item 143 Icon Serial -InputList3SigType2156=Serial -InputList3Cue2157=Set Item 144 Icon Serial -InputList3SigType2157=Serial -InputList3Cue2158=Set Item 145 Icon Serial -InputList3SigType2158=Serial -InputList3Cue2159=Set Item 146 Icon Serial -InputList3SigType2159=Serial -InputList3Cue2160=Set Item 147 Icon Serial -InputList3SigType2160=Serial -InputList3Cue2161=Set Item 148 Icon Serial -InputList3SigType2161=Serial -InputList3Cue2162=Set Item 149 Icon Serial -InputList3SigType2162=Serial -InputList3Cue2163=Set Item 150 Icon Serial -InputList3SigType2163=Serial -InputList3Cue2164=Set Item 151 Icon Serial -InputList3SigType2164=Serial -InputList3Cue2165=Set Item 152 Icon Serial -InputList3SigType2165=Serial -InputList3Cue2166=Set Item 153 Icon Serial -InputList3SigType2166=Serial -InputList3Cue2167=Set Item 154 Icon Serial -InputList3SigType2167=Serial -InputList3Cue2168=Set Item 155 Icon Serial -InputList3SigType2168=Serial -InputList3Cue2169=Set Item 156 Icon Serial -InputList3SigType2169=Serial -InputList3Cue2170=Set Item 157 Icon Serial -InputList3SigType2170=Serial -InputList3Cue2171=Set Item 158 Icon Serial -InputList3SigType2171=Serial -InputList3Cue2172=Set Item 159 Icon Serial -InputList3SigType2172=Serial -InputList3Cue2173=Set Item 160 Icon Serial -InputList3SigType2173=Serial -InputList3Cue2174=Set Item 161 Icon Serial -InputList3SigType2174=Serial -InputList3Cue2175=Set Item 162 Icon Serial -InputList3SigType2175=Serial -InputList3Cue2176=Set Item 163 Icon Serial -InputList3SigType2176=Serial -InputList3Cue2177=Set Item 164 Icon Serial -InputList3SigType2177=Serial -InputList3Cue2178=Set Item 165 Icon Serial -InputList3SigType2178=Serial -InputList3Cue2179=Set Item 166 Icon Serial -InputList3SigType2179=Serial -InputList3Cue2180=Set Item 167 Icon Serial -InputList3SigType2180=Serial -InputList3Cue2181=Set Item 168 Icon Serial -InputList3SigType2181=Serial -InputList3Cue2182=Set Item 169 Icon Serial -InputList3SigType2182=Serial -InputList3Cue2183=Set Item 170 Icon Serial -InputList3SigType2183=Serial -InputList3Cue2184=Set Item 171 Icon Serial -InputList3SigType2184=Serial -InputList3Cue2185=Set Item 172 Icon Serial -InputList3SigType2185=Serial -InputList3Cue2186=Set Item 173 Icon Serial -InputList3SigType2186=Serial -InputList3Cue2187=Set Item 174 Icon Serial -InputList3SigType2187=Serial -InputList3Cue2188=Set Item 175 Icon Serial -InputList3SigType2188=Serial -InputList3Cue2189=Set Item 176 Icon Serial -InputList3SigType2189=Serial -InputList3Cue2190=Set Item 177 Icon Serial -InputList3SigType2190=Serial -InputList3Cue2191=Set Item 178 Icon Serial -InputList3SigType2191=Serial -InputList3Cue2192=Set Item 179 Icon Serial -InputList3SigType2192=Serial -InputList3Cue2193=Set Item 180 Icon Serial -InputList3SigType2193=Serial -InputList3Cue2194=Set Item 181 Icon Serial -InputList3SigType2194=Serial -InputList3Cue2195=Set Item 182 Icon Serial -InputList3SigType2195=Serial -InputList3Cue2196=Set Item 183 Icon Serial -InputList3SigType2196=Serial -InputList3Cue2197=Set Item 184 Icon Serial -InputList3SigType2197=Serial -InputList3Cue2198=Set Item 185 Icon Serial -InputList3SigType2198=Serial -InputList3Cue2199=Set Item 186 Icon Serial -InputList3SigType2199=Serial -InputList3Cue2200=Set Item 187 Icon Serial -InputList3SigType2200=Serial -InputList3Cue2201=Set Item 188 Icon Serial -InputList3SigType2201=Serial -InputList3Cue2202=Set Item 189 Icon Serial -InputList3SigType2202=Serial -InputList3Cue2203=Set Item 190 Icon Serial -InputList3SigType2203=Serial -InputList3Cue2204=Set Item 191 Icon Serial -InputList3SigType2204=Serial -InputList3Cue2205=Set Item 192 Icon Serial -InputList3SigType2205=Serial -InputList3Cue2206=Set Item 193 Icon Serial -InputList3SigType2206=Serial -InputList3Cue2207=Set Item 194 Icon Serial -InputList3SigType2207=Serial -InputList3Cue2208=Set Item 195 Icon Serial -InputList3SigType2208=Serial -InputList3Cue2209=Set Item 196 Icon Serial -InputList3SigType2209=Serial -InputList3Cue2210=Set Item 197 Icon Serial -InputList3SigType2210=Serial -InputList3Cue2211=Set Item 198 Icon Serial -InputList3SigType2211=Serial -InputList3Cue2212=Set Item 199 Icon Serial -InputList3SigType2212=Serial -InputList3Cue2213=Set Item 200 Icon Serial -InputList3SigType2213=Serial -InputList3Cue2214=Set Item 201 Icon Serial -InputList3SigType2214=Serial -InputList3Cue2215=Set Item 202 Icon Serial -InputList3SigType2215=Serial -InputList3Cue2216=Set Item 203 Icon Serial -InputList3SigType2216=Serial -InputList3Cue2217=Set Item 204 Icon Serial -InputList3SigType2217=Serial -InputList3Cue2218=Set Item 205 Icon Serial -InputList3SigType2218=Serial -InputList3Cue2219=Set Item 206 Icon Serial -InputList3SigType2219=Serial -InputList3Cue2220=Set Item 207 Icon Serial -InputList3SigType2220=Serial -InputList3Cue2221=Set Item 208 Icon Serial -InputList3SigType2221=Serial -InputList3Cue2222=Set Item 209 Icon Serial -InputList3SigType2222=Serial -InputList3Cue2223=Set Item 210 Icon Serial -InputList3SigType2223=Serial -InputList3Cue2224=Set Item 211 Icon Serial -InputList3SigType2224=Serial -InputList3Cue2225=Set Item 212 Icon Serial -InputList3SigType2225=Serial -InputList3Cue2226=Set Item 213 Icon Serial -InputList3SigType2226=Serial -InputList3Cue2227=Set Item 214 Icon Serial -InputList3SigType2227=Serial -InputList3Cue2228=Set Item 215 Icon Serial -InputList3SigType2228=Serial -InputList3Cue2229=Set Item 216 Icon Serial -InputList3SigType2229=Serial -InputList3Cue2230=Set Item 217 Icon Serial -InputList3SigType2230=Serial -InputList3Cue2231=Set Item 218 Icon Serial -InputList3SigType2231=Serial -InputList3Cue2232=Set Item 219 Icon Serial -InputList3SigType2232=Serial -InputList3Cue2233=Set Item 220 Icon Serial -InputList3SigType2233=Serial -InputList3Cue2234=Set Item 221 Icon Serial -InputList3SigType2234=Serial -InputList3Cue2235=Set Item 222 Icon Serial -InputList3SigType2235=Serial -InputList3Cue2236=Set Item 223 Icon Serial -InputList3SigType2236=Serial -InputList3Cue2237=Set Item 224 Icon Serial -InputList3SigType2237=Serial -InputList3Cue2238=Set Item 225 Icon Serial -InputList3SigType2238=Serial -InputList3Cue2239=Set Item 226 Icon Serial -InputList3SigType2239=Serial -InputList3Cue2240=Set Item 227 Icon Serial -InputList3SigType2240=Serial -InputList3Cue2241=Set Item 228 Icon Serial -InputList3SigType2241=Serial -InputList3Cue2242=Set Item 229 Icon Serial -InputList3SigType2242=Serial -InputList3Cue2243=Set Item 230 Icon Serial -InputList3SigType2243=Serial -InputList3Cue2244=Set Item 231 Icon Serial -InputList3SigType2244=Serial -InputList3Cue2245=Set Item 232 Icon Serial -InputList3SigType2245=Serial -InputList3Cue2246=Set Item 233 Icon Serial -InputList3SigType2246=Serial -InputList3Cue2247=Set Item 234 Icon Serial -InputList3SigType2247=Serial -InputList3Cue2248=Set Item 235 Icon Serial -InputList3SigType2248=Serial -InputList3Cue2249=Set Item 236 Icon Serial -InputList3SigType2249=Serial -InputList3Cue2250=Set Item 237 Icon Serial -InputList3SigType2250=Serial -InputList3Cue2251=Set Item 238 Icon Serial -InputList3SigType2251=Serial -InputList3Cue2252=Set Item 239 Icon Serial -InputList3SigType2252=Serial -InputList3Cue2253=Set Item 240 Icon Serial -InputList3SigType2253=Serial -InputList3Cue2254=Set Item 241 Icon Serial -InputList3SigType2254=Serial -InputList3Cue2255=Set Item 242 Icon Serial -InputList3SigType2255=Serial -InputList3Cue2256=Set Item 243 Icon Serial -InputList3SigType2256=Serial -InputList3Cue2257=Set Item 244 Icon Serial -InputList3SigType2257=Serial -InputList3Cue2258=Set Item 245 Icon Serial -InputList3SigType2258=Serial -InputList3Cue2259=Set Item 246 Icon Serial -InputList3SigType2259=Serial -InputList3Cue2260=Set Item 247 Icon Serial -InputList3SigType2260=Serial -InputList3Cue2261=Set Item 248 Icon Serial -InputList3SigType2261=Serial -InputList3Cue2262=Set Item 249 Icon Serial -InputList3SigType2262=Serial -InputList3Cue2263=Set Item 250 Icon Serial -InputList3SigType2263=Serial -InputList3Cue2264=Set Item 251 Icon Serial -InputList3SigType2264=Serial -InputList3Cue2265=Set Item 252 Icon Serial -InputList3SigType2265=Serial -InputList3Cue2266=Set Item 253 Icon Serial -InputList3SigType2266=Serial -InputList3Cue2267=Set Item 254 Icon Serial -InputList3SigType2267=Serial -InputList3Cue2268=Set Item 255 Icon Serial -InputList3SigType2268=Serial -InputList3Cue2269=[~UNUSED2~] -InputList3SigType2269=Digital|Analog|Serial|String -InputList3Cue4014=[~EndGroup~]Item Icons -InputList3SigType4014=Serial -OutputList3Cue1=[~UNUSED2~] -OutputList3SigType1=Serial -OutputList3Cue2=[~UNUSED2~] -OutputList3SigType2=Serial -OutputList3Cue3=[~UNUSED2~] -OutputList3SigType3=Serial -OutputList3Cue4=[~UNUSED2~] -OutputList3SigType4=Serial -OutputList3Cue5=[~UNUSED2~] -OutputList3SigType5=Serial -OutputList3Cue6=[~UNUSED2~] -OutputList3SigType6=Serial -OutputList3Cue7=[~UNUSED2~] -OutputList3SigType7=Serial -OutputList3Cue8=[~UNUSED2~] -OutputList3SigType8=Serial -OutputList3Cue9=[~UNUSED2~] -OutputList3SigType9=Serial -OutputList3Cue10=[~UNUSED2~] -OutputList3SigType10=Serial -OutputList3Cue11=[~BeginGroup~]Item Texts -OutputList3SigType11=Serial -OutputList3Cue12=[~UNUSED3~] -OutputList3SigType12=Serial -OutputList3Cue13=[~UNUSED3~] -OutputList3SigType13=Serial -OutputList3Cue14=[~UNUSED3~] -OutputList3SigType14=Serial -OutputList3Cue15=[~UNUSED3~] -OutputList3SigType15=Serial -OutputList3Cue16=[~UNUSED3~] -OutputList3SigType16=Serial -OutputList3Cue17=[~UNUSED3~] -OutputList3SigType17=Serial -OutputList3Cue18=[~UNUSED3~] -OutputList3SigType18=Serial -OutputList3Cue19=[~UNUSED3~] -OutputList3SigType19=Serial -OutputList3Cue20=[~UNUSED3~] -OutputList3SigType20=Serial -OutputList3Cue21=[~UNUSED3~] -OutputList3SigType21=Serial -OutputList3Cue22=[~UNUSED3~] -OutputList3SigType22=Serial -OutputList3Cue23=[~UNUSED3~] -OutputList3SigType23=Serial -OutputList3Cue24=[~UNUSED3~] -OutputList3SigType24=Serial -OutputList3Cue25=[~UNUSED3~] -OutputList3SigType25=Serial -OutputList3Cue26=[~UNUSED3~] -OutputList3SigType26=Serial -OutputList3Cue27=[~UNUSED3~] -OutputList3SigType27=Serial -OutputList3Cue28=[~UNUSED3~] -OutputList3SigType28=Serial -OutputList3Cue29=[~UNUSED3~] -OutputList3SigType29=Serial -OutputList3Cue30=[~UNUSED3~] -OutputList3SigType30=Serial -OutputList3Cue31=[~UNUSED3~] -OutputList3SigType31=Serial -OutputList3Cue32=[~UNUSED3~] -OutputList3SigType32=Serial -OutputList3Cue33=[~UNUSED3~] -OutputList3SigType33=Serial -OutputList3Cue34=[~UNUSED3~] -OutputList3SigType34=Serial -OutputList3Cue35=[~UNUSED3~] -OutputList3SigType35=Serial -OutputList3Cue36=[~UNUSED3~] -OutputList3SigType36=Serial -OutputList3Cue37=[~UNUSED3~] -OutputList3SigType37=Serial -OutputList3Cue38=[~UNUSED3~] -OutputList3SigType38=Serial -OutputList3Cue39=[~UNUSED3~] -OutputList3SigType39=Serial -OutputList3Cue40=[~UNUSED3~] -OutputList3SigType40=Serial -OutputList3Cue41=[~UNUSED3~] -OutputList3SigType41=Serial -OutputList3Cue42=[~UNUSED3~] -OutputList3SigType42=Serial -OutputList3Cue43=[~UNUSED3~] -OutputList3SigType43=Serial -OutputList3Cue44=[~UNUSED3~] -OutputList3SigType44=Serial -OutputList3Cue45=[~UNUSED3~] -OutputList3SigType45=Serial -OutputList3Cue46=[~UNUSED3~] -OutputList3SigType46=Serial -OutputList3Cue47=[~UNUSED3~] -OutputList3SigType47=Serial -OutputList3Cue48=[~UNUSED3~] -OutputList3SigType48=Serial -OutputList3Cue49=[~UNUSED3~] -OutputList3SigType49=Serial -OutputList3Cue50=[~UNUSED3~] -OutputList3SigType50=Serial -OutputList3Cue51=[~UNUSED3~] -OutputList3SigType51=Serial -OutputList3Cue52=[~UNUSED3~] -OutputList3SigType52=Serial -OutputList3Cue53=[~UNUSED3~] -OutputList3SigType53=Serial -OutputList3Cue54=[~UNUSED3~] -OutputList3SigType54=Serial -OutputList3Cue55=[~UNUSED3~] -OutputList3SigType55=Serial -OutputList3Cue56=[~UNUSED3~] -OutputList3SigType56=Serial -OutputList3Cue57=[~UNUSED3~] -OutputList3SigType57=Serial -OutputList3Cue58=[~UNUSED3~] -OutputList3SigType58=Serial -OutputList3Cue59=[~UNUSED3~] -OutputList3SigType59=Serial -OutputList3Cue60=[~UNUSED3~] -OutputList3SigType60=Serial -OutputList3Cue61=[~UNUSED3~] -OutputList3SigType61=Serial -OutputList3Cue62=[~UNUSED3~] -OutputList3SigType62=Serial -OutputList3Cue63=[~UNUSED3~] -OutputList3SigType63=Serial -OutputList3Cue64=[~UNUSED3~] -OutputList3SigType64=Serial -OutputList3Cue65=[~UNUSED3~] -OutputList3SigType65=Serial -OutputList3Cue66=[~UNUSED3~] -OutputList3SigType66=Serial -OutputList3Cue67=[~UNUSED3~] -OutputList3SigType67=Serial -OutputList3Cue68=[~UNUSED3~] -OutputList3SigType68=Serial -OutputList3Cue69=[~UNUSED3~] -OutputList3SigType69=Serial -OutputList3Cue70=[~UNUSED3~] -OutputList3SigType70=Serial -OutputList3Cue71=[~UNUSED3~] -OutputList3SigType71=Serial -OutputList3Cue72=[~UNUSED3~] -OutputList3SigType72=Serial -OutputList3Cue73=[~UNUSED3~] -OutputList3SigType73=Serial -OutputList3Cue74=[~UNUSED3~] -OutputList3SigType74=Serial -OutputList3Cue75=[~UNUSED3~] -OutputList3SigType75=Serial -OutputList3Cue76=[~UNUSED3~] -OutputList3SigType76=Serial -OutputList3Cue77=[~UNUSED3~] -OutputList3SigType77=Serial -OutputList3Cue78=[~UNUSED3~] -OutputList3SigType78=Serial -OutputList3Cue79=[~UNUSED3~] -OutputList3SigType79=Serial -OutputList3Cue80=[~UNUSED3~] -OutputList3SigType80=Serial -OutputList3Cue81=[~UNUSED3~] -OutputList3SigType81=Serial -OutputList3Cue82=[~UNUSED3~] -OutputList3SigType82=Serial -OutputList3Cue83=[~UNUSED3~] -OutputList3SigType83=Serial -OutputList3Cue84=[~UNUSED3~] -OutputList3SigType84=Serial -OutputList3Cue85=[~UNUSED3~] -OutputList3SigType85=Serial -OutputList3Cue86=[~UNUSED3~] -OutputList3SigType86=Serial -OutputList3Cue87=[~UNUSED3~] -OutputList3SigType87=Serial -OutputList3Cue88=[~UNUSED3~] -OutputList3SigType88=Serial -OutputList3Cue89=[~UNUSED3~] -OutputList3SigType89=Serial -OutputList3Cue90=[~UNUSED3~] -OutputList3SigType90=Serial -OutputList3Cue91=[~UNUSED3~] -OutputList3SigType91=Serial -OutputList3Cue92=[~UNUSED3~] -OutputList3SigType92=Serial -OutputList3Cue93=[~UNUSED3~] -OutputList3SigType93=Serial -OutputList3Cue94=[~UNUSED3~] -OutputList3SigType94=Serial -OutputList3Cue95=[~UNUSED3~] -OutputList3SigType95=Serial -OutputList3Cue96=[~UNUSED3~] -OutputList3SigType96=Serial -OutputList3Cue97=[~UNUSED3~] -OutputList3SigType97=Serial -OutputList3Cue98=[~UNUSED3~] -OutputList3SigType98=Serial -OutputList3Cue99=[~UNUSED3~] -OutputList3SigType99=Serial -OutputList3Cue100=[~UNUSED3~] -OutputList3SigType100=Serial -OutputList3Cue101=[~UNUSED3~] -OutputList3SigType101=Serial -OutputList3Cue102=[~UNUSED3~] -OutputList3SigType102=Serial -OutputList3Cue103=[~UNUSED3~] -OutputList3SigType103=Serial -OutputList3Cue104=[~UNUSED3~] -OutputList3SigType104=Serial -OutputList3Cue105=[~UNUSED3~] -OutputList3SigType105=Serial -OutputList3Cue106=[~UNUSED3~] -OutputList3SigType106=Serial -OutputList3Cue107=[~UNUSED3~] -OutputList3SigType107=Serial -OutputList3Cue108=[~UNUSED3~] -OutputList3SigType108=Serial -OutputList3Cue109=[~UNUSED3~] -OutputList3SigType109=Serial -OutputList3Cue110=[~UNUSED3~] -OutputList3SigType110=Serial -OutputList3Cue111=[~UNUSED3~] -OutputList3SigType111=Serial -OutputList3Cue112=[~UNUSED3~] -OutputList3SigType112=Serial -OutputList3Cue113=[~UNUSED3~] -OutputList3SigType113=Serial -OutputList3Cue114=[~UNUSED3~] -OutputList3SigType114=Serial -OutputList3Cue115=[~UNUSED3~] -OutputList3SigType115=Serial -OutputList3Cue116=[~UNUSED3~] -OutputList3SigType116=Serial -OutputList3Cue117=[~UNUSED3~] -OutputList3SigType117=Serial -OutputList3Cue118=[~UNUSED3~] -OutputList3SigType118=Serial -OutputList3Cue119=[~UNUSED3~] -OutputList3SigType119=Serial -OutputList3Cue120=[~UNUSED3~] -OutputList3SigType120=Serial -OutputList3Cue121=[~UNUSED3~] -OutputList3SigType121=Serial -OutputList3Cue122=[~UNUSED3~] -OutputList3SigType122=Serial -OutputList3Cue123=[~UNUSED3~] -OutputList3SigType123=Serial -OutputList3Cue124=[~UNUSED3~] -OutputList3SigType124=Serial -OutputList3Cue125=[~UNUSED3~] -OutputList3SigType125=Serial -OutputList3Cue126=[~UNUSED3~] -OutputList3SigType126=Serial -OutputList3Cue127=[~UNUSED3~] -OutputList3SigType127=Serial -OutputList3Cue128=[~UNUSED3~] -OutputList3SigType128=Serial -OutputList3Cue129=[~UNUSED3~] -OutputList3SigType129=Serial -OutputList3Cue130=[~UNUSED3~] -OutputList3SigType130=Serial -OutputList3Cue131=[~UNUSED3~] -OutputList3SigType131=Serial -OutputList3Cue132=[~UNUSED3~] -OutputList3SigType132=Serial -OutputList3Cue133=[~UNUSED3~] -OutputList3SigType133=Serial -OutputList3Cue134=[~UNUSED3~] -OutputList3SigType134=Serial -OutputList3Cue135=[~UNUSED3~] -OutputList3SigType135=Serial -OutputList3Cue136=[~UNUSED3~] -OutputList3SigType136=Serial -OutputList3Cue137=[~UNUSED3~] -OutputList3SigType137=Serial -OutputList3Cue138=[~UNUSED3~] -OutputList3SigType138=Serial -OutputList3Cue139=[~UNUSED3~] -OutputList3SigType139=Serial -OutputList3Cue140=[~UNUSED3~] -OutputList3SigType140=Serial -OutputList3Cue141=[~UNUSED3~] -OutputList3SigType141=Serial -OutputList3Cue142=[~UNUSED3~] -OutputList3SigType142=Serial -OutputList3Cue143=[~UNUSED3~] -OutputList3SigType143=Serial -OutputList3Cue144=[~UNUSED3~] -OutputList3SigType144=Serial -OutputList3Cue145=[~UNUSED3~] -OutputList3SigType145=Serial -OutputList3Cue146=[~UNUSED3~] -OutputList3SigType146=Serial -OutputList3Cue147=[~UNUSED3~] -OutputList3SigType147=Serial -OutputList3Cue148=[~UNUSED3~] -OutputList3SigType148=Serial -OutputList3Cue149=[~UNUSED3~] -OutputList3SigType149=Serial -OutputList3Cue150=[~UNUSED3~] -OutputList3SigType150=Serial -OutputList3Cue151=[~UNUSED3~] -OutputList3SigType151=Serial -OutputList3Cue152=[~UNUSED3~] -OutputList3SigType152=Serial -OutputList3Cue153=[~UNUSED3~] -OutputList3SigType153=Serial -OutputList3Cue154=[~UNUSED3~] -OutputList3SigType154=Serial -OutputList3Cue155=[~UNUSED3~] -OutputList3SigType155=Serial -OutputList3Cue156=[~UNUSED3~] -OutputList3SigType156=Serial -OutputList3Cue157=[~UNUSED3~] -OutputList3SigType157=Serial -OutputList3Cue158=[~UNUSED3~] -OutputList3SigType158=Serial -OutputList3Cue159=[~UNUSED3~] -OutputList3SigType159=Serial -OutputList3Cue160=[~UNUSED3~] -OutputList3SigType160=Serial -OutputList3Cue161=[~UNUSED3~] -OutputList3SigType161=Serial -OutputList3Cue162=[~UNUSED3~] -OutputList3SigType162=Serial -OutputList3Cue163=[~UNUSED3~] -OutputList3SigType163=Serial -OutputList3Cue164=[~UNUSED3~] -OutputList3SigType164=Serial -OutputList3Cue165=[~UNUSED3~] -OutputList3SigType165=Serial -OutputList3Cue166=[~UNUSED3~] -OutputList3SigType166=Serial -OutputList3Cue167=[~UNUSED3~] -OutputList3SigType167=Serial -OutputList3Cue168=[~UNUSED3~] -OutputList3SigType168=Serial -OutputList3Cue169=[~UNUSED3~] -OutputList3SigType169=Serial -OutputList3Cue170=[~UNUSED3~] -OutputList3SigType170=Serial -OutputList3Cue171=[~UNUSED3~] -OutputList3SigType171=Serial -OutputList3Cue172=[~UNUSED3~] -OutputList3SigType172=Serial -OutputList3Cue173=[~UNUSED3~] -OutputList3SigType173=Serial -OutputList3Cue174=[~UNUSED3~] -OutputList3SigType174=Serial -OutputList3Cue175=[~UNUSED3~] -OutputList3SigType175=Serial -OutputList3Cue176=[~UNUSED3~] -OutputList3SigType176=Serial -OutputList3Cue177=[~UNUSED3~] -OutputList3SigType177=Serial -OutputList3Cue178=[~UNUSED3~] -OutputList3SigType178=Serial -OutputList3Cue179=[~UNUSED3~] -OutputList3SigType179=Serial -OutputList3Cue180=[~UNUSED3~] -OutputList3SigType180=Serial -OutputList3Cue181=[~UNUSED3~] -OutputList3SigType181=Serial -OutputList3Cue182=[~UNUSED3~] -OutputList3SigType182=Serial -OutputList3Cue183=[~UNUSED3~] -OutputList3SigType183=Serial -OutputList3Cue184=[~UNUSED3~] -OutputList3SigType184=Serial -OutputList3Cue185=[~UNUSED3~] -OutputList3SigType185=Serial -OutputList3Cue186=[~UNUSED3~] -OutputList3SigType186=Serial -OutputList3Cue187=[~UNUSED3~] -OutputList3SigType187=Serial -OutputList3Cue188=[~UNUSED3~] -OutputList3SigType188=Serial -OutputList3Cue189=[~UNUSED3~] -OutputList3SigType189=Serial -OutputList3Cue190=[~UNUSED3~] -OutputList3SigType190=Serial -OutputList3Cue191=[~UNUSED3~] -OutputList3SigType191=Serial -OutputList3Cue192=[~UNUSED3~] -OutputList3SigType192=Serial -OutputList3Cue193=[~UNUSED3~] -OutputList3SigType193=Serial -OutputList3Cue194=[~UNUSED3~] -OutputList3SigType194=Serial -OutputList3Cue195=[~UNUSED3~] -OutputList3SigType195=Serial -OutputList3Cue196=[~UNUSED3~] -OutputList3SigType196=Serial -OutputList3Cue197=[~UNUSED3~] -OutputList3SigType197=Serial -OutputList3Cue198=[~UNUSED3~] -OutputList3SigType198=Serial -OutputList3Cue199=[~UNUSED3~] -OutputList3SigType199=Serial -OutputList3Cue200=[~UNUSED3~] -OutputList3SigType200=Serial -OutputList3Cue201=[~UNUSED3~] -OutputList3SigType201=Serial -OutputList3Cue202=[~UNUSED3~] -OutputList3SigType202=Serial -OutputList3Cue203=[~UNUSED3~] -OutputList3SigType203=Serial -OutputList3Cue204=[~UNUSED3~] -OutputList3SigType204=Serial -OutputList3Cue205=[~UNUSED3~] -OutputList3SigType205=Serial -OutputList3Cue206=[~UNUSED3~] -OutputList3SigType206=Serial -OutputList3Cue207=[~UNUSED3~] -OutputList3SigType207=Serial -OutputList3Cue208=[~UNUSED3~] -OutputList3SigType208=Serial -OutputList3Cue209=[~UNUSED3~] -OutputList3SigType209=Serial -OutputList3Cue210=[~UNUSED3~] -OutputList3SigType210=Serial -OutputList3Cue211=[~UNUSED3~] -OutputList3SigType211=Serial -OutputList3Cue212=[~UNUSED3~] -OutputList3SigType212=Serial -OutputList3Cue213=[~UNUSED3~] -OutputList3SigType213=Serial -OutputList3Cue214=[~UNUSED3~] -OutputList3SigType214=Serial -OutputList3Cue215=[~UNUSED3~] -OutputList3SigType215=Serial -OutputList3Cue216=[~UNUSED3~] -OutputList3SigType216=Serial -OutputList3Cue217=[~UNUSED3~] -OutputList3SigType217=Serial -OutputList3Cue218=[~UNUSED3~] -OutputList3SigType218=Serial -OutputList3Cue219=[~UNUSED3~] -OutputList3SigType219=Serial -OutputList3Cue220=[~UNUSED3~] -OutputList3SigType220=Serial -OutputList3Cue221=[~UNUSED3~] -OutputList3SigType221=Serial -OutputList3Cue222=[~UNUSED3~] -OutputList3SigType222=Serial -OutputList3Cue223=[~UNUSED3~] -OutputList3SigType223=Serial -OutputList3Cue224=[~UNUSED3~] -OutputList3SigType224=Serial -OutputList3Cue225=[~UNUSED3~] -OutputList3SigType225=Serial -OutputList3Cue226=[~UNUSED3~] -OutputList3SigType226=Serial -OutputList3Cue227=[~UNUSED3~] -OutputList3SigType227=Serial -OutputList3Cue228=[~UNUSED3~] -OutputList3SigType228=Serial -OutputList3Cue229=[~UNUSED3~] -OutputList3SigType229=Serial -OutputList3Cue230=[~UNUSED3~] -OutputList3SigType230=Serial -OutputList3Cue231=[~UNUSED3~] -OutputList3SigType231=Serial -OutputList3Cue232=[~UNUSED3~] -OutputList3SigType232=Serial -OutputList3Cue233=[~UNUSED3~] -OutputList3SigType233=Serial -OutputList3Cue234=[~UNUSED3~] -OutputList3SigType234=Serial -OutputList3Cue235=[~UNUSED3~] -OutputList3SigType235=Serial -OutputList3Cue236=[~UNUSED3~] -OutputList3SigType236=Serial -OutputList3Cue237=[~UNUSED3~] -OutputList3SigType237=Serial -OutputList3Cue238=[~UNUSED3~] -OutputList3SigType238=Serial -OutputList3Cue239=[~UNUSED3~] -OutputList3SigType239=Serial -OutputList3Cue240=[~UNUSED3~] -OutputList3SigType240=Serial -OutputList3Cue241=[~UNUSED3~] -OutputList3SigType241=Serial -OutputList3Cue242=[~UNUSED3~] -OutputList3SigType242=Serial -OutputList3Cue243=[~UNUSED3~] -OutputList3SigType243=Serial -OutputList3Cue244=[~UNUSED3~] -OutputList3SigType244=Serial -OutputList3Cue245=[~UNUSED3~] -OutputList3SigType245=Serial -OutputList3Cue246=[~UNUSED3~] -OutputList3SigType246=Serial -OutputList3Cue247=[~UNUSED3~] -OutputList3SigType247=Serial -OutputList3Cue248=[~UNUSED3~] -OutputList3SigType248=Serial -OutputList3Cue249=[~UNUSED3~] -OutputList3SigType249=Serial -OutputList3Cue250=[~UNUSED3~] -OutputList3SigType250=Serial -OutputList3Cue251=[~UNUSED3~] -OutputList3SigType251=Serial -OutputList3Cue252=[~UNUSED3~] -OutputList3SigType252=Serial -OutputList3Cue253=[~UNUSED3~] -OutputList3SigType253=Serial -OutputList3Cue254=[~UNUSED3~] -OutputList3SigType254=Serial -OutputList3Cue255=[~UNUSED3~] -OutputList3SigType255=Serial -OutputList3Cue256=[~UNUSED3~] -OutputList3SigType256=Serial -OutputList3Cue257=[~UNUSED3~] -OutputList3SigType257=Serial -OutputList3Cue258=[~UNUSED3~] -OutputList3SigType258=Serial -OutputList3Cue259=[~UNUSED3~] -OutputList3SigType259=Serial -OutputList3Cue260=[~UNUSED3~] -OutputList3SigType260=Serial -OutputList3Cue261=[~UNUSED3~] -OutputList3SigType261=Serial -OutputList3Cue262=[~UNUSED3~] -OutputList3SigType262=Serial -OutputList3Cue263=[~UNUSED3~] -OutputList3SigType263=Serial -OutputList3Cue264=[~UNUSED3~] -OutputList3SigType264=Serial -OutputList3Cue265=[~UNUSED3~] -OutputList3SigType265=Serial -OutputList3Cue266=[~UNUSED3~] -OutputList3SigType266=Serial -OutputList3Cue267=[~UNUSED2~] -OutputList3SigType267=Digital|Analog|Serial|String -OutputList3Cue2012=[~EndGroup~]Item Texts -OutputList3SigType2012=Serial -OutputList3Cue2013=[~BeginGroup~]Item Icons -OutputList3SigType2013=Serial -OutputList3Cue2014=[~UNUSED3~] -OutputList3SigType2014=Serial -OutputList3Cue2015=[~UNUSED3~] -OutputList3SigType2015=Serial -OutputList3Cue2016=[~UNUSED3~] -OutputList3SigType2016=Serial -OutputList3Cue2017=[~UNUSED3~] -OutputList3SigType2017=Serial -OutputList3Cue2018=[~UNUSED3~] -OutputList3SigType2018=Serial -OutputList3Cue2019=[~UNUSED3~] -OutputList3SigType2019=Serial -OutputList3Cue2020=[~UNUSED3~] -OutputList3SigType2020=Serial -OutputList3Cue2021=[~UNUSED3~] -OutputList3SigType2021=Serial -OutputList3Cue2022=[~UNUSED3~] -OutputList3SigType2022=Serial -OutputList3Cue2023=[~UNUSED3~] -OutputList3SigType2023=Serial -OutputList3Cue2024=[~UNUSED3~] -OutputList3SigType2024=Serial -OutputList3Cue2025=[~UNUSED3~] -OutputList3SigType2025=Serial -OutputList3Cue2026=[~UNUSED3~] -OutputList3SigType2026=Serial -OutputList3Cue2027=[~UNUSED3~] -OutputList3SigType2027=Serial -OutputList3Cue2028=[~UNUSED3~] -OutputList3SigType2028=Serial -OutputList3Cue2029=[~UNUSED3~] -OutputList3SigType2029=Serial -OutputList3Cue2030=[~UNUSED3~] -OutputList3SigType2030=Serial -OutputList3Cue2031=[~UNUSED3~] -OutputList3SigType2031=Serial -OutputList3Cue2032=[~UNUSED3~] -OutputList3SigType2032=Serial -OutputList3Cue2033=[~UNUSED3~] -OutputList3SigType2033=Serial -OutputList3Cue2034=[~UNUSED3~] -OutputList3SigType2034=Serial -OutputList3Cue2035=[~UNUSED3~] -OutputList3SigType2035=Serial -OutputList3Cue2036=[~UNUSED3~] -OutputList3SigType2036=Serial -OutputList3Cue2037=[~UNUSED3~] -OutputList3SigType2037=Serial -OutputList3Cue2038=[~UNUSED3~] -OutputList3SigType2038=Serial -OutputList3Cue2039=[~UNUSED3~] -OutputList3SigType2039=Serial -OutputList3Cue2040=[~UNUSED3~] -OutputList3SigType2040=Serial -OutputList3Cue2041=[~UNUSED3~] -OutputList3SigType2041=Serial -OutputList3Cue2042=[~UNUSED3~] -OutputList3SigType2042=Serial -OutputList3Cue2043=[~UNUSED3~] -OutputList3SigType2043=Serial -OutputList3Cue2044=[~UNUSED3~] -OutputList3SigType2044=Serial -OutputList3Cue2045=[~UNUSED3~] -OutputList3SigType2045=Serial -OutputList3Cue2046=[~UNUSED3~] -OutputList3SigType2046=Serial -OutputList3Cue2047=[~UNUSED3~] -OutputList3SigType2047=Serial -OutputList3Cue2048=[~UNUSED3~] -OutputList3SigType2048=Serial -OutputList3Cue2049=[~UNUSED3~] -OutputList3SigType2049=Serial -OutputList3Cue2050=[~UNUSED3~] -OutputList3SigType2050=Serial -OutputList3Cue2051=[~UNUSED3~] -OutputList3SigType2051=Serial -OutputList3Cue2052=[~UNUSED3~] -OutputList3SigType2052=Serial -OutputList3Cue2053=[~UNUSED3~] -OutputList3SigType2053=Serial -OutputList3Cue2054=[~UNUSED3~] -OutputList3SigType2054=Serial -OutputList3Cue2055=[~UNUSED3~] -OutputList3SigType2055=Serial -OutputList3Cue2056=[~UNUSED3~] -OutputList3SigType2056=Serial -OutputList3Cue2057=[~UNUSED3~] -OutputList3SigType2057=Serial -OutputList3Cue2058=[~UNUSED3~] -OutputList3SigType2058=Serial -OutputList3Cue2059=[~UNUSED3~] -OutputList3SigType2059=Serial -OutputList3Cue2060=[~UNUSED3~] -OutputList3SigType2060=Serial -OutputList3Cue2061=[~UNUSED3~] -OutputList3SigType2061=Serial -OutputList3Cue2062=[~UNUSED3~] -OutputList3SigType2062=Serial -OutputList3Cue2063=[~UNUSED3~] -OutputList3SigType2063=Serial -OutputList3Cue2064=[~UNUSED3~] -OutputList3SigType2064=Serial -OutputList3Cue2065=[~UNUSED3~] -OutputList3SigType2065=Serial -OutputList3Cue2066=[~UNUSED3~] -OutputList3SigType2066=Serial -OutputList3Cue2067=[~UNUSED3~] -OutputList3SigType2067=Serial -OutputList3Cue2068=[~UNUSED3~] -OutputList3SigType2068=Serial -OutputList3Cue2069=[~UNUSED3~] -OutputList3SigType2069=Serial -OutputList3Cue2070=[~UNUSED3~] -OutputList3SigType2070=Serial -OutputList3Cue2071=[~UNUSED3~] -OutputList3SigType2071=Serial -OutputList3Cue2072=[~UNUSED3~] -OutputList3SigType2072=Serial -OutputList3Cue2073=[~UNUSED3~] -OutputList3SigType2073=Serial -OutputList3Cue2074=[~UNUSED3~] -OutputList3SigType2074=Serial -OutputList3Cue2075=[~UNUSED3~] -OutputList3SigType2075=Serial -OutputList3Cue2076=[~UNUSED3~] -OutputList3SigType2076=Serial -OutputList3Cue2077=[~UNUSED3~] -OutputList3SigType2077=Serial -OutputList3Cue2078=[~UNUSED3~] -OutputList3SigType2078=Serial -OutputList3Cue2079=[~UNUSED3~] -OutputList3SigType2079=Serial -OutputList3Cue2080=[~UNUSED3~] -OutputList3SigType2080=Serial -OutputList3Cue2081=[~UNUSED3~] -OutputList3SigType2081=Serial -OutputList3Cue2082=[~UNUSED3~] -OutputList3SigType2082=Serial -OutputList3Cue2083=[~UNUSED3~] -OutputList3SigType2083=Serial -OutputList3Cue2084=[~UNUSED3~] -OutputList3SigType2084=Serial -OutputList3Cue2085=[~UNUSED3~] -OutputList3SigType2085=Serial -OutputList3Cue2086=[~UNUSED3~] -OutputList3SigType2086=Serial -OutputList3Cue2087=[~UNUSED3~] -OutputList3SigType2087=Serial -OutputList3Cue2088=[~UNUSED3~] -OutputList3SigType2088=Serial -OutputList3Cue2089=[~UNUSED3~] -OutputList3SigType2089=Serial -OutputList3Cue2090=[~UNUSED3~] -OutputList3SigType2090=Serial -OutputList3Cue2091=[~UNUSED3~] -OutputList3SigType2091=Serial -OutputList3Cue2092=[~UNUSED3~] -OutputList3SigType2092=Serial -OutputList3Cue2093=[~UNUSED3~] -OutputList3SigType2093=Serial -OutputList3Cue2094=[~UNUSED3~] -OutputList3SigType2094=Serial -OutputList3Cue2095=[~UNUSED3~] -OutputList3SigType2095=Serial -OutputList3Cue2096=[~UNUSED3~] -OutputList3SigType2096=Serial -OutputList3Cue2097=[~UNUSED3~] -OutputList3SigType2097=Serial -OutputList3Cue2098=[~UNUSED3~] -OutputList3SigType2098=Serial -OutputList3Cue2099=[~UNUSED3~] -OutputList3SigType2099=Serial -OutputList3Cue2100=[~UNUSED3~] -OutputList3SigType2100=Serial -OutputList3Cue2101=[~UNUSED3~] -OutputList3SigType2101=Serial -OutputList3Cue2102=[~UNUSED3~] -OutputList3SigType2102=Serial -OutputList3Cue2103=[~UNUSED3~] -OutputList3SigType2103=Serial -OutputList3Cue2104=[~UNUSED3~] -OutputList3SigType2104=Serial -OutputList3Cue2105=[~UNUSED3~] -OutputList3SigType2105=Serial -OutputList3Cue2106=[~UNUSED3~] -OutputList3SigType2106=Serial -OutputList3Cue2107=[~UNUSED3~] -OutputList3SigType2107=Serial -OutputList3Cue2108=[~UNUSED3~] -OutputList3SigType2108=Serial -OutputList3Cue2109=[~UNUSED3~] -OutputList3SigType2109=Serial -OutputList3Cue2110=[~UNUSED3~] -OutputList3SigType2110=Serial -OutputList3Cue2111=[~UNUSED3~] -OutputList3SigType2111=Serial -OutputList3Cue2112=[~UNUSED3~] -OutputList3SigType2112=Serial -OutputList3Cue2113=[~UNUSED3~] -OutputList3SigType2113=Serial -OutputList3Cue2114=[~UNUSED3~] -OutputList3SigType2114=Serial -OutputList3Cue2115=[~UNUSED3~] -OutputList3SigType2115=Serial -OutputList3Cue2116=[~UNUSED3~] -OutputList3SigType2116=Serial -OutputList3Cue2117=[~UNUSED3~] -OutputList3SigType2117=Serial -OutputList3Cue2118=[~UNUSED3~] -OutputList3SigType2118=Serial -OutputList3Cue2119=[~UNUSED3~] -OutputList3SigType2119=Serial -OutputList3Cue2120=[~UNUSED3~] -OutputList3SigType2120=Serial -OutputList3Cue2121=[~UNUSED3~] -OutputList3SigType2121=Serial -OutputList3Cue2122=[~UNUSED3~] -OutputList3SigType2122=Serial -OutputList3Cue2123=[~UNUSED3~] -OutputList3SigType2123=Serial -OutputList3Cue2124=[~UNUSED3~] -OutputList3SigType2124=Serial -OutputList3Cue2125=[~UNUSED3~] -OutputList3SigType2125=Serial -OutputList3Cue2126=[~UNUSED3~] -OutputList3SigType2126=Serial -OutputList3Cue2127=[~UNUSED3~] -OutputList3SigType2127=Serial -OutputList3Cue2128=[~UNUSED3~] -OutputList3SigType2128=Serial -OutputList3Cue2129=[~UNUSED3~] -OutputList3SigType2129=Serial -OutputList3Cue2130=[~UNUSED3~] -OutputList3SigType2130=Serial -OutputList3Cue2131=[~UNUSED3~] -OutputList3SigType2131=Serial -OutputList3Cue2132=[~UNUSED3~] -OutputList3SigType2132=Serial -OutputList3Cue2133=[~UNUSED3~] -OutputList3SigType2133=Serial -OutputList3Cue2134=[~UNUSED3~] -OutputList3SigType2134=Serial -OutputList3Cue2135=[~UNUSED3~] -OutputList3SigType2135=Serial -OutputList3Cue2136=[~UNUSED3~] -OutputList3SigType2136=Serial -OutputList3Cue2137=[~UNUSED3~] -OutputList3SigType2137=Serial -OutputList3Cue2138=[~UNUSED3~] -OutputList3SigType2138=Serial -OutputList3Cue2139=[~UNUSED3~] -OutputList3SigType2139=Serial -OutputList3Cue2140=[~UNUSED3~] -OutputList3SigType2140=Serial -OutputList3Cue2141=[~UNUSED3~] -OutputList3SigType2141=Serial -OutputList3Cue2142=[~UNUSED3~] -OutputList3SigType2142=Serial -OutputList3Cue2143=[~UNUSED3~] -OutputList3SigType2143=Serial -OutputList3Cue2144=[~UNUSED3~] -OutputList3SigType2144=Serial -OutputList3Cue2145=[~UNUSED3~] -OutputList3SigType2145=Serial -OutputList3Cue2146=[~UNUSED3~] -OutputList3SigType2146=Serial -OutputList3Cue2147=[~UNUSED3~] -OutputList3SigType2147=Serial -OutputList3Cue2148=[~UNUSED3~] -OutputList3SigType2148=Serial -OutputList3Cue2149=[~UNUSED3~] -OutputList3SigType2149=Serial -OutputList3Cue2150=[~UNUSED3~] -OutputList3SigType2150=Serial -OutputList3Cue2151=[~UNUSED3~] -OutputList3SigType2151=Serial -OutputList3Cue2152=[~UNUSED3~] -OutputList3SigType2152=Serial -OutputList3Cue2153=[~UNUSED3~] -OutputList3SigType2153=Serial -OutputList3Cue2154=[~UNUSED3~] -OutputList3SigType2154=Serial -OutputList3Cue2155=[~UNUSED3~] -OutputList3SigType2155=Serial -OutputList3Cue2156=[~UNUSED3~] -OutputList3SigType2156=Serial -OutputList3Cue2157=[~UNUSED3~] -OutputList3SigType2157=Serial -OutputList3Cue2158=[~UNUSED3~] -OutputList3SigType2158=Serial -OutputList3Cue2159=[~UNUSED3~] -OutputList3SigType2159=Serial -OutputList3Cue2160=[~UNUSED3~] -OutputList3SigType2160=Serial -OutputList3Cue2161=[~UNUSED3~] -OutputList3SigType2161=Serial -OutputList3Cue2162=[~UNUSED3~] -OutputList3SigType2162=Serial -OutputList3Cue2163=[~UNUSED3~] -OutputList3SigType2163=Serial -OutputList3Cue2164=[~UNUSED3~] -OutputList3SigType2164=Serial -OutputList3Cue2165=[~UNUSED3~] -OutputList3SigType2165=Serial -OutputList3Cue2166=[~UNUSED3~] -OutputList3SigType2166=Serial -OutputList3Cue2167=[~UNUSED3~] -OutputList3SigType2167=Serial -OutputList3Cue2168=[~UNUSED3~] -OutputList3SigType2168=Serial -OutputList3Cue2169=[~UNUSED3~] -OutputList3SigType2169=Serial -OutputList3Cue2170=[~UNUSED3~] -OutputList3SigType2170=Serial -OutputList3Cue2171=[~UNUSED3~] -OutputList3SigType2171=Serial -OutputList3Cue2172=[~UNUSED3~] -OutputList3SigType2172=Serial -OutputList3Cue2173=[~UNUSED3~] -OutputList3SigType2173=Serial -OutputList3Cue2174=[~UNUSED3~] -OutputList3SigType2174=Serial -OutputList3Cue2175=[~UNUSED3~] -OutputList3SigType2175=Serial -OutputList3Cue2176=[~UNUSED3~] -OutputList3SigType2176=Serial -OutputList3Cue2177=[~UNUSED3~] -OutputList3SigType2177=Serial -OutputList3Cue2178=[~UNUSED3~] -OutputList3SigType2178=Serial -OutputList3Cue2179=[~UNUSED3~] -OutputList3SigType2179=Serial -OutputList3Cue2180=[~UNUSED3~] -OutputList3SigType2180=Serial -OutputList3Cue2181=[~UNUSED3~] -OutputList3SigType2181=Serial -OutputList3Cue2182=[~UNUSED3~] -OutputList3SigType2182=Serial -OutputList3Cue2183=[~UNUSED3~] -OutputList3SigType2183=Serial -OutputList3Cue2184=[~UNUSED3~] -OutputList3SigType2184=Serial -OutputList3Cue2185=[~UNUSED3~] -OutputList3SigType2185=Serial -OutputList3Cue2186=[~UNUSED3~] -OutputList3SigType2186=Serial -OutputList3Cue2187=[~UNUSED3~] -OutputList3SigType2187=Serial -OutputList3Cue2188=[~UNUSED3~] -OutputList3SigType2188=Serial -OutputList3Cue2189=[~UNUSED3~] -OutputList3SigType2189=Serial -OutputList3Cue2190=[~UNUSED3~] -OutputList3SigType2190=Serial -OutputList3Cue2191=[~UNUSED3~] -OutputList3SigType2191=Serial -OutputList3Cue2192=[~UNUSED3~] -OutputList3SigType2192=Serial -OutputList3Cue2193=[~UNUSED3~] -OutputList3SigType2193=Serial -OutputList3Cue2194=[~UNUSED3~] -OutputList3SigType2194=Serial -OutputList3Cue2195=[~UNUSED3~] -OutputList3SigType2195=Serial -OutputList3Cue2196=[~UNUSED3~] -OutputList3SigType2196=Serial -OutputList3Cue2197=[~UNUSED3~] -OutputList3SigType2197=Serial -OutputList3Cue2198=[~UNUSED3~] -OutputList3SigType2198=Serial -OutputList3Cue2199=[~UNUSED3~] -OutputList3SigType2199=Serial -OutputList3Cue2200=[~UNUSED3~] -OutputList3SigType2200=Serial -OutputList3Cue2201=[~UNUSED3~] -OutputList3SigType2201=Serial -OutputList3Cue2202=[~UNUSED3~] -OutputList3SigType2202=Serial -OutputList3Cue2203=[~UNUSED3~] -OutputList3SigType2203=Serial -OutputList3Cue2204=[~UNUSED3~] -OutputList3SigType2204=Serial -OutputList3Cue2205=[~UNUSED3~] -OutputList3SigType2205=Serial -OutputList3Cue2206=[~UNUSED3~] -OutputList3SigType2206=Serial -OutputList3Cue2207=[~UNUSED3~] -OutputList3SigType2207=Serial -OutputList3Cue2208=[~UNUSED3~] -OutputList3SigType2208=Serial -OutputList3Cue2209=[~UNUSED3~] -OutputList3SigType2209=Serial -OutputList3Cue2210=[~UNUSED3~] -OutputList3SigType2210=Serial -OutputList3Cue2211=[~UNUSED3~] -OutputList3SigType2211=Serial -OutputList3Cue2212=[~UNUSED3~] -OutputList3SigType2212=Serial -OutputList3Cue2213=[~UNUSED3~] -OutputList3SigType2213=Serial -OutputList3Cue2214=[~UNUSED3~] -OutputList3SigType2214=Serial -OutputList3Cue2215=[~UNUSED3~] -OutputList3SigType2215=Serial -OutputList3Cue2216=[~UNUSED3~] -OutputList3SigType2216=Serial -OutputList3Cue2217=[~UNUSED3~] -OutputList3SigType2217=Serial -OutputList3Cue2218=[~UNUSED3~] -OutputList3SigType2218=Serial -OutputList3Cue2219=[~UNUSED3~] -OutputList3SigType2219=Serial -OutputList3Cue2220=[~UNUSED3~] -OutputList3SigType2220=Serial -OutputList3Cue2221=[~UNUSED3~] -OutputList3SigType2221=Serial -OutputList3Cue2222=[~UNUSED3~] -OutputList3SigType2222=Serial -OutputList3Cue2223=[~UNUSED3~] -OutputList3SigType2223=Serial -OutputList3Cue2224=[~UNUSED3~] -OutputList3SigType2224=Serial -OutputList3Cue2225=[~UNUSED3~] -OutputList3SigType2225=Serial -OutputList3Cue2226=[~UNUSED3~] -OutputList3SigType2226=Serial -OutputList3Cue2227=[~UNUSED3~] -OutputList3SigType2227=Serial -OutputList3Cue2228=[~UNUSED3~] -OutputList3SigType2228=Serial -OutputList3Cue2229=[~UNUSED3~] -OutputList3SigType2229=Serial -OutputList3Cue2230=[~UNUSED3~] -OutputList3SigType2230=Serial -OutputList3Cue2231=[~UNUSED3~] -OutputList3SigType2231=Serial -OutputList3Cue2232=[~UNUSED3~] -OutputList3SigType2232=Serial -OutputList3Cue2233=[~UNUSED3~] -OutputList3SigType2233=Serial -OutputList3Cue2234=[~UNUSED3~] -OutputList3SigType2234=Serial -OutputList3Cue2235=[~UNUSED3~] -OutputList3SigType2235=Serial -OutputList3Cue2236=[~UNUSED3~] -OutputList3SigType2236=Serial -OutputList3Cue2237=[~UNUSED3~] -OutputList3SigType2237=Serial -OutputList3Cue2238=[~UNUSED3~] -OutputList3SigType2238=Serial -OutputList3Cue2239=[~UNUSED3~] -OutputList3SigType2239=Serial -OutputList3Cue2240=[~UNUSED3~] -OutputList3SigType2240=Serial -OutputList3Cue2241=[~UNUSED3~] -OutputList3SigType2241=Serial -OutputList3Cue2242=[~UNUSED3~] -OutputList3SigType2242=Serial -OutputList3Cue2243=[~UNUSED3~] -OutputList3SigType2243=Serial -OutputList3Cue2244=[~UNUSED3~] -OutputList3SigType2244=Serial -OutputList3Cue2245=[~UNUSED3~] -OutputList3SigType2245=Serial -OutputList3Cue2246=[~UNUSED3~] -OutputList3SigType2246=Serial -OutputList3Cue2247=[~UNUSED3~] -OutputList3SigType2247=Serial -OutputList3Cue2248=[~UNUSED3~] -OutputList3SigType2248=Serial -OutputList3Cue2249=[~UNUSED3~] -OutputList3SigType2249=Serial -OutputList3Cue2250=[~UNUSED3~] -OutputList3SigType2250=Serial -OutputList3Cue2251=[~UNUSED3~] -OutputList3SigType2251=Serial -OutputList3Cue2252=[~UNUSED3~] -OutputList3SigType2252=Serial -OutputList3Cue2253=[~UNUSED3~] -OutputList3SigType2253=Serial -OutputList3Cue2254=[~UNUSED3~] -OutputList3SigType2254=Serial -OutputList3Cue2255=[~UNUSED3~] -OutputList3SigType2255=Serial -OutputList3Cue2256=[~UNUSED3~] -OutputList3SigType2256=Serial -OutputList3Cue2257=[~UNUSED3~] -OutputList3SigType2257=Serial -OutputList3Cue2258=[~UNUSED3~] -OutputList3SigType2258=Serial -OutputList3Cue2259=[~UNUSED3~] -OutputList3SigType2259=Serial -OutputList3Cue2260=[~UNUSED3~] -OutputList3SigType2260=Serial -OutputList3Cue2261=[~UNUSED3~] -OutputList3SigType2261=Serial -OutputList3Cue2262=[~UNUSED3~] -OutputList3SigType2262=Serial -OutputList3Cue2263=[~UNUSED3~] -OutputList3SigType2263=Serial -OutputList3Cue2264=[~UNUSED3~] -OutputList3SigType2264=Serial -OutputList3Cue2265=[~UNUSED3~] -OutputList3SigType2265=Serial -OutputList3Cue2266=[~UNUSED3~] -OutputList3SigType2266=Serial -OutputList3Cue2267=[~UNUSED3~] -OutputList3SigType2267=Serial -OutputList3Cue2268=[~UNUSED3~] -OutputList3SigType2268=Serial -OutputList3Cue2269=[~UNUSED2~] -OutputList3SigType2269=Digital|Analog|Serial|String -OutputList3Cue4014=[~EndGroup~]Item Icons -OutputList3SigType4014=Serial -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=2 -CedH=2 -SmartObjId=1202d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=2 -Tp=1 -HD=TRUE -DV=1202d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=2 -Name=PepperDash Essentials TSW-760_[D.VC] Directory_Directory List.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials TSW-760_[D.VC] Keypad with favorites_VC DTMF Keypad.ced -Hint=VC DTMF Keypad (Smart Object ID=1201) -Code=3 -SGControlType=Simple Keypad -SGControlName=VC DTMF Keypad -GUID=B4D53525-26EF-4326-8234-1D53F6E9BF04 -SmplCName=PepperDash Essentials TSW-760_[D.VC] Keypad with favorites_VC DTMF Keypad.ced -SMWRev=4.02.19 -Expand=expand_random -HelpID=10061 -;Define the number of inputs, outputs and parameters -MinVariableInputs=12 -MaxVariableInputs=12 -MinVariableOutputs=12 -MaxVariableOutputs=12 -NumFixedParams=1 -MinVariableInputsList2=0 -MaxVariableInputsList2=0 -MinVariableOutputsList2=0 -MaxVariableOutputsList2=0 -MinVariableInputsList3=0 -MaxVariableInputsList3=0 -MinVariableOutputsList3=0 -MaxVariableOutputsList3=0 -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -OutputCue1=1 -OutputSigType1=Digital -InputCue2=[~UNUSED3~] -InputSigType2=Digital -OutputCue2=2 -OutputSigType2=Digital -InputCue3=[~UNUSED3~] -InputSigType3=Digital -OutputCue3=3 -OutputSigType3=Digital -InputCue4=[~UNUSED3~] -InputSigType4=Digital -OutputCue4=4 -OutputSigType4=Digital -InputCue5=[~UNUSED3~] -InputSigType5=Digital -OutputCue5=5 -OutputSigType5=Digital -InputCue6=[~UNUSED3~] -InputSigType6=Digital -OutputCue6=6 -OutputSigType6=Digital -InputCue7=[~UNUSED3~] -InputSigType7=Digital -OutputCue7=7 -OutputSigType7=Digital -InputCue8=[~UNUSED3~] -InputSigType8=Digital -OutputCue8=8 -OutputSigType8=Digital -InputCue9=[~UNUSED3~] -InputSigType9=Digital -OutputCue9=9 -OutputSigType9=Digital -InputCue10=[~UNUSED3~] -InputSigType10=Digital -OutputCue10=0 -OutputSigType10=Digital -InputCue11=[~UNUSED3~] -InputSigType11=Digital -OutputCue11=* -OutputSigType11=Digital -InputCue12=[~UNUSED3~] -InputSigType12=Digital -OutputCue12=/# -OutputSigType12=Digital -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=3 -CedH=3 -SmartObjId=1201d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=3 -Tp=1 -HD=TRUE -DV=1201d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=3 -Name=PepperDash Essentials TSW-760_[D.VC] Keypad with favorites_VC DTMF Keypad.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials TSW-760_[Z.Dialogs] PIN_PIN Keypad.ced -Hint=PIN Keypad (Smart Object ID=3903) -Code=4 -SGControlType=Simple Keypad -SGControlName=PIN Keypad -GUID=D85E5DFB-DE45-45FE-93C5-2FA177B68BFB -SmplCName=PepperDash Essentials TSW-760_[Z.Dialogs] PIN_PIN Keypad.ced -SMWRev=4.02.19 -Expand=expand_random -HelpID=10061 -;Define the number of inputs, outputs and parameters -MinVariableInputs=12 -MaxVariableInputs=12 -MinVariableOutputs=12 -MaxVariableOutputs=12 -NumFixedParams=1 -MinVariableInputsList2=0 -MaxVariableInputsList2=0 -MinVariableOutputsList2=0 -MaxVariableOutputsList2=0 -MinVariableInputsList3=0 -MaxVariableInputsList3=0 -MinVariableOutputsList3=0 -MaxVariableOutputsList3=0 -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -OutputCue1=1 -OutputSigType1=Digital -InputCue2=[~UNUSED3~] -InputSigType2=Digital -OutputCue2=2 -OutputSigType2=Digital -InputCue3=[~UNUSED3~] -InputSigType3=Digital -OutputCue3=3 -OutputSigType3=Digital -InputCue4=[~UNUSED3~] -InputSigType4=Digital -OutputCue4=4 -OutputSigType4=Digital -InputCue5=[~UNUSED3~] -InputSigType5=Digital -OutputCue5=5 -OutputSigType5=Digital -InputCue6=[~UNUSED3~] -InputSigType6=Digital -OutputCue6=6 -OutputSigType6=Digital -InputCue7=[~UNUSED3~] -InputSigType7=Digital -OutputCue7=7 -OutputSigType7=Digital -InputCue8=[~UNUSED3~] -InputSigType8=Digital -OutputCue8=8 -OutputSigType8=Digital -InputCue9=[~UNUSED3~] -InputSigType9=Digital -OutputCue9=9 -OutputSigType9=Digital -InputCue10=[~UNUSED3~] -InputSigType10=Digital -OutputCue10=0 -OutputSigType10=Digital -InputCue11=[~UNUSED3~] -InputSigType11=Digital -OutputCue11=Misc_1 -OutputSigType11=Digital -InputCue12=[~UNUSED3~] -InputSigType12=Digital -OutputCue12=Misc_2 -OutputSigType12=Digital -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=4 -CedH=4 -SmartObjId=3903d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=4 -Tp=1 -HD=TRUE -DV=3903d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=4 -Name=PepperDash Essentials TSW-760_[Z.Dialogs] PIN_PIN Keypad.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials TSW-760_[E.Technician Controls] Sys Status_Subpage Reference List Vertical_3.ced -Hint=Subpage Reference List Vertical_3 (Smart Object ID=3902) -Code=5 -SGControlType=Subpage Reference List Vertical -SGControlName=Subpage Reference List Vertical_3 -GUID=3490D547-0B98-444B-A284-D6C1BAB2FDCE -SmplCName=PepperDash Essentials TSW-760_[E.Technician Controls] Sys Status_Subpage Reference List Vertical_3.ced -SMWRev=4.02.20 -Expand=expand_random -HelpID=10125 -Render=8 -;Define the number of inputs, outputs and parameters -MinVariableInputs=4076 -MaxVariableInputs=4076 -MinVariableOutputs=4076 -MaxVariableOutputs=4076 -NumFixedParams=1 -MinVariableInputsList2=72 -MaxVariableInputsList2=72 -MinVariableOutputsList2=72 -MaxVariableOutputsList2=72 -MinVariableInputsList3=72 -MaxVariableInputsList3=72 -MinVariableOutputsList3=72 -MaxVariableOutputsList3=72 -InputSigType1=Digital -OutputSigType1=Digital -InputList2SigType1=Analog -OutputList2SigType1=Analog -InputList3SigType1=Serial -OutputList3SigType1=Serial - -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -InputCue2=[~UNUSED2~] -InputSigType2=Digital -InputCue3=[~UNUSED2~] -InputSigType3=Digital -InputCue4=[~UNUSED2~] -InputSigType4=Digital -InputCue5=[~UNUSED2~] -InputSigType5=Digital -InputCue6=[~UNUSED2~] -InputSigType6=Digital -InputCue7=[~UNUSED2~] -InputSigType7=Digital -InputCue8=[~UNUSED2~] -InputSigType8=Digital -InputCue9=[~UNUSED2~] -InputSigType9=Digital -InputCue10=[~UNUSED2~] -InputSigType10=Digital -InputCue11=[~BeginGroup~]Enable -InputSigType11=Digital -InputCue12=Item 1 Enable -InputSigType12=Digital -InputCue13=Item 2 Enable -InputSigType13=Digital -InputCue14=Item 3 Enable -InputSigType14=Digital -InputCue15=Item 4 Enable -InputSigType15=Digital -InputCue16=Item 5 Enable -InputSigType16=Digital -InputCue17=Item 6 Enable -InputSigType17=Digital -InputCue18=Item 7 Enable -InputSigType18=Digital -InputCue19=Item 8 Enable -InputSigType19=Digital -InputCue20=Item 9 Enable -InputSigType20=Digital -InputCue21=Item 10 Enable -InputSigType21=Digital -InputCue22=Item 11 Enable -InputSigType22=Digital -InputCue23=Item 12 Enable -InputSigType23=Digital -InputCue24=Item 13 Enable -InputSigType24=Digital -InputCue25=Item 14 Enable -InputSigType25=Digital -InputCue26=Item 15 Enable -InputSigType26=Digital -InputCue27=Item 16 Enable -InputSigType27=Digital -InputCue28=Item 17 Enable -InputSigType28=Digital -InputCue29=Item 18 Enable -InputSigType29=Digital -InputCue30=Item 19 Enable -InputSigType30=Digital -InputCue31=Item 20 Enable -InputSigType31=Digital -InputCue32=[~UNUSED2~] -InputSigType32=Digital|Analog|Serial|String -InputCue2012=[~EndGroup~]Enable -InputSigType2012=Digital -InputCue2013=[~BeginGroup~]Visible -InputSigType2013=Digital -InputCue2014=Item 1 Visible -InputSigType2014=Digital -InputCue2015=Item 2 Visible -InputSigType2015=Digital -InputCue2016=Item 3 Visible -InputSigType2016=Digital -InputCue2017=Item 4 Visible -InputSigType2017=Digital -InputCue2018=Item 5 Visible -InputSigType2018=Digital -InputCue2019=Item 6 Visible -InputSigType2019=Digital -InputCue2020=Item 7 Visible -InputSigType2020=Digital -InputCue2021=Item 8 Visible -InputSigType2021=Digital -InputCue2022=Item 9 Visible -InputSigType2022=Digital -InputCue2023=Item 10 Visible -InputSigType2023=Digital -InputCue2024=Item 11 Visible -InputSigType2024=Digital -InputCue2025=Item 12 Visible -InputSigType2025=Digital -InputCue2026=Item 13 Visible -InputSigType2026=Digital -InputCue2027=Item 14 Visible -InputSigType2027=Digital -InputCue2028=Item 15 Visible -InputSigType2028=Digital -InputCue2029=Item 16 Visible -InputSigType2029=Digital -InputCue2030=Item 17 Visible -InputSigType2030=Digital -InputCue2031=Item 18 Visible -InputSigType2031=Digital -InputCue2032=Item 19 Visible -InputSigType2032=Digital -InputCue2033=Item 20 Visible -InputSigType2033=Digital -InputCue2034=[~UNUSED2~] -InputSigType2034=Digital|Analog|Serial|String -InputCue4014=[~EndGroup~]Visible -InputSigType4014=Digital -InputCue4015=[~BeginGroup~]fb -InputSigType4015=Digital -InputCue4016=fb1 -InputSigType4016=Digital -InputCue4017=fb2 -InputSigType4017=Digital -InputCue4018=fb3 -InputSigType4018=Digital -InputCue4019=fb4 -InputSigType4019=Digital -InputCue4020=fb5 -InputSigType4020=Digital -InputCue4021=fb6 -InputSigType4021=Digital -InputCue4022=fb7 -InputSigType4022=Digital -InputCue4023=fb8 -InputSigType4023=Digital -InputCue4024=fb9 -InputSigType4024=Digital -InputCue4025=fb10 -InputSigType4025=Digital -InputCue4026=fb11 -InputSigType4026=Digital -InputCue4027=fb12 -InputSigType4027=Digital -InputCue4028=fb13 -InputSigType4028=Digital -InputCue4029=fb14 -InputSigType4029=Digital -InputCue4030=fb15 -InputSigType4030=Digital -InputCue4031=fb16 -InputSigType4031=Digital -InputCue4032=fb17 -InputSigType4032=Digital -InputCue4033=fb18 -InputSigType4033=Digital -InputCue4034=fb19 -InputSigType4034=Digital -InputCue4035=fb20 -InputSigType4035=Digital -InputCue4036=fb21 -InputSigType4036=Digital -InputCue4037=fb22 -InputSigType4037=Digital -InputCue4038=fb23 -InputSigType4038=Digital -InputCue4039=fb24 -InputSigType4039=Digital -InputCue4040=fb25 -InputSigType4040=Digital -InputCue4041=fb26 -InputSigType4041=Digital -InputCue4042=fb27 -InputSigType4042=Digital -InputCue4043=fb28 -InputSigType4043=Digital -InputCue4044=fb29 -InputSigType4044=Digital -InputCue4045=fb30 -InputSigType4045=Digital -InputCue4046=fb31 -InputSigType4046=Digital -InputCue4047=fb32 -InputSigType4047=Digital -InputCue4048=fb33 -InputSigType4048=Digital -InputCue4049=fb34 -InputSigType4049=Digital -InputCue4050=fb35 -InputSigType4050=Digital -InputCue4051=fb36 -InputSigType4051=Digital -InputCue4052=fb37 -InputSigType4052=Digital -InputCue4053=fb38 -InputSigType4053=Digital -InputCue4054=fb39 -InputSigType4054=Digital -InputCue4055=fb40 -InputSigType4055=Digital -InputCue4056=fb41 -InputSigType4056=Digital -InputCue4057=fb42 -InputSigType4057=Digital -InputCue4058=fb43 -InputSigType4058=Digital -InputCue4059=fb44 -InputSigType4059=Digital -InputCue4060=fb45 -InputSigType4060=Digital -InputCue4061=fb46 -InputSigType4061=Digital -InputCue4062=fb47 -InputSigType4062=Digital -InputCue4063=fb48 -InputSigType4063=Digital -InputCue4064=fb49 -InputSigType4064=Digital -InputCue4065=fb50 -InputSigType4065=Digital -InputCue4066=fb51 -InputSigType4066=Digital -InputCue4067=fb52 -InputSigType4067=Digital -InputCue4068=fb53 -InputSigType4068=Digital -InputCue4069=fb54 -InputSigType4069=Digital -InputCue4070=fb55 -InputSigType4070=Digital -InputCue4071=fb56 -InputSigType4071=Digital -InputCue4072=fb57 -InputSigType4072=Digital -InputCue4073=fb58 -InputSigType4073=Digital -InputCue4074=fb59 -InputSigType4074=Digital -InputCue4075=fb60 -InputSigType4075=Digital -InputCue4076=[~EndGroup~]fb -InputSigType4076=Digital -OutputCue1=Is Moving -OutputSigType1=Digital -OutputCue2=[~UNUSED2~] -OutputSigType2=Digital -OutputCue3=[~UNUSED2~] -OutputSigType3=Digital -OutputCue4=[~UNUSED2~] -OutputSigType4=Digital -OutputCue5=[~UNUSED2~] -OutputSigType5=Digital -OutputCue6=[~UNUSED2~] -OutputSigType6=Digital -OutputCue7=[~UNUSED2~] -OutputSigType7=Digital -OutputCue8=[~UNUSED2~] -OutputSigType8=Digital -OutputCue9=[~UNUSED2~] -OutputSigType9=Digital -OutputCue10=[~UNUSED2~] -OutputSigType10=Digital -OutputCue11=[~BeginGroup~]Enable -OutputSigType11=Digital -OutputCue12=[~UNUSED3~] -OutputSigType12=Digital -OutputCue13=[~UNUSED3~] -OutputSigType13=Digital -OutputCue14=[~UNUSED3~] -OutputSigType14=Digital -OutputCue15=[~UNUSED3~] -OutputSigType15=Digital -OutputCue16=[~UNUSED3~] -OutputSigType16=Digital -OutputCue17=[~UNUSED3~] -OutputSigType17=Digital -OutputCue18=[~UNUSED3~] -OutputSigType18=Digital -OutputCue19=[~UNUSED3~] -OutputSigType19=Digital -OutputCue20=[~UNUSED3~] -OutputSigType20=Digital -OutputCue21=[~UNUSED3~] -OutputSigType21=Digital -OutputCue22=[~UNUSED3~] -OutputSigType22=Digital -OutputCue23=[~UNUSED3~] -OutputSigType23=Digital -OutputCue24=[~UNUSED3~] -OutputSigType24=Digital -OutputCue25=[~UNUSED3~] -OutputSigType25=Digital -OutputCue26=[~UNUSED3~] -OutputSigType26=Digital -OutputCue27=[~UNUSED3~] -OutputSigType27=Digital -OutputCue28=[~UNUSED3~] -OutputSigType28=Digital -OutputCue29=[~UNUSED3~] -OutputSigType29=Digital -OutputCue30=[~UNUSED3~] -OutputSigType30=Digital -OutputCue31=[~UNUSED3~] -OutputSigType31=Digital -OutputCue32=[~UNUSED2~] -OutputSigType32=Digital|Analog|Serial|String -OutputCue2012=[~EndGroup~]Enable -OutputSigType2012=Digital -OutputCue2013=[~BeginGroup~]Visible -OutputSigType2013=Digital -OutputCue2014=[~UNUSED3~] -OutputSigType2014=Digital -OutputCue2015=[~UNUSED3~] -OutputSigType2015=Digital -OutputCue2016=[~UNUSED3~] -OutputSigType2016=Digital -OutputCue2017=[~UNUSED3~] -OutputSigType2017=Digital -OutputCue2018=[~UNUSED3~] -OutputSigType2018=Digital -OutputCue2019=[~UNUSED3~] -OutputSigType2019=Digital -OutputCue2020=[~UNUSED3~] -OutputSigType2020=Digital -OutputCue2021=[~UNUSED3~] -OutputSigType2021=Digital -OutputCue2022=[~UNUSED3~] -OutputSigType2022=Digital -OutputCue2023=[~UNUSED3~] -OutputSigType2023=Digital -OutputCue2024=[~UNUSED3~] -OutputSigType2024=Digital -OutputCue2025=[~UNUSED3~] -OutputSigType2025=Digital -OutputCue2026=[~UNUSED3~] -OutputSigType2026=Digital -OutputCue2027=[~UNUSED3~] -OutputSigType2027=Digital -OutputCue2028=[~UNUSED3~] -OutputSigType2028=Digital -OutputCue2029=[~UNUSED3~] -OutputSigType2029=Digital -OutputCue2030=[~UNUSED3~] -OutputSigType2030=Digital -OutputCue2031=[~UNUSED3~] -OutputSigType2031=Digital -OutputCue2032=[~UNUSED3~] -OutputSigType2032=Digital -OutputCue2033=[~UNUSED3~] -OutputSigType2033=Digital -OutputCue2034=[~UNUSED2~] -OutputSigType2034=Digital|Analog|Serial|String -OutputCue4014=[~EndGroup~]Visible -OutputSigType4014=Digital -OutputCue4015=[~BeginGroup~]Press -OutputSigType4015=Digital -OutputCue4016=press1 -OutputSigType4016=Digital -OutputCue4017=press2 -OutputSigType4017=Digital -OutputCue4018=press3 -OutputSigType4018=Digital -OutputCue4019=press4 -OutputSigType4019=Digital -OutputCue4020=press5 -OutputSigType4020=Digital -OutputCue4021=press6 -OutputSigType4021=Digital -OutputCue4022=press7 -OutputSigType4022=Digital -OutputCue4023=press8 -OutputSigType4023=Digital -OutputCue4024=press9 -OutputSigType4024=Digital -OutputCue4025=press10 -OutputSigType4025=Digital -OutputCue4026=press11 -OutputSigType4026=Digital -OutputCue4027=press12 -OutputSigType4027=Digital -OutputCue4028=press13 -OutputSigType4028=Digital -OutputCue4029=press14 -OutputSigType4029=Digital -OutputCue4030=press15 -OutputSigType4030=Digital -OutputCue4031=press16 -OutputSigType4031=Digital -OutputCue4032=press17 -OutputSigType4032=Digital -OutputCue4033=press18 -OutputSigType4033=Digital -OutputCue4034=press19 -OutputSigType4034=Digital -OutputCue4035=press20 -OutputSigType4035=Digital -OutputCue4036=press21 -OutputSigType4036=Digital -OutputCue4037=press22 -OutputSigType4037=Digital -OutputCue4038=press23 -OutputSigType4038=Digital -OutputCue4039=press24 -OutputSigType4039=Digital -OutputCue4040=press25 -OutputSigType4040=Digital -OutputCue4041=press26 -OutputSigType4041=Digital -OutputCue4042=press27 -OutputSigType4042=Digital -OutputCue4043=press28 -OutputSigType4043=Digital -OutputCue4044=press29 -OutputSigType4044=Digital -OutputCue4045=press30 -OutputSigType4045=Digital -OutputCue4046=press31 -OutputSigType4046=Digital -OutputCue4047=press32 -OutputSigType4047=Digital -OutputCue4048=press33 -OutputSigType4048=Digital -OutputCue4049=press34 -OutputSigType4049=Digital -OutputCue4050=press35 -OutputSigType4050=Digital -OutputCue4051=press36 -OutputSigType4051=Digital -OutputCue4052=press37 -OutputSigType4052=Digital -OutputCue4053=press38 -OutputSigType4053=Digital -OutputCue4054=press39 -OutputSigType4054=Digital -OutputCue4055=press40 -OutputSigType4055=Digital -OutputCue4056=press41 -OutputSigType4056=Digital -OutputCue4057=press42 -OutputSigType4057=Digital -OutputCue4058=press43 -OutputSigType4058=Digital -OutputCue4059=press44 -OutputSigType4059=Digital -OutputCue4060=press45 -OutputSigType4060=Digital -OutputCue4061=press46 -OutputSigType4061=Digital -OutputCue4062=press47 -OutputSigType4062=Digital -OutputCue4063=press48 -OutputSigType4063=Digital -OutputCue4064=press49 -OutputSigType4064=Digital -OutputCue4065=press50 -OutputSigType4065=Digital -OutputCue4066=press51 -OutputSigType4066=Digital -OutputCue4067=press52 -OutputSigType4067=Digital -OutputCue4068=press53 -OutputSigType4068=Digital -OutputCue4069=press54 -OutputSigType4069=Digital -OutputCue4070=press55 -OutputSigType4070=Digital -OutputCue4071=press56 -OutputSigType4071=Digital -OutputCue4072=press57 -OutputSigType4072=Digital -OutputCue4073=press58 -OutputSigType4073=Digital -OutputCue4074=press59 -OutputSigType4074=Digital -OutputCue4075=press60 -OutputSigType4075=Digital -OutputCue4076=[~EndGroup~]Press -OutputSigType4076=Digital -InputList2Cue1=[~UNUSED3~] -InputList2SigType1=Analog -InputList2Cue2=Scroll To Item -InputList2SigType2=Analog -InputList2Cue3=Set Number of Items -InputList2SigType3=Analog -InputList2Cue4=[~UNUSED2~] -InputList2SigType4=Analog -InputList2Cue5=[~UNUSED2~] -InputList2SigType5=Analog -InputList2Cue6=[~UNUSED2~] -InputList2SigType6=Analog -InputList2Cue7=[~UNUSED2~] -InputList2SigType7=Analog -InputList2Cue8=[~UNUSED2~] -InputList2SigType8=Analog -InputList2Cue9=[~UNUSED2~] -InputList2SigType9=Analog -InputList2Cue10=[~UNUSED2~] -InputList2SigType10=Analog -InputList2Cue11=[~BeginGroup~]an_fb -InputList2SigType11=Analog -InputList2Cue12=an_fb1 -InputList2SigType12=Analog -InputList2Cue13=an_fb2 -InputList2SigType13=Analog -InputList2Cue14=an_fb3 -InputList2SigType14=Analog -InputList2Cue15=an_fb4 -InputList2SigType15=Analog -InputList2Cue16=an_fb5 -InputList2SigType16=Analog -InputList2Cue17=an_fb6 -InputList2SigType17=Analog -InputList2Cue18=an_fb7 -InputList2SigType18=Analog -InputList2Cue19=an_fb8 -InputList2SigType19=Analog -InputList2Cue20=an_fb9 -InputList2SigType20=Analog -InputList2Cue21=an_fb10 -InputList2SigType21=Analog -InputList2Cue22=an_fb11 -InputList2SigType22=Analog -InputList2Cue23=an_fb12 -InputList2SigType23=Analog -InputList2Cue24=an_fb13 -InputList2SigType24=Analog -InputList2Cue25=an_fb14 -InputList2SigType25=Analog -InputList2Cue26=an_fb15 -InputList2SigType26=Analog -InputList2Cue27=an_fb16 -InputList2SigType27=Analog -InputList2Cue28=an_fb17 -InputList2SigType28=Analog -InputList2Cue29=an_fb18 -InputList2SigType29=Analog -InputList2Cue30=an_fb19 -InputList2SigType30=Analog -InputList2Cue31=an_fb20 -InputList2SigType31=Analog -InputList2Cue32=an_fb21 -InputList2SigType32=Analog -InputList2Cue33=an_fb22 -InputList2SigType33=Analog -InputList2Cue34=an_fb23 -InputList2SigType34=Analog -InputList2Cue35=an_fb24 -InputList2SigType35=Analog -InputList2Cue36=an_fb25 -InputList2SigType36=Analog -InputList2Cue37=an_fb26 -InputList2SigType37=Analog -InputList2Cue38=an_fb27 -InputList2SigType38=Analog -InputList2Cue39=an_fb28 -InputList2SigType39=Analog -InputList2Cue40=an_fb29 -InputList2SigType40=Analog -InputList2Cue41=an_fb30 -InputList2SigType41=Analog -InputList2Cue42=an_fb31 -InputList2SigType42=Analog -InputList2Cue43=an_fb32 -InputList2SigType43=Analog -InputList2Cue44=an_fb33 -InputList2SigType44=Analog -InputList2Cue45=an_fb34 -InputList2SigType45=Analog -InputList2Cue46=an_fb35 -InputList2SigType46=Analog -InputList2Cue47=an_fb36 -InputList2SigType47=Analog -InputList2Cue48=an_fb37 -InputList2SigType48=Analog -InputList2Cue49=an_fb38 -InputList2SigType49=Analog -InputList2Cue50=an_fb39 -InputList2SigType50=Analog -InputList2Cue51=an_fb40 -InputList2SigType51=Analog -InputList2Cue52=an_fb41 -InputList2SigType52=Analog -InputList2Cue53=an_fb42 -InputList2SigType53=Analog -InputList2Cue54=an_fb43 -InputList2SigType54=Analog -InputList2Cue55=an_fb44 -InputList2SigType55=Analog -InputList2Cue56=an_fb45 -InputList2SigType56=Analog -InputList2Cue57=an_fb46 -InputList2SigType57=Analog -InputList2Cue58=an_fb47 -InputList2SigType58=Analog -InputList2Cue59=an_fb48 -InputList2SigType59=Analog -InputList2Cue60=an_fb49 -InputList2SigType60=Analog -InputList2Cue61=an_fb50 -InputList2SigType61=Analog -InputList2Cue62=an_fb51 -InputList2SigType62=Analog -InputList2Cue63=an_fb52 -InputList2SigType63=Analog -InputList2Cue64=an_fb53 -InputList2SigType64=Analog -InputList2Cue65=an_fb54 -InputList2SigType65=Analog -InputList2Cue66=an_fb55 -InputList2SigType66=Analog -InputList2Cue67=an_fb56 -InputList2SigType67=Analog -InputList2Cue68=an_fb57 -InputList2SigType68=Analog -InputList2Cue69=an_fb58 -InputList2SigType69=Analog -InputList2Cue70=an_fb59 -InputList2SigType70=Analog -InputList2Cue71=an_fb60 -InputList2SigType71=Analog -InputList2Cue72=[~EndGroup~]an_fb -InputList2SigType72=Analog -OutputList2Cue1=Item Clicked -OutputList2SigType1=Analog -OutputList2Cue2=[~UNUSED3~] -OutputList2SigType2=Analog -OutputList2Cue3=[~UNUSED3~] -OutputList2SigType3=Analog -OutputList2Cue4=[~UNUSED2~] -OutputList2SigType4=Analog -OutputList2Cue5=[~UNUSED2~] -OutputList2SigType5=Analog -OutputList2Cue6=[~UNUSED2~] -OutputList2SigType6=Analog -OutputList2Cue7=[~UNUSED2~] -OutputList2SigType7=Analog -OutputList2Cue8=[~UNUSED2~] -OutputList2SigType8=Analog -OutputList2Cue9=[~UNUSED2~] -OutputList2SigType9=Analog -OutputList2Cue10=[~UNUSED2~] -OutputList2SigType10=Analog -OutputList2Cue11=[~BeginGroup~]an_act -OutputList2SigType11=Analog -OutputList2Cue12=an_act1 -OutputList2SigType12=Analog -OutputList2Cue13=an_act2 -OutputList2SigType13=Analog -OutputList2Cue14=an_act3 -OutputList2SigType14=Analog -OutputList2Cue15=an_act4 -OutputList2SigType15=Analog -OutputList2Cue16=an_act5 -OutputList2SigType16=Analog -OutputList2Cue17=an_act6 -OutputList2SigType17=Analog -OutputList2Cue18=an_act7 -OutputList2SigType18=Analog -OutputList2Cue19=an_act8 -OutputList2SigType19=Analog -OutputList2Cue20=an_act9 -OutputList2SigType20=Analog -OutputList2Cue21=an_act10 -OutputList2SigType21=Analog -OutputList2Cue22=an_act11 -OutputList2SigType22=Analog -OutputList2Cue23=an_act12 -OutputList2SigType23=Analog -OutputList2Cue24=an_act13 -OutputList2SigType24=Analog -OutputList2Cue25=an_act14 -OutputList2SigType25=Analog -OutputList2Cue26=an_act15 -OutputList2SigType26=Analog -OutputList2Cue27=an_act16 -OutputList2SigType27=Analog -OutputList2Cue28=an_act17 -OutputList2SigType28=Analog -OutputList2Cue29=an_act18 -OutputList2SigType29=Analog -OutputList2Cue30=an_act19 -OutputList2SigType30=Analog -OutputList2Cue31=an_act20 -OutputList2SigType31=Analog -OutputList2Cue32=an_act21 -OutputList2SigType32=Analog -OutputList2Cue33=an_act22 -OutputList2SigType33=Analog -OutputList2Cue34=an_act23 -OutputList2SigType34=Analog -OutputList2Cue35=an_act24 -OutputList2SigType35=Analog -OutputList2Cue36=an_act25 -OutputList2SigType36=Analog -OutputList2Cue37=an_act26 -OutputList2SigType37=Analog -OutputList2Cue38=an_act27 -OutputList2SigType38=Analog -OutputList2Cue39=an_act28 -OutputList2SigType39=Analog -OutputList2Cue40=an_act29 -OutputList2SigType40=Analog -OutputList2Cue41=an_act30 -OutputList2SigType41=Analog -OutputList2Cue42=an_act31 -OutputList2SigType42=Analog -OutputList2Cue43=an_act32 -OutputList2SigType43=Analog -OutputList2Cue44=an_act33 -OutputList2SigType44=Analog -OutputList2Cue45=an_act34 -OutputList2SigType45=Analog -OutputList2Cue46=an_act35 -OutputList2SigType46=Analog -OutputList2Cue47=an_act36 -OutputList2SigType47=Analog -OutputList2Cue48=an_act37 -OutputList2SigType48=Analog -OutputList2Cue49=an_act38 -OutputList2SigType49=Analog -OutputList2Cue50=an_act39 -OutputList2SigType50=Analog -OutputList2Cue51=an_act40 -OutputList2SigType51=Analog -OutputList2Cue52=an_act41 -OutputList2SigType52=Analog -OutputList2Cue53=an_act42 -OutputList2SigType53=Analog -OutputList2Cue54=an_act43 -OutputList2SigType54=Analog -OutputList2Cue55=an_act44 -OutputList2SigType55=Analog -OutputList2Cue56=an_act45 -OutputList2SigType56=Analog -OutputList2Cue57=an_act46 -OutputList2SigType57=Analog -OutputList2Cue58=an_act47 -OutputList2SigType58=Analog -OutputList2Cue59=an_act48 -OutputList2SigType59=Analog -OutputList2Cue60=an_act49 -OutputList2SigType60=Analog -OutputList2Cue61=an_act50 -OutputList2SigType61=Analog -OutputList2Cue62=an_act51 -OutputList2SigType62=Analog -OutputList2Cue63=an_act52 -OutputList2SigType63=Analog -OutputList2Cue64=an_act53 -OutputList2SigType64=Analog -OutputList2Cue65=an_act54 -OutputList2SigType65=Analog -OutputList2Cue66=an_act55 -OutputList2SigType66=Analog -OutputList2Cue67=an_act56 -OutputList2SigType67=Analog -OutputList2Cue68=an_act57 -OutputList2SigType68=Analog -OutputList2Cue69=an_act58 -OutputList2SigType69=Analog -OutputList2Cue70=an_act59 -OutputList2SigType70=Analog -OutputList2Cue71=an_act60 -OutputList2SigType71=Analog -OutputList2Cue72=[~EndGroup~]an_act -OutputList2SigType72=Analog -InputList3Cue1=[~UNUSED2~] -InputList3SigType1=Serial -InputList3Cue2=[~UNUSED2~] -InputList3SigType2=Serial -InputList3Cue3=[~UNUSED2~] -InputList3SigType3=Serial -InputList3Cue4=[~UNUSED2~] -InputList3SigType4=Serial -InputList3Cue5=[~UNUSED2~] -InputList3SigType5=Serial -InputList3Cue6=[~UNUSED2~] -InputList3SigType6=Serial -InputList3Cue7=[~UNUSED2~] -InputList3SigType7=Serial -InputList3Cue8=[~UNUSED2~] -InputList3SigType8=Serial -InputList3Cue9=[~UNUSED2~] -InputList3SigType9=Serial -InputList3Cue10=[~UNUSED2~] -InputList3SigType10=Serial -InputList3Cue11=[~BeginGroup~]text-o -InputList3SigType11=Serial -InputList3Cue12=text-o1 -InputList3SigType12=Serial -InputList3Cue13=text-o2 -InputList3SigType13=Serial -InputList3Cue14=text-o3 -InputList3SigType14=Serial -InputList3Cue15=text-o4 -InputList3SigType15=Serial -InputList3Cue16=text-o5 -InputList3SigType16=Serial -InputList3Cue17=text-o6 -InputList3SigType17=Serial -InputList3Cue18=text-o7 -InputList3SigType18=Serial -InputList3Cue19=text-o8 -InputList3SigType19=Serial -InputList3Cue20=text-o9 -InputList3SigType20=Serial -InputList3Cue21=text-o10 -InputList3SigType21=Serial -InputList3Cue22=text-o11 -InputList3SigType22=Serial -InputList3Cue23=text-o12 -InputList3SigType23=Serial -InputList3Cue24=text-o13 -InputList3SigType24=Serial -InputList3Cue25=text-o14 -InputList3SigType25=Serial -InputList3Cue26=text-o15 -InputList3SigType26=Serial -InputList3Cue27=text-o16 -InputList3SigType27=Serial -InputList3Cue28=text-o17 -InputList3SigType28=Serial -InputList3Cue29=text-o18 -InputList3SigType29=Serial -InputList3Cue30=text-o19 -InputList3SigType30=Serial -InputList3Cue31=text-o20 -InputList3SigType31=Serial -InputList3Cue32=text-o21 -InputList3SigType32=Serial -InputList3Cue33=text-o22 -InputList3SigType33=Serial -InputList3Cue34=text-o23 -InputList3SigType34=Serial -InputList3Cue35=text-o24 -InputList3SigType35=Serial -InputList3Cue36=text-o25 -InputList3SigType36=Serial -InputList3Cue37=text-o26 -InputList3SigType37=Serial -InputList3Cue38=text-o27 -InputList3SigType38=Serial -InputList3Cue39=text-o28 -InputList3SigType39=Serial -InputList3Cue40=text-o29 -InputList3SigType40=Serial -InputList3Cue41=text-o30 -InputList3SigType41=Serial -InputList3Cue42=text-o31 -InputList3SigType42=Serial -InputList3Cue43=text-o32 -InputList3SigType43=Serial -InputList3Cue44=text-o33 -InputList3SigType44=Serial -InputList3Cue45=text-o34 -InputList3SigType45=Serial -InputList3Cue46=text-o35 -InputList3SigType46=Serial -InputList3Cue47=text-o36 -InputList3SigType47=Serial -InputList3Cue48=text-o37 -InputList3SigType48=Serial -InputList3Cue49=text-o38 -InputList3SigType49=Serial -InputList3Cue50=text-o39 -InputList3SigType50=Serial -InputList3Cue51=text-o40 -InputList3SigType51=Serial -InputList3Cue52=text-o41 -InputList3SigType52=Serial -InputList3Cue53=text-o42 -InputList3SigType53=Serial -InputList3Cue54=text-o43 -InputList3SigType54=Serial -InputList3Cue55=text-o44 -InputList3SigType55=Serial -InputList3Cue56=text-o45 -InputList3SigType56=Serial -InputList3Cue57=text-o46 -InputList3SigType57=Serial -InputList3Cue58=text-o47 -InputList3SigType58=Serial -InputList3Cue59=text-o48 -InputList3SigType59=Serial -InputList3Cue60=text-o49 -InputList3SigType60=Serial -InputList3Cue61=text-o50 -InputList3SigType61=Serial -InputList3Cue62=text-o51 -InputList3SigType62=Serial -InputList3Cue63=text-o52 -InputList3SigType63=Serial -InputList3Cue64=text-o53 -InputList3SigType64=Serial -InputList3Cue65=text-o54 -InputList3SigType65=Serial -InputList3Cue66=text-o55 -InputList3SigType66=Serial -InputList3Cue67=text-o56 -InputList3SigType67=Serial -InputList3Cue68=text-o57 -InputList3SigType68=Serial -InputList3Cue69=text-o58 -InputList3SigType69=Serial -InputList3Cue70=text-o59 -InputList3SigType70=Serial -InputList3Cue71=text-o60 -InputList3SigType71=Serial -InputList3Cue72=[~EndGroup~]text-o -InputList3SigType72=Serial -OutputList3Cue1=[~UNUSED2~] -OutputList3SigType1=Serial -OutputList3Cue2=[~UNUSED2~] -OutputList3SigType2=Serial -OutputList3Cue3=[~UNUSED2~] -OutputList3SigType3=Serial -OutputList3Cue4=[~UNUSED2~] -OutputList3SigType4=Serial -OutputList3Cue5=[~UNUSED2~] -OutputList3SigType5=Serial -OutputList3Cue6=[~UNUSED2~] -OutputList3SigType6=Serial -OutputList3Cue7=[~UNUSED2~] -OutputList3SigType7=Serial -OutputList3Cue8=[~UNUSED2~] -OutputList3SigType8=Serial -OutputList3Cue9=[~UNUSED2~] -OutputList3SigType9=Serial -OutputList3Cue10=[~UNUSED2~] -OutputList3SigType10=Serial -OutputList3Cue11=[~BeginGroup~]text-i -OutputList3SigType11=Serial -OutputList3Cue12=text-i1 -OutputList3SigType12=Serial -OutputList3Cue13=text-i2 -OutputList3SigType13=Serial -OutputList3Cue14=text-i3 -OutputList3SigType14=Serial -OutputList3Cue15=text-i4 -OutputList3SigType15=Serial -OutputList3Cue16=text-i5 -OutputList3SigType16=Serial -OutputList3Cue17=text-i6 -OutputList3SigType17=Serial -OutputList3Cue18=text-i7 -OutputList3SigType18=Serial -OutputList3Cue19=text-i8 -OutputList3SigType19=Serial -OutputList3Cue20=text-i9 -OutputList3SigType20=Serial -OutputList3Cue21=text-i10 -OutputList3SigType21=Serial -OutputList3Cue22=text-i11 -OutputList3SigType22=Serial -OutputList3Cue23=text-i12 -OutputList3SigType23=Serial -OutputList3Cue24=text-i13 -OutputList3SigType24=Serial -OutputList3Cue25=text-i14 -OutputList3SigType25=Serial -OutputList3Cue26=text-i15 -OutputList3SigType26=Serial -OutputList3Cue27=text-i16 -OutputList3SigType27=Serial -OutputList3Cue28=text-i17 -OutputList3SigType28=Serial -OutputList3Cue29=text-i18 -OutputList3SigType29=Serial -OutputList3Cue30=text-i19 -OutputList3SigType30=Serial -OutputList3Cue31=text-i20 -OutputList3SigType31=Serial -OutputList3Cue32=text-i21 -OutputList3SigType32=Serial -OutputList3Cue33=text-i22 -OutputList3SigType33=Serial -OutputList3Cue34=text-i23 -OutputList3SigType34=Serial -OutputList3Cue35=text-i24 -OutputList3SigType35=Serial -OutputList3Cue36=text-i25 -OutputList3SigType36=Serial -OutputList3Cue37=text-i26 -OutputList3SigType37=Serial -OutputList3Cue38=text-i27 -OutputList3SigType38=Serial -OutputList3Cue39=text-i28 -OutputList3SigType39=Serial -OutputList3Cue40=text-i29 -OutputList3SigType40=Serial -OutputList3Cue41=text-i30 -OutputList3SigType41=Serial -OutputList3Cue42=text-i31 -OutputList3SigType42=Serial -OutputList3Cue43=text-i32 -OutputList3SigType43=Serial -OutputList3Cue44=text-i33 -OutputList3SigType44=Serial -OutputList3Cue45=text-i34 -OutputList3SigType45=Serial -OutputList3Cue46=text-i35 -OutputList3SigType46=Serial -OutputList3Cue47=text-i36 -OutputList3SigType47=Serial -OutputList3Cue48=text-i37 -OutputList3SigType48=Serial -OutputList3Cue49=text-i38 -OutputList3SigType49=Serial -OutputList3Cue50=text-i39 -OutputList3SigType50=Serial -OutputList3Cue51=text-i40 -OutputList3SigType51=Serial -OutputList3Cue52=text-i41 -OutputList3SigType52=Serial -OutputList3Cue53=text-i42 -OutputList3SigType53=Serial -OutputList3Cue54=text-i43 -OutputList3SigType54=Serial -OutputList3Cue55=text-i44 -OutputList3SigType55=Serial -OutputList3Cue56=text-i45 -OutputList3SigType56=Serial -OutputList3Cue57=text-i46 -OutputList3SigType57=Serial -OutputList3Cue58=text-i47 -OutputList3SigType58=Serial -OutputList3Cue59=text-i48 -OutputList3SigType59=Serial -OutputList3Cue60=text-i49 -OutputList3SigType60=Serial -OutputList3Cue61=text-i50 -OutputList3SigType61=Serial -OutputList3Cue62=text-i51 -OutputList3SigType62=Serial -OutputList3Cue63=text-i52 -OutputList3SigType63=Serial -OutputList3Cue64=text-i53 -OutputList3SigType64=Serial -OutputList3Cue65=text-i54 -OutputList3SigType65=Serial -OutputList3Cue66=text-i55 -OutputList3SigType66=Serial -OutputList3Cue67=text-i56 -OutputList3SigType67=Serial -OutputList3Cue68=text-i57 -OutputList3SigType68=Serial -OutputList3Cue69=text-i58 -OutputList3SigType69=Serial -OutputList3Cue70=text-i59 -OutputList3SigType70=Serial -OutputList3Cue71=text-i60 -OutputList3SigType71=Serial -OutputList3Cue72=[~EndGroup~]text-i -OutputList3SigType72=Serial -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=5 -CedH=5 -SmartObjId=3902d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=5 -Tp=1 -HD=TRUE -DV=3902d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=5 -Name=PepperDash Essentials TSW-760_[E.Technician Controls] Sys Status_Subpage Reference List Vertical_3.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials TSW-760_[E.Technician Controls] Display Controls_Subpage Reference List Vertical_4.ced -Hint=Subpage Reference List Vertical_4 (Smart Object ID=3904) -Code=6 -SGControlType=Subpage Reference List Vertical -SGControlName=Subpage Reference List Vertical_4 -GUID=AC10DF35-3FD4-4F62-9708-0A06AE7A5A14 -SmplCName=PepperDash Essentials TSW-760_[E.Technician Controls] Display Controls_Subpage Reference List Vertical_4.ced -SMWRev=4.02.20 -Expand=expand_random -HelpID=10125 -Render=8 -;Define the number of inputs, outputs and parameters -MinVariableInputs=4116 -MaxVariableInputs=4116 -MinVariableOutputs=4116 -MaxVariableOutputs=4116 -NumFixedParams=1 -MinVariableInputsList2=42 -MaxVariableInputsList2=42 -MinVariableOutputsList2=42 -MaxVariableOutputsList2=42 -MinVariableInputsList3=42 -MaxVariableInputsList3=42 -MinVariableOutputsList3=42 -MaxVariableOutputsList3=42 -InputSigType1=Digital -OutputSigType1=Digital -InputList2SigType1=Analog -OutputList2SigType1=Analog -InputList3SigType1=Serial -OutputList3SigType1=Serial - -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -InputCue2=[~UNUSED2~] -InputSigType2=Digital -InputCue3=[~UNUSED2~] -InputSigType3=Digital -InputCue4=[~UNUSED2~] -InputSigType4=Digital -InputCue5=[~UNUSED2~] -InputSigType5=Digital -InputCue6=[~UNUSED2~] -InputSigType6=Digital -InputCue7=[~UNUSED2~] -InputSigType7=Digital -InputCue8=[~UNUSED2~] -InputSigType8=Digital -InputCue9=[~UNUSED2~] -InputSigType9=Digital -InputCue10=[~UNUSED2~] -InputSigType10=Digital -InputCue11=[~BeginGroup~]Enable -InputSigType11=Digital -InputCue12=Item 1 Enable -InputSigType12=Digital -InputCue13=Item 2 Enable -InputSigType13=Digital -InputCue14=Item 3 Enable -InputSigType14=Digital -InputCue15=Item 4 Enable -InputSigType15=Digital -InputCue16=Item 5 Enable -InputSigType16=Digital -InputCue17=Item 6 Enable -InputSigType17=Digital -InputCue18=Item 7 Enable -InputSigType18=Digital -InputCue19=Item 8 Enable -InputSigType19=Digital -InputCue20=Item 9 Enable -InputSigType20=Digital -InputCue21=Item 10 Enable -InputSigType21=Digital -InputCue22=[~UNUSED2~] -InputSigType22=Digital|Analog|Serial|String -InputCue2012=[~EndGroup~]Enable -InputSigType2012=Digital -InputCue2013=[~BeginGroup~]Visible -InputSigType2013=Digital -InputCue2014=Item 1 Visible -InputSigType2014=Digital -InputCue2015=Item 2 Visible -InputSigType2015=Digital -InputCue2016=Item 3 Visible -InputSigType2016=Digital -InputCue2017=Item 4 Visible -InputSigType2017=Digital -InputCue2018=Item 5 Visible -InputSigType2018=Digital -InputCue2019=Item 6 Visible -InputSigType2019=Digital -InputCue2020=Item 7 Visible -InputSigType2020=Digital -InputCue2021=Item 8 Visible -InputSigType2021=Digital -InputCue2022=Item 9 Visible -InputSigType2022=Digital -InputCue2023=Item 10 Visible -InputSigType2023=Digital -InputCue2024=[~UNUSED2~] -InputSigType2024=Digital|Analog|Serial|String -InputCue4014=[~EndGroup~]Visible -InputSigType4014=Digital -InputCue4015=[~BeginGroup~]fb -InputSigType4015=Digital -InputCue4016=fb1 -InputSigType4016=Digital -InputCue4017=fb2 -InputSigType4017=Digital -InputCue4018=fb3 -InputSigType4018=Digital -InputCue4019=fb4 -InputSigType4019=Digital -InputCue4020=fb5 -InputSigType4020=Digital -InputCue4021=fb6 -InputSigType4021=Digital -InputCue4022=fb7 -InputSigType4022=Digital -InputCue4023=fb8 -InputSigType4023=Digital -InputCue4024=fb9 -InputSigType4024=Digital -InputCue4025=fb10 -InputSigType4025=Digital -InputCue4026=fb11 -InputSigType4026=Digital -InputCue4027=fb12 -InputSigType4027=Digital -InputCue4028=fb13 -InputSigType4028=Digital -InputCue4029=fb14 -InputSigType4029=Digital -InputCue4030=fb15 -InputSigType4030=Digital -InputCue4031=fb16 -InputSigType4031=Digital -InputCue4032=fb17 -InputSigType4032=Digital -InputCue4033=fb18 -InputSigType4033=Digital -InputCue4034=fb19 -InputSigType4034=Digital -InputCue4035=fb20 -InputSigType4035=Digital -InputCue4036=fb21 -InputSigType4036=Digital -InputCue4037=fb22 -InputSigType4037=Digital -InputCue4038=fb23 -InputSigType4038=Digital -InputCue4039=fb24 -InputSigType4039=Digital -InputCue4040=fb25 -InputSigType4040=Digital -InputCue4041=fb26 -InputSigType4041=Digital -InputCue4042=fb27 -InputSigType4042=Digital -InputCue4043=fb28 -InputSigType4043=Digital -InputCue4044=fb29 -InputSigType4044=Digital -InputCue4045=fb30 -InputSigType4045=Digital -InputCue4046=fb31 -InputSigType4046=Digital -InputCue4047=fb32 -InputSigType4047=Digital -InputCue4048=fb33 -InputSigType4048=Digital -InputCue4049=fb34 -InputSigType4049=Digital -InputCue4050=fb35 -InputSigType4050=Digital -InputCue4051=fb36 -InputSigType4051=Digital -InputCue4052=fb37 -InputSigType4052=Digital -InputCue4053=fb38 -InputSigType4053=Digital -InputCue4054=fb39 -InputSigType4054=Digital -InputCue4055=fb40 -InputSigType4055=Digital -InputCue4056=fb41 -InputSigType4056=Digital -InputCue4057=fb42 -InputSigType4057=Digital -InputCue4058=fb43 -InputSigType4058=Digital -InputCue4059=fb44 -InputSigType4059=Digital -InputCue4060=fb45 -InputSigType4060=Digital -InputCue4061=fb46 -InputSigType4061=Digital -InputCue4062=fb47 -InputSigType4062=Digital -InputCue4063=fb48 -InputSigType4063=Digital -InputCue4064=fb49 -InputSigType4064=Digital -InputCue4065=fb50 -InputSigType4065=Digital -InputCue4066=fb51 -InputSigType4066=Digital -InputCue4067=fb52 -InputSigType4067=Digital -InputCue4068=fb53 -InputSigType4068=Digital -InputCue4069=fb54 -InputSigType4069=Digital -InputCue4070=fb55 -InputSigType4070=Digital -InputCue4071=fb56 -InputSigType4071=Digital -InputCue4072=fb57 -InputSigType4072=Digital -InputCue4073=fb58 -InputSigType4073=Digital -InputCue4074=fb59 -InputSigType4074=Digital -InputCue4075=fb60 -InputSigType4075=Digital -InputCue4076=fb61 -InputSigType4076=Digital -InputCue4077=fb62 -InputSigType4077=Digital -InputCue4078=fb63 -InputSigType4078=Digital -InputCue4079=fb64 -InputSigType4079=Digital -InputCue4080=fb65 -InputSigType4080=Digital -InputCue4081=fb66 -InputSigType4081=Digital -InputCue4082=fb67 -InputSigType4082=Digital -InputCue4083=fb68 -InputSigType4083=Digital -InputCue4084=fb69 -InputSigType4084=Digital -InputCue4085=fb70 -InputSigType4085=Digital -InputCue4086=fb71 -InputSigType4086=Digital -InputCue4087=fb72 -InputSigType4087=Digital -InputCue4088=fb73 -InputSigType4088=Digital -InputCue4089=fb74 -InputSigType4089=Digital -InputCue4090=fb75 -InputSigType4090=Digital -InputCue4091=fb76 -InputSigType4091=Digital -InputCue4092=fb77 -InputSigType4092=Digital -InputCue4093=fb78 -InputSigType4093=Digital -InputCue4094=fb79 -InputSigType4094=Digital -InputCue4095=fb80 -InputSigType4095=Digital -InputCue4096=fb81 -InputSigType4096=Digital -InputCue4097=fb82 -InputSigType4097=Digital -InputCue4098=fb83 -InputSigType4098=Digital -InputCue4099=fb84 -InputSigType4099=Digital -InputCue4100=fb85 -InputSigType4100=Digital -InputCue4101=fb86 -InputSigType4101=Digital -InputCue4102=fb87 -InputSigType4102=Digital -InputCue4103=fb88 -InputSigType4103=Digital -InputCue4104=fb89 -InputSigType4104=Digital -InputCue4105=fb90 -InputSigType4105=Digital -InputCue4106=fb91 -InputSigType4106=Digital -InputCue4107=fb92 -InputSigType4107=Digital -InputCue4108=fb93 -InputSigType4108=Digital -InputCue4109=fb94 -InputSigType4109=Digital -InputCue4110=fb95 -InputSigType4110=Digital -InputCue4111=fb96 -InputSigType4111=Digital -InputCue4112=fb97 -InputSigType4112=Digital -InputCue4113=fb98 -InputSigType4113=Digital -InputCue4114=fb99 -InputSigType4114=Digital -InputCue4115=fb100 -InputSigType4115=Digital -InputCue4116=[~EndGroup~]fb -InputSigType4116=Digital -OutputCue1=Is Moving -OutputSigType1=Digital -OutputCue2=[~UNUSED2~] -OutputSigType2=Digital -OutputCue3=[~UNUSED2~] -OutputSigType3=Digital -OutputCue4=[~UNUSED2~] -OutputSigType4=Digital -OutputCue5=[~UNUSED2~] -OutputSigType5=Digital -OutputCue6=[~UNUSED2~] -OutputSigType6=Digital -OutputCue7=[~UNUSED2~] -OutputSigType7=Digital -OutputCue8=[~UNUSED2~] -OutputSigType8=Digital -OutputCue9=[~UNUSED2~] -OutputSigType9=Digital -OutputCue10=[~UNUSED2~] -OutputSigType10=Digital -OutputCue11=[~BeginGroup~]Enable -OutputSigType11=Digital -OutputCue12=[~UNUSED3~] -OutputSigType12=Digital -OutputCue13=[~UNUSED3~] -OutputSigType13=Digital -OutputCue14=[~UNUSED3~] -OutputSigType14=Digital -OutputCue15=[~UNUSED3~] -OutputSigType15=Digital -OutputCue16=[~UNUSED3~] -OutputSigType16=Digital -OutputCue17=[~UNUSED3~] -OutputSigType17=Digital -OutputCue18=[~UNUSED3~] -OutputSigType18=Digital -OutputCue19=[~UNUSED3~] -OutputSigType19=Digital -OutputCue20=[~UNUSED3~] -OutputSigType20=Digital -OutputCue21=[~UNUSED3~] -OutputSigType21=Digital -OutputCue22=[~UNUSED2~] -OutputSigType22=Digital|Analog|Serial|String -OutputCue2012=[~EndGroup~]Enable -OutputSigType2012=Digital -OutputCue2013=[~BeginGroup~]Visible -OutputSigType2013=Digital -OutputCue2014=[~UNUSED3~] -OutputSigType2014=Digital -OutputCue2015=[~UNUSED3~] -OutputSigType2015=Digital -OutputCue2016=[~UNUSED3~] -OutputSigType2016=Digital -OutputCue2017=[~UNUSED3~] -OutputSigType2017=Digital -OutputCue2018=[~UNUSED3~] -OutputSigType2018=Digital -OutputCue2019=[~UNUSED3~] -OutputSigType2019=Digital -OutputCue2020=[~UNUSED3~] -OutputSigType2020=Digital -OutputCue2021=[~UNUSED3~] -OutputSigType2021=Digital -OutputCue2022=[~UNUSED3~] -OutputSigType2022=Digital -OutputCue2023=[~UNUSED3~] -OutputSigType2023=Digital -OutputCue2024=[~UNUSED2~] -OutputSigType2024=Digital|Analog|Serial|String -OutputCue4014=[~EndGroup~]Visible -OutputSigType4014=Digital -OutputCue4015=[~BeginGroup~]Press -OutputSigType4015=Digital -OutputCue4016=press1 -OutputSigType4016=Digital -OutputCue4017=press2 -OutputSigType4017=Digital -OutputCue4018=press3 -OutputSigType4018=Digital -OutputCue4019=press4 -OutputSigType4019=Digital -OutputCue4020=press5 -OutputSigType4020=Digital -OutputCue4021=press6 -OutputSigType4021=Digital -OutputCue4022=press7 -OutputSigType4022=Digital -OutputCue4023=press8 -OutputSigType4023=Digital -OutputCue4024=press9 -OutputSigType4024=Digital -OutputCue4025=press10 -OutputSigType4025=Digital -OutputCue4026=press11 -OutputSigType4026=Digital -OutputCue4027=press12 -OutputSigType4027=Digital -OutputCue4028=press13 -OutputSigType4028=Digital -OutputCue4029=press14 -OutputSigType4029=Digital -OutputCue4030=press15 -OutputSigType4030=Digital -OutputCue4031=press16 -OutputSigType4031=Digital -OutputCue4032=press17 -OutputSigType4032=Digital -OutputCue4033=press18 -OutputSigType4033=Digital -OutputCue4034=press19 -OutputSigType4034=Digital -OutputCue4035=press20 -OutputSigType4035=Digital -OutputCue4036=press21 -OutputSigType4036=Digital -OutputCue4037=press22 -OutputSigType4037=Digital -OutputCue4038=press23 -OutputSigType4038=Digital -OutputCue4039=press24 -OutputSigType4039=Digital -OutputCue4040=press25 -OutputSigType4040=Digital -OutputCue4041=press26 -OutputSigType4041=Digital -OutputCue4042=press27 -OutputSigType4042=Digital -OutputCue4043=press28 -OutputSigType4043=Digital -OutputCue4044=press29 -OutputSigType4044=Digital -OutputCue4045=press30 -OutputSigType4045=Digital -OutputCue4046=press31 -OutputSigType4046=Digital -OutputCue4047=press32 -OutputSigType4047=Digital -OutputCue4048=press33 -OutputSigType4048=Digital -OutputCue4049=press34 -OutputSigType4049=Digital -OutputCue4050=press35 -OutputSigType4050=Digital -OutputCue4051=press36 -OutputSigType4051=Digital -OutputCue4052=press37 -OutputSigType4052=Digital -OutputCue4053=press38 -OutputSigType4053=Digital -OutputCue4054=press39 -OutputSigType4054=Digital -OutputCue4055=press40 -OutputSigType4055=Digital -OutputCue4056=press41 -OutputSigType4056=Digital -OutputCue4057=press42 -OutputSigType4057=Digital -OutputCue4058=press43 -OutputSigType4058=Digital -OutputCue4059=press44 -OutputSigType4059=Digital -OutputCue4060=press45 -OutputSigType4060=Digital -OutputCue4061=press46 -OutputSigType4061=Digital -OutputCue4062=press47 -OutputSigType4062=Digital -OutputCue4063=press48 -OutputSigType4063=Digital -OutputCue4064=press49 -OutputSigType4064=Digital -OutputCue4065=press50 -OutputSigType4065=Digital -OutputCue4066=press51 -OutputSigType4066=Digital -OutputCue4067=press52 -OutputSigType4067=Digital -OutputCue4068=press53 -OutputSigType4068=Digital -OutputCue4069=press54 -OutputSigType4069=Digital -OutputCue4070=press55 -OutputSigType4070=Digital -OutputCue4071=press56 -OutputSigType4071=Digital -OutputCue4072=press57 -OutputSigType4072=Digital -OutputCue4073=press58 -OutputSigType4073=Digital -OutputCue4074=press59 -OutputSigType4074=Digital -OutputCue4075=press60 -OutputSigType4075=Digital -OutputCue4076=press61 -OutputSigType4076=Digital -OutputCue4077=press62 -OutputSigType4077=Digital -OutputCue4078=press63 -OutputSigType4078=Digital -OutputCue4079=press64 -OutputSigType4079=Digital -OutputCue4080=press65 -OutputSigType4080=Digital -OutputCue4081=press66 -OutputSigType4081=Digital -OutputCue4082=press67 -OutputSigType4082=Digital -OutputCue4083=press68 -OutputSigType4083=Digital -OutputCue4084=press69 -OutputSigType4084=Digital -OutputCue4085=press70 -OutputSigType4085=Digital -OutputCue4086=press71 -OutputSigType4086=Digital -OutputCue4087=press72 -OutputSigType4087=Digital -OutputCue4088=press73 -OutputSigType4088=Digital -OutputCue4089=press74 -OutputSigType4089=Digital -OutputCue4090=press75 -OutputSigType4090=Digital -OutputCue4091=press76 -OutputSigType4091=Digital -OutputCue4092=press77 -OutputSigType4092=Digital -OutputCue4093=press78 -OutputSigType4093=Digital -OutputCue4094=press79 -OutputSigType4094=Digital -OutputCue4095=press80 -OutputSigType4095=Digital -OutputCue4096=press81 -OutputSigType4096=Digital -OutputCue4097=press82 -OutputSigType4097=Digital -OutputCue4098=press83 -OutputSigType4098=Digital -OutputCue4099=press84 -OutputSigType4099=Digital -OutputCue4100=press85 -OutputSigType4100=Digital -OutputCue4101=press86 -OutputSigType4101=Digital -OutputCue4102=press87 -OutputSigType4102=Digital -OutputCue4103=press88 -OutputSigType4103=Digital -OutputCue4104=press89 -OutputSigType4104=Digital -OutputCue4105=press90 -OutputSigType4105=Digital -OutputCue4106=press91 -OutputSigType4106=Digital -OutputCue4107=press92 -OutputSigType4107=Digital -OutputCue4108=press93 -OutputSigType4108=Digital -OutputCue4109=press94 -OutputSigType4109=Digital -OutputCue4110=press95 -OutputSigType4110=Digital -OutputCue4111=press96 -OutputSigType4111=Digital -OutputCue4112=press97 -OutputSigType4112=Digital -OutputCue4113=press98 -OutputSigType4113=Digital -OutputCue4114=press99 -OutputSigType4114=Digital -OutputCue4115=press100 -OutputSigType4115=Digital -OutputCue4116=[~EndGroup~]Press -OutputSigType4116=Digital -InputList2Cue1=[~UNUSED3~] -InputList2SigType1=Analog -InputList2Cue2=Scroll To Item -InputList2SigType2=Analog -InputList2Cue3=Set Number of Items -InputList2SigType3=Analog -InputList2Cue4=[~UNUSED2~] -InputList2SigType4=Analog -InputList2Cue5=[~UNUSED2~] -InputList2SigType5=Analog -InputList2Cue6=[~UNUSED2~] -InputList2SigType6=Analog -InputList2Cue7=[~UNUSED2~] -InputList2SigType7=Analog -InputList2Cue8=[~UNUSED2~] -InputList2SigType8=Analog -InputList2Cue9=[~UNUSED2~] -InputList2SigType9=Analog -InputList2Cue10=[~UNUSED2~] -InputList2SigType10=Analog -InputList2Cue11=[~BeginGroup~]an_fb -InputList2SigType11=Analog -InputList2Cue12=an_fb1 -InputList2SigType12=Analog -InputList2Cue13=an_fb2 -InputList2SigType13=Analog -InputList2Cue14=an_fb3 -InputList2SigType14=Analog -InputList2Cue15=an_fb4 -InputList2SigType15=Analog -InputList2Cue16=an_fb5 -InputList2SigType16=Analog -InputList2Cue17=an_fb6 -InputList2SigType17=Analog -InputList2Cue18=an_fb7 -InputList2SigType18=Analog -InputList2Cue19=an_fb8 -InputList2SigType19=Analog -InputList2Cue20=an_fb9 -InputList2SigType20=Analog -InputList2Cue21=an_fb10 -InputList2SigType21=Analog -InputList2Cue22=an_fb11 -InputList2SigType22=Analog -InputList2Cue23=an_fb12 -InputList2SigType23=Analog -InputList2Cue24=an_fb13 -InputList2SigType24=Analog -InputList2Cue25=an_fb14 -InputList2SigType25=Analog -InputList2Cue26=an_fb15 -InputList2SigType26=Analog -InputList2Cue27=an_fb16 -InputList2SigType27=Analog -InputList2Cue28=an_fb17 -InputList2SigType28=Analog -InputList2Cue29=an_fb18 -InputList2SigType29=Analog -InputList2Cue30=an_fb19 -InputList2SigType30=Analog -InputList2Cue31=an_fb20 -InputList2SigType31=Analog -InputList2Cue32=an_fb21 -InputList2SigType32=Analog -InputList2Cue33=an_fb22 -InputList2SigType33=Analog -InputList2Cue34=an_fb23 -InputList2SigType34=Analog -InputList2Cue35=an_fb24 -InputList2SigType35=Analog -InputList2Cue36=an_fb25 -InputList2SigType36=Analog -InputList2Cue37=an_fb26 -InputList2SigType37=Analog -InputList2Cue38=an_fb27 -InputList2SigType38=Analog -InputList2Cue39=an_fb28 -InputList2SigType39=Analog -InputList2Cue40=an_fb29 -InputList2SigType40=Analog -InputList2Cue41=an_fb30 -InputList2SigType41=Analog -InputList2Cue42=[~EndGroup~]an_fb -InputList2SigType42=Analog -OutputList2Cue1=Item Clicked -OutputList2SigType1=Analog -OutputList2Cue2=[~UNUSED3~] -OutputList2SigType2=Analog -OutputList2Cue3=[~UNUSED3~] -OutputList2SigType3=Analog -OutputList2Cue4=[~UNUSED2~] -OutputList2SigType4=Analog -OutputList2Cue5=[~UNUSED2~] -OutputList2SigType5=Analog -OutputList2Cue6=[~UNUSED2~] -OutputList2SigType6=Analog -OutputList2Cue7=[~UNUSED2~] -OutputList2SigType7=Analog -OutputList2Cue8=[~UNUSED2~] -OutputList2SigType8=Analog -OutputList2Cue9=[~UNUSED2~] -OutputList2SigType9=Analog -OutputList2Cue10=[~UNUSED2~] -OutputList2SigType10=Analog -OutputList2Cue11=[~BeginGroup~]an_act -OutputList2SigType11=Analog -OutputList2Cue12=an_act1 -OutputList2SigType12=Analog -OutputList2Cue13=an_act2 -OutputList2SigType13=Analog -OutputList2Cue14=an_act3 -OutputList2SigType14=Analog -OutputList2Cue15=an_act4 -OutputList2SigType15=Analog -OutputList2Cue16=an_act5 -OutputList2SigType16=Analog -OutputList2Cue17=an_act6 -OutputList2SigType17=Analog -OutputList2Cue18=an_act7 -OutputList2SigType18=Analog -OutputList2Cue19=an_act8 -OutputList2SigType19=Analog -OutputList2Cue20=an_act9 -OutputList2SigType20=Analog -OutputList2Cue21=an_act10 -OutputList2SigType21=Analog -OutputList2Cue22=an_act11 -OutputList2SigType22=Analog -OutputList2Cue23=an_act12 -OutputList2SigType23=Analog -OutputList2Cue24=an_act13 -OutputList2SigType24=Analog -OutputList2Cue25=an_act14 -OutputList2SigType25=Analog -OutputList2Cue26=an_act15 -OutputList2SigType26=Analog -OutputList2Cue27=an_act16 -OutputList2SigType27=Analog -OutputList2Cue28=an_act17 -OutputList2SigType28=Analog -OutputList2Cue29=an_act18 -OutputList2SigType29=Analog -OutputList2Cue30=an_act19 -OutputList2SigType30=Analog -OutputList2Cue31=an_act20 -OutputList2SigType31=Analog -OutputList2Cue32=an_act21 -OutputList2SigType32=Analog -OutputList2Cue33=an_act22 -OutputList2SigType33=Analog -OutputList2Cue34=an_act23 -OutputList2SigType34=Analog -OutputList2Cue35=an_act24 -OutputList2SigType35=Analog -OutputList2Cue36=an_act25 -OutputList2SigType36=Analog -OutputList2Cue37=an_act26 -OutputList2SigType37=Analog -OutputList2Cue38=an_act27 -OutputList2SigType38=Analog -OutputList2Cue39=an_act28 -OutputList2SigType39=Analog -OutputList2Cue40=an_act29 -OutputList2SigType40=Analog -OutputList2Cue41=an_act30 -OutputList2SigType41=Analog -OutputList2Cue42=[~EndGroup~]an_act -OutputList2SigType42=Analog -InputList3Cue1=[~UNUSED2~] -InputList3SigType1=Serial -InputList3Cue2=[~UNUSED2~] -InputList3SigType2=Serial -InputList3Cue3=[~UNUSED2~] -InputList3SigType3=Serial -InputList3Cue4=[~UNUSED2~] -InputList3SigType4=Serial -InputList3Cue5=[~UNUSED2~] -InputList3SigType5=Serial -InputList3Cue6=[~UNUSED2~] -InputList3SigType6=Serial -InputList3Cue7=[~UNUSED2~] -InputList3SigType7=Serial -InputList3Cue8=[~UNUSED2~] -InputList3SigType8=Serial -InputList3Cue9=[~UNUSED2~] -InputList3SigType9=Serial -InputList3Cue10=[~UNUSED2~] -InputList3SigType10=Serial -InputList3Cue11=[~BeginGroup~]text-o -InputList3SigType11=Serial -InputList3Cue12=text-o1 -InputList3SigType12=Serial -InputList3Cue13=text-o2 -InputList3SigType13=Serial -InputList3Cue14=text-o3 -InputList3SigType14=Serial -InputList3Cue15=text-o4 -InputList3SigType15=Serial -InputList3Cue16=text-o5 -InputList3SigType16=Serial -InputList3Cue17=text-o6 -InputList3SigType17=Serial -InputList3Cue18=text-o7 -InputList3SigType18=Serial -InputList3Cue19=text-o8 -InputList3SigType19=Serial -InputList3Cue20=text-o9 -InputList3SigType20=Serial -InputList3Cue21=text-o10 -InputList3SigType21=Serial -InputList3Cue22=text-o11 -InputList3SigType22=Serial -InputList3Cue23=text-o12 -InputList3SigType23=Serial -InputList3Cue24=text-o13 -InputList3SigType24=Serial -InputList3Cue25=text-o14 -InputList3SigType25=Serial -InputList3Cue26=text-o15 -InputList3SigType26=Serial -InputList3Cue27=text-o16 -InputList3SigType27=Serial -InputList3Cue28=text-o17 -InputList3SigType28=Serial -InputList3Cue29=text-o18 -InputList3SigType29=Serial -InputList3Cue30=text-o19 -InputList3SigType30=Serial -InputList3Cue31=text-o20 -InputList3SigType31=Serial -InputList3Cue32=text-o21 -InputList3SigType32=Serial -InputList3Cue33=text-o22 -InputList3SigType33=Serial -InputList3Cue34=text-o23 -InputList3SigType34=Serial -InputList3Cue35=text-o24 -InputList3SigType35=Serial -InputList3Cue36=text-o25 -InputList3SigType36=Serial -InputList3Cue37=text-o26 -InputList3SigType37=Serial -InputList3Cue38=text-o27 -InputList3SigType38=Serial -InputList3Cue39=text-o28 -InputList3SigType39=Serial -InputList3Cue40=text-o29 -InputList3SigType40=Serial -InputList3Cue41=text-o30 -InputList3SigType41=Serial -InputList3Cue42=[~EndGroup~]text-o -InputList3SigType42=Serial -OutputList3Cue1=[~UNUSED2~] -OutputList3SigType1=Serial -OutputList3Cue2=[~UNUSED2~] -OutputList3SigType2=Serial -OutputList3Cue3=[~UNUSED2~] -OutputList3SigType3=Serial -OutputList3Cue4=[~UNUSED2~] -OutputList3SigType4=Serial -OutputList3Cue5=[~UNUSED2~] -OutputList3SigType5=Serial -OutputList3Cue6=[~UNUSED2~] -OutputList3SigType6=Serial -OutputList3Cue7=[~UNUSED2~] -OutputList3SigType7=Serial -OutputList3Cue8=[~UNUSED2~] -OutputList3SigType8=Serial -OutputList3Cue9=[~UNUSED2~] -OutputList3SigType9=Serial -OutputList3Cue10=[~UNUSED2~] -OutputList3SigType10=Serial -OutputList3Cue11=[~BeginGroup~]text-i -OutputList3SigType11=Serial -OutputList3Cue12=text-i1 -OutputList3SigType12=Serial -OutputList3Cue13=text-i2 -OutputList3SigType13=Serial -OutputList3Cue14=text-i3 -OutputList3SigType14=Serial -OutputList3Cue15=text-i4 -OutputList3SigType15=Serial -OutputList3Cue16=text-i5 -OutputList3SigType16=Serial -OutputList3Cue17=text-i6 -OutputList3SigType17=Serial -OutputList3Cue18=text-i7 -OutputList3SigType18=Serial -OutputList3Cue19=text-i8 -OutputList3SigType19=Serial -OutputList3Cue20=text-i9 -OutputList3SigType20=Serial -OutputList3Cue21=text-i10 -OutputList3SigType21=Serial -OutputList3Cue22=text-i11 -OutputList3SigType22=Serial -OutputList3Cue23=text-i12 -OutputList3SigType23=Serial -OutputList3Cue24=text-i13 -OutputList3SigType24=Serial -OutputList3Cue25=text-i14 -OutputList3SigType25=Serial -OutputList3Cue26=text-i15 -OutputList3SigType26=Serial -OutputList3Cue27=text-i16 -OutputList3SigType27=Serial -OutputList3Cue28=text-i17 -OutputList3SigType28=Serial -OutputList3Cue29=text-i18 -OutputList3SigType29=Serial -OutputList3Cue30=text-i19 -OutputList3SigType30=Serial -OutputList3Cue31=text-i20 -OutputList3SigType31=Serial -OutputList3Cue32=text-i21 -OutputList3SigType32=Serial -OutputList3Cue33=text-i22 -OutputList3SigType33=Serial -OutputList3Cue34=text-i23 -OutputList3SigType34=Serial -OutputList3Cue35=text-i24 -OutputList3SigType35=Serial -OutputList3Cue36=text-i25 -OutputList3SigType36=Serial -OutputList3Cue37=text-i26 -OutputList3SigType37=Serial -OutputList3Cue38=text-i27 -OutputList3SigType38=Serial -OutputList3Cue39=text-i28 -OutputList3SigType39=Serial -OutputList3Cue40=text-i29 -OutputList3SigType40=Serial -OutputList3Cue41=text-i30 -OutputList3SigType41=Serial -OutputList3Cue42=[~EndGroup~]text-i -OutputList3SigType42=Serial -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=6 -CedH=6 -SmartObjId=3904d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=6 -Tp=1 -HD=TRUE -DV=3904d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=6 -Name=PepperDash Essentials TSW-760_[E.Technician Controls] Display Controls_Subpage Reference List Vertical_4.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials TSW-760_[B.AV] Staging_Subpage Reference List Horizontal_3.ced -Hint=Subpage Reference List Horizontal_3 (Smart Object ID=3200) -Code=7 -SGControlType=Subpage Reference List Horizontal -SGControlName=Subpage Reference List Horizontal_3 -GUID=D638D437-6722-43E1-B435-EF13DCE5ECF0 -SmplCName=PepperDash Essentials TSW-760_[B.AV] Staging_Subpage Reference List Horizontal_3.ced -SMWRev=4.02.20 -Expand=expand_random -HelpID=10124 -Render=8 -;Define the number of inputs, outputs and parameters -MinVariableInputs=4076 -MaxVariableInputs=4076 -MinVariableOutputs=4076 -MaxVariableOutputs=4076 -NumFixedParams=1 -MinVariableInputsList2=72 -MaxVariableInputsList2=72 -MinVariableOutputsList2=72 -MaxVariableOutputsList2=72 -MinVariableInputsList3=72 -MaxVariableInputsList3=72 -MinVariableOutputsList3=72 -MaxVariableOutputsList3=72 -InputSigType1=Digital -OutputSigType1=Digital -InputList2SigType1=Analog -OutputList2SigType1=Analog -InputList3SigType1=Serial -OutputList3SigType1=Serial - -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -InputCue2=[~UNUSED2~] -InputSigType2=Digital -InputCue3=[~UNUSED2~] -InputSigType3=Digital -InputCue4=[~UNUSED2~] -InputSigType4=Digital -InputCue5=[~UNUSED2~] -InputSigType5=Digital -InputCue6=[~UNUSED2~] -InputSigType6=Digital -InputCue7=[~UNUSED2~] -InputSigType7=Digital -InputCue8=[~UNUSED2~] -InputSigType8=Digital -InputCue9=[~UNUSED2~] -InputSigType9=Digital -InputCue10=[~UNUSED2~] -InputSigType10=Digital -InputCue11=[~BeginGroup~]Enable -InputSigType11=Digital -InputCue12=Item 1 Enable -InputSigType12=Digital -InputCue13=Item 2 Enable -InputSigType13=Digital -InputCue14=Item 3 Enable -InputSigType14=Digital -InputCue15=Item 4 Enable -InputSigType15=Digital -InputCue16=Item 5 Enable -InputSigType16=Digital -InputCue17=Item 6 Enable -InputSigType17=Digital -InputCue18=Item 7 Enable -InputSigType18=Digital -InputCue19=Item 8 Enable -InputSigType19=Digital -InputCue20=Item 9 Enable -InputSigType20=Digital -InputCue21=Item 10 Enable -InputSigType21=Digital -InputCue22=Item 11 Enable -InputSigType22=Digital -InputCue23=Item 12 Enable -InputSigType23=Digital -InputCue24=Item 13 Enable -InputSigType24=Digital -InputCue25=Item 14 Enable -InputSigType25=Digital -InputCue26=Item 15 Enable -InputSigType26=Digital -InputCue27=Item 16 Enable -InputSigType27=Digital -InputCue28=Item 17 Enable -InputSigType28=Digital -InputCue29=Item 18 Enable -InputSigType29=Digital -InputCue30=Item 19 Enable -InputSigType30=Digital -InputCue31=Item 20 Enable -InputSigType31=Digital -InputCue32=[~UNUSED2~] -InputSigType32=Digital|Analog|Serial|String -InputCue2012=[~EndGroup~]Enable -InputSigType2012=Digital -InputCue2013=[~BeginGroup~]Visible -InputSigType2013=Digital -InputCue2014=Item 1 Visible -InputSigType2014=Digital -InputCue2015=Item 2 Visible -InputSigType2015=Digital -InputCue2016=Item 3 Visible -InputSigType2016=Digital -InputCue2017=Item 4 Visible -InputSigType2017=Digital -InputCue2018=Item 5 Visible -InputSigType2018=Digital -InputCue2019=Item 6 Visible -InputSigType2019=Digital -InputCue2020=Item 7 Visible -InputSigType2020=Digital -InputCue2021=Item 8 Visible -InputSigType2021=Digital -InputCue2022=Item 9 Visible -InputSigType2022=Digital -InputCue2023=Item 10 Visible -InputSigType2023=Digital -InputCue2024=Item 11 Visible -InputSigType2024=Digital -InputCue2025=Item 12 Visible -InputSigType2025=Digital -InputCue2026=Item 13 Visible -InputSigType2026=Digital -InputCue2027=Item 14 Visible -InputSigType2027=Digital -InputCue2028=Item 15 Visible -InputSigType2028=Digital -InputCue2029=Item 16 Visible -InputSigType2029=Digital -InputCue2030=Item 17 Visible -InputSigType2030=Digital -InputCue2031=Item 18 Visible -InputSigType2031=Digital -InputCue2032=Item 19 Visible -InputSigType2032=Digital -InputCue2033=Item 20 Visible -InputSigType2033=Digital -InputCue2034=[~UNUSED2~] -InputSigType2034=Digital|Analog|Serial|String -InputCue4014=[~EndGroup~]Visible -InputSigType4014=Digital -InputCue4015=[~BeginGroup~]fb -InputSigType4015=Digital -InputCue4016=fb1 -InputSigType4016=Digital -InputCue4017=fb2 -InputSigType4017=Digital -InputCue4018=fb3 -InputSigType4018=Digital -InputCue4019=fb4 -InputSigType4019=Digital -InputCue4020=fb5 -InputSigType4020=Digital -InputCue4021=fb6 -InputSigType4021=Digital -InputCue4022=fb7 -InputSigType4022=Digital -InputCue4023=fb8 -InputSigType4023=Digital -InputCue4024=fb9 -InputSigType4024=Digital -InputCue4025=fb10 -InputSigType4025=Digital -InputCue4026=fb11 -InputSigType4026=Digital -InputCue4027=fb12 -InputSigType4027=Digital -InputCue4028=fb13 -InputSigType4028=Digital -InputCue4029=fb14 -InputSigType4029=Digital -InputCue4030=fb15 -InputSigType4030=Digital -InputCue4031=fb16 -InputSigType4031=Digital -InputCue4032=fb17 -InputSigType4032=Digital -InputCue4033=fb18 -InputSigType4033=Digital -InputCue4034=fb19 -InputSigType4034=Digital -InputCue4035=fb20 -InputSigType4035=Digital -InputCue4036=fb21 -InputSigType4036=Digital -InputCue4037=fb22 -InputSigType4037=Digital -InputCue4038=fb23 -InputSigType4038=Digital -InputCue4039=fb24 -InputSigType4039=Digital -InputCue4040=fb25 -InputSigType4040=Digital -InputCue4041=fb26 -InputSigType4041=Digital -InputCue4042=fb27 -InputSigType4042=Digital -InputCue4043=fb28 -InputSigType4043=Digital -InputCue4044=fb29 -InputSigType4044=Digital -InputCue4045=fb30 -InputSigType4045=Digital -InputCue4046=fb31 -InputSigType4046=Digital -InputCue4047=fb32 -InputSigType4047=Digital -InputCue4048=fb33 -InputSigType4048=Digital -InputCue4049=fb34 -InputSigType4049=Digital -InputCue4050=fb35 -InputSigType4050=Digital -InputCue4051=fb36 -InputSigType4051=Digital -InputCue4052=fb37 -InputSigType4052=Digital -InputCue4053=fb38 -InputSigType4053=Digital -InputCue4054=fb39 -InputSigType4054=Digital -InputCue4055=fb40 -InputSigType4055=Digital -InputCue4056=fb41 -InputSigType4056=Digital -InputCue4057=fb42 -InputSigType4057=Digital -InputCue4058=fb43 -InputSigType4058=Digital -InputCue4059=fb44 -InputSigType4059=Digital -InputCue4060=fb45 -InputSigType4060=Digital -InputCue4061=fb46 -InputSigType4061=Digital -InputCue4062=fb47 -InputSigType4062=Digital -InputCue4063=fb48 -InputSigType4063=Digital -InputCue4064=fb49 -InputSigType4064=Digital -InputCue4065=fb50 -InputSigType4065=Digital -InputCue4066=fb51 -InputSigType4066=Digital -InputCue4067=fb52 -InputSigType4067=Digital -InputCue4068=fb53 -InputSigType4068=Digital -InputCue4069=fb54 -InputSigType4069=Digital -InputCue4070=fb55 -InputSigType4070=Digital -InputCue4071=fb56 -InputSigType4071=Digital -InputCue4072=fb57 -InputSigType4072=Digital -InputCue4073=fb58 -InputSigType4073=Digital -InputCue4074=fb59 -InputSigType4074=Digital -InputCue4075=fb60 -InputSigType4075=Digital -InputCue4076=[~EndGroup~]fb -InputSigType4076=Digital -OutputCue1=Is Moving -OutputSigType1=Digital -OutputCue2=[~UNUSED2~] -OutputSigType2=Digital -OutputCue3=[~UNUSED2~] -OutputSigType3=Digital -OutputCue4=[~UNUSED2~] -OutputSigType4=Digital -OutputCue5=[~UNUSED2~] -OutputSigType5=Digital -OutputCue6=[~UNUSED2~] -OutputSigType6=Digital -OutputCue7=[~UNUSED2~] -OutputSigType7=Digital -OutputCue8=[~UNUSED2~] -OutputSigType8=Digital -OutputCue9=[~UNUSED2~] -OutputSigType9=Digital -OutputCue10=[~UNUSED2~] -OutputSigType10=Digital -OutputCue11=[~BeginGroup~]Enable -OutputSigType11=Digital -OutputCue12=[~UNUSED3~] -OutputSigType12=Digital -OutputCue13=[~UNUSED3~] -OutputSigType13=Digital -OutputCue14=[~UNUSED3~] -OutputSigType14=Digital -OutputCue15=[~UNUSED3~] -OutputSigType15=Digital -OutputCue16=[~UNUSED3~] -OutputSigType16=Digital -OutputCue17=[~UNUSED3~] -OutputSigType17=Digital -OutputCue18=[~UNUSED3~] -OutputSigType18=Digital -OutputCue19=[~UNUSED3~] -OutputSigType19=Digital -OutputCue20=[~UNUSED3~] -OutputSigType20=Digital -OutputCue21=[~UNUSED3~] -OutputSigType21=Digital -OutputCue22=[~UNUSED3~] -OutputSigType22=Digital -OutputCue23=[~UNUSED3~] -OutputSigType23=Digital -OutputCue24=[~UNUSED3~] -OutputSigType24=Digital -OutputCue25=[~UNUSED3~] -OutputSigType25=Digital -OutputCue26=[~UNUSED3~] -OutputSigType26=Digital -OutputCue27=[~UNUSED3~] -OutputSigType27=Digital -OutputCue28=[~UNUSED3~] -OutputSigType28=Digital -OutputCue29=[~UNUSED3~] -OutputSigType29=Digital -OutputCue30=[~UNUSED3~] -OutputSigType30=Digital -OutputCue31=[~UNUSED3~] -OutputSigType31=Digital -OutputCue32=[~UNUSED2~] -OutputSigType32=Digital|Analog|Serial|String -OutputCue2012=[~EndGroup~]Enable -OutputSigType2012=Digital -OutputCue2013=[~BeginGroup~]Visible -OutputSigType2013=Digital -OutputCue2014=[~UNUSED3~] -OutputSigType2014=Digital -OutputCue2015=[~UNUSED3~] -OutputSigType2015=Digital -OutputCue2016=[~UNUSED3~] -OutputSigType2016=Digital -OutputCue2017=[~UNUSED3~] -OutputSigType2017=Digital -OutputCue2018=[~UNUSED3~] -OutputSigType2018=Digital -OutputCue2019=[~UNUSED3~] -OutputSigType2019=Digital -OutputCue2020=[~UNUSED3~] -OutputSigType2020=Digital -OutputCue2021=[~UNUSED3~] -OutputSigType2021=Digital -OutputCue2022=[~UNUSED3~] -OutputSigType2022=Digital -OutputCue2023=[~UNUSED3~] -OutputSigType2023=Digital -OutputCue2024=[~UNUSED3~] -OutputSigType2024=Digital -OutputCue2025=[~UNUSED3~] -OutputSigType2025=Digital -OutputCue2026=[~UNUSED3~] -OutputSigType2026=Digital -OutputCue2027=[~UNUSED3~] -OutputSigType2027=Digital -OutputCue2028=[~UNUSED3~] -OutputSigType2028=Digital -OutputCue2029=[~UNUSED3~] -OutputSigType2029=Digital -OutputCue2030=[~UNUSED3~] -OutputSigType2030=Digital -OutputCue2031=[~UNUSED3~] -OutputSigType2031=Digital -OutputCue2032=[~UNUSED3~] -OutputSigType2032=Digital -OutputCue2033=[~UNUSED3~] -OutputSigType2033=Digital -OutputCue2034=[~UNUSED2~] -OutputSigType2034=Digital|Analog|Serial|String -OutputCue4014=[~EndGroup~]Visible -OutputSigType4014=Digital -OutputCue4015=[~BeginGroup~]Press -OutputSigType4015=Digital -OutputCue4016=press1 -OutputSigType4016=Digital -OutputCue4017=press2 -OutputSigType4017=Digital -OutputCue4018=press3 -OutputSigType4018=Digital -OutputCue4019=press4 -OutputSigType4019=Digital -OutputCue4020=press5 -OutputSigType4020=Digital -OutputCue4021=press6 -OutputSigType4021=Digital -OutputCue4022=press7 -OutputSigType4022=Digital -OutputCue4023=press8 -OutputSigType4023=Digital -OutputCue4024=press9 -OutputSigType4024=Digital -OutputCue4025=press10 -OutputSigType4025=Digital -OutputCue4026=press11 -OutputSigType4026=Digital -OutputCue4027=press12 -OutputSigType4027=Digital -OutputCue4028=press13 -OutputSigType4028=Digital -OutputCue4029=press14 -OutputSigType4029=Digital -OutputCue4030=press15 -OutputSigType4030=Digital -OutputCue4031=press16 -OutputSigType4031=Digital -OutputCue4032=press17 -OutputSigType4032=Digital -OutputCue4033=press18 -OutputSigType4033=Digital -OutputCue4034=press19 -OutputSigType4034=Digital -OutputCue4035=press20 -OutputSigType4035=Digital -OutputCue4036=press21 -OutputSigType4036=Digital -OutputCue4037=press22 -OutputSigType4037=Digital -OutputCue4038=press23 -OutputSigType4038=Digital -OutputCue4039=press24 -OutputSigType4039=Digital -OutputCue4040=press25 -OutputSigType4040=Digital -OutputCue4041=press26 -OutputSigType4041=Digital -OutputCue4042=press27 -OutputSigType4042=Digital -OutputCue4043=press28 -OutputSigType4043=Digital -OutputCue4044=press29 -OutputSigType4044=Digital -OutputCue4045=press30 -OutputSigType4045=Digital -OutputCue4046=press31 -OutputSigType4046=Digital -OutputCue4047=press32 -OutputSigType4047=Digital -OutputCue4048=press33 -OutputSigType4048=Digital -OutputCue4049=press34 -OutputSigType4049=Digital -OutputCue4050=press35 -OutputSigType4050=Digital -OutputCue4051=press36 -OutputSigType4051=Digital -OutputCue4052=press37 -OutputSigType4052=Digital -OutputCue4053=press38 -OutputSigType4053=Digital -OutputCue4054=press39 -OutputSigType4054=Digital -OutputCue4055=press40 -OutputSigType4055=Digital -OutputCue4056=press41 -OutputSigType4056=Digital -OutputCue4057=press42 -OutputSigType4057=Digital -OutputCue4058=press43 -OutputSigType4058=Digital -OutputCue4059=press44 -OutputSigType4059=Digital -OutputCue4060=press45 -OutputSigType4060=Digital -OutputCue4061=press46 -OutputSigType4061=Digital -OutputCue4062=press47 -OutputSigType4062=Digital -OutputCue4063=press48 -OutputSigType4063=Digital -OutputCue4064=press49 -OutputSigType4064=Digital -OutputCue4065=press50 -OutputSigType4065=Digital -OutputCue4066=press51 -OutputSigType4066=Digital -OutputCue4067=press52 -OutputSigType4067=Digital -OutputCue4068=press53 -OutputSigType4068=Digital -OutputCue4069=press54 -OutputSigType4069=Digital -OutputCue4070=press55 -OutputSigType4070=Digital -OutputCue4071=press56 -OutputSigType4071=Digital -OutputCue4072=press57 -OutputSigType4072=Digital -OutputCue4073=press58 -OutputSigType4073=Digital -OutputCue4074=press59 -OutputSigType4074=Digital -OutputCue4075=press60 -OutputSigType4075=Digital -OutputCue4076=[~EndGroup~]Press -OutputSigType4076=Digital -InputList2Cue1=[~UNUSED3~] -InputList2SigType1=Analog -InputList2Cue2=Scroll To Item -InputList2SigType2=Analog -InputList2Cue3=Set Number of Items -InputList2SigType3=Analog -InputList2Cue4=[~UNUSED2~] -InputList2SigType4=Analog -InputList2Cue5=[~UNUSED2~] -InputList2SigType5=Analog -InputList2Cue6=[~UNUSED2~] -InputList2SigType6=Analog -InputList2Cue7=[~UNUSED2~] -InputList2SigType7=Analog -InputList2Cue8=[~UNUSED2~] -InputList2SigType8=Analog -InputList2Cue9=[~UNUSED2~] -InputList2SigType9=Analog -InputList2Cue10=[~UNUSED2~] -InputList2SigType10=Analog -InputList2Cue11=[~BeginGroup~]an_fb -InputList2SigType11=Analog -InputList2Cue12=an_fb1 -InputList2SigType12=Analog -InputList2Cue13=an_fb2 -InputList2SigType13=Analog -InputList2Cue14=an_fb3 -InputList2SigType14=Analog -InputList2Cue15=an_fb4 -InputList2SigType15=Analog -InputList2Cue16=an_fb5 -InputList2SigType16=Analog -InputList2Cue17=an_fb6 -InputList2SigType17=Analog -InputList2Cue18=an_fb7 -InputList2SigType18=Analog -InputList2Cue19=an_fb8 -InputList2SigType19=Analog -InputList2Cue20=an_fb9 -InputList2SigType20=Analog -InputList2Cue21=an_fb10 -InputList2SigType21=Analog -InputList2Cue22=an_fb11 -InputList2SigType22=Analog -InputList2Cue23=an_fb12 -InputList2SigType23=Analog -InputList2Cue24=an_fb13 -InputList2SigType24=Analog -InputList2Cue25=an_fb14 -InputList2SigType25=Analog -InputList2Cue26=an_fb15 -InputList2SigType26=Analog -InputList2Cue27=an_fb16 -InputList2SigType27=Analog -InputList2Cue28=an_fb17 -InputList2SigType28=Analog -InputList2Cue29=an_fb18 -InputList2SigType29=Analog -InputList2Cue30=an_fb19 -InputList2SigType30=Analog -InputList2Cue31=an_fb20 -InputList2SigType31=Analog -InputList2Cue32=an_fb21 -InputList2SigType32=Analog -InputList2Cue33=an_fb22 -InputList2SigType33=Analog -InputList2Cue34=an_fb23 -InputList2SigType34=Analog -InputList2Cue35=an_fb24 -InputList2SigType35=Analog -InputList2Cue36=an_fb25 -InputList2SigType36=Analog -InputList2Cue37=an_fb26 -InputList2SigType37=Analog -InputList2Cue38=an_fb27 -InputList2SigType38=Analog -InputList2Cue39=an_fb28 -InputList2SigType39=Analog -InputList2Cue40=an_fb29 -InputList2SigType40=Analog -InputList2Cue41=an_fb30 -InputList2SigType41=Analog -InputList2Cue42=an_fb31 -InputList2SigType42=Analog -InputList2Cue43=an_fb32 -InputList2SigType43=Analog -InputList2Cue44=an_fb33 -InputList2SigType44=Analog -InputList2Cue45=an_fb34 -InputList2SigType45=Analog -InputList2Cue46=an_fb35 -InputList2SigType46=Analog -InputList2Cue47=an_fb36 -InputList2SigType47=Analog -InputList2Cue48=an_fb37 -InputList2SigType48=Analog -InputList2Cue49=an_fb38 -InputList2SigType49=Analog -InputList2Cue50=an_fb39 -InputList2SigType50=Analog -InputList2Cue51=an_fb40 -InputList2SigType51=Analog -InputList2Cue52=an_fb41 -InputList2SigType52=Analog -InputList2Cue53=an_fb42 -InputList2SigType53=Analog -InputList2Cue54=an_fb43 -InputList2SigType54=Analog -InputList2Cue55=an_fb44 -InputList2SigType55=Analog -InputList2Cue56=an_fb45 -InputList2SigType56=Analog -InputList2Cue57=an_fb46 -InputList2SigType57=Analog -InputList2Cue58=an_fb47 -InputList2SigType58=Analog -InputList2Cue59=an_fb48 -InputList2SigType59=Analog -InputList2Cue60=an_fb49 -InputList2SigType60=Analog -InputList2Cue61=an_fb50 -InputList2SigType61=Analog -InputList2Cue62=an_fb51 -InputList2SigType62=Analog -InputList2Cue63=an_fb52 -InputList2SigType63=Analog -InputList2Cue64=an_fb53 -InputList2SigType64=Analog -InputList2Cue65=an_fb54 -InputList2SigType65=Analog -InputList2Cue66=an_fb55 -InputList2SigType66=Analog -InputList2Cue67=an_fb56 -InputList2SigType67=Analog -InputList2Cue68=an_fb57 -InputList2SigType68=Analog -InputList2Cue69=an_fb58 -InputList2SigType69=Analog -InputList2Cue70=an_fb59 -InputList2SigType70=Analog -InputList2Cue71=an_fb60 -InputList2SigType71=Analog -InputList2Cue72=[~EndGroup~]an_fb -InputList2SigType72=Analog -OutputList2Cue1=Item Clicked -OutputList2SigType1=Analog -OutputList2Cue2=[~UNUSED3~] -OutputList2SigType2=Analog -OutputList2Cue3=[~UNUSED3~] -OutputList2SigType3=Analog -OutputList2Cue4=[~UNUSED2~] -OutputList2SigType4=Analog -OutputList2Cue5=[~UNUSED2~] -OutputList2SigType5=Analog -OutputList2Cue6=[~UNUSED2~] -OutputList2SigType6=Analog -OutputList2Cue7=[~UNUSED2~] -OutputList2SigType7=Analog -OutputList2Cue8=[~UNUSED2~] -OutputList2SigType8=Analog -OutputList2Cue9=[~UNUSED2~] -OutputList2SigType9=Analog -OutputList2Cue10=[~UNUSED2~] -OutputList2SigType10=Analog -OutputList2Cue11=[~BeginGroup~]an_act -OutputList2SigType11=Analog -OutputList2Cue12=an_act1 -OutputList2SigType12=Analog -OutputList2Cue13=an_act2 -OutputList2SigType13=Analog -OutputList2Cue14=an_act3 -OutputList2SigType14=Analog -OutputList2Cue15=an_act4 -OutputList2SigType15=Analog -OutputList2Cue16=an_act5 -OutputList2SigType16=Analog -OutputList2Cue17=an_act6 -OutputList2SigType17=Analog -OutputList2Cue18=an_act7 -OutputList2SigType18=Analog -OutputList2Cue19=an_act8 -OutputList2SigType19=Analog -OutputList2Cue20=an_act9 -OutputList2SigType20=Analog -OutputList2Cue21=an_act10 -OutputList2SigType21=Analog -OutputList2Cue22=an_act11 -OutputList2SigType22=Analog -OutputList2Cue23=an_act12 -OutputList2SigType23=Analog -OutputList2Cue24=an_act13 -OutputList2SigType24=Analog -OutputList2Cue25=an_act14 -OutputList2SigType25=Analog -OutputList2Cue26=an_act15 -OutputList2SigType26=Analog -OutputList2Cue27=an_act16 -OutputList2SigType27=Analog -OutputList2Cue28=an_act17 -OutputList2SigType28=Analog -OutputList2Cue29=an_act18 -OutputList2SigType29=Analog -OutputList2Cue30=an_act19 -OutputList2SigType30=Analog -OutputList2Cue31=an_act20 -OutputList2SigType31=Analog -OutputList2Cue32=an_act21 -OutputList2SigType32=Analog -OutputList2Cue33=an_act22 -OutputList2SigType33=Analog -OutputList2Cue34=an_act23 -OutputList2SigType34=Analog -OutputList2Cue35=an_act24 -OutputList2SigType35=Analog -OutputList2Cue36=an_act25 -OutputList2SigType36=Analog -OutputList2Cue37=an_act26 -OutputList2SigType37=Analog -OutputList2Cue38=an_act27 -OutputList2SigType38=Analog -OutputList2Cue39=an_act28 -OutputList2SigType39=Analog -OutputList2Cue40=an_act29 -OutputList2SigType40=Analog -OutputList2Cue41=an_act30 -OutputList2SigType41=Analog -OutputList2Cue42=an_act31 -OutputList2SigType42=Analog -OutputList2Cue43=an_act32 -OutputList2SigType43=Analog -OutputList2Cue44=an_act33 -OutputList2SigType44=Analog -OutputList2Cue45=an_act34 -OutputList2SigType45=Analog -OutputList2Cue46=an_act35 -OutputList2SigType46=Analog -OutputList2Cue47=an_act36 -OutputList2SigType47=Analog -OutputList2Cue48=an_act37 -OutputList2SigType48=Analog -OutputList2Cue49=an_act38 -OutputList2SigType49=Analog -OutputList2Cue50=an_act39 -OutputList2SigType50=Analog -OutputList2Cue51=an_act40 -OutputList2SigType51=Analog -OutputList2Cue52=an_act41 -OutputList2SigType52=Analog -OutputList2Cue53=an_act42 -OutputList2SigType53=Analog -OutputList2Cue54=an_act43 -OutputList2SigType54=Analog -OutputList2Cue55=an_act44 -OutputList2SigType55=Analog -OutputList2Cue56=an_act45 -OutputList2SigType56=Analog -OutputList2Cue57=an_act46 -OutputList2SigType57=Analog -OutputList2Cue58=an_act47 -OutputList2SigType58=Analog -OutputList2Cue59=an_act48 -OutputList2SigType59=Analog -OutputList2Cue60=an_act49 -OutputList2SigType60=Analog -OutputList2Cue61=an_act50 -OutputList2SigType61=Analog -OutputList2Cue62=an_act51 -OutputList2SigType62=Analog -OutputList2Cue63=an_act52 -OutputList2SigType63=Analog -OutputList2Cue64=an_act53 -OutputList2SigType64=Analog -OutputList2Cue65=an_act54 -OutputList2SigType65=Analog -OutputList2Cue66=an_act55 -OutputList2SigType66=Analog -OutputList2Cue67=an_act56 -OutputList2SigType67=Analog -OutputList2Cue68=an_act57 -OutputList2SigType68=Analog -OutputList2Cue69=an_act58 -OutputList2SigType69=Analog -OutputList2Cue70=an_act59 -OutputList2SigType70=Analog -OutputList2Cue71=an_act60 -OutputList2SigType71=Analog -OutputList2Cue72=[~EndGroup~]an_act -OutputList2SigType72=Analog -InputList3Cue1=[~UNUSED2~] -InputList3SigType1=Serial -InputList3Cue2=[~UNUSED2~] -InputList3SigType2=Serial -InputList3Cue3=[~UNUSED2~] -InputList3SigType3=Serial -InputList3Cue4=[~UNUSED2~] -InputList3SigType4=Serial -InputList3Cue5=[~UNUSED2~] -InputList3SigType5=Serial -InputList3Cue6=[~UNUSED2~] -InputList3SigType6=Serial -InputList3Cue7=[~UNUSED2~] -InputList3SigType7=Serial -InputList3Cue8=[~UNUSED2~] -InputList3SigType8=Serial -InputList3Cue9=[~UNUSED2~] -InputList3SigType9=Serial -InputList3Cue10=[~UNUSED2~] -InputList3SigType10=Serial -InputList3Cue11=[~BeginGroup~]text-o -InputList3SigType11=Serial -InputList3Cue12=text-o1 -InputList3SigType12=Serial -InputList3Cue13=text-o2 -InputList3SigType13=Serial -InputList3Cue14=text-o3 -InputList3SigType14=Serial -InputList3Cue15=text-o4 -InputList3SigType15=Serial -InputList3Cue16=text-o5 -InputList3SigType16=Serial -InputList3Cue17=text-o6 -InputList3SigType17=Serial -InputList3Cue18=text-o7 -InputList3SigType18=Serial -InputList3Cue19=text-o8 -InputList3SigType19=Serial -InputList3Cue20=text-o9 -InputList3SigType20=Serial -InputList3Cue21=text-o10 -InputList3SigType21=Serial -InputList3Cue22=text-o11 -InputList3SigType22=Serial -InputList3Cue23=text-o12 -InputList3SigType23=Serial -InputList3Cue24=text-o13 -InputList3SigType24=Serial -InputList3Cue25=text-o14 -InputList3SigType25=Serial -InputList3Cue26=text-o15 -InputList3SigType26=Serial -InputList3Cue27=text-o16 -InputList3SigType27=Serial -InputList3Cue28=text-o17 -InputList3SigType28=Serial -InputList3Cue29=text-o18 -InputList3SigType29=Serial -InputList3Cue30=text-o19 -InputList3SigType30=Serial -InputList3Cue31=text-o20 -InputList3SigType31=Serial -InputList3Cue32=text-o21 -InputList3SigType32=Serial -InputList3Cue33=text-o22 -InputList3SigType33=Serial -InputList3Cue34=text-o23 -InputList3SigType34=Serial -InputList3Cue35=text-o24 -InputList3SigType35=Serial -InputList3Cue36=text-o25 -InputList3SigType36=Serial -InputList3Cue37=text-o26 -InputList3SigType37=Serial -InputList3Cue38=text-o27 -InputList3SigType38=Serial -InputList3Cue39=text-o28 -InputList3SigType39=Serial -InputList3Cue40=text-o29 -InputList3SigType40=Serial -InputList3Cue41=text-o30 -InputList3SigType41=Serial -InputList3Cue42=text-o31 -InputList3SigType42=Serial -InputList3Cue43=text-o32 -InputList3SigType43=Serial -InputList3Cue44=text-o33 -InputList3SigType44=Serial -InputList3Cue45=text-o34 -InputList3SigType45=Serial -InputList3Cue46=text-o35 -InputList3SigType46=Serial -InputList3Cue47=text-o36 -InputList3SigType47=Serial -InputList3Cue48=text-o37 -InputList3SigType48=Serial -InputList3Cue49=text-o38 -InputList3SigType49=Serial -InputList3Cue50=text-o39 -InputList3SigType50=Serial -InputList3Cue51=text-o40 -InputList3SigType51=Serial -InputList3Cue52=text-o41 -InputList3SigType52=Serial -InputList3Cue53=text-o42 -InputList3SigType53=Serial -InputList3Cue54=text-o43 -InputList3SigType54=Serial -InputList3Cue55=text-o44 -InputList3SigType55=Serial -InputList3Cue56=text-o45 -InputList3SigType56=Serial -InputList3Cue57=text-o46 -InputList3SigType57=Serial -InputList3Cue58=text-o47 -InputList3SigType58=Serial -InputList3Cue59=text-o48 -InputList3SigType59=Serial -InputList3Cue60=text-o49 -InputList3SigType60=Serial -InputList3Cue61=text-o50 -InputList3SigType61=Serial -InputList3Cue62=text-o51 -InputList3SigType62=Serial -InputList3Cue63=text-o52 -InputList3SigType63=Serial -InputList3Cue64=text-o53 -InputList3SigType64=Serial -InputList3Cue65=text-o54 -InputList3SigType65=Serial -InputList3Cue66=text-o55 -InputList3SigType66=Serial -InputList3Cue67=text-o56 -InputList3SigType67=Serial -InputList3Cue68=text-o57 -InputList3SigType68=Serial -InputList3Cue69=text-o58 -InputList3SigType69=Serial -InputList3Cue70=text-o59 -InputList3SigType70=Serial -InputList3Cue71=text-o60 -InputList3SigType71=Serial -InputList3Cue72=[~EndGroup~]text-o -InputList3SigType72=Serial -OutputList3Cue1=[~UNUSED2~] -OutputList3SigType1=Serial -OutputList3Cue2=[~UNUSED2~] -OutputList3SigType2=Serial -OutputList3Cue3=[~UNUSED2~] -OutputList3SigType3=Serial -OutputList3Cue4=[~UNUSED2~] -OutputList3SigType4=Serial -OutputList3Cue5=[~UNUSED2~] -OutputList3SigType5=Serial -OutputList3Cue6=[~UNUSED2~] -OutputList3SigType6=Serial -OutputList3Cue7=[~UNUSED2~] -OutputList3SigType7=Serial -OutputList3Cue8=[~UNUSED2~] -OutputList3SigType8=Serial -OutputList3Cue9=[~UNUSED2~] -OutputList3SigType9=Serial -OutputList3Cue10=[~UNUSED2~] -OutputList3SigType10=Serial -OutputList3Cue11=[~BeginGroup~]text-i -OutputList3SigType11=Serial -OutputList3Cue12=text-i1 -OutputList3SigType12=Serial -OutputList3Cue13=text-i2 -OutputList3SigType13=Serial -OutputList3Cue14=text-i3 -OutputList3SigType14=Serial -OutputList3Cue15=text-i4 -OutputList3SigType15=Serial -OutputList3Cue16=text-i5 -OutputList3SigType16=Serial -OutputList3Cue17=text-i6 -OutputList3SigType17=Serial -OutputList3Cue18=text-i7 -OutputList3SigType18=Serial -OutputList3Cue19=text-i8 -OutputList3SigType19=Serial -OutputList3Cue20=text-i9 -OutputList3SigType20=Serial -OutputList3Cue21=text-i10 -OutputList3SigType21=Serial -OutputList3Cue22=text-i11 -OutputList3SigType22=Serial -OutputList3Cue23=text-i12 -OutputList3SigType23=Serial -OutputList3Cue24=text-i13 -OutputList3SigType24=Serial -OutputList3Cue25=text-i14 -OutputList3SigType25=Serial -OutputList3Cue26=text-i15 -OutputList3SigType26=Serial -OutputList3Cue27=text-i16 -OutputList3SigType27=Serial -OutputList3Cue28=text-i17 -OutputList3SigType28=Serial -OutputList3Cue29=text-i18 -OutputList3SigType29=Serial -OutputList3Cue30=text-i19 -OutputList3SigType30=Serial -OutputList3Cue31=text-i20 -OutputList3SigType31=Serial -OutputList3Cue32=text-i21 -OutputList3SigType32=Serial -OutputList3Cue33=text-i22 -OutputList3SigType33=Serial -OutputList3Cue34=text-i23 -OutputList3SigType34=Serial -OutputList3Cue35=text-i24 -OutputList3SigType35=Serial -OutputList3Cue36=text-i25 -OutputList3SigType36=Serial -OutputList3Cue37=text-i26 -OutputList3SigType37=Serial -OutputList3Cue38=text-i27 -OutputList3SigType38=Serial -OutputList3Cue39=text-i28 -OutputList3SigType39=Serial -OutputList3Cue40=text-i29 -OutputList3SigType40=Serial -OutputList3Cue41=text-i30 -OutputList3SigType41=Serial -OutputList3Cue42=text-i31 -OutputList3SigType42=Serial -OutputList3Cue43=text-i32 -OutputList3SigType43=Serial -OutputList3Cue44=text-i33 -OutputList3SigType44=Serial -OutputList3Cue45=text-i34 -OutputList3SigType45=Serial -OutputList3Cue46=text-i35 -OutputList3SigType46=Serial -OutputList3Cue47=text-i36 -OutputList3SigType47=Serial -OutputList3Cue48=text-i37 -OutputList3SigType48=Serial -OutputList3Cue49=text-i38 -OutputList3SigType49=Serial -OutputList3Cue50=text-i39 -OutputList3SigType50=Serial -OutputList3Cue51=text-i40 -OutputList3SigType51=Serial -OutputList3Cue52=text-i41 -OutputList3SigType52=Serial -OutputList3Cue53=text-i42 -OutputList3SigType53=Serial -OutputList3Cue54=text-i43 -OutputList3SigType54=Serial -OutputList3Cue55=text-i44 -OutputList3SigType55=Serial -OutputList3Cue56=text-i45 -OutputList3SigType56=Serial -OutputList3Cue57=text-i46 -OutputList3SigType57=Serial -OutputList3Cue58=text-i47 -OutputList3SigType58=Serial -OutputList3Cue59=text-i48 -OutputList3SigType59=Serial -OutputList3Cue60=text-i49 -OutputList3SigType60=Serial -OutputList3Cue61=text-i50 -OutputList3SigType61=Serial -OutputList3Cue62=text-i51 -OutputList3SigType62=Serial -OutputList3Cue63=text-i52 -OutputList3SigType63=Serial -OutputList3Cue64=text-i53 -OutputList3SigType64=Serial -OutputList3Cue65=text-i54 -OutputList3SigType65=Serial -OutputList3Cue66=text-i55 -OutputList3SigType66=Serial -OutputList3Cue67=text-i56 -OutputList3SigType67=Serial -OutputList3Cue68=text-i57 -OutputList3SigType68=Serial -OutputList3Cue69=text-i58 -OutputList3SigType69=Serial -OutputList3Cue70=text-i59 -OutputList3SigType70=Serial -OutputList3Cue71=text-i60 -OutputList3SigType71=Serial -OutputList3Cue72=[~EndGroup~]text-i -OutputList3SigType72=Serial -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=7 -CedH=7 -SmartObjId=3200d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=7 -Tp=1 -HD=TRUE -DV=3200d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=7 -Name=PepperDash Essentials TSW-760_[B.AV] Staging_Subpage Reference List Horizontal_3.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials TSW-760_[B.AV] Source Ctrl-CATV-Basic_Channel Preset List Basic.ced -Hint=Channel Preset List Basic (Smart Object ID=1806) -Code=8 -SGControlType=Subpage Reference List Vertical -SGControlName=Channel Preset List Basic -GUID=46C43CE4-6BB9-4B76-A13E-B4279202F998 -SmplCName=PepperDash Essentials TSW-760_[B.AV] Source Ctrl-CATV-Basic_Channel Preset List Basic.ced -SMWRev=4.02.20 -Expand=expand_random -HelpID=10125 -Render=8 -;Define the number of inputs, outputs and parameters -MinVariableInputs=4106 -MaxVariableInputs=4106 -MinVariableOutputs=4106 -MaxVariableOutputs=4106 -NumFixedParams=1 -MinVariableInputsList2=3 -MaxVariableInputsList2=3 -MinVariableOutputsList2=3 -MaxVariableOutputsList2=3 -MinVariableInputsList3=132 -MaxVariableInputsList3=132 -MinVariableOutputsList3=132 -MaxVariableOutputsList3=132 -InputSigType1=Digital -OutputSigType1=Digital -InputList2SigType1=Analog -OutputList2SigType1=Analog -InputList3SigType1=Serial -OutputList3SigType1=Serial - -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -InputCue2=[~UNUSED2~] -InputSigType2=Digital -InputCue3=[~UNUSED2~] -InputSigType3=Digital -InputCue4=[~UNUSED2~] -InputSigType4=Digital -InputCue5=[~UNUSED2~] -InputSigType5=Digital -InputCue6=[~UNUSED2~] -InputSigType6=Digital -InputCue7=[~UNUSED2~] -InputSigType7=Digital -InputCue8=[~UNUSED2~] -InputSigType8=Digital -InputCue9=[~UNUSED2~] -InputSigType9=Digital -InputCue10=[~UNUSED2~] -InputSigType10=Digital -InputCue11=[~BeginGroup~]Enable -InputSigType11=Digital -InputCue12=Item 1 Enable -InputSigType12=Digital -InputCue13=Item 2 Enable -InputSigType13=Digital -InputCue14=Item 3 Enable -InputSigType14=Digital -InputCue15=Item 4 Enable -InputSigType15=Digital -InputCue16=Item 5 Enable -InputSigType16=Digital -InputCue17=Item 6 Enable -InputSigType17=Digital -InputCue18=Item 7 Enable -InputSigType18=Digital -InputCue19=Item 8 Enable -InputSigType19=Digital -InputCue20=Item 9 Enable -InputSigType20=Digital -InputCue21=Item 10 Enable -InputSigType21=Digital -InputCue22=Item 11 Enable -InputSigType22=Digital -InputCue23=Item 12 Enable -InputSigType23=Digital -InputCue24=Item 13 Enable -InputSigType24=Digital -InputCue25=Item 14 Enable -InputSigType25=Digital -InputCue26=Item 15 Enable -InputSigType26=Digital -InputCue27=Item 16 Enable -InputSigType27=Digital -InputCue28=Item 17 Enable -InputSigType28=Digital -InputCue29=Item 18 Enable -InputSigType29=Digital -InputCue30=Item 19 Enable -InputSigType30=Digital -InputCue31=Item 20 Enable -InputSigType31=Digital -InputCue32=Item 21 Enable -InputSigType32=Digital -InputCue33=Item 22 Enable -InputSigType33=Digital -InputCue34=Item 23 Enable -InputSigType34=Digital -InputCue35=Item 24 Enable -InputSigType35=Digital -InputCue36=Item 25 Enable -InputSigType36=Digital -InputCue37=Item 26 Enable -InputSigType37=Digital -InputCue38=Item 27 Enable -InputSigType38=Digital -InputCue39=Item 28 Enable -InputSigType39=Digital -InputCue40=Item 29 Enable -InputSigType40=Digital -InputCue41=Item 30 Enable -InputSigType41=Digital -InputCue42=[~UNUSED2~] -InputSigType42=Digital|Analog|Serial|String -InputCue2012=[~EndGroup~]Enable -InputSigType2012=Digital -InputCue2013=[~BeginGroup~]Visible -InputSigType2013=Digital -InputCue2014=Item 1 Visible -InputSigType2014=Digital -InputCue2015=Item 2 Visible -InputSigType2015=Digital -InputCue2016=Item 3 Visible -InputSigType2016=Digital -InputCue2017=Item 4 Visible -InputSigType2017=Digital -InputCue2018=Item 5 Visible -InputSigType2018=Digital -InputCue2019=Item 6 Visible -InputSigType2019=Digital -InputCue2020=Item 7 Visible -InputSigType2020=Digital -InputCue2021=Item 8 Visible -InputSigType2021=Digital -InputCue2022=Item 9 Visible -InputSigType2022=Digital -InputCue2023=Item 10 Visible -InputSigType2023=Digital -InputCue2024=Item 11 Visible -InputSigType2024=Digital -InputCue2025=Item 12 Visible -InputSigType2025=Digital -InputCue2026=Item 13 Visible -InputSigType2026=Digital -InputCue2027=Item 14 Visible -InputSigType2027=Digital -InputCue2028=Item 15 Visible -InputSigType2028=Digital -InputCue2029=Item 16 Visible -InputSigType2029=Digital -InputCue2030=Item 17 Visible -InputSigType2030=Digital -InputCue2031=Item 18 Visible -InputSigType2031=Digital -InputCue2032=Item 19 Visible -InputSigType2032=Digital -InputCue2033=Item 20 Visible -InputSigType2033=Digital -InputCue2034=Item 21 Visible -InputSigType2034=Digital -InputCue2035=Item 22 Visible -InputSigType2035=Digital -InputCue2036=Item 23 Visible -InputSigType2036=Digital -InputCue2037=Item 24 Visible -InputSigType2037=Digital -InputCue2038=Item 25 Visible -InputSigType2038=Digital -InputCue2039=Item 26 Visible -InputSigType2039=Digital -InputCue2040=Item 27 Visible -InputSigType2040=Digital -InputCue2041=Item 28 Visible -InputSigType2041=Digital -InputCue2042=Item 29 Visible -InputSigType2042=Digital -InputCue2043=Item 30 Visible -InputSigType2043=Digital -InputCue2044=[~UNUSED2~] -InputSigType2044=Digital|Analog|Serial|String -InputCue4014=[~EndGroup~]Visible -InputSigType4014=Digital -InputCue4015=[~BeginGroup~]fb -InputSigType4015=Digital -InputCue4016=fb1 -InputSigType4016=Digital -InputCue4017=fb2 -InputSigType4017=Digital -InputCue4018=fb3 -InputSigType4018=Digital -InputCue4019=fb4 -InputSigType4019=Digital -InputCue4020=fb5 -InputSigType4020=Digital -InputCue4021=fb6 -InputSigType4021=Digital -InputCue4022=fb7 -InputSigType4022=Digital -InputCue4023=fb8 -InputSigType4023=Digital -InputCue4024=fb9 -InputSigType4024=Digital -InputCue4025=fb10 -InputSigType4025=Digital -InputCue4026=fb11 -InputSigType4026=Digital -InputCue4027=fb12 -InputSigType4027=Digital -InputCue4028=fb13 -InputSigType4028=Digital -InputCue4029=fb14 -InputSigType4029=Digital -InputCue4030=fb15 -InputSigType4030=Digital -InputCue4031=fb16 -InputSigType4031=Digital -InputCue4032=fb17 -InputSigType4032=Digital -InputCue4033=fb18 -InputSigType4033=Digital -InputCue4034=fb19 -InputSigType4034=Digital -InputCue4035=fb20 -InputSigType4035=Digital -InputCue4036=fb21 -InputSigType4036=Digital -InputCue4037=fb22 -InputSigType4037=Digital -InputCue4038=fb23 -InputSigType4038=Digital -InputCue4039=fb24 -InputSigType4039=Digital -InputCue4040=fb25 -InputSigType4040=Digital -InputCue4041=fb26 -InputSigType4041=Digital -InputCue4042=fb27 -InputSigType4042=Digital -InputCue4043=fb28 -InputSigType4043=Digital -InputCue4044=fb29 -InputSigType4044=Digital -InputCue4045=fb30 -InputSigType4045=Digital -InputCue4046=fb31 -InputSigType4046=Digital -InputCue4047=fb32 -InputSigType4047=Digital -InputCue4048=fb33 -InputSigType4048=Digital -InputCue4049=fb34 -InputSigType4049=Digital -InputCue4050=fb35 -InputSigType4050=Digital -InputCue4051=fb36 -InputSigType4051=Digital -InputCue4052=fb37 -InputSigType4052=Digital -InputCue4053=fb38 -InputSigType4053=Digital -InputCue4054=fb39 -InputSigType4054=Digital -InputCue4055=fb40 -InputSigType4055=Digital -InputCue4056=fb41 -InputSigType4056=Digital -InputCue4057=fb42 -InputSigType4057=Digital -InputCue4058=fb43 -InputSigType4058=Digital -InputCue4059=fb44 -InputSigType4059=Digital -InputCue4060=fb45 -InputSigType4060=Digital -InputCue4061=fb46 -InputSigType4061=Digital -InputCue4062=fb47 -InputSigType4062=Digital -InputCue4063=fb48 -InputSigType4063=Digital -InputCue4064=fb49 -InputSigType4064=Digital -InputCue4065=fb50 -InputSigType4065=Digital -InputCue4066=fb51 -InputSigType4066=Digital -InputCue4067=fb52 -InputSigType4067=Digital -InputCue4068=fb53 -InputSigType4068=Digital -InputCue4069=fb54 -InputSigType4069=Digital -InputCue4070=fb55 -InputSigType4070=Digital -InputCue4071=fb56 -InputSigType4071=Digital -InputCue4072=fb57 -InputSigType4072=Digital -InputCue4073=fb58 -InputSigType4073=Digital -InputCue4074=fb59 -InputSigType4074=Digital -InputCue4075=fb60 -InputSigType4075=Digital -InputCue4076=fb61 -InputSigType4076=Digital -InputCue4077=fb62 -InputSigType4077=Digital -InputCue4078=fb63 -InputSigType4078=Digital -InputCue4079=fb64 -InputSigType4079=Digital -InputCue4080=fb65 -InputSigType4080=Digital -InputCue4081=fb66 -InputSigType4081=Digital -InputCue4082=fb67 -InputSigType4082=Digital -InputCue4083=fb68 -InputSigType4083=Digital -InputCue4084=fb69 -InputSigType4084=Digital -InputCue4085=fb70 -InputSigType4085=Digital -InputCue4086=fb71 -InputSigType4086=Digital -InputCue4087=fb72 -InputSigType4087=Digital -InputCue4088=fb73 -InputSigType4088=Digital -InputCue4089=fb74 -InputSigType4089=Digital -InputCue4090=fb75 -InputSigType4090=Digital -InputCue4091=fb76 -InputSigType4091=Digital -InputCue4092=fb77 -InputSigType4092=Digital -InputCue4093=fb78 -InputSigType4093=Digital -InputCue4094=fb79 -InputSigType4094=Digital -InputCue4095=fb80 -InputSigType4095=Digital -InputCue4096=fb81 -InputSigType4096=Digital -InputCue4097=fb82 -InputSigType4097=Digital -InputCue4098=fb83 -InputSigType4098=Digital -InputCue4099=fb84 -InputSigType4099=Digital -InputCue4100=fb85 -InputSigType4100=Digital -InputCue4101=fb86 -InputSigType4101=Digital -InputCue4102=fb87 -InputSigType4102=Digital -InputCue4103=fb88 -InputSigType4103=Digital -InputCue4104=fb89 -InputSigType4104=Digital -InputCue4105=fb90 -InputSigType4105=Digital -InputCue4106=[~EndGroup~]fb -InputSigType4106=Digital -OutputCue1=Is Moving -OutputSigType1=Digital -OutputCue2=[~UNUSED2~] -OutputSigType2=Digital -OutputCue3=[~UNUSED2~] -OutputSigType3=Digital -OutputCue4=[~UNUSED2~] -OutputSigType4=Digital -OutputCue5=[~UNUSED2~] -OutputSigType5=Digital -OutputCue6=[~UNUSED2~] -OutputSigType6=Digital -OutputCue7=[~UNUSED2~] -OutputSigType7=Digital -OutputCue8=[~UNUSED2~] -OutputSigType8=Digital -OutputCue9=[~UNUSED2~] -OutputSigType9=Digital -OutputCue10=[~UNUSED2~] -OutputSigType10=Digital -OutputCue11=[~BeginGroup~]Enable -OutputSigType11=Digital -OutputCue12=[~UNUSED3~] -OutputSigType12=Digital -OutputCue13=[~UNUSED3~] -OutputSigType13=Digital -OutputCue14=[~UNUSED3~] -OutputSigType14=Digital -OutputCue15=[~UNUSED3~] -OutputSigType15=Digital -OutputCue16=[~UNUSED3~] -OutputSigType16=Digital -OutputCue17=[~UNUSED3~] -OutputSigType17=Digital -OutputCue18=[~UNUSED3~] -OutputSigType18=Digital -OutputCue19=[~UNUSED3~] -OutputSigType19=Digital -OutputCue20=[~UNUSED3~] -OutputSigType20=Digital -OutputCue21=[~UNUSED3~] -OutputSigType21=Digital -OutputCue22=[~UNUSED3~] -OutputSigType22=Digital -OutputCue23=[~UNUSED3~] -OutputSigType23=Digital -OutputCue24=[~UNUSED3~] -OutputSigType24=Digital -OutputCue25=[~UNUSED3~] -OutputSigType25=Digital -OutputCue26=[~UNUSED3~] -OutputSigType26=Digital -OutputCue27=[~UNUSED3~] -OutputSigType27=Digital -OutputCue28=[~UNUSED3~] -OutputSigType28=Digital -OutputCue29=[~UNUSED3~] -OutputSigType29=Digital -OutputCue30=[~UNUSED3~] -OutputSigType30=Digital -OutputCue31=[~UNUSED3~] -OutputSigType31=Digital -OutputCue32=[~UNUSED3~] -OutputSigType32=Digital -OutputCue33=[~UNUSED3~] -OutputSigType33=Digital -OutputCue34=[~UNUSED3~] -OutputSigType34=Digital -OutputCue35=[~UNUSED3~] -OutputSigType35=Digital -OutputCue36=[~UNUSED3~] -OutputSigType36=Digital -OutputCue37=[~UNUSED3~] -OutputSigType37=Digital -OutputCue38=[~UNUSED3~] -OutputSigType38=Digital -OutputCue39=[~UNUSED3~] -OutputSigType39=Digital -OutputCue40=[~UNUSED3~] -OutputSigType40=Digital -OutputCue41=[~UNUSED3~] -OutputSigType41=Digital -OutputCue42=[~UNUSED2~] -OutputSigType42=Digital|Analog|Serial|String -OutputCue2012=[~EndGroup~]Enable -OutputSigType2012=Digital -OutputCue2013=[~BeginGroup~]Visible -OutputSigType2013=Digital -OutputCue2014=[~UNUSED3~] -OutputSigType2014=Digital -OutputCue2015=[~UNUSED3~] -OutputSigType2015=Digital -OutputCue2016=[~UNUSED3~] -OutputSigType2016=Digital -OutputCue2017=[~UNUSED3~] -OutputSigType2017=Digital -OutputCue2018=[~UNUSED3~] -OutputSigType2018=Digital -OutputCue2019=[~UNUSED3~] -OutputSigType2019=Digital -OutputCue2020=[~UNUSED3~] -OutputSigType2020=Digital -OutputCue2021=[~UNUSED3~] -OutputSigType2021=Digital -OutputCue2022=[~UNUSED3~] -OutputSigType2022=Digital -OutputCue2023=[~UNUSED3~] -OutputSigType2023=Digital -OutputCue2024=[~UNUSED3~] -OutputSigType2024=Digital -OutputCue2025=[~UNUSED3~] -OutputSigType2025=Digital -OutputCue2026=[~UNUSED3~] -OutputSigType2026=Digital -OutputCue2027=[~UNUSED3~] -OutputSigType2027=Digital -OutputCue2028=[~UNUSED3~] -OutputSigType2028=Digital -OutputCue2029=[~UNUSED3~] -OutputSigType2029=Digital -OutputCue2030=[~UNUSED3~] -OutputSigType2030=Digital -OutputCue2031=[~UNUSED3~] -OutputSigType2031=Digital -OutputCue2032=[~UNUSED3~] -OutputSigType2032=Digital -OutputCue2033=[~UNUSED3~] -OutputSigType2033=Digital -OutputCue2034=[~UNUSED3~] -OutputSigType2034=Digital -OutputCue2035=[~UNUSED3~] -OutputSigType2035=Digital -OutputCue2036=[~UNUSED3~] -OutputSigType2036=Digital -OutputCue2037=[~UNUSED3~] -OutputSigType2037=Digital -OutputCue2038=[~UNUSED3~] -OutputSigType2038=Digital -OutputCue2039=[~UNUSED3~] -OutputSigType2039=Digital -OutputCue2040=[~UNUSED3~] -OutputSigType2040=Digital -OutputCue2041=[~UNUSED3~] -OutputSigType2041=Digital -OutputCue2042=[~UNUSED3~] -OutputSigType2042=Digital -OutputCue2043=[~UNUSED3~] -OutputSigType2043=Digital -OutputCue2044=[~UNUSED2~] -OutputSigType2044=Digital|Analog|Serial|String -OutputCue4014=[~EndGroup~]Visible -OutputSigType4014=Digital -OutputCue4015=[~BeginGroup~]Press -OutputSigType4015=Digital -OutputCue4016=press1 -OutputSigType4016=Digital -OutputCue4017=press2 -OutputSigType4017=Digital -OutputCue4018=press3 -OutputSigType4018=Digital -OutputCue4019=press4 -OutputSigType4019=Digital -OutputCue4020=press5 -OutputSigType4020=Digital -OutputCue4021=press6 -OutputSigType4021=Digital -OutputCue4022=press7 -OutputSigType4022=Digital -OutputCue4023=press8 -OutputSigType4023=Digital -OutputCue4024=press9 -OutputSigType4024=Digital -OutputCue4025=press10 -OutputSigType4025=Digital -OutputCue4026=press11 -OutputSigType4026=Digital -OutputCue4027=press12 -OutputSigType4027=Digital -OutputCue4028=press13 -OutputSigType4028=Digital -OutputCue4029=press14 -OutputSigType4029=Digital -OutputCue4030=press15 -OutputSigType4030=Digital -OutputCue4031=press16 -OutputSigType4031=Digital -OutputCue4032=press17 -OutputSigType4032=Digital -OutputCue4033=press18 -OutputSigType4033=Digital -OutputCue4034=press19 -OutputSigType4034=Digital -OutputCue4035=press20 -OutputSigType4035=Digital -OutputCue4036=press21 -OutputSigType4036=Digital -OutputCue4037=press22 -OutputSigType4037=Digital -OutputCue4038=press23 -OutputSigType4038=Digital -OutputCue4039=press24 -OutputSigType4039=Digital -OutputCue4040=press25 -OutputSigType4040=Digital -OutputCue4041=press26 -OutputSigType4041=Digital -OutputCue4042=press27 -OutputSigType4042=Digital -OutputCue4043=press28 -OutputSigType4043=Digital -OutputCue4044=press29 -OutputSigType4044=Digital -OutputCue4045=press30 -OutputSigType4045=Digital -OutputCue4046=press31 -OutputSigType4046=Digital -OutputCue4047=press32 -OutputSigType4047=Digital -OutputCue4048=press33 -OutputSigType4048=Digital -OutputCue4049=press34 -OutputSigType4049=Digital -OutputCue4050=press35 -OutputSigType4050=Digital -OutputCue4051=press36 -OutputSigType4051=Digital -OutputCue4052=press37 -OutputSigType4052=Digital -OutputCue4053=press38 -OutputSigType4053=Digital -OutputCue4054=press39 -OutputSigType4054=Digital -OutputCue4055=press40 -OutputSigType4055=Digital -OutputCue4056=press41 -OutputSigType4056=Digital -OutputCue4057=press42 -OutputSigType4057=Digital -OutputCue4058=press43 -OutputSigType4058=Digital -OutputCue4059=press44 -OutputSigType4059=Digital -OutputCue4060=press45 -OutputSigType4060=Digital -OutputCue4061=press46 -OutputSigType4061=Digital -OutputCue4062=press47 -OutputSigType4062=Digital -OutputCue4063=press48 -OutputSigType4063=Digital -OutputCue4064=press49 -OutputSigType4064=Digital -OutputCue4065=press50 -OutputSigType4065=Digital -OutputCue4066=press51 -OutputSigType4066=Digital -OutputCue4067=press52 -OutputSigType4067=Digital -OutputCue4068=press53 -OutputSigType4068=Digital -OutputCue4069=press54 -OutputSigType4069=Digital -OutputCue4070=press55 -OutputSigType4070=Digital -OutputCue4071=press56 -OutputSigType4071=Digital -OutputCue4072=press57 -OutputSigType4072=Digital -OutputCue4073=press58 -OutputSigType4073=Digital -OutputCue4074=press59 -OutputSigType4074=Digital -OutputCue4075=press60 -OutputSigType4075=Digital -OutputCue4076=press61 -OutputSigType4076=Digital -OutputCue4077=press62 -OutputSigType4077=Digital -OutputCue4078=press63 -OutputSigType4078=Digital -OutputCue4079=press64 -OutputSigType4079=Digital -OutputCue4080=press65 -OutputSigType4080=Digital -OutputCue4081=press66 -OutputSigType4081=Digital -OutputCue4082=press67 -OutputSigType4082=Digital -OutputCue4083=press68 -OutputSigType4083=Digital -OutputCue4084=press69 -OutputSigType4084=Digital -OutputCue4085=press70 -OutputSigType4085=Digital -OutputCue4086=press71 -OutputSigType4086=Digital -OutputCue4087=press72 -OutputSigType4087=Digital -OutputCue4088=press73 -OutputSigType4088=Digital -OutputCue4089=press74 -OutputSigType4089=Digital -OutputCue4090=press75 -OutputSigType4090=Digital -OutputCue4091=press76 -OutputSigType4091=Digital -OutputCue4092=press77 -OutputSigType4092=Digital -OutputCue4093=press78 -OutputSigType4093=Digital -OutputCue4094=press79 -OutputSigType4094=Digital -OutputCue4095=press80 -OutputSigType4095=Digital -OutputCue4096=press81 -OutputSigType4096=Digital -OutputCue4097=press82 -OutputSigType4097=Digital -OutputCue4098=press83 -OutputSigType4098=Digital -OutputCue4099=press84 -OutputSigType4099=Digital -OutputCue4100=press85 -OutputSigType4100=Digital -OutputCue4101=press86 -OutputSigType4101=Digital -OutputCue4102=press87 -OutputSigType4102=Digital -OutputCue4103=press88 -OutputSigType4103=Digital -OutputCue4104=press89 -OutputSigType4104=Digital -OutputCue4105=press90 -OutputSigType4105=Digital -OutputCue4106=[~EndGroup~]Press -OutputSigType4106=Digital -InputList2Cue1=[~UNUSED3~] -InputList2SigType1=Analog -InputList2Cue2=Scroll To Item -InputList2SigType2=Analog -InputList2Cue3=Set Number of Items -InputList2SigType3=Analog -OutputList2Cue1=Item Clicked -OutputList2SigType1=Analog -OutputList2Cue2=[~UNUSED3~] -OutputList2SigType2=Analog -OutputList2Cue3=[~UNUSED3~] -OutputList2SigType3=Analog -InputList3Cue1=[~UNUSED2~] -InputList3SigType1=Serial -InputList3Cue2=[~UNUSED2~] -InputList3SigType2=Serial -InputList3Cue3=[~UNUSED2~] -InputList3SigType3=Serial -InputList3Cue4=[~UNUSED2~] -InputList3SigType4=Serial -InputList3Cue5=[~UNUSED2~] -InputList3SigType5=Serial -InputList3Cue6=[~UNUSED2~] -InputList3SigType6=Serial -InputList3Cue7=[~UNUSED2~] -InputList3SigType7=Serial -InputList3Cue8=[~UNUSED2~] -InputList3SigType8=Serial -InputList3Cue9=[~UNUSED2~] -InputList3SigType9=Serial -InputList3Cue10=[~UNUSED2~] -InputList3SigType10=Serial -InputList3Cue11=[~BeginGroup~]text-o -InputList3SigType11=Serial -InputList3Cue12=text-o1 -InputList3SigType12=Serial -InputList3Cue13=text-o2 -InputList3SigType13=Serial -InputList3Cue14=text-o3 -InputList3SigType14=Serial -InputList3Cue15=text-o4 -InputList3SigType15=Serial -InputList3Cue16=text-o5 -InputList3SigType16=Serial -InputList3Cue17=text-o6 -InputList3SigType17=Serial -InputList3Cue18=text-o7 -InputList3SigType18=Serial -InputList3Cue19=text-o8 -InputList3SigType19=Serial -InputList3Cue20=text-o9 -InputList3SigType20=Serial -InputList3Cue21=text-o10 -InputList3SigType21=Serial -InputList3Cue22=text-o11 -InputList3SigType22=Serial -InputList3Cue23=text-o12 -InputList3SigType23=Serial -InputList3Cue24=text-o13 -InputList3SigType24=Serial -InputList3Cue25=text-o14 -InputList3SigType25=Serial -InputList3Cue26=text-o15 -InputList3SigType26=Serial -InputList3Cue27=text-o16 -InputList3SigType27=Serial -InputList3Cue28=text-o17 -InputList3SigType28=Serial -InputList3Cue29=text-o18 -InputList3SigType29=Serial -InputList3Cue30=text-o19 -InputList3SigType30=Serial -InputList3Cue31=text-o20 -InputList3SigType31=Serial -InputList3Cue32=text-o21 -InputList3SigType32=Serial -InputList3Cue33=text-o22 -InputList3SigType33=Serial -InputList3Cue34=text-o23 -InputList3SigType34=Serial -InputList3Cue35=text-o24 -InputList3SigType35=Serial -InputList3Cue36=text-o25 -InputList3SigType36=Serial -InputList3Cue37=text-o26 -InputList3SigType37=Serial -InputList3Cue38=text-o27 -InputList3SigType38=Serial -InputList3Cue39=text-o28 -InputList3SigType39=Serial -InputList3Cue40=text-o29 -InputList3SigType40=Serial -InputList3Cue41=text-o30 -InputList3SigType41=Serial -InputList3Cue42=text-o31 -InputList3SigType42=Serial -InputList3Cue43=text-o32 -InputList3SigType43=Serial -InputList3Cue44=text-o33 -InputList3SigType44=Serial -InputList3Cue45=text-o34 -InputList3SigType45=Serial -InputList3Cue46=text-o35 -InputList3SigType46=Serial -InputList3Cue47=text-o36 -InputList3SigType47=Serial -InputList3Cue48=text-o37 -InputList3SigType48=Serial -InputList3Cue49=text-o38 -InputList3SigType49=Serial -InputList3Cue50=text-o39 -InputList3SigType50=Serial -InputList3Cue51=text-o40 -InputList3SigType51=Serial -InputList3Cue52=text-o41 -InputList3SigType52=Serial -InputList3Cue53=text-o42 -InputList3SigType53=Serial -InputList3Cue54=text-o43 -InputList3SigType54=Serial -InputList3Cue55=text-o44 -InputList3SigType55=Serial -InputList3Cue56=text-o45 -InputList3SigType56=Serial -InputList3Cue57=text-o46 -InputList3SigType57=Serial -InputList3Cue58=text-o47 -InputList3SigType58=Serial -InputList3Cue59=text-o48 -InputList3SigType59=Serial -InputList3Cue60=text-o49 -InputList3SigType60=Serial -InputList3Cue61=text-o50 -InputList3SigType61=Serial -InputList3Cue62=text-o51 -InputList3SigType62=Serial -InputList3Cue63=text-o52 -InputList3SigType63=Serial -InputList3Cue64=text-o53 -InputList3SigType64=Serial -InputList3Cue65=text-o54 -InputList3SigType65=Serial -InputList3Cue66=text-o55 -InputList3SigType66=Serial -InputList3Cue67=text-o56 -InputList3SigType67=Serial -InputList3Cue68=text-o57 -InputList3SigType68=Serial -InputList3Cue69=text-o58 -InputList3SigType69=Serial -InputList3Cue70=text-o59 -InputList3SigType70=Serial -InputList3Cue71=text-o60 -InputList3SigType71=Serial -InputList3Cue72=text-o61 -InputList3SigType72=Serial -InputList3Cue73=text-o62 -InputList3SigType73=Serial -InputList3Cue74=text-o63 -InputList3SigType74=Serial -InputList3Cue75=text-o64 -InputList3SigType75=Serial -InputList3Cue76=text-o65 -InputList3SigType76=Serial -InputList3Cue77=text-o66 -InputList3SigType77=Serial -InputList3Cue78=text-o67 -InputList3SigType78=Serial -InputList3Cue79=text-o68 -InputList3SigType79=Serial -InputList3Cue80=text-o69 -InputList3SigType80=Serial -InputList3Cue81=text-o70 -InputList3SigType81=Serial -InputList3Cue82=text-o71 -InputList3SigType82=Serial -InputList3Cue83=text-o72 -InputList3SigType83=Serial -InputList3Cue84=text-o73 -InputList3SigType84=Serial -InputList3Cue85=text-o74 -InputList3SigType85=Serial -InputList3Cue86=text-o75 -InputList3SigType86=Serial -InputList3Cue87=text-o76 -InputList3SigType87=Serial -InputList3Cue88=text-o77 -InputList3SigType88=Serial -InputList3Cue89=text-o78 -InputList3SigType89=Serial -InputList3Cue90=text-o79 -InputList3SigType90=Serial -InputList3Cue91=text-o80 -InputList3SigType91=Serial -InputList3Cue92=text-o81 -InputList3SigType92=Serial -InputList3Cue93=text-o82 -InputList3SigType93=Serial -InputList3Cue94=text-o83 -InputList3SigType94=Serial -InputList3Cue95=text-o84 -InputList3SigType95=Serial -InputList3Cue96=text-o85 -InputList3SigType96=Serial -InputList3Cue97=text-o86 -InputList3SigType97=Serial -InputList3Cue98=text-o87 -InputList3SigType98=Serial -InputList3Cue99=text-o88 -InputList3SigType99=Serial -InputList3Cue100=text-o89 -InputList3SigType100=Serial -InputList3Cue101=text-o90 -InputList3SigType101=Serial -InputList3Cue102=text-o91 -InputList3SigType102=Serial -InputList3Cue103=text-o92 -InputList3SigType103=Serial -InputList3Cue104=text-o93 -InputList3SigType104=Serial -InputList3Cue105=text-o94 -InputList3SigType105=Serial -InputList3Cue106=text-o95 -InputList3SigType106=Serial -InputList3Cue107=text-o96 -InputList3SigType107=Serial -InputList3Cue108=text-o97 -InputList3SigType108=Serial -InputList3Cue109=text-o98 -InputList3SigType109=Serial -InputList3Cue110=text-o99 -InputList3SigType110=Serial -InputList3Cue111=text-o100 -InputList3SigType111=Serial -InputList3Cue112=text-o101 -InputList3SigType112=Serial -InputList3Cue113=text-o102 -InputList3SigType113=Serial -InputList3Cue114=text-o103 -InputList3SigType114=Serial -InputList3Cue115=text-o104 -InputList3SigType115=Serial -InputList3Cue116=text-o105 -InputList3SigType116=Serial -InputList3Cue117=text-o106 -InputList3SigType117=Serial -InputList3Cue118=text-o107 -InputList3SigType118=Serial -InputList3Cue119=text-o108 -InputList3SigType119=Serial -InputList3Cue120=text-o109 -InputList3SigType120=Serial -InputList3Cue121=text-o110 -InputList3SigType121=Serial -InputList3Cue122=text-o111 -InputList3SigType122=Serial -InputList3Cue123=text-o112 -InputList3SigType123=Serial -InputList3Cue124=text-o113 -InputList3SigType124=Serial -InputList3Cue125=text-o114 -InputList3SigType125=Serial -InputList3Cue126=text-o115 -InputList3SigType126=Serial -InputList3Cue127=text-o116 -InputList3SigType127=Serial -InputList3Cue128=text-o117 -InputList3SigType128=Serial -InputList3Cue129=text-o118 -InputList3SigType129=Serial -InputList3Cue130=text-o119 -InputList3SigType130=Serial -InputList3Cue131=text-o120 -InputList3SigType131=Serial -InputList3Cue132=[~EndGroup~]text-o -InputList3SigType132=Serial -OutputList3Cue1=[~UNUSED2~] -OutputList3SigType1=Serial -OutputList3Cue2=[~UNUSED2~] -OutputList3SigType2=Serial -OutputList3Cue3=[~UNUSED2~] -OutputList3SigType3=Serial -OutputList3Cue4=[~UNUSED2~] -OutputList3SigType4=Serial -OutputList3Cue5=[~UNUSED2~] -OutputList3SigType5=Serial -OutputList3Cue6=[~UNUSED2~] -OutputList3SigType6=Serial -OutputList3Cue7=[~UNUSED2~] -OutputList3SigType7=Serial -OutputList3Cue8=[~UNUSED2~] -OutputList3SigType8=Serial -OutputList3Cue9=[~UNUSED2~] -OutputList3SigType9=Serial -OutputList3Cue10=[~UNUSED2~] -OutputList3SigType10=Serial -OutputList3Cue11=[~BeginGroup~]text-i -OutputList3SigType11=Serial -OutputList3Cue12=text-i1 -OutputList3SigType12=Serial -OutputList3Cue13=text-i2 -OutputList3SigType13=Serial -OutputList3Cue14=text-i3 -OutputList3SigType14=Serial -OutputList3Cue15=text-i4 -OutputList3SigType15=Serial -OutputList3Cue16=text-i5 -OutputList3SigType16=Serial -OutputList3Cue17=text-i6 -OutputList3SigType17=Serial -OutputList3Cue18=text-i7 -OutputList3SigType18=Serial -OutputList3Cue19=text-i8 -OutputList3SigType19=Serial -OutputList3Cue20=text-i9 -OutputList3SigType20=Serial -OutputList3Cue21=text-i10 -OutputList3SigType21=Serial -OutputList3Cue22=text-i11 -OutputList3SigType22=Serial -OutputList3Cue23=text-i12 -OutputList3SigType23=Serial -OutputList3Cue24=text-i13 -OutputList3SigType24=Serial -OutputList3Cue25=text-i14 -OutputList3SigType25=Serial -OutputList3Cue26=text-i15 -OutputList3SigType26=Serial -OutputList3Cue27=text-i16 -OutputList3SigType27=Serial -OutputList3Cue28=text-i17 -OutputList3SigType28=Serial -OutputList3Cue29=text-i18 -OutputList3SigType29=Serial -OutputList3Cue30=text-i19 -OutputList3SigType30=Serial -OutputList3Cue31=text-i20 -OutputList3SigType31=Serial -OutputList3Cue32=text-i21 -OutputList3SigType32=Serial -OutputList3Cue33=text-i22 -OutputList3SigType33=Serial -OutputList3Cue34=text-i23 -OutputList3SigType34=Serial -OutputList3Cue35=text-i24 -OutputList3SigType35=Serial -OutputList3Cue36=text-i25 -OutputList3SigType36=Serial -OutputList3Cue37=text-i26 -OutputList3SigType37=Serial -OutputList3Cue38=text-i27 -OutputList3SigType38=Serial -OutputList3Cue39=text-i28 -OutputList3SigType39=Serial -OutputList3Cue40=text-i29 -OutputList3SigType40=Serial -OutputList3Cue41=text-i30 -OutputList3SigType41=Serial -OutputList3Cue42=text-i31 -OutputList3SigType42=Serial -OutputList3Cue43=text-i32 -OutputList3SigType43=Serial -OutputList3Cue44=text-i33 -OutputList3SigType44=Serial -OutputList3Cue45=text-i34 -OutputList3SigType45=Serial -OutputList3Cue46=text-i35 -OutputList3SigType46=Serial -OutputList3Cue47=text-i36 -OutputList3SigType47=Serial -OutputList3Cue48=text-i37 -OutputList3SigType48=Serial -OutputList3Cue49=text-i38 -OutputList3SigType49=Serial -OutputList3Cue50=text-i39 -OutputList3SigType50=Serial -OutputList3Cue51=text-i40 -OutputList3SigType51=Serial -OutputList3Cue52=text-i41 -OutputList3SigType52=Serial -OutputList3Cue53=text-i42 -OutputList3SigType53=Serial -OutputList3Cue54=text-i43 -OutputList3SigType54=Serial -OutputList3Cue55=text-i44 -OutputList3SigType55=Serial -OutputList3Cue56=text-i45 -OutputList3SigType56=Serial -OutputList3Cue57=text-i46 -OutputList3SigType57=Serial -OutputList3Cue58=text-i47 -OutputList3SigType58=Serial -OutputList3Cue59=text-i48 -OutputList3SigType59=Serial -OutputList3Cue60=text-i49 -OutputList3SigType60=Serial -OutputList3Cue61=text-i50 -OutputList3SigType61=Serial -OutputList3Cue62=text-i51 -OutputList3SigType62=Serial -OutputList3Cue63=text-i52 -OutputList3SigType63=Serial -OutputList3Cue64=text-i53 -OutputList3SigType64=Serial -OutputList3Cue65=text-i54 -OutputList3SigType65=Serial -OutputList3Cue66=text-i55 -OutputList3SigType66=Serial -OutputList3Cue67=text-i56 -OutputList3SigType67=Serial -OutputList3Cue68=text-i57 -OutputList3SigType68=Serial -OutputList3Cue69=text-i58 -OutputList3SigType69=Serial -OutputList3Cue70=text-i59 -OutputList3SigType70=Serial -OutputList3Cue71=text-i60 -OutputList3SigType71=Serial -OutputList3Cue72=text-i61 -OutputList3SigType72=Serial -OutputList3Cue73=text-i62 -OutputList3SigType73=Serial -OutputList3Cue74=text-i63 -OutputList3SigType74=Serial -OutputList3Cue75=text-i64 -OutputList3SigType75=Serial -OutputList3Cue76=text-i65 -OutputList3SigType76=Serial -OutputList3Cue77=text-i66 -OutputList3SigType77=Serial -OutputList3Cue78=text-i67 -OutputList3SigType78=Serial -OutputList3Cue79=text-i68 -OutputList3SigType79=Serial -OutputList3Cue80=text-i69 -OutputList3SigType80=Serial -OutputList3Cue81=text-i70 -OutputList3SigType81=Serial -OutputList3Cue82=text-i71 -OutputList3SigType82=Serial -OutputList3Cue83=text-i72 -OutputList3SigType83=Serial -OutputList3Cue84=text-i73 -OutputList3SigType84=Serial -OutputList3Cue85=text-i74 -OutputList3SigType85=Serial -OutputList3Cue86=text-i75 -OutputList3SigType86=Serial -OutputList3Cue87=text-i76 -OutputList3SigType87=Serial -OutputList3Cue88=text-i77 -OutputList3SigType88=Serial -OutputList3Cue89=text-i78 -OutputList3SigType89=Serial -OutputList3Cue90=text-i79 -OutputList3SigType90=Serial -OutputList3Cue91=text-i80 -OutputList3SigType91=Serial -OutputList3Cue92=text-i81 -OutputList3SigType92=Serial -OutputList3Cue93=text-i82 -OutputList3SigType93=Serial -OutputList3Cue94=text-i83 -OutputList3SigType94=Serial -OutputList3Cue95=text-i84 -OutputList3SigType95=Serial -OutputList3Cue96=text-i85 -OutputList3SigType96=Serial -OutputList3Cue97=text-i86 -OutputList3SigType97=Serial -OutputList3Cue98=text-i87 -OutputList3SigType98=Serial -OutputList3Cue99=text-i88 -OutputList3SigType99=Serial -OutputList3Cue100=text-i89 -OutputList3SigType100=Serial -OutputList3Cue101=text-i90 -OutputList3SigType101=Serial -OutputList3Cue102=text-i91 -OutputList3SigType102=Serial -OutputList3Cue103=text-i92 -OutputList3SigType103=Serial -OutputList3Cue104=text-i93 -OutputList3SigType104=Serial -OutputList3Cue105=text-i94 -OutputList3SigType105=Serial -OutputList3Cue106=text-i95 -OutputList3SigType106=Serial -OutputList3Cue107=text-i96 -OutputList3SigType107=Serial -OutputList3Cue108=text-i97 -OutputList3SigType108=Serial -OutputList3Cue109=text-i98 -OutputList3SigType109=Serial -OutputList3Cue110=text-i99 -OutputList3SigType110=Serial -OutputList3Cue111=text-i100 -OutputList3SigType111=Serial -OutputList3Cue112=text-i101 -OutputList3SigType112=Serial -OutputList3Cue113=text-i102 -OutputList3SigType113=Serial -OutputList3Cue114=text-i103 -OutputList3SigType114=Serial -OutputList3Cue115=text-i104 -OutputList3SigType115=Serial -OutputList3Cue116=text-i105 -OutputList3SigType116=Serial -OutputList3Cue117=text-i106 -OutputList3SigType117=Serial -OutputList3Cue118=text-i107 -OutputList3SigType118=Serial -OutputList3Cue119=text-i108 -OutputList3SigType119=Serial -OutputList3Cue120=text-i109 -OutputList3SigType120=Serial -OutputList3Cue121=text-i110 -OutputList3SigType121=Serial -OutputList3Cue122=text-i111 -OutputList3SigType122=Serial -OutputList3Cue123=text-i112 -OutputList3SigType123=Serial -OutputList3Cue124=text-i113 -OutputList3SigType124=Serial -OutputList3Cue125=text-i114 -OutputList3SigType125=Serial -OutputList3Cue126=text-i115 -OutputList3SigType126=Serial -OutputList3Cue127=text-i116 -OutputList3SigType127=Serial -OutputList3Cue128=text-i117 -OutputList3SigType128=Serial -OutputList3Cue129=text-i118 -OutputList3SigType129=Serial -OutputList3Cue130=text-i119 -OutputList3SigType130=Serial -OutputList3Cue131=text-i120 -OutputList3SigType131=Serial -OutputList3Cue132=[~EndGroup~]text-i -OutputList3SigType132=Serial -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=8 -CedH=8 -SmartObjId=1806d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=8 -Tp=1 -HD=TRUE -DV=1806d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=8 -Name=PepperDash Essentials TSW-760_[B.AV] Source Ctrl-CATV-Basic_Channel Preset List Basic.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials TSW-760_[A.Global] Activity Footer SRL_Modes Bottom Bar SRL.ced -Hint=Modes Bottom Bar SRL (Smart Object ID=15022) -Code=9 -SGControlType=Subpage Reference List Horizontal -SGControlName=Modes Bottom Bar SRL -GUID=812FF0C4-486D-4ABC-90FA-405F19104323 -SmplCName=PepperDash Essentials TSW-760_[A.Global] Activity Footer SRL_Modes Bottom Bar SRL.ced -SMWRev=4.02.20 -Expand=expand_random -HelpID=10124 -Render=8 -;Define the number of inputs, outputs and parameters -MinVariableInputs=4031 -MaxVariableInputs=4031 -MinVariableOutputs=4031 -MaxVariableOutputs=4031 -NumFixedParams=1 -MinVariableInputsList2=27 -MaxVariableInputsList2=27 -MinVariableOutputsList2=27 -MaxVariableOutputsList2=27 -MinVariableInputsList3=27 -MaxVariableInputsList3=27 -MinVariableOutputsList3=27 -MaxVariableOutputsList3=27 -InputSigType1=Digital -OutputSigType1=Digital -InputList2SigType1=Analog -OutputList2SigType1=Analog -InputList3SigType1=Serial -OutputList3SigType1=Serial - -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -InputCue2=[~UNUSED2~] -InputSigType2=Digital -InputCue3=[~UNUSED2~] -InputSigType3=Digital -InputCue4=[~UNUSED2~] -InputSigType4=Digital -InputCue5=[~UNUSED2~] -InputSigType5=Digital -InputCue6=[~UNUSED2~] -InputSigType6=Digital -InputCue7=[~UNUSED2~] -InputSigType7=Digital -InputCue8=[~UNUSED2~] -InputSigType8=Digital -InputCue9=[~UNUSED2~] -InputSigType9=Digital -InputCue10=[~UNUSED2~] -InputSigType10=Digital -InputCue11=[~BeginGroup~]Enable -InputSigType11=Digital -InputCue12=Item 1 Enable -InputSigType12=Digital -InputCue13=Item 2 Enable -InputSigType13=Digital -InputCue14=Item 3 Enable -InputSigType14=Digital -InputCue15=Item 4 Enable -InputSigType15=Digital -InputCue16=Item 5 Enable -InputSigType16=Digital -InputCue17=[~UNUSED2~] -InputSigType17=Digital|Analog|Serial|String -InputCue2012=[~EndGroup~]Enable -InputSigType2012=Digital -InputCue2013=[~BeginGroup~]Visible -InputSigType2013=Digital -InputCue2014=Item 1 Visible -InputSigType2014=Digital -InputCue2015=Item 2 Visible -InputSigType2015=Digital -InputCue2016=Item 3 Visible -InputSigType2016=Digital -InputCue2017=Item 4 Visible -InputSigType2017=Digital -InputCue2018=Item 5 Visible -InputSigType2018=Digital -InputCue2019=[~UNUSED2~] -InputSigType2019=Digital|Analog|Serial|String -InputCue4014=[~EndGroup~]Visible -InputSigType4014=Digital -InputCue4015=[~BeginGroup~]fb -InputSigType4015=Digital -InputCue4016=fb1 -InputSigType4016=Digital -InputCue4017=fb2 -InputSigType4017=Digital -InputCue4018=fb3 -InputSigType4018=Digital -InputCue4019=fb4 -InputSigType4019=Digital -InputCue4020=fb5 -InputSigType4020=Digital -InputCue4021=fb6 -InputSigType4021=Digital -InputCue4022=fb7 -InputSigType4022=Digital -InputCue4023=fb8 -InputSigType4023=Digital -InputCue4024=fb9 -InputSigType4024=Digital -InputCue4025=fb10 -InputSigType4025=Digital -InputCue4026=fb11 -InputSigType4026=Digital -InputCue4027=fb12 -InputSigType4027=Digital -InputCue4028=fb13 -InputSigType4028=Digital -InputCue4029=fb14 -InputSigType4029=Digital -InputCue4030=fb15 -InputSigType4030=Digital -InputCue4031=[~EndGroup~]fb -InputSigType4031=Digital -OutputCue1=Is Moving -OutputSigType1=Digital -OutputCue2=[~UNUSED2~] -OutputSigType2=Digital -OutputCue3=[~UNUSED2~] -OutputSigType3=Digital -OutputCue4=[~UNUSED2~] -OutputSigType4=Digital -OutputCue5=[~UNUSED2~] -OutputSigType5=Digital -OutputCue6=[~UNUSED2~] -OutputSigType6=Digital -OutputCue7=[~UNUSED2~] -OutputSigType7=Digital -OutputCue8=[~UNUSED2~] -OutputSigType8=Digital -OutputCue9=[~UNUSED2~] -OutputSigType9=Digital -OutputCue10=[~UNUSED2~] -OutputSigType10=Digital -OutputCue11=[~BeginGroup~]Enable -OutputSigType11=Digital -OutputCue12=[~UNUSED3~] -OutputSigType12=Digital -OutputCue13=[~UNUSED3~] -OutputSigType13=Digital -OutputCue14=[~UNUSED3~] -OutputSigType14=Digital -OutputCue15=[~UNUSED3~] -OutputSigType15=Digital -OutputCue16=[~UNUSED3~] -OutputSigType16=Digital -OutputCue17=[~UNUSED2~] -OutputSigType17=Digital|Analog|Serial|String -OutputCue2012=[~EndGroup~]Enable -OutputSigType2012=Digital -OutputCue2013=[~BeginGroup~]Visible -OutputSigType2013=Digital -OutputCue2014=[~UNUSED3~] -OutputSigType2014=Digital -OutputCue2015=[~UNUSED3~] -OutputSigType2015=Digital -OutputCue2016=[~UNUSED3~] -OutputSigType2016=Digital -OutputCue2017=[~UNUSED3~] -OutputSigType2017=Digital -OutputCue2018=[~UNUSED3~] -OutputSigType2018=Digital -OutputCue2019=[~UNUSED2~] -OutputSigType2019=Digital|Analog|Serial|String -OutputCue4014=[~EndGroup~]Visible -OutputSigType4014=Digital -OutputCue4015=[~BeginGroup~]Press -OutputSigType4015=Digital -OutputCue4016=press1 -OutputSigType4016=Digital -OutputCue4017=press2 -OutputSigType4017=Digital -OutputCue4018=press3 -OutputSigType4018=Digital -OutputCue4019=press4 -OutputSigType4019=Digital -OutputCue4020=press5 -OutputSigType4020=Digital -OutputCue4021=press6 -OutputSigType4021=Digital -OutputCue4022=press7 -OutputSigType4022=Digital -OutputCue4023=press8 -OutputSigType4023=Digital -OutputCue4024=press9 -OutputSigType4024=Digital -OutputCue4025=press10 -OutputSigType4025=Digital -OutputCue4026=press11 -OutputSigType4026=Digital -OutputCue4027=press12 -OutputSigType4027=Digital -OutputCue4028=press13 -OutputSigType4028=Digital -OutputCue4029=press14 -OutputSigType4029=Digital -OutputCue4030=press15 -OutputSigType4030=Digital -OutputCue4031=[~EndGroup~]Press -OutputSigType4031=Digital -InputList2Cue1=[~UNUSED3~] -InputList2SigType1=Analog -InputList2Cue2=Scroll To Item -InputList2SigType2=Analog -InputList2Cue3=Set Number of Items -InputList2SigType3=Analog -InputList2Cue4=[~UNUSED2~] -InputList2SigType4=Analog -InputList2Cue5=[~UNUSED2~] -InputList2SigType5=Analog -InputList2Cue6=[~UNUSED2~] -InputList2SigType6=Analog -InputList2Cue7=[~UNUSED2~] -InputList2SigType7=Analog -InputList2Cue8=[~UNUSED2~] -InputList2SigType8=Analog -InputList2Cue9=[~UNUSED2~] -InputList2SigType9=Analog -InputList2Cue10=[~UNUSED2~] -InputList2SigType10=Analog -InputList2Cue11=[~BeginGroup~]an_fb -InputList2SigType11=Analog -InputList2Cue12=an_fb1 -InputList2SigType12=Analog -InputList2Cue13=an_fb2 -InputList2SigType13=Analog -InputList2Cue14=an_fb3 -InputList2SigType14=Analog -InputList2Cue15=an_fb4 -InputList2SigType15=Analog -InputList2Cue16=an_fb5 -InputList2SigType16=Analog -InputList2Cue17=an_fb6 -InputList2SigType17=Analog -InputList2Cue18=an_fb7 -InputList2SigType18=Analog -InputList2Cue19=an_fb8 -InputList2SigType19=Analog -InputList2Cue20=an_fb9 -InputList2SigType20=Analog -InputList2Cue21=an_fb10 -InputList2SigType21=Analog -InputList2Cue22=an_fb11 -InputList2SigType22=Analog -InputList2Cue23=an_fb12 -InputList2SigType23=Analog -InputList2Cue24=an_fb13 -InputList2SigType24=Analog -InputList2Cue25=an_fb14 -InputList2SigType25=Analog -InputList2Cue26=an_fb15 -InputList2SigType26=Analog -InputList2Cue27=[~EndGroup~]an_fb -InputList2SigType27=Analog -OutputList2Cue1=Item Clicked -OutputList2SigType1=Analog -OutputList2Cue2=[~UNUSED3~] -OutputList2SigType2=Analog -OutputList2Cue3=[~UNUSED3~] -OutputList2SigType3=Analog -OutputList2Cue4=[~UNUSED2~] -OutputList2SigType4=Analog -OutputList2Cue5=[~UNUSED2~] -OutputList2SigType5=Analog -OutputList2Cue6=[~UNUSED2~] -OutputList2SigType6=Analog -OutputList2Cue7=[~UNUSED2~] -OutputList2SigType7=Analog -OutputList2Cue8=[~UNUSED2~] -OutputList2SigType8=Analog -OutputList2Cue9=[~UNUSED2~] -OutputList2SigType9=Analog -OutputList2Cue10=[~UNUSED2~] -OutputList2SigType10=Analog -OutputList2Cue11=[~BeginGroup~]an_act -OutputList2SigType11=Analog -OutputList2Cue12=an_act1 -OutputList2SigType12=Analog -OutputList2Cue13=an_act2 -OutputList2SigType13=Analog -OutputList2Cue14=an_act3 -OutputList2SigType14=Analog -OutputList2Cue15=an_act4 -OutputList2SigType15=Analog -OutputList2Cue16=an_act5 -OutputList2SigType16=Analog -OutputList2Cue17=an_act6 -OutputList2SigType17=Analog -OutputList2Cue18=an_act7 -OutputList2SigType18=Analog -OutputList2Cue19=an_act8 -OutputList2SigType19=Analog -OutputList2Cue20=an_act9 -OutputList2SigType20=Analog -OutputList2Cue21=an_act10 -OutputList2SigType21=Analog -OutputList2Cue22=an_act11 -OutputList2SigType22=Analog -OutputList2Cue23=an_act12 -OutputList2SigType23=Analog -OutputList2Cue24=an_act13 -OutputList2SigType24=Analog -OutputList2Cue25=an_act14 -OutputList2SigType25=Analog -OutputList2Cue26=an_act15 -OutputList2SigType26=Analog -OutputList2Cue27=[~EndGroup~]an_act -OutputList2SigType27=Analog -InputList3Cue1=[~UNUSED2~] -InputList3SigType1=Serial -InputList3Cue2=[~UNUSED2~] -InputList3SigType2=Serial -InputList3Cue3=[~UNUSED2~] -InputList3SigType3=Serial -InputList3Cue4=[~UNUSED2~] -InputList3SigType4=Serial -InputList3Cue5=[~UNUSED2~] -InputList3SigType5=Serial -InputList3Cue6=[~UNUSED2~] -InputList3SigType6=Serial -InputList3Cue7=[~UNUSED2~] -InputList3SigType7=Serial -InputList3Cue8=[~UNUSED2~] -InputList3SigType8=Serial -InputList3Cue9=[~UNUSED2~] -InputList3SigType9=Serial -InputList3Cue10=[~UNUSED2~] -InputList3SigType10=Serial -InputList3Cue11=[~BeginGroup~]text-o -InputList3SigType11=Serial -InputList3Cue12=text-o1 -InputList3SigType12=Serial -InputList3Cue13=text-o2 -InputList3SigType13=Serial -InputList3Cue14=text-o3 -InputList3SigType14=Serial -InputList3Cue15=text-o4 -InputList3SigType15=Serial -InputList3Cue16=text-o5 -InputList3SigType16=Serial -InputList3Cue17=text-o6 -InputList3SigType17=Serial -InputList3Cue18=text-o7 -InputList3SigType18=Serial -InputList3Cue19=text-o8 -InputList3SigType19=Serial -InputList3Cue20=text-o9 -InputList3SigType20=Serial -InputList3Cue21=text-o10 -InputList3SigType21=Serial -InputList3Cue22=text-o11 -InputList3SigType22=Serial -InputList3Cue23=text-o12 -InputList3SigType23=Serial -InputList3Cue24=text-o13 -InputList3SigType24=Serial -InputList3Cue25=text-o14 -InputList3SigType25=Serial -InputList3Cue26=text-o15 -InputList3SigType26=Serial -InputList3Cue27=[~EndGroup~]text-o -InputList3SigType27=Serial -OutputList3Cue1=[~UNUSED2~] -OutputList3SigType1=Serial -OutputList3Cue2=[~UNUSED2~] -OutputList3SigType2=Serial -OutputList3Cue3=[~UNUSED2~] -OutputList3SigType3=Serial -OutputList3Cue4=[~UNUSED2~] -OutputList3SigType4=Serial -OutputList3Cue5=[~UNUSED2~] -OutputList3SigType5=Serial -OutputList3Cue6=[~UNUSED2~] -OutputList3SigType6=Serial -OutputList3Cue7=[~UNUSED2~] -OutputList3SigType7=Serial -OutputList3Cue8=[~UNUSED2~] -OutputList3SigType8=Serial -OutputList3Cue9=[~UNUSED2~] -OutputList3SigType9=Serial -OutputList3Cue10=[~UNUSED2~] -OutputList3SigType10=Serial -OutputList3Cue11=[~BeginGroup~]text-i -OutputList3SigType11=Serial -OutputList3Cue12=text-i1 -OutputList3SigType12=Serial -OutputList3Cue13=text-i2 -OutputList3SigType13=Serial -OutputList3Cue14=text-i3 -OutputList3SigType14=Serial -OutputList3Cue15=text-i4 -OutputList3SigType15=Serial -OutputList3Cue16=text-i5 -OutputList3SigType16=Serial -OutputList3Cue17=text-i6 -OutputList3SigType17=Serial -OutputList3Cue18=text-i7 -OutputList3SigType18=Serial -OutputList3Cue19=text-i8 -OutputList3SigType19=Serial -OutputList3Cue20=text-i9 -OutputList3SigType20=Serial -OutputList3Cue21=text-i10 -OutputList3SigType21=Serial -OutputList3Cue22=text-i11 -OutputList3SigType22=Serial -OutputList3Cue23=text-i12 -OutputList3SigType23=Serial -OutputList3Cue24=text-i13 -OutputList3SigType24=Serial -OutputList3Cue25=text-i14 -OutputList3SigType25=Serial -OutputList3Cue26=text-i15 -OutputList3SigType26=Serial -OutputList3Cue27=[~EndGroup~]text-i -OutputList3SigType27=Serial -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=9 -CedH=9 -SmartObjId=15022d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=9 -Tp=1 -HD=TRUE -DV=15022d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=9 -Name=PepperDash Essentials TSW-760_[A.Global] Activity Footer SRL_Modes Bottom Bar SRL.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials TSW-760_[B.AV] Object - Presets_CATV Icon List Vertical.ced -Hint=CATV Icon List Vertical (Smart Object ID=10012) -Code=10 -SGControlType=Subpage Reference List Vertical -SGControlName=CATV Icon List Vertical -GUID=B34C4DC0-DD10-4C49-AEBA-F968934EFDC6 -SmplCName=PepperDash Essentials TSW-760_[B.AV] Object - Presets_CATV Icon List Vertical.ced -SMWRev=4.02.20 -Expand=expand_random -HelpID=10125 -Render=8 -;Define the number of inputs, outputs and parameters -MinVariableInputs=4316 -MaxVariableInputs=4316 -MinVariableOutputs=4316 -MaxVariableOutputs=4316 -NumFixedParams=1 -MinVariableInputsList2=3 -MaxVariableInputsList2=3 -MinVariableOutputsList2=3 -MaxVariableOutputsList2=3 -MinVariableInputsList3=412 -MaxVariableInputsList3=412 -MinVariableOutputsList3=412 -MaxVariableOutputsList3=412 -InputSigType1=Digital -OutputSigType1=Digital -InputList2SigType1=Analog -OutputList2SigType1=Analog -InputList3SigType1=Serial -OutputList3SigType1=Serial - -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -InputCue2=[~UNUSED2~] -InputSigType2=Digital -InputCue3=[~UNUSED2~] -InputSigType3=Digital -InputCue4=[~UNUSED2~] -InputSigType4=Digital -InputCue5=[~UNUSED2~] -InputSigType5=Digital -InputCue6=[~UNUSED2~] -InputSigType6=Digital -InputCue7=[~UNUSED2~] -InputSigType7=Digital -InputCue8=[~UNUSED2~] -InputSigType8=Digital -InputCue9=[~UNUSED2~] -InputSigType9=Digital -InputCue10=[~UNUSED2~] -InputSigType10=Digital -InputCue11=[~BeginGroup~]Enable -InputSigType11=Digital -InputCue12=Item 1 Enable -InputSigType12=Digital -InputCue13=Item 2 Enable -InputSigType13=Digital -InputCue14=Item 3 Enable -InputSigType14=Digital -InputCue15=Item 4 Enable -InputSigType15=Digital -InputCue16=Item 5 Enable -InputSigType16=Digital -InputCue17=Item 6 Enable -InputSigType17=Digital -InputCue18=Item 7 Enable -InputSigType18=Digital -InputCue19=Item 8 Enable -InputSigType19=Digital -InputCue20=Item 9 Enable -InputSigType20=Digital -InputCue21=Item 10 Enable -InputSigType21=Digital -InputCue22=Item 11 Enable -InputSigType22=Digital -InputCue23=Item 12 Enable -InputSigType23=Digital -InputCue24=Item 13 Enable -InputSigType24=Digital -InputCue25=Item 14 Enable -InputSigType25=Digital -InputCue26=Item 15 Enable -InputSigType26=Digital -InputCue27=Item 16 Enable -InputSigType27=Digital -InputCue28=Item 17 Enable -InputSigType28=Digital -InputCue29=Item 18 Enable -InputSigType29=Digital -InputCue30=Item 19 Enable -InputSigType30=Digital -InputCue31=Item 20 Enable -InputSigType31=Digital -InputCue32=Item 21 Enable -InputSigType32=Digital -InputCue33=Item 22 Enable -InputSigType33=Digital -InputCue34=Item 23 Enable -InputSigType34=Digital -InputCue35=Item 24 Enable -InputSigType35=Digital -InputCue36=Item 25 Enable -InputSigType36=Digital -InputCue37=Item 26 Enable -InputSigType37=Digital -InputCue38=Item 27 Enable -InputSigType38=Digital -InputCue39=Item 28 Enable -InputSigType39=Digital -InputCue40=Item 29 Enable -InputSigType40=Digital -InputCue41=Item 30 Enable -InputSigType41=Digital -InputCue42=Item 31 Enable -InputSigType42=Digital -InputCue43=Item 32 Enable -InputSigType43=Digital -InputCue44=Item 33 Enable -InputSigType44=Digital -InputCue45=Item 34 Enable -InputSigType45=Digital -InputCue46=Item 35 Enable -InputSigType46=Digital -InputCue47=Item 36 Enable -InputSigType47=Digital -InputCue48=Item 37 Enable -InputSigType48=Digital -InputCue49=Item 38 Enable -InputSigType49=Digital -InputCue50=Item 39 Enable -InputSigType50=Digital -InputCue51=Item 40 Enable -InputSigType51=Digital -InputCue52=Item 41 Enable -InputSigType52=Digital -InputCue53=Item 42 Enable -InputSigType53=Digital -InputCue54=Item 43 Enable -InputSigType54=Digital -InputCue55=Item 44 Enable -InputSigType55=Digital -InputCue56=Item 45 Enable -InputSigType56=Digital -InputCue57=Item 46 Enable -InputSigType57=Digital -InputCue58=Item 47 Enable -InputSigType58=Digital -InputCue59=Item 48 Enable -InputSigType59=Digital -InputCue60=Item 49 Enable -InputSigType60=Digital -InputCue61=Item 50 Enable -InputSigType61=Digital -InputCue62=Item 51 Enable -InputSigType62=Digital -InputCue63=Item 52 Enable -InputSigType63=Digital -InputCue64=Item 53 Enable -InputSigType64=Digital -InputCue65=Item 54 Enable -InputSigType65=Digital -InputCue66=Item 55 Enable -InputSigType66=Digital -InputCue67=Item 56 Enable -InputSigType67=Digital -InputCue68=Item 57 Enable -InputSigType68=Digital -InputCue69=Item 58 Enable -InputSigType69=Digital -InputCue70=Item 59 Enable -InputSigType70=Digital -InputCue71=Item 60 Enable -InputSigType71=Digital -InputCue72=Item 61 Enable -InputSigType72=Digital -InputCue73=Item 62 Enable -InputSigType73=Digital -InputCue74=Item 63 Enable -InputSigType74=Digital -InputCue75=Item 64 Enable -InputSigType75=Digital -InputCue76=Item 65 Enable -InputSigType76=Digital -InputCue77=Item 66 Enable -InputSigType77=Digital -InputCue78=Item 67 Enable -InputSigType78=Digital -InputCue79=Item 68 Enable -InputSigType79=Digital -InputCue80=Item 69 Enable -InputSigType80=Digital -InputCue81=Item 70 Enable -InputSigType81=Digital -InputCue82=Item 71 Enable -InputSigType82=Digital -InputCue83=Item 72 Enable -InputSigType83=Digital -InputCue84=Item 73 Enable -InputSigType84=Digital -InputCue85=Item 74 Enable -InputSigType85=Digital -InputCue86=Item 75 Enable -InputSigType86=Digital -InputCue87=Item 76 Enable -InputSigType87=Digital -InputCue88=Item 77 Enable -InputSigType88=Digital -InputCue89=Item 78 Enable -InputSigType89=Digital -InputCue90=Item 79 Enable -InputSigType90=Digital -InputCue91=Item 80 Enable -InputSigType91=Digital -InputCue92=Item 81 Enable -InputSigType92=Digital -InputCue93=Item 82 Enable -InputSigType93=Digital -InputCue94=Item 83 Enable -InputSigType94=Digital -InputCue95=Item 84 Enable -InputSigType95=Digital -InputCue96=Item 85 Enable -InputSigType96=Digital -InputCue97=Item 86 Enable -InputSigType97=Digital -InputCue98=Item 87 Enable -InputSigType98=Digital -InputCue99=Item 88 Enable -InputSigType99=Digital -InputCue100=Item 89 Enable -InputSigType100=Digital -InputCue101=Item 90 Enable -InputSigType101=Digital -InputCue102=Item 91 Enable -InputSigType102=Digital -InputCue103=Item 92 Enable -InputSigType103=Digital -InputCue104=Item 93 Enable -InputSigType104=Digital -InputCue105=Item 94 Enable -InputSigType105=Digital -InputCue106=Item 95 Enable -InputSigType106=Digital -InputCue107=Item 96 Enable -InputSigType107=Digital -InputCue108=Item 97 Enable -InputSigType108=Digital -InputCue109=Item 98 Enable -InputSigType109=Digital -InputCue110=Item 99 Enable -InputSigType110=Digital -InputCue111=Item 100 Enable -InputSigType111=Digital -InputCue112=[~UNUSED2~] -InputSigType112=Digital|Analog|Serial|String -InputCue2012=[~EndGroup~]Enable -InputSigType2012=Digital -InputCue2013=[~BeginGroup~]Visible -InputSigType2013=Digital -InputCue2014=Item 1 Visible -InputSigType2014=Digital -InputCue2015=Item 2 Visible -InputSigType2015=Digital -InputCue2016=Item 3 Visible -InputSigType2016=Digital -InputCue2017=Item 4 Visible -InputSigType2017=Digital -InputCue2018=Item 5 Visible -InputSigType2018=Digital -InputCue2019=Item 6 Visible -InputSigType2019=Digital -InputCue2020=Item 7 Visible -InputSigType2020=Digital -InputCue2021=Item 8 Visible -InputSigType2021=Digital -InputCue2022=Item 9 Visible -InputSigType2022=Digital -InputCue2023=Item 10 Visible -InputSigType2023=Digital -InputCue2024=Item 11 Visible -InputSigType2024=Digital -InputCue2025=Item 12 Visible -InputSigType2025=Digital -InputCue2026=Item 13 Visible -InputSigType2026=Digital -InputCue2027=Item 14 Visible -InputSigType2027=Digital -InputCue2028=Item 15 Visible -InputSigType2028=Digital -InputCue2029=Item 16 Visible -InputSigType2029=Digital -InputCue2030=Item 17 Visible -InputSigType2030=Digital -InputCue2031=Item 18 Visible -InputSigType2031=Digital -InputCue2032=Item 19 Visible -InputSigType2032=Digital -InputCue2033=Item 20 Visible -InputSigType2033=Digital -InputCue2034=Item 21 Visible -InputSigType2034=Digital -InputCue2035=Item 22 Visible -InputSigType2035=Digital -InputCue2036=Item 23 Visible -InputSigType2036=Digital -InputCue2037=Item 24 Visible -InputSigType2037=Digital -InputCue2038=Item 25 Visible -InputSigType2038=Digital -InputCue2039=Item 26 Visible -InputSigType2039=Digital -InputCue2040=Item 27 Visible -InputSigType2040=Digital -InputCue2041=Item 28 Visible -InputSigType2041=Digital -InputCue2042=Item 29 Visible -InputSigType2042=Digital -InputCue2043=Item 30 Visible -InputSigType2043=Digital -InputCue2044=Item 31 Visible -InputSigType2044=Digital -InputCue2045=Item 32 Visible -InputSigType2045=Digital -InputCue2046=Item 33 Visible -InputSigType2046=Digital -InputCue2047=Item 34 Visible -InputSigType2047=Digital -InputCue2048=Item 35 Visible -InputSigType2048=Digital -InputCue2049=Item 36 Visible -InputSigType2049=Digital -InputCue2050=Item 37 Visible -InputSigType2050=Digital -InputCue2051=Item 38 Visible -InputSigType2051=Digital -InputCue2052=Item 39 Visible -InputSigType2052=Digital -InputCue2053=Item 40 Visible -InputSigType2053=Digital -InputCue2054=Item 41 Visible -InputSigType2054=Digital -InputCue2055=Item 42 Visible -InputSigType2055=Digital -InputCue2056=Item 43 Visible -InputSigType2056=Digital -InputCue2057=Item 44 Visible -InputSigType2057=Digital -InputCue2058=Item 45 Visible -InputSigType2058=Digital -InputCue2059=Item 46 Visible -InputSigType2059=Digital -InputCue2060=Item 47 Visible -InputSigType2060=Digital -InputCue2061=Item 48 Visible -InputSigType2061=Digital -InputCue2062=Item 49 Visible -InputSigType2062=Digital -InputCue2063=Item 50 Visible -InputSigType2063=Digital -InputCue2064=Item 51 Visible -InputSigType2064=Digital -InputCue2065=Item 52 Visible -InputSigType2065=Digital -InputCue2066=Item 53 Visible -InputSigType2066=Digital -InputCue2067=Item 54 Visible -InputSigType2067=Digital -InputCue2068=Item 55 Visible -InputSigType2068=Digital -InputCue2069=Item 56 Visible -InputSigType2069=Digital -InputCue2070=Item 57 Visible -InputSigType2070=Digital -InputCue2071=Item 58 Visible -InputSigType2071=Digital -InputCue2072=Item 59 Visible -InputSigType2072=Digital -InputCue2073=Item 60 Visible -InputSigType2073=Digital -InputCue2074=Item 61 Visible -InputSigType2074=Digital -InputCue2075=Item 62 Visible -InputSigType2075=Digital -InputCue2076=Item 63 Visible -InputSigType2076=Digital -InputCue2077=Item 64 Visible -InputSigType2077=Digital -InputCue2078=Item 65 Visible -InputSigType2078=Digital -InputCue2079=Item 66 Visible -InputSigType2079=Digital -InputCue2080=Item 67 Visible -InputSigType2080=Digital -InputCue2081=Item 68 Visible -InputSigType2081=Digital -InputCue2082=Item 69 Visible -InputSigType2082=Digital -InputCue2083=Item 70 Visible -InputSigType2083=Digital -InputCue2084=Item 71 Visible -InputSigType2084=Digital -InputCue2085=Item 72 Visible -InputSigType2085=Digital -InputCue2086=Item 73 Visible -InputSigType2086=Digital -InputCue2087=Item 74 Visible -InputSigType2087=Digital -InputCue2088=Item 75 Visible -InputSigType2088=Digital -InputCue2089=Item 76 Visible -InputSigType2089=Digital -InputCue2090=Item 77 Visible -InputSigType2090=Digital -InputCue2091=Item 78 Visible -InputSigType2091=Digital -InputCue2092=Item 79 Visible -InputSigType2092=Digital -InputCue2093=Item 80 Visible -InputSigType2093=Digital -InputCue2094=Item 81 Visible -InputSigType2094=Digital -InputCue2095=Item 82 Visible -InputSigType2095=Digital -InputCue2096=Item 83 Visible -InputSigType2096=Digital -InputCue2097=Item 84 Visible -InputSigType2097=Digital -InputCue2098=Item 85 Visible -InputSigType2098=Digital -InputCue2099=Item 86 Visible -InputSigType2099=Digital -InputCue2100=Item 87 Visible -InputSigType2100=Digital -InputCue2101=Item 88 Visible -InputSigType2101=Digital -InputCue2102=Item 89 Visible -InputSigType2102=Digital -InputCue2103=Item 90 Visible -InputSigType2103=Digital -InputCue2104=Item 91 Visible -InputSigType2104=Digital -InputCue2105=Item 92 Visible -InputSigType2105=Digital -InputCue2106=Item 93 Visible -InputSigType2106=Digital -InputCue2107=Item 94 Visible -InputSigType2107=Digital -InputCue2108=Item 95 Visible -InputSigType2108=Digital -InputCue2109=Item 96 Visible -InputSigType2109=Digital -InputCue2110=Item 97 Visible -InputSigType2110=Digital -InputCue2111=Item 98 Visible -InputSigType2111=Digital -InputCue2112=Item 99 Visible -InputSigType2112=Digital -InputCue2113=Item 100 Visible -InputSigType2113=Digital -InputCue2114=[~UNUSED2~] -InputSigType2114=Digital|Analog|Serial|String -InputCue4014=[~EndGroup~]Visible -InputSigType4014=Digital -InputCue4015=[~BeginGroup~]fb -InputSigType4015=Digital -InputCue4016=fb1 -InputSigType4016=Digital -InputCue4017=fb2 -InputSigType4017=Digital -InputCue4018=fb3 -InputSigType4018=Digital -InputCue4019=fb4 -InputSigType4019=Digital -InputCue4020=fb5 -InputSigType4020=Digital -InputCue4021=fb6 -InputSigType4021=Digital -InputCue4022=fb7 -InputSigType4022=Digital -InputCue4023=fb8 -InputSigType4023=Digital -InputCue4024=fb9 -InputSigType4024=Digital -InputCue4025=fb10 -InputSigType4025=Digital -InputCue4026=fb11 -InputSigType4026=Digital -InputCue4027=fb12 -InputSigType4027=Digital -InputCue4028=fb13 -InputSigType4028=Digital -InputCue4029=fb14 -InputSigType4029=Digital -InputCue4030=fb15 -InputSigType4030=Digital -InputCue4031=fb16 -InputSigType4031=Digital -InputCue4032=fb17 -InputSigType4032=Digital -InputCue4033=fb18 -InputSigType4033=Digital -InputCue4034=fb19 -InputSigType4034=Digital -InputCue4035=fb20 -InputSigType4035=Digital -InputCue4036=fb21 -InputSigType4036=Digital -InputCue4037=fb22 -InputSigType4037=Digital -InputCue4038=fb23 -InputSigType4038=Digital -InputCue4039=fb24 -InputSigType4039=Digital -InputCue4040=fb25 -InputSigType4040=Digital -InputCue4041=fb26 -InputSigType4041=Digital -InputCue4042=fb27 -InputSigType4042=Digital -InputCue4043=fb28 -InputSigType4043=Digital -InputCue4044=fb29 -InputSigType4044=Digital -InputCue4045=fb30 -InputSigType4045=Digital -InputCue4046=fb31 -InputSigType4046=Digital -InputCue4047=fb32 -InputSigType4047=Digital -InputCue4048=fb33 -InputSigType4048=Digital -InputCue4049=fb34 -InputSigType4049=Digital -InputCue4050=fb35 -InputSigType4050=Digital -InputCue4051=fb36 -InputSigType4051=Digital -InputCue4052=fb37 -InputSigType4052=Digital -InputCue4053=fb38 -InputSigType4053=Digital -InputCue4054=fb39 -InputSigType4054=Digital -InputCue4055=fb40 -InputSigType4055=Digital -InputCue4056=fb41 -InputSigType4056=Digital -InputCue4057=fb42 -InputSigType4057=Digital -InputCue4058=fb43 -InputSigType4058=Digital -InputCue4059=fb44 -InputSigType4059=Digital -InputCue4060=fb45 -InputSigType4060=Digital -InputCue4061=fb46 -InputSigType4061=Digital -InputCue4062=fb47 -InputSigType4062=Digital -InputCue4063=fb48 -InputSigType4063=Digital -InputCue4064=fb49 -InputSigType4064=Digital -InputCue4065=fb50 -InputSigType4065=Digital -InputCue4066=fb51 -InputSigType4066=Digital -InputCue4067=fb52 -InputSigType4067=Digital -InputCue4068=fb53 -InputSigType4068=Digital -InputCue4069=fb54 -InputSigType4069=Digital -InputCue4070=fb55 -InputSigType4070=Digital -InputCue4071=fb56 -InputSigType4071=Digital -InputCue4072=fb57 -InputSigType4072=Digital -InputCue4073=fb58 -InputSigType4073=Digital -InputCue4074=fb59 -InputSigType4074=Digital -InputCue4075=fb60 -InputSigType4075=Digital -InputCue4076=fb61 -InputSigType4076=Digital -InputCue4077=fb62 -InputSigType4077=Digital -InputCue4078=fb63 -InputSigType4078=Digital -InputCue4079=fb64 -InputSigType4079=Digital -InputCue4080=fb65 -InputSigType4080=Digital -InputCue4081=fb66 -InputSigType4081=Digital -InputCue4082=fb67 -InputSigType4082=Digital -InputCue4083=fb68 -InputSigType4083=Digital -InputCue4084=fb69 -InputSigType4084=Digital -InputCue4085=fb70 -InputSigType4085=Digital -InputCue4086=fb71 -InputSigType4086=Digital -InputCue4087=fb72 -InputSigType4087=Digital -InputCue4088=fb73 -InputSigType4088=Digital -InputCue4089=fb74 -InputSigType4089=Digital -InputCue4090=fb75 -InputSigType4090=Digital -InputCue4091=fb76 -InputSigType4091=Digital -InputCue4092=fb77 -InputSigType4092=Digital -InputCue4093=fb78 -InputSigType4093=Digital -InputCue4094=fb79 -InputSigType4094=Digital -InputCue4095=fb80 -InputSigType4095=Digital -InputCue4096=fb81 -InputSigType4096=Digital -InputCue4097=fb82 -InputSigType4097=Digital -InputCue4098=fb83 -InputSigType4098=Digital -InputCue4099=fb84 -InputSigType4099=Digital -InputCue4100=fb85 -InputSigType4100=Digital -InputCue4101=fb86 -InputSigType4101=Digital -InputCue4102=fb87 -InputSigType4102=Digital -InputCue4103=fb88 -InputSigType4103=Digital -InputCue4104=fb89 -InputSigType4104=Digital -InputCue4105=fb90 -InputSigType4105=Digital -InputCue4106=fb91 -InputSigType4106=Digital -InputCue4107=fb92 -InputSigType4107=Digital -InputCue4108=fb93 -InputSigType4108=Digital -InputCue4109=fb94 -InputSigType4109=Digital -InputCue4110=fb95 -InputSigType4110=Digital -InputCue4111=fb96 -InputSigType4111=Digital -InputCue4112=fb97 -InputSigType4112=Digital -InputCue4113=fb98 -InputSigType4113=Digital -InputCue4114=fb99 -InputSigType4114=Digital -InputCue4115=fb100 -InputSigType4115=Digital -InputCue4116=fb101 -InputSigType4116=Digital -InputCue4117=fb102 -InputSigType4117=Digital -InputCue4118=fb103 -InputSigType4118=Digital -InputCue4119=fb104 -InputSigType4119=Digital -InputCue4120=fb105 -InputSigType4120=Digital -InputCue4121=fb106 -InputSigType4121=Digital -InputCue4122=fb107 -InputSigType4122=Digital -InputCue4123=fb108 -InputSigType4123=Digital -InputCue4124=fb109 -InputSigType4124=Digital -InputCue4125=fb110 -InputSigType4125=Digital -InputCue4126=fb111 -InputSigType4126=Digital -InputCue4127=fb112 -InputSigType4127=Digital -InputCue4128=fb113 -InputSigType4128=Digital -InputCue4129=fb114 -InputSigType4129=Digital -InputCue4130=fb115 -InputSigType4130=Digital -InputCue4131=fb116 -InputSigType4131=Digital -InputCue4132=fb117 -InputSigType4132=Digital -InputCue4133=fb118 -InputSigType4133=Digital -InputCue4134=fb119 -InputSigType4134=Digital -InputCue4135=fb120 -InputSigType4135=Digital -InputCue4136=fb121 -InputSigType4136=Digital -InputCue4137=fb122 -InputSigType4137=Digital -InputCue4138=fb123 -InputSigType4138=Digital -InputCue4139=fb124 -InputSigType4139=Digital -InputCue4140=fb125 -InputSigType4140=Digital -InputCue4141=fb126 -InputSigType4141=Digital -InputCue4142=fb127 -InputSigType4142=Digital -InputCue4143=fb128 -InputSigType4143=Digital -InputCue4144=fb129 -InputSigType4144=Digital -InputCue4145=fb130 -InputSigType4145=Digital -InputCue4146=fb131 -InputSigType4146=Digital -InputCue4147=fb132 -InputSigType4147=Digital -InputCue4148=fb133 -InputSigType4148=Digital -InputCue4149=fb134 -InputSigType4149=Digital -InputCue4150=fb135 -InputSigType4150=Digital -InputCue4151=fb136 -InputSigType4151=Digital -InputCue4152=fb137 -InputSigType4152=Digital -InputCue4153=fb138 -InputSigType4153=Digital -InputCue4154=fb139 -InputSigType4154=Digital -InputCue4155=fb140 -InputSigType4155=Digital -InputCue4156=fb141 -InputSigType4156=Digital -InputCue4157=fb142 -InputSigType4157=Digital -InputCue4158=fb143 -InputSigType4158=Digital -InputCue4159=fb144 -InputSigType4159=Digital -InputCue4160=fb145 -InputSigType4160=Digital -InputCue4161=fb146 -InputSigType4161=Digital -InputCue4162=fb147 -InputSigType4162=Digital -InputCue4163=fb148 -InputSigType4163=Digital -InputCue4164=fb149 -InputSigType4164=Digital -InputCue4165=fb150 -InputSigType4165=Digital -InputCue4166=fb151 -InputSigType4166=Digital -InputCue4167=fb152 -InputSigType4167=Digital -InputCue4168=fb153 -InputSigType4168=Digital -InputCue4169=fb154 -InputSigType4169=Digital -InputCue4170=fb155 -InputSigType4170=Digital -InputCue4171=fb156 -InputSigType4171=Digital -InputCue4172=fb157 -InputSigType4172=Digital -InputCue4173=fb158 -InputSigType4173=Digital -InputCue4174=fb159 -InputSigType4174=Digital -InputCue4175=fb160 -InputSigType4175=Digital -InputCue4176=fb161 -InputSigType4176=Digital -InputCue4177=fb162 -InputSigType4177=Digital -InputCue4178=fb163 -InputSigType4178=Digital -InputCue4179=fb164 -InputSigType4179=Digital -InputCue4180=fb165 -InputSigType4180=Digital -InputCue4181=fb166 -InputSigType4181=Digital -InputCue4182=fb167 -InputSigType4182=Digital -InputCue4183=fb168 -InputSigType4183=Digital -InputCue4184=fb169 -InputSigType4184=Digital -InputCue4185=fb170 -InputSigType4185=Digital -InputCue4186=fb171 -InputSigType4186=Digital -InputCue4187=fb172 -InputSigType4187=Digital -InputCue4188=fb173 -InputSigType4188=Digital -InputCue4189=fb174 -InputSigType4189=Digital -InputCue4190=fb175 -InputSigType4190=Digital -InputCue4191=fb176 -InputSigType4191=Digital -InputCue4192=fb177 -InputSigType4192=Digital -InputCue4193=fb178 -InputSigType4193=Digital -InputCue4194=fb179 -InputSigType4194=Digital -InputCue4195=fb180 -InputSigType4195=Digital -InputCue4196=fb181 -InputSigType4196=Digital -InputCue4197=fb182 -InputSigType4197=Digital -InputCue4198=fb183 -InputSigType4198=Digital -InputCue4199=fb184 -InputSigType4199=Digital -InputCue4200=fb185 -InputSigType4200=Digital -InputCue4201=fb186 -InputSigType4201=Digital -InputCue4202=fb187 -InputSigType4202=Digital -InputCue4203=fb188 -InputSigType4203=Digital -InputCue4204=fb189 -InputSigType4204=Digital -InputCue4205=fb190 -InputSigType4205=Digital -InputCue4206=fb191 -InputSigType4206=Digital -InputCue4207=fb192 -InputSigType4207=Digital -InputCue4208=fb193 -InputSigType4208=Digital -InputCue4209=fb194 -InputSigType4209=Digital -InputCue4210=fb195 -InputSigType4210=Digital -InputCue4211=fb196 -InputSigType4211=Digital -InputCue4212=fb197 -InputSigType4212=Digital -InputCue4213=fb198 -InputSigType4213=Digital -InputCue4214=fb199 -InputSigType4214=Digital -InputCue4215=fb200 -InputSigType4215=Digital -InputCue4216=fb201 -InputSigType4216=Digital -InputCue4217=fb202 -InputSigType4217=Digital -InputCue4218=fb203 -InputSigType4218=Digital -InputCue4219=fb204 -InputSigType4219=Digital -InputCue4220=fb205 -InputSigType4220=Digital -InputCue4221=fb206 -InputSigType4221=Digital -InputCue4222=fb207 -InputSigType4222=Digital -InputCue4223=fb208 -InputSigType4223=Digital -InputCue4224=fb209 -InputSigType4224=Digital -InputCue4225=fb210 -InputSigType4225=Digital -InputCue4226=fb211 -InputSigType4226=Digital -InputCue4227=fb212 -InputSigType4227=Digital -InputCue4228=fb213 -InputSigType4228=Digital -InputCue4229=fb214 -InputSigType4229=Digital -InputCue4230=fb215 -InputSigType4230=Digital -InputCue4231=fb216 -InputSigType4231=Digital -InputCue4232=fb217 -InputSigType4232=Digital -InputCue4233=fb218 -InputSigType4233=Digital -InputCue4234=fb219 -InputSigType4234=Digital -InputCue4235=fb220 -InputSigType4235=Digital -InputCue4236=fb221 -InputSigType4236=Digital -InputCue4237=fb222 -InputSigType4237=Digital -InputCue4238=fb223 -InputSigType4238=Digital -InputCue4239=fb224 -InputSigType4239=Digital -InputCue4240=fb225 -InputSigType4240=Digital -InputCue4241=fb226 -InputSigType4241=Digital -InputCue4242=fb227 -InputSigType4242=Digital -InputCue4243=fb228 -InputSigType4243=Digital -InputCue4244=fb229 -InputSigType4244=Digital -InputCue4245=fb230 -InputSigType4245=Digital -InputCue4246=fb231 -InputSigType4246=Digital -InputCue4247=fb232 -InputSigType4247=Digital -InputCue4248=fb233 -InputSigType4248=Digital -InputCue4249=fb234 -InputSigType4249=Digital -InputCue4250=fb235 -InputSigType4250=Digital -InputCue4251=fb236 -InputSigType4251=Digital -InputCue4252=fb237 -InputSigType4252=Digital -InputCue4253=fb238 -InputSigType4253=Digital -InputCue4254=fb239 -InputSigType4254=Digital -InputCue4255=fb240 -InputSigType4255=Digital -InputCue4256=fb241 -InputSigType4256=Digital -InputCue4257=fb242 -InputSigType4257=Digital -InputCue4258=fb243 -InputSigType4258=Digital -InputCue4259=fb244 -InputSigType4259=Digital -InputCue4260=fb245 -InputSigType4260=Digital -InputCue4261=fb246 -InputSigType4261=Digital -InputCue4262=fb247 -InputSigType4262=Digital -InputCue4263=fb248 -InputSigType4263=Digital -InputCue4264=fb249 -InputSigType4264=Digital -InputCue4265=fb250 -InputSigType4265=Digital -InputCue4266=fb251 -InputSigType4266=Digital -InputCue4267=fb252 -InputSigType4267=Digital -InputCue4268=fb253 -InputSigType4268=Digital -InputCue4269=fb254 -InputSigType4269=Digital -InputCue4270=fb255 -InputSigType4270=Digital -InputCue4271=fb256 -InputSigType4271=Digital -InputCue4272=fb257 -InputSigType4272=Digital -InputCue4273=fb258 -InputSigType4273=Digital -InputCue4274=fb259 -InputSigType4274=Digital -InputCue4275=fb260 -InputSigType4275=Digital -InputCue4276=fb261 -InputSigType4276=Digital -InputCue4277=fb262 -InputSigType4277=Digital -InputCue4278=fb263 -InputSigType4278=Digital -InputCue4279=fb264 -InputSigType4279=Digital -InputCue4280=fb265 -InputSigType4280=Digital -InputCue4281=fb266 -InputSigType4281=Digital -InputCue4282=fb267 -InputSigType4282=Digital -InputCue4283=fb268 -InputSigType4283=Digital -InputCue4284=fb269 -InputSigType4284=Digital -InputCue4285=fb270 -InputSigType4285=Digital -InputCue4286=fb271 -InputSigType4286=Digital -InputCue4287=fb272 -InputSigType4287=Digital -InputCue4288=fb273 -InputSigType4288=Digital -InputCue4289=fb274 -InputSigType4289=Digital -InputCue4290=fb275 -InputSigType4290=Digital -InputCue4291=fb276 -InputSigType4291=Digital -InputCue4292=fb277 -InputSigType4292=Digital -InputCue4293=fb278 -InputSigType4293=Digital -InputCue4294=fb279 -InputSigType4294=Digital -InputCue4295=fb280 -InputSigType4295=Digital -InputCue4296=fb281 -InputSigType4296=Digital -InputCue4297=fb282 -InputSigType4297=Digital -InputCue4298=fb283 -InputSigType4298=Digital -InputCue4299=fb284 -InputSigType4299=Digital -InputCue4300=fb285 -InputSigType4300=Digital -InputCue4301=fb286 -InputSigType4301=Digital -InputCue4302=fb287 -InputSigType4302=Digital -InputCue4303=fb288 -InputSigType4303=Digital -InputCue4304=fb289 -InputSigType4304=Digital -InputCue4305=fb290 -InputSigType4305=Digital -InputCue4306=fb291 -InputSigType4306=Digital -InputCue4307=fb292 -InputSigType4307=Digital -InputCue4308=fb293 -InputSigType4308=Digital -InputCue4309=fb294 -InputSigType4309=Digital -InputCue4310=fb295 -InputSigType4310=Digital -InputCue4311=fb296 -InputSigType4311=Digital -InputCue4312=fb297 -InputSigType4312=Digital -InputCue4313=fb298 -InputSigType4313=Digital -InputCue4314=fb299 -InputSigType4314=Digital -InputCue4315=fb300 -InputSigType4315=Digital -InputCue4316=[~EndGroup~]fb -InputSigType4316=Digital -OutputCue1=Is Moving -OutputSigType1=Digital -OutputCue2=[~UNUSED2~] -OutputSigType2=Digital -OutputCue3=[~UNUSED2~] -OutputSigType3=Digital -OutputCue4=[~UNUSED2~] -OutputSigType4=Digital -OutputCue5=[~UNUSED2~] -OutputSigType5=Digital -OutputCue6=[~UNUSED2~] -OutputSigType6=Digital -OutputCue7=[~UNUSED2~] -OutputSigType7=Digital -OutputCue8=[~UNUSED2~] -OutputSigType8=Digital -OutputCue9=[~UNUSED2~] -OutputSigType9=Digital -OutputCue10=[~UNUSED2~] -OutputSigType10=Digital -OutputCue11=[~BeginGroup~]Enable -OutputSigType11=Digital -OutputCue12=[~UNUSED3~] -OutputSigType12=Digital -OutputCue13=[~UNUSED3~] -OutputSigType13=Digital -OutputCue14=[~UNUSED3~] -OutputSigType14=Digital -OutputCue15=[~UNUSED3~] -OutputSigType15=Digital -OutputCue16=[~UNUSED3~] -OutputSigType16=Digital -OutputCue17=[~UNUSED3~] -OutputSigType17=Digital -OutputCue18=[~UNUSED3~] -OutputSigType18=Digital -OutputCue19=[~UNUSED3~] -OutputSigType19=Digital -OutputCue20=[~UNUSED3~] -OutputSigType20=Digital -OutputCue21=[~UNUSED3~] -OutputSigType21=Digital -OutputCue22=[~UNUSED3~] -OutputSigType22=Digital -OutputCue23=[~UNUSED3~] -OutputSigType23=Digital -OutputCue24=[~UNUSED3~] -OutputSigType24=Digital -OutputCue25=[~UNUSED3~] -OutputSigType25=Digital -OutputCue26=[~UNUSED3~] -OutputSigType26=Digital -OutputCue27=[~UNUSED3~] -OutputSigType27=Digital -OutputCue28=[~UNUSED3~] -OutputSigType28=Digital -OutputCue29=[~UNUSED3~] -OutputSigType29=Digital -OutputCue30=[~UNUSED3~] -OutputSigType30=Digital -OutputCue31=[~UNUSED3~] -OutputSigType31=Digital -OutputCue32=[~UNUSED3~] -OutputSigType32=Digital -OutputCue33=[~UNUSED3~] -OutputSigType33=Digital -OutputCue34=[~UNUSED3~] -OutputSigType34=Digital -OutputCue35=[~UNUSED3~] -OutputSigType35=Digital -OutputCue36=[~UNUSED3~] -OutputSigType36=Digital -OutputCue37=[~UNUSED3~] -OutputSigType37=Digital -OutputCue38=[~UNUSED3~] -OutputSigType38=Digital -OutputCue39=[~UNUSED3~] -OutputSigType39=Digital -OutputCue40=[~UNUSED3~] -OutputSigType40=Digital -OutputCue41=[~UNUSED3~] -OutputSigType41=Digital -OutputCue42=[~UNUSED3~] -OutputSigType42=Digital -OutputCue43=[~UNUSED3~] -OutputSigType43=Digital -OutputCue44=[~UNUSED3~] -OutputSigType44=Digital -OutputCue45=[~UNUSED3~] -OutputSigType45=Digital -OutputCue46=[~UNUSED3~] -OutputSigType46=Digital -OutputCue47=[~UNUSED3~] -OutputSigType47=Digital -OutputCue48=[~UNUSED3~] -OutputSigType48=Digital -OutputCue49=[~UNUSED3~] -OutputSigType49=Digital -OutputCue50=[~UNUSED3~] -OutputSigType50=Digital -OutputCue51=[~UNUSED3~] -OutputSigType51=Digital -OutputCue52=[~UNUSED3~] -OutputSigType52=Digital -OutputCue53=[~UNUSED3~] -OutputSigType53=Digital -OutputCue54=[~UNUSED3~] -OutputSigType54=Digital -OutputCue55=[~UNUSED3~] -OutputSigType55=Digital -OutputCue56=[~UNUSED3~] -OutputSigType56=Digital -OutputCue57=[~UNUSED3~] -OutputSigType57=Digital -OutputCue58=[~UNUSED3~] -OutputSigType58=Digital -OutputCue59=[~UNUSED3~] -OutputSigType59=Digital -OutputCue60=[~UNUSED3~] -OutputSigType60=Digital -OutputCue61=[~UNUSED3~] -OutputSigType61=Digital -OutputCue62=[~UNUSED3~] -OutputSigType62=Digital -OutputCue63=[~UNUSED3~] -OutputSigType63=Digital -OutputCue64=[~UNUSED3~] -OutputSigType64=Digital -OutputCue65=[~UNUSED3~] -OutputSigType65=Digital -OutputCue66=[~UNUSED3~] -OutputSigType66=Digital -OutputCue67=[~UNUSED3~] -OutputSigType67=Digital -OutputCue68=[~UNUSED3~] -OutputSigType68=Digital -OutputCue69=[~UNUSED3~] -OutputSigType69=Digital -OutputCue70=[~UNUSED3~] -OutputSigType70=Digital -OutputCue71=[~UNUSED3~] -OutputSigType71=Digital -OutputCue72=[~UNUSED3~] -OutputSigType72=Digital -OutputCue73=[~UNUSED3~] -OutputSigType73=Digital -OutputCue74=[~UNUSED3~] -OutputSigType74=Digital -OutputCue75=[~UNUSED3~] -OutputSigType75=Digital -OutputCue76=[~UNUSED3~] -OutputSigType76=Digital -OutputCue77=[~UNUSED3~] -OutputSigType77=Digital -OutputCue78=[~UNUSED3~] -OutputSigType78=Digital -OutputCue79=[~UNUSED3~] -OutputSigType79=Digital -OutputCue80=[~UNUSED3~] -OutputSigType80=Digital -OutputCue81=[~UNUSED3~] -OutputSigType81=Digital -OutputCue82=[~UNUSED3~] -OutputSigType82=Digital -OutputCue83=[~UNUSED3~] -OutputSigType83=Digital -OutputCue84=[~UNUSED3~] -OutputSigType84=Digital -OutputCue85=[~UNUSED3~] -OutputSigType85=Digital -OutputCue86=[~UNUSED3~] -OutputSigType86=Digital -OutputCue87=[~UNUSED3~] -OutputSigType87=Digital -OutputCue88=[~UNUSED3~] -OutputSigType88=Digital -OutputCue89=[~UNUSED3~] -OutputSigType89=Digital -OutputCue90=[~UNUSED3~] -OutputSigType90=Digital -OutputCue91=[~UNUSED3~] -OutputSigType91=Digital -OutputCue92=[~UNUSED3~] -OutputSigType92=Digital -OutputCue93=[~UNUSED3~] -OutputSigType93=Digital -OutputCue94=[~UNUSED3~] -OutputSigType94=Digital -OutputCue95=[~UNUSED3~] -OutputSigType95=Digital -OutputCue96=[~UNUSED3~] -OutputSigType96=Digital -OutputCue97=[~UNUSED3~] -OutputSigType97=Digital -OutputCue98=[~UNUSED3~] -OutputSigType98=Digital -OutputCue99=[~UNUSED3~] -OutputSigType99=Digital -OutputCue100=[~UNUSED3~] -OutputSigType100=Digital -OutputCue101=[~UNUSED3~] -OutputSigType101=Digital -OutputCue102=[~UNUSED3~] -OutputSigType102=Digital -OutputCue103=[~UNUSED3~] -OutputSigType103=Digital -OutputCue104=[~UNUSED3~] -OutputSigType104=Digital -OutputCue105=[~UNUSED3~] -OutputSigType105=Digital -OutputCue106=[~UNUSED3~] -OutputSigType106=Digital -OutputCue107=[~UNUSED3~] -OutputSigType107=Digital -OutputCue108=[~UNUSED3~] -OutputSigType108=Digital -OutputCue109=[~UNUSED3~] -OutputSigType109=Digital -OutputCue110=[~UNUSED3~] -OutputSigType110=Digital -OutputCue111=[~UNUSED3~] -OutputSigType111=Digital -OutputCue112=[~UNUSED2~] -OutputSigType112=Digital|Analog|Serial|String -OutputCue2012=[~EndGroup~]Enable -OutputSigType2012=Digital -OutputCue2013=[~BeginGroup~]Visible -OutputSigType2013=Digital -OutputCue2014=[~UNUSED3~] -OutputSigType2014=Digital -OutputCue2015=[~UNUSED3~] -OutputSigType2015=Digital -OutputCue2016=[~UNUSED3~] -OutputSigType2016=Digital -OutputCue2017=[~UNUSED3~] -OutputSigType2017=Digital -OutputCue2018=[~UNUSED3~] -OutputSigType2018=Digital -OutputCue2019=[~UNUSED3~] -OutputSigType2019=Digital -OutputCue2020=[~UNUSED3~] -OutputSigType2020=Digital -OutputCue2021=[~UNUSED3~] -OutputSigType2021=Digital -OutputCue2022=[~UNUSED3~] -OutputSigType2022=Digital -OutputCue2023=[~UNUSED3~] -OutputSigType2023=Digital -OutputCue2024=[~UNUSED3~] -OutputSigType2024=Digital -OutputCue2025=[~UNUSED3~] -OutputSigType2025=Digital -OutputCue2026=[~UNUSED3~] -OutputSigType2026=Digital -OutputCue2027=[~UNUSED3~] -OutputSigType2027=Digital -OutputCue2028=[~UNUSED3~] -OutputSigType2028=Digital -OutputCue2029=[~UNUSED3~] -OutputSigType2029=Digital -OutputCue2030=[~UNUSED3~] -OutputSigType2030=Digital -OutputCue2031=[~UNUSED3~] -OutputSigType2031=Digital -OutputCue2032=[~UNUSED3~] -OutputSigType2032=Digital -OutputCue2033=[~UNUSED3~] -OutputSigType2033=Digital -OutputCue2034=[~UNUSED3~] -OutputSigType2034=Digital -OutputCue2035=[~UNUSED3~] -OutputSigType2035=Digital -OutputCue2036=[~UNUSED3~] -OutputSigType2036=Digital -OutputCue2037=[~UNUSED3~] -OutputSigType2037=Digital -OutputCue2038=[~UNUSED3~] -OutputSigType2038=Digital -OutputCue2039=[~UNUSED3~] -OutputSigType2039=Digital -OutputCue2040=[~UNUSED3~] -OutputSigType2040=Digital -OutputCue2041=[~UNUSED3~] -OutputSigType2041=Digital -OutputCue2042=[~UNUSED3~] -OutputSigType2042=Digital -OutputCue2043=[~UNUSED3~] -OutputSigType2043=Digital -OutputCue2044=[~UNUSED3~] -OutputSigType2044=Digital -OutputCue2045=[~UNUSED3~] -OutputSigType2045=Digital -OutputCue2046=[~UNUSED3~] -OutputSigType2046=Digital -OutputCue2047=[~UNUSED3~] -OutputSigType2047=Digital -OutputCue2048=[~UNUSED3~] -OutputSigType2048=Digital -OutputCue2049=[~UNUSED3~] -OutputSigType2049=Digital -OutputCue2050=[~UNUSED3~] -OutputSigType2050=Digital -OutputCue2051=[~UNUSED3~] -OutputSigType2051=Digital -OutputCue2052=[~UNUSED3~] -OutputSigType2052=Digital -OutputCue2053=[~UNUSED3~] -OutputSigType2053=Digital -OutputCue2054=[~UNUSED3~] -OutputSigType2054=Digital -OutputCue2055=[~UNUSED3~] -OutputSigType2055=Digital -OutputCue2056=[~UNUSED3~] -OutputSigType2056=Digital -OutputCue2057=[~UNUSED3~] -OutputSigType2057=Digital -OutputCue2058=[~UNUSED3~] -OutputSigType2058=Digital -OutputCue2059=[~UNUSED3~] -OutputSigType2059=Digital -OutputCue2060=[~UNUSED3~] -OutputSigType2060=Digital -OutputCue2061=[~UNUSED3~] -OutputSigType2061=Digital -OutputCue2062=[~UNUSED3~] -OutputSigType2062=Digital -OutputCue2063=[~UNUSED3~] -OutputSigType2063=Digital -OutputCue2064=[~UNUSED3~] -OutputSigType2064=Digital -OutputCue2065=[~UNUSED3~] -OutputSigType2065=Digital -OutputCue2066=[~UNUSED3~] -OutputSigType2066=Digital -OutputCue2067=[~UNUSED3~] -OutputSigType2067=Digital -OutputCue2068=[~UNUSED3~] -OutputSigType2068=Digital -OutputCue2069=[~UNUSED3~] -OutputSigType2069=Digital -OutputCue2070=[~UNUSED3~] -OutputSigType2070=Digital -OutputCue2071=[~UNUSED3~] -OutputSigType2071=Digital -OutputCue2072=[~UNUSED3~] -OutputSigType2072=Digital -OutputCue2073=[~UNUSED3~] -OutputSigType2073=Digital -OutputCue2074=[~UNUSED3~] -OutputSigType2074=Digital -OutputCue2075=[~UNUSED3~] -OutputSigType2075=Digital -OutputCue2076=[~UNUSED3~] -OutputSigType2076=Digital -OutputCue2077=[~UNUSED3~] -OutputSigType2077=Digital -OutputCue2078=[~UNUSED3~] -OutputSigType2078=Digital -OutputCue2079=[~UNUSED3~] -OutputSigType2079=Digital -OutputCue2080=[~UNUSED3~] -OutputSigType2080=Digital -OutputCue2081=[~UNUSED3~] -OutputSigType2081=Digital -OutputCue2082=[~UNUSED3~] -OutputSigType2082=Digital -OutputCue2083=[~UNUSED3~] -OutputSigType2083=Digital -OutputCue2084=[~UNUSED3~] -OutputSigType2084=Digital -OutputCue2085=[~UNUSED3~] -OutputSigType2085=Digital -OutputCue2086=[~UNUSED3~] -OutputSigType2086=Digital -OutputCue2087=[~UNUSED3~] -OutputSigType2087=Digital -OutputCue2088=[~UNUSED3~] -OutputSigType2088=Digital -OutputCue2089=[~UNUSED3~] -OutputSigType2089=Digital -OutputCue2090=[~UNUSED3~] -OutputSigType2090=Digital -OutputCue2091=[~UNUSED3~] -OutputSigType2091=Digital -OutputCue2092=[~UNUSED3~] -OutputSigType2092=Digital -OutputCue2093=[~UNUSED3~] -OutputSigType2093=Digital -OutputCue2094=[~UNUSED3~] -OutputSigType2094=Digital -OutputCue2095=[~UNUSED3~] -OutputSigType2095=Digital -OutputCue2096=[~UNUSED3~] -OutputSigType2096=Digital -OutputCue2097=[~UNUSED3~] -OutputSigType2097=Digital -OutputCue2098=[~UNUSED3~] -OutputSigType2098=Digital -OutputCue2099=[~UNUSED3~] -OutputSigType2099=Digital -OutputCue2100=[~UNUSED3~] -OutputSigType2100=Digital -OutputCue2101=[~UNUSED3~] -OutputSigType2101=Digital -OutputCue2102=[~UNUSED3~] -OutputSigType2102=Digital -OutputCue2103=[~UNUSED3~] -OutputSigType2103=Digital -OutputCue2104=[~UNUSED3~] -OutputSigType2104=Digital -OutputCue2105=[~UNUSED3~] -OutputSigType2105=Digital -OutputCue2106=[~UNUSED3~] -OutputSigType2106=Digital -OutputCue2107=[~UNUSED3~] -OutputSigType2107=Digital -OutputCue2108=[~UNUSED3~] -OutputSigType2108=Digital -OutputCue2109=[~UNUSED3~] -OutputSigType2109=Digital -OutputCue2110=[~UNUSED3~] -OutputSigType2110=Digital -OutputCue2111=[~UNUSED3~] -OutputSigType2111=Digital -OutputCue2112=[~UNUSED3~] -OutputSigType2112=Digital -OutputCue2113=[~UNUSED3~] -OutputSigType2113=Digital -OutputCue2114=[~UNUSED2~] -OutputSigType2114=Digital|Analog|Serial|String -OutputCue4014=[~EndGroup~]Visible -OutputSigType4014=Digital -OutputCue4015=[~BeginGroup~]Press -OutputSigType4015=Digital -OutputCue4016=press1 -OutputSigType4016=Digital -OutputCue4017=press2 -OutputSigType4017=Digital -OutputCue4018=press3 -OutputSigType4018=Digital -OutputCue4019=press4 -OutputSigType4019=Digital -OutputCue4020=press5 -OutputSigType4020=Digital -OutputCue4021=press6 -OutputSigType4021=Digital -OutputCue4022=press7 -OutputSigType4022=Digital -OutputCue4023=press8 -OutputSigType4023=Digital -OutputCue4024=press9 -OutputSigType4024=Digital -OutputCue4025=press10 -OutputSigType4025=Digital -OutputCue4026=press11 -OutputSigType4026=Digital -OutputCue4027=press12 -OutputSigType4027=Digital -OutputCue4028=press13 -OutputSigType4028=Digital -OutputCue4029=press14 -OutputSigType4029=Digital -OutputCue4030=press15 -OutputSigType4030=Digital -OutputCue4031=press16 -OutputSigType4031=Digital -OutputCue4032=press17 -OutputSigType4032=Digital -OutputCue4033=press18 -OutputSigType4033=Digital -OutputCue4034=press19 -OutputSigType4034=Digital -OutputCue4035=press20 -OutputSigType4035=Digital -OutputCue4036=press21 -OutputSigType4036=Digital -OutputCue4037=press22 -OutputSigType4037=Digital -OutputCue4038=press23 -OutputSigType4038=Digital -OutputCue4039=press24 -OutputSigType4039=Digital -OutputCue4040=press25 -OutputSigType4040=Digital -OutputCue4041=press26 -OutputSigType4041=Digital -OutputCue4042=press27 -OutputSigType4042=Digital -OutputCue4043=press28 -OutputSigType4043=Digital -OutputCue4044=press29 -OutputSigType4044=Digital -OutputCue4045=press30 -OutputSigType4045=Digital -OutputCue4046=press31 -OutputSigType4046=Digital -OutputCue4047=press32 -OutputSigType4047=Digital -OutputCue4048=press33 -OutputSigType4048=Digital -OutputCue4049=press34 -OutputSigType4049=Digital -OutputCue4050=press35 -OutputSigType4050=Digital -OutputCue4051=press36 -OutputSigType4051=Digital -OutputCue4052=press37 -OutputSigType4052=Digital -OutputCue4053=press38 -OutputSigType4053=Digital -OutputCue4054=press39 -OutputSigType4054=Digital -OutputCue4055=press40 -OutputSigType4055=Digital -OutputCue4056=press41 -OutputSigType4056=Digital -OutputCue4057=press42 -OutputSigType4057=Digital -OutputCue4058=press43 -OutputSigType4058=Digital -OutputCue4059=press44 -OutputSigType4059=Digital -OutputCue4060=press45 -OutputSigType4060=Digital -OutputCue4061=press46 -OutputSigType4061=Digital -OutputCue4062=press47 -OutputSigType4062=Digital -OutputCue4063=press48 -OutputSigType4063=Digital -OutputCue4064=press49 -OutputSigType4064=Digital -OutputCue4065=press50 -OutputSigType4065=Digital -OutputCue4066=press51 -OutputSigType4066=Digital -OutputCue4067=press52 -OutputSigType4067=Digital -OutputCue4068=press53 -OutputSigType4068=Digital -OutputCue4069=press54 -OutputSigType4069=Digital -OutputCue4070=press55 -OutputSigType4070=Digital -OutputCue4071=press56 -OutputSigType4071=Digital -OutputCue4072=press57 -OutputSigType4072=Digital -OutputCue4073=press58 -OutputSigType4073=Digital -OutputCue4074=press59 -OutputSigType4074=Digital -OutputCue4075=press60 -OutputSigType4075=Digital -OutputCue4076=press61 -OutputSigType4076=Digital -OutputCue4077=press62 -OutputSigType4077=Digital -OutputCue4078=press63 -OutputSigType4078=Digital -OutputCue4079=press64 -OutputSigType4079=Digital -OutputCue4080=press65 -OutputSigType4080=Digital -OutputCue4081=press66 -OutputSigType4081=Digital -OutputCue4082=press67 -OutputSigType4082=Digital -OutputCue4083=press68 -OutputSigType4083=Digital -OutputCue4084=press69 -OutputSigType4084=Digital -OutputCue4085=press70 -OutputSigType4085=Digital -OutputCue4086=press71 -OutputSigType4086=Digital -OutputCue4087=press72 -OutputSigType4087=Digital -OutputCue4088=press73 -OutputSigType4088=Digital -OutputCue4089=press74 -OutputSigType4089=Digital -OutputCue4090=press75 -OutputSigType4090=Digital -OutputCue4091=press76 -OutputSigType4091=Digital -OutputCue4092=press77 -OutputSigType4092=Digital -OutputCue4093=press78 -OutputSigType4093=Digital -OutputCue4094=press79 -OutputSigType4094=Digital -OutputCue4095=press80 -OutputSigType4095=Digital -OutputCue4096=press81 -OutputSigType4096=Digital -OutputCue4097=press82 -OutputSigType4097=Digital -OutputCue4098=press83 -OutputSigType4098=Digital -OutputCue4099=press84 -OutputSigType4099=Digital -OutputCue4100=press85 -OutputSigType4100=Digital -OutputCue4101=press86 -OutputSigType4101=Digital -OutputCue4102=press87 -OutputSigType4102=Digital -OutputCue4103=press88 -OutputSigType4103=Digital -OutputCue4104=press89 -OutputSigType4104=Digital -OutputCue4105=press90 -OutputSigType4105=Digital -OutputCue4106=press91 -OutputSigType4106=Digital -OutputCue4107=press92 -OutputSigType4107=Digital -OutputCue4108=press93 -OutputSigType4108=Digital -OutputCue4109=press94 -OutputSigType4109=Digital -OutputCue4110=press95 -OutputSigType4110=Digital -OutputCue4111=press96 -OutputSigType4111=Digital -OutputCue4112=press97 -OutputSigType4112=Digital -OutputCue4113=press98 -OutputSigType4113=Digital -OutputCue4114=press99 -OutputSigType4114=Digital -OutputCue4115=press100 -OutputSigType4115=Digital -OutputCue4116=press101 -OutputSigType4116=Digital -OutputCue4117=press102 -OutputSigType4117=Digital -OutputCue4118=press103 -OutputSigType4118=Digital -OutputCue4119=press104 -OutputSigType4119=Digital -OutputCue4120=press105 -OutputSigType4120=Digital -OutputCue4121=press106 -OutputSigType4121=Digital -OutputCue4122=press107 -OutputSigType4122=Digital -OutputCue4123=press108 -OutputSigType4123=Digital -OutputCue4124=press109 -OutputSigType4124=Digital -OutputCue4125=press110 -OutputSigType4125=Digital -OutputCue4126=press111 -OutputSigType4126=Digital -OutputCue4127=press112 -OutputSigType4127=Digital -OutputCue4128=press113 -OutputSigType4128=Digital -OutputCue4129=press114 -OutputSigType4129=Digital -OutputCue4130=press115 -OutputSigType4130=Digital -OutputCue4131=press116 -OutputSigType4131=Digital -OutputCue4132=press117 -OutputSigType4132=Digital -OutputCue4133=press118 -OutputSigType4133=Digital -OutputCue4134=press119 -OutputSigType4134=Digital -OutputCue4135=press120 -OutputSigType4135=Digital -OutputCue4136=press121 -OutputSigType4136=Digital -OutputCue4137=press122 -OutputSigType4137=Digital -OutputCue4138=press123 -OutputSigType4138=Digital -OutputCue4139=press124 -OutputSigType4139=Digital -OutputCue4140=press125 -OutputSigType4140=Digital -OutputCue4141=press126 -OutputSigType4141=Digital -OutputCue4142=press127 -OutputSigType4142=Digital -OutputCue4143=press128 -OutputSigType4143=Digital -OutputCue4144=press129 -OutputSigType4144=Digital -OutputCue4145=press130 -OutputSigType4145=Digital -OutputCue4146=press131 -OutputSigType4146=Digital -OutputCue4147=press132 -OutputSigType4147=Digital -OutputCue4148=press133 -OutputSigType4148=Digital -OutputCue4149=press134 -OutputSigType4149=Digital -OutputCue4150=press135 -OutputSigType4150=Digital -OutputCue4151=press136 -OutputSigType4151=Digital -OutputCue4152=press137 -OutputSigType4152=Digital -OutputCue4153=press138 -OutputSigType4153=Digital -OutputCue4154=press139 -OutputSigType4154=Digital -OutputCue4155=press140 -OutputSigType4155=Digital -OutputCue4156=press141 -OutputSigType4156=Digital -OutputCue4157=press142 -OutputSigType4157=Digital -OutputCue4158=press143 -OutputSigType4158=Digital -OutputCue4159=press144 -OutputSigType4159=Digital -OutputCue4160=press145 -OutputSigType4160=Digital -OutputCue4161=press146 -OutputSigType4161=Digital -OutputCue4162=press147 -OutputSigType4162=Digital -OutputCue4163=press148 -OutputSigType4163=Digital -OutputCue4164=press149 -OutputSigType4164=Digital -OutputCue4165=press150 -OutputSigType4165=Digital -OutputCue4166=press151 -OutputSigType4166=Digital -OutputCue4167=press152 -OutputSigType4167=Digital -OutputCue4168=press153 -OutputSigType4168=Digital -OutputCue4169=press154 -OutputSigType4169=Digital -OutputCue4170=press155 -OutputSigType4170=Digital -OutputCue4171=press156 -OutputSigType4171=Digital -OutputCue4172=press157 -OutputSigType4172=Digital -OutputCue4173=press158 -OutputSigType4173=Digital -OutputCue4174=press159 -OutputSigType4174=Digital -OutputCue4175=press160 -OutputSigType4175=Digital -OutputCue4176=press161 -OutputSigType4176=Digital -OutputCue4177=press162 -OutputSigType4177=Digital -OutputCue4178=press163 -OutputSigType4178=Digital -OutputCue4179=press164 -OutputSigType4179=Digital -OutputCue4180=press165 -OutputSigType4180=Digital -OutputCue4181=press166 -OutputSigType4181=Digital -OutputCue4182=press167 -OutputSigType4182=Digital -OutputCue4183=press168 -OutputSigType4183=Digital -OutputCue4184=press169 -OutputSigType4184=Digital -OutputCue4185=press170 -OutputSigType4185=Digital -OutputCue4186=press171 -OutputSigType4186=Digital -OutputCue4187=press172 -OutputSigType4187=Digital -OutputCue4188=press173 -OutputSigType4188=Digital -OutputCue4189=press174 -OutputSigType4189=Digital -OutputCue4190=press175 -OutputSigType4190=Digital -OutputCue4191=press176 -OutputSigType4191=Digital -OutputCue4192=press177 -OutputSigType4192=Digital -OutputCue4193=press178 -OutputSigType4193=Digital -OutputCue4194=press179 -OutputSigType4194=Digital -OutputCue4195=press180 -OutputSigType4195=Digital -OutputCue4196=press181 -OutputSigType4196=Digital -OutputCue4197=press182 -OutputSigType4197=Digital -OutputCue4198=press183 -OutputSigType4198=Digital -OutputCue4199=press184 -OutputSigType4199=Digital -OutputCue4200=press185 -OutputSigType4200=Digital -OutputCue4201=press186 -OutputSigType4201=Digital -OutputCue4202=press187 -OutputSigType4202=Digital -OutputCue4203=press188 -OutputSigType4203=Digital -OutputCue4204=press189 -OutputSigType4204=Digital -OutputCue4205=press190 -OutputSigType4205=Digital -OutputCue4206=press191 -OutputSigType4206=Digital -OutputCue4207=press192 -OutputSigType4207=Digital -OutputCue4208=press193 -OutputSigType4208=Digital -OutputCue4209=press194 -OutputSigType4209=Digital -OutputCue4210=press195 -OutputSigType4210=Digital -OutputCue4211=press196 -OutputSigType4211=Digital -OutputCue4212=press197 -OutputSigType4212=Digital -OutputCue4213=press198 -OutputSigType4213=Digital -OutputCue4214=press199 -OutputSigType4214=Digital -OutputCue4215=press200 -OutputSigType4215=Digital -OutputCue4216=press201 -OutputSigType4216=Digital -OutputCue4217=press202 -OutputSigType4217=Digital -OutputCue4218=press203 -OutputSigType4218=Digital -OutputCue4219=press204 -OutputSigType4219=Digital -OutputCue4220=press205 -OutputSigType4220=Digital -OutputCue4221=press206 -OutputSigType4221=Digital -OutputCue4222=press207 -OutputSigType4222=Digital -OutputCue4223=press208 -OutputSigType4223=Digital -OutputCue4224=press209 -OutputSigType4224=Digital -OutputCue4225=press210 -OutputSigType4225=Digital -OutputCue4226=press211 -OutputSigType4226=Digital -OutputCue4227=press212 -OutputSigType4227=Digital -OutputCue4228=press213 -OutputSigType4228=Digital -OutputCue4229=press214 -OutputSigType4229=Digital -OutputCue4230=press215 -OutputSigType4230=Digital -OutputCue4231=press216 -OutputSigType4231=Digital -OutputCue4232=press217 -OutputSigType4232=Digital -OutputCue4233=press218 -OutputSigType4233=Digital -OutputCue4234=press219 -OutputSigType4234=Digital -OutputCue4235=press220 -OutputSigType4235=Digital -OutputCue4236=press221 -OutputSigType4236=Digital -OutputCue4237=press222 -OutputSigType4237=Digital -OutputCue4238=press223 -OutputSigType4238=Digital -OutputCue4239=press224 -OutputSigType4239=Digital -OutputCue4240=press225 -OutputSigType4240=Digital -OutputCue4241=press226 -OutputSigType4241=Digital -OutputCue4242=press227 -OutputSigType4242=Digital -OutputCue4243=press228 -OutputSigType4243=Digital -OutputCue4244=press229 -OutputSigType4244=Digital -OutputCue4245=press230 -OutputSigType4245=Digital -OutputCue4246=press231 -OutputSigType4246=Digital -OutputCue4247=press232 -OutputSigType4247=Digital -OutputCue4248=press233 -OutputSigType4248=Digital -OutputCue4249=press234 -OutputSigType4249=Digital -OutputCue4250=press235 -OutputSigType4250=Digital -OutputCue4251=press236 -OutputSigType4251=Digital -OutputCue4252=press237 -OutputSigType4252=Digital -OutputCue4253=press238 -OutputSigType4253=Digital -OutputCue4254=press239 -OutputSigType4254=Digital -OutputCue4255=press240 -OutputSigType4255=Digital -OutputCue4256=press241 -OutputSigType4256=Digital -OutputCue4257=press242 -OutputSigType4257=Digital -OutputCue4258=press243 -OutputSigType4258=Digital -OutputCue4259=press244 -OutputSigType4259=Digital -OutputCue4260=press245 -OutputSigType4260=Digital -OutputCue4261=press246 -OutputSigType4261=Digital -OutputCue4262=press247 -OutputSigType4262=Digital -OutputCue4263=press248 -OutputSigType4263=Digital -OutputCue4264=press249 -OutputSigType4264=Digital -OutputCue4265=press250 -OutputSigType4265=Digital -OutputCue4266=press251 -OutputSigType4266=Digital -OutputCue4267=press252 -OutputSigType4267=Digital -OutputCue4268=press253 -OutputSigType4268=Digital -OutputCue4269=press254 -OutputSigType4269=Digital -OutputCue4270=press255 -OutputSigType4270=Digital -OutputCue4271=press256 -OutputSigType4271=Digital -OutputCue4272=press257 -OutputSigType4272=Digital -OutputCue4273=press258 -OutputSigType4273=Digital -OutputCue4274=press259 -OutputSigType4274=Digital -OutputCue4275=press260 -OutputSigType4275=Digital -OutputCue4276=press261 -OutputSigType4276=Digital -OutputCue4277=press262 -OutputSigType4277=Digital -OutputCue4278=press263 -OutputSigType4278=Digital -OutputCue4279=press264 -OutputSigType4279=Digital -OutputCue4280=press265 -OutputSigType4280=Digital -OutputCue4281=press266 -OutputSigType4281=Digital -OutputCue4282=press267 -OutputSigType4282=Digital -OutputCue4283=press268 -OutputSigType4283=Digital -OutputCue4284=press269 -OutputSigType4284=Digital -OutputCue4285=press270 -OutputSigType4285=Digital -OutputCue4286=press271 -OutputSigType4286=Digital -OutputCue4287=press272 -OutputSigType4287=Digital -OutputCue4288=press273 -OutputSigType4288=Digital -OutputCue4289=press274 -OutputSigType4289=Digital -OutputCue4290=press275 -OutputSigType4290=Digital -OutputCue4291=press276 -OutputSigType4291=Digital -OutputCue4292=press277 -OutputSigType4292=Digital -OutputCue4293=press278 -OutputSigType4293=Digital -OutputCue4294=press279 -OutputSigType4294=Digital -OutputCue4295=press280 -OutputSigType4295=Digital -OutputCue4296=press281 -OutputSigType4296=Digital -OutputCue4297=press282 -OutputSigType4297=Digital -OutputCue4298=press283 -OutputSigType4298=Digital -OutputCue4299=press284 -OutputSigType4299=Digital -OutputCue4300=press285 -OutputSigType4300=Digital -OutputCue4301=press286 -OutputSigType4301=Digital -OutputCue4302=press287 -OutputSigType4302=Digital -OutputCue4303=press288 -OutputSigType4303=Digital -OutputCue4304=press289 -OutputSigType4304=Digital -OutputCue4305=press290 -OutputSigType4305=Digital -OutputCue4306=press291 -OutputSigType4306=Digital -OutputCue4307=press292 -OutputSigType4307=Digital -OutputCue4308=press293 -OutputSigType4308=Digital -OutputCue4309=press294 -OutputSigType4309=Digital -OutputCue4310=press295 -OutputSigType4310=Digital -OutputCue4311=press296 -OutputSigType4311=Digital -OutputCue4312=press297 -OutputSigType4312=Digital -OutputCue4313=press298 -OutputSigType4313=Digital -OutputCue4314=press299 -OutputSigType4314=Digital -OutputCue4315=press300 -OutputSigType4315=Digital -OutputCue4316=[~EndGroup~]Press -OutputSigType4316=Digital -InputList2Cue1=[~UNUSED3~] -InputList2SigType1=Analog -InputList2Cue2=Scroll To Item -InputList2SigType2=Analog -InputList2Cue3=Set Number of Items -InputList2SigType3=Analog -OutputList2Cue1=Item Clicked -OutputList2SigType1=Analog -OutputList2Cue2=[~UNUSED3~] -OutputList2SigType2=Analog -OutputList2Cue3=[~UNUSED3~] -OutputList2SigType3=Analog -InputList3Cue1=[~UNUSED2~] -InputList3SigType1=Serial -InputList3Cue2=[~UNUSED2~] -InputList3SigType2=Serial -InputList3Cue3=[~UNUSED2~] -InputList3SigType3=Serial -InputList3Cue4=[~UNUSED2~] -InputList3SigType4=Serial -InputList3Cue5=[~UNUSED2~] -InputList3SigType5=Serial -InputList3Cue6=[~UNUSED2~] -InputList3SigType6=Serial -InputList3Cue7=[~UNUSED2~] -InputList3SigType7=Serial -InputList3Cue8=[~UNUSED2~] -InputList3SigType8=Serial -InputList3Cue9=[~UNUSED2~] -InputList3SigType9=Serial -InputList3Cue10=[~UNUSED2~] -InputList3SigType10=Serial -InputList3Cue11=[~BeginGroup~]text-o -InputList3SigType11=Serial -InputList3Cue12=text-o1 -InputList3SigType12=Serial -InputList3Cue13=text-o2 -InputList3SigType13=Serial -InputList3Cue14=text-o3 -InputList3SigType14=Serial -InputList3Cue15=text-o4 -InputList3SigType15=Serial -InputList3Cue16=text-o5 -InputList3SigType16=Serial -InputList3Cue17=text-o6 -InputList3SigType17=Serial -InputList3Cue18=text-o7 -InputList3SigType18=Serial -InputList3Cue19=text-o8 -InputList3SigType19=Serial -InputList3Cue20=text-o9 -InputList3SigType20=Serial -InputList3Cue21=text-o10 -InputList3SigType21=Serial -InputList3Cue22=text-o11 -InputList3SigType22=Serial -InputList3Cue23=text-o12 -InputList3SigType23=Serial -InputList3Cue24=text-o13 -InputList3SigType24=Serial -InputList3Cue25=text-o14 -InputList3SigType25=Serial -InputList3Cue26=text-o15 -InputList3SigType26=Serial -InputList3Cue27=text-o16 -InputList3SigType27=Serial -InputList3Cue28=text-o17 -InputList3SigType28=Serial -InputList3Cue29=text-o18 -InputList3SigType29=Serial -InputList3Cue30=text-o19 -InputList3SigType30=Serial -InputList3Cue31=text-o20 -InputList3SigType31=Serial -InputList3Cue32=text-o21 -InputList3SigType32=Serial -InputList3Cue33=text-o22 -InputList3SigType33=Serial -InputList3Cue34=text-o23 -InputList3SigType34=Serial -InputList3Cue35=text-o24 -InputList3SigType35=Serial -InputList3Cue36=text-o25 -InputList3SigType36=Serial -InputList3Cue37=text-o26 -InputList3SigType37=Serial -InputList3Cue38=text-o27 -InputList3SigType38=Serial -InputList3Cue39=text-o28 -InputList3SigType39=Serial -InputList3Cue40=text-o29 -InputList3SigType40=Serial -InputList3Cue41=text-o30 -InputList3SigType41=Serial -InputList3Cue42=text-o31 -InputList3SigType42=Serial -InputList3Cue43=text-o32 -InputList3SigType43=Serial -InputList3Cue44=text-o33 -InputList3SigType44=Serial -InputList3Cue45=text-o34 -InputList3SigType45=Serial -InputList3Cue46=text-o35 -InputList3SigType46=Serial -InputList3Cue47=text-o36 -InputList3SigType47=Serial -InputList3Cue48=text-o37 -InputList3SigType48=Serial -InputList3Cue49=text-o38 -InputList3SigType49=Serial -InputList3Cue50=text-o39 -InputList3SigType50=Serial -InputList3Cue51=text-o40 -InputList3SigType51=Serial -InputList3Cue52=text-o41 -InputList3SigType52=Serial -InputList3Cue53=text-o42 -InputList3SigType53=Serial -InputList3Cue54=text-o43 -InputList3SigType54=Serial -InputList3Cue55=text-o44 -InputList3SigType55=Serial -InputList3Cue56=text-o45 -InputList3SigType56=Serial -InputList3Cue57=text-o46 -InputList3SigType57=Serial -InputList3Cue58=text-o47 -InputList3SigType58=Serial -InputList3Cue59=text-o48 -InputList3SigType59=Serial -InputList3Cue60=text-o49 -InputList3SigType60=Serial -InputList3Cue61=text-o50 -InputList3SigType61=Serial -InputList3Cue62=text-o51 -InputList3SigType62=Serial -InputList3Cue63=text-o52 -InputList3SigType63=Serial -InputList3Cue64=text-o53 -InputList3SigType64=Serial -InputList3Cue65=text-o54 -InputList3SigType65=Serial -InputList3Cue66=text-o55 -InputList3SigType66=Serial -InputList3Cue67=text-o56 -InputList3SigType67=Serial -InputList3Cue68=text-o57 -InputList3SigType68=Serial -InputList3Cue69=text-o58 -InputList3SigType69=Serial -InputList3Cue70=text-o59 -InputList3SigType70=Serial -InputList3Cue71=text-o60 -InputList3SigType71=Serial -InputList3Cue72=text-o61 -InputList3SigType72=Serial -InputList3Cue73=text-o62 -InputList3SigType73=Serial -InputList3Cue74=text-o63 -InputList3SigType74=Serial -InputList3Cue75=text-o64 -InputList3SigType75=Serial -InputList3Cue76=text-o65 -InputList3SigType76=Serial -InputList3Cue77=text-o66 -InputList3SigType77=Serial -InputList3Cue78=text-o67 -InputList3SigType78=Serial -InputList3Cue79=text-o68 -InputList3SigType79=Serial -InputList3Cue80=text-o69 -InputList3SigType80=Serial -InputList3Cue81=text-o70 -InputList3SigType81=Serial -InputList3Cue82=text-o71 -InputList3SigType82=Serial -InputList3Cue83=text-o72 -InputList3SigType83=Serial -InputList3Cue84=text-o73 -InputList3SigType84=Serial -InputList3Cue85=text-o74 -InputList3SigType85=Serial -InputList3Cue86=text-o75 -InputList3SigType86=Serial -InputList3Cue87=text-o76 -InputList3SigType87=Serial -InputList3Cue88=text-o77 -InputList3SigType88=Serial -InputList3Cue89=text-o78 -InputList3SigType89=Serial -InputList3Cue90=text-o79 -InputList3SigType90=Serial -InputList3Cue91=text-o80 -InputList3SigType91=Serial -InputList3Cue92=text-o81 -InputList3SigType92=Serial -InputList3Cue93=text-o82 -InputList3SigType93=Serial -InputList3Cue94=text-o83 -InputList3SigType94=Serial -InputList3Cue95=text-o84 -InputList3SigType95=Serial -InputList3Cue96=text-o85 -InputList3SigType96=Serial -InputList3Cue97=text-o86 -InputList3SigType97=Serial -InputList3Cue98=text-o87 -InputList3SigType98=Serial -InputList3Cue99=text-o88 -InputList3SigType99=Serial -InputList3Cue100=text-o89 -InputList3SigType100=Serial -InputList3Cue101=text-o90 -InputList3SigType101=Serial -InputList3Cue102=text-o91 -InputList3SigType102=Serial -InputList3Cue103=text-o92 -InputList3SigType103=Serial -InputList3Cue104=text-o93 -InputList3SigType104=Serial -InputList3Cue105=text-o94 -InputList3SigType105=Serial -InputList3Cue106=text-o95 -InputList3SigType106=Serial -InputList3Cue107=text-o96 -InputList3SigType107=Serial -InputList3Cue108=text-o97 -InputList3SigType108=Serial -InputList3Cue109=text-o98 -InputList3SigType109=Serial -InputList3Cue110=text-o99 -InputList3SigType110=Serial -InputList3Cue111=text-o100 -InputList3SigType111=Serial -InputList3Cue112=text-o101 -InputList3SigType112=Serial -InputList3Cue113=text-o102 -InputList3SigType113=Serial -InputList3Cue114=text-o103 -InputList3SigType114=Serial -InputList3Cue115=text-o104 -InputList3SigType115=Serial -InputList3Cue116=text-o105 -InputList3SigType116=Serial -InputList3Cue117=text-o106 -InputList3SigType117=Serial -InputList3Cue118=text-o107 -InputList3SigType118=Serial -InputList3Cue119=text-o108 -InputList3SigType119=Serial -InputList3Cue120=text-o109 -InputList3SigType120=Serial -InputList3Cue121=text-o110 -InputList3SigType121=Serial -InputList3Cue122=text-o111 -InputList3SigType122=Serial -InputList3Cue123=text-o112 -InputList3SigType123=Serial -InputList3Cue124=text-o113 -InputList3SigType124=Serial -InputList3Cue125=text-o114 -InputList3SigType125=Serial -InputList3Cue126=text-o115 -InputList3SigType126=Serial -InputList3Cue127=text-o116 -InputList3SigType127=Serial -InputList3Cue128=text-o117 -InputList3SigType128=Serial -InputList3Cue129=text-o118 -InputList3SigType129=Serial -InputList3Cue130=text-o119 -InputList3SigType130=Serial -InputList3Cue131=text-o120 -InputList3SigType131=Serial -InputList3Cue132=text-o121 -InputList3SigType132=Serial -InputList3Cue133=text-o122 -InputList3SigType133=Serial -InputList3Cue134=text-o123 -InputList3SigType134=Serial -InputList3Cue135=text-o124 -InputList3SigType135=Serial -InputList3Cue136=text-o125 -InputList3SigType136=Serial -InputList3Cue137=text-o126 -InputList3SigType137=Serial -InputList3Cue138=text-o127 -InputList3SigType138=Serial -InputList3Cue139=text-o128 -InputList3SigType139=Serial -InputList3Cue140=text-o129 -InputList3SigType140=Serial -InputList3Cue141=text-o130 -InputList3SigType141=Serial -InputList3Cue142=text-o131 -InputList3SigType142=Serial -InputList3Cue143=text-o132 -InputList3SigType143=Serial -InputList3Cue144=text-o133 -InputList3SigType144=Serial -InputList3Cue145=text-o134 -InputList3SigType145=Serial -InputList3Cue146=text-o135 -InputList3SigType146=Serial -InputList3Cue147=text-o136 -InputList3SigType147=Serial -InputList3Cue148=text-o137 -InputList3SigType148=Serial -InputList3Cue149=text-o138 -InputList3SigType149=Serial -InputList3Cue150=text-o139 -InputList3SigType150=Serial -InputList3Cue151=text-o140 -InputList3SigType151=Serial -InputList3Cue152=text-o141 -InputList3SigType152=Serial -InputList3Cue153=text-o142 -InputList3SigType153=Serial -InputList3Cue154=text-o143 -InputList3SigType154=Serial -InputList3Cue155=text-o144 -InputList3SigType155=Serial -InputList3Cue156=text-o145 -InputList3SigType156=Serial -InputList3Cue157=text-o146 -InputList3SigType157=Serial -InputList3Cue158=text-o147 -InputList3SigType158=Serial -InputList3Cue159=text-o148 -InputList3SigType159=Serial -InputList3Cue160=text-o149 -InputList3SigType160=Serial -InputList3Cue161=text-o150 -InputList3SigType161=Serial -InputList3Cue162=text-o151 -InputList3SigType162=Serial -InputList3Cue163=text-o152 -InputList3SigType163=Serial -InputList3Cue164=text-o153 -InputList3SigType164=Serial -InputList3Cue165=text-o154 -InputList3SigType165=Serial -InputList3Cue166=text-o155 -InputList3SigType166=Serial -InputList3Cue167=text-o156 -InputList3SigType167=Serial -InputList3Cue168=text-o157 -InputList3SigType168=Serial -InputList3Cue169=text-o158 -InputList3SigType169=Serial -InputList3Cue170=text-o159 -InputList3SigType170=Serial -InputList3Cue171=text-o160 -InputList3SigType171=Serial -InputList3Cue172=text-o161 -InputList3SigType172=Serial -InputList3Cue173=text-o162 -InputList3SigType173=Serial -InputList3Cue174=text-o163 -InputList3SigType174=Serial -InputList3Cue175=text-o164 -InputList3SigType175=Serial -InputList3Cue176=text-o165 -InputList3SigType176=Serial -InputList3Cue177=text-o166 -InputList3SigType177=Serial -InputList3Cue178=text-o167 -InputList3SigType178=Serial -InputList3Cue179=text-o168 -InputList3SigType179=Serial -InputList3Cue180=text-o169 -InputList3SigType180=Serial -InputList3Cue181=text-o170 -InputList3SigType181=Serial -InputList3Cue182=text-o171 -InputList3SigType182=Serial -InputList3Cue183=text-o172 -InputList3SigType183=Serial -InputList3Cue184=text-o173 -InputList3SigType184=Serial -InputList3Cue185=text-o174 -InputList3SigType185=Serial -InputList3Cue186=text-o175 -InputList3SigType186=Serial -InputList3Cue187=text-o176 -InputList3SigType187=Serial -InputList3Cue188=text-o177 -InputList3SigType188=Serial -InputList3Cue189=text-o178 -InputList3SigType189=Serial -InputList3Cue190=text-o179 -InputList3SigType190=Serial -InputList3Cue191=text-o180 -InputList3SigType191=Serial -InputList3Cue192=text-o181 -InputList3SigType192=Serial -InputList3Cue193=text-o182 -InputList3SigType193=Serial -InputList3Cue194=text-o183 -InputList3SigType194=Serial -InputList3Cue195=text-o184 -InputList3SigType195=Serial -InputList3Cue196=text-o185 -InputList3SigType196=Serial -InputList3Cue197=text-o186 -InputList3SigType197=Serial -InputList3Cue198=text-o187 -InputList3SigType198=Serial -InputList3Cue199=text-o188 -InputList3SigType199=Serial -InputList3Cue200=text-o189 -InputList3SigType200=Serial -InputList3Cue201=text-o190 -InputList3SigType201=Serial -InputList3Cue202=text-o191 -InputList3SigType202=Serial -InputList3Cue203=text-o192 -InputList3SigType203=Serial -InputList3Cue204=text-o193 -InputList3SigType204=Serial -InputList3Cue205=text-o194 -InputList3SigType205=Serial -InputList3Cue206=text-o195 -InputList3SigType206=Serial -InputList3Cue207=text-o196 -InputList3SigType207=Serial -InputList3Cue208=text-o197 -InputList3SigType208=Serial -InputList3Cue209=text-o198 -InputList3SigType209=Serial -InputList3Cue210=text-o199 -InputList3SigType210=Serial -InputList3Cue211=text-o200 -InputList3SigType211=Serial -InputList3Cue212=text-o201 -InputList3SigType212=Serial -InputList3Cue213=text-o202 -InputList3SigType213=Serial -InputList3Cue214=text-o203 -InputList3SigType214=Serial -InputList3Cue215=text-o204 -InputList3SigType215=Serial -InputList3Cue216=text-o205 -InputList3SigType216=Serial -InputList3Cue217=text-o206 -InputList3SigType217=Serial -InputList3Cue218=text-o207 -InputList3SigType218=Serial -InputList3Cue219=text-o208 -InputList3SigType219=Serial -InputList3Cue220=text-o209 -InputList3SigType220=Serial -InputList3Cue221=text-o210 -InputList3SigType221=Serial -InputList3Cue222=text-o211 -InputList3SigType222=Serial -InputList3Cue223=text-o212 -InputList3SigType223=Serial -InputList3Cue224=text-o213 -InputList3SigType224=Serial -InputList3Cue225=text-o214 -InputList3SigType225=Serial -InputList3Cue226=text-o215 -InputList3SigType226=Serial -InputList3Cue227=text-o216 -InputList3SigType227=Serial -InputList3Cue228=text-o217 -InputList3SigType228=Serial -InputList3Cue229=text-o218 -InputList3SigType229=Serial -InputList3Cue230=text-o219 -InputList3SigType230=Serial -InputList3Cue231=text-o220 -InputList3SigType231=Serial -InputList3Cue232=text-o221 -InputList3SigType232=Serial -InputList3Cue233=text-o222 -InputList3SigType233=Serial -InputList3Cue234=text-o223 -InputList3SigType234=Serial -InputList3Cue235=text-o224 -InputList3SigType235=Serial -InputList3Cue236=text-o225 -InputList3SigType236=Serial -InputList3Cue237=text-o226 -InputList3SigType237=Serial -InputList3Cue238=text-o227 -InputList3SigType238=Serial -InputList3Cue239=text-o228 -InputList3SigType239=Serial -InputList3Cue240=text-o229 -InputList3SigType240=Serial -InputList3Cue241=text-o230 -InputList3SigType241=Serial -InputList3Cue242=text-o231 -InputList3SigType242=Serial -InputList3Cue243=text-o232 -InputList3SigType243=Serial -InputList3Cue244=text-o233 -InputList3SigType244=Serial -InputList3Cue245=text-o234 -InputList3SigType245=Serial -InputList3Cue246=text-o235 -InputList3SigType246=Serial -InputList3Cue247=text-o236 -InputList3SigType247=Serial -InputList3Cue248=text-o237 -InputList3SigType248=Serial -InputList3Cue249=text-o238 -InputList3SigType249=Serial -InputList3Cue250=text-o239 -InputList3SigType250=Serial -InputList3Cue251=text-o240 -InputList3SigType251=Serial -InputList3Cue252=text-o241 -InputList3SigType252=Serial -InputList3Cue253=text-o242 -InputList3SigType253=Serial -InputList3Cue254=text-o243 -InputList3SigType254=Serial -InputList3Cue255=text-o244 -InputList3SigType255=Serial -InputList3Cue256=text-o245 -InputList3SigType256=Serial -InputList3Cue257=text-o246 -InputList3SigType257=Serial -InputList3Cue258=text-o247 -InputList3SigType258=Serial -InputList3Cue259=text-o248 -InputList3SigType259=Serial -InputList3Cue260=text-o249 -InputList3SigType260=Serial -InputList3Cue261=text-o250 -InputList3SigType261=Serial -InputList3Cue262=text-o251 -InputList3SigType262=Serial -InputList3Cue263=text-o252 -InputList3SigType263=Serial -InputList3Cue264=text-o253 -InputList3SigType264=Serial -InputList3Cue265=text-o254 -InputList3SigType265=Serial -InputList3Cue266=text-o255 -InputList3SigType266=Serial -InputList3Cue267=text-o256 -InputList3SigType267=Serial -InputList3Cue268=text-o257 -InputList3SigType268=Serial -InputList3Cue269=text-o258 -InputList3SigType269=Serial -InputList3Cue270=text-o259 -InputList3SigType270=Serial -InputList3Cue271=text-o260 -InputList3SigType271=Serial -InputList3Cue272=text-o261 -InputList3SigType272=Serial -InputList3Cue273=text-o262 -InputList3SigType273=Serial -InputList3Cue274=text-o263 -InputList3SigType274=Serial -InputList3Cue275=text-o264 -InputList3SigType275=Serial -InputList3Cue276=text-o265 -InputList3SigType276=Serial -InputList3Cue277=text-o266 -InputList3SigType277=Serial -InputList3Cue278=text-o267 -InputList3SigType278=Serial -InputList3Cue279=text-o268 -InputList3SigType279=Serial -InputList3Cue280=text-o269 -InputList3SigType280=Serial -InputList3Cue281=text-o270 -InputList3SigType281=Serial -InputList3Cue282=text-o271 -InputList3SigType282=Serial -InputList3Cue283=text-o272 -InputList3SigType283=Serial -InputList3Cue284=text-o273 -InputList3SigType284=Serial -InputList3Cue285=text-o274 -InputList3SigType285=Serial -InputList3Cue286=text-o275 -InputList3SigType286=Serial -InputList3Cue287=text-o276 -InputList3SigType287=Serial -InputList3Cue288=text-o277 -InputList3SigType288=Serial -InputList3Cue289=text-o278 -InputList3SigType289=Serial -InputList3Cue290=text-o279 -InputList3SigType290=Serial -InputList3Cue291=text-o280 -InputList3SigType291=Serial -InputList3Cue292=text-o281 -InputList3SigType292=Serial -InputList3Cue293=text-o282 -InputList3SigType293=Serial -InputList3Cue294=text-o283 -InputList3SigType294=Serial -InputList3Cue295=text-o284 -InputList3SigType295=Serial -InputList3Cue296=text-o285 -InputList3SigType296=Serial -InputList3Cue297=text-o286 -InputList3SigType297=Serial -InputList3Cue298=text-o287 -InputList3SigType298=Serial -InputList3Cue299=text-o288 -InputList3SigType299=Serial -InputList3Cue300=text-o289 -InputList3SigType300=Serial -InputList3Cue301=text-o290 -InputList3SigType301=Serial -InputList3Cue302=text-o291 -InputList3SigType302=Serial -InputList3Cue303=text-o292 -InputList3SigType303=Serial -InputList3Cue304=text-o293 -InputList3SigType304=Serial -InputList3Cue305=text-o294 -InputList3SigType305=Serial -InputList3Cue306=text-o295 -InputList3SigType306=Serial -InputList3Cue307=text-o296 -InputList3SigType307=Serial -InputList3Cue308=text-o297 -InputList3SigType308=Serial -InputList3Cue309=text-o298 -InputList3SigType309=Serial -InputList3Cue310=text-o299 -InputList3SigType310=Serial -InputList3Cue311=text-o300 -InputList3SigType311=Serial -InputList3Cue312=text-o301 -InputList3SigType312=Serial -InputList3Cue313=text-o302 -InputList3SigType313=Serial -InputList3Cue314=text-o303 -InputList3SigType314=Serial -InputList3Cue315=text-o304 -InputList3SigType315=Serial -InputList3Cue316=text-o305 -InputList3SigType316=Serial -InputList3Cue317=text-o306 -InputList3SigType317=Serial -InputList3Cue318=text-o307 -InputList3SigType318=Serial -InputList3Cue319=text-o308 -InputList3SigType319=Serial -InputList3Cue320=text-o309 -InputList3SigType320=Serial -InputList3Cue321=text-o310 -InputList3SigType321=Serial -InputList3Cue322=text-o311 -InputList3SigType322=Serial -InputList3Cue323=text-o312 -InputList3SigType323=Serial -InputList3Cue324=text-o313 -InputList3SigType324=Serial -InputList3Cue325=text-o314 -InputList3SigType325=Serial -InputList3Cue326=text-o315 -InputList3SigType326=Serial -InputList3Cue327=text-o316 -InputList3SigType327=Serial -InputList3Cue328=text-o317 -InputList3SigType328=Serial -InputList3Cue329=text-o318 -InputList3SigType329=Serial -InputList3Cue330=text-o319 -InputList3SigType330=Serial -InputList3Cue331=text-o320 -InputList3SigType331=Serial -InputList3Cue332=text-o321 -InputList3SigType332=Serial -InputList3Cue333=text-o322 -InputList3SigType333=Serial -InputList3Cue334=text-o323 -InputList3SigType334=Serial -InputList3Cue335=text-o324 -InputList3SigType335=Serial -InputList3Cue336=text-o325 -InputList3SigType336=Serial -InputList3Cue337=text-o326 -InputList3SigType337=Serial -InputList3Cue338=text-o327 -InputList3SigType338=Serial -InputList3Cue339=text-o328 -InputList3SigType339=Serial -InputList3Cue340=text-o329 -InputList3SigType340=Serial -InputList3Cue341=text-o330 -InputList3SigType341=Serial -InputList3Cue342=text-o331 -InputList3SigType342=Serial -InputList3Cue343=text-o332 -InputList3SigType343=Serial -InputList3Cue344=text-o333 -InputList3SigType344=Serial -InputList3Cue345=text-o334 -InputList3SigType345=Serial -InputList3Cue346=text-o335 -InputList3SigType346=Serial -InputList3Cue347=text-o336 -InputList3SigType347=Serial -InputList3Cue348=text-o337 -InputList3SigType348=Serial -InputList3Cue349=text-o338 -InputList3SigType349=Serial -InputList3Cue350=text-o339 -InputList3SigType350=Serial -InputList3Cue351=text-o340 -InputList3SigType351=Serial -InputList3Cue352=text-o341 -InputList3SigType352=Serial -InputList3Cue353=text-o342 -InputList3SigType353=Serial -InputList3Cue354=text-o343 -InputList3SigType354=Serial -InputList3Cue355=text-o344 -InputList3SigType355=Serial -InputList3Cue356=text-o345 -InputList3SigType356=Serial -InputList3Cue357=text-o346 -InputList3SigType357=Serial -InputList3Cue358=text-o347 -InputList3SigType358=Serial -InputList3Cue359=text-o348 -InputList3SigType359=Serial -InputList3Cue360=text-o349 -InputList3SigType360=Serial -InputList3Cue361=text-o350 -InputList3SigType361=Serial -InputList3Cue362=text-o351 -InputList3SigType362=Serial -InputList3Cue363=text-o352 -InputList3SigType363=Serial -InputList3Cue364=text-o353 -InputList3SigType364=Serial -InputList3Cue365=text-o354 -InputList3SigType365=Serial -InputList3Cue366=text-o355 -InputList3SigType366=Serial -InputList3Cue367=text-o356 -InputList3SigType367=Serial -InputList3Cue368=text-o357 -InputList3SigType368=Serial -InputList3Cue369=text-o358 -InputList3SigType369=Serial -InputList3Cue370=text-o359 -InputList3SigType370=Serial -InputList3Cue371=text-o360 -InputList3SigType371=Serial -InputList3Cue372=text-o361 -InputList3SigType372=Serial -InputList3Cue373=text-o362 -InputList3SigType373=Serial -InputList3Cue374=text-o363 -InputList3SigType374=Serial -InputList3Cue375=text-o364 -InputList3SigType375=Serial -InputList3Cue376=text-o365 -InputList3SigType376=Serial -InputList3Cue377=text-o366 -InputList3SigType377=Serial -InputList3Cue378=text-o367 -InputList3SigType378=Serial -InputList3Cue379=text-o368 -InputList3SigType379=Serial -InputList3Cue380=text-o369 -InputList3SigType380=Serial -InputList3Cue381=text-o370 -InputList3SigType381=Serial -InputList3Cue382=text-o371 -InputList3SigType382=Serial -InputList3Cue383=text-o372 -InputList3SigType383=Serial -InputList3Cue384=text-o373 -InputList3SigType384=Serial -InputList3Cue385=text-o374 -InputList3SigType385=Serial -InputList3Cue386=text-o375 -InputList3SigType386=Serial -InputList3Cue387=text-o376 -InputList3SigType387=Serial -InputList3Cue388=text-o377 -InputList3SigType388=Serial -InputList3Cue389=text-o378 -InputList3SigType389=Serial -InputList3Cue390=text-o379 -InputList3SigType390=Serial -InputList3Cue391=text-o380 -InputList3SigType391=Serial -InputList3Cue392=text-o381 -InputList3SigType392=Serial -InputList3Cue393=text-o382 -InputList3SigType393=Serial -InputList3Cue394=text-o383 -InputList3SigType394=Serial -InputList3Cue395=text-o384 -InputList3SigType395=Serial -InputList3Cue396=text-o385 -InputList3SigType396=Serial -InputList3Cue397=text-o386 -InputList3SigType397=Serial -InputList3Cue398=text-o387 -InputList3SigType398=Serial -InputList3Cue399=text-o388 -InputList3SigType399=Serial -InputList3Cue400=text-o389 -InputList3SigType400=Serial -InputList3Cue401=text-o390 -InputList3SigType401=Serial -InputList3Cue402=text-o391 -InputList3SigType402=Serial -InputList3Cue403=text-o392 -InputList3SigType403=Serial -InputList3Cue404=text-o393 -InputList3SigType404=Serial -InputList3Cue405=text-o394 -InputList3SigType405=Serial -InputList3Cue406=text-o395 -InputList3SigType406=Serial -InputList3Cue407=text-o396 -InputList3SigType407=Serial -InputList3Cue408=text-o397 -InputList3SigType408=Serial -InputList3Cue409=text-o398 -InputList3SigType409=Serial -InputList3Cue410=text-o399 -InputList3SigType410=Serial -InputList3Cue411=text-o400 -InputList3SigType411=Serial -InputList3Cue412=[~EndGroup~]text-o -InputList3SigType412=Serial -OutputList3Cue1=[~UNUSED2~] -OutputList3SigType1=Serial -OutputList3Cue2=[~UNUSED2~] -OutputList3SigType2=Serial -OutputList3Cue3=[~UNUSED2~] -OutputList3SigType3=Serial -OutputList3Cue4=[~UNUSED2~] -OutputList3SigType4=Serial -OutputList3Cue5=[~UNUSED2~] -OutputList3SigType5=Serial -OutputList3Cue6=[~UNUSED2~] -OutputList3SigType6=Serial -OutputList3Cue7=[~UNUSED2~] -OutputList3SigType7=Serial -OutputList3Cue8=[~UNUSED2~] -OutputList3SigType8=Serial -OutputList3Cue9=[~UNUSED2~] -OutputList3SigType9=Serial -OutputList3Cue10=[~UNUSED2~] -OutputList3SigType10=Serial -OutputList3Cue11=[~BeginGroup~]text-i -OutputList3SigType11=Serial -OutputList3Cue12=text-i1 -OutputList3SigType12=Serial -OutputList3Cue13=text-i2 -OutputList3SigType13=Serial -OutputList3Cue14=text-i3 -OutputList3SigType14=Serial -OutputList3Cue15=text-i4 -OutputList3SigType15=Serial -OutputList3Cue16=text-i5 -OutputList3SigType16=Serial -OutputList3Cue17=text-i6 -OutputList3SigType17=Serial -OutputList3Cue18=text-i7 -OutputList3SigType18=Serial -OutputList3Cue19=text-i8 -OutputList3SigType19=Serial -OutputList3Cue20=text-i9 -OutputList3SigType20=Serial -OutputList3Cue21=text-i10 -OutputList3SigType21=Serial -OutputList3Cue22=text-i11 -OutputList3SigType22=Serial -OutputList3Cue23=text-i12 -OutputList3SigType23=Serial -OutputList3Cue24=text-i13 -OutputList3SigType24=Serial -OutputList3Cue25=text-i14 -OutputList3SigType25=Serial -OutputList3Cue26=text-i15 -OutputList3SigType26=Serial -OutputList3Cue27=text-i16 -OutputList3SigType27=Serial -OutputList3Cue28=text-i17 -OutputList3SigType28=Serial -OutputList3Cue29=text-i18 -OutputList3SigType29=Serial -OutputList3Cue30=text-i19 -OutputList3SigType30=Serial -OutputList3Cue31=text-i20 -OutputList3SigType31=Serial -OutputList3Cue32=text-i21 -OutputList3SigType32=Serial -OutputList3Cue33=text-i22 -OutputList3SigType33=Serial -OutputList3Cue34=text-i23 -OutputList3SigType34=Serial -OutputList3Cue35=text-i24 -OutputList3SigType35=Serial -OutputList3Cue36=text-i25 -OutputList3SigType36=Serial -OutputList3Cue37=text-i26 -OutputList3SigType37=Serial -OutputList3Cue38=text-i27 -OutputList3SigType38=Serial -OutputList3Cue39=text-i28 -OutputList3SigType39=Serial -OutputList3Cue40=text-i29 -OutputList3SigType40=Serial -OutputList3Cue41=text-i30 -OutputList3SigType41=Serial -OutputList3Cue42=text-i31 -OutputList3SigType42=Serial -OutputList3Cue43=text-i32 -OutputList3SigType43=Serial -OutputList3Cue44=text-i33 -OutputList3SigType44=Serial -OutputList3Cue45=text-i34 -OutputList3SigType45=Serial -OutputList3Cue46=text-i35 -OutputList3SigType46=Serial -OutputList3Cue47=text-i36 -OutputList3SigType47=Serial -OutputList3Cue48=text-i37 -OutputList3SigType48=Serial -OutputList3Cue49=text-i38 -OutputList3SigType49=Serial -OutputList3Cue50=text-i39 -OutputList3SigType50=Serial -OutputList3Cue51=text-i40 -OutputList3SigType51=Serial -OutputList3Cue52=text-i41 -OutputList3SigType52=Serial -OutputList3Cue53=text-i42 -OutputList3SigType53=Serial -OutputList3Cue54=text-i43 -OutputList3SigType54=Serial -OutputList3Cue55=text-i44 -OutputList3SigType55=Serial -OutputList3Cue56=text-i45 -OutputList3SigType56=Serial -OutputList3Cue57=text-i46 -OutputList3SigType57=Serial -OutputList3Cue58=text-i47 -OutputList3SigType58=Serial -OutputList3Cue59=text-i48 -OutputList3SigType59=Serial -OutputList3Cue60=text-i49 -OutputList3SigType60=Serial -OutputList3Cue61=text-i50 -OutputList3SigType61=Serial -OutputList3Cue62=text-i51 -OutputList3SigType62=Serial -OutputList3Cue63=text-i52 -OutputList3SigType63=Serial -OutputList3Cue64=text-i53 -OutputList3SigType64=Serial -OutputList3Cue65=text-i54 -OutputList3SigType65=Serial -OutputList3Cue66=text-i55 -OutputList3SigType66=Serial -OutputList3Cue67=text-i56 -OutputList3SigType67=Serial -OutputList3Cue68=text-i57 -OutputList3SigType68=Serial -OutputList3Cue69=text-i58 -OutputList3SigType69=Serial -OutputList3Cue70=text-i59 -OutputList3SigType70=Serial -OutputList3Cue71=text-i60 -OutputList3SigType71=Serial -OutputList3Cue72=text-i61 -OutputList3SigType72=Serial -OutputList3Cue73=text-i62 -OutputList3SigType73=Serial -OutputList3Cue74=text-i63 -OutputList3SigType74=Serial -OutputList3Cue75=text-i64 -OutputList3SigType75=Serial -OutputList3Cue76=text-i65 -OutputList3SigType76=Serial -OutputList3Cue77=text-i66 -OutputList3SigType77=Serial -OutputList3Cue78=text-i67 -OutputList3SigType78=Serial -OutputList3Cue79=text-i68 -OutputList3SigType79=Serial -OutputList3Cue80=text-i69 -OutputList3SigType80=Serial -OutputList3Cue81=text-i70 -OutputList3SigType81=Serial -OutputList3Cue82=text-i71 -OutputList3SigType82=Serial -OutputList3Cue83=text-i72 -OutputList3SigType83=Serial -OutputList3Cue84=text-i73 -OutputList3SigType84=Serial -OutputList3Cue85=text-i74 -OutputList3SigType85=Serial -OutputList3Cue86=text-i75 -OutputList3SigType86=Serial -OutputList3Cue87=text-i76 -OutputList3SigType87=Serial -OutputList3Cue88=text-i77 -OutputList3SigType88=Serial -OutputList3Cue89=text-i78 -OutputList3SigType89=Serial -OutputList3Cue90=text-i79 -OutputList3SigType90=Serial -OutputList3Cue91=text-i80 -OutputList3SigType91=Serial -OutputList3Cue92=text-i81 -OutputList3SigType92=Serial -OutputList3Cue93=text-i82 -OutputList3SigType93=Serial -OutputList3Cue94=text-i83 -OutputList3SigType94=Serial -OutputList3Cue95=text-i84 -OutputList3SigType95=Serial -OutputList3Cue96=text-i85 -OutputList3SigType96=Serial -OutputList3Cue97=text-i86 -OutputList3SigType97=Serial -OutputList3Cue98=text-i87 -OutputList3SigType98=Serial -OutputList3Cue99=text-i88 -OutputList3SigType99=Serial -OutputList3Cue100=text-i89 -OutputList3SigType100=Serial -OutputList3Cue101=text-i90 -OutputList3SigType101=Serial -OutputList3Cue102=text-i91 -OutputList3SigType102=Serial -OutputList3Cue103=text-i92 -OutputList3SigType103=Serial -OutputList3Cue104=text-i93 -OutputList3SigType104=Serial -OutputList3Cue105=text-i94 -OutputList3SigType105=Serial -OutputList3Cue106=text-i95 -OutputList3SigType106=Serial -OutputList3Cue107=text-i96 -OutputList3SigType107=Serial -OutputList3Cue108=text-i97 -OutputList3SigType108=Serial -OutputList3Cue109=text-i98 -OutputList3SigType109=Serial -OutputList3Cue110=text-i99 -OutputList3SigType110=Serial -OutputList3Cue111=text-i100 -OutputList3SigType111=Serial -OutputList3Cue112=text-i101 -OutputList3SigType112=Serial -OutputList3Cue113=text-i102 -OutputList3SigType113=Serial -OutputList3Cue114=text-i103 -OutputList3SigType114=Serial -OutputList3Cue115=text-i104 -OutputList3SigType115=Serial -OutputList3Cue116=text-i105 -OutputList3SigType116=Serial -OutputList3Cue117=text-i106 -OutputList3SigType117=Serial -OutputList3Cue118=text-i107 -OutputList3SigType118=Serial -OutputList3Cue119=text-i108 -OutputList3SigType119=Serial -OutputList3Cue120=text-i109 -OutputList3SigType120=Serial -OutputList3Cue121=text-i110 -OutputList3SigType121=Serial -OutputList3Cue122=text-i111 -OutputList3SigType122=Serial -OutputList3Cue123=text-i112 -OutputList3SigType123=Serial -OutputList3Cue124=text-i113 -OutputList3SigType124=Serial -OutputList3Cue125=text-i114 -OutputList3SigType125=Serial -OutputList3Cue126=text-i115 -OutputList3SigType126=Serial -OutputList3Cue127=text-i116 -OutputList3SigType127=Serial -OutputList3Cue128=text-i117 -OutputList3SigType128=Serial -OutputList3Cue129=text-i118 -OutputList3SigType129=Serial -OutputList3Cue130=text-i119 -OutputList3SigType130=Serial -OutputList3Cue131=text-i120 -OutputList3SigType131=Serial -OutputList3Cue132=text-i121 -OutputList3SigType132=Serial -OutputList3Cue133=text-i122 -OutputList3SigType133=Serial -OutputList3Cue134=text-i123 -OutputList3SigType134=Serial -OutputList3Cue135=text-i124 -OutputList3SigType135=Serial -OutputList3Cue136=text-i125 -OutputList3SigType136=Serial -OutputList3Cue137=text-i126 -OutputList3SigType137=Serial -OutputList3Cue138=text-i127 -OutputList3SigType138=Serial -OutputList3Cue139=text-i128 -OutputList3SigType139=Serial -OutputList3Cue140=text-i129 -OutputList3SigType140=Serial -OutputList3Cue141=text-i130 -OutputList3SigType141=Serial -OutputList3Cue142=text-i131 -OutputList3SigType142=Serial -OutputList3Cue143=text-i132 -OutputList3SigType143=Serial -OutputList3Cue144=text-i133 -OutputList3SigType144=Serial -OutputList3Cue145=text-i134 -OutputList3SigType145=Serial -OutputList3Cue146=text-i135 -OutputList3SigType146=Serial -OutputList3Cue147=text-i136 -OutputList3SigType147=Serial -OutputList3Cue148=text-i137 -OutputList3SigType148=Serial -OutputList3Cue149=text-i138 -OutputList3SigType149=Serial -OutputList3Cue150=text-i139 -OutputList3SigType150=Serial -OutputList3Cue151=text-i140 -OutputList3SigType151=Serial -OutputList3Cue152=text-i141 -OutputList3SigType152=Serial -OutputList3Cue153=text-i142 -OutputList3SigType153=Serial -OutputList3Cue154=text-i143 -OutputList3SigType154=Serial -OutputList3Cue155=text-i144 -OutputList3SigType155=Serial -OutputList3Cue156=text-i145 -OutputList3SigType156=Serial -OutputList3Cue157=text-i146 -OutputList3SigType157=Serial -OutputList3Cue158=text-i147 -OutputList3SigType158=Serial -OutputList3Cue159=text-i148 -OutputList3SigType159=Serial -OutputList3Cue160=text-i149 -OutputList3SigType160=Serial -OutputList3Cue161=text-i150 -OutputList3SigType161=Serial -OutputList3Cue162=text-i151 -OutputList3SigType162=Serial -OutputList3Cue163=text-i152 -OutputList3SigType163=Serial -OutputList3Cue164=text-i153 -OutputList3SigType164=Serial -OutputList3Cue165=text-i154 -OutputList3SigType165=Serial -OutputList3Cue166=text-i155 -OutputList3SigType166=Serial -OutputList3Cue167=text-i156 -OutputList3SigType167=Serial -OutputList3Cue168=text-i157 -OutputList3SigType168=Serial -OutputList3Cue169=text-i158 -OutputList3SigType169=Serial -OutputList3Cue170=text-i159 -OutputList3SigType170=Serial -OutputList3Cue171=text-i160 -OutputList3SigType171=Serial -OutputList3Cue172=text-i161 -OutputList3SigType172=Serial -OutputList3Cue173=text-i162 -OutputList3SigType173=Serial -OutputList3Cue174=text-i163 -OutputList3SigType174=Serial -OutputList3Cue175=text-i164 -OutputList3SigType175=Serial -OutputList3Cue176=text-i165 -OutputList3SigType176=Serial -OutputList3Cue177=text-i166 -OutputList3SigType177=Serial -OutputList3Cue178=text-i167 -OutputList3SigType178=Serial -OutputList3Cue179=text-i168 -OutputList3SigType179=Serial -OutputList3Cue180=text-i169 -OutputList3SigType180=Serial -OutputList3Cue181=text-i170 -OutputList3SigType181=Serial -OutputList3Cue182=text-i171 -OutputList3SigType182=Serial -OutputList3Cue183=text-i172 -OutputList3SigType183=Serial -OutputList3Cue184=text-i173 -OutputList3SigType184=Serial -OutputList3Cue185=text-i174 -OutputList3SigType185=Serial -OutputList3Cue186=text-i175 -OutputList3SigType186=Serial -OutputList3Cue187=text-i176 -OutputList3SigType187=Serial -OutputList3Cue188=text-i177 -OutputList3SigType188=Serial -OutputList3Cue189=text-i178 -OutputList3SigType189=Serial -OutputList3Cue190=text-i179 -OutputList3SigType190=Serial -OutputList3Cue191=text-i180 -OutputList3SigType191=Serial -OutputList3Cue192=text-i181 -OutputList3SigType192=Serial -OutputList3Cue193=text-i182 -OutputList3SigType193=Serial -OutputList3Cue194=text-i183 -OutputList3SigType194=Serial -OutputList3Cue195=text-i184 -OutputList3SigType195=Serial -OutputList3Cue196=text-i185 -OutputList3SigType196=Serial -OutputList3Cue197=text-i186 -OutputList3SigType197=Serial -OutputList3Cue198=text-i187 -OutputList3SigType198=Serial -OutputList3Cue199=text-i188 -OutputList3SigType199=Serial -OutputList3Cue200=text-i189 -OutputList3SigType200=Serial -OutputList3Cue201=text-i190 -OutputList3SigType201=Serial -OutputList3Cue202=text-i191 -OutputList3SigType202=Serial -OutputList3Cue203=text-i192 -OutputList3SigType203=Serial -OutputList3Cue204=text-i193 -OutputList3SigType204=Serial -OutputList3Cue205=text-i194 -OutputList3SigType205=Serial -OutputList3Cue206=text-i195 -OutputList3SigType206=Serial -OutputList3Cue207=text-i196 -OutputList3SigType207=Serial -OutputList3Cue208=text-i197 -OutputList3SigType208=Serial -OutputList3Cue209=text-i198 -OutputList3SigType209=Serial -OutputList3Cue210=text-i199 -OutputList3SigType210=Serial -OutputList3Cue211=text-i200 -OutputList3SigType211=Serial -OutputList3Cue212=text-i201 -OutputList3SigType212=Serial -OutputList3Cue213=text-i202 -OutputList3SigType213=Serial -OutputList3Cue214=text-i203 -OutputList3SigType214=Serial -OutputList3Cue215=text-i204 -OutputList3SigType215=Serial -OutputList3Cue216=text-i205 -OutputList3SigType216=Serial -OutputList3Cue217=text-i206 -OutputList3SigType217=Serial -OutputList3Cue218=text-i207 -OutputList3SigType218=Serial -OutputList3Cue219=text-i208 -OutputList3SigType219=Serial -OutputList3Cue220=text-i209 -OutputList3SigType220=Serial -OutputList3Cue221=text-i210 -OutputList3SigType221=Serial -OutputList3Cue222=text-i211 -OutputList3SigType222=Serial -OutputList3Cue223=text-i212 -OutputList3SigType223=Serial -OutputList3Cue224=text-i213 -OutputList3SigType224=Serial -OutputList3Cue225=text-i214 -OutputList3SigType225=Serial -OutputList3Cue226=text-i215 -OutputList3SigType226=Serial -OutputList3Cue227=text-i216 -OutputList3SigType227=Serial -OutputList3Cue228=text-i217 -OutputList3SigType228=Serial -OutputList3Cue229=text-i218 -OutputList3SigType229=Serial -OutputList3Cue230=text-i219 -OutputList3SigType230=Serial -OutputList3Cue231=text-i220 -OutputList3SigType231=Serial -OutputList3Cue232=text-i221 -OutputList3SigType232=Serial -OutputList3Cue233=text-i222 -OutputList3SigType233=Serial -OutputList3Cue234=text-i223 -OutputList3SigType234=Serial -OutputList3Cue235=text-i224 -OutputList3SigType235=Serial -OutputList3Cue236=text-i225 -OutputList3SigType236=Serial -OutputList3Cue237=text-i226 -OutputList3SigType237=Serial -OutputList3Cue238=text-i227 -OutputList3SigType238=Serial -OutputList3Cue239=text-i228 -OutputList3SigType239=Serial -OutputList3Cue240=text-i229 -OutputList3SigType240=Serial -OutputList3Cue241=text-i230 -OutputList3SigType241=Serial -OutputList3Cue242=text-i231 -OutputList3SigType242=Serial -OutputList3Cue243=text-i232 -OutputList3SigType243=Serial -OutputList3Cue244=text-i233 -OutputList3SigType244=Serial -OutputList3Cue245=text-i234 -OutputList3SigType245=Serial -OutputList3Cue246=text-i235 -OutputList3SigType246=Serial -OutputList3Cue247=text-i236 -OutputList3SigType247=Serial -OutputList3Cue248=text-i237 -OutputList3SigType248=Serial -OutputList3Cue249=text-i238 -OutputList3SigType249=Serial -OutputList3Cue250=text-i239 -OutputList3SigType250=Serial -OutputList3Cue251=text-i240 -OutputList3SigType251=Serial -OutputList3Cue252=text-i241 -OutputList3SigType252=Serial -OutputList3Cue253=text-i242 -OutputList3SigType253=Serial -OutputList3Cue254=text-i243 -OutputList3SigType254=Serial -OutputList3Cue255=text-i244 -OutputList3SigType255=Serial -OutputList3Cue256=text-i245 -OutputList3SigType256=Serial -OutputList3Cue257=text-i246 -OutputList3SigType257=Serial -OutputList3Cue258=text-i247 -OutputList3SigType258=Serial -OutputList3Cue259=text-i248 -OutputList3SigType259=Serial -OutputList3Cue260=text-i249 -OutputList3SigType260=Serial -OutputList3Cue261=text-i250 -OutputList3SigType261=Serial -OutputList3Cue262=text-i251 -OutputList3SigType262=Serial -OutputList3Cue263=text-i252 -OutputList3SigType263=Serial -OutputList3Cue264=text-i253 -OutputList3SigType264=Serial -OutputList3Cue265=text-i254 -OutputList3SigType265=Serial -OutputList3Cue266=text-i255 -OutputList3SigType266=Serial -OutputList3Cue267=text-i256 -OutputList3SigType267=Serial -OutputList3Cue268=text-i257 -OutputList3SigType268=Serial -OutputList3Cue269=text-i258 -OutputList3SigType269=Serial -OutputList3Cue270=text-i259 -OutputList3SigType270=Serial -OutputList3Cue271=text-i260 -OutputList3SigType271=Serial -OutputList3Cue272=text-i261 -OutputList3SigType272=Serial -OutputList3Cue273=text-i262 -OutputList3SigType273=Serial -OutputList3Cue274=text-i263 -OutputList3SigType274=Serial -OutputList3Cue275=text-i264 -OutputList3SigType275=Serial -OutputList3Cue276=text-i265 -OutputList3SigType276=Serial -OutputList3Cue277=text-i266 -OutputList3SigType277=Serial -OutputList3Cue278=text-i267 -OutputList3SigType278=Serial -OutputList3Cue279=text-i268 -OutputList3SigType279=Serial -OutputList3Cue280=text-i269 -OutputList3SigType280=Serial -OutputList3Cue281=text-i270 -OutputList3SigType281=Serial -OutputList3Cue282=text-i271 -OutputList3SigType282=Serial -OutputList3Cue283=text-i272 -OutputList3SigType283=Serial -OutputList3Cue284=text-i273 -OutputList3SigType284=Serial -OutputList3Cue285=text-i274 -OutputList3SigType285=Serial -OutputList3Cue286=text-i275 -OutputList3SigType286=Serial -OutputList3Cue287=text-i276 -OutputList3SigType287=Serial -OutputList3Cue288=text-i277 -OutputList3SigType288=Serial -OutputList3Cue289=text-i278 -OutputList3SigType289=Serial -OutputList3Cue290=text-i279 -OutputList3SigType290=Serial -OutputList3Cue291=text-i280 -OutputList3SigType291=Serial -OutputList3Cue292=text-i281 -OutputList3SigType292=Serial -OutputList3Cue293=text-i282 -OutputList3SigType293=Serial -OutputList3Cue294=text-i283 -OutputList3SigType294=Serial -OutputList3Cue295=text-i284 -OutputList3SigType295=Serial -OutputList3Cue296=text-i285 -OutputList3SigType296=Serial -OutputList3Cue297=text-i286 -OutputList3SigType297=Serial -OutputList3Cue298=text-i287 -OutputList3SigType298=Serial -OutputList3Cue299=text-i288 -OutputList3SigType299=Serial -OutputList3Cue300=text-i289 -OutputList3SigType300=Serial -OutputList3Cue301=text-i290 -OutputList3SigType301=Serial -OutputList3Cue302=text-i291 -OutputList3SigType302=Serial -OutputList3Cue303=text-i292 -OutputList3SigType303=Serial -OutputList3Cue304=text-i293 -OutputList3SigType304=Serial -OutputList3Cue305=text-i294 -OutputList3SigType305=Serial -OutputList3Cue306=text-i295 -OutputList3SigType306=Serial -OutputList3Cue307=text-i296 -OutputList3SigType307=Serial -OutputList3Cue308=text-i297 -OutputList3SigType308=Serial -OutputList3Cue309=text-i298 -OutputList3SigType309=Serial -OutputList3Cue310=text-i299 -OutputList3SigType310=Serial -OutputList3Cue311=text-i300 -OutputList3SigType311=Serial -OutputList3Cue312=text-i301 -OutputList3SigType312=Serial -OutputList3Cue313=text-i302 -OutputList3SigType313=Serial -OutputList3Cue314=text-i303 -OutputList3SigType314=Serial -OutputList3Cue315=text-i304 -OutputList3SigType315=Serial -OutputList3Cue316=text-i305 -OutputList3SigType316=Serial -OutputList3Cue317=text-i306 -OutputList3SigType317=Serial -OutputList3Cue318=text-i307 -OutputList3SigType318=Serial -OutputList3Cue319=text-i308 -OutputList3SigType319=Serial -OutputList3Cue320=text-i309 -OutputList3SigType320=Serial -OutputList3Cue321=text-i310 -OutputList3SigType321=Serial -OutputList3Cue322=text-i311 -OutputList3SigType322=Serial -OutputList3Cue323=text-i312 -OutputList3SigType323=Serial -OutputList3Cue324=text-i313 -OutputList3SigType324=Serial -OutputList3Cue325=text-i314 -OutputList3SigType325=Serial -OutputList3Cue326=text-i315 -OutputList3SigType326=Serial -OutputList3Cue327=text-i316 -OutputList3SigType327=Serial -OutputList3Cue328=text-i317 -OutputList3SigType328=Serial -OutputList3Cue329=text-i318 -OutputList3SigType329=Serial -OutputList3Cue330=text-i319 -OutputList3SigType330=Serial -OutputList3Cue331=text-i320 -OutputList3SigType331=Serial -OutputList3Cue332=text-i321 -OutputList3SigType332=Serial -OutputList3Cue333=text-i322 -OutputList3SigType333=Serial -OutputList3Cue334=text-i323 -OutputList3SigType334=Serial -OutputList3Cue335=text-i324 -OutputList3SigType335=Serial -OutputList3Cue336=text-i325 -OutputList3SigType336=Serial -OutputList3Cue337=text-i326 -OutputList3SigType337=Serial -OutputList3Cue338=text-i327 -OutputList3SigType338=Serial -OutputList3Cue339=text-i328 -OutputList3SigType339=Serial -OutputList3Cue340=text-i329 -OutputList3SigType340=Serial -OutputList3Cue341=text-i330 -OutputList3SigType341=Serial -OutputList3Cue342=text-i331 -OutputList3SigType342=Serial -OutputList3Cue343=text-i332 -OutputList3SigType343=Serial -OutputList3Cue344=text-i333 -OutputList3SigType344=Serial -OutputList3Cue345=text-i334 -OutputList3SigType345=Serial -OutputList3Cue346=text-i335 -OutputList3SigType346=Serial -OutputList3Cue347=text-i336 -OutputList3SigType347=Serial -OutputList3Cue348=text-i337 -OutputList3SigType348=Serial -OutputList3Cue349=text-i338 -OutputList3SigType349=Serial -OutputList3Cue350=text-i339 -OutputList3SigType350=Serial -OutputList3Cue351=text-i340 -OutputList3SigType351=Serial -OutputList3Cue352=text-i341 -OutputList3SigType352=Serial -OutputList3Cue353=text-i342 -OutputList3SigType353=Serial -OutputList3Cue354=text-i343 -OutputList3SigType354=Serial -OutputList3Cue355=text-i344 -OutputList3SigType355=Serial -OutputList3Cue356=text-i345 -OutputList3SigType356=Serial -OutputList3Cue357=text-i346 -OutputList3SigType357=Serial -OutputList3Cue358=text-i347 -OutputList3SigType358=Serial -OutputList3Cue359=text-i348 -OutputList3SigType359=Serial -OutputList3Cue360=text-i349 -OutputList3SigType360=Serial -OutputList3Cue361=text-i350 -OutputList3SigType361=Serial -OutputList3Cue362=text-i351 -OutputList3SigType362=Serial -OutputList3Cue363=text-i352 -OutputList3SigType363=Serial -OutputList3Cue364=text-i353 -OutputList3SigType364=Serial -OutputList3Cue365=text-i354 -OutputList3SigType365=Serial -OutputList3Cue366=text-i355 -OutputList3SigType366=Serial -OutputList3Cue367=text-i356 -OutputList3SigType367=Serial -OutputList3Cue368=text-i357 -OutputList3SigType368=Serial -OutputList3Cue369=text-i358 -OutputList3SigType369=Serial -OutputList3Cue370=text-i359 -OutputList3SigType370=Serial -OutputList3Cue371=text-i360 -OutputList3SigType371=Serial -OutputList3Cue372=text-i361 -OutputList3SigType372=Serial -OutputList3Cue373=text-i362 -OutputList3SigType373=Serial -OutputList3Cue374=text-i363 -OutputList3SigType374=Serial -OutputList3Cue375=text-i364 -OutputList3SigType375=Serial -OutputList3Cue376=text-i365 -OutputList3SigType376=Serial -OutputList3Cue377=text-i366 -OutputList3SigType377=Serial -OutputList3Cue378=text-i367 -OutputList3SigType378=Serial -OutputList3Cue379=text-i368 -OutputList3SigType379=Serial -OutputList3Cue380=text-i369 -OutputList3SigType380=Serial -OutputList3Cue381=text-i370 -OutputList3SigType381=Serial -OutputList3Cue382=text-i371 -OutputList3SigType382=Serial -OutputList3Cue383=text-i372 -OutputList3SigType383=Serial -OutputList3Cue384=text-i373 -OutputList3SigType384=Serial -OutputList3Cue385=text-i374 -OutputList3SigType385=Serial -OutputList3Cue386=text-i375 -OutputList3SigType386=Serial -OutputList3Cue387=text-i376 -OutputList3SigType387=Serial -OutputList3Cue388=text-i377 -OutputList3SigType388=Serial -OutputList3Cue389=text-i378 -OutputList3SigType389=Serial -OutputList3Cue390=text-i379 -OutputList3SigType390=Serial -OutputList3Cue391=text-i380 -OutputList3SigType391=Serial -OutputList3Cue392=text-i381 -OutputList3SigType392=Serial -OutputList3Cue393=text-i382 -OutputList3SigType393=Serial -OutputList3Cue394=text-i383 -OutputList3SigType394=Serial -OutputList3Cue395=text-i384 -OutputList3SigType395=Serial -OutputList3Cue396=text-i385 -OutputList3SigType396=Serial -OutputList3Cue397=text-i386 -OutputList3SigType397=Serial -OutputList3Cue398=text-i387 -OutputList3SigType398=Serial -OutputList3Cue399=text-i388 -OutputList3SigType399=Serial -OutputList3Cue400=text-i389 -OutputList3SigType400=Serial -OutputList3Cue401=text-i390 -OutputList3SigType401=Serial -OutputList3Cue402=text-i391 -OutputList3SigType402=Serial -OutputList3Cue403=text-i392 -OutputList3SigType403=Serial -OutputList3Cue404=text-i393 -OutputList3SigType404=Serial -OutputList3Cue405=text-i394 -OutputList3SigType405=Serial -OutputList3Cue406=text-i395 -OutputList3SigType406=Serial -OutputList3Cue407=text-i396 -OutputList3SigType407=Serial -OutputList3Cue408=text-i397 -OutputList3SigType408=Serial -OutputList3Cue409=text-i398 -OutputList3SigType409=Serial -OutputList3Cue410=text-i399 -OutputList3SigType410=Serial -OutputList3Cue411=text-i400 -OutputList3SigType411=Serial -OutputList3Cue412=[~EndGroup~]text-i -OutputList3SigType412=Serial -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=10 -CedH=10 -SmartObjId=10012d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=10 -Tp=1 -HD=TRUE -DV=10012d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=10 -Name=PepperDash Essentials TSW-760_[B.AV] Object - Presets_CATV Icon List Vertical.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials TSW-760_[B.AV] Object - DPad STB_STB DPad.ced -Hint=STB DPad (Smart Object ID=10011) -Code=11 -SGControlType=DPad -SGControlName=STB DPad -GUID=F2340FAD-85E9-4E49-B46E-15E9B096F58B -SmplCName=PepperDash Essentials TSW-760_[B.AV] Object - DPad STB_STB DPad.ced -SMWRev=4.02.19 -Expand=expand_random -HelpID=10015 -;Define the number of inputs, outputs and parameters -MinVariableInputs=5 -MaxVariableInputs=5 -MinVariableOutputs=5 -MaxVariableOutputs=5 -NumFixedParams=1 -MinVariableInputsList2=0 -MaxVariableInputsList2=0 -MinVariableOutputsList2=0 -MaxVariableOutputsList2=0 -MinVariableInputsList3=0 -MaxVariableInputsList3=0 -MinVariableOutputsList3=0 -MaxVariableOutputsList3=0 -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -OutputCue1=Up -OutputSigType1=Digital -InputCue2=[~UNUSED3~] -InputSigType2=Digital -OutputCue2=Down -OutputSigType2=Digital -InputCue3=[~UNUSED3~] -InputSigType3=Digital -OutputCue3=Left -OutputSigType3=Digital -InputCue4=[~UNUSED3~] -InputSigType4=Digital -OutputCue4=Right -OutputSigType4=Digital -InputCue5=[~UNUSED3~] -InputSigType5=Digital -OutputCue5=OK -OutputSigType5=Digital -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=11 -CedH=11 -SmartObjId=10011d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=11 -Tp=1 -HD=TRUE -DV=10011d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=11 -Name=PepperDash Essentials TSW-760_[B.AV] Object - DPad STB_STB DPad.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials TSW-760_[B.AV] Object - Tab SetTopBox_Tab Button Horizontal.ced -Hint=Tab Button Horizontal (Smart Object ID=10081) -Code=12 -SGControlType=Horizontal Tab Button -SGControlName=Tab Button Horizontal -GUID=198C97B0-9D0C-46C2-9557-27EA33C0BE9F -SmplCName=PepperDash Essentials TSW-760_[B.AV] Object - Tab SetTopBox_Tab Button Horizontal.ced -SMWRev=4.02.19 -Expand=expand_random -HelpID=10031 -;Define the number of inputs, outputs and parameters -MinVariableInputs=4 -MaxVariableInputs=4 -MinVariableOutputs=4 -MaxVariableOutputs=4 -NumFixedParams=1 -MinVariableInputsList2=0 -MaxVariableInputsList2=0 -MinVariableOutputsList2=0 -MaxVariableOutputsList2=0 -MinVariableInputsList3=0 -MaxVariableInputsList3=0 -MinVariableOutputsList3=0 -MaxVariableOutputsList3=0 -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -OutputCue1=Tab Button 1 Press -OutputSigType1=Digital -InputCue2=Tab Button 1 Select -InputSigType2=Digital -OutputCue2=[~UNUSED3~] -OutputSigType2=Digital -InputCue3=[~UNUSED3~] -InputSigType3=Digital -OutputCue3=Tab Button 2 Press -OutputSigType3=Digital -InputCue4=Tab Button 2 Select -InputSigType4=Digital -OutputCue4=[~UNUSED3~] -OutputSigType4=Digital -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=12 -CedH=12 -SmartObjId=10081d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=12 -Tp=1 -HD=TRUE -DV=10081d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=12 -Name=PepperDash Essentials TSW-760_[B.AV] Object - Tab SetTopBox_Tab Button Horizontal.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials TSW-760_[B.AV] Object - Dpad DVD_DVD DPad.ced -Hint=DVD DPad (Smart Object ID=10411) -Code=13 -SGControlType=DPad -SGControlName=DVD DPad -GUID=D49BCF22-C770-4146-93E6-00867D885E1E -SmplCName=PepperDash Essentials TSW-760_[B.AV] Object - Dpad DVD_DVD DPad.ced -SMWRev=4.02.19 -Expand=expand_random -HelpID=10015 -;Define the number of inputs, outputs and parameters -MinVariableInputs=5 -MaxVariableInputs=5 -MinVariableOutputs=5 -MaxVariableOutputs=5 -NumFixedParams=1 -MinVariableInputsList2=0 -MaxVariableInputsList2=0 -MinVariableOutputsList2=0 -MaxVariableOutputsList2=0 -MinVariableInputsList3=0 -MaxVariableInputsList3=0 -MinVariableOutputsList3=0 -MaxVariableOutputsList3=0 -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -OutputCue1=Up -OutputSigType1=Digital -InputCue2=[~UNUSED3~] -InputSigType2=Digital -OutputCue2=Down -OutputSigType2=Digital -InputCue3=[~UNUSED3~] -InputSigType3=Digital -OutputCue3=Left -OutputSigType3=Digital -InputCue4=[~UNUSED3~] -InputSigType4=Digital -OutputCue4=Right -OutputSigType4=Digital -InputCue5=[~UNUSED3~] -InputSigType5=Digital -OutputCue5=OK -OutputSigType5=Digital -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=13 -CedH=13 -SmartObjId=10411d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=13 -Tp=1 -HD=TRUE -DV=10411d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=13 -Name=PepperDash Essentials TSW-760_[B.AV] Object - Dpad DVD_DVD DPad.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials TSW-760_[B.AV] Source-Set Top Box Backer_CATV Keypad.ced -Hint=CATV Keypad (Smart Object ID=10014) -Code=14 -SGControlType=Simple Keypad -SGControlName=CATV Keypad -GUID=5E33D4F4-5C5F-430C-879A-AE82529B3943 -SmplCName=PepperDash Essentials TSW-760_[B.AV] Source-Set Top Box Backer_CATV Keypad.ced -SMWRev=4.02.19 -Expand=expand_random -HelpID=10061 -;Define the number of inputs, outputs and parameters -MinVariableInputs=12 -MaxVariableInputs=12 -MinVariableOutputs=12 -MaxVariableOutputs=12 -NumFixedParams=1 -MinVariableInputsList2=0 -MaxVariableInputsList2=0 -MinVariableOutputsList2=0 -MaxVariableOutputsList2=0 -MinVariableInputsList3=0 -MaxVariableInputsList3=0 -MinVariableOutputsList3=0 -MaxVariableOutputsList3=0 -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -OutputCue1=1 -OutputSigType1=Digital -InputCue2=[~UNUSED3~] -InputSigType2=Digital -OutputCue2=2 -OutputSigType2=Digital -InputCue3=[~UNUSED3~] -InputSigType3=Digital -OutputCue3=3 -OutputSigType3=Digital -InputCue4=[~UNUSED3~] -InputSigType4=Digital -OutputCue4=4 -OutputSigType4=Digital -InputCue5=[~UNUSED3~] -InputSigType5=Digital -OutputCue5=5 -OutputSigType5=Digital -InputCue6=[~UNUSED3~] -InputSigType6=Digital -OutputCue6=6 -OutputSigType6=Digital -InputCue7=[~UNUSED3~] -InputSigType7=Digital -OutputCue7=7 -OutputSigType7=Digital -InputCue8=[~UNUSED3~] -InputSigType8=Digital -OutputCue8=8 -OutputSigType8=Digital -InputCue9=[~UNUSED3~] -InputSigType9=Digital -OutputCue9=9 -OutputSigType9=Digital -InputCue10=[~UNUSED3~] -InputSigType10=Digital -OutputCue10=0 -OutputSigType10=Digital -InputCue11=[~UNUSED3~] -InputSigType11=Digital -OutputCue11=Misc_1 -OutputSigType11=Digital -InputCue12=[~UNUSED3~] -InputSigType12=Digital -OutputCue12=Misc_2 -OutputSigType12=Digital -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=14 -CedH=14 -SmartObjId=10014d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=14 -Tp=1 -HD=TRUE -DV=10014d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=14 -Name=PepperDash Essentials TSW-760_[B.AV] Source-Set Top Box Backer_CATV Keypad.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials TSW-760_[B.AV] Source-Set Top Box Backer_CATV Icon List Vertical.ced -Hint=CATV Icon List Vertical (Smart Object ID=3333) -Code=15 -SGControlType=Subpage Reference List Vertical -SGControlName=CATV Icon List Vertical -GUID=D6A79678-BAD2-4F6D-8104-A941FBA9432F -SmplCName=PepperDash Essentials TSW-760_[B.AV] Source-Set Top Box Backer_CATV Icon List Vertical.ced -SMWRev=4.02.20 -Expand=expand_random -HelpID=10125 -Render=8 -;Define the number of inputs, outputs and parameters -MinVariableInputs=4106 -MaxVariableInputs=4106 -MinVariableOutputs=4106 -MaxVariableOutputs=4106 -NumFixedParams=1 -MinVariableInputsList2=3 -MaxVariableInputsList2=3 -MinVariableOutputsList2=3 -MaxVariableOutputsList2=3 -MinVariableInputsList3=132 -MaxVariableInputsList3=132 -MinVariableOutputsList3=132 -MaxVariableOutputsList3=132 -InputSigType1=Digital -OutputSigType1=Digital -InputList2SigType1=Analog -OutputList2SigType1=Analog -InputList3SigType1=Serial -OutputList3SigType1=Serial - -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -InputCue2=[~UNUSED2~] -InputSigType2=Digital -InputCue3=[~UNUSED2~] -InputSigType3=Digital -InputCue4=[~UNUSED2~] -InputSigType4=Digital -InputCue5=[~UNUSED2~] -InputSigType5=Digital -InputCue6=[~UNUSED2~] -InputSigType6=Digital -InputCue7=[~UNUSED2~] -InputSigType7=Digital -InputCue8=[~UNUSED2~] -InputSigType8=Digital -InputCue9=[~UNUSED2~] -InputSigType9=Digital -InputCue10=[~UNUSED2~] -InputSigType10=Digital -InputCue11=[~BeginGroup~]Enable -InputSigType11=Digital -InputCue12=Item 1 Enable -InputSigType12=Digital -InputCue13=Item 2 Enable -InputSigType13=Digital -InputCue14=Item 3 Enable -InputSigType14=Digital -InputCue15=Item 4 Enable -InputSigType15=Digital -InputCue16=Item 5 Enable -InputSigType16=Digital -InputCue17=Item 6 Enable -InputSigType17=Digital -InputCue18=Item 7 Enable -InputSigType18=Digital -InputCue19=Item 8 Enable -InputSigType19=Digital -InputCue20=Item 9 Enable -InputSigType20=Digital -InputCue21=Item 10 Enable -InputSigType21=Digital -InputCue22=Item 11 Enable -InputSigType22=Digital -InputCue23=Item 12 Enable -InputSigType23=Digital -InputCue24=Item 13 Enable -InputSigType24=Digital -InputCue25=Item 14 Enable -InputSigType25=Digital -InputCue26=Item 15 Enable -InputSigType26=Digital -InputCue27=Item 16 Enable -InputSigType27=Digital -InputCue28=Item 17 Enable -InputSigType28=Digital -InputCue29=Item 18 Enable -InputSigType29=Digital -InputCue30=Item 19 Enable -InputSigType30=Digital -InputCue31=Item 20 Enable -InputSigType31=Digital -InputCue32=Item 21 Enable -InputSigType32=Digital -InputCue33=Item 22 Enable -InputSigType33=Digital -InputCue34=Item 23 Enable -InputSigType34=Digital -InputCue35=Item 24 Enable -InputSigType35=Digital -InputCue36=Item 25 Enable -InputSigType36=Digital -InputCue37=Item 26 Enable -InputSigType37=Digital -InputCue38=Item 27 Enable -InputSigType38=Digital -InputCue39=Item 28 Enable -InputSigType39=Digital -InputCue40=Item 29 Enable -InputSigType40=Digital -InputCue41=Item 30 Enable -InputSigType41=Digital -InputCue42=[~UNUSED2~] -InputSigType42=Digital|Analog|Serial|String -InputCue2012=[~EndGroup~]Enable -InputSigType2012=Digital -InputCue2013=[~BeginGroup~]Visible -InputSigType2013=Digital -InputCue2014=Item 1 Visible -InputSigType2014=Digital -InputCue2015=Item 2 Visible -InputSigType2015=Digital -InputCue2016=Item 3 Visible -InputSigType2016=Digital -InputCue2017=Item 4 Visible -InputSigType2017=Digital -InputCue2018=Item 5 Visible -InputSigType2018=Digital -InputCue2019=Item 6 Visible -InputSigType2019=Digital -InputCue2020=Item 7 Visible -InputSigType2020=Digital -InputCue2021=Item 8 Visible -InputSigType2021=Digital -InputCue2022=Item 9 Visible -InputSigType2022=Digital -InputCue2023=Item 10 Visible -InputSigType2023=Digital -InputCue2024=Item 11 Visible -InputSigType2024=Digital -InputCue2025=Item 12 Visible -InputSigType2025=Digital -InputCue2026=Item 13 Visible -InputSigType2026=Digital -InputCue2027=Item 14 Visible -InputSigType2027=Digital -InputCue2028=Item 15 Visible -InputSigType2028=Digital -InputCue2029=Item 16 Visible -InputSigType2029=Digital -InputCue2030=Item 17 Visible -InputSigType2030=Digital -InputCue2031=Item 18 Visible -InputSigType2031=Digital -InputCue2032=Item 19 Visible -InputSigType2032=Digital -InputCue2033=Item 20 Visible -InputSigType2033=Digital -InputCue2034=Item 21 Visible -InputSigType2034=Digital -InputCue2035=Item 22 Visible -InputSigType2035=Digital -InputCue2036=Item 23 Visible -InputSigType2036=Digital -InputCue2037=Item 24 Visible -InputSigType2037=Digital -InputCue2038=Item 25 Visible -InputSigType2038=Digital -InputCue2039=Item 26 Visible -InputSigType2039=Digital -InputCue2040=Item 27 Visible -InputSigType2040=Digital -InputCue2041=Item 28 Visible -InputSigType2041=Digital -InputCue2042=Item 29 Visible -InputSigType2042=Digital -InputCue2043=Item 30 Visible -InputSigType2043=Digital -InputCue2044=[~UNUSED2~] -InputSigType2044=Digital|Analog|Serial|String -InputCue4014=[~EndGroup~]Visible -InputSigType4014=Digital -InputCue4015=[~BeginGroup~]fb -InputSigType4015=Digital -InputCue4016=fb1 -InputSigType4016=Digital -InputCue4017=fb2 -InputSigType4017=Digital -InputCue4018=fb3 -InputSigType4018=Digital -InputCue4019=fb4 -InputSigType4019=Digital -InputCue4020=fb5 -InputSigType4020=Digital -InputCue4021=fb6 -InputSigType4021=Digital -InputCue4022=fb7 -InputSigType4022=Digital -InputCue4023=fb8 -InputSigType4023=Digital -InputCue4024=fb9 -InputSigType4024=Digital -InputCue4025=fb10 -InputSigType4025=Digital -InputCue4026=fb11 -InputSigType4026=Digital -InputCue4027=fb12 -InputSigType4027=Digital -InputCue4028=fb13 -InputSigType4028=Digital -InputCue4029=fb14 -InputSigType4029=Digital -InputCue4030=fb15 -InputSigType4030=Digital -InputCue4031=fb16 -InputSigType4031=Digital -InputCue4032=fb17 -InputSigType4032=Digital -InputCue4033=fb18 -InputSigType4033=Digital -InputCue4034=fb19 -InputSigType4034=Digital -InputCue4035=fb20 -InputSigType4035=Digital -InputCue4036=fb21 -InputSigType4036=Digital -InputCue4037=fb22 -InputSigType4037=Digital -InputCue4038=fb23 -InputSigType4038=Digital -InputCue4039=fb24 -InputSigType4039=Digital -InputCue4040=fb25 -InputSigType4040=Digital -InputCue4041=fb26 -InputSigType4041=Digital -InputCue4042=fb27 -InputSigType4042=Digital -InputCue4043=fb28 -InputSigType4043=Digital -InputCue4044=fb29 -InputSigType4044=Digital -InputCue4045=fb30 -InputSigType4045=Digital -InputCue4046=fb31 -InputSigType4046=Digital -InputCue4047=fb32 -InputSigType4047=Digital -InputCue4048=fb33 -InputSigType4048=Digital -InputCue4049=fb34 -InputSigType4049=Digital -InputCue4050=fb35 -InputSigType4050=Digital -InputCue4051=fb36 -InputSigType4051=Digital -InputCue4052=fb37 -InputSigType4052=Digital -InputCue4053=fb38 -InputSigType4053=Digital -InputCue4054=fb39 -InputSigType4054=Digital -InputCue4055=fb40 -InputSigType4055=Digital -InputCue4056=fb41 -InputSigType4056=Digital -InputCue4057=fb42 -InputSigType4057=Digital -InputCue4058=fb43 -InputSigType4058=Digital -InputCue4059=fb44 -InputSigType4059=Digital -InputCue4060=fb45 -InputSigType4060=Digital -InputCue4061=fb46 -InputSigType4061=Digital -InputCue4062=fb47 -InputSigType4062=Digital -InputCue4063=fb48 -InputSigType4063=Digital -InputCue4064=fb49 -InputSigType4064=Digital -InputCue4065=fb50 -InputSigType4065=Digital -InputCue4066=fb51 -InputSigType4066=Digital -InputCue4067=fb52 -InputSigType4067=Digital -InputCue4068=fb53 -InputSigType4068=Digital -InputCue4069=fb54 -InputSigType4069=Digital -InputCue4070=fb55 -InputSigType4070=Digital -InputCue4071=fb56 -InputSigType4071=Digital -InputCue4072=fb57 -InputSigType4072=Digital -InputCue4073=fb58 -InputSigType4073=Digital -InputCue4074=fb59 -InputSigType4074=Digital -InputCue4075=fb60 -InputSigType4075=Digital -InputCue4076=fb61 -InputSigType4076=Digital -InputCue4077=fb62 -InputSigType4077=Digital -InputCue4078=fb63 -InputSigType4078=Digital -InputCue4079=fb64 -InputSigType4079=Digital -InputCue4080=fb65 -InputSigType4080=Digital -InputCue4081=fb66 -InputSigType4081=Digital -InputCue4082=fb67 -InputSigType4082=Digital -InputCue4083=fb68 -InputSigType4083=Digital -InputCue4084=fb69 -InputSigType4084=Digital -InputCue4085=fb70 -InputSigType4085=Digital -InputCue4086=fb71 -InputSigType4086=Digital -InputCue4087=fb72 -InputSigType4087=Digital -InputCue4088=fb73 -InputSigType4088=Digital -InputCue4089=fb74 -InputSigType4089=Digital -InputCue4090=fb75 -InputSigType4090=Digital -InputCue4091=fb76 -InputSigType4091=Digital -InputCue4092=fb77 -InputSigType4092=Digital -InputCue4093=fb78 -InputSigType4093=Digital -InputCue4094=fb79 -InputSigType4094=Digital -InputCue4095=fb80 -InputSigType4095=Digital -InputCue4096=fb81 -InputSigType4096=Digital -InputCue4097=fb82 -InputSigType4097=Digital -InputCue4098=fb83 -InputSigType4098=Digital -InputCue4099=fb84 -InputSigType4099=Digital -InputCue4100=fb85 -InputSigType4100=Digital -InputCue4101=fb86 -InputSigType4101=Digital -InputCue4102=fb87 -InputSigType4102=Digital -InputCue4103=fb88 -InputSigType4103=Digital -InputCue4104=fb89 -InputSigType4104=Digital -InputCue4105=fb90 -InputSigType4105=Digital -InputCue4106=[~EndGroup~]fb -InputSigType4106=Digital -OutputCue1=Is Moving -OutputSigType1=Digital -OutputCue2=[~UNUSED2~] -OutputSigType2=Digital -OutputCue3=[~UNUSED2~] -OutputSigType3=Digital -OutputCue4=[~UNUSED2~] -OutputSigType4=Digital -OutputCue5=[~UNUSED2~] -OutputSigType5=Digital -OutputCue6=[~UNUSED2~] -OutputSigType6=Digital -OutputCue7=[~UNUSED2~] -OutputSigType7=Digital -OutputCue8=[~UNUSED2~] -OutputSigType8=Digital -OutputCue9=[~UNUSED2~] -OutputSigType9=Digital -OutputCue10=[~UNUSED2~] -OutputSigType10=Digital -OutputCue11=[~BeginGroup~]Enable -OutputSigType11=Digital -OutputCue12=[~UNUSED3~] -OutputSigType12=Digital -OutputCue13=[~UNUSED3~] -OutputSigType13=Digital -OutputCue14=[~UNUSED3~] -OutputSigType14=Digital -OutputCue15=[~UNUSED3~] -OutputSigType15=Digital -OutputCue16=[~UNUSED3~] -OutputSigType16=Digital -OutputCue17=[~UNUSED3~] -OutputSigType17=Digital -OutputCue18=[~UNUSED3~] -OutputSigType18=Digital -OutputCue19=[~UNUSED3~] -OutputSigType19=Digital -OutputCue20=[~UNUSED3~] -OutputSigType20=Digital -OutputCue21=[~UNUSED3~] -OutputSigType21=Digital -OutputCue22=[~UNUSED3~] -OutputSigType22=Digital -OutputCue23=[~UNUSED3~] -OutputSigType23=Digital -OutputCue24=[~UNUSED3~] -OutputSigType24=Digital -OutputCue25=[~UNUSED3~] -OutputSigType25=Digital -OutputCue26=[~UNUSED3~] -OutputSigType26=Digital -OutputCue27=[~UNUSED3~] -OutputSigType27=Digital -OutputCue28=[~UNUSED3~] -OutputSigType28=Digital -OutputCue29=[~UNUSED3~] -OutputSigType29=Digital -OutputCue30=[~UNUSED3~] -OutputSigType30=Digital -OutputCue31=[~UNUSED3~] -OutputSigType31=Digital -OutputCue32=[~UNUSED3~] -OutputSigType32=Digital -OutputCue33=[~UNUSED3~] -OutputSigType33=Digital -OutputCue34=[~UNUSED3~] -OutputSigType34=Digital -OutputCue35=[~UNUSED3~] -OutputSigType35=Digital -OutputCue36=[~UNUSED3~] -OutputSigType36=Digital -OutputCue37=[~UNUSED3~] -OutputSigType37=Digital -OutputCue38=[~UNUSED3~] -OutputSigType38=Digital -OutputCue39=[~UNUSED3~] -OutputSigType39=Digital -OutputCue40=[~UNUSED3~] -OutputSigType40=Digital -OutputCue41=[~UNUSED3~] -OutputSigType41=Digital -OutputCue42=[~UNUSED2~] -OutputSigType42=Digital|Analog|Serial|String -OutputCue2012=[~EndGroup~]Enable -OutputSigType2012=Digital -OutputCue2013=[~BeginGroup~]Visible -OutputSigType2013=Digital -OutputCue2014=[~UNUSED3~] -OutputSigType2014=Digital -OutputCue2015=[~UNUSED3~] -OutputSigType2015=Digital -OutputCue2016=[~UNUSED3~] -OutputSigType2016=Digital -OutputCue2017=[~UNUSED3~] -OutputSigType2017=Digital -OutputCue2018=[~UNUSED3~] -OutputSigType2018=Digital -OutputCue2019=[~UNUSED3~] -OutputSigType2019=Digital -OutputCue2020=[~UNUSED3~] -OutputSigType2020=Digital -OutputCue2021=[~UNUSED3~] -OutputSigType2021=Digital -OutputCue2022=[~UNUSED3~] -OutputSigType2022=Digital -OutputCue2023=[~UNUSED3~] -OutputSigType2023=Digital -OutputCue2024=[~UNUSED3~] -OutputSigType2024=Digital -OutputCue2025=[~UNUSED3~] -OutputSigType2025=Digital -OutputCue2026=[~UNUSED3~] -OutputSigType2026=Digital -OutputCue2027=[~UNUSED3~] -OutputSigType2027=Digital -OutputCue2028=[~UNUSED3~] -OutputSigType2028=Digital -OutputCue2029=[~UNUSED3~] -OutputSigType2029=Digital -OutputCue2030=[~UNUSED3~] -OutputSigType2030=Digital -OutputCue2031=[~UNUSED3~] -OutputSigType2031=Digital -OutputCue2032=[~UNUSED3~] -OutputSigType2032=Digital -OutputCue2033=[~UNUSED3~] -OutputSigType2033=Digital -OutputCue2034=[~UNUSED3~] -OutputSigType2034=Digital -OutputCue2035=[~UNUSED3~] -OutputSigType2035=Digital -OutputCue2036=[~UNUSED3~] -OutputSigType2036=Digital -OutputCue2037=[~UNUSED3~] -OutputSigType2037=Digital -OutputCue2038=[~UNUSED3~] -OutputSigType2038=Digital -OutputCue2039=[~UNUSED3~] -OutputSigType2039=Digital -OutputCue2040=[~UNUSED3~] -OutputSigType2040=Digital -OutputCue2041=[~UNUSED3~] -OutputSigType2041=Digital -OutputCue2042=[~UNUSED3~] -OutputSigType2042=Digital -OutputCue2043=[~UNUSED3~] -OutputSigType2043=Digital -OutputCue2044=[~UNUSED2~] -OutputSigType2044=Digital|Analog|Serial|String -OutputCue4014=[~EndGroup~]Visible -OutputSigType4014=Digital -OutputCue4015=[~BeginGroup~]Press -OutputSigType4015=Digital -OutputCue4016=press1 -OutputSigType4016=Digital -OutputCue4017=press2 -OutputSigType4017=Digital -OutputCue4018=press3 -OutputSigType4018=Digital -OutputCue4019=press4 -OutputSigType4019=Digital -OutputCue4020=press5 -OutputSigType4020=Digital -OutputCue4021=press6 -OutputSigType4021=Digital -OutputCue4022=press7 -OutputSigType4022=Digital -OutputCue4023=press8 -OutputSigType4023=Digital -OutputCue4024=press9 -OutputSigType4024=Digital -OutputCue4025=press10 -OutputSigType4025=Digital -OutputCue4026=press11 -OutputSigType4026=Digital -OutputCue4027=press12 -OutputSigType4027=Digital -OutputCue4028=press13 -OutputSigType4028=Digital -OutputCue4029=press14 -OutputSigType4029=Digital -OutputCue4030=press15 -OutputSigType4030=Digital -OutputCue4031=press16 -OutputSigType4031=Digital -OutputCue4032=press17 -OutputSigType4032=Digital -OutputCue4033=press18 -OutputSigType4033=Digital -OutputCue4034=press19 -OutputSigType4034=Digital -OutputCue4035=press20 -OutputSigType4035=Digital -OutputCue4036=press21 -OutputSigType4036=Digital -OutputCue4037=press22 -OutputSigType4037=Digital -OutputCue4038=press23 -OutputSigType4038=Digital -OutputCue4039=press24 -OutputSigType4039=Digital -OutputCue4040=press25 -OutputSigType4040=Digital -OutputCue4041=press26 -OutputSigType4041=Digital -OutputCue4042=press27 -OutputSigType4042=Digital -OutputCue4043=press28 -OutputSigType4043=Digital -OutputCue4044=press29 -OutputSigType4044=Digital -OutputCue4045=press30 -OutputSigType4045=Digital -OutputCue4046=press31 -OutputSigType4046=Digital -OutputCue4047=press32 -OutputSigType4047=Digital -OutputCue4048=press33 -OutputSigType4048=Digital -OutputCue4049=press34 -OutputSigType4049=Digital -OutputCue4050=press35 -OutputSigType4050=Digital -OutputCue4051=press36 -OutputSigType4051=Digital -OutputCue4052=press37 -OutputSigType4052=Digital -OutputCue4053=press38 -OutputSigType4053=Digital -OutputCue4054=press39 -OutputSigType4054=Digital -OutputCue4055=press40 -OutputSigType4055=Digital -OutputCue4056=press41 -OutputSigType4056=Digital -OutputCue4057=press42 -OutputSigType4057=Digital -OutputCue4058=press43 -OutputSigType4058=Digital -OutputCue4059=press44 -OutputSigType4059=Digital -OutputCue4060=press45 -OutputSigType4060=Digital -OutputCue4061=press46 -OutputSigType4061=Digital -OutputCue4062=press47 -OutputSigType4062=Digital -OutputCue4063=press48 -OutputSigType4063=Digital -OutputCue4064=press49 -OutputSigType4064=Digital -OutputCue4065=press50 -OutputSigType4065=Digital -OutputCue4066=press51 -OutputSigType4066=Digital -OutputCue4067=press52 -OutputSigType4067=Digital -OutputCue4068=press53 -OutputSigType4068=Digital -OutputCue4069=press54 -OutputSigType4069=Digital -OutputCue4070=press55 -OutputSigType4070=Digital -OutputCue4071=press56 -OutputSigType4071=Digital -OutputCue4072=press57 -OutputSigType4072=Digital -OutputCue4073=press58 -OutputSigType4073=Digital -OutputCue4074=press59 -OutputSigType4074=Digital -OutputCue4075=press60 -OutputSigType4075=Digital -OutputCue4076=press61 -OutputSigType4076=Digital -OutputCue4077=press62 -OutputSigType4077=Digital -OutputCue4078=press63 -OutputSigType4078=Digital -OutputCue4079=press64 -OutputSigType4079=Digital -OutputCue4080=press65 -OutputSigType4080=Digital -OutputCue4081=press66 -OutputSigType4081=Digital -OutputCue4082=press67 -OutputSigType4082=Digital -OutputCue4083=press68 -OutputSigType4083=Digital -OutputCue4084=press69 -OutputSigType4084=Digital -OutputCue4085=press70 -OutputSigType4085=Digital -OutputCue4086=press71 -OutputSigType4086=Digital -OutputCue4087=press72 -OutputSigType4087=Digital -OutputCue4088=press73 -OutputSigType4088=Digital -OutputCue4089=press74 -OutputSigType4089=Digital -OutputCue4090=press75 -OutputSigType4090=Digital -OutputCue4091=press76 -OutputSigType4091=Digital -OutputCue4092=press77 -OutputSigType4092=Digital -OutputCue4093=press78 -OutputSigType4093=Digital -OutputCue4094=press79 -OutputSigType4094=Digital -OutputCue4095=press80 -OutputSigType4095=Digital -OutputCue4096=press81 -OutputSigType4096=Digital -OutputCue4097=press82 -OutputSigType4097=Digital -OutputCue4098=press83 -OutputSigType4098=Digital -OutputCue4099=press84 -OutputSigType4099=Digital -OutputCue4100=press85 -OutputSigType4100=Digital -OutputCue4101=press86 -OutputSigType4101=Digital -OutputCue4102=press87 -OutputSigType4102=Digital -OutputCue4103=press88 -OutputSigType4103=Digital -OutputCue4104=press89 -OutputSigType4104=Digital -OutputCue4105=press90 -OutputSigType4105=Digital -OutputCue4106=[~EndGroup~]Press -OutputSigType4106=Digital -InputList2Cue1=[~UNUSED3~] -InputList2SigType1=Analog -InputList2Cue2=Scroll To Item -InputList2SigType2=Analog -InputList2Cue3=Set Number of Items -InputList2SigType3=Analog -OutputList2Cue1=Item Clicked -OutputList2SigType1=Analog -OutputList2Cue2=[~UNUSED3~] -OutputList2SigType2=Analog -OutputList2Cue3=[~UNUSED3~] -OutputList2SigType3=Analog -InputList3Cue1=[~UNUSED2~] -InputList3SigType1=Serial -InputList3Cue2=[~UNUSED2~] -InputList3SigType2=Serial -InputList3Cue3=[~UNUSED2~] -InputList3SigType3=Serial -InputList3Cue4=[~UNUSED2~] -InputList3SigType4=Serial -InputList3Cue5=[~UNUSED2~] -InputList3SigType5=Serial -InputList3Cue6=[~UNUSED2~] -InputList3SigType6=Serial -InputList3Cue7=[~UNUSED2~] -InputList3SigType7=Serial -InputList3Cue8=[~UNUSED2~] -InputList3SigType8=Serial -InputList3Cue9=[~UNUSED2~] -InputList3SigType9=Serial -InputList3Cue10=[~UNUSED2~] -InputList3SigType10=Serial -InputList3Cue11=[~BeginGroup~]text-o -InputList3SigType11=Serial -InputList3Cue12=text-o1 -InputList3SigType12=Serial -InputList3Cue13=text-o2 -InputList3SigType13=Serial -InputList3Cue14=text-o3 -InputList3SigType14=Serial -InputList3Cue15=text-o4 -InputList3SigType15=Serial -InputList3Cue16=text-o5 -InputList3SigType16=Serial -InputList3Cue17=text-o6 -InputList3SigType17=Serial -InputList3Cue18=text-o7 -InputList3SigType18=Serial -InputList3Cue19=text-o8 -InputList3SigType19=Serial -InputList3Cue20=text-o9 -InputList3SigType20=Serial -InputList3Cue21=text-o10 -InputList3SigType21=Serial -InputList3Cue22=text-o11 -InputList3SigType22=Serial -InputList3Cue23=text-o12 -InputList3SigType23=Serial -InputList3Cue24=text-o13 -InputList3SigType24=Serial -InputList3Cue25=text-o14 -InputList3SigType25=Serial -InputList3Cue26=text-o15 -InputList3SigType26=Serial -InputList3Cue27=text-o16 -InputList3SigType27=Serial -InputList3Cue28=text-o17 -InputList3SigType28=Serial -InputList3Cue29=text-o18 -InputList3SigType29=Serial -InputList3Cue30=text-o19 -InputList3SigType30=Serial -InputList3Cue31=text-o20 -InputList3SigType31=Serial -InputList3Cue32=text-o21 -InputList3SigType32=Serial -InputList3Cue33=text-o22 -InputList3SigType33=Serial -InputList3Cue34=text-o23 -InputList3SigType34=Serial -InputList3Cue35=text-o24 -InputList3SigType35=Serial -InputList3Cue36=text-o25 -InputList3SigType36=Serial -InputList3Cue37=text-o26 -InputList3SigType37=Serial -InputList3Cue38=text-o27 -InputList3SigType38=Serial -InputList3Cue39=text-o28 -InputList3SigType39=Serial -InputList3Cue40=text-o29 -InputList3SigType40=Serial -InputList3Cue41=text-o30 -InputList3SigType41=Serial -InputList3Cue42=text-o31 -InputList3SigType42=Serial -InputList3Cue43=text-o32 -InputList3SigType43=Serial -InputList3Cue44=text-o33 -InputList3SigType44=Serial -InputList3Cue45=text-o34 -InputList3SigType45=Serial -InputList3Cue46=text-o35 -InputList3SigType46=Serial -InputList3Cue47=text-o36 -InputList3SigType47=Serial -InputList3Cue48=text-o37 -InputList3SigType48=Serial -InputList3Cue49=text-o38 -InputList3SigType49=Serial -InputList3Cue50=text-o39 -InputList3SigType50=Serial -InputList3Cue51=text-o40 -InputList3SigType51=Serial -InputList3Cue52=text-o41 -InputList3SigType52=Serial -InputList3Cue53=text-o42 -InputList3SigType53=Serial -InputList3Cue54=text-o43 -InputList3SigType54=Serial -InputList3Cue55=text-o44 -InputList3SigType55=Serial -InputList3Cue56=text-o45 -InputList3SigType56=Serial -InputList3Cue57=text-o46 -InputList3SigType57=Serial -InputList3Cue58=text-o47 -InputList3SigType58=Serial -InputList3Cue59=text-o48 -InputList3SigType59=Serial -InputList3Cue60=text-o49 -InputList3SigType60=Serial -InputList3Cue61=text-o50 -InputList3SigType61=Serial -InputList3Cue62=text-o51 -InputList3SigType62=Serial -InputList3Cue63=text-o52 -InputList3SigType63=Serial -InputList3Cue64=text-o53 -InputList3SigType64=Serial -InputList3Cue65=text-o54 -InputList3SigType65=Serial -InputList3Cue66=text-o55 -InputList3SigType66=Serial -InputList3Cue67=text-o56 -InputList3SigType67=Serial -InputList3Cue68=text-o57 -InputList3SigType68=Serial -InputList3Cue69=text-o58 -InputList3SigType69=Serial -InputList3Cue70=text-o59 -InputList3SigType70=Serial -InputList3Cue71=text-o60 -InputList3SigType71=Serial -InputList3Cue72=text-o61 -InputList3SigType72=Serial -InputList3Cue73=text-o62 -InputList3SigType73=Serial -InputList3Cue74=text-o63 -InputList3SigType74=Serial -InputList3Cue75=text-o64 -InputList3SigType75=Serial -InputList3Cue76=text-o65 -InputList3SigType76=Serial -InputList3Cue77=text-o66 -InputList3SigType77=Serial -InputList3Cue78=text-o67 -InputList3SigType78=Serial -InputList3Cue79=text-o68 -InputList3SigType79=Serial -InputList3Cue80=text-o69 -InputList3SigType80=Serial -InputList3Cue81=text-o70 -InputList3SigType81=Serial -InputList3Cue82=text-o71 -InputList3SigType82=Serial -InputList3Cue83=text-o72 -InputList3SigType83=Serial -InputList3Cue84=text-o73 -InputList3SigType84=Serial -InputList3Cue85=text-o74 -InputList3SigType85=Serial -InputList3Cue86=text-o75 -InputList3SigType86=Serial -InputList3Cue87=text-o76 -InputList3SigType87=Serial -InputList3Cue88=text-o77 -InputList3SigType88=Serial -InputList3Cue89=text-o78 -InputList3SigType89=Serial -InputList3Cue90=text-o79 -InputList3SigType90=Serial -InputList3Cue91=text-o80 -InputList3SigType91=Serial -InputList3Cue92=text-o81 -InputList3SigType92=Serial -InputList3Cue93=text-o82 -InputList3SigType93=Serial -InputList3Cue94=text-o83 -InputList3SigType94=Serial -InputList3Cue95=text-o84 -InputList3SigType95=Serial -InputList3Cue96=text-o85 -InputList3SigType96=Serial -InputList3Cue97=text-o86 -InputList3SigType97=Serial -InputList3Cue98=text-o87 -InputList3SigType98=Serial -InputList3Cue99=text-o88 -InputList3SigType99=Serial -InputList3Cue100=text-o89 -InputList3SigType100=Serial -InputList3Cue101=text-o90 -InputList3SigType101=Serial -InputList3Cue102=text-o91 -InputList3SigType102=Serial -InputList3Cue103=text-o92 -InputList3SigType103=Serial -InputList3Cue104=text-o93 -InputList3SigType104=Serial -InputList3Cue105=text-o94 -InputList3SigType105=Serial -InputList3Cue106=text-o95 -InputList3SigType106=Serial -InputList3Cue107=text-o96 -InputList3SigType107=Serial -InputList3Cue108=text-o97 -InputList3SigType108=Serial -InputList3Cue109=text-o98 -InputList3SigType109=Serial -InputList3Cue110=text-o99 -InputList3SigType110=Serial -InputList3Cue111=text-o100 -InputList3SigType111=Serial -InputList3Cue112=text-o101 -InputList3SigType112=Serial -InputList3Cue113=text-o102 -InputList3SigType113=Serial -InputList3Cue114=text-o103 -InputList3SigType114=Serial -InputList3Cue115=text-o104 -InputList3SigType115=Serial -InputList3Cue116=text-o105 -InputList3SigType116=Serial -InputList3Cue117=text-o106 -InputList3SigType117=Serial -InputList3Cue118=text-o107 -InputList3SigType118=Serial -InputList3Cue119=text-o108 -InputList3SigType119=Serial -InputList3Cue120=text-o109 -InputList3SigType120=Serial -InputList3Cue121=text-o110 -InputList3SigType121=Serial -InputList3Cue122=text-o111 -InputList3SigType122=Serial -InputList3Cue123=text-o112 -InputList3SigType123=Serial -InputList3Cue124=text-o113 -InputList3SigType124=Serial -InputList3Cue125=text-o114 -InputList3SigType125=Serial -InputList3Cue126=text-o115 -InputList3SigType126=Serial -InputList3Cue127=text-o116 -InputList3SigType127=Serial -InputList3Cue128=text-o117 -InputList3SigType128=Serial -InputList3Cue129=text-o118 -InputList3SigType129=Serial -InputList3Cue130=text-o119 -InputList3SigType130=Serial -InputList3Cue131=text-o120 -InputList3SigType131=Serial -InputList3Cue132=[~EndGroup~]text-o -InputList3SigType132=Serial -OutputList3Cue1=[~UNUSED2~] -OutputList3SigType1=Serial -OutputList3Cue2=[~UNUSED2~] -OutputList3SigType2=Serial -OutputList3Cue3=[~UNUSED2~] -OutputList3SigType3=Serial -OutputList3Cue4=[~UNUSED2~] -OutputList3SigType4=Serial -OutputList3Cue5=[~UNUSED2~] -OutputList3SigType5=Serial -OutputList3Cue6=[~UNUSED2~] -OutputList3SigType6=Serial -OutputList3Cue7=[~UNUSED2~] -OutputList3SigType7=Serial -OutputList3Cue8=[~UNUSED2~] -OutputList3SigType8=Serial -OutputList3Cue9=[~UNUSED2~] -OutputList3SigType9=Serial -OutputList3Cue10=[~UNUSED2~] -OutputList3SigType10=Serial -OutputList3Cue11=[~BeginGroup~]text-i -OutputList3SigType11=Serial -OutputList3Cue12=text-i1 -OutputList3SigType12=Serial -OutputList3Cue13=text-i2 -OutputList3SigType13=Serial -OutputList3Cue14=text-i3 -OutputList3SigType14=Serial -OutputList3Cue15=text-i4 -OutputList3SigType15=Serial -OutputList3Cue16=text-i5 -OutputList3SigType16=Serial -OutputList3Cue17=text-i6 -OutputList3SigType17=Serial -OutputList3Cue18=text-i7 -OutputList3SigType18=Serial -OutputList3Cue19=text-i8 -OutputList3SigType19=Serial -OutputList3Cue20=text-i9 -OutputList3SigType20=Serial -OutputList3Cue21=text-i10 -OutputList3SigType21=Serial -OutputList3Cue22=text-i11 -OutputList3SigType22=Serial -OutputList3Cue23=text-i12 -OutputList3SigType23=Serial -OutputList3Cue24=text-i13 -OutputList3SigType24=Serial -OutputList3Cue25=text-i14 -OutputList3SigType25=Serial -OutputList3Cue26=text-i15 -OutputList3SigType26=Serial -OutputList3Cue27=text-i16 -OutputList3SigType27=Serial -OutputList3Cue28=text-i17 -OutputList3SigType28=Serial -OutputList3Cue29=text-i18 -OutputList3SigType29=Serial -OutputList3Cue30=text-i19 -OutputList3SigType30=Serial -OutputList3Cue31=text-i20 -OutputList3SigType31=Serial -OutputList3Cue32=text-i21 -OutputList3SigType32=Serial -OutputList3Cue33=text-i22 -OutputList3SigType33=Serial -OutputList3Cue34=text-i23 -OutputList3SigType34=Serial -OutputList3Cue35=text-i24 -OutputList3SigType35=Serial -OutputList3Cue36=text-i25 -OutputList3SigType36=Serial -OutputList3Cue37=text-i26 -OutputList3SigType37=Serial -OutputList3Cue38=text-i27 -OutputList3SigType38=Serial -OutputList3Cue39=text-i28 -OutputList3SigType39=Serial -OutputList3Cue40=text-i29 -OutputList3SigType40=Serial -OutputList3Cue41=text-i30 -OutputList3SigType41=Serial -OutputList3Cue42=text-i31 -OutputList3SigType42=Serial -OutputList3Cue43=text-i32 -OutputList3SigType43=Serial -OutputList3Cue44=text-i33 -OutputList3SigType44=Serial -OutputList3Cue45=text-i34 -OutputList3SigType45=Serial -OutputList3Cue46=text-i35 -OutputList3SigType46=Serial -OutputList3Cue47=text-i36 -OutputList3SigType47=Serial -OutputList3Cue48=text-i37 -OutputList3SigType48=Serial -OutputList3Cue49=text-i38 -OutputList3SigType49=Serial -OutputList3Cue50=text-i39 -OutputList3SigType50=Serial -OutputList3Cue51=text-i40 -OutputList3SigType51=Serial -OutputList3Cue52=text-i41 -OutputList3SigType52=Serial -OutputList3Cue53=text-i42 -OutputList3SigType53=Serial -OutputList3Cue54=text-i43 -OutputList3SigType54=Serial -OutputList3Cue55=text-i44 -OutputList3SigType55=Serial -OutputList3Cue56=text-i45 -OutputList3SigType56=Serial -OutputList3Cue57=text-i46 -OutputList3SigType57=Serial -OutputList3Cue58=text-i47 -OutputList3SigType58=Serial -OutputList3Cue59=text-i48 -OutputList3SigType59=Serial -OutputList3Cue60=text-i49 -OutputList3SigType60=Serial -OutputList3Cue61=text-i50 -OutputList3SigType61=Serial -OutputList3Cue62=text-i51 -OutputList3SigType62=Serial -OutputList3Cue63=text-i52 -OutputList3SigType63=Serial -OutputList3Cue64=text-i53 -OutputList3SigType64=Serial -OutputList3Cue65=text-i54 -OutputList3SigType65=Serial -OutputList3Cue66=text-i55 -OutputList3SigType66=Serial -OutputList3Cue67=text-i56 -OutputList3SigType67=Serial -OutputList3Cue68=text-i57 -OutputList3SigType68=Serial -OutputList3Cue69=text-i58 -OutputList3SigType69=Serial -OutputList3Cue70=text-i59 -OutputList3SigType70=Serial -OutputList3Cue71=text-i60 -OutputList3SigType71=Serial -OutputList3Cue72=text-i61 -OutputList3SigType72=Serial -OutputList3Cue73=text-i62 -OutputList3SigType73=Serial -OutputList3Cue74=text-i63 -OutputList3SigType74=Serial -OutputList3Cue75=text-i64 -OutputList3SigType75=Serial -OutputList3Cue76=text-i65 -OutputList3SigType76=Serial -OutputList3Cue77=text-i66 -OutputList3SigType77=Serial -OutputList3Cue78=text-i67 -OutputList3SigType78=Serial -OutputList3Cue79=text-i68 -OutputList3SigType79=Serial -OutputList3Cue80=text-i69 -OutputList3SigType80=Serial -OutputList3Cue81=text-i70 -OutputList3SigType81=Serial -OutputList3Cue82=text-i71 -OutputList3SigType82=Serial -OutputList3Cue83=text-i72 -OutputList3SigType83=Serial -OutputList3Cue84=text-i73 -OutputList3SigType84=Serial -OutputList3Cue85=text-i74 -OutputList3SigType85=Serial -OutputList3Cue86=text-i75 -OutputList3SigType86=Serial -OutputList3Cue87=text-i76 -OutputList3SigType87=Serial -OutputList3Cue88=text-i77 -OutputList3SigType88=Serial -OutputList3Cue89=text-i78 -OutputList3SigType89=Serial -OutputList3Cue90=text-i79 -OutputList3SigType90=Serial -OutputList3Cue91=text-i80 -OutputList3SigType91=Serial -OutputList3Cue92=text-i81 -OutputList3SigType92=Serial -OutputList3Cue93=text-i82 -OutputList3SigType93=Serial -OutputList3Cue94=text-i83 -OutputList3SigType94=Serial -OutputList3Cue95=text-i84 -OutputList3SigType95=Serial -OutputList3Cue96=text-i85 -OutputList3SigType96=Serial -OutputList3Cue97=text-i86 -OutputList3SigType97=Serial -OutputList3Cue98=text-i87 -OutputList3SigType98=Serial -OutputList3Cue99=text-i88 -OutputList3SigType99=Serial -OutputList3Cue100=text-i89 -OutputList3SigType100=Serial -OutputList3Cue101=text-i90 -OutputList3SigType101=Serial -OutputList3Cue102=text-i91 -OutputList3SigType102=Serial -OutputList3Cue103=text-i92 -OutputList3SigType103=Serial -OutputList3Cue104=text-i93 -OutputList3SigType104=Serial -OutputList3Cue105=text-i94 -OutputList3SigType105=Serial -OutputList3Cue106=text-i95 -OutputList3SigType106=Serial -OutputList3Cue107=text-i96 -OutputList3SigType107=Serial -OutputList3Cue108=text-i97 -OutputList3SigType108=Serial -OutputList3Cue109=text-i98 -OutputList3SigType109=Serial -OutputList3Cue110=text-i99 -OutputList3SigType110=Serial -OutputList3Cue111=text-i100 -OutputList3SigType111=Serial -OutputList3Cue112=text-i101 -OutputList3SigType112=Serial -OutputList3Cue113=text-i102 -OutputList3SigType113=Serial -OutputList3Cue114=text-i103 -OutputList3SigType114=Serial -OutputList3Cue115=text-i104 -OutputList3SigType115=Serial -OutputList3Cue116=text-i105 -OutputList3SigType116=Serial -OutputList3Cue117=text-i106 -OutputList3SigType117=Serial -OutputList3Cue118=text-i107 -OutputList3SigType118=Serial -OutputList3Cue119=text-i108 -OutputList3SigType119=Serial -OutputList3Cue120=text-i109 -OutputList3SigType120=Serial -OutputList3Cue121=text-i110 -OutputList3SigType121=Serial -OutputList3Cue122=text-i111 -OutputList3SigType122=Serial -OutputList3Cue123=text-i112 -OutputList3SigType123=Serial -OutputList3Cue124=text-i113 -OutputList3SigType124=Serial -OutputList3Cue125=text-i114 -OutputList3SigType125=Serial -OutputList3Cue126=text-i115 -OutputList3SigType126=Serial -OutputList3Cue127=text-i116 -OutputList3SigType127=Serial -OutputList3Cue128=text-i117 -OutputList3SigType128=Serial -OutputList3Cue129=text-i118 -OutputList3SigType129=Serial -OutputList3Cue130=text-i119 -OutputList3SigType130=Serial -OutputList3Cue131=text-i120 -OutputList3SigType131=Serial -OutputList3Cue132=[~EndGroup~]text-i -OutputList3SigType132=Serial -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=15 -CedH=15 -SmartObjId=3333d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=15 -Tp=1 -HD=TRUE -DV=3333d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=15 -Name=PepperDash Essentials TSW-760_[B.AV] Source-Set Top Box Backer_CATV Icon List Vertical.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials TSW-760_[Z.Dialogs] Call List_Subpage Reference List Vertical_2.ced -Hint=Subpage Reference List Vertical_2 (Smart Object ID=1001) -Code=16 -SGControlType=Subpage Reference List Vertical -SGControlName=Subpage Reference List Vertical_2 -GUID=5F63F5C2-A987-4957-9243-C28805CE297E -SmplCName=PepperDash Essentials TSW-760_[Z.Dialogs] Call List_Subpage Reference List Vertical_2.ced -SMWRev=4.02.20 -Expand=expand_random -HelpID=10125 -Render=8 -;Define the number of inputs, outputs and parameters -MinVariableInputs=4036 -MaxVariableInputs=4036 -MinVariableOutputs=4036 -MaxVariableOutputs=4036 -NumFixedParams=1 -MinVariableInputsList2=32 -MaxVariableInputsList2=32 -MinVariableOutputsList2=32 -MaxVariableOutputsList2=32 -MinVariableInputsList3=32 -MaxVariableInputsList3=32 -MinVariableOutputsList3=32 -MaxVariableOutputsList3=32 -InputSigType1=Digital -OutputSigType1=Digital -InputList2SigType1=Analog -OutputList2SigType1=Analog -InputList3SigType1=Serial -OutputList3SigType1=Serial - -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -InputCue2=[~UNUSED2~] -InputSigType2=Digital -InputCue3=[~UNUSED2~] -InputSigType3=Digital -InputCue4=[~UNUSED2~] -InputSigType4=Digital -InputCue5=[~UNUSED2~] -InputSigType5=Digital -InputCue6=[~UNUSED2~] -InputSigType6=Digital -InputCue7=[~UNUSED2~] -InputSigType7=Digital -InputCue8=[~UNUSED2~] -InputSigType8=Digital -InputCue9=[~UNUSED2~] -InputSigType9=Digital -InputCue10=[~UNUSED2~] -InputSigType10=Digital -InputCue11=[~BeginGroup~]Enable -InputSigType11=Digital -InputCue12=Item 1 Enable -InputSigType12=Digital -InputCue13=Item 2 Enable -InputSigType13=Digital -InputCue14=Item 3 Enable -InputSigType14=Digital -InputCue15=Item 4 Enable -InputSigType15=Digital -InputCue16=[~UNUSED2~] -InputSigType16=Digital|Analog|Serial|String -InputCue2012=[~EndGroup~]Enable -InputSigType2012=Digital -InputCue2013=[~BeginGroup~]Visible -InputSigType2013=Digital -InputCue2014=Item 1 Visible -InputSigType2014=Digital -InputCue2015=Item 2 Visible -InputSigType2015=Digital -InputCue2016=Item 3 Visible -InputSigType2016=Digital -InputCue2017=Item 4 Visible -InputSigType2017=Digital -InputCue2018=[~UNUSED2~] -InputSigType2018=Digital|Analog|Serial|String -InputCue4014=[~EndGroup~]Visible -InputSigType4014=Digital -InputCue4015=[~BeginGroup~]fb -InputSigType4015=Digital -InputCue4016=fb1 -InputSigType4016=Digital -InputCue4017=fb2 -InputSigType4017=Digital -InputCue4018=fb3 -InputSigType4018=Digital -InputCue4019=fb4 -InputSigType4019=Digital -InputCue4020=fb5 -InputSigType4020=Digital -InputCue4021=fb6 -InputSigType4021=Digital -InputCue4022=fb7 -InputSigType4022=Digital -InputCue4023=fb8 -InputSigType4023=Digital -InputCue4024=fb9 -InputSigType4024=Digital -InputCue4025=fb10 -InputSigType4025=Digital -InputCue4026=fb11 -InputSigType4026=Digital -InputCue4027=fb12 -InputSigType4027=Digital -InputCue4028=fb13 -InputSigType4028=Digital -InputCue4029=fb14 -InputSigType4029=Digital -InputCue4030=fb15 -InputSigType4030=Digital -InputCue4031=fb16 -InputSigType4031=Digital -InputCue4032=fb17 -InputSigType4032=Digital -InputCue4033=fb18 -InputSigType4033=Digital -InputCue4034=fb19 -InputSigType4034=Digital -InputCue4035=fb20 -InputSigType4035=Digital -InputCue4036=[~EndGroup~]fb -InputSigType4036=Digital -OutputCue1=Is Moving -OutputSigType1=Digital -OutputCue2=[~UNUSED2~] -OutputSigType2=Digital -OutputCue3=[~UNUSED2~] -OutputSigType3=Digital -OutputCue4=[~UNUSED2~] -OutputSigType4=Digital -OutputCue5=[~UNUSED2~] -OutputSigType5=Digital -OutputCue6=[~UNUSED2~] -OutputSigType6=Digital -OutputCue7=[~UNUSED2~] -OutputSigType7=Digital -OutputCue8=[~UNUSED2~] -OutputSigType8=Digital -OutputCue9=[~UNUSED2~] -OutputSigType9=Digital -OutputCue10=[~UNUSED2~] -OutputSigType10=Digital -OutputCue11=[~BeginGroup~]Enable -OutputSigType11=Digital -OutputCue12=[~UNUSED3~] -OutputSigType12=Digital -OutputCue13=[~UNUSED3~] -OutputSigType13=Digital -OutputCue14=[~UNUSED3~] -OutputSigType14=Digital -OutputCue15=[~UNUSED3~] -OutputSigType15=Digital -OutputCue16=[~UNUSED2~] -OutputSigType16=Digital|Analog|Serial|String -OutputCue2012=[~EndGroup~]Enable -OutputSigType2012=Digital -OutputCue2013=[~BeginGroup~]Visible -OutputSigType2013=Digital -OutputCue2014=[~UNUSED3~] -OutputSigType2014=Digital -OutputCue2015=[~UNUSED3~] -OutputSigType2015=Digital -OutputCue2016=[~UNUSED3~] -OutputSigType2016=Digital -OutputCue2017=[~UNUSED3~] -OutputSigType2017=Digital -OutputCue2018=[~UNUSED2~] -OutputSigType2018=Digital|Analog|Serial|String -OutputCue4014=[~EndGroup~]Visible -OutputSigType4014=Digital -OutputCue4015=[~BeginGroup~]Press -OutputSigType4015=Digital -OutputCue4016=press1 -OutputSigType4016=Digital -OutputCue4017=press2 -OutputSigType4017=Digital -OutputCue4018=press3 -OutputSigType4018=Digital -OutputCue4019=press4 -OutputSigType4019=Digital -OutputCue4020=press5 -OutputSigType4020=Digital -OutputCue4021=press6 -OutputSigType4021=Digital -OutputCue4022=press7 -OutputSigType4022=Digital -OutputCue4023=press8 -OutputSigType4023=Digital -OutputCue4024=press9 -OutputSigType4024=Digital -OutputCue4025=press10 -OutputSigType4025=Digital -OutputCue4026=press11 -OutputSigType4026=Digital -OutputCue4027=press12 -OutputSigType4027=Digital -OutputCue4028=press13 -OutputSigType4028=Digital -OutputCue4029=press14 -OutputSigType4029=Digital -OutputCue4030=press15 -OutputSigType4030=Digital -OutputCue4031=press16 -OutputSigType4031=Digital -OutputCue4032=press17 -OutputSigType4032=Digital -OutputCue4033=press18 -OutputSigType4033=Digital -OutputCue4034=press19 -OutputSigType4034=Digital -OutputCue4035=press20 -OutputSigType4035=Digital -OutputCue4036=[~EndGroup~]Press -OutputSigType4036=Digital -InputList2Cue1=[~UNUSED3~] -InputList2SigType1=Analog -InputList2Cue2=Scroll To Item -InputList2SigType2=Analog -InputList2Cue3=Set Number of Items -InputList2SigType3=Analog -InputList2Cue4=[~UNUSED2~] -InputList2SigType4=Analog -InputList2Cue5=[~UNUSED2~] -InputList2SigType5=Analog -InputList2Cue6=[~UNUSED2~] -InputList2SigType6=Analog -InputList2Cue7=[~UNUSED2~] -InputList2SigType7=Analog -InputList2Cue8=[~UNUSED2~] -InputList2SigType8=Analog -InputList2Cue9=[~UNUSED2~] -InputList2SigType9=Analog -InputList2Cue10=[~UNUSED2~] -InputList2SigType10=Analog -InputList2Cue11=[~BeginGroup~]an_fb -InputList2SigType11=Analog -InputList2Cue12=an_fb1 -InputList2SigType12=Analog -InputList2Cue13=an_fb2 -InputList2SigType13=Analog -InputList2Cue14=an_fb3 -InputList2SigType14=Analog -InputList2Cue15=an_fb4 -InputList2SigType15=Analog -InputList2Cue16=an_fb5 -InputList2SigType16=Analog -InputList2Cue17=an_fb6 -InputList2SigType17=Analog -InputList2Cue18=an_fb7 -InputList2SigType18=Analog -InputList2Cue19=an_fb8 -InputList2SigType19=Analog -InputList2Cue20=an_fb9 -InputList2SigType20=Analog -InputList2Cue21=an_fb10 -InputList2SigType21=Analog -InputList2Cue22=an_fb11 -InputList2SigType22=Analog -InputList2Cue23=an_fb12 -InputList2SigType23=Analog -InputList2Cue24=an_fb13 -InputList2SigType24=Analog -InputList2Cue25=an_fb14 -InputList2SigType25=Analog -InputList2Cue26=an_fb15 -InputList2SigType26=Analog -InputList2Cue27=an_fb16 -InputList2SigType27=Analog -InputList2Cue28=an_fb17 -InputList2SigType28=Analog -InputList2Cue29=an_fb18 -InputList2SigType29=Analog -InputList2Cue30=an_fb19 -InputList2SigType30=Analog -InputList2Cue31=an_fb20 -InputList2SigType31=Analog -InputList2Cue32=[~EndGroup~]an_fb -InputList2SigType32=Analog -OutputList2Cue1=Item Clicked -OutputList2SigType1=Analog -OutputList2Cue2=[~UNUSED3~] -OutputList2SigType2=Analog -OutputList2Cue3=[~UNUSED3~] -OutputList2SigType3=Analog -OutputList2Cue4=[~UNUSED2~] -OutputList2SigType4=Analog -OutputList2Cue5=[~UNUSED2~] -OutputList2SigType5=Analog -OutputList2Cue6=[~UNUSED2~] -OutputList2SigType6=Analog -OutputList2Cue7=[~UNUSED2~] -OutputList2SigType7=Analog -OutputList2Cue8=[~UNUSED2~] -OutputList2SigType8=Analog -OutputList2Cue9=[~UNUSED2~] -OutputList2SigType9=Analog -OutputList2Cue10=[~UNUSED2~] -OutputList2SigType10=Analog -OutputList2Cue11=[~BeginGroup~]an_act -OutputList2SigType11=Analog -OutputList2Cue12=an_act1 -OutputList2SigType12=Analog -OutputList2Cue13=an_act2 -OutputList2SigType13=Analog -OutputList2Cue14=an_act3 -OutputList2SigType14=Analog -OutputList2Cue15=an_act4 -OutputList2SigType15=Analog -OutputList2Cue16=an_act5 -OutputList2SigType16=Analog -OutputList2Cue17=an_act6 -OutputList2SigType17=Analog -OutputList2Cue18=an_act7 -OutputList2SigType18=Analog -OutputList2Cue19=an_act8 -OutputList2SigType19=Analog -OutputList2Cue20=an_act9 -OutputList2SigType20=Analog -OutputList2Cue21=an_act10 -OutputList2SigType21=Analog -OutputList2Cue22=an_act11 -OutputList2SigType22=Analog -OutputList2Cue23=an_act12 -OutputList2SigType23=Analog -OutputList2Cue24=an_act13 -OutputList2SigType24=Analog -OutputList2Cue25=an_act14 -OutputList2SigType25=Analog -OutputList2Cue26=an_act15 -OutputList2SigType26=Analog -OutputList2Cue27=an_act16 -OutputList2SigType27=Analog -OutputList2Cue28=an_act17 -OutputList2SigType28=Analog -OutputList2Cue29=an_act18 -OutputList2SigType29=Analog -OutputList2Cue30=an_act19 -OutputList2SigType30=Analog -OutputList2Cue31=an_act20 -OutputList2SigType31=Analog -OutputList2Cue32=[~EndGroup~]an_act -OutputList2SigType32=Analog -InputList3Cue1=[~UNUSED2~] -InputList3SigType1=Serial -InputList3Cue2=[~UNUSED2~] -InputList3SigType2=Serial -InputList3Cue3=[~UNUSED2~] -InputList3SigType3=Serial -InputList3Cue4=[~UNUSED2~] -InputList3SigType4=Serial -InputList3Cue5=[~UNUSED2~] -InputList3SigType5=Serial -InputList3Cue6=[~UNUSED2~] -InputList3SigType6=Serial -InputList3Cue7=[~UNUSED2~] -InputList3SigType7=Serial -InputList3Cue8=[~UNUSED2~] -InputList3SigType8=Serial -InputList3Cue9=[~UNUSED2~] -InputList3SigType9=Serial -InputList3Cue10=[~UNUSED2~] -InputList3SigType10=Serial -InputList3Cue11=[~BeginGroup~]text-o -InputList3SigType11=Serial -InputList3Cue12=text-o1 -InputList3SigType12=Serial -InputList3Cue13=text-o2 -InputList3SigType13=Serial -InputList3Cue14=text-o3 -InputList3SigType14=Serial -InputList3Cue15=text-o4 -InputList3SigType15=Serial -InputList3Cue16=text-o5 -InputList3SigType16=Serial -InputList3Cue17=text-o6 -InputList3SigType17=Serial -InputList3Cue18=text-o7 -InputList3SigType18=Serial -InputList3Cue19=text-o8 -InputList3SigType19=Serial -InputList3Cue20=text-o9 -InputList3SigType20=Serial -InputList3Cue21=text-o10 -InputList3SigType21=Serial -InputList3Cue22=text-o11 -InputList3SigType22=Serial -InputList3Cue23=text-o12 -InputList3SigType23=Serial -InputList3Cue24=text-o13 -InputList3SigType24=Serial -InputList3Cue25=text-o14 -InputList3SigType25=Serial -InputList3Cue26=text-o15 -InputList3SigType26=Serial -InputList3Cue27=text-o16 -InputList3SigType27=Serial -InputList3Cue28=text-o17 -InputList3SigType28=Serial -InputList3Cue29=text-o18 -InputList3SigType29=Serial -InputList3Cue30=text-o19 -InputList3SigType30=Serial -InputList3Cue31=text-o20 -InputList3SigType31=Serial -InputList3Cue32=[~EndGroup~]text-o -InputList3SigType32=Serial -OutputList3Cue1=[~UNUSED2~] -OutputList3SigType1=Serial -OutputList3Cue2=[~UNUSED2~] -OutputList3SigType2=Serial -OutputList3Cue3=[~UNUSED2~] -OutputList3SigType3=Serial -OutputList3Cue4=[~UNUSED2~] -OutputList3SigType4=Serial -OutputList3Cue5=[~UNUSED2~] -OutputList3SigType5=Serial -OutputList3Cue6=[~UNUSED2~] -OutputList3SigType6=Serial -OutputList3Cue7=[~UNUSED2~] -OutputList3SigType7=Serial -OutputList3Cue8=[~UNUSED2~] -OutputList3SigType8=Serial -OutputList3Cue9=[~UNUSED2~] -OutputList3SigType9=Serial -OutputList3Cue10=[~UNUSED2~] -OutputList3SigType10=Serial -OutputList3Cue11=[~BeginGroup~]text-i -OutputList3SigType11=Serial -OutputList3Cue12=text-i1 -OutputList3SigType12=Serial -OutputList3Cue13=text-i2 -OutputList3SigType13=Serial -OutputList3Cue14=text-i3 -OutputList3SigType14=Serial -OutputList3Cue15=text-i4 -OutputList3SigType15=Serial -OutputList3Cue16=text-i5 -OutputList3SigType16=Serial -OutputList3Cue17=text-i6 -OutputList3SigType17=Serial -OutputList3Cue18=text-i7 -OutputList3SigType18=Serial -OutputList3Cue19=text-i8 -OutputList3SigType19=Serial -OutputList3Cue20=text-i9 -OutputList3SigType20=Serial -OutputList3Cue21=text-i10 -OutputList3SigType21=Serial -OutputList3Cue22=text-i11 -OutputList3SigType22=Serial -OutputList3Cue23=text-i12 -OutputList3SigType23=Serial -OutputList3Cue24=text-i13 -OutputList3SigType24=Serial -OutputList3Cue25=text-i14 -OutputList3SigType25=Serial -OutputList3Cue26=text-i15 -OutputList3SigType26=Serial -OutputList3Cue27=text-i16 -OutputList3SigType27=Serial -OutputList3Cue28=text-i17 -OutputList3SigType28=Serial -OutputList3Cue29=text-i18 -OutputList3SigType29=Serial -OutputList3Cue30=text-i19 -OutputList3SigType30=Serial -OutputList3Cue31=text-i20 -OutputList3SigType31=Serial -OutputList3Cue32=[~EndGroup~]text-i -OutputList3SigType32=Serial -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=16 -CedH=16 -SmartObjId=1001d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=16 -Tp=1 -HD=TRUE -DV=1001d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=16 -Name=PepperDash Essentials TSW-760_[Z.Dialogs] Call List_Subpage Reference List Vertical_2.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials TSW-760_[E.Technician Controls] Menu_Dynamic Button List Vertical.ced -Hint=Dynamic Button List Vertical (Smart Object ID=3901) -Code=17 -SGControlType=Dynamic Button List Vertical -SGControlName=Dynamic Button List Vertical -GUID=15B95903-FB30-472E-9D10-82A9C3A9D7C7 -SmplCName=PepperDash Essentials TSW-760_[E.Technician Controls] Menu_Dynamic Button List Vertical.ced -SMWRev=4.02.20 -Expand=expand_random -HelpID=10112 -Render=8 -;Define the number of inputs, outputs and parameters -MinVariableInputs=6016 -MaxVariableInputs=6016 -MinVariableOutputs=6016 -MaxVariableOutputs=6016 -NumFixedParams=1 -MinVariableInputsList2=2012 -MaxVariableInputsList2=2012 -MinVariableOutputsList2=2012 -MaxVariableOutputsList2=2012 -MinVariableInputsList3=4014 -MaxVariableInputsList3=4014 -MinVariableOutputsList3=4014 -MaxVariableOutputsList3=4014 -InputSigType1=Digital -OutputSigType1=Digital -InputList2SigType1=Analog -OutputList2SigType1=Analog -InputList3SigType1=Serial -OutputList3SigType1=Serial - -;Define the cues, and signal types each input, output and parameter. -InputCue1=Disable Redraw -InputSigType1=Digital -InputCue2=[~UNUSED3~] -InputSigType2=Digital -InputCue3=[~UNUSED2~] -InputSigType3=Digital -InputCue4=[~UNUSED2~] -InputSigType4=Digital -InputCue5=[~UNUSED2~] -InputSigType5=Digital -InputCue6=[~UNUSED2~] -InputSigType6=Digital -InputCue7=[~UNUSED2~] -InputSigType7=Digital -InputCue8=[~UNUSED2~] -InputSigType8=Digital -InputCue9=[~UNUSED2~] -InputSigType9=Digital -InputCue10=[~UNUSED2~] -InputSigType10=Digital -InputCue11=[~BeginGroup~]Press -InputSigType11=Digital -InputCue12=Item 1 Selected -InputSigType12=Digital -InputCue13=Item 2 Selected -InputSigType13=Digital -InputCue14=Item 3 Selected -InputSigType14=Digital -InputCue15=Item 4 Selected -InputSigType15=Digital -InputCue16=Item 5 Selected -InputSigType16=Digital -InputCue17=Item 6 Selected -InputSigType17=Digital -InputCue18=Item 7 Selected -InputSigType18=Digital -InputCue19=Item 8 Selected -InputSigType19=Digital -InputCue20=Item 9 Selected -InputSigType20=Digital -InputCue21=Item 10 Selected -InputSigType21=Digital -InputCue22=[~UNUSED2~] -InputSigType22=Digital|Analog|Serial|String -InputCue2012=[~EndGroup~]Press -InputSigType2012=Digital -InputCue2013=[~BeginGroup~]Enable -InputSigType2013=Digital -InputCue2014=Item 1 Enabled -InputSigType2014=Digital -InputCue2015=Item 2 Enabled -InputSigType2015=Digital -InputCue2016=Item 3 Enabled -InputSigType2016=Digital -InputCue2017=Item 4 Enabled -InputSigType2017=Digital -InputCue2018=Item 5 Enabled -InputSigType2018=Digital -InputCue2019=Item 6 Enabled -InputSigType2019=Digital -InputCue2020=Item 7 Enabled -InputSigType2020=Digital -InputCue2021=Item 8 Enabled -InputSigType2021=Digital -InputCue2022=Item 9 Enabled -InputSigType2022=Digital -InputCue2023=Item 10 Enabled -InputSigType2023=Digital -InputCue2024=[~UNUSED2~] -InputSigType2024=Digital|Analog|Serial|String -InputCue4014=[~EndGroup~]Enable -InputSigType4014=Digital -InputCue4015=[~BeginGroup~]Visible -InputSigType4015=Digital -InputCue4016=Item 1 Visible -InputSigType4016=Digital -InputCue4017=Item 2 Visible -InputSigType4017=Digital -InputCue4018=Item 3 Visible -InputSigType4018=Digital -InputCue4019=Item 4 Visible -InputSigType4019=Digital -InputCue4020=Item 5 Visible -InputSigType4020=Digital -InputCue4021=Item 6 Visible -InputSigType4021=Digital -InputCue4022=Item 7 Visible -InputSigType4022=Digital -InputCue4023=Item 8 Visible -InputSigType4023=Digital -InputCue4024=Item 9 Visible -InputSigType4024=Digital -InputCue4025=Item 10 Visible -InputSigType4025=Digital -InputCue4026=[~UNUSED2~] -InputSigType4026=Digital|Analog|Serial|String -InputCue6016=[~EndGroup~]Visible -InputSigType6016=Digital -OutputCue1=[~UNUSED3~] -OutputSigType1=Digital -OutputCue2=Is Moving -OutputSigType2=Digital -OutputCue3=[~UNUSED2~] -OutputSigType3=Digital -OutputCue4=[~UNUSED2~] -OutputSigType4=Digital -OutputCue5=[~UNUSED2~] -OutputSigType5=Digital -OutputCue6=[~UNUSED2~] -OutputSigType6=Digital -OutputCue7=[~UNUSED2~] -OutputSigType7=Digital -OutputCue8=[~UNUSED2~] -OutputSigType8=Digital -OutputCue9=[~UNUSED2~] -OutputSigType9=Digital -OutputCue10=[~UNUSED2~] -OutputSigType10=Digital -OutputCue11=[~BeginGroup~]Press -OutputSigType11=Digital -OutputCue12=Item 1 Pressed -OutputSigType12=Digital -OutputCue13=Item 2 Pressed -OutputSigType13=Digital -OutputCue14=Item 3 Pressed -OutputSigType14=Digital -OutputCue15=Item 4 Pressed -OutputSigType15=Digital -OutputCue16=Item 5 Pressed -OutputSigType16=Digital -OutputCue17=Item 6 Pressed -OutputSigType17=Digital -OutputCue18=Item 7 Pressed -OutputSigType18=Digital -OutputCue19=Item 8 Pressed -OutputSigType19=Digital -OutputCue20=Item 9 Pressed -OutputSigType20=Digital -OutputCue21=Item 10 Pressed -OutputSigType21=Digital -OutputCue22=[~UNUSED2~] -OutputSigType22=Digital|Analog|Serial|String -OutputCue2012=[~EndGroup~]Press -OutputSigType2012=Digital -OutputCue2013=[~BeginGroup~]Enable -OutputSigType2013=Digital -OutputCue2014=[~UNUSED3~] -OutputSigType2014=Digital -OutputCue2015=[~UNUSED3~] -OutputSigType2015=Digital -OutputCue2016=[~UNUSED3~] -OutputSigType2016=Digital -OutputCue2017=[~UNUSED3~] -OutputSigType2017=Digital -OutputCue2018=[~UNUSED3~] -OutputSigType2018=Digital -OutputCue2019=[~UNUSED3~] -OutputSigType2019=Digital -OutputCue2020=[~UNUSED3~] -OutputSigType2020=Digital -OutputCue2021=[~UNUSED3~] -OutputSigType2021=Digital -OutputCue2022=[~UNUSED3~] -OutputSigType2022=Digital -OutputCue2023=[~UNUSED3~] -OutputSigType2023=Digital -OutputCue2024=[~UNUSED2~] -OutputSigType2024=Digital|Analog|Serial|String -OutputCue4014=[~EndGroup~]Enable -OutputSigType4014=Digital -OutputCue4015=[~BeginGroup~]Visible -OutputSigType4015=Digital -OutputCue4016=[~UNUSED3~] -OutputSigType4016=Digital -OutputCue4017=[~UNUSED3~] -OutputSigType4017=Digital -OutputCue4018=[~UNUSED3~] -OutputSigType4018=Digital -OutputCue4019=[~UNUSED3~] -OutputSigType4019=Digital -OutputCue4020=[~UNUSED3~] -OutputSigType4020=Digital -OutputCue4021=[~UNUSED3~] -OutputSigType4021=Digital -OutputCue4022=[~UNUSED3~] -OutputSigType4022=Digital -OutputCue4023=[~UNUSED3~] -OutputSigType4023=Digital -OutputCue4024=[~UNUSED3~] -OutputSigType4024=Digital -OutputCue4025=[~UNUSED3~] -OutputSigType4025=Digital -OutputCue4026=[~UNUSED2~] -OutputSigType4026=Digital|Analog|Serial|String -OutputCue6016=[~EndGroup~]Visible -OutputSigType6016=Digital -InputList2Cue1=[~UNUSED3~] -InputList2SigType1=Analog -InputList2Cue2=[~UNUSED3~] -InputList2SigType2=Analog -InputList2Cue3=Scroll To Item -InputList2SigType3=Analog -InputList2Cue4=Set Number of Items -InputList2SigType4=Analog -InputList2Cue5=[~UNUSED2~] -InputList2SigType5=Analog -InputList2Cue6=[~UNUSED2~] -InputList2SigType6=Analog -InputList2Cue7=[~UNUSED2~] -InputList2SigType7=Analog -InputList2Cue8=[~UNUSED2~] -InputList2SigType8=Analog -InputList2Cue9=[~UNUSED2~] -InputList2SigType9=Analog -InputList2Cue10=[~UNUSED2~] -InputList2SigType10=Analog -InputList2Cue11=[~BeginGroup~]Item Icons -InputList2SigType11=Analog -InputList2Cue12=Set Item 1 Icon Analog -InputList2SigType12=Analog -InputList2Cue13=Set Item 2 Icon Analog -InputList2SigType13=Analog -InputList2Cue14=Set Item 3 Icon Analog -InputList2SigType14=Analog -InputList2Cue15=Set Item 4 Icon Analog -InputList2SigType15=Analog -InputList2Cue16=Set Item 5 Icon Analog -InputList2SigType16=Analog -InputList2Cue17=Set Item 6 Icon Analog -InputList2SigType17=Analog -InputList2Cue18=Set Item 7 Icon Analog -InputList2SigType18=Analog -InputList2Cue19=Set Item 8 Icon Analog -InputList2SigType19=Analog -InputList2Cue20=Set Item 9 Icon Analog -InputList2SigType20=Analog -InputList2Cue21=Set Item 10 Icon Analog -InputList2SigType21=Analog -InputList2Cue22=[~UNUSED2~] -InputList2SigType22=Digital|Analog|Serial|String -InputList2Cue2012=[~EndGroup~]Item Icons -InputList2SigType2012=Analog -OutputList2Cue1=Item Clicked -OutputList2SigType1=Analog -OutputList2Cue2=Item Held -OutputList2SigType2=Analog -OutputList2Cue3=[~UNUSED3~] -OutputList2SigType3=Analog -OutputList2Cue4=[~UNUSED3~] -OutputList2SigType4=Analog -OutputList2Cue5=[~UNUSED2~] -OutputList2SigType5=Analog -OutputList2Cue6=[~UNUSED2~] -OutputList2SigType6=Analog -OutputList2Cue7=[~UNUSED2~] -OutputList2SigType7=Analog -OutputList2Cue8=[~UNUSED2~] -OutputList2SigType8=Analog -OutputList2Cue9=[~UNUSED2~] -OutputList2SigType9=Analog -OutputList2Cue10=[~UNUSED2~] -OutputList2SigType10=Analog -OutputList2Cue11=[~BeginGroup~]Item Icons -OutputList2SigType11=Analog -OutputList2Cue12=[~UNUSED3~] -OutputList2SigType12=Analog -OutputList2Cue13=[~UNUSED3~] -OutputList2SigType13=Analog -OutputList2Cue14=[~UNUSED3~] -OutputList2SigType14=Analog -OutputList2Cue15=[~UNUSED3~] -OutputList2SigType15=Analog -OutputList2Cue16=[~UNUSED3~] -OutputList2SigType16=Analog -OutputList2Cue17=[~UNUSED3~] -OutputList2SigType17=Analog -OutputList2Cue18=[~UNUSED3~] -OutputList2SigType18=Analog -OutputList2Cue19=[~UNUSED3~] -OutputList2SigType19=Analog -OutputList2Cue20=[~UNUSED3~] -OutputList2SigType20=Analog -OutputList2Cue21=[~UNUSED3~] -OutputList2SigType21=Analog -OutputList2Cue22=[~UNUSED2~] -OutputList2SigType22=Digital|Analog|Serial|String -OutputList2Cue2012=[~EndGroup~]Item Icons -OutputList2SigType2012=Analog -InputList3Cue1=[~UNUSED2~] -InputList3SigType1=Serial -InputList3Cue2=[~UNUSED2~] -InputList3SigType2=Serial -InputList3Cue3=[~UNUSED2~] -InputList3SigType3=Serial -InputList3Cue4=[~UNUSED2~] -InputList3SigType4=Serial -InputList3Cue5=[~UNUSED2~] -InputList3SigType5=Serial -InputList3Cue6=[~UNUSED2~] -InputList3SigType6=Serial -InputList3Cue7=[~UNUSED2~] -InputList3SigType7=Serial -InputList3Cue8=[~UNUSED2~] -InputList3SigType8=Serial -InputList3Cue9=[~UNUSED2~] -InputList3SigType9=Serial -InputList3Cue10=[~UNUSED2~] -InputList3SigType10=Serial -InputList3Cue11=[~BeginGroup~]Item Texts -InputList3SigType11=Serial -InputList3Cue12=Set Item 1 Text -InputList3SigType12=Serial -InputList3Cue13=Set Item 2 Text -InputList3SigType13=Serial -InputList3Cue14=Set Item 3 Text -InputList3SigType14=Serial -InputList3Cue15=Set Item 4 Text -InputList3SigType15=Serial -InputList3Cue16=Set Item 5 Text -InputList3SigType16=Serial -InputList3Cue17=Set Item 6 Text -InputList3SigType17=Serial -InputList3Cue18=Set Item 7 Text -InputList3SigType18=Serial -InputList3Cue19=Set Item 8 Text -InputList3SigType19=Serial -InputList3Cue20=Set Item 9 Text -InputList3SigType20=Serial -InputList3Cue21=Set Item 10 Text -InputList3SigType21=Serial -InputList3Cue22=[~UNUSED2~] -InputList3SigType22=Digital|Analog|Serial|String -InputList3Cue2012=[~EndGroup~]Item Texts -InputList3SigType2012=Serial -InputList3Cue2013=[~BeginGroup~]Item Icons -InputList3SigType2013=Serial -InputList3Cue2014=Set Item 1 Icon Serial -InputList3SigType2014=Serial -InputList3Cue2015=Set Item 2 Icon Serial -InputList3SigType2015=Serial -InputList3Cue2016=Set Item 3 Icon Serial -InputList3SigType2016=Serial -InputList3Cue2017=Set Item 4 Icon Serial -InputList3SigType2017=Serial -InputList3Cue2018=Set Item 5 Icon Serial -InputList3SigType2018=Serial -InputList3Cue2019=Set Item 6 Icon Serial -InputList3SigType2019=Serial -InputList3Cue2020=Set Item 7 Icon Serial -InputList3SigType2020=Serial -InputList3Cue2021=Set Item 8 Icon Serial -InputList3SigType2021=Serial -InputList3Cue2022=Set Item 9 Icon Serial -InputList3SigType2022=Serial -InputList3Cue2023=Set Item 10 Icon Serial -InputList3SigType2023=Serial -InputList3Cue2024=[~UNUSED2~] -InputList3SigType2024=Digital|Analog|Serial|String -InputList3Cue4014=[~EndGroup~]Item Icons -InputList3SigType4014=Serial -OutputList3Cue1=[~UNUSED2~] -OutputList3SigType1=Serial -OutputList3Cue2=[~UNUSED2~] -OutputList3SigType2=Serial -OutputList3Cue3=[~UNUSED2~] -OutputList3SigType3=Serial -OutputList3Cue4=[~UNUSED2~] -OutputList3SigType4=Serial -OutputList3Cue5=[~UNUSED2~] -OutputList3SigType5=Serial -OutputList3Cue6=[~UNUSED2~] -OutputList3SigType6=Serial -OutputList3Cue7=[~UNUSED2~] -OutputList3SigType7=Serial -OutputList3Cue8=[~UNUSED2~] -OutputList3SigType8=Serial -OutputList3Cue9=[~UNUSED2~] -OutputList3SigType9=Serial -OutputList3Cue10=[~UNUSED2~] -OutputList3SigType10=Serial -OutputList3Cue11=[~BeginGroup~]Item Texts -OutputList3SigType11=Serial -OutputList3Cue12=[~UNUSED3~] -OutputList3SigType12=Serial -OutputList3Cue13=[~UNUSED3~] -OutputList3SigType13=Serial -OutputList3Cue14=[~UNUSED3~] -OutputList3SigType14=Serial -OutputList3Cue15=[~UNUSED3~] -OutputList3SigType15=Serial -OutputList3Cue16=[~UNUSED3~] -OutputList3SigType16=Serial -OutputList3Cue17=[~UNUSED3~] -OutputList3SigType17=Serial -OutputList3Cue18=[~UNUSED3~] -OutputList3SigType18=Serial -OutputList3Cue19=[~UNUSED3~] -OutputList3SigType19=Serial -OutputList3Cue20=[~UNUSED3~] -OutputList3SigType20=Serial -OutputList3Cue21=[~UNUSED3~] -OutputList3SigType21=Serial -OutputList3Cue22=[~UNUSED2~] -OutputList3SigType22=Digital|Analog|Serial|String -OutputList3Cue2012=[~EndGroup~]Item Texts -OutputList3SigType2012=Serial -OutputList3Cue2013=[~BeginGroup~]Item Icons -OutputList3SigType2013=Serial -OutputList3Cue2014=[~UNUSED3~] -OutputList3SigType2014=Serial -OutputList3Cue2015=[~UNUSED3~] -OutputList3SigType2015=Serial -OutputList3Cue2016=[~UNUSED3~] -OutputList3SigType2016=Serial -OutputList3Cue2017=[~UNUSED3~] -OutputList3SigType2017=Serial -OutputList3Cue2018=[~UNUSED3~] -OutputList3SigType2018=Serial -OutputList3Cue2019=[~UNUSED3~] -OutputList3SigType2019=Serial -OutputList3Cue2020=[~UNUSED3~] -OutputList3SigType2020=Serial -OutputList3Cue2021=[~UNUSED3~] -OutputList3SigType2021=Serial -OutputList3Cue2022=[~UNUSED3~] -OutputList3SigType2022=Serial -OutputList3Cue2023=[~UNUSED3~] -OutputList3SigType2023=Serial -OutputList3Cue2024=[~UNUSED2~] -OutputList3SigType2024=Digital|Analog|Serial|String -OutputList3Cue4014=[~EndGroup~]Item Icons -OutputList3SigType4014=Serial -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=17 -CedH=17 -SmartObjId=3901d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=17 -Tp=1 -HD=TRUE -DV=3901d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=17 -Name=PepperDash Essentials TSW-760_[E.Technician Controls] Menu_Dynamic Button List Vertical.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials TSW-760_[Z.Dialogs] Schedule List_Subpage Reference List Vertical.ced -Hint=Subpage Reference List Vertical (Smart Object ID=15023) -Code=18 -SGControlType=Subpage Reference List Vertical -SGControlName=Subpage Reference List Vertical -GUID=EC6E6B35-F033-4F14-9465-FEEBE20455CC -SmplCName=PepperDash Essentials TSW-760_[Z.Dialogs] Schedule List_Subpage Reference List Vertical.ced -SMWRev=4.02.20 -Expand=expand_random -HelpID=10125 -Render=8 -;Define the number of inputs, outputs and parameters -MinVariableInputs=4052 -MaxVariableInputs=4052 -MinVariableOutputs=4052 -MaxVariableOutputs=4052 -NumFixedParams=1 -MinVariableInputsList2=48 -MaxVariableInputsList2=48 -MinVariableOutputsList2=48 -MaxVariableOutputsList2=48 -MinVariableInputsList3=72 -MaxVariableInputsList3=72 -MinVariableOutputsList3=72 -MaxVariableOutputsList3=72 -InputSigType1=Digital -OutputSigType1=Digital -InputList2SigType1=Analog -OutputList2SigType1=Analog -InputList3SigType1=Serial -OutputList3SigType1=Serial - -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -InputCue2=[~UNUSED2~] -InputSigType2=Digital -InputCue3=[~UNUSED2~] -InputSigType3=Digital -InputCue4=[~UNUSED2~] -InputSigType4=Digital -InputCue5=[~UNUSED2~] -InputSigType5=Digital -InputCue6=[~UNUSED2~] -InputSigType6=Digital -InputCue7=[~UNUSED2~] -InputSigType7=Digital -InputCue8=[~UNUSED2~] -InputSigType8=Digital -InputCue9=[~UNUSED2~] -InputSigType9=Digital -InputCue10=[~UNUSED2~] -InputSigType10=Digital -InputCue11=[~BeginGroup~]Enable -InputSigType11=Digital -InputCue12=Item 1 Enable -InputSigType12=Digital -InputCue13=Item 2 Enable -InputSigType13=Digital -InputCue14=Item 3 Enable -InputSigType14=Digital -InputCue15=Item 4 Enable -InputSigType15=Digital -InputCue16=Item 5 Enable -InputSigType16=Digital -InputCue17=Item 6 Enable -InputSigType17=Digital -InputCue18=Item 7 Enable -InputSigType18=Digital -InputCue19=Item 8 Enable -InputSigType19=Digital -InputCue20=Item 9 Enable -InputSigType20=Digital -InputCue21=Item 10 Enable -InputSigType21=Digital -InputCue22=Item 11 Enable -InputSigType22=Digital -InputCue23=Item 12 Enable -InputSigType23=Digital -InputCue24=[~UNUSED2~] -InputSigType24=Digital|Analog|Serial|String -InputCue2012=[~EndGroup~]Enable -InputSigType2012=Digital -InputCue2013=[~BeginGroup~]Visible -InputSigType2013=Digital -InputCue2014=Item 1 Visible -InputSigType2014=Digital -InputCue2015=Item 2 Visible -InputSigType2015=Digital -InputCue2016=Item 3 Visible -InputSigType2016=Digital -InputCue2017=Item 4 Visible -InputSigType2017=Digital -InputCue2018=Item 5 Visible -InputSigType2018=Digital -InputCue2019=Item 6 Visible -InputSigType2019=Digital -InputCue2020=Item 7 Visible -InputSigType2020=Digital -InputCue2021=Item 8 Visible -InputSigType2021=Digital -InputCue2022=Item 9 Visible -InputSigType2022=Digital -InputCue2023=Item 10 Visible -InputSigType2023=Digital -InputCue2024=Item 11 Visible -InputSigType2024=Digital -InputCue2025=Item 12 Visible -InputSigType2025=Digital -InputCue2026=[~UNUSED2~] -InputSigType2026=Digital|Analog|Serial|String -InputCue4014=[~EndGroup~]Visible -InputSigType4014=Digital -InputCue4015=[~BeginGroup~]fb -InputSigType4015=Digital -InputCue4016=fb1 -InputSigType4016=Digital -InputCue4017=fb2 -InputSigType4017=Digital -InputCue4018=fb3 -InputSigType4018=Digital -InputCue4019=fb4 -InputSigType4019=Digital -InputCue4020=fb5 -InputSigType4020=Digital -InputCue4021=fb6 -InputSigType4021=Digital -InputCue4022=fb7 -InputSigType4022=Digital -InputCue4023=fb8 -InputSigType4023=Digital -InputCue4024=fb9 -InputSigType4024=Digital -InputCue4025=fb10 -InputSigType4025=Digital -InputCue4026=fb11 -InputSigType4026=Digital -InputCue4027=fb12 -InputSigType4027=Digital -InputCue4028=fb13 -InputSigType4028=Digital -InputCue4029=fb14 -InputSigType4029=Digital -InputCue4030=fb15 -InputSigType4030=Digital -InputCue4031=fb16 -InputSigType4031=Digital -InputCue4032=fb17 -InputSigType4032=Digital -InputCue4033=fb18 -InputSigType4033=Digital -InputCue4034=fb19 -InputSigType4034=Digital -InputCue4035=fb20 -InputSigType4035=Digital -InputCue4036=fb21 -InputSigType4036=Digital -InputCue4037=fb22 -InputSigType4037=Digital -InputCue4038=fb23 -InputSigType4038=Digital -InputCue4039=fb24 -InputSigType4039=Digital -InputCue4040=fb25 -InputSigType4040=Digital -InputCue4041=fb26 -InputSigType4041=Digital -InputCue4042=fb27 -InputSigType4042=Digital -InputCue4043=fb28 -InputSigType4043=Digital -InputCue4044=fb29 -InputSigType4044=Digital -InputCue4045=fb30 -InputSigType4045=Digital -InputCue4046=fb31 -InputSigType4046=Digital -InputCue4047=fb32 -InputSigType4047=Digital -InputCue4048=fb33 -InputSigType4048=Digital -InputCue4049=fb34 -InputSigType4049=Digital -InputCue4050=fb35 -InputSigType4050=Digital -InputCue4051=fb36 -InputSigType4051=Digital -InputCue4052=[~EndGroup~]fb -InputSigType4052=Digital -OutputCue1=Is Moving -OutputSigType1=Digital -OutputCue2=[~UNUSED2~] -OutputSigType2=Digital -OutputCue3=[~UNUSED2~] -OutputSigType3=Digital -OutputCue4=[~UNUSED2~] -OutputSigType4=Digital -OutputCue5=[~UNUSED2~] -OutputSigType5=Digital -OutputCue6=[~UNUSED2~] -OutputSigType6=Digital -OutputCue7=[~UNUSED2~] -OutputSigType7=Digital -OutputCue8=[~UNUSED2~] -OutputSigType8=Digital -OutputCue9=[~UNUSED2~] -OutputSigType9=Digital -OutputCue10=[~UNUSED2~] -OutputSigType10=Digital -OutputCue11=[~BeginGroup~]Enable -OutputSigType11=Digital -OutputCue12=[~UNUSED3~] -OutputSigType12=Digital -OutputCue13=[~UNUSED3~] -OutputSigType13=Digital -OutputCue14=[~UNUSED3~] -OutputSigType14=Digital -OutputCue15=[~UNUSED3~] -OutputSigType15=Digital -OutputCue16=[~UNUSED3~] -OutputSigType16=Digital -OutputCue17=[~UNUSED3~] -OutputSigType17=Digital -OutputCue18=[~UNUSED3~] -OutputSigType18=Digital -OutputCue19=[~UNUSED3~] -OutputSigType19=Digital -OutputCue20=[~UNUSED3~] -OutputSigType20=Digital -OutputCue21=[~UNUSED3~] -OutputSigType21=Digital -OutputCue22=[~UNUSED3~] -OutputSigType22=Digital -OutputCue23=[~UNUSED3~] -OutputSigType23=Digital -OutputCue24=[~UNUSED2~] -OutputSigType24=Digital|Analog|Serial|String -OutputCue2012=[~EndGroup~]Enable -OutputSigType2012=Digital -OutputCue2013=[~BeginGroup~]Visible -OutputSigType2013=Digital -OutputCue2014=[~UNUSED3~] -OutputSigType2014=Digital -OutputCue2015=[~UNUSED3~] -OutputSigType2015=Digital -OutputCue2016=[~UNUSED3~] -OutputSigType2016=Digital -OutputCue2017=[~UNUSED3~] -OutputSigType2017=Digital -OutputCue2018=[~UNUSED3~] -OutputSigType2018=Digital -OutputCue2019=[~UNUSED3~] -OutputSigType2019=Digital -OutputCue2020=[~UNUSED3~] -OutputSigType2020=Digital -OutputCue2021=[~UNUSED3~] -OutputSigType2021=Digital -OutputCue2022=[~UNUSED3~] -OutputSigType2022=Digital -OutputCue2023=[~UNUSED3~] -OutputSigType2023=Digital -OutputCue2024=[~UNUSED3~] -OutputSigType2024=Digital -OutputCue2025=[~UNUSED3~] -OutputSigType2025=Digital -OutputCue2026=[~UNUSED2~] -OutputSigType2026=Digital|Analog|Serial|String -OutputCue4014=[~EndGroup~]Visible -OutputSigType4014=Digital -OutputCue4015=[~BeginGroup~]Press -OutputSigType4015=Digital -OutputCue4016=press1 -OutputSigType4016=Digital -OutputCue4017=press2 -OutputSigType4017=Digital -OutputCue4018=press3 -OutputSigType4018=Digital -OutputCue4019=press4 -OutputSigType4019=Digital -OutputCue4020=press5 -OutputSigType4020=Digital -OutputCue4021=press6 -OutputSigType4021=Digital -OutputCue4022=press7 -OutputSigType4022=Digital -OutputCue4023=press8 -OutputSigType4023=Digital -OutputCue4024=press9 -OutputSigType4024=Digital -OutputCue4025=press10 -OutputSigType4025=Digital -OutputCue4026=press11 -OutputSigType4026=Digital -OutputCue4027=press12 -OutputSigType4027=Digital -OutputCue4028=press13 -OutputSigType4028=Digital -OutputCue4029=press14 -OutputSigType4029=Digital -OutputCue4030=press15 -OutputSigType4030=Digital -OutputCue4031=press16 -OutputSigType4031=Digital -OutputCue4032=press17 -OutputSigType4032=Digital -OutputCue4033=press18 -OutputSigType4033=Digital -OutputCue4034=press19 -OutputSigType4034=Digital -OutputCue4035=press20 -OutputSigType4035=Digital -OutputCue4036=press21 -OutputSigType4036=Digital -OutputCue4037=press22 -OutputSigType4037=Digital -OutputCue4038=press23 -OutputSigType4038=Digital -OutputCue4039=press24 -OutputSigType4039=Digital -OutputCue4040=press25 -OutputSigType4040=Digital -OutputCue4041=press26 -OutputSigType4041=Digital -OutputCue4042=press27 -OutputSigType4042=Digital -OutputCue4043=press28 -OutputSigType4043=Digital -OutputCue4044=press29 -OutputSigType4044=Digital -OutputCue4045=press30 -OutputSigType4045=Digital -OutputCue4046=press31 -OutputSigType4046=Digital -OutputCue4047=press32 -OutputSigType4047=Digital -OutputCue4048=press33 -OutputSigType4048=Digital -OutputCue4049=press34 -OutputSigType4049=Digital -OutputCue4050=press35 -OutputSigType4050=Digital -OutputCue4051=press36 -OutputSigType4051=Digital -OutputCue4052=[~EndGroup~]Press -OutputSigType4052=Digital -InputList2Cue1=[~UNUSED3~] -InputList2SigType1=Analog -InputList2Cue2=Scroll To Item -InputList2SigType2=Analog -InputList2Cue3=Set Number of Items -InputList2SigType3=Analog -InputList2Cue4=[~UNUSED2~] -InputList2SigType4=Analog -InputList2Cue5=[~UNUSED2~] -InputList2SigType5=Analog -InputList2Cue6=[~UNUSED2~] -InputList2SigType6=Analog -InputList2Cue7=[~UNUSED2~] -InputList2SigType7=Analog -InputList2Cue8=[~UNUSED2~] -InputList2SigType8=Analog -InputList2Cue9=[~UNUSED2~] -InputList2SigType9=Analog -InputList2Cue10=[~UNUSED2~] -InputList2SigType10=Analog -InputList2Cue11=[~BeginGroup~]an_fb -InputList2SigType11=Analog -InputList2Cue12=an_fb1 -InputList2SigType12=Analog -InputList2Cue13=an_fb2 -InputList2SigType13=Analog -InputList2Cue14=an_fb3 -InputList2SigType14=Analog -InputList2Cue15=an_fb4 -InputList2SigType15=Analog -InputList2Cue16=an_fb5 -InputList2SigType16=Analog -InputList2Cue17=an_fb6 -InputList2SigType17=Analog -InputList2Cue18=an_fb7 -InputList2SigType18=Analog -InputList2Cue19=an_fb8 -InputList2SigType19=Analog -InputList2Cue20=an_fb9 -InputList2SigType20=Analog -InputList2Cue21=an_fb10 -InputList2SigType21=Analog -InputList2Cue22=an_fb11 -InputList2SigType22=Analog -InputList2Cue23=an_fb12 -InputList2SigType23=Analog -InputList2Cue24=an_fb13 -InputList2SigType24=Analog -InputList2Cue25=an_fb14 -InputList2SigType25=Analog -InputList2Cue26=an_fb15 -InputList2SigType26=Analog -InputList2Cue27=an_fb16 -InputList2SigType27=Analog -InputList2Cue28=an_fb17 -InputList2SigType28=Analog -InputList2Cue29=an_fb18 -InputList2SigType29=Analog -InputList2Cue30=an_fb19 -InputList2SigType30=Analog -InputList2Cue31=an_fb20 -InputList2SigType31=Analog -InputList2Cue32=an_fb21 -InputList2SigType32=Analog -InputList2Cue33=an_fb22 -InputList2SigType33=Analog -InputList2Cue34=an_fb23 -InputList2SigType34=Analog -InputList2Cue35=an_fb24 -InputList2SigType35=Analog -InputList2Cue36=an_fb25 -InputList2SigType36=Analog -InputList2Cue37=an_fb26 -InputList2SigType37=Analog -InputList2Cue38=an_fb27 -InputList2SigType38=Analog -InputList2Cue39=an_fb28 -InputList2SigType39=Analog -InputList2Cue40=an_fb29 -InputList2SigType40=Analog -InputList2Cue41=an_fb30 -InputList2SigType41=Analog -InputList2Cue42=an_fb31 -InputList2SigType42=Analog -InputList2Cue43=an_fb32 -InputList2SigType43=Analog -InputList2Cue44=an_fb33 -InputList2SigType44=Analog -InputList2Cue45=an_fb34 -InputList2SigType45=Analog -InputList2Cue46=an_fb35 -InputList2SigType46=Analog -InputList2Cue47=an_fb36 -InputList2SigType47=Analog -InputList2Cue48=[~EndGroup~]an_fb -InputList2SigType48=Analog -OutputList2Cue1=Item Clicked -OutputList2SigType1=Analog -OutputList2Cue2=[~UNUSED3~] -OutputList2SigType2=Analog -OutputList2Cue3=[~UNUSED3~] -OutputList2SigType3=Analog -OutputList2Cue4=[~UNUSED2~] -OutputList2SigType4=Analog -OutputList2Cue5=[~UNUSED2~] -OutputList2SigType5=Analog -OutputList2Cue6=[~UNUSED2~] -OutputList2SigType6=Analog -OutputList2Cue7=[~UNUSED2~] -OutputList2SigType7=Analog -OutputList2Cue8=[~UNUSED2~] -OutputList2SigType8=Analog -OutputList2Cue9=[~UNUSED2~] -OutputList2SigType9=Analog -OutputList2Cue10=[~UNUSED2~] -OutputList2SigType10=Analog -OutputList2Cue11=[~BeginGroup~]an_act -OutputList2SigType11=Analog -OutputList2Cue12=an_act1 -OutputList2SigType12=Analog -OutputList2Cue13=an_act2 -OutputList2SigType13=Analog -OutputList2Cue14=an_act3 -OutputList2SigType14=Analog -OutputList2Cue15=an_act4 -OutputList2SigType15=Analog -OutputList2Cue16=an_act5 -OutputList2SigType16=Analog -OutputList2Cue17=an_act6 -OutputList2SigType17=Analog -OutputList2Cue18=an_act7 -OutputList2SigType18=Analog -OutputList2Cue19=an_act8 -OutputList2SigType19=Analog -OutputList2Cue20=an_act9 -OutputList2SigType20=Analog -OutputList2Cue21=an_act10 -OutputList2SigType21=Analog -OutputList2Cue22=an_act11 -OutputList2SigType22=Analog -OutputList2Cue23=an_act12 -OutputList2SigType23=Analog -OutputList2Cue24=an_act13 -OutputList2SigType24=Analog -OutputList2Cue25=an_act14 -OutputList2SigType25=Analog -OutputList2Cue26=an_act15 -OutputList2SigType26=Analog -OutputList2Cue27=an_act16 -OutputList2SigType27=Analog -OutputList2Cue28=an_act17 -OutputList2SigType28=Analog -OutputList2Cue29=an_act18 -OutputList2SigType29=Analog -OutputList2Cue30=an_act19 -OutputList2SigType30=Analog -OutputList2Cue31=an_act20 -OutputList2SigType31=Analog -OutputList2Cue32=an_act21 -OutputList2SigType32=Analog -OutputList2Cue33=an_act22 -OutputList2SigType33=Analog -OutputList2Cue34=an_act23 -OutputList2SigType34=Analog -OutputList2Cue35=an_act24 -OutputList2SigType35=Analog -OutputList2Cue36=an_act25 -OutputList2SigType36=Analog -OutputList2Cue37=an_act26 -OutputList2SigType37=Analog -OutputList2Cue38=an_act27 -OutputList2SigType38=Analog -OutputList2Cue39=an_act28 -OutputList2SigType39=Analog -OutputList2Cue40=an_act29 -OutputList2SigType40=Analog -OutputList2Cue41=an_act30 -OutputList2SigType41=Analog -OutputList2Cue42=an_act31 -OutputList2SigType42=Analog -OutputList2Cue43=an_act32 -OutputList2SigType43=Analog -OutputList2Cue44=an_act33 -OutputList2SigType44=Analog -OutputList2Cue45=an_act34 -OutputList2SigType45=Analog -OutputList2Cue46=an_act35 -OutputList2SigType46=Analog -OutputList2Cue47=an_act36 -OutputList2SigType47=Analog -OutputList2Cue48=[~EndGroup~]an_act -OutputList2SigType48=Analog -InputList3Cue1=[~UNUSED2~] -InputList3SigType1=Serial -InputList3Cue2=[~UNUSED2~] -InputList3SigType2=Serial -InputList3Cue3=[~UNUSED2~] -InputList3SigType3=Serial -InputList3Cue4=[~UNUSED2~] -InputList3SigType4=Serial -InputList3Cue5=[~UNUSED2~] -InputList3SigType5=Serial -InputList3Cue6=[~UNUSED2~] -InputList3SigType6=Serial -InputList3Cue7=[~UNUSED2~] -InputList3SigType7=Serial -InputList3Cue8=[~UNUSED2~] -InputList3SigType8=Serial -InputList3Cue9=[~UNUSED2~] -InputList3SigType9=Serial -InputList3Cue10=[~UNUSED2~] -InputList3SigType10=Serial -InputList3Cue11=[~BeginGroup~]text-o -InputList3SigType11=Serial -InputList3Cue12=text-o1 -InputList3SigType12=Serial -InputList3Cue13=text-o2 -InputList3SigType13=Serial -InputList3Cue14=text-o3 -InputList3SigType14=Serial -InputList3Cue15=text-o4 -InputList3SigType15=Serial -InputList3Cue16=text-o5 -InputList3SigType16=Serial -InputList3Cue17=text-o6 -InputList3SigType17=Serial -InputList3Cue18=text-o7 -InputList3SigType18=Serial -InputList3Cue19=text-o8 -InputList3SigType19=Serial -InputList3Cue20=text-o9 -InputList3SigType20=Serial -InputList3Cue21=text-o10 -InputList3SigType21=Serial -InputList3Cue22=text-o11 -InputList3SigType22=Serial -InputList3Cue23=text-o12 -InputList3SigType23=Serial -InputList3Cue24=text-o13 -InputList3SigType24=Serial -InputList3Cue25=text-o14 -InputList3SigType25=Serial -InputList3Cue26=text-o15 -InputList3SigType26=Serial -InputList3Cue27=text-o16 -InputList3SigType27=Serial -InputList3Cue28=text-o17 -InputList3SigType28=Serial -InputList3Cue29=text-o18 -InputList3SigType29=Serial -InputList3Cue30=text-o19 -InputList3SigType30=Serial -InputList3Cue31=text-o20 -InputList3SigType31=Serial -InputList3Cue32=text-o21 -InputList3SigType32=Serial -InputList3Cue33=text-o22 -InputList3SigType33=Serial -InputList3Cue34=text-o23 -InputList3SigType34=Serial -InputList3Cue35=text-o24 -InputList3SigType35=Serial -InputList3Cue36=text-o25 -InputList3SigType36=Serial -InputList3Cue37=text-o26 -InputList3SigType37=Serial -InputList3Cue38=text-o27 -InputList3SigType38=Serial -InputList3Cue39=text-o28 -InputList3SigType39=Serial -InputList3Cue40=text-o29 -InputList3SigType40=Serial -InputList3Cue41=text-o30 -InputList3SigType41=Serial -InputList3Cue42=text-o31 -InputList3SigType42=Serial -InputList3Cue43=text-o32 -InputList3SigType43=Serial -InputList3Cue44=text-o33 -InputList3SigType44=Serial -InputList3Cue45=text-o34 -InputList3SigType45=Serial -InputList3Cue46=text-o35 -InputList3SigType46=Serial -InputList3Cue47=text-o36 -InputList3SigType47=Serial -InputList3Cue48=text-o37 -InputList3SigType48=Serial -InputList3Cue49=text-o38 -InputList3SigType49=Serial -InputList3Cue50=text-o39 -InputList3SigType50=Serial -InputList3Cue51=text-o40 -InputList3SigType51=Serial -InputList3Cue52=text-o41 -InputList3SigType52=Serial -InputList3Cue53=text-o42 -InputList3SigType53=Serial -InputList3Cue54=text-o43 -InputList3SigType54=Serial -InputList3Cue55=text-o44 -InputList3SigType55=Serial -InputList3Cue56=text-o45 -InputList3SigType56=Serial -InputList3Cue57=text-o46 -InputList3SigType57=Serial -InputList3Cue58=text-o47 -InputList3SigType58=Serial -InputList3Cue59=text-o48 -InputList3SigType59=Serial -InputList3Cue60=text-o49 -InputList3SigType60=Serial -InputList3Cue61=text-o50 -InputList3SigType61=Serial -InputList3Cue62=text-o51 -InputList3SigType62=Serial -InputList3Cue63=text-o52 -InputList3SigType63=Serial -InputList3Cue64=text-o53 -InputList3SigType64=Serial -InputList3Cue65=text-o54 -InputList3SigType65=Serial -InputList3Cue66=text-o55 -InputList3SigType66=Serial -InputList3Cue67=text-o56 -InputList3SigType67=Serial -InputList3Cue68=text-o57 -InputList3SigType68=Serial -InputList3Cue69=text-o58 -InputList3SigType69=Serial -InputList3Cue70=text-o59 -InputList3SigType70=Serial -InputList3Cue71=text-o60 -InputList3SigType71=Serial -InputList3Cue72=[~EndGroup~]text-o -InputList3SigType72=Serial -OutputList3Cue1=[~UNUSED2~] -OutputList3SigType1=Serial -OutputList3Cue2=[~UNUSED2~] -OutputList3SigType2=Serial -OutputList3Cue3=[~UNUSED2~] -OutputList3SigType3=Serial -OutputList3Cue4=[~UNUSED2~] -OutputList3SigType4=Serial -OutputList3Cue5=[~UNUSED2~] -OutputList3SigType5=Serial -OutputList3Cue6=[~UNUSED2~] -OutputList3SigType6=Serial -OutputList3Cue7=[~UNUSED2~] -OutputList3SigType7=Serial -OutputList3Cue8=[~UNUSED2~] -OutputList3SigType8=Serial -OutputList3Cue9=[~UNUSED2~] -OutputList3SigType9=Serial -OutputList3Cue10=[~UNUSED2~] -OutputList3SigType10=Serial -OutputList3Cue11=[~BeginGroup~]text-i -OutputList3SigType11=Serial -OutputList3Cue12=text-i1 -OutputList3SigType12=Serial -OutputList3Cue13=text-i2 -OutputList3SigType13=Serial -OutputList3Cue14=text-i3 -OutputList3SigType14=Serial -OutputList3Cue15=text-i4 -OutputList3SigType15=Serial -OutputList3Cue16=text-i5 -OutputList3SigType16=Serial -OutputList3Cue17=text-i6 -OutputList3SigType17=Serial -OutputList3Cue18=text-i7 -OutputList3SigType18=Serial -OutputList3Cue19=text-i8 -OutputList3SigType19=Serial -OutputList3Cue20=text-i9 -OutputList3SigType20=Serial -OutputList3Cue21=text-i10 -OutputList3SigType21=Serial -OutputList3Cue22=text-i11 -OutputList3SigType22=Serial -OutputList3Cue23=text-i12 -OutputList3SigType23=Serial -OutputList3Cue24=text-i13 -OutputList3SigType24=Serial -OutputList3Cue25=text-i14 -OutputList3SigType25=Serial -OutputList3Cue26=text-i15 -OutputList3SigType26=Serial -OutputList3Cue27=text-i16 -OutputList3SigType27=Serial -OutputList3Cue28=text-i17 -OutputList3SigType28=Serial -OutputList3Cue29=text-i18 -OutputList3SigType29=Serial -OutputList3Cue30=text-i19 -OutputList3SigType30=Serial -OutputList3Cue31=text-i20 -OutputList3SigType31=Serial -OutputList3Cue32=text-i21 -OutputList3SigType32=Serial -OutputList3Cue33=text-i22 -OutputList3SigType33=Serial -OutputList3Cue34=text-i23 -OutputList3SigType34=Serial -OutputList3Cue35=text-i24 -OutputList3SigType35=Serial -OutputList3Cue36=text-i25 -OutputList3SigType36=Serial -OutputList3Cue37=text-i26 -OutputList3SigType37=Serial -OutputList3Cue38=text-i27 -OutputList3SigType38=Serial -OutputList3Cue39=text-i28 -OutputList3SigType39=Serial -OutputList3Cue40=text-i29 -OutputList3SigType40=Serial -OutputList3Cue41=text-i30 -OutputList3SigType41=Serial -OutputList3Cue42=text-i31 -OutputList3SigType42=Serial -OutputList3Cue43=text-i32 -OutputList3SigType43=Serial -OutputList3Cue44=text-i33 -OutputList3SigType44=Serial -OutputList3Cue45=text-i34 -OutputList3SigType45=Serial -OutputList3Cue46=text-i35 -OutputList3SigType46=Serial -OutputList3Cue47=text-i36 -OutputList3SigType47=Serial -OutputList3Cue48=text-i37 -OutputList3SigType48=Serial -OutputList3Cue49=text-i38 -OutputList3SigType49=Serial -OutputList3Cue50=text-i39 -OutputList3SigType50=Serial -OutputList3Cue51=text-i40 -OutputList3SigType51=Serial -OutputList3Cue52=text-i41 -OutputList3SigType52=Serial -OutputList3Cue53=text-i42 -OutputList3SigType53=Serial -OutputList3Cue54=text-i43 -OutputList3SigType54=Serial -OutputList3Cue55=text-i44 -OutputList3SigType55=Serial -OutputList3Cue56=text-i45 -OutputList3SigType56=Serial -OutputList3Cue57=text-i46 -OutputList3SigType57=Serial -OutputList3Cue58=text-i47 -OutputList3SigType58=Serial -OutputList3Cue59=text-i48 -OutputList3SigType59=Serial -OutputList3Cue60=text-i49 -OutputList3SigType60=Serial -OutputList3Cue61=text-i50 -OutputList3SigType61=Serial -OutputList3Cue62=text-i51 -OutputList3SigType62=Serial -OutputList3Cue63=text-i52 -OutputList3SigType63=Serial -OutputList3Cue64=text-i53 -OutputList3SigType64=Serial -OutputList3Cue65=text-i54 -OutputList3SigType65=Serial -OutputList3Cue66=text-i55 -OutputList3SigType66=Serial -OutputList3Cue67=text-i56 -OutputList3SigType67=Serial -OutputList3Cue68=text-i57 -OutputList3SigType68=Serial -OutputList3Cue69=text-i58 -OutputList3SigType69=Serial -OutputList3Cue70=text-i59 -OutputList3SigType70=Serial -OutputList3Cue71=text-i60 -OutputList3SigType71=Serial -OutputList3Cue72=[~EndGroup~]text-i -OutputList3SigType72=Serial -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=18 -CedH=18 -SmartObjId=15023d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=18 -Tp=1 -HD=TRUE -DV=15023d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=18 -Name=PepperDash Essentials TSW-760_[Z.Dialogs] Schedule List_Subpage Reference List Vertical.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials TSW-760_[D.VC] Recents_Dynamic Button List Vertical_2.ced -Hint=Dynamic Button List Vertical_2 (Smart Object ID=1203) -Code=19 -SGControlType=Dynamic Button List Vertical -SGControlName=Dynamic Button List Vertical_2 -GUID=2C4B55E4-42AC-486D-BC6E-C7DD7D24C974 -SmplCName=PepperDash Essentials TSW-760_[D.VC] Recents_Dynamic Button List Vertical_2.ced -SMWRev=4.02.20 -Expand=expand_random -HelpID=10112 -Render=8 -;Define the number of inputs, outputs and parameters -MinVariableInputs=6016 -MaxVariableInputs=6016 -MinVariableOutputs=6016 -MaxVariableOutputs=6016 -NumFixedParams=1 -MinVariableInputsList2=2012 -MaxVariableInputsList2=2012 -MinVariableOutputsList2=2012 -MaxVariableOutputsList2=2012 -MinVariableInputsList3=4014 -MaxVariableInputsList3=4014 -MinVariableOutputsList3=4014 -MaxVariableOutputsList3=4014 -InputSigType1=Digital -OutputSigType1=Digital -InputList2SigType1=Analog -OutputList2SigType1=Analog -InputList3SigType1=Serial -OutputList3SigType1=Serial - -;Define the cues, and signal types each input, output and parameter. -InputCue1=Disable Redraw -InputSigType1=Digital -InputCue2=[~UNUSED3~] -InputSigType2=Digital -InputCue3=[~UNUSED2~] -InputSigType3=Digital -InputCue4=[~UNUSED2~] -InputSigType4=Digital -InputCue5=[~UNUSED2~] -InputSigType5=Digital -InputCue6=[~UNUSED2~] -InputSigType6=Digital -InputCue7=[~UNUSED2~] -InputSigType7=Digital -InputCue8=[~UNUSED2~] -InputSigType8=Digital -InputCue9=[~UNUSED2~] -InputSigType9=Digital -InputCue10=[~UNUSED2~] -InputSigType10=Digital -InputCue11=[~BeginGroup~]Press -InputSigType11=Digital -InputCue12=Item 1 Selected -InputSigType12=Digital -InputCue13=Item 2 Selected -InputSigType13=Digital -InputCue14=Item 3 Selected -InputSigType14=Digital -InputCue15=Item 4 Selected -InputSigType15=Digital -InputCue16=Item 5 Selected -InputSigType16=Digital -InputCue17=Item 6 Selected -InputSigType17=Digital -InputCue18=Item 7 Selected -InputSigType18=Digital -InputCue19=Item 8 Selected -InputSigType19=Digital -InputCue20=Item 9 Selected -InputSigType20=Digital -InputCue21=Item 10 Selected -InputSigType21=Digital -InputCue22=Item 11 Selected -InputSigType22=Digital -InputCue23=Item 12 Selected -InputSigType23=Digital -InputCue24=Item 13 Selected -InputSigType24=Digital -InputCue25=Item 14 Selected -InputSigType25=Digital -InputCue26=Item 15 Selected -InputSigType26=Digital -InputCue27=Item 16 Selected -InputSigType27=Digital -InputCue28=Item 17 Selected -InputSigType28=Digital -InputCue29=Item 18 Selected -InputSigType29=Digital -InputCue30=Item 19 Selected -InputSigType30=Digital -InputCue31=Item 20 Selected -InputSigType31=Digital -InputCue32=Item 21 Selected -InputSigType32=Digital -InputCue33=Item 22 Selected -InputSigType33=Digital -InputCue34=Item 23 Selected -InputSigType34=Digital -InputCue35=Item 24 Selected -InputSigType35=Digital -InputCue36=Item 25 Selected -InputSigType36=Digital -InputCue37=Item 26 Selected -InputSigType37=Digital -InputCue38=Item 27 Selected -InputSigType38=Digital -InputCue39=Item 28 Selected -InputSigType39=Digital -InputCue40=Item 29 Selected -InputSigType40=Digital -InputCue41=Item 30 Selected -InputSigType41=Digital -InputCue42=[~UNUSED2~] -InputSigType42=Digital|Analog|Serial|String -InputCue2012=[~EndGroup~]Press -InputSigType2012=Digital -InputCue2013=[~BeginGroup~]Enable -InputSigType2013=Digital -InputCue2014=Item 1 Enabled -InputSigType2014=Digital -InputCue2015=Item 2 Enabled -InputSigType2015=Digital -InputCue2016=Item 3 Enabled -InputSigType2016=Digital -InputCue2017=Item 4 Enabled -InputSigType2017=Digital -InputCue2018=Item 5 Enabled -InputSigType2018=Digital -InputCue2019=Item 6 Enabled -InputSigType2019=Digital -InputCue2020=Item 7 Enabled -InputSigType2020=Digital -InputCue2021=Item 8 Enabled -InputSigType2021=Digital -InputCue2022=Item 9 Enabled -InputSigType2022=Digital -InputCue2023=Item 10 Enabled -InputSigType2023=Digital -InputCue2024=Item 11 Enabled -InputSigType2024=Digital -InputCue2025=Item 12 Enabled -InputSigType2025=Digital -InputCue2026=Item 13 Enabled -InputSigType2026=Digital -InputCue2027=Item 14 Enabled -InputSigType2027=Digital -InputCue2028=Item 15 Enabled -InputSigType2028=Digital -InputCue2029=Item 16 Enabled -InputSigType2029=Digital -InputCue2030=Item 17 Enabled -InputSigType2030=Digital -InputCue2031=Item 18 Enabled -InputSigType2031=Digital -InputCue2032=Item 19 Enabled -InputSigType2032=Digital -InputCue2033=Item 20 Enabled -InputSigType2033=Digital -InputCue2034=Item 21 Enabled -InputSigType2034=Digital -InputCue2035=Item 22 Enabled -InputSigType2035=Digital -InputCue2036=Item 23 Enabled -InputSigType2036=Digital -InputCue2037=Item 24 Enabled -InputSigType2037=Digital -InputCue2038=Item 25 Enabled -InputSigType2038=Digital -InputCue2039=Item 26 Enabled -InputSigType2039=Digital -InputCue2040=Item 27 Enabled -InputSigType2040=Digital -InputCue2041=Item 28 Enabled -InputSigType2041=Digital -InputCue2042=Item 29 Enabled -InputSigType2042=Digital -InputCue2043=Item 30 Enabled -InputSigType2043=Digital -InputCue2044=[~UNUSED2~] -InputSigType2044=Digital|Analog|Serial|String -InputCue4014=[~EndGroup~]Enable -InputSigType4014=Digital -InputCue4015=[~BeginGroup~]Visible -InputSigType4015=Digital -InputCue4016=Item 1 Visible -InputSigType4016=Digital -InputCue4017=Item 2 Visible -InputSigType4017=Digital -InputCue4018=Item 3 Visible -InputSigType4018=Digital -InputCue4019=Item 4 Visible -InputSigType4019=Digital -InputCue4020=Item 5 Visible -InputSigType4020=Digital -InputCue4021=Item 6 Visible -InputSigType4021=Digital -InputCue4022=Item 7 Visible -InputSigType4022=Digital -InputCue4023=Item 8 Visible -InputSigType4023=Digital -InputCue4024=Item 9 Visible -InputSigType4024=Digital -InputCue4025=Item 10 Visible -InputSigType4025=Digital -InputCue4026=Item 11 Visible -InputSigType4026=Digital -InputCue4027=Item 12 Visible -InputSigType4027=Digital -InputCue4028=Item 13 Visible -InputSigType4028=Digital -InputCue4029=Item 14 Visible -InputSigType4029=Digital -InputCue4030=Item 15 Visible -InputSigType4030=Digital -InputCue4031=Item 16 Visible -InputSigType4031=Digital -InputCue4032=Item 17 Visible -InputSigType4032=Digital -InputCue4033=Item 18 Visible -InputSigType4033=Digital -InputCue4034=Item 19 Visible -InputSigType4034=Digital -InputCue4035=Item 20 Visible -InputSigType4035=Digital -InputCue4036=Item 21 Visible -InputSigType4036=Digital -InputCue4037=Item 22 Visible -InputSigType4037=Digital -InputCue4038=Item 23 Visible -InputSigType4038=Digital -InputCue4039=Item 24 Visible -InputSigType4039=Digital -InputCue4040=Item 25 Visible -InputSigType4040=Digital -InputCue4041=Item 26 Visible -InputSigType4041=Digital -InputCue4042=Item 27 Visible -InputSigType4042=Digital -InputCue4043=Item 28 Visible -InputSigType4043=Digital -InputCue4044=Item 29 Visible -InputSigType4044=Digital -InputCue4045=Item 30 Visible -InputSigType4045=Digital -InputCue4046=[~UNUSED2~] -InputSigType4046=Digital|Analog|Serial|String -InputCue6016=[~EndGroup~]Visible -InputSigType6016=Digital -OutputCue1=[~UNUSED3~] -OutputSigType1=Digital -OutputCue2=Is Moving -OutputSigType2=Digital -OutputCue3=[~UNUSED2~] -OutputSigType3=Digital -OutputCue4=[~UNUSED2~] -OutputSigType4=Digital -OutputCue5=[~UNUSED2~] -OutputSigType5=Digital -OutputCue6=[~UNUSED2~] -OutputSigType6=Digital -OutputCue7=[~UNUSED2~] -OutputSigType7=Digital -OutputCue8=[~UNUSED2~] -OutputSigType8=Digital -OutputCue9=[~UNUSED2~] -OutputSigType9=Digital -OutputCue10=[~UNUSED2~] -OutputSigType10=Digital -OutputCue11=[~BeginGroup~]Press -OutputSigType11=Digital -OutputCue12=Item 1 Pressed -OutputSigType12=Digital -OutputCue13=Item 2 Pressed -OutputSigType13=Digital -OutputCue14=Item 3 Pressed -OutputSigType14=Digital -OutputCue15=Item 4 Pressed -OutputSigType15=Digital -OutputCue16=Item 5 Pressed -OutputSigType16=Digital -OutputCue17=Item 6 Pressed -OutputSigType17=Digital -OutputCue18=Item 7 Pressed -OutputSigType18=Digital -OutputCue19=Item 8 Pressed -OutputSigType19=Digital -OutputCue20=Item 9 Pressed -OutputSigType20=Digital -OutputCue21=Item 10 Pressed -OutputSigType21=Digital -OutputCue22=Item 11 Pressed -OutputSigType22=Digital -OutputCue23=Item 12 Pressed -OutputSigType23=Digital -OutputCue24=Item 13 Pressed -OutputSigType24=Digital -OutputCue25=Item 14 Pressed -OutputSigType25=Digital -OutputCue26=Item 15 Pressed -OutputSigType26=Digital -OutputCue27=Item 16 Pressed -OutputSigType27=Digital -OutputCue28=Item 17 Pressed -OutputSigType28=Digital -OutputCue29=Item 18 Pressed -OutputSigType29=Digital -OutputCue30=Item 19 Pressed -OutputSigType30=Digital -OutputCue31=Item 20 Pressed -OutputSigType31=Digital -OutputCue32=Item 21 Pressed -OutputSigType32=Digital -OutputCue33=Item 22 Pressed -OutputSigType33=Digital -OutputCue34=Item 23 Pressed -OutputSigType34=Digital -OutputCue35=Item 24 Pressed -OutputSigType35=Digital -OutputCue36=Item 25 Pressed -OutputSigType36=Digital -OutputCue37=Item 26 Pressed -OutputSigType37=Digital -OutputCue38=Item 27 Pressed -OutputSigType38=Digital -OutputCue39=Item 28 Pressed -OutputSigType39=Digital -OutputCue40=Item 29 Pressed -OutputSigType40=Digital -OutputCue41=Item 30 Pressed -OutputSigType41=Digital -OutputCue42=[~UNUSED2~] -OutputSigType42=Digital|Analog|Serial|String -OutputCue2012=[~EndGroup~]Press -OutputSigType2012=Digital -OutputCue2013=[~BeginGroup~]Enable -OutputSigType2013=Digital -OutputCue2014=[~UNUSED3~] -OutputSigType2014=Digital -OutputCue2015=[~UNUSED3~] -OutputSigType2015=Digital -OutputCue2016=[~UNUSED3~] -OutputSigType2016=Digital -OutputCue2017=[~UNUSED3~] -OutputSigType2017=Digital -OutputCue2018=[~UNUSED3~] -OutputSigType2018=Digital -OutputCue2019=[~UNUSED3~] -OutputSigType2019=Digital -OutputCue2020=[~UNUSED3~] -OutputSigType2020=Digital -OutputCue2021=[~UNUSED3~] -OutputSigType2021=Digital -OutputCue2022=[~UNUSED3~] -OutputSigType2022=Digital -OutputCue2023=[~UNUSED3~] -OutputSigType2023=Digital -OutputCue2024=[~UNUSED3~] -OutputSigType2024=Digital -OutputCue2025=[~UNUSED3~] -OutputSigType2025=Digital -OutputCue2026=[~UNUSED3~] -OutputSigType2026=Digital -OutputCue2027=[~UNUSED3~] -OutputSigType2027=Digital -OutputCue2028=[~UNUSED3~] -OutputSigType2028=Digital -OutputCue2029=[~UNUSED3~] -OutputSigType2029=Digital -OutputCue2030=[~UNUSED3~] -OutputSigType2030=Digital -OutputCue2031=[~UNUSED3~] -OutputSigType2031=Digital -OutputCue2032=[~UNUSED3~] -OutputSigType2032=Digital -OutputCue2033=[~UNUSED3~] -OutputSigType2033=Digital -OutputCue2034=[~UNUSED3~] -OutputSigType2034=Digital -OutputCue2035=[~UNUSED3~] -OutputSigType2035=Digital -OutputCue2036=[~UNUSED3~] -OutputSigType2036=Digital -OutputCue2037=[~UNUSED3~] -OutputSigType2037=Digital -OutputCue2038=[~UNUSED3~] -OutputSigType2038=Digital -OutputCue2039=[~UNUSED3~] -OutputSigType2039=Digital -OutputCue2040=[~UNUSED3~] -OutputSigType2040=Digital -OutputCue2041=[~UNUSED3~] -OutputSigType2041=Digital -OutputCue2042=[~UNUSED3~] -OutputSigType2042=Digital -OutputCue2043=[~UNUSED3~] -OutputSigType2043=Digital -OutputCue2044=[~UNUSED2~] -OutputSigType2044=Digital|Analog|Serial|String -OutputCue4014=[~EndGroup~]Enable -OutputSigType4014=Digital -OutputCue4015=[~BeginGroup~]Visible -OutputSigType4015=Digital -OutputCue4016=[~UNUSED3~] -OutputSigType4016=Digital -OutputCue4017=[~UNUSED3~] -OutputSigType4017=Digital -OutputCue4018=[~UNUSED3~] -OutputSigType4018=Digital -OutputCue4019=[~UNUSED3~] -OutputSigType4019=Digital -OutputCue4020=[~UNUSED3~] -OutputSigType4020=Digital -OutputCue4021=[~UNUSED3~] -OutputSigType4021=Digital -OutputCue4022=[~UNUSED3~] -OutputSigType4022=Digital -OutputCue4023=[~UNUSED3~] -OutputSigType4023=Digital -OutputCue4024=[~UNUSED3~] -OutputSigType4024=Digital -OutputCue4025=[~UNUSED3~] -OutputSigType4025=Digital -OutputCue4026=[~UNUSED3~] -OutputSigType4026=Digital -OutputCue4027=[~UNUSED3~] -OutputSigType4027=Digital -OutputCue4028=[~UNUSED3~] -OutputSigType4028=Digital -OutputCue4029=[~UNUSED3~] -OutputSigType4029=Digital -OutputCue4030=[~UNUSED3~] -OutputSigType4030=Digital -OutputCue4031=[~UNUSED3~] -OutputSigType4031=Digital -OutputCue4032=[~UNUSED3~] -OutputSigType4032=Digital -OutputCue4033=[~UNUSED3~] -OutputSigType4033=Digital -OutputCue4034=[~UNUSED3~] -OutputSigType4034=Digital -OutputCue4035=[~UNUSED3~] -OutputSigType4035=Digital -OutputCue4036=[~UNUSED3~] -OutputSigType4036=Digital -OutputCue4037=[~UNUSED3~] -OutputSigType4037=Digital -OutputCue4038=[~UNUSED3~] -OutputSigType4038=Digital -OutputCue4039=[~UNUSED3~] -OutputSigType4039=Digital -OutputCue4040=[~UNUSED3~] -OutputSigType4040=Digital -OutputCue4041=[~UNUSED3~] -OutputSigType4041=Digital -OutputCue4042=[~UNUSED3~] -OutputSigType4042=Digital -OutputCue4043=[~UNUSED3~] -OutputSigType4043=Digital -OutputCue4044=[~UNUSED3~] -OutputSigType4044=Digital -OutputCue4045=[~UNUSED3~] -OutputSigType4045=Digital -OutputCue4046=[~UNUSED2~] -OutputSigType4046=Digital|Analog|Serial|String -OutputCue6016=[~EndGroup~]Visible -OutputSigType6016=Digital -InputList2Cue1=[~UNUSED3~] -InputList2SigType1=Analog -InputList2Cue2=[~UNUSED3~] -InputList2SigType2=Analog -InputList2Cue3=Scroll To Item -InputList2SigType3=Analog -InputList2Cue4=Set Number of Items -InputList2SigType4=Analog -InputList2Cue5=[~UNUSED2~] -InputList2SigType5=Analog -InputList2Cue6=[~UNUSED2~] -InputList2SigType6=Analog -InputList2Cue7=[~UNUSED2~] -InputList2SigType7=Analog -InputList2Cue8=[~UNUSED2~] -InputList2SigType8=Analog -InputList2Cue9=[~UNUSED2~] -InputList2SigType9=Analog -InputList2Cue10=[~UNUSED2~] -InputList2SigType10=Analog -InputList2Cue11=[~BeginGroup~]Item Icons -InputList2SigType11=Analog -InputList2Cue12=Set Item 1 Icon Analog -InputList2SigType12=Analog -InputList2Cue13=Set Item 2 Icon Analog -InputList2SigType13=Analog -InputList2Cue14=Set Item 3 Icon Analog -InputList2SigType14=Analog -InputList2Cue15=Set Item 4 Icon Analog -InputList2SigType15=Analog -InputList2Cue16=Set Item 5 Icon Analog -InputList2SigType16=Analog -InputList2Cue17=Set Item 6 Icon Analog -InputList2SigType17=Analog -InputList2Cue18=Set Item 7 Icon Analog -InputList2SigType18=Analog -InputList2Cue19=Set Item 8 Icon Analog -InputList2SigType19=Analog -InputList2Cue20=Set Item 9 Icon Analog -InputList2SigType20=Analog -InputList2Cue21=Set Item 10 Icon Analog -InputList2SigType21=Analog -InputList2Cue22=Set Item 11 Icon Analog -InputList2SigType22=Analog -InputList2Cue23=Set Item 12 Icon Analog -InputList2SigType23=Analog -InputList2Cue24=Set Item 13 Icon Analog -InputList2SigType24=Analog -InputList2Cue25=Set Item 14 Icon Analog -InputList2SigType25=Analog -InputList2Cue26=Set Item 15 Icon Analog -InputList2SigType26=Analog -InputList2Cue27=Set Item 16 Icon Analog -InputList2SigType27=Analog -InputList2Cue28=Set Item 17 Icon Analog -InputList2SigType28=Analog -InputList2Cue29=Set Item 18 Icon Analog -InputList2SigType29=Analog -InputList2Cue30=Set Item 19 Icon Analog -InputList2SigType30=Analog -InputList2Cue31=Set Item 20 Icon Analog -InputList2SigType31=Analog -InputList2Cue32=Set Item 21 Icon Analog -InputList2SigType32=Analog -InputList2Cue33=Set Item 22 Icon Analog -InputList2SigType33=Analog -InputList2Cue34=Set Item 23 Icon Analog -InputList2SigType34=Analog -InputList2Cue35=Set Item 24 Icon Analog -InputList2SigType35=Analog -InputList2Cue36=Set Item 25 Icon Analog -InputList2SigType36=Analog -InputList2Cue37=Set Item 26 Icon Analog -InputList2SigType37=Analog -InputList2Cue38=Set Item 27 Icon Analog -InputList2SigType38=Analog -InputList2Cue39=Set Item 28 Icon Analog -InputList2SigType39=Analog -InputList2Cue40=Set Item 29 Icon Analog -InputList2SigType40=Analog -InputList2Cue41=Set Item 30 Icon Analog -InputList2SigType41=Analog -InputList2Cue42=[~UNUSED2~] -InputList2SigType42=Digital|Analog|Serial|String -InputList2Cue2012=[~EndGroup~]Item Icons -InputList2SigType2012=Analog -OutputList2Cue1=Item Clicked -OutputList2SigType1=Analog -OutputList2Cue2=Item Held -OutputList2SigType2=Analog -OutputList2Cue3=[~UNUSED3~] -OutputList2SigType3=Analog -OutputList2Cue4=[~UNUSED3~] -OutputList2SigType4=Analog -OutputList2Cue5=[~UNUSED2~] -OutputList2SigType5=Analog -OutputList2Cue6=[~UNUSED2~] -OutputList2SigType6=Analog -OutputList2Cue7=[~UNUSED2~] -OutputList2SigType7=Analog -OutputList2Cue8=[~UNUSED2~] -OutputList2SigType8=Analog -OutputList2Cue9=[~UNUSED2~] -OutputList2SigType9=Analog -OutputList2Cue10=[~UNUSED2~] -OutputList2SigType10=Analog -OutputList2Cue11=[~BeginGroup~]Item Icons -OutputList2SigType11=Analog -OutputList2Cue12=[~UNUSED3~] -OutputList2SigType12=Analog -OutputList2Cue13=[~UNUSED3~] -OutputList2SigType13=Analog -OutputList2Cue14=[~UNUSED3~] -OutputList2SigType14=Analog -OutputList2Cue15=[~UNUSED3~] -OutputList2SigType15=Analog -OutputList2Cue16=[~UNUSED3~] -OutputList2SigType16=Analog -OutputList2Cue17=[~UNUSED3~] -OutputList2SigType17=Analog -OutputList2Cue18=[~UNUSED3~] -OutputList2SigType18=Analog -OutputList2Cue19=[~UNUSED3~] -OutputList2SigType19=Analog -OutputList2Cue20=[~UNUSED3~] -OutputList2SigType20=Analog -OutputList2Cue21=[~UNUSED3~] -OutputList2SigType21=Analog -OutputList2Cue22=[~UNUSED3~] -OutputList2SigType22=Analog -OutputList2Cue23=[~UNUSED3~] -OutputList2SigType23=Analog -OutputList2Cue24=[~UNUSED3~] -OutputList2SigType24=Analog -OutputList2Cue25=[~UNUSED3~] -OutputList2SigType25=Analog -OutputList2Cue26=[~UNUSED3~] -OutputList2SigType26=Analog -OutputList2Cue27=[~UNUSED3~] -OutputList2SigType27=Analog -OutputList2Cue28=[~UNUSED3~] -OutputList2SigType28=Analog -OutputList2Cue29=[~UNUSED3~] -OutputList2SigType29=Analog -OutputList2Cue30=[~UNUSED3~] -OutputList2SigType30=Analog -OutputList2Cue31=[~UNUSED3~] -OutputList2SigType31=Analog -OutputList2Cue32=[~UNUSED3~] -OutputList2SigType32=Analog -OutputList2Cue33=[~UNUSED3~] -OutputList2SigType33=Analog -OutputList2Cue34=[~UNUSED3~] -OutputList2SigType34=Analog -OutputList2Cue35=[~UNUSED3~] -OutputList2SigType35=Analog -OutputList2Cue36=[~UNUSED3~] -OutputList2SigType36=Analog -OutputList2Cue37=[~UNUSED3~] -OutputList2SigType37=Analog -OutputList2Cue38=[~UNUSED3~] -OutputList2SigType38=Analog -OutputList2Cue39=[~UNUSED3~] -OutputList2SigType39=Analog -OutputList2Cue40=[~UNUSED3~] -OutputList2SigType40=Analog -OutputList2Cue41=[~UNUSED3~] -OutputList2SigType41=Analog -OutputList2Cue42=[~UNUSED2~] -OutputList2SigType42=Digital|Analog|Serial|String -OutputList2Cue2012=[~EndGroup~]Item Icons -OutputList2SigType2012=Analog -InputList3Cue1=[~UNUSED2~] -InputList3SigType1=Serial -InputList3Cue2=[~UNUSED2~] -InputList3SigType2=Serial -InputList3Cue3=[~UNUSED2~] -InputList3SigType3=Serial -InputList3Cue4=[~UNUSED2~] -InputList3SigType4=Serial -InputList3Cue5=[~UNUSED2~] -InputList3SigType5=Serial -InputList3Cue6=[~UNUSED2~] -InputList3SigType6=Serial -InputList3Cue7=[~UNUSED2~] -InputList3SigType7=Serial -InputList3Cue8=[~UNUSED2~] -InputList3SigType8=Serial -InputList3Cue9=[~UNUSED2~] -InputList3SigType9=Serial -InputList3Cue10=[~UNUSED2~] -InputList3SigType10=Serial -InputList3Cue11=[~BeginGroup~]Item Texts -InputList3SigType11=Serial -InputList3Cue12=Set Item 1 Text -InputList3SigType12=Serial -InputList3Cue13=Set Item 2 Text -InputList3SigType13=Serial -InputList3Cue14=Set Item 3 Text -InputList3SigType14=Serial -InputList3Cue15=Set Item 4 Text -InputList3SigType15=Serial -InputList3Cue16=Set Item 5 Text -InputList3SigType16=Serial -InputList3Cue17=Set Item 6 Text -InputList3SigType17=Serial -InputList3Cue18=Set Item 7 Text -InputList3SigType18=Serial -InputList3Cue19=Set Item 8 Text -InputList3SigType19=Serial -InputList3Cue20=Set Item 9 Text -InputList3SigType20=Serial -InputList3Cue21=Set Item 10 Text -InputList3SigType21=Serial -InputList3Cue22=Set Item 11 Text -InputList3SigType22=Serial -InputList3Cue23=Set Item 12 Text -InputList3SigType23=Serial -InputList3Cue24=Set Item 13 Text -InputList3SigType24=Serial -InputList3Cue25=Set Item 14 Text -InputList3SigType25=Serial -InputList3Cue26=Set Item 15 Text -InputList3SigType26=Serial -InputList3Cue27=Set Item 16 Text -InputList3SigType27=Serial -InputList3Cue28=Set Item 17 Text -InputList3SigType28=Serial -InputList3Cue29=Set Item 18 Text -InputList3SigType29=Serial -InputList3Cue30=Set Item 19 Text -InputList3SigType30=Serial -InputList3Cue31=Set Item 20 Text -InputList3SigType31=Serial -InputList3Cue32=Set Item 21 Text -InputList3SigType32=Serial -InputList3Cue33=Set Item 22 Text -InputList3SigType33=Serial -InputList3Cue34=Set Item 23 Text -InputList3SigType34=Serial -InputList3Cue35=Set Item 24 Text -InputList3SigType35=Serial -InputList3Cue36=Set Item 25 Text -InputList3SigType36=Serial -InputList3Cue37=Set Item 26 Text -InputList3SigType37=Serial -InputList3Cue38=Set Item 27 Text -InputList3SigType38=Serial -InputList3Cue39=Set Item 28 Text -InputList3SigType39=Serial -InputList3Cue40=Set Item 29 Text -InputList3SigType40=Serial -InputList3Cue41=Set Item 30 Text -InputList3SigType41=Serial -InputList3Cue42=[~UNUSED2~] -InputList3SigType42=Digital|Analog|Serial|String -InputList3Cue2012=[~EndGroup~]Item Texts -InputList3SigType2012=Serial -InputList3Cue2013=[~BeginGroup~]Item Icons -InputList3SigType2013=Serial -InputList3Cue2014=Set Item 1 Icon Serial -InputList3SigType2014=Serial -InputList3Cue2015=Set Item 2 Icon Serial -InputList3SigType2015=Serial -InputList3Cue2016=Set Item 3 Icon Serial -InputList3SigType2016=Serial -InputList3Cue2017=Set Item 4 Icon Serial -InputList3SigType2017=Serial -InputList3Cue2018=Set Item 5 Icon Serial -InputList3SigType2018=Serial -InputList3Cue2019=Set Item 6 Icon Serial -InputList3SigType2019=Serial -InputList3Cue2020=Set Item 7 Icon Serial -InputList3SigType2020=Serial -InputList3Cue2021=Set Item 8 Icon Serial -InputList3SigType2021=Serial -InputList3Cue2022=Set Item 9 Icon Serial -InputList3SigType2022=Serial -InputList3Cue2023=Set Item 10 Icon Serial -InputList3SigType2023=Serial -InputList3Cue2024=Set Item 11 Icon Serial -InputList3SigType2024=Serial -InputList3Cue2025=Set Item 12 Icon Serial -InputList3SigType2025=Serial -InputList3Cue2026=Set Item 13 Icon Serial -InputList3SigType2026=Serial -InputList3Cue2027=Set Item 14 Icon Serial -InputList3SigType2027=Serial -InputList3Cue2028=Set Item 15 Icon Serial -InputList3SigType2028=Serial -InputList3Cue2029=Set Item 16 Icon Serial -InputList3SigType2029=Serial -InputList3Cue2030=Set Item 17 Icon Serial -InputList3SigType2030=Serial -InputList3Cue2031=Set Item 18 Icon Serial -InputList3SigType2031=Serial -InputList3Cue2032=Set Item 19 Icon Serial -InputList3SigType2032=Serial -InputList3Cue2033=Set Item 20 Icon Serial -InputList3SigType2033=Serial -InputList3Cue2034=Set Item 21 Icon Serial -InputList3SigType2034=Serial -InputList3Cue2035=Set Item 22 Icon Serial -InputList3SigType2035=Serial -InputList3Cue2036=Set Item 23 Icon Serial -InputList3SigType2036=Serial -InputList3Cue2037=Set Item 24 Icon Serial -InputList3SigType2037=Serial -InputList3Cue2038=Set Item 25 Icon Serial -InputList3SigType2038=Serial -InputList3Cue2039=Set Item 26 Icon Serial -InputList3SigType2039=Serial -InputList3Cue2040=Set Item 27 Icon Serial -InputList3SigType2040=Serial -InputList3Cue2041=Set Item 28 Icon Serial -InputList3SigType2041=Serial -InputList3Cue2042=Set Item 29 Icon Serial -InputList3SigType2042=Serial -InputList3Cue2043=Set Item 30 Icon Serial -InputList3SigType2043=Serial -InputList3Cue2044=[~UNUSED2~] -InputList3SigType2044=Digital|Analog|Serial|String -InputList3Cue4014=[~EndGroup~]Item Icons -InputList3SigType4014=Serial -OutputList3Cue1=[~UNUSED2~] -OutputList3SigType1=Serial -OutputList3Cue2=[~UNUSED2~] -OutputList3SigType2=Serial -OutputList3Cue3=[~UNUSED2~] -OutputList3SigType3=Serial -OutputList3Cue4=[~UNUSED2~] -OutputList3SigType4=Serial -OutputList3Cue5=[~UNUSED2~] -OutputList3SigType5=Serial -OutputList3Cue6=[~UNUSED2~] -OutputList3SigType6=Serial -OutputList3Cue7=[~UNUSED2~] -OutputList3SigType7=Serial -OutputList3Cue8=[~UNUSED2~] -OutputList3SigType8=Serial -OutputList3Cue9=[~UNUSED2~] -OutputList3SigType9=Serial -OutputList3Cue10=[~UNUSED2~] -OutputList3SigType10=Serial -OutputList3Cue11=[~BeginGroup~]Item Texts -OutputList3SigType11=Serial -OutputList3Cue12=[~UNUSED3~] -OutputList3SigType12=Serial -OutputList3Cue13=[~UNUSED3~] -OutputList3SigType13=Serial -OutputList3Cue14=[~UNUSED3~] -OutputList3SigType14=Serial -OutputList3Cue15=[~UNUSED3~] -OutputList3SigType15=Serial -OutputList3Cue16=[~UNUSED3~] -OutputList3SigType16=Serial -OutputList3Cue17=[~UNUSED3~] -OutputList3SigType17=Serial -OutputList3Cue18=[~UNUSED3~] -OutputList3SigType18=Serial -OutputList3Cue19=[~UNUSED3~] -OutputList3SigType19=Serial -OutputList3Cue20=[~UNUSED3~] -OutputList3SigType20=Serial -OutputList3Cue21=[~UNUSED3~] -OutputList3SigType21=Serial -OutputList3Cue22=[~UNUSED3~] -OutputList3SigType22=Serial -OutputList3Cue23=[~UNUSED3~] -OutputList3SigType23=Serial -OutputList3Cue24=[~UNUSED3~] -OutputList3SigType24=Serial -OutputList3Cue25=[~UNUSED3~] -OutputList3SigType25=Serial -OutputList3Cue26=[~UNUSED3~] -OutputList3SigType26=Serial -OutputList3Cue27=[~UNUSED3~] -OutputList3SigType27=Serial -OutputList3Cue28=[~UNUSED3~] -OutputList3SigType28=Serial -OutputList3Cue29=[~UNUSED3~] -OutputList3SigType29=Serial -OutputList3Cue30=[~UNUSED3~] -OutputList3SigType30=Serial -OutputList3Cue31=[~UNUSED3~] -OutputList3SigType31=Serial -OutputList3Cue32=[~UNUSED3~] -OutputList3SigType32=Serial -OutputList3Cue33=[~UNUSED3~] -OutputList3SigType33=Serial -OutputList3Cue34=[~UNUSED3~] -OutputList3SigType34=Serial -OutputList3Cue35=[~UNUSED3~] -OutputList3SigType35=Serial -OutputList3Cue36=[~UNUSED3~] -OutputList3SigType36=Serial -OutputList3Cue37=[~UNUSED3~] -OutputList3SigType37=Serial -OutputList3Cue38=[~UNUSED3~] -OutputList3SigType38=Serial -OutputList3Cue39=[~UNUSED3~] -OutputList3SigType39=Serial -OutputList3Cue40=[~UNUSED3~] -OutputList3SigType40=Serial -OutputList3Cue41=[~UNUSED3~] -OutputList3SigType41=Serial -OutputList3Cue42=[~UNUSED2~] -OutputList3SigType42=Digital|Analog|Serial|String -OutputList3Cue2012=[~EndGroup~]Item Texts -OutputList3SigType2012=Serial -OutputList3Cue2013=[~BeginGroup~]Item Icons -OutputList3SigType2013=Serial -OutputList3Cue2014=[~UNUSED3~] -OutputList3SigType2014=Serial -OutputList3Cue2015=[~UNUSED3~] -OutputList3SigType2015=Serial -OutputList3Cue2016=[~UNUSED3~] -OutputList3SigType2016=Serial -OutputList3Cue2017=[~UNUSED3~] -OutputList3SigType2017=Serial -OutputList3Cue2018=[~UNUSED3~] -OutputList3SigType2018=Serial -OutputList3Cue2019=[~UNUSED3~] -OutputList3SigType2019=Serial -OutputList3Cue2020=[~UNUSED3~] -OutputList3SigType2020=Serial -OutputList3Cue2021=[~UNUSED3~] -OutputList3SigType2021=Serial -OutputList3Cue2022=[~UNUSED3~] -OutputList3SigType2022=Serial -OutputList3Cue2023=[~UNUSED3~] -OutputList3SigType2023=Serial -OutputList3Cue2024=[~UNUSED3~] -OutputList3SigType2024=Serial -OutputList3Cue2025=[~UNUSED3~] -OutputList3SigType2025=Serial -OutputList3Cue2026=[~UNUSED3~] -OutputList3SigType2026=Serial -OutputList3Cue2027=[~UNUSED3~] -OutputList3SigType2027=Serial -OutputList3Cue2028=[~UNUSED3~] -OutputList3SigType2028=Serial -OutputList3Cue2029=[~UNUSED3~] -OutputList3SigType2029=Serial -OutputList3Cue2030=[~UNUSED3~] -OutputList3SigType2030=Serial -OutputList3Cue2031=[~UNUSED3~] -OutputList3SigType2031=Serial -OutputList3Cue2032=[~UNUSED3~] -OutputList3SigType2032=Serial -OutputList3Cue2033=[~UNUSED3~] -OutputList3SigType2033=Serial -OutputList3Cue2034=[~UNUSED3~] -OutputList3SigType2034=Serial -OutputList3Cue2035=[~UNUSED3~] -OutputList3SigType2035=Serial -OutputList3Cue2036=[~UNUSED3~] -OutputList3SigType2036=Serial -OutputList3Cue2037=[~UNUSED3~] -OutputList3SigType2037=Serial -OutputList3Cue2038=[~UNUSED3~] -OutputList3SigType2038=Serial -OutputList3Cue2039=[~UNUSED3~] -OutputList3SigType2039=Serial -OutputList3Cue2040=[~UNUSED3~] -OutputList3SigType2040=Serial -OutputList3Cue2041=[~UNUSED3~] -OutputList3SigType2041=Serial -OutputList3Cue2042=[~UNUSED3~] -OutputList3SigType2042=Serial -OutputList3Cue2043=[~UNUSED3~] -OutputList3SigType2043=Serial -OutputList3Cue2044=[~UNUSED2~] -OutputList3SigType2044=Digital|Analog|Serial|String -OutputList3Cue4014=[~EndGroup~]Item Icons -OutputList3SigType4014=Serial -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=19 -CedH=19 -SmartObjId=1203d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=19 -Tp=1 -HD=TRUE -DV=1203d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=19 -Name=PepperDash Essentials TSW-760_[D.VC] Recents_Dynamic Button List Vertical_2.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] diff --git a/PepperDashEssentials/PepperDashEssentials.csproj b/PepperDashEssentials/PepperDashEssentials.csproj deleted file mode 100644 index 8fe57b6f..00000000 --- a/PepperDashEssentials/PepperDashEssentials.csproj +++ /dev/null @@ -1,237 +0,0 @@ - - - Release - AnyCPU - 9.0.30729 - 2.0 - {1BED5BA9-88C4-4365-9362-6F4B128071D3} - Library - Properties - PepperDash.Essentials - PepperDashEssentials - {0B4745B0-194B-4BB6-8E21-E9057CA92230};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - WindowsCE - E2BECB1F-8C8C-41ba-B736-9BE7D946A398 - 5.0 - SmartDeviceProject1 - v3.5 - Windows CE - - - - - .allowedReferenceRelatedFileExtensions - true - full - false - bin\ - DEBUG;TRACE; - prompt - 4 - 512 - true - true - off - - - .allowedReferenceRelatedFileExtensions - none - true - bin\ - prompt - 4 - 512 - true - true - off - - - - False - ..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll - - - False - ..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll - - - False - ..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.EthernetCommunications.dll - - - False - ..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Fusion.dll - - - False - ..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Remotes.dll - - - False - ..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll - - - - False - ..\packages\PepperDashCore\lib\net35\PepperDash_Core.dll - - - False - ..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll - - - False - ..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll - - - False - ..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll - - - False - ..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe - - - False - ..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll - - - False - ..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpTimerEventInterface.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Always - - - Always - - - Always - - - Always - - - - Always - - - Always - - - Always - - - - - {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} - PepperDash_Essentials_Core - - - {892B761C-E479-44CE-BD74-243E9214AF13} - Essentials Devices Common - - - {9199CE8A-0C9F-4952-8672-3EED798B284F} - PepperDash_Essentials_DM - - - {E51D7C84-4906-486C-B2BA-EEB3B4E9731B} - PepperDash_Essentials_Interfaces - - - - - - - - - rem S# Pro preparation will execute after these operations - - \ No newline at end of file diff --git a/PepperDashEssentials/PluginLoading/PluginLoading.cs b/PepperDashEssentials/PluginLoading/PluginLoading.cs deleted file mode 100644 index 405241a3..00000000 --- a/PepperDashEssentials/PluginLoading/PluginLoading.cs +++ /dev/null @@ -1,491 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharp.CrestronIO; -using Crestron.SimplSharp.Reflection; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Plugins; - -namespace PepperDash.Essentials -{ - /// - /// Deals with loading plugins at runtime - /// - public static class PluginLoader - { - /// - /// The complete list of loaded assemblies. Includes Essentials Framework assemblies and plugins - /// - public static List LoadedAssemblies { get; private set; } - - /// - /// The list of assemblies loaded from the plugins folder - /// - static List LoadedPluginFolderAssemblies; - - /// - /// The directory to look in for .cplz plugin packages - /// - static string _pluginDirectory = Global.FilePathPrefix + "plugins"; - - /// - /// The directory where plugins will be moved to and loaded from - /// - static string _loadedPluginsDirectoryPath = _pluginDirectory + Global.DirectorySeparator + "loadedAssemblies"; - - // The temp directory where .cplz archives will be unzipped to - static string _tempDirectory = _pluginDirectory + Global.DirectorySeparator + "temp"; - - static PluginLoader() - { - LoadedAssemblies = new List(); - LoadedPluginFolderAssemblies = new List(); - } - - /// - /// Retrieves all the loaded assemblies from the program directory - /// - public static void AddProgramAssemblies() - { - Debug.Console(2, "Getting Assemblies loaded with Essentials"); - // Get the loaded assembly filenames - var appDi = new DirectoryInfo(Global.ApplicationDirectoryPathPrefix); - var assemblyFiles = appDi.GetFiles("*.dll"); - - Debug.Console(2, "Found {0} Assemblies", assemblyFiles.Length); - - foreach (var fi in assemblyFiles) - { - string version = string.Empty; - Assembly assembly = null; - - switch (fi.Name) - { - case ("PepperDashEssentials.dll"): - { - version = Global.AssemblyVersion; - assembly = Assembly.GetExecutingAssembly(); - break; - } - case ("PepperDashEssentialsBase.dll"): - { - - break; - } - case ("PepperDash_Core.dll"): - { - version = PepperDash.Core.Debug.PepperDashCoreVersion; - break; - } - } - - LoadedAssemblies.Add(new LoadedAssembly(fi.Name, version, assembly)); - } - - if (Debug.Level > 1) - { - Debug.Console(2, "Loaded Assemblies:"); - - foreach (var assembly in LoadedAssemblies) - { - Debug.Console(2, "Assembly: {0}", assembly.Name); - } - } - } - - /// - /// Loads an assembly via Reflection and adds it to the list of loaded assemblies - /// - /// - static LoadedAssembly LoadAssembly(string filePath) - { - Debug.Console(2, "Attempting to load {0}", filePath); - var assembly = Assembly.LoadFrom(filePath); - if (assembly != null) - { - var assyVersion = GetAssemblyVersion(assembly); - - var loadedAssembly = new LoadedAssembly(assembly.GetName().Name, assyVersion, assembly); - LoadedAssemblies.Add(loadedAssembly); - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loaded assembly '{0}', version {1}", loadedAssembly.Name, loadedAssembly.Version); - return loadedAssembly; - } - else - { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Unable to load assembly: '{0}'", filePath); - } - - return null; - - } - - /// - /// Attempts to get the assembly informational version and if not possible gets the version - /// - /// - /// - static string GetAssemblyVersion(Assembly assembly) - { - var ver = assembly.GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute), false); - if (ver != null && ver.Length > 0) - { - // Get the AssemblyInformationalVersion - AssemblyInformationalVersionAttribute verAttribute = ver[0] as AssemblyInformationalVersionAttribute; - return verAttribute.InformationalVersion; - } - else - { - // Get the AssemblyVersion - var version = assembly.GetName().Version; - var verStr = string.Format("{0}.{1}.{2}.{3}", version.Major, version.Minor, version.Build, version.Revision); - return verStr; - } - } - - /// - /// Checks if the filename matches an already loaded assembly file's name - /// - /// - /// True if file already matches loaded assembly file. - public static bool CheckIfAssemblyLoaded(string name) - { - Debug.Console(2, "Checking if assembly: {0} is loaded...", name); - var loadedAssembly = LoadedAssemblies.FirstOrDefault(s => s.Name.Equals(name)); - - if (loadedAssembly != null) - { - Debug.Console(2, "Assembly already loaded."); - return true; - } - else - { - Debug.Console(2, "Assembly not loaded."); - return false; - } - } - - /// - /// Used by console command to report the currently loaded assemblies and versions - /// - /// - public static void ReportAssemblyVersions(string command) - { - Debug.Console(0, "Loaded Assemblies:"); - foreach (var assembly in LoadedAssemblies) - { - Debug.Console(0, "{0} Version: {1}", assembly.Name, assembly.Version); - } - } - - /// - /// Moves any .dll assemblies not already loaded from the plugins folder to loadedPlugins folder - /// - static void MoveDllAssemblies() - { - Debug.Console(0, "Looking for .dll assemblies from plugins folder..."); - - var pluginDi = new DirectoryInfo(_pluginDirectory); - var pluginFiles = pluginDi.GetFiles("*.dll"); - - if (pluginFiles.Length > 0) - { - if (!Directory.Exists(_loadedPluginsDirectoryPath)) - { - Directory.CreateDirectory(_loadedPluginsDirectoryPath); - } - } - - foreach (var pluginFile in pluginFiles) - { - try - { - Debug.Console(0, "Found .dll: {0}", pluginFile.Name); - - if (!CheckIfAssemblyLoaded(pluginFile.Name)) - { - string filePath = string.Empty; - - filePath = _loadedPluginsDirectoryPath + Global.DirectorySeparator + pluginFile.Name; - - // Check if there is a previous file in the loadedPlugins directory and delete - if (File.Exists(filePath)) - { - Debug.Console(0, "Found existing file in loadedPlugins: {0} Deleting and moving new file to replace it", filePath); - File.Delete(filePath); - } - - // Move the file - File.Move(pluginFile.FullName, filePath); - Debug.Console(2, "Moved {0} to {1}", pluginFile.FullName, filePath); - } - else - { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Skipping assembly: {0}. There is already an assembly with that name loaded.", pluginFile.FullName); - } - } - catch (Exception e) - { - Debug.Console(2, "Error with plugin file {0} . Exception: {1}", pluginFile.FullName, e); - continue; //catching any load issues and continuing. There will be exceptions loading Crestron .dlls from the cplz Probably should do something different here - } - } - - Debug.Console(0, "Done with .dll assemblies"); - } - - /// - /// Unzips each .cplz archive into the temp directory and moves any unloaded files into loadedPlugins - /// - static void UnzipAndMoveCplzArchives() - { - Debug.Console(0, "Looking for .cplz archives from plugins folder..."); - var di = new DirectoryInfo(_pluginDirectory); - var zFiles = di.GetFiles("*.cplz"); - - if (zFiles.Length > 0) - { - if (!Directory.Exists(_loadedPluginsDirectoryPath)) - { - Directory.CreateDirectory(_loadedPluginsDirectoryPath); - } - } - - foreach (var zfi in zFiles) - { - Directory.CreateDirectory(_tempDirectory); - var tempDi = new DirectoryInfo(_tempDirectory); - - Debug.Console(0, "Found cplz: {0}. Unzipping into temp plugins directory", zfi.Name); - var result = CrestronZIP.Unzip(zfi.FullName, tempDi.FullName); - Debug.Console(0, "UnZip Result: {0}", result.ToString()); - - var tempFiles = tempDi.GetFiles("*.dll"); - foreach (var tempFile in tempFiles) - { - try - { - if (!CheckIfAssemblyLoaded(tempFile.Name)) - { - string filePath = string.Empty; - - filePath = _loadedPluginsDirectoryPath + Global.DirectorySeparator + tempFile.Name; - - // Check if there is a previous file in the loadedPlugins directory and delete - if (File.Exists(filePath)) - { - Debug.Console(0, "Found existing file in loadedPlugins: {0} Deleting and moving new file to replace it", filePath); - File.Delete(filePath); - } - - // Move the file - File.Move(tempFile.FullName, filePath); - Debug.Console(2, "Moved {0} to {1}", tempFile.FullName, filePath); - } - else - { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Skipping assembly: {0}. There is already an assembly with that name loaded.", tempFile.FullName); - } - } - catch (Exception e) - { - Debug.Console(2, "Assembly {0} is not a custom assembly. Exception: {1}", tempFile.FullName, e); - continue; //catching any load issues and continuing. There will be exceptions loading Crestron .dlls from the cplz Probably should do something different here - } - } - - // Delete the .cplz and the temp directory - Directory.Delete(_tempDirectory, true); - zfi.Delete(); - } - - Debug.Console(0, "Done with .cplz archives"); - } - - /// - /// Attempts to load the assemblies from the loadedPlugins folder - /// - static void LoadPluginAssemblies() - { - Debug.Console(0, "Loading assemblies from loadedPlugins folder..."); - var pluginDi = new DirectoryInfo(_loadedPluginsDirectoryPath); - var pluginFiles = pluginDi.GetFiles("*.dll"); - - Debug.Console(2, "Found {0} plugin assemblies to load", pluginFiles.Length); - - foreach (var pluginFile in pluginFiles) - { - var loadedAssembly = LoadAssembly(pluginFile.FullName); - - LoadedPluginFolderAssemblies.Add(loadedAssembly); - } - - Debug.Console(0, "All Plugins Loaded."); - } - - /// - /// Iterate the loaded assemblies and try to call the LoadPlugin method - /// - static void LoadCustomPluginTypes() - { - Debug.Console(0, "Loading Custom Plugin Types..."); - foreach (var loadedAssembly in LoadedPluginFolderAssemblies) - { - // iteratate this assembly's classes, looking for "LoadPlugin()" methods - try - { - var assy = loadedAssembly.Assembly; - var types = assy.GetTypes(); - foreach (var type in types) - { - try - { - if (typeof(IPluginDeviceFactory).IsAssignableFrom(type)) - { - var plugin = (IPluginDeviceFactory)Crestron.SimplSharp.Reflection.Activator.CreateInstance(type); - LoadCustomPlugin(plugin, loadedAssembly); - } - else - { - var methods = type.GetMethods(BindingFlags.Public | BindingFlags.Static); - var loadPlugin = methods.FirstOrDefault(m => m.Name.Equals("LoadPlugin")); - if (loadPlugin != null) - { - LoadCustomLegacyPlugin(type, loadPlugin, loadedAssembly); - } - } - } - catch (Exception e) - { - Debug.Console(2, "Load Plugin not found. {0} is not a plugin assembly. Exception: {1}", loadedAssembly.Name, e); - continue; - } - - } - } - catch (Exception e) - { - Debug.Console(2, "Error Loading Assembly: {0} Exception: (1) ", loadedAssembly.Name, e); - continue; - } - } - // plugin dll will be loaded. Any classes in plugin should have a static constructor - // that registers that class with the Core.DeviceFactory - Debug.Console(0, "Done Loading Custom Plugin Types."); - } - - /// - /// Loads a - /// - /// - static void LoadCustomPlugin(IPluginDeviceFactory plugin, LoadedAssembly loadedAssembly) - { - var passed = Global.IsRunningMinimumVersionOrHigher(plugin.MinimumEssentialsFrameworkVersion); - - if (!passed) - { - Debug.Console(0, Debug.ErrorLogLevel.Error, "Plugin indicates minimum Essentials version {0}. Dependency check failed. Skipping Plugin", plugin.MinimumEssentialsFrameworkVersion); - return; - } - else - { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Passed plugin passed dependency check (required version {0})", plugin.MinimumEssentialsFrameworkVersion); - } - - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loading plugin: {0}", loadedAssembly.Name); - plugin.LoadTypeFactories(); - } - - /// - /// Loads a a custom plugin via the legacy method - /// - /// - /// - static void LoadCustomLegacyPlugin(CType type, MethodInfo loadPlugin, LoadedAssembly loadedAssembly) - { - Debug.Console(2, "LoadPlugin method found in {0}", type.Name); - - var fields = type.GetFields(BindingFlags.Public | BindingFlags.Static); - - var minimumVersion = fields.FirstOrDefault(p => p.Name.Equals("MinimumEssentialsFrameworkVersion")); - if (minimumVersion != null) - { - Debug.Console(2, "MinimumEssentialsFrameworkVersion found"); - - var minimumVersionString = minimumVersion.GetValue(null) as string; - - if (!string.IsNullOrEmpty(minimumVersionString)) - { - var passed = Global.IsRunningMinimumVersionOrHigher(minimumVersionString); - - if (!passed) - { - Debug.Console(0, Debug.ErrorLogLevel.Error, "Plugin indicates minimum Essentials version {0}. Dependency check failed. Skipping Plugin", minimumVersionString); - return; - } - else - { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Passed plugin passed dependency check (required version {0})", minimumVersionString); - } - } - else - { - Debug.Console(0, Debug.ErrorLogLevel.Warning, "MinimumEssentialsFrameworkVersion found but not set. Loading plugin, but your mileage may vary."); - } - } - else - { - Debug.Console(0, Debug.ErrorLogLevel.Warning, "MinimumEssentialsFrameworkVersion not found. Loading plugin, but your mileage may vary."); - } - - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loading legacy plugin: {0}", loadedAssembly.Name); - loadPlugin.Invoke(null, null); - - } - - /// - /// Loads plugins - /// - public static void LoadPlugins() - { - if (Directory.Exists(_pluginDirectory)) - { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Plugins directory found, checking for plugins"); - - // Deal with any .dll files - MoveDllAssemblies(); - - // Deal with any .cplz files - UnzipAndMoveCplzArchives(); - - if(Directory.Exists(_loadedPluginsDirectoryPath)) { - // Load the assemblies from the loadedPlugins folder into the AppDomain - LoadPluginAssemblies(); - - // Load the types from any custom plugin assemblies - LoadCustomPluginTypes(); - } - } - } - } - - /// - /// Represents an assembly loaded at runtime and it's associated metadata - /// - public class LoadedAssembly - { - public string Name { get; private set; } - public string Version { get; private set; } - public Assembly Assembly { get; private set; } - - public LoadedAssembly(string name, string version, Assembly assembly) - { - Name = name; - Version = version; - Assembly = assembly; - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Properties/AssemblyInfo.cs b/PepperDashEssentials/Properties/AssemblyInfo.cs deleted file mode 100644 index 36e6828b..00000000 --- a/PepperDashEssentials/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Reflection; -using Crestron.SimplSharp.Reflection; - -[assembly: System.Reflection.AssemblyTitle("PepperDashEssentials")] -[assembly: System.Reflection.AssemblyCompany("PepperDash Technology Corp")] -[assembly: System.Reflection.AssemblyProduct("PepperDashEssentials")] -[assembly: System.Reflection.AssemblyCopyright("Copyright © PepperDash Technology Corp 2020")] -[assembly: System.Reflection.AssemblyVersion("0.0.0.*")] -[assembly: System.Reflection.AssemblyInformationalVersion("0.0.0-buildType-buildNumber")] -[assembly: Crestron.SimplSharp.Reflection.AssemblyInformationalVersion("0.0.0-buildType-buildNumber")] diff --git a/PepperDashEssentials/Properties/AssemblyInfo.cs.orig b/PepperDashEssentials/Properties/AssemblyInfo.cs.orig deleted file mode 100644 index 1ae0e5a2..00000000 --- a/PepperDashEssentials/Properties/AssemblyInfo.cs.orig +++ /dev/null @@ -1,12 +0,0 @@ -using System.Reflection; - -[assembly: AssemblyTitle("PepperDashEssentials")] -[assembly: AssemblyCompany("PepperDash Technology Corp")] -[assembly: AssemblyProduct("PepperDashEssentials")] -[assembly: AssemblyCopyright("Copyright © PepperDash Technology Corp 2017")] -<<<<<<< HEAD -[assembly: AssemblyVersion("1.1.8.*")] -======= -[assembly: AssemblyVersion("1.3.0.*")] - ->>>>>>> feature/ecs-684 diff --git a/PepperDashEssentials/Room/Types/EssentialsHuddleSpaceRoom.cs.orig b/PepperDashEssentials/Room/Types/EssentialsHuddleSpaceRoom.cs.orig deleted file mode 100644 index 7c4e6c5d..00000000 --- a/PepperDashEssentials/Room/Types/EssentialsHuddleSpaceRoom.cs.orig +++ /dev/null @@ -1,850 +0,0 @@ -<<<<<<< HEAD -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Room.Config; - -namespace PepperDash.Essentials -{ - public class EssentialsHuddleSpaceRoom : EssentialsRoomBase, IHasCurrentSourceInfoChange - { - public event EventHandler CurrentVolumeDeviceChange; - public event SourceInfoChangeHandler CurrentSingleSourceChange; - - protected override Func OnFeedbackFunc - { - get - { - return () => - { - var disp = DefaultDisplay as DisplayBase; - var val = CurrentSourceInfo != null - && CurrentSourceInfo.Type == eSourceListItemType.Route - && disp != null - && disp.PowerIsOnFeedback.BoolValue; - return val; - }; - } - } - /// - /// - /// - protected override Func IsWarmingFeedbackFunc - { - get - { - return () => - { - var disp = DefaultDisplay as DisplayBase; - if (disp != null) - return disp.IsWarmingUpFeedback.BoolValue; - else - return false; - }; - } - } - /// - /// - /// - protected override Func IsCoolingFeedbackFunc - { - get - { - return () => - { - var disp = DefaultDisplay as DisplayBase; - if (disp != null) - return disp.IsCoolingDownFeedback.BoolValue; - else - return false; - }; - } - } - - public EssentialsRoomPropertiesConfig Config { get; private set; } - - public IRoutingSinkWithSwitching DefaultDisplay { get; private set; } - public IRoutingSinkNoSwitching DefaultAudioDevice { get; private set; } - public IBasicVolumeControls DefaultVolumeControls { get; private set; } - - public bool ExcludeFromGlobalFunctions { get; set; } - - /// - /// The config name of the source list - /// - public string SourceListKey { get; set; } - - public string DefaultSourceItem { get; set; } - - public ushort DefaultVolume { get; set; } - - /// - /// If room is off, enables power on to last source. Default true - /// - public bool EnablePowerOnToLastSource { get; set; } - string LastSourceKey; - - /// - /// - /// - public IBasicVolumeControls CurrentVolumeControls - { - get { return _CurrentAudioDevice; } - set - { - if (value == _CurrentAudioDevice) return; - - var oldDev = _CurrentAudioDevice; - // derigister this room from the device, if it can - if (oldDev is IInUseTracking) - (oldDev as IInUseTracking).InUseTracker.RemoveUser(this, "audio"); - var handler = CurrentVolumeDeviceChange; - if (handler != null) - CurrentVolumeDeviceChange(this, new VolumeDeviceChangeEventArgs(oldDev, value, ChangeType.WillChange)); - _CurrentAudioDevice = value; - if (handler != null) - CurrentVolumeDeviceChange(this, new VolumeDeviceChangeEventArgs(oldDev, value, ChangeType.DidChange)); - // register this room with new device, if it can - if (_CurrentAudioDevice is IInUseTracking) - (_CurrentAudioDevice as IInUseTracking).InUseTracker.AddUser(this, "audio"); - } - } - IBasicVolumeControls _CurrentAudioDevice; - - /// - /// The SourceListItem last run - containing names and icons - /// - public SourceListItem CurrentSourceInfo - { - get { return _CurrentSourceInfo; } - private set - { - if (value == _CurrentSourceInfo) return; - - var handler = CurrentSingleSourceChange; - // remove from in-use tracker, if so equipped - if(_CurrentSourceInfo != null && _CurrentSourceInfo.SourceDevice is IInUseTracking) - (_CurrentSourceInfo.SourceDevice as IInUseTracking).InUseTracker.RemoveUser(this, "control"); - - if (handler != null) - handler(this, _CurrentSourceInfo, ChangeType.WillChange); - - _CurrentSourceInfo = value; - - // add to in-use tracking - if (_CurrentSourceInfo != null && _CurrentSourceInfo.SourceDevice is IInUseTracking) - (_CurrentSourceInfo.SourceDevice as IInUseTracking).InUseTracker.AddUser(this, "control"); - if (handler != null) - handler(this, _CurrentSourceInfo, ChangeType.DidChange); - } - } - SourceListItem _CurrentSourceInfo; - - public string CurrentSourceInfoKey { get; private set; } - - /// - /// - /// - /// - /// - public EssentialsHuddleSpaceRoom(string key, string name, IRoutingSinkWithSwitching defaultDisplay, - IRoutingSinkNoSwitching defaultAudio, EssentialsRoomPropertiesConfig config) - : base(key, name) - { - Config = config; - DefaultDisplay = defaultDisplay; - DefaultAudioDevice = defaultAudio; - if (defaultAudio is IBasicVolumeControls) - DefaultVolumeControls = defaultAudio as IBasicVolumeControls; - else if (defaultAudio is IHasVolumeDevice) - DefaultVolumeControls = (defaultAudio as IHasVolumeDevice).VolumeDevice; - CurrentVolumeControls = DefaultVolumeControls; - - var disp = DefaultDisplay as DisplayBase; - if (disp != null) - { - // Link power, warming, cooling to display - disp.PowerIsOnFeedback.OutputChange += (o, a) => - { - if (disp.PowerIsOnFeedback.BoolValue != OnFeedback.BoolValue) - { - if (!disp.PowerIsOnFeedback.BoolValue) - CurrentSourceInfo = null; - OnFeedback.FireUpdate(); - } - }; - - disp.IsWarmingUpFeedback.OutputChange += (o, a) => - { - IsWarmingUpFeedback.FireUpdate(); - if (!IsWarmingUpFeedback.BoolValue) - (DefaultDisplay as IBasicVolumeWithFeedback).SetVolume(DefaultVolume); - }; - disp.IsCoolingDownFeedback.OutputChange += (o, a) => - { - IsCoolingDownFeedback.FireUpdate(); - if (IsCoolingDownFeedback.BoolValue) - (DefaultDisplay as IBasicVolumeWithFeedback).SetVolume(DefaultVolume); - }; - } - - SourceListKey = "default"; - EnablePowerOnToLastSource = true; - } - - - /// - /// - /// - public override void Shutdown() - { - RunRouteAction("roomOff"); - } - - /// - /// Routes the default source item, if any - /// - public void RunDefaultRoute() - { - if (DefaultSourceItem != null) - RunRouteAction(DefaultSourceItem); - } - - /// - /// - /// - /// - public void RunRouteAction(string routeKey) - { - RunRouteAction(routeKey, null); - } - - /// - /// Gets a source from config list SourceListKey and dynamically build and executes the - /// route or commands - /// - /// - public void RunRouteAction(string routeKey, Action successCallback) - { - // Run this on a separate thread - new CTimer(o => - { - Debug.Console(1, this, "Run route action '{0}'", routeKey); - var dict = ConfigReader.ConfigObject.GetSourceListForKey(SourceListKey); - if(dict == null) - { - Debug.Console(1, this, "WARNING: Config source list '{0}' not found", SourceListKey); - return; - } - - // Try to get the list item by it's string key - if (!dict.ContainsKey(routeKey)) - { - Debug.Console(1, this, "WARNING: No item '{0}' found on config list '{1}'", - routeKey, SourceListKey); - return; - } - - var item = dict[routeKey]; - //Debug.Console(2, this, "Action {0} has {1} steps", - // item.SourceKey, item.RouteList.Count); - - // End usage timer on last source - if (!string.IsNullOrEmpty(LastSourceKey)) - { - var lastSource = dict[LastSourceKey].SourceDevice; - - try - { - if (lastSource != null && lastSource is IUsageTracking) - (lastSource as IUsageTracking).UsageTracker.EndDeviceUsage(); - } - catch (Exception e) - { - Debug.Console(1, this, "*#* EXCEPTION in end usage tracking (257):\r{0}", e); - } - } - - // Let's run it - if (routeKey.ToLower() != "roomoff") - { - LastSourceKey = routeKey; - } - else - { - CurrentSourceInfoKey = null; - } - - foreach (var route in item.RouteList) - { - // if there is a $defaultAll on route, run two separate - if (route.DestinationKey.Equals("$defaultAll", StringComparison.OrdinalIgnoreCase)) - { - // Going to assume a single-path route for now - var tempVideo = new SourceRouteListItem - { - DestinationKey = "$defaultDisplay", - SourceKey = route.SourceKey, - Type = eRoutingSignalType.Video - }; - DoRoute(tempVideo); - - //var tempAudio = new SourceRouteListItem - //{ - // DestinationKey = "$defaultAudio", - // SourceKey = route.SourceKey, - // Type = eRoutingSignalType.Audio - //}; - //DoRoute(tempAudio); - //continue; -- not sure why this was here - } - else - DoRoute(route); - } - - // Start usage timer on routed source - if (item.SourceDevice is IUsageTracking) - { - (item.SourceDevice as IUsageTracking).UsageTracker.StartDeviceUsage(); - } - - - // Set volume control on room, using default if non provided - IBasicVolumeControls volDev = null; - // Handle special cases for volume control - if (string.IsNullOrEmpty(item.VolumeControlKey) - || item.VolumeControlKey.Equals("$defaultAudio", StringComparison.OrdinalIgnoreCase)) - volDev = DefaultVolumeControls; - else if (item.VolumeControlKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase)) - volDev = DefaultDisplay as IBasicVolumeControls; - // Or a specific device, probably rarely used. - else - { - var dev = DeviceManager.GetDeviceForKey(item.VolumeControlKey); - if (dev is IBasicVolumeControls) - volDev = dev as IBasicVolumeControls; - else if (dev is IHasVolumeDevice) - volDev = (dev as IHasVolumeDevice).VolumeDevice; - } - CurrentVolumeControls = volDev; - - // store the name and UI info for routes - if (item.SourceKey == "$off") - { - CurrentSourceInfoKey = routeKey; - CurrentSourceInfo = null; - } - else if (item.SourceKey != null) - { - CurrentSourceInfoKey = routeKey; - CurrentSourceInfo = item; - } - // And finally, set the "control". This will trigger event - //CurrentControlDevice = DeviceManager.GetDeviceForKey(item.SourceKey) as Device; - - OnFeedback.FireUpdate(); - - // report back when done - if (successCallback != null) - successCallback(); - - }, 0); // end of CTimer - } - - /// - /// Will power the room on with the last-used source - /// - public void PowerOnToDefaultOrLastSource() - { - if (!EnablePowerOnToLastSource || LastSourceKey == null) - return; - RunRouteAction(LastSourceKey); - } - - /// - /// Does what it says - /// - public override void SetDefaultLevels() - { - Debug.Console(0, this, "SetDefaultLevels not implemented"); - } - - /// - /// - /// - /// - /// - bool DoRoute(SourceRouteListItem route) - { - IRoutingSinkNoSwitching dest = null; - - if (route.DestinationKey.Equals("$defaultaudio", StringComparison.OrdinalIgnoreCase)) - dest = DefaultAudioDevice; - else if (route.DestinationKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase)) - dest = DefaultDisplay; - else - dest = DeviceManager.GetDeviceForKey(route.DestinationKey) as IRoutingSinkNoSwitching; - - if (dest == null) - { - Debug.Console(1, this, "Cannot route, unknown destination '{0}'", route.DestinationKey); - return false; - } - - if (route.SourceKey.Equals("$off", StringComparison.OrdinalIgnoreCase)) - { - dest.ReleaseRoute(); - if (dest is IPower) - (dest as IPower).PowerOff(); - } - else - { - var source = DeviceManager.GetDeviceForKey(route.SourceKey) as IRoutingOutputs; - if (source == null) - { - Debug.Console(1, this, "Cannot route unknown source '{0}' to {1}", route.SourceKey, route.DestinationKey); - return false; - } - dest.ReleaseAndMakeRoute(source, route.Type); - } - return true; -======= -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Room.Config; - -namespace PepperDash.Essentials -{ - public class EssentialsHuddleSpaceRoom : EssentialsRoomBase, IHasCurrentSourceInfoChange - { - public event EventHandler CurrentVolumeDeviceChange; - public event SourceInfoChangeHandler CurrentSingleSourceChange; - - protected override Func OnFeedbackFunc - { - get - { - return () => - { - var disp = DefaultDisplay as DisplayBase; - var val = CurrentSourceInfo != null - && CurrentSourceInfo.Type == eSourceListItemType.Route - && disp != null - && disp.PowerIsOnFeedback.BoolValue; - return val; - }; - } - } - /// - /// - /// - protected override Func IsWarmingFeedbackFunc - { - get - { - return () => - { - var disp = DefaultDisplay as DisplayBase; - if (disp != null) - return disp.IsWarmingUpFeedback.BoolValue; - else - return false; - }; - } - } - /// - /// - /// - protected override Func IsCoolingFeedbackFunc - { - get - { - return () => - { - var disp = DefaultDisplay as DisplayBase; - if (disp != null) - return disp.IsCoolingDownFeedback.BoolValue; - else - return false; - }; - } - } - - public EssentialsRoomPropertiesConfig Config { get; private set; } - - public IRoutingSinkWithSwitching DefaultDisplay { get; private set; } - public IRoutingSinkNoSwitching DefaultAudioDevice { get; private set; } - public IBasicVolumeControls DefaultVolumeControls { get; private set; } - - public bool ExcludeFromGlobalFunctions { get; set; } - - /// - /// The config name of the source list - /// - public string SourceListKey { get; set; } - - public string DefaultSourceItem { get; set; } - - public ushort DefaultVolume { get; set; } - - /// - /// If room is off, enables power on to last source. Default true - /// - public bool EnablePowerOnToLastSource { get; set; } - string LastSourceKey; - - /// - /// - /// - public IBasicVolumeControls CurrentVolumeControls - { - get { return _CurrentAudioDevice; } - set - { - if (value == _CurrentAudioDevice) return; - - var oldDev = _CurrentAudioDevice; - // derigister this room from the device, if it can - if (oldDev is IInUseTracking) - (oldDev as IInUseTracking).InUseTracker.RemoveUser(this, "audio"); - var handler = CurrentVolumeDeviceChange; - if (handler != null) - CurrentVolumeDeviceChange(this, new VolumeDeviceChangeEventArgs(oldDev, value, ChangeType.WillChange)); - _CurrentAudioDevice = value; - if (handler != null) - CurrentVolumeDeviceChange(this, new VolumeDeviceChangeEventArgs(oldDev, value, ChangeType.DidChange)); - // register this room with new device, if it can - if (_CurrentAudioDevice is IInUseTracking) - (_CurrentAudioDevice as IInUseTracking).InUseTracker.AddUser(this, "audio"); - } - } - IBasicVolumeControls _CurrentAudioDevice; - - /// - /// The SourceListItem last run - containing names and icons - /// - public SourceListItem CurrentSourceInfo - { - get { return _CurrentSourceInfo; } - private set - { - if (value == _CurrentSourceInfo) return; - - var handler = CurrentSingleSourceChange; - // remove from in-use tracker, if so equipped - if(_CurrentSourceInfo != null && _CurrentSourceInfo.SourceDevice is IInUseTracking) - (_CurrentSourceInfo.SourceDevice as IInUseTracking).InUseTracker.RemoveUser(this, "control"); - - if (handler != null) - handler(this, _CurrentSourceInfo, ChangeType.WillChange); - - _CurrentSourceInfo = value; - - // add to in-use tracking - if (_CurrentSourceInfo != null && _CurrentSourceInfo.SourceDevice is IInUseTracking) - (_CurrentSourceInfo.SourceDevice as IInUseTracking).InUseTracker.AddUser(this, "control"); - if (handler != null) - handler(this, _CurrentSourceInfo, ChangeType.DidChange); - } - } - SourceListItem _CurrentSourceInfo; - - public string CurrentSourceInfoKey { get; private set; } - - /// - /// - /// - /// - /// - public EssentialsHuddleSpaceRoom(string key, string name, IRoutingSinkWithSwitching defaultDisplay, - IRoutingSinkNoSwitching defaultAudio, EssentialsRoomPropertiesConfig config) - : base(key, name) - { - Config = config; - DefaultDisplay = defaultDisplay; - DefaultAudioDevice = defaultAudio; - if (defaultAudio is IBasicVolumeControls) - DefaultVolumeControls = defaultAudio as IBasicVolumeControls; - else if (defaultAudio is IHasVolumeDevice) - DefaultVolumeControls = (defaultAudio as IHasVolumeDevice).VolumeDevice; - CurrentVolumeControls = DefaultVolumeControls; - - var disp = DefaultDisplay as DisplayBase; - if (disp != null) - { - // Link power, warming, cooling to display - disp.PowerIsOnFeedback.OutputChange += (o, a) => - { - if (disp.PowerIsOnFeedback.BoolValue != OnFeedback.BoolValue) - { - if (!disp.PowerIsOnFeedback.BoolValue) - CurrentSourceInfo = null; - OnFeedback.FireUpdate(); - } - }; - - disp.IsWarmingUpFeedback.OutputChange += (o, a) => - { - IsWarmingUpFeedback.FireUpdate(); - if (!IsWarmingUpFeedback.BoolValue) - (DefaultDisplay as IBasicVolumeWithFeedback).SetVolume(DefaultVolume); - }; - disp.IsCoolingDownFeedback.OutputChange += (o, a) => - { - IsCoolingDownFeedback.FireUpdate(); - if (IsCoolingDownFeedback.BoolValue) - (DefaultDisplay as IBasicVolumeWithFeedback).SetVolume(DefaultVolume); - }; - } - - SourceListKey = "default"; - EnablePowerOnToLastSource = true; - } - - - /// - /// - /// - protected override void EndShutdown() - { - RunRouteAction("roomOff"); - } - - /// - /// Routes the default source item, if any - /// - public void RunDefaultRoute() - { - if (DefaultSourceItem != null) - RunRouteAction(DefaultSourceItem); - } - - /// - /// - /// - /// - public void RunRouteAction(string routeKey) - { - RunRouteAction(routeKey, null); - } - - /// - /// Gets a source from config list SourceListKey and dynamically build and executes the - /// route or commands - /// - /// - public void RunRouteAction(string routeKey, Action successCallback) - { - // Run this on a separate thread - new CTimer(o => - { - Debug.Console(1, this, "Run route action '{0}'", routeKey); - var dict = ConfigReader.ConfigObject.GetSourceListForKey(SourceListKey); - if(dict == null) - { - Debug.Console(1, this, "WARNING: Config source list '{0}' not found", SourceListKey); - return; - } - - // Try to get the list item by it's string key - if (!dict.ContainsKey(routeKey)) - { - Debug.Console(1, this, "WARNING: No item '{0}' found on config list '{1}'", - routeKey, SourceListKey); - return; - } - - var item = dict[routeKey]; - //Debug.Console(2, this, "Action {0} has {1} steps", - // item.SourceKey, item.RouteList.Count); - - // End usage timer on last source - if (!string.IsNullOrEmpty(LastSourceKey)) - { - var lastSource = dict[LastSourceKey].SourceDevice; - - try - { - if (lastSource != null && lastSource is IUsageTracking) - (lastSource as IUsageTracking).UsageTracker.EndDeviceUsage(); - } - catch (Exception e) - { - Debug.Console(1, this, "*#* EXCEPTION in end usage tracking (257):\r{0}", e); - } - } - - // Let's run it - if (routeKey.ToLower() != "roomoff") - { - LastSourceKey = routeKey; - } - else - { - CurrentSourceInfoKey = null; - } - - foreach (var route in item.RouteList) - { - // if there is a $defaultAll on route, run two separate - if (route.DestinationKey.Equals("$defaultAll", StringComparison.OrdinalIgnoreCase)) - { - // Going to assume a single-path route for now - var tempVideo = new SourceRouteListItem - { - DestinationKey = "$defaultDisplay", - SourceKey = route.SourceKey, - Type = eRoutingSignalType.Video - }; - DoRoute(tempVideo); - - //var tempAudio = new SourceRouteListItem - //{ - // DestinationKey = "$defaultAudio", - // SourceKey = route.SourceKey, - // Type = eRoutingSignalType.Audio - //}; - //DoRoute(tempAudio); - //continue; -- not sure why this was here - } - else - DoRoute(route); - } - - // Start usage timer on routed source - if (item.SourceDevice is IUsageTracking) - { - (item.SourceDevice as IUsageTracking).UsageTracker.StartDeviceUsage(); - } - - - // Set volume control on room, using default if non provided - IBasicVolumeControls volDev = null; - // Handle special cases for volume control - if (string.IsNullOrEmpty(item.VolumeControlKey) - || item.VolumeControlKey.Equals("$defaultAudio", StringComparison.OrdinalIgnoreCase)) - volDev = DefaultVolumeControls; - else if (item.VolumeControlKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase)) - volDev = DefaultDisplay as IBasicVolumeControls; - // Or a specific device, probably rarely used. - else - { - var dev = DeviceManager.GetDeviceForKey(item.VolumeControlKey); - if (dev is IBasicVolumeControls) - volDev = dev as IBasicVolumeControls; - else if (dev is IHasVolumeDevice) - volDev = (dev as IHasVolumeDevice).VolumeDevice; - } - CurrentVolumeControls = volDev; - - // store the name and UI info for routes - if (item.SourceKey == "$off") - { - CurrentSourceInfoKey = routeKey; - CurrentSourceInfo = null; - } - else if (item.SourceKey != null) - { - CurrentSourceInfoKey = routeKey; - CurrentSourceInfo = item; - } - // And finally, set the "control". This will trigger event - //CurrentControlDevice = DeviceManager.GetDeviceForKey(item.SourceKey) as Device; - - OnFeedback.FireUpdate(); - - // report back when done - if (successCallback != null) - successCallback(); - - }, 0); // end of CTimer - } - - /// - /// Will power the room on with the last-used source - /// - public void PowerOnToDefaultOrLastSource() - { - if (!EnablePowerOnToLastSource || LastSourceKey == null) - return; - RunRouteAction(LastSourceKey); - } - - /// - /// Does what it says - /// - public override void SetDefaultLevels() - { - Debug.Console(0, this, "SetDefaultLevels not implemented"); - } - - /// - /// - /// - /// - /// - bool DoRoute(SourceRouteListItem route) - { - IRoutingSinkNoSwitching dest = null; - - if (route.DestinationKey.Equals("$defaultaudio", StringComparison.OrdinalIgnoreCase)) - dest = DefaultAudioDevice; - else if (route.DestinationKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase)) - dest = DefaultDisplay; - else - dest = DeviceManager.GetDeviceForKey(route.DestinationKey) as IRoutingSinkNoSwitching; - - if (dest == null) - { - Debug.Console(1, this, "Cannot route, unknown destination '{0}'", route.DestinationKey); - return false; - } - - if (route.SourceKey.Equals("$off", StringComparison.OrdinalIgnoreCase)) - { - dest.ReleaseRoute(); - if (dest is IPower) - (dest as IPower).PowerOff(); - } - else - { - var source = DeviceManager.GetDeviceForKey(route.SourceKey) as IRoutingOutputs; - if (source == null) - { - Debug.Console(1, this, "Cannot route unknown source '{0}' to {1}", route.SourceKey, route.DestinationKey); - return false; - } - dest.ReleaseAndMakeRoute(source, route.Type); - } - return true; ->>>>>>> origin/feature/ecs-342 - } - - public override void RoomVacatedForTimeoutPeriod(object o) - { - //Implement this - } - - /// - /// Runs "roomOff" action on all rooms not set to ExcludeFromGlobalFunctions - /// - public static void AllRoomsOff() - { - var allRooms = DeviceManager.AllDevices.Where(d => - d is EssentialsHuddleSpaceRoom && !(d as EssentialsHuddleSpaceRoom).ExcludeFromGlobalFunctions); - foreach (var room in allRooms) - (room as EssentialsHuddleSpaceRoom).RunRouteAction("roomOff"); - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Room/Types/EssentialsHuddleVtc1Room.cs.orig b/PepperDashEssentials/Room/Types/EssentialsHuddleVtc1Room.cs.orig deleted file mode 100644 index f1b4b983..00000000 --- a/PepperDashEssentials/Room/Types/EssentialsHuddleVtc1Room.cs.orig +++ /dev/null @@ -1,967 +0,0 @@ -<<<<<<< HEAD -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Room.Config; -using PepperDash.Essentials.Devices.Common.Codec; -using PepperDash.Essentials.Devices.Common.VideoCodec; - -namespace PepperDash.Essentials -{ - public class EssentialsHuddleVtc1Room : EssentialsRoomBase, IHasCurrentSourceInfoChange, IPrivacy - { - public event EventHandler CurrentVolumeDeviceChange; - public event SourceInfoChangeHandler CurrentSingleSourceChange; - - - //************************ - // Call-related stuff - - public BoolFeedback InCallFeedback { get; private set; } - - /// - /// Make this more specific - /// - public List ActiveCalls { get; private set; } - - /// - /// States: 0 for on hook, 1 for video, 2 for audio, 3 for telekenesis - /// - public IntFeedback CallTypeFeedback { get; private set; } - - /// - /// - /// - public BoolFeedback PrivacyModeIsOnFeedback { get; private set; } - - /// - /// When something in the room is sharing with the far end or through other means - /// - public BoolFeedback IsSharingFeedback { get; private set; } - - //************************ - - - protected override Func OnFeedbackFunc - { - get - { - return () => - { - var disp = DefaultDisplay as DisplayBase; - var val = CurrentSourceInfo != null - && CurrentSourceInfo.Type == eSourceListItemType.Route - && disp != null - && disp.PowerIsOnFeedback.BoolValue; - return val; - }; - } - } - /// - /// - /// - protected override Func IsWarmingFeedbackFunc - { - get - { - return () => - { - var disp = DefaultDisplay as DisplayBase; - if (disp != null) - return disp.IsWarmingUpFeedback.BoolValue; - else - return false; - }; - } - } - /// - /// - /// - protected override Func IsCoolingFeedbackFunc - { - get - { - return () => - { - var disp = DefaultDisplay as DisplayBase; - if (disp != null) - return disp.IsCoolingDownFeedback.BoolValue; - else - return false; - }; - } - } - - public EssentialsHuddleVtc1PropertiesConfig Config { get; private set; } - - public IRoutingSinkWithSwitching DefaultDisplay { get; private set; } - public IBasicVolumeControls DefaultAudioDevice { get; private set; } - public IBasicVolumeControls DefaultVolumeControls { get; private set; } - - public VideoCodecBase VideoCodec { get; private set; } - - public bool ExcludeFromGlobalFunctions { get; set; } - - /// - /// The config name of the source list - /// - public string SourceListKey { get; set; } - - public string DefaultSourceItem { get; set; } - - public ushort DefaultVolume { get; set; } - - /// - /// If room is off, enables power on to last source. Default true - /// - public bool EnablePowerOnToLastSource { get; set; } - string LastSourceKey; - - /// - /// - /// - public IBasicVolumeControls CurrentVolumeControls - { - get { return _CurrentAudioDevice; } - set - { - if (value == _CurrentAudioDevice) return; - - var oldDev = _CurrentAudioDevice; - // derigister this room from the device, if it can - if (oldDev is IInUseTracking) - (oldDev as IInUseTracking).InUseTracker.RemoveUser(this, "audio"); - var handler = CurrentVolumeDeviceChange; - if (handler != null) - CurrentVolumeDeviceChange(this, new VolumeDeviceChangeEventArgs(oldDev, value, ChangeType.WillChange)); - _CurrentAudioDevice = value; - if (handler != null) - CurrentVolumeDeviceChange(this, new VolumeDeviceChangeEventArgs(oldDev, value, ChangeType.DidChange)); - // register this room with new device, if it can - if (_CurrentAudioDevice is IInUseTracking) - (_CurrentAudioDevice as IInUseTracking).InUseTracker.AddUser(this, "audio"); - } - } - IBasicVolumeControls _CurrentAudioDevice; - - /// - /// The SourceListItem last run - containing names and icons - /// - public SourceListItem CurrentSourceInfo - { - get { return _CurrentSourceInfo; } - private set - { - if (value == _CurrentSourceInfo) return; - - var handler = CurrentSingleSourceChange; - // remove from in-use tracker, if so equipped - if(_CurrentSourceInfo != null && _CurrentSourceInfo.SourceDevice is IInUseTracking) - (_CurrentSourceInfo.SourceDevice as IInUseTracking).InUseTracker.RemoveUser(this, "control"); - - if (handler != null) - handler(this, _CurrentSourceInfo, ChangeType.WillChange); - - _CurrentSourceInfo = value; - - // add to in-use tracking - if (_CurrentSourceInfo != null && _CurrentSourceInfo.SourceDevice is IInUseTracking) - (_CurrentSourceInfo.SourceDevice as IInUseTracking).InUseTracker.AddUser(this, "control"); - if (handler != null) - handler(this, _CurrentSourceInfo, ChangeType.DidChange); - } - } - SourceListItem _CurrentSourceInfo; - - public string CurrentSourceInfoKey { get; private set; } - - /// - /// "codecOsd" - /// - public string DefaultCodecRouteString { get { return "codecOsd"; } } - - /// - /// Temporary implementation. Returns the schedule-ready object or null if none. Fow now, - /// always returns the VideoCodec if it is capable - /// - public IHasScheduleAwareness ScheduleSource { get { return VideoCodec as IHasScheduleAwareness; } } - - /// - /// - /// - /// - /// - public EssentialsHuddleVtc1Room(string key, string name, IRoutingSinkWithSwitching defaultDisplay, - IBasicVolumeControls defaultAudio, VideoCodecBase codec, EssentialsHuddleVtc1PropertiesConfig config) - : base(key, name) - { - if (codec == null) - throw new ArgumentNullException("codec cannot be null"); - Config = config; - DefaultDisplay = defaultDisplay; - VideoCodec = codec; - DefaultAudioDevice = defaultAudio; - - if (defaultAudio is IBasicVolumeControls) - DefaultVolumeControls = defaultAudio as IBasicVolumeControls; - else if (defaultAudio is IHasVolumeDevice) - DefaultVolumeControls = (defaultAudio as IHasVolumeDevice).VolumeDevice; - CurrentVolumeControls = DefaultVolumeControls; - - var disp = DefaultDisplay as DisplayBase; - if (disp != null) - { - // Link power, warming, cooling to display - disp.PowerIsOnFeedback.OutputChange += (o, a) => - { - if (disp.PowerIsOnFeedback.BoolValue != OnFeedback.BoolValue) - { - if (!disp.PowerIsOnFeedback.BoolValue) - CurrentSourceInfo = null; - OnFeedback.FireUpdate(); - } - if (disp.PowerIsOnFeedback.BoolValue) - { - SetDefaultLevels(); - } - }; - - disp.IsWarmingUpFeedback.OutputChange += (o, a) => - { - IsWarmingUpFeedback.FireUpdate(); - if (!IsWarmingUpFeedback.BoolValue) - (DefaultDisplay as IBasicVolumeWithFeedback).SetVolume(DefaultVolume); - }; - disp.IsCoolingDownFeedback.OutputChange += (o, a) => - { - IsCoolingDownFeedback.FireUpdate(); - if (IsCoolingDownFeedback.BoolValue) - (DefaultDisplay as IBasicVolumeWithFeedback).SetVolume(DefaultVolume); - }; - } - - InCallFeedback = new BoolFeedback(() => VideoCodec.IsInCall); - IsSharingFeedback = new BoolFeedback(() => VideoCodec.SharingSourceFeedback.StringValue != null); - - // link privacy to VC (for now?) - PrivacyModeIsOnFeedback = new BoolFeedback(() => VideoCodec.PrivacyModeIsOnFeedback.BoolValue); - VideoCodec.PrivacyModeIsOnFeedback.OutputChange += (o, a) => this.PrivacyModeIsOnFeedback.FireUpdate(); - - CallTypeFeedback = new IntFeedback(() => 0); - - SourceListKey = "default"; - EnablePowerOnToLastSource = true; - } - - - /// - /// - /// - public override void Shutdown() - { - RunRouteAction("roomOff"); - VideoCodec.EndAllCalls(); - } - - /// - /// Routes the default source item, if any. Returns true when default route exists - /// - public bool RunDefaultPresentRoute() - { - if (DefaultSourceItem != null) - RunRouteAction(DefaultSourceItem); - return DefaultSourceItem != null; - } - - /// - /// Sets up the room when started into call mode without presenting a source - /// - /// - public bool RunDefaultCallRoute() - { - RunRouteAction(DefaultCodecRouteString); - return true; - } - - /// - /// - /// - /// - public void RunRouteAction(string routeKey) - { - RunRouteAction(routeKey, null); - } - - /// - /// Gets a source from config list SourceListKey and dynamically build and executes the - /// route or commands - /// - /// - public void RunRouteAction(string routeKey, Action successCallback) - { - // Run this on a separate thread - new CTimer(o => - { - try - { - - Debug.Console(1, this, "Run route action '{0}'", routeKey); - var dict = ConfigReader.ConfigObject.GetSourceListForKey(SourceListKey); - if (dict == null) - { - Debug.Console(1, this, "WARNING: Config source list '{0}' not found", SourceListKey); - return; - } - - // Try to get the list item by it's string key - if (!dict.ContainsKey(routeKey)) - { - Debug.Console(1, this, "WARNING: No item '{0}' found on config list '{1}'", - routeKey, SourceListKey); - return; - } - - // End usage timer on last source - if (!string.IsNullOrEmpty(LastSourceKey)) - { - var usageLastSource = dict[LastSourceKey].SourceDevice as IUsageTracking; - if (usageLastSource != null && usageLastSource.UsageTracker != null) - { - try - { - // There MAY have been failures in here. Protect - usageLastSource.UsageTracker.EndDeviceUsage(); - } - catch (Exception e) - { - } - } - } - - // Let's run it - var item = dict[routeKey]; - if (routeKey.ToLower() != "roomoff") - { - - LastSourceKey = routeKey; - } - else - CurrentSourceInfoKey = null; - - // hand off the individual routes to this helper - foreach (var route in item.RouteList) - DoRouteItem(route); - - // Start usage timer on routed source - var usageNewSource = item.SourceDevice as IUsageTracking; - if (usageNewSource != null && usageNewSource.UsageTracker != null) // Have to make sure there is a usage tracker! - { - (item.SourceDevice as IUsageTracking).UsageTracker.StartDeviceUsage(); - } - - // store the name and UI info for routes - if (item.SourceKey == "$off") - { - CurrentSourceInfoKey = routeKey; - CurrentSourceInfo = null; - } - else if (item.SourceKey != null) - { - CurrentSourceInfoKey = routeKey; - CurrentSourceInfo = item; - } - - OnFeedback.FireUpdate(); - - // report back when done - if (successCallback != null) - successCallback(); - } - catch (Exception e) - { - Debug.Console(1, this, "ERROR in routing: {0}", e); - } - - }, 0); // end of CTimer - } - - /// - /// - /// - /// - void DoRouteItem(SourceRouteListItem route) - { - // if there is a $defaultAll on route, run two separate - if (route.DestinationKey.Equals("$defaultAll", StringComparison.OrdinalIgnoreCase)) - { - // Going to assume a single-path route for now - var tempVideo = new SourceRouteListItem - { - DestinationKey = "$defaultDisplay", - SourceKey = route.SourceKey, - Type = eRoutingSignalType.Video - }; - DoRoute(tempVideo); - } - else - DoRoute(route); - } - - /// - /// - /// - /// - /// - bool DoRoute(SourceRouteListItem route) - { - IRoutingSinkNoSwitching dest = null; - - if (route.DestinationKey.Equals("$defaultaudio", StringComparison.OrdinalIgnoreCase)) - dest = DefaultAudioDevice as IRoutingSinkNoSwitching; - else if (route.DestinationKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase)) - dest = DefaultDisplay; - else - dest = DeviceManager.GetDeviceForKey(route.DestinationKey) as IRoutingSinkNoSwitching; - - if (dest == null) - { - Debug.Console(1, this, "Cannot route, unknown destination '{0}'", route.DestinationKey); - return false; - } - - if (route.SourceKey.Equals("$off", StringComparison.OrdinalIgnoreCase)) - { - dest.ReleaseRoute(); - if (dest is IPower) - (dest as IPower).PowerOff(); - } - else - { - var source = DeviceManager.GetDeviceForKey(route.SourceKey) as IRoutingOutputs; - if (source == null) - { - Debug.Console(1, this, "Cannot route unknown source '{0}' to {1}", route.SourceKey, route.DestinationKey); - return false; - } - dest.ReleaseAndMakeRoute(source, route.Type); - } - return true; -======= -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Room.Config; -using PepperDash.Essentials.Devices.Common.Codec; -using PepperDash.Essentials.Devices.Common.VideoCodec; - -namespace PepperDash.Essentials -{ - public class EssentialsHuddleVtc1Room : EssentialsRoomBase, IHasCurrentSourceInfoChange, IPrivacy - { - public event EventHandler CurrentVolumeDeviceChange; - public event SourceInfoChangeHandler CurrentSingleSourceChange; - - - //************************ - // Call-related stuff - - public BoolFeedback InCallFeedback { get; private set; } - - /// - /// Make this more specific - /// - public List ActiveCalls { get; private set; } - - /// - /// States: 0 for on hook, 1 for video, 2 for audio, 3 for telekenesis - /// - public IntFeedback CallTypeFeedback { get; private set; } - - /// - /// - /// - public BoolFeedback PrivacyModeIsOnFeedback { get; private set; } - - /// - /// When something in the room is sharing with the far end or through other means - /// - public BoolFeedback IsSharingFeedback { get; private set; } - - //************************ - - - protected override Func OnFeedbackFunc - { - get - { - return () => - { - var disp = DefaultDisplay as DisplayBase; - var val = CurrentSourceInfo != null - && CurrentSourceInfo.Type == eSourceListItemType.Route - && disp != null - && disp.PowerIsOnFeedback.BoolValue; - return val; - }; - } - } - /// - /// - /// - protected override Func IsWarmingFeedbackFunc - { - get - { - return () => - { - var disp = DefaultDisplay as DisplayBase; - if (disp != null) - return disp.IsWarmingUpFeedback.BoolValue; - else - return false; - }; - } - } - /// - /// - /// - protected override Func IsCoolingFeedbackFunc - { - get - { - return () => - { - var disp = DefaultDisplay as DisplayBase; - if (disp != null) - return disp.IsCoolingDownFeedback.BoolValue; - else - return false; - }; - } - } - - public EssentialsHuddleVtc1PropertiesConfig Config { get; private set; } - - public IRoutingSinkWithSwitching DefaultDisplay { get; private set; } - public IBasicVolumeControls DefaultAudioDevice { get; private set; } - public IBasicVolumeControls DefaultVolumeControls { get; private set; } - - public VideoCodecBase VideoCodec { get; private set; } - - public bool ExcludeFromGlobalFunctions { get; set; } - - /// - /// The config name of the source list - /// - public string SourceListKey { get; set; } - - public string DefaultSourceItem { get; set; } - - public ushort DefaultVolume { get; set; } - - /// - /// If room is off, enables power on to last source. Default true - /// - public bool EnablePowerOnToLastSource { get; set; } - string LastSourceKey; - - /// - /// - /// - public IBasicVolumeControls CurrentVolumeControls - { - get { return _CurrentAudioDevice; } - set - { - if (value == _CurrentAudioDevice) return; - - var oldDev = _CurrentAudioDevice; - // derigister this room from the device, if it can - if (oldDev is IInUseTracking) - (oldDev as IInUseTracking).InUseTracker.RemoveUser(this, "audio"); - var handler = CurrentVolumeDeviceChange; - if (handler != null) - CurrentVolumeDeviceChange(this, new VolumeDeviceChangeEventArgs(oldDev, value, ChangeType.WillChange)); - _CurrentAudioDevice = value; - if (handler != null) - CurrentVolumeDeviceChange(this, new VolumeDeviceChangeEventArgs(oldDev, value, ChangeType.DidChange)); - // register this room with new device, if it can - if (_CurrentAudioDevice is IInUseTracking) - (_CurrentAudioDevice as IInUseTracking).InUseTracker.AddUser(this, "audio"); - } - } - IBasicVolumeControls _CurrentAudioDevice; - - /// - /// The SourceListItem last run - containing names and icons - /// - public SourceListItem CurrentSourceInfo - { - get { return _CurrentSourceInfo; } - private set - { - if (value == _CurrentSourceInfo) return; - - var handler = CurrentSingleSourceChange; - // remove from in-use tracker, if so equipped - if(_CurrentSourceInfo != null && _CurrentSourceInfo.SourceDevice is IInUseTracking) - (_CurrentSourceInfo.SourceDevice as IInUseTracking).InUseTracker.RemoveUser(this, "control"); - - if (handler != null) - handler(this, _CurrentSourceInfo, ChangeType.WillChange); - - _CurrentSourceInfo = value; - - // add to in-use tracking - if (_CurrentSourceInfo != null && _CurrentSourceInfo.SourceDevice is IInUseTracking) - (_CurrentSourceInfo.SourceDevice as IInUseTracking).InUseTracker.AddUser(this, "control"); - if (handler != null) - handler(this, _CurrentSourceInfo, ChangeType.DidChange); - } - } - SourceListItem _CurrentSourceInfo; - - public string CurrentSourceInfoKey { get; private set; } - - /// - /// "codecOsd" - /// - public string DefaultCodecRouteString { get { return "codecOsd"; } } - - /// - /// Temporary implementation. Returns the schedule-ready object or null if none. Fow now, - /// always returns the VideoCodec if it is capable - /// - public IHasScheduleAwareness ScheduleSource { get { return VideoCodec as IHasScheduleAwareness; } } - - /// - /// - /// - /// - /// - public EssentialsHuddleVtc1Room(string key, string name, IRoutingSinkWithSwitching defaultDisplay, - IBasicVolumeControls defaultAudio, VideoCodecBase codec, EssentialsHuddleVtc1PropertiesConfig config) - : base(key, name) - { - if (codec == null) - throw new ArgumentNullException("codec cannot be null"); - Config = config; - DefaultDisplay = defaultDisplay; - VideoCodec = codec; - DefaultAudioDevice = defaultAudio; - - if (defaultAudio is IBasicVolumeControls) - DefaultVolumeControls = defaultAudio as IBasicVolumeControls; - else if (defaultAudio is IHasVolumeDevice) - DefaultVolumeControls = (defaultAudio as IHasVolumeDevice).VolumeDevice; - CurrentVolumeControls = DefaultVolumeControls; - - var disp = DefaultDisplay as DisplayBase; - if (disp != null) - { - // Link power, warming, cooling to display - disp.PowerIsOnFeedback.OutputChange += (o, a) => - { - if (disp.PowerIsOnFeedback.BoolValue != OnFeedback.BoolValue) - { - if (!disp.PowerIsOnFeedback.BoolValue) - CurrentSourceInfo = null; - OnFeedback.FireUpdate(); - } - if (disp.PowerIsOnFeedback.BoolValue) - { - SetDefaultLevels(); - } - }; - - disp.IsWarmingUpFeedback.OutputChange += (o, a) => - { - IsWarmingUpFeedback.FireUpdate(); - if (!IsWarmingUpFeedback.BoolValue) - (DefaultDisplay as IBasicVolumeWithFeedback).SetVolume(DefaultVolume); - }; - disp.IsCoolingDownFeedback.OutputChange += (o, a) => - { - IsCoolingDownFeedback.FireUpdate(); - if (IsCoolingDownFeedback.BoolValue) - (DefaultDisplay as IBasicVolumeWithFeedback).SetVolume(DefaultVolume); - }; - } - - InCallFeedback = new BoolFeedback(() => VideoCodec.IsInCall); - IsSharingFeedback = new BoolFeedback(() => VideoCodec.SharingSourceFeedback.StringValue != null); - - // link privacy to VC (for now?) - PrivacyModeIsOnFeedback = new BoolFeedback(() => VideoCodec.PrivacyModeIsOnFeedback.BoolValue); - VideoCodec.PrivacyModeIsOnFeedback.OutputChange += (o, a) => this.PrivacyModeIsOnFeedback.FireUpdate(); - - CallTypeFeedback = new IntFeedback(() => 0); - - SourceListKey = "default"; - EnablePowerOnToLastSource = true; - } - - - /// - /// - /// - protected override void EndShutdown() - { - RunRouteAction("roomOff"); - VideoCodec.EndAllCalls(); - } - - /// - /// Routes the default source item, if any. Returns true when default route exists - /// - public bool RunDefaultPresentRoute() - { - if (DefaultSourceItem != null) - RunRouteAction(DefaultSourceItem); - return DefaultSourceItem != null; - } - - /// - /// Sets up the room when started into call mode without presenting a source - /// - /// - public bool RunDefaultCallRoute() - { - RunRouteAction(DefaultCodecRouteString); - return true; - } - - /// - /// - /// - /// - public void RunRouteAction(string routeKey) - { - RunRouteAction(routeKey, null); - } - - /// - /// Gets a source from config list SourceListKey and dynamically build and executes the - /// route or commands - /// - /// - public void RunRouteAction(string routeKey, Action successCallback) - { - // Run this on a separate thread - new CTimer(o => - { - try - { - - Debug.Console(1, this, "Run route action '{0}'", routeKey); - var dict = ConfigReader.ConfigObject.GetSourceListForKey(SourceListKey); - if (dict == null) - { - Debug.Console(1, this, "WARNING: Config source list '{0}' not found", SourceListKey); - return; - } - - // Try to get the list item by it's string key - if (!dict.ContainsKey(routeKey)) - { - Debug.Console(1, this, "WARNING: No item '{0}' found on config list '{1}'", - routeKey, SourceListKey); - return; - } - - // End usage timer on last source - if (!string.IsNullOrEmpty(LastSourceKey)) - { - var usageLastSource = dict[LastSourceKey].SourceDevice as IUsageTracking; - if (usageLastSource != null && usageLastSource.UsageTracker != null) - { - try - { - // There MAY have been failures in here. Protect - usageLastSource.UsageTracker.EndDeviceUsage(); - } - catch (Exception e) - { - Debug.Console(1, this, "*#* EXCEPTION in end usage tracking:\r{0}", e); - } - } - } - - // Let's run it - var item = dict[routeKey]; - if (routeKey.ToLower() != "roomoff") - { - - LastSourceKey = routeKey; - } - else - CurrentSourceInfoKey = null; - - // hand off the individual routes to this helper - foreach (var route in item.RouteList) - DoRouteItem(route); - - // Start usage timer on routed source - var usageNewSource = item.SourceDevice as IUsageTracking; - if (usageNewSource != null && usageNewSource.UsageTracker != null) // Have to make sure there is a usage tracker! - { - (item.SourceDevice as IUsageTracking).UsageTracker.StartDeviceUsage(); - } - - // store the name and UI info for routes - if (item.SourceKey == "$off") - { - CurrentSourceInfoKey = routeKey; - CurrentSourceInfo = null; - } - else if (item.SourceKey != null) - { - CurrentSourceInfoKey = routeKey; - CurrentSourceInfo = item; - } - - OnFeedback.FireUpdate(); - - // report back when done - if (successCallback != null) - successCallback(); - } - catch (Exception e) - { - Debug.Console(1, this, "ERROR in routing: {0}", e); - } - - }, 0); // end of CTimer - } - - /// - /// - /// - /// - void DoRouteItem(SourceRouteListItem route) - { - // if there is a $defaultAll on route, run two separate - if (route.DestinationKey.Equals("$defaultAll", StringComparison.OrdinalIgnoreCase)) - { - // Going to assume a single-path route for now - var tempVideo = new SourceRouteListItem - { - DestinationKey = "$defaultDisplay", - SourceKey = route.SourceKey, - Type = eRoutingSignalType.Video - }; - DoRoute(tempVideo); - } - else - DoRoute(route); - } - - /// - /// - /// - /// - /// - bool DoRoute(SourceRouteListItem route) - { - IRoutingSinkNoSwitching dest = null; - - if (route.DestinationKey.Equals("$defaultaudio", StringComparison.OrdinalIgnoreCase)) - dest = DefaultAudioDevice as IRoutingSinkNoSwitching; - else if (route.DestinationKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase)) - dest = DefaultDisplay; - else - dest = DeviceManager.GetDeviceForKey(route.DestinationKey) as IRoutingSinkNoSwitching; - - if (dest == null) - { - Debug.Console(1, this, "Cannot route, unknown destination '{0}'", route.DestinationKey); - return false; - } - - if (route.SourceKey.Equals("$off", StringComparison.OrdinalIgnoreCase)) - { - dest.ReleaseRoute(); - if (dest is IPower) - (dest as IPower).PowerOff(); - } - else - { - var source = DeviceManager.GetDeviceForKey(route.SourceKey) as IRoutingOutputs; - if (source == null) - { - Debug.Console(1, this, "Cannot route unknown source '{0}' to {1}", route.SourceKey, route.DestinationKey); - return false; - } - dest.ReleaseAndMakeRoute(source, route.Type); - } - return true; ->>>>>>> origin/feature/ecs-342 - } - - public override void RoomVacatedForTimeoutPeriod(object o) - { - //Implement this - } - - /// - /// Does what it says - /// - public override void SetDefaultLevels() - { - Debug.Console(1, this, "Restoring default levels"); - var vc = CurrentVolumeControls as IBasicVolumeWithFeedback; - if (vc != null) - vc.SetVolume(DefaultVolume); - } - /// - /// Will power the room on with the last-used source - /// - public void PowerOnToDefaultOrLastSource() - { - if (!EnablePowerOnToLastSource || LastSourceKey == null) - return; - RunRouteAction(LastSourceKey); - } - - /// - /// Runs "roomOff" action on all rooms not set to ExcludeFromGlobalFunctions - /// - public static void AllRoomsOff() - { - var allRooms = DeviceManager.AllDevices.Where(d => - d is EssentialsHuddleSpaceRoom && !(d as EssentialsHuddleSpaceRoom).ExcludeFromGlobalFunctions); - foreach (var room in allRooms) - (room as EssentialsHuddleSpaceRoom).RunRouteAction("roomOff"); - } - - #region IPrivacy Members - - - public void PrivacyModeOff() - { - VideoCodec.PrivacyModeOff(); - } - - public void PrivacyModeOn() - { - VideoCodec.PrivacyModeOn(); - } - - public void PrivacyModeToggle() - { - VideoCodec.PrivacyModeToggle(); - } - - #endregion - } -} \ No newline at end of file diff --git a/PepperDashEssentials/Room/Types/IEssentialsHuddleSpaceRoom.cs b/PepperDashEssentials/Room/Types/IEssentialsHuddleSpaceRoom.cs deleted file mode 100644 index 45074fb7..00000000 --- a/PepperDashEssentials/Room/Types/IEssentialsHuddleSpaceRoom.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.DeviceTypeInterfaces; -using PepperDash.Essentials.Room.Config; -using PepperDash.Essentials.Core.Devices; -using PepperDash.Essentials.Devices.Common.Codec; -using PepperDash.Essentials.Devices.Common.VideoCodec; -using PepperDash.Essentials.Devices.Common.AudioCodec; - - -using PepperDash.Core; - -namespace PepperDash.Essentials -{ - public interface IEssentialsHuddleSpaceRoom : IEssentialsRoom, IHasCurrentSourceInfoChange, IRunRouteAction, IHasDefaultDisplay - { - bool ExcludeFromGlobalFunctions { get; } - - void RunRouteAction(string routeKey); - - EssentialsHuddleRoomPropertiesConfig PropertiesConfig { get; } - - IBasicVolumeControls CurrentVolumeControls { get; } - - event EventHandler CurrentVolumeDeviceChange; - } - - public interface IEssentialsHuddleVtc1Room : IEssentialsRoom, IHasCurrentSourceInfoChange, - IHasCurrentVolumeControls, IRunRouteAction, IRunDefaultCallRoute, IHasVideoCodec, IHasAudioCodec, IHasDefaultDisplay - { - EssentialsHuddleVtc1PropertiesConfig PropertiesConfig { get; } - - void RunRouteAction(string routeKey); - - IHasScheduleAwareness ScheduleSource { get; } - - string DefaultCodecRouteString { get; } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/SGD/PepperDash Essentials iPad.sgd b/PepperDashEssentials/SGD/PepperDash Essentials iPad.sgd deleted file mode 100644 index 25eac059..00000000 --- a/PepperDashEssentials/SGD/PepperDash Essentials iPad.sgd +++ /dev/null @@ -1,20901 +0,0 @@ -[ -ObjTp=FSgntr -Sgntr=SGD -RelVrs=3 -VTProeVer=6.1.05 -Schema=1 -CRCGUID=BA116BF9-17DA-41E0-BF8A-42945AAA686D -] -;================================================================================ -[ -ObjTp=Hd -ProjectFile=PepperDash Essentials iPad.vtp -VtpGuid=D8D5F125-CB35-42E9-8AE3-4142597FD2C5 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials iPad_[C.AC] Keypad_AC DTMF Keypad_2.ced -Hint=AC DTMF Keypad_2 (Smart Object ID=1101) -Code=1 -SGControlType=Simple Keypad -SGControlName=AC DTMF Keypad_2 -GUID=F2A259FE-82AD-4085-B5A6-22D7B034458C -SmplCName=PepperDash Essentials iPad_[C.AC] Keypad_AC DTMF Keypad_2.ced -SMWRev=4.02.19 -Expand=expand_random -HelpID=10061 -;Define the number of inputs, outputs and parameters -MinVariableInputs=12 -MaxVariableInputs=12 -MinVariableOutputs=12 -MaxVariableOutputs=12 -NumFixedParams=1 -MinVariableInputsList2=0 -MaxVariableInputsList2=0 -MinVariableOutputsList2=0 -MaxVariableOutputsList2=0 -MinVariableInputsList3=0 -MaxVariableInputsList3=0 -MinVariableOutputsList3=0 -MaxVariableOutputsList3=0 -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -OutputCue1=1 -OutputSigType1=Digital -InputCue2=[~UNUSED3~] -InputSigType2=Digital -OutputCue2=2 -OutputSigType2=Digital -InputCue3=[~UNUSED3~] -InputSigType3=Digital -OutputCue3=3 -OutputSigType3=Digital -InputCue4=[~UNUSED3~] -InputSigType4=Digital -OutputCue4=4 -OutputSigType4=Digital -InputCue5=[~UNUSED3~] -InputSigType5=Digital -OutputCue5=5 -OutputSigType5=Digital -InputCue6=[~UNUSED3~] -InputSigType6=Digital -OutputCue6=6 -OutputSigType6=Digital -InputCue7=[~UNUSED3~] -InputSigType7=Digital -OutputCue7=7 -OutputSigType7=Digital -InputCue8=[~UNUSED3~] -InputSigType8=Digital -OutputCue8=8 -OutputSigType8=Digital -InputCue9=[~UNUSED3~] -InputSigType9=Digital -OutputCue9=9 -OutputSigType9=Digital -InputCue10=[~UNUSED3~] -InputSigType10=Digital -OutputCue10=0 -OutputSigType10=Digital -InputCue11=[~UNUSED3~] -InputSigType11=Digital -OutputCue11=* -OutputSigType11=Digital -InputCue12=[~UNUSED3~] -InputSigType12=Digital -OutputCue12=/# -OutputSigType12=Digital -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=1 -CedH=1 -SmartObjId=1101d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=1 -Tp=1 -HD=TRUE -DV=1101d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=1 -Name=PepperDash Essentials iPad_[C.AC] Keypad_AC DTMF Keypad_2.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials iPad_[D.VC] Directory_Dynamic Button List Vertical_2.ced -Hint=Dynamic Button List Vertical_2 (Smart Object ID=1202) -Code=2 -SGControlType=Dynamic Button List Vertical -SGControlName=Dynamic Button List Vertical_2 -GUID=79060F3C-D3A4-4A8D-ACF0-CB2376A31702 -SmplCName=PepperDash Essentials iPad_[D.VC] Directory_Dynamic Button List Vertical_2.ced -SMWRev=4.02.20 -Expand=expand_random -HelpID=10112 -Render=8 -;Define the number of inputs, outputs and parameters -MinVariableInputs=6016 -MaxVariableInputs=6016 -MinVariableOutputs=6016 -MaxVariableOutputs=6016 -NumFixedParams=1 -MinVariableInputsList2=2012 -MaxVariableInputsList2=2012 -MinVariableOutputsList2=2012 -MaxVariableOutputsList2=2012 -MinVariableInputsList3=4014 -MaxVariableInputsList3=4014 -MinVariableOutputsList3=4014 -MaxVariableOutputsList3=4014 -InputSigType1=Digital -OutputSigType1=Digital -InputList2SigType1=Analog -OutputList2SigType1=Analog -InputList3SigType1=Serial -OutputList3SigType1=Serial - -;Define the cues, and signal types each input, output and parameter. -InputCue1=Disable Redraw -InputSigType1=Digital -InputCue2=[~UNUSED3~] -InputSigType2=Digital -InputCue3=[~UNUSED2~] -InputSigType3=Digital -InputCue4=[~UNUSED2~] -InputSigType4=Digital -InputCue5=[~UNUSED2~] -InputSigType5=Digital -InputCue6=[~UNUSED2~] -InputSigType6=Digital -InputCue7=[~UNUSED2~] -InputSigType7=Digital -InputCue8=[~UNUSED2~] -InputSigType8=Digital -InputCue9=[~UNUSED2~] -InputSigType9=Digital -InputCue10=[~UNUSED2~] -InputSigType10=Digital -InputCue11=[~BeginGroup~]Press -InputSigType11=Digital -InputCue12=Item 1 Selected -InputSigType12=Digital -InputCue13=Item 2 Selected -InputSigType13=Digital -InputCue14=Item 3 Selected -InputSigType14=Digital -InputCue15=Item 4 Selected -InputSigType15=Digital -InputCue16=Item 5 Selected -InputSigType16=Digital -InputCue17=Item 6 Selected -InputSigType17=Digital -InputCue18=Item 7 Selected -InputSigType18=Digital -InputCue19=Item 8 Selected -InputSigType19=Digital -InputCue20=Item 9 Selected -InputSigType20=Digital -InputCue21=Item 10 Selected -InputSigType21=Digital -InputCue22=Item 11 Selected -InputSigType22=Digital -InputCue23=Item 12 Selected -InputSigType23=Digital -InputCue24=Item 13 Selected -InputSigType24=Digital -InputCue25=Item 14 Selected -InputSigType25=Digital -InputCue26=Item 15 Selected -InputSigType26=Digital -InputCue27=Item 16 Selected -InputSigType27=Digital -InputCue28=Item 17 Selected -InputSigType28=Digital -InputCue29=Item 18 Selected -InputSigType29=Digital -InputCue30=Item 19 Selected -InputSigType30=Digital -InputCue31=Item 20 Selected -InputSigType31=Digital -InputCue32=Item 21 Selected -InputSigType32=Digital -InputCue33=Item 22 Selected -InputSigType33=Digital -InputCue34=Item 23 Selected -InputSigType34=Digital -InputCue35=Item 24 Selected -InputSigType35=Digital -InputCue36=Item 25 Selected -InputSigType36=Digital -InputCue37=Item 26 Selected -InputSigType37=Digital -InputCue38=Item 27 Selected -InputSigType38=Digital -InputCue39=Item 28 Selected -InputSigType39=Digital -InputCue40=Item 29 Selected -InputSigType40=Digital -InputCue41=Item 30 Selected -InputSigType41=Digital -InputCue42=Item 31 Selected -InputSigType42=Digital -InputCue43=Item 32 Selected -InputSigType43=Digital -InputCue44=Item 33 Selected -InputSigType44=Digital -InputCue45=Item 34 Selected -InputSigType45=Digital -InputCue46=Item 35 Selected -InputSigType46=Digital -InputCue47=Item 36 Selected -InputSigType47=Digital -InputCue48=Item 37 Selected -InputSigType48=Digital -InputCue49=Item 38 Selected -InputSigType49=Digital -InputCue50=Item 39 Selected -InputSigType50=Digital -InputCue51=Item 40 Selected -InputSigType51=Digital -InputCue52=Item 41 Selected -InputSigType52=Digital -InputCue53=Item 42 Selected -InputSigType53=Digital -InputCue54=Item 43 Selected -InputSigType54=Digital -InputCue55=Item 44 Selected -InputSigType55=Digital -InputCue56=Item 45 Selected -InputSigType56=Digital -InputCue57=Item 46 Selected -InputSigType57=Digital -InputCue58=Item 47 Selected -InputSigType58=Digital -InputCue59=Item 48 Selected -InputSigType59=Digital -InputCue60=Item 49 Selected -InputSigType60=Digital -InputCue61=Item 50 Selected -InputSigType61=Digital -InputCue62=Item 51 Selected -InputSigType62=Digital -InputCue63=Item 52 Selected -InputSigType63=Digital -InputCue64=Item 53 Selected -InputSigType64=Digital -InputCue65=Item 54 Selected -InputSigType65=Digital -InputCue66=Item 55 Selected -InputSigType66=Digital -InputCue67=Item 56 Selected -InputSigType67=Digital -InputCue68=Item 57 Selected -InputSigType68=Digital -InputCue69=Item 58 Selected -InputSigType69=Digital -InputCue70=Item 59 Selected -InputSigType70=Digital -InputCue71=Item 60 Selected -InputSigType71=Digital -InputCue72=Item 61 Selected -InputSigType72=Digital -InputCue73=Item 62 Selected -InputSigType73=Digital -InputCue74=Item 63 Selected -InputSigType74=Digital -InputCue75=Item 64 Selected -InputSigType75=Digital -InputCue76=Item 65 Selected -InputSigType76=Digital -InputCue77=Item 66 Selected -InputSigType77=Digital -InputCue78=Item 67 Selected -InputSigType78=Digital -InputCue79=Item 68 Selected -InputSigType79=Digital -InputCue80=Item 69 Selected -InputSigType80=Digital -InputCue81=Item 70 Selected -InputSigType81=Digital -InputCue82=Item 71 Selected -InputSigType82=Digital -InputCue83=Item 72 Selected -InputSigType83=Digital -InputCue84=Item 73 Selected -InputSigType84=Digital -InputCue85=Item 74 Selected -InputSigType85=Digital -InputCue86=Item 75 Selected -InputSigType86=Digital -InputCue87=Item 76 Selected -InputSigType87=Digital -InputCue88=Item 77 Selected -InputSigType88=Digital -InputCue89=Item 78 Selected -InputSigType89=Digital -InputCue90=Item 79 Selected -InputSigType90=Digital -InputCue91=Item 80 Selected -InputSigType91=Digital -InputCue92=Item 81 Selected -InputSigType92=Digital -InputCue93=Item 82 Selected -InputSigType93=Digital -InputCue94=Item 83 Selected -InputSigType94=Digital -InputCue95=Item 84 Selected -InputSigType95=Digital -InputCue96=Item 85 Selected -InputSigType96=Digital -InputCue97=Item 86 Selected -InputSigType97=Digital -InputCue98=Item 87 Selected -InputSigType98=Digital -InputCue99=Item 88 Selected -InputSigType99=Digital -InputCue100=Item 89 Selected -InputSigType100=Digital -InputCue101=Item 90 Selected -InputSigType101=Digital -InputCue102=Item 91 Selected -InputSigType102=Digital -InputCue103=Item 92 Selected -InputSigType103=Digital -InputCue104=Item 93 Selected -InputSigType104=Digital -InputCue105=Item 94 Selected -InputSigType105=Digital -InputCue106=Item 95 Selected -InputSigType106=Digital -InputCue107=Item 96 Selected -InputSigType107=Digital -InputCue108=Item 97 Selected -InputSigType108=Digital -InputCue109=Item 98 Selected -InputSigType109=Digital -InputCue110=Item 99 Selected -InputSigType110=Digital -InputCue111=Item 100 Selected -InputSigType111=Digital -InputCue112=Item 101 Selected -InputSigType112=Digital -InputCue113=Item 102 Selected -InputSigType113=Digital -InputCue114=Item 103 Selected -InputSigType114=Digital -InputCue115=Item 104 Selected -InputSigType115=Digital -InputCue116=Item 105 Selected -InputSigType116=Digital -InputCue117=Item 106 Selected -InputSigType117=Digital -InputCue118=Item 107 Selected -InputSigType118=Digital -InputCue119=Item 108 Selected -InputSigType119=Digital -InputCue120=Item 109 Selected -InputSigType120=Digital -InputCue121=Item 110 Selected -InputSigType121=Digital -InputCue122=Item 111 Selected -InputSigType122=Digital -InputCue123=Item 112 Selected -InputSigType123=Digital -InputCue124=Item 113 Selected -InputSigType124=Digital -InputCue125=Item 114 Selected -InputSigType125=Digital -InputCue126=Item 115 Selected -InputSigType126=Digital -InputCue127=Item 116 Selected -InputSigType127=Digital -InputCue128=Item 117 Selected -InputSigType128=Digital -InputCue129=Item 118 Selected -InputSigType129=Digital -InputCue130=Item 119 Selected -InputSigType130=Digital -InputCue131=Item 120 Selected -InputSigType131=Digital -InputCue132=Item 121 Selected -InputSigType132=Digital -InputCue133=Item 122 Selected -InputSigType133=Digital -InputCue134=Item 123 Selected -InputSigType134=Digital -InputCue135=Item 124 Selected -InputSigType135=Digital -InputCue136=Item 125 Selected -InputSigType136=Digital -InputCue137=Item 126 Selected -InputSigType137=Digital -InputCue138=Item 127 Selected -InputSigType138=Digital -InputCue139=Item 128 Selected -InputSigType139=Digital -InputCue140=Item 129 Selected -InputSigType140=Digital -InputCue141=Item 130 Selected -InputSigType141=Digital -InputCue142=Item 131 Selected -InputSigType142=Digital -InputCue143=Item 132 Selected -InputSigType143=Digital -InputCue144=Item 133 Selected -InputSigType144=Digital -InputCue145=Item 134 Selected -InputSigType145=Digital -InputCue146=Item 135 Selected -InputSigType146=Digital -InputCue147=Item 136 Selected -InputSigType147=Digital -InputCue148=Item 137 Selected -InputSigType148=Digital -InputCue149=Item 138 Selected -InputSigType149=Digital -InputCue150=Item 139 Selected -InputSigType150=Digital -InputCue151=Item 140 Selected -InputSigType151=Digital -InputCue152=Item 141 Selected -InputSigType152=Digital -InputCue153=Item 142 Selected -InputSigType153=Digital -InputCue154=Item 143 Selected -InputSigType154=Digital -InputCue155=Item 144 Selected -InputSigType155=Digital -InputCue156=Item 145 Selected -InputSigType156=Digital -InputCue157=Item 146 Selected -InputSigType157=Digital -InputCue158=Item 147 Selected -InputSigType158=Digital -InputCue159=Item 148 Selected -InputSigType159=Digital -InputCue160=Item 149 Selected -InputSigType160=Digital -InputCue161=Item 150 Selected -InputSigType161=Digital -InputCue162=Item 151 Selected -InputSigType162=Digital -InputCue163=Item 152 Selected -InputSigType163=Digital -InputCue164=Item 153 Selected -InputSigType164=Digital -InputCue165=Item 154 Selected -InputSigType165=Digital -InputCue166=Item 155 Selected -InputSigType166=Digital -InputCue167=Item 156 Selected -InputSigType167=Digital -InputCue168=Item 157 Selected -InputSigType168=Digital -InputCue169=Item 158 Selected -InputSigType169=Digital -InputCue170=Item 159 Selected -InputSigType170=Digital -InputCue171=Item 160 Selected -InputSigType171=Digital -InputCue172=Item 161 Selected -InputSigType172=Digital -InputCue173=Item 162 Selected -InputSigType173=Digital -InputCue174=Item 163 Selected -InputSigType174=Digital -InputCue175=Item 164 Selected -InputSigType175=Digital -InputCue176=Item 165 Selected -InputSigType176=Digital -InputCue177=Item 166 Selected -InputSigType177=Digital -InputCue178=Item 167 Selected -InputSigType178=Digital -InputCue179=Item 168 Selected -InputSigType179=Digital -InputCue180=Item 169 Selected -InputSigType180=Digital -InputCue181=Item 170 Selected -InputSigType181=Digital -InputCue182=Item 171 Selected -InputSigType182=Digital -InputCue183=Item 172 Selected -InputSigType183=Digital -InputCue184=Item 173 Selected -InputSigType184=Digital -InputCue185=Item 174 Selected -InputSigType185=Digital -InputCue186=Item 175 Selected -InputSigType186=Digital -InputCue187=Item 176 Selected -InputSigType187=Digital -InputCue188=Item 177 Selected -InputSigType188=Digital -InputCue189=Item 178 Selected -InputSigType189=Digital -InputCue190=Item 179 Selected -InputSigType190=Digital -InputCue191=Item 180 Selected -InputSigType191=Digital -InputCue192=Item 181 Selected -InputSigType192=Digital -InputCue193=Item 182 Selected -InputSigType193=Digital -InputCue194=Item 183 Selected -InputSigType194=Digital -InputCue195=Item 184 Selected -InputSigType195=Digital -InputCue196=Item 185 Selected -InputSigType196=Digital -InputCue197=Item 186 Selected -InputSigType197=Digital -InputCue198=Item 187 Selected -InputSigType198=Digital -InputCue199=Item 188 Selected -InputSigType199=Digital -InputCue200=Item 189 Selected -InputSigType200=Digital -InputCue201=Item 190 Selected -InputSigType201=Digital -InputCue202=Item 191 Selected -InputSigType202=Digital -InputCue203=Item 192 Selected -InputSigType203=Digital -InputCue204=Item 193 Selected -InputSigType204=Digital -InputCue205=Item 194 Selected -InputSigType205=Digital -InputCue206=Item 195 Selected -InputSigType206=Digital -InputCue207=Item 196 Selected -InputSigType207=Digital -InputCue208=Item 197 Selected -InputSigType208=Digital -InputCue209=Item 198 Selected -InputSigType209=Digital -InputCue210=Item 199 Selected -InputSigType210=Digital -InputCue211=Item 200 Selected -InputSigType211=Digital -InputCue212=Item 201 Selected -InputSigType212=Digital -InputCue213=Item 202 Selected -InputSigType213=Digital -InputCue214=Item 203 Selected -InputSigType214=Digital -InputCue215=Item 204 Selected -InputSigType215=Digital -InputCue216=Item 205 Selected -InputSigType216=Digital -InputCue217=Item 206 Selected -InputSigType217=Digital -InputCue218=Item 207 Selected -InputSigType218=Digital -InputCue219=Item 208 Selected -InputSigType219=Digital -InputCue220=Item 209 Selected -InputSigType220=Digital -InputCue221=Item 210 Selected -InputSigType221=Digital -InputCue222=Item 211 Selected -InputSigType222=Digital -InputCue223=Item 212 Selected -InputSigType223=Digital -InputCue224=Item 213 Selected -InputSigType224=Digital -InputCue225=Item 214 Selected -InputSigType225=Digital -InputCue226=Item 215 Selected -InputSigType226=Digital -InputCue227=Item 216 Selected -InputSigType227=Digital -InputCue228=Item 217 Selected -InputSigType228=Digital -InputCue229=Item 218 Selected -InputSigType229=Digital -InputCue230=Item 219 Selected -InputSigType230=Digital -InputCue231=Item 220 Selected -InputSigType231=Digital -InputCue232=Item 221 Selected -InputSigType232=Digital -InputCue233=Item 222 Selected -InputSigType233=Digital -InputCue234=Item 223 Selected -InputSigType234=Digital -InputCue235=Item 224 Selected -InputSigType235=Digital -InputCue236=Item 225 Selected -InputSigType236=Digital -InputCue237=Item 226 Selected -InputSigType237=Digital -InputCue238=Item 227 Selected -InputSigType238=Digital -InputCue239=Item 228 Selected -InputSigType239=Digital -InputCue240=Item 229 Selected -InputSigType240=Digital -InputCue241=Item 230 Selected -InputSigType241=Digital -InputCue242=Item 231 Selected -InputSigType242=Digital -InputCue243=Item 232 Selected -InputSigType243=Digital -InputCue244=Item 233 Selected -InputSigType244=Digital -InputCue245=Item 234 Selected -InputSigType245=Digital -InputCue246=Item 235 Selected -InputSigType246=Digital -InputCue247=Item 236 Selected -InputSigType247=Digital -InputCue248=Item 237 Selected -InputSigType248=Digital -InputCue249=Item 238 Selected -InputSigType249=Digital -InputCue250=Item 239 Selected -InputSigType250=Digital -InputCue251=Item 240 Selected -InputSigType251=Digital -InputCue252=Item 241 Selected -InputSigType252=Digital -InputCue253=Item 242 Selected -InputSigType253=Digital -InputCue254=Item 243 Selected -InputSigType254=Digital -InputCue255=Item 244 Selected -InputSigType255=Digital -InputCue256=Item 245 Selected -InputSigType256=Digital -InputCue257=Item 246 Selected -InputSigType257=Digital -InputCue258=Item 247 Selected -InputSigType258=Digital -InputCue259=Item 248 Selected -InputSigType259=Digital -InputCue260=Item 249 Selected -InputSigType260=Digital -InputCue261=Item 250 Selected -InputSigType261=Digital -InputCue262=Item 251 Selected -InputSigType262=Digital -InputCue263=Item 252 Selected -InputSigType263=Digital -InputCue264=Item 253 Selected -InputSigType264=Digital -InputCue265=Item 254 Selected -InputSigType265=Digital -InputCue266=Item 255 Selected -InputSigType266=Digital -InputCue267=[~UNUSED2~] -InputSigType267=Digital|Analog|Serial|String -InputCue2012=[~EndGroup~]Press -InputSigType2012=Digital -InputCue2013=[~BeginGroup~]Enable -InputSigType2013=Digital -InputCue2014=Item 1 Enabled -InputSigType2014=Digital -InputCue2015=Item 2 Enabled -InputSigType2015=Digital -InputCue2016=Item 3 Enabled -InputSigType2016=Digital -InputCue2017=Item 4 Enabled -InputSigType2017=Digital -InputCue2018=Item 5 Enabled -InputSigType2018=Digital -InputCue2019=Item 6 Enabled -InputSigType2019=Digital -InputCue2020=Item 7 Enabled -InputSigType2020=Digital -InputCue2021=Item 8 Enabled -InputSigType2021=Digital -InputCue2022=Item 9 Enabled -InputSigType2022=Digital -InputCue2023=Item 10 Enabled -InputSigType2023=Digital -InputCue2024=Item 11 Enabled -InputSigType2024=Digital -InputCue2025=Item 12 Enabled -InputSigType2025=Digital -InputCue2026=Item 13 Enabled -InputSigType2026=Digital -InputCue2027=Item 14 Enabled -InputSigType2027=Digital -InputCue2028=Item 15 Enabled -InputSigType2028=Digital -InputCue2029=Item 16 Enabled -InputSigType2029=Digital -InputCue2030=Item 17 Enabled -InputSigType2030=Digital -InputCue2031=Item 18 Enabled -InputSigType2031=Digital -InputCue2032=Item 19 Enabled -InputSigType2032=Digital -InputCue2033=Item 20 Enabled -InputSigType2033=Digital -InputCue2034=Item 21 Enabled -InputSigType2034=Digital -InputCue2035=Item 22 Enabled -InputSigType2035=Digital -InputCue2036=Item 23 Enabled -InputSigType2036=Digital -InputCue2037=Item 24 Enabled -InputSigType2037=Digital -InputCue2038=Item 25 Enabled -InputSigType2038=Digital -InputCue2039=Item 26 Enabled -InputSigType2039=Digital -InputCue2040=Item 27 Enabled -InputSigType2040=Digital -InputCue2041=Item 28 Enabled -InputSigType2041=Digital -InputCue2042=Item 29 Enabled -InputSigType2042=Digital -InputCue2043=Item 30 Enabled -InputSigType2043=Digital -InputCue2044=Item 31 Enabled -InputSigType2044=Digital -InputCue2045=Item 32 Enabled -InputSigType2045=Digital -InputCue2046=Item 33 Enabled -InputSigType2046=Digital -InputCue2047=Item 34 Enabled -InputSigType2047=Digital -InputCue2048=Item 35 Enabled -InputSigType2048=Digital -InputCue2049=Item 36 Enabled -InputSigType2049=Digital -InputCue2050=Item 37 Enabled -InputSigType2050=Digital -InputCue2051=Item 38 Enabled -InputSigType2051=Digital -InputCue2052=Item 39 Enabled -InputSigType2052=Digital -InputCue2053=Item 40 Enabled -InputSigType2053=Digital -InputCue2054=Item 41 Enabled -InputSigType2054=Digital -InputCue2055=Item 42 Enabled -InputSigType2055=Digital -InputCue2056=Item 43 Enabled -InputSigType2056=Digital -InputCue2057=Item 44 Enabled -InputSigType2057=Digital -InputCue2058=Item 45 Enabled -InputSigType2058=Digital -InputCue2059=Item 46 Enabled -InputSigType2059=Digital -InputCue2060=Item 47 Enabled -InputSigType2060=Digital -InputCue2061=Item 48 Enabled -InputSigType2061=Digital -InputCue2062=Item 49 Enabled -InputSigType2062=Digital -InputCue2063=Item 50 Enabled -InputSigType2063=Digital -InputCue2064=Item 51 Enabled -InputSigType2064=Digital -InputCue2065=Item 52 Enabled -InputSigType2065=Digital -InputCue2066=Item 53 Enabled -InputSigType2066=Digital -InputCue2067=Item 54 Enabled -InputSigType2067=Digital -InputCue2068=Item 55 Enabled -InputSigType2068=Digital -InputCue2069=Item 56 Enabled -InputSigType2069=Digital -InputCue2070=Item 57 Enabled -InputSigType2070=Digital -InputCue2071=Item 58 Enabled -InputSigType2071=Digital -InputCue2072=Item 59 Enabled -InputSigType2072=Digital -InputCue2073=Item 60 Enabled -InputSigType2073=Digital -InputCue2074=Item 61 Enabled -InputSigType2074=Digital -InputCue2075=Item 62 Enabled -InputSigType2075=Digital -InputCue2076=Item 63 Enabled -InputSigType2076=Digital -InputCue2077=Item 64 Enabled -InputSigType2077=Digital -InputCue2078=Item 65 Enabled -InputSigType2078=Digital -InputCue2079=Item 66 Enabled -InputSigType2079=Digital -InputCue2080=Item 67 Enabled -InputSigType2080=Digital -InputCue2081=Item 68 Enabled -InputSigType2081=Digital -InputCue2082=Item 69 Enabled -InputSigType2082=Digital -InputCue2083=Item 70 Enabled -InputSigType2083=Digital -InputCue2084=Item 71 Enabled -InputSigType2084=Digital -InputCue2085=Item 72 Enabled -InputSigType2085=Digital -InputCue2086=Item 73 Enabled -InputSigType2086=Digital -InputCue2087=Item 74 Enabled -InputSigType2087=Digital -InputCue2088=Item 75 Enabled -InputSigType2088=Digital -InputCue2089=Item 76 Enabled -InputSigType2089=Digital -InputCue2090=Item 77 Enabled -InputSigType2090=Digital -InputCue2091=Item 78 Enabled -InputSigType2091=Digital -InputCue2092=Item 79 Enabled -InputSigType2092=Digital -InputCue2093=Item 80 Enabled -InputSigType2093=Digital -InputCue2094=Item 81 Enabled -InputSigType2094=Digital -InputCue2095=Item 82 Enabled -InputSigType2095=Digital -InputCue2096=Item 83 Enabled -InputSigType2096=Digital -InputCue2097=Item 84 Enabled -InputSigType2097=Digital -InputCue2098=Item 85 Enabled -InputSigType2098=Digital -InputCue2099=Item 86 Enabled -InputSigType2099=Digital -InputCue2100=Item 87 Enabled -InputSigType2100=Digital -InputCue2101=Item 88 Enabled -InputSigType2101=Digital -InputCue2102=Item 89 Enabled -InputSigType2102=Digital -InputCue2103=Item 90 Enabled -InputSigType2103=Digital -InputCue2104=Item 91 Enabled -InputSigType2104=Digital -InputCue2105=Item 92 Enabled -InputSigType2105=Digital -InputCue2106=Item 93 Enabled -InputSigType2106=Digital -InputCue2107=Item 94 Enabled -InputSigType2107=Digital -InputCue2108=Item 95 Enabled -InputSigType2108=Digital -InputCue2109=Item 96 Enabled -InputSigType2109=Digital -InputCue2110=Item 97 Enabled -InputSigType2110=Digital -InputCue2111=Item 98 Enabled -InputSigType2111=Digital -InputCue2112=Item 99 Enabled -InputSigType2112=Digital -InputCue2113=Item 100 Enabled -InputSigType2113=Digital -InputCue2114=Item 101 Enabled -InputSigType2114=Digital -InputCue2115=Item 102 Enabled -InputSigType2115=Digital -InputCue2116=Item 103 Enabled -InputSigType2116=Digital -InputCue2117=Item 104 Enabled -InputSigType2117=Digital -InputCue2118=Item 105 Enabled -InputSigType2118=Digital -InputCue2119=Item 106 Enabled -InputSigType2119=Digital -InputCue2120=Item 107 Enabled -InputSigType2120=Digital -InputCue2121=Item 108 Enabled -InputSigType2121=Digital -InputCue2122=Item 109 Enabled -InputSigType2122=Digital -InputCue2123=Item 110 Enabled -InputSigType2123=Digital -InputCue2124=Item 111 Enabled -InputSigType2124=Digital -InputCue2125=Item 112 Enabled -InputSigType2125=Digital -InputCue2126=Item 113 Enabled -InputSigType2126=Digital -InputCue2127=Item 114 Enabled -InputSigType2127=Digital -InputCue2128=Item 115 Enabled -InputSigType2128=Digital -InputCue2129=Item 116 Enabled -InputSigType2129=Digital -InputCue2130=Item 117 Enabled -InputSigType2130=Digital -InputCue2131=Item 118 Enabled -InputSigType2131=Digital -InputCue2132=Item 119 Enabled -InputSigType2132=Digital -InputCue2133=Item 120 Enabled -InputSigType2133=Digital -InputCue2134=Item 121 Enabled -InputSigType2134=Digital -InputCue2135=Item 122 Enabled -InputSigType2135=Digital -InputCue2136=Item 123 Enabled -InputSigType2136=Digital -InputCue2137=Item 124 Enabled -InputSigType2137=Digital -InputCue2138=Item 125 Enabled -InputSigType2138=Digital -InputCue2139=Item 126 Enabled -InputSigType2139=Digital -InputCue2140=Item 127 Enabled -InputSigType2140=Digital -InputCue2141=Item 128 Enabled -InputSigType2141=Digital -InputCue2142=Item 129 Enabled -InputSigType2142=Digital -InputCue2143=Item 130 Enabled -InputSigType2143=Digital -InputCue2144=Item 131 Enabled -InputSigType2144=Digital -InputCue2145=Item 132 Enabled -InputSigType2145=Digital -InputCue2146=Item 133 Enabled -InputSigType2146=Digital -InputCue2147=Item 134 Enabled -InputSigType2147=Digital -InputCue2148=Item 135 Enabled -InputSigType2148=Digital -InputCue2149=Item 136 Enabled -InputSigType2149=Digital -InputCue2150=Item 137 Enabled -InputSigType2150=Digital -InputCue2151=Item 138 Enabled -InputSigType2151=Digital -InputCue2152=Item 139 Enabled -InputSigType2152=Digital -InputCue2153=Item 140 Enabled -InputSigType2153=Digital -InputCue2154=Item 141 Enabled -InputSigType2154=Digital -InputCue2155=Item 142 Enabled -InputSigType2155=Digital -InputCue2156=Item 143 Enabled -InputSigType2156=Digital -InputCue2157=Item 144 Enabled -InputSigType2157=Digital -InputCue2158=Item 145 Enabled -InputSigType2158=Digital -InputCue2159=Item 146 Enabled -InputSigType2159=Digital -InputCue2160=Item 147 Enabled -InputSigType2160=Digital -InputCue2161=Item 148 Enabled -InputSigType2161=Digital -InputCue2162=Item 149 Enabled -InputSigType2162=Digital -InputCue2163=Item 150 Enabled -InputSigType2163=Digital -InputCue2164=Item 151 Enabled -InputSigType2164=Digital -InputCue2165=Item 152 Enabled -InputSigType2165=Digital -InputCue2166=Item 153 Enabled -InputSigType2166=Digital -InputCue2167=Item 154 Enabled -InputSigType2167=Digital -InputCue2168=Item 155 Enabled -InputSigType2168=Digital -InputCue2169=Item 156 Enabled -InputSigType2169=Digital -InputCue2170=Item 157 Enabled -InputSigType2170=Digital -InputCue2171=Item 158 Enabled -InputSigType2171=Digital -InputCue2172=Item 159 Enabled -InputSigType2172=Digital -InputCue2173=Item 160 Enabled -InputSigType2173=Digital -InputCue2174=Item 161 Enabled -InputSigType2174=Digital -InputCue2175=Item 162 Enabled -InputSigType2175=Digital -InputCue2176=Item 163 Enabled -InputSigType2176=Digital -InputCue2177=Item 164 Enabled -InputSigType2177=Digital -InputCue2178=Item 165 Enabled -InputSigType2178=Digital -InputCue2179=Item 166 Enabled -InputSigType2179=Digital -InputCue2180=Item 167 Enabled -InputSigType2180=Digital -InputCue2181=Item 168 Enabled -InputSigType2181=Digital -InputCue2182=Item 169 Enabled -InputSigType2182=Digital -InputCue2183=Item 170 Enabled -InputSigType2183=Digital -InputCue2184=Item 171 Enabled -InputSigType2184=Digital -InputCue2185=Item 172 Enabled -InputSigType2185=Digital -InputCue2186=Item 173 Enabled -InputSigType2186=Digital -InputCue2187=Item 174 Enabled -InputSigType2187=Digital -InputCue2188=Item 175 Enabled -InputSigType2188=Digital -InputCue2189=Item 176 Enabled -InputSigType2189=Digital -InputCue2190=Item 177 Enabled -InputSigType2190=Digital -InputCue2191=Item 178 Enabled -InputSigType2191=Digital -InputCue2192=Item 179 Enabled -InputSigType2192=Digital -InputCue2193=Item 180 Enabled -InputSigType2193=Digital -InputCue2194=Item 181 Enabled -InputSigType2194=Digital -InputCue2195=Item 182 Enabled -InputSigType2195=Digital -InputCue2196=Item 183 Enabled -InputSigType2196=Digital -InputCue2197=Item 184 Enabled -InputSigType2197=Digital -InputCue2198=Item 185 Enabled -InputSigType2198=Digital -InputCue2199=Item 186 Enabled -InputSigType2199=Digital -InputCue2200=Item 187 Enabled -InputSigType2200=Digital -InputCue2201=Item 188 Enabled -InputSigType2201=Digital -InputCue2202=Item 189 Enabled -InputSigType2202=Digital -InputCue2203=Item 190 Enabled -InputSigType2203=Digital -InputCue2204=Item 191 Enabled -InputSigType2204=Digital -InputCue2205=Item 192 Enabled -InputSigType2205=Digital -InputCue2206=Item 193 Enabled -InputSigType2206=Digital -InputCue2207=Item 194 Enabled -InputSigType2207=Digital -InputCue2208=Item 195 Enabled -InputSigType2208=Digital -InputCue2209=Item 196 Enabled -InputSigType2209=Digital -InputCue2210=Item 197 Enabled -InputSigType2210=Digital -InputCue2211=Item 198 Enabled -InputSigType2211=Digital -InputCue2212=Item 199 Enabled -InputSigType2212=Digital -InputCue2213=Item 200 Enabled -InputSigType2213=Digital -InputCue2214=Item 201 Enabled -InputSigType2214=Digital -InputCue2215=Item 202 Enabled -InputSigType2215=Digital -InputCue2216=Item 203 Enabled -InputSigType2216=Digital -InputCue2217=Item 204 Enabled -InputSigType2217=Digital -InputCue2218=Item 205 Enabled -InputSigType2218=Digital -InputCue2219=Item 206 Enabled -InputSigType2219=Digital -InputCue2220=Item 207 Enabled -InputSigType2220=Digital -InputCue2221=Item 208 Enabled -InputSigType2221=Digital -InputCue2222=Item 209 Enabled -InputSigType2222=Digital -InputCue2223=Item 210 Enabled -InputSigType2223=Digital -InputCue2224=Item 211 Enabled -InputSigType2224=Digital -InputCue2225=Item 212 Enabled -InputSigType2225=Digital -InputCue2226=Item 213 Enabled -InputSigType2226=Digital -InputCue2227=Item 214 Enabled -InputSigType2227=Digital -InputCue2228=Item 215 Enabled -InputSigType2228=Digital -InputCue2229=Item 216 Enabled -InputSigType2229=Digital -InputCue2230=Item 217 Enabled -InputSigType2230=Digital -InputCue2231=Item 218 Enabled -InputSigType2231=Digital -InputCue2232=Item 219 Enabled -InputSigType2232=Digital -InputCue2233=Item 220 Enabled -InputSigType2233=Digital -InputCue2234=Item 221 Enabled -InputSigType2234=Digital -InputCue2235=Item 222 Enabled -InputSigType2235=Digital -InputCue2236=Item 223 Enabled -InputSigType2236=Digital -InputCue2237=Item 224 Enabled -InputSigType2237=Digital -InputCue2238=Item 225 Enabled -InputSigType2238=Digital -InputCue2239=Item 226 Enabled -InputSigType2239=Digital -InputCue2240=Item 227 Enabled -InputSigType2240=Digital -InputCue2241=Item 228 Enabled -InputSigType2241=Digital -InputCue2242=Item 229 Enabled -InputSigType2242=Digital -InputCue2243=Item 230 Enabled -InputSigType2243=Digital -InputCue2244=Item 231 Enabled -InputSigType2244=Digital -InputCue2245=Item 232 Enabled -InputSigType2245=Digital -InputCue2246=Item 233 Enabled -InputSigType2246=Digital -InputCue2247=Item 234 Enabled -InputSigType2247=Digital -InputCue2248=Item 235 Enabled -InputSigType2248=Digital -InputCue2249=Item 236 Enabled -InputSigType2249=Digital -InputCue2250=Item 237 Enabled -InputSigType2250=Digital -InputCue2251=Item 238 Enabled -InputSigType2251=Digital -InputCue2252=Item 239 Enabled -InputSigType2252=Digital -InputCue2253=Item 240 Enabled -InputSigType2253=Digital -InputCue2254=Item 241 Enabled -InputSigType2254=Digital -InputCue2255=Item 242 Enabled -InputSigType2255=Digital -InputCue2256=Item 243 Enabled -InputSigType2256=Digital -InputCue2257=Item 244 Enabled -InputSigType2257=Digital -InputCue2258=Item 245 Enabled -InputSigType2258=Digital -InputCue2259=Item 246 Enabled -InputSigType2259=Digital -InputCue2260=Item 247 Enabled -InputSigType2260=Digital -InputCue2261=Item 248 Enabled -InputSigType2261=Digital -InputCue2262=Item 249 Enabled -InputSigType2262=Digital -InputCue2263=Item 250 Enabled -InputSigType2263=Digital -InputCue2264=Item 251 Enabled -InputSigType2264=Digital -InputCue2265=Item 252 Enabled -InputSigType2265=Digital -InputCue2266=Item 253 Enabled -InputSigType2266=Digital -InputCue2267=Item 254 Enabled -InputSigType2267=Digital -InputCue2268=Item 255 Enabled -InputSigType2268=Digital -InputCue2269=[~UNUSED2~] -InputSigType2269=Digital|Analog|Serial|String -InputCue4014=[~EndGroup~]Enable -InputSigType4014=Digital -InputCue4015=[~BeginGroup~]Visible -InputSigType4015=Digital -InputCue4016=Item 1 Visible -InputSigType4016=Digital -InputCue4017=Item 2 Visible -InputSigType4017=Digital -InputCue4018=Item 3 Visible -InputSigType4018=Digital -InputCue4019=Item 4 Visible -InputSigType4019=Digital -InputCue4020=Item 5 Visible -InputSigType4020=Digital -InputCue4021=Item 6 Visible -InputSigType4021=Digital -InputCue4022=Item 7 Visible -InputSigType4022=Digital -InputCue4023=Item 8 Visible -InputSigType4023=Digital -InputCue4024=Item 9 Visible -InputSigType4024=Digital -InputCue4025=Item 10 Visible -InputSigType4025=Digital -InputCue4026=Item 11 Visible -InputSigType4026=Digital -InputCue4027=Item 12 Visible -InputSigType4027=Digital -InputCue4028=Item 13 Visible -InputSigType4028=Digital -InputCue4029=Item 14 Visible -InputSigType4029=Digital -InputCue4030=Item 15 Visible -InputSigType4030=Digital -InputCue4031=Item 16 Visible -InputSigType4031=Digital -InputCue4032=Item 17 Visible -InputSigType4032=Digital -InputCue4033=Item 18 Visible -InputSigType4033=Digital -InputCue4034=Item 19 Visible -InputSigType4034=Digital -InputCue4035=Item 20 Visible -InputSigType4035=Digital -InputCue4036=Item 21 Visible -InputSigType4036=Digital -InputCue4037=Item 22 Visible -InputSigType4037=Digital -InputCue4038=Item 23 Visible -InputSigType4038=Digital -InputCue4039=Item 24 Visible -InputSigType4039=Digital -InputCue4040=Item 25 Visible -InputSigType4040=Digital -InputCue4041=Item 26 Visible -InputSigType4041=Digital -InputCue4042=Item 27 Visible -InputSigType4042=Digital -InputCue4043=Item 28 Visible -InputSigType4043=Digital -InputCue4044=Item 29 Visible -InputSigType4044=Digital -InputCue4045=Item 30 Visible -InputSigType4045=Digital -InputCue4046=Item 31 Visible -InputSigType4046=Digital -InputCue4047=Item 32 Visible -InputSigType4047=Digital -InputCue4048=Item 33 Visible -InputSigType4048=Digital -InputCue4049=Item 34 Visible -InputSigType4049=Digital -InputCue4050=Item 35 Visible -InputSigType4050=Digital -InputCue4051=Item 36 Visible -InputSigType4051=Digital -InputCue4052=Item 37 Visible -InputSigType4052=Digital -InputCue4053=Item 38 Visible -InputSigType4053=Digital -InputCue4054=Item 39 Visible -InputSigType4054=Digital -InputCue4055=Item 40 Visible -InputSigType4055=Digital -InputCue4056=Item 41 Visible -InputSigType4056=Digital -InputCue4057=Item 42 Visible -InputSigType4057=Digital -InputCue4058=Item 43 Visible -InputSigType4058=Digital -InputCue4059=Item 44 Visible -InputSigType4059=Digital -InputCue4060=Item 45 Visible -InputSigType4060=Digital -InputCue4061=Item 46 Visible -InputSigType4061=Digital -InputCue4062=Item 47 Visible -InputSigType4062=Digital -InputCue4063=Item 48 Visible -InputSigType4063=Digital -InputCue4064=Item 49 Visible -InputSigType4064=Digital -InputCue4065=Item 50 Visible -InputSigType4065=Digital -InputCue4066=Item 51 Visible -InputSigType4066=Digital -InputCue4067=Item 52 Visible -InputSigType4067=Digital -InputCue4068=Item 53 Visible -InputSigType4068=Digital -InputCue4069=Item 54 Visible -InputSigType4069=Digital -InputCue4070=Item 55 Visible -InputSigType4070=Digital -InputCue4071=Item 56 Visible -InputSigType4071=Digital -InputCue4072=Item 57 Visible -InputSigType4072=Digital -InputCue4073=Item 58 Visible -InputSigType4073=Digital -InputCue4074=Item 59 Visible -InputSigType4074=Digital -InputCue4075=Item 60 Visible -InputSigType4075=Digital -InputCue4076=Item 61 Visible -InputSigType4076=Digital -InputCue4077=Item 62 Visible -InputSigType4077=Digital -InputCue4078=Item 63 Visible -InputSigType4078=Digital -InputCue4079=Item 64 Visible -InputSigType4079=Digital -InputCue4080=Item 65 Visible -InputSigType4080=Digital -InputCue4081=Item 66 Visible -InputSigType4081=Digital -InputCue4082=Item 67 Visible -InputSigType4082=Digital -InputCue4083=Item 68 Visible -InputSigType4083=Digital -InputCue4084=Item 69 Visible -InputSigType4084=Digital -InputCue4085=Item 70 Visible -InputSigType4085=Digital -InputCue4086=Item 71 Visible -InputSigType4086=Digital -InputCue4087=Item 72 Visible -InputSigType4087=Digital -InputCue4088=Item 73 Visible -InputSigType4088=Digital -InputCue4089=Item 74 Visible -InputSigType4089=Digital -InputCue4090=Item 75 Visible -InputSigType4090=Digital -InputCue4091=Item 76 Visible -InputSigType4091=Digital -InputCue4092=Item 77 Visible -InputSigType4092=Digital -InputCue4093=Item 78 Visible -InputSigType4093=Digital -InputCue4094=Item 79 Visible -InputSigType4094=Digital -InputCue4095=Item 80 Visible -InputSigType4095=Digital -InputCue4096=Item 81 Visible -InputSigType4096=Digital -InputCue4097=Item 82 Visible -InputSigType4097=Digital -InputCue4098=Item 83 Visible -InputSigType4098=Digital -InputCue4099=Item 84 Visible -InputSigType4099=Digital -InputCue4100=Item 85 Visible -InputSigType4100=Digital -InputCue4101=Item 86 Visible -InputSigType4101=Digital -InputCue4102=Item 87 Visible -InputSigType4102=Digital -InputCue4103=Item 88 Visible -InputSigType4103=Digital -InputCue4104=Item 89 Visible -InputSigType4104=Digital -InputCue4105=Item 90 Visible -InputSigType4105=Digital -InputCue4106=Item 91 Visible -InputSigType4106=Digital -InputCue4107=Item 92 Visible -InputSigType4107=Digital -InputCue4108=Item 93 Visible -InputSigType4108=Digital -InputCue4109=Item 94 Visible -InputSigType4109=Digital -InputCue4110=Item 95 Visible -InputSigType4110=Digital -InputCue4111=Item 96 Visible -InputSigType4111=Digital -InputCue4112=Item 97 Visible -InputSigType4112=Digital -InputCue4113=Item 98 Visible -InputSigType4113=Digital -InputCue4114=Item 99 Visible -InputSigType4114=Digital -InputCue4115=Item 100 Visible -InputSigType4115=Digital -InputCue4116=Item 101 Visible -InputSigType4116=Digital -InputCue4117=Item 102 Visible -InputSigType4117=Digital -InputCue4118=Item 103 Visible -InputSigType4118=Digital -InputCue4119=Item 104 Visible -InputSigType4119=Digital -InputCue4120=Item 105 Visible -InputSigType4120=Digital -InputCue4121=Item 106 Visible -InputSigType4121=Digital -InputCue4122=Item 107 Visible -InputSigType4122=Digital -InputCue4123=Item 108 Visible -InputSigType4123=Digital -InputCue4124=Item 109 Visible -InputSigType4124=Digital -InputCue4125=Item 110 Visible -InputSigType4125=Digital -InputCue4126=Item 111 Visible -InputSigType4126=Digital -InputCue4127=Item 112 Visible -InputSigType4127=Digital -InputCue4128=Item 113 Visible -InputSigType4128=Digital -InputCue4129=Item 114 Visible -InputSigType4129=Digital -InputCue4130=Item 115 Visible -InputSigType4130=Digital -InputCue4131=Item 116 Visible -InputSigType4131=Digital -InputCue4132=Item 117 Visible -InputSigType4132=Digital -InputCue4133=Item 118 Visible -InputSigType4133=Digital -InputCue4134=Item 119 Visible -InputSigType4134=Digital -InputCue4135=Item 120 Visible -InputSigType4135=Digital -InputCue4136=Item 121 Visible -InputSigType4136=Digital -InputCue4137=Item 122 Visible -InputSigType4137=Digital -InputCue4138=Item 123 Visible -InputSigType4138=Digital -InputCue4139=Item 124 Visible -InputSigType4139=Digital -InputCue4140=Item 125 Visible -InputSigType4140=Digital -InputCue4141=Item 126 Visible -InputSigType4141=Digital -InputCue4142=Item 127 Visible -InputSigType4142=Digital -InputCue4143=Item 128 Visible -InputSigType4143=Digital -InputCue4144=Item 129 Visible -InputSigType4144=Digital -InputCue4145=Item 130 Visible -InputSigType4145=Digital -InputCue4146=Item 131 Visible -InputSigType4146=Digital -InputCue4147=Item 132 Visible -InputSigType4147=Digital -InputCue4148=Item 133 Visible -InputSigType4148=Digital -InputCue4149=Item 134 Visible -InputSigType4149=Digital -InputCue4150=Item 135 Visible -InputSigType4150=Digital -InputCue4151=Item 136 Visible -InputSigType4151=Digital -InputCue4152=Item 137 Visible -InputSigType4152=Digital -InputCue4153=Item 138 Visible -InputSigType4153=Digital -InputCue4154=Item 139 Visible -InputSigType4154=Digital -InputCue4155=Item 140 Visible -InputSigType4155=Digital -InputCue4156=Item 141 Visible -InputSigType4156=Digital -InputCue4157=Item 142 Visible -InputSigType4157=Digital -InputCue4158=Item 143 Visible -InputSigType4158=Digital -InputCue4159=Item 144 Visible -InputSigType4159=Digital -InputCue4160=Item 145 Visible -InputSigType4160=Digital -InputCue4161=Item 146 Visible -InputSigType4161=Digital -InputCue4162=Item 147 Visible -InputSigType4162=Digital -InputCue4163=Item 148 Visible -InputSigType4163=Digital -InputCue4164=Item 149 Visible -InputSigType4164=Digital -InputCue4165=Item 150 Visible -InputSigType4165=Digital -InputCue4166=Item 151 Visible -InputSigType4166=Digital -InputCue4167=Item 152 Visible -InputSigType4167=Digital -InputCue4168=Item 153 Visible -InputSigType4168=Digital -InputCue4169=Item 154 Visible -InputSigType4169=Digital -InputCue4170=Item 155 Visible -InputSigType4170=Digital -InputCue4171=Item 156 Visible -InputSigType4171=Digital -InputCue4172=Item 157 Visible -InputSigType4172=Digital -InputCue4173=Item 158 Visible -InputSigType4173=Digital -InputCue4174=Item 159 Visible -InputSigType4174=Digital -InputCue4175=Item 160 Visible -InputSigType4175=Digital -InputCue4176=Item 161 Visible -InputSigType4176=Digital -InputCue4177=Item 162 Visible -InputSigType4177=Digital -InputCue4178=Item 163 Visible -InputSigType4178=Digital -InputCue4179=Item 164 Visible -InputSigType4179=Digital -InputCue4180=Item 165 Visible -InputSigType4180=Digital -InputCue4181=Item 166 Visible -InputSigType4181=Digital -InputCue4182=Item 167 Visible -InputSigType4182=Digital -InputCue4183=Item 168 Visible -InputSigType4183=Digital -InputCue4184=Item 169 Visible -InputSigType4184=Digital -InputCue4185=Item 170 Visible -InputSigType4185=Digital -InputCue4186=Item 171 Visible -InputSigType4186=Digital -InputCue4187=Item 172 Visible -InputSigType4187=Digital -InputCue4188=Item 173 Visible -InputSigType4188=Digital -InputCue4189=Item 174 Visible -InputSigType4189=Digital -InputCue4190=Item 175 Visible -InputSigType4190=Digital -InputCue4191=Item 176 Visible -InputSigType4191=Digital -InputCue4192=Item 177 Visible -InputSigType4192=Digital -InputCue4193=Item 178 Visible -InputSigType4193=Digital -InputCue4194=Item 179 Visible -InputSigType4194=Digital -InputCue4195=Item 180 Visible -InputSigType4195=Digital -InputCue4196=Item 181 Visible -InputSigType4196=Digital -InputCue4197=Item 182 Visible -InputSigType4197=Digital -InputCue4198=Item 183 Visible -InputSigType4198=Digital -InputCue4199=Item 184 Visible -InputSigType4199=Digital -InputCue4200=Item 185 Visible -InputSigType4200=Digital -InputCue4201=Item 186 Visible -InputSigType4201=Digital -InputCue4202=Item 187 Visible -InputSigType4202=Digital -InputCue4203=Item 188 Visible -InputSigType4203=Digital -InputCue4204=Item 189 Visible -InputSigType4204=Digital -InputCue4205=Item 190 Visible -InputSigType4205=Digital -InputCue4206=Item 191 Visible -InputSigType4206=Digital -InputCue4207=Item 192 Visible -InputSigType4207=Digital -InputCue4208=Item 193 Visible -InputSigType4208=Digital -InputCue4209=Item 194 Visible -InputSigType4209=Digital -InputCue4210=Item 195 Visible -InputSigType4210=Digital -InputCue4211=Item 196 Visible -InputSigType4211=Digital -InputCue4212=Item 197 Visible -InputSigType4212=Digital -InputCue4213=Item 198 Visible -InputSigType4213=Digital -InputCue4214=Item 199 Visible -InputSigType4214=Digital -InputCue4215=Item 200 Visible -InputSigType4215=Digital -InputCue4216=Item 201 Visible -InputSigType4216=Digital -InputCue4217=Item 202 Visible -InputSigType4217=Digital -InputCue4218=Item 203 Visible -InputSigType4218=Digital -InputCue4219=Item 204 Visible -InputSigType4219=Digital -InputCue4220=Item 205 Visible -InputSigType4220=Digital -InputCue4221=Item 206 Visible -InputSigType4221=Digital -InputCue4222=Item 207 Visible -InputSigType4222=Digital -InputCue4223=Item 208 Visible -InputSigType4223=Digital -InputCue4224=Item 209 Visible -InputSigType4224=Digital -InputCue4225=Item 210 Visible -InputSigType4225=Digital -InputCue4226=Item 211 Visible -InputSigType4226=Digital -InputCue4227=Item 212 Visible -InputSigType4227=Digital -InputCue4228=Item 213 Visible -InputSigType4228=Digital -InputCue4229=Item 214 Visible -InputSigType4229=Digital -InputCue4230=Item 215 Visible -InputSigType4230=Digital -InputCue4231=Item 216 Visible -InputSigType4231=Digital -InputCue4232=Item 217 Visible -InputSigType4232=Digital -InputCue4233=Item 218 Visible -InputSigType4233=Digital -InputCue4234=Item 219 Visible -InputSigType4234=Digital -InputCue4235=Item 220 Visible -InputSigType4235=Digital -InputCue4236=Item 221 Visible -InputSigType4236=Digital -InputCue4237=Item 222 Visible -InputSigType4237=Digital -InputCue4238=Item 223 Visible -InputSigType4238=Digital -InputCue4239=Item 224 Visible -InputSigType4239=Digital -InputCue4240=Item 225 Visible -InputSigType4240=Digital -InputCue4241=Item 226 Visible -InputSigType4241=Digital -InputCue4242=Item 227 Visible -InputSigType4242=Digital -InputCue4243=Item 228 Visible -InputSigType4243=Digital -InputCue4244=Item 229 Visible -InputSigType4244=Digital -InputCue4245=Item 230 Visible -InputSigType4245=Digital -InputCue4246=Item 231 Visible -InputSigType4246=Digital -InputCue4247=Item 232 Visible -InputSigType4247=Digital -InputCue4248=Item 233 Visible -InputSigType4248=Digital -InputCue4249=Item 234 Visible -InputSigType4249=Digital -InputCue4250=Item 235 Visible -InputSigType4250=Digital -InputCue4251=Item 236 Visible -InputSigType4251=Digital -InputCue4252=Item 237 Visible -InputSigType4252=Digital -InputCue4253=Item 238 Visible -InputSigType4253=Digital -InputCue4254=Item 239 Visible -InputSigType4254=Digital -InputCue4255=Item 240 Visible -InputSigType4255=Digital -InputCue4256=Item 241 Visible -InputSigType4256=Digital -InputCue4257=Item 242 Visible -InputSigType4257=Digital -InputCue4258=Item 243 Visible -InputSigType4258=Digital -InputCue4259=Item 244 Visible -InputSigType4259=Digital -InputCue4260=Item 245 Visible -InputSigType4260=Digital -InputCue4261=Item 246 Visible -InputSigType4261=Digital -InputCue4262=Item 247 Visible -InputSigType4262=Digital -InputCue4263=Item 248 Visible -InputSigType4263=Digital -InputCue4264=Item 249 Visible -InputSigType4264=Digital -InputCue4265=Item 250 Visible -InputSigType4265=Digital -InputCue4266=Item 251 Visible -InputSigType4266=Digital -InputCue4267=Item 252 Visible -InputSigType4267=Digital -InputCue4268=Item 253 Visible -InputSigType4268=Digital -InputCue4269=Item 254 Visible -InputSigType4269=Digital -InputCue4270=Item 255 Visible -InputSigType4270=Digital -InputCue4271=[~UNUSED2~] -InputSigType4271=Digital|Analog|Serial|String -InputCue6016=[~EndGroup~]Visible -InputSigType6016=Digital -OutputCue1=[~UNUSED3~] -OutputSigType1=Digital -OutputCue2=Is Moving -OutputSigType2=Digital -OutputCue3=[~UNUSED2~] -OutputSigType3=Digital -OutputCue4=[~UNUSED2~] -OutputSigType4=Digital -OutputCue5=[~UNUSED2~] -OutputSigType5=Digital -OutputCue6=[~UNUSED2~] -OutputSigType6=Digital -OutputCue7=[~UNUSED2~] -OutputSigType7=Digital -OutputCue8=[~UNUSED2~] -OutputSigType8=Digital -OutputCue9=[~UNUSED2~] -OutputSigType9=Digital -OutputCue10=[~UNUSED2~] -OutputSigType10=Digital -OutputCue11=[~BeginGroup~]Press -OutputSigType11=Digital -OutputCue12=Item 1 Pressed -OutputSigType12=Digital -OutputCue13=Item 2 Pressed -OutputSigType13=Digital -OutputCue14=Item 3 Pressed -OutputSigType14=Digital -OutputCue15=Item 4 Pressed -OutputSigType15=Digital -OutputCue16=Item 5 Pressed -OutputSigType16=Digital -OutputCue17=Item 6 Pressed -OutputSigType17=Digital -OutputCue18=Item 7 Pressed -OutputSigType18=Digital -OutputCue19=Item 8 Pressed -OutputSigType19=Digital -OutputCue20=Item 9 Pressed -OutputSigType20=Digital -OutputCue21=Item 10 Pressed -OutputSigType21=Digital -OutputCue22=Item 11 Pressed -OutputSigType22=Digital -OutputCue23=Item 12 Pressed -OutputSigType23=Digital -OutputCue24=Item 13 Pressed -OutputSigType24=Digital -OutputCue25=Item 14 Pressed -OutputSigType25=Digital -OutputCue26=Item 15 Pressed -OutputSigType26=Digital -OutputCue27=Item 16 Pressed -OutputSigType27=Digital -OutputCue28=Item 17 Pressed -OutputSigType28=Digital -OutputCue29=Item 18 Pressed -OutputSigType29=Digital -OutputCue30=Item 19 Pressed -OutputSigType30=Digital -OutputCue31=Item 20 Pressed -OutputSigType31=Digital -OutputCue32=Item 21 Pressed -OutputSigType32=Digital -OutputCue33=Item 22 Pressed -OutputSigType33=Digital -OutputCue34=Item 23 Pressed -OutputSigType34=Digital -OutputCue35=Item 24 Pressed -OutputSigType35=Digital -OutputCue36=Item 25 Pressed -OutputSigType36=Digital -OutputCue37=Item 26 Pressed -OutputSigType37=Digital -OutputCue38=Item 27 Pressed -OutputSigType38=Digital -OutputCue39=Item 28 Pressed -OutputSigType39=Digital -OutputCue40=Item 29 Pressed -OutputSigType40=Digital -OutputCue41=Item 30 Pressed -OutputSigType41=Digital -OutputCue42=Item 31 Pressed -OutputSigType42=Digital -OutputCue43=Item 32 Pressed -OutputSigType43=Digital -OutputCue44=Item 33 Pressed -OutputSigType44=Digital -OutputCue45=Item 34 Pressed -OutputSigType45=Digital -OutputCue46=Item 35 Pressed -OutputSigType46=Digital -OutputCue47=Item 36 Pressed -OutputSigType47=Digital -OutputCue48=Item 37 Pressed -OutputSigType48=Digital -OutputCue49=Item 38 Pressed -OutputSigType49=Digital -OutputCue50=Item 39 Pressed -OutputSigType50=Digital -OutputCue51=Item 40 Pressed -OutputSigType51=Digital -OutputCue52=Item 41 Pressed -OutputSigType52=Digital -OutputCue53=Item 42 Pressed -OutputSigType53=Digital -OutputCue54=Item 43 Pressed -OutputSigType54=Digital -OutputCue55=Item 44 Pressed -OutputSigType55=Digital -OutputCue56=Item 45 Pressed -OutputSigType56=Digital -OutputCue57=Item 46 Pressed -OutputSigType57=Digital -OutputCue58=Item 47 Pressed -OutputSigType58=Digital -OutputCue59=Item 48 Pressed -OutputSigType59=Digital -OutputCue60=Item 49 Pressed -OutputSigType60=Digital -OutputCue61=Item 50 Pressed -OutputSigType61=Digital -OutputCue62=Item 51 Pressed -OutputSigType62=Digital -OutputCue63=Item 52 Pressed -OutputSigType63=Digital -OutputCue64=Item 53 Pressed -OutputSigType64=Digital -OutputCue65=Item 54 Pressed -OutputSigType65=Digital -OutputCue66=Item 55 Pressed -OutputSigType66=Digital -OutputCue67=Item 56 Pressed -OutputSigType67=Digital -OutputCue68=Item 57 Pressed -OutputSigType68=Digital -OutputCue69=Item 58 Pressed -OutputSigType69=Digital -OutputCue70=Item 59 Pressed -OutputSigType70=Digital -OutputCue71=Item 60 Pressed -OutputSigType71=Digital -OutputCue72=Item 61 Pressed -OutputSigType72=Digital -OutputCue73=Item 62 Pressed -OutputSigType73=Digital -OutputCue74=Item 63 Pressed -OutputSigType74=Digital -OutputCue75=Item 64 Pressed -OutputSigType75=Digital -OutputCue76=Item 65 Pressed -OutputSigType76=Digital -OutputCue77=Item 66 Pressed -OutputSigType77=Digital -OutputCue78=Item 67 Pressed -OutputSigType78=Digital -OutputCue79=Item 68 Pressed -OutputSigType79=Digital -OutputCue80=Item 69 Pressed -OutputSigType80=Digital -OutputCue81=Item 70 Pressed -OutputSigType81=Digital -OutputCue82=Item 71 Pressed -OutputSigType82=Digital -OutputCue83=Item 72 Pressed -OutputSigType83=Digital -OutputCue84=Item 73 Pressed -OutputSigType84=Digital -OutputCue85=Item 74 Pressed -OutputSigType85=Digital -OutputCue86=Item 75 Pressed -OutputSigType86=Digital -OutputCue87=Item 76 Pressed -OutputSigType87=Digital -OutputCue88=Item 77 Pressed -OutputSigType88=Digital -OutputCue89=Item 78 Pressed -OutputSigType89=Digital -OutputCue90=Item 79 Pressed -OutputSigType90=Digital -OutputCue91=Item 80 Pressed -OutputSigType91=Digital -OutputCue92=Item 81 Pressed -OutputSigType92=Digital -OutputCue93=Item 82 Pressed -OutputSigType93=Digital -OutputCue94=Item 83 Pressed -OutputSigType94=Digital -OutputCue95=Item 84 Pressed -OutputSigType95=Digital -OutputCue96=Item 85 Pressed -OutputSigType96=Digital -OutputCue97=Item 86 Pressed -OutputSigType97=Digital -OutputCue98=Item 87 Pressed -OutputSigType98=Digital -OutputCue99=Item 88 Pressed -OutputSigType99=Digital -OutputCue100=Item 89 Pressed -OutputSigType100=Digital -OutputCue101=Item 90 Pressed -OutputSigType101=Digital -OutputCue102=Item 91 Pressed -OutputSigType102=Digital -OutputCue103=Item 92 Pressed -OutputSigType103=Digital -OutputCue104=Item 93 Pressed -OutputSigType104=Digital -OutputCue105=Item 94 Pressed -OutputSigType105=Digital -OutputCue106=Item 95 Pressed -OutputSigType106=Digital -OutputCue107=Item 96 Pressed -OutputSigType107=Digital -OutputCue108=Item 97 Pressed -OutputSigType108=Digital -OutputCue109=Item 98 Pressed -OutputSigType109=Digital -OutputCue110=Item 99 Pressed -OutputSigType110=Digital -OutputCue111=Item 100 Pressed -OutputSigType111=Digital -OutputCue112=Item 101 Pressed -OutputSigType112=Digital -OutputCue113=Item 102 Pressed -OutputSigType113=Digital -OutputCue114=Item 103 Pressed -OutputSigType114=Digital -OutputCue115=Item 104 Pressed -OutputSigType115=Digital -OutputCue116=Item 105 Pressed -OutputSigType116=Digital -OutputCue117=Item 106 Pressed -OutputSigType117=Digital -OutputCue118=Item 107 Pressed -OutputSigType118=Digital -OutputCue119=Item 108 Pressed -OutputSigType119=Digital -OutputCue120=Item 109 Pressed -OutputSigType120=Digital -OutputCue121=Item 110 Pressed -OutputSigType121=Digital -OutputCue122=Item 111 Pressed -OutputSigType122=Digital -OutputCue123=Item 112 Pressed -OutputSigType123=Digital -OutputCue124=Item 113 Pressed -OutputSigType124=Digital -OutputCue125=Item 114 Pressed -OutputSigType125=Digital -OutputCue126=Item 115 Pressed -OutputSigType126=Digital -OutputCue127=Item 116 Pressed -OutputSigType127=Digital -OutputCue128=Item 117 Pressed -OutputSigType128=Digital -OutputCue129=Item 118 Pressed -OutputSigType129=Digital -OutputCue130=Item 119 Pressed -OutputSigType130=Digital -OutputCue131=Item 120 Pressed -OutputSigType131=Digital -OutputCue132=Item 121 Pressed -OutputSigType132=Digital -OutputCue133=Item 122 Pressed -OutputSigType133=Digital -OutputCue134=Item 123 Pressed -OutputSigType134=Digital -OutputCue135=Item 124 Pressed -OutputSigType135=Digital -OutputCue136=Item 125 Pressed -OutputSigType136=Digital -OutputCue137=Item 126 Pressed -OutputSigType137=Digital -OutputCue138=Item 127 Pressed -OutputSigType138=Digital -OutputCue139=Item 128 Pressed -OutputSigType139=Digital -OutputCue140=Item 129 Pressed -OutputSigType140=Digital -OutputCue141=Item 130 Pressed -OutputSigType141=Digital -OutputCue142=Item 131 Pressed -OutputSigType142=Digital -OutputCue143=Item 132 Pressed -OutputSigType143=Digital -OutputCue144=Item 133 Pressed -OutputSigType144=Digital -OutputCue145=Item 134 Pressed -OutputSigType145=Digital -OutputCue146=Item 135 Pressed -OutputSigType146=Digital -OutputCue147=Item 136 Pressed -OutputSigType147=Digital -OutputCue148=Item 137 Pressed -OutputSigType148=Digital -OutputCue149=Item 138 Pressed -OutputSigType149=Digital -OutputCue150=Item 139 Pressed -OutputSigType150=Digital -OutputCue151=Item 140 Pressed -OutputSigType151=Digital -OutputCue152=Item 141 Pressed -OutputSigType152=Digital -OutputCue153=Item 142 Pressed -OutputSigType153=Digital -OutputCue154=Item 143 Pressed -OutputSigType154=Digital -OutputCue155=Item 144 Pressed -OutputSigType155=Digital -OutputCue156=Item 145 Pressed -OutputSigType156=Digital -OutputCue157=Item 146 Pressed -OutputSigType157=Digital -OutputCue158=Item 147 Pressed -OutputSigType158=Digital -OutputCue159=Item 148 Pressed -OutputSigType159=Digital -OutputCue160=Item 149 Pressed -OutputSigType160=Digital -OutputCue161=Item 150 Pressed -OutputSigType161=Digital -OutputCue162=Item 151 Pressed -OutputSigType162=Digital -OutputCue163=Item 152 Pressed -OutputSigType163=Digital -OutputCue164=Item 153 Pressed -OutputSigType164=Digital -OutputCue165=Item 154 Pressed -OutputSigType165=Digital -OutputCue166=Item 155 Pressed -OutputSigType166=Digital -OutputCue167=Item 156 Pressed -OutputSigType167=Digital -OutputCue168=Item 157 Pressed -OutputSigType168=Digital -OutputCue169=Item 158 Pressed -OutputSigType169=Digital -OutputCue170=Item 159 Pressed -OutputSigType170=Digital -OutputCue171=Item 160 Pressed -OutputSigType171=Digital -OutputCue172=Item 161 Pressed -OutputSigType172=Digital -OutputCue173=Item 162 Pressed -OutputSigType173=Digital -OutputCue174=Item 163 Pressed -OutputSigType174=Digital -OutputCue175=Item 164 Pressed -OutputSigType175=Digital -OutputCue176=Item 165 Pressed -OutputSigType176=Digital -OutputCue177=Item 166 Pressed -OutputSigType177=Digital -OutputCue178=Item 167 Pressed -OutputSigType178=Digital -OutputCue179=Item 168 Pressed -OutputSigType179=Digital -OutputCue180=Item 169 Pressed -OutputSigType180=Digital -OutputCue181=Item 170 Pressed -OutputSigType181=Digital -OutputCue182=Item 171 Pressed -OutputSigType182=Digital -OutputCue183=Item 172 Pressed -OutputSigType183=Digital -OutputCue184=Item 173 Pressed -OutputSigType184=Digital -OutputCue185=Item 174 Pressed -OutputSigType185=Digital -OutputCue186=Item 175 Pressed -OutputSigType186=Digital -OutputCue187=Item 176 Pressed -OutputSigType187=Digital -OutputCue188=Item 177 Pressed -OutputSigType188=Digital -OutputCue189=Item 178 Pressed -OutputSigType189=Digital -OutputCue190=Item 179 Pressed -OutputSigType190=Digital -OutputCue191=Item 180 Pressed -OutputSigType191=Digital -OutputCue192=Item 181 Pressed -OutputSigType192=Digital -OutputCue193=Item 182 Pressed -OutputSigType193=Digital -OutputCue194=Item 183 Pressed -OutputSigType194=Digital -OutputCue195=Item 184 Pressed -OutputSigType195=Digital -OutputCue196=Item 185 Pressed -OutputSigType196=Digital -OutputCue197=Item 186 Pressed -OutputSigType197=Digital -OutputCue198=Item 187 Pressed -OutputSigType198=Digital -OutputCue199=Item 188 Pressed -OutputSigType199=Digital -OutputCue200=Item 189 Pressed -OutputSigType200=Digital -OutputCue201=Item 190 Pressed -OutputSigType201=Digital -OutputCue202=Item 191 Pressed -OutputSigType202=Digital -OutputCue203=Item 192 Pressed -OutputSigType203=Digital -OutputCue204=Item 193 Pressed -OutputSigType204=Digital -OutputCue205=Item 194 Pressed -OutputSigType205=Digital -OutputCue206=Item 195 Pressed -OutputSigType206=Digital -OutputCue207=Item 196 Pressed -OutputSigType207=Digital -OutputCue208=Item 197 Pressed -OutputSigType208=Digital -OutputCue209=Item 198 Pressed -OutputSigType209=Digital -OutputCue210=Item 199 Pressed -OutputSigType210=Digital -OutputCue211=Item 200 Pressed -OutputSigType211=Digital -OutputCue212=Item 201 Pressed -OutputSigType212=Digital -OutputCue213=Item 202 Pressed -OutputSigType213=Digital -OutputCue214=Item 203 Pressed -OutputSigType214=Digital -OutputCue215=Item 204 Pressed -OutputSigType215=Digital -OutputCue216=Item 205 Pressed -OutputSigType216=Digital -OutputCue217=Item 206 Pressed -OutputSigType217=Digital -OutputCue218=Item 207 Pressed -OutputSigType218=Digital -OutputCue219=Item 208 Pressed -OutputSigType219=Digital -OutputCue220=Item 209 Pressed -OutputSigType220=Digital -OutputCue221=Item 210 Pressed -OutputSigType221=Digital -OutputCue222=Item 211 Pressed -OutputSigType222=Digital -OutputCue223=Item 212 Pressed -OutputSigType223=Digital -OutputCue224=Item 213 Pressed -OutputSigType224=Digital -OutputCue225=Item 214 Pressed -OutputSigType225=Digital -OutputCue226=Item 215 Pressed -OutputSigType226=Digital -OutputCue227=Item 216 Pressed -OutputSigType227=Digital -OutputCue228=Item 217 Pressed -OutputSigType228=Digital -OutputCue229=Item 218 Pressed -OutputSigType229=Digital -OutputCue230=Item 219 Pressed -OutputSigType230=Digital -OutputCue231=Item 220 Pressed -OutputSigType231=Digital -OutputCue232=Item 221 Pressed -OutputSigType232=Digital -OutputCue233=Item 222 Pressed -OutputSigType233=Digital -OutputCue234=Item 223 Pressed -OutputSigType234=Digital -OutputCue235=Item 224 Pressed -OutputSigType235=Digital -OutputCue236=Item 225 Pressed -OutputSigType236=Digital -OutputCue237=Item 226 Pressed -OutputSigType237=Digital -OutputCue238=Item 227 Pressed -OutputSigType238=Digital -OutputCue239=Item 228 Pressed -OutputSigType239=Digital -OutputCue240=Item 229 Pressed -OutputSigType240=Digital -OutputCue241=Item 230 Pressed -OutputSigType241=Digital -OutputCue242=Item 231 Pressed -OutputSigType242=Digital -OutputCue243=Item 232 Pressed -OutputSigType243=Digital -OutputCue244=Item 233 Pressed -OutputSigType244=Digital -OutputCue245=Item 234 Pressed -OutputSigType245=Digital -OutputCue246=Item 235 Pressed -OutputSigType246=Digital -OutputCue247=Item 236 Pressed -OutputSigType247=Digital -OutputCue248=Item 237 Pressed -OutputSigType248=Digital -OutputCue249=Item 238 Pressed -OutputSigType249=Digital -OutputCue250=Item 239 Pressed -OutputSigType250=Digital -OutputCue251=Item 240 Pressed -OutputSigType251=Digital -OutputCue252=Item 241 Pressed -OutputSigType252=Digital -OutputCue253=Item 242 Pressed -OutputSigType253=Digital -OutputCue254=Item 243 Pressed -OutputSigType254=Digital -OutputCue255=Item 244 Pressed -OutputSigType255=Digital -OutputCue256=Item 245 Pressed -OutputSigType256=Digital -OutputCue257=Item 246 Pressed -OutputSigType257=Digital -OutputCue258=Item 247 Pressed -OutputSigType258=Digital -OutputCue259=Item 248 Pressed -OutputSigType259=Digital -OutputCue260=Item 249 Pressed -OutputSigType260=Digital -OutputCue261=Item 250 Pressed -OutputSigType261=Digital -OutputCue262=Item 251 Pressed -OutputSigType262=Digital -OutputCue263=Item 252 Pressed -OutputSigType263=Digital -OutputCue264=Item 253 Pressed -OutputSigType264=Digital -OutputCue265=Item 254 Pressed -OutputSigType265=Digital -OutputCue266=Item 255 Pressed -OutputSigType266=Digital -OutputCue267=[~UNUSED2~] -OutputSigType267=Digital|Analog|Serial|String -OutputCue2012=[~EndGroup~]Press -OutputSigType2012=Digital -OutputCue2013=[~BeginGroup~]Enable -OutputSigType2013=Digital -OutputCue2014=[~UNUSED3~] -OutputSigType2014=Digital -OutputCue2015=[~UNUSED3~] -OutputSigType2015=Digital -OutputCue2016=[~UNUSED3~] -OutputSigType2016=Digital -OutputCue2017=[~UNUSED3~] -OutputSigType2017=Digital -OutputCue2018=[~UNUSED3~] -OutputSigType2018=Digital -OutputCue2019=[~UNUSED3~] -OutputSigType2019=Digital -OutputCue2020=[~UNUSED3~] -OutputSigType2020=Digital -OutputCue2021=[~UNUSED3~] -OutputSigType2021=Digital -OutputCue2022=[~UNUSED3~] -OutputSigType2022=Digital -OutputCue2023=[~UNUSED3~] -OutputSigType2023=Digital -OutputCue2024=[~UNUSED3~] -OutputSigType2024=Digital -OutputCue2025=[~UNUSED3~] -OutputSigType2025=Digital -OutputCue2026=[~UNUSED3~] -OutputSigType2026=Digital -OutputCue2027=[~UNUSED3~] -OutputSigType2027=Digital -OutputCue2028=[~UNUSED3~] -OutputSigType2028=Digital -OutputCue2029=[~UNUSED3~] -OutputSigType2029=Digital -OutputCue2030=[~UNUSED3~] -OutputSigType2030=Digital -OutputCue2031=[~UNUSED3~] -OutputSigType2031=Digital -OutputCue2032=[~UNUSED3~] -OutputSigType2032=Digital -OutputCue2033=[~UNUSED3~] -OutputSigType2033=Digital -OutputCue2034=[~UNUSED3~] -OutputSigType2034=Digital -OutputCue2035=[~UNUSED3~] -OutputSigType2035=Digital -OutputCue2036=[~UNUSED3~] -OutputSigType2036=Digital -OutputCue2037=[~UNUSED3~] -OutputSigType2037=Digital -OutputCue2038=[~UNUSED3~] -OutputSigType2038=Digital -OutputCue2039=[~UNUSED3~] -OutputSigType2039=Digital -OutputCue2040=[~UNUSED3~] -OutputSigType2040=Digital -OutputCue2041=[~UNUSED3~] -OutputSigType2041=Digital -OutputCue2042=[~UNUSED3~] -OutputSigType2042=Digital -OutputCue2043=[~UNUSED3~] -OutputSigType2043=Digital -OutputCue2044=[~UNUSED3~] -OutputSigType2044=Digital -OutputCue2045=[~UNUSED3~] -OutputSigType2045=Digital -OutputCue2046=[~UNUSED3~] -OutputSigType2046=Digital -OutputCue2047=[~UNUSED3~] -OutputSigType2047=Digital -OutputCue2048=[~UNUSED3~] -OutputSigType2048=Digital -OutputCue2049=[~UNUSED3~] -OutputSigType2049=Digital -OutputCue2050=[~UNUSED3~] -OutputSigType2050=Digital -OutputCue2051=[~UNUSED3~] -OutputSigType2051=Digital -OutputCue2052=[~UNUSED3~] -OutputSigType2052=Digital -OutputCue2053=[~UNUSED3~] -OutputSigType2053=Digital -OutputCue2054=[~UNUSED3~] -OutputSigType2054=Digital -OutputCue2055=[~UNUSED3~] -OutputSigType2055=Digital -OutputCue2056=[~UNUSED3~] -OutputSigType2056=Digital -OutputCue2057=[~UNUSED3~] -OutputSigType2057=Digital -OutputCue2058=[~UNUSED3~] -OutputSigType2058=Digital -OutputCue2059=[~UNUSED3~] -OutputSigType2059=Digital -OutputCue2060=[~UNUSED3~] -OutputSigType2060=Digital -OutputCue2061=[~UNUSED3~] -OutputSigType2061=Digital -OutputCue2062=[~UNUSED3~] -OutputSigType2062=Digital -OutputCue2063=[~UNUSED3~] -OutputSigType2063=Digital -OutputCue2064=[~UNUSED3~] -OutputSigType2064=Digital -OutputCue2065=[~UNUSED3~] -OutputSigType2065=Digital -OutputCue2066=[~UNUSED3~] -OutputSigType2066=Digital -OutputCue2067=[~UNUSED3~] -OutputSigType2067=Digital -OutputCue2068=[~UNUSED3~] -OutputSigType2068=Digital -OutputCue2069=[~UNUSED3~] -OutputSigType2069=Digital -OutputCue2070=[~UNUSED3~] -OutputSigType2070=Digital -OutputCue2071=[~UNUSED3~] -OutputSigType2071=Digital -OutputCue2072=[~UNUSED3~] -OutputSigType2072=Digital -OutputCue2073=[~UNUSED3~] -OutputSigType2073=Digital -OutputCue2074=[~UNUSED3~] -OutputSigType2074=Digital -OutputCue2075=[~UNUSED3~] -OutputSigType2075=Digital -OutputCue2076=[~UNUSED3~] -OutputSigType2076=Digital -OutputCue2077=[~UNUSED3~] -OutputSigType2077=Digital -OutputCue2078=[~UNUSED3~] -OutputSigType2078=Digital -OutputCue2079=[~UNUSED3~] -OutputSigType2079=Digital -OutputCue2080=[~UNUSED3~] -OutputSigType2080=Digital -OutputCue2081=[~UNUSED3~] -OutputSigType2081=Digital -OutputCue2082=[~UNUSED3~] -OutputSigType2082=Digital -OutputCue2083=[~UNUSED3~] -OutputSigType2083=Digital -OutputCue2084=[~UNUSED3~] -OutputSigType2084=Digital -OutputCue2085=[~UNUSED3~] -OutputSigType2085=Digital -OutputCue2086=[~UNUSED3~] -OutputSigType2086=Digital -OutputCue2087=[~UNUSED3~] -OutputSigType2087=Digital -OutputCue2088=[~UNUSED3~] -OutputSigType2088=Digital -OutputCue2089=[~UNUSED3~] -OutputSigType2089=Digital -OutputCue2090=[~UNUSED3~] -OutputSigType2090=Digital -OutputCue2091=[~UNUSED3~] -OutputSigType2091=Digital -OutputCue2092=[~UNUSED3~] -OutputSigType2092=Digital -OutputCue2093=[~UNUSED3~] -OutputSigType2093=Digital -OutputCue2094=[~UNUSED3~] -OutputSigType2094=Digital -OutputCue2095=[~UNUSED3~] -OutputSigType2095=Digital -OutputCue2096=[~UNUSED3~] -OutputSigType2096=Digital -OutputCue2097=[~UNUSED3~] -OutputSigType2097=Digital -OutputCue2098=[~UNUSED3~] -OutputSigType2098=Digital -OutputCue2099=[~UNUSED3~] -OutputSigType2099=Digital -OutputCue2100=[~UNUSED3~] -OutputSigType2100=Digital -OutputCue2101=[~UNUSED3~] -OutputSigType2101=Digital -OutputCue2102=[~UNUSED3~] -OutputSigType2102=Digital -OutputCue2103=[~UNUSED3~] -OutputSigType2103=Digital -OutputCue2104=[~UNUSED3~] -OutputSigType2104=Digital -OutputCue2105=[~UNUSED3~] -OutputSigType2105=Digital -OutputCue2106=[~UNUSED3~] -OutputSigType2106=Digital -OutputCue2107=[~UNUSED3~] -OutputSigType2107=Digital -OutputCue2108=[~UNUSED3~] -OutputSigType2108=Digital -OutputCue2109=[~UNUSED3~] -OutputSigType2109=Digital -OutputCue2110=[~UNUSED3~] -OutputSigType2110=Digital -OutputCue2111=[~UNUSED3~] -OutputSigType2111=Digital -OutputCue2112=[~UNUSED3~] -OutputSigType2112=Digital -OutputCue2113=[~UNUSED3~] -OutputSigType2113=Digital -OutputCue2114=[~UNUSED3~] -OutputSigType2114=Digital -OutputCue2115=[~UNUSED3~] -OutputSigType2115=Digital -OutputCue2116=[~UNUSED3~] -OutputSigType2116=Digital -OutputCue2117=[~UNUSED3~] -OutputSigType2117=Digital -OutputCue2118=[~UNUSED3~] -OutputSigType2118=Digital -OutputCue2119=[~UNUSED3~] -OutputSigType2119=Digital -OutputCue2120=[~UNUSED3~] -OutputSigType2120=Digital -OutputCue2121=[~UNUSED3~] -OutputSigType2121=Digital -OutputCue2122=[~UNUSED3~] -OutputSigType2122=Digital -OutputCue2123=[~UNUSED3~] -OutputSigType2123=Digital -OutputCue2124=[~UNUSED3~] -OutputSigType2124=Digital -OutputCue2125=[~UNUSED3~] -OutputSigType2125=Digital -OutputCue2126=[~UNUSED3~] -OutputSigType2126=Digital -OutputCue2127=[~UNUSED3~] -OutputSigType2127=Digital -OutputCue2128=[~UNUSED3~] -OutputSigType2128=Digital -OutputCue2129=[~UNUSED3~] -OutputSigType2129=Digital -OutputCue2130=[~UNUSED3~] -OutputSigType2130=Digital -OutputCue2131=[~UNUSED3~] -OutputSigType2131=Digital -OutputCue2132=[~UNUSED3~] -OutputSigType2132=Digital -OutputCue2133=[~UNUSED3~] -OutputSigType2133=Digital -OutputCue2134=[~UNUSED3~] -OutputSigType2134=Digital -OutputCue2135=[~UNUSED3~] -OutputSigType2135=Digital -OutputCue2136=[~UNUSED3~] -OutputSigType2136=Digital -OutputCue2137=[~UNUSED3~] -OutputSigType2137=Digital -OutputCue2138=[~UNUSED3~] -OutputSigType2138=Digital -OutputCue2139=[~UNUSED3~] -OutputSigType2139=Digital -OutputCue2140=[~UNUSED3~] -OutputSigType2140=Digital -OutputCue2141=[~UNUSED3~] -OutputSigType2141=Digital -OutputCue2142=[~UNUSED3~] -OutputSigType2142=Digital -OutputCue2143=[~UNUSED3~] -OutputSigType2143=Digital -OutputCue2144=[~UNUSED3~] -OutputSigType2144=Digital -OutputCue2145=[~UNUSED3~] -OutputSigType2145=Digital -OutputCue2146=[~UNUSED3~] -OutputSigType2146=Digital -OutputCue2147=[~UNUSED3~] -OutputSigType2147=Digital -OutputCue2148=[~UNUSED3~] -OutputSigType2148=Digital -OutputCue2149=[~UNUSED3~] -OutputSigType2149=Digital -OutputCue2150=[~UNUSED3~] -OutputSigType2150=Digital -OutputCue2151=[~UNUSED3~] -OutputSigType2151=Digital -OutputCue2152=[~UNUSED3~] -OutputSigType2152=Digital -OutputCue2153=[~UNUSED3~] -OutputSigType2153=Digital -OutputCue2154=[~UNUSED3~] -OutputSigType2154=Digital -OutputCue2155=[~UNUSED3~] -OutputSigType2155=Digital -OutputCue2156=[~UNUSED3~] -OutputSigType2156=Digital -OutputCue2157=[~UNUSED3~] -OutputSigType2157=Digital -OutputCue2158=[~UNUSED3~] -OutputSigType2158=Digital -OutputCue2159=[~UNUSED3~] -OutputSigType2159=Digital -OutputCue2160=[~UNUSED3~] -OutputSigType2160=Digital -OutputCue2161=[~UNUSED3~] -OutputSigType2161=Digital -OutputCue2162=[~UNUSED3~] -OutputSigType2162=Digital -OutputCue2163=[~UNUSED3~] -OutputSigType2163=Digital -OutputCue2164=[~UNUSED3~] -OutputSigType2164=Digital -OutputCue2165=[~UNUSED3~] -OutputSigType2165=Digital -OutputCue2166=[~UNUSED3~] -OutputSigType2166=Digital -OutputCue2167=[~UNUSED3~] -OutputSigType2167=Digital -OutputCue2168=[~UNUSED3~] -OutputSigType2168=Digital -OutputCue2169=[~UNUSED3~] -OutputSigType2169=Digital -OutputCue2170=[~UNUSED3~] -OutputSigType2170=Digital -OutputCue2171=[~UNUSED3~] -OutputSigType2171=Digital -OutputCue2172=[~UNUSED3~] -OutputSigType2172=Digital -OutputCue2173=[~UNUSED3~] -OutputSigType2173=Digital -OutputCue2174=[~UNUSED3~] -OutputSigType2174=Digital -OutputCue2175=[~UNUSED3~] -OutputSigType2175=Digital -OutputCue2176=[~UNUSED3~] -OutputSigType2176=Digital -OutputCue2177=[~UNUSED3~] -OutputSigType2177=Digital -OutputCue2178=[~UNUSED3~] -OutputSigType2178=Digital -OutputCue2179=[~UNUSED3~] -OutputSigType2179=Digital -OutputCue2180=[~UNUSED3~] -OutputSigType2180=Digital -OutputCue2181=[~UNUSED3~] -OutputSigType2181=Digital -OutputCue2182=[~UNUSED3~] -OutputSigType2182=Digital -OutputCue2183=[~UNUSED3~] -OutputSigType2183=Digital -OutputCue2184=[~UNUSED3~] -OutputSigType2184=Digital -OutputCue2185=[~UNUSED3~] -OutputSigType2185=Digital -OutputCue2186=[~UNUSED3~] -OutputSigType2186=Digital -OutputCue2187=[~UNUSED3~] -OutputSigType2187=Digital -OutputCue2188=[~UNUSED3~] -OutputSigType2188=Digital -OutputCue2189=[~UNUSED3~] -OutputSigType2189=Digital -OutputCue2190=[~UNUSED3~] -OutputSigType2190=Digital -OutputCue2191=[~UNUSED3~] -OutputSigType2191=Digital -OutputCue2192=[~UNUSED3~] -OutputSigType2192=Digital -OutputCue2193=[~UNUSED3~] -OutputSigType2193=Digital -OutputCue2194=[~UNUSED3~] -OutputSigType2194=Digital -OutputCue2195=[~UNUSED3~] -OutputSigType2195=Digital -OutputCue2196=[~UNUSED3~] -OutputSigType2196=Digital -OutputCue2197=[~UNUSED3~] -OutputSigType2197=Digital -OutputCue2198=[~UNUSED3~] -OutputSigType2198=Digital -OutputCue2199=[~UNUSED3~] -OutputSigType2199=Digital -OutputCue2200=[~UNUSED3~] -OutputSigType2200=Digital -OutputCue2201=[~UNUSED3~] -OutputSigType2201=Digital -OutputCue2202=[~UNUSED3~] -OutputSigType2202=Digital -OutputCue2203=[~UNUSED3~] -OutputSigType2203=Digital -OutputCue2204=[~UNUSED3~] -OutputSigType2204=Digital -OutputCue2205=[~UNUSED3~] -OutputSigType2205=Digital -OutputCue2206=[~UNUSED3~] -OutputSigType2206=Digital -OutputCue2207=[~UNUSED3~] -OutputSigType2207=Digital -OutputCue2208=[~UNUSED3~] -OutputSigType2208=Digital -OutputCue2209=[~UNUSED3~] -OutputSigType2209=Digital -OutputCue2210=[~UNUSED3~] -OutputSigType2210=Digital -OutputCue2211=[~UNUSED3~] -OutputSigType2211=Digital -OutputCue2212=[~UNUSED3~] -OutputSigType2212=Digital -OutputCue2213=[~UNUSED3~] -OutputSigType2213=Digital -OutputCue2214=[~UNUSED3~] -OutputSigType2214=Digital -OutputCue2215=[~UNUSED3~] -OutputSigType2215=Digital -OutputCue2216=[~UNUSED3~] -OutputSigType2216=Digital -OutputCue2217=[~UNUSED3~] -OutputSigType2217=Digital -OutputCue2218=[~UNUSED3~] -OutputSigType2218=Digital -OutputCue2219=[~UNUSED3~] -OutputSigType2219=Digital -OutputCue2220=[~UNUSED3~] -OutputSigType2220=Digital -OutputCue2221=[~UNUSED3~] -OutputSigType2221=Digital -OutputCue2222=[~UNUSED3~] -OutputSigType2222=Digital -OutputCue2223=[~UNUSED3~] -OutputSigType2223=Digital -OutputCue2224=[~UNUSED3~] -OutputSigType2224=Digital -OutputCue2225=[~UNUSED3~] -OutputSigType2225=Digital -OutputCue2226=[~UNUSED3~] -OutputSigType2226=Digital -OutputCue2227=[~UNUSED3~] -OutputSigType2227=Digital -OutputCue2228=[~UNUSED3~] -OutputSigType2228=Digital -OutputCue2229=[~UNUSED3~] -OutputSigType2229=Digital -OutputCue2230=[~UNUSED3~] -OutputSigType2230=Digital -OutputCue2231=[~UNUSED3~] -OutputSigType2231=Digital -OutputCue2232=[~UNUSED3~] -OutputSigType2232=Digital -OutputCue2233=[~UNUSED3~] -OutputSigType2233=Digital -OutputCue2234=[~UNUSED3~] -OutputSigType2234=Digital -OutputCue2235=[~UNUSED3~] -OutputSigType2235=Digital -OutputCue2236=[~UNUSED3~] -OutputSigType2236=Digital -OutputCue2237=[~UNUSED3~] -OutputSigType2237=Digital -OutputCue2238=[~UNUSED3~] -OutputSigType2238=Digital -OutputCue2239=[~UNUSED3~] -OutputSigType2239=Digital -OutputCue2240=[~UNUSED3~] -OutputSigType2240=Digital -OutputCue2241=[~UNUSED3~] -OutputSigType2241=Digital -OutputCue2242=[~UNUSED3~] -OutputSigType2242=Digital -OutputCue2243=[~UNUSED3~] -OutputSigType2243=Digital -OutputCue2244=[~UNUSED3~] -OutputSigType2244=Digital -OutputCue2245=[~UNUSED3~] -OutputSigType2245=Digital -OutputCue2246=[~UNUSED3~] -OutputSigType2246=Digital -OutputCue2247=[~UNUSED3~] -OutputSigType2247=Digital -OutputCue2248=[~UNUSED3~] -OutputSigType2248=Digital -OutputCue2249=[~UNUSED3~] -OutputSigType2249=Digital -OutputCue2250=[~UNUSED3~] -OutputSigType2250=Digital -OutputCue2251=[~UNUSED3~] -OutputSigType2251=Digital -OutputCue2252=[~UNUSED3~] -OutputSigType2252=Digital -OutputCue2253=[~UNUSED3~] -OutputSigType2253=Digital -OutputCue2254=[~UNUSED3~] -OutputSigType2254=Digital -OutputCue2255=[~UNUSED3~] -OutputSigType2255=Digital -OutputCue2256=[~UNUSED3~] -OutputSigType2256=Digital -OutputCue2257=[~UNUSED3~] -OutputSigType2257=Digital -OutputCue2258=[~UNUSED3~] -OutputSigType2258=Digital -OutputCue2259=[~UNUSED3~] -OutputSigType2259=Digital -OutputCue2260=[~UNUSED3~] -OutputSigType2260=Digital -OutputCue2261=[~UNUSED3~] -OutputSigType2261=Digital -OutputCue2262=[~UNUSED3~] -OutputSigType2262=Digital -OutputCue2263=[~UNUSED3~] -OutputSigType2263=Digital -OutputCue2264=[~UNUSED3~] -OutputSigType2264=Digital -OutputCue2265=[~UNUSED3~] -OutputSigType2265=Digital -OutputCue2266=[~UNUSED3~] -OutputSigType2266=Digital -OutputCue2267=[~UNUSED3~] -OutputSigType2267=Digital -OutputCue2268=[~UNUSED3~] -OutputSigType2268=Digital -OutputCue2269=[~UNUSED2~] -OutputSigType2269=Digital|Analog|Serial|String -OutputCue4014=[~EndGroup~]Enable -OutputSigType4014=Digital -OutputCue4015=[~BeginGroup~]Visible -OutputSigType4015=Digital -OutputCue4016=[~UNUSED3~] -OutputSigType4016=Digital -OutputCue4017=[~UNUSED3~] -OutputSigType4017=Digital -OutputCue4018=[~UNUSED3~] -OutputSigType4018=Digital -OutputCue4019=[~UNUSED3~] -OutputSigType4019=Digital -OutputCue4020=[~UNUSED3~] -OutputSigType4020=Digital -OutputCue4021=[~UNUSED3~] -OutputSigType4021=Digital -OutputCue4022=[~UNUSED3~] -OutputSigType4022=Digital -OutputCue4023=[~UNUSED3~] -OutputSigType4023=Digital -OutputCue4024=[~UNUSED3~] -OutputSigType4024=Digital -OutputCue4025=[~UNUSED3~] -OutputSigType4025=Digital -OutputCue4026=[~UNUSED3~] -OutputSigType4026=Digital -OutputCue4027=[~UNUSED3~] -OutputSigType4027=Digital -OutputCue4028=[~UNUSED3~] -OutputSigType4028=Digital -OutputCue4029=[~UNUSED3~] -OutputSigType4029=Digital -OutputCue4030=[~UNUSED3~] -OutputSigType4030=Digital -OutputCue4031=[~UNUSED3~] -OutputSigType4031=Digital -OutputCue4032=[~UNUSED3~] -OutputSigType4032=Digital -OutputCue4033=[~UNUSED3~] -OutputSigType4033=Digital -OutputCue4034=[~UNUSED3~] -OutputSigType4034=Digital -OutputCue4035=[~UNUSED3~] -OutputSigType4035=Digital -OutputCue4036=[~UNUSED3~] -OutputSigType4036=Digital -OutputCue4037=[~UNUSED3~] -OutputSigType4037=Digital -OutputCue4038=[~UNUSED3~] -OutputSigType4038=Digital -OutputCue4039=[~UNUSED3~] -OutputSigType4039=Digital -OutputCue4040=[~UNUSED3~] -OutputSigType4040=Digital -OutputCue4041=[~UNUSED3~] -OutputSigType4041=Digital -OutputCue4042=[~UNUSED3~] -OutputSigType4042=Digital -OutputCue4043=[~UNUSED3~] -OutputSigType4043=Digital -OutputCue4044=[~UNUSED3~] -OutputSigType4044=Digital -OutputCue4045=[~UNUSED3~] -OutputSigType4045=Digital -OutputCue4046=[~UNUSED3~] -OutputSigType4046=Digital -OutputCue4047=[~UNUSED3~] -OutputSigType4047=Digital -OutputCue4048=[~UNUSED3~] -OutputSigType4048=Digital -OutputCue4049=[~UNUSED3~] -OutputSigType4049=Digital -OutputCue4050=[~UNUSED3~] -OutputSigType4050=Digital -OutputCue4051=[~UNUSED3~] -OutputSigType4051=Digital -OutputCue4052=[~UNUSED3~] -OutputSigType4052=Digital -OutputCue4053=[~UNUSED3~] -OutputSigType4053=Digital -OutputCue4054=[~UNUSED3~] -OutputSigType4054=Digital -OutputCue4055=[~UNUSED3~] -OutputSigType4055=Digital -OutputCue4056=[~UNUSED3~] -OutputSigType4056=Digital -OutputCue4057=[~UNUSED3~] -OutputSigType4057=Digital -OutputCue4058=[~UNUSED3~] -OutputSigType4058=Digital -OutputCue4059=[~UNUSED3~] -OutputSigType4059=Digital -OutputCue4060=[~UNUSED3~] -OutputSigType4060=Digital -OutputCue4061=[~UNUSED3~] -OutputSigType4061=Digital -OutputCue4062=[~UNUSED3~] -OutputSigType4062=Digital -OutputCue4063=[~UNUSED3~] -OutputSigType4063=Digital -OutputCue4064=[~UNUSED3~] -OutputSigType4064=Digital -OutputCue4065=[~UNUSED3~] -OutputSigType4065=Digital -OutputCue4066=[~UNUSED3~] -OutputSigType4066=Digital -OutputCue4067=[~UNUSED3~] -OutputSigType4067=Digital -OutputCue4068=[~UNUSED3~] -OutputSigType4068=Digital -OutputCue4069=[~UNUSED3~] -OutputSigType4069=Digital -OutputCue4070=[~UNUSED3~] -OutputSigType4070=Digital -OutputCue4071=[~UNUSED3~] -OutputSigType4071=Digital -OutputCue4072=[~UNUSED3~] -OutputSigType4072=Digital -OutputCue4073=[~UNUSED3~] -OutputSigType4073=Digital -OutputCue4074=[~UNUSED3~] -OutputSigType4074=Digital -OutputCue4075=[~UNUSED3~] -OutputSigType4075=Digital -OutputCue4076=[~UNUSED3~] -OutputSigType4076=Digital -OutputCue4077=[~UNUSED3~] -OutputSigType4077=Digital -OutputCue4078=[~UNUSED3~] -OutputSigType4078=Digital -OutputCue4079=[~UNUSED3~] -OutputSigType4079=Digital -OutputCue4080=[~UNUSED3~] -OutputSigType4080=Digital -OutputCue4081=[~UNUSED3~] -OutputSigType4081=Digital -OutputCue4082=[~UNUSED3~] -OutputSigType4082=Digital -OutputCue4083=[~UNUSED3~] -OutputSigType4083=Digital -OutputCue4084=[~UNUSED3~] -OutputSigType4084=Digital -OutputCue4085=[~UNUSED3~] -OutputSigType4085=Digital -OutputCue4086=[~UNUSED3~] -OutputSigType4086=Digital -OutputCue4087=[~UNUSED3~] -OutputSigType4087=Digital -OutputCue4088=[~UNUSED3~] -OutputSigType4088=Digital -OutputCue4089=[~UNUSED3~] -OutputSigType4089=Digital -OutputCue4090=[~UNUSED3~] -OutputSigType4090=Digital -OutputCue4091=[~UNUSED3~] -OutputSigType4091=Digital -OutputCue4092=[~UNUSED3~] -OutputSigType4092=Digital -OutputCue4093=[~UNUSED3~] -OutputSigType4093=Digital -OutputCue4094=[~UNUSED3~] -OutputSigType4094=Digital -OutputCue4095=[~UNUSED3~] -OutputSigType4095=Digital -OutputCue4096=[~UNUSED3~] -OutputSigType4096=Digital -OutputCue4097=[~UNUSED3~] -OutputSigType4097=Digital -OutputCue4098=[~UNUSED3~] -OutputSigType4098=Digital -OutputCue4099=[~UNUSED3~] -OutputSigType4099=Digital -OutputCue4100=[~UNUSED3~] -OutputSigType4100=Digital -OutputCue4101=[~UNUSED3~] -OutputSigType4101=Digital -OutputCue4102=[~UNUSED3~] -OutputSigType4102=Digital -OutputCue4103=[~UNUSED3~] -OutputSigType4103=Digital -OutputCue4104=[~UNUSED3~] -OutputSigType4104=Digital -OutputCue4105=[~UNUSED3~] -OutputSigType4105=Digital -OutputCue4106=[~UNUSED3~] -OutputSigType4106=Digital -OutputCue4107=[~UNUSED3~] -OutputSigType4107=Digital -OutputCue4108=[~UNUSED3~] -OutputSigType4108=Digital -OutputCue4109=[~UNUSED3~] -OutputSigType4109=Digital -OutputCue4110=[~UNUSED3~] -OutputSigType4110=Digital -OutputCue4111=[~UNUSED3~] -OutputSigType4111=Digital -OutputCue4112=[~UNUSED3~] -OutputSigType4112=Digital -OutputCue4113=[~UNUSED3~] -OutputSigType4113=Digital -OutputCue4114=[~UNUSED3~] -OutputSigType4114=Digital -OutputCue4115=[~UNUSED3~] -OutputSigType4115=Digital -OutputCue4116=[~UNUSED3~] -OutputSigType4116=Digital -OutputCue4117=[~UNUSED3~] -OutputSigType4117=Digital -OutputCue4118=[~UNUSED3~] -OutputSigType4118=Digital -OutputCue4119=[~UNUSED3~] -OutputSigType4119=Digital -OutputCue4120=[~UNUSED3~] -OutputSigType4120=Digital -OutputCue4121=[~UNUSED3~] -OutputSigType4121=Digital -OutputCue4122=[~UNUSED3~] -OutputSigType4122=Digital -OutputCue4123=[~UNUSED3~] -OutputSigType4123=Digital -OutputCue4124=[~UNUSED3~] -OutputSigType4124=Digital -OutputCue4125=[~UNUSED3~] -OutputSigType4125=Digital -OutputCue4126=[~UNUSED3~] -OutputSigType4126=Digital -OutputCue4127=[~UNUSED3~] -OutputSigType4127=Digital -OutputCue4128=[~UNUSED3~] -OutputSigType4128=Digital -OutputCue4129=[~UNUSED3~] -OutputSigType4129=Digital -OutputCue4130=[~UNUSED3~] -OutputSigType4130=Digital -OutputCue4131=[~UNUSED3~] -OutputSigType4131=Digital -OutputCue4132=[~UNUSED3~] -OutputSigType4132=Digital -OutputCue4133=[~UNUSED3~] -OutputSigType4133=Digital -OutputCue4134=[~UNUSED3~] -OutputSigType4134=Digital -OutputCue4135=[~UNUSED3~] -OutputSigType4135=Digital -OutputCue4136=[~UNUSED3~] -OutputSigType4136=Digital -OutputCue4137=[~UNUSED3~] -OutputSigType4137=Digital -OutputCue4138=[~UNUSED3~] -OutputSigType4138=Digital -OutputCue4139=[~UNUSED3~] -OutputSigType4139=Digital -OutputCue4140=[~UNUSED3~] -OutputSigType4140=Digital -OutputCue4141=[~UNUSED3~] -OutputSigType4141=Digital -OutputCue4142=[~UNUSED3~] -OutputSigType4142=Digital -OutputCue4143=[~UNUSED3~] -OutputSigType4143=Digital -OutputCue4144=[~UNUSED3~] -OutputSigType4144=Digital -OutputCue4145=[~UNUSED3~] -OutputSigType4145=Digital -OutputCue4146=[~UNUSED3~] -OutputSigType4146=Digital -OutputCue4147=[~UNUSED3~] -OutputSigType4147=Digital -OutputCue4148=[~UNUSED3~] -OutputSigType4148=Digital -OutputCue4149=[~UNUSED3~] -OutputSigType4149=Digital -OutputCue4150=[~UNUSED3~] -OutputSigType4150=Digital -OutputCue4151=[~UNUSED3~] -OutputSigType4151=Digital -OutputCue4152=[~UNUSED3~] -OutputSigType4152=Digital -OutputCue4153=[~UNUSED3~] -OutputSigType4153=Digital -OutputCue4154=[~UNUSED3~] -OutputSigType4154=Digital -OutputCue4155=[~UNUSED3~] -OutputSigType4155=Digital -OutputCue4156=[~UNUSED3~] -OutputSigType4156=Digital -OutputCue4157=[~UNUSED3~] -OutputSigType4157=Digital -OutputCue4158=[~UNUSED3~] -OutputSigType4158=Digital -OutputCue4159=[~UNUSED3~] -OutputSigType4159=Digital -OutputCue4160=[~UNUSED3~] -OutputSigType4160=Digital -OutputCue4161=[~UNUSED3~] -OutputSigType4161=Digital -OutputCue4162=[~UNUSED3~] -OutputSigType4162=Digital -OutputCue4163=[~UNUSED3~] -OutputSigType4163=Digital -OutputCue4164=[~UNUSED3~] -OutputSigType4164=Digital -OutputCue4165=[~UNUSED3~] -OutputSigType4165=Digital -OutputCue4166=[~UNUSED3~] -OutputSigType4166=Digital -OutputCue4167=[~UNUSED3~] -OutputSigType4167=Digital -OutputCue4168=[~UNUSED3~] -OutputSigType4168=Digital -OutputCue4169=[~UNUSED3~] -OutputSigType4169=Digital -OutputCue4170=[~UNUSED3~] -OutputSigType4170=Digital -OutputCue4171=[~UNUSED3~] -OutputSigType4171=Digital -OutputCue4172=[~UNUSED3~] -OutputSigType4172=Digital -OutputCue4173=[~UNUSED3~] -OutputSigType4173=Digital -OutputCue4174=[~UNUSED3~] -OutputSigType4174=Digital -OutputCue4175=[~UNUSED3~] -OutputSigType4175=Digital -OutputCue4176=[~UNUSED3~] -OutputSigType4176=Digital -OutputCue4177=[~UNUSED3~] -OutputSigType4177=Digital -OutputCue4178=[~UNUSED3~] -OutputSigType4178=Digital -OutputCue4179=[~UNUSED3~] -OutputSigType4179=Digital -OutputCue4180=[~UNUSED3~] -OutputSigType4180=Digital -OutputCue4181=[~UNUSED3~] -OutputSigType4181=Digital -OutputCue4182=[~UNUSED3~] -OutputSigType4182=Digital -OutputCue4183=[~UNUSED3~] -OutputSigType4183=Digital -OutputCue4184=[~UNUSED3~] -OutputSigType4184=Digital -OutputCue4185=[~UNUSED3~] -OutputSigType4185=Digital -OutputCue4186=[~UNUSED3~] -OutputSigType4186=Digital -OutputCue4187=[~UNUSED3~] -OutputSigType4187=Digital -OutputCue4188=[~UNUSED3~] -OutputSigType4188=Digital -OutputCue4189=[~UNUSED3~] -OutputSigType4189=Digital -OutputCue4190=[~UNUSED3~] -OutputSigType4190=Digital -OutputCue4191=[~UNUSED3~] -OutputSigType4191=Digital -OutputCue4192=[~UNUSED3~] -OutputSigType4192=Digital -OutputCue4193=[~UNUSED3~] -OutputSigType4193=Digital -OutputCue4194=[~UNUSED3~] -OutputSigType4194=Digital -OutputCue4195=[~UNUSED3~] -OutputSigType4195=Digital -OutputCue4196=[~UNUSED3~] -OutputSigType4196=Digital -OutputCue4197=[~UNUSED3~] -OutputSigType4197=Digital -OutputCue4198=[~UNUSED3~] -OutputSigType4198=Digital -OutputCue4199=[~UNUSED3~] -OutputSigType4199=Digital -OutputCue4200=[~UNUSED3~] -OutputSigType4200=Digital -OutputCue4201=[~UNUSED3~] -OutputSigType4201=Digital -OutputCue4202=[~UNUSED3~] -OutputSigType4202=Digital -OutputCue4203=[~UNUSED3~] -OutputSigType4203=Digital -OutputCue4204=[~UNUSED3~] -OutputSigType4204=Digital -OutputCue4205=[~UNUSED3~] -OutputSigType4205=Digital -OutputCue4206=[~UNUSED3~] -OutputSigType4206=Digital -OutputCue4207=[~UNUSED3~] -OutputSigType4207=Digital -OutputCue4208=[~UNUSED3~] -OutputSigType4208=Digital -OutputCue4209=[~UNUSED3~] -OutputSigType4209=Digital -OutputCue4210=[~UNUSED3~] -OutputSigType4210=Digital -OutputCue4211=[~UNUSED3~] -OutputSigType4211=Digital -OutputCue4212=[~UNUSED3~] -OutputSigType4212=Digital -OutputCue4213=[~UNUSED3~] -OutputSigType4213=Digital -OutputCue4214=[~UNUSED3~] -OutputSigType4214=Digital -OutputCue4215=[~UNUSED3~] -OutputSigType4215=Digital -OutputCue4216=[~UNUSED3~] -OutputSigType4216=Digital -OutputCue4217=[~UNUSED3~] -OutputSigType4217=Digital -OutputCue4218=[~UNUSED3~] -OutputSigType4218=Digital -OutputCue4219=[~UNUSED3~] -OutputSigType4219=Digital -OutputCue4220=[~UNUSED3~] -OutputSigType4220=Digital -OutputCue4221=[~UNUSED3~] -OutputSigType4221=Digital -OutputCue4222=[~UNUSED3~] -OutputSigType4222=Digital -OutputCue4223=[~UNUSED3~] -OutputSigType4223=Digital -OutputCue4224=[~UNUSED3~] -OutputSigType4224=Digital -OutputCue4225=[~UNUSED3~] -OutputSigType4225=Digital -OutputCue4226=[~UNUSED3~] -OutputSigType4226=Digital -OutputCue4227=[~UNUSED3~] -OutputSigType4227=Digital -OutputCue4228=[~UNUSED3~] -OutputSigType4228=Digital -OutputCue4229=[~UNUSED3~] -OutputSigType4229=Digital -OutputCue4230=[~UNUSED3~] -OutputSigType4230=Digital -OutputCue4231=[~UNUSED3~] -OutputSigType4231=Digital -OutputCue4232=[~UNUSED3~] -OutputSigType4232=Digital -OutputCue4233=[~UNUSED3~] -OutputSigType4233=Digital -OutputCue4234=[~UNUSED3~] -OutputSigType4234=Digital -OutputCue4235=[~UNUSED3~] -OutputSigType4235=Digital -OutputCue4236=[~UNUSED3~] -OutputSigType4236=Digital -OutputCue4237=[~UNUSED3~] -OutputSigType4237=Digital -OutputCue4238=[~UNUSED3~] -OutputSigType4238=Digital -OutputCue4239=[~UNUSED3~] -OutputSigType4239=Digital -OutputCue4240=[~UNUSED3~] -OutputSigType4240=Digital -OutputCue4241=[~UNUSED3~] -OutputSigType4241=Digital -OutputCue4242=[~UNUSED3~] -OutputSigType4242=Digital -OutputCue4243=[~UNUSED3~] -OutputSigType4243=Digital -OutputCue4244=[~UNUSED3~] -OutputSigType4244=Digital -OutputCue4245=[~UNUSED3~] -OutputSigType4245=Digital -OutputCue4246=[~UNUSED3~] -OutputSigType4246=Digital -OutputCue4247=[~UNUSED3~] -OutputSigType4247=Digital -OutputCue4248=[~UNUSED3~] -OutputSigType4248=Digital -OutputCue4249=[~UNUSED3~] -OutputSigType4249=Digital -OutputCue4250=[~UNUSED3~] -OutputSigType4250=Digital -OutputCue4251=[~UNUSED3~] -OutputSigType4251=Digital -OutputCue4252=[~UNUSED3~] -OutputSigType4252=Digital -OutputCue4253=[~UNUSED3~] -OutputSigType4253=Digital -OutputCue4254=[~UNUSED3~] -OutputSigType4254=Digital -OutputCue4255=[~UNUSED3~] -OutputSigType4255=Digital -OutputCue4256=[~UNUSED3~] -OutputSigType4256=Digital -OutputCue4257=[~UNUSED3~] -OutputSigType4257=Digital -OutputCue4258=[~UNUSED3~] -OutputSigType4258=Digital -OutputCue4259=[~UNUSED3~] -OutputSigType4259=Digital -OutputCue4260=[~UNUSED3~] -OutputSigType4260=Digital -OutputCue4261=[~UNUSED3~] -OutputSigType4261=Digital -OutputCue4262=[~UNUSED3~] -OutputSigType4262=Digital -OutputCue4263=[~UNUSED3~] -OutputSigType4263=Digital -OutputCue4264=[~UNUSED3~] -OutputSigType4264=Digital -OutputCue4265=[~UNUSED3~] -OutputSigType4265=Digital -OutputCue4266=[~UNUSED3~] -OutputSigType4266=Digital -OutputCue4267=[~UNUSED3~] -OutputSigType4267=Digital -OutputCue4268=[~UNUSED3~] -OutputSigType4268=Digital -OutputCue4269=[~UNUSED3~] -OutputSigType4269=Digital -OutputCue4270=[~UNUSED3~] -OutputSigType4270=Digital -OutputCue4271=[~UNUSED2~] -OutputSigType4271=Digital|Analog|Serial|String -OutputCue6016=[~EndGroup~]Visible -OutputSigType6016=Digital -InputList2Cue1=[~UNUSED3~] -InputList2SigType1=Analog -InputList2Cue2=[~UNUSED3~] -InputList2SigType2=Analog -InputList2Cue3=Scroll To Item -InputList2SigType3=Analog -InputList2Cue4=Set Number of Items -InputList2SigType4=Analog -InputList2Cue5=[~UNUSED2~] -InputList2SigType5=Analog -InputList2Cue6=[~UNUSED2~] -InputList2SigType6=Analog -InputList2Cue7=[~UNUSED2~] -InputList2SigType7=Analog -InputList2Cue8=[~UNUSED2~] -InputList2SigType8=Analog -InputList2Cue9=[~UNUSED2~] -InputList2SigType9=Analog -InputList2Cue10=[~UNUSED2~] -InputList2SigType10=Analog -InputList2Cue11=[~BeginGroup~]Item Icons -InputList2SigType11=Analog -InputList2Cue12=Set Item 1 Icon Analog -InputList2SigType12=Analog -InputList2Cue13=Set Item 2 Icon Analog -InputList2SigType13=Analog -InputList2Cue14=Set Item 3 Icon Analog -InputList2SigType14=Analog -InputList2Cue15=Set Item 4 Icon Analog -InputList2SigType15=Analog -InputList2Cue16=Set Item 5 Icon Analog -InputList2SigType16=Analog -InputList2Cue17=Set Item 6 Icon Analog -InputList2SigType17=Analog -InputList2Cue18=Set Item 7 Icon Analog -InputList2SigType18=Analog -InputList2Cue19=Set Item 8 Icon Analog -InputList2SigType19=Analog -InputList2Cue20=Set Item 9 Icon Analog -InputList2SigType20=Analog -InputList2Cue21=Set Item 10 Icon Analog -InputList2SigType21=Analog -InputList2Cue22=Set Item 11 Icon Analog -InputList2SigType22=Analog -InputList2Cue23=Set Item 12 Icon Analog -InputList2SigType23=Analog -InputList2Cue24=Set Item 13 Icon Analog -InputList2SigType24=Analog -InputList2Cue25=Set Item 14 Icon Analog -InputList2SigType25=Analog -InputList2Cue26=Set Item 15 Icon Analog -InputList2SigType26=Analog -InputList2Cue27=Set Item 16 Icon Analog -InputList2SigType27=Analog -InputList2Cue28=Set Item 17 Icon Analog -InputList2SigType28=Analog -InputList2Cue29=Set Item 18 Icon Analog -InputList2SigType29=Analog -InputList2Cue30=Set Item 19 Icon Analog -InputList2SigType30=Analog -InputList2Cue31=Set Item 20 Icon Analog -InputList2SigType31=Analog -InputList2Cue32=Set Item 21 Icon Analog -InputList2SigType32=Analog -InputList2Cue33=Set Item 22 Icon Analog -InputList2SigType33=Analog -InputList2Cue34=Set Item 23 Icon Analog -InputList2SigType34=Analog -InputList2Cue35=Set Item 24 Icon Analog -InputList2SigType35=Analog -InputList2Cue36=Set Item 25 Icon Analog -InputList2SigType36=Analog -InputList2Cue37=Set Item 26 Icon Analog -InputList2SigType37=Analog -InputList2Cue38=Set Item 27 Icon Analog -InputList2SigType38=Analog -InputList2Cue39=Set Item 28 Icon Analog -InputList2SigType39=Analog -InputList2Cue40=Set Item 29 Icon Analog -InputList2SigType40=Analog -InputList2Cue41=Set Item 30 Icon Analog -InputList2SigType41=Analog -InputList2Cue42=Set Item 31 Icon Analog -InputList2SigType42=Analog -InputList2Cue43=Set Item 32 Icon Analog -InputList2SigType43=Analog -InputList2Cue44=Set Item 33 Icon Analog -InputList2SigType44=Analog -InputList2Cue45=Set Item 34 Icon Analog -InputList2SigType45=Analog -InputList2Cue46=Set Item 35 Icon Analog -InputList2SigType46=Analog -InputList2Cue47=Set Item 36 Icon Analog -InputList2SigType47=Analog -InputList2Cue48=Set Item 37 Icon Analog -InputList2SigType48=Analog -InputList2Cue49=Set Item 38 Icon Analog -InputList2SigType49=Analog -InputList2Cue50=Set Item 39 Icon Analog -InputList2SigType50=Analog -InputList2Cue51=Set Item 40 Icon Analog -InputList2SigType51=Analog -InputList2Cue52=Set Item 41 Icon Analog -InputList2SigType52=Analog -InputList2Cue53=Set Item 42 Icon Analog -InputList2SigType53=Analog -InputList2Cue54=Set Item 43 Icon Analog -InputList2SigType54=Analog -InputList2Cue55=Set Item 44 Icon Analog -InputList2SigType55=Analog -InputList2Cue56=Set Item 45 Icon Analog -InputList2SigType56=Analog -InputList2Cue57=Set Item 46 Icon Analog -InputList2SigType57=Analog -InputList2Cue58=Set Item 47 Icon Analog -InputList2SigType58=Analog -InputList2Cue59=Set Item 48 Icon Analog -InputList2SigType59=Analog -InputList2Cue60=Set Item 49 Icon Analog -InputList2SigType60=Analog -InputList2Cue61=Set Item 50 Icon Analog -InputList2SigType61=Analog -InputList2Cue62=Set Item 51 Icon Analog -InputList2SigType62=Analog -InputList2Cue63=Set Item 52 Icon Analog -InputList2SigType63=Analog -InputList2Cue64=Set Item 53 Icon Analog -InputList2SigType64=Analog -InputList2Cue65=Set Item 54 Icon Analog -InputList2SigType65=Analog -InputList2Cue66=Set Item 55 Icon Analog -InputList2SigType66=Analog -InputList2Cue67=Set Item 56 Icon Analog -InputList2SigType67=Analog -InputList2Cue68=Set Item 57 Icon Analog -InputList2SigType68=Analog -InputList2Cue69=Set Item 58 Icon Analog -InputList2SigType69=Analog -InputList2Cue70=Set Item 59 Icon Analog -InputList2SigType70=Analog -InputList2Cue71=Set Item 60 Icon Analog -InputList2SigType71=Analog -InputList2Cue72=Set Item 61 Icon Analog -InputList2SigType72=Analog -InputList2Cue73=Set Item 62 Icon Analog -InputList2SigType73=Analog -InputList2Cue74=Set Item 63 Icon Analog -InputList2SigType74=Analog -InputList2Cue75=Set Item 64 Icon Analog -InputList2SigType75=Analog -InputList2Cue76=Set Item 65 Icon Analog -InputList2SigType76=Analog -InputList2Cue77=Set Item 66 Icon Analog -InputList2SigType77=Analog -InputList2Cue78=Set Item 67 Icon Analog -InputList2SigType78=Analog -InputList2Cue79=Set Item 68 Icon Analog -InputList2SigType79=Analog -InputList2Cue80=Set Item 69 Icon Analog -InputList2SigType80=Analog -InputList2Cue81=Set Item 70 Icon Analog -InputList2SigType81=Analog -InputList2Cue82=Set Item 71 Icon Analog -InputList2SigType82=Analog -InputList2Cue83=Set Item 72 Icon Analog -InputList2SigType83=Analog -InputList2Cue84=Set Item 73 Icon Analog -InputList2SigType84=Analog -InputList2Cue85=Set Item 74 Icon Analog -InputList2SigType85=Analog -InputList2Cue86=Set Item 75 Icon Analog -InputList2SigType86=Analog -InputList2Cue87=Set Item 76 Icon Analog -InputList2SigType87=Analog -InputList2Cue88=Set Item 77 Icon Analog -InputList2SigType88=Analog -InputList2Cue89=Set Item 78 Icon Analog -InputList2SigType89=Analog -InputList2Cue90=Set Item 79 Icon Analog -InputList2SigType90=Analog -InputList2Cue91=Set Item 80 Icon Analog -InputList2SigType91=Analog -InputList2Cue92=Set Item 81 Icon Analog -InputList2SigType92=Analog -InputList2Cue93=Set Item 82 Icon Analog -InputList2SigType93=Analog -InputList2Cue94=Set Item 83 Icon Analog -InputList2SigType94=Analog -InputList2Cue95=Set Item 84 Icon Analog -InputList2SigType95=Analog -InputList2Cue96=Set Item 85 Icon Analog -InputList2SigType96=Analog -InputList2Cue97=Set Item 86 Icon Analog -InputList2SigType97=Analog -InputList2Cue98=Set Item 87 Icon Analog -InputList2SigType98=Analog -InputList2Cue99=Set Item 88 Icon Analog -InputList2SigType99=Analog -InputList2Cue100=Set Item 89 Icon Analog -InputList2SigType100=Analog -InputList2Cue101=Set Item 90 Icon Analog -InputList2SigType101=Analog -InputList2Cue102=Set Item 91 Icon Analog -InputList2SigType102=Analog -InputList2Cue103=Set Item 92 Icon Analog -InputList2SigType103=Analog -InputList2Cue104=Set Item 93 Icon Analog -InputList2SigType104=Analog -InputList2Cue105=Set Item 94 Icon Analog -InputList2SigType105=Analog -InputList2Cue106=Set Item 95 Icon Analog -InputList2SigType106=Analog -InputList2Cue107=Set Item 96 Icon Analog -InputList2SigType107=Analog -InputList2Cue108=Set Item 97 Icon Analog -InputList2SigType108=Analog -InputList2Cue109=Set Item 98 Icon Analog -InputList2SigType109=Analog -InputList2Cue110=Set Item 99 Icon Analog -InputList2SigType110=Analog -InputList2Cue111=Set Item 100 Icon Analog -InputList2SigType111=Analog -InputList2Cue112=Set Item 101 Icon Analog -InputList2SigType112=Analog -InputList2Cue113=Set Item 102 Icon Analog -InputList2SigType113=Analog -InputList2Cue114=Set Item 103 Icon Analog -InputList2SigType114=Analog -InputList2Cue115=Set Item 104 Icon Analog -InputList2SigType115=Analog -InputList2Cue116=Set Item 105 Icon Analog -InputList2SigType116=Analog -InputList2Cue117=Set Item 106 Icon Analog -InputList2SigType117=Analog -InputList2Cue118=Set Item 107 Icon Analog -InputList2SigType118=Analog -InputList2Cue119=Set Item 108 Icon Analog -InputList2SigType119=Analog -InputList2Cue120=Set Item 109 Icon Analog -InputList2SigType120=Analog -InputList2Cue121=Set Item 110 Icon Analog -InputList2SigType121=Analog -InputList2Cue122=Set Item 111 Icon Analog -InputList2SigType122=Analog -InputList2Cue123=Set Item 112 Icon Analog -InputList2SigType123=Analog -InputList2Cue124=Set Item 113 Icon Analog -InputList2SigType124=Analog -InputList2Cue125=Set Item 114 Icon Analog -InputList2SigType125=Analog -InputList2Cue126=Set Item 115 Icon Analog -InputList2SigType126=Analog -InputList2Cue127=Set Item 116 Icon Analog -InputList2SigType127=Analog -InputList2Cue128=Set Item 117 Icon Analog -InputList2SigType128=Analog -InputList2Cue129=Set Item 118 Icon Analog -InputList2SigType129=Analog -InputList2Cue130=Set Item 119 Icon Analog -InputList2SigType130=Analog -InputList2Cue131=Set Item 120 Icon Analog -InputList2SigType131=Analog -InputList2Cue132=Set Item 121 Icon Analog -InputList2SigType132=Analog -InputList2Cue133=Set Item 122 Icon Analog -InputList2SigType133=Analog -InputList2Cue134=Set Item 123 Icon Analog -InputList2SigType134=Analog -InputList2Cue135=Set Item 124 Icon Analog -InputList2SigType135=Analog -InputList2Cue136=Set Item 125 Icon Analog -InputList2SigType136=Analog -InputList2Cue137=Set Item 126 Icon Analog -InputList2SigType137=Analog -InputList2Cue138=Set Item 127 Icon Analog -InputList2SigType138=Analog -InputList2Cue139=Set Item 128 Icon Analog -InputList2SigType139=Analog -InputList2Cue140=Set Item 129 Icon Analog -InputList2SigType140=Analog -InputList2Cue141=Set Item 130 Icon Analog -InputList2SigType141=Analog -InputList2Cue142=Set Item 131 Icon Analog -InputList2SigType142=Analog -InputList2Cue143=Set Item 132 Icon Analog -InputList2SigType143=Analog -InputList2Cue144=Set Item 133 Icon Analog -InputList2SigType144=Analog -InputList2Cue145=Set Item 134 Icon Analog -InputList2SigType145=Analog -InputList2Cue146=Set Item 135 Icon Analog -InputList2SigType146=Analog -InputList2Cue147=Set Item 136 Icon Analog -InputList2SigType147=Analog -InputList2Cue148=Set Item 137 Icon Analog -InputList2SigType148=Analog -InputList2Cue149=Set Item 138 Icon Analog -InputList2SigType149=Analog -InputList2Cue150=Set Item 139 Icon Analog -InputList2SigType150=Analog -InputList2Cue151=Set Item 140 Icon Analog -InputList2SigType151=Analog -InputList2Cue152=Set Item 141 Icon Analog -InputList2SigType152=Analog -InputList2Cue153=Set Item 142 Icon Analog -InputList2SigType153=Analog -InputList2Cue154=Set Item 143 Icon Analog -InputList2SigType154=Analog -InputList2Cue155=Set Item 144 Icon Analog -InputList2SigType155=Analog -InputList2Cue156=Set Item 145 Icon Analog -InputList2SigType156=Analog -InputList2Cue157=Set Item 146 Icon Analog -InputList2SigType157=Analog -InputList2Cue158=Set Item 147 Icon Analog -InputList2SigType158=Analog -InputList2Cue159=Set Item 148 Icon Analog -InputList2SigType159=Analog -InputList2Cue160=Set Item 149 Icon Analog -InputList2SigType160=Analog -InputList2Cue161=Set Item 150 Icon Analog -InputList2SigType161=Analog -InputList2Cue162=Set Item 151 Icon Analog -InputList2SigType162=Analog -InputList2Cue163=Set Item 152 Icon Analog -InputList2SigType163=Analog -InputList2Cue164=Set Item 153 Icon Analog -InputList2SigType164=Analog -InputList2Cue165=Set Item 154 Icon Analog -InputList2SigType165=Analog -InputList2Cue166=Set Item 155 Icon Analog -InputList2SigType166=Analog -InputList2Cue167=Set Item 156 Icon Analog -InputList2SigType167=Analog -InputList2Cue168=Set Item 157 Icon Analog -InputList2SigType168=Analog -InputList2Cue169=Set Item 158 Icon Analog -InputList2SigType169=Analog -InputList2Cue170=Set Item 159 Icon Analog -InputList2SigType170=Analog -InputList2Cue171=Set Item 160 Icon Analog -InputList2SigType171=Analog -InputList2Cue172=Set Item 161 Icon Analog -InputList2SigType172=Analog -InputList2Cue173=Set Item 162 Icon Analog -InputList2SigType173=Analog -InputList2Cue174=Set Item 163 Icon Analog -InputList2SigType174=Analog -InputList2Cue175=Set Item 164 Icon Analog -InputList2SigType175=Analog -InputList2Cue176=Set Item 165 Icon Analog -InputList2SigType176=Analog -InputList2Cue177=Set Item 166 Icon Analog -InputList2SigType177=Analog -InputList2Cue178=Set Item 167 Icon Analog -InputList2SigType178=Analog -InputList2Cue179=Set Item 168 Icon Analog -InputList2SigType179=Analog -InputList2Cue180=Set Item 169 Icon Analog -InputList2SigType180=Analog -InputList2Cue181=Set Item 170 Icon Analog -InputList2SigType181=Analog -InputList2Cue182=Set Item 171 Icon Analog -InputList2SigType182=Analog -InputList2Cue183=Set Item 172 Icon Analog -InputList2SigType183=Analog -InputList2Cue184=Set Item 173 Icon Analog -InputList2SigType184=Analog -InputList2Cue185=Set Item 174 Icon Analog -InputList2SigType185=Analog -InputList2Cue186=Set Item 175 Icon Analog -InputList2SigType186=Analog -InputList2Cue187=Set Item 176 Icon Analog -InputList2SigType187=Analog -InputList2Cue188=Set Item 177 Icon Analog -InputList2SigType188=Analog -InputList2Cue189=Set Item 178 Icon Analog -InputList2SigType189=Analog -InputList2Cue190=Set Item 179 Icon Analog -InputList2SigType190=Analog -InputList2Cue191=Set Item 180 Icon Analog -InputList2SigType191=Analog -InputList2Cue192=Set Item 181 Icon Analog -InputList2SigType192=Analog -InputList2Cue193=Set Item 182 Icon Analog -InputList2SigType193=Analog -InputList2Cue194=Set Item 183 Icon Analog -InputList2SigType194=Analog -InputList2Cue195=Set Item 184 Icon Analog -InputList2SigType195=Analog -InputList2Cue196=Set Item 185 Icon Analog -InputList2SigType196=Analog -InputList2Cue197=Set Item 186 Icon Analog -InputList2SigType197=Analog -InputList2Cue198=Set Item 187 Icon Analog -InputList2SigType198=Analog -InputList2Cue199=Set Item 188 Icon Analog -InputList2SigType199=Analog -InputList2Cue200=Set Item 189 Icon Analog -InputList2SigType200=Analog -InputList2Cue201=Set Item 190 Icon Analog -InputList2SigType201=Analog -InputList2Cue202=Set Item 191 Icon Analog -InputList2SigType202=Analog -InputList2Cue203=Set Item 192 Icon Analog -InputList2SigType203=Analog -InputList2Cue204=Set Item 193 Icon Analog -InputList2SigType204=Analog -InputList2Cue205=Set Item 194 Icon Analog -InputList2SigType205=Analog -InputList2Cue206=Set Item 195 Icon Analog -InputList2SigType206=Analog -InputList2Cue207=Set Item 196 Icon Analog -InputList2SigType207=Analog -InputList2Cue208=Set Item 197 Icon Analog -InputList2SigType208=Analog -InputList2Cue209=Set Item 198 Icon Analog -InputList2SigType209=Analog -InputList2Cue210=Set Item 199 Icon Analog -InputList2SigType210=Analog -InputList2Cue211=Set Item 200 Icon Analog -InputList2SigType211=Analog -InputList2Cue212=Set Item 201 Icon Analog -InputList2SigType212=Analog -InputList2Cue213=Set Item 202 Icon Analog -InputList2SigType213=Analog -InputList2Cue214=Set Item 203 Icon Analog -InputList2SigType214=Analog -InputList2Cue215=Set Item 204 Icon Analog -InputList2SigType215=Analog -InputList2Cue216=Set Item 205 Icon Analog -InputList2SigType216=Analog -InputList2Cue217=Set Item 206 Icon Analog -InputList2SigType217=Analog -InputList2Cue218=Set Item 207 Icon Analog -InputList2SigType218=Analog -InputList2Cue219=Set Item 208 Icon Analog -InputList2SigType219=Analog -InputList2Cue220=Set Item 209 Icon Analog -InputList2SigType220=Analog -InputList2Cue221=Set Item 210 Icon Analog -InputList2SigType221=Analog -InputList2Cue222=Set Item 211 Icon Analog -InputList2SigType222=Analog -InputList2Cue223=Set Item 212 Icon Analog -InputList2SigType223=Analog -InputList2Cue224=Set Item 213 Icon Analog -InputList2SigType224=Analog -InputList2Cue225=Set Item 214 Icon Analog -InputList2SigType225=Analog -InputList2Cue226=Set Item 215 Icon Analog -InputList2SigType226=Analog -InputList2Cue227=Set Item 216 Icon Analog -InputList2SigType227=Analog -InputList2Cue228=Set Item 217 Icon Analog -InputList2SigType228=Analog -InputList2Cue229=Set Item 218 Icon Analog -InputList2SigType229=Analog -InputList2Cue230=Set Item 219 Icon Analog -InputList2SigType230=Analog -InputList2Cue231=Set Item 220 Icon Analog -InputList2SigType231=Analog -InputList2Cue232=Set Item 221 Icon Analog -InputList2SigType232=Analog -InputList2Cue233=Set Item 222 Icon Analog -InputList2SigType233=Analog -InputList2Cue234=Set Item 223 Icon Analog -InputList2SigType234=Analog -InputList2Cue235=Set Item 224 Icon Analog -InputList2SigType235=Analog -InputList2Cue236=Set Item 225 Icon Analog -InputList2SigType236=Analog -InputList2Cue237=Set Item 226 Icon Analog -InputList2SigType237=Analog -InputList2Cue238=Set Item 227 Icon Analog -InputList2SigType238=Analog -InputList2Cue239=Set Item 228 Icon Analog -InputList2SigType239=Analog -InputList2Cue240=Set Item 229 Icon Analog -InputList2SigType240=Analog -InputList2Cue241=Set Item 230 Icon Analog -InputList2SigType241=Analog -InputList2Cue242=Set Item 231 Icon Analog -InputList2SigType242=Analog -InputList2Cue243=Set Item 232 Icon Analog -InputList2SigType243=Analog -InputList2Cue244=Set Item 233 Icon Analog -InputList2SigType244=Analog -InputList2Cue245=Set Item 234 Icon Analog -InputList2SigType245=Analog -InputList2Cue246=Set Item 235 Icon Analog -InputList2SigType246=Analog -InputList2Cue247=Set Item 236 Icon Analog -InputList2SigType247=Analog -InputList2Cue248=Set Item 237 Icon Analog -InputList2SigType248=Analog -InputList2Cue249=Set Item 238 Icon Analog -InputList2SigType249=Analog -InputList2Cue250=Set Item 239 Icon Analog -InputList2SigType250=Analog -InputList2Cue251=Set Item 240 Icon Analog -InputList2SigType251=Analog -InputList2Cue252=Set Item 241 Icon Analog -InputList2SigType252=Analog -InputList2Cue253=Set Item 242 Icon Analog -InputList2SigType253=Analog -InputList2Cue254=Set Item 243 Icon Analog -InputList2SigType254=Analog -InputList2Cue255=Set Item 244 Icon Analog -InputList2SigType255=Analog -InputList2Cue256=Set Item 245 Icon Analog -InputList2SigType256=Analog -InputList2Cue257=Set Item 246 Icon Analog -InputList2SigType257=Analog -InputList2Cue258=Set Item 247 Icon Analog -InputList2SigType258=Analog -InputList2Cue259=Set Item 248 Icon Analog -InputList2SigType259=Analog -InputList2Cue260=Set Item 249 Icon Analog -InputList2SigType260=Analog -InputList2Cue261=Set Item 250 Icon Analog -InputList2SigType261=Analog -InputList2Cue262=Set Item 251 Icon Analog -InputList2SigType262=Analog -InputList2Cue263=Set Item 252 Icon Analog -InputList2SigType263=Analog -InputList2Cue264=Set Item 253 Icon Analog -InputList2SigType264=Analog -InputList2Cue265=Set Item 254 Icon Analog -InputList2SigType265=Analog -InputList2Cue266=Set Item 255 Icon Analog -InputList2SigType266=Analog -InputList2Cue267=[~UNUSED2~] -InputList2SigType267=Digital|Analog|Serial|String -InputList2Cue2012=[~EndGroup~]Item Icons -InputList2SigType2012=Analog -OutputList2Cue1=Item Clicked -OutputList2SigType1=Analog -OutputList2Cue2=Item Held -OutputList2SigType2=Analog -OutputList2Cue3=[~UNUSED3~] -OutputList2SigType3=Analog -OutputList2Cue4=[~UNUSED3~] -OutputList2SigType4=Analog -OutputList2Cue5=[~UNUSED2~] -OutputList2SigType5=Analog -OutputList2Cue6=[~UNUSED2~] -OutputList2SigType6=Analog -OutputList2Cue7=[~UNUSED2~] -OutputList2SigType7=Analog -OutputList2Cue8=[~UNUSED2~] -OutputList2SigType8=Analog -OutputList2Cue9=[~UNUSED2~] -OutputList2SigType9=Analog -OutputList2Cue10=[~UNUSED2~] -OutputList2SigType10=Analog -OutputList2Cue11=[~BeginGroup~]Item Icons -OutputList2SigType11=Analog -OutputList2Cue12=[~UNUSED3~] -OutputList2SigType12=Analog -OutputList2Cue13=[~UNUSED3~] -OutputList2SigType13=Analog -OutputList2Cue14=[~UNUSED3~] -OutputList2SigType14=Analog -OutputList2Cue15=[~UNUSED3~] -OutputList2SigType15=Analog -OutputList2Cue16=[~UNUSED3~] -OutputList2SigType16=Analog -OutputList2Cue17=[~UNUSED3~] -OutputList2SigType17=Analog -OutputList2Cue18=[~UNUSED3~] -OutputList2SigType18=Analog -OutputList2Cue19=[~UNUSED3~] -OutputList2SigType19=Analog -OutputList2Cue20=[~UNUSED3~] -OutputList2SigType20=Analog -OutputList2Cue21=[~UNUSED3~] -OutputList2SigType21=Analog -OutputList2Cue22=[~UNUSED3~] -OutputList2SigType22=Analog -OutputList2Cue23=[~UNUSED3~] -OutputList2SigType23=Analog -OutputList2Cue24=[~UNUSED3~] -OutputList2SigType24=Analog -OutputList2Cue25=[~UNUSED3~] -OutputList2SigType25=Analog -OutputList2Cue26=[~UNUSED3~] -OutputList2SigType26=Analog -OutputList2Cue27=[~UNUSED3~] -OutputList2SigType27=Analog -OutputList2Cue28=[~UNUSED3~] -OutputList2SigType28=Analog -OutputList2Cue29=[~UNUSED3~] -OutputList2SigType29=Analog -OutputList2Cue30=[~UNUSED3~] -OutputList2SigType30=Analog -OutputList2Cue31=[~UNUSED3~] -OutputList2SigType31=Analog -OutputList2Cue32=[~UNUSED3~] -OutputList2SigType32=Analog -OutputList2Cue33=[~UNUSED3~] -OutputList2SigType33=Analog -OutputList2Cue34=[~UNUSED3~] -OutputList2SigType34=Analog -OutputList2Cue35=[~UNUSED3~] -OutputList2SigType35=Analog -OutputList2Cue36=[~UNUSED3~] -OutputList2SigType36=Analog -OutputList2Cue37=[~UNUSED3~] -OutputList2SigType37=Analog -OutputList2Cue38=[~UNUSED3~] -OutputList2SigType38=Analog -OutputList2Cue39=[~UNUSED3~] -OutputList2SigType39=Analog -OutputList2Cue40=[~UNUSED3~] -OutputList2SigType40=Analog -OutputList2Cue41=[~UNUSED3~] -OutputList2SigType41=Analog -OutputList2Cue42=[~UNUSED3~] -OutputList2SigType42=Analog -OutputList2Cue43=[~UNUSED3~] -OutputList2SigType43=Analog -OutputList2Cue44=[~UNUSED3~] -OutputList2SigType44=Analog -OutputList2Cue45=[~UNUSED3~] -OutputList2SigType45=Analog -OutputList2Cue46=[~UNUSED3~] -OutputList2SigType46=Analog -OutputList2Cue47=[~UNUSED3~] -OutputList2SigType47=Analog -OutputList2Cue48=[~UNUSED3~] -OutputList2SigType48=Analog -OutputList2Cue49=[~UNUSED3~] -OutputList2SigType49=Analog -OutputList2Cue50=[~UNUSED3~] -OutputList2SigType50=Analog -OutputList2Cue51=[~UNUSED3~] -OutputList2SigType51=Analog -OutputList2Cue52=[~UNUSED3~] -OutputList2SigType52=Analog -OutputList2Cue53=[~UNUSED3~] -OutputList2SigType53=Analog -OutputList2Cue54=[~UNUSED3~] -OutputList2SigType54=Analog -OutputList2Cue55=[~UNUSED3~] -OutputList2SigType55=Analog -OutputList2Cue56=[~UNUSED3~] -OutputList2SigType56=Analog -OutputList2Cue57=[~UNUSED3~] -OutputList2SigType57=Analog -OutputList2Cue58=[~UNUSED3~] -OutputList2SigType58=Analog -OutputList2Cue59=[~UNUSED3~] -OutputList2SigType59=Analog -OutputList2Cue60=[~UNUSED3~] -OutputList2SigType60=Analog -OutputList2Cue61=[~UNUSED3~] -OutputList2SigType61=Analog -OutputList2Cue62=[~UNUSED3~] -OutputList2SigType62=Analog -OutputList2Cue63=[~UNUSED3~] -OutputList2SigType63=Analog -OutputList2Cue64=[~UNUSED3~] -OutputList2SigType64=Analog -OutputList2Cue65=[~UNUSED3~] -OutputList2SigType65=Analog -OutputList2Cue66=[~UNUSED3~] -OutputList2SigType66=Analog -OutputList2Cue67=[~UNUSED3~] -OutputList2SigType67=Analog -OutputList2Cue68=[~UNUSED3~] -OutputList2SigType68=Analog -OutputList2Cue69=[~UNUSED3~] -OutputList2SigType69=Analog -OutputList2Cue70=[~UNUSED3~] -OutputList2SigType70=Analog -OutputList2Cue71=[~UNUSED3~] -OutputList2SigType71=Analog -OutputList2Cue72=[~UNUSED3~] -OutputList2SigType72=Analog -OutputList2Cue73=[~UNUSED3~] -OutputList2SigType73=Analog -OutputList2Cue74=[~UNUSED3~] -OutputList2SigType74=Analog -OutputList2Cue75=[~UNUSED3~] -OutputList2SigType75=Analog -OutputList2Cue76=[~UNUSED3~] -OutputList2SigType76=Analog -OutputList2Cue77=[~UNUSED3~] -OutputList2SigType77=Analog -OutputList2Cue78=[~UNUSED3~] -OutputList2SigType78=Analog -OutputList2Cue79=[~UNUSED3~] -OutputList2SigType79=Analog -OutputList2Cue80=[~UNUSED3~] -OutputList2SigType80=Analog -OutputList2Cue81=[~UNUSED3~] -OutputList2SigType81=Analog -OutputList2Cue82=[~UNUSED3~] -OutputList2SigType82=Analog -OutputList2Cue83=[~UNUSED3~] -OutputList2SigType83=Analog -OutputList2Cue84=[~UNUSED3~] -OutputList2SigType84=Analog -OutputList2Cue85=[~UNUSED3~] -OutputList2SigType85=Analog -OutputList2Cue86=[~UNUSED3~] -OutputList2SigType86=Analog -OutputList2Cue87=[~UNUSED3~] -OutputList2SigType87=Analog -OutputList2Cue88=[~UNUSED3~] -OutputList2SigType88=Analog -OutputList2Cue89=[~UNUSED3~] -OutputList2SigType89=Analog -OutputList2Cue90=[~UNUSED3~] -OutputList2SigType90=Analog -OutputList2Cue91=[~UNUSED3~] -OutputList2SigType91=Analog -OutputList2Cue92=[~UNUSED3~] -OutputList2SigType92=Analog -OutputList2Cue93=[~UNUSED3~] -OutputList2SigType93=Analog -OutputList2Cue94=[~UNUSED3~] -OutputList2SigType94=Analog -OutputList2Cue95=[~UNUSED3~] -OutputList2SigType95=Analog -OutputList2Cue96=[~UNUSED3~] -OutputList2SigType96=Analog -OutputList2Cue97=[~UNUSED3~] -OutputList2SigType97=Analog -OutputList2Cue98=[~UNUSED3~] -OutputList2SigType98=Analog -OutputList2Cue99=[~UNUSED3~] -OutputList2SigType99=Analog -OutputList2Cue100=[~UNUSED3~] -OutputList2SigType100=Analog -OutputList2Cue101=[~UNUSED3~] -OutputList2SigType101=Analog -OutputList2Cue102=[~UNUSED3~] -OutputList2SigType102=Analog -OutputList2Cue103=[~UNUSED3~] -OutputList2SigType103=Analog -OutputList2Cue104=[~UNUSED3~] -OutputList2SigType104=Analog -OutputList2Cue105=[~UNUSED3~] -OutputList2SigType105=Analog -OutputList2Cue106=[~UNUSED3~] -OutputList2SigType106=Analog -OutputList2Cue107=[~UNUSED3~] -OutputList2SigType107=Analog -OutputList2Cue108=[~UNUSED3~] -OutputList2SigType108=Analog -OutputList2Cue109=[~UNUSED3~] -OutputList2SigType109=Analog -OutputList2Cue110=[~UNUSED3~] -OutputList2SigType110=Analog -OutputList2Cue111=[~UNUSED3~] -OutputList2SigType111=Analog -OutputList2Cue112=[~UNUSED3~] -OutputList2SigType112=Analog -OutputList2Cue113=[~UNUSED3~] -OutputList2SigType113=Analog -OutputList2Cue114=[~UNUSED3~] -OutputList2SigType114=Analog -OutputList2Cue115=[~UNUSED3~] -OutputList2SigType115=Analog -OutputList2Cue116=[~UNUSED3~] -OutputList2SigType116=Analog -OutputList2Cue117=[~UNUSED3~] -OutputList2SigType117=Analog -OutputList2Cue118=[~UNUSED3~] -OutputList2SigType118=Analog -OutputList2Cue119=[~UNUSED3~] -OutputList2SigType119=Analog -OutputList2Cue120=[~UNUSED3~] -OutputList2SigType120=Analog -OutputList2Cue121=[~UNUSED3~] -OutputList2SigType121=Analog -OutputList2Cue122=[~UNUSED3~] -OutputList2SigType122=Analog -OutputList2Cue123=[~UNUSED3~] -OutputList2SigType123=Analog -OutputList2Cue124=[~UNUSED3~] -OutputList2SigType124=Analog -OutputList2Cue125=[~UNUSED3~] -OutputList2SigType125=Analog -OutputList2Cue126=[~UNUSED3~] -OutputList2SigType126=Analog -OutputList2Cue127=[~UNUSED3~] -OutputList2SigType127=Analog -OutputList2Cue128=[~UNUSED3~] -OutputList2SigType128=Analog -OutputList2Cue129=[~UNUSED3~] -OutputList2SigType129=Analog -OutputList2Cue130=[~UNUSED3~] -OutputList2SigType130=Analog -OutputList2Cue131=[~UNUSED3~] -OutputList2SigType131=Analog -OutputList2Cue132=[~UNUSED3~] -OutputList2SigType132=Analog -OutputList2Cue133=[~UNUSED3~] -OutputList2SigType133=Analog -OutputList2Cue134=[~UNUSED3~] -OutputList2SigType134=Analog -OutputList2Cue135=[~UNUSED3~] -OutputList2SigType135=Analog -OutputList2Cue136=[~UNUSED3~] -OutputList2SigType136=Analog -OutputList2Cue137=[~UNUSED3~] -OutputList2SigType137=Analog -OutputList2Cue138=[~UNUSED3~] -OutputList2SigType138=Analog -OutputList2Cue139=[~UNUSED3~] -OutputList2SigType139=Analog -OutputList2Cue140=[~UNUSED3~] -OutputList2SigType140=Analog -OutputList2Cue141=[~UNUSED3~] -OutputList2SigType141=Analog -OutputList2Cue142=[~UNUSED3~] -OutputList2SigType142=Analog -OutputList2Cue143=[~UNUSED3~] -OutputList2SigType143=Analog -OutputList2Cue144=[~UNUSED3~] -OutputList2SigType144=Analog -OutputList2Cue145=[~UNUSED3~] -OutputList2SigType145=Analog -OutputList2Cue146=[~UNUSED3~] -OutputList2SigType146=Analog -OutputList2Cue147=[~UNUSED3~] -OutputList2SigType147=Analog -OutputList2Cue148=[~UNUSED3~] -OutputList2SigType148=Analog -OutputList2Cue149=[~UNUSED3~] -OutputList2SigType149=Analog -OutputList2Cue150=[~UNUSED3~] -OutputList2SigType150=Analog -OutputList2Cue151=[~UNUSED3~] -OutputList2SigType151=Analog -OutputList2Cue152=[~UNUSED3~] -OutputList2SigType152=Analog -OutputList2Cue153=[~UNUSED3~] -OutputList2SigType153=Analog -OutputList2Cue154=[~UNUSED3~] -OutputList2SigType154=Analog -OutputList2Cue155=[~UNUSED3~] -OutputList2SigType155=Analog -OutputList2Cue156=[~UNUSED3~] -OutputList2SigType156=Analog -OutputList2Cue157=[~UNUSED3~] -OutputList2SigType157=Analog -OutputList2Cue158=[~UNUSED3~] -OutputList2SigType158=Analog -OutputList2Cue159=[~UNUSED3~] -OutputList2SigType159=Analog -OutputList2Cue160=[~UNUSED3~] -OutputList2SigType160=Analog -OutputList2Cue161=[~UNUSED3~] -OutputList2SigType161=Analog -OutputList2Cue162=[~UNUSED3~] -OutputList2SigType162=Analog -OutputList2Cue163=[~UNUSED3~] -OutputList2SigType163=Analog -OutputList2Cue164=[~UNUSED3~] -OutputList2SigType164=Analog -OutputList2Cue165=[~UNUSED3~] -OutputList2SigType165=Analog -OutputList2Cue166=[~UNUSED3~] -OutputList2SigType166=Analog -OutputList2Cue167=[~UNUSED3~] -OutputList2SigType167=Analog -OutputList2Cue168=[~UNUSED3~] -OutputList2SigType168=Analog -OutputList2Cue169=[~UNUSED3~] -OutputList2SigType169=Analog -OutputList2Cue170=[~UNUSED3~] -OutputList2SigType170=Analog -OutputList2Cue171=[~UNUSED3~] -OutputList2SigType171=Analog -OutputList2Cue172=[~UNUSED3~] -OutputList2SigType172=Analog -OutputList2Cue173=[~UNUSED3~] -OutputList2SigType173=Analog -OutputList2Cue174=[~UNUSED3~] -OutputList2SigType174=Analog -OutputList2Cue175=[~UNUSED3~] -OutputList2SigType175=Analog -OutputList2Cue176=[~UNUSED3~] -OutputList2SigType176=Analog -OutputList2Cue177=[~UNUSED3~] -OutputList2SigType177=Analog -OutputList2Cue178=[~UNUSED3~] -OutputList2SigType178=Analog -OutputList2Cue179=[~UNUSED3~] -OutputList2SigType179=Analog -OutputList2Cue180=[~UNUSED3~] -OutputList2SigType180=Analog -OutputList2Cue181=[~UNUSED3~] -OutputList2SigType181=Analog -OutputList2Cue182=[~UNUSED3~] -OutputList2SigType182=Analog -OutputList2Cue183=[~UNUSED3~] -OutputList2SigType183=Analog -OutputList2Cue184=[~UNUSED3~] -OutputList2SigType184=Analog -OutputList2Cue185=[~UNUSED3~] -OutputList2SigType185=Analog -OutputList2Cue186=[~UNUSED3~] -OutputList2SigType186=Analog -OutputList2Cue187=[~UNUSED3~] -OutputList2SigType187=Analog -OutputList2Cue188=[~UNUSED3~] -OutputList2SigType188=Analog -OutputList2Cue189=[~UNUSED3~] -OutputList2SigType189=Analog -OutputList2Cue190=[~UNUSED3~] -OutputList2SigType190=Analog -OutputList2Cue191=[~UNUSED3~] -OutputList2SigType191=Analog -OutputList2Cue192=[~UNUSED3~] -OutputList2SigType192=Analog -OutputList2Cue193=[~UNUSED3~] -OutputList2SigType193=Analog -OutputList2Cue194=[~UNUSED3~] -OutputList2SigType194=Analog -OutputList2Cue195=[~UNUSED3~] -OutputList2SigType195=Analog -OutputList2Cue196=[~UNUSED3~] -OutputList2SigType196=Analog -OutputList2Cue197=[~UNUSED3~] -OutputList2SigType197=Analog -OutputList2Cue198=[~UNUSED3~] -OutputList2SigType198=Analog -OutputList2Cue199=[~UNUSED3~] -OutputList2SigType199=Analog -OutputList2Cue200=[~UNUSED3~] -OutputList2SigType200=Analog -OutputList2Cue201=[~UNUSED3~] -OutputList2SigType201=Analog -OutputList2Cue202=[~UNUSED3~] -OutputList2SigType202=Analog -OutputList2Cue203=[~UNUSED3~] -OutputList2SigType203=Analog -OutputList2Cue204=[~UNUSED3~] -OutputList2SigType204=Analog -OutputList2Cue205=[~UNUSED3~] -OutputList2SigType205=Analog -OutputList2Cue206=[~UNUSED3~] -OutputList2SigType206=Analog -OutputList2Cue207=[~UNUSED3~] -OutputList2SigType207=Analog -OutputList2Cue208=[~UNUSED3~] -OutputList2SigType208=Analog -OutputList2Cue209=[~UNUSED3~] -OutputList2SigType209=Analog -OutputList2Cue210=[~UNUSED3~] -OutputList2SigType210=Analog -OutputList2Cue211=[~UNUSED3~] -OutputList2SigType211=Analog -OutputList2Cue212=[~UNUSED3~] -OutputList2SigType212=Analog -OutputList2Cue213=[~UNUSED3~] -OutputList2SigType213=Analog -OutputList2Cue214=[~UNUSED3~] -OutputList2SigType214=Analog -OutputList2Cue215=[~UNUSED3~] -OutputList2SigType215=Analog -OutputList2Cue216=[~UNUSED3~] -OutputList2SigType216=Analog -OutputList2Cue217=[~UNUSED3~] -OutputList2SigType217=Analog -OutputList2Cue218=[~UNUSED3~] -OutputList2SigType218=Analog -OutputList2Cue219=[~UNUSED3~] -OutputList2SigType219=Analog -OutputList2Cue220=[~UNUSED3~] -OutputList2SigType220=Analog -OutputList2Cue221=[~UNUSED3~] -OutputList2SigType221=Analog -OutputList2Cue222=[~UNUSED3~] -OutputList2SigType222=Analog -OutputList2Cue223=[~UNUSED3~] -OutputList2SigType223=Analog -OutputList2Cue224=[~UNUSED3~] -OutputList2SigType224=Analog -OutputList2Cue225=[~UNUSED3~] -OutputList2SigType225=Analog -OutputList2Cue226=[~UNUSED3~] -OutputList2SigType226=Analog -OutputList2Cue227=[~UNUSED3~] -OutputList2SigType227=Analog -OutputList2Cue228=[~UNUSED3~] -OutputList2SigType228=Analog -OutputList2Cue229=[~UNUSED3~] -OutputList2SigType229=Analog -OutputList2Cue230=[~UNUSED3~] -OutputList2SigType230=Analog -OutputList2Cue231=[~UNUSED3~] -OutputList2SigType231=Analog -OutputList2Cue232=[~UNUSED3~] -OutputList2SigType232=Analog -OutputList2Cue233=[~UNUSED3~] -OutputList2SigType233=Analog -OutputList2Cue234=[~UNUSED3~] -OutputList2SigType234=Analog -OutputList2Cue235=[~UNUSED3~] -OutputList2SigType235=Analog -OutputList2Cue236=[~UNUSED3~] -OutputList2SigType236=Analog -OutputList2Cue237=[~UNUSED3~] -OutputList2SigType237=Analog -OutputList2Cue238=[~UNUSED3~] -OutputList2SigType238=Analog -OutputList2Cue239=[~UNUSED3~] -OutputList2SigType239=Analog -OutputList2Cue240=[~UNUSED3~] -OutputList2SigType240=Analog -OutputList2Cue241=[~UNUSED3~] -OutputList2SigType241=Analog -OutputList2Cue242=[~UNUSED3~] -OutputList2SigType242=Analog -OutputList2Cue243=[~UNUSED3~] -OutputList2SigType243=Analog -OutputList2Cue244=[~UNUSED3~] -OutputList2SigType244=Analog -OutputList2Cue245=[~UNUSED3~] -OutputList2SigType245=Analog -OutputList2Cue246=[~UNUSED3~] -OutputList2SigType246=Analog -OutputList2Cue247=[~UNUSED3~] -OutputList2SigType247=Analog -OutputList2Cue248=[~UNUSED3~] -OutputList2SigType248=Analog -OutputList2Cue249=[~UNUSED3~] -OutputList2SigType249=Analog -OutputList2Cue250=[~UNUSED3~] -OutputList2SigType250=Analog -OutputList2Cue251=[~UNUSED3~] -OutputList2SigType251=Analog -OutputList2Cue252=[~UNUSED3~] -OutputList2SigType252=Analog -OutputList2Cue253=[~UNUSED3~] -OutputList2SigType253=Analog -OutputList2Cue254=[~UNUSED3~] -OutputList2SigType254=Analog -OutputList2Cue255=[~UNUSED3~] -OutputList2SigType255=Analog -OutputList2Cue256=[~UNUSED3~] -OutputList2SigType256=Analog -OutputList2Cue257=[~UNUSED3~] -OutputList2SigType257=Analog -OutputList2Cue258=[~UNUSED3~] -OutputList2SigType258=Analog -OutputList2Cue259=[~UNUSED3~] -OutputList2SigType259=Analog -OutputList2Cue260=[~UNUSED3~] -OutputList2SigType260=Analog -OutputList2Cue261=[~UNUSED3~] -OutputList2SigType261=Analog -OutputList2Cue262=[~UNUSED3~] -OutputList2SigType262=Analog -OutputList2Cue263=[~UNUSED3~] -OutputList2SigType263=Analog -OutputList2Cue264=[~UNUSED3~] -OutputList2SigType264=Analog -OutputList2Cue265=[~UNUSED3~] -OutputList2SigType265=Analog -OutputList2Cue266=[~UNUSED3~] -OutputList2SigType266=Analog -OutputList2Cue267=[~UNUSED2~] -OutputList2SigType267=Digital|Analog|Serial|String -OutputList2Cue2012=[~EndGroup~]Item Icons -OutputList2SigType2012=Analog -InputList3Cue1=[~UNUSED2~] -InputList3SigType1=Serial -InputList3Cue2=[~UNUSED2~] -InputList3SigType2=Serial -InputList3Cue3=[~UNUSED2~] -InputList3SigType3=Serial -InputList3Cue4=[~UNUSED2~] -InputList3SigType4=Serial -InputList3Cue5=[~UNUSED2~] -InputList3SigType5=Serial -InputList3Cue6=[~UNUSED2~] -InputList3SigType6=Serial -InputList3Cue7=[~UNUSED2~] -InputList3SigType7=Serial -InputList3Cue8=[~UNUSED2~] -InputList3SigType8=Serial -InputList3Cue9=[~UNUSED2~] -InputList3SigType9=Serial -InputList3Cue10=[~UNUSED2~] -InputList3SigType10=Serial -InputList3Cue11=[~BeginGroup~]Item Texts -InputList3SigType11=Serial -InputList3Cue12=Set Item 1 Text -InputList3SigType12=Serial -InputList3Cue13=Set Item 2 Text -InputList3SigType13=Serial -InputList3Cue14=Set Item 3 Text -InputList3SigType14=Serial -InputList3Cue15=Set Item 4 Text -InputList3SigType15=Serial -InputList3Cue16=Set Item 5 Text -InputList3SigType16=Serial -InputList3Cue17=Set Item 6 Text -InputList3SigType17=Serial -InputList3Cue18=Set Item 7 Text -InputList3SigType18=Serial -InputList3Cue19=Set Item 8 Text -InputList3SigType19=Serial -InputList3Cue20=Set Item 9 Text -InputList3SigType20=Serial -InputList3Cue21=Set Item 10 Text -InputList3SigType21=Serial -InputList3Cue22=Set Item 11 Text -InputList3SigType22=Serial -InputList3Cue23=Set Item 12 Text -InputList3SigType23=Serial -InputList3Cue24=Set Item 13 Text -InputList3SigType24=Serial -InputList3Cue25=Set Item 14 Text -InputList3SigType25=Serial -InputList3Cue26=Set Item 15 Text -InputList3SigType26=Serial -InputList3Cue27=Set Item 16 Text -InputList3SigType27=Serial -InputList3Cue28=Set Item 17 Text -InputList3SigType28=Serial -InputList3Cue29=Set Item 18 Text -InputList3SigType29=Serial -InputList3Cue30=Set Item 19 Text -InputList3SigType30=Serial -InputList3Cue31=Set Item 20 Text -InputList3SigType31=Serial -InputList3Cue32=Set Item 21 Text -InputList3SigType32=Serial -InputList3Cue33=Set Item 22 Text -InputList3SigType33=Serial -InputList3Cue34=Set Item 23 Text -InputList3SigType34=Serial -InputList3Cue35=Set Item 24 Text -InputList3SigType35=Serial -InputList3Cue36=Set Item 25 Text -InputList3SigType36=Serial -InputList3Cue37=Set Item 26 Text -InputList3SigType37=Serial -InputList3Cue38=Set Item 27 Text -InputList3SigType38=Serial -InputList3Cue39=Set Item 28 Text -InputList3SigType39=Serial -InputList3Cue40=Set Item 29 Text -InputList3SigType40=Serial -InputList3Cue41=Set Item 30 Text -InputList3SigType41=Serial -InputList3Cue42=Set Item 31 Text -InputList3SigType42=Serial -InputList3Cue43=Set Item 32 Text -InputList3SigType43=Serial -InputList3Cue44=Set Item 33 Text -InputList3SigType44=Serial -InputList3Cue45=Set Item 34 Text -InputList3SigType45=Serial -InputList3Cue46=Set Item 35 Text -InputList3SigType46=Serial -InputList3Cue47=Set Item 36 Text -InputList3SigType47=Serial -InputList3Cue48=Set Item 37 Text -InputList3SigType48=Serial -InputList3Cue49=Set Item 38 Text -InputList3SigType49=Serial -InputList3Cue50=Set Item 39 Text -InputList3SigType50=Serial -InputList3Cue51=Set Item 40 Text -InputList3SigType51=Serial -InputList3Cue52=Set Item 41 Text -InputList3SigType52=Serial -InputList3Cue53=Set Item 42 Text -InputList3SigType53=Serial -InputList3Cue54=Set Item 43 Text -InputList3SigType54=Serial -InputList3Cue55=Set Item 44 Text -InputList3SigType55=Serial -InputList3Cue56=Set Item 45 Text -InputList3SigType56=Serial -InputList3Cue57=Set Item 46 Text -InputList3SigType57=Serial -InputList3Cue58=Set Item 47 Text -InputList3SigType58=Serial -InputList3Cue59=Set Item 48 Text -InputList3SigType59=Serial -InputList3Cue60=Set Item 49 Text -InputList3SigType60=Serial -InputList3Cue61=Set Item 50 Text -InputList3SigType61=Serial -InputList3Cue62=Set Item 51 Text -InputList3SigType62=Serial -InputList3Cue63=Set Item 52 Text -InputList3SigType63=Serial -InputList3Cue64=Set Item 53 Text -InputList3SigType64=Serial -InputList3Cue65=Set Item 54 Text -InputList3SigType65=Serial -InputList3Cue66=Set Item 55 Text -InputList3SigType66=Serial -InputList3Cue67=Set Item 56 Text -InputList3SigType67=Serial -InputList3Cue68=Set Item 57 Text -InputList3SigType68=Serial -InputList3Cue69=Set Item 58 Text -InputList3SigType69=Serial -InputList3Cue70=Set Item 59 Text -InputList3SigType70=Serial -InputList3Cue71=Set Item 60 Text -InputList3SigType71=Serial -InputList3Cue72=Set Item 61 Text -InputList3SigType72=Serial -InputList3Cue73=Set Item 62 Text -InputList3SigType73=Serial -InputList3Cue74=Set Item 63 Text -InputList3SigType74=Serial -InputList3Cue75=Set Item 64 Text -InputList3SigType75=Serial -InputList3Cue76=Set Item 65 Text -InputList3SigType76=Serial -InputList3Cue77=Set Item 66 Text -InputList3SigType77=Serial -InputList3Cue78=Set Item 67 Text -InputList3SigType78=Serial -InputList3Cue79=Set Item 68 Text -InputList3SigType79=Serial -InputList3Cue80=Set Item 69 Text -InputList3SigType80=Serial -InputList3Cue81=Set Item 70 Text -InputList3SigType81=Serial -InputList3Cue82=Set Item 71 Text -InputList3SigType82=Serial -InputList3Cue83=Set Item 72 Text -InputList3SigType83=Serial -InputList3Cue84=Set Item 73 Text -InputList3SigType84=Serial -InputList3Cue85=Set Item 74 Text -InputList3SigType85=Serial -InputList3Cue86=Set Item 75 Text -InputList3SigType86=Serial -InputList3Cue87=Set Item 76 Text -InputList3SigType87=Serial -InputList3Cue88=Set Item 77 Text -InputList3SigType88=Serial -InputList3Cue89=Set Item 78 Text -InputList3SigType89=Serial -InputList3Cue90=Set Item 79 Text -InputList3SigType90=Serial -InputList3Cue91=Set Item 80 Text -InputList3SigType91=Serial -InputList3Cue92=Set Item 81 Text -InputList3SigType92=Serial -InputList3Cue93=Set Item 82 Text -InputList3SigType93=Serial -InputList3Cue94=Set Item 83 Text -InputList3SigType94=Serial -InputList3Cue95=Set Item 84 Text -InputList3SigType95=Serial -InputList3Cue96=Set Item 85 Text -InputList3SigType96=Serial -InputList3Cue97=Set Item 86 Text -InputList3SigType97=Serial -InputList3Cue98=Set Item 87 Text -InputList3SigType98=Serial -InputList3Cue99=Set Item 88 Text -InputList3SigType99=Serial -InputList3Cue100=Set Item 89 Text -InputList3SigType100=Serial -InputList3Cue101=Set Item 90 Text -InputList3SigType101=Serial -InputList3Cue102=Set Item 91 Text -InputList3SigType102=Serial -InputList3Cue103=Set Item 92 Text -InputList3SigType103=Serial -InputList3Cue104=Set Item 93 Text -InputList3SigType104=Serial -InputList3Cue105=Set Item 94 Text -InputList3SigType105=Serial -InputList3Cue106=Set Item 95 Text -InputList3SigType106=Serial -InputList3Cue107=Set Item 96 Text -InputList3SigType107=Serial -InputList3Cue108=Set Item 97 Text -InputList3SigType108=Serial -InputList3Cue109=Set Item 98 Text -InputList3SigType109=Serial -InputList3Cue110=Set Item 99 Text -InputList3SigType110=Serial -InputList3Cue111=Set Item 100 Text -InputList3SigType111=Serial -InputList3Cue112=Set Item 101 Text -InputList3SigType112=Serial -InputList3Cue113=Set Item 102 Text -InputList3SigType113=Serial -InputList3Cue114=Set Item 103 Text -InputList3SigType114=Serial -InputList3Cue115=Set Item 104 Text -InputList3SigType115=Serial -InputList3Cue116=Set Item 105 Text -InputList3SigType116=Serial -InputList3Cue117=Set Item 106 Text -InputList3SigType117=Serial -InputList3Cue118=Set Item 107 Text -InputList3SigType118=Serial -InputList3Cue119=Set Item 108 Text -InputList3SigType119=Serial -InputList3Cue120=Set Item 109 Text -InputList3SigType120=Serial -InputList3Cue121=Set Item 110 Text -InputList3SigType121=Serial -InputList3Cue122=Set Item 111 Text -InputList3SigType122=Serial -InputList3Cue123=Set Item 112 Text -InputList3SigType123=Serial -InputList3Cue124=Set Item 113 Text -InputList3SigType124=Serial -InputList3Cue125=Set Item 114 Text -InputList3SigType125=Serial -InputList3Cue126=Set Item 115 Text -InputList3SigType126=Serial -InputList3Cue127=Set Item 116 Text -InputList3SigType127=Serial -InputList3Cue128=Set Item 117 Text -InputList3SigType128=Serial -InputList3Cue129=Set Item 118 Text -InputList3SigType129=Serial -InputList3Cue130=Set Item 119 Text -InputList3SigType130=Serial -InputList3Cue131=Set Item 120 Text -InputList3SigType131=Serial -InputList3Cue132=Set Item 121 Text -InputList3SigType132=Serial -InputList3Cue133=Set Item 122 Text -InputList3SigType133=Serial -InputList3Cue134=Set Item 123 Text -InputList3SigType134=Serial -InputList3Cue135=Set Item 124 Text -InputList3SigType135=Serial -InputList3Cue136=Set Item 125 Text -InputList3SigType136=Serial -InputList3Cue137=Set Item 126 Text -InputList3SigType137=Serial -InputList3Cue138=Set Item 127 Text -InputList3SigType138=Serial -InputList3Cue139=Set Item 128 Text -InputList3SigType139=Serial -InputList3Cue140=Set Item 129 Text -InputList3SigType140=Serial -InputList3Cue141=Set Item 130 Text -InputList3SigType141=Serial -InputList3Cue142=Set Item 131 Text -InputList3SigType142=Serial -InputList3Cue143=Set Item 132 Text -InputList3SigType143=Serial -InputList3Cue144=Set Item 133 Text -InputList3SigType144=Serial -InputList3Cue145=Set Item 134 Text -InputList3SigType145=Serial -InputList3Cue146=Set Item 135 Text -InputList3SigType146=Serial -InputList3Cue147=Set Item 136 Text -InputList3SigType147=Serial -InputList3Cue148=Set Item 137 Text -InputList3SigType148=Serial -InputList3Cue149=Set Item 138 Text -InputList3SigType149=Serial -InputList3Cue150=Set Item 139 Text -InputList3SigType150=Serial -InputList3Cue151=Set Item 140 Text -InputList3SigType151=Serial -InputList3Cue152=Set Item 141 Text -InputList3SigType152=Serial -InputList3Cue153=Set Item 142 Text -InputList3SigType153=Serial -InputList3Cue154=Set Item 143 Text -InputList3SigType154=Serial -InputList3Cue155=Set Item 144 Text -InputList3SigType155=Serial -InputList3Cue156=Set Item 145 Text -InputList3SigType156=Serial -InputList3Cue157=Set Item 146 Text -InputList3SigType157=Serial -InputList3Cue158=Set Item 147 Text -InputList3SigType158=Serial -InputList3Cue159=Set Item 148 Text -InputList3SigType159=Serial -InputList3Cue160=Set Item 149 Text -InputList3SigType160=Serial -InputList3Cue161=Set Item 150 Text -InputList3SigType161=Serial -InputList3Cue162=Set Item 151 Text -InputList3SigType162=Serial -InputList3Cue163=Set Item 152 Text -InputList3SigType163=Serial -InputList3Cue164=Set Item 153 Text -InputList3SigType164=Serial -InputList3Cue165=Set Item 154 Text -InputList3SigType165=Serial -InputList3Cue166=Set Item 155 Text -InputList3SigType166=Serial -InputList3Cue167=Set Item 156 Text -InputList3SigType167=Serial -InputList3Cue168=Set Item 157 Text -InputList3SigType168=Serial -InputList3Cue169=Set Item 158 Text -InputList3SigType169=Serial -InputList3Cue170=Set Item 159 Text -InputList3SigType170=Serial -InputList3Cue171=Set Item 160 Text -InputList3SigType171=Serial -InputList3Cue172=Set Item 161 Text -InputList3SigType172=Serial -InputList3Cue173=Set Item 162 Text -InputList3SigType173=Serial -InputList3Cue174=Set Item 163 Text -InputList3SigType174=Serial -InputList3Cue175=Set Item 164 Text -InputList3SigType175=Serial -InputList3Cue176=Set Item 165 Text -InputList3SigType176=Serial -InputList3Cue177=Set Item 166 Text -InputList3SigType177=Serial -InputList3Cue178=Set Item 167 Text -InputList3SigType178=Serial -InputList3Cue179=Set Item 168 Text -InputList3SigType179=Serial -InputList3Cue180=Set Item 169 Text -InputList3SigType180=Serial -InputList3Cue181=Set Item 170 Text -InputList3SigType181=Serial -InputList3Cue182=Set Item 171 Text -InputList3SigType182=Serial -InputList3Cue183=Set Item 172 Text -InputList3SigType183=Serial -InputList3Cue184=Set Item 173 Text -InputList3SigType184=Serial -InputList3Cue185=Set Item 174 Text -InputList3SigType185=Serial -InputList3Cue186=Set Item 175 Text -InputList3SigType186=Serial -InputList3Cue187=Set Item 176 Text -InputList3SigType187=Serial -InputList3Cue188=Set Item 177 Text -InputList3SigType188=Serial -InputList3Cue189=Set Item 178 Text -InputList3SigType189=Serial -InputList3Cue190=Set Item 179 Text -InputList3SigType190=Serial -InputList3Cue191=Set Item 180 Text -InputList3SigType191=Serial -InputList3Cue192=Set Item 181 Text -InputList3SigType192=Serial -InputList3Cue193=Set Item 182 Text -InputList3SigType193=Serial -InputList3Cue194=Set Item 183 Text -InputList3SigType194=Serial -InputList3Cue195=Set Item 184 Text -InputList3SigType195=Serial -InputList3Cue196=Set Item 185 Text -InputList3SigType196=Serial -InputList3Cue197=Set Item 186 Text -InputList3SigType197=Serial -InputList3Cue198=Set Item 187 Text -InputList3SigType198=Serial -InputList3Cue199=Set Item 188 Text -InputList3SigType199=Serial -InputList3Cue200=Set Item 189 Text -InputList3SigType200=Serial -InputList3Cue201=Set Item 190 Text -InputList3SigType201=Serial -InputList3Cue202=Set Item 191 Text -InputList3SigType202=Serial -InputList3Cue203=Set Item 192 Text -InputList3SigType203=Serial -InputList3Cue204=Set Item 193 Text -InputList3SigType204=Serial -InputList3Cue205=Set Item 194 Text -InputList3SigType205=Serial -InputList3Cue206=Set Item 195 Text -InputList3SigType206=Serial -InputList3Cue207=Set Item 196 Text -InputList3SigType207=Serial -InputList3Cue208=Set Item 197 Text -InputList3SigType208=Serial -InputList3Cue209=Set Item 198 Text -InputList3SigType209=Serial -InputList3Cue210=Set Item 199 Text -InputList3SigType210=Serial -InputList3Cue211=Set Item 200 Text -InputList3SigType211=Serial -InputList3Cue212=Set Item 201 Text -InputList3SigType212=Serial -InputList3Cue213=Set Item 202 Text -InputList3SigType213=Serial -InputList3Cue214=Set Item 203 Text -InputList3SigType214=Serial -InputList3Cue215=Set Item 204 Text -InputList3SigType215=Serial -InputList3Cue216=Set Item 205 Text -InputList3SigType216=Serial -InputList3Cue217=Set Item 206 Text -InputList3SigType217=Serial -InputList3Cue218=Set Item 207 Text -InputList3SigType218=Serial -InputList3Cue219=Set Item 208 Text -InputList3SigType219=Serial -InputList3Cue220=Set Item 209 Text -InputList3SigType220=Serial -InputList3Cue221=Set Item 210 Text -InputList3SigType221=Serial -InputList3Cue222=Set Item 211 Text -InputList3SigType222=Serial -InputList3Cue223=Set Item 212 Text -InputList3SigType223=Serial -InputList3Cue224=Set Item 213 Text -InputList3SigType224=Serial -InputList3Cue225=Set Item 214 Text -InputList3SigType225=Serial -InputList3Cue226=Set Item 215 Text -InputList3SigType226=Serial -InputList3Cue227=Set Item 216 Text -InputList3SigType227=Serial -InputList3Cue228=Set Item 217 Text -InputList3SigType228=Serial -InputList3Cue229=Set Item 218 Text -InputList3SigType229=Serial -InputList3Cue230=Set Item 219 Text -InputList3SigType230=Serial -InputList3Cue231=Set Item 220 Text -InputList3SigType231=Serial -InputList3Cue232=Set Item 221 Text -InputList3SigType232=Serial -InputList3Cue233=Set Item 222 Text -InputList3SigType233=Serial -InputList3Cue234=Set Item 223 Text -InputList3SigType234=Serial -InputList3Cue235=Set Item 224 Text -InputList3SigType235=Serial -InputList3Cue236=Set Item 225 Text -InputList3SigType236=Serial -InputList3Cue237=Set Item 226 Text -InputList3SigType237=Serial -InputList3Cue238=Set Item 227 Text -InputList3SigType238=Serial -InputList3Cue239=Set Item 228 Text -InputList3SigType239=Serial -InputList3Cue240=Set Item 229 Text -InputList3SigType240=Serial -InputList3Cue241=Set Item 230 Text -InputList3SigType241=Serial -InputList3Cue242=Set Item 231 Text -InputList3SigType242=Serial -InputList3Cue243=Set Item 232 Text -InputList3SigType243=Serial -InputList3Cue244=Set Item 233 Text -InputList3SigType244=Serial -InputList3Cue245=Set Item 234 Text -InputList3SigType245=Serial -InputList3Cue246=Set Item 235 Text -InputList3SigType246=Serial -InputList3Cue247=Set Item 236 Text -InputList3SigType247=Serial -InputList3Cue248=Set Item 237 Text -InputList3SigType248=Serial -InputList3Cue249=Set Item 238 Text -InputList3SigType249=Serial -InputList3Cue250=Set Item 239 Text -InputList3SigType250=Serial -InputList3Cue251=Set Item 240 Text -InputList3SigType251=Serial -InputList3Cue252=Set Item 241 Text -InputList3SigType252=Serial -InputList3Cue253=Set Item 242 Text -InputList3SigType253=Serial -InputList3Cue254=Set Item 243 Text -InputList3SigType254=Serial -InputList3Cue255=Set Item 244 Text -InputList3SigType255=Serial -InputList3Cue256=Set Item 245 Text -InputList3SigType256=Serial -InputList3Cue257=Set Item 246 Text -InputList3SigType257=Serial -InputList3Cue258=Set Item 247 Text -InputList3SigType258=Serial -InputList3Cue259=Set Item 248 Text -InputList3SigType259=Serial -InputList3Cue260=Set Item 249 Text -InputList3SigType260=Serial -InputList3Cue261=Set Item 250 Text -InputList3SigType261=Serial -InputList3Cue262=Set Item 251 Text -InputList3SigType262=Serial -InputList3Cue263=Set Item 252 Text -InputList3SigType263=Serial -InputList3Cue264=Set Item 253 Text -InputList3SigType264=Serial -InputList3Cue265=Set Item 254 Text -InputList3SigType265=Serial -InputList3Cue266=Set Item 255 Text -InputList3SigType266=Serial -InputList3Cue267=[~UNUSED2~] -InputList3SigType267=Digital|Analog|Serial|String -InputList3Cue2012=[~EndGroup~]Item Texts -InputList3SigType2012=Serial -InputList3Cue2013=[~BeginGroup~]Item Icons -InputList3SigType2013=Serial -InputList3Cue2014=Set Item 1 Icon Serial -InputList3SigType2014=Serial -InputList3Cue2015=Set Item 2 Icon Serial -InputList3SigType2015=Serial -InputList3Cue2016=Set Item 3 Icon Serial -InputList3SigType2016=Serial -InputList3Cue2017=Set Item 4 Icon Serial -InputList3SigType2017=Serial -InputList3Cue2018=Set Item 5 Icon Serial -InputList3SigType2018=Serial -InputList3Cue2019=Set Item 6 Icon Serial -InputList3SigType2019=Serial -InputList3Cue2020=Set Item 7 Icon Serial -InputList3SigType2020=Serial -InputList3Cue2021=Set Item 8 Icon Serial -InputList3SigType2021=Serial -InputList3Cue2022=Set Item 9 Icon Serial -InputList3SigType2022=Serial -InputList3Cue2023=Set Item 10 Icon Serial -InputList3SigType2023=Serial -InputList3Cue2024=Set Item 11 Icon Serial -InputList3SigType2024=Serial -InputList3Cue2025=Set Item 12 Icon Serial -InputList3SigType2025=Serial -InputList3Cue2026=Set Item 13 Icon Serial -InputList3SigType2026=Serial -InputList3Cue2027=Set Item 14 Icon Serial -InputList3SigType2027=Serial -InputList3Cue2028=Set Item 15 Icon Serial -InputList3SigType2028=Serial -InputList3Cue2029=Set Item 16 Icon Serial -InputList3SigType2029=Serial -InputList3Cue2030=Set Item 17 Icon Serial -InputList3SigType2030=Serial -InputList3Cue2031=Set Item 18 Icon Serial -InputList3SigType2031=Serial -InputList3Cue2032=Set Item 19 Icon Serial -InputList3SigType2032=Serial -InputList3Cue2033=Set Item 20 Icon Serial -InputList3SigType2033=Serial -InputList3Cue2034=Set Item 21 Icon Serial -InputList3SigType2034=Serial -InputList3Cue2035=Set Item 22 Icon Serial -InputList3SigType2035=Serial -InputList3Cue2036=Set Item 23 Icon Serial -InputList3SigType2036=Serial -InputList3Cue2037=Set Item 24 Icon Serial -InputList3SigType2037=Serial -InputList3Cue2038=Set Item 25 Icon Serial -InputList3SigType2038=Serial -InputList3Cue2039=Set Item 26 Icon Serial -InputList3SigType2039=Serial -InputList3Cue2040=Set Item 27 Icon Serial -InputList3SigType2040=Serial -InputList3Cue2041=Set Item 28 Icon Serial -InputList3SigType2041=Serial -InputList3Cue2042=Set Item 29 Icon Serial -InputList3SigType2042=Serial -InputList3Cue2043=Set Item 30 Icon Serial -InputList3SigType2043=Serial -InputList3Cue2044=Set Item 31 Icon Serial -InputList3SigType2044=Serial -InputList3Cue2045=Set Item 32 Icon Serial -InputList3SigType2045=Serial -InputList3Cue2046=Set Item 33 Icon Serial -InputList3SigType2046=Serial -InputList3Cue2047=Set Item 34 Icon Serial -InputList3SigType2047=Serial -InputList3Cue2048=Set Item 35 Icon Serial -InputList3SigType2048=Serial -InputList3Cue2049=Set Item 36 Icon Serial -InputList3SigType2049=Serial -InputList3Cue2050=Set Item 37 Icon Serial -InputList3SigType2050=Serial -InputList3Cue2051=Set Item 38 Icon Serial -InputList3SigType2051=Serial -InputList3Cue2052=Set Item 39 Icon Serial -InputList3SigType2052=Serial -InputList3Cue2053=Set Item 40 Icon Serial -InputList3SigType2053=Serial -InputList3Cue2054=Set Item 41 Icon Serial -InputList3SigType2054=Serial -InputList3Cue2055=Set Item 42 Icon Serial -InputList3SigType2055=Serial -InputList3Cue2056=Set Item 43 Icon Serial -InputList3SigType2056=Serial -InputList3Cue2057=Set Item 44 Icon Serial -InputList3SigType2057=Serial -InputList3Cue2058=Set Item 45 Icon Serial -InputList3SigType2058=Serial -InputList3Cue2059=Set Item 46 Icon Serial -InputList3SigType2059=Serial -InputList3Cue2060=Set Item 47 Icon Serial -InputList3SigType2060=Serial -InputList3Cue2061=Set Item 48 Icon Serial -InputList3SigType2061=Serial -InputList3Cue2062=Set Item 49 Icon Serial -InputList3SigType2062=Serial -InputList3Cue2063=Set Item 50 Icon Serial -InputList3SigType2063=Serial -InputList3Cue2064=Set Item 51 Icon Serial -InputList3SigType2064=Serial -InputList3Cue2065=Set Item 52 Icon Serial -InputList3SigType2065=Serial -InputList3Cue2066=Set Item 53 Icon Serial -InputList3SigType2066=Serial -InputList3Cue2067=Set Item 54 Icon Serial -InputList3SigType2067=Serial -InputList3Cue2068=Set Item 55 Icon Serial -InputList3SigType2068=Serial -InputList3Cue2069=Set Item 56 Icon Serial -InputList3SigType2069=Serial -InputList3Cue2070=Set Item 57 Icon Serial -InputList3SigType2070=Serial -InputList3Cue2071=Set Item 58 Icon Serial -InputList3SigType2071=Serial -InputList3Cue2072=Set Item 59 Icon Serial -InputList3SigType2072=Serial -InputList3Cue2073=Set Item 60 Icon Serial -InputList3SigType2073=Serial -InputList3Cue2074=Set Item 61 Icon Serial -InputList3SigType2074=Serial -InputList3Cue2075=Set Item 62 Icon Serial -InputList3SigType2075=Serial -InputList3Cue2076=Set Item 63 Icon Serial -InputList3SigType2076=Serial -InputList3Cue2077=Set Item 64 Icon Serial -InputList3SigType2077=Serial -InputList3Cue2078=Set Item 65 Icon Serial -InputList3SigType2078=Serial -InputList3Cue2079=Set Item 66 Icon Serial -InputList3SigType2079=Serial -InputList3Cue2080=Set Item 67 Icon Serial -InputList3SigType2080=Serial -InputList3Cue2081=Set Item 68 Icon Serial -InputList3SigType2081=Serial -InputList3Cue2082=Set Item 69 Icon Serial -InputList3SigType2082=Serial -InputList3Cue2083=Set Item 70 Icon Serial -InputList3SigType2083=Serial -InputList3Cue2084=Set Item 71 Icon Serial -InputList3SigType2084=Serial -InputList3Cue2085=Set Item 72 Icon Serial -InputList3SigType2085=Serial -InputList3Cue2086=Set Item 73 Icon Serial -InputList3SigType2086=Serial -InputList3Cue2087=Set Item 74 Icon Serial -InputList3SigType2087=Serial -InputList3Cue2088=Set Item 75 Icon Serial -InputList3SigType2088=Serial -InputList3Cue2089=Set Item 76 Icon Serial -InputList3SigType2089=Serial -InputList3Cue2090=Set Item 77 Icon Serial -InputList3SigType2090=Serial -InputList3Cue2091=Set Item 78 Icon Serial -InputList3SigType2091=Serial -InputList3Cue2092=Set Item 79 Icon Serial -InputList3SigType2092=Serial -InputList3Cue2093=Set Item 80 Icon Serial -InputList3SigType2093=Serial -InputList3Cue2094=Set Item 81 Icon Serial -InputList3SigType2094=Serial -InputList3Cue2095=Set Item 82 Icon Serial -InputList3SigType2095=Serial -InputList3Cue2096=Set Item 83 Icon Serial -InputList3SigType2096=Serial -InputList3Cue2097=Set Item 84 Icon Serial -InputList3SigType2097=Serial -InputList3Cue2098=Set Item 85 Icon Serial -InputList3SigType2098=Serial -InputList3Cue2099=Set Item 86 Icon Serial -InputList3SigType2099=Serial -InputList3Cue2100=Set Item 87 Icon Serial -InputList3SigType2100=Serial -InputList3Cue2101=Set Item 88 Icon Serial -InputList3SigType2101=Serial -InputList3Cue2102=Set Item 89 Icon Serial -InputList3SigType2102=Serial -InputList3Cue2103=Set Item 90 Icon Serial -InputList3SigType2103=Serial -InputList3Cue2104=Set Item 91 Icon Serial -InputList3SigType2104=Serial -InputList3Cue2105=Set Item 92 Icon Serial -InputList3SigType2105=Serial -InputList3Cue2106=Set Item 93 Icon Serial -InputList3SigType2106=Serial -InputList3Cue2107=Set Item 94 Icon Serial -InputList3SigType2107=Serial -InputList3Cue2108=Set Item 95 Icon Serial -InputList3SigType2108=Serial -InputList3Cue2109=Set Item 96 Icon Serial -InputList3SigType2109=Serial -InputList3Cue2110=Set Item 97 Icon Serial -InputList3SigType2110=Serial -InputList3Cue2111=Set Item 98 Icon Serial -InputList3SigType2111=Serial -InputList3Cue2112=Set Item 99 Icon Serial -InputList3SigType2112=Serial -InputList3Cue2113=Set Item 100 Icon Serial -InputList3SigType2113=Serial -InputList3Cue2114=Set Item 101 Icon Serial -InputList3SigType2114=Serial -InputList3Cue2115=Set Item 102 Icon Serial -InputList3SigType2115=Serial -InputList3Cue2116=Set Item 103 Icon Serial -InputList3SigType2116=Serial -InputList3Cue2117=Set Item 104 Icon Serial -InputList3SigType2117=Serial -InputList3Cue2118=Set Item 105 Icon Serial -InputList3SigType2118=Serial -InputList3Cue2119=Set Item 106 Icon Serial -InputList3SigType2119=Serial -InputList3Cue2120=Set Item 107 Icon Serial -InputList3SigType2120=Serial -InputList3Cue2121=Set Item 108 Icon Serial -InputList3SigType2121=Serial -InputList3Cue2122=Set Item 109 Icon Serial -InputList3SigType2122=Serial -InputList3Cue2123=Set Item 110 Icon Serial -InputList3SigType2123=Serial -InputList3Cue2124=Set Item 111 Icon Serial -InputList3SigType2124=Serial -InputList3Cue2125=Set Item 112 Icon Serial -InputList3SigType2125=Serial -InputList3Cue2126=Set Item 113 Icon Serial -InputList3SigType2126=Serial -InputList3Cue2127=Set Item 114 Icon Serial -InputList3SigType2127=Serial -InputList3Cue2128=Set Item 115 Icon Serial -InputList3SigType2128=Serial -InputList3Cue2129=Set Item 116 Icon Serial -InputList3SigType2129=Serial -InputList3Cue2130=Set Item 117 Icon Serial -InputList3SigType2130=Serial -InputList3Cue2131=Set Item 118 Icon Serial -InputList3SigType2131=Serial -InputList3Cue2132=Set Item 119 Icon Serial -InputList3SigType2132=Serial -InputList3Cue2133=Set Item 120 Icon Serial -InputList3SigType2133=Serial -InputList3Cue2134=Set Item 121 Icon Serial -InputList3SigType2134=Serial -InputList3Cue2135=Set Item 122 Icon Serial -InputList3SigType2135=Serial -InputList3Cue2136=Set Item 123 Icon Serial -InputList3SigType2136=Serial -InputList3Cue2137=Set Item 124 Icon Serial -InputList3SigType2137=Serial -InputList3Cue2138=Set Item 125 Icon Serial -InputList3SigType2138=Serial -InputList3Cue2139=Set Item 126 Icon Serial -InputList3SigType2139=Serial -InputList3Cue2140=Set Item 127 Icon Serial -InputList3SigType2140=Serial -InputList3Cue2141=Set Item 128 Icon Serial -InputList3SigType2141=Serial -InputList3Cue2142=Set Item 129 Icon Serial -InputList3SigType2142=Serial -InputList3Cue2143=Set Item 130 Icon Serial -InputList3SigType2143=Serial -InputList3Cue2144=Set Item 131 Icon Serial -InputList3SigType2144=Serial -InputList3Cue2145=Set Item 132 Icon Serial -InputList3SigType2145=Serial -InputList3Cue2146=Set Item 133 Icon Serial -InputList3SigType2146=Serial -InputList3Cue2147=Set Item 134 Icon Serial -InputList3SigType2147=Serial -InputList3Cue2148=Set Item 135 Icon Serial -InputList3SigType2148=Serial -InputList3Cue2149=Set Item 136 Icon Serial -InputList3SigType2149=Serial -InputList3Cue2150=Set Item 137 Icon Serial -InputList3SigType2150=Serial -InputList3Cue2151=Set Item 138 Icon Serial -InputList3SigType2151=Serial -InputList3Cue2152=Set Item 139 Icon Serial -InputList3SigType2152=Serial -InputList3Cue2153=Set Item 140 Icon Serial -InputList3SigType2153=Serial -InputList3Cue2154=Set Item 141 Icon Serial -InputList3SigType2154=Serial -InputList3Cue2155=Set Item 142 Icon Serial -InputList3SigType2155=Serial -InputList3Cue2156=Set Item 143 Icon Serial -InputList3SigType2156=Serial -InputList3Cue2157=Set Item 144 Icon Serial -InputList3SigType2157=Serial -InputList3Cue2158=Set Item 145 Icon Serial -InputList3SigType2158=Serial -InputList3Cue2159=Set Item 146 Icon Serial -InputList3SigType2159=Serial -InputList3Cue2160=Set Item 147 Icon Serial -InputList3SigType2160=Serial -InputList3Cue2161=Set Item 148 Icon Serial -InputList3SigType2161=Serial -InputList3Cue2162=Set Item 149 Icon Serial -InputList3SigType2162=Serial -InputList3Cue2163=Set Item 150 Icon Serial -InputList3SigType2163=Serial -InputList3Cue2164=Set Item 151 Icon Serial -InputList3SigType2164=Serial -InputList3Cue2165=Set Item 152 Icon Serial -InputList3SigType2165=Serial -InputList3Cue2166=Set Item 153 Icon Serial -InputList3SigType2166=Serial -InputList3Cue2167=Set Item 154 Icon Serial -InputList3SigType2167=Serial -InputList3Cue2168=Set Item 155 Icon Serial -InputList3SigType2168=Serial -InputList3Cue2169=Set Item 156 Icon Serial -InputList3SigType2169=Serial -InputList3Cue2170=Set Item 157 Icon Serial -InputList3SigType2170=Serial -InputList3Cue2171=Set Item 158 Icon Serial -InputList3SigType2171=Serial -InputList3Cue2172=Set Item 159 Icon Serial -InputList3SigType2172=Serial -InputList3Cue2173=Set Item 160 Icon Serial -InputList3SigType2173=Serial -InputList3Cue2174=Set Item 161 Icon Serial -InputList3SigType2174=Serial -InputList3Cue2175=Set Item 162 Icon Serial -InputList3SigType2175=Serial -InputList3Cue2176=Set Item 163 Icon Serial -InputList3SigType2176=Serial -InputList3Cue2177=Set Item 164 Icon Serial -InputList3SigType2177=Serial -InputList3Cue2178=Set Item 165 Icon Serial -InputList3SigType2178=Serial -InputList3Cue2179=Set Item 166 Icon Serial -InputList3SigType2179=Serial -InputList3Cue2180=Set Item 167 Icon Serial -InputList3SigType2180=Serial -InputList3Cue2181=Set Item 168 Icon Serial -InputList3SigType2181=Serial -InputList3Cue2182=Set Item 169 Icon Serial -InputList3SigType2182=Serial -InputList3Cue2183=Set Item 170 Icon Serial -InputList3SigType2183=Serial -InputList3Cue2184=Set Item 171 Icon Serial -InputList3SigType2184=Serial -InputList3Cue2185=Set Item 172 Icon Serial -InputList3SigType2185=Serial -InputList3Cue2186=Set Item 173 Icon Serial -InputList3SigType2186=Serial -InputList3Cue2187=Set Item 174 Icon Serial -InputList3SigType2187=Serial -InputList3Cue2188=Set Item 175 Icon Serial -InputList3SigType2188=Serial -InputList3Cue2189=Set Item 176 Icon Serial -InputList3SigType2189=Serial -InputList3Cue2190=Set Item 177 Icon Serial -InputList3SigType2190=Serial -InputList3Cue2191=Set Item 178 Icon Serial -InputList3SigType2191=Serial -InputList3Cue2192=Set Item 179 Icon Serial -InputList3SigType2192=Serial -InputList3Cue2193=Set Item 180 Icon Serial -InputList3SigType2193=Serial -InputList3Cue2194=Set Item 181 Icon Serial -InputList3SigType2194=Serial -InputList3Cue2195=Set Item 182 Icon Serial -InputList3SigType2195=Serial -InputList3Cue2196=Set Item 183 Icon Serial -InputList3SigType2196=Serial -InputList3Cue2197=Set Item 184 Icon Serial -InputList3SigType2197=Serial -InputList3Cue2198=Set Item 185 Icon Serial -InputList3SigType2198=Serial -InputList3Cue2199=Set Item 186 Icon Serial -InputList3SigType2199=Serial -InputList3Cue2200=Set Item 187 Icon Serial -InputList3SigType2200=Serial -InputList3Cue2201=Set Item 188 Icon Serial -InputList3SigType2201=Serial -InputList3Cue2202=Set Item 189 Icon Serial -InputList3SigType2202=Serial -InputList3Cue2203=Set Item 190 Icon Serial -InputList3SigType2203=Serial -InputList3Cue2204=Set Item 191 Icon Serial -InputList3SigType2204=Serial -InputList3Cue2205=Set Item 192 Icon Serial -InputList3SigType2205=Serial -InputList3Cue2206=Set Item 193 Icon Serial -InputList3SigType2206=Serial -InputList3Cue2207=Set Item 194 Icon Serial -InputList3SigType2207=Serial -InputList3Cue2208=Set Item 195 Icon Serial -InputList3SigType2208=Serial -InputList3Cue2209=Set Item 196 Icon Serial -InputList3SigType2209=Serial -InputList3Cue2210=Set Item 197 Icon Serial -InputList3SigType2210=Serial -InputList3Cue2211=Set Item 198 Icon Serial -InputList3SigType2211=Serial -InputList3Cue2212=Set Item 199 Icon Serial -InputList3SigType2212=Serial -InputList3Cue2213=Set Item 200 Icon Serial -InputList3SigType2213=Serial -InputList3Cue2214=Set Item 201 Icon Serial -InputList3SigType2214=Serial -InputList3Cue2215=Set Item 202 Icon Serial -InputList3SigType2215=Serial -InputList3Cue2216=Set Item 203 Icon Serial -InputList3SigType2216=Serial -InputList3Cue2217=Set Item 204 Icon Serial -InputList3SigType2217=Serial -InputList3Cue2218=Set Item 205 Icon Serial -InputList3SigType2218=Serial -InputList3Cue2219=Set Item 206 Icon Serial -InputList3SigType2219=Serial -InputList3Cue2220=Set Item 207 Icon Serial -InputList3SigType2220=Serial -InputList3Cue2221=Set Item 208 Icon Serial -InputList3SigType2221=Serial -InputList3Cue2222=Set Item 209 Icon Serial -InputList3SigType2222=Serial -InputList3Cue2223=Set Item 210 Icon Serial -InputList3SigType2223=Serial -InputList3Cue2224=Set Item 211 Icon Serial -InputList3SigType2224=Serial -InputList3Cue2225=Set Item 212 Icon Serial -InputList3SigType2225=Serial -InputList3Cue2226=Set Item 213 Icon Serial -InputList3SigType2226=Serial -InputList3Cue2227=Set Item 214 Icon Serial -InputList3SigType2227=Serial -InputList3Cue2228=Set Item 215 Icon Serial -InputList3SigType2228=Serial -InputList3Cue2229=Set Item 216 Icon Serial -InputList3SigType2229=Serial -InputList3Cue2230=Set Item 217 Icon Serial -InputList3SigType2230=Serial -InputList3Cue2231=Set Item 218 Icon Serial -InputList3SigType2231=Serial -InputList3Cue2232=Set Item 219 Icon Serial -InputList3SigType2232=Serial -InputList3Cue2233=Set Item 220 Icon Serial -InputList3SigType2233=Serial -InputList3Cue2234=Set Item 221 Icon Serial -InputList3SigType2234=Serial -InputList3Cue2235=Set Item 222 Icon Serial -InputList3SigType2235=Serial -InputList3Cue2236=Set Item 223 Icon Serial -InputList3SigType2236=Serial -InputList3Cue2237=Set Item 224 Icon Serial -InputList3SigType2237=Serial -InputList3Cue2238=Set Item 225 Icon Serial -InputList3SigType2238=Serial -InputList3Cue2239=Set Item 226 Icon Serial -InputList3SigType2239=Serial -InputList3Cue2240=Set Item 227 Icon Serial -InputList3SigType2240=Serial -InputList3Cue2241=Set Item 228 Icon Serial -InputList3SigType2241=Serial -InputList3Cue2242=Set Item 229 Icon Serial -InputList3SigType2242=Serial -InputList3Cue2243=Set Item 230 Icon Serial -InputList3SigType2243=Serial -InputList3Cue2244=Set Item 231 Icon Serial -InputList3SigType2244=Serial -InputList3Cue2245=Set Item 232 Icon Serial -InputList3SigType2245=Serial -InputList3Cue2246=Set Item 233 Icon Serial -InputList3SigType2246=Serial -InputList3Cue2247=Set Item 234 Icon Serial -InputList3SigType2247=Serial -InputList3Cue2248=Set Item 235 Icon Serial -InputList3SigType2248=Serial -InputList3Cue2249=Set Item 236 Icon Serial -InputList3SigType2249=Serial -InputList3Cue2250=Set Item 237 Icon Serial -InputList3SigType2250=Serial -InputList3Cue2251=Set Item 238 Icon Serial -InputList3SigType2251=Serial -InputList3Cue2252=Set Item 239 Icon Serial -InputList3SigType2252=Serial -InputList3Cue2253=Set Item 240 Icon Serial -InputList3SigType2253=Serial -InputList3Cue2254=Set Item 241 Icon Serial -InputList3SigType2254=Serial -InputList3Cue2255=Set Item 242 Icon Serial -InputList3SigType2255=Serial -InputList3Cue2256=Set Item 243 Icon Serial -InputList3SigType2256=Serial -InputList3Cue2257=Set Item 244 Icon Serial -InputList3SigType2257=Serial -InputList3Cue2258=Set Item 245 Icon Serial -InputList3SigType2258=Serial -InputList3Cue2259=Set Item 246 Icon Serial -InputList3SigType2259=Serial -InputList3Cue2260=Set Item 247 Icon Serial -InputList3SigType2260=Serial -InputList3Cue2261=Set Item 248 Icon Serial -InputList3SigType2261=Serial -InputList3Cue2262=Set Item 249 Icon Serial -InputList3SigType2262=Serial -InputList3Cue2263=Set Item 250 Icon Serial -InputList3SigType2263=Serial -InputList3Cue2264=Set Item 251 Icon Serial -InputList3SigType2264=Serial -InputList3Cue2265=Set Item 252 Icon Serial -InputList3SigType2265=Serial -InputList3Cue2266=Set Item 253 Icon Serial -InputList3SigType2266=Serial -InputList3Cue2267=Set Item 254 Icon Serial -InputList3SigType2267=Serial -InputList3Cue2268=Set Item 255 Icon Serial -InputList3SigType2268=Serial -InputList3Cue2269=[~UNUSED2~] -InputList3SigType2269=Digital|Analog|Serial|String -InputList3Cue4014=[~EndGroup~]Item Icons -InputList3SigType4014=Serial -OutputList3Cue1=[~UNUSED2~] -OutputList3SigType1=Serial -OutputList3Cue2=[~UNUSED2~] -OutputList3SigType2=Serial -OutputList3Cue3=[~UNUSED2~] -OutputList3SigType3=Serial -OutputList3Cue4=[~UNUSED2~] -OutputList3SigType4=Serial -OutputList3Cue5=[~UNUSED2~] -OutputList3SigType5=Serial -OutputList3Cue6=[~UNUSED2~] -OutputList3SigType6=Serial -OutputList3Cue7=[~UNUSED2~] -OutputList3SigType7=Serial -OutputList3Cue8=[~UNUSED2~] -OutputList3SigType8=Serial -OutputList3Cue9=[~UNUSED2~] -OutputList3SigType9=Serial -OutputList3Cue10=[~UNUSED2~] -OutputList3SigType10=Serial -OutputList3Cue11=[~BeginGroup~]Item Texts -OutputList3SigType11=Serial -OutputList3Cue12=[~UNUSED3~] -OutputList3SigType12=Serial -OutputList3Cue13=[~UNUSED3~] -OutputList3SigType13=Serial -OutputList3Cue14=[~UNUSED3~] -OutputList3SigType14=Serial -OutputList3Cue15=[~UNUSED3~] -OutputList3SigType15=Serial -OutputList3Cue16=[~UNUSED3~] -OutputList3SigType16=Serial -OutputList3Cue17=[~UNUSED3~] -OutputList3SigType17=Serial -OutputList3Cue18=[~UNUSED3~] -OutputList3SigType18=Serial -OutputList3Cue19=[~UNUSED3~] -OutputList3SigType19=Serial -OutputList3Cue20=[~UNUSED3~] -OutputList3SigType20=Serial -OutputList3Cue21=[~UNUSED3~] -OutputList3SigType21=Serial -OutputList3Cue22=[~UNUSED3~] -OutputList3SigType22=Serial -OutputList3Cue23=[~UNUSED3~] -OutputList3SigType23=Serial -OutputList3Cue24=[~UNUSED3~] -OutputList3SigType24=Serial -OutputList3Cue25=[~UNUSED3~] -OutputList3SigType25=Serial -OutputList3Cue26=[~UNUSED3~] -OutputList3SigType26=Serial -OutputList3Cue27=[~UNUSED3~] -OutputList3SigType27=Serial -OutputList3Cue28=[~UNUSED3~] -OutputList3SigType28=Serial -OutputList3Cue29=[~UNUSED3~] -OutputList3SigType29=Serial -OutputList3Cue30=[~UNUSED3~] -OutputList3SigType30=Serial -OutputList3Cue31=[~UNUSED3~] -OutputList3SigType31=Serial -OutputList3Cue32=[~UNUSED3~] -OutputList3SigType32=Serial -OutputList3Cue33=[~UNUSED3~] -OutputList3SigType33=Serial -OutputList3Cue34=[~UNUSED3~] -OutputList3SigType34=Serial -OutputList3Cue35=[~UNUSED3~] -OutputList3SigType35=Serial -OutputList3Cue36=[~UNUSED3~] -OutputList3SigType36=Serial -OutputList3Cue37=[~UNUSED3~] -OutputList3SigType37=Serial -OutputList3Cue38=[~UNUSED3~] -OutputList3SigType38=Serial -OutputList3Cue39=[~UNUSED3~] -OutputList3SigType39=Serial -OutputList3Cue40=[~UNUSED3~] -OutputList3SigType40=Serial -OutputList3Cue41=[~UNUSED3~] -OutputList3SigType41=Serial -OutputList3Cue42=[~UNUSED3~] -OutputList3SigType42=Serial -OutputList3Cue43=[~UNUSED3~] -OutputList3SigType43=Serial -OutputList3Cue44=[~UNUSED3~] -OutputList3SigType44=Serial -OutputList3Cue45=[~UNUSED3~] -OutputList3SigType45=Serial -OutputList3Cue46=[~UNUSED3~] -OutputList3SigType46=Serial -OutputList3Cue47=[~UNUSED3~] -OutputList3SigType47=Serial -OutputList3Cue48=[~UNUSED3~] -OutputList3SigType48=Serial -OutputList3Cue49=[~UNUSED3~] -OutputList3SigType49=Serial -OutputList3Cue50=[~UNUSED3~] -OutputList3SigType50=Serial -OutputList3Cue51=[~UNUSED3~] -OutputList3SigType51=Serial -OutputList3Cue52=[~UNUSED3~] -OutputList3SigType52=Serial -OutputList3Cue53=[~UNUSED3~] -OutputList3SigType53=Serial -OutputList3Cue54=[~UNUSED3~] -OutputList3SigType54=Serial -OutputList3Cue55=[~UNUSED3~] -OutputList3SigType55=Serial -OutputList3Cue56=[~UNUSED3~] -OutputList3SigType56=Serial -OutputList3Cue57=[~UNUSED3~] -OutputList3SigType57=Serial -OutputList3Cue58=[~UNUSED3~] -OutputList3SigType58=Serial -OutputList3Cue59=[~UNUSED3~] -OutputList3SigType59=Serial -OutputList3Cue60=[~UNUSED3~] -OutputList3SigType60=Serial -OutputList3Cue61=[~UNUSED3~] -OutputList3SigType61=Serial -OutputList3Cue62=[~UNUSED3~] -OutputList3SigType62=Serial -OutputList3Cue63=[~UNUSED3~] -OutputList3SigType63=Serial -OutputList3Cue64=[~UNUSED3~] -OutputList3SigType64=Serial -OutputList3Cue65=[~UNUSED3~] -OutputList3SigType65=Serial -OutputList3Cue66=[~UNUSED3~] -OutputList3SigType66=Serial -OutputList3Cue67=[~UNUSED3~] -OutputList3SigType67=Serial -OutputList3Cue68=[~UNUSED3~] -OutputList3SigType68=Serial -OutputList3Cue69=[~UNUSED3~] -OutputList3SigType69=Serial -OutputList3Cue70=[~UNUSED3~] -OutputList3SigType70=Serial -OutputList3Cue71=[~UNUSED3~] -OutputList3SigType71=Serial -OutputList3Cue72=[~UNUSED3~] -OutputList3SigType72=Serial -OutputList3Cue73=[~UNUSED3~] -OutputList3SigType73=Serial -OutputList3Cue74=[~UNUSED3~] -OutputList3SigType74=Serial -OutputList3Cue75=[~UNUSED3~] -OutputList3SigType75=Serial -OutputList3Cue76=[~UNUSED3~] -OutputList3SigType76=Serial -OutputList3Cue77=[~UNUSED3~] -OutputList3SigType77=Serial -OutputList3Cue78=[~UNUSED3~] -OutputList3SigType78=Serial -OutputList3Cue79=[~UNUSED3~] -OutputList3SigType79=Serial -OutputList3Cue80=[~UNUSED3~] -OutputList3SigType80=Serial -OutputList3Cue81=[~UNUSED3~] -OutputList3SigType81=Serial -OutputList3Cue82=[~UNUSED3~] -OutputList3SigType82=Serial -OutputList3Cue83=[~UNUSED3~] -OutputList3SigType83=Serial -OutputList3Cue84=[~UNUSED3~] -OutputList3SigType84=Serial -OutputList3Cue85=[~UNUSED3~] -OutputList3SigType85=Serial -OutputList3Cue86=[~UNUSED3~] -OutputList3SigType86=Serial -OutputList3Cue87=[~UNUSED3~] -OutputList3SigType87=Serial -OutputList3Cue88=[~UNUSED3~] -OutputList3SigType88=Serial -OutputList3Cue89=[~UNUSED3~] -OutputList3SigType89=Serial -OutputList3Cue90=[~UNUSED3~] -OutputList3SigType90=Serial -OutputList3Cue91=[~UNUSED3~] -OutputList3SigType91=Serial -OutputList3Cue92=[~UNUSED3~] -OutputList3SigType92=Serial -OutputList3Cue93=[~UNUSED3~] -OutputList3SigType93=Serial -OutputList3Cue94=[~UNUSED3~] -OutputList3SigType94=Serial -OutputList3Cue95=[~UNUSED3~] -OutputList3SigType95=Serial -OutputList3Cue96=[~UNUSED3~] -OutputList3SigType96=Serial -OutputList3Cue97=[~UNUSED3~] -OutputList3SigType97=Serial -OutputList3Cue98=[~UNUSED3~] -OutputList3SigType98=Serial -OutputList3Cue99=[~UNUSED3~] -OutputList3SigType99=Serial -OutputList3Cue100=[~UNUSED3~] -OutputList3SigType100=Serial -OutputList3Cue101=[~UNUSED3~] -OutputList3SigType101=Serial -OutputList3Cue102=[~UNUSED3~] -OutputList3SigType102=Serial -OutputList3Cue103=[~UNUSED3~] -OutputList3SigType103=Serial -OutputList3Cue104=[~UNUSED3~] -OutputList3SigType104=Serial -OutputList3Cue105=[~UNUSED3~] -OutputList3SigType105=Serial -OutputList3Cue106=[~UNUSED3~] -OutputList3SigType106=Serial -OutputList3Cue107=[~UNUSED3~] -OutputList3SigType107=Serial -OutputList3Cue108=[~UNUSED3~] -OutputList3SigType108=Serial -OutputList3Cue109=[~UNUSED3~] -OutputList3SigType109=Serial -OutputList3Cue110=[~UNUSED3~] -OutputList3SigType110=Serial -OutputList3Cue111=[~UNUSED3~] -OutputList3SigType111=Serial -OutputList3Cue112=[~UNUSED3~] -OutputList3SigType112=Serial -OutputList3Cue113=[~UNUSED3~] -OutputList3SigType113=Serial -OutputList3Cue114=[~UNUSED3~] -OutputList3SigType114=Serial -OutputList3Cue115=[~UNUSED3~] -OutputList3SigType115=Serial -OutputList3Cue116=[~UNUSED3~] -OutputList3SigType116=Serial -OutputList3Cue117=[~UNUSED3~] -OutputList3SigType117=Serial -OutputList3Cue118=[~UNUSED3~] -OutputList3SigType118=Serial -OutputList3Cue119=[~UNUSED3~] -OutputList3SigType119=Serial -OutputList3Cue120=[~UNUSED3~] -OutputList3SigType120=Serial -OutputList3Cue121=[~UNUSED3~] -OutputList3SigType121=Serial -OutputList3Cue122=[~UNUSED3~] -OutputList3SigType122=Serial -OutputList3Cue123=[~UNUSED3~] -OutputList3SigType123=Serial -OutputList3Cue124=[~UNUSED3~] -OutputList3SigType124=Serial -OutputList3Cue125=[~UNUSED3~] -OutputList3SigType125=Serial -OutputList3Cue126=[~UNUSED3~] -OutputList3SigType126=Serial -OutputList3Cue127=[~UNUSED3~] -OutputList3SigType127=Serial -OutputList3Cue128=[~UNUSED3~] -OutputList3SigType128=Serial -OutputList3Cue129=[~UNUSED3~] -OutputList3SigType129=Serial -OutputList3Cue130=[~UNUSED3~] -OutputList3SigType130=Serial -OutputList3Cue131=[~UNUSED3~] -OutputList3SigType131=Serial -OutputList3Cue132=[~UNUSED3~] -OutputList3SigType132=Serial -OutputList3Cue133=[~UNUSED3~] -OutputList3SigType133=Serial -OutputList3Cue134=[~UNUSED3~] -OutputList3SigType134=Serial -OutputList3Cue135=[~UNUSED3~] -OutputList3SigType135=Serial -OutputList3Cue136=[~UNUSED3~] -OutputList3SigType136=Serial -OutputList3Cue137=[~UNUSED3~] -OutputList3SigType137=Serial -OutputList3Cue138=[~UNUSED3~] -OutputList3SigType138=Serial -OutputList3Cue139=[~UNUSED3~] -OutputList3SigType139=Serial -OutputList3Cue140=[~UNUSED3~] -OutputList3SigType140=Serial -OutputList3Cue141=[~UNUSED3~] -OutputList3SigType141=Serial -OutputList3Cue142=[~UNUSED3~] -OutputList3SigType142=Serial -OutputList3Cue143=[~UNUSED3~] -OutputList3SigType143=Serial -OutputList3Cue144=[~UNUSED3~] -OutputList3SigType144=Serial -OutputList3Cue145=[~UNUSED3~] -OutputList3SigType145=Serial -OutputList3Cue146=[~UNUSED3~] -OutputList3SigType146=Serial -OutputList3Cue147=[~UNUSED3~] -OutputList3SigType147=Serial -OutputList3Cue148=[~UNUSED3~] -OutputList3SigType148=Serial -OutputList3Cue149=[~UNUSED3~] -OutputList3SigType149=Serial -OutputList3Cue150=[~UNUSED3~] -OutputList3SigType150=Serial -OutputList3Cue151=[~UNUSED3~] -OutputList3SigType151=Serial -OutputList3Cue152=[~UNUSED3~] -OutputList3SigType152=Serial -OutputList3Cue153=[~UNUSED3~] -OutputList3SigType153=Serial -OutputList3Cue154=[~UNUSED3~] -OutputList3SigType154=Serial -OutputList3Cue155=[~UNUSED3~] -OutputList3SigType155=Serial -OutputList3Cue156=[~UNUSED3~] -OutputList3SigType156=Serial -OutputList3Cue157=[~UNUSED3~] -OutputList3SigType157=Serial -OutputList3Cue158=[~UNUSED3~] -OutputList3SigType158=Serial -OutputList3Cue159=[~UNUSED3~] -OutputList3SigType159=Serial -OutputList3Cue160=[~UNUSED3~] -OutputList3SigType160=Serial -OutputList3Cue161=[~UNUSED3~] -OutputList3SigType161=Serial -OutputList3Cue162=[~UNUSED3~] -OutputList3SigType162=Serial -OutputList3Cue163=[~UNUSED3~] -OutputList3SigType163=Serial -OutputList3Cue164=[~UNUSED3~] -OutputList3SigType164=Serial -OutputList3Cue165=[~UNUSED3~] -OutputList3SigType165=Serial -OutputList3Cue166=[~UNUSED3~] -OutputList3SigType166=Serial -OutputList3Cue167=[~UNUSED3~] -OutputList3SigType167=Serial -OutputList3Cue168=[~UNUSED3~] -OutputList3SigType168=Serial -OutputList3Cue169=[~UNUSED3~] -OutputList3SigType169=Serial -OutputList3Cue170=[~UNUSED3~] -OutputList3SigType170=Serial -OutputList3Cue171=[~UNUSED3~] -OutputList3SigType171=Serial -OutputList3Cue172=[~UNUSED3~] -OutputList3SigType172=Serial -OutputList3Cue173=[~UNUSED3~] -OutputList3SigType173=Serial -OutputList3Cue174=[~UNUSED3~] -OutputList3SigType174=Serial -OutputList3Cue175=[~UNUSED3~] -OutputList3SigType175=Serial -OutputList3Cue176=[~UNUSED3~] -OutputList3SigType176=Serial -OutputList3Cue177=[~UNUSED3~] -OutputList3SigType177=Serial -OutputList3Cue178=[~UNUSED3~] -OutputList3SigType178=Serial -OutputList3Cue179=[~UNUSED3~] -OutputList3SigType179=Serial -OutputList3Cue180=[~UNUSED3~] -OutputList3SigType180=Serial -OutputList3Cue181=[~UNUSED3~] -OutputList3SigType181=Serial -OutputList3Cue182=[~UNUSED3~] -OutputList3SigType182=Serial -OutputList3Cue183=[~UNUSED3~] -OutputList3SigType183=Serial -OutputList3Cue184=[~UNUSED3~] -OutputList3SigType184=Serial -OutputList3Cue185=[~UNUSED3~] -OutputList3SigType185=Serial -OutputList3Cue186=[~UNUSED3~] -OutputList3SigType186=Serial -OutputList3Cue187=[~UNUSED3~] -OutputList3SigType187=Serial -OutputList3Cue188=[~UNUSED3~] -OutputList3SigType188=Serial -OutputList3Cue189=[~UNUSED3~] -OutputList3SigType189=Serial -OutputList3Cue190=[~UNUSED3~] -OutputList3SigType190=Serial -OutputList3Cue191=[~UNUSED3~] -OutputList3SigType191=Serial -OutputList3Cue192=[~UNUSED3~] -OutputList3SigType192=Serial -OutputList3Cue193=[~UNUSED3~] -OutputList3SigType193=Serial -OutputList3Cue194=[~UNUSED3~] -OutputList3SigType194=Serial -OutputList3Cue195=[~UNUSED3~] -OutputList3SigType195=Serial -OutputList3Cue196=[~UNUSED3~] -OutputList3SigType196=Serial -OutputList3Cue197=[~UNUSED3~] -OutputList3SigType197=Serial -OutputList3Cue198=[~UNUSED3~] -OutputList3SigType198=Serial -OutputList3Cue199=[~UNUSED3~] -OutputList3SigType199=Serial -OutputList3Cue200=[~UNUSED3~] -OutputList3SigType200=Serial -OutputList3Cue201=[~UNUSED3~] -OutputList3SigType201=Serial -OutputList3Cue202=[~UNUSED3~] -OutputList3SigType202=Serial -OutputList3Cue203=[~UNUSED3~] -OutputList3SigType203=Serial -OutputList3Cue204=[~UNUSED3~] -OutputList3SigType204=Serial -OutputList3Cue205=[~UNUSED3~] -OutputList3SigType205=Serial -OutputList3Cue206=[~UNUSED3~] -OutputList3SigType206=Serial -OutputList3Cue207=[~UNUSED3~] -OutputList3SigType207=Serial -OutputList3Cue208=[~UNUSED3~] -OutputList3SigType208=Serial -OutputList3Cue209=[~UNUSED3~] -OutputList3SigType209=Serial -OutputList3Cue210=[~UNUSED3~] -OutputList3SigType210=Serial -OutputList3Cue211=[~UNUSED3~] -OutputList3SigType211=Serial -OutputList3Cue212=[~UNUSED3~] -OutputList3SigType212=Serial -OutputList3Cue213=[~UNUSED3~] -OutputList3SigType213=Serial -OutputList3Cue214=[~UNUSED3~] -OutputList3SigType214=Serial -OutputList3Cue215=[~UNUSED3~] -OutputList3SigType215=Serial -OutputList3Cue216=[~UNUSED3~] -OutputList3SigType216=Serial -OutputList3Cue217=[~UNUSED3~] -OutputList3SigType217=Serial -OutputList3Cue218=[~UNUSED3~] -OutputList3SigType218=Serial -OutputList3Cue219=[~UNUSED3~] -OutputList3SigType219=Serial -OutputList3Cue220=[~UNUSED3~] -OutputList3SigType220=Serial -OutputList3Cue221=[~UNUSED3~] -OutputList3SigType221=Serial -OutputList3Cue222=[~UNUSED3~] -OutputList3SigType222=Serial -OutputList3Cue223=[~UNUSED3~] -OutputList3SigType223=Serial -OutputList3Cue224=[~UNUSED3~] -OutputList3SigType224=Serial -OutputList3Cue225=[~UNUSED3~] -OutputList3SigType225=Serial -OutputList3Cue226=[~UNUSED3~] -OutputList3SigType226=Serial -OutputList3Cue227=[~UNUSED3~] -OutputList3SigType227=Serial -OutputList3Cue228=[~UNUSED3~] -OutputList3SigType228=Serial -OutputList3Cue229=[~UNUSED3~] -OutputList3SigType229=Serial -OutputList3Cue230=[~UNUSED3~] -OutputList3SigType230=Serial -OutputList3Cue231=[~UNUSED3~] -OutputList3SigType231=Serial -OutputList3Cue232=[~UNUSED3~] -OutputList3SigType232=Serial -OutputList3Cue233=[~UNUSED3~] -OutputList3SigType233=Serial -OutputList3Cue234=[~UNUSED3~] -OutputList3SigType234=Serial -OutputList3Cue235=[~UNUSED3~] -OutputList3SigType235=Serial -OutputList3Cue236=[~UNUSED3~] -OutputList3SigType236=Serial -OutputList3Cue237=[~UNUSED3~] -OutputList3SigType237=Serial -OutputList3Cue238=[~UNUSED3~] -OutputList3SigType238=Serial -OutputList3Cue239=[~UNUSED3~] -OutputList3SigType239=Serial -OutputList3Cue240=[~UNUSED3~] -OutputList3SigType240=Serial -OutputList3Cue241=[~UNUSED3~] -OutputList3SigType241=Serial -OutputList3Cue242=[~UNUSED3~] -OutputList3SigType242=Serial -OutputList3Cue243=[~UNUSED3~] -OutputList3SigType243=Serial -OutputList3Cue244=[~UNUSED3~] -OutputList3SigType244=Serial -OutputList3Cue245=[~UNUSED3~] -OutputList3SigType245=Serial -OutputList3Cue246=[~UNUSED3~] -OutputList3SigType246=Serial -OutputList3Cue247=[~UNUSED3~] -OutputList3SigType247=Serial -OutputList3Cue248=[~UNUSED3~] -OutputList3SigType248=Serial -OutputList3Cue249=[~UNUSED3~] -OutputList3SigType249=Serial -OutputList3Cue250=[~UNUSED3~] -OutputList3SigType250=Serial -OutputList3Cue251=[~UNUSED3~] -OutputList3SigType251=Serial -OutputList3Cue252=[~UNUSED3~] -OutputList3SigType252=Serial -OutputList3Cue253=[~UNUSED3~] -OutputList3SigType253=Serial -OutputList3Cue254=[~UNUSED3~] -OutputList3SigType254=Serial -OutputList3Cue255=[~UNUSED3~] -OutputList3SigType255=Serial -OutputList3Cue256=[~UNUSED3~] -OutputList3SigType256=Serial -OutputList3Cue257=[~UNUSED3~] -OutputList3SigType257=Serial -OutputList3Cue258=[~UNUSED3~] -OutputList3SigType258=Serial -OutputList3Cue259=[~UNUSED3~] -OutputList3SigType259=Serial -OutputList3Cue260=[~UNUSED3~] -OutputList3SigType260=Serial -OutputList3Cue261=[~UNUSED3~] -OutputList3SigType261=Serial -OutputList3Cue262=[~UNUSED3~] -OutputList3SigType262=Serial -OutputList3Cue263=[~UNUSED3~] -OutputList3SigType263=Serial -OutputList3Cue264=[~UNUSED3~] -OutputList3SigType264=Serial -OutputList3Cue265=[~UNUSED3~] -OutputList3SigType265=Serial -OutputList3Cue266=[~UNUSED3~] -OutputList3SigType266=Serial -OutputList3Cue267=[~UNUSED2~] -OutputList3SigType267=Digital|Analog|Serial|String -OutputList3Cue2012=[~EndGroup~]Item Texts -OutputList3SigType2012=Serial -OutputList3Cue2013=[~BeginGroup~]Item Icons -OutputList3SigType2013=Serial -OutputList3Cue2014=[~UNUSED3~] -OutputList3SigType2014=Serial -OutputList3Cue2015=[~UNUSED3~] -OutputList3SigType2015=Serial -OutputList3Cue2016=[~UNUSED3~] -OutputList3SigType2016=Serial -OutputList3Cue2017=[~UNUSED3~] -OutputList3SigType2017=Serial -OutputList3Cue2018=[~UNUSED3~] -OutputList3SigType2018=Serial -OutputList3Cue2019=[~UNUSED3~] -OutputList3SigType2019=Serial -OutputList3Cue2020=[~UNUSED3~] -OutputList3SigType2020=Serial -OutputList3Cue2021=[~UNUSED3~] -OutputList3SigType2021=Serial -OutputList3Cue2022=[~UNUSED3~] -OutputList3SigType2022=Serial -OutputList3Cue2023=[~UNUSED3~] -OutputList3SigType2023=Serial -OutputList3Cue2024=[~UNUSED3~] -OutputList3SigType2024=Serial -OutputList3Cue2025=[~UNUSED3~] -OutputList3SigType2025=Serial -OutputList3Cue2026=[~UNUSED3~] -OutputList3SigType2026=Serial -OutputList3Cue2027=[~UNUSED3~] -OutputList3SigType2027=Serial -OutputList3Cue2028=[~UNUSED3~] -OutputList3SigType2028=Serial -OutputList3Cue2029=[~UNUSED3~] -OutputList3SigType2029=Serial -OutputList3Cue2030=[~UNUSED3~] -OutputList3SigType2030=Serial -OutputList3Cue2031=[~UNUSED3~] -OutputList3SigType2031=Serial -OutputList3Cue2032=[~UNUSED3~] -OutputList3SigType2032=Serial -OutputList3Cue2033=[~UNUSED3~] -OutputList3SigType2033=Serial -OutputList3Cue2034=[~UNUSED3~] -OutputList3SigType2034=Serial -OutputList3Cue2035=[~UNUSED3~] -OutputList3SigType2035=Serial -OutputList3Cue2036=[~UNUSED3~] -OutputList3SigType2036=Serial -OutputList3Cue2037=[~UNUSED3~] -OutputList3SigType2037=Serial -OutputList3Cue2038=[~UNUSED3~] -OutputList3SigType2038=Serial -OutputList3Cue2039=[~UNUSED3~] -OutputList3SigType2039=Serial -OutputList3Cue2040=[~UNUSED3~] -OutputList3SigType2040=Serial -OutputList3Cue2041=[~UNUSED3~] -OutputList3SigType2041=Serial -OutputList3Cue2042=[~UNUSED3~] -OutputList3SigType2042=Serial -OutputList3Cue2043=[~UNUSED3~] -OutputList3SigType2043=Serial -OutputList3Cue2044=[~UNUSED3~] -OutputList3SigType2044=Serial -OutputList3Cue2045=[~UNUSED3~] -OutputList3SigType2045=Serial -OutputList3Cue2046=[~UNUSED3~] -OutputList3SigType2046=Serial -OutputList3Cue2047=[~UNUSED3~] -OutputList3SigType2047=Serial -OutputList3Cue2048=[~UNUSED3~] -OutputList3SigType2048=Serial -OutputList3Cue2049=[~UNUSED3~] -OutputList3SigType2049=Serial -OutputList3Cue2050=[~UNUSED3~] -OutputList3SigType2050=Serial -OutputList3Cue2051=[~UNUSED3~] -OutputList3SigType2051=Serial -OutputList3Cue2052=[~UNUSED3~] -OutputList3SigType2052=Serial -OutputList3Cue2053=[~UNUSED3~] -OutputList3SigType2053=Serial -OutputList3Cue2054=[~UNUSED3~] -OutputList3SigType2054=Serial -OutputList3Cue2055=[~UNUSED3~] -OutputList3SigType2055=Serial -OutputList3Cue2056=[~UNUSED3~] -OutputList3SigType2056=Serial -OutputList3Cue2057=[~UNUSED3~] -OutputList3SigType2057=Serial -OutputList3Cue2058=[~UNUSED3~] -OutputList3SigType2058=Serial -OutputList3Cue2059=[~UNUSED3~] -OutputList3SigType2059=Serial -OutputList3Cue2060=[~UNUSED3~] -OutputList3SigType2060=Serial -OutputList3Cue2061=[~UNUSED3~] -OutputList3SigType2061=Serial -OutputList3Cue2062=[~UNUSED3~] -OutputList3SigType2062=Serial -OutputList3Cue2063=[~UNUSED3~] -OutputList3SigType2063=Serial -OutputList3Cue2064=[~UNUSED3~] -OutputList3SigType2064=Serial -OutputList3Cue2065=[~UNUSED3~] -OutputList3SigType2065=Serial -OutputList3Cue2066=[~UNUSED3~] -OutputList3SigType2066=Serial -OutputList3Cue2067=[~UNUSED3~] -OutputList3SigType2067=Serial -OutputList3Cue2068=[~UNUSED3~] -OutputList3SigType2068=Serial -OutputList3Cue2069=[~UNUSED3~] -OutputList3SigType2069=Serial -OutputList3Cue2070=[~UNUSED3~] -OutputList3SigType2070=Serial -OutputList3Cue2071=[~UNUSED3~] -OutputList3SigType2071=Serial -OutputList3Cue2072=[~UNUSED3~] -OutputList3SigType2072=Serial -OutputList3Cue2073=[~UNUSED3~] -OutputList3SigType2073=Serial -OutputList3Cue2074=[~UNUSED3~] -OutputList3SigType2074=Serial -OutputList3Cue2075=[~UNUSED3~] -OutputList3SigType2075=Serial -OutputList3Cue2076=[~UNUSED3~] -OutputList3SigType2076=Serial -OutputList3Cue2077=[~UNUSED3~] -OutputList3SigType2077=Serial -OutputList3Cue2078=[~UNUSED3~] -OutputList3SigType2078=Serial -OutputList3Cue2079=[~UNUSED3~] -OutputList3SigType2079=Serial -OutputList3Cue2080=[~UNUSED3~] -OutputList3SigType2080=Serial -OutputList3Cue2081=[~UNUSED3~] -OutputList3SigType2081=Serial -OutputList3Cue2082=[~UNUSED3~] -OutputList3SigType2082=Serial -OutputList3Cue2083=[~UNUSED3~] -OutputList3SigType2083=Serial -OutputList3Cue2084=[~UNUSED3~] -OutputList3SigType2084=Serial -OutputList3Cue2085=[~UNUSED3~] -OutputList3SigType2085=Serial -OutputList3Cue2086=[~UNUSED3~] -OutputList3SigType2086=Serial -OutputList3Cue2087=[~UNUSED3~] -OutputList3SigType2087=Serial -OutputList3Cue2088=[~UNUSED3~] -OutputList3SigType2088=Serial -OutputList3Cue2089=[~UNUSED3~] -OutputList3SigType2089=Serial -OutputList3Cue2090=[~UNUSED3~] -OutputList3SigType2090=Serial -OutputList3Cue2091=[~UNUSED3~] -OutputList3SigType2091=Serial -OutputList3Cue2092=[~UNUSED3~] -OutputList3SigType2092=Serial -OutputList3Cue2093=[~UNUSED3~] -OutputList3SigType2093=Serial -OutputList3Cue2094=[~UNUSED3~] -OutputList3SigType2094=Serial -OutputList3Cue2095=[~UNUSED3~] -OutputList3SigType2095=Serial -OutputList3Cue2096=[~UNUSED3~] -OutputList3SigType2096=Serial -OutputList3Cue2097=[~UNUSED3~] -OutputList3SigType2097=Serial -OutputList3Cue2098=[~UNUSED3~] -OutputList3SigType2098=Serial -OutputList3Cue2099=[~UNUSED3~] -OutputList3SigType2099=Serial -OutputList3Cue2100=[~UNUSED3~] -OutputList3SigType2100=Serial -OutputList3Cue2101=[~UNUSED3~] -OutputList3SigType2101=Serial -OutputList3Cue2102=[~UNUSED3~] -OutputList3SigType2102=Serial -OutputList3Cue2103=[~UNUSED3~] -OutputList3SigType2103=Serial -OutputList3Cue2104=[~UNUSED3~] -OutputList3SigType2104=Serial -OutputList3Cue2105=[~UNUSED3~] -OutputList3SigType2105=Serial -OutputList3Cue2106=[~UNUSED3~] -OutputList3SigType2106=Serial -OutputList3Cue2107=[~UNUSED3~] -OutputList3SigType2107=Serial -OutputList3Cue2108=[~UNUSED3~] -OutputList3SigType2108=Serial -OutputList3Cue2109=[~UNUSED3~] -OutputList3SigType2109=Serial -OutputList3Cue2110=[~UNUSED3~] -OutputList3SigType2110=Serial -OutputList3Cue2111=[~UNUSED3~] -OutputList3SigType2111=Serial -OutputList3Cue2112=[~UNUSED3~] -OutputList3SigType2112=Serial -OutputList3Cue2113=[~UNUSED3~] -OutputList3SigType2113=Serial -OutputList3Cue2114=[~UNUSED3~] -OutputList3SigType2114=Serial -OutputList3Cue2115=[~UNUSED3~] -OutputList3SigType2115=Serial -OutputList3Cue2116=[~UNUSED3~] -OutputList3SigType2116=Serial -OutputList3Cue2117=[~UNUSED3~] -OutputList3SigType2117=Serial -OutputList3Cue2118=[~UNUSED3~] -OutputList3SigType2118=Serial -OutputList3Cue2119=[~UNUSED3~] -OutputList3SigType2119=Serial -OutputList3Cue2120=[~UNUSED3~] -OutputList3SigType2120=Serial -OutputList3Cue2121=[~UNUSED3~] -OutputList3SigType2121=Serial -OutputList3Cue2122=[~UNUSED3~] -OutputList3SigType2122=Serial -OutputList3Cue2123=[~UNUSED3~] -OutputList3SigType2123=Serial -OutputList3Cue2124=[~UNUSED3~] -OutputList3SigType2124=Serial -OutputList3Cue2125=[~UNUSED3~] -OutputList3SigType2125=Serial -OutputList3Cue2126=[~UNUSED3~] -OutputList3SigType2126=Serial -OutputList3Cue2127=[~UNUSED3~] -OutputList3SigType2127=Serial -OutputList3Cue2128=[~UNUSED3~] -OutputList3SigType2128=Serial -OutputList3Cue2129=[~UNUSED3~] -OutputList3SigType2129=Serial -OutputList3Cue2130=[~UNUSED3~] -OutputList3SigType2130=Serial -OutputList3Cue2131=[~UNUSED3~] -OutputList3SigType2131=Serial -OutputList3Cue2132=[~UNUSED3~] -OutputList3SigType2132=Serial -OutputList3Cue2133=[~UNUSED3~] -OutputList3SigType2133=Serial -OutputList3Cue2134=[~UNUSED3~] -OutputList3SigType2134=Serial -OutputList3Cue2135=[~UNUSED3~] -OutputList3SigType2135=Serial -OutputList3Cue2136=[~UNUSED3~] -OutputList3SigType2136=Serial -OutputList3Cue2137=[~UNUSED3~] -OutputList3SigType2137=Serial -OutputList3Cue2138=[~UNUSED3~] -OutputList3SigType2138=Serial -OutputList3Cue2139=[~UNUSED3~] -OutputList3SigType2139=Serial -OutputList3Cue2140=[~UNUSED3~] -OutputList3SigType2140=Serial -OutputList3Cue2141=[~UNUSED3~] -OutputList3SigType2141=Serial -OutputList3Cue2142=[~UNUSED3~] -OutputList3SigType2142=Serial -OutputList3Cue2143=[~UNUSED3~] -OutputList3SigType2143=Serial -OutputList3Cue2144=[~UNUSED3~] -OutputList3SigType2144=Serial -OutputList3Cue2145=[~UNUSED3~] -OutputList3SigType2145=Serial -OutputList3Cue2146=[~UNUSED3~] -OutputList3SigType2146=Serial -OutputList3Cue2147=[~UNUSED3~] -OutputList3SigType2147=Serial -OutputList3Cue2148=[~UNUSED3~] -OutputList3SigType2148=Serial -OutputList3Cue2149=[~UNUSED3~] -OutputList3SigType2149=Serial -OutputList3Cue2150=[~UNUSED3~] -OutputList3SigType2150=Serial -OutputList3Cue2151=[~UNUSED3~] -OutputList3SigType2151=Serial -OutputList3Cue2152=[~UNUSED3~] -OutputList3SigType2152=Serial -OutputList3Cue2153=[~UNUSED3~] -OutputList3SigType2153=Serial -OutputList3Cue2154=[~UNUSED3~] -OutputList3SigType2154=Serial -OutputList3Cue2155=[~UNUSED3~] -OutputList3SigType2155=Serial -OutputList3Cue2156=[~UNUSED3~] -OutputList3SigType2156=Serial -OutputList3Cue2157=[~UNUSED3~] -OutputList3SigType2157=Serial -OutputList3Cue2158=[~UNUSED3~] -OutputList3SigType2158=Serial -OutputList3Cue2159=[~UNUSED3~] -OutputList3SigType2159=Serial -OutputList3Cue2160=[~UNUSED3~] -OutputList3SigType2160=Serial -OutputList3Cue2161=[~UNUSED3~] -OutputList3SigType2161=Serial -OutputList3Cue2162=[~UNUSED3~] -OutputList3SigType2162=Serial -OutputList3Cue2163=[~UNUSED3~] -OutputList3SigType2163=Serial -OutputList3Cue2164=[~UNUSED3~] -OutputList3SigType2164=Serial -OutputList3Cue2165=[~UNUSED3~] -OutputList3SigType2165=Serial -OutputList3Cue2166=[~UNUSED3~] -OutputList3SigType2166=Serial -OutputList3Cue2167=[~UNUSED3~] -OutputList3SigType2167=Serial -OutputList3Cue2168=[~UNUSED3~] -OutputList3SigType2168=Serial -OutputList3Cue2169=[~UNUSED3~] -OutputList3SigType2169=Serial -OutputList3Cue2170=[~UNUSED3~] -OutputList3SigType2170=Serial -OutputList3Cue2171=[~UNUSED3~] -OutputList3SigType2171=Serial -OutputList3Cue2172=[~UNUSED3~] -OutputList3SigType2172=Serial -OutputList3Cue2173=[~UNUSED3~] -OutputList3SigType2173=Serial -OutputList3Cue2174=[~UNUSED3~] -OutputList3SigType2174=Serial -OutputList3Cue2175=[~UNUSED3~] -OutputList3SigType2175=Serial -OutputList3Cue2176=[~UNUSED3~] -OutputList3SigType2176=Serial -OutputList3Cue2177=[~UNUSED3~] -OutputList3SigType2177=Serial -OutputList3Cue2178=[~UNUSED3~] -OutputList3SigType2178=Serial -OutputList3Cue2179=[~UNUSED3~] -OutputList3SigType2179=Serial -OutputList3Cue2180=[~UNUSED3~] -OutputList3SigType2180=Serial -OutputList3Cue2181=[~UNUSED3~] -OutputList3SigType2181=Serial -OutputList3Cue2182=[~UNUSED3~] -OutputList3SigType2182=Serial -OutputList3Cue2183=[~UNUSED3~] -OutputList3SigType2183=Serial -OutputList3Cue2184=[~UNUSED3~] -OutputList3SigType2184=Serial -OutputList3Cue2185=[~UNUSED3~] -OutputList3SigType2185=Serial -OutputList3Cue2186=[~UNUSED3~] -OutputList3SigType2186=Serial -OutputList3Cue2187=[~UNUSED3~] -OutputList3SigType2187=Serial -OutputList3Cue2188=[~UNUSED3~] -OutputList3SigType2188=Serial -OutputList3Cue2189=[~UNUSED3~] -OutputList3SigType2189=Serial -OutputList3Cue2190=[~UNUSED3~] -OutputList3SigType2190=Serial -OutputList3Cue2191=[~UNUSED3~] -OutputList3SigType2191=Serial -OutputList3Cue2192=[~UNUSED3~] -OutputList3SigType2192=Serial -OutputList3Cue2193=[~UNUSED3~] -OutputList3SigType2193=Serial -OutputList3Cue2194=[~UNUSED3~] -OutputList3SigType2194=Serial -OutputList3Cue2195=[~UNUSED3~] -OutputList3SigType2195=Serial -OutputList3Cue2196=[~UNUSED3~] -OutputList3SigType2196=Serial -OutputList3Cue2197=[~UNUSED3~] -OutputList3SigType2197=Serial -OutputList3Cue2198=[~UNUSED3~] -OutputList3SigType2198=Serial -OutputList3Cue2199=[~UNUSED3~] -OutputList3SigType2199=Serial -OutputList3Cue2200=[~UNUSED3~] -OutputList3SigType2200=Serial -OutputList3Cue2201=[~UNUSED3~] -OutputList3SigType2201=Serial -OutputList3Cue2202=[~UNUSED3~] -OutputList3SigType2202=Serial -OutputList3Cue2203=[~UNUSED3~] -OutputList3SigType2203=Serial -OutputList3Cue2204=[~UNUSED3~] -OutputList3SigType2204=Serial -OutputList3Cue2205=[~UNUSED3~] -OutputList3SigType2205=Serial -OutputList3Cue2206=[~UNUSED3~] -OutputList3SigType2206=Serial -OutputList3Cue2207=[~UNUSED3~] -OutputList3SigType2207=Serial -OutputList3Cue2208=[~UNUSED3~] -OutputList3SigType2208=Serial -OutputList3Cue2209=[~UNUSED3~] -OutputList3SigType2209=Serial -OutputList3Cue2210=[~UNUSED3~] -OutputList3SigType2210=Serial -OutputList3Cue2211=[~UNUSED3~] -OutputList3SigType2211=Serial -OutputList3Cue2212=[~UNUSED3~] -OutputList3SigType2212=Serial -OutputList3Cue2213=[~UNUSED3~] -OutputList3SigType2213=Serial -OutputList3Cue2214=[~UNUSED3~] -OutputList3SigType2214=Serial -OutputList3Cue2215=[~UNUSED3~] -OutputList3SigType2215=Serial -OutputList3Cue2216=[~UNUSED3~] -OutputList3SigType2216=Serial -OutputList3Cue2217=[~UNUSED3~] -OutputList3SigType2217=Serial -OutputList3Cue2218=[~UNUSED3~] -OutputList3SigType2218=Serial -OutputList3Cue2219=[~UNUSED3~] -OutputList3SigType2219=Serial -OutputList3Cue2220=[~UNUSED3~] -OutputList3SigType2220=Serial -OutputList3Cue2221=[~UNUSED3~] -OutputList3SigType2221=Serial -OutputList3Cue2222=[~UNUSED3~] -OutputList3SigType2222=Serial -OutputList3Cue2223=[~UNUSED3~] -OutputList3SigType2223=Serial -OutputList3Cue2224=[~UNUSED3~] -OutputList3SigType2224=Serial -OutputList3Cue2225=[~UNUSED3~] -OutputList3SigType2225=Serial -OutputList3Cue2226=[~UNUSED3~] -OutputList3SigType2226=Serial -OutputList3Cue2227=[~UNUSED3~] -OutputList3SigType2227=Serial -OutputList3Cue2228=[~UNUSED3~] -OutputList3SigType2228=Serial -OutputList3Cue2229=[~UNUSED3~] -OutputList3SigType2229=Serial -OutputList3Cue2230=[~UNUSED3~] -OutputList3SigType2230=Serial -OutputList3Cue2231=[~UNUSED3~] -OutputList3SigType2231=Serial -OutputList3Cue2232=[~UNUSED3~] -OutputList3SigType2232=Serial -OutputList3Cue2233=[~UNUSED3~] -OutputList3SigType2233=Serial -OutputList3Cue2234=[~UNUSED3~] -OutputList3SigType2234=Serial -OutputList3Cue2235=[~UNUSED3~] -OutputList3SigType2235=Serial -OutputList3Cue2236=[~UNUSED3~] -OutputList3SigType2236=Serial -OutputList3Cue2237=[~UNUSED3~] -OutputList3SigType2237=Serial -OutputList3Cue2238=[~UNUSED3~] -OutputList3SigType2238=Serial -OutputList3Cue2239=[~UNUSED3~] -OutputList3SigType2239=Serial -OutputList3Cue2240=[~UNUSED3~] -OutputList3SigType2240=Serial -OutputList3Cue2241=[~UNUSED3~] -OutputList3SigType2241=Serial -OutputList3Cue2242=[~UNUSED3~] -OutputList3SigType2242=Serial -OutputList3Cue2243=[~UNUSED3~] -OutputList3SigType2243=Serial -OutputList3Cue2244=[~UNUSED3~] -OutputList3SigType2244=Serial -OutputList3Cue2245=[~UNUSED3~] -OutputList3SigType2245=Serial -OutputList3Cue2246=[~UNUSED3~] -OutputList3SigType2246=Serial -OutputList3Cue2247=[~UNUSED3~] -OutputList3SigType2247=Serial -OutputList3Cue2248=[~UNUSED3~] -OutputList3SigType2248=Serial -OutputList3Cue2249=[~UNUSED3~] -OutputList3SigType2249=Serial -OutputList3Cue2250=[~UNUSED3~] -OutputList3SigType2250=Serial -OutputList3Cue2251=[~UNUSED3~] -OutputList3SigType2251=Serial -OutputList3Cue2252=[~UNUSED3~] -OutputList3SigType2252=Serial -OutputList3Cue2253=[~UNUSED3~] -OutputList3SigType2253=Serial -OutputList3Cue2254=[~UNUSED3~] -OutputList3SigType2254=Serial -OutputList3Cue2255=[~UNUSED3~] -OutputList3SigType2255=Serial -OutputList3Cue2256=[~UNUSED3~] -OutputList3SigType2256=Serial -OutputList3Cue2257=[~UNUSED3~] -OutputList3SigType2257=Serial -OutputList3Cue2258=[~UNUSED3~] -OutputList3SigType2258=Serial -OutputList3Cue2259=[~UNUSED3~] -OutputList3SigType2259=Serial -OutputList3Cue2260=[~UNUSED3~] -OutputList3SigType2260=Serial -OutputList3Cue2261=[~UNUSED3~] -OutputList3SigType2261=Serial -OutputList3Cue2262=[~UNUSED3~] -OutputList3SigType2262=Serial -OutputList3Cue2263=[~UNUSED3~] -OutputList3SigType2263=Serial -OutputList3Cue2264=[~UNUSED3~] -OutputList3SigType2264=Serial -OutputList3Cue2265=[~UNUSED3~] -OutputList3SigType2265=Serial -OutputList3Cue2266=[~UNUSED3~] -OutputList3SigType2266=Serial -OutputList3Cue2267=[~UNUSED3~] -OutputList3SigType2267=Serial -OutputList3Cue2268=[~UNUSED3~] -OutputList3SigType2268=Serial -OutputList3Cue2269=[~UNUSED2~] -OutputList3SigType2269=Digital|Analog|Serial|String -OutputList3Cue4014=[~EndGroup~]Item Icons -OutputList3SigType4014=Serial -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=2 -CedH=2 -SmartObjId=1202d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=2 -Tp=1 -HD=TRUE -DV=1202d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=2 -Name=PepperDash Essentials iPad_[D.VC] Directory_Dynamic Button List Vertical_2.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials iPad_[D.VC] Keypad with favorites_VC DTMF Keypad.ced -Hint=VC DTMF Keypad (Smart Object ID=1201) -Code=3 -SGControlType=Simple Keypad -SGControlName=VC DTMF Keypad -GUID=B4D53525-26EF-4326-8234-1D53F6E9BF04 -SmplCName=PepperDash Essentials iPad_[D.VC] Keypad with favorites_VC DTMF Keypad.ced -SMWRev=4.02.19 -Expand=expand_random -HelpID=10061 -;Define the number of inputs, outputs and parameters -MinVariableInputs=12 -MaxVariableInputs=12 -MinVariableOutputs=12 -MaxVariableOutputs=12 -NumFixedParams=1 -MinVariableInputsList2=0 -MaxVariableInputsList2=0 -MinVariableOutputsList2=0 -MaxVariableOutputsList2=0 -MinVariableInputsList3=0 -MaxVariableInputsList3=0 -MinVariableOutputsList3=0 -MaxVariableOutputsList3=0 -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -OutputCue1=1 -OutputSigType1=Digital -InputCue2=[~UNUSED3~] -InputSigType2=Digital -OutputCue2=2 -OutputSigType2=Digital -InputCue3=[~UNUSED3~] -InputSigType3=Digital -OutputCue3=3 -OutputSigType3=Digital -InputCue4=[~UNUSED3~] -InputSigType4=Digital -OutputCue4=4 -OutputSigType4=Digital -InputCue5=[~UNUSED3~] -InputSigType5=Digital -OutputCue5=5 -OutputSigType5=Digital -InputCue6=[~UNUSED3~] -InputSigType6=Digital -OutputCue6=6 -OutputSigType6=Digital -InputCue7=[~UNUSED3~] -InputSigType7=Digital -OutputCue7=7 -OutputSigType7=Digital -InputCue8=[~UNUSED3~] -InputSigType8=Digital -OutputCue8=8 -OutputSigType8=Digital -InputCue9=[~UNUSED3~] -InputSigType9=Digital -OutputCue9=9 -OutputSigType9=Digital -InputCue10=[~UNUSED3~] -InputSigType10=Digital -OutputCue10=0 -OutputSigType10=Digital -InputCue11=[~UNUSED3~] -InputSigType11=Digital -OutputCue11=* -OutputSigType11=Digital -InputCue12=[~UNUSED3~] -InputSigType12=Digital -OutputCue12=/# -OutputSigType12=Digital -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=3 -CedH=3 -SmartObjId=1201d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=3 -Tp=1 -HD=TRUE -DV=1201d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=3 -Name=PepperDash Essentials iPad_[D.VC] Keypad with favorites_VC DTMF Keypad.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials iPad_[Z.Dialogs] PIN_PIN Keypad.ced -Hint=PIN Keypad (Smart Object ID=3903) -Code=4 -SGControlType=Simple Keypad -SGControlName=PIN Keypad -GUID=D85E5DFB-DE45-45FE-93C5-2FA177B68BFB -SmplCName=PepperDash Essentials iPad_[Z.Dialogs] PIN_PIN Keypad.ced -SMWRev=4.02.19 -Expand=expand_random -HelpID=10061 -;Define the number of inputs, outputs and parameters -MinVariableInputs=12 -MaxVariableInputs=12 -MinVariableOutputs=12 -MaxVariableOutputs=12 -NumFixedParams=1 -MinVariableInputsList2=0 -MaxVariableInputsList2=0 -MinVariableOutputsList2=0 -MaxVariableOutputsList2=0 -MinVariableInputsList3=0 -MaxVariableInputsList3=0 -MinVariableOutputsList3=0 -MaxVariableOutputsList3=0 -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -OutputCue1=1 -OutputSigType1=Digital -InputCue2=[~UNUSED3~] -InputSigType2=Digital -OutputCue2=2 -OutputSigType2=Digital -InputCue3=[~UNUSED3~] -InputSigType3=Digital -OutputCue3=3 -OutputSigType3=Digital -InputCue4=[~UNUSED3~] -InputSigType4=Digital -OutputCue4=4 -OutputSigType4=Digital -InputCue5=[~UNUSED3~] -InputSigType5=Digital -OutputCue5=5 -OutputSigType5=Digital -InputCue6=[~UNUSED3~] -InputSigType6=Digital -OutputCue6=6 -OutputSigType6=Digital -InputCue7=[~UNUSED3~] -InputSigType7=Digital -OutputCue7=7 -OutputSigType7=Digital -InputCue8=[~UNUSED3~] -InputSigType8=Digital -OutputCue8=8 -OutputSigType8=Digital -InputCue9=[~UNUSED3~] -InputSigType9=Digital -OutputCue9=9 -OutputSigType9=Digital -InputCue10=[~UNUSED3~] -InputSigType10=Digital -OutputCue10=0 -OutputSigType10=Digital -InputCue11=[~UNUSED3~] -InputSigType11=Digital -OutputCue11=Misc_1 -OutputSigType11=Digital -InputCue12=[~UNUSED3~] -InputSigType12=Digital -OutputCue12=Misc_2 -OutputSigType12=Digital -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=4 -CedH=4 -SmartObjId=3903d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=4 -Tp=1 -HD=TRUE -DV=3903d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=4 -Name=PepperDash Essentials iPad_[Z.Dialogs] PIN_PIN Keypad.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials iPad_[E.Technician Controls] Sys Status_Subpage Reference List Vertical_3.ced -Hint=Subpage Reference List Vertical_3 (Smart Object ID=3902) -Code=5 -SGControlType=Subpage Reference List Vertical -SGControlName=Subpage Reference List Vertical_3 -GUID=3490D547-0B98-444B-A284-D6C1BAB2FDCE -SmplCName=PepperDash Essentials iPad_[E.Technician Controls] Sys Status_Subpage Reference List Vertical_3.ced -SMWRev=4.02.20 -Expand=expand_random -HelpID=10125 -Render=8 -;Define the number of inputs, outputs and parameters -MinVariableInputs=4076 -MaxVariableInputs=4076 -MinVariableOutputs=4076 -MaxVariableOutputs=4076 -NumFixedParams=1 -MinVariableInputsList2=72 -MaxVariableInputsList2=72 -MinVariableOutputsList2=72 -MaxVariableOutputsList2=72 -MinVariableInputsList3=72 -MaxVariableInputsList3=72 -MinVariableOutputsList3=72 -MaxVariableOutputsList3=72 -InputSigType1=Digital -OutputSigType1=Digital -InputList2SigType1=Analog -OutputList2SigType1=Analog -InputList3SigType1=Serial -OutputList3SigType1=Serial - -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -InputCue2=[~UNUSED2~] -InputSigType2=Digital -InputCue3=[~UNUSED2~] -InputSigType3=Digital -InputCue4=[~UNUSED2~] -InputSigType4=Digital -InputCue5=[~UNUSED2~] -InputSigType5=Digital -InputCue6=[~UNUSED2~] -InputSigType6=Digital -InputCue7=[~UNUSED2~] -InputSigType7=Digital -InputCue8=[~UNUSED2~] -InputSigType8=Digital -InputCue9=[~UNUSED2~] -InputSigType9=Digital -InputCue10=[~UNUSED2~] -InputSigType10=Digital -InputCue11=[~BeginGroup~]Enable -InputSigType11=Digital -InputCue12=Item 1 Enable -InputSigType12=Digital -InputCue13=Item 2 Enable -InputSigType13=Digital -InputCue14=Item 3 Enable -InputSigType14=Digital -InputCue15=Item 4 Enable -InputSigType15=Digital -InputCue16=Item 5 Enable -InputSigType16=Digital -InputCue17=Item 6 Enable -InputSigType17=Digital -InputCue18=Item 7 Enable -InputSigType18=Digital -InputCue19=Item 8 Enable -InputSigType19=Digital -InputCue20=Item 9 Enable -InputSigType20=Digital -InputCue21=Item 10 Enable -InputSigType21=Digital -InputCue22=Item 11 Enable -InputSigType22=Digital -InputCue23=Item 12 Enable -InputSigType23=Digital -InputCue24=Item 13 Enable -InputSigType24=Digital -InputCue25=Item 14 Enable -InputSigType25=Digital -InputCue26=Item 15 Enable -InputSigType26=Digital -InputCue27=Item 16 Enable -InputSigType27=Digital -InputCue28=Item 17 Enable -InputSigType28=Digital -InputCue29=Item 18 Enable -InputSigType29=Digital -InputCue30=Item 19 Enable -InputSigType30=Digital -InputCue31=Item 20 Enable -InputSigType31=Digital -InputCue32=[~UNUSED2~] -InputSigType32=Digital|Analog|Serial|String -InputCue2012=[~EndGroup~]Enable -InputSigType2012=Digital -InputCue2013=[~BeginGroup~]Visible -InputSigType2013=Digital -InputCue2014=Item 1 Visible -InputSigType2014=Digital -InputCue2015=Item 2 Visible -InputSigType2015=Digital -InputCue2016=Item 3 Visible -InputSigType2016=Digital -InputCue2017=Item 4 Visible -InputSigType2017=Digital -InputCue2018=Item 5 Visible -InputSigType2018=Digital -InputCue2019=Item 6 Visible -InputSigType2019=Digital -InputCue2020=Item 7 Visible -InputSigType2020=Digital -InputCue2021=Item 8 Visible -InputSigType2021=Digital -InputCue2022=Item 9 Visible -InputSigType2022=Digital -InputCue2023=Item 10 Visible -InputSigType2023=Digital -InputCue2024=Item 11 Visible -InputSigType2024=Digital -InputCue2025=Item 12 Visible -InputSigType2025=Digital -InputCue2026=Item 13 Visible -InputSigType2026=Digital -InputCue2027=Item 14 Visible -InputSigType2027=Digital -InputCue2028=Item 15 Visible -InputSigType2028=Digital -InputCue2029=Item 16 Visible -InputSigType2029=Digital -InputCue2030=Item 17 Visible -InputSigType2030=Digital -InputCue2031=Item 18 Visible -InputSigType2031=Digital -InputCue2032=Item 19 Visible -InputSigType2032=Digital -InputCue2033=Item 20 Visible -InputSigType2033=Digital -InputCue2034=[~UNUSED2~] -InputSigType2034=Digital|Analog|Serial|String -InputCue4014=[~EndGroup~]Visible -InputSigType4014=Digital -InputCue4015=[~BeginGroup~]fb -InputSigType4015=Digital -InputCue4016=fb1 -InputSigType4016=Digital -InputCue4017=fb2 -InputSigType4017=Digital -InputCue4018=fb3 -InputSigType4018=Digital -InputCue4019=fb4 -InputSigType4019=Digital -InputCue4020=fb5 -InputSigType4020=Digital -InputCue4021=fb6 -InputSigType4021=Digital -InputCue4022=fb7 -InputSigType4022=Digital -InputCue4023=fb8 -InputSigType4023=Digital -InputCue4024=fb9 -InputSigType4024=Digital -InputCue4025=fb10 -InputSigType4025=Digital -InputCue4026=fb11 -InputSigType4026=Digital -InputCue4027=fb12 -InputSigType4027=Digital -InputCue4028=fb13 -InputSigType4028=Digital -InputCue4029=fb14 -InputSigType4029=Digital -InputCue4030=fb15 -InputSigType4030=Digital -InputCue4031=fb16 -InputSigType4031=Digital -InputCue4032=fb17 -InputSigType4032=Digital -InputCue4033=fb18 -InputSigType4033=Digital -InputCue4034=fb19 -InputSigType4034=Digital -InputCue4035=fb20 -InputSigType4035=Digital -InputCue4036=fb21 -InputSigType4036=Digital -InputCue4037=fb22 -InputSigType4037=Digital -InputCue4038=fb23 -InputSigType4038=Digital -InputCue4039=fb24 -InputSigType4039=Digital -InputCue4040=fb25 -InputSigType4040=Digital -InputCue4041=fb26 -InputSigType4041=Digital -InputCue4042=fb27 -InputSigType4042=Digital -InputCue4043=fb28 -InputSigType4043=Digital -InputCue4044=fb29 -InputSigType4044=Digital -InputCue4045=fb30 -InputSigType4045=Digital -InputCue4046=fb31 -InputSigType4046=Digital -InputCue4047=fb32 -InputSigType4047=Digital -InputCue4048=fb33 -InputSigType4048=Digital -InputCue4049=fb34 -InputSigType4049=Digital -InputCue4050=fb35 -InputSigType4050=Digital -InputCue4051=fb36 -InputSigType4051=Digital -InputCue4052=fb37 -InputSigType4052=Digital -InputCue4053=fb38 -InputSigType4053=Digital -InputCue4054=fb39 -InputSigType4054=Digital -InputCue4055=fb40 -InputSigType4055=Digital -InputCue4056=fb41 -InputSigType4056=Digital -InputCue4057=fb42 -InputSigType4057=Digital -InputCue4058=fb43 -InputSigType4058=Digital -InputCue4059=fb44 -InputSigType4059=Digital -InputCue4060=fb45 -InputSigType4060=Digital -InputCue4061=fb46 -InputSigType4061=Digital -InputCue4062=fb47 -InputSigType4062=Digital -InputCue4063=fb48 -InputSigType4063=Digital -InputCue4064=fb49 -InputSigType4064=Digital -InputCue4065=fb50 -InputSigType4065=Digital -InputCue4066=fb51 -InputSigType4066=Digital -InputCue4067=fb52 -InputSigType4067=Digital -InputCue4068=fb53 -InputSigType4068=Digital -InputCue4069=fb54 -InputSigType4069=Digital -InputCue4070=fb55 -InputSigType4070=Digital -InputCue4071=fb56 -InputSigType4071=Digital -InputCue4072=fb57 -InputSigType4072=Digital -InputCue4073=fb58 -InputSigType4073=Digital -InputCue4074=fb59 -InputSigType4074=Digital -InputCue4075=fb60 -InputSigType4075=Digital -InputCue4076=[~EndGroup~]fb -InputSigType4076=Digital -OutputCue1=Is Moving -OutputSigType1=Digital -OutputCue2=[~UNUSED2~] -OutputSigType2=Digital -OutputCue3=[~UNUSED2~] -OutputSigType3=Digital -OutputCue4=[~UNUSED2~] -OutputSigType4=Digital -OutputCue5=[~UNUSED2~] -OutputSigType5=Digital -OutputCue6=[~UNUSED2~] -OutputSigType6=Digital -OutputCue7=[~UNUSED2~] -OutputSigType7=Digital -OutputCue8=[~UNUSED2~] -OutputSigType8=Digital -OutputCue9=[~UNUSED2~] -OutputSigType9=Digital -OutputCue10=[~UNUSED2~] -OutputSigType10=Digital -OutputCue11=[~BeginGroup~]Enable -OutputSigType11=Digital -OutputCue12=[~UNUSED3~] -OutputSigType12=Digital -OutputCue13=[~UNUSED3~] -OutputSigType13=Digital -OutputCue14=[~UNUSED3~] -OutputSigType14=Digital -OutputCue15=[~UNUSED3~] -OutputSigType15=Digital -OutputCue16=[~UNUSED3~] -OutputSigType16=Digital -OutputCue17=[~UNUSED3~] -OutputSigType17=Digital -OutputCue18=[~UNUSED3~] -OutputSigType18=Digital -OutputCue19=[~UNUSED3~] -OutputSigType19=Digital -OutputCue20=[~UNUSED3~] -OutputSigType20=Digital -OutputCue21=[~UNUSED3~] -OutputSigType21=Digital -OutputCue22=[~UNUSED3~] -OutputSigType22=Digital -OutputCue23=[~UNUSED3~] -OutputSigType23=Digital -OutputCue24=[~UNUSED3~] -OutputSigType24=Digital -OutputCue25=[~UNUSED3~] -OutputSigType25=Digital -OutputCue26=[~UNUSED3~] -OutputSigType26=Digital -OutputCue27=[~UNUSED3~] -OutputSigType27=Digital -OutputCue28=[~UNUSED3~] -OutputSigType28=Digital -OutputCue29=[~UNUSED3~] -OutputSigType29=Digital -OutputCue30=[~UNUSED3~] -OutputSigType30=Digital -OutputCue31=[~UNUSED3~] -OutputSigType31=Digital -OutputCue32=[~UNUSED2~] -OutputSigType32=Digital|Analog|Serial|String -OutputCue2012=[~EndGroup~]Enable -OutputSigType2012=Digital -OutputCue2013=[~BeginGroup~]Visible -OutputSigType2013=Digital -OutputCue2014=[~UNUSED3~] -OutputSigType2014=Digital -OutputCue2015=[~UNUSED3~] -OutputSigType2015=Digital -OutputCue2016=[~UNUSED3~] -OutputSigType2016=Digital -OutputCue2017=[~UNUSED3~] -OutputSigType2017=Digital -OutputCue2018=[~UNUSED3~] -OutputSigType2018=Digital -OutputCue2019=[~UNUSED3~] -OutputSigType2019=Digital -OutputCue2020=[~UNUSED3~] -OutputSigType2020=Digital -OutputCue2021=[~UNUSED3~] -OutputSigType2021=Digital -OutputCue2022=[~UNUSED3~] -OutputSigType2022=Digital -OutputCue2023=[~UNUSED3~] -OutputSigType2023=Digital -OutputCue2024=[~UNUSED3~] -OutputSigType2024=Digital -OutputCue2025=[~UNUSED3~] -OutputSigType2025=Digital -OutputCue2026=[~UNUSED3~] -OutputSigType2026=Digital -OutputCue2027=[~UNUSED3~] -OutputSigType2027=Digital -OutputCue2028=[~UNUSED3~] -OutputSigType2028=Digital -OutputCue2029=[~UNUSED3~] -OutputSigType2029=Digital -OutputCue2030=[~UNUSED3~] -OutputSigType2030=Digital -OutputCue2031=[~UNUSED3~] -OutputSigType2031=Digital -OutputCue2032=[~UNUSED3~] -OutputSigType2032=Digital -OutputCue2033=[~UNUSED3~] -OutputSigType2033=Digital -OutputCue2034=[~UNUSED2~] -OutputSigType2034=Digital|Analog|Serial|String -OutputCue4014=[~EndGroup~]Visible -OutputSigType4014=Digital -OutputCue4015=[~BeginGroup~]Press -OutputSigType4015=Digital -OutputCue4016=press1 -OutputSigType4016=Digital -OutputCue4017=press2 -OutputSigType4017=Digital -OutputCue4018=press3 -OutputSigType4018=Digital -OutputCue4019=press4 -OutputSigType4019=Digital -OutputCue4020=press5 -OutputSigType4020=Digital -OutputCue4021=press6 -OutputSigType4021=Digital -OutputCue4022=press7 -OutputSigType4022=Digital -OutputCue4023=press8 -OutputSigType4023=Digital -OutputCue4024=press9 -OutputSigType4024=Digital -OutputCue4025=press10 -OutputSigType4025=Digital -OutputCue4026=press11 -OutputSigType4026=Digital -OutputCue4027=press12 -OutputSigType4027=Digital -OutputCue4028=press13 -OutputSigType4028=Digital -OutputCue4029=press14 -OutputSigType4029=Digital -OutputCue4030=press15 -OutputSigType4030=Digital -OutputCue4031=press16 -OutputSigType4031=Digital -OutputCue4032=press17 -OutputSigType4032=Digital -OutputCue4033=press18 -OutputSigType4033=Digital -OutputCue4034=press19 -OutputSigType4034=Digital -OutputCue4035=press20 -OutputSigType4035=Digital -OutputCue4036=press21 -OutputSigType4036=Digital -OutputCue4037=press22 -OutputSigType4037=Digital -OutputCue4038=press23 -OutputSigType4038=Digital -OutputCue4039=press24 -OutputSigType4039=Digital -OutputCue4040=press25 -OutputSigType4040=Digital -OutputCue4041=press26 -OutputSigType4041=Digital -OutputCue4042=press27 -OutputSigType4042=Digital -OutputCue4043=press28 -OutputSigType4043=Digital -OutputCue4044=press29 -OutputSigType4044=Digital -OutputCue4045=press30 -OutputSigType4045=Digital -OutputCue4046=press31 -OutputSigType4046=Digital -OutputCue4047=press32 -OutputSigType4047=Digital -OutputCue4048=press33 -OutputSigType4048=Digital -OutputCue4049=press34 -OutputSigType4049=Digital -OutputCue4050=press35 -OutputSigType4050=Digital -OutputCue4051=press36 -OutputSigType4051=Digital -OutputCue4052=press37 -OutputSigType4052=Digital -OutputCue4053=press38 -OutputSigType4053=Digital -OutputCue4054=press39 -OutputSigType4054=Digital -OutputCue4055=press40 -OutputSigType4055=Digital -OutputCue4056=press41 -OutputSigType4056=Digital -OutputCue4057=press42 -OutputSigType4057=Digital -OutputCue4058=press43 -OutputSigType4058=Digital -OutputCue4059=press44 -OutputSigType4059=Digital -OutputCue4060=press45 -OutputSigType4060=Digital -OutputCue4061=press46 -OutputSigType4061=Digital -OutputCue4062=press47 -OutputSigType4062=Digital -OutputCue4063=press48 -OutputSigType4063=Digital -OutputCue4064=press49 -OutputSigType4064=Digital -OutputCue4065=press50 -OutputSigType4065=Digital -OutputCue4066=press51 -OutputSigType4066=Digital -OutputCue4067=press52 -OutputSigType4067=Digital -OutputCue4068=press53 -OutputSigType4068=Digital -OutputCue4069=press54 -OutputSigType4069=Digital -OutputCue4070=press55 -OutputSigType4070=Digital -OutputCue4071=press56 -OutputSigType4071=Digital -OutputCue4072=press57 -OutputSigType4072=Digital -OutputCue4073=press58 -OutputSigType4073=Digital -OutputCue4074=press59 -OutputSigType4074=Digital -OutputCue4075=press60 -OutputSigType4075=Digital -OutputCue4076=[~EndGroup~]Press -OutputSigType4076=Digital -InputList2Cue1=[~UNUSED3~] -InputList2SigType1=Analog -InputList2Cue2=Scroll To Item -InputList2SigType2=Analog -InputList2Cue3=Set Number of Items -InputList2SigType3=Analog -InputList2Cue4=[~UNUSED2~] -InputList2SigType4=Analog -InputList2Cue5=[~UNUSED2~] -InputList2SigType5=Analog -InputList2Cue6=[~UNUSED2~] -InputList2SigType6=Analog -InputList2Cue7=[~UNUSED2~] -InputList2SigType7=Analog -InputList2Cue8=[~UNUSED2~] -InputList2SigType8=Analog -InputList2Cue9=[~UNUSED2~] -InputList2SigType9=Analog -InputList2Cue10=[~UNUSED2~] -InputList2SigType10=Analog -InputList2Cue11=[~BeginGroup~]an_fb -InputList2SigType11=Analog -InputList2Cue12=an_fb1 -InputList2SigType12=Analog -InputList2Cue13=an_fb2 -InputList2SigType13=Analog -InputList2Cue14=an_fb3 -InputList2SigType14=Analog -InputList2Cue15=an_fb4 -InputList2SigType15=Analog -InputList2Cue16=an_fb5 -InputList2SigType16=Analog -InputList2Cue17=an_fb6 -InputList2SigType17=Analog -InputList2Cue18=an_fb7 -InputList2SigType18=Analog -InputList2Cue19=an_fb8 -InputList2SigType19=Analog -InputList2Cue20=an_fb9 -InputList2SigType20=Analog -InputList2Cue21=an_fb10 -InputList2SigType21=Analog -InputList2Cue22=an_fb11 -InputList2SigType22=Analog -InputList2Cue23=an_fb12 -InputList2SigType23=Analog -InputList2Cue24=an_fb13 -InputList2SigType24=Analog -InputList2Cue25=an_fb14 -InputList2SigType25=Analog -InputList2Cue26=an_fb15 -InputList2SigType26=Analog -InputList2Cue27=an_fb16 -InputList2SigType27=Analog -InputList2Cue28=an_fb17 -InputList2SigType28=Analog -InputList2Cue29=an_fb18 -InputList2SigType29=Analog -InputList2Cue30=an_fb19 -InputList2SigType30=Analog -InputList2Cue31=an_fb20 -InputList2SigType31=Analog -InputList2Cue32=an_fb21 -InputList2SigType32=Analog -InputList2Cue33=an_fb22 -InputList2SigType33=Analog -InputList2Cue34=an_fb23 -InputList2SigType34=Analog -InputList2Cue35=an_fb24 -InputList2SigType35=Analog -InputList2Cue36=an_fb25 -InputList2SigType36=Analog -InputList2Cue37=an_fb26 -InputList2SigType37=Analog -InputList2Cue38=an_fb27 -InputList2SigType38=Analog -InputList2Cue39=an_fb28 -InputList2SigType39=Analog -InputList2Cue40=an_fb29 -InputList2SigType40=Analog -InputList2Cue41=an_fb30 -InputList2SigType41=Analog -InputList2Cue42=an_fb31 -InputList2SigType42=Analog -InputList2Cue43=an_fb32 -InputList2SigType43=Analog -InputList2Cue44=an_fb33 -InputList2SigType44=Analog -InputList2Cue45=an_fb34 -InputList2SigType45=Analog -InputList2Cue46=an_fb35 -InputList2SigType46=Analog -InputList2Cue47=an_fb36 -InputList2SigType47=Analog -InputList2Cue48=an_fb37 -InputList2SigType48=Analog -InputList2Cue49=an_fb38 -InputList2SigType49=Analog -InputList2Cue50=an_fb39 -InputList2SigType50=Analog -InputList2Cue51=an_fb40 -InputList2SigType51=Analog -InputList2Cue52=an_fb41 -InputList2SigType52=Analog -InputList2Cue53=an_fb42 -InputList2SigType53=Analog -InputList2Cue54=an_fb43 -InputList2SigType54=Analog -InputList2Cue55=an_fb44 -InputList2SigType55=Analog -InputList2Cue56=an_fb45 -InputList2SigType56=Analog -InputList2Cue57=an_fb46 -InputList2SigType57=Analog -InputList2Cue58=an_fb47 -InputList2SigType58=Analog -InputList2Cue59=an_fb48 -InputList2SigType59=Analog -InputList2Cue60=an_fb49 -InputList2SigType60=Analog -InputList2Cue61=an_fb50 -InputList2SigType61=Analog -InputList2Cue62=an_fb51 -InputList2SigType62=Analog -InputList2Cue63=an_fb52 -InputList2SigType63=Analog -InputList2Cue64=an_fb53 -InputList2SigType64=Analog -InputList2Cue65=an_fb54 -InputList2SigType65=Analog -InputList2Cue66=an_fb55 -InputList2SigType66=Analog -InputList2Cue67=an_fb56 -InputList2SigType67=Analog -InputList2Cue68=an_fb57 -InputList2SigType68=Analog -InputList2Cue69=an_fb58 -InputList2SigType69=Analog -InputList2Cue70=an_fb59 -InputList2SigType70=Analog -InputList2Cue71=an_fb60 -InputList2SigType71=Analog -InputList2Cue72=[~EndGroup~]an_fb -InputList2SigType72=Analog -OutputList2Cue1=Item Clicked -OutputList2SigType1=Analog -OutputList2Cue2=[~UNUSED3~] -OutputList2SigType2=Analog -OutputList2Cue3=[~UNUSED3~] -OutputList2SigType3=Analog -OutputList2Cue4=[~UNUSED2~] -OutputList2SigType4=Analog -OutputList2Cue5=[~UNUSED2~] -OutputList2SigType5=Analog -OutputList2Cue6=[~UNUSED2~] -OutputList2SigType6=Analog -OutputList2Cue7=[~UNUSED2~] -OutputList2SigType7=Analog -OutputList2Cue8=[~UNUSED2~] -OutputList2SigType8=Analog -OutputList2Cue9=[~UNUSED2~] -OutputList2SigType9=Analog -OutputList2Cue10=[~UNUSED2~] -OutputList2SigType10=Analog -OutputList2Cue11=[~BeginGroup~]an_act -OutputList2SigType11=Analog -OutputList2Cue12=an_act1 -OutputList2SigType12=Analog -OutputList2Cue13=an_act2 -OutputList2SigType13=Analog -OutputList2Cue14=an_act3 -OutputList2SigType14=Analog -OutputList2Cue15=an_act4 -OutputList2SigType15=Analog -OutputList2Cue16=an_act5 -OutputList2SigType16=Analog -OutputList2Cue17=an_act6 -OutputList2SigType17=Analog -OutputList2Cue18=an_act7 -OutputList2SigType18=Analog -OutputList2Cue19=an_act8 -OutputList2SigType19=Analog -OutputList2Cue20=an_act9 -OutputList2SigType20=Analog -OutputList2Cue21=an_act10 -OutputList2SigType21=Analog -OutputList2Cue22=an_act11 -OutputList2SigType22=Analog -OutputList2Cue23=an_act12 -OutputList2SigType23=Analog -OutputList2Cue24=an_act13 -OutputList2SigType24=Analog -OutputList2Cue25=an_act14 -OutputList2SigType25=Analog -OutputList2Cue26=an_act15 -OutputList2SigType26=Analog -OutputList2Cue27=an_act16 -OutputList2SigType27=Analog -OutputList2Cue28=an_act17 -OutputList2SigType28=Analog -OutputList2Cue29=an_act18 -OutputList2SigType29=Analog -OutputList2Cue30=an_act19 -OutputList2SigType30=Analog -OutputList2Cue31=an_act20 -OutputList2SigType31=Analog -OutputList2Cue32=an_act21 -OutputList2SigType32=Analog -OutputList2Cue33=an_act22 -OutputList2SigType33=Analog -OutputList2Cue34=an_act23 -OutputList2SigType34=Analog -OutputList2Cue35=an_act24 -OutputList2SigType35=Analog -OutputList2Cue36=an_act25 -OutputList2SigType36=Analog -OutputList2Cue37=an_act26 -OutputList2SigType37=Analog -OutputList2Cue38=an_act27 -OutputList2SigType38=Analog -OutputList2Cue39=an_act28 -OutputList2SigType39=Analog -OutputList2Cue40=an_act29 -OutputList2SigType40=Analog -OutputList2Cue41=an_act30 -OutputList2SigType41=Analog -OutputList2Cue42=an_act31 -OutputList2SigType42=Analog -OutputList2Cue43=an_act32 -OutputList2SigType43=Analog -OutputList2Cue44=an_act33 -OutputList2SigType44=Analog -OutputList2Cue45=an_act34 -OutputList2SigType45=Analog -OutputList2Cue46=an_act35 -OutputList2SigType46=Analog -OutputList2Cue47=an_act36 -OutputList2SigType47=Analog -OutputList2Cue48=an_act37 -OutputList2SigType48=Analog -OutputList2Cue49=an_act38 -OutputList2SigType49=Analog -OutputList2Cue50=an_act39 -OutputList2SigType50=Analog -OutputList2Cue51=an_act40 -OutputList2SigType51=Analog -OutputList2Cue52=an_act41 -OutputList2SigType52=Analog -OutputList2Cue53=an_act42 -OutputList2SigType53=Analog -OutputList2Cue54=an_act43 -OutputList2SigType54=Analog -OutputList2Cue55=an_act44 -OutputList2SigType55=Analog -OutputList2Cue56=an_act45 -OutputList2SigType56=Analog -OutputList2Cue57=an_act46 -OutputList2SigType57=Analog -OutputList2Cue58=an_act47 -OutputList2SigType58=Analog -OutputList2Cue59=an_act48 -OutputList2SigType59=Analog -OutputList2Cue60=an_act49 -OutputList2SigType60=Analog -OutputList2Cue61=an_act50 -OutputList2SigType61=Analog -OutputList2Cue62=an_act51 -OutputList2SigType62=Analog -OutputList2Cue63=an_act52 -OutputList2SigType63=Analog -OutputList2Cue64=an_act53 -OutputList2SigType64=Analog -OutputList2Cue65=an_act54 -OutputList2SigType65=Analog -OutputList2Cue66=an_act55 -OutputList2SigType66=Analog -OutputList2Cue67=an_act56 -OutputList2SigType67=Analog -OutputList2Cue68=an_act57 -OutputList2SigType68=Analog -OutputList2Cue69=an_act58 -OutputList2SigType69=Analog -OutputList2Cue70=an_act59 -OutputList2SigType70=Analog -OutputList2Cue71=an_act60 -OutputList2SigType71=Analog -OutputList2Cue72=[~EndGroup~]an_act -OutputList2SigType72=Analog -InputList3Cue1=[~UNUSED2~] -InputList3SigType1=Serial -InputList3Cue2=[~UNUSED2~] -InputList3SigType2=Serial -InputList3Cue3=[~UNUSED2~] -InputList3SigType3=Serial -InputList3Cue4=[~UNUSED2~] -InputList3SigType4=Serial -InputList3Cue5=[~UNUSED2~] -InputList3SigType5=Serial -InputList3Cue6=[~UNUSED2~] -InputList3SigType6=Serial -InputList3Cue7=[~UNUSED2~] -InputList3SigType7=Serial -InputList3Cue8=[~UNUSED2~] -InputList3SigType8=Serial -InputList3Cue9=[~UNUSED2~] -InputList3SigType9=Serial -InputList3Cue10=[~UNUSED2~] -InputList3SigType10=Serial -InputList3Cue11=[~BeginGroup~]text-o -InputList3SigType11=Serial -InputList3Cue12=text-o1 -InputList3SigType12=Serial -InputList3Cue13=text-o2 -InputList3SigType13=Serial -InputList3Cue14=text-o3 -InputList3SigType14=Serial -InputList3Cue15=text-o4 -InputList3SigType15=Serial -InputList3Cue16=text-o5 -InputList3SigType16=Serial -InputList3Cue17=text-o6 -InputList3SigType17=Serial -InputList3Cue18=text-o7 -InputList3SigType18=Serial -InputList3Cue19=text-o8 -InputList3SigType19=Serial -InputList3Cue20=text-o9 -InputList3SigType20=Serial -InputList3Cue21=text-o10 -InputList3SigType21=Serial -InputList3Cue22=text-o11 -InputList3SigType22=Serial -InputList3Cue23=text-o12 -InputList3SigType23=Serial -InputList3Cue24=text-o13 -InputList3SigType24=Serial -InputList3Cue25=text-o14 -InputList3SigType25=Serial -InputList3Cue26=text-o15 -InputList3SigType26=Serial -InputList3Cue27=text-o16 -InputList3SigType27=Serial -InputList3Cue28=text-o17 -InputList3SigType28=Serial -InputList3Cue29=text-o18 -InputList3SigType29=Serial -InputList3Cue30=text-o19 -InputList3SigType30=Serial -InputList3Cue31=text-o20 -InputList3SigType31=Serial -InputList3Cue32=text-o21 -InputList3SigType32=Serial -InputList3Cue33=text-o22 -InputList3SigType33=Serial -InputList3Cue34=text-o23 -InputList3SigType34=Serial -InputList3Cue35=text-o24 -InputList3SigType35=Serial -InputList3Cue36=text-o25 -InputList3SigType36=Serial -InputList3Cue37=text-o26 -InputList3SigType37=Serial -InputList3Cue38=text-o27 -InputList3SigType38=Serial -InputList3Cue39=text-o28 -InputList3SigType39=Serial -InputList3Cue40=text-o29 -InputList3SigType40=Serial -InputList3Cue41=text-o30 -InputList3SigType41=Serial -InputList3Cue42=text-o31 -InputList3SigType42=Serial -InputList3Cue43=text-o32 -InputList3SigType43=Serial -InputList3Cue44=text-o33 -InputList3SigType44=Serial -InputList3Cue45=text-o34 -InputList3SigType45=Serial -InputList3Cue46=text-o35 -InputList3SigType46=Serial -InputList3Cue47=text-o36 -InputList3SigType47=Serial -InputList3Cue48=text-o37 -InputList3SigType48=Serial -InputList3Cue49=text-o38 -InputList3SigType49=Serial -InputList3Cue50=text-o39 -InputList3SigType50=Serial -InputList3Cue51=text-o40 -InputList3SigType51=Serial -InputList3Cue52=text-o41 -InputList3SigType52=Serial -InputList3Cue53=text-o42 -InputList3SigType53=Serial -InputList3Cue54=text-o43 -InputList3SigType54=Serial -InputList3Cue55=text-o44 -InputList3SigType55=Serial -InputList3Cue56=text-o45 -InputList3SigType56=Serial -InputList3Cue57=text-o46 -InputList3SigType57=Serial -InputList3Cue58=text-o47 -InputList3SigType58=Serial -InputList3Cue59=text-o48 -InputList3SigType59=Serial -InputList3Cue60=text-o49 -InputList3SigType60=Serial -InputList3Cue61=text-o50 -InputList3SigType61=Serial -InputList3Cue62=text-o51 -InputList3SigType62=Serial -InputList3Cue63=text-o52 -InputList3SigType63=Serial -InputList3Cue64=text-o53 -InputList3SigType64=Serial -InputList3Cue65=text-o54 -InputList3SigType65=Serial -InputList3Cue66=text-o55 -InputList3SigType66=Serial -InputList3Cue67=text-o56 -InputList3SigType67=Serial -InputList3Cue68=text-o57 -InputList3SigType68=Serial -InputList3Cue69=text-o58 -InputList3SigType69=Serial -InputList3Cue70=text-o59 -InputList3SigType70=Serial -InputList3Cue71=text-o60 -InputList3SigType71=Serial -InputList3Cue72=[~EndGroup~]text-o -InputList3SigType72=Serial -OutputList3Cue1=[~UNUSED2~] -OutputList3SigType1=Serial -OutputList3Cue2=[~UNUSED2~] -OutputList3SigType2=Serial -OutputList3Cue3=[~UNUSED2~] -OutputList3SigType3=Serial -OutputList3Cue4=[~UNUSED2~] -OutputList3SigType4=Serial -OutputList3Cue5=[~UNUSED2~] -OutputList3SigType5=Serial -OutputList3Cue6=[~UNUSED2~] -OutputList3SigType6=Serial -OutputList3Cue7=[~UNUSED2~] -OutputList3SigType7=Serial -OutputList3Cue8=[~UNUSED2~] -OutputList3SigType8=Serial -OutputList3Cue9=[~UNUSED2~] -OutputList3SigType9=Serial -OutputList3Cue10=[~UNUSED2~] -OutputList3SigType10=Serial -OutputList3Cue11=[~BeginGroup~]text-i -OutputList3SigType11=Serial -OutputList3Cue12=text-i1 -OutputList3SigType12=Serial -OutputList3Cue13=text-i2 -OutputList3SigType13=Serial -OutputList3Cue14=text-i3 -OutputList3SigType14=Serial -OutputList3Cue15=text-i4 -OutputList3SigType15=Serial -OutputList3Cue16=text-i5 -OutputList3SigType16=Serial -OutputList3Cue17=text-i6 -OutputList3SigType17=Serial -OutputList3Cue18=text-i7 -OutputList3SigType18=Serial -OutputList3Cue19=text-i8 -OutputList3SigType19=Serial -OutputList3Cue20=text-i9 -OutputList3SigType20=Serial -OutputList3Cue21=text-i10 -OutputList3SigType21=Serial -OutputList3Cue22=text-i11 -OutputList3SigType22=Serial -OutputList3Cue23=text-i12 -OutputList3SigType23=Serial -OutputList3Cue24=text-i13 -OutputList3SigType24=Serial -OutputList3Cue25=text-i14 -OutputList3SigType25=Serial -OutputList3Cue26=text-i15 -OutputList3SigType26=Serial -OutputList3Cue27=text-i16 -OutputList3SigType27=Serial -OutputList3Cue28=text-i17 -OutputList3SigType28=Serial -OutputList3Cue29=text-i18 -OutputList3SigType29=Serial -OutputList3Cue30=text-i19 -OutputList3SigType30=Serial -OutputList3Cue31=text-i20 -OutputList3SigType31=Serial -OutputList3Cue32=text-i21 -OutputList3SigType32=Serial -OutputList3Cue33=text-i22 -OutputList3SigType33=Serial -OutputList3Cue34=text-i23 -OutputList3SigType34=Serial -OutputList3Cue35=text-i24 -OutputList3SigType35=Serial -OutputList3Cue36=text-i25 -OutputList3SigType36=Serial -OutputList3Cue37=text-i26 -OutputList3SigType37=Serial -OutputList3Cue38=text-i27 -OutputList3SigType38=Serial -OutputList3Cue39=text-i28 -OutputList3SigType39=Serial -OutputList3Cue40=text-i29 -OutputList3SigType40=Serial -OutputList3Cue41=text-i30 -OutputList3SigType41=Serial -OutputList3Cue42=text-i31 -OutputList3SigType42=Serial -OutputList3Cue43=text-i32 -OutputList3SigType43=Serial -OutputList3Cue44=text-i33 -OutputList3SigType44=Serial -OutputList3Cue45=text-i34 -OutputList3SigType45=Serial -OutputList3Cue46=text-i35 -OutputList3SigType46=Serial -OutputList3Cue47=text-i36 -OutputList3SigType47=Serial -OutputList3Cue48=text-i37 -OutputList3SigType48=Serial -OutputList3Cue49=text-i38 -OutputList3SigType49=Serial -OutputList3Cue50=text-i39 -OutputList3SigType50=Serial -OutputList3Cue51=text-i40 -OutputList3SigType51=Serial -OutputList3Cue52=text-i41 -OutputList3SigType52=Serial -OutputList3Cue53=text-i42 -OutputList3SigType53=Serial -OutputList3Cue54=text-i43 -OutputList3SigType54=Serial -OutputList3Cue55=text-i44 -OutputList3SigType55=Serial -OutputList3Cue56=text-i45 -OutputList3SigType56=Serial -OutputList3Cue57=text-i46 -OutputList3SigType57=Serial -OutputList3Cue58=text-i47 -OutputList3SigType58=Serial -OutputList3Cue59=text-i48 -OutputList3SigType59=Serial -OutputList3Cue60=text-i49 -OutputList3SigType60=Serial -OutputList3Cue61=text-i50 -OutputList3SigType61=Serial -OutputList3Cue62=text-i51 -OutputList3SigType62=Serial -OutputList3Cue63=text-i52 -OutputList3SigType63=Serial -OutputList3Cue64=text-i53 -OutputList3SigType64=Serial -OutputList3Cue65=text-i54 -OutputList3SigType65=Serial -OutputList3Cue66=text-i55 -OutputList3SigType66=Serial -OutputList3Cue67=text-i56 -OutputList3SigType67=Serial -OutputList3Cue68=text-i57 -OutputList3SigType68=Serial -OutputList3Cue69=text-i58 -OutputList3SigType69=Serial -OutputList3Cue70=text-i59 -OutputList3SigType70=Serial -OutputList3Cue71=text-i60 -OutputList3SigType71=Serial -OutputList3Cue72=[~EndGroup~]text-i -OutputList3SigType72=Serial -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=5 -CedH=5 -SmartObjId=3902d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=5 -Tp=1 -HD=TRUE -DV=3902d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=5 -Name=PepperDash Essentials iPad_[E.Technician Controls] Sys Status_Subpage Reference List Vertical_3.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials iPad_[E.Technician Controls] Display Controls_Subpage Reference List Vertical_4.ced -Hint=Subpage Reference List Vertical_4 (Smart Object ID=3904) -Code=6 -SGControlType=Subpage Reference List Vertical -SGControlName=Subpage Reference List Vertical_4 -GUID=AC10DF35-3FD4-4F62-9708-0A06AE7A5A14 -SmplCName=PepperDash Essentials iPad_[E.Technician Controls] Display Controls_Subpage Reference List Vertical_4.ced -SMWRev=4.02.20 -Expand=expand_random -HelpID=10125 -Render=8 -;Define the number of inputs, outputs and parameters -MinVariableInputs=4116 -MaxVariableInputs=4116 -MinVariableOutputs=4116 -MaxVariableOutputs=4116 -NumFixedParams=1 -MinVariableInputsList2=42 -MaxVariableInputsList2=42 -MinVariableOutputsList2=42 -MaxVariableOutputsList2=42 -MinVariableInputsList3=42 -MaxVariableInputsList3=42 -MinVariableOutputsList3=42 -MaxVariableOutputsList3=42 -InputSigType1=Digital -OutputSigType1=Digital -InputList2SigType1=Analog -OutputList2SigType1=Analog -InputList3SigType1=Serial -OutputList3SigType1=Serial - -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -InputCue2=[~UNUSED2~] -InputSigType2=Digital -InputCue3=[~UNUSED2~] -InputSigType3=Digital -InputCue4=[~UNUSED2~] -InputSigType4=Digital -InputCue5=[~UNUSED2~] -InputSigType5=Digital -InputCue6=[~UNUSED2~] -InputSigType6=Digital -InputCue7=[~UNUSED2~] -InputSigType7=Digital -InputCue8=[~UNUSED2~] -InputSigType8=Digital -InputCue9=[~UNUSED2~] -InputSigType9=Digital -InputCue10=[~UNUSED2~] -InputSigType10=Digital -InputCue11=[~BeginGroup~]Enable -InputSigType11=Digital -InputCue12=Item 1 Enable -InputSigType12=Digital -InputCue13=Item 2 Enable -InputSigType13=Digital -InputCue14=Item 3 Enable -InputSigType14=Digital -InputCue15=Item 4 Enable -InputSigType15=Digital -InputCue16=Item 5 Enable -InputSigType16=Digital -InputCue17=Item 6 Enable -InputSigType17=Digital -InputCue18=Item 7 Enable -InputSigType18=Digital -InputCue19=Item 8 Enable -InputSigType19=Digital -InputCue20=Item 9 Enable -InputSigType20=Digital -InputCue21=Item 10 Enable -InputSigType21=Digital -InputCue22=[~UNUSED2~] -InputSigType22=Digital|Analog|Serial|String -InputCue2012=[~EndGroup~]Enable -InputSigType2012=Digital -InputCue2013=[~BeginGroup~]Visible -InputSigType2013=Digital -InputCue2014=Item 1 Visible -InputSigType2014=Digital -InputCue2015=Item 2 Visible -InputSigType2015=Digital -InputCue2016=Item 3 Visible -InputSigType2016=Digital -InputCue2017=Item 4 Visible -InputSigType2017=Digital -InputCue2018=Item 5 Visible -InputSigType2018=Digital -InputCue2019=Item 6 Visible -InputSigType2019=Digital -InputCue2020=Item 7 Visible -InputSigType2020=Digital -InputCue2021=Item 8 Visible -InputSigType2021=Digital -InputCue2022=Item 9 Visible -InputSigType2022=Digital -InputCue2023=Item 10 Visible -InputSigType2023=Digital -InputCue2024=[~UNUSED2~] -InputSigType2024=Digital|Analog|Serial|String -InputCue4014=[~EndGroup~]Visible -InputSigType4014=Digital -InputCue4015=[~BeginGroup~]fb -InputSigType4015=Digital -InputCue4016=fb1 -InputSigType4016=Digital -InputCue4017=fb2 -InputSigType4017=Digital -InputCue4018=fb3 -InputSigType4018=Digital -InputCue4019=fb4 -InputSigType4019=Digital -InputCue4020=fb5 -InputSigType4020=Digital -InputCue4021=fb6 -InputSigType4021=Digital -InputCue4022=fb7 -InputSigType4022=Digital -InputCue4023=fb8 -InputSigType4023=Digital -InputCue4024=fb9 -InputSigType4024=Digital -InputCue4025=fb10 -InputSigType4025=Digital -InputCue4026=fb11 -InputSigType4026=Digital -InputCue4027=fb12 -InputSigType4027=Digital -InputCue4028=fb13 -InputSigType4028=Digital -InputCue4029=fb14 -InputSigType4029=Digital -InputCue4030=fb15 -InputSigType4030=Digital -InputCue4031=fb16 -InputSigType4031=Digital -InputCue4032=fb17 -InputSigType4032=Digital -InputCue4033=fb18 -InputSigType4033=Digital -InputCue4034=fb19 -InputSigType4034=Digital -InputCue4035=fb20 -InputSigType4035=Digital -InputCue4036=fb21 -InputSigType4036=Digital -InputCue4037=fb22 -InputSigType4037=Digital -InputCue4038=fb23 -InputSigType4038=Digital -InputCue4039=fb24 -InputSigType4039=Digital -InputCue4040=fb25 -InputSigType4040=Digital -InputCue4041=fb26 -InputSigType4041=Digital -InputCue4042=fb27 -InputSigType4042=Digital -InputCue4043=fb28 -InputSigType4043=Digital -InputCue4044=fb29 -InputSigType4044=Digital -InputCue4045=fb30 -InputSigType4045=Digital -InputCue4046=fb31 -InputSigType4046=Digital -InputCue4047=fb32 -InputSigType4047=Digital -InputCue4048=fb33 -InputSigType4048=Digital -InputCue4049=fb34 -InputSigType4049=Digital -InputCue4050=fb35 -InputSigType4050=Digital -InputCue4051=fb36 -InputSigType4051=Digital -InputCue4052=fb37 -InputSigType4052=Digital -InputCue4053=fb38 -InputSigType4053=Digital -InputCue4054=fb39 -InputSigType4054=Digital -InputCue4055=fb40 -InputSigType4055=Digital -InputCue4056=fb41 -InputSigType4056=Digital -InputCue4057=fb42 -InputSigType4057=Digital -InputCue4058=fb43 -InputSigType4058=Digital -InputCue4059=fb44 -InputSigType4059=Digital -InputCue4060=fb45 -InputSigType4060=Digital -InputCue4061=fb46 -InputSigType4061=Digital -InputCue4062=fb47 -InputSigType4062=Digital -InputCue4063=fb48 -InputSigType4063=Digital -InputCue4064=fb49 -InputSigType4064=Digital -InputCue4065=fb50 -InputSigType4065=Digital -InputCue4066=fb51 -InputSigType4066=Digital -InputCue4067=fb52 -InputSigType4067=Digital -InputCue4068=fb53 -InputSigType4068=Digital -InputCue4069=fb54 -InputSigType4069=Digital -InputCue4070=fb55 -InputSigType4070=Digital -InputCue4071=fb56 -InputSigType4071=Digital -InputCue4072=fb57 -InputSigType4072=Digital -InputCue4073=fb58 -InputSigType4073=Digital -InputCue4074=fb59 -InputSigType4074=Digital -InputCue4075=fb60 -InputSigType4075=Digital -InputCue4076=fb61 -InputSigType4076=Digital -InputCue4077=fb62 -InputSigType4077=Digital -InputCue4078=fb63 -InputSigType4078=Digital -InputCue4079=fb64 -InputSigType4079=Digital -InputCue4080=fb65 -InputSigType4080=Digital -InputCue4081=fb66 -InputSigType4081=Digital -InputCue4082=fb67 -InputSigType4082=Digital -InputCue4083=fb68 -InputSigType4083=Digital -InputCue4084=fb69 -InputSigType4084=Digital -InputCue4085=fb70 -InputSigType4085=Digital -InputCue4086=fb71 -InputSigType4086=Digital -InputCue4087=fb72 -InputSigType4087=Digital -InputCue4088=fb73 -InputSigType4088=Digital -InputCue4089=fb74 -InputSigType4089=Digital -InputCue4090=fb75 -InputSigType4090=Digital -InputCue4091=fb76 -InputSigType4091=Digital -InputCue4092=fb77 -InputSigType4092=Digital -InputCue4093=fb78 -InputSigType4093=Digital -InputCue4094=fb79 -InputSigType4094=Digital -InputCue4095=fb80 -InputSigType4095=Digital -InputCue4096=fb81 -InputSigType4096=Digital -InputCue4097=fb82 -InputSigType4097=Digital -InputCue4098=fb83 -InputSigType4098=Digital -InputCue4099=fb84 -InputSigType4099=Digital -InputCue4100=fb85 -InputSigType4100=Digital -InputCue4101=fb86 -InputSigType4101=Digital -InputCue4102=fb87 -InputSigType4102=Digital -InputCue4103=fb88 -InputSigType4103=Digital -InputCue4104=fb89 -InputSigType4104=Digital -InputCue4105=fb90 -InputSigType4105=Digital -InputCue4106=fb91 -InputSigType4106=Digital -InputCue4107=fb92 -InputSigType4107=Digital -InputCue4108=fb93 -InputSigType4108=Digital -InputCue4109=fb94 -InputSigType4109=Digital -InputCue4110=fb95 -InputSigType4110=Digital -InputCue4111=fb96 -InputSigType4111=Digital -InputCue4112=fb97 -InputSigType4112=Digital -InputCue4113=fb98 -InputSigType4113=Digital -InputCue4114=fb99 -InputSigType4114=Digital -InputCue4115=fb100 -InputSigType4115=Digital -InputCue4116=[~EndGroup~]fb -InputSigType4116=Digital -OutputCue1=Is Moving -OutputSigType1=Digital -OutputCue2=[~UNUSED2~] -OutputSigType2=Digital -OutputCue3=[~UNUSED2~] -OutputSigType3=Digital -OutputCue4=[~UNUSED2~] -OutputSigType4=Digital -OutputCue5=[~UNUSED2~] -OutputSigType5=Digital -OutputCue6=[~UNUSED2~] -OutputSigType6=Digital -OutputCue7=[~UNUSED2~] -OutputSigType7=Digital -OutputCue8=[~UNUSED2~] -OutputSigType8=Digital -OutputCue9=[~UNUSED2~] -OutputSigType9=Digital -OutputCue10=[~UNUSED2~] -OutputSigType10=Digital -OutputCue11=[~BeginGroup~]Enable -OutputSigType11=Digital -OutputCue12=[~UNUSED3~] -OutputSigType12=Digital -OutputCue13=[~UNUSED3~] -OutputSigType13=Digital -OutputCue14=[~UNUSED3~] -OutputSigType14=Digital -OutputCue15=[~UNUSED3~] -OutputSigType15=Digital -OutputCue16=[~UNUSED3~] -OutputSigType16=Digital -OutputCue17=[~UNUSED3~] -OutputSigType17=Digital -OutputCue18=[~UNUSED3~] -OutputSigType18=Digital -OutputCue19=[~UNUSED3~] -OutputSigType19=Digital -OutputCue20=[~UNUSED3~] -OutputSigType20=Digital -OutputCue21=[~UNUSED3~] -OutputSigType21=Digital -OutputCue22=[~UNUSED2~] -OutputSigType22=Digital|Analog|Serial|String -OutputCue2012=[~EndGroup~]Enable -OutputSigType2012=Digital -OutputCue2013=[~BeginGroup~]Visible -OutputSigType2013=Digital -OutputCue2014=[~UNUSED3~] -OutputSigType2014=Digital -OutputCue2015=[~UNUSED3~] -OutputSigType2015=Digital -OutputCue2016=[~UNUSED3~] -OutputSigType2016=Digital -OutputCue2017=[~UNUSED3~] -OutputSigType2017=Digital -OutputCue2018=[~UNUSED3~] -OutputSigType2018=Digital -OutputCue2019=[~UNUSED3~] -OutputSigType2019=Digital -OutputCue2020=[~UNUSED3~] -OutputSigType2020=Digital -OutputCue2021=[~UNUSED3~] -OutputSigType2021=Digital -OutputCue2022=[~UNUSED3~] -OutputSigType2022=Digital -OutputCue2023=[~UNUSED3~] -OutputSigType2023=Digital -OutputCue2024=[~UNUSED2~] -OutputSigType2024=Digital|Analog|Serial|String -OutputCue4014=[~EndGroup~]Visible -OutputSigType4014=Digital -OutputCue4015=[~BeginGroup~]Press -OutputSigType4015=Digital -OutputCue4016=press1 -OutputSigType4016=Digital -OutputCue4017=press2 -OutputSigType4017=Digital -OutputCue4018=press3 -OutputSigType4018=Digital -OutputCue4019=press4 -OutputSigType4019=Digital -OutputCue4020=press5 -OutputSigType4020=Digital -OutputCue4021=press6 -OutputSigType4021=Digital -OutputCue4022=press7 -OutputSigType4022=Digital -OutputCue4023=press8 -OutputSigType4023=Digital -OutputCue4024=press9 -OutputSigType4024=Digital -OutputCue4025=press10 -OutputSigType4025=Digital -OutputCue4026=press11 -OutputSigType4026=Digital -OutputCue4027=press12 -OutputSigType4027=Digital -OutputCue4028=press13 -OutputSigType4028=Digital -OutputCue4029=press14 -OutputSigType4029=Digital -OutputCue4030=press15 -OutputSigType4030=Digital -OutputCue4031=press16 -OutputSigType4031=Digital -OutputCue4032=press17 -OutputSigType4032=Digital -OutputCue4033=press18 -OutputSigType4033=Digital -OutputCue4034=press19 -OutputSigType4034=Digital -OutputCue4035=press20 -OutputSigType4035=Digital -OutputCue4036=press21 -OutputSigType4036=Digital -OutputCue4037=press22 -OutputSigType4037=Digital -OutputCue4038=press23 -OutputSigType4038=Digital -OutputCue4039=press24 -OutputSigType4039=Digital -OutputCue4040=press25 -OutputSigType4040=Digital -OutputCue4041=press26 -OutputSigType4041=Digital -OutputCue4042=press27 -OutputSigType4042=Digital -OutputCue4043=press28 -OutputSigType4043=Digital -OutputCue4044=press29 -OutputSigType4044=Digital -OutputCue4045=press30 -OutputSigType4045=Digital -OutputCue4046=press31 -OutputSigType4046=Digital -OutputCue4047=press32 -OutputSigType4047=Digital -OutputCue4048=press33 -OutputSigType4048=Digital -OutputCue4049=press34 -OutputSigType4049=Digital -OutputCue4050=press35 -OutputSigType4050=Digital -OutputCue4051=press36 -OutputSigType4051=Digital -OutputCue4052=press37 -OutputSigType4052=Digital -OutputCue4053=press38 -OutputSigType4053=Digital -OutputCue4054=press39 -OutputSigType4054=Digital -OutputCue4055=press40 -OutputSigType4055=Digital -OutputCue4056=press41 -OutputSigType4056=Digital -OutputCue4057=press42 -OutputSigType4057=Digital -OutputCue4058=press43 -OutputSigType4058=Digital -OutputCue4059=press44 -OutputSigType4059=Digital -OutputCue4060=press45 -OutputSigType4060=Digital -OutputCue4061=press46 -OutputSigType4061=Digital -OutputCue4062=press47 -OutputSigType4062=Digital -OutputCue4063=press48 -OutputSigType4063=Digital -OutputCue4064=press49 -OutputSigType4064=Digital -OutputCue4065=press50 -OutputSigType4065=Digital -OutputCue4066=press51 -OutputSigType4066=Digital -OutputCue4067=press52 -OutputSigType4067=Digital -OutputCue4068=press53 -OutputSigType4068=Digital -OutputCue4069=press54 -OutputSigType4069=Digital -OutputCue4070=press55 -OutputSigType4070=Digital -OutputCue4071=press56 -OutputSigType4071=Digital -OutputCue4072=press57 -OutputSigType4072=Digital -OutputCue4073=press58 -OutputSigType4073=Digital -OutputCue4074=press59 -OutputSigType4074=Digital -OutputCue4075=press60 -OutputSigType4075=Digital -OutputCue4076=press61 -OutputSigType4076=Digital -OutputCue4077=press62 -OutputSigType4077=Digital -OutputCue4078=press63 -OutputSigType4078=Digital -OutputCue4079=press64 -OutputSigType4079=Digital -OutputCue4080=press65 -OutputSigType4080=Digital -OutputCue4081=press66 -OutputSigType4081=Digital -OutputCue4082=press67 -OutputSigType4082=Digital -OutputCue4083=press68 -OutputSigType4083=Digital -OutputCue4084=press69 -OutputSigType4084=Digital -OutputCue4085=press70 -OutputSigType4085=Digital -OutputCue4086=press71 -OutputSigType4086=Digital -OutputCue4087=press72 -OutputSigType4087=Digital -OutputCue4088=press73 -OutputSigType4088=Digital -OutputCue4089=press74 -OutputSigType4089=Digital -OutputCue4090=press75 -OutputSigType4090=Digital -OutputCue4091=press76 -OutputSigType4091=Digital -OutputCue4092=press77 -OutputSigType4092=Digital -OutputCue4093=press78 -OutputSigType4093=Digital -OutputCue4094=press79 -OutputSigType4094=Digital -OutputCue4095=press80 -OutputSigType4095=Digital -OutputCue4096=press81 -OutputSigType4096=Digital -OutputCue4097=press82 -OutputSigType4097=Digital -OutputCue4098=press83 -OutputSigType4098=Digital -OutputCue4099=press84 -OutputSigType4099=Digital -OutputCue4100=press85 -OutputSigType4100=Digital -OutputCue4101=press86 -OutputSigType4101=Digital -OutputCue4102=press87 -OutputSigType4102=Digital -OutputCue4103=press88 -OutputSigType4103=Digital -OutputCue4104=press89 -OutputSigType4104=Digital -OutputCue4105=press90 -OutputSigType4105=Digital -OutputCue4106=press91 -OutputSigType4106=Digital -OutputCue4107=press92 -OutputSigType4107=Digital -OutputCue4108=press93 -OutputSigType4108=Digital -OutputCue4109=press94 -OutputSigType4109=Digital -OutputCue4110=press95 -OutputSigType4110=Digital -OutputCue4111=press96 -OutputSigType4111=Digital -OutputCue4112=press97 -OutputSigType4112=Digital -OutputCue4113=press98 -OutputSigType4113=Digital -OutputCue4114=press99 -OutputSigType4114=Digital -OutputCue4115=press100 -OutputSigType4115=Digital -OutputCue4116=[~EndGroup~]Press -OutputSigType4116=Digital -InputList2Cue1=[~UNUSED3~] -InputList2SigType1=Analog -InputList2Cue2=Scroll To Item -InputList2SigType2=Analog -InputList2Cue3=Set Number of Items -InputList2SigType3=Analog -InputList2Cue4=[~UNUSED2~] -InputList2SigType4=Analog -InputList2Cue5=[~UNUSED2~] -InputList2SigType5=Analog -InputList2Cue6=[~UNUSED2~] -InputList2SigType6=Analog -InputList2Cue7=[~UNUSED2~] -InputList2SigType7=Analog -InputList2Cue8=[~UNUSED2~] -InputList2SigType8=Analog -InputList2Cue9=[~UNUSED2~] -InputList2SigType9=Analog -InputList2Cue10=[~UNUSED2~] -InputList2SigType10=Analog -InputList2Cue11=[~BeginGroup~]an_fb -InputList2SigType11=Analog -InputList2Cue12=an_fb1 -InputList2SigType12=Analog -InputList2Cue13=an_fb2 -InputList2SigType13=Analog -InputList2Cue14=an_fb3 -InputList2SigType14=Analog -InputList2Cue15=an_fb4 -InputList2SigType15=Analog -InputList2Cue16=an_fb5 -InputList2SigType16=Analog -InputList2Cue17=an_fb6 -InputList2SigType17=Analog -InputList2Cue18=an_fb7 -InputList2SigType18=Analog -InputList2Cue19=an_fb8 -InputList2SigType19=Analog -InputList2Cue20=an_fb9 -InputList2SigType20=Analog -InputList2Cue21=an_fb10 -InputList2SigType21=Analog -InputList2Cue22=an_fb11 -InputList2SigType22=Analog -InputList2Cue23=an_fb12 -InputList2SigType23=Analog -InputList2Cue24=an_fb13 -InputList2SigType24=Analog -InputList2Cue25=an_fb14 -InputList2SigType25=Analog -InputList2Cue26=an_fb15 -InputList2SigType26=Analog -InputList2Cue27=an_fb16 -InputList2SigType27=Analog -InputList2Cue28=an_fb17 -InputList2SigType28=Analog -InputList2Cue29=an_fb18 -InputList2SigType29=Analog -InputList2Cue30=an_fb19 -InputList2SigType30=Analog -InputList2Cue31=an_fb20 -InputList2SigType31=Analog -InputList2Cue32=an_fb21 -InputList2SigType32=Analog -InputList2Cue33=an_fb22 -InputList2SigType33=Analog -InputList2Cue34=an_fb23 -InputList2SigType34=Analog -InputList2Cue35=an_fb24 -InputList2SigType35=Analog -InputList2Cue36=an_fb25 -InputList2SigType36=Analog -InputList2Cue37=an_fb26 -InputList2SigType37=Analog -InputList2Cue38=an_fb27 -InputList2SigType38=Analog -InputList2Cue39=an_fb28 -InputList2SigType39=Analog -InputList2Cue40=an_fb29 -InputList2SigType40=Analog -InputList2Cue41=an_fb30 -InputList2SigType41=Analog -InputList2Cue42=[~EndGroup~]an_fb -InputList2SigType42=Analog -OutputList2Cue1=Item Clicked -OutputList2SigType1=Analog -OutputList2Cue2=[~UNUSED3~] -OutputList2SigType2=Analog -OutputList2Cue3=[~UNUSED3~] -OutputList2SigType3=Analog -OutputList2Cue4=[~UNUSED2~] -OutputList2SigType4=Analog -OutputList2Cue5=[~UNUSED2~] -OutputList2SigType5=Analog -OutputList2Cue6=[~UNUSED2~] -OutputList2SigType6=Analog -OutputList2Cue7=[~UNUSED2~] -OutputList2SigType7=Analog -OutputList2Cue8=[~UNUSED2~] -OutputList2SigType8=Analog -OutputList2Cue9=[~UNUSED2~] -OutputList2SigType9=Analog -OutputList2Cue10=[~UNUSED2~] -OutputList2SigType10=Analog -OutputList2Cue11=[~BeginGroup~]an_act -OutputList2SigType11=Analog -OutputList2Cue12=an_act1 -OutputList2SigType12=Analog -OutputList2Cue13=an_act2 -OutputList2SigType13=Analog -OutputList2Cue14=an_act3 -OutputList2SigType14=Analog -OutputList2Cue15=an_act4 -OutputList2SigType15=Analog -OutputList2Cue16=an_act5 -OutputList2SigType16=Analog -OutputList2Cue17=an_act6 -OutputList2SigType17=Analog -OutputList2Cue18=an_act7 -OutputList2SigType18=Analog -OutputList2Cue19=an_act8 -OutputList2SigType19=Analog -OutputList2Cue20=an_act9 -OutputList2SigType20=Analog -OutputList2Cue21=an_act10 -OutputList2SigType21=Analog -OutputList2Cue22=an_act11 -OutputList2SigType22=Analog -OutputList2Cue23=an_act12 -OutputList2SigType23=Analog -OutputList2Cue24=an_act13 -OutputList2SigType24=Analog -OutputList2Cue25=an_act14 -OutputList2SigType25=Analog -OutputList2Cue26=an_act15 -OutputList2SigType26=Analog -OutputList2Cue27=an_act16 -OutputList2SigType27=Analog -OutputList2Cue28=an_act17 -OutputList2SigType28=Analog -OutputList2Cue29=an_act18 -OutputList2SigType29=Analog -OutputList2Cue30=an_act19 -OutputList2SigType30=Analog -OutputList2Cue31=an_act20 -OutputList2SigType31=Analog -OutputList2Cue32=an_act21 -OutputList2SigType32=Analog -OutputList2Cue33=an_act22 -OutputList2SigType33=Analog -OutputList2Cue34=an_act23 -OutputList2SigType34=Analog -OutputList2Cue35=an_act24 -OutputList2SigType35=Analog -OutputList2Cue36=an_act25 -OutputList2SigType36=Analog -OutputList2Cue37=an_act26 -OutputList2SigType37=Analog -OutputList2Cue38=an_act27 -OutputList2SigType38=Analog -OutputList2Cue39=an_act28 -OutputList2SigType39=Analog -OutputList2Cue40=an_act29 -OutputList2SigType40=Analog -OutputList2Cue41=an_act30 -OutputList2SigType41=Analog -OutputList2Cue42=[~EndGroup~]an_act -OutputList2SigType42=Analog -InputList3Cue1=[~UNUSED2~] -InputList3SigType1=Serial -InputList3Cue2=[~UNUSED2~] -InputList3SigType2=Serial -InputList3Cue3=[~UNUSED2~] -InputList3SigType3=Serial -InputList3Cue4=[~UNUSED2~] -InputList3SigType4=Serial -InputList3Cue5=[~UNUSED2~] -InputList3SigType5=Serial -InputList3Cue6=[~UNUSED2~] -InputList3SigType6=Serial -InputList3Cue7=[~UNUSED2~] -InputList3SigType7=Serial -InputList3Cue8=[~UNUSED2~] -InputList3SigType8=Serial -InputList3Cue9=[~UNUSED2~] -InputList3SigType9=Serial -InputList3Cue10=[~UNUSED2~] -InputList3SigType10=Serial -InputList3Cue11=[~BeginGroup~]text-o -InputList3SigType11=Serial -InputList3Cue12=text-o1 -InputList3SigType12=Serial -InputList3Cue13=text-o2 -InputList3SigType13=Serial -InputList3Cue14=text-o3 -InputList3SigType14=Serial -InputList3Cue15=text-o4 -InputList3SigType15=Serial -InputList3Cue16=text-o5 -InputList3SigType16=Serial -InputList3Cue17=text-o6 -InputList3SigType17=Serial -InputList3Cue18=text-o7 -InputList3SigType18=Serial -InputList3Cue19=text-o8 -InputList3SigType19=Serial -InputList3Cue20=text-o9 -InputList3SigType20=Serial -InputList3Cue21=text-o10 -InputList3SigType21=Serial -InputList3Cue22=text-o11 -InputList3SigType22=Serial -InputList3Cue23=text-o12 -InputList3SigType23=Serial -InputList3Cue24=text-o13 -InputList3SigType24=Serial -InputList3Cue25=text-o14 -InputList3SigType25=Serial -InputList3Cue26=text-o15 -InputList3SigType26=Serial -InputList3Cue27=text-o16 -InputList3SigType27=Serial -InputList3Cue28=text-o17 -InputList3SigType28=Serial -InputList3Cue29=text-o18 -InputList3SigType29=Serial -InputList3Cue30=text-o19 -InputList3SigType30=Serial -InputList3Cue31=text-o20 -InputList3SigType31=Serial -InputList3Cue32=text-o21 -InputList3SigType32=Serial -InputList3Cue33=text-o22 -InputList3SigType33=Serial -InputList3Cue34=text-o23 -InputList3SigType34=Serial -InputList3Cue35=text-o24 -InputList3SigType35=Serial -InputList3Cue36=text-o25 -InputList3SigType36=Serial -InputList3Cue37=text-o26 -InputList3SigType37=Serial -InputList3Cue38=text-o27 -InputList3SigType38=Serial -InputList3Cue39=text-o28 -InputList3SigType39=Serial -InputList3Cue40=text-o29 -InputList3SigType40=Serial -InputList3Cue41=text-o30 -InputList3SigType41=Serial -InputList3Cue42=[~EndGroup~]text-o -InputList3SigType42=Serial -OutputList3Cue1=[~UNUSED2~] -OutputList3SigType1=Serial -OutputList3Cue2=[~UNUSED2~] -OutputList3SigType2=Serial -OutputList3Cue3=[~UNUSED2~] -OutputList3SigType3=Serial -OutputList3Cue4=[~UNUSED2~] -OutputList3SigType4=Serial -OutputList3Cue5=[~UNUSED2~] -OutputList3SigType5=Serial -OutputList3Cue6=[~UNUSED2~] -OutputList3SigType6=Serial -OutputList3Cue7=[~UNUSED2~] -OutputList3SigType7=Serial -OutputList3Cue8=[~UNUSED2~] -OutputList3SigType8=Serial -OutputList3Cue9=[~UNUSED2~] -OutputList3SigType9=Serial -OutputList3Cue10=[~UNUSED2~] -OutputList3SigType10=Serial -OutputList3Cue11=[~BeginGroup~]text-i -OutputList3SigType11=Serial -OutputList3Cue12=text-i1 -OutputList3SigType12=Serial -OutputList3Cue13=text-i2 -OutputList3SigType13=Serial -OutputList3Cue14=text-i3 -OutputList3SigType14=Serial -OutputList3Cue15=text-i4 -OutputList3SigType15=Serial -OutputList3Cue16=text-i5 -OutputList3SigType16=Serial -OutputList3Cue17=text-i6 -OutputList3SigType17=Serial -OutputList3Cue18=text-i7 -OutputList3SigType18=Serial -OutputList3Cue19=text-i8 -OutputList3SigType19=Serial -OutputList3Cue20=text-i9 -OutputList3SigType20=Serial -OutputList3Cue21=text-i10 -OutputList3SigType21=Serial -OutputList3Cue22=text-i11 -OutputList3SigType22=Serial -OutputList3Cue23=text-i12 -OutputList3SigType23=Serial -OutputList3Cue24=text-i13 -OutputList3SigType24=Serial -OutputList3Cue25=text-i14 -OutputList3SigType25=Serial -OutputList3Cue26=text-i15 -OutputList3SigType26=Serial -OutputList3Cue27=text-i16 -OutputList3SigType27=Serial -OutputList3Cue28=text-i17 -OutputList3SigType28=Serial -OutputList3Cue29=text-i18 -OutputList3SigType29=Serial -OutputList3Cue30=text-i19 -OutputList3SigType30=Serial -OutputList3Cue31=text-i20 -OutputList3SigType31=Serial -OutputList3Cue32=text-i21 -OutputList3SigType32=Serial -OutputList3Cue33=text-i22 -OutputList3SigType33=Serial -OutputList3Cue34=text-i23 -OutputList3SigType34=Serial -OutputList3Cue35=text-i24 -OutputList3SigType35=Serial -OutputList3Cue36=text-i25 -OutputList3SigType36=Serial -OutputList3Cue37=text-i26 -OutputList3SigType37=Serial -OutputList3Cue38=text-i27 -OutputList3SigType38=Serial -OutputList3Cue39=text-i28 -OutputList3SigType39=Serial -OutputList3Cue40=text-i29 -OutputList3SigType40=Serial -OutputList3Cue41=text-i30 -OutputList3SigType41=Serial -OutputList3Cue42=[~EndGroup~]text-i -OutputList3SigType42=Serial -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=6 -CedH=6 -SmartObjId=3904d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=6 -Tp=1 -HD=TRUE -DV=3904d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=6 -Name=PepperDash Essentials iPad_[E.Technician Controls] Display Controls_Subpage Reference List Vertical_4.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials iPad_[B.AV] Staging_Subpage Reference List Horizontal_3.ced -Hint=Subpage Reference List Horizontal_3 (Smart Object ID=3200) -Code=7 -SGControlType=Subpage Reference List Horizontal -SGControlName=Subpage Reference List Horizontal_3 -GUID=D638D437-6722-43E1-B435-EF13DCE5ECF0 -SmplCName=PepperDash Essentials iPad_[B.AV] Staging_Subpage Reference List Horizontal_3.ced -SMWRev=4.02.20 -Expand=expand_random -HelpID=10124 -Render=8 -;Define the number of inputs, outputs and parameters -MinVariableInputs=4076 -MaxVariableInputs=4076 -MinVariableOutputs=4076 -MaxVariableOutputs=4076 -NumFixedParams=1 -MinVariableInputsList2=72 -MaxVariableInputsList2=72 -MinVariableOutputsList2=72 -MaxVariableOutputsList2=72 -MinVariableInputsList3=72 -MaxVariableInputsList3=72 -MinVariableOutputsList3=72 -MaxVariableOutputsList3=72 -InputSigType1=Digital -OutputSigType1=Digital -InputList2SigType1=Analog -OutputList2SigType1=Analog -InputList3SigType1=Serial -OutputList3SigType1=Serial - -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -InputCue2=[~UNUSED2~] -InputSigType2=Digital -InputCue3=[~UNUSED2~] -InputSigType3=Digital -InputCue4=[~UNUSED2~] -InputSigType4=Digital -InputCue5=[~UNUSED2~] -InputSigType5=Digital -InputCue6=[~UNUSED2~] -InputSigType6=Digital -InputCue7=[~UNUSED2~] -InputSigType7=Digital -InputCue8=[~UNUSED2~] -InputSigType8=Digital -InputCue9=[~UNUSED2~] -InputSigType9=Digital -InputCue10=[~UNUSED2~] -InputSigType10=Digital -InputCue11=[~BeginGroup~]Enable -InputSigType11=Digital -InputCue12=Item 1 Enable -InputSigType12=Digital -InputCue13=Item 2 Enable -InputSigType13=Digital -InputCue14=Item 3 Enable -InputSigType14=Digital -InputCue15=Item 4 Enable -InputSigType15=Digital -InputCue16=Item 5 Enable -InputSigType16=Digital -InputCue17=Item 6 Enable -InputSigType17=Digital -InputCue18=Item 7 Enable -InputSigType18=Digital -InputCue19=Item 8 Enable -InputSigType19=Digital -InputCue20=Item 9 Enable -InputSigType20=Digital -InputCue21=Item 10 Enable -InputSigType21=Digital -InputCue22=Item 11 Enable -InputSigType22=Digital -InputCue23=Item 12 Enable -InputSigType23=Digital -InputCue24=Item 13 Enable -InputSigType24=Digital -InputCue25=Item 14 Enable -InputSigType25=Digital -InputCue26=Item 15 Enable -InputSigType26=Digital -InputCue27=Item 16 Enable -InputSigType27=Digital -InputCue28=Item 17 Enable -InputSigType28=Digital -InputCue29=Item 18 Enable -InputSigType29=Digital -InputCue30=Item 19 Enable -InputSigType30=Digital -InputCue31=Item 20 Enable -InputSigType31=Digital -InputCue32=[~UNUSED2~] -InputSigType32=Digital|Analog|Serial|String -InputCue2012=[~EndGroup~]Enable -InputSigType2012=Digital -InputCue2013=[~BeginGroup~]Visible -InputSigType2013=Digital -InputCue2014=Item 1 Visible -InputSigType2014=Digital -InputCue2015=Item 2 Visible -InputSigType2015=Digital -InputCue2016=Item 3 Visible -InputSigType2016=Digital -InputCue2017=Item 4 Visible -InputSigType2017=Digital -InputCue2018=Item 5 Visible -InputSigType2018=Digital -InputCue2019=Item 6 Visible -InputSigType2019=Digital -InputCue2020=Item 7 Visible -InputSigType2020=Digital -InputCue2021=Item 8 Visible -InputSigType2021=Digital -InputCue2022=Item 9 Visible -InputSigType2022=Digital -InputCue2023=Item 10 Visible -InputSigType2023=Digital -InputCue2024=Item 11 Visible -InputSigType2024=Digital -InputCue2025=Item 12 Visible -InputSigType2025=Digital -InputCue2026=Item 13 Visible -InputSigType2026=Digital -InputCue2027=Item 14 Visible -InputSigType2027=Digital -InputCue2028=Item 15 Visible -InputSigType2028=Digital -InputCue2029=Item 16 Visible -InputSigType2029=Digital -InputCue2030=Item 17 Visible -InputSigType2030=Digital -InputCue2031=Item 18 Visible -InputSigType2031=Digital -InputCue2032=Item 19 Visible -InputSigType2032=Digital -InputCue2033=Item 20 Visible -InputSigType2033=Digital -InputCue2034=[~UNUSED2~] -InputSigType2034=Digital|Analog|Serial|String -InputCue4014=[~EndGroup~]Visible -InputSigType4014=Digital -InputCue4015=[~BeginGroup~]fb -InputSigType4015=Digital -InputCue4016=fb1 -InputSigType4016=Digital -InputCue4017=fb2 -InputSigType4017=Digital -InputCue4018=fb3 -InputSigType4018=Digital -InputCue4019=fb4 -InputSigType4019=Digital -InputCue4020=fb5 -InputSigType4020=Digital -InputCue4021=fb6 -InputSigType4021=Digital -InputCue4022=fb7 -InputSigType4022=Digital -InputCue4023=fb8 -InputSigType4023=Digital -InputCue4024=fb9 -InputSigType4024=Digital -InputCue4025=fb10 -InputSigType4025=Digital -InputCue4026=fb11 -InputSigType4026=Digital -InputCue4027=fb12 -InputSigType4027=Digital -InputCue4028=fb13 -InputSigType4028=Digital -InputCue4029=fb14 -InputSigType4029=Digital -InputCue4030=fb15 -InputSigType4030=Digital -InputCue4031=fb16 -InputSigType4031=Digital -InputCue4032=fb17 -InputSigType4032=Digital -InputCue4033=fb18 -InputSigType4033=Digital -InputCue4034=fb19 -InputSigType4034=Digital -InputCue4035=fb20 -InputSigType4035=Digital -InputCue4036=fb21 -InputSigType4036=Digital -InputCue4037=fb22 -InputSigType4037=Digital -InputCue4038=fb23 -InputSigType4038=Digital -InputCue4039=fb24 -InputSigType4039=Digital -InputCue4040=fb25 -InputSigType4040=Digital -InputCue4041=fb26 -InputSigType4041=Digital -InputCue4042=fb27 -InputSigType4042=Digital -InputCue4043=fb28 -InputSigType4043=Digital -InputCue4044=fb29 -InputSigType4044=Digital -InputCue4045=fb30 -InputSigType4045=Digital -InputCue4046=fb31 -InputSigType4046=Digital -InputCue4047=fb32 -InputSigType4047=Digital -InputCue4048=fb33 -InputSigType4048=Digital -InputCue4049=fb34 -InputSigType4049=Digital -InputCue4050=fb35 -InputSigType4050=Digital -InputCue4051=fb36 -InputSigType4051=Digital -InputCue4052=fb37 -InputSigType4052=Digital -InputCue4053=fb38 -InputSigType4053=Digital -InputCue4054=fb39 -InputSigType4054=Digital -InputCue4055=fb40 -InputSigType4055=Digital -InputCue4056=fb41 -InputSigType4056=Digital -InputCue4057=fb42 -InputSigType4057=Digital -InputCue4058=fb43 -InputSigType4058=Digital -InputCue4059=fb44 -InputSigType4059=Digital -InputCue4060=fb45 -InputSigType4060=Digital -InputCue4061=fb46 -InputSigType4061=Digital -InputCue4062=fb47 -InputSigType4062=Digital -InputCue4063=fb48 -InputSigType4063=Digital -InputCue4064=fb49 -InputSigType4064=Digital -InputCue4065=fb50 -InputSigType4065=Digital -InputCue4066=fb51 -InputSigType4066=Digital -InputCue4067=fb52 -InputSigType4067=Digital -InputCue4068=fb53 -InputSigType4068=Digital -InputCue4069=fb54 -InputSigType4069=Digital -InputCue4070=fb55 -InputSigType4070=Digital -InputCue4071=fb56 -InputSigType4071=Digital -InputCue4072=fb57 -InputSigType4072=Digital -InputCue4073=fb58 -InputSigType4073=Digital -InputCue4074=fb59 -InputSigType4074=Digital -InputCue4075=fb60 -InputSigType4075=Digital -InputCue4076=[~EndGroup~]fb -InputSigType4076=Digital -OutputCue1=Is Moving -OutputSigType1=Digital -OutputCue2=[~UNUSED2~] -OutputSigType2=Digital -OutputCue3=[~UNUSED2~] -OutputSigType3=Digital -OutputCue4=[~UNUSED2~] -OutputSigType4=Digital -OutputCue5=[~UNUSED2~] -OutputSigType5=Digital -OutputCue6=[~UNUSED2~] -OutputSigType6=Digital -OutputCue7=[~UNUSED2~] -OutputSigType7=Digital -OutputCue8=[~UNUSED2~] -OutputSigType8=Digital -OutputCue9=[~UNUSED2~] -OutputSigType9=Digital -OutputCue10=[~UNUSED2~] -OutputSigType10=Digital -OutputCue11=[~BeginGroup~]Enable -OutputSigType11=Digital -OutputCue12=[~UNUSED3~] -OutputSigType12=Digital -OutputCue13=[~UNUSED3~] -OutputSigType13=Digital -OutputCue14=[~UNUSED3~] -OutputSigType14=Digital -OutputCue15=[~UNUSED3~] -OutputSigType15=Digital -OutputCue16=[~UNUSED3~] -OutputSigType16=Digital -OutputCue17=[~UNUSED3~] -OutputSigType17=Digital -OutputCue18=[~UNUSED3~] -OutputSigType18=Digital -OutputCue19=[~UNUSED3~] -OutputSigType19=Digital -OutputCue20=[~UNUSED3~] -OutputSigType20=Digital -OutputCue21=[~UNUSED3~] -OutputSigType21=Digital -OutputCue22=[~UNUSED3~] -OutputSigType22=Digital -OutputCue23=[~UNUSED3~] -OutputSigType23=Digital -OutputCue24=[~UNUSED3~] -OutputSigType24=Digital -OutputCue25=[~UNUSED3~] -OutputSigType25=Digital -OutputCue26=[~UNUSED3~] -OutputSigType26=Digital -OutputCue27=[~UNUSED3~] -OutputSigType27=Digital -OutputCue28=[~UNUSED3~] -OutputSigType28=Digital -OutputCue29=[~UNUSED3~] -OutputSigType29=Digital -OutputCue30=[~UNUSED3~] -OutputSigType30=Digital -OutputCue31=[~UNUSED3~] -OutputSigType31=Digital -OutputCue32=[~UNUSED2~] -OutputSigType32=Digital|Analog|Serial|String -OutputCue2012=[~EndGroup~]Enable -OutputSigType2012=Digital -OutputCue2013=[~BeginGroup~]Visible -OutputSigType2013=Digital -OutputCue2014=[~UNUSED3~] -OutputSigType2014=Digital -OutputCue2015=[~UNUSED3~] -OutputSigType2015=Digital -OutputCue2016=[~UNUSED3~] -OutputSigType2016=Digital -OutputCue2017=[~UNUSED3~] -OutputSigType2017=Digital -OutputCue2018=[~UNUSED3~] -OutputSigType2018=Digital -OutputCue2019=[~UNUSED3~] -OutputSigType2019=Digital -OutputCue2020=[~UNUSED3~] -OutputSigType2020=Digital -OutputCue2021=[~UNUSED3~] -OutputSigType2021=Digital -OutputCue2022=[~UNUSED3~] -OutputSigType2022=Digital -OutputCue2023=[~UNUSED3~] -OutputSigType2023=Digital -OutputCue2024=[~UNUSED3~] -OutputSigType2024=Digital -OutputCue2025=[~UNUSED3~] -OutputSigType2025=Digital -OutputCue2026=[~UNUSED3~] -OutputSigType2026=Digital -OutputCue2027=[~UNUSED3~] -OutputSigType2027=Digital -OutputCue2028=[~UNUSED3~] -OutputSigType2028=Digital -OutputCue2029=[~UNUSED3~] -OutputSigType2029=Digital -OutputCue2030=[~UNUSED3~] -OutputSigType2030=Digital -OutputCue2031=[~UNUSED3~] -OutputSigType2031=Digital -OutputCue2032=[~UNUSED3~] -OutputSigType2032=Digital -OutputCue2033=[~UNUSED3~] -OutputSigType2033=Digital -OutputCue2034=[~UNUSED2~] -OutputSigType2034=Digital|Analog|Serial|String -OutputCue4014=[~EndGroup~]Visible -OutputSigType4014=Digital -OutputCue4015=[~BeginGroup~]Press -OutputSigType4015=Digital -OutputCue4016=press1 -OutputSigType4016=Digital -OutputCue4017=press2 -OutputSigType4017=Digital -OutputCue4018=press3 -OutputSigType4018=Digital -OutputCue4019=press4 -OutputSigType4019=Digital -OutputCue4020=press5 -OutputSigType4020=Digital -OutputCue4021=press6 -OutputSigType4021=Digital -OutputCue4022=press7 -OutputSigType4022=Digital -OutputCue4023=press8 -OutputSigType4023=Digital -OutputCue4024=press9 -OutputSigType4024=Digital -OutputCue4025=press10 -OutputSigType4025=Digital -OutputCue4026=press11 -OutputSigType4026=Digital -OutputCue4027=press12 -OutputSigType4027=Digital -OutputCue4028=press13 -OutputSigType4028=Digital -OutputCue4029=press14 -OutputSigType4029=Digital -OutputCue4030=press15 -OutputSigType4030=Digital -OutputCue4031=press16 -OutputSigType4031=Digital -OutputCue4032=press17 -OutputSigType4032=Digital -OutputCue4033=press18 -OutputSigType4033=Digital -OutputCue4034=press19 -OutputSigType4034=Digital -OutputCue4035=press20 -OutputSigType4035=Digital -OutputCue4036=press21 -OutputSigType4036=Digital -OutputCue4037=press22 -OutputSigType4037=Digital -OutputCue4038=press23 -OutputSigType4038=Digital -OutputCue4039=press24 -OutputSigType4039=Digital -OutputCue4040=press25 -OutputSigType4040=Digital -OutputCue4041=press26 -OutputSigType4041=Digital -OutputCue4042=press27 -OutputSigType4042=Digital -OutputCue4043=press28 -OutputSigType4043=Digital -OutputCue4044=press29 -OutputSigType4044=Digital -OutputCue4045=press30 -OutputSigType4045=Digital -OutputCue4046=press31 -OutputSigType4046=Digital -OutputCue4047=press32 -OutputSigType4047=Digital -OutputCue4048=press33 -OutputSigType4048=Digital -OutputCue4049=press34 -OutputSigType4049=Digital -OutputCue4050=press35 -OutputSigType4050=Digital -OutputCue4051=press36 -OutputSigType4051=Digital -OutputCue4052=press37 -OutputSigType4052=Digital -OutputCue4053=press38 -OutputSigType4053=Digital -OutputCue4054=press39 -OutputSigType4054=Digital -OutputCue4055=press40 -OutputSigType4055=Digital -OutputCue4056=press41 -OutputSigType4056=Digital -OutputCue4057=press42 -OutputSigType4057=Digital -OutputCue4058=press43 -OutputSigType4058=Digital -OutputCue4059=press44 -OutputSigType4059=Digital -OutputCue4060=press45 -OutputSigType4060=Digital -OutputCue4061=press46 -OutputSigType4061=Digital -OutputCue4062=press47 -OutputSigType4062=Digital -OutputCue4063=press48 -OutputSigType4063=Digital -OutputCue4064=press49 -OutputSigType4064=Digital -OutputCue4065=press50 -OutputSigType4065=Digital -OutputCue4066=press51 -OutputSigType4066=Digital -OutputCue4067=press52 -OutputSigType4067=Digital -OutputCue4068=press53 -OutputSigType4068=Digital -OutputCue4069=press54 -OutputSigType4069=Digital -OutputCue4070=press55 -OutputSigType4070=Digital -OutputCue4071=press56 -OutputSigType4071=Digital -OutputCue4072=press57 -OutputSigType4072=Digital -OutputCue4073=press58 -OutputSigType4073=Digital -OutputCue4074=press59 -OutputSigType4074=Digital -OutputCue4075=press60 -OutputSigType4075=Digital -OutputCue4076=[~EndGroup~]Press -OutputSigType4076=Digital -InputList2Cue1=[~UNUSED3~] -InputList2SigType1=Analog -InputList2Cue2=Scroll To Item -InputList2SigType2=Analog -InputList2Cue3=Set Number of Items -InputList2SigType3=Analog -InputList2Cue4=[~UNUSED2~] -InputList2SigType4=Analog -InputList2Cue5=[~UNUSED2~] -InputList2SigType5=Analog -InputList2Cue6=[~UNUSED2~] -InputList2SigType6=Analog -InputList2Cue7=[~UNUSED2~] -InputList2SigType7=Analog -InputList2Cue8=[~UNUSED2~] -InputList2SigType8=Analog -InputList2Cue9=[~UNUSED2~] -InputList2SigType9=Analog -InputList2Cue10=[~UNUSED2~] -InputList2SigType10=Analog -InputList2Cue11=[~BeginGroup~]an_fb -InputList2SigType11=Analog -InputList2Cue12=an_fb1 -InputList2SigType12=Analog -InputList2Cue13=an_fb2 -InputList2SigType13=Analog -InputList2Cue14=an_fb3 -InputList2SigType14=Analog -InputList2Cue15=an_fb4 -InputList2SigType15=Analog -InputList2Cue16=an_fb5 -InputList2SigType16=Analog -InputList2Cue17=an_fb6 -InputList2SigType17=Analog -InputList2Cue18=an_fb7 -InputList2SigType18=Analog -InputList2Cue19=an_fb8 -InputList2SigType19=Analog -InputList2Cue20=an_fb9 -InputList2SigType20=Analog -InputList2Cue21=an_fb10 -InputList2SigType21=Analog -InputList2Cue22=an_fb11 -InputList2SigType22=Analog -InputList2Cue23=an_fb12 -InputList2SigType23=Analog -InputList2Cue24=an_fb13 -InputList2SigType24=Analog -InputList2Cue25=an_fb14 -InputList2SigType25=Analog -InputList2Cue26=an_fb15 -InputList2SigType26=Analog -InputList2Cue27=an_fb16 -InputList2SigType27=Analog -InputList2Cue28=an_fb17 -InputList2SigType28=Analog -InputList2Cue29=an_fb18 -InputList2SigType29=Analog -InputList2Cue30=an_fb19 -InputList2SigType30=Analog -InputList2Cue31=an_fb20 -InputList2SigType31=Analog -InputList2Cue32=an_fb21 -InputList2SigType32=Analog -InputList2Cue33=an_fb22 -InputList2SigType33=Analog -InputList2Cue34=an_fb23 -InputList2SigType34=Analog -InputList2Cue35=an_fb24 -InputList2SigType35=Analog -InputList2Cue36=an_fb25 -InputList2SigType36=Analog -InputList2Cue37=an_fb26 -InputList2SigType37=Analog -InputList2Cue38=an_fb27 -InputList2SigType38=Analog -InputList2Cue39=an_fb28 -InputList2SigType39=Analog -InputList2Cue40=an_fb29 -InputList2SigType40=Analog -InputList2Cue41=an_fb30 -InputList2SigType41=Analog -InputList2Cue42=an_fb31 -InputList2SigType42=Analog -InputList2Cue43=an_fb32 -InputList2SigType43=Analog -InputList2Cue44=an_fb33 -InputList2SigType44=Analog -InputList2Cue45=an_fb34 -InputList2SigType45=Analog -InputList2Cue46=an_fb35 -InputList2SigType46=Analog -InputList2Cue47=an_fb36 -InputList2SigType47=Analog -InputList2Cue48=an_fb37 -InputList2SigType48=Analog -InputList2Cue49=an_fb38 -InputList2SigType49=Analog -InputList2Cue50=an_fb39 -InputList2SigType50=Analog -InputList2Cue51=an_fb40 -InputList2SigType51=Analog -InputList2Cue52=an_fb41 -InputList2SigType52=Analog -InputList2Cue53=an_fb42 -InputList2SigType53=Analog -InputList2Cue54=an_fb43 -InputList2SigType54=Analog -InputList2Cue55=an_fb44 -InputList2SigType55=Analog -InputList2Cue56=an_fb45 -InputList2SigType56=Analog -InputList2Cue57=an_fb46 -InputList2SigType57=Analog -InputList2Cue58=an_fb47 -InputList2SigType58=Analog -InputList2Cue59=an_fb48 -InputList2SigType59=Analog -InputList2Cue60=an_fb49 -InputList2SigType60=Analog -InputList2Cue61=an_fb50 -InputList2SigType61=Analog -InputList2Cue62=an_fb51 -InputList2SigType62=Analog -InputList2Cue63=an_fb52 -InputList2SigType63=Analog -InputList2Cue64=an_fb53 -InputList2SigType64=Analog -InputList2Cue65=an_fb54 -InputList2SigType65=Analog -InputList2Cue66=an_fb55 -InputList2SigType66=Analog -InputList2Cue67=an_fb56 -InputList2SigType67=Analog -InputList2Cue68=an_fb57 -InputList2SigType68=Analog -InputList2Cue69=an_fb58 -InputList2SigType69=Analog -InputList2Cue70=an_fb59 -InputList2SigType70=Analog -InputList2Cue71=an_fb60 -InputList2SigType71=Analog -InputList2Cue72=[~EndGroup~]an_fb -InputList2SigType72=Analog -OutputList2Cue1=Item Clicked -OutputList2SigType1=Analog -OutputList2Cue2=[~UNUSED3~] -OutputList2SigType2=Analog -OutputList2Cue3=[~UNUSED3~] -OutputList2SigType3=Analog -OutputList2Cue4=[~UNUSED2~] -OutputList2SigType4=Analog -OutputList2Cue5=[~UNUSED2~] -OutputList2SigType5=Analog -OutputList2Cue6=[~UNUSED2~] -OutputList2SigType6=Analog -OutputList2Cue7=[~UNUSED2~] -OutputList2SigType7=Analog -OutputList2Cue8=[~UNUSED2~] -OutputList2SigType8=Analog -OutputList2Cue9=[~UNUSED2~] -OutputList2SigType9=Analog -OutputList2Cue10=[~UNUSED2~] -OutputList2SigType10=Analog -OutputList2Cue11=[~BeginGroup~]an_act -OutputList2SigType11=Analog -OutputList2Cue12=an_act1 -OutputList2SigType12=Analog -OutputList2Cue13=an_act2 -OutputList2SigType13=Analog -OutputList2Cue14=an_act3 -OutputList2SigType14=Analog -OutputList2Cue15=an_act4 -OutputList2SigType15=Analog -OutputList2Cue16=an_act5 -OutputList2SigType16=Analog -OutputList2Cue17=an_act6 -OutputList2SigType17=Analog -OutputList2Cue18=an_act7 -OutputList2SigType18=Analog -OutputList2Cue19=an_act8 -OutputList2SigType19=Analog -OutputList2Cue20=an_act9 -OutputList2SigType20=Analog -OutputList2Cue21=an_act10 -OutputList2SigType21=Analog -OutputList2Cue22=an_act11 -OutputList2SigType22=Analog -OutputList2Cue23=an_act12 -OutputList2SigType23=Analog -OutputList2Cue24=an_act13 -OutputList2SigType24=Analog -OutputList2Cue25=an_act14 -OutputList2SigType25=Analog -OutputList2Cue26=an_act15 -OutputList2SigType26=Analog -OutputList2Cue27=an_act16 -OutputList2SigType27=Analog -OutputList2Cue28=an_act17 -OutputList2SigType28=Analog -OutputList2Cue29=an_act18 -OutputList2SigType29=Analog -OutputList2Cue30=an_act19 -OutputList2SigType30=Analog -OutputList2Cue31=an_act20 -OutputList2SigType31=Analog -OutputList2Cue32=an_act21 -OutputList2SigType32=Analog -OutputList2Cue33=an_act22 -OutputList2SigType33=Analog -OutputList2Cue34=an_act23 -OutputList2SigType34=Analog -OutputList2Cue35=an_act24 -OutputList2SigType35=Analog -OutputList2Cue36=an_act25 -OutputList2SigType36=Analog -OutputList2Cue37=an_act26 -OutputList2SigType37=Analog -OutputList2Cue38=an_act27 -OutputList2SigType38=Analog -OutputList2Cue39=an_act28 -OutputList2SigType39=Analog -OutputList2Cue40=an_act29 -OutputList2SigType40=Analog -OutputList2Cue41=an_act30 -OutputList2SigType41=Analog -OutputList2Cue42=an_act31 -OutputList2SigType42=Analog -OutputList2Cue43=an_act32 -OutputList2SigType43=Analog -OutputList2Cue44=an_act33 -OutputList2SigType44=Analog -OutputList2Cue45=an_act34 -OutputList2SigType45=Analog -OutputList2Cue46=an_act35 -OutputList2SigType46=Analog -OutputList2Cue47=an_act36 -OutputList2SigType47=Analog -OutputList2Cue48=an_act37 -OutputList2SigType48=Analog -OutputList2Cue49=an_act38 -OutputList2SigType49=Analog -OutputList2Cue50=an_act39 -OutputList2SigType50=Analog -OutputList2Cue51=an_act40 -OutputList2SigType51=Analog -OutputList2Cue52=an_act41 -OutputList2SigType52=Analog -OutputList2Cue53=an_act42 -OutputList2SigType53=Analog -OutputList2Cue54=an_act43 -OutputList2SigType54=Analog -OutputList2Cue55=an_act44 -OutputList2SigType55=Analog -OutputList2Cue56=an_act45 -OutputList2SigType56=Analog -OutputList2Cue57=an_act46 -OutputList2SigType57=Analog -OutputList2Cue58=an_act47 -OutputList2SigType58=Analog -OutputList2Cue59=an_act48 -OutputList2SigType59=Analog -OutputList2Cue60=an_act49 -OutputList2SigType60=Analog -OutputList2Cue61=an_act50 -OutputList2SigType61=Analog -OutputList2Cue62=an_act51 -OutputList2SigType62=Analog -OutputList2Cue63=an_act52 -OutputList2SigType63=Analog -OutputList2Cue64=an_act53 -OutputList2SigType64=Analog -OutputList2Cue65=an_act54 -OutputList2SigType65=Analog -OutputList2Cue66=an_act55 -OutputList2SigType66=Analog -OutputList2Cue67=an_act56 -OutputList2SigType67=Analog -OutputList2Cue68=an_act57 -OutputList2SigType68=Analog -OutputList2Cue69=an_act58 -OutputList2SigType69=Analog -OutputList2Cue70=an_act59 -OutputList2SigType70=Analog -OutputList2Cue71=an_act60 -OutputList2SigType71=Analog -OutputList2Cue72=[~EndGroup~]an_act -OutputList2SigType72=Analog -InputList3Cue1=[~UNUSED2~] -InputList3SigType1=Serial -InputList3Cue2=[~UNUSED2~] -InputList3SigType2=Serial -InputList3Cue3=[~UNUSED2~] -InputList3SigType3=Serial -InputList3Cue4=[~UNUSED2~] -InputList3SigType4=Serial -InputList3Cue5=[~UNUSED2~] -InputList3SigType5=Serial -InputList3Cue6=[~UNUSED2~] -InputList3SigType6=Serial -InputList3Cue7=[~UNUSED2~] -InputList3SigType7=Serial -InputList3Cue8=[~UNUSED2~] -InputList3SigType8=Serial -InputList3Cue9=[~UNUSED2~] -InputList3SigType9=Serial -InputList3Cue10=[~UNUSED2~] -InputList3SigType10=Serial -InputList3Cue11=[~BeginGroup~]text-o -InputList3SigType11=Serial -InputList3Cue12=text-o1 -InputList3SigType12=Serial -InputList3Cue13=text-o2 -InputList3SigType13=Serial -InputList3Cue14=text-o3 -InputList3SigType14=Serial -InputList3Cue15=text-o4 -InputList3SigType15=Serial -InputList3Cue16=text-o5 -InputList3SigType16=Serial -InputList3Cue17=text-o6 -InputList3SigType17=Serial -InputList3Cue18=text-o7 -InputList3SigType18=Serial -InputList3Cue19=text-o8 -InputList3SigType19=Serial -InputList3Cue20=text-o9 -InputList3SigType20=Serial -InputList3Cue21=text-o10 -InputList3SigType21=Serial -InputList3Cue22=text-o11 -InputList3SigType22=Serial -InputList3Cue23=text-o12 -InputList3SigType23=Serial -InputList3Cue24=text-o13 -InputList3SigType24=Serial -InputList3Cue25=text-o14 -InputList3SigType25=Serial -InputList3Cue26=text-o15 -InputList3SigType26=Serial -InputList3Cue27=text-o16 -InputList3SigType27=Serial -InputList3Cue28=text-o17 -InputList3SigType28=Serial -InputList3Cue29=text-o18 -InputList3SigType29=Serial -InputList3Cue30=text-o19 -InputList3SigType30=Serial -InputList3Cue31=text-o20 -InputList3SigType31=Serial -InputList3Cue32=text-o21 -InputList3SigType32=Serial -InputList3Cue33=text-o22 -InputList3SigType33=Serial -InputList3Cue34=text-o23 -InputList3SigType34=Serial -InputList3Cue35=text-o24 -InputList3SigType35=Serial -InputList3Cue36=text-o25 -InputList3SigType36=Serial -InputList3Cue37=text-o26 -InputList3SigType37=Serial -InputList3Cue38=text-o27 -InputList3SigType38=Serial -InputList3Cue39=text-o28 -InputList3SigType39=Serial -InputList3Cue40=text-o29 -InputList3SigType40=Serial -InputList3Cue41=text-o30 -InputList3SigType41=Serial -InputList3Cue42=text-o31 -InputList3SigType42=Serial -InputList3Cue43=text-o32 -InputList3SigType43=Serial -InputList3Cue44=text-o33 -InputList3SigType44=Serial -InputList3Cue45=text-o34 -InputList3SigType45=Serial -InputList3Cue46=text-o35 -InputList3SigType46=Serial -InputList3Cue47=text-o36 -InputList3SigType47=Serial -InputList3Cue48=text-o37 -InputList3SigType48=Serial -InputList3Cue49=text-o38 -InputList3SigType49=Serial -InputList3Cue50=text-o39 -InputList3SigType50=Serial -InputList3Cue51=text-o40 -InputList3SigType51=Serial -InputList3Cue52=text-o41 -InputList3SigType52=Serial -InputList3Cue53=text-o42 -InputList3SigType53=Serial -InputList3Cue54=text-o43 -InputList3SigType54=Serial -InputList3Cue55=text-o44 -InputList3SigType55=Serial -InputList3Cue56=text-o45 -InputList3SigType56=Serial -InputList3Cue57=text-o46 -InputList3SigType57=Serial -InputList3Cue58=text-o47 -InputList3SigType58=Serial -InputList3Cue59=text-o48 -InputList3SigType59=Serial -InputList3Cue60=text-o49 -InputList3SigType60=Serial -InputList3Cue61=text-o50 -InputList3SigType61=Serial -InputList3Cue62=text-o51 -InputList3SigType62=Serial -InputList3Cue63=text-o52 -InputList3SigType63=Serial -InputList3Cue64=text-o53 -InputList3SigType64=Serial -InputList3Cue65=text-o54 -InputList3SigType65=Serial -InputList3Cue66=text-o55 -InputList3SigType66=Serial -InputList3Cue67=text-o56 -InputList3SigType67=Serial -InputList3Cue68=text-o57 -InputList3SigType68=Serial -InputList3Cue69=text-o58 -InputList3SigType69=Serial -InputList3Cue70=text-o59 -InputList3SigType70=Serial -InputList3Cue71=text-o60 -InputList3SigType71=Serial -InputList3Cue72=[~EndGroup~]text-o -InputList3SigType72=Serial -OutputList3Cue1=[~UNUSED2~] -OutputList3SigType1=Serial -OutputList3Cue2=[~UNUSED2~] -OutputList3SigType2=Serial -OutputList3Cue3=[~UNUSED2~] -OutputList3SigType3=Serial -OutputList3Cue4=[~UNUSED2~] -OutputList3SigType4=Serial -OutputList3Cue5=[~UNUSED2~] -OutputList3SigType5=Serial -OutputList3Cue6=[~UNUSED2~] -OutputList3SigType6=Serial -OutputList3Cue7=[~UNUSED2~] -OutputList3SigType7=Serial -OutputList3Cue8=[~UNUSED2~] -OutputList3SigType8=Serial -OutputList3Cue9=[~UNUSED2~] -OutputList3SigType9=Serial -OutputList3Cue10=[~UNUSED2~] -OutputList3SigType10=Serial -OutputList3Cue11=[~BeginGroup~]text-i -OutputList3SigType11=Serial -OutputList3Cue12=text-i1 -OutputList3SigType12=Serial -OutputList3Cue13=text-i2 -OutputList3SigType13=Serial -OutputList3Cue14=text-i3 -OutputList3SigType14=Serial -OutputList3Cue15=text-i4 -OutputList3SigType15=Serial -OutputList3Cue16=text-i5 -OutputList3SigType16=Serial -OutputList3Cue17=text-i6 -OutputList3SigType17=Serial -OutputList3Cue18=text-i7 -OutputList3SigType18=Serial -OutputList3Cue19=text-i8 -OutputList3SigType19=Serial -OutputList3Cue20=text-i9 -OutputList3SigType20=Serial -OutputList3Cue21=text-i10 -OutputList3SigType21=Serial -OutputList3Cue22=text-i11 -OutputList3SigType22=Serial -OutputList3Cue23=text-i12 -OutputList3SigType23=Serial -OutputList3Cue24=text-i13 -OutputList3SigType24=Serial -OutputList3Cue25=text-i14 -OutputList3SigType25=Serial -OutputList3Cue26=text-i15 -OutputList3SigType26=Serial -OutputList3Cue27=text-i16 -OutputList3SigType27=Serial -OutputList3Cue28=text-i17 -OutputList3SigType28=Serial -OutputList3Cue29=text-i18 -OutputList3SigType29=Serial -OutputList3Cue30=text-i19 -OutputList3SigType30=Serial -OutputList3Cue31=text-i20 -OutputList3SigType31=Serial -OutputList3Cue32=text-i21 -OutputList3SigType32=Serial -OutputList3Cue33=text-i22 -OutputList3SigType33=Serial -OutputList3Cue34=text-i23 -OutputList3SigType34=Serial -OutputList3Cue35=text-i24 -OutputList3SigType35=Serial -OutputList3Cue36=text-i25 -OutputList3SigType36=Serial -OutputList3Cue37=text-i26 -OutputList3SigType37=Serial -OutputList3Cue38=text-i27 -OutputList3SigType38=Serial -OutputList3Cue39=text-i28 -OutputList3SigType39=Serial -OutputList3Cue40=text-i29 -OutputList3SigType40=Serial -OutputList3Cue41=text-i30 -OutputList3SigType41=Serial -OutputList3Cue42=text-i31 -OutputList3SigType42=Serial -OutputList3Cue43=text-i32 -OutputList3SigType43=Serial -OutputList3Cue44=text-i33 -OutputList3SigType44=Serial -OutputList3Cue45=text-i34 -OutputList3SigType45=Serial -OutputList3Cue46=text-i35 -OutputList3SigType46=Serial -OutputList3Cue47=text-i36 -OutputList3SigType47=Serial -OutputList3Cue48=text-i37 -OutputList3SigType48=Serial -OutputList3Cue49=text-i38 -OutputList3SigType49=Serial -OutputList3Cue50=text-i39 -OutputList3SigType50=Serial -OutputList3Cue51=text-i40 -OutputList3SigType51=Serial -OutputList3Cue52=text-i41 -OutputList3SigType52=Serial -OutputList3Cue53=text-i42 -OutputList3SigType53=Serial -OutputList3Cue54=text-i43 -OutputList3SigType54=Serial -OutputList3Cue55=text-i44 -OutputList3SigType55=Serial -OutputList3Cue56=text-i45 -OutputList3SigType56=Serial -OutputList3Cue57=text-i46 -OutputList3SigType57=Serial -OutputList3Cue58=text-i47 -OutputList3SigType58=Serial -OutputList3Cue59=text-i48 -OutputList3SigType59=Serial -OutputList3Cue60=text-i49 -OutputList3SigType60=Serial -OutputList3Cue61=text-i50 -OutputList3SigType61=Serial -OutputList3Cue62=text-i51 -OutputList3SigType62=Serial -OutputList3Cue63=text-i52 -OutputList3SigType63=Serial -OutputList3Cue64=text-i53 -OutputList3SigType64=Serial -OutputList3Cue65=text-i54 -OutputList3SigType65=Serial -OutputList3Cue66=text-i55 -OutputList3SigType66=Serial -OutputList3Cue67=text-i56 -OutputList3SigType67=Serial -OutputList3Cue68=text-i57 -OutputList3SigType68=Serial -OutputList3Cue69=text-i58 -OutputList3SigType69=Serial -OutputList3Cue70=text-i59 -OutputList3SigType70=Serial -OutputList3Cue71=text-i60 -OutputList3SigType71=Serial -OutputList3Cue72=[~EndGroup~]text-i -OutputList3SigType72=Serial -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=7 -CedH=7 -SmartObjId=3200d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=7 -Tp=1 -HD=TRUE -DV=3200d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=7 -Name=PepperDash Essentials iPad_[B.AV] Staging_Subpage Reference List Horizontal_3.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials iPad_[B.AV] Source Ctrl-CATV-Basic_Channel Preset List Basic.ced -Hint=Channel Preset List Basic (Smart Object ID=1806) -Code=8 -SGControlType=Subpage Reference List Vertical -SGControlName=Channel Preset List Basic -GUID=46C43CE4-6BB9-4B76-A13E-B4279202F998 -SmplCName=PepperDash Essentials iPad_[B.AV] Source Ctrl-CATV-Basic_Channel Preset List Basic.ced -SMWRev=4.02.20 -Expand=expand_random -HelpID=10125 -Render=8 -;Define the number of inputs, outputs and parameters -MinVariableInputs=4106 -MaxVariableInputs=4106 -MinVariableOutputs=4106 -MaxVariableOutputs=4106 -NumFixedParams=1 -MinVariableInputsList2=3 -MaxVariableInputsList2=3 -MinVariableOutputsList2=3 -MaxVariableOutputsList2=3 -MinVariableInputsList3=132 -MaxVariableInputsList3=132 -MinVariableOutputsList3=132 -MaxVariableOutputsList3=132 -InputSigType1=Digital -OutputSigType1=Digital -InputList2SigType1=Analog -OutputList2SigType1=Analog -InputList3SigType1=Serial -OutputList3SigType1=Serial - -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -InputCue2=[~UNUSED2~] -InputSigType2=Digital -InputCue3=[~UNUSED2~] -InputSigType3=Digital -InputCue4=[~UNUSED2~] -InputSigType4=Digital -InputCue5=[~UNUSED2~] -InputSigType5=Digital -InputCue6=[~UNUSED2~] -InputSigType6=Digital -InputCue7=[~UNUSED2~] -InputSigType7=Digital -InputCue8=[~UNUSED2~] -InputSigType8=Digital -InputCue9=[~UNUSED2~] -InputSigType9=Digital -InputCue10=[~UNUSED2~] -InputSigType10=Digital -InputCue11=[~BeginGroup~]Enable -InputSigType11=Digital -InputCue12=Item 1 Enable -InputSigType12=Digital -InputCue13=Item 2 Enable -InputSigType13=Digital -InputCue14=Item 3 Enable -InputSigType14=Digital -InputCue15=Item 4 Enable -InputSigType15=Digital -InputCue16=Item 5 Enable -InputSigType16=Digital -InputCue17=Item 6 Enable -InputSigType17=Digital -InputCue18=Item 7 Enable -InputSigType18=Digital -InputCue19=Item 8 Enable -InputSigType19=Digital -InputCue20=Item 9 Enable -InputSigType20=Digital -InputCue21=Item 10 Enable -InputSigType21=Digital -InputCue22=Item 11 Enable -InputSigType22=Digital -InputCue23=Item 12 Enable -InputSigType23=Digital -InputCue24=Item 13 Enable -InputSigType24=Digital -InputCue25=Item 14 Enable -InputSigType25=Digital -InputCue26=Item 15 Enable -InputSigType26=Digital -InputCue27=Item 16 Enable -InputSigType27=Digital -InputCue28=Item 17 Enable -InputSigType28=Digital -InputCue29=Item 18 Enable -InputSigType29=Digital -InputCue30=Item 19 Enable -InputSigType30=Digital -InputCue31=Item 20 Enable -InputSigType31=Digital -InputCue32=Item 21 Enable -InputSigType32=Digital -InputCue33=Item 22 Enable -InputSigType33=Digital -InputCue34=Item 23 Enable -InputSigType34=Digital -InputCue35=Item 24 Enable -InputSigType35=Digital -InputCue36=Item 25 Enable -InputSigType36=Digital -InputCue37=Item 26 Enable -InputSigType37=Digital -InputCue38=Item 27 Enable -InputSigType38=Digital -InputCue39=Item 28 Enable -InputSigType39=Digital -InputCue40=Item 29 Enable -InputSigType40=Digital -InputCue41=Item 30 Enable -InputSigType41=Digital -InputCue42=[~UNUSED2~] -InputSigType42=Digital|Analog|Serial|String -InputCue2012=[~EndGroup~]Enable -InputSigType2012=Digital -InputCue2013=[~BeginGroup~]Visible -InputSigType2013=Digital -InputCue2014=Item 1 Visible -InputSigType2014=Digital -InputCue2015=Item 2 Visible -InputSigType2015=Digital -InputCue2016=Item 3 Visible -InputSigType2016=Digital -InputCue2017=Item 4 Visible -InputSigType2017=Digital -InputCue2018=Item 5 Visible -InputSigType2018=Digital -InputCue2019=Item 6 Visible -InputSigType2019=Digital -InputCue2020=Item 7 Visible -InputSigType2020=Digital -InputCue2021=Item 8 Visible -InputSigType2021=Digital -InputCue2022=Item 9 Visible -InputSigType2022=Digital -InputCue2023=Item 10 Visible -InputSigType2023=Digital -InputCue2024=Item 11 Visible -InputSigType2024=Digital -InputCue2025=Item 12 Visible -InputSigType2025=Digital -InputCue2026=Item 13 Visible -InputSigType2026=Digital -InputCue2027=Item 14 Visible -InputSigType2027=Digital -InputCue2028=Item 15 Visible -InputSigType2028=Digital -InputCue2029=Item 16 Visible -InputSigType2029=Digital -InputCue2030=Item 17 Visible -InputSigType2030=Digital -InputCue2031=Item 18 Visible -InputSigType2031=Digital -InputCue2032=Item 19 Visible -InputSigType2032=Digital -InputCue2033=Item 20 Visible -InputSigType2033=Digital -InputCue2034=Item 21 Visible -InputSigType2034=Digital -InputCue2035=Item 22 Visible -InputSigType2035=Digital -InputCue2036=Item 23 Visible -InputSigType2036=Digital -InputCue2037=Item 24 Visible -InputSigType2037=Digital -InputCue2038=Item 25 Visible -InputSigType2038=Digital -InputCue2039=Item 26 Visible -InputSigType2039=Digital -InputCue2040=Item 27 Visible -InputSigType2040=Digital -InputCue2041=Item 28 Visible -InputSigType2041=Digital -InputCue2042=Item 29 Visible -InputSigType2042=Digital -InputCue2043=Item 30 Visible -InputSigType2043=Digital -InputCue2044=[~UNUSED2~] -InputSigType2044=Digital|Analog|Serial|String -InputCue4014=[~EndGroup~]Visible -InputSigType4014=Digital -InputCue4015=[~BeginGroup~]fb -InputSigType4015=Digital -InputCue4016=fb1 -InputSigType4016=Digital -InputCue4017=fb2 -InputSigType4017=Digital -InputCue4018=fb3 -InputSigType4018=Digital -InputCue4019=fb4 -InputSigType4019=Digital -InputCue4020=fb5 -InputSigType4020=Digital -InputCue4021=fb6 -InputSigType4021=Digital -InputCue4022=fb7 -InputSigType4022=Digital -InputCue4023=fb8 -InputSigType4023=Digital -InputCue4024=fb9 -InputSigType4024=Digital -InputCue4025=fb10 -InputSigType4025=Digital -InputCue4026=fb11 -InputSigType4026=Digital -InputCue4027=fb12 -InputSigType4027=Digital -InputCue4028=fb13 -InputSigType4028=Digital -InputCue4029=fb14 -InputSigType4029=Digital -InputCue4030=fb15 -InputSigType4030=Digital -InputCue4031=fb16 -InputSigType4031=Digital -InputCue4032=fb17 -InputSigType4032=Digital -InputCue4033=fb18 -InputSigType4033=Digital -InputCue4034=fb19 -InputSigType4034=Digital -InputCue4035=fb20 -InputSigType4035=Digital -InputCue4036=fb21 -InputSigType4036=Digital -InputCue4037=fb22 -InputSigType4037=Digital -InputCue4038=fb23 -InputSigType4038=Digital -InputCue4039=fb24 -InputSigType4039=Digital -InputCue4040=fb25 -InputSigType4040=Digital -InputCue4041=fb26 -InputSigType4041=Digital -InputCue4042=fb27 -InputSigType4042=Digital -InputCue4043=fb28 -InputSigType4043=Digital -InputCue4044=fb29 -InputSigType4044=Digital -InputCue4045=fb30 -InputSigType4045=Digital -InputCue4046=fb31 -InputSigType4046=Digital -InputCue4047=fb32 -InputSigType4047=Digital -InputCue4048=fb33 -InputSigType4048=Digital -InputCue4049=fb34 -InputSigType4049=Digital -InputCue4050=fb35 -InputSigType4050=Digital -InputCue4051=fb36 -InputSigType4051=Digital -InputCue4052=fb37 -InputSigType4052=Digital -InputCue4053=fb38 -InputSigType4053=Digital -InputCue4054=fb39 -InputSigType4054=Digital -InputCue4055=fb40 -InputSigType4055=Digital -InputCue4056=fb41 -InputSigType4056=Digital -InputCue4057=fb42 -InputSigType4057=Digital -InputCue4058=fb43 -InputSigType4058=Digital -InputCue4059=fb44 -InputSigType4059=Digital -InputCue4060=fb45 -InputSigType4060=Digital -InputCue4061=fb46 -InputSigType4061=Digital -InputCue4062=fb47 -InputSigType4062=Digital -InputCue4063=fb48 -InputSigType4063=Digital -InputCue4064=fb49 -InputSigType4064=Digital -InputCue4065=fb50 -InputSigType4065=Digital -InputCue4066=fb51 -InputSigType4066=Digital -InputCue4067=fb52 -InputSigType4067=Digital -InputCue4068=fb53 -InputSigType4068=Digital -InputCue4069=fb54 -InputSigType4069=Digital -InputCue4070=fb55 -InputSigType4070=Digital -InputCue4071=fb56 -InputSigType4071=Digital -InputCue4072=fb57 -InputSigType4072=Digital -InputCue4073=fb58 -InputSigType4073=Digital -InputCue4074=fb59 -InputSigType4074=Digital -InputCue4075=fb60 -InputSigType4075=Digital -InputCue4076=fb61 -InputSigType4076=Digital -InputCue4077=fb62 -InputSigType4077=Digital -InputCue4078=fb63 -InputSigType4078=Digital -InputCue4079=fb64 -InputSigType4079=Digital -InputCue4080=fb65 -InputSigType4080=Digital -InputCue4081=fb66 -InputSigType4081=Digital -InputCue4082=fb67 -InputSigType4082=Digital -InputCue4083=fb68 -InputSigType4083=Digital -InputCue4084=fb69 -InputSigType4084=Digital -InputCue4085=fb70 -InputSigType4085=Digital -InputCue4086=fb71 -InputSigType4086=Digital -InputCue4087=fb72 -InputSigType4087=Digital -InputCue4088=fb73 -InputSigType4088=Digital -InputCue4089=fb74 -InputSigType4089=Digital -InputCue4090=fb75 -InputSigType4090=Digital -InputCue4091=fb76 -InputSigType4091=Digital -InputCue4092=fb77 -InputSigType4092=Digital -InputCue4093=fb78 -InputSigType4093=Digital -InputCue4094=fb79 -InputSigType4094=Digital -InputCue4095=fb80 -InputSigType4095=Digital -InputCue4096=fb81 -InputSigType4096=Digital -InputCue4097=fb82 -InputSigType4097=Digital -InputCue4098=fb83 -InputSigType4098=Digital -InputCue4099=fb84 -InputSigType4099=Digital -InputCue4100=fb85 -InputSigType4100=Digital -InputCue4101=fb86 -InputSigType4101=Digital -InputCue4102=fb87 -InputSigType4102=Digital -InputCue4103=fb88 -InputSigType4103=Digital -InputCue4104=fb89 -InputSigType4104=Digital -InputCue4105=fb90 -InputSigType4105=Digital -InputCue4106=[~EndGroup~]fb -InputSigType4106=Digital -OutputCue1=Is Moving -OutputSigType1=Digital -OutputCue2=[~UNUSED2~] -OutputSigType2=Digital -OutputCue3=[~UNUSED2~] -OutputSigType3=Digital -OutputCue4=[~UNUSED2~] -OutputSigType4=Digital -OutputCue5=[~UNUSED2~] -OutputSigType5=Digital -OutputCue6=[~UNUSED2~] -OutputSigType6=Digital -OutputCue7=[~UNUSED2~] -OutputSigType7=Digital -OutputCue8=[~UNUSED2~] -OutputSigType8=Digital -OutputCue9=[~UNUSED2~] -OutputSigType9=Digital -OutputCue10=[~UNUSED2~] -OutputSigType10=Digital -OutputCue11=[~BeginGroup~]Enable -OutputSigType11=Digital -OutputCue12=[~UNUSED3~] -OutputSigType12=Digital -OutputCue13=[~UNUSED3~] -OutputSigType13=Digital -OutputCue14=[~UNUSED3~] -OutputSigType14=Digital -OutputCue15=[~UNUSED3~] -OutputSigType15=Digital -OutputCue16=[~UNUSED3~] -OutputSigType16=Digital -OutputCue17=[~UNUSED3~] -OutputSigType17=Digital -OutputCue18=[~UNUSED3~] -OutputSigType18=Digital -OutputCue19=[~UNUSED3~] -OutputSigType19=Digital -OutputCue20=[~UNUSED3~] -OutputSigType20=Digital -OutputCue21=[~UNUSED3~] -OutputSigType21=Digital -OutputCue22=[~UNUSED3~] -OutputSigType22=Digital -OutputCue23=[~UNUSED3~] -OutputSigType23=Digital -OutputCue24=[~UNUSED3~] -OutputSigType24=Digital -OutputCue25=[~UNUSED3~] -OutputSigType25=Digital -OutputCue26=[~UNUSED3~] -OutputSigType26=Digital -OutputCue27=[~UNUSED3~] -OutputSigType27=Digital -OutputCue28=[~UNUSED3~] -OutputSigType28=Digital -OutputCue29=[~UNUSED3~] -OutputSigType29=Digital -OutputCue30=[~UNUSED3~] -OutputSigType30=Digital -OutputCue31=[~UNUSED3~] -OutputSigType31=Digital -OutputCue32=[~UNUSED3~] -OutputSigType32=Digital -OutputCue33=[~UNUSED3~] -OutputSigType33=Digital -OutputCue34=[~UNUSED3~] -OutputSigType34=Digital -OutputCue35=[~UNUSED3~] -OutputSigType35=Digital -OutputCue36=[~UNUSED3~] -OutputSigType36=Digital -OutputCue37=[~UNUSED3~] -OutputSigType37=Digital -OutputCue38=[~UNUSED3~] -OutputSigType38=Digital -OutputCue39=[~UNUSED3~] -OutputSigType39=Digital -OutputCue40=[~UNUSED3~] -OutputSigType40=Digital -OutputCue41=[~UNUSED3~] -OutputSigType41=Digital -OutputCue42=[~UNUSED2~] -OutputSigType42=Digital|Analog|Serial|String -OutputCue2012=[~EndGroup~]Enable -OutputSigType2012=Digital -OutputCue2013=[~BeginGroup~]Visible -OutputSigType2013=Digital -OutputCue2014=[~UNUSED3~] -OutputSigType2014=Digital -OutputCue2015=[~UNUSED3~] -OutputSigType2015=Digital -OutputCue2016=[~UNUSED3~] -OutputSigType2016=Digital -OutputCue2017=[~UNUSED3~] -OutputSigType2017=Digital -OutputCue2018=[~UNUSED3~] -OutputSigType2018=Digital -OutputCue2019=[~UNUSED3~] -OutputSigType2019=Digital -OutputCue2020=[~UNUSED3~] -OutputSigType2020=Digital -OutputCue2021=[~UNUSED3~] -OutputSigType2021=Digital -OutputCue2022=[~UNUSED3~] -OutputSigType2022=Digital -OutputCue2023=[~UNUSED3~] -OutputSigType2023=Digital -OutputCue2024=[~UNUSED3~] -OutputSigType2024=Digital -OutputCue2025=[~UNUSED3~] -OutputSigType2025=Digital -OutputCue2026=[~UNUSED3~] -OutputSigType2026=Digital -OutputCue2027=[~UNUSED3~] -OutputSigType2027=Digital -OutputCue2028=[~UNUSED3~] -OutputSigType2028=Digital -OutputCue2029=[~UNUSED3~] -OutputSigType2029=Digital -OutputCue2030=[~UNUSED3~] -OutputSigType2030=Digital -OutputCue2031=[~UNUSED3~] -OutputSigType2031=Digital -OutputCue2032=[~UNUSED3~] -OutputSigType2032=Digital -OutputCue2033=[~UNUSED3~] -OutputSigType2033=Digital -OutputCue2034=[~UNUSED3~] -OutputSigType2034=Digital -OutputCue2035=[~UNUSED3~] -OutputSigType2035=Digital -OutputCue2036=[~UNUSED3~] -OutputSigType2036=Digital -OutputCue2037=[~UNUSED3~] -OutputSigType2037=Digital -OutputCue2038=[~UNUSED3~] -OutputSigType2038=Digital -OutputCue2039=[~UNUSED3~] -OutputSigType2039=Digital -OutputCue2040=[~UNUSED3~] -OutputSigType2040=Digital -OutputCue2041=[~UNUSED3~] -OutputSigType2041=Digital -OutputCue2042=[~UNUSED3~] -OutputSigType2042=Digital -OutputCue2043=[~UNUSED3~] -OutputSigType2043=Digital -OutputCue2044=[~UNUSED2~] -OutputSigType2044=Digital|Analog|Serial|String -OutputCue4014=[~EndGroup~]Visible -OutputSigType4014=Digital -OutputCue4015=[~BeginGroup~]Press -OutputSigType4015=Digital -OutputCue4016=press1 -OutputSigType4016=Digital -OutputCue4017=press2 -OutputSigType4017=Digital -OutputCue4018=press3 -OutputSigType4018=Digital -OutputCue4019=press4 -OutputSigType4019=Digital -OutputCue4020=press5 -OutputSigType4020=Digital -OutputCue4021=press6 -OutputSigType4021=Digital -OutputCue4022=press7 -OutputSigType4022=Digital -OutputCue4023=press8 -OutputSigType4023=Digital -OutputCue4024=press9 -OutputSigType4024=Digital -OutputCue4025=press10 -OutputSigType4025=Digital -OutputCue4026=press11 -OutputSigType4026=Digital -OutputCue4027=press12 -OutputSigType4027=Digital -OutputCue4028=press13 -OutputSigType4028=Digital -OutputCue4029=press14 -OutputSigType4029=Digital -OutputCue4030=press15 -OutputSigType4030=Digital -OutputCue4031=press16 -OutputSigType4031=Digital -OutputCue4032=press17 -OutputSigType4032=Digital -OutputCue4033=press18 -OutputSigType4033=Digital -OutputCue4034=press19 -OutputSigType4034=Digital -OutputCue4035=press20 -OutputSigType4035=Digital -OutputCue4036=press21 -OutputSigType4036=Digital -OutputCue4037=press22 -OutputSigType4037=Digital -OutputCue4038=press23 -OutputSigType4038=Digital -OutputCue4039=press24 -OutputSigType4039=Digital -OutputCue4040=press25 -OutputSigType4040=Digital -OutputCue4041=press26 -OutputSigType4041=Digital -OutputCue4042=press27 -OutputSigType4042=Digital -OutputCue4043=press28 -OutputSigType4043=Digital -OutputCue4044=press29 -OutputSigType4044=Digital -OutputCue4045=press30 -OutputSigType4045=Digital -OutputCue4046=press31 -OutputSigType4046=Digital -OutputCue4047=press32 -OutputSigType4047=Digital -OutputCue4048=press33 -OutputSigType4048=Digital -OutputCue4049=press34 -OutputSigType4049=Digital -OutputCue4050=press35 -OutputSigType4050=Digital -OutputCue4051=press36 -OutputSigType4051=Digital -OutputCue4052=press37 -OutputSigType4052=Digital -OutputCue4053=press38 -OutputSigType4053=Digital -OutputCue4054=press39 -OutputSigType4054=Digital -OutputCue4055=press40 -OutputSigType4055=Digital -OutputCue4056=press41 -OutputSigType4056=Digital -OutputCue4057=press42 -OutputSigType4057=Digital -OutputCue4058=press43 -OutputSigType4058=Digital -OutputCue4059=press44 -OutputSigType4059=Digital -OutputCue4060=press45 -OutputSigType4060=Digital -OutputCue4061=press46 -OutputSigType4061=Digital -OutputCue4062=press47 -OutputSigType4062=Digital -OutputCue4063=press48 -OutputSigType4063=Digital -OutputCue4064=press49 -OutputSigType4064=Digital -OutputCue4065=press50 -OutputSigType4065=Digital -OutputCue4066=press51 -OutputSigType4066=Digital -OutputCue4067=press52 -OutputSigType4067=Digital -OutputCue4068=press53 -OutputSigType4068=Digital -OutputCue4069=press54 -OutputSigType4069=Digital -OutputCue4070=press55 -OutputSigType4070=Digital -OutputCue4071=press56 -OutputSigType4071=Digital -OutputCue4072=press57 -OutputSigType4072=Digital -OutputCue4073=press58 -OutputSigType4073=Digital -OutputCue4074=press59 -OutputSigType4074=Digital -OutputCue4075=press60 -OutputSigType4075=Digital -OutputCue4076=press61 -OutputSigType4076=Digital -OutputCue4077=press62 -OutputSigType4077=Digital -OutputCue4078=press63 -OutputSigType4078=Digital -OutputCue4079=press64 -OutputSigType4079=Digital -OutputCue4080=press65 -OutputSigType4080=Digital -OutputCue4081=press66 -OutputSigType4081=Digital -OutputCue4082=press67 -OutputSigType4082=Digital -OutputCue4083=press68 -OutputSigType4083=Digital -OutputCue4084=press69 -OutputSigType4084=Digital -OutputCue4085=press70 -OutputSigType4085=Digital -OutputCue4086=press71 -OutputSigType4086=Digital -OutputCue4087=press72 -OutputSigType4087=Digital -OutputCue4088=press73 -OutputSigType4088=Digital -OutputCue4089=press74 -OutputSigType4089=Digital -OutputCue4090=press75 -OutputSigType4090=Digital -OutputCue4091=press76 -OutputSigType4091=Digital -OutputCue4092=press77 -OutputSigType4092=Digital -OutputCue4093=press78 -OutputSigType4093=Digital -OutputCue4094=press79 -OutputSigType4094=Digital -OutputCue4095=press80 -OutputSigType4095=Digital -OutputCue4096=press81 -OutputSigType4096=Digital -OutputCue4097=press82 -OutputSigType4097=Digital -OutputCue4098=press83 -OutputSigType4098=Digital -OutputCue4099=press84 -OutputSigType4099=Digital -OutputCue4100=press85 -OutputSigType4100=Digital -OutputCue4101=press86 -OutputSigType4101=Digital -OutputCue4102=press87 -OutputSigType4102=Digital -OutputCue4103=press88 -OutputSigType4103=Digital -OutputCue4104=press89 -OutputSigType4104=Digital -OutputCue4105=press90 -OutputSigType4105=Digital -OutputCue4106=[~EndGroup~]Press -OutputSigType4106=Digital -InputList2Cue1=[~UNUSED3~] -InputList2SigType1=Analog -InputList2Cue2=Scroll To Item -InputList2SigType2=Analog -InputList2Cue3=Set Number of Items -InputList2SigType3=Analog -OutputList2Cue1=Item Clicked -OutputList2SigType1=Analog -OutputList2Cue2=[~UNUSED3~] -OutputList2SigType2=Analog -OutputList2Cue3=[~UNUSED3~] -OutputList2SigType3=Analog -InputList3Cue1=[~UNUSED2~] -InputList3SigType1=Serial -InputList3Cue2=[~UNUSED2~] -InputList3SigType2=Serial -InputList3Cue3=[~UNUSED2~] -InputList3SigType3=Serial -InputList3Cue4=[~UNUSED2~] -InputList3SigType4=Serial -InputList3Cue5=[~UNUSED2~] -InputList3SigType5=Serial -InputList3Cue6=[~UNUSED2~] -InputList3SigType6=Serial -InputList3Cue7=[~UNUSED2~] -InputList3SigType7=Serial -InputList3Cue8=[~UNUSED2~] -InputList3SigType8=Serial -InputList3Cue9=[~UNUSED2~] -InputList3SigType9=Serial -InputList3Cue10=[~UNUSED2~] -InputList3SigType10=Serial -InputList3Cue11=[~BeginGroup~]text-o -InputList3SigType11=Serial -InputList3Cue12=text-o1 -InputList3SigType12=Serial -InputList3Cue13=text-o2 -InputList3SigType13=Serial -InputList3Cue14=text-o3 -InputList3SigType14=Serial -InputList3Cue15=text-o4 -InputList3SigType15=Serial -InputList3Cue16=text-o5 -InputList3SigType16=Serial -InputList3Cue17=text-o6 -InputList3SigType17=Serial -InputList3Cue18=text-o7 -InputList3SigType18=Serial -InputList3Cue19=text-o8 -InputList3SigType19=Serial -InputList3Cue20=text-o9 -InputList3SigType20=Serial -InputList3Cue21=text-o10 -InputList3SigType21=Serial -InputList3Cue22=text-o11 -InputList3SigType22=Serial -InputList3Cue23=text-o12 -InputList3SigType23=Serial -InputList3Cue24=text-o13 -InputList3SigType24=Serial -InputList3Cue25=text-o14 -InputList3SigType25=Serial -InputList3Cue26=text-o15 -InputList3SigType26=Serial -InputList3Cue27=text-o16 -InputList3SigType27=Serial -InputList3Cue28=text-o17 -InputList3SigType28=Serial -InputList3Cue29=text-o18 -InputList3SigType29=Serial -InputList3Cue30=text-o19 -InputList3SigType30=Serial -InputList3Cue31=text-o20 -InputList3SigType31=Serial -InputList3Cue32=text-o21 -InputList3SigType32=Serial -InputList3Cue33=text-o22 -InputList3SigType33=Serial -InputList3Cue34=text-o23 -InputList3SigType34=Serial -InputList3Cue35=text-o24 -InputList3SigType35=Serial -InputList3Cue36=text-o25 -InputList3SigType36=Serial -InputList3Cue37=text-o26 -InputList3SigType37=Serial -InputList3Cue38=text-o27 -InputList3SigType38=Serial -InputList3Cue39=text-o28 -InputList3SigType39=Serial -InputList3Cue40=text-o29 -InputList3SigType40=Serial -InputList3Cue41=text-o30 -InputList3SigType41=Serial -InputList3Cue42=text-o31 -InputList3SigType42=Serial -InputList3Cue43=text-o32 -InputList3SigType43=Serial -InputList3Cue44=text-o33 -InputList3SigType44=Serial -InputList3Cue45=text-o34 -InputList3SigType45=Serial -InputList3Cue46=text-o35 -InputList3SigType46=Serial -InputList3Cue47=text-o36 -InputList3SigType47=Serial -InputList3Cue48=text-o37 -InputList3SigType48=Serial -InputList3Cue49=text-o38 -InputList3SigType49=Serial -InputList3Cue50=text-o39 -InputList3SigType50=Serial -InputList3Cue51=text-o40 -InputList3SigType51=Serial -InputList3Cue52=text-o41 -InputList3SigType52=Serial -InputList3Cue53=text-o42 -InputList3SigType53=Serial -InputList3Cue54=text-o43 -InputList3SigType54=Serial -InputList3Cue55=text-o44 -InputList3SigType55=Serial -InputList3Cue56=text-o45 -InputList3SigType56=Serial -InputList3Cue57=text-o46 -InputList3SigType57=Serial -InputList3Cue58=text-o47 -InputList3SigType58=Serial -InputList3Cue59=text-o48 -InputList3SigType59=Serial -InputList3Cue60=text-o49 -InputList3SigType60=Serial -InputList3Cue61=text-o50 -InputList3SigType61=Serial -InputList3Cue62=text-o51 -InputList3SigType62=Serial -InputList3Cue63=text-o52 -InputList3SigType63=Serial -InputList3Cue64=text-o53 -InputList3SigType64=Serial -InputList3Cue65=text-o54 -InputList3SigType65=Serial -InputList3Cue66=text-o55 -InputList3SigType66=Serial -InputList3Cue67=text-o56 -InputList3SigType67=Serial -InputList3Cue68=text-o57 -InputList3SigType68=Serial -InputList3Cue69=text-o58 -InputList3SigType69=Serial -InputList3Cue70=text-o59 -InputList3SigType70=Serial -InputList3Cue71=text-o60 -InputList3SigType71=Serial -InputList3Cue72=text-o61 -InputList3SigType72=Serial -InputList3Cue73=text-o62 -InputList3SigType73=Serial -InputList3Cue74=text-o63 -InputList3SigType74=Serial -InputList3Cue75=text-o64 -InputList3SigType75=Serial -InputList3Cue76=text-o65 -InputList3SigType76=Serial -InputList3Cue77=text-o66 -InputList3SigType77=Serial -InputList3Cue78=text-o67 -InputList3SigType78=Serial -InputList3Cue79=text-o68 -InputList3SigType79=Serial -InputList3Cue80=text-o69 -InputList3SigType80=Serial -InputList3Cue81=text-o70 -InputList3SigType81=Serial -InputList3Cue82=text-o71 -InputList3SigType82=Serial -InputList3Cue83=text-o72 -InputList3SigType83=Serial -InputList3Cue84=text-o73 -InputList3SigType84=Serial -InputList3Cue85=text-o74 -InputList3SigType85=Serial -InputList3Cue86=text-o75 -InputList3SigType86=Serial -InputList3Cue87=text-o76 -InputList3SigType87=Serial -InputList3Cue88=text-o77 -InputList3SigType88=Serial -InputList3Cue89=text-o78 -InputList3SigType89=Serial -InputList3Cue90=text-o79 -InputList3SigType90=Serial -InputList3Cue91=text-o80 -InputList3SigType91=Serial -InputList3Cue92=text-o81 -InputList3SigType92=Serial -InputList3Cue93=text-o82 -InputList3SigType93=Serial -InputList3Cue94=text-o83 -InputList3SigType94=Serial -InputList3Cue95=text-o84 -InputList3SigType95=Serial -InputList3Cue96=text-o85 -InputList3SigType96=Serial -InputList3Cue97=text-o86 -InputList3SigType97=Serial -InputList3Cue98=text-o87 -InputList3SigType98=Serial -InputList3Cue99=text-o88 -InputList3SigType99=Serial -InputList3Cue100=text-o89 -InputList3SigType100=Serial -InputList3Cue101=text-o90 -InputList3SigType101=Serial -InputList3Cue102=text-o91 -InputList3SigType102=Serial -InputList3Cue103=text-o92 -InputList3SigType103=Serial -InputList3Cue104=text-o93 -InputList3SigType104=Serial -InputList3Cue105=text-o94 -InputList3SigType105=Serial -InputList3Cue106=text-o95 -InputList3SigType106=Serial -InputList3Cue107=text-o96 -InputList3SigType107=Serial -InputList3Cue108=text-o97 -InputList3SigType108=Serial -InputList3Cue109=text-o98 -InputList3SigType109=Serial -InputList3Cue110=text-o99 -InputList3SigType110=Serial -InputList3Cue111=text-o100 -InputList3SigType111=Serial -InputList3Cue112=text-o101 -InputList3SigType112=Serial -InputList3Cue113=text-o102 -InputList3SigType113=Serial -InputList3Cue114=text-o103 -InputList3SigType114=Serial -InputList3Cue115=text-o104 -InputList3SigType115=Serial -InputList3Cue116=text-o105 -InputList3SigType116=Serial -InputList3Cue117=text-o106 -InputList3SigType117=Serial -InputList3Cue118=text-o107 -InputList3SigType118=Serial -InputList3Cue119=text-o108 -InputList3SigType119=Serial -InputList3Cue120=text-o109 -InputList3SigType120=Serial -InputList3Cue121=text-o110 -InputList3SigType121=Serial -InputList3Cue122=text-o111 -InputList3SigType122=Serial -InputList3Cue123=text-o112 -InputList3SigType123=Serial -InputList3Cue124=text-o113 -InputList3SigType124=Serial -InputList3Cue125=text-o114 -InputList3SigType125=Serial -InputList3Cue126=text-o115 -InputList3SigType126=Serial -InputList3Cue127=text-o116 -InputList3SigType127=Serial -InputList3Cue128=text-o117 -InputList3SigType128=Serial -InputList3Cue129=text-o118 -InputList3SigType129=Serial -InputList3Cue130=text-o119 -InputList3SigType130=Serial -InputList3Cue131=text-o120 -InputList3SigType131=Serial -InputList3Cue132=[~EndGroup~]text-o -InputList3SigType132=Serial -OutputList3Cue1=[~UNUSED2~] -OutputList3SigType1=Serial -OutputList3Cue2=[~UNUSED2~] -OutputList3SigType2=Serial -OutputList3Cue3=[~UNUSED2~] -OutputList3SigType3=Serial -OutputList3Cue4=[~UNUSED2~] -OutputList3SigType4=Serial -OutputList3Cue5=[~UNUSED2~] -OutputList3SigType5=Serial -OutputList3Cue6=[~UNUSED2~] -OutputList3SigType6=Serial -OutputList3Cue7=[~UNUSED2~] -OutputList3SigType7=Serial -OutputList3Cue8=[~UNUSED2~] -OutputList3SigType8=Serial -OutputList3Cue9=[~UNUSED2~] -OutputList3SigType9=Serial -OutputList3Cue10=[~UNUSED2~] -OutputList3SigType10=Serial -OutputList3Cue11=[~BeginGroup~]text-i -OutputList3SigType11=Serial -OutputList3Cue12=text-i1 -OutputList3SigType12=Serial -OutputList3Cue13=text-i2 -OutputList3SigType13=Serial -OutputList3Cue14=text-i3 -OutputList3SigType14=Serial -OutputList3Cue15=text-i4 -OutputList3SigType15=Serial -OutputList3Cue16=text-i5 -OutputList3SigType16=Serial -OutputList3Cue17=text-i6 -OutputList3SigType17=Serial -OutputList3Cue18=text-i7 -OutputList3SigType18=Serial -OutputList3Cue19=text-i8 -OutputList3SigType19=Serial -OutputList3Cue20=text-i9 -OutputList3SigType20=Serial -OutputList3Cue21=text-i10 -OutputList3SigType21=Serial -OutputList3Cue22=text-i11 -OutputList3SigType22=Serial -OutputList3Cue23=text-i12 -OutputList3SigType23=Serial -OutputList3Cue24=text-i13 -OutputList3SigType24=Serial -OutputList3Cue25=text-i14 -OutputList3SigType25=Serial -OutputList3Cue26=text-i15 -OutputList3SigType26=Serial -OutputList3Cue27=text-i16 -OutputList3SigType27=Serial -OutputList3Cue28=text-i17 -OutputList3SigType28=Serial -OutputList3Cue29=text-i18 -OutputList3SigType29=Serial -OutputList3Cue30=text-i19 -OutputList3SigType30=Serial -OutputList3Cue31=text-i20 -OutputList3SigType31=Serial -OutputList3Cue32=text-i21 -OutputList3SigType32=Serial -OutputList3Cue33=text-i22 -OutputList3SigType33=Serial -OutputList3Cue34=text-i23 -OutputList3SigType34=Serial -OutputList3Cue35=text-i24 -OutputList3SigType35=Serial -OutputList3Cue36=text-i25 -OutputList3SigType36=Serial -OutputList3Cue37=text-i26 -OutputList3SigType37=Serial -OutputList3Cue38=text-i27 -OutputList3SigType38=Serial -OutputList3Cue39=text-i28 -OutputList3SigType39=Serial -OutputList3Cue40=text-i29 -OutputList3SigType40=Serial -OutputList3Cue41=text-i30 -OutputList3SigType41=Serial -OutputList3Cue42=text-i31 -OutputList3SigType42=Serial -OutputList3Cue43=text-i32 -OutputList3SigType43=Serial -OutputList3Cue44=text-i33 -OutputList3SigType44=Serial -OutputList3Cue45=text-i34 -OutputList3SigType45=Serial -OutputList3Cue46=text-i35 -OutputList3SigType46=Serial -OutputList3Cue47=text-i36 -OutputList3SigType47=Serial -OutputList3Cue48=text-i37 -OutputList3SigType48=Serial -OutputList3Cue49=text-i38 -OutputList3SigType49=Serial -OutputList3Cue50=text-i39 -OutputList3SigType50=Serial -OutputList3Cue51=text-i40 -OutputList3SigType51=Serial -OutputList3Cue52=text-i41 -OutputList3SigType52=Serial -OutputList3Cue53=text-i42 -OutputList3SigType53=Serial -OutputList3Cue54=text-i43 -OutputList3SigType54=Serial -OutputList3Cue55=text-i44 -OutputList3SigType55=Serial -OutputList3Cue56=text-i45 -OutputList3SigType56=Serial -OutputList3Cue57=text-i46 -OutputList3SigType57=Serial -OutputList3Cue58=text-i47 -OutputList3SigType58=Serial -OutputList3Cue59=text-i48 -OutputList3SigType59=Serial -OutputList3Cue60=text-i49 -OutputList3SigType60=Serial -OutputList3Cue61=text-i50 -OutputList3SigType61=Serial -OutputList3Cue62=text-i51 -OutputList3SigType62=Serial -OutputList3Cue63=text-i52 -OutputList3SigType63=Serial -OutputList3Cue64=text-i53 -OutputList3SigType64=Serial -OutputList3Cue65=text-i54 -OutputList3SigType65=Serial -OutputList3Cue66=text-i55 -OutputList3SigType66=Serial -OutputList3Cue67=text-i56 -OutputList3SigType67=Serial -OutputList3Cue68=text-i57 -OutputList3SigType68=Serial -OutputList3Cue69=text-i58 -OutputList3SigType69=Serial -OutputList3Cue70=text-i59 -OutputList3SigType70=Serial -OutputList3Cue71=text-i60 -OutputList3SigType71=Serial -OutputList3Cue72=text-i61 -OutputList3SigType72=Serial -OutputList3Cue73=text-i62 -OutputList3SigType73=Serial -OutputList3Cue74=text-i63 -OutputList3SigType74=Serial -OutputList3Cue75=text-i64 -OutputList3SigType75=Serial -OutputList3Cue76=text-i65 -OutputList3SigType76=Serial -OutputList3Cue77=text-i66 -OutputList3SigType77=Serial -OutputList3Cue78=text-i67 -OutputList3SigType78=Serial -OutputList3Cue79=text-i68 -OutputList3SigType79=Serial -OutputList3Cue80=text-i69 -OutputList3SigType80=Serial -OutputList3Cue81=text-i70 -OutputList3SigType81=Serial -OutputList3Cue82=text-i71 -OutputList3SigType82=Serial -OutputList3Cue83=text-i72 -OutputList3SigType83=Serial -OutputList3Cue84=text-i73 -OutputList3SigType84=Serial -OutputList3Cue85=text-i74 -OutputList3SigType85=Serial -OutputList3Cue86=text-i75 -OutputList3SigType86=Serial -OutputList3Cue87=text-i76 -OutputList3SigType87=Serial -OutputList3Cue88=text-i77 -OutputList3SigType88=Serial -OutputList3Cue89=text-i78 -OutputList3SigType89=Serial -OutputList3Cue90=text-i79 -OutputList3SigType90=Serial -OutputList3Cue91=text-i80 -OutputList3SigType91=Serial -OutputList3Cue92=text-i81 -OutputList3SigType92=Serial -OutputList3Cue93=text-i82 -OutputList3SigType93=Serial -OutputList3Cue94=text-i83 -OutputList3SigType94=Serial -OutputList3Cue95=text-i84 -OutputList3SigType95=Serial -OutputList3Cue96=text-i85 -OutputList3SigType96=Serial -OutputList3Cue97=text-i86 -OutputList3SigType97=Serial -OutputList3Cue98=text-i87 -OutputList3SigType98=Serial -OutputList3Cue99=text-i88 -OutputList3SigType99=Serial -OutputList3Cue100=text-i89 -OutputList3SigType100=Serial -OutputList3Cue101=text-i90 -OutputList3SigType101=Serial -OutputList3Cue102=text-i91 -OutputList3SigType102=Serial -OutputList3Cue103=text-i92 -OutputList3SigType103=Serial -OutputList3Cue104=text-i93 -OutputList3SigType104=Serial -OutputList3Cue105=text-i94 -OutputList3SigType105=Serial -OutputList3Cue106=text-i95 -OutputList3SigType106=Serial -OutputList3Cue107=text-i96 -OutputList3SigType107=Serial -OutputList3Cue108=text-i97 -OutputList3SigType108=Serial -OutputList3Cue109=text-i98 -OutputList3SigType109=Serial -OutputList3Cue110=text-i99 -OutputList3SigType110=Serial -OutputList3Cue111=text-i100 -OutputList3SigType111=Serial -OutputList3Cue112=text-i101 -OutputList3SigType112=Serial -OutputList3Cue113=text-i102 -OutputList3SigType113=Serial -OutputList3Cue114=text-i103 -OutputList3SigType114=Serial -OutputList3Cue115=text-i104 -OutputList3SigType115=Serial -OutputList3Cue116=text-i105 -OutputList3SigType116=Serial -OutputList3Cue117=text-i106 -OutputList3SigType117=Serial -OutputList3Cue118=text-i107 -OutputList3SigType118=Serial -OutputList3Cue119=text-i108 -OutputList3SigType119=Serial -OutputList3Cue120=text-i109 -OutputList3SigType120=Serial -OutputList3Cue121=text-i110 -OutputList3SigType121=Serial -OutputList3Cue122=text-i111 -OutputList3SigType122=Serial -OutputList3Cue123=text-i112 -OutputList3SigType123=Serial -OutputList3Cue124=text-i113 -OutputList3SigType124=Serial -OutputList3Cue125=text-i114 -OutputList3SigType125=Serial -OutputList3Cue126=text-i115 -OutputList3SigType126=Serial -OutputList3Cue127=text-i116 -OutputList3SigType127=Serial -OutputList3Cue128=text-i117 -OutputList3SigType128=Serial -OutputList3Cue129=text-i118 -OutputList3SigType129=Serial -OutputList3Cue130=text-i119 -OutputList3SigType130=Serial -OutputList3Cue131=text-i120 -OutputList3SigType131=Serial -OutputList3Cue132=[~EndGroup~]text-i -OutputList3SigType132=Serial -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=8 -CedH=8 -SmartObjId=1806d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=8 -Tp=1 -HD=TRUE -DV=1806d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=8 -Name=PepperDash Essentials iPad_[B.AV] Source Ctrl-CATV-Basic_Channel Preset List Basic.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials iPad_[A.Global] Activity Footer SRL_Modes Bottom Bar SRL.ced -Hint=Modes Bottom Bar SRL (Smart Object ID=15022) -Code=9 -SGControlType=Subpage Reference List Horizontal -SGControlName=Modes Bottom Bar SRL -GUID=812FF0C4-486D-4ABC-90FA-405F19104323 -SmplCName=PepperDash Essentials iPad_[A.Global] Activity Footer SRL_Modes Bottom Bar SRL.ced -SMWRev=4.02.20 -Expand=expand_random -HelpID=10124 -Render=8 -;Define the number of inputs, outputs and parameters -MinVariableInputs=4028 -MaxVariableInputs=4028 -MinVariableOutputs=4028 -MaxVariableOutputs=4028 -NumFixedParams=1 -MinVariableInputsList2=24 -MaxVariableInputsList2=24 -MinVariableOutputsList2=24 -MaxVariableOutputsList2=24 -MinVariableInputsList3=24 -MaxVariableInputsList3=24 -MinVariableOutputsList3=24 -MaxVariableOutputsList3=24 -InputSigType1=Digital -OutputSigType1=Digital -InputList2SigType1=Analog -OutputList2SigType1=Analog -InputList3SigType1=Serial -OutputList3SigType1=Serial - -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -InputCue2=[~UNUSED2~] -InputSigType2=Digital -InputCue3=[~UNUSED2~] -InputSigType3=Digital -InputCue4=[~UNUSED2~] -InputSigType4=Digital -InputCue5=[~UNUSED2~] -InputSigType5=Digital -InputCue6=[~UNUSED2~] -InputSigType6=Digital -InputCue7=[~UNUSED2~] -InputSigType7=Digital -InputCue8=[~UNUSED2~] -InputSigType8=Digital -InputCue9=[~UNUSED2~] -InputSigType9=Digital -InputCue10=[~UNUSED2~] -InputSigType10=Digital -InputCue11=[~BeginGroup~]Enable -InputSigType11=Digital -InputCue12=Item 1 Enable -InputSigType12=Digital -InputCue13=Item 2 Enable -InputSigType13=Digital -InputCue14=Item 3 Enable -InputSigType14=Digital -InputCue15=Item 4 Enable -InputSigType15=Digital -InputCue16=[~UNUSED2~] -InputSigType16=Digital|Analog|Serial|String -InputCue2012=[~EndGroup~]Enable -InputSigType2012=Digital -InputCue2013=[~BeginGroup~]Visible -InputSigType2013=Digital -InputCue2014=Item 1 Visible -InputSigType2014=Digital -InputCue2015=Item 2 Visible -InputSigType2015=Digital -InputCue2016=Item 3 Visible -InputSigType2016=Digital -InputCue2017=Item 4 Visible -InputSigType2017=Digital -InputCue2018=[~UNUSED2~] -InputSigType2018=Digital|Analog|Serial|String -InputCue4014=[~EndGroup~]Visible -InputSigType4014=Digital -InputCue4015=[~BeginGroup~]fb -InputSigType4015=Digital -InputCue4016=fb1 -InputSigType4016=Digital -InputCue4017=fb2 -InputSigType4017=Digital -InputCue4018=fb3 -InputSigType4018=Digital -InputCue4019=fb4 -InputSigType4019=Digital -InputCue4020=fb5 -InputSigType4020=Digital -InputCue4021=fb6 -InputSigType4021=Digital -InputCue4022=fb7 -InputSigType4022=Digital -InputCue4023=fb8 -InputSigType4023=Digital -InputCue4024=fb9 -InputSigType4024=Digital -InputCue4025=fb10 -InputSigType4025=Digital -InputCue4026=fb11 -InputSigType4026=Digital -InputCue4027=fb12 -InputSigType4027=Digital -InputCue4028=[~EndGroup~]fb -InputSigType4028=Digital -OutputCue1=Is Moving -OutputSigType1=Digital -OutputCue2=[~UNUSED2~] -OutputSigType2=Digital -OutputCue3=[~UNUSED2~] -OutputSigType3=Digital -OutputCue4=[~UNUSED2~] -OutputSigType4=Digital -OutputCue5=[~UNUSED2~] -OutputSigType5=Digital -OutputCue6=[~UNUSED2~] -OutputSigType6=Digital -OutputCue7=[~UNUSED2~] -OutputSigType7=Digital -OutputCue8=[~UNUSED2~] -OutputSigType8=Digital -OutputCue9=[~UNUSED2~] -OutputSigType9=Digital -OutputCue10=[~UNUSED2~] -OutputSigType10=Digital -OutputCue11=[~BeginGroup~]Enable -OutputSigType11=Digital -OutputCue12=[~UNUSED3~] -OutputSigType12=Digital -OutputCue13=[~UNUSED3~] -OutputSigType13=Digital -OutputCue14=[~UNUSED3~] -OutputSigType14=Digital -OutputCue15=[~UNUSED3~] -OutputSigType15=Digital -OutputCue16=[~UNUSED2~] -OutputSigType16=Digital|Analog|Serial|String -OutputCue2012=[~EndGroup~]Enable -OutputSigType2012=Digital -OutputCue2013=[~BeginGroup~]Visible -OutputSigType2013=Digital -OutputCue2014=[~UNUSED3~] -OutputSigType2014=Digital -OutputCue2015=[~UNUSED3~] -OutputSigType2015=Digital -OutputCue2016=[~UNUSED3~] -OutputSigType2016=Digital -OutputCue2017=[~UNUSED3~] -OutputSigType2017=Digital -OutputCue2018=[~UNUSED2~] -OutputSigType2018=Digital|Analog|Serial|String -OutputCue4014=[~EndGroup~]Visible -OutputSigType4014=Digital -OutputCue4015=[~BeginGroup~]Press -OutputSigType4015=Digital -OutputCue4016=press1 -OutputSigType4016=Digital -OutputCue4017=press2 -OutputSigType4017=Digital -OutputCue4018=press3 -OutputSigType4018=Digital -OutputCue4019=press4 -OutputSigType4019=Digital -OutputCue4020=press5 -OutputSigType4020=Digital -OutputCue4021=press6 -OutputSigType4021=Digital -OutputCue4022=press7 -OutputSigType4022=Digital -OutputCue4023=press8 -OutputSigType4023=Digital -OutputCue4024=press9 -OutputSigType4024=Digital -OutputCue4025=press10 -OutputSigType4025=Digital -OutputCue4026=press11 -OutputSigType4026=Digital -OutputCue4027=press12 -OutputSigType4027=Digital -OutputCue4028=[~EndGroup~]Press -OutputSigType4028=Digital -InputList2Cue1=[~UNUSED3~] -InputList2SigType1=Analog -InputList2Cue2=Scroll To Item -InputList2SigType2=Analog -InputList2Cue3=Set Number of Items -InputList2SigType3=Analog -InputList2Cue4=[~UNUSED2~] -InputList2SigType4=Analog -InputList2Cue5=[~UNUSED2~] -InputList2SigType5=Analog -InputList2Cue6=[~UNUSED2~] -InputList2SigType6=Analog -InputList2Cue7=[~UNUSED2~] -InputList2SigType7=Analog -InputList2Cue8=[~UNUSED2~] -InputList2SigType8=Analog -InputList2Cue9=[~UNUSED2~] -InputList2SigType9=Analog -InputList2Cue10=[~UNUSED2~] -InputList2SigType10=Analog -InputList2Cue11=[~BeginGroup~]an_fb -InputList2SigType11=Analog -InputList2Cue12=an_fb1 -InputList2SigType12=Analog -InputList2Cue13=an_fb2 -InputList2SigType13=Analog -InputList2Cue14=an_fb3 -InputList2SigType14=Analog -InputList2Cue15=an_fb4 -InputList2SigType15=Analog -InputList2Cue16=an_fb5 -InputList2SigType16=Analog -InputList2Cue17=an_fb6 -InputList2SigType17=Analog -InputList2Cue18=an_fb7 -InputList2SigType18=Analog -InputList2Cue19=an_fb8 -InputList2SigType19=Analog -InputList2Cue20=an_fb9 -InputList2SigType20=Analog -InputList2Cue21=an_fb10 -InputList2SigType21=Analog -InputList2Cue22=an_fb11 -InputList2SigType22=Analog -InputList2Cue23=an_fb12 -InputList2SigType23=Analog -InputList2Cue24=[~EndGroup~]an_fb -InputList2SigType24=Analog -OutputList2Cue1=Item Clicked -OutputList2SigType1=Analog -OutputList2Cue2=[~UNUSED3~] -OutputList2SigType2=Analog -OutputList2Cue3=[~UNUSED3~] -OutputList2SigType3=Analog -OutputList2Cue4=[~UNUSED2~] -OutputList2SigType4=Analog -OutputList2Cue5=[~UNUSED2~] -OutputList2SigType5=Analog -OutputList2Cue6=[~UNUSED2~] -OutputList2SigType6=Analog -OutputList2Cue7=[~UNUSED2~] -OutputList2SigType7=Analog -OutputList2Cue8=[~UNUSED2~] -OutputList2SigType8=Analog -OutputList2Cue9=[~UNUSED2~] -OutputList2SigType9=Analog -OutputList2Cue10=[~UNUSED2~] -OutputList2SigType10=Analog -OutputList2Cue11=[~BeginGroup~]an_act -OutputList2SigType11=Analog -OutputList2Cue12=an_act1 -OutputList2SigType12=Analog -OutputList2Cue13=an_act2 -OutputList2SigType13=Analog -OutputList2Cue14=an_act3 -OutputList2SigType14=Analog -OutputList2Cue15=an_act4 -OutputList2SigType15=Analog -OutputList2Cue16=an_act5 -OutputList2SigType16=Analog -OutputList2Cue17=an_act6 -OutputList2SigType17=Analog -OutputList2Cue18=an_act7 -OutputList2SigType18=Analog -OutputList2Cue19=an_act8 -OutputList2SigType19=Analog -OutputList2Cue20=an_act9 -OutputList2SigType20=Analog -OutputList2Cue21=an_act10 -OutputList2SigType21=Analog -OutputList2Cue22=an_act11 -OutputList2SigType22=Analog -OutputList2Cue23=an_act12 -OutputList2SigType23=Analog -OutputList2Cue24=[~EndGroup~]an_act -OutputList2SigType24=Analog -InputList3Cue1=[~UNUSED2~] -InputList3SigType1=Serial -InputList3Cue2=[~UNUSED2~] -InputList3SigType2=Serial -InputList3Cue3=[~UNUSED2~] -InputList3SigType3=Serial -InputList3Cue4=[~UNUSED2~] -InputList3SigType4=Serial -InputList3Cue5=[~UNUSED2~] -InputList3SigType5=Serial -InputList3Cue6=[~UNUSED2~] -InputList3SigType6=Serial -InputList3Cue7=[~UNUSED2~] -InputList3SigType7=Serial -InputList3Cue8=[~UNUSED2~] -InputList3SigType8=Serial -InputList3Cue9=[~UNUSED2~] -InputList3SigType9=Serial -InputList3Cue10=[~UNUSED2~] -InputList3SigType10=Serial -InputList3Cue11=[~BeginGroup~]text-o -InputList3SigType11=Serial -InputList3Cue12=text-o1 -InputList3SigType12=Serial -InputList3Cue13=text-o2 -InputList3SigType13=Serial -InputList3Cue14=text-o3 -InputList3SigType14=Serial -InputList3Cue15=text-o4 -InputList3SigType15=Serial -InputList3Cue16=text-o5 -InputList3SigType16=Serial -InputList3Cue17=text-o6 -InputList3SigType17=Serial -InputList3Cue18=text-o7 -InputList3SigType18=Serial -InputList3Cue19=text-o8 -InputList3SigType19=Serial -InputList3Cue20=text-o9 -InputList3SigType20=Serial -InputList3Cue21=text-o10 -InputList3SigType21=Serial -InputList3Cue22=text-o11 -InputList3SigType22=Serial -InputList3Cue23=text-o12 -InputList3SigType23=Serial -InputList3Cue24=[~EndGroup~]text-o -InputList3SigType24=Serial -OutputList3Cue1=[~UNUSED2~] -OutputList3SigType1=Serial -OutputList3Cue2=[~UNUSED2~] -OutputList3SigType2=Serial -OutputList3Cue3=[~UNUSED2~] -OutputList3SigType3=Serial -OutputList3Cue4=[~UNUSED2~] -OutputList3SigType4=Serial -OutputList3Cue5=[~UNUSED2~] -OutputList3SigType5=Serial -OutputList3Cue6=[~UNUSED2~] -OutputList3SigType6=Serial -OutputList3Cue7=[~UNUSED2~] -OutputList3SigType7=Serial -OutputList3Cue8=[~UNUSED2~] -OutputList3SigType8=Serial -OutputList3Cue9=[~UNUSED2~] -OutputList3SigType9=Serial -OutputList3Cue10=[~UNUSED2~] -OutputList3SigType10=Serial -OutputList3Cue11=[~BeginGroup~]text-i -OutputList3SigType11=Serial -OutputList3Cue12=text-i1 -OutputList3SigType12=Serial -OutputList3Cue13=text-i2 -OutputList3SigType13=Serial -OutputList3Cue14=text-i3 -OutputList3SigType14=Serial -OutputList3Cue15=text-i4 -OutputList3SigType15=Serial -OutputList3Cue16=text-i5 -OutputList3SigType16=Serial -OutputList3Cue17=text-i6 -OutputList3SigType17=Serial -OutputList3Cue18=text-i7 -OutputList3SigType18=Serial -OutputList3Cue19=text-i8 -OutputList3SigType19=Serial -OutputList3Cue20=text-i9 -OutputList3SigType20=Serial -OutputList3Cue21=text-i10 -OutputList3SigType21=Serial -OutputList3Cue22=text-i11 -OutputList3SigType22=Serial -OutputList3Cue23=text-i12 -OutputList3SigType23=Serial -OutputList3Cue24=[~EndGroup~]text-i -OutputList3SigType24=Serial -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=9 -CedH=9 -SmartObjId=15022d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=9 -Tp=1 -HD=TRUE -DV=15022d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=9 -Name=PepperDash Essentials iPad_[A.Global] Activity Footer SRL_Modes Bottom Bar SRL.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials iPad_[B.AV] Object - Presets_CATV Icon List Vertical.ced -Hint=CATV Icon List Vertical (Smart Object ID=10012) -Code=10 -SGControlType=Subpage Reference List Vertical -SGControlName=CATV Icon List Vertical -GUID=B34C4DC0-DD10-4C49-AEBA-F968934EFDC6 -SmplCName=PepperDash Essentials iPad_[B.AV] Object - Presets_CATV Icon List Vertical.ced -SMWRev=4.02.20 -Expand=expand_random -HelpID=10125 -Render=8 -;Define the number of inputs, outputs and parameters -MinVariableInputs=4316 -MaxVariableInputs=4316 -MinVariableOutputs=4316 -MaxVariableOutputs=4316 -NumFixedParams=1 -MinVariableInputsList2=3 -MaxVariableInputsList2=3 -MinVariableOutputsList2=3 -MaxVariableOutputsList2=3 -MinVariableInputsList3=412 -MaxVariableInputsList3=412 -MinVariableOutputsList3=412 -MaxVariableOutputsList3=412 -InputSigType1=Digital -OutputSigType1=Digital -InputList2SigType1=Analog -OutputList2SigType1=Analog -InputList3SigType1=Serial -OutputList3SigType1=Serial - -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -InputCue2=[~UNUSED2~] -InputSigType2=Digital -InputCue3=[~UNUSED2~] -InputSigType3=Digital -InputCue4=[~UNUSED2~] -InputSigType4=Digital -InputCue5=[~UNUSED2~] -InputSigType5=Digital -InputCue6=[~UNUSED2~] -InputSigType6=Digital -InputCue7=[~UNUSED2~] -InputSigType7=Digital -InputCue8=[~UNUSED2~] -InputSigType8=Digital -InputCue9=[~UNUSED2~] -InputSigType9=Digital -InputCue10=[~UNUSED2~] -InputSigType10=Digital -InputCue11=[~BeginGroup~]Enable -InputSigType11=Digital -InputCue12=Item 1 Enable -InputSigType12=Digital -InputCue13=Item 2 Enable -InputSigType13=Digital -InputCue14=Item 3 Enable -InputSigType14=Digital -InputCue15=Item 4 Enable -InputSigType15=Digital -InputCue16=Item 5 Enable -InputSigType16=Digital -InputCue17=Item 6 Enable -InputSigType17=Digital -InputCue18=Item 7 Enable -InputSigType18=Digital -InputCue19=Item 8 Enable -InputSigType19=Digital -InputCue20=Item 9 Enable -InputSigType20=Digital -InputCue21=Item 10 Enable -InputSigType21=Digital -InputCue22=Item 11 Enable -InputSigType22=Digital -InputCue23=Item 12 Enable -InputSigType23=Digital -InputCue24=Item 13 Enable -InputSigType24=Digital -InputCue25=Item 14 Enable -InputSigType25=Digital -InputCue26=Item 15 Enable -InputSigType26=Digital -InputCue27=Item 16 Enable -InputSigType27=Digital -InputCue28=Item 17 Enable -InputSigType28=Digital -InputCue29=Item 18 Enable -InputSigType29=Digital -InputCue30=Item 19 Enable -InputSigType30=Digital -InputCue31=Item 20 Enable -InputSigType31=Digital -InputCue32=Item 21 Enable -InputSigType32=Digital -InputCue33=Item 22 Enable -InputSigType33=Digital -InputCue34=Item 23 Enable -InputSigType34=Digital -InputCue35=Item 24 Enable -InputSigType35=Digital -InputCue36=Item 25 Enable -InputSigType36=Digital -InputCue37=Item 26 Enable -InputSigType37=Digital -InputCue38=Item 27 Enable -InputSigType38=Digital -InputCue39=Item 28 Enable -InputSigType39=Digital -InputCue40=Item 29 Enable -InputSigType40=Digital -InputCue41=Item 30 Enable -InputSigType41=Digital -InputCue42=Item 31 Enable -InputSigType42=Digital -InputCue43=Item 32 Enable -InputSigType43=Digital -InputCue44=Item 33 Enable -InputSigType44=Digital -InputCue45=Item 34 Enable -InputSigType45=Digital -InputCue46=Item 35 Enable -InputSigType46=Digital -InputCue47=Item 36 Enable -InputSigType47=Digital -InputCue48=Item 37 Enable -InputSigType48=Digital -InputCue49=Item 38 Enable -InputSigType49=Digital -InputCue50=Item 39 Enable -InputSigType50=Digital -InputCue51=Item 40 Enable -InputSigType51=Digital -InputCue52=Item 41 Enable -InputSigType52=Digital -InputCue53=Item 42 Enable -InputSigType53=Digital -InputCue54=Item 43 Enable -InputSigType54=Digital -InputCue55=Item 44 Enable -InputSigType55=Digital -InputCue56=Item 45 Enable -InputSigType56=Digital -InputCue57=Item 46 Enable -InputSigType57=Digital -InputCue58=Item 47 Enable -InputSigType58=Digital -InputCue59=Item 48 Enable -InputSigType59=Digital -InputCue60=Item 49 Enable -InputSigType60=Digital -InputCue61=Item 50 Enable -InputSigType61=Digital -InputCue62=Item 51 Enable -InputSigType62=Digital -InputCue63=Item 52 Enable -InputSigType63=Digital -InputCue64=Item 53 Enable -InputSigType64=Digital -InputCue65=Item 54 Enable -InputSigType65=Digital -InputCue66=Item 55 Enable -InputSigType66=Digital -InputCue67=Item 56 Enable -InputSigType67=Digital -InputCue68=Item 57 Enable -InputSigType68=Digital -InputCue69=Item 58 Enable -InputSigType69=Digital -InputCue70=Item 59 Enable -InputSigType70=Digital -InputCue71=Item 60 Enable -InputSigType71=Digital -InputCue72=Item 61 Enable -InputSigType72=Digital -InputCue73=Item 62 Enable -InputSigType73=Digital -InputCue74=Item 63 Enable -InputSigType74=Digital -InputCue75=Item 64 Enable -InputSigType75=Digital -InputCue76=Item 65 Enable -InputSigType76=Digital -InputCue77=Item 66 Enable -InputSigType77=Digital -InputCue78=Item 67 Enable -InputSigType78=Digital -InputCue79=Item 68 Enable -InputSigType79=Digital -InputCue80=Item 69 Enable -InputSigType80=Digital -InputCue81=Item 70 Enable -InputSigType81=Digital -InputCue82=Item 71 Enable -InputSigType82=Digital -InputCue83=Item 72 Enable -InputSigType83=Digital -InputCue84=Item 73 Enable -InputSigType84=Digital -InputCue85=Item 74 Enable -InputSigType85=Digital -InputCue86=Item 75 Enable -InputSigType86=Digital -InputCue87=Item 76 Enable -InputSigType87=Digital -InputCue88=Item 77 Enable -InputSigType88=Digital -InputCue89=Item 78 Enable -InputSigType89=Digital -InputCue90=Item 79 Enable -InputSigType90=Digital -InputCue91=Item 80 Enable -InputSigType91=Digital -InputCue92=Item 81 Enable -InputSigType92=Digital -InputCue93=Item 82 Enable -InputSigType93=Digital -InputCue94=Item 83 Enable -InputSigType94=Digital -InputCue95=Item 84 Enable -InputSigType95=Digital -InputCue96=Item 85 Enable -InputSigType96=Digital -InputCue97=Item 86 Enable -InputSigType97=Digital -InputCue98=Item 87 Enable -InputSigType98=Digital -InputCue99=Item 88 Enable -InputSigType99=Digital -InputCue100=Item 89 Enable -InputSigType100=Digital -InputCue101=Item 90 Enable -InputSigType101=Digital -InputCue102=Item 91 Enable -InputSigType102=Digital -InputCue103=Item 92 Enable -InputSigType103=Digital -InputCue104=Item 93 Enable -InputSigType104=Digital -InputCue105=Item 94 Enable -InputSigType105=Digital -InputCue106=Item 95 Enable -InputSigType106=Digital -InputCue107=Item 96 Enable -InputSigType107=Digital -InputCue108=Item 97 Enable -InputSigType108=Digital -InputCue109=Item 98 Enable -InputSigType109=Digital -InputCue110=Item 99 Enable -InputSigType110=Digital -InputCue111=Item 100 Enable -InputSigType111=Digital -InputCue112=[~UNUSED2~] -InputSigType112=Digital|Analog|Serial|String -InputCue2012=[~EndGroup~]Enable -InputSigType2012=Digital -InputCue2013=[~BeginGroup~]Visible -InputSigType2013=Digital -InputCue2014=Item 1 Visible -InputSigType2014=Digital -InputCue2015=Item 2 Visible -InputSigType2015=Digital -InputCue2016=Item 3 Visible -InputSigType2016=Digital -InputCue2017=Item 4 Visible -InputSigType2017=Digital -InputCue2018=Item 5 Visible -InputSigType2018=Digital -InputCue2019=Item 6 Visible -InputSigType2019=Digital -InputCue2020=Item 7 Visible -InputSigType2020=Digital -InputCue2021=Item 8 Visible -InputSigType2021=Digital -InputCue2022=Item 9 Visible -InputSigType2022=Digital -InputCue2023=Item 10 Visible -InputSigType2023=Digital -InputCue2024=Item 11 Visible -InputSigType2024=Digital -InputCue2025=Item 12 Visible -InputSigType2025=Digital -InputCue2026=Item 13 Visible -InputSigType2026=Digital -InputCue2027=Item 14 Visible -InputSigType2027=Digital -InputCue2028=Item 15 Visible -InputSigType2028=Digital -InputCue2029=Item 16 Visible -InputSigType2029=Digital -InputCue2030=Item 17 Visible -InputSigType2030=Digital -InputCue2031=Item 18 Visible -InputSigType2031=Digital -InputCue2032=Item 19 Visible -InputSigType2032=Digital -InputCue2033=Item 20 Visible -InputSigType2033=Digital -InputCue2034=Item 21 Visible -InputSigType2034=Digital -InputCue2035=Item 22 Visible -InputSigType2035=Digital -InputCue2036=Item 23 Visible -InputSigType2036=Digital -InputCue2037=Item 24 Visible -InputSigType2037=Digital -InputCue2038=Item 25 Visible -InputSigType2038=Digital -InputCue2039=Item 26 Visible -InputSigType2039=Digital -InputCue2040=Item 27 Visible -InputSigType2040=Digital -InputCue2041=Item 28 Visible -InputSigType2041=Digital -InputCue2042=Item 29 Visible -InputSigType2042=Digital -InputCue2043=Item 30 Visible -InputSigType2043=Digital -InputCue2044=Item 31 Visible -InputSigType2044=Digital -InputCue2045=Item 32 Visible -InputSigType2045=Digital -InputCue2046=Item 33 Visible -InputSigType2046=Digital -InputCue2047=Item 34 Visible -InputSigType2047=Digital -InputCue2048=Item 35 Visible -InputSigType2048=Digital -InputCue2049=Item 36 Visible -InputSigType2049=Digital -InputCue2050=Item 37 Visible -InputSigType2050=Digital -InputCue2051=Item 38 Visible -InputSigType2051=Digital -InputCue2052=Item 39 Visible -InputSigType2052=Digital -InputCue2053=Item 40 Visible -InputSigType2053=Digital -InputCue2054=Item 41 Visible -InputSigType2054=Digital -InputCue2055=Item 42 Visible -InputSigType2055=Digital -InputCue2056=Item 43 Visible -InputSigType2056=Digital -InputCue2057=Item 44 Visible -InputSigType2057=Digital -InputCue2058=Item 45 Visible -InputSigType2058=Digital -InputCue2059=Item 46 Visible -InputSigType2059=Digital -InputCue2060=Item 47 Visible -InputSigType2060=Digital -InputCue2061=Item 48 Visible -InputSigType2061=Digital -InputCue2062=Item 49 Visible -InputSigType2062=Digital -InputCue2063=Item 50 Visible -InputSigType2063=Digital -InputCue2064=Item 51 Visible -InputSigType2064=Digital -InputCue2065=Item 52 Visible -InputSigType2065=Digital -InputCue2066=Item 53 Visible -InputSigType2066=Digital -InputCue2067=Item 54 Visible -InputSigType2067=Digital -InputCue2068=Item 55 Visible -InputSigType2068=Digital -InputCue2069=Item 56 Visible -InputSigType2069=Digital -InputCue2070=Item 57 Visible -InputSigType2070=Digital -InputCue2071=Item 58 Visible -InputSigType2071=Digital -InputCue2072=Item 59 Visible -InputSigType2072=Digital -InputCue2073=Item 60 Visible -InputSigType2073=Digital -InputCue2074=Item 61 Visible -InputSigType2074=Digital -InputCue2075=Item 62 Visible -InputSigType2075=Digital -InputCue2076=Item 63 Visible -InputSigType2076=Digital -InputCue2077=Item 64 Visible -InputSigType2077=Digital -InputCue2078=Item 65 Visible -InputSigType2078=Digital -InputCue2079=Item 66 Visible -InputSigType2079=Digital -InputCue2080=Item 67 Visible -InputSigType2080=Digital -InputCue2081=Item 68 Visible -InputSigType2081=Digital -InputCue2082=Item 69 Visible -InputSigType2082=Digital -InputCue2083=Item 70 Visible -InputSigType2083=Digital -InputCue2084=Item 71 Visible -InputSigType2084=Digital -InputCue2085=Item 72 Visible -InputSigType2085=Digital -InputCue2086=Item 73 Visible -InputSigType2086=Digital -InputCue2087=Item 74 Visible -InputSigType2087=Digital -InputCue2088=Item 75 Visible -InputSigType2088=Digital -InputCue2089=Item 76 Visible -InputSigType2089=Digital -InputCue2090=Item 77 Visible -InputSigType2090=Digital -InputCue2091=Item 78 Visible -InputSigType2091=Digital -InputCue2092=Item 79 Visible -InputSigType2092=Digital -InputCue2093=Item 80 Visible -InputSigType2093=Digital -InputCue2094=Item 81 Visible -InputSigType2094=Digital -InputCue2095=Item 82 Visible -InputSigType2095=Digital -InputCue2096=Item 83 Visible -InputSigType2096=Digital -InputCue2097=Item 84 Visible -InputSigType2097=Digital -InputCue2098=Item 85 Visible -InputSigType2098=Digital -InputCue2099=Item 86 Visible -InputSigType2099=Digital -InputCue2100=Item 87 Visible -InputSigType2100=Digital -InputCue2101=Item 88 Visible -InputSigType2101=Digital -InputCue2102=Item 89 Visible -InputSigType2102=Digital -InputCue2103=Item 90 Visible -InputSigType2103=Digital -InputCue2104=Item 91 Visible -InputSigType2104=Digital -InputCue2105=Item 92 Visible -InputSigType2105=Digital -InputCue2106=Item 93 Visible -InputSigType2106=Digital -InputCue2107=Item 94 Visible -InputSigType2107=Digital -InputCue2108=Item 95 Visible -InputSigType2108=Digital -InputCue2109=Item 96 Visible -InputSigType2109=Digital -InputCue2110=Item 97 Visible -InputSigType2110=Digital -InputCue2111=Item 98 Visible -InputSigType2111=Digital -InputCue2112=Item 99 Visible -InputSigType2112=Digital -InputCue2113=Item 100 Visible -InputSigType2113=Digital -InputCue2114=[~UNUSED2~] -InputSigType2114=Digital|Analog|Serial|String -InputCue4014=[~EndGroup~]Visible -InputSigType4014=Digital -InputCue4015=[~BeginGroup~]fb -InputSigType4015=Digital -InputCue4016=fb1 -InputSigType4016=Digital -InputCue4017=fb2 -InputSigType4017=Digital -InputCue4018=fb3 -InputSigType4018=Digital -InputCue4019=fb4 -InputSigType4019=Digital -InputCue4020=fb5 -InputSigType4020=Digital -InputCue4021=fb6 -InputSigType4021=Digital -InputCue4022=fb7 -InputSigType4022=Digital -InputCue4023=fb8 -InputSigType4023=Digital -InputCue4024=fb9 -InputSigType4024=Digital -InputCue4025=fb10 -InputSigType4025=Digital -InputCue4026=fb11 -InputSigType4026=Digital -InputCue4027=fb12 -InputSigType4027=Digital -InputCue4028=fb13 -InputSigType4028=Digital -InputCue4029=fb14 -InputSigType4029=Digital -InputCue4030=fb15 -InputSigType4030=Digital -InputCue4031=fb16 -InputSigType4031=Digital -InputCue4032=fb17 -InputSigType4032=Digital -InputCue4033=fb18 -InputSigType4033=Digital -InputCue4034=fb19 -InputSigType4034=Digital -InputCue4035=fb20 -InputSigType4035=Digital -InputCue4036=fb21 -InputSigType4036=Digital -InputCue4037=fb22 -InputSigType4037=Digital -InputCue4038=fb23 -InputSigType4038=Digital -InputCue4039=fb24 -InputSigType4039=Digital -InputCue4040=fb25 -InputSigType4040=Digital -InputCue4041=fb26 -InputSigType4041=Digital -InputCue4042=fb27 -InputSigType4042=Digital -InputCue4043=fb28 -InputSigType4043=Digital -InputCue4044=fb29 -InputSigType4044=Digital -InputCue4045=fb30 -InputSigType4045=Digital -InputCue4046=fb31 -InputSigType4046=Digital -InputCue4047=fb32 -InputSigType4047=Digital -InputCue4048=fb33 -InputSigType4048=Digital -InputCue4049=fb34 -InputSigType4049=Digital -InputCue4050=fb35 -InputSigType4050=Digital -InputCue4051=fb36 -InputSigType4051=Digital -InputCue4052=fb37 -InputSigType4052=Digital -InputCue4053=fb38 -InputSigType4053=Digital -InputCue4054=fb39 -InputSigType4054=Digital -InputCue4055=fb40 -InputSigType4055=Digital -InputCue4056=fb41 -InputSigType4056=Digital -InputCue4057=fb42 -InputSigType4057=Digital -InputCue4058=fb43 -InputSigType4058=Digital -InputCue4059=fb44 -InputSigType4059=Digital -InputCue4060=fb45 -InputSigType4060=Digital -InputCue4061=fb46 -InputSigType4061=Digital -InputCue4062=fb47 -InputSigType4062=Digital -InputCue4063=fb48 -InputSigType4063=Digital -InputCue4064=fb49 -InputSigType4064=Digital -InputCue4065=fb50 -InputSigType4065=Digital -InputCue4066=fb51 -InputSigType4066=Digital -InputCue4067=fb52 -InputSigType4067=Digital -InputCue4068=fb53 -InputSigType4068=Digital -InputCue4069=fb54 -InputSigType4069=Digital -InputCue4070=fb55 -InputSigType4070=Digital -InputCue4071=fb56 -InputSigType4071=Digital -InputCue4072=fb57 -InputSigType4072=Digital -InputCue4073=fb58 -InputSigType4073=Digital -InputCue4074=fb59 -InputSigType4074=Digital -InputCue4075=fb60 -InputSigType4075=Digital -InputCue4076=fb61 -InputSigType4076=Digital -InputCue4077=fb62 -InputSigType4077=Digital -InputCue4078=fb63 -InputSigType4078=Digital -InputCue4079=fb64 -InputSigType4079=Digital -InputCue4080=fb65 -InputSigType4080=Digital -InputCue4081=fb66 -InputSigType4081=Digital -InputCue4082=fb67 -InputSigType4082=Digital -InputCue4083=fb68 -InputSigType4083=Digital -InputCue4084=fb69 -InputSigType4084=Digital -InputCue4085=fb70 -InputSigType4085=Digital -InputCue4086=fb71 -InputSigType4086=Digital -InputCue4087=fb72 -InputSigType4087=Digital -InputCue4088=fb73 -InputSigType4088=Digital -InputCue4089=fb74 -InputSigType4089=Digital -InputCue4090=fb75 -InputSigType4090=Digital -InputCue4091=fb76 -InputSigType4091=Digital -InputCue4092=fb77 -InputSigType4092=Digital -InputCue4093=fb78 -InputSigType4093=Digital -InputCue4094=fb79 -InputSigType4094=Digital -InputCue4095=fb80 -InputSigType4095=Digital -InputCue4096=fb81 -InputSigType4096=Digital -InputCue4097=fb82 -InputSigType4097=Digital -InputCue4098=fb83 -InputSigType4098=Digital -InputCue4099=fb84 -InputSigType4099=Digital -InputCue4100=fb85 -InputSigType4100=Digital -InputCue4101=fb86 -InputSigType4101=Digital -InputCue4102=fb87 -InputSigType4102=Digital -InputCue4103=fb88 -InputSigType4103=Digital -InputCue4104=fb89 -InputSigType4104=Digital -InputCue4105=fb90 -InputSigType4105=Digital -InputCue4106=fb91 -InputSigType4106=Digital -InputCue4107=fb92 -InputSigType4107=Digital -InputCue4108=fb93 -InputSigType4108=Digital -InputCue4109=fb94 -InputSigType4109=Digital -InputCue4110=fb95 -InputSigType4110=Digital -InputCue4111=fb96 -InputSigType4111=Digital -InputCue4112=fb97 -InputSigType4112=Digital -InputCue4113=fb98 -InputSigType4113=Digital -InputCue4114=fb99 -InputSigType4114=Digital -InputCue4115=fb100 -InputSigType4115=Digital -InputCue4116=fb101 -InputSigType4116=Digital -InputCue4117=fb102 -InputSigType4117=Digital -InputCue4118=fb103 -InputSigType4118=Digital -InputCue4119=fb104 -InputSigType4119=Digital -InputCue4120=fb105 -InputSigType4120=Digital -InputCue4121=fb106 -InputSigType4121=Digital -InputCue4122=fb107 -InputSigType4122=Digital -InputCue4123=fb108 -InputSigType4123=Digital -InputCue4124=fb109 -InputSigType4124=Digital -InputCue4125=fb110 -InputSigType4125=Digital -InputCue4126=fb111 -InputSigType4126=Digital -InputCue4127=fb112 -InputSigType4127=Digital -InputCue4128=fb113 -InputSigType4128=Digital -InputCue4129=fb114 -InputSigType4129=Digital -InputCue4130=fb115 -InputSigType4130=Digital -InputCue4131=fb116 -InputSigType4131=Digital -InputCue4132=fb117 -InputSigType4132=Digital -InputCue4133=fb118 -InputSigType4133=Digital -InputCue4134=fb119 -InputSigType4134=Digital -InputCue4135=fb120 -InputSigType4135=Digital -InputCue4136=fb121 -InputSigType4136=Digital -InputCue4137=fb122 -InputSigType4137=Digital -InputCue4138=fb123 -InputSigType4138=Digital -InputCue4139=fb124 -InputSigType4139=Digital -InputCue4140=fb125 -InputSigType4140=Digital -InputCue4141=fb126 -InputSigType4141=Digital -InputCue4142=fb127 -InputSigType4142=Digital -InputCue4143=fb128 -InputSigType4143=Digital -InputCue4144=fb129 -InputSigType4144=Digital -InputCue4145=fb130 -InputSigType4145=Digital -InputCue4146=fb131 -InputSigType4146=Digital -InputCue4147=fb132 -InputSigType4147=Digital -InputCue4148=fb133 -InputSigType4148=Digital -InputCue4149=fb134 -InputSigType4149=Digital -InputCue4150=fb135 -InputSigType4150=Digital -InputCue4151=fb136 -InputSigType4151=Digital -InputCue4152=fb137 -InputSigType4152=Digital -InputCue4153=fb138 -InputSigType4153=Digital -InputCue4154=fb139 -InputSigType4154=Digital -InputCue4155=fb140 -InputSigType4155=Digital -InputCue4156=fb141 -InputSigType4156=Digital -InputCue4157=fb142 -InputSigType4157=Digital -InputCue4158=fb143 -InputSigType4158=Digital -InputCue4159=fb144 -InputSigType4159=Digital -InputCue4160=fb145 -InputSigType4160=Digital -InputCue4161=fb146 -InputSigType4161=Digital -InputCue4162=fb147 -InputSigType4162=Digital -InputCue4163=fb148 -InputSigType4163=Digital -InputCue4164=fb149 -InputSigType4164=Digital -InputCue4165=fb150 -InputSigType4165=Digital -InputCue4166=fb151 -InputSigType4166=Digital -InputCue4167=fb152 -InputSigType4167=Digital -InputCue4168=fb153 -InputSigType4168=Digital -InputCue4169=fb154 -InputSigType4169=Digital -InputCue4170=fb155 -InputSigType4170=Digital -InputCue4171=fb156 -InputSigType4171=Digital -InputCue4172=fb157 -InputSigType4172=Digital -InputCue4173=fb158 -InputSigType4173=Digital -InputCue4174=fb159 -InputSigType4174=Digital -InputCue4175=fb160 -InputSigType4175=Digital -InputCue4176=fb161 -InputSigType4176=Digital -InputCue4177=fb162 -InputSigType4177=Digital -InputCue4178=fb163 -InputSigType4178=Digital -InputCue4179=fb164 -InputSigType4179=Digital -InputCue4180=fb165 -InputSigType4180=Digital -InputCue4181=fb166 -InputSigType4181=Digital -InputCue4182=fb167 -InputSigType4182=Digital -InputCue4183=fb168 -InputSigType4183=Digital -InputCue4184=fb169 -InputSigType4184=Digital -InputCue4185=fb170 -InputSigType4185=Digital -InputCue4186=fb171 -InputSigType4186=Digital -InputCue4187=fb172 -InputSigType4187=Digital -InputCue4188=fb173 -InputSigType4188=Digital -InputCue4189=fb174 -InputSigType4189=Digital -InputCue4190=fb175 -InputSigType4190=Digital -InputCue4191=fb176 -InputSigType4191=Digital -InputCue4192=fb177 -InputSigType4192=Digital -InputCue4193=fb178 -InputSigType4193=Digital -InputCue4194=fb179 -InputSigType4194=Digital -InputCue4195=fb180 -InputSigType4195=Digital -InputCue4196=fb181 -InputSigType4196=Digital -InputCue4197=fb182 -InputSigType4197=Digital -InputCue4198=fb183 -InputSigType4198=Digital -InputCue4199=fb184 -InputSigType4199=Digital -InputCue4200=fb185 -InputSigType4200=Digital -InputCue4201=fb186 -InputSigType4201=Digital -InputCue4202=fb187 -InputSigType4202=Digital -InputCue4203=fb188 -InputSigType4203=Digital -InputCue4204=fb189 -InputSigType4204=Digital -InputCue4205=fb190 -InputSigType4205=Digital -InputCue4206=fb191 -InputSigType4206=Digital -InputCue4207=fb192 -InputSigType4207=Digital -InputCue4208=fb193 -InputSigType4208=Digital -InputCue4209=fb194 -InputSigType4209=Digital -InputCue4210=fb195 -InputSigType4210=Digital -InputCue4211=fb196 -InputSigType4211=Digital -InputCue4212=fb197 -InputSigType4212=Digital -InputCue4213=fb198 -InputSigType4213=Digital -InputCue4214=fb199 -InputSigType4214=Digital -InputCue4215=fb200 -InputSigType4215=Digital -InputCue4216=fb201 -InputSigType4216=Digital -InputCue4217=fb202 -InputSigType4217=Digital -InputCue4218=fb203 -InputSigType4218=Digital -InputCue4219=fb204 -InputSigType4219=Digital -InputCue4220=fb205 -InputSigType4220=Digital -InputCue4221=fb206 -InputSigType4221=Digital -InputCue4222=fb207 -InputSigType4222=Digital -InputCue4223=fb208 -InputSigType4223=Digital -InputCue4224=fb209 -InputSigType4224=Digital -InputCue4225=fb210 -InputSigType4225=Digital -InputCue4226=fb211 -InputSigType4226=Digital -InputCue4227=fb212 -InputSigType4227=Digital -InputCue4228=fb213 -InputSigType4228=Digital -InputCue4229=fb214 -InputSigType4229=Digital -InputCue4230=fb215 -InputSigType4230=Digital -InputCue4231=fb216 -InputSigType4231=Digital -InputCue4232=fb217 -InputSigType4232=Digital -InputCue4233=fb218 -InputSigType4233=Digital -InputCue4234=fb219 -InputSigType4234=Digital -InputCue4235=fb220 -InputSigType4235=Digital -InputCue4236=fb221 -InputSigType4236=Digital -InputCue4237=fb222 -InputSigType4237=Digital -InputCue4238=fb223 -InputSigType4238=Digital -InputCue4239=fb224 -InputSigType4239=Digital -InputCue4240=fb225 -InputSigType4240=Digital -InputCue4241=fb226 -InputSigType4241=Digital -InputCue4242=fb227 -InputSigType4242=Digital -InputCue4243=fb228 -InputSigType4243=Digital -InputCue4244=fb229 -InputSigType4244=Digital -InputCue4245=fb230 -InputSigType4245=Digital -InputCue4246=fb231 -InputSigType4246=Digital -InputCue4247=fb232 -InputSigType4247=Digital -InputCue4248=fb233 -InputSigType4248=Digital -InputCue4249=fb234 -InputSigType4249=Digital -InputCue4250=fb235 -InputSigType4250=Digital -InputCue4251=fb236 -InputSigType4251=Digital -InputCue4252=fb237 -InputSigType4252=Digital -InputCue4253=fb238 -InputSigType4253=Digital -InputCue4254=fb239 -InputSigType4254=Digital -InputCue4255=fb240 -InputSigType4255=Digital -InputCue4256=fb241 -InputSigType4256=Digital -InputCue4257=fb242 -InputSigType4257=Digital -InputCue4258=fb243 -InputSigType4258=Digital -InputCue4259=fb244 -InputSigType4259=Digital -InputCue4260=fb245 -InputSigType4260=Digital -InputCue4261=fb246 -InputSigType4261=Digital -InputCue4262=fb247 -InputSigType4262=Digital -InputCue4263=fb248 -InputSigType4263=Digital -InputCue4264=fb249 -InputSigType4264=Digital -InputCue4265=fb250 -InputSigType4265=Digital -InputCue4266=fb251 -InputSigType4266=Digital -InputCue4267=fb252 -InputSigType4267=Digital -InputCue4268=fb253 -InputSigType4268=Digital -InputCue4269=fb254 -InputSigType4269=Digital -InputCue4270=fb255 -InputSigType4270=Digital -InputCue4271=fb256 -InputSigType4271=Digital -InputCue4272=fb257 -InputSigType4272=Digital -InputCue4273=fb258 -InputSigType4273=Digital -InputCue4274=fb259 -InputSigType4274=Digital -InputCue4275=fb260 -InputSigType4275=Digital -InputCue4276=fb261 -InputSigType4276=Digital -InputCue4277=fb262 -InputSigType4277=Digital -InputCue4278=fb263 -InputSigType4278=Digital -InputCue4279=fb264 -InputSigType4279=Digital -InputCue4280=fb265 -InputSigType4280=Digital -InputCue4281=fb266 -InputSigType4281=Digital -InputCue4282=fb267 -InputSigType4282=Digital -InputCue4283=fb268 -InputSigType4283=Digital -InputCue4284=fb269 -InputSigType4284=Digital -InputCue4285=fb270 -InputSigType4285=Digital -InputCue4286=fb271 -InputSigType4286=Digital -InputCue4287=fb272 -InputSigType4287=Digital -InputCue4288=fb273 -InputSigType4288=Digital -InputCue4289=fb274 -InputSigType4289=Digital -InputCue4290=fb275 -InputSigType4290=Digital -InputCue4291=fb276 -InputSigType4291=Digital -InputCue4292=fb277 -InputSigType4292=Digital -InputCue4293=fb278 -InputSigType4293=Digital -InputCue4294=fb279 -InputSigType4294=Digital -InputCue4295=fb280 -InputSigType4295=Digital -InputCue4296=fb281 -InputSigType4296=Digital -InputCue4297=fb282 -InputSigType4297=Digital -InputCue4298=fb283 -InputSigType4298=Digital -InputCue4299=fb284 -InputSigType4299=Digital -InputCue4300=fb285 -InputSigType4300=Digital -InputCue4301=fb286 -InputSigType4301=Digital -InputCue4302=fb287 -InputSigType4302=Digital -InputCue4303=fb288 -InputSigType4303=Digital -InputCue4304=fb289 -InputSigType4304=Digital -InputCue4305=fb290 -InputSigType4305=Digital -InputCue4306=fb291 -InputSigType4306=Digital -InputCue4307=fb292 -InputSigType4307=Digital -InputCue4308=fb293 -InputSigType4308=Digital -InputCue4309=fb294 -InputSigType4309=Digital -InputCue4310=fb295 -InputSigType4310=Digital -InputCue4311=fb296 -InputSigType4311=Digital -InputCue4312=fb297 -InputSigType4312=Digital -InputCue4313=fb298 -InputSigType4313=Digital -InputCue4314=fb299 -InputSigType4314=Digital -InputCue4315=fb300 -InputSigType4315=Digital -InputCue4316=[~EndGroup~]fb -InputSigType4316=Digital -OutputCue1=Is Moving -OutputSigType1=Digital -OutputCue2=[~UNUSED2~] -OutputSigType2=Digital -OutputCue3=[~UNUSED2~] -OutputSigType3=Digital -OutputCue4=[~UNUSED2~] -OutputSigType4=Digital -OutputCue5=[~UNUSED2~] -OutputSigType5=Digital -OutputCue6=[~UNUSED2~] -OutputSigType6=Digital -OutputCue7=[~UNUSED2~] -OutputSigType7=Digital -OutputCue8=[~UNUSED2~] -OutputSigType8=Digital -OutputCue9=[~UNUSED2~] -OutputSigType9=Digital -OutputCue10=[~UNUSED2~] -OutputSigType10=Digital -OutputCue11=[~BeginGroup~]Enable -OutputSigType11=Digital -OutputCue12=[~UNUSED3~] -OutputSigType12=Digital -OutputCue13=[~UNUSED3~] -OutputSigType13=Digital -OutputCue14=[~UNUSED3~] -OutputSigType14=Digital -OutputCue15=[~UNUSED3~] -OutputSigType15=Digital -OutputCue16=[~UNUSED3~] -OutputSigType16=Digital -OutputCue17=[~UNUSED3~] -OutputSigType17=Digital -OutputCue18=[~UNUSED3~] -OutputSigType18=Digital -OutputCue19=[~UNUSED3~] -OutputSigType19=Digital -OutputCue20=[~UNUSED3~] -OutputSigType20=Digital -OutputCue21=[~UNUSED3~] -OutputSigType21=Digital -OutputCue22=[~UNUSED3~] -OutputSigType22=Digital -OutputCue23=[~UNUSED3~] -OutputSigType23=Digital -OutputCue24=[~UNUSED3~] -OutputSigType24=Digital -OutputCue25=[~UNUSED3~] -OutputSigType25=Digital -OutputCue26=[~UNUSED3~] -OutputSigType26=Digital -OutputCue27=[~UNUSED3~] -OutputSigType27=Digital -OutputCue28=[~UNUSED3~] -OutputSigType28=Digital -OutputCue29=[~UNUSED3~] -OutputSigType29=Digital -OutputCue30=[~UNUSED3~] -OutputSigType30=Digital -OutputCue31=[~UNUSED3~] -OutputSigType31=Digital -OutputCue32=[~UNUSED3~] -OutputSigType32=Digital -OutputCue33=[~UNUSED3~] -OutputSigType33=Digital -OutputCue34=[~UNUSED3~] -OutputSigType34=Digital -OutputCue35=[~UNUSED3~] -OutputSigType35=Digital -OutputCue36=[~UNUSED3~] -OutputSigType36=Digital -OutputCue37=[~UNUSED3~] -OutputSigType37=Digital -OutputCue38=[~UNUSED3~] -OutputSigType38=Digital -OutputCue39=[~UNUSED3~] -OutputSigType39=Digital -OutputCue40=[~UNUSED3~] -OutputSigType40=Digital -OutputCue41=[~UNUSED3~] -OutputSigType41=Digital -OutputCue42=[~UNUSED3~] -OutputSigType42=Digital -OutputCue43=[~UNUSED3~] -OutputSigType43=Digital -OutputCue44=[~UNUSED3~] -OutputSigType44=Digital -OutputCue45=[~UNUSED3~] -OutputSigType45=Digital -OutputCue46=[~UNUSED3~] -OutputSigType46=Digital -OutputCue47=[~UNUSED3~] -OutputSigType47=Digital -OutputCue48=[~UNUSED3~] -OutputSigType48=Digital -OutputCue49=[~UNUSED3~] -OutputSigType49=Digital -OutputCue50=[~UNUSED3~] -OutputSigType50=Digital -OutputCue51=[~UNUSED3~] -OutputSigType51=Digital -OutputCue52=[~UNUSED3~] -OutputSigType52=Digital -OutputCue53=[~UNUSED3~] -OutputSigType53=Digital -OutputCue54=[~UNUSED3~] -OutputSigType54=Digital -OutputCue55=[~UNUSED3~] -OutputSigType55=Digital -OutputCue56=[~UNUSED3~] -OutputSigType56=Digital -OutputCue57=[~UNUSED3~] -OutputSigType57=Digital -OutputCue58=[~UNUSED3~] -OutputSigType58=Digital -OutputCue59=[~UNUSED3~] -OutputSigType59=Digital -OutputCue60=[~UNUSED3~] -OutputSigType60=Digital -OutputCue61=[~UNUSED3~] -OutputSigType61=Digital -OutputCue62=[~UNUSED3~] -OutputSigType62=Digital -OutputCue63=[~UNUSED3~] -OutputSigType63=Digital -OutputCue64=[~UNUSED3~] -OutputSigType64=Digital -OutputCue65=[~UNUSED3~] -OutputSigType65=Digital -OutputCue66=[~UNUSED3~] -OutputSigType66=Digital -OutputCue67=[~UNUSED3~] -OutputSigType67=Digital -OutputCue68=[~UNUSED3~] -OutputSigType68=Digital -OutputCue69=[~UNUSED3~] -OutputSigType69=Digital -OutputCue70=[~UNUSED3~] -OutputSigType70=Digital -OutputCue71=[~UNUSED3~] -OutputSigType71=Digital -OutputCue72=[~UNUSED3~] -OutputSigType72=Digital -OutputCue73=[~UNUSED3~] -OutputSigType73=Digital -OutputCue74=[~UNUSED3~] -OutputSigType74=Digital -OutputCue75=[~UNUSED3~] -OutputSigType75=Digital -OutputCue76=[~UNUSED3~] -OutputSigType76=Digital -OutputCue77=[~UNUSED3~] -OutputSigType77=Digital -OutputCue78=[~UNUSED3~] -OutputSigType78=Digital -OutputCue79=[~UNUSED3~] -OutputSigType79=Digital -OutputCue80=[~UNUSED3~] -OutputSigType80=Digital -OutputCue81=[~UNUSED3~] -OutputSigType81=Digital -OutputCue82=[~UNUSED3~] -OutputSigType82=Digital -OutputCue83=[~UNUSED3~] -OutputSigType83=Digital -OutputCue84=[~UNUSED3~] -OutputSigType84=Digital -OutputCue85=[~UNUSED3~] -OutputSigType85=Digital -OutputCue86=[~UNUSED3~] -OutputSigType86=Digital -OutputCue87=[~UNUSED3~] -OutputSigType87=Digital -OutputCue88=[~UNUSED3~] -OutputSigType88=Digital -OutputCue89=[~UNUSED3~] -OutputSigType89=Digital -OutputCue90=[~UNUSED3~] -OutputSigType90=Digital -OutputCue91=[~UNUSED3~] -OutputSigType91=Digital -OutputCue92=[~UNUSED3~] -OutputSigType92=Digital -OutputCue93=[~UNUSED3~] -OutputSigType93=Digital -OutputCue94=[~UNUSED3~] -OutputSigType94=Digital -OutputCue95=[~UNUSED3~] -OutputSigType95=Digital -OutputCue96=[~UNUSED3~] -OutputSigType96=Digital -OutputCue97=[~UNUSED3~] -OutputSigType97=Digital -OutputCue98=[~UNUSED3~] -OutputSigType98=Digital -OutputCue99=[~UNUSED3~] -OutputSigType99=Digital -OutputCue100=[~UNUSED3~] -OutputSigType100=Digital -OutputCue101=[~UNUSED3~] -OutputSigType101=Digital -OutputCue102=[~UNUSED3~] -OutputSigType102=Digital -OutputCue103=[~UNUSED3~] -OutputSigType103=Digital -OutputCue104=[~UNUSED3~] -OutputSigType104=Digital -OutputCue105=[~UNUSED3~] -OutputSigType105=Digital -OutputCue106=[~UNUSED3~] -OutputSigType106=Digital -OutputCue107=[~UNUSED3~] -OutputSigType107=Digital -OutputCue108=[~UNUSED3~] -OutputSigType108=Digital -OutputCue109=[~UNUSED3~] -OutputSigType109=Digital -OutputCue110=[~UNUSED3~] -OutputSigType110=Digital -OutputCue111=[~UNUSED3~] -OutputSigType111=Digital -OutputCue112=[~UNUSED2~] -OutputSigType112=Digital|Analog|Serial|String -OutputCue2012=[~EndGroup~]Enable -OutputSigType2012=Digital -OutputCue2013=[~BeginGroup~]Visible -OutputSigType2013=Digital -OutputCue2014=[~UNUSED3~] -OutputSigType2014=Digital -OutputCue2015=[~UNUSED3~] -OutputSigType2015=Digital -OutputCue2016=[~UNUSED3~] -OutputSigType2016=Digital -OutputCue2017=[~UNUSED3~] -OutputSigType2017=Digital -OutputCue2018=[~UNUSED3~] -OutputSigType2018=Digital -OutputCue2019=[~UNUSED3~] -OutputSigType2019=Digital -OutputCue2020=[~UNUSED3~] -OutputSigType2020=Digital -OutputCue2021=[~UNUSED3~] -OutputSigType2021=Digital -OutputCue2022=[~UNUSED3~] -OutputSigType2022=Digital -OutputCue2023=[~UNUSED3~] -OutputSigType2023=Digital -OutputCue2024=[~UNUSED3~] -OutputSigType2024=Digital -OutputCue2025=[~UNUSED3~] -OutputSigType2025=Digital -OutputCue2026=[~UNUSED3~] -OutputSigType2026=Digital -OutputCue2027=[~UNUSED3~] -OutputSigType2027=Digital -OutputCue2028=[~UNUSED3~] -OutputSigType2028=Digital -OutputCue2029=[~UNUSED3~] -OutputSigType2029=Digital -OutputCue2030=[~UNUSED3~] -OutputSigType2030=Digital -OutputCue2031=[~UNUSED3~] -OutputSigType2031=Digital -OutputCue2032=[~UNUSED3~] -OutputSigType2032=Digital -OutputCue2033=[~UNUSED3~] -OutputSigType2033=Digital -OutputCue2034=[~UNUSED3~] -OutputSigType2034=Digital -OutputCue2035=[~UNUSED3~] -OutputSigType2035=Digital -OutputCue2036=[~UNUSED3~] -OutputSigType2036=Digital -OutputCue2037=[~UNUSED3~] -OutputSigType2037=Digital -OutputCue2038=[~UNUSED3~] -OutputSigType2038=Digital -OutputCue2039=[~UNUSED3~] -OutputSigType2039=Digital -OutputCue2040=[~UNUSED3~] -OutputSigType2040=Digital -OutputCue2041=[~UNUSED3~] -OutputSigType2041=Digital -OutputCue2042=[~UNUSED3~] -OutputSigType2042=Digital -OutputCue2043=[~UNUSED3~] -OutputSigType2043=Digital -OutputCue2044=[~UNUSED3~] -OutputSigType2044=Digital -OutputCue2045=[~UNUSED3~] -OutputSigType2045=Digital -OutputCue2046=[~UNUSED3~] -OutputSigType2046=Digital -OutputCue2047=[~UNUSED3~] -OutputSigType2047=Digital -OutputCue2048=[~UNUSED3~] -OutputSigType2048=Digital -OutputCue2049=[~UNUSED3~] -OutputSigType2049=Digital -OutputCue2050=[~UNUSED3~] -OutputSigType2050=Digital -OutputCue2051=[~UNUSED3~] -OutputSigType2051=Digital -OutputCue2052=[~UNUSED3~] -OutputSigType2052=Digital -OutputCue2053=[~UNUSED3~] -OutputSigType2053=Digital -OutputCue2054=[~UNUSED3~] -OutputSigType2054=Digital -OutputCue2055=[~UNUSED3~] -OutputSigType2055=Digital -OutputCue2056=[~UNUSED3~] -OutputSigType2056=Digital -OutputCue2057=[~UNUSED3~] -OutputSigType2057=Digital -OutputCue2058=[~UNUSED3~] -OutputSigType2058=Digital -OutputCue2059=[~UNUSED3~] -OutputSigType2059=Digital -OutputCue2060=[~UNUSED3~] -OutputSigType2060=Digital -OutputCue2061=[~UNUSED3~] -OutputSigType2061=Digital -OutputCue2062=[~UNUSED3~] -OutputSigType2062=Digital -OutputCue2063=[~UNUSED3~] -OutputSigType2063=Digital -OutputCue2064=[~UNUSED3~] -OutputSigType2064=Digital -OutputCue2065=[~UNUSED3~] -OutputSigType2065=Digital -OutputCue2066=[~UNUSED3~] -OutputSigType2066=Digital -OutputCue2067=[~UNUSED3~] -OutputSigType2067=Digital -OutputCue2068=[~UNUSED3~] -OutputSigType2068=Digital -OutputCue2069=[~UNUSED3~] -OutputSigType2069=Digital -OutputCue2070=[~UNUSED3~] -OutputSigType2070=Digital -OutputCue2071=[~UNUSED3~] -OutputSigType2071=Digital -OutputCue2072=[~UNUSED3~] -OutputSigType2072=Digital -OutputCue2073=[~UNUSED3~] -OutputSigType2073=Digital -OutputCue2074=[~UNUSED3~] -OutputSigType2074=Digital -OutputCue2075=[~UNUSED3~] -OutputSigType2075=Digital -OutputCue2076=[~UNUSED3~] -OutputSigType2076=Digital -OutputCue2077=[~UNUSED3~] -OutputSigType2077=Digital -OutputCue2078=[~UNUSED3~] -OutputSigType2078=Digital -OutputCue2079=[~UNUSED3~] -OutputSigType2079=Digital -OutputCue2080=[~UNUSED3~] -OutputSigType2080=Digital -OutputCue2081=[~UNUSED3~] -OutputSigType2081=Digital -OutputCue2082=[~UNUSED3~] -OutputSigType2082=Digital -OutputCue2083=[~UNUSED3~] -OutputSigType2083=Digital -OutputCue2084=[~UNUSED3~] -OutputSigType2084=Digital -OutputCue2085=[~UNUSED3~] -OutputSigType2085=Digital -OutputCue2086=[~UNUSED3~] -OutputSigType2086=Digital -OutputCue2087=[~UNUSED3~] -OutputSigType2087=Digital -OutputCue2088=[~UNUSED3~] -OutputSigType2088=Digital -OutputCue2089=[~UNUSED3~] -OutputSigType2089=Digital -OutputCue2090=[~UNUSED3~] -OutputSigType2090=Digital -OutputCue2091=[~UNUSED3~] -OutputSigType2091=Digital -OutputCue2092=[~UNUSED3~] -OutputSigType2092=Digital -OutputCue2093=[~UNUSED3~] -OutputSigType2093=Digital -OutputCue2094=[~UNUSED3~] -OutputSigType2094=Digital -OutputCue2095=[~UNUSED3~] -OutputSigType2095=Digital -OutputCue2096=[~UNUSED3~] -OutputSigType2096=Digital -OutputCue2097=[~UNUSED3~] -OutputSigType2097=Digital -OutputCue2098=[~UNUSED3~] -OutputSigType2098=Digital -OutputCue2099=[~UNUSED3~] -OutputSigType2099=Digital -OutputCue2100=[~UNUSED3~] -OutputSigType2100=Digital -OutputCue2101=[~UNUSED3~] -OutputSigType2101=Digital -OutputCue2102=[~UNUSED3~] -OutputSigType2102=Digital -OutputCue2103=[~UNUSED3~] -OutputSigType2103=Digital -OutputCue2104=[~UNUSED3~] -OutputSigType2104=Digital -OutputCue2105=[~UNUSED3~] -OutputSigType2105=Digital -OutputCue2106=[~UNUSED3~] -OutputSigType2106=Digital -OutputCue2107=[~UNUSED3~] -OutputSigType2107=Digital -OutputCue2108=[~UNUSED3~] -OutputSigType2108=Digital -OutputCue2109=[~UNUSED3~] -OutputSigType2109=Digital -OutputCue2110=[~UNUSED3~] -OutputSigType2110=Digital -OutputCue2111=[~UNUSED3~] -OutputSigType2111=Digital -OutputCue2112=[~UNUSED3~] -OutputSigType2112=Digital -OutputCue2113=[~UNUSED3~] -OutputSigType2113=Digital -OutputCue2114=[~UNUSED2~] -OutputSigType2114=Digital|Analog|Serial|String -OutputCue4014=[~EndGroup~]Visible -OutputSigType4014=Digital -OutputCue4015=[~BeginGroup~]Press -OutputSigType4015=Digital -OutputCue4016=press1 -OutputSigType4016=Digital -OutputCue4017=press2 -OutputSigType4017=Digital -OutputCue4018=press3 -OutputSigType4018=Digital -OutputCue4019=press4 -OutputSigType4019=Digital -OutputCue4020=press5 -OutputSigType4020=Digital -OutputCue4021=press6 -OutputSigType4021=Digital -OutputCue4022=press7 -OutputSigType4022=Digital -OutputCue4023=press8 -OutputSigType4023=Digital -OutputCue4024=press9 -OutputSigType4024=Digital -OutputCue4025=press10 -OutputSigType4025=Digital -OutputCue4026=press11 -OutputSigType4026=Digital -OutputCue4027=press12 -OutputSigType4027=Digital -OutputCue4028=press13 -OutputSigType4028=Digital -OutputCue4029=press14 -OutputSigType4029=Digital -OutputCue4030=press15 -OutputSigType4030=Digital -OutputCue4031=press16 -OutputSigType4031=Digital -OutputCue4032=press17 -OutputSigType4032=Digital -OutputCue4033=press18 -OutputSigType4033=Digital -OutputCue4034=press19 -OutputSigType4034=Digital -OutputCue4035=press20 -OutputSigType4035=Digital -OutputCue4036=press21 -OutputSigType4036=Digital -OutputCue4037=press22 -OutputSigType4037=Digital -OutputCue4038=press23 -OutputSigType4038=Digital -OutputCue4039=press24 -OutputSigType4039=Digital -OutputCue4040=press25 -OutputSigType4040=Digital -OutputCue4041=press26 -OutputSigType4041=Digital -OutputCue4042=press27 -OutputSigType4042=Digital -OutputCue4043=press28 -OutputSigType4043=Digital -OutputCue4044=press29 -OutputSigType4044=Digital -OutputCue4045=press30 -OutputSigType4045=Digital -OutputCue4046=press31 -OutputSigType4046=Digital -OutputCue4047=press32 -OutputSigType4047=Digital -OutputCue4048=press33 -OutputSigType4048=Digital -OutputCue4049=press34 -OutputSigType4049=Digital -OutputCue4050=press35 -OutputSigType4050=Digital -OutputCue4051=press36 -OutputSigType4051=Digital -OutputCue4052=press37 -OutputSigType4052=Digital -OutputCue4053=press38 -OutputSigType4053=Digital -OutputCue4054=press39 -OutputSigType4054=Digital -OutputCue4055=press40 -OutputSigType4055=Digital -OutputCue4056=press41 -OutputSigType4056=Digital -OutputCue4057=press42 -OutputSigType4057=Digital -OutputCue4058=press43 -OutputSigType4058=Digital -OutputCue4059=press44 -OutputSigType4059=Digital -OutputCue4060=press45 -OutputSigType4060=Digital -OutputCue4061=press46 -OutputSigType4061=Digital -OutputCue4062=press47 -OutputSigType4062=Digital -OutputCue4063=press48 -OutputSigType4063=Digital -OutputCue4064=press49 -OutputSigType4064=Digital -OutputCue4065=press50 -OutputSigType4065=Digital -OutputCue4066=press51 -OutputSigType4066=Digital -OutputCue4067=press52 -OutputSigType4067=Digital -OutputCue4068=press53 -OutputSigType4068=Digital -OutputCue4069=press54 -OutputSigType4069=Digital -OutputCue4070=press55 -OutputSigType4070=Digital -OutputCue4071=press56 -OutputSigType4071=Digital -OutputCue4072=press57 -OutputSigType4072=Digital -OutputCue4073=press58 -OutputSigType4073=Digital -OutputCue4074=press59 -OutputSigType4074=Digital -OutputCue4075=press60 -OutputSigType4075=Digital -OutputCue4076=press61 -OutputSigType4076=Digital -OutputCue4077=press62 -OutputSigType4077=Digital -OutputCue4078=press63 -OutputSigType4078=Digital -OutputCue4079=press64 -OutputSigType4079=Digital -OutputCue4080=press65 -OutputSigType4080=Digital -OutputCue4081=press66 -OutputSigType4081=Digital -OutputCue4082=press67 -OutputSigType4082=Digital -OutputCue4083=press68 -OutputSigType4083=Digital -OutputCue4084=press69 -OutputSigType4084=Digital -OutputCue4085=press70 -OutputSigType4085=Digital -OutputCue4086=press71 -OutputSigType4086=Digital -OutputCue4087=press72 -OutputSigType4087=Digital -OutputCue4088=press73 -OutputSigType4088=Digital -OutputCue4089=press74 -OutputSigType4089=Digital -OutputCue4090=press75 -OutputSigType4090=Digital -OutputCue4091=press76 -OutputSigType4091=Digital -OutputCue4092=press77 -OutputSigType4092=Digital -OutputCue4093=press78 -OutputSigType4093=Digital -OutputCue4094=press79 -OutputSigType4094=Digital -OutputCue4095=press80 -OutputSigType4095=Digital -OutputCue4096=press81 -OutputSigType4096=Digital -OutputCue4097=press82 -OutputSigType4097=Digital -OutputCue4098=press83 -OutputSigType4098=Digital -OutputCue4099=press84 -OutputSigType4099=Digital -OutputCue4100=press85 -OutputSigType4100=Digital -OutputCue4101=press86 -OutputSigType4101=Digital -OutputCue4102=press87 -OutputSigType4102=Digital -OutputCue4103=press88 -OutputSigType4103=Digital -OutputCue4104=press89 -OutputSigType4104=Digital -OutputCue4105=press90 -OutputSigType4105=Digital -OutputCue4106=press91 -OutputSigType4106=Digital -OutputCue4107=press92 -OutputSigType4107=Digital -OutputCue4108=press93 -OutputSigType4108=Digital -OutputCue4109=press94 -OutputSigType4109=Digital -OutputCue4110=press95 -OutputSigType4110=Digital -OutputCue4111=press96 -OutputSigType4111=Digital -OutputCue4112=press97 -OutputSigType4112=Digital -OutputCue4113=press98 -OutputSigType4113=Digital -OutputCue4114=press99 -OutputSigType4114=Digital -OutputCue4115=press100 -OutputSigType4115=Digital -OutputCue4116=press101 -OutputSigType4116=Digital -OutputCue4117=press102 -OutputSigType4117=Digital -OutputCue4118=press103 -OutputSigType4118=Digital -OutputCue4119=press104 -OutputSigType4119=Digital -OutputCue4120=press105 -OutputSigType4120=Digital -OutputCue4121=press106 -OutputSigType4121=Digital -OutputCue4122=press107 -OutputSigType4122=Digital -OutputCue4123=press108 -OutputSigType4123=Digital -OutputCue4124=press109 -OutputSigType4124=Digital -OutputCue4125=press110 -OutputSigType4125=Digital -OutputCue4126=press111 -OutputSigType4126=Digital -OutputCue4127=press112 -OutputSigType4127=Digital -OutputCue4128=press113 -OutputSigType4128=Digital -OutputCue4129=press114 -OutputSigType4129=Digital -OutputCue4130=press115 -OutputSigType4130=Digital -OutputCue4131=press116 -OutputSigType4131=Digital -OutputCue4132=press117 -OutputSigType4132=Digital -OutputCue4133=press118 -OutputSigType4133=Digital -OutputCue4134=press119 -OutputSigType4134=Digital -OutputCue4135=press120 -OutputSigType4135=Digital -OutputCue4136=press121 -OutputSigType4136=Digital -OutputCue4137=press122 -OutputSigType4137=Digital -OutputCue4138=press123 -OutputSigType4138=Digital -OutputCue4139=press124 -OutputSigType4139=Digital -OutputCue4140=press125 -OutputSigType4140=Digital -OutputCue4141=press126 -OutputSigType4141=Digital -OutputCue4142=press127 -OutputSigType4142=Digital -OutputCue4143=press128 -OutputSigType4143=Digital -OutputCue4144=press129 -OutputSigType4144=Digital -OutputCue4145=press130 -OutputSigType4145=Digital -OutputCue4146=press131 -OutputSigType4146=Digital -OutputCue4147=press132 -OutputSigType4147=Digital -OutputCue4148=press133 -OutputSigType4148=Digital -OutputCue4149=press134 -OutputSigType4149=Digital -OutputCue4150=press135 -OutputSigType4150=Digital -OutputCue4151=press136 -OutputSigType4151=Digital -OutputCue4152=press137 -OutputSigType4152=Digital -OutputCue4153=press138 -OutputSigType4153=Digital -OutputCue4154=press139 -OutputSigType4154=Digital -OutputCue4155=press140 -OutputSigType4155=Digital -OutputCue4156=press141 -OutputSigType4156=Digital -OutputCue4157=press142 -OutputSigType4157=Digital -OutputCue4158=press143 -OutputSigType4158=Digital -OutputCue4159=press144 -OutputSigType4159=Digital -OutputCue4160=press145 -OutputSigType4160=Digital -OutputCue4161=press146 -OutputSigType4161=Digital -OutputCue4162=press147 -OutputSigType4162=Digital -OutputCue4163=press148 -OutputSigType4163=Digital -OutputCue4164=press149 -OutputSigType4164=Digital -OutputCue4165=press150 -OutputSigType4165=Digital -OutputCue4166=press151 -OutputSigType4166=Digital -OutputCue4167=press152 -OutputSigType4167=Digital -OutputCue4168=press153 -OutputSigType4168=Digital -OutputCue4169=press154 -OutputSigType4169=Digital -OutputCue4170=press155 -OutputSigType4170=Digital -OutputCue4171=press156 -OutputSigType4171=Digital -OutputCue4172=press157 -OutputSigType4172=Digital -OutputCue4173=press158 -OutputSigType4173=Digital -OutputCue4174=press159 -OutputSigType4174=Digital -OutputCue4175=press160 -OutputSigType4175=Digital -OutputCue4176=press161 -OutputSigType4176=Digital -OutputCue4177=press162 -OutputSigType4177=Digital -OutputCue4178=press163 -OutputSigType4178=Digital -OutputCue4179=press164 -OutputSigType4179=Digital -OutputCue4180=press165 -OutputSigType4180=Digital -OutputCue4181=press166 -OutputSigType4181=Digital -OutputCue4182=press167 -OutputSigType4182=Digital -OutputCue4183=press168 -OutputSigType4183=Digital -OutputCue4184=press169 -OutputSigType4184=Digital -OutputCue4185=press170 -OutputSigType4185=Digital -OutputCue4186=press171 -OutputSigType4186=Digital -OutputCue4187=press172 -OutputSigType4187=Digital -OutputCue4188=press173 -OutputSigType4188=Digital -OutputCue4189=press174 -OutputSigType4189=Digital -OutputCue4190=press175 -OutputSigType4190=Digital -OutputCue4191=press176 -OutputSigType4191=Digital -OutputCue4192=press177 -OutputSigType4192=Digital -OutputCue4193=press178 -OutputSigType4193=Digital -OutputCue4194=press179 -OutputSigType4194=Digital -OutputCue4195=press180 -OutputSigType4195=Digital -OutputCue4196=press181 -OutputSigType4196=Digital -OutputCue4197=press182 -OutputSigType4197=Digital -OutputCue4198=press183 -OutputSigType4198=Digital -OutputCue4199=press184 -OutputSigType4199=Digital -OutputCue4200=press185 -OutputSigType4200=Digital -OutputCue4201=press186 -OutputSigType4201=Digital -OutputCue4202=press187 -OutputSigType4202=Digital -OutputCue4203=press188 -OutputSigType4203=Digital -OutputCue4204=press189 -OutputSigType4204=Digital -OutputCue4205=press190 -OutputSigType4205=Digital -OutputCue4206=press191 -OutputSigType4206=Digital -OutputCue4207=press192 -OutputSigType4207=Digital -OutputCue4208=press193 -OutputSigType4208=Digital -OutputCue4209=press194 -OutputSigType4209=Digital -OutputCue4210=press195 -OutputSigType4210=Digital -OutputCue4211=press196 -OutputSigType4211=Digital -OutputCue4212=press197 -OutputSigType4212=Digital -OutputCue4213=press198 -OutputSigType4213=Digital -OutputCue4214=press199 -OutputSigType4214=Digital -OutputCue4215=press200 -OutputSigType4215=Digital -OutputCue4216=press201 -OutputSigType4216=Digital -OutputCue4217=press202 -OutputSigType4217=Digital -OutputCue4218=press203 -OutputSigType4218=Digital -OutputCue4219=press204 -OutputSigType4219=Digital -OutputCue4220=press205 -OutputSigType4220=Digital -OutputCue4221=press206 -OutputSigType4221=Digital -OutputCue4222=press207 -OutputSigType4222=Digital -OutputCue4223=press208 -OutputSigType4223=Digital -OutputCue4224=press209 -OutputSigType4224=Digital -OutputCue4225=press210 -OutputSigType4225=Digital -OutputCue4226=press211 -OutputSigType4226=Digital -OutputCue4227=press212 -OutputSigType4227=Digital -OutputCue4228=press213 -OutputSigType4228=Digital -OutputCue4229=press214 -OutputSigType4229=Digital -OutputCue4230=press215 -OutputSigType4230=Digital -OutputCue4231=press216 -OutputSigType4231=Digital -OutputCue4232=press217 -OutputSigType4232=Digital -OutputCue4233=press218 -OutputSigType4233=Digital -OutputCue4234=press219 -OutputSigType4234=Digital -OutputCue4235=press220 -OutputSigType4235=Digital -OutputCue4236=press221 -OutputSigType4236=Digital -OutputCue4237=press222 -OutputSigType4237=Digital -OutputCue4238=press223 -OutputSigType4238=Digital -OutputCue4239=press224 -OutputSigType4239=Digital -OutputCue4240=press225 -OutputSigType4240=Digital -OutputCue4241=press226 -OutputSigType4241=Digital -OutputCue4242=press227 -OutputSigType4242=Digital -OutputCue4243=press228 -OutputSigType4243=Digital -OutputCue4244=press229 -OutputSigType4244=Digital -OutputCue4245=press230 -OutputSigType4245=Digital -OutputCue4246=press231 -OutputSigType4246=Digital -OutputCue4247=press232 -OutputSigType4247=Digital -OutputCue4248=press233 -OutputSigType4248=Digital -OutputCue4249=press234 -OutputSigType4249=Digital -OutputCue4250=press235 -OutputSigType4250=Digital -OutputCue4251=press236 -OutputSigType4251=Digital -OutputCue4252=press237 -OutputSigType4252=Digital -OutputCue4253=press238 -OutputSigType4253=Digital -OutputCue4254=press239 -OutputSigType4254=Digital -OutputCue4255=press240 -OutputSigType4255=Digital -OutputCue4256=press241 -OutputSigType4256=Digital -OutputCue4257=press242 -OutputSigType4257=Digital -OutputCue4258=press243 -OutputSigType4258=Digital -OutputCue4259=press244 -OutputSigType4259=Digital -OutputCue4260=press245 -OutputSigType4260=Digital -OutputCue4261=press246 -OutputSigType4261=Digital -OutputCue4262=press247 -OutputSigType4262=Digital -OutputCue4263=press248 -OutputSigType4263=Digital -OutputCue4264=press249 -OutputSigType4264=Digital -OutputCue4265=press250 -OutputSigType4265=Digital -OutputCue4266=press251 -OutputSigType4266=Digital -OutputCue4267=press252 -OutputSigType4267=Digital -OutputCue4268=press253 -OutputSigType4268=Digital -OutputCue4269=press254 -OutputSigType4269=Digital -OutputCue4270=press255 -OutputSigType4270=Digital -OutputCue4271=press256 -OutputSigType4271=Digital -OutputCue4272=press257 -OutputSigType4272=Digital -OutputCue4273=press258 -OutputSigType4273=Digital -OutputCue4274=press259 -OutputSigType4274=Digital -OutputCue4275=press260 -OutputSigType4275=Digital -OutputCue4276=press261 -OutputSigType4276=Digital -OutputCue4277=press262 -OutputSigType4277=Digital -OutputCue4278=press263 -OutputSigType4278=Digital -OutputCue4279=press264 -OutputSigType4279=Digital -OutputCue4280=press265 -OutputSigType4280=Digital -OutputCue4281=press266 -OutputSigType4281=Digital -OutputCue4282=press267 -OutputSigType4282=Digital -OutputCue4283=press268 -OutputSigType4283=Digital -OutputCue4284=press269 -OutputSigType4284=Digital -OutputCue4285=press270 -OutputSigType4285=Digital -OutputCue4286=press271 -OutputSigType4286=Digital -OutputCue4287=press272 -OutputSigType4287=Digital -OutputCue4288=press273 -OutputSigType4288=Digital -OutputCue4289=press274 -OutputSigType4289=Digital -OutputCue4290=press275 -OutputSigType4290=Digital -OutputCue4291=press276 -OutputSigType4291=Digital -OutputCue4292=press277 -OutputSigType4292=Digital -OutputCue4293=press278 -OutputSigType4293=Digital -OutputCue4294=press279 -OutputSigType4294=Digital -OutputCue4295=press280 -OutputSigType4295=Digital -OutputCue4296=press281 -OutputSigType4296=Digital -OutputCue4297=press282 -OutputSigType4297=Digital -OutputCue4298=press283 -OutputSigType4298=Digital -OutputCue4299=press284 -OutputSigType4299=Digital -OutputCue4300=press285 -OutputSigType4300=Digital -OutputCue4301=press286 -OutputSigType4301=Digital -OutputCue4302=press287 -OutputSigType4302=Digital -OutputCue4303=press288 -OutputSigType4303=Digital -OutputCue4304=press289 -OutputSigType4304=Digital -OutputCue4305=press290 -OutputSigType4305=Digital -OutputCue4306=press291 -OutputSigType4306=Digital -OutputCue4307=press292 -OutputSigType4307=Digital -OutputCue4308=press293 -OutputSigType4308=Digital -OutputCue4309=press294 -OutputSigType4309=Digital -OutputCue4310=press295 -OutputSigType4310=Digital -OutputCue4311=press296 -OutputSigType4311=Digital -OutputCue4312=press297 -OutputSigType4312=Digital -OutputCue4313=press298 -OutputSigType4313=Digital -OutputCue4314=press299 -OutputSigType4314=Digital -OutputCue4315=press300 -OutputSigType4315=Digital -OutputCue4316=[~EndGroup~]Press -OutputSigType4316=Digital -InputList2Cue1=[~UNUSED3~] -InputList2SigType1=Analog -InputList2Cue2=Scroll To Item -InputList2SigType2=Analog -InputList2Cue3=Set Number of Items -InputList2SigType3=Analog -OutputList2Cue1=Item Clicked -OutputList2SigType1=Analog -OutputList2Cue2=[~UNUSED3~] -OutputList2SigType2=Analog -OutputList2Cue3=[~UNUSED3~] -OutputList2SigType3=Analog -InputList3Cue1=[~UNUSED2~] -InputList3SigType1=Serial -InputList3Cue2=[~UNUSED2~] -InputList3SigType2=Serial -InputList3Cue3=[~UNUSED2~] -InputList3SigType3=Serial -InputList3Cue4=[~UNUSED2~] -InputList3SigType4=Serial -InputList3Cue5=[~UNUSED2~] -InputList3SigType5=Serial -InputList3Cue6=[~UNUSED2~] -InputList3SigType6=Serial -InputList3Cue7=[~UNUSED2~] -InputList3SigType7=Serial -InputList3Cue8=[~UNUSED2~] -InputList3SigType8=Serial -InputList3Cue9=[~UNUSED2~] -InputList3SigType9=Serial -InputList3Cue10=[~UNUSED2~] -InputList3SigType10=Serial -InputList3Cue11=[~BeginGroup~]text-o -InputList3SigType11=Serial -InputList3Cue12=text-o1 -InputList3SigType12=Serial -InputList3Cue13=text-o2 -InputList3SigType13=Serial -InputList3Cue14=text-o3 -InputList3SigType14=Serial -InputList3Cue15=text-o4 -InputList3SigType15=Serial -InputList3Cue16=text-o5 -InputList3SigType16=Serial -InputList3Cue17=text-o6 -InputList3SigType17=Serial -InputList3Cue18=text-o7 -InputList3SigType18=Serial -InputList3Cue19=text-o8 -InputList3SigType19=Serial -InputList3Cue20=text-o9 -InputList3SigType20=Serial -InputList3Cue21=text-o10 -InputList3SigType21=Serial -InputList3Cue22=text-o11 -InputList3SigType22=Serial -InputList3Cue23=text-o12 -InputList3SigType23=Serial -InputList3Cue24=text-o13 -InputList3SigType24=Serial -InputList3Cue25=text-o14 -InputList3SigType25=Serial -InputList3Cue26=text-o15 -InputList3SigType26=Serial -InputList3Cue27=text-o16 -InputList3SigType27=Serial -InputList3Cue28=text-o17 -InputList3SigType28=Serial -InputList3Cue29=text-o18 -InputList3SigType29=Serial -InputList3Cue30=text-o19 -InputList3SigType30=Serial -InputList3Cue31=text-o20 -InputList3SigType31=Serial -InputList3Cue32=text-o21 -InputList3SigType32=Serial -InputList3Cue33=text-o22 -InputList3SigType33=Serial -InputList3Cue34=text-o23 -InputList3SigType34=Serial -InputList3Cue35=text-o24 -InputList3SigType35=Serial -InputList3Cue36=text-o25 -InputList3SigType36=Serial -InputList3Cue37=text-o26 -InputList3SigType37=Serial -InputList3Cue38=text-o27 -InputList3SigType38=Serial -InputList3Cue39=text-o28 -InputList3SigType39=Serial -InputList3Cue40=text-o29 -InputList3SigType40=Serial -InputList3Cue41=text-o30 -InputList3SigType41=Serial -InputList3Cue42=text-o31 -InputList3SigType42=Serial -InputList3Cue43=text-o32 -InputList3SigType43=Serial -InputList3Cue44=text-o33 -InputList3SigType44=Serial -InputList3Cue45=text-o34 -InputList3SigType45=Serial -InputList3Cue46=text-o35 -InputList3SigType46=Serial -InputList3Cue47=text-o36 -InputList3SigType47=Serial -InputList3Cue48=text-o37 -InputList3SigType48=Serial -InputList3Cue49=text-o38 -InputList3SigType49=Serial -InputList3Cue50=text-o39 -InputList3SigType50=Serial -InputList3Cue51=text-o40 -InputList3SigType51=Serial -InputList3Cue52=text-o41 -InputList3SigType52=Serial -InputList3Cue53=text-o42 -InputList3SigType53=Serial -InputList3Cue54=text-o43 -InputList3SigType54=Serial -InputList3Cue55=text-o44 -InputList3SigType55=Serial -InputList3Cue56=text-o45 -InputList3SigType56=Serial -InputList3Cue57=text-o46 -InputList3SigType57=Serial -InputList3Cue58=text-o47 -InputList3SigType58=Serial -InputList3Cue59=text-o48 -InputList3SigType59=Serial -InputList3Cue60=text-o49 -InputList3SigType60=Serial -InputList3Cue61=text-o50 -InputList3SigType61=Serial -InputList3Cue62=text-o51 -InputList3SigType62=Serial -InputList3Cue63=text-o52 -InputList3SigType63=Serial -InputList3Cue64=text-o53 -InputList3SigType64=Serial -InputList3Cue65=text-o54 -InputList3SigType65=Serial -InputList3Cue66=text-o55 -InputList3SigType66=Serial -InputList3Cue67=text-o56 -InputList3SigType67=Serial -InputList3Cue68=text-o57 -InputList3SigType68=Serial -InputList3Cue69=text-o58 -InputList3SigType69=Serial -InputList3Cue70=text-o59 -InputList3SigType70=Serial -InputList3Cue71=text-o60 -InputList3SigType71=Serial -InputList3Cue72=text-o61 -InputList3SigType72=Serial -InputList3Cue73=text-o62 -InputList3SigType73=Serial -InputList3Cue74=text-o63 -InputList3SigType74=Serial -InputList3Cue75=text-o64 -InputList3SigType75=Serial -InputList3Cue76=text-o65 -InputList3SigType76=Serial -InputList3Cue77=text-o66 -InputList3SigType77=Serial -InputList3Cue78=text-o67 -InputList3SigType78=Serial -InputList3Cue79=text-o68 -InputList3SigType79=Serial -InputList3Cue80=text-o69 -InputList3SigType80=Serial -InputList3Cue81=text-o70 -InputList3SigType81=Serial -InputList3Cue82=text-o71 -InputList3SigType82=Serial -InputList3Cue83=text-o72 -InputList3SigType83=Serial -InputList3Cue84=text-o73 -InputList3SigType84=Serial -InputList3Cue85=text-o74 -InputList3SigType85=Serial -InputList3Cue86=text-o75 -InputList3SigType86=Serial -InputList3Cue87=text-o76 -InputList3SigType87=Serial -InputList3Cue88=text-o77 -InputList3SigType88=Serial -InputList3Cue89=text-o78 -InputList3SigType89=Serial -InputList3Cue90=text-o79 -InputList3SigType90=Serial -InputList3Cue91=text-o80 -InputList3SigType91=Serial -InputList3Cue92=text-o81 -InputList3SigType92=Serial -InputList3Cue93=text-o82 -InputList3SigType93=Serial -InputList3Cue94=text-o83 -InputList3SigType94=Serial -InputList3Cue95=text-o84 -InputList3SigType95=Serial -InputList3Cue96=text-o85 -InputList3SigType96=Serial -InputList3Cue97=text-o86 -InputList3SigType97=Serial -InputList3Cue98=text-o87 -InputList3SigType98=Serial -InputList3Cue99=text-o88 -InputList3SigType99=Serial -InputList3Cue100=text-o89 -InputList3SigType100=Serial -InputList3Cue101=text-o90 -InputList3SigType101=Serial -InputList3Cue102=text-o91 -InputList3SigType102=Serial -InputList3Cue103=text-o92 -InputList3SigType103=Serial -InputList3Cue104=text-o93 -InputList3SigType104=Serial -InputList3Cue105=text-o94 -InputList3SigType105=Serial -InputList3Cue106=text-o95 -InputList3SigType106=Serial -InputList3Cue107=text-o96 -InputList3SigType107=Serial -InputList3Cue108=text-o97 -InputList3SigType108=Serial -InputList3Cue109=text-o98 -InputList3SigType109=Serial -InputList3Cue110=text-o99 -InputList3SigType110=Serial -InputList3Cue111=text-o100 -InputList3SigType111=Serial -InputList3Cue112=text-o101 -InputList3SigType112=Serial -InputList3Cue113=text-o102 -InputList3SigType113=Serial -InputList3Cue114=text-o103 -InputList3SigType114=Serial -InputList3Cue115=text-o104 -InputList3SigType115=Serial -InputList3Cue116=text-o105 -InputList3SigType116=Serial -InputList3Cue117=text-o106 -InputList3SigType117=Serial -InputList3Cue118=text-o107 -InputList3SigType118=Serial -InputList3Cue119=text-o108 -InputList3SigType119=Serial -InputList3Cue120=text-o109 -InputList3SigType120=Serial -InputList3Cue121=text-o110 -InputList3SigType121=Serial -InputList3Cue122=text-o111 -InputList3SigType122=Serial -InputList3Cue123=text-o112 -InputList3SigType123=Serial -InputList3Cue124=text-o113 -InputList3SigType124=Serial -InputList3Cue125=text-o114 -InputList3SigType125=Serial -InputList3Cue126=text-o115 -InputList3SigType126=Serial -InputList3Cue127=text-o116 -InputList3SigType127=Serial -InputList3Cue128=text-o117 -InputList3SigType128=Serial -InputList3Cue129=text-o118 -InputList3SigType129=Serial -InputList3Cue130=text-o119 -InputList3SigType130=Serial -InputList3Cue131=text-o120 -InputList3SigType131=Serial -InputList3Cue132=text-o121 -InputList3SigType132=Serial -InputList3Cue133=text-o122 -InputList3SigType133=Serial -InputList3Cue134=text-o123 -InputList3SigType134=Serial -InputList3Cue135=text-o124 -InputList3SigType135=Serial -InputList3Cue136=text-o125 -InputList3SigType136=Serial -InputList3Cue137=text-o126 -InputList3SigType137=Serial -InputList3Cue138=text-o127 -InputList3SigType138=Serial -InputList3Cue139=text-o128 -InputList3SigType139=Serial -InputList3Cue140=text-o129 -InputList3SigType140=Serial -InputList3Cue141=text-o130 -InputList3SigType141=Serial -InputList3Cue142=text-o131 -InputList3SigType142=Serial -InputList3Cue143=text-o132 -InputList3SigType143=Serial -InputList3Cue144=text-o133 -InputList3SigType144=Serial -InputList3Cue145=text-o134 -InputList3SigType145=Serial -InputList3Cue146=text-o135 -InputList3SigType146=Serial -InputList3Cue147=text-o136 -InputList3SigType147=Serial -InputList3Cue148=text-o137 -InputList3SigType148=Serial -InputList3Cue149=text-o138 -InputList3SigType149=Serial -InputList3Cue150=text-o139 -InputList3SigType150=Serial -InputList3Cue151=text-o140 -InputList3SigType151=Serial -InputList3Cue152=text-o141 -InputList3SigType152=Serial -InputList3Cue153=text-o142 -InputList3SigType153=Serial -InputList3Cue154=text-o143 -InputList3SigType154=Serial -InputList3Cue155=text-o144 -InputList3SigType155=Serial -InputList3Cue156=text-o145 -InputList3SigType156=Serial -InputList3Cue157=text-o146 -InputList3SigType157=Serial -InputList3Cue158=text-o147 -InputList3SigType158=Serial -InputList3Cue159=text-o148 -InputList3SigType159=Serial -InputList3Cue160=text-o149 -InputList3SigType160=Serial -InputList3Cue161=text-o150 -InputList3SigType161=Serial -InputList3Cue162=text-o151 -InputList3SigType162=Serial -InputList3Cue163=text-o152 -InputList3SigType163=Serial -InputList3Cue164=text-o153 -InputList3SigType164=Serial -InputList3Cue165=text-o154 -InputList3SigType165=Serial -InputList3Cue166=text-o155 -InputList3SigType166=Serial -InputList3Cue167=text-o156 -InputList3SigType167=Serial -InputList3Cue168=text-o157 -InputList3SigType168=Serial -InputList3Cue169=text-o158 -InputList3SigType169=Serial -InputList3Cue170=text-o159 -InputList3SigType170=Serial -InputList3Cue171=text-o160 -InputList3SigType171=Serial -InputList3Cue172=text-o161 -InputList3SigType172=Serial -InputList3Cue173=text-o162 -InputList3SigType173=Serial -InputList3Cue174=text-o163 -InputList3SigType174=Serial -InputList3Cue175=text-o164 -InputList3SigType175=Serial -InputList3Cue176=text-o165 -InputList3SigType176=Serial -InputList3Cue177=text-o166 -InputList3SigType177=Serial -InputList3Cue178=text-o167 -InputList3SigType178=Serial -InputList3Cue179=text-o168 -InputList3SigType179=Serial -InputList3Cue180=text-o169 -InputList3SigType180=Serial -InputList3Cue181=text-o170 -InputList3SigType181=Serial -InputList3Cue182=text-o171 -InputList3SigType182=Serial -InputList3Cue183=text-o172 -InputList3SigType183=Serial -InputList3Cue184=text-o173 -InputList3SigType184=Serial -InputList3Cue185=text-o174 -InputList3SigType185=Serial -InputList3Cue186=text-o175 -InputList3SigType186=Serial -InputList3Cue187=text-o176 -InputList3SigType187=Serial -InputList3Cue188=text-o177 -InputList3SigType188=Serial -InputList3Cue189=text-o178 -InputList3SigType189=Serial -InputList3Cue190=text-o179 -InputList3SigType190=Serial -InputList3Cue191=text-o180 -InputList3SigType191=Serial -InputList3Cue192=text-o181 -InputList3SigType192=Serial -InputList3Cue193=text-o182 -InputList3SigType193=Serial -InputList3Cue194=text-o183 -InputList3SigType194=Serial -InputList3Cue195=text-o184 -InputList3SigType195=Serial -InputList3Cue196=text-o185 -InputList3SigType196=Serial -InputList3Cue197=text-o186 -InputList3SigType197=Serial -InputList3Cue198=text-o187 -InputList3SigType198=Serial -InputList3Cue199=text-o188 -InputList3SigType199=Serial -InputList3Cue200=text-o189 -InputList3SigType200=Serial -InputList3Cue201=text-o190 -InputList3SigType201=Serial -InputList3Cue202=text-o191 -InputList3SigType202=Serial -InputList3Cue203=text-o192 -InputList3SigType203=Serial -InputList3Cue204=text-o193 -InputList3SigType204=Serial -InputList3Cue205=text-o194 -InputList3SigType205=Serial -InputList3Cue206=text-o195 -InputList3SigType206=Serial -InputList3Cue207=text-o196 -InputList3SigType207=Serial -InputList3Cue208=text-o197 -InputList3SigType208=Serial -InputList3Cue209=text-o198 -InputList3SigType209=Serial -InputList3Cue210=text-o199 -InputList3SigType210=Serial -InputList3Cue211=text-o200 -InputList3SigType211=Serial -InputList3Cue212=text-o201 -InputList3SigType212=Serial -InputList3Cue213=text-o202 -InputList3SigType213=Serial -InputList3Cue214=text-o203 -InputList3SigType214=Serial -InputList3Cue215=text-o204 -InputList3SigType215=Serial -InputList3Cue216=text-o205 -InputList3SigType216=Serial -InputList3Cue217=text-o206 -InputList3SigType217=Serial -InputList3Cue218=text-o207 -InputList3SigType218=Serial -InputList3Cue219=text-o208 -InputList3SigType219=Serial -InputList3Cue220=text-o209 -InputList3SigType220=Serial -InputList3Cue221=text-o210 -InputList3SigType221=Serial -InputList3Cue222=text-o211 -InputList3SigType222=Serial -InputList3Cue223=text-o212 -InputList3SigType223=Serial -InputList3Cue224=text-o213 -InputList3SigType224=Serial -InputList3Cue225=text-o214 -InputList3SigType225=Serial -InputList3Cue226=text-o215 -InputList3SigType226=Serial -InputList3Cue227=text-o216 -InputList3SigType227=Serial -InputList3Cue228=text-o217 -InputList3SigType228=Serial -InputList3Cue229=text-o218 -InputList3SigType229=Serial -InputList3Cue230=text-o219 -InputList3SigType230=Serial -InputList3Cue231=text-o220 -InputList3SigType231=Serial -InputList3Cue232=text-o221 -InputList3SigType232=Serial -InputList3Cue233=text-o222 -InputList3SigType233=Serial -InputList3Cue234=text-o223 -InputList3SigType234=Serial -InputList3Cue235=text-o224 -InputList3SigType235=Serial -InputList3Cue236=text-o225 -InputList3SigType236=Serial -InputList3Cue237=text-o226 -InputList3SigType237=Serial -InputList3Cue238=text-o227 -InputList3SigType238=Serial -InputList3Cue239=text-o228 -InputList3SigType239=Serial -InputList3Cue240=text-o229 -InputList3SigType240=Serial -InputList3Cue241=text-o230 -InputList3SigType241=Serial -InputList3Cue242=text-o231 -InputList3SigType242=Serial -InputList3Cue243=text-o232 -InputList3SigType243=Serial -InputList3Cue244=text-o233 -InputList3SigType244=Serial -InputList3Cue245=text-o234 -InputList3SigType245=Serial -InputList3Cue246=text-o235 -InputList3SigType246=Serial -InputList3Cue247=text-o236 -InputList3SigType247=Serial -InputList3Cue248=text-o237 -InputList3SigType248=Serial -InputList3Cue249=text-o238 -InputList3SigType249=Serial -InputList3Cue250=text-o239 -InputList3SigType250=Serial -InputList3Cue251=text-o240 -InputList3SigType251=Serial -InputList3Cue252=text-o241 -InputList3SigType252=Serial -InputList3Cue253=text-o242 -InputList3SigType253=Serial -InputList3Cue254=text-o243 -InputList3SigType254=Serial -InputList3Cue255=text-o244 -InputList3SigType255=Serial -InputList3Cue256=text-o245 -InputList3SigType256=Serial -InputList3Cue257=text-o246 -InputList3SigType257=Serial -InputList3Cue258=text-o247 -InputList3SigType258=Serial -InputList3Cue259=text-o248 -InputList3SigType259=Serial -InputList3Cue260=text-o249 -InputList3SigType260=Serial -InputList3Cue261=text-o250 -InputList3SigType261=Serial -InputList3Cue262=text-o251 -InputList3SigType262=Serial -InputList3Cue263=text-o252 -InputList3SigType263=Serial -InputList3Cue264=text-o253 -InputList3SigType264=Serial -InputList3Cue265=text-o254 -InputList3SigType265=Serial -InputList3Cue266=text-o255 -InputList3SigType266=Serial -InputList3Cue267=text-o256 -InputList3SigType267=Serial -InputList3Cue268=text-o257 -InputList3SigType268=Serial -InputList3Cue269=text-o258 -InputList3SigType269=Serial -InputList3Cue270=text-o259 -InputList3SigType270=Serial -InputList3Cue271=text-o260 -InputList3SigType271=Serial -InputList3Cue272=text-o261 -InputList3SigType272=Serial -InputList3Cue273=text-o262 -InputList3SigType273=Serial -InputList3Cue274=text-o263 -InputList3SigType274=Serial -InputList3Cue275=text-o264 -InputList3SigType275=Serial -InputList3Cue276=text-o265 -InputList3SigType276=Serial -InputList3Cue277=text-o266 -InputList3SigType277=Serial -InputList3Cue278=text-o267 -InputList3SigType278=Serial -InputList3Cue279=text-o268 -InputList3SigType279=Serial -InputList3Cue280=text-o269 -InputList3SigType280=Serial -InputList3Cue281=text-o270 -InputList3SigType281=Serial -InputList3Cue282=text-o271 -InputList3SigType282=Serial -InputList3Cue283=text-o272 -InputList3SigType283=Serial -InputList3Cue284=text-o273 -InputList3SigType284=Serial -InputList3Cue285=text-o274 -InputList3SigType285=Serial -InputList3Cue286=text-o275 -InputList3SigType286=Serial -InputList3Cue287=text-o276 -InputList3SigType287=Serial -InputList3Cue288=text-o277 -InputList3SigType288=Serial -InputList3Cue289=text-o278 -InputList3SigType289=Serial -InputList3Cue290=text-o279 -InputList3SigType290=Serial -InputList3Cue291=text-o280 -InputList3SigType291=Serial -InputList3Cue292=text-o281 -InputList3SigType292=Serial -InputList3Cue293=text-o282 -InputList3SigType293=Serial -InputList3Cue294=text-o283 -InputList3SigType294=Serial -InputList3Cue295=text-o284 -InputList3SigType295=Serial -InputList3Cue296=text-o285 -InputList3SigType296=Serial -InputList3Cue297=text-o286 -InputList3SigType297=Serial -InputList3Cue298=text-o287 -InputList3SigType298=Serial -InputList3Cue299=text-o288 -InputList3SigType299=Serial -InputList3Cue300=text-o289 -InputList3SigType300=Serial -InputList3Cue301=text-o290 -InputList3SigType301=Serial -InputList3Cue302=text-o291 -InputList3SigType302=Serial -InputList3Cue303=text-o292 -InputList3SigType303=Serial -InputList3Cue304=text-o293 -InputList3SigType304=Serial -InputList3Cue305=text-o294 -InputList3SigType305=Serial -InputList3Cue306=text-o295 -InputList3SigType306=Serial -InputList3Cue307=text-o296 -InputList3SigType307=Serial -InputList3Cue308=text-o297 -InputList3SigType308=Serial -InputList3Cue309=text-o298 -InputList3SigType309=Serial -InputList3Cue310=text-o299 -InputList3SigType310=Serial -InputList3Cue311=text-o300 -InputList3SigType311=Serial -InputList3Cue312=text-o301 -InputList3SigType312=Serial -InputList3Cue313=text-o302 -InputList3SigType313=Serial -InputList3Cue314=text-o303 -InputList3SigType314=Serial -InputList3Cue315=text-o304 -InputList3SigType315=Serial -InputList3Cue316=text-o305 -InputList3SigType316=Serial -InputList3Cue317=text-o306 -InputList3SigType317=Serial -InputList3Cue318=text-o307 -InputList3SigType318=Serial -InputList3Cue319=text-o308 -InputList3SigType319=Serial -InputList3Cue320=text-o309 -InputList3SigType320=Serial -InputList3Cue321=text-o310 -InputList3SigType321=Serial -InputList3Cue322=text-o311 -InputList3SigType322=Serial -InputList3Cue323=text-o312 -InputList3SigType323=Serial -InputList3Cue324=text-o313 -InputList3SigType324=Serial -InputList3Cue325=text-o314 -InputList3SigType325=Serial -InputList3Cue326=text-o315 -InputList3SigType326=Serial -InputList3Cue327=text-o316 -InputList3SigType327=Serial -InputList3Cue328=text-o317 -InputList3SigType328=Serial -InputList3Cue329=text-o318 -InputList3SigType329=Serial -InputList3Cue330=text-o319 -InputList3SigType330=Serial -InputList3Cue331=text-o320 -InputList3SigType331=Serial -InputList3Cue332=text-o321 -InputList3SigType332=Serial -InputList3Cue333=text-o322 -InputList3SigType333=Serial -InputList3Cue334=text-o323 -InputList3SigType334=Serial -InputList3Cue335=text-o324 -InputList3SigType335=Serial -InputList3Cue336=text-o325 -InputList3SigType336=Serial -InputList3Cue337=text-o326 -InputList3SigType337=Serial -InputList3Cue338=text-o327 -InputList3SigType338=Serial -InputList3Cue339=text-o328 -InputList3SigType339=Serial -InputList3Cue340=text-o329 -InputList3SigType340=Serial -InputList3Cue341=text-o330 -InputList3SigType341=Serial -InputList3Cue342=text-o331 -InputList3SigType342=Serial -InputList3Cue343=text-o332 -InputList3SigType343=Serial -InputList3Cue344=text-o333 -InputList3SigType344=Serial -InputList3Cue345=text-o334 -InputList3SigType345=Serial -InputList3Cue346=text-o335 -InputList3SigType346=Serial -InputList3Cue347=text-o336 -InputList3SigType347=Serial -InputList3Cue348=text-o337 -InputList3SigType348=Serial -InputList3Cue349=text-o338 -InputList3SigType349=Serial -InputList3Cue350=text-o339 -InputList3SigType350=Serial -InputList3Cue351=text-o340 -InputList3SigType351=Serial -InputList3Cue352=text-o341 -InputList3SigType352=Serial -InputList3Cue353=text-o342 -InputList3SigType353=Serial -InputList3Cue354=text-o343 -InputList3SigType354=Serial -InputList3Cue355=text-o344 -InputList3SigType355=Serial -InputList3Cue356=text-o345 -InputList3SigType356=Serial -InputList3Cue357=text-o346 -InputList3SigType357=Serial -InputList3Cue358=text-o347 -InputList3SigType358=Serial -InputList3Cue359=text-o348 -InputList3SigType359=Serial -InputList3Cue360=text-o349 -InputList3SigType360=Serial -InputList3Cue361=text-o350 -InputList3SigType361=Serial -InputList3Cue362=text-o351 -InputList3SigType362=Serial -InputList3Cue363=text-o352 -InputList3SigType363=Serial -InputList3Cue364=text-o353 -InputList3SigType364=Serial -InputList3Cue365=text-o354 -InputList3SigType365=Serial -InputList3Cue366=text-o355 -InputList3SigType366=Serial -InputList3Cue367=text-o356 -InputList3SigType367=Serial -InputList3Cue368=text-o357 -InputList3SigType368=Serial -InputList3Cue369=text-o358 -InputList3SigType369=Serial -InputList3Cue370=text-o359 -InputList3SigType370=Serial -InputList3Cue371=text-o360 -InputList3SigType371=Serial -InputList3Cue372=text-o361 -InputList3SigType372=Serial -InputList3Cue373=text-o362 -InputList3SigType373=Serial -InputList3Cue374=text-o363 -InputList3SigType374=Serial -InputList3Cue375=text-o364 -InputList3SigType375=Serial -InputList3Cue376=text-o365 -InputList3SigType376=Serial -InputList3Cue377=text-o366 -InputList3SigType377=Serial -InputList3Cue378=text-o367 -InputList3SigType378=Serial -InputList3Cue379=text-o368 -InputList3SigType379=Serial -InputList3Cue380=text-o369 -InputList3SigType380=Serial -InputList3Cue381=text-o370 -InputList3SigType381=Serial -InputList3Cue382=text-o371 -InputList3SigType382=Serial -InputList3Cue383=text-o372 -InputList3SigType383=Serial -InputList3Cue384=text-o373 -InputList3SigType384=Serial -InputList3Cue385=text-o374 -InputList3SigType385=Serial -InputList3Cue386=text-o375 -InputList3SigType386=Serial -InputList3Cue387=text-o376 -InputList3SigType387=Serial -InputList3Cue388=text-o377 -InputList3SigType388=Serial -InputList3Cue389=text-o378 -InputList3SigType389=Serial -InputList3Cue390=text-o379 -InputList3SigType390=Serial -InputList3Cue391=text-o380 -InputList3SigType391=Serial -InputList3Cue392=text-o381 -InputList3SigType392=Serial -InputList3Cue393=text-o382 -InputList3SigType393=Serial -InputList3Cue394=text-o383 -InputList3SigType394=Serial -InputList3Cue395=text-o384 -InputList3SigType395=Serial -InputList3Cue396=text-o385 -InputList3SigType396=Serial -InputList3Cue397=text-o386 -InputList3SigType397=Serial -InputList3Cue398=text-o387 -InputList3SigType398=Serial -InputList3Cue399=text-o388 -InputList3SigType399=Serial -InputList3Cue400=text-o389 -InputList3SigType400=Serial -InputList3Cue401=text-o390 -InputList3SigType401=Serial -InputList3Cue402=text-o391 -InputList3SigType402=Serial -InputList3Cue403=text-o392 -InputList3SigType403=Serial -InputList3Cue404=text-o393 -InputList3SigType404=Serial -InputList3Cue405=text-o394 -InputList3SigType405=Serial -InputList3Cue406=text-o395 -InputList3SigType406=Serial -InputList3Cue407=text-o396 -InputList3SigType407=Serial -InputList3Cue408=text-o397 -InputList3SigType408=Serial -InputList3Cue409=text-o398 -InputList3SigType409=Serial -InputList3Cue410=text-o399 -InputList3SigType410=Serial -InputList3Cue411=text-o400 -InputList3SigType411=Serial -InputList3Cue412=[~EndGroup~]text-o -InputList3SigType412=Serial -OutputList3Cue1=[~UNUSED2~] -OutputList3SigType1=Serial -OutputList3Cue2=[~UNUSED2~] -OutputList3SigType2=Serial -OutputList3Cue3=[~UNUSED2~] -OutputList3SigType3=Serial -OutputList3Cue4=[~UNUSED2~] -OutputList3SigType4=Serial -OutputList3Cue5=[~UNUSED2~] -OutputList3SigType5=Serial -OutputList3Cue6=[~UNUSED2~] -OutputList3SigType6=Serial -OutputList3Cue7=[~UNUSED2~] -OutputList3SigType7=Serial -OutputList3Cue8=[~UNUSED2~] -OutputList3SigType8=Serial -OutputList3Cue9=[~UNUSED2~] -OutputList3SigType9=Serial -OutputList3Cue10=[~UNUSED2~] -OutputList3SigType10=Serial -OutputList3Cue11=[~BeginGroup~]text-i -OutputList3SigType11=Serial -OutputList3Cue12=text-i1 -OutputList3SigType12=Serial -OutputList3Cue13=text-i2 -OutputList3SigType13=Serial -OutputList3Cue14=text-i3 -OutputList3SigType14=Serial -OutputList3Cue15=text-i4 -OutputList3SigType15=Serial -OutputList3Cue16=text-i5 -OutputList3SigType16=Serial -OutputList3Cue17=text-i6 -OutputList3SigType17=Serial -OutputList3Cue18=text-i7 -OutputList3SigType18=Serial -OutputList3Cue19=text-i8 -OutputList3SigType19=Serial -OutputList3Cue20=text-i9 -OutputList3SigType20=Serial -OutputList3Cue21=text-i10 -OutputList3SigType21=Serial -OutputList3Cue22=text-i11 -OutputList3SigType22=Serial -OutputList3Cue23=text-i12 -OutputList3SigType23=Serial -OutputList3Cue24=text-i13 -OutputList3SigType24=Serial -OutputList3Cue25=text-i14 -OutputList3SigType25=Serial -OutputList3Cue26=text-i15 -OutputList3SigType26=Serial -OutputList3Cue27=text-i16 -OutputList3SigType27=Serial -OutputList3Cue28=text-i17 -OutputList3SigType28=Serial -OutputList3Cue29=text-i18 -OutputList3SigType29=Serial -OutputList3Cue30=text-i19 -OutputList3SigType30=Serial -OutputList3Cue31=text-i20 -OutputList3SigType31=Serial -OutputList3Cue32=text-i21 -OutputList3SigType32=Serial -OutputList3Cue33=text-i22 -OutputList3SigType33=Serial -OutputList3Cue34=text-i23 -OutputList3SigType34=Serial -OutputList3Cue35=text-i24 -OutputList3SigType35=Serial -OutputList3Cue36=text-i25 -OutputList3SigType36=Serial -OutputList3Cue37=text-i26 -OutputList3SigType37=Serial -OutputList3Cue38=text-i27 -OutputList3SigType38=Serial -OutputList3Cue39=text-i28 -OutputList3SigType39=Serial -OutputList3Cue40=text-i29 -OutputList3SigType40=Serial -OutputList3Cue41=text-i30 -OutputList3SigType41=Serial -OutputList3Cue42=text-i31 -OutputList3SigType42=Serial -OutputList3Cue43=text-i32 -OutputList3SigType43=Serial -OutputList3Cue44=text-i33 -OutputList3SigType44=Serial -OutputList3Cue45=text-i34 -OutputList3SigType45=Serial -OutputList3Cue46=text-i35 -OutputList3SigType46=Serial -OutputList3Cue47=text-i36 -OutputList3SigType47=Serial -OutputList3Cue48=text-i37 -OutputList3SigType48=Serial -OutputList3Cue49=text-i38 -OutputList3SigType49=Serial -OutputList3Cue50=text-i39 -OutputList3SigType50=Serial -OutputList3Cue51=text-i40 -OutputList3SigType51=Serial -OutputList3Cue52=text-i41 -OutputList3SigType52=Serial -OutputList3Cue53=text-i42 -OutputList3SigType53=Serial -OutputList3Cue54=text-i43 -OutputList3SigType54=Serial -OutputList3Cue55=text-i44 -OutputList3SigType55=Serial -OutputList3Cue56=text-i45 -OutputList3SigType56=Serial -OutputList3Cue57=text-i46 -OutputList3SigType57=Serial -OutputList3Cue58=text-i47 -OutputList3SigType58=Serial -OutputList3Cue59=text-i48 -OutputList3SigType59=Serial -OutputList3Cue60=text-i49 -OutputList3SigType60=Serial -OutputList3Cue61=text-i50 -OutputList3SigType61=Serial -OutputList3Cue62=text-i51 -OutputList3SigType62=Serial -OutputList3Cue63=text-i52 -OutputList3SigType63=Serial -OutputList3Cue64=text-i53 -OutputList3SigType64=Serial -OutputList3Cue65=text-i54 -OutputList3SigType65=Serial -OutputList3Cue66=text-i55 -OutputList3SigType66=Serial -OutputList3Cue67=text-i56 -OutputList3SigType67=Serial -OutputList3Cue68=text-i57 -OutputList3SigType68=Serial -OutputList3Cue69=text-i58 -OutputList3SigType69=Serial -OutputList3Cue70=text-i59 -OutputList3SigType70=Serial -OutputList3Cue71=text-i60 -OutputList3SigType71=Serial -OutputList3Cue72=text-i61 -OutputList3SigType72=Serial -OutputList3Cue73=text-i62 -OutputList3SigType73=Serial -OutputList3Cue74=text-i63 -OutputList3SigType74=Serial -OutputList3Cue75=text-i64 -OutputList3SigType75=Serial -OutputList3Cue76=text-i65 -OutputList3SigType76=Serial -OutputList3Cue77=text-i66 -OutputList3SigType77=Serial -OutputList3Cue78=text-i67 -OutputList3SigType78=Serial -OutputList3Cue79=text-i68 -OutputList3SigType79=Serial -OutputList3Cue80=text-i69 -OutputList3SigType80=Serial -OutputList3Cue81=text-i70 -OutputList3SigType81=Serial -OutputList3Cue82=text-i71 -OutputList3SigType82=Serial -OutputList3Cue83=text-i72 -OutputList3SigType83=Serial -OutputList3Cue84=text-i73 -OutputList3SigType84=Serial -OutputList3Cue85=text-i74 -OutputList3SigType85=Serial -OutputList3Cue86=text-i75 -OutputList3SigType86=Serial -OutputList3Cue87=text-i76 -OutputList3SigType87=Serial -OutputList3Cue88=text-i77 -OutputList3SigType88=Serial -OutputList3Cue89=text-i78 -OutputList3SigType89=Serial -OutputList3Cue90=text-i79 -OutputList3SigType90=Serial -OutputList3Cue91=text-i80 -OutputList3SigType91=Serial -OutputList3Cue92=text-i81 -OutputList3SigType92=Serial -OutputList3Cue93=text-i82 -OutputList3SigType93=Serial -OutputList3Cue94=text-i83 -OutputList3SigType94=Serial -OutputList3Cue95=text-i84 -OutputList3SigType95=Serial -OutputList3Cue96=text-i85 -OutputList3SigType96=Serial -OutputList3Cue97=text-i86 -OutputList3SigType97=Serial -OutputList3Cue98=text-i87 -OutputList3SigType98=Serial -OutputList3Cue99=text-i88 -OutputList3SigType99=Serial -OutputList3Cue100=text-i89 -OutputList3SigType100=Serial -OutputList3Cue101=text-i90 -OutputList3SigType101=Serial -OutputList3Cue102=text-i91 -OutputList3SigType102=Serial -OutputList3Cue103=text-i92 -OutputList3SigType103=Serial -OutputList3Cue104=text-i93 -OutputList3SigType104=Serial -OutputList3Cue105=text-i94 -OutputList3SigType105=Serial -OutputList3Cue106=text-i95 -OutputList3SigType106=Serial -OutputList3Cue107=text-i96 -OutputList3SigType107=Serial -OutputList3Cue108=text-i97 -OutputList3SigType108=Serial -OutputList3Cue109=text-i98 -OutputList3SigType109=Serial -OutputList3Cue110=text-i99 -OutputList3SigType110=Serial -OutputList3Cue111=text-i100 -OutputList3SigType111=Serial -OutputList3Cue112=text-i101 -OutputList3SigType112=Serial -OutputList3Cue113=text-i102 -OutputList3SigType113=Serial -OutputList3Cue114=text-i103 -OutputList3SigType114=Serial -OutputList3Cue115=text-i104 -OutputList3SigType115=Serial -OutputList3Cue116=text-i105 -OutputList3SigType116=Serial -OutputList3Cue117=text-i106 -OutputList3SigType117=Serial -OutputList3Cue118=text-i107 -OutputList3SigType118=Serial -OutputList3Cue119=text-i108 -OutputList3SigType119=Serial -OutputList3Cue120=text-i109 -OutputList3SigType120=Serial -OutputList3Cue121=text-i110 -OutputList3SigType121=Serial -OutputList3Cue122=text-i111 -OutputList3SigType122=Serial -OutputList3Cue123=text-i112 -OutputList3SigType123=Serial -OutputList3Cue124=text-i113 -OutputList3SigType124=Serial -OutputList3Cue125=text-i114 -OutputList3SigType125=Serial -OutputList3Cue126=text-i115 -OutputList3SigType126=Serial -OutputList3Cue127=text-i116 -OutputList3SigType127=Serial -OutputList3Cue128=text-i117 -OutputList3SigType128=Serial -OutputList3Cue129=text-i118 -OutputList3SigType129=Serial -OutputList3Cue130=text-i119 -OutputList3SigType130=Serial -OutputList3Cue131=text-i120 -OutputList3SigType131=Serial -OutputList3Cue132=text-i121 -OutputList3SigType132=Serial -OutputList3Cue133=text-i122 -OutputList3SigType133=Serial -OutputList3Cue134=text-i123 -OutputList3SigType134=Serial -OutputList3Cue135=text-i124 -OutputList3SigType135=Serial -OutputList3Cue136=text-i125 -OutputList3SigType136=Serial -OutputList3Cue137=text-i126 -OutputList3SigType137=Serial -OutputList3Cue138=text-i127 -OutputList3SigType138=Serial -OutputList3Cue139=text-i128 -OutputList3SigType139=Serial -OutputList3Cue140=text-i129 -OutputList3SigType140=Serial -OutputList3Cue141=text-i130 -OutputList3SigType141=Serial -OutputList3Cue142=text-i131 -OutputList3SigType142=Serial -OutputList3Cue143=text-i132 -OutputList3SigType143=Serial -OutputList3Cue144=text-i133 -OutputList3SigType144=Serial -OutputList3Cue145=text-i134 -OutputList3SigType145=Serial -OutputList3Cue146=text-i135 -OutputList3SigType146=Serial -OutputList3Cue147=text-i136 -OutputList3SigType147=Serial -OutputList3Cue148=text-i137 -OutputList3SigType148=Serial -OutputList3Cue149=text-i138 -OutputList3SigType149=Serial -OutputList3Cue150=text-i139 -OutputList3SigType150=Serial -OutputList3Cue151=text-i140 -OutputList3SigType151=Serial -OutputList3Cue152=text-i141 -OutputList3SigType152=Serial -OutputList3Cue153=text-i142 -OutputList3SigType153=Serial -OutputList3Cue154=text-i143 -OutputList3SigType154=Serial -OutputList3Cue155=text-i144 -OutputList3SigType155=Serial -OutputList3Cue156=text-i145 -OutputList3SigType156=Serial -OutputList3Cue157=text-i146 -OutputList3SigType157=Serial -OutputList3Cue158=text-i147 -OutputList3SigType158=Serial -OutputList3Cue159=text-i148 -OutputList3SigType159=Serial -OutputList3Cue160=text-i149 -OutputList3SigType160=Serial -OutputList3Cue161=text-i150 -OutputList3SigType161=Serial -OutputList3Cue162=text-i151 -OutputList3SigType162=Serial -OutputList3Cue163=text-i152 -OutputList3SigType163=Serial -OutputList3Cue164=text-i153 -OutputList3SigType164=Serial -OutputList3Cue165=text-i154 -OutputList3SigType165=Serial -OutputList3Cue166=text-i155 -OutputList3SigType166=Serial -OutputList3Cue167=text-i156 -OutputList3SigType167=Serial -OutputList3Cue168=text-i157 -OutputList3SigType168=Serial -OutputList3Cue169=text-i158 -OutputList3SigType169=Serial -OutputList3Cue170=text-i159 -OutputList3SigType170=Serial -OutputList3Cue171=text-i160 -OutputList3SigType171=Serial -OutputList3Cue172=text-i161 -OutputList3SigType172=Serial -OutputList3Cue173=text-i162 -OutputList3SigType173=Serial -OutputList3Cue174=text-i163 -OutputList3SigType174=Serial -OutputList3Cue175=text-i164 -OutputList3SigType175=Serial -OutputList3Cue176=text-i165 -OutputList3SigType176=Serial -OutputList3Cue177=text-i166 -OutputList3SigType177=Serial -OutputList3Cue178=text-i167 -OutputList3SigType178=Serial -OutputList3Cue179=text-i168 -OutputList3SigType179=Serial -OutputList3Cue180=text-i169 -OutputList3SigType180=Serial -OutputList3Cue181=text-i170 -OutputList3SigType181=Serial -OutputList3Cue182=text-i171 -OutputList3SigType182=Serial -OutputList3Cue183=text-i172 -OutputList3SigType183=Serial -OutputList3Cue184=text-i173 -OutputList3SigType184=Serial -OutputList3Cue185=text-i174 -OutputList3SigType185=Serial -OutputList3Cue186=text-i175 -OutputList3SigType186=Serial -OutputList3Cue187=text-i176 -OutputList3SigType187=Serial -OutputList3Cue188=text-i177 -OutputList3SigType188=Serial -OutputList3Cue189=text-i178 -OutputList3SigType189=Serial -OutputList3Cue190=text-i179 -OutputList3SigType190=Serial -OutputList3Cue191=text-i180 -OutputList3SigType191=Serial -OutputList3Cue192=text-i181 -OutputList3SigType192=Serial -OutputList3Cue193=text-i182 -OutputList3SigType193=Serial -OutputList3Cue194=text-i183 -OutputList3SigType194=Serial -OutputList3Cue195=text-i184 -OutputList3SigType195=Serial -OutputList3Cue196=text-i185 -OutputList3SigType196=Serial -OutputList3Cue197=text-i186 -OutputList3SigType197=Serial -OutputList3Cue198=text-i187 -OutputList3SigType198=Serial -OutputList3Cue199=text-i188 -OutputList3SigType199=Serial -OutputList3Cue200=text-i189 -OutputList3SigType200=Serial -OutputList3Cue201=text-i190 -OutputList3SigType201=Serial -OutputList3Cue202=text-i191 -OutputList3SigType202=Serial -OutputList3Cue203=text-i192 -OutputList3SigType203=Serial -OutputList3Cue204=text-i193 -OutputList3SigType204=Serial -OutputList3Cue205=text-i194 -OutputList3SigType205=Serial -OutputList3Cue206=text-i195 -OutputList3SigType206=Serial -OutputList3Cue207=text-i196 -OutputList3SigType207=Serial -OutputList3Cue208=text-i197 -OutputList3SigType208=Serial -OutputList3Cue209=text-i198 -OutputList3SigType209=Serial -OutputList3Cue210=text-i199 -OutputList3SigType210=Serial -OutputList3Cue211=text-i200 -OutputList3SigType211=Serial -OutputList3Cue212=text-i201 -OutputList3SigType212=Serial -OutputList3Cue213=text-i202 -OutputList3SigType213=Serial -OutputList3Cue214=text-i203 -OutputList3SigType214=Serial -OutputList3Cue215=text-i204 -OutputList3SigType215=Serial -OutputList3Cue216=text-i205 -OutputList3SigType216=Serial -OutputList3Cue217=text-i206 -OutputList3SigType217=Serial -OutputList3Cue218=text-i207 -OutputList3SigType218=Serial -OutputList3Cue219=text-i208 -OutputList3SigType219=Serial -OutputList3Cue220=text-i209 -OutputList3SigType220=Serial -OutputList3Cue221=text-i210 -OutputList3SigType221=Serial -OutputList3Cue222=text-i211 -OutputList3SigType222=Serial -OutputList3Cue223=text-i212 -OutputList3SigType223=Serial -OutputList3Cue224=text-i213 -OutputList3SigType224=Serial -OutputList3Cue225=text-i214 -OutputList3SigType225=Serial -OutputList3Cue226=text-i215 -OutputList3SigType226=Serial -OutputList3Cue227=text-i216 -OutputList3SigType227=Serial -OutputList3Cue228=text-i217 -OutputList3SigType228=Serial -OutputList3Cue229=text-i218 -OutputList3SigType229=Serial -OutputList3Cue230=text-i219 -OutputList3SigType230=Serial -OutputList3Cue231=text-i220 -OutputList3SigType231=Serial -OutputList3Cue232=text-i221 -OutputList3SigType232=Serial -OutputList3Cue233=text-i222 -OutputList3SigType233=Serial -OutputList3Cue234=text-i223 -OutputList3SigType234=Serial -OutputList3Cue235=text-i224 -OutputList3SigType235=Serial -OutputList3Cue236=text-i225 -OutputList3SigType236=Serial -OutputList3Cue237=text-i226 -OutputList3SigType237=Serial -OutputList3Cue238=text-i227 -OutputList3SigType238=Serial -OutputList3Cue239=text-i228 -OutputList3SigType239=Serial -OutputList3Cue240=text-i229 -OutputList3SigType240=Serial -OutputList3Cue241=text-i230 -OutputList3SigType241=Serial -OutputList3Cue242=text-i231 -OutputList3SigType242=Serial -OutputList3Cue243=text-i232 -OutputList3SigType243=Serial -OutputList3Cue244=text-i233 -OutputList3SigType244=Serial -OutputList3Cue245=text-i234 -OutputList3SigType245=Serial -OutputList3Cue246=text-i235 -OutputList3SigType246=Serial -OutputList3Cue247=text-i236 -OutputList3SigType247=Serial -OutputList3Cue248=text-i237 -OutputList3SigType248=Serial -OutputList3Cue249=text-i238 -OutputList3SigType249=Serial -OutputList3Cue250=text-i239 -OutputList3SigType250=Serial -OutputList3Cue251=text-i240 -OutputList3SigType251=Serial -OutputList3Cue252=text-i241 -OutputList3SigType252=Serial -OutputList3Cue253=text-i242 -OutputList3SigType253=Serial -OutputList3Cue254=text-i243 -OutputList3SigType254=Serial -OutputList3Cue255=text-i244 -OutputList3SigType255=Serial -OutputList3Cue256=text-i245 -OutputList3SigType256=Serial -OutputList3Cue257=text-i246 -OutputList3SigType257=Serial -OutputList3Cue258=text-i247 -OutputList3SigType258=Serial -OutputList3Cue259=text-i248 -OutputList3SigType259=Serial -OutputList3Cue260=text-i249 -OutputList3SigType260=Serial -OutputList3Cue261=text-i250 -OutputList3SigType261=Serial -OutputList3Cue262=text-i251 -OutputList3SigType262=Serial -OutputList3Cue263=text-i252 -OutputList3SigType263=Serial -OutputList3Cue264=text-i253 -OutputList3SigType264=Serial -OutputList3Cue265=text-i254 -OutputList3SigType265=Serial -OutputList3Cue266=text-i255 -OutputList3SigType266=Serial -OutputList3Cue267=text-i256 -OutputList3SigType267=Serial -OutputList3Cue268=text-i257 -OutputList3SigType268=Serial -OutputList3Cue269=text-i258 -OutputList3SigType269=Serial -OutputList3Cue270=text-i259 -OutputList3SigType270=Serial -OutputList3Cue271=text-i260 -OutputList3SigType271=Serial -OutputList3Cue272=text-i261 -OutputList3SigType272=Serial -OutputList3Cue273=text-i262 -OutputList3SigType273=Serial -OutputList3Cue274=text-i263 -OutputList3SigType274=Serial -OutputList3Cue275=text-i264 -OutputList3SigType275=Serial -OutputList3Cue276=text-i265 -OutputList3SigType276=Serial -OutputList3Cue277=text-i266 -OutputList3SigType277=Serial -OutputList3Cue278=text-i267 -OutputList3SigType278=Serial -OutputList3Cue279=text-i268 -OutputList3SigType279=Serial -OutputList3Cue280=text-i269 -OutputList3SigType280=Serial -OutputList3Cue281=text-i270 -OutputList3SigType281=Serial -OutputList3Cue282=text-i271 -OutputList3SigType282=Serial -OutputList3Cue283=text-i272 -OutputList3SigType283=Serial -OutputList3Cue284=text-i273 -OutputList3SigType284=Serial -OutputList3Cue285=text-i274 -OutputList3SigType285=Serial -OutputList3Cue286=text-i275 -OutputList3SigType286=Serial -OutputList3Cue287=text-i276 -OutputList3SigType287=Serial -OutputList3Cue288=text-i277 -OutputList3SigType288=Serial -OutputList3Cue289=text-i278 -OutputList3SigType289=Serial -OutputList3Cue290=text-i279 -OutputList3SigType290=Serial -OutputList3Cue291=text-i280 -OutputList3SigType291=Serial -OutputList3Cue292=text-i281 -OutputList3SigType292=Serial -OutputList3Cue293=text-i282 -OutputList3SigType293=Serial -OutputList3Cue294=text-i283 -OutputList3SigType294=Serial -OutputList3Cue295=text-i284 -OutputList3SigType295=Serial -OutputList3Cue296=text-i285 -OutputList3SigType296=Serial -OutputList3Cue297=text-i286 -OutputList3SigType297=Serial -OutputList3Cue298=text-i287 -OutputList3SigType298=Serial -OutputList3Cue299=text-i288 -OutputList3SigType299=Serial -OutputList3Cue300=text-i289 -OutputList3SigType300=Serial -OutputList3Cue301=text-i290 -OutputList3SigType301=Serial -OutputList3Cue302=text-i291 -OutputList3SigType302=Serial -OutputList3Cue303=text-i292 -OutputList3SigType303=Serial -OutputList3Cue304=text-i293 -OutputList3SigType304=Serial -OutputList3Cue305=text-i294 -OutputList3SigType305=Serial -OutputList3Cue306=text-i295 -OutputList3SigType306=Serial -OutputList3Cue307=text-i296 -OutputList3SigType307=Serial -OutputList3Cue308=text-i297 -OutputList3SigType308=Serial -OutputList3Cue309=text-i298 -OutputList3SigType309=Serial -OutputList3Cue310=text-i299 -OutputList3SigType310=Serial -OutputList3Cue311=text-i300 -OutputList3SigType311=Serial -OutputList3Cue312=text-i301 -OutputList3SigType312=Serial -OutputList3Cue313=text-i302 -OutputList3SigType313=Serial -OutputList3Cue314=text-i303 -OutputList3SigType314=Serial -OutputList3Cue315=text-i304 -OutputList3SigType315=Serial -OutputList3Cue316=text-i305 -OutputList3SigType316=Serial -OutputList3Cue317=text-i306 -OutputList3SigType317=Serial -OutputList3Cue318=text-i307 -OutputList3SigType318=Serial -OutputList3Cue319=text-i308 -OutputList3SigType319=Serial -OutputList3Cue320=text-i309 -OutputList3SigType320=Serial -OutputList3Cue321=text-i310 -OutputList3SigType321=Serial -OutputList3Cue322=text-i311 -OutputList3SigType322=Serial -OutputList3Cue323=text-i312 -OutputList3SigType323=Serial -OutputList3Cue324=text-i313 -OutputList3SigType324=Serial -OutputList3Cue325=text-i314 -OutputList3SigType325=Serial -OutputList3Cue326=text-i315 -OutputList3SigType326=Serial -OutputList3Cue327=text-i316 -OutputList3SigType327=Serial -OutputList3Cue328=text-i317 -OutputList3SigType328=Serial -OutputList3Cue329=text-i318 -OutputList3SigType329=Serial -OutputList3Cue330=text-i319 -OutputList3SigType330=Serial -OutputList3Cue331=text-i320 -OutputList3SigType331=Serial -OutputList3Cue332=text-i321 -OutputList3SigType332=Serial -OutputList3Cue333=text-i322 -OutputList3SigType333=Serial -OutputList3Cue334=text-i323 -OutputList3SigType334=Serial -OutputList3Cue335=text-i324 -OutputList3SigType335=Serial -OutputList3Cue336=text-i325 -OutputList3SigType336=Serial -OutputList3Cue337=text-i326 -OutputList3SigType337=Serial -OutputList3Cue338=text-i327 -OutputList3SigType338=Serial -OutputList3Cue339=text-i328 -OutputList3SigType339=Serial -OutputList3Cue340=text-i329 -OutputList3SigType340=Serial -OutputList3Cue341=text-i330 -OutputList3SigType341=Serial -OutputList3Cue342=text-i331 -OutputList3SigType342=Serial -OutputList3Cue343=text-i332 -OutputList3SigType343=Serial -OutputList3Cue344=text-i333 -OutputList3SigType344=Serial -OutputList3Cue345=text-i334 -OutputList3SigType345=Serial -OutputList3Cue346=text-i335 -OutputList3SigType346=Serial -OutputList3Cue347=text-i336 -OutputList3SigType347=Serial -OutputList3Cue348=text-i337 -OutputList3SigType348=Serial -OutputList3Cue349=text-i338 -OutputList3SigType349=Serial -OutputList3Cue350=text-i339 -OutputList3SigType350=Serial -OutputList3Cue351=text-i340 -OutputList3SigType351=Serial -OutputList3Cue352=text-i341 -OutputList3SigType352=Serial -OutputList3Cue353=text-i342 -OutputList3SigType353=Serial -OutputList3Cue354=text-i343 -OutputList3SigType354=Serial -OutputList3Cue355=text-i344 -OutputList3SigType355=Serial -OutputList3Cue356=text-i345 -OutputList3SigType356=Serial -OutputList3Cue357=text-i346 -OutputList3SigType357=Serial -OutputList3Cue358=text-i347 -OutputList3SigType358=Serial -OutputList3Cue359=text-i348 -OutputList3SigType359=Serial -OutputList3Cue360=text-i349 -OutputList3SigType360=Serial -OutputList3Cue361=text-i350 -OutputList3SigType361=Serial -OutputList3Cue362=text-i351 -OutputList3SigType362=Serial -OutputList3Cue363=text-i352 -OutputList3SigType363=Serial -OutputList3Cue364=text-i353 -OutputList3SigType364=Serial -OutputList3Cue365=text-i354 -OutputList3SigType365=Serial -OutputList3Cue366=text-i355 -OutputList3SigType366=Serial -OutputList3Cue367=text-i356 -OutputList3SigType367=Serial -OutputList3Cue368=text-i357 -OutputList3SigType368=Serial -OutputList3Cue369=text-i358 -OutputList3SigType369=Serial -OutputList3Cue370=text-i359 -OutputList3SigType370=Serial -OutputList3Cue371=text-i360 -OutputList3SigType371=Serial -OutputList3Cue372=text-i361 -OutputList3SigType372=Serial -OutputList3Cue373=text-i362 -OutputList3SigType373=Serial -OutputList3Cue374=text-i363 -OutputList3SigType374=Serial -OutputList3Cue375=text-i364 -OutputList3SigType375=Serial -OutputList3Cue376=text-i365 -OutputList3SigType376=Serial -OutputList3Cue377=text-i366 -OutputList3SigType377=Serial -OutputList3Cue378=text-i367 -OutputList3SigType378=Serial -OutputList3Cue379=text-i368 -OutputList3SigType379=Serial -OutputList3Cue380=text-i369 -OutputList3SigType380=Serial -OutputList3Cue381=text-i370 -OutputList3SigType381=Serial -OutputList3Cue382=text-i371 -OutputList3SigType382=Serial -OutputList3Cue383=text-i372 -OutputList3SigType383=Serial -OutputList3Cue384=text-i373 -OutputList3SigType384=Serial -OutputList3Cue385=text-i374 -OutputList3SigType385=Serial -OutputList3Cue386=text-i375 -OutputList3SigType386=Serial -OutputList3Cue387=text-i376 -OutputList3SigType387=Serial -OutputList3Cue388=text-i377 -OutputList3SigType388=Serial -OutputList3Cue389=text-i378 -OutputList3SigType389=Serial -OutputList3Cue390=text-i379 -OutputList3SigType390=Serial -OutputList3Cue391=text-i380 -OutputList3SigType391=Serial -OutputList3Cue392=text-i381 -OutputList3SigType392=Serial -OutputList3Cue393=text-i382 -OutputList3SigType393=Serial -OutputList3Cue394=text-i383 -OutputList3SigType394=Serial -OutputList3Cue395=text-i384 -OutputList3SigType395=Serial -OutputList3Cue396=text-i385 -OutputList3SigType396=Serial -OutputList3Cue397=text-i386 -OutputList3SigType397=Serial -OutputList3Cue398=text-i387 -OutputList3SigType398=Serial -OutputList3Cue399=text-i388 -OutputList3SigType399=Serial -OutputList3Cue400=text-i389 -OutputList3SigType400=Serial -OutputList3Cue401=text-i390 -OutputList3SigType401=Serial -OutputList3Cue402=text-i391 -OutputList3SigType402=Serial -OutputList3Cue403=text-i392 -OutputList3SigType403=Serial -OutputList3Cue404=text-i393 -OutputList3SigType404=Serial -OutputList3Cue405=text-i394 -OutputList3SigType405=Serial -OutputList3Cue406=text-i395 -OutputList3SigType406=Serial -OutputList3Cue407=text-i396 -OutputList3SigType407=Serial -OutputList3Cue408=text-i397 -OutputList3SigType408=Serial -OutputList3Cue409=text-i398 -OutputList3SigType409=Serial -OutputList3Cue410=text-i399 -OutputList3SigType410=Serial -OutputList3Cue411=text-i400 -OutputList3SigType411=Serial -OutputList3Cue412=[~EndGroup~]text-i -OutputList3SigType412=Serial -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=10 -CedH=10 -SmartObjId=10012d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=10 -Tp=1 -HD=TRUE -DV=10012d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=10 -Name=PepperDash Essentials iPad_[B.AV] Object - Presets_CATV Icon List Vertical.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials iPad_[B.AV] Object - DPad STB_STB DPad.ced -Hint=STB DPad (Smart Object ID=10011) -Code=11 -SGControlType=DPad -SGControlName=STB DPad -GUID=F2340FAD-85E9-4E49-B46E-15E9B096F58B -SmplCName=PepperDash Essentials iPad_[B.AV] Object - DPad STB_STB DPad.ced -SMWRev=4.02.19 -Expand=expand_random -HelpID=10015 -;Define the number of inputs, outputs and parameters -MinVariableInputs=5 -MaxVariableInputs=5 -MinVariableOutputs=5 -MaxVariableOutputs=5 -NumFixedParams=1 -MinVariableInputsList2=0 -MaxVariableInputsList2=0 -MinVariableOutputsList2=0 -MaxVariableOutputsList2=0 -MinVariableInputsList3=0 -MaxVariableInputsList3=0 -MinVariableOutputsList3=0 -MaxVariableOutputsList3=0 -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -OutputCue1=Up -OutputSigType1=Digital -InputCue2=[~UNUSED3~] -InputSigType2=Digital -OutputCue2=Down -OutputSigType2=Digital -InputCue3=[~UNUSED3~] -InputSigType3=Digital -OutputCue3=Left -OutputSigType3=Digital -InputCue4=[~UNUSED3~] -InputSigType4=Digital -OutputCue4=Right -OutputSigType4=Digital -InputCue5=[~UNUSED3~] -InputSigType5=Digital -OutputCue5=OK -OutputSigType5=Digital -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=11 -CedH=11 -SmartObjId=10011d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=11 -Tp=1 -HD=TRUE -DV=10011d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=11 -Name=PepperDash Essentials iPad_[B.AV] Object - DPad STB_STB DPad.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials iPad_[B.AV] Object - Tab SetTopBox_Tab Button Horizontal.ced -Hint=Tab Button Horizontal (Smart Object ID=10081) -Code=12 -SGControlType=Horizontal Tab Button -SGControlName=Tab Button Horizontal -GUID=198C97B0-9D0C-46C2-9557-27EA33C0BE9F -SmplCName=PepperDash Essentials iPad_[B.AV] Object - Tab SetTopBox_Tab Button Horizontal.ced -SMWRev=4.02.19 -Expand=expand_random -HelpID=10031 -;Define the number of inputs, outputs and parameters -MinVariableInputs=4 -MaxVariableInputs=4 -MinVariableOutputs=4 -MaxVariableOutputs=4 -NumFixedParams=1 -MinVariableInputsList2=0 -MaxVariableInputsList2=0 -MinVariableOutputsList2=0 -MaxVariableOutputsList2=0 -MinVariableInputsList3=0 -MaxVariableInputsList3=0 -MinVariableOutputsList3=0 -MaxVariableOutputsList3=0 -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -OutputCue1=Tab Button 1 Press -OutputSigType1=Digital -InputCue2=Tab Button 1 Select -InputSigType2=Digital -OutputCue2=[~UNUSED3~] -OutputSigType2=Digital -InputCue3=[~UNUSED3~] -InputSigType3=Digital -OutputCue3=Tab Button 2 Press -OutputSigType3=Digital -InputCue4=Tab Button 2 Select -InputSigType4=Digital -OutputCue4=[~UNUSED3~] -OutputSigType4=Digital -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=12 -CedH=12 -SmartObjId=10081d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=12 -Tp=1 -HD=TRUE -DV=10081d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=12 -Name=PepperDash Essentials iPad_[B.AV] Object - Tab SetTopBox_Tab Button Horizontal.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials iPad_[B.AV] Object - Dpad DVD_DVD DPad.ced -Hint=DVD DPad (Smart Object ID=10411) -Code=13 -SGControlType=DPad -SGControlName=DVD DPad -GUID=D49BCF22-C770-4146-93E6-00867D885E1E -SmplCName=PepperDash Essentials iPad_[B.AV] Object - Dpad DVD_DVD DPad.ced -SMWRev=4.02.19 -Expand=expand_random -HelpID=10015 -;Define the number of inputs, outputs and parameters -MinVariableInputs=5 -MaxVariableInputs=5 -MinVariableOutputs=5 -MaxVariableOutputs=5 -NumFixedParams=1 -MinVariableInputsList2=0 -MaxVariableInputsList2=0 -MinVariableOutputsList2=0 -MaxVariableOutputsList2=0 -MinVariableInputsList3=0 -MaxVariableInputsList3=0 -MinVariableOutputsList3=0 -MaxVariableOutputsList3=0 -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -OutputCue1=Up -OutputSigType1=Digital -InputCue2=[~UNUSED3~] -InputSigType2=Digital -OutputCue2=Down -OutputSigType2=Digital -InputCue3=[~UNUSED3~] -InputSigType3=Digital -OutputCue3=Left -OutputSigType3=Digital -InputCue4=[~UNUSED3~] -InputSigType4=Digital -OutputCue4=Right -OutputSigType4=Digital -InputCue5=[~UNUSED3~] -InputSigType5=Digital -OutputCue5=OK -OutputSigType5=Digital -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=13 -CedH=13 -SmartObjId=10411d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=13 -Tp=1 -HD=TRUE -DV=10411d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=13 -Name=PepperDash Essentials iPad_[B.AV] Object - Dpad DVD_DVD DPad.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials iPad_[B.AV] Source-Set Top Box Backer_CATV Keypad.ced -Hint=CATV Keypad (Smart Object ID=10014) -Code=14 -SGControlType=Simple Keypad -SGControlName=CATV Keypad -GUID=5E33D4F4-5C5F-430C-879A-AE82529B3943 -SmplCName=PepperDash Essentials iPad_[B.AV] Source-Set Top Box Backer_CATV Keypad.ced -SMWRev=4.02.19 -Expand=expand_random -HelpID=10061 -;Define the number of inputs, outputs and parameters -MinVariableInputs=12 -MaxVariableInputs=12 -MinVariableOutputs=12 -MaxVariableOutputs=12 -NumFixedParams=1 -MinVariableInputsList2=0 -MaxVariableInputsList2=0 -MinVariableOutputsList2=0 -MaxVariableOutputsList2=0 -MinVariableInputsList3=0 -MaxVariableInputsList3=0 -MinVariableOutputsList3=0 -MaxVariableOutputsList3=0 -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -OutputCue1=1 -OutputSigType1=Digital -InputCue2=[~UNUSED3~] -InputSigType2=Digital -OutputCue2=2 -OutputSigType2=Digital -InputCue3=[~UNUSED3~] -InputSigType3=Digital -OutputCue3=3 -OutputSigType3=Digital -InputCue4=[~UNUSED3~] -InputSigType4=Digital -OutputCue4=4 -OutputSigType4=Digital -InputCue5=[~UNUSED3~] -InputSigType5=Digital -OutputCue5=5 -OutputSigType5=Digital -InputCue6=[~UNUSED3~] -InputSigType6=Digital -OutputCue6=6 -OutputSigType6=Digital -InputCue7=[~UNUSED3~] -InputSigType7=Digital -OutputCue7=7 -OutputSigType7=Digital -InputCue8=[~UNUSED3~] -InputSigType8=Digital -OutputCue8=8 -OutputSigType8=Digital -InputCue9=[~UNUSED3~] -InputSigType9=Digital -OutputCue9=9 -OutputSigType9=Digital -InputCue10=[~UNUSED3~] -InputSigType10=Digital -OutputCue10=0 -OutputSigType10=Digital -InputCue11=[~UNUSED3~] -InputSigType11=Digital -OutputCue11=Misc_1 -OutputSigType11=Digital -InputCue12=[~UNUSED3~] -InputSigType12=Digital -OutputCue12=Misc_2 -OutputSigType12=Digital -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=14 -CedH=14 -SmartObjId=10014d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=14 -Tp=1 -HD=TRUE -DV=10014d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=14 -Name=PepperDash Essentials iPad_[B.AV] Source-Set Top Box Backer_CATV Keypad.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials iPad_[B.AV] Source-Set Top Box Backer_CATV Icon List Vertical.ced -Hint=CATV Icon List Vertical (Smart Object ID=3333) -Code=15 -SGControlType=Subpage Reference List Vertical -SGControlName=CATV Icon List Vertical -GUID=D6A79678-BAD2-4F6D-8104-A941FBA9432F -SmplCName=PepperDash Essentials iPad_[B.AV] Source-Set Top Box Backer_CATV Icon List Vertical.ced -SMWRev=4.02.20 -Expand=expand_random -HelpID=10125 -Render=8 -;Define the number of inputs, outputs and parameters -MinVariableInputs=4106 -MaxVariableInputs=4106 -MinVariableOutputs=4106 -MaxVariableOutputs=4106 -NumFixedParams=1 -MinVariableInputsList2=3 -MaxVariableInputsList2=3 -MinVariableOutputsList2=3 -MaxVariableOutputsList2=3 -MinVariableInputsList3=132 -MaxVariableInputsList3=132 -MinVariableOutputsList3=132 -MaxVariableOutputsList3=132 -InputSigType1=Digital -OutputSigType1=Digital -InputList2SigType1=Analog -OutputList2SigType1=Analog -InputList3SigType1=Serial -OutputList3SigType1=Serial - -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -InputCue2=[~UNUSED2~] -InputSigType2=Digital -InputCue3=[~UNUSED2~] -InputSigType3=Digital -InputCue4=[~UNUSED2~] -InputSigType4=Digital -InputCue5=[~UNUSED2~] -InputSigType5=Digital -InputCue6=[~UNUSED2~] -InputSigType6=Digital -InputCue7=[~UNUSED2~] -InputSigType7=Digital -InputCue8=[~UNUSED2~] -InputSigType8=Digital -InputCue9=[~UNUSED2~] -InputSigType9=Digital -InputCue10=[~UNUSED2~] -InputSigType10=Digital -InputCue11=[~BeginGroup~]Enable -InputSigType11=Digital -InputCue12=Item 1 Enable -InputSigType12=Digital -InputCue13=Item 2 Enable -InputSigType13=Digital -InputCue14=Item 3 Enable -InputSigType14=Digital -InputCue15=Item 4 Enable -InputSigType15=Digital -InputCue16=Item 5 Enable -InputSigType16=Digital -InputCue17=Item 6 Enable -InputSigType17=Digital -InputCue18=Item 7 Enable -InputSigType18=Digital -InputCue19=Item 8 Enable -InputSigType19=Digital -InputCue20=Item 9 Enable -InputSigType20=Digital -InputCue21=Item 10 Enable -InputSigType21=Digital -InputCue22=Item 11 Enable -InputSigType22=Digital -InputCue23=Item 12 Enable -InputSigType23=Digital -InputCue24=Item 13 Enable -InputSigType24=Digital -InputCue25=Item 14 Enable -InputSigType25=Digital -InputCue26=Item 15 Enable -InputSigType26=Digital -InputCue27=Item 16 Enable -InputSigType27=Digital -InputCue28=Item 17 Enable -InputSigType28=Digital -InputCue29=Item 18 Enable -InputSigType29=Digital -InputCue30=Item 19 Enable -InputSigType30=Digital -InputCue31=Item 20 Enable -InputSigType31=Digital -InputCue32=Item 21 Enable -InputSigType32=Digital -InputCue33=Item 22 Enable -InputSigType33=Digital -InputCue34=Item 23 Enable -InputSigType34=Digital -InputCue35=Item 24 Enable -InputSigType35=Digital -InputCue36=Item 25 Enable -InputSigType36=Digital -InputCue37=Item 26 Enable -InputSigType37=Digital -InputCue38=Item 27 Enable -InputSigType38=Digital -InputCue39=Item 28 Enable -InputSigType39=Digital -InputCue40=Item 29 Enable -InputSigType40=Digital -InputCue41=Item 30 Enable -InputSigType41=Digital -InputCue42=[~UNUSED2~] -InputSigType42=Digital|Analog|Serial|String -InputCue2012=[~EndGroup~]Enable -InputSigType2012=Digital -InputCue2013=[~BeginGroup~]Visible -InputSigType2013=Digital -InputCue2014=Item 1 Visible -InputSigType2014=Digital -InputCue2015=Item 2 Visible -InputSigType2015=Digital -InputCue2016=Item 3 Visible -InputSigType2016=Digital -InputCue2017=Item 4 Visible -InputSigType2017=Digital -InputCue2018=Item 5 Visible -InputSigType2018=Digital -InputCue2019=Item 6 Visible -InputSigType2019=Digital -InputCue2020=Item 7 Visible -InputSigType2020=Digital -InputCue2021=Item 8 Visible -InputSigType2021=Digital -InputCue2022=Item 9 Visible -InputSigType2022=Digital -InputCue2023=Item 10 Visible -InputSigType2023=Digital -InputCue2024=Item 11 Visible -InputSigType2024=Digital -InputCue2025=Item 12 Visible -InputSigType2025=Digital -InputCue2026=Item 13 Visible -InputSigType2026=Digital -InputCue2027=Item 14 Visible -InputSigType2027=Digital -InputCue2028=Item 15 Visible -InputSigType2028=Digital -InputCue2029=Item 16 Visible -InputSigType2029=Digital -InputCue2030=Item 17 Visible -InputSigType2030=Digital -InputCue2031=Item 18 Visible -InputSigType2031=Digital -InputCue2032=Item 19 Visible -InputSigType2032=Digital -InputCue2033=Item 20 Visible -InputSigType2033=Digital -InputCue2034=Item 21 Visible -InputSigType2034=Digital -InputCue2035=Item 22 Visible -InputSigType2035=Digital -InputCue2036=Item 23 Visible -InputSigType2036=Digital -InputCue2037=Item 24 Visible -InputSigType2037=Digital -InputCue2038=Item 25 Visible -InputSigType2038=Digital -InputCue2039=Item 26 Visible -InputSigType2039=Digital -InputCue2040=Item 27 Visible -InputSigType2040=Digital -InputCue2041=Item 28 Visible -InputSigType2041=Digital -InputCue2042=Item 29 Visible -InputSigType2042=Digital -InputCue2043=Item 30 Visible -InputSigType2043=Digital -InputCue2044=[~UNUSED2~] -InputSigType2044=Digital|Analog|Serial|String -InputCue4014=[~EndGroup~]Visible -InputSigType4014=Digital -InputCue4015=[~BeginGroup~]fb -InputSigType4015=Digital -InputCue4016=fb1 -InputSigType4016=Digital -InputCue4017=fb2 -InputSigType4017=Digital -InputCue4018=fb3 -InputSigType4018=Digital -InputCue4019=fb4 -InputSigType4019=Digital -InputCue4020=fb5 -InputSigType4020=Digital -InputCue4021=fb6 -InputSigType4021=Digital -InputCue4022=fb7 -InputSigType4022=Digital -InputCue4023=fb8 -InputSigType4023=Digital -InputCue4024=fb9 -InputSigType4024=Digital -InputCue4025=fb10 -InputSigType4025=Digital -InputCue4026=fb11 -InputSigType4026=Digital -InputCue4027=fb12 -InputSigType4027=Digital -InputCue4028=fb13 -InputSigType4028=Digital -InputCue4029=fb14 -InputSigType4029=Digital -InputCue4030=fb15 -InputSigType4030=Digital -InputCue4031=fb16 -InputSigType4031=Digital -InputCue4032=fb17 -InputSigType4032=Digital -InputCue4033=fb18 -InputSigType4033=Digital -InputCue4034=fb19 -InputSigType4034=Digital -InputCue4035=fb20 -InputSigType4035=Digital -InputCue4036=fb21 -InputSigType4036=Digital -InputCue4037=fb22 -InputSigType4037=Digital -InputCue4038=fb23 -InputSigType4038=Digital -InputCue4039=fb24 -InputSigType4039=Digital -InputCue4040=fb25 -InputSigType4040=Digital -InputCue4041=fb26 -InputSigType4041=Digital -InputCue4042=fb27 -InputSigType4042=Digital -InputCue4043=fb28 -InputSigType4043=Digital -InputCue4044=fb29 -InputSigType4044=Digital -InputCue4045=fb30 -InputSigType4045=Digital -InputCue4046=fb31 -InputSigType4046=Digital -InputCue4047=fb32 -InputSigType4047=Digital -InputCue4048=fb33 -InputSigType4048=Digital -InputCue4049=fb34 -InputSigType4049=Digital -InputCue4050=fb35 -InputSigType4050=Digital -InputCue4051=fb36 -InputSigType4051=Digital -InputCue4052=fb37 -InputSigType4052=Digital -InputCue4053=fb38 -InputSigType4053=Digital -InputCue4054=fb39 -InputSigType4054=Digital -InputCue4055=fb40 -InputSigType4055=Digital -InputCue4056=fb41 -InputSigType4056=Digital -InputCue4057=fb42 -InputSigType4057=Digital -InputCue4058=fb43 -InputSigType4058=Digital -InputCue4059=fb44 -InputSigType4059=Digital -InputCue4060=fb45 -InputSigType4060=Digital -InputCue4061=fb46 -InputSigType4061=Digital -InputCue4062=fb47 -InputSigType4062=Digital -InputCue4063=fb48 -InputSigType4063=Digital -InputCue4064=fb49 -InputSigType4064=Digital -InputCue4065=fb50 -InputSigType4065=Digital -InputCue4066=fb51 -InputSigType4066=Digital -InputCue4067=fb52 -InputSigType4067=Digital -InputCue4068=fb53 -InputSigType4068=Digital -InputCue4069=fb54 -InputSigType4069=Digital -InputCue4070=fb55 -InputSigType4070=Digital -InputCue4071=fb56 -InputSigType4071=Digital -InputCue4072=fb57 -InputSigType4072=Digital -InputCue4073=fb58 -InputSigType4073=Digital -InputCue4074=fb59 -InputSigType4074=Digital -InputCue4075=fb60 -InputSigType4075=Digital -InputCue4076=fb61 -InputSigType4076=Digital -InputCue4077=fb62 -InputSigType4077=Digital -InputCue4078=fb63 -InputSigType4078=Digital -InputCue4079=fb64 -InputSigType4079=Digital -InputCue4080=fb65 -InputSigType4080=Digital -InputCue4081=fb66 -InputSigType4081=Digital -InputCue4082=fb67 -InputSigType4082=Digital -InputCue4083=fb68 -InputSigType4083=Digital -InputCue4084=fb69 -InputSigType4084=Digital -InputCue4085=fb70 -InputSigType4085=Digital -InputCue4086=fb71 -InputSigType4086=Digital -InputCue4087=fb72 -InputSigType4087=Digital -InputCue4088=fb73 -InputSigType4088=Digital -InputCue4089=fb74 -InputSigType4089=Digital -InputCue4090=fb75 -InputSigType4090=Digital -InputCue4091=fb76 -InputSigType4091=Digital -InputCue4092=fb77 -InputSigType4092=Digital -InputCue4093=fb78 -InputSigType4093=Digital -InputCue4094=fb79 -InputSigType4094=Digital -InputCue4095=fb80 -InputSigType4095=Digital -InputCue4096=fb81 -InputSigType4096=Digital -InputCue4097=fb82 -InputSigType4097=Digital -InputCue4098=fb83 -InputSigType4098=Digital -InputCue4099=fb84 -InputSigType4099=Digital -InputCue4100=fb85 -InputSigType4100=Digital -InputCue4101=fb86 -InputSigType4101=Digital -InputCue4102=fb87 -InputSigType4102=Digital -InputCue4103=fb88 -InputSigType4103=Digital -InputCue4104=fb89 -InputSigType4104=Digital -InputCue4105=fb90 -InputSigType4105=Digital -InputCue4106=[~EndGroup~]fb -InputSigType4106=Digital -OutputCue1=Is Moving -OutputSigType1=Digital -OutputCue2=[~UNUSED2~] -OutputSigType2=Digital -OutputCue3=[~UNUSED2~] -OutputSigType3=Digital -OutputCue4=[~UNUSED2~] -OutputSigType4=Digital -OutputCue5=[~UNUSED2~] -OutputSigType5=Digital -OutputCue6=[~UNUSED2~] -OutputSigType6=Digital -OutputCue7=[~UNUSED2~] -OutputSigType7=Digital -OutputCue8=[~UNUSED2~] -OutputSigType8=Digital -OutputCue9=[~UNUSED2~] -OutputSigType9=Digital -OutputCue10=[~UNUSED2~] -OutputSigType10=Digital -OutputCue11=[~BeginGroup~]Enable -OutputSigType11=Digital -OutputCue12=[~UNUSED3~] -OutputSigType12=Digital -OutputCue13=[~UNUSED3~] -OutputSigType13=Digital -OutputCue14=[~UNUSED3~] -OutputSigType14=Digital -OutputCue15=[~UNUSED3~] -OutputSigType15=Digital -OutputCue16=[~UNUSED3~] -OutputSigType16=Digital -OutputCue17=[~UNUSED3~] -OutputSigType17=Digital -OutputCue18=[~UNUSED3~] -OutputSigType18=Digital -OutputCue19=[~UNUSED3~] -OutputSigType19=Digital -OutputCue20=[~UNUSED3~] -OutputSigType20=Digital -OutputCue21=[~UNUSED3~] -OutputSigType21=Digital -OutputCue22=[~UNUSED3~] -OutputSigType22=Digital -OutputCue23=[~UNUSED3~] -OutputSigType23=Digital -OutputCue24=[~UNUSED3~] -OutputSigType24=Digital -OutputCue25=[~UNUSED3~] -OutputSigType25=Digital -OutputCue26=[~UNUSED3~] -OutputSigType26=Digital -OutputCue27=[~UNUSED3~] -OutputSigType27=Digital -OutputCue28=[~UNUSED3~] -OutputSigType28=Digital -OutputCue29=[~UNUSED3~] -OutputSigType29=Digital -OutputCue30=[~UNUSED3~] -OutputSigType30=Digital -OutputCue31=[~UNUSED3~] -OutputSigType31=Digital -OutputCue32=[~UNUSED3~] -OutputSigType32=Digital -OutputCue33=[~UNUSED3~] -OutputSigType33=Digital -OutputCue34=[~UNUSED3~] -OutputSigType34=Digital -OutputCue35=[~UNUSED3~] -OutputSigType35=Digital -OutputCue36=[~UNUSED3~] -OutputSigType36=Digital -OutputCue37=[~UNUSED3~] -OutputSigType37=Digital -OutputCue38=[~UNUSED3~] -OutputSigType38=Digital -OutputCue39=[~UNUSED3~] -OutputSigType39=Digital -OutputCue40=[~UNUSED3~] -OutputSigType40=Digital -OutputCue41=[~UNUSED3~] -OutputSigType41=Digital -OutputCue42=[~UNUSED2~] -OutputSigType42=Digital|Analog|Serial|String -OutputCue2012=[~EndGroup~]Enable -OutputSigType2012=Digital -OutputCue2013=[~BeginGroup~]Visible -OutputSigType2013=Digital -OutputCue2014=[~UNUSED3~] -OutputSigType2014=Digital -OutputCue2015=[~UNUSED3~] -OutputSigType2015=Digital -OutputCue2016=[~UNUSED3~] -OutputSigType2016=Digital -OutputCue2017=[~UNUSED3~] -OutputSigType2017=Digital -OutputCue2018=[~UNUSED3~] -OutputSigType2018=Digital -OutputCue2019=[~UNUSED3~] -OutputSigType2019=Digital -OutputCue2020=[~UNUSED3~] -OutputSigType2020=Digital -OutputCue2021=[~UNUSED3~] -OutputSigType2021=Digital -OutputCue2022=[~UNUSED3~] -OutputSigType2022=Digital -OutputCue2023=[~UNUSED3~] -OutputSigType2023=Digital -OutputCue2024=[~UNUSED3~] -OutputSigType2024=Digital -OutputCue2025=[~UNUSED3~] -OutputSigType2025=Digital -OutputCue2026=[~UNUSED3~] -OutputSigType2026=Digital -OutputCue2027=[~UNUSED3~] -OutputSigType2027=Digital -OutputCue2028=[~UNUSED3~] -OutputSigType2028=Digital -OutputCue2029=[~UNUSED3~] -OutputSigType2029=Digital -OutputCue2030=[~UNUSED3~] -OutputSigType2030=Digital -OutputCue2031=[~UNUSED3~] -OutputSigType2031=Digital -OutputCue2032=[~UNUSED3~] -OutputSigType2032=Digital -OutputCue2033=[~UNUSED3~] -OutputSigType2033=Digital -OutputCue2034=[~UNUSED3~] -OutputSigType2034=Digital -OutputCue2035=[~UNUSED3~] -OutputSigType2035=Digital -OutputCue2036=[~UNUSED3~] -OutputSigType2036=Digital -OutputCue2037=[~UNUSED3~] -OutputSigType2037=Digital -OutputCue2038=[~UNUSED3~] -OutputSigType2038=Digital -OutputCue2039=[~UNUSED3~] -OutputSigType2039=Digital -OutputCue2040=[~UNUSED3~] -OutputSigType2040=Digital -OutputCue2041=[~UNUSED3~] -OutputSigType2041=Digital -OutputCue2042=[~UNUSED3~] -OutputSigType2042=Digital -OutputCue2043=[~UNUSED3~] -OutputSigType2043=Digital -OutputCue2044=[~UNUSED2~] -OutputSigType2044=Digital|Analog|Serial|String -OutputCue4014=[~EndGroup~]Visible -OutputSigType4014=Digital -OutputCue4015=[~BeginGroup~]Press -OutputSigType4015=Digital -OutputCue4016=press1 -OutputSigType4016=Digital -OutputCue4017=press2 -OutputSigType4017=Digital -OutputCue4018=press3 -OutputSigType4018=Digital -OutputCue4019=press4 -OutputSigType4019=Digital -OutputCue4020=press5 -OutputSigType4020=Digital -OutputCue4021=press6 -OutputSigType4021=Digital -OutputCue4022=press7 -OutputSigType4022=Digital -OutputCue4023=press8 -OutputSigType4023=Digital -OutputCue4024=press9 -OutputSigType4024=Digital -OutputCue4025=press10 -OutputSigType4025=Digital -OutputCue4026=press11 -OutputSigType4026=Digital -OutputCue4027=press12 -OutputSigType4027=Digital -OutputCue4028=press13 -OutputSigType4028=Digital -OutputCue4029=press14 -OutputSigType4029=Digital -OutputCue4030=press15 -OutputSigType4030=Digital -OutputCue4031=press16 -OutputSigType4031=Digital -OutputCue4032=press17 -OutputSigType4032=Digital -OutputCue4033=press18 -OutputSigType4033=Digital -OutputCue4034=press19 -OutputSigType4034=Digital -OutputCue4035=press20 -OutputSigType4035=Digital -OutputCue4036=press21 -OutputSigType4036=Digital -OutputCue4037=press22 -OutputSigType4037=Digital -OutputCue4038=press23 -OutputSigType4038=Digital -OutputCue4039=press24 -OutputSigType4039=Digital -OutputCue4040=press25 -OutputSigType4040=Digital -OutputCue4041=press26 -OutputSigType4041=Digital -OutputCue4042=press27 -OutputSigType4042=Digital -OutputCue4043=press28 -OutputSigType4043=Digital -OutputCue4044=press29 -OutputSigType4044=Digital -OutputCue4045=press30 -OutputSigType4045=Digital -OutputCue4046=press31 -OutputSigType4046=Digital -OutputCue4047=press32 -OutputSigType4047=Digital -OutputCue4048=press33 -OutputSigType4048=Digital -OutputCue4049=press34 -OutputSigType4049=Digital -OutputCue4050=press35 -OutputSigType4050=Digital -OutputCue4051=press36 -OutputSigType4051=Digital -OutputCue4052=press37 -OutputSigType4052=Digital -OutputCue4053=press38 -OutputSigType4053=Digital -OutputCue4054=press39 -OutputSigType4054=Digital -OutputCue4055=press40 -OutputSigType4055=Digital -OutputCue4056=press41 -OutputSigType4056=Digital -OutputCue4057=press42 -OutputSigType4057=Digital -OutputCue4058=press43 -OutputSigType4058=Digital -OutputCue4059=press44 -OutputSigType4059=Digital -OutputCue4060=press45 -OutputSigType4060=Digital -OutputCue4061=press46 -OutputSigType4061=Digital -OutputCue4062=press47 -OutputSigType4062=Digital -OutputCue4063=press48 -OutputSigType4063=Digital -OutputCue4064=press49 -OutputSigType4064=Digital -OutputCue4065=press50 -OutputSigType4065=Digital -OutputCue4066=press51 -OutputSigType4066=Digital -OutputCue4067=press52 -OutputSigType4067=Digital -OutputCue4068=press53 -OutputSigType4068=Digital -OutputCue4069=press54 -OutputSigType4069=Digital -OutputCue4070=press55 -OutputSigType4070=Digital -OutputCue4071=press56 -OutputSigType4071=Digital -OutputCue4072=press57 -OutputSigType4072=Digital -OutputCue4073=press58 -OutputSigType4073=Digital -OutputCue4074=press59 -OutputSigType4074=Digital -OutputCue4075=press60 -OutputSigType4075=Digital -OutputCue4076=press61 -OutputSigType4076=Digital -OutputCue4077=press62 -OutputSigType4077=Digital -OutputCue4078=press63 -OutputSigType4078=Digital -OutputCue4079=press64 -OutputSigType4079=Digital -OutputCue4080=press65 -OutputSigType4080=Digital -OutputCue4081=press66 -OutputSigType4081=Digital -OutputCue4082=press67 -OutputSigType4082=Digital -OutputCue4083=press68 -OutputSigType4083=Digital -OutputCue4084=press69 -OutputSigType4084=Digital -OutputCue4085=press70 -OutputSigType4085=Digital -OutputCue4086=press71 -OutputSigType4086=Digital -OutputCue4087=press72 -OutputSigType4087=Digital -OutputCue4088=press73 -OutputSigType4088=Digital -OutputCue4089=press74 -OutputSigType4089=Digital -OutputCue4090=press75 -OutputSigType4090=Digital -OutputCue4091=press76 -OutputSigType4091=Digital -OutputCue4092=press77 -OutputSigType4092=Digital -OutputCue4093=press78 -OutputSigType4093=Digital -OutputCue4094=press79 -OutputSigType4094=Digital -OutputCue4095=press80 -OutputSigType4095=Digital -OutputCue4096=press81 -OutputSigType4096=Digital -OutputCue4097=press82 -OutputSigType4097=Digital -OutputCue4098=press83 -OutputSigType4098=Digital -OutputCue4099=press84 -OutputSigType4099=Digital -OutputCue4100=press85 -OutputSigType4100=Digital -OutputCue4101=press86 -OutputSigType4101=Digital -OutputCue4102=press87 -OutputSigType4102=Digital -OutputCue4103=press88 -OutputSigType4103=Digital -OutputCue4104=press89 -OutputSigType4104=Digital -OutputCue4105=press90 -OutputSigType4105=Digital -OutputCue4106=[~EndGroup~]Press -OutputSigType4106=Digital -InputList2Cue1=[~UNUSED3~] -InputList2SigType1=Analog -InputList2Cue2=Scroll To Item -InputList2SigType2=Analog -InputList2Cue3=Set Number of Items -InputList2SigType3=Analog -OutputList2Cue1=Item Clicked -OutputList2SigType1=Analog -OutputList2Cue2=[~UNUSED3~] -OutputList2SigType2=Analog -OutputList2Cue3=[~UNUSED3~] -OutputList2SigType3=Analog -InputList3Cue1=[~UNUSED2~] -InputList3SigType1=Serial -InputList3Cue2=[~UNUSED2~] -InputList3SigType2=Serial -InputList3Cue3=[~UNUSED2~] -InputList3SigType3=Serial -InputList3Cue4=[~UNUSED2~] -InputList3SigType4=Serial -InputList3Cue5=[~UNUSED2~] -InputList3SigType5=Serial -InputList3Cue6=[~UNUSED2~] -InputList3SigType6=Serial -InputList3Cue7=[~UNUSED2~] -InputList3SigType7=Serial -InputList3Cue8=[~UNUSED2~] -InputList3SigType8=Serial -InputList3Cue9=[~UNUSED2~] -InputList3SigType9=Serial -InputList3Cue10=[~UNUSED2~] -InputList3SigType10=Serial -InputList3Cue11=[~BeginGroup~]text-o -InputList3SigType11=Serial -InputList3Cue12=text-o1 -InputList3SigType12=Serial -InputList3Cue13=text-o2 -InputList3SigType13=Serial -InputList3Cue14=text-o3 -InputList3SigType14=Serial -InputList3Cue15=text-o4 -InputList3SigType15=Serial -InputList3Cue16=text-o5 -InputList3SigType16=Serial -InputList3Cue17=text-o6 -InputList3SigType17=Serial -InputList3Cue18=text-o7 -InputList3SigType18=Serial -InputList3Cue19=text-o8 -InputList3SigType19=Serial -InputList3Cue20=text-o9 -InputList3SigType20=Serial -InputList3Cue21=text-o10 -InputList3SigType21=Serial -InputList3Cue22=text-o11 -InputList3SigType22=Serial -InputList3Cue23=text-o12 -InputList3SigType23=Serial -InputList3Cue24=text-o13 -InputList3SigType24=Serial -InputList3Cue25=text-o14 -InputList3SigType25=Serial -InputList3Cue26=text-o15 -InputList3SigType26=Serial -InputList3Cue27=text-o16 -InputList3SigType27=Serial -InputList3Cue28=text-o17 -InputList3SigType28=Serial -InputList3Cue29=text-o18 -InputList3SigType29=Serial -InputList3Cue30=text-o19 -InputList3SigType30=Serial -InputList3Cue31=text-o20 -InputList3SigType31=Serial -InputList3Cue32=text-o21 -InputList3SigType32=Serial -InputList3Cue33=text-o22 -InputList3SigType33=Serial -InputList3Cue34=text-o23 -InputList3SigType34=Serial -InputList3Cue35=text-o24 -InputList3SigType35=Serial -InputList3Cue36=text-o25 -InputList3SigType36=Serial -InputList3Cue37=text-o26 -InputList3SigType37=Serial -InputList3Cue38=text-o27 -InputList3SigType38=Serial -InputList3Cue39=text-o28 -InputList3SigType39=Serial -InputList3Cue40=text-o29 -InputList3SigType40=Serial -InputList3Cue41=text-o30 -InputList3SigType41=Serial -InputList3Cue42=text-o31 -InputList3SigType42=Serial -InputList3Cue43=text-o32 -InputList3SigType43=Serial -InputList3Cue44=text-o33 -InputList3SigType44=Serial -InputList3Cue45=text-o34 -InputList3SigType45=Serial -InputList3Cue46=text-o35 -InputList3SigType46=Serial -InputList3Cue47=text-o36 -InputList3SigType47=Serial -InputList3Cue48=text-o37 -InputList3SigType48=Serial -InputList3Cue49=text-o38 -InputList3SigType49=Serial -InputList3Cue50=text-o39 -InputList3SigType50=Serial -InputList3Cue51=text-o40 -InputList3SigType51=Serial -InputList3Cue52=text-o41 -InputList3SigType52=Serial -InputList3Cue53=text-o42 -InputList3SigType53=Serial -InputList3Cue54=text-o43 -InputList3SigType54=Serial -InputList3Cue55=text-o44 -InputList3SigType55=Serial -InputList3Cue56=text-o45 -InputList3SigType56=Serial -InputList3Cue57=text-o46 -InputList3SigType57=Serial -InputList3Cue58=text-o47 -InputList3SigType58=Serial -InputList3Cue59=text-o48 -InputList3SigType59=Serial -InputList3Cue60=text-o49 -InputList3SigType60=Serial -InputList3Cue61=text-o50 -InputList3SigType61=Serial -InputList3Cue62=text-o51 -InputList3SigType62=Serial -InputList3Cue63=text-o52 -InputList3SigType63=Serial -InputList3Cue64=text-o53 -InputList3SigType64=Serial -InputList3Cue65=text-o54 -InputList3SigType65=Serial -InputList3Cue66=text-o55 -InputList3SigType66=Serial -InputList3Cue67=text-o56 -InputList3SigType67=Serial -InputList3Cue68=text-o57 -InputList3SigType68=Serial -InputList3Cue69=text-o58 -InputList3SigType69=Serial -InputList3Cue70=text-o59 -InputList3SigType70=Serial -InputList3Cue71=text-o60 -InputList3SigType71=Serial -InputList3Cue72=text-o61 -InputList3SigType72=Serial -InputList3Cue73=text-o62 -InputList3SigType73=Serial -InputList3Cue74=text-o63 -InputList3SigType74=Serial -InputList3Cue75=text-o64 -InputList3SigType75=Serial -InputList3Cue76=text-o65 -InputList3SigType76=Serial -InputList3Cue77=text-o66 -InputList3SigType77=Serial -InputList3Cue78=text-o67 -InputList3SigType78=Serial -InputList3Cue79=text-o68 -InputList3SigType79=Serial -InputList3Cue80=text-o69 -InputList3SigType80=Serial -InputList3Cue81=text-o70 -InputList3SigType81=Serial -InputList3Cue82=text-o71 -InputList3SigType82=Serial -InputList3Cue83=text-o72 -InputList3SigType83=Serial -InputList3Cue84=text-o73 -InputList3SigType84=Serial -InputList3Cue85=text-o74 -InputList3SigType85=Serial -InputList3Cue86=text-o75 -InputList3SigType86=Serial -InputList3Cue87=text-o76 -InputList3SigType87=Serial -InputList3Cue88=text-o77 -InputList3SigType88=Serial -InputList3Cue89=text-o78 -InputList3SigType89=Serial -InputList3Cue90=text-o79 -InputList3SigType90=Serial -InputList3Cue91=text-o80 -InputList3SigType91=Serial -InputList3Cue92=text-o81 -InputList3SigType92=Serial -InputList3Cue93=text-o82 -InputList3SigType93=Serial -InputList3Cue94=text-o83 -InputList3SigType94=Serial -InputList3Cue95=text-o84 -InputList3SigType95=Serial -InputList3Cue96=text-o85 -InputList3SigType96=Serial -InputList3Cue97=text-o86 -InputList3SigType97=Serial -InputList3Cue98=text-o87 -InputList3SigType98=Serial -InputList3Cue99=text-o88 -InputList3SigType99=Serial -InputList3Cue100=text-o89 -InputList3SigType100=Serial -InputList3Cue101=text-o90 -InputList3SigType101=Serial -InputList3Cue102=text-o91 -InputList3SigType102=Serial -InputList3Cue103=text-o92 -InputList3SigType103=Serial -InputList3Cue104=text-o93 -InputList3SigType104=Serial -InputList3Cue105=text-o94 -InputList3SigType105=Serial -InputList3Cue106=text-o95 -InputList3SigType106=Serial -InputList3Cue107=text-o96 -InputList3SigType107=Serial -InputList3Cue108=text-o97 -InputList3SigType108=Serial -InputList3Cue109=text-o98 -InputList3SigType109=Serial -InputList3Cue110=text-o99 -InputList3SigType110=Serial -InputList3Cue111=text-o100 -InputList3SigType111=Serial -InputList3Cue112=text-o101 -InputList3SigType112=Serial -InputList3Cue113=text-o102 -InputList3SigType113=Serial -InputList3Cue114=text-o103 -InputList3SigType114=Serial -InputList3Cue115=text-o104 -InputList3SigType115=Serial -InputList3Cue116=text-o105 -InputList3SigType116=Serial -InputList3Cue117=text-o106 -InputList3SigType117=Serial -InputList3Cue118=text-o107 -InputList3SigType118=Serial -InputList3Cue119=text-o108 -InputList3SigType119=Serial -InputList3Cue120=text-o109 -InputList3SigType120=Serial -InputList3Cue121=text-o110 -InputList3SigType121=Serial -InputList3Cue122=text-o111 -InputList3SigType122=Serial -InputList3Cue123=text-o112 -InputList3SigType123=Serial -InputList3Cue124=text-o113 -InputList3SigType124=Serial -InputList3Cue125=text-o114 -InputList3SigType125=Serial -InputList3Cue126=text-o115 -InputList3SigType126=Serial -InputList3Cue127=text-o116 -InputList3SigType127=Serial -InputList3Cue128=text-o117 -InputList3SigType128=Serial -InputList3Cue129=text-o118 -InputList3SigType129=Serial -InputList3Cue130=text-o119 -InputList3SigType130=Serial -InputList3Cue131=text-o120 -InputList3SigType131=Serial -InputList3Cue132=[~EndGroup~]text-o -InputList3SigType132=Serial -OutputList3Cue1=[~UNUSED2~] -OutputList3SigType1=Serial -OutputList3Cue2=[~UNUSED2~] -OutputList3SigType2=Serial -OutputList3Cue3=[~UNUSED2~] -OutputList3SigType3=Serial -OutputList3Cue4=[~UNUSED2~] -OutputList3SigType4=Serial -OutputList3Cue5=[~UNUSED2~] -OutputList3SigType5=Serial -OutputList3Cue6=[~UNUSED2~] -OutputList3SigType6=Serial -OutputList3Cue7=[~UNUSED2~] -OutputList3SigType7=Serial -OutputList3Cue8=[~UNUSED2~] -OutputList3SigType8=Serial -OutputList3Cue9=[~UNUSED2~] -OutputList3SigType9=Serial -OutputList3Cue10=[~UNUSED2~] -OutputList3SigType10=Serial -OutputList3Cue11=[~BeginGroup~]text-i -OutputList3SigType11=Serial -OutputList3Cue12=text-i1 -OutputList3SigType12=Serial -OutputList3Cue13=text-i2 -OutputList3SigType13=Serial -OutputList3Cue14=text-i3 -OutputList3SigType14=Serial -OutputList3Cue15=text-i4 -OutputList3SigType15=Serial -OutputList3Cue16=text-i5 -OutputList3SigType16=Serial -OutputList3Cue17=text-i6 -OutputList3SigType17=Serial -OutputList3Cue18=text-i7 -OutputList3SigType18=Serial -OutputList3Cue19=text-i8 -OutputList3SigType19=Serial -OutputList3Cue20=text-i9 -OutputList3SigType20=Serial -OutputList3Cue21=text-i10 -OutputList3SigType21=Serial -OutputList3Cue22=text-i11 -OutputList3SigType22=Serial -OutputList3Cue23=text-i12 -OutputList3SigType23=Serial -OutputList3Cue24=text-i13 -OutputList3SigType24=Serial -OutputList3Cue25=text-i14 -OutputList3SigType25=Serial -OutputList3Cue26=text-i15 -OutputList3SigType26=Serial -OutputList3Cue27=text-i16 -OutputList3SigType27=Serial -OutputList3Cue28=text-i17 -OutputList3SigType28=Serial -OutputList3Cue29=text-i18 -OutputList3SigType29=Serial -OutputList3Cue30=text-i19 -OutputList3SigType30=Serial -OutputList3Cue31=text-i20 -OutputList3SigType31=Serial -OutputList3Cue32=text-i21 -OutputList3SigType32=Serial -OutputList3Cue33=text-i22 -OutputList3SigType33=Serial -OutputList3Cue34=text-i23 -OutputList3SigType34=Serial -OutputList3Cue35=text-i24 -OutputList3SigType35=Serial -OutputList3Cue36=text-i25 -OutputList3SigType36=Serial -OutputList3Cue37=text-i26 -OutputList3SigType37=Serial -OutputList3Cue38=text-i27 -OutputList3SigType38=Serial -OutputList3Cue39=text-i28 -OutputList3SigType39=Serial -OutputList3Cue40=text-i29 -OutputList3SigType40=Serial -OutputList3Cue41=text-i30 -OutputList3SigType41=Serial -OutputList3Cue42=text-i31 -OutputList3SigType42=Serial -OutputList3Cue43=text-i32 -OutputList3SigType43=Serial -OutputList3Cue44=text-i33 -OutputList3SigType44=Serial -OutputList3Cue45=text-i34 -OutputList3SigType45=Serial -OutputList3Cue46=text-i35 -OutputList3SigType46=Serial -OutputList3Cue47=text-i36 -OutputList3SigType47=Serial -OutputList3Cue48=text-i37 -OutputList3SigType48=Serial -OutputList3Cue49=text-i38 -OutputList3SigType49=Serial -OutputList3Cue50=text-i39 -OutputList3SigType50=Serial -OutputList3Cue51=text-i40 -OutputList3SigType51=Serial -OutputList3Cue52=text-i41 -OutputList3SigType52=Serial -OutputList3Cue53=text-i42 -OutputList3SigType53=Serial -OutputList3Cue54=text-i43 -OutputList3SigType54=Serial -OutputList3Cue55=text-i44 -OutputList3SigType55=Serial -OutputList3Cue56=text-i45 -OutputList3SigType56=Serial -OutputList3Cue57=text-i46 -OutputList3SigType57=Serial -OutputList3Cue58=text-i47 -OutputList3SigType58=Serial -OutputList3Cue59=text-i48 -OutputList3SigType59=Serial -OutputList3Cue60=text-i49 -OutputList3SigType60=Serial -OutputList3Cue61=text-i50 -OutputList3SigType61=Serial -OutputList3Cue62=text-i51 -OutputList3SigType62=Serial -OutputList3Cue63=text-i52 -OutputList3SigType63=Serial -OutputList3Cue64=text-i53 -OutputList3SigType64=Serial -OutputList3Cue65=text-i54 -OutputList3SigType65=Serial -OutputList3Cue66=text-i55 -OutputList3SigType66=Serial -OutputList3Cue67=text-i56 -OutputList3SigType67=Serial -OutputList3Cue68=text-i57 -OutputList3SigType68=Serial -OutputList3Cue69=text-i58 -OutputList3SigType69=Serial -OutputList3Cue70=text-i59 -OutputList3SigType70=Serial -OutputList3Cue71=text-i60 -OutputList3SigType71=Serial -OutputList3Cue72=text-i61 -OutputList3SigType72=Serial -OutputList3Cue73=text-i62 -OutputList3SigType73=Serial -OutputList3Cue74=text-i63 -OutputList3SigType74=Serial -OutputList3Cue75=text-i64 -OutputList3SigType75=Serial -OutputList3Cue76=text-i65 -OutputList3SigType76=Serial -OutputList3Cue77=text-i66 -OutputList3SigType77=Serial -OutputList3Cue78=text-i67 -OutputList3SigType78=Serial -OutputList3Cue79=text-i68 -OutputList3SigType79=Serial -OutputList3Cue80=text-i69 -OutputList3SigType80=Serial -OutputList3Cue81=text-i70 -OutputList3SigType81=Serial -OutputList3Cue82=text-i71 -OutputList3SigType82=Serial -OutputList3Cue83=text-i72 -OutputList3SigType83=Serial -OutputList3Cue84=text-i73 -OutputList3SigType84=Serial -OutputList3Cue85=text-i74 -OutputList3SigType85=Serial -OutputList3Cue86=text-i75 -OutputList3SigType86=Serial -OutputList3Cue87=text-i76 -OutputList3SigType87=Serial -OutputList3Cue88=text-i77 -OutputList3SigType88=Serial -OutputList3Cue89=text-i78 -OutputList3SigType89=Serial -OutputList3Cue90=text-i79 -OutputList3SigType90=Serial -OutputList3Cue91=text-i80 -OutputList3SigType91=Serial -OutputList3Cue92=text-i81 -OutputList3SigType92=Serial -OutputList3Cue93=text-i82 -OutputList3SigType93=Serial -OutputList3Cue94=text-i83 -OutputList3SigType94=Serial -OutputList3Cue95=text-i84 -OutputList3SigType95=Serial -OutputList3Cue96=text-i85 -OutputList3SigType96=Serial -OutputList3Cue97=text-i86 -OutputList3SigType97=Serial -OutputList3Cue98=text-i87 -OutputList3SigType98=Serial -OutputList3Cue99=text-i88 -OutputList3SigType99=Serial -OutputList3Cue100=text-i89 -OutputList3SigType100=Serial -OutputList3Cue101=text-i90 -OutputList3SigType101=Serial -OutputList3Cue102=text-i91 -OutputList3SigType102=Serial -OutputList3Cue103=text-i92 -OutputList3SigType103=Serial -OutputList3Cue104=text-i93 -OutputList3SigType104=Serial -OutputList3Cue105=text-i94 -OutputList3SigType105=Serial -OutputList3Cue106=text-i95 -OutputList3SigType106=Serial -OutputList3Cue107=text-i96 -OutputList3SigType107=Serial -OutputList3Cue108=text-i97 -OutputList3SigType108=Serial -OutputList3Cue109=text-i98 -OutputList3SigType109=Serial -OutputList3Cue110=text-i99 -OutputList3SigType110=Serial -OutputList3Cue111=text-i100 -OutputList3SigType111=Serial -OutputList3Cue112=text-i101 -OutputList3SigType112=Serial -OutputList3Cue113=text-i102 -OutputList3SigType113=Serial -OutputList3Cue114=text-i103 -OutputList3SigType114=Serial -OutputList3Cue115=text-i104 -OutputList3SigType115=Serial -OutputList3Cue116=text-i105 -OutputList3SigType116=Serial -OutputList3Cue117=text-i106 -OutputList3SigType117=Serial -OutputList3Cue118=text-i107 -OutputList3SigType118=Serial -OutputList3Cue119=text-i108 -OutputList3SigType119=Serial -OutputList3Cue120=text-i109 -OutputList3SigType120=Serial -OutputList3Cue121=text-i110 -OutputList3SigType121=Serial -OutputList3Cue122=text-i111 -OutputList3SigType122=Serial -OutputList3Cue123=text-i112 -OutputList3SigType123=Serial -OutputList3Cue124=text-i113 -OutputList3SigType124=Serial -OutputList3Cue125=text-i114 -OutputList3SigType125=Serial -OutputList3Cue126=text-i115 -OutputList3SigType126=Serial -OutputList3Cue127=text-i116 -OutputList3SigType127=Serial -OutputList3Cue128=text-i117 -OutputList3SigType128=Serial -OutputList3Cue129=text-i118 -OutputList3SigType129=Serial -OutputList3Cue130=text-i119 -OutputList3SigType130=Serial -OutputList3Cue131=text-i120 -OutputList3SigType131=Serial -OutputList3Cue132=[~EndGroup~]text-i -OutputList3SigType132=Serial -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=15 -CedH=15 -SmartObjId=3333d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=15 -Tp=1 -HD=TRUE -DV=3333d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=15 -Name=PepperDash Essentials iPad_[B.AV] Source-Set Top Box Backer_CATV Icon List Vertical.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials iPad_[Z.Dialogs] Call List_Subpage Reference List Vertical_2.ced -Hint=Subpage Reference List Vertical_2 (Smart Object ID=1001) -Code=16 -SGControlType=Subpage Reference List Vertical -SGControlName=Subpage Reference List Vertical_2 -GUID=5F63F5C2-A987-4957-9243-C28805CE297E -SmplCName=PepperDash Essentials iPad_[Z.Dialogs] Call List_Subpage Reference List Vertical_2.ced -SMWRev=4.02.20 -Expand=expand_random -HelpID=10125 -Render=8 -;Define the number of inputs, outputs and parameters -MinVariableInputs=4116 -MaxVariableInputs=4116 -MinVariableOutputs=4116 -MaxVariableOutputs=4116 -NumFixedParams=1 -MinVariableInputsList2=112 -MaxVariableInputsList2=112 -MinVariableOutputsList2=112 -MaxVariableOutputsList2=112 -MinVariableInputsList3=112 -MaxVariableInputsList3=112 -MinVariableOutputsList3=112 -MaxVariableOutputsList3=112 -InputSigType1=Digital -OutputSigType1=Digital -InputList2SigType1=Analog -OutputList2SigType1=Analog -InputList3SigType1=Serial -OutputList3SigType1=Serial - -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -InputCue2=[~UNUSED2~] -InputSigType2=Digital -InputCue3=[~UNUSED2~] -InputSigType3=Digital -InputCue4=[~UNUSED2~] -InputSigType4=Digital -InputCue5=[~UNUSED2~] -InputSigType5=Digital -InputCue6=[~UNUSED2~] -InputSigType6=Digital -InputCue7=[~UNUSED2~] -InputSigType7=Digital -InputCue8=[~UNUSED2~] -InputSigType8=Digital -InputCue9=[~UNUSED2~] -InputSigType9=Digital -InputCue10=[~UNUSED2~] -InputSigType10=Digital -InputCue11=[~BeginGroup~]Enable -InputSigType11=Digital -InputCue12=Item 1 Enable -InputSigType12=Digital -InputCue13=Item 2 Enable -InputSigType13=Digital -InputCue14=Item 3 Enable -InputSigType14=Digital -InputCue15=Item 4 Enable -InputSigType15=Digital -InputCue16=Item 5 Enable -InputSigType16=Digital -InputCue17=Item 6 Enable -InputSigType17=Digital -InputCue18=Item 7 Enable -InputSigType18=Digital -InputCue19=Item 8 Enable -InputSigType19=Digital -InputCue20=Item 9 Enable -InputSigType20=Digital -InputCue21=Item 10 Enable -InputSigType21=Digital -InputCue22=Item 11 Enable -InputSigType22=Digital -InputCue23=Item 12 Enable -InputSigType23=Digital -InputCue24=Item 13 Enable -InputSigType24=Digital -InputCue25=Item 14 Enable -InputSigType25=Digital -InputCue26=Item 15 Enable -InputSigType26=Digital -InputCue27=Item 16 Enable -InputSigType27=Digital -InputCue28=Item 17 Enable -InputSigType28=Digital -InputCue29=Item 18 Enable -InputSigType29=Digital -InputCue30=Item 19 Enable -InputSigType30=Digital -InputCue31=Item 20 Enable -InputSigType31=Digital -InputCue32=[~UNUSED2~] -InputSigType32=Digital|Analog|Serial|String -InputCue2012=[~EndGroup~]Enable -InputSigType2012=Digital -InputCue2013=[~BeginGroup~]Visible -InputSigType2013=Digital -InputCue2014=Item 1 Visible -InputSigType2014=Digital -InputCue2015=Item 2 Visible -InputSigType2015=Digital -InputCue2016=Item 3 Visible -InputSigType2016=Digital -InputCue2017=Item 4 Visible -InputSigType2017=Digital -InputCue2018=Item 5 Visible -InputSigType2018=Digital -InputCue2019=Item 6 Visible -InputSigType2019=Digital -InputCue2020=Item 7 Visible -InputSigType2020=Digital -InputCue2021=Item 8 Visible -InputSigType2021=Digital -InputCue2022=Item 9 Visible -InputSigType2022=Digital -InputCue2023=Item 10 Visible -InputSigType2023=Digital -InputCue2024=Item 11 Visible -InputSigType2024=Digital -InputCue2025=Item 12 Visible -InputSigType2025=Digital -InputCue2026=Item 13 Visible -InputSigType2026=Digital -InputCue2027=Item 14 Visible -InputSigType2027=Digital -InputCue2028=Item 15 Visible -InputSigType2028=Digital -InputCue2029=Item 16 Visible -InputSigType2029=Digital -InputCue2030=Item 17 Visible -InputSigType2030=Digital -InputCue2031=Item 18 Visible -InputSigType2031=Digital -InputCue2032=Item 19 Visible -InputSigType2032=Digital -InputCue2033=Item 20 Visible -InputSigType2033=Digital -InputCue2034=[~UNUSED2~] -InputSigType2034=Digital|Analog|Serial|String -InputCue4014=[~EndGroup~]Visible -InputSigType4014=Digital -InputCue4015=[~BeginGroup~]fb -InputSigType4015=Digital -InputCue4016=fb1 -InputSigType4016=Digital -InputCue4017=fb2 -InputSigType4017=Digital -InputCue4018=fb3 -InputSigType4018=Digital -InputCue4019=fb4 -InputSigType4019=Digital -InputCue4020=fb5 -InputSigType4020=Digital -InputCue4021=fb6 -InputSigType4021=Digital -InputCue4022=fb7 -InputSigType4022=Digital -InputCue4023=fb8 -InputSigType4023=Digital -InputCue4024=fb9 -InputSigType4024=Digital -InputCue4025=fb10 -InputSigType4025=Digital -InputCue4026=fb11 -InputSigType4026=Digital -InputCue4027=fb12 -InputSigType4027=Digital -InputCue4028=fb13 -InputSigType4028=Digital -InputCue4029=fb14 -InputSigType4029=Digital -InputCue4030=fb15 -InputSigType4030=Digital -InputCue4031=fb16 -InputSigType4031=Digital -InputCue4032=fb17 -InputSigType4032=Digital -InputCue4033=fb18 -InputSigType4033=Digital -InputCue4034=fb19 -InputSigType4034=Digital -InputCue4035=fb20 -InputSigType4035=Digital -InputCue4036=fb21 -InputSigType4036=Digital -InputCue4037=fb22 -InputSigType4037=Digital -InputCue4038=fb23 -InputSigType4038=Digital -InputCue4039=fb24 -InputSigType4039=Digital -InputCue4040=fb25 -InputSigType4040=Digital -InputCue4041=fb26 -InputSigType4041=Digital -InputCue4042=fb27 -InputSigType4042=Digital -InputCue4043=fb28 -InputSigType4043=Digital -InputCue4044=fb29 -InputSigType4044=Digital -InputCue4045=fb30 -InputSigType4045=Digital -InputCue4046=fb31 -InputSigType4046=Digital -InputCue4047=fb32 -InputSigType4047=Digital -InputCue4048=fb33 -InputSigType4048=Digital -InputCue4049=fb34 -InputSigType4049=Digital -InputCue4050=fb35 -InputSigType4050=Digital -InputCue4051=fb36 -InputSigType4051=Digital -InputCue4052=fb37 -InputSigType4052=Digital -InputCue4053=fb38 -InputSigType4053=Digital -InputCue4054=fb39 -InputSigType4054=Digital -InputCue4055=fb40 -InputSigType4055=Digital -InputCue4056=fb41 -InputSigType4056=Digital -InputCue4057=fb42 -InputSigType4057=Digital -InputCue4058=fb43 -InputSigType4058=Digital -InputCue4059=fb44 -InputSigType4059=Digital -InputCue4060=fb45 -InputSigType4060=Digital -InputCue4061=fb46 -InputSigType4061=Digital -InputCue4062=fb47 -InputSigType4062=Digital -InputCue4063=fb48 -InputSigType4063=Digital -InputCue4064=fb49 -InputSigType4064=Digital -InputCue4065=fb50 -InputSigType4065=Digital -InputCue4066=fb51 -InputSigType4066=Digital -InputCue4067=fb52 -InputSigType4067=Digital -InputCue4068=fb53 -InputSigType4068=Digital -InputCue4069=fb54 -InputSigType4069=Digital -InputCue4070=fb55 -InputSigType4070=Digital -InputCue4071=fb56 -InputSigType4071=Digital -InputCue4072=fb57 -InputSigType4072=Digital -InputCue4073=fb58 -InputSigType4073=Digital -InputCue4074=fb59 -InputSigType4074=Digital -InputCue4075=fb60 -InputSigType4075=Digital -InputCue4076=fb61 -InputSigType4076=Digital -InputCue4077=fb62 -InputSigType4077=Digital -InputCue4078=fb63 -InputSigType4078=Digital -InputCue4079=fb64 -InputSigType4079=Digital -InputCue4080=fb65 -InputSigType4080=Digital -InputCue4081=fb66 -InputSigType4081=Digital -InputCue4082=fb67 -InputSigType4082=Digital -InputCue4083=fb68 -InputSigType4083=Digital -InputCue4084=fb69 -InputSigType4084=Digital -InputCue4085=fb70 -InputSigType4085=Digital -InputCue4086=fb71 -InputSigType4086=Digital -InputCue4087=fb72 -InputSigType4087=Digital -InputCue4088=fb73 -InputSigType4088=Digital -InputCue4089=fb74 -InputSigType4089=Digital -InputCue4090=fb75 -InputSigType4090=Digital -InputCue4091=fb76 -InputSigType4091=Digital -InputCue4092=fb77 -InputSigType4092=Digital -InputCue4093=fb78 -InputSigType4093=Digital -InputCue4094=fb79 -InputSigType4094=Digital -InputCue4095=fb80 -InputSigType4095=Digital -InputCue4096=fb81 -InputSigType4096=Digital -InputCue4097=fb82 -InputSigType4097=Digital -InputCue4098=fb83 -InputSigType4098=Digital -InputCue4099=fb84 -InputSigType4099=Digital -InputCue4100=fb85 -InputSigType4100=Digital -InputCue4101=fb86 -InputSigType4101=Digital -InputCue4102=fb87 -InputSigType4102=Digital -InputCue4103=fb88 -InputSigType4103=Digital -InputCue4104=fb89 -InputSigType4104=Digital -InputCue4105=fb90 -InputSigType4105=Digital -InputCue4106=fb91 -InputSigType4106=Digital -InputCue4107=fb92 -InputSigType4107=Digital -InputCue4108=fb93 -InputSigType4108=Digital -InputCue4109=fb94 -InputSigType4109=Digital -InputCue4110=fb95 -InputSigType4110=Digital -InputCue4111=fb96 -InputSigType4111=Digital -InputCue4112=fb97 -InputSigType4112=Digital -InputCue4113=fb98 -InputSigType4113=Digital -InputCue4114=fb99 -InputSigType4114=Digital -InputCue4115=fb100 -InputSigType4115=Digital -InputCue4116=[~EndGroup~]fb -InputSigType4116=Digital -OutputCue1=Is Moving -OutputSigType1=Digital -OutputCue2=[~UNUSED2~] -OutputSigType2=Digital -OutputCue3=[~UNUSED2~] -OutputSigType3=Digital -OutputCue4=[~UNUSED2~] -OutputSigType4=Digital -OutputCue5=[~UNUSED2~] -OutputSigType5=Digital -OutputCue6=[~UNUSED2~] -OutputSigType6=Digital -OutputCue7=[~UNUSED2~] -OutputSigType7=Digital -OutputCue8=[~UNUSED2~] -OutputSigType8=Digital -OutputCue9=[~UNUSED2~] -OutputSigType9=Digital -OutputCue10=[~UNUSED2~] -OutputSigType10=Digital -OutputCue11=[~BeginGroup~]Enable -OutputSigType11=Digital -OutputCue12=[~UNUSED3~] -OutputSigType12=Digital -OutputCue13=[~UNUSED3~] -OutputSigType13=Digital -OutputCue14=[~UNUSED3~] -OutputSigType14=Digital -OutputCue15=[~UNUSED3~] -OutputSigType15=Digital -OutputCue16=[~UNUSED3~] -OutputSigType16=Digital -OutputCue17=[~UNUSED3~] -OutputSigType17=Digital -OutputCue18=[~UNUSED3~] -OutputSigType18=Digital -OutputCue19=[~UNUSED3~] -OutputSigType19=Digital -OutputCue20=[~UNUSED3~] -OutputSigType20=Digital -OutputCue21=[~UNUSED3~] -OutputSigType21=Digital -OutputCue22=[~UNUSED3~] -OutputSigType22=Digital -OutputCue23=[~UNUSED3~] -OutputSigType23=Digital -OutputCue24=[~UNUSED3~] -OutputSigType24=Digital -OutputCue25=[~UNUSED3~] -OutputSigType25=Digital -OutputCue26=[~UNUSED3~] -OutputSigType26=Digital -OutputCue27=[~UNUSED3~] -OutputSigType27=Digital -OutputCue28=[~UNUSED3~] -OutputSigType28=Digital -OutputCue29=[~UNUSED3~] -OutputSigType29=Digital -OutputCue30=[~UNUSED3~] -OutputSigType30=Digital -OutputCue31=[~UNUSED3~] -OutputSigType31=Digital -OutputCue32=[~UNUSED2~] -OutputSigType32=Digital|Analog|Serial|String -OutputCue2012=[~EndGroup~]Enable -OutputSigType2012=Digital -OutputCue2013=[~BeginGroup~]Visible -OutputSigType2013=Digital -OutputCue2014=[~UNUSED3~] -OutputSigType2014=Digital -OutputCue2015=[~UNUSED3~] -OutputSigType2015=Digital -OutputCue2016=[~UNUSED3~] -OutputSigType2016=Digital -OutputCue2017=[~UNUSED3~] -OutputSigType2017=Digital -OutputCue2018=[~UNUSED3~] -OutputSigType2018=Digital -OutputCue2019=[~UNUSED3~] -OutputSigType2019=Digital -OutputCue2020=[~UNUSED3~] -OutputSigType2020=Digital -OutputCue2021=[~UNUSED3~] -OutputSigType2021=Digital -OutputCue2022=[~UNUSED3~] -OutputSigType2022=Digital -OutputCue2023=[~UNUSED3~] -OutputSigType2023=Digital -OutputCue2024=[~UNUSED3~] -OutputSigType2024=Digital -OutputCue2025=[~UNUSED3~] -OutputSigType2025=Digital -OutputCue2026=[~UNUSED3~] -OutputSigType2026=Digital -OutputCue2027=[~UNUSED3~] -OutputSigType2027=Digital -OutputCue2028=[~UNUSED3~] -OutputSigType2028=Digital -OutputCue2029=[~UNUSED3~] -OutputSigType2029=Digital -OutputCue2030=[~UNUSED3~] -OutputSigType2030=Digital -OutputCue2031=[~UNUSED3~] -OutputSigType2031=Digital -OutputCue2032=[~UNUSED3~] -OutputSigType2032=Digital -OutputCue2033=[~UNUSED3~] -OutputSigType2033=Digital -OutputCue2034=[~UNUSED2~] -OutputSigType2034=Digital|Analog|Serial|String -OutputCue4014=[~EndGroup~]Visible -OutputSigType4014=Digital -OutputCue4015=[~BeginGroup~]Press -OutputSigType4015=Digital -OutputCue4016=press1 -OutputSigType4016=Digital -OutputCue4017=press2 -OutputSigType4017=Digital -OutputCue4018=press3 -OutputSigType4018=Digital -OutputCue4019=press4 -OutputSigType4019=Digital -OutputCue4020=press5 -OutputSigType4020=Digital -OutputCue4021=press6 -OutputSigType4021=Digital -OutputCue4022=press7 -OutputSigType4022=Digital -OutputCue4023=press8 -OutputSigType4023=Digital -OutputCue4024=press9 -OutputSigType4024=Digital -OutputCue4025=press10 -OutputSigType4025=Digital -OutputCue4026=press11 -OutputSigType4026=Digital -OutputCue4027=press12 -OutputSigType4027=Digital -OutputCue4028=press13 -OutputSigType4028=Digital -OutputCue4029=press14 -OutputSigType4029=Digital -OutputCue4030=press15 -OutputSigType4030=Digital -OutputCue4031=press16 -OutputSigType4031=Digital -OutputCue4032=press17 -OutputSigType4032=Digital -OutputCue4033=press18 -OutputSigType4033=Digital -OutputCue4034=press19 -OutputSigType4034=Digital -OutputCue4035=press20 -OutputSigType4035=Digital -OutputCue4036=press21 -OutputSigType4036=Digital -OutputCue4037=press22 -OutputSigType4037=Digital -OutputCue4038=press23 -OutputSigType4038=Digital -OutputCue4039=press24 -OutputSigType4039=Digital -OutputCue4040=press25 -OutputSigType4040=Digital -OutputCue4041=press26 -OutputSigType4041=Digital -OutputCue4042=press27 -OutputSigType4042=Digital -OutputCue4043=press28 -OutputSigType4043=Digital -OutputCue4044=press29 -OutputSigType4044=Digital -OutputCue4045=press30 -OutputSigType4045=Digital -OutputCue4046=press31 -OutputSigType4046=Digital -OutputCue4047=press32 -OutputSigType4047=Digital -OutputCue4048=press33 -OutputSigType4048=Digital -OutputCue4049=press34 -OutputSigType4049=Digital -OutputCue4050=press35 -OutputSigType4050=Digital -OutputCue4051=press36 -OutputSigType4051=Digital -OutputCue4052=press37 -OutputSigType4052=Digital -OutputCue4053=press38 -OutputSigType4053=Digital -OutputCue4054=press39 -OutputSigType4054=Digital -OutputCue4055=press40 -OutputSigType4055=Digital -OutputCue4056=press41 -OutputSigType4056=Digital -OutputCue4057=press42 -OutputSigType4057=Digital -OutputCue4058=press43 -OutputSigType4058=Digital -OutputCue4059=press44 -OutputSigType4059=Digital -OutputCue4060=press45 -OutputSigType4060=Digital -OutputCue4061=press46 -OutputSigType4061=Digital -OutputCue4062=press47 -OutputSigType4062=Digital -OutputCue4063=press48 -OutputSigType4063=Digital -OutputCue4064=press49 -OutputSigType4064=Digital -OutputCue4065=press50 -OutputSigType4065=Digital -OutputCue4066=press51 -OutputSigType4066=Digital -OutputCue4067=press52 -OutputSigType4067=Digital -OutputCue4068=press53 -OutputSigType4068=Digital -OutputCue4069=press54 -OutputSigType4069=Digital -OutputCue4070=press55 -OutputSigType4070=Digital -OutputCue4071=press56 -OutputSigType4071=Digital -OutputCue4072=press57 -OutputSigType4072=Digital -OutputCue4073=press58 -OutputSigType4073=Digital -OutputCue4074=press59 -OutputSigType4074=Digital -OutputCue4075=press60 -OutputSigType4075=Digital -OutputCue4076=press61 -OutputSigType4076=Digital -OutputCue4077=press62 -OutputSigType4077=Digital -OutputCue4078=press63 -OutputSigType4078=Digital -OutputCue4079=press64 -OutputSigType4079=Digital -OutputCue4080=press65 -OutputSigType4080=Digital -OutputCue4081=press66 -OutputSigType4081=Digital -OutputCue4082=press67 -OutputSigType4082=Digital -OutputCue4083=press68 -OutputSigType4083=Digital -OutputCue4084=press69 -OutputSigType4084=Digital -OutputCue4085=press70 -OutputSigType4085=Digital -OutputCue4086=press71 -OutputSigType4086=Digital -OutputCue4087=press72 -OutputSigType4087=Digital -OutputCue4088=press73 -OutputSigType4088=Digital -OutputCue4089=press74 -OutputSigType4089=Digital -OutputCue4090=press75 -OutputSigType4090=Digital -OutputCue4091=press76 -OutputSigType4091=Digital -OutputCue4092=press77 -OutputSigType4092=Digital -OutputCue4093=press78 -OutputSigType4093=Digital -OutputCue4094=press79 -OutputSigType4094=Digital -OutputCue4095=press80 -OutputSigType4095=Digital -OutputCue4096=press81 -OutputSigType4096=Digital -OutputCue4097=press82 -OutputSigType4097=Digital -OutputCue4098=press83 -OutputSigType4098=Digital -OutputCue4099=press84 -OutputSigType4099=Digital -OutputCue4100=press85 -OutputSigType4100=Digital -OutputCue4101=press86 -OutputSigType4101=Digital -OutputCue4102=press87 -OutputSigType4102=Digital -OutputCue4103=press88 -OutputSigType4103=Digital -OutputCue4104=press89 -OutputSigType4104=Digital -OutputCue4105=press90 -OutputSigType4105=Digital -OutputCue4106=press91 -OutputSigType4106=Digital -OutputCue4107=press92 -OutputSigType4107=Digital -OutputCue4108=press93 -OutputSigType4108=Digital -OutputCue4109=press94 -OutputSigType4109=Digital -OutputCue4110=press95 -OutputSigType4110=Digital -OutputCue4111=press96 -OutputSigType4111=Digital -OutputCue4112=press97 -OutputSigType4112=Digital -OutputCue4113=press98 -OutputSigType4113=Digital -OutputCue4114=press99 -OutputSigType4114=Digital -OutputCue4115=press100 -OutputSigType4115=Digital -OutputCue4116=[~EndGroup~]Press -OutputSigType4116=Digital -InputList2Cue1=[~UNUSED3~] -InputList2SigType1=Analog -InputList2Cue2=Scroll To Item -InputList2SigType2=Analog -InputList2Cue3=Set Number of Items -InputList2SigType3=Analog -InputList2Cue4=[~UNUSED2~] -InputList2SigType4=Analog -InputList2Cue5=[~UNUSED2~] -InputList2SigType5=Analog -InputList2Cue6=[~UNUSED2~] -InputList2SigType6=Analog -InputList2Cue7=[~UNUSED2~] -InputList2SigType7=Analog -InputList2Cue8=[~UNUSED2~] -InputList2SigType8=Analog -InputList2Cue9=[~UNUSED2~] -InputList2SigType9=Analog -InputList2Cue10=[~UNUSED2~] -InputList2SigType10=Analog -InputList2Cue11=[~BeginGroup~]an_fb -InputList2SigType11=Analog -InputList2Cue12=an_fb1 -InputList2SigType12=Analog -InputList2Cue13=an_fb2 -InputList2SigType13=Analog -InputList2Cue14=an_fb3 -InputList2SigType14=Analog -InputList2Cue15=an_fb4 -InputList2SigType15=Analog -InputList2Cue16=an_fb5 -InputList2SigType16=Analog -InputList2Cue17=an_fb6 -InputList2SigType17=Analog -InputList2Cue18=an_fb7 -InputList2SigType18=Analog -InputList2Cue19=an_fb8 -InputList2SigType19=Analog -InputList2Cue20=an_fb9 -InputList2SigType20=Analog -InputList2Cue21=an_fb10 -InputList2SigType21=Analog -InputList2Cue22=an_fb11 -InputList2SigType22=Analog -InputList2Cue23=an_fb12 -InputList2SigType23=Analog -InputList2Cue24=an_fb13 -InputList2SigType24=Analog -InputList2Cue25=an_fb14 -InputList2SigType25=Analog -InputList2Cue26=an_fb15 -InputList2SigType26=Analog -InputList2Cue27=an_fb16 -InputList2SigType27=Analog -InputList2Cue28=an_fb17 -InputList2SigType28=Analog -InputList2Cue29=an_fb18 -InputList2SigType29=Analog -InputList2Cue30=an_fb19 -InputList2SigType30=Analog -InputList2Cue31=an_fb20 -InputList2SigType31=Analog -InputList2Cue32=an_fb21 -InputList2SigType32=Analog -InputList2Cue33=an_fb22 -InputList2SigType33=Analog -InputList2Cue34=an_fb23 -InputList2SigType34=Analog -InputList2Cue35=an_fb24 -InputList2SigType35=Analog -InputList2Cue36=an_fb25 -InputList2SigType36=Analog -InputList2Cue37=an_fb26 -InputList2SigType37=Analog -InputList2Cue38=an_fb27 -InputList2SigType38=Analog -InputList2Cue39=an_fb28 -InputList2SigType39=Analog -InputList2Cue40=an_fb29 -InputList2SigType40=Analog -InputList2Cue41=an_fb30 -InputList2SigType41=Analog -InputList2Cue42=an_fb31 -InputList2SigType42=Analog -InputList2Cue43=an_fb32 -InputList2SigType43=Analog -InputList2Cue44=an_fb33 -InputList2SigType44=Analog -InputList2Cue45=an_fb34 -InputList2SigType45=Analog -InputList2Cue46=an_fb35 -InputList2SigType46=Analog -InputList2Cue47=an_fb36 -InputList2SigType47=Analog -InputList2Cue48=an_fb37 -InputList2SigType48=Analog -InputList2Cue49=an_fb38 -InputList2SigType49=Analog -InputList2Cue50=an_fb39 -InputList2SigType50=Analog -InputList2Cue51=an_fb40 -InputList2SigType51=Analog -InputList2Cue52=an_fb41 -InputList2SigType52=Analog -InputList2Cue53=an_fb42 -InputList2SigType53=Analog -InputList2Cue54=an_fb43 -InputList2SigType54=Analog -InputList2Cue55=an_fb44 -InputList2SigType55=Analog -InputList2Cue56=an_fb45 -InputList2SigType56=Analog -InputList2Cue57=an_fb46 -InputList2SigType57=Analog -InputList2Cue58=an_fb47 -InputList2SigType58=Analog -InputList2Cue59=an_fb48 -InputList2SigType59=Analog -InputList2Cue60=an_fb49 -InputList2SigType60=Analog -InputList2Cue61=an_fb50 -InputList2SigType61=Analog -InputList2Cue62=an_fb51 -InputList2SigType62=Analog -InputList2Cue63=an_fb52 -InputList2SigType63=Analog -InputList2Cue64=an_fb53 -InputList2SigType64=Analog -InputList2Cue65=an_fb54 -InputList2SigType65=Analog -InputList2Cue66=an_fb55 -InputList2SigType66=Analog -InputList2Cue67=an_fb56 -InputList2SigType67=Analog -InputList2Cue68=an_fb57 -InputList2SigType68=Analog -InputList2Cue69=an_fb58 -InputList2SigType69=Analog -InputList2Cue70=an_fb59 -InputList2SigType70=Analog -InputList2Cue71=an_fb60 -InputList2SigType71=Analog -InputList2Cue72=an_fb61 -InputList2SigType72=Analog -InputList2Cue73=an_fb62 -InputList2SigType73=Analog -InputList2Cue74=an_fb63 -InputList2SigType74=Analog -InputList2Cue75=an_fb64 -InputList2SigType75=Analog -InputList2Cue76=an_fb65 -InputList2SigType76=Analog -InputList2Cue77=an_fb66 -InputList2SigType77=Analog -InputList2Cue78=an_fb67 -InputList2SigType78=Analog -InputList2Cue79=an_fb68 -InputList2SigType79=Analog -InputList2Cue80=an_fb69 -InputList2SigType80=Analog -InputList2Cue81=an_fb70 -InputList2SigType81=Analog -InputList2Cue82=an_fb71 -InputList2SigType82=Analog -InputList2Cue83=an_fb72 -InputList2SigType83=Analog -InputList2Cue84=an_fb73 -InputList2SigType84=Analog -InputList2Cue85=an_fb74 -InputList2SigType85=Analog -InputList2Cue86=an_fb75 -InputList2SigType86=Analog -InputList2Cue87=an_fb76 -InputList2SigType87=Analog -InputList2Cue88=an_fb77 -InputList2SigType88=Analog -InputList2Cue89=an_fb78 -InputList2SigType89=Analog -InputList2Cue90=an_fb79 -InputList2SigType90=Analog -InputList2Cue91=an_fb80 -InputList2SigType91=Analog -InputList2Cue92=an_fb81 -InputList2SigType92=Analog -InputList2Cue93=an_fb82 -InputList2SigType93=Analog -InputList2Cue94=an_fb83 -InputList2SigType94=Analog -InputList2Cue95=an_fb84 -InputList2SigType95=Analog -InputList2Cue96=an_fb85 -InputList2SigType96=Analog -InputList2Cue97=an_fb86 -InputList2SigType97=Analog -InputList2Cue98=an_fb87 -InputList2SigType98=Analog -InputList2Cue99=an_fb88 -InputList2SigType99=Analog -InputList2Cue100=an_fb89 -InputList2SigType100=Analog -InputList2Cue101=an_fb90 -InputList2SigType101=Analog -InputList2Cue102=an_fb91 -InputList2SigType102=Analog -InputList2Cue103=an_fb92 -InputList2SigType103=Analog -InputList2Cue104=an_fb93 -InputList2SigType104=Analog -InputList2Cue105=an_fb94 -InputList2SigType105=Analog -InputList2Cue106=an_fb95 -InputList2SigType106=Analog -InputList2Cue107=an_fb96 -InputList2SigType107=Analog -InputList2Cue108=an_fb97 -InputList2SigType108=Analog -InputList2Cue109=an_fb98 -InputList2SigType109=Analog -InputList2Cue110=an_fb99 -InputList2SigType110=Analog -InputList2Cue111=an_fb100 -InputList2SigType111=Analog -InputList2Cue112=[~EndGroup~]an_fb -InputList2SigType112=Analog -OutputList2Cue1=Item Clicked -OutputList2SigType1=Analog -OutputList2Cue2=[~UNUSED3~] -OutputList2SigType2=Analog -OutputList2Cue3=[~UNUSED3~] -OutputList2SigType3=Analog -OutputList2Cue4=[~UNUSED2~] -OutputList2SigType4=Analog -OutputList2Cue5=[~UNUSED2~] -OutputList2SigType5=Analog -OutputList2Cue6=[~UNUSED2~] -OutputList2SigType6=Analog -OutputList2Cue7=[~UNUSED2~] -OutputList2SigType7=Analog -OutputList2Cue8=[~UNUSED2~] -OutputList2SigType8=Analog -OutputList2Cue9=[~UNUSED2~] -OutputList2SigType9=Analog -OutputList2Cue10=[~UNUSED2~] -OutputList2SigType10=Analog -OutputList2Cue11=[~BeginGroup~]an_act -OutputList2SigType11=Analog -OutputList2Cue12=an_act1 -OutputList2SigType12=Analog -OutputList2Cue13=an_act2 -OutputList2SigType13=Analog -OutputList2Cue14=an_act3 -OutputList2SigType14=Analog -OutputList2Cue15=an_act4 -OutputList2SigType15=Analog -OutputList2Cue16=an_act5 -OutputList2SigType16=Analog -OutputList2Cue17=an_act6 -OutputList2SigType17=Analog -OutputList2Cue18=an_act7 -OutputList2SigType18=Analog -OutputList2Cue19=an_act8 -OutputList2SigType19=Analog -OutputList2Cue20=an_act9 -OutputList2SigType20=Analog -OutputList2Cue21=an_act10 -OutputList2SigType21=Analog -OutputList2Cue22=an_act11 -OutputList2SigType22=Analog -OutputList2Cue23=an_act12 -OutputList2SigType23=Analog -OutputList2Cue24=an_act13 -OutputList2SigType24=Analog -OutputList2Cue25=an_act14 -OutputList2SigType25=Analog -OutputList2Cue26=an_act15 -OutputList2SigType26=Analog -OutputList2Cue27=an_act16 -OutputList2SigType27=Analog -OutputList2Cue28=an_act17 -OutputList2SigType28=Analog -OutputList2Cue29=an_act18 -OutputList2SigType29=Analog -OutputList2Cue30=an_act19 -OutputList2SigType30=Analog -OutputList2Cue31=an_act20 -OutputList2SigType31=Analog -OutputList2Cue32=an_act21 -OutputList2SigType32=Analog -OutputList2Cue33=an_act22 -OutputList2SigType33=Analog -OutputList2Cue34=an_act23 -OutputList2SigType34=Analog -OutputList2Cue35=an_act24 -OutputList2SigType35=Analog -OutputList2Cue36=an_act25 -OutputList2SigType36=Analog -OutputList2Cue37=an_act26 -OutputList2SigType37=Analog -OutputList2Cue38=an_act27 -OutputList2SigType38=Analog -OutputList2Cue39=an_act28 -OutputList2SigType39=Analog -OutputList2Cue40=an_act29 -OutputList2SigType40=Analog -OutputList2Cue41=an_act30 -OutputList2SigType41=Analog -OutputList2Cue42=an_act31 -OutputList2SigType42=Analog -OutputList2Cue43=an_act32 -OutputList2SigType43=Analog -OutputList2Cue44=an_act33 -OutputList2SigType44=Analog -OutputList2Cue45=an_act34 -OutputList2SigType45=Analog -OutputList2Cue46=an_act35 -OutputList2SigType46=Analog -OutputList2Cue47=an_act36 -OutputList2SigType47=Analog -OutputList2Cue48=an_act37 -OutputList2SigType48=Analog -OutputList2Cue49=an_act38 -OutputList2SigType49=Analog -OutputList2Cue50=an_act39 -OutputList2SigType50=Analog -OutputList2Cue51=an_act40 -OutputList2SigType51=Analog -OutputList2Cue52=an_act41 -OutputList2SigType52=Analog -OutputList2Cue53=an_act42 -OutputList2SigType53=Analog -OutputList2Cue54=an_act43 -OutputList2SigType54=Analog -OutputList2Cue55=an_act44 -OutputList2SigType55=Analog -OutputList2Cue56=an_act45 -OutputList2SigType56=Analog -OutputList2Cue57=an_act46 -OutputList2SigType57=Analog -OutputList2Cue58=an_act47 -OutputList2SigType58=Analog -OutputList2Cue59=an_act48 -OutputList2SigType59=Analog -OutputList2Cue60=an_act49 -OutputList2SigType60=Analog -OutputList2Cue61=an_act50 -OutputList2SigType61=Analog -OutputList2Cue62=an_act51 -OutputList2SigType62=Analog -OutputList2Cue63=an_act52 -OutputList2SigType63=Analog -OutputList2Cue64=an_act53 -OutputList2SigType64=Analog -OutputList2Cue65=an_act54 -OutputList2SigType65=Analog -OutputList2Cue66=an_act55 -OutputList2SigType66=Analog -OutputList2Cue67=an_act56 -OutputList2SigType67=Analog -OutputList2Cue68=an_act57 -OutputList2SigType68=Analog -OutputList2Cue69=an_act58 -OutputList2SigType69=Analog -OutputList2Cue70=an_act59 -OutputList2SigType70=Analog -OutputList2Cue71=an_act60 -OutputList2SigType71=Analog -OutputList2Cue72=an_act61 -OutputList2SigType72=Analog -OutputList2Cue73=an_act62 -OutputList2SigType73=Analog -OutputList2Cue74=an_act63 -OutputList2SigType74=Analog -OutputList2Cue75=an_act64 -OutputList2SigType75=Analog -OutputList2Cue76=an_act65 -OutputList2SigType76=Analog -OutputList2Cue77=an_act66 -OutputList2SigType77=Analog -OutputList2Cue78=an_act67 -OutputList2SigType78=Analog -OutputList2Cue79=an_act68 -OutputList2SigType79=Analog -OutputList2Cue80=an_act69 -OutputList2SigType80=Analog -OutputList2Cue81=an_act70 -OutputList2SigType81=Analog -OutputList2Cue82=an_act71 -OutputList2SigType82=Analog -OutputList2Cue83=an_act72 -OutputList2SigType83=Analog -OutputList2Cue84=an_act73 -OutputList2SigType84=Analog -OutputList2Cue85=an_act74 -OutputList2SigType85=Analog -OutputList2Cue86=an_act75 -OutputList2SigType86=Analog -OutputList2Cue87=an_act76 -OutputList2SigType87=Analog -OutputList2Cue88=an_act77 -OutputList2SigType88=Analog -OutputList2Cue89=an_act78 -OutputList2SigType89=Analog -OutputList2Cue90=an_act79 -OutputList2SigType90=Analog -OutputList2Cue91=an_act80 -OutputList2SigType91=Analog -OutputList2Cue92=an_act81 -OutputList2SigType92=Analog -OutputList2Cue93=an_act82 -OutputList2SigType93=Analog -OutputList2Cue94=an_act83 -OutputList2SigType94=Analog -OutputList2Cue95=an_act84 -OutputList2SigType95=Analog -OutputList2Cue96=an_act85 -OutputList2SigType96=Analog -OutputList2Cue97=an_act86 -OutputList2SigType97=Analog -OutputList2Cue98=an_act87 -OutputList2SigType98=Analog -OutputList2Cue99=an_act88 -OutputList2SigType99=Analog -OutputList2Cue100=an_act89 -OutputList2SigType100=Analog -OutputList2Cue101=an_act90 -OutputList2SigType101=Analog -OutputList2Cue102=an_act91 -OutputList2SigType102=Analog -OutputList2Cue103=an_act92 -OutputList2SigType103=Analog -OutputList2Cue104=an_act93 -OutputList2SigType104=Analog -OutputList2Cue105=an_act94 -OutputList2SigType105=Analog -OutputList2Cue106=an_act95 -OutputList2SigType106=Analog -OutputList2Cue107=an_act96 -OutputList2SigType107=Analog -OutputList2Cue108=an_act97 -OutputList2SigType108=Analog -OutputList2Cue109=an_act98 -OutputList2SigType109=Analog -OutputList2Cue110=an_act99 -OutputList2SigType110=Analog -OutputList2Cue111=an_act100 -OutputList2SigType111=Analog -OutputList2Cue112=[~EndGroup~]an_act -OutputList2SigType112=Analog -InputList3Cue1=[~UNUSED2~] -InputList3SigType1=Serial -InputList3Cue2=[~UNUSED2~] -InputList3SigType2=Serial -InputList3Cue3=[~UNUSED2~] -InputList3SigType3=Serial -InputList3Cue4=[~UNUSED2~] -InputList3SigType4=Serial -InputList3Cue5=[~UNUSED2~] -InputList3SigType5=Serial -InputList3Cue6=[~UNUSED2~] -InputList3SigType6=Serial -InputList3Cue7=[~UNUSED2~] -InputList3SigType7=Serial -InputList3Cue8=[~UNUSED2~] -InputList3SigType8=Serial -InputList3Cue9=[~UNUSED2~] -InputList3SigType9=Serial -InputList3Cue10=[~UNUSED2~] -InputList3SigType10=Serial -InputList3Cue11=[~BeginGroup~]text-o -InputList3SigType11=Serial -InputList3Cue12=text-o1 -InputList3SigType12=Serial -InputList3Cue13=text-o2 -InputList3SigType13=Serial -InputList3Cue14=text-o3 -InputList3SigType14=Serial -InputList3Cue15=text-o4 -InputList3SigType15=Serial -InputList3Cue16=text-o5 -InputList3SigType16=Serial -InputList3Cue17=text-o6 -InputList3SigType17=Serial -InputList3Cue18=text-o7 -InputList3SigType18=Serial -InputList3Cue19=text-o8 -InputList3SigType19=Serial -InputList3Cue20=text-o9 -InputList3SigType20=Serial -InputList3Cue21=text-o10 -InputList3SigType21=Serial -InputList3Cue22=text-o11 -InputList3SigType22=Serial -InputList3Cue23=text-o12 -InputList3SigType23=Serial -InputList3Cue24=text-o13 -InputList3SigType24=Serial -InputList3Cue25=text-o14 -InputList3SigType25=Serial -InputList3Cue26=text-o15 -InputList3SigType26=Serial -InputList3Cue27=text-o16 -InputList3SigType27=Serial -InputList3Cue28=text-o17 -InputList3SigType28=Serial -InputList3Cue29=text-o18 -InputList3SigType29=Serial -InputList3Cue30=text-o19 -InputList3SigType30=Serial -InputList3Cue31=text-o20 -InputList3SigType31=Serial -InputList3Cue32=text-o21 -InputList3SigType32=Serial -InputList3Cue33=text-o22 -InputList3SigType33=Serial -InputList3Cue34=text-o23 -InputList3SigType34=Serial -InputList3Cue35=text-o24 -InputList3SigType35=Serial -InputList3Cue36=text-o25 -InputList3SigType36=Serial -InputList3Cue37=text-o26 -InputList3SigType37=Serial -InputList3Cue38=text-o27 -InputList3SigType38=Serial -InputList3Cue39=text-o28 -InputList3SigType39=Serial -InputList3Cue40=text-o29 -InputList3SigType40=Serial -InputList3Cue41=text-o30 -InputList3SigType41=Serial -InputList3Cue42=text-o31 -InputList3SigType42=Serial -InputList3Cue43=text-o32 -InputList3SigType43=Serial -InputList3Cue44=text-o33 -InputList3SigType44=Serial -InputList3Cue45=text-o34 -InputList3SigType45=Serial -InputList3Cue46=text-o35 -InputList3SigType46=Serial -InputList3Cue47=text-o36 -InputList3SigType47=Serial -InputList3Cue48=text-o37 -InputList3SigType48=Serial -InputList3Cue49=text-o38 -InputList3SigType49=Serial -InputList3Cue50=text-o39 -InputList3SigType50=Serial -InputList3Cue51=text-o40 -InputList3SigType51=Serial -InputList3Cue52=text-o41 -InputList3SigType52=Serial -InputList3Cue53=text-o42 -InputList3SigType53=Serial -InputList3Cue54=text-o43 -InputList3SigType54=Serial -InputList3Cue55=text-o44 -InputList3SigType55=Serial -InputList3Cue56=text-o45 -InputList3SigType56=Serial -InputList3Cue57=text-o46 -InputList3SigType57=Serial -InputList3Cue58=text-o47 -InputList3SigType58=Serial -InputList3Cue59=text-o48 -InputList3SigType59=Serial -InputList3Cue60=text-o49 -InputList3SigType60=Serial -InputList3Cue61=text-o50 -InputList3SigType61=Serial -InputList3Cue62=text-o51 -InputList3SigType62=Serial -InputList3Cue63=text-o52 -InputList3SigType63=Serial -InputList3Cue64=text-o53 -InputList3SigType64=Serial -InputList3Cue65=text-o54 -InputList3SigType65=Serial -InputList3Cue66=text-o55 -InputList3SigType66=Serial -InputList3Cue67=text-o56 -InputList3SigType67=Serial -InputList3Cue68=text-o57 -InputList3SigType68=Serial -InputList3Cue69=text-o58 -InputList3SigType69=Serial -InputList3Cue70=text-o59 -InputList3SigType70=Serial -InputList3Cue71=text-o60 -InputList3SigType71=Serial -InputList3Cue72=text-o61 -InputList3SigType72=Serial -InputList3Cue73=text-o62 -InputList3SigType73=Serial -InputList3Cue74=text-o63 -InputList3SigType74=Serial -InputList3Cue75=text-o64 -InputList3SigType75=Serial -InputList3Cue76=text-o65 -InputList3SigType76=Serial -InputList3Cue77=text-o66 -InputList3SigType77=Serial -InputList3Cue78=text-o67 -InputList3SigType78=Serial -InputList3Cue79=text-o68 -InputList3SigType79=Serial -InputList3Cue80=text-o69 -InputList3SigType80=Serial -InputList3Cue81=text-o70 -InputList3SigType81=Serial -InputList3Cue82=text-o71 -InputList3SigType82=Serial -InputList3Cue83=text-o72 -InputList3SigType83=Serial -InputList3Cue84=text-o73 -InputList3SigType84=Serial -InputList3Cue85=text-o74 -InputList3SigType85=Serial -InputList3Cue86=text-o75 -InputList3SigType86=Serial -InputList3Cue87=text-o76 -InputList3SigType87=Serial -InputList3Cue88=text-o77 -InputList3SigType88=Serial -InputList3Cue89=text-o78 -InputList3SigType89=Serial -InputList3Cue90=text-o79 -InputList3SigType90=Serial -InputList3Cue91=text-o80 -InputList3SigType91=Serial -InputList3Cue92=text-o81 -InputList3SigType92=Serial -InputList3Cue93=text-o82 -InputList3SigType93=Serial -InputList3Cue94=text-o83 -InputList3SigType94=Serial -InputList3Cue95=text-o84 -InputList3SigType95=Serial -InputList3Cue96=text-o85 -InputList3SigType96=Serial -InputList3Cue97=text-o86 -InputList3SigType97=Serial -InputList3Cue98=text-o87 -InputList3SigType98=Serial -InputList3Cue99=text-o88 -InputList3SigType99=Serial -InputList3Cue100=text-o89 -InputList3SigType100=Serial -InputList3Cue101=text-o90 -InputList3SigType101=Serial -InputList3Cue102=text-o91 -InputList3SigType102=Serial -InputList3Cue103=text-o92 -InputList3SigType103=Serial -InputList3Cue104=text-o93 -InputList3SigType104=Serial -InputList3Cue105=text-o94 -InputList3SigType105=Serial -InputList3Cue106=text-o95 -InputList3SigType106=Serial -InputList3Cue107=text-o96 -InputList3SigType107=Serial -InputList3Cue108=text-o97 -InputList3SigType108=Serial -InputList3Cue109=text-o98 -InputList3SigType109=Serial -InputList3Cue110=text-o99 -InputList3SigType110=Serial -InputList3Cue111=text-o100 -InputList3SigType111=Serial -InputList3Cue112=[~EndGroup~]text-o -InputList3SigType112=Serial -OutputList3Cue1=[~UNUSED2~] -OutputList3SigType1=Serial -OutputList3Cue2=[~UNUSED2~] -OutputList3SigType2=Serial -OutputList3Cue3=[~UNUSED2~] -OutputList3SigType3=Serial -OutputList3Cue4=[~UNUSED2~] -OutputList3SigType4=Serial -OutputList3Cue5=[~UNUSED2~] -OutputList3SigType5=Serial -OutputList3Cue6=[~UNUSED2~] -OutputList3SigType6=Serial -OutputList3Cue7=[~UNUSED2~] -OutputList3SigType7=Serial -OutputList3Cue8=[~UNUSED2~] -OutputList3SigType8=Serial -OutputList3Cue9=[~UNUSED2~] -OutputList3SigType9=Serial -OutputList3Cue10=[~UNUSED2~] -OutputList3SigType10=Serial -OutputList3Cue11=[~BeginGroup~]text-i -OutputList3SigType11=Serial -OutputList3Cue12=text-i1 -OutputList3SigType12=Serial -OutputList3Cue13=text-i2 -OutputList3SigType13=Serial -OutputList3Cue14=text-i3 -OutputList3SigType14=Serial -OutputList3Cue15=text-i4 -OutputList3SigType15=Serial -OutputList3Cue16=text-i5 -OutputList3SigType16=Serial -OutputList3Cue17=text-i6 -OutputList3SigType17=Serial -OutputList3Cue18=text-i7 -OutputList3SigType18=Serial -OutputList3Cue19=text-i8 -OutputList3SigType19=Serial -OutputList3Cue20=text-i9 -OutputList3SigType20=Serial -OutputList3Cue21=text-i10 -OutputList3SigType21=Serial -OutputList3Cue22=text-i11 -OutputList3SigType22=Serial -OutputList3Cue23=text-i12 -OutputList3SigType23=Serial -OutputList3Cue24=text-i13 -OutputList3SigType24=Serial -OutputList3Cue25=text-i14 -OutputList3SigType25=Serial -OutputList3Cue26=text-i15 -OutputList3SigType26=Serial -OutputList3Cue27=text-i16 -OutputList3SigType27=Serial -OutputList3Cue28=text-i17 -OutputList3SigType28=Serial -OutputList3Cue29=text-i18 -OutputList3SigType29=Serial -OutputList3Cue30=text-i19 -OutputList3SigType30=Serial -OutputList3Cue31=text-i20 -OutputList3SigType31=Serial -OutputList3Cue32=text-i21 -OutputList3SigType32=Serial -OutputList3Cue33=text-i22 -OutputList3SigType33=Serial -OutputList3Cue34=text-i23 -OutputList3SigType34=Serial -OutputList3Cue35=text-i24 -OutputList3SigType35=Serial -OutputList3Cue36=text-i25 -OutputList3SigType36=Serial -OutputList3Cue37=text-i26 -OutputList3SigType37=Serial -OutputList3Cue38=text-i27 -OutputList3SigType38=Serial -OutputList3Cue39=text-i28 -OutputList3SigType39=Serial -OutputList3Cue40=text-i29 -OutputList3SigType40=Serial -OutputList3Cue41=text-i30 -OutputList3SigType41=Serial -OutputList3Cue42=text-i31 -OutputList3SigType42=Serial -OutputList3Cue43=text-i32 -OutputList3SigType43=Serial -OutputList3Cue44=text-i33 -OutputList3SigType44=Serial -OutputList3Cue45=text-i34 -OutputList3SigType45=Serial -OutputList3Cue46=text-i35 -OutputList3SigType46=Serial -OutputList3Cue47=text-i36 -OutputList3SigType47=Serial -OutputList3Cue48=text-i37 -OutputList3SigType48=Serial -OutputList3Cue49=text-i38 -OutputList3SigType49=Serial -OutputList3Cue50=text-i39 -OutputList3SigType50=Serial -OutputList3Cue51=text-i40 -OutputList3SigType51=Serial -OutputList3Cue52=text-i41 -OutputList3SigType52=Serial -OutputList3Cue53=text-i42 -OutputList3SigType53=Serial -OutputList3Cue54=text-i43 -OutputList3SigType54=Serial -OutputList3Cue55=text-i44 -OutputList3SigType55=Serial -OutputList3Cue56=text-i45 -OutputList3SigType56=Serial -OutputList3Cue57=text-i46 -OutputList3SigType57=Serial -OutputList3Cue58=text-i47 -OutputList3SigType58=Serial -OutputList3Cue59=text-i48 -OutputList3SigType59=Serial -OutputList3Cue60=text-i49 -OutputList3SigType60=Serial -OutputList3Cue61=text-i50 -OutputList3SigType61=Serial -OutputList3Cue62=text-i51 -OutputList3SigType62=Serial -OutputList3Cue63=text-i52 -OutputList3SigType63=Serial -OutputList3Cue64=text-i53 -OutputList3SigType64=Serial -OutputList3Cue65=text-i54 -OutputList3SigType65=Serial -OutputList3Cue66=text-i55 -OutputList3SigType66=Serial -OutputList3Cue67=text-i56 -OutputList3SigType67=Serial -OutputList3Cue68=text-i57 -OutputList3SigType68=Serial -OutputList3Cue69=text-i58 -OutputList3SigType69=Serial -OutputList3Cue70=text-i59 -OutputList3SigType70=Serial -OutputList3Cue71=text-i60 -OutputList3SigType71=Serial -OutputList3Cue72=text-i61 -OutputList3SigType72=Serial -OutputList3Cue73=text-i62 -OutputList3SigType73=Serial -OutputList3Cue74=text-i63 -OutputList3SigType74=Serial -OutputList3Cue75=text-i64 -OutputList3SigType75=Serial -OutputList3Cue76=text-i65 -OutputList3SigType76=Serial -OutputList3Cue77=text-i66 -OutputList3SigType77=Serial -OutputList3Cue78=text-i67 -OutputList3SigType78=Serial -OutputList3Cue79=text-i68 -OutputList3SigType79=Serial -OutputList3Cue80=text-i69 -OutputList3SigType80=Serial -OutputList3Cue81=text-i70 -OutputList3SigType81=Serial -OutputList3Cue82=text-i71 -OutputList3SigType82=Serial -OutputList3Cue83=text-i72 -OutputList3SigType83=Serial -OutputList3Cue84=text-i73 -OutputList3SigType84=Serial -OutputList3Cue85=text-i74 -OutputList3SigType85=Serial -OutputList3Cue86=text-i75 -OutputList3SigType86=Serial -OutputList3Cue87=text-i76 -OutputList3SigType87=Serial -OutputList3Cue88=text-i77 -OutputList3SigType88=Serial -OutputList3Cue89=text-i78 -OutputList3SigType89=Serial -OutputList3Cue90=text-i79 -OutputList3SigType90=Serial -OutputList3Cue91=text-i80 -OutputList3SigType91=Serial -OutputList3Cue92=text-i81 -OutputList3SigType92=Serial -OutputList3Cue93=text-i82 -OutputList3SigType93=Serial -OutputList3Cue94=text-i83 -OutputList3SigType94=Serial -OutputList3Cue95=text-i84 -OutputList3SigType95=Serial -OutputList3Cue96=text-i85 -OutputList3SigType96=Serial -OutputList3Cue97=text-i86 -OutputList3SigType97=Serial -OutputList3Cue98=text-i87 -OutputList3SigType98=Serial -OutputList3Cue99=text-i88 -OutputList3SigType99=Serial -OutputList3Cue100=text-i89 -OutputList3SigType100=Serial -OutputList3Cue101=text-i90 -OutputList3SigType101=Serial -OutputList3Cue102=text-i91 -OutputList3SigType102=Serial -OutputList3Cue103=text-i92 -OutputList3SigType103=Serial -OutputList3Cue104=text-i93 -OutputList3SigType104=Serial -OutputList3Cue105=text-i94 -OutputList3SigType105=Serial -OutputList3Cue106=text-i95 -OutputList3SigType106=Serial -OutputList3Cue107=text-i96 -OutputList3SigType107=Serial -OutputList3Cue108=text-i97 -OutputList3SigType108=Serial -OutputList3Cue109=text-i98 -OutputList3SigType109=Serial -OutputList3Cue110=text-i99 -OutputList3SigType110=Serial -OutputList3Cue111=text-i100 -OutputList3SigType111=Serial -OutputList3Cue112=[~EndGroup~]text-i -OutputList3SigType112=Serial -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=16 -CedH=16 -SmartObjId=1001d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=16 -Tp=1 -HD=TRUE -DV=1001d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=16 -Name=PepperDash Essentials iPad_[Z.Dialogs] Call List_Subpage Reference List Vertical_2.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials iPad_[E.Technician Controls] Menu_Dynamic Button List Vertical.ced -Hint=Dynamic Button List Vertical (Smart Object ID=3901) -Code=17 -SGControlType=Dynamic Button List Vertical -SGControlName=Dynamic Button List Vertical -GUID=15B95903-FB30-472E-9D10-82A9C3A9D7C7 -SmplCName=PepperDash Essentials iPad_[E.Technician Controls] Menu_Dynamic Button List Vertical.ced -SMWRev=4.02.20 -Expand=expand_random -HelpID=10112 -Render=8 -;Define the number of inputs, outputs and parameters -MinVariableInputs=6016 -MaxVariableInputs=6016 -MinVariableOutputs=6016 -MaxVariableOutputs=6016 -NumFixedParams=1 -MinVariableInputsList2=2012 -MaxVariableInputsList2=2012 -MinVariableOutputsList2=2012 -MaxVariableOutputsList2=2012 -MinVariableInputsList3=4014 -MaxVariableInputsList3=4014 -MinVariableOutputsList3=4014 -MaxVariableOutputsList3=4014 -InputSigType1=Digital -OutputSigType1=Digital -InputList2SigType1=Analog -OutputList2SigType1=Analog -InputList3SigType1=Serial -OutputList3SigType1=Serial - -;Define the cues, and signal types each input, output and parameter. -InputCue1=Disable Redraw -InputSigType1=Digital -InputCue2=[~UNUSED3~] -InputSigType2=Digital -InputCue3=[~UNUSED2~] -InputSigType3=Digital -InputCue4=[~UNUSED2~] -InputSigType4=Digital -InputCue5=[~UNUSED2~] -InputSigType5=Digital -InputCue6=[~UNUSED2~] -InputSigType6=Digital -InputCue7=[~UNUSED2~] -InputSigType7=Digital -InputCue8=[~UNUSED2~] -InputSigType8=Digital -InputCue9=[~UNUSED2~] -InputSigType9=Digital -InputCue10=[~UNUSED2~] -InputSigType10=Digital -InputCue11=[~BeginGroup~]Press -InputSigType11=Digital -InputCue12=Item 1 Selected -InputSigType12=Digital -InputCue13=Item 2 Selected -InputSigType13=Digital -InputCue14=Item 3 Selected -InputSigType14=Digital -InputCue15=Item 4 Selected -InputSigType15=Digital -InputCue16=Item 5 Selected -InputSigType16=Digital -InputCue17=Item 6 Selected -InputSigType17=Digital -InputCue18=Item 7 Selected -InputSigType18=Digital -InputCue19=Item 8 Selected -InputSigType19=Digital -InputCue20=Item 9 Selected -InputSigType20=Digital -InputCue21=Item 10 Selected -InputSigType21=Digital -InputCue22=[~UNUSED2~] -InputSigType22=Digital|Analog|Serial|String -InputCue2012=[~EndGroup~]Press -InputSigType2012=Digital -InputCue2013=[~BeginGroup~]Enable -InputSigType2013=Digital -InputCue2014=Item 1 Enabled -InputSigType2014=Digital -InputCue2015=Item 2 Enabled -InputSigType2015=Digital -InputCue2016=Item 3 Enabled -InputSigType2016=Digital -InputCue2017=Item 4 Enabled -InputSigType2017=Digital -InputCue2018=Item 5 Enabled -InputSigType2018=Digital -InputCue2019=Item 6 Enabled -InputSigType2019=Digital -InputCue2020=Item 7 Enabled -InputSigType2020=Digital -InputCue2021=Item 8 Enabled -InputSigType2021=Digital -InputCue2022=Item 9 Enabled -InputSigType2022=Digital -InputCue2023=Item 10 Enabled -InputSigType2023=Digital -InputCue2024=[~UNUSED2~] -InputSigType2024=Digital|Analog|Serial|String -InputCue4014=[~EndGroup~]Enable -InputSigType4014=Digital -InputCue4015=[~BeginGroup~]Visible -InputSigType4015=Digital -InputCue4016=Item 1 Visible -InputSigType4016=Digital -InputCue4017=Item 2 Visible -InputSigType4017=Digital -InputCue4018=Item 3 Visible -InputSigType4018=Digital -InputCue4019=Item 4 Visible -InputSigType4019=Digital -InputCue4020=Item 5 Visible -InputSigType4020=Digital -InputCue4021=Item 6 Visible -InputSigType4021=Digital -InputCue4022=Item 7 Visible -InputSigType4022=Digital -InputCue4023=Item 8 Visible -InputSigType4023=Digital -InputCue4024=Item 9 Visible -InputSigType4024=Digital -InputCue4025=Item 10 Visible -InputSigType4025=Digital -InputCue4026=[~UNUSED2~] -InputSigType4026=Digital|Analog|Serial|String -InputCue6016=[~EndGroup~]Visible -InputSigType6016=Digital -OutputCue1=[~UNUSED3~] -OutputSigType1=Digital -OutputCue2=Is Moving -OutputSigType2=Digital -OutputCue3=[~UNUSED2~] -OutputSigType3=Digital -OutputCue4=[~UNUSED2~] -OutputSigType4=Digital -OutputCue5=[~UNUSED2~] -OutputSigType5=Digital -OutputCue6=[~UNUSED2~] -OutputSigType6=Digital -OutputCue7=[~UNUSED2~] -OutputSigType7=Digital -OutputCue8=[~UNUSED2~] -OutputSigType8=Digital -OutputCue9=[~UNUSED2~] -OutputSigType9=Digital -OutputCue10=[~UNUSED2~] -OutputSigType10=Digital -OutputCue11=[~BeginGroup~]Press -OutputSigType11=Digital -OutputCue12=Item 1 Pressed -OutputSigType12=Digital -OutputCue13=Item 2 Pressed -OutputSigType13=Digital -OutputCue14=Item 3 Pressed -OutputSigType14=Digital -OutputCue15=Item 4 Pressed -OutputSigType15=Digital -OutputCue16=Item 5 Pressed -OutputSigType16=Digital -OutputCue17=Item 6 Pressed -OutputSigType17=Digital -OutputCue18=Item 7 Pressed -OutputSigType18=Digital -OutputCue19=Item 8 Pressed -OutputSigType19=Digital -OutputCue20=Item 9 Pressed -OutputSigType20=Digital -OutputCue21=Item 10 Pressed -OutputSigType21=Digital -OutputCue22=[~UNUSED2~] -OutputSigType22=Digital|Analog|Serial|String -OutputCue2012=[~EndGroup~]Press -OutputSigType2012=Digital -OutputCue2013=[~BeginGroup~]Enable -OutputSigType2013=Digital -OutputCue2014=[~UNUSED3~] -OutputSigType2014=Digital -OutputCue2015=[~UNUSED3~] -OutputSigType2015=Digital -OutputCue2016=[~UNUSED3~] -OutputSigType2016=Digital -OutputCue2017=[~UNUSED3~] -OutputSigType2017=Digital -OutputCue2018=[~UNUSED3~] -OutputSigType2018=Digital -OutputCue2019=[~UNUSED3~] -OutputSigType2019=Digital -OutputCue2020=[~UNUSED3~] -OutputSigType2020=Digital -OutputCue2021=[~UNUSED3~] -OutputSigType2021=Digital -OutputCue2022=[~UNUSED3~] -OutputSigType2022=Digital -OutputCue2023=[~UNUSED3~] -OutputSigType2023=Digital -OutputCue2024=[~UNUSED2~] -OutputSigType2024=Digital|Analog|Serial|String -OutputCue4014=[~EndGroup~]Enable -OutputSigType4014=Digital -OutputCue4015=[~BeginGroup~]Visible -OutputSigType4015=Digital -OutputCue4016=[~UNUSED3~] -OutputSigType4016=Digital -OutputCue4017=[~UNUSED3~] -OutputSigType4017=Digital -OutputCue4018=[~UNUSED3~] -OutputSigType4018=Digital -OutputCue4019=[~UNUSED3~] -OutputSigType4019=Digital -OutputCue4020=[~UNUSED3~] -OutputSigType4020=Digital -OutputCue4021=[~UNUSED3~] -OutputSigType4021=Digital -OutputCue4022=[~UNUSED3~] -OutputSigType4022=Digital -OutputCue4023=[~UNUSED3~] -OutputSigType4023=Digital -OutputCue4024=[~UNUSED3~] -OutputSigType4024=Digital -OutputCue4025=[~UNUSED3~] -OutputSigType4025=Digital -OutputCue4026=[~UNUSED2~] -OutputSigType4026=Digital|Analog|Serial|String -OutputCue6016=[~EndGroup~]Visible -OutputSigType6016=Digital -InputList2Cue1=[~UNUSED3~] -InputList2SigType1=Analog -InputList2Cue2=[~UNUSED3~] -InputList2SigType2=Analog -InputList2Cue3=Scroll To Item -InputList2SigType3=Analog -InputList2Cue4=Set Number of Items -InputList2SigType4=Analog -InputList2Cue5=[~UNUSED2~] -InputList2SigType5=Analog -InputList2Cue6=[~UNUSED2~] -InputList2SigType6=Analog -InputList2Cue7=[~UNUSED2~] -InputList2SigType7=Analog -InputList2Cue8=[~UNUSED2~] -InputList2SigType8=Analog -InputList2Cue9=[~UNUSED2~] -InputList2SigType9=Analog -InputList2Cue10=[~UNUSED2~] -InputList2SigType10=Analog -InputList2Cue11=[~BeginGroup~]Item Icons -InputList2SigType11=Analog -InputList2Cue12=Set Item 1 Icon Analog -InputList2SigType12=Analog -InputList2Cue13=Set Item 2 Icon Analog -InputList2SigType13=Analog -InputList2Cue14=Set Item 3 Icon Analog -InputList2SigType14=Analog -InputList2Cue15=Set Item 4 Icon Analog -InputList2SigType15=Analog -InputList2Cue16=Set Item 5 Icon Analog -InputList2SigType16=Analog -InputList2Cue17=Set Item 6 Icon Analog -InputList2SigType17=Analog -InputList2Cue18=Set Item 7 Icon Analog -InputList2SigType18=Analog -InputList2Cue19=Set Item 8 Icon Analog -InputList2SigType19=Analog -InputList2Cue20=Set Item 9 Icon Analog -InputList2SigType20=Analog -InputList2Cue21=Set Item 10 Icon Analog -InputList2SigType21=Analog -InputList2Cue22=[~UNUSED2~] -InputList2SigType22=Digital|Analog|Serial|String -InputList2Cue2012=[~EndGroup~]Item Icons -InputList2SigType2012=Analog -OutputList2Cue1=Item Clicked -OutputList2SigType1=Analog -OutputList2Cue2=Item Held -OutputList2SigType2=Analog -OutputList2Cue3=[~UNUSED3~] -OutputList2SigType3=Analog -OutputList2Cue4=[~UNUSED3~] -OutputList2SigType4=Analog -OutputList2Cue5=[~UNUSED2~] -OutputList2SigType5=Analog -OutputList2Cue6=[~UNUSED2~] -OutputList2SigType6=Analog -OutputList2Cue7=[~UNUSED2~] -OutputList2SigType7=Analog -OutputList2Cue8=[~UNUSED2~] -OutputList2SigType8=Analog -OutputList2Cue9=[~UNUSED2~] -OutputList2SigType9=Analog -OutputList2Cue10=[~UNUSED2~] -OutputList2SigType10=Analog -OutputList2Cue11=[~BeginGroup~]Item Icons -OutputList2SigType11=Analog -OutputList2Cue12=[~UNUSED3~] -OutputList2SigType12=Analog -OutputList2Cue13=[~UNUSED3~] -OutputList2SigType13=Analog -OutputList2Cue14=[~UNUSED3~] -OutputList2SigType14=Analog -OutputList2Cue15=[~UNUSED3~] -OutputList2SigType15=Analog -OutputList2Cue16=[~UNUSED3~] -OutputList2SigType16=Analog -OutputList2Cue17=[~UNUSED3~] -OutputList2SigType17=Analog -OutputList2Cue18=[~UNUSED3~] -OutputList2SigType18=Analog -OutputList2Cue19=[~UNUSED3~] -OutputList2SigType19=Analog -OutputList2Cue20=[~UNUSED3~] -OutputList2SigType20=Analog -OutputList2Cue21=[~UNUSED3~] -OutputList2SigType21=Analog -OutputList2Cue22=[~UNUSED2~] -OutputList2SigType22=Digital|Analog|Serial|String -OutputList2Cue2012=[~EndGroup~]Item Icons -OutputList2SigType2012=Analog -InputList3Cue1=[~UNUSED2~] -InputList3SigType1=Serial -InputList3Cue2=[~UNUSED2~] -InputList3SigType2=Serial -InputList3Cue3=[~UNUSED2~] -InputList3SigType3=Serial -InputList3Cue4=[~UNUSED2~] -InputList3SigType4=Serial -InputList3Cue5=[~UNUSED2~] -InputList3SigType5=Serial -InputList3Cue6=[~UNUSED2~] -InputList3SigType6=Serial -InputList3Cue7=[~UNUSED2~] -InputList3SigType7=Serial -InputList3Cue8=[~UNUSED2~] -InputList3SigType8=Serial -InputList3Cue9=[~UNUSED2~] -InputList3SigType9=Serial -InputList3Cue10=[~UNUSED2~] -InputList3SigType10=Serial -InputList3Cue11=[~BeginGroup~]Item Texts -InputList3SigType11=Serial -InputList3Cue12=Set Item 1 Text -InputList3SigType12=Serial -InputList3Cue13=Set Item 2 Text -InputList3SigType13=Serial -InputList3Cue14=Set Item 3 Text -InputList3SigType14=Serial -InputList3Cue15=Set Item 4 Text -InputList3SigType15=Serial -InputList3Cue16=Set Item 5 Text -InputList3SigType16=Serial -InputList3Cue17=Set Item 6 Text -InputList3SigType17=Serial -InputList3Cue18=Set Item 7 Text -InputList3SigType18=Serial -InputList3Cue19=Set Item 8 Text -InputList3SigType19=Serial -InputList3Cue20=Set Item 9 Text -InputList3SigType20=Serial -InputList3Cue21=Set Item 10 Text -InputList3SigType21=Serial -InputList3Cue22=[~UNUSED2~] -InputList3SigType22=Digital|Analog|Serial|String -InputList3Cue2012=[~EndGroup~]Item Texts -InputList3SigType2012=Serial -InputList3Cue2013=[~BeginGroup~]Item Icons -InputList3SigType2013=Serial -InputList3Cue2014=Set Item 1 Icon Serial -InputList3SigType2014=Serial -InputList3Cue2015=Set Item 2 Icon Serial -InputList3SigType2015=Serial -InputList3Cue2016=Set Item 3 Icon Serial -InputList3SigType2016=Serial -InputList3Cue2017=Set Item 4 Icon Serial -InputList3SigType2017=Serial -InputList3Cue2018=Set Item 5 Icon Serial -InputList3SigType2018=Serial -InputList3Cue2019=Set Item 6 Icon Serial -InputList3SigType2019=Serial -InputList3Cue2020=Set Item 7 Icon Serial -InputList3SigType2020=Serial -InputList3Cue2021=Set Item 8 Icon Serial -InputList3SigType2021=Serial -InputList3Cue2022=Set Item 9 Icon Serial -InputList3SigType2022=Serial -InputList3Cue2023=Set Item 10 Icon Serial -InputList3SigType2023=Serial -InputList3Cue2024=[~UNUSED2~] -InputList3SigType2024=Digital|Analog|Serial|String -InputList3Cue4014=[~EndGroup~]Item Icons -InputList3SigType4014=Serial -OutputList3Cue1=[~UNUSED2~] -OutputList3SigType1=Serial -OutputList3Cue2=[~UNUSED2~] -OutputList3SigType2=Serial -OutputList3Cue3=[~UNUSED2~] -OutputList3SigType3=Serial -OutputList3Cue4=[~UNUSED2~] -OutputList3SigType4=Serial -OutputList3Cue5=[~UNUSED2~] -OutputList3SigType5=Serial -OutputList3Cue6=[~UNUSED2~] -OutputList3SigType6=Serial -OutputList3Cue7=[~UNUSED2~] -OutputList3SigType7=Serial -OutputList3Cue8=[~UNUSED2~] -OutputList3SigType8=Serial -OutputList3Cue9=[~UNUSED2~] -OutputList3SigType9=Serial -OutputList3Cue10=[~UNUSED2~] -OutputList3SigType10=Serial -OutputList3Cue11=[~BeginGroup~]Item Texts -OutputList3SigType11=Serial -OutputList3Cue12=[~UNUSED3~] -OutputList3SigType12=Serial -OutputList3Cue13=[~UNUSED3~] -OutputList3SigType13=Serial -OutputList3Cue14=[~UNUSED3~] -OutputList3SigType14=Serial -OutputList3Cue15=[~UNUSED3~] -OutputList3SigType15=Serial -OutputList3Cue16=[~UNUSED3~] -OutputList3SigType16=Serial -OutputList3Cue17=[~UNUSED3~] -OutputList3SigType17=Serial -OutputList3Cue18=[~UNUSED3~] -OutputList3SigType18=Serial -OutputList3Cue19=[~UNUSED3~] -OutputList3SigType19=Serial -OutputList3Cue20=[~UNUSED3~] -OutputList3SigType20=Serial -OutputList3Cue21=[~UNUSED3~] -OutputList3SigType21=Serial -OutputList3Cue22=[~UNUSED2~] -OutputList3SigType22=Digital|Analog|Serial|String -OutputList3Cue2012=[~EndGroup~]Item Texts -OutputList3SigType2012=Serial -OutputList3Cue2013=[~BeginGroup~]Item Icons -OutputList3SigType2013=Serial -OutputList3Cue2014=[~UNUSED3~] -OutputList3SigType2014=Serial -OutputList3Cue2015=[~UNUSED3~] -OutputList3SigType2015=Serial -OutputList3Cue2016=[~UNUSED3~] -OutputList3SigType2016=Serial -OutputList3Cue2017=[~UNUSED3~] -OutputList3SigType2017=Serial -OutputList3Cue2018=[~UNUSED3~] -OutputList3SigType2018=Serial -OutputList3Cue2019=[~UNUSED3~] -OutputList3SigType2019=Serial -OutputList3Cue2020=[~UNUSED3~] -OutputList3SigType2020=Serial -OutputList3Cue2021=[~UNUSED3~] -OutputList3SigType2021=Serial -OutputList3Cue2022=[~UNUSED3~] -OutputList3SigType2022=Serial -OutputList3Cue2023=[~UNUSED3~] -OutputList3SigType2023=Serial -OutputList3Cue2024=[~UNUSED2~] -OutputList3SigType2024=Digital|Analog|Serial|String -OutputList3Cue4014=[~EndGroup~]Item Icons -OutputList3SigType4014=Serial -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=17 -CedH=17 -SmartObjId=3901d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=17 -Tp=1 -HD=TRUE -DV=3901d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=17 -Name=PepperDash Essentials iPad_[E.Technician Controls] Menu_Dynamic Button List Vertical.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials iPad_[Z.Dialogs] Schedule List_Subpage Reference List Vertical.ced -Hint=Subpage Reference List Vertical (Smart Object ID=15023) -Code=18 -SGControlType=Subpage Reference List Vertical -SGControlName=Subpage Reference List Vertical -GUID=EC6E6B35-F033-4F14-9465-FEEBE20455CC -SmplCName=PepperDash Essentials iPad_[Z.Dialogs] Schedule List_Subpage Reference List Vertical.ced -SMWRev=4.02.20 -Expand=expand_random -HelpID=10125 -Render=8 -;Define the number of inputs, outputs and parameters -MinVariableInputs=4052 -MaxVariableInputs=4052 -MinVariableOutputs=4052 -MaxVariableOutputs=4052 -NumFixedParams=1 -MinVariableInputsList2=48 -MaxVariableInputsList2=48 -MinVariableOutputsList2=48 -MaxVariableOutputsList2=48 -MinVariableInputsList3=72 -MaxVariableInputsList3=72 -MinVariableOutputsList3=72 -MaxVariableOutputsList3=72 -InputSigType1=Digital -OutputSigType1=Digital -InputList2SigType1=Analog -OutputList2SigType1=Analog -InputList3SigType1=Serial -OutputList3SigType1=Serial - -;Define the cues, and signal types each input, output and parameter. -InputCue1=[~UNUSED3~] -InputSigType1=Digital -InputCue2=[~UNUSED2~] -InputSigType2=Digital -InputCue3=[~UNUSED2~] -InputSigType3=Digital -InputCue4=[~UNUSED2~] -InputSigType4=Digital -InputCue5=[~UNUSED2~] -InputSigType5=Digital -InputCue6=[~UNUSED2~] -InputSigType6=Digital -InputCue7=[~UNUSED2~] -InputSigType7=Digital -InputCue8=[~UNUSED2~] -InputSigType8=Digital -InputCue9=[~UNUSED2~] -InputSigType9=Digital -InputCue10=[~UNUSED2~] -InputSigType10=Digital -InputCue11=[~BeginGroup~]Enable -InputSigType11=Digital -InputCue12=Item 1 Enable -InputSigType12=Digital -InputCue13=Item 2 Enable -InputSigType13=Digital -InputCue14=Item 3 Enable -InputSigType14=Digital -InputCue15=Item 4 Enable -InputSigType15=Digital -InputCue16=Item 5 Enable -InputSigType16=Digital -InputCue17=Item 6 Enable -InputSigType17=Digital -InputCue18=Item 7 Enable -InputSigType18=Digital -InputCue19=Item 8 Enable -InputSigType19=Digital -InputCue20=Item 9 Enable -InputSigType20=Digital -InputCue21=Item 10 Enable -InputSigType21=Digital -InputCue22=Item 11 Enable -InputSigType22=Digital -InputCue23=Item 12 Enable -InputSigType23=Digital -InputCue24=[~UNUSED2~] -InputSigType24=Digital|Analog|Serial|String -InputCue2012=[~EndGroup~]Enable -InputSigType2012=Digital -InputCue2013=[~BeginGroup~]Visible -InputSigType2013=Digital -InputCue2014=Item 1 Visible -InputSigType2014=Digital -InputCue2015=Item 2 Visible -InputSigType2015=Digital -InputCue2016=Item 3 Visible -InputSigType2016=Digital -InputCue2017=Item 4 Visible -InputSigType2017=Digital -InputCue2018=Item 5 Visible -InputSigType2018=Digital -InputCue2019=Item 6 Visible -InputSigType2019=Digital -InputCue2020=Item 7 Visible -InputSigType2020=Digital -InputCue2021=Item 8 Visible -InputSigType2021=Digital -InputCue2022=Item 9 Visible -InputSigType2022=Digital -InputCue2023=Item 10 Visible -InputSigType2023=Digital -InputCue2024=Item 11 Visible -InputSigType2024=Digital -InputCue2025=Item 12 Visible -InputSigType2025=Digital -InputCue2026=[~UNUSED2~] -InputSigType2026=Digital|Analog|Serial|String -InputCue4014=[~EndGroup~]Visible -InputSigType4014=Digital -InputCue4015=[~BeginGroup~]fb -InputSigType4015=Digital -InputCue4016=fb1 -InputSigType4016=Digital -InputCue4017=fb2 -InputSigType4017=Digital -InputCue4018=fb3 -InputSigType4018=Digital -InputCue4019=fb4 -InputSigType4019=Digital -InputCue4020=fb5 -InputSigType4020=Digital -InputCue4021=fb6 -InputSigType4021=Digital -InputCue4022=fb7 -InputSigType4022=Digital -InputCue4023=fb8 -InputSigType4023=Digital -InputCue4024=fb9 -InputSigType4024=Digital -InputCue4025=fb10 -InputSigType4025=Digital -InputCue4026=fb11 -InputSigType4026=Digital -InputCue4027=fb12 -InputSigType4027=Digital -InputCue4028=fb13 -InputSigType4028=Digital -InputCue4029=fb14 -InputSigType4029=Digital -InputCue4030=fb15 -InputSigType4030=Digital -InputCue4031=fb16 -InputSigType4031=Digital -InputCue4032=fb17 -InputSigType4032=Digital -InputCue4033=fb18 -InputSigType4033=Digital -InputCue4034=fb19 -InputSigType4034=Digital -InputCue4035=fb20 -InputSigType4035=Digital -InputCue4036=fb21 -InputSigType4036=Digital -InputCue4037=fb22 -InputSigType4037=Digital -InputCue4038=fb23 -InputSigType4038=Digital -InputCue4039=fb24 -InputSigType4039=Digital -InputCue4040=fb25 -InputSigType4040=Digital -InputCue4041=fb26 -InputSigType4041=Digital -InputCue4042=fb27 -InputSigType4042=Digital -InputCue4043=fb28 -InputSigType4043=Digital -InputCue4044=fb29 -InputSigType4044=Digital -InputCue4045=fb30 -InputSigType4045=Digital -InputCue4046=fb31 -InputSigType4046=Digital -InputCue4047=fb32 -InputSigType4047=Digital -InputCue4048=fb33 -InputSigType4048=Digital -InputCue4049=fb34 -InputSigType4049=Digital -InputCue4050=fb35 -InputSigType4050=Digital -InputCue4051=fb36 -InputSigType4051=Digital -InputCue4052=[~EndGroup~]fb -InputSigType4052=Digital -OutputCue1=Is Moving -OutputSigType1=Digital -OutputCue2=[~UNUSED2~] -OutputSigType2=Digital -OutputCue3=[~UNUSED2~] -OutputSigType3=Digital -OutputCue4=[~UNUSED2~] -OutputSigType4=Digital -OutputCue5=[~UNUSED2~] -OutputSigType5=Digital -OutputCue6=[~UNUSED2~] -OutputSigType6=Digital -OutputCue7=[~UNUSED2~] -OutputSigType7=Digital -OutputCue8=[~UNUSED2~] -OutputSigType8=Digital -OutputCue9=[~UNUSED2~] -OutputSigType9=Digital -OutputCue10=[~UNUSED2~] -OutputSigType10=Digital -OutputCue11=[~BeginGroup~]Enable -OutputSigType11=Digital -OutputCue12=[~UNUSED3~] -OutputSigType12=Digital -OutputCue13=[~UNUSED3~] -OutputSigType13=Digital -OutputCue14=[~UNUSED3~] -OutputSigType14=Digital -OutputCue15=[~UNUSED3~] -OutputSigType15=Digital -OutputCue16=[~UNUSED3~] -OutputSigType16=Digital -OutputCue17=[~UNUSED3~] -OutputSigType17=Digital -OutputCue18=[~UNUSED3~] -OutputSigType18=Digital -OutputCue19=[~UNUSED3~] -OutputSigType19=Digital -OutputCue20=[~UNUSED3~] -OutputSigType20=Digital -OutputCue21=[~UNUSED3~] -OutputSigType21=Digital -OutputCue22=[~UNUSED3~] -OutputSigType22=Digital -OutputCue23=[~UNUSED3~] -OutputSigType23=Digital -OutputCue24=[~UNUSED2~] -OutputSigType24=Digital|Analog|Serial|String -OutputCue2012=[~EndGroup~]Enable -OutputSigType2012=Digital -OutputCue2013=[~BeginGroup~]Visible -OutputSigType2013=Digital -OutputCue2014=[~UNUSED3~] -OutputSigType2014=Digital -OutputCue2015=[~UNUSED3~] -OutputSigType2015=Digital -OutputCue2016=[~UNUSED3~] -OutputSigType2016=Digital -OutputCue2017=[~UNUSED3~] -OutputSigType2017=Digital -OutputCue2018=[~UNUSED3~] -OutputSigType2018=Digital -OutputCue2019=[~UNUSED3~] -OutputSigType2019=Digital -OutputCue2020=[~UNUSED3~] -OutputSigType2020=Digital -OutputCue2021=[~UNUSED3~] -OutputSigType2021=Digital -OutputCue2022=[~UNUSED3~] -OutputSigType2022=Digital -OutputCue2023=[~UNUSED3~] -OutputSigType2023=Digital -OutputCue2024=[~UNUSED3~] -OutputSigType2024=Digital -OutputCue2025=[~UNUSED3~] -OutputSigType2025=Digital -OutputCue2026=[~UNUSED2~] -OutputSigType2026=Digital|Analog|Serial|String -OutputCue4014=[~EndGroup~]Visible -OutputSigType4014=Digital -OutputCue4015=[~BeginGroup~]Press -OutputSigType4015=Digital -OutputCue4016=press1 -OutputSigType4016=Digital -OutputCue4017=press2 -OutputSigType4017=Digital -OutputCue4018=press3 -OutputSigType4018=Digital -OutputCue4019=press4 -OutputSigType4019=Digital -OutputCue4020=press5 -OutputSigType4020=Digital -OutputCue4021=press6 -OutputSigType4021=Digital -OutputCue4022=press7 -OutputSigType4022=Digital -OutputCue4023=press8 -OutputSigType4023=Digital -OutputCue4024=press9 -OutputSigType4024=Digital -OutputCue4025=press10 -OutputSigType4025=Digital -OutputCue4026=press11 -OutputSigType4026=Digital -OutputCue4027=press12 -OutputSigType4027=Digital -OutputCue4028=press13 -OutputSigType4028=Digital -OutputCue4029=press14 -OutputSigType4029=Digital -OutputCue4030=press15 -OutputSigType4030=Digital -OutputCue4031=press16 -OutputSigType4031=Digital -OutputCue4032=press17 -OutputSigType4032=Digital -OutputCue4033=press18 -OutputSigType4033=Digital -OutputCue4034=press19 -OutputSigType4034=Digital -OutputCue4035=press20 -OutputSigType4035=Digital -OutputCue4036=press21 -OutputSigType4036=Digital -OutputCue4037=press22 -OutputSigType4037=Digital -OutputCue4038=press23 -OutputSigType4038=Digital -OutputCue4039=press24 -OutputSigType4039=Digital -OutputCue4040=press25 -OutputSigType4040=Digital -OutputCue4041=press26 -OutputSigType4041=Digital -OutputCue4042=press27 -OutputSigType4042=Digital -OutputCue4043=press28 -OutputSigType4043=Digital -OutputCue4044=press29 -OutputSigType4044=Digital -OutputCue4045=press30 -OutputSigType4045=Digital -OutputCue4046=press31 -OutputSigType4046=Digital -OutputCue4047=press32 -OutputSigType4047=Digital -OutputCue4048=press33 -OutputSigType4048=Digital -OutputCue4049=press34 -OutputSigType4049=Digital -OutputCue4050=press35 -OutputSigType4050=Digital -OutputCue4051=press36 -OutputSigType4051=Digital -OutputCue4052=[~EndGroup~]Press -OutputSigType4052=Digital -InputList2Cue1=[~UNUSED3~] -InputList2SigType1=Analog -InputList2Cue2=Scroll To Item -InputList2SigType2=Analog -InputList2Cue3=Set Number of Items -InputList2SigType3=Analog -InputList2Cue4=[~UNUSED2~] -InputList2SigType4=Analog -InputList2Cue5=[~UNUSED2~] -InputList2SigType5=Analog -InputList2Cue6=[~UNUSED2~] -InputList2SigType6=Analog -InputList2Cue7=[~UNUSED2~] -InputList2SigType7=Analog -InputList2Cue8=[~UNUSED2~] -InputList2SigType8=Analog -InputList2Cue9=[~UNUSED2~] -InputList2SigType9=Analog -InputList2Cue10=[~UNUSED2~] -InputList2SigType10=Analog -InputList2Cue11=[~BeginGroup~]an_fb -InputList2SigType11=Analog -InputList2Cue12=an_fb1 -InputList2SigType12=Analog -InputList2Cue13=an_fb2 -InputList2SigType13=Analog -InputList2Cue14=an_fb3 -InputList2SigType14=Analog -InputList2Cue15=an_fb4 -InputList2SigType15=Analog -InputList2Cue16=an_fb5 -InputList2SigType16=Analog -InputList2Cue17=an_fb6 -InputList2SigType17=Analog -InputList2Cue18=an_fb7 -InputList2SigType18=Analog -InputList2Cue19=an_fb8 -InputList2SigType19=Analog -InputList2Cue20=an_fb9 -InputList2SigType20=Analog -InputList2Cue21=an_fb10 -InputList2SigType21=Analog -InputList2Cue22=an_fb11 -InputList2SigType22=Analog -InputList2Cue23=an_fb12 -InputList2SigType23=Analog -InputList2Cue24=an_fb13 -InputList2SigType24=Analog -InputList2Cue25=an_fb14 -InputList2SigType25=Analog -InputList2Cue26=an_fb15 -InputList2SigType26=Analog -InputList2Cue27=an_fb16 -InputList2SigType27=Analog -InputList2Cue28=an_fb17 -InputList2SigType28=Analog -InputList2Cue29=an_fb18 -InputList2SigType29=Analog -InputList2Cue30=an_fb19 -InputList2SigType30=Analog -InputList2Cue31=an_fb20 -InputList2SigType31=Analog -InputList2Cue32=an_fb21 -InputList2SigType32=Analog -InputList2Cue33=an_fb22 -InputList2SigType33=Analog -InputList2Cue34=an_fb23 -InputList2SigType34=Analog -InputList2Cue35=an_fb24 -InputList2SigType35=Analog -InputList2Cue36=an_fb25 -InputList2SigType36=Analog -InputList2Cue37=an_fb26 -InputList2SigType37=Analog -InputList2Cue38=an_fb27 -InputList2SigType38=Analog -InputList2Cue39=an_fb28 -InputList2SigType39=Analog -InputList2Cue40=an_fb29 -InputList2SigType40=Analog -InputList2Cue41=an_fb30 -InputList2SigType41=Analog -InputList2Cue42=an_fb31 -InputList2SigType42=Analog -InputList2Cue43=an_fb32 -InputList2SigType43=Analog -InputList2Cue44=an_fb33 -InputList2SigType44=Analog -InputList2Cue45=an_fb34 -InputList2SigType45=Analog -InputList2Cue46=an_fb35 -InputList2SigType46=Analog -InputList2Cue47=an_fb36 -InputList2SigType47=Analog -InputList2Cue48=[~EndGroup~]an_fb -InputList2SigType48=Analog -OutputList2Cue1=Item Clicked -OutputList2SigType1=Analog -OutputList2Cue2=[~UNUSED3~] -OutputList2SigType2=Analog -OutputList2Cue3=[~UNUSED3~] -OutputList2SigType3=Analog -OutputList2Cue4=[~UNUSED2~] -OutputList2SigType4=Analog -OutputList2Cue5=[~UNUSED2~] -OutputList2SigType5=Analog -OutputList2Cue6=[~UNUSED2~] -OutputList2SigType6=Analog -OutputList2Cue7=[~UNUSED2~] -OutputList2SigType7=Analog -OutputList2Cue8=[~UNUSED2~] -OutputList2SigType8=Analog -OutputList2Cue9=[~UNUSED2~] -OutputList2SigType9=Analog -OutputList2Cue10=[~UNUSED2~] -OutputList2SigType10=Analog -OutputList2Cue11=[~BeginGroup~]an_act -OutputList2SigType11=Analog -OutputList2Cue12=an_act1 -OutputList2SigType12=Analog -OutputList2Cue13=an_act2 -OutputList2SigType13=Analog -OutputList2Cue14=an_act3 -OutputList2SigType14=Analog -OutputList2Cue15=an_act4 -OutputList2SigType15=Analog -OutputList2Cue16=an_act5 -OutputList2SigType16=Analog -OutputList2Cue17=an_act6 -OutputList2SigType17=Analog -OutputList2Cue18=an_act7 -OutputList2SigType18=Analog -OutputList2Cue19=an_act8 -OutputList2SigType19=Analog -OutputList2Cue20=an_act9 -OutputList2SigType20=Analog -OutputList2Cue21=an_act10 -OutputList2SigType21=Analog -OutputList2Cue22=an_act11 -OutputList2SigType22=Analog -OutputList2Cue23=an_act12 -OutputList2SigType23=Analog -OutputList2Cue24=an_act13 -OutputList2SigType24=Analog -OutputList2Cue25=an_act14 -OutputList2SigType25=Analog -OutputList2Cue26=an_act15 -OutputList2SigType26=Analog -OutputList2Cue27=an_act16 -OutputList2SigType27=Analog -OutputList2Cue28=an_act17 -OutputList2SigType28=Analog -OutputList2Cue29=an_act18 -OutputList2SigType29=Analog -OutputList2Cue30=an_act19 -OutputList2SigType30=Analog -OutputList2Cue31=an_act20 -OutputList2SigType31=Analog -OutputList2Cue32=an_act21 -OutputList2SigType32=Analog -OutputList2Cue33=an_act22 -OutputList2SigType33=Analog -OutputList2Cue34=an_act23 -OutputList2SigType34=Analog -OutputList2Cue35=an_act24 -OutputList2SigType35=Analog -OutputList2Cue36=an_act25 -OutputList2SigType36=Analog -OutputList2Cue37=an_act26 -OutputList2SigType37=Analog -OutputList2Cue38=an_act27 -OutputList2SigType38=Analog -OutputList2Cue39=an_act28 -OutputList2SigType39=Analog -OutputList2Cue40=an_act29 -OutputList2SigType40=Analog -OutputList2Cue41=an_act30 -OutputList2SigType41=Analog -OutputList2Cue42=an_act31 -OutputList2SigType42=Analog -OutputList2Cue43=an_act32 -OutputList2SigType43=Analog -OutputList2Cue44=an_act33 -OutputList2SigType44=Analog -OutputList2Cue45=an_act34 -OutputList2SigType45=Analog -OutputList2Cue46=an_act35 -OutputList2SigType46=Analog -OutputList2Cue47=an_act36 -OutputList2SigType47=Analog -OutputList2Cue48=[~EndGroup~]an_act -OutputList2SigType48=Analog -InputList3Cue1=[~UNUSED2~] -InputList3SigType1=Serial -InputList3Cue2=[~UNUSED2~] -InputList3SigType2=Serial -InputList3Cue3=[~UNUSED2~] -InputList3SigType3=Serial -InputList3Cue4=[~UNUSED2~] -InputList3SigType4=Serial -InputList3Cue5=[~UNUSED2~] -InputList3SigType5=Serial -InputList3Cue6=[~UNUSED2~] -InputList3SigType6=Serial -InputList3Cue7=[~UNUSED2~] -InputList3SigType7=Serial -InputList3Cue8=[~UNUSED2~] -InputList3SigType8=Serial -InputList3Cue9=[~UNUSED2~] -InputList3SigType9=Serial -InputList3Cue10=[~UNUSED2~] -InputList3SigType10=Serial -InputList3Cue11=[~BeginGroup~]text-o -InputList3SigType11=Serial -InputList3Cue12=text-o1 -InputList3SigType12=Serial -InputList3Cue13=text-o2 -InputList3SigType13=Serial -InputList3Cue14=text-o3 -InputList3SigType14=Serial -InputList3Cue15=text-o4 -InputList3SigType15=Serial -InputList3Cue16=text-o5 -InputList3SigType16=Serial -InputList3Cue17=text-o6 -InputList3SigType17=Serial -InputList3Cue18=text-o7 -InputList3SigType18=Serial -InputList3Cue19=text-o8 -InputList3SigType19=Serial -InputList3Cue20=text-o9 -InputList3SigType20=Serial -InputList3Cue21=text-o10 -InputList3SigType21=Serial -InputList3Cue22=text-o11 -InputList3SigType22=Serial -InputList3Cue23=text-o12 -InputList3SigType23=Serial -InputList3Cue24=text-o13 -InputList3SigType24=Serial -InputList3Cue25=text-o14 -InputList3SigType25=Serial -InputList3Cue26=text-o15 -InputList3SigType26=Serial -InputList3Cue27=text-o16 -InputList3SigType27=Serial -InputList3Cue28=text-o17 -InputList3SigType28=Serial -InputList3Cue29=text-o18 -InputList3SigType29=Serial -InputList3Cue30=text-o19 -InputList3SigType30=Serial -InputList3Cue31=text-o20 -InputList3SigType31=Serial -InputList3Cue32=text-o21 -InputList3SigType32=Serial -InputList3Cue33=text-o22 -InputList3SigType33=Serial -InputList3Cue34=text-o23 -InputList3SigType34=Serial -InputList3Cue35=text-o24 -InputList3SigType35=Serial -InputList3Cue36=text-o25 -InputList3SigType36=Serial -InputList3Cue37=text-o26 -InputList3SigType37=Serial -InputList3Cue38=text-o27 -InputList3SigType38=Serial -InputList3Cue39=text-o28 -InputList3SigType39=Serial -InputList3Cue40=text-o29 -InputList3SigType40=Serial -InputList3Cue41=text-o30 -InputList3SigType41=Serial -InputList3Cue42=text-o31 -InputList3SigType42=Serial -InputList3Cue43=text-o32 -InputList3SigType43=Serial -InputList3Cue44=text-o33 -InputList3SigType44=Serial -InputList3Cue45=text-o34 -InputList3SigType45=Serial -InputList3Cue46=text-o35 -InputList3SigType46=Serial -InputList3Cue47=text-o36 -InputList3SigType47=Serial -InputList3Cue48=text-o37 -InputList3SigType48=Serial -InputList3Cue49=text-o38 -InputList3SigType49=Serial -InputList3Cue50=text-o39 -InputList3SigType50=Serial -InputList3Cue51=text-o40 -InputList3SigType51=Serial -InputList3Cue52=text-o41 -InputList3SigType52=Serial -InputList3Cue53=text-o42 -InputList3SigType53=Serial -InputList3Cue54=text-o43 -InputList3SigType54=Serial -InputList3Cue55=text-o44 -InputList3SigType55=Serial -InputList3Cue56=text-o45 -InputList3SigType56=Serial -InputList3Cue57=text-o46 -InputList3SigType57=Serial -InputList3Cue58=text-o47 -InputList3SigType58=Serial -InputList3Cue59=text-o48 -InputList3SigType59=Serial -InputList3Cue60=text-o49 -InputList3SigType60=Serial -InputList3Cue61=text-o50 -InputList3SigType61=Serial -InputList3Cue62=text-o51 -InputList3SigType62=Serial -InputList3Cue63=text-o52 -InputList3SigType63=Serial -InputList3Cue64=text-o53 -InputList3SigType64=Serial -InputList3Cue65=text-o54 -InputList3SigType65=Serial -InputList3Cue66=text-o55 -InputList3SigType66=Serial -InputList3Cue67=text-o56 -InputList3SigType67=Serial -InputList3Cue68=text-o57 -InputList3SigType68=Serial -InputList3Cue69=text-o58 -InputList3SigType69=Serial -InputList3Cue70=text-o59 -InputList3SigType70=Serial -InputList3Cue71=text-o60 -InputList3SigType71=Serial -InputList3Cue72=[~EndGroup~]text-o -InputList3SigType72=Serial -OutputList3Cue1=[~UNUSED2~] -OutputList3SigType1=Serial -OutputList3Cue2=[~UNUSED2~] -OutputList3SigType2=Serial -OutputList3Cue3=[~UNUSED2~] -OutputList3SigType3=Serial -OutputList3Cue4=[~UNUSED2~] -OutputList3SigType4=Serial -OutputList3Cue5=[~UNUSED2~] -OutputList3SigType5=Serial -OutputList3Cue6=[~UNUSED2~] -OutputList3SigType6=Serial -OutputList3Cue7=[~UNUSED2~] -OutputList3SigType7=Serial -OutputList3Cue8=[~UNUSED2~] -OutputList3SigType8=Serial -OutputList3Cue9=[~UNUSED2~] -OutputList3SigType9=Serial -OutputList3Cue10=[~UNUSED2~] -OutputList3SigType10=Serial -OutputList3Cue11=[~BeginGroup~]text-i -OutputList3SigType11=Serial -OutputList3Cue12=text-i1 -OutputList3SigType12=Serial -OutputList3Cue13=text-i2 -OutputList3SigType13=Serial -OutputList3Cue14=text-i3 -OutputList3SigType14=Serial -OutputList3Cue15=text-i4 -OutputList3SigType15=Serial -OutputList3Cue16=text-i5 -OutputList3SigType16=Serial -OutputList3Cue17=text-i6 -OutputList3SigType17=Serial -OutputList3Cue18=text-i7 -OutputList3SigType18=Serial -OutputList3Cue19=text-i8 -OutputList3SigType19=Serial -OutputList3Cue20=text-i9 -OutputList3SigType20=Serial -OutputList3Cue21=text-i10 -OutputList3SigType21=Serial -OutputList3Cue22=text-i11 -OutputList3SigType22=Serial -OutputList3Cue23=text-i12 -OutputList3SigType23=Serial -OutputList3Cue24=text-i13 -OutputList3SigType24=Serial -OutputList3Cue25=text-i14 -OutputList3SigType25=Serial -OutputList3Cue26=text-i15 -OutputList3SigType26=Serial -OutputList3Cue27=text-i16 -OutputList3SigType27=Serial -OutputList3Cue28=text-i17 -OutputList3SigType28=Serial -OutputList3Cue29=text-i18 -OutputList3SigType29=Serial -OutputList3Cue30=text-i19 -OutputList3SigType30=Serial -OutputList3Cue31=text-i20 -OutputList3SigType31=Serial -OutputList3Cue32=text-i21 -OutputList3SigType32=Serial -OutputList3Cue33=text-i22 -OutputList3SigType33=Serial -OutputList3Cue34=text-i23 -OutputList3SigType34=Serial -OutputList3Cue35=text-i24 -OutputList3SigType35=Serial -OutputList3Cue36=text-i25 -OutputList3SigType36=Serial -OutputList3Cue37=text-i26 -OutputList3SigType37=Serial -OutputList3Cue38=text-i27 -OutputList3SigType38=Serial -OutputList3Cue39=text-i28 -OutputList3SigType39=Serial -OutputList3Cue40=text-i29 -OutputList3SigType40=Serial -OutputList3Cue41=text-i30 -OutputList3SigType41=Serial -OutputList3Cue42=text-i31 -OutputList3SigType42=Serial -OutputList3Cue43=text-i32 -OutputList3SigType43=Serial -OutputList3Cue44=text-i33 -OutputList3SigType44=Serial -OutputList3Cue45=text-i34 -OutputList3SigType45=Serial -OutputList3Cue46=text-i35 -OutputList3SigType46=Serial -OutputList3Cue47=text-i36 -OutputList3SigType47=Serial -OutputList3Cue48=text-i37 -OutputList3SigType48=Serial -OutputList3Cue49=text-i38 -OutputList3SigType49=Serial -OutputList3Cue50=text-i39 -OutputList3SigType50=Serial -OutputList3Cue51=text-i40 -OutputList3SigType51=Serial -OutputList3Cue52=text-i41 -OutputList3SigType52=Serial -OutputList3Cue53=text-i42 -OutputList3SigType53=Serial -OutputList3Cue54=text-i43 -OutputList3SigType54=Serial -OutputList3Cue55=text-i44 -OutputList3SigType55=Serial -OutputList3Cue56=text-i45 -OutputList3SigType56=Serial -OutputList3Cue57=text-i46 -OutputList3SigType57=Serial -OutputList3Cue58=text-i47 -OutputList3SigType58=Serial -OutputList3Cue59=text-i48 -OutputList3SigType59=Serial -OutputList3Cue60=text-i49 -OutputList3SigType60=Serial -OutputList3Cue61=text-i50 -OutputList3SigType61=Serial -OutputList3Cue62=text-i51 -OutputList3SigType62=Serial -OutputList3Cue63=text-i52 -OutputList3SigType63=Serial -OutputList3Cue64=text-i53 -OutputList3SigType64=Serial -OutputList3Cue65=text-i54 -OutputList3SigType65=Serial -OutputList3Cue66=text-i55 -OutputList3SigType66=Serial -OutputList3Cue67=text-i56 -OutputList3SigType67=Serial -OutputList3Cue68=text-i57 -OutputList3SigType68=Serial -OutputList3Cue69=text-i58 -OutputList3SigType69=Serial -OutputList3Cue70=text-i59 -OutputList3SigType70=Serial -OutputList3Cue71=text-i60 -OutputList3SigType71=Serial -OutputList3Cue72=[~EndGroup~]text-i -OutputList3SigType72=Serial -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=18 -CedH=18 -SmartObjId=15023d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=18 -Tp=1 -HD=TRUE -DV=15023d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=18 -Name=PepperDash Essentials iPad_[Z.Dialogs] Schedule List_Subpage Reference List Vertical.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] -;================================================================================ -[ -ObjTp=Symbol -Name=PepperDash Essentials iPad_[D.VC] Recents_Dynamic Button List Vertical_2.ced -Hint=Dynamic Button List Vertical_2 (Smart Object ID=1203) -Code=19 -SGControlType=Dynamic Button List Vertical -SGControlName=Dynamic Button List Vertical_2 -GUID=2C4B55E4-42AC-486D-BC6E-C7DD7D24C974 -SmplCName=PepperDash Essentials iPad_[D.VC] Recents_Dynamic Button List Vertical_2.ced -SMWRev=4.02.20 -Expand=expand_random -HelpID=10112 -Render=8 -;Define the number of inputs, outputs and parameters -MinVariableInputs=6016 -MaxVariableInputs=6016 -MinVariableOutputs=6016 -MaxVariableOutputs=6016 -NumFixedParams=1 -MinVariableInputsList2=2012 -MaxVariableInputsList2=2012 -MinVariableOutputsList2=2012 -MaxVariableOutputsList2=2012 -MinVariableInputsList3=4014 -MaxVariableInputsList3=4014 -MinVariableOutputsList3=4014 -MaxVariableOutputsList3=4014 -InputSigType1=Digital -OutputSigType1=Digital -InputList2SigType1=Analog -OutputList2SigType1=Analog -InputList3SigType1=Serial -OutputList3SigType1=Serial - -;Define the cues, and signal types each input, output and parameter. -InputCue1=Disable Redraw -InputSigType1=Digital -InputCue2=[~UNUSED3~] -InputSigType2=Digital -InputCue3=[~UNUSED2~] -InputSigType3=Digital -InputCue4=[~UNUSED2~] -InputSigType4=Digital -InputCue5=[~UNUSED2~] -InputSigType5=Digital -InputCue6=[~UNUSED2~] -InputSigType6=Digital -InputCue7=[~UNUSED2~] -InputSigType7=Digital -InputCue8=[~UNUSED2~] -InputSigType8=Digital -InputCue9=[~UNUSED2~] -InputSigType9=Digital -InputCue10=[~UNUSED2~] -InputSigType10=Digital -InputCue11=[~BeginGroup~]Press -InputSigType11=Digital -InputCue12=Item 1 Selected -InputSigType12=Digital -InputCue13=Item 2 Selected -InputSigType13=Digital -InputCue14=Item 3 Selected -InputSigType14=Digital -InputCue15=Item 4 Selected -InputSigType15=Digital -InputCue16=Item 5 Selected -InputSigType16=Digital -InputCue17=Item 6 Selected -InputSigType17=Digital -InputCue18=Item 7 Selected -InputSigType18=Digital -InputCue19=Item 8 Selected -InputSigType19=Digital -InputCue20=Item 9 Selected -InputSigType20=Digital -InputCue21=Item 10 Selected -InputSigType21=Digital -InputCue22=Item 11 Selected -InputSigType22=Digital -InputCue23=Item 12 Selected -InputSigType23=Digital -InputCue24=Item 13 Selected -InputSigType24=Digital -InputCue25=Item 14 Selected -InputSigType25=Digital -InputCue26=Item 15 Selected -InputSigType26=Digital -InputCue27=Item 16 Selected -InputSigType27=Digital -InputCue28=Item 17 Selected -InputSigType28=Digital -InputCue29=Item 18 Selected -InputSigType29=Digital -InputCue30=Item 19 Selected -InputSigType30=Digital -InputCue31=Item 20 Selected -InputSigType31=Digital -InputCue32=Item 21 Selected -InputSigType32=Digital -InputCue33=Item 22 Selected -InputSigType33=Digital -InputCue34=Item 23 Selected -InputSigType34=Digital -InputCue35=Item 24 Selected -InputSigType35=Digital -InputCue36=Item 25 Selected -InputSigType36=Digital -InputCue37=Item 26 Selected -InputSigType37=Digital -InputCue38=Item 27 Selected -InputSigType38=Digital -InputCue39=Item 28 Selected -InputSigType39=Digital -InputCue40=Item 29 Selected -InputSigType40=Digital -InputCue41=Item 30 Selected -InputSigType41=Digital -InputCue42=[~UNUSED2~] -InputSigType42=Digital|Analog|Serial|String -InputCue2012=[~EndGroup~]Press -InputSigType2012=Digital -InputCue2013=[~BeginGroup~]Enable -InputSigType2013=Digital -InputCue2014=Item 1 Enabled -InputSigType2014=Digital -InputCue2015=Item 2 Enabled -InputSigType2015=Digital -InputCue2016=Item 3 Enabled -InputSigType2016=Digital -InputCue2017=Item 4 Enabled -InputSigType2017=Digital -InputCue2018=Item 5 Enabled -InputSigType2018=Digital -InputCue2019=Item 6 Enabled -InputSigType2019=Digital -InputCue2020=Item 7 Enabled -InputSigType2020=Digital -InputCue2021=Item 8 Enabled -InputSigType2021=Digital -InputCue2022=Item 9 Enabled -InputSigType2022=Digital -InputCue2023=Item 10 Enabled -InputSigType2023=Digital -InputCue2024=Item 11 Enabled -InputSigType2024=Digital -InputCue2025=Item 12 Enabled -InputSigType2025=Digital -InputCue2026=Item 13 Enabled -InputSigType2026=Digital -InputCue2027=Item 14 Enabled -InputSigType2027=Digital -InputCue2028=Item 15 Enabled -InputSigType2028=Digital -InputCue2029=Item 16 Enabled -InputSigType2029=Digital -InputCue2030=Item 17 Enabled -InputSigType2030=Digital -InputCue2031=Item 18 Enabled -InputSigType2031=Digital -InputCue2032=Item 19 Enabled -InputSigType2032=Digital -InputCue2033=Item 20 Enabled -InputSigType2033=Digital -InputCue2034=Item 21 Enabled -InputSigType2034=Digital -InputCue2035=Item 22 Enabled -InputSigType2035=Digital -InputCue2036=Item 23 Enabled -InputSigType2036=Digital -InputCue2037=Item 24 Enabled -InputSigType2037=Digital -InputCue2038=Item 25 Enabled -InputSigType2038=Digital -InputCue2039=Item 26 Enabled -InputSigType2039=Digital -InputCue2040=Item 27 Enabled -InputSigType2040=Digital -InputCue2041=Item 28 Enabled -InputSigType2041=Digital -InputCue2042=Item 29 Enabled -InputSigType2042=Digital -InputCue2043=Item 30 Enabled -InputSigType2043=Digital -InputCue2044=[~UNUSED2~] -InputSigType2044=Digital|Analog|Serial|String -InputCue4014=[~EndGroup~]Enable -InputSigType4014=Digital -InputCue4015=[~BeginGroup~]Visible -InputSigType4015=Digital -InputCue4016=Item 1 Visible -InputSigType4016=Digital -InputCue4017=Item 2 Visible -InputSigType4017=Digital -InputCue4018=Item 3 Visible -InputSigType4018=Digital -InputCue4019=Item 4 Visible -InputSigType4019=Digital -InputCue4020=Item 5 Visible -InputSigType4020=Digital -InputCue4021=Item 6 Visible -InputSigType4021=Digital -InputCue4022=Item 7 Visible -InputSigType4022=Digital -InputCue4023=Item 8 Visible -InputSigType4023=Digital -InputCue4024=Item 9 Visible -InputSigType4024=Digital -InputCue4025=Item 10 Visible -InputSigType4025=Digital -InputCue4026=Item 11 Visible -InputSigType4026=Digital -InputCue4027=Item 12 Visible -InputSigType4027=Digital -InputCue4028=Item 13 Visible -InputSigType4028=Digital -InputCue4029=Item 14 Visible -InputSigType4029=Digital -InputCue4030=Item 15 Visible -InputSigType4030=Digital -InputCue4031=Item 16 Visible -InputSigType4031=Digital -InputCue4032=Item 17 Visible -InputSigType4032=Digital -InputCue4033=Item 18 Visible -InputSigType4033=Digital -InputCue4034=Item 19 Visible -InputSigType4034=Digital -InputCue4035=Item 20 Visible -InputSigType4035=Digital -InputCue4036=Item 21 Visible -InputSigType4036=Digital -InputCue4037=Item 22 Visible -InputSigType4037=Digital -InputCue4038=Item 23 Visible -InputSigType4038=Digital -InputCue4039=Item 24 Visible -InputSigType4039=Digital -InputCue4040=Item 25 Visible -InputSigType4040=Digital -InputCue4041=Item 26 Visible -InputSigType4041=Digital -InputCue4042=Item 27 Visible -InputSigType4042=Digital -InputCue4043=Item 28 Visible -InputSigType4043=Digital -InputCue4044=Item 29 Visible -InputSigType4044=Digital -InputCue4045=Item 30 Visible -InputSigType4045=Digital -InputCue4046=[~UNUSED2~] -InputSigType4046=Digital|Analog|Serial|String -InputCue6016=[~EndGroup~]Visible -InputSigType6016=Digital -OutputCue1=[~UNUSED3~] -OutputSigType1=Digital -OutputCue2=Is Moving -OutputSigType2=Digital -OutputCue3=[~UNUSED2~] -OutputSigType3=Digital -OutputCue4=[~UNUSED2~] -OutputSigType4=Digital -OutputCue5=[~UNUSED2~] -OutputSigType5=Digital -OutputCue6=[~UNUSED2~] -OutputSigType6=Digital -OutputCue7=[~UNUSED2~] -OutputSigType7=Digital -OutputCue8=[~UNUSED2~] -OutputSigType8=Digital -OutputCue9=[~UNUSED2~] -OutputSigType9=Digital -OutputCue10=[~UNUSED2~] -OutputSigType10=Digital -OutputCue11=[~BeginGroup~]Press -OutputSigType11=Digital -OutputCue12=Item 1 Pressed -OutputSigType12=Digital -OutputCue13=Item 2 Pressed -OutputSigType13=Digital -OutputCue14=Item 3 Pressed -OutputSigType14=Digital -OutputCue15=Item 4 Pressed -OutputSigType15=Digital -OutputCue16=Item 5 Pressed -OutputSigType16=Digital -OutputCue17=Item 6 Pressed -OutputSigType17=Digital -OutputCue18=Item 7 Pressed -OutputSigType18=Digital -OutputCue19=Item 8 Pressed -OutputSigType19=Digital -OutputCue20=Item 9 Pressed -OutputSigType20=Digital -OutputCue21=Item 10 Pressed -OutputSigType21=Digital -OutputCue22=Item 11 Pressed -OutputSigType22=Digital -OutputCue23=Item 12 Pressed -OutputSigType23=Digital -OutputCue24=Item 13 Pressed -OutputSigType24=Digital -OutputCue25=Item 14 Pressed -OutputSigType25=Digital -OutputCue26=Item 15 Pressed -OutputSigType26=Digital -OutputCue27=Item 16 Pressed -OutputSigType27=Digital -OutputCue28=Item 17 Pressed -OutputSigType28=Digital -OutputCue29=Item 18 Pressed -OutputSigType29=Digital -OutputCue30=Item 19 Pressed -OutputSigType30=Digital -OutputCue31=Item 20 Pressed -OutputSigType31=Digital -OutputCue32=Item 21 Pressed -OutputSigType32=Digital -OutputCue33=Item 22 Pressed -OutputSigType33=Digital -OutputCue34=Item 23 Pressed -OutputSigType34=Digital -OutputCue35=Item 24 Pressed -OutputSigType35=Digital -OutputCue36=Item 25 Pressed -OutputSigType36=Digital -OutputCue37=Item 26 Pressed -OutputSigType37=Digital -OutputCue38=Item 27 Pressed -OutputSigType38=Digital -OutputCue39=Item 28 Pressed -OutputSigType39=Digital -OutputCue40=Item 29 Pressed -OutputSigType40=Digital -OutputCue41=Item 30 Pressed -OutputSigType41=Digital -OutputCue42=[~UNUSED2~] -OutputSigType42=Digital|Analog|Serial|String -OutputCue2012=[~EndGroup~]Press -OutputSigType2012=Digital -OutputCue2013=[~BeginGroup~]Enable -OutputSigType2013=Digital -OutputCue2014=[~UNUSED3~] -OutputSigType2014=Digital -OutputCue2015=[~UNUSED3~] -OutputSigType2015=Digital -OutputCue2016=[~UNUSED3~] -OutputSigType2016=Digital -OutputCue2017=[~UNUSED3~] -OutputSigType2017=Digital -OutputCue2018=[~UNUSED3~] -OutputSigType2018=Digital -OutputCue2019=[~UNUSED3~] -OutputSigType2019=Digital -OutputCue2020=[~UNUSED3~] -OutputSigType2020=Digital -OutputCue2021=[~UNUSED3~] -OutputSigType2021=Digital -OutputCue2022=[~UNUSED3~] -OutputSigType2022=Digital -OutputCue2023=[~UNUSED3~] -OutputSigType2023=Digital -OutputCue2024=[~UNUSED3~] -OutputSigType2024=Digital -OutputCue2025=[~UNUSED3~] -OutputSigType2025=Digital -OutputCue2026=[~UNUSED3~] -OutputSigType2026=Digital -OutputCue2027=[~UNUSED3~] -OutputSigType2027=Digital -OutputCue2028=[~UNUSED3~] -OutputSigType2028=Digital -OutputCue2029=[~UNUSED3~] -OutputSigType2029=Digital -OutputCue2030=[~UNUSED3~] -OutputSigType2030=Digital -OutputCue2031=[~UNUSED3~] -OutputSigType2031=Digital -OutputCue2032=[~UNUSED3~] -OutputSigType2032=Digital -OutputCue2033=[~UNUSED3~] -OutputSigType2033=Digital -OutputCue2034=[~UNUSED3~] -OutputSigType2034=Digital -OutputCue2035=[~UNUSED3~] -OutputSigType2035=Digital -OutputCue2036=[~UNUSED3~] -OutputSigType2036=Digital -OutputCue2037=[~UNUSED3~] -OutputSigType2037=Digital -OutputCue2038=[~UNUSED3~] -OutputSigType2038=Digital -OutputCue2039=[~UNUSED3~] -OutputSigType2039=Digital -OutputCue2040=[~UNUSED3~] -OutputSigType2040=Digital -OutputCue2041=[~UNUSED3~] -OutputSigType2041=Digital -OutputCue2042=[~UNUSED3~] -OutputSigType2042=Digital -OutputCue2043=[~UNUSED3~] -OutputSigType2043=Digital -OutputCue2044=[~UNUSED2~] -OutputSigType2044=Digital|Analog|Serial|String -OutputCue4014=[~EndGroup~]Enable -OutputSigType4014=Digital -OutputCue4015=[~BeginGroup~]Visible -OutputSigType4015=Digital -OutputCue4016=[~UNUSED3~] -OutputSigType4016=Digital -OutputCue4017=[~UNUSED3~] -OutputSigType4017=Digital -OutputCue4018=[~UNUSED3~] -OutputSigType4018=Digital -OutputCue4019=[~UNUSED3~] -OutputSigType4019=Digital -OutputCue4020=[~UNUSED3~] -OutputSigType4020=Digital -OutputCue4021=[~UNUSED3~] -OutputSigType4021=Digital -OutputCue4022=[~UNUSED3~] -OutputSigType4022=Digital -OutputCue4023=[~UNUSED3~] -OutputSigType4023=Digital -OutputCue4024=[~UNUSED3~] -OutputSigType4024=Digital -OutputCue4025=[~UNUSED3~] -OutputSigType4025=Digital -OutputCue4026=[~UNUSED3~] -OutputSigType4026=Digital -OutputCue4027=[~UNUSED3~] -OutputSigType4027=Digital -OutputCue4028=[~UNUSED3~] -OutputSigType4028=Digital -OutputCue4029=[~UNUSED3~] -OutputSigType4029=Digital -OutputCue4030=[~UNUSED3~] -OutputSigType4030=Digital -OutputCue4031=[~UNUSED3~] -OutputSigType4031=Digital -OutputCue4032=[~UNUSED3~] -OutputSigType4032=Digital -OutputCue4033=[~UNUSED3~] -OutputSigType4033=Digital -OutputCue4034=[~UNUSED3~] -OutputSigType4034=Digital -OutputCue4035=[~UNUSED3~] -OutputSigType4035=Digital -OutputCue4036=[~UNUSED3~] -OutputSigType4036=Digital -OutputCue4037=[~UNUSED3~] -OutputSigType4037=Digital -OutputCue4038=[~UNUSED3~] -OutputSigType4038=Digital -OutputCue4039=[~UNUSED3~] -OutputSigType4039=Digital -OutputCue4040=[~UNUSED3~] -OutputSigType4040=Digital -OutputCue4041=[~UNUSED3~] -OutputSigType4041=Digital -OutputCue4042=[~UNUSED3~] -OutputSigType4042=Digital -OutputCue4043=[~UNUSED3~] -OutputSigType4043=Digital -OutputCue4044=[~UNUSED3~] -OutputSigType4044=Digital -OutputCue4045=[~UNUSED3~] -OutputSigType4045=Digital -OutputCue4046=[~UNUSED2~] -OutputSigType4046=Digital|Analog|Serial|String -OutputCue6016=[~EndGroup~]Visible -OutputSigType6016=Digital -InputList2Cue1=[~UNUSED3~] -InputList2SigType1=Analog -InputList2Cue2=[~UNUSED3~] -InputList2SigType2=Analog -InputList2Cue3=Scroll To Item -InputList2SigType3=Analog -InputList2Cue4=Set Number of Items -InputList2SigType4=Analog -InputList2Cue5=[~UNUSED2~] -InputList2SigType5=Analog -InputList2Cue6=[~UNUSED2~] -InputList2SigType6=Analog -InputList2Cue7=[~UNUSED2~] -InputList2SigType7=Analog -InputList2Cue8=[~UNUSED2~] -InputList2SigType8=Analog -InputList2Cue9=[~UNUSED2~] -InputList2SigType9=Analog -InputList2Cue10=[~UNUSED2~] -InputList2SigType10=Analog -InputList2Cue11=[~BeginGroup~]Item Icons -InputList2SigType11=Analog -InputList2Cue12=Set Item 1 Icon Analog -InputList2SigType12=Analog -InputList2Cue13=Set Item 2 Icon Analog -InputList2SigType13=Analog -InputList2Cue14=Set Item 3 Icon Analog -InputList2SigType14=Analog -InputList2Cue15=Set Item 4 Icon Analog -InputList2SigType15=Analog -InputList2Cue16=Set Item 5 Icon Analog -InputList2SigType16=Analog -InputList2Cue17=Set Item 6 Icon Analog -InputList2SigType17=Analog -InputList2Cue18=Set Item 7 Icon Analog -InputList2SigType18=Analog -InputList2Cue19=Set Item 8 Icon Analog -InputList2SigType19=Analog -InputList2Cue20=Set Item 9 Icon Analog -InputList2SigType20=Analog -InputList2Cue21=Set Item 10 Icon Analog -InputList2SigType21=Analog -InputList2Cue22=Set Item 11 Icon Analog -InputList2SigType22=Analog -InputList2Cue23=Set Item 12 Icon Analog -InputList2SigType23=Analog -InputList2Cue24=Set Item 13 Icon Analog -InputList2SigType24=Analog -InputList2Cue25=Set Item 14 Icon Analog -InputList2SigType25=Analog -InputList2Cue26=Set Item 15 Icon Analog -InputList2SigType26=Analog -InputList2Cue27=Set Item 16 Icon Analog -InputList2SigType27=Analog -InputList2Cue28=Set Item 17 Icon Analog -InputList2SigType28=Analog -InputList2Cue29=Set Item 18 Icon Analog -InputList2SigType29=Analog -InputList2Cue30=Set Item 19 Icon Analog -InputList2SigType30=Analog -InputList2Cue31=Set Item 20 Icon Analog -InputList2SigType31=Analog -InputList2Cue32=Set Item 21 Icon Analog -InputList2SigType32=Analog -InputList2Cue33=Set Item 22 Icon Analog -InputList2SigType33=Analog -InputList2Cue34=Set Item 23 Icon Analog -InputList2SigType34=Analog -InputList2Cue35=Set Item 24 Icon Analog -InputList2SigType35=Analog -InputList2Cue36=Set Item 25 Icon Analog -InputList2SigType36=Analog -InputList2Cue37=Set Item 26 Icon Analog -InputList2SigType37=Analog -InputList2Cue38=Set Item 27 Icon Analog -InputList2SigType38=Analog -InputList2Cue39=Set Item 28 Icon Analog -InputList2SigType39=Analog -InputList2Cue40=Set Item 29 Icon Analog -InputList2SigType40=Analog -InputList2Cue41=Set Item 30 Icon Analog -InputList2SigType41=Analog -InputList2Cue42=[~UNUSED2~] -InputList2SigType42=Digital|Analog|Serial|String -InputList2Cue2012=[~EndGroup~]Item Icons -InputList2SigType2012=Analog -OutputList2Cue1=Item Clicked -OutputList2SigType1=Analog -OutputList2Cue2=Item Held -OutputList2SigType2=Analog -OutputList2Cue3=[~UNUSED3~] -OutputList2SigType3=Analog -OutputList2Cue4=[~UNUSED3~] -OutputList2SigType4=Analog -OutputList2Cue5=[~UNUSED2~] -OutputList2SigType5=Analog -OutputList2Cue6=[~UNUSED2~] -OutputList2SigType6=Analog -OutputList2Cue7=[~UNUSED2~] -OutputList2SigType7=Analog -OutputList2Cue8=[~UNUSED2~] -OutputList2SigType8=Analog -OutputList2Cue9=[~UNUSED2~] -OutputList2SigType9=Analog -OutputList2Cue10=[~UNUSED2~] -OutputList2SigType10=Analog -OutputList2Cue11=[~BeginGroup~]Item Icons -OutputList2SigType11=Analog -OutputList2Cue12=[~UNUSED3~] -OutputList2SigType12=Analog -OutputList2Cue13=[~UNUSED3~] -OutputList2SigType13=Analog -OutputList2Cue14=[~UNUSED3~] -OutputList2SigType14=Analog -OutputList2Cue15=[~UNUSED3~] -OutputList2SigType15=Analog -OutputList2Cue16=[~UNUSED3~] -OutputList2SigType16=Analog -OutputList2Cue17=[~UNUSED3~] -OutputList2SigType17=Analog -OutputList2Cue18=[~UNUSED3~] -OutputList2SigType18=Analog -OutputList2Cue19=[~UNUSED3~] -OutputList2SigType19=Analog -OutputList2Cue20=[~UNUSED3~] -OutputList2SigType20=Analog -OutputList2Cue21=[~UNUSED3~] -OutputList2SigType21=Analog -OutputList2Cue22=[~UNUSED3~] -OutputList2SigType22=Analog -OutputList2Cue23=[~UNUSED3~] -OutputList2SigType23=Analog -OutputList2Cue24=[~UNUSED3~] -OutputList2SigType24=Analog -OutputList2Cue25=[~UNUSED3~] -OutputList2SigType25=Analog -OutputList2Cue26=[~UNUSED3~] -OutputList2SigType26=Analog -OutputList2Cue27=[~UNUSED3~] -OutputList2SigType27=Analog -OutputList2Cue28=[~UNUSED3~] -OutputList2SigType28=Analog -OutputList2Cue29=[~UNUSED3~] -OutputList2SigType29=Analog -OutputList2Cue30=[~UNUSED3~] -OutputList2SigType30=Analog -OutputList2Cue31=[~UNUSED3~] -OutputList2SigType31=Analog -OutputList2Cue32=[~UNUSED3~] -OutputList2SigType32=Analog -OutputList2Cue33=[~UNUSED3~] -OutputList2SigType33=Analog -OutputList2Cue34=[~UNUSED3~] -OutputList2SigType34=Analog -OutputList2Cue35=[~UNUSED3~] -OutputList2SigType35=Analog -OutputList2Cue36=[~UNUSED3~] -OutputList2SigType36=Analog -OutputList2Cue37=[~UNUSED3~] -OutputList2SigType37=Analog -OutputList2Cue38=[~UNUSED3~] -OutputList2SigType38=Analog -OutputList2Cue39=[~UNUSED3~] -OutputList2SigType39=Analog -OutputList2Cue40=[~UNUSED3~] -OutputList2SigType40=Analog -OutputList2Cue41=[~UNUSED3~] -OutputList2SigType41=Analog -OutputList2Cue42=[~UNUSED2~] -OutputList2SigType42=Digital|Analog|Serial|String -OutputList2Cue2012=[~EndGroup~]Item Icons -OutputList2SigType2012=Analog -InputList3Cue1=[~UNUSED2~] -InputList3SigType1=Serial -InputList3Cue2=[~UNUSED2~] -InputList3SigType2=Serial -InputList3Cue3=[~UNUSED2~] -InputList3SigType3=Serial -InputList3Cue4=[~UNUSED2~] -InputList3SigType4=Serial -InputList3Cue5=[~UNUSED2~] -InputList3SigType5=Serial -InputList3Cue6=[~UNUSED2~] -InputList3SigType6=Serial -InputList3Cue7=[~UNUSED2~] -InputList3SigType7=Serial -InputList3Cue8=[~UNUSED2~] -InputList3SigType8=Serial -InputList3Cue9=[~UNUSED2~] -InputList3SigType9=Serial -InputList3Cue10=[~UNUSED2~] -InputList3SigType10=Serial -InputList3Cue11=[~BeginGroup~]Item Texts -InputList3SigType11=Serial -InputList3Cue12=Set Item 1 Text -InputList3SigType12=Serial -InputList3Cue13=Set Item 2 Text -InputList3SigType13=Serial -InputList3Cue14=Set Item 3 Text -InputList3SigType14=Serial -InputList3Cue15=Set Item 4 Text -InputList3SigType15=Serial -InputList3Cue16=Set Item 5 Text -InputList3SigType16=Serial -InputList3Cue17=Set Item 6 Text -InputList3SigType17=Serial -InputList3Cue18=Set Item 7 Text -InputList3SigType18=Serial -InputList3Cue19=Set Item 8 Text -InputList3SigType19=Serial -InputList3Cue20=Set Item 9 Text -InputList3SigType20=Serial -InputList3Cue21=Set Item 10 Text -InputList3SigType21=Serial -InputList3Cue22=Set Item 11 Text -InputList3SigType22=Serial -InputList3Cue23=Set Item 12 Text -InputList3SigType23=Serial -InputList3Cue24=Set Item 13 Text -InputList3SigType24=Serial -InputList3Cue25=Set Item 14 Text -InputList3SigType25=Serial -InputList3Cue26=Set Item 15 Text -InputList3SigType26=Serial -InputList3Cue27=Set Item 16 Text -InputList3SigType27=Serial -InputList3Cue28=Set Item 17 Text -InputList3SigType28=Serial -InputList3Cue29=Set Item 18 Text -InputList3SigType29=Serial -InputList3Cue30=Set Item 19 Text -InputList3SigType30=Serial -InputList3Cue31=Set Item 20 Text -InputList3SigType31=Serial -InputList3Cue32=Set Item 21 Text -InputList3SigType32=Serial -InputList3Cue33=Set Item 22 Text -InputList3SigType33=Serial -InputList3Cue34=Set Item 23 Text -InputList3SigType34=Serial -InputList3Cue35=Set Item 24 Text -InputList3SigType35=Serial -InputList3Cue36=Set Item 25 Text -InputList3SigType36=Serial -InputList3Cue37=Set Item 26 Text -InputList3SigType37=Serial -InputList3Cue38=Set Item 27 Text -InputList3SigType38=Serial -InputList3Cue39=Set Item 28 Text -InputList3SigType39=Serial -InputList3Cue40=Set Item 29 Text -InputList3SigType40=Serial -InputList3Cue41=Set Item 30 Text -InputList3SigType41=Serial -InputList3Cue42=[~UNUSED2~] -InputList3SigType42=Digital|Analog|Serial|String -InputList3Cue2012=[~EndGroup~]Item Texts -InputList3SigType2012=Serial -InputList3Cue2013=[~BeginGroup~]Item Icons -InputList3SigType2013=Serial -InputList3Cue2014=Set Item 1 Icon Serial -InputList3SigType2014=Serial -InputList3Cue2015=Set Item 2 Icon Serial -InputList3SigType2015=Serial -InputList3Cue2016=Set Item 3 Icon Serial -InputList3SigType2016=Serial -InputList3Cue2017=Set Item 4 Icon Serial -InputList3SigType2017=Serial -InputList3Cue2018=Set Item 5 Icon Serial -InputList3SigType2018=Serial -InputList3Cue2019=Set Item 6 Icon Serial -InputList3SigType2019=Serial -InputList3Cue2020=Set Item 7 Icon Serial -InputList3SigType2020=Serial -InputList3Cue2021=Set Item 8 Icon Serial -InputList3SigType2021=Serial -InputList3Cue2022=Set Item 9 Icon Serial -InputList3SigType2022=Serial -InputList3Cue2023=Set Item 10 Icon Serial -InputList3SigType2023=Serial -InputList3Cue2024=Set Item 11 Icon Serial -InputList3SigType2024=Serial -InputList3Cue2025=Set Item 12 Icon Serial -InputList3SigType2025=Serial -InputList3Cue2026=Set Item 13 Icon Serial -InputList3SigType2026=Serial -InputList3Cue2027=Set Item 14 Icon Serial -InputList3SigType2027=Serial -InputList3Cue2028=Set Item 15 Icon Serial -InputList3SigType2028=Serial -InputList3Cue2029=Set Item 16 Icon Serial -InputList3SigType2029=Serial -InputList3Cue2030=Set Item 17 Icon Serial -InputList3SigType2030=Serial -InputList3Cue2031=Set Item 18 Icon Serial -InputList3SigType2031=Serial -InputList3Cue2032=Set Item 19 Icon Serial -InputList3SigType2032=Serial -InputList3Cue2033=Set Item 20 Icon Serial -InputList3SigType2033=Serial -InputList3Cue2034=Set Item 21 Icon Serial -InputList3SigType2034=Serial -InputList3Cue2035=Set Item 22 Icon Serial -InputList3SigType2035=Serial -InputList3Cue2036=Set Item 23 Icon Serial -InputList3SigType2036=Serial -InputList3Cue2037=Set Item 24 Icon Serial -InputList3SigType2037=Serial -InputList3Cue2038=Set Item 25 Icon Serial -InputList3SigType2038=Serial -InputList3Cue2039=Set Item 26 Icon Serial -InputList3SigType2039=Serial -InputList3Cue2040=Set Item 27 Icon Serial -InputList3SigType2040=Serial -InputList3Cue2041=Set Item 28 Icon Serial -InputList3SigType2041=Serial -InputList3Cue2042=Set Item 29 Icon Serial -InputList3SigType2042=Serial -InputList3Cue2043=Set Item 30 Icon Serial -InputList3SigType2043=Serial -InputList3Cue2044=[~UNUSED2~] -InputList3SigType2044=Digital|Analog|Serial|String -InputList3Cue4014=[~EndGroup~]Item Icons -InputList3SigType4014=Serial -OutputList3Cue1=[~UNUSED2~] -OutputList3SigType1=Serial -OutputList3Cue2=[~UNUSED2~] -OutputList3SigType2=Serial -OutputList3Cue3=[~UNUSED2~] -OutputList3SigType3=Serial -OutputList3Cue4=[~UNUSED2~] -OutputList3SigType4=Serial -OutputList3Cue5=[~UNUSED2~] -OutputList3SigType5=Serial -OutputList3Cue6=[~UNUSED2~] -OutputList3SigType6=Serial -OutputList3Cue7=[~UNUSED2~] -OutputList3SigType7=Serial -OutputList3Cue8=[~UNUSED2~] -OutputList3SigType8=Serial -OutputList3Cue9=[~UNUSED2~] -OutputList3SigType9=Serial -OutputList3Cue10=[~UNUSED2~] -OutputList3SigType10=Serial -OutputList3Cue11=[~BeginGroup~]Item Texts -OutputList3SigType11=Serial -OutputList3Cue12=[~UNUSED3~] -OutputList3SigType12=Serial -OutputList3Cue13=[~UNUSED3~] -OutputList3SigType13=Serial -OutputList3Cue14=[~UNUSED3~] -OutputList3SigType14=Serial -OutputList3Cue15=[~UNUSED3~] -OutputList3SigType15=Serial -OutputList3Cue16=[~UNUSED3~] -OutputList3SigType16=Serial -OutputList3Cue17=[~UNUSED3~] -OutputList3SigType17=Serial -OutputList3Cue18=[~UNUSED3~] -OutputList3SigType18=Serial -OutputList3Cue19=[~UNUSED3~] -OutputList3SigType19=Serial -OutputList3Cue20=[~UNUSED3~] -OutputList3SigType20=Serial -OutputList3Cue21=[~UNUSED3~] -OutputList3SigType21=Serial -OutputList3Cue22=[~UNUSED3~] -OutputList3SigType22=Serial -OutputList3Cue23=[~UNUSED3~] -OutputList3SigType23=Serial -OutputList3Cue24=[~UNUSED3~] -OutputList3SigType24=Serial -OutputList3Cue25=[~UNUSED3~] -OutputList3SigType25=Serial -OutputList3Cue26=[~UNUSED3~] -OutputList3SigType26=Serial -OutputList3Cue27=[~UNUSED3~] -OutputList3SigType27=Serial -OutputList3Cue28=[~UNUSED3~] -OutputList3SigType28=Serial -OutputList3Cue29=[~UNUSED3~] -OutputList3SigType29=Serial -OutputList3Cue30=[~UNUSED3~] -OutputList3SigType30=Serial -OutputList3Cue31=[~UNUSED3~] -OutputList3SigType31=Serial -OutputList3Cue32=[~UNUSED3~] -OutputList3SigType32=Serial -OutputList3Cue33=[~UNUSED3~] -OutputList3SigType33=Serial -OutputList3Cue34=[~UNUSED3~] -OutputList3SigType34=Serial -OutputList3Cue35=[~UNUSED3~] -OutputList3SigType35=Serial -OutputList3Cue36=[~UNUSED3~] -OutputList3SigType36=Serial -OutputList3Cue37=[~UNUSED3~] -OutputList3SigType37=Serial -OutputList3Cue38=[~UNUSED3~] -OutputList3SigType38=Serial -OutputList3Cue39=[~UNUSED3~] -OutputList3SigType39=Serial -OutputList3Cue40=[~UNUSED3~] -OutputList3SigType40=Serial -OutputList3Cue41=[~UNUSED3~] -OutputList3SigType41=Serial -OutputList3Cue42=[~UNUSED2~] -OutputList3SigType42=Digital|Analog|Serial|String -OutputList3Cue2012=[~EndGroup~]Item Texts -OutputList3SigType2012=Serial -OutputList3Cue2013=[~BeginGroup~]Item Icons -OutputList3SigType2013=Serial -OutputList3Cue2014=[~UNUSED3~] -OutputList3SigType2014=Serial -OutputList3Cue2015=[~UNUSED3~] -OutputList3SigType2015=Serial -OutputList3Cue2016=[~UNUSED3~] -OutputList3SigType2016=Serial -OutputList3Cue2017=[~UNUSED3~] -OutputList3SigType2017=Serial -OutputList3Cue2018=[~UNUSED3~] -OutputList3SigType2018=Serial -OutputList3Cue2019=[~UNUSED3~] -OutputList3SigType2019=Serial -OutputList3Cue2020=[~UNUSED3~] -OutputList3SigType2020=Serial -OutputList3Cue2021=[~UNUSED3~] -OutputList3SigType2021=Serial -OutputList3Cue2022=[~UNUSED3~] -OutputList3SigType2022=Serial -OutputList3Cue2023=[~UNUSED3~] -OutputList3SigType2023=Serial -OutputList3Cue2024=[~UNUSED3~] -OutputList3SigType2024=Serial -OutputList3Cue2025=[~UNUSED3~] -OutputList3SigType2025=Serial -OutputList3Cue2026=[~UNUSED3~] -OutputList3SigType2026=Serial -OutputList3Cue2027=[~UNUSED3~] -OutputList3SigType2027=Serial -OutputList3Cue2028=[~UNUSED3~] -OutputList3SigType2028=Serial -OutputList3Cue2029=[~UNUSED3~] -OutputList3SigType2029=Serial -OutputList3Cue2030=[~UNUSED3~] -OutputList3SigType2030=Serial -OutputList3Cue2031=[~UNUSED3~] -OutputList3SigType2031=Serial -OutputList3Cue2032=[~UNUSED3~] -OutputList3SigType2032=Serial -OutputList3Cue2033=[~UNUSED3~] -OutputList3SigType2033=Serial -OutputList3Cue2034=[~UNUSED3~] -OutputList3SigType2034=Serial -OutputList3Cue2035=[~UNUSED3~] -OutputList3SigType2035=Serial -OutputList3Cue2036=[~UNUSED3~] -OutputList3SigType2036=Serial -OutputList3Cue2037=[~UNUSED3~] -OutputList3SigType2037=Serial -OutputList3Cue2038=[~UNUSED3~] -OutputList3SigType2038=Serial -OutputList3Cue2039=[~UNUSED3~] -OutputList3SigType2039=Serial -OutputList3Cue2040=[~UNUSED3~] -OutputList3SigType2040=Serial -OutputList3Cue2041=[~UNUSED3~] -OutputList3SigType2041=Serial -OutputList3Cue2042=[~UNUSED3~] -OutputList3SigType2042=Serial -OutputList3Cue2043=[~UNUSED3~] -OutputList3SigType2043=Serial -OutputList3Cue2044=[~UNUSED2~] -OutputList3SigType2044=Digital|Analog|Serial|String -OutputList3Cue4014=[~EndGroup~]Item Icons -OutputList3SigType4014=Serial -ParamCue1=SmartObjectId -ParamSigType1=Constant -MPp=1 -Pp1=19 -CedH=19 -SmartObjId=1203d -] -; Parameter Properties for Smart Object ID -[ -ObjTp=Dp -H=19 -Tp=1 -HD=TRUE -DV=1203d -NF=1 -DNF=1 -EncFmt=0 -DVLF=1 -Sgn=0 -] -; Smart Objects Definition section -[ -ObjTp=CED -H=19 -Name=PepperDash Essentials iPad_[D.VC] Recents_Dynamic Button List Vertical_2.ced -;Cedver is the version of the Smart Graphics control, not the CED file format. -;If the control definition changes, increment this. -CedVer=1 -] diff --git a/PepperDashEssentials/UI - FILES ORPHANED-DELETE/CrestronTouchpanelPropertiesConfig.cs b/PepperDashEssentials/UI - FILES ORPHANED-DELETE/CrestronTouchpanelPropertiesConfig.cs deleted file mode 100644 index f327e0d5..00000000 --- a/PepperDashEssentials/UI - FILES ORPHANED-DELETE/CrestronTouchpanelPropertiesConfig.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace PepperDash.Essentials -{ - public class CrestronTouchpanelPropertiesConfig - { - public string IpId { get; set; } - public string DefaultRoomKey { get; set; } - public string RoomListKey { get; set; } - public string SgdFile { get; set; } - public string ProjectName { get; set; } - public bool ShowVolumeGauge { get; set; } - public bool UsesSplashPage { get; set; } - public bool ShowDate { get; set; } - public bool ShowTime { get; set; } - public UiSetupPropertiesConfig Setup { get; set; } - - /// - /// The count of sources that will trigger the "additional" arrows to show on the SRL. - /// Defaults to 5 - /// - public int SourcesOverflowCount { get; set; } - - public CrestronTouchpanelPropertiesConfig() - { - SourcesOverflowCount = 5; - } - } - - public class UiSetupPropertiesConfig - { - public bool IsVisible { get; set; } - } - -} \ No newline at end of file diff --git a/PepperDashEssentials/UI - FILES ORPHANED-DELETE/EssentialsTouchpanelController.cs b/PepperDashEssentials/UI - FILES ORPHANED-DELETE/EssentialsTouchpanelController.cs deleted file mode 100644 index 8ad6ab1a..00000000 --- a/PepperDashEssentials/UI - FILES ORPHANED-DELETE/EssentialsTouchpanelController.cs +++ /dev/null @@ -1,221 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharp.CrestronIO; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.UI; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.PageManagers; - -namespace PepperDash.Essentials -{ - public class EssentialsTouchpanelController : Device - { - public BasicTriListWithSmartObject Panel { get; private set; } - - public PanelDriverBase PanelDriver { get; private set; } - - CTimer BacklightTransitionedOnTimer; - - public EssentialsTouchpanelController(string key, string name, Tswx52ButtonVoiceControl tsw, - string projectName, string sgdPath) - : base(key, name) - { - Panel = tsw; - tsw.LoadSmartObjects(sgdPath); - tsw.SigChange += new Crestron.SimplSharpPro.DeviceSupport.SigEventHandler(Tsw_SigChange); - } - - /// - /// Config constructor - /// - public EssentialsTouchpanelController(string key, string name, string type, CrestronTouchpanelPropertiesConfig props, uint id) - : base(key, name) - { - AddPostActivationAction(() => - { - Debug.Console(0, this, "post-activation linking"); - type = type.ToLower(); - try - { - if (type == "crestronapp") - { - var app = new CrestronApp(id, Global.ControlSystem); - app.ParameterProjectName.Value = props.ProjectName; - Panel = app; - } - else if (type == "tsw560") - Panel = new Tsw560(id, Global.ControlSystem); - else if (type == "tsw752") - Panel = new Tsw752(id, Global.ControlSystem); - else if (type == "tsw1052") - Panel = new Tsw1052(id, Global.ControlSystem); - else - { - Debug.Console(0, this, "WARNING: Cannot create TSW controller with type '{0}'", type); - return; - } - } - catch (Exception e) - { - Debug.Console(0, this, "WARNING: Cannot create TSW base class. Panel will not function: {0}", e.Message); - return; - } - - // Reserved sigs - if (Panel is TswFt5ButtonSystem) - { - var tsw = Panel as TswFt5ButtonSystem; - tsw.ExtenderSystemReservedSigs.Use(); - tsw.ExtenderSystemReservedSigs.DeviceExtenderSigChange - += ExtenderSystemReservedSigs_DeviceExtenderSigChange; - } - - new CTimer(o => - { - var regSuccess = Panel.Register(); - if (regSuccess != eDeviceRegistrationUnRegistrationResponse.Success) - Debug.Console(0, this, "WARNING: Registration failed. Continuing, but panel may not function: {0}", regSuccess); - - // Give up cleanly if SGD is not present. - var sgdName = @"\NVRAM\Program" + InitialParametersClass.ApplicationNumber - + @"\sgd\" + props.SgdFile; - if (!File.Exists(sgdName)) - { - Debug.Console(0, this, "WARNING: Smart object file '{0}' not present. Exiting TSW load", sgdName); - return; - } - - Panel.LoadSmartObjects(sgdName); - Panel.SigChange += Tsw_SigChange; - - var mainDriver = new EssentialsPanelMainInterfaceDriver(Panel, props); - // Then the AV driver - - // spin up different room drivers depending on room type - var room = DeviceManager.GetDeviceForKey(props.DefaultRoomKey); - if (room is EssentialsHuddleSpaceRoom) - { - Debug.Console(0, this, "Adding huddle space driver"); - var avDriver = new EssentialsHuddlePanelAvFunctionsDriver(mainDriver, props); - avDriver.CurrentRoom = room as EssentialsHuddleSpaceRoom; - avDriver.DefaultRoomKey = props.DefaultRoomKey; - mainDriver.AvDriver = avDriver; - LoadAndShowDriver(mainDriver); // This is a little convoluted. - - if (Panel is TswFt5ButtonSystem) - { - var tsw = Panel as TswFt5ButtonSystem; - // Wire up hard keys - tsw.Power.UserObject = new Action(b => { if (!b) avDriver.PowerButtonPressed(); }); - //tsw.Home.UserObject = new Action(b => { if (!b) HomePressed(); }); - tsw.Up.UserObject = new Action(avDriver.VolumeUpPress); - tsw.Down.UserObject = new Action(avDriver.VolumeDownPress); - tsw.ButtonStateChange += new ButtonEventHandler(Tsw_ButtonStateChange); - } - } - else if (room is EssentialsPresentationRoom) - { - Debug.Console(0, this, "Adding presentation room driver"); - var avDriver = new EssentialsPresentationPanelAvFunctionsDriver(mainDriver, props); - avDriver.CurrentRoom = room as EssentialsPresentationRoom; - avDriver.DefaultRoomKey = props.DefaultRoomKey; - mainDriver.AvDriver = avDriver; - LoadAndShowDriver(mainDriver); - - if (Panel is TswFt5ButtonSystem) - { - var tsw = Panel as TswFt5ButtonSystem; - // Wire up hard keys - tsw.Power.UserObject = new Action(b => { if (!b) avDriver.PowerButtonPressed(); }); - //tsw.Home.UserObject = new Action(b => { if (!b) HomePressed(); }); - tsw.Up.UserObject = new Action(avDriver.VolumeUpPress); - tsw.Down.UserObject = new Action(avDriver.VolumeDownPress); - tsw.ButtonStateChange += new ButtonEventHandler(Tsw_ButtonStateChange); - } - } - else - { - Debug.Console(0, this, "ERROR: Cannot load AvFunctionsDriver for room '{0}'", props.DefaultRoomKey); - } - }, 0); - }); - } - - public void LoadAndShowDriver(PanelDriverBase driver) - { - PanelDriver = driver; - driver.Show(); - } - - void HomePressed() - { - if (BacklightTransitionedOnTimer == null) - PanelDriver.BackButtonPressed(); - } - - - void ExtenderSystemReservedSigs_DeviceExtenderSigChange(DeviceExtender currentDeviceExtender, SigEventArgs args) - { - // If the sig is transitioning on, mark it in case it was home button that transitioned it - var blOnSig = (Panel as TswFt5ButtonSystem).ExtenderSystemReservedSigs.BacklightOnFeedback; - if (args.Sig == blOnSig && blOnSig.BoolValue) - { - BacklightTransitionedOnTimer = new CTimer(o => - { - BacklightTransitionedOnTimer = null; - }, 200); - } - } - - public void PulseBool(uint join) - { - var act = Panel.BooleanInput[join].UserObject as Action; - if (act != null) - { - act(true); - act(false); - } - } - - public void SetBoolSig(uint join, bool value) - { - var act = Panel.BooleanInput[join].UserObject as Action; - if (act != null) - act(value); - } - - public void SetIntSig(uint join, ushort value) - { - var act = Panel.BooleanInput[join].UserObject as Action; - if (act != null) - { - act(value); - } - } - - void Tsw_SigChange(object currentDevice, Crestron.SimplSharpPro.SigEventArgs args) - { - if (Debug.Level == 2) - Debug.Console(2, this, "Sig change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue); - var uo = args.Sig.UserObject; - if (uo is Action) - (uo as Action)(args.Sig.BoolValue); - else if (uo is Action) - (uo as Action)(args.Sig.UShortValue); - else if (uo is Action) - (uo as Action)(args.Sig.StringValue); - } - - void Tsw_ButtonStateChange(GenericBase device, ButtonEventArgs args) - { - var uo = args.Button.UserObject; - if(uo is Action) - (uo as Action)(args.Button.State == eButtonState.Pressed); - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/UI - FILES ORPHANED-DELETE/SubpageReferenceListSourceItem.cs b/PepperDashEssentials/UI - FILES ORPHANED-DELETE/SubpageReferenceListSourceItem.cs deleted file mode 100644 index 73cc5e71..00000000 --- a/PepperDashEssentials/UI - FILES ORPHANED-DELETE/SubpageReferenceListSourceItem.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.UI; - -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials -{ - public class SubpageReferenceListSourceItem : SubpageReferenceListItem - { - public SourceListItem SourceItem { get; private set; } - - public SubpageReferenceListSourceItem(uint index, SubpageReferenceList owner, - SourceListItem sourceItem, Action routeAction) - : base(index, owner) - { - SourceItem = sourceItem; - owner.GetBoolFeedbackSig(index, 1).UserObject = new Action(routeAction); - owner.StringInputSig(index, 1).StringValue = SourceItem.PreferredName; - } - - public void RegisterForSourceChange(IHasCurrentSourceInfoChange room) - { - room.CurrentSingleSourceChange -= room_CurrentSourceInfoChange; - room.CurrentSingleSourceChange += room_CurrentSourceInfoChange; - } - - void room_CurrentSourceInfoChange(EssentialsRoomBase room, SourceListItem info, ChangeType type) - { - if (type == ChangeType.WillChange && info == SourceItem) - ClearFeedback(); - else if (type == ChangeType.DidChange && info == SourceItem) - SetFeedback(); - } - - /// - /// Called by SRL to release all referenced objects - /// - public override void Clear() - { - Owner.BoolInputSig(Index, 1).UserObject = null; - Owner.StringInputSig(Index, 1).StringValue = ""; - } - - /// - /// Sets the selected feedback on the button - /// - public void SetFeedback() - { - Owner.BoolInputSig(Index, 1).BoolValue = true; - } - - /// - /// Clears the selected feedback on the button - /// - public void ClearFeedback() - { - Owner.BoolInputSig(Index, 1).BoolValue = false; - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/UI/DualDisplaySourceSRLController.cs b/PepperDashEssentials/UI/DualDisplaySourceSRLController.cs deleted file mode 100644 index c91d72f1..00000000 --- a/PepperDashEssentials/UI/DualDisplaySourceSRLController.cs +++ /dev/null @@ -1,28 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text; -//using Crestron.SimplSharp; -//using Crestron.SimplSharpPro; -//using Crestron.SimplSharpPro.DeviceSupport; -//using Crestron.SimplSharpPro.UI; - -//using PepperDash.Essentials.Core; - -//namespace PepperDash.Essentials -//{ -// public class DualDisplaySourceSRLController : SubpageReferenceList -// { -// public DualDisplaySourceSRLController(BasicTriListWithSmartObject triList, -// uint smartObjectId, EssentialsPresentationRoom room) -// : base(triList, smartObjectId, 3, 3, 3) -// { -// var srcList = room.s items.Values.ToList().OrderBy(s => s.Order); -// foreach (var item in srcList) -// { -// GetBoolFeedbackSig(index, 1).UserObject = new Action(routeAction); - -// } -// } -// } -//} \ No newline at end of file diff --git a/PepperDashEssentials/UI/SubpageReferenceListActivityItem.cs b/PepperDashEssentials/UI/SubpageReferenceListActivityItem.cs deleted file mode 100644 index 4747a61a..00000000 --- a/PepperDashEssentials/UI/SubpageReferenceListActivityItem.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.UI; - -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials -{ - public class SubpageReferenceListActivityItem : SubpageReferenceListItem - { - /// - /// - /// - /// - /// - /// 0=Share, 1=Phone Call, 2=Video Call, 3=End Meeting - /// - public SubpageReferenceListActivityItem(uint index, SubpageReferenceList owner, - ushort buttonMode, Action pressAction) - : base(index, owner) - { - Owner.GetBoolFeedbackSig(Index, 1).UserObject = pressAction; - Owner.UShortInputSig(Index, 1).UShortValue = buttonMode; - } - - /// - /// Called by SRL to release all referenced objects - /// - public override void Clear() - { - Owner.BoolInputSig(Index, 1).UserObject = null; - Owner.UShortInputSig(Index, 1).UShortValue = 0; - } - } -} \ No newline at end of file diff --git a/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs.orig b/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs.orig deleted file mode 100644 index 7d0301e7..00000000 --- a/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs.orig +++ /dev/null @@ -1,250 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Core; -using PepperDash.Essentials; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.SmartObjects; -using PepperDash.Essentials.Devices.Common.VideoCodec; - -namespace PepperDash.Essentials.UIDrivers.VC -{ - - /// - /// This fella will likely need to interact with the room's source, although that is routed via the spark... - /// Probably needs event or FB to feed AV driver - to show two-mute volume when appropriate. - /// - /// - public class EssentialsVideoCodecUiDriver : PanelDriverBase - { - /// - /// - /// - VideoCodecBase Codec; - - /// - /// - /// - SmartObjectDynamicList DirectorySrl; // ***************** SRL ??? - - - /// - /// To drive UI elements outside of this driver that may be dependent on this. - /// - BoolFeedback InCall; - BoolFeedback LocalPrivacyIsMuted; - - /// - /// For the subpages above the bar - /// - JoinedSigInterlock VCControlsInterlock; - - /// - /// For the different staging bars: Active, inactive - /// - JoinedSigInterlock StagingBarInterlock; - - /// - /// For the staging button feedbacks - /// - JoinedSigInterlock StagingButtonFeedbackInterlock; - - SmartObjectNumeric DialKeypad; - - // These are likely temp until we get a keyboard built - StringFeedback DialStringFeedback; - StringBuilder DialStringBuilder = new StringBuilder(); - BoolFeedback DialStringBackspaceVisibleFeedback; - - /// - /// - /// - /// - /// - public EssentialsVideoCodecUiDriver(BasicTriListWithSmartObject triList, VideoCodecBase codec) - : base(triList) - { - Codec = codec; - SetupCallStagingPopover(); - SetupDialKeypad(); - - InCall = new BoolFeedback(() => false); - LocalPrivacyIsMuted = new BoolFeedback(() => false); - - //DirectorySrl = new SubpageReferenceList(triList, UISmartObjectJoin.VCDirectoryList, 3, 3, 3); - - VCControlsInterlock = new JoinedSigInterlock(triList); - VCControlsInterlock.SetButDontShow(UIBoolJoin.VCDirectoryVisible); - - StagingBarInterlock = new JoinedSigInterlock(triList); - StagingBarInterlock.SetButDontShow(UIBoolJoin.VCStagingInactivePopoverVisible); - - StagingButtonFeedbackInterlock = new JoinedSigInterlock(triList); - StagingButtonFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCRecentsVisible); - - DialStringFeedback = new StringFeedback(() => DialStringBuilder.ToString()); - DialStringFeedback.LinkInputSig(triList.StringInput[UIStringJoin.KeyboardText]); - - DialStringBackspaceVisibleFeedback = new BoolFeedback(() => DialStringBuilder.Length > 0); - DialStringBackspaceVisibleFeedback - .LinkInputSig(TriList.BooleanInput[UIBoolJoin.KeyboardClearVisible]); - - Codec.ActiveCallCountFeedback.OutputChange += new EventHandler(InCallFeedback_OutputChange); - } - - /// - /// - /// - public override void Show() - { - VCControlsInterlock.Show(); - StagingBarInterlock.Show(); - base.Show(); - } - - /// - /// - /// - public override void Hide() - { - VCControlsInterlock.Hide(); - StagingBarInterlock.Hide(); - base.Hide(); - } - - /// - /// Builds the call stage - /// - void SetupCallStagingPopover() - { - TriList.SetSigFalseAction(UIBoolJoin.VCStagingDirectoryPress, ShowDirectory); - TriList.SetSigFalseAction(UIBoolJoin.VCStagingConnectPress, ConnectPress); - TriList.SetSigFalseAction(UIBoolJoin.VCStagingKeypadPress, ShowKeypad); - TriList.SetSigFalseAction(UIBoolJoin.VCStagingRecentsPress, ShowRecents); - } - - /// - /// - /// - void SetupDialKeypad() - { - if(TriList.SmartObjects.Contains(UISmartObjectJoin.VCDialKeypad)) - { - DialKeypad = new SmartObjectNumeric(TriList.SmartObjects[UISmartObjectJoin.VCDialKeypad], true); - DialKeypad.Digit0.SetSigFalseAction(() => DialKeypadPress("0")); - DialKeypad.Digit1.SetSigFalseAction(() => DialKeypadPress("1")); - DialKeypad.Digit2.SetSigFalseAction(() => DialKeypadPress("2")); - DialKeypad.Digit3.SetSigFalseAction(() => DialKeypadPress("3")); - DialKeypad.Digit4.SetSigFalseAction(() => DialKeypadPress("4")); - DialKeypad.Digit5.SetSigFalseAction(() => DialKeypadPress("5")); - DialKeypad.Digit6.SetSigFalseAction(() => DialKeypadPress("6")); - DialKeypad.Digit7.SetSigFalseAction(() => DialKeypadPress("7")); - DialKeypad.Digit8.SetSigFalseAction(() => DialKeypadPress("8")); - DialKeypad.Digit9.SetSigFalseAction(() => DialKeypadPress("9")); - DialKeypad.Misc1SigName = "*"; - DialKeypad.Misc1.SetSigFalseAction(() => DialKeypadPress("*")); - DialKeypad.Misc2SigName = "#"; - DialKeypad.Misc2.SetSigFalseAction(() => DialKeypadPress("#")); - TriList.SetSigFalseAction(UIBoolJoin.KeyboardClearPress, DialKeypadBackspacePress); - } - else - Debug.Console(0, "Trilist {0:x2}, VC dial keypad object {1} not found. Check SGD file or VTP", - TriList.ID, UISmartObjectJoin.VCDialKeypad); - } - - /// - /// - /// - void ShowCameraControls() - { - VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCCameraVisible); - StagingButtonFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingCameraPress); - } - - void ShowKeypad() - { - VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCKeypadVisible); - StagingButtonFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingKeypadPress); - } - - void ShowDirectory() - { - // populate directory - VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCDirectoryVisible); - StagingButtonFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingDirectoryPress); - } - - void ShowRecents() - { - //populate recents - VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCDirectoryVisible); - StagingButtonFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingRecentsPress); - } - - /// - /// - /// - void ConnectPress() - { - if (Codec.IsInCall) -<<<<<<< HEAD - Codec.EndCall("end whatever is selected"); -======= - Codec.EndAllCalls(); ->>>>>>> origin/feature/cisco-spark-2 - else - Codec.Dial(DialStringBuilder.ToString()); - } - - /// - /// - /// - void InCallFeedback_OutputChange(object sender, EventArgs e) - { - var inCall = Codec.IsInCall; - Debug.Console(1, "*#* Codec Driver InCallFeedback change={0}", InCall); - TriList.UShortInput[UIUshortJoin.VCStagingConnectButtonMode].UShortValue = (ushort)(inCall ? 1 : 0); - StagingBarInterlock.ShowInterlocked( - inCall ? UIBoolJoin.VCStagingActivePopoverVisible : UIBoolJoin.VCStagingInactivePopoverVisible); - - if (Codec.IsInCall) // Call is starting - { - // Header icon - // Volume bar needs to have mic mute - } - else // ending - { - // Header icon - // Volume bar no mic mute (or hidden if no source?) - } - } - - /// - /// - /// - /// - void DialKeypadPress(string i) - { - DialStringBuilder.Append(i); - DialStringFeedback.FireUpdate(); - TriList.BooleanInput[UIBoolJoin.KeyboardClearVisible].BoolValue = - DialStringBuilder.Length > 0; - } - - /// - /// - /// - void DialKeypadBackspacePress() - { - DialStringBuilder.Remove(DialStringBuilder.Length - 1, 1); - DialStringFeedback.FireUpdate(); - TriList.BooleanInput[UIBoolJoin.KeyboardClearVisible].BoolValue = - DialStringBuilder.Length > 0; - TriList.SetBool(UIBoolJoin.VCStagingConnectEnable, DialStringBuilder.Length > 0); - } - } -} \ No newline at end of file diff --git a/devjson commands.json b/docs/devjson commands.json similarity index 100% rename from devjson commands.json rename to docs/devjson commands.json diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase.sln b/essentials-framework/Essentials Core/PepperDashEssentialsBase.sln deleted file mode 100644 index a51c8c5d..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDash_Essentials_Core", "PepperDashEssentialsBase\PepperDash_Essentials_Core.csproj", "{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {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}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/.IHasFeedbacks_BASE_3692.cs.swp b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/.IHasFeedbacks_BASE_3692.cs.swp deleted file mode 100644 index 827c466a..00000000 Binary files a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/.IHasFeedbacks_BASE_3692.cs.swp and /dev/null differ diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/.IHasFeedbacks_LOCAL_3692.cs.swp b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/.IHasFeedbacks_LOCAL_3692.cs.swp deleted file mode 100644 index e06196a4..00000000 Binary files a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/.IHasFeedbacks_LOCAL_3692.cs.swp and /dev/null differ diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/.IHasFeedbacks_REMOTE_3692.cs.swp b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/.IHasFeedbacks_REMOTE_3692.cs.swp deleted file mode 100644 index 842256cc..00000000 Binary files a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/.IHasFeedbacks_REMOTE_3692.cs.swp and /dev/null differ diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/CodecInterfaces.cs.orig b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/CodecInterfaces.cs.orig deleted file mode 100644 index 04d5aac9..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/CodecInterfaces.cs.orig +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -namespace PepperDash.Essentials.Core -{ - /// - /// Requirements for a device that has dialing capabilities - /// - public interface IHasDialer - { - // Add requirements for Dialer functionality - - void Dial(string number); -<<<<<<< HEAD - void EndCall(string number); -======= - void EndCall(object activeCall); - void EndAllCalls(); ->>>>>>> origin/feature/cisco-spark-2 - void AcceptCall(); - void RejectCall(); - void SendDtmf(string digit); - - IntFeedback ActiveCallCountFeedback { get; } - BoolFeedback IncomingCallFeedback { get; } - } - - /// - /// Defines minimum volume controls for a codec device with dialing capabilities - /// - public interface ICodecAudio : IBasicVolumeWithFeedback, IPrivacy - { - - } - - /// - /// Adds control of codec receive volume - /// - public interface IReceiveVolume - { - // Break this out into 3 interfaces - void SetReceiveVolume(ushort level); - void ReceiveMuteOn(); - void ReceiveMuteOff(); - void ReceiveMuteToggle(); - IntFeedback ReceiveLevelFeedback { get; } - BoolFeedback ReceiveMuteIsOnFeedback { get; } - } - - /// - /// Adds control of codec transmit volume - /// - public interface ITransmitVolume - { - void SetTransmitVolume(ushort level); - void TransmitMuteOn(); - void TransmitMuteOff(); - void TransmitMuteToggle(); - IntFeedback TransmitLevelFeedback { get; } - BoolFeedback TransmitMuteIsOnFeedback { get; } - } - - /// - /// Adds control of codec privacy function (microphone mute) - /// - public interface IPrivacy - { - void PrivacyModeOn(); - void PrivacyModeOff(); - void PrivacyModeToggle(); - BoolFeedback PrivacyModeIsOnFeedback { get; } - } - - public interface IHasCallHistory - { - // Add recent calls list - } - - public interface IHasDirectory - { - - } - - public interface IHasObtp - { - - // Upcoming Meeting warning event - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/DeviceManager.cs.orig b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/DeviceManager.cs.orig deleted file mode 100644 index e768807b..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/DeviceManager.cs.orig +++ /dev/null @@ -1,253 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.RegularExpressions; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.EthernetCommunication; -using Crestron.SimplSharpPro.UI; -using Crestron.SimplSharp.Reflection; - -using PepperDash.Core; - - -namespace PepperDash.Essentials.Core -{ - public static class DeviceManager - { - //public static List Devices { get { return _Devices; } } - //static List _Devices = new List(); - - static Dictionary Devices = new Dictionary(StringComparer.OrdinalIgnoreCase); - - /// - /// Returns a copy of all the devices in a list - /// - public static List AllDevices { get { return new List(Devices.Values); } } - - public static void Initialize(CrestronControlSystem cs) - { - CrestronConsole.AddNewConsoleCommand(ListDeviceCommStatuses, "devcommstatus", "Lists the communication status of all devices", - ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(ListDeviceFeedbacks, "devfb", "Lists current feedbacks", - ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(ListDevices, "devlist", "Lists current managed devices", - ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(DeviceJsonApi.DoDeviceActionWithJson, "devjson", "", - ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(s => - { - CrestronConsole.ConsoleCommandResponse(DeviceJsonApi.GetProperties(s)); - }, "devprops", "", ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(s => - { - CrestronConsole.ConsoleCommandResponse(DeviceJsonApi.GetMethods(s)); - }, "devmethods", "", ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(s => - { - CrestronConsole.ConsoleCommandResponse(DeviceJsonApi.GetApiMethods(s)); - }, "apimethods", "", ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(SimulateComReceiveOnDevice, "devsimreceive", - "Simulates incoming data on a com device", ConsoleAccessLevelEnum.AccessOperator); - } - - /// - /// Calls activate on all Device class items - /// - public static void ActivateAll() - { - foreach (var d in Devices.Values) -<<<<<<< HEAD - { - try - { - if (d is Device) - (d as Device).Activate(); - } - catch (Exception e) - { - Debug.Console(0, d, "ERROR: Device activation failure:\r{0}", e); - } - } -======= - { - try - { - if (d is Device) - (d as Device).Activate(); - } - catch (Exception e) - { - Debug.Console(0, d, "ERROR: Device activation failure:\r{0}", e); - } - } ->>>>>>> origin/feature/ecs-342-neil - } - - /// - /// Calls activate on all Device class items - /// - public static void DeactivateAll() - { - foreach (var d in Devices.Values) - { - if (d is Device) - (d as Device).Deactivate(); - } - } - - //static void ListMethods(string devKey) - //{ - // var dev = GetDeviceForKey(devKey); - // if(dev != null) - // { - // var type = dev.GetType().GetCType(); - // var methods = type.GetMethods(BindingFlags.Public|BindingFlags.Instance); - // var sb = new StringBuilder(); - // sb.AppendLine(string.Format("{2} methods on [{0}] ({1}):", dev.Key, type.Name, methods.Length)); - // foreach (var m in methods) - // { - // sb.Append(string.Format("{0}(", m.Name)); - // var pars = m.GetParameters(); - // foreach (var p in pars) - // sb.Append(string.Format("({1}){0} ", p.Name, p.ParameterType.Name)); - // sb.AppendLine(")"); - // } - // CrestronConsole.ConsoleCommandResponse(sb.ToString()); - // } - //} - - static void ListDevices(string s) - { - Debug.Console(0, "{0} Devices registered with Device Mangager:",Devices.Count); - var sorted = Devices.Values.ToList(); - sorted.Sort((a, b) => a.Key.CompareTo(b.Key)); - - foreach (var d in sorted) - { - var name = d is IKeyName ? (d as IKeyName).Name : "---"; - Debug.Console(0, " [{0}] {1}", d.Key, name); - } - } - - static void ListDeviceFeedbacks(string devKey) - { - var dev = GetDeviceForKey(devKey); - if(dev == null) - { - Debug.Console(0, "Device '{0}' not found", devKey); - return; - } - var statusDev = dev as IHasFeedback; - if(statusDev == null) - { - Debug.Console(0, "Device '{0}' does not have visible feedbacks", devKey); - return; - } - statusDev.DumpFeedbacksToConsole(true); - } - - //static void ListDeviceCommands(string devKey) - //{ - // var dev = GetDeviceForKey(devKey); - // if (dev == null) - // { - // Debug.Console(0, "Device '{0}' not found", devKey); - // return; - // } - // Debug.Console(0, "This needs to be reworked. Stay tuned.", devKey); - //} - - static void ListDeviceCommStatuses(string input) - { - var sb = new StringBuilder(); - foreach (var dev in Devices.Values) - { - if (dev is ICommunicationMonitor) - sb.Append(string.Format("{0}: {1}\r", dev.Key, (dev as ICommunicationMonitor).CommunicationMonitor.Status)); - } - CrestronConsole.ConsoleCommandResponse(sb.ToString()); - } - - - //static void DoDeviceCommand(string command) - //{ - // Debug.Console(0, "Not yet implemented. Stay tuned"); - //} - - public static void AddDevice(IKeyed newDev) - { - // Check for device with same key - //var existingDevice = _Devices.FirstOrDefault(d => d.Key.Equals(newDev.Key, StringComparison.OrdinalIgnoreCase)); - ////// If it exists, remove or warn?? - //if (existingDevice != null) - if(Devices.ContainsKey(newDev.Key)) - { - Debug.Console(0, newDev, "WARNING: A device with this key already exists. Not added to manager"); - return; - } - Devices.Add(newDev.Key, newDev); - //if (!(_Devices.Contains(newDev))) - // _Devices.Add(newDev); - } - - public static void RemoveDevice(IKeyed newDev) - { - if(newDev == null) - return; - if (Devices.ContainsKey(newDev.Key)) - Devices.Remove(newDev.Key); - //if (_Devices.Contains(newDev)) - // _Devices.Remove(newDev); - else - Debug.Console(0, "Device manager: Device '{0}' does not exist in manager. Cannot remove", newDev.Key); - } - - public static IEnumerable GetDeviceKeys() - { - //return _Devices.Select(d => d.Key).ToList(); - return Devices.Keys; - } - - public static IEnumerable GetDevices() - { - //return _Devices.Select(d => d.Key).ToList(); - return Devices.Values; - } - - public static IKeyed GetDeviceForKey(string key) - { - //return _Devices.FirstOrDefault(d => d.Key.Equals(key, StringComparison.OrdinalIgnoreCase)); - if (key != null && Devices.ContainsKey(key)) - return Devices[key]; - - return null; - } - - /// - /// Console handler that simulates com port data receive - /// - /// - public static void SimulateComReceiveOnDevice(string s) - { - // devcomsim:1 xyzabc - var match = Regex.Match(s, @"(\S*)\s*(.*)"); - if (match.Groups.Count < 3) - { - CrestronConsole.ConsoleCommandResponse(" Format: devsimreceive:P "); - return; - } - //Debug.Console(2, "**** {0} - {1} ****", match.Groups[1].Value, match.Groups[2].Value); - - ComPortController com = GetDeviceForKey(match.Groups[1].Value) as ComPortController; - if (com == null) - { - CrestronConsole.ConsoleCommandResponse("'{0}' is not a comm port device", match.Groups[1].Value); - return; - } - com.SimulateReceive(match.Groups[2].Value); - } - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks_BACKUP_3692.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks_BACKUP_3692.cs deleted file mode 100644 index 8af64e92..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks_BACKUP_3692.cs +++ /dev/null @@ -1,135 +0,0 @@ -<<<<<<< HEAD -using System.Collections.Generic; -using System.Linq; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharp.Reflection; - -using PepperDash.Core; - -namespace PepperDash.Essentials.Core -{ - public interface IHasFeedback : IKeyed - { - /// - /// This method shall return a list of all Output objects on a device, - /// including all "aggregate" devices. - /// - List Feedbacks { get; } - - } - - - public static class IHasFeedbackExtensions - { - public static void DumpFeedbacksToConsole(this IHasFeedback source, bool getCurrentStates) - { - CType t = source.GetType(); - // get the properties and set them into a new collection of NameType wrappers - var props = t.GetProperties().Select(p => new PropertyNameType(p, t)); - - - - var feedbacks = source.Feedbacks.OrderBy(x => x.Type); - if (feedbacks != null) - { - Debug.Console(0, source, "\n\nAvailable feedbacks:"); - foreach (var f in feedbacks) - { - string val = ""; - string type = ""; - if (getCurrentStates) - { - if (f is BoolFeedback) - { - val = f.BoolValue.ToString(); - type = "boolean"; - } - else if (f is IntFeedback) - { - val = f.IntValue.ToString(); - type = "integer"; - } - else if (f is StringFeedback) - { - val = f.StringValue; - type = "string"; - } - } - Debug.Console(0, "{0,-12} {1, -25} {2}", type, - (string.IsNullOrEmpty(f.Cue.Name) ? "-no name-" : f.Cue.Name), val); - } - } - else - Debug.Console(0, source, "No available outputs:"); - } - } -======= -using System.Collections.Generic; -using System.Linq; -using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Core; - -namespace PepperDash.Essentials.Core -{ - public interface IHasFeedback : IKeyed - { - /// - /// This method shall return a list of all Output objects on a device, - /// including all "aggregate" devices. - /// - List Feedbacks { get; } - - } - - - public static class IHasFeedbackExtensions - { - public static void DumpFeedbacksToConsole(this IHasFeedback source, bool getCurrentStates) - { - var feedbacks = source.Feedbacks.OrderBy(x => x.Type); - if (feedbacks != null) - { - Debug.Console(0, source, "\n\nAvailable feedbacks:"); - foreach (var f in feedbacks) - { - string val = ""; - if (getCurrentStates) - { - if (f is BoolFeedback) - val = " = " + f.BoolValue; - else if(f is IntFeedback) - val = " = " + f.IntValue; - else if(f is StringFeedback) - val = " = " + f.StringValue; - - //switch (f.Type) - //{ - // case eCueType.Bool: - // val = " = " + f.BoolValue; - // break; - // case eCueType.Int: - // val = " = " + f.IntValue; - // break; - // case eCueType.String: - // val = " = " + f.StringValue; - // break; - // //case eOutputType.Other: - // // break; - //} - } - Debug.Console(0, "{0,-8} {1}{2}", f.GetType(), - (string.IsNullOrEmpty(f.Cue.Name) ? "-none-" : f.Cue.Name), val); - } - } - else - Debug.Console(0, source, "No available outputs:"); - } - } - - public static class IHasFeedbackFusionExtensions - { - - } ->>>>>>> origin/feature/ecs-307 -} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks_BASE_3692.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks_BASE_3692.cs deleted file mode 100644 index 446577f6..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks_BASE_3692.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Core; - -namespace PepperDash.Essentials.Core -{ - public interface IHasFeedback : IKeyed - { - /// - /// This method shall return a list of all Output objects on a device, - /// including all "aggregate" devices. - /// - List Feedbacks { get; } - - } - - - public static class IHasFeedbackExtensions - { - public static void DumpFeedbacksToConsole(this IHasFeedback source, bool getCurrentStates) - { - var feedbacks = source.Feedbacks.OrderBy(x => x.Type); - if (feedbacks != null) - { - Debug.Console(0, source, "\n\nAvailable feedbacks:"); - foreach (var f in feedbacks) - { - string val = ""; - if (getCurrentStates) - { - if (f is BoolFeedback) - val = " = " + f.BoolValue; - else if(f is IntFeedback) - val = " = " + f.IntValue; - else if(f is StringFeedback) - val = " = " + f.StringValue; - - //switch (f.Type) - //{ - // case eCueType.Bool: - // val = " = " + f.BoolValue; - // break; - // case eCueType.Int: - // val = " = " + f.IntValue; - // break; - // case eCueType.String: - // val = " = " + f.StringValue; - // break; - // //case eOutputType.Other: - // // break; - //} - } - Debug.Console(0, "{0,-8} {1}{2}", f.GetType(), - (string.IsNullOrEmpty(f.Cue.Name) ? "-none-" : f.Cue.Name), val); - } - } - else - Debug.Console(0, source, "No available outputs:"); - } - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks_LOCAL_3692.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks_LOCAL_3692.cs deleted file mode 100644 index 5d33afa9..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks_LOCAL_3692.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharp.Reflection; - -using PepperDash.Core; - -namespace PepperDash.Essentials.Core -{ - public interface IHasFeedback : IKeyed - { - /// - /// This method shall return a list of all Output objects on a device, - /// including all "aggregate" devices. - /// - List Feedbacks { get; } - - } - - - public static class IHasFeedbackExtensions - { - public static void DumpFeedbacksToConsole(this IHasFeedback source, bool getCurrentStates) - { - CType t = source.GetType(); - // get the properties and set them into a new collection of NameType wrappers - var props = t.GetProperties().Select(p => new PropertyNameType(p, t)); - - - - var feedbacks = source.Feedbacks.OrderBy(x => x.Type); - if (feedbacks != null) - { - Debug.Console(0, source, "\n\nAvailable feedbacks:"); - foreach (var f in feedbacks) - { - string val = ""; - string type = ""; - if (getCurrentStates) - { - if (f is BoolFeedback) - { - val = f.BoolValue.ToString(); - type = "boolean"; - } - else if (f is IntFeedback) - { - val = f.IntValue.ToString(); - type = "integer"; - } - else if (f is StringFeedback) - { - val = f.StringValue; - type = "string"; - } - } - Debug.Console(0, "{0,-12} {1, -25} {2}", type, - (string.IsNullOrEmpty(f.Cue.Name) ? "-no name-" : f.Cue.Name), val); - } - } - else - Debug.Console(0, source, "No available outputs:"); - } - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks_REMOTE_3692.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks_REMOTE_3692.cs deleted file mode 100644 index 1ac02c71..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks_REMOTE_3692.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Core; - -namespace PepperDash.Essentials.Core -{ - public interface IHasFeedback : IKeyed - { - /// - /// This method shall return a list of all Output objects on a device, - /// including all "aggregate" devices. - /// - List Feedbacks { get; } - - } - - - public static class IHasFeedbackExtensions - { - public static void DumpFeedbacksToConsole(this IHasFeedback source, bool getCurrentStates) - { - var feedbacks = source.Feedbacks.OrderBy(x => x.Type); - if (feedbacks != null) - { - Debug.Console(0, source, "\n\nAvailable feedbacks:"); - foreach (var f in feedbacks) - { - string val = ""; - if (getCurrentStates) - { - if (f is BoolFeedback) - val = " = " + f.BoolValue; - else if(f is IntFeedback) - val = " = " + f.IntValue; - else if(f is StringFeedback) - val = " = " + f.StringValue; - - //switch (f.Type) - //{ - // case eCueType.Bool: - // val = " = " + f.BoolValue; - // break; - // case eCueType.Int: - // val = " = " + f.IntValue; - // break; - // case eCueType.String: - // val = " = " + f.StringValue; - // break; - // //case eOutputType.Other: - // // break; - //} - } - Debug.Console(0, "{0,-8} {1}{2}", f.GetType(), - (string.IsNullOrEmpty(f.Cue.Name) ? "-none-" : f.Cue.Name), val); - } - } - else - Debug.Console(0, source, "No available outputs:"); - } - } - - public static class IHasFeedbackFusionExtensions - { - - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IUsageTracking.cs.orig b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IUsageTracking.cs.orig deleted file mode 100644 index 59019df5..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IUsageTracking.cs.orig +++ /dev/null @@ -1,104 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Core; - -namespace PepperDash.Essentials.Core -{ - public interface IUsageTracking - { - UsageTracking UsageTracker { get; set; } - } - - //public static class IUsageTrackingExtensions - //{ - // public static void EnableUsageTracker(this IUsageTracking device) - // { - // device.UsageTracker = new UsageTracking(); - // } - //} - - public class UsageTracking - { - public event EventHandler DeviceUsageEnded; - - public InUseTracking InUseTracker { get; protected set; } - - public bool UsageIsTracked { get; set; } - public DateTime UsageStartTime { get; protected set; } - public DateTime UsageEndTime { get; protected set; } - - public Device Parent { get; private set; } - - public UsageTracking(Device parent) - { - Parent = parent; - - InUseTracker = new InUseTracking(); - - InUseTracker.InUseFeedback.OutputChange +=new EventHandler(InUseFeedback_OutputChange); - } - - void InUseFeedback_OutputChange(object sender, EventArgs e) - { - if(InUseTracker.InUseFeedback.BoolValue) - { - StartDeviceUsage(); - } - else - { - EndDeviceUsage(); - } - } - - - /// - /// Stores the usage start time - /// - public void StartDeviceUsage() - { - UsageStartTime = DateTime.Now; - } - - /// - /// Calculates the difference between the usage start and end times, gets the total minutes used and fires an event to pass that info to a consumer - /// - public void EndDeviceUsage() - { - try - { - UsageEndTime = DateTime.Now; - - if (UsageStartTime != null) - { - var timeUsed = UsageEndTime - UsageStartTime; - - var handler = DeviceUsageEnded; - - if (handler != null) - { - Debug.Console(1, "Device Usage Ended for: {0} at {1}. In use for {2} minutes.", Parent.Name, UsageEndTime, timeUsed.Minutes); - handler(this, new DeviceUsageEventArgs() { UsageEndTime = UsageEndTime, MinutesUsed = timeUsed.Minutes }); - } - } - } - catch (Exception e) - { -<<<<<<< HEAD - Debug.Console(1, "Device Usage Ended at {0}. In use for {1} minutes.", UsageEndTime, timeUsed.Minutes); - handler(this, new DeviceUsageEventArgs() { UsageEndTime = UsageEndTime, MinutesUsed = timeUsed.Minutes }); -======= - Debug.Console(1, "Error ending device usage: {0}", e); ->>>>>>> origin/feature/fusion-nyu - } - } - } - - public class DeviceUsageEventArgs : EventArgs - { - public DateTime UsageEndTime { get; set; } - public int MinutesUsed { get; set; } - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/REMOVE IHasFeedbacks.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/REMOVE IHasFeedbacks.cs deleted file mode 100644 index 511a952b..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/REMOVE IHasFeedbacks.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Core; - -namespace PepperDash.Essentials.Core -{ - //public interface IHasFeedback : IKeyed - //{ - // /// - // /// This method shall return a list of all Output objects on a device, - // /// including all "aggregate" devices. - // /// - // List Feedbacks { get; } - - //} - - - //public static class IHasFeedbackExtensions - //{ - // public static void DumpFeedbacksToConsole(this IHasFeedback source, bool getCurrentStates) - // { - // var outputs = source.Feedbacks.OrderBy(x => x.Type); - // if (outputs != null) - // { - // Debug.Console(0, source, "\n\nAvailable outputs:"); - // foreach (var o in outputs) - // { - // string val = ""; - // if (getCurrentStates) - // { - // switch (o.Type) - // { - // case eCueType.Bool: - // val = " = " + o.BoolValue; - // break; - // case eCueType.Int: - // val = " = " + o.IntValue; - // break; - // case eCueType.String: - // val = " = " + o.StringValue; - // break; - // //case eOutputType.Other: - // // break; - // } - // } - // Debug.Console(0, "{0,-8} {1,5} {2}{3}", o.Type, o.Cue.Number, - // (string.IsNullOrEmpty(o.Cue.Name) ? "-none-" : o.Cue.Name), val); - // } - // } - // else - // Debug.Console(0, source, "No available outputs:"); - // } - //} -} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.nuspec b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.nuspec deleted file mode 100644 index c2394428..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.nuspec +++ /dev/null @@ -1,24 +0,0 @@ - - - - PepperDashEssentials - 1.5.6 - PepperDash Essentials - PepperDash Technologies - pepperdash - false - MIT - https://github.com/PepperDash/PepperDashCore - Copyright 2020 - PepperDash Essentials is an open source Crestron framework that can be configured as a standalone program capable of running a wide variety of system designs and can also be utilized as a plug-in architecture to augment other Simpl# Pro and Simpl Windows programs. Essentials Framework is a collection of C# / Simpl# Pro libraries that can be utilized in several different manners. It is currently operating as a 100% configuration-driven system, and can be extended to add different workflows and behaviors, either through the addition of further device "types" or via the plug-in mechanism. The framework is a collection of "things" that are all related and interconnected, but in general do not have dependencies on each other. - crestron 3series 4series - - - - - - - - - - \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Properties/AssemblyInfo.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Properties/AssemblyInfo.cs deleted file mode 100644 index c202443c..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using Crestron.SimplSharp.Reflection; - -[assembly: System.Reflection.AssemblyTitle("PepperDashEssentialsBase")] -[assembly: System.Reflection.AssemblyCompany("PepperDash Technology Corp")] -[assembly: System.Reflection.AssemblyProduct("PepperDashEssentials")] -[assembly: System.Reflection.AssemblyCopyright("Copyright © PepperDash Technology Corp 2020")] -[assembly: System.Reflection.AssemblyVersion("0.0.0.*")] -[assembly: System.Reflection.AssemblyInformationalVersion("0.0.0-buildType-buildNumber")] -[assembly: Crestron.SimplSharp.Reflection.AssemblyInformationalVersion("0.0.0-buildType-buildNumber")] -[assembly: InternalsVisibleTo("Essentials Devices Common")] -[assembly: InternalsVisibleTo("PepperDash_Essentials_DM")] diff --git a/essentials-framework/Essentials DM/Essentials_DM.sln b/essentials-framework/Essentials DM/Essentials_DM.sln deleted file mode 100644 index fa874f80..00000000 --- a/essentials-framework/Essentials DM/Essentials_DM.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Essentials_DM", "Essentials_DM\Essentials_DM.csproj", "{9199CE8A-0C9F-4952-8672-3EED798B284F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {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}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9199CE8A-0C9F-4952-8672-3EED798B284F}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/._DmChassisController.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/._DmChassisController.cs deleted file mode 100644 index a5ed710c..00000000 Binary files a/essentials-framework/Essentials DM/Essentials_DM/Chassis/._DmChassisController.cs and /dev/null differ diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmCardAudioOutput.cs.orig b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmCardAudioOutput.cs.orig deleted file mode 100644 index acaf7916..00000000 --- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmCardAudioOutput.cs.orig +++ /dev/null @@ -1,120 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DM; - -using PepperDash.Core; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.DM -{ - public class DmCardAudioOutputController : IBasicVolumeWithFeedback - { - public Audio.Output Output { get; private set; } - - public IntFeedback VolumeLevelFeedback { get; private set; } - - public BoolFeedback MuteFeedback { get; private set; } - - ushort PreMuteVolumeLevel; - bool IsMuted; - - public DmCardAudioOutputController(Audio.Output output) - { - Output = output; - VolumeLevelFeedback = new IntFeedback(() => Output.VolumeFeedback.UShortValue); - MuteFeedback = new BoolFeedback(() => IsMuted); - } - - #region IBasicVolumeWithFeedback Members - - /// - /// - /// - public void MuteOff() - { - SetVolume(PreMuteVolumeLevel); - IsMuted = false; - MuteFeedback.FireUpdate(); - } - - /// - /// - /// - public void MuteOn() - { - PreMuteVolumeLevel = Output.VolumeFeedback.UShortValue; - SetVolume(0); - IsMuted = true; - MuteFeedback.FireUpdate(); - } - - /// - /// - /// - public void SetVolume(ushort level) - { - Debug.Console(2, "Set volume out {0}", level); - Output.Volume.UShortValue = level; - } - - /// - /// - /// - internal void VolumeEventFromChassis() - { - VolumeLevelFeedback.FireUpdate(); - } - - #endregion - - #region IBasicVolumeControls Members - - /// - /// - /// - public void MuteToggle() - { - if (IsMuted) - MuteOff(); - else - MuteOn(); - } - - /// - /// - /// - public void VolumeDown(bool pressRelease) - { - if (pressRelease) -<<<<<<< HEAD - { - var remainingRatio = Output.Volume.UShortValue / 65535; - Output.Volume.CreateRamp(0, (uint)(400 * remainingRatio)); - } -======= - Output.Volume.CreateRamp(0, 400); ->>>>>>> origin/feature/fusion-nyu - else - Output.Volume.StopRamp(); - } - - /// - /// - /// - public void VolumeUp(bool pressRelease) - { - if (pressRelease) - { - var remainingRatio = (65535 - Output.Volume.UShortValue) / 65535; - Output.Volume.CreateRamp(65535, 400); - } - else - Output.Volume.StopRamp(); - } - - #endregion - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmCardAudioOutput_BACKUP_14408.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmCardAudioOutput_BACKUP_14408.cs deleted file mode 100644 index acaf7916..00000000 --- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmCardAudioOutput_BACKUP_14408.cs +++ /dev/null @@ -1,120 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DM; - -using PepperDash.Core; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.DM -{ - public class DmCardAudioOutputController : IBasicVolumeWithFeedback - { - public Audio.Output Output { get; private set; } - - public IntFeedback VolumeLevelFeedback { get; private set; } - - public BoolFeedback MuteFeedback { get; private set; } - - ushort PreMuteVolumeLevel; - bool IsMuted; - - public DmCardAudioOutputController(Audio.Output output) - { - Output = output; - VolumeLevelFeedback = new IntFeedback(() => Output.VolumeFeedback.UShortValue); - MuteFeedback = new BoolFeedback(() => IsMuted); - } - - #region IBasicVolumeWithFeedback Members - - /// - /// - /// - public void MuteOff() - { - SetVolume(PreMuteVolumeLevel); - IsMuted = false; - MuteFeedback.FireUpdate(); - } - - /// - /// - /// - public void MuteOn() - { - PreMuteVolumeLevel = Output.VolumeFeedback.UShortValue; - SetVolume(0); - IsMuted = true; - MuteFeedback.FireUpdate(); - } - - /// - /// - /// - public void SetVolume(ushort level) - { - Debug.Console(2, "Set volume out {0}", level); - Output.Volume.UShortValue = level; - } - - /// - /// - /// - internal void VolumeEventFromChassis() - { - VolumeLevelFeedback.FireUpdate(); - } - - #endregion - - #region IBasicVolumeControls Members - - /// - /// - /// - public void MuteToggle() - { - if (IsMuted) - MuteOff(); - else - MuteOn(); - } - - /// - /// - /// - public void VolumeDown(bool pressRelease) - { - if (pressRelease) -<<<<<<< HEAD - { - var remainingRatio = Output.Volume.UShortValue / 65535; - Output.Volume.CreateRamp(0, (uint)(400 * remainingRatio)); - } -======= - Output.Volume.CreateRamp(0, 400); ->>>>>>> origin/feature/fusion-nyu - else - Output.Volume.StopRamp(); - } - - /// - /// - /// - public void VolumeUp(bool pressRelease) - { - if (pressRelease) - { - var remainingRatio = (65535 - Output.Volume.UShortValue) / 65535; - Output.Volume.CreateRamp(65535, 400); - } - else - Output.Volume.StopRamp(); - } - - #endregion - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmCardAudioOutput_BASE_14408.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmCardAudioOutput_BASE_14408.cs deleted file mode 100644 index 3a069c39..00000000 --- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmCardAudioOutput_BASE_14408.cs +++ /dev/null @@ -1,111 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DM; - -using PepperDash.Core; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.DM -{ - public class DmCardAudioOutputController : IBasicVolumeWithFeedback - { - public Audio.Output Output { get; private set; } - - public IntFeedback VolumeLevelFeedback { get; private set; } - - public BoolFeedback MuteFeedback { get; private set; } - - ushort PreMuteVolumeLevel; - bool IsMuted; - - public DmCardAudioOutputController(Audio.Output output) - { - Output = output; - VolumeLevelFeedback = new IntFeedback(() => Output.VolumeFeedback.UShortValue); - MuteFeedback = new BoolFeedback(() => IsMuted); - } - - #region IBasicVolumeWithFeedback Members - - /// - /// - /// - public void MuteOff() - { - SetVolume(PreMuteVolumeLevel); - IsMuted = false; - MuteFeedback.FireUpdate(); - } - - /// - /// - /// - public void MuteOn() - { - PreMuteVolumeLevel = Output.VolumeFeedback.UShortValue; - SetVolume(0); - IsMuted = true; - MuteFeedback.FireUpdate(); - } - - /// - /// - /// - public void SetVolume(ushort level) - { - Debug.Console(2, "Set volume out {0}", level); - Output.Volume.UShortValue = level; - } - - /// - /// - /// - internal void VolumeEventFromChassis() - { - VolumeLevelFeedback.FireUpdate(); - } - - #endregion - - #region IBasicVolumeControls Members - - /// - /// - /// - public void MuteToggle() - { - if (IsMuted) - MuteOff(); - else - MuteOn(); - } - - /// - /// - /// - public void VolumeDown(bool pressRelease) - { - if (pressRelease) - Output.Volume.CreateRamp(0, 400); -#warning SCALE THIS RAMP - else - Output.Volume.StopRamp(); - } - - /// - /// - /// - public void VolumeUp(bool pressRelease) - { - if (pressRelease) - Output.Volume.CreateRamp(65535, 400); - else - Output.Volume.StopRamp(); - } - - #endregion - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmCardAudioOutput_LOCAL_14408.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmCardAudioOutput_LOCAL_14408.cs deleted file mode 100644 index 4b4a927e..00000000 --- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmCardAudioOutput_LOCAL_14408.cs +++ /dev/null @@ -1,116 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DM; - -using PepperDash.Core; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.DM -{ - public class DmCardAudioOutputController : IBasicVolumeWithFeedback - { - public Audio.Output Output { get; private set; } - - public IntFeedback VolumeLevelFeedback { get; private set; } - - public BoolFeedback MuteFeedback { get; private set; } - - ushort PreMuteVolumeLevel; - bool IsMuted; - - public DmCardAudioOutputController(Audio.Output output) - { - Output = output; - VolumeLevelFeedback = new IntFeedback(() => Output.VolumeFeedback.UShortValue); - MuteFeedback = new BoolFeedback(() => IsMuted); - } - - #region IBasicVolumeWithFeedback Members - - /// - /// - /// - public void MuteOff() - { - SetVolume(PreMuteVolumeLevel); - IsMuted = false; - MuteFeedback.FireUpdate(); - } - - /// - /// - /// - public void MuteOn() - { - PreMuteVolumeLevel = Output.VolumeFeedback.UShortValue; - SetVolume(0); - IsMuted = true; - MuteFeedback.FireUpdate(); - } - - /// - /// - /// - public void SetVolume(ushort level) - { - Debug.Console(2, "Set volume out {0}", level); - Output.Volume.UShortValue = level; - } - - /// - /// - /// - internal void VolumeEventFromChassis() - { - VolumeLevelFeedback.FireUpdate(); - } - - #endregion - - #region IBasicVolumeControls Members - - /// - /// - /// - public void MuteToggle() - { - if (IsMuted) - MuteOff(); - else - MuteOn(); - } - - /// - /// - /// - public void VolumeDown(bool pressRelease) - { - if (pressRelease) - { - var remainingRatio = Output.Volume.UShortValue / 65535; - Output.Volume.CreateRamp(0, (uint)(400 * remainingRatio)); - } - else - Output.Volume.StopRamp(); - } - - /// - /// - /// - public void VolumeUp(bool pressRelease) - { - if (pressRelease) - { - var remainingRatio = (65535 - Output.Volume.UShortValue) / 65535; - Output.Volume.CreateRamp(65535, 400); - } - else - Output.Volume.StopRamp(); - } - - #endregion - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmCardAudioOutput_REMOTE_14408.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmCardAudioOutput_REMOTE_14408.cs deleted file mode 100644 index 6c5c0275..00000000 --- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmCardAudioOutput_REMOTE_14408.cs +++ /dev/null @@ -1,110 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DM; - -using PepperDash.Core; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.DM -{ - public class DmCardAudioOutputController : IBasicVolumeWithFeedback - { - public Audio.Output Output { get; private set; } - - public IntFeedback VolumeLevelFeedback { get; private set; } - - public BoolFeedback MuteFeedback { get; private set; } - - ushort PreMuteVolumeLevel; - bool IsMuted; - - public DmCardAudioOutputController(Audio.Output output) - { - Output = output; - VolumeLevelFeedback = new IntFeedback(() => Output.VolumeFeedback.UShortValue); - MuteFeedback = new BoolFeedback(() => IsMuted); - } - - #region IBasicVolumeWithFeedback Members - - /// - /// - /// - public void MuteOff() - { - SetVolume(PreMuteVolumeLevel); - IsMuted = false; - MuteFeedback.FireUpdate(); - } - - /// - /// - /// - public void MuteOn() - { - PreMuteVolumeLevel = Output.VolumeFeedback.UShortValue; - SetVolume(0); - IsMuted = true; - MuteFeedback.FireUpdate(); - } - - /// - /// - /// - public void SetVolume(ushort level) - { - Debug.Console(2, "Set volume out {0}", level); - Output.Volume.UShortValue = level; - } - - /// - /// - /// - internal void VolumeEventFromChassis() - { - VolumeLevelFeedback.FireUpdate(); - } - - #endregion - - #region IBasicVolumeControls Members - - /// - /// - /// - public void MuteToggle() - { - if (IsMuted) - MuteOff(); - else - MuteOn(); - } - - /// - /// - /// - public void VolumeDown(bool pressRelease) - { - if (pressRelease) - Output.Volume.CreateRamp(0, 400); - else - Output.Volume.StopRamp(); - } - - /// - /// - /// - public void VolumeUp(bool pressRelease) - { - if (pressRelease) - Output.Volume.CreateRamp(65535, 400); - else - Output.Volume.StopRamp(); - } - - #endregion - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Essentials_DM.csproj b/essentials-framework/Essentials DM/Essentials_DM/Essentials_DM.csproj deleted file mode 100644 index cc9d85c6..00000000 --- a/essentials-framework/Essentials DM/Essentials_DM/Essentials_DM.csproj +++ /dev/null @@ -1,159 +0,0 @@ - - - Release - AnyCPU - 9.0.30729 - 2.0 - {9199CE8A-0C9F-4952-8672-3EED798B284F} - Library - Properties - PepperDash.Essentials.DM - PepperDash_Essentials_DM - {0B4745B0-194B-4BB6-8E21-E9057CA92300};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - WindowsCE - E2BECB1F-8C8C-41ba-B736-9BE7D946A398 - 5.0 - SmartDeviceProject1 - v3.5 - Windows CE - - - - - .allowedReferenceRelatedFileExtensions - true - full - false - bin\ - DEBUG;TRACE; - prompt - 4 - 512 - true - true - off - - - .allowedReferenceRelatedFileExtensions - none - true - bin\ - prompt - 4 - 512 - true - true - off - - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll - - - - False - ..\..\pepperdashcore-builds\PepperDash_Core.dll - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll - False - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll - False - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe - False - - - False - ..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} - PepperDash_Essentials_Core - - - - - - - - - rem S# Pro preparation will execute after these operations - - \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/PepperDash_Essentials_DM.csproj b/essentials-framework/Essentials DM/Essentials_DM/PepperDash_Essentials_DM.csproj deleted file mode 100644 index d2322ab3..00000000 --- a/essentials-framework/Essentials DM/Essentials_DM/PepperDash_Essentials_DM.csproj +++ /dev/null @@ -1,174 +0,0 @@ - - - Release - AnyCPU - 9.0.30729 - 2.0 - {9199CE8A-0C9F-4952-8672-3EED798B284F} - Library - Properties - PepperDash_Essentials_DM - PepperDash_Essentials_DM - {0B4745B0-194B-4BB6-8E21-E9057CA92300};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - WindowsCE - E2BECB1F-8C8C-41ba-B736-9BE7D946A398 - 5.0 - SmartDeviceProject1 - v3.5 - Windows CE - - - - - .allowedReferenceRelatedFileExtensions - true - full - false - bin\ - DEBUG;TRACE; - prompt - 4 - 512 - true - true - off - - - .allowedReferenceRelatedFileExtensions - none - true - bin\ - prompt - 4 - 512 - true - true - off - - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll - - - - False - ..\..\..\packages\PepperDashCore\lib\net35\PepperDash_Core.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll - False - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll - False - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe - False - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} - PepperDash_Essentials_Core - - - {E51D7C84-4906-486C-B2BA-EEB3B4E9731B} - PepperDash_Essentials_Interfaces - - - - - - - - - rem S# Pro preparation will execute after these operations - - \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Properties/AssemblyInfo.cs b/essentials-framework/Essentials DM/Essentials_DM/Properties/AssemblyInfo.cs deleted file mode 100644 index c829e44a..00000000 --- a/essentials-framework/Essentials DM/Essentials_DM/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Reflection; -using Crestron.SimplSharp.Reflection; - -[assembly: System.Reflection.AssemblyTitle("PepperDash_Essentials_DM")] -[assembly: System.Reflection.AssemblyCompany("PepperDash Technology Corp")] -[assembly: System.Reflection.AssemblyProduct("PepperDashEssentials")] -[assembly: System.Reflection.AssemblyCopyright("Copyright © PepperDash Technology Corp 2020")] -[assembly: System.Reflection.AssemblyVersion("0.0.0.*")] -[assembly: System.Reflection.AssemblyInformationalVersion("0.0.0-buildType-buildNumber")] -[assembly: Crestron.SimplSharp.Reflection.AssemblyInformationalVersion("0.0.0-buildType-buildNumber")] \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/app.config b/essentials-framework/Essentials DM/Essentials_DM/app.config deleted file mode 100644 index 58e92509..00000000 --- a/essentials-framework/Essentials DM/Essentials_DM/app.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common.sln b/essentials-framework/Essentials Devices Common/Essentials Devices Common.sln deleted file mode 100644 index 84fa1346..00000000 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Essentials Devices Common", "Essentials Devices Common\Essentials Devices Common.csproj", "{892B761C-E479-44CE-BD74-243E9214AF13}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {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}.Release|Any CPU.ActiveCfg = Release|Any CPU - {892B761C-E479-44CE-BD74-243E9214AF13}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/ClassDiagram1.cd b/essentials-framework/Essentials Devices Common/Essentials Devices Common/ClassDiagram1.cd deleted file mode 100644 index 8b9d1dd0..00000000 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/ClassDiagram1.cd +++ /dev/null @@ -1,740 +0,0 @@ - - - - - - AAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAA= - Audio\GenericAudioOut.cs - - - - - - - AAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAgAAAAQA= - Audio\GenericAudioOut.cs - - - - - - - AAAAAAAAAAAAAAAAAAAIIAAAAAAACABAAAAAAAAAAAA= - Crestron\Gateways\CenRfgwController.cs - - - - - - gUyjAAoIAAAAxgYAABAAgAECABAoAEAQqcCAQHIABAI= - DiscPlayer\IRDiscPlayerBase.cs - - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAA= - Factory\DeviceFactory.cs - - - - - - AAgAAAAAAAACAAAAAAAAAAAAAAAgAAAAAAAAAAIAAAA= - Generic\GenericSource.cs - - - - - - - AAwAAAAAAAACAAAAAAACAAAAAQAgAAAAAAAAAAIAAAA= - PC\InRoomPc.cs - - - - - - - AAwAAAAAAAACAAAAAAACAAAAAQAgAAAAAAAAAAIAAAA= - PC\Laptop.cs - - - - - - - AUgjCAqAEAASwgYAACAAoAECABAoAEAwrcCAQHKABAI= - SetTopBox\IRSetTopBoxBase.cs - - - - - - - AAAAAAAEEAAQAAAAAAAAIAAAAAAAAAAAAAAAAACAAAA= - SetTopBox\SetTopBoxPropertiesConfig.cs - - - - - - AAggAAIAAAAARAAAAAAAgAACABAoAEAQqACAQAAABAI= - Streaming\AppleTV.cs - - - - - - - AAggAAIAAAAABAAAAAAAgAACABAoAEAQqACAQAAABAI= - Streaming\Roku.cs - - - - - - - AAACAAAEAAAAAAAAAOAAAAQAAAAAAAAAAQAAAAAAAAA= - Codec\CodecActiveCallItem.cs - - - - - - AAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Codec\CodecActiveCallItem.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAA= - Codec\eCodecCallDirection.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAA= - Codec\eCodecCallStatus.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAA= - Codec\eCodecCallType.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAA= - Codec\eMeetingPrivacy.cs - - - - - - gIAAAAAAAAAAAACCAACAAAAAAAAAAAACAAAAAABAAAA= - Codec\iCodecInfo.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAA= - Codec\iHasCallFavorites.cs - - - - - - AAAAAAAQAAAAAgAAAAAAAAAAAAAAGAAAABAAAAAAACQ= - Codec\iHasCallHistory.cs - - - - - - AAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Codec\iHasDirectory.cs - - - - - - AAAAAAAAAAAIAAAAAAAAAAAABAAAAAIAAIAAQAAAAAA= - Codec\iHasDirectory.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA= - Codec\iHasDirectory.cs - - - - - - BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAIAAAAAAAAA= - Codec\iHasDirectory.cs - - - - - - AAAAAgAAAAAAAEAAAAAAAAAAAAAAAAEIAAAAAAAAAAA= - Codec\iHasDirectory.cs - - - - - - AAAAAIAAAAAAAgAAAEAAAAAAAAAIAAAAAAAAAAAAAAA= - Codec\iHasDirectory.cs - - - - - - AAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Codec\iHasDirectory.cs - - - - - - AAAAAABAAAAAEAAAAAAAgAAEAAAABAAAAAAAIQAAAAA= - Codec\iHasScheduleAwareness.cs - - - - - - AAACAAAAAAACEEgAAAAAAAgQIAAoAQABAAQAAEgAAAA= - Codec\iHasScheduleAwareness.cs - - - - - - AAAAAAAAAAAAAAAAAEAAAABAAAAIAAAAAAAAAAgAAAA= - Codec\iHasScheduleAwareness.cs - - - - - - AAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAQAAAAA= - Codec\iHasScheduleAwareness.cs - - - - - - AAAAAAAAAAAQAAAAAAAAAAAAAAAAAIQAAACAABAAAAA= - VideoCodec\CiscoCodec\CiscoSparkCodecPropertiesConfig.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAA= - VideoCodec\CiscoCodec\CiscoSparkCodecPropertiesConfig.cs - - - - - - hC4gIEAIUAABoQAEgBACAAAdBC1gmsGRICKGdQNBACw= - Display\AvocorVTFDisplay.cs - - - - - - - AAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAEQAAAAA= - Display\ComTcpDisplayBase.cs - - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAA= - Display\DeviceFactory.cs - - - - - - ogSIAAKIAAALCAAEABAQEAgABAAAAMIAAAAAEABAACA= - Display\NecPaSeriesProjector.cs - - - - - - hLQgIShIAABFQQRUAvICDRMQESwSEQKRKACCZQNAESY= - Display\NECPSXMDisplay.cs - - - - - - - hKwwIEAIQAABoUAGgBACAAAEBGxAmYORKCCGZQJAACw= - Display\SamsungMDCDisplay.cs - - - - - - - gACAAIAAAAEAQYCigAAAAAAQAACgCAAAAAAAAAMAAAI= - DSP\BiampTesira\BiampTesiraForteDsp.cs - - - - - - RAAgJACAAAAAAYAAAkIAAAAAIAQCEACJABACRAAAAUQ= - DSP\BiampTesira\BiampTesiraForteDspLevel.cs - - - - - - - BAAAAAAEAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAA= - DSP\BiampTesira\BiampTesiraFortePropertiesConfig.cs - - - - - - AAAAAAAAEAAAAIAAAAAAAAAAAAAAAAAIAAEAAAAAAEQ= - DSP\BiampTesira\BiampTesiraFortePropertiesConfig.cs - - - - - - AAAAIAAAAACAAQQAAAAAQAAAAAAAIAAAABEAAAAAAEA= - DSP\BiampTesira\TesiraForteControlPoint.cs - - - - - - AAAAAAAAAAAEAIAgAAAAAAIAAAAAAAAAAAAAAAAAAAA= - DSP\DspBase.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - DSP\DspBase.cs - - - - - - BAAAAAAAAAAAAAAAAQAAAAAAAAAAAAABAAAAQAAAAAQ= - DSP\DspBase.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAA= - DSP\PolycomSoundStructure\SoundStructureBasics.cs - - - - - - gACAEBAAAoAABQBAASAAAAAAAAEgAAACAAACAAMAQAI= - Environment\Lutron\LutronQuantum.cs - - - - - - - AAAAAAAEAAAAAAAAgQAAAAAAAAAAAAQCAAACAAAAAAA= - Environment\Lutron\LutronQuantum.cs - - - - - - gQAABAAAAxAAIACAgAgAgCBAUQAAQAgCIAEQAACBAAA= - Microphone\MicrophonePrivacyController.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAEAAAAAgAIAAAAAAAAAA= - Microphone\MicrophonePrivacyControllerConfig.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAA= - Microphone\MicrophonePrivacyControllerConfig.cs - - - - - - AAAAAAAAAAIAAAAAAAABAABgAAAAAASEABAAAAAAAAA= - Occupancy\EssentialsGlsOccupancySensorBaseController.cs - - - - - - - AAACBAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Occupancy\EssentialsOccupancyAggregator.cs - - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAg= - VideoCodec\CiscoCodec\BookingsDataClasses.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - VideoCodec\CiscoCodec\CallHistoryDataClasses.cs - - - - - - EAAAABAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAA= - VideoCodec\CiscoCodec\PhonebookDataClasses.cs - - - - - - BgYAIAACAQaKBACAAwAAUSQAAWYCEACDAAiAQBBCgQU= - VideoCodec\MockVC\MockVC.cs - - - - - - - gKAAAAAAAAAAAACCAACAAAAAAAAAAAACAAAAAABBAAA= - VideoCodec\MockVC\MockVC.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAA= - VideoCodec\MockVC\MockVcPropertiesConfig.cs - - - - - - BiwgAAECAASAAECAgQEDIABAAAYiEBCpCEigQBZCAQU= - VideoCodec\VideoCodecBase.cs - - - - - - - EAiCAAQAAgEAAQQAEAAAAAAAAAEAAAAAAACAAAAAAAM= - VideoCodec\VideoCodecBase.cs - - - - - - - jhQEtAJaASb7kSCwAwtxECSABsf2n1GBJEmAVJFKWTc= - VideoCodec\CiscoCodec\CiscoSparkCodec.cs - - - - - - - AAAAAAAAEAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA= - VideoCodec\CiscoCodec\CiscoSparkCodec.cs - - - - - - AIAAAAQACAEAAAQAEAAAAAAAAAAgAAAAAAAACAACACE= - VideoCodec\CiscoCodec\CiscoSparkCodec.cs - - - - - - - AAAAQAAAACAAAAABAAAAAAAIAIAAAAAAAQAAgAAAAAA= - VideoCodec\CiscoCodec\HttpApiServer.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - VideoCodec\CiscoCodec\xConfiguration.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - VideoCodec\CiscoCodec\xEvent.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - VideoCodec\CiscoCodec\xStatus.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - VideoCodec\CiscoCodec\xStatusSparkPlus.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Codec\iCodecAudio.cs - - - - - - AAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAA= - Codec\iCodecInfo.cs - - - - - - AAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Codec\iHasCallFavorites.cs - - - - - - AAAAAAAAAQAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAA= - Codec\iHasCallHistory.cs - - - - - - AAAAAAACAAAAAAAAAAAAAAAAAAAAAAAIAEAgABAAAAA= - Codec\iHasContentSharing.cs - - - - - - AAgAAAACAAAAAACAAAAAAAAAAAICAAAAAAAAAAQCAAA= - Codec\iHasDialer.cs - - - - - - AAAAAAAAAAAAgAAAAAAAAAAAAgCAAAAABAAAEAAAAAA= - Codec\iHasDirectory.cs - - - - - - AAAAAAAAAAAAAAAAAAAAACQAAAAAAAAAAAAAAAAAAAA= - Codec\iHasScheduleAwareness.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAA= - Display\InputInterfaces.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAA= - Display\InputInterfaces.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAA= - Display\InputInterfaces.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAA= - Display\InputInterfaces.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAA= - Display\InputInterfaces.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAA= - Display\InputInterfaces.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAA= - Display\InputInterfaces.cs - - - - - - QAAAAACAAAAAAAAAAAAAAAAAAAAAAAAIAAEAAAAAAAQ= - DSP\DspBase.cs - - - - - - AAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Occupancy\iOccupancyStatusProvider.cs - - - - - - AAAAAAAAAAAgAAAAAAAAAAAAAAAEEgAAAAAAAAAAAAA= - VideoCodec\Interfaces\IHasCodecLayouts.cs - - - - - - ABAAEAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAABAAAAI= - VideoCodec\Interfaces\IHasCodecSelfview.cs - - - - - - AAAAAAAgAAAAAAAAAAAAAIAAAEAAAAAAAAAAAAAAAAA= - Crestron\Gateways\CenRfgwController.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAgQAAAAAAAAAAAABA= - Codec\eCodecCallDirection.cs - - - - - - CAgAAABAAAAAQAACAAABAAAAAAAAAAABCAAAAiAAQBA= - Codec\eCodecCallStatus.cs - - - - - - AAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAoBg= - Codec\eCodecCallType.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAQBA= - Codec\eMeetingPrivacy.cs - - - - - - AAAAAAABAAAAAIAAAAAAAAAAAAAAAAAAAEAAAAAAABA= - Codec\iHasCallHistory.cs - - - - - - BAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAIAAAAAAABg= - Codec\iHasDirectory.cs - - - - - - AAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAABg= - Codec\iHasDirectory.cs - - - - - - BAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAIACg= - Codec\iHasScheduleAwareness.cs - - - - - - AACAACAAABAAgIAAgAAQAAAAAAAAIAAAIAAAACAEAAg= - Environment\Lutron\LutronQuantum.cs - - - - - - AAAAAAAAAAAACAQAAAAABAAEAAAAAAAAgAAAAAAAAAA= - VideoCodec\CiscoCodec\CiscoSparkCodec.cs - - - - \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/CodecActiveCallItem.cs.orig b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/CodecActiveCallItem.cs.orig deleted file mode 100644 index 46746037..00000000 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/CodecActiveCallItem.cs.orig +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -namespace PepperDash.Essentials.Devices.Common.Codec - -{ - public class CodecActiveCallItem - { - public string Name { get; set; } - - public string Number { get; set; } - -<<<<<<< HEAD:Essentials Devices Common/Essentials Devices Common/Codec/CodecActiveCallItem.cs - public eCodecCallType Type { get; set; } - - public eCodecCallStatus Status { get; set; } - - public string Id { get; set; } -======= - public eCodecCallType Type { get; set; } - - public eCodecCallStatus Status { get; set; } - - public string Id { get; set; } - - public object CallMetaData { get; set; } ->>>>>>> origin/feature/cisco-spark-2:Essentials Devices Common/Essentials Devices Common/VideoCodec/CodecActiveCallItem.cs - } - - public enum eCodecCallType - { - Unknown = 0, Audio, Video -<<<<<<< HEAD:Essentials Devices Common/Essentials Devices Common/Codec/CodecActiveCallItem.cs - } - - public enum eCodecCallStatus - { - Unknown = 0, Dialing, Connected, Incoming, OnHold, Disconnected -======= - } - - public enum eCodecCallStatus - { - Unknown = 0, Dialing, Connected, Incoming, OnHold, Disconnected ->>>>>>> origin/feature/cisco-spark-2:Essentials Devices Common/Essentials Devices Common/VideoCodec/CodecActiveCallItem.cs - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QSC/QscDsp.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QSC/QscDsp.cs deleted file mode 100644 index 24fd93d4..00000000 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QSC/QscDsp.cs +++ /dev/null @@ -1,328 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Devices.Common.Codec; -using System.Text.RegularExpressions; -using Crestron.SimplSharp.Reflection; - -namespace PepperDash.Essentials.Devices.Common.DSP -{ - - // QUESTIONS: - // - // When subscribing, just use the Instance ID for Custom Name? - - // Verbose on subscriptions? - - // Example subscription feedback responses - // ! "publishToken":"name" "value":-77.0 - // ! "myLevelName" -77 - - public class QscDsp : DspBase - { - public IBasicCommunication Communication { get; private set; } - public CommunicationGather PortGather { get; private set; } - public GenericCommunicationMonitor CommunicationMonitor { get; private set; } - - new public Dictionary LevelControlPoints { get; private set; } - new public Dictionary Dialers { get; set; } - public List PresetList = new List(); - - public bool isSubscribed; - - - - CrestronQueue CommandQueue; - - bool CommandQueueInProgress = false; - - - public bool ShowHexResponse { get; set; } - - public QscDsp(string key, string name, IBasicCommunication comm, QscDspPropertiesConfig props) : - base(key, name) - { - CommandQueue = new CrestronQueue(100); - - Communication = comm; - var socket = comm as ISocketStatus; - if (socket != null) - { - // This instance uses IP control - socket.ConnectionChange += new EventHandler(socket_ConnectionChange); - } - else - { - // This instance uses RS-232 control - } - PortGather = new CommunicationGather(Communication, "\x0a"); - PortGather.LineReceived += this.Port_LineReceived; - - LevelControlPoints = new Dictionary(); - Dialers = new Dictionary(); - - if (props.CommunicationMonitorProperties != null) - { - CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, props.CommunicationMonitorProperties); - } - else - { - CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 20000, 120000, 300000, "cgp 1\x0D\x0A"); - } - - - foreach (KeyValuePair block in props.LevelControlBlocks) - { - this.LevelControlPoints.Add(block.Key, new QscDspLevelControl(block.Key, block.Value, this)); - Debug.Console(2, this, "Added LevelControlPoint {0}", block.Key); - - - } - foreach (KeyValuePair preset in props.presets) - { - this.addPreset(preset.Value); - Debug.Console(2, this, "Added Preset {0} {1}", preset.Value.label, preset.Value.preset); - } - foreach (KeyValuePair dialerConfig in props.dialerControlBlocks) - { - Debug.Console(2, this, "Added Dialer {0}\n {1}", dialerConfig.Key, dialerConfig.Value); - this.Dialers.Add(dialerConfig.Key, new QscDspDialer(dialerConfig.Value, this)); - - } - - } - - public override bool CustomActivate() - { - Communication.Connect(); - CommunicationMonitor.StatusChange += (o, a) => { Debug.Console(2, this, "Communication monitor state: {0}", CommunicationMonitor.Status); }; - CommunicationMonitor.Start(); - - - CrestronConsole.AddNewConsoleCommand(SendLine, "send" + Key, "", ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(s => Communication.Connect(), "con" + Key, "", ConsoleAccessLevelEnum.AccessOperator); - return true; - } - - void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e) - { - Debug.Console(2, this, "Socket Status Change: {0}", e.Client.ClientStatus.ToString()); - - if (e.Client.IsConnected) - { - SubscribeToAttributes(); - } - else - { - // Cleanup items from this session - CommandQueue.Clear(); - CommandQueueInProgress = false; - } - } - - /// - /// Initiates the subscription process to the DSP - /// - void SubscribeToAttributes() - { - SendLine("cgd 1"); - - SendLine("cgc 1"); - - foreach (KeyValuePair level in LevelControlPoints) - { - level.Value.Subscribe(); - } - - foreach (var dialer in Dialers) - { - dialer.Value.Subscribe(); - } - - if (CommunicationMonitor != null) - { - - CommunicationMonitor.Start(); - //CommunicationMonitor = null; - } - else - { - - } - //CommunicationMonitor.Message = "cgp 1\x0D\x0A"; - CommunicationMonitor.StatusChange += (o, a) => { Debug.Console(2, this, "Communication monitor state: {0}", CommunicationMonitor.Status); }; - //CommunicationMonitor.Start(); - if (!CommandQueueInProgress) - SendNextQueuedCommand(); - - // ResetSubscriptionTimer(); - } - - - - /// - /// Handles a response message from the DSP - /// - /// - /// - void Port_LineReceived(object dev, GenericCommMethodReceiveTextArgs args) - { - Debug.Console(2, this, "RX: '{0}'", args.Text); - try - { - if (args.Text.IndexOf("sr ") > -1) - { - } - else if (args.Text.IndexOf("cv") > -1) - { - - var changeMessage = args.Text.Split(null); - - string changedInstance = changeMessage[1].Replace("\"", ""); - Debug.Console(1, this, "cv parse Instance: {0}", changedInstance); - bool foundItFlag = false; - foreach (KeyValuePair controlPoint in LevelControlPoints) - { - if (changedInstance == controlPoint.Value.LevelInstanceTag) - { - controlPoint.Value.ParseSubscriptionMessage(changedInstance, changeMessage[4]); - foundItFlag = true; - return; - } - else if (changedInstance == controlPoint.Value.MuteInstanceTag) - { - controlPoint.Value.ParseSubscriptionMessage(changedInstance, changeMessage[2].Replace("\"", "")); - foundItFlag = true; - return; - } - - } - if (!foundItFlag) - { - foreach (var dialer in Dialers) - { - PropertyInfo[] properties = dialer.Value.Tags.GetType().GetCType().GetProperties(); - //GetPropertyValues(Tags); - foreach (var prop in properties) - { - var propValue = prop.GetValue(dialer.Value.Tags, null) as string; - if (changedInstance == propValue) - { - dialer.Value.ParseSubscriptionMessage(changedInstance, changeMessage[2].Replace("\"", "")); - foundItFlag = true; - return; - } - } - if (foundItFlag) - { - return; - } - } - } - - } - - - } - catch (Exception e) - { - if (Debug.Level == 2) - Debug.Console(2, this, "Error parsing response: '{0}'\n{1}", args.Text, e); - } - - } - - /// - /// Sends a command to the DSP (with delimiter appended) - /// - /// Command to send - public void SendLine(string s) - { - Debug.Console(1, this, "TX: '{0}'", s); - Communication.SendText(s + "\x0a"); - } - - /// - /// Adds a command from a child module to the queue - /// - /// Command object from child module - public void EnqueueCommand(QueuedCommand commandToEnqueue) - { - CommandQueue.Enqueue(commandToEnqueue); - //Debug.Console(1, this, "Command (QueuedCommand) Enqueued '{0}'. CommandQueue has '{1}' Elements.", commandToEnqueue.Command, CommandQueue.Count); - - if(!CommandQueueInProgress) - SendNextQueuedCommand(); - } - - /// - /// Adds a raw string command to the queue - /// - /// - public void EnqueueCommand(string command) - { - CommandQueue.Enqueue(command); - //Debug.Console(1, this, "Command (string) Enqueued '{0}'. CommandQueue has '{1}' Elements.", command, CommandQueue.Count); - - if (!CommandQueueInProgress) - SendNextQueuedCommand(); - } - - /// - /// Sends the next queued command to the DSP - /// - void SendNextQueuedCommand() - { - if (Communication.IsConnected && !CommandQueue.IsEmpty) - { - CommandQueueInProgress = true; - - if (CommandQueue.Peek() is QueuedCommand) - { - QueuedCommand nextCommand = new QueuedCommand(); - - nextCommand = (QueuedCommand)CommandQueue.Peek(); - - SendLine(nextCommand.Command); - } - else - { - string nextCommand = (string)CommandQueue.Peek(); - - SendLine(nextCommand); - } - } - - } - - public void RunPresetNumber(ushort n) - { - RunPreset(PresetList[n].preset); - } - - public void addPreset(QscDspPresets s) - { - PresetList.Add(s); - } - /// - /// Sends a command to execute a preset - /// - /// Preset Name - public override void RunPreset(string name) - { - SendLine(string.Format("ssl {0}", name)); - SendLine("cgp 1"); - } - - public class QueuedCommand - { - public string Command { get; set; } - public string AttributeCode { get; set; } - public QscDspControlPoint ControlPoint { get; set; } - } - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QSC/QscDspControlPoint.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QSC/QscDspControlPoint.cs deleted file mode 100644 index 542336eb..00000000 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QSC/QscDspControlPoint.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -namespace PepperDash.Essentials.Devices.Common.DSP -{ - public abstract class QscDspControlPoint : DspControlPoint - { - public string Key { get; protected set; } - - public string LevelInstanceTag { get; set; } - public string MuteInstanceTag { get; set; } - public QscDsp Parent { get; private set; } - - public bool IsSubscribed { get; protected set; } - - protected QscDspControlPoint(string levelInstanceTag, string muteInstanceTag, QscDsp parent) - { - LevelInstanceTag = levelInstanceTag; - MuteInstanceTag = muteInstanceTag; - Parent = parent; - } - - virtual public void Initialize() - { - } - - /// - /// Sends a command to the DSP - /// - /// command - /// attribute code - /// value (use "" if not applicable) - public virtual void SendFullCommand(string cmd, string instance, string value) - { - - var cmdToSemd = string.Format("{0} {1} {2}", cmd, instance, value); - - Parent.SendLine(cmdToSemd); - - } - - virtual public void ParseGetMessage(string attributeCode, string message) - { - } - - - - public virtual void SendSubscriptionCommand(string instanceTag, string changeGroup) - { - // Subscription string format: InstanceTag subscribe attributeCode Index1 customName responseRate - // Ex: "RoomLevel subscribe level 1 MyRoomLevel 500" - - string cmd; - - cmd = string.Format("cga {0} {1}", changeGroup, instanceTag); - - Parent.SendLine(cmd); - } - - - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QSC/QscDspDialer.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QSC/QscDspDialer.cs deleted file mode 100644 index 387dffe7..00000000 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QSC/QscDspDialer.cs +++ /dev/null @@ -1,270 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using Crestron.SimplSharp.Reflection; -using Crestron.SimplSharp; -using PepperDash.Essentials.Devices.Common.Codec; -using Crestron.SimplSharpPro.CrestronThread; - -namespace PepperDash.Essentials.Devices.Common.DSP -{ - public class QscDspDialer : DspDialerBase, IHasDialer - { - public QscDialerConfig Tags; - public bool IsInCall { get; private set; } - public QscDsp Parent { get; private set; } - public string DialString { get; private set; } - public bool OffHook { get; private set; } - public bool AutoAnswerState { get; private set; } - public bool DoNotDisturbState { get; private set; } - - public BoolFeedback OffHookFeedback; - public BoolFeedback AutoAnswerFeedback; - public BoolFeedback DoNotDisturbFeedback; - public StringFeedback DialStringFeedback; - - // Add requirements for Dialer functionality - - public QscDspDialer(QscDialerConfig Config, QscDsp parent) - { - Tags = Config; - Parent = parent; - DialStringFeedback = new StringFeedback(() => { return DialString; }); - OffHookFeedback = new BoolFeedback(() => { return OffHook; }); - AutoAnswerFeedback = new BoolFeedback(() => { return AutoAnswerState; }); - DoNotDisturbFeedback = new BoolFeedback(() => { return DoNotDisturbState; }); - } - - public event EventHandler CallStatusChange; - - public void Subscribe() - { - try - { - // Do subscriptions and blah blah - // This would be better using reflection JTA 2018-08-28 - PropertyInfo[] properties = Tags.GetType().GetCType().GetProperties(); - //GetPropertyValues(Tags); - - Debug.Console(2, "QscDspDialer Subscribe"); - foreach (var prop in properties) - { - //var val = prop.GetValue(obj, null); - - - Debug.Console(2, "Property {0}, {1}, {2}\n", prop.GetType().Name, prop.Name, prop.PropertyType.FullName); - if (prop.Name.Contains("Tag") && !prop.Name.Contains("keypad")) - { - var propValue = prop.GetValue(Tags, null) as string; - Debug.Console(2, "Property {0}, {1}, {2}\n", prop.GetType().Name, prop.Name, propValue); - SendSubscriptionCommand(propValue, "1"); - } - - - } - } - catch (Exception e) - { - - Debug.Console(2, "QscDspDialer Subscription Error: '{0}'\n", e); - } - - - // SendSubscriptionCommand(, "1"); - // SendSubscriptionCommand(config. , "mute", 500); - } - public void ParseSubscriptionMessage(string customName, string value) - { - - // Check for valid subscription response - Debug.Console(1, "QscDialerTag {0} Response: '{1}'", customName, value); - if (customName == Tags.dialStringTag) - { - Debug.Console(2, "QscDialerTag DialStringChanged ", value); - this.DialString = value; - this.DialStringFeedback.FireUpdate(); - } - else if (customName == Tags.doNotDisturbTag) - { - if (value == "on") - { - this.DoNotDisturbState = true; - } - else if (value == "off") - { - this.DoNotDisturbState = false; - } - DoNotDisturbFeedback.FireUpdate(); - } - else if (customName == Tags.callStatusTag) - { - if (value == "Dialing") - { - this.OffHook = true; - } - else if (value == "Disconnected") - { - this.OffHook = false; - if (Tags.ClearOnHangup) - { - this.SendKeypad(eKeypadKeys.Clear); - } - } - this.OffHookFeedback.FireUpdate(); - } - else if (customName == Tags.autoAnswerTag) - { - if (value == "on") - { - this.AutoAnswerState = true; - } - else if (value == "off") - { - this.AutoAnswerState = false; - } - AutoAnswerFeedback.FireUpdate(); - } - else if (customName == Tags.hookStatusTag) - { - if (value == "true") - { - this.OffHook = true; - } - else if (value == "false") - { - this.OffHook = false; - } - this.OffHookFeedback.FireUpdate(); - } - - - } - - public void DoNotDisturbToggle() - { - int dndStateInt = !DoNotDisturbState ? 1 : 0; - Parent.SendLine(string.Format("csv {0} {1}", Tags.doNotDisturbTag, dndStateInt)); - } - public void DoNotDisturbOn() - { - Parent.SendLine(string.Format("csv {0} 1", Tags.doNotDisturbTag)); - } - public void DoNotDisturbOff() - { - Parent.SendLine(string.Format("csv {0} 0", Tags.doNotDisturbTag)); - } - public void AutoAnswerToggle() - { - int autoAnswerStateInt = !AutoAnswerState ? 1 : 0; - Parent.SendLine(string.Format("csv {0} {1}", Tags.autoAnswerTag, autoAnswerStateInt)); - } - public void AutoAnswerOn() - { - Parent.SendLine(string.Format("csv {0} 1", Tags.autoAnswerTag)); - } - public void AutoAnswerOff() - { - Parent.SendLine(string.Format("csv {0} 0", Tags.autoAnswerTag)); - } - - private void PollKeypad() - { - Thread.Sleep(50); - Parent.SendLine(string.Format("cg {0}", Tags.dialStringTag)); - } - - public void SendKeypad(eKeypadKeys button) - { - string keypadTag = null; - switch (button) - { - case eKeypadKeys.Num0: keypadTag = Tags.keypad0Tag; break; - case eKeypadKeys.Num1: keypadTag = Tags.keypad1Tag; break; - case eKeypadKeys.Num2: keypadTag = Tags.keypad2Tag; break; - case eKeypadKeys.Num3: keypadTag = Tags.keypad3Tag; break; - case eKeypadKeys.Num4: keypadTag = Tags.keypad4Tag; break; - case eKeypadKeys.Num5: keypadTag = Tags.keypad5Tag; break; - case eKeypadKeys.Num6: keypadTag = Tags.keypad6Tag; break; - case eKeypadKeys.Num7: keypadTag = Tags.keypad7Tag; break; - case eKeypadKeys.Num8: keypadTag = Tags.keypad8Tag; break; - case eKeypadKeys.Num9: keypadTag = Tags.keypad9Tag; break; - case eKeypadKeys.Pound: keypadTag = Tags.keypadPoundTag; break; - case eKeypadKeys.Star: keypadTag = Tags.keypadStarTag; break; - case eKeypadKeys.Backspace: keypadTag = Tags.keypadBackspaceTag; break; - case eKeypadKeys.Clear: keypadTag = Tags.keypadClearTag; break; - } - if (keypadTag != null) - { - var cmdToSend = string.Format("ct {0}", keypadTag); - Parent.SendLine(cmdToSend); - PollKeypad(); - } - } - public void SendSubscriptionCommand(string instanceTag, string changeGroup) - { - // Subscription string format: InstanceTag subscribe attributeCode Index1 customName responseRate - // Ex: "RoomLevel subscribe level 1 MyRoomLevel 500" - - var cmd = string.Format("cga {0} {1}", changeGroup, instanceTag); - - Parent.SendLine(cmd); - } - public void Dial() - { - if (!this.OffHook) - { - Parent.SendLine(string.Format("ct {0}", Tags.connectTag)); - } - else - { - Parent.SendLine(string.Format("ct {0}", Tags.disconnectTag)); - } - Thread.Sleep(50); - Parent.SendLine(string.Format("cg {0}", Tags.callStatusTag)); - } - public void Dial(string number) - { - } - public void EndCall(CodecActiveCallItem activeCall) - { - } - public void EndAllCalls() - { - } - public void AcceptCall(CodecActiveCallItem item) - { - } - - public void RejectCall(CodecActiveCallItem item) - { - - } - - public void SendDtmf(string digit) - { - - } - - public enum eKeypadKeys - { - Num1, - Num2, - Num3, - Num4, - Num5, - Num6, - Num7, - Num8, - Num9, - Num0, - Star, - Pound, - Clear, - Backspace - } - - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QSC/QscDspLevelControl.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QSC/QscDspLevelControl.cs deleted file mode 100644 index 498127f5..00000000 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QSC/QscDspLevelControl.cs +++ /dev/null @@ -1,307 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using System.Text.RegularExpressions; - - -namespace PepperDash.Essentials.Devices.Common.DSP -{ - public class QscDspLevelControl : QscDspControlPoint, IBasicVolumeWithFeedback, IKeyed - { - bool _IsMuted; - ushort _VolumeLevel; - - public BoolFeedback MuteFeedback { get; private set; } - - public IntFeedback VolumeLevelFeedback { get; private set; } - - public bool Enabled { get; set; } - public ePdtLevelTypes Type; - CTimer VolumeUpRepeatTimer; - CTimer VolumeDownRepeatTimer; - - /// - /// Used for to identify level subscription values - /// - public string LevelCustomName { get; private set; } - - /// - /// Used for to identify mute subscription values - /// - public string MuteCustomName { get; private set; } - - /// - /// Minimum fader level - /// - double MinLevel; - - /// - /// Maximum fader level - /// - double MaxLevel; - - /// - /// Checks if a valid subscription string has been recieved for all subscriptions - /// - public bool IsSubsribed - { - get - { - bool isSubscribed = false; - - if (HasMute && MuteIsSubscribed) - isSubscribed = true; - - if (HasLevel && LevelIsSubscribed) - isSubscribed = true; - - return isSubscribed; - } - } - - public bool AutomaticUnmuteOnVolumeUp { get; private set; } - - public bool HasMute { get; private set; } - - public bool HasLevel { get; private set; } - - bool MuteIsSubscribed; - - bool LevelIsSubscribed; - - //public TesiraForteLevelControl(string label, string id, int index1, int index2, bool hasMute, bool hasLevel, BiampTesiraForteDsp parent) - // : base(id, index1, index2, parent) - //{ - // Initialize(label, hasMute, hasLevel); - //} - - public QscDspLevelControl(string key, QscDspLevelControlBlockConfig config, QscDsp parent) - : base(config.LevelInstanceTag, config.MuteInstanceTag, parent) - { - if (!config.Disabled) - { - Initialize(key, config); - } - } - - - /// - /// Initializes this attribute based on config values and generates subscriptions commands and adds commands to the parent's queue. - /// - public void Initialize(string key, QscDspLevelControlBlockConfig config) - { - Key = string.Format("{0}--{1}", Parent.Key, key); - Enabled = true; - DeviceManager.AddDevice(this); - if (config.IsMic) - { - Type = ePdtLevelTypes.microphone; - } - else - { - Type = ePdtLevelTypes.speaker; - } - - Debug.Console(2, this, "Adding LevelControl '{0}'", Key); - - this.IsSubscribed = false; - - MuteFeedback = new BoolFeedback(() => _IsMuted); - - VolumeLevelFeedback = new IntFeedback(() => _VolumeLevel); - - VolumeUpRepeatTimer = new CTimer(VolumeUpRepeat, Timeout.Infinite); - VolumeDownRepeatTimer = new CTimer(VolumeDownRepeat, Timeout.Infinite); - LevelCustomName = config.Label; - HasMute = config.HasMute; - HasLevel = config.HasLevel; - } - - public void Subscribe() - { - // Do subscriptions and blah blah - - // Subscribe to mute - if (this.HasMute) - { - - SendSubscriptionCommand(this.MuteInstanceTag, "1"); - // SendSubscriptionCommand(config. , "mute", 500); - } - - // Subscribe to level - if (this.HasLevel) - { - - SendSubscriptionCommand(this.LevelInstanceTag, "1"); - // SendSubscriptionCommand(this.con, "level", 250); - - //SendFullCommand("get", "minLevel", null); - - //SendFullCommand("get", "maxLevel", null); - } - } - - - /// - /// Parses the response from the DspBase - /// - /// - /// - public void ParseSubscriptionMessage(string customName, string value) - { - - // Check for valid subscription response - Debug.Console(1, this, "Level {0} Response: '{1}'", customName, value); - if (customName == MuteInstanceTag) - { - if (value == "muted") - { - _IsMuted = true; - MuteIsSubscribed = true; - - } - else if (value == "unmuted") - { - _IsMuted = false; - MuteIsSubscribed = true; - } - - MuteFeedback.FireUpdate(); - } - else if (customName == LevelInstanceTag) - { - - - var _value = Double.Parse(value); - - _VolumeLevel = (ushort)(_value * 65535); - Debug.Console(1, this, "Level {0} VolumeLevel: '{1}'", customName, _VolumeLevel); - LevelIsSubscribed = true; - - VolumeLevelFeedback.FireUpdate(); - } - - } - - - /// - /// Turns the mute off - /// - public void MuteOff() - { - SendFullCommand("csv", this.MuteInstanceTag, "0"); - } - - /// - /// Turns the mute on - /// - public void MuteOn() - { - SendFullCommand("csv", this.MuteInstanceTag, "1"); - } - - /// - /// Sets the volume to a specified level - /// - /// - public void SetVolume(ushort level) - { - Debug.Console(1, this, "volume: {0}", level); - // Unmute volume if new level is higher than existing - if (AutomaticUnmuteOnVolumeUp && _IsMuted) - { - MuteOff(); - } - double newLevel = Scale(level); - Debug.Console(1, this, "newVolume: {0}", newLevel); - SendFullCommand("csp", this.LevelInstanceTag, string.Format("{0}", newLevel)); - } - - /// - /// Toggles mute status - /// - public void MuteToggle() - { - - if (_IsMuted) - { - SendFullCommand("csv", this.MuteInstanceTag, "0"); - } - else - { - SendFullCommand("csv", this.MuteInstanceTag, "1"); - } - - } - - public void VolumeUpRepeat(object callbackObject) - { - this.VolumeUp(true); - } - public void VolumeDownRepeat(object callbackObject) - { - this.VolumeDown(true); - } - - public void VolumeDown(bool press) - { - - - if (press) - { - VolumeDownRepeatTimer.Reset(100); - SendFullCommand("css ", this.LevelInstanceTag, "--"); - - - } - else - { - VolumeDownRepeatTimer.Stop(); - // VolumeDownRepeatTimer.Dispose(); - } - } - - /// - /// Increments volume level - /// - /// - public void VolumeUp(bool press) - { - if (press) - { - VolumeUpRepeatTimer.Reset(100); - SendFullCommand("css ", this.LevelInstanceTag, "++"); - - if (AutomaticUnmuteOnVolumeUp) - if (!_IsMuted) - MuteOff(); - } - else - { - VolumeUpRepeatTimer.Stop(); - } - } - /// - double Scale(double input) - { - Debug.Console(1, this, "Scaling (double) input '{0}'",input ); - - var output = (input / 65535); - - Debug.Console(1, this, "Scaled output '{0}'", output); - - return output; - } - } - public enum ePdtLevelTypes - { - speaker = 0, - microphone = 1 - } - -} \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QSC/QscDspPropertiesConfig.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QSC/QscDspPropertiesConfig.cs deleted file mode 100644 index 9eab3e84..00000000 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QSC/QscDspPropertiesConfig.cs +++ /dev/null @@ -1,88 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -using PepperDash.Core; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Devices.Common.DSP -{ - /// - /// - /// - public class QscDspPropertiesConfig - { - public CommunicationMonitorConfig CommunicationMonitorProperties { get; set; } - - public ControlPropertiesConfig Control { get; set; } - - /// - /// These are key-value pairs, string id, string type. - /// Valid types are level and mute. - /// Need to include the index values somehow - /// - public Dictionary LevelControlBlocks { get; set; } - public Dictionary dialerControlBlocks { get; set; } - public Dictionary presets { get; set; } - // public Dictionary DialerControlBlocks {get; set;} - } - public interface IQscDspBasicLevel : IBasicVolumeWithFeedback - { - /// - /// In BiAmp: Instance Tag, QSC: Named Control, Polycom: - /// - string LevelInstanceTag { get; set; } - string MuteInstanceTag { get; set; } - bool HasMute { get; } - bool HasLevel { get; } - bool AutomaticUnmuteOnVolumeUp { get; } - } - public class QscDspLevelControlBlockConfig - { - public bool Disabled { get; set; } - public string Label { get; set; } - public string LevelInstanceTag { get; set; } - public string MuteInstanceTag { get; set; } - public bool HasMute { get; set; } - public bool HasLevel { get; set; } - public bool IsMic { get; set; } - } - - public class QscDialerConfig - { - public string incomingCallRingerTag {get; set;} - public string dialStringTag {get; set;} - public string disconnectTag {get; set;} - public string connectTag {get; set;} - public string callStatusTag {get; set;} - public string hookStatusTag {get; set;} - public string doNotDisturbTag { get; set; } - public string autoAnswerTag { get; set; } - - public string keypadBackspaceTag {get; set;} - public string keypadClearTag {get; set;} - public string keypad1Tag {get; set;} - public string keypad2Tag {get; set;} - public string keypad3Tag {get; set;} - public string keypad4Tag {get; set;} - public string keypad5Tag {get; set;} - public string keypad6Tag {get; set;} - public string keypad7Tag {get; set;} - public string keypad8Tag {get; set;} - public string keypad9Tag {get; set;} - public string keypad0Tag {get; set;} - public string keypadPoundTag {get; set;} - public string keypadStarTag {get; set;} - - public bool ClearOnHangup { get; set; } - - } - - public class QscDspPresets - { - public string label { get; set; } - public string preset { get; set; } - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QscDsp/._QscDspPropertiesConfig.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QscDsp/._QscDspPropertiesConfig.cs deleted file mode 100644 index 8801a8a6..00000000 Binary files a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QscDsp/._QscDspPropertiesConfig.cs and /dev/null differ diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QscDsp/QscDsp.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QscDsp/QscDsp.cs deleted file mode 100644 index 24fd93d4..00000000 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QscDsp/QscDsp.cs +++ /dev/null @@ -1,328 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Devices.Common.Codec; -using System.Text.RegularExpressions; -using Crestron.SimplSharp.Reflection; - -namespace PepperDash.Essentials.Devices.Common.DSP -{ - - // QUESTIONS: - // - // When subscribing, just use the Instance ID for Custom Name? - - // Verbose on subscriptions? - - // Example subscription feedback responses - // ! "publishToken":"name" "value":-77.0 - // ! "myLevelName" -77 - - public class QscDsp : DspBase - { - public IBasicCommunication Communication { get; private set; } - public CommunicationGather PortGather { get; private set; } - public GenericCommunicationMonitor CommunicationMonitor { get; private set; } - - new public Dictionary LevelControlPoints { get; private set; } - new public Dictionary Dialers { get; set; } - public List PresetList = new List(); - - public bool isSubscribed; - - - - CrestronQueue CommandQueue; - - bool CommandQueueInProgress = false; - - - public bool ShowHexResponse { get; set; } - - public QscDsp(string key, string name, IBasicCommunication comm, QscDspPropertiesConfig props) : - base(key, name) - { - CommandQueue = new CrestronQueue(100); - - Communication = comm; - var socket = comm as ISocketStatus; - if (socket != null) - { - // This instance uses IP control - socket.ConnectionChange += new EventHandler(socket_ConnectionChange); - } - else - { - // This instance uses RS-232 control - } - PortGather = new CommunicationGather(Communication, "\x0a"); - PortGather.LineReceived += this.Port_LineReceived; - - LevelControlPoints = new Dictionary(); - Dialers = new Dictionary(); - - if (props.CommunicationMonitorProperties != null) - { - CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, props.CommunicationMonitorProperties); - } - else - { - CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 20000, 120000, 300000, "cgp 1\x0D\x0A"); - } - - - foreach (KeyValuePair block in props.LevelControlBlocks) - { - this.LevelControlPoints.Add(block.Key, new QscDspLevelControl(block.Key, block.Value, this)); - Debug.Console(2, this, "Added LevelControlPoint {0}", block.Key); - - - } - foreach (KeyValuePair preset in props.presets) - { - this.addPreset(preset.Value); - Debug.Console(2, this, "Added Preset {0} {1}", preset.Value.label, preset.Value.preset); - } - foreach (KeyValuePair dialerConfig in props.dialerControlBlocks) - { - Debug.Console(2, this, "Added Dialer {0}\n {1}", dialerConfig.Key, dialerConfig.Value); - this.Dialers.Add(dialerConfig.Key, new QscDspDialer(dialerConfig.Value, this)); - - } - - } - - public override bool CustomActivate() - { - Communication.Connect(); - CommunicationMonitor.StatusChange += (o, a) => { Debug.Console(2, this, "Communication monitor state: {0}", CommunicationMonitor.Status); }; - CommunicationMonitor.Start(); - - - CrestronConsole.AddNewConsoleCommand(SendLine, "send" + Key, "", ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(s => Communication.Connect(), "con" + Key, "", ConsoleAccessLevelEnum.AccessOperator); - return true; - } - - void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e) - { - Debug.Console(2, this, "Socket Status Change: {0}", e.Client.ClientStatus.ToString()); - - if (e.Client.IsConnected) - { - SubscribeToAttributes(); - } - else - { - // Cleanup items from this session - CommandQueue.Clear(); - CommandQueueInProgress = false; - } - } - - /// - /// Initiates the subscription process to the DSP - /// - void SubscribeToAttributes() - { - SendLine("cgd 1"); - - SendLine("cgc 1"); - - foreach (KeyValuePair level in LevelControlPoints) - { - level.Value.Subscribe(); - } - - foreach (var dialer in Dialers) - { - dialer.Value.Subscribe(); - } - - if (CommunicationMonitor != null) - { - - CommunicationMonitor.Start(); - //CommunicationMonitor = null; - } - else - { - - } - //CommunicationMonitor.Message = "cgp 1\x0D\x0A"; - CommunicationMonitor.StatusChange += (o, a) => { Debug.Console(2, this, "Communication monitor state: {0}", CommunicationMonitor.Status); }; - //CommunicationMonitor.Start(); - if (!CommandQueueInProgress) - SendNextQueuedCommand(); - - // ResetSubscriptionTimer(); - } - - - - /// - /// Handles a response message from the DSP - /// - /// - /// - void Port_LineReceived(object dev, GenericCommMethodReceiveTextArgs args) - { - Debug.Console(2, this, "RX: '{0}'", args.Text); - try - { - if (args.Text.IndexOf("sr ") > -1) - { - } - else if (args.Text.IndexOf("cv") > -1) - { - - var changeMessage = args.Text.Split(null); - - string changedInstance = changeMessage[1].Replace("\"", ""); - Debug.Console(1, this, "cv parse Instance: {0}", changedInstance); - bool foundItFlag = false; - foreach (KeyValuePair controlPoint in LevelControlPoints) - { - if (changedInstance == controlPoint.Value.LevelInstanceTag) - { - controlPoint.Value.ParseSubscriptionMessage(changedInstance, changeMessage[4]); - foundItFlag = true; - return; - } - else if (changedInstance == controlPoint.Value.MuteInstanceTag) - { - controlPoint.Value.ParseSubscriptionMessage(changedInstance, changeMessage[2].Replace("\"", "")); - foundItFlag = true; - return; - } - - } - if (!foundItFlag) - { - foreach (var dialer in Dialers) - { - PropertyInfo[] properties = dialer.Value.Tags.GetType().GetCType().GetProperties(); - //GetPropertyValues(Tags); - foreach (var prop in properties) - { - var propValue = prop.GetValue(dialer.Value.Tags, null) as string; - if (changedInstance == propValue) - { - dialer.Value.ParseSubscriptionMessage(changedInstance, changeMessage[2].Replace("\"", "")); - foundItFlag = true; - return; - } - } - if (foundItFlag) - { - return; - } - } - } - - } - - - } - catch (Exception e) - { - if (Debug.Level == 2) - Debug.Console(2, this, "Error parsing response: '{0}'\n{1}", args.Text, e); - } - - } - - /// - /// Sends a command to the DSP (with delimiter appended) - /// - /// Command to send - public void SendLine(string s) - { - Debug.Console(1, this, "TX: '{0}'", s); - Communication.SendText(s + "\x0a"); - } - - /// - /// Adds a command from a child module to the queue - /// - /// Command object from child module - public void EnqueueCommand(QueuedCommand commandToEnqueue) - { - CommandQueue.Enqueue(commandToEnqueue); - //Debug.Console(1, this, "Command (QueuedCommand) Enqueued '{0}'. CommandQueue has '{1}' Elements.", commandToEnqueue.Command, CommandQueue.Count); - - if(!CommandQueueInProgress) - SendNextQueuedCommand(); - } - - /// - /// Adds a raw string command to the queue - /// - /// - public void EnqueueCommand(string command) - { - CommandQueue.Enqueue(command); - //Debug.Console(1, this, "Command (string) Enqueued '{0}'. CommandQueue has '{1}' Elements.", command, CommandQueue.Count); - - if (!CommandQueueInProgress) - SendNextQueuedCommand(); - } - - /// - /// Sends the next queued command to the DSP - /// - void SendNextQueuedCommand() - { - if (Communication.IsConnected && !CommandQueue.IsEmpty) - { - CommandQueueInProgress = true; - - if (CommandQueue.Peek() is QueuedCommand) - { - QueuedCommand nextCommand = new QueuedCommand(); - - nextCommand = (QueuedCommand)CommandQueue.Peek(); - - SendLine(nextCommand.Command); - } - else - { - string nextCommand = (string)CommandQueue.Peek(); - - SendLine(nextCommand); - } - } - - } - - public void RunPresetNumber(ushort n) - { - RunPreset(PresetList[n].preset); - } - - public void addPreset(QscDspPresets s) - { - PresetList.Add(s); - } - /// - /// Sends a command to execute a preset - /// - /// Preset Name - public override void RunPreset(string name) - { - SendLine(string.Format("ssl {0}", name)); - SendLine("cgp 1"); - } - - public class QueuedCommand - { - public string Command { get; set; } - public string AttributeCode { get; set; } - public QscDspControlPoint ControlPoint { get; set; } - } - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QscDsp/QscDspControlPoint.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QscDsp/QscDspControlPoint.cs deleted file mode 100644 index 542336eb..00000000 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QscDsp/QscDspControlPoint.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -namespace PepperDash.Essentials.Devices.Common.DSP -{ - public abstract class QscDspControlPoint : DspControlPoint - { - public string Key { get; protected set; } - - public string LevelInstanceTag { get; set; } - public string MuteInstanceTag { get; set; } - public QscDsp Parent { get; private set; } - - public bool IsSubscribed { get; protected set; } - - protected QscDspControlPoint(string levelInstanceTag, string muteInstanceTag, QscDsp parent) - { - LevelInstanceTag = levelInstanceTag; - MuteInstanceTag = muteInstanceTag; - Parent = parent; - } - - virtual public void Initialize() - { - } - - /// - /// Sends a command to the DSP - /// - /// command - /// attribute code - /// value (use "" if not applicable) - public virtual void SendFullCommand(string cmd, string instance, string value) - { - - var cmdToSemd = string.Format("{0} {1} {2}", cmd, instance, value); - - Parent.SendLine(cmdToSemd); - - } - - virtual public void ParseGetMessage(string attributeCode, string message) - { - } - - - - public virtual void SendSubscriptionCommand(string instanceTag, string changeGroup) - { - // Subscription string format: InstanceTag subscribe attributeCode Index1 customName responseRate - // Ex: "RoomLevel subscribe level 1 MyRoomLevel 500" - - string cmd; - - cmd = string.Format("cga {0} {1}", changeGroup, instanceTag); - - Parent.SendLine(cmd); - } - - - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QscDsp/QscDspDialer.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QscDsp/QscDspDialer.cs deleted file mode 100644 index 387dffe7..00000000 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QscDsp/QscDspDialer.cs +++ /dev/null @@ -1,270 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using Crestron.SimplSharp.Reflection; -using Crestron.SimplSharp; -using PepperDash.Essentials.Devices.Common.Codec; -using Crestron.SimplSharpPro.CrestronThread; - -namespace PepperDash.Essentials.Devices.Common.DSP -{ - public class QscDspDialer : DspDialerBase, IHasDialer - { - public QscDialerConfig Tags; - public bool IsInCall { get; private set; } - public QscDsp Parent { get; private set; } - public string DialString { get; private set; } - public bool OffHook { get; private set; } - public bool AutoAnswerState { get; private set; } - public bool DoNotDisturbState { get; private set; } - - public BoolFeedback OffHookFeedback; - public BoolFeedback AutoAnswerFeedback; - public BoolFeedback DoNotDisturbFeedback; - public StringFeedback DialStringFeedback; - - // Add requirements for Dialer functionality - - public QscDspDialer(QscDialerConfig Config, QscDsp parent) - { - Tags = Config; - Parent = parent; - DialStringFeedback = new StringFeedback(() => { return DialString; }); - OffHookFeedback = new BoolFeedback(() => { return OffHook; }); - AutoAnswerFeedback = new BoolFeedback(() => { return AutoAnswerState; }); - DoNotDisturbFeedback = new BoolFeedback(() => { return DoNotDisturbState; }); - } - - public event EventHandler CallStatusChange; - - public void Subscribe() - { - try - { - // Do subscriptions and blah blah - // This would be better using reflection JTA 2018-08-28 - PropertyInfo[] properties = Tags.GetType().GetCType().GetProperties(); - //GetPropertyValues(Tags); - - Debug.Console(2, "QscDspDialer Subscribe"); - foreach (var prop in properties) - { - //var val = prop.GetValue(obj, null); - - - Debug.Console(2, "Property {0}, {1}, {2}\n", prop.GetType().Name, prop.Name, prop.PropertyType.FullName); - if (prop.Name.Contains("Tag") && !prop.Name.Contains("keypad")) - { - var propValue = prop.GetValue(Tags, null) as string; - Debug.Console(2, "Property {0}, {1}, {2}\n", prop.GetType().Name, prop.Name, propValue); - SendSubscriptionCommand(propValue, "1"); - } - - - } - } - catch (Exception e) - { - - Debug.Console(2, "QscDspDialer Subscription Error: '{0}'\n", e); - } - - - // SendSubscriptionCommand(, "1"); - // SendSubscriptionCommand(config. , "mute", 500); - } - public void ParseSubscriptionMessage(string customName, string value) - { - - // Check for valid subscription response - Debug.Console(1, "QscDialerTag {0} Response: '{1}'", customName, value); - if (customName == Tags.dialStringTag) - { - Debug.Console(2, "QscDialerTag DialStringChanged ", value); - this.DialString = value; - this.DialStringFeedback.FireUpdate(); - } - else if (customName == Tags.doNotDisturbTag) - { - if (value == "on") - { - this.DoNotDisturbState = true; - } - else if (value == "off") - { - this.DoNotDisturbState = false; - } - DoNotDisturbFeedback.FireUpdate(); - } - else if (customName == Tags.callStatusTag) - { - if (value == "Dialing") - { - this.OffHook = true; - } - else if (value == "Disconnected") - { - this.OffHook = false; - if (Tags.ClearOnHangup) - { - this.SendKeypad(eKeypadKeys.Clear); - } - } - this.OffHookFeedback.FireUpdate(); - } - else if (customName == Tags.autoAnswerTag) - { - if (value == "on") - { - this.AutoAnswerState = true; - } - else if (value == "off") - { - this.AutoAnswerState = false; - } - AutoAnswerFeedback.FireUpdate(); - } - else if (customName == Tags.hookStatusTag) - { - if (value == "true") - { - this.OffHook = true; - } - else if (value == "false") - { - this.OffHook = false; - } - this.OffHookFeedback.FireUpdate(); - } - - - } - - public void DoNotDisturbToggle() - { - int dndStateInt = !DoNotDisturbState ? 1 : 0; - Parent.SendLine(string.Format("csv {0} {1}", Tags.doNotDisturbTag, dndStateInt)); - } - public void DoNotDisturbOn() - { - Parent.SendLine(string.Format("csv {0} 1", Tags.doNotDisturbTag)); - } - public void DoNotDisturbOff() - { - Parent.SendLine(string.Format("csv {0} 0", Tags.doNotDisturbTag)); - } - public void AutoAnswerToggle() - { - int autoAnswerStateInt = !AutoAnswerState ? 1 : 0; - Parent.SendLine(string.Format("csv {0} {1}", Tags.autoAnswerTag, autoAnswerStateInt)); - } - public void AutoAnswerOn() - { - Parent.SendLine(string.Format("csv {0} 1", Tags.autoAnswerTag)); - } - public void AutoAnswerOff() - { - Parent.SendLine(string.Format("csv {0} 0", Tags.autoAnswerTag)); - } - - private void PollKeypad() - { - Thread.Sleep(50); - Parent.SendLine(string.Format("cg {0}", Tags.dialStringTag)); - } - - public void SendKeypad(eKeypadKeys button) - { - string keypadTag = null; - switch (button) - { - case eKeypadKeys.Num0: keypadTag = Tags.keypad0Tag; break; - case eKeypadKeys.Num1: keypadTag = Tags.keypad1Tag; break; - case eKeypadKeys.Num2: keypadTag = Tags.keypad2Tag; break; - case eKeypadKeys.Num3: keypadTag = Tags.keypad3Tag; break; - case eKeypadKeys.Num4: keypadTag = Tags.keypad4Tag; break; - case eKeypadKeys.Num5: keypadTag = Tags.keypad5Tag; break; - case eKeypadKeys.Num6: keypadTag = Tags.keypad6Tag; break; - case eKeypadKeys.Num7: keypadTag = Tags.keypad7Tag; break; - case eKeypadKeys.Num8: keypadTag = Tags.keypad8Tag; break; - case eKeypadKeys.Num9: keypadTag = Tags.keypad9Tag; break; - case eKeypadKeys.Pound: keypadTag = Tags.keypadPoundTag; break; - case eKeypadKeys.Star: keypadTag = Tags.keypadStarTag; break; - case eKeypadKeys.Backspace: keypadTag = Tags.keypadBackspaceTag; break; - case eKeypadKeys.Clear: keypadTag = Tags.keypadClearTag; break; - } - if (keypadTag != null) - { - var cmdToSend = string.Format("ct {0}", keypadTag); - Parent.SendLine(cmdToSend); - PollKeypad(); - } - } - public void SendSubscriptionCommand(string instanceTag, string changeGroup) - { - // Subscription string format: InstanceTag subscribe attributeCode Index1 customName responseRate - // Ex: "RoomLevel subscribe level 1 MyRoomLevel 500" - - var cmd = string.Format("cga {0} {1}", changeGroup, instanceTag); - - Parent.SendLine(cmd); - } - public void Dial() - { - if (!this.OffHook) - { - Parent.SendLine(string.Format("ct {0}", Tags.connectTag)); - } - else - { - Parent.SendLine(string.Format("ct {0}", Tags.disconnectTag)); - } - Thread.Sleep(50); - Parent.SendLine(string.Format("cg {0}", Tags.callStatusTag)); - } - public void Dial(string number) - { - } - public void EndCall(CodecActiveCallItem activeCall) - { - } - public void EndAllCalls() - { - } - public void AcceptCall(CodecActiveCallItem item) - { - } - - public void RejectCall(CodecActiveCallItem item) - { - - } - - public void SendDtmf(string digit) - { - - } - - public enum eKeypadKeys - { - Num1, - Num2, - Num3, - Num4, - Num5, - Num6, - Num7, - Num8, - Num9, - Num0, - Star, - Pound, - Clear, - Backspace - } - - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QscDsp/QscDspLevelControl.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QscDsp/QscDspLevelControl.cs deleted file mode 100644 index 498127f5..00000000 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QscDsp/QscDspLevelControl.cs +++ /dev/null @@ -1,307 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using System.Text.RegularExpressions; - - -namespace PepperDash.Essentials.Devices.Common.DSP -{ - public class QscDspLevelControl : QscDspControlPoint, IBasicVolumeWithFeedback, IKeyed - { - bool _IsMuted; - ushort _VolumeLevel; - - public BoolFeedback MuteFeedback { get; private set; } - - public IntFeedback VolumeLevelFeedback { get; private set; } - - public bool Enabled { get; set; } - public ePdtLevelTypes Type; - CTimer VolumeUpRepeatTimer; - CTimer VolumeDownRepeatTimer; - - /// - /// Used for to identify level subscription values - /// - public string LevelCustomName { get; private set; } - - /// - /// Used for to identify mute subscription values - /// - public string MuteCustomName { get; private set; } - - /// - /// Minimum fader level - /// - double MinLevel; - - /// - /// Maximum fader level - /// - double MaxLevel; - - /// - /// Checks if a valid subscription string has been recieved for all subscriptions - /// - public bool IsSubsribed - { - get - { - bool isSubscribed = false; - - if (HasMute && MuteIsSubscribed) - isSubscribed = true; - - if (HasLevel && LevelIsSubscribed) - isSubscribed = true; - - return isSubscribed; - } - } - - public bool AutomaticUnmuteOnVolumeUp { get; private set; } - - public bool HasMute { get; private set; } - - public bool HasLevel { get; private set; } - - bool MuteIsSubscribed; - - bool LevelIsSubscribed; - - //public TesiraForteLevelControl(string label, string id, int index1, int index2, bool hasMute, bool hasLevel, BiampTesiraForteDsp parent) - // : base(id, index1, index2, parent) - //{ - // Initialize(label, hasMute, hasLevel); - //} - - public QscDspLevelControl(string key, QscDspLevelControlBlockConfig config, QscDsp parent) - : base(config.LevelInstanceTag, config.MuteInstanceTag, parent) - { - if (!config.Disabled) - { - Initialize(key, config); - } - } - - - /// - /// Initializes this attribute based on config values and generates subscriptions commands and adds commands to the parent's queue. - /// - public void Initialize(string key, QscDspLevelControlBlockConfig config) - { - Key = string.Format("{0}--{1}", Parent.Key, key); - Enabled = true; - DeviceManager.AddDevice(this); - if (config.IsMic) - { - Type = ePdtLevelTypes.microphone; - } - else - { - Type = ePdtLevelTypes.speaker; - } - - Debug.Console(2, this, "Adding LevelControl '{0}'", Key); - - this.IsSubscribed = false; - - MuteFeedback = new BoolFeedback(() => _IsMuted); - - VolumeLevelFeedback = new IntFeedback(() => _VolumeLevel); - - VolumeUpRepeatTimer = new CTimer(VolumeUpRepeat, Timeout.Infinite); - VolumeDownRepeatTimer = new CTimer(VolumeDownRepeat, Timeout.Infinite); - LevelCustomName = config.Label; - HasMute = config.HasMute; - HasLevel = config.HasLevel; - } - - public void Subscribe() - { - // Do subscriptions and blah blah - - // Subscribe to mute - if (this.HasMute) - { - - SendSubscriptionCommand(this.MuteInstanceTag, "1"); - // SendSubscriptionCommand(config. , "mute", 500); - } - - // Subscribe to level - if (this.HasLevel) - { - - SendSubscriptionCommand(this.LevelInstanceTag, "1"); - // SendSubscriptionCommand(this.con, "level", 250); - - //SendFullCommand("get", "minLevel", null); - - //SendFullCommand("get", "maxLevel", null); - } - } - - - /// - /// Parses the response from the DspBase - /// - /// - /// - public void ParseSubscriptionMessage(string customName, string value) - { - - // Check for valid subscription response - Debug.Console(1, this, "Level {0} Response: '{1}'", customName, value); - if (customName == MuteInstanceTag) - { - if (value == "muted") - { - _IsMuted = true; - MuteIsSubscribed = true; - - } - else if (value == "unmuted") - { - _IsMuted = false; - MuteIsSubscribed = true; - } - - MuteFeedback.FireUpdate(); - } - else if (customName == LevelInstanceTag) - { - - - var _value = Double.Parse(value); - - _VolumeLevel = (ushort)(_value * 65535); - Debug.Console(1, this, "Level {0} VolumeLevel: '{1}'", customName, _VolumeLevel); - LevelIsSubscribed = true; - - VolumeLevelFeedback.FireUpdate(); - } - - } - - - /// - /// Turns the mute off - /// - public void MuteOff() - { - SendFullCommand("csv", this.MuteInstanceTag, "0"); - } - - /// - /// Turns the mute on - /// - public void MuteOn() - { - SendFullCommand("csv", this.MuteInstanceTag, "1"); - } - - /// - /// Sets the volume to a specified level - /// - /// - public void SetVolume(ushort level) - { - Debug.Console(1, this, "volume: {0}", level); - // Unmute volume if new level is higher than existing - if (AutomaticUnmuteOnVolumeUp && _IsMuted) - { - MuteOff(); - } - double newLevel = Scale(level); - Debug.Console(1, this, "newVolume: {0}", newLevel); - SendFullCommand("csp", this.LevelInstanceTag, string.Format("{0}", newLevel)); - } - - /// - /// Toggles mute status - /// - public void MuteToggle() - { - - if (_IsMuted) - { - SendFullCommand("csv", this.MuteInstanceTag, "0"); - } - else - { - SendFullCommand("csv", this.MuteInstanceTag, "1"); - } - - } - - public void VolumeUpRepeat(object callbackObject) - { - this.VolumeUp(true); - } - public void VolumeDownRepeat(object callbackObject) - { - this.VolumeDown(true); - } - - public void VolumeDown(bool press) - { - - - if (press) - { - VolumeDownRepeatTimer.Reset(100); - SendFullCommand("css ", this.LevelInstanceTag, "--"); - - - } - else - { - VolumeDownRepeatTimer.Stop(); - // VolumeDownRepeatTimer.Dispose(); - } - } - - /// - /// Increments volume level - /// - /// - public void VolumeUp(bool press) - { - if (press) - { - VolumeUpRepeatTimer.Reset(100); - SendFullCommand("css ", this.LevelInstanceTag, "++"); - - if (AutomaticUnmuteOnVolumeUp) - if (!_IsMuted) - MuteOff(); - } - else - { - VolumeUpRepeatTimer.Stop(); - } - } - /// - double Scale(double input) - { - Debug.Console(1, this, "Scaling (double) input '{0}'",input ); - - var output = (input / 65535); - - Debug.Console(1, this, "Scaled output '{0}'", output); - - return output; - } - } - public enum ePdtLevelTypes - { - speaker = 0, - microphone = 1 - } - -} \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QscDsp/QscDspPropertiesConfig.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QscDsp/QscDspPropertiesConfig.cs deleted file mode 100644 index 9eab3e84..00000000 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/QscDsp/QscDspPropertiesConfig.cs +++ /dev/null @@ -1,88 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -using PepperDash.Core; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Devices.Common.DSP -{ - /// - /// - /// - public class QscDspPropertiesConfig - { - public CommunicationMonitorConfig CommunicationMonitorProperties { get; set; } - - public ControlPropertiesConfig Control { get; set; } - - /// - /// These are key-value pairs, string id, string type. - /// Valid types are level and mute. - /// Need to include the index values somehow - /// - public Dictionary LevelControlBlocks { get; set; } - public Dictionary dialerControlBlocks { get; set; } - public Dictionary presets { get; set; } - // public Dictionary DialerControlBlocks {get; set;} - } - public interface IQscDspBasicLevel : IBasicVolumeWithFeedback - { - /// - /// In BiAmp: Instance Tag, QSC: Named Control, Polycom: - /// - string LevelInstanceTag { get; set; } - string MuteInstanceTag { get; set; } - bool HasMute { get; } - bool HasLevel { get; } - bool AutomaticUnmuteOnVolumeUp { get; } - } - public class QscDspLevelControlBlockConfig - { - public bool Disabled { get; set; } - public string Label { get; set; } - public string LevelInstanceTag { get; set; } - public string MuteInstanceTag { get; set; } - public bool HasMute { get; set; } - public bool HasLevel { get; set; } - public bool IsMic { get; set; } - } - - public class QscDialerConfig - { - public string incomingCallRingerTag {get; set;} - public string dialStringTag {get; set;} - public string disconnectTag {get; set;} - public string connectTag {get; set;} - public string callStatusTag {get; set;} - public string hookStatusTag {get; set;} - public string doNotDisturbTag { get; set; } - public string autoAnswerTag { get; set; } - - public string keypadBackspaceTag {get; set;} - public string keypadClearTag {get; set;} - public string keypad1Tag {get; set;} - public string keypad2Tag {get; set;} - public string keypad3Tag {get; set;} - public string keypad4Tag {get; set;} - public string keypad5Tag {get; set;} - public string keypad6Tag {get; set;} - public string keypad7Tag {get; set;} - public string keypad8Tag {get; set;} - public string keypad9Tag {get; set;} - public string keypad0Tag {get; set;} - public string keypadPoundTag {get; set;} - public string keypadStarTag {get; set;} - - public bool ClearOnHangup { get; set; } - - } - - public class QscDspPresets - { - public string label { get; set; } - public string preset { get; set; } - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj deleted file mode 100644 index 8ea74165..00000000 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj +++ /dev/null @@ -1,214 +0,0 @@ - - - Release - AnyCPU - 9.0.30729 - 2.0 - {892B761C-E479-44CE-BD74-243E9214AF13} - Library - Properties - PepperDash.Essentials.Devices.Common - Essentials Devices Common - {0B4745B0-194B-4BB6-8E21-E9057CA92300};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - WindowsCE - E2BECB1F-8C8C-41ba-B736-9BE7D946A398 - 5.0 - SmartDeviceProject1 - v3.5 - Windows CE - - - - - .allowedReferenceRelatedFileExtensions - true - full - false - bin\ - DEBUG;TRACE; - prompt - 4 - 512 - true - true - off - - - .allowedReferenceRelatedFileExtensions - none - true - bin\ - prompt - 4 - 512 - true - true - off - - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Gateways.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.GeneralIO.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Lighting.dll - - - - False - ..\..\..\packages\PepperDashCore\lib\net35\PepperDash_Core.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll - False - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll - False - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe - False - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} - PepperDash_Essentials_Core - - - {E51D7C84-4906-486C-B2BA-EEB3B4E9731B} - PepperDash_Essentials_Interfaces - - - - - - - - - rem S# Pro preparation will execute after these operations - - \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/ImageProcessors/TVOneCorio.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/ImageProcessors/TVOneCorio.cs deleted file mode 100644 index 4bcbf340..00000000 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/ImageProcessors/TVOneCorio.cs +++ /dev/null @@ -1,254 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; -using System.Text.RegularExpressions; - - -namespace PepperDash.Essentials.Devices.Common -{ - - public class TVOneCorio : EssentialsDevice - { - public IBasicCommunication Communication { get; private set; } - public CommunicationGather PortGather { get; private set; } - public StatusMonitorBase CommunicationMonitor { get; private set; } - public string userName; - public string password; - private bool OnlineStatus; - public BoolFeedback OnlineFeedback; - private ushort CurrentPreset; - public IntFeedback PresetFeedback; - - // new public Dictionary LevelControlPoints { get; private set; } - // public List PresetList = new List(); - - public bool isSubscribed; - - private CTimer SubscriptionTimer; - - CrestronQueue CommandQueue; - - bool CommandQueueInProgress = false; - - //new public Dictionary DialerControlPoints { get; private set; } - - //new public Dictionary SwitcherControlPoints { get; private set; } - - /// - /// Shows received lines as hex - /// - public bool ShowHexResponse { get; set; } - - public TVOneCorio(string key, string name, IBasicCommunication comm, TVOneCorioPropertiesConfig props) : - base(key, name) - { - - this.userName = props.userName; - this.password = props.password; - CommandQueue = new CrestronQueue(100); - - - Communication = comm; - - var socket = comm as ISocketStatus; - if (socket != null) - { - // This instance uses IP control - socket.ConnectionChange += new EventHandler(socket_ConnectionChange); - } - else - { - // This instance uses RS-232 control - } - PortGather = new CommunicationGather(Communication, "\x0a"); - PortGather.LineReceived += this.Port_LineReceived; - if (props.CommunicationMonitorProperties != null) - { - CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, props.CommunicationMonitorProperties); - } - else - { - //#warning Need to deal with this poll string - CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 120000, 120000, 300000, "System.Status\x0A\x0D"); - } - - } - - public override bool CustomActivate() - { - - Communication.Connect(); - CommunicationMonitor.StatusChange += (o, a) => { Debug.Console(2, this, "Communication monitor state: {0}", CommunicationMonitor.Status); }; - CommunicationMonitor.Start(); - - OnlineFeedback = new BoolFeedback(() => { return OnlineStatus; }); - PresetFeedback = new IntFeedback(() => { return CurrentPreset; }); - - CrestronConsole.AddNewConsoleCommand(SendLine, "send" + Key, "", ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(s => Communication.Connect(), "con" + Key, "", ConsoleAccessLevelEnum.AccessOperator); - return true; - } - - void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e) - { - Debug.Console(2, this, "Socket Status Change: {0}", e.Client.ClientStatus.ToString()); - - if (e.Client.IsConnected) - { - OnlineStatus = true; - OnlineFeedback.FireUpdate(); - } - else - { - OnlineStatus = false; - OnlineFeedback.FireUpdate(); - if (SubscriptionTimer != null) - { - SubscriptionTimer.Stop(); - SubscriptionTimer = null; - } - - isSubscribed = false; - CommandQueue.Clear(); - CommandQueueInProgress = false; - } - } - - /// - /// Initiates the subscription process to the DSP - /// - - - - - /// - /// Handles a response message from the DSP - /// - /// - /// - void Port_LineReceived(object dev, GenericCommMethodReceiveTextArgs args) - { - try - { - if (args.Text.IndexOf("login") > -1) - { - SendLine(string.Format("Login({0},{1})", this.userName, this.password)); - } - else if (args.Text.IndexOf("!Done Preset.Take =") > -1) - { - - string presetNumberParse = args.Text.Remove(0, args.Text.IndexOf("=") + 2); - - Debug.Console(1, this, "Preset Parse: {0}", presetNumberParse); - CurrentPreset = ushort.Parse(presetNumberParse); - PresetFeedback.FireUpdate(); - } - } - catch (Exception e) - { - if (Debug.Level == 2) - Debug.Console(2, this, "Error parsing response: '{0}'\n{1}", args.Text, e); - } - - } - - /// - /// Sends a command to the DSP (with delimiter appended) - /// - /// Command to send - public void SendLine(string s) - { - Communication.SendText(s + "\x0d\x0a"); - } - - /// - /// Adds a command from a child module to the queue - /// - /// Command object from child module - public void EnqueueCommand(QueuedCommand commandToEnqueue) - { - CommandQueue.Enqueue(commandToEnqueue); - //Debug.Console(1, this, "Command (QueuedCommand) Enqueued '{0}'. CommandQueue has '{1}' Elements.", commandToEnqueue.Command, CommandQueue.Count); - - if(!CommandQueueInProgress) - SendNextQueuedCommand(); - } - - /// - /// Adds a raw string command to the queue - /// - /// - public void EnqueueCommand(string command) - { - CommandQueue.Enqueue(command); - //Debug.Console(1, this, "Command (string) Enqueued '{0}'. CommandQueue has '{1}' Elements.", command, CommandQueue.Count); - - if (!CommandQueueInProgress) - SendNextQueuedCommand(); - } - - /// - /// Sends the next queued command to the DSP - /// - void SendNextQueuedCommand() - { - if (Communication.IsConnected && !CommandQueue.IsEmpty) - { - CommandQueueInProgress = true; - - if (CommandQueue.Peek() is QueuedCommand) - { - QueuedCommand nextCommand = new QueuedCommand(); - - nextCommand = (QueuedCommand)CommandQueue.Peek(); - - SendLine(nextCommand.Command); - } - else - { - string nextCommand = (string)CommandQueue.Peek(); - - SendLine(nextCommand); - } - } - - } - - - public void CallPreset(ushort presetNumber) - { - SendLine(string.Format("Preset.Take = {0}", presetNumber)); - // SendLine("cgp 1"); - } - - public class QueuedCommand - { - public string Command { get; set; } - public string AttributeCode { get; set; } - // public QscDspControlPoint ControlPoint { get; set; } - } - } - - public class TVOneCorioFactory : EssentialsDeviceFactory - { - public TVOneCorioFactory() - { - TypeNames = new List() { "tvonecorio" }; - } - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - Debug.Console(1, "Factory Attempting to create new TVOneCorio Device"); - var comm = CommFactory.CreateCommForDevice(dc); - var props = Newtonsoft.Json.JsonConvert.DeserializeObject( - dc.Properties.ToString()); - return new TVOneCorio(dc.Key, dc.Name, comm, props); - } - } - -} \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/ImageProcessors/TVOneCorioPropertiesConfig.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/ImageProcessors/TVOneCorioPropertiesConfig.cs deleted file mode 100644 index 410fdb27..00000000 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/ImageProcessors/TVOneCorioPropertiesConfig.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -using PepperDash.Core; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Devices.Common -{ - /// - /// - /// - public class TVOneCorioPropertiesConfig - { - public CommunicationMonitorConfig CommunicationMonitorProperties { get; set; } - - public ControlPropertiesConfig Control { get; set; } - public string userName { get; set; } - public string password { get; set; } - } - -} \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Properties/AssemblyInfo.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Properties/AssemblyInfo.cs deleted file mode 100644 index ccea4891..00000000 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Reflection; -using Crestron.SimplSharp.Reflection; - -[assembly: System.Reflection.AssemblyTitle("Essentials_Devices_Common")] -[assembly: System.Reflection.AssemblyCompany("PepperDash Technology Corp")] -[assembly: System.Reflection.AssemblyProduct("PepperDashEssentials")] -[assembly: System.Reflection.AssemblyCopyright("Copyright © PepperDash Technology Corp 2020")] -[assembly: System.Reflection.AssemblyVersion("0.0.0.*")] -[assembly: System.Reflection.AssemblyInformationalVersion("0.0.0-buildType-buildNumber")] -[assembly: Crestron.SimplSharp.Reflection.AssemblyInformationalVersion("0.0.0-buildType-buildNumber")] \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Properties/ControlSystem.cfg b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Properties/ControlSystem.cfg deleted file mode 100644 index e69de29b..00000000 diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoCodec.cs.orig b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoCodec.cs.orig deleted file mode 100644 index 3abc8d01..00000000 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoCodec.cs.orig +++ /dev/null @@ -1,1359 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharp.Net.Https; -using Crestron.SimplSharp.CrestronXml; -using Crestron.SimplSharp.CrestronXml.Serialization; -using Newtonsoft.Json; -<<<<<<< HEAD -//using Cisco_One_Button_To_Push; -//using Cisco_SX80_Corporate_Phone_Book; -======= ->>>>>>> origin/feature/ecs-342 - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Routing; -using PepperDash.Essentials.Devices.Common.Codec; -using PepperDash.Essentials.Devices.Common.Occupancy; -using PepperDash.Essentials.Devices.Common.VideoCodec; - -namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco -{ - enum eCommandType { SessionStart, SessionEnd, Command, GetStatus, GetConfiguration }; - - public class CiscoCodec : VideoCodecBase, IHasCallHistory, IHasCallFavorites, IHasDirectory, IHasScheduleAwareness, IOccupancyStatusProvider, IHasCodecLayouts, IHasCodecSelfview - { - public event EventHandler DirectoryResultReturned; - - public IBasicCommunication Communication { get; private set; } - public CommunicationGather PortGather { get; private set; } - public CommunicationGather JsonGather { get; private set; } - - public StatusMonitorBase CommunicationMonitor { get; private set; } - - public BoolFeedback StandbyIsOnFeedback { get; private set; } - - public BoolFeedback RoomIsOccupiedFeedback { get; private set; } - - public IntFeedback PeopleCountFeedback { get; private set; } - - public BoolFeedback SpeakerTrackIsOnFeedback { get; private set; } - - public BoolFeedback SelfviewIsOnFeedback { get; private set; } - - public StringFeedback SelfviewPipPositionFeedback { get; private set; } - - public StringFeedback LocalLayoutFeedback { get; private set; } - - private CodecCommandWithLabel CurrentSelfviewPipPosition; - - private CodecCommandWithLabel CurrentLocalLayout; - - /// - /// List the available positions for the selfview PIP window - /// - public List SelfviewPipPositions = new List() - { - new CodecCommandWithLabel("CenterLeft", "Center Left"), - new CodecCommandWithLabel("CenterRight", "Center Right"), - new CodecCommandWithLabel("LowerLeft", "Lower Left"), - new CodecCommandWithLabel("LowerRight", "Lower Right"), - new CodecCommandWithLabel("UpperCenter", "Upper Center"), - new CodecCommandWithLabel("UpperLeft", "Upper Left"), - new CodecCommandWithLabel("UpperRight", "Upper Right"), - }; - - /// - /// Lists the available options for local layout - /// - public List LocalLayouts = new List() - { - new CodecCommandWithLabel("auto", "Auto"), - //new CiscoCodecLocalLayout("custom", "Custom"), // Left out for now - new CodecCommandWithLabel("equal","Equal"), - new CodecCommandWithLabel("overlay","Overlay"), - new CodecCommandWithLabel("prominent","Prominent"), - new CodecCommandWithLabel("single","Single") - }; - - private CiscoCodecConfiguration.RootObject CodecConfiguration; - - private CiscoCodecStatus.RootObject CodecStatus; - - public CodecCallHistory CallHistory { get; private set; } - - public CodecCallFavorites CallFavorites { get; private set; } - - public CodecDirectory DirectoryRoot { get; private set; } - - public CodecScheduleAwareness CodecSchedule { get; private set; } - - /// - /// Gets and returns the scaled volume of the codec - /// - protected override Func VolumeLevelFeedbackFunc - { - get - { - return () => CrestronEnvironment.ScaleWithLimits(CodecStatus.Status.Audio.Volume.IntValue, 100, 0, 65535, 0); - } - } - - protected override Func PrivacyModeIsOnFeedbackFunc - { - get - { - return () => CodecStatus.Status.Audio.Microphones.Mute.BoolValue; - } - } - - protected Func StandbyStateFeedbackFunc - { - get - { - return () => CodecStatus.Status.Standby.State.BoolValue; - } - } - - /// - /// Gets the value of the currently shared source, or returns null - /// - protected override Func SharingSourceFeedbackFunc - { -#warning verify that source feedback to room works from codec - get - { - return () => PresentationSourceKey; - } - } - - protected override Func MuteFeedbackFunc - { - get - { - return () => CodecStatus.Status.Audio.VolumeMute.BoolValue; - } - } - - protected Func RoomIsOccupiedFeedbackFunc - { - get - { - return () => CodecStatus.Status.RoomAnalytics.PeoplePresence.BoolValue; - } - } - - protected Func PeopleCountFeedbackFunc - { - get - { - return () => CodecStatus.Status.RoomAnalytics.PeopleCount.Current.IntValue; - } - } - - protected Func SpeakerTrackIsOnFeedbackFunc - { - get - { - return () => CodecStatus.Status.Cameras.SpeakerTrack.Status.BoolValue; - } - } - - protected Func SelfViewIsOnFeedbackFunc - { - get - { - return () => CodecStatus.Status.Video.Selfview.Mode.BoolValue; - } - } - - protected Func SelfviewPipPositionFeedbackFunc - { - get - { - return () => CurrentSelfviewPipPosition.Label; - } - } - - protected Func LocalLayoutFeedbackFunc - { - get - { - return () => CurrentLocalLayout.Label; - } - } - - private string CliFeedbackRegistrationExpression; - - private CodecSyncState SyncState; - - private CodecPhonebookSyncState PhonebookSyncState; - - private StringBuilder JsonMessage; - - private bool JsonFeedbackMessageIsIncoming; - - public bool CommDebuggingIsOn; - - string Delimiter = "\r\n"; - - int PresentationSource; - - string PresentationSourceKey; - - string PhonebookMode = "Local"; // Default to Local - - int PhonebookResultsLimit = 255; // Could be set later by config. - - CTimer LoginMessageReceived; - - public RoutingInputPort CodecOsdIn { get; private set; } - public RoutingInputPort HdmiIn1 { get; private set; } - public RoutingInputPort HdmiIn2 { get; private set; } - public RoutingOutputPort HdmiOut { get; private set; } - - // Constructor for IBasicCommunication - public CiscoCodec(string key, string name, IBasicCommunication comm, CiscoCodecPropertiesConfig props ) - : base(key, name) - { - StandbyIsOnFeedback = new BoolFeedback(StandbyStateFeedbackFunc); - RoomIsOccupiedFeedback = new BoolFeedback(RoomIsOccupiedFeedbackFunc); - PeopleCountFeedback = new IntFeedback(PeopleCountFeedbackFunc); - SpeakerTrackIsOnFeedback = new BoolFeedback(SpeakerTrackIsOnFeedbackFunc); - SelfviewIsOnFeedback = new BoolFeedback(SelfViewIsOnFeedbackFunc); - SelfviewPipPositionFeedback = new StringFeedback(SelfviewPipPositionFeedbackFunc); - LocalLayoutFeedback = new StringFeedback(LocalLayoutFeedbackFunc); - - Communication = comm; - - LoginMessageReceived = new CTimer(DisconnectClientAndReconnect, 5000); - - if (props.CommunicationMonitorProperties != null) - { - CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, props.CommunicationMonitorProperties); - } - else - { - CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 30000, 120000, 300000, "xStatus SystemUnit Software Version\r"); - } - - DeviceManager.AddDevice(CommunicationMonitor); - - PhonebookMode = props.PhonebookMode; - - SyncState = new CodecSyncState(key + "--Sync"); - - PhonebookSyncState = new CodecPhonebookSyncState(key + "--PhonebookSync"); - - SyncState.InitialSyncCompleted += new EventHandler(SyncState_InitialSyncCompleted); - - PortGather = new CommunicationGather(Communication, Delimiter); - PortGather.IncludeDelimiter = true; - PortGather.LineReceived += this.Port_LineReceived; - - //CodecObtp = new CiscoOneButtonToPush(); - - //PhoneBook = new Corporate_Phone_Book(); - - CodecConfiguration = new CiscoCodecConfiguration.RootObject(); - CodecStatus = new CiscoCodecStatus.RootObject(); - - CodecInfo = new CiscoCodecInfo(CodecStatus, CodecConfiguration); - - CallHistory = new CodecCallHistory(); - - if (props.Favorites != null) - { - CallFavorites = new CodecCallFavorites(); - CallFavorites.Favorites = props.Favorites; - } - - DirectoryRoot = new CodecDirectory(); - - CodecSchedule = new CodecScheduleAwareness(); - - //Set Feedback Actions - CodecStatus.Status.Audio.Volume.ValueChangedAction = VolumeLevelFeedback.FireUpdate; - CodecStatus.Status.Audio.VolumeMute.ValueChangedAction = MuteFeedback.FireUpdate; - CodecStatus.Status.Audio.Microphones.Mute.ValueChangedAction = PrivacyModeIsOnFeedback.FireUpdate; - CodecStatus.Status.Standby.State.ValueChangedAction = StandbyIsOnFeedback.FireUpdate; - CodecStatus.Status.RoomAnalytics.PeoplePresence.ValueChangedAction = RoomIsOccupiedFeedback.FireUpdate; - CodecStatus.Status.RoomAnalytics.PeopleCount.Current.ValueChangedAction = PeopleCountFeedback.FireUpdate; - CodecStatus.Status.Cameras.SpeakerTrack.Status.ValueChangedAction = SpeakerTrackIsOnFeedback.FireUpdate; - CodecStatus.Status.Video.Selfview.Mode.ValueChangedAction = SelfviewIsOnFeedback.FireUpdate; - CodecStatus.Status.Video.Selfview.PIPPosition.ValueChangedAction = ComputeSelfviewPipStatus; - CodecStatus.Status.Video.Layout.LayoutFamily.Local.ValueChangedAction = ComputeLocalLayout; - } - - /// - /// Starts the HTTP feedback server and syncronizes state of codec - /// - /// - public override bool CustomActivate() - { - CrestronConsole.AddNewConsoleCommand(SendText, "send" + Key, "", ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(SetCommDebug, "SetCodecCommDebug", "0 for Off, 1 for on", ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(GetPhonebook, "GetCodecPhonebook", "Triggers a refresh of the codec phonebook", ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(GetBookings, "GetCodecBookings", "Triggers a refresh of the booking data for today", ConsoleAccessLevelEnum.AccessOperator); - - //CommDebuggingIsOn = true; - Communication.Connect(); - var socket = Communication as ISocketStatus; - if (socket != null) - { - socket.ConnectionChange += new EventHandler(socket_ConnectionChange); - } - - CommunicationMonitor.Start(); - - CodecOsdIn = new RoutingInputPort(RoutingPortNames.CodecOsd, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, new Action(StopSharing), this); - HdmiIn1 = new RoutingInputPort(RoutingPortNames.HdmiIn1, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, new Action(SelectPresentationSource1), this); - HdmiIn2 = new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, new Action(SelectPresentationSource2), this); - - HdmiOut = new RoutingOutputPort(RoutingPortNames.HdmiOut, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, null, this); - - InputPorts.Add(CodecOsdIn); - InputPorts.Add(HdmiIn1); - InputPorts.Add(HdmiIn2); - OutputPorts.Add(HdmiOut); - - - string prefix = "xFeedback register "; - - CliFeedbackRegistrationExpression = - prefix + "/Configuration" + Delimiter + - prefix + "/Status/Audio" + Delimiter + - prefix + "/Status/Call" + Delimiter + - prefix + "/Status/Conference/Presentation" + Delimiter + - prefix + "/Status/Cameras/SpeakerTrack" + Delimiter + - prefix + "/Status/RoomAnalytics" + Delimiter + - prefix + "/Status/Standby" + Delimiter + - prefix + "/Status/Video/Selfview" + Delimiter + - prefix + "/Bookings" + Delimiter + - prefix + "/Event/CallDisconnect" + Delimiter; - - return base.CustomActivate(); - } - - /// - /// Fires when initial codec sync is completed. Used to then send commands to get call history, phonebook, bookings, etc. - /// - /// - /// - void SyncState_InitialSyncCompleted(object sender, EventArgs e) - { - // Fire the ready event - SetIsReady(); - //CommDebuggingIsOn = false; - - GetCallHistory(); - - GetPhonebook(null); - - GetBookings(null); - } - - public void SetCommDebug(string s) - { - if (s == "1") - { - CommDebuggingIsOn = true; - Debug.Console(0, this, "Comm Debug Enabled."); - } - else - { - CommDebuggingIsOn = false; - Debug.Console(0, this, "Comm Debug Disabled."); - } - } - - void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e) - { - if (e.Client.IsConnected) - { - //LoginMessageReceived.Reset(); - } - else - { - SyncState.CodecDisconnected(); - PhonebookSyncState.CodecDisconnected(); - } - } - - void DisconnectClientAndReconnect(object o) - { - Debug.Console(0, this, "Disconnecting and Reconnecting to codec."); - - Communication.Disconnect(); - - CrestronEnvironment.Sleep(2000); - - Communication.Connect(); - } - - /// - /// Gathers responses from the codec (including the delimiter. Responses are checked to see if they contain JSON data and if so, the data is collected until a complete JSON - /// message is received before forwarding the message to be deserialized. - /// - /// - /// - void Port_LineReceived(object dev, GenericCommMethodReceiveTextArgs args) - { - if (CommDebuggingIsOn) - { - if(!JsonFeedbackMessageIsIncoming) - Debug.Console(1, this, "RX: '{0}'", args.Text); - } - - if (args.Text == "{" + Delimiter) // Check for the beginning of a new JSON message - { - JsonFeedbackMessageIsIncoming = true; - - if (CommDebuggingIsOn) - Debug.Console(1, this, "Incoming JSON message..."); - - JsonMessage = new StringBuilder(); - } - else if (args.Text == "}" + Delimiter) // Check for the end of a JSON message - { - JsonFeedbackMessageIsIncoming = false; - - JsonMessage.Append(args.Text); - - if (CommDebuggingIsOn) - Debug.Console(1, this, "Complete JSON Received:\n{0}", JsonMessage.ToString()); - - // Forward the complete message to be deserialized - DeserializeResponse(JsonMessage.ToString()); - return; - } - - if(JsonFeedbackMessageIsIncoming) - { - JsonMessage.Append(args.Text); - - //Debug.Console(1, this, "Building JSON:\n{0}", JsonMessage.ToString()); - return; - } - - if (!SyncState.InitialSyncComplete) - { - switch (args.Text.Trim().ToLower()) // remove the whitespace - { - case "*r login successful": - { - LoginMessageReceived.Stop(); - SendText("xPreferences outputmode json"); - break; - } - case "xpreferences outputmode json": - { - if (!SyncState.InitialStatusMessageWasReceived) - SendText("xStatus"); - break; - } - case "xfeedback register /event/calldisconnect": - { - SyncState.FeedbackRegistered(); - break; - } - } - } - - } - - public void SendText(string command) - { - if (CommDebuggingIsOn) - Debug.Console(1, this, "Sending: '{0}'", command); - - Communication.SendText(command + Delimiter); - } - - void DeserializeResponse(string response) - { - try - { - // Serializer settings. We want to ignore null values and mising members - JsonSerializerSettings settings = new JsonSerializerSettings(); - settings.NullValueHandling = NullValueHandling.Ignore; - settings.MissingMemberHandling = MissingMemberHandling.Ignore; - settings.ObjectCreationHandling = ObjectCreationHandling.Auto; - - if (response.IndexOf("\"Status\":{") > -1) - { - // Status Message - - // Temp object so we can inpsect for call data before simply deserializing - CiscoCodecStatus.RootObject tempCodecStatus = new CiscoCodecStatus.RootObject(); - - JsonConvert.PopulateObject(response, tempCodecStatus); - - // Check to see if this is a call status message received after the initial status message - if (tempCodecStatus.Status.Call.Count > 0) - { - // Iterate through the call objects in the response - foreach (CiscoCodecStatus.Call call in tempCodecStatus.Status.Call) - { - var tempActiveCall = ActiveCalls.FirstOrDefault(c => c.Id.Equals(call.id)); - - if (tempActiveCall != null) - { - bool changeDetected = false; - - // Update properties of ActiveCallItem - if(call.Status != null) - if (!string.IsNullOrEmpty(call.Status.Value)) - { - eCodecCallStatus newStatus = eCodecCallStatus.Unknown; - - newStatus = CodecCallStatus.ConvertToStatusEnum(call.Status.Value); - - if (newStatus != eCodecCallStatus.Unknown) - { - changeDetected = true; - SetNewCallStatusAndFireCallStatusChange(newStatus, tempActiveCall); - } - - if (newStatus == eCodecCallStatus.Connected) - GetCallHistory(); - } - if (call.CallType != null) - if (!string.IsNullOrEmpty(call.CallType.Value)) - { - tempActiveCall.Type = CodecCallType.ConvertToTypeEnum(call.CallType.Value); - changeDetected = true; - } - if (call.DisplayName != null) - if (!string.IsNullOrEmpty(call.DisplayName.Value)) - { - tempActiveCall.Name = call.DisplayName.Value; - changeDetected = true; - } - if (call.Direction != null) - { - if (!string.IsNullOrEmpty(call.Direction.Value)) - { - tempActiveCall.Direction = CodecCallDirection.ConvertToDirectionEnum(call.Direction.Value); - changeDetected = true; - } - } - - if (changeDetected) - { - ListCalls(); - } - } - else if( call.ghost == null ) // if the ghost value is present the call has ended already - { - // Create a new call item - var newCallItem = new CodecActiveCallItem() - { - Id = call.id, - Status = CodecCallStatus.ConvertToStatusEnum(call.Status.Value), - Name = call.DisplayName.Value, - Number = call.RemoteNumber.Value, - Type = CodecCallType.ConvertToTypeEnum(call.CallType.Value), - Direction = CodecCallDirection.ConvertToDirectionEnum(call.Direction.Value) - }; - - // Add it to the ActiveCalls List - ActiveCalls.Add(newCallItem); - - ListCalls(); - - SetNewCallStatusAndFireCallStatusChange(newCallItem.Status, newCallItem); - } - - } - - } - - JsonConvert.PopulateObject(response, CodecStatus); - - if (!SyncState.InitialStatusMessageWasReceived) - { - SyncState.InitialStatusMessageReceived(); - - if (!SyncState.InitialConfigurationMessageWasReceived) - SendText("xConfiguration"); - } - } - else if (response.IndexOf("\"Configuration\":{") > -1) - { - // Configuration Message - - JsonConvert.PopulateObject(response, CodecConfiguration); - - if (!SyncState.InitialConfigurationMessageWasReceived) - { - SyncState.InitialConfigurationMessageReceived(); - if (!SyncState.FeedbackWasRegistered) - { - SendText(CliFeedbackRegistrationExpression); - } - } - - } - else if (response.IndexOf("\"Event\":{") > -1) - { - // Event Message - - CiscoCodecEvents.RootObject eventReceived = new CiscoCodecEvents.RootObject(); - - JsonConvert.PopulateObject(response, eventReceived); - - EvalutateEvent(eventReceived); - } - else if (response.IndexOf("\"CommandResponse\":{") > -1) - { - // CommandResponse Message - - if (response.IndexOf("\"CallHistoryRecentsResult\":{") > -1) - { - var codecCallHistory = new CiscoCallHistory.RootObject(); - - JsonConvert.PopulateObject(response, codecCallHistory); - - CallHistory.ConvertCiscoCallHistoryToGeneric(codecCallHistory.CommandResponse.CallHistoryRecentsResult.Entry); - } - else if (response.IndexOf("\"CallHistoryDeleteEntryResult\":{") > -1) - { - GetCallHistory(); - } - else if (response.IndexOf("\"PhonebookSearchResult\":{") > -1) - { - var codecPhonebookResponse = new CiscoCodecPhonebook.RootObject(); - - JsonConvert.PopulateObject(response, codecPhonebookResponse); - - if (!PhonebookSyncState.InitialPhonebookFoldersWasReceived) - { - // Check if the phonebook has any folders - PhonebookSyncState.InitialPhonebookFoldersReceived(); - - PhonebookSyncState.SetPhonebookHasFolders(codecPhonebookResponse.CommandResponse.PhonebookSearchResult.Folder.Count > 0); - - if (PhonebookSyncState.PhonebookHasFolders) - { - DirectoryRoot.AddFoldersToDirectory(CiscoCodecPhonebook.GetRootFoldersFromSearchResult(codecPhonebookResponse.CommandResponse.PhonebookSearchResult)); - } - - // Get the number of contacts in the phonebook - GetPhonebookContacts(); - } - else if (!PhonebookSyncState.NumberOfContactsWasReceived) - { - // Store the total number of contacts in the phonebook - PhonebookSyncState.SetNumberOfContacts(Int32.Parse(codecPhonebookResponse.CommandResponse.PhonebookSearchResult.ResultInfo.TotalRows.Value)); - - DirectoryRoot.AddContactsToDirectory(CiscoCodecPhonebook.GetRootContactsFromSearchResult(codecPhonebookResponse.CommandResponse.PhonebookSearchResult)); - - PhonebookSyncState.PhonebookRootEntriesReceived(); - - PrintPhonebook(DirectoryRoot); - } - else if (PhonebookSyncState.InitialSyncComplete) - { - var directoryResults = new CodecDirectory(); - - directoryResults = CiscoCodecPhonebook.ConvertCiscoPhonebookToGeneric(codecPhonebookResponse.CommandResponse.PhonebookSearchResult); - - PrintPhonebook(directoryResults); - - // This will return the latest results to all UIs. Multiple indendent UI Directory browsing will require a different methodology - var handler = DirectoryResultReturned; - if (handler != null) - handler(this, new DirectoryEventArgs() { Directory = directoryResults }); - - // Fire some sort of callback delegate to the UI that requested the directory search results - } - } - else if (response.IndexOf("\"BookingsListResult\":{") > -1) - { - var codecBookings = new CiscoCodecBookings.RootObject(); - - JsonConvert.PopulateObject(response, codecBookings); - - CodecSchedule.Meetings = CiscoCodecBookings.GetGenericMeetingsFromBookingResult(codecBookings.CommandResponse.BookingsListResult.Booking); - - - } - - } - - } - catch (Exception ex) - { - Debug.Console(1, this, "Error Deserializing feedback from codec: {0}", ex); - } - } - - /// - /// Evaluates an event received from the codec - /// - /// - void EvalutateEvent(CiscoCodecEvents.RootObject eventReceived) - { - if (eventReceived.Event.CallDisconnect != null) - { - var tempActiveCall = ActiveCalls.FirstOrDefault(c => c.Id.Equals(eventReceived.Event.CallDisconnect.CallId.Value)); - - // Remove the call from the Active calls list - if (tempActiveCall != null) - { - ActiveCalls.Remove(tempActiveCall); - - ListCalls(); - - // Notify of the call disconnection - SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus.Disconnected, tempActiveCall); - - GetCallHistory(); - } - } - } - - public override void ExecuteSwitch(object selector) - { - (selector as Action)(); - PresentationSourceKey = selector.ToString(); - } - - protected override Func IncomingCallFeedbackFunc { get { return () => false; } } - - /// - /// Gets the first CallId or returns null - /// - /// - private string GetCallId() - { - string callId = null; - - if (ActiveCalls.Count > 1) - { - foreach (CodecActiveCallItem call in ActiveCalls) ; - } - else if (ActiveCalls.Count == 1) - callId = ActiveCalls[0].Id; - - return callId; - - } - - private void GetCallHistory() - { - SendText("xCommand CallHistory Recents Limit: 20 Order: OccurrenceTime"); - } - - /// - /// Gets the bookings for today - /// - /// - public void GetBookings(string command) - { - SendText("xCommand Bookings List Days: 1 DayOffset: 0"); - } - - /// - /// Triggers a refresh of the codec phonebook - /// - /// Just to allow this method to be called from a console command - public void GetPhonebook(string command) - { - PhonebookSyncState.CodecDisconnected(); - - DirectoryRoot = new CodecDirectory(); - - GetPhonebookFolders(); - } - - private void GetPhonebookFolders() - { - // Get Phonebook Folders (determine local/corporate from config, and set results limit) - SendText(string.Format("xCommand Phonebook Search PhonebookType: {0} ContactType: Folder", PhonebookMode)); - } - - private void GetPhonebookContacts() - { - // Get Phonebook Folders (determine local/corporate from config, and set results limit) - SendText(string.Format("xCommand Phonebook Search PhonebookType: {0} ContactType: Contact", PhonebookMode)); - } - - /// - /// Searches the codec phonebook for all contacts matching the search string - /// - /// - public void SearchDirectory(string searchString) - { - SendText(string.Format("xCommand Phonebook Search SearchString: \"{0}\" PhonebookType: {1} ContactType: Contact Limit: {2}", searchString, PhonebookMode, PhonebookResultsLimit)); - } - - /// - /// // Get contents of a specific folder in the phonebook - /// - /// - public void GetDirectoryFolderContents(string folderId) - { - SendText(string.Format("xCommand Phonebook Search FolderId: {0} PhonebookType: {1} ContactType: Contact Limit: {2}", folderId, PhonebookMode, PhonebookResultsLimit)); - } - - void PrintPhonebook(CodecDirectory directory) - { - if (Debug.Level > 0) - { - Debug.Console(1, this, "Directory Results:\n"); - - foreach (DirectoryItem item in directory.DirectoryResults) - { - if (item is DirectoryFolder) - { - Debug.Console(1, this, "+ {0}", item.Name); - } - else if (item is DirectoryContact) - { - Debug.Console(1, this, "{0}", item.Name); - } - } - } - } - - public override void Dial(string s) - { - SendText(string.Format("xCommand Dial Number: \"{0}\"", s)); - } - - public void DialBookingId(string s) - { - SendText(string.Format("xCommand Dial BookingId: {0}", s)); - } - - public override void EndCall(CodecActiveCallItem activeCall) - { - SendText(string.Format("xCommand Call Disconnect CallId: {0}", activeCall.Id)); - } - - public override void EndAllCalls() - { - foreach (CodecActiveCallItem activeCall in ActiveCalls) - { - SendText(string.Format("xCommand Call Disconnect CallId: {0}", activeCall.Id)); - } - } - - public override void AcceptCall(CodecActiveCallItem item) - { - SendText("xCommand Call Accept"); - } - - public override void RejectCall(CodecActiveCallItem item) - { - SendText("xCommand Call Reject"); - } - - public override void SendDtmf(string s) - { - if (CallFavorites != null) - { - SendText(string.Format("xCommand Call DTMFSend CallId: {0} DTMFString: \"{1}\"", GetCallId(), s)); - } - } - - public void SelectPresentationSource(int source) - { - PresentationSource = source; - - StartSharing(); - } - - /// - /// Select source 1 as the presetnation source - /// - public void SelectPresentationSource1() - { - SelectPresentationSource(1); - } - - /// - /// Select source 2 as the presetnation source - /// - public void SelectPresentationSource2() - { - SelectPresentationSource(2); - } - - public override void StartSharing() - { - string sendingMode = string.Empty; - - if (IsInCall) - sendingMode = "LocalRemote"; - else - sendingMode = "LocalOnly"; - - SendText(string.Format("xCommand Presentation Start PresentationSource: {0}", PresentationSource)); - } - - public override void StopSharing() - { - SendText(string.Format("xCommand Presentation Stop PresentationSource: {0}", PresentationSource)); - } - - public override void PrivacyModeOn() - { - SendText("xCommand Audio Microphones Mute"); - } - - public override void PrivacyModeOff() - { - SendText("xCommand Audio Microphones Unmute"); - } - - public override void PrivacyModeToggle() - { - SendText("xCommand Audio Microphones ToggleMute"); - } - - public override void MuteOff() - { - SendText("xCommand Audio Volume Unmute"); - } - - public override void MuteOn() - { - SendText("xCommand Audio Volume Mute"); - } - - public override void MuteToggle() - { - SendText("xCommand Audio Volume ToggleMute"); - } - - /// - /// Increments the voluem - /// - /// - public override void VolumeUp(bool pressRelease) - { - SendText("xCommand Audio Volume Increase"); - } - - /// - /// Decrements the volume - /// - /// - public override void VolumeDown(bool pressRelease) - { - SendText("xCommand Audio Volume Decrease"); - } - - /// - /// Scales the level and sets the codec to the specified level within its range - /// - /// level from slider (0-65535 range) - public override void SetVolume(ushort level) - { - var scaledLevel = CrestronEnvironment.ScaleWithLimits(level, 65535, 0, 100, 0); - SendText(string.Format("xCommand Audio Volume Set Level: {0}", scaledLevel)); - } - - /// - /// Recalls the default volume on the codec - /// - public void VolumeSetToDefault() - { - SendText("xCommand Audio Volume SetToDefault"); - } - - /// - /// Puts the codec in standby mode - /// - public void StandbyActivate() - { - SendText("xCommand Standby Activate"); - } - - /// - /// Wakes the codec from standby - /// - public void StandbyDeactivate() - { - SendText("xCommand Standby Deactivate"); - } - - /// - /// Reboots the codec - /// - public void Reboot() - { - SendText("xCommand SystemUnit Boot Action: Restart"); - } - - /// - /// Turns on Selfview Mode - /// - public void SelfviewModeOn() - { - SendText("xCommand Video Selfview Set Mode: On"); - } - - /// - /// Turns off Selfview Mode - /// - public void SelfviewModeOff() - { - SendText("xCommand Video Selfview Set Mode: Off"); - } - - /// - /// Toggles Selfview mode on/off - /// - public void SelfviewModeToggle() - { - string mode = string.Empty; - - if (CodecStatus.Status.Video.Selfview.Mode.BoolValue) - mode = "Off"; - else - mode = "On"; - - SendText(string.Format("xCommand Video Selfview Set Mode: {0}", mode)); - } - - /// - /// Sets a specified position for the selfview PIP window - /// - /// - public void SelfviewPipPositionSet(CodecCommandWithLabel position) - { - SendText(string.Format("xCommand Video Selfview Set Mode: On PIPPosition: {0}", position.Command)); - } - - /// - /// Toggles to the next selfview PIP position - /// - public void SelfviewPipPositionToggle() - { - if (CurrentSelfviewPipPosition != null) - { - var nextPipPositionIndex = SelfviewPipPositions.IndexOf(CurrentSelfviewPipPosition) + 1; - - if (nextPipPositionIndex >= SelfviewPipPositions.Count) // Check if we need to loop back to the first item in the list - nextPipPositionIndex = 0; - - SelfviewPipPositionSet(SelfviewPipPositions[nextPipPositionIndex]); - } - } - - /// - /// Sets a specific local layout - /// - /// - public void LocalLayoutSet(CodecCommandWithLabel layout) - { - SendText(string.Format("xCommand Video Layout LayoutFamily Set Target: local LayoutFamily: {0}", layout.Command)); - } - - /// - /// Toggles to the next local layout - /// - public void LocalLayoutToggle() - { - if(CurrentLocalLayout != null) - { - var nextLocalLayoutIndex = LocalLayouts.IndexOf(CurrentLocalLayout) + 1; - - if (nextLocalLayoutIndex >= LocalLayouts.Count) // Check if we need to loop back to the first item in the list - nextLocalLayoutIndex = 0; - - LocalLayoutSet(LocalLayouts[nextLocalLayoutIndex]); - } - } - - /// - /// Calculates the current selfview PIP position - /// - void ComputeSelfviewPipStatus() - { - CurrentSelfviewPipPosition = SelfviewPipPositions.FirstOrDefault(p => p.Command.ToLower().Equals(CodecStatus.Status.Video.Selfview.PIPPosition.Value.ToLower())); - - if(CurrentSelfviewPipPosition != null) - SelfviewIsOnFeedback.FireUpdate(); - } - - /// - /// Calculates the current local Layout - /// - void ComputeLocalLayout() - { - CurrentLocalLayout = LocalLayouts.FirstOrDefault(l => l.Command.ToLower().Equals(CodecStatus.Status.Video.Layout.LayoutFamily.Local.Value.ToLower())); - - if (CurrentLocalLayout != null) - LocalLayoutFeedback.FireUpdate(); - } - - public void RemoveCallHistoryEntry(CodecCallHistory.CallHistoryEntry entry) - { - SendText(string.Format("xCommand CallHistory DeleteEntry CallHistoryId: {0} AcknowledgeConsecutiveDuplicates: True", entry.OccurrenceHistoryId)); - } - - public class CiscoCodecInfo : VideoCodecInfo - { - public CiscoCodecStatus.RootObject CodecStatus { get; private set; } - - public CiscoCodecConfiguration.RootObject CodecConfiguration { get; private set; } - - public override bool MultiSiteOptionIsEnabled - { - get - { - if (CodecStatus.Status.SystemUnit.Software.OptionKeys.MultiSite.Value.ToLower() == "true") - return true; - else - return false; - } - - } - public override string IpAddress - { - get - { - if (CodecConfiguration.Configuration.Network != null) - { - if (CodecConfiguration.Configuration.Network.Count > 0) - return CodecConfiguration.Configuration.Network[0].IPv4.Address.Value; - } - return string.Empty; - } - } - public override string PhoneNumber - { - get - { - if (CodecConfiguration.Configuration.H323.H323Alias.E164 != null) - return CodecConfiguration.Configuration.H323.H323Alias.E164.Value; - else - return string.Empty; - } - } - public override string SipUri - { - get - { - if (CodecConfiguration.Configuration.H323.H323Alias.ID != null) - return CodecConfiguration.Configuration.H323.H323Alias.ID.Value; - else - return string.Empty; - } - } - public override bool AutoAnswerEnabled - { - get - { - if (CodecConfiguration.Configuration.Conference.AutoAnswer.Mode.Value.ToLower() == "on") - return true; - else - return false; - } - } - - public CiscoCodecInfo(CiscoCodecStatus.RootObject status, CiscoCodecConfiguration.RootObject configuration) - { - CodecStatus = status; - CodecConfiguration = configuration; - } - } - } - - /// - /// Represents a codec command that might need to have a friendly label applied for UI feedback purposes - /// - public class CodecCommandWithLabel - { - public string Command { get; set; } - public string Label { get; set; } - - public CodecCommandWithLabel(string command, string label) - { - Command = command; - Label = label; - } - } - - /// - /// Tracks the initial sycnronization state of the codec when making a connection - /// - public class CodecSyncState : IKeyed - { - bool _InitialSyncComplete; - - public event EventHandler InitialSyncCompleted; - - public string Key { get; private set; } - - public bool InitialSyncComplete - { - get { return _InitialSyncComplete; } - private set - { - if (value == true) - { - var handler = InitialSyncCompleted; - if (handler != null) - handler(this, new EventArgs()); - } - _InitialSyncComplete = value; - } - } - - public bool InitialStatusMessageWasReceived { get; private set; } - - public bool InitialConfigurationMessageWasReceived { get; private set; } - - public bool FeedbackWasRegistered { get; private set; } - - public CodecSyncState(string key) - { - Key = key; - CodecDisconnected(); - } - - public void InitialStatusMessageReceived() - { - InitialStatusMessageWasReceived = true; - Debug.Console(1, this, "Initial Codec Status Message Received."); - CheckSyncStatus(); - } - - public void InitialConfigurationMessageReceived() - { - InitialConfigurationMessageWasReceived = true; - Debug.Console(1, this, "Initial Codec Configuration Message Received."); - CheckSyncStatus(); - } - - public void FeedbackRegistered() - { - FeedbackWasRegistered = true; - Debug.Console(1, this, "Initial Codec Feedback Registration Successful."); - CheckSyncStatus(); - } - - public void CodecDisconnected() - { - InitialConfigurationMessageWasReceived = false; - InitialStatusMessageWasReceived = false; - FeedbackWasRegistered = false; - InitialSyncComplete = false; - } - - void CheckSyncStatus() - { - if (InitialConfigurationMessageWasReceived && InitialStatusMessageWasReceived && FeedbackWasRegistered) - { - InitialSyncComplete = true; - Debug.Console(1, this, "Initial Codec Sync Complete!"); - } - else - InitialSyncComplete = false; - } - } - - /// - /// Used to track the status of syncronizing the phonebook values when connecting to a codec or refreshing the phonebook info - /// - public class CodecPhonebookSyncState : IKeyed - { - bool _InitialSyncComplete; - - public event EventHandler InitialSyncCompleted; - - public string Key { get; private set; } - - public bool InitialSyncComplete - { - get { return _InitialSyncComplete; } - private set - { - if (value == true) - { - var handler = InitialSyncCompleted; - if (handler != null) - handler(this, new EventArgs()); - } - _InitialSyncComplete = value; - } - } - - public bool InitialPhonebookFoldersWasReceived { get; private set; } - - public bool NumberOfContactsWasReceived { get; private set; } - - public bool PhonebookRootEntriesWasRecieved { get; private set; } - - public bool PhonebookHasFolders { get; private set; } - - public int NumberOfContacts { get; private set; } - - public CodecPhonebookSyncState(string key) - { - Key = key; - - CodecDisconnected(); - } - - public void InitialPhonebookFoldersReceived() - { - InitialPhonebookFoldersWasReceived = true; - - CheckSyncStatus(); - } - - public void PhonebookRootEntriesReceived() - { - PhonebookRootEntriesWasRecieved = true; - - CheckSyncStatus(); - } - - public void SetPhonebookHasFolders(bool value) - { - PhonebookHasFolders = value; - - Debug.Console(1, this, "Phonebook has folders: {0}", PhonebookHasFolders); - } - - public void SetNumberOfContacts(int contacts) - { - NumberOfContacts = contacts; - NumberOfContactsWasReceived = true; - - Debug.Console(1, this, "Phonebook contains {0} contacts.", NumberOfContacts); - - CheckSyncStatus(); - } - - public void CodecDisconnected() - { - InitialPhonebookFoldersWasReceived = false; - PhonebookHasFolders = false; - NumberOfContacts = 0; - NumberOfContactsWasReceived = false; - } - - void CheckSyncStatus() - { - if (InitialPhonebookFoldersWasReceived && NumberOfContactsWasReceived && PhonebookRootEntriesWasRecieved) - { - InitialSyncComplete = true; - Debug.Console(1, this, "Initial Phonebook Sync Complete!"); - } - else - InitialSyncComplete = false; - } - } - -} \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs.orig b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs.orig deleted file mode 100644 index 9ce58609..00000000 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs.orig +++ /dev/null @@ -1,1487 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.RegularExpressions; -using Crestron.SimplSharp; -using Crestron.SimplSharp.Net.Https; -using Crestron.SimplSharp.CrestronXml; -using Crestron.SimplSharp.CrestronXml.Serialization; -using Newtonsoft.Json; -//using Cisco_One_Button_To_Push; -//using Cisco_SX80_Corporate_Phone_Book; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Routing; -using PepperDash.Essentials.Devices.Common.Codec; -using PepperDash.Essentials.Devices.Common.Occupancy; -using PepperDash.Essentials.Devices.Common.VideoCodec; - -namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco -{ - enum eCommandType { SessionStart, SessionEnd, Command, GetStatus, GetConfiguration }; - - public class CiscoSparkCodec : VideoCodecBase, IHasCallHistory, IHasCallFavorites, IHasDirectory, - IHasScheduleAwareness, IOccupancyStatusProvider, IHasCodecLayouts, IHasCodecSelfview, - ICommunicationMonitor, IRouting - { - public event EventHandler DirectoryResultReturned; - - public CommunicationGather PortGather { get; private set; } - public CommunicationGather JsonGather { get; private set; } - - public StatusMonitorBase CommunicationMonitor { get; private set; } - - public BoolFeedback PresentationViewMaximizedFeedback { get; private set; } - - string CurrentPresentationView; - - public BoolFeedback RoomIsOccupiedFeedback { get; private set; } - - public IntFeedback PeopleCountFeedback { get; private set; } - - public BoolFeedback SpeakerTrackIsOnFeedback { get; private set; } - - public BoolFeedback SelfviewIsOnFeedback { get; private set; } - - public StringFeedback SelfviewPipPositionFeedback { get; private set; } - - public StringFeedback LocalLayoutFeedback { get; private set; } - - private CodecCommandWithLabel CurrentSelfviewPipPosition; - - private CodecCommandWithLabel CurrentLocalLayout; - - /// - /// List the available positions for the selfview PIP window - /// - public List SelfviewPipPositions = new List() - { - new CodecCommandWithLabel("CenterLeft", "Center Left"), - new CodecCommandWithLabel("CenterRight", "Center Right"), - new CodecCommandWithLabel("LowerLeft", "Lower Left"), - new CodecCommandWithLabel("LowerRight", "Lower Right"), - new CodecCommandWithLabel("UpperCenter", "Upper Center"), - new CodecCommandWithLabel("UpperLeft", "Upper Left"), - new CodecCommandWithLabel("UpperRight", "Upper Right"), - }; - - /// - /// Lists the available options for local layout - /// - public List LocalLayouts = new List() - { - //new CodecCommandWithLabel("auto", "Auto"), - //new CiscoCodecLocalLayout("custom", "Custom"), // Left out for now - new CodecCommandWithLabel("equal","Equal"), - new CodecCommandWithLabel("overlay","Overlay"), - new CodecCommandWithLabel("prominent","Prominent"), - new CodecCommandWithLabel("single","Single") - }; - - private CiscoCodecConfiguration.RootObject CodecConfiguration = new CiscoCodecConfiguration.RootObject(); - - private CiscoCodecStatus.RootObject CodecStatus = new CiscoCodecStatus.RootObject(); - - public CodecCallHistory CallHistory { get; private set; } - - public CodecCallFavorites CallFavorites { get; private set; } - - public CodecDirectory DirectoryRoot { get; private set; } - - public CodecScheduleAwareness CodecSchedule { get; private set; } - - /// - /// Gets and returns the scaled volume of the codec - /// - protected override Func VolumeLevelFeedbackFunc - { - get - { - return () => CrestronEnvironment.ScaleWithLimits(CodecStatus.Status.Audio.Volume.IntValue, 100, 0, 65535, 0); - } - } - - protected override Func PrivacyModeIsOnFeedbackFunc - { - get - { - return () => CodecStatus.Status.Audio.Microphones.Mute.BoolValue; - } - } - - protected override Func StandbyIsOnFeedbackFunc - { - get - { - return () => CodecStatus.Status.Standby.State.BoolValue; - } - } - - /// - /// Gets the value of the currently shared source, or returns null - /// - protected override Func SharingSourceFeedbackFunc - { - get - { - return () => PresentationSourceKey; - } - } - - protected override Func SharingContentIsOnFeedbackFunc - { - get - { - return () => CodecStatus.Status.Conference.Presentation.Mode.BoolValue; - } - } - - protected override Func MuteFeedbackFunc - { - get - { - return () => CodecStatus.Status.Audio.VolumeMute.BoolValue; - } - } - - protected Func RoomIsOccupiedFeedbackFunc - { - get - { - return () => CodecStatus.Status.RoomAnalytics.PeoplePresence.BoolValue; - } - } - - protected Func PeopleCountFeedbackFunc - { - get - { - return () => CodecStatus.Status.RoomAnalytics.PeopleCount.Current.IntValue; - } - } - - protected Func SpeakerTrackIsOnFeedbackFunc - { - get - { - return () => CodecStatus.Status.Cameras.SpeakerTrack.Status.BoolValue; - } - } - - protected Func SelfViewIsOnFeedbackFunc - { - get - { - return () => CodecStatus.Status.Video.Selfview.Mode.BoolValue; - } - } - - protected Func SelfviewPipPositionFeedbackFunc - { - get - { - return () => CurrentSelfviewPipPosition.Label; - } - } - - protected Func LocalLayoutFeedbackFunc - { - get - { - return () => CurrentLocalLayout.Label; - } - } - - - private string CliFeedbackRegistrationExpression; - - private CodecSyncState SyncState; - - public CodecPhonebookSyncState PhonebookSyncState { get; private set; } - - private StringBuilder JsonMessage; - - private bool JsonFeedbackMessageIsIncoming; - - public bool CommDebuggingIsOn; - - string Delimiter = "\r\n"; - - /// - /// Used to track the current connector used for the presentation source - /// - int PresentationSource; - - string PresentationSourceKey; - - string PhonebookMode = "Local"; // Default to Local - - int PhonebookResultsLimit = 255; // Could be set later by config. - - CTimer LoginMessageReceived; - - // **___________________________________________________________________** - // Timers to be moved to the global system timer at a later point.... - CTimer BookingsRefreshTimer; - CTimer PhonebookRefreshTimer; - // **___________________________________________________________________** - - public RoutingInputPort CodecOsdIn { get; private set; } - public RoutingInputPort HdmiIn2 { get; private set; } - public RoutingInputPort HdmiIn3 { get; private set; } - public RoutingOutputPort HdmiOut1 { get; private set; } - public RoutingOutputPort HdmiOut2 { get; private set; } - - - // Constructor for IBasicCommunication - public CiscoSparkCodec(string key, string name, IBasicCommunication comm, CiscoSparkCodecPropertiesConfig props ) - : base(key, name) - { - RoomIsOccupiedFeedback = new BoolFeedback(RoomIsOccupiedFeedbackFunc); - PeopleCountFeedback = new IntFeedback(PeopleCountFeedbackFunc); - SpeakerTrackIsOnFeedback = new BoolFeedback(SpeakerTrackIsOnFeedbackFunc); - SelfviewIsOnFeedback = new BoolFeedback(SelfViewIsOnFeedbackFunc); - SelfviewPipPositionFeedback = new StringFeedback(SelfviewPipPositionFeedbackFunc); - LocalLayoutFeedback = new StringFeedback(LocalLayoutFeedbackFunc); -<<<<<<< HEAD -======= - LocalLayoutIsProminentFeedback = new BoolFeedback(LocalLayoutIsProminentFeedbackFunc); - FarEndIsSharingContentFeedback = new BoolFeedback(FarEndIsSharingContentFeedbackFunc); ->>>>>>> development - - PresentationViewMaximizedFeedback = new BoolFeedback(() => CurrentPresentationView == "Maximized"); - - Communication = comm; - - if (props.CommunicationMonitorProperties != null) - { - CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, props.CommunicationMonitorProperties); - } - else - { - CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 30000, 120000, 300000, "xStatus SystemUnit Software Version\r"); - } - - if (props.Sharing != null) - AutoShareContentWhileInCall = props.Sharing.AutoShareContentWhileInCall; - - ShowSelfViewByDefault = props.ShowSelfViewByDefault; - - DeviceManager.AddDevice(CommunicationMonitor); - - PhonebookMode = props.PhonebookMode; - - SyncState = new CodecSyncState(key + "--Sync"); - - PhonebookSyncState = new CodecPhonebookSyncState(key + "--PhonebookSync"); - - SyncState.InitialSyncCompleted += new EventHandler(SyncState_InitialSyncCompleted); - - PortGather = new CommunicationGather(Communication, Delimiter); - PortGather.IncludeDelimiter = true; - PortGather.LineReceived += this.Port_LineReceived; - - CodecInfo = new CiscoCodecInfo(CodecStatus, CodecConfiguration); - - CallHistory = new CodecCallHistory(); - - if (props.Favorites != null) - { - CallFavorites = new CodecCallFavorites(); - CallFavorites.Favorites = props.Favorites; - } - - DirectoryRoot = new CodecDirectory(); - - CodecSchedule = new CodecScheduleAwareness(); - - //Set Feedback Actions - CodecStatus.Status.Audio.Volume.ValueChangedAction = VolumeLevelFeedback.FireUpdate; - CodecStatus.Status.Audio.VolumeMute.ValueChangedAction = MuteFeedback.FireUpdate; - CodecStatus.Status.Audio.Microphones.Mute.ValueChangedAction = PrivacyModeIsOnFeedback.FireUpdate; - CodecStatus.Status.Standby.State.ValueChangedAction = StandbyIsOnFeedback.FireUpdate; - CodecStatus.Status.RoomAnalytics.PeoplePresence.ValueChangedAction = RoomIsOccupiedFeedback.FireUpdate; - CodecStatus.Status.RoomAnalytics.PeopleCount.Current.ValueChangedAction = PeopleCountFeedback.FireUpdate; - CodecStatus.Status.Cameras.SpeakerTrack.Status.ValueChangedAction = SpeakerTrackIsOnFeedback.FireUpdate; - CodecStatus.Status.Video.Selfview.Mode.ValueChangedAction = SelfviewIsOnFeedback.FireUpdate; - CodecStatus.Status.Video.Selfview.PIPPosition.ValueChangedAction = ComputeSelfviewPipStatus; - CodecStatus.Status.Video.Layout.LayoutFamily.Local.ValueChangedAction = ComputeLocalLayout; -<<<<<<< HEAD - CodecStatus.Status.Conference.Presentation.Mode.ValueChangedAction = SharingContentIsOnFeedback.FireUpdate; -======= - CodecStatus.Status.Conference.Presentation.Mode.ValueChangedAction += SharingContentIsOnFeedback.FireUpdate; - CodecStatus.Status.Conference.Presentation.Mode.ValueChangedAction += FarEndIsSharingContentFeedback.FireUpdate; ->>>>>>> development - - CodecOsdIn = new RoutingInputPort(RoutingPortNames.CodecOsd, eRoutingSignalType.AudioVideo, - eRoutingPortConnectionType.Hdmi, new Action(StopSharing), this); - HdmiIn2 = new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.AudioVideo, - eRoutingPortConnectionType.Hdmi, new Action(SelectPresentationSource1), this); - HdmiIn3 = new RoutingInputPort(RoutingPortNames.HdmiIn3, eRoutingSignalType.AudioVideo, - eRoutingPortConnectionType.Hdmi, new Action(SelectPresentationSource2), this); - - HdmiOut1 = new RoutingOutputPort(RoutingPortNames.HdmiOut1, eRoutingSignalType.AudioVideo, - eRoutingPortConnectionType.Hdmi, null, this); - HdmiOut2 = new RoutingOutputPort(RoutingPortNames.HdmiOut2, eRoutingSignalType.AudioVideo, - eRoutingPortConnectionType.Hdmi, null, this); - - InputPorts.Add(CodecOsdIn); - InputPorts.Add(HdmiIn2); - InputPorts.Add(HdmiIn3); - OutputPorts.Add(HdmiOut1); - - CreateOsdSource(); - } - - - /// - /// Creates the fake OSD source, and connects it's AudioVideo output to the CodecOsdIn input - /// to enable routing - /// - void CreateOsdSource() - { - OsdSource = new DummyRoutingInputsDevice(Key + "[osd]"); - DeviceManager.AddDevice(OsdSource); - var tl = new TieLine(OsdSource.AudioVideoOutputPort, CodecOsdIn); - TieLineCollection.Default.Add(tl); - } - - /// - /// Starts the HTTP feedback server and syncronizes state of codec - /// - /// - public override bool CustomActivate() - { - CrestronConsole.AddNewConsoleCommand(SetCommDebug, "SetCodecCommDebug", "0 for Off, 1 for on", ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(GetPhonebook, "GetCodecPhonebook", "Triggers a refresh of the codec phonebook", ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(GetBookings, "GetCodecBookings", "Triggers a refresh of the booking data for today", ConsoleAccessLevelEnum.AccessOperator); - - Communication.Connect(); - LoginMessageReceived = new CTimer(DisconnectClientAndReconnect, 5000); - - var socket = Communication as ISocketStatus; - if (socket != null) - { - socket.ConnectionChange += new EventHandler(socket_ConnectionChange); - } - - CommunicationMonitor.Start(); - - string prefix = "xFeedback register "; - - CliFeedbackRegistrationExpression = - prefix + "/Configuration" + Delimiter + - prefix + "/Status/Audio" + Delimiter + - prefix + "/Status/Call" + Delimiter + - prefix + "/Status/Conference/Presentation" + Delimiter + - prefix + "/Status/Cameras/SpeakerTrack" + Delimiter + - prefix + "/Status/RoomAnalytics" + Delimiter + - prefix + "/Status/Standby" + Delimiter + - prefix + "/Status/Video/Selfview" + Delimiter + - prefix + "/Status/Video/Layout" + Delimiter + - prefix + "/Bookings" + Delimiter + - prefix + "/Event/CallDisconnect" + Delimiter + - prefix + "/Event/Bookings" + Delimiter; - - return base.CustomActivate(); - } - - /// - /// Fires when initial codec sync is completed. Used to then send commands to get call history, phonebook, bookings, etc. - /// - /// - /// - void SyncState_InitialSyncCompleted(object sender, EventArgs e) - { - // Fire the ready event - SetIsReady(); - //CommDebuggingIsOn = false; - - GetCallHistory(); - - PhonebookRefreshTimer = new CTimer(CheckCurrentHour, 3600000, 3600000); // check each hour to see if the phonebook should be downloaded - GetPhonebook(null); - - BookingsRefreshTimer = new CTimer(GetBookings, 900000, 900000); // 15 minute timer to check for new booking info - GetBookings(null); - } - - public void SetCommDebug(string s) - { - if (s == "1") - { - CommDebuggingIsOn = true; - Debug.Console(0, this, "Comm Debug Enabled."); - } - else - { - CommDebuggingIsOn = false; - Debug.Console(0, this, "Comm Debug Disabled."); - } - } - - void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e) - { - if (e.Client.IsConnected) - { - LoginMessageReceived.Reset(5000); - } - else - { - SyncState.CodecDisconnected(); - PhonebookSyncState.CodecDisconnected(); - - if (PhonebookRefreshTimer != null) - { - PhonebookRefreshTimer.Stop(); - PhonebookRefreshTimer = null; - } - - if (BookingsRefreshTimer != null) - { - BookingsRefreshTimer.Stop(); - BookingsRefreshTimer = null; - } - } - } - - void DisconnectClientAndReconnect(object o) - { - Debug.Console(0, this, "Disconnecting and Reconnecting to codec."); - - Communication.Disconnect(); - - CrestronEnvironment.Sleep(2000); - - Communication.Connect(); - } - - /// - /// Gathers responses from the codec (including the delimiter. Responses are checked to see if they contain JSON data and if so, the data is collected until a complete JSON - /// message is received before forwarding the message to be deserialized. - /// - /// - /// - void Port_LineReceived(object dev, GenericCommMethodReceiveTextArgs args) - { - if (CommDebuggingIsOn) - { - if(!JsonFeedbackMessageIsIncoming) - Debug.Console(1, this, "RX: '{0}'", args.Text); - } - - if (args.Text == "{" + Delimiter) // Check for the beginning of a new JSON message - { - JsonFeedbackMessageIsIncoming = true; - - if (CommDebuggingIsOn) - Debug.Console(1, this, "Incoming JSON message..."); - - JsonMessage = new StringBuilder(); - } - else if (args.Text == "}" + Delimiter) // Check for the end of a JSON message - { - JsonFeedbackMessageIsIncoming = false; - - JsonMessage.Append(args.Text); - - if (CommDebuggingIsOn) - Debug.Console(1, this, "Complete JSON Received:\n{0}", JsonMessage.ToString()); - - // Forward the complete message to be deserialized - DeserializeResponse(JsonMessage.ToString()); - return; - } - - if(JsonFeedbackMessageIsIncoming) - { - JsonMessage.Append(args.Text); - - //Debug.Console(1, this, "Building JSON:\n{0}", JsonMessage.ToString()); - return; - } - - if (!SyncState.InitialSyncComplete) - { - switch (args.Text.Trim().ToLower()) // remove the whitespace - { - case "*r login successful": - { - LoginMessageReceived.Stop(); - SendText("xPreferences outputmode json"); - break; - } - case "xpreferences outputmode json": - { - if (!SyncState.InitialStatusMessageWasReceived) - SendText("xStatus"); - break; - } - case "xfeedback register /event/calldisconnect": - { - SyncState.FeedbackRegistered(); - break; - } - } - } - - } - - public void SendText(string command) - { - if (CommDebuggingIsOn) - Debug.Console(1, this, "Sending: '{0}'", command); - - Communication.SendText(command + Delimiter); - } - - void DeserializeResponse(string response) - { - try - { - // Serializer settings. We want to ignore null values and mising members - JsonSerializerSettings settings = new JsonSerializerSettings(); - settings.NullValueHandling = NullValueHandling.Ignore; - settings.MissingMemberHandling = MissingMemberHandling.Ignore; - settings.ObjectCreationHandling = ObjectCreationHandling.Auto; - - if (response.IndexOf("\"Status\":{") > -1) - { - // Status Message - - // Temp object so we can inpsect for call data before simply deserializing - CiscoCodecStatus.RootObject tempCodecStatus = new CiscoCodecStatus.RootObject(); - - JsonConvert.PopulateObject(response, tempCodecStatus); - - // Check to see if the message contains /Status/Conference/Presentation/LocalInstance and extract source value - var conference = tempCodecStatus.Status.Conference; - - if (conference.Presentation.LocalInstance.Count > 0) - { - if (!string.IsNullOrEmpty(conference.Presentation.LocalInstance[0].ghost)) - PresentationSource = 0; - else if (conference.Presentation.LocalInstance[0].Source != null) - { - PresentationSource = conference.Presentation.LocalInstance[0].Source.IntValue; - } - } - - // Check to see if this is a call status message received after the initial status message - if (tempCodecStatus.Status.Call.Count > 0) - { - // Iterate through the call objects in the response - foreach (CiscoCodecStatus.Call call in tempCodecStatus.Status.Call) - { - var tempActiveCall = ActiveCalls.FirstOrDefault(c => c.Id.Equals(call.id)); - - if (tempActiveCall != null) - { - bool changeDetected = false; - - eCodecCallStatus newStatus = eCodecCallStatus.Unknown; - - // Update properties of ActiveCallItem - if(call.Status != null) - if (!string.IsNullOrEmpty(call.Status.Value)) - { - tempActiveCall.Status = CodecCallStatus.ConvertToStatusEnum(call.Status.Value); - - if (newStatus == eCodecCallStatus.Connected) - GetCallHistory(); - - changeDetected = true; - } - if (call.CallType != null) - if (!string.IsNullOrEmpty(call.CallType.Value)) - { - tempActiveCall.Type = CodecCallType.ConvertToTypeEnum(call.CallType.Value); - changeDetected = true; - } - if (call.DisplayName != null) - if (!string.IsNullOrEmpty(call.DisplayName.Value)) - { - tempActiveCall.Name = call.DisplayName.Value; - changeDetected = true; - } - if (call.Direction != null) - { - if (!string.IsNullOrEmpty(call.Direction.Value)) - { - tempActiveCall.Direction = CodecCallDirection.ConvertToDirectionEnum(call.Direction.Value); - changeDetected = true; - } - } - - if (changeDetected) - { - SetSelfViewMode(); - OnCallStatusChange(tempActiveCall); - ListCalls(); - } - } - else if( call.ghost == null ) // if the ghost value is present the call has ended already - { - // Create a new call item - var newCallItem = new CodecActiveCallItem() - { - Id = call.id, - Status = CodecCallStatus.ConvertToStatusEnum(call.Status.Value), - Name = call.DisplayName.Value, - Number = call.RemoteNumber.Value, - Type = CodecCallType.ConvertToTypeEnum(call.CallType.Value), - Direction = CodecCallDirection.ConvertToDirectionEnum(call.Direction.Value) - }; - - // Add it to the ActiveCalls List - ActiveCalls.Add(newCallItem); - - ListCalls(); - - SetSelfViewMode(); - OnCallStatusChange(newCallItem); - } - - } - - } - - JsonConvert.PopulateObject(response, CodecStatus); - - if (!SyncState.InitialStatusMessageWasReceived) - { - SyncState.InitialStatusMessageReceived(); - - if (!SyncState.InitialConfigurationMessageWasReceived) - SendText("xConfiguration"); - } - } - else if (response.IndexOf("\"Configuration\":{") > -1) - { - // Configuration Message - - JsonConvert.PopulateObject(response, CodecConfiguration); - - if (!SyncState.InitialConfigurationMessageWasReceived) - { - SyncState.InitialConfigurationMessageReceived(); - if (!SyncState.FeedbackWasRegistered) - { - SendText(CliFeedbackRegistrationExpression); - } - } - - } - else if (response.IndexOf("\"Event\":{") > -1) - { - if (response.IndexOf("\"CallDisconnect\":{") > -1) - { - CiscoCodecEvents.RootObject eventReceived = new CiscoCodecEvents.RootObject(); - - JsonConvert.PopulateObject(response, eventReceived); - - EvalutateDisconnectEvent(eventReceived); - } - else if (response.IndexOf("\"Bookings\":{") > -1) // The list has changed, reload it - { - GetBookings(null); - } - } - else if (response.IndexOf("\"CommandResponse\":{") > -1) - { - // CommandResponse Message - - if (response.IndexOf("\"CallHistoryRecentsResult\":{") > -1) - { - var codecCallHistory = new CiscoCallHistory.RootObject(); - - JsonConvert.PopulateObject(response, codecCallHistory); - - CallHistory.ConvertCiscoCallHistoryToGeneric(codecCallHistory.CommandResponse.CallHistoryRecentsResult.Entry); - } - else if (response.IndexOf("\"CallHistoryDeleteEntryResult\":{") > -1) - { - GetCallHistory(); - } - else if (response.IndexOf("\"PhonebookSearchResult\":{") > -1) - { - var codecPhonebookResponse = new CiscoCodecPhonebook.RootObject(); - - JsonConvert.PopulateObject(response, codecPhonebookResponse); - - if (!PhonebookSyncState.InitialPhonebookFoldersWasReceived) - { - // Check if the phonebook has any folders - PhonebookSyncState.InitialPhonebookFoldersReceived(); - - PhonebookSyncState.SetPhonebookHasFolders(codecPhonebookResponse.CommandResponse.PhonebookSearchResult.Folder.Count > 0); - - if (PhonebookSyncState.PhonebookHasFolders) - { - DirectoryRoot.AddFoldersToDirectory(CiscoCodecPhonebook.GetRootFoldersFromSearchResult(codecPhonebookResponse.CommandResponse.PhonebookSearchResult)); - } - - // Get the number of contacts in the phonebook - GetPhonebookContacts(); - } - else if (!PhonebookSyncState.NumberOfContactsWasReceived) - { - // Store the total number of contacts in the phonebook - PhonebookSyncState.SetNumberOfContacts(Int32.Parse(codecPhonebookResponse.CommandResponse.PhonebookSearchResult.ResultInfo.TotalRows.Value)); - - DirectoryRoot.AddContactsToDirectory(CiscoCodecPhonebook.GetRootContactsFromSearchResult(codecPhonebookResponse.CommandResponse.PhonebookSearchResult)); - - PhonebookSyncState.PhonebookRootEntriesReceived(); - - PrintPhonebook(DirectoryRoot); - } - else if (PhonebookSyncState.InitialSyncComplete) - { - var directoryResults = new CodecDirectory(); - - if(codecPhonebookResponse.CommandResponse.PhonebookSearchResult.ResultInfo.TotalRows.Value != "0") - directoryResults = CiscoCodecPhonebook.ConvertCiscoPhonebookToGeneric(codecPhonebookResponse.CommandResponse.PhonebookSearchResult); - - PrintPhonebook(directoryResults); - - // This will return the latest results to all UIs. Multiple indendent UI Directory browsing will require a different methodology - var handler = DirectoryResultReturned; - if (handler != null) - handler(this, new DirectoryEventArgs() { Directory = directoryResults }); - - // Fire some sort of callback delegate to the UI that requested the directory search results - } - } - else if (response.IndexOf("\"BookingsListResult\":{") > -1) - { - var codecBookings = new CiscoCodecBookings.RootObject(); - - JsonConvert.PopulateObject(response, codecBookings); - - if(codecBookings.CommandResponse.BookingsListResult.ResultInfo.TotalRows.Value != "0") - CodecSchedule.Meetings = CiscoCodecBookings.GetGenericMeetingsFromBookingResult(codecBookings.CommandResponse.BookingsListResult.Booking); - - BookingsRefreshTimer.Reset(900000, 900000); - } - - } - - } - catch (Exception ex) - { - Debug.Console(1, this, "Error Deserializing feedback from codec: {0}", ex); - } - } - - /// - /// Evaluates an event received from the codec - /// - /// - void EvalutateDisconnectEvent(CiscoCodecEvents.RootObject eventReceived) - { - if (eventReceived.Event.CallDisconnect != null) - { - var tempActiveCall = ActiveCalls.FirstOrDefault(c => c.Id.Equals(eventReceived.Event.CallDisconnect.CallId.Value)); - - // Remove the call from the Active calls list - if (tempActiveCall != null) - { - ActiveCalls.Remove(tempActiveCall); - - ListCalls(); - - SetSelfViewMode(); - // Notify of the call disconnection - SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus.Disconnected, tempActiveCall); - - GetCallHistory(); - } - } - } - - /// - /// - /// - /// - public override void ExecuteSwitch(object selector) - { - (selector as Action)(); - PresentationSourceKey = selector.ToString(); - } - - /// - /// This is necessary for devices that are "routers" in the middle of the path, even though it only has one output and - /// may only have one input. - /// - public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) - { - ExecuteSwitch(inputSelector); - PresentationSourceKey = inputSelector.ToString(); - } - - - /// - /// Gets the first CallId or returns null - /// - /// - private string GetCallId() - { - string callId = null; - - if (ActiveCalls.Count > 1) - { - foreach (CodecActiveCallItem call in ActiveCalls) ; - } - else if (ActiveCalls.Count == 1) - callId = ActiveCalls[0].Id; - - return callId; - - } - - public void GetCallHistory() - { - SendText("xCommand CallHistory Recents Limit: 20 Order: OccurrenceTime"); - } - - /// - /// Required for IHasScheduleAwareness - /// - public void GetSchedule() - { - GetBookings(null); - } - - /// - /// Gets the bookings for today - /// - /// - public void GetBookings(object command) - { - Debug.Console(1, this, "Retrieving Booking Info from Codec. Current Time: {0}", DateTime.Now.ToLocalTime()); - - SendText("xCommand Bookings List Days: 1 DayOffset: 0"); - } - - /// - /// Checks to see if it is 2am (or within that hour) and triggers a download of the phonebook - /// - /// - public void CheckCurrentHour(object o) - { - if (DateTime.Now.Hour == 2) - { - Debug.Console(1, this, "Checking hour to see if phonebook should be downloaded. Current hour is {0}", DateTime.Now.Hour); - - GetPhonebook(null); - PhonebookRefreshTimer.Reset(3600000, 3600000); - } - } - - /// - /// Triggers a refresh of the codec phonebook - /// - /// Just to allow this method to be called from a console command - public void GetPhonebook(string command) - { - PhonebookSyncState.CodecDisconnected(); - - DirectoryRoot = new CodecDirectory(); - - GetPhonebookFolders(); - } - - private void GetPhonebookFolders() - { - // Get Phonebook Folders (determine local/corporate from config, and set results limit) - SendText(string.Format("xCommand Phonebook Search PhonebookType: {0} ContactType: Folder", PhonebookMode)); - } - - private void GetPhonebookContacts() - { - // Get Phonebook Folders (determine local/corporate from config, and set results limit) - SendText(string.Format("xCommand Phonebook Search PhonebookType: {0} ContactType: Contact Limit: {1}", PhonebookMode, PhonebookResultsLimit)); - } - - /// - /// Searches the codec phonebook for all contacts matching the search string - /// - /// - public void SearchDirectory(string searchString) - { - SendText(string.Format("xCommand Phonebook Search SearchString: \"{0}\" PhonebookType: {1} ContactType: Contact Limit: {2}", searchString, PhonebookMode, PhonebookResultsLimit)); - } - - /// - /// // Get contents of a specific folder in the phonebook - /// - /// - public void GetDirectoryFolderContents(string folderId) - { - SendText(string.Format("xCommand Phonebook Search FolderId: {0} PhonebookType: {1} ContactType: Any Limit: {2}", folderId, PhonebookMode, PhonebookResultsLimit)); - } - - void PrintPhonebook(CodecDirectory directory) - { - if (Debug.Level > 0) - { - Debug.Console(1, this, "Directory Results:\n"); - - foreach (DirectoryItem item in directory.DirectoryResults) - { - if (item is DirectoryFolder) - { - Debug.Console(1, this, "[+] {0}", item.Name); - } - else if (item is DirectoryContact) - { - Debug.Console(1, this, "{0}", item.Name); - } - } - } - } - - /// - /// Simple dial method - /// - /// - public override void Dial(string number) - { - SendText(string.Format("xCommand Dial Number: \"{0}\"", number)); - } - - /// - /// Dials a specific meeting - /// - /// - public override void Dial(Meeting meeting) - { - foreach (Call c in meeting.Calls) - { - Dial(c.Number, c.Protocol, c.CallRate, c.CallType, meeting.Id); - } - } - - /// - /// Detailed dial method - /// - /// - /// - /// - /// - /// - public void Dial(string number, string protocol, string callRate, string callType, string meetingId) - { - SendText(string.Format("xCommand Dial Number: \"{0}\" Protocol: {1} CallRate: {2} CallType: {3} BookingId: {4}", number, protocol, callRate, callType, meetingId)); - } - - public override void EndCall(CodecActiveCallItem activeCall) - { - SendText(string.Format("xCommand Call Disconnect CallId: {0}", activeCall.Id)); - } - - public override void EndAllCalls() - { - foreach (CodecActiveCallItem activeCall in ActiveCalls) - { - SendText(string.Format("xCommand Call Disconnect CallId: {0}", activeCall.Id)); - } - } - - public override void AcceptCall(CodecActiveCallItem item) - { - SendText("xCommand Call Accept"); - } - - public override void RejectCall(CodecActiveCallItem item) - { - SendText("xCommand Call Reject"); - } - - public override void SendDtmf(string s) - { - if (CallFavorites != null) - { - SendText(string.Format("xCommand Call DTMFSend CallId: {0} DTMFString: \"{1}\"", GetCallId(), s)); - } - } - - public void SelectPresentationSource(int source) - { - PresentationSource = source; - - StartSharing(); - } - - /// - /// Select source 1 as the presetnation source - /// - public void SelectPresentationSource1() - { - SelectPresentationSource(2); - } - - /// - /// Select source 2 as the presetnation source - /// - public void SelectPresentationSource2() - { - SelectPresentationSource(3); - } - - /// - /// Starts presentation sharing - /// - public override void StartSharing() - { - string sendingMode = string.Empty; - - if (IsInCall) - sendingMode = "LocalRemote"; - else - sendingMode = "LocalOnly"; - - if(PresentationSource > 0) - SendText(string.Format("xCommand Presentation Start PresentationSource: {0} SendingMode: {1}", PresentationSource, sendingMode)); - } - - /// - /// Stops sharing the current presentation - /// - public override void StopSharing() - { - PresentationSource = 0; - - SendText("xCommand Presentation Stop"); - } - - public override void PrivacyModeOn() - { - SendText("xCommand Audio Microphones Mute"); - } - - public override void PrivacyModeOff() - { - SendText("xCommand Audio Microphones Unmute"); - } - - public override void PrivacyModeToggle() - { - SendText("xCommand Audio Microphones ToggleMute"); - } - - public override void MuteOff() - { - SendText("xCommand Audio Volume Unmute"); - } - - public override void MuteOn() - { - SendText("xCommand Audio Volume Mute"); - } - - public override void MuteToggle() - { - SendText("xCommand Audio Volume ToggleMute"); - } - - /// - /// Increments the voluem - /// - /// - public override void VolumeUp(bool pressRelease) - { - SendText("xCommand Audio Volume Increase"); - } - - /// - /// Decrements the volume - /// - /// - public override void VolumeDown(bool pressRelease) - { - SendText("xCommand Audio Volume Decrease"); - } - - /// - /// Scales the level and sets the codec to the specified level within its range - /// - /// level from slider (0-65535 range) - public override void SetVolume(ushort level) - { - var scaledLevel = CrestronEnvironment.ScaleWithLimits(level, 65535, 0, 100, 0); - SendText(string.Format("xCommand Audio Volume Set Level: {0}", scaledLevel)); - } - - /// - /// Recalls the default volume on the codec - /// - public void VolumeSetToDefault() - { - SendText("xCommand Audio Volume SetToDefault"); - } - - /// - /// Puts the codec in standby mode - /// - public override void StandbyActivate() - { - SendText("xCommand Standby Activate"); - } - - /// - /// Wakes the codec from standby - /// - public override void StandbyDeactivate() - { - SendText("xCommand Standby Deactivate"); - } - - /// - /// Reboots the codec - /// - public void Reboot() - { - SendText("xCommand SystemUnit Boot Action: Restart"); - } - - /// - /// Sets SelfView Mode based on config - /// - void SetSelfViewMode() - { - if (!IsInCall) - { - SelfviewModeOff(); - } - else - { - if (ShowSelfViewByDefault) - SelfviewModeOn(); - else - SelfviewModeOff(); - } - } - - /// - /// Turns on Selfview Mode - /// - public void SelfviewModeOn() - { - SendText("xCommand Video Selfview Set Mode: On"); - } - - /// - /// Turns off Selfview Mode - /// - public void SelfviewModeOff() - { - SendText("xCommand Video Selfview Set Mode: Off"); - } - - /// - /// Toggles Selfview mode on/off - /// - public void SelfviewModeToggle() - { - string mode = string.Empty; - - if (CodecStatus.Status.Video.Selfview.Mode.BoolValue) - mode = "Off"; - else - mode = "On"; - - SendText(string.Format("xCommand Video Selfview Set Mode: {0}", mode)); - } - - /// - /// Sets a specified position for the selfview PIP window - /// - /// - public void SelfviewPipPositionSet(CodecCommandWithLabel position) - { - SendText(string.Format("xCommand Video Selfview Set Mode: On PIPPosition: {0}", position.Command)); - } - - /// - /// Toggles to the next selfview PIP position - /// - public void SelfviewPipPositionToggle() - { - if (CurrentSelfviewPipPosition != null) - { - var nextPipPositionIndex = SelfviewPipPositions.IndexOf(CurrentSelfviewPipPosition) + 1; - - if (nextPipPositionIndex >= SelfviewPipPositions.Count) // Check if we need to loop back to the first item in the list - nextPipPositionIndex = 0; - - SelfviewPipPositionSet(SelfviewPipPositions[nextPipPositionIndex]); - } - } - - /// - /// Sets a specific local layout - /// - /// - public void LocalLayoutSet(CodecCommandWithLabel layout) - { - SendText(string.Format("xCommand Video Layout LayoutFamily Set Target: local LayoutFamily: {0}", layout.Command)); - } - - /// - /// Toggles to the next local layout - /// - public void LocalLayoutToggle() - { - if(CurrentLocalLayout != null) - { - var nextLocalLayoutIndex = LocalLayouts.IndexOf(CurrentLocalLayout) + 1; - - if (nextLocalLayoutIndex >= LocalLayouts.Count) // Check if we need to loop back to the first item in the list - nextLocalLayoutIndex = 0; - - LocalLayoutSet(LocalLayouts[nextLocalLayoutIndex]); - } - } - - /// - /// - /// - public void MinMaxLayoutToggle() - { - if (PresentationViewMaximizedFeedback.BoolValue) - CurrentPresentationView = "Minimized"; - else - CurrentPresentationView = "Maximized"; - - SendText(string.Format("xCommand Video PresentationView Set View: {0}", CurrentPresentationView)); - PresentationViewMaximizedFeedback.FireUpdate(); - } - - /// - /// Calculates the current selfview PIP position - /// - void ComputeSelfviewPipStatus() - { - CurrentSelfviewPipPosition = SelfviewPipPositions.FirstOrDefault(p => p.Command.ToLower().Equals(CodecStatus.Status.Video.Selfview.PIPPosition.Value.ToLower())); - - if(CurrentSelfviewPipPosition != null) - SelfviewIsOnFeedback.FireUpdate(); - } - - /// - /// Calculates the current local Layout - /// - void ComputeLocalLayout() - { - CurrentLocalLayout = LocalLayouts.FirstOrDefault(l => l.Command.ToLower().Equals(CodecStatus.Status.Video.Layout.LayoutFamily.Local.Value.ToLower())); - - if (CurrentLocalLayout != null) - LocalLayoutFeedback.FireUpdate(); - } - - public void RemoveCallHistoryEntry(CodecCallHistory.CallHistoryEntry entry) - { - SendText(string.Format("xCommand CallHistory DeleteEntry CallHistoryId: {0} AcknowledgeConsecutiveDuplicates: True", entry.OccurrenceHistoryId)); - } - - public class CiscoCodecInfo : VideoCodecInfo - { - public CiscoCodecStatus.RootObject CodecStatus { get; private set; } - - public CiscoCodecConfiguration.RootObject CodecConfiguration { get; private set; } - - public override bool MultiSiteOptionIsEnabled - { - get - { - if (CodecStatus.Status.SystemUnit.Software.OptionKeys.MultiSite.Value.ToLower() == "true") - return true; - else - return false; - } - - } - public override string IpAddress - { - get - { - if (CodecConfiguration.Configuration.Network != null) - { - if (CodecConfiguration.Configuration.Network.Count > 0) - return CodecConfiguration.Configuration.Network[0].IPv4.Address.Value; - } - return string.Empty; - } - } - public override string E164Alias - { - get - { - if (CodecConfiguration.Configuration.H323.H323Alias.E164 != null) - return CodecConfiguration.Configuration.H323.H323Alias.E164.Value; - else - return string.Empty; - } - } - public override string H323Id - { - get - { - if (CodecConfiguration.Configuration.H323.H323Alias.ID != null) - return CodecConfiguration.Configuration.H323.H323Alias.ID.Value; - else - return string.Empty; - } - } - public override string SipPhoneNumber - { - get - { - if (CodecStatus.Status.SIP.Registration.Count > 0) - { - var match = Regex.Match(CodecStatus.Status.SIP.Registration[0].URI.Value, @"(\d+)"); // extract numbers only - if (match.Success) - { - Debug.Console(1, "Extracted phone number as '{0}' from string '{1}'", match.Groups[1].Value, CodecStatus.Status.SIP.Registration[0].URI.Value); - return match.Groups[1].Value; - } - else - { - Debug.Console(1, "Unable to extract phone number from string: '{0}'", CodecStatus.Status.SIP.Registration[0].URI.Value); - return string.Empty; - } - } - else - { - Debug.Console(1, "Unable to extract phone number. No SIP Registration items found"); - return string.Empty; - } - } - } - public override string SipUri - { - get - { - if (CodecStatus.Status.SIP.AlternateURI.Primary.URI.Value != null) - return CodecStatus.Status.SIP.AlternateURI.Primary.URI.Value; - else - return string.Empty; - } - } - public override bool AutoAnswerEnabled - { - get - { - if (CodecConfiguration.Configuration.Conference.AutoAnswer.Mode.Value.ToLower() == "on") - return true; - else - return false; - } - } - - public CiscoCodecInfo(CiscoCodecStatus.RootObject status, CiscoCodecConfiguration.RootObject configuration) - { - CodecStatus = status; - CodecConfiguration = configuration; - } - } - } - - /// - /// Represents a codec command that might need to have a friendly label applied for UI feedback purposes - /// - public class CodecCommandWithLabel - { - public string Command { get; set; } - public string Label { get; set; } - - public CodecCommandWithLabel(string command, string label) - { - Command = command; - Label = label; - } - } - - /// - /// Tracks the initial sycnronization state of the codec when making a connection - /// - public class CodecSyncState : IKeyed - { - bool _InitialSyncComplete; - - public event EventHandler InitialSyncCompleted; - - public string Key { get; private set; } - - public bool InitialSyncComplete - { - get { return _InitialSyncComplete; } - private set - { - if (value == true) - { - var handler = InitialSyncCompleted; - if (handler != null) - handler(this, new EventArgs()); - } - _InitialSyncComplete = value; - } - } - - public bool InitialStatusMessageWasReceived { get; private set; } - - public bool InitialConfigurationMessageWasReceived { get; private set; } - - public bool FeedbackWasRegistered { get; private set; } - - public CodecSyncState(string key) - { - Key = key; - CodecDisconnected(); - } - - public void InitialStatusMessageReceived() - { - InitialStatusMessageWasReceived = true; - Debug.Console(1, this, "Initial Codec Status Message Received."); - CheckSyncStatus(); - } - - public void InitialConfigurationMessageReceived() - { - InitialConfigurationMessageWasReceived = true; - Debug.Console(1, this, "Initial Codec Configuration Message Received."); - CheckSyncStatus(); - } - - public void FeedbackRegistered() - { - FeedbackWasRegistered = true; - Debug.Console(1, this, "Initial Codec Feedback Registration Successful."); - CheckSyncStatus(); - } - - public void CodecDisconnected() - { - InitialConfigurationMessageWasReceived = false; - InitialStatusMessageWasReceived = false; - FeedbackWasRegistered = false; - InitialSyncComplete = false; - } - - void CheckSyncStatus() - { - if (InitialConfigurationMessageWasReceived && InitialStatusMessageWasReceived && FeedbackWasRegistered) - { - InitialSyncComplete = true; - Debug.Console(1, this, "Initial Codec Sync Complete!"); - } - else - InitialSyncComplete = false; - } - } - -} \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CodecActiveCallItem.cs.orig b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CodecActiveCallItem.cs.orig deleted file mode 100644 index 4b47d127..00000000 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CodecActiveCallItem.cs.orig +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -namespace PepperDash.Essentials.Devices.Common.VideoCodec - -{ - public class CodecActiveCallItem - { - public string Name { get; set; } - - public string Number { get; set; } - -<<<<<<< HEAD - public eCodecCallType Type { get; private set; } - - public CodecActiveCallItem(string name, string number, eCodecCallType type) - { - Name = name; - Number = number; - Type = type; - } -======= - public eCodecCallType Type { get; set; } - - public eCodecCallStatus Status { get; set; } - - public string Id { get; set; } ->>>>>>> origin/feature/cisco-spark-2 - } - - public enum eCodecCallType - { - None, Audio, Video - } - - public enum eCodecCallStatus - { - Dialing, Established, Incoming - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVC.cs.orig b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVC.cs.orig deleted file mode 100644 index f70988dd..00000000 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVC.cs.orig +++ /dev/null @@ -1,250 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -using PepperDash.Core; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Devices.Common.VideoCodec -{ - public class MockVC : VideoCodecBase - { - public MockVC(string key, string name) - : base(key, name) - { - // Debug helpers - ActiveCallCountFeedback.OutputChange += (o, a) => Debug.Console(1, this, "InCall={0}", ActiveCallCountFeedback.IntValue); - IncomingCallFeedback.OutputChange += (o, a) => Debug.Console(1, this, "IncomingCall={0}", _IncomingCall); - MuteFeedback.OutputChange += (o, a) => Debug.Console(1, this, "Mute={0}", _IsMuted); - PrivacyModeIsOnFeedback.OutputChange += (o, a) => Debug.Console(1, this, "Privacy={0}", _PrivacyModeIsOn); - SharingSourceFeedback.OutputChange += (o, a) => Debug.Console(1, this, "SharingSource={0}", _SharingSource); - VolumeLevelFeedback.OutputChange += (o, a) => Debug.Console(1, this, "Volume={0}", _VolumeLevel); - } - - protected override Func ActiveCallCountFeedbackFunc - { - get { return () => ActiveCalls.Count; } - } - - protected override Func IncomingCallFeedbackFunc - { - get { return () => _IncomingCall; } - } - bool _IncomingCall; - - protected override Func MuteFeedbackFunc - { - get { return () => _IsMuted; } - } - bool _IsMuted; - - protected override Func PrivacyModeIsOnFeedbackFunc - { - get { return () => _PrivacyModeIsOn; } - } - bool _PrivacyModeIsOn; - - protected override Func SharingSourceFeedbackFunc - { - get { return () => _SharingSource; } - } - string _SharingSource; - - protected override Func VolumeLevelFeedbackFunc - { - get { return () => _VolumeLevel; } - } - int _VolumeLevel; - - /// - /// Dials, yo! - /// - public override void Dial(string s) - { - Debug.Console(1, this, "Dial: {0}", s); - ActiveCalls.Add(new CodecActiveCallItem(s,s, eCodecCallType.Video)); - ActiveCallCountFeedback.FireUpdate(); - } - - /// - /// - /// - public override void EndCall(CodecActiveCallItem activeCall) - { - Debug.Console(1, this, "EndCall"); - ActiveCalls.RemoveAll(i => i.Name == s); - ActiveCallCountFeedback.FireUpdate(); - //_InCall = false; - //IsInCall.FireUpdate(); - } - - public override void EndAllCalls() - { - - } - - /// - /// For a call from the test methods below - /// - public override void AcceptCall() - { - Debug.Console(1, this, "AcceptCall"); - } - - /// - /// For a call from the test methods below - /// - public override void RejectCall() - { - Debug.Console(1, this, "RejectCall"); - } - - /// - /// Makes horrible tones go out on the wire! - /// - /// - public override void SendDtmf(string s) - { - Debug.Console(1, this, "SendDTMF: {0}", s); - } - - /// - /// - /// - public override void StartSharing() - { - } - - /// - /// - /// - public override void StopSharing() - { - } - - /// - /// Called by routing to make it happen - /// - /// - public override void ExecuteSwitch(object selector) - { - Debug.Console(1, this, "ExecuteSwitch"); - _SharingSource = selector.ToString(); - - } - - /// - /// - /// - public override void MuteOff() - { - _IsMuted = false; - MuteFeedback.FireUpdate(); - } - - /// - /// - /// - public override void MuteOn() - { - _IsMuted = true; - MuteFeedback.FireUpdate(); - } - - /// - /// - /// - public override void MuteToggle() - { - _IsMuted = !_IsMuted; - MuteFeedback.FireUpdate(); - } - - /// - /// - /// - /// - public override void SetVolume(ushort level) - { - _VolumeLevel = level; - VolumeLevelFeedback.FireUpdate(); - } - - /// - /// - /// - /// - public override void VolumeDown(bool pressRelease) - { - } - - /// - /// - /// - /// - public override void VolumeUp(bool pressRelease) - { - } - - /// - /// - /// - public override void PrivacyModeOn() - { - Debug.Console(1, this, "PrivacyMuteOn"); - if (_PrivacyModeIsOn) - return; - _PrivacyModeIsOn = true; - PrivacyModeIsOnFeedback.FireUpdate(); - - } - - /// - /// - /// - public override void PrivacyModeOff() - { - Debug.Console(1, this, "PrivacyMuteOff"); - if (!_PrivacyModeIsOn) - return; - _PrivacyModeIsOn = false; - PrivacyModeIsOnFeedback.FireUpdate(); - } - - /// - /// - /// - public override void PrivacyModeToggle() - { - _PrivacyModeIsOn = !_PrivacyModeIsOn; - Debug.Console(1, this, "PrivacyMuteToggle: {0}", _PrivacyModeIsOn); - PrivacyModeIsOnFeedback.FireUpdate(); - } - - //******************************************************** - // SIMULATION METHODS - - /// - /// - /// - /// - public void TestIncomingCall(string url) - { - Debug.Console(1, this, "TestIncomingCall"); - - _IncomingCall = true; - IncomingCallFeedback.FireUpdate(); - } - - /// - /// - /// - public void TestFarEndHangup() - { - Debug.Console(1, this, "TestFarEndHangup"); - - } - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs.orig b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs.orig deleted file mode 100644 index e13bb133..00000000 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs.orig +++ /dev/null @@ -1,152 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -using PepperDash.Core; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Devices.Common.VideoCodec -{ - public abstract class VideoCodecBase : Device, IRoutingSinkWithSwitching, IUsageTracking, IHasDialer, IHasSharing, ICodecAudio - { - #region IUsageTracking Members - - /// - /// This object can be added by outside users of this class to provide usage tracking - /// for various services - /// - public UsageTracking UsageTracker { get; set; } - - #endregion - - #region IRoutingInputs Members - - public RoutingPortCollection InputPorts { get; private set; } - - #endregion - - /// - /// Returns true when ActiveCallCountFeedback is > 0 - /// - public bool IsInCall { get { return ActiveCallCountFeedback.IntValue > 0; } } - - public BoolFeedback IncomingCallFeedback { get; private set; } - - public IntFeedback ActiveCallCountFeedback { get; private set; } - - abstract protected Func ActiveCallCountFeedbackFunc { get; } - abstract protected Func IncomingCallFeedbackFunc { get; } - abstract protected Func PrivacyModeIsOnFeedbackFunc { get; } - abstract protected Func VolumeLevelFeedbackFunc { get; } - abstract protected Func MuteFeedbackFunc { get; } - abstract protected Func SharingSourceFeedbackFunc { get; } - - public List ActiveCalls { get; set; } - - public VideoCodecBase(string key, string name) - : base(key, name) - { - ActiveCallCountFeedback = new IntFeedback(ActiveCallCountFeedbackFunc); - IncomingCallFeedback = new BoolFeedback(IncomingCallFeedbackFunc); - PrivacyModeIsOnFeedback = new BoolFeedback(PrivacyModeIsOnFeedbackFunc); - VolumeLevelFeedback = new IntFeedback(VolumeLevelFeedbackFunc); - MuteFeedback = new BoolFeedback(MuteFeedbackFunc); - SharingSourceFeedback = new StringFeedback(SharingSourceFeedbackFunc); - - InputPorts = new RoutingPortCollection(); - - ActiveCallCountFeedback.OutputChange += new EventHandler(ActiveCallCountFeedback_OutputChange); - - ActiveCalls = new List(); - } - - /// - /// - /// - /// - /// - void ActiveCallCountFeedback_OutputChange(object sender, EventArgs e) - { - if (UsageTracker != null) - { - if (IsInCall) - UsageTracker.StartDeviceUsage(); - else - UsageTracker.EndDeviceUsage(); - } - } - #region IHasDialer Members - - public abstract void Dial(string s); -<<<<<<< HEAD - public abstract void EndCall(string s); -======= - public void EndCall(object activeCall) - { - - } - public abstract void EndCall(CodecActiveCallItem activeCall); - public abstract void EndAllCalls(); ->>>>>>> origin/feature/cisco-spark-2 - public abstract void AcceptCall(); - public abstract void RejectCall(); - public abstract void SendDtmf(string s); - - #endregion - - public virtual List Feedbacks - { - get - { - return new List - { - IncomingCallFeedback, - PrivacyModeIsOnFeedback, - SharingSourceFeedback - }; - } - } - - public abstract void ExecuteSwitch(object selector); - - #region ICodecAudio Members - - public abstract void PrivacyModeOn(); - public abstract void PrivacyModeOff(); - public abstract void PrivacyModeToggle(); - public BoolFeedback PrivacyModeIsOnFeedback { get; private set; } - - - public BoolFeedback MuteFeedback { get; private set; } - - public abstract void MuteOff(); - - public abstract void MuteOn(); - - public abstract void SetVolume(ushort level); - - public IntFeedback VolumeLevelFeedback { get; private set; } - - public abstract void MuteToggle(); - - public abstract void VolumeDown(bool pressRelease); - - - public abstract void VolumeUp(bool pressRelease); - - #endregion - - #region IHasSharing Members - - public abstract void StartSharing(); - public abstract void StopSharing(); - - public StringFeedback SharingSourceFeedback { get; private set; } - - #endregion - - - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials Framework.sln b/essentials-framework/Essentials Framework.sln deleted file mode 100644 index c508ad29..00000000 --- a/essentials-framework/Essentials Framework.sln +++ /dev/null @@ -1,32 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDash_Essentials_Core", ".\Essentials Core\PepperDashEssentialsBase\PepperDash_Essentials_Core.csproj", "{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Essentials_DM", ".\Essentials DM\Essentials_DM\Essentials_DM.csproj", "{9199CE8A-0C9F-4952-8672-3EED798B284F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Essentials Devices Common", ".\Essentials Devices Common\Essentials Devices Common\Essentials Devices Common.csproj", "{892B761C-E479-44CE-BD74-243E9214AF13}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {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}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}.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.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.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.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.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/essentials-framework/Essentials Interfaces/PepperDash_Essentials_Interfaces/PepperDash_Essentials_Interfaces.csproj b/essentials-framework/Essentials Interfaces/PepperDash_Essentials_Interfaces/PepperDash_Essentials_Interfaces.csproj deleted file mode 100644 index 1ccb318d..00000000 --- a/essentials-framework/Essentials Interfaces/PepperDash_Essentials_Interfaces/PepperDash_Essentials_Interfaces.csproj +++ /dev/null @@ -1,70 +0,0 @@ - - - Release - AnyCPU - 9.0.30729 - 2.0 - {E51D7C84-4906-486C-B2BA-EEB3B4E9731B} - Library - Properties - PepperDash.Essentials.Interfaces - PepperDash_Essentials_Interfaces - {0B4745B0-194B-4BB6-8E21-E9057CA92500};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - WindowsCE - E2BECB1F-8C8C-41ba-B736-9BE7D946A398 - 5.0 - SmartDeviceProject1 - v3.5 - Windows CE - - - - - .allowedReferenceRelatedFileExtensions - true - full - false - bin\ - DEBUG;TRACE; - prompt - 4 - 512 - true - true - off - - - .allowedReferenceRelatedFileExtensions - none - true - bin\Release\ - prompt - 4 - 512 - true - true - off - - - - - False - ..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll - - - False - ..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll - - - - - - - - - - - - rem S# preparation will execute after these operations - - \ No newline at end of file diff --git a/essentials-framework/Essentials Interfaces/PepperDash_Essentials_Interfaces/Properties/AssemblyInfo.cs b/essentials-framework/Essentials Interfaces/PepperDash_Essentials_Interfaces/Properties/AssemblyInfo.cs deleted file mode 100644 index 1b02c1cb..00000000 --- a/essentials-framework/Essentials Interfaces/PepperDash_Essentials_Interfaces/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System.Reflection; - -[assembly: AssemblyTitle("PepperDash_Essentials_Interfaces")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("PepperDash_Essentials_Interfaces")] -[assembly: AssemblyCopyright("Copyright © 2020")] -[assembly: AssemblyVersion("1.0.0.*")] - diff --git a/essentials-framework/Essentials Interfaces/PepperDash_Essentials_Interfaces/Properties/ControlSystem.cfg b/essentials-framework/Essentials Interfaces/PepperDash_Essentials_Interfaces/Properties/ControlSystem.cfg deleted file mode 100644 index e69de29b..00000000 diff --git a/essentials-framework/Essentials/PepperDashEssentials/Bridges/Bridges.BridgeFactory.cs b/essentials-framework/Essentials/PepperDashEssentials/Bridges/Bridges.BridgeFactory.cs deleted file mode 100644 index f65d4e65..00000000 --- a/essentials-framework/Essentials/PepperDashEssentials/Bridges/Bridges.BridgeFactory.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; -using PepperDash.Core; -using PepperDash.Essentials.Core.Routing; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.EthernetCommunication; - -namespace PepperDash.Essentials { - public class BridgeFactory { - public static IKeyed GetDevice(PepperDash.Essentials.Core.Config.DeviceConfig dc) { - // ? why is this static JTA 2018-06-13? - - var key = dc.Key; - var name = dc.Name; - var type = dc.Type; - var properties = dc.Properties; - var propAnon = new { }; - JsonConvert.DeserializeAnonymousType(dc.Properties.ToString(), propAnon); - - var typeName = dc.Type.ToLower(); - var groupName = dc.Group.ToLower(); - - Debug.Console(0, "Name {0}, Key {1}, Type {2}, Properties {3}", name, key, type, properties.ToString()); - if (typeName == "essentialdm") { - return new EssentialDM(key, name, properties); - } else if (typeName == "essentialcomm") { - - Debug.Console(0, "Launch Essential Comm"); - return new EssentialComm(key, name, properties); - - } - return null; - } - } - public class BridgeApiEisc { - public uint Ipid; - public ThreeSeriesTcpIpEthernetIntersystemCommunications Eisc; - public BridgeApiEisc(string ipid) { - Ipid = (UInt32)int.Parse(ipid, System.Globalization.NumberStyles.HexNumber); - Eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(Ipid, "127.0.0.2", Global.ControlSystem); - Eisc.Register(); - Eisc.SigChange += Eisc_SigChange; - Debug.Console(0, "BridgeApiEisc Created at Ipid {0}", ipid); - } - void Eisc_SigChange(object currentDevice, Crestron.SimplSharpPro.SigEventArgs args) { - if (Debug.Level >= 1) - Debug.Console(1, "DDVC EISC change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue); - var uo = args.Sig.UserObject; - if (uo is Action) - (uo as Action)(args.Sig.BoolValue); - else if (uo is Action) - (uo as Action)(args.Sig.UShortValue); - else if (uo is Action) - (uo as Action)(args.Sig.StringValue); - } - } - - } - - - - \ No newline at end of file diff --git a/essentials-framework/Essentials/PepperDashEssentials/Bridges/EssentialComms.cs b/essentials-framework/Essentials/PepperDashEssentials/Bridges/EssentialComms.cs deleted file mode 100644 index 9102a1e2..00000000 --- a/essentials-framework/Essentials/PepperDashEssentials/Bridges/EssentialComms.cs +++ /dev/null @@ -1,138 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; -using PepperDash.Core; -using PepperDash.Essentials.Core.Routing; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.EthernetCommunication; -using Crestron.SimplSharpPro.CrestronThread; - -namespace PepperDash.Essentials { - public class EssentialCommConfig { - public string[] EiscApiIpids; - public EssentialCommCommConnectionConfigs[] CommConnections; - } - public class EssentialCommCommConnectionConfigs { - public uint joinNumber {get; set; } - public EssentialsControlPropertiesConfig control { get; set; } - } - - public class EssentialCommsPort { - public IBasicCommunication Comm; - public IntFeedback StatusFeedback; - public BoolFeedback ConnectedFeedback; - public List Outputs = new List(); - public String RxBuffer; - public EssentialCommsPort(EssentialsControlPropertiesConfig config, string keyPrefix) { - Comm = CommFactory.CreateCommForConfig(config, keyPrefix); - // var PortGather = new CommunicationGather(Comm, config.EndOfLineChar); - Comm.TextReceived += new EventHandler(Communication_TextReceived); - - var socket = Comm as ISocketStatus; - StatusFeedback = new IntFeedback(() => { return (int)socket.ClientStatus; }); - ConnectedFeedback = new BoolFeedback(() => { return Comm.IsConnected; }); - - if (socket != null) { - socket.ConnectionChange += new EventHandler(socket_ConnectionChange); - } else { - } - - } - void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e) { - StatusFeedback.FireUpdate(); - ConnectedFeedback.FireUpdate(); - if (e.Client.IsConnected) { - // Tasks on connect - } else { - // Cleanup items from this session - } - } - void Communication_TextReceived(object sender, GenericCommMethodReceiveTextArgs args) { - try { - foreach (var Output in Outputs) { - Output.Api.Eisc.StringInput[Output.Join].StringValue = args.Text; - } - - } - catch (Exception) { - throw new FormatException(string.Format("ERROR:{0}")); - } - } - } - - public class EssentialComm : Device { - public EssentialCommConfig Properties; - public String Key; - public CommunicationGather PortGather { get; private set; } - public List Apis {get; set;} - public Dictionary CommFeedbacks {get; private set; } - public StatusMonitorBase CommunicationMonitor { get; private set; } - public Dictionary CommDictionary { get; private set; } - - public EssentialComm(string key, string name, JToken properties) : base(key, name) { - Properties = JsonConvert.DeserializeObject(properties.ToString()); - CommFeedbacks = new Dictionary(); - CommDictionary = new Dictionary(); - Apis = new List(); - Key = key; - - } - - - - public override bool CustomActivate() - { - int commNumber = 1; - foreach (var commConfig in Properties.CommConnections) { - var commPort = new EssentialCommsPort(commConfig.control, string.Format("{0}-{1}", Key, commConfig.joinNumber)); - CommDictionary.Add(commConfig.joinNumber, commPort); - commNumber++; - } - - foreach (var Ipid in Properties.EiscApiIpids) { - var ApiEisc = new BridgeApiEisc(Ipid); - Apis.Add(ApiEisc); - foreach (var commConnection in CommDictionary) { - Debug.Console(0, "Joining Api{0} to comm {1}", Ipid, commConnection.Key); - var tempComm = commConnection.Value; - var tempJoin = (uint)commConnection.Key; - EssentialComApiMap ApiMap = new EssentialComApiMap(ApiEisc, (uint)tempJoin); - - tempComm.Outputs.Add(ApiMap); - // Check for ApiMap Overide Values here - - ApiEisc.Eisc.SetBoolSigAction(tempJoin, b => { - if (b) { tempComm.Comm.Connect(); } else { tempComm.Comm.Disconnect(); } - }); - ApiEisc.Eisc.SetStringSigAction(tempJoin, s => tempComm.Comm.SendText(s)); - - tempComm.StatusFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[tempJoin]); - tempComm.ConnectedFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[tempJoin]); - - - - } - - } - - return true; - } - - - } - public class EssentialComApiMap { - public uint Join; - public BridgeApiEisc Api; - public uint connectJoin; - public EssentialComApiMap(BridgeApiEisc api, uint join) { - Join = join; - Api = api; - } - } - } \ No newline at end of file diff --git a/essentials-framework/Essentials/PepperDashEssentials/Bridges/EssentialDM.cs b/essentials-framework/Essentials/PepperDashEssentials/Bridges/EssentialDM.cs deleted file mode 100644 index f6484ca1..00000000 --- a/essentials-framework/Essentials/PepperDashEssentials/Bridges/EssentialDM.cs +++ /dev/null @@ -1,120 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; -using PepperDash.Core; -using PepperDash.Essentials.Core.Routing; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.EthernetCommunication; - -namespace PepperDash.Essentials { - public class EssentialDM : PepperDash.Core.Device { - public EssentialDMProperties Properties; - public List BridgeApiEiscs; - private PepperDash.Essentials.DM.DmChassisController DmSwitch; - private EssentialDMApiMap ApiMap = new EssentialDMApiMap(); - public EssentialDM(string key, string name, JToken properties) - : base(key, name) { - Properties = JsonConvert.DeserializeObject(properties.ToString()); - - - } - public override bool CustomActivate() { - // Create EiscApis - try { - foreach (var device in DeviceManager.AllDevices) { - if (device.Key == this.Properties.connectionDeviceKey) { - Debug.Console(0, "deviceKey {0} Matches", device.Key); - DmSwitch = DeviceManager.GetDeviceForKey(device.Key) as PepperDash.Essentials.DM.DmChassisController; - - } else { - Debug.Console(0, "deviceKey {0} doesn't match", device.Key); - } - } - if (Properties.EiscApiIpids != null) { - foreach (string Ipid in Properties.EiscApiIpids) { - var ApiEisc = new BridgeApiEisc(Ipid); - // BridgeApiEiscs.Add(ApiEisc); - //Essentials.Core.CommFactory.CreateCommForConfig(); - - ApiEisc.Eisc.SetUShortSigAction(ApiMap.OutputVideoRoutes[1], u => DmSwitch.ExecuteSwitch(u, 1, eRoutingSignalType.Video)); - ApiEisc.Eisc.SetUShortSigAction(ApiMap.OutputVideoRoutes[2], u => DmSwitch.ExecuteSwitch(u, 2, eRoutingSignalType.Video)); - ApiEisc.Eisc.SetUShortSigAction(ApiMap.OutputVideoRoutes[3], u => DmSwitch.ExecuteSwitch(u, 3, eRoutingSignalType.Video)); - ApiEisc.Eisc.SetUShortSigAction(ApiMap.OutputVideoRoutes[4], u => DmSwitch.ExecuteSwitch(u, 4, eRoutingSignalType.Video)); - ApiEisc.Eisc.SetUShortSigAction(ApiMap.OutputVideoRoutes[5], u => DmSwitch.ExecuteSwitch(u, 5, eRoutingSignalType.Video)); - ApiEisc.Eisc.SetUShortSigAction(ApiMap.OutputVideoRoutes[6], u => DmSwitch.ExecuteSwitch(u, 6, eRoutingSignalType.Video)); - ApiEisc.Eisc.SetUShortSigAction(ApiMap.OutputVideoRoutes[7], u => DmSwitch.ExecuteSwitch(u, 7, eRoutingSignalType.Video)); - ApiEisc.Eisc.SetUShortSigAction(ApiMap.OutputVideoRoutes[8], u => DmSwitch.ExecuteSwitch(u, 8, eRoutingSignalType.Video)); - - ApiEisc.Eisc.SetUShortSigAction(ApiMap.OutputAudioRoutes[1], u => DmSwitch.ExecuteSwitch(u, 1, eRoutingSignalType.Audio)); - ApiEisc.Eisc.SetUShortSigAction(ApiMap.OutputAudioRoutes[2], u => DmSwitch.ExecuteSwitch(u, 2, eRoutingSignalType.Audio)); - ApiEisc.Eisc.SetUShortSigAction(ApiMap.OutputAudioRoutes[3], u => DmSwitch.ExecuteSwitch(u, 3, eRoutingSignalType.Audio)); - ApiEisc.Eisc.SetUShortSigAction(ApiMap.OutputAudioRoutes[4], u => DmSwitch.ExecuteSwitch(u, 4, eRoutingSignalType.Audio)); - ApiEisc.Eisc.SetUShortSigAction(ApiMap.OutputAudioRoutes[5], u => DmSwitch.ExecuteSwitch(u, 5, eRoutingSignalType.Audio)); - ApiEisc.Eisc.SetUShortSigAction(ApiMap.OutputAudioRoutes[6], u => DmSwitch.ExecuteSwitch(u, 6, eRoutingSignalType.Audio)); - ApiEisc.Eisc.SetUShortSigAction(ApiMap.OutputAudioRoutes[7], u => DmSwitch.ExecuteSwitch(u, 7, eRoutingSignalType.Audio)); - ApiEisc.Eisc.SetUShortSigAction(ApiMap.OutputAudioRoutes[8], u => DmSwitch.ExecuteSwitch(u, 8, eRoutingSignalType.Audio)); - - foreach (var output in DmSwitch.Chassis.Outputs) { - Debug.Console(0, "Creating EiscActions {0}", output.Number); - - DmSwitch.InputEndpointOnlineFeedbacks[(ushort)output.Number].LinkInputSig(ApiEisc.Eisc.BooleanInput[(ushort)(output.Number + 300)]); - - - /* This wont work...routes to 8 every time i tried for loops, forweach. For some reason the test number keeps going to max value of the loop - * always routing testNum to MaxLoopValue, the above works though.*/ - - for (uint testNum = 1; testNum < 8; testNum++) { - uint num = testNum; - ApiEisc.Eisc.SetUShortSigAction((ushort)(output.Number + 300), u => DmSwitch.ExecuteSwitch(u, num, eRoutingSignalType.Audio)); - ApiEisc.Eisc.SetUShortSigAction((ushort)(output.Number + 100), u => DmSwitch.ExecuteSwitch(u, num, eRoutingSignalType.Video)); - } - - DmSwitch.OutputRouteFeedbacks[(ushort)output.Number].LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.OutputVideoRoutes[(int)output.Number]]); - } - DmSwitch.IsOnline.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.ChassisOnline]); - ApiEisc.Eisc.Register(); - } - } - - - - Debug.Console(0, "Name {0} Activated", this.Name); - return true; - } catch (Exception e) { - Debug.Console(0, "BRidge {0}", e); - return false; - } - } - } - public class EssentialDMProperties { - public string connectionDeviceKey; - public string[] EiscApiIpids; - - - } - - - public class EssentialDMApiMap { - public ushort ChassisOnline = 11; - public Dictionary OutputVideoRoutes; - public Dictionary OutputAudioRoutes; - - public EssentialDMApiMap() { - OutputVideoRoutes = new Dictionary(); - OutputAudioRoutes = new Dictionary(); - - for (int x = 1; x <= 200; x++) { - // Debug.Console(0, "Init Value {0}", x); - OutputVideoRoutes[x] = (ushort)(x + 100); - OutputAudioRoutes[x] = (ushort)(x + 300); - } - } - } - } - \ No newline at end of file diff --git a/essentials-framework/Essentials/PepperDashEssentials/Configuration Original/Factories/DmFactory.cs b/essentials-framework/Essentials/PepperDashEssentials/Configuration Original/Factories/DmFactory.cs deleted file mode 100644 index 0a0d4370..00000000 --- a/essentials-framework/Essentials/PepperDashEssentials/Configuration Original/Factories/DmFactory.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DM; -using Crestron.SimplSharpPro.DM.Endpoints.Receivers; -using Crestron.SimplSharpPro.DM.Endpoints.Transmitters; - -using Newtonsoft.Json.Linq; - -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Devices; -//using PepperDash.Essentials.Devices.Dm; -using PepperDash.Core; - -namespace PepperDash.Essentials -{ - public class DmFactory - { - public static Device Create(JToken devToken) - { - Device dev = null; - try - { - var devType = devToken.Value("type"); - var devKey = devToken.Value("key"); - var devName = devToken.Value("name"); - // Catch all 200 series TX - var devprops = devToken["properties"]; - var ipId = Convert.ToUInt32(devprops.Value("ipId"), 16); - var parent = devprops.Value("parent"); - if (parent == null) - parent = "controlSystem"; - - if (devType.StartsWith("DmTx2", StringComparison.OrdinalIgnoreCase)) - { - DmTx201C tx; - if (parent.Equals("controlSystem", StringComparison.OrdinalIgnoreCase)) - { - tx = new DmTx201C(ipId, Global.ControlSystem); - //dev = new DmTx201SBasicController(devKey, devName, tx); - } - - } - else if (devType.StartsWith("DmRmc", StringComparison.OrdinalIgnoreCase)) - { - DmRmc100C rmc; - if (parent.Equals("controlSystem", StringComparison.OrdinalIgnoreCase)) - { - rmc = new DmRmc100C(ipId, Global.ControlSystem); - //dev = new DmRmcBaseController(devKey, devName, rmc); - } - } - else - FactoryHelper.HandleUnknownType(devToken, devType); - } - catch (Exception e) - { - FactoryHelper.HandleDeviceCreationError(devToken, e); - } - return dev; - } - - - public static Device CreateChassis(JToken devToken) - { - Device dev = null; - try - { - var devType = devToken.Value("type"); - var devKey = devToken.Value("key"); - var devName = devToken.Value("name"); - // Catch all 200 series TX - var devprops = devToken["properties"]; - var ipId = Convert.ToUInt32(devprops.Value("ipId"), 16); - var parent = devprops.Value("parent"); - if (parent == null) - parent = "controlSystem"; - - if (devType.Equals("dmmd8x8", StringComparison.OrdinalIgnoreCase)) - { - var dm = new DmMd8x8(ipId, Global.ControlSystem); - //dev = new DmChassisController(devKey, devName, dm); - } - else if (devType.Equals("dmmd16x16", StringComparison.OrdinalIgnoreCase)) - { - var dm = new DmMd16x16(ipId, Global.ControlSystem); - //dev = new DmChassisController(devKey, devName, dm); - } - } - catch (Exception e) - { - FactoryHelper.HandleDeviceCreationError(devToken, e); - } - return dev; - } - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials/PepperDashEssentials/ControlSystem.cs b/essentials-framework/Essentials/PepperDashEssentials/ControlSystem.cs deleted file mode 100644 index bde618c0..00000000 --- a/essentials-framework/Essentials/PepperDashEssentials/ControlSystem.cs +++ /dev/null @@ -1,309 +0,0 @@ -using System; -using System.Linq; -using Crestron.SimplSharp; -using Crestron.SimplSharp.CrestronIO; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.CrestronThread; -using PepperDash.Core; -// using PepperDash.Core.PortalSync; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Devices.Common; -using PepperDash.Essentials.DM; -using PepperDash.Essentials.Fusion; -using PepperDash.Essentials.Room.Cotija; - -namespace PepperDash.Essentials -{ - public class ControlSystem : CrestronControlSystem - { - // PepperDashPortalSyncClient PortalSync; - HttpLogoServer LogoServer; - - public ControlSystem() - : base() - { - Thread.MaxNumberOfUserThreads = 400; - Global.ControlSystem = this; - DeviceManager.Initialize(this); - } - - /// - /// Git 'er goin' - /// - public override void InitializeSystem() - { - CrestronConsole.AddNewConsoleCommand(s => - { - foreach (var tl in TieLineCollection.Default) - CrestronConsole.ConsoleCommandResponse(" {0}\r", tl); - }, - "listtielines", "Prints out all tie lines", ConsoleAccessLevelEnum.AccessOperator); - - CrestronConsole.AddNewConsoleCommand(s => - { - CrestronConsole.ConsoleCommandResponse - ("Current running configuration. This is the merged system and template configuration"); - CrestronConsole.ConsoleCommandResponse(Newtonsoft.Json.JsonConvert.SerializeObject - (ConfigReader.ConfigObject, Newtonsoft.Json.Formatting.Indented)); - }, "showconfig", "Shows the current running merged config", ConsoleAccessLevelEnum.AccessOperator); - - CrestronConsole.AddNewConsoleCommand(s => - { - CrestronConsole.ConsoleCommandResponse("This system can be found at the following URLs:\r" + - "System URL: {0}\r" + - "Template URL: {1}", ConfigReader.ConfigObject.SystemUrl, ConfigReader.ConfigObject.TemplateUrl); - }, "portalinfo", "Shows portal URLS from configuration", ConsoleAccessLevelEnum.AccessOperator); - - GoWithLoad(); - } - - /// - /// Do it, yo - /// - public void GoWithLoad() - { - try - { - CrestronConsole.AddNewConsoleCommand(EnablePortalSync, "portalsync", "Loads Portal Sync", - ConsoleAccessLevelEnum.AccessOperator); - - //PortalSync = new PepperDashPortalSyncClient(); - - Debug.Console(0, "Starting Essentials load from configuration"); - - var filesReady = SetupFilesystem(); - if (filesReady) - { - Debug.Console(0, "Folder structure verified. Loading config..."); - if (!ConfigReader.LoadConfig2()) - return; - - Load(); - Debug.Console(0, "Essentials load complete\r" + - "-------------------------------------------------------------"); - } - else - { - Debug.Console(0, - "------------------------------------------------\r" + - "------------------------------------------------\r" + - "------------------------------------------------\r" + - "Essentials file structure setup completed.\r" + - "Please load config, sgd and ir files and\r" + - "restart program.\r" + - "------------------------------------------------\r" + - "------------------------------------------------\r" + - "------------------------------------------------"); - } - } - catch (Exception e) - { - Debug.Console(0, "FATAL INITIALIZE ERROR. System is in an inconsistent state:\r{0}", e); - } - - } - - /// - /// Verifies filesystem is set up. IR, SGD, and program1 folders - /// - bool SetupFilesystem() - { - Debug.Console(0, "Verifying and/or creating folder structure"); - var appNum = InitialParametersClass.ApplicationNumber; - var configDir = @"\NVRAM\Program" + appNum; - var configExists = Directory.Exists(configDir); - if (!configExists) - Directory.Create(configDir); - - var irDir = string.Format(@"\NVRAM\Program{0}\ir", appNum); - if (!Directory.Exists(irDir)) - Directory.Create(irDir); - - var sgdDir = string.Format(@"\NVRAM\Program{0}\sgd", appNum); - if (!Directory.Exists(sgdDir)) - Directory.Create(sgdDir); - - return configExists; - } - - public void EnablePortalSync(string s) - { - if (s.ToLower() == "enable") - { - CrestronConsole.ConsoleCommandResponse("Portal Sync features enabled"); - // PortalSync = new PepperDashPortalSyncClient(); - } - } - - public void TearDown() - { - Debug.Console(0, "Tearing down existing system"); - DeviceManager.DeactivateAll(); - - TieLineCollection.Default.Clear(); - - foreach (var key in DeviceManager.GetDevices()) - DeviceManager.RemoveDevice(key); - - Debug.Console(0, "Tear down COMPLETE"); - } - - /// - /// - /// - void Load() - { - LoadDevices(); - LoadTieLines(); - LoadRooms(); - LoadLogoServer(); - - DeviceManager.ActivateAll(); - } - - - /// - /// Reads all devices from config and adds them to DeviceManager - /// - public void LoadDevices() - { - foreach (var devConf in ConfigReader.ConfigObject.Devices) - { - - try - { - Debug.Console(0, "Creating device '{0}'", devConf.Key); - // Skip this to prevent unnecessary warnings - if (devConf.Key == "processor") - continue; - - // Try local factory first - var newDev = DeviceFactory.GetDevice(devConf); - - // Then associated library factories - if (newDev == null) - newDev = PepperDash.Essentials.Devices.Common.DeviceFactory.GetDevice(devConf); - if (newDev == null) - newDev = PepperDash.Essentials.DM.DeviceFactory.GetDevice(devConf); - if (newDev == null) - newDev = PepperDash.Essentials.Devices.Displays.DisplayDeviceFactory.GetDevice(devConf); - if (newDev == null) - newDev = PepperDash.Essentials.BridgeFactory.GetDevice(devConf); - - if (newDev != null) - DeviceManager.AddDevice(newDev); - else - Debug.Console(0, "ERROR: Cannot load unknown device type '{0}', key '{1}'.", devConf.Type, devConf.Key); - } - catch (Exception e) - { - Debug.Console(0, "ERROR: Creating device {0}. Skipping device. \r{1}", devConf.Key, e); - } - } - } - - /// - /// Helper method to load tie lines. This should run after devices have loaded - /// - public void LoadTieLines() - { - // In the future, we can't necessarily just clear here because devices - // might be making their own internal sources/tie lines - - var tlc = TieLineCollection.Default; - //tlc.Clear(); - if (ConfigReader.ConfigObject.TieLines == null) - { - return; - } - - foreach (var tieLineConfig in ConfigReader.ConfigObject.TieLines) - { - var newTL = tieLineConfig.GetTieLine(); - if (newTL != null) - tlc.Add(newTL); - } - } - - /// - /// Reads all rooms from config and adds them to DeviceManager - /// - public void LoadRooms() - { - if (ConfigReader.ConfigObject.Rooms == null) - { - Debug.Console(0, "WARNING: Configuration contains no rooms"); - return; - } - - foreach (var roomConfig in ConfigReader.ConfigObject.Rooms) - { - var room = roomConfig.GetRoomObject(); - if (room != null) - { - if (room is EssentialsHuddleSpaceRoom) - { - DeviceManager.AddDevice(room); - - Debug.Console(1, "Room is EssentialsHuddleSpaceRoom, attempting to add to DeviceManager with Fusion"); - DeviceManager.AddDevice(new EssentialsHuddleSpaceFusionSystemControllerBase((EssentialsHuddleSpaceRoom)room, 0xf1)); - - // Cotija bridge - var bridge = new CotijaEssentialsHuddleSpaceRoomBridge(room as EssentialsHuddleSpaceRoom); - AddBridgePostActivationHelper(bridge); // Lets things happen later when all devices are present - DeviceManager.AddDevice(bridge); - } - else if (room is EssentialsHuddleVtc1Room) - { - DeviceManager.AddDevice(room); - - Debug.Console(1, "Room is EssentialsHuddleVtc1Room, attempting to add to DeviceManager with Fusion"); - DeviceManager.AddDevice(new EssentialsHuddleVtc1FusionController((EssentialsHuddleVtc1Room)room, 0xf1)); - } - else - { - Debug.Console(1, "Room is NOT EssentialsHuddleSpaceRoom, attempting to add to DeviceManager w/o Fusion"); - DeviceManager.AddDevice(room); - } - - } - else - Debug.Console(0, "WARNING: Cannot create room from config, key '{0}'", roomConfig.Key); - } - } - - /// - /// Helps add the post activation steps that link bridges to main controller - /// - /// - void AddBridgePostActivationHelper(CotijaBridgeBase bridge) - { - bridge.AddPostActivationAction(() => - { - var parent = DeviceManager.AllDevices.FirstOrDefault(d => d.Key == "appServer") as CotijaSystemController; - if (parent == null) - { - Debug.Console(0, bridge, "ERROR: Cannot connect bridge. System controller not present"); - } - Debug.Console(0, bridge, "Linking to parent controller"); - bridge.AddParent(parent); - parent.AddBridge(bridge); - }); - } - - /// - /// Fires up a logo server if not already running - /// - void LoadLogoServer() - { - try - { - LogoServer = new HttpLogoServer(8080, @"\html\logo"); - } - catch (Exception) - { - Debug.Console(0, "NOTICE: Logo server cannot be started. Likely already running in another program"); - } - } - } -} diff --git a/essentials-framework/Essentials/PepperDashEssentials/PepperDashEssentials.csproj b/essentials-framework/Essentials/PepperDashEssentials/PepperDashEssentials.csproj deleted file mode 100644 index 463928a4..00000000 --- a/essentials-framework/Essentials/PepperDashEssentials/PepperDashEssentials.csproj +++ /dev/null @@ -1,224 +0,0 @@ - - - Release - AnyCPU - 9.0.30729 - 2.0 - {1BED5BA9-88C4-4365-9362-6F4B128071D3} - Library - Properties - PepperDash.Essentials - PepperDashEssentials - {0B4745B0-194B-4BB6-8E21-E9057CA92230};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - WindowsCE - E2BECB1F-8C8C-41ba-B736-9BE7D946A398 - 5.0 - SmartDeviceProject1 - v3.5 - Windows CE - - - - - .allowedReferenceRelatedFileExtensions - true - full - false - bin\ - DEBUG;TRACE; - prompt - 4 - 512 - true - true - off - - - .allowedReferenceRelatedFileExtensions - none - true - bin\ - prompt - 4 - 512 - true - true - off - - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.EthernetCommunications.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Fusion.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Remotes.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll - - - - False - ..\..\Release Package\PepperDash_Core.dll - - - False - ..\..\Essentials DM\Essentials_DM\bin\PepperDash_Essentials_DM.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} - PepperDash_Essentials_Core - - - {892B761C-E479-44CE-BD74-243E9214AF13} - Essentials Devices Common - - - - - - - - - rem S# Pro preparation will execute after these operations - - \ No newline at end of file diff --git a/essentials-framework/Essentials/PepperDashEssentials/UIDrivers/DualDisplayRouting REMOVE.cs b/essentials-framework/Essentials/PepperDashEssentials/UIDrivers/DualDisplayRouting REMOVE.cs deleted file mode 100644 index 1aeb7a3c..00000000 --- a/essentials-framework/Essentials/PepperDashEssentials/UIDrivers/DualDisplayRouting REMOVE.cs +++ /dev/null @@ -1,231 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text; -//using Crestron.SimplSharp; -//using Crestron.SimplSharpPro; -//using Crestron.SimplSharpPro.DeviceSupport; -//using PepperDash.Core; -//using PepperDash.Essentials.Core; -//using PepperDash.Essentials.Core.SmartObjects; -//using PepperDash.Essentials.Core.PageManagers; - -//namespace PepperDash.Essentials -//{ -// public class DualDisplaySimpleOrAdvancedRouting : PanelDriverBase -// { -// EssentialsPresentationPanelAvFunctionsDriver Parent; - -// /// -// /// Smart Object 3200 -// /// -// SubpageReferenceList SourcesSrl; - -// /// -// /// For tracking feedback on last selected -// /// -// BoolInputSig LastSelectedSourceSig; - -// /// -// /// The source that has been selected and is awaiting assignment to a display -// /// -// SourceListItem PendingSource; - -// bool IsSharingModeAdvanced; - -// public DualDisplaySimpleOrAdvancedRouting(EssentialsPresentationPanelAvFunctionsDriver parent) : base(parent.TriList) -// { -// Parent = parent; -// SourcesSrl = new SubpageReferenceList(TriList, 3200, 3, 3, 3); - -// TriList.SetSigFalseAction(UIBoolJoin.ToggleSharingModePress, ToggleSharingModePressed); - -// TriList.SetSigFalseAction(UIBoolJoin.Display1AudioButtonPressAndFb, Display1AudioPress); -// TriList.SetSigFalseAction(UIBoolJoin.Display1ControlButtonPress, Display1ControlPress); -// TriList.SetSigTrueAction(UIBoolJoin.Display1SelectPressAndFb, Display1Press); - -// TriList.SetSigFalseAction(UIBoolJoin.Display2AudioButtonPressAndFb, Display2AudioPress); -// TriList.SetSigFalseAction(UIBoolJoin.Display2ControlButtonPress, Display2ControlPress); -// TriList.SetSigTrueAction(UIBoolJoin.Display2SelectPressAndFb, Display2Press); -// } - -// /// -// /// -// /// -// public override void Show() -// { -// TriList.BooleanInput[UIBoolJoin.ToggleSharingModeVisible].BoolValue = true; -// TriList.BooleanInput[UIBoolJoin.StagingPageVisible].BoolValue = true; -// if(IsSharingModeAdvanced) -// TriList.BooleanInput[UIBoolJoin.DualDisplayPageVisible].BoolValue = true; -// else -// TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = true; -// base.Show(); -// } - -// /// -// /// -// /// -// //public override void Hide() -// //{ -// // TriList.BooleanInput[UIBoolJoin.ToggleSharingModeVisible].BoolValue = false; -// // TriList.BooleanInput[UIBoolJoin.StagingPageVisible].BoolValue = false; -// // if(IsSharingModeAdvanced) -// // TriList.BooleanInput[UIBoolJoin.DualDisplayPageVisible].BoolValue = false; -// // else -// // TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false; -// // base.Hide(); -// //} - -// public void SetCurrentRoomFromParent() -// { -// if (IsSharingModeAdvanced) -// return; // add stuff here -// else -// SetupSourceListForSimpleRouting(); -// } - -// /// -// /// -// /// -// void SetupSourceListForSimpleRouting() -// { -// // get the source list config and set up the source list -// var config = ConfigReader.ConfigObject.SourceLists; -// if (config.ContainsKey(Parent.CurrentRoom.SourceListKey)) -// { -// var srcList = config[Parent.CurrentRoom.SourceListKey] -// .Values.ToList().OrderBy(s => s.Order); -// // Setup sources list -// uint i = 1; // counter for UI list -// foreach (var srcConfig in srcList) -// { -// if (!srcConfig.IncludeInSourceList) // Skip sources marked this way -// continue; - -// var sourceKey = srcConfig.SourceKey; -// var actualSource = DeviceManager.GetDeviceForKey(sourceKey) as Device; -// if (actualSource == null) -// { -// Debug.Console(0, "Cannot assign missing source '{0}' to source UI list", -// srcConfig.SourceKey); -// continue; -// } -// var localSrcItem = srcConfig; // lambda scope below -// var localIndex = i; -// SourcesSrl.GetBoolFeedbackSig(i, 1).UserObject = new Action(b => -// { -// if (IsSharingModeAdvanced) -// { -// if (LastSelectedSourceSig != null) -// LastSelectedSourceSig.BoolValue = false; -// SourceListButtonPress(localSrcItem); -// LastSelectedSourceSig = SourcesSrl.BoolInputSig(localIndex, 1); -// LastSelectedSourceSig.BoolValue = true; -// } -// else -// Parent.CurrentRoom.DoSourceToAllDestinationsRoute(localSrcItem); -// }); -// SourcesSrl.StringInputSig(i, 1).StringValue = srcConfig.PreferredName; -// i++; - -// //var item = new SubpageReferenceListSourceItem(i++, SourcesSrl, srcConfig, -// // b => { if (!b) UiSelectSource(localSrcConfig); }); -// //SourcesSrl.AddItem(item); // add to the SRL -// //item.RegisterForSourceChange(Parent.CurrentRoom); -// } -// SourcesSrl.Count = (ushort)(i - 1); -// Parent.CurrentRoom.CurrentSingleSourceChange += CurrentRoom_CurrentSourceInfoChange; -// Parent.CurrentRoom.CurrentDisplay1SourceChange += CurrentRoom_CurrentDisplay1SourceChange; -// Parent.CurrentRoom.CurrentDisplay2SourceChange += CurrentRoom_CurrentDisplay2SourceChange; -// } -// } - -// void SetupSourceListForAdvancedRouting() -// { - -// } - -// void CurrentRoom_CurrentSourceInfoChange(EssentialsRoomBase room, SourceListItem info, ChangeType type) -// { - -// } - -// void CurrentRoom_CurrentDisplay1SourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type) -// { -// TriList.StringInput[UIStringJoin.Display1SourceLabel].StringValue = PendingSource.PreferredName; - -// } - -// void CurrentRoom_CurrentDisplay2SourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type) -// { -// TriList.StringInput[UIStringJoin.Display2SourceLabel].StringValue = PendingSource.PreferredName; -// } - -// /// -// /// -// /// -// void ToggleSharingModePressed() -// { -// Hide(); -// IsSharingModeAdvanced = !IsSharingModeAdvanced; -// TriList.BooleanInput[UIBoolJoin.ToggleSharingModePress].BoolValue = IsSharingModeAdvanced; -// Show(); -// } - -// public void SourceListButtonPress(SourceListItem item) -// { -// // start the timer -// // show FB on potential source -// TriList.BooleanInput[UIBoolJoin.Display1AudioButtonEnable].BoolValue = false; -// TriList.BooleanInput[UIBoolJoin.Display1ControlButtonEnable].BoolValue = false; -// TriList.BooleanInput[UIBoolJoin.Display2AudioButtonEnable].BoolValue = false; -// TriList.BooleanInput[UIBoolJoin.Display2ControlButtonEnable].BoolValue = false; -// PendingSource = item; -// } - -// void EnableAppropriateDisplayButtons() -// { -// TriList.BooleanInput[UIBoolJoin.Display1AudioButtonEnable].BoolValue = true; -// TriList.BooleanInput[UIBoolJoin.Display1ControlButtonEnable].BoolValue = true; -// TriList.BooleanInput[UIBoolJoin.Display2AudioButtonEnable].BoolValue = true; -// TriList.BooleanInput[UIBoolJoin.Display2ControlButtonEnable].BoolValue = true; -// if (LastSelectedSourceSig != null) -// LastSelectedSourceSig.BoolValue = false; -// } - -// public void Display1Press() -// { -// EnableAppropriateDisplayButtons(); -// Parent.CurrentRoom.SourceToDisplay1(PendingSource); -// // Enable end meeting -// } - -// public void Display1AudioPress() -// { - -// } - - -// public void Display1ControlPress() -// { - -// } - -// public void Display2Press() -// { -// EnableAppropriateDisplayButtons(); -// Parent.CurrentRoom.SourceToDisplay2(PendingSource); -// } - -// public void Display2AudioPress() -// { - -// } - -// public void Display2ControlPress() -// { - -// } -// } -//} \ No newline at end of file diff --git a/packages.config b/packages.config deleted file mode 100644 index ea9f8e18..00000000 --- a/packages.config +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/src/Directory.Build.props b/src/Directory.Build.props new file mode 100644 index 00000000..698a159f --- /dev/null +++ b/src/Directory.Build.props @@ -0,0 +1,20 @@ + + + 2.0.0-local + PepperDash Technologies + PepperDash Technologies + PepperDash Essentials + Copyright © 2023 + https://github.com/PepperDash/Essentials + git + Crestron; 4series + ../../output + True + LICENSE.md + README.md + + + + + + diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets new file mode 100644 index 00000000..81304ace --- /dev/null +++ b/src/Directory.Build.targets @@ -0,0 +1,28 @@ + + + + true + content; + + + true + content; + + + + + + + + + + + + + + + + + + + diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/BridgeBase.cs b/src/PepperDash.Essentials.Core/Bridges/BridgeBase.cs similarity index 99% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/BridgeBase.cs rename to src/PepperDash.Essentials.Core/Bridges/BridgeBase.cs index cb937235..19c0f501 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/BridgeBase.cs +++ b/src/PepperDash.Essentials.Core/Bridges/BridgeBase.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using Crestron.SimplSharp; using Crestron.SimplSharp.Reflection; @@ -6,7 +8,7 @@ using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.DeviceSupport; using Crestron.SimplSharpPro.EthernetCommunication; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; using PepperDash.Core; using PepperDash.Essentials.Core.Config; diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/IBridge.cs b/src/PepperDash.Essentials.Core/Bridges/IBridge.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/IBridge.cs rename to src/PepperDash.Essentials.Core/Bridges/IBridge.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/AirMediaControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/AirMediaControllerJoinMap.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/AirMediaControllerJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/AirMediaControllerJoinMap.cs index 126c6112..fa5f2ac4 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/AirMediaControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/AirMediaControllerJoinMap.cs @@ -1,71 +1,71 @@ -using System; - -namespace PepperDash.Essentials.Core.Bridges -{ - public class AirMediaControllerJoinMap : JoinMapBaseAdvanced - { - [JoinName("IsOnline")] - public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Air Media Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("IsInSession")] - public JoinDataComplete IsInSession = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "Air Media In Sharing Session", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("HdmiVideoSync")] - public JoinDataComplete HdmiVideoSync = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, - new JoinMetadata { Description = "Air Media Has HDMI Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("AutomaticInputRoutingEnabled")] - public JoinDataComplete AutomaticInputRoutingEnabled = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, - new JoinMetadata { Description = "Air Media Automatic Input Routing Enable(d)", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("VideoOut")] - public JoinDataComplete VideoOut = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Air Media Video Route Select / Feedback", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("ErrorFB")] - public JoinDataComplete ErrorFB = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "Air Media Error Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("NumberOfUsersConnectedFB")] - public JoinDataComplete NumberOfUsersConnectedFB = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, - new JoinMetadata { Description = "Air Media Number of Users Connected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("LoginCode")] - public JoinDataComplete LoginCode = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, - new JoinMetadata { Description = "Air Media Login Code Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("Name")] - public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Air Media Device Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("ConnectionAddressFB")] - public JoinDataComplete ConnectionAddressFB = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "Air Media IP Address", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("HostnameFB")] - public JoinDataComplete HostnameFB = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, - new JoinMetadata { Description = "Air Media Hostname", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("SerialNumberFeedback")] - public JoinDataComplete SerialNumberFeedback = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, - new JoinMetadata { Description = "Air Media Serial Number", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - /// - /// Constructor to use when instantiating this Join Map without inheriting from it - /// - /// Join this join map will start at - public AirMediaControllerJoinMap(uint joinStart) - : this(joinStart, typeof(AirMediaControllerJoinMap)) - { - } - - /// - /// Constructor to use when extending this Join map - /// - /// Join this join map will start at - /// Type of the child join map - protected AirMediaControllerJoinMap(uint joinStart, Type type) : base(joinStart, type){} - } +using System; + +namespace PepperDash.Essentials.Core.Bridges +{ + public class AirMediaControllerJoinMap : JoinMapBaseAdvanced + { + [JoinName("IsOnline")] + public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Air Media Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("IsInSession")] + public JoinDataComplete IsInSession = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "Air Media In Sharing Session", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("HdmiVideoSync")] + public JoinDataComplete HdmiVideoSync = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, + new JoinMetadata { Description = "Air Media Has HDMI Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("AutomaticInputRoutingEnabled")] + public JoinDataComplete AutomaticInputRoutingEnabled = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, + new JoinMetadata { Description = "Air Media Automatic Input Routing Enable(d)", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("VideoOut")] + public JoinDataComplete VideoOut = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Air Media Video Route Select / Feedback", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("ErrorFB")] + public JoinDataComplete ErrorFB = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "Air Media Error Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("NumberOfUsersConnectedFB")] + public JoinDataComplete NumberOfUsersConnectedFB = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, + new JoinMetadata { Description = "Air Media Number of Users Connected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("LoginCode")] + public JoinDataComplete LoginCode = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, + new JoinMetadata { Description = "Air Media Login Code Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("Name")] + public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Air Media Device Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("ConnectionAddressFB")] + public JoinDataComplete ConnectionAddressFB = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "Air Media IP Address", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("HostnameFB")] + public JoinDataComplete HostnameFB = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, + new JoinMetadata { Description = "Air Media Hostname", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("SerialNumberFeedback")] + public JoinDataComplete SerialNumberFeedback = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, + new JoinMetadata { Description = "Air Media Serial Number", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + /// + /// Constructor to use when instantiating this Join Map without inheriting from it + /// + /// Join this join map will start at + public AirMediaControllerJoinMap(uint joinStart) + : this(joinStart, typeof(AirMediaControllerJoinMap)) + { + } + + /// + /// Constructor to use when extending this Join map + /// + /// Join this join map will start at + /// Type of the child join map + protected AirMediaControllerJoinMap(uint joinStart, Type type) : base(joinStart, type){} + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/AppleTvJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/AppleTvJoinMap.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/AppleTvJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/AppleTvJoinMap.cs index 478f4e29..7a9dfa74 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/AppleTvJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/AppleTvJoinMap.cs @@ -1,53 +1,53 @@ -using System; - -namespace PepperDash.Essentials.Core.Bridges -{ - public class AppleTvJoinMap : JoinMapBaseAdvanced - { - [JoinName("UpArrow")] - public JoinDataComplete UpArrow = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "AppleTv Nav Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DnArrow")] - public JoinDataComplete DnArrow = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "AppleTv Nav Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("LeftArrow")] - public JoinDataComplete LeftArrow = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, - new JoinMetadata { Description = "AppleTv Nav Left", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("RightArrow")] - public JoinDataComplete RightArrow = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, - new JoinMetadata { Description = "AppleTv Nav Right", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Menu")] - public JoinDataComplete Menu = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, - new JoinMetadata { Description = "AppleTv Menu", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Select")] - public JoinDataComplete Select = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, - new JoinMetadata { Description = "AppleTv Select", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("PlayPause")] - public JoinDataComplete PlayPause = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 }, - new JoinMetadata { Description = "AppleTv Play/Pause", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - /// - /// Constructor to use when instantiating this Join Map without inheriting from it - /// - /// Join this join map will start at - public AppleTvJoinMap(uint joinStart) - : base(joinStart, typeof(AppleTvJoinMap)) - { - } - - /// - /// Constructor to use when extending this Join map - /// - /// Join this join map will start at - /// Type of the child join map - public AppleTvJoinMap(uint joinStart, Type type) : base(joinStart, type) - { - } - } +using System; + +namespace PepperDash.Essentials.Core.Bridges +{ + public class AppleTvJoinMap : JoinMapBaseAdvanced + { + [JoinName("UpArrow")] + public JoinDataComplete UpArrow = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "AppleTv Nav Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DnArrow")] + public JoinDataComplete DnArrow = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "AppleTv Nav Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("LeftArrow")] + public JoinDataComplete LeftArrow = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, + new JoinMetadata { Description = "AppleTv Nav Left", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("RightArrow")] + public JoinDataComplete RightArrow = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, + new JoinMetadata { Description = "AppleTv Nav Right", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Menu")] + public JoinDataComplete Menu = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, + new JoinMetadata { Description = "AppleTv Menu", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Select")] + public JoinDataComplete Select = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, + new JoinMetadata { Description = "AppleTv Select", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("PlayPause")] + public JoinDataComplete PlayPause = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 }, + new JoinMetadata { Description = "AppleTv Play/Pause", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + /// + /// Constructor to use when instantiating this Join Map without inheriting from it + /// + /// Join this join map will start at + public AppleTvJoinMap(uint joinStart) + : base(joinStart, typeof(AppleTvJoinMap)) + { + } + + /// + /// Constructor to use when extending this Join map + /// + /// Join this join map will start at + /// Type of the child join map + public AppleTvJoinMap(uint joinStart, Type type) : base(joinStart, type) + { + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/C2nRthsControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/C2nRthsControllerJoinMap.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/C2nRthsControllerJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/C2nRthsControllerJoinMap.cs index f9618035..dd141c8e 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/C2nRthsControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/C2nRthsControllerJoinMap.cs @@ -1,45 +1,45 @@ -using System; - -namespace PepperDash.Essentials.Core.Bridges -{ - public class C2nRthsControllerJoinMap : JoinMapBaseAdvanced - { - [JoinName("IsOnline")] - public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Temp Sensor Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("TemperatureFormat")] - public JoinDataComplete TemperatureFormat = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "Temp Sensor Unit Format", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Temperature")] - public JoinDataComplete Temperature = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "Temp Sensor Temperature Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("Humidity")] - public JoinDataComplete Humidity = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, - new JoinMetadata { Description = "Temp Sensor Humidity Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("Name")] - public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Temp Sensor Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - /// - /// Constructor to use when instantiating this Join Map without inheriting from it - /// - /// Join this join map will start at - public C2nRthsControllerJoinMap(uint joinStart) - : this(joinStart, typeof(C2nRthsControllerJoinMap)) - { - } - - /// - /// Constructor to use when extending this Join map - /// - /// Join this join map will start at - /// Type of the child join map - protected C2nRthsControllerJoinMap(uint joinStart, Type type) : base(joinStart, type) - { - } - } +using System; + +namespace PepperDash.Essentials.Core.Bridges +{ + public class C2nRthsControllerJoinMap : JoinMapBaseAdvanced + { + [JoinName("IsOnline")] + public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Temp Sensor Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("TemperatureFormat")] + public JoinDataComplete TemperatureFormat = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "Temp Sensor Unit Format", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Temperature")] + public JoinDataComplete Temperature = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "Temp Sensor Temperature Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("Humidity")] + public JoinDataComplete Humidity = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, + new JoinMetadata { Description = "Temp Sensor Humidity Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("Name")] + public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Temp Sensor Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + /// + /// Constructor to use when instantiating this Join Map without inheriting from it + /// + /// Join this join map will start at + public C2nRthsControllerJoinMap(uint joinStart) + : this(joinStart, typeof(C2nRthsControllerJoinMap)) + { + } + + /// + /// Constructor to use when extending this Join map + /// + /// Join this join map will start at + /// Type of the child join map + protected C2nRthsControllerJoinMap(uint joinStart, Type type) : base(joinStart, type) + { + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/CameraControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/CameraControllerJoinMap.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/CameraControllerJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/CameraControllerJoinMap.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/CenOdtOccupancySensorBaseJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/CenOdtOccupancySensorBaseJoinMap.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/CenOdtOccupancySensorBaseJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/CenOdtOccupancySensorBaseJoinMap.cs index 63684837..e306bf85 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/CenOdtOccupancySensorBaseJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/CenOdtOccupancySensorBaseJoinMap.cs @@ -1,198 +1,198 @@ -using System; - -namespace PepperDash.Essentials.Core.Bridges -{ - public class CenOdtOccupancySensorBaseJoinMap : JoinMapBaseAdvanced - { - #region Digitals - - [JoinName("Online")] - public JoinDataComplete Online = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("ForceOccupied")] - public JoinDataComplete ForceOccupied = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "Force Occupied", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("ForceVacant")] - public JoinDataComplete ForceVacant = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, - new JoinMetadata { Description = "Force Vacant", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("EnableRawStates")] - public JoinDataComplete EnableRawStates = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, - new JoinMetadata { Description = "Enable Raw States", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("RoomOccupiedFeedback")] - public JoinDataComplete RoomOccupiedFeedback = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "Room Occupied Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("GraceOccupancyDetectedFeedback")] - public JoinDataComplete GraceOccupancyDetectedFeedback = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, - new JoinMetadata { Description = "Grace Occupancy Detected Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("RoomVacantFeedback")] - public JoinDataComplete RoomVacantFeedback = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, - new JoinMetadata { Description = "Room Vacant Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("RawOccupancyFeedback")] - public JoinDataComplete RawOccupancyFeedback = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, - new JoinMetadata { Description = "Raw Occupancy Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("RawOccupancyPirFeedback")] - public JoinDataComplete RawOccupancyPirFeedback = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, - new JoinMetadata { Description = "Raw Occupancy Pir Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("RawOccupancyUsFeedback")] - public JoinDataComplete RawOccupancyUsFeedback = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 }, - new JoinMetadata { Description = "Raw Occupancy Us Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("IdentityModeOn")] - public JoinDataComplete IdentityMode = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 }, - new JoinMetadata { Description = "Enable Identity Mode", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("IdentityModeFeedback")] - public JoinDataComplete IdentityModeFeedback = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 }, - new JoinMetadata { Description = "Identity Mode Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("EnableLedFlash")] - public JoinDataComplete EnableLedFlash = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, - new JoinMetadata { Description = "Enable Led Flash", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DisableLedFlash")] - public JoinDataComplete DisableLedFlash = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 }, - new JoinMetadata { Description = "Disable Led Flash", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("EnableShortTimeout")] - public JoinDataComplete EnableShortTimeout = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 }, - new JoinMetadata { Description = "Enable Short Timeout", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DisableShortTimeout")] - public JoinDataComplete DisableShortTimeout = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 }, - new JoinMetadata { Description = "Disable Short Timeout", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("OrWhenVacated")] - public JoinDataComplete OrWhenVacated = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 }, - new JoinMetadata { Description = "Or When Vacated", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("AndWhenVacated")] - public JoinDataComplete AndWhenVacated = new JoinDataComplete(new JoinData { JoinNumber = 16, JoinSpan = 1 }, - new JoinMetadata { Description = "AndWhenVacated", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("EnableUsA")] - public JoinDataComplete EnableUsA = new JoinDataComplete(new JoinData { JoinNumber = 17, JoinSpan = 1 }, - new JoinMetadata { Description = "Enable Us A", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DisableUsA")] - public JoinDataComplete DisableUsA = new JoinDataComplete(new JoinData { JoinNumber = 18, JoinSpan = 1 }, - new JoinMetadata { Description = "Disable Us A", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("EnableUsB")] - public JoinDataComplete EnableUsB = new JoinDataComplete(new JoinData { JoinNumber = 19, JoinSpan = 1 }, - new JoinMetadata { Description = "Enable Us B", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DisableUsB")] - public JoinDataComplete DisableUsB = new JoinDataComplete(new JoinData { JoinNumber = 20, JoinSpan = 1 }, - new JoinMetadata { Description = "Disable Us B", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("EnablePir")] - public JoinDataComplete EnablePir = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 }, - new JoinMetadata { Description = "Enable Pir", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DisablePir")] - public JoinDataComplete DisablePir = new JoinDataComplete(new JoinData { JoinNumber = 22, JoinSpan = 1 }, - new JoinMetadata { Description = "Disable Pir", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("IncrementUsInOccupiedState")] - public JoinDataComplete IncrementUsInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 23, JoinSpan = 1 }, - new JoinMetadata { Description = "Increment Us In OccupiedState", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DecrementUsInOccupiedState")] - public JoinDataComplete DecrementUsInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 24, JoinSpan = 1 }, - new JoinMetadata { Description = "Dencrement Us In Occupied State", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("IncrementUsInVacantState")] - public JoinDataComplete IncrementUsInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 25, JoinSpan = 1 }, - new JoinMetadata { Description = "Increment Us In VacantState", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DecrementUsInVacantState")] - public JoinDataComplete DecrementUsInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 26, JoinSpan = 1 }, - new JoinMetadata { Description = "Decrement Us In VacantState", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("IncrementPirInOccupiedState")] - public JoinDataComplete IncrementPirInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 27, JoinSpan = 1 }, - new JoinMetadata { Description = "Increment Pir In Occupied State", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DecrementPirInOccupiedState")] - public JoinDataComplete DecrementPirInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 28, JoinSpan = 1 }, - new JoinMetadata { Description = "Decrement Pir In OccupiedState", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("IncrementPirInVacantState")] - public JoinDataComplete IncrementPirInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 29, JoinSpan = 1 }, - new JoinMetadata { Description = "Increment Pir In Vacant State", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DecrementPirInVacantState")] - public JoinDataComplete DecrementPirInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 30, JoinSpan = 1 }, - new JoinMetadata { Description = "Decrement Pir In Vacant State", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - #endregion - - #region Analog - - [JoinName("Timeout")] - public JoinDataComplete Timeout = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Timeout", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("TimeoutLocalFeedback")] - public JoinDataComplete TimeoutLocalFeedback = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "Timeout Local Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("InternalPhotoSensorValue")] - public JoinDataComplete InternalPhotoSensorValue = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, - new JoinMetadata { Description = "Internal PhotoSensor Value", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("UsSensitivityInOccupiedState")] - public JoinDataComplete UsSensitivityInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, - new JoinMetadata { Description = "Us Sensitivity In Occupied State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("UsSensitivityInVacantState")] - public JoinDataComplete UsSensitivityInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, - new JoinMetadata { Description = "Us Sensitivity In Vacant State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("PirSensitivityInOccupiedState")] - public JoinDataComplete PirSensitivityInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 }, - new JoinMetadata { Description = "Pir Sensitivity In Occupied State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("PirSensitivityInVacantState")] - public JoinDataComplete PirSensitivityInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 }, - new JoinMetadata { Description = "Pir Sensitivity In Vacant State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); - - #endregion - - #region Serial - - [JoinName("Name")] - public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - #endregion - - /// - /// Constructor to use when instantiating this Join Map without inheriting from it - /// - /// Join this join map will start at - public CenOdtOccupancySensorBaseJoinMap(uint joinStart) - : this(joinStart, typeof(CenOdtOccupancySensorBaseJoinMap)) - { - } - - /// - /// Constructor to use when extending this Join map - /// - /// Join this join map will start at - /// Type of the child join map - protected CenOdtOccupancySensorBaseJoinMap(uint joinStart, Type type) : base(joinStart, type) - { - } - } - -} +using System; + +namespace PepperDash.Essentials.Core.Bridges +{ + public class CenOdtOccupancySensorBaseJoinMap : JoinMapBaseAdvanced + { + #region Digitals + + [JoinName("Online")] + public JoinDataComplete Online = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("ForceOccupied")] + public JoinDataComplete ForceOccupied = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "Force Occupied", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("ForceVacant")] + public JoinDataComplete ForceVacant = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, + new JoinMetadata { Description = "Force Vacant", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("EnableRawStates")] + public JoinDataComplete EnableRawStates = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, + new JoinMetadata { Description = "Enable Raw States", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("RoomOccupiedFeedback")] + public JoinDataComplete RoomOccupiedFeedback = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "Room Occupied Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("GraceOccupancyDetectedFeedback")] + public JoinDataComplete GraceOccupancyDetectedFeedback = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, + new JoinMetadata { Description = "Grace Occupancy Detected Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("RoomVacantFeedback")] + public JoinDataComplete RoomVacantFeedback = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, + new JoinMetadata { Description = "Room Vacant Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("RawOccupancyFeedback")] + public JoinDataComplete RawOccupancyFeedback = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, + new JoinMetadata { Description = "Raw Occupancy Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("RawOccupancyPirFeedback")] + public JoinDataComplete RawOccupancyPirFeedback = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, + new JoinMetadata { Description = "Raw Occupancy Pir Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("RawOccupancyUsFeedback")] + public JoinDataComplete RawOccupancyUsFeedback = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 }, + new JoinMetadata { Description = "Raw Occupancy Us Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("IdentityModeOn")] + public JoinDataComplete IdentityMode = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 }, + new JoinMetadata { Description = "Enable Identity Mode", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("IdentityModeFeedback")] + public JoinDataComplete IdentityModeFeedback = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 }, + new JoinMetadata { Description = "Identity Mode Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("EnableLedFlash")] + public JoinDataComplete EnableLedFlash = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, + new JoinMetadata { Description = "Enable Led Flash", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DisableLedFlash")] + public JoinDataComplete DisableLedFlash = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 }, + new JoinMetadata { Description = "Disable Led Flash", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("EnableShortTimeout")] + public JoinDataComplete EnableShortTimeout = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 }, + new JoinMetadata { Description = "Enable Short Timeout", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DisableShortTimeout")] + public JoinDataComplete DisableShortTimeout = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 }, + new JoinMetadata { Description = "Disable Short Timeout", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("OrWhenVacated")] + public JoinDataComplete OrWhenVacated = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 }, + new JoinMetadata { Description = "Or When Vacated", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("AndWhenVacated")] + public JoinDataComplete AndWhenVacated = new JoinDataComplete(new JoinData { JoinNumber = 16, JoinSpan = 1 }, + new JoinMetadata { Description = "AndWhenVacated", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("EnableUsA")] + public JoinDataComplete EnableUsA = new JoinDataComplete(new JoinData { JoinNumber = 17, JoinSpan = 1 }, + new JoinMetadata { Description = "Enable Us A", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DisableUsA")] + public JoinDataComplete DisableUsA = new JoinDataComplete(new JoinData { JoinNumber = 18, JoinSpan = 1 }, + new JoinMetadata { Description = "Disable Us A", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("EnableUsB")] + public JoinDataComplete EnableUsB = new JoinDataComplete(new JoinData { JoinNumber = 19, JoinSpan = 1 }, + new JoinMetadata { Description = "Enable Us B", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DisableUsB")] + public JoinDataComplete DisableUsB = new JoinDataComplete(new JoinData { JoinNumber = 20, JoinSpan = 1 }, + new JoinMetadata { Description = "Disable Us B", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("EnablePir")] + public JoinDataComplete EnablePir = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 }, + new JoinMetadata { Description = "Enable Pir", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DisablePir")] + public JoinDataComplete DisablePir = new JoinDataComplete(new JoinData { JoinNumber = 22, JoinSpan = 1 }, + new JoinMetadata { Description = "Disable Pir", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("IncrementUsInOccupiedState")] + public JoinDataComplete IncrementUsInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 23, JoinSpan = 1 }, + new JoinMetadata { Description = "Increment Us In OccupiedState", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DecrementUsInOccupiedState")] + public JoinDataComplete DecrementUsInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 24, JoinSpan = 1 }, + new JoinMetadata { Description = "Dencrement Us In Occupied State", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("IncrementUsInVacantState")] + public JoinDataComplete IncrementUsInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 25, JoinSpan = 1 }, + new JoinMetadata { Description = "Increment Us In VacantState", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DecrementUsInVacantState")] + public JoinDataComplete DecrementUsInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 26, JoinSpan = 1 }, + new JoinMetadata { Description = "Decrement Us In VacantState", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("IncrementPirInOccupiedState")] + public JoinDataComplete IncrementPirInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 27, JoinSpan = 1 }, + new JoinMetadata { Description = "Increment Pir In Occupied State", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DecrementPirInOccupiedState")] + public JoinDataComplete DecrementPirInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 28, JoinSpan = 1 }, + new JoinMetadata { Description = "Decrement Pir In OccupiedState", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("IncrementPirInVacantState")] + public JoinDataComplete IncrementPirInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 29, JoinSpan = 1 }, + new JoinMetadata { Description = "Increment Pir In Vacant State", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DecrementPirInVacantState")] + public JoinDataComplete DecrementPirInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 30, JoinSpan = 1 }, + new JoinMetadata { Description = "Decrement Pir In Vacant State", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + #endregion + + #region Analog + + [JoinName("Timeout")] + public JoinDataComplete Timeout = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Timeout", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("TimeoutLocalFeedback")] + public JoinDataComplete TimeoutLocalFeedback = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "Timeout Local Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("InternalPhotoSensorValue")] + public JoinDataComplete InternalPhotoSensorValue = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, + new JoinMetadata { Description = "Internal PhotoSensor Value", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("UsSensitivityInOccupiedState")] + public JoinDataComplete UsSensitivityInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, + new JoinMetadata { Description = "Us Sensitivity In Occupied State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("UsSensitivityInVacantState")] + public JoinDataComplete UsSensitivityInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, + new JoinMetadata { Description = "Us Sensitivity In Vacant State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("PirSensitivityInOccupiedState")] + public JoinDataComplete PirSensitivityInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 }, + new JoinMetadata { Description = "Pir Sensitivity In Occupied State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("PirSensitivityInVacantState")] + public JoinDataComplete PirSensitivityInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 }, + new JoinMetadata { Description = "Pir Sensitivity In Vacant State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); + + #endregion + + #region Serial + + [JoinName("Name")] + public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + #endregion + + /// + /// Constructor to use when instantiating this Join Map without inheriting from it + /// + /// Join this join map will start at + public CenOdtOccupancySensorBaseJoinMap(uint joinStart) + : this(joinStart, typeof(CenOdtOccupancySensorBaseJoinMap)) + { + } + + /// + /// Constructor to use when extending this Join map + /// + /// Join this join map will start at + /// Type of the child join map + protected CenOdtOccupancySensorBaseJoinMap(uint joinStart, Type type) : base(joinStart, type) + { + } + } + +} diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DigitalLoggerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DigitalLoggerJoinMap.cs similarity index 97% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DigitalLoggerJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/DigitalLoggerJoinMap.cs index 5a7d00a6..7959a511 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DigitalLoggerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DigitalLoggerJoinMap.cs @@ -1,43 +1,43 @@ -using System; - -namespace PepperDash.Essentials.Core.Bridges -{ - [Obsolete("This Device will be moved to a plugin in a future update")] - public class DigitalLoggerJoinMap : JoinMapBase - { - public uint IsOnline { get; set; } - public uint CircuitNames { get; set; } - public uint CircuitState { get; set; } - public uint CircuitCycle { get; set; } - public uint CircuitIsCritical { get; set; } - public uint CircuitOnCmd { get; set; } - public uint CircuitOffCmd { get; set; } - - public DigitalLoggerJoinMap() - { - // Digital - IsOnline = 9; - CircuitState = 0; - CircuitCycle = 0; - CircuitIsCritical = 10; - CircuitOnCmd = 10; - CircuitOffCmd = 20; - // Serial - CircuitNames = 0; - // Analog - } - - public override void OffsetJoinNumbers(uint joinStart) - { - var joinOffset = joinStart - 1; - - IsOnline = IsOnline + joinOffset; - CircuitNames = CircuitNames + joinOffset; - CircuitState = CircuitState + joinOffset; - CircuitCycle = CircuitCycle + joinOffset; - CircuitIsCritical = CircuitIsCritical + joinOffset; - CircuitOnCmd = CircuitOnCmd + joinOffset; - CircuitOffCmd = CircuitOffCmd + joinOffset; - } - } +using System; + +namespace PepperDash.Essentials.Core.Bridges +{ + [Obsolete("This Device will be moved to a plugin in a future update")] + public class DigitalLoggerJoinMap : JoinMapBase + { + public uint IsOnline { get; set; } + public uint CircuitNames { get; set; } + public uint CircuitState { get; set; } + public uint CircuitCycle { get; set; } + public uint CircuitIsCritical { get; set; } + public uint CircuitOnCmd { get; set; } + public uint CircuitOffCmd { get; set; } + + public DigitalLoggerJoinMap() + { + // Digital + IsOnline = 9; + CircuitState = 0; + CircuitCycle = 0; + CircuitIsCritical = 10; + CircuitOnCmd = 10; + CircuitOffCmd = 20; + // Serial + CircuitNames = 0; + // Analog + } + + public override void OffsetJoinNumbers(uint joinStart) + { + var joinOffset = joinStart - 1; + + IsOnline = IsOnline + joinOffset; + CircuitNames = CircuitNames + joinOffset; + CircuitState = CircuitState + joinOffset; + CircuitCycle = CircuitCycle + joinOffset; + CircuitIsCritical = CircuitIsCritical + joinOffset; + CircuitOnCmd = CircuitOnCmd + joinOffset; + CircuitOffCmd = CircuitOffCmd + joinOffset; + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DisplayControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DisplayControllerJoinMap.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DisplayControllerJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/DisplayControllerJoinMap.cs index eaf77ed8..8e51c952 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DisplayControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DisplayControllerJoinMap.cs @@ -1,85 +1,85 @@ -using System; - -namespace PepperDash.Essentials.Core.Bridges -{ - public class DisplayControllerJoinMap : JoinMapBaseAdvanced - { - [JoinName("Name")] - public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("PowerOff")] - public JoinDataComplete PowerOff = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Power Off", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("PowerOn")] - public JoinDataComplete PowerOn = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "Power On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("IsTwoWayDisplay")] - public JoinDataComplete IsTwoWayDisplay = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, - new JoinMetadata { Description = "Is Two Way Display", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("VolumeUp")] - public JoinDataComplete VolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, - new JoinMetadata { Description = "Volume Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("VolumeLevel")] - public JoinDataComplete VolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, - new JoinMetadata { Description = "Volume Level", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("VolumeDown")] - public JoinDataComplete VolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, - new JoinMetadata { Description = "Volume Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("VolumeMute")] - public JoinDataComplete VolumeMute = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 }, - new JoinMetadata { Description = "Volume Mute", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("VolumeMuteOn")] - public JoinDataComplete VolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 }, - new JoinMetadata { Description = "Volume Mute On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("VolumeMuteOff")] - public JoinDataComplete VolumeMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 9, JoinSpan = 1 }, - new JoinMetadata { Description = "Volume Mute Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("InputSelectOffset")] - public JoinDataComplete InputSelectOffset = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 10 }, - new JoinMetadata { Description = "Input Select", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("InputNamesOffset")] - public JoinDataComplete InputNamesOffset = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 10 }, - new JoinMetadata { Description = "Input Names Offset", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("InputSelect")] - public JoinDataComplete InputSelect = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, - new JoinMetadata { Description = "Input Select", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("ButtonVisibilityOffset")] - public JoinDataComplete ButtonVisibilityOffset = new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 10 }, - new JoinMetadata { Description = "Button Visibility Offset", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.DigitalSerial }); - - [JoinName("IsOnline")] - public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 50, JoinSpan = 1 }, - new JoinMetadata { Description = "Is Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - /// - /// Constructor to use when instantiating this Join Map without inheriting from it - /// - /// Join this join map will start at - public DisplayControllerJoinMap(uint joinStart) - : this(joinStart, typeof(DisplayControllerJoinMap)) - { - } - - /// - /// Constructor to use when extending this Join map - /// - /// Join this join map will start at - /// Type of the child join map - protected DisplayControllerJoinMap(uint joinStart, Type type) : base(joinStart, type) - { - } - } +using System; + +namespace PepperDash.Essentials.Core.Bridges +{ + public class DisplayControllerJoinMap : JoinMapBaseAdvanced + { + [JoinName("Name")] + public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("PowerOff")] + public JoinDataComplete PowerOff = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Power Off", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("PowerOn")] + public JoinDataComplete PowerOn = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "Power On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("IsTwoWayDisplay")] + public JoinDataComplete IsTwoWayDisplay = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, + new JoinMetadata { Description = "Is Two Way Display", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("VolumeUp")] + public JoinDataComplete VolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, + new JoinMetadata { Description = "Volume Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("VolumeLevel")] + public JoinDataComplete VolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, + new JoinMetadata { Description = "Volume Level", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("VolumeDown")] + public JoinDataComplete VolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, + new JoinMetadata { Description = "Volume Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("VolumeMute")] + public JoinDataComplete VolumeMute = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 }, + new JoinMetadata { Description = "Volume Mute", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("VolumeMuteOn")] + public JoinDataComplete VolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 }, + new JoinMetadata { Description = "Volume Mute On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("VolumeMuteOff")] + public JoinDataComplete VolumeMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 9, JoinSpan = 1 }, + new JoinMetadata { Description = "Volume Mute Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("InputSelectOffset")] + public JoinDataComplete InputSelectOffset = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 10 }, + new JoinMetadata { Description = "Input Select", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("InputNamesOffset")] + public JoinDataComplete InputNamesOffset = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 10 }, + new JoinMetadata { Description = "Input Names Offset", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("InputSelect")] + public JoinDataComplete InputSelect = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, + new JoinMetadata { Description = "Input Select", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("ButtonVisibilityOffset")] + public JoinDataComplete ButtonVisibilityOffset = new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 10 }, + new JoinMetadata { Description = "Button Visibility Offset", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.DigitalSerial }); + + [JoinName("IsOnline")] + public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 50, JoinSpan = 1 }, + new JoinMetadata { Description = "Is Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + /// + /// Constructor to use when instantiating this Join Map without inheriting from it + /// + /// Join this join map will start at + public DisplayControllerJoinMap(uint joinStart) + : this(joinStart, typeof(DisplayControllerJoinMap)) + { + } + + /// + /// Constructor to use when extending this Join map + /// + /// Join this join map will start at + /// Type of the child join map + protected DisplayControllerJoinMap(uint joinStart, Type type) : base(joinStart, type) + { + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs index 4c9cba41..3a4c4255 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs @@ -1,74 +1,74 @@ -using System; - -namespace PepperDash.Essentials.Core.Bridges { - public class DmBladeChassisControllerJoinMap : JoinMapBaseAdvanced { - - [JoinName("IsOnline")] - public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, - new JoinMetadata { Description = "DM Blade Chassis Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("VideoSyncStatus")] - public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 128 }, - new JoinMetadata { Description = "DM Blade Input Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("InputEndpointOnline")] - public JoinDataComplete InputEndpointOnline = new JoinDataComplete(new JoinData { JoinNumber = 501, JoinSpan = 128 }, - new JoinMetadata { Description = "DM Blade Chassis Input Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("OutputEndpointOnline")] - public JoinDataComplete OutputEndpointOnline = new JoinDataComplete(new JoinData { JoinNumber = 701, JoinSpan = 128 }, - new JoinMetadata { Description = "DM Blade Chassis Output Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("TxAdvancedIsPresent")] - public JoinDataComplete TxAdvancedIsPresent = new JoinDataComplete(new JoinData { JoinNumber = 1001, JoinSpan = 128 }, - new JoinMetadata { Description = "DM Blade Chassis Tx Advanced Is Present", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("OutputVideo")] - public JoinDataComplete OutputVideo = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 128 }, - new JoinMetadata { Description = "DM Blade Chassis Output Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("HdcpSupportState")] - public JoinDataComplete HdcpSupportState = new JoinDataComplete(new JoinData { JoinNumber = 1001, JoinSpan = 128 }, - new JoinMetadata { Description = "DM Blade Chassis Input HDCP Support State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("HdcpSupportCapability")] - public JoinDataComplete HdcpSupportCapability = new JoinDataComplete(new JoinData { JoinNumber = 1201, JoinSpan = 128 }, - new JoinMetadata { Description = "DM Blade Chassis Input HDCP Support Capability", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("InputNames")] - public JoinDataComplete InputNames = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 128 }, - new JoinMetadata { Description = "DM Blade Chassis Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("OutputNames")] - public JoinDataComplete OutputNames = new JoinDataComplete(new JoinData { JoinNumber = 301, JoinSpan = 128 }, - new JoinMetadata { Description = "DM Blade Chassis Output Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("OutputCurrentVideoInputNames")] - public JoinDataComplete OutputCurrentVideoInputNames = new JoinDataComplete(new JoinData { JoinNumber = 2001, JoinSpan = 128 }, - new JoinMetadata { Description = "DM Blade Chassis Video Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("InputCurrentResolution")] - public JoinDataComplete InputCurrentResolution = new JoinDataComplete(new JoinData { JoinNumber = 2401, JoinSpan = 128 }, - new JoinMetadata { Description = "DM Blade Chassis Input Current Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - - /// - /// Constructor to use when instantiating this Join Map without inheriting from it - /// - /// Join this join map will start at - public DmBladeChassisControllerJoinMap(uint joinStart) - : this(joinStart, typeof(DmBladeChassisControllerJoinMap)) - { - } - - /// - /// Constructor to use when extending this Join map - /// - /// Join this join map will start at - /// Type of the child join map - protected DmBladeChassisControllerJoinMap(uint joinStart, Type type) : base(joinStart, type) - { - } - - } -} +using System; + +namespace PepperDash.Essentials.Core.Bridges { + public class DmBladeChassisControllerJoinMap : JoinMapBaseAdvanced { + + [JoinName("IsOnline")] + public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, + new JoinMetadata { Description = "DM Blade Chassis Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("VideoSyncStatus")] + public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 128 }, + new JoinMetadata { Description = "DM Blade Input Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("InputEndpointOnline")] + public JoinDataComplete InputEndpointOnline = new JoinDataComplete(new JoinData { JoinNumber = 501, JoinSpan = 128 }, + new JoinMetadata { Description = "DM Blade Chassis Input Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("OutputEndpointOnline")] + public JoinDataComplete OutputEndpointOnline = new JoinDataComplete(new JoinData { JoinNumber = 701, JoinSpan = 128 }, + new JoinMetadata { Description = "DM Blade Chassis Output Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("TxAdvancedIsPresent")] + public JoinDataComplete TxAdvancedIsPresent = new JoinDataComplete(new JoinData { JoinNumber = 1001, JoinSpan = 128 }, + new JoinMetadata { Description = "DM Blade Chassis Tx Advanced Is Present", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("OutputVideo")] + public JoinDataComplete OutputVideo = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 128 }, + new JoinMetadata { Description = "DM Blade Chassis Output Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("HdcpSupportState")] + public JoinDataComplete HdcpSupportState = new JoinDataComplete(new JoinData { JoinNumber = 1001, JoinSpan = 128 }, + new JoinMetadata { Description = "DM Blade Chassis Input HDCP Support State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("HdcpSupportCapability")] + public JoinDataComplete HdcpSupportCapability = new JoinDataComplete(new JoinData { JoinNumber = 1201, JoinSpan = 128 }, + new JoinMetadata { Description = "DM Blade Chassis Input HDCP Support Capability", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("InputNames")] + public JoinDataComplete InputNames = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 128 }, + new JoinMetadata { Description = "DM Blade Chassis Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("OutputNames")] + public JoinDataComplete OutputNames = new JoinDataComplete(new JoinData { JoinNumber = 301, JoinSpan = 128 }, + new JoinMetadata { Description = "DM Blade Chassis Output Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("OutputCurrentVideoInputNames")] + public JoinDataComplete OutputCurrentVideoInputNames = new JoinDataComplete(new JoinData { JoinNumber = 2001, JoinSpan = 128 }, + new JoinMetadata { Description = "DM Blade Chassis Video Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("InputCurrentResolution")] + public JoinDataComplete InputCurrentResolution = new JoinDataComplete(new JoinData { JoinNumber = 2401, JoinSpan = 128 }, + new JoinMetadata { Description = "DM Blade Chassis Input Current Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + + /// + /// Constructor to use when instantiating this Join Map without inheriting from it + /// + /// Join this join map will start at + public DmBladeChassisControllerJoinMap(uint joinStart) + : this(joinStart, typeof(DmBladeChassisControllerJoinMap)) + { + } + + /// + /// Constructor to use when extending this Join map + /// + /// Join this join map will start at + /// Type of the child join map + protected DmBladeChassisControllerJoinMap(uint joinStart, Type type) : base(joinStart, type) + { + } + + } +} diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmChassisControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmChassisControllerJoinMap.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmChassisControllerJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmChassisControllerJoinMap.cs index 114a8a9d..539e8d29 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmChassisControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmChassisControllerJoinMap.cs @@ -1,170 +1,170 @@ -using System; - -namespace PepperDash.Essentials.Core.Bridges -{ - public class DmChassisControllerJoinMap : JoinMapBaseAdvanced - { - [JoinName("EnableAudioBreakaway")] - public JoinDataComplete EnableAudioBreakaway = new JoinDataComplete( - new JoinData {JoinNumber = 4, JoinSpan = 1}, - new JoinMetadata - { - Description = "DM Chassis enable audio breakaway routing", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("EnableUsbBreakaway")] - public JoinDataComplete EnableUsbBreakaway = new JoinDataComplete( - new JoinData { JoinNumber = 5, JoinSpan = 1 }, - new JoinMetadata - { - Description = "DM Chassis enable USB breakaway routing", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("Name")] - public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "DM Chassis Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("SystemId")] - public JoinDataComplete SystemId = new JoinDataComplete(new JoinData { JoinNumber = 10, JoinSpan = 1 }, - new JoinMetadata { Description = "DM Chassis SystemId Get/Set/Trigger/", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.DigitalAnalog }); - - [JoinName("IsOnline")] - public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, - new JoinMetadata { Description = "DM Chassis Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("VideoSyncStatus")] - public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Input Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("InputEndpointOnline")] - public JoinDataComplete InputEndpointOnline = new JoinDataComplete(new JoinData { JoinNumber = 501, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Input Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("OutputEndpointOnline")] - public JoinDataComplete OutputEndpointOnline = new JoinDataComplete(new JoinData { JoinNumber = 701, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Output Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("TxAdvancedIsPresent")] - public JoinDataComplete TxAdvancedIsPresent = new JoinDataComplete(new JoinData { JoinNumber = 1001, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Tx Advanced Is Present", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("OutputDisabledByHdcp")] - public JoinDataComplete OutputDisabledByHdcp = new JoinDataComplete(new JoinData { JoinNumber = 1201, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Output Disabled by HDCP", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("OutputVideo")] - public JoinDataComplete OutputVideo = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Output Video Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("OutputAudio")] - public JoinDataComplete OutputAudio = new JoinDataComplete(new JoinData { JoinNumber = 301, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Output Audio Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("OutputUsb")] - public JoinDataComplete OutputUsb = new JoinDataComplete(new JoinData { JoinNumber = 501, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Output USB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("InputUsb")] - public JoinDataComplete InputUsb = new JoinDataComplete(new JoinData { JoinNumber = 701, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Input Usb Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("HdcpSupportState")] - public JoinDataComplete HdcpSupportState = new JoinDataComplete(new JoinData { JoinNumber = 1001, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Input HDCP Support State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("HdcpSupportCapability")] - public JoinDataComplete HdcpSupportCapability = new JoinDataComplete(new JoinData { JoinNumber = 1201, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Input HDCP Support Capability", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("InputStreamCardState")] - public JoinDataComplete InputStreamCardState = new JoinDataComplete(new JoinData { JoinNumber = 1501, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Stream Input Start (1), Stop (2), Pause (3) with Feedback", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("OutputStreamCardState")] - public JoinDataComplete OutputStreamCardState = new JoinDataComplete(new JoinData { JoinNumber = 1601, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Stream Output Start (1), Stop (2), Pause (3) with Feedback", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("NoRouteName")] - public JoinDataComplete NoRouteName = new JoinDataComplete(new JoinData { JoinNumber = 100, JoinSpan = 1 }, - new JoinMetadata { Description = "DM Chassis Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("InputNames")] - public JoinDataComplete InputNames = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("OutputNames")] - public JoinDataComplete OutputNames = new JoinDataComplete(new JoinData { JoinNumber = 301, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Output Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("InputVideoNames")] public JoinDataComplete InputVideoNames = - new JoinDataComplete(new JoinData {JoinNumber = 501, JoinSpan = 200}, - new JoinMetadata - { - Description = "DM Chassis Video Input Names", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("InputAudioNames")] - public JoinDataComplete InputAudioNames = - new JoinDataComplete(new JoinData { JoinNumber = 701, JoinSpan = 200 }, - new JoinMetadata - { - Description = "DM Chassis Audio Input Names", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Serial - }); - [JoinName("OutputVideoNames")] - public JoinDataComplete OutputVideoNames = - new JoinDataComplete(new JoinData { JoinNumber = 901, JoinSpan = 200 }, - new JoinMetadata - { - Description = "DM Chassis Video Output Names", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Serial - }); - [JoinName("OutputAudioNames")] - public JoinDataComplete OutputAudioNames = - new JoinDataComplete(new JoinData { JoinNumber = 1101, JoinSpan = 200 }, - new JoinMetadata - { - Description = "DM Chassis Audio Output Names", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("OutputCurrentVideoInputNames")] - public JoinDataComplete OutputCurrentVideoInputNames = new JoinDataComplete(new JoinData { JoinNumber = 2001, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Video Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("OutputCurrentAudioInputNames")] - public JoinDataComplete OutputCurrentAudioInputNames = new JoinDataComplete(new JoinData { JoinNumber = 2201, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Audio Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("InputCurrentResolution")] - public JoinDataComplete InputCurrentResolution = new JoinDataComplete(new JoinData { JoinNumber = 2401, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Input Current Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - /// - /// Constructor to use when instantiating this Join Map without inheriting from it - /// - /// Join this join map will start at - public DmChassisControllerJoinMap(uint joinStart) - : this(joinStart, typeof(DmChassisControllerJoinMap)) - { - } - - /// - /// Constructor to use when extending this Join map - /// - /// Join this join map will start at - /// Type of the child join map - protected DmChassisControllerJoinMap(uint joinStart, Type type) : base(joinStart, type) - { - } - } -} +using System; + +namespace PepperDash.Essentials.Core.Bridges +{ + public class DmChassisControllerJoinMap : JoinMapBaseAdvanced + { + [JoinName("EnableAudioBreakaway")] + public JoinDataComplete EnableAudioBreakaway = new JoinDataComplete( + new JoinData {JoinNumber = 4, JoinSpan = 1}, + new JoinMetadata + { + Description = "DM Chassis enable audio breakaway routing", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("EnableUsbBreakaway")] + public JoinDataComplete EnableUsbBreakaway = new JoinDataComplete( + new JoinData { JoinNumber = 5, JoinSpan = 1 }, + new JoinMetadata + { + Description = "DM Chassis enable USB breakaway routing", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("Name")] + public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "DM Chassis Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("SystemId")] + public JoinDataComplete SystemId = new JoinDataComplete(new JoinData { JoinNumber = 10, JoinSpan = 1 }, + new JoinMetadata { Description = "DM Chassis SystemId Get/Set/Trigger/", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.DigitalAnalog }); + + [JoinName("IsOnline")] + public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, + new JoinMetadata { Description = "DM Chassis Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("VideoSyncStatus")] + public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Input Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("InputEndpointOnline")] + public JoinDataComplete InputEndpointOnline = new JoinDataComplete(new JoinData { JoinNumber = 501, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Input Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("OutputEndpointOnline")] + public JoinDataComplete OutputEndpointOnline = new JoinDataComplete(new JoinData { JoinNumber = 701, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Output Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("TxAdvancedIsPresent")] + public JoinDataComplete TxAdvancedIsPresent = new JoinDataComplete(new JoinData { JoinNumber = 1001, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Tx Advanced Is Present", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("OutputDisabledByHdcp")] + public JoinDataComplete OutputDisabledByHdcp = new JoinDataComplete(new JoinData { JoinNumber = 1201, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Output Disabled by HDCP", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("OutputVideo")] + public JoinDataComplete OutputVideo = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Output Video Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("OutputAudio")] + public JoinDataComplete OutputAudio = new JoinDataComplete(new JoinData { JoinNumber = 301, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Output Audio Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("OutputUsb")] + public JoinDataComplete OutputUsb = new JoinDataComplete(new JoinData { JoinNumber = 501, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Output USB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("InputUsb")] + public JoinDataComplete InputUsb = new JoinDataComplete(new JoinData { JoinNumber = 701, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Input Usb Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("HdcpSupportState")] + public JoinDataComplete HdcpSupportState = new JoinDataComplete(new JoinData { JoinNumber = 1001, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Input HDCP Support State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("HdcpSupportCapability")] + public JoinDataComplete HdcpSupportCapability = new JoinDataComplete(new JoinData { JoinNumber = 1201, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Input HDCP Support Capability", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("InputStreamCardState")] + public JoinDataComplete InputStreamCardState = new JoinDataComplete(new JoinData { JoinNumber = 1501, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Stream Input Start (1), Stop (2), Pause (3) with Feedback", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("OutputStreamCardState")] + public JoinDataComplete OutputStreamCardState = new JoinDataComplete(new JoinData { JoinNumber = 1601, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Stream Output Start (1), Stop (2), Pause (3) with Feedback", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("NoRouteName")] + public JoinDataComplete NoRouteName = new JoinDataComplete(new JoinData { JoinNumber = 100, JoinSpan = 1 }, + new JoinMetadata { Description = "DM Chassis Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("InputNames")] + public JoinDataComplete InputNames = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("OutputNames")] + public JoinDataComplete OutputNames = new JoinDataComplete(new JoinData { JoinNumber = 301, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Output Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("InputVideoNames")] public JoinDataComplete InputVideoNames = + new JoinDataComplete(new JoinData {JoinNumber = 501, JoinSpan = 200}, + new JoinMetadata + { + Description = "DM Chassis Video Input Names", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("InputAudioNames")] + public JoinDataComplete InputAudioNames = + new JoinDataComplete(new JoinData { JoinNumber = 701, JoinSpan = 200 }, + new JoinMetadata + { + Description = "DM Chassis Audio Input Names", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Serial + }); + [JoinName("OutputVideoNames")] + public JoinDataComplete OutputVideoNames = + new JoinDataComplete(new JoinData { JoinNumber = 901, JoinSpan = 200 }, + new JoinMetadata + { + Description = "DM Chassis Video Output Names", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Serial + }); + [JoinName("OutputAudioNames")] + public JoinDataComplete OutputAudioNames = + new JoinDataComplete(new JoinData { JoinNumber = 1101, JoinSpan = 200 }, + new JoinMetadata + { + Description = "DM Chassis Audio Output Names", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("OutputCurrentVideoInputNames")] + public JoinDataComplete OutputCurrentVideoInputNames = new JoinDataComplete(new JoinData { JoinNumber = 2001, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Video Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("OutputCurrentAudioInputNames")] + public JoinDataComplete OutputCurrentAudioInputNames = new JoinDataComplete(new JoinData { JoinNumber = 2201, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Audio Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("InputCurrentResolution")] + public JoinDataComplete InputCurrentResolution = new JoinDataComplete(new JoinData { JoinNumber = 2401, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Input Current Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + /// + /// Constructor to use when instantiating this Join Map without inheriting from it + /// + /// Join this join map will start at + public DmChassisControllerJoinMap(uint joinStart) + : this(joinStart, typeof(DmChassisControllerJoinMap)) + { + } + + /// + /// Constructor to use when extending this Join map + /// + /// Join this join map will start at + /// Type of the child join map + protected DmChassisControllerJoinMap(uint joinStart, Type type) : base(joinStart, type) + { + } + } +} diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmRmcControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmRmcControllerJoinMap.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmRmcControllerJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmRmcControllerJoinMap.cs index ec4661a4..8c2386fd 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmRmcControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmRmcControllerJoinMap.cs @@ -1,57 +1,57 @@ -using System; - -namespace PepperDash.Essentials.Core.Bridges -{ - public class DmRmcControllerJoinMap : JoinMapBaseAdvanced - { - [JoinName("IsOnline")] - public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "DM RMC Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("CurrentOutputResolution")] - public JoinDataComplete CurrentOutputResolution = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "DM RMC Current Output Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("EdidManufacturer")] - public JoinDataComplete EdidManufacturer = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "DM RMC EDID Manufacturer", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("EdidName")] - public JoinDataComplete EdidName = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, - new JoinMetadata { Description = "DM RMC EDID Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("EdidPrefferedTiming")] - public JoinDataComplete EdidPrefferedTiming = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, - new JoinMetadata { Description = "DM RMC EDID Preferred Timing", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("EdidSerialNumber")] - public JoinDataComplete EdidSerialNumber = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, - new JoinMetadata { Description = "DM RMC EDID Serial Number", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("Name")] - public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, - new JoinMetadata { Description = "DM RMC Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("AudioVideoSource")] - public JoinDataComplete AudioVideoSource = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "DM RMC Audio Video Source Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - /// - /// Constructor to use when instantiating this Join Map without inheriting from it - /// - /// Join this join map will start at - public DmRmcControllerJoinMap(uint joinStart) - : this(joinStart, typeof(DmRmcControllerJoinMap)) - { - } - - /// - /// Constructor to use when extending this Join map - /// - /// Join this join map will start at - /// Type of the child join map - protected DmRmcControllerJoinMap(uint joinStart, Type type) : base(joinStart, type) - { - } - } +using System; + +namespace PepperDash.Essentials.Core.Bridges +{ + public class DmRmcControllerJoinMap : JoinMapBaseAdvanced + { + [JoinName("IsOnline")] + public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "DM RMC Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("CurrentOutputResolution")] + public JoinDataComplete CurrentOutputResolution = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "DM RMC Current Output Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("EdidManufacturer")] + public JoinDataComplete EdidManufacturer = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "DM RMC EDID Manufacturer", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("EdidName")] + public JoinDataComplete EdidName = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, + new JoinMetadata { Description = "DM RMC EDID Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("EdidPrefferedTiming")] + public JoinDataComplete EdidPrefferedTiming = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, + new JoinMetadata { Description = "DM RMC EDID Preferred Timing", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("EdidSerialNumber")] + public JoinDataComplete EdidSerialNumber = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, + new JoinMetadata { Description = "DM RMC EDID Serial Number", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("Name")] + public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, + new JoinMetadata { Description = "DM RMC Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("AudioVideoSource")] + public JoinDataComplete AudioVideoSource = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "DM RMC Audio Video Source Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + /// + /// Constructor to use when instantiating this Join Map without inheriting from it + /// + /// Join this join map will start at + public DmRmcControllerJoinMap(uint joinStart) + : this(joinStart, typeof(DmRmcControllerJoinMap)) + { + } + + /// + /// Constructor to use when extending this Join map + /// + /// Join this join map will start at + /// Type of the child join map + protected DmRmcControllerJoinMap(uint joinStart, Type type) : base(joinStart, type) + { + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmTxControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmTxControllerJoinMap.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmTxControllerJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmTxControllerJoinMap.cs index 6d783639..23d240d5 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmTxControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmTxControllerJoinMap.cs @@ -1,85 +1,85 @@ -using System; - -namespace PepperDash.Essentials.Core.Bridges -{ - public class DmTxControllerJoinMap : JoinMapBaseAdvanced - { - [JoinName("IsOnline")] - public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "DM TX Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("VideoSyncStatus")] - public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "DM TX Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("FreeRunEnabled")] - public JoinDataComplete FreeRunEnabled = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, - new JoinMetadata { Description = "DM TX Enable Free Run Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Input1VideoSyncStatus")] - public JoinDataComplete Input1VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, - new JoinMetadata { Description = "Input 1 Video Sync Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Input2VideoSyncStatus")] - public JoinDataComplete Input2VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, - new JoinMetadata { Description = "Input 2 Video Sync Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Input3VideoSyncStatus")] - public JoinDataComplete Input3VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, - new JoinMetadata { Description = "Input 3 Video Sync Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("CurrentInputResolution")] - public JoinDataComplete CurrentInputResolution = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "DM TX Current Input Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("Name")] - public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "DM TX Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("VideoInput")] - public JoinDataComplete VideoInput = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "DM TX Video Input Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("AudioInput")] - public JoinDataComplete AudioInput = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "DM TX Audio Input Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("HdcpSupportCapability")] - public JoinDataComplete HdcpSupportCapability = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, - new JoinMetadata { Description = "DM TX HDCP Support Capability", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("Port1HdcpState")] - public JoinDataComplete Port1HdcpState = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, - new JoinMetadata { Description = "DM TX Port 1 HDCP State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("Port2HdcpState")] - public JoinDataComplete Port2HdcpState = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, - new JoinMetadata { Description = "DM TX Port 2 HDCP State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("VgaBrightness")] - public JoinDataComplete VgaBrightness = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, - new JoinMetadata { Description = "DM TX VGA Brightness", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("VgaContrast")] - public JoinDataComplete VgaContrast = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 }, - new JoinMetadata { Description = "DM TX Online", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - /// - /// Constructor to use when instantiating this Join Map without inheriting from it - /// - /// Join this join map will start at - public DmTxControllerJoinMap(uint joinStart) - : this(joinStart, typeof(DmTxControllerJoinMap)) - { - } - - /// - /// Constructor to use when extending this Join map - /// - /// Join this join map will start at - /// Type of the child join map - protected DmTxControllerJoinMap(uint joinStart, Type type) : base(joinStart, type) - { - } - } +using System; + +namespace PepperDash.Essentials.Core.Bridges +{ + public class DmTxControllerJoinMap : JoinMapBaseAdvanced + { + [JoinName("IsOnline")] + public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "DM TX Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("VideoSyncStatus")] + public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "DM TX Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("FreeRunEnabled")] + public JoinDataComplete FreeRunEnabled = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, + new JoinMetadata { Description = "DM TX Enable Free Run Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Input1VideoSyncStatus")] + public JoinDataComplete Input1VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, + new JoinMetadata { Description = "Input 1 Video Sync Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Input2VideoSyncStatus")] + public JoinDataComplete Input2VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, + new JoinMetadata { Description = "Input 2 Video Sync Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Input3VideoSyncStatus")] + public JoinDataComplete Input3VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, + new JoinMetadata { Description = "Input 3 Video Sync Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("CurrentInputResolution")] + public JoinDataComplete CurrentInputResolution = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "DM TX Current Input Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("Name")] + public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "DM TX Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("VideoInput")] + public JoinDataComplete VideoInput = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "DM TX Video Input Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("AudioInput")] + public JoinDataComplete AudioInput = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "DM TX Audio Input Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("HdcpSupportCapability")] + public JoinDataComplete HdcpSupportCapability = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, + new JoinMetadata { Description = "DM TX HDCP Support Capability", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("Port1HdcpState")] + public JoinDataComplete Port1HdcpState = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, + new JoinMetadata { Description = "DM TX Port 1 HDCP State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("Port2HdcpState")] + public JoinDataComplete Port2HdcpState = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, + new JoinMetadata { Description = "DM TX Port 2 HDCP State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("VgaBrightness")] + public JoinDataComplete VgaBrightness = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, + new JoinMetadata { Description = "DM TX VGA Brightness", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("VgaContrast")] + public JoinDataComplete VgaContrast = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 }, + new JoinMetadata { Description = "DM TX Online", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + /// + /// Constructor to use when instantiating this Join Map without inheriting from it + /// + /// Join this join map will start at + public DmTxControllerJoinMap(uint joinStart) + : this(joinStart, typeof(DmTxControllerJoinMap)) + { + } + + /// + /// Constructor to use when extending this Join map + /// + /// Join this join map will start at + /// Type of the child join map + protected DmTxControllerJoinMap(uint joinStart, Type type) : base(joinStart, type) + { + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs index a6100700..11509acf 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs @@ -1,174 +1,174 @@ -using System; - -namespace PepperDash.Essentials.Core.Bridges -{ - public class DmpsAudioOutputControllerJoinMap : JoinMapBaseAdvanced - { - - [JoinName("MasterVolumeLevel")] - public JoinDataComplete MasterVolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Master Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("MasterVolumeLevelScaled")] - public JoinDataComplete MasterVolumeLevelScaled = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "Master Volume 16bit Scaled Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("MixerPresetRecall")] - public JoinDataComplete MixerPresetRecall = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, - new JoinMetadata { Description = "Mixer Preset Recall Set", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("MixerEqPresetRecall")] - public JoinDataComplete MixerEqPresetRecall = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, - new JoinMetadata { Description = "Mixer Eq Preset Recall Set", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("MasterVolumeMuteOn")] - public JoinDataComplete MasterVolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Master Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("MasterVolumeMuteOff")] - public JoinDataComplete MasterVolumeMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "Master Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("MasterVolumeUp")] - public JoinDataComplete MasterVolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, - new JoinMetadata { Description = "Master Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("MasterVolumeDown")] - public JoinDataComplete MasterVolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, - new JoinMetadata { Description = "Master Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("MasterVolumeLevelScaledSend")] - public JoinDataComplete MasterVolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, - new JoinMetadata { Description = "Master Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("SourceVolumeLevel")] - public JoinDataComplete SourceVolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, - new JoinMetadata { Description = "Source Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("SourceVolumeLevelScaled")] - public JoinDataComplete SourceVolumeLevelScaled = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 }, - new JoinMetadata { Description = "Source Volume 16bit Scaled Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("SourceVolumeMuteOn")] - public JoinDataComplete SourceVolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, - new JoinMetadata { Description = "Source Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("SourceVolumeMuteOff")] - public JoinDataComplete SourceVolumeMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 }, - new JoinMetadata { Description = "Source Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("SourceVolumeUp")] - public JoinDataComplete SourceVolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 }, - new JoinMetadata { Description = "Source Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("SourceVolumeDown")] - public JoinDataComplete SourceVolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 }, - new JoinMetadata { Description = "Source Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("SourceVolumeLevelScaledSend")] - public JoinDataComplete SourceVolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 }, - new JoinMetadata { Description = "Source Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Codec1VolumeLevel")] - public JoinDataComplete Codec1VolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 }, - new JoinMetadata { Description = "Codec1 Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("Codec1VolumeLevelScaled")] - public JoinDataComplete Codec1VolumeLevelScaled = new JoinDataComplete(new JoinData { JoinNumber = 22, JoinSpan = 1 }, - new JoinMetadata { Description = "Codec1 Volume 16bit Scaled Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("Codec1VolumeMuteOn")] - public JoinDataComplete Codec1VolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 }, - new JoinMetadata { Description = "Codec1 Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Codec1VolumeMuteOff")] - public JoinDataComplete Codec1VolumeMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 22, JoinSpan = 1 }, - new JoinMetadata { Description = "Codec1 Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Codec1VolumeUp")] - public JoinDataComplete Codec1VolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 23, JoinSpan = 1 }, - new JoinMetadata { Description = "Codec1 Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Codec1VolumeDown")] - public JoinDataComplete Codec1VolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 24, JoinSpan = 1 }, - new JoinMetadata { Description = "Codec1 Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Codec1VolumeLevelScaledSend")] - public JoinDataComplete Codec1VolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 25, JoinSpan = 1 }, - new JoinMetadata { Description = "Codec1 Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Codec2VolumeLevel")] - public JoinDataComplete Codec2VolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 31, JoinSpan = 1 }, - new JoinMetadata { Description = "Codec2 Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("Codec2VolumeLevelScaled")] - public JoinDataComplete Codec2VolumeLevelScaled = new JoinDataComplete(new JoinData { JoinNumber = 32, JoinSpan = 1 }, - new JoinMetadata { Description = "Codec2 Volume 16bit Scaled Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("Codec2VolumeMuteOn")] - public JoinDataComplete Codec2VolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 31, JoinSpan = 1 }, - new JoinMetadata { Description = "Codec2 Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Codec2VolumeMuteOff")] - public JoinDataComplete Codec2VolumeMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 32, JoinSpan = 1 }, - new JoinMetadata { Description = "Codec2 Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Codec2VolumeUp")] - public JoinDataComplete Codec2VolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 33, JoinSpan = 1 }, - new JoinMetadata { Description = "Codec2 Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Codec2VolumeDown")] - public JoinDataComplete Codec2VolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 34, JoinSpan = 1 }, - new JoinMetadata { Description = "Codec2 Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Codec2VolumeLevelScaledSend")] - public JoinDataComplete Codec2VolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 35, JoinSpan = 1 }, - new JoinMetadata { Description = "Codec2 Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("MicsMasterVolumeLevel")] - public JoinDataComplete MicsMasterVolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 1 }, - new JoinMetadata { Description = "MicsMaster Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("MicsMasterVolumeLevelScaled")] - public JoinDataComplete MicsMasterVolumeLevelScaled = new JoinDataComplete(new JoinData { JoinNumber = 42, JoinSpan = 1 }, - new JoinMetadata { Description = "MicsMaster Volume 16bit Scaled Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("MicsMasterVolumeMuteOn")] - public JoinDataComplete MicsMasterVolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 1 }, - new JoinMetadata { Description = "MicsMaster Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("MicsMasterVolumeMuteOff")] - public JoinDataComplete MicsMasterVolumeMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 42, JoinSpan = 1 }, - new JoinMetadata { Description = "MicsMaster Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("MicsMasterVolumeUp")] - public JoinDataComplete MicsMasterVolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 43, JoinSpan = 1 }, - new JoinMetadata { Description = "MicsMaster Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("MicsMasterVolumeDown")] - public JoinDataComplete MicsMasterVolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 44, JoinSpan = 1 }, - new JoinMetadata { Description = "MicsMaster Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("MicsMasterVolumeLevelScaledSend")] - public JoinDataComplete MicsMasterVolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 45, JoinSpan = 1 }, - new JoinMetadata { Description = "Mics Master Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - /// - /// Constructor to use when instantiating this Join Map without inheriting from it - /// - /// Join this join map will start at - public DmpsAudioOutputControllerJoinMap(uint joinStart) - : this(joinStart, typeof(DmpsAudioOutputControllerJoinMap)) - { - } - - /// - /// Constructor to use when extending this Join map - /// - /// Join this join map will start at - /// Type of the child join map - protected DmpsAudioOutputControllerJoinMap(uint joinStart, Type type) : base(joinStart, type) - { - } - } +using System; + +namespace PepperDash.Essentials.Core.Bridges +{ + public class DmpsAudioOutputControllerJoinMap : JoinMapBaseAdvanced + { + + [JoinName("MasterVolumeLevel")] + public JoinDataComplete MasterVolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Master Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("MasterVolumeLevelScaled")] + public JoinDataComplete MasterVolumeLevelScaled = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "Master Volume 16bit Scaled Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("MixerPresetRecall")] + public JoinDataComplete MixerPresetRecall = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, + new JoinMetadata { Description = "Mixer Preset Recall Set", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("MixerEqPresetRecall")] + public JoinDataComplete MixerEqPresetRecall = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, + new JoinMetadata { Description = "Mixer Eq Preset Recall Set", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("MasterVolumeMuteOn")] + public JoinDataComplete MasterVolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Master Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("MasterVolumeMuteOff")] + public JoinDataComplete MasterVolumeMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "Master Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("MasterVolumeUp")] + public JoinDataComplete MasterVolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, + new JoinMetadata { Description = "Master Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("MasterVolumeDown")] + public JoinDataComplete MasterVolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, + new JoinMetadata { Description = "Master Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("MasterVolumeLevelScaledSend")] + public JoinDataComplete MasterVolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, + new JoinMetadata { Description = "Master Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("SourceVolumeLevel")] + public JoinDataComplete SourceVolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, + new JoinMetadata { Description = "Source Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("SourceVolumeLevelScaled")] + public JoinDataComplete SourceVolumeLevelScaled = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 }, + new JoinMetadata { Description = "Source Volume 16bit Scaled Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("SourceVolumeMuteOn")] + public JoinDataComplete SourceVolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, + new JoinMetadata { Description = "Source Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("SourceVolumeMuteOff")] + public JoinDataComplete SourceVolumeMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 }, + new JoinMetadata { Description = "Source Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("SourceVolumeUp")] + public JoinDataComplete SourceVolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 }, + new JoinMetadata { Description = "Source Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("SourceVolumeDown")] + public JoinDataComplete SourceVolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 }, + new JoinMetadata { Description = "Source Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("SourceVolumeLevelScaledSend")] + public JoinDataComplete SourceVolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 }, + new JoinMetadata { Description = "Source Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Codec1VolumeLevel")] + public JoinDataComplete Codec1VolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 }, + new JoinMetadata { Description = "Codec1 Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("Codec1VolumeLevelScaled")] + public JoinDataComplete Codec1VolumeLevelScaled = new JoinDataComplete(new JoinData { JoinNumber = 22, JoinSpan = 1 }, + new JoinMetadata { Description = "Codec1 Volume 16bit Scaled Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("Codec1VolumeMuteOn")] + public JoinDataComplete Codec1VolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 }, + new JoinMetadata { Description = "Codec1 Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Codec1VolumeMuteOff")] + public JoinDataComplete Codec1VolumeMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 22, JoinSpan = 1 }, + new JoinMetadata { Description = "Codec1 Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Codec1VolumeUp")] + public JoinDataComplete Codec1VolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 23, JoinSpan = 1 }, + new JoinMetadata { Description = "Codec1 Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Codec1VolumeDown")] + public JoinDataComplete Codec1VolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 24, JoinSpan = 1 }, + new JoinMetadata { Description = "Codec1 Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Codec1VolumeLevelScaledSend")] + public JoinDataComplete Codec1VolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 25, JoinSpan = 1 }, + new JoinMetadata { Description = "Codec1 Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Codec2VolumeLevel")] + public JoinDataComplete Codec2VolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 31, JoinSpan = 1 }, + new JoinMetadata { Description = "Codec2 Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("Codec2VolumeLevelScaled")] + public JoinDataComplete Codec2VolumeLevelScaled = new JoinDataComplete(new JoinData { JoinNumber = 32, JoinSpan = 1 }, + new JoinMetadata { Description = "Codec2 Volume 16bit Scaled Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("Codec2VolumeMuteOn")] + public JoinDataComplete Codec2VolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 31, JoinSpan = 1 }, + new JoinMetadata { Description = "Codec2 Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Codec2VolumeMuteOff")] + public JoinDataComplete Codec2VolumeMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 32, JoinSpan = 1 }, + new JoinMetadata { Description = "Codec2 Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Codec2VolumeUp")] + public JoinDataComplete Codec2VolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 33, JoinSpan = 1 }, + new JoinMetadata { Description = "Codec2 Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Codec2VolumeDown")] + public JoinDataComplete Codec2VolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 34, JoinSpan = 1 }, + new JoinMetadata { Description = "Codec2 Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Codec2VolumeLevelScaledSend")] + public JoinDataComplete Codec2VolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 35, JoinSpan = 1 }, + new JoinMetadata { Description = "Codec2 Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("MicsMasterVolumeLevel")] + public JoinDataComplete MicsMasterVolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 1 }, + new JoinMetadata { Description = "MicsMaster Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("MicsMasterVolumeLevelScaled")] + public JoinDataComplete MicsMasterVolumeLevelScaled = new JoinDataComplete(new JoinData { JoinNumber = 42, JoinSpan = 1 }, + new JoinMetadata { Description = "MicsMaster Volume 16bit Scaled Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("MicsMasterVolumeMuteOn")] + public JoinDataComplete MicsMasterVolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 1 }, + new JoinMetadata { Description = "MicsMaster Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("MicsMasterVolumeMuteOff")] + public JoinDataComplete MicsMasterVolumeMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 42, JoinSpan = 1 }, + new JoinMetadata { Description = "MicsMaster Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("MicsMasterVolumeUp")] + public JoinDataComplete MicsMasterVolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 43, JoinSpan = 1 }, + new JoinMetadata { Description = "MicsMaster Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("MicsMasterVolumeDown")] + public JoinDataComplete MicsMasterVolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 44, JoinSpan = 1 }, + new JoinMetadata { Description = "MicsMaster Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("MicsMasterVolumeLevelScaledSend")] + public JoinDataComplete MicsMasterVolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 45, JoinSpan = 1 }, + new JoinMetadata { Description = "Mics Master Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + /// + /// Constructor to use when instantiating this Join Map without inheriting from it + /// + /// Join this join map will start at + public DmpsAudioOutputControllerJoinMap(uint joinStart) + : this(joinStart, typeof(DmpsAudioOutputControllerJoinMap)) + { + } + + /// + /// Constructor to use when extending this Join map + /// + /// Join this join map will start at + /// Type of the child join map + protected DmpsAudioOutputControllerJoinMap(uint joinStart, Type type) : base(joinStart, type) + { + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmpsMicrophoneControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsMicrophoneControllerJoinMap.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmpsMicrophoneControllerJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsMicrophoneControllerJoinMap.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs index 44917899..a0d8d7b8 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs @@ -1,123 +1,123 @@ -using System; - -namespace PepperDash.Essentials.Core.Bridges -{ - public class DmpsRoutingControllerJoinMap : JoinMapBaseAdvanced - { - [JoinName("EnableRouting")] - public JoinDataComplete EnableRouting = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "DMPS Enable Audio and Video Routing", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("SystemPowerOn")] - public JoinDataComplete SystemPowerOn = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 }, - new JoinMetadata { Description = "DMPS System Power On Get/Set", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("SystemPowerOff")] - public JoinDataComplete SystemPowerOff = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 }, - new JoinMetadata { Description = "DMPS System Power Off Get/Set", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("FrontPanelLockOn")] - public JoinDataComplete FrontPanelLockOn = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 }, - new JoinMetadata { Description = "DMPS Front Panel Lock On Get/Set", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("FrontPanelLockOff")] - public JoinDataComplete FrontPanelLockOff = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 }, - new JoinMetadata { Description = "DMPS Front Panel Lock Off Get/Set", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("VideoSyncStatus")] - public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Input Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("InputEndpointOnline")] - public JoinDataComplete InputEndpointOnline = new JoinDataComplete(new JoinData { JoinNumber = 501, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Input Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("OutputEndpointOnline")] - public JoinDataComplete OutputEndpointOnline = new JoinDataComplete(new JoinData { JoinNumber = 701, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Output Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("OutputVideo")] - public JoinDataComplete OutputVideo = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Output Video Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("OutputAudio")] - public JoinDataComplete OutputAudio = new JoinDataComplete(new JoinData { JoinNumber = 301, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Output Audio Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("InputNames")] - public JoinDataComplete InputNames = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("OutputNames")] - public JoinDataComplete OutputNames = new JoinDataComplete(new JoinData { JoinNumber = 301, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Output Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("InputVideoNames")] - public JoinDataComplete InputVideoNames = - new JoinDataComplete(new JoinData { JoinNumber = 501, JoinSpan = 32 }, - new JoinMetadata - { - Description = "Video Input Name", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("InputAudioNames")] - public JoinDataComplete InputAudioNames = - new JoinDataComplete(new JoinData { JoinNumber = 701, JoinSpan = 32 }, - new JoinMetadata - { - Description = "Audio Input Name", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - [JoinName("OutputVideoNames")] - public JoinDataComplete OutputVideoNames = - new JoinDataComplete(new JoinData { JoinNumber = 901, JoinSpan = 32 }, - new JoinMetadata - { - Description = "Video Output Name", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - [JoinName("OutputAudioNames")] - public JoinDataComplete OutputAudioNames = - new JoinDataComplete(new JoinData { JoinNumber = 1101, JoinSpan = 32 }, - new JoinMetadata - { - Description = "Audio Output Name", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("OutputCurrentVideoInputNames")] - public JoinDataComplete OutputCurrentVideoInputNames = new JoinDataComplete(new JoinData { JoinNumber = 2001, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Video Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("OutputCurrentAudioInputNames")] - public JoinDataComplete OutputCurrentAudioInputNames = new JoinDataComplete(new JoinData { JoinNumber = 2201, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Audio Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("InputCurrentResolution")] - public JoinDataComplete InputCurrentResolution = new JoinDataComplete(new JoinData { JoinNumber = 2401, JoinSpan = 32 }, - new JoinMetadata { Description = "DM Chassis Input Current Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - /// - /// Constructor to use when instantiating this Join Map without inheriting from it - /// - /// Join this join map will start at - public DmpsRoutingControllerJoinMap(uint joinStart) - : this(joinStart, typeof(DmpsRoutingControllerJoinMap)) - { - } - - /// - /// Constructor to use when extending this Join map - /// - /// Join this join map will start at - /// Type of the child join map - protected DmpsRoutingControllerJoinMap(uint joinStart, Type type) : base(joinStart, type) - { - } - } +using System; + +namespace PepperDash.Essentials.Core.Bridges +{ + public class DmpsRoutingControllerJoinMap : JoinMapBaseAdvanced + { + [JoinName("EnableRouting")] + public JoinDataComplete EnableRouting = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "DMPS Enable Audio and Video Routing", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("SystemPowerOn")] + public JoinDataComplete SystemPowerOn = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 }, + new JoinMetadata { Description = "DMPS System Power On Get/Set", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("SystemPowerOff")] + public JoinDataComplete SystemPowerOff = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 }, + new JoinMetadata { Description = "DMPS System Power Off Get/Set", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("FrontPanelLockOn")] + public JoinDataComplete FrontPanelLockOn = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 }, + new JoinMetadata { Description = "DMPS Front Panel Lock On Get/Set", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("FrontPanelLockOff")] + public JoinDataComplete FrontPanelLockOff = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 }, + new JoinMetadata { Description = "DMPS Front Panel Lock Off Get/Set", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("VideoSyncStatus")] + public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Input Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("InputEndpointOnline")] + public JoinDataComplete InputEndpointOnline = new JoinDataComplete(new JoinData { JoinNumber = 501, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Input Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("OutputEndpointOnline")] + public JoinDataComplete OutputEndpointOnline = new JoinDataComplete(new JoinData { JoinNumber = 701, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Output Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("OutputVideo")] + public JoinDataComplete OutputVideo = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Output Video Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("OutputAudio")] + public JoinDataComplete OutputAudio = new JoinDataComplete(new JoinData { JoinNumber = 301, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Output Audio Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("InputNames")] + public JoinDataComplete InputNames = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("OutputNames")] + public JoinDataComplete OutputNames = new JoinDataComplete(new JoinData { JoinNumber = 301, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Output Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("InputVideoNames")] + public JoinDataComplete InputVideoNames = + new JoinDataComplete(new JoinData { JoinNumber = 501, JoinSpan = 32 }, + new JoinMetadata + { + Description = "Video Input Name", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("InputAudioNames")] + public JoinDataComplete InputAudioNames = + new JoinDataComplete(new JoinData { JoinNumber = 701, JoinSpan = 32 }, + new JoinMetadata + { + Description = "Audio Input Name", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + [JoinName("OutputVideoNames")] + public JoinDataComplete OutputVideoNames = + new JoinDataComplete(new JoinData { JoinNumber = 901, JoinSpan = 32 }, + new JoinMetadata + { + Description = "Video Output Name", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + [JoinName("OutputAudioNames")] + public JoinDataComplete OutputAudioNames = + new JoinDataComplete(new JoinData { JoinNumber = 1101, JoinSpan = 32 }, + new JoinMetadata + { + Description = "Audio Output Name", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("OutputCurrentVideoInputNames")] + public JoinDataComplete OutputCurrentVideoInputNames = new JoinDataComplete(new JoinData { JoinNumber = 2001, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Video Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("OutputCurrentAudioInputNames")] + public JoinDataComplete OutputCurrentAudioInputNames = new JoinDataComplete(new JoinData { JoinNumber = 2201, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Audio Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("InputCurrentResolution")] + public JoinDataComplete InputCurrentResolution = new JoinDataComplete(new JoinData { JoinNumber = 2401, JoinSpan = 32 }, + new JoinMetadata { Description = "DM Chassis Input Current Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + /// + /// Constructor to use when instantiating this Join Map without inheriting from it + /// + /// Join this join map will start at + public DmpsRoutingControllerJoinMap(uint joinStart) + : this(joinStart, typeof(DmpsRoutingControllerJoinMap)) + { + } + + /// + /// Constructor to use when extending this Join map + /// + /// Join this join map will start at + /// Type of the child join map + protected DmpsRoutingControllerJoinMap(uint joinStart, Type type) : base(joinStart, type) + { + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/GenericLightingJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericLightingJoinMap.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/GenericLightingJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericLightingJoinMap.cs index 9a14c332..2a3015f1 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/GenericLightingJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericLightingJoinMap.cs @@ -1,49 +1,49 @@ -using System; - - +using System; + + namespace PepperDash.Essentials.Core.Bridges { public class GenericLightingJoinMap : JoinMapBaseAdvanced - { - - [JoinName("IsOnline")] - public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Lighting Controller Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("SelectScene")] - public JoinDataComplete SelectScene = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Lighting Controller Select Scene By Index", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("SelectSceneDirect")] - public JoinDataComplete SelectSceneDirect = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 10 }, - new JoinMetadata { Description = "Lighting Controller Select Scene", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.DigitalSerial }); - - [JoinName("ButtonVisibility")] - public JoinDataComplete ButtonVisibility = new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 10 }, - new JoinMetadata { Description = "Lighting Controller Button Visibility", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("IntegrationIdSet")] - public JoinDataComplete IntegrationIdSet = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Lighting Controller Set Integration Id", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial }); - - - - /// - /// Constructor to use when instantiating this Join Map without inheriting from it - /// - /// Join this join map will start at - public GenericLightingJoinMap(uint joinStart) - : this(joinStart, typeof(GenericLightingJoinMap)) - { - } - - /// - /// Constructor to use when extending this Join map - /// - /// Join this join map will start at - /// Type of the child join map - protected GenericLightingJoinMap(uint joinStart, Type type) : base(joinStart, type) - { - } + { + + [JoinName("IsOnline")] + public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Lighting Controller Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("SelectScene")] + public JoinDataComplete SelectScene = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Lighting Controller Select Scene By Index", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("SelectSceneDirect")] + public JoinDataComplete SelectSceneDirect = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 10 }, + new JoinMetadata { Description = "Lighting Controller Select Scene", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.DigitalSerial }); + + [JoinName("ButtonVisibility")] + public JoinDataComplete ButtonVisibility = new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 10 }, + new JoinMetadata { Description = "Lighting Controller Button Visibility", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("IntegrationIdSet")] + public JoinDataComplete IntegrationIdSet = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Lighting Controller Set Integration Id", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial }); + + + + /// + /// Constructor to use when instantiating this Join Map without inheriting from it + /// + /// Join this join map will start at + public GenericLightingJoinMap(uint joinStart) + : this(joinStart, typeof(GenericLightingJoinMap)) + { + } + + /// + /// Constructor to use when extending this Join map + /// + /// Join this join map will start at + /// Type of the child join map + protected GenericLightingJoinMap(uint joinStart, Type type) : base(joinStart, type) + { + } } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs index 0dc830bb..68897767 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs @@ -1,31 +1,31 @@ -using System; - +using System; + namespace PepperDash.Essentials.Core.Bridges { public class GenericRelayControllerJoinMap : JoinMapBaseAdvanced { - [JoinName("Relay")] - public JoinDataComplete Relay = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Device Relay State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - /// - /// Constructor to use when instantiating this Join Map without inheriting from it - /// - /// Join this join map will start at - public GenericRelayControllerJoinMap(uint joinStart) - : this(joinStart, typeof(GenericRelayControllerJoinMap)) - { - } - - /// - /// Constructor to use when extending this Join map - /// - /// Join this join map will start at - /// Type of the child join map - protected GenericRelayControllerJoinMap(uint joinStart, Type type) : base(joinStart, type) - { - + [JoinName("Relay")] + public JoinDataComplete Relay = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Device Relay State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + /// + /// Constructor to use when instantiating this Join Map without inheriting from it + /// + /// Join this join map will start at + public GenericRelayControllerJoinMap(uint joinStart) + : this(joinStart, typeof(GenericRelayControllerJoinMap)) + { + } + + /// + /// Constructor to use when extending this Join map + /// + /// Join this join map will start at + /// Type of the child join map + protected GenericRelayControllerJoinMap(uint joinStart, Type type) : base(joinStart, type) + { + } } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/GlsOccupancySensorBaseJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GlsOccupancySensorBaseJoinMap.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/GlsOccupancySensorBaseJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/GlsOccupancySensorBaseJoinMap.cs index 72cb1433..ded7343f 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/GlsOccupancySensorBaseJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GlsOccupancySensorBaseJoinMap.cs @@ -1,184 +1,184 @@ -using System; - -namespace PepperDash.Essentials.Core.Bridges -{ - public class GlsOccupancySensorBaseJoinMap : JoinMapBaseAdvanced - { - [JoinName("IsOnline")] - public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Is Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("ForceOccupied")] - public JoinDataComplete ForceOccupied = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Set to Occupied", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("ForceVacant")] - public JoinDataComplete ForceVacant = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Set to Vacant", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("EnableRawStates")] - public JoinDataComplete EnableRawStates = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Enable Raw", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("RoomOccupiedFeedback")] - public JoinDataComplete RoomOccupiedFeedback = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Room Is Occupied", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("GraceOccupancyDetectedFeedback")] - public JoinDataComplete GraceOccupancyDetectedFeedback = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Grace Occupancy Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("RoomVacantFeedback")] - public JoinDataComplete RoomVacantFeedback = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Room Is Vacant", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("RawOccupancyFeedback")] - public JoinDataComplete RawOccupancyFeedback = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Raw Occupancy Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("RawOccupancyPirFeedback")] - public JoinDataComplete RawOccupancyPirFeedback = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Raw PIR Occupancy Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("RawOccupancyUsFeedback")] - public JoinDataComplete RawOccupancyUsFeedback = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Raw US Occupancy Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("EnableLedFlash")] - public JoinDataComplete EnableLedFlash = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Enable LED Flash", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DisableLedFlash")] - public JoinDataComplete DisableLedFlash = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Disable LED Flash", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("EnableShortTimeout")] - public JoinDataComplete EnableShortTimeout = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Enable Short Timeout", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DisableShortTimeout")] - public JoinDataComplete DisableShortTimeout = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Disable Short Timeout", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("OrWhenVacated")] - public JoinDataComplete OrWhenVacated = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Set To Vacant when Either Sensor is Vacant", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("AndWhenVacated")] - public JoinDataComplete AndWhenVacated = new JoinDataComplete(new JoinData { JoinNumber = 16, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Set To Vacant when Both Sensors are Vacant", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("EnableUsA")] - public JoinDataComplete EnableUsA = new JoinDataComplete(new JoinData { JoinNumber = 17, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Enable Ultrasonic Sensor A", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DisableUsA")] - public JoinDataComplete DisableUsA = new JoinDataComplete(new JoinData { JoinNumber = 18, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Disable Ultrasonic Sensor A", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("EnableUsB")] - public JoinDataComplete EnableUsB = new JoinDataComplete(new JoinData { JoinNumber = 19, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Enable Ultrasonic Sensor B", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DisableUsB")] - public JoinDataComplete DisableUsB = new JoinDataComplete(new JoinData { JoinNumber = 20, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Disable Ultrasonic Sensor B", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("EnablePir")] - public JoinDataComplete EnablePir = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Enable IR Sensor", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DisablePir")] - public JoinDataComplete DisablePir = new JoinDataComplete(new JoinData { JoinNumber = 22, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Disable IR Sensor", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("IncrementUsInOccupiedState")] - public JoinDataComplete IncrementUsInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 23, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Increment US Occupied State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DecrementUsInOccupiedState")] - public JoinDataComplete DecrementUsInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 24, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Decrement US Occupied State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("IncrementUsInVacantState")] - public JoinDataComplete IncrementUsInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 25, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Increment US Vacant State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DecrementUsInVacantState")] - public JoinDataComplete DecrementUsInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 26, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Decrement US Vacant State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("IncrementPirInOccupiedState")] - public JoinDataComplete IncrementPirInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 27, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Increment IR Occupied State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DecrementPirInOccupiedState")] - public JoinDataComplete DecrementPirInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 28, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Decrement IR Occupied State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("IncrementPirInVacantState")] - public JoinDataComplete IncrementPirInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 29, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Increment IR Vacant State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DecrementPirInVacantState")] - public JoinDataComplete DecrementPirInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 30, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Decrement IR Vacant State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Timeout")] - public JoinDataComplete Timeout = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Timeout Value", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("TimeoutLocalFeedback")] - public JoinDataComplete TimeoutLocalFeedback = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Local Timeout Value", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("InternalPhotoSensorValue")] - public JoinDataComplete InternalPhotoSensorValue = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Internal PhotoSensor Value", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("ExternalPhotoSensorValue")] - public JoinDataComplete ExternalPhotoSensorValue = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor External PhotoSensor Value", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("UsSensitivityInOccupiedState")] - public JoinDataComplete UsSensitivityInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Ultrasonic Sensitivity in Occupied State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("UsSensitivityInVacantState")] - public JoinDataComplete UsSensitivityInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Ultrasonic Sensitivity in Vacant State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("PirSensitivityInOccupiedState")] - public JoinDataComplete PirSensitivityInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor PIR Sensitivity in Occupied State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("PirSensitivityInVacantState")] - public JoinDataComplete PirSensitivityInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor PIR Sensitivity in Vacant State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("Name")] - public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Occ Sensor Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - - /// - /// Constructor to use when instantiating this Join Map without inheriting from it - /// - /// Join this join map will start at - public GlsOccupancySensorBaseJoinMap(uint joinStart) - : this(joinStart, typeof(GlsOccupancySensorBaseJoinMap)) - { - } - - /// - /// Constructor to use when extending this Join map - /// - /// Join this join map will start at - /// Type of the child join map - protected GlsOccupancySensorBaseJoinMap(uint joinStart, Type type) - : base(joinStart, type) - { - } - - } -} +using System; + +namespace PepperDash.Essentials.Core.Bridges +{ + public class GlsOccupancySensorBaseJoinMap : JoinMapBaseAdvanced + { + [JoinName("IsOnline")] + public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Is Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("ForceOccupied")] + public JoinDataComplete ForceOccupied = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Set to Occupied", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("ForceVacant")] + public JoinDataComplete ForceVacant = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Set to Vacant", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("EnableRawStates")] + public JoinDataComplete EnableRawStates = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Enable Raw", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("RoomOccupiedFeedback")] + public JoinDataComplete RoomOccupiedFeedback = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Room Is Occupied", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("GraceOccupancyDetectedFeedback")] + public JoinDataComplete GraceOccupancyDetectedFeedback = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Grace Occupancy Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("RoomVacantFeedback")] + public JoinDataComplete RoomVacantFeedback = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Room Is Vacant", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("RawOccupancyFeedback")] + public JoinDataComplete RawOccupancyFeedback = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Raw Occupancy Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("RawOccupancyPirFeedback")] + public JoinDataComplete RawOccupancyPirFeedback = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Raw PIR Occupancy Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("RawOccupancyUsFeedback")] + public JoinDataComplete RawOccupancyUsFeedback = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Raw US Occupancy Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("EnableLedFlash")] + public JoinDataComplete EnableLedFlash = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Enable LED Flash", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DisableLedFlash")] + public JoinDataComplete DisableLedFlash = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Disable LED Flash", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("EnableShortTimeout")] + public JoinDataComplete EnableShortTimeout = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Enable Short Timeout", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DisableShortTimeout")] + public JoinDataComplete DisableShortTimeout = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Disable Short Timeout", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("OrWhenVacated")] + public JoinDataComplete OrWhenVacated = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Set To Vacant when Either Sensor is Vacant", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("AndWhenVacated")] + public JoinDataComplete AndWhenVacated = new JoinDataComplete(new JoinData { JoinNumber = 16, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Set To Vacant when Both Sensors are Vacant", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("EnableUsA")] + public JoinDataComplete EnableUsA = new JoinDataComplete(new JoinData { JoinNumber = 17, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Enable Ultrasonic Sensor A", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DisableUsA")] + public JoinDataComplete DisableUsA = new JoinDataComplete(new JoinData { JoinNumber = 18, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Disable Ultrasonic Sensor A", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("EnableUsB")] + public JoinDataComplete EnableUsB = new JoinDataComplete(new JoinData { JoinNumber = 19, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Enable Ultrasonic Sensor B", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DisableUsB")] + public JoinDataComplete DisableUsB = new JoinDataComplete(new JoinData { JoinNumber = 20, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Disable Ultrasonic Sensor B", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("EnablePir")] + public JoinDataComplete EnablePir = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Enable IR Sensor", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DisablePir")] + public JoinDataComplete DisablePir = new JoinDataComplete(new JoinData { JoinNumber = 22, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Disable IR Sensor", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("IncrementUsInOccupiedState")] + public JoinDataComplete IncrementUsInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 23, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Increment US Occupied State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DecrementUsInOccupiedState")] + public JoinDataComplete DecrementUsInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 24, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Decrement US Occupied State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("IncrementUsInVacantState")] + public JoinDataComplete IncrementUsInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 25, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Increment US Vacant State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DecrementUsInVacantState")] + public JoinDataComplete DecrementUsInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 26, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Decrement US Vacant State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("IncrementPirInOccupiedState")] + public JoinDataComplete IncrementPirInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 27, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Increment IR Occupied State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DecrementPirInOccupiedState")] + public JoinDataComplete DecrementPirInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 28, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Decrement IR Occupied State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("IncrementPirInVacantState")] + public JoinDataComplete IncrementPirInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 29, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Increment IR Vacant State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DecrementPirInVacantState")] + public JoinDataComplete DecrementPirInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 30, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Decrement IR Vacant State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Timeout")] + public JoinDataComplete Timeout = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Timeout Value", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("TimeoutLocalFeedback")] + public JoinDataComplete TimeoutLocalFeedback = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Local Timeout Value", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("InternalPhotoSensorValue")] + public JoinDataComplete InternalPhotoSensorValue = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Internal PhotoSensor Value", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("ExternalPhotoSensorValue")] + public JoinDataComplete ExternalPhotoSensorValue = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor External PhotoSensor Value", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("UsSensitivityInOccupiedState")] + public JoinDataComplete UsSensitivityInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Ultrasonic Sensitivity in Occupied State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("UsSensitivityInVacantState")] + public JoinDataComplete UsSensitivityInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Ultrasonic Sensitivity in Vacant State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("PirSensitivityInOccupiedState")] + public JoinDataComplete PirSensitivityInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor PIR Sensitivity in Occupied State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("PirSensitivityInVacantState")] + public JoinDataComplete PirSensitivityInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor PIR Sensitivity in Vacant State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("Name")] + public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Occ Sensor Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + + /// + /// Constructor to use when instantiating this Join Map without inheriting from it + /// + /// Join this join map will start at + public GlsOccupancySensorBaseJoinMap(uint joinStart) + : this(joinStart, typeof(GlsOccupancySensorBaseJoinMap)) + { + } + + /// + /// Constructor to use when extending this Join map + /// + /// Join this join map will start at + /// Type of the child join map + protected GlsOccupancySensorBaseJoinMap(uint joinStart, Type type) + : base(joinStart, type) + { + } + + } +} diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/GlsPartitionSensorJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GlsPartitionSensorJoinMap.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/GlsPartitionSensorJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/GlsPartitionSensorJoinMap.cs index 5a583d69..0ee3d049 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/GlsPartitionSensorJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GlsPartitionSensorJoinMap.cs @@ -1,300 +1,300 @@ -using System; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Core.Bridges.JoinMaps -{ - public class GlsPartitionSensorJoinMap : JoinMapBaseAdvanced - { - - #region Digital - - [JoinName("IsOnline")] - public JoinDataComplete IsOnline = new JoinDataComplete( - new JoinData - { - JoinNumber = 1, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sensor Is Online", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - - [JoinName("Enable")] - public JoinDataComplete Enable = new JoinDataComplete( - new JoinData - { - JoinNumber = 2, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sensor Enable", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("PartitionSensed")] - public JoinDataComplete PartitionSensed = new JoinDataComplete( - new JoinData - { - JoinNumber = 3, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sensor Partition Sensed", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("PartitionNotSensed")] - public JoinDataComplete PartitionNotSensed = new JoinDataComplete( - new JoinData - { - JoinNumber = 4, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sensor Partition Not Sensed", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("IncreaseSensitivity")] - public JoinDataComplete IncreaseSensitivity = new JoinDataComplete( - new JoinData - { - JoinNumber = 6, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sensor Increase Sensitivity", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DecreaseSensitivity")] - public JoinDataComplete DecreaseSensitivity = new JoinDataComplete( - new JoinData - { - JoinNumber = 7, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sensor Decrease Sensitivity", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - #endregion - - #region Analog - - [JoinName("Sensitivity")] - public JoinDataComplete Sensitivity = new JoinDataComplete( - new JoinData - { - JoinNumber = 2, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sensor Sensitivity", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Analog - }); - - #endregion - - - #region Serial - - [JoinName("Name")] - public JoinDataComplete Name = new JoinDataComplete( - new JoinData - { - JoinNumber = 1, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sensor Name", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - #endregion - - - /// - /// Constructor to use when instantiating this Join Map without inheriting from it - /// - /// Join this join map will start at - public GlsPartitionSensorJoinMap(uint joinStart) - : this(joinStart, typeof(GlsPartitionSensorJoinMap)) - { - - } - - /// - /// Constructor to use when extending this Join map - /// - /// Join this join map will start at - /// Type of the child join map - protected GlsPartitionSensorJoinMap(uint joinStart, Type type) - : base(joinStart, type) - { - - } - } -} - -namespace PepperDash_Essentials_Core.Bridges.JoinMaps -{ - /// - /// - /// - [Obsolete("use PepperDash.Essentials.Core.Bridges.JoinMaps version")] - public class GlsPartitionSensorJoinMap:JoinMapBaseAdvanced - { - [JoinName("IsOnline")] - public JoinDataComplete IsOnline = new JoinDataComplete( - new JoinData - { - JoinNumber = 1, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sensor Is Online", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("Name")] - public JoinDataComplete Name = new JoinDataComplete( - new JoinData - { - JoinNumber = 1, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sensor Name", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("Enable")] - public JoinDataComplete Enable = new JoinDataComplete( - new JoinData - { - JoinNumber = 2, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sensor Enable", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("PartitionSensed")] - public JoinDataComplete PartitionSensed = new JoinDataComplete( - new JoinData - { - JoinNumber = 3, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sensor Partition Sensed", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("PartitionNotSensed")] - public JoinDataComplete PartitionNotSensed = new JoinDataComplete( - new JoinData - { - JoinNumber = 4, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sensor Partition Not Sensed", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("IncreaseSensitivity")] - public JoinDataComplete IncreaseSensitivity = new JoinDataComplete( - new JoinData - { - JoinNumber = 6, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sensor Increase Sensitivity", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DecreaseSensitivity")] - public JoinDataComplete DecreaseSensitivity = new JoinDataComplete( - new JoinData - { - JoinNumber = 7, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sensor Decrease Sensitivity", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("Sensitivity")] - public JoinDataComplete Sensitivity = new JoinDataComplete( - new JoinData - { - JoinNumber = 2, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sensor Sensitivity", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Analog - }); - - /// - /// Constructor to use when instantiating this Join Map without inheriting from it - /// - /// Join this join map will start at - public GlsPartitionSensorJoinMap(uint joinStart) - : this(joinStart, typeof(GlsPartitionSensorJoinMap)) - { - - } - - /// - /// Constructor to use when extending this Join map - /// - /// Join this join map will start at - /// Type of the child join map - protected GlsPartitionSensorJoinMap(uint joinStart, Type type) - : base(joinStart, type) - { - - } - } +using System; +using PepperDash.Essentials.Core; + +namespace PepperDash.Essentials.Core.Bridges.JoinMaps +{ + public class GlsPartitionSensorJoinMap : JoinMapBaseAdvanced + { + + #region Digital + + [JoinName("IsOnline")] + public JoinDataComplete IsOnline = new JoinDataComplete( + new JoinData + { + JoinNumber = 1, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sensor Is Online", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + + [JoinName("Enable")] + public JoinDataComplete Enable = new JoinDataComplete( + new JoinData + { + JoinNumber = 2, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sensor Enable", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("PartitionSensed")] + public JoinDataComplete PartitionSensed = new JoinDataComplete( + new JoinData + { + JoinNumber = 3, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sensor Partition Sensed", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("PartitionNotSensed")] + public JoinDataComplete PartitionNotSensed = new JoinDataComplete( + new JoinData + { + JoinNumber = 4, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sensor Partition Not Sensed", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("IncreaseSensitivity")] + public JoinDataComplete IncreaseSensitivity = new JoinDataComplete( + new JoinData + { + JoinNumber = 6, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sensor Increase Sensitivity", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DecreaseSensitivity")] + public JoinDataComplete DecreaseSensitivity = new JoinDataComplete( + new JoinData + { + JoinNumber = 7, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sensor Decrease Sensitivity", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + #endregion + + #region Analog + + [JoinName("Sensitivity")] + public JoinDataComplete Sensitivity = new JoinDataComplete( + new JoinData + { + JoinNumber = 2, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sensor Sensitivity", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Analog + }); + + #endregion + + + #region Serial + + [JoinName("Name")] + public JoinDataComplete Name = new JoinDataComplete( + new JoinData + { + JoinNumber = 1, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sensor Name", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + #endregion + + + /// + /// Constructor to use when instantiating this Join Map without inheriting from it + /// + /// Join this join map will start at + public GlsPartitionSensorJoinMap(uint joinStart) + : this(joinStart, typeof(GlsPartitionSensorJoinMap)) + { + + } + + /// + /// Constructor to use when extending this Join map + /// + /// Join this join map will start at + /// Type of the child join map + protected GlsPartitionSensorJoinMap(uint joinStart, Type type) + : base(joinStart, type) + { + + } + } +} + +namespace PepperDash_Essentials_Core.Bridges.JoinMaps +{ + /// + /// + /// + [Obsolete("use PepperDash.Essentials.Core.Bridges.JoinMaps version")] + public class GlsPartitionSensorJoinMap:JoinMapBaseAdvanced + { + [JoinName("IsOnline")] + public JoinDataComplete IsOnline = new JoinDataComplete( + new JoinData + { + JoinNumber = 1, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sensor Is Online", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("Name")] + public JoinDataComplete Name = new JoinDataComplete( + new JoinData + { + JoinNumber = 1, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sensor Name", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("Enable")] + public JoinDataComplete Enable = new JoinDataComplete( + new JoinData + { + JoinNumber = 2, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sensor Enable", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("PartitionSensed")] + public JoinDataComplete PartitionSensed = new JoinDataComplete( + new JoinData + { + JoinNumber = 3, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sensor Partition Sensed", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("PartitionNotSensed")] + public JoinDataComplete PartitionNotSensed = new JoinDataComplete( + new JoinData + { + JoinNumber = 4, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sensor Partition Not Sensed", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("IncreaseSensitivity")] + public JoinDataComplete IncreaseSensitivity = new JoinDataComplete( + new JoinData + { + JoinNumber = 6, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sensor Increase Sensitivity", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DecreaseSensitivity")] + public JoinDataComplete DecreaseSensitivity = new JoinDataComplete( + new JoinData + { + JoinNumber = 7, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sensor Decrease Sensitivity", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("Sensitivity")] + public JoinDataComplete Sensitivity = new JoinDataComplete( + new JoinData + { + JoinNumber = 2, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sensor Sensitivity", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Analog + }); + + /// + /// Constructor to use when instantiating this Join Map without inheriting from it + /// + /// Join this join map will start at + public GlsPartitionSensorJoinMap(uint joinStart) + : this(joinStart, typeof(GlsPartitionSensorJoinMap)) + { + + } + + /// + /// Constructor to use when extending this Join map + /// + /// Join this join map will start at + /// Type of the child join map + protected GlsPartitionSensorJoinMap(uint joinStart, Type type) + : base(joinStart, type) + { + + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/HdMdNxM4kEControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdMdNxM4kEControllerJoinMap.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/HdMdNxM4kEControllerJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdMdNxM4kEControllerJoinMap.cs index a0406982..e69946ea 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/HdMdNxM4kEControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdMdNxM4kEControllerJoinMap.cs @@ -1,66 +1,66 @@ -using System; - -namespace PepperDash.Essentials.Core.Bridges -{ - public class HdMdNxM4kEControllerJoinMap : JoinMapBaseAdvanced - { - [JoinName("Name")] - public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Device Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("EnableAutoRoute")] - public JoinDataComplete EnableAutoRoute = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Enable Automatic Routing on 4x1 Switchers", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("InputName")] - public JoinDataComplete InputName = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 8 }, - new JoinMetadata { Description = "Device Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("InputSync")] - public JoinDataComplete InputSync = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 8 }, - new JoinMetadata { Description = "Device Input Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("OutputName")] - public JoinDataComplete OutputName = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 2 }, - new JoinMetadata { Description = "Device Output Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("OutputRoute")] - public JoinDataComplete OutputRoute = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 2 }, - new JoinMetadata { Description = "Device Output Route Set/Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("OutputRoutedName")] - public JoinDataComplete OutputRoutedName = new JoinDataComplete(new JoinData { JoinNumber = 16, JoinSpan = 2 }, - new JoinMetadata { Description = "Device Output Route Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("EnableInputHdcp")] - public JoinDataComplete EnableInputHdcp = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 8 }, - new JoinMetadata { Description = "Device Enable Input Hdcp", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DisableInputHdcp")] - public JoinDataComplete DisableInputHdcp = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 8 }, - new JoinMetadata { Description = "Device Disnable Input Hdcp", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("IsOnline")] - public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 30, JoinSpan = 1 }, - new JoinMetadata { Description = "Device Onlne", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - /// - /// Constructor to use when instantiating this Join Map without inheriting from it - /// - /// Join this join map will start at - public HdMdNxM4kEControllerJoinMap(uint joinStart) - : this(joinStart, typeof(HdMdNxM4kEControllerJoinMap)) - { - } - - /// - /// Constructor to use when extending this Join map - /// - /// Join this join map will start at - /// Type of the child join map - protected HdMdNxM4kEControllerJoinMap(uint joinStart, Type type) - : base(joinStart, type) - { - } - } +using System; + +namespace PepperDash.Essentials.Core.Bridges +{ + public class HdMdNxM4kEControllerJoinMap : JoinMapBaseAdvanced + { + [JoinName("Name")] + public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Device Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("EnableAutoRoute")] + public JoinDataComplete EnableAutoRoute = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Enable Automatic Routing on 4x1 Switchers", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("InputName")] + public JoinDataComplete InputName = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 8 }, + new JoinMetadata { Description = "Device Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("InputSync")] + public JoinDataComplete InputSync = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 8 }, + new JoinMetadata { Description = "Device Input Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("OutputName")] + public JoinDataComplete OutputName = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 2 }, + new JoinMetadata { Description = "Device Output Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("OutputRoute")] + public JoinDataComplete OutputRoute = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 2 }, + new JoinMetadata { Description = "Device Output Route Set/Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("OutputRoutedName")] + public JoinDataComplete OutputRoutedName = new JoinDataComplete(new JoinData { JoinNumber = 16, JoinSpan = 2 }, + new JoinMetadata { Description = "Device Output Route Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("EnableInputHdcp")] + public JoinDataComplete EnableInputHdcp = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 8 }, + new JoinMetadata { Description = "Device Enable Input Hdcp", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DisableInputHdcp")] + public JoinDataComplete DisableInputHdcp = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 8 }, + new JoinMetadata { Description = "Device Disnable Input Hdcp", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("IsOnline")] + public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 30, JoinSpan = 1 }, + new JoinMetadata { Description = "Device Onlne", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + /// + /// Constructor to use when instantiating this Join Map without inheriting from it + /// + /// Join this join map will start at + public HdMdNxM4kEControllerJoinMap(uint joinStart) + : this(joinStart, typeof(HdMdNxM4kEControllerJoinMap)) + { + } + + /// + /// Constructor to use when extending this Join map + /// + /// Join this join map will start at + /// Type of the child join map + protected HdMdNxM4kEControllerJoinMap(uint joinStart, Type type) + : base(joinStart, type) + { + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs index 61a66e05..0936f75d 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs @@ -1,76 +1,76 @@ -using System; - +using System; + namespace PepperDash.Essentials.Core.Bridges { public class HdMdxxxCEControllerJoinMap : JoinMapBaseAdvanced { - [JoinName("IsOnline")] - public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Device Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("RemoteEndDetected")] - public JoinDataComplete RemoteEndDetected = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "Device Remote End Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("AutoRouteOn")] - public JoinDataComplete AutoRouteOn = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, - new JoinMetadata { Description = "Device Auto Route On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("AutoRouteOff")] - public JoinDataComplete AutoRouteOff = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, - new JoinMetadata { Description = "Device Auto Route Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("PriorityRoutingOn")] - public JoinDataComplete PriorityRoutingOn = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, - new JoinMetadata { Description = "Device Priority Routing On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("PriorityRoutingOff")] - public JoinDataComplete PriorityRoutingOff = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, - new JoinMetadata { Description = "Device Priority Routing Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("InputOnScreenDisplayEnabled")] - public JoinDataComplete InputOnScreenDisplayEnabled = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 }, - new JoinMetadata { Description = "Device Input OSD Enabled", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("InputOnScreenDisplayDisabled")] - public JoinDataComplete InputOnScreenDisplayDisabled = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 }, - new JoinMetadata { Description = "Device Input OSD Disabled", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("SyncDetected")] - public JoinDataComplete SyncDetected = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 5 }, - new JoinMetadata { Description = "Device Sync Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("VideoSource")] - public JoinDataComplete VideoSource = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 5 }, - new JoinMetadata { Description = "Device Video Source Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("SourceCount")] - public JoinDataComplete SourceCount = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 5 }, - new JoinMetadata { Description = "Device Video Source Count", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("SourceNames")] - public JoinDataComplete SourceNames = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 5 }, - new JoinMetadata { Description = "Device Video Source Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - - /// - /// Constructor to use when instantiating this Join Map without inheriting from it - /// - /// Join this join map will start at - public HdMdxxxCEControllerJoinMap(uint joinStart) - : this(joinStart, typeof(HdMdxxxCEControllerJoinMap)) - { - } - - /// - /// Constructor to use when extending this Join map - /// - /// Join this join map will start at - /// Type of the child join map - protected HdMdxxxCEControllerJoinMap(uint joinStart, Type type) - : base(joinStart, type) - { + [JoinName("IsOnline")] + public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Device Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("RemoteEndDetected")] + public JoinDataComplete RemoteEndDetected = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "Device Remote End Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("AutoRouteOn")] + public JoinDataComplete AutoRouteOn = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, + new JoinMetadata { Description = "Device Auto Route On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("AutoRouteOff")] + public JoinDataComplete AutoRouteOff = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, + new JoinMetadata { Description = "Device Auto Route Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("PriorityRoutingOn")] + public JoinDataComplete PriorityRoutingOn = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, + new JoinMetadata { Description = "Device Priority Routing On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("PriorityRoutingOff")] + public JoinDataComplete PriorityRoutingOff = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, + new JoinMetadata { Description = "Device Priority Routing Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("InputOnScreenDisplayEnabled")] + public JoinDataComplete InputOnScreenDisplayEnabled = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 }, + new JoinMetadata { Description = "Device Input OSD Enabled", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("InputOnScreenDisplayDisabled")] + public JoinDataComplete InputOnScreenDisplayDisabled = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 }, + new JoinMetadata { Description = "Device Input OSD Disabled", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("SyncDetected")] + public JoinDataComplete SyncDetected = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 5 }, + new JoinMetadata { Description = "Device Sync Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("VideoSource")] + public JoinDataComplete VideoSource = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 5 }, + new JoinMetadata { Description = "Device Video Source Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("SourceCount")] + public JoinDataComplete SourceCount = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 5 }, + new JoinMetadata { Description = "Device Video Source Count", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("SourceNames")] + public JoinDataComplete SourceNames = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 5 }, + new JoinMetadata { Description = "Device Video Source Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + + /// + /// Constructor to use when instantiating this Join Map without inheriting from it + /// + /// Join this join map will start at + public HdMdxxxCEControllerJoinMap(uint joinStart) + : this(joinStart, typeof(HdMdxxxCEControllerJoinMap)) + { + } + + /// + /// Constructor to use when extending this Join map + /// + /// Join this join map will start at + /// Type of the child join map + protected HdMdxxxCEControllerJoinMap(uint joinStart, Type type) + : base(joinStart, type) + { } } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/Hrxxx0WirelessRemoteControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/Hrxxx0WirelessRemoteControllerJoinMap.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/Hrxxx0WirelessRemoteControllerJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/Hrxxx0WirelessRemoteControllerJoinMap.cs index c001733e..23305b20 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/Hrxxx0WirelessRemoteControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/Hrxxx0WirelessRemoteControllerJoinMap.cs @@ -1,246 +1,246 @@ -using System; - -namespace PepperDash.Essentials.Core.Bridges -{ - public class Hrxxx0WirelessRemoteControllerJoinMap : JoinMapBaseAdvanced - { - [JoinName("Power")] - public JoinDataComplete Power = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Power", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Menu")] - public JoinDataComplete Menu = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "Menu", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Guide")] - public JoinDataComplete Guide = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, - new JoinMetadata { Description = "Guide", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Info")] - public JoinDataComplete Info = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, - new JoinMetadata { Description = "Info", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("VolumeUp")] - public JoinDataComplete VolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, - new JoinMetadata { Description = "VolumeUp", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("VolumeDown")] - public JoinDataComplete VolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, - new JoinMetadata { Description = "VolumeDown", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DialPadUp")] - public JoinDataComplete DialPadUp = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 }, - new JoinMetadata { Description = "DialPadUp", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DialPadDown")] - public JoinDataComplete DialPadDown = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 }, - new JoinMetadata { Description = "DialPadDown", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DialPadLeft")] - public JoinDataComplete DialPadLeft = new JoinDataComplete(new JoinData { JoinNumber = 9, JoinSpan = 1 }, - new JoinMetadata { Description = "DialPadLeft", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DialPadRight")] - public JoinDataComplete DialPadRight = new JoinDataComplete(new JoinData { JoinNumber = 10, JoinSpan = 1 }, - new JoinMetadata { Description = "DialPadRight", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DialPadSelect")] - public JoinDataComplete DialPadSelect = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, - new JoinMetadata { Description = "DialPadSelect", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("ChannelUp")] - public JoinDataComplete ChannelUp = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 }, - new JoinMetadata { Description = "ChannelUp", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("ChannelDown")] - public JoinDataComplete ChannelDown = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 }, - new JoinMetadata { Description = "ChannelDown", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Mute")] - public JoinDataComplete Mute = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 }, - new JoinMetadata { Description = "Mute", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Exit")] - public JoinDataComplete Exit = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 }, - new JoinMetadata { Description = "Exit", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Last")] - public JoinDataComplete Last = new JoinDataComplete(new JoinData { JoinNumber = 16, JoinSpan = 1 }, - new JoinMetadata { Description = "Last", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Play")] - public JoinDataComplete Play = new JoinDataComplete(new JoinData { JoinNumber = 17, JoinSpan = 1 }, - new JoinMetadata { Description = "Play", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Pause")] - public JoinDataComplete Pause = new JoinDataComplete(new JoinData { JoinNumber = 18, JoinSpan = 1 }, - new JoinMetadata { Description = "Pause", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Rewind")] - public JoinDataComplete Rewind = new JoinDataComplete(new JoinData { JoinNumber = 19, JoinSpan = 1 }, - new JoinMetadata { Description = "Rewind", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("FastForward")] - public JoinDataComplete FastForward = new JoinDataComplete(new JoinData { JoinNumber = 20, JoinSpan = 1 }, - new JoinMetadata { Description = "FastForward", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("PreviousTrack")] - public JoinDataComplete PreviousTrack = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 }, - new JoinMetadata { Description = "PreviousTrack", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("NextTrack")] - public JoinDataComplete NextTrack = new JoinDataComplete(new JoinData { JoinNumber = 22, JoinSpan = 1 }, - new JoinMetadata { Description = "NextTrack", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Stop")] - public JoinDataComplete Stop = new JoinDataComplete(new JoinData { JoinNumber = 23, JoinSpan = 1 }, - new JoinMetadata { Description = "Stop", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Record")] - public JoinDataComplete Record = new JoinDataComplete(new JoinData { JoinNumber = 24, JoinSpan = 1 }, - new JoinMetadata { Description = "Record", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Dvr")] - public JoinDataComplete Dvr = new JoinDataComplete(new JoinData { JoinNumber = 25, JoinSpan = 1 }, - new JoinMetadata { Description = "Dvr", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Keypad1")] - public JoinDataComplete Keypad1 = new JoinDataComplete(new JoinData { JoinNumber = 26, JoinSpan = 1 }, - new JoinMetadata { Description = "Keypad1", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Keypad2Abc")] - public JoinDataComplete Keypad2 = new JoinDataComplete(new JoinData { JoinNumber = 27, JoinSpan = 1 }, - new JoinMetadata { Description = "Keypad2Abc", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Keypad3Def")] - public JoinDataComplete Keypad3Def = new JoinDataComplete(new JoinData { JoinNumber = 28, JoinSpan = 1 }, - new JoinMetadata { Description = "Keypad3Def", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Keypad4Ghi")] - public JoinDataComplete Keypad4Ghi = new JoinDataComplete(new JoinData { JoinNumber = 29, JoinSpan = 1 }, - new JoinMetadata { Description = "Keypad4Ghi", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Keypad5Jkl")] - public JoinDataComplete Keypad5Jkl = new JoinDataComplete(new JoinData { JoinNumber = 30, JoinSpan = 1 }, - new JoinMetadata { Description = "Keypad5Jkl", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Keypad6Mno")] - public JoinDataComplete Keypad6Mno = new JoinDataComplete(new JoinData { JoinNumber = 31, JoinSpan = 1 }, - new JoinMetadata { Description = "Keypad6Mno", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Keypad7Pqrs")] - public JoinDataComplete Keypad7Pqrs = new JoinDataComplete(new JoinData { JoinNumber = 32, JoinSpan = 1 }, - new JoinMetadata { Description = "Keypad7Pqrs", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Keypad8Tuv")] - public JoinDataComplete Keypad8Tuv = new JoinDataComplete(new JoinData { JoinNumber = 33, JoinSpan = 1 }, - new JoinMetadata { Description = "Keypad8Tuv", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Keypad9Wxyz")] - public JoinDataComplete Keypad9Wxyz = new JoinDataComplete(new JoinData { JoinNumber = 34, JoinSpan = 1 }, - new JoinMetadata { Description = "Keypad9Wxyz", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Keypad0")] - public JoinDataComplete Keypad0 = new JoinDataComplete(new JoinData { JoinNumber = 35, JoinSpan = 1 }, - new JoinMetadata { Description = "Keypad0", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Clear")] - public JoinDataComplete Clear = new JoinDataComplete(new JoinData { JoinNumber = 36, JoinSpan = 1 }, - new JoinMetadata { Description = "Clear", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Enter")] - public JoinDataComplete Enter = new JoinDataComplete(new JoinData { JoinNumber = 37, JoinSpan = 1 }, - new JoinMetadata { Description = "Enter", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Red")] - public JoinDataComplete Red = new JoinDataComplete(new JoinData { JoinNumber = 38, JoinSpan = 1 }, - new JoinMetadata { Description = "Red", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Green")] - public JoinDataComplete Green = new JoinDataComplete(new JoinData { JoinNumber = 39, JoinSpan = 1 }, - new JoinMetadata { Description = "Green", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Yellow")] - public JoinDataComplete Yellow = new JoinDataComplete(new JoinData { JoinNumber = 40, JoinSpan = 1 }, - new JoinMetadata { Description = "Yellow", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Blue")] - public JoinDataComplete Blue = new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 1 }, - new JoinMetadata { Description = "Blue", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Custom1")] - public JoinDataComplete Custom1 = new JoinDataComplete(new JoinData { JoinNumber = 42, JoinSpan = 1 }, - new JoinMetadata { Description = "Custom1", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Custom2")] - public JoinDataComplete Custom2 = new JoinDataComplete(new JoinData { JoinNumber = 43, JoinSpan = 1 }, - new JoinMetadata { Description = "Custom2", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Custom3")] - public JoinDataComplete Custom3 = new JoinDataComplete(new JoinData { JoinNumber = 44, JoinSpan = 1 }, - new JoinMetadata { Description = "Custom3", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Custom4")] - public JoinDataComplete Custom4 = new JoinDataComplete(new JoinData { JoinNumber = 45, JoinSpan = 1 }, - new JoinMetadata { Description = "Custom4", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Custom5")] - public JoinDataComplete Custom5 = new JoinDataComplete(new JoinData { JoinNumber = 46, JoinSpan = 1 }, - new JoinMetadata { Description = "Custom5", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Custom6")] - public JoinDataComplete Custom6 = new JoinDataComplete(new JoinData { JoinNumber = 47, JoinSpan = 1 }, - new JoinMetadata { Description = "Custom6", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Custom7")] - public JoinDataComplete Custom7 = new JoinDataComplete(new JoinData { JoinNumber = 48, JoinSpan = 1 }, - new JoinMetadata { Description = "Custom7", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Custom8")] - public JoinDataComplete Custom8 = new JoinDataComplete(new JoinData { JoinNumber = 49, JoinSpan = 1 }, - new JoinMetadata { Description = "Custom8", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Custom9")] - public JoinDataComplete Custom9 = new JoinDataComplete(new JoinData { JoinNumber = 50, JoinSpan = 1 }, - new JoinMetadata { Description = "Custom9", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Fav")] - public JoinDataComplete Fav = new JoinDataComplete(new JoinData { JoinNumber = 51, JoinSpan = 1 }, - new JoinMetadata { Description = "Fav", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Home")] - public JoinDataComplete Home = new JoinDataComplete(new JoinData { JoinNumber = 52, JoinSpan = 1 }, - new JoinMetadata { Description = "Home", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("BatteryLow")] - public JoinDataComplete BatteryLow = new JoinDataComplete(new JoinData { JoinNumber = 53, JoinSpan = 1 }, - new JoinMetadata { Description = "BatteryLow", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("BatteryCritical")] - public JoinDataComplete BatteryCritical = new JoinDataComplete(new JoinData { JoinNumber = 54, JoinSpan = 1 }, - new JoinMetadata { Description = "BatteryCritical", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("BatteryVoltage")] - public JoinDataComplete BatteryVoltage = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "BatteryVoltage", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); - - /// - /// Constructor to use when instantiating this Join Map without inheriting from it - /// - /// Join this join map will start at - public Hrxxx0WirelessRemoteControllerJoinMap(uint joinStart) - : this(joinStart, typeof(Hrxxx0WirelessRemoteControllerJoinMap)) - { - } - - /// - /// Constructor to use when extending this Join map - /// - /// Join this join map will start at - /// Type of the child join map - protected Hrxxx0WirelessRemoteControllerJoinMap(uint joinStart, Type type) - : base(joinStart, type) - { - } - } +using System; + +namespace PepperDash.Essentials.Core.Bridges +{ + public class Hrxxx0WirelessRemoteControllerJoinMap : JoinMapBaseAdvanced + { + [JoinName("Power")] + public JoinDataComplete Power = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Power", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Menu")] + public JoinDataComplete Menu = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "Menu", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Guide")] + public JoinDataComplete Guide = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, + new JoinMetadata { Description = "Guide", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Info")] + public JoinDataComplete Info = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, + new JoinMetadata { Description = "Info", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("VolumeUp")] + public JoinDataComplete VolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, + new JoinMetadata { Description = "VolumeUp", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("VolumeDown")] + public JoinDataComplete VolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, + new JoinMetadata { Description = "VolumeDown", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DialPadUp")] + public JoinDataComplete DialPadUp = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 }, + new JoinMetadata { Description = "DialPadUp", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DialPadDown")] + public JoinDataComplete DialPadDown = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 }, + new JoinMetadata { Description = "DialPadDown", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DialPadLeft")] + public JoinDataComplete DialPadLeft = new JoinDataComplete(new JoinData { JoinNumber = 9, JoinSpan = 1 }, + new JoinMetadata { Description = "DialPadLeft", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DialPadRight")] + public JoinDataComplete DialPadRight = new JoinDataComplete(new JoinData { JoinNumber = 10, JoinSpan = 1 }, + new JoinMetadata { Description = "DialPadRight", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DialPadSelect")] + public JoinDataComplete DialPadSelect = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, + new JoinMetadata { Description = "DialPadSelect", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("ChannelUp")] + public JoinDataComplete ChannelUp = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 }, + new JoinMetadata { Description = "ChannelUp", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("ChannelDown")] + public JoinDataComplete ChannelDown = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 }, + new JoinMetadata { Description = "ChannelDown", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Mute")] + public JoinDataComplete Mute = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 }, + new JoinMetadata { Description = "Mute", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Exit")] + public JoinDataComplete Exit = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 }, + new JoinMetadata { Description = "Exit", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Last")] + public JoinDataComplete Last = new JoinDataComplete(new JoinData { JoinNumber = 16, JoinSpan = 1 }, + new JoinMetadata { Description = "Last", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Play")] + public JoinDataComplete Play = new JoinDataComplete(new JoinData { JoinNumber = 17, JoinSpan = 1 }, + new JoinMetadata { Description = "Play", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Pause")] + public JoinDataComplete Pause = new JoinDataComplete(new JoinData { JoinNumber = 18, JoinSpan = 1 }, + new JoinMetadata { Description = "Pause", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Rewind")] + public JoinDataComplete Rewind = new JoinDataComplete(new JoinData { JoinNumber = 19, JoinSpan = 1 }, + new JoinMetadata { Description = "Rewind", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("FastForward")] + public JoinDataComplete FastForward = new JoinDataComplete(new JoinData { JoinNumber = 20, JoinSpan = 1 }, + new JoinMetadata { Description = "FastForward", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("PreviousTrack")] + public JoinDataComplete PreviousTrack = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 }, + new JoinMetadata { Description = "PreviousTrack", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("NextTrack")] + public JoinDataComplete NextTrack = new JoinDataComplete(new JoinData { JoinNumber = 22, JoinSpan = 1 }, + new JoinMetadata { Description = "NextTrack", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Stop")] + public JoinDataComplete Stop = new JoinDataComplete(new JoinData { JoinNumber = 23, JoinSpan = 1 }, + new JoinMetadata { Description = "Stop", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Record")] + public JoinDataComplete Record = new JoinDataComplete(new JoinData { JoinNumber = 24, JoinSpan = 1 }, + new JoinMetadata { Description = "Record", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Dvr")] + public JoinDataComplete Dvr = new JoinDataComplete(new JoinData { JoinNumber = 25, JoinSpan = 1 }, + new JoinMetadata { Description = "Dvr", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Keypad1")] + public JoinDataComplete Keypad1 = new JoinDataComplete(new JoinData { JoinNumber = 26, JoinSpan = 1 }, + new JoinMetadata { Description = "Keypad1", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Keypad2Abc")] + public JoinDataComplete Keypad2 = new JoinDataComplete(new JoinData { JoinNumber = 27, JoinSpan = 1 }, + new JoinMetadata { Description = "Keypad2Abc", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Keypad3Def")] + public JoinDataComplete Keypad3Def = new JoinDataComplete(new JoinData { JoinNumber = 28, JoinSpan = 1 }, + new JoinMetadata { Description = "Keypad3Def", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Keypad4Ghi")] + public JoinDataComplete Keypad4Ghi = new JoinDataComplete(new JoinData { JoinNumber = 29, JoinSpan = 1 }, + new JoinMetadata { Description = "Keypad4Ghi", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Keypad5Jkl")] + public JoinDataComplete Keypad5Jkl = new JoinDataComplete(new JoinData { JoinNumber = 30, JoinSpan = 1 }, + new JoinMetadata { Description = "Keypad5Jkl", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Keypad6Mno")] + public JoinDataComplete Keypad6Mno = new JoinDataComplete(new JoinData { JoinNumber = 31, JoinSpan = 1 }, + new JoinMetadata { Description = "Keypad6Mno", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Keypad7Pqrs")] + public JoinDataComplete Keypad7Pqrs = new JoinDataComplete(new JoinData { JoinNumber = 32, JoinSpan = 1 }, + new JoinMetadata { Description = "Keypad7Pqrs", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Keypad8Tuv")] + public JoinDataComplete Keypad8Tuv = new JoinDataComplete(new JoinData { JoinNumber = 33, JoinSpan = 1 }, + new JoinMetadata { Description = "Keypad8Tuv", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Keypad9Wxyz")] + public JoinDataComplete Keypad9Wxyz = new JoinDataComplete(new JoinData { JoinNumber = 34, JoinSpan = 1 }, + new JoinMetadata { Description = "Keypad9Wxyz", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Keypad0")] + public JoinDataComplete Keypad0 = new JoinDataComplete(new JoinData { JoinNumber = 35, JoinSpan = 1 }, + new JoinMetadata { Description = "Keypad0", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Clear")] + public JoinDataComplete Clear = new JoinDataComplete(new JoinData { JoinNumber = 36, JoinSpan = 1 }, + new JoinMetadata { Description = "Clear", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Enter")] + public JoinDataComplete Enter = new JoinDataComplete(new JoinData { JoinNumber = 37, JoinSpan = 1 }, + new JoinMetadata { Description = "Enter", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Red")] + public JoinDataComplete Red = new JoinDataComplete(new JoinData { JoinNumber = 38, JoinSpan = 1 }, + new JoinMetadata { Description = "Red", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Green")] + public JoinDataComplete Green = new JoinDataComplete(new JoinData { JoinNumber = 39, JoinSpan = 1 }, + new JoinMetadata { Description = "Green", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Yellow")] + public JoinDataComplete Yellow = new JoinDataComplete(new JoinData { JoinNumber = 40, JoinSpan = 1 }, + new JoinMetadata { Description = "Yellow", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Blue")] + public JoinDataComplete Blue = new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 1 }, + new JoinMetadata { Description = "Blue", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Custom1")] + public JoinDataComplete Custom1 = new JoinDataComplete(new JoinData { JoinNumber = 42, JoinSpan = 1 }, + new JoinMetadata { Description = "Custom1", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Custom2")] + public JoinDataComplete Custom2 = new JoinDataComplete(new JoinData { JoinNumber = 43, JoinSpan = 1 }, + new JoinMetadata { Description = "Custom2", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Custom3")] + public JoinDataComplete Custom3 = new JoinDataComplete(new JoinData { JoinNumber = 44, JoinSpan = 1 }, + new JoinMetadata { Description = "Custom3", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Custom4")] + public JoinDataComplete Custom4 = new JoinDataComplete(new JoinData { JoinNumber = 45, JoinSpan = 1 }, + new JoinMetadata { Description = "Custom4", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Custom5")] + public JoinDataComplete Custom5 = new JoinDataComplete(new JoinData { JoinNumber = 46, JoinSpan = 1 }, + new JoinMetadata { Description = "Custom5", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Custom6")] + public JoinDataComplete Custom6 = new JoinDataComplete(new JoinData { JoinNumber = 47, JoinSpan = 1 }, + new JoinMetadata { Description = "Custom6", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Custom7")] + public JoinDataComplete Custom7 = new JoinDataComplete(new JoinData { JoinNumber = 48, JoinSpan = 1 }, + new JoinMetadata { Description = "Custom7", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Custom8")] + public JoinDataComplete Custom8 = new JoinDataComplete(new JoinData { JoinNumber = 49, JoinSpan = 1 }, + new JoinMetadata { Description = "Custom8", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Custom9")] + public JoinDataComplete Custom9 = new JoinDataComplete(new JoinData { JoinNumber = 50, JoinSpan = 1 }, + new JoinMetadata { Description = "Custom9", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Fav")] + public JoinDataComplete Fav = new JoinDataComplete(new JoinData { JoinNumber = 51, JoinSpan = 1 }, + new JoinMetadata { Description = "Fav", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Home")] + public JoinDataComplete Home = new JoinDataComplete(new JoinData { JoinNumber = 52, JoinSpan = 1 }, + new JoinMetadata { Description = "Home", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("BatteryLow")] + public JoinDataComplete BatteryLow = new JoinDataComplete(new JoinData { JoinNumber = 53, JoinSpan = 1 }, + new JoinMetadata { Description = "BatteryLow", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("BatteryCritical")] + public JoinDataComplete BatteryCritical = new JoinDataComplete(new JoinData { JoinNumber = 54, JoinSpan = 1 }, + new JoinMetadata { Description = "BatteryCritical", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("BatteryVoltage")] + public JoinDataComplete BatteryVoltage = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "BatteryVoltage", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); + + /// + /// Constructor to use when instantiating this Join Map without inheriting from it + /// + /// Join this join map will start at + public Hrxxx0WirelessRemoteControllerJoinMap(uint joinStart) + : this(joinStart, typeof(Hrxxx0WirelessRemoteControllerJoinMap)) + { + } + + /// + /// Constructor to use when extending this Join map + /// + /// Join this join map will start at + /// Type of the child join map + protected Hrxxx0WirelessRemoteControllerJoinMap(uint joinStart, Type type) + : base(joinStart, type) + { + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/IAnalogInputJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IAnalogInputJoinMap.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/IAnalogInputJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/IAnalogInputJoinMap.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/IBasicCommunicationJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IBasicCommunicationJoinMap.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/IBasicCommunicationJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/IBasicCommunicationJoinMap.cs index 18b98fe6..0d077284 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/IBasicCommunicationJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IBasicCommunicationJoinMap.cs @@ -1,50 +1,50 @@ -using System; - -namespace PepperDash.Essentials.Core.Bridges -{ - public class IBasicCommunicationJoinMap : JoinMapBaseAdvanced - { - [JoinName("TextReceived")] - public JoinDataComplete TextReceived = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Text Received From Remote Device", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("SendText")] - public JoinDataComplete SendText = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Text Sent To Remote Device", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("SetPortConfig")] - public JoinDataComplete SetPortConfig = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "Set Port Config", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("Connect")] - public JoinDataComplete Connect = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Connect", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Connected")] - public JoinDataComplete Connected = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Connected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Status")] - public JoinDataComplete Status = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); - - /// - /// Constructor to use when instantiating this Join Map without inheriting from it - /// - /// Join this join map will start at - public IBasicCommunicationJoinMap(uint joinStart) - : this(joinStart, typeof(IBasicCommunicationJoinMap)) - { - } - - /// - /// Constructor to use when extending this Join map - /// - /// Join this join map will start at - /// Type of the child join map - protected IBasicCommunicationJoinMap(uint joinStart, Type type) - : base(joinStart, type) - { - } - } +using System; + +namespace PepperDash.Essentials.Core.Bridges +{ + public class IBasicCommunicationJoinMap : JoinMapBaseAdvanced + { + [JoinName("TextReceived")] + public JoinDataComplete TextReceived = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Text Received From Remote Device", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("SendText")] + public JoinDataComplete SendText = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Text Sent To Remote Device", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("SetPortConfig")] + public JoinDataComplete SetPortConfig = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "Set Port Config", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("Connect")] + public JoinDataComplete Connect = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Connect", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Connected")] + public JoinDataComplete Connected = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Connected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Status")] + public JoinDataComplete Status = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); + + /// + /// Constructor to use when instantiating this Join Map without inheriting from it + /// + /// Join this join map will start at + public IBasicCommunicationJoinMap(uint joinStart) + : this(joinStart, typeof(IBasicCommunicationJoinMap)) + { + } + + /// + /// Constructor to use when extending this Join map + /// + /// Join this join map will start at + /// Type of the child join map + protected IBasicCommunicationJoinMap(uint joinStart, Type type) + : base(joinStart, type) + { + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/IDigitalInputJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IDigitalInputJoinMap.cs similarity index 97% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/IDigitalInputJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/IDigitalInputJoinMap.cs index 83e6cdab..aa31ac76 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/IDigitalInputJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IDigitalInputJoinMap.cs @@ -1,31 +1,31 @@ -using System; - -namespace PepperDash.Essentials.Core.Bridges -{ - public class IDigitalInputJoinMap : JoinMapBaseAdvanced - { - - [JoinName("InputState")] - public JoinDataComplete InputState = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Input State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - /// - /// Constructor to use when instantiating this Join Map without inheriting from it - /// - /// Join this join map will start at - public IDigitalInputJoinMap(uint joinStart) - : this(joinStart, typeof(IDigitalInputJoinMap)) - { - } - - /// - /// Constructor to use when extending this Join map - /// - /// Join this join map will start at - /// Type of the child join map - protected IDigitalInputJoinMap(uint joinStart, Type type) - : base(joinStart, type) - { - } - } +using System; + +namespace PepperDash.Essentials.Core.Bridges +{ + public class IDigitalInputJoinMap : JoinMapBaseAdvanced + { + + [JoinName("InputState")] + public JoinDataComplete InputState = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Input State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + /// + /// Constructor to use when instantiating this Join Map without inheriting from it + /// + /// Join this join map will start at + public IDigitalInputJoinMap(uint joinStart) + : this(joinStart, typeof(IDigitalInputJoinMap)) + { + } + + /// + /// Constructor to use when extending this Join map + /// + /// Join this join map will start at + /// Type of the child join map + protected IDigitalInputJoinMap(uint joinStart, Type type) + : base(joinStart, type) + { + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/IDigitalOutputJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IDigitalOutputJoinMap.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/IDigitalOutputJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/IDigitalOutputJoinMap.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/IRBlurayBaseJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IRBlurayBaseJoinMap.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/IRBlurayBaseJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/IRBlurayBaseJoinMap.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/PduJoinMapBase.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/PduJoinMapBase.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/PduJoinMapBase.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/PduJoinMapBase.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/SetTopBoxControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/SetTopBoxControllerJoinMap.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/SetTopBoxControllerJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/SetTopBoxControllerJoinMap.cs index a65c537c..ec0ff8d2 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/SetTopBoxControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/SetTopBoxControllerJoinMap.cs @@ -1,240 +1,240 @@ -using System; - - -namespace PepperDash.Essentials.Core.Bridges -{ - public class SetTopBoxControllerJoinMap : JoinMapBaseAdvanced - { - [JoinName("PowerOn")] - public JoinDataComplete PowerOn = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Power On", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("PowerOff")] - public JoinDataComplete PowerOff = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Power Off", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("PowerToggle")] - public JoinDataComplete PowerToggle = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Power Toggle", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("HasDpad")] - public JoinDataComplete HasDpad = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Has DPad", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Up")] - public JoinDataComplete Up = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Nav Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Down")] - public JoinDataComplete Down = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Nav Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Left")] - public JoinDataComplete Left = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Nav Left", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Right")] - public JoinDataComplete Right = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Nav Right", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Select")] - public JoinDataComplete Select = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Select", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Menu")] - public JoinDataComplete Menu = new JoinDataComplete(new JoinData { JoinNumber = 9, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Menu", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Exit")] - public JoinDataComplete Exit = new JoinDataComplete(new JoinData { JoinNumber = 10, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Exit", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("HasNumeric")] - public JoinDataComplete HasNumeric = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Has Numeric", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Digit0")] - public JoinDataComplete Digit0 = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Digit 0", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Digit1")] - public JoinDataComplete Digit1 = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Digit 1", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Digit2")] - public JoinDataComplete Digit2 = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Digit 2", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Digit3")] - public JoinDataComplete Digit3 = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Digit 3", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Digit4")] - public JoinDataComplete Digit4 = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Digit 4", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Digit5")] - public JoinDataComplete Digit5 = new JoinDataComplete(new JoinData { JoinNumber = 16, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Digit 5", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Digit6")] - public JoinDataComplete Digit6 = new JoinDataComplete(new JoinData { JoinNumber = 17, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Digit 6", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Digit7")] - public JoinDataComplete Digit7 = new JoinDataComplete(new JoinData { JoinNumber = 18, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Digit 7", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Digit8")] - public JoinDataComplete Digit8 = new JoinDataComplete(new JoinData { JoinNumber = 19, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Digit 8", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Digit9")] - public JoinDataComplete Digit9 = new JoinDataComplete(new JoinData { JoinNumber = 20, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Digit 9", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Dash")] - public JoinDataComplete Dash = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Dash", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("KeypadEnter")] - public JoinDataComplete KeypadEnter = new JoinDataComplete(new JoinData { JoinNumber = 22, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Keypad Enter", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("ChannelUp")] - public JoinDataComplete ChannelUp = new JoinDataComplete(new JoinData { JoinNumber = 23, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Channel Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("ChannelDown")] - public JoinDataComplete ChannelDown = new JoinDataComplete(new JoinData { JoinNumber = 24, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Channel Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("LastChannel")] - public JoinDataComplete LastChannel = new JoinDataComplete(new JoinData { JoinNumber = 25, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Last Channel", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Guide")] - public JoinDataComplete Guide = new JoinDataComplete(new JoinData { JoinNumber = 26, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Guide", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Info")] - public JoinDataComplete Info = new JoinDataComplete(new JoinData { JoinNumber = 27, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Info", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Red")] - public JoinDataComplete Red = new JoinDataComplete(new JoinData { JoinNumber = 28, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Red", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Green")] - public JoinDataComplete Green = new JoinDataComplete(new JoinData { JoinNumber = 29, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Green", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Yellow")] - public JoinDataComplete Yellow = new JoinDataComplete(new JoinData { JoinNumber = 30, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Yellow", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Blue")] - public JoinDataComplete Blue = new JoinDataComplete(new JoinData { JoinNumber = 31, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Blue", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("HasDvr")] - public JoinDataComplete HasDvr = new JoinDataComplete(new JoinData { JoinNumber = 32, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Has DVR", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("DvrList")] - public JoinDataComplete DvrList = new JoinDataComplete(new JoinData { JoinNumber = 32, JoinSpan = 1 }, - new JoinMetadata { Description = "STB DvrList", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Play")] - public JoinDataComplete Play = new JoinDataComplete(new JoinData { JoinNumber = 33, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Play", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Pause")] - public JoinDataComplete Pause = new JoinDataComplete(new JoinData { JoinNumber = 34, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Pause", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Stop")] - public JoinDataComplete Stop = new JoinDataComplete(new JoinData { JoinNumber = 35, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Stop", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("FFwd")] - public JoinDataComplete FFwd = new JoinDataComplete(new JoinData { JoinNumber = 36, JoinSpan = 1 }, - new JoinMetadata { Description = "STB FFwd", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Rewind")] - public JoinDataComplete Rewind = new JoinDataComplete(new JoinData { JoinNumber = 37, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Rewind", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("ChapPlus")] - public JoinDataComplete ChapPlus = new JoinDataComplete(new JoinData { JoinNumber = 38, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Chapter Plus", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("ChapMinus")] - public JoinDataComplete ChapMinus = new JoinDataComplete(new JoinData { JoinNumber = 39, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Chapter Minus", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Replay")] - public JoinDataComplete Replay = new JoinDataComplete(new JoinData { JoinNumber = 40, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Replay", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Record")] - public JoinDataComplete Record = new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Record", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("HasKeypadAccessoryButton1")] - public JoinDataComplete HasKeypadAccessoryButton1 = new JoinDataComplete(new JoinData { JoinNumber = 42, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Has Keypad Accessory Button 1", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("HasKeypadAccessoryButton2")] - public JoinDataComplete HasKeypadAccessoryButton2 = new JoinDataComplete(new JoinData { JoinNumber = 43, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Has Keypad Accessory Button 2", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("KeypadAccessoryButton1Press")] - public JoinDataComplete KeypadAccessoryButton1Press = new JoinDataComplete(new JoinData { JoinNumber = 42, JoinSpan = 2 }, - new JoinMetadata { Description = "STB Keypad Accessory Button 1 Press", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("KeypadAccessoryButton2Press")] - public JoinDataComplete KeypadAccessoryButton2Press = new JoinDataComplete(new JoinData { JoinNumber = 43, JoinSpan = 2 }, - new JoinMetadata { Description = "STB Keypad Accessory Button 2 Press", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Name")] - public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("KeypadAccessoryButton1Label")] - public JoinDataComplete KeypadAccessoryButton1Label = new JoinDataComplete(new JoinData { JoinNumber = 42, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Keypad Accessory Button 1 Label", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("KeypadAccessoryButton2Label")] - public JoinDataComplete KeypadAccessoryButton2Label = new JoinDataComplete(new JoinData { JoinNumber = 43, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Keypad Accessory Button 1 Label", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("LoadPresets")] - public JoinDataComplete LoadPresets = new JoinDataComplete(new JoinData { JoinNumber = 50, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Load Presets", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("HasPresets")] - public JoinDataComplete HasPresets = new JoinDataComplete(new JoinData { JoinNumber = 50, JoinSpan = 1 }, - new JoinMetadata { Description = "STB Load Presets", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - - /// - /// Constructor to use when instantiating this Join Map without inheriting from it - /// - /// Join this join map will start at - public SetTopBoxControllerJoinMap(uint joinStart) - : this(joinStart, typeof(SetTopBoxControllerJoinMap)) - { - } - - /// - /// Constructor to use when extending this Join map - /// - /// Join this join map will start at - /// Type of the child join map - protected SetTopBoxControllerJoinMap(uint joinStart, Type type) - : base(joinStart, type) - { - } - } +using System; + + +namespace PepperDash.Essentials.Core.Bridges +{ + public class SetTopBoxControllerJoinMap : JoinMapBaseAdvanced + { + [JoinName("PowerOn")] + public JoinDataComplete PowerOn = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Power On", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("PowerOff")] + public JoinDataComplete PowerOff = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Power Off", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("PowerToggle")] + public JoinDataComplete PowerToggle = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Power Toggle", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("HasDpad")] + public JoinDataComplete HasDpad = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Has DPad", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Up")] + public JoinDataComplete Up = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Nav Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Down")] + public JoinDataComplete Down = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Nav Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Left")] + public JoinDataComplete Left = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Nav Left", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Right")] + public JoinDataComplete Right = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Nav Right", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Select")] + public JoinDataComplete Select = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Select", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Menu")] + public JoinDataComplete Menu = new JoinDataComplete(new JoinData { JoinNumber = 9, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Menu", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Exit")] + public JoinDataComplete Exit = new JoinDataComplete(new JoinData { JoinNumber = 10, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Exit", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("HasNumeric")] + public JoinDataComplete HasNumeric = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Has Numeric", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Digit0")] + public JoinDataComplete Digit0 = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Digit 0", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Digit1")] + public JoinDataComplete Digit1 = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Digit 1", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Digit2")] + public JoinDataComplete Digit2 = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Digit 2", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Digit3")] + public JoinDataComplete Digit3 = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Digit 3", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Digit4")] + public JoinDataComplete Digit4 = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Digit 4", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Digit5")] + public JoinDataComplete Digit5 = new JoinDataComplete(new JoinData { JoinNumber = 16, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Digit 5", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Digit6")] + public JoinDataComplete Digit6 = new JoinDataComplete(new JoinData { JoinNumber = 17, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Digit 6", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Digit7")] + public JoinDataComplete Digit7 = new JoinDataComplete(new JoinData { JoinNumber = 18, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Digit 7", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Digit8")] + public JoinDataComplete Digit8 = new JoinDataComplete(new JoinData { JoinNumber = 19, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Digit 8", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Digit9")] + public JoinDataComplete Digit9 = new JoinDataComplete(new JoinData { JoinNumber = 20, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Digit 9", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Dash")] + public JoinDataComplete Dash = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Dash", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("KeypadEnter")] + public JoinDataComplete KeypadEnter = new JoinDataComplete(new JoinData { JoinNumber = 22, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Keypad Enter", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("ChannelUp")] + public JoinDataComplete ChannelUp = new JoinDataComplete(new JoinData { JoinNumber = 23, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Channel Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("ChannelDown")] + public JoinDataComplete ChannelDown = new JoinDataComplete(new JoinData { JoinNumber = 24, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Channel Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("LastChannel")] + public JoinDataComplete LastChannel = new JoinDataComplete(new JoinData { JoinNumber = 25, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Last Channel", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Guide")] + public JoinDataComplete Guide = new JoinDataComplete(new JoinData { JoinNumber = 26, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Guide", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Info")] + public JoinDataComplete Info = new JoinDataComplete(new JoinData { JoinNumber = 27, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Info", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Red")] + public JoinDataComplete Red = new JoinDataComplete(new JoinData { JoinNumber = 28, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Red", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Green")] + public JoinDataComplete Green = new JoinDataComplete(new JoinData { JoinNumber = 29, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Green", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Yellow")] + public JoinDataComplete Yellow = new JoinDataComplete(new JoinData { JoinNumber = 30, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Yellow", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Blue")] + public JoinDataComplete Blue = new JoinDataComplete(new JoinData { JoinNumber = 31, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Blue", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("HasDvr")] + public JoinDataComplete HasDvr = new JoinDataComplete(new JoinData { JoinNumber = 32, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Has DVR", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("DvrList")] + public JoinDataComplete DvrList = new JoinDataComplete(new JoinData { JoinNumber = 32, JoinSpan = 1 }, + new JoinMetadata { Description = "STB DvrList", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Play")] + public JoinDataComplete Play = new JoinDataComplete(new JoinData { JoinNumber = 33, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Play", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Pause")] + public JoinDataComplete Pause = new JoinDataComplete(new JoinData { JoinNumber = 34, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Pause", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Stop")] + public JoinDataComplete Stop = new JoinDataComplete(new JoinData { JoinNumber = 35, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Stop", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("FFwd")] + public JoinDataComplete FFwd = new JoinDataComplete(new JoinData { JoinNumber = 36, JoinSpan = 1 }, + new JoinMetadata { Description = "STB FFwd", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Rewind")] + public JoinDataComplete Rewind = new JoinDataComplete(new JoinData { JoinNumber = 37, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Rewind", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("ChapPlus")] + public JoinDataComplete ChapPlus = new JoinDataComplete(new JoinData { JoinNumber = 38, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Chapter Plus", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("ChapMinus")] + public JoinDataComplete ChapMinus = new JoinDataComplete(new JoinData { JoinNumber = 39, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Chapter Minus", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Replay")] + public JoinDataComplete Replay = new JoinDataComplete(new JoinData { JoinNumber = 40, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Replay", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Record")] + public JoinDataComplete Record = new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Record", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("HasKeypadAccessoryButton1")] + public JoinDataComplete HasKeypadAccessoryButton1 = new JoinDataComplete(new JoinData { JoinNumber = 42, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Has Keypad Accessory Button 1", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("HasKeypadAccessoryButton2")] + public JoinDataComplete HasKeypadAccessoryButton2 = new JoinDataComplete(new JoinData { JoinNumber = 43, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Has Keypad Accessory Button 2", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("KeypadAccessoryButton1Press")] + public JoinDataComplete KeypadAccessoryButton1Press = new JoinDataComplete(new JoinData { JoinNumber = 42, JoinSpan = 2 }, + new JoinMetadata { Description = "STB Keypad Accessory Button 1 Press", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("KeypadAccessoryButton2Press")] + public JoinDataComplete KeypadAccessoryButton2Press = new JoinDataComplete(new JoinData { JoinNumber = 43, JoinSpan = 2 }, + new JoinMetadata { Description = "STB Keypad Accessory Button 2 Press", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Name")] + public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("KeypadAccessoryButton1Label")] + public JoinDataComplete KeypadAccessoryButton1Label = new JoinDataComplete(new JoinData { JoinNumber = 42, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Keypad Accessory Button 1 Label", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("KeypadAccessoryButton2Label")] + public JoinDataComplete KeypadAccessoryButton2Label = new JoinDataComplete(new JoinData { JoinNumber = 43, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Keypad Accessory Button 1 Label", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("LoadPresets")] + public JoinDataComplete LoadPresets = new JoinDataComplete(new JoinData { JoinNumber = 50, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Load Presets", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("HasPresets")] + public JoinDataComplete HasPresets = new JoinDataComplete(new JoinData { JoinNumber = 50, JoinSpan = 1 }, + new JoinMetadata { Description = "STB Load Presets", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + + /// + /// Constructor to use when instantiating this Join Map without inheriting from it + /// + /// Join this join map will start at + public SetTopBoxControllerJoinMap(uint joinStart) + : this(joinStart, typeof(SetTopBoxControllerJoinMap)) + { + } + + /// + /// Constructor to use when extending this Join map + /// + /// Join this join map will start at + /// Type of the child join map + protected SetTopBoxControllerJoinMap(uint joinStart, Type type) + : base(joinStart, type) + { + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/StatusSignControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/StatusSignControllerJoinMap.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/StatusSignControllerJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/StatusSignControllerJoinMap.cs index ea844732..ba441ef0 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/StatusSignControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/StatusSignControllerJoinMap.cs @@ -1,58 +1,58 @@ -using System; - +using System; + namespace PepperDash.Essentials.Core.Bridges { public class StatusSignControllerJoinMap : JoinMapBaseAdvanced { - [JoinName("IsOnline")] - public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Status Sign Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("Name")] - public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Status Sign Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("RedControl")] - public JoinDataComplete RedControl = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "Status Red LED Enable / Disable", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("RedLed")] - public JoinDataComplete RedLed = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "Status Red LED Intensity", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("GreenControl")] - public JoinDataComplete GreenControl = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, - new JoinMetadata { Description = "Status Green LED Enable / Disable", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("GreenLed")] - public JoinDataComplete GreenLed = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, - new JoinMetadata { Description = "Status Green LED Intensity", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("BlueControl")] - public JoinDataComplete BlueControl = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, - new JoinMetadata { Description = "Status Blue LED Enable / Disable", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("BlueLed")] - public JoinDataComplete BlueLed = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, - new JoinMetadata { Description = "Status Blue LED Intensity", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); - - /// - /// Constructor to use when instantiating this Join Map without inheriting from it - /// - /// Join this join map will start at - public StatusSignControllerJoinMap(uint joinStart) - : this(joinStart, typeof(StatusSignControllerJoinMap)) - { - } - - /// - /// Constructor to use when extending this Join map - /// - /// Join this join map will start at - /// Type of the child join map - protected StatusSignControllerJoinMap(uint joinStart, Type type) - : base(joinStart, type) - { + [JoinName("IsOnline")] + public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Status Sign Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Name")] + public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Status Sign Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("RedControl")] + public JoinDataComplete RedControl = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "Status Red LED Enable / Disable", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("RedLed")] + public JoinDataComplete RedLed = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "Status Red LED Intensity", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("GreenControl")] + public JoinDataComplete GreenControl = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, + new JoinMetadata { Description = "Status Green LED Enable / Disable", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("GreenLed")] + public JoinDataComplete GreenLed = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, + new JoinMetadata { Description = "Status Green LED Intensity", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("BlueControl")] + public JoinDataComplete BlueControl = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, + new JoinMetadata { Description = "Status Blue LED Enable / Disable", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("BlueLed")] + public JoinDataComplete BlueLed = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, + new JoinMetadata { Description = "Status Blue LED Intensity", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog }); + + /// + /// Constructor to use when instantiating this Join Map without inheriting from it + /// + /// Join this join map will start at + public StatusSignControllerJoinMap(uint joinStart) + : this(joinStart, typeof(StatusSignControllerJoinMap)) + { + } + + /// + /// Constructor to use when extending this Join map + /// + /// Join this join map will start at + /// Type of the child join map + protected StatusSignControllerJoinMap(uint joinStart, Type type) + : base(joinStart, type) + { } } diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/SystemMonitorJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/SystemMonitorJoinMap.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/SystemMonitorJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/SystemMonitorJoinMap.cs index 363d389b..ffcd5777 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/SystemMonitorJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/SystemMonitorJoinMap.cs @@ -1,154 +1,154 @@ -using System; - -namespace PepperDash.Essentials.Core.Bridges -{ - public class SystemMonitorJoinMap : JoinMapBaseAdvanced - { - [JoinName("TimeZone")] - public JoinDataComplete TimeZone = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Timezone", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); - - [JoinName("TimeZoneName")] - public JoinDataComplete TimeZoneName = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Timezone Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("IOControllerVersion")] - public JoinDataComplete IOControllerVersion = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor IO Controller Version", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("SnmpAppVersion")] - public JoinDataComplete SnmpAppVersion = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor SNMP App Version", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("BACnetAppVersion")] - public JoinDataComplete BACnetAppVersion = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor BACNet App Version", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("ControllerVersion")] - public JoinDataComplete ControllerVersion = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Controller Version", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("SerialNumber")] - public JoinDataComplete SerialNumber = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Serial Number", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("Model")] - public JoinDataComplete Model = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Model", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("Uptime")] - public JoinDataComplete Uptime = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Uptime", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("LastBoot")] - public JoinDataComplete LastBoot = new JoinDataComplete(new JoinData { JoinNumber = 9, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Last Boot", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("ProgramOffsetJoin")] - public JoinDataComplete ProgramOffsetJoin = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 5 }, - new JoinMetadata { Description = "All Program Data is offset between slots by 5 - First Joins Start at 11", JoinCapabilities = eJoinCapabilities.None, JoinType = eJoinType.None }); - - [JoinName("ProgramStart")] - public JoinDataComplete ProgramStart = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Program Start / Fb", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("ProgramStop")] - public JoinDataComplete ProgramStop = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Program Stop / Fb", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("ProgramRegister")] - public JoinDataComplete ProgramRegister = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Program Register / Fb", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("ProgramUnregister")] - public JoinDataComplete ProgramUnregister = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Program UnRegister / Fb", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); - - [JoinName("ProgramName")] - public JoinDataComplete ProgramName = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Program Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("ProgramCompiledTime")] - public JoinDataComplete ProgramCompiledTime = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Program Compile Time", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("ProgramCrestronDatabaseVersion")] - public JoinDataComplete ProgramCrestronDatabaseVersion = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Program Database Version", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("ProgramEnvironmentVersion")] - public JoinDataComplete ProgramEnvironmentVersion = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Program Environment Version", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("AggregatedProgramInfo")] - public JoinDataComplete AggregatedProgramInfo = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Program Aggregate Info Json", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("EthernetOffsetJoin")] - public JoinDataComplete EthernetOffsetJoin = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 }, - new JoinMetadata { Description = "All Ethernet Data is offset between Nics by 5 - First Joins Start at 76", JoinCapabilities = eJoinCapabilities.None, JoinType = eJoinType.None }); - - [JoinName("HostName")] - public JoinDataComplete HostName = new JoinDataComplete(new JoinData { JoinNumber = 76, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Ethernet Hostname", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("CurrentIpAddress")] - public JoinDataComplete CurrentIpAddress = new JoinDataComplete(new JoinData { JoinNumber = 77, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Ethernet Current Ip Address", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("CurrentSubnetMask")] - public JoinDataComplete CurrentSubnetMask = new JoinDataComplete(new JoinData { JoinNumber = 78, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Ethernet Current Subnet Mask", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("CurrentDefaultGateway")] - public JoinDataComplete CurrentDefaultGateway = new JoinDataComplete(new JoinData { JoinNumber = 79, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Ethernet Current Default Gateway", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("StaticIpAddress")] - public JoinDataComplete StaticIpAddress = new JoinDataComplete(new JoinData { JoinNumber = 80, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Ethernet Static Ip Address", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("StaticSubnetMask")] - public JoinDataComplete StaticSubnetMask = new JoinDataComplete(new JoinData { JoinNumber = 81, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Ethernet Static Subnet Mask", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("StaticDefaultGateway")] - public JoinDataComplete StaticDefaultGateway = new JoinDataComplete(new JoinData { JoinNumber = 82, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Ethernet Static Default Gateway", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("Domain")] - public JoinDataComplete Domain = new JoinDataComplete(new JoinData { JoinNumber = 83, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Ethernet Domain", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("DnsServer")] - public JoinDataComplete DnsServer = new JoinDataComplete(new JoinData { JoinNumber = 84, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Ethernet Dns Server", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("MacAddress")] - public JoinDataComplete MacAddress = new JoinDataComplete(new JoinData { JoinNumber = 85, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Ethernet Mac Address", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - [JoinName("DhcpStatus")] - public JoinDataComplete DhcpStatus = new JoinDataComplete(new JoinData { JoinNumber = 86, JoinSpan = 1 }, - new JoinMetadata { Description = "Processor Ethernet Dhcp Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); - - /// - /// Constructor to use when instantiating this Join Map without inheriting from it - /// - /// Join this join map will start at - public SystemMonitorJoinMap(uint joinStart) - : this(joinStart, typeof(SystemMonitorJoinMap)) - { - } - - /// - /// Constructor to use when extending this Join map - /// - /// Join this join map will start at - /// Type of the child join map - protected SystemMonitorJoinMap(uint joinStart, Type type) - : base(joinStart, type) - { - } - } +using System; + +namespace PepperDash.Essentials.Core.Bridges +{ + public class SystemMonitorJoinMap : JoinMapBaseAdvanced + { + [JoinName("TimeZone")] + public JoinDataComplete TimeZone = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Timezone", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); + + [JoinName("TimeZoneName")] + public JoinDataComplete TimeZoneName = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Timezone Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("IOControllerVersion")] + public JoinDataComplete IOControllerVersion = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor IO Controller Version", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("SnmpAppVersion")] + public JoinDataComplete SnmpAppVersion = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor SNMP App Version", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("BACnetAppVersion")] + public JoinDataComplete BACnetAppVersion = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor BACNet App Version", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("ControllerVersion")] + public JoinDataComplete ControllerVersion = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Controller Version", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("SerialNumber")] + public JoinDataComplete SerialNumber = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Serial Number", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("Model")] + public JoinDataComplete Model = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Model", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("Uptime")] + public JoinDataComplete Uptime = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Uptime", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("LastBoot")] + public JoinDataComplete LastBoot = new JoinDataComplete(new JoinData { JoinNumber = 9, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Last Boot", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("ProgramOffsetJoin")] + public JoinDataComplete ProgramOffsetJoin = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 5 }, + new JoinMetadata { Description = "All Program Data is offset between slots by 5 - First Joins Start at 11", JoinCapabilities = eJoinCapabilities.None, JoinType = eJoinType.None }); + + [JoinName("ProgramStart")] + public JoinDataComplete ProgramStart = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Program Start / Fb", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("ProgramStop")] + public JoinDataComplete ProgramStop = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Program Stop / Fb", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("ProgramRegister")] + public JoinDataComplete ProgramRegister = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Program Register / Fb", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("ProgramUnregister")] + public JoinDataComplete ProgramUnregister = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Program UnRegister / Fb", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("ProgramName")] + public JoinDataComplete ProgramName = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Program Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("ProgramCompiledTime")] + public JoinDataComplete ProgramCompiledTime = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Program Compile Time", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("ProgramCrestronDatabaseVersion")] + public JoinDataComplete ProgramCrestronDatabaseVersion = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Program Database Version", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("ProgramEnvironmentVersion")] + public JoinDataComplete ProgramEnvironmentVersion = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Program Environment Version", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("AggregatedProgramInfo")] + public JoinDataComplete AggregatedProgramInfo = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Program Aggregate Info Json", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("EthernetOffsetJoin")] + public JoinDataComplete EthernetOffsetJoin = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 }, + new JoinMetadata { Description = "All Ethernet Data is offset between Nics by 5 - First Joins Start at 76", JoinCapabilities = eJoinCapabilities.None, JoinType = eJoinType.None }); + + [JoinName("HostName")] + public JoinDataComplete HostName = new JoinDataComplete(new JoinData { JoinNumber = 76, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Ethernet Hostname", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("CurrentIpAddress")] + public JoinDataComplete CurrentIpAddress = new JoinDataComplete(new JoinData { JoinNumber = 77, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Ethernet Current Ip Address", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("CurrentSubnetMask")] + public JoinDataComplete CurrentSubnetMask = new JoinDataComplete(new JoinData { JoinNumber = 78, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Ethernet Current Subnet Mask", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("CurrentDefaultGateway")] + public JoinDataComplete CurrentDefaultGateway = new JoinDataComplete(new JoinData { JoinNumber = 79, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Ethernet Current Default Gateway", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("StaticIpAddress")] + public JoinDataComplete StaticIpAddress = new JoinDataComplete(new JoinData { JoinNumber = 80, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Ethernet Static Ip Address", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("StaticSubnetMask")] + public JoinDataComplete StaticSubnetMask = new JoinDataComplete(new JoinData { JoinNumber = 81, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Ethernet Static Subnet Mask", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("StaticDefaultGateway")] + public JoinDataComplete StaticDefaultGateway = new JoinDataComplete(new JoinData { JoinNumber = 82, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Ethernet Static Default Gateway", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("Domain")] + public JoinDataComplete Domain = new JoinDataComplete(new JoinData { JoinNumber = 83, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Ethernet Domain", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("DnsServer")] + public JoinDataComplete DnsServer = new JoinDataComplete(new JoinData { JoinNumber = 84, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Ethernet Dns Server", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("MacAddress")] + public JoinDataComplete MacAddress = new JoinDataComplete(new JoinData { JoinNumber = 85, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Ethernet Mac Address", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + [JoinName("DhcpStatus")] + public JoinDataComplete DhcpStatus = new JoinDataComplete(new JoinData { JoinNumber = 86, JoinSpan = 1 }, + new JoinMetadata { Description = "Processor Ethernet Dhcp Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); + + /// + /// Constructor to use when instantiating this Join Map without inheriting from it + /// + /// Join this join map will start at + public SystemMonitorJoinMap(uint joinStart) + : this(joinStart, typeof(SystemMonitorJoinMap)) + { + } + + /// + /// Constructor to use when extending this Join map + /// + /// Join this join map will start at + /// Type of the child join map + protected SystemMonitorJoinMap(uint joinStart, Type type) + : base(joinStart, type) + { + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/VideoCodecControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/VideoCodecControllerJoinMap.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/VideoCodecControllerJoinMap.cs rename to src/PepperDash.Essentials.Core/Bridges/JoinMaps/VideoCodecControllerJoinMap.cs index e208e371..74131e2b 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/VideoCodecControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/VideoCodecControllerJoinMap.cs @@ -1,3178 +1,3178 @@ -using System; -using PepperDash.Essentials.Core; -namespace PepperDash.Essentials.Core.Bridges.JoinMaps -{ - public class VideoCodecControllerJoinMap : JoinMapBaseAdvanced - { - #region Digital - - [JoinName("IsOnline")] - public JoinDataComplete IsOnline = new JoinDataComplete( - new JoinData - { - JoinNumber = 1, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Device is Online", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("SendDtmfToSpecificCallIndex")] - public JoinDataComplete SendDtmfToSpecificCallIndex = new JoinDataComplete( - new JoinData - { - JoinNumber = 10, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "If High, will send DTMF tones to the call set by SelectCall analog. If low sends DTMF tones to last connected call.", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("Dtmf1")] - public JoinDataComplete Dtmf1 = new JoinDataComplete( - new JoinData - { - JoinNumber = 11, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "DTMF 1", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("Dtmf2")] - public JoinDataComplete Dtmf2 = new JoinDataComplete( - new JoinData - { - JoinNumber = 12, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "DTMF 2", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("Dtmf3")] - public JoinDataComplete Dtmf3 = new JoinDataComplete( - new JoinData - { - JoinNumber = 13, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "DTMF 3", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("Dtmf4")] - public JoinDataComplete Dtmf4 = new JoinDataComplete( - new JoinData - { - JoinNumber = 14, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "DTMF 4", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("Dtmf5")] - public JoinDataComplete Dtmf5 = new JoinDataComplete( - new JoinData - { - JoinNumber = 15, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "DTMF 5", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("Dtmf6")] - public JoinDataComplete Dtmf6 = new JoinDataComplete( - new JoinData - { - JoinNumber = 16, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "DTMF 6", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("Dtmf7")] - public JoinDataComplete Dtmf7 = new JoinDataComplete( - new JoinData - { - JoinNumber = 17, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "DTMF 7", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("Dtmf8")] - public JoinDataComplete Dtmf8 = new JoinDataComplete( - new JoinData - { - JoinNumber = 18, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "DTMF 8", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("Dtmf9")] - public JoinDataComplete Dtmf9 = new JoinDataComplete( - new JoinData - { - JoinNumber = 19, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "DTMF 9", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("Dtmf0")] - public JoinDataComplete Dtmf0 = new JoinDataComplete( - new JoinData - { - JoinNumber = 20, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "DTMF 0", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DtmfStar")] - public JoinDataComplete DtmfStar = new JoinDataComplete( - new JoinData - { - JoinNumber = 21, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "DTMF *", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DtmfPound")] - public JoinDataComplete DtmfPound = new JoinDataComplete( - new JoinData - { - JoinNumber = 22, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "DTMF #", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("EndAllCalls")] - public JoinDataComplete EndAllCalls = new JoinDataComplete( - new JoinData - { - JoinNumber = 24, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "End All Calls", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("HookState")] - public JoinDataComplete HookState = new JoinDataComplete( - new JoinData - { - JoinNumber = 31, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Current Hook State", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("SpeedDialStart")] - public JoinDataComplete SpeedDialStart = new JoinDataComplete( - new JoinData - { - JoinNumber = 41, - JoinSpan = 4 - }, - new JoinMetadata - { - Description = "Speed Dial", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("IncomingCall")] - public JoinDataComplete IncomingCall = new JoinDataComplete( - new JoinData - { - JoinNumber = 50, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Incoming Call", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("IncomingAnswer")] - public JoinDataComplete IncomingAnswer = new JoinDataComplete( - new JoinData - { - JoinNumber = 51, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Answer Incoming Call", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("IncomingReject")] - public JoinDataComplete IncomingReject = new JoinDataComplete( - new JoinData - { - JoinNumber = 52, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Reject Incoming Call", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("ManualDial")] - public JoinDataComplete ManualDial = new JoinDataComplete( - new JoinData - { - JoinNumber = 71, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Dial manual string specified by CurrentDialString serial join", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DialPhone")] - public JoinDataComplete DialPhone = new JoinDataComplete( - new JoinData - { - JoinNumber = 72, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Dial Phone", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("PhoneHookState")] - public JoinDataComplete PhoneHookState = new JoinDataComplete( - new JoinData - { - JoinNumber = 72, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Dial Phone", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("HangUpPhone")] - public JoinDataComplete HangUpPhone = new JoinDataComplete( - new JoinData - { - JoinNumber = 73, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Hang Up Phone", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("EndCallStart")] - public JoinDataComplete EndCallStart = new JoinDataComplete( - new JoinData - { - JoinNumber = 81, - JoinSpan = 8 - }, - new JoinMetadata - { - Description = "End a specific call by call index. ", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("JoinAllCalls")] - public JoinDataComplete JoinAllCalls = new JoinDataComplete( - new JoinData - { - JoinNumber = 90, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Join all calls", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("JoinCallStart")] - public JoinDataComplete JoinCallStart = new JoinDataComplete( - new JoinData - { - JoinNumber = 91, - JoinSpan = 8 - }, - new JoinMetadata - { - Description = "Join a specific call by call index. ", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DirectorySearchBusy")] - public JoinDataComplete DirectorySearchBusy = new JoinDataComplete( - new JoinData - { - JoinNumber = 100, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Directory Search Busy FB", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - - [JoinName("DirectoryEntryIsContact")] - public JoinDataComplete DirectoryEntryIsContact = new JoinDataComplete( - new JoinData - { - JoinNumber = 101, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Directory Selected Entry Is Contact FB", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DirectoryLineSelected")] - public JoinDataComplete DirectoryLineSelected = new JoinDataComplete( - new JoinData - { - JoinNumber = 101, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Directory Line Selected FB", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DirectoryIsRoot")] - public JoinDataComplete DirectoryIsRoot = new JoinDataComplete( - new JoinData - { - JoinNumber = 102, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Directory is on Root FB", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DirectoryHasChanged")] - public JoinDataComplete DirectoryHasChanged = new JoinDataComplete( - new JoinData - { - JoinNumber = 103, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Directory has changed FB", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DirectoryRoot")] - public JoinDataComplete DirectoryRoot = new JoinDataComplete( - new JoinData - { - JoinNumber = 104, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Go to Directory Root", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DirectoryFolderBack")] - public JoinDataComplete DirectoryFolderBack = new JoinDataComplete( - new JoinData - { - JoinNumber = 105, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Go back one directory level", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DirectoryDialSelectedLine")] - public JoinDataComplete DirectoryDialSelectedLine = new JoinDataComplete( - new JoinData - { - JoinNumber = 106, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Dial selected directory line", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DirectoryDisableAutoDialSelectedLine")] - public JoinDataComplete DirectoryDisableAutoDialSelectedLine = new JoinDataComplete( - new JoinData - { - JoinNumber = 107, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Set high to disable automatic dialing of a contact when selected", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DirectoryDialSelectedContactMethod")] - public JoinDataComplete DirectoryDialSelectedContactMethod = new JoinDataComplete( - new JoinData - { - JoinNumber = 108, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Pulse to dial the selected contact method", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DirectoryClearSelected")] - public JoinDataComplete DirectoryClearSelected = new JoinDataComplete( - new JoinData - { - JoinNumber = 110, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Clear Selected Entry and String from Search", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - - [JoinName("CameraTiltUp")] - public JoinDataComplete CameraTiltUp = new JoinDataComplete( - new JoinData - { - JoinNumber = 111, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Tilt Up", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraTiltDown")] - public JoinDataComplete CameraTiltDown = new JoinDataComplete( - new JoinData - { - JoinNumber = 112, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Tilt Down", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraPanLeft")] - public JoinDataComplete CameraPanLeft = new JoinDataComplete( - new JoinData - { - JoinNumber = 113, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Pan Left", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraPanRight")] - public JoinDataComplete CameraPanRight = new JoinDataComplete( - new JoinData - { - JoinNumber = 114, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Pan Right", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraZoomIn")] - public JoinDataComplete CameraZoomIn = new JoinDataComplete( - new JoinData - { - JoinNumber = 115, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Zoom In", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraZoomOut")] - public JoinDataComplete CameraZoomOut = new JoinDataComplete( - new JoinData - { - JoinNumber = 116, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Zoom Out", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraFocusNear")] - public JoinDataComplete CameraFocusNear = new JoinDataComplete( - new JoinData - { - JoinNumber = 117, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Focus Near", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraFocusFar")] - public JoinDataComplete CameraFocusFar = new JoinDataComplete( - new JoinData - { - JoinNumber = 118, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Focus Far", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraFocusAuto")] - public JoinDataComplete CameraFocusAuto = new JoinDataComplete( - new JoinData - { - JoinNumber = 119, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Auto Focus Trigger", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraPresetSave")] - public JoinDataComplete CameraPresetSave = new JoinDataComplete( - new JoinData - { - JoinNumber = 121, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Pulse to save selected preset spcified by CameraPresetSelect analog join. FB will pulse for 3s when preset saved.", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraModeAuto")] - public JoinDataComplete CameraModeAuto = new JoinDataComplete( - new JoinData - { - JoinNumber = 131, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Mode Auto. Enables camera auto tracking mode, with feedback", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraModeManual")] - public JoinDataComplete CameraModeManual = new JoinDataComplete( - new JoinData - { - JoinNumber = 132, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Mode Manual. Disables camera auto tracking mode, with feedback", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraModeOff")] - public JoinDataComplete CameraModeOff = new JoinDataComplete( - new JoinData - { - JoinNumber = 133, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Mode Off. Disables camera video, with feedback. Works like video mute.", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraSelfView")] - public JoinDataComplete CameraSelfView = new JoinDataComplete( - new JoinData - { - JoinNumber = 141, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Self View Toggle/FB", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraLayout")] - public JoinDataComplete CameraLayout = new JoinDataComplete( - new JoinData - { - JoinNumber = 142, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Layout Toggle", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraSupportsAutoMode")] - public JoinDataComplete CameraSupportsAutoMode = new JoinDataComplete( - new JoinData - { - JoinNumber = 143, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Supports Auto Mode FB", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraSupportsOffMode")] - public JoinDataComplete CameraSupportsOffMode = new JoinDataComplete( - new JoinData - { - JoinNumber = 144, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Supports Off Mode FB", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("UpdateMeetings")] - public JoinDataComplete UpdateMeetings = new JoinDataComplete( - new JoinData - { - JoinNumber = 160, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Update Meetings", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DialMeetingStart")] - public JoinDataComplete DialMeetingStart = new JoinDataComplete( - new JoinData - { - JoinNumber = 161, - JoinSpan = 10 - }, - new JoinMetadata - { - Description = "Join meeting", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("MicMuteOn")] - public JoinDataComplete MicMuteOn = new JoinDataComplete( - new JoinData - { - JoinNumber = 171, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Mic Mute On", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("MicMuteOff")] - public JoinDataComplete MicMuteOff = new JoinDataComplete( - new JoinData - { - JoinNumber = 172, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Mic Mute Off", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("MicMuteToggle")] - public JoinDataComplete MicMuteToggle = new JoinDataComplete( - new JoinData - { - JoinNumber = 173, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Mic Mute Toggle", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("VolumeUp")] - public JoinDataComplete VolumeUp = new JoinDataComplete( - new JoinData - { - JoinNumber = 174, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Volume Up", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("VolumeDown")] - public JoinDataComplete VolumeDown = new JoinDataComplete( - new JoinData - { - JoinNumber = 175, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Volume Down", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("VolumeMuteOn")] - public JoinDataComplete VolumeMuteOn = new JoinDataComplete( - new JoinData - { - JoinNumber = 176, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Volume Mute On", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("VolumeMuteOff")] - public JoinDataComplete VolumeMuteOff = new JoinDataComplete( - new JoinData - { - JoinNumber = 177, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Volume Mute Off", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("VolumeMuteToggle")] - public JoinDataComplete VolumeMuteToggle = new JoinDataComplete( - new JoinData - { - JoinNumber = 178, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Volume Mute Toggle", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("RemoveSelectedRecentCallItem")] - public JoinDataComplete RemoveSelectedRecentCallItem = new JoinDataComplete( - new JoinData - { - JoinNumber = 181, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Pulse to remove the selected recent call item specified by the SelectRecentCallItem analog join", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DialSelectedRecentCallItem")] - public JoinDataComplete DialSelectedRecentCallItem = new JoinDataComplete( - new JoinData - { - JoinNumber = 182, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Pulse to dial the selected recent call item specified by the SelectRecentCallItem analog join", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("SourceShareStart")] - public JoinDataComplete SourceShareStart = new JoinDataComplete( - new JoinData - { - JoinNumber = 201, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Start Sharing & Feedback", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("SourceShareEnd")] - public JoinDataComplete SourceShareEnd = new JoinDataComplete( - new JoinData - { - JoinNumber = 202, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Stop Sharing & Feedback", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("AutoShareWhileInCall")] - public JoinDataComplete SourceShareAutoStart = new JoinDataComplete( - new JoinData - { - JoinNumber = 203, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "When high, will autostart sharing when a call is joined", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("RecievingContent")] - public JoinDataComplete RecievingContent = new JoinDataComplete( - new JoinData - { - JoinNumber = 204, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Recieving content from the far end", - JoinType = eJoinType.Digital, - JoinCapabilities = eJoinCapabilities.ToSIMPL - }); - - [JoinName("SelfviewPosition")] - public JoinDataComplete SelfviewPosition = new JoinDataComplete( - new JoinData - { - JoinNumber = 211, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Toggles selfview position", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("HoldAllCalls")] - public JoinDataComplete HoldAllCalls = new JoinDataComplete( - new JoinData - { - JoinNumber = 220, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Holds all calls", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("HoldCallsStart")] - public JoinDataComplete HoldCallsStart = new JoinDataComplete( - new JoinData - { - JoinNumber = 221, - JoinSpan = 8 - }, - new JoinMetadata - { - Description = "Holds Call at specified index. FB reported on Call Status XSIG", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("ResumeCallsStart")] - public JoinDataComplete ResumeCallsStart = new JoinDataComplete( - new JoinData - { - JoinNumber = 231, - JoinSpan = 8 - }, - new JoinMetadata - { - Description = "Resume Call at specified index", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("MultiSiteOptionIsEnabled")] - public JoinDataComplete MultiSiteOptionIsEnabled = new JoinDataComplete( - new JoinData - { - JoinNumber = 301, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Multi site option is enabled FB", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("AutoAnswerEnabled")] - public JoinDataComplete AutoAnswerEnabled = new JoinDataComplete( - new JoinData - { - JoinNumber = 302, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Auto Answer is enabled FB", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("ParticipantAudioMuteToggleStart")] - public JoinDataComplete ParticipantAudioMuteToggleStart = new JoinDataComplete( - new JoinData - { - JoinNumber = 501, - JoinSpan = 50 - }, - new JoinMetadata - { - Description = "Toggles the participant's audio mute status", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("ParticipantVideoMuteToggleStart")] - public JoinDataComplete ParticipantVideoMuteToggleStart = new JoinDataComplete( - new JoinData - { - JoinNumber = 801, - JoinSpan = 50 - }, - new JoinMetadata - { - Description = "Toggles the participant's video mute status", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("ParticipantPinToggleStart")] - public JoinDataComplete ParticipantPinToggleStart = new JoinDataComplete( - new JoinData - { - JoinNumber = 1101, - JoinSpan = 50 - }, - new JoinMetadata - { - Description = "Toggles the participant's pin status", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - - #endregion - - - - #region Analog - - // TODO [ ] hotfix/videocodecbase-max-meeting-xsig-set - [JoinName("MeetingsToDisplay")] - public JoinDataComplete MeetingsToDisplay = new JoinDataComplete( - new JoinData - { - JoinNumber = 40, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Set/FB the number of meetings to display via the bridge xsig; default: 3 meetings.", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Analog - }); - - [JoinName("SelectCall")] - public JoinDataComplete SelectCall = new JoinDataComplete( - new JoinData - { - JoinNumber = 24, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sets the selected Call for DTMF commands. Valid values 1-8", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Analog - }); - - - [JoinName("ConnectedCallCount")] - public JoinDataComplete ConnectedCallCount = new JoinDataComplete( - new JoinData - { - JoinNumber = 25, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Reports the number of currently connected calls", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Analog - }); - - [JoinName("MinutesBeforeMeetingStart")] - public JoinDataComplete MinutesBeforeMeetingStart = new JoinDataComplete( - new JoinData - { - JoinNumber = 41, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Minutes before meeting start that a meeting is joinable", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Analog - }); - - [JoinName("CameraNumberSelect")] - public JoinDataComplete CameraNumberSelect = new JoinDataComplete( - new JoinData - { - JoinNumber = 60, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Number Select/FB. 1 based index. Valid range is 1 to the value reported by CameraCount.", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Analog - }); - - [JoinName("CameraCount")] - public JoinDataComplete CameraCount = new JoinDataComplete( - new JoinData - { - JoinNumber = 61, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Reports the number of cameras", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Analog - }); - - [JoinName("DirectoryRowCount")] - public JoinDataComplete DirectoryRowCount = new JoinDataComplete( - new JoinData - { - JoinNumber = 101, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Directory Row Count FB", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Analog - }); - - [JoinName("DirectorySelectRow")] - public JoinDataComplete DirectorySelectRow = new JoinDataComplete( - new JoinData - { - JoinNumber = 101, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Directory Select Row and Feedback", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Analog - }); - - - [JoinName("SelectedContactMethodCount")] - public JoinDataComplete SelectedContactMethodCount = new JoinDataComplete( - new JoinData - { - JoinNumber = 102, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Reports the number of contact methods for the selected contact", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Analog - }); - - [JoinName("SelectContactMethod")] - public JoinDataComplete SelectContactMethod = new JoinDataComplete( - new JoinData - { - JoinNumber = 103, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Selects a contact method by index", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Analog - }); - - [JoinName("DirectorySelectRowFeedback")] - public JoinDataComplete DirectorySelectRowFeedback = new JoinDataComplete( - new JoinData - { - JoinNumber = 104, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Directory Select Row and Feedback", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Analog - }); - - - - [JoinName("CameraPresetSelect")] - public JoinDataComplete CameraPresetSelect = new JoinDataComplete( - new JoinData - { - JoinNumber = 121, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Preset Select", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Analog - }); - - [JoinName("FarEndPresetSelect")] - public JoinDataComplete FarEndPresetSelect = new JoinDataComplete( - new JoinData - { - JoinNumber = 122, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Far End Preset Preset Select", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Analog - }); - - [JoinName("ParticipantCount")] - public JoinDataComplete ParticipantCount = new JoinDataComplete( - new JoinData - { - JoinNumber = 151, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Current Participant Count", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Analog - }); - - [JoinName("Meeting Count Fb")] - public JoinDataComplete MeetingCount = new JoinDataComplete( - new JoinData - { - JoinNumber = 161, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Meeting Count", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Analog - }); - - [JoinName("VolumeLevel")] - public JoinDataComplete VolumeLevel = new JoinDataComplete( - new JoinData - { - JoinNumber = 174, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Volume Level", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Analog - }); - - [JoinName("SelectRecentCallItem")] - public JoinDataComplete SelectRecentCallItem = new JoinDataComplete( - new JoinData - { - JoinNumber = 180, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Select/FB for Recent Call Item. Valid values 1 - 10", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Analog - }); - - [JoinName("RecentCallOccurrenceType")] - public JoinDataComplete RecentCallOccurrenceType = new JoinDataComplete( - new JoinData - { - JoinNumber = 181, - JoinSpan = 10 - }, - new JoinMetadata - { - Description = "Recent Call Occurrence Type. [0-3] 0 = Unknown, 1 = Placed, 2 = Received, 3 = NoAnswer", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Analog - }); - - [JoinName("RecentCallCount")] - public JoinDataComplete RecentCallCount = new JoinDataComplete( - new JoinData - { - JoinNumber = 191, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Recent Call Count", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Analog - }); - - #endregion - - - - #region Serials - - [JoinName("CurrentDialString")] - public JoinDataComplete CurrentDialString = new JoinDataComplete( - new JoinData - { - JoinNumber = 1, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Value to dial when ManualDial digital join is pulsed", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("PhoneDialString")] - public JoinDataComplete PhoneDialString = new JoinDataComplete( - new JoinData - { - JoinNumber = 2, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Phone Dial String", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("CurrentCallData")] - public JoinDataComplete CurrentCallData = new JoinDataComplete( - new JoinData - { - JoinNumber = 2, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Current Call Data - XSIG", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("CallDirection")] - public JoinDataComplete CallDirection = new JoinDataComplete( - new JoinData - { - JoinNumber = 22, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Current Call Direction", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("IncomingCallName")] - public JoinDataComplete IncomingCallName = new JoinDataComplete( - new JoinData - { - JoinNumber = 51, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Incoming Call Name", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("IncomingCallNumber")] - public JoinDataComplete IncomingCallNumber = new JoinDataComplete( - new JoinData - { - JoinNumber = 52, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Incoming Call Number", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - - [JoinName("DirectorySearchString")] - public JoinDataComplete DirectorySearchString = new JoinDataComplete( - new JoinData - { - JoinNumber = 100, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Directory Search String", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("DirectoryEntries")] - public JoinDataComplete DirectoryEntries = new JoinDataComplete( - new JoinData - { - JoinNumber = 101, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Directory Entries - XSig, 255 entries", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("Schedule")] - public JoinDataComplete Schedule = new JoinDataComplete( - new JoinData - { - JoinNumber = 102, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Schedule Data - XSIG", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("ContactMethods")] - public JoinDataComplete ContactMethods = new JoinDataComplete( - new JoinData - { - JoinNumber = 103, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Contact Methods - XSig, 10 entries", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("CameraPresetNames")] - public JoinDataComplete CameraPresetNames = new JoinDataComplete( - new JoinData - { - JoinNumber = 121, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Preset Names - XSIG, max of 15", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("CurrentLayoutStringFb")] - public JoinDataComplete CurrentLayoutStringFb = new JoinDataComplete( - new JoinData - { - JoinNumber = 141, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Current Layout Fb", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("AvailableLayoutsFb")] - public JoinDataComplete AvailableLayoutsFb = new JoinDataComplete( - new JoinData - { - JoinNumber = 142, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "xSig of all available layouts", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("SelectLayout")] - public JoinDataComplete SelectLayout = new JoinDataComplete( - new JoinData - { - JoinNumber = 142, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Select Layout by string", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Serial - }); - - - - [JoinName("CurrentParticipants")] - public JoinDataComplete CurrentParticipants = new JoinDataComplete( - new JoinData - { - JoinNumber = 151, - JoinSpan = 1 - }, - new JoinMetadata() - { - Description = "Current Participants XSig", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("CameraNamesFb")] - public JoinDataComplete CameraNamesFb = new JoinDataComplete( - new JoinData - { - JoinNumber = 161, - JoinSpan = 10 - }, - new JoinMetadata - { - Description = "Camera Name Fb", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("SelectedRecentCallName")] - public JoinDataComplete SelectedRecentCallName = new JoinDataComplete( - new JoinData - { - JoinNumber = 171, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Selected Recent Call Name", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("SelectedRecentCallNumber")] - public JoinDataComplete SelectedRecentCallNumber = new JoinDataComplete( - new JoinData - { - JoinNumber = 172, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Selected Recent Call Number", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("RecentCallNamesStart")] - public JoinDataComplete RecentCallNamesStart = new JoinDataComplete( - new JoinData - { - JoinNumber = 181, - JoinSpan = 10 - }, - new JoinMetadata - { - Description = "Recent Call Names", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("RecentCallTimesStart")] - public JoinDataComplete RecentCallTimesStart = new JoinDataComplete( - new JoinData - { - JoinNumber = 191, - JoinSpan = 10 - }, - new JoinMetadata - { - Description = "Recent Calls Times", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("CurrentSource")] - public JoinDataComplete CurrentSource = new JoinDataComplete( - new JoinData - { - JoinNumber = 201, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Current Source", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("SelfviewPositionFb")] - public JoinDataComplete SelfviewPositionFb = new JoinDataComplete( - new JoinData - { - JoinNumber = 211, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "advance selfview position", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("DeviceIpAddresss")] - public JoinDataComplete DeviceIpAddresss = new JoinDataComplete( - new JoinData - { - JoinNumber = 301, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "IP Address of device", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("SipPhoneNumber")] - public JoinDataComplete SipPhoneNumber = new JoinDataComplete( - new JoinData - { - JoinNumber = 302, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "SIP phone number of device", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("E164Alias")] - public JoinDataComplete E164Alias = new JoinDataComplete( - new JoinData - { - JoinNumber = 303, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "E164 alias of device", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("H323Id")] - public JoinDataComplete H323Id = new JoinDataComplete( - new JoinData - { - JoinNumber = 304, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "H323 ID of device", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("SipUri")] - public JoinDataComplete SipUri = new JoinDataComplete( - new JoinData - { - JoinNumber = 305, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "SIP URI of device", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("DirectoryEntrySelectedName")] - public JoinDataComplete DirectoryEntrySelectedName = new JoinDataComplete( - new JoinData - { - JoinNumber = 356, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Selected Directory Entry Name", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("DirectoryEntrySelectedNumber")] - public JoinDataComplete DirectoryEntrySelectedNumber = new JoinDataComplete( - new JoinData - { - JoinNumber = 357, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Selected Directory Entry Number", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("DirectorySelectedFolderName")] - public JoinDataComplete DirectorySelectedFolderName = new JoinDataComplete( - new JoinData - { - JoinNumber = 358, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Selected Directory Folder Name", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - #endregion - - - public VideoCodecControllerJoinMap(uint joinStart) - : base(joinStart, typeof(VideoCodecControllerJoinMap)) - { - } - - public VideoCodecControllerJoinMap(uint joinStart, Type type) - : base(joinStart, type) - { - } - } -} - - -namespace PepperDash_Essentials_Core.Bridges.JoinMaps -{ - [Obsolete("Use PepperDash.Essentials.Core.Bridges.JoinMaps")] - public class VideoCodecControllerJoinMap : JoinMapBaseAdvanced - { - - #region Digital - - [JoinName("IsOnline")] - public JoinDataComplete IsOnline = new JoinDataComplete( - new JoinData - { - JoinNumber = 1, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Device is Online", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("1")] - public JoinDataComplete Dtmf1 = new JoinDataComplete( - new JoinData - { - JoinNumber = 11, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "DTMF 1", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("2")] - public JoinDataComplete Dtmf2 = new JoinDataComplete( - new JoinData - { - JoinNumber = 12, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "DTMF 2", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("3")] - public JoinDataComplete Dtmf3 = new JoinDataComplete( - new JoinData - { - JoinNumber = 13, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "DTMF 3", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("4")] - public JoinDataComplete Dtmf4 = new JoinDataComplete( - new JoinData - { - JoinNumber = 14, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "DTMF 4", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("5")] - public JoinDataComplete Dtmf5 = new JoinDataComplete( - new JoinData - { - JoinNumber = 15, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "DTMF 5", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("6")] - public JoinDataComplete Dtmf6 = new JoinDataComplete( - new JoinData - { - JoinNumber = 16, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "DTMF 6", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("7")] - public JoinDataComplete Dtmf7 = new JoinDataComplete( - new JoinData - { - JoinNumber = 17, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "DTMF 7", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("8")] - public JoinDataComplete Dtmf8 = new JoinDataComplete( - new JoinData - { - JoinNumber = 18, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "DTMF 8", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("9")] - public JoinDataComplete Dtmf9 = new JoinDataComplete( - new JoinData - { - JoinNumber = 19, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "DTMF 9", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("0")] - public JoinDataComplete Dtmf0 = new JoinDataComplete( - new JoinData - { - JoinNumber = 20, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "DTMF 0", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("*")] - public JoinDataComplete DtmfStar = new JoinDataComplete( - new JoinData - { - JoinNumber = 21, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "DTMF *", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("#")] - public JoinDataComplete DtmfPound = new JoinDataComplete( - new JoinData - { - JoinNumber = 22, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "DTMF #", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("EndCall")] - public JoinDataComplete EndCall = new JoinDataComplete( - new JoinData - { - JoinNumber = 24, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Hang Up", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("HookState")] - public JoinDataComplete HookState = new JoinDataComplete( - new JoinData - { - JoinNumber = 31, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Current Hook State", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("SpeedDialStart")] - public JoinDataComplete SpeedDialStart = new JoinDataComplete( - new JoinData - { - JoinNumber = 41, - JoinSpan = 4 - }, - new JoinMetadata - { - Description = "Speed Dial", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("IncomingCall")] - public JoinDataComplete IncomingCall = new JoinDataComplete( - new JoinData - { - JoinNumber = 50, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Incoming Call", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("IncomingAnswer")] - public JoinDataComplete IncomingAnswer = new JoinDataComplete( - new JoinData - { - JoinNumber = 51, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Answer Incoming Call", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("IncomingReject")] - public JoinDataComplete IncomingReject = new JoinDataComplete( - new JoinData - { - JoinNumber = 52, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Reject Incoming Call", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("ManualDial")] - public JoinDataComplete ManualDial = new JoinDataComplete( - new JoinData - { - JoinNumber = 71, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Dial manual string", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DialPhoneCall")] - public JoinDataComplete DialPhone = new JoinDataComplete( - new JoinData - { - JoinNumber = 72, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Dial Phone", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("PhoneHookState")] - public JoinDataComplete PhoneHookState = new JoinDataComplete( - new JoinData - { - JoinNumber = 72, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Dial Phone", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("EndPhoneCall")] - public JoinDataComplete HangUpPhone = new JoinDataComplete( - new JoinData - { - JoinNumber = 73, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Hang Up PHone", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DirectorySearchBusy")] - public JoinDataComplete DirectorySearchBusy = new JoinDataComplete( - new JoinData - { - JoinNumber = 100, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Directory Search Busy FB", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DirectoryEntryIsContact")] - public JoinDataComplete DirectoryEntryIsContact = new JoinDataComplete( - new JoinData - { - JoinNumber = 101, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Directory Selected Entry Is Contact FB", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DirectoryLineSelected")] - public JoinDataComplete DirectoryLineSelected = new JoinDataComplete( - new JoinData - { - JoinNumber = 101, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Directory Line Selected FB", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DirectoryIsRoot")] - public JoinDataComplete DirectoryIsRoot = new JoinDataComplete( - new JoinData - { - JoinNumber = 102, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Directory is on Root FB", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DirectoryHasChanged")] - public JoinDataComplete DirectoryHasChanged = new JoinDataComplete( - new JoinData - { - JoinNumber = 103, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Directory has changed FB", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DirectoryRoot")] - public JoinDataComplete DirectoryRoot = new JoinDataComplete( - new JoinData - { - JoinNumber = 104, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Go to Directory Root", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DirectoryFolderBack")] - public JoinDataComplete DirectoryFolderBack = new JoinDataComplete( - new JoinData - { - JoinNumber = 105, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Go back one directory level", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DirectoryDialSelectedLine")] - public JoinDataComplete DirectoryDialSelectedLine = new JoinDataComplete( - new JoinData - { - JoinNumber = 106, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Dial selected directory line", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - - [JoinName("CameraTiltUp")] - public JoinDataComplete CameraTiltUp = new JoinDataComplete( - new JoinData - { - JoinNumber = 111, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Tilt Up", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraTiltDown")] - public JoinDataComplete CameraTiltDown = new JoinDataComplete( - new JoinData - { - JoinNumber = 112, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Tilt Down", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraPanLeft")] - public JoinDataComplete CameraPanLeft = new JoinDataComplete( - new JoinData - { - JoinNumber = 113, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Pan Left", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraPanRight")] - public JoinDataComplete CameraPanRight = new JoinDataComplete( - new JoinData - { - JoinNumber = 114, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Pan Right", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraZoomIn")] - public JoinDataComplete CameraZoomIn = new JoinDataComplete( - new JoinData - { - JoinNumber = 115, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Zoom In", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraZoomOut")] - public JoinDataComplete CameraZoomOut = new JoinDataComplete( - new JoinData - { - JoinNumber = 116, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Zoom Out", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraPresetSave")] - public JoinDataComplete CameraPresetSave = new JoinDataComplete( - new JoinData - { - JoinNumber = 121, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Save Selected Preset", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraModeAuto")] - public JoinDataComplete CameraModeAuto = new JoinDataComplete( - new JoinData - { - JoinNumber = 131, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Mode Auto", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraModeManual")] - public JoinDataComplete CameraModeManual = new JoinDataComplete( - new JoinData - { - JoinNumber = 132, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Mode Manual", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraModeOff")] - public JoinDataComplete CameraModeOff = new JoinDataComplete( - new JoinData - { - JoinNumber = 133, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Mode Off", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraSelfView")] - public JoinDataComplete CameraSelfView = new JoinDataComplete( - new JoinData - { - JoinNumber = 141, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Self View Toggle/FB", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraLayout")] - public JoinDataComplete CameraLayout = new JoinDataComplete( - new JoinData - { - JoinNumber = 142, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Layout Toggle", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraSupportsAutoMode")] - public JoinDataComplete CameraSupportsAutoMode = new JoinDataComplete( - new JoinData - { - JoinNumber = 143, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Supports Auto Mode FB", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CameraSupportsOffMode")] - public JoinDataComplete CameraSupportsOffMode = new JoinDataComplete( - new JoinData - { - JoinNumber = 144, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Supports Off Mode FB", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("UpdateMeetings")] - public JoinDataComplete UpdateMeetings = new JoinDataComplete( - new JoinData - { - JoinNumber = 160, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Update Meetings", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DialMeeting1")] - public JoinDataComplete DialMeeting1 = new JoinDataComplete( - new JoinData - { - JoinNumber = 161, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Join first meeting", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DialMeeting2")] - public JoinDataComplete DialMeeting2 = new JoinDataComplete( - new JoinData - { - JoinNumber = 162, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Join second meeting", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("DialMeeting3")] - public JoinDataComplete DialMeeting3 = new JoinDataComplete( - new JoinData - { - JoinNumber = 163, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Join third meeting", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("MicMuteOn")] - public JoinDataComplete MicMuteOn = new JoinDataComplete( - new JoinData - { - JoinNumber = 171, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Mic Mute On", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("MicMuteOff")] - public JoinDataComplete MicMuteOff = new JoinDataComplete( - new JoinData - { - JoinNumber = 172, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Mic Mute Off", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("MicMuteToggle")] - public JoinDataComplete MicMuteToggle = new JoinDataComplete( - new JoinData - { - JoinNumber = 173, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Mic Mute Toggle", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("VolumeUp")] - public JoinDataComplete VolumeUp = new JoinDataComplete( - new JoinData - { - JoinNumber = 174, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Volume Up", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("VolumeDown")] - public JoinDataComplete VolumeDown = new JoinDataComplete( - new JoinData - { - JoinNumber = 175, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Volume Down", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("VolumeMuteOn")] - public JoinDataComplete VolumeMuteOn = new JoinDataComplete( - new JoinData - { - JoinNumber = 176, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Volume Mute On", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("VolumeMuteOff")] - public JoinDataComplete VolumeMuteOff = new JoinDataComplete( - new JoinData - { - JoinNumber = 177, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Volume Mute Off", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("VolumeMuteToggle")] - public JoinDataComplete VolumeMuteToggle = new JoinDataComplete( - new JoinData - { - JoinNumber = 178, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Volume Mute Toggle", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("SourceShareStart")] - public JoinDataComplete SourceShareStart = new JoinDataComplete( - new JoinData - { - JoinNumber = 201, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Start Sharing & Feedback", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("SourceShareEnd")] - public JoinDataComplete SourceShareEnd = new JoinDataComplete( - new JoinData - { - JoinNumber = 202, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Stop Sharing & Feedback", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("AutoShareWhileInCall")] - public JoinDataComplete SourceShareAutoStart = new JoinDataComplete( - new JoinData - { - JoinNumber = 203, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "When high, will autostart sharing when a call is joined", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("RecievingContent")] - public JoinDataComplete RecievingContent = new JoinDataComplete( - new JoinData - { - JoinNumber = 204, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Recieving content from the far end", - JoinType = eJoinType.Digital, - JoinCapabilities = eJoinCapabilities.ToSIMPL - }); - - [JoinName("SelfviewPosition")] - public JoinDataComplete SelfviewPosition = new JoinDataComplete( - new JoinData - { - JoinNumber = 211, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "advance selfview position", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("ParticipantAudioMuteToggleStart")] - public JoinDataComplete ParticipantAudioMuteToggleStart = new JoinDataComplete( - new JoinData - { - JoinNumber = 500, - JoinSpan = 50 - }, - new JoinMetadata - { - Description = "Toggles the participant's audio mute status", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("ParticipantVideoMuteToggleStart")] - public JoinDataComplete ParticipantVideoMuteToggleStart = new JoinDataComplete( - new JoinData - { - JoinNumber = 800, - JoinSpan = 50 - }, - new JoinMetadata - { - Description = "Toggles the participant's video mute status", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("ParticipantPinToggleStart")] - public JoinDataComplete ParticipantPinToggleStart = new JoinDataComplete( - new JoinData - { - JoinNumber = 1100, - JoinSpan = 50 - }, - new JoinMetadata - { - Description = "Toggles the participant's pin status", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - #endregion - - - - #region Analog - - [JoinName("MinutesBeforeMeetingStart")] - public JoinDataComplete MinutesBeforeMeetingStart = new JoinDataComplete( - new JoinData - { - JoinNumber = 41, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Minutes before meeting start that a meeting is joinable", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Analog - }); - - [JoinName("CameraNumberSelect")] - public JoinDataComplete CameraNumberSelect = new JoinDataComplete( - new JoinData - { - JoinNumber = 60, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Number Select/FB", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Analog - }); - - [JoinName("DirectoryRowCount")] - public JoinDataComplete DirectoryRowCount = new JoinDataComplete( - new JoinData - { - JoinNumber = 101, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Directory Row Count FB", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Analog - }); - - [JoinName("DirectorySelectRow")] - public JoinDataComplete DirectorySelectRow = new JoinDataComplete( - new JoinData - { - JoinNumber = 101, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Directory Select Row", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Analog - }); - - [JoinName("CameraPresetSelect")] - public JoinDataComplete CameraPresetSelect = new JoinDataComplete( - new JoinData - { - JoinNumber = 121, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Preset Select", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Analog - }); - - [JoinName("ParticipantCount")] - public JoinDataComplete ParticipantCount = new JoinDataComplete( - new JoinData - { - JoinNumber = 151, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Current Participant Count", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Analog - }); - - [JoinName("Meeting Count Fb")] - public JoinDataComplete MeetingCount = new JoinDataComplete( - new JoinData - { - JoinNumber = 161, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Meeting Count", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Analog - }); - - [JoinName("VolumeLevel")] - public JoinDataComplete VolumeLevel = new JoinDataComplete( - new JoinData - { - JoinNumber = 174, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Volume Level", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Analog - }); - - #endregion - - - - #region Serials - - [JoinName("CurrentDialString")] - public JoinDataComplete CurrentDialString = new JoinDataComplete( - new JoinData - { - JoinNumber = 1, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Current Dial String", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("PhoneString")] - public JoinDataComplete PhoneDialString = new JoinDataComplete( - new JoinData - { - JoinNumber = 2, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Phone Dial String", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("CurrentCallName")] - public JoinDataComplete CurrentCallData = new JoinDataComplete( - new JoinData - { - JoinNumber = 2, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Current Call Data - XSIG", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("CallDirection")] - public JoinDataComplete CallDirection = new JoinDataComplete( - new JoinData - { - JoinNumber = 22, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Current Call Direction", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("IncomingCallName")] - public JoinDataComplete IncomingCallName = new JoinDataComplete( - new JoinData - { - JoinNumber = 51, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Incoming Call Name", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("IncomingCallNumber")] - public JoinDataComplete IncomingCallNumber = new JoinDataComplete( - new JoinData - { - JoinNumber = 52, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Incoming Call Number", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - - [JoinName("DirectorySearchString")] - public JoinDataComplete DirectorySearchString = new JoinDataComplete( - new JoinData - { - JoinNumber = 100, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Directory Search String", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("DirectoryEntries")] - public JoinDataComplete DirectoryEntries = new JoinDataComplete( - new JoinData - { - JoinNumber = 101, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Directory Entries - XSig, 255 entries", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("Schedule")] - public JoinDataComplete Schedule = new JoinDataComplete( - new JoinData - { - JoinNumber = 102, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Schedule Data - XSIG", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("CameraPresetNames")] - public JoinDataComplete CameraPresetNames = new JoinDataComplete( - new JoinData - { - JoinNumber = 121, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Camera Preset Names - XSIG, max of 15", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("CameraLayoutStringFb")] - public JoinDataComplete CameraLayoutStringFb = new JoinDataComplete( - new JoinData - { - JoinNumber = 141, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Current Layout Fb", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("AvailableLayoutsFb")] - public JoinDataComplete AvailableLayoutsFb = new JoinDataComplete( - new JoinData - { - JoinNumber = 142, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "xSig of all available layouts", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("SelectLayout")] - public JoinDataComplete SelectLayout = new JoinDataComplete( - new JoinData - { - JoinNumber = 142, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Select Layout by string", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Serial - }); - - - [JoinName("CurrentParticipants")] - public JoinDataComplete CurrentParticipants = new JoinDataComplete( - new JoinData - { - JoinNumber = 151, - JoinSpan = 1 - }, - new JoinMetadata() - { - Description = "Current Participants XSig", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("CurrentSource")] - public JoinDataComplete CurrentSource = new JoinDataComplete( - new JoinData - { - JoinNumber = 201, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Current Source", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("SelfviewPositionFb")] - public JoinDataComplete SelfviewPositionFb = new JoinDataComplete( - new JoinData - { - JoinNumber = 211, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "advance selfview position", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("DirectoryEntrySelectedName")] - public JoinDataComplete DirectoryEntrySelectedName = new JoinDataComplete( - new JoinData - { - JoinNumber = 356, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Selected Directory Entry Name", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("DirectoryEntrySelectedNumber")] - public JoinDataComplete DirectoryEntrySelectedNumber = new JoinDataComplete( - new JoinData - { - JoinNumber = 357, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Selected Directory Entry Number", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("DirectorySelectedFolderName")] - public JoinDataComplete DirectorySelectedFolderName = new JoinDataComplete( - new JoinData - { - JoinNumber = 358, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Selected Directory Folder Name", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - #endregion - - - public VideoCodecControllerJoinMap(uint joinStart) - : base(joinStart, typeof(VideoCodecControllerJoinMap)) - { - } - - public VideoCodecControllerJoinMap(uint joinStart, Type type) - : base(joinStart, type) - { - } - } +using System; +using PepperDash.Essentials.Core; +namespace PepperDash.Essentials.Core.Bridges.JoinMaps +{ + public class VideoCodecControllerJoinMap : JoinMapBaseAdvanced + { + #region Digital + + [JoinName("IsOnline")] + public JoinDataComplete IsOnline = new JoinDataComplete( + new JoinData + { + JoinNumber = 1, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Device is Online", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("SendDtmfToSpecificCallIndex")] + public JoinDataComplete SendDtmfToSpecificCallIndex = new JoinDataComplete( + new JoinData + { + JoinNumber = 10, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "If High, will send DTMF tones to the call set by SelectCall analog. If low sends DTMF tones to last connected call.", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("Dtmf1")] + public JoinDataComplete Dtmf1 = new JoinDataComplete( + new JoinData + { + JoinNumber = 11, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "DTMF 1", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("Dtmf2")] + public JoinDataComplete Dtmf2 = new JoinDataComplete( + new JoinData + { + JoinNumber = 12, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "DTMF 2", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("Dtmf3")] + public JoinDataComplete Dtmf3 = new JoinDataComplete( + new JoinData + { + JoinNumber = 13, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "DTMF 3", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("Dtmf4")] + public JoinDataComplete Dtmf4 = new JoinDataComplete( + new JoinData + { + JoinNumber = 14, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "DTMF 4", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("Dtmf5")] + public JoinDataComplete Dtmf5 = new JoinDataComplete( + new JoinData + { + JoinNumber = 15, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "DTMF 5", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("Dtmf6")] + public JoinDataComplete Dtmf6 = new JoinDataComplete( + new JoinData + { + JoinNumber = 16, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "DTMF 6", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("Dtmf7")] + public JoinDataComplete Dtmf7 = new JoinDataComplete( + new JoinData + { + JoinNumber = 17, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "DTMF 7", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("Dtmf8")] + public JoinDataComplete Dtmf8 = new JoinDataComplete( + new JoinData + { + JoinNumber = 18, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "DTMF 8", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("Dtmf9")] + public JoinDataComplete Dtmf9 = new JoinDataComplete( + new JoinData + { + JoinNumber = 19, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "DTMF 9", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("Dtmf0")] + public JoinDataComplete Dtmf0 = new JoinDataComplete( + new JoinData + { + JoinNumber = 20, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "DTMF 0", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DtmfStar")] + public JoinDataComplete DtmfStar = new JoinDataComplete( + new JoinData + { + JoinNumber = 21, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "DTMF *", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DtmfPound")] + public JoinDataComplete DtmfPound = new JoinDataComplete( + new JoinData + { + JoinNumber = 22, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "DTMF #", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("EndAllCalls")] + public JoinDataComplete EndAllCalls = new JoinDataComplete( + new JoinData + { + JoinNumber = 24, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "End All Calls", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("HookState")] + public JoinDataComplete HookState = new JoinDataComplete( + new JoinData + { + JoinNumber = 31, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Current Hook State", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("SpeedDialStart")] + public JoinDataComplete SpeedDialStart = new JoinDataComplete( + new JoinData + { + JoinNumber = 41, + JoinSpan = 4 + }, + new JoinMetadata + { + Description = "Speed Dial", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("IncomingCall")] + public JoinDataComplete IncomingCall = new JoinDataComplete( + new JoinData + { + JoinNumber = 50, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Incoming Call", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("IncomingAnswer")] + public JoinDataComplete IncomingAnswer = new JoinDataComplete( + new JoinData + { + JoinNumber = 51, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Answer Incoming Call", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("IncomingReject")] + public JoinDataComplete IncomingReject = new JoinDataComplete( + new JoinData + { + JoinNumber = 52, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Reject Incoming Call", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("ManualDial")] + public JoinDataComplete ManualDial = new JoinDataComplete( + new JoinData + { + JoinNumber = 71, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Dial manual string specified by CurrentDialString serial join", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DialPhone")] + public JoinDataComplete DialPhone = new JoinDataComplete( + new JoinData + { + JoinNumber = 72, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Dial Phone", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("PhoneHookState")] + public JoinDataComplete PhoneHookState = new JoinDataComplete( + new JoinData + { + JoinNumber = 72, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Dial Phone", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("HangUpPhone")] + public JoinDataComplete HangUpPhone = new JoinDataComplete( + new JoinData + { + JoinNumber = 73, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Hang Up Phone", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("EndCallStart")] + public JoinDataComplete EndCallStart = new JoinDataComplete( + new JoinData + { + JoinNumber = 81, + JoinSpan = 8 + }, + new JoinMetadata + { + Description = "End a specific call by call index. ", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("JoinAllCalls")] + public JoinDataComplete JoinAllCalls = new JoinDataComplete( + new JoinData + { + JoinNumber = 90, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Join all calls", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("JoinCallStart")] + public JoinDataComplete JoinCallStart = new JoinDataComplete( + new JoinData + { + JoinNumber = 91, + JoinSpan = 8 + }, + new JoinMetadata + { + Description = "Join a specific call by call index. ", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DirectorySearchBusy")] + public JoinDataComplete DirectorySearchBusy = new JoinDataComplete( + new JoinData + { + JoinNumber = 100, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Directory Search Busy FB", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + + [JoinName("DirectoryEntryIsContact")] + public JoinDataComplete DirectoryEntryIsContact = new JoinDataComplete( + new JoinData + { + JoinNumber = 101, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Directory Selected Entry Is Contact FB", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DirectoryLineSelected")] + public JoinDataComplete DirectoryLineSelected = new JoinDataComplete( + new JoinData + { + JoinNumber = 101, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Directory Line Selected FB", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DirectoryIsRoot")] + public JoinDataComplete DirectoryIsRoot = new JoinDataComplete( + new JoinData + { + JoinNumber = 102, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Directory is on Root FB", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DirectoryHasChanged")] + public JoinDataComplete DirectoryHasChanged = new JoinDataComplete( + new JoinData + { + JoinNumber = 103, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Directory has changed FB", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DirectoryRoot")] + public JoinDataComplete DirectoryRoot = new JoinDataComplete( + new JoinData + { + JoinNumber = 104, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Go to Directory Root", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DirectoryFolderBack")] + public JoinDataComplete DirectoryFolderBack = new JoinDataComplete( + new JoinData + { + JoinNumber = 105, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Go back one directory level", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DirectoryDialSelectedLine")] + public JoinDataComplete DirectoryDialSelectedLine = new JoinDataComplete( + new JoinData + { + JoinNumber = 106, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Dial selected directory line", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DirectoryDisableAutoDialSelectedLine")] + public JoinDataComplete DirectoryDisableAutoDialSelectedLine = new JoinDataComplete( + new JoinData + { + JoinNumber = 107, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Set high to disable automatic dialing of a contact when selected", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DirectoryDialSelectedContactMethod")] + public JoinDataComplete DirectoryDialSelectedContactMethod = new JoinDataComplete( + new JoinData + { + JoinNumber = 108, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Pulse to dial the selected contact method", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DirectoryClearSelected")] + public JoinDataComplete DirectoryClearSelected = new JoinDataComplete( + new JoinData + { + JoinNumber = 110, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Clear Selected Entry and String from Search", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + + [JoinName("CameraTiltUp")] + public JoinDataComplete CameraTiltUp = new JoinDataComplete( + new JoinData + { + JoinNumber = 111, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Tilt Up", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraTiltDown")] + public JoinDataComplete CameraTiltDown = new JoinDataComplete( + new JoinData + { + JoinNumber = 112, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Tilt Down", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraPanLeft")] + public JoinDataComplete CameraPanLeft = new JoinDataComplete( + new JoinData + { + JoinNumber = 113, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Pan Left", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraPanRight")] + public JoinDataComplete CameraPanRight = new JoinDataComplete( + new JoinData + { + JoinNumber = 114, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Pan Right", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraZoomIn")] + public JoinDataComplete CameraZoomIn = new JoinDataComplete( + new JoinData + { + JoinNumber = 115, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Zoom In", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraZoomOut")] + public JoinDataComplete CameraZoomOut = new JoinDataComplete( + new JoinData + { + JoinNumber = 116, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Zoom Out", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraFocusNear")] + public JoinDataComplete CameraFocusNear = new JoinDataComplete( + new JoinData + { + JoinNumber = 117, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Focus Near", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraFocusFar")] + public JoinDataComplete CameraFocusFar = new JoinDataComplete( + new JoinData + { + JoinNumber = 118, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Focus Far", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraFocusAuto")] + public JoinDataComplete CameraFocusAuto = new JoinDataComplete( + new JoinData + { + JoinNumber = 119, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Auto Focus Trigger", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraPresetSave")] + public JoinDataComplete CameraPresetSave = new JoinDataComplete( + new JoinData + { + JoinNumber = 121, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Pulse to save selected preset spcified by CameraPresetSelect analog join. FB will pulse for 3s when preset saved.", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraModeAuto")] + public JoinDataComplete CameraModeAuto = new JoinDataComplete( + new JoinData + { + JoinNumber = 131, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Mode Auto. Enables camera auto tracking mode, with feedback", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraModeManual")] + public JoinDataComplete CameraModeManual = new JoinDataComplete( + new JoinData + { + JoinNumber = 132, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Mode Manual. Disables camera auto tracking mode, with feedback", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraModeOff")] + public JoinDataComplete CameraModeOff = new JoinDataComplete( + new JoinData + { + JoinNumber = 133, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Mode Off. Disables camera video, with feedback. Works like video mute.", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraSelfView")] + public JoinDataComplete CameraSelfView = new JoinDataComplete( + new JoinData + { + JoinNumber = 141, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Self View Toggle/FB", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraLayout")] + public JoinDataComplete CameraLayout = new JoinDataComplete( + new JoinData + { + JoinNumber = 142, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Layout Toggle", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraSupportsAutoMode")] + public JoinDataComplete CameraSupportsAutoMode = new JoinDataComplete( + new JoinData + { + JoinNumber = 143, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Supports Auto Mode FB", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraSupportsOffMode")] + public JoinDataComplete CameraSupportsOffMode = new JoinDataComplete( + new JoinData + { + JoinNumber = 144, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Supports Off Mode FB", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("UpdateMeetings")] + public JoinDataComplete UpdateMeetings = new JoinDataComplete( + new JoinData + { + JoinNumber = 160, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Update Meetings", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DialMeetingStart")] + public JoinDataComplete DialMeetingStart = new JoinDataComplete( + new JoinData + { + JoinNumber = 161, + JoinSpan = 10 + }, + new JoinMetadata + { + Description = "Join meeting", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("MicMuteOn")] + public JoinDataComplete MicMuteOn = new JoinDataComplete( + new JoinData + { + JoinNumber = 171, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Mic Mute On", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("MicMuteOff")] + public JoinDataComplete MicMuteOff = new JoinDataComplete( + new JoinData + { + JoinNumber = 172, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Mic Mute Off", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("MicMuteToggle")] + public JoinDataComplete MicMuteToggle = new JoinDataComplete( + new JoinData + { + JoinNumber = 173, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Mic Mute Toggle", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("VolumeUp")] + public JoinDataComplete VolumeUp = new JoinDataComplete( + new JoinData + { + JoinNumber = 174, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Volume Up", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("VolumeDown")] + public JoinDataComplete VolumeDown = new JoinDataComplete( + new JoinData + { + JoinNumber = 175, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Volume Down", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("VolumeMuteOn")] + public JoinDataComplete VolumeMuteOn = new JoinDataComplete( + new JoinData + { + JoinNumber = 176, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Volume Mute On", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("VolumeMuteOff")] + public JoinDataComplete VolumeMuteOff = new JoinDataComplete( + new JoinData + { + JoinNumber = 177, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Volume Mute Off", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("VolumeMuteToggle")] + public JoinDataComplete VolumeMuteToggle = new JoinDataComplete( + new JoinData + { + JoinNumber = 178, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Volume Mute Toggle", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("RemoveSelectedRecentCallItem")] + public JoinDataComplete RemoveSelectedRecentCallItem = new JoinDataComplete( + new JoinData + { + JoinNumber = 181, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Pulse to remove the selected recent call item specified by the SelectRecentCallItem analog join", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DialSelectedRecentCallItem")] + public JoinDataComplete DialSelectedRecentCallItem = new JoinDataComplete( + new JoinData + { + JoinNumber = 182, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Pulse to dial the selected recent call item specified by the SelectRecentCallItem analog join", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("SourceShareStart")] + public JoinDataComplete SourceShareStart = new JoinDataComplete( + new JoinData + { + JoinNumber = 201, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Start Sharing & Feedback", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("SourceShareEnd")] + public JoinDataComplete SourceShareEnd = new JoinDataComplete( + new JoinData + { + JoinNumber = 202, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Stop Sharing & Feedback", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("AutoShareWhileInCall")] + public JoinDataComplete SourceShareAutoStart = new JoinDataComplete( + new JoinData + { + JoinNumber = 203, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "When high, will autostart sharing when a call is joined", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("RecievingContent")] + public JoinDataComplete RecievingContent = new JoinDataComplete( + new JoinData + { + JoinNumber = 204, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Recieving content from the far end", + JoinType = eJoinType.Digital, + JoinCapabilities = eJoinCapabilities.ToSIMPL + }); + + [JoinName("SelfviewPosition")] + public JoinDataComplete SelfviewPosition = new JoinDataComplete( + new JoinData + { + JoinNumber = 211, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Toggles selfview position", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("HoldAllCalls")] + public JoinDataComplete HoldAllCalls = new JoinDataComplete( + new JoinData + { + JoinNumber = 220, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Holds all calls", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("HoldCallsStart")] + public JoinDataComplete HoldCallsStart = new JoinDataComplete( + new JoinData + { + JoinNumber = 221, + JoinSpan = 8 + }, + new JoinMetadata + { + Description = "Holds Call at specified index. FB reported on Call Status XSIG", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("ResumeCallsStart")] + public JoinDataComplete ResumeCallsStart = new JoinDataComplete( + new JoinData + { + JoinNumber = 231, + JoinSpan = 8 + }, + new JoinMetadata + { + Description = "Resume Call at specified index", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("MultiSiteOptionIsEnabled")] + public JoinDataComplete MultiSiteOptionIsEnabled = new JoinDataComplete( + new JoinData + { + JoinNumber = 301, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Multi site option is enabled FB", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("AutoAnswerEnabled")] + public JoinDataComplete AutoAnswerEnabled = new JoinDataComplete( + new JoinData + { + JoinNumber = 302, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Auto Answer is enabled FB", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("ParticipantAudioMuteToggleStart")] + public JoinDataComplete ParticipantAudioMuteToggleStart = new JoinDataComplete( + new JoinData + { + JoinNumber = 501, + JoinSpan = 50 + }, + new JoinMetadata + { + Description = "Toggles the participant's audio mute status", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("ParticipantVideoMuteToggleStart")] + public JoinDataComplete ParticipantVideoMuteToggleStart = new JoinDataComplete( + new JoinData + { + JoinNumber = 801, + JoinSpan = 50 + }, + new JoinMetadata + { + Description = "Toggles the participant's video mute status", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("ParticipantPinToggleStart")] + public JoinDataComplete ParticipantPinToggleStart = new JoinDataComplete( + new JoinData + { + JoinNumber = 1101, + JoinSpan = 50 + }, + new JoinMetadata + { + Description = "Toggles the participant's pin status", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + + #endregion + + + + #region Analog + + // TODO [ ] hotfix/videocodecbase-max-meeting-xsig-set + [JoinName("MeetingsToDisplay")] + public JoinDataComplete MeetingsToDisplay = new JoinDataComplete( + new JoinData + { + JoinNumber = 40, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Set/FB the number of meetings to display via the bridge xsig; default: 3 meetings.", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Analog + }); + + [JoinName("SelectCall")] + public JoinDataComplete SelectCall = new JoinDataComplete( + new JoinData + { + JoinNumber = 24, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sets the selected Call for DTMF commands. Valid values 1-8", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Analog + }); + + + [JoinName("ConnectedCallCount")] + public JoinDataComplete ConnectedCallCount = new JoinDataComplete( + new JoinData + { + JoinNumber = 25, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Reports the number of currently connected calls", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Analog + }); + + [JoinName("MinutesBeforeMeetingStart")] + public JoinDataComplete MinutesBeforeMeetingStart = new JoinDataComplete( + new JoinData + { + JoinNumber = 41, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Minutes before meeting start that a meeting is joinable", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Analog + }); + + [JoinName("CameraNumberSelect")] + public JoinDataComplete CameraNumberSelect = new JoinDataComplete( + new JoinData + { + JoinNumber = 60, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Number Select/FB. 1 based index. Valid range is 1 to the value reported by CameraCount.", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Analog + }); + + [JoinName("CameraCount")] + public JoinDataComplete CameraCount = new JoinDataComplete( + new JoinData + { + JoinNumber = 61, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Reports the number of cameras", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Analog + }); + + [JoinName("DirectoryRowCount")] + public JoinDataComplete DirectoryRowCount = new JoinDataComplete( + new JoinData + { + JoinNumber = 101, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Directory Row Count FB", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Analog + }); + + [JoinName("DirectorySelectRow")] + public JoinDataComplete DirectorySelectRow = new JoinDataComplete( + new JoinData + { + JoinNumber = 101, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Directory Select Row and Feedback", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Analog + }); + + + [JoinName("SelectedContactMethodCount")] + public JoinDataComplete SelectedContactMethodCount = new JoinDataComplete( + new JoinData + { + JoinNumber = 102, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Reports the number of contact methods for the selected contact", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Analog + }); + + [JoinName("SelectContactMethod")] + public JoinDataComplete SelectContactMethod = new JoinDataComplete( + new JoinData + { + JoinNumber = 103, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Selects a contact method by index", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Analog + }); + + [JoinName("DirectorySelectRowFeedback")] + public JoinDataComplete DirectorySelectRowFeedback = new JoinDataComplete( + new JoinData + { + JoinNumber = 104, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Directory Select Row and Feedback", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Analog + }); + + + + [JoinName("CameraPresetSelect")] + public JoinDataComplete CameraPresetSelect = new JoinDataComplete( + new JoinData + { + JoinNumber = 121, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Preset Select", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Analog + }); + + [JoinName("FarEndPresetSelect")] + public JoinDataComplete FarEndPresetSelect = new JoinDataComplete( + new JoinData + { + JoinNumber = 122, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Far End Preset Preset Select", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Analog + }); + + [JoinName("ParticipantCount")] + public JoinDataComplete ParticipantCount = new JoinDataComplete( + new JoinData + { + JoinNumber = 151, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Current Participant Count", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Analog + }); + + [JoinName("Meeting Count Fb")] + public JoinDataComplete MeetingCount = new JoinDataComplete( + new JoinData + { + JoinNumber = 161, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Meeting Count", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Analog + }); + + [JoinName("VolumeLevel")] + public JoinDataComplete VolumeLevel = new JoinDataComplete( + new JoinData + { + JoinNumber = 174, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Volume Level", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Analog + }); + + [JoinName("SelectRecentCallItem")] + public JoinDataComplete SelectRecentCallItem = new JoinDataComplete( + new JoinData + { + JoinNumber = 180, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Select/FB for Recent Call Item. Valid values 1 - 10", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Analog + }); + + [JoinName("RecentCallOccurrenceType")] + public JoinDataComplete RecentCallOccurrenceType = new JoinDataComplete( + new JoinData + { + JoinNumber = 181, + JoinSpan = 10 + }, + new JoinMetadata + { + Description = "Recent Call Occurrence Type. [0-3] 0 = Unknown, 1 = Placed, 2 = Received, 3 = NoAnswer", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Analog + }); + + [JoinName("RecentCallCount")] + public JoinDataComplete RecentCallCount = new JoinDataComplete( + new JoinData + { + JoinNumber = 191, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Recent Call Count", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Analog + }); + + #endregion + + + + #region Serials + + [JoinName("CurrentDialString")] + public JoinDataComplete CurrentDialString = new JoinDataComplete( + new JoinData + { + JoinNumber = 1, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Value to dial when ManualDial digital join is pulsed", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("PhoneDialString")] + public JoinDataComplete PhoneDialString = new JoinDataComplete( + new JoinData + { + JoinNumber = 2, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Phone Dial String", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("CurrentCallData")] + public JoinDataComplete CurrentCallData = new JoinDataComplete( + new JoinData + { + JoinNumber = 2, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Current Call Data - XSIG", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("CallDirection")] + public JoinDataComplete CallDirection = new JoinDataComplete( + new JoinData + { + JoinNumber = 22, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Current Call Direction", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("IncomingCallName")] + public JoinDataComplete IncomingCallName = new JoinDataComplete( + new JoinData + { + JoinNumber = 51, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Incoming Call Name", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("IncomingCallNumber")] + public JoinDataComplete IncomingCallNumber = new JoinDataComplete( + new JoinData + { + JoinNumber = 52, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Incoming Call Number", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + + [JoinName("DirectorySearchString")] + public JoinDataComplete DirectorySearchString = new JoinDataComplete( + new JoinData + { + JoinNumber = 100, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Directory Search String", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("DirectoryEntries")] + public JoinDataComplete DirectoryEntries = new JoinDataComplete( + new JoinData + { + JoinNumber = 101, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Directory Entries - XSig, 255 entries", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("Schedule")] + public JoinDataComplete Schedule = new JoinDataComplete( + new JoinData + { + JoinNumber = 102, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Schedule Data - XSIG", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("ContactMethods")] + public JoinDataComplete ContactMethods = new JoinDataComplete( + new JoinData + { + JoinNumber = 103, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Contact Methods - XSig, 10 entries", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("CameraPresetNames")] + public JoinDataComplete CameraPresetNames = new JoinDataComplete( + new JoinData + { + JoinNumber = 121, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Preset Names - XSIG, max of 15", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("CurrentLayoutStringFb")] + public JoinDataComplete CurrentLayoutStringFb = new JoinDataComplete( + new JoinData + { + JoinNumber = 141, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Current Layout Fb", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("AvailableLayoutsFb")] + public JoinDataComplete AvailableLayoutsFb = new JoinDataComplete( + new JoinData + { + JoinNumber = 142, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "xSig of all available layouts", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("SelectLayout")] + public JoinDataComplete SelectLayout = new JoinDataComplete( + new JoinData + { + JoinNumber = 142, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Select Layout by string", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Serial + }); + + + + [JoinName("CurrentParticipants")] + public JoinDataComplete CurrentParticipants = new JoinDataComplete( + new JoinData + { + JoinNumber = 151, + JoinSpan = 1 + }, + new JoinMetadata() + { + Description = "Current Participants XSig", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("CameraNamesFb")] + public JoinDataComplete CameraNamesFb = new JoinDataComplete( + new JoinData + { + JoinNumber = 161, + JoinSpan = 10 + }, + new JoinMetadata + { + Description = "Camera Name Fb", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("SelectedRecentCallName")] + public JoinDataComplete SelectedRecentCallName = new JoinDataComplete( + new JoinData + { + JoinNumber = 171, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Selected Recent Call Name", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("SelectedRecentCallNumber")] + public JoinDataComplete SelectedRecentCallNumber = new JoinDataComplete( + new JoinData + { + JoinNumber = 172, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Selected Recent Call Number", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("RecentCallNamesStart")] + public JoinDataComplete RecentCallNamesStart = new JoinDataComplete( + new JoinData + { + JoinNumber = 181, + JoinSpan = 10 + }, + new JoinMetadata + { + Description = "Recent Call Names", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("RecentCallTimesStart")] + public JoinDataComplete RecentCallTimesStart = new JoinDataComplete( + new JoinData + { + JoinNumber = 191, + JoinSpan = 10 + }, + new JoinMetadata + { + Description = "Recent Calls Times", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("CurrentSource")] + public JoinDataComplete CurrentSource = new JoinDataComplete( + new JoinData + { + JoinNumber = 201, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Current Source", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("SelfviewPositionFb")] + public JoinDataComplete SelfviewPositionFb = new JoinDataComplete( + new JoinData + { + JoinNumber = 211, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "advance selfview position", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("DeviceIpAddresss")] + public JoinDataComplete DeviceIpAddresss = new JoinDataComplete( + new JoinData + { + JoinNumber = 301, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "IP Address of device", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("SipPhoneNumber")] + public JoinDataComplete SipPhoneNumber = new JoinDataComplete( + new JoinData + { + JoinNumber = 302, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "SIP phone number of device", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("E164Alias")] + public JoinDataComplete E164Alias = new JoinDataComplete( + new JoinData + { + JoinNumber = 303, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "E164 alias of device", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("H323Id")] + public JoinDataComplete H323Id = new JoinDataComplete( + new JoinData + { + JoinNumber = 304, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "H323 ID of device", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("SipUri")] + public JoinDataComplete SipUri = new JoinDataComplete( + new JoinData + { + JoinNumber = 305, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "SIP URI of device", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("DirectoryEntrySelectedName")] + public JoinDataComplete DirectoryEntrySelectedName = new JoinDataComplete( + new JoinData + { + JoinNumber = 356, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Selected Directory Entry Name", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("DirectoryEntrySelectedNumber")] + public JoinDataComplete DirectoryEntrySelectedNumber = new JoinDataComplete( + new JoinData + { + JoinNumber = 357, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Selected Directory Entry Number", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("DirectorySelectedFolderName")] + public JoinDataComplete DirectorySelectedFolderName = new JoinDataComplete( + new JoinData + { + JoinNumber = 358, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Selected Directory Folder Name", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + #endregion + + + public VideoCodecControllerJoinMap(uint joinStart) + : base(joinStart, typeof(VideoCodecControllerJoinMap)) + { + } + + public VideoCodecControllerJoinMap(uint joinStart, Type type) + : base(joinStart, type) + { + } + } +} + + +namespace PepperDash_Essentials_Core.Bridges.JoinMaps +{ + [Obsolete("Use PepperDash.Essentials.Core.Bridges.JoinMaps")] + public class VideoCodecControllerJoinMap : JoinMapBaseAdvanced + { + + #region Digital + + [JoinName("IsOnline")] + public JoinDataComplete IsOnline = new JoinDataComplete( + new JoinData + { + JoinNumber = 1, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Device is Online", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("1")] + public JoinDataComplete Dtmf1 = new JoinDataComplete( + new JoinData + { + JoinNumber = 11, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "DTMF 1", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("2")] + public JoinDataComplete Dtmf2 = new JoinDataComplete( + new JoinData + { + JoinNumber = 12, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "DTMF 2", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("3")] + public JoinDataComplete Dtmf3 = new JoinDataComplete( + new JoinData + { + JoinNumber = 13, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "DTMF 3", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("4")] + public JoinDataComplete Dtmf4 = new JoinDataComplete( + new JoinData + { + JoinNumber = 14, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "DTMF 4", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("5")] + public JoinDataComplete Dtmf5 = new JoinDataComplete( + new JoinData + { + JoinNumber = 15, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "DTMF 5", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("6")] + public JoinDataComplete Dtmf6 = new JoinDataComplete( + new JoinData + { + JoinNumber = 16, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "DTMF 6", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("7")] + public JoinDataComplete Dtmf7 = new JoinDataComplete( + new JoinData + { + JoinNumber = 17, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "DTMF 7", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("8")] + public JoinDataComplete Dtmf8 = new JoinDataComplete( + new JoinData + { + JoinNumber = 18, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "DTMF 8", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("9")] + public JoinDataComplete Dtmf9 = new JoinDataComplete( + new JoinData + { + JoinNumber = 19, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "DTMF 9", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("0")] + public JoinDataComplete Dtmf0 = new JoinDataComplete( + new JoinData + { + JoinNumber = 20, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "DTMF 0", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("*")] + public JoinDataComplete DtmfStar = new JoinDataComplete( + new JoinData + { + JoinNumber = 21, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "DTMF *", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("#")] + public JoinDataComplete DtmfPound = new JoinDataComplete( + new JoinData + { + JoinNumber = 22, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "DTMF #", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("EndCall")] + public JoinDataComplete EndCall = new JoinDataComplete( + new JoinData + { + JoinNumber = 24, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Hang Up", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("HookState")] + public JoinDataComplete HookState = new JoinDataComplete( + new JoinData + { + JoinNumber = 31, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Current Hook State", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("SpeedDialStart")] + public JoinDataComplete SpeedDialStart = new JoinDataComplete( + new JoinData + { + JoinNumber = 41, + JoinSpan = 4 + }, + new JoinMetadata + { + Description = "Speed Dial", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("IncomingCall")] + public JoinDataComplete IncomingCall = new JoinDataComplete( + new JoinData + { + JoinNumber = 50, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Incoming Call", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("IncomingAnswer")] + public JoinDataComplete IncomingAnswer = new JoinDataComplete( + new JoinData + { + JoinNumber = 51, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Answer Incoming Call", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("IncomingReject")] + public JoinDataComplete IncomingReject = new JoinDataComplete( + new JoinData + { + JoinNumber = 52, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Reject Incoming Call", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("ManualDial")] + public JoinDataComplete ManualDial = new JoinDataComplete( + new JoinData + { + JoinNumber = 71, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Dial manual string", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DialPhoneCall")] + public JoinDataComplete DialPhone = new JoinDataComplete( + new JoinData + { + JoinNumber = 72, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Dial Phone", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("PhoneHookState")] + public JoinDataComplete PhoneHookState = new JoinDataComplete( + new JoinData + { + JoinNumber = 72, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Dial Phone", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("EndPhoneCall")] + public JoinDataComplete HangUpPhone = new JoinDataComplete( + new JoinData + { + JoinNumber = 73, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Hang Up PHone", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DirectorySearchBusy")] + public JoinDataComplete DirectorySearchBusy = new JoinDataComplete( + new JoinData + { + JoinNumber = 100, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Directory Search Busy FB", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DirectoryEntryIsContact")] + public JoinDataComplete DirectoryEntryIsContact = new JoinDataComplete( + new JoinData + { + JoinNumber = 101, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Directory Selected Entry Is Contact FB", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DirectoryLineSelected")] + public JoinDataComplete DirectoryLineSelected = new JoinDataComplete( + new JoinData + { + JoinNumber = 101, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Directory Line Selected FB", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DirectoryIsRoot")] + public JoinDataComplete DirectoryIsRoot = new JoinDataComplete( + new JoinData + { + JoinNumber = 102, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Directory is on Root FB", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DirectoryHasChanged")] + public JoinDataComplete DirectoryHasChanged = new JoinDataComplete( + new JoinData + { + JoinNumber = 103, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Directory has changed FB", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DirectoryRoot")] + public JoinDataComplete DirectoryRoot = new JoinDataComplete( + new JoinData + { + JoinNumber = 104, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Go to Directory Root", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DirectoryFolderBack")] + public JoinDataComplete DirectoryFolderBack = new JoinDataComplete( + new JoinData + { + JoinNumber = 105, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Go back one directory level", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DirectoryDialSelectedLine")] + public JoinDataComplete DirectoryDialSelectedLine = new JoinDataComplete( + new JoinData + { + JoinNumber = 106, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Dial selected directory line", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + + [JoinName("CameraTiltUp")] + public JoinDataComplete CameraTiltUp = new JoinDataComplete( + new JoinData + { + JoinNumber = 111, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Tilt Up", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraTiltDown")] + public JoinDataComplete CameraTiltDown = new JoinDataComplete( + new JoinData + { + JoinNumber = 112, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Tilt Down", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraPanLeft")] + public JoinDataComplete CameraPanLeft = new JoinDataComplete( + new JoinData + { + JoinNumber = 113, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Pan Left", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraPanRight")] + public JoinDataComplete CameraPanRight = new JoinDataComplete( + new JoinData + { + JoinNumber = 114, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Pan Right", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraZoomIn")] + public JoinDataComplete CameraZoomIn = new JoinDataComplete( + new JoinData + { + JoinNumber = 115, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Zoom In", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraZoomOut")] + public JoinDataComplete CameraZoomOut = new JoinDataComplete( + new JoinData + { + JoinNumber = 116, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Zoom Out", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraPresetSave")] + public JoinDataComplete CameraPresetSave = new JoinDataComplete( + new JoinData + { + JoinNumber = 121, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Save Selected Preset", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraModeAuto")] + public JoinDataComplete CameraModeAuto = new JoinDataComplete( + new JoinData + { + JoinNumber = 131, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Mode Auto", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraModeManual")] + public JoinDataComplete CameraModeManual = new JoinDataComplete( + new JoinData + { + JoinNumber = 132, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Mode Manual", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraModeOff")] + public JoinDataComplete CameraModeOff = new JoinDataComplete( + new JoinData + { + JoinNumber = 133, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Mode Off", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraSelfView")] + public JoinDataComplete CameraSelfView = new JoinDataComplete( + new JoinData + { + JoinNumber = 141, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Self View Toggle/FB", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraLayout")] + public JoinDataComplete CameraLayout = new JoinDataComplete( + new JoinData + { + JoinNumber = 142, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Layout Toggle", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraSupportsAutoMode")] + public JoinDataComplete CameraSupportsAutoMode = new JoinDataComplete( + new JoinData + { + JoinNumber = 143, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Supports Auto Mode FB", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CameraSupportsOffMode")] + public JoinDataComplete CameraSupportsOffMode = new JoinDataComplete( + new JoinData + { + JoinNumber = 144, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Supports Off Mode FB", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("UpdateMeetings")] + public JoinDataComplete UpdateMeetings = new JoinDataComplete( + new JoinData + { + JoinNumber = 160, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Update Meetings", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DialMeeting1")] + public JoinDataComplete DialMeeting1 = new JoinDataComplete( + new JoinData + { + JoinNumber = 161, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Join first meeting", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DialMeeting2")] + public JoinDataComplete DialMeeting2 = new JoinDataComplete( + new JoinData + { + JoinNumber = 162, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Join second meeting", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("DialMeeting3")] + public JoinDataComplete DialMeeting3 = new JoinDataComplete( + new JoinData + { + JoinNumber = 163, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Join third meeting", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("MicMuteOn")] + public JoinDataComplete MicMuteOn = new JoinDataComplete( + new JoinData + { + JoinNumber = 171, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Mic Mute On", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("MicMuteOff")] + public JoinDataComplete MicMuteOff = new JoinDataComplete( + new JoinData + { + JoinNumber = 172, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Mic Mute Off", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("MicMuteToggle")] + public JoinDataComplete MicMuteToggle = new JoinDataComplete( + new JoinData + { + JoinNumber = 173, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Mic Mute Toggle", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("VolumeUp")] + public JoinDataComplete VolumeUp = new JoinDataComplete( + new JoinData + { + JoinNumber = 174, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Volume Up", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("VolumeDown")] + public JoinDataComplete VolumeDown = new JoinDataComplete( + new JoinData + { + JoinNumber = 175, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Volume Down", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("VolumeMuteOn")] + public JoinDataComplete VolumeMuteOn = new JoinDataComplete( + new JoinData + { + JoinNumber = 176, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Volume Mute On", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("VolumeMuteOff")] + public JoinDataComplete VolumeMuteOff = new JoinDataComplete( + new JoinData + { + JoinNumber = 177, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Volume Mute Off", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("VolumeMuteToggle")] + public JoinDataComplete VolumeMuteToggle = new JoinDataComplete( + new JoinData + { + JoinNumber = 178, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Volume Mute Toggle", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("SourceShareStart")] + public JoinDataComplete SourceShareStart = new JoinDataComplete( + new JoinData + { + JoinNumber = 201, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Start Sharing & Feedback", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("SourceShareEnd")] + public JoinDataComplete SourceShareEnd = new JoinDataComplete( + new JoinData + { + JoinNumber = 202, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Stop Sharing & Feedback", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("AutoShareWhileInCall")] + public JoinDataComplete SourceShareAutoStart = new JoinDataComplete( + new JoinData + { + JoinNumber = 203, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "When high, will autostart sharing when a call is joined", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("RecievingContent")] + public JoinDataComplete RecievingContent = new JoinDataComplete( + new JoinData + { + JoinNumber = 204, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Recieving content from the far end", + JoinType = eJoinType.Digital, + JoinCapabilities = eJoinCapabilities.ToSIMPL + }); + + [JoinName("SelfviewPosition")] + public JoinDataComplete SelfviewPosition = new JoinDataComplete( + new JoinData + { + JoinNumber = 211, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "advance selfview position", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("ParticipantAudioMuteToggleStart")] + public JoinDataComplete ParticipantAudioMuteToggleStart = new JoinDataComplete( + new JoinData + { + JoinNumber = 500, + JoinSpan = 50 + }, + new JoinMetadata + { + Description = "Toggles the participant's audio mute status", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("ParticipantVideoMuteToggleStart")] + public JoinDataComplete ParticipantVideoMuteToggleStart = new JoinDataComplete( + new JoinData + { + JoinNumber = 800, + JoinSpan = 50 + }, + new JoinMetadata + { + Description = "Toggles the participant's video mute status", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("ParticipantPinToggleStart")] + public JoinDataComplete ParticipantPinToggleStart = new JoinDataComplete( + new JoinData + { + JoinNumber = 1100, + JoinSpan = 50 + }, + new JoinMetadata + { + Description = "Toggles the participant's pin status", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + #endregion + + + + #region Analog + + [JoinName("MinutesBeforeMeetingStart")] + public JoinDataComplete MinutesBeforeMeetingStart = new JoinDataComplete( + new JoinData + { + JoinNumber = 41, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Minutes before meeting start that a meeting is joinable", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Analog + }); + + [JoinName("CameraNumberSelect")] + public JoinDataComplete CameraNumberSelect = new JoinDataComplete( + new JoinData + { + JoinNumber = 60, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Number Select/FB", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Analog + }); + + [JoinName("DirectoryRowCount")] + public JoinDataComplete DirectoryRowCount = new JoinDataComplete( + new JoinData + { + JoinNumber = 101, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Directory Row Count FB", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Analog + }); + + [JoinName("DirectorySelectRow")] + public JoinDataComplete DirectorySelectRow = new JoinDataComplete( + new JoinData + { + JoinNumber = 101, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Directory Select Row", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Analog + }); + + [JoinName("CameraPresetSelect")] + public JoinDataComplete CameraPresetSelect = new JoinDataComplete( + new JoinData + { + JoinNumber = 121, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Preset Select", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Analog + }); + + [JoinName("ParticipantCount")] + public JoinDataComplete ParticipantCount = new JoinDataComplete( + new JoinData + { + JoinNumber = 151, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Current Participant Count", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Analog + }); + + [JoinName("Meeting Count Fb")] + public JoinDataComplete MeetingCount = new JoinDataComplete( + new JoinData + { + JoinNumber = 161, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Meeting Count", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Analog + }); + + [JoinName("VolumeLevel")] + public JoinDataComplete VolumeLevel = new JoinDataComplete( + new JoinData + { + JoinNumber = 174, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Volume Level", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Analog + }); + + #endregion + + + + #region Serials + + [JoinName("CurrentDialString")] + public JoinDataComplete CurrentDialString = new JoinDataComplete( + new JoinData + { + JoinNumber = 1, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Current Dial String", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("PhoneString")] + public JoinDataComplete PhoneDialString = new JoinDataComplete( + new JoinData + { + JoinNumber = 2, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Phone Dial String", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("CurrentCallName")] + public JoinDataComplete CurrentCallData = new JoinDataComplete( + new JoinData + { + JoinNumber = 2, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Current Call Data - XSIG", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("CallDirection")] + public JoinDataComplete CallDirection = new JoinDataComplete( + new JoinData + { + JoinNumber = 22, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Current Call Direction", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("IncomingCallName")] + public JoinDataComplete IncomingCallName = new JoinDataComplete( + new JoinData + { + JoinNumber = 51, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Incoming Call Name", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("IncomingCallNumber")] + public JoinDataComplete IncomingCallNumber = new JoinDataComplete( + new JoinData + { + JoinNumber = 52, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Incoming Call Number", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + + [JoinName("DirectorySearchString")] + public JoinDataComplete DirectorySearchString = new JoinDataComplete( + new JoinData + { + JoinNumber = 100, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Directory Search String", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("DirectoryEntries")] + public JoinDataComplete DirectoryEntries = new JoinDataComplete( + new JoinData + { + JoinNumber = 101, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Directory Entries - XSig, 255 entries", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("Schedule")] + public JoinDataComplete Schedule = new JoinDataComplete( + new JoinData + { + JoinNumber = 102, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Schedule Data - XSIG", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("CameraPresetNames")] + public JoinDataComplete CameraPresetNames = new JoinDataComplete( + new JoinData + { + JoinNumber = 121, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Camera Preset Names - XSIG, max of 15", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("CameraLayoutStringFb")] + public JoinDataComplete CameraLayoutStringFb = new JoinDataComplete( + new JoinData + { + JoinNumber = 141, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Current Layout Fb", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("AvailableLayoutsFb")] + public JoinDataComplete AvailableLayoutsFb = new JoinDataComplete( + new JoinData + { + JoinNumber = 142, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "xSig of all available layouts", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("SelectLayout")] + public JoinDataComplete SelectLayout = new JoinDataComplete( + new JoinData + { + JoinNumber = 142, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Select Layout by string", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Serial + }); + + + [JoinName("CurrentParticipants")] + public JoinDataComplete CurrentParticipants = new JoinDataComplete( + new JoinData + { + JoinNumber = 151, + JoinSpan = 1 + }, + new JoinMetadata() + { + Description = "Current Participants XSig", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("CurrentSource")] + public JoinDataComplete CurrentSource = new JoinDataComplete( + new JoinData + { + JoinNumber = 201, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Current Source", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("SelfviewPositionFb")] + public JoinDataComplete SelfviewPositionFb = new JoinDataComplete( + new JoinData + { + JoinNumber = 211, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "advance selfview position", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("DirectoryEntrySelectedName")] + public JoinDataComplete DirectoryEntrySelectedName = new JoinDataComplete( + new JoinData + { + JoinNumber = 356, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Selected Directory Entry Name", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("DirectoryEntrySelectedNumber")] + public JoinDataComplete DirectoryEntrySelectedNumber = new JoinDataComplete( + new JoinData + { + JoinNumber = 357, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Selected Directory Entry Number", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("DirectorySelectedFolderName")] + public JoinDataComplete DirectorySelectedFolderName = new JoinDataComplete( + new JoinData + { + JoinNumber = 358, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Selected Directory Folder Name", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + #endregion + + + public VideoCodecControllerJoinMap(uint joinStart) + : base(joinStart, typeof(VideoCodecControllerJoinMap)) + { + } + + public VideoCodecControllerJoinMap(uint joinStart, Type type) + : base(joinStart, type) + { + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/CecPortController.cs b/src/PepperDash.Essentials.Core/Comm and IR/CecPortController.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/CecPortController.cs rename to src/PepperDash.Essentials.Core/Comm and IR/CecPortController.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/ComPortController.cs b/src/PepperDash.Essentials.Core/Comm and IR/ComPortController.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/ComPortController.cs rename to src/PepperDash.Essentials.Core/Comm and IR/ComPortController.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/ComSpecJsonConverter.cs b/src/PepperDash.Essentials.Core/Comm and IR/ComSpecJsonConverter.cs similarity index 97% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/ComSpecJsonConverter.cs rename to src/PepperDash.Essentials.Core/Comm and IR/ComSpecJsonConverter.cs index fe77bf83..2f6050b6 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/ComSpecJsonConverter.cs +++ b/src/PepperDash.Essentials.Core/Comm and IR/ComSpecJsonConverter.cs @@ -1,12 +1,14 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; using Crestron.SimplSharpPro; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; using PepperDash.Core; diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/CommFactory.cs b/src/PepperDash.Essentials.Core/Comm and IR/CommFactory.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/CommFactory.cs rename to src/PepperDash.Essentials.Core/Comm and IR/CommFactory.cs index 9667b5b9..892caa92 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/CommFactory.cs +++ b/src/PepperDash.Essentials.Core/Comm and IR/CommFactory.cs @@ -1,235 +1,237 @@ -using System; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DM; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using PepperDash.Core; -using PepperDash.Essentials.Core.Config; - -namespace PepperDash.Essentials.Core -{ - /// - /// - /// - public class CommFactory - { - public static EssentialsControlPropertiesConfig GetControlPropertiesConfig(DeviceConfig deviceConfig) - { - try - { - return JsonConvert.DeserializeObject - (deviceConfig.Properties["control"].ToString()); - //Debug.Console(2, "Control TEST: {0}", JsonConvert.SerializeObject(controlConfig)); - } - catch (Exception e) - { - - Debug.Console(0, "ERROR: [{0}] Control properties deserialize failed:\r{1}", deviceConfig.Key, e); - return null; - } - } - - - /// - /// Returns a comm method of either com port, TCP, SSH, and puts this into the DeviceManager - /// - /// The Device config object - public static IBasicCommunication CreateCommForDevice(DeviceConfig deviceConfig) - { - EssentialsControlPropertiesConfig controlConfig = GetControlPropertiesConfig(deviceConfig); - if (controlConfig == null) - return null; - - IBasicCommunication comm = null; - try - { - var c = controlConfig.TcpSshProperties; - switch (controlConfig.Method) - { - case eControlMethod.Com: - comm = new ComPortController(deviceConfig.Key + "-com", GetComPort, controlConfig.ComParams, controlConfig); - break; - case eControlMethod.Cec: - comm = new CecPortController(deviceConfig.Key + "-cec", GetCecPort, controlConfig); - break; - case eControlMethod.IR: - break; - case eControlMethod.Ssh: - { - var ssh = new GenericSshClient(deviceConfig.Key + "-ssh", c.Address, c.Port, c.Username, c.Password); - ssh.AutoReconnect = c.AutoReconnect; - if(ssh.AutoReconnect) - ssh.AutoReconnectIntervalMs = c.AutoReconnectIntervalMs; - comm = ssh; - break; - } - case eControlMethod.Tcpip: - { - var tcp = new GenericTcpIpClient(deviceConfig.Key + "-tcp", c.Address, c.Port, c.BufferSize); - tcp.AutoReconnect = c.AutoReconnect; - if (tcp.AutoReconnect) - tcp.AutoReconnectIntervalMs = c.AutoReconnectIntervalMs; - comm = tcp; - break; - } - case eControlMethod.Udp: - { - var udp = new GenericUdpServer(deviceConfig.Key + "-udp", c.Address, c.Port, c.BufferSize); - comm = udp; - break; - } - case eControlMethod.Telnet: - break; - default: - break; - } - } - catch (Exception e) - { - Debug.Console(0, "Cannot create communication from JSON:\r{0}\r\rException:\r{1}", - deviceConfig.Properties.ToString(), e); - } - - // put it in the device manager if it's the right flavor - var comDev = comm as Device; - if (comDev != null) - DeviceManager.AddDevice(comDev); - return comm; - } - - public static ComPort GetComPort(EssentialsControlPropertiesConfig config) - { - var comPar = config.ComParams; - var dev = GetIComPortsDeviceFromManagedDevice(config.ControlPortDevKey); - if (dev != null && config.ControlPortNumber <= dev.NumberOfComPorts) - return dev.ComPorts[config.ControlPortNumber]; - Debug.Console(0,Debug.ErrorLogLevel.Notice, "GetComPort: Device '{0}' does not have com port {1}", config.ControlPortDevKey, config.ControlPortNumber); - return null; - } - - /// - /// Gets an ICec port from a RoutingInput or RoutingOutput on a device - /// - /// - /// - public static ICec GetCecPort(ControlPropertiesConfig config) - { - var dev = DeviceManager.GetDeviceForKey(config.ControlPortDevKey); - - if (dev != null) - { - if (!String.IsNullOrEmpty(config.ControlPortName)) - { - - var inputPort = (dev as IRoutingInputsOutputs).InputPorts[config.ControlPortName]; - - if (inputPort != null) - { - if (inputPort.Port is ICec) - return inputPort.Port as ICec; - } - - var outputPort = (dev as IRoutingInputsOutputs).OutputPorts[config.ControlPortName]; - - if (outputPort != null) - { - if (outputPort.Port is ICec) - return outputPort.Port as ICec; - } - - else - Debug.Console(0, "GetCecPort: Device '{0}' does not have a CEC port called: '{1}'", - config.ControlPortDevKey, config.ControlPortName); - } - else - { - Debug.Console(0, "GetCecPort: '{0}' - Configuration missing 'ControlPortName'", config.ControlPortDevKey); - } - } - Debug.Console(0, "GetCecPort: Device '{0}' is not a valid device.", config.ControlPortDevKey); - - return null; - } - - /// - /// Helper to grab the IComPorts device for this PortDeviceKey. Key "controlSystem" will - /// return the ControlSystem object from the Global class. - /// - /// IComPorts device or null if the device is not found or does not implement IComPorts - public static IComPorts GetIComPortsDeviceFromManagedDevice(string ComPortDevKey) - { - if ((ComPortDevKey.Equals("controlSystem", System.StringComparison.OrdinalIgnoreCase) - || ComPortDevKey.Equals("processor", System.StringComparison.OrdinalIgnoreCase)) - && Global.ControlSystem is IComPorts) - return Global.ControlSystem; - else - { - var dev = DeviceManager.GetDeviceForKey(ComPortDevKey) as IComPorts; - if (dev == null) - Debug.Console(0, "ComPortConfig: Cannot find com port device '{0}'", ComPortDevKey); - return dev; - } - } - } - - /// - /// - /// - public class EssentialsControlPropertiesConfig : - PepperDash.Core.ControlPropertiesConfig - { - - [JsonConverter(typeof(ComSpecJsonConverter))] - public ComPort.ComPortSpec ComParams { get; set; } - - public string RoomId { get; set; } - - public string CresnetId { get; set; } - - /// - /// Attempts to provide uint conversion of string CresnetId - /// - public uint CresnetIdInt - { - get - { - try - { - return Convert.ToUInt32(CresnetId, 16); - } - catch (Exception) - { - throw new FormatException(string.Format("ERROR:Unable to convert Cresnet ID: {0} to hex. Error:\n{1}", CresnetId)); - } - } - } - - public string InfinetId { get; set; } - - /// - /// Attepmts to provide uiont conversion of string InifinetId - /// - public uint InfinetIdInt - { - get - { - try - { - return Convert.ToUInt32(InfinetId, 16); - } - catch (Exception) - { - throw new FormatException(string.Format("ERROR:Unable to conver Infinet ID: {0} to hex. Error:\n{1}", InfinetId)); - } - } - } - } - - public class IrControlSpec - { - public string PortDeviceKey { get; set; } - public uint PortNumber { get; set; } - public string File { get; set; } - } +extern alias Full; + +using System; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DM; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; +using PepperDash.Core; +using PepperDash.Essentials.Core.Config; + +namespace PepperDash.Essentials.Core +{ + /// + /// + /// + public class CommFactory + { + public static EssentialsControlPropertiesConfig GetControlPropertiesConfig(DeviceConfig deviceConfig) + { + try + { + return JsonConvert.DeserializeObject + (deviceConfig.Properties["control"].ToString()); + //Debug.Console(2, "Control TEST: {0}", JsonConvert.SerializeObject(controlConfig)); + } + catch (Exception e) + { + + Debug.Console(0, "ERROR: [{0}] Control properties deserialize failed:\r{1}", deviceConfig.Key, e); + return null; + } + } + + + /// + /// Returns a comm method of either com port, TCP, SSH, and puts this into the DeviceManager + /// + /// The Device config object + public static IBasicCommunication CreateCommForDevice(DeviceConfig deviceConfig) + { + EssentialsControlPropertiesConfig controlConfig = GetControlPropertiesConfig(deviceConfig); + if (controlConfig == null) + return null; + + IBasicCommunication comm = null; + try + { + var c = controlConfig.TcpSshProperties; + switch (controlConfig.Method) + { + case eControlMethod.Com: + comm = new ComPortController(deviceConfig.Key + "-com", GetComPort, controlConfig.ComParams, controlConfig); + break; + case eControlMethod.Cec: + comm = new CecPortController(deviceConfig.Key + "-cec", GetCecPort, controlConfig); + break; + case eControlMethod.IR: + break; + case eControlMethod.Ssh: + { + var ssh = new GenericSshClient(deviceConfig.Key + "-ssh", c.Address, c.Port, c.Username, c.Password); + ssh.AutoReconnect = c.AutoReconnect; + if(ssh.AutoReconnect) + ssh.AutoReconnectIntervalMs = c.AutoReconnectIntervalMs; + comm = ssh; + break; + } + case eControlMethod.Tcpip: + { + var tcp = new GenericTcpIpClient(deviceConfig.Key + "-tcp", c.Address, c.Port, c.BufferSize); + tcp.AutoReconnect = c.AutoReconnect; + if (tcp.AutoReconnect) + tcp.AutoReconnectIntervalMs = c.AutoReconnectIntervalMs; + comm = tcp; + break; + } + case eControlMethod.Udp: + { + var udp = new GenericUdpServer(deviceConfig.Key + "-udp", c.Address, c.Port, c.BufferSize); + comm = udp; + break; + } + case eControlMethod.Telnet: + break; + default: + break; + } + } + catch (Exception e) + { + Debug.Console(0, "Cannot create communication from JSON:\r{0}\r\rException:\r{1}", + deviceConfig.Properties.ToString(), e); + } + + // put it in the device manager if it's the right flavor + var comDev = comm as Device; + if (comDev != null) + DeviceManager.AddDevice(comDev); + return comm; + } + + public static ComPort GetComPort(EssentialsControlPropertiesConfig config) + { + var comPar = config.ComParams; + var dev = GetIComPortsDeviceFromManagedDevice(config.ControlPortDevKey); + if (dev != null && config.ControlPortNumber <= dev.NumberOfComPorts) + return dev.ComPorts[config.ControlPortNumber]; + Debug.Console(0,Debug.ErrorLogLevel.Notice, "GetComPort: Device '{0}' does not have com port {1}", config.ControlPortDevKey, config.ControlPortNumber); + return null; + } + + /// + /// Gets an ICec port from a RoutingInput or RoutingOutput on a device + /// + /// + /// + public static ICec GetCecPort(ControlPropertiesConfig config) + { + var dev = DeviceManager.GetDeviceForKey(config.ControlPortDevKey); + + if (dev != null) + { + if (!String.IsNullOrEmpty(config.ControlPortName)) + { + + var inputPort = (dev as IRoutingInputsOutputs).InputPorts[config.ControlPortName]; + + if (inputPort != null) + { + if (inputPort.Port is ICec) + return inputPort.Port as ICec; + } + + var outputPort = (dev as IRoutingInputsOutputs).OutputPorts[config.ControlPortName]; + + if (outputPort != null) + { + if (outputPort.Port is ICec) + return outputPort.Port as ICec; + } + + else + Debug.Console(0, "GetCecPort: Device '{0}' does not have a CEC port called: '{1}'", + config.ControlPortDevKey, config.ControlPortName); + } + else + { + Debug.Console(0, "GetCecPort: '{0}' - Configuration missing 'ControlPortName'", config.ControlPortDevKey); + } + } + Debug.Console(0, "GetCecPort: Device '{0}' is not a valid device.", config.ControlPortDevKey); + + return null; + } + + /// + /// Helper to grab the IComPorts device for this PortDeviceKey. Key "controlSystem" will + /// return the ControlSystem object from the Global class. + /// + /// IComPorts device or null if the device is not found or does not implement IComPorts + public static IComPorts GetIComPortsDeviceFromManagedDevice(string ComPortDevKey) + { + if ((ComPortDevKey.Equals("controlSystem", System.StringComparison.OrdinalIgnoreCase) + || ComPortDevKey.Equals("processor", System.StringComparison.OrdinalIgnoreCase)) + && Global.ControlSystem is IComPorts) + return Global.ControlSystem; + else + { + var dev = DeviceManager.GetDeviceForKey(ComPortDevKey) as IComPorts; + if (dev == null) + Debug.Console(0, "ComPortConfig: Cannot find com port device '{0}'", ComPortDevKey); + return dev; + } + } + } + + /// + /// + /// + public class EssentialsControlPropertiesConfig : + PepperDash.Core.ControlPropertiesConfig + { + + [JsonConverter(typeof(ComSpecJsonConverter))] + public ComPort.ComPortSpec ComParams { get; set; } + + public string RoomId { get; set; } + + public string CresnetId { get; set; } + + /// + /// Attempts to provide uint conversion of string CresnetId + /// + public uint CresnetIdInt + { + get + { + try + { + return Convert.ToUInt32(CresnetId, 16); + } + catch (Exception) + { + throw new FormatException(string.Format("ERROR:Unable to convert Cresnet ID: {0} to hex. Error:\n{1}", CresnetId)); + } + } + } + + public string InfinetId { get; set; } + + /// + /// Attepmts to provide uiont conversion of string InifinetId + /// + public uint InfinetIdInt + { + get + { + try + { + return Convert.ToUInt32(InfinetId, 16); + } + catch (Exception) + { + throw new FormatException(string.Format("ERROR:Unable to conver Infinet ID: {0} to hex. Error:\n{1}", InfinetId)); + } + } + } + } + + public class IrControlSpec + { + public string PortDeviceKey { get; set; } + public uint PortNumber { get; set; } + public string File { get; set; } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/CommunicationExtras.cs b/src/PepperDash.Essentials.Core/Comm and IR/CommunicationExtras.cs similarity index 75% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/CommunicationExtras.cs rename to src/PepperDash.Essentials.Core/Comm and IR/CommunicationExtras.cs index 05fb3954..bc4e4302 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/CommunicationExtras.cs +++ b/src/PepperDash.Essentials.Core/Comm and IR/CommunicationExtras.cs @@ -1,12 +1,14 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; using Crestron.SimplSharpPro; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; using PepperDash.Core; diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/ConsoleCommMockDevice.cs b/src/PepperDash.Essentials.Core/Comm and IR/ConsoleCommMockDevice.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/ConsoleCommMockDevice.cs rename to src/PepperDash.Essentials.Core/Comm and IR/ConsoleCommMockDevice.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/GenericComm.cs b/src/PepperDash.Essentials.Core/Comm and IR/GenericComm.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/GenericComm.cs rename to src/PepperDash.Essentials.Core/Comm and IR/GenericComm.cs index 7648a379..8ce6a8c5 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/GenericComm.cs +++ b/src/PepperDash.Essentials.Core/Comm and IR/GenericComm.cs @@ -1,142 +1,144 @@ -using System; -using System.Collections.Generic; -using Crestron.SimplSharp.CrestronSockets; -using Crestron.SimplSharpPro.DeviceSupport; -using Newtonsoft.Json; - -using PepperDash.Core; -using PepperDash.Essentials.Core.Bridges; -using PepperDash.Essentials.Core.Devices; -using PepperDash.Essentials.Core.Config; - - -namespace PepperDash.Essentials.Core -{ - /// - /// Serves as a generic wrapper class for all styles of IBasicCommuncation ports - /// - [Description("Generic communication wrapper class for any IBasicCommunication type")] - public class GenericComm : ReconfigurableBridgableDevice - { - EssentialsControlPropertiesConfig PropertiesConfig; - - public IBasicCommunication CommPort { get; private set; } - - public GenericComm(DeviceConfig config) - : base(config) - { - - PropertiesConfig = CommFactory.GetControlPropertiesConfig(config); - - var commPort = CommFactory.CreateCommForDevice(config); - - //Fixing decision to require '-comPorts' in delcaration for DGE in order to get a device with comports included - if (commPort == null) - { - config.Key = config.Key + "-comPorts"; - commPort = CommFactory.CreateCommForDevice(config); - } - - CommPort = commPort; - - } - - public static IKeyed BuildDevice(DeviceConfig dc) - { - Debug.Console(1, "Factory Attempting to create new Generic Comm Device"); - return new GenericComm(dc); - } - - public void SetPortConfig(string portConfig) - { - // TODO: Deserialize new EssentialsControlPropertiesConfig and handle as necessary - try - { - PropertiesConfig = JsonConvert.DeserializeObject - (portConfig); - } - catch (Exception e) - { - Debug.Console(2, this, "Error deserializing port config: {0}", e); - } - } - - protected override void CustomSetConfig(DeviceConfig config) - { - PropertiesConfig = CommFactory.GetControlPropertiesConfig(config); - - ConfigWriter.UpdateDeviceConfig(config); - } - - public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - var joinMap = new IBasicCommunicationJoinMap(joinStart); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - if (bridge != null) - { - bridge.AddJoinMap(Key, joinMap); - } - else - { - Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); - } - - if (CommPort == null) - { - Debug.Console(1, this, "Unable to link device '{0}'. CommPort is null", Key); - return; - } - - Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - - // this is a permanent event handler. This cannot be -= from event - CommPort.TextReceived += (s, a) => - { - trilist.SetString(joinMap.TextReceived.JoinNumber, a.Text); - }; - trilist.SetStringSigAction(joinMap.SendText.JoinNumber, s => CommPort.SendText(s)); - trilist.SetStringSigAction(joinMap.SetPortConfig.JoinNumber, SetPortConfig); - - - var sComm = CommPort as ISocketStatus; - if (sComm == null) return; - sComm.ConnectionChange += (s, a) => - { - trilist.SetUshort(joinMap.Status.JoinNumber, (ushort)(a.Client.ClientStatus)); - trilist.SetBool(joinMap.Connected.JoinNumber, a.Client.ClientStatus == - SocketStatus.SOCKET_STATUS_CONNECTED); - }; - - trilist.SetBoolSigAction(joinMap.Connect.JoinNumber, b => - { - if (b) - { - sComm.Connect(); - } - else - { - sComm.Disconnect(); - } - }); - } - } - - public class GenericCommFactory : EssentialsDeviceFactory - { - public GenericCommFactory() - { - TypeNames = new List() { "genericComm" }; - } - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - Debug.Console(1, "Factory Attempting to create new Generic Comm Device"); - return new GenericComm(dc); - } - } +extern alias Full; + +using System; +using System.Collections.Generic; +using Crestron.SimplSharp.CrestronSockets; +using Crestron.SimplSharpPro.DeviceSupport; +using Full.Newtonsoft.Json; + +using PepperDash.Core; +using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Config; + + +namespace PepperDash.Essentials.Core +{ + /// + /// Serves as a generic wrapper class for all styles of IBasicCommuncation ports + /// + [Description("Generic communication wrapper class for any IBasicCommunication type")] + public class GenericComm : ReconfigurableBridgableDevice + { + EssentialsControlPropertiesConfig PropertiesConfig; + + public IBasicCommunication CommPort { get; private set; } + + public GenericComm(DeviceConfig config) + : base(config) + { + + PropertiesConfig = CommFactory.GetControlPropertiesConfig(config); + + var commPort = CommFactory.CreateCommForDevice(config); + + //Fixing decision to require '-comPorts' in delcaration for DGE in order to get a device with comports included + if (commPort == null) + { + config.Key = config.Key + "-comPorts"; + commPort = CommFactory.CreateCommForDevice(config); + } + + CommPort = commPort; + + } + + public static IKeyed BuildDevice(DeviceConfig dc) + { + Debug.Console(1, "Factory Attempting to create new Generic Comm Device"); + return new GenericComm(dc); + } + + public void SetPortConfig(string portConfig) + { + // TODO: Deserialize new EssentialsControlPropertiesConfig and handle as necessary + try + { + PropertiesConfig = JsonConvert.DeserializeObject + (portConfig); + } + catch (Exception e) + { + Debug.Console(2, this, "Error deserializing port config: {0}", e); + } + } + + protected override void CustomSetConfig(DeviceConfig config) + { + PropertiesConfig = CommFactory.GetControlPropertiesConfig(config); + + ConfigWriter.UpdateDeviceConfig(config); + } + + public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + var joinMap = new IBasicCommunicationJoinMap(joinStart); + + var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); + + if (bridge != null) + { + bridge.AddJoinMap(Key, joinMap); + } + else + { + Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); + } + + if (CommPort == null) + { + Debug.Console(1, this, "Unable to link device '{0}'. CommPort is null", Key); + return; + } + + Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); + + // this is a permanent event handler. This cannot be -= from event + CommPort.TextReceived += (s, a) => + { + trilist.SetString(joinMap.TextReceived.JoinNumber, a.Text); + }; + trilist.SetStringSigAction(joinMap.SendText.JoinNumber, s => CommPort.SendText(s)); + trilist.SetStringSigAction(joinMap.SetPortConfig.JoinNumber, SetPortConfig); + + + var sComm = CommPort as ISocketStatus; + if (sComm == null) return; + sComm.ConnectionChange += (s, a) => + { + trilist.SetUshort(joinMap.Status.JoinNumber, (ushort)(a.Client.ClientStatus)); + trilist.SetBool(joinMap.Connected.JoinNumber, a.Client.ClientStatus == + SocketStatus.SOCKET_STATUS_CONNECTED); + }; + + trilist.SetBoolSigAction(joinMap.Connect.JoinNumber, b => + { + if (b) + { + sComm.Connect(); + } + else + { + sComm.Disconnect(); + } + }); + } + } + + public class GenericCommFactory : EssentialsDeviceFactory + { + public GenericCommFactory() + { + TypeNames = new List() { "genericComm" }; + } + + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + Debug.Console(1, "Factory Attempting to create new Generic Comm Device"); + return new GenericComm(dc); + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/GenericHttpClient.cs b/src/PepperDash.Essentials.Core/Comm and IR/GenericHttpClient.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/GenericHttpClient.cs rename to src/PepperDash.Essentials.Core/Comm and IR/GenericHttpClient.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/IRPortHelper.cs b/src/PepperDash.Essentials.Core/Comm and IR/IRPortHelper.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/IRPortHelper.cs rename to src/PepperDash.Essentials.Core/Comm and IR/IRPortHelper.cs index c75630e4..b682af71 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/IRPortHelper.cs +++ b/src/PepperDash.Essentials.Core/Comm and IR/IRPortHelper.cs @@ -1,235 +1,237 @@ -using System; -using System.Collections.Generic; -using Crestron.SimplSharp; -using Crestron.SimplSharp.CrestronIO; -using Crestron.SimplSharpPro; - -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using PepperDash.Core; -using PepperDash.Essentials.Core.Config; - -namespace PepperDash.Essentials.Core -{ - /// - /// - /// - public static class IRPortHelper - { - public static string IrDriverPathPrefix - { - get - { - return Global.FilePathPrefix + "IR" + Global.DirectorySeparator; - } - } - - /// - /// Finds either the ControlSystem or a device controller that contains IR ports and - /// returns a port from the hardware device - /// - /// - /// IrPortConfig object. The port and or filename will be empty/null - /// if valid values don't exist on config - public static IrOutPortConfig GetIrPort(JToken propsToken) - { - var control = propsToken["control"]; - if (control == null) - return null; - if (control["method"].Value() != "ir") - { - Debug.Console(0, "IRPortHelper called with non-IR properties"); - return null; - } - - var port = new IrOutPortConfig(); - - var portDevKey = control.Value("controlPortDevKey"); - var portNum = control.Value("controlPortNumber"); - if (portDevKey == null || portNum == 0) - { - Debug.Console(1, "WARNING: Properties is missing port device or port number"); - return port; - } - - IIROutputPorts irDev = null; - if (portDevKey.Equals("controlSystem", StringComparison.OrdinalIgnoreCase) - || portDevKey.Equals("processor", StringComparison.OrdinalIgnoreCase)) - irDev = Global.ControlSystem; - else - irDev = DeviceManager.GetDeviceForKey(portDevKey) as IIROutputPorts; - - if (irDev == null) - { - Debug.Console(1, "[Config] Error, device with IR ports '{0}' not found", portDevKey); - return port; - } - - if (portNum <= irDev.NumberOfIROutputPorts) // success! - { - var file = IrDriverPathPrefix + control["irFile"].Value(); - port.Port = irDev.IROutputPorts[portNum]; - port.FileName = file; - return port; // new IrOutPortConfig { Port = irDev.IROutputPorts[portNum], FileName = file }; - } - else - { - Debug.Console(1, "[Config] Error, device '{0}' IR port {1} out of range", - portDevKey, portNum); - return port; - } - } - - public static IROutputPort GetIrOutputPort(DeviceConfig dc) - { - var irControllerKey = dc.Key + "-ir"; - if (dc.Properties == null) - { - Debug.Console(0, "[{0}] WARNING: Device config does not include properties. IR will not function.", dc.Key); - return null; - } - - var control = dc.Properties["control"]; - if (control == null) - { - Debug.Console(0, - "WARNING: Device config does not include control properties. IR will not function for {0}", dc.Key); - return null; - } - - var portDevKey = control.Value("controlPortDevKey"); - var portNum = control.Value("controlPortNumber"); - IIROutputPorts irDev = null; - - if (portDevKey == null) - { - Debug.Console(0, "WARNING: control properties is missing ir device for {0}", dc.Key); - return null; - } - - if (portNum == 0) - { - Debug.Console(0, "WARNING: control properties is missing ir port number for {0}", dc.Key); - return null; - } - - if (portDevKey.Equals("controlSystem", StringComparison.OrdinalIgnoreCase) - || portDevKey.Equals("processor", StringComparison.OrdinalIgnoreCase)) - irDev = Global.ControlSystem; - else - irDev = DeviceManager.GetDeviceForKey(portDevKey) as IIROutputPorts; - - if (irDev == null) - { - Debug.Console(0, "WARNING: device with IR ports '{0}' not found", portDevKey); - return null; - } - if (portNum > irDev.NumberOfIROutputPorts) - { - Debug.Console(0, "WARNING: device '{0}' IR port {1} out of range", - portDevKey, portNum); - return null; - } - - - var port = irDev.IROutputPorts[portNum]; - - - - return port; - } - - public static IrOutputPortController GetIrOutputPortController(DeviceConfig config) - { - Debug.Console(1, "Attempting to create new Ir Port Controller"); - - if (config == null) - { - return null; - } - - var postActivationFunc = new Func (GetIrOutputPort); - var irDevice = new IrOutputPortController(config.Key + "-ir", postActivationFunc, config); - - return irDevice; - } - - /* - /// - /// Returns a ready-to-go IrOutputPortController from a DeviceConfig object. - /// - public static IrOutputPortController GetIrOutputPortController(DeviceConfig devConf) - { - var irControllerKey = devConf.Key + "-ir"; - if (devConf.Properties == null) - { - Debug.Console(0, "[{0}] WARNING: Device config does not include properties. IR will not function.", devConf.Key); - return new IrOutputPortController(irControllerKey, null, ""); - } - - var control = devConf.Properties["control"]; - if (control == null) - { - var c = new IrOutputPortController(irControllerKey, null, ""); - Debug.Console(0, c, "WARNING: Device config does not include control properties. IR will not function"); - return c; - } - - var portDevKey = control.Value("controlPortDevKey"); - var portNum = control.Value("controlPortNumber"); - IIROutputPorts irDev = null; - - if (portDevKey == null) - { - var c = new IrOutputPortController(irControllerKey, null, ""); - Debug.Console(0, c, "WARNING: control properties is missing ir device"); - return c; - } - - if (portNum == 0) - { - var c = new IrOutputPortController(irControllerKey, null, ""); - Debug.Console(0, c, "WARNING: control properties is missing ir port number"); - return c; - } - - if (portDevKey.Equals("controlSystem", StringComparison.OrdinalIgnoreCase) - || portDevKey.Equals("processor", StringComparison.OrdinalIgnoreCase)) - irDev = Global.ControlSystem; - else - irDev = DeviceManager.GetDeviceForKey(portDevKey) as IIROutputPorts; - - if (irDev == null) - { - var c = new IrOutputPortController(irControllerKey, null, ""); - Debug.Console(0, c, "WARNING: device with IR ports '{0}' not found", portDevKey); - return c; - } - - if (portNum <= irDev.NumberOfIROutputPorts) // success! - return new IrOutputPortController(irControllerKey, irDev.IROutputPorts[portNum], - IrDriverPathPrefix + control["irFile"].Value()); - else - { - var c = new IrOutputPortController(irControllerKey, null, ""); - Debug.Console(0, c, "WARNING: device '{0}' IR port {1} out of range", - portDevKey, portNum); - return c; - } - }*/ - } - - /// - /// Wrapper to help in IR port creation - /// - public class IrOutPortConfig - { - public IROutputPort Port { get; set; } - public string FileName { get; set; } - - public IrOutPortConfig() - { - FileName = ""; - } - } +extern alias Full; + +using System; +using System.Collections.Generic; +using Crestron.SimplSharp; +using Crestron.SimplSharp.CrestronIO; +using Crestron.SimplSharpPro; + +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; +using PepperDash.Core; +using PepperDash.Essentials.Core.Config; + +namespace PepperDash.Essentials.Core +{ + /// + /// + /// + public static class IRPortHelper + { + public static string IrDriverPathPrefix + { + get + { + return Global.FilePathPrefix + "IR" + Global.DirectorySeparator; + } + } + + /// + /// Finds either the ControlSystem or a device controller that contains IR ports and + /// returns a port from the hardware device + /// + /// + /// IrPortConfig object. The port and or filename will be empty/null + /// if valid values don't exist on config + public static IrOutPortConfig GetIrPort(JToken propsToken) + { + var control = propsToken["control"]; + if (control == null) + return null; + if (control["method"].Value() != "ir") + { + Debug.Console(0, "IRPortHelper called with non-IR properties"); + return null; + } + + var port = new IrOutPortConfig(); + + var portDevKey = control.Value("controlPortDevKey"); + var portNum = control.Value("controlPortNumber"); + if (portDevKey == null || portNum == 0) + { + Debug.Console(1, "WARNING: Properties is missing port device or port number"); + return port; + } + + IIROutputPorts irDev = null; + if (portDevKey.Equals("controlSystem", StringComparison.OrdinalIgnoreCase) + || portDevKey.Equals("processor", StringComparison.OrdinalIgnoreCase)) + irDev = Global.ControlSystem; + else + irDev = DeviceManager.GetDeviceForKey(portDevKey) as IIROutputPorts; + + if (irDev == null) + { + Debug.Console(1, "[Config] Error, device with IR ports '{0}' not found", portDevKey); + return port; + } + + if (portNum <= irDev.NumberOfIROutputPorts) // success! + { + var file = IrDriverPathPrefix + control["irFile"].Value(); + port.Port = irDev.IROutputPorts[portNum]; + port.FileName = file; + return port; // new IrOutPortConfig { Port = irDev.IROutputPorts[portNum], FileName = file }; + } + else + { + Debug.Console(1, "[Config] Error, device '{0}' IR port {1} out of range", + portDevKey, portNum); + return port; + } + } + + public static IROutputPort GetIrOutputPort(DeviceConfig dc) + { + var irControllerKey = dc.Key + "-ir"; + if (dc.Properties == null) + { + Debug.Console(0, "[{0}] WARNING: Device config does not include properties. IR will not function.", dc.Key); + return null; + } + + var control = dc.Properties["control"]; + if (control == null) + { + Debug.Console(0, + "WARNING: Device config does not include control properties. IR will not function for {0}", dc.Key); + return null; + } + + var portDevKey = control.Value("controlPortDevKey"); + var portNum = control.Value("controlPortNumber"); + IIROutputPorts irDev = null; + + if (portDevKey == null) + { + Debug.Console(0, "WARNING: control properties is missing ir device for {0}", dc.Key); + return null; + } + + if (portNum == 0) + { + Debug.Console(0, "WARNING: control properties is missing ir port number for {0}", dc.Key); + return null; + } + + if (portDevKey.Equals("controlSystem", StringComparison.OrdinalIgnoreCase) + || portDevKey.Equals("processor", StringComparison.OrdinalIgnoreCase)) + irDev = Global.ControlSystem; + else + irDev = DeviceManager.GetDeviceForKey(portDevKey) as IIROutputPorts; + + if (irDev == null) + { + Debug.Console(0, "WARNING: device with IR ports '{0}' not found", portDevKey); + return null; + } + if (portNum > irDev.NumberOfIROutputPorts) + { + Debug.Console(0, "WARNING: device '{0}' IR port {1} out of range", + portDevKey, portNum); + return null; + } + + + var port = irDev.IROutputPorts[portNum]; + + + + return port; + } + + public static IrOutputPortController GetIrOutputPortController(DeviceConfig config) + { + Debug.Console(1, "Attempting to create new Ir Port Controller"); + + if (config == null) + { + return null; + } + + var postActivationFunc = new Func (GetIrOutputPort); + var irDevice = new IrOutputPortController(config.Key + "-ir", postActivationFunc, config); + + return irDevice; + } + + /* + /// + /// Returns a ready-to-go IrOutputPortController from a DeviceConfig object. + /// + public static IrOutputPortController GetIrOutputPortController(DeviceConfig devConf) + { + var irControllerKey = devConf.Key + "-ir"; + if (devConf.Properties == null) + { + Debug.Console(0, "[{0}] WARNING: Device config does not include properties. IR will not function.", devConf.Key); + return new IrOutputPortController(irControllerKey, null, ""); + } + + var control = devConf.Properties["control"]; + if (control == null) + { + var c = new IrOutputPortController(irControllerKey, null, ""); + Debug.Console(0, c, "WARNING: Device config does not include control properties. IR will not function"); + return c; + } + + var portDevKey = control.Value("controlPortDevKey"); + var portNum = control.Value("controlPortNumber"); + IIROutputPorts irDev = null; + + if (portDevKey == null) + { + var c = new IrOutputPortController(irControllerKey, null, ""); + Debug.Console(0, c, "WARNING: control properties is missing ir device"); + return c; + } + + if (portNum == 0) + { + var c = new IrOutputPortController(irControllerKey, null, ""); + Debug.Console(0, c, "WARNING: control properties is missing ir port number"); + return c; + } + + if (portDevKey.Equals("controlSystem", StringComparison.OrdinalIgnoreCase) + || portDevKey.Equals("processor", StringComparison.OrdinalIgnoreCase)) + irDev = Global.ControlSystem; + else + irDev = DeviceManager.GetDeviceForKey(portDevKey) as IIROutputPorts; + + if (irDev == null) + { + var c = new IrOutputPortController(irControllerKey, null, ""); + Debug.Console(0, c, "WARNING: device with IR ports '{0}' not found", portDevKey); + return c; + } + + if (portNum <= irDev.NumberOfIROutputPorts) // success! + return new IrOutputPortController(irControllerKey, irDev.IROutputPorts[portNum], + IrDriverPathPrefix + control["irFile"].Value()); + else + { + var c = new IrOutputPortController(irControllerKey, null, ""); + Debug.Console(0, c, "WARNING: device '{0}' IR port {1} out of range", + portDevKey, portNum); + return c; + } + }*/ + } + + /// + /// Wrapper to help in IR port creation + /// + public class IrOutPortConfig + { + public IROutputPort Port { get; set; } + public string FileName { get; set; } + + public IrOutPortConfig() + { + FileName = ""; + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/BasicConfig.cs b/src/PepperDash.Essentials.Core/Config/BasicConfig.cs similarity index 95% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/BasicConfig.cs rename to src/PepperDash.Essentials.Core/Config/BasicConfig.cs index f44f6000..728e8dff 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/BasicConfig.cs +++ b/src/PepperDash.Essentials.Core/Config/BasicConfig.cs @@ -1,8 +1,10 @@ -using System.Collections.Generic; -using System.Linq; -using Newtonsoft.Json; +extern alias Full; -using Newtonsoft.Json.Linq; +using System.Collections.Generic; +using System.Linq; +using Full.Newtonsoft.Json; + +using Full.Newtonsoft.Json.Linq; namespace PepperDash.Essentials.Core.Config { diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/ConfigPropertiesHelpers.cs b/src/PepperDash.Essentials.Core/Config/ConfigPropertiesHelpers.cs similarity index 92% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/ConfigPropertiesHelpers.cs rename to src/PepperDash.Essentials.Core/Config/ConfigPropertiesHelpers.cs index 2992a385..0d832bfa 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/ConfigPropertiesHelpers.cs +++ b/src/PepperDash.Essentials.Core/Config/ConfigPropertiesHelpers.cs @@ -1,11 +1,13 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; using PepperDash.Essentials.Core; using PepperDash.Core; -using Newtonsoft.Json.Linq; +using Full.Newtonsoft.Json.Linq; namespace PepperDash.Essentials.Core.Config { diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/DeviceConfig.cs b/src/PepperDash.Essentials.Core/Config/DeviceConfig.cs similarity index 92% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/DeviceConfig.cs rename to src/PepperDash.Essentials.Core/Config/DeviceConfig.cs index 5c1ee54c..ba21ae38 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/DeviceConfig.cs +++ b/src/PepperDash.Essentials.Core/Config/DeviceConfig.cs @@ -1,80 +1,82 @@ -using System; -using System.Collections.Generic; -using Crestron.SimplSharp; -using Crestron.SimplSharp.CrestronIO; -using Crestron.SimplSharpPro; - -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using PepperDash.Core; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Core.Config -{ - public class DeviceConfig - { - [JsonProperty("key")] - public string Key { get; set; } - - [JsonProperty("uid")] - public int Uid { get; set; } - - [JsonProperty("name")] - public string Name { get; set; } - - [JsonProperty("group")] - public string Group { get; set; } - - [JsonProperty("type")] - public string Type { get; set; } - - [JsonProperty("properties")] - [JsonConverter(typeof(DevicePropertiesConverter))] - public JToken Properties { get; set; } - - public DeviceConfig(DeviceConfig dc) - { - Key = dc.Key; - Uid = dc.Uid; - Name = dc.Name; - Group = dc.Group; - Type = dc.Type; - - Properties = JToken.Parse(dc.Properties.ToString()); - - //Properties = JToken.FromObject(dc.Properties); - } - - public DeviceConfig() {} - } - - /// - /// - /// - public class DevicePropertiesConverter : JsonConverter - { - - public override bool CanConvert(Type objectType) - { - return objectType == typeof(JToken); - } - - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - return JToken.ReadFrom(reader); - } - - public override bool CanWrite - { - get - { - return false; - } - } - - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - throw new NotImplementedException("SOD OFF HOSER"); - } - } +extern alias Full; + +using System; +using System.Collections.Generic; +using Crestron.SimplSharp; +using Crestron.SimplSharp.CrestronIO; +using Crestron.SimplSharpPro; + +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; +using PepperDash.Core; +using PepperDash.Essentials.Core; + +namespace PepperDash.Essentials.Core.Config +{ + public class DeviceConfig + { + [JsonProperty("key")] + public string Key { get; set; } + + [JsonProperty("uid")] + public int Uid { get; set; } + + [JsonProperty("name")] + public string Name { get; set; } + + [JsonProperty("group")] + public string Group { get; set; } + + [JsonProperty("type")] + public string Type { get; set; } + + [JsonProperty("properties")] + [JsonConverter(typeof(DevicePropertiesConverter))] + public JToken Properties { get; set; } + + public DeviceConfig(DeviceConfig dc) + { + Key = dc.Key; + Uid = dc.Uid; + Name = dc.Name; + Group = dc.Group; + Type = dc.Type; + + Properties = JToken.Parse(dc.Properties.ToString()); + + //Properties = JToken.FromObject(dc.Properties); + } + + public DeviceConfig() {} + } + + /// + /// + /// + public class DevicePropertiesConverter : JsonConverter + { + + public override bool CanConvert(Type objectType) + { + return objectType == typeof(JToken); + } + + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + return JToken.ReadFrom(reader); + } + + public override bool CanWrite + { + get + { + return false; + } + } + + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + throw new NotImplementedException("SOD OFF HOSER"); + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Essentials/ConfigReader.cs b/src/PepperDash.Essentials.Core/Config/Essentials/ConfigReader.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Essentials/ConfigReader.cs rename to src/PepperDash.Essentials.Core/Config/Essentials/ConfigReader.cs index e99206e8..ae90a1b1 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Essentials/ConfigReader.cs +++ b/src/PepperDash.Essentials.Core/Config/Essentials/ConfigReader.cs @@ -1,254 +1,256 @@ -using System; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharp.CrestronIO; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using PepperDash.Core; -using PepperDash.Core.Config; - -namespace PepperDash.Essentials.Core.Config -{ - /// - /// Loads the ConfigObject from the file - /// - public class ConfigReader - { - public const string LocalConfigPresent = - @" -*************************************************** -************* Using Local config file ************* -***************************************************"; - - public static EssentialsConfig ConfigObject { get; private set; } - - public static bool LoadConfig2() - { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loading unmerged system/template portal configuration file."); - try - { - // Check for local config file first - var filePath = Global.FilePathPrefix + ConfigWriter.LocalConfigFolder + Global.DirectorySeparator + Global.ConfigFileName; - - bool localConfigFound = false; - - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to load Local config file: '{0}'", filePath); - - // Check for local config directory first - - var configFiles = GetConfigFiles(filePath); - - if (configFiles != null) - { - if (configFiles.Length > 1) - { - Debug.Console(0, Debug.ErrorLogLevel.Error, - "****Error: Multiple Local Configuration files present. Please ensure only a single file exists and reset program.****"); - return false; - } - if(configFiles.Length == 1) - { - localConfigFound = true; - - } - } - else - { - Debug.Console(0, Debug.ErrorLogLevel.Notice, - "Local Configuration file not present.", filePath); - - } - - // Check for Portal Config - if(!localConfigFound) - { - filePath = Global.FilePathPrefix + Global.ConfigFileName; - - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to load Portal config file: '{0}'", filePath); - - configFiles = GetConfigFiles(filePath); - - if (configFiles != null) - { - Debug.Console(2, "{0} config files found matching pattern", configFiles.Length); - - if (configFiles.Length > 1) - { - Debug.Console(0, Debug.ErrorLogLevel.Error, - "****Error: Multiple Portal Configuration files present. Please ensure only a single file exists and reset program.****"); - return false; - } - else if (configFiles.Length == 1) - { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Found Portal config file: '{0}'", filePath); - } - else - { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "No config file found."); - return false; - } - } - else - { - Debug.Console(0, Debug.ErrorLogLevel.Error, - "ERROR: Portal Configuration file not present. Please load file and reset program."); - return false; - } - } - - // Get the actual file path - filePath = configFiles[0].FullName; - - // Generate debug statement if using a local file. - if (localConfigFound) - { - GetLocalFileMessage(filePath); - } - - // Read the file - using (StreamReader fs = new StreamReader(filePath)) - { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loading config file: '{0}'", filePath); - - if (localConfigFound) - { - ConfigObject = JObject.Parse(fs.ReadToEnd()).ToObject(); - - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Successfully Loaded Local Config"); - - return true; - } - else - { - var doubleObj = JObject.Parse(fs.ReadToEnd()); - ConfigObject = PortalConfigReader.MergeConfigs(doubleObj).ToObject(); - - // Extract SystemUrl and TemplateUrl into final config output - - if (doubleObj["system_url"] != null) - { - ConfigObject.SystemUrl = doubleObj["system_url"].Value(); - } - - if (doubleObj["template_url"] != null) - { - ConfigObject.TemplateUrl = doubleObj["template_url"].Value(); - } - } - - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Successfully Loaded Merged Config"); - - return true; - } - } - catch (Exception e) - { - Debug.Console(0, Debug.ErrorLogLevel.Error, "ERROR: Config load failed: \r{0}", e); - return false; - } - } - - /// - /// Returns all the files from the directory specified. - /// - /// - /// - public static FileInfo[] GetConfigFiles(string filePath) - { - // Get the directory - var dir = Path.GetDirectoryName(filePath); - - if (Directory.Exists(dir)) - { - Debug.Console(1, "Searching in Directory '{0}'", dir); - // Get the directory info - var dirInfo = new DirectoryInfo(dir); - - // Get the file name - var fileName = Path.GetFileName(filePath); - Debug.Console(1, "For Config Files matching: '{0}'", fileName); - - // Get the files that match from the directory - return dirInfo.GetFiles(fileName); - } - else - { - Debug.Console(0, Debug.ErrorLogLevel.Notice, - "Directory not found: ", dir); - - return null; - } - } - - /// - /// Returns the group for a given device key in config - /// - /// - /// - public static string GetGroupForDeviceKey(string key) - { - var dev = ConfigObject.Devices.FirstOrDefault(d => d.Key.Equals(key, StringComparison.OrdinalIgnoreCase)); - return dev == null ? null : dev.Group; - } - - private static void GetLocalFileMessage(string filePath) - { - var filePathLength = filePath.Length + 2; - var debugStringWidth = filePathLength + 12; - - if (debugStringWidth < 51) - { - debugStringWidth = 51; - } - var qualifier = (filePathLength % 2 != 0) - ? " Using Local Config File " - : " Using Local Config File "; - var bookend1 = (debugStringWidth - qualifier.Length) / 2; - var bookend2 = (debugStringWidth - filePathLength) / 2; - - - var newDebugString = new StringBuilder() - .Append(CrestronEnvironment.NewLine) - // Line 1 - .Append(new string('*', debugStringWidth)) - .Append(CrestronEnvironment.NewLine) - // Line 2 - .Append(new string('*', debugStringWidth)) - .Append(CrestronEnvironment.NewLine) - // Line 3 - .Append(new string('*', 2)) - .Append(new string(' ', debugStringWidth - 4)) - .Append(new string('*', 2)) - .Append(CrestronEnvironment.NewLine) - // Line 4 - .Append(new string('*', 2)) - .Append(new string(' ', bookend1 - 2)) - .Append(qualifier) - .Append(new string(' ', bookend1 - 2)) - .Append(new string('*', 2)) - .Append(CrestronEnvironment.NewLine) - // Line 5 - .Append(new string('*', 2)) - .Append(new string(' ', bookend2 - 2)) - .Append(" " + filePath + " ") - .Append(new string(' ', bookend2 - 2)) - .Append(new string('*', 2)) - .Append(CrestronEnvironment.NewLine) - // Line 6 - .Append(new string('*', 2)) - .Append(new string(' ', debugStringWidth - 4)) - .Append(new string('*', 2)) - .Append(CrestronEnvironment.NewLine) - // Line 7 - .Append(new string('*', debugStringWidth)) - .Append(CrestronEnvironment.NewLine) - // Line 8 - .Append(new string('*', debugStringWidth)); - - Debug.Console(2, Debug.ErrorLogLevel.Notice, "Found Local config file: '{0}'", filePath); - Debug.Console(0, newDebugString.ToString()); - } - - } +extern alias Full; + +using System; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharp.CrestronIO; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; +using PepperDash.Core; +using PepperDash.Core.Config; + +namespace PepperDash.Essentials.Core.Config +{ + /// + /// Loads the ConfigObject from the file + /// + public class ConfigReader + { + public const string LocalConfigPresent = + @" +*************************************************** +************* Using Local config file ************* +***************************************************"; + + public static EssentialsConfig ConfigObject { get; private set; } + + public static bool LoadConfig2() + { + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loading unmerged system/template portal configuration file."); + try + { + // Check for local config file first + var filePath = Global.FilePathPrefix + ConfigWriter.LocalConfigFolder + Global.DirectorySeparator + Global.ConfigFileName; + + bool localConfigFound = false; + + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to load Local config file: '{0}'", filePath); + + // Check for local config directory first + + var configFiles = GetConfigFiles(filePath); + + if (configFiles != null) + { + if (configFiles.Length > 1) + { + Debug.Console(0, Debug.ErrorLogLevel.Error, + "****Error: Multiple Local Configuration files present. Please ensure only a single file exists and reset program.****"); + return false; + } + if(configFiles.Length == 1) + { + localConfigFound = true; + + } + } + else + { + Debug.Console(0, Debug.ErrorLogLevel.Notice, + "Local Configuration file not present.", filePath); + + } + + // Check for Portal Config + if(!localConfigFound) + { + filePath = Global.FilePathPrefix + Global.ConfigFileName; + + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to load Portal config file: '{0}'", filePath); + + configFiles = GetConfigFiles(filePath); + + if (configFiles != null) + { + Debug.Console(2, "{0} config files found matching pattern", configFiles.Length); + + if (configFiles.Length > 1) + { + Debug.Console(0, Debug.ErrorLogLevel.Error, + "****Error: Multiple Portal Configuration files present. Please ensure only a single file exists and reset program.****"); + return false; + } + else if (configFiles.Length == 1) + { + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Found Portal config file: '{0}'", filePath); + } + else + { + Debug.Console(0, Debug.ErrorLogLevel.Notice, "No config file found."); + return false; + } + } + else + { + Debug.Console(0, Debug.ErrorLogLevel.Error, + "ERROR: Portal Configuration file not present. Please load file and reset program."); + return false; + } + } + + // Get the actual file path + filePath = configFiles[0].FullName; + + // Generate debug statement if using a local file. + if (localConfigFound) + { + GetLocalFileMessage(filePath); + } + + // Read the file + using (StreamReader fs = new StreamReader(filePath)) + { + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loading config file: '{0}'", filePath); + + if (localConfigFound) + { + ConfigObject = JObject.Parse(fs.ReadToEnd()).ToObject(); + + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Successfully Loaded Local Config"); + + return true; + } + else + { + var doubleObj = JObject.Parse(fs.ReadToEnd()); + ConfigObject = PortalConfigReader.MergeConfigs(doubleObj).ToObject(); + + // Extract SystemUrl and TemplateUrl into final config output + + if (doubleObj["system_url"] != null) + { + ConfigObject.SystemUrl = doubleObj["system_url"].Value(); + } + + if (doubleObj["template_url"] != null) + { + ConfigObject.TemplateUrl = doubleObj["template_url"].Value(); + } + } + + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Successfully Loaded Merged Config"); + + return true; + } + } + catch (Exception e) + { + Debug.Console(0, Debug.ErrorLogLevel.Error, "ERROR: Config load failed: \r{0}", e); + return false; + } + } + + /// + /// Returns all the files from the directory specified. + /// + /// + /// + public static FileInfo[] GetConfigFiles(string filePath) + { + // Get the directory + var dir = Path.GetDirectoryName(filePath); + + if (Directory.Exists(dir)) + { + Debug.Console(1, "Searching in Directory '{0}'", dir); + // Get the directory info + var dirInfo = new DirectoryInfo(dir); + + // Get the file name + var fileName = Path.GetFileName(filePath); + Debug.Console(1, "For Config Files matching: '{0}'", fileName); + + // Get the files that match from the directory + return dirInfo.GetFiles(fileName); + } + else + { + Debug.Console(0, Debug.ErrorLogLevel.Notice, + "Directory not found: ", dir); + + return null; + } + } + + /// + /// Returns the group for a given device key in config + /// + /// + /// + public static string GetGroupForDeviceKey(string key) + { + var dev = ConfigObject.Devices.FirstOrDefault(d => d.Key.Equals(key, StringComparison.OrdinalIgnoreCase)); + return dev == null ? null : dev.Group; + } + + private static void GetLocalFileMessage(string filePath) + { + var filePathLength = filePath.Length + 2; + var debugStringWidth = filePathLength + 12; + + if (debugStringWidth < 51) + { + debugStringWidth = 51; + } + var qualifier = (filePathLength % 2 != 0) + ? " Using Local Config File " + : " Using Local Config File "; + var bookend1 = (debugStringWidth - qualifier.Length) / 2; + var bookend2 = (debugStringWidth - filePathLength) / 2; + + + var newDebugString = new StringBuilder() + .Append(CrestronEnvironment.NewLine) + // Line 1 + .Append(new string('*', debugStringWidth)) + .Append(CrestronEnvironment.NewLine) + // Line 2 + .Append(new string('*', debugStringWidth)) + .Append(CrestronEnvironment.NewLine) + // Line 3 + .Append(new string('*', 2)) + .Append(new string(' ', debugStringWidth - 4)) + .Append(new string('*', 2)) + .Append(CrestronEnvironment.NewLine) + // Line 4 + .Append(new string('*', 2)) + .Append(new string(' ', bookend1 - 2)) + .Append(qualifier) + .Append(new string(' ', bookend1 - 2)) + .Append(new string('*', 2)) + .Append(CrestronEnvironment.NewLine) + // Line 5 + .Append(new string('*', 2)) + .Append(new string(' ', bookend2 - 2)) + .Append(" " + filePath + " ") + .Append(new string(' ', bookend2 - 2)) + .Append(new string('*', 2)) + .Append(CrestronEnvironment.NewLine) + // Line 6 + .Append(new string('*', 2)) + .Append(new string(' ', debugStringWidth - 4)) + .Append(new string('*', 2)) + .Append(CrestronEnvironment.NewLine) + // Line 7 + .Append(new string('*', debugStringWidth)) + .Append(CrestronEnvironment.NewLine) + // Line 8 + .Append(new string('*', debugStringWidth)); + + Debug.Console(2, Debug.ErrorLogLevel.Notice, "Found Local config file: '{0}'", filePath); + Debug.Console(0, newDebugString.ToString()); + } + + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Essentials/ConfigUpdater.cs b/src/PepperDash.Essentials.Core/Config/Essentials/ConfigUpdater.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Essentials/ConfigUpdater.cs rename to src/PepperDash.Essentials.Core/Config/Essentials/ConfigUpdater.cs index 60daaf18..71783373 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Essentials/ConfigUpdater.cs +++ b/src/PepperDash.Essentials.Core/Config/Essentials/ConfigUpdater.cs @@ -1,11 +1,13 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; using Crestron.SimplSharp.CrestronIO; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; using Crestron.SimplSharp.Net.Http; using Crestron.SimplSharpPro.Diagnostics; diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Essentials/ConfigWriter.cs b/src/PepperDash.Essentials.Core/Config/Essentials/ConfigWriter.cs similarity index 95% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Essentials/ConfigWriter.cs rename to src/PepperDash.Essentials.Core/Config/Essentials/ConfigWriter.cs index c6224859..efb17b51 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Essentials/ConfigWriter.cs +++ b/src/PepperDash.Essentials.Core/Config/Essentials/ConfigWriter.cs @@ -1,162 +1,164 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharp.CrestronIO; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using PepperDash.Core; - -namespace PepperDash.Essentials.Core.Config -{ - /// - /// Responsible for updating config at runtime, and writing the updates out to a local file - /// - public class ConfigWriter - { - public const string LocalConfigFolder = "LocalConfig"; - - public const long WriteTimeout = 30000; - - public static CTimer WriteTimer; - static CCriticalSection fileLock = new CCriticalSection(); - - /// - /// Updates the config properties of a device - /// - /// - /// - /// - public static bool UpdateDeviceProperties(string deviceKey, JToken properties) - { - bool success = false; - - // Get the current device config - var deviceConfig = ConfigReader.ConfigObject.Devices.FirstOrDefault(d => d.Key.Equals(deviceKey)); - - if (deviceConfig != null) - { - // Replace the current properties JToken with the new one passed into this method - deviceConfig.Properties = properties; - - Debug.Console(1, "Updated properties of device: '{0}'", deviceKey); - - success = true; - } - - ResetTimer(); - - return success; - } - - public static bool UpdateDeviceConfig(DeviceConfig config) - { - bool success = false; - - var deviceConfigIndex = ConfigReader.ConfigObject.Devices.FindIndex(d => d.Key.Equals(config.Key)); - - if (deviceConfigIndex >= 0) - { - ConfigReader.ConfigObject.Devices[deviceConfigIndex] = config; - - Debug.Console(1, "Updated config of device: '{0}'", config.Key); - - success = true; - } - - ResetTimer(); - - return success; - } - - public static bool UpdateRoomConfig(DeviceConfig config) - { - bool success = false; - - var roomConfigIndex = ConfigReader.ConfigObject.Rooms.FindIndex(d => d.Key.Equals(config.Key)); - - if (roomConfigIndex >= 0) - { - ConfigReader.ConfigObject.Rooms[roomConfigIndex] = config; - - Debug.Console(1, "Updated room of device: '{0}'", config.Key); - - success = true; - } - - ResetTimer(); - - return success; - } - - /// - /// Resets (or starts) the write timer - /// - static void ResetTimer() - { - if (WriteTimer == null) - WriteTimer = new CTimer(WriteConfigFile, WriteTimeout); - - WriteTimer.Reset(WriteTimeout); - - Debug.Console(1, "Config File write timer has been reset."); - } - - /// - /// Writes the current config to a file in the LocalConfig subfolder - /// - /// - private static void WriteConfigFile(object o) - { - var filePath = Global.FilePathPrefix + LocalConfigFolder + Global.DirectorySeparator + "configurationFile.json"; - - var configData = JsonConvert.SerializeObject(ConfigReader.ConfigObject); - - WriteFile(filePath, configData); - } - - /// - /// Writes - /// - /// - /// - public static void WriteFile(string filePath, string configData) - { - if (WriteTimer != null) - WriteTimer.Stop(); - - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Writing Configuration to file"); - - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to write config file: '{0}'", filePath); - - try - { - if (fileLock.TryEnter()) - { - using (StreamWriter sw = new StreamWriter(filePath)) - { - sw.Write(configData); - sw.Flush(); - } - } - else - { - Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to enter FileLock"); - } - } - catch (Exception e) - { - Debug.Console(0, Debug.ErrorLogLevel.Error, "Error: Config write failed: \r{0}", e); - } - finally - { - if (fileLock != null && !fileLock.Disposed) - fileLock.Leave(); - - } - } - - - } +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharp.CrestronIO; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; +using PepperDash.Core; + +namespace PepperDash.Essentials.Core.Config +{ + /// + /// Responsible for updating config at runtime, and writing the updates out to a local file + /// + public class ConfigWriter + { + public const string LocalConfigFolder = "LocalConfig"; + + public const long WriteTimeout = 30000; + + public static CTimer WriteTimer; + static CCriticalSection fileLock = new CCriticalSection(); + + /// + /// Updates the config properties of a device + /// + /// + /// + /// + public static bool UpdateDeviceProperties(string deviceKey, JToken properties) + { + bool success = false; + + // Get the current device config + var deviceConfig = ConfigReader.ConfigObject.Devices.FirstOrDefault(d => d.Key.Equals(deviceKey)); + + if (deviceConfig != null) + { + // Replace the current properties JToken with the new one passed into this method + deviceConfig.Properties = properties; + + Debug.Console(1, "Updated properties of device: '{0}'", deviceKey); + + success = true; + } + + ResetTimer(); + + return success; + } + + public static bool UpdateDeviceConfig(DeviceConfig config) + { + bool success = false; + + var deviceConfigIndex = ConfigReader.ConfigObject.Devices.FindIndex(d => d.Key.Equals(config.Key)); + + if (deviceConfigIndex >= 0) + { + ConfigReader.ConfigObject.Devices[deviceConfigIndex] = config; + + Debug.Console(1, "Updated config of device: '{0}'", config.Key); + + success = true; + } + + ResetTimer(); + + return success; + } + + public static bool UpdateRoomConfig(DeviceConfig config) + { + bool success = false; + + var roomConfigIndex = ConfigReader.ConfigObject.Rooms.FindIndex(d => d.Key.Equals(config.Key)); + + if (roomConfigIndex >= 0) + { + ConfigReader.ConfigObject.Rooms[roomConfigIndex] = config; + + Debug.Console(1, "Updated room of device: '{0}'", config.Key); + + success = true; + } + + ResetTimer(); + + return success; + } + + /// + /// Resets (or starts) the write timer + /// + static void ResetTimer() + { + if (WriteTimer == null) + WriteTimer = new CTimer(WriteConfigFile, WriteTimeout); + + WriteTimer.Reset(WriteTimeout); + + Debug.Console(1, "Config File write timer has been reset."); + } + + /// + /// Writes the current config to a file in the LocalConfig subfolder + /// + /// + private static void WriteConfigFile(object o) + { + var filePath = Global.FilePathPrefix + LocalConfigFolder + Global.DirectorySeparator + "configurationFile.json"; + + var configData = JsonConvert.SerializeObject(ConfigReader.ConfigObject); + + WriteFile(filePath, configData); + } + + /// + /// Writes + /// + /// + /// + public static void WriteFile(string filePath, string configData) + { + if (WriteTimer != null) + WriteTimer.Stop(); + + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Writing Configuration to file"); + + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to write config file: '{0}'", filePath); + + try + { + if (fileLock.TryEnter()) + { + using (StreamWriter sw = new StreamWriter(filePath)) + { + sw.Write(configData); + sw.Flush(); + } + } + else + { + Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to enter FileLock"); + } + } + catch (Exception e) + { + Debug.Console(0, Debug.ErrorLogLevel.Error, "Error: Config write failed: \r{0}", e); + } + finally + { + if (fileLock != null && !fileLock.Disposed) + fileLock.Leave(); + + } + } + + + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Essentials/EssentialsConfig.cs b/src/PepperDash.Essentials.Core/Config/Essentials/EssentialsConfig.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Essentials/EssentialsConfig.cs rename to src/PepperDash.Essentials.Core/Config/Essentials/EssentialsConfig.cs index 1e819414..16b1886b 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Essentials/EssentialsConfig.cs +++ b/src/PepperDash.Essentials.Core/Config/Essentials/EssentialsConfig.cs @@ -1,9 +1,11 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Text.RegularExpressions; using Crestron.SimplSharp.CrestronIO; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; using PepperDash.Core; diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/InfoConfig.cs b/src/PepperDash.Essentials.Core/Config/InfoConfig.cs similarity index 97% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/InfoConfig.cs rename to src/PepperDash.Essentials.Core/Config/InfoConfig.cs index 3191a8f6..820abde5 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/InfoConfig.cs +++ b/src/PepperDash.Essentials.Core/Config/InfoConfig.cs @@ -1,9 +1,11 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using Crestron.SimplSharp; using Crestron.SimplSharp.Reflection; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.Core.Config { diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/SourceDevicePropertiesConfigBase.cs b/src/PepperDash.Essentials.Core/Config/SourceDevicePropertiesConfigBase.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/SourceDevicePropertiesConfigBase.cs rename to src/PepperDash.Essentials.Core/Config/SourceDevicePropertiesConfigBase.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/C2nIo/C2nIoController.cs b/src/PepperDash.Essentials.Core/Crestron IO/C2nIo/C2nIoController.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/C2nIo/C2nIoController.cs rename to src/PepperDash.Essentials.Core/Crestron IO/C2nIo/C2nIoController.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/C2nRts/C2nRthsController.cs b/src/PepperDash.Essentials.Core/Crestron IO/C2nRts/C2nRthsController.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/C2nRts/C2nRthsController.cs rename to src/PepperDash.Essentials.Core/Crestron IO/C2nRts/C2nRthsController.cs index e1aa545e..b906219b 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/C2nRts/C2nRthsController.cs +++ b/src/PepperDash.Essentials.Core/Crestron IO/C2nRts/C2nRthsController.cs @@ -1,148 +1,150 @@ -using System; -using System.Collections.Generic; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.GeneralIO; -using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Essentials.Core.Bridges; -using PepperDash.Essentials.Core.Config; - - -namespace PepperDash.Essentials.Core.CrestronIO -{ - [Description("Wrapper class for the C2N-RTHS sensor")] - public class C2nRthsController : CrestronGenericBridgeableBaseDevice - { - private C2nRths _device; - - public IntFeedback TemperatureFeedback { get; private set; } - public IntFeedback HumidityFeedback { get; private set; } - - public C2nRthsController(string key, Func preActivationFunc, - DeviceConfig config) - : base(key, config.Name) - { - - AddPreActivationAction(() => - { - _device = preActivationFunc(config); - - RegisterCrestronGenericBase(_device); - - TemperatureFeedback = new IntFeedback(() => _device.TemperatureFeedback.UShortValue); - HumidityFeedback = new IntFeedback(() => _device.HumidityFeedback.UShortValue); - - if (_device != null) _device.BaseEvent += DeviceOnBaseEvent; - }); - } - - - private void DeviceOnBaseEvent(GenericBase device, BaseEventArgs args) - { - switch (args.EventId) - { - case C2nRths.TemperatureFeedbackEventId: - TemperatureFeedback.FireUpdate(); - break; - case C2nRths.HumidityFeedbackEventId: - HumidityFeedback.FireUpdate(); - break; - } - } - - public void SetTemperatureFormat(bool setToC) - { - _device.TemperatureFormat.BoolValue = setToC; - } - - public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - var joinMap = new C2nRthsControllerJoinMap(joinStart); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - if (bridge != null) - { - bridge.AddJoinMap(Key, joinMap); - } - else - { - Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); - } - - Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - - - trilist.SetBoolSigAction(joinMap.TemperatureFormat.JoinNumber, SetTemperatureFormat); - - - - IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); - TemperatureFeedback.LinkInputSig(trilist.UShortInput[joinMap.Temperature.JoinNumber]); - HumidityFeedback.LinkInputSig(trilist.UShortInput[joinMap.Humidity.JoinNumber]); - - trilist.StringInput[joinMap.Name.JoinNumber].StringValue = Name; - - trilist.OnlineStatusChange += (d, args) => - { - if (!args.DeviceOnLine) return; - - UpdateFeedbacksWhenOnline(); - - trilist.StringInput[joinMap.Name.JoinNumber].StringValue = Name; - }; - } - - private void UpdateFeedbacksWhenOnline() - { - IsOnline.FireUpdate(); - TemperatureFeedback.FireUpdate(); - HumidityFeedback.FireUpdate(); - } - - #region PreActivation - - private static C2nRths GetC2nRthsDevice(DeviceConfig dc) - { - var control = CommFactory.GetControlPropertiesConfig(dc); - var cresnetId = control.CresnetIdInt; - var branchId = control.ControlPortNumber; - var parentKey = string.IsNullOrEmpty(control.ControlPortDevKey) ? "processor" : control.ControlPortDevKey; - - if (parentKey.Equals("processor", StringComparison.CurrentCultureIgnoreCase)) - { - Debug.Console(0, "Device {0} is a valid cresnet master - creating new C2nRths", parentKey); - return new C2nRths(cresnetId, Global.ControlSystem); - } - var cresnetBridge = DeviceManager.GetDeviceForKey(parentKey) as IHasCresnetBranches; - - if (cresnetBridge != null) - { - Debug.Console(0, "Device {0} is a valid cresnet master - creating new C2nRths", parentKey); - return new C2nRths(cresnetId, cresnetBridge.CresnetBranches[branchId]); - } - Debug.Console(0, "Device {0} is not a valid cresnet master", parentKey); - return null; - } - #endregion - - public class C2nRthsControllerFactory : EssentialsDeviceFactory - { - public C2nRthsControllerFactory() - { - TypeNames = new List() { "c2nrths" }; - } - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - Debug.Console(1, "Factory Attempting to create new C2N-RTHS Device"); - - return new C2nRthsController(dc.Key, GetC2nRthsDevice, dc); - } - } - } +extern alias Full; + +using System; +using System.Collections.Generic; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.GeneralIO; +using Full.Newtonsoft.Json; +using PepperDash.Core; +using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Config; + + +namespace PepperDash.Essentials.Core.CrestronIO +{ + [Description("Wrapper class for the C2N-RTHS sensor")] + public class C2nRthsController : CrestronGenericBridgeableBaseDevice + { + private C2nRths _device; + + public IntFeedback TemperatureFeedback { get; private set; } + public IntFeedback HumidityFeedback { get; private set; } + + public C2nRthsController(string key, Func preActivationFunc, + DeviceConfig config) + : base(key, config.Name) + { + + AddPreActivationAction(() => + { + _device = preActivationFunc(config); + + RegisterCrestronGenericBase(_device); + + TemperatureFeedback = new IntFeedback(() => _device.TemperatureFeedback.UShortValue); + HumidityFeedback = new IntFeedback(() => _device.HumidityFeedback.UShortValue); + + if (_device != null) _device.BaseEvent += DeviceOnBaseEvent; + }); + } + + + private void DeviceOnBaseEvent(GenericBase device, BaseEventArgs args) + { + switch (args.EventId) + { + case C2nRths.TemperatureFeedbackEventId: + TemperatureFeedback.FireUpdate(); + break; + case C2nRths.HumidityFeedbackEventId: + HumidityFeedback.FireUpdate(); + break; + } + } + + public void SetTemperatureFormat(bool setToC) + { + _device.TemperatureFormat.BoolValue = setToC; + } + + public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + var joinMap = new C2nRthsControllerJoinMap(joinStart); + + var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); + + if (bridge != null) + { + bridge.AddJoinMap(Key, joinMap); + } + else + { + Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); + } + + Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); + + + trilist.SetBoolSigAction(joinMap.TemperatureFormat.JoinNumber, SetTemperatureFormat); + + + + IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); + TemperatureFeedback.LinkInputSig(trilist.UShortInput[joinMap.Temperature.JoinNumber]); + HumidityFeedback.LinkInputSig(trilist.UShortInput[joinMap.Humidity.JoinNumber]); + + trilist.StringInput[joinMap.Name.JoinNumber].StringValue = Name; + + trilist.OnlineStatusChange += (d, args) => + { + if (!args.DeviceOnLine) return; + + UpdateFeedbacksWhenOnline(); + + trilist.StringInput[joinMap.Name.JoinNumber].StringValue = Name; + }; + } + + private void UpdateFeedbacksWhenOnline() + { + IsOnline.FireUpdate(); + TemperatureFeedback.FireUpdate(); + HumidityFeedback.FireUpdate(); + } + + #region PreActivation + + private static C2nRths GetC2nRthsDevice(DeviceConfig dc) + { + var control = CommFactory.GetControlPropertiesConfig(dc); + var cresnetId = control.CresnetIdInt; + var branchId = control.ControlPortNumber; + var parentKey = string.IsNullOrEmpty(control.ControlPortDevKey) ? "processor" : control.ControlPortDevKey; + + if (parentKey.Equals("processor", StringComparison.CurrentCultureIgnoreCase)) + { + Debug.Console(0, "Device {0} is a valid cresnet master - creating new C2nRths", parentKey); + return new C2nRths(cresnetId, Global.ControlSystem); + } + var cresnetBridge = DeviceManager.GetDeviceForKey(parentKey) as IHasCresnetBranches; + + if (cresnetBridge != null) + { + Debug.Console(0, "Device {0} is a valid cresnet master - creating new C2nRths", parentKey); + return new C2nRths(cresnetId, cresnetBridge.CresnetBranches[branchId]); + } + Debug.Console(0, "Device {0} is not a valid cresnet master", parentKey); + return null; + } + #endregion + + public class C2nRthsControllerFactory : EssentialsDeviceFactory + { + public C2nRthsControllerFactory() + { + TypeNames = new List() { "c2nrths" }; + } + + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + Debug.Console(1, "Factory Attempting to create new C2N-RTHS Device"); + + return new C2nRthsController(dc.Key, GetC2nRthsDevice, dc); + } + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Cards/C3CardControllerBase.cs b/src/PepperDash.Essentials.Core/Crestron IO/Cards/C3CardControllerBase.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Cards/C3CardControllerBase.cs rename to src/PepperDash.Essentials.Core/Crestron IO/Cards/C3CardControllerBase.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Cards/C3Com3Controller.cs b/src/PepperDash.Essentials.Core/Crestron IO/Cards/C3Com3Controller.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Cards/C3Com3Controller.cs rename to src/PepperDash.Essentials.Core/Crestron IO/Cards/C3Com3Controller.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Cards/C3Io16Controller.cs b/src/PepperDash.Essentials.Core/Crestron IO/Cards/C3Io16Controller.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Cards/C3Io16Controller.cs rename to src/PepperDash.Essentials.Core/Crestron IO/Cards/C3Io16Controller.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Cards/C3Ir8Controller.cs b/src/PepperDash.Essentials.Core/Crestron IO/Cards/C3Ir8Controller.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Cards/C3Ir8Controller.cs rename to src/PepperDash.Essentials.Core/Crestron IO/Cards/C3Ir8Controller.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Cards/C3Ry16Controller.cs b/src/PepperDash.Essentials.Core/Crestron IO/Cards/C3Ry16Controller.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Cards/C3Ry16Controller.cs rename to src/PepperDash.Essentials.Core/Crestron IO/Cards/C3Ry16Controller.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Cards/C3Ry8Controller.cs b/src/PepperDash.Essentials.Core/Crestron IO/Cards/C3Ry8Controller.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Cards/C3Ry8Controller.cs rename to src/PepperDash.Essentials.Core/Crestron IO/Cards/C3Ry8Controller.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Cards/CenCi31Controller.cs b/src/PepperDash.Essentials.Core/Crestron IO/Cards/CenCi31Controller.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Cards/CenCi31Controller.cs rename to src/PepperDash.Essentials.Core/Crestron IO/Cards/CenCi31Controller.cs index a6daa591..7e29e0e0 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Cards/CenCi31Controller.cs +++ b/src/PepperDash.Essentials.Core/Crestron IO/Cards/CenCi31Controller.cs @@ -1,7 +1,9 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using Crestron.SimplSharpPro.ThreeSeriesCards; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; using PepperDash.Core; using PepperDash.Essentials.Core.Config; diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Cards/CenCi33Controller.cs b/src/PepperDash.Essentials.Core/Crestron IO/Cards/CenCi33Controller.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Cards/CenCi33Controller.cs rename to src/PepperDash.Essentials.Core/Crestron IO/Cards/CenCi33Controller.cs index 3b054c00..d1eb0166 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Cards/CenCi33Controller.cs +++ b/src/PepperDash.Essentials.Core/Crestron IO/Cards/CenCi33Controller.cs @@ -1,7 +1,9 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using Crestron.SimplSharpPro.ThreeSeriesCards; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; using PepperDash.Core; using PepperDash.Essentials.Core.Config; diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Cards/InternalCardCageController.cs b/src/PepperDash.Essentials.Core/Crestron IO/Cards/InternalCardCageController.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Cards/InternalCardCageController.cs rename to src/PepperDash.Essentials.Core/Crestron IO/Cards/InternalCardCageController.cs index 964edd5c..97286945 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Cards/InternalCardCageController.cs +++ b/src/PepperDash.Essentials.Core/Crestron IO/Cards/InternalCardCageController.cs @@ -1,7 +1,9 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using Crestron.SimplSharpPro.ThreeSeriesCards; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; using PepperDash.Core; using PepperDash.Essentials.Core.Config; diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/DinCenCn/DinCenCnController.cs b/src/PepperDash.Essentials.Core/Crestron IO/DinCenCn/DinCenCnController.cs similarity index 97% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/DinCenCn/DinCenCnController.cs rename to src/PepperDash.Essentials.Core/Crestron IO/DinCenCn/DinCenCnController.cs index 7e9179fe..414b5432 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/DinCenCn/DinCenCnController.cs +++ b/src/PepperDash.Essentials.Core/Crestron IO/DinCenCn/DinCenCnController.cs @@ -1,51 +1,51 @@ -using System.Collections.Generic; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.GeneralIO; -using PepperDash.Core; -using PepperDash.Essentials.Core.Config; - - -namespace PepperDash.Essentials.Core -{ - public class DinCenCn2Controller : CrestronGenericBaseDevice, IHasCresnetBranches - { - private readonly DinCenCn2 _device; - - public CrestronCollection CresnetBranches - { - get { - return _device != null ? _device.Branches : null; - } - } - - public DinCenCn2Controller(string key, string name, DinCenCn2 device, DeviceConfig config) - : base(key, name, device) - { - _device = device; - } - - public class DinCenCn2ControllerFactory : EssentialsDeviceFactory - { - public DinCenCn2ControllerFactory() - { - TypeNames = new List() { "dincencn2", "dincencn2poe", "din-cencn2", "din-cencn2-poe" }; - } - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - Debug.Console(1, "Factory Attempting to create new DIN-CEN-CN2 Device"); - - var control = CommFactory.GetControlPropertiesConfig(dc); - var ipid = control.IpIdInt; - - if (dc.Type.ToLower().Contains("poe")) - { - return new DinCenCn2Controller(dc.Key, dc.Name, new DinCenCn2Poe(ipid, Global.ControlSystem), dc); - } - - return new DinCenCn2Controller(dc.Key, dc.Name, new DinCenCn2(ipid, Global.ControlSystem), dc); - } - } - } +using System.Collections.Generic; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.GeneralIO; +using PepperDash.Core; +using PepperDash.Essentials.Core.Config; + + +namespace PepperDash.Essentials.Core +{ + public class DinCenCn2Controller : CrestronGenericBaseDevice, IHasCresnetBranches + { + private readonly DinCenCn2 _device; + + public CrestronCollection CresnetBranches + { + get { + return _device != null ? _device.Branches : null; + } + } + + public DinCenCn2Controller(string key, string name, DinCenCn2 device, DeviceConfig config) + : base(key, name, device) + { + _device = device; + } + + public class DinCenCn2ControllerFactory : EssentialsDeviceFactory + { + public DinCenCn2ControllerFactory() + { + TypeNames = new List() { "dincencn2", "dincencn2poe", "din-cencn2", "din-cencn2-poe" }; + } + + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + Debug.Console(1, "Factory Attempting to create new DIN-CEN-CN2 Device"); + + var control = CommFactory.GetControlPropertiesConfig(dc); + var ipid = control.IpIdInt; + + if (dc.Type.ToLower().Contains("poe")) + { + return new DinCenCn2Controller(dc.Key, dc.Name, new DinCenCn2Poe(ipid, Global.ControlSystem), dc); + } + + return new DinCenCn2Controller(dc.Key, dc.Name, new DinCenCn2(ipid, Global.ControlSystem), dc); + } + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/DinCenCn/IHasCresnetBranches.cs b/src/PepperDash.Essentials.Core/Crestron IO/DinCenCn/IHasCresnetBranches.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/DinCenCn/IHasCresnetBranches.cs rename to src/PepperDash.Essentials.Core/Crestron IO/DinCenCn/IHasCresnetBranches.cs index 11e1b707..a13aca1a 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/DinCenCn/IHasCresnetBranches.cs +++ b/src/PepperDash.Essentials.Core/Crestron IO/DinCenCn/IHasCresnetBranches.cs @@ -1,15 +1,15 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; - -namespace PepperDash.Essentials.Core -{ - public interface IHasCresnetBranches - { - CrestronCollection CresnetBranches { get; } - } +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DeviceSupport; + +namespace PepperDash.Essentials.Core +{ + public interface IHasCresnetBranches + { + CrestronCollection CresnetBranches { get; } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/DinIo8/DinIo8Controller.cs b/src/PepperDash.Essentials.Core/Crestron IO/DinIo8/DinIo8Controller.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/DinIo8/DinIo8Controller.cs rename to src/PepperDash.Essentials.Core/Crestron IO/DinIo8/DinIo8Controller.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/IOPortConfig.cs b/src/PepperDash.Essentials.Core/Crestron IO/IOPortConfig.cs similarity index 89% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/IOPortConfig.cs rename to src/PepperDash.Essentials.Core/Crestron IO/IOPortConfig.cs index 5fbe10e1..13d35fb5 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/IOPortConfig.cs +++ b/src/PepperDash.Essentials.Core/Crestron IO/IOPortConfig.cs @@ -1,9 +1,11 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.Core.CrestronIO { diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/CenIoDigIn104Controller.cs b/src/PepperDash.Essentials.Core/Crestron IO/Inputs/CenIoDigIn104Controller.cs similarity index 99% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/CenIoDigIn104Controller.cs rename to src/PepperDash.Essentials.Core/Crestron IO/Inputs/CenIoDigIn104Controller.cs index bdbcc2e9..50647126 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/CenIoDigIn104Controller.cs +++ b/src/PepperDash.Essentials.Core/Crestron IO/Inputs/CenIoDigIn104Controller.cs @@ -52,16 +52,16 @@ namespace PepperDash.Essentials.Core { Debug.Console(1, "Factory Attempting to create new CEN-DIGIN-104 Device"); - var control = CommFactory.GetControlPropertiesConfig(dc); - if (control == null) - { - Debug.Console(1, "Factory failed to create a new CEN-DIGIN-104 Device, control properties not found"); - return null; + var control = CommFactory.GetControlPropertiesConfig(dc); + if (control == null) + { + Debug.Console(1, "Factory failed to create a new CEN-DIGIN-104 Device, control properties not found"); + return null; } - var ipid = control.IpIdInt; - if (ipid != 0) return new CenIoDigIn104Controller(dc.Key, dc.Name, new CenIoDi104(ipid, Global.ControlSystem)); - - Debug.Console(1, "Factory failed to create a new CEN-IO-IR-104 Device using IP-ID-{0}", ipid); + var ipid = control.IpIdInt; + if (ipid != 0) return new CenIoDigIn104Controller(dc.Key, dc.Name, new CenIoDi104(ipid, Global.ControlSystem)); + + Debug.Console(1, "Factory failed to create a new CEN-IO-IR-104 Device using IP-ID-{0}", ipid); return null; } } diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/GenericDigitalInputDevice.cs b/src/PepperDash.Essentials.Core/Crestron IO/Inputs/GenericDigitalInputDevice.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/GenericDigitalInputDevice.cs rename to src/PepperDash.Essentials.Core/Crestron IO/Inputs/GenericDigitalInputDevice.cs index db905bfa..589e4fe5 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/GenericDigitalInputDevice.cs +++ b/src/PepperDash.Essentials.Core/Crestron IO/Inputs/GenericDigitalInputDevice.cs @@ -1,165 +1,167 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; -using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Essentials.Core.Bridges; -using PepperDash.Essentials.Core.Config; - - -namespace PepperDash.Essentials.Core.CrestronIO -{ - [Description("Wrapper class for Digital Input")] - public class GenericDigitalInputDevice : EssentialsBridgeableDevice, IDigitalInput - { - public DigitalInput InputPort { get; private set; } - - public BoolFeedback InputStateFeedback { get; private set; } - - Func InputStateFeedbackFunc - { - get - { - return () => InputPort.State; - } - } - - - public GenericDigitalInputDevice(string key, string name, Func postActivationFunc, - IOPortConfig config) - : base(key, name) - { - InputStateFeedback = new BoolFeedback(InputStateFeedbackFunc); - - AddPostActivationAction(() => - { - InputPort = postActivationFunc(config); - - InputPort.Register(); - - InputPort.StateChange += InputPort_StateChange; - - }); - } - - #region Events - - void InputPort_StateChange(DigitalInput digitalInput, DigitalInputEventArgs args) - { - InputStateFeedback.FireUpdate(); - } - - #endregion - - #region PreActivate - - private static DigitalInput GetDigitalInput(IOPortConfig dc) - { - IDigitalInputPorts ioPortDevice; - - if (dc.PortDeviceKey.Equals("processor")) - { - if (!Global.ControlSystem.SupportsDigitalInput) - { - Debug.Console(0, "GetDigitalInput: Processor does not support Digital Inputs"); - return null; - } - ioPortDevice = Global.ControlSystem; - } - else - { - var ioPortDev = DeviceManager.GetDeviceForKey(dc.PortDeviceKey) as IDigitalInputPorts; - if (ioPortDev == null) - { - Debug.Console(0, "GetDigitalInput: Device {0} is not a valid device", dc.PortDeviceKey); - return null; - } - ioPortDevice = ioPortDev; - } - if (ioPortDevice == null) - { - Debug.Console(0, "GetDigitalInput: Device '0' is not a valid IDigitalInputPorts Device", dc.PortDeviceKey); - return null; - } - - if (dc.PortNumber > ioPortDevice.NumberOfDigitalInputPorts) - { - Debug.Console(0, "GetDigitalInput: Device {0} does not contain a port {1}", dc.PortDeviceKey, dc.PortNumber); - } - - return ioPortDevice.DigitalInputPorts[dc.PortNumber]; - - - } - - #endregion - - #region Bridge Linking - - public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - var joinMap = new IDigitalInputJoinMap(joinStart); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - if (bridge != null) - { - bridge.AddJoinMap(Key, joinMap); - } - else - { - Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); - } - - try - { - Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - - // Link feedback for input state - InputStateFeedback.LinkInputSig(trilist.BooleanInput[joinMap.InputState.JoinNumber]); - } - catch (Exception e) - { - Debug.Console(1, this, "Unable to link device '{0}'. Input is null", Key); - Debug.Console(1, this, "Error: {0}", e); - } - } - - #endregion - - #region Factory - - public class GenericDigitalInputDeviceFactory : EssentialsDeviceFactory - { - public GenericDigitalInputDeviceFactory() - { - TypeNames = new List() { "digitalinput" }; - } - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - Debug.Console(1, "Factory Attempting to create new Generic Digital Input Device"); - - var props = JsonConvert.DeserializeObject(dc.Properties.ToString()); - - if (props == null) return null; - - var portDevice = new GenericDigitalInputDevice(dc.Key, dc.Name, GetDigitalInput, props); - - return portDevice; - } - } - - #endregion - - } - - +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DeviceSupport; +using Full.Newtonsoft.Json; +using PepperDash.Core; +using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Config; + + +namespace PepperDash.Essentials.Core.CrestronIO +{ + [Description("Wrapper class for Digital Input")] + public class GenericDigitalInputDevice : EssentialsBridgeableDevice, IDigitalInput + { + public DigitalInput InputPort { get; private set; } + + public BoolFeedback InputStateFeedback { get; private set; } + + Func InputStateFeedbackFunc + { + get + { + return () => InputPort.State; + } + } + + + public GenericDigitalInputDevice(string key, string name, Func postActivationFunc, + IOPortConfig config) + : base(key, name) + { + InputStateFeedback = new BoolFeedback(InputStateFeedbackFunc); + + AddPostActivationAction(() => + { + InputPort = postActivationFunc(config); + + InputPort.Register(); + + InputPort.StateChange += InputPort_StateChange; + + }); + } + + #region Events + + void InputPort_StateChange(DigitalInput digitalInput, DigitalInputEventArgs args) + { + InputStateFeedback.FireUpdate(); + } + + #endregion + + #region PreActivate + + private static DigitalInput GetDigitalInput(IOPortConfig dc) + { + IDigitalInputPorts ioPortDevice; + + if (dc.PortDeviceKey.Equals("processor")) + { + if (!Global.ControlSystem.SupportsDigitalInput) + { + Debug.Console(0, "GetDigitalInput: Processor does not support Digital Inputs"); + return null; + } + ioPortDevice = Global.ControlSystem; + } + else + { + var ioPortDev = DeviceManager.GetDeviceForKey(dc.PortDeviceKey) as IDigitalInputPorts; + if (ioPortDev == null) + { + Debug.Console(0, "GetDigitalInput: Device {0} is not a valid device", dc.PortDeviceKey); + return null; + } + ioPortDevice = ioPortDev; + } + if (ioPortDevice == null) + { + Debug.Console(0, "GetDigitalInput: Device '0' is not a valid IDigitalInputPorts Device", dc.PortDeviceKey); + return null; + } + + if (dc.PortNumber > ioPortDevice.NumberOfDigitalInputPorts) + { + Debug.Console(0, "GetDigitalInput: Device {0} does not contain a port {1}", dc.PortDeviceKey, dc.PortNumber); + } + + return ioPortDevice.DigitalInputPorts[dc.PortNumber]; + + + } + + #endregion + + #region Bridge Linking + + public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + var joinMap = new IDigitalInputJoinMap(joinStart); + + var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); + + if (bridge != null) + { + bridge.AddJoinMap(Key, joinMap); + } + else + { + Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); + } + + try + { + Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); + + // Link feedback for input state + InputStateFeedback.LinkInputSig(trilist.BooleanInput[joinMap.InputState.JoinNumber]); + } + catch (Exception e) + { + Debug.Console(1, this, "Unable to link device '{0}'. Input is null", Key); + Debug.Console(1, this, "Error: {0}", e); + } + } + + #endregion + + #region Factory + + public class GenericDigitalInputDeviceFactory : EssentialsDeviceFactory + { + public GenericDigitalInputDeviceFactory() + { + TypeNames = new List() { "digitalinput" }; + } + + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + Debug.Console(1, "Factory Attempting to create new Generic Digital Input Device"); + + var props = JsonConvert.DeserializeObject(dc.Properties.ToString()); + + if (props == null) return null; + + var portDevice = new GenericDigitalInputDevice(dc.Key, dc.Name, GetDigitalInput, props); + + return portDevice; + } + } + + #endregion + + } + + } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/GenericVersiportAnalogInputDevice.cs b/src/PepperDash.Essentials.Core/Crestron IO/Inputs/GenericVersiportAnalogInputDevice.cs similarity index 99% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/GenericVersiportAnalogInputDevice.cs rename to src/PepperDash.Essentials.Core/Crestron IO/Inputs/GenericVersiportAnalogInputDevice.cs index 70be2f6f..5da79bbf 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/GenericVersiportAnalogInputDevice.cs +++ b/src/PepperDash.Essentials.Core/Crestron IO/Inputs/GenericVersiportAnalogInputDevice.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -11,7 +13,7 @@ using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.Bridges; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.Core.CrestronIO { diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/GenericVersiportInputDevice.cs b/src/PepperDash.Essentials.Core/Crestron IO/Inputs/GenericVersiportInputDevice.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/GenericVersiportInputDevice.cs rename to src/PepperDash.Essentials.Core/Crestron IO/Inputs/GenericVersiportInputDevice.cs index 20acdd4d..fd215545 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/GenericVersiportInputDevice.cs +++ b/src/PepperDash.Essentials.Core/Crestron IO/Inputs/GenericVersiportInputDevice.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -11,7 +13,7 @@ using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.Bridges; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.Core.CrestronIO { diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/IAnalogInput.cs b/src/PepperDash.Essentials.Core/Crestron IO/Inputs/IAnalogInput.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/IAnalogInput.cs rename to src/PepperDash.Essentials.Core/Crestron IO/Inputs/IAnalogInput.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/IDigitalInput.cs b/src/PepperDash.Essentials.Core/Crestron IO/Inputs/IDigitalInput.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/IDigitalInput.cs rename to src/PepperDash.Essentials.Core/Crestron IO/Inputs/IDigitalInput.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Ir/CenIoIr104Controller.cs b/src/PepperDash.Essentials.Core/Crestron IO/Ir/CenIoIr104Controller.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Ir/CenIoIr104Controller.cs rename to src/PepperDash.Essentials.Core/Crestron IO/Ir/CenIoIr104Controller.cs index 3fa45dd7..d994a11c 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Ir/CenIoIr104Controller.cs +++ b/src/PepperDash.Essentials.Core/Crestron IO/Ir/CenIoIr104Controller.cs @@ -1,93 +1,93 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.GeneralIO; -using PepperDash.Essentials.Core.Config; - - -using PepperDash.Core; - -namespace PepperDash.Essentials.Core -{ - /// - /// Wrapper class for CEN-IO-IR-104 module - /// - [Description("Wrapper class for the CEN-IO-IR-104 module")] - public class CenIoIr104Controller : CrestronGenericBaseDevice, IIROutputPorts - { - private readonly CenIoIr104 _ir104; - - /// - /// Constructor - /// - /// - /// - /// - public CenIoIr104Controller(string key, string name, CenIoIr104 ir104) - : base(key, name, ir104) - { - _ir104 = ir104; - } - - #region IDigitalInputPorts Members - - /// - /// IR port collection - /// - public CrestronCollection IROutputPorts - { - get { return _ir104.IROutputPorts; } - } - - /// - /// Number of relay ports property - /// - public int NumberOfIROutputPorts - { - get { return _ir104.NumberOfIROutputPorts; } - } - - #endregion - } - - /// - /// CEN-IO-IR-104 controller fatory - /// - public class CenIoIr104ControllerFactory : EssentialsDeviceFactory - { - /// - /// Constructor - /// - public CenIoIr104ControllerFactory() - { - TypeNames = new List() { "cenioir104" }; - } - - /// - /// Build device CEN-IO-IR-104 - /// - /// - /// - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - Debug.Console(1, "Factory Attempting to create new CEN-IO-IR-104 Device"); - - var control = CommFactory.GetControlPropertiesConfig(dc); - if (control == null) - { - Debug.Console(1, "Factory failed to create a new CEN-IO-IR-104 Device, control properties not found"); - return null; - } - - var ipid = control.IpIdInt; - if(ipid != 0) return new CenIoIr104Controller(dc.Key, dc.Name, new CenIoIr104(ipid, Global.ControlSystem)); - - Debug.Console(1, "Factory failed to create a new CEN-IO-IR-104 Device using IP-ID-{0}", ipid); - return null; - } - } - +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.GeneralIO; +using PepperDash.Essentials.Core.Config; + + +using PepperDash.Core; + +namespace PepperDash.Essentials.Core +{ + /// + /// Wrapper class for CEN-IO-IR-104 module + /// + [Description("Wrapper class for the CEN-IO-IR-104 module")] + public class CenIoIr104Controller : CrestronGenericBaseDevice, IIROutputPorts + { + private readonly CenIoIr104 _ir104; + + /// + /// Constructor + /// + /// + /// + /// + public CenIoIr104Controller(string key, string name, CenIoIr104 ir104) + : base(key, name, ir104) + { + _ir104 = ir104; + } + + #region IDigitalInputPorts Members + + /// + /// IR port collection + /// + public CrestronCollection IROutputPorts + { + get { return _ir104.IROutputPorts; } + } + + /// + /// Number of relay ports property + /// + public int NumberOfIROutputPorts + { + get { return _ir104.NumberOfIROutputPorts; } + } + + #endregion + } + + /// + /// CEN-IO-IR-104 controller fatory + /// + public class CenIoIr104ControllerFactory : EssentialsDeviceFactory + { + /// + /// Constructor + /// + public CenIoIr104ControllerFactory() + { + TypeNames = new List() { "cenioir104" }; + } + + /// + /// Build device CEN-IO-IR-104 + /// + /// + /// + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + Debug.Console(1, "Factory Attempting to create new CEN-IO-IR-104 Device"); + + var control = CommFactory.GetControlPropertiesConfig(dc); + if (control == null) + { + Debug.Console(1, "Factory failed to create a new CEN-IO-IR-104 Device, control properties not found"); + return null; + } + + var ipid = control.IpIdInt; + if(ipid != 0) return new CenIoIr104Controller(dc.Key, dc.Name, new CenIoIr104(ipid, Global.ControlSystem)); + + Debug.Console(1, "Factory failed to create a new CEN-IO-IR-104 Device using IP-ID-{0}", ipid); + return null; + } + } + } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Outputs/GenericVersiportOutputDevice.cs b/src/PepperDash.Essentials.Core/Crestron IO/Outputs/GenericVersiportOutputDevice.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Outputs/GenericVersiportOutputDevice.cs rename to src/PepperDash.Essentials.Core/Crestron IO/Outputs/GenericVersiportOutputDevice.cs index 2d1ae9c4..2b3d0fab 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Outputs/GenericVersiportOutputDevice.cs +++ b/src/PepperDash.Essentials.Core/Crestron IO/Outputs/GenericVersiportOutputDevice.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -11,7 +13,7 @@ using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.Bridges; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.Core.CrestronIO { diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Outputs/IDigitalOutput.cs b/src/PepperDash.Essentials.Core/Crestron IO/Outputs/IDigitalOutput.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Outputs/IDigitalOutput.cs rename to src/PepperDash.Essentials.Core/Crestron IO/Outputs/IDigitalOutput.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Relay/CenIoRy104Controller.cs b/src/PepperDash.Essentials.Core/Crestron IO/Relay/CenIoRy104Controller.cs similarity index 99% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Relay/CenIoRy104Controller.cs rename to src/PepperDash.Essentials.Core/Crestron IO/Relay/CenIoRy104Controller.cs index e9963f4d..ba13ede8 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Relay/CenIoRy104Controller.cs +++ b/src/PepperDash.Essentials.Core/Crestron IO/Relay/CenIoRy104Controller.cs @@ -62,7 +62,7 @@ namespace PepperDash.Essentials.Core var controlPropertiesConfig = CommFactory.GetControlPropertiesConfig(dc); if (controlPropertiesConfig == null) - { + { Debug.Console(1, "Factory failed to create a new CEN-IO-RY-104 Device, control properties not found"); return null; } diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Relay/GenericRelayDevice.cs b/src/PepperDash.Essentials.Core/Crestron IO/Relay/GenericRelayDevice.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Relay/GenericRelayDevice.cs rename to src/PepperDash.Essentials.Core/Crestron IO/Relay/GenericRelayDevice.cs index 69c588ae..44ddef63 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Relay/GenericRelayDevice.cs +++ b/src/PepperDash.Essentials.Core/Crestron IO/Relay/GenericRelayDevice.cs @@ -1,221 +1,223 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; -using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Essentials.Core.Bridges; -using PepperDash.Essentials.Core.Config; - -namespace PepperDash.Essentials.Core.CrestronIO -{ - /// - /// Represents a generic device controlled by relays - /// - [Description("Wrapper class for a Relay")] - public class GenericRelayDevice : EssentialsBridgeableDevice, ISwitchedOutput - { - public Relay RelayOutput { get; private set; } - - public BoolFeedback OutputIsOnFeedback { get; private set; } - - //Maintained for compatibility with PepperDash.Essentials.Core.Devices.CrestronProcessor - public GenericRelayDevice(string key, Relay relay) : - base(key) - { - OutputIsOnFeedback = new BoolFeedback(new Func(() => RelayOutput.State)); - - RelayOutput = relay; - RelayOutput.Register(); - - RelayOutput.StateChange += RelayOutput_StateChange; - } - - public GenericRelayDevice(string key, string name, Func postActivationFunc, - IOPortConfig config) - : base(key, name) - { - OutputIsOnFeedback = new BoolFeedback(() => RelayOutput.State); - - AddPostActivationAction(() => - { - RelayOutput = postActivationFunc(config); - - if (RelayOutput == null) - { - Debug.Console(0, this, Debug.ErrorLogLevel.Error, "Unable to get parent relay device for device key {0} and port {1}", config.PortDeviceKey, config.PortNumber); - return; - } - - RelayOutput.Register(); - - RelayOutput.StateChange += RelayOutput_StateChange; - }); - } - - #region PreActivate - - private static Relay GetRelay(IOPortConfig dc) - { - - IRelayPorts relayDevice; - - if(dc.PortDeviceKey.Equals("processor")) - { - if (!Global.ControlSystem.SupportsRelay) - { - Debug.Console(0, "Processor does not support relays"); - return null; - } - relayDevice = Global.ControlSystem; - - return relayDevice.RelayPorts[dc.PortNumber]; - } - - var essentialsDevice = DeviceManager.GetDeviceForKey(dc.PortDeviceKey); - if (essentialsDevice == null) - { - Debug.Console(0, "Device {0} was not found in Device Manager. Check configuration or for errors with device.", dc.PortDeviceKey); - return null; - } - - relayDevice = essentialsDevice as IRelayPorts; - - if (relayDevice == null) - { - Debug.Console(0, "Device {0} is not a valid relay parent. Please check configuration.", dc.PortDeviceKey); - return null; - } - - if (dc.PortNumber <= relayDevice.NumberOfRelayPorts) - { - return relayDevice.RelayPorts[dc.PortNumber]; - } - - Debug.Console(0, "Device {0} does not contain a port {1}", dc.PortDeviceKey, dc.PortNumber); - return null; - } - - #endregion - - #region Events - - void RelayOutput_StateChange(Relay relay, RelayEventArgs args) - { - OutputIsOnFeedback.FireUpdate(); - } - - #endregion - - #region Methods - - public void OpenRelay() - { - RelayOutput.State = false; - } - - public void CloseRelay() - { - RelayOutput.State = true; - } - - public void ToggleRelayState() - { - if (RelayOutput.State == true) - OpenRelay(); - else - CloseRelay(); - } - - #endregion - - #region ISwitchedOutput Members - - void ISwitchedOutput.On() - { - CloseRelay(); - } - - void ISwitchedOutput.Off() - { - OpenRelay(); - } - - #endregion - - #region Bridge Linking - - public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - var joinMap = new GenericRelayControllerJoinMap(joinStart); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - if (bridge != null) - { - bridge.AddJoinMap(Key, joinMap); - } - else - { - Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); - } - - if (RelayOutput == null) - { - Debug.Console(1, this, "Unable to link device '{0}'. Relay is null", Key); - return; - } - - Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - - trilist.SetBoolSigAction(joinMap.Relay.JoinNumber, b => - { - if (b) - CloseRelay(); - else - OpenRelay(); - }); - - // feedback for relay state - - OutputIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Relay.JoinNumber]); - } - - #endregion - - #region Factory - - public class GenericRelayDeviceFactory : EssentialsDeviceFactory - { - public GenericRelayDeviceFactory() - { - TypeNames = new List() { "relayoutput" }; - } - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - Debug.Console(1, "Factory Attempting to create new Generic Relay Device"); - - var props = JsonConvert.DeserializeObject(dc.Properties.ToString()); - - if (props == null) return null; - - var portDevice = new GenericRelayDevice(dc.Key, dc.Name, GetRelay, props); - - return portDevice; - } - } - - #endregion - - - } - - +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DeviceSupport; +using Full.Newtonsoft.Json; +using PepperDash.Core; +using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Config; + +namespace PepperDash.Essentials.Core.CrestronIO +{ + /// + /// Represents a generic device controlled by relays + /// + [Description("Wrapper class for a Relay")] + public class GenericRelayDevice : EssentialsBridgeableDevice, ISwitchedOutput + { + public Relay RelayOutput { get; private set; } + + public BoolFeedback OutputIsOnFeedback { get; private set; } + + //Maintained for compatibility with PepperDash.Essentials.Core.Devices.CrestronProcessor + public GenericRelayDevice(string key, Relay relay) : + base(key) + { + OutputIsOnFeedback = new BoolFeedback(new Func(() => RelayOutput.State)); + + RelayOutput = relay; + RelayOutput.Register(); + + RelayOutput.StateChange += RelayOutput_StateChange; + } + + public GenericRelayDevice(string key, string name, Func postActivationFunc, + IOPortConfig config) + : base(key, name) + { + OutputIsOnFeedback = new BoolFeedback(() => RelayOutput.State); + + AddPostActivationAction(() => + { + RelayOutput = postActivationFunc(config); + + if (RelayOutput == null) + { + Debug.Console(0, this, Debug.ErrorLogLevel.Error, "Unable to get parent relay device for device key {0} and port {1}", config.PortDeviceKey, config.PortNumber); + return; + } + + RelayOutput.Register(); + + RelayOutput.StateChange += RelayOutput_StateChange; + }); + } + + #region PreActivate + + private static Relay GetRelay(IOPortConfig dc) + { + + IRelayPorts relayDevice; + + if(dc.PortDeviceKey.Equals("processor")) + { + if (!Global.ControlSystem.SupportsRelay) + { + Debug.Console(0, "Processor does not support relays"); + return null; + } + relayDevice = Global.ControlSystem; + + return relayDevice.RelayPorts[dc.PortNumber]; + } + + var essentialsDevice = DeviceManager.GetDeviceForKey(dc.PortDeviceKey); + if (essentialsDevice == null) + { + Debug.Console(0, "Device {0} was not found in Device Manager. Check configuration or for errors with device.", dc.PortDeviceKey); + return null; + } + + relayDevice = essentialsDevice as IRelayPorts; + + if (relayDevice == null) + { + Debug.Console(0, "Device {0} is not a valid relay parent. Please check configuration.", dc.PortDeviceKey); + return null; + } + + if (dc.PortNumber <= relayDevice.NumberOfRelayPorts) + { + return relayDevice.RelayPorts[dc.PortNumber]; + } + + Debug.Console(0, "Device {0} does not contain a port {1}", dc.PortDeviceKey, dc.PortNumber); + return null; + } + + #endregion + + #region Events + + void RelayOutput_StateChange(Relay relay, RelayEventArgs args) + { + OutputIsOnFeedback.FireUpdate(); + } + + #endregion + + #region Methods + + public void OpenRelay() + { + RelayOutput.State = false; + } + + public void CloseRelay() + { + RelayOutput.State = true; + } + + public void ToggleRelayState() + { + if (RelayOutput.State == true) + OpenRelay(); + else + CloseRelay(); + } + + #endregion + + #region ISwitchedOutput Members + + void ISwitchedOutput.On() + { + CloseRelay(); + } + + void ISwitchedOutput.Off() + { + OpenRelay(); + } + + #endregion + + #region Bridge Linking + + public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + var joinMap = new GenericRelayControllerJoinMap(joinStart); + + var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); + + if (bridge != null) + { + bridge.AddJoinMap(Key, joinMap); + } + else + { + Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); + } + + if (RelayOutput == null) + { + Debug.Console(1, this, "Unable to link device '{0}'. Relay is null", Key); + return; + } + + Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); + + trilist.SetBoolSigAction(joinMap.Relay.JoinNumber, b => + { + if (b) + CloseRelay(); + else + OpenRelay(); + }); + + // feedback for relay state + + OutputIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Relay.JoinNumber]); + } + + #endregion + + #region Factory + + public class GenericRelayDeviceFactory : EssentialsDeviceFactory + { + public GenericRelayDeviceFactory() + { + TypeNames = new List() { "relayoutput" }; + } + + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + Debug.Console(1, "Factory Attempting to create new Generic Relay Device"); + + var props = JsonConvert.DeserializeObject(dc.Properties.ToString()); + + if (props == null) return null; + + var portDevice = new GenericRelayDevice(dc.Key, dc.Name, GetRelay, props); + + return portDevice; + } + } + + #endregion + + + } + + } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Relay/ISwitchedOutput.cs b/src/PepperDash.Essentials.Core/Crestron IO/Relay/ISwitchedOutput.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Relay/ISwitchedOutput.cs rename to src/PepperDash.Essentials.Core/Crestron IO/Relay/ISwitchedOutput.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/StatusSign/StatusSignController.cs b/src/PepperDash.Essentials.Core/Crestron IO/StatusSign/StatusSignController.cs similarity index 97% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/StatusSign/StatusSignController.cs rename to src/PepperDash.Essentials.Core/Crestron IO/StatusSign/StatusSignController.cs index 6f0cf80e..3fd66f3b 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/StatusSign/StatusSignController.cs +++ b/src/PepperDash.Essentials.Core/Crestron IO/StatusSign/StatusSignController.cs @@ -1,223 +1,225 @@ -using System; -using System.Collections.Generic; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.GeneralIO; -using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Essentials.Core.Bridges; -using PepperDash.Essentials.Core.Config; - -namespace PepperDash.Essentials.Core.CrestronIO -{ - [Description("Wrapper class for the Crestron StatusSign device")] - public class StatusSignController : CrestronGenericBridgeableBaseDevice - { - private StatusSign _device; - - public BoolFeedback RedLedEnabledFeedback { get; private set; } - public BoolFeedback GreenLedEnabledFeedback { get; private set; } - public BoolFeedback BlueLedEnabledFeedback { get; private set; } - - public IntFeedback RedLedBrightnessFeedback { get; private set; } - public IntFeedback GreenLedBrightnessFeedback { get; private set; } - public IntFeedback BlueLedBrightnessFeedback { get; private set; } - - public StatusSignController(string key, Func preActivationFunc, DeviceConfig config) : base(key, config.Name) - { - AddPreActivationAction(() => - { - _device = preActivationFunc(config); - - RegisterCrestronGenericBase(_device); - - RedLedEnabledFeedback = - new BoolFeedback( - () => - _device.Leds[(uint)StatusSign.Led.eLedColor.Red] - .ControlFeedback.BoolValue); - GreenLedEnabledFeedback = - new BoolFeedback( - () => - _device.Leds[(uint)StatusSign.Led.eLedColor.Green] - .ControlFeedback.BoolValue); - BlueLedEnabledFeedback = - new BoolFeedback( - () => - _device.Leds[(uint)StatusSign.Led.eLedColor.Blue] - .ControlFeedback.BoolValue); - - RedLedBrightnessFeedback = - new IntFeedback(() => (int)_device.Leds[(uint)StatusSign.Led.eLedColor.Red].BrightnessFeedback); - GreenLedBrightnessFeedback = - new IntFeedback(() => (int)_device.Leds[(uint)StatusSign.Led.eLedColor.Green].BrightnessFeedback); - BlueLedBrightnessFeedback = - new IntFeedback(() => (int)_device.Leds[(uint)StatusSign.Led.eLedColor.Blue].BrightnessFeedback); - - if (_device != null) _device.BaseEvent += _device_BaseEvent; - - }); - } - - void _device_BaseEvent(GenericBase device, BaseEventArgs args) - { - switch (args.EventId) - { - case StatusSign.LedBrightnessFeedbackEventId: - RedLedBrightnessFeedback.FireUpdate(); - GreenLedBrightnessFeedback.FireUpdate(); - BlueLedBrightnessFeedback.FireUpdate(); - break; - case StatusSign.LedControlFeedbackEventId: - RedLedEnabledFeedback.FireUpdate(); - GreenLedEnabledFeedback.FireUpdate(); - BlueLedEnabledFeedback.FireUpdate(); - break; - } - } - - public void EnableLedControl(bool red, bool green, bool blue) - { - _device.Leds[(uint) StatusSign.Led.eLedColor.Red].Control.BoolValue = red; - _device.Leds[(uint)StatusSign.Led.eLedColor.Green].Control.BoolValue = green; - _device.Leds[(uint)StatusSign.Led.eLedColor.Blue].Control.BoolValue = blue; - } - - public void SetColor(uint red, uint green, uint blue) - { - try - { - _device.Leds[(uint)StatusSign.Led.eLedColor.Red].Brightness = - (StatusSign.Led.eBrightnessPercentageValues)SimplSharpDeviceHelper.PercentToUshort(red); - } - catch (InvalidOperationException) - { - Debug.Console(1, this, "Error converting value to Red LED brightness. value: {0}", red); - } - try - { - _device.Leds[(uint)StatusSign.Led.eLedColor.Green].Brightness = - (StatusSign.Led.eBrightnessPercentageValues)SimplSharpDeviceHelper.PercentToUshort(green); - } - catch (InvalidOperationException) - { - Debug.Console(1, this, "Error converting value to Green LED brightness. value: {0}", green); - } - - try - { - _device.Leds[(uint)StatusSign.Led.eLedColor.Blue].Brightness = - (StatusSign.Led.eBrightnessPercentageValues)SimplSharpDeviceHelper.PercentToUshort(blue); - } - catch (InvalidOperationException) - { - Debug.Console(1, this, "Error converting value to Blue LED brightness. value: {0}", blue); - } - } - - public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - var joinMap = new StatusSignControllerJoinMap(joinStart); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - if (bridge != null) - { - bridge.AddJoinMap(Key, joinMap); - } - else - { - Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); - } - - Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - - trilist.SetBoolSigAction(joinMap.RedControl.JoinNumber, b => EnableControl(trilist, joinMap, this)); - trilist.SetBoolSigAction(joinMap.GreenControl.JoinNumber, b => EnableControl(trilist, joinMap, this)); - trilist.SetBoolSigAction(joinMap.BlueControl.JoinNumber, b => EnableControl(trilist, joinMap, this)); - - trilist.SetUShortSigAction(joinMap.RedLed.JoinNumber, u => SetColor(trilist, joinMap, this)); - trilist.SetUShortSigAction(joinMap.GreenLed.JoinNumber, u => SetColor(trilist, joinMap, this)); - trilist.SetUShortSigAction(joinMap.BlueLed.JoinNumber, u => SetColor(trilist, joinMap, this)); - - trilist.StringInput[joinMap.Name.JoinNumber].StringValue = Name; - - IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); - RedLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RedControl.JoinNumber]); - BlueLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.BlueControl.JoinNumber]); - GreenLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.GreenControl.JoinNumber]); - - RedLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.RedLed.JoinNumber]); - BlueLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.BlueLed.JoinNumber]); - GreenLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.GreenLed.JoinNumber]); - } - - private static void EnableControl(BasicTriList triList, StatusSignControllerJoinMap joinMap, - StatusSignController device) - { - var redEnable = triList.BooleanOutput[joinMap.RedControl.JoinNumber].BoolValue; - var greenEnable = triList.BooleanOutput[joinMap.GreenControl.JoinNumber].BoolValue; - var blueEnable = triList.BooleanOutput[joinMap.BlueControl.JoinNumber].BoolValue; - device.EnableLedControl(redEnable, greenEnable, blueEnable); - } - - private static void SetColor(BasicTriList triList, StatusSignControllerJoinMap joinMap, - StatusSignController device) - { - var redBrightness = triList.UShortOutput[joinMap.RedLed.JoinNumber].UShortValue; - var greenBrightness = triList.UShortOutput[joinMap.GreenLed.JoinNumber].UShortValue; - var blueBrightness = triList.UShortOutput[joinMap.BlueLed.JoinNumber].UShortValue; - - device.SetColor(redBrightness, greenBrightness, blueBrightness); - } - - #region PreActivation - - private static StatusSign GetStatusSignDevice(DeviceConfig dc) - { - var control = CommFactory.GetControlPropertiesConfig(dc); - var cresnetId = control.CresnetIdInt; - var branchId = control.ControlPortNumber; - var parentKey = string.IsNullOrEmpty(control.ControlPortDevKey) ? "processor" : control.ControlPortDevKey; - - if (parentKey.Equals("processor", StringComparison.CurrentCultureIgnoreCase)) - { - Debug.Console(0, "Device {0} is a valid cresnet master - creating new StatusSign", parentKey); - return new StatusSign(cresnetId, Global.ControlSystem); - } - var cresnetBridge = DeviceManager.GetDeviceForKey(parentKey) as IHasCresnetBranches; - - if (cresnetBridge != null) - { - Debug.Console(0, "Device {0} is a valid cresnet master - creating new StatusSign", parentKey); - return new StatusSign(cresnetId, cresnetBridge.CresnetBranches[branchId]); - } - Debug.Console(0, "Device {0} is not a valid cresnet master", parentKey); - return null; - } - #endregion - - public class StatusSignControllerFactory : EssentialsDeviceFactory - { - public StatusSignControllerFactory() - { - TypeNames = new List() { "statussign" }; - } - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - Debug.Console(1, "Factory Attempting to create new StatusSign Device"); - - var control = CommFactory.GetControlPropertiesConfig(dc); - var cresnetId = control.CresnetIdInt; - - return new StatusSignController(dc.Key, GetStatusSignDevice, dc); - } - } - } - - +extern alias Full; + +using System; +using System.Collections.Generic; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.GeneralIO; +using Full.Newtonsoft.Json; +using PepperDash.Core; +using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Config; + +namespace PepperDash.Essentials.Core.CrestronIO +{ + [Description("Wrapper class for the Crestron StatusSign device")] + public class StatusSignController : CrestronGenericBridgeableBaseDevice + { + private StatusSign _device; + + public BoolFeedback RedLedEnabledFeedback { get; private set; } + public BoolFeedback GreenLedEnabledFeedback { get; private set; } + public BoolFeedback BlueLedEnabledFeedback { get; private set; } + + public IntFeedback RedLedBrightnessFeedback { get; private set; } + public IntFeedback GreenLedBrightnessFeedback { get; private set; } + public IntFeedback BlueLedBrightnessFeedback { get; private set; } + + public StatusSignController(string key, Func preActivationFunc, DeviceConfig config) : base(key, config.Name) + { + AddPreActivationAction(() => + { + _device = preActivationFunc(config); + + RegisterCrestronGenericBase(_device); + + RedLedEnabledFeedback = + new BoolFeedback( + () => + _device.Leds[(uint)StatusSign.Led.eLedColor.Red] + .ControlFeedback.BoolValue); + GreenLedEnabledFeedback = + new BoolFeedback( + () => + _device.Leds[(uint)StatusSign.Led.eLedColor.Green] + .ControlFeedback.BoolValue); + BlueLedEnabledFeedback = + new BoolFeedback( + () => + _device.Leds[(uint)StatusSign.Led.eLedColor.Blue] + .ControlFeedback.BoolValue); + + RedLedBrightnessFeedback = + new IntFeedback(() => (int)_device.Leds[(uint)StatusSign.Led.eLedColor.Red].BrightnessFeedback); + GreenLedBrightnessFeedback = + new IntFeedback(() => (int)_device.Leds[(uint)StatusSign.Led.eLedColor.Green].BrightnessFeedback); + BlueLedBrightnessFeedback = + new IntFeedback(() => (int)_device.Leds[(uint)StatusSign.Led.eLedColor.Blue].BrightnessFeedback); + + if (_device != null) _device.BaseEvent += _device_BaseEvent; + + }); + } + + void _device_BaseEvent(GenericBase device, BaseEventArgs args) + { + switch (args.EventId) + { + case StatusSign.LedBrightnessFeedbackEventId: + RedLedBrightnessFeedback.FireUpdate(); + GreenLedBrightnessFeedback.FireUpdate(); + BlueLedBrightnessFeedback.FireUpdate(); + break; + case StatusSign.LedControlFeedbackEventId: + RedLedEnabledFeedback.FireUpdate(); + GreenLedEnabledFeedback.FireUpdate(); + BlueLedEnabledFeedback.FireUpdate(); + break; + } + } + + public void EnableLedControl(bool red, bool green, bool blue) + { + _device.Leds[(uint) StatusSign.Led.eLedColor.Red].Control.BoolValue = red; + _device.Leds[(uint)StatusSign.Led.eLedColor.Green].Control.BoolValue = green; + _device.Leds[(uint)StatusSign.Led.eLedColor.Blue].Control.BoolValue = blue; + } + + public void SetColor(uint red, uint green, uint blue) + { + try + { + _device.Leds[(uint)StatusSign.Led.eLedColor.Red].Brightness = + (StatusSign.Led.eBrightnessPercentageValues)SimplSharpDeviceHelper.PercentToUshort(red); + } + catch (InvalidOperationException) + { + Debug.Console(1, this, "Error converting value to Red LED brightness. value: {0}", red); + } + try + { + _device.Leds[(uint)StatusSign.Led.eLedColor.Green].Brightness = + (StatusSign.Led.eBrightnessPercentageValues)SimplSharpDeviceHelper.PercentToUshort(green); + } + catch (InvalidOperationException) + { + Debug.Console(1, this, "Error converting value to Green LED brightness. value: {0}", green); + } + + try + { + _device.Leds[(uint)StatusSign.Led.eLedColor.Blue].Brightness = + (StatusSign.Led.eBrightnessPercentageValues)SimplSharpDeviceHelper.PercentToUshort(blue); + } + catch (InvalidOperationException) + { + Debug.Console(1, this, "Error converting value to Blue LED brightness. value: {0}", blue); + } + } + + public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + var joinMap = new StatusSignControllerJoinMap(joinStart); + + var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); + + if (bridge != null) + { + bridge.AddJoinMap(Key, joinMap); + } + else + { + Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); + } + + Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); + + trilist.SetBoolSigAction(joinMap.RedControl.JoinNumber, b => EnableControl(trilist, joinMap, this)); + trilist.SetBoolSigAction(joinMap.GreenControl.JoinNumber, b => EnableControl(trilist, joinMap, this)); + trilist.SetBoolSigAction(joinMap.BlueControl.JoinNumber, b => EnableControl(trilist, joinMap, this)); + + trilist.SetUShortSigAction(joinMap.RedLed.JoinNumber, u => SetColor(trilist, joinMap, this)); + trilist.SetUShortSigAction(joinMap.GreenLed.JoinNumber, u => SetColor(trilist, joinMap, this)); + trilist.SetUShortSigAction(joinMap.BlueLed.JoinNumber, u => SetColor(trilist, joinMap, this)); + + trilist.StringInput[joinMap.Name.JoinNumber].StringValue = Name; + + IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); + RedLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RedControl.JoinNumber]); + BlueLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.BlueControl.JoinNumber]); + GreenLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.GreenControl.JoinNumber]); + + RedLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.RedLed.JoinNumber]); + BlueLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.BlueLed.JoinNumber]); + GreenLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.GreenLed.JoinNumber]); + } + + private static void EnableControl(BasicTriList triList, StatusSignControllerJoinMap joinMap, + StatusSignController device) + { + var redEnable = triList.BooleanOutput[joinMap.RedControl.JoinNumber].BoolValue; + var greenEnable = triList.BooleanOutput[joinMap.GreenControl.JoinNumber].BoolValue; + var blueEnable = triList.BooleanOutput[joinMap.BlueControl.JoinNumber].BoolValue; + device.EnableLedControl(redEnable, greenEnable, blueEnable); + } + + private static void SetColor(BasicTriList triList, StatusSignControllerJoinMap joinMap, + StatusSignController device) + { + var redBrightness = triList.UShortOutput[joinMap.RedLed.JoinNumber].UShortValue; + var greenBrightness = triList.UShortOutput[joinMap.GreenLed.JoinNumber].UShortValue; + var blueBrightness = triList.UShortOutput[joinMap.BlueLed.JoinNumber].UShortValue; + + device.SetColor(redBrightness, greenBrightness, blueBrightness); + } + + #region PreActivation + + private static StatusSign GetStatusSignDevice(DeviceConfig dc) + { + var control = CommFactory.GetControlPropertiesConfig(dc); + var cresnetId = control.CresnetIdInt; + var branchId = control.ControlPortNumber; + var parentKey = string.IsNullOrEmpty(control.ControlPortDevKey) ? "processor" : control.ControlPortDevKey; + + if (parentKey.Equals("processor", StringComparison.CurrentCultureIgnoreCase)) + { + Debug.Console(0, "Device {0} is a valid cresnet master - creating new StatusSign", parentKey); + return new StatusSign(cresnetId, Global.ControlSystem); + } + var cresnetBridge = DeviceManager.GetDeviceForKey(parentKey) as IHasCresnetBranches; + + if (cresnetBridge != null) + { + Debug.Console(0, "Device {0} is a valid cresnet master - creating new StatusSign", parentKey); + return new StatusSign(cresnetId, cresnetBridge.CresnetBranches[branchId]); + } + Debug.Console(0, "Device {0} is not a valid cresnet master", parentKey); + return null; + } + #endregion + + public class StatusSignControllerFactory : EssentialsDeviceFactory + { + public StatusSignControllerFactory() + { + TypeNames = new List() { "statussign" }; + } + + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + Debug.Console(1, "Factory Attempting to create new StatusSign Device"); + + var control = CommFactory.GetControlPropertiesConfig(dc); + var cresnetId = control.CresnetIdInt; + + return new StatusSignController(dc.Key, GetStatusSignDevice, dc); + } + } + } + + } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron/CrestronGenericBaseDevice.cs b/src/PepperDash.Essentials.Core/Crestron/CrestronGenericBaseDevice.cs similarity index 97% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron/CrestronGenericBaseDevice.cs rename to src/PepperDash.Essentials.Core/Crestron/CrestronGenericBaseDevice.cs index 32407ba3..d9650e63 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron/CrestronGenericBaseDevice.cs +++ b/src/PepperDash.Essentials.Core/Crestron/CrestronGenericBaseDevice.cs @@ -1,215 +1,215 @@ -using System; -using System.Linq; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; -using PepperDash.Core; -using PepperDash.Core.JsonStandardObjects; -using PepperDash.Essentials.Core.Bridges; - -namespace PepperDash.Essentials.Core -{ - /// - /// A bridge class to cover the basic features of GenericBase hardware - /// - public abstract class CrestronGenericBaseDevice : EssentialsDevice, IOnline, IHasFeedback, ICommunicationMonitor, IUsageTracking - { - protected GenericBase Hardware; - - /// - /// Returns a list containing the Outputs that we want to expose. - /// - public FeedbackCollection Feedbacks { get; private set; } - - public BoolFeedback IsOnline { get; private set; } - public BoolFeedback IsRegistered { get; private set; } - public StringFeedback IpConnectionsText { get; private set; } - - /// - /// Used by implementing classes to prevent registration with Crestron TLDM. For - /// devices like RMCs and TXs attached to a chassis. - /// - public bool PreventRegistration { get; protected set; } - - protected CrestronGenericBaseDevice(string key, string name, GenericBase hardware) - : base(key, name) - { - Feedbacks = new FeedbackCollection(); - - Hardware = hardware; - IsOnline = new BoolFeedback("IsOnlineFeedback", () => Hardware.IsOnline); - IsRegistered = new BoolFeedback("IsRegistered", () => Hardware.Registered); - IpConnectionsText = new StringFeedback("IpConnectionsText", () => Hardware.ConnectedIpList != null ? string.Join(",", Hardware.ConnectedIpList.Select(cip => cip.DeviceIpAddress).ToArray()) : string.Empty); - AddToFeedbackList(IsOnline, IpConnectionsText); - - CommunicationMonitor = new CrestronGenericBaseCommunicationMonitor(this, hardware, 120000, 300000); - } - - protected CrestronGenericBaseDevice(string key, string name) - : base(key, name) - { - Feedbacks = new FeedbackCollection(); - - } - - protected void RegisterCrestronGenericBase(GenericBase hardware) - { - Hardware = hardware; - IsOnline = new BoolFeedback("IsOnlineFeedback", () => Hardware.IsOnline); - IsRegistered = new BoolFeedback("IsRegistered", () => Hardware.Registered); - IpConnectionsText = new StringFeedback("IpConnectionsText", () => Hardware.ConnectedIpList != null ? string.Join(",", Hardware.ConnectedIpList.Select(cip => cip.DeviceIpAddress).ToArray()) : string.Empty); - AddToFeedbackList(IsOnline, IpConnectionsText); - - CommunicationMonitor = new CrestronGenericBaseCommunicationMonitor(this, hardware, 120000, 300000); - } - - /// - /// Make sure that overriding classes call this! - /// Registers the Crestron device, connects up to the base events, starts communication monitor - /// - public override bool CustomActivate() - { - Debug.Console(0, this, "Activating"); - if (!PreventRegistration) - { - //Debug.Console(1, this, " Does not require registration. Skipping"); - - if (Hardware.Registerable && !Hardware.Registered) - { - var response = Hardware.RegisterWithLogging(Key); - if (response != eDeviceRegistrationUnRegistrationResponse.Success) - { - //Debug.Console(0, this, "ERROR: Cannot register Crestron device: {0}", response); - return false; - } - } - - IsRegistered.FireUpdate(); - } - else - { - AddPostActivationAction(() => - { - if (Hardware.Registerable && !Hardware.Registered) - { - var response = Hardware.RegisterWithLogging(Key); - } - - IsRegistered.FireUpdate(); - }); - } - - foreach (var f in Feedbacks) - { - f.FireUpdate(); - } - - Hardware.OnlineStatusChange += Hardware_OnlineStatusChange; - CommunicationMonitor.Start(); - - return true; - } - - /// - /// This disconnects events and unregisters the base hardware device. - /// - /// - public override bool Deactivate() - { - CommunicationMonitor.Stop(); - Hardware.OnlineStatusChange -= Hardware_OnlineStatusChange; - - var success = Hardware.UnRegister() == eDeviceRegistrationUnRegistrationResponse.Success; - - IsRegistered.FireUpdate(); - - return success; - } - - /// - /// Adds feedback(s) to the list - /// - /// - public void AddToFeedbackList(params Feedback[] newFbs) - { - foreach (var f in newFbs) - { - if (f == null) continue; - - if (!Feedbacks.Contains(f)) - { - Feedbacks.Add(f); - } - } - } - - void Hardware_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) - { - Debug.Console(2, this, "OnlineStatusChange Event. Online = {0}", args.DeviceOnLine); - - if (!Hardware.Registered) - { - return; // protects in cases where device has been unregistered and feedbacks would attempt to access null sigs. - } - - foreach (var feedback in Feedbacks) - { - if (feedback != null) - feedback.FireUpdate(); - } - } - - #region IStatusMonitor Members - - public StatusMonitorBase CommunicationMonitor { get; private set; } - #endregion - - #region IUsageTracking Members - - public UsageTracking UsageTracker { get; set; } - - #endregion - } - - public abstract class CrestronGenericBridgeableBaseDevice : CrestronGenericBaseDevice, IBridgeAdvanced - { - protected CrestronGenericBridgeableBaseDevice(string key, string name, GenericBase hardware) : base(key, name, hardware) - { - } - - protected CrestronGenericBridgeableBaseDevice(string key, string name) - : base(key, name) - { - } - - - public abstract void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge); - } - - - //*********************************************************************************** - public class CrestronGenericBaseDeviceEventIds - { - public const uint IsOnline = 1; - public const uint IpConnectionsText =2; - } - - /// - /// Adds logging to Register() failure - /// - public static class GenericBaseExtensions - { - public static eDeviceRegistrationUnRegistrationResponse RegisterWithLogging(this GenericBase device, string key) - { - var result = device.Register(); - var level = result == eDeviceRegistrationUnRegistrationResponse.Success ? - Debug.ErrorLogLevel.Notice : Debug.ErrorLogLevel.Error; - Debug.Console(0, level, "Register device result: '{0}', type '{1}', result {2}", key, device, result); - //if (result != eDeviceRegistrationUnRegistrationResponse.Success) - //{ - // Debug.Console(0, Debug.ErrorLogLevel.Error, "Cannot register device '{0}': {1}", key, result); - //} - return result; - } - - } +using System; +using System.Linq; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DeviceSupport; +using PepperDash.Core; +using PepperDash.Core.JsonStandardObjects; +using PepperDash.Essentials.Core.Bridges; + +namespace PepperDash.Essentials.Core +{ + /// + /// A bridge class to cover the basic features of GenericBase hardware + /// + public abstract class CrestronGenericBaseDevice : EssentialsDevice, IOnline, IHasFeedback, ICommunicationMonitor, IUsageTracking + { + protected GenericBase Hardware; + + /// + /// Returns a list containing the Outputs that we want to expose. + /// + public FeedbackCollection Feedbacks { get; private set; } + + public BoolFeedback IsOnline { get; private set; } + public BoolFeedback IsRegistered { get; private set; } + public StringFeedback IpConnectionsText { get; private set; } + + /// + /// Used by implementing classes to prevent registration with Crestron TLDM. For + /// devices like RMCs and TXs attached to a chassis. + /// + public bool PreventRegistration { get; protected set; } + + protected CrestronGenericBaseDevice(string key, string name, GenericBase hardware) + : base(key, name) + { + Feedbacks = new FeedbackCollection(); + + Hardware = hardware; + IsOnline = new BoolFeedback("IsOnlineFeedback", () => Hardware.IsOnline); + IsRegistered = new BoolFeedback("IsRegistered", () => Hardware.Registered); + IpConnectionsText = new StringFeedback("IpConnectionsText", () => Hardware.ConnectedIpList != null ? string.Join(",", Hardware.ConnectedIpList.Select(cip => cip.DeviceIpAddress).ToArray()) : string.Empty); + AddToFeedbackList(IsOnline, IpConnectionsText); + + CommunicationMonitor = new CrestronGenericBaseCommunicationMonitor(this, hardware, 120000, 300000); + } + + protected CrestronGenericBaseDevice(string key, string name) + : base(key, name) + { + Feedbacks = new FeedbackCollection(); + + } + + protected void RegisterCrestronGenericBase(GenericBase hardware) + { + Hardware = hardware; + IsOnline = new BoolFeedback("IsOnlineFeedback", () => Hardware.IsOnline); + IsRegistered = new BoolFeedback("IsRegistered", () => Hardware.Registered); + IpConnectionsText = new StringFeedback("IpConnectionsText", () => Hardware.ConnectedIpList != null ? string.Join(",", Hardware.ConnectedIpList.Select(cip => cip.DeviceIpAddress).ToArray()) : string.Empty); + AddToFeedbackList(IsOnline, IpConnectionsText); + + CommunicationMonitor = new CrestronGenericBaseCommunicationMonitor(this, hardware, 120000, 300000); + } + + /// + /// Make sure that overriding classes call this! + /// Registers the Crestron device, connects up to the base events, starts communication monitor + /// + public override bool CustomActivate() + { + Debug.Console(0, this, "Activating"); + if (!PreventRegistration) + { + //Debug.Console(1, this, " Does not require registration. Skipping"); + + if (Hardware.Registerable && !Hardware.Registered) + { + var response = Hardware.RegisterWithLogging(Key); + if (response != eDeviceRegistrationUnRegistrationResponse.Success) + { + //Debug.Console(0, this, "ERROR: Cannot register Crestron device: {0}", response); + return false; + } + } + + IsRegistered.FireUpdate(); + } + else + { + AddPostActivationAction(() => + { + if (Hardware.Registerable && !Hardware.Registered) + { + var response = Hardware.RegisterWithLogging(Key); + } + + IsRegistered.FireUpdate(); + }); + } + + foreach (var f in Feedbacks) + { + f.FireUpdate(); + } + + Hardware.OnlineStatusChange += Hardware_OnlineStatusChange; + CommunicationMonitor.Start(); + + return true; + } + + /// + /// This disconnects events and unregisters the base hardware device. + /// + /// + public override bool Deactivate() + { + CommunicationMonitor.Stop(); + Hardware.OnlineStatusChange -= Hardware_OnlineStatusChange; + + var success = Hardware.UnRegister() == eDeviceRegistrationUnRegistrationResponse.Success; + + IsRegistered.FireUpdate(); + + return success; + } + + /// + /// Adds feedback(s) to the list + /// + /// + public void AddToFeedbackList(params Feedback[] newFbs) + { + foreach (var f in newFbs) + { + if (f == null) continue; + + if (!Feedbacks.Contains(f)) + { + Feedbacks.Add(f); + } + } + } + + void Hardware_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) + { + Debug.Console(2, this, "OnlineStatusChange Event. Online = {0}", args.DeviceOnLine); + + if (!Hardware.Registered) + { + return; // protects in cases where device has been unregistered and feedbacks would attempt to access null sigs. + } + + foreach (var feedback in Feedbacks) + { + if (feedback != null) + feedback.FireUpdate(); + } + } + + #region IStatusMonitor Members + + public StatusMonitorBase CommunicationMonitor { get; private set; } + #endregion + + #region IUsageTracking Members + + public UsageTracking UsageTracker { get; set; } + + #endregion + } + + public abstract class CrestronGenericBridgeableBaseDevice : CrestronGenericBaseDevice, IBridgeAdvanced + { + protected CrestronGenericBridgeableBaseDevice(string key, string name, GenericBase hardware) : base(key, name, hardware) + { + } + + protected CrestronGenericBridgeableBaseDevice(string key, string name) + : base(key, name) + { + } + + + public abstract void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge); + } + + + //*********************************************************************************** + public class CrestronGenericBaseDeviceEventIds + { + public const uint IsOnline = 1; + public const uint IpConnectionsText =2; + } + + /// + /// Adds logging to Register() failure + /// + public static class GenericBaseExtensions + { + public static eDeviceRegistrationUnRegistrationResponse RegisterWithLogging(this GenericBase device, string key) + { + var result = device.Register(); + var level = result == eDeviceRegistrationUnRegistrationResponse.Success ? + Debug.ErrorLogLevel.Notice : Debug.ErrorLogLevel.Error; + Debug.Console(0, level, "Register device result: '{0}', type '{1}', result {2}", key, device, result); + //if (result != eDeviceRegistrationUnRegistrationResponse.Success) + //{ + // Debug.Console(0, Debug.ErrorLogLevel.Error, "Cannot register device '{0}': {1}", key, result); + //} + return result; + } + + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron/CrestronGenericBaseDevice.cs.orig b/src/PepperDash.Essentials.Core/Crestron/CrestronGenericBaseDevice.cs.orig similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron/CrestronGenericBaseDevice.cs.orig rename to src/PepperDash.Essentials.Core/Crestron/CrestronGenericBaseDevice.cs.orig diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Device Info/DeviceInfo.cs b/src/PepperDash.Essentials.Core/Device Info/DeviceInfo.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Device Info/DeviceInfo.cs rename to src/PepperDash.Essentials.Core/Device Info/DeviceInfo.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Device Info/DeviceInfoEventArgs.cs b/src/PepperDash.Essentials.Core/Device Info/DeviceInfoEventArgs.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Device Info/DeviceInfoEventArgs.cs rename to src/PepperDash.Essentials.Core/Device Info/DeviceInfoEventArgs.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Device Info/IDeviceInfoProvider.cs b/src/PepperDash.Essentials.Core/Device Info/IDeviceInfoProvider.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Device Info/IDeviceInfoProvider.cs rename to src/PepperDash.Essentials.Core/Device Info/IDeviceInfoProvider.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceControlsParentInterfaces/IPresentationSource.cs b/src/PepperDash.Essentials.Core/DeviceControlsParentInterfaces/IPresentationSource.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceControlsParentInterfaces/IPresentationSource.cs rename to src/PepperDash.Essentials.Core/DeviceControlsParentInterfaces/IPresentationSource.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IChannel.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IChannel.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IChannel.cs rename to src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IChannel.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IColorFunctions.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IColorFunctions.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IColorFunctions.cs rename to src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IColorFunctions.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IDPad.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDPad.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IDPad.cs rename to src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDPad.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IDiscPlayerControls.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDiscPlayerControls.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IDiscPlayerControls.cs rename to src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDiscPlayerControls.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IDisplayBasic.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDisplayBasic.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IDisplayBasic.cs rename to src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDisplayBasic.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IDumbSource.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDumbSource.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IDumbSource.cs rename to src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDumbSource.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IDvr.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDvr.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IDvr.cs rename to src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDvr.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IHasBranding.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasBranding.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IHasBranding.cs rename to src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasBranding.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IHasFarEndContentStatus.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasFarEndContentStatus.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IHasFarEndContentStatus.cs rename to src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasFarEndContentStatus.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IHasPhoneDialing.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasPhoneDialing.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IHasPhoneDialing.cs rename to src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasPhoneDialing.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageDefinition.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ILanguageDefinition.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageDefinition.cs rename to src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ILanguageDefinition.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageProvider.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ILanguageProvider.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageProvider.cs rename to src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ILanguageProvider.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IMobileControl.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControl.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IMobileControl.cs rename to src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControl.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/INumeric.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/INumeric.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/INumeric.cs rename to src/PepperDash.Essentials.Core/DeviceTypeInterfaces/INumeric.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IPasswordPrompt.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IPasswordPrompt.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IPasswordPrompt.cs rename to src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IPasswordPrompt.cs index da61bbc0..6ecdd775 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IPasswordPrompt.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IPasswordPrompt.cs @@ -1,56 +1,56 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -namespace PepperDash.Essentials.Core -{ - /// - /// Describes the functionality required to prompt a user to enter a password - /// - public interface IPasswordPrompt - { - /// - /// Notifies when a password is required or is entered incorrectly - /// - event EventHandler PasswordRequired; - - /// - /// Submits the password - /// - /// - void SubmitPassword(string password); - } - - public class PasswordPromptEventArgs : EventArgs - { - /// - /// Indicates if the last submitted password was incorrect - /// - public bool LastAttemptWasIncorrect { get; private set; } - - /// - /// Indicates that the login attempt has failed - /// - public bool LoginAttemptFailed { get; private set; } - - /// - /// Indicates that the process was cancelled and the prompt should be dismissed - /// - public bool LoginAttemptCancelled { get; private set; } - - /// - /// A message to be displayed to the user - /// - public string Message { get; private set; } - - public PasswordPromptEventArgs(bool lastAttemptIncorrect, bool loginFailed, bool loginCancelled, string message) - { - LastAttemptWasIncorrect = lastAttemptIncorrect; - LoginAttemptFailed = loginFailed; - LoginAttemptCancelled = loginCancelled; - Message = message; - } - } +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +namespace PepperDash.Essentials.Core +{ + /// + /// Describes the functionality required to prompt a user to enter a password + /// + public interface IPasswordPrompt + { + /// + /// Notifies when a password is required or is entered incorrectly + /// + event EventHandler PasswordRequired; + + /// + /// Submits the password + /// + /// + void SubmitPassword(string password); + } + + public class PasswordPromptEventArgs : EventArgs + { + /// + /// Indicates if the last submitted password was incorrect + /// + public bool LastAttemptWasIncorrect { get; private set; } + + /// + /// Indicates that the login attempt has failed + /// + public bool LoginAttemptFailed { get; private set; } + + /// + /// Indicates that the process was cancelled and the prompt should be dismissed + /// + public bool LoginAttemptCancelled { get; private set; } + + /// + /// A message to be displayed to the user + /// + public string Message { get; private set; } + + public PasswordPromptEventArgs(bool lastAttemptIncorrect, bool loginFailed, bool loginCancelled, string message) + { + LastAttemptWasIncorrect = lastAttemptIncorrect; + LoginAttemptFailed = loginFailed; + LoginAttemptCancelled = loginCancelled; + Message = message; + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IPower.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IPower.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IPower.cs rename to src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IPower.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ISetTopBoxControls.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISetTopBoxControls.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ISetTopBoxControls.cs rename to src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISetTopBoxControls.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ITransport.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ITransport.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ITransport.cs rename to src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ITransport.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ITvPresetsProvider.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ITvPresetsProvider.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ITvPresetsProvider.cs rename to src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ITvPresetsProvider.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IUiDisplayInfo.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IUiDisplayInfo.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IUiDisplayInfo.cs rename to src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IUiDisplayInfo.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IWarmingCooling.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IWarmingCooling.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IWarmingCooling.cs rename to src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IWarmingCooling.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/LanguageLabel.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/LanguageLabel.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/LanguageLabel.cs rename to src/PepperDash.Essentials.Core/DeviceTypeInterfaces/LanguageLabel.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/Template.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/Template.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/Template.cs rename to src/PepperDash.Essentials.Core/DeviceTypeInterfaces/Template.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/AudioInterfaces.cs b/src/PepperDash.Essentials.Core/Devices/AudioInterfaces.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/AudioInterfaces.cs rename to src/PepperDash.Essentials.Core/Devices/AudioInterfaces.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/CodecInterfaces.cs b/src/PepperDash.Essentials.Core/Devices/CodecInterfaces.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/CodecInterfaces.cs rename to src/PepperDash.Essentials.Core/Devices/CodecInterfaces.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/CrestronProcessor.cs b/src/PepperDash.Essentials.Core/Devices/CrestronProcessor.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/CrestronProcessor.cs rename to src/PepperDash.Essentials.Core/Devices/CrestronProcessor.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/DestinationListItem.cs b/src/PepperDash.Essentials.Core/Devices/DestinationListItem.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/DestinationListItem.cs rename to src/PepperDash.Essentials.Core/Devices/DestinationListItem.cs index 49379e44..a3314e9c 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/DestinationListItem.cs +++ b/src/PepperDash.Essentials.Core/Devices/DestinationListItem.cs @@ -1,4 +1,6 @@ -using Newtonsoft.Json; +extern alias Full; + +using Full.Newtonsoft.Json; using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Core diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/DeviceApiBase.cs b/src/PepperDash.Essentials.Core/Devices/DeviceApiBase.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/DeviceApiBase.cs rename to src/PepperDash.Essentials.Core/Devices/DeviceApiBase.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/DeviceFeedbackExtensions.cs b/src/PepperDash.Essentials.Core/Devices/DeviceFeedbackExtensions.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/DeviceFeedbackExtensions.cs rename to src/PepperDash.Essentials.Core/Devices/DeviceFeedbackExtensions.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/DeviceJsonApi.cs b/src/PepperDash.Essentials.Core/Devices/DeviceJsonApi.cs similarity index 99% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/DeviceJsonApi.cs rename to src/PepperDash.Essentials.Core/Devices/DeviceJsonApi.cs index 2dda0bf8..dafda2a9 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/DeviceJsonApi.cs +++ b/src/PepperDash.Essentials.Core/Devices/DeviceJsonApi.cs @@ -1,11 +1,13 @@ -using System; +extern alias Full; + +using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; using Crestron.SimplSharp.Reflection; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; using PepperDash.Core; diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/DeviceManager.cs b/src/PepperDash.Essentials.Core/Devices/DeviceManager.cs similarity index 97% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/DeviceManager.cs rename to src/PepperDash.Essentials.Core/Devices/DeviceManager.cs index 57bf2287..12b3b948 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/DeviceManager.cs +++ b/src/PepperDash.Essentials.Core/Devices/DeviceManager.cs @@ -1,492 +1,492 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.RegularExpressions; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; - -using PepperDash.Core; - - -namespace PepperDash.Essentials.Core -{ - public static class DeviceManager - { - public static event EventHandler AllDevicesActivated; - public static event EventHandler AllDevicesRegistered; - - private static readonly CCriticalSection DeviceCriticalSection = new CCriticalSection(); - private static readonly CEvent AllowAddDevicesCEvent = new CEvent(false, true); - //public static List Devices { get { return _Devices; } } - //static List _Devices = new List(); - - static readonly Dictionary Devices = new Dictionary(StringComparer.OrdinalIgnoreCase); - - /// - /// Returns a copy of all the devices in a list - /// - public static List AllDevices { get { return new List(Devices.Values); } } - - public static bool AddDeviceEnabled; - - public static void Initialize(CrestronControlSystem cs) - { - AddDeviceEnabled = true; - CrestronConsole.AddNewConsoleCommand(ListDeviceCommStatuses, "devcommstatus", "Lists the communication status of all devices", - ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(ListDeviceFeedbacks, "devfb", "Lists current feedbacks", - ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(ListDevices, "devlist", "Lists current managed devices", - ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(DeviceJsonApi.DoDeviceActionWithJson, "devjson", "", - ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(s => CrestronConsole.ConsoleCommandResponse(DeviceJsonApi.GetProperties(s)), "devprops", "", ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(s => CrestronConsole.ConsoleCommandResponse(DeviceJsonApi.GetMethods(s)), "devmethods", "", ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(s => CrestronConsole.ConsoleCommandResponse(DeviceJsonApi.GetApiMethods(s)), "apimethods", "", ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(SimulateComReceiveOnDevice, "devsimreceive", - "Simulates incoming data on a com device", ConsoleAccessLevelEnum.AccessOperator); - - CrestronConsole.AddNewConsoleCommand(SetDeviceStreamDebugging, "setdevicestreamdebug", "set comm debug [deviceKey] [off/rx/tx/both] ([minutes])", ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(s => DisableAllDeviceStreamDebugging(), "disableallstreamdebug", "disables stream debugging on all devices", ConsoleAccessLevelEnum.AccessOperator); - } - - /// - /// Calls activate steps on all Device class items - /// - public static void ActivateAll() - { - try - { - OnAllDevicesRegistered(); - - DeviceCriticalSection.Enter(); - AddDeviceEnabled = false; - // PreActivate all devices - Debug.Console(0,"****PreActivation starting...****"); - foreach (var d in Devices.Values) - { - try - { - if (d is Device) - (d as Device).PreActivate(); - } - catch (Exception e) - { - Debug.Console(0, d, "ERROR: Device {1} PreActivation failure: {0}", e.Message, d.Key); - Debug.Console(1, d, "Stack Trace: {0}", e.StackTrace); - } - } - Debug.Console(0, "****PreActivation complete****"); - Debug.Console(0, "****Activation starting...****"); - - // Activate all devices - foreach (var d in Devices.Values) - { - try - { - if (d is Device) - (d as Device).Activate(); - } - catch (Exception e) - { - Debug.Console(0, d, "ERROR: Device {1} Activation failure: {0}", e.Message, d.Key); - Debug.Console(1, d, "Stack Trace: {0}", e.StackTrace); - } - } - - Debug.Console(0, "****Activation complete****"); - Debug.Console(0, "****PostActivation starting...****"); - - // PostActivate all devices - foreach (var d in Devices.Values) - { - try - { - if (d is Device) - (d as Device).PostActivate(); - } - catch (Exception e) - { - Debug.Console(0, d, "ERROR: Device {1} PostActivation failure: {0}", e.Message, d.Key); - Debug.Console(1, d, "Stack Trace: {0}", e.StackTrace); - } - } - - Debug.Console(0, "****PostActivation complete****"); - - OnAllDevicesActivated(); - } - finally - { - DeviceCriticalSection.Leave(); - } - } - - private static void OnAllDevicesActivated() - { - var handler = AllDevicesActivated; - if (handler != null) - { - handler(null, new EventArgs()); - } - } - - private static void OnAllDevicesRegistered() - { - var handler = AllDevicesRegistered; - if (handler != null) - { - handler(null, new EventArgs()); - } - } - - /// - /// Calls activate on all Device class items - /// - public static void DeactivateAll() - { - try - { - DeviceCriticalSection.Enter(); - foreach (var d in Devices.Values.OfType()) - { - d.Deactivate(); - } - } - finally - { - DeviceCriticalSection.Leave(); - } - } - - //static void ListMethods(string devKey) - //{ - // var dev = GetDeviceForKey(devKey); - // if(dev != null) - // { - // var type = dev.GetType().GetCType(); - // var methods = type.GetMethods(BindingFlags.Public|BindingFlags.Instance); - // var sb = new StringBuilder(); - // sb.AppendLine(string.Format("{2} methods on [{0}] ({1}):", dev.Key, type.Name, methods.Length)); - // foreach (var m in methods) - // { - // sb.Append(string.Format("{0}(", m.Name)); - // var pars = m.GetParameters(); - // foreach (var p in pars) - // sb.Append(string.Format("({1}){0} ", p.Name, p.ParameterType.Name)); - // sb.AppendLine(")"); - // } - // CrestronConsole.ConsoleCommandResponse(sb.ToString()); - // } - //} - - private static void ListDevices(string s) - { - Debug.Console(0, "{0} Devices registered with Device Manager:", Devices.Count); - var sorted = Devices.Values.ToList(); - sorted.Sort((a, b) => a.Key.CompareTo(b.Key)); - - foreach (var d in sorted) - { - var name = d is IKeyName ? (d as IKeyName).Name : "---"; - Debug.Console(0, " [{0}] {1}", d.Key, name); - } - } - - private static void ListDeviceFeedbacks(string devKey) - { - var dev = GetDeviceForKey(devKey); - if (dev == null) - { - Debug.Console(0, "Device '{0}' not found", devKey); - return; - } - var statusDev = dev as IHasFeedback; - if (statusDev == null) - { - Debug.Console(0, "Device '{0}' does not have visible feedbacks", devKey); - return; - } - statusDev.DumpFeedbacksToConsole(true); - } - - //static void ListDeviceCommands(string devKey) - //{ - // var dev = GetDeviceForKey(devKey); - // if (dev == null) - // { - // Debug.Console(0, "Device '{0}' not found", devKey); - // return; - // } - // Debug.Console(0, "This needs to be reworked. Stay tuned.", devKey); - //} - - private static void ListDeviceCommStatuses(string input) - { - var sb = new StringBuilder(); - foreach (var dev in Devices.Values.OfType()) - { - sb.Append(string.Format("{0}: {1}\r", dev, - dev.CommunicationMonitor.Status)); - } - CrestronConsole.ConsoleCommandResponse(sb.ToString()); - } - - - //static void DoDeviceCommand(string command) - //{ - // Debug.Console(0, "Not yet implemented. Stay tuned"); - //} - - public static void AddDevice(IKeyed newDev) - { - try - { - if (!DeviceCriticalSection.TryEnter()) - { - Debug.Console(0, Debug.ErrorLogLevel.Error, "Currently unable to add devices to Device Manager. Please try again"); - return; - } - // Check for device with same key - //var existingDevice = _Devices.FirstOrDefault(d => d.Key.Equals(newDev.Key, StringComparison.OrdinalIgnoreCase)); - ////// If it exists, remove or warn?? - //if (existingDevice != null) - - if (!AddDeviceEnabled) - { - Debug.Console(0, Debug.ErrorLogLevel.Error, "All devices have been activated. Adding new devices is not allowed."); - return; - } - - if (Devices.ContainsKey(newDev.Key)) - { - Debug.Console(0, newDev, "WARNING: A device with this key already exists. Not added to manager"); - return; - } - Devices.Add(newDev.Key, newDev); - //if (!(_Devices.Contains(newDev))) - // _Devices.Add(newDev); - } - finally - { - DeviceCriticalSection.Leave(); - } - } - - public static void AddDevice(IEnumerable devicesToAdd) - { - try - { - if (!DeviceCriticalSection.TryEnter()) - { - Debug.Console(0, Debug.ErrorLogLevel.Error, - "Currently unable to add devices to Device Manager. Please try again"); - return; - } - if (!AddDeviceEnabled) - { - Debug.Console(0, Debug.ErrorLogLevel.Error, - "All devices have been activated. Adding new devices is not allowed."); - return; - } - - foreach (var dev in devicesToAdd) - { - try - { - Devices.Add(dev.Key, dev); - } - catch (ArgumentException ex) - { - Debug.Console(0, "Error adding device with key {0} to Device Manager: {1}\r\nStack Trace: {2}", - dev.Key, ex.Message, ex.StackTrace); - } - } - } - finally - { - DeviceCriticalSection.Leave(); - } - } - - public static void RemoveDevice(IKeyed newDev) - { - try - { - DeviceCriticalSection.Enter(); - if (newDev == null) - return; - if (Devices.ContainsKey(newDev.Key)) - Devices.Remove(newDev.Key); - //if (_Devices.Contains(newDev)) - // _Devices.Remove(newDev); - else - Debug.Console(0, "Device manager: Device '{0}' does not exist in manager. Cannot remove", newDev.Key); - } - finally - { - DeviceCriticalSection.Leave(); - } - } - - public static IEnumerable GetDeviceKeys() - { - //return _Devices.Select(d => d.Key).ToList(); - return Devices.Keys; - } - - public static IEnumerable GetDevices() - { - //return _Devices.Select(d => d.Key).ToList(); - return Devices.Values; - } - - public static IKeyed GetDeviceForKey(string key) - { - //return _Devices.FirstOrDefault(d => d.Key.Equals(key, StringComparison.OrdinalIgnoreCase)); - if (key != null && Devices.ContainsKey(key)) - return Devices[key]; - - return null; - } - - /// - /// Console handler that simulates com port data receive - /// - /// - public static void SimulateComReceiveOnDevice(string s) - { - // devcomsim:1 xyzabc - var match = Regex.Match(s, @"(\S*)\s*(.*)"); - if (match.Groups.Count < 3) - { - CrestronConsole.ConsoleCommandResponse(" Format: devsimreceive:P "); - return; - } - //Debug.Console(2, "**** {0} - {1} ****", match.Groups[1].Value, match.Groups[2].Value); - - var com = GetDeviceForKey(match.Groups[1].Value) as ComPortController; - if (com == null) - { - CrestronConsole.ConsoleCommandResponse("'{0}' is not a comm port device", match.Groups[1].Value); - return; - } - com.SimulateReceive(match.Groups[2].Value); - } - - /// - /// Prints a list of routing inputs and outputs by device key. - /// - /// Device key from which to report data - public static void GetRoutingPorts(string s) - { - var device = GetDeviceForKey(s); - - if (device == null) return; - var inputPorts = ((device as IRoutingInputs) != null) ? (device as IRoutingInputs).InputPorts : null; - var outputPorts = ((device as IRoutingOutputs) != null) ? (device as IRoutingOutputs).OutputPorts : null; - if (inputPorts != null) - { - Debug.Console(0, "Device {0} has {1} Input Ports:", s, inputPorts.Count); - foreach (var routingInputPort in inputPorts) - { - Debug.Console(0, "{0}", routingInputPort.Key); - } - } - if (outputPorts != null) - { - Debug.Console(0, "Device {0} has {1} Output Ports:", s, outputPorts.Count); - foreach (var routingOutputPort in outputPorts) - { - Debug.Console(0, "{0}", routingOutputPort.Key); - } - } - } - - /// - /// Attempts to set the debug level of a device - /// - /// - public static void SetDeviceStreamDebugging(string s) - { - if (String.IsNullOrEmpty(s) || s.Contains("?")) - { - CrestronConsole.ConsoleCommandResponse( - @"SETDEVICESTREAMDEBUG [{deviceKey}] [OFF |TX | RX | BOTH] [timeOutInMinutes] - {deviceKey} [OFF | TX | RX | BOTH] - Device to set stream debugging on, and which setting to use - timeOutInMinutes - Set timeout for stream debugging. Default is 30 minutes"); - return; - } - - var args = s.Split(' '); - - var deviceKey = args[0]; - var setting = args[1]; - - var timeout= String.Empty; - - if (args.Length >= 3) - { - timeout = args[2]; - } - - var device = GetDeviceForKey(deviceKey) as IStreamDebugging; - - if (device == null) - { - Debug.Console(0, "Unable to get device with key: {0}", deviceKey); - return; - } - - eStreamDebuggingSetting debugSetting; - - try - { - debugSetting = (eStreamDebuggingSetting)Enum.Parse(typeof(eStreamDebuggingSetting), setting, true); - } - catch - { - Debug.Console(0, "Unable to convert setting value. Please use off/rx/tx/both"); - return; - } - - if (!string.IsNullOrEmpty(timeout)) - { - try - { - var min = Convert.ToUInt32(timeout); - - device.StreamDebugging.SetDebuggingWithSpecificTimeout(debugSetting, min); - Debug.Console(0, "Device: '{0}' debug level set to {1} for {2} minutes", deviceKey, debugSetting, min); - - } - catch (Exception e) - { - Debug.Console(0, "Unable to convert minutes or settings value. Please use an integer value for minutes. Errro: {0}", e); - } - } - else - { - device.StreamDebugging.SetDebuggingWithDefaultTimeout(debugSetting); - Debug.Console(0, "Device: '{0}' debug level set to {1} for default time (30 minutes)", deviceKey, debugSetting); - } - } - - /// - /// Sets stream debugging settings to off for all devices - /// - public static void DisableAllDeviceStreamDebugging() - { - foreach (var device in AllDevices) - { - var streamDevice = device as IStreamDebugging; - - if (streamDevice != null) - { - streamDevice.StreamDebugging.SetDebuggingWithDefaultTimeout(eStreamDebuggingSetting.Off); - } - } - } - } +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; + +using PepperDash.Core; + + +namespace PepperDash.Essentials.Core +{ + public static class DeviceManager + { + public static event EventHandler AllDevicesActivated; + public static event EventHandler AllDevicesRegistered; + + private static readonly CCriticalSection DeviceCriticalSection = new CCriticalSection(); + private static readonly CEvent AllowAddDevicesCEvent = new CEvent(false, true); + //public static List Devices { get { return _Devices; } } + //static List _Devices = new List(); + + static readonly Dictionary Devices = new Dictionary(StringComparer.OrdinalIgnoreCase); + + /// + /// Returns a copy of all the devices in a list + /// + public static List AllDevices { get { return new List(Devices.Values); } } + + public static bool AddDeviceEnabled; + + public static void Initialize(CrestronControlSystem cs) + { + AddDeviceEnabled = true; + CrestronConsole.AddNewConsoleCommand(ListDeviceCommStatuses, "devcommstatus", "Lists the communication status of all devices", + ConsoleAccessLevelEnum.AccessOperator); + CrestronConsole.AddNewConsoleCommand(ListDeviceFeedbacks, "devfb", "Lists current feedbacks", + ConsoleAccessLevelEnum.AccessOperator); + CrestronConsole.AddNewConsoleCommand(ListDevices, "devlist", "Lists current managed devices", + ConsoleAccessLevelEnum.AccessOperator); + CrestronConsole.AddNewConsoleCommand(DeviceJsonApi.DoDeviceActionWithJson, "devjson", "", + ConsoleAccessLevelEnum.AccessOperator); + CrestronConsole.AddNewConsoleCommand(s => CrestronConsole.ConsoleCommandResponse(DeviceJsonApi.GetProperties(s)), "devprops", "", ConsoleAccessLevelEnum.AccessOperator); + CrestronConsole.AddNewConsoleCommand(s => CrestronConsole.ConsoleCommandResponse(DeviceJsonApi.GetMethods(s)), "devmethods", "", ConsoleAccessLevelEnum.AccessOperator); + CrestronConsole.AddNewConsoleCommand(s => CrestronConsole.ConsoleCommandResponse(DeviceJsonApi.GetApiMethods(s)), "apimethods", "", ConsoleAccessLevelEnum.AccessOperator); + CrestronConsole.AddNewConsoleCommand(SimulateComReceiveOnDevice, "devsimreceive", + "Simulates incoming data on a com device", ConsoleAccessLevelEnum.AccessOperator); + + CrestronConsole.AddNewConsoleCommand(SetDeviceStreamDebugging, "setdevicestreamdebug", "set comm debug [deviceKey] [off/rx/tx/both] ([minutes])", ConsoleAccessLevelEnum.AccessOperator); + CrestronConsole.AddNewConsoleCommand(s => DisableAllDeviceStreamDebugging(), "disableallstreamdebug", "disables stream debugging on all devices", ConsoleAccessLevelEnum.AccessOperator); + } + + /// + /// Calls activate steps on all Device class items + /// + public static void ActivateAll() + { + try + { + OnAllDevicesRegistered(); + + DeviceCriticalSection.Enter(); + AddDeviceEnabled = false; + // PreActivate all devices + Debug.Console(0,"****PreActivation starting...****"); + foreach (var d in Devices.Values) + { + try + { + if (d is Device) + (d as Device).PreActivate(); + } + catch (Exception e) + { + Debug.Console(0, d, "ERROR: Device {1} PreActivation failure: {0}", e.Message, d.Key); + Debug.Console(1, d, "Stack Trace: {0}", e.StackTrace); + } + } + Debug.Console(0, "****PreActivation complete****"); + Debug.Console(0, "****Activation starting...****"); + + // Activate all devices + foreach (var d in Devices.Values) + { + try + { + if (d is Device) + (d as Device).Activate(); + } + catch (Exception e) + { + Debug.Console(0, d, "ERROR: Device {1} Activation failure: {0}", e.Message, d.Key); + Debug.Console(1, d, "Stack Trace: {0}", e.StackTrace); + } + } + + Debug.Console(0, "****Activation complete****"); + Debug.Console(0, "****PostActivation starting...****"); + + // PostActivate all devices + foreach (var d in Devices.Values) + { + try + { + if (d is Device) + (d as Device).PostActivate(); + } + catch (Exception e) + { + Debug.Console(0, d, "ERROR: Device {1} PostActivation failure: {0}", e.Message, d.Key); + Debug.Console(1, d, "Stack Trace: {0}", e.StackTrace); + } + } + + Debug.Console(0, "****PostActivation complete****"); + + OnAllDevicesActivated(); + } + finally + { + DeviceCriticalSection.Leave(); + } + } + + private static void OnAllDevicesActivated() + { + var handler = AllDevicesActivated; + if (handler != null) + { + handler(null, new EventArgs()); + } + } + + private static void OnAllDevicesRegistered() + { + var handler = AllDevicesRegistered; + if (handler != null) + { + handler(null, new EventArgs()); + } + } + + /// + /// Calls activate on all Device class items + /// + public static void DeactivateAll() + { + try + { + DeviceCriticalSection.Enter(); + foreach (var d in Devices.Values.OfType()) + { + d.Deactivate(); + } + } + finally + { + DeviceCriticalSection.Leave(); + } + } + + //static void ListMethods(string devKey) + //{ + // var dev = GetDeviceForKey(devKey); + // if(dev != null) + // { + // var type = dev.GetType().GetCType(); + // var methods = type.GetMethods(BindingFlags.Public|BindingFlags.Instance); + // var sb = new StringBuilder(); + // sb.AppendLine(string.Format("{2} methods on [{0}] ({1}):", dev.Key, type.Name, methods.Length)); + // foreach (var m in methods) + // { + // sb.Append(string.Format("{0}(", m.Name)); + // var pars = m.GetParameters(); + // foreach (var p in pars) + // sb.Append(string.Format("({1}){0} ", p.Name, p.ParameterType.Name)); + // sb.AppendLine(")"); + // } + // CrestronConsole.ConsoleCommandResponse(sb.ToString()); + // } + //} + + private static void ListDevices(string s) + { + Debug.Console(0, "{0} Devices registered with Device Manager:", Devices.Count); + var sorted = Devices.Values.ToList(); + sorted.Sort((a, b) => a.Key.CompareTo(b.Key)); + + foreach (var d in sorted) + { + var name = d is IKeyName ? (d as IKeyName).Name : "---"; + Debug.Console(0, " [{0}] {1}", d.Key, name); + } + } + + private static void ListDeviceFeedbacks(string devKey) + { + var dev = GetDeviceForKey(devKey); + if (dev == null) + { + Debug.Console(0, "Device '{0}' not found", devKey); + return; + } + var statusDev = dev as IHasFeedback; + if (statusDev == null) + { + Debug.Console(0, "Device '{0}' does not have visible feedbacks", devKey); + return; + } + statusDev.DumpFeedbacksToConsole(true); + } + + //static void ListDeviceCommands(string devKey) + //{ + // var dev = GetDeviceForKey(devKey); + // if (dev == null) + // { + // Debug.Console(0, "Device '{0}' not found", devKey); + // return; + // } + // Debug.Console(0, "This needs to be reworked. Stay tuned.", devKey); + //} + + private static void ListDeviceCommStatuses(string input) + { + var sb = new StringBuilder(); + foreach (var dev in Devices.Values.OfType()) + { + sb.Append(string.Format("{0}: {1}\r", dev, + dev.CommunicationMonitor.Status)); + } + CrestronConsole.ConsoleCommandResponse(sb.ToString()); + } + + + //static void DoDeviceCommand(string command) + //{ + // Debug.Console(0, "Not yet implemented. Stay tuned"); + //} + + public static void AddDevice(IKeyed newDev) + { + try + { + if (!DeviceCriticalSection.TryEnter()) + { + Debug.Console(0, Debug.ErrorLogLevel.Error, "Currently unable to add devices to Device Manager. Please try again"); + return; + } + // Check for device with same key + //var existingDevice = _Devices.FirstOrDefault(d => d.Key.Equals(newDev.Key, StringComparison.OrdinalIgnoreCase)); + ////// If it exists, remove or warn?? + //if (existingDevice != null) + + if (!AddDeviceEnabled) + { + Debug.Console(0, Debug.ErrorLogLevel.Error, "All devices have been activated. Adding new devices is not allowed."); + return; + } + + if (Devices.ContainsKey(newDev.Key)) + { + Debug.Console(0, newDev, "WARNING: A device with this key already exists. Not added to manager"); + return; + } + Devices.Add(newDev.Key, newDev); + //if (!(_Devices.Contains(newDev))) + // _Devices.Add(newDev); + } + finally + { + DeviceCriticalSection.Leave(); + } + } + + public static void AddDevice(IEnumerable devicesToAdd) + { + try + { + if (!DeviceCriticalSection.TryEnter()) + { + Debug.Console(0, Debug.ErrorLogLevel.Error, + "Currently unable to add devices to Device Manager. Please try again"); + return; + } + if (!AddDeviceEnabled) + { + Debug.Console(0, Debug.ErrorLogLevel.Error, + "All devices have been activated. Adding new devices is not allowed."); + return; + } + + foreach (var dev in devicesToAdd) + { + try + { + Devices.Add(dev.Key, dev); + } + catch (ArgumentException ex) + { + Debug.Console(0, "Error adding device with key {0} to Device Manager: {1}\r\nStack Trace: {2}", + dev.Key, ex.Message, ex.StackTrace); + } + } + } + finally + { + DeviceCriticalSection.Leave(); + } + } + + public static void RemoveDevice(IKeyed newDev) + { + try + { + DeviceCriticalSection.Enter(); + if (newDev == null) + return; + if (Devices.ContainsKey(newDev.Key)) + Devices.Remove(newDev.Key); + //if (_Devices.Contains(newDev)) + // _Devices.Remove(newDev); + else + Debug.Console(0, "Device manager: Device '{0}' does not exist in manager. Cannot remove", newDev.Key); + } + finally + { + DeviceCriticalSection.Leave(); + } + } + + public static IEnumerable GetDeviceKeys() + { + //return _Devices.Select(d => d.Key).ToList(); + return Devices.Keys; + } + + public static IEnumerable GetDevices() + { + //return _Devices.Select(d => d.Key).ToList(); + return Devices.Values; + } + + public static IKeyed GetDeviceForKey(string key) + { + //return _Devices.FirstOrDefault(d => d.Key.Equals(key, StringComparison.OrdinalIgnoreCase)); + if (key != null && Devices.ContainsKey(key)) + return Devices[key]; + + return null; + } + + /// + /// Console handler that simulates com port data receive + /// + /// + public static void SimulateComReceiveOnDevice(string s) + { + // devcomsim:1 xyzabc + var match = Regex.Match(s, @"(\S*)\s*(.*)"); + if (match.Groups.Count < 3) + { + CrestronConsole.ConsoleCommandResponse(" Format: devsimreceive:P "); + return; + } + //Debug.Console(2, "**** {0} - {1} ****", match.Groups[1].Value, match.Groups[2].Value); + + var com = GetDeviceForKey(match.Groups[1].Value) as ComPortController; + if (com == null) + { + CrestronConsole.ConsoleCommandResponse("'{0}' is not a comm port device", match.Groups[1].Value); + return; + } + com.SimulateReceive(match.Groups[2].Value); + } + + /// + /// Prints a list of routing inputs and outputs by device key. + /// + /// Device key from which to report data + public static void GetRoutingPorts(string s) + { + var device = GetDeviceForKey(s); + + if (device == null) return; + var inputPorts = ((device as IRoutingInputs) != null) ? (device as IRoutingInputs).InputPorts : null; + var outputPorts = ((device as IRoutingOutputs) != null) ? (device as IRoutingOutputs).OutputPorts : null; + if (inputPorts != null) + { + Debug.Console(0, "Device {0} has {1} Input Ports:", s, inputPorts.Count); + foreach (var routingInputPort in inputPorts) + { + Debug.Console(0, "{0}", routingInputPort.Key); + } + } + if (outputPorts != null) + { + Debug.Console(0, "Device {0} has {1} Output Ports:", s, outputPorts.Count); + foreach (var routingOutputPort in outputPorts) + { + Debug.Console(0, "{0}", routingOutputPort.Key); + } + } + } + + /// + /// Attempts to set the debug level of a device + /// + /// + public static void SetDeviceStreamDebugging(string s) + { + if (String.IsNullOrEmpty(s) || s.Contains("?")) + { + CrestronConsole.ConsoleCommandResponse( + @"SETDEVICESTREAMDEBUG [{deviceKey}] [OFF |TX | RX | BOTH] [timeOutInMinutes] + {deviceKey} [OFF | TX | RX | BOTH] - Device to set stream debugging on, and which setting to use + timeOutInMinutes - Set timeout for stream debugging. Default is 30 minutes"); + return; + } + + var args = s.Split(' '); + + var deviceKey = args[0]; + var setting = args[1]; + + var timeout= String.Empty; + + if (args.Length >= 3) + { + timeout = args[2]; + } + + var device = GetDeviceForKey(deviceKey) as IStreamDebugging; + + if (device == null) + { + Debug.Console(0, "Unable to get device with key: {0}", deviceKey); + return; + } + + eStreamDebuggingSetting debugSetting; + + try + { + debugSetting = (eStreamDebuggingSetting)Enum.Parse(typeof(eStreamDebuggingSetting), setting, true); + } + catch + { + Debug.Console(0, "Unable to convert setting value. Please use off/rx/tx/both"); + return; + } + + if (!string.IsNullOrEmpty(timeout)) + { + try + { + var min = Convert.ToUInt32(timeout); + + device.StreamDebugging.SetDebuggingWithSpecificTimeout(debugSetting, min); + Debug.Console(0, "Device: '{0}' debug level set to {1} for {2} minutes", deviceKey, debugSetting, min); + + } + catch (Exception e) + { + Debug.Console(0, "Unable to convert minutes or settings value. Please use an integer value for minutes. Errro: {0}", e); + } + } + else + { + device.StreamDebugging.SetDebuggingWithDefaultTimeout(debugSetting); + Debug.Console(0, "Device: '{0}' debug level set to {1} for default time (30 minutes)", deviceKey, debugSetting); + } + } + + /// + /// Sets stream debugging settings to off for all devices + /// + public static void DisableAllDeviceStreamDebugging() + { + foreach (var device in AllDevices) + { + var streamDevice = device as IStreamDebugging; + + if (streamDevice != null) + { + streamDevice.StreamDebugging.SetDebuggingWithDefaultTimeout(eStreamDebuggingSetting.Off); + } + } + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/DisplayUiConstants.cs b/src/PepperDash.Essentials.Core/Devices/DisplayUiConstants.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/DisplayUiConstants.cs rename to src/PepperDash.Essentials.Core/Devices/DisplayUiConstants.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/EssentialsBridgeableDevice.cs b/src/PepperDash.Essentials.Core/Devices/EssentialsBridgeableDevice.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/EssentialsBridgeableDevice.cs rename to src/PepperDash.Essentials.Core/Devices/EssentialsBridgeableDevice.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/EssentialsDevice.cs b/src/PepperDash.Essentials.Core/Devices/EssentialsDevice.cs similarity index 97% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/EssentialsDevice.cs rename to src/PepperDash.Essentials.Core/Devices/EssentialsDevice.cs index a3ca94f3..bc8af721 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/EssentialsDevice.cs +++ b/src/PepperDash.Essentials.Core/Devices/EssentialsDevice.cs @@ -1,145 +1,145 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharp.Reflection; - -using PepperDash.Core; -using PepperDash.Essentials.Core.Config; - -namespace PepperDash.Essentials.Core -{ - /// - /// Defines the basic needs for an EssentialsDevice to enable it to be build by an IDeviceFactory class - /// - [Description("The base Essentials Device Class")] - public abstract class EssentialsDevice : Device - { - protected EssentialsDevice(string key) - : base(key) - { - SubscribeToActivateComplete(); - } - - protected EssentialsDevice(string key, string name) - : base(key, name) - { - SubscribeToActivateComplete(); - } - - private void SubscribeToActivateComplete() - { - DeviceManager.AllDevicesActivated += DeviceManagerOnAllDevicesActivated; - } - - private void DeviceManagerOnAllDevicesActivated(object sender, EventArgs eventArgs) - { - CrestronInvoke.BeginInvoke((o) => - { - try - { - Initialize(); - } - catch (Exception ex) - { - Debug.Console(0, this, Debug.ErrorLogLevel.Error, "Exception initializing device: {0}", ex.Message); - Debug.Console(1, this, Debug.ErrorLogLevel.Error, "Stack Trace: {0}", ex.StackTrace); - } - }); - } - } - - [AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = true)] - public class DescriptionAttribute : Attribute - { - private string _Description; - - public DescriptionAttribute(string description) - { - //Debug.Console(2, "Setting Description: {0}", description); - _Description = description; - } - - public string Description - { - get { return _Description; } - } - } - - [AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = true)] - public class ConfigSnippetAttribute : Attribute - { - private string _ConfigSnippet; - - public ConfigSnippetAttribute(string configSnippet) - { - //Debug.Console(2, "Setting Config Snippet {0}", configSnippet); - _ConfigSnippet = configSnippet; - } - - public string ConfigSnippet - { - get { return _ConfigSnippet; } - } - } - - /// - /// Devices the basic needs for a Device Factory - /// - public abstract class EssentialsDeviceFactory : IDeviceFactory where T:EssentialsDevice - { - #region IDeviceFactory Members - - /// - /// A list of strings that can be used in the type property of a DeviceConfig object to build an instance of this device - /// - public List TypeNames { get; protected set; } - - /// - /// Loads an item to the DeviceFactory.FactoryMethods dictionary for each entry in the TypeNames list - /// - public void LoadTypeFactories() - { - foreach (var typeName in TypeNames) - { - //Debug.Console(2, "Getting Description Attribute from class: '{0}'", typeof(T).FullName); - var descriptionAttribute = typeof(T).GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[]; - string description = descriptionAttribute[0].Description; - var snippetAttribute = typeof(T).GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[]; - DeviceFactory.AddFactoryForType(typeName.ToLower(), description, typeof(T), BuildDevice); - } - } - - /// - /// The method that will build the device - /// - /// The device config - /// An instance of the device - public abstract EssentialsDevice BuildDevice(DeviceConfig dc); - - #endregion - } - - /// - /// Devices the basic needs for a Device Factory - /// - public abstract class EssentialsPluginDeviceFactory : EssentialsDeviceFactory, IPluginDeviceFactory where T : EssentialsDevice - { - /// - /// Specifies the minimum version of Essentials required for a plugin to run. Must use the format Major.Minor.Build (ex. "1.4.33") - /// - public string MinimumEssentialsFrameworkVersion { get; protected set; } - } - - public abstract class EssentialsPluginDevelopmentDeviceFactory : EssentialsDeviceFactory, IPluginDevelopmentDeviceFactory where T : EssentialsDevice - { - /// - /// Specifies the minimum version of Essentials required for a plugin to run. Must use the format Major.Minor.Build (ex. "1.4.33") - /// - public string MinimumEssentialsFrameworkVersion { get; protected set; } - - public List DevelopmentEssentialsFrameworkVersions { get; protected set; } - } - +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharp.Reflection; + +using PepperDash.Core; +using PepperDash.Essentials.Core.Config; + +namespace PepperDash.Essentials.Core +{ + /// + /// Defines the basic needs for an EssentialsDevice to enable it to be build by an IDeviceFactory class + /// + [Description("The base Essentials Device Class")] + public abstract class EssentialsDevice : Device + { + protected EssentialsDevice(string key) + : base(key) + { + SubscribeToActivateComplete(); + } + + protected EssentialsDevice(string key, string name) + : base(key, name) + { + SubscribeToActivateComplete(); + } + + private void SubscribeToActivateComplete() + { + DeviceManager.AllDevicesActivated += DeviceManagerOnAllDevicesActivated; + } + + private void DeviceManagerOnAllDevicesActivated(object sender, EventArgs eventArgs) + { + CrestronInvoke.BeginInvoke((o) => + { + try + { + Initialize(); + } + catch (Exception ex) + { + Debug.Console(0, this, Debug.ErrorLogLevel.Error, "Exception initializing device: {0}", ex.Message); + Debug.Console(1, this, Debug.ErrorLogLevel.Error, "Stack Trace: {0}", ex.StackTrace); + } + }); + } + } + + [AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = true)] + public class DescriptionAttribute : Attribute + { + private string _Description; + + public DescriptionAttribute(string description) + { + //Debug.Console(2, "Setting Description: {0}", description); + _Description = description; + } + + public string Description + { + get { return _Description; } + } + } + + [AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = true)] + public class ConfigSnippetAttribute : Attribute + { + private string _ConfigSnippet; + + public ConfigSnippetAttribute(string configSnippet) + { + //Debug.Console(2, "Setting Config Snippet {0}", configSnippet); + _ConfigSnippet = configSnippet; + } + + public string ConfigSnippet + { + get { return _ConfigSnippet; } + } + } + + /// + /// Devices the basic needs for a Device Factory + /// + public abstract class EssentialsDeviceFactory : IDeviceFactory where T:EssentialsDevice + { + #region IDeviceFactory Members + + /// + /// A list of strings that can be used in the type property of a DeviceConfig object to build an instance of this device + /// + public List TypeNames { get; protected set; } + + /// + /// Loads an item to the DeviceFactory.FactoryMethods dictionary for each entry in the TypeNames list + /// + public void LoadTypeFactories() + { + foreach (var typeName in TypeNames) + { + //Debug.Console(2, "Getting Description Attribute from class: '{0}'", typeof(T).FullName); + var descriptionAttribute = typeof(T).GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[]; + string description = descriptionAttribute[0].Description; + var snippetAttribute = typeof(T).GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[]; + DeviceFactory.AddFactoryForType(typeName.ToLower(), description, typeof(T), BuildDevice); + } + } + + /// + /// The method that will build the device + /// + /// The device config + /// An instance of the device + public abstract EssentialsDevice BuildDevice(DeviceConfig dc); + + #endregion + } + + /// + /// Devices the basic needs for a Device Factory + /// + public abstract class EssentialsPluginDeviceFactory : EssentialsDeviceFactory, IPluginDeviceFactory where T : EssentialsDevice + { + /// + /// Specifies the minimum version of Essentials required for a plugin to run. Must use the format Major.Minor.Build (ex. "1.4.33") + /// + public string MinimumEssentialsFrameworkVersion { get; protected set; } + } + + public abstract class EssentialsPluginDevelopmentDeviceFactory : EssentialsDeviceFactory, IPluginDevelopmentDeviceFactory where T : EssentialsDevice + { + /// + /// Specifies the minimum version of Essentials required for a plugin to run. Must use the format Major.Minor.Build (ex. "1.4.33") + /// + public string MinimumEssentialsFrameworkVersion { get; protected set; } + + public List DevelopmentEssentialsFrameworkVersions { get; protected set; } + } + } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/FIND HOMES Interfaces.cs b/src/PepperDash.Essentials.Core/Devices/FIND HOMES Interfaces.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/FIND HOMES Interfaces.cs rename to src/PepperDash.Essentials.Core/Devices/FIND HOMES Interfaces.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/GenericIRController.cs b/src/PepperDash.Essentials.Core/Devices/GenericIRController.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/GenericIRController.cs rename to src/PepperDash.Essentials.Core/Devices/GenericIRController.cs index 409562a2..3c35b686 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/GenericIRController.cs +++ b/src/PepperDash.Essentials.Core/Devices/GenericIRController.cs @@ -1,7 +1,9 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using Crestron.SimplSharpPro.DeviceSupport; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Bridges; diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/GenericMonitoredTcpDevice.cs b/src/PepperDash.Essentials.Core/Devices/GenericMonitoredTcpDevice.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/GenericMonitoredTcpDevice.cs rename to src/PepperDash.Essentials.Core/Devices/GenericMonitoredTcpDevice.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IAttachVideoStatusExtensions.cs b/src/PepperDash.Essentials.Core/Devices/IAttachVideoStatusExtensions.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IAttachVideoStatusExtensions.cs rename to src/PepperDash.Essentials.Core/Devices/IAttachVideoStatusExtensions.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IDspPreset.cs b/src/PepperDash.Essentials.Core/Devices/IDspPreset.cs similarity index 94% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IDspPreset.cs rename to src/PepperDash.Essentials.Core/Devices/IDspPreset.cs index 2ec63fcb..645339bb 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IDspPreset.cs +++ b/src/PepperDash.Essentials.Core/Devices/IDspPreset.cs @@ -1,17 +1,17 @@ -using System.Collections.Generic; - -namespace PepperDash.Essentials.Core -{ - public interface IHasDspPresets - { - List Presets { get; } - - void RecallPreset(IDspPreset preset); - - } - - public interface IDspPreset - { - string Name { get; } - } +using System.Collections.Generic; + +namespace PepperDash.Essentials.Core +{ + public interface IHasDspPresets + { + List Presets { get; } + + void RecallPreset(IDspPreset preset); + + } + + public interface IDspPreset + { + string Name { get; } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks.cs b/src/PepperDash.Essentials.Core/Devices/IHasFeedbacks.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks.cs rename to src/PepperDash.Essentials.Core/Devices/IHasFeedbacks.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IProjectorInterfaces.cs b/src/PepperDash.Essentials.Core/Devices/IProjectorInterfaces.cs similarity index 95% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IProjectorInterfaces.cs rename to src/PepperDash.Essentials.Core/Devices/IProjectorInterfaces.cs index 70e2e215..c0cb33ed 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IProjectorInterfaces.cs +++ b/src/PepperDash.Essentials.Core/Devices/IProjectorInterfaces.cs @@ -1,22 +1,22 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -namespace PepperDash.Essentials.Core -{ - public interface IBasicVideoMute - { - void VideoMuteToggle(); - } - - public interface IBasicVideoMuteWithFeedback : IBasicVideoMute - { - BoolFeedback VideoMuteIsOn { get; } - - void VideoMuteOn(); - void VideoMuteOff(); - - } +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +namespace PepperDash.Essentials.Core +{ + public interface IBasicVideoMute + { + void VideoMuteToggle(); + } + + public interface IBasicVideoMuteWithFeedback : IBasicVideoMute + { + BoolFeedback VideoMuteIsOn { get; } + + void VideoMuteOn(); + void VideoMuteOff(); + + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IReconfigurableDevice.cs b/src/PepperDash.Essentials.Core/Devices/IReconfigurableDevice.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IReconfigurableDevice.cs rename to src/PepperDash.Essentials.Core/Devices/IReconfigurableDevice.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IUsageTracking.cs b/src/PepperDash.Essentials.Core/Devices/IUsageTracking.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IUsageTracking.cs rename to src/PepperDash.Essentials.Core/Devices/IUsageTracking.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IVolumeAndAudioInterfaces.cs b/src/PepperDash.Essentials.Core/Devices/IVolumeAndAudioInterfaces.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IVolumeAndAudioInterfaces.cs rename to src/PepperDash.Essentials.Core/Devices/IVolumeAndAudioInterfaces.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IrOutputPortController.cs b/src/PepperDash.Essentials.Core/Devices/IrOutputPortController.cs similarity index 95% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IrOutputPortController.cs rename to src/PepperDash.Essentials.Core/Devices/IrOutputPortController.cs index cce1d46e..d3d6e19e 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IrOutputPortController.cs +++ b/src/PepperDash.Essentials.Core/Devices/IrOutputPortController.cs @@ -1,169 +1,171 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; -using Newtonsoft.Json.Linq; -using PepperDash.Essentials.Core.Config; - - -using PepperDash.Core; - -namespace PepperDash.Essentials.Core -{ - - /// - /// IR port wrapper. May act standalone - /// - public class IrOutputPortController : Device - { - uint IrPortUid; - IROutputPort IrPort; - - public BoolFeedback DriverLoaded { get; private set; } - - public ushort StandardIrPulseTime { get; set; } - public string DriverFilepath { get; private set; } - public bool DriverIsLoaded { get; private set; } - - public string[] IrFileCommands { get { return IrPort.AvailableStandardIRCmds(IrPortUid); } } - - /// - /// Constructor for IrDevice base class. If a null port is provided, this class will - /// still function without trying to talk to a port. - /// - public IrOutputPortController(string key, IROutputPort port, string irDriverFilepath) - : base(key) - { - //if (port == null) throw new ArgumentNullException("port"); - - DriverLoaded = new BoolFeedback(() => DriverIsLoaded); - IrPort = port; - if (port == null) - { - Debug.Console(0, this, "WARNING No valid IR Port assigned to controller. IR will not function"); - return; - } - LoadDriver(irDriverFilepath); - } - - public IrOutputPortController(string key, Func postActivationFunc, - DeviceConfig config) - : base(key) - { - DriverLoaded = new BoolFeedback(() => DriverIsLoaded); - AddPostActivationAction(() => - { - IrPort = postActivationFunc(config); - - if (IrPort == null) - { - Debug.Console(0, this, "WARNING No valid IR Port assigned to controller. IR will not function"); - return; - } - - var filePath = Global.FilePathPrefix + "ir" + Global.DirectorySeparator + config.Properties["control"]["irFile"].Value(); - Debug.Console(1, "*************Attempting to load IR file: {0}***************", filePath); - - LoadDriver(filePath); - - PrintAvailableCommands(); - }); - } - - public void PrintAvailableCommands() - { - Debug.Console(2, this, "Available IR Commands in IR File {0}", IrPortUid); - foreach (var cmd in IrPort.AvailableIRCmds()) - { - Debug.Console(2, this, "{0}", cmd); - } - } - - - /// - /// Loads the IR driver at path - /// - /// - public void LoadDriver(string path) - { - Debug.Console(2, this, "***Loading IR File***"); - if (string.IsNullOrEmpty(path)) path = DriverFilepath; - try - { - IrPortUid = IrPort.LoadIRDriver(path); - DriverFilepath = path; - StandardIrPulseTime = 200; - DriverIsLoaded = true; - - DriverLoaded.FireUpdate(); - } - catch - { - DriverIsLoaded = false; - var message = string.Format("WARNING IR Driver '{0}' failed to load", path); - Debug.Console(0, this, Debug.ErrorLogLevel.Error, message); - DriverLoaded.FireUpdate(); - } - } - - - /// - /// Starts and stops IR command on driver. Safe for missing commands - /// - public virtual void PressRelease(string command, bool state) - { - Debug.Console(2, this, "IR:'{0}'={1}", command, state); - if (IrPort == null) - { - Debug.Console(2, this, "WARNING No IR Port assigned to controller"); - return; - } - if (!DriverIsLoaded) - { - Debug.Console(2, this, "WARNING IR driver is not loaded"); - return; - } - if (state) - { - if (IrPort.IsIRCommandAvailable(IrPortUid, command)) - IrPort.Press(IrPortUid, command); - else - NoIrCommandError(command); - } - else - IrPort.Release(); - } - - /// - /// Pulses a command on driver. Safe for missing commands - /// - public virtual void Pulse(string command, ushort time) - { - if (IrPort == null) - { - Debug.Console(2, this, "WARNING No IR Port assigned to controller"); - return; - } - if (!DriverIsLoaded) - { - Debug.Console(2, this, "WARNING IR driver is not loaded"); - return; - } - if (IrPort.IsIRCommandAvailable(IrPortUid, command)) - IrPort.PressAndRelease(IrPortUid, command, time); - else - NoIrCommandError(command); - } - - /// - /// Notifies the console when a bad command is used. - /// - protected void NoIrCommandError(string command) - { - Debug.Console(2, this, "Device {0}: IR Driver {1} does not contain command {2}", - Key, IrPort.IRDriverFileNameByIRDriverId(IrPortUid), command); - } - } +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DeviceSupport; +using Full.Newtonsoft.Json.Linq; +using PepperDash.Essentials.Core.Config; + + +using PepperDash.Core; + +namespace PepperDash.Essentials.Core +{ + + /// + /// IR port wrapper. May act standalone + /// + public class IrOutputPortController : Device + { + uint IrPortUid; + IROutputPort IrPort; + + public BoolFeedback DriverLoaded { get; private set; } + + public ushort StandardIrPulseTime { get; set; } + public string DriverFilepath { get; private set; } + public bool DriverIsLoaded { get; private set; } + + public string[] IrFileCommands { get { return IrPort.AvailableStandardIRCmds(IrPortUid); } } + + /// + /// Constructor for IrDevice base class. If a null port is provided, this class will + /// still function without trying to talk to a port. + /// + public IrOutputPortController(string key, IROutputPort port, string irDriverFilepath) + : base(key) + { + //if (port == null) throw new ArgumentNullException("port"); + + DriverLoaded = new BoolFeedback(() => DriverIsLoaded); + IrPort = port; + if (port == null) + { + Debug.Console(0, this, "WARNING No valid IR Port assigned to controller. IR will not function"); + return; + } + LoadDriver(irDriverFilepath); + } + + public IrOutputPortController(string key, Func postActivationFunc, + DeviceConfig config) + : base(key) + { + DriverLoaded = new BoolFeedback(() => DriverIsLoaded); + AddPostActivationAction(() => + { + IrPort = postActivationFunc(config); + + if (IrPort == null) + { + Debug.Console(0, this, "WARNING No valid IR Port assigned to controller. IR will not function"); + return; + } + + var filePath = Global.FilePathPrefix + "ir" + Global.DirectorySeparator + config.Properties["control"]["irFile"].Value(); + Debug.Console(1, "*************Attempting to load IR file: {0}***************", filePath); + + LoadDriver(filePath); + + PrintAvailableCommands(); + }); + } + + public void PrintAvailableCommands() + { + Debug.Console(2, this, "Available IR Commands in IR File {0}", IrPortUid); + foreach (var cmd in IrPort.AvailableIRCmds()) + { + Debug.Console(2, this, "{0}", cmd); + } + } + + + /// + /// Loads the IR driver at path + /// + /// + public void LoadDriver(string path) + { + Debug.Console(2, this, "***Loading IR File***"); + if (string.IsNullOrEmpty(path)) path = DriverFilepath; + try + { + IrPortUid = IrPort.LoadIRDriver(path); + DriverFilepath = path; + StandardIrPulseTime = 200; + DriverIsLoaded = true; + + DriverLoaded.FireUpdate(); + } + catch + { + DriverIsLoaded = false; + var message = string.Format("WARNING IR Driver '{0}' failed to load", path); + Debug.Console(0, this, Debug.ErrorLogLevel.Error, message); + DriverLoaded.FireUpdate(); + } + } + + + /// + /// Starts and stops IR command on driver. Safe for missing commands + /// + public virtual void PressRelease(string command, bool state) + { + Debug.Console(2, this, "IR:'{0}'={1}", command, state); + if (IrPort == null) + { + Debug.Console(2, this, "WARNING No IR Port assigned to controller"); + return; + } + if (!DriverIsLoaded) + { + Debug.Console(2, this, "WARNING IR driver is not loaded"); + return; + } + if (state) + { + if (IrPort.IsIRCommandAvailable(IrPortUid, command)) + IrPort.Press(IrPortUid, command); + else + NoIrCommandError(command); + } + else + IrPort.Release(); + } + + /// + /// Pulses a command on driver. Safe for missing commands + /// + public virtual void Pulse(string command, ushort time) + { + if (IrPort == null) + { + Debug.Console(2, this, "WARNING No IR Port assigned to controller"); + return; + } + if (!DriverIsLoaded) + { + Debug.Console(2, this, "WARNING IR driver is not loaded"); + return; + } + if (IrPort.IsIRCommandAvailable(IrPortUid, command)) + IrPort.PressAndRelease(IrPortUid, command, time); + else + NoIrCommandError(command); + } + + /// + /// Notifies the console when a bad command is used. + /// + protected void NoIrCommandError(string command) + { + Debug.Console(2, this, "Device {0}: IR Driver {1} does not contain command {2}", + Key, IrPort.IRDriverFileNameByIRDriverId(IrPortUid), command); + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/PC/InRoomPc.cs b/src/PepperDash.Essentials.Core/Devices/PC/InRoomPc.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/PC/InRoomPc.cs rename to src/PepperDash.Essentials.Core/Devices/PC/InRoomPc.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/PC/Laptop.cs b/src/PepperDash.Essentials.Core/Devices/PC/Laptop.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/PC/Laptop.cs rename to src/PepperDash.Essentials.Core/Devices/PC/Laptop.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/PduInterfaces.cs b/src/PepperDash.Essentials.Core/Devices/PduInterfaces.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/PduInterfaces.cs rename to src/PepperDash.Essentials.Core/Devices/PduInterfaces.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/PresentationDeviceType.cs b/src/PepperDash.Essentials.Core/Devices/PresentationDeviceType.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/PresentationDeviceType.cs rename to src/PepperDash.Essentials.Core/Devices/PresentationDeviceType.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/ReconfigurableDevice.cs b/src/PepperDash.Essentials.Core/Devices/ReconfigurableDevice.cs similarity index 95% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/ReconfigurableDevice.cs rename to src/PepperDash.Essentials.Core/Devices/ReconfigurableDevice.cs index a54f728d..50bf90bd 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/ReconfigurableDevice.cs +++ b/src/PepperDash.Essentials.Core/Devices/ReconfigurableDevice.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -7,8 +9,8 @@ using Crestron.SimplSharpPro.DeviceSupport; using PepperDash.Core; using PepperDash.Essentials.Core.Bridges; using PepperDash.Essentials.Core.Config; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; namespace PepperDash.Essentials.Core.Devices { diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/SmartObjectBaseTypes.cs b/src/PepperDash.Essentials.Core/Devices/SmartObjectBaseTypes.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/SmartObjectBaseTypes.cs rename to src/PepperDash.Essentials.Core/Devices/SmartObjectBaseTypes.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/SourceListItem.cs b/src/PepperDash.Essentials.Core/Devices/SourceListItem.cs similarity index 97% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/SourceListItem.cs rename to src/PepperDash.Essentials.Core/Devices/SourceListItem.cs index e302a2a4..87c66e75 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/SourceListItem.cs +++ b/src/PepperDash.Essentials.Core/Devices/SourceListItem.cs @@ -1,12 +1,14 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using Crestron.SimplSharp; using Crestron.SimplSharp.CrestronIO; using Crestron.SimplSharpPro; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Converters; +using Full.Newtonsoft.Json.Linq; using PepperDash.Core; namespace PepperDash.Essentials.Core diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/VolumeDeviceChangeEventArgs.cs b/src/PepperDash.Essentials.Core/Devices/VolumeDeviceChangeEventArgs.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/VolumeDeviceChangeEventArgs.cs rename to src/PepperDash.Essentials.Core/Devices/VolumeDeviceChangeEventArgs.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Display/BasicIrDisplay.cs b/src/PepperDash.Essentials.Core/Display/BasicIrDisplay.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Display/BasicIrDisplay.cs rename to src/PepperDash.Essentials.Core/Display/BasicIrDisplay.cs index 3c691c19..7a8eb8b1 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Display/BasicIrDisplay.cs +++ b/src/PepperDash.Essentials.Core/Display/BasicIrDisplay.cs @@ -1,242 +1,242 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; -using PepperDash.Essentials.Core.Bridges; -using PepperDash.Essentials.Core.Routing; - -namespace PepperDash.Essentials.Core -{ - [Description("Wrapper class for a Basic IR Display")] - public class BasicIrDisplay : DisplayBase, IBasicVolumeControls, IBridgeAdvanced - { - public IrOutputPortController IrPort { get; private set; } - public ushort IrPulseTime { get; set; } - - [Obsolete("This property will be removed in version 2.0.0")] - public override BoolFeedback PowerIsOnFeedback { get; protected set; } - - protected Func PowerIsOnFeedbackFunc - { - get { return () => _PowerIsOn; } - } - protected override Func IsCoolingDownFeedbackFunc - { - get { return () => _IsCoolingDown; } - } - protected override Func IsWarmingUpFeedbackFunc - { - get { return () => _IsWarmingUp; } - } - - bool _PowerIsOn; - bool _IsWarmingUp; - bool _IsCoolingDown; - - public BasicIrDisplay(string key, string name, IROutputPort port, string irDriverFilepath) - : base(key, name) - { - IrPort = new IrOutputPortController(key + "-ir", port, irDriverFilepath); - DeviceManager.AddDevice(IrPort); - - PowerIsOnFeedback = new BoolFeedback(PowerIsOnFeedbackFunc); - - PowerIsOnFeedback.OutputChange += (o, a) => - { - Debug.Console(2, this, "Power on={0}", _PowerIsOn); - if (_PowerIsOn) StartWarmingTimer(); - else StartCoolingTimer(); - }; - IsWarmingUpFeedback.OutputChange += (o, a) => Debug.Console(2, this, "Warming up={0}", _IsWarmingUp); - IsCoolingDownFeedback.OutputChange += (o, a) => Debug.Console(2, this, "Cooling down={0}", _IsCoolingDown); - - InputPorts.AddRange(new RoutingPortCollection - { - new RoutingInputPort(RoutingPortNames.HdmiIn1, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, new Action(Hdmi1), this, false), - new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, new Action(Hdmi2), this, false), - new RoutingInputPort(RoutingPortNames.HdmiIn3, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, new Action(Hdmi3), this, false), - new RoutingInputPort(RoutingPortNames.HdmiIn4, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, new Action(Hdmi4), this, false), - new RoutingInputPort(RoutingPortNames.ComponentIn, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, new Action(Component1), this, false), - new RoutingInputPort(RoutingPortNames.CompositeIn, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, new Action(Video1), this, false), - new RoutingInputPort(RoutingPortNames.AntennaIn, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, new Action(Antenna), this, false), - }); - } - - public void Hdmi1() - { - IrPort.Pulse(IROutputStandardCommands.IROut_HDMI_1, IrPulseTime); - } - - public void Hdmi2() - { - IrPort.Pulse(IROutputStandardCommands.IROut_HDMI_2, IrPulseTime); - } - - public void Hdmi3() - { - IrPort.Pulse(IROutputStandardCommands.IROut_HDMI_3, IrPulseTime); - } - - public void Hdmi4() - { - IrPort.Pulse(IROutputStandardCommands.IROut_HDMI_4, IrPulseTime); - } - - public void Component1() - { - IrPort.Pulse(IROutputStandardCommands.IROut_COMPONENT_1, IrPulseTime); - } - - public void Video1() - { - IrPort.Pulse(IROutputStandardCommands.IROut_VIDEO_1, IrPulseTime); - } - - public void Antenna() - { - IrPort.Pulse(IROutputStandardCommands.IROut_ANTENNA, IrPulseTime); - } - - #region IPower Members - - public override void PowerOn() - { - IrPort.Pulse(IROutputStandardCommands.IROut_POWER_ON, IrPulseTime); - _PowerIsOn = true; - PowerIsOnFeedback.FireUpdate(); - } - - public override void PowerOff() - { - _PowerIsOn = false; - PowerIsOnFeedback.FireUpdate(); - IrPort.Pulse(IROutputStandardCommands.IROut_POWER_OFF, IrPulseTime); - } - - public override void PowerToggle() - { - _PowerIsOn = false; - PowerIsOnFeedback.FireUpdate(); - IrPort.Pulse(IROutputStandardCommands.IROut_POWER, IrPulseTime); - } - - #endregion - - #region IBasicVolumeControls Members - - public void VolumeUp(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_VOL_PLUS, pressRelease); - } - - public void VolumeDown(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_VOL_MINUS, pressRelease); - } - - public void MuteToggle() - { - IrPort.Pulse(IROutputStandardCommands.IROut_MUTE, 200); - } - - #endregion - - void StartWarmingTimer() - { - _IsWarmingUp = true; - IsWarmingUpFeedback.FireUpdate(); - new CTimer(o => { - _IsWarmingUp = false; - IsWarmingUpFeedback.FireUpdate(); - }, 10000); - } - - void StartCoolingTimer() - { - _IsCoolingDown = true; - IsCoolingDownFeedback.FireUpdate(); - new CTimer(o => - { - _IsCoolingDown = false; - IsCoolingDownFeedback.FireUpdate(); - }, 7000); - } - - #region IRoutingSink Members - - /// - /// Typically called by the discovery routing algorithm. - /// - /// A delegate containing the input selector method to call - public override void ExecuteSwitch(object inputSelector) - { - Debug.Console(2, this, "Switching to input '{0}'", (inputSelector as Action).ToString()); - - Action finishSwitch = () => - { - var action = inputSelector as Action; - if (action != null) - action(); - }; - - if (!PowerIsOnFeedback.BoolValue) - { - PowerOn(); - EventHandler oneTimer = null; - oneTimer = (o, a) => - { - if (IsWarmingUpFeedback.BoolValue) return; // Only catch done warming - IsWarmingUpFeedback.OutputChange -= oneTimer; - finishSwitch(); - }; - IsWarmingUpFeedback.OutputChange += oneTimer; - } - else // Do it! - finishSwitch(); - } - - #endregion - - public void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - LinkDisplayToApi(this, trilist, joinStart, joinMapKey, bridge); - } - } - - public class BasicIrDisplayFactory : EssentialsDeviceFactory - { - public BasicIrDisplayFactory() - { - TypeNames = new List() { "basicirdisplay" }; - } - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - Debug.Console(1, "Factory Attempting to create new BasicIrDisplay Device"); - var ir = IRPortHelper.GetIrPort(dc.Properties); - if (ir != null) - { - var display = new BasicIrDisplay(dc.Key, dc.Name, ir.Port, ir.FileName); - display.IrPulseTime = 200; // Set default pulse time for IR commands. - return display; - } - - return null; - } - } - +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DeviceSupport; + +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Routing; + +namespace PepperDash.Essentials.Core +{ + [Description("Wrapper class for a Basic IR Display")] + public class BasicIrDisplay : DisplayBase, IBasicVolumeControls, IBridgeAdvanced + { + public IrOutputPortController IrPort { get; private set; } + public ushort IrPulseTime { get; set; } + + [Obsolete("This property will be removed in version 2.0.0")] + public override BoolFeedback PowerIsOnFeedback { get; protected set; } + + protected Func PowerIsOnFeedbackFunc + { + get { return () => _PowerIsOn; } + } + protected override Func IsCoolingDownFeedbackFunc + { + get { return () => _IsCoolingDown; } + } + protected override Func IsWarmingUpFeedbackFunc + { + get { return () => _IsWarmingUp; } + } + + bool _PowerIsOn; + bool _IsWarmingUp; + bool _IsCoolingDown; + + public BasicIrDisplay(string key, string name, IROutputPort port, string irDriverFilepath) + : base(key, name) + { + IrPort = new IrOutputPortController(key + "-ir", port, irDriverFilepath); + DeviceManager.AddDevice(IrPort); + + PowerIsOnFeedback = new BoolFeedback(PowerIsOnFeedbackFunc); + + PowerIsOnFeedback.OutputChange += (o, a) => + { + Debug.Console(2, this, "Power on={0}", _PowerIsOn); + if (_PowerIsOn) StartWarmingTimer(); + else StartCoolingTimer(); + }; + IsWarmingUpFeedback.OutputChange += (o, a) => Debug.Console(2, this, "Warming up={0}", _IsWarmingUp); + IsCoolingDownFeedback.OutputChange += (o, a) => Debug.Console(2, this, "Cooling down={0}", _IsCoolingDown); + + InputPorts.AddRange(new RoutingPortCollection + { + new RoutingInputPort(RoutingPortNames.HdmiIn1, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, new Action(Hdmi1), this, false), + new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, new Action(Hdmi2), this, false), + new RoutingInputPort(RoutingPortNames.HdmiIn3, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, new Action(Hdmi3), this, false), + new RoutingInputPort(RoutingPortNames.HdmiIn4, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, new Action(Hdmi4), this, false), + new RoutingInputPort(RoutingPortNames.ComponentIn, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, new Action(Component1), this, false), + new RoutingInputPort(RoutingPortNames.CompositeIn, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, new Action(Video1), this, false), + new RoutingInputPort(RoutingPortNames.AntennaIn, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, new Action(Antenna), this, false), + }); + } + + public void Hdmi1() + { + IrPort.Pulse(IROutputStandardCommands.IROut_HDMI_1, IrPulseTime); + } + + public void Hdmi2() + { + IrPort.Pulse(IROutputStandardCommands.IROut_HDMI_2, IrPulseTime); + } + + public void Hdmi3() + { + IrPort.Pulse(IROutputStandardCommands.IROut_HDMI_3, IrPulseTime); + } + + public void Hdmi4() + { + IrPort.Pulse(IROutputStandardCommands.IROut_HDMI_4, IrPulseTime); + } + + public void Component1() + { + IrPort.Pulse(IROutputStandardCommands.IROut_COMPONENT_1, IrPulseTime); + } + + public void Video1() + { + IrPort.Pulse(IROutputStandardCommands.IROut_VIDEO_1, IrPulseTime); + } + + public void Antenna() + { + IrPort.Pulse(IROutputStandardCommands.IROut_ANTENNA, IrPulseTime); + } + + #region IPower Members + + public override void PowerOn() + { + IrPort.Pulse(IROutputStandardCommands.IROut_POWER_ON, IrPulseTime); + _PowerIsOn = true; + PowerIsOnFeedback.FireUpdate(); + } + + public override void PowerOff() + { + _PowerIsOn = false; + PowerIsOnFeedback.FireUpdate(); + IrPort.Pulse(IROutputStandardCommands.IROut_POWER_OFF, IrPulseTime); + } + + public override void PowerToggle() + { + _PowerIsOn = false; + PowerIsOnFeedback.FireUpdate(); + IrPort.Pulse(IROutputStandardCommands.IROut_POWER, IrPulseTime); + } + + #endregion + + #region IBasicVolumeControls Members + + public void VolumeUp(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_VOL_PLUS, pressRelease); + } + + public void VolumeDown(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_VOL_MINUS, pressRelease); + } + + public void MuteToggle() + { + IrPort.Pulse(IROutputStandardCommands.IROut_MUTE, 200); + } + + #endregion + + void StartWarmingTimer() + { + _IsWarmingUp = true; + IsWarmingUpFeedback.FireUpdate(); + new CTimer(o => { + _IsWarmingUp = false; + IsWarmingUpFeedback.FireUpdate(); + }, 10000); + } + + void StartCoolingTimer() + { + _IsCoolingDown = true; + IsCoolingDownFeedback.FireUpdate(); + new CTimer(o => + { + _IsCoolingDown = false; + IsCoolingDownFeedback.FireUpdate(); + }, 7000); + } + + #region IRoutingSink Members + + /// + /// Typically called by the discovery routing algorithm. + /// + /// A delegate containing the input selector method to call + public override void ExecuteSwitch(object inputSelector) + { + Debug.Console(2, this, "Switching to input '{0}'", (inputSelector as Action).ToString()); + + Action finishSwitch = () => + { + var action = inputSelector as Action; + if (action != null) + action(); + }; + + if (!PowerIsOnFeedback.BoolValue) + { + PowerOn(); + EventHandler oneTimer = null; + oneTimer = (o, a) => + { + if (IsWarmingUpFeedback.BoolValue) return; // Only catch done warming + IsWarmingUpFeedback.OutputChange -= oneTimer; + finishSwitch(); + }; + IsWarmingUpFeedback.OutputChange += oneTimer; + } + else // Do it! + finishSwitch(); + } + + #endregion + + public void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + LinkDisplayToApi(this, trilist, joinStart, joinMapKey, bridge); + } + } + + public class BasicIrDisplayFactory : EssentialsDeviceFactory + { + public BasicIrDisplayFactory() + { + TypeNames = new List() { "basicirdisplay" }; + } + + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + Debug.Console(1, "Factory Attempting to create new BasicIrDisplay Device"); + var ir = IRPortHelper.GetIrPort(dc.Properties); + if (ir != null) + { + var display = new BasicIrDisplay(dc.Key, dc.Name, ir.Port, ir.FileName); + display.IrPulseTime = 200; // Set default pulse time for IR commands. + return display; + } + + return null; + } + } + } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Display/DisplayBase.cs b/src/PepperDash.Essentials.Core/Display/DisplayBase.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Display/DisplayBase.cs rename to src/PepperDash.Essentials.Core/Display/DisplayBase.cs index d374099f..a8de2796 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Display/DisplayBase.cs +++ b/src/PepperDash.Essentials.Core/Display/DisplayBase.cs @@ -1,326 +1,328 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.DM; -using Crestron.SimplSharpPro.DM.Endpoints; -using Crestron.SimplSharpPro.DM.Endpoints.Transmitters; -using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Essentials.Core.Bridges; - - -namespace PepperDash.Essentials.Core -{ - /// - /// - /// - public abstract class DisplayBase : EssentialsDevice, IHasFeedback, IRoutingSinkWithSwitching, IHasPowerControl, IWarmingCooling, IUsageTracking, IPower - { - public event SourceInfoChangeHandler CurrentSourceChange; - - public string CurrentSourceInfoKey { get; set; } - public SourceListItem CurrentSourceInfo - { - get - { - return _CurrentSourceInfo; - } - set - { - if (value == _CurrentSourceInfo) return; - - var handler = CurrentSourceChange; - - if (handler != null) - handler(_CurrentSourceInfo, ChangeType.WillChange); - - _CurrentSourceInfo = value; - - if (handler != null) - handler(_CurrentSourceInfo, ChangeType.DidChange); - } - } - SourceListItem _CurrentSourceInfo; - - public BoolFeedback IsCoolingDownFeedback { get; protected set; } - public BoolFeedback IsWarmingUpFeedback { get; private set; } - - [Obsolete("This property will be removed in version 2.0.0")] - public abstract BoolFeedback PowerIsOnFeedback { get; protected set; } - - public UsageTracking UsageTracker { get; set; } - - public uint WarmupTime { get; set; } - public uint CooldownTime { get; set; } - - /// - /// Bool Func that will provide a value for the PowerIsOn Output. Must be implemented - /// by concrete sub-classes - /// - abstract protected Func IsCoolingDownFeedbackFunc { get; } - abstract protected Func IsWarmingUpFeedbackFunc { get; } - - - protected CTimer WarmupTimer; - protected CTimer CooldownTimer; - - #region IRoutingInputs Members - - public RoutingPortCollection InputPorts { get; private set; } - - #endregion - - protected DisplayBase(string key, string name) - : base(key, name) - { - IsCoolingDownFeedback = new BoolFeedback("IsCoolingDown", IsCoolingDownFeedbackFunc); - IsWarmingUpFeedback = new BoolFeedback("IsWarmingUp", IsWarmingUpFeedbackFunc); - - InputPorts = new RoutingPortCollection(); - - } - - public abstract void PowerOn(); - public abstract void PowerOff(); - public abstract void PowerToggle(); - - public virtual FeedbackCollection Feedbacks - { - get - { - return new FeedbackCollection - { - IsCoolingDownFeedback, - IsWarmingUpFeedback - }; - } - } - - public abstract void ExecuteSwitch(object selector); - - protected void LinkDisplayToApi(DisplayBase displayDevice, BasicTriList trilist, uint joinStart, string joinMapKey, - EiscApiAdvanced bridge) - { - var joinMap = new DisplayControllerJoinMap(joinStart); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - if (bridge != null) - { - bridge.AddJoinMap(Key, joinMap); - } - else - { - Debug.Console(0,this,"Please update config to use 'eiscapiadvanced' to get all join map features for this device."); - } - - LinkDisplayToApi(displayDevice, trilist, joinMap); - } - - protected void LinkDisplayToApi(DisplayBase displayDevice, BasicTriList trilist, DisplayControllerJoinMap joinMap) - { - Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - Debug.Console(0, "Linking to Display: {0}", displayDevice.Name); - - trilist.StringInput[joinMap.Name.JoinNumber].StringValue = displayDevice.Name; - - var commMonitor = displayDevice as ICommunicationMonitor; - if (commMonitor != null) - { - commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); - } - - var inputNumber = 0; - var inputKeys = new List(); - - var inputNumberFeedback = new IntFeedback(() => inputNumber); - - // Two way feedbacks - var twoWayDisplay = displayDevice as TwoWayDisplayBase; - - if (twoWayDisplay != null) - { - trilist.SetBool(joinMap.IsTwoWayDisplay.JoinNumber, true); - - twoWayDisplay.CurrentInputFeedback.OutputChange += (o, a) => Debug.Console(0, "CurrentInputFeedback_OutputChange {0}", a.StringValue); - - - inputNumberFeedback.LinkInputSig(trilist.UShortInput[joinMap.InputSelect.JoinNumber]); - } - - // Power Off - trilist.SetSigTrueAction(joinMap.PowerOff.JoinNumber, () => - { - inputNumber = 102; - inputNumberFeedback.FireUpdate(); - displayDevice.PowerOff(); - }); - - var twoWayDisplayDevice = displayDevice as TwoWayDisplayBase; - if (twoWayDisplayDevice != null) - { - twoWayDisplayDevice.PowerIsOnFeedback.OutputChange += (o, a) => - { - if (!a.BoolValue) - { - inputNumber = 102; - inputNumberFeedback.FireUpdate(); - - } - else - { - inputNumber = 0; - inputNumberFeedback.FireUpdate(); - } - }; - - twoWayDisplayDevice.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff.JoinNumber]); - twoWayDisplayDevice.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn.JoinNumber]); - } - - // PowerOn - trilist.SetSigTrueAction(joinMap.PowerOn.JoinNumber, () => - { - inputNumber = 0; - inputNumberFeedback.FireUpdate(); - displayDevice.PowerOn(); - }); - - - - for (int i = 0; i < displayDevice.InputPorts.Count; i++) - { - if (i < joinMap.InputNamesOffset.JoinSpan) - { - inputKeys.Add(displayDevice.InputPorts[i].Key); - var tempKey = inputKeys.ElementAt(i); - trilist.SetSigTrueAction((ushort)(joinMap.InputSelectOffset.JoinNumber + i), - () => displayDevice.ExecuteSwitch(displayDevice.InputPorts[tempKey].Selector)); - Debug.Console(2, displayDevice, "Setting Input Select Action on Digital Join {0} to Input: {1}", - joinMap.InputSelectOffset.JoinNumber + i, displayDevice.InputPorts[tempKey].Key.ToString()); - trilist.StringInput[(ushort)(joinMap.InputNamesOffset.JoinNumber + i)].StringValue = displayDevice.InputPorts[i].Key.ToString(); - } - else - Debug.Console(0, displayDevice, Debug.ErrorLogLevel.Warning, "Device has {0} inputs. The Join Map allows up to {1} inputs. Discarding inputs {2} - {3} from bridge.", - displayDevice.InputPorts.Count, joinMap.InputNamesOffset.JoinSpan, i + 1, displayDevice.InputPorts.Count); - } - - Debug.Console(2, displayDevice, "Setting Input Select Action on Analog Join {0}", joinMap.InputSelect); - trilist.SetUShortSigAction(joinMap.InputSelect.JoinNumber, (a) => - { - if (a == 0) - { - displayDevice.PowerOff(); - inputNumber = 0; - } - else if (a > 0 && a < displayDevice.InputPorts.Count && a != inputNumber) - { - displayDevice.ExecuteSwitch(displayDevice.InputPorts.ElementAt(a - 1).Selector); - inputNumber = a; - } - else if (a == 102) - { - displayDevice.PowerToggle(); - - } - if (twoWayDisplay != null) - inputNumberFeedback.FireUpdate(); - }); - - - var volumeDisplay = displayDevice as IBasicVolumeControls; - if (volumeDisplay == null) return; - - trilist.SetBoolSigAction(joinMap.VolumeUp.JoinNumber, volumeDisplay.VolumeUp); - trilist.SetBoolSigAction(joinMap.VolumeDown.JoinNumber, volumeDisplay.VolumeDown); - trilist.SetSigTrueAction(joinMap.VolumeMute.JoinNumber, volumeDisplay.MuteToggle); - - var volumeDisplayWithFeedback = volumeDisplay as IBasicVolumeWithFeedback; - - if (volumeDisplayWithFeedback == null) return; - trilist.SetSigTrueAction(joinMap.VolumeMuteOn.JoinNumber, volumeDisplayWithFeedback.MuteOn); - trilist.SetSigTrueAction(joinMap.VolumeMuteOff.JoinNumber, volumeDisplayWithFeedback.MuteOff); - - - trilist.SetUShortSigAction(joinMap.VolumeLevel.JoinNumber, volumeDisplayWithFeedback.SetVolume); - volumeDisplayWithFeedback.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[joinMap.VolumeLevel.JoinNumber]); - volumeDisplayWithFeedback.MuteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VolumeMute.JoinNumber]); - volumeDisplayWithFeedback.MuteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VolumeMuteOn.JoinNumber]); - volumeDisplayWithFeedback.MuteFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.VolumeMuteOff.JoinNumber]); - } - - } - - /// - /// - /// - public abstract class TwoWayDisplayBase : DisplayBase, IRoutingFeedback, IHasPowerControlWithFeedback - { - public StringFeedback CurrentInputFeedback { get; private set; } - - abstract protected Func CurrentInputFeedbackFunc { get; } - - public override BoolFeedback PowerIsOnFeedback { get; protected set; } - - abstract protected Func PowerIsOnFeedbackFunc { get; } - - - public static MockDisplay DefaultDisplay - { - get - { - if (_DefaultDisplay == null) - _DefaultDisplay = new MockDisplay("default", "Default Display"); - return _DefaultDisplay; - } - } - static MockDisplay _DefaultDisplay; - - public TwoWayDisplayBase(string key, string name) - : base(key, name) - { - CurrentInputFeedback = new StringFeedback(CurrentInputFeedbackFunc); - - WarmupTime = 7000; - CooldownTime = 15000; - - PowerIsOnFeedback = new BoolFeedback("PowerOnFeedback", PowerIsOnFeedbackFunc); - - Feedbacks.Add(CurrentInputFeedback); - Feedbacks.Add(PowerIsOnFeedback); - - PowerIsOnFeedback.OutputChange += PowerIsOnFeedback_OutputChange; - - } - - void PowerIsOnFeedback_OutputChange(object sender, EventArgs e) - { - if (UsageTracker != null) - { - if (PowerIsOnFeedback.BoolValue) - UsageTracker.StartDeviceUsage(); - else - UsageTracker.EndDeviceUsage(); - } - } - - public event EventHandler NumericSwitchChange; - - /// - /// Raise an event when the status of a switch object changes. - /// - /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType - protected void OnSwitchChange(RoutingNumericEventArgs e) - { - var newEvent = NumericSwitchChange; - if (newEvent != null) newEvent(this, e); - } - } +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.DM; +using Crestron.SimplSharpPro.DM.Endpoints; +using Crestron.SimplSharpPro.DM.Endpoints.Transmitters; +using Full.Newtonsoft.Json; +using PepperDash.Core; +using PepperDash.Essentials.Core.Bridges; + + +namespace PepperDash.Essentials.Core +{ + /// + /// + /// + public abstract class DisplayBase : EssentialsDevice, IHasFeedback, IRoutingSinkWithSwitching, IHasPowerControl, IWarmingCooling, IUsageTracking, IPower + { + public event SourceInfoChangeHandler CurrentSourceChange; + + public string CurrentSourceInfoKey { get; set; } + public SourceListItem CurrentSourceInfo + { + get + { + return _CurrentSourceInfo; + } + set + { + if (value == _CurrentSourceInfo) return; + + var handler = CurrentSourceChange; + + if (handler != null) + handler(_CurrentSourceInfo, ChangeType.WillChange); + + _CurrentSourceInfo = value; + + if (handler != null) + handler(_CurrentSourceInfo, ChangeType.DidChange); + } + } + SourceListItem _CurrentSourceInfo; + + public BoolFeedback IsCoolingDownFeedback { get; protected set; } + public BoolFeedback IsWarmingUpFeedback { get; private set; } + + [Obsolete("This property will be removed in version 2.0.0")] + public abstract BoolFeedback PowerIsOnFeedback { get; protected set; } + + public UsageTracking UsageTracker { get; set; } + + public uint WarmupTime { get; set; } + public uint CooldownTime { get; set; } + + /// + /// Bool Func that will provide a value for the PowerIsOn Output. Must be implemented + /// by concrete sub-classes + /// + abstract protected Func IsCoolingDownFeedbackFunc { get; } + abstract protected Func IsWarmingUpFeedbackFunc { get; } + + + protected CTimer WarmupTimer; + protected CTimer CooldownTimer; + + #region IRoutingInputs Members + + public RoutingPortCollection InputPorts { get; private set; } + + #endregion + + protected DisplayBase(string key, string name) + : base(key, name) + { + IsCoolingDownFeedback = new BoolFeedback("IsCoolingDown", IsCoolingDownFeedbackFunc); + IsWarmingUpFeedback = new BoolFeedback("IsWarmingUp", IsWarmingUpFeedbackFunc); + + InputPorts = new RoutingPortCollection(); + + } + + public abstract void PowerOn(); + public abstract void PowerOff(); + public abstract void PowerToggle(); + + public virtual FeedbackCollection Feedbacks + { + get + { + return new FeedbackCollection + { + IsCoolingDownFeedback, + IsWarmingUpFeedback + }; + } + } + + public abstract void ExecuteSwitch(object selector); + + protected void LinkDisplayToApi(DisplayBase displayDevice, BasicTriList trilist, uint joinStart, string joinMapKey, + EiscApiAdvanced bridge) + { + var joinMap = new DisplayControllerJoinMap(joinStart); + + var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); + + if (bridge != null) + { + bridge.AddJoinMap(Key, joinMap); + } + else + { + Debug.Console(0,this,"Please update config to use 'eiscapiadvanced' to get all join map features for this device."); + } + + LinkDisplayToApi(displayDevice, trilist, joinMap); + } + + protected void LinkDisplayToApi(DisplayBase displayDevice, BasicTriList trilist, DisplayControllerJoinMap joinMap) + { + Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); + Debug.Console(0, "Linking to Display: {0}", displayDevice.Name); + + trilist.StringInput[joinMap.Name.JoinNumber].StringValue = displayDevice.Name; + + var commMonitor = displayDevice as ICommunicationMonitor; + if (commMonitor != null) + { + commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); + } + + var inputNumber = 0; + var inputKeys = new List(); + + var inputNumberFeedback = new IntFeedback(() => inputNumber); + + // Two way feedbacks + var twoWayDisplay = displayDevice as TwoWayDisplayBase; + + if (twoWayDisplay != null) + { + trilist.SetBool(joinMap.IsTwoWayDisplay.JoinNumber, true); + + twoWayDisplay.CurrentInputFeedback.OutputChange += (o, a) => Debug.Console(0, "CurrentInputFeedback_OutputChange {0}", a.StringValue); + + + inputNumberFeedback.LinkInputSig(trilist.UShortInput[joinMap.InputSelect.JoinNumber]); + } + + // Power Off + trilist.SetSigTrueAction(joinMap.PowerOff.JoinNumber, () => + { + inputNumber = 102; + inputNumberFeedback.FireUpdate(); + displayDevice.PowerOff(); + }); + + var twoWayDisplayDevice = displayDevice as TwoWayDisplayBase; + if (twoWayDisplayDevice != null) + { + twoWayDisplayDevice.PowerIsOnFeedback.OutputChange += (o, a) => + { + if (!a.BoolValue) + { + inputNumber = 102; + inputNumberFeedback.FireUpdate(); + + } + else + { + inputNumber = 0; + inputNumberFeedback.FireUpdate(); + } + }; + + twoWayDisplayDevice.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff.JoinNumber]); + twoWayDisplayDevice.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn.JoinNumber]); + } + + // PowerOn + trilist.SetSigTrueAction(joinMap.PowerOn.JoinNumber, () => + { + inputNumber = 0; + inputNumberFeedback.FireUpdate(); + displayDevice.PowerOn(); + }); + + + + for (int i = 0; i < displayDevice.InputPorts.Count; i++) + { + if (i < joinMap.InputNamesOffset.JoinSpan) + { + inputKeys.Add(displayDevice.InputPorts[i].Key); + var tempKey = inputKeys.ElementAt(i); + trilist.SetSigTrueAction((ushort)(joinMap.InputSelectOffset.JoinNumber + i), + () => displayDevice.ExecuteSwitch(displayDevice.InputPorts[tempKey].Selector)); + Debug.Console(2, displayDevice, "Setting Input Select Action on Digital Join {0} to Input: {1}", + joinMap.InputSelectOffset.JoinNumber + i, displayDevice.InputPorts[tempKey].Key.ToString()); + trilist.StringInput[(ushort)(joinMap.InputNamesOffset.JoinNumber + i)].StringValue = displayDevice.InputPorts[i].Key.ToString(); + } + else + Debug.Console(0, displayDevice, Debug.ErrorLogLevel.Warning, "Device has {0} inputs. The Join Map allows up to {1} inputs. Discarding inputs {2} - {3} from bridge.", + displayDevice.InputPorts.Count, joinMap.InputNamesOffset.JoinSpan, i + 1, displayDevice.InputPorts.Count); + } + + Debug.Console(2, displayDevice, "Setting Input Select Action on Analog Join {0}", joinMap.InputSelect); + trilist.SetUShortSigAction(joinMap.InputSelect.JoinNumber, (a) => + { + if (a == 0) + { + displayDevice.PowerOff(); + inputNumber = 0; + } + else if (a > 0 && a < displayDevice.InputPorts.Count && a != inputNumber) + { + displayDevice.ExecuteSwitch(displayDevice.InputPorts.ElementAt(a - 1).Selector); + inputNumber = a; + } + else if (a == 102) + { + displayDevice.PowerToggle(); + + } + if (twoWayDisplay != null) + inputNumberFeedback.FireUpdate(); + }); + + + var volumeDisplay = displayDevice as IBasicVolumeControls; + if (volumeDisplay == null) return; + + trilist.SetBoolSigAction(joinMap.VolumeUp.JoinNumber, volumeDisplay.VolumeUp); + trilist.SetBoolSigAction(joinMap.VolumeDown.JoinNumber, volumeDisplay.VolumeDown); + trilist.SetSigTrueAction(joinMap.VolumeMute.JoinNumber, volumeDisplay.MuteToggle); + + var volumeDisplayWithFeedback = volumeDisplay as IBasicVolumeWithFeedback; + + if (volumeDisplayWithFeedback == null) return; + trilist.SetSigTrueAction(joinMap.VolumeMuteOn.JoinNumber, volumeDisplayWithFeedback.MuteOn); + trilist.SetSigTrueAction(joinMap.VolumeMuteOff.JoinNumber, volumeDisplayWithFeedback.MuteOff); + + + trilist.SetUShortSigAction(joinMap.VolumeLevel.JoinNumber, volumeDisplayWithFeedback.SetVolume); + volumeDisplayWithFeedback.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[joinMap.VolumeLevel.JoinNumber]); + volumeDisplayWithFeedback.MuteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VolumeMute.JoinNumber]); + volumeDisplayWithFeedback.MuteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VolumeMuteOn.JoinNumber]); + volumeDisplayWithFeedback.MuteFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.VolumeMuteOff.JoinNumber]); + } + + } + + /// + /// + /// + public abstract class TwoWayDisplayBase : DisplayBase, IRoutingFeedback, IHasPowerControlWithFeedback + { + public StringFeedback CurrentInputFeedback { get; private set; } + + abstract protected Func CurrentInputFeedbackFunc { get; } + + public override BoolFeedback PowerIsOnFeedback { get; protected set; } + + abstract protected Func PowerIsOnFeedbackFunc { get; } + + + public static MockDisplay DefaultDisplay + { + get + { + if (_DefaultDisplay == null) + _DefaultDisplay = new MockDisplay("default", "Default Display"); + return _DefaultDisplay; + } + } + static MockDisplay _DefaultDisplay; + + public TwoWayDisplayBase(string key, string name) + : base(key, name) + { + CurrentInputFeedback = new StringFeedback(CurrentInputFeedbackFunc); + + WarmupTime = 7000; + CooldownTime = 15000; + + PowerIsOnFeedback = new BoolFeedback("PowerOnFeedback", PowerIsOnFeedbackFunc); + + Feedbacks.Add(CurrentInputFeedback); + Feedbacks.Add(PowerIsOnFeedback); + + PowerIsOnFeedback.OutputChange += PowerIsOnFeedback_OutputChange; + + } + + void PowerIsOnFeedback_OutputChange(object sender, EventArgs e) + { + if (UsageTracker != null) + { + if (PowerIsOnFeedback.BoolValue) + UsageTracker.StartDeviceUsage(); + else + UsageTracker.EndDeviceUsage(); + } + } + + public event EventHandler NumericSwitchChange; + + /// + /// Raise an event when the status of a switch object changes. + /// + /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType + protected void OnSwitchChange(RoutingNumericEventArgs e) + { + var newEvent = NumericSwitchChange; + if (newEvent != null) newEvent(this, e); + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Display/MockDisplay.cs b/src/PepperDash.Essentials.Core/Display/MockDisplay.cs similarity index 99% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Display/MockDisplay.cs rename to src/PepperDash.Essentials.Core/Display/MockDisplay.cs index 266c1cbb..d7f36f13 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Display/MockDisplay.cs +++ b/src/PepperDash.Essentials.Core/Display/MockDisplay.cs @@ -30,39 +30,39 @@ namespace PepperDash.Essentials.Core bool _PowerIsOn; bool _IsWarmingUp; - bool _IsCoolingDown; - - protected override Func PowerIsOnFeedbackFunc - { - get - { - return () => - { - Debug.Console(2, this, "*************************************************** Display Power is {0}", _PowerIsOn ? "on" : "off"); - return _PowerIsOn; + bool _IsCoolingDown; + + protected override Func PowerIsOnFeedbackFunc + { + get + { + return () => + { + Debug.Console(2, this, "*************************************************** Display Power is {0}", _PowerIsOn ? "on" : "off"); + return _PowerIsOn; }; } } - protected override Func IsCoolingDownFeedbackFunc - { - get - { - return () => - { - Debug.Console(2, this, "*************************************************** {0}", _IsCoolingDown ? "Display is cooling down" : "Display has finished cooling down"); - return _IsCoolingDown; - }; - } + protected override Func IsCoolingDownFeedbackFunc + { + get + { + return () => + { + Debug.Console(2, this, "*************************************************** {0}", _IsCoolingDown ? "Display is cooling down" : "Display has finished cooling down"); + return _IsCoolingDown; + }; + } } protected override Func IsWarmingUpFeedbackFunc - { - get - { - return () => - { - Debug.Console(2, this, "*************************************************** {0}", _IsWarmingUp ? "Display is warming up" : "Display has finished warming up"); - return _IsWarmingUp; - }; - } + { + get + { + return () => + { + Debug.Console(2, this, "*************************************************** {0}", _IsWarmingUp ? "Display is warming up" : "Display has finished warming up"); + return _IsWarmingUp; + }; + } } protected override Func CurrentInputFeedbackFunc { get { return () => "Not Implemented"; } } @@ -123,8 +123,8 @@ namespace PepperDash.Essentials.Core { Debug.Console(2, this, "Cooldown timer ending"); _IsCoolingDown = false; - IsCoolingDownFeedback.InvokeFireUpdate(); - _PowerIsOn = false; + IsCoolingDownFeedback.InvokeFireUpdate(); + _PowerIsOn = false; PowerIsOnFeedback.InvokeFireUpdate(); }, CooldownTime); } @@ -140,11 +140,11 @@ namespace PepperDash.Essentials.Core public override void ExecuteSwitch(object selector) { - Debug.Console(2, this, "ExecuteSwitch: {0}", selector); - - if (!_PowerIsOn) - { - PowerOn(); + Debug.Console(2, this, "ExecuteSwitch: {0}", selector); + + if (!_PowerIsOn) + { + PowerOn(); } } diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Ethernet/EthernetStatistics.cs b/src/PepperDash.Essentials.Core/Ethernet/EthernetStatistics.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Ethernet/EthernetStatistics.cs rename to src/PepperDash.Essentials.Core/Ethernet/EthernetStatistics.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Extensions/JsonExtensions.cs b/src/PepperDash.Essentials.Core/Extensions/JsonExtensions.cs similarity index 91% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Extensions/JsonExtensions.cs rename to src/PepperDash.Essentials.Core/Extensions/JsonExtensions.cs index cdf723ea..f001c985 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Extensions/JsonExtensions.cs +++ b/src/PepperDash.Essentials.Core/Extensions/JsonExtensions.cs @@ -1,42 +1,44 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; - -namespace PepperDash.Essentials.Core -{ - public static class JsonExtensions - { - public static List FindTokens(this JToken containerToken, string name) - { - List matches = new List(); - FindTokens(containerToken, name, matches); - return matches; - } - - private static void FindTokens(JToken containerToken, string name, List matches) - { - if (containerToken.Type == JTokenType.Object) - { - foreach (JProperty child in containerToken.Children()) - { - if (child.Name == name) - { - matches.Add(child.Value); - } - FindTokens(child.Value, name, matches); - } - } - else if (containerToken.Type == JTokenType.Array) - { - foreach (JToken child in containerToken.Children()) - { - FindTokens(child, name, matches); - } - } - } - } +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; + +namespace PepperDash.Essentials.Core +{ + public static class JsonExtensions + { + public static List FindTokens(this JToken containerToken, string name) + { + List matches = new List(); + FindTokens(containerToken, name, matches); + return matches; + } + + private static void FindTokens(JToken containerToken, string name, List matches) + { + if (containerToken.Type == JTokenType.Object) + { + foreach (JProperty child in containerToken.Children()) + { + if (child.Name == name) + { + matches.Add(child.Value); + } + FindTokens(child.Value, name, matches); + } + } + else if (containerToken.Type == JTokenType.Array) + { + foreach (JToken child in containerToken.Children()) + { + FindTokens(child, name, matches); + } + } + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Extensions/StringExtensions.cs b/src/PepperDash.Essentials.Core/Extensions/StringExtensions.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Extensions/StringExtensions.cs rename to src/PepperDash.Essentials.Core/Extensions/StringExtensions.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs b/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs rename to src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs index bad3e531..d53aef19 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs @@ -1,220 +1,222 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.GeneralIO; -using Crestron.SimplSharp.Reflection; -using PepperDash.Core; -using Newtonsoft.Json.Linq; -using Newtonsoft.Json; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; -using PepperDash.Essentials.Core.CrestronIO; -using PepperDash.Essentials.Core.Touchpanels; - -namespace PepperDash.Essentials.Core -{ - public class DeviceFactoryWrapper - { - public CType CType { get; set; } - public string Description { get; set; } - public Func FactoryMethod { get; set; } - - public DeviceFactoryWrapper() - { - CType = null; - Description = "Not Available"; - } - } - - public class DeviceFactory - { - public DeviceFactory() - { - var assy = Assembly.GetExecutingAssembly(); - PluginLoader.SetEssentialsAssembly(assy.GetName().Name, assy); - - var types = assy.GetTypes().Where(ct => typeof(IDeviceFactory).IsAssignableFrom(ct) && !ct.IsInterface && !ct.IsAbstract); - - if (types != null) - { - foreach (var type in types) - { - try - { - var factory = (IDeviceFactory)Crestron.SimplSharp.Reflection.Activator.CreateInstance(type); - factory.LoadTypeFactories(); - } - catch (Exception e) - { - Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to load type: '{1}' DeviceFactory: {0}", e, type.Name); - } - } - } - } - - /// - /// A dictionary of factory methods, keyed by config types, added by plugins. - /// These methods are looked up and called by GetDevice in this class. - /// - static Dictionary FactoryMethods = - new Dictionary(StringComparer.OrdinalIgnoreCase); - - /// - /// Adds a plugin factory method - /// - /// - /// - public static void AddFactoryForType(string typeName, Func method) - { - //Debug.Console(1, Debug.ErrorLogLevel.Notice, "Adding factory method for type '{0}'", typeName); - DeviceFactory.FactoryMethods.Add(typeName, new DeviceFactoryWrapper() { FactoryMethod = method}); - } - - public static void AddFactoryForType(string typeName, string description, CType cType, Func method) - { - //Debug.Console(1, Debug.ErrorLogLevel.Notice, "Adding factory method for type '{0}'", typeName); - - if(FactoryMethods.ContainsKey(typeName)) - { - Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to add type: '{0}'. Already exists in DeviceFactory", typeName); - return; - } - - var wrapper = new DeviceFactoryWrapper() { CType = cType, Description = description, FactoryMethod = method }; - DeviceFactory.FactoryMethods.Add(typeName, wrapper); - } - - private static void CheckForSecrets(IEnumerable obj) - { - foreach (var prop in obj.Where(prop => prop.Value as JObject != null)) - { - if (prop.Name.ToLower() == "secret") - { - var secret = GetSecret(prop.Children().First().ToObject()); - //var secret = GetSecret(JsonConvert.DeserializeObject(prop.Children().First().ToString())); - prop.Parent.Replace(secret); - } - var recurseProp = prop.Value as JObject; - if (recurseProp == null) return; - CheckForSecrets(recurseProp.Properties()); - } - } - - private static string GetSecret(SecretsPropertiesConfig data) - { - var secretProvider = SecretsManager.GetSecretProviderByKey(data.Provider); - if (secretProvider == null) return null; - var secret = secretProvider.GetSecret(data.Key); - if (secret != null) return (string) secret.Value; - Debug.Console(1, - "Unable to retrieve secret {0}{1} - Make sure you've added it to the secrets provider", - data.Provider, data.Key); - return String.Empty; - } - - - /// - /// The factory method for Core "things". Also iterates the Factory methods that have - /// been loaded from plugins - /// - /// - /// - public static IKeyed GetDevice(DeviceConfig dc) - { - try - { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loading '{0}' from Essentials Core", dc.Type); - - var localDc = new DeviceConfig(dc); - - var key = localDc.Key; - var name = localDc.Name; - var type = localDc.Type; - var properties = localDc.Properties; - //var propRecurse = properties; - - var typeName = localDc.Type.ToLower(); - - - var jObject = properties as JObject; - if (jObject != null) - { - var jProp = jObject.Properties(); - - CheckForSecrets(jProp); - } - - Debug.Console(2, "typeName = {0}", typeName); - // Check for types that have been added by plugin dlls. - return !FactoryMethods.ContainsKey(typeName) ? null : FactoryMethods[typeName].FactoryMethod(localDc); - } - catch (Exception ex) - { - Debug.Console(0, Debug.ErrorLogLevel.Error, "Exception occurred while creating device {0}: {1}", dc.Key, ex.Message); - - Debug.Console(2, "{0}", ex.StackTrace); - - if (ex.InnerException == null) - { - return null; - } - - Debug.Console(0, Debug.ErrorLogLevel.Error, "Inner exception while creating device {0}: {1}", dc.Key, - ex.InnerException.Message); - Debug.Console(2, "{0}", ex.InnerException.StackTrace); - return null; - } - } - - /// - /// Prints the type names and associated metadata from the FactoryMethods collection. - /// - /// - public static void GetDeviceFactoryTypes(string filter) - { - Dictionary types = new Dictionary(); - - if (!string.IsNullOrEmpty(filter)) - { - types = FactoryMethods.Where(k => k.Key.Contains(filter)).ToDictionary(k => k.Key, k => k.Value); - } - else - { - types = FactoryMethods; - } - - Debug.Console(0, "Device Types:"); - - foreach (var type in types.OrderBy(t => t.Key)) - { - var description = type.Value.Description; - var cType = "Not Specified by Plugin"; - - if(type.Value.CType != null) - { - cType = type.Value.CType.FullName; - } - - Debug.Console(0, - @"Type: '{0}' - CType: '{1}' - Description: {2}", type.Key, cType, description); - } - } - - /// - /// Returns the device factory dictionary - /// - /// - /// - public static Dictionary GetDeviceFactoryDictionary(string filter) - { - return string.IsNullOrEmpty(filter) - ? FactoryMethods - : FactoryMethods.Where(k => k.Key.Contains(filter)).ToDictionary(k => k.Key, k => k.Value); - } - } +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.GeneralIO; +using Crestron.SimplSharp.Reflection; +using PepperDash.Core; +using Full.Newtonsoft.Json.Linq; +using Full.Newtonsoft.Json; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.CrestronIO; +using PepperDash.Essentials.Core.Touchpanels; + +namespace PepperDash.Essentials.Core +{ + public class DeviceFactoryWrapper + { + public CType CType { get; set; } + public string Description { get; set; } + public Func FactoryMethod { get; set; } + + public DeviceFactoryWrapper() + { + CType = null; + Description = "Not Available"; + } + } + + public class DeviceFactory + { + public DeviceFactory() + { + var assy = Assembly.GetExecutingAssembly(); + PluginLoader.SetEssentialsAssembly(assy.GetName().Name, assy); + + var types = assy.GetTypes().Where(ct => typeof(IDeviceFactory).IsAssignableFrom(ct) && !ct.IsInterface && !ct.IsAbstract); + + if (types != null) + { + foreach (var type in types) + { + try + { + var factory = (IDeviceFactory)Crestron.SimplSharp.Reflection.Activator.CreateInstance(type); + factory.LoadTypeFactories(); + } + catch (Exception e) + { + Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to load type: '{1}' DeviceFactory: {0}", e, type.Name); + } + } + } + } + + /// + /// A dictionary of factory methods, keyed by config types, added by plugins. + /// These methods are looked up and called by GetDevice in this class. + /// + static Dictionary FactoryMethods = + new Dictionary(StringComparer.OrdinalIgnoreCase); + + /// + /// Adds a plugin factory method + /// + /// + /// + public static void AddFactoryForType(string typeName, Func method) + { + //Debug.Console(1, Debug.ErrorLogLevel.Notice, "Adding factory method for type '{0}'", typeName); + DeviceFactory.FactoryMethods.Add(typeName, new DeviceFactoryWrapper() { FactoryMethod = method}); + } + + public static void AddFactoryForType(string typeName, string description, CType cType, Func method) + { + //Debug.Console(1, Debug.ErrorLogLevel.Notice, "Adding factory method for type '{0}'", typeName); + + if(FactoryMethods.ContainsKey(typeName)) + { + Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to add type: '{0}'. Already exists in DeviceFactory", typeName); + return; + } + + var wrapper = new DeviceFactoryWrapper() { CType = cType, Description = description, FactoryMethod = method }; + DeviceFactory.FactoryMethods.Add(typeName, wrapper); + } + + private static void CheckForSecrets(IEnumerable obj) + { + foreach (var prop in obj.Where(prop => prop.Value as JObject != null)) + { + if (prop.Name.ToLower() == "secret") + { + var secret = GetSecret(prop.Children().First().ToObject()); + //var secret = GetSecret(JsonConvert.DeserializeObject(prop.Children().First().ToString())); + prop.Parent.Replace(secret); + } + var recurseProp = prop.Value as JObject; + if (recurseProp == null) return; + CheckForSecrets(recurseProp.Properties()); + } + } + + private static string GetSecret(SecretsPropertiesConfig data) + { + var secretProvider = SecretsManager.GetSecretProviderByKey(data.Provider); + if (secretProvider == null) return null; + var secret = secretProvider.GetSecret(data.Key); + if (secret != null) return (string) secret.Value; + Debug.Console(1, + "Unable to retrieve secret {0}{1} - Make sure you've added it to the secrets provider", + data.Provider, data.Key); + return String.Empty; + } + + + /// + /// The factory method for Core "things". Also iterates the Factory methods that have + /// been loaded from plugins + /// + /// + /// + public static IKeyed GetDevice(DeviceConfig dc) + { + try + { + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loading '{0}' from Essentials Core", dc.Type); + + var localDc = new DeviceConfig(dc); + + var key = localDc.Key; + var name = localDc.Name; + var type = localDc.Type; + var properties = localDc.Properties; + //var propRecurse = properties; + + var typeName = localDc.Type.ToLower(); + + + var jObject = properties as JObject; + if (jObject != null) + { + var jProp = jObject.Properties(); + + CheckForSecrets(jProp); + } + + Debug.Console(2, "typeName = {0}", typeName); + // Check for types that have been added by plugin dlls. + return !FactoryMethods.ContainsKey(typeName) ? null : FactoryMethods[typeName].FactoryMethod(localDc); + } + catch (Exception ex) + { + Debug.Console(0, Debug.ErrorLogLevel.Error, "Exception occurred while creating device {0}: {1}", dc.Key, ex.Message); + + Debug.Console(2, "{0}", ex.StackTrace); + + if (ex.InnerException == null) + { + return null; + } + + Debug.Console(0, Debug.ErrorLogLevel.Error, "Inner exception while creating device {0}: {1}", dc.Key, + ex.InnerException.Message); + Debug.Console(2, "{0}", ex.InnerException.StackTrace); + return null; + } + } + + /// + /// Prints the type names and associated metadata from the FactoryMethods collection. + /// + /// + public static void GetDeviceFactoryTypes(string filter) + { + Dictionary types = new Dictionary(); + + if (!string.IsNullOrEmpty(filter)) + { + types = FactoryMethods.Where(k => k.Key.Contains(filter)).ToDictionary(k => k.Key, k => k.Value); + } + else + { + types = FactoryMethods; + } + + Debug.Console(0, "Device Types:"); + + foreach (var type in types.OrderBy(t => t.Key)) + { + var description = type.Value.Description; + var cType = "Not Specified by Plugin"; + + if(type.Value.CType != null) + { + cType = type.Value.CType.FullName; + } + + Debug.Console(0, + @"Type: '{0}' + CType: '{1}' + Description: {2}", type.Key, cType, description); + } + } + + /// + /// Returns the device factory dictionary + /// + /// + /// + public static Dictionary GetDeviceFactoryDictionary(string filter) + { + return string.IsNullOrEmpty(filter) + ? FactoryMethods + : FactoryMethods.Where(k => k.Key.Contains(filter)).ToDictionary(k => k.Key, k => k.Value); + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/IDeviceFactory.cs b/src/PepperDash.Essentials.Core/Factory/IDeviceFactory.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/IDeviceFactory.cs rename to src/PepperDash.Essentials.Core/Factory/IDeviceFactory.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/ReadyEventArgs.cs b/src/PepperDash.Essentials.Core/Factory/ReadyEventArgs.cs similarity index 95% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/ReadyEventArgs.cs rename to src/PepperDash.Essentials.Core/Factory/ReadyEventArgs.cs index 3c107f6e..be8369d2 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/ReadyEventArgs.cs +++ b/src/PepperDash.Essentials.Core/Factory/ReadyEventArgs.cs @@ -1,46 +1,46 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Core -{ - public class IsReadyEventArgs : EventArgs - { - public bool IsReady { get; set; } - - public IsReadyEventArgs(bool data) - { - IsReady = data; - } - } - - public interface IHasReady - { - event EventHandler IsReadyEvent; - bool IsReady { get; } - } -} - -namespace PepperDash_Essentials_Core -{ - [Obsolete("Use PepperDash.Essentials.Core")] - public class IsReadyEventArgs : EventArgs - { - public bool IsReady { get; set; } - - public IsReadyEventArgs(bool data) - { - IsReady = data; - } - } - - [Obsolete("Use PepperDash.Essentials.Core")] - public interface IHasReady - { - event EventHandler IsReadyEvent; - bool IsReady { get; } - } +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using PepperDash.Essentials.Core; + +namespace PepperDash.Essentials.Core +{ + public class IsReadyEventArgs : EventArgs + { + public bool IsReady { get; set; } + + public IsReadyEventArgs(bool data) + { + IsReady = data; + } + } + + public interface IHasReady + { + event EventHandler IsReadyEvent; + bool IsReady { get; } + } +} + +namespace PepperDash_Essentials_Core +{ + [Obsolete("Use PepperDash.Essentials.Core")] + public class IsReadyEventArgs : EventArgs + { + public bool IsReady { get; set; } + + public IsReadyEventArgs(bool data) + { + IsReady = data; + } + } + + [Obsolete("Use PepperDash.Essentials.Core")] + public interface IHasReady + { + event EventHandler IsReadyEvent; + bool IsReady { get; } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/BoolFeedback.cs b/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedback.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/BoolFeedback.cs rename to src/PepperDash.Essentials.Core/Feedbacks/BoolFeedback.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/BoolFeedbackOneShot.cs b/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedbackOneShot.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/BoolFeedbackOneShot.cs rename to src/PepperDash.Essentials.Core/Feedbacks/BoolFeedbackOneShot.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/BoolFeedbackPulseExtender.cs b/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedbackPulseExtender.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/BoolFeedbackPulseExtender.cs rename to src/PepperDash.Essentials.Core/Feedbacks/BoolFeedbackPulseExtender.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/BoolOutputLogicals.cs b/src/PepperDash.Essentials.Core/Feedbacks/BoolOutputLogicals.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/BoolOutputLogicals.cs rename to src/PepperDash.Essentials.Core/Feedbacks/BoolOutputLogicals.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/FeedbackBase.cs b/src/PepperDash.Essentials.Core/Feedbacks/FeedbackBase.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/FeedbackBase.cs rename to src/PepperDash.Essentials.Core/Feedbacks/FeedbackBase.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/FeedbackCollection.cs b/src/PepperDash.Essentials.Core/Feedbacks/FeedbackCollection.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/FeedbackCollection.cs rename to src/PepperDash.Essentials.Core/Feedbacks/FeedbackCollection.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/FeedbackEventArgs.cs b/src/PepperDash.Essentials.Core/Feedbacks/FeedbackEventArgs.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/FeedbackEventArgs.cs rename to src/PepperDash.Essentials.Core/Feedbacks/FeedbackEventArgs.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/IntFeedback.cs b/src/PepperDash.Essentials.Core/Feedbacks/IntFeedback.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/IntFeedback.cs rename to src/PepperDash.Essentials.Core/Feedbacks/IntFeedback.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/SerialFeedback.cs b/src/PepperDash.Essentials.Core/Feedbacks/SerialFeedback.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/SerialFeedback.cs rename to src/PepperDash.Essentials.Core/Feedbacks/SerialFeedback.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/StringFeedback.cs b/src/PepperDash.Essentials.Core/Feedbacks/StringFeedback.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/StringFeedback.cs rename to src/PepperDash.Essentials.Core/Feedbacks/StringFeedback.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/File/FileIO.cs b/src/PepperDash.Essentials.Core/File/FileIO.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/File/FileIO.cs rename to src/PepperDash.Essentials.Core/File/FileIO.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Fusion/EssentialsHuddleSpaceFusionSystemControllerBase.cs b/src/PepperDash.Essentials.Core/Fusion/EssentialsHuddleSpaceFusionSystemControllerBase.cs similarity index 97% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Fusion/EssentialsHuddleSpaceFusionSystemControllerBase.cs rename to src/PepperDash.Essentials.Core/Fusion/EssentialsHuddleSpaceFusionSystemControllerBase.cs index 1bf925d6..f3827d0a 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Fusion/EssentialsHuddleSpaceFusionSystemControllerBase.cs +++ b/src/PepperDash.Essentials.Core/Fusion/EssentialsHuddleSpaceFusionSystemControllerBase.cs @@ -1,1817 +1,1819 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharp.CrestronIO; -using Crestron.SimplSharp.CrestronXml; -using Crestron.SimplSharp.CrestronXml.Serialization; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.Fusion; -using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Essentials.Core.Config; - -namespace PepperDash.Essentials.Core.Fusion -{ - public class EssentialsHuddleSpaceFusionSystemControllerBase : Device, IOccupancyStatusProvider - { - protected EssentialsHuddleSpaceRoomFusionRoomJoinMap JoinMap; - - private const string RemoteOccupancyXml = "Local{0}"; - private readonly bool _guidFileExists; - - private readonly Dictionary _sourceToFeedbackSigs = - new Dictionary(); - - protected StringSigData CurrentRoomSourceNameSig; - - public FusionCustomPropertiesBridge CustomPropertiesBridge = new FusionCustomPropertiesBridge(); - protected FusionOccupancySensorAsset FusionOccSensor; - protected FusionRemoteOccupancySensor FusionRemoteOccSensor; - - protected FusionRoom FusionRoom; - protected Dictionary FusionStaticAssets; - public long PushNotificationTimeout = 5000; - protected IEssentialsRoom Room; - public long SchedulePollInterval = 300000; - - private Event _currentMeeting; - private RoomSchedule _currentSchedule; - private CTimer _dailyTimeRequestTimer; - private StatusMonitorCollection _errorMessageRollUp; - - private FusionRoomGuids _guiDs; - private uint _ipId; - - private bool _isRegisteredForSchedulePushNotifications; - private Event _nextMeeting; - - private CTimer _pollTimer; - - private CTimer _pushNotificationTimer; - - private string _roomOccupancyRemoteString; - - #region System Info Sigs - - //StringSigData SystemName; - //StringSigData Model; - //StringSigData SerialNumber; - //StringSigData Uptime; - - #endregion - - #region Processor Info Sigs - - private readonly StringSigData[] _program = new StringSigData[10]; - private StringSigData _dns1; - private StringSigData _dns2; - private StringSigData _domain; - private StringSigData _firmware; - private StringSigData _gateway; - private StringSigData _hostname; - private StringSigData _ip1; - private StringSigData _ip2; - private StringSigData _mac1; - private StringSigData _mac2; - private StringSigData _netMask1; - private StringSigData _netMask2; - - #endregion - - #region Default Display Source Sigs - - private BooleanSigData[] _source = new BooleanSigData[10]; - - #endregion - - public EssentialsHuddleSpaceFusionSystemControllerBase(IEssentialsRoom room, uint ipId, string joinMapKey) - : base(room.Key + "-fusion") - { - try - { - JoinMap = new EssentialsHuddleSpaceRoomFusionRoomJoinMap(1); - - CrestronConsole.AddNewConsoleCommand((o) => JoinMap.PrintJoinMapInfo(), string.Format("ptjnmp-{0}", Key), "Prints Attribute Join Map", ConsoleAccessLevelEnum.AccessOperator); - - if (!string.IsNullOrEmpty(joinMapKey)) - { - var customJoins = JoinMapHelper.TryGetJoinMapAdvancedForDevice(joinMapKey); - if (customJoins != null) - { - JoinMap.SetCustomJoinData(customJoins); - } - } - - Room = room; - - _ipId = ipId; - - FusionStaticAssets = new Dictionary(); - - _guiDs = new FusionRoomGuids(); - - var mac = - CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_MAC_ADDRESS, 0); - - var slot = Global.ControlSystem.ProgramNumber; - - var guidFilePath = Global.FilePathPrefix + - string.Format(@"{0}-FusionGuids-{1:X2}.json", InitialParametersClass.ProgramIDTag, _ipId); - - var oldGuidFilePath = Global.FilePathPrefix + - string.Format(@"{0}-FusionGuids.json", InitialParametersClass.ProgramIDTag); - - if (File.Exists(oldGuidFilePath)) - { - Debug.Console(0, this, "Migrating from old Fusion GUID file to new Fusion GUID File"); - - File.Copy(oldGuidFilePath, guidFilePath); - - File.Delete(oldGuidFilePath); - } - - _guidFileExists = File.Exists(guidFilePath); - - // Check if file exists - if (!_guidFileExists) - { - // Does not exist. Create GUIDs - _guiDs = new FusionRoomGuids(Room.Name, ipId, _guiDs.GenerateNewRoomGuid(slot, mac), - FusionStaticAssets); - } - else - { - // Exists. Read GUIDs - ReadGuidFile(guidFilePath); - } - - if (Room.RoomOccupancy != null) - { - if (Room.OccupancyStatusProviderIsRemote) - { - SetUpRemoteOccupancy(); - } - else - { - SetUpLocalOccupancy(); - } - } - - - AddPostActivationAction(() => PostActivate(guidFilePath)); - } - catch (Exception e) - { - Debug.Console(0, this, Debug.ErrorLogLevel.Error, "Error Building Fusion System Controller: {0}", e); - } - } - - private void PostActivate(string guidFilePath) - { - CreateSymbolAndBasicSigs(_ipId); - SetUpSources(); - SetUpCommunitcationMonitors(); - SetUpDisplay(); - SetUpError(); - ExecuteCustomSteps(); - - FusionRVI.GenerateFileForAllFusionDevices(); - - GenerateGuidFile(guidFilePath); - } - - protected string RoomGuid - { - get { return _guiDs.RoomGuid; } - } - - public StringFeedback RoomOccupancyRemoteStringFeedback { get; private set; } - - protected Func RoomIsOccupiedFeedbackFunc - { - get { return () => FusionRemoteOccSensor.RoomOccupied.OutputSig.BoolValue; } - } - - #region IOccupancyStatusProvider Members - - public BoolFeedback RoomIsOccupiedFeedback { get; private set; } - - #endregion - - public event EventHandler ScheduleChange; - //public event EventHandler MeetingEndWarning; - //public event EventHandler NextMeetingBeginWarning; - - public event EventHandler RoomInfoChange; - - //ScheduleResponseEvent NextMeeting; - - /// - /// Used for extension classes to execute whatever steps are necessary before generating the RVI and GUID files - /// - protected virtual void ExecuteCustomSteps() - { - } - - /// - /// Generates the guid file in NVRAM. If the file already exists it will be overwritten. - /// - /// path for the file - private void GenerateGuidFile(string filePath) - { - if (string.IsNullOrEmpty(filePath)) - { - Debug.Console(0, this, "Error writing guid file. No path specified."); - return; - } - - var fileLock = new CCriticalSection(); - - try - { - if (fileLock.Disposed) - { - return; - } - - fileLock.Enter(); - - Debug.Console(1, this, "Writing GUIDs to file"); - - _guiDs = FusionOccSensor == null - ? new FusionRoomGuids(Room.Name, _ipId, RoomGuid, FusionStaticAssets) - : new FusionRoomGuids(Room.Name, _ipId, RoomGuid, FusionStaticAssets, FusionOccSensor); - - var json = JsonConvert.SerializeObject(_guiDs, Newtonsoft.Json.Formatting.Indented); - - using (var sw = new StreamWriter(filePath)) - { - sw.Write(json); - sw.Flush(); - } - - Debug.Console(1, this, "Guids successfully written to file '{0}'", filePath); - } - catch (Exception e) - { - Debug.Console(0, this, "Error writing guid file: {0}", e); - } - finally - { - if (!fileLock.Disposed) - { - fileLock.Leave(); - } - } - } - - /// - /// Reads the guid file from NVRAM - /// - /// path for te file - private void ReadGuidFile(string filePath) - { - if (string.IsNullOrEmpty(filePath)) - { - Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Error reading guid file. No path specified."); - return; - } - - var fileLock = new CCriticalSection(); - - try - { - if (fileLock.Disposed) - { - return; - } - - fileLock.Enter(); - - if (File.Exists(filePath)) - { - var json = File.ReadToEnd(filePath, Encoding.ASCII); - - _guiDs = JsonConvert.DeserializeObject(json); - - _ipId = _guiDs.IpId; - - FusionStaticAssets = _guiDs.StaticAssets; - } - - Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Fusion Guids successfully read from file: {0}", - filePath); - - Debug.Console(1, this, "\r\n********************\r\n\tRoom Name: {0}\r\n\tIPID: {1:X}\r\n\tRoomGuid: {2}\r\n*******************", Room.Name, _ipId, RoomGuid); - - foreach (var item in FusionStaticAssets) - { - Debug.Console(1, this, "\nAsset Name: {0}\nAsset No: {1}\n Guid: {2}", item.Value.Name, - item.Value.SlotNumber, item.Value.InstanceId); - } - } - catch (Exception e) - { - Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Error reading guid file: {0}", e); - } - finally - { - if (!fileLock.Disposed) - { - fileLock.Leave(); - } - } - } - - protected virtual void CreateSymbolAndBasicSigs(uint ipId) - { - Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Creating Fusion Room symbol with GUID: {0} and IP-ID {1:X2}", RoomGuid, ipId); - - FusionRoom = new FusionRoom(ipId, Global.ControlSystem, Room.Name, RoomGuid); - FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.Use(); - FusionRoom.ExtenderFusionRoomDataReservedSigs.Use(); - - FusionRoom.Register(); - - FusionRoom.FusionStateChange += FusionRoom_FusionStateChange; - - FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.DeviceExtenderSigChange += - FusionRoomSchedule_DeviceExtenderSigChange; - FusionRoom.ExtenderFusionRoomDataReservedSigs.DeviceExtenderSigChange += - ExtenderFusionRoomDataReservedSigs_DeviceExtenderSigChange; - FusionRoom.OnlineStatusChange += FusionRoom_OnlineStatusChange; - - 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(CreateAdHocMeeting, "FusCreateMeeting", - "Creates and Ad Hoc meeting for on hour or until the next meeting", - ConsoleAccessLevelEnum.AccessOperator); - - // Room to fusion room - Room.OnFeedback.LinkInputSig(FusionRoom.SystemPowerOn.InputSig); - - // Moved to - 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. - var hasCurrentSourceInfoChange = Room as IHasCurrentSourceInfoChange; - if (hasCurrentSourceInfoChange != null) - { - hasCurrentSourceInfoChange.CurrentSourceChange += Room_CurrentSourceInfoChange; - } - - - FusionRoom.SystemPowerOn.OutputSig.SetSigFalseAction(Room.PowerOnToDefaultOrLastSource); - FusionRoom.SystemPowerOff.OutputSig.SetSigFalseAction(() => - { - var runRouteAction = Room as IRunRouteAction; - if (runRouteAction != null) - { - runRouteAction.RunRouteAction("roomOff", Room.SourceListKey); - } - }); - // NO!! room.RoomIsOn.LinkComplementInputSig(FusionRoom.SystemPowerOff.InputSig); - FusionRoom.ErrorMessage.InputSig.StringValue = - "3: 7 Errors: This is a really long error message;This is a really long error message;This is a really long error message;This is a really long error message;This is a really long error message;This is a really long error message;This is a really long error message;"; - - SetUpEthernetValues(); - - GetProcessorEthernetValues(); - - GetSystemInfo(); - - GetProcessorInfo(); - - CrestronEnvironment.EthernetEventHandler += CrestronEnvironment_EthernetEventHandler; - } - - protected void CrestronEnvironment_EthernetEventHandler(EthernetEventArgs ethernetEventArgs) - { - if (ethernetEventArgs.EthernetEventType == eEthernetEventType.LinkUp) - { - GetProcessorEthernetValues(); - } - } - - protected void GetSystemInfo() - { - //SystemName.InputSig.StringValue = Room.Name; - //Model.InputSig.StringValue = InitialParametersClass.ControllerPromptName; - //SerialNumber.InputSig.StringValue = InitialParametersClass. - - var response = string.Empty; - - var systemReboot = FusionRoom.CreateOffsetBoolSig(JoinMap.ProcessorReboot.JoinNumber, JoinMap.ProcessorReboot.AttributeName, eSigIoMask.OutputSigOnly); - systemReboot.OutputSig.SetSigFalseAction( - () => CrestronConsole.SendControlSystemCommand("reboot", ref response)); - } - - protected void SetUpEthernetValues() - { - _ip1 = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorIp1.JoinNumber, JoinMap.ProcessorIp1.AttributeName, eSigIoMask.InputSigOnly); - _ip2 = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorIp2.JoinNumber, JoinMap.ProcessorIp2.AttributeName, eSigIoMask.InputSigOnly); - _gateway = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorGateway.JoinNumber, JoinMap.ProcessorGateway.AttributeName, eSigIoMask.InputSigOnly); - _hostname = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorHostname.JoinNumber, JoinMap.ProcessorHostname.AttributeName, eSigIoMask.InputSigOnly); - _domain = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorDomain.JoinNumber, JoinMap.ProcessorDomain.AttributeName, eSigIoMask.InputSigOnly); - _dns1 = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorDns1.JoinNumber, JoinMap.ProcessorDns1.AttributeName, eSigIoMask.InputSigOnly); - _dns2 = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorDns2.JoinNumber, JoinMap.ProcessorDns2.AttributeName, eSigIoMask.InputSigOnly); - _mac1 = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorMac1.JoinNumber, JoinMap.ProcessorMac1.AttributeName, eSigIoMask.InputSigOnly); - _mac2 = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorMac2.JoinNumber, JoinMap.ProcessorMac2.AttributeName, eSigIoMask.InputSigOnly); - _netMask1 = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorNetMask1.JoinNumber, JoinMap.ProcessorNetMask1.AttributeName, eSigIoMask.InputSigOnly); - _netMask2 = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorNetMask2.JoinNumber, JoinMap.ProcessorNetMask2.AttributeName, eSigIoMask.InputSigOnly); - } - - protected void GetProcessorEthernetValues() - { - _ip1.InputSig.StringValue = - CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0); - _gateway.InputSig.StringValue = - CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_ROUTER, 0); - _hostname.InputSig.StringValue = - CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_HOSTNAME, 0); - _domain.InputSig.StringValue = - CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_DOMAIN_NAME, 0); - - var dnsServers = - CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_DNS_SERVER, 0).Split(','); - _dns1.InputSig.StringValue = dnsServers[0]; - if (dnsServers.Length > 1) - { - _dns2.InputSig.StringValue = dnsServers[1]; - } - - _mac1.InputSig.StringValue = - CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_MAC_ADDRESS, 0); - _netMask1.InputSig.StringValue = - CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_MASK, 0); - - // Interface 1 - - if (InitialParametersClass.NumberOfEthernetInterfaces > 1) - // Only get these values if the processor has more than 1 NIC - { - _ip2.InputSig.StringValue = - CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 1); - _mac2.InputSig.StringValue = - CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_MAC_ADDRESS, 1); - _netMask2.InputSig.StringValue = - CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_MASK, 1); - } - } - - protected void GetProcessorInfo() - { - _firmware = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorFirmware.JoinNumber, JoinMap.ProcessorFirmware.AttributeName, eSigIoMask.InputSigOnly); - - if (CrestronEnvironment.DevicePlatform != eDevicePlatform.Server) - { - for (var i = 0; i < Global.ControlSystem.NumProgramsSupported; i++) - { - var join = JoinMap.ProgramNameStart.JoinNumber + i; - var progNum = i + 1; - _program[i] = FusionRoom.CreateOffsetStringSig((uint) join, - string.Format("{0} {1}", JoinMap.ProgramNameStart.AttributeName, progNum), eSigIoMask.InputSigOnly); - } - } - - _firmware.InputSig.StringValue = InitialParametersClass.FirmwareVersion; - } - - protected void GetCustomProperties() - { - if (FusionRoom.IsOnline) - { - const string fusionRoomCustomPropertiesRequest = - @"RoomConfigurationRequest"; - - FusionRoom.ExtenderFusionRoomDataReservedSigs.RoomConfigQuery.StringValue = - fusionRoomCustomPropertiesRequest; - } - } - - private void GetTouchpanelInfo() - { - // TODO: Get IP and Project Name from TP - } - - protected void FusionRoom_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) - { - if (args.DeviceOnLine) - { - CrestronInvoke.BeginInvoke( (o) => - { - CrestronEnvironment.Sleep(200); - - // Send Push Notification Action request: - - const string requestId = "InitialPushRequest"; - - - var actionRequest = - string.Format("\n{0}\n", requestId) + - "RegisterPushModel\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n" + - "\n"; - - Debug.Console(2, this, "Sending Fusion ActionRequest: \n{0}", actionRequest); - - FusionRoom.ExtenderFusionRoomDataReservedSigs.ActionQuery.StringValue = actionRequest; - - GetCustomProperties(); - - // Request current Fusion Server Time - RequestLocalDateTime(null); - - // Setup timer to request time daily - if (_dailyTimeRequestTimer != null && !_dailyTimeRequestTimer.Disposed) - { - _dailyTimeRequestTimer.Stop(); - _dailyTimeRequestTimer.Dispose(); - } - - _dailyTimeRequestTimer = new CTimer(RequestLocalDateTime, null, 86400000, 86400000); - - _dailyTimeRequestTimer.Reset(86400000, 86400000); - }); - } - } - - /// - /// Requests the local date and time from the Fusion Server - /// - /// - public void RequestLocalDateTime(object callbackObject) - { - const string timeRequestId = "TimeRequest"; - - var timeRequest = string.Format("{0}", - timeRequestId); - - FusionRoom.ExtenderFusionRoomDataReservedSigs.LocalDateTimeQuery.StringValue = timeRequest; - } - - /// - /// Generates a room schedule request for this room for the next 24 hours. - /// - public void RequestFullRoomSchedule(object callbackObject) - { - var now = DateTime.Today; - - var currentTime = now.ToString("s"); - - var requestTest = - string.Format( - "FullSchedleRequest{0}{1}24", - RoomGuid, currentTime); - - Debug.Console(2, this, "Sending Fusion ScheduleQuery: \n{0}", requestTest); - - FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.ScheduleQuery.StringValue = requestTest; - - if (_isRegisteredForSchedulePushNotifications) - { - _pushNotificationTimer.Stop(); - } - } - - /// - /// Wrapper method to allow console commands to modify the current meeting end time - /// - /// meetingID extendTime - public void ModifyMeetingEndTimeConsoleHelper(string command) - { - var extendMinutes = -1; - - const string requestId = "ModifyMeetingTest12345"; - - try - { - var tokens = command.Split(' '); - - extendMinutes = Int32.Parse(tokens[1]); - } - catch (Exception e) - { - Debug.Console(1, this, "Error parsing console command: {0}", e); - } - - ModifyMeetingEndTime(requestId, extendMinutes); - } - - /// - /// Ends or Extends the current meeting by the specified number of minutes. - /// - /// - /// Number of minutes to extend the meeting. A value of 0 will end the meeting. - public void ModifyMeetingEndTime(string requestId, int extendMinutes) - { - if (_currentMeeting == null) - { - Debug.Console(1, this, "No meeting in progress. Unable to modify end time."); - return; - } - - if (extendMinutes > -1) - { - if (extendMinutes > 0) - { - var extendTime = _currentMeeting.dtEnd - DateTime.Now; - var extendMinutesRaw = extendTime.TotalMinutes; - - extendMinutes = extendMinutes + (int) Math.Round(extendMinutesRaw); - } - - - var requestTest = string.Format( - "{0}{1}MeetingChange" - , requestId, RoomGuid, _currentMeeting.MeetingID, extendMinutes); - - Debug.Console(1, this, "Sending MeetingChange Request: \n{0}", requestTest); - - FusionRoom.ExtenderFusionRoomDataReservedSigs.ActionQuery.StringValue = requestTest; - } - else - { - Debug.Console(1, this, "Invalid time specified"); - } - } - - /// - /// Creates and Ad Hoc meeting with a duration of 1 hour, or until the next meeting if in less than 1 hour. - /// - public void CreateAdHocMeeting(string command) - { - const string requestId = "CreateAdHocMeeting"; - - var now = DateTime.Now.AddMinutes(1); - - now.AddSeconds(-now.Second); - - // Assume 1 hour meeting if possible - var dtEnd = now.AddHours(1); - - // Check if room is available for 1 hour before next meeting - if (_nextMeeting != null) - { - var roomAvailable = _nextMeeting.dtEnd.Subtract(dtEnd); - - if (roomAvailable.TotalMinutes < 60) - { - // Room not available for full hour, book until next meeting starts - dtEnd = _nextMeeting.dtEnd; - } - } - - var createMeetingRequest = - "" + - string.Format("{0}", requestId) + - string.Format("{0}", RoomGuid) + - "" + - string.Format("{0}", now.ToString("s")) + - string.Format("{0}", dtEnd.ToString("s")) + - "AdHoc Meeting" + - "Room User" + - "Example Message" + - "" + - ""; - - Debug.Console(2, this, "Sending CreateMeeting Request: \n{0}", createMeetingRequest); - - FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.CreateMeeting.StringValue = createMeetingRequest; - - //Debug.Console(1, this, "Sending CreateMeeting Request: \n{0}", command); - - //FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.CreateMeeting.StringValue = command; - } - - /// - /// Event handler method for Device Extender sig changes - /// - /// - /// - protected void ExtenderFusionRoomDataReservedSigs_DeviceExtenderSigChange(DeviceExtender currentDeviceExtender, - SigEventArgs args) - { - Debug.Console(2, this, "Event: {0}\n Sig: {1}\nFusionResponse:\n{2}", args.Event, args.Sig.Name, - args.Sig.StringValue); - - - if (args.Sig == FusionRoom.ExtenderFusionRoomDataReservedSigs.ActionQueryResponse) - { - try - { - var message = new XmlDocument(); - - message.LoadXml(args.Sig.StringValue); - - var actionResponse = message["ActionResponse"]; - - if (actionResponse == null) - { - return; - } - - var requestId = actionResponse["RequestID"]; - - if (requestId.InnerText != "InitialPushRequest") - { - return; - } - - if (actionResponse["ActionID"].InnerText != "RegisterPushModel") - { - return; - } - - var parameters = actionResponse["Parameters"]; - - foreach (var isRegistered in from XmlElement parameter in parameters - where parameter.HasAttributes - select parameter.Attributes - into attributes - where attributes["ID"].Value == "Registered" - select Int32.Parse(attributes["Value"].Value)) - { - switch (isRegistered) - { - case 1: - _isRegisteredForSchedulePushNotifications = true; - if (_pollTimer != null && !_pollTimer.Disposed) - { - _pollTimer.Stop(); - _pollTimer.Dispose(); - } - _pushNotificationTimer = new CTimer(RequestFullRoomSchedule, null, - PushNotificationTimeout, PushNotificationTimeout); - _pushNotificationTimer.Reset(PushNotificationTimeout, PushNotificationTimeout); - break; - case 0: - _isRegisteredForSchedulePushNotifications = false; - if (_pushNotificationTimer != null && !_pushNotificationTimer.Disposed) - { - _pushNotificationTimer.Stop(); - _pushNotificationTimer.Dispose(); - } - _pollTimer = new CTimer(RequestFullRoomSchedule, null, SchedulePollInterval, - SchedulePollInterval); - _pollTimer.Reset(SchedulePollInterval, SchedulePollInterval); - break; - } - } - } - catch (Exception e) - { - Debug.Console(1, this, "Error parsing ActionQueryResponse: {0}", e); - } - } - else if (args.Sig == FusionRoom.ExtenderFusionRoomDataReservedSigs.LocalDateTimeQueryResponse) - { - try - { - var message = new XmlDocument(); - - message.LoadXml(args.Sig.StringValue); - - var localDateTimeResponse = message["LocalTimeResponse"]; - - if (localDateTimeResponse != null) - { - var localDateTime = localDateTimeResponse["LocalDateTime"]; - - if (localDateTime != null) - { - var tempLocalDateTime = localDateTime.InnerText; - - var currentTime = DateTime.Parse(tempLocalDateTime); - - Debug.Console(1, this, "DateTime from Fusion Server: {0}", currentTime); - - // Parse time and date from response and insert values - CrestronEnvironment.SetTimeAndDate((ushort) currentTime.Hour, (ushort) currentTime.Minute, - (ushort) currentTime.Second, (ushort) currentTime.Month, (ushort) currentTime.Day, - (ushort) currentTime.Year); - - Debug.Console(1, this, "Processor time set to {0}", CrestronEnvironment.GetLocalTime()); - } - } - } - catch (Exception e) - { - Debug.Console(1, this, "Error parsing LocalDateTimeQueryResponse: {0}", e); - } - } - else if (args.Sig == FusionRoom.ExtenderFusionRoomDataReservedSigs.RoomConfigResponse) - { - // Room info response with custom properties - - var roomConfigResponseArgs = args.Sig.StringValue.Replace("&", "and"); - - Debug.Console(2, this, "Fusion Response: \n {0}", roomConfigResponseArgs); - - try - { - var roomConfigResponse = new XmlDocument(); - - roomConfigResponse.LoadXml(roomConfigResponseArgs); - - var requestRoomConfiguration = roomConfigResponse["RoomConfigurationResponse"]; - - if (requestRoomConfiguration != null) - { - var roomInformation = new RoomInformation(); - - foreach (XmlElement e in roomConfigResponse.FirstChild.ChildNodes) - { - if (e.Name == "RoomInformation") - { - var roomInfo = new XmlReader(e.OuterXml); - - roomInformation = CrestronXMLSerialization.DeSerializeObject(roomInfo); - } - else if (e.Name == "CustomFields") - { - foreach (XmlElement el in e) - { - var customProperty = new FusionCustomProperty(); - - if (el.Name == "CustomField") - { - customProperty.ID = el.Attributes["ID"].Value; - } - - foreach (XmlElement elm in el) - { - if (elm.Name == "CustomFieldName") - { - customProperty.CustomFieldName = elm.InnerText; - } - if (elm.Name == "CustomFieldType") - { - customProperty.CustomFieldType = elm.InnerText; - } - if (elm.Name == "CustomFieldValue") - { - customProperty.CustomFieldValue = elm.InnerText; - } - } - - roomInformation.FusionCustomProperties.Add(customProperty); - } - } - } - - var handler = RoomInfoChange; - if (handler != null) - { - handler(this, new EventArgs()); - } - - CustomPropertiesBridge.EvaluateRoomInfo(Room.Key, roomInformation); - } - } - catch (Exception e) - { - Debug.Console(1, this, "Error parsing Custom Properties response: {0}", e); - } - //PrintRoomInfo(); - //getRoomInfoBusy = false; - //_DynFusion.API.EISC.BooleanInput[Constants.GetRoomInfo].BoolValue = getRoomInfoBusy; - } - } - - /// - /// Event handler method for Device Extender sig changes - /// - /// - /// - protected void FusionRoomSchedule_DeviceExtenderSigChange(DeviceExtender currentDeviceExtender, - SigEventArgs args) - { - Debug.Console(2, this, "Scehdule Response Event: {0}\n Sig: {1}\nFusionResponse:\n{2}", args.Event, - args.Sig.Name, args.Sig.StringValue); - - - if (args.Sig == FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.ScheduleResponse) - { - try - { - var scheduleResponse = new ScheduleResponse(); - - var message = new XmlDocument(); - - message.LoadXml(args.Sig.StringValue); - - var response = message["ScheduleResponse"]; - - if (response != null) - { - // Check for push notification - if (response["RequestID"].InnerText == "RVRequest") - { - var action = response["Action"]; - - if (action.OuterXml.IndexOf("RequestSchedule", StringComparison.Ordinal) > -1) - { - _pushNotificationTimer.Reset(PushNotificationTimeout, PushNotificationTimeout); - } - } - else // Not a push notification - { - _currentSchedule = new RoomSchedule(); // Clear Current Schedule - _currentMeeting = null; // Clear Current Meeting - _nextMeeting = null; // Clear Next Meeting - - var isNextMeeting = false; - - foreach (XmlElement element in message.FirstChild.ChildNodes) - { - if (element.Name == "RequestID") - { - scheduleResponse.RequestID = element.InnerText; - } - else if (element.Name == "RoomID") - { - scheduleResponse.RoomID = element.InnerText; - } - else if (element.Name == "RoomName") - { - scheduleResponse.RoomName = element.InnerText; - } - else if (element.Name == "Event") - { - Debug.Console(2, this, "Event Found:\n{0}", element.OuterXml); - - var reader = new XmlReader(element.OuterXml); - - var tempEvent = CrestronXMLSerialization.DeSerializeObject(reader); - - scheduleResponse.Events.Add(tempEvent); - - // Check is this is the current event - if (tempEvent.dtStart <= DateTime.Now && tempEvent.dtEnd >= DateTime.Now) - { - _currentMeeting = tempEvent; // Set Current Meeting - isNextMeeting = true; // Flag that next element is next meeting - } - - if (isNextMeeting) - { - _nextMeeting = tempEvent; // Set Next Meeting - isNextMeeting = false; - } - - _currentSchedule.Meetings.Add(tempEvent); - } - } - - PrintTodaysSchedule(); - - if (!_isRegisteredForSchedulePushNotifications) - { - _pollTimer.Reset(SchedulePollInterval, SchedulePollInterval); - } - - // Fire Schedule Change Event - var handler = ScheduleChange; - - if (handler != null) - { - handler(this, new ScheduleChangeEventArgs {Schedule = _currentSchedule}); - } - } - } - } - catch (Exception e) - { - Debug.Console(1, this, "Error parsing ScheduleResponse: {0}", e); - } - } - else if (args.Sig == FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.CreateResponse) - { - Debug.Console(2, this, "Create Meeting Response Event: {0}\n Sig: {1}\nFusionResponse:\n{2}", args.Event, - args.Sig.Name, args.Sig.StringValue); - } - } - - /// - /// Prints today's schedule to console for debugging - /// - private void PrintTodaysSchedule() - { - if (Debug.Level > 1) - { - if (_currentSchedule.Meetings.Count > 0) - { - Debug.Console(1, this, "Today's Schedule for '{0}'\n", Room.Name); - - foreach (var e in _currentSchedule.Meetings) - { - Debug.Console(1, this, "Subject: {0}", e.Subject); - Debug.Console(1, this, "Organizer: {0}", e.Organizer); - Debug.Console(1, this, "MeetingID: {0}", e.MeetingID); - Debug.Console(1, this, "Start Time: {0}", e.dtStart); - Debug.Console(1, this, "End Time: {0}", e.dtEnd); - Debug.Console(1, this, "Duration: {0}\n", e.DurationInMinutes); - } - } - } - } - - protected virtual void SetUpSources() - { - // Sources - var dict = ConfigReader.ConfigObject.GetSourceListForKey(Room.SourceListKey); - if (dict != null) - { - // NEW PROCESS: - // Make these lists and insert the fusion attributes by iterating these - var setTopBoxes = dict.Where(d => d.Value.SourceDevice is ISetTopBoxControls); - uint i = 1; - foreach (var kvp in setTopBoxes) - { - TryAddRouteActionSigs(JoinMap.Display1SetTopBoxSourceStart.AttributeName + " " + i, JoinMap.Display1SetTopBoxSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice); - i++; - if (i > JoinMap.Display1SetTopBoxSourceStart.JoinSpan) // We only have five spots - { - break; - } - } - - var discPlayers = dict.Where(d => d.Value.SourceDevice is IDiscPlayerControls); - i = 1; - foreach (var kvp in discPlayers) - { - TryAddRouteActionSigs(JoinMap.Display1DiscPlayerSourceStart.AttributeName + " " + i, JoinMap.Display1DiscPlayerSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice); - i++; - if (i > JoinMap.Display1DiscPlayerSourceStart.JoinSpan) // We only have five spots - { - break; - } - } - - var laptops = dict.Where(d => d.Value.SourceDevice is Devices.Laptop); - i = 1; - foreach (var kvp in laptops) - { - TryAddRouteActionSigs(JoinMap.Display1LaptopSourceStart.AttributeName + " " + i, JoinMap.Display1LaptopSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice); - i++; - if (i > JoinMap.Display1LaptopSourceStart.JoinSpan) // We only have ten spots??? - { - break; - } - } - - foreach (var usageDevice in dict.Select(kvp => kvp.Value.SourceDevice).OfType()) - { - usageDevice.UsageTracker = new UsageTracking(usageDevice as Device) {UsageIsTracked = true}; - usageDevice.UsageTracker.DeviceUsageEnded += UsageTracker_DeviceUsageEnded; - } - } - else - { - Debug.Console(1, this, "WARNING: Config source list '{0}' not found for room '{1}'", - Room.SourceListKey, Room.Key); - } - } - - /// - /// Collects usage data from source and sends to Fusion - /// - /// - /// - protected void UsageTracker_DeviceUsageEnded(object sender, DeviceUsageEventArgs e) - { - var deviceTracker = sender as UsageTracking; - - if (deviceTracker == null) - { - return; - } - - var group = ConfigReader.GetGroupForDeviceKey(deviceTracker.Parent.Key); - - var currentMeetingId = "-"; - - if (_currentMeeting != null) - { - currentMeetingId = _currentMeeting.MeetingID; - } - - //String Format: "USAGE||[Date YYYY-MM-DD]||[Time HH-mm-ss]||TIME||[Asset_Type]||[Asset_Name]||[Minutes_used]||[Asset_ID]||[Meeting_ID]" - // [Asset_ID] property does not appear to be used in Crestron SSI examples. They are sending "-" instead so that's what is replicated here - var deviceUsage = string.Format("USAGE||{0}||{1}||TIME||{2}||{3}||-||{4}||-||{5}||{6}||\r\n", - e.UsageEndTime.ToString("yyyy-MM-dd"), e.UsageEndTime.ToString("HH:mm:ss"), - @group, deviceTracker.Parent.Name, e.MinutesUsed, "-", currentMeetingId); - - Debug.Console(1, this, "Device usage for: {0} ended at {1}. In use for {2} minutes", - deviceTracker.Parent.Name, e.UsageEndTime, e.MinutesUsed); - - FusionRoom.DeviceUsage.InputSig.StringValue = deviceUsage; - - Debug.Console(1, this, "Device usage string: {0}", deviceUsage); - } - - - protected void TryAddRouteActionSigs(string attrName, uint attrNum, string routeKey, Device pSrc) - { - Debug.Console(2, this, "Creating attribute '{0}' with join {1} for source {2}", - attrName, attrNum, pSrc.Key); - try - { - var sigD = FusionRoom.CreateOffsetBoolSig(attrNum, attrName, eSigIoMask.InputOutputSig); - // Need feedback when this source is selected - // Event handler, added below, will compare source changes with this sig dict - _sourceToFeedbackSigs.Add(pSrc, sigD.InputSig); - - // And respond to selection in Fusion - sigD.OutputSig.SetSigFalseAction(() => - { - var runRouteAction = Room as IRunRouteAction; - if (runRouteAction != null) - { - runRouteAction.RunRouteAction(routeKey, Room.SourceListKey); - } - }); - } - catch (Exception) - { - Debug.Console(2, this, "Error creating Fusion signal {0} {1} for device '{2}'. THIS NEEDS REWORKING", - attrNum, attrName, pSrc.Key); - } - } - - /// - /// - /// - private void SetUpCommunitcationMonitors() - { - uint displayNum = 0; - uint touchpanelNum = 0; - uint xpanelNum = 0; - - // Attach to all room's devices with monitors. - //foreach (var dev in DeviceManager.Devices) - foreach (var dev in DeviceManager.GetDevices()) - { - if (!(dev is ICommunicationMonitor)) - { - continue; - } - - string attrName = null; - uint attrNum = 1; - - //var keyNum = ExtractNumberFromKey(dev.Key); - //if (keyNum == -1) - //{ - // Debug.Console(1, this, "WARNING: Cannot link device '{0}' to numbered Fusion monitoring attributes", - // dev.Key); - // continue; - //} - //uint attrNum = Convert.ToUInt32(keyNum); - - // Check for UI devices - var uiDev = dev as IHasBasicTriListWithSmartObject; - if (uiDev != null) - { - if (uiDev.Panel is Crestron.SimplSharpPro.UI.XpanelForSmartGraphics) - { - attrNum = attrNum + touchpanelNum; - - if (attrNum > JoinMap.XpanelOnlineStart.JoinSpan) - { - continue; - } - attrName = JoinMap.XpanelOnlineStart.AttributeName + " " + attrNum; - attrNum += JoinMap.XpanelOnlineStart.JoinNumber; - - touchpanelNum++; - } - else - { - attrNum = attrNum + xpanelNum; - - if (attrNum > JoinMap.TouchpanelOnlineStart.JoinSpan) - { - continue; - } - attrName = JoinMap.TouchpanelOnlineStart.AttributeName + " " + attrNum; - attrNum += JoinMap.TouchpanelOnlineStart.JoinNumber; - - xpanelNum++; - } - } - - //else - if (dev is DisplayBase) - { - attrNum = attrNum + displayNum; - if (attrNum > JoinMap.DisplayOnlineStart.JoinSpan) - { - continue; - } - attrName = JoinMap.DisplayOnlineStart.AttributeName + " " + attrNum; - attrNum += JoinMap.DisplayOnlineStart.JoinNumber; - - displayNum++; - } - //else if (dev is DvdDeviceBase) - //{ - // if (attrNum > 5) - // continue; - // attrName = "Device Ok - DVD " + attrNum; - // attrNum += 260; - //} - // add set top box - - // add Cresnet roll-up - - // add DM-devices roll-up - - if (attrName != null) - { - // Link comm status to sig and update - var sigD = FusionRoom.CreateOffsetBoolSig(attrNum, attrName, eSigIoMask.InputSigOnly); - var smd = dev as ICommunicationMonitor; - sigD.InputSig.BoolValue = smd.CommunicationMonitor.Status == MonitorStatus.IsOk; - smd.CommunicationMonitor.StatusChange += - (o, a) => { sigD.InputSig.BoolValue = a.Status == MonitorStatus.IsOk; }; - Debug.Console(0, this, "Linking '{0}' communication monitor to Fusion '{1}'", dev.Key, attrName); - } - } - } - - protected virtual void SetUpDisplay() - { - try - { - //Setup Display Usage Monitoring - - var displays = DeviceManager.AllDevices.Where(d => d is DisplayBase); - - // Consider updating this in multiple display systems - - foreach (var display in displays.Cast()) - { - display.UsageTracker = new UsageTracking(display) {UsageIsTracked = true}; - display.UsageTracker.DeviceUsageEnded += UsageTracker_DeviceUsageEnded; - } - - var hasDefaultDisplay = Room as IHasDefaultDisplay; - if (hasDefaultDisplay == null) - { - return; - } - var defaultDisplay = hasDefaultDisplay.DefaultDisplay as DisplayBase; - if (defaultDisplay == null) - { - Debug.Console(1, this, "Cannot link null display to Fusion because default display is null"); - return; - } - - var dispPowerOnAction = new Action(b => - { - if (!b) - { - defaultDisplay.PowerOn(); - } - }); - var dispPowerOffAction = new Action(b => - { - if (!b) - { - defaultDisplay.PowerOff(); - } - }); - - // Display to fusion room sigs - FusionRoom.DisplayPowerOn.OutputSig.UserObject = dispPowerOnAction; - FusionRoom.DisplayPowerOff.OutputSig.UserObject = dispPowerOffAction; - - MapDisplayToRoomJoins(1, JoinMap.Display1Start.JoinNumber, defaultDisplay); - - - var deviceConfig = - ConfigReader.ConfigObject.Devices.FirstOrDefault(d => d.Key.Equals(defaultDisplay.Key)); - - //Check for existing asset in GUIDs collection - - FusionAsset tempAsset; - - if (FusionStaticAssets.ContainsKey(deviceConfig.Uid)) - { - tempAsset = FusionStaticAssets[deviceConfig.Uid]; - } - else - { - // Create a new asset - tempAsset = new FusionAsset(FusionRoomGuids.GetNextAvailableAssetNumber(FusionRoom), - defaultDisplay.Name, "Display", ""); - FusionStaticAssets.Add(deviceConfig.Uid, tempAsset); - } - - var dispAsset = FusionRoom.CreateStaticAsset(tempAsset.SlotNumber, tempAsset.Name, "Display", - tempAsset.InstanceId); - dispAsset.PowerOn.OutputSig.UserObject = dispPowerOnAction; - dispAsset.PowerOff.OutputSig.UserObject = dispPowerOffAction; - - var defaultTwoWayDisplay = defaultDisplay as IHasPowerControlWithFeedback; - if (defaultTwoWayDisplay != null) - { - defaultTwoWayDisplay.PowerIsOnFeedback.LinkInputSig(FusionRoom.DisplayPowerOn.InputSig); - if (defaultDisplay is IDisplayUsage) - { - (defaultDisplay as IDisplayUsage).LampHours.LinkInputSig(FusionRoom.DisplayUsage.InputSig); - } - - defaultTwoWayDisplay.PowerIsOnFeedback.LinkInputSig(dispAsset.PowerOn.InputSig); - } - - // Use extension methods - dispAsset.TrySetMakeModel(defaultDisplay); - dispAsset.TryLinkAssetErrorToCommunication(defaultDisplay); - } - catch (Exception e) - { - Debug.Console(1, this, "Error setting up display in Fusion: {0}", e); - } - } - - /// - /// Maps room attributes to a display at a specified index - /// - /// - /// - /// - /// a - protected virtual void MapDisplayToRoomJoins(int displayIndex, uint joinOffset, DisplayBase display) - { - var displayName = string.Format("Display {0} - ", displayIndex); - - - var hasDefaultDisplay = Room as IHasDefaultDisplay; - if (hasDefaultDisplay == null || display != hasDefaultDisplay.DefaultDisplay) - { - return; - } - // Display volume - var defaultDisplayVolume = FusionRoom.CreateOffsetUshortSig(JoinMap.VolumeFader1.JoinNumber, JoinMap.VolumeFader1.AttributeName, - eSigIoMask.InputOutputSig); - defaultDisplayVolume.OutputSig.UserObject = new Action(b => - { - var basicVolumeWithFeedback = display as IBasicVolumeWithFeedback; - if (basicVolumeWithFeedback == null) - { - return; - } - - basicVolumeWithFeedback.SetVolume(b); - basicVolumeWithFeedback.VolumeLevelFeedback.LinkInputSig(defaultDisplayVolume.InputSig); - }); - - - // Power on - var defaultDisplayPowerOn = FusionRoom.CreateOffsetBoolSig((uint) joinOffset, displayName + "Power On", - eSigIoMask.InputOutputSig); - defaultDisplayPowerOn.OutputSig.UserObject = new Action(b => - { - if (!b) - { - display.PowerOn(); - } - }); - - // Power Off - var defaultDisplayPowerOff = FusionRoom.CreateOffsetBoolSig((uint) joinOffset + 1, displayName + "Power Off", - eSigIoMask.InputOutputSig); - defaultDisplayPowerOn.OutputSig.UserObject = new Action(b => - { - if (!b) - { - display.PowerOff(); - } - }); - - - var defaultTwoWayDisplay = display as IHasPowerControlWithFeedback; - if (defaultTwoWayDisplay != null) - { - defaultTwoWayDisplay.PowerIsOnFeedback.LinkInputSig(defaultDisplayPowerOn.InputSig); - defaultTwoWayDisplay.PowerIsOnFeedback.LinkComplementInputSig(defaultDisplayPowerOff.InputSig); - } - - // Current Source - var defaultDisplaySourceNone = FusionRoom.CreateOffsetBoolSig((uint) joinOffset + 8, - displayName + "Source None", eSigIoMask.InputOutputSig); - defaultDisplaySourceNone.OutputSig.UserObject = new Action(b => - { - if (!b) - { - var runRouteAction = Room as IRunRouteAction; - if (runRouteAction != null) - { - runRouteAction.RunRouteAction("roomOff", Room.SourceListKey); - } - } - }); - } - - private void SetUpError() - { - // Roll up ALL device errors - _errorMessageRollUp = new StatusMonitorCollection(this); - foreach (var dev in DeviceManager.GetDevices()) - { - var md = dev as ICommunicationMonitor; - if (md != null) - { - _errorMessageRollUp.AddMonitor(md.CommunicationMonitor); - Debug.Console(2, this, "Adding '{0}' to room's overall error monitor", - md.CommunicationMonitor.Parent.Key); - } - } - _errorMessageRollUp.Start(); - FusionRoom.ErrorMessage.InputSig.StringValue = _errorMessageRollUp.Message; - _errorMessageRollUp.StatusChange += - (o, a) => { FusionRoom.ErrorMessage.InputSig.StringValue = _errorMessageRollUp.Message; }; - } - - /// - /// Sets up a local occupancy sensor, such as one attached to a Fusion Scheduling panel. The occupancy status of the room will be read from Fusion - /// - private void SetUpLocalOccupancy() - { - RoomIsOccupiedFeedback = new BoolFeedback(RoomIsOccupiedFeedbackFunc); - - FusionRoom.FusionAssetStateChange += FusionRoom_FusionAssetStateChange; - - // Build Occupancy Asset? - // Link sigs? - - //Room.SetRoomOccupancy(this as IOccupancyStatusProvider, 0); - } - - private void FusionRoom_FusionAssetStateChange(FusionBase device, FusionAssetStateEventArgs args) - { - if (args.EventId == FusionAssetEventId.RoomOccupiedReceivedEventId || - args.EventId == FusionAssetEventId.RoomUnoccupiedReceivedEventId) - { - RoomIsOccupiedFeedback.FireUpdate(); - } - } - - /// - /// Sets up remote occupancy that will relay the occupancy status determined by local system devices to Fusion - /// - private void SetUpRemoteOccupancy() - { - // Need to have the room occupancy object first and somehow determine the slot number of the Occupancy asset but will not be able to use the UID from config likely. - // Consider defining an object just for Room Occupancy (either eAssetType.Occupancy Sensor (local) or eAssetType.RemoteOccupancySensor (from Fusion sched. panel)) and reserving slot 4 for that asset (statics would start at 5) - - //if (Room.OccupancyObj != null) - //{ - - var tempOccAsset = _guiDs.OccupancyAsset; - - if (tempOccAsset == null) - { - FusionOccSensor = new FusionOccupancySensorAsset(eAssetType.OccupancySensor); - tempOccAsset = FusionOccSensor; - } - - var occSensorAsset = FusionRoom.CreateOccupancySensorAsset(tempOccAsset.SlotNumber, tempOccAsset.Name, - "Occupancy Sensor", tempOccAsset.InstanceId); - - occSensorAsset.RoomOccupied.AddSigToRVIFile = true; - - //var occSensorShutdownMinutes = FusionRoom.CreateOffsetUshortSig(70, "Occ Shutdown - Minutes", eSigIoMask.InputOutputSig); - - // Tie to method on occupancy object - //occSensorShutdownMinutes.OutputSig.UserObject(new Action(ushort)(b => Room.OccupancyObj.SetShutdownMinutes(b)); - - - RoomOccupancyRemoteStringFeedback = new StringFeedback(() => _roomOccupancyRemoteString); - Room.RoomOccupancy.RoomIsOccupiedFeedback.LinkInputSig(occSensorAsset.RoomOccupied.InputSig); - Room.RoomOccupancy.RoomIsOccupiedFeedback.OutputChange += RoomIsOccupiedFeedback_OutputChange; - RoomOccupancyRemoteStringFeedback.LinkInputSig(occSensorAsset.RoomOccupancyInfo.InputSig); - - //} - } - - private void RoomIsOccupiedFeedback_OutputChange(object sender, FeedbackEventArgs e) - { - _roomOccupancyRemoteString = String.Format(RemoteOccupancyXml, e.BoolValue ? "Occupied" : "Unoccupied"); - RoomOccupancyRemoteStringFeedback.FireUpdate(); - } - - /// - /// Helper to get the number from the end of a device's key string - /// - /// -1 if no number matched - private int ExtractNumberFromKey(string key) - { - var capture = System.Text.RegularExpressions.Regex.Match(key, @"\b(\d+)"); - if (!capture.Success) - { - return -1; - } - return Convert.ToInt32(capture.Groups[1].Value); - } - - /// - /// Event handler for when room source changes - /// - protected void Room_CurrentSourceInfoChange(SourceListItem info, ChangeType type) - { - // Handle null. Nothing to do when switching from or to null - if (info == null || info.SourceDevice == null) - { - return; - } - - var dev = info.SourceDevice; - if (type == ChangeType.WillChange) - { - if (_sourceToFeedbackSigs.ContainsKey(dev)) - { - _sourceToFeedbackSigs[dev].BoolValue = false; - } - } - else - { - if (_sourceToFeedbackSigs.ContainsKey(dev)) - { - _sourceToFeedbackSigs[dev].BoolValue = true; - } - //var name = (room == null ? "" : room.Name); - CurrentRoomSourceNameSig.InputSig.StringValue = info.SourceDevice.Name; - } - } - - protected void FusionRoom_FusionStateChange(FusionBase device, FusionStateEventArgs args) - { - // The sig/UO method: Need separate handlers for fixed and user sigs, all flavors, - // even though they all contain sigs. - - var sigData = args.UserConfiguredSigDetail as BooleanSigDataFixedName; - - BoolOutputSig outSig; - if (sigData != null) - { - outSig = sigData.OutputSig; - if (outSig.UserObject is Action) - { - (outSig.UserObject as Action).Invoke(outSig.BoolValue); - } - else if (outSig.UserObject is Action) - { - (outSig.UserObject as Action).Invoke(outSig.UShortValue); - } - else if (outSig.UserObject is Action) - { - (outSig.UserObject as Action).Invoke(outSig.StringValue); - } - return; - } - - var attrData = (args.UserConfiguredSigDetail as BooleanSigData); - if (attrData == null) - { - return; - } - outSig = attrData.OutputSig; - if (outSig.UserObject is Action) - { - (outSig.UserObject as Action).Invoke(outSig.BoolValue); - } - else if (outSig.UserObject is Action) - { - (outSig.UserObject as Action).Invoke(outSig.UShortValue); - } - else if (outSig.UserObject is Action) - { - (outSig.UserObject as Action).Invoke(outSig.StringValue); - } - } - } - - - public static class FusionRoomExtensions - { - /// - /// Creates and returns a fusion attribute. The join number will match the established Simpl - /// standard of 50+, and will generate a 50+ join in the RVI. It calls - /// FusionRoom.AddSig with join number - 49 - /// - /// The new attribute - public static BooleanSigData CreateOffsetBoolSig(this FusionRoom fr, uint number, string name, eSigIoMask mask) - { - if (number < 50) - { - throw new ArgumentOutOfRangeException("number", "Cannot be less than 50"); - } - number -= 49; - fr.AddSig(eSigType.Bool, number, name, mask); - return fr.UserDefinedBooleanSigDetails[number]; - } - - /// - /// Creates and returns a fusion attribute. The join number will match the established Simpl - /// standard of 50+, and will generate a 50+ join in the RVI. It calls - /// FusionRoom.AddSig with join number - 49 - /// - /// The new attribute - public static UShortSigData CreateOffsetUshortSig(this FusionRoom fr, uint number, string name, eSigIoMask mask) - { - if (number < 50) - { - throw new ArgumentOutOfRangeException("number", "Cannot be less than 50"); - } - number -= 49; - fr.AddSig(eSigType.UShort, number, name, mask); - return fr.UserDefinedUShortSigDetails[number]; - } - - /// - /// Creates and returns a fusion attribute. The join number will match the established Simpl - /// standard of 50+, and will generate a 50+ join in the RVI. It calls - /// FusionRoom.AddSig with join number - 49 - /// - /// The new attribute - public static StringSigData CreateOffsetStringSig(this FusionRoom fr, uint number, string name, eSigIoMask mask) - { - if (number < 50) - { - throw new ArgumentOutOfRangeException("number", "Cannot be less than 50"); - } - number -= 49; - fr.AddSig(eSigType.String, number, name, mask); - return fr.UserDefinedStringSigDetails[number]; - } - - /// - /// Creates and returns a static asset - /// - /// the new asset - public static FusionStaticAsset CreateStaticAsset(this FusionRoom fr, uint number, string name, string type, - string instanceId) - { - try - { - Debug.Console(0, "Adding Fusion Static Asset '{0}' to slot {1} with GUID: '{2}'", name, number, instanceId); - - fr.AddAsset(eAssetType.StaticAsset, number, name, type, instanceId); - return fr.UserConfigurableAssetDetails[number].Asset as FusionStaticAsset; - } - catch (InvalidOperationException ex) - { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Error creating Static Asset for device: '{0}'. Check that multiple devices don't have missing or duplicate uid properties in configuration. /r/nError: {1}", name, ex); - return null; - } - catch (Exception e) - { - Debug.Console(2, Debug.ErrorLogLevel.Error, "Error creating Static Asset: {0}", e); - return null; - } - } - - public static FusionOccupancySensor CreateOccupancySensorAsset(this FusionRoom fr, uint number, string name, - string type, string instanceId) - { - try - { - Debug.Console(0, "Adding Fusion Occupancy Sensor Asset '{0}' to slot {1} with GUID: '{2}'", name, number, - instanceId); - - fr.AddAsset(eAssetType.OccupancySensor, number, name, type, instanceId); - return fr.UserConfigurableAssetDetails[number].Asset as FusionOccupancySensor; - } - catch (InvalidOperationException ex) - { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Error creating Static Asset for device: '{0}'. Check that multiple devices don't have missing or duplicate uid properties in configuration. Error: {1}", name, ex); - return null; - } - catch (Exception e) - { - Debug.Console(2, Debug.ErrorLogLevel.Error, "Error creating Static Asset: {0}", e); - return null; - } - } - } - - //************************************************************************************************ - /// - /// Extensions to enhance Fusion room, asset and signal creation. - /// - public static class FusionStaticAssetExtensions - { - /// - /// Tries to set a Fusion asset with the make and model of a device. - /// If the provided Device is IMakeModel, will set the corresponding parameters on the fusion static asset. - /// Otherwise, does nothing. - /// - public static void TrySetMakeModel(this FusionStaticAsset asset, Device device) - { - var mm = device as IMakeModel; - if (mm != null) - { - asset.ParamMake.Value = mm.DeviceMake; - asset.ParamModel.Value = mm.DeviceModel; - } - } - - /// - /// Tries to attach the AssetError input on a Fusion asset to a Device's - /// CommunicationMonitor.StatusChange event. Does nothing if the device is not - /// IStatusMonitor - /// - /// - /// - public static void TryLinkAssetErrorToCommunication(this FusionStaticAsset asset, Device device) - { - if (device is ICommunicationMonitor) - { - var monitor = (device as ICommunicationMonitor).CommunicationMonitor; - monitor.StatusChange += (o, a) => - { - // Link connected and error inputs on asset - asset.Connected.InputSig.BoolValue = a.Status == MonitorStatus.IsOk; - asset.AssetError.InputSig.StringValue = a.Status.ToString(); - }; - // set current value - asset.Connected.InputSig.BoolValue = monitor.Status == MonitorStatus.IsOk; - asset.AssetError.InputSig.StringValue = monitor.Status.ToString(); - } - } - } - - public class RoomInformation - { - public RoomInformation() - { - FusionCustomProperties = new List(); - } - - public string ID { get; set; } - public string Name { get; set; } - public string Location { get; set; } - public string Description { get; set; } - public string TimeZone { get; set; } - public string WebcamURL { get; set; } - public string BacklogMsg { get; set; } - public string SubErrorMsg { get; set; } - public string EmailInfo { get; set; } - public List FusionCustomProperties { get; set; } - } - - public class FusionCustomProperty - { - public FusionCustomProperty() - { - } - - public FusionCustomProperty(string id) - { - ID = id; - } - - public string ID { get; set; } - public string CustomFieldName { get; set; } - public string CustomFieldType { get; set; } - public string CustomFieldValue { get; set; } - } +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharp.CrestronIO; +using Crestron.SimplSharp.CrestronXml; +using Crestron.SimplSharp.CrestronXml.Serialization; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.Fusion; +using Full.Newtonsoft.Json; +using PepperDash.Core; +using PepperDash.Essentials.Core.Config; + +namespace PepperDash.Essentials.Core.Fusion +{ + public class EssentialsHuddleSpaceFusionSystemControllerBase : Device, IOccupancyStatusProvider + { + protected EssentialsHuddleSpaceRoomFusionRoomJoinMap JoinMap; + + private const string RemoteOccupancyXml = "Local{0}"; + private readonly bool _guidFileExists; + + private readonly Dictionary _sourceToFeedbackSigs = + new Dictionary(); + + protected StringSigData CurrentRoomSourceNameSig; + + public FusionCustomPropertiesBridge CustomPropertiesBridge = new FusionCustomPropertiesBridge(); + protected FusionOccupancySensorAsset FusionOccSensor; + protected FusionRemoteOccupancySensor FusionRemoteOccSensor; + + protected FusionRoom FusionRoom; + protected Dictionary FusionStaticAssets; + public long PushNotificationTimeout = 5000; + protected IEssentialsRoom Room; + public long SchedulePollInterval = 300000; + + private Event _currentMeeting; + private RoomSchedule _currentSchedule; + private CTimer _dailyTimeRequestTimer; + private StatusMonitorCollection _errorMessageRollUp; + + private FusionRoomGuids _guiDs; + private uint _ipId; + + private bool _isRegisteredForSchedulePushNotifications; + private Event _nextMeeting; + + private CTimer _pollTimer; + + private CTimer _pushNotificationTimer; + + private string _roomOccupancyRemoteString; + + #region System Info Sigs + + //StringSigData SystemName; + //StringSigData Model; + //StringSigData SerialNumber; + //StringSigData Uptime; + + #endregion + + #region Processor Info Sigs + + private readonly StringSigData[] _program = new StringSigData[10]; + private StringSigData _dns1; + private StringSigData _dns2; + private StringSigData _domain; + private StringSigData _firmware; + private StringSigData _gateway; + private StringSigData _hostname; + private StringSigData _ip1; + private StringSigData _ip2; + private StringSigData _mac1; + private StringSigData _mac2; + private StringSigData _netMask1; + private StringSigData _netMask2; + + #endregion + + #region Default Display Source Sigs + + private BooleanSigData[] _source = new BooleanSigData[10]; + + #endregion + + public EssentialsHuddleSpaceFusionSystemControllerBase(IEssentialsRoom room, uint ipId, string joinMapKey) + : base(room.Key + "-fusion") + { + try + { + JoinMap = new EssentialsHuddleSpaceRoomFusionRoomJoinMap(1); + + CrestronConsole.AddNewConsoleCommand((o) => JoinMap.PrintJoinMapInfo(), string.Format("ptjnmp-{0}", Key), "Prints Attribute Join Map", ConsoleAccessLevelEnum.AccessOperator); + + if (!string.IsNullOrEmpty(joinMapKey)) + { + var customJoins = JoinMapHelper.TryGetJoinMapAdvancedForDevice(joinMapKey); + if (customJoins != null) + { + JoinMap.SetCustomJoinData(customJoins); + } + } + + Room = room; + + _ipId = ipId; + + FusionStaticAssets = new Dictionary(); + + _guiDs = new FusionRoomGuids(); + + var mac = + CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_MAC_ADDRESS, 0); + + var slot = Global.ControlSystem.ProgramNumber; + + var guidFilePath = Global.FilePathPrefix + + string.Format(@"{0}-FusionGuids-{1:X2}.json", InitialParametersClass.ProgramIDTag, _ipId); + + var oldGuidFilePath = Global.FilePathPrefix + + string.Format(@"{0}-FusionGuids.json", InitialParametersClass.ProgramIDTag); + + if (File.Exists(oldGuidFilePath)) + { + Debug.Console(0, this, "Migrating from old Fusion GUID file to new Fusion GUID File"); + + File.Copy(oldGuidFilePath, guidFilePath); + + File.Delete(oldGuidFilePath); + } + + _guidFileExists = File.Exists(guidFilePath); + + // Check if file exists + if (!_guidFileExists) + { + // Does not exist. Create GUIDs + _guiDs = new FusionRoomGuids(Room.Name, ipId, _guiDs.GenerateNewRoomGuid(slot, mac), + FusionStaticAssets); + } + else + { + // Exists. Read GUIDs + ReadGuidFile(guidFilePath); + } + + if (Room.RoomOccupancy != null) + { + if (Room.OccupancyStatusProviderIsRemote) + { + SetUpRemoteOccupancy(); + } + else + { + SetUpLocalOccupancy(); + } + } + + + AddPostActivationAction(() => PostActivate(guidFilePath)); + } + catch (Exception e) + { + Debug.Console(0, this, Debug.ErrorLogLevel.Error, "Error Building Fusion System Controller: {0}", e); + } + } + + private void PostActivate(string guidFilePath) + { + CreateSymbolAndBasicSigs(_ipId); + SetUpSources(); + SetUpCommunitcationMonitors(); + SetUpDisplay(); + SetUpError(); + ExecuteCustomSteps(); + + FusionRVI.GenerateFileForAllFusionDevices(); + + GenerateGuidFile(guidFilePath); + } + + protected string RoomGuid + { + get { return _guiDs.RoomGuid; } + } + + public StringFeedback RoomOccupancyRemoteStringFeedback { get; private set; } + + protected Func RoomIsOccupiedFeedbackFunc + { + get { return () => FusionRemoteOccSensor.RoomOccupied.OutputSig.BoolValue; } + } + + #region IOccupancyStatusProvider Members + + public BoolFeedback RoomIsOccupiedFeedback { get; private set; } + + #endregion + + public event EventHandler ScheduleChange; + //public event EventHandler MeetingEndWarning; + //public event EventHandler NextMeetingBeginWarning; + + public event EventHandler RoomInfoChange; + + //ScheduleResponseEvent NextMeeting; + + /// + /// Used for extension classes to execute whatever steps are necessary before generating the RVI and GUID files + /// + protected virtual void ExecuteCustomSteps() + { + } + + /// + /// Generates the guid file in NVRAM. If the file already exists it will be overwritten. + /// + /// path for the file + private void GenerateGuidFile(string filePath) + { + if (string.IsNullOrEmpty(filePath)) + { + Debug.Console(0, this, "Error writing guid file. No path specified."); + return; + } + + var fileLock = new CCriticalSection(); + + try + { + if (fileLock.Disposed) + { + return; + } + + fileLock.Enter(); + + Debug.Console(1, this, "Writing GUIDs to file"); + + _guiDs = FusionOccSensor == null + ? new FusionRoomGuids(Room.Name, _ipId, RoomGuid, FusionStaticAssets) + : new FusionRoomGuids(Room.Name, _ipId, RoomGuid, FusionStaticAssets, FusionOccSensor); + + var json = JsonConvert.SerializeObject(_guiDs, Full.Newtonsoft.Json.Formatting.Indented); + + using (var sw = new StreamWriter(filePath)) + { + sw.Write(json); + sw.Flush(); + } + + Debug.Console(1, this, "Guids successfully written to file '{0}'", filePath); + } + catch (Exception e) + { + Debug.Console(0, this, "Error writing guid file: {0}", e); + } + finally + { + if (!fileLock.Disposed) + { + fileLock.Leave(); + } + } + } + + /// + /// Reads the guid file from NVRAM + /// + /// path for te file + private void ReadGuidFile(string filePath) + { + if (string.IsNullOrEmpty(filePath)) + { + Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Error reading guid file. No path specified."); + return; + } + + var fileLock = new CCriticalSection(); + + try + { + if (fileLock.Disposed) + { + return; + } + + fileLock.Enter(); + + if (File.Exists(filePath)) + { + var json = File.ReadToEnd(filePath, Encoding.ASCII); + + _guiDs = JsonConvert.DeserializeObject(json); + + _ipId = _guiDs.IpId; + + FusionStaticAssets = _guiDs.StaticAssets; + } + + Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Fusion Guids successfully read from file: {0}", + filePath); + + Debug.Console(1, this, "\r\n********************\r\n\tRoom Name: {0}\r\n\tIPID: {1:X}\r\n\tRoomGuid: {2}\r\n*******************", Room.Name, _ipId, RoomGuid); + + foreach (var item in FusionStaticAssets) + { + Debug.Console(1, this, "\nAsset Name: {0}\nAsset No: {1}\n Guid: {2}", item.Value.Name, + item.Value.SlotNumber, item.Value.InstanceId); + } + } + catch (Exception e) + { + Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Error reading guid file: {0}", e); + } + finally + { + if (!fileLock.Disposed) + { + fileLock.Leave(); + } + } + } + + protected virtual void CreateSymbolAndBasicSigs(uint ipId) + { + Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Creating Fusion Room symbol with GUID: {0} and IP-ID {1:X2}", RoomGuid, ipId); + + FusionRoom = new FusionRoom(ipId, Global.ControlSystem, Room.Name, RoomGuid); + FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.Use(); + FusionRoom.ExtenderFusionRoomDataReservedSigs.Use(); + + FusionRoom.Register(); + + FusionRoom.FusionStateChange += FusionRoom_FusionStateChange; + + FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.DeviceExtenderSigChange += + FusionRoomSchedule_DeviceExtenderSigChange; + FusionRoom.ExtenderFusionRoomDataReservedSigs.DeviceExtenderSigChange += + ExtenderFusionRoomDataReservedSigs_DeviceExtenderSigChange; + FusionRoom.OnlineStatusChange += FusionRoom_OnlineStatusChange; + + 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(CreateAdHocMeeting, "FusCreateMeeting", + "Creates and Ad Hoc meeting for on hour or until the next meeting", + ConsoleAccessLevelEnum.AccessOperator); + + // Room to fusion room + Room.OnFeedback.LinkInputSig(FusionRoom.SystemPowerOn.InputSig); + + // Moved to + 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. + var hasCurrentSourceInfoChange = Room as IHasCurrentSourceInfoChange; + if (hasCurrentSourceInfoChange != null) + { + hasCurrentSourceInfoChange.CurrentSourceChange += Room_CurrentSourceInfoChange; + } + + + FusionRoom.SystemPowerOn.OutputSig.SetSigFalseAction(Room.PowerOnToDefaultOrLastSource); + FusionRoom.SystemPowerOff.OutputSig.SetSigFalseAction(() => + { + var runRouteAction = Room as IRunRouteAction; + if (runRouteAction != null) + { + runRouteAction.RunRouteAction("roomOff", Room.SourceListKey); + } + }); + // NO!! room.RoomIsOn.LinkComplementInputSig(FusionRoom.SystemPowerOff.InputSig); + FusionRoom.ErrorMessage.InputSig.StringValue = + "3: 7 Errors: This is a really long error message;This is a really long error message;This is a really long error message;This is a really long error message;This is a really long error message;This is a really long error message;This is a really long error message;"; + + SetUpEthernetValues(); + + GetProcessorEthernetValues(); + + GetSystemInfo(); + + GetProcessorInfo(); + + CrestronEnvironment.EthernetEventHandler += CrestronEnvironment_EthernetEventHandler; + } + + protected void CrestronEnvironment_EthernetEventHandler(EthernetEventArgs ethernetEventArgs) + { + if (ethernetEventArgs.EthernetEventType == eEthernetEventType.LinkUp) + { + GetProcessorEthernetValues(); + } + } + + protected void GetSystemInfo() + { + //SystemName.InputSig.StringValue = Room.Name; + //Model.InputSig.StringValue = InitialParametersClass.ControllerPromptName; + //SerialNumber.InputSig.StringValue = InitialParametersClass. + + var response = string.Empty; + + var systemReboot = FusionRoom.CreateOffsetBoolSig(JoinMap.ProcessorReboot.JoinNumber, JoinMap.ProcessorReboot.AttributeName, eSigIoMask.OutputSigOnly); + systemReboot.OutputSig.SetSigFalseAction( + () => CrestronConsole.SendControlSystemCommand("reboot", ref response)); + } + + protected void SetUpEthernetValues() + { + _ip1 = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorIp1.JoinNumber, JoinMap.ProcessorIp1.AttributeName, eSigIoMask.InputSigOnly); + _ip2 = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorIp2.JoinNumber, JoinMap.ProcessorIp2.AttributeName, eSigIoMask.InputSigOnly); + _gateway = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorGateway.JoinNumber, JoinMap.ProcessorGateway.AttributeName, eSigIoMask.InputSigOnly); + _hostname = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorHostname.JoinNumber, JoinMap.ProcessorHostname.AttributeName, eSigIoMask.InputSigOnly); + _domain = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorDomain.JoinNumber, JoinMap.ProcessorDomain.AttributeName, eSigIoMask.InputSigOnly); + _dns1 = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorDns1.JoinNumber, JoinMap.ProcessorDns1.AttributeName, eSigIoMask.InputSigOnly); + _dns2 = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorDns2.JoinNumber, JoinMap.ProcessorDns2.AttributeName, eSigIoMask.InputSigOnly); + _mac1 = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorMac1.JoinNumber, JoinMap.ProcessorMac1.AttributeName, eSigIoMask.InputSigOnly); + _mac2 = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorMac2.JoinNumber, JoinMap.ProcessorMac2.AttributeName, eSigIoMask.InputSigOnly); + _netMask1 = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorNetMask1.JoinNumber, JoinMap.ProcessorNetMask1.AttributeName, eSigIoMask.InputSigOnly); + _netMask2 = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorNetMask2.JoinNumber, JoinMap.ProcessorNetMask2.AttributeName, eSigIoMask.InputSigOnly); + } + + protected void GetProcessorEthernetValues() + { + _ip1.InputSig.StringValue = + CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0); + _gateway.InputSig.StringValue = + CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_ROUTER, 0); + _hostname.InputSig.StringValue = + CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_HOSTNAME, 0); + _domain.InputSig.StringValue = + CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_DOMAIN_NAME, 0); + + var dnsServers = + CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_DNS_SERVER, 0).Split(','); + _dns1.InputSig.StringValue = dnsServers[0]; + if (dnsServers.Length > 1) + { + _dns2.InputSig.StringValue = dnsServers[1]; + } + + _mac1.InputSig.StringValue = + CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_MAC_ADDRESS, 0); + _netMask1.InputSig.StringValue = + CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_MASK, 0); + + // Interface 1 + + if (InitialParametersClass.NumberOfEthernetInterfaces > 1) + // Only get these values if the processor has more than 1 NIC + { + _ip2.InputSig.StringValue = + CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 1); + _mac2.InputSig.StringValue = + CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_MAC_ADDRESS, 1); + _netMask2.InputSig.StringValue = + CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_MASK, 1); + } + } + + protected void GetProcessorInfo() + { + _firmware = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorFirmware.JoinNumber, JoinMap.ProcessorFirmware.AttributeName, eSigIoMask.InputSigOnly); + + if (CrestronEnvironment.DevicePlatform != eDevicePlatform.Server) + { + for (var i = 0; i < Global.ControlSystem.NumProgramsSupported; i++) + { + var join = JoinMap.ProgramNameStart.JoinNumber + i; + var progNum = i + 1; + _program[i] = FusionRoom.CreateOffsetStringSig((uint) join, + string.Format("{0} {1}", JoinMap.ProgramNameStart.AttributeName, progNum), eSigIoMask.InputSigOnly); + } + } + + _firmware.InputSig.StringValue = InitialParametersClass.FirmwareVersion; + } + + protected void GetCustomProperties() + { + if (FusionRoom.IsOnline) + { + const string fusionRoomCustomPropertiesRequest = + @"RoomConfigurationRequest"; + + FusionRoom.ExtenderFusionRoomDataReservedSigs.RoomConfigQuery.StringValue = + fusionRoomCustomPropertiesRequest; + } + } + + private void GetTouchpanelInfo() + { + // TODO: Get IP and Project Name from TP + } + + protected void FusionRoom_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) + { + if (args.DeviceOnLine) + { + CrestronInvoke.BeginInvoke( (o) => + { + CrestronEnvironment.Sleep(200); + + // Send Push Notification Action request: + + const string requestId = "InitialPushRequest"; + + + var actionRequest = + string.Format("\n{0}\n", requestId) + + "RegisterPushModel\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n"; + + Debug.Console(2, this, "Sending Fusion ActionRequest: \n{0}", actionRequest); + + FusionRoom.ExtenderFusionRoomDataReservedSigs.ActionQuery.StringValue = actionRequest; + + GetCustomProperties(); + + // Request current Fusion Server Time + RequestLocalDateTime(null); + + // Setup timer to request time daily + if (_dailyTimeRequestTimer != null && !_dailyTimeRequestTimer.Disposed) + { + _dailyTimeRequestTimer.Stop(); + _dailyTimeRequestTimer.Dispose(); + } + + _dailyTimeRequestTimer = new CTimer(RequestLocalDateTime, null, 86400000, 86400000); + + _dailyTimeRequestTimer.Reset(86400000, 86400000); + }); + } + } + + /// + /// Requests the local date and time from the Fusion Server + /// + /// + public void RequestLocalDateTime(object callbackObject) + { + const string timeRequestId = "TimeRequest"; + + var timeRequest = string.Format("{0}", + timeRequestId); + + FusionRoom.ExtenderFusionRoomDataReservedSigs.LocalDateTimeQuery.StringValue = timeRequest; + } + + /// + /// Generates a room schedule request for this room for the next 24 hours. + /// + public void RequestFullRoomSchedule(object callbackObject) + { + var now = DateTime.Today; + + var currentTime = now.ToString("s"); + + var requestTest = + string.Format( + "FullSchedleRequest{0}{1}24", + RoomGuid, currentTime); + + Debug.Console(2, this, "Sending Fusion ScheduleQuery: \n{0}", requestTest); + + FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.ScheduleQuery.StringValue = requestTest; + + if (_isRegisteredForSchedulePushNotifications) + { + _pushNotificationTimer.Stop(); + } + } + + /// + /// Wrapper method to allow console commands to modify the current meeting end time + /// + /// meetingID extendTime + public void ModifyMeetingEndTimeConsoleHelper(string command) + { + var extendMinutes = -1; + + const string requestId = "ModifyMeetingTest12345"; + + try + { + var tokens = command.Split(' '); + + extendMinutes = Int32.Parse(tokens[1]); + } + catch (Exception e) + { + Debug.Console(1, this, "Error parsing console command: {0}", e); + } + + ModifyMeetingEndTime(requestId, extendMinutes); + } + + /// + /// Ends or Extends the current meeting by the specified number of minutes. + /// + /// + /// Number of minutes to extend the meeting. A value of 0 will end the meeting. + public void ModifyMeetingEndTime(string requestId, int extendMinutes) + { + if (_currentMeeting == null) + { + Debug.Console(1, this, "No meeting in progress. Unable to modify end time."); + return; + } + + if (extendMinutes > -1) + { + if (extendMinutes > 0) + { + var extendTime = _currentMeeting.dtEnd - DateTime.Now; + var extendMinutesRaw = extendTime.TotalMinutes; + + extendMinutes = extendMinutes + (int) Math.Round(extendMinutesRaw); + } + + + var requestTest = string.Format( + "{0}{1}MeetingChange" + , requestId, RoomGuid, _currentMeeting.MeetingID, extendMinutes); + + Debug.Console(1, this, "Sending MeetingChange Request: \n{0}", requestTest); + + FusionRoom.ExtenderFusionRoomDataReservedSigs.ActionQuery.StringValue = requestTest; + } + else + { + Debug.Console(1, this, "Invalid time specified"); + } + } + + /// + /// Creates and Ad Hoc meeting with a duration of 1 hour, or until the next meeting if in less than 1 hour. + /// + public void CreateAdHocMeeting(string command) + { + const string requestId = "CreateAdHocMeeting"; + + var now = DateTime.Now.AddMinutes(1); + + now.AddSeconds(-now.Second); + + // Assume 1 hour meeting if possible + var dtEnd = now.AddHours(1); + + // Check if room is available for 1 hour before next meeting + if (_nextMeeting != null) + { + var roomAvailable = _nextMeeting.dtEnd.Subtract(dtEnd); + + if (roomAvailable.TotalMinutes < 60) + { + // Room not available for full hour, book until next meeting starts + dtEnd = _nextMeeting.dtEnd; + } + } + + var createMeetingRequest = + "" + + string.Format("{0}", requestId) + + string.Format("{0}", RoomGuid) + + "" + + string.Format("{0}", now.ToString("s")) + + string.Format("{0}", dtEnd.ToString("s")) + + "AdHoc Meeting" + + "Room User" + + "Example Message" + + "" + + ""; + + Debug.Console(2, this, "Sending CreateMeeting Request: \n{0}", createMeetingRequest); + + FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.CreateMeeting.StringValue = createMeetingRequest; + + //Debug.Console(1, this, "Sending CreateMeeting Request: \n{0}", command); + + //FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.CreateMeeting.StringValue = command; + } + + /// + /// Event handler method for Device Extender sig changes + /// + /// + /// + protected void ExtenderFusionRoomDataReservedSigs_DeviceExtenderSigChange(DeviceExtender currentDeviceExtender, + SigEventArgs args) + { + Debug.Console(2, this, "Event: {0}\n Sig: {1}\nFusionResponse:\n{2}", args.Event, args.Sig.Name, + args.Sig.StringValue); + + + if (args.Sig == FusionRoom.ExtenderFusionRoomDataReservedSigs.ActionQueryResponse) + { + try + { + var message = new XmlDocument(); + + message.LoadXml(args.Sig.StringValue); + + var actionResponse = message["ActionResponse"]; + + if (actionResponse == null) + { + return; + } + + var requestId = actionResponse["RequestID"]; + + if (requestId.InnerText != "InitialPushRequest") + { + return; + } + + if (actionResponse["ActionID"].InnerText != "RegisterPushModel") + { + return; + } + + var parameters = actionResponse["Parameters"]; + + foreach (var isRegistered in from XmlElement parameter in parameters + where parameter.HasAttributes + select parameter.Attributes + into attributes + where attributes["ID"].Value == "Registered" + select Int32.Parse(attributes["Value"].Value)) + { + switch (isRegistered) + { + case 1: + _isRegisteredForSchedulePushNotifications = true; + if (_pollTimer != null && !_pollTimer.Disposed) + { + _pollTimer.Stop(); + _pollTimer.Dispose(); + } + _pushNotificationTimer = new CTimer(RequestFullRoomSchedule, null, + PushNotificationTimeout, PushNotificationTimeout); + _pushNotificationTimer.Reset(PushNotificationTimeout, PushNotificationTimeout); + break; + case 0: + _isRegisteredForSchedulePushNotifications = false; + if (_pushNotificationTimer != null && !_pushNotificationTimer.Disposed) + { + _pushNotificationTimer.Stop(); + _pushNotificationTimer.Dispose(); + } + _pollTimer = new CTimer(RequestFullRoomSchedule, null, SchedulePollInterval, + SchedulePollInterval); + _pollTimer.Reset(SchedulePollInterval, SchedulePollInterval); + break; + } + } + } + catch (Exception e) + { + Debug.Console(1, this, "Error parsing ActionQueryResponse: {0}", e); + } + } + else if (args.Sig == FusionRoom.ExtenderFusionRoomDataReservedSigs.LocalDateTimeQueryResponse) + { + try + { + var message = new XmlDocument(); + + message.LoadXml(args.Sig.StringValue); + + var localDateTimeResponse = message["LocalTimeResponse"]; + + if (localDateTimeResponse != null) + { + var localDateTime = localDateTimeResponse["LocalDateTime"]; + + if (localDateTime != null) + { + var tempLocalDateTime = localDateTime.InnerText; + + var currentTime = DateTime.Parse(tempLocalDateTime); + + Debug.Console(1, this, "DateTime from Fusion Server: {0}", currentTime); + + // Parse time and date from response and insert values + CrestronEnvironment.SetTimeAndDate((ushort) currentTime.Hour, (ushort) currentTime.Minute, + (ushort) currentTime.Second, (ushort) currentTime.Month, (ushort) currentTime.Day, + (ushort) currentTime.Year); + + Debug.Console(1, this, "Processor time set to {0}", CrestronEnvironment.GetLocalTime()); + } + } + } + catch (Exception e) + { + Debug.Console(1, this, "Error parsing LocalDateTimeQueryResponse: {0}", e); + } + } + else if (args.Sig == FusionRoom.ExtenderFusionRoomDataReservedSigs.RoomConfigResponse) + { + // Room info response with custom properties + + var roomConfigResponseArgs = args.Sig.StringValue.Replace("&", "and"); + + Debug.Console(2, this, "Fusion Response: \n {0}", roomConfigResponseArgs); + + try + { + var roomConfigResponse = new XmlDocument(); + + roomConfigResponse.LoadXml(roomConfigResponseArgs); + + var requestRoomConfiguration = roomConfigResponse["RoomConfigurationResponse"]; + + if (requestRoomConfiguration != null) + { + var roomInformation = new RoomInformation(); + + foreach (XmlElement e in roomConfigResponse.FirstChild.ChildNodes) + { + if (e.Name == "RoomInformation") + { + var roomInfo = new XmlReader(e.OuterXml); + + roomInformation = CrestronXMLSerialization.DeSerializeObject(roomInfo); + } + else if (e.Name == "CustomFields") + { + foreach (XmlElement el in e) + { + var customProperty = new FusionCustomProperty(); + + if (el.Name == "CustomField") + { + customProperty.ID = el.Attributes["ID"].Value; + } + + foreach (XmlElement elm in el) + { + if (elm.Name == "CustomFieldName") + { + customProperty.CustomFieldName = elm.InnerText; + } + if (elm.Name == "CustomFieldType") + { + customProperty.CustomFieldType = elm.InnerText; + } + if (elm.Name == "CustomFieldValue") + { + customProperty.CustomFieldValue = elm.InnerText; + } + } + + roomInformation.FusionCustomProperties.Add(customProperty); + } + } + } + + var handler = RoomInfoChange; + if (handler != null) + { + handler(this, new EventArgs()); + } + + CustomPropertiesBridge.EvaluateRoomInfo(Room.Key, roomInformation); + } + } + catch (Exception e) + { + Debug.Console(1, this, "Error parsing Custom Properties response: {0}", e); + } + //PrintRoomInfo(); + //getRoomInfoBusy = false; + //_DynFusion.API.EISC.BooleanInput[Constants.GetRoomInfo].BoolValue = getRoomInfoBusy; + } + } + + /// + /// Event handler method for Device Extender sig changes + /// + /// + /// + protected void FusionRoomSchedule_DeviceExtenderSigChange(DeviceExtender currentDeviceExtender, + SigEventArgs args) + { + Debug.Console(2, this, "Scehdule Response Event: {0}\n Sig: {1}\nFusionResponse:\n{2}", args.Event, + args.Sig.Name, args.Sig.StringValue); + + + if (args.Sig == FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.ScheduleResponse) + { + try + { + var scheduleResponse = new ScheduleResponse(); + + var message = new XmlDocument(); + + message.LoadXml(args.Sig.StringValue); + + var response = message["ScheduleResponse"]; + + if (response != null) + { + // Check for push notification + if (response["RequestID"].InnerText == "RVRequest") + { + var action = response["Action"]; + + if (action.OuterXml.IndexOf("RequestSchedule", StringComparison.Ordinal) > -1) + { + _pushNotificationTimer.Reset(PushNotificationTimeout, PushNotificationTimeout); + } + } + else // Not a push notification + { + _currentSchedule = new RoomSchedule(); // Clear Current Schedule + _currentMeeting = null; // Clear Current Meeting + _nextMeeting = null; // Clear Next Meeting + + var isNextMeeting = false; + + foreach (XmlElement element in message.FirstChild.ChildNodes) + { + if (element.Name == "RequestID") + { + scheduleResponse.RequestID = element.InnerText; + } + else if (element.Name == "RoomID") + { + scheduleResponse.RoomID = element.InnerText; + } + else if (element.Name == "RoomName") + { + scheduleResponse.RoomName = element.InnerText; + } + else if (element.Name == "Event") + { + Debug.Console(2, this, "Event Found:\n{0}", element.OuterXml); + + var reader = new XmlReader(element.OuterXml); + + var tempEvent = CrestronXMLSerialization.DeSerializeObject(reader); + + scheduleResponse.Events.Add(tempEvent); + + // Check is this is the current event + if (tempEvent.dtStart <= DateTime.Now && tempEvent.dtEnd >= DateTime.Now) + { + _currentMeeting = tempEvent; // Set Current Meeting + isNextMeeting = true; // Flag that next element is next meeting + } + + if (isNextMeeting) + { + _nextMeeting = tempEvent; // Set Next Meeting + isNextMeeting = false; + } + + _currentSchedule.Meetings.Add(tempEvent); + } + } + + PrintTodaysSchedule(); + + if (!_isRegisteredForSchedulePushNotifications) + { + _pollTimer.Reset(SchedulePollInterval, SchedulePollInterval); + } + + // Fire Schedule Change Event + var handler = ScheduleChange; + + if (handler != null) + { + handler(this, new ScheduleChangeEventArgs {Schedule = _currentSchedule}); + } + } + } + } + catch (Exception e) + { + Debug.Console(1, this, "Error parsing ScheduleResponse: {0}", e); + } + } + else if (args.Sig == FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.CreateResponse) + { + Debug.Console(2, this, "Create Meeting Response Event: {0}\n Sig: {1}\nFusionResponse:\n{2}", args.Event, + args.Sig.Name, args.Sig.StringValue); + } + } + + /// + /// Prints today's schedule to console for debugging + /// + private void PrintTodaysSchedule() + { + if (Debug.Level > 1) + { + if (_currentSchedule.Meetings.Count > 0) + { + Debug.Console(1, this, "Today's Schedule for '{0}'\n", Room.Name); + + foreach (var e in _currentSchedule.Meetings) + { + Debug.Console(1, this, "Subject: {0}", e.Subject); + Debug.Console(1, this, "Organizer: {0}", e.Organizer); + Debug.Console(1, this, "MeetingID: {0}", e.MeetingID); + Debug.Console(1, this, "Start Time: {0}", e.dtStart); + Debug.Console(1, this, "End Time: {0}", e.dtEnd); + Debug.Console(1, this, "Duration: {0}\n", e.DurationInMinutes); + } + } + } + } + + protected virtual void SetUpSources() + { + // Sources + var dict = ConfigReader.ConfigObject.GetSourceListForKey(Room.SourceListKey); + if (dict != null) + { + // NEW PROCESS: + // Make these lists and insert the fusion attributes by iterating these + var setTopBoxes = dict.Where(d => d.Value.SourceDevice is ISetTopBoxControls); + uint i = 1; + foreach (var kvp in setTopBoxes) + { + TryAddRouteActionSigs(JoinMap.Display1SetTopBoxSourceStart.AttributeName + " " + i, JoinMap.Display1SetTopBoxSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice); + i++; + if (i > JoinMap.Display1SetTopBoxSourceStart.JoinSpan) // We only have five spots + { + break; + } + } + + var discPlayers = dict.Where(d => d.Value.SourceDevice is IDiscPlayerControls); + i = 1; + foreach (var kvp in discPlayers) + { + TryAddRouteActionSigs(JoinMap.Display1DiscPlayerSourceStart.AttributeName + " " + i, JoinMap.Display1DiscPlayerSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice); + i++; + if (i > JoinMap.Display1DiscPlayerSourceStart.JoinSpan) // We only have five spots + { + break; + } + } + + var laptops = dict.Where(d => d.Value.SourceDevice is Devices.Laptop); + i = 1; + foreach (var kvp in laptops) + { + TryAddRouteActionSigs(JoinMap.Display1LaptopSourceStart.AttributeName + " " + i, JoinMap.Display1LaptopSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice); + i++; + if (i > JoinMap.Display1LaptopSourceStart.JoinSpan) // We only have ten spots??? + { + break; + } + } + + foreach (var usageDevice in dict.Select(kvp => kvp.Value.SourceDevice).OfType()) + { + usageDevice.UsageTracker = new UsageTracking(usageDevice as Device) {UsageIsTracked = true}; + usageDevice.UsageTracker.DeviceUsageEnded += UsageTracker_DeviceUsageEnded; + } + } + else + { + Debug.Console(1, this, "WARNING: Config source list '{0}' not found for room '{1}'", + Room.SourceListKey, Room.Key); + } + } + + /// + /// Collects usage data from source and sends to Fusion + /// + /// + /// + protected void UsageTracker_DeviceUsageEnded(object sender, DeviceUsageEventArgs e) + { + var deviceTracker = sender as UsageTracking; + + if (deviceTracker == null) + { + return; + } + + var group = ConfigReader.GetGroupForDeviceKey(deviceTracker.Parent.Key); + + var currentMeetingId = "-"; + + if (_currentMeeting != null) + { + currentMeetingId = _currentMeeting.MeetingID; + } + + //String Format: "USAGE||[Date YYYY-MM-DD]||[Time HH-mm-ss]||TIME||[Asset_Type]||[Asset_Name]||[Minutes_used]||[Asset_ID]||[Meeting_ID]" + // [Asset_ID] property does not appear to be used in Crestron SSI examples. They are sending "-" instead so that's what is replicated here + var deviceUsage = string.Format("USAGE||{0}||{1}||TIME||{2}||{3}||-||{4}||-||{5}||{6}||\r\n", + e.UsageEndTime.ToString("yyyy-MM-dd"), e.UsageEndTime.ToString("HH:mm:ss"), + @group, deviceTracker.Parent.Name, e.MinutesUsed, "-", currentMeetingId); + + Debug.Console(1, this, "Device usage for: {0} ended at {1}. In use for {2} minutes", + deviceTracker.Parent.Name, e.UsageEndTime, e.MinutesUsed); + + FusionRoom.DeviceUsage.InputSig.StringValue = deviceUsage; + + Debug.Console(1, this, "Device usage string: {0}", deviceUsage); + } + + + protected void TryAddRouteActionSigs(string attrName, uint attrNum, string routeKey, Device pSrc) + { + Debug.Console(2, this, "Creating attribute '{0}' with join {1} for source {2}", + attrName, attrNum, pSrc.Key); + try + { + var sigD = FusionRoom.CreateOffsetBoolSig(attrNum, attrName, eSigIoMask.InputOutputSig); + // Need feedback when this source is selected + // Event handler, added below, will compare source changes with this sig dict + _sourceToFeedbackSigs.Add(pSrc, sigD.InputSig); + + // And respond to selection in Fusion + sigD.OutputSig.SetSigFalseAction(() => + { + var runRouteAction = Room as IRunRouteAction; + if (runRouteAction != null) + { + runRouteAction.RunRouteAction(routeKey, Room.SourceListKey); + } + }); + } + catch (Exception) + { + Debug.Console(2, this, "Error creating Fusion signal {0} {1} for device '{2}'. THIS NEEDS REWORKING", + attrNum, attrName, pSrc.Key); + } + } + + /// + /// + /// + private void SetUpCommunitcationMonitors() + { + uint displayNum = 0; + uint touchpanelNum = 0; + uint xpanelNum = 0; + + // Attach to all room's devices with monitors. + //foreach (var dev in DeviceManager.Devices) + foreach (var dev in DeviceManager.GetDevices()) + { + if (!(dev is ICommunicationMonitor)) + { + continue; + } + + string attrName = null; + uint attrNum = 1; + + //var keyNum = ExtractNumberFromKey(dev.Key); + //if (keyNum == -1) + //{ + // Debug.Console(1, this, "WARNING: Cannot link device '{0}' to numbered Fusion monitoring attributes", + // dev.Key); + // continue; + //} + //uint attrNum = Convert.ToUInt32(keyNum); + + // Check for UI devices + var uiDev = dev as IHasBasicTriListWithSmartObject; + if (uiDev != null) + { + if (uiDev.Panel is Crestron.SimplSharpPro.UI.XpanelForSmartGraphics) + { + attrNum = attrNum + touchpanelNum; + + if (attrNum > JoinMap.XpanelOnlineStart.JoinSpan) + { + continue; + } + attrName = JoinMap.XpanelOnlineStart.AttributeName + " " + attrNum; + attrNum += JoinMap.XpanelOnlineStart.JoinNumber; + + touchpanelNum++; + } + else + { + attrNum = attrNum + xpanelNum; + + if (attrNum > JoinMap.TouchpanelOnlineStart.JoinSpan) + { + continue; + } + attrName = JoinMap.TouchpanelOnlineStart.AttributeName + " " + attrNum; + attrNum += JoinMap.TouchpanelOnlineStart.JoinNumber; + + xpanelNum++; + } + } + + //else + if (dev is DisplayBase) + { + attrNum = attrNum + displayNum; + if (attrNum > JoinMap.DisplayOnlineStart.JoinSpan) + { + continue; + } + attrName = JoinMap.DisplayOnlineStart.AttributeName + " " + attrNum; + attrNum += JoinMap.DisplayOnlineStart.JoinNumber; + + displayNum++; + } + //else if (dev is DvdDeviceBase) + //{ + // if (attrNum > 5) + // continue; + // attrName = "Device Ok - DVD " + attrNum; + // attrNum += 260; + //} + // add set top box + + // add Cresnet roll-up + + // add DM-devices roll-up + + if (attrName != null) + { + // Link comm status to sig and update + var sigD = FusionRoom.CreateOffsetBoolSig(attrNum, attrName, eSigIoMask.InputSigOnly); + var smd = dev as ICommunicationMonitor; + sigD.InputSig.BoolValue = smd.CommunicationMonitor.Status == MonitorStatus.IsOk; + smd.CommunicationMonitor.StatusChange += + (o, a) => { sigD.InputSig.BoolValue = a.Status == MonitorStatus.IsOk; }; + Debug.Console(0, this, "Linking '{0}' communication monitor to Fusion '{1}'", dev.Key, attrName); + } + } + } + + protected virtual void SetUpDisplay() + { + try + { + //Setup Display Usage Monitoring + + var displays = DeviceManager.AllDevices.Where(d => d is DisplayBase); + + // Consider updating this in multiple display systems + + foreach (var display in displays.Cast()) + { + display.UsageTracker = new UsageTracking(display) {UsageIsTracked = true}; + display.UsageTracker.DeviceUsageEnded += UsageTracker_DeviceUsageEnded; + } + + var hasDefaultDisplay = Room as IHasDefaultDisplay; + if (hasDefaultDisplay == null) + { + return; + } + var defaultDisplay = hasDefaultDisplay.DefaultDisplay as DisplayBase; + if (defaultDisplay == null) + { + Debug.Console(1, this, "Cannot link null display to Fusion because default display is null"); + return; + } + + var dispPowerOnAction = new Action(b => + { + if (!b) + { + defaultDisplay.PowerOn(); + } + }); + var dispPowerOffAction = new Action(b => + { + if (!b) + { + defaultDisplay.PowerOff(); + } + }); + + // Display to fusion room sigs + FusionRoom.DisplayPowerOn.OutputSig.UserObject = dispPowerOnAction; + FusionRoom.DisplayPowerOff.OutputSig.UserObject = dispPowerOffAction; + + MapDisplayToRoomJoins(1, JoinMap.Display1Start.JoinNumber, defaultDisplay); + + + var deviceConfig = + ConfigReader.ConfigObject.Devices.FirstOrDefault(d => d.Key.Equals(defaultDisplay.Key)); + + //Check for existing asset in GUIDs collection + + FusionAsset tempAsset; + + if (FusionStaticAssets.ContainsKey(deviceConfig.Uid)) + { + tempAsset = FusionStaticAssets[deviceConfig.Uid]; + } + else + { + // Create a new asset + tempAsset = new FusionAsset(FusionRoomGuids.GetNextAvailableAssetNumber(FusionRoom), + defaultDisplay.Name, "Display", ""); + FusionStaticAssets.Add(deviceConfig.Uid, tempAsset); + } + + var dispAsset = FusionRoom.CreateStaticAsset(tempAsset.SlotNumber, tempAsset.Name, "Display", + tempAsset.InstanceId); + dispAsset.PowerOn.OutputSig.UserObject = dispPowerOnAction; + dispAsset.PowerOff.OutputSig.UserObject = dispPowerOffAction; + + var defaultTwoWayDisplay = defaultDisplay as IHasPowerControlWithFeedback; + if (defaultTwoWayDisplay != null) + { + defaultTwoWayDisplay.PowerIsOnFeedback.LinkInputSig(FusionRoom.DisplayPowerOn.InputSig); + if (defaultDisplay is IDisplayUsage) + { + (defaultDisplay as IDisplayUsage).LampHours.LinkInputSig(FusionRoom.DisplayUsage.InputSig); + } + + defaultTwoWayDisplay.PowerIsOnFeedback.LinkInputSig(dispAsset.PowerOn.InputSig); + } + + // Use extension methods + dispAsset.TrySetMakeModel(defaultDisplay); + dispAsset.TryLinkAssetErrorToCommunication(defaultDisplay); + } + catch (Exception e) + { + Debug.Console(1, this, "Error setting up display in Fusion: {0}", e); + } + } + + /// + /// Maps room attributes to a display at a specified index + /// + /// + /// + /// + /// a + protected virtual void MapDisplayToRoomJoins(int displayIndex, uint joinOffset, DisplayBase display) + { + var displayName = string.Format("Display {0} - ", displayIndex); + + + var hasDefaultDisplay = Room as IHasDefaultDisplay; + if (hasDefaultDisplay == null || display != hasDefaultDisplay.DefaultDisplay) + { + return; + } + // Display volume + var defaultDisplayVolume = FusionRoom.CreateOffsetUshortSig(JoinMap.VolumeFader1.JoinNumber, JoinMap.VolumeFader1.AttributeName, + eSigIoMask.InputOutputSig); + defaultDisplayVolume.OutputSig.UserObject = new Action(b => + { + var basicVolumeWithFeedback = display as IBasicVolumeWithFeedback; + if (basicVolumeWithFeedback == null) + { + return; + } + + basicVolumeWithFeedback.SetVolume(b); + basicVolumeWithFeedback.VolumeLevelFeedback.LinkInputSig(defaultDisplayVolume.InputSig); + }); + + + // Power on + var defaultDisplayPowerOn = FusionRoom.CreateOffsetBoolSig((uint) joinOffset, displayName + "Power On", + eSigIoMask.InputOutputSig); + defaultDisplayPowerOn.OutputSig.UserObject = new Action(b => + { + if (!b) + { + display.PowerOn(); + } + }); + + // Power Off + var defaultDisplayPowerOff = FusionRoom.CreateOffsetBoolSig((uint) joinOffset + 1, displayName + "Power Off", + eSigIoMask.InputOutputSig); + defaultDisplayPowerOn.OutputSig.UserObject = new Action(b => + { + if (!b) + { + display.PowerOff(); + } + }); + + + var defaultTwoWayDisplay = display as IHasPowerControlWithFeedback; + if (defaultTwoWayDisplay != null) + { + defaultTwoWayDisplay.PowerIsOnFeedback.LinkInputSig(defaultDisplayPowerOn.InputSig); + defaultTwoWayDisplay.PowerIsOnFeedback.LinkComplementInputSig(defaultDisplayPowerOff.InputSig); + } + + // Current Source + var defaultDisplaySourceNone = FusionRoom.CreateOffsetBoolSig((uint) joinOffset + 8, + displayName + "Source None", eSigIoMask.InputOutputSig); + defaultDisplaySourceNone.OutputSig.UserObject = new Action(b => + { + if (!b) + { + var runRouteAction = Room as IRunRouteAction; + if (runRouteAction != null) + { + runRouteAction.RunRouteAction("roomOff", Room.SourceListKey); + } + } + }); + } + + private void SetUpError() + { + // Roll up ALL device errors + _errorMessageRollUp = new StatusMonitorCollection(this); + foreach (var dev in DeviceManager.GetDevices()) + { + var md = dev as ICommunicationMonitor; + if (md != null) + { + _errorMessageRollUp.AddMonitor(md.CommunicationMonitor); + Debug.Console(2, this, "Adding '{0}' to room's overall error monitor", + md.CommunicationMonitor.Parent.Key); + } + } + _errorMessageRollUp.Start(); + FusionRoom.ErrorMessage.InputSig.StringValue = _errorMessageRollUp.Message; + _errorMessageRollUp.StatusChange += + (o, a) => { FusionRoom.ErrorMessage.InputSig.StringValue = _errorMessageRollUp.Message; }; + } + + /// + /// Sets up a local occupancy sensor, such as one attached to a Fusion Scheduling panel. The occupancy status of the room will be read from Fusion + /// + private void SetUpLocalOccupancy() + { + RoomIsOccupiedFeedback = new BoolFeedback(RoomIsOccupiedFeedbackFunc); + + FusionRoom.FusionAssetStateChange += FusionRoom_FusionAssetStateChange; + + // Build Occupancy Asset? + // Link sigs? + + //Room.SetRoomOccupancy(this as IOccupancyStatusProvider, 0); + } + + private void FusionRoom_FusionAssetStateChange(FusionBase device, FusionAssetStateEventArgs args) + { + if (args.EventId == FusionAssetEventId.RoomOccupiedReceivedEventId || + args.EventId == FusionAssetEventId.RoomUnoccupiedReceivedEventId) + { + RoomIsOccupiedFeedback.FireUpdate(); + } + } + + /// + /// Sets up remote occupancy that will relay the occupancy status determined by local system devices to Fusion + /// + private void SetUpRemoteOccupancy() + { + // Need to have the room occupancy object first and somehow determine the slot number of the Occupancy asset but will not be able to use the UID from config likely. + // Consider defining an object just for Room Occupancy (either eAssetType.Occupancy Sensor (local) or eAssetType.RemoteOccupancySensor (from Fusion sched. panel)) and reserving slot 4 for that asset (statics would start at 5) + + //if (Room.OccupancyObj != null) + //{ + + var tempOccAsset = _guiDs.OccupancyAsset; + + if (tempOccAsset == null) + { + FusionOccSensor = new FusionOccupancySensorAsset(eAssetType.OccupancySensor); + tempOccAsset = FusionOccSensor; + } + + var occSensorAsset = FusionRoom.CreateOccupancySensorAsset(tempOccAsset.SlotNumber, tempOccAsset.Name, + "Occupancy Sensor", tempOccAsset.InstanceId); + + occSensorAsset.RoomOccupied.AddSigToRVIFile = true; + + //var occSensorShutdownMinutes = FusionRoom.CreateOffsetUshortSig(70, "Occ Shutdown - Minutes", eSigIoMask.InputOutputSig); + + // Tie to method on occupancy object + //occSensorShutdownMinutes.OutputSig.UserObject(new Action(ushort)(b => Room.OccupancyObj.SetShutdownMinutes(b)); + + + RoomOccupancyRemoteStringFeedback = new StringFeedback(() => _roomOccupancyRemoteString); + Room.RoomOccupancy.RoomIsOccupiedFeedback.LinkInputSig(occSensorAsset.RoomOccupied.InputSig); + Room.RoomOccupancy.RoomIsOccupiedFeedback.OutputChange += RoomIsOccupiedFeedback_OutputChange; + RoomOccupancyRemoteStringFeedback.LinkInputSig(occSensorAsset.RoomOccupancyInfo.InputSig); + + //} + } + + private void RoomIsOccupiedFeedback_OutputChange(object sender, FeedbackEventArgs e) + { + _roomOccupancyRemoteString = String.Format(RemoteOccupancyXml, e.BoolValue ? "Occupied" : "Unoccupied"); + RoomOccupancyRemoteStringFeedback.FireUpdate(); + } + + /// + /// Helper to get the number from the end of a device's key string + /// + /// -1 if no number matched + private int ExtractNumberFromKey(string key) + { + var capture = System.Text.RegularExpressions.Regex.Match(key, @"\b(\d+)"); + if (!capture.Success) + { + return -1; + } + return Convert.ToInt32(capture.Groups[1].Value); + } + + /// + /// Event handler for when room source changes + /// + protected void Room_CurrentSourceInfoChange(SourceListItem info, ChangeType type) + { + // Handle null. Nothing to do when switching from or to null + if (info == null || info.SourceDevice == null) + { + return; + } + + var dev = info.SourceDevice; + if (type == ChangeType.WillChange) + { + if (_sourceToFeedbackSigs.ContainsKey(dev)) + { + _sourceToFeedbackSigs[dev].BoolValue = false; + } + } + else + { + if (_sourceToFeedbackSigs.ContainsKey(dev)) + { + _sourceToFeedbackSigs[dev].BoolValue = true; + } + //var name = (room == null ? "" : room.Name); + CurrentRoomSourceNameSig.InputSig.StringValue = info.SourceDevice.Name; + } + } + + protected void FusionRoom_FusionStateChange(FusionBase device, FusionStateEventArgs args) + { + // The sig/UO method: Need separate handlers for fixed and user sigs, all flavors, + // even though they all contain sigs. + + var sigData = args.UserConfiguredSigDetail as BooleanSigDataFixedName; + + BoolOutputSig outSig; + if (sigData != null) + { + outSig = sigData.OutputSig; + if (outSig.UserObject is Action) + { + (outSig.UserObject as Action).Invoke(outSig.BoolValue); + } + else if (outSig.UserObject is Action) + { + (outSig.UserObject as Action).Invoke(outSig.UShortValue); + } + else if (outSig.UserObject is Action) + { + (outSig.UserObject as Action).Invoke(outSig.StringValue); + } + return; + } + + var attrData = (args.UserConfiguredSigDetail as BooleanSigData); + if (attrData == null) + { + return; + } + outSig = attrData.OutputSig; + if (outSig.UserObject is Action) + { + (outSig.UserObject as Action).Invoke(outSig.BoolValue); + } + else if (outSig.UserObject is Action) + { + (outSig.UserObject as Action).Invoke(outSig.UShortValue); + } + else if (outSig.UserObject is Action) + { + (outSig.UserObject as Action).Invoke(outSig.StringValue); + } + } + } + + + public static class FusionRoomExtensions + { + /// + /// Creates and returns a fusion attribute. The join number will match the established Simpl + /// standard of 50+, and will generate a 50+ join in the RVI. It calls + /// FusionRoom.AddSig with join number - 49 + /// + /// The new attribute + public static BooleanSigData CreateOffsetBoolSig(this FusionRoom fr, uint number, string name, eSigIoMask mask) + { + if (number < 50) + { + throw new ArgumentOutOfRangeException("number", "Cannot be less than 50"); + } + number -= 49; + fr.AddSig(eSigType.Bool, number, name, mask); + return fr.UserDefinedBooleanSigDetails[number]; + } + + /// + /// Creates and returns a fusion attribute. The join number will match the established Simpl + /// standard of 50+, and will generate a 50+ join in the RVI. It calls + /// FusionRoom.AddSig with join number - 49 + /// + /// The new attribute + public static UShortSigData CreateOffsetUshortSig(this FusionRoom fr, uint number, string name, eSigIoMask mask) + { + if (number < 50) + { + throw new ArgumentOutOfRangeException("number", "Cannot be less than 50"); + } + number -= 49; + fr.AddSig(eSigType.UShort, number, name, mask); + return fr.UserDefinedUShortSigDetails[number]; + } + + /// + /// Creates and returns a fusion attribute. The join number will match the established Simpl + /// standard of 50+, and will generate a 50+ join in the RVI. It calls + /// FusionRoom.AddSig with join number - 49 + /// + /// The new attribute + public static StringSigData CreateOffsetStringSig(this FusionRoom fr, uint number, string name, eSigIoMask mask) + { + if (number < 50) + { + throw new ArgumentOutOfRangeException("number", "Cannot be less than 50"); + } + number -= 49; + fr.AddSig(eSigType.String, number, name, mask); + return fr.UserDefinedStringSigDetails[number]; + } + + /// + /// Creates and returns a static asset + /// + /// the new asset + public static FusionStaticAsset CreateStaticAsset(this FusionRoom fr, uint number, string name, string type, + string instanceId) + { + try + { + Debug.Console(0, "Adding Fusion Static Asset '{0}' to slot {1} with GUID: '{2}'", name, number, instanceId); + + fr.AddAsset(eAssetType.StaticAsset, number, name, type, instanceId); + return fr.UserConfigurableAssetDetails[number].Asset as FusionStaticAsset; + } + catch (InvalidOperationException ex) + { + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Error creating Static Asset for device: '{0}'. Check that multiple devices don't have missing or duplicate uid properties in configuration. /r/nError: {1}", name, ex); + return null; + } + catch (Exception e) + { + Debug.Console(2, Debug.ErrorLogLevel.Error, "Error creating Static Asset: {0}", e); + return null; + } + } + + public static FusionOccupancySensor CreateOccupancySensorAsset(this FusionRoom fr, uint number, string name, + string type, string instanceId) + { + try + { + Debug.Console(0, "Adding Fusion Occupancy Sensor Asset '{0}' to slot {1} with GUID: '{2}'", name, number, + instanceId); + + fr.AddAsset(eAssetType.OccupancySensor, number, name, type, instanceId); + return fr.UserConfigurableAssetDetails[number].Asset as FusionOccupancySensor; + } + catch (InvalidOperationException ex) + { + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Error creating Static Asset for device: '{0}'. Check that multiple devices don't have missing or duplicate uid properties in configuration. Error: {1}", name, ex); + return null; + } + catch (Exception e) + { + Debug.Console(2, Debug.ErrorLogLevel.Error, "Error creating Static Asset: {0}", e); + return null; + } + } + } + + //************************************************************************************************ + /// + /// Extensions to enhance Fusion room, asset and signal creation. + /// + public static class FusionStaticAssetExtensions + { + /// + /// Tries to set a Fusion asset with the make and model of a device. + /// If the provided Device is IMakeModel, will set the corresponding parameters on the fusion static asset. + /// Otherwise, does nothing. + /// + public static void TrySetMakeModel(this FusionStaticAsset asset, Device device) + { + var mm = device as IMakeModel; + if (mm != null) + { + asset.ParamMake.Value = mm.DeviceMake; + asset.ParamModel.Value = mm.DeviceModel; + } + } + + /// + /// Tries to attach the AssetError input on a Fusion asset to a Device's + /// CommunicationMonitor.StatusChange event. Does nothing if the device is not + /// IStatusMonitor + /// + /// + /// + public static void TryLinkAssetErrorToCommunication(this FusionStaticAsset asset, Device device) + { + if (device is ICommunicationMonitor) + { + var monitor = (device as ICommunicationMonitor).CommunicationMonitor; + monitor.StatusChange += (o, a) => + { + // Link connected and error inputs on asset + asset.Connected.InputSig.BoolValue = a.Status == MonitorStatus.IsOk; + asset.AssetError.InputSig.StringValue = a.Status.ToString(); + }; + // set current value + asset.Connected.InputSig.BoolValue = monitor.Status == MonitorStatus.IsOk; + asset.AssetError.InputSig.StringValue = monitor.Status.ToString(); + } + } + } + + public class RoomInformation + { + public RoomInformation() + { + FusionCustomProperties = new List(); + } + + public string ID { get; set; } + public string Name { get; set; } + public string Location { get; set; } + public string Description { get; set; } + public string TimeZone { get; set; } + public string WebcamURL { get; set; } + public string BacklogMsg { get; set; } + public string SubErrorMsg { get; set; } + public string EmailInfo { get; set; } + public List FusionCustomProperties { get; set; } + } + + public class FusionCustomProperty + { + public FusionCustomProperty() + { + } + + public FusionCustomProperty(string id) + { + ID = id; + } + + public string ID { get; set; } + public string CustomFieldName { get; set; } + public string CustomFieldType { get; set; } + public string CustomFieldValue { get; set; } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Fusion/EssentialsHuddleSpaceRoomFusionRoomJoinMap.cs b/src/PepperDash.Essentials.Core/Fusion/EssentialsHuddleSpaceRoomFusionRoomJoinMap.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Fusion/EssentialsHuddleSpaceRoomFusionRoomJoinMap.cs rename to src/PepperDash.Essentials.Core/Fusion/EssentialsHuddleSpaceRoomFusionRoomJoinMap.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Fusion/FusionCustomPropertiesBridge.cs b/src/PepperDash.Essentials.Core/Fusion/FusionCustomPropertiesBridge.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Fusion/FusionCustomPropertiesBridge.cs rename to src/PepperDash.Essentials.Core/Fusion/FusionCustomPropertiesBridge.cs index 89b9fcdb..82f3b972 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Fusion/FusionCustomPropertiesBridge.cs +++ b/src/PepperDash.Essentials.Core/Fusion/FusionCustomPropertiesBridge.cs @@ -1,10 +1,12 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; using PepperDash.Core; using PepperDash.Essentials.Core; diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Fusion/FusionEventHandlers.cs b/src/PepperDash.Essentials.Core/Fusion/FusionEventHandlers.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Fusion/FusionEventHandlers.cs rename to src/PepperDash.Essentials.Core/Fusion/FusionEventHandlers.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Fusion/FusionProcessorQueries.cs b/src/PepperDash.Essentials.Core/Fusion/FusionProcessorQueries.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Fusion/FusionProcessorQueries.cs rename to src/PepperDash.Essentials.Core/Fusion/FusionProcessorQueries.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Fusion/FusionRviDataClasses.cs b/src/PepperDash.Essentials.Core/Fusion/FusionRviDataClasses.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Fusion/FusionRviDataClasses.cs rename to src/PepperDash.Essentials.Core/Fusion/FusionRviDataClasses.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Gateways/CenCn2Controller.cs b/src/PepperDash.Essentials.Core/Gateways/CenCn2Controller.cs similarity index 95% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Gateways/CenCn2Controller.cs rename to src/PepperDash.Essentials.Core/Gateways/CenCn2Controller.cs index bdd53bde..7134106f 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Gateways/CenCn2Controller.cs +++ b/src/PepperDash.Essentials.Core/Gateways/CenCn2Controller.cs @@ -1,12 +1,12 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -namespace PepperDash_Essentials_Core.Gateways -{ - public class CenCn2Controller - { - } +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +namespace PepperDash_Essentials_Core.Gateways +{ + public class CenCn2Controller + { + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Gateways/CenRfgwController.cs b/src/PepperDash.Essentials.Core/Gateways/CenRfgwController.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Gateways/CenRfgwController.cs rename to src/PepperDash.Essentials.Core/Gateways/CenRfgwController.cs index 03e8f51d..588a5701 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Gateways/CenRfgwController.cs +++ b/src/PepperDash.Essentials.Core/Gateways/CenRfgwController.cs @@ -1,195 +1,197 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.Gateways; -using Newtonsoft.Json; -using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.Gateways; +using Full.Newtonsoft.Json; +using Crestron.SimplSharpPro.DeviceSupport; using PepperDash.Core; -using PepperDash.Essentials.Core.Config; - - -namespace PepperDash.Essentials.Core -{ - [Description("Wrapper class for Crestron Infinet-EX Gateways")] - public class CenRfgwController : CrestronGenericBaseDevice, IHasReady - { - public event EventHandler IsReadyEvent; - - public bool IsReady { get; private set; } - - private GatewayBase _gateway; - - public GatewayBase GateWay - { - get { return _gateway; } - } - - /// - /// Constructor for the on-board gateway - /// - /// - /// - /// - public CenRfgwController(string key, string name, GatewayBase gateway) : - base(key, name, gateway) - { - _gateway = gateway; - IsReady = true; - FireIsReadyEvent(IsReady); - } - - public CenRfgwController(string key, Func preActivationFunc, DeviceConfig config) : - base(key, config.Name) - { - IsReady = false; - FireIsReadyEvent(IsReady); - AddPreActivationAction(() => - { - _gateway = preActivationFunc(config); - - IsReady = true; - RegisterCrestronGenericBase(_gateway); - FireIsReadyEvent(IsReady); - - }); - } - - public static GatewayBase GetNewIpRfGateway(DeviceConfig dc) - { - var control = CommFactory.GetControlPropertiesConfig(dc); - var type = dc.Type; - var ipId = control.IpIdInt; - - if (type.Equals("cenrfgwex", StringComparison.InvariantCultureIgnoreCase)) - { - return new CenRfgwEx(ipId, Global.ControlSystem); - } - if (type.Equals("cenerfgwpoe", StringComparison.InvariantCultureIgnoreCase)) - { - return new CenErfgwPoe(ipId, Global.ControlSystem); - } - return null; - } - - private void FireIsReadyEvent(bool data) - { - var handler = IsReadyEvent; - if (handler == null) return; - - handler(this, new IsReadyEventArgs(data)); - - } - - public static GatewayBase GetNewSharedIpRfGateway(DeviceConfig dc) - { - var control = CommFactory.GetControlPropertiesConfig(dc); - var ipId = control.IpIdInt; - - if (dc.Type.Equals("cenrfgwex", StringComparison.InvariantCultureIgnoreCase)) - { - return new CenRfgwExEthernetSharable(ipId, Global.ControlSystem); - } - if (dc.Type.Equals("cenerfgwpoe", StringComparison.InvariantCultureIgnoreCase)) - { - return new CenErfgwPoeEthernetSharable(ipId, Global.ControlSystem); - } - return null; - } - - public static GatewayBase GetCenRfgwCresnetController(DeviceConfig dc) - { - var control = CommFactory.GetControlPropertiesConfig(dc); - var type = dc.Type; - var cresnetId = control.CresnetIdInt; - var branchId = control.ControlPortNumber; - var parentKey = string.IsNullOrEmpty(control.ControlPortDevKey) ? "processor" : control.ControlPortDevKey; - - if (parentKey.Equals("processor", StringComparison.CurrentCultureIgnoreCase)) - { - Debug.Console(0, "Device {0} is a valid cresnet master - creating new CenRfgw", parentKey); - if (type.Equals("cenerfgwpoe", StringComparison.InvariantCultureIgnoreCase)) - { - return new CenErfgwPoeCresnet(cresnetId, Global.ControlSystem); - } - if (type.Equals("cenrfgwex", StringComparison.InvariantCultureIgnoreCase)) - { - return new CenRfgwExCresnet(cresnetId, Global.ControlSystem); - } - } - var cresnetBridge = DeviceManager.GetDeviceForKey(parentKey) as ICresnetBridge; - - if (cresnetBridge != null) - { - Debug.Console(0, "Device {0} is a valid cresnet master - creating new CenRfgw", parentKey); - - if (type.Equals("cenerfgwpoe", StringComparison.InvariantCultureIgnoreCase)) - { - return new CenErfgwPoeCresnet(cresnetId, cresnetBridge.Branches[branchId]); - } - if (type.Equals("cenrfgwex", StringComparison.InvariantCultureIgnoreCase)) - { - return new CenRfgwExCresnet(cresnetId, cresnetBridge.Branches[branchId]); - } - } - Debug.Console(0, "Device {0} is not a valid cresnet master", parentKey); - return null; - } - - - - - - - - public enum EExGatewayType - { - Ethernet, - EthernetShared, - Cresnet - } - - - #region Factory - - public class CenRfgwControllerFactory : EssentialsDeviceFactory - { - public CenRfgwControllerFactory() - { - TypeNames = new List {"cenrfgwex", "cenerfgwpoe"}; - } - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - - Debug.Console(1, "Factory Attempting to create new CEN-GWEXER Device"); - - var props = JsonConvert.DeserializeObject(dc.Properties.ToString()); - - EExGatewayType gatewayType = - (EExGatewayType) Enum.Parse(typeof (EExGatewayType), props.GatewayType, true); - - switch (gatewayType) - { - case (EExGatewayType.Ethernet): - return new CenRfgwController(dc.Key, dc.Name, GetNewIpRfGateway(dc)); - case (EExGatewayType.EthernetShared): - return new CenRfgwController(dc.Key, dc.Name, GetNewSharedIpRfGateway(dc)); - case (EExGatewayType.Cresnet): - return new CenRfgwController(dc.Key, GetCenRfgwCresnetController, dc); - } - return null; - } - } - - #endregion - } - - -} - - +using PepperDash.Essentials.Core.Config; + + +namespace PepperDash.Essentials.Core +{ + [Description("Wrapper class for Crestron Infinet-EX Gateways")] + public class CenRfgwController : CrestronGenericBaseDevice, IHasReady + { + public event EventHandler IsReadyEvent; + + public bool IsReady { get; private set; } + + private GatewayBase _gateway; + + public GatewayBase GateWay + { + get { return _gateway; } + } + + /// + /// Constructor for the on-board gateway + /// + /// + /// + /// + public CenRfgwController(string key, string name, GatewayBase gateway) : + base(key, name, gateway) + { + _gateway = gateway; + IsReady = true; + FireIsReadyEvent(IsReady); + } + + public CenRfgwController(string key, Func preActivationFunc, DeviceConfig config) : + base(key, config.Name) + { + IsReady = false; + FireIsReadyEvent(IsReady); + AddPreActivationAction(() => + { + _gateway = preActivationFunc(config); + + IsReady = true; + RegisterCrestronGenericBase(_gateway); + FireIsReadyEvent(IsReady); + + }); + } + + public static GatewayBase GetNewIpRfGateway(DeviceConfig dc) + { + var control = CommFactory.GetControlPropertiesConfig(dc); + var type = dc.Type; + var ipId = control.IpIdInt; + + if (type.Equals("cenrfgwex", StringComparison.InvariantCultureIgnoreCase)) + { + return new CenRfgwEx(ipId, Global.ControlSystem); + } + if (type.Equals("cenerfgwpoe", StringComparison.InvariantCultureIgnoreCase)) + { + return new CenErfgwPoe(ipId, Global.ControlSystem); + } + return null; + } + + private void FireIsReadyEvent(bool data) + { + var handler = IsReadyEvent; + if (handler == null) return; + + handler(this, new IsReadyEventArgs(data)); + + } + + public static GatewayBase GetNewSharedIpRfGateway(DeviceConfig dc) + { + var control = CommFactory.GetControlPropertiesConfig(dc); + var ipId = control.IpIdInt; + + if (dc.Type.Equals("cenrfgwex", StringComparison.InvariantCultureIgnoreCase)) + { + return new CenRfgwExEthernetSharable(ipId, Global.ControlSystem); + } + if (dc.Type.Equals("cenerfgwpoe", StringComparison.InvariantCultureIgnoreCase)) + { + return new CenErfgwPoeEthernetSharable(ipId, Global.ControlSystem); + } + return null; + } + + public static GatewayBase GetCenRfgwCresnetController(DeviceConfig dc) + { + var control = CommFactory.GetControlPropertiesConfig(dc); + var type = dc.Type; + var cresnetId = control.CresnetIdInt; + var branchId = control.ControlPortNumber; + var parentKey = string.IsNullOrEmpty(control.ControlPortDevKey) ? "processor" : control.ControlPortDevKey; + + if (parentKey.Equals("processor", StringComparison.CurrentCultureIgnoreCase)) + { + Debug.Console(0, "Device {0} is a valid cresnet master - creating new CenRfgw", parentKey); + if (type.Equals("cenerfgwpoe", StringComparison.InvariantCultureIgnoreCase)) + { + return new CenErfgwPoeCresnet(cresnetId, Global.ControlSystem); + } + if (type.Equals("cenrfgwex", StringComparison.InvariantCultureIgnoreCase)) + { + return new CenRfgwExCresnet(cresnetId, Global.ControlSystem); + } + } + var cresnetBridge = DeviceManager.GetDeviceForKey(parentKey) as ICresnetBridge; + + if (cresnetBridge != null) + { + Debug.Console(0, "Device {0} is a valid cresnet master - creating new CenRfgw", parentKey); + + if (type.Equals("cenerfgwpoe", StringComparison.InvariantCultureIgnoreCase)) + { + return new CenErfgwPoeCresnet(cresnetId, cresnetBridge.Branches[branchId]); + } + if (type.Equals("cenrfgwex", StringComparison.InvariantCultureIgnoreCase)) + { + return new CenRfgwExCresnet(cresnetId, cresnetBridge.Branches[branchId]); + } + } + Debug.Console(0, "Device {0} is not a valid cresnet master", parentKey); + return null; + } + + + + + + + + public enum EExGatewayType + { + Ethernet, + EthernetShared, + Cresnet + } + + + #region Factory + + public class CenRfgwControllerFactory : EssentialsDeviceFactory + { + public CenRfgwControllerFactory() + { + TypeNames = new List {"cenrfgwex", "cenerfgwpoe"}; + } + + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + + Debug.Console(1, "Factory Attempting to create new CEN-GWEXER Device"); + + var props = JsonConvert.DeserializeObject(dc.Properties.ToString()); + + EExGatewayType gatewayType = + (EExGatewayType) Enum.Parse(typeof (EExGatewayType), props.GatewayType, true); + + switch (gatewayType) + { + case (EExGatewayType.Ethernet): + return new CenRfgwController(dc.Key, dc.Name, GetNewIpRfGateway(dc)); + case (EExGatewayType.EthernetShared): + return new CenRfgwController(dc.Key, dc.Name, GetNewSharedIpRfGateway(dc)); + case (EExGatewayType.Cresnet): + return new CenRfgwController(dc.Key, GetCenRfgwCresnetController, dc); + } + return null; + } + } + + #endregion + } + + +} + + diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Gateways/EssentialsRfGatewayConfig.cs b/src/PepperDash.Essentials.Core/Gateways/EssentialsRfGatewayConfig.cs similarity index 82% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Gateways/EssentialsRfGatewayConfig.cs rename to src/PepperDash.Essentials.Core/Gateways/EssentialsRfGatewayConfig.cs index e1ae8c11..353e73b9 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Gateways/EssentialsRfGatewayConfig.cs +++ b/src/PepperDash.Essentials.Core/Gateways/EssentialsRfGatewayConfig.cs @@ -1,23 +1,25 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; using PepperDash.Core; using PepperDash.Essentials.Core.Config; - - -namespace PepperDash.Essentials.Core -{ - public class EssentialsRfGatewayConfig - { - [JsonProperty("control")] - public EssentialsControlPropertiesConfig Control { get; set; } - - [JsonProperty("gatewayType")] - public string GatewayType { get; set; } - - } + + +namespace PepperDash.Essentials.Core +{ + public class EssentialsRfGatewayConfig + { + [JsonProperty("control")] + public EssentialsControlPropertiesConfig Control { get; set; } + + [JsonProperty("gatewayType")] + public string GatewayType { get; set; } + + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Global/EthernetAdapterInfo.cs b/src/PepperDash.Essentials.Core/Global/EthernetAdapterInfo.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Global/EthernetAdapterInfo.cs rename to src/PepperDash.Essentials.Core/Global/EthernetAdapterInfo.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Global/Global.cs b/src/PepperDash.Essentials.Core/Global/Global.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Global/Global.cs rename to src/PepperDash.Essentials.Core/Global/Global.cs index 09529ff8..d9e56673 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Global/Global.cs +++ b/src/PepperDash.Essentials.Core/Global/Global.cs @@ -1,281 +1,283 @@ -using System; -using System.Linq; -using System.Text.RegularExpressions; -using System.Globalization; -using Crestron.SimplSharp; -using System.Collections.Generic; -using Crestron.SimplSharp.CrestronIO; -using Crestron.SimplSharp.CrestronDataStore; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DM; - -using PepperDash.Core; -using PepperDash.Essentials.License; - -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using Newtonsoft.Json.Schema; - - -namespace PepperDash.Essentials.Core -{ - public static class Global - { - public static CrestronControlSystem ControlSystem { get; set; } - - public static eDevicePlatform Platform { get { return CrestronEnvironment.DevicePlatform; } } - - public static Dictionary EthernetAdapterInfoCollection { get; private set; } - - public static LicenseManager LicenseManager { get; set; } - - public static eCrestronSeries ProcessorSeries { get { return CrestronEnvironment.ProgramCompatibility; } } - - // TODO: consider making this configurable later - public static IFormatProvider Culture = CultureInfo.CreateSpecificCulture("en-US"); - - /// - /// True when the processor type is a DMPS variant - /// - public static bool ControlSystemIsDmpsType - { - get - { - if(ControlSystem.SystemControl != null) - { - if(ControlSystem.SystemControl.SystemControlType > 0) - { - return true; - } - } - return false; - } - } - - /// - /// True when the processor type is a DMPS 4K variant - /// - public static bool ControlSystemIsDmps4kType - { - get - { - if(ControlSystem.SystemControl != null) - { - if(ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K150CSystemControl || - ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K200CSystemControl || - ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K250CSystemControl || - ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K300CSystemControl || - ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K350CSystemControl) - { - return true; - } - } - return false; - } - } - - /// - /// True when the processor type is a DMPS 4K 200/300/250/350 variant - /// - public static bool ControlSystemIsDmps4k3xxType - { - get - { - if(ControlSystem.SystemControl != null) - { - if(ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K200CSystemControl || - ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K250CSystemControl || - ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K300CSystemControl || - ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K350CSystemControl) - { - return true; - } - } - return false; - } - } - - /// - /// The file path prefix to the folder containing configuration files - /// - public static string FilePathPrefix { get; private set; } - - /// - /// The file path prefix to the applciation directory - /// - public static string ApplicationDirectoryPathPrefix - { - get - { - return Crestron.SimplSharp.CrestronIO.Directory.GetApplicationDirectory(); - } - } - - /// - /// Returns the directory separator character based on the running OS - /// - public static char DirectorySeparator - { - get - { - return System.IO.Path.DirectorySeparatorChar; - } - } - - /// - /// Wildcarded config file name for global reference - /// - public const string ConfigFileName = "*configurationFile*.json"; - - /// - /// Sets the file path prefix - /// - /// - public static void SetFilePathPrefix(string prefix) - { - FilePathPrefix = prefix; - } - - static string _AssemblyVersion; - - /// - /// Gets the Assembly Version of Essentials - /// - /// The Assembly Version at Runtime - public static string AssemblyVersion - { - get - { - return _AssemblyVersion; - } - private set - { - _AssemblyVersion = value; - } - } - - /// - /// Sets the Assembly version to the version of the Essentials Library - /// - /// - public static void SetAssemblyVersion(string assemblyVersion) - { - AssemblyVersion = assemblyVersion; - } - - public static bool IsRunningDevelopmentVersion(List developmentVersions, string minimumVersion) - { - if (Regex.Match(AssemblyVersion, @"^(\d*).(\d*).(\d*).*").Groups[1].Value == "0") - { - Debug.Console(2, "Running Local Build. Bypassing Dependency Check."); - return true; - } - - if (developmentVersions == null) - { - Debug.Console(0, - "Development Plugin does not specify a list of versions. Loading plugin may not work as expected. Checking Minumum version"); - return IsRunningMinimumVersionOrHigher(minimumVersion); - } - - Debug.Console(2, "Comparing running version '{0}' to minimum versions '{1}'", AssemblyVersion, developmentVersions); - - var versionMatch = developmentVersions.FirstOrDefault(x => x == AssemblyVersion); - - if (String.IsNullOrEmpty(versionMatch)) - { - Debug.Console(0, "Essentials Build does not match any builds required for plugin load. Bypassing Plugin Load."); - return false; - } - - Debug.Console(2, "Essentials Build {0} matches list of development builds", AssemblyVersion); - return IsRunningMinimumVersionOrHigher(minimumVersion); - - - - } - - /// - /// Checks to see if the running version meets or exceed the minimum specified version. For beta versions (0.xx.yy), will always return true. - /// - /// Minimum specified version in format of xx.yy.zz - /// Returns true if the running version meets or exceeds the minimum specified version - public static bool IsRunningMinimumVersionOrHigher(string minimumVersion) - { - Debug.Console(2, "Comparing running version '{0}' to minimum version '{1}'", AssemblyVersion, minimumVersion); - - if (String.IsNullOrEmpty(minimumVersion)) - { - Debug.Console(0,"Plugin does not specify a minimum version. Loading plugin may not work as expected. Proceeding with loading plugin"); - return true; - } - - var runtimeVersion = Regex.Match(AssemblyVersion, @"^(\d*).(\d*).(\d*).*"); - - var runtimeVersionMajor = Int16.Parse(runtimeVersion.Groups[1].Value); - var runtimeVersionMinor = Int16.Parse(runtimeVersion.Groups[2].Value); - var runtimeVersionBuild = Int16.Parse(runtimeVersion.Groups[3].Value); - - var runtimeVer = new Version(runtimeVersionMajor, runtimeVersionMinor, runtimeVersionBuild); - - Version minimumVer; - try - { - minimumVer = new Version(minimumVersion); - } - catch - { - Debug.Console(2, "unable to parse minimum version {0}. Bypassing plugin load.", minimumVersion); - return false; - } - - - // Check for beta build version - if (runtimeVer.Major != 0) - { - return runtimeVer.CompareTo(minimumVer) >= 0; - } - - Debug.Console(2, "Running Local Build. Bypassing Dependency Check."); - return true; - - /* - var minVersion = Regex.Match(minimumVersion, @"^(\d*).(\d*).(\d*)$"); - - if(!minVersion.Success) - { - - } - - var minVersionMajor = Int16.Parse(minVersion.Groups[1].Value); - var minVersionMinor = Int16.Parse(minVersion.Groups[2].Value); - var minVersionBuild = Int16.Parse(minVersion.Groups[3].Value); - - - - if (minVersionMajor > runtimeVersionMajor) - return false; - - if (minVersionMinor > runtimeVersionMinor) - return false; - - if (minVersionBuild > runtimeVersionBuild) - return false; - - return true; - */ - } - - static Global() - { - // Fire up CrestronDataStoreStatic - var err = CrestronDataStoreStatic.InitCrestronDataStore(); - if (err != CrestronDataStore.CDS_ERROR.CDS_SUCCESS) - { - CrestronConsole.PrintLine("Error starting CrestronDataStoreStatic: {0}", err); - return; - } - } - - } +extern alias Full; + +using System; +using System.Linq; +using System.Text.RegularExpressions; +using System.Globalization; +using Crestron.SimplSharp; +using System.Collections.Generic; +using Crestron.SimplSharp.CrestronIO; +using Crestron.SimplSharp.CrestronDataStore; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DM; + +using PepperDash.Core; +using PepperDash.Essentials.License; + +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; +using Full.Newtonsoft.Json.Schema; + + +namespace PepperDash.Essentials.Core +{ + public static class Global + { + public static CrestronControlSystem ControlSystem { get; set; } + + public static eDevicePlatform Platform { get { return CrestronEnvironment.DevicePlatform; } } + + public static Dictionary EthernetAdapterInfoCollection { get; private set; } + + public static LicenseManager LicenseManager { get; set; } + + public static eCrestronSeries ProcessorSeries { get { return CrestronEnvironment.ProgramCompatibility; } } + + // TODO: consider making this configurable later + public static IFormatProvider Culture = CultureInfo.CreateSpecificCulture("en-US"); + + /// + /// True when the processor type is a DMPS variant + /// + public static bool ControlSystemIsDmpsType + { + get + { + if(ControlSystem.SystemControl != null) + { + if(ControlSystem.SystemControl.SystemControlType > 0) + { + return true; + } + } + return false; + } + } + + /// + /// True when the processor type is a DMPS 4K variant + /// + public static bool ControlSystemIsDmps4kType + { + get + { + if(ControlSystem.SystemControl != null) + { + if(ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K150CSystemControl || + ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K200CSystemControl || + ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K250CSystemControl || + ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K300CSystemControl || + ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K350CSystemControl) + { + return true; + } + } + return false; + } + } + + /// + /// True when the processor type is a DMPS 4K 200/300/250/350 variant + /// + public static bool ControlSystemIsDmps4k3xxType + { + get + { + if(ControlSystem.SystemControl != null) + { + if(ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K200CSystemControl || + ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K250CSystemControl || + ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K300CSystemControl || + ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K350CSystemControl) + { + return true; + } + } + return false; + } + } + + /// + /// The file path prefix to the folder containing configuration files + /// + public static string FilePathPrefix { get; private set; } + + /// + /// The file path prefix to the applciation directory + /// + public static string ApplicationDirectoryPathPrefix + { + get + { + return Crestron.SimplSharp.CrestronIO.Directory.GetApplicationDirectory(); + } + } + + /// + /// Returns the directory separator character based on the running OS + /// + public static char DirectorySeparator + { + get + { + return System.IO.Path.DirectorySeparatorChar; + } + } + + /// + /// Wildcarded config file name for global reference + /// + public const string ConfigFileName = "*configurationFile*.json"; + + /// + /// Sets the file path prefix + /// + /// + public static void SetFilePathPrefix(string prefix) + { + FilePathPrefix = prefix; + } + + static string _AssemblyVersion; + + /// + /// Gets the Assembly Version of Essentials + /// + /// The Assembly Version at Runtime + public static string AssemblyVersion + { + get + { + return _AssemblyVersion; + } + private set + { + _AssemblyVersion = value; + } + } + + /// + /// Sets the Assembly version to the version of the Essentials Library + /// + /// + public static void SetAssemblyVersion(string assemblyVersion) + { + AssemblyVersion = assemblyVersion; + } + + public static bool IsRunningDevelopmentVersion(List developmentVersions, string minimumVersion) + { + if (Regex.Match(AssemblyVersion, @"^(\d*).(\d*).(\d*).*").Groups[1].Value == "0") + { + Debug.Console(2, "Running Local Build. Bypassing Dependency Check."); + return true; + } + + if (developmentVersions == null) + { + Debug.Console(0, + "Development Plugin does not specify a list of versions. Loading plugin may not work as expected. Checking Minumum version"); + return IsRunningMinimumVersionOrHigher(minimumVersion); + } + + Debug.Console(2, "Comparing running version '{0}' to minimum versions '{1}'", AssemblyVersion, developmentVersions); + + var versionMatch = developmentVersions.FirstOrDefault(x => x == AssemblyVersion); + + if (String.IsNullOrEmpty(versionMatch)) + { + Debug.Console(0, "Essentials Build does not match any builds required for plugin load. Bypassing Plugin Load."); + return false; + } + + Debug.Console(2, "Essentials Build {0} matches list of development builds", AssemblyVersion); + return IsRunningMinimumVersionOrHigher(minimumVersion); + + + + } + + /// + /// Checks to see if the running version meets or exceed the minimum specified version. For beta versions (0.xx.yy), will always return true. + /// + /// Minimum specified version in format of xx.yy.zz + /// Returns true if the running version meets or exceeds the minimum specified version + public static bool IsRunningMinimumVersionOrHigher(string minimumVersion) + { + Debug.Console(2, "Comparing running version '{0}' to minimum version '{1}'", AssemblyVersion, minimumVersion); + + if (String.IsNullOrEmpty(minimumVersion)) + { + Debug.Console(0,"Plugin does not specify a minimum version. Loading plugin may not work as expected. Proceeding with loading plugin"); + return true; + } + + var runtimeVersion = Regex.Match(AssemblyVersion, @"^(\d*).(\d*).(\d*).*"); + + var runtimeVersionMajor = Int16.Parse(runtimeVersion.Groups[1].Value); + var runtimeVersionMinor = Int16.Parse(runtimeVersion.Groups[2].Value); + var runtimeVersionBuild = Int16.Parse(runtimeVersion.Groups[3].Value); + + var runtimeVer = new Version(runtimeVersionMajor, runtimeVersionMinor, runtimeVersionBuild); + + Version minimumVer; + try + { + minimumVer = new Version(minimumVersion); + } + catch + { + Debug.Console(2, "unable to parse minimum version {0}. Bypassing plugin load.", minimumVersion); + return false; + } + + + // Check for beta build version + if (runtimeVer.Major != 0) + { + return runtimeVer.CompareTo(minimumVer) >= 0; + } + + Debug.Console(2, "Running Local Build. Bypassing Dependency Check."); + return true; + + /* + var minVersion = Regex.Match(minimumVersion, @"^(\d*).(\d*).(\d*)$"); + + if(!minVersion.Success) + { + + } + + var minVersionMajor = Int16.Parse(minVersion.Groups[1].Value); + var minVersionMinor = Int16.Parse(minVersion.Groups[2].Value); + var minVersionBuild = Int16.Parse(minVersion.Groups[3].Value); + + + + if (minVersionMajor > runtimeVersionMajor) + return false; + + if (minVersionMinor > runtimeVersionMinor) + return false; + + if (minVersionBuild > runtimeVersionBuild) + return false; + + return true; + */ + } + + static Global() + { + // Fire up CrestronDataStoreStatic + var err = CrestronDataStoreStatic.InitCrestronDataStore(); + if (err != CrestronDataStore.CDS_ERROR.CDS_SUCCESS) + { + CrestronConsole.PrintLine("Error starting CrestronDataStoreStatic: {0}", err); + return; + } + } + + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Global/JobTimer.cs b/src/PepperDash.Essentials.Core/Global/JobTimer.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Global/JobTimer.cs rename to src/PepperDash.Essentials.Core/Global/JobTimer.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Global/Scheduler.cs b/src/PepperDash.Essentials.Core/Global/Scheduler.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Global/Scheduler.cs rename to src/PepperDash.Essentials.Core/Global/Scheduler.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/InUseTracking/IInUseTracking.cs b/src/PepperDash.Essentials.Core/InUseTracking/IInUseTracking.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/InUseTracking/IInUseTracking.cs rename to src/PepperDash.Essentials.Core/InUseTracking/IInUseTracking.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/InUseTracking/InUseTracking.cs b/src/PepperDash.Essentials.Core/InUseTracking/InUseTracking.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/InUseTracking/InUseTracking.cs rename to src/PepperDash.Essentials.Core/InUseTracking/InUseTracking.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Interfaces/ILogStrings.cs b/src/PepperDash.Essentials.Core/Interfaces/ILogStrings.cs similarity index 95% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Interfaces/ILogStrings.cs rename to src/PepperDash.Essentials.Core/Interfaces/ILogStrings.cs index 92557319..4f48e278 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Interfaces/ILogStrings.cs +++ b/src/PepperDash.Essentials.Core/Interfaces/ILogStrings.cs @@ -1,17 +1,17 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Core; - -namespace PepperDash.Essentials.Core.Interfaces -{ - public interface ILogStrings : IKeyed - { - /// - /// Defines a class that is capable of logging a string - /// - void SendToLog(IKeyed device, string logMessage); - } +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using PepperDash.Core; + +namespace PepperDash.Essentials.Core.Interfaces +{ + public interface ILogStrings : IKeyed + { + /// + /// Defines a class that is capable of logging a string + /// + void SendToLog(IKeyed device, string logMessage); + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Interfaces/ILogStringsWithLevel.cs b/src/PepperDash.Essentials.Core/Interfaces/ILogStringsWithLevel.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Interfaces/ILogStringsWithLevel.cs rename to src/PepperDash.Essentials.Core/Interfaces/ILogStringsWithLevel.cs index c43c4e6c..47c3674e 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Interfaces/ILogStringsWithLevel.cs +++ b/src/PepperDash.Essentials.Core/Interfaces/ILogStringsWithLevel.cs @@ -1,18 +1,18 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Core; - -namespace PepperDash.Essentials.Core.Interfaces -{ - public interface ILogStringsWithLevel : IKeyed - { - /// - /// Defines a class that is capable of logging a string with an int level - /// - void SendToLog(IKeyed device, Debug.ErrorLogLevel level,string logMessage); - } - +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using PepperDash.Core; + +namespace PepperDash.Essentials.Core.Interfaces +{ + public interface ILogStringsWithLevel : IKeyed + { + /// + /// Defines a class that is capable of logging a string with an int level + /// + void SendToLog(IKeyed device, Debug.ErrorLogLevel level,string logMessage); + } + } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/JoinMaps/JoinMapBase.cs b/src/PepperDash.Essentials.Core/JoinMaps/JoinMapBase.cs similarity index 97% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/JoinMaps/JoinMapBase.cs rename to src/PepperDash.Essentials.Core/JoinMaps/JoinMapBase.cs index 67a5740f..e16640ce 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/JoinMaps/JoinMapBase.cs +++ b/src/PepperDash.Essentials.Core/JoinMaps/JoinMapBase.cs @@ -1,661 +1,663 @@ -using System; -using System.Collections.Generic; -using System.Data; -using System.Globalization; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using Crestron.SimplSharp.Reflection; -using Crestron.SimplSharp.CrestronIO; -using Crestron.SimplSharp; - -using PepperDash.Core; -using PepperDash.Essentials.Core.Config; - -using Newtonsoft.Json; - -namespace PepperDash.Essentials.Core -{ - public static class JoinMapHelper - { - /// - /// Attempts to get the serialized join map from config - /// - /// - /// - public static string GetSerializedJoinMapForDevice(string joinMapKey) - { - if (string.IsNullOrEmpty(joinMapKey)) - return null; - - var joinMap = ConfigReader.ConfigObject.JoinMaps[joinMapKey]; - - return joinMap.ToString(); - } - - /// - /// Attempts to get the serialized join map from config - /// - /// - /// - public static string GetJoinMapForDevice(string joinMapKey) - { - return GetSerializedJoinMapForDevice(joinMapKey); - } - - /// - /// Attempts to find a custom join map by key and returns it deserialized if found - /// - /// - /// - public static Dictionary TryGetJoinMapAdvancedForDevice(string joinMapKey) - { - try - { - if (string.IsNullOrEmpty(joinMapKey)) - return null; - - if (!ConfigReader.ConfigObject.JoinMaps.ContainsKey(joinMapKey)) - { - Debug.Console(2, "No Join Map found in config with key: '{0}'", joinMapKey); - return null; - } - - Debug.Console(2, "Attempting to load custom join map with key: {0}", joinMapKey); - - var joinMapJToken = ConfigReader.ConfigObject.JoinMaps[joinMapKey]; - - if (joinMapJToken == null) - return null; - - var joinMapData = joinMapJToken.ToObject>(); - - return joinMapData; - } - catch (Exception e) - { - Debug.Console(2, "Error getting join map for key: '{0}'. Error: {1}", joinMapKey, e); - return null; - } - } - - } - - /// - /// Base class for join maps - /// - [Obsolete("This is being deprecated in favor of JoinMapBaseAdvanced")] - public abstract class JoinMapBase - { - /// - /// Modifies all the join numbers by adding the offset. This should never be called twice - /// - /// - public abstract void OffsetJoinNumbers(uint joinStart); - - /// - /// The collection of joins and associated metadata - /// - public Dictionary Joins = new Dictionary(); - - /// - /// Prints the join information to console - /// - public void PrintJoinMapInfo() - { - Debug.Console(0, "{0}:\n", GetType().Name); - - // Get the joins of each type and print them - Debug.Console(0, "Digitals:"); - var digitals = Joins.Where(j => (j.Value.JoinType & eJoinType.Digital) == eJoinType.Digital).ToDictionary(j => j.Key, j => j.Value); - Debug.Console(2, "Found {0} Digital Joins", digitals.Count); - PrintJoinList(GetSortedJoins(digitals)); - - Debug.Console(0, "Analogs:"); - var analogs = Joins.Where(j => (j.Value.JoinType & eJoinType.Analog) == eJoinType.Analog).ToDictionary(j => j.Key, j => j.Value); - Debug.Console(2, "Found {0} Analog Joins", analogs.Count); - PrintJoinList(GetSortedJoins(analogs)); - - Debug.Console(0, "Serials:"); - var serials = Joins.Where(j => (j.Value.JoinType & eJoinType.Serial) == eJoinType.Serial).ToDictionary(j => j.Key, j => j.Value); - Debug.Console(2, "Found {0} Serial Joins", serials.Count); - PrintJoinList(GetSortedJoins(serials)); - - } - - /// - /// Returns a sorted list by JoinNumber - /// - /// - /// - List> GetSortedJoins(Dictionary joins) - { - var sortedJoins = joins.ToList(); - - sortedJoins.Sort((pair1, pair2) => pair1.Value.JoinNumber.CompareTo(pair2.Value.JoinNumber)); - - return sortedJoins; - } - - void PrintJoinList(List> joins) - { - foreach (var join in joins) - { - Debug.Console(0, - @"Join Number: {0} | Label: '{1}' | JoinSpan: '{2}' | Type: '{3}' | Capabilities: '{4}'", - join.Value.JoinNumber, - join.Value.Label, - join.Value.JoinSpan, - join.Value.JoinType.ToString(), - join.Value.JoinCapabilities.ToString()); - } - } - - /// - /// Returns the join number for the join with the specified key - /// - /// - /// - public uint GetJoinForKey(string key) - { - return Joins.ContainsKey(key) ? Joins[key].JoinNumber : 0; - } - - /// - /// Returns the join span for the join with the specified key - /// - /// - /// - public uint GetJoinSpanForKey(string key) - { - return Joins.ContainsKey(key) ? Joins[key].JoinSpan : 0; - } - } - - /// - /// Base class for join maps - /// - public abstract class JoinMapBaseAdvanced - { - protected uint JoinOffset; - - /// - /// The collection of joins and associated metadata - /// - public Dictionary Joins { get; private set; } - - protected JoinMapBaseAdvanced(uint joinStart) - { - Joins = new Dictionary(); - - JoinOffset = joinStart - 1; - } - - protected JoinMapBaseAdvanced(uint joinStart, Type type):this(joinStart) - { - AddJoins(type); - } - - protected void AddJoins(Type type) - { - var fields = - type.GetCType() - .GetFields(BindingFlags.Public | BindingFlags.Instance) - .Where(f => f.IsDefined(typeof (JoinNameAttribute), true)); - - foreach (var field in fields) - { - var childClass = Convert.ChangeType(this, type, null); - - var value = field.GetValue(childClass) as JoinDataComplete; //this here is JoinMapBaseAdvanced, not the child class. JoinMapBaseAdvanced has no fields. - - if (value == null) - { - Debug.Console(0, "Unable to cast base class to {0}", type.Name); - continue; - } - - value.SetJoinOffset(JoinOffset); - - var joinName = value.GetNameAttribute(field); - - if (String.IsNullOrEmpty(joinName)) continue; - - Joins.Add(joinName, value); - } - - - if (Debug.Level > 0) - { - PrintJoinMapInfo(); - } - } - - /// - /// Prints the join information to console - /// - public void PrintJoinMapInfo() - { - Debug.Console(0, "{0}:\n", GetType().Name); - - // Get the joins of each type and print them - Debug.Console(0, "Digitals:"); - var digitals = Joins.Where(j => (j.Value.Metadata.JoinType & eJoinType.Digital) == eJoinType.Digital).ToDictionary(j => j.Key, j => j.Value); - Debug.Console(2, "Found {0} Digital Joins", digitals.Count); - PrintJoinList(GetSortedJoins(digitals)); - - Debug.Console(0, "Analogs:"); - var analogs = Joins.Where(j => (j.Value.Metadata.JoinType & eJoinType.Analog) == eJoinType.Analog).ToDictionary(j => j.Key, j => j.Value); - Debug.Console(2, "Found {0} Analog Joins", analogs.Count); - PrintJoinList(GetSortedJoins(analogs)); - - Debug.Console(0, "Serials:"); - var serials = Joins.Where(j => (j.Value.Metadata.JoinType & eJoinType.Serial) == eJoinType.Serial).ToDictionary(j => j.Key, j => j.Value); - Debug.Console(2, "Found {0} Serial Joins", serials.Count); - PrintJoinList(GetSortedJoins(serials)); - - } - /// - /// Prints the join information to console - /// - public void MarkdownJoinMapInfo(string deviceKey, string bridgeKey) - { - var pluginType = GetType().Name; - - Debug.Console(0, "{0}:\n", pluginType); - - var sb = new StringBuilder(); - - sb.AppendLine(String.Format("# {0}", GetType().Name)); - sb.AppendLine(String.Format("Generated from '{0}' on bridge '{1}'", deviceKey, bridgeKey)); - sb.AppendLine(); - sb.AppendLine("## Digitals"); - // Get the joins of each type and print them - var digitals = Joins.Where(j => (j.Value.Metadata.JoinType & eJoinType.Digital) == eJoinType.Digital).ToDictionary(j => j.Key, j => j.Value); - Debug.Console(2, "Found {0} Digital Joins", digitals.Count); - var digitalSb = AppendJoinList(GetSortedJoins(digitals)); - digitalSb.AppendLine("## Analogs"); - digitalSb.AppendLine(); - - Debug.Console(0, "Analogs:"); - var analogs = Joins.Where(j => (j.Value.Metadata.JoinType & eJoinType.Analog) == eJoinType.Analog).ToDictionary(j => j.Key, j => j.Value); - Debug.Console(2, "Found {0} Analog Joins", analogs.Count); - var analogSb = AppendJoinList(GetSortedJoins(analogs)); - analogSb.AppendLine("## Serials"); - analogSb.AppendLine(); - - Debug.Console(0, "Serials:"); - var serials = Joins.Where(j => (j.Value.Metadata.JoinType & eJoinType.Serial) == eJoinType.Serial).ToDictionary(j => j.Key, j => j.Value); - Debug.Console(2, "Found {0} Serial Joins", serials.Count); - var serialSb = AppendJoinList(GetSortedJoins(serials)); - - sb.EnsureCapacity(sb.Length + digitalSb.Length + analogSb.Length + serialSb.Length); - sb.Append(digitalSb).Append(analogSb).Append(serialSb); - - WriteJoinmapMarkdown(sb, pluginType, bridgeKey, deviceKey); - - } - - private static void WriteJoinmapMarkdown(StringBuilder stringBuilder, string pluginType, string bridgeKey, string deviceKey) - { - var fileName = String.Format("{0}{1}{2}__{3}__{4}.md", Global.FilePathPrefix, "joinMaps/", pluginType, bridgeKey, deviceKey); - - using (var sw = new StreamWriter(fileName)) - { - sw.WriteLine(stringBuilder.ToString()); - Debug.Console(0, "Joinmap Readme generated and written to {0}", fileName); - } - - } - - /// - /// Returns a sorted list by JoinNumber - /// - /// - /// - List> GetSortedJoins(Dictionary joins) - { - var sortedJoins = joins.ToList(); - - sortedJoins.Sort((pair1, pair2) => pair1.Value.JoinNumber.CompareTo(pair2.Value.JoinNumber)); - - return sortedJoins; - } - - void PrintJoinList(List> joins) - { - foreach (var join in joins) - { - Debug.Console(0, - @"Join Number: {0} | JoinSpan: '{1}' | JoinName: {2} | Description: '{3}' | Type: '{4}' | Capabilities: '{5}'", - join.Value.JoinNumber, - join.Value.JoinSpan, - join.Key, - String.IsNullOrEmpty(join.Value.AttributeName) ? join.Value.Metadata.Label : join.Value.AttributeName, - join.Value.Metadata.JoinType.ToString(), - join.Value.Metadata.JoinCapabilities.ToString()); - } - } - - static StringBuilder AppendJoinList(List> joins) - { - var sb = new StringBuilder(); - const string stringFormatter = "| {0} | {1} | {2} | {3} | {4} |"; - const int joinNumberLen = 11; - const int joinSpanLen = 9; - const int typeLen = 19; - const int capabilitiesLen = 12; - var descriptionLen = (from @join in joins select @join.Value into j select j.Metadata.Description.Length).Concat(new[] {11}).Max(); - - //build header - sb.AppendLine(String.Format(stringFormatter, - String.Format("Join Number").PadRight(joinNumberLen, ' '), - String.Format("Join Span").PadRight(joinSpanLen, ' '), - String.Format("Description").PadRight(descriptionLen, ' '), - String.Format("Type").PadRight(typeLen, ' '), - String.Format("Capabilities").PadRight(capabilitiesLen, ' '))); - //build table seperator - sb.AppendLine(String.Format(stringFormatter, - new String('-', joinNumberLen), - new String('-', joinSpanLen), - new String('-', descriptionLen), - new String('-', typeLen), - new String('-', capabilitiesLen))); - - foreach (var join in joins) - { - sb.AppendLine(join.Value.GetMarkdownFormattedData(stringFormatter, descriptionLen)); - } - sb.AppendLine(); - return sb; - } - - /// - /// Attempts to find the matching key for the custom join and if found overwrites the default JoinData with the custom - /// - /// - public void SetCustomJoinData(Dictionary joinData) - { - foreach (var customJoinData in joinData) - { - var join = Joins[customJoinData.Key]; - - if (join != null) - { - join.SetCustomJoinData(customJoinData.Value); - } - else - { - Debug.Console(2, "No matching key found in join map for: '{0}'", customJoinData.Key); - } - } - - PrintJoinMapInfo(); - } - - ///// - ///// Returns the join number for the join with the specified key - ///// - ///// - ///// - //public uint GetJoinForKey(string key) - //{ - // return Joins.ContainsKey(key) ? Joins[key].JoinNumber : 0; - //} - - - ///// - ///// Returns the join span for the join with the specified key - ///// - ///// - ///// - //public uint GetJoinSpanForKey(string key) - //{ - // return Joins.ContainsKey(key) ? Joins[key].JoinSpan : 0; - //} - } - - /// - /// Read = Provides feedback to SIMPL - /// Write = Responds to sig values from SIMPL - /// - [Flags] - public enum eJoinCapabilities - { - None = 0, - ToSIMPL = 1, - FromSIMPL = 2, - ToFromSIMPL = ToSIMPL | FromSIMPL, - ToFusion = 4, - FromFusion = 8, - ToFromFusion = ToFusion | FromFusion, - } - - [Flags] - public enum eJoinType - { - None = 0, - Digital = 1, - Analog = 2, - Serial = 4, - DigitalAnalog = Digital | Analog, - DigitalSerial = Digital | Serial, - AnalogSerial = Analog | Serial, - DigitalAnalogSerial = Digital | Analog | Serial, - } - - /// - /// Metadata describing the join - /// - public class JoinMetadata - { - private string _description; - - /// - /// Join number (based on join offset value) - /// - [JsonProperty("joinNumber")] - [Obsolete] - public uint JoinNumber { get; set; } - /// - /// Join range span. If join indicates the start of a range of joins, this indicated the maximum number of joins in the range - /// - [Obsolete] - [JsonProperty("joinSpan")] - public uint JoinSpan { get; set; } - - /// - /// A label for the join to better describe its usage - /// - [Obsolete("Use Description instead")] - [JsonProperty("label")] - public string Label { get { return _description; } set { _description = value; } } - - /// - /// A description for the join to better describe its usage - /// - [JsonProperty("description")] - public string Description { get { return _description; } set { _description = value; } } - /// - /// Signal type(s) - /// - [JsonProperty("joinType")] - public eJoinType JoinType { get; set; } - /// - /// Indicates whether the join is read and/or write - /// - [JsonProperty("joinCapabilities")] - public eJoinCapabilities JoinCapabilities { get; set; } - /// - /// Indicates a set of valid values (particularly if this translates to an enum - /// - [JsonProperty("validValues")] - public string[] ValidValues { get; set; } - - } - - /// - /// Data describing the join. Can be overridden from configuratino - /// - public class JoinData - { - /// - /// Join number (based on join offset value) - /// - [JsonProperty("joinNumber")] - public uint JoinNumber { get; set; } - /// - /// Join range span. If join indicates the start of a range of joins, this indicated the maximum number of joins in the range - /// - [JsonProperty("joinSpan")] - public uint JoinSpan { get; set; } - /// - /// Fusion Attribute Name (optional) - /// - [JsonProperty("attributeName")] - public string AttributeName { get; set; } - } - - /// - /// A class to aggregate the JoinData and JoinMetadata for a join - /// - public class JoinDataComplete - { - private uint _joinOffset; - - private JoinData _data; - public JoinMetadata Metadata { get; set; } - /// - /// To store some future information as you please - /// - public object UserObject { get; private set; } - - public JoinDataComplete(JoinData data, JoinMetadata metadata) - { - _data = data; - Metadata = metadata; - } - - public string GetMarkdownFormattedData(string stringFormatter, int descriptionLen) - { - - //Fixed Width Headers - var joinNumberLen = String.Format("Join Number").Length; - var joinSpanLen = String.Format("Join Span").Length; - var typeLen = String.Format("AnalogDigitalSerial").Length; - var capabilitiesLen = String.Format("ToFromFusion").Length; - - //Track which one failed, if it did - const string placeholder = "unknown"; - var dataArray = new Dictionary - { - {"joinNumber", placeholder.PadRight(joinNumberLen, ' ')}, - {"joinSpan", placeholder.PadRight(joinSpanLen, ' ')}, - {"description", placeholder.PadRight(descriptionLen, ' ')}, - {"joinType", placeholder.PadRight(typeLen, ' ')}, - {"capabilities", placeholder.PadRight(capabilitiesLen, ' ')} - }; - - - try - { - dataArray["joinNumber"] = String.Format("{0}", JoinNumber.ToString(CultureInfo.InvariantCulture).ReplaceIfNullOrEmpty(placeholder)).PadRight(joinNumberLen, ' '); - dataArray["joinSpan"] = String.Format("{0}", JoinSpan.ToString(CultureInfo.InvariantCulture).ReplaceIfNullOrEmpty(placeholder)).PadRight(joinSpanLen, ' '); - dataArray["description"] = String.Format("{0}", Metadata.Description.ReplaceIfNullOrEmpty(placeholder)).PadRight(descriptionLen, ' '); - dataArray["joinType"] = String.Format("{0}", Metadata.JoinType.ToString().ReplaceIfNullOrEmpty(placeholder)).PadRight(typeLen, ' '); - dataArray["capabilities"] = String.Format("{0}", Metadata.JoinCapabilities.ToString().ReplaceIfNullOrEmpty(placeholder)).PadRight(capabilitiesLen, ' '); - - return String.Format(stringFormatter, - dataArray["joinNumber"], - dataArray["joinSpan"], - dataArray["description"], - dataArray["joinType"], - dataArray["capabilities"]); - - } - catch (Exception e) - { - //Don't Throw - we don't want to kill the system if this falls over - it's not mission critical. Print the error, use placeholder data - var errorKey = string.Empty; - foreach (var item in dataArray) - { - if (item.Value.TrimEnd() == placeholder) continue; - errorKey = item.Key; - break; - } - Debug.Console(0, "Unable to decode join metadata {1}- {0}", e.Message, !String.IsNullOrEmpty(errorKey) ? (' ' + errorKey) : String.Empty); - return String.Format(stringFormatter, - dataArray["joinNumber"], - dataArray["joinSpan"], - dataArray["description"], - dataArray["joinType"], - dataArray["capabilities"]); - } - } - - - /// - /// Sets the join offset value - /// - /// - public void SetJoinOffset(uint joinOffset) - { - _joinOffset = joinOffset; - } - - /// - /// The join number (including the offset) - /// - public uint JoinNumber - { - get { return _data.JoinNumber+ _joinOffset; } - set { _data.JoinNumber = value; } - } - - public uint JoinSpan - { - get { return _data.JoinSpan; } - } - - public string AttributeName - { - get { return _data.AttributeName; } - } - - public void SetCustomJoinData(JoinData customJoinData) - { - _data = customJoinData; - } - - public string GetNameAttribute(MemberInfo memberInfo) - { - var name = string.Empty; - var attribute = (JoinNameAttribute)CAttribute.GetCustomAttribute(memberInfo, typeof(JoinNameAttribute)); - - if (attribute == null) return name; - - name = attribute.Name; - Debug.Console(2, "JoinName Attribute value: {0}", name); - return name; - } - } - - - - [AttributeUsage(AttributeTargets.All)] - public class JoinNameAttribute : CAttribute - { - private string _Name; - - public JoinNameAttribute(string name) - { - Debug.Console(2, "Setting Attribute Name: {0}", name); - _Name = name; - } - - public string Name - { - get { return _Name; } - } - } +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Data; +using System.Globalization; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using Crestron.SimplSharp.Reflection; +using Crestron.SimplSharp.CrestronIO; +using Crestron.SimplSharp; + +using PepperDash.Core; +using PepperDash.Essentials.Core.Config; + +using Full.Newtonsoft.Json; + +namespace PepperDash.Essentials.Core +{ + public static class JoinMapHelper + { + /// + /// Attempts to get the serialized join map from config + /// + /// + /// + public static string GetSerializedJoinMapForDevice(string joinMapKey) + { + if (string.IsNullOrEmpty(joinMapKey)) + return null; + + var joinMap = ConfigReader.ConfigObject.JoinMaps[joinMapKey]; + + return joinMap.ToString(); + } + + /// + /// Attempts to get the serialized join map from config + /// + /// + /// + public static string GetJoinMapForDevice(string joinMapKey) + { + return GetSerializedJoinMapForDevice(joinMapKey); + } + + /// + /// Attempts to find a custom join map by key and returns it deserialized if found + /// + /// + /// + public static Dictionary TryGetJoinMapAdvancedForDevice(string joinMapKey) + { + try + { + if (string.IsNullOrEmpty(joinMapKey)) + return null; + + if (!ConfigReader.ConfigObject.JoinMaps.ContainsKey(joinMapKey)) + { + Debug.Console(2, "No Join Map found in config with key: '{0}'", joinMapKey); + return null; + } + + Debug.Console(2, "Attempting to load custom join map with key: {0}", joinMapKey); + + var joinMapJToken = ConfigReader.ConfigObject.JoinMaps[joinMapKey]; + + if (joinMapJToken == null) + return null; + + var joinMapData = joinMapJToken.ToObject>(); + + return joinMapData; + } + catch (Exception e) + { + Debug.Console(2, "Error getting join map for key: '{0}'. Error: {1}", joinMapKey, e); + return null; + } + } + + } + + /// + /// Base class for join maps + /// + [Obsolete("This is being deprecated in favor of JoinMapBaseAdvanced")] + public abstract class JoinMapBase + { + /// + /// Modifies all the join numbers by adding the offset. This should never be called twice + /// + /// + public abstract void OffsetJoinNumbers(uint joinStart); + + /// + /// The collection of joins and associated metadata + /// + public Dictionary Joins = new Dictionary(); + + /// + /// Prints the join information to console + /// + public void PrintJoinMapInfo() + { + Debug.Console(0, "{0}:\n", GetType().Name); + + // Get the joins of each type and print them + Debug.Console(0, "Digitals:"); + var digitals = Joins.Where(j => (j.Value.JoinType & eJoinType.Digital) == eJoinType.Digital).ToDictionary(j => j.Key, j => j.Value); + Debug.Console(2, "Found {0} Digital Joins", digitals.Count); + PrintJoinList(GetSortedJoins(digitals)); + + Debug.Console(0, "Analogs:"); + var analogs = Joins.Where(j => (j.Value.JoinType & eJoinType.Analog) == eJoinType.Analog).ToDictionary(j => j.Key, j => j.Value); + Debug.Console(2, "Found {0} Analog Joins", analogs.Count); + PrintJoinList(GetSortedJoins(analogs)); + + Debug.Console(0, "Serials:"); + var serials = Joins.Where(j => (j.Value.JoinType & eJoinType.Serial) == eJoinType.Serial).ToDictionary(j => j.Key, j => j.Value); + Debug.Console(2, "Found {0} Serial Joins", serials.Count); + PrintJoinList(GetSortedJoins(serials)); + + } + + /// + /// Returns a sorted list by JoinNumber + /// + /// + /// + List> GetSortedJoins(Dictionary joins) + { + var sortedJoins = joins.ToList(); + + sortedJoins.Sort((pair1, pair2) => pair1.Value.JoinNumber.CompareTo(pair2.Value.JoinNumber)); + + return sortedJoins; + } + + void PrintJoinList(List> joins) + { + foreach (var join in joins) + { + Debug.Console(0, + @"Join Number: {0} | Label: '{1}' | JoinSpan: '{2}' | Type: '{3}' | Capabilities: '{4}'", + join.Value.JoinNumber, + join.Value.Label, + join.Value.JoinSpan, + join.Value.JoinType.ToString(), + join.Value.JoinCapabilities.ToString()); + } + } + + /// + /// Returns the join number for the join with the specified key + /// + /// + /// + public uint GetJoinForKey(string key) + { + return Joins.ContainsKey(key) ? Joins[key].JoinNumber : 0; + } + + /// + /// Returns the join span for the join with the specified key + /// + /// + /// + public uint GetJoinSpanForKey(string key) + { + return Joins.ContainsKey(key) ? Joins[key].JoinSpan : 0; + } + } + + /// + /// Base class for join maps + /// + public abstract class JoinMapBaseAdvanced + { + protected uint JoinOffset; + + /// + /// The collection of joins and associated metadata + /// + public Dictionary Joins { get; private set; } + + protected JoinMapBaseAdvanced(uint joinStart) + { + Joins = new Dictionary(); + + JoinOffset = joinStart - 1; + } + + protected JoinMapBaseAdvanced(uint joinStart, Type type):this(joinStart) + { + AddJoins(type); + } + + protected void AddJoins(Type type) + { + var fields = + type.GetCType() + .GetFields(BindingFlags.Public | BindingFlags.Instance) + .Where(f => f.IsDefined(typeof (JoinNameAttribute), true)); + + foreach (var field in fields) + { + var childClass = Convert.ChangeType(this, type, null); + + var value = field.GetValue(childClass) as JoinDataComplete; //this here is JoinMapBaseAdvanced, not the child class. JoinMapBaseAdvanced has no fields. + + if (value == null) + { + Debug.Console(0, "Unable to cast base class to {0}", type.Name); + continue; + } + + value.SetJoinOffset(JoinOffset); + + var joinName = value.GetNameAttribute(field); + + if (String.IsNullOrEmpty(joinName)) continue; + + Joins.Add(joinName, value); + } + + + if (Debug.Level > 0) + { + PrintJoinMapInfo(); + } + } + + /// + /// Prints the join information to console + /// + public void PrintJoinMapInfo() + { + Debug.Console(0, "{0}:\n", GetType().Name); + + // Get the joins of each type and print them + Debug.Console(0, "Digitals:"); + var digitals = Joins.Where(j => (j.Value.Metadata.JoinType & eJoinType.Digital) == eJoinType.Digital).ToDictionary(j => j.Key, j => j.Value); + Debug.Console(2, "Found {0} Digital Joins", digitals.Count); + PrintJoinList(GetSortedJoins(digitals)); + + Debug.Console(0, "Analogs:"); + var analogs = Joins.Where(j => (j.Value.Metadata.JoinType & eJoinType.Analog) == eJoinType.Analog).ToDictionary(j => j.Key, j => j.Value); + Debug.Console(2, "Found {0} Analog Joins", analogs.Count); + PrintJoinList(GetSortedJoins(analogs)); + + Debug.Console(0, "Serials:"); + var serials = Joins.Where(j => (j.Value.Metadata.JoinType & eJoinType.Serial) == eJoinType.Serial).ToDictionary(j => j.Key, j => j.Value); + Debug.Console(2, "Found {0} Serial Joins", serials.Count); + PrintJoinList(GetSortedJoins(serials)); + + } + /// + /// Prints the join information to console + /// + public void MarkdownJoinMapInfo(string deviceKey, string bridgeKey) + { + var pluginType = GetType().Name; + + Debug.Console(0, "{0}:\n", pluginType); + + var sb = new StringBuilder(); + + sb.AppendLine(String.Format("# {0}", GetType().Name)); + sb.AppendLine(String.Format("Generated from '{0}' on bridge '{1}'", deviceKey, bridgeKey)); + sb.AppendLine(); + sb.AppendLine("## Digitals"); + // Get the joins of each type and print them + var digitals = Joins.Where(j => (j.Value.Metadata.JoinType & eJoinType.Digital) == eJoinType.Digital).ToDictionary(j => j.Key, j => j.Value); + Debug.Console(2, "Found {0} Digital Joins", digitals.Count); + var digitalSb = AppendJoinList(GetSortedJoins(digitals)); + digitalSb.AppendLine("## Analogs"); + digitalSb.AppendLine(); + + Debug.Console(0, "Analogs:"); + var analogs = Joins.Where(j => (j.Value.Metadata.JoinType & eJoinType.Analog) == eJoinType.Analog).ToDictionary(j => j.Key, j => j.Value); + Debug.Console(2, "Found {0} Analog Joins", analogs.Count); + var analogSb = AppendJoinList(GetSortedJoins(analogs)); + analogSb.AppendLine("## Serials"); + analogSb.AppendLine(); + + Debug.Console(0, "Serials:"); + var serials = Joins.Where(j => (j.Value.Metadata.JoinType & eJoinType.Serial) == eJoinType.Serial).ToDictionary(j => j.Key, j => j.Value); + Debug.Console(2, "Found {0} Serial Joins", serials.Count); + var serialSb = AppendJoinList(GetSortedJoins(serials)); + + sb.EnsureCapacity(sb.Length + digitalSb.Length + analogSb.Length + serialSb.Length); + sb.Append(digitalSb).Append(analogSb).Append(serialSb); + + WriteJoinmapMarkdown(sb, pluginType, bridgeKey, deviceKey); + + } + + private static void WriteJoinmapMarkdown(StringBuilder stringBuilder, string pluginType, string bridgeKey, string deviceKey) + { + var fileName = String.Format("{0}{1}{2}__{3}__{4}.md", Global.FilePathPrefix, "joinMaps/", pluginType, bridgeKey, deviceKey); + + using (var sw = new StreamWriter(fileName)) + { + sw.WriteLine(stringBuilder.ToString()); + Debug.Console(0, "Joinmap Readme generated and written to {0}", fileName); + } + + } + + /// + /// Returns a sorted list by JoinNumber + /// + /// + /// + List> GetSortedJoins(Dictionary joins) + { + var sortedJoins = joins.ToList(); + + sortedJoins.Sort((pair1, pair2) => pair1.Value.JoinNumber.CompareTo(pair2.Value.JoinNumber)); + + return sortedJoins; + } + + void PrintJoinList(List> joins) + { + foreach (var join in joins) + { + Debug.Console(0, + @"Join Number: {0} | JoinSpan: '{1}' | JoinName: {2} | Description: '{3}' | Type: '{4}' | Capabilities: '{5}'", + join.Value.JoinNumber, + join.Value.JoinSpan, + join.Key, + String.IsNullOrEmpty(join.Value.AttributeName) ? join.Value.Metadata.Label : join.Value.AttributeName, + join.Value.Metadata.JoinType.ToString(), + join.Value.Metadata.JoinCapabilities.ToString()); + } + } + + static StringBuilder AppendJoinList(List> joins) + { + var sb = new StringBuilder(); + const string stringFormatter = "| {0} | {1} | {2} | {3} | {4} |"; + const int joinNumberLen = 11; + const int joinSpanLen = 9; + const int typeLen = 19; + const int capabilitiesLen = 12; + var descriptionLen = (from @join in joins select @join.Value into j select j.Metadata.Description.Length).Concat(new[] {11}).Max(); + + //build header + sb.AppendLine(String.Format(stringFormatter, + String.Format("Join Number").PadRight(joinNumberLen, ' '), + String.Format("Join Span").PadRight(joinSpanLen, ' '), + String.Format("Description").PadRight(descriptionLen, ' '), + String.Format("Type").PadRight(typeLen, ' '), + String.Format("Capabilities").PadRight(capabilitiesLen, ' '))); + //build table seperator + sb.AppendLine(String.Format(stringFormatter, + new String('-', joinNumberLen), + new String('-', joinSpanLen), + new String('-', descriptionLen), + new String('-', typeLen), + new String('-', capabilitiesLen))); + + foreach (var join in joins) + { + sb.AppendLine(join.Value.GetMarkdownFormattedData(stringFormatter, descriptionLen)); + } + sb.AppendLine(); + return sb; + } + + /// + /// Attempts to find the matching key for the custom join and if found overwrites the default JoinData with the custom + /// + /// + public void SetCustomJoinData(Dictionary joinData) + { + foreach (var customJoinData in joinData) + { + var join = Joins[customJoinData.Key]; + + if (join != null) + { + join.SetCustomJoinData(customJoinData.Value); + } + else + { + Debug.Console(2, "No matching key found in join map for: '{0}'", customJoinData.Key); + } + } + + PrintJoinMapInfo(); + } + + ///// + ///// Returns the join number for the join with the specified key + ///// + ///// + ///// + //public uint GetJoinForKey(string key) + //{ + // return Joins.ContainsKey(key) ? Joins[key].JoinNumber : 0; + //} + + + ///// + ///// Returns the join span for the join with the specified key + ///// + ///// + ///// + //public uint GetJoinSpanForKey(string key) + //{ + // return Joins.ContainsKey(key) ? Joins[key].JoinSpan : 0; + //} + } + + /// + /// Read = Provides feedback to SIMPL + /// Write = Responds to sig values from SIMPL + /// + [Flags] + public enum eJoinCapabilities + { + None = 0, + ToSIMPL = 1, + FromSIMPL = 2, + ToFromSIMPL = ToSIMPL | FromSIMPL, + ToFusion = 4, + FromFusion = 8, + ToFromFusion = ToFusion | FromFusion, + } + + [Flags] + public enum eJoinType + { + None = 0, + Digital = 1, + Analog = 2, + Serial = 4, + DigitalAnalog = Digital | Analog, + DigitalSerial = Digital | Serial, + AnalogSerial = Analog | Serial, + DigitalAnalogSerial = Digital | Analog | Serial, + } + + /// + /// Metadata describing the join + /// + public class JoinMetadata + { + private string _description; + + /// + /// Join number (based on join offset value) + /// + [JsonProperty("joinNumber")] + [Obsolete] + public uint JoinNumber { get; set; } + /// + /// Join range span. If join indicates the start of a range of joins, this indicated the maximum number of joins in the range + /// + [Obsolete] + [JsonProperty("joinSpan")] + public uint JoinSpan { get; set; } + + /// + /// A label for the join to better describe its usage + /// + [Obsolete("Use Description instead")] + [JsonProperty("label")] + public string Label { get { return _description; } set { _description = value; } } + + /// + /// A description for the join to better describe its usage + /// + [JsonProperty("description")] + public string Description { get { return _description; } set { _description = value; } } + /// + /// Signal type(s) + /// + [JsonProperty("joinType")] + public eJoinType JoinType { get; set; } + /// + /// Indicates whether the join is read and/or write + /// + [JsonProperty("joinCapabilities")] + public eJoinCapabilities JoinCapabilities { get; set; } + /// + /// Indicates a set of valid values (particularly if this translates to an enum + /// + [JsonProperty("validValues")] + public string[] ValidValues { get; set; } + + } + + /// + /// Data describing the join. Can be overridden from configuratino + /// + public class JoinData + { + /// + /// Join number (based on join offset value) + /// + [JsonProperty("joinNumber")] + public uint JoinNumber { get; set; } + /// + /// Join range span. If join indicates the start of a range of joins, this indicated the maximum number of joins in the range + /// + [JsonProperty("joinSpan")] + public uint JoinSpan { get; set; } + /// + /// Fusion Attribute Name (optional) + /// + [JsonProperty("attributeName")] + public string AttributeName { get; set; } + } + + /// + /// A class to aggregate the JoinData and JoinMetadata for a join + /// + public class JoinDataComplete + { + private uint _joinOffset; + + private JoinData _data; + public JoinMetadata Metadata { get; set; } + /// + /// To store some future information as you please + /// + public object UserObject { get; private set; } + + public JoinDataComplete(JoinData data, JoinMetadata metadata) + { + _data = data; + Metadata = metadata; + } + + public string GetMarkdownFormattedData(string stringFormatter, int descriptionLen) + { + + //Fixed Width Headers + var joinNumberLen = String.Format("Join Number").Length; + var joinSpanLen = String.Format("Join Span").Length; + var typeLen = String.Format("AnalogDigitalSerial").Length; + var capabilitiesLen = String.Format("ToFromFusion").Length; + + //Track which one failed, if it did + const string placeholder = "unknown"; + var dataArray = new Dictionary + { + {"joinNumber", placeholder.PadRight(joinNumberLen, ' ')}, + {"joinSpan", placeholder.PadRight(joinSpanLen, ' ')}, + {"description", placeholder.PadRight(descriptionLen, ' ')}, + {"joinType", placeholder.PadRight(typeLen, ' ')}, + {"capabilities", placeholder.PadRight(capabilitiesLen, ' ')} + }; + + + try + { + dataArray["joinNumber"] = String.Format("{0}", JoinNumber.ToString(CultureInfo.InvariantCulture).ReplaceIfNullOrEmpty(placeholder)).PadRight(joinNumberLen, ' '); + dataArray["joinSpan"] = String.Format("{0}", JoinSpan.ToString(CultureInfo.InvariantCulture).ReplaceIfNullOrEmpty(placeholder)).PadRight(joinSpanLen, ' '); + dataArray["description"] = String.Format("{0}", Metadata.Description.ReplaceIfNullOrEmpty(placeholder)).PadRight(descriptionLen, ' '); + dataArray["joinType"] = String.Format("{0}", Metadata.JoinType.ToString().ReplaceIfNullOrEmpty(placeholder)).PadRight(typeLen, ' '); + dataArray["capabilities"] = String.Format("{0}", Metadata.JoinCapabilities.ToString().ReplaceIfNullOrEmpty(placeholder)).PadRight(capabilitiesLen, ' '); + + return String.Format(stringFormatter, + dataArray["joinNumber"], + dataArray["joinSpan"], + dataArray["description"], + dataArray["joinType"], + dataArray["capabilities"]); + + } + catch (Exception e) + { + //Don't Throw - we don't want to kill the system if this falls over - it's not mission critical. Print the error, use placeholder data + var errorKey = string.Empty; + foreach (var item in dataArray) + { + if (item.Value.TrimEnd() == placeholder) continue; + errorKey = item.Key; + break; + } + Debug.Console(0, "Unable to decode join metadata {1}- {0}", e.Message, !String.IsNullOrEmpty(errorKey) ? (' ' + errorKey) : String.Empty); + return String.Format(stringFormatter, + dataArray["joinNumber"], + dataArray["joinSpan"], + dataArray["description"], + dataArray["joinType"], + dataArray["capabilities"]); + } + } + + + /// + /// Sets the join offset value + /// + /// + public void SetJoinOffset(uint joinOffset) + { + _joinOffset = joinOffset; + } + + /// + /// The join number (including the offset) + /// + public uint JoinNumber + { + get { return _data.JoinNumber+ _joinOffset; } + set { _data.JoinNumber = value; } + } + + public uint JoinSpan + { + get { return _data.JoinSpan; } + } + + public string AttributeName + { + get { return _data.AttributeName; } + } + + public void SetCustomJoinData(JoinData customJoinData) + { + _data = customJoinData; + } + + public string GetNameAttribute(MemberInfo memberInfo) + { + var name = string.Empty; + var attribute = (JoinNameAttribute)CAttribute.GetCustomAttribute(memberInfo, typeof(JoinNameAttribute)); + + if (attribute == null) return name; + + name = attribute.Name; + Debug.Console(2, "JoinName Attribute value: {0}", name); + return name; + } + } + + + + [AttributeUsage(AttributeTargets.All)] + public class JoinNameAttribute : CAttribute + { + private string _Name; + + public JoinNameAttribute(string name) + { + Debug.Console(2, "Setting Attribute Name: {0}", name); + _Name = name; + } + + public string Name + { + get { return _Name; } + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/License/EssentialsLicenseManager.cs b/src/PepperDash.Essentials.Core/License/EssentialsLicenseManager.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/License/EssentialsLicenseManager.cs rename to src/PepperDash.Essentials.Core/License/EssentialsLicenseManager.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Lighting/Lighting Interfaces.cs b/src/PepperDash.Essentials.Core/Lighting/Lighting Interfaces.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Lighting/Lighting Interfaces.cs rename to src/PepperDash.Essentials.Core/Lighting/Lighting Interfaces.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Lighting/LightingBase.cs b/src/PepperDash.Essentials.Core/Lighting/LightingBase.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Lighting/LightingBase.cs rename to src/PepperDash.Essentials.Core/Lighting/LightingBase.cs index 48a4aa76..5bb677a2 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Lighting/LightingBase.cs +++ b/src/PepperDash.Essentials.Core/Lighting/LightingBase.cs @@ -1,167 +1,169 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; -using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Essentials.Core.Bridges; - -namespace PepperDash.Essentials.Core.Lighting -{ - public abstract class LightingBase : EssentialsBridgeableDevice, ILightingScenes - { - #region ILightingScenes Members - - public event EventHandler LightingSceneChange; - - public List LightingScenes { get; protected set; } - - public LightingScene CurrentLightingScene { get; protected set; } - - public IntFeedback CurrentLightingSceneFeedback { get; protected set; } - - #endregion - - protected LightingBase(string key, string name) - : base(key, name) - { - LightingScenes = new List(); - - CurrentLightingScene = new LightingScene(); - //CurrentLightingSceneFeedback = new IntFeedback(() => { return int.Parse(this.CurrentLightingScene.ID); }); - } - - public abstract void SelectScene(LightingScene scene); - - public void SimulateSceneSelect(string sceneName) - { - Debug.Console(1, this, "Simulating selection of scene '{0}'", sceneName); - - var scene = LightingScenes.FirstOrDefault(s => s.Name.Equals(sceneName)); - - if (scene != null) - { - CurrentLightingScene = scene; - OnLightingSceneChange(); - } - } - - /// - /// Sets the IsActive property on each scene and fires the LightingSceneChange event - /// - protected void OnLightingSceneChange() - { - foreach (var scene in LightingScenes) - { - if (scene == CurrentLightingScene) - scene.IsActive = true; - - else - scene.IsActive = false; - } - - var handler = LightingSceneChange; - if (handler != null) - { - handler(this, new LightingSceneChangeEventArgs(CurrentLightingScene)); - } - } - - protected GenericLightingJoinMap LinkLightingToApi(LightingBase lightingDevice, BasicTriList trilist, uint joinStart, - string joinMapKey, EiscApiAdvanced bridge) - { - var joinMap = new GenericLightingJoinMap(joinStart); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - if (bridge != null) - { - bridge.AddJoinMap(Key, joinMap); - } - else - { - Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); - } - - return LinkLightingToApi(lightingDevice, trilist, joinMap); - } - - protected GenericLightingJoinMap LinkLightingToApi(LightingBase lightingDevice, BasicTriList trilist, GenericLightingJoinMap joinMap) - { - Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - - Debug.Console(0, "Linking to Lighting Type {0}", lightingDevice.GetType().Name.ToString()); - - // GenericLighitng Actions & FeedBack - trilist.SetUShortSigAction(joinMap.SelectScene.JoinNumber, u => lightingDevice.SelectScene(lightingDevice.LightingScenes[u])); - - var sceneIndex = 0; - foreach (var scene in lightingDevice.LightingScenes) - { - var index = sceneIndex; - - trilist.SetSigTrueAction((uint)(joinMap.SelectSceneDirect.JoinNumber + index), () => lightingDevice.SelectScene(lightingDevice.LightingScenes[index])); - scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.SelectSceneDirect.JoinNumber + index)]); - trilist.StringInput[(uint)(joinMap.SelectSceneDirect.JoinNumber + index)].StringValue = scene.Name; - trilist.BooleanInput[(uint)(joinMap.ButtonVisibility.JoinNumber + index)].BoolValue = true; - - sceneIndex++; - } - - trilist.OnlineStatusChange += (sender, args) => - { - if (!args.DeviceOnLine) return; - - sceneIndex = 0; - foreach (var scene in lightingDevice.LightingScenes) - { - var index = sceneIndex; - - trilist.StringInput[(uint) (joinMap.SelectSceneDirect.JoinNumber + index)].StringValue = scene.Name; - trilist.BooleanInput[(uint) (joinMap.ButtonVisibility.JoinNumber + index)].BoolValue = true; - scene.IsActiveFeedback.FireUpdate(); - - sceneIndex++; - } - }; - - return joinMap; - } - } - - public class LightingScene - { - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string ID { get; set; } - bool _IsActive; - [JsonProperty("isActive", NullValueHandling = NullValueHandling.Ignore)] - public bool IsActive - { - get - { - return _IsActive; - } - set - { - _IsActive = value; - IsActiveFeedback.FireUpdate(); - } - } - - [JsonIgnore] - public BoolFeedback IsActiveFeedback { get; set; } - - public LightingScene() - { - IsActiveFeedback = new BoolFeedback(new Func(() => IsActive)); - } - } +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DeviceSupport; +using Full.Newtonsoft.Json; +using PepperDash.Core; +using PepperDash.Essentials.Core.Bridges; + +namespace PepperDash.Essentials.Core.Lighting +{ + public abstract class LightingBase : EssentialsBridgeableDevice, ILightingScenes + { + #region ILightingScenes Members + + public event EventHandler LightingSceneChange; + + public List LightingScenes { get; protected set; } + + public LightingScene CurrentLightingScene { get; protected set; } + + public IntFeedback CurrentLightingSceneFeedback { get; protected set; } + + #endregion + + protected LightingBase(string key, string name) + : base(key, name) + { + LightingScenes = new List(); + + CurrentLightingScene = new LightingScene(); + //CurrentLightingSceneFeedback = new IntFeedback(() => { return int.Parse(this.CurrentLightingScene.ID); }); + } + + public abstract void SelectScene(LightingScene scene); + + public void SimulateSceneSelect(string sceneName) + { + Debug.Console(1, this, "Simulating selection of scene '{0}'", sceneName); + + var scene = LightingScenes.FirstOrDefault(s => s.Name.Equals(sceneName)); + + if (scene != null) + { + CurrentLightingScene = scene; + OnLightingSceneChange(); + } + } + + /// + /// Sets the IsActive property on each scene and fires the LightingSceneChange event + /// + protected void OnLightingSceneChange() + { + foreach (var scene in LightingScenes) + { + if (scene == CurrentLightingScene) + scene.IsActive = true; + + else + scene.IsActive = false; + } + + var handler = LightingSceneChange; + if (handler != null) + { + handler(this, new LightingSceneChangeEventArgs(CurrentLightingScene)); + } + } + + protected GenericLightingJoinMap LinkLightingToApi(LightingBase lightingDevice, BasicTriList trilist, uint joinStart, + string joinMapKey, EiscApiAdvanced bridge) + { + var joinMap = new GenericLightingJoinMap(joinStart); + + var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); + + if (bridge != null) + { + bridge.AddJoinMap(Key, joinMap); + } + else + { + Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); + } + + return LinkLightingToApi(lightingDevice, trilist, joinMap); + } + + protected GenericLightingJoinMap LinkLightingToApi(LightingBase lightingDevice, BasicTriList trilist, GenericLightingJoinMap joinMap) + { + Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); + + Debug.Console(0, "Linking to Lighting Type {0}", lightingDevice.GetType().Name.ToString()); + + // GenericLighitng Actions & FeedBack + trilist.SetUShortSigAction(joinMap.SelectScene.JoinNumber, u => lightingDevice.SelectScene(lightingDevice.LightingScenes[u])); + + var sceneIndex = 0; + foreach (var scene in lightingDevice.LightingScenes) + { + var index = sceneIndex; + + trilist.SetSigTrueAction((uint)(joinMap.SelectSceneDirect.JoinNumber + index), () => lightingDevice.SelectScene(lightingDevice.LightingScenes[index])); + scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.SelectSceneDirect.JoinNumber + index)]); + trilist.StringInput[(uint)(joinMap.SelectSceneDirect.JoinNumber + index)].StringValue = scene.Name; + trilist.BooleanInput[(uint)(joinMap.ButtonVisibility.JoinNumber + index)].BoolValue = true; + + sceneIndex++; + } + + trilist.OnlineStatusChange += (sender, args) => + { + if (!args.DeviceOnLine) return; + + sceneIndex = 0; + foreach (var scene in lightingDevice.LightingScenes) + { + var index = sceneIndex; + + trilist.StringInput[(uint) (joinMap.SelectSceneDirect.JoinNumber + index)].StringValue = scene.Name; + trilist.BooleanInput[(uint) (joinMap.ButtonVisibility.JoinNumber + index)].BoolValue = true; + scene.IsActiveFeedback.FireUpdate(); + + sceneIndex++; + } + }; + + return joinMap; + } + } + + public class LightingScene + { + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] + public string ID { get; set; } + bool _IsActive; + [JsonProperty("isActive", NullValueHandling = NullValueHandling.Ignore)] + public bool IsActive + { + get + { + return _IsActive; + } + set + { + _IsActive = value; + IsActiveFeedback.FireUpdate(); + } + } + + [JsonIgnore] + public BoolFeedback IsActiveFeedback { get; set; } + + public LightingScene() + { + IsActiveFeedback = new BoolFeedback(new Func(() => IsActive)); + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Microphone Privacy/MicrophonePrivacyController.cs b/src/PepperDash.Essentials.Core/Microphone Privacy/MicrophonePrivacyController.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Microphone Privacy/MicrophonePrivacyController.cs rename to src/PepperDash.Essentials.Core/Microphone Privacy/MicrophonePrivacyController.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Microphone Privacy/MicrophonePrivacyControllerConfig.cs b/src/PepperDash.Essentials.Core/Microphone Privacy/MicrophonePrivacyControllerConfig.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Microphone Privacy/MicrophonePrivacyControllerConfig.cs rename to src/PepperDash.Essentials.Core/Microphone Privacy/MicrophonePrivacyControllerConfig.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Monitoring/CrestronGenericBaseCommunicationMonitor.cs b/src/PepperDash.Essentials.Core/Monitoring/CrestronGenericBaseCommunicationMonitor.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Monitoring/CrestronGenericBaseCommunicationMonitor.cs rename to src/PepperDash.Essentials.Core/Monitoring/CrestronGenericBaseCommunicationMonitor.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Monitoring/GenericCommunicationMonitor.cs b/src/PepperDash.Essentials.Core/Monitoring/GenericCommunicationMonitor.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Monitoring/GenericCommunicationMonitor.cs rename to src/PepperDash.Essentials.Core/Monitoring/GenericCommunicationMonitor.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Monitoring/Interfaces.cs b/src/PepperDash.Essentials.Core/Monitoring/Interfaces.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Monitoring/Interfaces.cs rename to src/PepperDash.Essentials.Core/Monitoring/Interfaces.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Monitoring/StatusMonitorBase.cs b/src/PepperDash.Essentials.Core/Monitoring/StatusMonitorBase.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Monitoring/StatusMonitorBase.cs rename to src/PepperDash.Essentials.Core/Monitoring/StatusMonitorBase.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Monitoring/StatusMonitorCollection.cs b/src/PepperDash.Essentials.Core/Monitoring/StatusMonitorCollection.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Monitoring/StatusMonitorCollection.cs rename to src/PepperDash.Essentials.Core/Monitoring/StatusMonitorCollection.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Monitoring/SystemMonitorController.cs b/src/PepperDash.Essentials.Core/Monitoring/SystemMonitorController.cs similarity index 97% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Monitoring/SystemMonitorController.cs rename to src/PepperDash.Essentials.Core/Monitoring/SystemMonitorController.cs index 056686b1..b9d25127 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Monitoring/SystemMonitorController.cs +++ b/src/PepperDash.Essentials.Core/Monitoring/SystemMonitorController.cs @@ -1,757 +1,759 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.Diagnostics; -using PepperDash.Core; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PepperDash.Essentials.Core.Bridges; - -namespace PepperDash.Essentials.Core.Monitoring -{ - /// - /// Wrapper for the static SystemMonitor class to extend functionality and provide external access - /// to SystemMonitor via APIs - /// - public class SystemMonitorController : EssentialsBridgeableDevice - { - private const long UptimePollTime = 300000; - private CTimer _uptimePollTimer; - - private string _uptime; - private string _lastStart; - - public event EventHandler SystemMonitorPropertiesChanged; - - public Dictionary ProgramStatusFeedbackCollection; - public Dictionary EthernetStatusFeedbackCollection; - - public IntFeedback TimeZoneFeedback { get; protected set; } - public StringFeedback TimeZoneTextFeedback { get; protected set; } - - public StringFeedback IoControllerVersionFeedback { get; protected set; } - public StringFeedback SnmpVersionFeedback { get; protected set; } - public StringFeedback BaCnetAppVersionFeedback { get; protected set; } - public StringFeedback ControllerVersionFeedback { get; protected set; } - - //new feedbacks. Issue #50 - public StringFeedback SerialNumberFeedback { get; protected set; } - public StringFeedback ModelFeedback { get; set; } - - public StringFeedback UptimeFeedback { get; set; } - public StringFeedback LastStartFeedback { get; set; } - - public SystemMonitorController(string key) - : base(key) - { - Debug.Console(2, this, "Adding SystemMonitorController."); - - SystemMonitor.ProgramInitialization.ProgramInitializationUnderUserControl = true; - - TimeZoneFeedback = new IntFeedback(() => SystemMonitor.TimeZoneInformation.TimeZoneNumber); - TimeZoneTextFeedback = new StringFeedback(() => SystemMonitor.TimeZoneInformation.TimeZoneName); - - IoControllerVersionFeedback = new StringFeedback(() => SystemMonitor.VersionInformation.IOPVersion); - SnmpVersionFeedback = new StringFeedback(() => SystemMonitor.VersionInformation.SNMPVersion); - BaCnetAppVersionFeedback = new StringFeedback(() => SystemMonitor.VersionInformation.BACNetVersion); - ControllerVersionFeedback = new StringFeedback(() => SystemMonitor.VersionInformation.ControlSystemVersion); - - SerialNumberFeedback = new StringFeedback(() => CrestronEnvironment.SystemInfo.SerialNumber); - ModelFeedback = new StringFeedback(() => InitialParametersClass.ControllerPromptName); - UptimeFeedback = new StringFeedback(() => _uptime); - LastStartFeedback = new StringFeedback(()=> _lastStart); - - ProgramStatusFeedbackCollection = new Dictionary(); - - foreach (var prog in SystemMonitor.ProgramCollection) - { - var program = new ProgramStatusFeedbacks(prog); - ProgramStatusFeedbackCollection.Add(prog.Number, program); - } - - CreateEthernetStatusFeedbacks(); - UpdateEthernetStatusFeeedbacks(); - - _uptimePollTimer = new CTimer(PollUptime,null,0, UptimePollTime); - - SystemMonitor.ProgramChange += SystemMonitor_ProgramChange; - SystemMonitor.TimeZoneInformation.TimeZoneChange += TimeZoneInformation_TimeZoneChange; - CrestronEnvironment.EthernetEventHandler += CrestronEnvironmentOnEthernetEventHandler; - CrestronEnvironment.ProgramStatusEventHandler += CrestronEnvironmentOnProgramStatusEventHandler; - } - - private void CrestronEnvironmentOnProgramStatusEventHandler(eProgramStatusEventType programEventType) - { - if (programEventType != eProgramStatusEventType.Stopping) return; - - _uptimePollTimer.Stop(); - _uptimePollTimer.Dispose(); - _uptimePollTimer = null; - } - - private void PollUptime(object obj) - { - var consoleResponse = string.Empty; - - CrestronConsole.SendControlSystemCommand("uptime", ref consoleResponse); - - ParseUptime(consoleResponse); - - UptimeFeedback.FireUpdate(); - LastStartFeedback.FireUpdate(); - } - - private void ParseUptime(string response) - { - var splitString = response.Trim().Split('\r', '\n'); - - var lastStartRaw = splitString.FirstOrDefault(o => o.Contains("started")); - var uptimeRaw = splitString.FirstOrDefault(o => o.Contains("running")); - - if (!String.IsNullOrEmpty(lastStartRaw)) - { - var lastStartIndex = lastStartRaw.IndexOf(':'); - _lastStart = lastStartRaw.Substring(lastStartIndex + 1).Trim(); - } - - if (String.IsNullOrEmpty(uptimeRaw)) return; - var forIndex = uptimeRaw.IndexOf("for", StringComparison.Ordinal); - - //4 => "for " to get what's on the right - _uptime = uptimeRaw.Substring(forIndex + 4); - } - - private void CrestronEnvironmentOnEthernetEventHandler(EthernetEventArgs ethernetEventArgs) - { - if (ethernetEventArgs.EthernetEventType != eEthernetEventType.LinkUp) return; - - foreach (var fb in EthernetStatusFeedbackCollection) - { - fb.Value.UpdateEthernetStatus(); - } - } - - private void CreateEthernetStatusFeedbacks() - { - EthernetStatusFeedbackCollection = new Dictionary(); - - Debug.Console(2, "Creating {0} EthernetStatusFeedbacks", InitialParametersClass.NumberOfEthernetInterfaces); - - for (short i = 0; i < InitialParametersClass.NumberOfEthernetInterfaces; i++) - { - Debug.Console(2, "Creating EthernetStatusFeedback for Interface {0}", i); - var ethernetInterface = new EthernetStatusFeedbacks(i); - EthernetStatusFeedbackCollection.Add(i, ethernetInterface); - } - } - - private void UpdateEthernetStatusFeeedbacks() - { - foreach (var iface in EthernetStatusFeedbackCollection) - { - iface.Value.CurrentIpAddressFeedback.FireUpdate(); - iface.Value.CurrentSubnetMaskFeedback.FireUpdate(); - iface.Value.CurrentDefaultGatewayFeedback.FireUpdate(); - iface.Value.StaticIpAddressFeedback.FireUpdate(); - iface.Value.StaticSubnetMaskFeedback.FireUpdate(); - iface.Value.StaticDefaultGatewayFeedback.FireUpdate(); - iface.Value.HostNameFeedback.FireUpdate(); - iface.Value.DnsServerFeedback.FireUpdate(); - iface.Value.DomainFeedback.FireUpdate(); - iface.Value.DhcpStatusFeedback.FireUpdate(); - iface.Value.MacAddressFeedback.FireUpdate(); - } - } - - /// - /// Gets data in separate thread - /// - private void RefreshSystemMonitorData() - { - // this takes a while, launch a new thread - CrestronInvoke.BeginInvoke(UpdateFeedback); - } - - private void UpdateFeedback(object o) - { - TimeZoneFeedback.FireUpdate(); - TimeZoneTextFeedback.FireUpdate(); - IoControllerVersionFeedback.FireUpdate(); - SnmpVersionFeedback.FireUpdate(); - BaCnetAppVersionFeedback.FireUpdate(); - ControllerVersionFeedback.FireUpdate(); - SerialNumberFeedback.FireUpdate(); - ModelFeedback.FireUpdate(); - - OnSystemMonitorPropertiesChanged(); - } - - private void OnSystemMonitorPropertiesChanged() - { - var handler = SystemMonitorPropertiesChanged; - if (handler != null) - { - handler(this, new EventArgs()); - } - } - - public override bool CustomActivate() - { - RefreshSystemMonitorData(); - - return base.CustomActivate(); - } - - public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - var joinMap = new SystemMonitorJoinMap(joinStart); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - if (bridge != null) - { - bridge.AddJoinMap(Key, joinMap); - } - else - { - Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); - } - - Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - Debug.Console(2, this, "Linking API starting at join: {0}", joinStart); - - TimeZoneFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeZone.JoinNumber]); - TimeZoneTextFeedback.LinkInputSig(trilist.StringInput[joinMap.TimeZoneName.JoinNumber]); - - IoControllerVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.IOControllerVersion.JoinNumber]); - SnmpVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.SnmpAppVersion.JoinNumber]); - BaCnetAppVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.BACnetAppVersion.JoinNumber]); - ControllerVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.ControllerVersion.JoinNumber]); - SerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.SerialNumber.JoinNumber]); - ModelFeedback.LinkInputSig(trilist.StringInput[joinMap.Model.JoinNumber]); - UptimeFeedback.LinkInputSig(trilist.StringInput[joinMap.Uptime.JoinNumber]); - LastStartFeedback.LinkInputSig(trilist.StringInput[joinMap.LastBoot.JoinNumber]); - - // iterate the program status feedback collection and map all the joins - LinkProgramInfoJoins(this, trilist, joinMap); - - LinkEthernetInfoJoins(this, trilist, joinMap); - } - - private static void LinkEthernetInfoJoins(SystemMonitorController systemMonitorController, BasicTriList trilist, SystemMonitorJoinMap joinMap) - { - uint ethernetSlotJoinStart = 0; - foreach (var fb in systemMonitorController.EthernetStatusFeedbackCollection) - { - fb.Value.CurrentIpAddressFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.CurrentIpAddress.JoinNumber]); - fb.Value.CurrentSubnetMaskFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.CurrentSubnetMask.JoinNumber]); - fb.Value.CurrentDefaultGatewayFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.CurrentDefaultGateway.JoinNumber]); - fb.Value.StaticIpAddressFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.StaticIpAddress.JoinNumber]); - fb.Value.StaticSubnetMaskFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.StaticSubnetMask.JoinNumber]); - fb.Value.StaticDefaultGatewayFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.StaticDefaultGateway.JoinNumber]); - fb.Value.HostNameFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.HostName.JoinNumber]); - fb.Value.MacAddressFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.MacAddress.JoinNumber]); - fb.Value.DomainFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.Domain.JoinNumber]); - fb.Value.DnsServerFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.DnsServer.JoinNumber]); - fb.Value.DhcpStatusFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.DhcpStatus.JoinNumber]); - - ethernetSlotJoinStart += joinMap.EthernetOffsetJoin.JoinNumber; - } - } - - private static void LinkProgramInfoJoins(SystemMonitorController systemMonitorController, BasicTriList trilist, - SystemMonitorJoinMap joinMap) - { - uint programSlotJoinStart = 0; - - foreach (var p in systemMonitorController.ProgramStatusFeedbackCollection) - { - var programNumber = p.Value.Program.Number; - - trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramStart.JoinNumber, - b => SystemMonitor.ProgramCollection[programNumber].OperatingState = eProgramOperatingState.Start); - p.Value.ProgramStartedFeedback.LinkInputSig(trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramStart.JoinNumber]); - - trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramStop.JoinNumber, - b => SystemMonitor.ProgramCollection[programNumber].OperatingState = eProgramOperatingState.Stop); - p.Value.ProgramStoppedFeedback.LinkInputSig(trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramStop.JoinNumber]); - - trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramRegister.JoinNumber, - b => SystemMonitor.ProgramCollection[programNumber].RegistrationState = eProgramRegistrationState.Register); - p.Value.ProgramRegisteredFeedback.LinkInputSig( - trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramRegister.JoinNumber]); - - trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramUnregister.JoinNumber, - b => SystemMonitor.ProgramCollection[programNumber].RegistrationState = eProgramRegistrationState.Unregister); - p.Value.ProgramUnregisteredFeedback.LinkInputSig( - trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramUnregister.JoinNumber]); - - p.Value.ProgramNameFeedback.LinkInputSig(trilist.StringInput[programSlotJoinStart + joinMap.ProgramName.JoinNumber]); - p.Value.ProgramCompileTimeFeedback.LinkInputSig( - trilist.StringInput[programSlotJoinStart + joinMap.ProgramCompiledTime.JoinNumber]); - p.Value.CrestronDataBaseVersionFeedback.LinkInputSig( - trilist.StringInput[programSlotJoinStart + joinMap.ProgramCrestronDatabaseVersion.JoinNumber]); - p.Value.EnvironmentVersionFeedback.LinkInputSig( - trilist.StringInput[programSlotJoinStart + joinMap.ProgramEnvironmentVersion.JoinNumber]); - p.Value.AggregatedProgramInfoFeedback.LinkInputSig( - trilist.StringInput[programSlotJoinStart + joinMap.AggregatedProgramInfo.JoinNumber]); - - programSlotJoinStart = programSlotJoinStart + joinMap.ProgramOffsetJoin.JoinSpan; - } - } - - //// Sets the time zone - //public void SetTimeZone(int timeZone) - //{ - // SystemMonitor.TimeZoneInformation.TimeZoneNumber = timeZone; - //} - - /// - /// Responds to program change events and triggers the appropriate feedbacks to update - /// - /// - /// - private void SystemMonitor_ProgramChange(Program sender, ProgramEventArgs args) - { - Debug.Console(2, this, "Program Change Detected for slot: {0}", sender.Number); - Debug.Console(2, this, "Event Type: {0}", args.EventType); - - var program = ProgramStatusFeedbackCollection[sender.Number]; - - switch (args.EventType) - { - case eProgramChangeEventType.OperatingState: - program.ProgramStartedFeedback.FireUpdate(); - program.ProgramStoppedFeedback.FireUpdate(); - program.ProgramInfo.OperatingState = args.OperatingState; - if (args.OperatingState == eProgramOperatingState.Start) - program.GetProgramInfo(); - else - { - program.AggregatedProgramInfoFeedback.FireUpdate(); - program.OnProgramInfoChanged(); - } - break; - case eProgramChangeEventType.RegistrationState: - program.ProgramRegisteredFeedback.FireUpdate(); - program.ProgramUnregisteredFeedback.FireUpdate(); - program.ProgramInfo.RegistrationState = args.RegistrationState; - program.GetProgramInfo(); - break; - } - } - - /// - /// Responds to time zone changes and updates the appropriate feedbacks - /// - /// - private void TimeZoneInformation_TimeZoneChange(TimeZoneEventArgs args) - { - Debug.Console(2, this, "Time Zone Change Detected."); - TimeZoneFeedback.FireUpdate(); - TimeZoneTextFeedback.FireUpdate(); - - OnSystemMonitorPropertiesChanged(); - } - - public class EthernetStatusFeedbacks - { - public StringFeedback HostNameFeedback { get; protected set; } - public StringFeedback DnsServerFeedback { get; protected set; } - public StringFeedback DomainFeedback { get; protected set; } - public StringFeedback MacAddressFeedback { get; protected set; } - public StringFeedback DhcpStatusFeedback { get; protected set; } - - public StringFeedback CurrentIpAddressFeedback { get; protected set; } - public StringFeedback CurrentSubnetMaskFeedback { get; protected set; } - public StringFeedback CurrentDefaultGatewayFeedback { get; protected set; } - - public StringFeedback StaticIpAddressFeedback { get; protected set; } - public StringFeedback StaticSubnetMaskFeedback { get; protected set; } - public StringFeedback StaticDefaultGatewayFeedback { get; protected set; } - - public EthernetStatusFeedbacks(short adapterIndex) - { - Debug.Console(2, "Ethernet Information for interface {0}", adapterIndex); - Debug.Console(2, "Adapter Index: {1} Hostname: {0}", CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_HOSTNAME, adapterIndex), adapterIndex); - Debug.Console(2, "Adapter Index: {1} Current IP Address: {0}", CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, adapterIndex), adapterIndex); - Debug.Console(2, "Adapter Index: {1} Current Subnet Mask: {0}", CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_MASK, adapterIndex), adapterIndex); - Debug.Console(2, "Adapter Index: {1} Current Router: {0}", CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_ROUTER, adapterIndex), adapterIndex); - Debug.Console(2, "Adapter Index: {1} Static IP Address: {0}", CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_STATIC_IPADDRESS, adapterIndex), adapterIndex); - Debug.Console(2, "Adapter Index: {1} Static Subnet Mask: {0}", CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_STATIC_IPMASK, adapterIndex), adapterIndex); - Debug.Console(2, "Adapter Index: {1} Static Router: {0}", CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_STATIC_ROUTER, adapterIndex), adapterIndex); - Debug.Console(2, "Adapter Index: {1} DNS Servers: {0}", CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_DNS_SERVER, adapterIndex), adapterIndex); - Debug.Console(2, "Adapter Index: {1} DHCP State: {0}", CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_DHCP_STATE, adapterIndex), adapterIndex); - Debug.Console(2, "Adapter Index: {1} Domain Name: {0}", CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_DOMAIN_NAME, adapterIndex), adapterIndex); - Debug.Console(2, "Adapter Index: {1} MAC Address: {0}", CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_MAC_ADDRESS, adapterIndex), adapterIndex); - HostNameFeedback = - new StringFeedback( - () => - CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_HOSTNAME, adapterIndex)); - - CurrentIpAddressFeedback = - new StringFeedback( - () => - CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, adapterIndex)); - CurrentDefaultGatewayFeedback = - new StringFeedback( - () => - CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_ROUTER, adapterIndex)); - CurrentSubnetMaskFeedback = - new StringFeedback( - () => - CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_MASK, adapterIndex)); - StaticIpAddressFeedback = - new StringFeedback( - () => - CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, adapterIndex)); - StaticDefaultGatewayFeedback = - new StringFeedback( - () => - CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_ROUTER, adapterIndex)); - StaticSubnetMaskFeedback = - new StringFeedback( - () => - CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_MASK, adapterIndex)); - DomainFeedback = - new StringFeedback( - () => - CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_DOMAIN_NAME, adapterIndex)); - DnsServerFeedback = - new StringFeedback( - () => - CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_DNS_SERVER, adapterIndex)); - MacAddressFeedback = - new StringFeedback( - () => - CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_MAC_ADDRESS, adapterIndex)); - - DhcpStatusFeedback = new StringFeedback( - () => - CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_DHCP_STATE, adapterIndex)); - } - - public void UpdateEthernetStatus() - { - HostNameFeedback.FireUpdate(); - CurrentIpAddressFeedback.FireUpdate(); - CurrentSubnetMaskFeedback.FireUpdate(); - CurrentDefaultGatewayFeedback.FireUpdate(); - StaticIpAddressFeedback.FireUpdate(); - StaticSubnetMaskFeedback.FireUpdate(); - StaticDefaultGatewayFeedback.FireUpdate(); - DomainFeedback.FireUpdate(); - DnsServerFeedback.FireUpdate(); - MacAddressFeedback.FireUpdate(); - DhcpStatusFeedback.FireUpdate(); - } - } - - - public class ProgramStatusFeedbacks - { - public event EventHandler ProgramInfoChanged; - - public Program Program; - - public ProgramInfo ProgramInfo { get; set; } - - public BoolFeedback ProgramStartedFeedback; - public BoolFeedback ProgramStoppedFeedback; - public BoolFeedback ProgramRegisteredFeedback; - public BoolFeedback ProgramUnregisteredFeedback; - - public StringFeedback ProgramNameFeedback; - public StringFeedback ProgramCompileTimeFeedback; - public StringFeedback CrestronDataBaseVersionFeedback; - // SIMPL windows version - public StringFeedback EnvironmentVersionFeedback; - public StringFeedback AggregatedProgramInfoFeedback; - - public ProgramStatusFeedbacks(Program program) - { - ProgramInfo = new ProgramInfo(program.Number); - - Program = program; - - ProgramInfo.OperatingState = Program.OperatingState; - ProgramInfo.RegistrationState = Program.RegistrationState; - - ProgramStartedFeedback = new BoolFeedback(() => Program.OperatingState == eProgramOperatingState.Start); - ProgramStartedFeedback.FireUpdate(); - - ProgramStoppedFeedback = new BoolFeedback(() => Program.OperatingState == eProgramOperatingState.Stop); - ProgramStoppedFeedback.FireUpdate(); - - ProgramRegisteredFeedback = - new BoolFeedback(() => Program.RegistrationState == eProgramRegistrationState.Register); - ProgramRegisteredFeedback.FireUpdate(); - - ProgramUnregisteredFeedback = - new BoolFeedback(() => Program.RegistrationState == eProgramRegistrationState.Unregister); - ProgramUnregisteredFeedback.FireUpdate(); - - ProgramNameFeedback = new StringFeedback(() => ProgramInfo.ProgramFile); - ProgramCompileTimeFeedback = new StringFeedback(() => ProgramInfo.CompileTime); - CrestronDataBaseVersionFeedback = new StringFeedback(() => ProgramInfo.CrestronDb); - EnvironmentVersionFeedback = new StringFeedback(() => ProgramInfo.Environment); - AggregatedProgramInfoFeedback = new StringFeedback(() => JsonConvert.SerializeObject(ProgramInfo)); - - GetProgramInfo(); - } - - /// - /// Retrieves information about a running program - /// - public void GetProgramInfo() - { - CrestronInvoke.BeginInvoke(GetProgramInfo); - } - - private void GetProgramInfo(object o) - { - Debug.Console(2, "Attempting to get program info for slot: {0}", Program.Number); - - string response = null; - - if (Program.RegistrationState == eProgramRegistrationState.Unregister || Program.OperatingState == eProgramOperatingState.Stop) - { - Debug.Console(2, "Program {0} not registered. Setting default values for program information.", - Program.Number); - - ProgramInfo = new ProgramInfo(Program.Number) - { - OperatingState = Program.OperatingState, - RegistrationState = Program.RegistrationState - }; - - return; - } - - var success = CrestronConsole.SendControlSystemCommand( - string.Format("progcomments:{0}", Program.Number), ref response); - - if (!success) - { - Debug.Console(2, "Progcomments Attempt Unsuccessful for slot: {0}", Program.Number); - UpdateFeedbacks(); - return; - } - - if (response.ToLower().Contains("bad or incomplete")) - { - Debug.Console(2, - "Program in slot {0} not running. Setting default ProgramInfo for slot: {0}", - Program.Number); - - // Assume no valid program info. Constructing a new object will wipe all properties - ProgramInfo = new ProgramInfo(Program.Number) - { - OperatingState = Program.OperatingState, - RegistrationState = Program.RegistrationState - }; - - UpdateFeedbacks(); - - return; - } - - - // Shared properteis - ProgramInfo.ProgramFile = ParseConsoleData(response, "Program File", ": ", "\n"); - ProgramInfo.CompilerRevision = ParseConsoleData(response, "Compiler Rev", ": ", "\n"); - ProgramInfo.CompileTime = ParseConsoleData(response, "Compiled On", ": ", "\n"); - ProgramInfo.Include4Dat = ParseConsoleData(response, "Include4.dat", ": ", "\n"); - - - if (ProgramInfo.ProgramFile.Contains(".dll")) - { - // SSP Program - ProgramInfo.FriendlyName = ParseConsoleData(response, "Friendly Name", ": ", "\n"); - ProgramInfo.ApplicationName = ParseConsoleData(response, "Application Name", ": ", "\n"); - ProgramInfo.ProgramTool = ParseConsoleData(response, "Program Tool", ": ", "\n"); - ProgramInfo.MinFirmwareVersion = ParseConsoleData(response, "Min Firmware Version", ": ", - "\n"); - ProgramInfo.PlugInVersion = ParseConsoleData(response, "PlugInVersion", ": ", "\n"); - } - else if (ProgramInfo.ProgramFile.Contains(".smw")) - { - // SIMPL Windows Program - ProgramInfo.FriendlyName = ParseConsoleData(response, "Friendly Name", ":", "\n"); - ProgramInfo.SystemName = ParseConsoleData(response, "System Name", ": ", "\n"); - ProgramInfo.CrestronDb = ParseConsoleData(response, "CrestronDB", ": ", "\n"); - ProgramInfo.Environment = ParseConsoleData(response, "Source Env", ": ", "\n"); - ProgramInfo.Programmer = ParseConsoleData(response, "Programmer", ": ", "\n"); - } - Debug.Console(2, "Program info for slot {0} successfully updated", Program.Number); - - UpdateFeedbacks(); - } - - private void UpdateFeedbacks() - { - ProgramNameFeedback.FireUpdate(); - ProgramCompileTimeFeedback.FireUpdate(); - CrestronDataBaseVersionFeedback.FireUpdate(); - EnvironmentVersionFeedback.FireUpdate(); - - AggregatedProgramInfoFeedback.FireUpdate(); - - OnProgramInfoChanged(); - } - - public void OnProgramInfoChanged() - { - //Debug.Console(1, "Firing ProgramInfoChanged for slot: {0}", Program.Number); - var handler = ProgramInfoChanged; - if (handler != null) - { - handler(this, new ProgramInfoEventArgs(ProgramInfo)); - } - } - - private string ParseConsoleData(string data, string line, string startString, string endString) - { - var outputData = ""; - - if (data.Length <= 0) return outputData; - - try - { - //Debug.Console(2, "ParseConsoleData Data: {0}, Line {1}, startStirng {2}, endString {3}", data, line, startString, endString); - var linePosition = data.IndexOf(line, StringComparison.Ordinal); - var startPosition = data.IndexOf(startString, linePosition, StringComparison.Ordinal) + - startString.Length; - var endPosition = data.IndexOf(endString, startPosition, StringComparison.Ordinal); - outputData = data.Substring(startPosition, endPosition - startPosition).Trim(); - //Debug.Console(2, "ParseConsoleData Return: {0}", outputData); - } - catch (Exception e) - { - Debug.Console(1, "Error Parsing Console Data:\r{0}", e); - } - - return outputData; - } - } - } - - /// - /// Class for serializing program slot information - /// - public class ProgramInfo - { - // Shared properties - - [JsonProperty("programNumber")] - public uint ProgramNumber { get; private set; } - - [JsonConverter(typeof (StringEnumConverter))] - [JsonProperty("operatingState")] - public eProgramOperatingState OperatingState { get; set; } - - [JsonConverter(typeof (StringEnumConverter))] - [JsonProperty("registrationState")] - public eProgramRegistrationState RegistrationState { get; set; } - - [JsonProperty("programFile")] - public string ProgramFile { get; set; } - - [JsonProperty("friendlyName")] - public string FriendlyName { get; set; } - - [JsonProperty("compilerRevision")] - public string CompilerRevision { get; set; } - - [JsonProperty("compileTime")] - public string CompileTime { get; set; } - - [JsonProperty("include4Dat")] - public string Include4Dat { get; set; } - - // SIMPL Windows properties - [JsonProperty("systemName")] - public string SystemName { get; set; } - - [JsonProperty("crestronDb")] - public string CrestronDb { get; set; } - - [JsonProperty("environment")] - public string Environment { get; set; } - - [JsonProperty("programmer")] - public string Programmer { get; set; } - - - // SSP Properties - [JsonProperty("applicationName")] - public string ApplicationName { get; set; } - - [JsonProperty("programTool")] - public string ProgramTool { get; set; } - - [JsonProperty("minFirmwareVersion")] - public string MinFirmwareVersion { get; set; } - - [JsonProperty("plugInVersion")] - public string PlugInVersion { get; set; } - - public ProgramInfo(uint number) - { - ProgramNumber = number; - - ProgramFile = ""; - FriendlyName = ""; - CompilerRevision = ""; - CompileTime = ""; - Include4Dat = ""; - - SystemName = ""; - CrestronDb = ""; - Environment = ""; - Programmer = ""; - - ApplicationName = ""; - ProgramTool = ""; - MinFirmwareVersion = ""; - PlugInVersion = ""; - } - } - - public class ProgramInfoEventArgs : EventArgs - { - public ProgramInfo ProgramInfo; - - public ProgramInfoEventArgs(ProgramInfo progInfo) - { - ProgramInfo = progInfo; - } - } +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.Diagnostics; +using PepperDash.Core; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Converters; +using PepperDash.Essentials.Core.Bridges; + +namespace PepperDash.Essentials.Core.Monitoring +{ + /// + /// Wrapper for the static SystemMonitor class to extend functionality and provide external access + /// to SystemMonitor via APIs + /// + public class SystemMonitorController : EssentialsBridgeableDevice + { + private const long UptimePollTime = 300000; + private CTimer _uptimePollTimer; + + private string _uptime; + private string _lastStart; + + public event EventHandler SystemMonitorPropertiesChanged; + + public Dictionary ProgramStatusFeedbackCollection; + public Dictionary EthernetStatusFeedbackCollection; + + public IntFeedback TimeZoneFeedback { get; protected set; } + public StringFeedback TimeZoneTextFeedback { get; protected set; } + + public StringFeedback IoControllerVersionFeedback { get; protected set; } + public StringFeedback SnmpVersionFeedback { get; protected set; } + public StringFeedback BaCnetAppVersionFeedback { get; protected set; } + public StringFeedback ControllerVersionFeedback { get; protected set; } + + //new feedbacks. Issue #50 + public StringFeedback SerialNumberFeedback { get; protected set; } + public StringFeedback ModelFeedback { get; set; } + + public StringFeedback UptimeFeedback { get; set; } + public StringFeedback LastStartFeedback { get; set; } + + public SystemMonitorController(string key) + : base(key) + { + Debug.Console(2, this, "Adding SystemMonitorController."); + + SystemMonitor.ProgramInitialization.ProgramInitializationUnderUserControl = true; + + TimeZoneFeedback = new IntFeedback(() => SystemMonitor.TimeZoneInformation.TimeZoneNumber); + TimeZoneTextFeedback = new StringFeedback(() => SystemMonitor.TimeZoneInformation.TimeZoneName); + + IoControllerVersionFeedback = new StringFeedback(() => SystemMonitor.VersionInformation.IOPVersion); + SnmpVersionFeedback = new StringFeedback(() => SystemMonitor.VersionInformation.SNMPVersion); + BaCnetAppVersionFeedback = new StringFeedback(() => SystemMonitor.VersionInformation.BACNetVersion); + ControllerVersionFeedback = new StringFeedback(() => SystemMonitor.VersionInformation.ControlSystemVersion); + + SerialNumberFeedback = new StringFeedback(() => CrestronEnvironment.SystemInfo.SerialNumber); + ModelFeedback = new StringFeedback(() => InitialParametersClass.ControllerPromptName); + UptimeFeedback = new StringFeedback(() => _uptime); + LastStartFeedback = new StringFeedback(()=> _lastStart); + + ProgramStatusFeedbackCollection = new Dictionary(); + + foreach (var prog in SystemMonitor.ProgramCollection) + { + var program = new ProgramStatusFeedbacks(prog); + ProgramStatusFeedbackCollection.Add(prog.Number, program); + } + + CreateEthernetStatusFeedbacks(); + UpdateEthernetStatusFeeedbacks(); + + _uptimePollTimer = new CTimer(PollUptime,null,0, UptimePollTime); + + SystemMonitor.ProgramChange += SystemMonitor_ProgramChange; + SystemMonitor.TimeZoneInformation.TimeZoneChange += TimeZoneInformation_TimeZoneChange; + CrestronEnvironment.EthernetEventHandler += CrestronEnvironmentOnEthernetEventHandler; + CrestronEnvironment.ProgramStatusEventHandler += CrestronEnvironmentOnProgramStatusEventHandler; + } + + private void CrestronEnvironmentOnProgramStatusEventHandler(eProgramStatusEventType programEventType) + { + if (programEventType != eProgramStatusEventType.Stopping) return; + + _uptimePollTimer.Stop(); + _uptimePollTimer.Dispose(); + _uptimePollTimer = null; + } + + private void PollUptime(object obj) + { + var consoleResponse = string.Empty; + + CrestronConsole.SendControlSystemCommand("uptime", ref consoleResponse); + + ParseUptime(consoleResponse); + + UptimeFeedback.FireUpdate(); + LastStartFeedback.FireUpdate(); + } + + private void ParseUptime(string response) + { + var splitString = response.Trim().Split('\r', '\n'); + + var lastStartRaw = splitString.FirstOrDefault(o => o.Contains("started")); + var uptimeRaw = splitString.FirstOrDefault(o => o.Contains("running")); + + if (!String.IsNullOrEmpty(lastStartRaw)) + { + var lastStartIndex = lastStartRaw.IndexOf(':'); + _lastStart = lastStartRaw.Substring(lastStartIndex + 1).Trim(); + } + + if (String.IsNullOrEmpty(uptimeRaw)) return; + var forIndex = uptimeRaw.IndexOf("for", StringComparison.Ordinal); + + //4 => "for " to get what's on the right + _uptime = uptimeRaw.Substring(forIndex + 4); + } + + private void CrestronEnvironmentOnEthernetEventHandler(EthernetEventArgs ethernetEventArgs) + { + if (ethernetEventArgs.EthernetEventType != eEthernetEventType.LinkUp) return; + + foreach (var fb in EthernetStatusFeedbackCollection) + { + fb.Value.UpdateEthernetStatus(); + } + } + + private void CreateEthernetStatusFeedbacks() + { + EthernetStatusFeedbackCollection = new Dictionary(); + + Debug.Console(2, "Creating {0} EthernetStatusFeedbacks", InitialParametersClass.NumberOfEthernetInterfaces); + + for (short i = 0; i < InitialParametersClass.NumberOfEthernetInterfaces; i++) + { + Debug.Console(2, "Creating EthernetStatusFeedback for Interface {0}", i); + var ethernetInterface = new EthernetStatusFeedbacks(i); + EthernetStatusFeedbackCollection.Add(i, ethernetInterface); + } + } + + private void UpdateEthernetStatusFeeedbacks() + { + foreach (var iface in EthernetStatusFeedbackCollection) + { + iface.Value.CurrentIpAddressFeedback.FireUpdate(); + iface.Value.CurrentSubnetMaskFeedback.FireUpdate(); + iface.Value.CurrentDefaultGatewayFeedback.FireUpdate(); + iface.Value.StaticIpAddressFeedback.FireUpdate(); + iface.Value.StaticSubnetMaskFeedback.FireUpdate(); + iface.Value.StaticDefaultGatewayFeedback.FireUpdate(); + iface.Value.HostNameFeedback.FireUpdate(); + iface.Value.DnsServerFeedback.FireUpdate(); + iface.Value.DomainFeedback.FireUpdate(); + iface.Value.DhcpStatusFeedback.FireUpdate(); + iface.Value.MacAddressFeedback.FireUpdate(); + } + } + + /// + /// Gets data in separate thread + /// + private void RefreshSystemMonitorData() + { + // this takes a while, launch a new thread + CrestronInvoke.BeginInvoke(UpdateFeedback); + } + + private void UpdateFeedback(object o) + { + TimeZoneFeedback.FireUpdate(); + TimeZoneTextFeedback.FireUpdate(); + IoControllerVersionFeedback.FireUpdate(); + SnmpVersionFeedback.FireUpdate(); + BaCnetAppVersionFeedback.FireUpdate(); + ControllerVersionFeedback.FireUpdate(); + SerialNumberFeedback.FireUpdate(); + ModelFeedback.FireUpdate(); + + OnSystemMonitorPropertiesChanged(); + } + + private void OnSystemMonitorPropertiesChanged() + { + var handler = SystemMonitorPropertiesChanged; + if (handler != null) + { + handler(this, new EventArgs()); + } + } + + public override bool CustomActivate() + { + RefreshSystemMonitorData(); + + return base.CustomActivate(); + } + + public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + var joinMap = new SystemMonitorJoinMap(joinStart); + + var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); + + if (bridge != null) + { + bridge.AddJoinMap(Key, joinMap); + } + else + { + Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); + } + + Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); + Debug.Console(2, this, "Linking API starting at join: {0}", joinStart); + + TimeZoneFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeZone.JoinNumber]); + TimeZoneTextFeedback.LinkInputSig(trilist.StringInput[joinMap.TimeZoneName.JoinNumber]); + + IoControllerVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.IOControllerVersion.JoinNumber]); + SnmpVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.SnmpAppVersion.JoinNumber]); + BaCnetAppVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.BACnetAppVersion.JoinNumber]); + ControllerVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.ControllerVersion.JoinNumber]); + SerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.SerialNumber.JoinNumber]); + ModelFeedback.LinkInputSig(trilist.StringInput[joinMap.Model.JoinNumber]); + UptimeFeedback.LinkInputSig(trilist.StringInput[joinMap.Uptime.JoinNumber]); + LastStartFeedback.LinkInputSig(trilist.StringInput[joinMap.LastBoot.JoinNumber]); + + // iterate the program status feedback collection and map all the joins + LinkProgramInfoJoins(this, trilist, joinMap); + + LinkEthernetInfoJoins(this, trilist, joinMap); + } + + private static void LinkEthernetInfoJoins(SystemMonitorController systemMonitorController, BasicTriList trilist, SystemMonitorJoinMap joinMap) + { + uint ethernetSlotJoinStart = 0; + foreach (var fb in systemMonitorController.EthernetStatusFeedbackCollection) + { + fb.Value.CurrentIpAddressFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.CurrentIpAddress.JoinNumber]); + fb.Value.CurrentSubnetMaskFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.CurrentSubnetMask.JoinNumber]); + fb.Value.CurrentDefaultGatewayFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.CurrentDefaultGateway.JoinNumber]); + fb.Value.StaticIpAddressFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.StaticIpAddress.JoinNumber]); + fb.Value.StaticSubnetMaskFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.StaticSubnetMask.JoinNumber]); + fb.Value.StaticDefaultGatewayFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.StaticDefaultGateway.JoinNumber]); + fb.Value.HostNameFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.HostName.JoinNumber]); + fb.Value.MacAddressFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.MacAddress.JoinNumber]); + fb.Value.DomainFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.Domain.JoinNumber]); + fb.Value.DnsServerFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.DnsServer.JoinNumber]); + fb.Value.DhcpStatusFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.DhcpStatus.JoinNumber]); + + ethernetSlotJoinStart += joinMap.EthernetOffsetJoin.JoinNumber; + } + } + + private static void LinkProgramInfoJoins(SystemMonitorController systemMonitorController, BasicTriList trilist, + SystemMonitorJoinMap joinMap) + { + uint programSlotJoinStart = 0; + + foreach (var p in systemMonitorController.ProgramStatusFeedbackCollection) + { + var programNumber = p.Value.Program.Number; + + trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramStart.JoinNumber, + b => SystemMonitor.ProgramCollection[programNumber].OperatingState = eProgramOperatingState.Start); + p.Value.ProgramStartedFeedback.LinkInputSig(trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramStart.JoinNumber]); + + trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramStop.JoinNumber, + b => SystemMonitor.ProgramCollection[programNumber].OperatingState = eProgramOperatingState.Stop); + p.Value.ProgramStoppedFeedback.LinkInputSig(trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramStop.JoinNumber]); + + trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramRegister.JoinNumber, + b => SystemMonitor.ProgramCollection[programNumber].RegistrationState = eProgramRegistrationState.Register); + p.Value.ProgramRegisteredFeedback.LinkInputSig( + trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramRegister.JoinNumber]); + + trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramUnregister.JoinNumber, + b => SystemMonitor.ProgramCollection[programNumber].RegistrationState = eProgramRegistrationState.Unregister); + p.Value.ProgramUnregisteredFeedback.LinkInputSig( + trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramUnregister.JoinNumber]); + + p.Value.ProgramNameFeedback.LinkInputSig(trilist.StringInput[programSlotJoinStart + joinMap.ProgramName.JoinNumber]); + p.Value.ProgramCompileTimeFeedback.LinkInputSig( + trilist.StringInput[programSlotJoinStart + joinMap.ProgramCompiledTime.JoinNumber]); + p.Value.CrestronDataBaseVersionFeedback.LinkInputSig( + trilist.StringInput[programSlotJoinStart + joinMap.ProgramCrestronDatabaseVersion.JoinNumber]); + p.Value.EnvironmentVersionFeedback.LinkInputSig( + trilist.StringInput[programSlotJoinStart + joinMap.ProgramEnvironmentVersion.JoinNumber]); + p.Value.AggregatedProgramInfoFeedback.LinkInputSig( + trilist.StringInput[programSlotJoinStart + joinMap.AggregatedProgramInfo.JoinNumber]); + + programSlotJoinStart = programSlotJoinStart + joinMap.ProgramOffsetJoin.JoinSpan; + } + } + + //// Sets the time zone + //public void SetTimeZone(int timeZone) + //{ + // SystemMonitor.TimeZoneInformation.TimeZoneNumber = timeZone; + //} + + /// + /// Responds to program change events and triggers the appropriate feedbacks to update + /// + /// + /// + private void SystemMonitor_ProgramChange(Program sender, ProgramEventArgs args) + { + Debug.Console(2, this, "Program Change Detected for slot: {0}", sender.Number); + Debug.Console(2, this, "Event Type: {0}", args.EventType); + + var program = ProgramStatusFeedbackCollection[sender.Number]; + + switch (args.EventType) + { + case eProgramChangeEventType.OperatingState: + program.ProgramStartedFeedback.FireUpdate(); + program.ProgramStoppedFeedback.FireUpdate(); + program.ProgramInfo.OperatingState = args.OperatingState; + if (args.OperatingState == eProgramOperatingState.Start) + program.GetProgramInfo(); + else + { + program.AggregatedProgramInfoFeedback.FireUpdate(); + program.OnProgramInfoChanged(); + } + break; + case eProgramChangeEventType.RegistrationState: + program.ProgramRegisteredFeedback.FireUpdate(); + program.ProgramUnregisteredFeedback.FireUpdate(); + program.ProgramInfo.RegistrationState = args.RegistrationState; + program.GetProgramInfo(); + break; + } + } + + /// + /// Responds to time zone changes and updates the appropriate feedbacks + /// + /// + private void TimeZoneInformation_TimeZoneChange(TimeZoneEventArgs args) + { + Debug.Console(2, this, "Time Zone Change Detected."); + TimeZoneFeedback.FireUpdate(); + TimeZoneTextFeedback.FireUpdate(); + + OnSystemMonitorPropertiesChanged(); + } + + public class EthernetStatusFeedbacks + { + public StringFeedback HostNameFeedback { get; protected set; } + public StringFeedback DnsServerFeedback { get; protected set; } + public StringFeedback DomainFeedback { get; protected set; } + public StringFeedback MacAddressFeedback { get; protected set; } + public StringFeedback DhcpStatusFeedback { get; protected set; } + + public StringFeedback CurrentIpAddressFeedback { get; protected set; } + public StringFeedback CurrentSubnetMaskFeedback { get; protected set; } + public StringFeedback CurrentDefaultGatewayFeedback { get; protected set; } + + public StringFeedback StaticIpAddressFeedback { get; protected set; } + public StringFeedback StaticSubnetMaskFeedback { get; protected set; } + public StringFeedback StaticDefaultGatewayFeedback { get; protected set; } + + public EthernetStatusFeedbacks(short adapterIndex) + { + Debug.Console(2, "Ethernet Information for interface {0}", adapterIndex); + Debug.Console(2, "Adapter Index: {1} Hostname: {0}", CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_HOSTNAME, adapterIndex), adapterIndex); + Debug.Console(2, "Adapter Index: {1} Current IP Address: {0}", CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, adapterIndex), adapterIndex); + Debug.Console(2, "Adapter Index: {1} Current Subnet Mask: {0}", CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_MASK, adapterIndex), adapterIndex); + Debug.Console(2, "Adapter Index: {1} Current Router: {0}", CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_ROUTER, adapterIndex), adapterIndex); + Debug.Console(2, "Adapter Index: {1} Static IP Address: {0}", CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_STATIC_IPADDRESS, adapterIndex), adapterIndex); + Debug.Console(2, "Adapter Index: {1} Static Subnet Mask: {0}", CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_STATIC_IPMASK, adapterIndex), adapterIndex); + Debug.Console(2, "Adapter Index: {1} Static Router: {0}", CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_STATIC_ROUTER, adapterIndex), adapterIndex); + Debug.Console(2, "Adapter Index: {1} DNS Servers: {0}", CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_DNS_SERVER, adapterIndex), adapterIndex); + Debug.Console(2, "Adapter Index: {1} DHCP State: {0}", CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_DHCP_STATE, adapterIndex), adapterIndex); + Debug.Console(2, "Adapter Index: {1} Domain Name: {0}", CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_DOMAIN_NAME, adapterIndex), adapterIndex); + Debug.Console(2, "Adapter Index: {1} MAC Address: {0}", CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_MAC_ADDRESS, adapterIndex), adapterIndex); + HostNameFeedback = + new StringFeedback( + () => + CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_HOSTNAME, adapterIndex)); + + CurrentIpAddressFeedback = + new StringFeedback( + () => + CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, adapterIndex)); + CurrentDefaultGatewayFeedback = + new StringFeedback( + () => + CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_ROUTER, adapterIndex)); + CurrentSubnetMaskFeedback = + new StringFeedback( + () => + CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_MASK, adapterIndex)); + StaticIpAddressFeedback = + new StringFeedback( + () => + CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, adapterIndex)); + StaticDefaultGatewayFeedback = + new StringFeedback( + () => + CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_ROUTER, adapterIndex)); + StaticSubnetMaskFeedback = + new StringFeedback( + () => + CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_MASK, adapterIndex)); + DomainFeedback = + new StringFeedback( + () => + CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_DOMAIN_NAME, adapterIndex)); + DnsServerFeedback = + new StringFeedback( + () => + CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_DNS_SERVER, adapterIndex)); + MacAddressFeedback = + new StringFeedback( + () => + CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_MAC_ADDRESS, adapterIndex)); + + DhcpStatusFeedback = new StringFeedback( + () => + CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_DHCP_STATE, adapterIndex)); + } + + public void UpdateEthernetStatus() + { + HostNameFeedback.FireUpdate(); + CurrentIpAddressFeedback.FireUpdate(); + CurrentSubnetMaskFeedback.FireUpdate(); + CurrentDefaultGatewayFeedback.FireUpdate(); + StaticIpAddressFeedback.FireUpdate(); + StaticSubnetMaskFeedback.FireUpdate(); + StaticDefaultGatewayFeedback.FireUpdate(); + DomainFeedback.FireUpdate(); + DnsServerFeedback.FireUpdate(); + MacAddressFeedback.FireUpdate(); + DhcpStatusFeedback.FireUpdate(); + } + } + + + public class ProgramStatusFeedbacks + { + public event EventHandler ProgramInfoChanged; + + public Program Program; + + public ProgramInfo ProgramInfo { get; set; } + + public BoolFeedback ProgramStartedFeedback; + public BoolFeedback ProgramStoppedFeedback; + public BoolFeedback ProgramRegisteredFeedback; + public BoolFeedback ProgramUnregisteredFeedback; + + public StringFeedback ProgramNameFeedback; + public StringFeedback ProgramCompileTimeFeedback; + public StringFeedback CrestronDataBaseVersionFeedback; + // SIMPL windows version + public StringFeedback EnvironmentVersionFeedback; + public StringFeedback AggregatedProgramInfoFeedback; + + public ProgramStatusFeedbacks(Program program) + { + ProgramInfo = new ProgramInfo(program.Number); + + Program = program; + + ProgramInfo.OperatingState = Program.OperatingState; + ProgramInfo.RegistrationState = Program.RegistrationState; + + ProgramStartedFeedback = new BoolFeedback(() => Program.OperatingState == eProgramOperatingState.Start); + ProgramStartedFeedback.FireUpdate(); + + ProgramStoppedFeedback = new BoolFeedback(() => Program.OperatingState == eProgramOperatingState.Stop); + ProgramStoppedFeedback.FireUpdate(); + + ProgramRegisteredFeedback = + new BoolFeedback(() => Program.RegistrationState == eProgramRegistrationState.Register); + ProgramRegisteredFeedback.FireUpdate(); + + ProgramUnregisteredFeedback = + new BoolFeedback(() => Program.RegistrationState == eProgramRegistrationState.Unregister); + ProgramUnregisteredFeedback.FireUpdate(); + + ProgramNameFeedback = new StringFeedback(() => ProgramInfo.ProgramFile); + ProgramCompileTimeFeedback = new StringFeedback(() => ProgramInfo.CompileTime); + CrestronDataBaseVersionFeedback = new StringFeedback(() => ProgramInfo.CrestronDb); + EnvironmentVersionFeedback = new StringFeedback(() => ProgramInfo.Environment); + AggregatedProgramInfoFeedback = new StringFeedback(() => JsonConvert.SerializeObject(ProgramInfo)); + + GetProgramInfo(); + } + + /// + /// Retrieves information about a running program + /// + public void GetProgramInfo() + { + CrestronInvoke.BeginInvoke(GetProgramInfo); + } + + private void GetProgramInfo(object o) + { + Debug.Console(2, "Attempting to get program info for slot: {0}", Program.Number); + + string response = null; + + if (Program.RegistrationState == eProgramRegistrationState.Unregister || Program.OperatingState == eProgramOperatingState.Stop) + { + Debug.Console(2, "Program {0} not registered. Setting default values for program information.", + Program.Number); + + ProgramInfo = new ProgramInfo(Program.Number) + { + OperatingState = Program.OperatingState, + RegistrationState = Program.RegistrationState + }; + + return; + } + + var success = CrestronConsole.SendControlSystemCommand( + string.Format("progcomments:{0}", Program.Number), ref response); + + if (!success) + { + Debug.Console(2, "Progcomments Attempt Unsuccessful for slot: {0}", Program.Number); + UpdateFeedbacks(); + return; + } + + if (response.ToLower().Contains("bad or incomplete")) + { + Debug.Console(2, + "Program in slot {0} not running. Setting default ProgramInfo for slot: {0}", + Program.Number); + + // Assume no valid program info. Constructing a new object will wipe all properties + ProgramInfo = new ProgramInfo(Program.Number) + { + OperatingState = Program.OperatingState, + RegistrationState = Program.RegistrationState + }; + + UpdateFeedbacks(); + + return; + } + + + // Shared properteis + ProgramInfo.ProgramFile = ParseConsoleData(response, "Program File", ": ", "\n"); + ProgramInfo.CompilerRevision = ParseConsoleData(response, "Compiler Rev", ": ", "\n"); + ProgramInfo.CompileTime = ParseConsoleData(response, "Compiled On", ": ", "\n"); + ProgramInfo.Include4Dat = ParseConsoleData(response, "Include4.dat", ": ", "\n"); + + + if (ProgramInfo.ProgramFile.Contains(".dll")) + { + // SSP Program + ProgramInfo.FriendlyName = ParseConsoleData(response, "Friendly Name", ": ", "\n"); + ProgramInfo.ApplicationName = ParseConsoleData(response, "Application Name", ": ", "\n"); + ProgramInfo.ProgramTool = ParseConsoleData(response, "Program Tool", ": ", "\n"); + ProgramInfo.MinFirmwareVersion = ParseConsoleData(response, "Min Firmware Version", ": ", + "\n"); + ProgramInfo.PlugInVersion = ParseConsoleData(response, "PlugInVersion", ": ", "\n"); + } + else if (ProgramInfo.ProgramFile.Contains(".smw")) + { + // SIMPL Windows Program + ProgramInfo.FriendlyName = ParseConsoleData(response, "Friendly Name", ":", "\n"); + ProgramInfo.SystemName = ParseConsoleData(response, "System Name", ": ", "\n"); + ProgramInfo.CrestronDb = ParseConsoleData(response, "CrestronDB", ": ", "\n"); + ProgramInfo.Environment = ParseConsoleData(response, "Source Env", ": ", "\n"); + ProgramInfo.Programmer = ParseConsoleData(response, "Programmer", ": ", "\n"); + } + Debug.Console(2, "Program info for slot {0} successfully updated", Program.Number); + + UpdateFeedbacks(); + } + + private void UpdateFeedbacks() + { + ProgramNameFeedback.FireUpdate(); + ProgramCompileTimeFeedback.FireUpdate(); + CrestronDataBaseVersionFeedback.FireUpdate(); + EnvironmentVersionFeedback.FireUpdate(); + + AggregatedProgramInfoFeedback.FireUpdate(); + + OnProgramInfoChanged(); + } + + public void OnProgramInfoChanged() + { + //Debug.Console(1, "Firing ProgramInfoChanged for slot: {0}", Program.Number); + var handler = ProgramInfoChanged; + if (handler != null) + { + handler(this, new ProgramInfoEventArgs(ProgramInfo)); + } + } + + private string ParseConsoleData(string data, string line, string startString, string endString) + { + var outputData = ""; + + if (data.Length <= 0) return outputData; + + try + { + //Debug.Console(2, "ParseConsoleData Data: {0}, Line {1}, startStirng {2}, endString {3}", data, line, startString, endString); + var linePosition = data.IndexOf(line, StringComparison.Ordinal); + var startPosition = data.IndexOf(startString, linePosition, StringComparison.Ordinal) + + startString.Length; + var endPosition = data.IndexOf(endString, startPosition, StringComparison.Ordinal); + outputData = data.Substring(startPosition, endPosition - startPosition).Trim(); + //Debug.Console(2, "ParseConsoleData Return: {0}", outputData); + } + catch (Exception e) + { + Debug.Console(1, "Error Parsing Console Data:\r{0}", e); + } + + return outputData; + } + } + } + + /// + /// Class for serializing program slot information + /// + public class ProgramInfo + { + // Shared properties + + [JsonProperty("programNumber")] + public uint ProgramNumber { get; private set; } + + [JsonConverter(typeof (StringEnumConverter))] + [JsonProperty("operatingState")] + public eProgramOperatingState OperatingState { get; set; } + + [JsonConverter(typeof (StringEnumConverter))] + [JsonProperty("registrationState")] + public eProgramRegistrationState RegistrationState { get; set; } + + [JsonProperty("programFile")] + public string ProgramFile { get; set; } + + [JsonProperty("friendlyName")] + public string FriendlyName { get; set; } + + [JsonProperty("compilerRevision")] + public string CompilerRevision { get; set; } + + [JsonProperty("compileTime")] + public string CompileTime { get; set; } + + [JsonProperty("include4Dat")] + public string Include4Dat { get; set; } + + // SIMPL Windows properties + [JsonProperty("systemName")] + public string SystemName { get; set; } + + [JsonProperty("crestronDb")] + public string CrestronDb { get; set; } + + [JsonProperty("environment")] + public string Environment { get; set; } + + [JsonProperty("programmer")] + public string Programmer { get; set; } + + + // SSP Properties + [JsonProperty("applicationName")] + public string ApplicationName { get; set; } + + [JsonProperty("programTool")] + public string ProgramTool { get; set; } + + [JsonProperty("minFirmwareVersion")] + public string MinFirmwareVersion { get; set; } + + [JsonProperty("plugInVersion")] + public string PlugInVersion { get; set; } + + public ProgramInfo(uint number) + { + ProgramNumber = number; + + ProgramFile = ""; + FriendlyName = ""; + CompilerRevision = ""; + CompileTime = ""; + Include4Dat = ""; + + SystemName = ""; + CrestronDb = ""; + Environment = ""; + Programmer = ""; + + ApplicationName = ""; + ProgramTool = ""; + MinFirmwareVersion = ""; + PlugInVersion = ""; + } + } + + public class ProgramInfoEventArgs : EventArgs + { + public ProgramInfo ProgramInfo; + + public ProgramInfoEventArgs(ProgramInfo progInfo) + { + ProgramInfo = progInfo; + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Occupancy/CenOdtOccupancySensorBaseController.cs b/src/PepperDash.Essentials.Core/Occupancy/CenOdtOccupancySensorBaseController.cs similarity index 97% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Occupancy/CenOdtOccupancySensorBaseController.cs rename to src/PepperDash.Essentials.Core/Occupancy/CenOdtOccupancySensorBaseController.cs index eae2f993..5b778a6d 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Occupancy/CenOdtOccupancySensorBaseController.cs +++ b/src/PepperDash.Essentials.Core/Occupancy/CenOdtOccupancySensorBaseController.cs @@ -1,775 +1,777 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Resources; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.GeneralIO; -using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; -using PepperDash.Essentials.Core.Bridges; - -namespace PepperDash.Essentials.Core -{ - [Description("Wrapper class for CEN-ODT-C-POE")] - [ConfigSnippet("\"properties\": {\"control\": {\"method\": \"cresnet\",\"cresnetId\": \"97\"},\"enablePir\": true,\"enableLedFlash\": true,\"enableRawStates\":true,\"remoteTimeout\": 30,\"internalPhotoSensorMinChange\": 0,\"externalPhotoSensorMinChange\": 0,\"enableUsA\": true,\"enableUsB\": true,\"orWhenVacatedState\": true}")] - public class CenOdtOccupancySensorBaseController : CrestronGenericBridgeableBaseDevice, IOccupancyStatusProvider - { - public CenOdtCPoe OccSensor { get; private set; } - - public GlsOccupancySensorPropertiesConfig PropertiesConfig { get; private set; } - - public BoolFeedback RoomIsOccupiedFeedback { get; private set; } - - public BoolFeedback GraceOccupancyDetectedFeedback { get; private set; } - - public BoolFeedback RawOccupancyFeedback { get; private set; } - - public BoolFeedback PirSensorEnabledFeedback { get; private set; } - - public BoolFeedback LedFlashEnabledFeedback { get; private set; } - - public BoolFeedback ShortTimeoutEnabledFeedback { get; private set; } - - public IntFeedback PirSensitivityInVacantStateFeedback { get; private set; } - - public IntFeedback PirSensitivityInOccupiedStateFeedback { get; private set; } - - public IntFeedback CurrentTimeoutFeedback { get; private set; } - - public IntFeedback RemoteTimeoutFeedback { get; private set; } - - public IntFeedback InternalPhotoSensorValue { get; set; } - - public IntFeedback ExternalPhotoSensorValue { get; set; } - - public BoolFeedback OrWhenVacatedFeedback { get; private set; } - - public BoolFeedback AndWhenVacatedFeedback { get; private set; } - - public BoolFeedback UltrasonicAEnabledFeedback { get; private set; } - - public BoolFeedback UltrasonicBEnabledFeedback { get; private set; } - - public IntFeedback UltrasonicSensitivityInVacantStateFeedback { get; private set; } - - public IntFeedback UltrasonicSensitivityInOccupiedStateFeedback { get; private set; } - - public BoolFeedback RawOccupancyPirFeedback { get; private set; } - - public BoolFeedback RawOccupancyUsFeedback { get; private set; } - - public BoolFeedback IdentityModeFeedback { get; private set; } - - // Debug properties - public bool InTestMode { get; private set; } - - public bool TestRoomIsOccupiedFeedback { get; private set; } - - public Func RoomIsOccupiedFeedbackFunc - { - get - { - return () => InTestMode ? TestRoomIsOccupiedFeedback : OccSensor.OccupancyDetectedFeedback.BoolValue; - } - } - - public CenOdtOccupancySensorBaseController(string key, string name, CenOdtCPoe sensor, GlsOccupancySensorPropertiesConfig config) - : base(key, name, sensor) - { - PropertiesConfig = config; - - OccSensor = sensor; - - RoomIsOccupiedFeedback = new BoolFeedback(RoomIsOccupiedFeedbackFunc); - - PirSensorEnabledFeedback = new BoolFeedback(() => OccSensor.PassiveInfraredSensorEnabledFeedback.BoolValue); - - LedFlashEnabledFeedback = new BoolFeedback(() => OccSensor.LedFlashEnabledFeedback.BoolValue); - - ShortTimeoutEnabledFeedback = new BoolFeedback(() => OccSensor.ShortTimeoutEnabledFeedback.BoolValue); - - PirSensitivityInVacantStateFeedback = new IntFeedback(() => (int)OccSensor.PassiveInfraredSensorSensitivityInVacantStateFeedback); - - PirSensitivityInOccupiedStateFeedback = new IntFeedback(() => (int)OccSensor.PassiveInfraredSensorSensitivityInOccupiedStateFeedback); - - CurrentTimeoutFeedback = new IntFeedback(() => OccSensor.CurrentTimeoutFeedback.UShortValue); - - RemoteTimeoutFeedback = new IntFeedback(() => OccSensor.RemoteTimeout.UShortValue); - - GraceOccupancyDetectedFeedback = new BoolFeedback(() => OccSensor.GraceOccupancyDetectedFeedback.BoolValue); - - RawOccupancyFeedback = new BoolFeedback(() => OccSensor.RawOccupancyDetectedFeedback.BoolValue); - - InternalPhotoSensorValue = new IntFeedback(() => OccSensor.InternalPhotoSensorValueFeedback.UShortValue); - - //ExternalPhotoSensorValue = new IntFeedback(() => OccSensor.ex.UShortValue); - - AndWhenVacatedFeedback = new BoolFeedback(() => OccSensor.AndWhenVacatedFeedback.BoolValue); - - OrWhenVacatedFeedback = new BoolFeedback(() => OccSensor.OrWhenVacatedFeedback.BoolValue); - - UltrasonicAEnabledFeedback = new BoolFeedback(() => OccSensor.UltrasonicSensorSideAEnabledFeedback.BoolValue); - - UltrasonicBEnabledFeedback = new BoolFeedback(() => OccSensor.UltrasonicSensorSideBEnabledFeedback.BoolValue); - - RawOccupancyPirFeedback = new BoolFeedback(() => OccSensor.RawOccupancyDetectedByPassiveInfraredSensorFeedback.BoolValue); - - RawOccupancyUsFeedback = new BoolFeedback(() => OccSensor.RawOccupancyDetectedByUltrasonicSensorFeedback.BoolValue); - - IdentityModeFeedback = new BoolFeedback(()=>OccSensor.IdentityModeOnFeedback.BoolValue); - - UltrasonicSensitivityInVacantStateFeedback = new IntFeedback(() => (int)OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback); - - UltrasonicSensitivityInOccupiedStateFeedback = new IntFeedback(() => (int)OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback); - - OccSensor.BaseEvent += new Crestron.SimplSharpPro.BaseEventHandler(OccSensor_BaseEvent); - - OccSensor.CenOccupancySensorChange += new GenericEventHandler(OccSensor_CenOccupancySensorChange); - - AddPostActivationAction(() => - { - OccSensor.OnlineStatusChange += (o, a) => - { - if (a.DeviceOnLine) - { - ApplySettingsToSensorFromConfig(); - } - }; - - if (OccSensor.IsOnline) - { - ApplySettingsToSensorFromConfig(); - - } - }); - } - - /// - /// Applies any sensor settings defined in config - /// - protected virtual void ApplySettingsToSensorFromConfig() - { - Debug.Console(1, this, "Checking config for settings to apply"); - - if (PropertiesConfig.EnablePir != null) - { - SetPirEnable((bool)PropertiesConfig.EnablePir); - } - - if (PropertiesConfig.EnableLedFlash != null) - { - SetLedFlashEnable((bool)PropertiesConfig.EnableLedFlash); - } - - if (PropertiesConfig.RemoteTimeout != null) - { - SetRemoteTimeout((ushort)PropertiesConfig.RemoteTimeout); - } - - if (PropertiesConfig.ShortTimeoutState != null) - { - SetShortTimeoutState((bool)PropertiesConfig.ShortTimeoutState); - } - - if (PropertiesConfig.EnableRawStates != null) - { - EnableRawStates((bool)PropertiesConfig.EnableRawStates); - } - - if (PropertiesConfig.InternalPhotoSensorMinChange != null) - { - SetInternalPhotoSensorMinChange((ushort)PropertiesConfig.InternalPhotoSensorMinChange); - } - - if (PropertiesConfig.EnableUsA != null) - { - SetUsAEnable((bool)PropertiesConfig.EnableUsA); - } - - if (PropertiesConfig.EnableUsB != null) - { - SetUsBEnable((bool)PropertiesConfig.EnableUsB); - } - - if (PropertiesConfig.OrWhenVacatedState != null) - { - SetOrWhenVacatedState((bool)PropertiesConfig.OrWhenVacatedState); - } - - if (PropertiesConfig.AndWhenVacatedState != null) - { - SetAndWhenVacatedState((bool)PropertiesConfig.AndWhenVacatedState); - } - - // TODO [ ] feature/cenoodtcpoe-sensor-sensitivity-configuration - if (PropertiesConfig.UsSensitivityOccupied != null) - { - SetUsSensitivityOccupied((ushort)PropertiesConfig.UsSensitivityOccupied); - } - - if (PropertiesConfig.UsSensitivityVacant != null) - { - SetUsSensitivityVacant((ushort)PropertiesConfig.UsSensitivityVacant); - } - - if (PropertiesConfig.PirSensitivityOccupied != null) - { - SetPirSensitivityOccupied((ushort)PropertiesConfig.PirSensitivityOccupied); - } - - if (PropertiesConfig.PirSensitivityVacant != null) - { - SetPirSensitivityVacant((ushort)PropertiesConfig.PirSensitivityVacant); - } - } - - /// - /// Catches events for feedbacks on the base class. Any extending wrapper class should call this delegate after it checks for it's own event IDs. - /// - /// - /// - protected virtual void OccSensor_CenOccupancySensorChange(object device, GenericEventArgs args) - { - if (args.EventId == GlsOccupancySensorBase.PirEnabledFeedbackEventId) - PirSensorEnabledFeedback.FireUpdate(); - else if (args.EventId == GlsOccupancySensorBase.LedFlashEnabledFeedbackEventId) - LedFlashEnabledFeedback.FireUpdate(); - else if (args.EventId == GlsOccupancySensorBase.ShortTimeoutEnabledFeedbackEventId) - ShortTimeoutEnabledFeedback.FireUpdate(); - else if (args.EventId == GlsOccupancySensorBase.PirSensitivityInOccupiedStateFeedbackEventId) - PirSensitivityInOccupiedStateFeedback.FireUpdate(); - else if (args.EventId == GlsOccupancySensorBase.PirSensitivityInVacantStateFeedbackEventId) - PirSensitivityInVacantStateFeedback.FireUpdate(); - else if (args.EventId == GlsOccupancySensorBase.RawOccupancyPirFeedbackEventId) - RawOccupancyPirFeedback.FireUpdate(); - else if (args.EventId == GlsOccupancySensorBase.RawOccupancyUsFeedbackEventId) - RawOccupancyUsFeedback.FireUpdate(); - } - - protected virtual void OccSensor_BaseEvent(Crestron.SimplSharpPro.GenericBase device, Crestron.SimplSharpPro.BaseEventArgs args) - { - Debug.Console(2, this, "PoEOccupancySensorChange EventId: {0}", args.EventId); - - if (args.EventId == Crestron.SimplSharpPro.GeneralIO.GlsOccupancySensorBase.RoomOccupiedFeedbackEventId - || args.EventId == Crestron.SimplSharpPro.GeneralIO.GlsOccupancySensorBase.RoomVacantFeedbackEventId) - { - Debug.Console(1, this, "Occupancy State: {0}", OccSensor.OccupancyDetectedFeedback.BoolValue); - RoomIsOccupiedFeedback.FireUpdate(); - } - else if (args.EventId == GlsOccupancySensorBase.TimeoutFeedbackEventId) - CurrentTimeoutFeedback.FireUpdate(); - else if (args.EventId == GlsOccupancySensorBase.TimeoutLocalFeedbackEventId) - RemoteTimeoutFeedback.FireUpdate(); - else if (args.EventId == GlsOccupancySensorBase.GraceOccupancyDetectedFeedbackEventId) - GraceOccupancyDetectedFeedback.FireUpdate(); - else if (args.EventId == GlsOccupancySensorBase.RawOccupancyFeedbackEventId) - RawOccupancyFeedback.FireUpdate(); - else if (args.EventId == GlsOccupancySensorBase.InternalPhotoSensorValueFeedbackEventId) - InternalPhotoSensorValue.FireUpdate(); - else if (args.EventId == GlsOccupancySensorBase.ExternalPhotoSensorValueFeedbackEventId) - ExternalPhotoSensorValue.FireUpdate(); - else if (args.EventId == GlsOccupancySensorBase.AndWhenVacatedFeedbackEventId) - AndWhenVacatedFeedback.FireUpdate(); - else if (args.EventId == GlsOccupancySensorBase.OrWhenVacatedFeedbackEventId) - OrWhenVacatedFeedback.FireUpdate(); - else if (args.EventId == GlsOccupancySensorBase.UsAEnabledFeedbackEventId) - UltrasonicAEnabledFeedback.FireUpdate(); - else if (args.EventId == GlsOccupancySensorBase.UsBEnabledFeedbackEventId) - UltrasonicBEnabledFeedback.FireUpdate(); - else if (args.EventId == GlsOccupancySensorBase.UsSensitivityInOccupiedStateFeedbackEventId) - UltrasonicSensitivityInOccupiedStateFeedback.FireUpdate(); - else if (args.EventId == GlsOccupancySensorBase.UsSensitivityInVacantStateFeedbackEventId) - UltrasonicSensitivityInVacantStateFeedback.FireUpdate(); - } - - public void SetTestMode(bool mode) - { - InTestMode = mode; - - Debug.Console(1, this, "In Mock Mode: '{0}'", InTestMode); - } - - public void SetTestOccupiedState(bool state) - { - if (!InTestMode) - Debug.Console(1, "Mock mode not enabled"); - else - { - TestRoomIsOccupiedFeedback = state; - - RoomIsOccupiedFeedback.FireUpdate(); - } - } - - /// - /// Sets the identity mode on or off - /// - /// - public void SetIdentityMode(bool state) - { - if (state) - OccSensor.IdentityModeOn(); - else - OccSensor.IdentityModeOff(); - - Debug.Console(1, this, "Identity Mode: {0}", OccSensor.IdentityModeOnFeedback.BoolValue ? "On" : "Off"); - } - - /// - /// Enables or disables the PIR sensor - /// - /// - public void SetPirEnable(bool state) - { - if (state) - { - OccSensor.EnablePassiveInfraredSensor(); - } - else - { - OccSensor.DisablePassiveInfraredSensor(); - } - } - - /// - /// Enables or disables the LED Flash - /// - /// - public void SetLedFlashEnable(bool state) - { - if (state) - { - OccSensor.EnableLedFlash(); - } - else - { - OccSensor.DisableLedFlash(); - } - } - - /// - /// Enables or disables short timeout based on state - /// - /// - public void SetShortTimeoutState(bool state) - { - if (state) - { - OccSensor.EnableShortTimeout(); - } - else - { - OccSensor.DisableShortTimeout(); - } - } - - public void IncrementPirSensitivityInOccupiedState(bool pressRelease) - { - if ((int)OccSensor.PassiveInfraredSensorSensitivityInOccupiedStateFeedback != 3) - { - OccSensor.PassiveInfraredSensorSensitivityInOccupiedState = OccSensor.PassiveInfraredSensorSensitivityInOccupiedStateFeedback + 1; - } - } - - public void DecrementPirSensitivityInOccupiedState(bool pressRelease) - { - if ((int)OccSensor.PassiveInfraredSensorSensitivityInOccupiedStateFeedback != 0) - { - OccSensor.PassiveInfraredSensorSensitivityInOccupiedState = OccSensor.PassiveInfraredSensorSensitivityInOccupiedStateFeedback - 1; - } - } - - public void IncrementPirSensitivityInVacantState(bool pressRelease) - { - if ((int)OccSensor.PassiveInfraredSensorSensitivityInVacantStateFeedback != 3) - { - OccSensor.PassiveInfraredSensorSensitivityInVacantState = OccSensor.PassiveInfraredSensorSensitivityInVacantStateFeedback + 1; - } - } - - public void DecrementPirSensitivityInVacantState(bool pressRelease) - { - if ((int)OccSensor.PassiveInfraredSensorSensitivityInVacantStateFeedback != 0) - { - OccSensor.PassiveInfraredSensorSensitivityInVacantState = OccSensor.PassiveInfraredSensorSensitivityInVacantStateFeedback - 1; - } - } - - public void IncrementUsSensitivityInOccupiedState(bool pressRelease) - { - if ((int)OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback < 3) - { - OccSensor.UltrasonicSensorSensitivityInOccupiedState = OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback + 1; - } - else if ((int)OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback > 4) - { - OccSensor.UltrasonicSensorSensitivityInOccupiedState = OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback - 1; - } - else if ((int)OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback == 4) - { - OccSensor.UltrasonicSensorSensitivityInOccupiedState = 0; - } - } - - public void DecrementUsSensitivityInOccupiedState(bool pressRelease) - { - if ((int)OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback > 0 - && (int)OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback < 4) - { - OccSensor.UltrasonicSensorSensitivityInOccupiedState = OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback - 1; - } - else if ((int)OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback > 3 - && (int)OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback < 7) - { - OccSensor.UltrasonicSensorSensitivityInOccupiedState = OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback + 1; - } - } - - public void IncrementUsSensitivityInVacantState(bool pressRelease) - { - if ((int)OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback < 3) - { - OccSensor.UltrasonicSensorSensitivityInVacantState = OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback + 1; - } - else if ((int)OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback > 4) - { - OccSensor.UltrasonicSensorSensitivityInVacantState = OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback - 1; - } - else if ((int)OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback == 4) - { - OccSensor.UltrasonicSensorSensitivityInVacantState = 0; - } - } - - public void DecrementUsSensitivityInVacantState(bool pressRelease) - { - if ((int)OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback > 0 - && (int)OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback < 4) - { - OccSensor.UltrasonicSensorSensitivityInVacantState = OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback - 1; - } - else if ((int)OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback > 3 - && (int)OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback < 7) - { - OccSensor.UltrasonicSensorSensitivityInVacantState = OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback + 1; - } - } - - public void ForceOccupied() - { - OccSensor.ForceOccupied(); - } - - public void ForceVacant() - { - OccSensor.ForceVacant(); - } - - public void EnableRawStates(bool state) - { - if (state) - { - OccSensor.EnableRawStates(); - } - else - OccSensor.DisableRawStates(); - } - - public void SetRemoteTimeout(ushort time) - { - OccSensor.RemoteTimeout.UShortValue = time; - } - - public void SetInternalPhotoSensorMinChange(ushort value) - { - OccSensor.InternalPhotoSensorMinimumChange.UShortValue = value; - } - - /// - /// Sets the OrWhenVacated state - /// - /// - public void SetOrWhenVacatedState(bool state) - { - if (state) - { - OccSensor.OrWhenVacated(); - } - } - - /// - /// Sets the AndWhenVacated state - /// - /// - public void SetAndWhenVacatedState(bool state) - { - if (state) - { - OccSensor.AndWhenVacated(); - } - } - - /// - /// Enables or disables the Ultrasonic A sensor - /// - /// - public void SetUsAEnable(bool state) - { - if (state) - { - OccSensor.EnableUltrasonicSensorSideA(); - } - else - { - OccSensor.DisableUltrasonicSensorSideA(); - } - } - - - /// - /// Enables or disables the Ultrasonic B sensor - /// - /// - public void SetUsBEnable(bool state) - { - if (state) - { - OccSensor.EnableUltrasonicSensorSideB(); - } - else - { - OccSensor.DisableUltrasonicSensorSideB(); - } - } - - /// - /// Sets the US sensor sensitivity for occupied state - /// - /// - public void SetUsSensitivityOccupied(ushort sensitivity) - { - var level = (eSensitivityLevel) sensitivity; - if (level == 0) return; - - OccSensor.UltrasonicSensorSensitivityInOccupiedState = level; - } - - /// - /// Sets the US sensor sensitivity for vacant state - /// - /// - public void SetUsSensitivityVacant(ushort sensitivity) - { - var level = (eSensitivityLevel)sensitivity; - if (level == 0) return; - - OccSensor.UltrasonicSensorSensitivityInVacantState = level; - } - - /// - /// Sets the PIR sensor sensitivity for occupied state - /// - /// - public void SetPirSensitivityOccupied(ushort sensitivity) - { - var level = (eSensitivityLevel)sensitivity; - if (level == 0) return; - - OccSensor.PassiveInfraredSensorSensitivityInOccupiedState = level; - } - - /// - /// Sets the PIR sensor sensitivity for vacant state - /// - /// - public void SetPirSensitivityVacant(ushort sensitivity) - { - var level = (eSensitivityLevel)sensitivity; - if (level == 0) return; - - OccSensor.PassiveInfraredSensorSensitivityInVacantState = level; - } - - /// - /// Method to print current settings to console - /// - public void GetSettings() - { - var dash = new string('*', 50); - CrestronConsole.PrintLine(string.Format("{0}\n", dash)); - - Debug.Console(0, this, "Vacancy Detected: {0}", - OccSensor.VacancyDetectedFeedback.BoolValue); - - Debug.Console(0, Key, "Timeout Current: {0} | Remote: {1}", - OccSensor.CurrentTimeoutFeedback.UShortValue, - OccSensor.RemoteTimeout.UShortValue); - - Debug.Console(0, Key, "Short Timeout Enabled: {0}", - OccSensor.ShortTimeoutEnabledFeedback.BoolValue); - - Debug.Console(0, Key, "PIR Sensor Enabled: {0} | Sensitivity Occupied: {1} | Sensitivity Vacant: {2}", - OccSensor.PassiveInfraredSensorEnabledFeedback.BoolValue, - OccSensor.PassiveInfraredSensorSensitivityInOccupiedStateFeedback, - OccSensor.PassiveInfraredSensorSensitivityInVacantStateFeedback); - - Debug.Console(0, Key, "Ultrasonic Enabled A: {0} | B: {1}", - OccSensor.UltrasonicSensorSideAEnabledFeedback.BoolValue, - OccSensor.UltrasonicSensorSideBEnabledFeedback.BoolValue); - - Debug.Console(0, Key, "Ultrasonic Sensitivity Occupied: {0} | Vacant: {1}", - OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback, - OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback); - - CrestronConsole.PrintLine(string.Format("{0}\n", dash)); - } - - - public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - LinkOccSensorToApi(this, trilist, joinStart, joinMapKey, bridge); - } - - protected void LinkOccSensorToApi(CenOdtOccupancySensorBaseController occController, - BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - CenOdtOccupancySensorBaseJoinMap joinMap = new CenOdtOccupancySensorBaseJoinMap(joinStart); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - if (bridge != null) - { - bridge.AddJoinMap(Key, joinMap); - } - else - { - Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); - } - - Debug.Console(1, occController, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - - occController.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.Online.JoinNumber]); - trilist.StringInput[joinMap.Name.JoinNumber].StringValue = occController.Name; - - trilist.OnlineStatusChange += new Crestron.SimplSharpPro.OnlineStatusChangeEventHandler((d, args) => - { - if (args.DeviceOnLine) - { - trilist.StringInput[joinMap.Name.JoinNumber].StringValue = occController.Name; - } - } - ); - - // Occupied status - trilist.SetSigTrueAction(joinMap.ForceOccupied.JoinNumber, new Action(() => occController.ForceOccupied())); - trilist.SetSigTrueAction(joinMap.ForceVacant.JoinNumber, new Action(() => occController.ForceVacant())); - occController.RoomIsOccupiedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RoomOccupiedFeedback.JoinNumber]); - occController.RoomIsOccupiedFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.RoomVacantFeedback.JoinNumber]); - occController.RawOccupancyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyFeedback.JoinNumber]); - trilist.SetBoolSigAction(joinMap.EnableRawStates.JoinNumber, new Action((b) => occController.EnableRawStates(b))); - - // Timouts - trilist.SetUShortSigAction(joinMap.Timeout.JoinNumber, new Action((u) => occController.SetRemoteTimeout(u))); - occController.CurrentTimeoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.Timeout.JoinNumber]); - occController.RemoteTimeoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeoutLocalFeedback.JoinNumber]); - - // LED Flash - trilist.SetSigTrueAction(joinMap.EnableLedFlash.JoinNumber, new Action(() => occController.SetLedFlashEnable(true))); - trilist.SetSigTrueAction(joinMap.DisableLedFlash.JoinNumber, new Action(() => occController.SetLedFlashEnable(false))); - occController.LedFlashEnabledFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.EnableLedFlash.JoinNumber]); - - // Short Timeout - trilist.SetSigTrueAction(joinMap.EnableShortTimeout.JoinNumber, new Action(() => occController.SetShortTimeoutState(true))); - trilist.SetSigTrueAction(joinMap.DisableShortTimeout.JoinNumber, new Action(() => occController.SetShortTimeoutState(false))); - occController.ShortTimeoutEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableShortTimeout.JoinNumber]); - - // PIR Sensor - trilist.SetSigTrueAction(joinMap.EnablePir.JoinNumber, new Action(() => occController.SetPirEnable(true))); - trilist.SetSigTrueAction(joinMap.DisablePir.JoinNumber, new Action(() => occController.SetPirEnable(false))); - occController.PirSensorEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnablePir.JoinNumber]); - - // PIR Sensitivity in Occupied State - trilist.SetBoolSigAction(joinMap.IncrementPirInOccupiedState.JoinNumber, new Action((b) => occController.IncrementPirSensitivityInOccupiedState(b))); - trilist.SetBoolSigAction(joinMap.DecrementPirInOccupiedState.JoinNumber, new Action((b) => occController.DecrementPirSensitivityInOccupiedState(b))); - occController.PirSensitivityInOccupiedStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.PirSensitivityInOccupiedState.JoinNumber]); - - // PIR Sensitivity in Vacant State - trilist.SetBoolSigAction(joinMap.IncrementPirInVacantState.JoinNumber, new Action((b) => occController.IncrementPirSensitivityInVacantState(b))); - trilist.SetBoolSigAction(joinMap.DecrementPirInVacantState.JoinNumber, new Action((b) => occController.DecrementPirSensitivityInVacantState(b))); - occController.PirSensitivityInVacantStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.PirSensitivityInVacantState.JoinNumber]); - - // OR When Vacated - trilist.SetBoolSigAction(joinMap.OrWhenVacated.JoinNumber, new Action((b) => occController.SetOrWhenVacatedState(b))); - occController.OrWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.OrWhenVacated.JoinNumber]); - - // AND When Vacated - trilist.SetBoolSigAction(joinMap.AndWhenVacated.JoinNumber, new Action((b) => occController.SetAndWhenVacatedState(b))); - occController.AndWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AndWhenVacated.JoinNumber]); - - // Ultrasonic A Sensor - trilist.SetSigTrueAction(joinMap.EnableUsA.JoinNumber, new Action(() => occController.SetUsAEnable(true))); - trilist.SetSigTrueAction(joinMap.DisableUsA.JoinNumber, new Action(() => occController.SetUsAEnable(false))); - occController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsA.JoinNumber]); - - // Ultrasonic B Sensor - trilist.SetSigTrueAction(joinMap.EnableUsB.JoinNumber, new Action(() => occController.SetUsBEnable(true))); - trilist.SetSigTrueAction(joinMap.DisableUsB.JoinNumber, new Action(() => occController.SetUsBEnable(false))); - occController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsB.JoinNumber]); - - // US Sensitivity in Occupied State - trilist.SetBoolSigAction(joinMap.IncrementUsInOccupiedState.JoinNumber, new Action((b) => occController.IncrementUsSensitivityInOccupiedState(b))); - trilist.SetBoolSigAction(joinMap.DecrementUsInOccupiedState.JoinNumber, new Action((b) => occController.DecrementUsSensitivityInOccupiedState(b))); - occController.UltrasonicSensitivityInOccupiedStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.UsSensitivityInOccupiedState.JoinNumber]); - - // US Sensitivity in Vacant State - trilist.SetBoolSigAction(joinMap.IncrementUsInVacantState.JoinNumber, new Action((b) => occController.IncrementUsSensitivityInVacantState(b))); - trilist.SetBoolSigAction(joinMap.DecrementUsInVacantState.JoinNumber, new Action((b) => occController.DecrementUsSensitivityInVacantState(b))); - occController.UltrasonicSensitivityInVacantStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.UsSensitivityInVacantState.JoinNumber]); - - //Sensor Raw States - occController.RawOccupancyPirFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyPirFeedback.JoinNumber]); - occController.RawOccupancyUsFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyUsFeedback.JoinNumber]); - - // Identity mode - trilist.SetBoolSigAction(joinMap.IdentityMode.JoinNumber, occController.SetIdentityMode); - occController.IdentityModeFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IdentityModeFeedback.JoinNumber]); - } - - public class CenOdtOccupancySensorBaseControllerFactory : EssentialsDeviceFactory - { - public CenOdtOccupancySensorBaseControllerFactory() - { - TypeNames = new List() { "cenodtcpoe", "cenodtocc" }; - } - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - Debug.Console(1, "Factory Attempting to create new GlsOccupancySensorBaseController Device"); - - var typeName = dc.Type.ToLower(); - var key = dc.Key; - var name = dc.Name; - var comm = CommFactory.GetControlPropertiesConfig(dc); - - var props = dc.Properties.ToObject(); - - var occSensor = new CenOdtCPoe(comm.IpIdInt, Global.ControlSystem); - - if (occSensor == null) - { - Debug.Console(0, "ERROR: Unable to create Occupancy Sensor Device. Key: '{0}'", key); - return null; - } - - return new CenOdtOccupancySensorBaseController(key, name, occSensor, props); - } - } - } +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Resources; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.GeneralIO; +using Full.Newtonsoft.Json; +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Bridges; + +namespace PepperDash.Essentials.Core +{ + [Description("Wrapper class for CEN-ODT-C-POE")] + [ConfigSnippet("\"properties\": {\"control\": {\"method\": \"cresnet\",\"cresnetId\": \"97\"},\"enablePir\": true,\"enableLedFlash\": true,\"enableRawStates\":true,\"remoteTimeout\": 30,\"internalPhotoSensorMinChange\": 0,\"externalPhotoSensorMinChange\": 0,\"enableUsA\": true,\"enableUsB\": true,\"orWhenVacatedState\": true}")] + public class CenOdtOccupancySensorBaseController : CrestronGenericBridgeableBaseDevice, IOccupancyStatusProvider + { + public CenOdtCPoe OccSensor { get; private set; } + + public GlsOccupancySensorPropertiesConfig PropertiesConfig { get; private set; } + + public BoolFeedback RoomIsOccupiedFeedback { get; private set; } + + public BoolFeedback GraceOccupancyDetectedFeedback { get; private set; } + + public BoolFeedback RawOccupancyFeedback { get; private set; } + + public BoolFeedback PirSensorEnabledFeedback { get; private set; } + + public BoolFeedback LedFlashEnabledFeedback { get; private set; } + + public BoolFeedback ShortTimeoutEnabledFeedback { get; private set; } + + public IntFeedback PirSensitivityInVacantStateFeedback { get; private set; } + + public IntFeedback PirSensitivityInOccupiedStateFeedback { get; private set; } + + public IntFeedback CurrentTimeoutFeedback { get; private set; } + + public IntFeedback RemoteTimeoutFeedback { get; private set; } + + public IntFeedback InternalPhotoSensorValue { get; set; } + + public IntFeedback ExternalPhotoSensorValue { get; set; } + + public BoolFeedback OrWhenVacatedFeedback { get; private set; } + + public BoolFeedback AndWhenVacatedFeedback { get; private set; } + + public BoolFeedback UltrasonicAEnabledFeedback { get; private set; } + + public BoolFeedback UltrasonicBEnabledFeedback { get; private set; } + + public IntFeedback UltrasonicSensitivityInVacantStateFeedback { get; private set; } + + public IntFeedback UltrasonicSensitivityInOccupiedStateFeedback { get; private set; } + + public BoolFeedback RawOccupancyPirFeedback { get; private set; } + + public BoolFeedback RawOccupancyUsFeedback { get; private set; } + + public BoolFeedback IdentityModeFeedback { get; private set; } + + // Debug properties + public bool InTestMode { get; private set; } + + public bool TestRoomIsOccupiedFeedback { get; private set; } + + public Func RoomIsOccupiedFeedbackFunc + { + get + { + return () => InTestMode ? TestRoomIsOccupiedFeedback : OccSensor.OccupancyDetectedFeedback.BoolValue; + } + } + + public CenOdtOccupancySensorBaseController(string key, string name, CenOdtCPoe sensor, GlsOccupancySensorPropertiesConfig config) + : base(key, name, sensor) + { + PropertiesConfig = config; + + OccSensor = sensor; + + RoomIsOccupiedFeedback = new BoolFeedback(RoomIsOccupiedFeedbackFunc); + + PirSensorEnabledFeedback = new BoolFeedback(() => OccSensor.PassiveInfraredSensorEnabledFeedback.BoolValue); + + LedFlashEnabledFeedback = new BoolFeedback(() => OccSensor.LedFlashEnabledFeedback.BoolValue); + + ShortTimeoutEnabledFeedback = new BoolFeedback(() => OccSensor.ShortTimeoutEnabledFeedback.BoolValue); + + PirSensitivityInVacantStateFeedback = new IntFeedback(() => (int)OccSensor.PassiveInfraredSensorSensitivityInVacantStateFeedback); + + PirSensitivityInOccupiedStateFeedback = new IntFeedback(() => (int)OccSensor.PassiveInfraredSensorSensitivityInOccupiedStateFeedback); + + CurrentTimeoutFeedback = new IntFeedback(() => OccSensor.CurrentTimeoutFeedback.UShortValue); + + RemoteTimeoutFeedback = new IntFeedback(() => OccSensor.RemoteTimeout.UShortValue); + + GraceOccupancyDetectedFeedback = new BoolFeedback(() => OccSensor.GraceOccupancyDetectedFeedback.BoolValue); + + RawOccupancyFeedback = new BoolFeedback(() => OccSensor.RawOccupancyDetectedFeedback.BoolValue); + + InternalPhotoSensorValue = new IntFeedback(() => OccSensor.InternalPhotoSensorValueFeedback.UShortValue); + + //ExternalPhotoSensorValue = new IntFeedback(() => OccSensor.ex.UShortValue); + + AndWhenVacatedFeedback = new BoolFeedback(() => OccSensor.AndWhenVacatedFeedback.BoolValue); + + OrWhenVacatedFeedback = new BoolFeedback(() => OccSensor.OrWhenVacatedFeedback.BoolValue); + + UltrasonicAEnabledFeedback = new BoolFeedback(() => OccSensor.UltrasonicSensorSideAEnabledFeedback.BoolValue); + + UltrasonicBEnabledFeedback = new BoolFeedback(() => OccSensor.UltrasonicSensorSideBEnabledFeedback.BoolValue); + + RawOccupancyPirFeedback = new BoolFeedback(() => OccSensor.RawOccupancyDetectedByPassiveInfraredSensorFeedback.BoolValue); + + RawOccupancyUsFeedback = new BoolFeedback(() => OccSensor.RawOccupancyDetectedByUltrasonicSensorFeedback.BoolValue); + + IdentityModeFeedback = new BoolFeedback(()=>OccSensor.IdentityModeOnFeedback.BoolValue); + + UltrasonicSensitivityInVacantStateFeedback = new IntFeedback(() => (int)OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback); + + UltrasonicSensitivityInOccupiedStateFeedback = new IntFeedback(() => (int)OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback); + + OccSensor.BaseEvent += new Crestron.SimplSharpPro.BaseEventHandler(OccSensor_BaseEvent); + + OccSensor.CenOccupancySensorChange += new GenericEventHandler(OccSensor_CenOccupancySensorChange); + + AddPostActivationAction(() => + { + OccSensor.OnlineStatusChange += (o, a) => + { + if (a.DeviceOnLine) + { + ApplySettingsToSensorFromConfig(); + } + }; + + if (OccSensor.IsOnline) + { + ApplySettingsToSensorFromConfig(); + + } + }); + } + + /// + /// Applies any sensor settings defined in config + /// + protected virtual void ApplySettingsToSensorFromConfig() + { + Debug.Console(1, this, "Checking config for settings to apply"); + + if (PropertiesConfig.EnablePir != null) + { + SetPirEnable((bool)PropertiesConfig.EnablePir); + } + + if (PropertiesConfig.EnableLedFlash != null) + { + SetLedFlashEnable((bool)PropertiesConfig.EnableLedFlash); + } + + if (PropertiesConfig.RemoteTimeout != null) + { + SetRemoteTimeout((ushort)PropertiesConfig.RemoteTimeout); + } + + if (PropertiesConfig.ShortTimeoutState != null) + { + SetShortTimeoutState((bool)PropertiesConfig.ShortTimeoutState); + } + + if (PropertiesConfig.EnableRawStates != null) + { + EnableRawStates((bool)PropertiesConfig.EnableRawStates); + } + + if (PropertiesConfig.InternalPhotoSensorMinChange != null) + { + SetInternalPhotoSensorMinChange((ushort)PropertiesConfig.InternalPhotoSensorMinChange); + } + + if (PropertiesConfig.EnableUsA != null) + { + SetUsAEnable((bool)PropertiesConfig.EnableUsA); + } + + if (PropertiesConfig.EnableUsB != null) + { + SetUsBEnable((bool)PropertiesConfig.EnableUsB); + } + + if (PropertiesConfig.OrWhenVacatedState != null) + { + SetOrWhenVacatedState((bool)PropertiesConfig.OrWhenVacatedState); + } + + if (PropertiesConfig.AndWhenVacatedState != null) + { + SetAndWhenVacatedState((bool)PropertiesConfig.AndWhenVacatedState); + } + + // TODO [ ] feature/cenoodtcpoe-sensor-sensitivity-configuration + if (PropertiesConfig.UsSensitivityOccupied != null) + { + SetUsSensitivityOccupied((ushort)PropertiesConfig.UsSensitivityOccupied); + } + + if (PropertiesConfig.UsSensitivityVacant != null) + { + SetUsSensitivityVacant((ushort)PropertiesConfig.UsSensitivityVacant); + } + + if (PropertiesConfig.PirSensitivityOccupied != null) + { + SetPirSensitivityOccupied((ushort)PropertiesConfig.PirSensitivityOccupied); + } + + if (PropertiesConfig.PirSensitivityVacant != null) + { + SetPirSensitivityVacant((ushort)PropertiesConfig.PirSensitivityVacant); + } + } + + /// + /// Catches events for feedbacks on the base class. Any extending wrapper class should call this delegate after it checks for it's own event IDs. + /// + /// + /// + protected virtual void OccSensor_CenOccupancySensorChange(object device, GenericEventArgs args) + { + if (args.EventId == GlsOccupancySensorBase.PirEnabledFeedbackEventId) + PirSensorEnabledFeedback.FireUpdate(); + else if (args.EventId == GlsOccupancySensorBase.LedFlashEnabledFeedbackEventId) + LedFlashEnabledFeedback.FireUpdate(); + else if (args.EventId == GlsOccupancySensorBase.ShortTimeoutEnabledFeedbackEventId) + ShortTimeoutEnabledFeedback.FireUpdate(); + else if (args.EventId == GlsOccupancySensorBase.PirSensitivityInOccupiedStateFeedbackEventId) + PirSensitivityInOccupiedStateFeedback.FireUpdate(); + else if (args.EventId == GlsOccupancySensorBase.PirSensitivityInVacantStateFeedbackEventId) + PirSensitivityInVacantStateFeedback.FireUpdate(); + else if (args.EventId == GlsOccupancySensorBase.RawOccupancyPirFeedbackEventId) + RawOccupancyPirFeedback.FireUpdate(); + else if (args.EventId == GlsOccupancySensorBase.RawOccupancyUsFeedbackEventId) + RawOccupancyUsFeedback.FireUpdate(); + } + + protected virtual void OccSensor_BaseEvent(Crestron.SimplSharpPro.GenericBase device, Crestron.SimplSharpPro.BaseEventArgs args) + { + Debug.Console(2, this, "PoEOccupancySensorChange EventId: {0}", args.EventId); + + if (args.EventId == Crestron.SimplSharpPro.GeneralIO.GlsOccupancySensorBase.RoomOccupiedFeedbackEventId + || args.EventId == Crestron.SimplSharpPro.GeneralIO.GlsOccupancySensorBase.RoomVacantFeedbackEventId) + { + Debug.Console(1, this, "Occupancy State: {0}", OccSensor.OccupancyDetectedFeedback.BoolValue); + RoomIsOccupiedFeedback.FireUpdate(); + } + else if (args.EventId == GlsOccupancySensorBase.TimeoutFeedbackEventId) + CurrentTimeoutFeedback.FireUpdate(); + else if (args.EventId == GlsOccupancySensorBase.TimeoutLocalFeedbackEventId) + RemoteTimeoutFeedback.FireUpdate(); + else if (args.EventId == GlsOccupancySensorBase.GraceOccupancyDetectedFeedbackEventId) + GraceOccupancyDetectedFeedback.FireUpdate(); + else if (args.EventId == GlsOccupancySensorBase.RawOccupancyFeedbackEventId) + RawOccupancyFeedback.FireUpdate(); + else if (args.EventId == GlsOccupancySensorBase.InternalPhotoSensorValueFeedbackEventId) + InternalPhotoSensorValue.FireUpdate(); + else if (args.EventId == GlsOccupancySensorBase.ExternalPhotoSensorValueFeedbackEventId) + ExternalPhotoSensorValue.FireUpdate(); + else if (args.EventId == GlsOccupancySensorBase.AndWhenVacatedFeedbackEventId) + AndWhenVacatedFeedback.FireUpdate(); + else if (args.EventId == GlsOccupancySensorBase.OrWhenVacatedFeedbackEventId) + OrWhenVacatedFeedback.FireUpdate(); + else if (args.EventId == GlsOccupancySensorBase.UsAEnabledFeedbackEventId) + UltrasonicAEnabledFeedback.FireUpdate(); + else if (args.EventId == GlsOccupancySensorBase.UsBEnabledFeedbackEventId) + UltrasonicBEnabledFeedback.FireUpdate(); + else if (args.EventId == GlsOccupancySensorBase.UsSensitivityInOccupiedStateFeedbackEventId) + UltrasonicSensitivityInOccupiedStateFeedback.FireUpdate(); + else if (args.EventId == GlsOccupancySensorBase.UsSensitivityInVacantStateFeedbackEventId) + UltrasonicSensitivityInVacantStateFeedback.FireUpdate(); + } + + public void SetTestMode(bool mode) + { + InTestMode = mode; + + Debug.Console(1, this, "In Mock Mode: '{0}'", InTestMode); + } + + public void SetTestOccupiedState(bool state) + { + if (!InTestMode) + Debug.Console(1, "Mock mode not enabled"); + else + { + TestRoomIsOccupiedFeedback = state; + + RoomIsOccupiedFeedback.FireUpdate(); + } + } + + /// + /// Sets the identity mode on or off + /// + /// + public void SetIdentityMode(bool state) + { + if (state) + OccSensor.IdentityModeOn(); + else + OccSensor.IdentityModeOff(); + + Debug.Console(1, this, "Identity Mode: {0}", OccSensor.IdentityModeOnFeedback.BoolValue ? "On" : "Off"); + } + + /// + /// Enables or disables the PIR sensor + /// + /// + public void SetPirEnable(bool state) + { + if (state) + { + OccSensor.EnablePassiveInfraredSensor(); + } + else + { + OccSensor.DisablePassiveInfraredSensor(); + } + } + + /// + /// Enables or disables the LED Flash + /// + /// + public void SetLedFlashEnable(bool state) + { + if (state) + { + OccSensor.EnableLedFlash(); + } + else + { + OccSensor.DisableLedFlash(); + } + } + + /// + /// Enables or disables short timeout based on state + /// + /// + public void SetShortTimeoutState(bool state) + { + if (state) + { + OccSensor.EnableShortTimeout(); + } + else + { + OccSensor.DisableShortTimeout(); + } + } + + public void IncrementPirSensitivityInOccupiedState(bool pressRelease) + { + if ((int)OccSensor.PassiveInfraredSensorSensitivityInOccupiedStateFeedback != 3) + { + OccSensor.PassiveInfraredSensorSensitivityInOccupiedState = OccSensor.PassiveInfraredSensorSensitivityInOccupiedStateFeedback + 1; + } + } + + public void DecrementPirSensitivityInOccupiedState(bool pressRelease) + { + if ((int)OccSensor.PassiveInfraredSensorSensitivityInOccupiedStateFeedback != 0) + { + OccSensor.PassiveInfraredSensorSensitivityInOccupiedState = OccSensor.PassiveInfraredSensorSensitivityInOccupiedStateFeedback - 1; + } + } + + public void IncrementPirSensitivityInVacantState(bool pressRelease) + { + if ((int)OccSensor.PassiveInfraredSensorSensitivityInVacantStateFeedback != 3) + { + OccSensor.PassiveInfraredSensorSensitivityInVacantState = OccSensor.PassiveInfraredSensorSensitivityInVacantStateFeedback + 1; + } + } + + public void DecrementPirSensitivityInVacantState(bool pressRelease) + { + if ((int)OccSensor.PassiveInfraredSensorSensitivityInVacantStateFeedback != 0) + { + OccSensor.PassiveInfraredSensorSensitivityInVacantState = OccSensor.PassiveInfraredSensorSensitivityInVacantStateFeedback - 1; + } + } + + public void IncrementUsSensitivityInOccupiedState(bool pressRelease) + { + if ((int)OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback < 3) + { + OccSensor.UltrasonicSensorSensitivityInOccupiedState = OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback + 1; + } + else if ((int)OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback > 4) + { + OccSensor.UltrasonicSensorSensitivityInOccupiedState = OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback - 1; + } + else if ((int)OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback == 4) + { + OccSensor.UltrasonicSensorSensitivityInOccupiedState = 0; + } + } + + public void DecrementUsSensitivityInOccupiedState(bool pressRelease) + { + if ((int)OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback > 0 + && (int)OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback < 4) + { + OccSensor.UltrasonicSensorSensitivityInOccupiedState = OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback - 1; + } + else if ((int)OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback > 3 + && (int)OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback < 7) + { + OccSensor.UltrasonicSensorSensitivityInOccupiedState = OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback + 1; + } + } + + public void IncrementUsSensitivityInVacantState(bool pressRelease) + { + if ((int)OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback < 3) + { + OccSensor.UltrasonicSensorSensitivityInVacantState = OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback + 1; + } + else if ((int)OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback > 4) + { + OccSensor.UltrasonicSensorSensitivityInVacantState = OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback - 1; + } + else if ((int)OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback == 4) + { + OccSensor.UltrasonicSensorSensitivityInVacantState = 0; + } + } + + public void DecrementUsSensitivityInVacantState(bool pressRelease) + { + if ((int)OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback > 0 + && (int)OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback < 4) + { + OccSensor.UltrasonicSensorSensitivityInVacantState = OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback - 1; + } + else if ((int)OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback > 3 + && (int)OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback < 7) + { + OccSensor.UltrasonicSensorSensitivityInVacantState = OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback + 1; + } + } + + public void ForceOccupied() + { + OccSensor.ForceOccupied(); + } + + public void ForceVacant() + { + OccSensor.ForceVacant(); + } + + public void EnableRawStates(bool state) + { + if (state) + { + OccSensor.EnableRawStates(); + } + else + OccSensor.DisableRawStates(); + } + + public void SetRemoteTimeout(ushort time) + { + OccSensor.RemoteTimeout.UShortValue = time; + } + + public void SetInternalPhotoSensorMinChange(ushort value) + { + OccSensor.InternalPhotoSensorMinimumChange.UShortValue = value; + } + + /// + /// Sets the OrWhenVacated state + /// + /// + public void SetOrWhenVacatedState(bool state) + { + if (state) + { + OccSensor.OrWhenVacated(); + } + } + + /// + /// Sets the AndWhenVacated state + /// + /// + public void SetAndWhenVacatedState(bool state) + { + if (state) + { + OccSensor.AndWhenVacated(); + } + } + + /// + /// Enables or disables the Ultrasonic A sensor + /// + /// + public void SetUsAEnable(bool state) + { + if (state) + { + OccSensor.EnableUltrasonicSensorSideA(); + } + else + { + OccSensor.DisableUltrasonicSensorSideA(); + } + } + + + /// + /// Enables or disables the Ultrasonic B sensor + /// + /// + public void SetUsBEnable(bool state) + { + if (state) + { + OccSensor.EnableUltrasonicSensorSideB(); + } + else + { + OccSensor.DisableUltrasonicSensorSideB(); + } + } + + /// + /// Sets the US sensor sensitivity for occupied state + /// + /// + public void SetUsSensitivityOccupied(ushort sensitivity) + { + var level = (eSensitivityLevel) sensitivity; + if (level == 0) return; + + OccSensor.UltrasonicSensorSensitivityInOccupiedState = level; + } + + /// + /// Sets the US sensor sensitivity for vacant state + /// + /// + public void SetUsSensitivityVacant(ushort sensitivity) + { + var level = (eSensitivityLevel)sensitivity; + if (level == 0) return; + + OccSensor.UltrasonicSensorSensitivityInVacantState = level; + } + + /// + /// Sets the PIR sensor sensitivity for occupied state + /// + /// + public void SetPirSensitivityOccupied(ushort sensitivity) + { + var level = (eSensitivityLevel)sensitivity; + if (level == 0) return; + + OccSensor.PassiveInfraredSensorSensitivityInOccupiedState = level; + } + + /// + /// Sets the PIR sensor sensitivity for vacant state + /// + /// + public void SetPirSensitivityVacant(ushort sensitivity) + { + var level = (eSensitivityLevel)sensitivity; + if (level == 0) return; + + OccSensor.PassiveInfraredSensorSensitivityInVacantState = level; + } + + /// + /// Method to print current settings to console + /// + public void GetSettings() + { + var dash = new string('*', 50); + CrestronConsole.PrintLine(string.Format("{0}\n", dash)); + + Debug.Console(0, this, "Vacancy Detected: {0}", + OccSensor.VacancyDetectedFeedback.BoolValue); + + Debug.Console(0, Key, "Timeout Current: {0} | Remote: {1}", + OccSensor.CurrentTimeoutFeedback.UShortValue, + OccSensor.RemoteTimeout.UShortValue); + + Debug.Console(0, Key, "Short Timeout Enabled: {0}", + OccSensor.ShortTimeoutEnabledFeedback.BoolValue); + + Debug.Console(0, Key, "PIR Sensor Enabled: {0} | Sensitivity Occupied: {1} | Sensitivity Vacant: {2}", + OccSensor.PassiveInfraredSensorEnabledFeedback.BoolValue, + OccSensor.PassiveInfraredSensorSensitivityInOccupiedStateFeedback, + OccSensor.PassiveInfraredSensorSensitivityInVacantStateFeedback); + + Debug.Console(0, Key, "Ultrasonic Enabled A: {0} | B: {1}", + OccSensor.UltrasonicSensorSideAEnabledFeedback.BoolValue, + OccSensor.UltrasonicSensorSideBEnabledFeedback.BoolValue); + + Debug.Console(0, Key, "Ultrasonic Sensitivity Occupied: {0} | Vacant: {1}", + OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback, + OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback); + + CrestronConsole.PrintLine(string.Format("{0}\n", dash)); + } + + + public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + LinkOccSensorToApi(this, trilist, joinStart, joinMapKey, bridge); + } + + protected void LinkOccSensorToApi(CenOdtOccupancySensorBaseController occController, + BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + CenOdtOccupancySensorBaseJoinMap joinMap = new CenOdtOccupancySensorBaseJoinMap(joinStart); + + var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); + + if (bridge != null) + { + bridge.AddJoinMap(Key, joinMap); + } + else + { + Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); + } + + Debug.Console(1, occController, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); + + occController.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.Online.JoinNumber]); + trilist.StringInput[joinMap.Name.JoinNumber].StringValue = occController.Name; + + trilist.OnlineStatusChange += new Crestron.SimplSharpPro.OnlineStatusChangeEventHandler((d, args) => + { + if (args.DeviceOnLine) + { + trilist.StringInput[joinMap.Name.JoinNumber].StringValue = occController.Name; + } + } + ); + + // Occupied status + trilist.SetSigTrueAction(joinMap.ForceOccupied.JoinNumber, new Action(() => occController.ForceOccupied())); + trilist.SetSigTrueAction(joinMap.ForceVacant.JoinNumber, new Action(() => occController.ForceVacant())); + occController.RoomIsOccupiedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RoomOccupiedFeedback.JoinNumber]); + occController.RoomIsOccupiedFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.RoomVacantFeedback.JoinNumber]); + occController.RawOccupancyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyFeedback.JoinNumber]); + trilist.SetBoolSigAction(joinMap.EnableRawStates.JoinNumber, new Action((b) => occController.EnableRawStates(b))); + + // Timouts + trilist.SetUShortSigAction(joinMap.Timeout.JoinNumber, new Action((u) => occController.SetRemoteTimeout(u))); + occController.CurrentTimeoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.Timeout.JoinNumber]); + occController.RemoteTimeoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeoutLocalFeedback.JoinNumber]); + + // LED Flash + trilist.SetSigTrueAction(joinMap.EnableLedFlash.JoinNumber, new Action(() => occController.SetLedFlashEnable(true))); + trilist.SetSigTrueAction(joinMap.DisableLedFlash.JoinNumber, new Action(() => occController.SetLedFlashEnable(false))); + occController.LedFlashEnabledFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.EnableLedFlash.JoinNumber]); + + // Short Timeout + trilist.SetSigTrueAction(joinMap.EnableShortTimeout.JoinNumber, new Action(() => occController.SetShortTimeoutState(true))); + trilist.SetSigTrueAction(joinMap.DisableShortTimeout.JoinNumber, new Action(() => occController.SetShortTimeoutState(false))); + occController.ShortTimeoutEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableShortTimeout.JoinNumber]); + + // PIR Sensor + trilist.SetSigTrueAction(joinMap.EnablePir.JoinNumber, new Action(() => occController.SetPirEnable(true))); + trilist.SetSigTrueAction(joinMap.DisablePir.JoinNumber, new Action(() => occController.SetPirEnable(false))); + occController.PirSensorEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnablePir.JoinNumber]); + + // PIR Sensitivity in Occupied State + trilist.SetBoolSigAction(joinMap.IncrementPirInOccupiedState.JoinNumber, new Action((b) => occController.IncrementPirSensitivityInOccupiedState(b))); + trilist.SetBoolSigAction(joinMap.DecrementPirInOccupiedState.JoinNumber, new Action((b) => occController.DecrementPirSensitivityInOccupiedState(b))); + occController.PirSensitivityInOccupiedStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.PirSensitivityInOccupiedState.JoinNumber]); + + // PIR Sensitivity in Vacant State + trilist.SetBoolSigAction(joinMap.IncrementPirInVacantState.JoinNumber, new Action((b) => occController.IncrementPirSensitivityInVacantState(b))); + trilist.SetBoolSigAction(joinMap.DecrementPirInVacantState.JoinNumber, new Action((b) => occController.DecrementPirSensitivityInVacantState(b))); + occController.PirSensitivityInVacantStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.PirSensitivityInVacantState.JoinNumber]); + + // OR When Vacated + trilist.SetBoolSigAction(joinMap.OrWhenVacated.JoinNumber, new Action((b) => occController.SetOrWhenVacatedState(b))); + occController.OrWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.OrWhenVacated.JoinNumber]); + + // AND When Vacated + trilist.SetBoolSigAction(joinMap.AndWhenVacated.JoinNumber, new Action((b) => occController.SetAndWhenVacatedState(b))); + occController.AndWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AndWhenVacated.JoinNumber]); + + // Ultrasonic A Sensor + trilist.SetSigTrueAction(joinMap.EnableUsA.JoinNumber, new Action(() => occController.SetUsAEnable(true))); + trilist.SetSigTrueAction(joinMap.DisableUsA.JoinNumber, new Action(() => occController.SetUsAEnable(false))); + occController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsA.JoinNumber]); + + // Ultrasonic B Sensor + trilist.SetSigTrueAction(joinMap.EnableUsB.JoinNumber, new Action(() => occController.SetUsBEnable(true))); + trilist.SetSigTrueAction(joinMap.DisableUsB.JoinNumber, new Action(() => occController.SetUsBEnable(false))); + occController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsB.JoinNumber]); + + // US Sensitivity in Occupied State + trilist.SetBoolSigAction(joinMap.IncrementUsInOccupiedState.JoinNumber, new Action((b) => occController.IncrementUsSensitivityInOccupiedState(b))); + trilist.SetBoolSigAction(joinMap.DecrementUsInOccupiedState.JoinNumber, new Action((b) => occController.DecrementUsSensitivityInOccupiedState(b))); + occController.UltrasonicSensitivityInOccupiedStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.UsSensitivityInOccupiedState.JoinNumber]); + + // US Sensitivity in Vacant State + trilist.SetBoolSigAction(joinMap.IncrementUsInVacantState.JoinNumber, new Action((b) => occController.IncrementUsSensitivityInVacantState(b))); + trilist.SetBoolSigAction(joinMap.DecrementUsInVacantState.JoinNumber, new Action((b) => occController.DecrementUsSensitivityInVacantState(b))); + occController.UltrasonicSensitivityInVacantStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.UsSensitivityInVacantState.JoinNumber]); + + //Sensor Raw States + occController.RawOccupancyPirFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyPirFeedback.JoinNumber]); + occController.RawOccupancyUsFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyUsFeedback.JoinNumber]); + + // Identity mode + trilist.SetBoolSigAction(joinMap.IdentityMode.JoinNumber, occController.SetIdentityMode); + occController.IdentityModeFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IdentityModeFeedback.JoinNumber]); + } + + public class CenOdtOccupancySensorBaseControllerFactory : EssentialsDeviceFactory + { + public CenOdtOccupancySensorBaseControllerFactory() + { + TypeNames = new List() { "cenodtcpoe", "cenodtocc" }; + } + + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + Debug.Console(1, "Factory Attempting to create new GlsOccupancySensorBaseController Device"); + + var typeName = dc.Type.ToLower(); + var key = dc.Key; + var name = dc.Name; + var comm = CommFactory.GetControlPropertiesConfig(dc); + + var props = dc.Properties.ToObject(); + + var occSensor = new CenOdtCPoe(comm.IpIdInt, Global.ControlSystem); + + if (occSensor == null) + { + Debug.Console(0, "ERROR: Unable to create Occupancy Sensor Device. Key: '{0}'", key); + return null; + } + + return new CenOdtOccupancySensorBaseController(key, name, occSensor, props); + } + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Occupancy/EssentialsGlsOccupancySensorBaseController.cs.orig b/src/PepperDash.Essentials.Core/Occupancy/EssentialsGlsOccupancySensorBaseController.cs.orig similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Occupancy/EssentialsGlsOccupancySensorBaseController.cs.orig rename to src/PepperDash.Essentials.Core/Occupancy/EssentialsGlsOccupancySensorBaseController.cs.orig diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Occupancy/GlsOccupancySensorBaseController.cs b/src/PepperDash.Essentials.Core/Occupancy/GlsOccupancySensorBaseController.cs similarity index 97% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Occupancy/GlsOccupancySensorBaseController.cs rename to src/PepperDash.Essentials.Core/Occupancy/GlsOccupancySensorBaseController.cs index 53db1716..013af926 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Occupancy/GlsOccupancySensorBaseController.cs +++ b/src/PepperDash.Essentials.Core/Occupancy/GlsOccupancySensorBaseController.cs @@ -1,539 +1,541 @@ -using System; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.GeneralIO; -using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Essentials.Core.Config; -using PepperDash.Essentials.Core.Bridges; - -namespace PepperDash.Essentials.Core -{ - [Description("Wrapper class for Single Technology GLS Occupancy Sensors")] - [ConfigSnippet("\"properties\": {\"control\": {\"method\": \"cresnet\",\"cresnetId\": \"97\"},\"enablePir\": true,\"enableLedFlash\": true,\"enableRawStates\":true,\"remoteTimeout\": 30,\"internalPhotoSensorMinChange\": 0,\"externalPhotoSensorMinChange\": 0}")] - public abstract class GlsOccupancySensorBaseController : CrestronGenericBridgeableBaseDevice, IOccupancyStatusProvider - { - public GlsOccupancySensorPropertiesConfig PropertiesConfig { get; private set; } - - protected GlsOccupancySensorBase OccSensor; - - public BoolFeedback RoomIsOccupiedFeedback { get; private set; } - - public BoolFeedback GraceOccupancyDetectedFeedback { get; private set; } - - public BoolFeedback RawOccupancyFeedback { get; private set; } - - public BoolFeedback PirSensorEnabledFeedback { get; private set; } - - public BoolFeedback LedFlashEnabledFeedback { get; private set; } - - public BoolFeedback ShortTimeoutEnabledFeedback { get; private set; } - - public IntFeedback PirSensitivityInVacantStateFeedback { get; private set; } - - public IntFeedback PirSensitivityInOccupiedStateFeedback { get; private set; } - - public IntFeedback CurrentTimeoutFeedback { get; private set; } - - public IntFeedback LocalTimoutFeedback { get; private set; } - - public IntFeedback InternalPhotoSensorValue { get; set; } - - public IntFeedback ExternalPhotoSensorValue { get; set; } - - // Debug properties - public bool InTestMode { get; private set; } - - public bool TestRoomIsOccupiedFeedback { get; private set; } - - public Func RoomIsOccupiedFeedbackFunc - { - get - { - return () => InTestMode ? TestRoomIsOccupiedFeedback : OccSensor.OccupancyDetectedFeedback.BoolValue; - } - } - - protected GlsOccupancySensorBaseController(string key, DeviceConfig config) - : this(key, config.Name, config) - { - } - - protected GlsOccupancySensorBaseController(string key, string name, DeviceConfig config) - : base(key, name) - { - - var props = config.Properties.ToObject(); - - if (props != null) - { - PropertiesConfig = props; - } - else - { - Debug.Console(1, this, "props are null. Unable to deserialize into GlsOccupancySensorPropertiesConfig"); - } - - AddPostActivationAction(() => - { - OccSensor.OnlineStatusChange += (o, a) => - { - if (a.DeviceOnLine) - { - ApplySettingsToSensorFromConfig(); - } - }; - - if (OccSensor.IsOnline) - { - ApplySettingsToSensorFromConfig(); - - } - }); - } - - - /// - /// Applies any sensor settings defined in config - /// - protected virtual void ApplySettingsToSensorFromConfig() - { - Debug.Console(1, this, "Attempting to apply settings to sensor from config"); - - if (PropertiesConfig.EnablePir != null) - { - Debug.Console(1, this, "EnablePir found, attempting to set value from config"); - SetPirEnable((bool)PropertiesConfig.EnablePir); - } - else - { - Debug.Console(1, this, "EnablePir null, no value specified in config"); - } - - if (PropertiesConfig.EnableLedFlash != null) - { - Debug.Console(1, this, "EnableLedFlash found, attempting to set value from config"); - SetLedFlashEnable((bool)PropertiesConfig.EnableLedFlash); - } - - if (PropertiesConfig.RemoteTimeout != null) - { - Debug.Console(1, this, "RemoteTimeout found, attempting to set value from config"); - SetRemoteTimeout((ushort)PropertiesConfig.RemoteTimeout); - } - else - { - Debug.Console(1, this, "RemoteTimeout null, no value specified in config"); - } - - if (PropertiesConfig.ShortTimeoutState != null) - { - SetShortTimeoutState((bool)PropertiesConfig.ShortTimeoutState); - } - - if (PropertiesConfig.EnableRawStates != null) - { - EnableRawStates((bool)PropertiesConfig.EnableRawStates); - } - - if (PropertiesConfig.InternalPhotoSensorMinChange != null) - { - SetInternalPhotoSensorMinChange((ushort)PropertiesConfig.InternalPhotoSensorMinChange); - } - - if (PropertiesConfig.ExternalPhotoSensorMinChange != null) - { - SetExternalPhotoSensorMinChange((ushort)PropertiesConfig.ExternalPhotoSensorMinChange); - } - } - - protected void RegisterGlsOccupancySensorBaseController(GlsOccupancySensorBase occSensor) - { - OccSensor = occSensor; - - RoomIsOccupiedFeedback = new BoolFeedback(RoomIsOccupiedFeedbackFunc); - - PirSensorEnabledFeedback = new BoolFeedback(() => OccSensor.PirEnabledFeedback.BoolValue); - - LedFlashEnabledFeedback = new BoolFeedback(() => OccSensor.LedFlashEnabledFeedback.BoolValue); - - ShortTimeoutEnabledFeedback = new BoolFeedback(() => OccSensor.ShortTimeoutEnabledFeedback.BoolValue); - - PirSensitivityInVacantStateFeedback = - new IntFeedback(() => OccSensor.PirSensitivityInVacantStateFeedback.UShortValue); - - PirSensitivityInOccupiedStateFeedback = - new IntFeedback(() => OccSensor.PirSensitivityInOccupiedStateFeedback.UShortValue); - - CurrentTimeoutFeedback = new IntFeedback(() => OccSensor.CurrentTimeoutFeedback.UShortValue); - - LocalTimoutFeedback = new IntFeedback(() => OccSensor.LocalTimeoutFeedback.UShortValue); - - GraceOccupancyDetectedFeedback = - new BoolFeedback(() => OccSensor.GraceOccupancyDetectedFeedback.BoolValue); - - RawOccupancyFeedback = new BoolFeedback(() => OccSensor.RawOccupancyFeedback.BoolValue); - - InternalPhotoSensorValue = new IntFeedback(() => OccSensor.InternalPhotoSensorValueFeedback.UShortValue); - - ExternalPhotoSensorValue = new IntFeedback(() => OccSensor.ExternalPhotoSensorValueFeedback.UShortValue); - - OccSensor.BaseEvent += OccSensor_BaseEvent; - - OccSensor.GlsOccupancySensorChange += OccSensor_GlsOccupancySensorChange; - } - - - /// - /// Catches events for feedbacks on the base class. Any extending wrapper class should call this delegate after it checks for it's own event IDs. - /// - /// - /// - protected virtual void OccSensor_GlsOccupancySensorChange(GlsOccupancySensorBase device, GlsOccupancySensorChangeEventArgs args) - { - switch (args.EventId) - { - case GlsOccupancySensorBase.PirEnabledFeedbackEventId: - PirSensorEnabledFeedback.FireUpdate(); - break; - case GlsOccupancySensorBase.LedFlashEnabledFeedbackEventId: - LedFlashEnabledFeedback.FireUpdate(); - break; - case GlsOccupancySensorBase.ShortTimeoutEnabledFeedbackEventId: - ShortTimeoutEnabledFeedback.FireUpdate(); - break; - case GlsOccupancySensorBase.PirSensitivityInOccupiedStateFeedbackEventId: - PirSensitivityInOccupiedStateFeedback.FireUpdate(); - break; - case GlsOccupancySensorBase.PirSensitivityInVacantStateFeedbackEventId: - PirSensitivityInVacantStateFeedback.FireUpdate(); - break; - } - } - - protected virtual void OccSensor_BaseEvent(Crestron.SimplSharpPro.GenericBase device, Crestron.SimplSharpPro.BaseEventArgs args) - { - Debug.Console(2, this, "GlsOccupancySensorChange EventId: {0}", args.EventId); - - switch (args.EventId) - { - case GlsOccupancySensorBase.RoomVacantFeedbackEventId: - case GlsOccupancySensorBase.RoomOccupiedFeedbackEventId: - Debug.Console(1, this, "Occupancy State: {0}", OccSensor.OccupancyDetectedFeedback.BoolValue); - RoomIsOccupiedFeedback.FireUpdate(); - break; - case GlsOccupancySensorBase.TimeoutFeedbackEventId: - CurrentTimeoutFeedback.FireUpdate(); - break; - case GlsOccupancySensorBase.TimeoutLocalFeedbackEventId: - LocalTimoutFeedback.FireUpdate(); - break; - case GlsOccupancySensorBase.GraceOccupancyDetectedFeedbackEventId: - GraceOccupancyDetectedFeedback.FireUpdate(); - break; - case GlsOccupancySensorBase.RawOccupancyFeedbackEventId: - RawOccupancyFeedback.FireUpdate(); - break; - case GlsOccupancySensorBase.InternalPhotoSensorValueFeedbackEventId: - InternalPhotoSensorValue.FireUpdate(); - break; - case GlsOccupancySensorBase.ExternalPhotoSensorValueFeedbackEventId: - ExternalPhotoSensorValue.FireUpdate(); - break; - } - } - - public void SetTestMode(bool mode) - { - InTestMode = mode; - - Debug.Console(1, this, "In Mock Mode: '{0}'", InTestMode); - } - - public void SetTestOccupiedState(bool state) - { - if (!InTestMode) - Debug.Console(1, "Mock mode not enabled"); - else - { - TestRoomIsOccupiedFeedback = state; - - RoomIsOccupiedFeedback.FireUpdate(); - } - } - - /// - /// Enables or disables the PIR sensor - /// - /// - public void SetPirEnable(bool state) - { - Debug.Console(1, this, "Setting EnablePir to: {0}", state); - - OccSensor.EnablePir.BoolValue = state; - OccSensor.DisablePir.BoolValue = !state; - } - - /// - /// Enables or disables the LED Flash - /// - /// - public void SetLedFlashEnable(bool state) - { - OccSensor.EnableLedFlash.BoolValue = state; - OccSensor.DisableLedFlash.BoolValue = !state; - } - - /// - /// Enables or disables short timeout based on state - /// - /// - public void SetShortTimeoutState(bool state) - { - OccSensor.EnableShortTimeout.BoolValue = state; - OccSensor.DisableShortTimeout.BoolValue = !state; - } - - public void IncrementPirSensitivityInOccupiedState(bool pressRelease) - { - OccSensor.IncrementPirSensitivityInOccupiedState.BoolValue = pressRelease; - } - - public void DecrementPirSensitivityInOccupiedState(bool pressRelease) - { - OccSensor.DecrementPirSensitivityInOccupiedState.BoolValue = pressRelease; - } - - public void IncrementPirSensitivityInVacantState(bool pressRelease) - { - OccSensor.IncrementPirSensitivityInVacantState.BoolValue = pressRelease; - } - - public void DecrementPirSensitivityInVacantState(bool pressRelease) - { - OccSensor.DecrementPirSensitivityInVacantState.BoolValue = pressRelease; - } - - /// - /// Pulse ForceOccupied on the sensor for .5 seconds - /// - public void ForceOccupied() - { - CrestronInvoke.BeginInvoke((o) => - { - ForceOccupied(true); - CrestronEnvironment.Sleep(500); - ForceOccupied(false); - }); - } - - public void ForceOccupied(bool value) - { - OccSensor.ForceOccupied.BoolValue = value; - } - - /// - /// Pulse ForceVacant on the sensor for .5 seconds - /// - public void ForceVacant() - { - CrestronInvoke.BeginInvoke((o) => - { - ForceVacant(true); - CrestronEnvironment.Sleep(500); - ForceVacant(false); - }); - } - - public void ForceVacant(bool value) - { - OccSensor.ForceVacant.BoolValue = value; - } - - public void EnableRawStates(bool state) - { - OccSensor.EnableRawStates.BoolValue = state; - } - - public void SetRemoteTimeout(ushort time) - { - Debug.Console(1, this, "Setting RemoteTimout to: {0}", time); - - OccSensor.RemoteTimeout.UShortValue = time; - } - - public void SetInternalPhotoSensorMinChange(ushort value) - { - OccSensor.InternalPhotoSensorMinimumChange.UShortValue = value; - } - - public void SetExternalPhotoSensorMinChange(ushort value) - { - OccSensor.ExternalPhotoSensorMinimumChange.UShortValue = value; - } - - /// - /// Method to print current occ settings to console. - /// - public virtual void GetSettings() - { - var dash = new string('*', 50); - CrestronConsole.PrintLine(string.Format("{0}\n", dash)); - - Debug.Console(0, this, "Vacancy Detected: {0}", - OccSensor.VacancyDetectedFeedback.BoolValue); - - Debug.Console(0, this, "Timeout Current: {0} | Local: {1}", - OccSensor.CurrentTimeoutFeedback.UShortValue, - OccSensor.LocalTimeoutFeedback.UShortValue); - - Debug.Console(0, this, "Short Timeout Enabled: {0}", - OccSensor.ShortTimeoutEnabledFeedback.BoolValue); - - Debug.Console(0, this, "PIR Sensor Enabled: {0} | Sensitivity Occupied: {1} | Sensitivity Vacant: {2}", - OccSensor.PirEnabledFeedback.BoolValue, - OccSensor.PirSensitivityInOccupiedStateFeedback.UShortValue, - OccSensor.PirSensitivityInVacantStateFeedback.UShortValue); - - CrestronConsole.PrintLine(string.Format("{0}\n", dash)); - } - - protected void LinkOccSensorToApi(GlsOccupancySensorBaseController occController, BasicTriList trilist, - uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - var joinMap = new GlsOccupancySensorBaseJoinMap(joinStart); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - if (bridge != null) - { - bridge.AddJoinMap(Key, joinMap); - } - else - { - Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); - } - - Debug.Console(1, occController, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - - occController.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); - trilist.StringInput[joinMap.Name.JoinNumber].StringValue = occController.Name; - - trilist.OnlineStatusChange += (d, args) => - { - if (args.DeviceOnLine) - { - trilist.StringInput[joinMap.Name.JoinNumber].StringValue = occController.Name; - } - }; - - LinkSingleTechSensorToApi(occController, trilist, joinMap); - - LinkDualTechSensorToApi(occController, trilist, joinMap); - } - - private static void LinkDualTechSensorToApi(GlsOccupancySensorBaseController occController, BasicTriList trilist, - GlsOccupancySensorBaseJoinMap joinMap) - { - var odtOccController = occController as GlsOdtOccupancySensorController; - - if (odtOccController == null) - { - return; - } - // OR When Vacated - trilist.SetBoolSigAction(joinMap.OrWhenVacated.JoinNumber, odtOccController.SetOrWhenVacatedState); - odtOccController.OrWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.OrWhenVacated.JoinNumber]); - - // AND When Vacated - trilist.SetBoolSigAction(joinMap.AndWhenVacated.JoinNumber, odtOccController.SetAndWhenVacatedState); - odtOccController.AndWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AndWhenVacated.JoinNumber]); - - // Ultrasonic A Sensor - trilist.SetSigTrueAction(joinMap.EnableUsA.JoinNumber, () => odtOccController.SetUsAEnable(true)); - trilist.SetSigTrueAction(joinMap.DisableUsA.JoinNumber, () => odtOccController.SetUsAEnable(false)); - odtOccController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsA.JoinNumber]); - - // Ultrasonic B Sensor - trilist.SetSigTrueAction(joinMap.EnableUsB.JoinNumber, () => odtOccController.SetUsBEnable(true)); - trilist.SetSigTrueAction(joinMap.DisableUsB.JoinNumber, () => odtOccController.SetUsBEnable(false)); - odtOccController.UltrasonicBEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsB.JoinNumber]); - - // US Sensitivity in Occupied State - trilist.SetBoolSigAction(joinMap.IncrementUsInOccupiedState.JoinNumber, - odtOccController.IncrementUsSensitivityInOccupiedState); - trilist.SetBoolSigAction(joinMap.DecrementUsInOccupiedState.JoinNumber, - odtOccController.DecrementUsSensitivityInOccupiedState); - odtOccController.UltrasonicSensitivityInOccupiedStateFeedback.LinkInputSig( - trilist.UShortInput[joinMap.UsSensitivityInOccupiedState.JoinNumber]); - - // US Sensitivity in Vacant State - trilist.SetBoolSigAction(joinMap.IncrementUsInVacantState.JoinNumber, - odtOccController.IncrementUsSensitivityInVacantState); - trilist.SetBoolSigAction(joinMap.DecrementUsInVacantState.JoinNumber, - odtOccController.DecrementUsSensitivityInVacantState); - odtOccController.UltrasonicSensitivityInVacantStateFeedback.LinkInputSig( - trilist.UShortInput[joinMap.UsSensitivityInVacantState.JoinNumber]); - - //Sensor Raw States - odtOccController.RawOccupancyPirFeedback.LinkInputSig( - trilist.BooleanInput[joinMap.RawOccupancyPirFeedback.JoinNumber]); - odtOccController.RawOccupancyUsFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyUsFeedback.JoinNumber]); - } - - private static void LinkSingleTechSensorToApi(GlsOccupancySensorBaseController occController, BasicTriList trilist, - GlsOccupancySensorBaseJoinMap joinMap) - { -// Occupied status - trilist.SetBoolSigAction(joinMap.ForceOccupied.JoinNumber, occController.ForceOccupied); - trilist.SetBoolSigAction(joinMap.ForceVacant.JoinNumber, occController.ForceVacant); - occController.RoomIsOccupiedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RoomOccupiedFeedback.JoinNumber]); - occController.RoomIsOccupiedFeedback.LinkComplementInputSig( - trilist.BooleanInput[joinMap.RoomVacantFeedback.JoinNumber]); - occController.RawOccupancyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyFeedback.JoinNumber]); - trilist.SetBoolSigAction(joinMap.EnableRawStates.JoinNumber, occController.EnableRawStates); - - // Timouts - trilist.SetUShortSigAction(joinMap.Timeout.JoinNumber, occController.SetRemoteTimeout); - occController.CurrentTimeoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.Timeout.JoinNumber]); - occController.LocalTimoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeoutLocalFeedback.JoinNumber]); - - // LED Flash - trilist.SetSigTrueAction(joinMap.EnableLedFlash.JoinNumber, () => occController.SetLedFlashEnable(true)); - trilist.SetSigTrueAction(joinMap.DisableLedFlash.JoinNumber, () => occController.SetLedFlashEnable(false)); - occController.LedFlashEnabledFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.EnableLedFlash.JoinNumber]); - - // Short Timeout - trilist.SetSigTrueAction(joinMap.EnableShortTimeout.JoinNumber, () => occController.SetShortTimeoutState(true)); - trilist.SetSigTrueAction(joinMap.DisableShortTimeout.JoinNumber, () => occController.SetShortTimeoutState(false)); - occController.ShortTimeoutEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableShortTimeout.JoinNumber]); - - // PIR Sensor - trilist.SetSigTrueAction(joinMap.EnablePir.JoinNumber, () => occController.SetPirEnable(true)); - trilist.SetSigTrueAction(joinMap.DisablePir.JoinNumber, () => occController.SetPirEnable(false)); - occController.PirSensorEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnablePir.JoinNumber]); - - // PIR Sensitivity in Occupied State - trilist.SetBoolSigAction(joinMap.IncrementPirInOccupiedState.JoinNumber, - occController.IncrementPirSensitivityInOccupiedState); - trilist.SetBoolSigAction(joinMap.DecrementPirInOccupiedState.JoinNumber, - occController.DecrementPirSensitivityInOccupiedState); - occController.PirSensitivityInOccupiedStateFeedback.LinkInputSig( - trilist.UShortInput[joinMap.PirSensitivityInOccupiedState.JoinNumber]); - - // PIR Sensitivity in Vacant State - trilist.SetBoolSigAction(joinMap.IncrementPirInVacantState.JoinNumber, - occController.IncrementPirSensitivityInVacantState); - trilist.SetBoolSigAction(joinMap.DecrementPirInVacantState.JoinNumber, - occController.DecrementPirSensitivityInVacantState); - occController.PirSensitivityInVacantStateFeedback.LinkInputSig( - trilist.UShortInput[joinMap.PirSensitivityInVacantState.JoinNumber]); - } - } - - - +extern alias Full; + +using System; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.GeneralIO; +using Full.Newtonsoft.Json; +using PepperDash.Core; +using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Bridges; + +namespace PepperDash.Essentials.Core +{ + [Description("Wrapper class for Single Technology GLS Occupancy Sensors")] + [ConfigSnippet("\"properties\": {\"control\": {\"method\": \"cresnet\",\"cresnetId\": \"97\"},\"enablePir\": true,\"enableLedFlash\": true,\"enableRawStates\":true,\"remoteTimeout\": 30,\"internalPhotoSensorMinChange\": 0,\"externalPhotoSensorMinChange\": 0}")] + public abstract class GlsOccupancySensorBaseController : CrestronGenericBridgeableBaseDevice, IOccupancyStatusProvider + { + public GlsOccupancySensorPropertiesConfig PropertiesConfig { get; private set; } + + protected GlsOccupancySensorBase OccSensor; + + public BoolFeedback RoomIsOccupiedFeedback { get; private set; } + + public BoolFeedback GraceOccupancyDetectedFeedback { get; private set; } + + public BoolFeedback RawOccupancyFeedback { get; private set; } + + public BoolFeedback PirSensorEnabledFeedback { get; private set; } + + public BoolFeedback LedFlashEnabledFeedback { get; private set; } + + public BoolFeedback ShortTimeoutEnabledFeedback { get; private set; } + + public IntFeedback PirSensitivityInVacantStateFeedback { get; private set; } + + public IntFeedback PirSensitivityInOccupiedStateFeedback { get; private set; } + + public IntFeedback CurrentTimeoutFeedback { get; private set; } + + public IntFeedback LocalTimoutFeedback { get; private set; } + + public IntFeedback InternalPhotoSensorValue { get; set; } + + public IntFeedback ExternalPhotoSensorValue { get; set; } + + // Debug properties + public bool InTestMode { get; private set; } + + public bool TestRoomIsOccupiedFeedback { get; private set; } + + public Func RoomIsOccupiedFeedbackFunc + { + get + { + return () => InTestMode ? TestRoomIsOccupiedFeedback : OccSensor.OccupancyDetectedFeedback.BoolValue; + } + } + + protected GlsOccupancySensorBaseController(string key, DeviceConfig config) + : this(key, config.Name, config) + { + } + + protected GlsOccupancySensorBaseController(string key, string name, DeviceConfig config) + : base(key, name) + { + + var props = config.Properties.ToObject(); + + if (props != null) + { + PropertiesConfig = props; + } + else + { + Debug.Console(1, this, "props are null. Unable to deserialize into GlsOccupancySensorPropertiesConfig"); + } + + AddPostActivationAction(() => + { + OccSensor.OnlineStatusChange += (o, a) => + { + if (a.DeviceOnLine) + { + ApplySettingsToSensorFromConfig(); + } + }; + + if (OccSensor.IsOnline) + { + ApplySettingsToSensorFromConfig(); + + } + }); + } + + + /// + /// Applies any sensor settings defined in config + /// + protected virtual void ApplySettingsToSensorFromConfig() + { + Debug.Console(1, this, "Attempting to apply settings to sensor from config"); + + if (PropertiesConfig.EnablePir != null) + { + Debug.Console(1, this, "EnablePir found, attempting to set value from config"); + SetPirEnable((bool)PropertiesConfig.EnablePir); + } + else + { + Debug.Console(1, this, "EnablePir null, no value specified in config"); + } + + if (PropertiesConfig.EnableLedFlash != null) + { + Debug.Console(1, this, "EnableLedFlash found, attempting to set value from config"); + SetLedFlashEnable((bool)PropertiesConfig.EnableLedFlash); + } + + if (PropertiesConfig.RemoteTimeout != null) + { + Debug.Console(1, this, "RemoteTimeout found, attempting to set value from config"); + SetRemoteTimeout((ushort)PropertiesConfig.RemoteTimeout); + } + else + { + Debug.Console(1, this, "RemoteTimeout null, no value specified in config"); + } + + if (PropertiesConfig.ShortTimeoutState != null) + { + SetShortTimeoutState((bool)PropertiesConfig.ShortTimeoutState); + } + + if (PropertiesConfig.EnableRawStates != null) + { + EnableRawStates((bool)PropertiesConfig.EnableRawStates); + } + + if (PropertiesConfig.InternalPhotoSensorMinChange != null) + { + SetInternalPhotoSensorMinChange((ushort)PropertiesConfig.InternalPhotoSensorMinChange); + } + + if (PropertiesConfig.ExternalPhotoSensorMinChange != null) + { + SetExternalPhotoSensorMinChange((ushort)PropertiesConfig.ExternalPhotoSensorMinChange); + } + } + + protected void RegisterGlsOccupancySensorBaseController(GlsOccupancySensorBase occSensor) + { + OccSensor = occSensor; + + RoomIsOccupiedFeedback = new BoolFeedback(RoomIsOccupiedFeedbackFunc); + + PirSensorEnabledFeedback = new BoolFeedback(() => OccSensor.PirEnabledFeedback.BoolValue); + + LedFlashEnabledFeedback = new BoolFeedback(() => OccSensor.LedFlashEnabledFeedback.BoolValue); + + ShortTimeoutEnabledFeedback = new BoolFeedback(() => OccSensor.ShortTimeoutEnabledFeedback.BoolValue); + + PirSensitivityInVacantStateFeedback = + new IntFeedback(() => OccSensor.PirSensitivityInVacantStateFeedback.UShortValue); + + PirSensitivityInOccupiedStateFeedback = + new IntFeedback(() => OccSensor.PirSensitivityInOccupiedStateFeedback.UShortValue); + + CurrentTimeoutFeedback = new IntFeedback(() => OccSensor.CurrentTimeoutFeedback.UShortValue); + + LocalTimoutFeedback = new IntFeedback(() => OccSensor.LocalTimeoutFeedback.UShortValue); + + GraceOccupancyDetectedFeedback = + new BoolFeedback(() => OccSensor.GraceOccupancyDetectedFeedback.BoolValue); + + RawOccupancyFeedback = new BoolFeedback(() => OccSensor.RawOccupancyFeedback.BoolValue); + + InternalPhotoSensorValue = new IntFeedback(() => OccSensor.InternalPhotoSensorValueFeedback.UShortValue); + + ExternalPhotoSensorValue = new IntFeedback(() => OccSensor.ExternalPhotoSensorValueFeedback.UShortValue); + + OccSensor.BaseEvent += OccSensor_BaseEvent; + + OccSensor.GlsOccupancySensorChange += OccSensor_GlsOccupancySensorChange; + } + + + /// + /// Catches events for feedbacks on the base class. Any extending wrapper class should call this delegate after it checks for it's own event IDs. + /// + /// + /// + protected virtual void OccSensor_GlsOccupancySensorChange(GlsOccupancySensorBase device, GlsOccupancySensorChangeEventArgs args) + { + switch (args.EventId) + { + case GlsOccupancySensorBase.PirEnabledFeedbackEventId: + PirSensorEnabledFeedback.FireUpdate(); + break; + case GlsOccupancySensorBase.LedFlashEnabledFeedbackEventId: + LedFlashEnabledFeedback.FireUpdate(); + break; + case GlsOccupancySensorBase.ShortTimeoutEnabledFeedbackEventId: + ShortTimeoutEnabledFeedback.FireUpdate(); + break; + case GlsOccupancySensorBase.PirSensitivityInOccupiedStateFeedbackEventId: + PirSensitivityInOccupiedStateFeedback.FireUpdate(); + break; + case GlsOccupancySensorBase.PirSensitivityInVacantStateFeedbackEventId: + PirSensitivityInVacantStateFeedback.FireUpdate(); + break; + } + } + + protected virtual void OccSensor_BaseEvent(Crestron.SimplSharpPro.GenericBase device, Crestron.SimplSharpPro.BaseEventArgs args) + { + Debug.Console(2, this, "GlsOccupancySensorChange EventId: {0}", args.EventId); + + switch (args.EventId) + { + case GlsOccupancySensorBase.RoomVacantFeedbackEventId: + case GlsOccupancySensorBase.RoomOccupiedFeedbackEventId: + Debug.Console(1, this, "Occupancy State: {0}", OccSensor.OccupancyDetectedFeedback.BoolValue); + RoomIsOccupiedFeedback.FireUpdate(); + break; + case GlsOccupancySensorBase.TimeoutFeedbackEventId: + CurrentTimeoutFeedback.FireUpdate(); + break; + case GlsOccupancySensorBase.TimeoutLocalFeedbackEventId: + LocalTimoutFeedback.FireUpdate(); + break; + case GlsOccupancySensorBase.GraceOccupancyDetectedFeedbackEventId: + GraceOccupancyDetectedFeedback.FireUpdate(); + break; + case GlsOccupancySensorBase.RawOccupancyFeedbackEventId: + RawOccupancyFeedback.FireUpdate(); + break; + case GlsOccupancySensorBase.InternalPhotoSensorValueFeedbackEventId: + InternalPhotoSensorValue.FireUpdate(); + break; + case GlsOccupancySensorBase.ExternalPhotoSensorValueFeedbackEventId: + ExternalPhotoSensorValue.FireUpdate(); + break; + } + } + + public void SetTestMode(bool mode) + { + InTestMode = mode; + + Debug.Console(1, this, "In Mock Mode: '{0}'", InTestMode); + } + + public void SetTestOccupiedState(bool state) + { + if (!InTestMode) + Debug.Console(1, "Mock mode not enabled"); + else + { + TestRoomIsOccupiedFeedback = state; + + RoomIsOccupiedFeedback.FireUpdate(); + } + } + + /// + /// Enables or disables the PIR sensor + /// + /// + public void SetPirEnable(bool state) + { + Debug.Console(1, this, "Setting EnablePir to: {0}", state); + + OccSensor.EnablePir.BoolValue = state; + OccSensor.DisablePir.BoolValue = !state; + } + + /// + /// Enables or disables the LED Flash + /// + /// + public void SetLedFlashEnable(bool state) + { + OccSensor.EnableLedFlash.BoolValue = state; + OccSensor.DisableLedFlash.BoolValue = !state; + } + + /// + /// Enables or disables short timeout based on state + /// + /// + public void SetShortTimeoutState(bool state) + { + OccSensor.EnableShortTimeout.BoolValue = state; + OccSensor.DisableShortTimeout.BoolValue = !state; + } + + public void IncrementPirSensitivityInOccupiedState(bool pressRelease) + { + OccSensor.IncrementPirSensitivityInOccupiedState.BoolValue = pressRelease; + } + + public void DecrementPirSensitivityInOccupiedState(bool pressRelease) + { + OccSensor.DecrementPirSensitivityInOccupiedState.BoolValue = pressRelease; + } + + public void IncrementPirSensitivityInVacantState(bool pressRelease) + { + OccSensor.IncrementPirSensitivityInVacantState.BoolValue = pressRelease; + } + + public void DecrementPirSensitivityInVacantState(bool pressRelease) + { + OccSensor.DecrementPirSensitivityInVacantState.BoolValue = pressRelease; + } + + /// + /// Pulse ForceOccupied on the sensor for .5 seconds + /// + public void ForceOccupied() + { + CrestronInvoke.BeginInvoke((o) => + { + ForceOccupied(true); + CrestronEnvironment.Sleep(500); + ForceOccupied(false); + }); + } + + public void ForceOccupied(bool value) + { + OccSensor.ForceOccupied.BoolValue = value; + } + + /// + /// Pulse ForceVacant on the sensor for .5 seconds + /// + public void ForceVacant() + { + CrestronInvoke.BeginInvoke((o) => + { + ForceVacant(true); + CrestronEnvironment.Sleep(500); + ForceVacant(false); + }); + } + + public void ForceVacant(bool value) + { + OccSensor.ForceVacant.BoolValue = value; + } + + public void EnableRawStates(bool state) + { + OccSensor.EnableRawStates.BoolValue = state; + } + + public void SetRemoteTimeout(ushort time) + { + Debug.Console(1, this, "Setting RemoteTimout to: {0}", time); + + OccSensor.RemoteTimeout.UShortValue = time; + } + + public void SetInternalPhotoSensorMinChange(ushort value) + { + OccSensor.InternalPhotoSensorMinimumChange.UShortValue = value; + } + + public void SetExternalPhotoSensorMinChange(ushort value) + { + OccSensor.ExternalPhotoSensorMinimumChange.UShortValue = value; + } + + /// + /// Method to print current occ settings to console. + /// + public virtual void GetSettings() + { + var dash = new string('*', 50); + CrestronConsole.PrintLine(string.Format("{0}\n", dash)); + + Debug.Console(0, this, "Vacancy Detected: {0}", + OccSensor.VacancyDetectedFeedback.BoolValue); + + Debug.Console(0, this, "Timeout Current: {0} | Local: {1}", + OccSensor.CurrentTimeoutFeedback.UShortValue, + OccSensor.LocalTimeoutFeedback.UShortValue); + + Debug.Console(0, this, "Short Timeout Enabled: {0}", + OccSensor.ShortTimeoutEnabledFeedback.BoolValue); + + Debug.Console(0, this, "PIR Sensor Enabled: {0} | Sensitivity Occupied: {1} | Sensitivity Vacant: {2}", + OccSensor.PirEnabledFeedback.BoolValue, + OccSensor.PirSensitivityInOccupiedStateFeedback.UShortValue, + OccSensor.PirSensitivityInVacantStateFeedback.UShortValue); + + CrestronConsole.PrintLine(string.Format("{0}\n", dash)); + } + + protected void LinkOccSensorToApi(GlsOccupancySensorBaseController occController, BasicTriList trilist, + uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + var joinMap = new GlsOccupancySensorBaseJoinMap(joinStart); + + var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); + + if (bridge != null) + { + bridge.AddJoinMap(Key, joinMap); + } + else + { + Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); + } + + Debug.Console(1, occController, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); + + occController.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); + trilist.StringInput[joinMap.Name.JoinNumber].StringValue = occController.Name; + + trilist.OnlineStatusChange += (d, args) => + { + if (args.DeviceOnLine) + { + trilist.StringInput[joinMap.Name.JoinNumber].StringValue = occController.Name; + } + }; + + LinkSingleTechSensorToApi(occController, trilist, joinMap); + + LinkDualTechSensorToApi(occController, trilist, joinMap); + } + + private static void LinkDualTechSensorToApi(GlsOccupancySensorBaseController occController, BasicTriList trilist, + GlsOccupancySensorBaseJoinMap joinMap) + { + var odtOccController = occController as GlsOdtOccupancySensorController; + + if (odtOccController == null) + { + return; + } + // OR When Vacated + trilist.SetBoolSigAction(joinMap.OrWhenVacated.JoinNumber, odtOccController.SetOrWhenVacatedState); + odtOccController.OrWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.OrWhenVacated.JoinNumber]); + + // AND When Vacated + trilist.SetBoolSigAction(joinMap.AndWhenVacated.JoinNumber, odtOccController.SetAndWhenVacatedState); + odtOccController.AndWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AndWhenVacated.JoinNumber]); + + // Ultrasonic A Sensor + trilist.SetSigTrueAction(joinMap.EnableUsA.JoinNumber, () => odtOccController.SetUsAEnable(true)); + trilist.SetSigTrueAction(joinMap.DisableUsA.JoinNumber, () => odtOccController.SetUsAEnable(false)); + odtOccController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsA.JoinNumber]); + + // Ultrasonic B Sensor + trilist.SetSigTrueAction(joinMap.EnableUsB.JoinNumber, () => odtOccController.SetUsBEnable(true)); + trilist.SetSigTrueAction(joinMap.DisableUsB.JoinNumber, () => odtOccController.SetUsBEnable(false)); + odtOccController.UltrasonicBEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsB.JoinNumber]); + + // US Sensitivity in Occupied State + trilist.SetBoolSigAction(joinMap.IncrementUsInOccupiedState.JoinNumber, + odtOccController.IncrementUsSensitivityInOccupiedState); + trilist.SetBoolSigAction(joinMap.DecrementUsInOccupiedState.JoinNumber, + odtOccController.DecrementUsSensitivityInOccupiedState); + odtOccController.UltrasonicSensitivityInOccupiedStateFeedback.LinkInputSig( + trilist.UShortInput[joinMap.UsSensitivityInOccupiedState.JoinNumber]); + + // US Sensitivity in Vacant State + trilist.SetBoolSigAction(joinMap.IncrementUsInVacantState.JoinNumber, + odtOccController.IncrementUsSensitivityInVacantState); + trilist.SetBoolSigAction(joinMap.DecrementUsInVacantState.JoinNumber, + odtOccController.DecrementUsSensitivityInVacantState); + odtOccController.UltrasonicSensitivityInVacantStateFeedback.LinkInputSig( + trilist.UShortInput[joinMap.UsSensitivityInVacantState.JoinNumber]); + + //Sensor Raw States + odtOccController.RawOccupancyPirFeedback.LinkInputSig( + trilist.BooleanInput[joinMap.RawOccupancyPirFeedback.JoinNumber]); + odtOccController.RawOccupancyUsFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyUsFeedback.JoinNumber]); + } + + private static void LinkSingleTechSensorToApi(GlsOccupancySensorBaseController occController, BasicTriList trilist, + GlsOccupancySensorBaseJoinMap joinMap) + { +// Occupied status + trilist.SetBoolSigAction(joinMap.ForceOccupied.JoinNumber, occController.ForceOccupied); + trilist.SetBoolSigAction(joinMap.ForceVacant.JoinNumber, occController.ForceVacant); + occController.RoomIsOccupiedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RoomOccupiedFeedback.JoinNumber]); + occController.RoomIsOccupiedFeedback.LinkComplementInputSig( + trilist.BooleanInput[joinMap.RoomVacantFeedback.JoinNumber]); + occController.RawOccupancyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyFeedback.JoinNumber]); + trilist.SetBoolSigAction(joinMap.EnableRawStates.JoinNumber, occController.EnableRawStates); + + // Timouts + trilist.SetUShortSigAction(joinMap.Timeout.JoinNumber, occController.SetRemoteTimeout); + occController.CurrentTimeoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.Timeout.JoinNumber]); + occController.LocalTimoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeoutLocalFeedback.JoinNumber]); + + // LED Flash + trilist.SetSigTrueAction(joinMap.EnableLedFlash.JoinNumber, () => occController.SetLedFlashEnable(true)); + trilist.SetSigTrueAction(joinMap.DisableLedFlash.JoinNumber, () => occController.SetLedFlashEnable(false)); + occController.LedFlashEnabledFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.EnableLedFlash.JoinNumber]); + + // Short Timeout + trilist.SetSigTrueAction(joinMap.EnableShortTimeout.JoinNumber, () => occController.SetShortTimeoutState(true)); + trilist.SetSigTrueAction(joinMap.DisableShortTimeout.JoinNumber, () => occController.SetShortTimeoutState(false)); + occController.ShortTimeoutEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableShortTimeout.JoinNumber]); + + // PIR Sensor + trilist.SetSigTrueAction(joinMap.EnablePir.JoinNumber, () => occController.SetPirEnable(true)); + trilist.SetSigTrueAction(joinMap.DisablePir.JoinNumber, () => occController.SetPirEnable(false)); + occController.PirSensorEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnablePir.JoinNumber]); + + // PIR Sensitivity in Occupied State + trilist.SetBoolSigAction(joinMap.IncrementPirInOccupiedState.JoinNumber, + occController.IncrementPirSensitivityInOccupiedState); + trilist.SetBoolSigAction(joinMap.DecrementPirInOccupiedState.JoinNumber, + occController.DecrementPirSensitivityInOccupiedState); + occController.PirSensitivityInOccupiedStateFeedback.LinkInputSig( + trilist.UShortInput[joinMap.PirSensitivityInOccupiedState.JoinNumber]); + + // PIR Sensitivity in Vacant State + trilist.SetBoolSigAction(joinMap.IncrementPirInVacantState.JoinNumber, + occController.IncrementPirSensitivityInVacantState); + trilist.SetBoolSigAction(joinMap.DecrementPirInVacantState.JoinNumber, + occController.DecrementPirSensitivityInVacantState); + occController.PirSensitivityInVacantStateFeedback.LinkInputSig( + trilist.UShortInput[joinMap.PirSensitivityInVacantState.JoinNumber]); + } + } + + + } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Occupancy/GlsOccupancySensorPropertiesConfig.cs b/src/PepperDash.Essentials.Core/Occupancy/GlsOccupancySensorPropertiesConfig.cs similarity index 97% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Occupancy/GlsOccupancySensorPropertiesConfig.cs rename to src/PepperDash.Essentials.Core/Occupancy/GlsOccupancySensorPropertiesConfig.cs index 392c05b0..958edaf8 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Occupancy/GlsOccupancySensorPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Core/Occupancy/GlsOccupancySensorPropertiesConfig.cs @@ -1,10 +1,12 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.Core { diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Occupancy/GlsOdtOccupancySensorController.cs b/src/PepperDash.Essentials.Core/Occupancy/GlsOdtOccupancySensorController.cs similarity index 97% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Occupancy/GlsOdtOccupancySensorController.cs rename to src/PepperDash.Essentials.Core/Occupancy/GlsOdtOccupancySensorController.cs index d5e18280..dd6b3605 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Occupancy/GlsOdtOccupancySensorController.cs +++ b/src/PepperDash.Essentials.Core/Occupancy/GlsOdtOccupancySensorController.cs @@ -1,284 +1,284 @@ -using System; -using System.Collections.Generic; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.GeneralIO; - -using PepperDash.Core; -using PepperDash.Essentials.Core.Config; -using PepperDash.Essentials.Core.Bridges; - -namespace PepperDash.Essentials.Core -{ - [Description("Wrapper class for Dual Technology GLS Occupancy Sensors")] - [ConfigSnippet("\"properties\": {\"control\": {\"method\": \"cresnet\",\"cresnetId\": \"97\"},\"enablePir\": true,\"enableLedFlash\": true,\"enableRawStates\":true,\"remoteTimeout\": 30,\"internalPhotoSensorMinChange\": 0,\"externalPhotoSensorMinChange\": 0,\"enableUsA\": true,\"enableUsB\": true,\"orWhenVacatedState\": true}")] - public class GlsOdtOccupancySensorController : GlsOccupancySensorBaseController - { - private GlsOdtCCn _occSensor; - - public BoolFeedback OrWhenVacatedFeedback { get; private set; } - - public BoolFeedback AndWhenVacatedFeedback { get; private set; } - - public BoolFeedback UltrasonicAEnabledFeedback { get; private set; } - - public BoolFeedback UltrasonicBEnabledFeedback { get; private set; } - - public IntFeedback UltrasonicSensitivityInVacantStateFeedback { get; private set; } - - public IntFeedback UltrasonicSensitivityInOccupiedStateFeedback { get; private set; } - - public BoolFeedback RawOccupancyPirFeedback { get; private set; } - - public BoolFeedback RawOccupancyUsFeedback { get; private set; } - - - public GlsOdtOccupancySensorController(string key, Func preActivationFunc, - DeviceConfig config) - : base(key, config.Name, config) - { - AddPreActivationAction(() => - { - _occSensor = preActivationFunc(config); - - RegisterCrestronGenericBase(_occSensor); - - RegisterGlsOccupancySensorBaseController(_occSensor); - - AndWhenVacatedFeedback = new BoolFeedback(() => _occSensor.AndWhenVacatedFeedback.BoolValue); - - OrWhenVacatedFeedback = new BoolFeedback(() => _occSensor.OrWhenVacatedFeedback.BoolValue); - - UltrasonicAEnabledFeedback = new BoolFeedback(() => _occSensor.UsAEnabledFeedback.BoolValue); - - UltrasonicBEnabledFeedback = new BoolFeedback(() => _occSensor.UsBEnabledFeedback.BoolValue); - - RawOccupancyPirFeedback = new BoolFeedback(() => _occSensor.RawOccupancyPirFeedback.BoolValue); - - RawOccupancyUsFeedback = new BoolFeedback(() => _occSensor.RawOccupancyUsFeedback.BoolValue); - - UltrasonicSensitivityInVacantStateFeedback = new IntFeedback(() => _occSensor.UsSensitivityInVacantStateFeedback.UShortValue); - - UltrasonicSensitivityInOccupiedStateFeedback = new IntFeedback(() => _occSensor.UsSensitivityInOccupiedStateFeedback.UShortValue); - - }); - } - - protected override void ApplySettingsToSensorFromConfig() - { - base.ApplySettingsToSensorFromConfig(); - - if (PropertiesConfig.EnableUsA != null) - { - Debug.Console(1, this, "EnableUsA found, attempting to set value from config"); - SetUsAEnable((bool)PropertiesConfig.EnableUsA); - } - else - { - Debug.Console(1, this, "EnableUsA null, no value specified in config"); - } - - - if (PropertiesConfig.EnableUsB != null) - { - Debug.Console(1, this, "EnableUsB found, attempting to set value from config"); - SetUsBEnable((bool)PropertiesConfig.EnableUsB); - } - else - { - Debug.Console(1, this, "EnablePir null, no value specified in config"); - } - - - if (PropertiesConfig.OrWhenVacatedState != null) - { - SetOrWhenVacatedState((bool)PropertiesConfig.OrWhenVacatedState); - } - - if (PropertiesConfig.AndWhenVacatedState != null) - { - SetAndWhenVacatedState((bool)PropertiesConfig.AndWhenVacatedState); - } - } - - /// - /// Overrides the base class event delegate to fire feedbacks for event IDs that pertain to this extended class. - /// Then calls the base delegate method to ensure any common event IDs are captured. - /// - /// - /// - protected override void OccSensor_GlsOccupancySensorChange(GlsOccupancySensorBase device, GlsOccupancySensorChangeEventArgs args) - { - switch (args.EventId) - { - case GlsOccupancySensorBase.AndWhenVacatedFeedbackEventId: - AndWhenVacatedFeedback.FireUpdate(); - break; - case GlsOccupancySensorBase.OrWhenVacatedFeedbackEventId: - OrWhenVacatedFeedback.FireUpdate(); - break; - case GlsOccupancySensorBase.UsAEnabledFeedbackEventId: - UltrasonicAEnabledFeedback.FireUpdate(); - break; - case GlsOccupancySensorBase.UsBEnabledFeedbackEventId: - UltrasonicBEnabledFeedback.FireUpdate(); - break; - case GlsOccupancySensorBase.UsSensitivityInOccupiedStateFeedbackEventId: - UltrasonicSensitivityInOccupiedStateFeedback.FireUpdate(); - break; - case GlsOccupancySensorBase.UsSensitivityInVacantStateFeedbackEventId: - UltrasonicSensitivityInVacantStateFeedback.FireUpdate(); - break; - } - - base.OccSensor_GlsOccupancySensorChange(device, args); - } - - /// - /// Overrides the base class event delegate to fire feedbacks for event IDs that pertain to this extended class. - /// Then calls the base delegate method to ensure any common event IDs are captured. - /// - /// - /// - protected override void OccSensor_BaseEvent(Crestron.SimplSharpPro.GenericBase device, Crestron.SimplSharpPro.BaseEventArgs args) - { - switch (args.EventId) - { - case GlsOccupancySensorBase.RawOccupancyPirFeedbackEventId: - RawOccupancyPirFeedback.FireUpdate(); - break; - case GlsOccupancySensorBase.RawOccupancyUsFeedbackEventId: - RawOccupancyUsFeedback.FireUpdate(); - break; - } - - base.OccSensor_BaseEvent(device, args); - } - - /// - /// Sets the OrWhenVacated state - /// - /// - public void SetOrWhenVacatedState(bool state) - { - _occSensor.OrWhenVacated.BoolValue = state; - } - - /// - /// Sets the AndWhenVacated state - /// - /// - public void SetAndWhenVacatedState(bool state) - { - _occSensor.AndWhenVacated.BoolValue = state; - } - - /// - /// Enables or disables the Ultrasonic A sensor - /// - /// - public void SetUsAEnable(bool state) - { - _occSensor.EnableUsA.BoolValue = state; - _occSensor.DisableUsA.BoolValue = !state; - } - - - /// - /// Enables or disables the Ultrasonic B sensor - /// - /// - public void SetUsBEnable(bool state) - { - _occSensor.EnableUsB.BoolValue = state; - _occSensor.DisableUsB.BoolValue = !state; - } - - public void IncrementUsSensitivityInOccupiedState(bool pressRelease) - { - _occSensor.IncrementUsSensitivityInOccupiedState.BoolValue = pressRelease; - } - - public void DecrementUsSensitivityInOccupiedState(bool pressRelease) - { - _occSensor.DecrementUsSensitivityInOccupiedState.BoolValue = pressRelease; - } - - public void IncrementUsSensitivityInVacantState(bool pressRelease) - { - _occSensor.IncrementUsSensitivityInVacantState.BoolValue = pressRelease; - } - - public void DecrementUsSensitivityInVacantState(bool pressRelease) - { - _occSensor.DecrementUsSensitivityInVacantState.BoolValue = pressRelease; - } - - public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - LinkOccSensorToApi(this, trilist, joinStart, joinMapKey, bridge); - } - - /// - /// Method to print occ sensor settings to console. - /// - public override void GetSettings() - { - base.GetSettings(); - - Debug.Console(0, this, "Ultrasonic Enabled A: {0} | B: {1}", - _occSensor.UsAEnabledFeedback.BoolValue, - _occSensor.UsBEnabledFeedback.BoolValue); - - Debug.Console(0, this, "Ultrasonic Sensitivity Occupied: {0} | Vacant: {1}", - _occSensor.UsSensitivityInOccupiedStateFeedback.UShortValue, - _occSensor.UsSensitivityInVacantStateFeedback.UShortValue); - - var dash = new string('*', 50); - CrestronConsole.PrintLine(string.Format("{0}\n", dash)); - } - - } - - public class GlsOdtOccupancySensorControllerFactory : EssentialsDeviceFactory - { - public GlsOdtOccupancySensorControllerFactory() - { - TypeNames = new List { "glsodtccn" }; - } - - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - Debug.Console(1, "Factory Attempting to create new GlsOccupancySensorBaseController Device"); - - return new GlsOdtOccupancySensorController(dc.Key, GetGlsOdtCCn, dc); - } - - private static GlsOdtCCn GetGlsOdtCCn(DeviceConfig dc) - { - var control = CommFactory.GetControlPropertiesConfig(dc); - var cresnetId = control.CresnetIdInt; - var branchId = control.ControlPortNumber; - var parentKey = String.IsNullOrEmpty(control.ControlPortDevKey) ? "processor" : control.ControlPortDevKey; - - if (parentKey.Equals("processor", StringComparison.CurrentCultureIgnoreCase)) - { - Debug.Console(0, "Device {0} is a valid cresnet master - creating new GlsOdtCCn", parentKey); - return new GlsOdtCCn(cresnetId, Global.ControlSystem); - } - var cresnetBridge = DeviceManager.GetDeviceForKey(parentKey) as IHasCresnetBranches; - - if (cresnetBridge != null) - { - Debug.Console(0, "Device {0} is a valid cresnet master - creating new GlsOdtCCn", parentKey); - return new GlsOdtCCn(cresnetId, cresnetBridge.CresnetBranches[branchId]); - } - Debug.Console(0, "Device {0} is not a valid cresnet master", parentKey); - return null; - } - } - - - +using System; +using System.Collections.Generic; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.GeneralIO; + +using PepperDash.Core; +using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Bridges; + +namespace PepperDash.Essentials.Core +{ + [Description("Wrapper class for Dual Technology GLS Occupancy Sensors")] + [ConfigSnippet("\"properties\": {\"control\": {\"method\": \"cresnet\",\"cresnetId\": \"97\"},\"enablePir\": true,\"enableLedFlash\": true,\"enableRawStates\":true,\"remoteTimeout\": 30,\"internalPhotoSensorMinChange\": 0,\"externalPhotoSensorMinChange\": 0,\"enableUsA\": true,\"enableUsB\": true,\"orWhenVacatedState\": true}")] + public class GlsOdtOccupancySensorController : GlsOccupancySensorBaseController + { + private GlsOdtCCn _occSensor; + + public BoolFeedback OrWhenVacatedFeedback { get; private set; } + + public BoolFeedback AndWhenVacatedFeedback { get; private set; } + + public BoolFeedback UltrasonicAEnabledFeedback { get; private set; } + + public BoolFeedback UltrasonicBEnabledFeedback { get; private set; } + + public IntFeedback UltrasonicSensitivityInVacantStateFeedback { get; private set; } + + public IntFeedback UltrasonicSensitivityInOccupiedStateFeedback { get; private set; } + + public BoolFeedback RawOccupancyPirFeedback { get; private set; } + + public BoolFeedback RawOccupancyUsFeedback { get; private set; } + + + public GlsOdtOccupancySensorController(string key, Func preActivationFunc, + DeviceConfig config) + : base(key, config.Name, config) + { + AddPreActivationAction(() => + { + _occSensor = preActivationFunc(config); + + RegisterCrestronGenericBase(_occSensor); + + RegisterGlsOccupancySensorBaseController(_occSensor); + + AndWhenVacatedFeedback = new BoolFeedback(() => _occSensor.AndWhenVacatedFeedback.BoolValue); + + OrWhenVacatedFeedback = new BoolFeedback(() => _occSensor.OrWhenVacatedFeedback.BoolValue); + + UltrasonicAEnabledFeedback = new BoolFeedback(() => _occSensor.UsAEnabledFeedback.BoolValue); + + UltrasonicBEnabledFeedback = new BoolFeedback(() => _occSensor.UsBEnabledFeedback.BoolValue); + + RawOccupancyPirFeedback = new BoolFeedback(() => _occSensor.RawOccupancyPirFeedback.BoolValue); + + RawOccupancyUsFeedback = new BoolFeedback(() => _occSensor.RawOccupancyUsFeedback.BoolValue); + + UltrasonicSensitivityInVacantStateFeedback = new IntFeedback(() => _occSensor.UsSensitivityInVacantStateFeedback.UShortValue); + + UltrasonicSensitivityInOccupiedStateFeedback = new IntFeedback(() => _occSensor.UsSensitivityInOccupiedStateFeedback.UShortValue); + + }); + } + + protected override void ApplySettingsToSensorFromConfig() + { + base.ApplySettingsToSensorFromConfig(); + + if (PropertiesConfig.EnableUsA != null) + { + Debug.Console(1, this, "EnableUsA found, attempting to set value from config"); + SetUsAEnable((bool)PropertiesConfig.EnableUsA); + } + else + { + Debug.Console(1, this, "EnableUsA null, no value specified in config"); + } + + + if (PropertiesConfig.EnableUsB != null) + { + Debug.Console(1, this, "EnableUsB found, attempting to set value from config"); + SetUsBEnable((bool)PropertiesConfig.EnableUsB); + } + else + { + Debug.Console(1, this, "EnablePir null, no value specified in config"); + } + + + if (PropertiesConfig.OrWhenVacatedState != null) + { + SetOrWhenVacatedState((bool)PropertiesConfig.OrWhenVacatedState); + } + + if (PropertiesConfig.AndWhenVacatedState != null) + { + SetAndWhenVacatedState((bool)PropertiesConfig.AndWhenVacatedState); + } + } + + /// + /// Overrides the base class event delegate to fire feedbacks for event IDs that pertain to this extended class. + /// Then calls the base delegate method to ensure any common event IDs are captured. + /// + /// + /// + protected override void OccSensor_GlsOccupancySensorChange(GlsOccupancySensorBase device, GlsOccupancySensorChangeEventArgs args) + { + switch (args.EventId) + { + case GlsOccupancySensorBase.AndWhenVacatedFeedbackEventId: + AndWhenVacatedFeedback.FireUpdate(); + break; + case GlsOccupancySensorBase.OrWhenVacatedFeedbackEventId: + OrWhenVacatedFeedback.FireUpdate(); + break; + case GlsOccupancySensorBase.UsAEnabledFeedbackEventId: + UltrasonicAEnabledFeedback.FireUpdate(); + break; + case GlsOccupancySensorBase.UsBEnabledFeedbackEventId: + UltrasonicBEnabledFeedback.FireUpdate(); + break; + case GlsOccupancySensorBase.UsSensitivityInOccupiedStateFeedbackEventId: + UltrasonicSensitivityInOccupiedStateFeedback.FireUpdate(); + break; + case GlsOccupancySensorBase.UsSensitivityInVacantStateFeedbackEventId: + UltrasonicSensitivityInVacantStateFeedback.FireUpdate(); + break; + } + + base.OccSensor_GlsOccupancySensorChange(device, args); + } + + /// + /// Overrides the base class event delegate to fire feedbacks for event IDs that pertain to this extended class. + /// Then calls the base delegate method to ensure any common event IDs are captured. + /// + /// + /// + protected override void OccSensor_BaseEvent(Crestron.SimplSharpPro.GenericBase device, Crestron.SimplSharpPro.BaseEventArgs args) + { + switch (args.EventId) + { + case GlsOccupancySensorBase.RawOccupancyPirFeedbackEventId: + RawOccupancyPirFeedback.FireUpdate(); + break; + case GlsOccupancySensorBase.RawOccupancyUsFeedbackEventId: + RawOccupancyUsFeedback.FireUpdate(); + break; + } + + base.OccSensor_BaseEvent(device, args); + } + + /// + /// Sets the OrWhenVacated state + /// + /// + public void SetOrWhenVacatedState(bool state) + { + _occSensor.OrWhenVacated.BoolValue = state; + } + + /// + /// Sets the AndWhenVacated state + /// + /// + public void SetAndWhenVacatedState(bool state) + { + _occSensor.AndWhenVacated.BoolValue = state; + } + + /// + /// Enables or disables the Ultrasonic A sensor + /// + /// + public void SetUsAEnable(bool state) + { + _occSensor.EnableUsA.BoolValue = state; + _occSensor.DisableUsA.BoolValue = !state; + } + + + /// + /// Enables or disables the Ultrasonic B sensor + /// + /// + public void SetUsBEnable(bool state) + { + _occSensor.EnableUsB.BoolValue = state; + _occSensor.DisableUsB.BoolValue = !state; + } + + public void IncrementUsSensitivityInOccupiedState(bool pressRelease) + { + _occSensor.IncrementUsSensitivityInOccupiedState.BoolValue = pressRelease; + } + + public void DecrementUsSensitivityInOccupiedState(bool pressRelease) + { + _occSensor.DecrementUsSensitivityInOccupiedState.BoolValue = pressRelease; + } + + public void IncrementUsSensitivityInVacantState(bool pressRelease) + { + _occSensor.IncrementUsSensitivityInVacantState.BoolValue = pressRelease; + } + + public void DecrementUsSensitivityInVacantState(bool pressRelease) + { + _occSensor.DecrementUsSensitivityInVacantState.BoolValue = pressRelease; + } + + public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + LinkOccSensorToApi(this, trilist, joinStart, joinMapKey, bridge); + } + + /// + /// Method to print occ sensor settings to console. + /// + public override void GetSettings() + { + base.GetSettings(); + + Debug.Console(0, this, "Ultrasonic Enabled A: {0} | B: {1}", + _occSensor.UsAEnabledFeedback.BoolValue, + _occSensor.UsBEnabledFeedback.BoolValue); + + Debug.Console(0, this, "Ultrasonic Sensitivity Occupied: {0} | Vacant: {1}", + _occSensor.UsSensitivityInOccupiedStateFeedback.UShortValue, + _occSensor.UsSensitivityInVacantStateFeedback.UShortValue); + + var dash = new string('*', 50); + CrestronConsole.PrintLine(string.Format("{0}\n", dash)); + } + + } + + public class GlsOdtOccupancySensorControllerFactory : EssentialsDeviceFactory + { + public GlsOdtOccupancySensorControllerFactory() + { + TypeNames = new List { "glsodtccn" }; + } + + + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + Debug.Console(1, "Factory Attempting to create new GlsOccupancySensorBaseController Device"); + + return new GlsOdtOccupancySensorController(dc.Key, GetGlsOdtCCn, dc); + } + + private static GlsOdtCCn GetGlsOdtCCn(DeviceConfig dc) + { + var control = CommFactory.GetControlPropertiesConfig(dc); + var cresnetId = control.CresnetIdInt; + var branchId = control.ControlPortNumber; + var parentKey = String.IsNullOrEmpty(control.ControlPortDevKey) ? "processor" : control.ControlPortDevKey; + + if (parentKey.Equals("processor", StringComparison.CurrentCultureIgnoreCase)) + { + Debug.Console(0, "Device {0} is a valid cresnet master - creating new GlsOdtCCn", parentKey); + return new GlsOdtCCn(cresnetId, Global.ControlSystem); + } + var cresnetBridge = DeviceManager.GetDeviceForKey(parentKey) as IHasCresnetBranches; + + if (cresnetBridge != null) + { + Debug.Console(0, "Device {0} is a valid cresnet master - creating new GlsOdtCCn", parentKey); + return new GlsOdtCCn(cresnetId, cresnetBridge.CresnetBranches[branchId]); + } + Debug.Console(0, "Device {0} is not a valid cresnet master", parentKey); + return null; + } + } + + + } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Occupancy/GlsOirOccupancySensorController.cs b/src/PepperDash.Essentials.Core/Occupancy/GlsOirOccupancySensorController.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Occupancy/GlsOirOccupancySensorController.cs rename to src/PepperDash.Essentials.Core/Occupancy/GlsOirOccupancySensorController.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Occupancy/IOccupancyStatusProviderAggregator.cs b/src/PepperDash.Essentials.Core/Occupancy/IOccupancyStatusProviderAggregator.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Occupancy/IOccupancyStatusProviderAggregator.cs rename to src/PepperDash.Essentials.Core/Occupancy/IOccupancyStatusProviderAggregator.cs index 3da9c0dc..dfa4fef1 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Occupancy/IOccupancyStatusProviderAggregator.cs +++ b/src/PepperDash.Essentials.Core/Occupancy/IOccupancyStatusProviderAggregator.cs @@ -2,12 +2,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.GeneralIO; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro.GeneralIO; using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; - +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Config; + namespace PepperDash.Essentials.Core { /// @@ -32,41 +32,41 @@ namespace PepperDash.Essentials.Core : base(key, name) { _aggregatedOccupancyStatus = new BoolFeedbackOr(); - } - - public IOccupancyStatusProviderAggregator(string key, string name, OccupancyAggregatorConfig config) - : this(key, name) - { - AddPostActivationAction(() => - { - if (config.DeviceKeys.Count == 0) - { - return; - } - - foreach (var deviceKey in config.DeviceKeys) - { - var device = DeviceManager.GetDeviceForKey(deviceKey); - - if (device == null) - { - Debug.Console(0, this, Debug.ErrorLogLevel.Notice, - "Unable to retrieve Occupancy provider with key {0}", deviceKey); - continue; - } - - var provider = device as IOccupancyStatusProvider; - - if (provider == null) - { - Debug.Console(0, this, Debug.ErrorLogLevel.Notice, - "Device with key {0} does NOT implement IOccupancyStatusProvider. Please check configuration."); - continue; - } - - AddOccupancyStatusProvider(provider); - } - }); + } + + public IOccupancyStatusProviderAggregator(string key, string name, OccupancyAggregatorConfig config) + : this(key, name) + { + AddPostActivationAction(() => + { + if (config.DeviceKeys.Count == 0) + { + return; + } + + foreach (var deviceKey in config.DeviceKeys) + { + var device = DeviceManager.GetDeviceForKey(deviceKey); + + if (device == null) + { + Debug.Console(0, this, Debug.ErrorLogLevel.Notice, + "Unable to retrieve Occupancy provider with key {0}", deviceKey); + continue; + } + + var provider = device as IOccupancyStatusProvider; + + if (provider == null) + { + Debug.Console(0, this, Debug.ErrorLogLevel.Notice, + "Device with key {0} does NOT implement IOccupancyStatusProvider. Please check configuration."); + continue; + } + + AddOccupancyStatusProvider(provider); + } + }); } /// @@ -76,34 +76,34 @@ namespace PepperDash.Essentials.Core public void AddOccupancyStatusProvider(IOccupancyStatusProvider statusProvider) { _aggregatedOccupancyStatus.AddOutputIn(statusProvider.RoomIsOccupiedFeedback); - } - - public void RemoveOccupancyStatusProvider(IOccupancyStatusProvider statusProvider) - { - _aggregatedOccupancyStatus.RemoveOutputIn(statusProvider.RoomIsOccupiedFeedback); - } - - public void ClearOccupancyStatusProviders() - { - _aggregatedOccupancyStatus.ClearOutputs(); } - } - - public class OccupancyAggregatorFactory : EssentialsDeviceFactory - { - public OccupancyAggregatorFactory() - { - TypeNames = new List { "occupancyAggregator", "occAggregate" }; - } - - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - Debug.Console(1, "Factory Attempting to create new GlsOccupancySensorBaseController Device"); - - var config = dc.Properties.ToObject(); - - return new IOccupancyStatusProviderAggregator(dc.Key, dc.Name, config); - } + + public void RemoveOccupancyStatusProvider(IOccupancyStatusProvider statusProvider) + { + _aggregatedOccupancyStatus.RemoveOutputIn(statusProvider.RoomIsOccupiedFeedback); + } + + public void ClearOccupancyStatusProviders() + { + _aggregatedOccupancyStatus.ClearOutputs(); + } + } + + public class OccupancyAggregatorFactory : EssentialsDeviceFactory + { + public OccupancyAggregatorFactory() + { + TypeNames = new List { "occupancyAggregator", "occAggregate" }; + } + + + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + Debug.Console(1, "Factory Attempting to create new GlsOccupancySensorBaseController Device"); + + var config = dc.Properties.ToObject(); + + return new IOccupancyStatusProviderAggregator(dc.Key, dc.Name, config); + } } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Occupancy/OccupancyAggregatorConfig.cs b/src/PepperDash.Essentials.Core/Occupancy/OccupancyAggregatorConfig.cs similarity index 77% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Occupancy/OccupancyAggregatorConfig.cs rename to src/PepperDash.Essentials.Core/Occupancy/OccupancyAggregatorConfig.cs index ef237e72..884ebfdd 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Occupancy/OccupancyAggregatorConfig.cs +++ b/src/PepperDash.Essentials.Core/Occupancy/OccupancyAggregatorConfig.cs @@ -1,5 +1,7 @@ -using System.Collections.Generic; -using Newtonsoft.Json; +extern alias Full; + +using System.Collections.Generic; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.Core { diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PartitionSensor/EssentialsPartitionController.cs b/src/PepperDash.Essentials.Core/PartitionSensor/EssentialsPartitionController.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/PartitionSensor/EssentialsPartitionController.cs rename to src/PepperDash.Essentials.Core/PartitionSensor/EssentialsPartitionController.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PartitionSensor/GlsPartitionSensorController.cs b/src/PepperDash.Essentials.Core/PartitionSensor/GlsPartitionSensorController.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/PartitionSensor/GlsPartitionSensorController.cs rename to src/PepperDash.Essentials.Core/PartitionSensor/GlsPartitionSensorController.cs index 16b2f265..7298e303 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PartitionSensor/GlsPartitionSensorController.cs +++ b/src/PepperDash.Essentials.Core/PartitionSensor/GlsPartitionSensorController.cs @@ -1,350 +1,352 @@ -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.GeneralIO; -using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Essentials.Core.Bridges; -using PepperDash.Essentials.Core.Bridges.JoinMaps; - -using System; -using System.Collections.Generic; -using PepperDash.Essentials.Core.Config; -using PepperDash_Essentials_Core.PartitionSensor; - -namespace PepperDash.Essentials.Core -{ - [Description("Wrapper class for GLS Cresnet Partition Sensor")] - public class GlsPartitionSensorController : CrestronGenericBridgeableBaseDevice, IPartitionStateProvider - { - - public GlsPartitionSensorPropertiesConfig PropertiesConfig { get; private set; } - - private GlsPartCn _partitionSensor; - - public BoolFeedback EnableFeedback { get; private set; } - public BoolFeedback PartitionPresentFeedback { get; private set; } - public BoolFeedback PartitionNotSensedFeedback { get; private set; } - public IntFeedback SensitivityFeedback { get; private set; } - - public bool InTestMode { get; private set; } - public bool TestEnableFeedback { get; private set; } - public bool TestPartitionSensedFeedback { get; private set; } - public int TestSensitivityFeedback { get; private set; } - - - public GlsPartitionSensorController(string key, Func preActivationFunc, DeviceConfig config) - : base(key, config.Name) - { - - var props = config.Properties.ToObject(); - if (props != null) - { - PropertiesConfig = props; - } - else - { - Debug.Console(1, this, "props are null. Unable to deserialize into GlsPartSensorPropertiesConfig"); - } - - AddPreActivationAction(() => - { - _partitionSensor = preActivationFunc(config); - - RegisterCrestronGenericBase(_partitionSensor); - - EnableFeedback = new BoolFeedback(() => InTestMode ? TestEnableFeedback : _partitionSensor.EnableFeedback.BoolValue); - PartitionPresentFeedback = new BoolFeedback(() => InTestMode ? TestPartitionSensedFeedback : _partitionSensor.PartitionSensedFeedback.BoolValue); - PartitionNotSensedFeedback = new BoolFeedback(() => InTestMode ? !TestPartitionSensedFeedback : _partitionSensor.PartitionNotSensedFeedback.BoolValue); - SensitivityFeedback = new IntFeedback(() => InTestMode ? TestSensitivityFeedback : _partitionSensor.SensitivityFeedback.UShortValue); - - if (_partitionSensor != null) - { - _partitionSensor.BaseEvent += PartitionSensor_BaseEvent; - } - }); - - AddPostActivationAction(() => - { - _partitionSensor.OnlineStatusChange += (o, a) => - { - if (a.DeviceOnLine) - { - ApplySettingsToSensorFromConfig(); - } - }; - - if (_partitionSensor.IsOnline) - { - ApplySettingsToSensorFromConfig(); - } - }); - } - - private void ApplySettingsToSensorFromConfig() - { - if (_partitionSensor.IsOnline == false) return; - - Debug.Console(1, this, "Attempting to apply settings to sensor from config"); - - if (PropertiesConfig.Sensitivity != null) - { - Debug.Console(1, this, "Sensitivity found, attempting to set value '{0}' from config", - PropertiesConfig.Sensitivity); - _partitionSensor.Sensitivity.UShortValue = (ushort) PropertiesConfig.Sensitivity; - } - else - { - Debug.Console(1, this, "Sensitivity null, no value specified in config"); - } - - } - - private void PartitionSensor_BaseEvent(GenericBase device, BaseEventArgs args) - { - Debug.Console(2, this, "EventId: {0}, Index: {1}", args.EventId, args.Index); - - switch (args.EventId) - { - case (GlsPartCn.EnableFeedbackEventId): - { - EnableFeedback.FireUpdate(); - break; - } - case (GlsPartCn.PartitionSensedFeedbackEventId): - { - Debug.Console(1, this, "Partition Sensed State: {0}", _partitionSensor.PartitionSensedFeedback.BoolValue); - PartitionPresentFeedback.FireUpdate(); - break; - } - case (GlsPartCn.PartitionNotSensedFeedbackEventId): - { - Debug.Console(1, this, "Partition Not Sensed State: {0}", _partitionSensor.PartitionNotSensedFeedback.BoolValue); - PartitionNotSensedFeedback.FireUpdate(); - break; - } - case (GlsPartCn.SensitivityFeedbackEventId): - { - SensitivityFeedback.FireUpdate(); - break; - } - default: - { - Debug.Console(2, this, "Unhandled args.EventId: {0}", args.EventId); - break; - } - } - } - - public void SetTestMode(bool mode) - { - InTestMode = mode; - Debug.Console(1, this, "InTestMode: {0}", InTestMode.ToString()); - } - - public void SetTestEnableState(bool state) - { - if (InTestMode) - { - TestEnableFeedback = state; - - EnableFeedback.FireUpdate(); - - Debug.Console(1, this, "TestEnableFeedback: {0}", TestEnableFeedback.ToString()); - return; - } - - Debug.Console(1, this, "InTestMode: {0}, unable to set enable state: {1}", InTestMode.ToString(), state.ToString()); - } - - public void SetTestPartitionSensedState(bool state) - { - if (InTestMode) - { - TestPartitionSensedFeedback = state; - - PartitionPresentFeedback.FireUpdate(); - PartitionNotSensedFeedback.FireUpdate(); - - Debug.Console(1, this, "TestPartitionSensedFeedback: {0}", TestPartitionSensedFeedback.ToString()); - return; - } - - Debug.Console(1, this, "InTestMode: {0}, unable to set partition state: {1}", InTestMode.ToString(), state.ToString()); - } - - public void SetTestSensitivityValue(int value) - { - if (InTestMode) - { - TestSensitivityFeedback = value; - - SensitivityFeedback.FireUpdate(); - Debug.Console(1, this, "TestSensitivityFeedback: {0}", TestSensitivityFeedback); - return; - } - - Debug.Console(1, this, "InTestMode: {0}, unable to set sensitivity value: {1}", InTestMode.ToString(), value); - } - - public void GetSettings() - { - var dash = new string('*', 50); - CrestronConsole.PrintLine(string.Format("{0}\n", dash)); - - Debug.Console(0, this, "Enabled State: {0}", _partitionSensor.EnableFeedback.BoolValue); - - Debug.Console(0, this, "Partition Sensed State: {0}", _partitionSensor.PartitionSensedFeedback.BoolValue); - Debug.Console(0, this, "Partition Not Sensed State: {0}", _partitionSensor.PartitionNotSensedFeedback.BoolValue); - - Debug.Console(0, this, "Sensitivity Value: {0}", _partitionSensor.SensitivityFeedback.UShortValue); - - CrestronConsole.PrintLine(string.Format("{0}\n", dash)); - } - - public void SetEnableState(bool state) - { - Debug.Console(2, this, "Sensor is {0}, SetEnableState: {1}", _partitionSensor == null ? "null" : "not null", state); - if (_partitionSensor == null) - return; - - _partitionSensor.Enable.BoolValue = state; - } - - public void IncreaseSensitivity() - { - Debug.Console(2, this, "Sensor is {0}, IncreaseSensitivity", _partitionSensor == null ? "null" : "not null"); - if (_partitionSensor == null) - return; - - _partitionSensor.IncreaseSensitivity(); - } - - public void DecreaseSensitivity() - { - Debug.Console(2, this, "Sensor is {0}, DecreaseSensitivity", _partitionSensor == null ? "null" : "not null"); - if (_partitionSensor == null) - return; - - _partitionSensor.DecreaseSensitivity(); - } - - public void SetSensitivity(ushort value) - { - Debug.Console(2, this, "Sensor is {0}, SetSensitivity: {1}", _partitionSensor == null ? "null" : "not null", value); - if (_partitionSensor == null) - return; - - _partitionSensor.Sensitivity.UShortValue = value; - } - - public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - var joinMap = new GlsPartitionSensorJoinMap(joinStart); - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - if (bridge != null) - { - bridge.AddJoinMap(Key, joinMap); - } - else - { - Debug.Console(0, this, "Please update config to use 'type': 'EiscApiAdvanced' to get all join map features for this device"); - } - - Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - Debug.Console(0, this, "Linking to Bridge Type {0}", GetType().Name); - - IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); - trilist.StringInput[joinMap.Name.JoinNumber].StringValue = _partitionSensor.Name; - - trilist.SetBoolSigAction(joinMap.Enable.JoinNumber, SetEnableState); - EnableFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Enable.JoinNumber]); - - PartitionPresentFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PartitionSensed.JoinNumber]); - PartitionNotSensedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PartitionNotSensed.JoinNumber]); - - trilist.SetSigTrueAction(joinMap.IncreaseSensitivity.JoinNumber, IncreaseSensitivity); - trilist.SetSigTrueAction(joinMap.DecreaseSensitivity.JoinNumber, DecreaseSensitivity); - - SensitivityFeedback.LinkInputSig(trilist.UShortInput[joinMap.Sensitivity.JoinNumber]); - trilist.SetUShortSigAction(joinMap.Sensitivity.JoinNumber, SetSensitivity); - - FeedbacksFireUpdates(); - - // update when device is online - _partitionSensor.OnlineStatusChange += (o, a) => - { - if (a.DeviceOnLine) - { - FeedbacksFireUpdates(); - } - }; - - // update when trilist is online - trilist.OnlineStatusChange += (o, a) => - { - if (a.DeviceOnLine) - { - trilist.StringInput[joinMap.Name.JoinNumber].StringValue = _partitionSensor.Name; - FeedbacksFireUpdates(); - } - }; - } - - private void FeedbacksFireUpdates() - { - IsOnline.FireUpdate(); - EnableFeedback.FireUpdate(); - PartitionPresentFeedback.FireUpdate(); - PartitionNotSensedFeedback.FireUpdate(); - SensitivityFeedback.FireUpdate(); - } - - #region PreActivation - - private static GlsPartCn GetGlsPartCnDevice(DeviceConfig dc) - { - var control = CommFactory.GetControlPropertiesConfig(dc); - var cresnetId = control.CresnetIdInt; - var branchId = control.ControlPortNumber; - var parentKey = string.IsNullOrEmpty(control.ControlPortDevKey) ? "processor" : control.ControlPortDevKey; - - if (parentKey.Equals("processor", StringComparison.CurrentCultureIgnoreCase)) - { - Debug.Console(0, "Device {0} is a valid cresnet master - creating new GlsPartCn", parentKey); - return new GlsPartCn(cresnetId, Global.ControlSystem); - } - var cresnetBridge = DeviceManager.GetDeviceForKey(parentKey) as IHasCresnetBranches; - - if (cresnetBridge != null) - { - Debug.Console(0, "Device {0} is a valid cresnet master - creating new GlsPartCn", parentKey); - return new GlsPartCn(cresnetId, cresnetBridge.CresnetBranches[branchId]); - } - Debug.Console(0, "Device {0} is not a valid cresnet master", parentKey); - return null; - } - #endregion - - - public class GlsPartitionSensorControllerFactory : EssentialsDeviceFactory - { - public GlsPartitionSensorControllerFactory() - { - TypeNames = new List { "glspartcn" }; - } - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - Debug.Console(1, "Factory Attempting to create new GlsPartitionSensorController Device"); - - return new GlsPartitionSensorController(dc.Key, GetGlsPartCnDevice, dc); - } - } - - } +extern alias Full; + +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.GeneralIO; +using Full.Newtonsoft.Json; +using PepperDash.Core; +using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Bridges.JoinMaps; + +using System; +using System.Collections.Generic; +using PepperDash.Essentials.Core.Config; +using PepperDash_Essentials_Core.PartitionSensor; + +namespace PepperDash.Essentials.Core +{ + [Description("Wrapper class for GLS Cresnet Partition Sensor")] + public class GlsPartitionSensorController : CrestronGenericBridgeableBaseDevice, IPartitionStateProvider + { + + public GlsPartitionSensorPropertiesConfig PropertiesConfig { get; private set; } + + private GlsPartCn _partitionSensor; + + public BoolFeedback EnableFeedback { get; private set; } + public BoolFeedback PartitionPresentFeedback { get; private set; } + public BoolFeedback PartitionNotSensedFeedback { get; private set; } + public IntFeedback SensitivityFeedback { get; private set; } + + public bool InTestMode { get; private set; } + public bool TestEnableFeedback { get; private set; } + public bool TestPartitionSensedFeedback { get; private set; } + public int TestSensitivityFeedback { get; private set; } + + + public GlsPartitionSensorController(string key, Func preActivationFunc, DeviceConfig config) + : base(key, config.Name) + { + + var props = config.Properties.ToObject(); + if (props != null) + { + PropertiesConfig = props; + } + else + { + Debug.Console(1, this, "props are null. Unable to deserialize into GlsPartSensorPropertiesConfig"); + } + + AddPreActivationAction(() => + { + _partitionSensor = preActivationFunc(config); + + RegisterCrestronGenericBase(_partitionSensor); + + EnableFeedback = new BoolFeedback(() => InTestMode ? TestEnableFeedback : _partitionSensor.EnableFeedback.BoolValue); + PartitionPresentFeedback = new BoolFeedback(() => InTestMode ? TestPartitionSensedFeedback : _partitionSensor.PartitionSensedFeedback.BoolValue); + PartitionNotSensedFeedback = new BoolFeedback(() => InTestMode ? !TestPartitionSensedFeedback : _partitionSensor.PartitionNotSensedFeedback.BoolValue); + SensitivityFeedback = new IntFeedback(() => InTestMode ? TestSensitivityFeedback : _partitionSensor.SensitivityFeedback.UShortValue); + + if (_partitionSensor != null) + { + _partitionSensor.BaseEvent += PartitionSensor_BaseEvent; + } + }); + + AddPostActivationAction(() => + { + _partitionSensor.OnlineStatusChange += (o, a) => + { + if (a.DeviceOnLine) + { + ApplySettingsToSensorFromConfig(); + } + }; + + if (_partitionSensor.IsOnline) + { + ApplySettingsToSensorFromConfig(); + } + }); + } + + private void ApplySettingsToSensorFromConfig() + { + if (_partitionSensor.IsOnline == false) return; + + Debug.Console(1, this, "Attempting to apply settings to sensor from config"); + + if (PropertiesConfig.Sensitivity != null) + { + Debug.Console(1, this, "Sensitivity found, attempting to set value '{0}' from config", + PropertiesConfig.Sensitivity); + _partitionSensor.Sensitivity.UShortValue = (ushort) PropertiesConfig.Sensitivity; + } + else + { + Debug.Console(1, this, "Sensitivity null, no value specified in config"); + } + + } + + private void PartitionSensor_BaseEvent(GenericBase device, BaseEventArgs args) + { + Debug.Console(2, this, "EventId: {0}, Index: {1}", args.EventId, args.Index); + + switch (args.EventId) + { + case (GlsPartCn.EnableFeedbackEventId): + { + EnableFeedback.FireUpdate(); + break; + } + case (GlsPartCn.PartitionSensedFeedbackEventId): + { + Debug.Console(1, this, "Partition Sensed State: {0}", _partitionSensor.PartitionSensedFeedback.BoolValue); + PartitionPresentFeedback.FireUpdate(); + break; + } + case (GlsPartCn.PartitionNotSensedFeedbackEventId): + { + Debug.Console(1, this, "Partition Not Sensed State: {0}", _partitionSensor.PartitionNotSensedFeedback.BoolValue); + PartitionNotSensedFeedback.FireUpdate(); + break; + } + case (GlsPartCn.SensitivityFeedbackEventId): + { + SensitivityFeedback.FireUpdate(); + break; + } + default: + { + Debug.Console(2, this, "Unhandled args.EventId: {0}", args.EventId); + break; + } + } + } + + public void SetTestMode(bool mode) + { + InTestMode = mode; + Debug.Console(1, this, "InTestMode: {0}", InTestMode.ToString()); + } + + public void SetTestEnableState(bool state) + { + if (InTestMode) + { + TestEnableFeedback = state; + + EnableFeedback.FireUpdate(); + + Debug.Console(1, this, "TestEnableFeedback: {0}", TestEnableFeedback.ToString()); + return; + } + + Debug.Console(1, this, "InTestMode: {0}, unable to set enable state: {1}", InTestMode.ToString(), state.ToString()); + } + + public void SetTestPartitionSensedState(bool state) + { + if (InTestMode) + { + TestPartitionSensedFeedback = state; + + PartitionPresentFeedback.FireUpdate(); + PartitionNotSensedFeedback.FireUpdate(); + + Debug.Console(1, this, "TestPartitionSensedFeedback: {0}", TestPartitionSensedFeedback.ToString()); + return; + } + + Debug.Console(1, this, "InTestMode: {0}, unable to set partition state: {1}", InTestMode.ToString(), state.ToString()); + } + + public void SetTestSensitivityValue(int value) + { + if (InTestMode) + { + TestSensitivityFeedback = value; + + SensitivityFeedback.FireUpdate(); + Debug.Console(1, this, "TestSensitivityFeedback: {0}", TestSensitivityFeedback); + return; + } + + Debug.Console(1, this, "InTestMode: {0}, unable to set sensitivity value: {1}", InTestMode.ToString(), value); + } + + public void GetSettings() + { + var dash = new string('*', 50); + CrestronConsole.PrintLine(string.Format("{0}\n", dash)); + + Debug.Console(0, this, "Enabled State: {0}", _partitionSensor.EnableFeedback.BoolValue); + + Debug.Console(0, this, "Partition Sensed State: {0}", _partitionSensor.PartitionSensedFeedback.BoolValue); + Debug.Console(0, this, "Partition Not Sensed State: {0}", _partitionSensor.PartitionNotSensedFeedback.BoolValue); + + Debug.Console(0, this, "Sensitivity Value: {0}", _partitionSensor.SensitivityFeedback.UShortValue); + + CrestronConsole.PrintLine(string.Format("{0}\n", dash)); + } + + public void SetEnableState(bool state) + { + Debug.Console(2, this, "Sensor is {0}, SetEnableState: {1}", _partitionSensor == null ? "null" : "not null", state); + if (_partitionSensor == null) + return; + + _partitionSensor.Enable.BoolValue = state; + } + + public void IncreaseSensitivity() + { + Debug.Console(2, this, "Sensor is {0}, IncreaseSensitivity", _partitionSensor == null ? "null" : "not null"); + if (_partitionSensor == null) + return; + + _partitionSensor.IncreaseSensitivity(); + } + + public void DecreaseSensitivity() + { + Debug.Console(2, this, "Sensor is {0}, DecreaseSensitivity", _partitionSensor == null ? "null" : "not null"); + if (_partitionSensor == null) + return; + + _partitionSensor.DecreaseSensitivity(); + } + + public void SetSensitivity(ushort value) + { + Debug.Console(2, this, "Sensor is {0}, SetSensitivity: {1}", _partitionSensor == null ? "null" : "not null", value); + if (_partitionSensor == null) + return; + + _partitionSensor.Sensitivity.UShortValue = value; + } + + public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + var joinMap = new GlsPartitionSensorJoinMap(joinStart); + var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); + + if (bridge != null) + { + bridge.AddJoinMap(Key, joinMap); + } + else + { + Debug.Console(0, this, "Please update config to use 'type': 'EiscApiAdvanced' to get all join map features for this device"); + } + + Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); + Debug.Console(0, this, "Linking to Bridge Type {0}", GetType().Name); + + IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); + trilist.StringInput[joinMap.Name.JoinNumber].StringValue = _partitionSensor.Name; + + trilist.SetBoolSigAction(joinMap.Enable.JoinNumber, SetEnableState); + EnableFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Enable.JoinNumber]); + + PartitionPresentFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PartitionSensed.JoinNumber]); + PartitionNotSensedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PartitionNotSensed.JoinNumber]); + + trilist.SetSigTrueAction(joinMap.IncreaseSensitivity.JoinNumber, IncreaseSensitivity); + trilist.SetSigTrueAction(joinMap.DecreaseSensitivity.JoinNumber, DecreaseSensitivity); + + SensitivityFeedback.LinkInputSig(trilist.UShortInput[joinMap.Sensitivity.JoinNumber]); + trilist.SetUShortSigAction(joinMap.Sensitivity.JoinNumber, SetSensitivity); + + FeedbacksFireUpdates(); + + // update when device is online + _partitionSensor.OnlineStatusChange += (o, a) => + { + if (a.DeviceOnLine) + { + FeedbacksFireUpdates(); + } + }; + + // update when trilist is online + trilist.OnlineStatusChange += (o, a) => + { + if (a.DeviceOnLine) + { + trilist.StringInput[joinMap.Name.JoinNumber].StringValue = _partitionSensor.Name; + FeedbacksFireUpdates(); + } + }; + } + + private void FeedbacksFireUpdates() + { + IsOnline.FireUpdate(); + EnableFeedback.FireUpdate(); + PartitionPresentFeedback.FireUpdate(); + PartitionNotSensedFeedback.FireUpdate(); + SensitivityFeedback.FireUpdate(); + } + + #region PreActivation + + private static GlsPartCn GetGlsPartCnDevice(DeviceConfig dc) + { + var control = CommFactory.GetControlPropertiesConfig(dc); + var cresnetId = control.CresnetIdInt; + var branchId = control.ControlPortNumber; + var parentKey = string.IsNullOrEmpty(control.ControlPortDevKey) ? "processor" : control.ControlPortDevKey; + + if (parentKey.Equals("processor", StringComparison.CurrentCultureIgnoreCase)) + { + Debug.Console(0, "Device {0} is a valid cresnet master - creating new GlsPartCn", parentKey); + return new GlsPartCn(cresnetId, Global.ControlSystem); + } + var cresnetBridge = DeviceManager.GetDeviceForKey(parentKey) as IHasCresnetBranches; + + if (cresnetBridge != null) + { + Debug.Console(0, "Device {0} is a valid cresnet master - creating new GlsPartCn", parentKey); + return new GlsPartCn(cresnetId, cresnetBridge.CresnetBranches[branchId]); + } + Debug.Console(0, "Device {0} is not a valid cresnet master", parentKey); + return null; + } + #endregion + + + public class GlsPartitionSensorControllerFactory : EssentialsDeviceFactory + { + public GlsPartitionSensorControllerFactory() + { + TypeNames = new List { "glspartcn" }; + } + + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + Debug.Console(1, "Factory Attempting to create new GlsPartitionSensorController Device"); + + return new GlsPartitionSensorController(dc.Key, GetGlsPartCnDevice, dc); + } + } + + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PartitionSensor/GlsPartitionSensorPropertiesConfig.cs b/src/PepperDash.Essentials.Core/PartitionSensor/GlsPartitionSensorPropertiesConfig.cs similarity index 88% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/PartitionSensor/GlsPartitionSensorPropertiesConfig.cs rename to src/PepperDash.Essentials.Core/PartitionSensor/GlsPartitionSensorPropertiesConfig.cs index 8a303662..635b8962 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PartitionSensor/GlsPartitionSensorPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Core/PartitionSensor/GlsPartitionSensorPropertiesConfig.cs @@ -1,9 +1,11 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash_Essentials_Core.PartitionSensor { diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PartitionSensor/IPartitionStateProvider.cs b/src/PepperDash.Essentials.Core/PartitionSensor/IPartitionStateProvider.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/PartitionSensor/IPartitionStateProvider.cs rename to src/PepperDash.Essentials.Core/PartitionSensor/IPartitionStateProvider.cs diff --git a/src/PepperDash.Essentials.Core/PepperDash.Essentials.Core.csproj b/src/PepperDash.Essentials.Core/PepperDash.Essentials.Core.csproj new file mode 100644 index 00000000..7360df12 --- /dev/null +++ b/src/PepperDash.Essentials.Core/PepperDash.Essentials.Core.csproj @@ -0,0 +1,40 @@ + + + ProgramLibrary + + + net472 + bin\$(Configuration)\ + PepperDash.Essentials.Core + PepperDash.Essentials.Core + PepperDash Essentials Core + $(AssemblyName) + + + full + + + pdbonly + + + + + + + + + + + + + + + Full + + + + + + + + \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj b/src/PepperDash.Essentials.Core/PepperDash_Essentials_Core.csproj similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj rename to src/PepperDash.Essentials.Core/PepperDash_Essentials_Core.csproj index 9a4b95e4..6020fbac 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj +++ b/src/PepperDash.Essentials.Core/PepperDash_Essentials_Core.csproj @@ -1,434 +1,434 @@ - - - Release - AnyCPU - 9.0.30729 - 2.0 - {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} - Library - Properties - PepperDash.Essentials.Core - PepperDash_Essentials_Core - {0B4745B0-194B-4BB6-8E21-E9057CA92300};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - WindowsCE - E2BECB1F-8C8C-41ba-B736-9BE7D946A398 - 5.0 - SmartDeviceProject1 - v3.5 - Windows CE - - - - - .allowedReferenceRelatedFileExtensions - true - full - false - bin\ - DEBUG;TRACE; - prompt - 4 - 512 - true - true - off - - - .allowedReferenceRelatedFileExtensions - none - true - bin\ - prompt - 4 - 512 - true - true - off - - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.EthernetCommunications.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Fusion.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Gateways.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.GeneralIO.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Remotes.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.ThreeSeriesCards.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll - - - - False - ..\..\..\packages\PepperDashCore\lib\net35\PepperDash_Core.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll - False - - - False - ..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCWSHelperInterface.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll - False - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe - False - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll - - - False - ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpTimerEventInterface.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Code - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {E51D7C84-4906-486C-B2BA-EEB3B4E9731B} - PepperDash_Essentials_Interfaces - - - - - - - - - rem S# Pro preparation will execute after these operations - + + + Release + AnyCPU + 9.0.30729 + 2.0 + {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} + Library + Properties + PepperDash.Essentials.Core + PepperDash_Essentials_Core + {0B4745B0-194B-4BB6-8E21-E9057CA92300};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WindowsCE + E2BECB1F-8C8C-41ba-B736-9BE7D946A398 + 5.0 + SmartDeviceProject1 + v3.5 + Windows CE + + + + + .allowedReferenceRelatedFileExtensions + true + full + false + bin\ + DEBUG;TRACE; + prompt + 4 + 512 + true + true + off + + + .allowedReferenceRelatedFileExtensions + none + true + bin\ + prompt + 4 + 512 + true + true + off + + + + False + ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll + + + False + ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll + + + False + ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.EthernetCommunications.dll + + + False + ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Fusion.dll + + + False + ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Gateways.dll + + + False + ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.GeneralIO.dll + + + False + ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Remotes.dll + + + False + ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.ThreeSeriesCards.dll + + + False + ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll + + + + False + ..\..\..\packages\PepperDashCore\lib\net35\PepperDash_Core.dll + + + False + ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll + False + + + False + ..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCWSHelperInterface.dll + + + False + ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll + False + + + False + ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll + + + False + ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe + False + + + False + ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll + + + False + ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpTimerEventInterface.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Code + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {E51D7C84-4906-486C-B2BA-EEB3B4E9731B} + PepperDash_Essentials_Interfaces + + + + + + + + + rem S# Pro preparation will execute after these operations + \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj.DotSettings b/src/PepperDash.Essentials.Core/PepperDash_Essentials_Core.csproj.DotSettings similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj.DotSettings rename to src/PepperDash.Essentials.Core/PepperDash_Essentials_Core.csproj.DotSettings diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/IPluginDeviceFactory.cs b/src/PepperDash.Essentials.Core/Plugins/IPluginDeviceFactory.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/IPluginDeviceFactory.cs rename to src/PepperDash.Essentials.Core/Plugins/IPluginDeviceFactory.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/PluginLoader.cs b/src/PepperDash.Essentials.Core/Plugins/PluginLoader.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/PluginLoader.cs rename to src/PepperDash.Essentials.Core/Plugins/PluginLoader.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Presets/DevicePresets.cs b/src/PepperDash.Essentials.Core/Presets/DevicePresets.cs similarity index 99% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Presets/DevicePresets.cs rename to src/PepperDash.Essentials.Core/Presets/DevicePresets.cs index d6a9fad0..ab59914d 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Presets/DevicePresets.cs +++ b/src/PepperDash.Essentials.Core/Presets/DevicePresets.cs @@ -1,9 +1,11 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Text; using Crestron.SimplSharp; using Crestron.SimplSharp.CrestronIO; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; using PepperDash.Core; //using SSMono.IO; diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Presets/DevicePresetsView.cs b/src/PepperDash.Essentials.Core/Presets/DevicePresetsView.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Presets/DevicePresetsView.cs rename to src/PepperDash.Essentials.Core/Presets/DevicePresetsView.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Presets/Interfaces.cs b/src/PepperDash.Essentials.Core/Presets/Interfaces.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Presets/Interfaces.cs rename to src/PepperDash.Essentials.Core/Presets/Interfaces.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Presets/PresetBase.cs b/src/PepperDash.Essentials.Core/Presets/PresetBase.cs similarity index 94% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Presets/PresetBase.cs rename to src/PepperDash.Essentials.Core/Presets/PresetBase.cs index 76ffbbc3..1263d231 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Presets/PresetBase.cs +++ b/src/PepperDash.Essentials.Core/Presets/PresetBase.cs @@ -1,10 +1,12 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.Core.Presets { diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Presets/PresetChannel.cs b/src/PepperDash.Essentials.Core/Presets/PresetChannel.cs similarity index 92% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Presets/PresetChannel.cs rename to src/PepperDash.Essentials.Core/Presets/PresetChannel.cs index 259ccbb9..203722f3 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Presets/PresetChannel.cs +++ b/src/PepperDash.Essentials.Core/Presets/PresetChannel.cs @@ -1,9 +1,11 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.Core.Presets { diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Presets/PresetsListSubpageReferenceListItem.cs b/src/PepperDash.Essentials.Core/Presets/PresetsListSubpageReferenceListItem.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Presets/PresetsListSubpageReferenceListItem.cs rename to src/PepperDash.Essentials.Core/Presets/PresetsListSubpageReferenceListItem.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Properties/ControlSystem.cfg b/src/PepperDash.Essentials.Core/Properties/ControlSystem.cfg similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Properties/ControlSystem.cfg rename to src/PepperDash.Essentials.Core/Properties/ControlSystem.cfg diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Queues/ComsMessage.cs b/src/PepperDash.Essentials.Core/Queues/ComsMessage.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Queues/ComsMessage.cs rename to src/PepperDash.Essentials.Core/Queues/ComsMessage.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Queues/GenericQueue.cs b/src/PepperDash.Essentials.Core/Queues/GenericQueue.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Queues/GenericQueue.cs rename to src/PepperDash.Essentials.Core/Queues/GenericQueue.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Queues/IQueue.cs b/src/PepperDash.Essentials.Core/Queues/IQueue.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Queues/IQueue.cs rename to src/PepperDash.Essentials.Core/Queues/IQueue.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Queues/IQueueMessage.cs b/src/PepperDash.Essentials.Core/Queues/IQueueMessage.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Queues/IQueueMessage.cs rename to src/PepperDash.Essentials.Core/Queues/IQueueMessage.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Queues/ProcessStringMessage.cs b/src/PepperDash.Essentials.Core/Queues/ProcessStringMessage.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Queues/ProcessStringMessage.cs rename to src/PepperDash.Essentials.Core/Queues/ProcessStringMessage.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Queues/StringResponseProcessor.cs b/src/PepperDash.Essentials.Core/Queues/StringResponseProcessor.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Queues/StringResponseProcessor.cs rename to src/PepperDash.Essentials.Core/Queues/StringResponseProcessor.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Ramps and Increments/ActionIncrementer.cs b/src/PepperDash.Essentials.Core/Ramps and Increments/ActionIncrementer.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Ramps and Increments/ActionIncrementer.cs rename to src/PepperDash.Essentials.Core/Ramps and Increments/ActionIncrementer.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Ramps and Increments/NumericalHelpers.cs b/src/PepperDash.Essentials.Core/Ramps and Increments/NumericalHelpers.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Ramps and Increments/NumericalHelpers.cs rename to src/PepperDash.Essentials.Core/Ramps and Increments/NumericalHelpers.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Ramps and Increments/UshortSigIncrementer.cs b/src/PepperDash.Essentials.Core/Ramps and Increments/UshortSigIncrementer.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Ramps and Increments/UshortSigIncrementer.cs rename to src/PepperDash.Essentials.Core/Ramps and Increments/UshortSigIncrementer.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Remotes/ButtonExtensions.cs b/src/PepperDash.Essentials.Core/Remotes/ButtonExtensions.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Remotes/ButtonExtensions.cs rename to src/PepperDash.Essentials.Core/Remotes/ButtonExtensions.cs index 43941260..58cf7d7c 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Remotes/ButtonExtensions.cs +++ b/src/PepperDash.Essentials.Core/Remotes/ButtonExtensions.cs @@ -1,47 +1,47 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Core; - -namespace PepperDash.Essentials.Core -{ - public static class ButtonExtensions - { - public static Button SetButtonAction(this Button button, Action a) - { - button.UserObject = a; - return button; - } - - public static Button SetButtonAction(this CrestronCollection public interface IShadesOpenCloseStop - { - void Open(); + { + void Open(); void Close(); void Stop(); - } - - public interface IShadesOpenClosePreset : IShadesOpenCloseStop - { - void RecallPreset(uint presetNumber); - void SavePreset(uint presetNumber); - string StopOrPresetButtonLabel { get; } - - event EventHandler PresetSaved; + } + + public interface IShadesOpenClosePreset : IShadesOpenCloseStop + { + void RecallPreset(uint presetNumber); + void SavePreset(uint presetNumber); + string StopOrPresetButtonLabel { get; } + + event EventHandler PresetSaved; } /// /// Requirements for a shade that implements press/hold raise/lower functions - /// + /// [Obsolete("Please use IShadesOpenCloseStop instead")] public interface IShadesRaiseLower { @@ -75,8 +75,8 @@ namespace PepperDash.Essentials.Core.Shades /// /// - /// - [Obsolete("Please use IShadesOpenCloseStop instead")] + /// + [Obsolete("Please use IShadesOpenCloseStop instead")] public interface IShadesStop { void Stop(); @@ -84,7 +84,7 @@ namespace PepperDash.Essentials.Core.Shades /// /// Used to implement raise/stop/lower/stop from single button - /// + /// public interface IShadesStopOrMove { void OpenOrStop(); diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Shades/ShadeBase.cs b/src/PepperDash.Essentials.Core/Shades/ShadeBase.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Shades/ShadeBase.cs rename to src/PepperDash.Essentials.Core/Shades/ShadeBase.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Shades/ShadeController.cs b/src/PepperDash.Essentials.Core/Shades/ShadeController.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Shades/ShadeController.cs rename to src/PepperDash.Essentials.Core/Shades/ShadeController.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/SigHelper.cs b/src/PepperDash.Essentials.Core/SigHelper.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/SigHelper.cs rename to src/PepperDash.Essentials.Core/SigHelper.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/SmartObjects/SmartObjectDPad.cs b/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectDPad.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/SmartObjects/SmartObjectDPad.cs rename to src/PepperDash.Essentials.Core/SmartObjects/SmartObjectDPad.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/SmartObjects/SmartObjectDynamicList.cs b/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectDynamicList.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/SmartObjects/SmartObjectDynamicList.cs rename to src/PepperDash.Essentials.Core/SmartObjects/SmartObjectDynamicList.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/SmartObjects/SmartObjectHelperBase.cs b/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectHelperBase.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/SmartObjects/SmartObjectHelperBase.cs rename to src/PepperDash.Essentials.Core/SmartObjects/SmartObjectHelperBase.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/SmartObjects/SmartObjectNumeric.cs b/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectNumeric.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/SmartObjects/SmartObjectNumeric.cs rename to src/PepperDash.Essentials.Core/SmartObjects/SmartObjectNumeric.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/SmartObjects/SubpageReferencList/SourceListSubpageReferenceList.cs b/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SourceListSubpageReferenceList.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/SmartObjects/SubpageReferencList/SourceListSubpageReferenceList.cs rename to src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SourceListSubpageReferenceList.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/SmartObjects/SubpageReferencList/SubpageReferenceList.cs b/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SubpageReferenceList.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/SmartObjects/SubpageReferencList/SubpageReferenceList.cs rename to src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SubpageReferenceList.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/SmartObjects/SubpageReferencList/SubpageReferenceListItem.cs b/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SubpageReferenceListItem.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/SmartObjects/SubpageReferencList/SubpageReferenceListItem.cs rename to src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SubpageReferenceListItem.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Timers/CountdownTimer.cs b/src/PepperDash.Essentials.Core/Timers/CountdownTimer.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Timers/CountdownTimer.cs rename to src/PepperDash.Essentials.Core/Timers/CountdownTimer.cs index 3678b092..763a4fe1 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Timers/CountdownTimer.cs +++ b/src/PepperDash.Essentials.Core/Timers/CountdownTimer.cs @@ -1,148 +1,148 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -using PepperDash.Core; - -namespace PepperDash.Essentials.Core -{ - public class SecondsCountdownTimer: IKeyed - { - public event EventHandler HasStarted; - public event EventHandler HasFinished; - public event EventHandler WasCancelled; - - public string Key { get; private set; } - - public BoolFeedback IsRunningFeedback { get; private set; } - bool _isRunning; - - public IntFeedback PercentFeedback { get; private set; } - public StringFeedback TimeRemainingFeedback { get; private set; } - - public bool CountsDown { get; set; } - - /// - /// The number of seconds to countdown - /// - public int SecondsToCount { get; set; } - - public DateTime StartTime { get; private set; } - public DateTime FinishTime { get; private set; } - - private CTimer _secondTimer; - - /// - /// Constructor - /// - /// - public SecondsCountdownTimer(string key) - { - Key = key; - IsRunningFeedback = new BoolFeedback(() => _isRunning); - - TimeRemainingFeedback = new StringFeedback(() => - { - // Need to handle up and down here. - - var timeSpan = FinishTime - DateTime.Now; - - Debug.Console(2, this, - "timeSpan.Minutes == {0}, timeSpan.Seconds == {1}, timeSpan.TotalSeconds == {2}", - timeSpan.Minutes, timeSpan.Seconds, timeSpan.TotalSeconds); - - if (Math.Floor(timeSpan.TotalSeconds) < 60 && Math.Floor(timeSpan.TotalSeconds) >= 0) //ignore milliseconds - { - return String.Format("{0:00}", timeSpan.Seconds); - } - - return Math.Floor(timeSpan.TotalSeconds) < 0 - ? "00" - : String.Format("{0:00}:{1:00}", timeSpan.Minutes, timeSpan.Seconds); - }); - - PercentFeedback = - new IntFeedback( - () => - (int) - (Math.Floor((FinishTime - DateTime.Now).TotalSeconds)/ - Math.Floor((FinishTime - StartTime).TotalSeconds)*100)); - } - - /// - /// Starts the Timer - /// - public void Start() - { - if (_isRunning) - return; - StartTime = DateTime.Now; - FinishTime = StartTime + TimeSpan.FromSeconds(SecondsToCount); - - if (_secondTimer != null) - _secondTimer.Stop(); - _secondTimer = new CTimer(SecondElapsedTimerCallback, null, 0, 1000); - _isRunning = true; - IsRunningFeedback.FireUpdate(); - - var handler = HasStarted; - if (handler != null) - handler(this, new EventArgs()); - } - - /// - /// Restarts the timer - /// - public void Reset() - { - _isRunning = false; - Start(); - } - - /// - /// Cancels the timer (without triggering it to finish) - /// - public void Cancel() - { - StopHelper(); - - var handler = WasCancelled; - if (handler != null) - handler(this, new EventArgs()); - } - - /// - /// Called upon expiration, or calling this will force timer to finish. - /// - public void Finish() - { - StopHelper(); - - var handler = HasFinished; - if (handler != null) - handler(this, new EventArgs()); - } - - void StopHelper() - { - if (_secondTimer != null) - _secondTimer.Stop(); - _isRunning = false; - IsRunningFeedback.FireUpdate(); - } - - void SecondElapsedTimerCallback(object o) - { - if (DateTime.Now >= FinishTime) - { - Finish(); - return; - } - - PercentFeedback.FireUpdate(); - TimeRemainingFeedback.FireUpdate(); - } - } +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +using PepperDash.Core; + +namespace PepperDash.Essentials.Core +{ + public class SecondsCountdownTimer: IKeyed + { + public event EventHandler HasStarted; + public event EventHandler HasFinished; + public event EventHandler WasCancelled; + + public string Key { get; private set; } + + public BoolFeedback IsRunningFeedback { get; private set; } + bool _isRunning; + + public IntFeedback PercentFeedback { get; private set; } + public StringFeedback TimeRemainingFeedback { get; private set; } + + public bool CountsDown { get; set; } + + /// + /// The number of seconds to countdown + /// + public int SecondsToCount { get; set; } + + public DateTime StartTime { get; private set; } + public DateTime FinishTime { get; private set; } + + private CTimer _secondTimer; + + /// + /// Constructor + /// + /// + public SecondsCountdownTimer(string key) + { + Key = key; + IsRunningFeedback = new BoolFeedback(() => _isRunning); + + TimeRemainingFeedback = new StringFeedback(() => + { + // Need to handle up and down here. + + var timeSpan = FinishTime - DateTime.Now; + + Debug.Console(2, this, + "timeSpan.Minutes == {0}, timeSpan.Seconds == {1}, timeSpan.TotalSeconds == {2}", + timeSpan.Minutes, timeSpan.Seconds, timeSpan.TotalSeconds); + + if (Math.Floor(timeSpan.TotalSeconds) < 60 && Math.Floor(timeSpan.TotalSeconds) >= 0) //ignore milliseconds + { + return String.Format("{0:00}", timeSpan.Seconds); + } + + return Math.Floor(timeSpan.TotalSeconds) < 0 + ? "00" + : String.Format("{0:00}:{1:00}", timeSpan.Minutes, timeSpan.Seconds); + }); + + PercentFeedback = + new IntFeedback( + () => + (int) + (Math.Floor((FinishTime - DateTime.Now).TotalSeconds)/ + Math.Floor((FinishTime - StartTime).TotalSeconds)*100)); + } + + /// + /// Starts the Timer + /// + public void Start() + { + if (_isRunning) + return; + StartTime = DateTime.Now; + FinishTime = StartTime + TimeSpan.FromSeconds(SecondsToCount); + + if (_secondTimer != null) + _secondTimer.Stop(); + _secondTimer = new CTimer(SecondElapsedTimerCallback, null, 0, 1000); + _isRunning = true; + IsRunningFeedback.FireUpdate(); + + var handler = HasStarted; + if (handler != null) + handler(this, new EventArgs()); + } + + /// + /// Restarts the timer + /// + public void Reset() + { + _isRunning = false; + Start(); + } + + /// + /// Cancels the timer (without triggering it to finish) + /// + public void Cancel() + { + StopHelper(); + + var handler = WasCancelled; + if (handler != null) + handler(this, new EventArgs()); + } + + /// + /// Called upon expiration, or calling this will force timer to finish. + /// + public void Finish() + { + StopHelper(); + + var handler = HasFinished; + if (handler != null) + handler(this, new EventArgs()); + } + + void StopHelper() + { + if (_secondTimer != null) + _secondTimer.Stop(); + _isRunning = false; + IsRunningFeedback.FireUpdate(); + } + + void SecondElapsedTimerCallback(object o) + { + if (DateTime.Now >= FinishTime) + { + Finish(); + return; + } + + PercentFeedback.FireUpdate(); + TimeRemainingFeedback.FireUpdate(); + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Timers/RetriggerableTimer.cs b/src/PepperDash.Essentials.Core/Timers/RetriggerableTimer.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Timers/RetriggerableTimer.cs rename to src/PepperDash.Essentials.Core/Timers/RetriggerableTimer.cs index 67222e43..0064fd7a 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Timers/RetriggerableTimer.cs +++ b/src/PepperDash.Essentials.Core/Timers/RetriggerableTimer.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -8,7 +10,7 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Config; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.Core.Timers diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/CrestronTouchpanelPropertiesConfig.cs b/src/PepperDash.Essentials.Core/Touchpanels/CrestronTouchpanelPropertiesConfig.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/CrestronTouchpanelPropertiesConfig.cs rename to src/PepperDash.Essentials.Core/Touchpanels/CrestronTouchpanelPropertiesConfig.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/Interfaces.cs b/src/PepperDash.Essentials.Core/Touchpanels/Interfaces.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/Interfaces.cs rename to src/PepperDash.Essentials.Core/Touchpanels/Interfaces.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/Keyboards/HabaneroKeyboardController.cs b/src/PepperDash.Essentials.Core/Touchpanels/Keyboards/HabaneroKeyboardController.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/Keyboards/HabaneroKeyboardController.cs rename to src/PepperDash.Essentials.Core/Touchpanels/Keyboards/HabaneroKeyboardController.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/ModalDialog.cs b/src/PepperDash.Essentials.Core/Touchpanels/ModalDialog.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/ModalDialog.cs rename to src/PepperDash.Essentials.Core/Touchpanels/ModalDialog.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/Mpc3Touchpanel.cs b/src/PepperDash.Essentials.Core/Touchpanels/Mpc3Touchpanel.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/Mpc3Touchpanel.cs rename to src/PepperDash.Essentials.Core/Touchpanels/Mpc3Touchpanel.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/TriListExtensions.cs b/src/PepperDash.Essentials.Core/Touchpanels/TriListExtensions.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/TriListExtensions.cs rename to src/PepperDash.Essentials.Core/Touchpanels/TriListExtensions.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/TriListBridges/HandlerBridge.cs b/src/PepperDash.Essentials.Core/TriListBridges/HandlerBridge.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/TriListBridges/HandlerBridge.cs rename to src/PepperDash.Essentials.Core/TriListBridges/HandlerBridge.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/UI PageManagers/BlurayPageManager.cs b/src/PepperDash.Essentials.Core/UI PageManagers/BlurayPageManager.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/UI PageManagers/BlurayPageManager.cs rename to src/PepperDash.Essentials.Core/UI PageManagers/BlurayPageManager.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/UI PageManagers/PageManager.cs b/src/PepperDash.Essentials.Core/UI PageManagers/PageManager.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/UI PageManagers/PageManager.cs rename to src/PepperDash.Essentials.Core/UI PageManagers/PageManager.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/UI PageManagers/SetTopBoxThreePanelPageManager.cs b/src/PepperDash.Essentials.Core/UI PageManagers/SetTopBoxThreePanelPageManager.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/UI PageManagers/SetTopBoxThreePanelPageManager.cs rename to src/PepperDash.Essentials.Core/UI PageManagers/SetTopBoxThreePanelPageManager.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/UI PageManagers/SetTopBoxTwoPanelPageManager.cs b/src/PepperDash.Essentials.Core/UI PageManagers/SetTopBoxTwoPanelPageManager.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/UI PageManagers/SetTopBoxTwoPanelPageManager.cs rename to src/PepperDash.Essentials.Core/UI PageManagers/SetTopBoxTwoPanelPageManager.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/UI PageManagers/SinglePageManager.cs b/src/PepperDash.Essentials.Core/UI PageManagers/SinglePageManager.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/UI PageManagers/SinglePageManager.cs rename to src/PepperDash.Essentials.Core/UI PageManagers/SinglePageManager.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/UI/TouchpanelBase.cs b/src/PepperDash.Essentials.Core/UI/TouchpanelBase.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/UI/TouchpanelBase.cs rename to src/PepperDash.Essentials.Core/UI/TouchpanelBase.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Utilities/ActionSequence.cs b/src/PepperDash.Essentials.Core/Utilities/ActionSequence.cs similarity index 98% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Utilities/ActionSequence.cs rename to src/PepperDash.Essentials.Core/Utilities/ActionSequence.cs index 90c99579..8b657fd5 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Utilities/ActionSequence.cs +++ b/src/PepperDash.Essentials.Core/Utilities/ActionSequence.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,7 +11,7 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Config; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.Core.Utilities { diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/VideoStatus/VideoStatusOutputs.cs b/src/PepperDash.Essentials.Core/VideoStatus/VideoStatusOutputs.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/VideoStatus/VideoStatusOutputs.cs rename to src/PepperDash.Essentials.Core/VideoStatus/VideoStatusOutputs.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/EssemtialsWebApi.cs b/src/PepperDash.Essentials.Core/Web/EssemtialsWebApi.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/EssemtialsWebApi.cs rename to src/PepperDash.Essentials.Core/Web/EssemtialsWebApi.cs index 973b303b..dc6b2efb 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/EssemtialsWebApi.cs +++ b/src/PepperDash.Essentials.Core/Web/EssemtialsWebApi.cs @@ -1,242 +1,242 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Crestron.SimplSharp; -using Crestron.SimplSharp.WebScripting; -using Crestron.SimplSharpPro.Diagnostics; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using PepperDash.Core; -using PepperDash.Core.Web; -using PepperDash.Essentials.Core.Web.RequestHandlers; - -namespace PepperDash.Essentials.Core.Web -{ - public class EssemtialsWebApi : EssentialsDevice - { - private readonly WebApiServer _server; - - /// - /// http(s)://{ipaddress}/cws/{basePath} - /// http(s)://{ipaddress}/VirtualControl/Rooms/{roomId}/cws/{basePath} - /// - private readonly string _defaultBasePath = - CrestronEnvironment.DevicePlatform == eDevicePlatform.Appliance ? string.Format("/app{0:00}/api", InitialParametersClass.ApplicationNumber) : "/api"; - - // TODO [ ] Reset debug levels to proper value Trace = 0, Info = 1, Verbose = 2 - private const int DebugTrace = 0; - private const int DebugInfo = 0; - private const int DebugVerbose = 0; - - /// - /// CWS base path - /// - public string BasePath { get; private set; } - - /// - /// Tracks if CWS is registered - /// - public bool IsRegistered - { - get { return _server.IsRegistered; } - } - - /// - /// Constructor - /// - /// - /// - public EssemtialsWebApi(string key, string name) - : this(key, name, null) - { - } - - /// - /// Constructor - /// - /// - /// - /// - public EssemtialsWebApi(string key, string name, EssentialsWebApiPropertiesConfig config) - : base(key, name) - { - Key = key; - - if (config == null) - BasePath = _defaultBasePath; - else - BasePath = string.IsNullOrEmpty(config.BasePath) ? _defaultBasePath : config.BasePath; - - _server = new WebApiServer(Key, Name, BasePath); - } - - /// - /// Custom activate, add routes - /// - /// - public override bool CustomActivate() - { - var routes = new List - { - new HttpCwsRoute("reportversions") - { - Name = "ReportVersions", - RouteHandler = new ReportVersionsRequestHandler() - }, - new HttpCwsRoute("appdebug") - { - Name = "AppDebug", - RouteHandler = new AppDebugRequestHandler() - }, - new HttpCwsRoute("devlist") - { - Name = "DevList", - RouteHandler = new DevListRequestHandler() - }, - new HttpCwsRoute("devprops") - { - Name = "DevProps", - RouteHandler = new DevPropsRequestHandler() - }, - //new HttpCwsRoute("devprops/{key}") - //{ - // Name = "DevProps", - // RouteHandler = new DevPropsRequestHandler() - //}, - new HttpCwsRoute("devjson") - { - Name = "DevJson", - RouteHandler = new DevJsonRequestHandler() - }, - new HttpCwsRoute("setdevicestreamdebug") - { - Name = "SetDeviceStreamDebug", - RouteHandler = new SetDeviceStreamDebugRequestHandler() - }, - //new HttpCwsRoute("setdevicestreamdebug/{deviceKey}/{state}") - //{ - // Name = "SetDeviceStreamDebug", - // RouteHandler = new SetDeviceStreamDebugRequestHandler() - //}, - new HttpCwsRoute("disableallstreamdebug") - { - Name = "DisableAllStreamDebug", - RouteHandler = new DisableAllStreamDebugRequestHandler() - }, - new HttpCwsRoute("showconfig") - { - Name = "ShowConfig", - RouteHandler = new ShowConfigRequestHandler() - }, - new HttpCwsRoute("gettypes") - { - Name = "GetTypes", - RouteHandler = new GetTypesRequestHandler() - }, - new HttpCwsRoute("gettypes/{filter}") - { - Name = "GetTypesByFilter", - RouteHandler = new GetTypesByFilterRequestHandler() - }, - new HttpCwsRoute("getjoinmap/{bridgeKey}") - { - Name = "GetJoinMapsForBridgeKey", - RouteHandler = new GetJoinMapForBridgeKeyRequestHandler() - }, - new HttpCwsRoute("getjoinmap/{bridgeKey}/{deviceKey}") - { - Name = "GetJoinMapsForDeviceKey", - RouteHandler = new GetJoinMapForDeviceKeyRequestHandler() - }, - new HttpCwsRoute("feedbacks/{deviceKey}") - { - Name = "GetFeedbacksForDeviceKey", - RouteHandler = new GetFeedbacksForDeviceRequestHandler() - } - }; - - foreach (var route in routes.Where(route => route != null)) - { - var r = route; - _server.AddRoute(r); - } - - return base.CustomActivate(); - } - - /// - /// Initializes the CWS class - /// - public override void Initialize() - { - // If running on an appliance - if (CrestronEnvironment.DevicePlatform == eDevicePlatform.Appliance) - { - /* - RMC4> - WEBSERVER [ON | OFF | TIMEOUT | MAXSESSIONSPERUSER ] - WEBSERVER [TIMEOUT] will display current session timeout value - WEBSERVER MAXSESSIONSPERUSER will display current max web sessions per user - WEBSERVER ALLOWSHAREDSESSION will display whether 'samesite = none' would be set on cookies - No parameter - displays current setting - */ - var response = string.Empty; - CrestronConsole.SendControlSystemCommand("webserver", ref response); - if (response.Contains("OFF")) return; - - var is4Series = eCrestronSeries.Series4 == (Global.ProcessorSeries & eCrestronSeries.Series4); - Debug.Console(DebugTrace, Debug.ErrorLogLevel.Notice, "Starting Essentials Web API on {0} Appliance", is4Series ? "4-series" : "3-series"); - - _server.Start(); - - GetPaths(); - - return; - } - - // Automatically start CWS when running on a server (Linux OS, Virtual Control) - Debug.Console(DebugTrace, Debug.ErrorLogLevel.Notice, "Starting Essentials Web API on Virtual Control Server"); - - _server.Start(); - - GetPaths(); - } - - /// - /// Print the available pahts - /// - /// - /// http(s)://{ipaddress}/cws/{basePath} - /// http(s)://{ipaddress}/VirtualControl/Rooms/{roomId}/cws/{basePath} - /// - public void GetPaths() - { - Debug.Console(DebugTrace, this, "{0}", new String('-', 50)); - - var currentIp = CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0); - - var hostname = CrestronEthernetHelper.GetEthernetParameter( - CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_HOSTNAME, 0); - - var path = CrestronEnvironment.DevicePlatform == eDevicePlatform.Server - ? string.Format("http(s)://{0}/VirtualControl/Rooms/{1}/cws{2}", hostname, InitialParametersClass.RoomId, BasePath) - : string.Format("http(s)://{0}/cws{1}", currentIp, BasePath); - - Debug.Console(DebugTrace, this, "Server:{0}", path); - - var routeCollection = _server.GetRouteCollection(); - if (routeCollection == null) - { - Debug.Console(DebugTrace, this, "Server route collection is null"); - return; - } - Debug.Console(DebugTrace, this, "Configured Routes:"); - foreach (var route in routeCollection) - { - Debug.Console(DebugTrace, this, "{0}: {1}/{2}", route.Name, path, route.Url); - } - Debug.Console(DebugTrace, this, "{0}", new String('-', 50)); - } - } +using System; +using System.Collections.Generic; +using System.Linq; +using Crestron.SimplSharp; +using Crestron.SimplSharp.WebScripting; +using Crestron.SimplSharpPro.Diagnostics; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using PepperDash.Core; +using PepperDash.Core.Web; +using PepperDash.Essentials.Core.Web.RequestHandlers; + +namespace PepperDash.Essentials.Core.Web +{ + public class EssemtialsWebApi : EssentialsDevice + { + private readonly WebApiServer _server; + + /// + /// http(s)://{ipaddress}/cws/{basePath} + /// http(s)://{ipaddress}/VirtualControl/Rooms/{roomId}/cws/{basePath} + /// + private readonly string _defaultBasePath = + CrestronEnvironment.DevicePlatform == eDevicePlatform.Appliance ? string.Format("/app{0:00}/api", InitialParametersClass.ApplicationNumber) : "/api"; + + // TODO [ ] Reset debug levels to proper value Trace = 0, Info = 1, Verbose = 2 + private const int DebugTrace = 0; + private const int DebugInfo = 0; + private const int DebugVerbose = 0; + + /// + /// CWS base path + /// + public string BasePath { get; private set; } + + /// + /// Tracks if CWS is registered + /// + public bool IsRegistered + { + get { return _server.IsRegistered; } + } + + /// + /// Constructor + /// + /// + /// + public EssemtialsWebApi(string key, string name) + : this(key, name, null) + { + } + + /// + /// Constructor + /// + /// + /// + /// + public EssemtialsWebApi(string key, string name, EssentialsWebApiPropertiesConfig config) + : base(key, name) + { + Key = key; + + if (config == null) + BasePath = _defaultBasePath; + else + BasePath = string.IsNullOrEmpty(config.BasePath) ? _defaultBasePath : config.BasePath; + + _server = new WebApiServer(Key, Name, BasePath); + } + + /// + /// Custom activate, add routes + /// + /// + public override bool CustomActivate() + { + var routes = new List + { + new HttpCwsRoute("reportversions") + { + Name = "ReportVersions", + RouteHandler = new ReportVersionsRequestHandler() + }, + new HttpCwsRoute("appdebug") + { + Name = "AppDebug", + RouteHandler = new AppDebugRequestHandler() + }, + new HttpCwsRoute("devlist") + { + Name = "DevList", + RouteHandler = new DevListRequestHandler() + }, + new HttpCwsRoute("devprops") + { + Name = "DevProps", + RouteHandler = new DevPropsRequestHandler() + }, + //new HttpCwsRoute("devprops/{key}") + //{ + // Name = "DevProps", + // RouteHandler = new DevPropsRequestHandler() + //}, + new HttpCwsRoute("devjson") + { + Name = "DevJson", + RouteHandler = new DevJsonRequestHandler() + }, + new HttpCwsRoute("setdevicestreamdebug") + { + Name = "SetDeviceStreamDebug", + RouteHandler = new SetDeviceStreamDebugRequestHandler() + }, + //new HttpCwsRoute("setdevicestreamdebug/{deviceKey}/{state}") + //{ + // Name = "SetDeviceStreamDebug", + // RouteHandler = new SetDeviceStreamDebugRequestHandler() + //}, + new HttpCwsRoute("disableallstreamdebug") + { + Name = "DisableAllStreamDebug", + RouteHandler = new DisableAllStreamDebugRequestHandler() + }, + new HttpCwsRoute("showconfig") + { + Name = "ShowConfig", + RouteHandler = new ShowConfigRequestHandler() + }, + new HttpCwsRoute("gettypes") + { + Name = "GetTypes", + RouteHandler = new GetTypesRequestHandler() + }, + new HttpCwsRoute("gettypes/{filter}") + { + Name = "GetTypesByFilter", + RouteHandler = new GetTypesByFilterRequestHandler() + }, + new HttpCwsRoute("getjoinmap/{bridgeKey}") + { + Name = "GetJoinMapsForBridgeKey", + RouteHandler = new GetJoinMapForBridgeKeyRequestHandler() + }, + new HttpCwsRoute("getjoinmap/{bridgeKey}/{deviceKey}") + { + Name = "GetJoinMapsForDeviceKey", + RouteHandler = new GetJoinMapForDeviceKeyRequestHandler() + }, + new HttpCwsRoute("feedbacks/{deviceKey}") + { + Name = "GetFeedbacksForDeviceKey", + RouteHandler = new GetFeedbacksForDeviceRequestHandler() + } + }; + + foreach (var route in routes.Where(route => route != null)) + { + var r = route; + _server.AddRoute(r); + } + + return base.CustomActivate(); + } + + /// + /// Initializes the CWS class + /// + public override void Initialize() + { + // If running on an appliance + if (CrestronEnvironment.DevicePlatform == eDevicePlatform.Appliance) + { + /* + RMC4> + WEBSERVER [ON | OFF | TIMEOUT | MAXSESSIONSPERUSER ] + WEBSERVER [TIMEOUT] will display current session timeout value + WEBSERVER MAXSESSIONSPERUSER will display current max web sessions per user + WEBSERVER ALLOWSHAREDSESSION will display whether 'samesite = none' would be set on cookies + No parameter - displays current setting + */ + var response = string.Empty; + CrestronConsole.SendControlSystemCommand("webserver", ref response); + if (response.Contains("OFF")) return; + + var is4Series = eCrestronSeries.Series4 == (Global.ProcessorSeries & eCrestronSeries.Series4); + Debug.Console(DebugTrace, Debug.ErrorLogLevel.Notice, "Starting Essentials Web API on {0} Appliance", is4Series ? "4-series" : "3-series"); + + _server.Start(); + + GetPaths(); + + return; + } + + // Automatically start CWS when running on a server (Linux OS, Virtual Control) + Debug.Console(DebugTrace, Debug.ErrorLogLevel.Notice, "Starting Essentials Web API on Virtual Control Server"); + + _server.Start(); + + GetPaths(); + } + + /// + /// Print the available pahts + /// + /// + /// http(s)://{ipaddress}/cws/{basePath} + /// http(s)://{ipaddress}/VirtualControl/Rooms/{roomId}/cws/{basePath} + /// + public void GetPaths() + { + Debug.Console(DebugTrace, this, "{0}", new String('-', 50)); + + var currentIp = CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0); + + var hostname = CrestronEthernetHelper.GetEthernetParameter( + CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_HOSTNAME, 0); + + var path = CrestronEnvironment.DevicePlatform == eDevicePlatform.Server + ? string.Format("http(s)://{0}/VirtualControl/Rooms/{1}/cws{2}", hostname, InitialParametersClass.RoomId, BasePath) + : string.Format("http(s)://{0}/cws{1}", currentIp, BasePath); + + Debug.Console(DebugTrace, this, "Server:{0}", path); + + var routeCollection = _server.GetRouteCollection(); + if (routeCollection == null) + { + Debug.Console(DebugTrace, this, "Server route collection is null"); + return; + } + Debug.Console(DebugTrace, this, "Configured Routes:"); + foreach (var route in routeCollection) + { + Debug.Console(DebugTrace, this, "{0}: {1}/{2}", route.Name, path, route.Url); + } + Debug.Console(DebugTrace, this, "{0}", new String('-', 50)); + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/EssentialsWebApiFactory.cs b/src/PepperDash.Essentials.Core/Web/EssentialsWebApiFactory.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/EssentialsWebApiFactory.cs rename to src/PepperDash.Essentials.Core/Web/EssentialsWebApiFactory.cs index 51361c2c..3e90808c 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/EssentialsWebApiFactory.cs +++ b/src/PepperDash.Essentials.Core/Web/EssentialsWebApiFactory.cs @@ -1,25 +1,25 @@ -using System.Collections.Generic; -using PepperDash.Core; -using PepperDash.Essentials.Core.Config; - -namespace PepperDash.Essentials.Core.Web -{ - public class EssentialsWebApiFactory : EssentialsDeviceFactory - { - public EssentialsWebApiFactory() - { - TypeNames = new List { "EssentialsWebApi" }; - } - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - Debug.Console(1, "Factory Attempting to create new Essentials Web API Server"); - - var props = dc.Properties.ToObject(); - if (props != null) return new EssemtialsWebApi(dc.Key, dc.Name, props); - - Debug.Console(1, "Factory failed to create new Essentials Web API Server"); - return null; - } - } +using System.Collections.Generic; +using PepperDash.Core; +using PepperDash.Essentials.Core.Config; + +namespace PepperDash.Essentials.Core.Web +{ + public class EssentialsWebApiFactory : EssentialsDeviceFactory + { + public EssentialsWebApiFactory() + { + TypeNames = new List { "EssentialsWebApi" }; + } + + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + Debug.Console(1, "Factory Attempting to create new Essentials Web API Server"); + + var props = dc.Properties.ToObject(); + if (props != null) return new EssemtialsWebApi(dc.Key, dc.Name, props); + + Debug.Console(1, "Factory failed to create new Essentials Web API Server"); + return null; + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/EssentialsWebApiHelpers.cs b/src/PepperDash.Essentials.Core/Web/EssentialsWebApiHelpers.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/EssentialsWebApiHelpers.cs rename to src/PepperDash.Essentials.Core/Web/EssentialsWebApiHelpers.cs index 4830edb4..89718fcf 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/EssentialsWebApiHelpers.cs +++ b/src/PepperDash.Essentials.Core/Web/EssentialsWebApiHelpers.cs @@ -1,87 +1,87 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp.WebScripting; -using PepperDash.Core; - -namespace PepperDash.Essentials.Core.Web -{ - public class EssentialsWebApiHelpers - { - public static string GetRequestBody(HttpCwsRequest request) - { - var bytes = new Byte[request.ContentLength]; - - request.InputStream.Read(bytes, 0, request.ContentLength); - - return Encoding.UTF8.GetString(bytes, 0, bytes.Length); - } - - public static object MapToAssemblyObject(LoadedAssembly assembly) - { - return new - { - Name = assembly.Name, - Version = assembly.Version - }; - } - - public static object MapToDeviceListObject(IKeyed device) - { - return new - { - Key = device.Key, - Name = (device is IKeyName) - ? (device as IKeyName).Name - : "---" - }; - } - - public static object MapJoinToObject(string key, JoinMapBaseAdvanced join) - { - var kp = new KeyValuePair(key, join); - - return MapJoinToObject(kp); - } - - public static object MapJoinToObject(KeyValuePair join) - { - return new - { - DeviceKey = join.Key, - Joins = join.Value.Joins.Select(j => MapJoinDataCompleteToObject(j)) - }; - } - - public static object MapJoinDataCompleteToObject(KeyValuePair joinData) - { - return new - { - Signal = joinData.Key, - Description = joinData.Value.Metadata.Description, - JoinNumber = joinData.Value.JoinNumber, - JoinSpan = joinData.Value.JoinSpan, - JoinType = joinData.Value.Metadata.JoinType.ToString(), - JoinCapabilities = joinData.Value.Metadata.JoinCapabilities.ToString() - }; - } - - public static object MapDeviceTypeToObject(string key, DeviceFactoryWrapper device) - { - var kp = new KeyValuePair(key, device); - - return MapDeviceTypeToObject(kp); - } - - public static object MapDeviceTypeToObject(KeyValuePair device) - { - return new - { - Type = device.Key, - Description = device.Value.Description, - CType = device.Value.CType == null ? "---": device.Value.CType.ToString() - }; - } - } +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp.WebScripting; +using PepperDash.Core; + +namespace PepperDash.Essentials.Core.Web +{ + public class EssentialsWebApiHelpers + { + public static string GetRequestBody(HttpCwsRequest request) + { + var bytes = new Byte[request.ContentLength]; + + request.InputStream.Read(bytes, 0, request.ContentLength); + + return Encoding.UTF8.GetString(bytes, 0, bytes.Length); + } + + public static object MapToAssemblyObject(LoadedAssembly assembly) + { + return new + { + Name = assembly.Name, + Version = assembly.Version + }; + } + + public static object MapToDeviceListObject(IKeyed device) + { + return new + { + Key = device.Key, + Name = (device is IKeyName) + ? (device as IKeyName).Name + : "---" + }; + } + + public static object MapJoinToObject(string key, JoinMapBaseAdvanced join) + { + var kp = new KeyValuePair(key, join); + + return MapJoinToObject(kp); + } + + public static object MapJoinToObject(KeyValuePair join) + { + return new + { + DeviceKey = join.Key, + Joins = join.Value.Joins.Select(j => MapJoinDataCompleteToObject(j)) + }; + } + + public static object MapJoinDataCompleteToObject(KeyValuePair joinData) + { + return new + { + Signal = joinData.Key, + Description = joinData.Value.Metadata.Description, + JoinNumber = joinData.Value.JoinNumber, + JoinSpan = joinData.Value.JoinSpan, + JoinType = joinData.Value.Metadata.JoinType.ToString(), + JoinCapabilities = joinData.Value.Metadata.JoinCapabilities.ToString() + }; + } + + public static object MapDeviceTypeToObject(string key, DeviceFactoryWrapper device) + { + var kp = new KeyValuePair(key, device); + + return MapDeviceTypeToObject(kp); + } + + public static object MapDeviceTypeToObject(KeyValuePair device) + { + return new + { + Type = device.Key, + Description = device.Value.Description, + CType = device.Value.CType == null ? "---": device.Value.CType.ToString() + }; + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/EssentialsWebApiPropertiesConfig.cs b/src/PepperDash.Essentials.Core/Web/EssentialsWebApiPropertiesConfig.cs similarity index 95% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/EssentialsWebApiPropertiesConfig.cs rename to src/PepperDash.Essentials.Core/Web/EssentialsWebApiPropertiesConfig.cs index a57e1ce9..7af4c631 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/EssentialsWebApiPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Core/Web/EssentialsWebApiPropertiesConfig.cs @@ -1,10 +1,10 @@ -using Newtonsoft.Json; - -namespace PepperDash.Essentials.Core.Web -{ - public class EssentialsWebApiPropertiesConfig - { - [JsonProperty("basePath")] - public string BasePath { get; set; } - } +using Newtonsoft.Json; + +namespace PepperDash.Essentials.Core.Web +{ + public class EssentialsWebApiPropertiesConfig + { + [JsonProperty("basePath")] + public string BasePath { get; set; } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/AppDebugRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/AppDebugRequestHandler.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/AppDebugRequestHandler.cs rename to src/PepperDash.Essentials.Core/Web/RequestHandlers/AppDebugRequestHandler.cs index f80f9f7f..91f45927 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/AppDebugRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/AppDebugRequestHandler.cs @@ -1,150 +1,150 @@ -using System; -using System.Text; -using Crestron.SimplSharp.WebScripting; -using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Core.Web.RequestHandlers; - -namespace PepperDash.Essentials.Core.Web.RequestHandlers -{ - public class AppDebugRequestHandler : WebApiBaseRequestHandler - { - /// - /// Handles CONNECT method requests - /// - /// - protected override void HandleConnect(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles DELETE method requests - /// - /// - protected override void HandleDelete(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles GET method requests - /// - /// - protected override void HandleGet(HttpCwsContext context) - { - var appDebug = new AppDebug {Level = Debug.Level}; - - var body = JsonConvert.SerializeObject(appDebug, Formatting.Indented); - - context.Response.StatusCode = 200; - context.Response.StatusDescription = "OK"; - context.Response.Write(body, false); - context.Response.End(); - } - - /// - /// Handles HEAD method requests - /// - /// - protected override void HandleHead(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles OPTIONS method requests - /// - /// - protected override void HandleOptions(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles PATCH method requests - /// - /// - protected override void HandlePatch(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles POST method requests - /// - /// - protected override void HandlePost(HttpCwsContext context) - { - if (context.Request.ContentLength < 0) - { - context.Response.StatusCode = 400; - context.Response.StatusDescription = "Bad Request"; - context.Response.End(); - - return; - } - - var data = EssentialsWebApiHelpers.GetRequestBody(context.Request); - if (string.IsNullOrEmpty(data)) - { - context.Response.StatusCode = 400; - context.Response.StatusDescription = "Bad Request"; - context.Response.End(); - - return; - } - - var appDebug = new AppDebug(); - var requestBody = JsonConvert.DeserializeAnonymousType(data, appDebug); - - Debug.SetDebugLevel(requestBody.Level); - - appDebug.Level = Debug.Level; - var responseBody = JsonConvert.SerializeObject(appDebug, Formatting.Indented); - - context.Response.StatusCode = 200; - context.Response.StatusDescription = "OK"; - context.Response.Write(responseBody, false); - context.Response.End(); - } - - /// - /// Handles PUT method requests - /// - /// - protected override void HandlePut(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles TRACE method requests - /// - /// - protected override void HandleTrace(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - } - - public class AppDebug - { - [JsonProperty("level", NullValueHandling = NullValueHandling.Ignore)] - public int Level { get; set; } - } +using System; +using System.Text; +using Crestron.SimplSharp.WebScripting; +using Newtonsoft.Json; +using PepperDash.Core; +using PepperDash.Core.Web.RequestHandlers; + +namespace PepperDash.Essentials.Core.Web.RequestHandlers +{ + public class AppDebugRequestHandler : WebApiBaseRequestHandler + { + /// + /// Handles CONNECT method requests + /// + /// + protected override void HandleConnect(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles DELETE method requests + /// + /// + protected override void HandleDelete(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles GET method requests + /// + /// + protected override void HandleGet(HttpCwsContext context) + { + var appDebug = new AppDebug {Level = Debug.Level}; + + var body = JsonConvert.SerializeObject(appDebug, Formatting.Indented); + + context.Response.StatusCode = 200; + context.Response.StatusDescription = "OK"; + context.Response.Write(body, false); + context.Response.End(); + } + + /// + /// Handles HEAD method requests + /// + /// + protected override void HandleHead(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles OPTIONS method requests + /// + /// + protected override void HandleOptions(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles PATCH method requests + /// + /// + protected override void HandlePatch(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles POST method requests + /// + /// + protected override void HandlePost(HttpCwsContext context) + { + if (context.Request.ContentLength < 0) + { + context.Response.StatusCode = 400; + context.Response.StatusDescription = "Bad Request"; + context.Response.End(); + + return; + } + + var data = EssentialsWebApiHelpers.GetRequestBody(context.Request); + if (string.IsNullOrEmpty(data)) + { + context.Response.StatusCode = 400; + context.Response.StatusDescription = "Bad Request"; + context.Response.End(); + + return; + } + + var appDebug = new AppDebug(); + var requestBody = JsonConvert.DeserializeAnonymousType(data, appDebug); + + Debug.SetDebugLevel(requestBody.Level); + + appDebug.Level = Debug.Level; + var responseBody = JsonConvert.SerializeObject(appDebug, Formatting.Indented); + + context.Response.StatusCode = 200; + context.Response.StatusDescription = "OK"; + context.Response.Write(responseBody, false); + context.Response.End(); + } + + /// + /// Handles PUT method requests + /// + /// + protected override void HandlePut(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles TRACE method requests + /// + /// + protected override void HandleTrace(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + } + + public class AppDebug + { + [JsonProperty("level", NullValueHandling = NullValueHandling.Ignore)] + public int Level { get; set; } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/DefaultRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DefaultRequestHandler.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/DefaultRequestHandler.cs rename to src/PepperDash.Essentials.Core/Web/RequestHandlers/DefaultRequestHandler.cs index 4ffa500a..1186dc0c 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/DefaultRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DefaultRequestHandler.cs @@ -1,107 +1,107 @@ -using Crestron.SimplSharp.WebScripting; -using PepperDash.Core.Web.RequestHandlers; - -namespace PepperDash.Essentials.Core.Web.RequestHandlers -{ - public class DefaultRequestHandler : WebApiBaseRequestHandler - { - /// - /// Handles CONNECT method requests - /// - /// - protected override void HandleConnect(HttpCwsContext context) - { - context.Response.StatusCode = 418; - context.Response.StatusDescription = "I'm a teapot"; - context.Response.End(); - } - - /// - /// Handles DELETE method requests - /// - /// - protected override void HandleDelete(HttpCwsContext context) - { - context.Response.StatusCode = 418; - context.Response.StatusDescription = "I'm a teapot"; - context.Response.End(); - } - - /// - /// Handles GET method requests - /// - /// - protected override void HandleGet(HttpCwsContext context) - { - context.Response.StatusCode = 418; - context.Response.StatusDescription = "I'm a teapot"; - context.Response.End(); - } - - /// - /// Handles HEAD method requests - /// - /// - protected override void HandleHead(HttpCwsContext context) - { - context.Response.StatusCode = 418; - context.Response.StatusDescription = "I'm a teapot"; - context.Response.End(); - } - - /// - /// Handles OPTIONS method requests - /// - /// - protected override void HandleOptions(HttpCwsContext context) - { - context.Response.StatusCode = 418; - context.Response.StatusDescription = "I'm a teapot"; - context.Response.End(); - } - - /// - /// Handles PATCH method requests - /// - /// - protected override void HandlePatch(HttpCwsContext context) - { - context.Response.StatusCode = 418; - context.Response.StatusDescription = "I'm a teapot"; - context.Response.End(); - } - - /// - /// Handles POST method requests - /// - /// - protected override void HandlePost(HttpCwsContext context) - { - context.Response.StatusCode = 418; - context.Response.StatusDescription = "I'm a teapot"; - context.Response.End(); - } - - /// - /// Handles PUT method requests - /// - /// - protected override void HandlePut(HttpCwsContext context) - { - context.Response.StatusCode = 418; - context.Response.StatusDescription = "I'm a teapot"; - context.Response.End(); - } - - /// - /// Handles TRACE method requests - /// - /// - protected override void HandleTrace(HttpCwsContext context) - { - context.Response.StatusCode = 418; - context.Response.StatusDescription = "I'm a teapot"; - context.Response.End(); - } - } +using Crestron.SimplSharp.WebScripting; +using PepperDash.Core.Web.RequestHandlers; + +namespace PepperDash.Essentials.Core.Web.RequestHandlers +{ + public class DefaultRequestHandler : WebApiBaseRequestHandler + { + /// + /// Handles CONNECT method requests + /// + /// + protected override void HandleConnect(HttpCwsContext context) + { + context.Response.StatusCode = 418; + context.Response.StatusDescription = "I'm a teapot"; + context.Response.End(); + } + + /// + /// Handles DELETE method requests + /// + /// + protected override void HandleDelete(HttpCwsContext context) + { + context.Response.StatusCode = 418; + context.Response.StatusDescription = "I'm a teapot"; + context.Response.End(); + } + + /// + /// Handles GET method requests + /// + /// + protected override void HandleGet(HttpCwsContext context) + { + context.Response.StatusCode = 418; + context.Response.StatusDescription = "I'm a teapot"; + context.Response.End(); + } + + /// + /// Handles HEAD method requests + /// + /// + protected override void HandleHead(HttpCwsContext context) + { + context.Response.StatusCode = 418; + context.Response.StatusDescription = "I'm a teapot"; + context.Response.End(); + } + + /// + /// Handles OPTIONS method requests + /// + /// + protected override void HandleOptions(HttpCwsContext context) + { + context.Response.StatusCode = 418; + context.Response.StatusDescription = "I'm a teapot"; + context.Response.End(); + } + + /// + /// Handles PATCH method requests + /// + /// + protected override void HandlePatch(HttpCwsContext context) + { + context.Response.StatusCode = 418; + context.Response.StatusDescription = "I'm a teapot"; + context.Response.End(); + } + + /// + /// Handles POST method requests + /// + /// + protected override void HandlePost(HttpCwsContext context) + { + context.Response.StatusCode = 418; + context.Response.StatusDescription = "I'm a teapot"; + context.Response.End(); + } + + /// + /// Handles PUT method requests + /// + /// + protected override void HandlePut(HttpCwsContext context) + { + context.Response.StatusCode = 418; + context.Response.StatusDescription = "I'm a teapot"; + context.Response.End(); + } + + /// + /// Handles TRACE method requests + /// + /// + protected override void HandleTrace(HttpCwsContext context) + { + context.Response.StatusCode = 418; + context.Response.StatusDescription = "I'm a teapot"; + context.Response.End(); + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/DevJsonRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevJsonRequestHandler.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/DevJsonRequestHandler.cs rename to src/PepperDash.Essentials.Core/Web/RequestHandlers/DevJsonRequestHandler.cs index 6080465b..ff3045b5 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/DevJsonRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevJsonRequestHandler.cs @@ -1,139 +1,139 @@ -using System; -using System.Text; -using Crestron.SimplSharp.WebScripting; -using PepperDash.Core.Web.RequestHandlers; - -namespace PepperDash.Essentials.Core.Web.RequestHandlers -{ - public class DevJsonRequestHandler : WebApiBaseRequestHandler - { - /// - /// Handles CONNECT method requests - /// - /// - protected override void HandleConnect(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles DELETE method requests - /// - /// - protected override void HandleDelete(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles GET method requests - /// - /// - protected override void HandleGet(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles HEAD method requests - /// - /// - protected override void HandleHead(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles OPTIONS method requests - /// - /// - protected override void HandleOptions(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles PATCH method requests - /// - /// - protected override void HandlePatch(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles POST method requests - /// - /// - protected override void HandlePost(HttpCwsContext context) - { - if (context.Request.ContentLength < 0) - { - context.Response.StatusCode = 400; - context.Response.StatusDescription = "Bad Request"; - context.Response.End(); - - return; - } - - var data = EssentialsWebApiHelpers.GetRequestBody(context.Request); - if (string.IsNullOrEmpty(data)) - { - context.Response.StatusCode = 400; - context.Response.StatusDescription = "Bad Request"; - context.Response.End(); - - return; - } - - try - { - DeviceJsonApi.DoDeviceActionWithJson(data); - - context.Response.StatusCode = 200; - context.Response.StatusDescription = "OK"; - context.Response.End(); - } - catch (Exception ex) - { - context.Response.StatusCode = 400; - context.Response.StatusDescription = "Bad Request"; - context.Response.End(); - } - } - - /// - /// Handles PUT method requests - /// - /// - protected override void HandlePut(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles TRACE method requests - /// - /// - protected override void HandleTrace(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - } +using System; +using System.Text; +using Crestron.SimplSharp.WebScripting; +using PepperDash.Core.Web.RequestHandlers; + +namespace PepperDash.Essentials.Core.Web.RequestHandlers +{ + public class DevJsonRequestHandler : WebApiBaseRequestHandler + { + /// + /// Handles CONNECT method requests + /// + /// + protected override void HandleConnect(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles DELETE method requests + /// + /// + protected override void HandleDelete(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles GET method requests + /// + /// + protected override void HandleGet(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles HEAD method requests + /// + /// + protected override void HandleHead(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles OPTIONS method requests + /// + /// + protected override void HandleOptions(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles PATCH method requests + /// + /// + protected override void HandlePatch(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles POST method requests + /// + /// + protected override void HandlePost(HttpCwsContext context) + { + if (context.Request.ContentLength < 0) + { + context.Response.StatusCode = 400; + context.Response.StatusDescription = "Bad Request"; + context.Response.End(); + + return; + } + + var data = EssentialsWebApiHelpers.GetRequestBody(context.Request); + if (string.IsNullOrEmpty(data)) + { + context.Response.StatusCode = 400; + context.Response.StatusDescription = "Bad Request"; + context.Response.End(); + + return; + } + + try + { + DeviceJsonApi.DoDeviceActionWithJson(data); + + context.Response.StatusCode = 200; + context.Response.StatusDescription = "OK"; + context.Response.End(); + } + catch (Exception ex) + { + context.Response.StatusCode = 400; + context.Response.StatusDescription = "Bad Request"; + context.Response.End(); + } + } + + /// + /// Handles PUT method requests + /// + /// + protected override void HandlePut(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles TRACE method requests + /// + /// + protected override void HandleTrace(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/DevListRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevListRequestHandler.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/DevListRequestHandler.cs rename to src/PepperDash.Essentials.Core/Web/RequestHandlers/DevListRequestHandler.cs index c34542e2..1a548f29 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/DevListRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevListRequestHandler.cs @@ -1,128 +1,128 @@ -using System.Linq; -using Crestron.SimplSharp.WebScripting; -using Newtonsoft.Json; -using PepperDash.Core.Web.RequestHandlers; - -namespace PepperDash.Essentials.Core.Web.RequestHandlers -{ - public class DevListRequestHandler : WebApiBaseRequestHandler - { - /// - /// Handles CONNECT method requests - /// - /// - protected override void HandleConnect(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles DELETE method requests - /// - /// - protected override void HandleDelete(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles GET method requests - /// - /// - protected override void HandleGet(HttpCwsContext context) - { - var allDevices = DeviceManager.AllDevices; - if (allDevices == null) - { - context.Response.StatusCode = 404; - context.Response.StatusDescription = "Not Found"; - context.Response.End(); - - return; - } - - allDevices.Sort((a, b) => System.String.Compare(a.Key, b.Key, System.StringComparison.Ordinal)); - - var deviceList = allDevices.Select(d => EssentialsWebApiHelpers.MapToDeviceListObject(d)).ToList(); - - var js = JsonConvert.SerializeObject(deviceList, Formatting.Indented); - - context.Response.StatusCode = 200; - context.Response.StatusDescription = "OK"; - context.Response.ContentType = "application/json"; - context.Response.ContentEncoding = System.Text.Encoding.UTF8; - context.Response.Write(js, false); - context.Response.End(); - } - - /// - /// Handles HEAD method requests - /// - /// - protected override void HandleHead(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles OPTIONS method requests - /// - /// - protected override void HandleOptions(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles PATCH method requests - /// - /// - protected override void HandlePatch(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles POST method requests - /// - /// - protected override void HandlePost(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles PUT method requests - /// - /// - protected override void HandlePut(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles TRACE method requests - /// - /// - protected override void HandleTrace(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - } +using System.Linq; +using Crestron.SimplSharp.WebScripting; +using Newtonsoft.Json; +using PepperDash.Core.Web.RequestHandlers; + +namespace PepperDash.Essentials.Core.Web.RequestHandlers +{ + public class DevListRequestHandler : WebApiBaseRequestHandler + { + /// + /// Handles CONNECT method requests + /// + /// + protected override void HandleConnect(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles DELETE method requests + /// + /// + protected override void HandleDelete(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles GET method requests + /// + /// + protected override void HandleGet(HttpCwsContext context) + { + var allDevices = DeviceManager.AllDevices; + if (allDevices == null) + { + context.Response.StatusCode = 404; + context.Response.StatusDescription = "Not Found"; + context.Response.End(); + + return; + } + + allDevices.Sort((a, b) => System.String.Compare(a.Key, b.Key, System.StringComparison.Ordinal)); + + var deviceList = allDevices.Select(d => EssentialsWebApiHelpers.MapToDeviceListObject(d)).ToList(); + + var js = JsonConvert.SerializeObject(deviceList, Formatting.Indented); + + context.Response.StatusCode = 200; + context.Response.StatusDescription = "OK"; + context.Response.ContentType = "application/json"; + context.Response.ContentEncoding = System.Text.Encoding.UTF8; + context.Response.Write(js, false); + context.Response.End(); + } + + /// + /// Handles HEAD method requests + /// + /// + protected override void HandleHead(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles OPTIONS method requests + /// + /// + protected override void HandleOptions(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles PATCH method requests + /// + /// + protected override void HandlePatch(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles POST method requests + /// + /// + protected override void HandlePost(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles PUT method requests + /// + /// + protected override void HandlePut(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles TRACE method requests + /// + /// + protected override void HandleTrace(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/DevPropsRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevPropsRequestHandler.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/DevPropsRequestHandler.cs rename to src/PepperDash.Essentials.Core/Web/RequestHandlers/DevPropsRequestHandler.cs index b7dcc511..d7334591 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/DevPropsRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevPropsRequestHandler.cs @@ -1,154 +1,154 @@ -using System; -using System.Text; -using Crestron.SimplSharp.WebScripting; -using Newtonsoft.Json; -using PepperDash.Core.Web.RequestHandlers; - -namespace PepperDash.Essentials.Core.Web.RequestHandlers -{ - public class DevPropsRequestHandler : WebApiBaseRequestHandler - { - /// - /// Handles CONNECT method requests - /// - /// - protected override void HandleConnect(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles DELETE method requests - /// - /// - protected override void HandleDelete(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles GET method requests - /// - /// - protected override void HandleGet(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles HEAD method requests - /// - /// - protected override void HandleHead(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles OPTIONS method requests - /// - /// - protected override void HandleOptions(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles PATCH method requests - /// - /// - protected override void HandlePatch(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles POST method requests - /// - /// - protected override void HandlePost(HttpCwsContext context) - { - if (context.Request.ContentLength < 0) - { - context.Response.StatusCode = 400; - context.Response.StatusDescription = "Bad Request"; - context.Response.End(); - - return; - } - - var data = EssentialsWebApiHelpers.GetRequestBody(context.Request); - if (string.IsNullOrEmpty(data)) - { - context.Response.StatusCode = 400; - context.Response.StatusDescription = "Bad Request"; - context.Response.End(); - - return; - } - - var o = new DeviceActionWrapper(); - var body = JsonConvert.DeserializeAnonymousType(data, o); - - if (string.IsNullOrEmpty(body.DeviceKey)) - { - context.Response.StatusCode = 400; - context.Response.StatusDescription = "Bad Request"; - context.Response.End(); - - return; - } - - var deviceProps = DeviceJsonApi.GetProperties(body.DeviceKey); - if (deviceProps == null || deviceProps.ToLower().Contains("no device")) - { - context.Response.StatusCode = 404; - context.Response.StatusDescription = "Not Found"; - context.Response.End(); - - return; - } - - context.Response.StatusCode = 200; - context.Response.StatusDescription = "OK"; - context.Response.ContentType = "application/json"; - context.Response.ContentEncoding = Encoding.UTF8; - context.Response.Write(deviceProps, false); - context.Response.End(); - } - - /// - /// Handles PUT method requests - /// - /// - protected override void HandlePut(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles TRACE method requests - /// - /// - protected override void HandleTrace(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - } +using System; +using System.Text; +using Crestron.SimplSharp.WebScripting; +using Newtonsoft.Json; +using PepperDash.Core.Web.RequestHandlers; + +namespace PepperDash.Essentials.Core.Web.RequestHandlers +{ + public class DevPropsRequestHandler : WebApiBaseRequestHandler + { + /// + /// Handles CONNECT method requests + /// + /// + protected override void HandleConnect(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles DELETE method requests + /// + /// + protected override void HandleDelete(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles GET method requests + /// + /// + protected override void HandleGet(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles HEAD method requests + /// + /// + protected override void HandleHead(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles OPTIONS method requests + /// + /// + protected override void HandleOptions(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles PATCH method requests + /// + /// + protected override void HandlePatch(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles POST method requests + /// + /// + protected override void HandlePost(HttpCwsContext context) + { + if (context.Request.ContentLength < 0) + { + context.Response.StatusCode = 400; + context.Response.StatusDescription = "Bad Request"; + context.Response.End(); + + return; + } + + var data = EssentialsWebApiHelpers.GetRequestBody(context.Request); + if (string.IsNullOrEmpty(data)) + { + context.Response.StatusCode = 400; + context.Response.StatusDescription = "Bad Request"; + context.Response.End(); + + return; + } + + var o = new DeviceActionWrapper(); + var body = JsonConvert.DeserializeAnonymousType(data, o); + + if (string.IsNullOrEmpty(body.DeviceKey)) + { + context.Response.StatusCode = 400; + context.Response.StatusDescription = "Bad Request"; + context.Response.End(); + + return; + } + + var deviceProps = DeviceJsonApi.GetProperties(body.DeviceKey); + if (deviceProps == null || deviceProps.ToLower().Contains("no device")) + { + context.Response.StatusCode = 404; + context.Response.StatusDescription = "Not Found"; + context.Response.End(); + + return; + } + + context.Response.StatusCode = 200; + context.Response.StatusDescription = "OK"; + context.Response.ContentType = "application/json"; + context.Response.ContentEncoding = Encoding.UTF8; + context.Response.Write(deviceProps, false); + context.Response.End(); + } + + /// + /// Handles PUT method requests + /// + /// + protected override void HandlePut(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles TRACE method requests + /// + /// + protected override void HandleTrace(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/DisableAllStreamDebugRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DisableAllStreamDebugRequestHandler.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/DisableAllStreamDebugRequestHandler.cs rename to src/PepperDash.Essentials.Core/Web/RequestHandlers/DisableAllStreamDebugRequestHandler.cs index 8cfc7315..41dc4974 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/DisableAllStreamDebugRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DisableAllStreamDebugRequestHandler.cs @@ -1,109 +1,109 @@ -using Crestron.SimplSharp.WebScripting; -using PepperDash.Core.Web.RequestHandlers; - -namespace PepperDash.Essentials.Core.Web.RequestHandlers -{ - public class DisableAllStreamDebugRequestHandler : WebApiBaseRequestHandler - { - /// - /// Handles CONNECT method requests - /// - /// - protected override void HandleConnect(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles DELETE method requests - /// - /// - protected override void HandleDelete(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles GET method requests - /// - /// - protected override void HandleGet(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles HEAD method requests - /// - /// - protected override void HandleHead(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles OPTIONS method requests - /// - /// - protected override void HandleOptions(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles PATCH method requests - /// - /// - protected override void HandlePatch(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles POST method requests - /// - /// - protected override void HandlePost(HttpCwsContext context) - { - DeviceManager.DisableAllDeviceStreamDebugging(); - - context.Response.StatusCode = 200; - context.Response.StatusDescription = "OK"; - context.Response.End(); - } - - /// - /// Handles PUT method requests - /// - /// - protected override void HandlePut(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles TRACE method requests - /// - /// - protected override void HandleTrace(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - } +using Crestron.SimplSharp.WebScripting; +using PepperDash.Core.Web.RequestHandlers; + +namespace PepperDash.Essentials.Core.Web.RequestHandlers +{ + public class DisableAllStreamDebugRequestHandler : WebApiBaseRequestHandler + { + /// + /// Handles CONNECT method requests + /// + /// + protected override void HandleConnect(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles DELETE method requests + /// + /// + protected override void HandleDelete(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles GET method requests + /// + /// + protected override void HandleGet(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles HEAD method requests + /// + /// + protected override void HandleHead(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles OPTIONS method requests + /// + /// + protected override void HandleOptions(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles PATCH method requests + /// + /// + protected override void HandlePatch(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles POST method requests + /// + /// + protected override void HandlePost(HttpCwsContext context) + { + DeviceManager.DisableAllDeviceStreamDebugging(); + + context.Response.StatusCode = 200; + context.Response.StatusDescription = "OK"; + context.Response.End(); + } + + /// + /// Handles PUT method requests + /// + /// + protected override void HandlePut(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles TRACE method requests + /// + /// + protected override void HandleTrace(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/GetFeedbacksForDeviceRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetFeedbacksForDeviceRequestHandler.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/GetFeedbacksForDeviceRequestHandler.cs rename to src/PepperDash.Essentials.Core/Web/RequestHandlers/GetFeedbacksForDeviceRequestHandler.cs index 2f892f2b..1055dddd 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/GetFeedbacksForDeviceRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetFeedbacksForDeviceRequestHandler.cs @@ -1,179 +1,179 @@ -using System.Linq; -using Crestron.SimplSharp.WebScripting; -using Newtonsoft.Json; -using PepperDash.Core.Web.RequestHandlers; - -namespace PepperDash.Essentials.Core.Web.RequestHandlers -{ - public class GetFeedbacksForDeviceRequestHandler : WebApiBaseRequestHandler - { - /// - /// Handles CONNECT method requests - /// - /// - protected override void HandleConnect(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles DELETE method requests - /// - /// - protected override void HandleDelete(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles GET method requests - /// - /// - protected override void HandleGet(HttpCwsContext context) - { - var routeData = context.Request.RouteData; - if (routeData == null) - { - context.Response.StatusCode = 400; - context.Response.StatusDescription = "Bad Request"; - context.Response.End(); - - return; - } - - object deviceObj; - if (!routeData.Values.TryGetValue("deviceKey", out deviceObj)) - { - context.Response.StatusCode = 400; - context.Response.StatusDescription = "Bad Request"; - context.Response.End(); - - return; - } - - - var device = DeviceManager.GetDeviceForKey(deviceObj.ToString()) as IHasFeedback; - if (device == null) - { - context.Response.StatusCode = 404; - context.Response.StatusDescription = "Not Found"; - context.Response.End(); - - return; - } - - var boolFeedback = - from feedback in device.Feedbacks.OfType() - where !string.IsNullOrEmpty(feedback.Key) - select new - { - FeedbackKey = feedback.Key, - Value = feedback.BoolValue - }; - - var intFeedback = - from feedback in device.Feedbacks.OfType() - where !string.IsNullOrEmpty(feedback.Key) - select new - { - FeedbackKey = feedback.Key, - Value = feedback.IntValue - }; - - var stringFeedback = - from feedback in device.Feedbacks.OfType() - where !string.IsNullOrEmpty(feedback.Key) - select new - { - FeedbackKey = feedback.Key, - Value = feedback.StringValue ?? string.Empty - }; - - var responseObj = new - { - BoolValues = boolFeedback, - IntValues = intFeedback, - SerialValues = stringFeedback - }; - - var js = JsonConvert.SerializeObject(responseObj, Formatting.Indented); - - context.Response.StatusCode = 200; - context.Response.StatusDescription = "OK"; - context.Response.ContentType = "application/json"; - context.Response.ContentEncoding = System.Text.Encoding.UTF8; - context.Response.Write(js, false); - context.Response.End(); - } - - /// - /// Handles HEAD method requests - /// - /// - protected override void HandleHead(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles OPTIONS method requests - /// - /// - protected override void HandleOptions(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles PATCH method requests - /// - /// - protected override void HandlePatch(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles POST method requests - /// - /// - protected override void HandlePost(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles PUT method requests - /// - /// - protected override void HandlePut(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles TRACE method requests - /// - /// - protected override void HandleTrace(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - } +using System.Linq; +using Crestron.SimplSharp.WebScripting; +using Newtonsoft.Json; +using PepperDash.Core.Web.RequestHandlers; + +namespace PepperDash.Essentials.Core.Web.RequestHandlers +{ + public class GetFeedbacksForDeviceRequestHandler : WebApiBaseRequestHandler + { + /// + /// Handles CONNECT method requests + /// + /// + protected override void HandleConnect(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles DELETE method requests + /// + /// + protected override void HandleDelete(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles GET method requests + /// + /// + protected override void HandleGet(HttpCwsContext context) + { + var routeData = context.Request.RouteData; + if (routeData == null) + { + context.Response.StatusCode = 400; + context.Response.StatusDescription = "Bad Request"; + context.Response.End(); + + return; + } + + object deviceObj; + if (!routeData.Values.TryGetValue("deviceKey", out deviceObj)) + { + context.Response.StatusCode = 400; + context.Response.StatusDescription = "Bad Request"; + context.Response.End(); + + return; + } + + + var device = DeviceManager.GetDeviceForKey(deviceObj.ToString()) as IHasFeedback; + if (device == null) + { + context.Response.StatusCode = 404; + context.Response.StatusDescription = "Not Found"; + context.Response.End(); + + return; + } + + var boolFeedback = + from feedback in device.Feedbacks.OfType() + where !string.IsNullOrEmpty(feedback.Key) + select new + { + FeedbackKey = feedback.Key, + Value = feedback.BoolValue + }; + + var intFeedback = + from feedback in device.Feedbacks.OfType() + where !string.IsNullOrEmpty(feedback.Key) + select new + { + FeedbackKey = feedback.Key, + Value = feedback.IntValue + }; + + var stringFeedback = + from feedback in device.Feedbacks.OfType() + where !string.IsNullOrEmpty(feedback.Key) + select new + { + FeedbackKey = feedback.Key, + Value = feedback.StringValue ?? string.Empty + }; + + var responseObj = new + { + BoolValues = boolFeedback, + IntValues = intFeedback, + SerialValues = stringFeedback + }; + + var js = JsonConvert.SerializeObject(responseObj, Formatting.Indented); + + context.Response.StatusCode = 200; + context.Response.StatusDescription = "OK"; + context.Response.ContentType = "application/json"; + context.Response.ContentEncoding = System.Text.Encoding.UTF8; + context.Response.Write(js, false); + context.Response.End(); + } + + /// + /// Handles HEAD method requests + /// + /// + protected override void HandleHead(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles OPTIONS method requests + /// + /// + protected override void HandleOptions(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles PATCH method requests + /// + /// + protected override void HandlePatch(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles POST method requests + /// + /// + protected override void HandlePost(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles PUT method requests + /// + /// + protected override void HandlePut(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles TRACE method requests + /// + /// + protected override void HandleTrace(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/GetJoinMapForBridgeKeyRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetJoinMapForBridgeKeyRequestHandler.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/GetJoinMapForBridgeKeyRequestHandler.cs rename to src/PepperDash.Essentials.Core/Web/RequestHandlers/GetJoinMapForBridgeKeyRequestHandler.cs index d037b9e6..f4ec3975 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/GetJoinMapForBridgeKeyRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetJoinMapForBridgeKeyRequestHandler.cs @@ -1,157 +1,157 @@ -using System.Linq; -using Crestron.SimplSharp.WebScripting; -using Newtonsoft.Json; -using PepperDash.Core.Web.RequestHandlers; -using PepperDash.Essentials.Core.Bridges; - -namespace PepperDash.Essentials.Core.Web.RequestHandlers -{ - public class GetJoinMapForBridgeKeyRequestHandler : WebApiBaseRequestHandler - { - /// - /// Handles CONNECT method requests - /// - /// - protected override void HandleConnect(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles DELETE method requests - /// - /// - protected override void HandleDelete(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles GET method requests - /// - /// - protected override void HandleGet(HttpCwsContext context) - { - var routeData = context.Request.RouteData; - if (routeData == null) - { - context.Response.StatusCode = 400; - context.Response.StatusDescription = "Bad Request"; - context.Response.End(); - - return; - } - - object bridgeObj; - if (!routeData.Values.TryGetValue("bridgeKey", out bridgeObj)) - { - context.Response.StatusCode = 400; - context.Response.StatusDescription = "Bad Request"; - context.Response.End(); - - return; - } - - var bridge = DeviceManager.GetDeviceForKey(bridgeObj.ToString()) as EiscApiAdvanced; - if (bridge == null) - { - context.Response.StatusCode = 400; - context.Response.StatusDescription = "Bad Request"; - context.Response.End(); - - return; - } - - var joinMap = bridge.JoinMaps.Select(j => EssentialsWebApiHelpers.MapJoinToObject(j)).ToList(); - if (joinMap == null) - { - context.Response.StatusCode = 404; - context.Response.StatusDescription = "Not Found"; - context.Response.End(); - - return; - } - - var js = JsonConvert.SerializeObject(joinMap, Formatting.Indented); - - context.Response.StatusCode = 200; - context.Response.StatusDescription = "OK"; - context.Response.ContentType = "application/json"; - context.Response.ContentEncoding = System.Text.Encoding.UTF8; - context.Response.Write(js, false); - context.Response.End(); - } - - /// - /// Handles HEAD method requests - /// - /// - protected override void HandleHead(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles OPTIONS method requests - /// - /// - protected override void HandleOptions(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles PATCH method requests - /// - /// - protected override void HandlePatch(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles POST method requests - /// - /// - protected override void HandlePost(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles PUT method requests - /// - /// - protected override void HandlePut(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles TRACE method requests - /// - /// - protected override void HandleTrace(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - - } +using System.Linq; +using Crestron.SimplSharp.WebScripting; +using Newtonsoft.Json; +using PepperDash.Core.Web.RequestHandlers; +using PepperDash.Essentials.Core.Bridges; + +namespace PepperDash.Essentials.Core.Web.RequestHandlers +{ + public class GetJoinMapForBridgeKeyRequestHandler : WebApiBaseRequestHandler + { + /// + /// Handles CONNECT method requests + /// + /// + protected override void HandleConnect(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles DELETE method requests + /// + /// + protected override void HandleDelete(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles GET method requests + /// + /// + protected override void HandleGet(HttpCwsContext context) + { + var routeData = context.Request.RouteData; + if (routeData == null) + { + context.Response.StatusCode = 400; + context.Response.StatusDescription = "Bad Request"; + context.Response.End(); + + return; + } + + object bridgeObj; + if (!routeData.Values.TryGetValue("bridgeKey", out bridgeObj)) + { + context.Response.StatusCode = 400; + context.Response.StatusDescription = "Bad Request"; + context.Response.End(); + + return; + } + + var bridge = DeviceManager.GetDeviceForKey(bridgeObj.ToString()) as EiscApiAdvanced; + if (bridge == null) + { + context.Response.StatusCode = 400; + context.Response.StatusDescription = "Bad Request"; + context.Response.End(); + + return; + } + + var joinMap = bridge.JoinMaps.Select(j => EssentialsWebApiHelpers.MapJoinToObject(j)).ToList(); + if (joinMap == null) + { + context.Response.StatusCode = 404; + context.Response.StatusDescription = "Not Found"; + context.Response.End(); + + return; + } + + var js = JsonConvert.SerializeObject(joinMap, Formatting.Indented); + + context.Response.StatusCode = 200; + context.Response.StatusDescription = "OK"; + context.Response.ContentType = "application/json"; + context.Response.ContentEncoding = System.Text.Encoding.UTF8; + context.Response.Write(js, false); + context.Response.End(); + } + + /// + /// Handles HEAD method requests + /// + /// + protected override void HandleHead(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles OPTIONS method requests + /// + /// + protected override void HandleOptions(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles PATCH method requests + /// + /// + protected override void HandlePatch(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles POST method requests + /// + /// + protected override void HandlePost(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles PUT method requests + /// + /// + protected override void HandlePut(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles TRACE method requests + /// + /// + protected override void HandleTrace(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/GetJoinMapForDeviceKeyRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetJoinMapForDeviceKeyRequestHandler.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/GetJoinMapForDeviceKeyRequestHandler.cs rename to src/PepperDash.Essentials.Core/Web/RequestHandlers/GetJoinMapForDeviceKeyRequestHandler.cs index 63ca47a0..fe3fc999 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/GetJoinMapForDeviceKeyRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetJoinMapForDeviceKeyRequestHandler.cs @@ -1,172 +1,172 @@ -using Crestron.SimplSharp.WebScripting; -using Newtonsoft.Json; -using PepperDash.Core.Web.RequestHandlers; -using PepperDash.Essentials.Core.Bridges; - -namespace PepperDash.Essentials.Core.Web.RequestHandlers -{ - public class GetJoinMapForDeviceKeyRequestHandler : WebApiBaseRequestHandler - { - /// - /// Handles CONNECT method requests - /// - /// - protected override void HandleConnect(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles DELETE method requests - /// - /// - protected override void HandleDelete(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles GET method requests - /// - /// - protected override void HandleGet(HttpCwsContext context) - { - var routeData = context.Request.RouteData; - if (routeData == null) - { - context.Response.StatusCode = 400; - context.Response.StatusDescription = "Bad Request"; - context.Response.End(); - - return; - } - - object bridgeObj; - if (!routeData.Values.TryGetValue("bridgeKey", out bridgeObj)) - { - context.Response.StatusCode = 400; - context.Response.StatusDescription = "Bad Request"; - context.Response.End(); - - return; - } - - object deviceObj; - if (!routeData.Values.TryGetValue("deviceKey", out deviceObj)) - { - context.Response.StatusCode = 400; - context.Response.StatusDescription = "Bad Request"; - context.Response.End(); - - return; - } - - var bridge = DeviceManager.GetDeviceForKey(bridgeObj.ToString()) as EiscApiAdvanced; - if (bridge == null) - { - context.Response.StatusCode = 404; - context.Response.StatusDescription = "Not Found"; - context.Response.End(); - - return; - } - - JoinMapBaseAdvanced deviceJoinMap; - if (!bridge.JoinMaps.TryGetValue(deviceObj.ToString(), out deviceJoinMap)) - { - context.Response.StatusCode = 500; - context.Response.StatusDescription = "Internal Server Error"; - context.Response.End(); - - return; - } - - var joinMap = EssentialsWebApiHelpers.MapJoinToObject(deviceObj.ToString(), deviceJoinMap); - var js = JsonConvert.SerializeObject(joinMap, Formatting.Indented, new JsonSerializerSettings - { - ReferenceLoopHandling = ReferenceLoopHandling.Ignore, - NullValueHandling = NullValueHandling.Ignore, - MissingMemberHandling = MissingMemberHandling.Ignore, - DefaultValueHandling = DefaultValueHandling.Ignore, - TypeNameHandling = TypeNameHandling.None - }); - - context.Response.StatusCode = 200; - context.Response.StatusDescription = "OK"; - context.Response.ContentType = "application/json"; - context.Response.ContentEncoding = System.Text.Encoding.UTF8; - context.Response.Write(js, false); - context.Response.End(); - } - - /// - /// Handles HEAD method requests - /// - /// - protected override void HandleHead(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles OPTIONS method requests - /// - /// - protected override void HandleOptions(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles PATCH method requests - /// - /// - protected override void HandlePatch(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles POST method requests - /// - /// - protected override void HandlePost(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles PUT method requests - /// - /// - protected override void HandlePut(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles TRACE method requests - /// - /// - protected override void HandleTrace(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - } +using Crestron.SimplSharp.WebScripting; +using Newtonsoft.Json; +using PepperDash.Core.Web.RequestHandlers; +using PepperDash.Essentials.Core.Bridges; + +namespace PepperDash.Essentials.Core.Web.RequestHandlers +{ + public class GetJoinMapForDeviceKeyRequestHandler : WebApiBaseRequestHandler + { + /// + /// Handles CONNECT method requests + /// + /// + protected override void HandleConnect(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles DELETE method requests + /// + /// + protected override void HandleDelete(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles GET method requests + /// + /// + protected override void HandleGet(HttpCwsContext context) + { + var routeData = context.Request.RouteData; + if (routeData == null) + { + context.Response.StatusCode = 400; + context.Response.StatusDescription = "Bad Request"; + context.Response.End(); + + return; + } + + object bridgeObj; + if (!routeData.Values.TryGetValue("bridgeKey", out bridgeObj)) + { + context.Response.StatusCode = 400; + context.Response.StatusDescription = "Bad Request"; + context.Response.End(); + + return; + } + + object deviceObj; + if (!routeData.Values.TryGetValue("deviceKey", out deviceObj)) + { + context.Response.StatusCode = 400; + context.Response.StatusDescription = "Bad Request"; + context.Response.End(); + + return; + } + + var bridge = DeviceManager.GetDeviceForKey(bridgeObj.ToString()) as EiscApiAdvanced; + if (bridge == null) + { + context.Response.StatusCode = 404; + context.Response.StatusDescription = "Not Found"; + context.Response.End(); + + return; + } + + JoinMapBaseAdvanced deviceJoinMap; + if (!bridge.JoinMaps.TryGetValue(deviceObj.ToString(), out deviceJoinMap)) + { + context.Response.StatusCode = 500; + context.Response.StatusDescription = "Internal Server Error"; + context.Response.End(); + + return; + } + + var joinMap = EssentialsWebApiHelpers.MapJoinToObject(deviceObj.ToString(), deviceJoinMap); + var js = JsonConvert.SerializeObject(joinMap, Formatting.Indented, new JsonSerializerSettings + { + ReferenceLoopHandling = ReferenceLoopHandling.Ignore, + NullValueHandling = NullValueHandling.Ignore, + MissingMemberHandling = MissingMemberHandling.Ignore, + DefaultValueHandling = DefaultValueHandling.Ignore, + TypeNameHandling = TypeNameHandling.None + }); + + context.Response.StatusCode = 200; + context.Response.StatusDescription = "OK"; + context.Response.ContentType = "application/json"; + context.Response.ContentEncoding = System.Text.Encoding.UTF8; + context.Response.Write(js, false); + context.Response.End(); + } + + /// + /// Handles HEAD method requests + /// + /// + protected override void HandleHead(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles OPTIONS method requests + /// + /// + protected override void HandleOptions(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles PATCH method requests + /// + /// + protected override void HandlePatch(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles POST method requests + /// + /// + protected override void HandlePost(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles PUT method requests + /// + /// + protected override void HandlePut(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles TRACE method requests + /// + /// + protected override void HandleTrace(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/GetTypesByFilterRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTypesByFilterRequestHandler.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/GetTypesByFilterRequestHandler.cs rename to src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTypesByFilterRequestHandler.cs index be7347fb..6636d914 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/GetTypesByFilterRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTypesByFilterRequestHandler.cs @@ -1,145 +1,145 @@ -using System.Linq; -using Crestron.SimplSharp.WebScripting; -using Newtonsoft.Json; -using PepperDash.Core.Web.RequestHandlers; - -namespace PepperDash.Essentials.Core.Web.RequestHandlers -{ - public class GetTypesByFilterRequestHandler : WebApiBaseRequestHandler - { - /// - /// Handles CONNECT method requests - /// - /// - protected override void HandleConnect(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles DELETE method requests - /// - /// - protected override void HandleDelete(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles GET method requests - /// - /// - protected override void HandleGet(HttpCwsContext context) - { - var routeData = context.Request.RouteData; - if (routeData == null) - { - context.Response.StatusCode = 400; - context.Response.StatusDescription = "Bad Request"; - context.Response.End(); - - return; - } - - object filterObj; - if (!routeData.Values.TryGetValue("filter", out filterObj)) - { - context.Response.StatusCode = 400; - context.Response.StatusDescription = "Bad Request"; - context.Response.End(); - - return; - } - - var deviceFactory = DeviceFactory.GetDeviceFactoryDictionary(filterObj.ToString()); - if (deviceFactory == null) - { - context.Response.StatusCode = 404; - context.Response.StatusDescription = "Not Found"; - context.Response.End(); - - return; - } - - var deviceTypes = deviceFactory.Select(t => EssentialsWebApiHelpers.MapDeviceTypeToObject(t)).ToList(); - var js = JsonConvert.SerializeObject(deviceTypes, Formatting.Indented); - - context.Response.StatusCode = 200; - context.Response.StatusDescription = "OK"; - context.Response.ContentType = "application/json"; - context.Response.ContentEncoding = System.Text.Encoding.UTF8; - context.Response.Write(js, false); - context.Response.End(); - } - - /// - /// Handles HEAD method requests - /// - /// - protected override void HandleHead(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles OPTIONS method requests - /// - /// - protected override void HandleOptions(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles PATCH method requests - /// - /// - protected override void HandlePatch(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles POST method requests - /// - /// - protected override void HandlePost(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles PUT method requests - /// - /// - protected override void HandlePut(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles TRACE method requests - /// - /// - protected override void HandleTrace(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - } +using System.Linq; +using Crestron.SimplSharp.WebScripting; +using Newtonsoft.Json; +using PepperDash.Core.Web.RequestHandlers; + +namespace PepperDash.Essentials.Core.Web.RequestHandlers +{ + public class GetTypesByFilterRequestHandler : WebApiBaseRequestHandler + { + /// + /// Handles CONNECT method requests + /// + /// + protected override void HandleConnect(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles DELETE method requests + /// + /// + protected override void HandleDelete(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles GET method requests + /// + /// + protected override void HandleGet(HttpCwsContext context) + { + var routeData = context.Request.RouteData; + if (routeData == null) + { + context.Response.StatusCode = 400; + context.Response.StatusDescription = "Bad Request"; + context.Response.End(); + + return; + } + + object filterObj; + if (!routeData.Values.TryGetValue("filter", out filterObj)) + { + context.Response.StatusCode = 400; + context.Response.StatusDescription = "Bad Request"; + context.Response.End(); + + return; + } + + var deviceFactory = DeviceFactory.GetDeviceFactoryDictionary(filterObj.ToString()); + if (deviceFactory == null) + { + context.Response.StatusCode = 404; + context.Response.StatusDescription = "Not Found"; + context.Response.End(); + + return; + } + + var deviceTypes = deviceFactory.Select(t => EssentialsWebApiHelpers.MapDeviceTypeToObject(t)).ToList(); + var js = JsonConvert.SerializeObject(deviceTypes, Formatting.Indented); + + context.Response.StatusCode = 200; + context.Response.StatusDescription = "OK"; + context.Response.ContentType = "application/json"; + context.Response.ContentEncoding = System.Text.Encoding.UTF8; + context.Response.Write(js, false); + context.Response.End(); + } + + /// + /// Handles HEAD method requests + /// + /// + protected override void HandleHead(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles OPTIONS method requests + /// + /// + protected override void HandleOptions(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles PATCH method requests + /// + /// + protected override void HandlePatch(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles POST method requests + /// + /// + protected override void HandlePost(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles PUT method requests + /// + /// + protected override void HandlePut(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles TRACE method requests + /// + /// + protected override void HandleTrace(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/GetTypesRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTypesRequestHandler.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/GetTypesRequestHandler.cs rename to src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTypesRequestHandler.cs index f2630063..094d22f4 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/GetTypesRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTypesRequestHandler.cs @@ -1,135 +1,135 @@ -using System.Linq; -using Crestron.SimplSharp.WebScripting; -using Newtonsoft.Json; -using PepperDash.Core.Web.RequestHandlers; - -namespace PepperDash.Essentials.Core.Web.RequestHandlers -{ - public class GetTypesRequestHandler : WebApiBaseRequestHandler - { - /// - /// Handles CONNECT method requests - /// - /// - protected override void HandleConnect(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles DELETE method requests - /// - /// - protected override void HandleDelete(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles GET method requests - /// - /// - protected override void HandleGet(HttpCwsContext context) - { - var routeData = context.Request.RouteData; - if (routeData == null) - { - context.Response.StatusCode = 400; - context.Response.StatusDescription = "Bad Request"; - context.Response.End(); - - return; - } - - var deviceFactory = DeviceFactory.GetDeviceFactoryDictionary(null); - if (deviceFactory == null) - { - context.Response.StatusCode = 404; - context.Response.StatusDescription = "Not Found"; - context.Response.End(); - - return; - } - - var deviceTypes = deviceFactory.Select(t => EssentialsWebApiHelpers.MapDeviceTypeToObject(t)).ToList(); - var js = JsonConvert.SerializeObject(deviceTypes, Formatting.Indented); - - context.Response.StatusCode = 200; - context.Response.StatusDescription = "OK"; - context.Response.ContentType = "application/json"; - context.Response.ContentEncoding = System.Text.Encoding.UTF8; - context.Response.Write(js, false); - context.Response.End(); - } - - /// - /// Handles HEAD method requests - /// - /// - protected override void HandleHead(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles OPTIONS method requests - /// - /// - protected override void HandleOptions(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles PATCH method requests - /// - /// - protected override void HandlePatch(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles POST method requests - /// - /// - protected override void HandlePost(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles PUT method requests - /// - /// - protected override void HandlePut(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles TRACE method requests - /// - /// - protected override void HandleTrace(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - } +using System.Linq; +using Crestron.SimplSharp.WebScripting; +using Newtonsoft.Json; +using PepperDash.Core.Web.RequestHandlers; + +namespace PepperDash.Essentials.Core.Web.RequestHandlers +{ + public class GetTypesRequestHandler : WebApiBaseRequestHandler + { + /// + /// Handles CONNECT method requests + /// + /// + protected override void HandleConnect(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles DELETE method requests + /// + /// + protected override void HandleDelete(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles GET method requests + /// + /// + protected override void HandleGet(HttpCwsContext context) + { + var routeData = context.Request.RouteData; + if (routeData == null) + { + context.Response.StatusCode = 400; + context.Response.StatusDescription = "Bad Request"; + context.Response.End(); + + return; + } + + var deviceFactory = DeviceFactory.GetDeviceFactoryDictionary(null); + if (deviceFactory == null) + { + context.Response.StatusCode = 404; + context.Response.StatusDescription = "Not Found"; + context.Response.End(); + + return; + } + + var deviceTypes = deviceFactory.Select(t => EssentialsWebApiHelpers.MapDeviceTypeToObject(t)).ToList(); + var js = JsonConvert.SerializeObject(deviceTypes, Formatting.Indented); + + context.Response.StatusCode = 200; + context.Response.StatusDescription = "OK"; + context.Response.ContentType = "application/json"; + context.Response.ContentEncoding = System.Text.Encoding.UTF8; + context.Response.Write(js, false); + context.Response.End(); + } + + /// + /// Handles HEAD method requests + /// + /// + protected override void HandleHead(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles OPTIONS method requests + /// + /// + protected override void HandleOptions(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles PATCH method requests + /// + /// + protected override void HandlePatch(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles POST method requests + /// + /// + protected override void HandlePost(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles PUT method requests + /// + /// + protected override void HandlePut(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles TRACE method requests + /// + /// + protected override void HandleTrace(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/ReportVersionsRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/ReportVersionsRequestHandler.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/ReportVersionsRequestHandler.cs rename to src/PepperDash.Essentials.Core/Web/RequestHandlers/ReportVersionsRequestHandler.cs index 6ba3cb7a..321c5bfc 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/ReportVersionsRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/ReportVersionsRequestHandler.cs @@ -1,126 +1,126 @@ -using System.Linq; -using Crestron.SimplSharp.WebScripting; -using Newtonsoft.Json; -using PepperDash.Core.Web.RequestHandlers; - -namespace PepperDash.Essentials.Core.Web.RequestHandlers -{ - public class ReportVersionsRequestHandler : WebApiBaseRequestHandler - { - /// - /// Handles CONNECT method requests - /// - /// - protected override void HandleConnect(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles DELETE method requests - /// - /// - protected override void HandleDelete(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles GET method requests - /// - /// - protected override void HandleGet(HttpCwsContext context) - { - var loadAssemblies = PluginLoader.LoadedAssemblies; - if (loadAssemblies == null) - { - context.Response.StatusCode = 500; - context.Response.StatusDescription = "Internal Server Error"; - context.Response.End(); - - return; - } - - var assemblies = loadAssemblies.Select(a => EssentialsWebApiHelpers.MapToAssemblyObject(a)).ToList(); - - var js = JsonConvert.SerializeObject(assemblies, Formatting.Indented); - - context.Response.StatusCode = 200; - context.Response.StatusDescription = "OK"; - context.Response.ContentType = "application/json"; - context.Response.ContentEncoding = System.Text.Encoding.UTF8; - context.Response.Write(js, false); - context.Response.End(); - } - - /// - /// Handles HEAD method requests - /// - /// - protected override void HandleHead(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles OPTIONS method requests - /// - /// - protected override void HandleOptions(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles PATCH method requests - /// - /// - protected override void HandlePatch(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles POST method requests - /// - /// - protected override void HandlePost(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles PUT method requests - /// - /// - protected override void HandlePut(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles TRACE method requests - /// - /// - protected override void HandleTrace(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - } +using System.Linq; +using Crestron.SimplSharp.WebScripting; +using Newtonsoft.Json; +using PepperDash.Core.Web.RequestHandlers; + +namespace PepperDash.Essentials.Core.Web.RequestHandlers +{ + public class ReportVersionsRequestHandler : WebApiBaseRequestHandler + { + /// + /// Handles CONNECT method requests + /// + /// + protected override void HandleConnect(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles DELETE method requests + /// + /// + protected override void HandleDelete(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles GET method requests + /// + /// + protected override void HandleGet(HttpCwsContext context) + { + var loadAssemblies = PluginLoader.LoadedAssemblies; + if (loadAssemblies == null) + { + context.Response.StatusCode = 500; + context.Response.StatusDescription = "Internal Server Error"; + context.Response.End(); + + return; + } + + var assemblies = loadAssemblies.Select(a => EssentialsWebApiHelpers.MapToAssemblyObject(a)).ToList(); + + var js = JsonConvert.SerializeObject(assemblies, Formatting.Indented); + + context.Response.StatusCode = 200; + context.Response.StatusDescription = "OK"; + context.Response.ContentType = "application/json"; + context.Response.ContentEncoding = System.Text.Encoding.UTF8; + context.Response.Write(js, false); + context.Response.End(); + } + + /// + /// Handles HEAD method requests + /// + /// + protected override void HandleHead(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles OPTIONS method requests + /// + /// + protected override void HandleOptions(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles PATCH method requests + /// + /// + protected override void HandlePatch(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles POST method requests + /// + /// + protected override void HandlePost(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles PUT method requests + /// + /// + protected override void HandlePut(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles TRACE method requests + /// + /// + protected override void HandleTrace(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/SetDeviceStreamDebugRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/SetDeviceStreamDebugRequestHandler.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/SetDeviceStreamDebugRequestHandler.cs rename to src/PepperDash.Essentials.Core/Web/RequestHandlers/SetDeviceStreamDebugRequestHandler.cs index bb7cc12f..a08fda2b 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/SetDeviceStreamDebugRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/SetDeviceStreamDebugRequestHandler.cs @@ -1,212 +1,212 @@ -using System; -using Crestron.SimplSharp.WebScripting; -using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Core.Web.RequestHandlers; - -namespace PepperDash.Essentials.Core.Web.RequestHandlers -{ - public class SetDeviceStreamDebugRequestHandler : WebApiBaseRequestHandler - { - /// - /// Handles CONNECT method requests - /// - /// - protected override void HandleConnect(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles DELETE method requests - /// - /// - protected override void HandleDelete(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles GET method requests - /// - /// - protected override void HandleGet(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles HEAD method requests - /// - /// - protected override void HandleHead(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles OPTIONS method requests - /// - /// - protected override void HandleOptions(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles PATCH method requests - /// - /// - protected override void HandlePatch(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles POST method requests - /// - /// - protected override void HandlePost(HttpCwsContext context) - { - if (context.Request.ContentLength < 0) - { - context.Response.StatusCode = 400; - context.Response.StatusDescription = "Bad Request"; - context.Response.End(); - - return; - } - - var data = EssentialsWebApiHelpers.GetRequestBody(context.Request); - if (data == null) - { - context.Response.StatusCode = 500; - context.Response.StatusDescription = "Internal Server Error"; - context.Response.End(); - - return; - } - - var config = new SetDeviceStreamDebugConfig(); - var body = JsonConvert.DeserializeAnonymousType(data, config); - if (body == null) - { - context.Response.StatusCode = 500; - context.Response.StatusDescription = "Internal Server Error"; - context.Response.End(); - - return; - } - - if (string.IsNullOrEmpty(body.DeviceKey) || string.IsNullOrEmpty(body.Setting)) - { - context.Response.StatusCode = 400; - context.Response.StatusDescription = "Bad Request"; - context.Response.End(); - - return; - } - - var device = DeviceManager.GetDeviceForKey(body.DeviceKey) as IStreamDebugging; - if (device == null) - { - context.Response.StatusCode = 404; - context.Response.StatusDescription = "Not Found"; - context.Response.End(); - - return; - } - - eStreamDebuggingSetting debugSetting; - try - { - debugSetting = (eStreamDebuggingSetting) Enum.Parse(typeof (eStreamDebuggingSetting), body.Setting, true); - } - catch (Exception ex) - { - context.Response.StatusCode = 500; - context.Response.StatusDescription = "Internal Server Error"; - context.Response.End(); - - return; - } - - try - { - var mins = Convert.ToUInt32(body.Timeout); - if (mins > 0) - { - device.StreamDebugging.SetDebuggingWithSpecificTimeout(debugSetting, mins); - } - else - { - device.StreamDebugging.SetDebuggingWithDefaultTimeout(debugSetting); - } - - context.Response.StatusCode = 200; - context.Response.StatusDescription = "OK"; - context.Response.End(); - } - catch (Exception ex) - { - context.Response.StatusCode = 500; - context.Response.StatusDescription = "Internal Server Error"; - context.Response.End(); - } - } - - /// - /// Handles PUT method requests - /// - /// - protected override void HandlePut(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles TRACE method requests - /// - /// - protected override void HandleTrace(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - } - - - public class SetDeviceStreamDebugConfig - { - [JsonProperty("deviceKey", NullValueHandling = NullValueHandling.Include)] - public string DeviceKey { get; set; } - - [JsonProperty("setting", NullValueHandling = NullValueHandling.Include)] - public string Setting { get; set; } - - [JsonProperty("timeout")] - public int Timeout { get; set; } - - public SetDeviceStreamDebugConfig() - { - DeviceKey = null; - Setting = null; - Timeout = 15; - } - } +using System; +using Crestron.SimplSharp.WebScripting; +using Newtonsoft.Json; +using PepperDash.Core; +using PepperDash.Core.Web.RequestHandlers; + +namespace PepperDash.Essentials.Core.Web.RequestHandlers +{ + public class SetDeviceStreamDebugRequestHandler : WebApiBaseRequestHandler + { + /// + /// Handles CONNECT method requests + /// + /// + protected override void HandleConnect(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles DELETE method requests + /// + /// + protected override void HandleDelete(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles GET method requests + /// + /// + protected override void HandleGet(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles HEAD method requests + /// + /// + protected override void HandleHead(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles OPTIONS method requests + /// + /// + protected override void HandleOptions(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles PATCH method requests + /// + /// + protected override void HandlePatch(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles POST method requests + /// + /// + protected override void HandlePost(HttpCwsContext context) + { + if (context.Request.ContentLength < 0) + { + context.Response.StatusCode = 400; + context.Response.StatusDescription = "Bad Request"; + context.Response.End(); + + return; + } + + var data = EssentialsWebApiHelpers.GetRequestBody(context.Request); + if (data == null) + { + context.Response.StatusCode = 500; + context.Response.StatusDescription = "Internal Server Error"; + context.Response.End(); + + return; + } + + var config = new SetDeviceStreamDebugConfig(); + var body = JsonConvert.DeserializeAnonymousType(data, config); + if (body == null) + { + context.Response.StatusCode = 500; + context.Response.StatusDescription = "Internal Server Error"; + context.Response.End(); + + return; + } + + if (string.IsNullOrEmpty(body.DeviceKey) || string.IsNullOrEmpty(body.Setting)) + { + context.Response.StatusCode = 400; + context.Response.StatusDescription = "Bad Request"; + context.Response.End(); + + return; + } + + var device = DeviceManager.GetDeviceForKey(body.DeviceKey) as IStreamDebugging; + if (device == null) + { + context.Response.StatusCode = 404; + context.Response.StatusDescription = "Not Found"; + context.Response.End(); + + return; + } + + eStreamDebuggingSetting debugSetting; + try + { + debugSetting = (eStreamDebuggingSetting) Enum.Parse(typeof (eStreamDebuggingSetting), body.Setting, true); + } + catch (Exception ex) + { + context.Response.StatusCode = 500; + context.Response.StatusDescription = "Internal Server Error"; + context.Response.End(); + + return; + } + + try + { + var mins = Convert.ToUInt32(body.Timeout); + if (mins > 0) + { + device.StreamDebugging.SetDebuggingWithSpecificTimeout(debugSetting, mins); + } + else + { + device.StreamDebugging.SetDebuggingWithDefaultTimeout(debugSetting); + } + + context.Response.StatusCode = 200; + context.Response.StatusDescription = "OK"; + context.Response.End(); + } + catch (Exception ex) + { + context.Response.StatusCode = 500; + context.Response.StatusDescription = "Internal Server Error"; + context.Response.End(); + } + } + + /// + /// Handles PUT method requests + /// + /// + protected override void HandlePut(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles TRACE method requests + /// + /// + protected override void HandleTrace(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + } + + + public class SetDeviceStreamDebugConfig + { + [JsonProperty("deviceKey", NullValueHandling = NullValueHandling.Include)] + public string DeviceKey { get; set; } + + [JsonProperty("setting", NullValueHandling = NullValueHandling.Include)] + public string Setting { get; set; } + + [JsonProperty("timeout")] + public int Timeout { get; set; } + + public SetDeviceStreamDebugConfig() + { + DeviceKey = null; + Setting = null; + Timeout = 15; + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/ShowConfigRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/ShowConfigRequestHandler.cs similarity index 96% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/ShowConfigRequestHandler.cs rename to src/PepperDash.Essentials.Core/Web/RequestHandlers/ShowConfigRequestHandler.cs index 4dded8b5..16c05abf 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Web/RequestHandlers/ShowConfigRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/ShowConfigRequestHandler.cs @@ -1,114 +1,114 @@ -using Crestron.SimplSharp.WebScripting; -using Newtonsoft.Json; -using PepperDash.Core.Web.RequestHandlers; -using PepperDash.Essentials.Core.Config; - -namespace PepperDash.Essentials.Core.Web.RequestHandlers -{ - public class ShowConfigRequestHandler : WebApiBaseRequestHandler - { - /// - /// Handles CONNECT method requests - /// - /// - protected override void HandleConnect(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles DELETE method requests - /// - /// - protected override void HandleDelete(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles GET method requests - /// - /// - protected override void HandleGet(HttpCwsContext context) - { - var config = JsonConvert.SerializeObject(ConfigReader.ConfigObject, Formatting.Indented); - - context.Response.StatusCode = 200; - context.Response.StatusDescription = "OK"; - context.Response.ContentType = "application/json"; - context.Response.ContentEncoding = System.Text.Encoding.UTF8; - context.Response.Write(config, false); - context.Response.End(); - } - - /// - /// Handles HEAD method requests - /// - /// - protected override void HandleHead(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles OPTIONS method requests - /// - /// - protected override void HandleOptions(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles PATCH method requests - /// - /// - protected override void HandlePatch(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles POST method requests - /// - /// - protected override void HandlePost(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles PUT method requests - /// - /// - protected override void HandlePut(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - - /// - /// Handles TRACE method requests - /// - /// - protected override void HandleTrace(HttpCwsContext context) - { - context.Response.StatusCode = 501; - context.Response.StatusDescription = "Not Implemented"; - context.Response.End(); - } - } +using Crestron.SimplSharp.WebScripting; +using Newtonsoft.Json; +using PepperDash.Core.Web.RequestHandlers; +using PepperDash.Essentials.Core.Config; + +namespace PepperDash.Essentials.Core.Web.RequestHandlers +{ + public class ShowConfigRequestHandler : WebApiBaseRequestHandler + { + /// + /// Handles CONNECT method requests + /// + /// + protected override void HandleConnect(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles DELETE method requests + /// + /// + protected override void HandleDelete(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles GET method requests + /// + /// + protected override void HandleGet(HttpCwsContext context) + { + var config = JsonConvert.SerializeObject(ConfigReader.ConfigObject, Formatting.Indented); + + context.Response.StatusCode = 200; + context.Response.StatusDescription = "OK"; + context.Response.ContentType = "application/json"; + context.Response.ContentEncoding = System.Text.Encoding.UTF8; + context.Response.Write(config, false); + context.Response.End(); + } + + /// + /// Handles HEAD method requests + /// + /// + protected override void HandleHead(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles OPTIONS method requests + /// + /// + protected override void HandleOptions(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles PATCH method requests + /// + /// + protected override void HandlePatch(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles POST method requests + /// + /// + protected override void HandlePost(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles PUT method requests + /// + /// + protected override void HandlePut(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + + /// + /// Handles TRACE method requests + /// + /// + protected override void HandleTrace(HttpCwsContext context) + { + context.Response.StatusCode = 501; + context.Response.StatusDescription = "Not Implemented"; + context.Response.End(); + } + } } \ No newline at end of file diff --git a/PepperDashEssentials/app.config b/src/PepperDash.Essentials.Core/app.config similarity index 100% rename from PepperDashEssentials/app.config rename to src/PepperDash.Essentials.Core/app.config diff --git a/essentials-framework/Essentials DM/Essentials_DM/AirMedia/AirMediaController.cs b/src/PepperDash.Essentials.DM/AirMedia/AirMediaController.cs similarity index 97% rename from essentials-framework/Essentials DM/Essentials_DM/AirMedia/AirMediaController.cs rename to src/PepperDash.Essentials.DM/AirMedia/AirMediaController.cs index ce2204fe..80f8e64d 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/AirMedia/AirMediaController.cs +++ b/src/PepperDash.Essentials.DM/AirMedia/AirMediaController.cs @@ -1,365 +1,368 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.DeviceSupport.Support; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.DM; -using Crestron.SimplSharpPro.DM.AirMedia; -using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Bridges; -using PepperDash.Essentials.Core.Config; - -namespace PepperDash.Essentials.DM.AirMedia -{ - [Description("Wrapper class for an AM-200 or AM-300")] - public class AirMediaController : CrestronGenericBridgeableBaseDevice, IRoutingNumericWithFeedback, IIROutputPorts, IComPorts - { - public AmX00 AirMedia { get; private set; } - - public DeviceConfig DeviceConfig { get; private set; } - - AirMediaPropertiesConfig PropertiesConfig; - - public RoutingPortCollection InputPorts { get; private set; } - - public RoutingPortCollection OutputPorts { get; private set; } - - - //IroutingNumericEvent - public event EventHandler NumericSwitchChange; - - public BoolFeedback IsInSessionFeedback { get; private set; } - public IntFeedback ErrorFeedback { get; private set; } - public IntFeedback NumberOfUsersConnectedFeedback { get; set; } - public IntFeedback LoginCodeFeedback { get; set; } - public StringFeedback ConnectionAddressFeedback { get; set; } - public StringFeedback HostnameFeedback { get; set; } - public IntFeedback VideoOutFeedback { get; private set; } - public BoolFeedback HdmiVideoSyncDetectedFeedback { get; private set; } - public StringFeedback SerialNumberFeedback { get; private set; } - public BoolFeedback AutomaticInputRoutingEnabledFeedback { get; private set; } - - public AirMediaController(string key, string name, AmX00 device, DeviceConfig dc, AirMediaPropertiesConfig props) - : base(key, name, device) - { - - AirMedia = device; - - DeviceConfig = dc; - - PropertiesConfig = props; - - InputPorts = new RoutingPortCollection(); - OutputPorts = new RoutingPortCollection(); - - InputPorts.Add(new RoutingInputPort(DmPortName.Osd, eRoutingSignalType.AudioVideo, - eRoutingPortConnectionType.None, new Action(SelectPinPointUxLandingPage), this) - { - FeedbackMatchObject = 0 - }); - - InputPorts.Add(new RoutingInputPort(DmPortName.AirMediaIn, eRoutingSignalType.AudioVideo, - eRoutingPortConnectionType.Streaming, new Action(SelectAirMedia), this) - { - FeedbackMatchObject = 1 - }); - - InputPorts.Add(new RoutingInputPort(DmPortName.HdmiIn, eRoutingSignalType.AudioVideo, - eRoutingPortConnectionType.Hdmi, new Action(SelectHdmiIn), this) - { - FeedbackMatchObject = 2 - }); - - InputPorts.Add(new RoutingInputPort(DmPortName.AirBoardIn, eRoutingSignalType.AudioVideo, - eRoutingPortConnectionType.None, new Action(SelectAirboardIn), this) - { - FeedbackMatchObject = 4 - }); - - if (AirMedia is Am300) - { - InputPorts.Add(new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo, - eRoutingPortConnectionType.DmCat, new Action(SelectDmIn), this) - { - FeedbackMatchObject = 3 - }); - } - - OutputPorts.Add(new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo, - eRoutingPortConnectionType.Hdmi, null, this)); - - AirMedia.AirMedia.AirMediaChange += new Crestron.SimplSharpPro.DeviceSupport.GenericEventHandler(AirMedia_AirMediaChange); - - IsInSessionFeedback = new BoolFeedback(new Func(() => AirMedia.AirMedia.StatusFeedback.UShortValue == 0)); - ErrorFeedback = new IntFeedback(new Func(() => AirMedia.AirMedia.ErrorFeedback.UShortValue)); - NumberOfUsersConnectedFeedback = new IntFeedback(new Func(() => AirMedia.AirMedia.NumberOfUsersConnectedFeedback.UShortValue)); - LoginCodeFeedback = new IntFeedback(new Func(() => AirMedia.AirMedia.LoginCodeFeedback.UShortValue)); - ConnectionAddressFeedback = new StringFeedback(new Func(() => AirMedia.AirMedia.ConnectionAddressFeedback.StringValue)); - HostnameFeedback = new StringFeedback(new Func(() => AirMedia.AirMedia.HostNameFeedback.StringValue)); - - // TODO: Figure out if we can actually get the TSID/Serial - SerialNumberFeedback = new StringFeedback(new Func(() => "unknown")); - - AirMedia.DisplayControl.DisplayControlChange += new Crestron.SimplSharpPro.DeviceSupport.GenericEventHandler(DisplayControl_DisplayControlChange); - - VideoOutFeedback = new IntFeedback(new Func(() => Convert.ToInt16(AirMedia.DisplayControl.VideoOutFeedback))); - AutomaticInputRoutingEnabledFeedback = new BoolFeedback(new Func(() => AirMedia.DisplayControl.EnableAutomaticRoutingFeedback.BoolValue)); - - AirMedia.HdmiIn.StreamChange += new Crestron.SimplSharpPro.DeviceSupport.StreamEventHandler(HdmiIn_StreamChange); - - HdmiVideoSyncDetectedFeedback = new BoolFeedback(new Func(() => AirMedia.HdmiIn.SyncDetectedFeedback.BoolValue)); - } - - public override bool CustomActivate() - { - if (PropertiesConfig.AutoSwitchingEnabled) - AirMedia.DisplayControl.EnableAutomaticRouting(); - else - AirMedia.DisplayControl.DisableAutomaticRouting(); - - return base.CustomActivate(); - } - - public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - var joinMap = new AirMediaControllerJoinMap(joinStart); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - if (bridge != null) - { - bridge.AddJoinMap(Key, joinMap); - } - else - { - Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); - } - - Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - Debug.Console(0, "Linking to Airmedia: {0}", Name); - - trilist.StringInput[joinMap.Name.JoinNumber].StringValue = Name; - - var commMonitor = this as ICommunicationMonitor; - - commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); - - IsInSessionFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsInSession.JoinNumber]); - HdmiVideoSyncDetectedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.HdmiVideoSync.JoinNumber]); - - trilist.SetSigTrueAction(joinMap.AutomaticInputRoutingEnabled.JoinNumber, AirMedia.DisplayControl.EnableAutomaticRouting); - trilist.SetSigFalseAction(joinMap.AutomaticInputRoutingEnabled.JoinNumber, AirMedia.DisplayControl.DisableAutomaticRouting); - AutomaticInputRoutingEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AutomaticInputRoutingEnabled.JoinNumber]); - - trilist.SetUShortSigAction(joinMap.VideoOut.JoinNumber, (u) => SelectVideoOut(u)); - - VideoOutFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoOut.JoinNumber]); - ErrorFeedback.LinkInputSig(trilist.UShortInput[joinMap.ErrorFB.JoinNumber]); - NumberOfUsersConnectedFeedback.LinkInputSig(trilist.UShortInput[joinMap.NumberOfUsersConnectedFB.JoinNumber]); - - trilist.SetUShortSigAction(joinMap.LoginCode.JoinNumber, (u) => AirMedia.AirMedia.LoginCode.UShortValue = u); - LoginCodeFeedback.LinkInputSig(trilist.UShortInput[joinMap.LoginCode.JoinNumber]); - - ConnectionAddressFeedback.LinkInputSig(trilist.StringInput[joinMap.ConnectionAddressFB.JoinNumber]); - HostnameFeedback.LinkInputSig(trilist.StringInput[joinMap.HostnameFB.JoinNumber]); - SerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.SerialNumberFeedback.JoinNumber]); - } - - /// - /// Raise an event when the status of a switch object changes. - /// - /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType - private void OnSwitchChange(RoutingNumericEventArgs e) - { - var newEvent = NumericSwitchChange; - if (newEvent != null) newEvent(this, e); +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.DeviceSupport.Support; +using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.DM; +using Crestron.SimplSharpPro.DM.AirMedia; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Config; + +namespace PepperDash.Essentials.DM.AirMedia +{ + [Description("Wrapper class for an AM-200 or AM-300")] + public class AirMediaController : CrestronGenericBridgeableBaseDevice, IRoutingNumericWithFeedback, IIROutputPorts, IComPorts + { + public AmX00 AirMedia { get; private set; } + + public DeviceConfig DeviceConfig { get; private set; } + + AirMediaPropertiesConfig PropertiesConfig; + + public RoutingPortCollection InputPorts { get; private set; } + + public RoutingPortCollection OutputPorts { get; private set; } + + + //IroutingNumericEvent + public event EventHandler NumericSwitchChange; + + public BoolFeedback IsInSessionFeedback { get; private set; } + public IntFeedback ErrorFeedback { get; private set; } + public IntFeedback NumberOfUsersConnectedFeedback { get; set; } + public IntFeedback LoginCodeFeedback { get; set; } + public StringFeedback ConnectionAddressFeedback { get; set; } + public StringFeedback HostnameFeedback { get; set; } + public IntFeedback VideoOutFeedback { get; private set; } + public BoolFeedback HdmiVideoSyncDetectedFeedback { get; private set; } + public StringFeedback SerialNumberFeedback { get; private set; } + public BoolFeedback AutomaticInputRoutingEnabledFeedback { get; private set; } + + public AirMediaController(string key, string name, AmX00 device, DeviceConfig dc, AirMediaPropertiesConfig props) + : base(key, name, device) + { + + AirMedia = device; + + DeviceConfig = dc; + + PropertiesConfig = props; + + InputPorts = new RoutingPortCollection(); + OutputPorts = new RoutingPortCollection(); + + InputPorts.Add(new RoutingInputPort(DmPortName.Osd, eRoutingSignalType.AudioVideo, + eRoutingPortConnectionType.None, new Action(SelectPinPointUxLandingPage), this) + { + FeedbackMatchObject = 0 + }); + + InputPorts.Add(new RoutingInputPort(DmPortName.AirMediaIn, eRoutingSignalType.AudioVideo, + eRoutingPortConnectionType.Streaming, new Action(SelectAirMedia), this) + { + FeedbackMatchObject = 1 + }); + + InputPorts.Add(new RoutingInputPort(DmPortName.HdmiIn, eRoutingSignalType.AudioVideo, + eRoutingPortConnectionType.Hdmi, new Action(SelectHdmiIn), this) + { + FeedbackMatchObject = 2 + }); + + InputPorts.Add(new RoutingInputPort(DmPortName.AirBoardIn, eRoutingSignalType.AudioVideo, + eRoutingPortConnectionType.None, new Action(SelectAirboardIn), this) + { + FeedbackMatchObject = 4 + }); + + if (AirMedia is Am300) + { + InputPorts.Add(new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo, + eRoutingPortConnectionType.DmCat, new Action(SelectDmIn), this) + { + FeedbackMatchObject = 3 + }); + } + + OutputPorts.Add(new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo, + eRoutingPortConnectionType.Hdmi, null, this)); + + AirMedia.AirMedia.AirMediaChange += new Crestron.SimplSharpPro.DeviceSupport.GenericEventHandler(AirMedia_AirMediaChange); + + IsInSessionFeedback = new BoolFeedback(new Func(() => AirMedia.AirMedia.StatusFeedback.UShortValue == 0)); + ErrorFeedback = new IntFeedback(new Func(() => AirMedia.AirMedia.ErrorFeedback.UShortValue)); + NumberOfUsersConnectedFeedback = new IntFeedback(new Func(() => AirMedia.AirMedia.NumberOfUsersConnectedFeedback.UShortValue)); + LoginCodeFeedback = new IntFeedback(new Func(() => AirMedia.AirMedia.LoginCodeFeedback.UShortValue)); + ConnectionAddressFeedback = new StringFeedback(new Func(() => AirMedia.AirMedia.ConnectionAddressFeedback.StringValue)); + HostnameFeedback = new StringFeedback(new Func(() => AirMedia.AirMedia.HostNameFeedback.StringValue)); + + // TODO: Figure out if we can actually get the TSID/Serial + SerialNumberFeedback = new StringFeedback(new Func(() => "unknown")); + + AirMedia.DisplayControl.DisplayControlChange += new Crestron.SimplSharpPro.DeviceSupport.GenericEventHandler(DisplayControl_DisplayControlChange); + + VideoOutFeedback = new IntFeedback(new Func(() => Convert.ToInt16(AirMedia.DisplayControl.VideoOutFeedback))); + AutomaticInputRoutingEnabledFeedback = new BoolFeedback(new Func(() => AirMedia.DisplayControl.EnableAutomaticRoutingFeedback.BoolValue)); + + AirMedia.HdmiIn.StreamChange += new Crestron.SimplSharpPro.DeviceSupport.StreamEventHandler(HdmiIn_StreamChange); + + HdmiVideoSyncDetectedFeedback = new BoolFeedback(new Func(() => AirMedia.HdmiIn.SyncDetectedFeedback.BoolValue)); } - - - void AirMedia_AirMediaChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args) - { - if (args.EventId == AirMediaInputSlot.AirMediaStatusFeedbackEventId) - IsInSessionFeedback.FireUpdate(); - else if (args.EventId == AirMediaInputSlot.AirMediaErrorFeedbackEventId) - ErrorFeedback.FireUpdate(); - else if (args.EventId == AirMediaInputSlot.AirMediaNumberOfUserConnectedEventId) - NumberOfUsersConnectedFeedback.FireUpdate(); - else if (args.EventId == AirMediaInputSlot.AirMediaLoginCodeEventId) - LoginCodeFeedback.FireUpdate(); - else if (args.EventId == AirMediaInputSlot.AirMediaConnectionAddressFeedbackEventId) - ConnectionAddressFeedback.FireUpdate(); - else if (args.EventId == AirMediaInputSlot.AirMediaHostNameFeedbackEventId) - HostnameFeedback.FireUpdate(); - } - - void DisplayControl_DisplayControlChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args) - { - if (args.EventId == AmX00.VideoOutFeedbackEventId) - { - VideoOutFeedback.FireUpdate(); - - var localInputPort = - InputPorts.FirstOrDefault(p => (int) p.FeedbackMatchObject == VideoOutFeedback.UShortValue); - - OnSwitchChange(new RoutingNumericEventArgs(1, VideoOutFeedback.UShortValue, OutputPorts.First(), - localInputPort, eRoutingSignalType.AudioVideo)); - } - else if (args.EventId == AmX00.EnableAutomaticRoutingFeedbackEventId) - AutomaticInputRoutingEnabledFeedback.FireUpdate(); - } - - void HdmiIn_StreamChange(Stream stream, Crestron.SimplSharpPro.DeviceSupport.StreamEventArgs args) - { - if (args.EventId == DMInputEventIds.SourceSyncEventId) - HdmiVideoSyncDetectedFeedback.FireUpdate(); - } - - /// - /// Sets the VideoOut source ( 0 = PinpointUX, 1 = AirMedia, 2 = HDMI, 3 = DM, 4 = Airboard ) - /// - /// source number - public void SelectVideoOut(uint source) - { - AirMedia.DisplayControl.VideoOut = (AmX00DisplayControl.eAirMediaX00VideoSource)source; - } - - /// - /// Selects the PinPointUXLandingPage input - /// - public void SelectPinPointUxLandingPage() - { - AirMedia.DisplayControl.VideoOut = AmX00DisplayControl.eAirMediaX00VideoSource.PinPointUxLandingPage; - } - - /// - /// Selects the AirMedia input - /// - public void SelectAirMedia() - { - AirMedia.DisplayControl.VideoOut = AmX00DisplayControl.eAirMediaX00VideoSource.AirMedia; - } - - /// - /// Selects the DM input - /// - public void SelectDmIn() - { - AirMedia.DisplayControl.VideoOut = AmX00DisplayControl.eAirMediaX00VideoSource.DM; - } - - /// - /// Selects the HDMI INput - /// - public void SelectHdmiIn() - { - AirMedia.DisplayControl.VideoOut = AmX00DisplayControl.eAirMediaX00VideoSource.HDMI; - } - - public void SelectAirboardIn() - { - AirMedia.DisplayControl.VideoOut = AmX00DisplayControl.eAirMediaX00VideoSource.AirBoard; - } - - /// - /// Reboots the device - /// - public void RebootDevice() - { - AirMedia.AirMedia.DeviceReboot(); - } - - #region IIROutputPorts Members - - public CrestronCollection IROutputPorts - { - get { return AirMedia.IROutputPorts; } - } - - public int NumberOfIROutputPorts - { - get { return AirMedia.NumberOfIROutputPorts; } - } - - - - #endregion - - - - #region IComPorts Members - - public CrestronCollection ComPorts - { - get { return AirMedia.ComPorts; } - } - - public int NumberOfComPorts - { - get { return AirMedia.NumberOfComPorts; } - } - - #endregion - - - - #region IRoutingNumeric Members - - public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType signalType) - { - if ((signalType & eRoutingSignalType.Video) != eRoutingSignalType.Video) return; - if (!Enum.IsDefined(typeof (AmX00DisplayControl.eAirMediaX00VideoSource), input)) - { - Debug.Console(2, this, "Invalid Video Source Index : {0}", input); - return; - } - AirMedia.DisplayControl.VideoOut = (AmX00DisplayControl.eAirMediaX00VideoSource) input; - } - - #endregion - - #region IRouting Members - - public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) - { - Debug.Console(2, this, "Input Selector = {0}", inputSelector.ToString()); - var handler = inputSelector as Action; - if (handler == null) return; - handler(); - } - - #endregion - } - - public class AirMediaControllerFactory : EssentialsDeviceFactory - { - public AirMediaControllerFactory() - { - TypeNames = new List() { "am200", "am300" }; - } - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - var type = dc.Type.ToLower(); - - Debug.Console(1, "Factory Attempting to create new AirMedia Device"); - - var props = JsonConvert.DeserializeObject(dc.Properties.ToString()); - AmX00 amDevice = null; - if (type == "am200") - amDevice = new Crestron.SimplSharpPro.DM.AirMedia.Am200(props.Control.IpIdInt, Global.ControlSystem); - else if (type == "am300") - amDevice = new Crestron.SimplSharpPro.DM.AirMedia.Am300(props.Control.IpIdInt, Global.ControlSystem); - - return new AirMediaController(dc.Key, dc.Name, amDevice, dc, props); - - } - } + + public override bool CustomActivate() + { + if (PropertiesConfig.AutoSwitchingEnabled) + AirMedia.DisplayControl.EnableAutomaticRouting(); + else + AirMedia.DisplayControl.DisableAutomaticRouting(); + + return base.CustomActivate(); + } + + public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + var joinMap = new AirMediaControllerJoinMap(joinStart); + + var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); + + if (bridge != null) + { + bridge.AddJoinMap(Key, joinMap); + } + else + { + Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); + } + + Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); + Debug.Console(0, "Linking to Airmedia: {0}", Name); + + trilist.StringInput[joinMap.Name.JoinNumber].StringValue = Name; + + var commMonitor = this as ICommunicationMonitor; + + commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); + + IsInSessionFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsInSession.JoinNumber]); + HdmiVideoSyncDetectedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.HdmiVideoSync.JoinNumber]); + + trilist.SetSigTrueAction(joinMap.AutomaticInputRoutingEnabled.JoinNumber, AirMedia.DisplayControl.EnableAutomaticRouting); + trilist.SetSigFalseAction(joinMap.AutomaticInputRoutingEnabled.JoinNumber, AirMedia.DisplayControl.DisableAutomaticRouting); + AutomaticInputRoutingEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AutomaticInputRoutingEnabled.JoinNumber]); + + trilist.SetUShortSigAction(joinMap.VideoOut.JoinNumber, (u) => SelectVideoOut(u)); + + VideoOutFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoOut.JoinNumber]); + ErrorFeedback.LinkInputSig(trilist.UShortInput[joinMap.ErrorFB.JoinNumber]); + NumberOfUsersConnectedFeedback.LinkInputSig(trilist.UShortInput[joinMap.NumberOfUsersConnectedFB.JoinNumber]); + + trilist.SetUShortSigAction(joinMap.LoginCode.JoinNumber, (u) => AirMedia.AirMedia.LoginCode.UShortValue = u); + LoginCodeFeedback.LinkInputSig(trilist.UShortInput[joinMap.LoginCode.JoinNumber]); + + ConnectionAddressFeedback.LinkInputSig(trilist.StringInput[joinMap.ConnectionAddressFB.JoinNumber]); + HostnameFeedback.LinkInputSig(trilist.StringInput[joinMap.HostnameFB.JoinNumber]); + SerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.SerialNumberFeedback.JoinNumber]); + } + + /// + /// Raise an event when the status of a switch object changes. + /// + /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType + private void OnSwitchChange(RoutingNumericEventArgs e) + { + var newEvent = NumericSwitchChange; + if (newEvent != null) newEvent(this, e); + } + + + void AirMedia_AirMediaChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args) + { + if (args.EventId == AirMediaInputSlot.AirMediaStatusFeedbackEventId) + IsInSessionFeedback.FireUpdate(); + else if (args.EventId == AirMediaInputSlot.AirMediaErrorFeedbackEventId) + ErrorFeedback.FireUpdate(); + else if (args.EventId == AirMediaInputSlot.AirMediaNumberOfUserConnectedEventId) + NumberOfUsersConnectedFeedback.FireUpdate(); + else if (args.EventId == AirMediaInputSlot.AirMediaLoginCodeEventId) + LoginCodeFeedback.FireUpdate(); + else if (args.EventId == AirMediaInputSlot.AirMediaConnectionAddressFeedbackEventId) + ConnectionAddressFeedback.FireUpdate(); + else if (args.EventId == AirMediaInputSlot.AirMediaHostNameFeedbackEventId) + HostnameFeedback.FireUpdate(); + } + + void DisplayControl_DisplayControlChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args) + { + if (args.EventId == AmX00.VideoOutFeedbackEventId) + { + VideoOutFeedback.FireUpdate(); + + var localInputPort = + InputPorts.FirstOrDefault(p => (int) p.FeedbackMatchObject == VideoOutFeedback.UShortValue); + + OnSwitchChange(new RoutingNumericEventArgs(1, VideoOutFeedback.UShortValue, OutputPorts.First(), + localInputPort, eRoutingSignalType.AudioVideo)); + } + else if (args.EventId == AmX00.EnableAutomaticRoutingFeedbackEventId) + AutomaticInputRoutingEnabledFeedback.FireUpdate(); + } + + void HdmiIn_StreamChange(Stream stream, Crestron.SimplSharpPro.DeviceSupport.StreamEventArgs args) + { + if (args.EventId == DMInputEventIds.SourceSyncEventId) + HdmiVideoSyncDetectedFeedback.FireUpdate(); + } + + /// + /// Sets the VideoOut source ( 0 = PinpointUX, 1 = AirMedia, 2 = HDMI, 3 = DM, 4 = Airboard ) + /// + /// source number + public void SelectVideoOut(uint source) + { + AirMedia.DisplayControl.VideoOut = (AmX00DisplayControl.eAirMediaX00VideoSource)source; + } + + /// + /// Selects the PinPointUXLandingPage input + /// + public void SelectPinPointUxLandingPage() + { + AirMedia.DisplayControl.VideoOut = AmX00DisplayControl.eAirMediaX00VideoSource.PinPointUxLandingPage; + } + + /// + /// Selects the AirMedia input + /// + public void SelectAirMedia() + { + AirMedia.DisplayControl.VideoOut = AmX00DisplayControl.eAirMediaX00VideoSource.AirMedia; + } + + /// + /// Selects the DM input + /// + public void SelectDmIn() + { + AirMedia.DisplayControl.VideoOut = AmX00DisplayControl.eAirMediaX00VideoSource.DM; + } + + /// + /// Selects the HDMI INput + /// + public void SelectHdmiIn() + { + AirMedia.DisplayControl.VideoOut = AmX00DisplayControl.eAirMediaX00VideoSource.HDMI; + } + + public void SelectAirboardIn() + { + AirMedia.DisplayControl.VideoOut = AmX00DisplayControl.eAirMediaX00VideoSource.AirBoard; + } + + /// + /// Reboots the device + /// + public void RebootDevice() + { + AirMedia.AirMedia.DeviceReboot(); + } + + #region IIROutputPorts Members + + public CrestronCollection IROutputPorts + { + get { return AirMedia.IROutputPorts; } + } + + public int NumberOfIROutputPorts + { + get { return AirMedia.NumberOfIROutputPorts; } + } + + + + #endregion + + + + #region IComPorts Members + + public CrestronCollection ComPorts + { + get { return AirMedia.ComPorts; } + } + + public int NumberOfComPorts + { + get { return AirMedia.NumberOfComPorts; } + } + + #endregion + + + + #region IRoutingNumeric Members + + public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType signalType) + { + if ((signalType & eRoutingSignalType.Video) != eRoutingSignalType.Video) return; + if (!Enum.IsDefined(typeof (AmX00DisplayControl.eAirMediaX00VideoSource), input)) + { + Debug.Console(2, this, "Invalid Video Source Index : {0}", input); + return; + } + AirMedia.DisplayControl.VideoOut = (AmX00DisplayControl.eAirMediaX00VideoSource) input; + } + + #endregion + + #region IRouting Members + + public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) + { + Debug.Console(2, this, "Input Selector = {0}", inputSelector.ToString()); + var handler = inputSelector as Action; + if (handler == null) return; + handler(); + } + + #endregion + } + + public class AirMediaControllerFactory : EssentialsDeviceFactory + { + public AirMediaControllerFactory() + { + TypeNames = new List() { "am200", "am300" }; + } + + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + var type = dc.Type.ToLower(); + + Debug.Console(1, "Factory Attempting to create new AirMedia Device"); + + var props = JsonConvert.DeserializeObject(dc.Properties.ToString()); + AmX00 amDevice = null; + if (type == "am200") + amDevice = new Crestron.SimplSharpPro.DM.AirMedia.Am200(props.Control.IpIdInt, Global.ControlSystem); + else if (type == "am300") + amDevice = new Crestron.SimplSharpPro.DM.AirMedia.Am300(props.Control.IpIdInt, Global.ControlSystem); + + return new AirMediaController(dc.Key, dc.Name, amDevice, dc, props); + + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/AirMedia/AirMediaPropertiesConfig.cs b/src/PepperDash.Essentials.DM/AirMedia/AirMediaPropertiesConfig.cs similarity index 86% rename from essentials-framework/Essentials DM/Essentials_DM/AirMedia/AirMediaPropertiesConfig.cs rename to src/PepperDash.Essentials.DM/AirMedia/AirMediaPropertiesConfig.cs index b89bd989..be46505b 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/AirMedia/AirMediaPropertiesConfig.cs +++ b/src/PepperDash.Essentials.DM/AirMedia/AirMediaPropertiesConfig.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -6,7 +8,7 @@ using Crestron.SimplSharp; using PepperDash.Core; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.DM.AirMedia { diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/Config/Schema/DmChassisControllerPropertiesConfigSchema.json b/src/PepperDash.Essentials.DM/Chassis/Config/Schema/DmChassisControllerPropertiesConfigSchema.json similarity index 100% rename from essentials-framework/Essentials DM/Essentials_DM/Chassis/Config/Schema/DmChassisControllerPropertiesConfigSchema.json rename to src/PepperDash.Essentials.DM/Chassis/Config/Schema/DmChassisControllerPropertiesConfigSchema.json diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmBladeChassisController.cs b/src/PepperDash.Essentials.DM/Chassis/DmBladeChassisController.cs similarity index 97% rename from essentials-framework/Essentials DM/Essentials_DM/Chassis/DmBladeChassisController.cs rename to src/PepperDash.Essentials.DM/Chassis/DmBladeChassisController.cs index 412dee6b..841c239a 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmBladeChassisController.cs +++ b/src/PepperDash.Essentials.DM/Chassis/DmBladeChassisController.cs @@ -1,999 +1,1001 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.DM; -using Crestron.SimplSharpPro.DM.Cards; -using Crestron.SimplSharpPro.DM.Blades; -using Crestron.SimplSharpPro.DM.Endpoints; -using Crestron.SimplSharpPro.DM.Endpoints.Receivers; -using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Bridges; -using PepperDash.Essentials.DM.Config; - -namespace PepperDash.Essentials.DM -{ - /// - /// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions - /// - /// - public class DmBladeChassisController : CrestronGenericBridgeableBaseDevice, IDmSwitch, IRoutingNumericWithFeedback - { - private const string NonePortKey = "inputCard0--None"; - - public DMChassisPropertiesConfig PropertiesConfig { get; set; } - - public Switch Chassis { get; private set; } - - //IroutingNumericEvent - public event EventHandler NumericSwitchChange; - - // Feedbacks for EssentialDM - public Dictionary VideoOutputFeedbacks { get; private set; } - public Dictionary AudioOutputFeedbacks { get; private set; } - public Dictionary VideoInputSyncFeedbacks { get; private set; } - public Dictionary InputEndpointOnlineFeedbacks { get; private set; } - public Dictionary OutputEndpointOnlineFeedbacks { get; private set; } - public Dictionary InputNameFeedbacks { get; private set; } - public Dictionary OutputNameFeedbacks { get; private set; } - public Dictionary OutputVideoRouteNameFeedbacks { get; private set; } - public Dictionary OutputAudioRouteNameFeedbacks { get; private set; } - public Dictionary UsbOutputRoutedToFeebacks { get; private set; } - public Dictionary UsbInputRoutedToFeebacks { get; private set; } - - public IntFeedback SystemIdFeebdack { get; private set; } - public BoolFeedback SystemIdBusyFeedback { get; private set; } - - - public Dictionary InputCardHdcpCapabilityFeedbacks { get; private set; } - - public Dictionary InputCardHdcpCapabilityTypes { get; private set; } - - - // Need a couple Lists of generic Backplane ports - public RoutingPortCollection InputPorts { get; private set; } - public RoutingPortCollection OutputPorts { get; private set; } - - public Dictionary TxDictionary { get; set; } - public Dictionary RxDictionary { get; set; } - - //public Dictionary InputCards { get; private set; } - //public Dictionary OutputCards { get; private set; } - - public Dictionary InputNames { get; set; } - public Dictionary OutputNames { get; set; } - public Dictionary VolumeControls { get; private set; } - - public const int RouteOffTime = 500; - Dictionary RouteOffTimers = new Dictionary(); - - /// - /// Factory method to create a new chassis controller from config data. Limited to 8x8 right now - /// - public static DmBladeChassisController GetDmChassisController(string key, string name, - string type, DMChassisPropertiesConfig properties) - { - try - { - type = type.ToLower(); - uint ipid = properties.Control.IpIdInt; - - BladeSwitch chassis = null; - if (type == "dmmd64x64") { chassis = new DmMd64x64(ipid, Global.ControlSystem); } - else if (type == "dmmd128x128") { chassis = new DmMd128x128(ipid, Global.ControlSystem); } - - - if (chassis == null) - { - return null; - } - - var controller = new DmBladeChassisController(key, name, chassis); - // add the cards and port names - foreach (var kvp in properties.InputSlots) - controller.AddInputBlade(kvp.Value, kvp.Key); - foreach (var kvp in properties.OutputSlots) - { - controller.AddOutputBlade(kvp.Value, kvp.Key); - } - - foreach (var kvp in properties.VolumeControls) - { - // get the card - // check it for an audio-compatible type - // make a something-something that will make it work - // retire to mountain village - var outNum = kvp.Key; - - var card = controller.Chassis.Outputs[outNum].Card; - Audio.Output audio = null; - if (card is DmHdmi4kOutputBladeCard) - audio = (card as DmHdmi4kOutputBladeCard).Hdmi4kOutput.Audio; - if (audio == null) - continue; - // wire up the audio to something here... - controller.AddVolumeControl(outNum, audio); - } - - controller.InputPorts.Add(new RoutingInputPort(NonePortKey, eRoutingSignalType.Video, - eRoutingPortConnectionType.None, null, controller)); - - - controller.InputNames = properties.InputNames; - controller.OutputNames = properties.OutputNames; - controller.PropertiesConfig = properties; - return controller; - } - catch (System.Exception e) - { - Debug.Console(0, "Error creating DM chassis:\r{0}", e); - } - return null; - } - - - /// - /// - /// - /// - /// - /// - public DmBladeChassisController(string key, string name, BladeSwitch chassis) - : base(key, name, chassis) - { - Chassis = chassis; - InputPorts = new RoutingPortCollection(); - OutputPorts = new RoutingPortCollection(); - VolumeControls = new Dictionary(); - TxDictionary = new Dictionary(); - RxDictionary = new Dictionary(); - IsOnline.OutputChange += new EventHandler(IsOnline_OutputChange); - Chassis.DMInputChange += new DMInputEventHandler(Chassis_DMInputChange); - Chassis.DMOutputChange += new DMOutputEventHandler(Chassis_DMOutputChange); - VideoOutputFeedbacks = new Dictionary(); - UsbOutputRoutedToFeebacks = new Dictionary(); - UsbInputRoutedToFeebacks = new Dictionary(); - VideoInputSyncFeedbacks = new Dictionary(); - InputNameFeedbacks = new Dictionary(); - OutputNameFeedbacks = new Dictionary(); - OutputVideoRouteNameFeedbacks = new Dictionary(); - OutputAudioRouteNameFeedbacks = new Dictionary(); - InputEndpointOnlineFeedbacks = new Dictionary(); - OutputEndpointOnlineFeedbacks = new Dictionary(); - - InputCardHdcpCapabilityFeedbacks = new Dictionary(); - InputCardHdcpCapabilityTypes = new Dictionary(); - - for (uint x = 1; x <= Chassis.NumberOfOutputs; x++) - { - var tempX = x; - - if (Chassis.Outputs[tempX] != null) - { - VideoOutputFeedbacks[tempX] = new IntFeedback(() => - { - if (Chassis.Outputs[tempX].VideoOutFeedback != null) { return (ushort)Chassis.Outputs[tempX].VideoOutFeedback.Number; } - else { return 0; }; - }); - - OutputNameFeedbacks[tempX] = new StringFeedback(() => - { - if (Chassis.Outputs[tempX].NameFeedback != null) - { - return Chassis.Outputs[tempX].NameFeedback.StringValue; - } - else - { - return ""; - } - }); - OutputVideoRouteNameFeedbacks[tempX] = new StringFeedback(() => - { - if (Chassis.Outputs[tempX].VideoOutFeedback != null) - { - return Chassis.Outputs[tempX].VideoOutFeedback.NameFeedback.StringValue; - } - else - { - return ""; - } - }); - - OutputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => - { - //if (Chassis.Outputs[tempX].Endpoint != null) - // return Chassis.Outputs[tempX].Endpoint.IsOnline; - //else - return Chassis.Outputs[tempX].EndpointOnlineFeedback; - }); - } - - if (Chassis.Inputs[tempX] != null) - { - UsbInputRoutedToFeebacks[tempX] = new IntFeedback(() => - { - if (Chassis.Inputs[tempX].USBRoutedToFeedback != null) { return (ushort)Chassis.Inputs[tempX].USBRoutedToFeedback.Number; } - else { return 0; }; - }); - VideoInputSyncFeedbacks[tempX] = new BoolFeedback(() => - { - if (Chassis.Inputs[tempX].VideoDetectedFeedback != null) - return Chassis.Inputs[tempX].VideoDetectedFeedback.BoolValue; - else - return false; - }); - InputNameFeedbacks[tempX] = new StringFeedback(() => - { - if (Chassis.Inputs[tempX].NameFeedback != null) - { - return Chassis.Inputs[tempX].NameFeedback.StringValue; - } - else - { - return ""; - } - }); - - InputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => - { - return Chassis.Inputs[tempX].EndpointOnlineFeedback; - }); - - InputCardHdcpCapabilityFeedbacks[tempX] = new IntFeedback(() => - { - var inputCard = Chassis.Inputs[tempX]; - - if (inputCard.Card is DmHdmi4kInputBladeCard) - { - InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support; - - if ((inputCard.Card as DmHdmi4kInputBladeCard).Hdmi4kInput.HdcpSupportOnFeedback.BoolValue) - return 1; - else - return 0; - } - - if (inputCard.Card is DmC4kInputBladeCard) - { - InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support; - - if ((inputCard.Card as DmC4kInputBladeCard).DmInput.HdcpCapabilityFeedback.Equals(eHdcpCapabilityType.HdcpSupportOff)) - return 0; - else - return 1; - } - - else - return 0; - }); - } - } - } - - /// - /// - /// - /// - /// - public void AddInputBlade(string type, uint number) - { - Debug.Console(2, this, "Adding input blade '{0}', slot {1}", type, number); - - type = type.ToLower(); - - if (type == "dmb4kihd") - { - var inputBlade = new Dmb4kIHd(number, this.Chassis); - foreach (var item in inputBlade.Inputs) - { - var card = (item.Card as DmHdmi4kInputBladeCard).Hdmi4kInput; - var cecPort = card as ICec; - AddHdmiInBladePorts(item.Number, cecPort); - } - } - - else if (type == "dmb4kihddnt") - { - var inputBlade = new Dmb4kIHd(number, this.Chassis); - foreach (var item in inputBlade.Inputs) - { - var card = (item.Card as DmHdmi4kInputBladeCard).Hdmi4kInput; - var cecPort = card as ICec; - AddHdmiInBladePorts(item.Number, cecPort); - } - } - - else if (type == "dmb4kic") - { - var inputBlade = new Dmb4kIC(number, this.Chassis); - foreach (var item in inputBlade.Inputs) - { - AddDmInBladePorts(item.Number); - } - } - - else if (type == "dmbis") - { - var inputBlade = new DmbIS(number, this.Chassis); - foreach (var item in inputBlade.Inputs) - { - AddDmInMmFiberPorts(item.Number); - } - } - else if (type == "dmbis2") - { - var inputBlade = new DmbIS2(number, this.Chassis); - foreach (var item in inputBlade.Inputs) - { - AddDmInSmFiberPorts(item.Number); - } - } - } - - /// - /// Raise an event when the status of a switch object changes. - /// - /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType - private void OnSwitchChange(RoutingNumericEventArgs e) - { - var newEvent = NumericSwitchChange; - if (newEvent != null) newEvent(this, e); - } - - - void AddHdmiInBladePorts(uint number, ICec cecPort) - { - AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, cecPort); - } - - void AddDmInBladePorts(uint number) - { - AddInputPortWithDebug(number, "dmCIn", eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat); - } - - void AddDmInMmFiberPorts(uint number) - { - AddInputPortWithDebug(number, "dmMmIn", eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber); - } - - void AddDmInSmFiberPorts(uint number) - { - AddInputPortWithDebug(number, "dmSmIn", eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber); - } - - /// - /// - /// - /// - /// - public void AddOutputBlade(string type, uint number) - { - type = type.ToLower(); - - Debug.Console(2, this, "Adding output blade '{0}', slot {1}", type, number); - if (type == "dmb4kohd") - { - var outputBlade = new Dmb4KOHD(number, Chassis); - foreach (var item in outputBlade.Outputs) - { - AddHdmiOutBladePorts(item.Number); - } - } - - else if (type == "dmb4kohddnt") - { - var outputBlade = new Dmb4KOHD(number, Chassis); - foreach (var item in outputBlade.Outputs) - { - AddHdmiOutBladePorts(item.Number); - } - } - - else if (type == "dmb4koc") - { - var outputBlade = new Dmb4KOC(number, Chassis); - foreach (var item in outputBlade.Outputs) - { - AddDmOutBladePorts(item.Number); - } - } - else if (type == "dmb4koc") - { - var outputBlade = new Dmb4KOC(number, Chassis); - foreach (var item in outputBlade.Outputs) - { - AddDmOutBladePorts(item.Number); - } - } - else if (type == "dmbos") - { - var outputBlade = new DmbOS(number, Chassis); - foreach (var item in outputBlade.Outputs) - { - AddDmOutMmFiberBladePorts(item.Number); - } - } - else if (type == "dmbos2") - { - var outputBlade = new DmbOS2(number, Chassis); - foreach (var item in outputBlade.Outputs) - { - AddDmOutSmFiberBladePorts(item.Number); - } - } - } - - void AddHdmiOutBladePorts(uint number) - { - AddOutputPortWithDebug(number, "hdmiOut", eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, Chassis.Outputs[number]); - } - - void AddDmOutBladePorts(uint number) - { - AddOutputPortWithDebug(number, "dmOut", eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, Chassis.Outputs[number]); - } - - void AddDmOutMmFiberBladePorts(uint number) - { - AddOutputPortWithDebug(number, "dmMmOut", eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber, Chassis.Outputs[number]); - } - - void AddDmOutSmFiberBladePorts(uint number) - { - AddOutputPortWithDebug(number, "dmSmOut", eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber, Chassis.Outputs[number]); - } - - - /// - /// Adds InputPort - /// - void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType) - { - AddInputPortWithDebug(cardNum, portName, sigType, portType, null); - } - - /// - /// Adds InputPort and sets Port as ICec object - /// - private void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, - eRoutingPortConnectionType portType, ICec cecPort) - { - var portKey = string.Format("inputCard{0}--{1}", cardNum, portName); - Debug.Console(2, this, "Adding input port '{0}'", portKey); - var inputPort = new RoutingInputPort(portKey, sigType, portType, Chassis.Inputs[cardNum], this) - { - FeedbackMatchObject = Chassis.Inputs[cardNum] - }; - - if (cecPort != null) - inputPort.Port = cecPort; - - InputPorts.Add(inputPort); - } - - - - /*void AddOutputPortWithDebug(string cardName, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector) { - var portKey = string.Format("{0}--{1}", cardName, portName); - Debug.Console(2, this, "Adding output port '{0}'", portKey); - OutputPorts.Add(new RoutingOutputPort(portKey, sigType, portType, selector, this) - { - FeedbackMatchObject = selector - }); - }*/ - - /// - /// Adds OutputPort - /// - void AddOutputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector) - { - try - { - var portKey = string.Format("outputCard{0}--{1}", cardNum, portName); - Debug.Console(2, this, "Adding output port '{0}'", portKey); - var outputPort = new RoutingOutputPort(portKey, sigType, portType, selector, this) - { - FeedbackMatchObject = Chassis.Outputs[cardNum] - }; - OutputPorts.Add(outputPort); - } - catch (Exception ex) - { - Debug.Console(0, this, "Exception : {0}", ex); - } - - } - - - /// - /// - /// - void AddVolumeControl(uint number, Audio.Output audio) - { - VolumeControls.Add(number, new DmCardAudioOutputController(audio)); - } - - //public void SetInputHdcpSupport(uint input, ePdtHdcpSupport hdcpSetting) - //{ - - //} - - - void Chassis_DMInputChange(Switch device, DMInputEventArgs args) - { - - switch (args.EventId) - { - case DMInputEventIds.EndpointOnlineEventId: - { - Debug.Console(2, this, "DM Input EndpointOnlineEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback); - InputEndpointOnlineFeedbacks[args.Number].FireUpdate(); - break; - } - case DMInputEventIds.OnlineFeedbackEventId: - { - Debug.Console(2, this, "DM Input OnlineFeedbackEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback); - InputEndpointOnlineFeedbacks[args.Number].FireUpdate(); - break; - } - case DMInputEventIds.VideoDetectedEventId: - { - Debug.Console(2, this, "DM Input {0} VideoDetectedEventId", args.Number); - VideoInputSyncFeedbacks[args.Number].FireUpdate(); - break; - } - case DMInputEventIds.InputNameEventId: - { - Debug.Console(2, this, "DM Input {0} NameFeedbackEventId", args.Number); - InputNameFeedbacks[args.Number].FireUpdate(); - break; - } - case DMInputEventIds.HdcpCapabilityFeedbackEventId: - { - Debug.Console(2, this, "DM Input {0} HdcpCapabilityFeedbackEventId", args.Number); - InputCardHdcpCapabilityFeedbacks[args.Number].FireUpdate(); - break; - } - default: - { - Debug.Console(2, this, "DMInputChange fired for Input {0} with Unhandled EventId: {1}", args.Number, args.EventId); - break; - } - } - } - - /// - /// - private void Chassis_DMOutputChange(Switch device, DMOutputEventArgs args) - { - var output = args.Number; - - switch (args.EventId) - { - case DMOutputEventIds.VolumeEventId: - { - if (VolumeControls.ContainsKey(output)) - { - VolumeControls[args.Number].VolumeEventFromChassis(); - } - break; - } - case DMOutputEventIds.EndpointOnlineEventId: - { - Debug.Console(2, this, - "Output {0} DMOutputEventIds.EndpointOnlineEventId fired. EndpointOnlineFeedback State: {1}", - args.Number, Chassis.Outputs[output].EndpointOnlineFeedback); - if (Chassis.Outputs[output].Endpoint != null) - Debug.Console(2, this, - "Output {0} DMOutputEventIds.EndpointOnlineEventId fired. Endpoint.IsOnline State: {1}", - args.Number, Chassis.Outputs[output].Endpoint.IsOnline); - - OutputEndpointOnlineFeedbacks[output].FireUpdate(); - break; - } - case DMOutputEventIds.OnlineFeedbackEventId: - { - Debug.Console(2, this, "Output {0} DMInputEventIds.OnlineFeedbackEventId fired. State: {1}", - args.Number, Chassis.Outputs[output].EndpointOnlineFeedback); - OutputEndpointOnlineFeedbacks[output].FireUpdate(); - break; - } - case DMOutputEventIds.VideoOutEventId: - { - - var inputNumber = Chassis.Outputs[output].VideoOutFeedback == null ? 0 : Chassis.Outputs[output].VideoOutFeedback.Number; - - Debug.Console(2, this, "DMSwitchAudioVideo:{0} Routed Input:{1} Output:{2}'", this.Name, - inputNumber, output); - - if (VideoOutputFeedbacks.ContainsKey(output)) - { - var localInputPort = InputPorts.FirstOrDefault(p => (DMInput)p.FeedbackMatchObject == Chassis.Outputs[output].VideoOutFeedback); - var localOutputPort = - OutputPorts.FirstOrDefault(p => (DMOutput)p.FeedbackMatchObject == Chassis.Outputs[output]); - - - VideoOutputFeedbacks[output].FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(output, - inputNumber, - localOutputPort, - localInputPort, - eRoutingSignalType.AudioVideo)); - - } - if (OutputVideoRouteNameFeedbacks.ContainsKey(output)) - { - OutputVideoRouteNameFeedbacks[output].FireUpdate(); - } - break; - } - case DMOutputEventIds.OutputNameEventId: - { - Debug.Console(2, this, "DM Output {0} NameFeedbackEventId", output); - OutputNameFeedbacks[output].FireUpdate(); - break; - } - default: - { - Debug.Console(2, this, "DMOutputChange fired for Output {0} with Unhandled EventId: {1}", - args.Number, args.EventId); - break; - } - } - - } - - - /// - /// - /// - /// - void StartOffTimer(PortNumberType pnt) - { - if (RouteOffTimers.ContainsKey(pnt)) - return; - RouteOffTimers[pnt] = new CTimer(o => ExecuteSwitch(null, pnt.Selector, pnt.Type), RouteOffTime); - } - - - // Send out sigs when coming online - void IsOnline_OutputChange(object sender, EventArgs e) - { - if (IsOnline.BoolValue) - { - Chassis.EnableUSBBreakaway.BoolValue = true; - - if (InputNames != null) - foreach (var kvp in InputNames) - Chassis.Inputs[kvp.Key].Name.StringValue = kvp.Value; - if (OutputNames != null) - foreach (var kvp in OutputNames) - Chassis.Outputs[kvp.Key].Name.StringValue = kvp.Value; - } - } - - #region IRouting Members - - public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType sigType) - { - Debug.Console(2, this, "Making an awesome DM route from {0} to {1} {2}", inputSelector, outputSelector, sigType); - - var input = inputSelector as DMInput; // Cast can sometimes fail - var output = outputSelector as DMOutput; - - - if (output == null) - { - Debug.Console(0, this, Debug.ErrorLogLevel.Warning, - "Unable to execute switch for inputSelector {0} to outputSelector {1}", inputSelector, - outputSelector); - return; - } - - // Check to see if there's an off timer waiting on this and if so, cancel - var key = new PortNumberType(output, sigType); - - if (input == null) - { - StartOffTimer(key); - } - else - { - if (RouteOffTimers.ContainsKey(key)) - { - Debug.Console(2, this, "{0} cancelling route off due to new source", output); - RouteOffTimers[key].Stop(); - RouteOffTimers.Remove(key); - } - } - - - - /*var inCard = input == 0 ? null : Chassis.Inputs[input]; - var outCard = input == 0 ? null : Chassis.Outputs[output];*/ - - // NOTE THAT BITWISE COMPARISONS - TO CATCH ALL ROUTING TYPES - if ((sigType & eRoutingSignalType.Video) != eRoutingSignalType.Video) return; - Chassis.VideoEnter.BoolValue = true; - output.VideoOut = input; - } - - #endregion - - #region IRoutingNumeric Members - - public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType sigType) - { - var input = inputSelector == 0 ? null : Chassis.Inputs[inputSelector]; - var output = Chassis.Outputs[outputSelector]; - - ExecuteSwitch(input, output, sigType); - } - - #endregion - - - public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - var joinMap = new DmBladeChassisControllerJoinMap(joinStart); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - if (bridge != null) - { - bridge.AddJoinMap(Key, joinMap); - } - else - { - Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); - } - - Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - - IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); - - // Link up outputs - for (uint i = 1; i <= Chassis.NumberOfOutputs; i++) - { - var ioSlot = i; - var ioSlotJoin = ioSlot - 1; - - // Control - trilist.SetUShortSigAction(joinMap.OutputVideo.JoinNumber + ioSlotJoin, o => ExecuteNumericSwitch(o, (ushort)ioSlot, eRoutingSignalType.Video)); - - if (TxDictionary.ContainsKey(ioSlot)) - { - Debug.Console(2, "Creating Tx Feedbacks {0}", ioSlot); - var txKey = TxDictionary[ioSlot]; - var basicTxDevice = DeviceManager.GetDeviceForKey(txKey) as BasicDmTxControllerBase; - - var advancedTxDevice = basicTxDevice as DmTxControllerBase; - - if (Chassis is DmMd128x128 || Chassis is DmMd64x64) - { - InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]); - } - else - { - if (advancedTxDevice != null) - { - advancedTxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]); - Debug.Console(2, "Linking Tx Online Feedback from Advanced Transmitter at input {0}", ioSlot); - } - else if (InputEndpointOnlineFeedbacks[ioSlot] != null) - { - Debug.Console(2, "Linking Tx Online Feedback from Input Card {0}", ioSlot); - InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]); - } - } - - if (basicTxDevice != null && advancedTxDevice == null) - trilist.BooleanInput[joinMap.TxAdvancedIsPresent.JoinNumber + ioSlotJoin].BoolValue = true; - - if (advancedTxDevice != null) - { - advancedTxDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]); - } - else - { - Debug.Console(1, "Setting up actions and feedbacks on input card {0}", ioSlot); - VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]); - - var inputPort = InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)]; - if (inputPort != null) - { - Debug.Console(1, "Port value for input card {0} is set", ioSlot); - var port = inputPort.Port; - - if (port != null) - { - if (port is HdmiInputWithCEC) - { - Debug.Console(1, "Port is HdmiInputWithCec"); - - var hdmiInPortWCec = port as HdmiInputWithCEC; - - if (hdmiInPortWCec.HdcpSupportedLevel != eHdcpSupportedLevel.Unknown) - { - SetHdcpStateAction(true, hdmiInPortWCec, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist); - } - - InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]); - - if (InputCardHdcpCapabilityTypes.ContainsKey(ioSlot)) - trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = (ushort)InputCardHdcpCapabilityTypes[ioSlot]; - else - trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = 1; - } - } - } - else - { - inputPort = InputPorts[string.Format("inputCard{0}--dmIn", ioSlot)]; - - if (inputPort != null) - { - var port = inputPort.Port; - - if (port is DMInputPortWithCec) - { - Debug.Console(1, "Port is DMInputPortWithCec"); - - var dmInPortWCec = port as DMInputPortWithCec; - - SetHdcpStateAction(PropertiesConfig.InputSlotSupportsHdcp2[ioSlot], dmInPortWCec, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist); - - InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]); - - if (InputCardHdcpCapabilityTypes.ContainsKey(ioSlot)) - trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = (ushort)InputCardHdcpCapabilityTypes[ioSlot]; - else - trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = 1; - } - } - } - } - } - else - { - VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]); - - var inputPort = InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)]; - if (inputPort != null) - { - var hdmiPort = inputPort.Port as EndpointHdmiInput; - - if (hdmiPort != null) - { - SetHdcpStateAction(true, hdmiPort, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist); - InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]); - } - } - } - if (RxDictionary.ContainsKey(ioSlot)) - { - Debug.Console(2, "Creating Rx Feedbacks {0}", ioSlot); - //var rxKey = RxDictionary[ioSlot]; - //var rxDevice = DeviceManager.GetDeviceForKey(rxKey) as DmRmcControllerBase; - //var hdBaseTDevice = DeviceManager.GetDeviceForKey(rxKey) as DmHdBaseTControllerBase; - //if (hdBaseTDevice != null) { - OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline.JoinNumber + ioSlotJoin]); - //} - //else if (rxDevice != null) { - // rxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]); - //} - } - - // Feedback - VideoOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputVideo.JoinNumber + ioSlotJoin]); - - - OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames.JoinNumber + ioSlotJoin]); - InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames.JoinNumber + ioSlotJoin]); - OutputVideoRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentVideoInputNames.JoinNumber + ioSlotJoin]); - } - } - - private void SetHdcpStateAction(bool hdcpTypeSimple, HdmiInputWithCEC port, uint join, BasicTriList trilist) - { - if (hdcpTypeSimple) - { - trilist.SetUShortSigAction(join, - s => - { - if (s == 0) - { - port.HdcpSupportOff(); - } - else if (s > 0) - { - port.HdcpSupportOn(); - } - }); - } - else - { - trilist.SetUShortSigAction(join, - u => - { - port.HdcpReceiveCapability = (eHdcpCapabilityType)u; - }); - } - } - - private void SetHdcpStateAction(bool hdcpTypeSimple, EndpointHdmiInput port, uint join, BasicTriList trilist) - { - if (hdcpTypeSimple) - { - trilist.SetUShortSigAction(join, - s => - { - if (s == 0) - { - port.HdcpSupportOff(); - } - else if (s > 0) - { - port.HdcpSupportOn(); - } - }); - } - else - { - trilist.SetUShortSigAction(join, - u => - { - port.HdcpCapability = (eHdcpCapabilityType)u; - }); - } - } - - private void SetHdcpStateAction(bool supportsHdcp2, DMInputPortWithCec port, uint join, BasicTriList trilist) - { - if (!supportsHdcp2) - { - trilist.SetUShortSigAction(join, - s => - { - if (s == 0) - { - port.HdcpSupportOff(); - } - else if (s > 0) - { - port.HdcpSupportOn(); - } - }); - } - else - { - trilist.SetUShortSigAction(join, - u => - { - port.HdcpReceiveCapability = (eHdcpCapabilityType)u; - }); - } - } - - } - - /* - public struct PortNumberType { - public uint Number { get; private set; } - public eRoutingSignalType Type { get; private set; } - - public PortNumberType(uint number, eRoutingSignalType type) - : this() { - Number = number; - Type = type; - } - }*/ +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.DM; +using Crestron.SimplSharpPro.DM.Cards; +using Crestron.SimplSharpPro.DM.Blades; +using Crestron.SimplSharpPro.DM.Endpoints; +using Crestron.SimplSharpPro.DM.Endpoints.Receivers; +using Full.Newtonsoft.Json; +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.DM.Config; + +namespace PepperDash.Essentials.DM +{ + /// + /// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions + /// + /// + public class DmBladeChassisController : CrestronGenericBridgeableBaseDevice, IDmSwitch, IRoutingNumericWithFeedback + { + private const string NonePortKey = "inputCard0--None"; + + public DMChassisPropertiesConfig PropertiesConfig { get; set; } + + public Switch Chassis { get; private set; } + + //IroutingNumericEvent + public event EventHandler NumericSwitchChange; + + // Feedbacks for EssentialDM + public Dictionary VideoOutputFeedbacks { get; private set; } + public Dictionary AudioOutputFeedbacks { get; private set; } + public Dictionary VideoInputSyncFeedbacks { get; private set; } + public Dictionary InputEndpointOnlineFeedbacks { get; private set; } + public Dictionary OutputEndpointOnlineFeedbacks { get; private set; } + public Dictionary InputNameFeedbacks { get; private set; } + public Dictionary OutputNameFeedbacks { get; private set; } + public Dictionary OutputVideoRouteNameFeedbacks { get; private set; } + public Dictionary OutputAudioRouteNameFeedbacks { get; private set; } + public Dictionary UsbOutputRoutedToFeebacks { get; private set; } + public Dictionary UsbInputRoutedToFeebacks { get; private set; } + + public IntFeedback SystemIdFeebdack { get; private set; } + public BoolFeedback SystemIdBusyFeedback { get; private set; } + + + public Dictionary InputCardHdcpCapabilityFeedbacks { get; private set; } + + public Dictionary InputCardHdcpCapabilityTypes { get; private set; } + + + // Need a couple Lists of generic Backplane ports + public RoutingPortCollection InputPorts { get; private set; } + public RoutingPortCollection OutputPorts { get; private set; } + + public Dictionary TxDictionary { get; set; } + public Dictionary RxDictionary { get; set; } + + //public Dictionary InputCards { get; private set; } + //public Dictionary OutputCards { get; private set; } + + public Dictionary InputNames { get; set; } + public Dictionary OutputNames { get; set; } + public Dictionary VolumeControls { get; private set; } + + public const int RouteOffTime = 500; + Dictionary RouteOffTimers = new Dictionary(); + + /// + /// Factory method to create a new chassis controller from config data. Limited to 8x8 right now + /// + public static DmBladeChassisController GetDmChassisController(string key, string name, + string type, DMChassisPropertiesConfig properties) + { + try + { + type = type.ToLower(); + uint ipid = properties.Control.IpIdInt; + + BladeSwitch chassis = null; + if (type == "dmmd64x64") { chassis = new DmMd64x64(ipid, Global.ControlSystem); } + else if (type == "dmmd128x128") { chassis = new DmMd128x128(ipid, Global.ControlSystem); } + + + if (chassis == null) + { + return null; + } + + var controller = new DmBladeChassisController(key, name, chassis); + // add the cards and port names + foreach (var kvp in properties.InputSlots) + controller.AddInputBlade(kvp.Value, kvp.Key); + foreach (var kvp in properties.OutputSlots) + { + controller.AddOutputBlade(kvp.Value, kvp.Key); + } + + foreach (var kvp in properties.VolumeControls) + { + // get the card + // check it for an audio-compatible type + // make a something-something that will make it work + // retire to mountain village + var outNum = kvp.Key; + + var card = controller.Chassis.Outputs[outNum].Card; + Audio.Output audio = null; + if (card is DmHdmi4kOutputBladeCard) + audio = (card as DmHdmi4kOutputBladeCard).Hdmi4kOutput.Audio; + if (audio == null) + continue; + // wire up the audio to something here... + controller.AddVolumeControl(outNum, audio); + } + + controller.InputPorts.Add(new RoutingInputPort(NonePortKey, eRoutingSignalType.Video, + eRoutingPortConnectionType.None, null, controller)); + + + controller.InputNames = properties.InputNames; + controller.OutputNames = properties.OutputNames; + controller.PropertiesConfig = properties; + return controller; + } + catch (System.Exception e) + { + Debug.Console(0, "Error creating DM chassis:\r{0}", e); + } + return null; + } + + + /// + /// + /// + /// + /// + /// + public DmBladeChassisController(string key, string name, BladeSwitch chassis) + : base(key, name, chassis) + { + Chassis = chassis; + InputPorts = new RoutingPortCollection(); + OutputPorts = new RoutingPortCollection(); + VolumeControls = new Dictionary(); + TxDictionary = new Dictionary(); + RxDictionary = new Dictionary(); + IsOnline.OutputChange += new EventHandler(IsOnline_OutputChange); + Chassis.DMInputChange += new DMInputEventHandler(Chassis_DMInputChange); + Chassis.DMOutputChange += new DMOutputEventHandler(Chassis_DMOutputChange); + VideoOutputFeedbacks = new Dictionary(); + UsbOutputRoutedToFeebacks = new Dictionary(); + UsbInputRoutedToFeebacks = new Dictionary(); + VideoInputSyncFeedbacks = new Dictionary(); + InputNameFeedbacks = new Dictionary(); + OutputNameFeedbacks = new Dictionary(); + OutputVideoRouteNameFeedbacks = new Dictionary(); + OutputAudioRouteNameFeedbacks = new Dictionary(); + InputEndpointOnlineFeedbacks = new Dictionary(); + OutputEndpointOnlineFeedbacks = new Dictionary(); + + InputCardHdcpCapabilityFeedbacks = new Dictionary(); + InputCardHdcpCapabilityTypes = new Dictionary(); + + for (uint x = 1; x <= Chassis.NumberOfOutputs; x++) + { + var tempX = x; + + if (Chassis.Outputs[tempX] != null) + { + VideoOutputFeedbacks[tempX] = new IntFeedback(() => + { + if (Chassis.Outputs[tempX].VideoOutFeedback != null) { return (ushort)Chassis.Outputs[tempX].VideoOutFeedback.Number; } + else { return 0; }; + }); + + OutputNameFeedbacks[tempX] = new StringFeedback(() => + { + if (Chassis.Outputs[tempX].NameFeedback != null) + { + return Chassis.Outputs[tempX].NameFeedback.StringValue; + } + else + { + return ""; + } + }); + OutputVideoRouteNameFeedbacks[tempX] = new StringFeedback(() => + { + if (Chassis.Outputs[tempX].VideoOutFeedback != null) + { + return Chassis.Outputs[tempX].VideoOutFeedback.NameFeedback.StringValue; + } + else + { + return ""; + } + }); + + OutputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => + { + //if (Chassis.Outputs[tempX].Endpoint != null) + // return Chassis.Outputs[tempX].Endpoint.IsOnline; + //else + return Chassis.Outputs[tempX].EndpointOnlineFeedback; + }); + } + + if (Chassis.Inputs[tempX] != null) + { + UsbInputRoutedToFeebacks[tempX] = new IntFeedback(() => + { + if (Chassis.Inputs[tempX].USBRoutedToFeedback != null) { return (ushort)Chassis.Inputs[tempX].USBRoutedToFeedback.Number; } + else { return 0; }; + }); + VideoInputSyncFeedbacks[tempX] = new BoolFeedback(() => + { + if (Chassis.Inputs[tempX].VideoDetectedFeedback != null) + return Chassis.Inputs[tempX].VideoDetectedFeedback.BoolValue; + else + return false; + }); + InputNameFeedbacks[tempX] = new StringFeedback(() => + { + if (Chassis.Inputs[tempX].NameFeedback != null) + { + return Chassis.Inputs[tempX].NameFeedback.StringValue; + } + else + { + return ""; + } + }); + + InputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => + { + return Chassis.Inputs[tempX].EndpointOnlineFeedback; + }); + + InputCardHdcpCapabilityFeedbacks[tempX] = new IntFeedback(() => + { + var inputCard = Chassis.Inputs[tempX]; + + if (inputCard.Card is DmHdmi4kInputBladeCard) + { + InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support; + + if ((inputCard.Card as DmHdmi4kInputBladeCard).Hdmi4kInput.HdcpSupportOnFeedback.BoolValue) + return 1; + else + return 0; + } + + if (inputCard.Card is DmC4kInputBladeCard) + { + InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support; + + if ((inputCard.Card as DmC4kInputBladeCard).DmInput.HdcpCapabilityFeedback.Equals(eHdcpCapabilityType.HdcpSupportOff)) + return 0; + else + return 1; + } + + else + return 0; + }); + } + } + } + + /// + /// + /// + /// + /// + public void AddInputBlade(string type, uint number) + { + Debug.Console(2, this, "Adding input blade '{0}', slot {1}", type, number); + + type = type.ToLower(); + + if (type == "dmb4kihd") + { + var inputBlade = new Dmb4kIHd(number, this.Chassis); + foreach (var item in inputBlade.Inputs) + { + var card = (item.Card as DmHdmi4kInputBladeCard).Hdmi4kInput; + var cecPort = card as ICec; + AddHdmiInBladePorts(item.Number, cecPort); + } + } + + else if (type == "dmb4kihddnt") + { + var inputBlade = new Dmb4kIHd(number, this.Chassis); + foreach (var item in inputBlade.Inputs) + { + var card = (item.Card as DmHdmi4kInputBladeCard).Hdmi4kInput; + var cecPort = card as ICec; + AddHdmiInBladePorts(item.Number, cecPort); + } + } + + else if (type == "dmb4kic") + { + var inputBlade = new Dmb4kIC(number, this.Chassis); + foreach (var item in inputBlade.Inputs) + { + AddDmInBladePorts(item.Number); + } + } + + else if (type == "dmbis") + { + var inputBlade = new DmbIS(number, this.Chassis); + foreach (var item in inputBlade.Inputs) + { + AddDmInMmFiberPorts(item.Number); + } + } + else if (type == "dmbis2") + { + var inputBlade = new DmbIS2(number, this.Chassis); + foreach (var item in inputBlade.Inputs) + { + AddDmInSmFiberPorts(item.Number); + } + } + } + + /// + /// Raise an event when the status of a switch object changes. + /// + /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType + private void OnSwitchChange(RoutingNumericEventArgs e) + { + var newEvent = NumericSwitchChange; + if (newEvent != null) newEvent(this, e); + } + + + void AddHdmiInBladePorts(uint number, ICec cecPort) + { + AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, cecPort); + } + + void AddDmInBladePorts(uint number) + { + AddInputPortWithDebug(number, "dmCIn", eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat); + } + + void AddDmInMmFiberPorts(uint number) + { + AddInputPortWithDebug(number, "dmMmIn", eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber); + } + + void AddDmInSmFiberPorts(uint number) + { + AddInputPortWithDebug(number, "dmSmIn", eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber); + } + + /// + /// + /// + /// + /// + public void AddOutputBlade(string type, uint number) + { + type = type.ToLower(); + + Debug.Console(2, this, "Adding output blade '{0}', slot {1}", type, number); + if (type == "dmb4kohd") + { + var outputBlade = new Dmb4KOHD(number, Chassis); + foreach (var item in outputBlade.Outputs) + { + AddHdmiOutBladePorts(item.Number); + } + } + + else if (type == "dmb4kohddnt") + { + var outputBlade = new Dmb4KOHD(number, Chassis); + foreach (var item in outputBlade.Outputs) + { + AddHdmiOutBladePorts(item.Number); + } + } + + else if (type == "dmb4koc") + { + var outputBlade = new Dmb4KOC(number, Chassis); + foreach (var item in outputBlade.Outputs) + { + AddDmOutBladePorts(item.Number); + } + } + else if (type == "dmb4koc") + { + var outputBlade = new Dmb4KOC(number, Chassis); + foreach (var item in outputBlade.Outputs) + { + AddDmOutBladePorts(item.Number); + } + } + else if (type == "dmbos") + { + var outputBlade = new DmbOS(number, Chassis); + foreach (var item in outputBlade.Outputs) + { + AddDmOutMmFiberBladePorts(item.Number); + } + } + else if (type == "dmbos2") + { + var outputBlade = new DmbOS2(number, Chassis); + foreach (var item in outputBlade.Outputs) + { + AddDmOutSmFiberBladePorts(item.Number); + } + } + } + + void AddHdmiOutBladePorts(uint number) + { + AddOutputPortWithDebug(number, "hdmiOut", eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, Chassis.Outputs[number]); + } + + void AddDmOutBladePorts(uint number) + { + AddOutputPortWithDebug(number, "dmOut", eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, Chassis.Outputs[number]); + } + + void AddDmOutMmFiberBladePorts(uint number) + { + AddOutputPortWithDebug(number, "dmMmOut", eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber, Chassis.Outputs[number]); + } + + void AddDmOutSmFiberBladePorts(uint number) + { + AddOutputPortWithDebug(number, "dmSmOut", eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber, Chassis.Outputs[number]); + } + + + /// + /// Adds InputPort + /// + void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType) + { + AddInputPortWithDebug(cardNum, portName, sigType, portType, null); + } + + /// + /// Adds InputPort and sets Port as ICec object + /// + private void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, + eRoutingPortConnectionType portType, ICec cecPort) + { + var portKey = string.Format("inputCard{0}--{1}", cardNum, portName); + Debug.Console(2, this, "Adding input port '{0}'", portKey); + var inputPort = new RoutingInputPort(portKey, sigType, portType, Chassis.Inputs[cardNum], this) + { + FeedbackMatchObject = Chassis.Inputs[cardNum] + }; + + if (cecPort != null) + inputPort.Port = cecPort; + + InputPorts.Add(inputPort); + } + + + + /*void AddOutputPortWithDebug(string cardName, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector) { + var portKey = string.Format("{0}--{1}", cardName, portName); + Debug.Console(2, this, "Adding output port '{0}'", portKey); + OutputPorts.Add(new RoutingOutputPort(portKey, sigType, portType, selector, this) + { + FeedbackMatchObject = selector + }); + }*/ + + /// + /// Adds OutputPort + /// + void AddOutputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector) + { + try + { + var portKey = string.Format("outputCard{0}--{1}", cardNum, portName); + Debug.Console(2, this, "Adding output port '{0}'", portKey); + var outputPort = new RoutingOutputPort(portKey, sigType, portType, selector, this) + { + FeedbackMatchObject = Chassis.Outputs[cardNum] + }; + OutputPorts.Add(outputPort); + } + catch (Exception ex) + { + Debug.Console(0, this, "Exception : {0}", ex); + } + + } + + + /// + /// + /// + void AddVolumeControl(uint number, Audio.Output audio) + { + VolumeControls.Add(number, new DmCardAudioOutputController(audio)); + } + + //public void SetInputHdcpSupport(uint input, ePdtHdcpSupport hdcpSetting) + //{ + + //} + + + void Chassis_DMInputChange(Switch device, DMInputEventArgs args) + { + + switch (args.EventId) + { + case DMInputEventIds.EndpointOnlineEventId: + { + Debug.Console(2, this, "DM Input EndpointOnlineEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback); + InputEndpointOnlineFeedbacks[args.Number].FireUpdate(); + break; + } + case DMInputEventIds.OnlineFeedbackEventId: + { + Debug.Console(2, this, "DM Input OnlineFeedbackEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback); + InputEndpointOnlineFeedbacks[args.Number].FireUpdate(); + break; + } + case DMInputEventIds.VideoDetectedEventId: + { + Debug.Console(2, this, "DM Input {0} VideoDetectedEventId", args.Number); + VideoInputSyncFeedbacks[args.Number].FireUpdate(); + break; + } + case DMInputEventIds.InputNameEventId: + { + Debug.Console(2, this, "DM Input {0} NameFeedbackEventId", args.Number); + InputNameFeedbacks[args.Number].FireUpdate(); + break; + } + case DMInputEventIds.HdcpCapabilityFeedbackEventId: + { + Debug.Console(2, this, "DM Input {0} HdcpCapabilityFeedbackEventId", args.Number); + InputCardHdcpCapabilityFeedbacks[args.Number].FireUpdate(); + break; + } + default: + { + Debug.Console(2, this, "DMInputChange fired for Input {0} with Unhandled EventId: {1}", args.Number, args.EventId); + break; + } + } + } + + /// + /// + private void Chassis_DMOutputChange(Switch device, DMOutputEventArgs args) + { + var output = args.Number; + + switch (args.EventId) + { + case DMOutputEventIds.VolumeEventId: + { + if (VolumeControls.ContainsKey(output)) + { + VolumeControls[args.Number].VolumeEventFromChassis(); + } + break; + } + case DMOutputEventIds.EndpointOnlineEventId: + { + Debug.Console(2, this, + "Output {0} DMOutputEventIds.EndpointOnlineEventId fired. EndpointOnlineFeedback State: {1}", + args.Number, Chassis.Outputs[output].EndpointOnlineFeedback); + if (Chassis.Outputs[output].Endpoint != null) + Debug.Console(2, this, + "Output {0} DMOutputEventIds.EndpointOnlineEventId fired. Endpoint.IsOnline State: {1}", + args.Number, Chassis.Outputs[output].Endpoint.IsOnline); + + OutputEndpointOnlineFeedbacks[output].FireUpdate(); + break; + } + case DMOutputEventIds.OnlineFeedbackEventId: + { + Debug.Console(2, this, "Output {0} DMInputEventIds.OnlineFeedbackEventId fired. State: {1}", + args.Number, Chassis.Outputs[output].EndpointOnlineFeedback); + OutputEndpointOnlineFeedbacks[output].FireUpdate(); + break; + } + case DMOutputEventIds.VideoOutEventId: + { + + var inputNumber = Chassis.Outputs[output].VideoOutFeedback == null ? 0 : Chassis.Outputs[output].VideoOutFeedback.Number; + + Debug.Console(2, this, "DMSwitchAudioVideo:{0} Routed Input:{1} Output:{2}'", this.Name, + inputNumber, output); + + if (VideoOutputFeedbacks.ContainsKey(output)) + { + var localInputPort = InputPorts.FirstOrDefault(p => (DMInput)p.FeedbackMatchObject == Chassis.Outputs[output].VideoOutFeedback); + var localOutputPort = + OutputPorts.FirstOrDefault(p => (DMOutput)p.FeedbackMatchObject == Chassis.Outputs[output]); + + + VideoOutputFeedbacks[output].FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(output, + inputNumber, + localOutputPort, + localInputPort, + eRoutingSignalType.AudioVideo)); + + } + if (OutputVideoRouteNameFeedbacks.ContainsKey(output)) + { + OutputVideoRouteNameFeedbacks[output].FireUpdate(); + } + break; + } + case DMOutputEventIds.OutputNameEventId: + { + Debug.Console(2, this, "DM Output {0} NameFeedbackEventId", output); + OutputNameFeedbacks[output].FireUpdate(); + break; + } + default: + { + Debug.Console(2, this, "DMOutputChange fired for Output {0} with Unhandled EventId: {1}", + args.Number, args.EventId); + break; + } + } + + } + + + /// + /// + /// + /// + void StartOffTimer(PortNumberType pnt) + { + if (RouteOffTimers.ContainsKey(pnt)) + return; + RouteOffTimers[pnt] = new CTimer(o => ExecuteSwitch(null, pnt.Selector, pnt.Type), RouteOffTime); + } + + + // Send out sigs when coming online + void IsOnline_OutputChange(object sender, EventArgs e) + { + if (IsOnline.BoolValue) + { + Chassis.EnableUSBBreakaway.BoolValue = true; + + if (InputNames != null) + foreach (var kvp in InputNames) + Chassis.Inputs[kvp.Key].Name.StringValue = kvp.Value; + if (OutputNames != null) + foreach (var kvp in OutputNames) + Chassis.Outputs[kvp.Key].Name.StringValue = kvp.Value; + } + } + + #region IRouting Members + + public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType sigType) + { + Debug.Console(2, this, "Making an awesome DM route from {0} to {1} {2}", inputSelector, outputSelector, sigType); + + var input = inputSelector as DMInput; // Cast can sometimes fail + var output = outputSelector as DMOutput; + + + if (output == null) + { + Debug.Console(0, this, Debug.ErrorLogLevel.Warning, + "Unable to execute switch for inputSelector {0} to outputSelector {1}", inputSelector, + outputSelector); + return; + } + + // Check to see if there's an off timer waiting on this and if so, cancel + var key = new PortNumberType(output, sigType); + + if (input == null) + { + StartOffTimer(key); + } + else + { + if (RouteOffTimers.ContainsKey(key)) + { + Debug.Console(2, this, "{0} cancelling route off due to new source", output); + RouteOffTimers[key].Stop(); + RouteOffTimers.Remove(key); + } + } + + + + /*var inCard = input == 0 ? null : Chassis.Inputs[input]; + var outCard = input == 0 ? null : Chassis.Outputs[output];*/ + + // NOTE THAT BITWISE COMPARISONS - TO CATCH ALL ROUTING TYPES + if ((sigType & eRoutingSignalType.Video) != eRoutingSignalType.Video) return; + Chassis.VideoEnter.BoolValue = true; + output.VideoOut = input; + } + + #endregion + + #region IRoutingNumeric Members + + public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType sigType) + { + var input = inputSelector == 0 ? null : Chassis.Inputs[inputSelector]; + var output = Chassis.Outputs[outputSelector]; + + ExecuteSwitch(input, output, sigType); + } + + #endregion + + + public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + var joinMap = new DmBladeChassisControllerJoinMap(joinStart); + + var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); + + if (bridge != null) + { + bridge.AddJoinMap(Key, joinMap); + } + else + { + Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); + } + + Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); + + IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); + + // Link up outputs + for (uint i = 1; i <= Chassis.NumberOfOutputs; i++) + { + var ioSlot = i; + var ioSlotJoin = ioSlot - 1; + + // Control + trilist.SetUShortSigAction(joinMap.OutputVideo.JoinNumber + ioSlotJoin, o => ExecuteNumericSwitch(o, (ushort)ioSlot, eRoutingSignalType.Video)); + + if (TxDictionary.ContainsKey(ioSlot)) + { + Debug.Console(2, "Creating Tx Feedbacks {0}", ioSlot); + var txKey = TxDictionary[ioSlot]; + var basicTxDevice = DeviceManager.GetDeviceForKey(txKey) as BasicDmTxControllerBase; + + var advancedTxDevice = basicTxDevice as DmTxControllerBase; + + if (Chassis is DmMd128x128 || Chassis is DmMd64x64) + { + InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]); + } + else + { + if (advancedTxDevice != null) + { + advancedTxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]); + Debug.Console(2, "Linking Tx Online Feedback from Advanced Transmitter at input {0}", ioSlot); + } + else if (InputEndpointOnlineFeedbacks[ioSlot] != null) + { + Debug.Console(2, "Linking Tx Online Feedback from Input Card {0}", ioSlot); + InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]); + } + } + + if (basicTxDevice != null && advancedTxDevice == null) + trilist.BooleanInput[joinMap.TxAdvancedIsPresent.JoinNumber + ioSlotJoin].BoolValue = true; + + if (advancedTxDevice != null) + { + advancedTxDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]); + } + else + { + Debug.Console(1, "Setting up actions and feedbacks on input card {0}", ioSlot); + VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]); + + var inputPort = InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)]; + if (inputPort != null) + { + Debug.Console(1, "Port value for input card {0} is set", ioSlot); + var port = inputPort.Port; + + if (port != null) + { + if (port is HdmiInputWithCEC) + { + Debug.Console(1, "Port is HdmiInputWithCec"); + + var hdmiInPortWCec = port as HdmiInputWithCEC; + + if (hdmiInPortWCec.HdcpSupportedLevel != eHdcpSupportedLevel.Unknown) + { + SetHdcpStateAction(true, hdmiInPortWCec, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist); + } + + InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]); + + if (InputCardHdcpCapabilityTypes.ContainsKey(ioSlot)) + trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = (ushort)InputCardHdcpCapabilityTypes[ioSlot]; + else + trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = 1; + } + } + } + else + { + inputPort = InputPorts[string.Format("inputCard{0}--dmIn", ioSlot)]; + + if (inputPort != null) + { + var port = inputPort.Port; + + if (port is DMInputPortWithCec) + { + Debug.Console(1, "Port is DMInputPortWithCec"); + + var dmInPortWCec = port as DMInputPortWithCec; + + SetHdcpStateAction(PropertiesConfig.InputSlotSupportsHdcp2[ioSlot], dmInPortWCec, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist); + + InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]); + + if (InputCardHdcpCapabilityTypes.ContainsKey(ioSlot)) + trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = (ushort)InputCardHdcpCapabilityTypes[ioSlot]; + else + trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = 1; + } + } + } + } + } + else + { + VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]); + + var inputPort = InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)]; + if (inputPort != null) + { + var hdmiPort = inputPort.Port as EndpointHdmiInput; + + if (hdmiPort != null) + { + SetHdcpStateAction(true, hdmiPort, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist); + InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]); + } + } + } + if (RxDictionary.ContainsKey(ioSlot)) + { + Debug.Console(2, "Creating Rx Feedbacks {0}", ioSlot); + //var rxKey = RxDictionary[ioSlot]; + //var rxDevice = DeviceManager.GetDeviceForKey(rxKey) as DmRmcControllerBase; + //var hdBaseTDevice = DeviceManager.GetDeviceForKey(rxKey) as DmHdBaseTControllerBase; + //if (hdBaseTDevice != null) { + OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline.JoinNumber + ioSlotJoin]); + //} + //else if (rxDevice != null) { + // rxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]); + //} + } + + // Feedback + VideoOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputVideo.JoinNumber + ioSlotJoin]); + + + OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames.JoinNumber + ioSlotJoin]); + InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames.JoinNumber + ioSlotJoin]); + OutputVideoRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentVideoInputNames.JoinNumber + ioSlotJoin]); + } + } + + private void SetHdcpStateAction(bool hdcpTypeSimple, HdmiInputWithCEC port, uint join, BasicTriList trilist) + { + if (hdcpTypeSimple) + { + trilist.SetUShortSigAction(join, + s => + { + if (s == 0) + { + port.HdcpSupportOff(); + } + else if (s > 0) + { + port.HdcpSupportOn(); + } + }); + } + else + { + trilist.SetUShortSigAction(join, + u => + { + port.HdcpReceiveCapability = (eHdcpCapabilityType)u; + }); + } + } + + private void SetHdcpStateAction(bool hdcpTypeSimple, EndpointHdmiInput port, uint join, BasicTriList trilist) + { + if (hdcpTypeSimple) + { + trilist.SetUShortSigAction(join, + s => + { + if (s == 0) + { + port.HdcpSupportOff(); + } + else if (s > 0) + { + port.HdcpSupportOn(); + } + }); + } + else + { + trilist.SetUShortSigAction(join, + u => + { + port.HdcpCapability = (eHdcpCapabilityType)u; + }); + } + } + + private void SetHdcpStateAction(bool supportsHdcp2, DMInputPortWithCec port, uint join, BasicTriList trilist) + { + if (!supportsHdcp2) + { + trilist.SetUShortSigAction(join, + s => + { + if (s == 0) + { + port.HdcpSupportOff(); + } + else if (s > 0) + { + port.HdcpSupportOn(); + } + }); + } + else + { + trilist.SetUShortSigAction(join, + u => + { + port.HdcpReceiveCapability = (eHdcpCapabilityType)u; + }); + } + } + + } + + /* + public struct PortNumberType { + public uint Number { get; private set; } + public eRoutingSignalType Type { get; private set; } + + public PortNumberType(uint number, eRoutingSignalType type) + : this() { + Number = number; + Type = type; + } + }*/ } \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmCardAudioOutput.cs b/src/PepperDash.Essentials.DM/Chassis/DmCardAudioOutput.cs similarity index 100% rename from essentials-framework/Essentials DM/Essentials_DM/Chassis/DmCardAudioOutput.cs rename to src/PepperDash.Essentials.DM/Chassis/DmCardAudioOutput.cs diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs b/src/PepperDash.Essentials.DM/Chassis/DmChassisController.cs similarity index 97% rename from essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs rename to src/PepperDash.Essentials.DM/Chassis/DmChassisController.cs index 60ef9d69..e5690166 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs +++ b/src/PepperDash.Essentials.DM/Chassis/DmChassisController.cs @@ -1,2126 +1,2128 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Crestron.SimplSharp; -using Crestron.SimplSharp.Reflection; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.DM; -using Crestron.SimplSharpPro.DM.Cards; -using Crestron.SimplSharpPro.DM.Endpoints; -using Crestron.SimplSharpProInternal; -using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Bridges; -using PepperDash.Essentials.DM.Config; -using PepperDash.Essentials.Core.Config; - -namespace PepperDash.Essentials.DM -{ - /// - /// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions - /// - /// - [Description("Wrapper class for all DM-MD chassis variants from 8x8 to 32x32")] - public class DmChassisController : CrestronGenericBridgeableBaseDevice, IDmSwitch, IRoutingNumericWithFeedback - { - private const string NonePortKey = "inputCard0--None"; - public DMChassisPropertiesConfig PropertiesConfig { get; set; } - - public Switch Chassis { get; private set; } - - //IroutingNumericEvent - public event EventHandler NumericSwitchChange; - - // Feedbacks for EssentialDM - public Dictionary VideoOutputFeedbacks { get; private set; } - public Dictionary AudioOutputFeedbacks { get; private set; } - public Dictionary VideoInputSyncFeedbacks { get; private set; } - public Dictionary InputEndpointOnlineFeedbacks { get; private set; } - public Dictionary OutputEndpointOnlineFeedbacks { get; private set; } - public Dictionary InputNameFeedbacks { get; private set; } - public Dictionary OutputNameFeedbacks { get; private set; } - public Dictionary OutputVideoRouteNameFeedbacks { get; private set; } - public Dictionary OutputAudioRouteNameFeedbacks { get; private set; } - public Dictionary UsbOutputRoutedToFeebacks { get; private set; } - public Dictionary UsbInputRoutedToFeebacks { get; private set; } - public Dictionary OutputDisabledByHdcpFeedbacks { get; private set; } - - public IntFeedback SystemIdFeebdack { get; private set; } - public BoolFeedback SystemIdBusyFeedback { get; private set; } - public BoolFeedback EnableAudioBreakawayFeedback { get; private set; } - public BoolFeedback EnableUsbBreakawayFeedback { get; private set; } - - public Dictionary InputCardHdcpStateFeedbacks { get; private set; } - public Dictionary InputStreamCardStateFeedbacks { get; private set; } - public Dictionary OutputStreamCardStateFeedbacks { get; private set; } - - public Dictionary InputCardHdcpCapabilityTypes { get; private set; } - - // Need a couple Lists of generic Backplane ports - public RoutingPortCollection InputPorts { get; private set; } - public RoutingPortCollection OutputPorts { get; private set; } - - public Dictionary TxDictionary { get; set; } - public Dictionary RxDictionary { get; set; } - - //public Dictionary InputCards { get; private set; } - //public Dictionary OutputCards { get; private set; } - - public Dictionary InputNames { get; set; } - public Dictionary OutputNames { get; set; } - public Dictionary VolumeControls { get; private set; } - - public const int RouteOffTime = 500; - Dictionary RouteOffTimers = new Dictionary(); - - /// - /// Text that represents when an output has no source routed to it - /// - public string NoRouteText = ""; - - /// - /// Factory method to create a new chassis controller from config data. Limited to 8x8 right now - /// - public static DmChassisController GetDmChassisController(string key, string name, - string type, DMChassisPropertiesConfig properties) - { - try - { - type = type.ToLower(); - uint ipid = properties.Control.IpIdInt; - - DmMDMnxn chassis = null; - switch (type) { - case "dmmd8x8": - chassis = new DmMd8x8(ipid, Global.ControlSystem); - break; - case "dmmd8x8rps": - chassis = new DmMd8x8rps(ipid, Global.ControlSystem); - break; - case "dmmd8x8cpu3": - chassis = new DmMd8x8Cpu3(ipid, Global.ControlSystem); - break; - case "dmmd8x8cpu3rps": - chassis = new DmMd8x8Cpu3rps(ipid, Global.ControlSystem); - break; - case "dmmd16x16": - chassis = new DmMd16x16(ipid, Global.ControlSystem); - break; - case "dmmd16x16rps": - chassis = new DmMd16x16rps(ipid, Global.ControlSystem); - break; - case "dmmd16x16cpu3": - chassis = new DmMd16x16Cpu3(ipid, Global.ControlSystem); - break; - case "dmmd16x16cpu3rps": - chassis = new DmMd16x16Cpu3rps(ipid, Global.ControlSystem); - break; - case "dmmd32x32": - chassis = new DmMd32x32(ipid, Global.ControlSystem); - break; - case "dmmd32x32rps": - chassis = new DmMd32x32rps(ipid, Global.ControlSystem); - break; - case "dmmd32x32cpu3": - chassis = new DmMd32x32Cpu3(ipid, Global.ControlSystem); - break; - case "dmmd32x32cpu3rps": - chassis = new DmMd32x32Cpu3rps(ipid, Global.ControlSystem); - break; - } - - if (chassis == null) - return null; - - var controller = new DmChassisController(key, name, chassis); - - // - var clearInputPort = new RoutingInputPort(NonePortKey, eRoutingSignalType.AudioVideo, - eRoutingPortConnectionType.None, null, controller); - - controller.InputPorts.Add(clearInputPort); - - // add the cards and port names - foreach (var kvp in properties.InputSlots) - controller.AddInputCard(kvp.Value, kvp.Key); - - foreach (var kvp in properties.OutputSlots) - controller.AddOutputCard(kvp.Value, kvp.Key); - - foreach (var kvp in properties.VolumeControls) - { - // get the card - // check it for an audio-compatible type - // make a something-something that will make it work - // retire to mountain village - var outNum = kvp.Key; - var card = controller.Chassis.Outputs[outNum].Card; - Audio.Output audio = null; - if (card is DmcHdo) - audio = (card as DmcHdo).Audio; - else if (card is Dmc4kHdo) - audio = (card as Dmc4kHdo).Audio; - if (audio == null) - continue; - - // wire up the audio to something here... - controller.AddVolumeControl(outNum, audio); - } - - controller.InputNames = properties.InputNames; - controller.OutputNames = properties.OutputNames; - - if (!string.IsNullOrEmpty(properties.NoRouteText)) - { - controller.NoRouteText = properties.NoRouteText; - Debug.Console(1, controller, "Setting No Route Text value to: {0}", controller.NoRouteText); - } - else - { - Debug.Console(1, controller, "NoRouteText not specified. Defaulting to blank string.", controller.NoRouteText); - } - - controller.PropertiesConfig = properties; - return controller; - } - catch (Exception e) - { - Debug.Console(0, "Error creating DM chassis:\r{0}", e); - } - - return null; - } - - /// - /// - /// - /// - /// - /// - public DmChassisController(string key, string name, DmMDMnxn chassis) - : base(key, name, chassis) - { - - Chassis = chassis; - InputPorts = new RoutingPortCollection(); - OutputPorts = new RoutingPortCollection(); - VolumeControls = new Dictionary(); - TxDictionary = new Dictionary(); - RxDictionary = new Dictionary(); - IsOnline.OutputChange += new EventHandler(IsOnline_OutputChange); - Chassis.DMInputChange += new DMInputEventHandler(Chassis_DMInputChange); - Chassis.DMSystemChange += new DMSystemEventHandler(Chassis_DMSystemChange); - Chassis.DMOutputChange += new DMOutputEventHandler(Chassis_DMOutputChange); - Chassis.BaseEvent += ChassisOnBaseEvent; - VideoOutputFeedbacks = new Dictionary(); - AudioOutputFeedbacks = new Dictionary(); - UsbOutputRoutedToFeebacks = new Dictionary(); - UsbInputRoutedToFeebacks = new Dictionary(); - OutputDisabledByHdcpFeedbacks = new Dictionary(); - VideoInputSyncFeedbacks = new Dictionary(); - InputNameFeedbacks = new Dictionary(); - OutputNameFeedbacks = new Dictionary(); - OutputVideoRouteNameFeedbacks = new Dictionary(); - OutputAudioRouteNameFeedbacks = new Dictionary(); - InputEndpointOnlineFeedbacks = new Dictionary(); - OutputEndpointOnlineFeedbacks = new Dictionary(); - - SystemIdFeebdack = new IntFeedback(() => { return (Chassis as DmMDMnxn).SystemIdFeedback.UShortValue; }); - SystemIdBusyFeedback = new BoolFeedback(() => { return (Chassis as DmMDMnxn).SystemIdBusy.BoolValue; }); - EnableAudioBreakawayFeedback = - new BoolFeedback(() => (Chassis as DmMDMnxn).EnableAudioBreakawayFeedback.BoolValue); - EnableUsbBreakawayFeedback = - new BoolFeedback(() => (Chassis as DmMDMnxn).EnableUSBBreakawayFeedback.BoolValue); - - InputCardHdcpStateFeedbacks = new Dictionary(); - InputStreamCardStateFeedbacks = new Dictionary(); - OutputStreamCardStateFeedbacks = new Dictionary(); - InputCardHdcpCapabilityTypes = new Dictionary(); - - for (uint x = 1; x <= Chassis.NumberOfOutputs; x++) - { - var tempX = x; - - if (Chassis.Outputs[tempX] != null) - { - VideoOutputFeedbacks[tempX] = new IntFeedback(() => { - if (Chassis.Outputs[tempX].VideoOutFeedback != null) - return (ushort)Chassis.Outputs[tempX].VideoOutFeedback.Number; - - return 0; - }); - AudioOutputFeedbacks[tempX] = new IntFeedback(() => { - if (Chassis.Outputs[tempX].AudioOutFeedback != null) - return (ushort)Chassis.Outputs[tempX].AudioOutFeedback.Number; - - return 0; - }); - UsbOutputRoutedToFeebacks[tempX] = new IntFeedback(() => { - if (Chassis.Outputs[tempX].USBRoutedToFeedback != null) - return (ushort)Chassis.Outputs[tempX].USBRoutedToFeedback.Number; - - return 0; - }); - - OutputNameFeedbacks[tempX] = new StringFeedback(() => { - if (Chassis.Outputs[tempX].NameFeedback != null) - return Chassis.Outputs[tempX].NameFeedback.StringValue; - - return ""; - }); - OutputVideoRouteNameFeedbacks[tempX] = new StringFeedback(() => { - if (Chassis.Outputs[tempX].VideoOutFeedback != null) - return Chassis.Outputs[tempX].VideoOutFeedback.NameFeedback.StringValue; - - return NoRouteText; - }); - OutputAudioRouteNameFeedbacks[tempX] = new StringFeedback(() => { - if (Chassis.Outputs[tempX].AudioOutFeedback != null) - return Chassis.Outputs[tempX].AudioOutFeedback.NameFeedback.StringValue; - - return NoRouteText; - }); - OutputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => Chassis.Outputs[tempX].EndpointOnlineFeedback); - - OutputDisabledByHdcpFeedbacks[tempX] = new BoolFeedback(() => { - var output = Chassis.Outputs[tempX]; - - var hdmiTxOutput = output as Card.HdmiTx; - if (hdmiTxOutput != null) - return hdmiTxOutput.HdmiOutput.DisabledByHdcp.BoolValue; - - var dmHdmiOutput = output as Card.DmHdmiOutput; - if (dmHdmiOutput != null) - return dmHdmiOutput.DisabledByHdcpFeedback.BoolValue; - - var dmsDmOutAdvanced = output as Card.DmsDmOutAdvanced; - if (dmsDmOutAdvanced != null) - return dmsDmOutAdvanced.DisabledByHdcpFeedback.BoolValue; - - var dmps3HdmiAudioOutput = output as Card.Dmps3HdmiAudioOutput; - if (dmps3HdmiAudioOutput != null) - return dmps3HdmiAudioOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue; - - var dmps3HdmiOutput = output as Card.Dmps3HdmiOutput; - if (dmps3HdmiOutput != null) - return dmps3HdmiOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue; - - var dmps3HdmiOutputBackend = output as Card.Dmps3HdmiOutputBackend; - if (dmps3HdmiOutputBackend != null) - return dmps3HdmiOutputBackend.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue; - - // var hdRx4kX10HdmiOutput = output as HdRx4kX10HdmiOutput; - // if (hdRx4kX10HdmiOutput != null) - // return hdRx4kX10HdmiOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue; - - // var hdMdNxMHdmiOutput = output as HdMdNxMHdmiOutput; - // if (hdMdNxMHdmiOutput != null) - // return hdMdNxMHdmiOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue; - - return false; - }); - OutputStreamCardStateFeedbacks[tempX] = new IntFeedback(() => - { - try - { - var outputCard = Chassis.Outputs[tempX]; - - if (outputCard.Card is DmcStroAV) - { - Debug.Console(2, "Found output stream card in slot: {0}.", tempX); - var streamCard = outputCard.Card as DmcStroAV; - if (streamCard.Control.StartFeedback.BoolValue == true) - return 1; - else if (streamCard.Control.StopFeedback.BoolValue == true) - return 2; - else if (streamCard.Control.PauseFeedback.BoolValue == true) - return 3; - else - return 0; - } - return 0; - } - catch (InvalidOperationException iopex) - { - Debug.Console(0, this, Debug.ErrorLogLevel.Warning, "Error adding output stream card in slot: {0}. Error: {1}", tempX, iopex); - return 0; - } - }); - } - - if (Chassis.Inputs[tempX] != null) - { - UsbInputRoutedToFeebacks[tempX] = new IntFeedback(() => { - if (Chassis.Inputs[tempX].USBRoutedToFeedback != null) - return (ushort)Chassis.Inputs[tempX].USBRoutedToFeedback.Number; - - return 0; - }); - VideoInputSyncFeedbacks[tempX] = new BoolFeedback(() => { - if (Chassis.Inputs[tempX].VideoDetectedFeedback != null) - return Chassis.Inputs[tempX].VideoDetectedFeedback.BoolValue; - - return false; - }); - InputNameFeedbacks[tempX] = new StringFeedback(() => { - if (Chassis.Inputs[tempX].NameFeedback != null) - return Chassis.Inputs[tempX].NameFeedback.StringValue; - - return ""; - }); - - InputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => { return Chassis.Inputs[tempX].EndpointOnlineFeedback; }); - - InputCardHdcpStateFeedbacks[tempX] = new IntFeedback(() => { - try - { - var inputCard = Chassis.Inputs[tempX]; - - if (inputCard.Card is DmcHd) - { - InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport; - - if ((inputCard.Card as DmcHd).HdmiInput.HdcpSupportOnFeedback.BoolValue) - return 1; - return 0; - } - - if (inputCard.Card is DmcHdDsp) - { - InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport; - - if ((inputCard.Card as DmcHdDsp).HdmiInput.HdcpSupportOnFeedback.BoolValue) - return 1; - return 0; - } - if (inputCard.Card is Dmc4kHdBase) - { - InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support; - return (int)(inputCard.Card as Dmc4kHdBase).HdmiInput.HdcpReceiveCapability; - } - if (inputCard.Card is Dmc4kHdDspBase) - { - if (PropertiesConfig.InputSlotSupportsHdcp2[tempX]) - { - InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support; - return (int)(inputCard.Card as Dmc4kHdDspBase).HdmiInput.HdcpReceiveCapability; - } - - InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport; - if ((inputCard.Card as Dmc4kHdDspBase).HdmiInput.HdcpSupportOnFeedback.BoolValue) - return 1; - return 0; - } - - if (inputCard.Card is Dmc4kCBase) - { - if (PropertiesConfig.InputSlotSupportsHdcp2[tempX]) - { - InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport; - return (int)(inputCard.Card as Dmc4kCBase).DmInput.HdcpReceiveCapability; - } - - if ((inputCard.Card as Dmc4kCBase).DmInput.HdcpSupportOnFeedback.BoolValue) - return 1; - return 0; - } - if (inputCard.Card is Dmc4kCDspBase) - { - if (PropertiesConfig.InputSlotSupportsHdcp2[tempX]) - { - InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport; - return (int)(inputCard.Card as Dmc4kCDspBase).DmInput.HdcpReceiveCapability; - } - - if ((inputCard.Card as Dmc4kCDspBase).DmInput.HdcpSupportOnFeedback.BoolValue) - return 1; - - return 0; - } - return 0; - } - catch (InvalidOperationException iopex) - { - Debug.Console(0, this, Debug.ErrorLogLevel.Warning, "The Input Card in slot: {0} supports HDCP 2. Please update the configuration value in the inputCardSupportsHdcp2 object to true. Error: {1}", tempX, iopex); - return 0; - } - }); - InputStreamCardStateFeedbacks[tempX] = new IntFeedback(() => - { - try - { - var inputCard = Chassis.Inputs[tempX]; - - if (inputCard.Card is DmcStr) - { - Debug.Console(2, "Found input stream card in slot: {0}.", tempX); - var streamCard = inputCard.Card as DmcStr; - if (streamCard.Control.StartFeedback.BoolValue == true) - return 1; - else if (streamCard.Control.StopFeedback.BoolValue == true) - return 2; - else if (streamCard.Control.PauseFeedback.BoolValue == true) - return 3; - else - return 0; - } - return 0; - } - catch (InvalidOperationException iopex) - { - Debug.Console(0, this, Debug.ErrorLogLevel.Warning, "Error adding input stream card in slot: {0}. Error: {1}", tempX, iopex); - return 0; - } - }); - } - } - } - - private void ChassisOnBaseEvent(GenericBase device, BaseEventArgs args) - { - - } - - private void RegisterForInputResolutionFeedback(IVideoAttributesBasic input, uint number, RoutingInputPortWithVideoStatuses inputPort) - { - if (input == null) - { - return; - } - - Debug.Console(1, this, "Registering for resolution feedback for input {0} using Routing Port {1}", number, inputPort.Key); - - input.VideoAttributes.AttributeChange += (sender, args) => - { - Debug.Console(1, this, "Input {0} resolution updated", number); - - Debug.Console(1, this, "Updating resolution feedback for input {0}", number); - inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate(); - }; - } - - /// - /// - /// - /// - /// - public void AddInputCard(string type, uint number) - { - Debug.Console(2, this, "Adding input card '{0}', slot {1}", type, number); - - type = type.ToLower(); - - switch (type) - { - case "dmchd": - { - var inputCard = new DmcHd(number, Chassis); - AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput); - } - break; - case "dmchddsp": - { - var inputCard = new DmcHdDsp(number, Chassis); - AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput); - } - break; - case "dmc4khd": - { - var inputCard = new Dmc4kHd(number, Chassis); - AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput); - } - break; - case "dmc4khddsp": - { - var inputCard = new Dmc4kHdDsp(number, Chassis); - AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput); - } - break; - case "dmc4kzhd": - { - var inputCard = new Dmc4kzHd(number, Chassis); - AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput); - break; - } - case "dmc4kzhddsp": - { - var inputCard = new Dmc4kzHdDsp(number, Chassis); - AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput); - break; - } - case "dmcc": - { - var inputCard = new DmcC(number, Chassis); - //DmInput doesn't implement ICec...cast was resulting in null anyway - AddDmInCardPorts(number, null, inputCard.DmInput); - } - break; - case "dmccdsp": - { - var inputCard = new DmcCDsp(number, Chassis); - //DmInput doesn't implement ICec...cast was resulting in null anyway - AddDmInCardPorts(number, null, inputCard.DmInput); - break; - } - - case "dmc4kc": - { - var inputCard = new Dmc4kC(number, Chassis); - AddDmInCardPorts(number, inputCard.DmInput,inputCard.DmInput); - break; - } - - case "dmc4kcdsp": - { - var inputCard = new Dmc4kCDsp(number, Chassis); - AddDmInCardPorts(number, inputCard.DmInput,inputCard.DmInput); - break; - } - - case "dmc4kzc": - { - var inputCard = new Dmc4kzC(number, Chassis); - AddDmInCardPorts(number, inputCard.DmInput,inputCard.DmInput); - break; - } - - case "dmc4kzcdsp": - { - var inputCard = new Dmc4kzCDsp(number, Chassis); - AddDmInCardPorts(number, inputCard.DmInput, inputCard.DmInput); - break; - } - - case "dmccat": - { - var inputCard = new DmcCat(number, Chassis); - AddDmInCardPorts(number, null, inputCard.DmInput); - break; - } - case "dmccatdsp": - { - var inputCard = new DmcCatDsp(number, Chassis); - AddDmInCardPorts(number, null, inputCard.DmInput); - break; - } - case "dmcs": - { - var inputCard = new DmcS(number, Chassis); - AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber, null, inputCard.DmInput); - AddInCardHdmiAndAudioLoopPorts(number); - break; - } - case "dmcsdsp": - { - var inputCard = new DmcSDsp(number, Chassis); - AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber, null, inputCard.DmInput); - AddInCardHdmiAndAudioLoopPorts(number); - break; - } - case "dmcs2": - { - var inputCard = new DmcS2(number, Chassis); - AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber, null, inputCard.DmInput); - AddInCardHdmiAndAudioLoopPorts(number); - break; - } - case "dmcs2dsp": - { - var inputCard = new DmcS2Dsp(number, Chassis); - AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber, null, inputCard.DmInput); - AddInCardHdmiAndAudioLoopPorts(number); - break; - } - case "dmcsdi": - { - var inputCard = new DmcSdi(number, Chassis); - AddInputPortWithDebug(number, "sdiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Sdi, null, inputCard.SdiInput); - AddOutputPortWithDebug(string.Format("inputCard{0}", number), "sdiOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Sdi, null); - AddInCardHdmiAndAudioLoopPorts(number); - break; - } - case "dmcdvi": - { - var inputCard = new DmcDvi(number, Chassis); - AddInputPortWithDebug(number, "dviIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Dvi, null, inputCard.DviInput); - AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio); - AddInCardHdmiLoopPort(number); - break; - } - case "dmcvga": - { - var inputCard = new DmcVga(number, Chassis); - AddInputPortWithDebug(number, "vgaIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, null, inputCard.VgaInput); - AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio); - AddInCardHdmiLoopPort(number); - break; - } - case "dmcvidbnc": - { - var inputCard = new DmcVidBnc(number, Chassis); - AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component, null, inputCard.VideoInput); - AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio); - AddInCardHdmiLoopPort(number); - break; - } - case "dmcvidrcaa": - { - var inputCard = new DmcVidRcaA(number, Chassis); - AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component, null, inputCard.VideoInput); - AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio); - AddInCardHdmiLoopPort(number); - break; - } - case "dmcvidrcad": - { - var inputCard = new DmcVidRcaD(number, Chassis); - AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component, null, inputCard.VideoInput); - AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.DigitalAudio); - AddInCardHdmiLoopPort(number); - break; - } - case "dmcvid4": - { - var inputCard = new DmcVid4(number, Chassis); - AddInputPortWithDebug(number, "compositeIn1", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite); - AddInputPortWithDebug(number, "compositeIn2", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite); - AddInputPortWithDebug(number, "compositeIn3", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite); - AddInputPortWithDebug(number, "compositeIn4", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite); - AddInCardHdmiLoopPort(number); - break; - } - case "dmcstr": - { - var inputCard = new DmcStr(number, Chassis); - AddInputPortWithDebug(number, "streamIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming, null, inputCard.Source); - AddInCardHdmiAndAudioLoopPorts(number); - break; - } - } - } - - void AddDmInCardPorts(uint number) - { - AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat); - AddInCardHdmiAndAudioLoopPorts(number); - } - - void AddDmInCardPorts(uint number, ICec cecPort) - { - AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, cecPort); - AddInCardHdmiAndAudioLoopPorts(number); - } - - void AddDmInCardPorts(uint number, ICec cecPort, IVideoAttributesBasic videoAttributes) - { - AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, cecPort, videoAttributes); - AddInCardHdmiAndAudioLoopPorts(number); - } - - void AddHdmiInCardPorts(uint number, ICec cecPort) - { - AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort); - AddInCardHdmiAndAudioLoopPorts(number); - } - - void AddHdmiInCardPorts(uint number, ICec cecPort, IVideoAttributesBasic videoAttributes) - { - AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort, videoAttributes); - AddInCardHdmiAndAudioLoopPorts(number); - } - - void AddInCardHdmiAndAudioLoopPorts(uint number) - { - AddOutputPortWithDebug(string.Format("inputCard{0}", number), "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, null); - AddOutputPortWithDebug(string.Format("inputCard{0}", number), "audioLoopOut", eRoutingSignalType.Audio, eRoutingPortConnectionType.Hdmi, null); - } - - void AddInCardHdmiLoopPort(uint number) - { - AddOutputPortWithDebug(string.Format("inputCard{0}", number), "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, null); - } - - /// - /// - /// - /// - /// - public void AddOutputCard(string type, uint number) - { - type = type.ToLower(); - - Debug.Console(2, this, "Adding output card '{0}', slot {1}", type, number); - switch (type) - { - case "dmc4khdo": - { - var outputCard = new Dmc4kHdoSingle(number, Chassis); - var cecPort1 = outputCard.Card1.HdmiOutput; - var cecPort2 = outputCard.Card2.HdmiOutput; - AddDmcHdoPorts(number, cecPort1, cecPort2); - } - break; - case "dmc4kzhdo": - { - var outputCard = new Dmc4kzHdoSingle(number, Chassis); - var cecPort1 = outputCard.Card1.HdmiOutput; - var cecPort2 = outputCard.Card2.HdmiOutput; - AddDmcHdoPorts(number, cecPort1, cecPort2); - } - break; - case "dmchdo": - { - var outputCard = new DmcHdoSingle(number, Chassis); - var cecPort1 = outputCard.Card1.HdmiOutput; - var cecPort2 = outputCard.Card2.HdmiOutput; - AddDmcHdoPorts(number, cecPort1, cecPort2); - } - break; - case "dmc4kcohd": - { - var outputCard = new Dmc4kCoHdSingle(number, Chassis); - var cecPort1 = outputCard.Card1.HdmiOutput; - AddDmcCoPorts(number, cecPort1); - } - break; - case "dmc4kzcohd": - { - var outputCard = new Dmc4kzCoHdSingle(number, Chassis); - var cecPort1 = outputCard.Card1.HdmiOutput; - AddDmcCoPorts(number, cecPort1); - } - break; - case "dmccohd": - { - var outputCard = new DmcCoHdSingle(number, Chassis); - var cecPort1 = outputCard.Card1.HdmiOutput; - AddDmcCoPorts(number, cecPort1); - } - break; - case "dmccatohd": - { - var outputCard = new DmcCatoHdSingle(number, Chassis); - var cecPort1 = outputCard.Card1.HdmiOutput; - AddDmcCoPorts(number, cecPort1); - } - break; - case "dmcsohd": - { - var outputCard = new DmcSoHdSingle(number, Chassis); - var cecPort1 = outputCard.Card1.HdmiOutput; - AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.DmMmFiber, Chassis.Outputs[2 * (number - 1) + 1]); - AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, Chassis.Outputs[2 * (number - 1) + 1], cecPort1); - AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.DmMmFiber, Chassis.Outputs[2 * (number - 1) + 2]); - } - break; - case "dmcs2ohd": - { - var outputCard = new DmcS2oHdSingle(number, Chassis); - var cecPort1 = outputCard.Card1.HdmiOutput; - AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.DmSmFiber, Chassis.Outputs[2 * (number - 1) + 1]); - AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, Chassis.Outputs[2 * (number - 1) + 1], cecPort1); - AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.DmSmFiber, Chassis.Outputs[2 * (number - 1) + 2]); - } - break; - case "dmcstro": - AddOutputPortWithDebug(string.Format("outputCard{0}", number), "streamOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Streaming, Chassis.Outputs[2 * (number - 1) + 1]); - break; - default: - Debug.Console(1, this, " WARNING: Output card type '{0}' is not available", type); - break; - } - } - - void AddDmcHdoPorts(uint number, ICec cecPort1, ICec cecPort2) - { - AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, Chassis.Outputs[2 * (number - 1) + 1], cecPort1); - AddOutputPortWithDebug(string.Format("outputCard{0}", number), "audioOut1", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio, - Chassis.Outputs[2 * (number - 1) + 1]); - AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, Chassis.Outputs[2 * (number - 1) + 2], cecPort2); - AddOutputPortWithDebug(string.Format("outputCard{0}", number), "audioOut2", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio, - Chassis.Outputs[2 * (number - 1) + 2]); - } - - void AddDmcCoPorts(uint number, ICec cecPort1) - { - AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.DmCat, Chassis.Outputs[2 * (number - 1) + 1]); - AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, Chassis.Outputs[2 * (number - 1) + 1], cecPort1); - AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.DmCat, Chassis.Outputs[2 * (number - 1) + 2]); - } - - /// - /// Adds InputPort - /// - void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType) - { - //Cast is necessary here to determine the correct overload - AddInputPortWithDebug(cardNum, portName, sigType, portType, null, null); - } - - private void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, - eRoutingPortConnectionType portType, ICec cecPort) - { - //Cast is necessary here to determine the correct overload - AddInputPortWithDebug(cardNum, portName, sigType, portType, cecPort, null); - } - - /// - /// Adds InputPort and sets Port as ICec object. If videoAttributesBasic is defined, RoutingPort will be RoutingInputPortWithVideoStatuses - /// - void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, ICec cecPort, IVideoAttributesBasic videoAttributesBasic) - { - var portKey = string.Format("inputCard{0}--{1}", cardNum, portName); - Debug.Console(2, this, "Adding input port '{0}'", portKey); - - RoutingInputPort inputPort; - - if (videoAttributesBasic != null) - { - Debug.Console(1, this, "card {0} supports IVideoAttributesBasic", cardNum); - var statusFuncs = new VideoStatusFuncsWrapper - { - VideoResolutionFeedbackFunc = () => - { - var resolution = videoAttributesBasic.VideoAttributes.GetVideoResolutionString(); - Debug.Console(1, this, "Updating resolution for input {0}. New resolution: {1}", cardNum, resolution); - return resolution; - } - }; - inputPort = new RoutingInputPortWithVideoStatuses(portKey, sigType, portType, - Chassis.Inputs[cardNum], this, statusFuncs) - { - FeedbackMatchObject = Chassis.Inputs[cardNum] - }; - - RegisterForInputResolutionFeedback(videoAttributesBasic, cardNum, inputPort as RoutingInputPortWithVideoStatuses); - } - else - { - inputPort = new RoutingInputPort(portKey, sigType, portType, - Chassis.Inputs[cardNum], this) - { - FeedbackMatchObject = Chassis.Inputs[cardNum] - }; - } - - if (cecPort != null) - inputPort.Port = cecPort; - - InputPorts.Add(inputPort); - } - - /// - /// Adds OutputPort - /// - void AddOutputPortWithDebug(string cardName, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector) - { - AddOutputPortWithDebug(cardName, portName, sigType, portType, selector, null); - } - - /// - /// Adds OutputPort and sets Port as ICec object - /// - void AddOutputPortWithDebug(string cardName, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector, ICec cecPort) - { - var portKey = string.Format("{0}--{1}", cardName, portName); - Debug.Console(2, this, "Adding output port '{0}'", portKey); - var outputPort = new RoutingOutputPort(portKey, sigType, portType, selector, this); - - if (portName.IndexOf("Loop", StringComparison.InvariantCultureIgnoreCase) < 0) - { - outputPort.FeedbackMatchObject = selector; - } - if (cecPort != null) - outputPort.Port = cecPort; - - OutputPorts.Add(outputPort); - } - - /// - /// - /// - void AddVolumeControl(uint number, Audio.Output audio) - { - VolumeControls.Add(number, new DmCardAudioOutputController(audio)); - } - - //public void SetInputHdcpSupport(uint input, ePdtHdcpSupport hdcpSetting) - //{ - - //} - - void Chassis_DMSystemChange(Switch device, DMSystemEventArgs args) - { - switch (args.EventId) - { - case DMSystemEventIds.SystemIdEventId: - { - Debug.Console(2, this, "SystemIdEvent Value: {0}", (Chassis as DmMDMnxn).SystemIdFeedback.UShortValue); - SystemIdFeebdack.FireUpdate(); - break; - } - case DMSystemEventIds.SystemIdBusyEventId: - { - Debug.Console(2, this, "SystemIdBusyEvent State: {0}", (Chassis as DmMDMnxn).SystemIdBusy.BoolValue); - SystemIdBusyFeedback.FireUpdate(); - break; - } - case DMSystemEventIds.AudioBreakawayEventId: - { - Debug.Console(2, this, "AudioBreakaway Event: value: {0}", - (Chassis as DmMDMnxn).EnableAudioBreakawayFeedback.BoolValue); - EnableAudioBreakawayFeedback.FireUpdate(); - break; - } - case DMSystemEventIds.USBBreakawayEventId: - { - Debug.Console(2, this, "USBBreakaway Event: value: {0}", - (Chassis as DmMDMnxn).EnableUSBBreakawayFeedback.BoolValue); - EnableUsbBreakawayFeedback.FireUpdate(); - break; - } - } - } - - void Chassis_DMInputChange(Switch device, DMInputEventArgs args) - { - try - { - switch (args.EventId) - { - case DMInputEventIds.EndpointOnlineEventId: - { - Debug.Console(2, this, "DM Input EndpointOnlineEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback); - InputEndpointOnlineFeedbacks[args.Number].FireUpdate(); - break; - } - case DMInputEventIds.OnlineFeedbackEventId: - { - Debug.Console(2, this, "DM Input OnlineFeedbackEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback); - InputEndpointOnlineFeedbacks[args.Number].FireUpdate(); - break; - } - case DMInputEventIds.VideoDetectedEventId: - { - Debug.Console(2, this, "DM Input {0} VideoDetectedEventId", args.Number); - VideoInputSyncFeedbacks[args.Number].FireUpdate(); - break; - } - case DMInputEventIds.InputNameEventId: - { - Debug.Console(2, this, "DM Input {0} NameFeedbackEventId", args.Number); - InputNameFeedbacks[args.Number].FireUpdate(); - break; - } - case DMInputEventIds.UsbRoutedToEventId: - { - Debug.Console(2, this, "DM Input {0} UsbRoutedToEventId", args.Number); - if (UsbInputRoutedToFeebacks[args.Number] != null) - UsbInputRoutedToFeebacks[args.Number].FireUpdate(); - else - Debug.Console(1, this, "No index of {0} found in UsbInputRoutedToFeedbacks"); - break; - } - case DMInputEventIds.HdcpCapabilityFeedbackEventId: - { - Debug.Console(2, this, "DM Input {0} HdcpCapabilityFeedbackEventId", args.Number); - if (InputCardHdcpStateFeedbacks[args.Number] != null) - InputCardHdcpStateFeedbacks[args.Number].FireUpdate(); - else - Debug.Console(1, this, "No index of {0} found in InputCardHdcpCapabilityFeedbacks"); - break; - } - case DMInputEventIds.HdcpSupportOffEventId: - { - Debug.Console(2, this, "DM Input {0} HdcpSupportOffEventId", args.Number); - if (InputCardHdcpStateFeedbacks[args.Number] != null) - InputCardHdcpStateFeedbacks[args.Number].FireUpdate(); - else - Debug.Console(1, this, "No index of {0} found in InputCardHdcpCapabilityFeedbacks"); - break; - } - case DMInputEventIds.HdcpSupportOnEventId: - { - Debug.Console(2, this, "DM Input {0} HdcpSupportOnEventId", args.Number); - if (InputCardHdcpStateFeedbacks[args.Number] != null) - InputCardHdcpStateFeedbacks[args.Number].FireUpdate(); - else - Debug.Console(1, this, "No index of {0} found in InputCardHdcpCapabilityFeedbacks"); - break; - } - case DMInputEventIds.StartEventId: - case DMInputEventIds.StopEventId: - case DMInputEventIds.PauseEventId: - { - Debug.Console(2, this, "DM Input {0} Stream Status EventId", args.Number); - if (InputStreamCardStateFeedbacks[args.Number] != null) - { - InputStreamCardStateFeedbacks[args.Number].FireUpdate(); - } - else - Debug.Console(2, this, "No index of {0} found in InputStreamCardStateFeedbacks"); - break; - } - case DMInputEventIds.HorizontalResolutionFeedbackEventId: - case DMInputEventIds.VerticalResolutionFeedbackEventId: - case DMInputEventIds.FramesPerSecondFeedbackEventId: - case DMInputEventIds.ResolutionEventId: - { - Debug.Console(1, this, "Input {0} resolution updated", args.Number); - var inputPort = - InputPorts.Cast() - .FirstOrDefault((ip) => ip.Key.Contains(String.Format("inputCard{0}", args.Number))); - - if (inputPort != null) - { - Debug.Console(1, this, "Updating resolution feedback for input {0}", args.Number); - inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate(); - } - break; - } - default: - { - Debug.Console(2, this, "DMInputChange fired for Input {0} with Unhandled EventId: {1}", args.Number, args.EventId); - break; - } - } - } - catch (Exception ex) - { - Debug.Console(2, this, Debug.ErrorLogLevel.Error, "Error in Chassis_DMInputChange: {0}", ex); - } - } - - /// - /// - /// Raise an event when the status of a switch object changes. - /// - /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType - private void OnSwitchChange(RoutingNumericEventArgs e) - { - var newEvent = NumericSwitchChange; - if (newEvent != null) newEvent(this, e); - } - - /// - /// - void Chassis_DMOutputChange(Switch device, DMOutputEventArgs args) - { - var output = args.Number; - - switch (args.EventId) - { - case DMOutputEventIds.VolumeEventId: - { - if (VolumeControls.ContainsKey(output)) - { - VolumeControls[args.Number].VolumeEventFromChassis(); - } - - break; - } - case DMOutputEventIds.EndpointOnlineEventId: - { - Debug.Console(2, this, "Output {0} DMOutputEventIds.EndpointOnlineEventId fired. State: {1}", args.Number, - Chassis.Outputs[output].EndpointOnlineFeedback); - OutputEndpointOnlineFeedbacks[output].FireUpdate(); - break; - } - case DMOutputEventIds.OnlineFeedbackEventId: - { - Debug.Console(2, this, "Output {0} DMInputEventIds.OnlineFeedbackEventId fired. State: {1}", args.Number, - Chassis.Outputs[output].EndpointOnlineFeedback); - OutputEndpointOnlineFeedbacks[output].FireUpdate(); - break; - } - case DMOutputEventIds.VideoOutEventId: - { - - var inputNumber = Chassis.Outputs[output].VideoOutFeedback == null ? 0 : Chassis. - Outputs[output].VideoOutFeedback.Number; - - Debug.Console(2, this, "DMSwitchVideo:{0} Routed Input:{1} Output:{2}'", Name, inputNumber, output); - - if (VideoOutputFeedbacks.ContainsKey(output)) - { - var localInputPort = InputPorts.FirstOrDefault(p => (DMInput)p.FeedbackMatchObject == Chassis.Outputs[output].VideoOutFeedback); - var localOutputPort = - OutputPorts.FirstOrDefault(p => (DMOutput) p.FeedbackMatchObject == Chassis.Outputs[output]); - - - VideoOutputFeedbacks[output].FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(output, - inputNumber, - localOutputPort, - localInputPort, - eRoutingSignalType.Video)); - } - - if (OutputVideoRouteNameFeedbacks.ContainsKey(output)) - OutputVideoRouteNameFeedbacks[output].FireUpdate(); - - break; - } - case DMOutputEventIds.AudioOutEventId: - { - var inputNumber = Chassis.Outputs[output].AudioOutFeedback == null ? 0 : Chassis. - Outputs[output].AudioOutFeedback.Number; - - Debug.Console(2, this, "DMSwitchAudio:{0} Routed Input:{1} Output:{2}'", Name, inputNumber, output); - - if (AudioOutputFeedbacks.ContainsKey(output)) - { - var localInputPort = InputPorts.FirstOrDefault(p => (DMInput)p.FeedbackMatchObject == Chassis.Outputs[output].AudioOutFeedback); - var localOutputPort = - OutputPorts.FirstOrDefault(p => (DMOutput)p.FeedbackMatchObject == Chassis.Outputs[output]); - - - AudioOutputFeedbacks[output].FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(output, - inputNumber, - localOutputPort, - localInputPort, - eRoutingSignalType.Audio)); - } - - if (OutputAudioRouteNameFeedbacks.ContainsKey(output)) - OutputAudioRouteNameFeedbacks[output].FireUpdate(); - - break; - } - case DMOutputEventIds.OutputNameEventId: - { - Debug.Console(2, this, "DM Output {0} NameFeedbackEventId", output); - OutputNameFeedbacks[output].FireUpdate(); - break; - } - case DMOutputEventIds.UsbRoutedToEventId: - { - Debug.Console(2, this, "DM Output {0} UsbRoutedToEventId", args.Number); - UsbOutputRoutedToFeebacks[args.Number].FireUpdate(); - break; - } - case DMOutputEventIds.DisabledByHdcpEventId: - { - Debug.Console(2, this, "DM Output {0} DisabledByHdcpEventId", args.Number); - OutputDisabledByHdcpFeedbacks[args.Number].FireUpdate(); - break; - } - case DMOutputEventIds.StartEventId: - case DMOutputEventIds.StopEventId: - case DMOutputEventIds.PauseEventId: - { - Debug.Console(2, this, "DM Output {0} Stream Status EventId", args.Number); - if (OutputStreamCardStateFeedbacks[args.Number] != null) - { - OutputStreamCardStateFeedbacks[args.Number].FireUpdate(); - } - else - Debug.Console(2, this, "No index of {0} found in OutputStreamCardStateFeedbacks"); - break; - } - default: - { - Debug.Console(2, this, "DMOutputChange fired for Output {0} with Unhandled EventId: {1}", args.Number, args.EventId); - break; - } - } - } - - /// - /// - /// - /// - void StartOffTimer(PortNumberType pnt) - { - if (RouteOffTimers.ContainsKey(pnt)) - return; - RouteOffTimers[pnt] = new CTimer(o => ExecuteSwitch(null, pnt.Selector, pnt.Type), RouteOffTime); - } - - // Send out sigs when coming online - void IsOnline_OutputChange(object sender, EventArgs e) - { - if (IsOnline.BoolValue) - { - (Chassis as DmMDMnxn).EnableAudioBreakaway.BoolValue = true; - (Chassis as DmMDMnxn).EnableUSBBreakaway.BoolValue = true; - - - EnableAudioBreakawayFeedback.FireUpdate(); - EnableUsbBreakawayFeedback.FireUpdate(); - - if (InputNames != null) - foreach (var kvp in InputNames) - Chassis.Inputs[kvp.Key].Name.StringValue = kvp.Value; - if (OutputNames != null) - foreach (var kvp in OutputNames) - Chassis.Outputs[kvp.Key].Name.StringValue = kvp.Value; - } - } - - #region IRouting Members - public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType sigType) - { - Debug.Console(2, this, "Making an awesome DM route from {0} to {1} {2}", inputSelector, outputSelector, sigType); - - var input = inputSelector as DMInput;//Input Selector could be null... - - var output = outputSelector as DMOutput; - - var isUsbInput = (sigType & eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput; - var isUsbOutput = (sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput; - - if (output == null && !(isUsbOutput || isUsbInput)) - { - Debug.Console(0, this, Debug.ErrorLogLevel.Warning, - "Unable to execute switch for inputSelector {0} to outputSelector {1}", inputSelector, - outputSelector); - return; - } - - // Check to see if there's an off timer waiting on this and if so, cancel - var key = new PortNumberType(output, sigType); - if (input == null) - { - StartOffTimer(key); - } - else - { - if (RouteOffTimers.ContainsKey(key)) - { - Debug.Console(2, this, "{0} cancelling route off due to new source", output); - RouteOffTimers[key].Stop(); - RouteOffTimers.Remove(key); - } - } - - //var inCard = input == 0 ? null : Chassis.Inputs[input]; - //var outCard = input == 0 ? null : Chassis.Outputs[output]; - - // NOTE THAT BITWISE COMPARISONS - TO CATCH ALL ROUTING TYPES - if ((sigType & eRoutingSignalType.Video) == eRoutingSignalType.Video) - { - Chassis.VideoEnter.BoolValue = true; - if (output != null) - { - output.VideoOut = input; //Chassis.Outputs[output].VideoOut = inCard; - } - } - - if ((sigType & eRoutingSignalType.Audio) == eRoutingSignalType.Audio) - { - var dmMdMnxn = Chassis as DmMDMnxn; - if (dmMdMnxn != null) - { - dmMdMnxn.AudioEnter.BoolValue = true; - } - if (output != null) - { - output.AudioOut = input; - } - } - - if ((sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput) - - { - Chassis.USBEnter.BoolValue = true; - if (inputSelector == null && output != null) - { - //clearing the route is intended - output.USBRoutedTo = null; - return; - } - - if (inputSelector != null && input == null) - { - //input selector is DMOutput...we're doing a out to out route - var tempInput = inputSelector as DMOutput; - - if (tempInput == null || output == null) - { - return; - } - output.USBRoutedTo = tempInput; - return; - } - - if (input != null & output != null) - { - output.USBRoutedTo = input; - } - } - - if((sigType & eRoutingSignalType.UsbInput) != eRoutingSignalType.UsbInput) - { - return; - } - - Chassis.USBEnter.BoolValue = true; - if (output != null) - { - output.USBRoutedTo = input; - return; - } - var tempOutput = outputSelector as DMInput; - - if (tempOutput == null) - { - Debug.Console(0, this, Debug.ErrorLogLevel.Warning, - "Unable to execute switch for inputSelector {0} to outputSelector {1}", inputSelector, - outputSelector); - return; - } - - tempOutput.USBRoutedTo = input; - } - - #endregion - - #region IRoutingNumeric Members - - public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType sigType) - { - var chassisSize = (uint)Chassis.NumberOfInputs; //need this to determine USB routing values 8x8 -> 1-8 is inputs 1-8, 17-24 is outputs 1-8 - //16x16 1-16 is inputs 1-16, 17-32 is outputs 1-16 - //32x32 1-32 is inputs 1-32, 33-64 is outputs 1-32 - - DMInputOutputBase dmCard; - - //Routing Input to Input or Output to Input - if ((sigType & eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput) - { - Debug.Console(2, this, "Executing USB Input switch.\r\n in:{0} output: {1}", inputSelector, outputSelector); - if (outputSelector > chassisSize) - { - uint outputIndex; - - if (chassisSize == 8) - { - outputIndex = (uint) inputSelector - 16; - } - else - { - outputIndex = inputSelector - chassisSize; - } - dmCard = Chassis.Outputs[outputIndex]; - } - else - { - dmCard = Chassis.Inputs[inputSelector]; - } - - ExecuteSwitch(dmCard, Chassis.Inputs[outputSelector], sigType); - return; - } - if ((sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput) - { - Debug.Console(2, this, "Executing USB Output switch.\r\n in:{0} output: {1}", inputSelector, outputSelector); - - //routing Output to Output or Input to Output - if (inputSelector > chassisSize) - { - //wanting to route an output to an output. Subtract chassis size and get output, unless it's 8x8 - //need this to determine USB routing values - //8x8 -> 1-8 is inputs 1-8, 17-24 is outputs 1-8 - //16x16 1-16 is inputs 1-16, 17-32 is outputs 1-16 - //32x32 1-32 is inputs 1-32, 33-64 is outputs 1-32 - uint outputIndex; - - if (chassisSize == 8) - { - outputIndex = (uint) inputSelector - 16; - } - else - { - outputIndex = inputSelector - chassisSize; - } - - dmCard = Chassis.Outputs[outputIndex]; - } - else - { - dmCard = Chassis.Inputs[inputSelector]; - } - Chassis.USBEnter.BoolValue = true; - - Debug.Console(2, this, "Routing USB for input {0} to {1}", inputSelector, dmCard); - ExecuteSwitch(dmCard, Chassis.Outputs[outputSelector], sigType); - return; - } - - var inputCard = inputSelector == 0 ? null : Chassis.Inputs[inputSelector]; - var outputCard = Chassis.Outputs[outputSelector]; - - ExecuteSwitch(inputCard, outputCard, sigType); - } - - #endregion - - public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - var joinMap = GetJoinMap(joinStart, joinMapKey, bridge); - - Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - - LinkChassisToApi(trilist, joinMap); - - trilist.StringInput[joinMap.Name.JoinNumber].StringValue = this.Name; - - // Link up inputs & outputs - for (uint i = 1; i <= Chassis.NumberOfOutputs; i++) - { - var ioSlot = i; - var ioSlotJoin = ioSlot - 1; - - LinkRoutingJoinsToApi(trilist, joinMap, ioSlotJoin, ioSlot); - - if (TxDictionary.ContainsKey(ioSlot)) - { - LinkTxToApi(trilist, ioSlot, joinMap, ioSlotJoin); - } - else - { - LinkHdmiInputToApi(trilist, ioSlot, joinMap, ioSlotJoin); - LinkStreamInputToApi(trilist, ioSlot, joinMap, ioSlotJoin); - } - - if (RxDictionary.ContainsKey(ioSlot)) - { - LinkRxToApi(trilist, ioSlot, joinMap, ioSlotJoin); - } - else - LinkStreamOutputToApi(trilist, ioSlot, joinMap, ioSlotJoin); - } - } - - private void LinkHdmiInputToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, uint ioSlotJoin) - { - VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]); - - var inputPort = InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)]; - if (inputPort == null) - { - return; - } - - Debug.Console(1, "Port value for input card {0} is set", ioSlot); - var port = inputPort.Port; - - if (port == null) - { - return; - } - if (!(port is HdmiInputWithCEC)) - { - Debug.Console(0, this, "HDMI Input port on card {0} does not support HDCP settings.", ioSlot); - return; - } - - Debug.Console(1, "Port is HdmiInputWithCec"); - - var hdmiInPortWCec = port as HdmiInputWithCEC; - - - SetHdcpStateAction(PropertiesConfig.InputSlotSupportsHdcp2[ioSlot], hdmiInPortWCec, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist); - - - InputCardHdcpStateFeedbacks[ioSlot].LinkInputSig( - trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]); - - if (InputCardHdcpCapabilityTypes.ContainsKey(ioSlot)) - { - trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = - (ushort)InputCardHdcpCapabilityTypes[ioSlot]; - } - else - { - trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = 1; - } - - var videoStatus = inputPort as RoutingInputPortWithVideoStatuses; - - if (videoStatus == null) - { - return; - } - - Debug.Console(1, this, "Linking {0} to join {1} for resolution feedback.", videoStatus.Key, joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin); - videoStatus.VideoStatus.VideoResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin]); - } - - private void LinkStreamInputToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, uint ioSlotJoin) - { - var inputPort = InputPorts[string.Format("inputCard{0}--streamIn", ioSlot)]; - if (inputPort == null) - { - return; - } - var streamCard = Chassis.Inputs[ioSlot].Card as DmcStr; - var join = joinMap.InputStreamCardState.JoinNumber + ioSlotJoin; - - Debug.Console(1, "Port value for input card {0} is set as a stream card", ioSlot); - - trilist.SetUShortSigAction(join, s => - { - if (s == 1) - { - Debug.Console(2, this, "Join {0} value {1}: Setting stream state to start", join, s); - streamCard.Control.Start(); - } - else if (s == 2) - { - Debug.Console(2, this, "Join {0} value {1}: Setting stream state to stop", join, s); - streamCard.Control.Stop(); - } - else if (s == 3) - { - Debug.Console(2, this, "Join {0} value {1}: Setting stream state to pause", join, s); - streamCard.Control.Pause(); - } - else - { - Debug.Console(2, this, "Join {0} value {1}: Ignore stream state", join, s); - } - }); - - InputStreamCardStateFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[join]); - - trilist.UShortInput[join].UShortValue = InputStreamCardStateFeedbacks[ioSlot].UShortValue; - - var videoStatus = inputPort as RoutingInputPortWithVideoStatuses; - - if (videoStatus != null) - { - videoStatus.VideoStatus.VideoResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin]); - } - } - - private void LinkStreamOutputToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, uint ioSlotJoin) - { - var outputPort = OutputPorts[string.Format("outputCard{0}--streamOut", ioSlot)]; - if (outputPort == null) - { - return; - } - var streamCard = Chassis.Outputs[ioSlot].Card as DmcStroAV; - var join = joinMap.OutputStreamCardState.JoinNumber + ioSlotJoin; - - Debug.Console(1, "Port value for output card {0} is set as a stream card", ioSlot); - - trilist.SetUShortSigAction(join, s => - { - if (s == 1) - { - Debug.Console(2, this, "Join {0} value {1}: Setting stream state to start", join, s); - streamCard.Control.Start(); - } - else if (s == 2) - { - Debug.Console(2, this, "Join {0} value {1}: Setting stream state to stop", join, s); - streamCard.Control.Stop(); - } - else if (s == 3) - { - Debug.Console(2, this, "Join {0} value {1}: Setting stream state to pause", join, s); - streamCard.Control.Pause(); - } - else - { - Debug.Console(2, this, "Join {0} value {1}: Ignore stream state", join, s); - } - }); - - OutputStreamCardStateFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[join]); - - trilist.UShortInput[join].UShortValue = OutputStreamCardStateFeedbacks[ioSlot].UShortValue; - } - - private void LinkRxToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, uint ioSlotJoin) - { - Debug.Console(2, "Creating Rx Feedbacks {0}", ioSlot); - var rxKey = RxDictionary[ioSlot]; - var rxDevice = DeviceManager.GetDeviceForKey(rxKey) as DmRmcControllerBase; - var hdBaseTDevice = DeviceManager.GetDeviceForKey(rxKey) as DmHdBaseTControllerBase; - if (Chassis is DmMd8x8Cpu3 || Chassis is DmMd8x8Cpu3rps - || Chassis is DmMd16x16Cpu3 || Chassis is DmMd16x16Cpu3rps - || Chassis is DmMd32x32Cpu3 || Chassis is DmMd32x32Cpu3rps || hdBaseTDevice != null) - { - OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig( - trilist.BooleanInput[joinMap.OutputEndpointOnline.JoinNumber + ioSlotJoin]); - } - else if (rxDevice != null) - { - rxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline.JoinNumber + ioSlotJoin]); - } - } - - private void LinkTxToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, uint ioSlotJoin) - { - Debug.Console(1, "Setting up actions and feedbacks on input card {0}", ioSlot); - VideoInputSyncFeedbacks[ioSlot].LinkInputSig( - trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]); - - Debug.Console(2, "Creating Tx Feedbacks {0}", ioSlot); - var txKey = TxDictionary[ioSlot]; - var txDevice = DeviceManager.GetDeviceForKey(txKey) as BasicDmTxControllerBase; - - if (txDevice == null) - { - return; - } - - LinkTxOnlineFeedbackToApi(trilist, ioSlot, joinMap, ioSlotJoin, txDevice); - - LinkBasicTxToApi(trilist, joinMap, ioSlot, ioSlotJoin, txDevice); - - LinkAdvancedTxToApi(trilist, joinMap, ioSlot, ioSlotJoin, txDevice); - } - - private void LinkBasicTxToApi(BasicTriList trilist, DmChassisControllerJoinMap joinMap, uint ioSlot, - uint ioSlotJoin, BasicDmTxControllerBase basicTransmitter) - { - var advTx = basicTransmitter as DmTxControllerBase; - - if (advTx != null) - { - return; - } - var inputPort = InputPorts[string.Format("inputCard{0}--dmIn", ioSlot)]; - - if (inputPort == null) - { - return; - } - var port = inputPort.Port; - - if (!(port is DMInputPortWithCec)) - { - Debug.Console(0, this, "DM Input port on card {0} does not support HDCP settings.", ioSlot); - return; - } - Debug.Console(1, "Port is DMInputPortWithCec"); - - var dmInPortWCec = port as DMInputPortWithCec; - - bool supportsHdcp2; - - //added in case the InputSlotSupportsHdcp2 section isn't included in the config, or this slot is left out. - //if the key isn't in the dictionary, supportsHdcp2 will be false - - if(!PropertiesConfig.InputSlotSupportsHdcp2.TryGetValue(ioSlot, out supportsHdcp2)) - { - Debug.Console(0, this, Debug.ErrorLogLevel.Warning, - "Input Slot Supports HDCP2 setting not found for slot {0}. Setting to false. Program may not function as intended.", - ioSlot); - } - - SetHdcpStateAction(supportsHdcp2, dmInPortWCec, - joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist); - - InputCardHdcpStateFeedbacks[ioSlot].LinkInputSig( - trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]); - - if (InputCardHdcpCapabilityTypes.ContainsKey(ioSlot)) - { - trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = - (ushort) InputCardHdcpCapabilityTypes[ioSlot]; - } - else - { - trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = 1; - } - - var videoStatus = inputPort as RoutingInputPortWithVideoStatuses; - - if (videoStatus == null) - { - return; - } - Debug.Console(1, this, "Linking {0} to join {1} for resolution feedback.", videoStatus.Key, joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin); - videoStatus.VideoStatus.VideoResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin]); - } - - private void LinkAdvancedTxToApi(BasicTriList trilist, DmChassisControllerJoinMap joinMap, - uint ioSlot, uint ioSlotJoin, BasicDmTxControllerBase basicTransmitter) - { - var transmitter = basicTransmitter as DmTxControllerBase; - if (transmitter == null) return; - - trilist.BooleanInput[joinMap.TxAdvancedIsPresent.JoinNumber + ioSlotJoin].BoolValue = true; - - transmitter.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig( - trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]); - - var txRoutingInputs = transmitter as IRoutingInputs; - - if (txRoutingInputs == null) return; - - var inputPorts = - txRoutingInputs.InputPorts.Where( - (p) => p.Port is EndpointHdmiInput || p.Port is EndpointDisplayPortInput).ToList(); - - if (inputPorts.Count == 0) - { - Debug.Console(1, this, "No HDCP-capable input ports found on transmitter for slot {0}", ioSlot); - return; - } - - bool supportsHdcp2; - - if (!PropertiesConfig.InputSlotSupportsHdcp2.TryGetValue(ioSlot, out supportsHdcp2)) - { - Debug.Console(0, this, Debug.ErrorLogLevel.Warning, - "Input Slot Supports HDCP2 setting not found for slot {0}. Setting to false. Program may not function as intended.", - ioSlot); - } - - SetHdcpStateAction(supportsHdcp2, inputPorts, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist); - - if (transmitter.HdcpStateFeedback != null) - { - transmitter.HdcpStateFeedback.LinkInputSig( - trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]); - } - else - { - Debug.Console(2, this, "Transmitter Hdcp Feedback null. Linking to card's feedback"); - InputCardHdcpStateFeedbacks[ioSlot].LinkInputSig( - trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]); - } - - trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = - (ushort) transmitter.HdcpSupportCapability; - - - var videoStatus = - InputPorts[string.Format("inputCard{0}--dmIn", ioSlot)] as RoutingInputPortWithVideoStatuses; - - if (videoStatus == null) - { - return; - } - Debug.Console(1, this, "Linking {0} to join {1} for resolution feedback.", videoStatus.Key, - joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin); - videoStatus.VideoStatus.VideoResolutionFeedback.LinkInputSig( - trilist.StringInput[joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin]); - } - - private void LinkTxOnlineFeedbackToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, - uint ioSlotJoin, BasicDmTxControllerBase txDevice) - { - var advancedTxDevice = txDevice as DmTxControllerBase; - - if ((Chassis is DmMd8x8Cpu3 || Chassis is DmMd8x8Cpu3rps - || Chassis is DmMd16x16Cpu3 || Chassis is DmMd16x16Cpu3rps - || Chassis is DmMd32x32Cpu3 || Chassis is DmMd32x32Cpu3rps) || - advancedTxDevice == null) - { - Debug.Console(2, "Linking Tx Online Feedback from Input Card {0}", ioSlot); - InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig( - trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]); - return; - } - - Debug.Console(2, "Linking Tx Online Feedback from Advanced Transmitter at input {0}", ioSlot); - - advancedTxDevice.IsOnline.LinkInputSig( - trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]); - } - - private void LinkRoutingJoinsToApi(BasicTriList trilist, DmChassisControllerJoinMap joinMap, uint ioSlotJoin, - uint ioSlot) - { - // Routing Control - trilist.SetUShortSigAction(joinMap.OutputVideo.JoinNumber + ioSlotJoin, - o => ExecuteNumericSwitch(o, (ushort) ioSlot, eRoutingSignalType.Video)); - trilist.SetUShortSigAction(joinMap.OutputAudio.JoinNumber + ioSlotJoin, - o => ExecuteNumericSwitch(o, (ushort) ioSlot, eRoutingSignalType.Audio)); - trilist.SetUShortSigAction(joinMap.OutputUsb.JoinNumber + ioSlotJoin, - o => ExecuteNumericSwitch(o, (ushort) ioSlot, eRoutingSignalType.UsbOutput)); - trilist.SetUShortSigAction(joinMap.InputUsb.JoinNumber + ioSlotJoin, - o => ExecuteNumericSwitch(o, (ushort) ioSlot, eRoutingSignalType.UsbInput)); - - //Routing Feedbacks - VideoOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputVideo.JoinNumber + ioSlotJoin]); - AudioOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputAudio.JoinNumber + ioSlotJoin]); - UsbOutputRoutedToFeebacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputUsb.JoinNumber + ioSlotJoin]); - UsbInputRoutedToFeebacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.InputUsb.JoinNumber + ioSlotJoin]); - - OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames.JoinNumber + ioSlotJoin]); - InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames.JoinNumber + ioSlotJoin]); - OutputVideoRouteNameFeedbacks[ioSlot].LinkInputSig( - trilist.StringInput[joinMap.OutputCurrentVideoInputNames.JoinNumber + ioSlotJoin]); - OutputAudioRouteNameFeedbacks[ioSlot].LinkInputSig( - trilist.StringInput[joinMap.OutputCurrentAudioInputNames.JoinNumber + ioSlotJoin]); - - OutputDisabledByHdcpFeedbacks[ioSlot].LinkInputSig( - trilist.BooleanInput[joinMap.OutputDisabledByHdcp.JoinNumber + ioSlotJoin]); - } - - private void LinkChassisToApi(BasicTriList trilist, DmChassisControllerJoinMap joinMap) - { - var chassis = Chassis as DmMDMnxn; - - IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); - - trilist.SetUShortSigAction(joinMap.SystemId.JoinNumber, o => - { - if (chassis != null) - { - chassis.SystemId.UShortValue = o; - } - }); - - trilist.SetSigTrueAction(joinMap.SystemId.JoinNumber, () => - { - if (chassis != null) - { - chassis.ApplySystemId(); - } - }); - - SystemIdFeebdack.LinkInputSig(trilist.UShortInput[joinMap.SystemId.JoinNumber]); - SystemIdBusyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.SystemId.JoinNumber]); - - EnableAudioBreakawayFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableAudioBreakaway.JoinNumber]); - EnableUsbBreakawayFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsbBreakaway.JoinNumber]); - - trilist.SetString(joinMap.NoRouteName.JoinNumber, NoRouteText); - - trilist.OnlineStatusChange += (o, a) => - { - if (!a.DeviceOnLine) - { - return; - } - - EnableAudioBreakawayFeedback.FireUpdate(); - EnableUsbBreakawayFeedback.FireUpdate(); - SystemIdBusyFeedback.FireUpdate(); - SystemIdFeebdack.FireUpdate(); - - trilist.SetString(joinMap.NoRouteName.JoinNumber, NoRouteText); - }; - } - - private DmChassisControllerJoinMap GetJoinMap(uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - var joinMap = new DmChassisControllerJoinMap(joinStart); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - { - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - } - - if (bridge != null) - { - bridge.AddJoinMap(Key, joinMap); - } - else - { - Debug.Console(0, this, - "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); - } - return joinMap; - } - - private void SetHdcpStateAction(bool supportsHdcp2, HdmiInputWithCEC port, uint join, BasicTriList trilist) - { - if (!supportsHdcp2) - { - trilist.SetUShortSigAction(join, - s => - { - if (s == 0) - { - Debug.Console(2, this, "Join {0} value {1} Setting HdcpSupport to off", join, s); - port.HdcpSupportOff(); - } - else if (s > 0) - { - Debug.Console(2, this, "Join {0} value {1} Setting HdcpSupport to on", join, s); - port.HdcpSupportOn(); - } - }); - } - else - { - trilist.SetUShortSigAction(join, - u => - { - Debug.Console(2, this, "Join {0} value {1} Setting HdcpReceiveCapability to: {2}", join, u, (eHdcpCapabilityType)u); - port.HdcpReceiveCapability = (eHdcpCapabilityType)u; - }); - } - } - - private void SetHdcpStateAction(bool supportsHdcp2, EndpointHdmiInput port, uint join, BasicTriList trilist) - { - if (!supportsHdcp2) - { - trilist.SetUShortSigAction(join, - s => - { - if (s == 0) - { - Debug.Console(2, this, "Join {0} value {1} Setting HdcpSupport to off", join, s); - port.HdcpSupportOff(); - } - else if (s > 0) - { - Debug.Console(2, this, "Join {0} value {1} Setting HdcpSupport to on", join, s); - port.HdcpSupportOn(); - } - }); - } - else - { - trilist.SetUShortSigAction(join, - u => - { - Debug.Console(2, this, "Join {0} value {1} Setting HdcpReceiveCapability to: {2}", join, u, (eHdcpCapabilityType)u); - port.HdcpCapability = (eHdcpCapabilityType)u; - }); - } - } - - private void SetHdcpStateAction(bool supportsHdcp2, List ports, uint join, - BasicTriList triList) - { - if (!supportsHdcp2) - { - triList.SetUShortSigAction(join, a => - { - foreach (var tempPort in ports.Select(port => port.Port).OfType()) - { - if (a == 0) - { - tempPort.HdcpSupportOff(); - } - else if (a > 0) - { - tempPort.HdcpSupportOn(); - } - } - }); - } - else - { - triList.SetUShortSigAction(join, a => - { - foreach (var tempPort in ports.Select(port => port.Port).OfType()) - { - tempPort.HdcpCapability = (eHdcpCapabilityType) a; - } - }); - } - } - - private void SetHdcpStateAction(bool supportsHdcp2, DMInputPortWithCec port, uint join, BasicTriList trilist) - { - if (!supportsHdcp2) - { - trilist.SetUShortSigAction(join, - s => - { - if (s == 0) - { - port.HdcpSupportOff(); - } - else if (s > 0) - { - port.HdcpSupportOn(); - } - }); - } - else - { - trilist.SetUShortSigAction(join, - u => - { - port.HdcpReceiveCapability = (eHdcpCapabilityType)u; - }); - } - } - } - - public struct PortNumberType - { - public uint Number { get; private set; } - public object Selector { get; private set; } - public eRoutingSignalType Type { get; private set; } - - public PortNumberType(object selector, eRoutingSignalType type) - : this() - { - Selector = selector; - Type = type; - - if (Selector is DMOutput) - { - Number = (selector as DMOutput).Number; - } - else if (Selector is uint) - { - Number = (uint) selector; - } - } - } - - public class DmChassisControllerFactory : EssentialsDeviceFactory - { - public DmChassisControllerFactory() - { - TypeNames = new List() { "dmmd8x8", "dmmd8x8rps", "dmmd8x8cpu3", "dmmd8x8cpu3rps", - "dmmd16x16", "dmmd16x16rps", "dmmd16x16cpu3", "dmmd16x16cpu3rps", - "dmmd32x32", "dmmd32x32rps", "dmmd32x32cpu3", "dmmd32x32cpu3rps", - "dmmd64x64", "dmmd128x128" }; - } - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - var type = dc.Type.ToLower(); - - Debug.Console(1, "Factory Attempting to create new DmChassisController Device"); - - if (type.StartsWith("dmmd8x") || type.StartsWith("dmmd16x") || type.StartsWith("dmmd32x")) - { - - var props = JsonConvert.DeserializeObject - (dc.Properties.ToString()); - return DmChassisController. - GetDmChassisController(dc.Key, dc.Name, type, props); - } - else if (type.StartsWith("dmmd128x") || type.StartsWith("dmmd64x")) - { - var props = JsonConvert.DeserializeObject - (dc.Properties.ToString()); - return DmBladeChassisController. - GetDmChassisController(dc.Key, dc.Name, type, props); - } - - return null; - } - } - +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using Crestron.SimplSharp; +using Crestron.SimplSharp.Reflection; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.DM; +using Crestron.SimplSharpPro.DM.Cards; +using Crestron.SimplSharpPro.DM.Endpoints; +using Crestron.SimplSharpProInternal; +using Full.Newtonsoft.Json; +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.DM.Config; +using PepperDash.Essentials.Core.Config; + +namespace PepperDash.Essentials.DM +{ + /// + /// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions + /// + /// + [Description("Wrapper class for all DM-MD chassis variants from 8x8 to 32x32")] + public class DmChassisController : CrestronGenericBridgeableBaseDevice, IDmSwitch, IRoutingNumericWithFeedback + { + private const string NonePortKey = "inputCard0--None"; + public DMChassisPropertiesConfig PropertiesConfig { get; set; } + + public Switch Chassis { get; private set; } + + //IroutingNumericEvent + public event EventHandler NumericSwitchChange; + + // Feedbacks for EssentialDM + public Dictionary VideoOutputFeedbacks { get; private set; } + public Dictionary AudioOutputFeedbacks { get; private set; } + public Dictionary VideoInputSyncFeedbacks { get; private set; } + public Dictionary InputEndpointOnlineFeedbacks { get; private set; } + public Dictionary OutputEndpointOnlineFeedbacks { get; private set; } + public Dictionary InputNameFeedbacks { get; private set; } + public Dictionary OutputNameFeedbacks { get; private set; } + public Dictionary OutputVideoRouteNameFeedbacks { get; private set; } + public Dictionary OutputAudioRouteNameFeedbacks { get; private set; } + public Dictionary UsbOutputRoutedToFeebacks { get; private set; } + public Dictionary UsbInputRoutedToFeebacks { get; private set; } + public Dictionary OutputDisabledByHdcpFeedbacks { get; private set; } + + public IntFeedback SystemIdFeebdack { get; private set; } + public BoolFeedback SystemIdBusyFeedback { get; private set; } + public BoolFeedback EnableAudioBreakawayFeedback { get; private set; } + public BoolFeedback EnableUsbBreakawayFeedback { get; private set; } + + public Dictionary InputCardHdcpStateFeedbacks { get; private set; } + public Dictionary InputStreamCardStateFeedbacks { get; private set; } + public Dictionary OutputStreamCardStateFeedbacks { get; private set; } + + public Dictionary InputCardHdcpCapabilityTypes { get; private set; } + + // Need a couple Lists of generic Backplane ports + public RoutingPortCollection InputPorts { get; private set; } + public RoutingPortCollection OutputPorts { get; private set; } + + public Dictionary TxDictionary { get; set; } + public Dictionary RxDictionary { get; set; } + + //public Dictionary InputCards { get; private set; } + //public Dictionary OutputCards { get; private set; } + + public Dictionary InputNames { get; set; } + public Dictionary OutputNames { get; set; } + public Dictionary VolumeControls { get; private set; } + + public const int RouteOffTime = 500; + Dictionary RouteOffTimers = new Dictionary(); + + /// + /// Text that represents when an output has no source routed to it + /// + public string NoRouteText = ""; + + /// + /// Factory method to create a new chassis controller from config data. Limited to 8x8 right now + /// + public static DmChassisController GetDmChassisController(string key, string name, + string type, DMChassisPropertiesConfig properties) + { + try + { + type = type.ToLower(); + uint ipid = properties.Control.IpIdInt; + + DmMDMnxn chassis = null; + switch (type) { + case "dmmd8x8": + chassis = new DmMd8x8(ipid, Global.ControlSystem); + break; + case "dmmd8x8rps": + chassis = new DmMd8x8rps(ipid, Global.ControlSystem); + break; + case "dmmd8x8cpu3": + chassis = new DmMd8x8Cpu3(ipid, Global.ControlSystem); + break; + case "dmmd8x8cpu3rps": + chassis = new DmMd8x8Cpu3rps(ipid, Global.ControlSystem); + break; + case "dmmd16x16": + chassis = new DmMd16x16(ipid, Global.ControlSystem); + break; + case "dmmd16x16rps": + chassis = new DmMd16x16rps(ipid, Global.ControlSystem); + break; + case "dmmd16x16cpu3": + chassis = new DmMd16x16Cpu3(ipid, Global.ControlSystem); + break; + case "dmmd16x16cpu3rps": + chassis = new DmMd16x16Cpu3rps(ipid, Global.ControlSystem); + break; + case "dmmd32x32": + chassis = new DmMd32x32(ipid, Global.ControlSystem); + break; + case "dmmd32x32rps": + chassis = new DmMd32x32rps(ipid, Global.ControlSystem); + break; + case "dmmd32x32cpu3": + chassis = new DmMd32x32Cpu3(ipid, Global.ControlSystem); + break; + case "dmmd32x32cpu3rps": + chassis = new DmMd32x32Cpu3rps(ipid, Global.ControlSystem); + break; + } + + if (chassis == null) + return null; + + var controller = new DmChassisController(key, name, chassis); + + // + var clearInputPort = new RoutingInputPort(NonePortKey, eRoutingSignalType.AudioVideo, + eRoutingPortConnectionType.None, null, controller); + + controller.InputPorts.Add(clearInputPort); + + // add the cards and port names + foreach (var kvp in properties.InputSlots) + controller.AddInputCard(kvp.Value, kvp.Key); + + foreach (var kvp in properties.OutputSlots) + controller.AddOutputCard(kvp.Value, kvp.Key); + + foreach (var kvp in properties.VolumeControls) + { + // get the card + // check it for an audio-compatible type + // make a something-something that will make it work + // retire to mountain village + var outNum = kvp.Key; + var card = controller.Chassis.Outputs[outNum].Card; + Audio.Output audio = null; + if (card is DmcHdo) + audio = (card as DmcHdo).Audio; + else if (card is Dmc4kHdo) + audio = (card as Dmc4kHdo).Audio; + if (audio == null) + continue; + + // wire up the audio to something here... + controller.AddVolumeControl(outNum, audio); + } + + controller.InputNames = properties.InputNames; + controller.OutputNames = properties.OutputNames; + + if (!string.IsNullOrEmpty(properties.NoRouteText)) + { + controller.NoRouteText = properties.NoRouteText; + Debug.Console(1, controller, "Setting No Route Text value to: {0}", controller.NoRouteText); + } + else + { + Debug.Console(1, controller, "NoRouteText not specified. Defaulting to blank string.", controller.NoRouteText); + } + + controller.PropertiesConfig = properties; + return controller; + } + catch (Exception e) + { + Debug.Console(0, "Error creating DM chassis:\r{0}", e); + } + + return null; + } + + /// + /// + /// + /// + /// + /// + public DmChassisController(string key, string name, DmMDMnxn chassis) + : base(key, name, chassis) + { + + Chassis = chassis; + InputPorts = new RoutingPortCollection(); + OutputPorts = new RoutingPortCollection(); + VolumeControls = new Dictionary(); + TxDictionary = new Dictionary(); + RxDictionary = new Dictionary(); + IsOnline.OutputChange += new EventHandler(IsOnline_OutputChange); + Chassis.DMInputChange += new DMInputEventHandler(Chassis_DMInputChange); + Chassis.DMSystemChange += new DMSystemEventHandler(Chassis_DMSystemChange); + Chassis.DMOutputChange += new DMOutputEventHandler(Chassis_DMOutputChange); + Chassis.BaseEvent += ChassisOnBaseEvent; + VideoOutputFeedbacks = new Dictionary(); + AudioOutputFeedbacks = new Dictionary(); + UsbOutputRoutedToFeebacks = new Dictionary(); + UsbInputRoutedToFeebacks = new Dictionary(); + OutputDisabledByHdcpFeedbacks = new Dictionary(); + VideoInputSyncFeedbacks = new Dictionary(); + InputNameFeedbacks = new Dictionary(); + OutputNameFeedbacks = new Dictionary(); + OutputVideoRouteNameFeedbacks = new Dictionary(); + OutputAudioRouteNameFeedbacks = new Dictionary(); + InputEndpointOnlineFeedbacks = new Dictionary(); + OutputEndpointOnlineFeedbacks = new Dictionary(); + + SystemIdFeebdack = new IntFeedback(() => { return (Chassis as DmMDMnxn).SystemIdFeedback.UShortValue; }); + SystemIdBusyFeedback = new BoolFeedback(() => { return (Chassis as DmMDMnxn).SystemIdBusy.BoolValue; }); + EnableAudioBreakawayFeedback = + new BoolFeedback(() => (Chassis as DmMDMnxn).EnableAudioBreakawayFeedback.BoolValue); + EnableUsbBreakawayFeedback = + new BoolFeedback(() => (Chassis as DmMDMnxn).EnableUSBBreakawayFeedback.BoolValue); + + InputCardHdcpStateFeedbacks = new Dictionary(); + InputStreamCardStateFeedbacks = new Dictionary(); + OutputStreamCardStateFeedbacks = new Dictionary(); + InputCardHdcpCapabilityTypes = new Dictionary(); + + for (uint x = 1; x <= Chassis.NumberOfOutputs; x++) + { + var tempX = x; + + if (Chassis.Outputs[tempX] != null) + { + VideoOutputFeedbacks[tempX] = new IntFeedback(() => { + if (Chassis.Outputs[tempX].VideoOutFeedback != null) + return (ushort)Chassis.Outputs[tempX].VideoOutFeedback.Number; + + return 0; + }); + AudioOutputFeedbacks[tempX] = new IntFeedback(() => { + if (Chassis.Outputs[tempX].AudioOutFeedback != null) + return (ushort)Chassis.Outputs[tempX].AudioOutFeedback.Number; + + return 0; + }); + UsbOutputRoutedToFeebacks[tempX] = new IntFeedback(() => { + if (Chassis.Outputs[tempX].USBRoutedToFeedback != null) + return (ushort)Chassis.Outputs[tempX].USBRoutedToFeedback.Number; + + return 0; + }); + + OutputNameFeedbacks[tempX] = new StringFeedback(() => { + if (Chassis.Outputs[tempX].NameFeedback != null) + return Chassis.Outputs[tempX].NameFeedback.StringValue; + + return ""; + }); + OutputVideoRouteNameFeedbacks[tempX] = new StringFeedback(() => { + if (Chassis.Outputs[tempX].VideoOutFeedback != null) + return Chassis.Outputs[tempX].VideoOutFeedback.NameFeedback.StringValue; + + return NoRouteText; + }); + OutputAudioRouteNameFeedbacks[tempX] = new StringFeedback(() => { + if (Chassis.Outputs[tempX].AudioOutFeedback != null) + return Chassis.Outputs[tempX].AudioOutFeedback.NameFeedback.StringValue; + + return NoRouteText; + }); + OutputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => Chassis.Outputs[tempX].EndpointOnlineFeedback); + + OutputDisabledByHdcpFeedbacks[tempX] = new BoolFeedback(() => { + var output = Chassis.Outputs[tempX]; + + var hdmiTxOutput = output as Card.HdmiTx; + if (hdmiTxOutput != null) + return hdmiTxOutput.HdmiOutput.DisabledByHdcp.BoolValue; + + var dmHdmiOutput = output as Card.DmHdmiOutput; + if (dmHdmiOutput != null) + return dmHdmiOutput.DisabledByHdcpFeedback.BoolValue; + + var dmsDmOutAdvanced = output as Card.DmsDmOutAdvanced; + if (dmsDmOutAdvanced != null) + return dmsDmOutAdvanced.DisabledByHdcpFeedback.BoolValue; + + var dmps3HdmiAudioOutput = output as Card.Dmps3HdmiAudioOutput; + if (dmps3HdmiAudioOutput != null) + return dmps3HdmiAudioOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue; + + var dmps3HdmiOutput = output as Card.Dmps3HdmiOutput; + if (dmps3HdmiOutput != null) + return dmps3HdmiOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue; + + var dmps3HdmiOutputBackend = output as Card.Dmps3HdmiOutputBackend; + if (dmps3HdmiOutputBackend != null) + return dmps3HdmiOutputBackend.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue; + + // var hdRx4kX10HdmiOutput = output as HdRx4kX10HdmiOutput; + // if (hdRx4kX10HdmiOutput != null) + // return hdRx4kX10HdmiOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue; + + // var hdMdNxMHdmiOutput = output as HdMdNxMHdmiOutput; + // if (hdMdNxMHdmiOutput != null) + // return hdMdNxMHdmiOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue; + + return false; + }); + OutputStreamCardStateFeedbacks[tempX] = new IntFeedback(() => + { + try + { + var outputCard = Chassis.Outputs[tempX]; + + if (outputCard.Card is DmcStroAV) + { + Debug.Console(2, "Found output stream card in slot: {0}.", tempX); + var streamCard = outputCard.Card as DmcStroAV; + if (streamCard.Control.StartFeedback.BoolValue == true) + return 1; + else if (streamCard.Control.StopFeedback.BoolValue == true) + return 2; + else if (streamCard.Control.PauseFeedback.BoolValue == true) + return 3; + else + return 0; + } + return 0; + } + catch (InvalidOperationException iopex) + { + Debug.Console(0, this, Debug.ErrorLogLevel.Warning, "Error adding output stream card in slot: {0}. Error: {1}", tempX, iopex); + return 0; + } + }); + } + + if (Chassis.Inputs[tempX] != null) + { + UsbInputRoutedToFeebacks[tempX] = new IntFeedback(() => { + if (Chassis.Inputs[tempX].USBRoutedToFeedback != null) + return (ushort)Chassis.Inputs[tempX].USBRoutedToFeedback.Number; + + return 0; + }); + VideoInputSyncFeedbacks[tempX] = new BoolFeedback(() => { + if (Chassis.Inputs[tempX].VideoDetectedFeedback != null) + return Chassis.Inputs[tempX].VideoDetectedFeedback.BoolValue; + + return false; + }); + InputNameFeedbacks[tempX] = new StringFeedback(() => { + if (Chassis.Inputs[tempX].NameFeedback != null) + return Chassis.Inputs[tempX].NameFeedback.StringValue; + + return ""; + }); + + InputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => { return Chassis.Inputs[tempX].EndpointOnlineFeedback; }); + + InputCardHdcpStateFeedbacks[tempX] = new IntFeedback(() => { + try + { + var inputCard = Chassis.Inputs[tempX]; + + if (inputCard.Card is DmcHd) + { + InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport; + + if ((inputCard.Card as DmcHd).HdmiInput.HdcpSupportOnFeedback.BoolValue) + return 1; + return 0; + } + + if (inputCard.Card is DmcHdDsp) + { + InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport; + + if ((inputCard.Card as DmcHdDsp).HdmiInput.HdcpSupportOnFeedback.BoolValue) + return 1; + return 0; + } + if (inputCard.Card is Dmc4kHdBase) + { + InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support; + return (int)(inputCard.Card as Dmc4kHdBase).HdmiInput.HdcpReceiveCapability; + } + if (inputCard.Card is Dmc4kHdDspBase) + { + if (PropertiesConfig.InputSlotSupportsHdcp2[tempX]) + { + InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support; + return (int)(inputCard.Card as Dmc4kHdDspBase).HdmiInput.HdcpReceiveCapability; + } + + InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport; + if ((inputCard.Card as Dmc4kHdDspBase).HdmiInput.HdcpSupportOnFeedback.BoolValue) + return 1; + return 0; + } + + if (inputCard.Card is Dmc4kCBase) + { + if (PropertiesConfig.InputSlotSupportsHdcp2[tempX]) + { + InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport; + return (int)(inputCard.Card as Dmc4kCBase).DmInput.HdcpReceiveCapability; + } + + if ((inputCard.Card as Dmc4kCBase).DmInput.HdcpSupportOnFeedback.BoolValue) + return 1; + return 0; + } + if (inputCard.Card is Dmc4kCDspBase) + { + if (PropertiesConfig.InputSlotSupportsHdcp2[tempX]) + { + InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport; + return (int)(inputCard.Card as Dmc4kCDspBase).DmInput.HdcpReceiveCapability; + } + + if ((inputCard.Card as Dmc4kCDspBase).DmInput.HdcpSupportOnFeedback.BoolValue) + return 1; + + return 0; + } + return 0; + } + catch (InvalidOperationException iopex) + { + Debug.Console(0, this, Debug.ErrorLogLevel.Warning, "The Input Card in slot: {0} supports HDCP 2. Please update the configuration value in the inputCardSupportsHdcp2 object to true. Error: {1}", tempX, iopex); + return 0; + } + }); + InputStreamCardStateFeedbacks[tempX] = new IntFeedback(() => + { + try + { + var inputCard = Chassis.Inputs[tempX]; + + if (inputCard.Card is DmcStr) + { + Debug.Console(2, "Found input stream card in slot: {0}.", tempX); + var streamCard = inputCard.Card as DmcStr; + if (streamCard.Control.StartFeedback.BoolValue == true) + return 1; + else if (streamCard.Control.StopFeedback.BoolValue == true) + return 2; + else if (streamCard.Control.PauseFeedback.BoolValue == true) + return 3; + else + return 0; + } + return 0; + } + catch (InvalidOperationException iopex) + { + Debug.Console(0, this, Debug.ErrorLogLevel.Warning, "Error adding input stream card in slot: {0}. Error: {1}", tempX, iopex); + return 0; + } + }); + } + } + } + + private void ChassisOnBaseEvent(GenericBase device, BaseEventArgs args) + { + + } + + private void RegisterForInputResolutionFeedback(IVideoAttributesBasic input, uint number, RoutingInputPortWithVideoStatuses inputPort) + { + if (input == null) + { + return; + } + + Debug.Console(1, this, "Registering for resolution feedback for input {0} using Routing Port {1}", number, inputPort.Key); + + input.VideoAttributes.AttributeChange += (sender, args) => + { + Debug.Console(1, this, "Input {0} resolution updated", number); + + Debug.Console(1, this, "Updating resolution feedback for input {0}", number); + inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate(); + }; + } + + /// + /// + /// + /// + /// + public void AddInputCard(string type, uint number) + { + Debug.Console(2, this, "Adding input card '{0}', slot {1}", type, number); + + type = type.ToLower(); + + switch (type) + { + case "dmchd": + { + var inputCard = new DmcHd(number, Chassis); + AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput); + } + break; + case "dmchddsp": + { + var inputCard = new DmcHdDsp(number, Chassis); + AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput); + } + break; + case "dmc4khd": + { + var inputCard = new Dmc4kHd(number, Chassis); + AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput); + } + break; + case "dmc4khddsp": + { + var inputCard = new Dmc4kHdDsp(number, Chassis); + AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput); + } + break; + case "dmc4kzhd": + { + var inputCard = new Dmc4kzHd(number, Chassis); + AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput); + break; + } + case "dmc4kzhddsp": + { + var inputCard = new Dmc4kzHdDsp(number, Chassis); + AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput); + break; + } + case "dmcc": + { + var inputCard = new DmcC(number, Chassis); + //DmInput doesn't implement ICec...cast was resulting in null anyway + AddDmInCardPorts(number, null, inputCard.DmInput); + } + break; + case "dmccdsp": + { + var inputCard = new DmcCDsp(number, Chassis); + //DmInput doesn't implement ICec...cast was resulting in null anyway + AddDmInCardPorts(number, null, inputCard.DmInput); + break; + } + + case "dmc4kc": + { + var inputCard = new Dmc4kC(number, Chassis); + AddDmInCardPorts(number, inputCard.DmInput,inputCard.DmInput); + break; + } + + case "dmc4kcdsp": + { + var inputCard = new Dmc4kCDsp(number, Chassis); + AddDmInCardPorts(number, inputCard.DmInput,inputCard.DmInput); + break; + } + + case "dmc4kzc": + { + var inputCard = new Dmc4kzC(number, Chassis); + AddDmInCardPorts(number, inputCard.DmInput,inputCard.DmInput); + break; + } + + case "dmc4kzcdsp": + { + var inputCard = new Dmc4kzCDsp(number, Chassis); + AddDmInCardPorts(number, inputCard.DmInput, inputCard.DmInput); + break; + } + + case "dmccat": + { + var inputCard = new DmcCat(number, Chassis); + AddDmInCardPorts(number, null, inputCard.DmInput); + break; + } + case "dmccatdsp": + { + var inputCard = new DmcCatDsp(number, Chassis); + AddDmInCardPorts(number, null, inputCard.DmInput); + break; + } + case "dmcs": + { + var inputCard = new DmcS(number, Chassis); + AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber, null, inputCard.DmInput); + AddInCardHdmiAndAudioLoopPorts(number); + break; + } + case "dmcsdsp": + { + var inputCard = new DmcSDsp(number, Chassis); + AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber, null, inputCard.DmInput); + AddInCardHdmiAndAudioLoopPorts(number); + break; + } + case "dmcs2": + { + var inputCard = new DmcS2(number, Chassis); + AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber, null, inputCard.DmInput); + AddInCardHdmiAndAudioLoopPorts(number); + break; + } + case "dmcs2dsp": + { + var inputCard = new DmcS2Dsp(number, Chassis); + AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber, null, inputCard.DmInput); + AddInCardHdmiAndAudioLoopPorts(number); + break; + } + case "dmcsdi": + { + var inputCard = new DmcSdi(number, Chassis); + AddInputPortWithDebug(number, "sdiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Sdi, null, inputCard.SdiInput); + AddOutputPortWithDebug(string.Format("inputCard{0}", number), "sdiOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Sdi, null); + AddInCardHdmiAndAudioLoopPorts(number); + break; + } + case "dmcdvi": + { + var inputCard = new DmcDvi(number, Chassis); + AddInputPortWithDebug(number, "dviIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Dvi, null, inputCard.DviInput); + AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio); + AddInCardHdmiLoopPort(number); + break; + } + case "dmcvga": + { + var inputCard = new DmcVga(number, Chassis); + AddInputPortWithDebug(number, "vgaIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, null, inputCard.VgaInput); + AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio); + AddInCardHdmiLoopPort(number); + break; + } + case "dmcvidbnc": + { + var inputCard = new DmcVidBnc(number, Chassis); + AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component, null, inputCard.VideoInput); + AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio); + AddInCardHdmiLoopPort(number); + break; + } + case "dmcvidrcaa": + { + var inputCard = new DmcVidRcaA(number, Chassis); + AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component, null, inputCard.VideoInput); + AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio); + AddInCardHdmiLoopPort(number); + break; + } + case "dmcvidrcad": + { + var inputCard = new DmcVidRcaD(number, Chassis); + AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component, null, inputCard.VideoInput); + AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.DigitalAudio); + AddInCardHdmiLoopPort(number); + break; + } + case "dmcvid4": + { + var inputCard = new DmcVid4(number, Chassis); + AddInputPortWithDebug(number, "compositeIn1", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite); + AddInputPortWithDebug(number, "compositeIn2", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite); + AddInputPortWithDebug(number, "compositeIn3", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite); + AddInputPortWithDebug(number, "compositeIn4", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite); + AddInCardHdmiLoopPort(number); + break; + } + case "dmcstr": + { + var inputCard = new DmcStr(number, Chassis); + AddInputPortWithDebug(number, "streamIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming, null, inputCard.Source); + AddInCardHdmiAndAudioLoopPorts(number); + break; + } + } + } + + void AddDmInCardPorts(uint number) + { + AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat); + AddInCardHdmiAndAudioLoopPorts(number); + } + + void AddDmInCardPorts(uint number, ICec cecPort) + { + AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, cecPort); + AddInCardHdmiAndAudioLoopPorts(number); + } + + void AddDmInCardPorts(uint number, ICec cecPort, IVideoAttributesBasic videoAttributes) + { + AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, cecPort, videoAttributes); + AddInCardHdmiAndAudioLoopPorts(number); + } + + void AddHdmiInCardPorts(uint number, ICec cecPort) + { + AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort); + AddInCardHdmiAndAudioLoopPorts(number); + } + + void AddHdmiInCardPorts(uint number, ICec cecPort, IVideoAttributesBasic videoAttributes) + { + AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort, videoAttributes); + AddInCardHdmiAndAudioLoopPorts(number); + } + + void AddInCardHdmiAndAudioLoopPorts(uint number) + { + AddOutputPortWithDebug(string.Format("inputCard{0}", number), "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, null); + AddOutputPortWithDebug(string.Format("inputCard{0}", number), "audioLoopOut", eRoutingSignalType.Audio, eRoutingPortConnectionType.Hdmi, null); + } + + void AddInCardHdmiLoopPort(uint number) + { + AddOutputPortWithDebug(string.Format("inputCard{0}", number), "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, null); + } + + /// + /// + /// + /// + /// + public void AddOutputCard(string type, uint number) + { + type = type.ToLower(); + + Debug.Console(2, this, "Adding output card '{0}', slot {1}", type, number); + switch (type) + { + case "dmc4khdo": + { + var outputCard = new Dmc4kHdoSingle(number, Chassis); + var cecPort1 = outputCard.Card1.HdmiOutput; + var cecPort2 = outputCard.Card2.HdmiOutput; + AddDmcHdoPorts(number, cecPort1, cecPort2); + } + break; + case "dmc4kzhdo": + { + var outputCard = new Dmc4kzHdoSingle(number, Chassis); + var cecPort1 = outputCard.Card1.HdmiOutput; + var cecPort2 = outputCard.Card2.HdmiOutput; + AddDmcHdoPorts(number, cecPort1, cecPort2); + } + break; + case "dmchdo": + { + var outputCard = new DmcHdoSingle(number, Chassis); + var cecPort1 = outputCard.Card1.HdmiOutput; + var cecPort2 = outputCard.Card2.HdmiOutput; + AddDmcHdoPorts(number, cecPort1, cecPort2); + } + break; + case "dmc4kcohd": + { + var outputCard = new Dmc4kCoHdSingle(number, Chassis); + var cecPort1 = outputCard.Card1.HdmiOutput; + AddDmcCoPorts(number, cecPort1); + } + break; + case "dmc4kzcohd": + { + var outputCard = new Dmc4kzCoHdSingle(number, Chassis); + var cecPort1 = outputCard.Card1.HdmiOutput; + AddDmcCoPorts(number, cecPort1); + } + break; + case "dmccohd": + { + var outputCard = new DmcCoHdSingle(number, Chassis); + var cecPort1 = outputCard.Card1.HdmiOutput; + AddDmcCoPorts(number, cecPort1); + } + break; + case "dmccatohd": + { + var outputCard = new DmcCatoHdSingle(number, Chassis); + var cecPort1 = outputCard.Card1.HdmiOutput; + AddDmcCoPorts(number, cecPort1); + } + break; + case "dmcsohd": + { + var outputCard = new DmcSoHdSingle(number, Chassis); + var cecPort1 = outputCard.Card1.HdmiOutput; + AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.DmMmFiber, Chassis.Outputs[2 * (number - 1) + 1]); + AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, Chassis.Outputs[2 * (number - 1) + 1], cecPort1); + AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.DmMmFiber, Chassis.Outputs[2 * (number - 1) + 2]); + } + break; + case "dmcs2ohd": + { + var outputCard = new DmcS2oHdSingle(number, Chassis); + var cecPort1 = outputCard.Card1.HdmiOutput; + AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.DmSmFiber, Chassis.Outputs[2 * (number - 1) + 1]); + AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, Chassis.Outputs[2 * (number - 1) + 1], cecPort1); + AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.DmSmFiber, Chassis.Outputs[2 * (number - 1) + 2]); + } + break; + case "dmcstro": + AddOutputPortWithDebug(string.Format("outputCard{0}", number), "streamOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Streaming, Chassis.Outputs[2 * (number - 1) + 1]); + break; + default: + Debug.Console(1, this, " WARNING: Output card type '{0}' is not available", type); + break; + } + } + + void AddDmcHdoPorts(uint number, ICec cecPort1, ICec cecPort2) + { + AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, Chassis.Outputs[2 * (number - 1) + 1], cecPort1); + AddOutputPortWithDebug(string.Format("outputCard{0}", number), "audioOut1", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio, + Chassis.Outputs[2 * (number - 1) + 1]); + AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, Chassis.Outputs[2 * (number - 1) + 2], cecPort2); + AddOutputPortWithDebug(string.Format("outputCard{0}", number), "audioOut2", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio, + Chassis.Outputs[2 * (number - 1) + 2]); + } + + void AddDmcCoPorts(uint number, ICec cecPort1) + { + AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.DmCat, Chassis.Outputs[2 * (number - 1) + 1]); + AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, Chassis.Outputs[2 * (number - 1) + 1], cecPort1); + AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.DmCat, Chassis.Outputs[2 * (number - 1) + 2]); + } + + /// + /// Adds InputPort + /// + void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType) + { + //Cast is necessary here to determine the correct overload + AddInputPortWithDebug(cardNum, portName, sigType, portType, null, null); + } + + private void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, + eRoutingPortConnectionType portType, ICec cecPort) + { + //Cast is necessary here to determine the correct overload + AddInputPortWithDebug(cardNum, portName, sigType, portType, cecPort, null); + } + + /// + /// Adds InputPort and sets Port as ICec object. If videoAttributesBasic is defined, RoutingPort will be RoutingInputPortWithVideoStatuses + /// + void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, ICec cecPort, IVideoAttributesBasic videoAttributesBasic) + { + var portKey = string.Format("inputCard{0}--{1}", cardNum, portName); + Debug.Console(2, this, "Adding input port '{0}'", portKey); + + RoutingInputPort inputPort; + + if (videoAttributesBasic != null) + { + Debug.Console(1, this, "card {0} supports IVideoAttributesBasic", cardNum); + var statusFuncs = new VideoStatusFuncsWrapper + { + VideoResolutionFeedbackFunc = () => + { + var resolution = videoAttributesBasic.VideoAttributes.GetVideoResolutionString(); + Debug.Console(1, this, "Updating resolution for input {0}. New resolution: {1}", cardNum, resolution); + return resolution; + } + }; + inputPort = new RoutingInputPortWithVideoStatuses(portKey, sigType, portType, + Chassis.Inputs[cardNum], this, statusFuncs) + { + FeedbackMatchObject = Chassis.Inputs[cardNum] + }; + + RegisterForInputResolutionFeedback(videoAttributesBasic, cardNum, inputPort as RoutingInputPortWithVideoStatuses); + } + else + { + inputPort = new RoutingInputPort(portKey, sigType, portType, + Chassis.Inputs[cardNum], this) + { + FeedbackMatchObject = Chassis.Inputs[cardNum] + }; + } + + if (cecPort != null) + inputPort.Port = cecPort; + + InputPorts.Add(inputPort); + } + + /// + /// Adds OutputPort + /// + void AddOutputPortWithDebug(string cardName, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector) + { + AddOutputPortWithDebug(cardName, portName, sigType, portType, selector, null); + } + + /// + /// Adds OutputPort and sets Port as ICec object + /// + void AddOutputPortWithDebug(string cardName, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector, ICec cecPort) + { + var portKey = string.Format("{0}--{1}", cardName, portName); + Debug.Console(2, this, "Adding output port '{0}'", portKey); + var outputPort = new RoutingOutputPort(portKey, sigType, portType, selector, this); + + if (portName.IndexOf("Loop", StringComparison.InvariantCultureIgnoreCase) < 0) + { + outputPort.FeedbackMatchObject = selector; + } + if (cecPort != null) + outputPort.Port = cecPort; + + OutputPorts.Add(outputPort); + } + + /// + /// + /// + void AddVolumeControl(uint number, Audio.Output audio) + { + VolumeControls.Add(number, new DmCardAudioOutputController(audio)); + } + + //public void SetInputHdcpSupport(uint input, ePdtHdcpSupport hdcpSetting) + //{ + + //} + + void Chassis_DMSystemChange(Switch device, DMSystemEventArgs args) + { + switch (args.EventId) + { + case DMSystemEventIds.SystemIdEventId: + { + Debug.Console(2, this, "SystemIdEvent Value: {0}", (Chassis as DmMDMnxn).SystemIdFeedback.UShortValue); + SystemIdFeebdack.FireUpdate(); + break; + } + case DMSystemEventIds.SystemIdBusyEventId: + { + Debug.Console(2, this, "SystemIdBusyEvent State: {0}", (Chassis as DmMDMnxn).SystemIdBusy.BoolValue); + SystemIdBusyFeedback.FireUpdate(); + break; + } + case DMSystemEventIds.AudioBreakawayEventId: + { + Debug.Console(2, this, "AudioBreakaway Event: value: {0}", + (Chassis as DmMDMnxn).EnableAudioBreakawayFeedback.BoolValue); + EnableAudioBreakawayFeedback.FireUpdate(); + break; + } + case DMSystemEventIds.USBBreakawayEventId: + { + Debug.Console(2, this, "USBBreakaway Event: value: {0}", + (Chassis as DmMDMnxn).EnableUSBBreakawayFeedback.BoolValue); + EnableUsbBreakawayFeedback.FireUpdate(); + break; + } + } + } + + void Chassis_DMInputChange(Switch device, DMInputEventArgs args) + { + try + { + switch (args.EventId) + { + case DMInputEventIds.EndpointOnlineEventId: + { + Debug.Console(2, this, "DM Input EndpointOnlineEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback); + InputEndpointOnlineFeedbacks[args.Number].FireUpdate(); + break; + } + case DMInputEventIds.OnlineFeedbackEventId: + { + Debug.Console(2, this, "DM Input OnlineFeedbackEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback); + InputEndpointOnlineFeedbacks[args.Number].FireUpdate(); + break; + } + case DMInputEventIds.VideoDetectedEventId: + { + Debug.Console(2, this, "DM Input {0} VideoDetectedEventId", args.Number); + VideoInputSyncFeedbacks[args.Number].FireUpdate(); + break; + } + case DMInputEventIds.InputNameEventId: + { + Debug.Console(2, this, "DM Input {0} NameFeedbackEventId", args.Number); + InputNameFeedbacks[args.Number].FireUpdate(); + break; + } + case DMInputEventIds.UsbRoutedToEventId: + { + Debug.Console(2, this, "DM Input {0} UsbRoutedToEventId", args.Number); + if (UsbInputRoutedToFeebacks[args.Number] != null) + UsbInputRoutedToFeebacks[args.Number].FireUpdate(); + else + Debug.Console(1, this, "No index of {0} found in UsbInputRoutedToFeedbacks"); + break; + } + case DMInputEventIds.HdcpCapabilityFeedbackEventId: + { + Debug.Console(2, this, "DM Input {0} HdcpCapabilityFeedbackEventId", args.Number); + if (InputCardHdcpStateFeedbacks[args.Number] != null) + InputCardHdcpStateFeedbacks[args.Number].FireUpdate(); + else + Debug.Console(1, this, "No index of {0} found in InputCardHdcpCapabilityFeedbacks"); + break; + } + case DMInputEventIds.HdcpSupportOffEventId: + { + Debug.Console(2, this, "DM Input {0} HdcpSupportOffEventId", args.Number); + if (InputCardHdcpStateFeedbacks[args.Number] != null) + InputCardHdcpStateFeedbacks[args.Number].FireUpdate(); + else + Debug.Console(1, this, "No index of {0} found in InputCardHdcpCapabilityFeedbacks"); + break; + } + case DMInputEventIds.HdcpSupportOnEventId: + { + Debug.Console(2, this, "DM Input {0} HdcpSupportOnEventId", args.Number); + if (InputCardHdcpStateFeedbacks[args.Number] != null) + InputCardHdcpStateFeedbacks[args.Number].FireUpdate(); + else + Debug.Console(1, this, "No index of {0} found in InputCardHdcpCapabilityFeedbacks"); + break; + } + case DMInputEventIds.StartEventId: + case DMInputEventIds.StopEventId: + case DMInputEventIds.PauseEventId: + { + Debug.Console(2, this, "DM Input {0} Stream Status EventId", args.Number); + if (InputStreamCardStateFeedbacks[args.Number] != null) + { + InputStreamCardStateFeedbacks[args.Number].FireUpdate(); + } + else + Debug.Console(2, this, "No index of {0} found in InputStreamCardStateFeedbacks"); + break; + } + case DMInputEventIds.HorizontalResolutionFeedbackEventId: + case DMInputEventIds.VerticalResolutionFeedbackEventId: + case DMInputEventIds.FramesPerSecondFeedbackEventId: + case DMInputEventIds.ResolutionEventId: + { + Debug.Console(1, this, "Input {0} resolution updated", args.Number); + var inputPort = + InputPorts.Cast() + .FirstOrDefault((ip) => ip.Key.Contains(String.Format("inputCard{0}", args.Number))); + + if (inputPort != null) + { + Debug.Console(1, this, "Updating resolution feedback for input {0}", args.Number); + inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate(); + } + break; + } + default: + { + Debug.Console(2, this, "DMInputChange fired for Input {0} with Unhandled EventId: {1}", args.Number, args.EventId); + break; + } + } + } + catch (Exception ex) + { + Debug.Console(2, this, Debug.ErrorLogLevel.Error, "Error in Chassis_DMInputChange: {0}", ex); + } + } + + /// + /// + /// Raise an event when the status of a switch object changes. + /// + /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType + private void OnSwitchChange(RoutingNumericEventArgs e) + { + var newEvent = NumericSwitchChange; + if (newEvent != null) newEvent(this, e); + } + + /// + /// + void Chassis_DMOutputChange(Switch device, DMOutputEventArgs args) + { + var output = args.Number; + + switch (args.EventId) + { + case DMOutputEventIds.VolumeEventId: + { + if (VolumeControls.ContainsKey(output)) + { + VolumeControls[args.Number].VolumeEventFromChassis(); + } + + break; + } + case DMOutputEventIds.EndpointOnlineEventId: + { + Debug.Console(2, this, "Output {0} DMOutputEventIds.EndpointOnlineEventId fired. State: {1}", args.Number, + Chassis.Outputs[output].EndpointOnlineFeedback); + OutputEndpointOnlineFeedbacks[output].FireUpdate(); + break; + } + case DMOutputEventIds.OnlineFeedbackEventId: + { + Debug.Console(2, this, "Output {0} DMInputEventIds.OnlineFeedbackEventId fired. State: {1}", args.Number, + Chassis.Outputs[output].EndpointOnlineFeedback); + OutputEndpointOnlineFeedbacks[output].FireUpdate(); + break; + } + case DMOutputEventIds.VideoOutEventId: + { + + var inputNumber = Chassis.Outputs[output].VideoOutFeedback == null ? 0 : Chassis. + Outputs[output].VideoOutFeedback.Number; + + Debug.Console(2, this, "DMSwitchVideo:{0} Routed Input:{1} Output:{2}'", Name, inputNumber, output); + + if (VideoOutputFeedbacks.ContainsKey(output)) + { + var localInputPort = InputPorts.FirstOrDefault(p => (DMInput)p.FeedbackMatchObject == Chassis.Outputs[output].VideoOutFeedback); + var localOutputPort = + OutputPorts.FirstOrDefault(p => (DMOutput) p.FeedbackMatchObject == Chassis.Outputs[output]); + + + VideoOutputFeedbacks[output].FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(output, + inputNumber, + localOutputPort, + localInputPort, + eRoutingSignalType.Video)); + } + + if (OutputVideoRouteNameFeedbacks.ContainsKey(output)) + OutputVideoRouteNameFeedbacks[output].FireUpdate(); + + break; + } + case DMOutputEventIds.AudioOutEventId: + { + var inputNumber = Chassis.Outputs[output].AudioOutFeedback == null ? 0 : Chassis. + Outputs[output].AudioOutFeedback.Number; + + Debug.Console(2, this, "DMSwitchAudio:{0} Routed Input:{1} Output:{2}'", Name, inputNumber, output); + + if (AudioOutputFeedbacks.ContainsKey(output)) + { + var localInputPort = InputPorts.FirstOrDefault(p => (DMInput)p.FeedbackMatchObject == Chassis.Outputs[output].AudioOutFeedback); + var localOutputPort = + OutputPorts.FirstOrDefault(p => (DMOutput)p.FeedbackMatchObject == Chassis.Outputs[output]); + + + AudioOutputFeedbacks[output].FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(output, + inputNumber, + localOutputPort, + localInputPort, + eRoutingSignalType.Audio)); + } + + if (OutputAudioRouteNameFeedbacks.ContainsKey(output)) + OutputAudioRouteNameFeedbacks[output].FireUpdate(); + + break; + } + case DMOutputEventIds.OutputNameEventId: + { + Debug.Console(2, this, "DM Output {0} NameFeedbackEventId", output); + OutputNameFeedbacks[output].FireUpdate(); + break; + } + case DMOutputEventIds.UsbRoutedToEventId: + { + Debug.Console(2, this, "DM Output {0} UsbRoutedToEventId", args.Number); + UsbOutputRoutedToFeebacks[args.Number].FireUpdate(); + break; + } + case DMOutputEventIds.DisabledByHdcpEventId: + { + Debug.Console(2, this, "DM Output {0} DisabledByHdcpEventId", args.Number); + OutputDisabledByHdcpFeedbacks[args.Number].FireUpdate(); + break; + } + case DMOutputEventIds.StartEventId: + case DMOutputEventIds.StopEventId: + case DMOutputEventIds.PauseEventId: + { + Debug.Console(2, this, "DM Output {0} Stream Status EventId", args.Number); + if (OutputStreamCardStateFeedbacks[args.Number] != null) + { + OutputStreamCardStateFeedbacks[args.Number].FireUpdate(); + } + else + Debug.Console(2, this, "No index of {0} found in OutputStreamCardStateFeedbacks"); + break; + } + default: + { + Debug.Console(2, this, "DMOutputChange fired for Output {0} with Unhandled EventId: {1}", args.Number, args.EventId); + break; + } + } + } + + /// + /// + /// + /// + void StartOffTimer(PortNumberType pnt) + { + if (RouteOffTimers.ContainsKey(pnt)) + return; + RouteOffTimers[pnt] = new CTimer(o => ExecuteSwitch(null, pnt.Selector, pnt.Type), RouteOffTime); + } + + // Send out sigs when coming online + void IsOnline_OutputChange(object sender, EventArgs e) + { + if (IsOnline.BoolValue) + { + (Chassis as DmMDMnxn).EnableAudioBreakaway.BoolValue = true; + (Chassis as DmMDMnxn).EnableUSBBreakaway.BoolValue = true; + + + EnableAudioBreakawayFeedback.FireUpdate(); + EnableUsbBreakawayFeedback.FireUpdate(); + + if (InputNames != null) + foreach (var kvp in InputNames) + Chassis.Inputs[kvp.Key].Name.StringValue = kvp.Value; + if (OutputNames != null) + foreach (var kvp in OutputNames) + Chassis.Outputs[kvp.Key].Name.StringValue = kvp.Value; + } + } + + #region IRouting Members + public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType sigType) + { + Debug.Console(2, this, "Making an awesome DM route from {0} to {1} {2}", inputSelector, outputSelector, sigType); + + var input = inputSelector as DMInput;//Input Selector could be null... + + var output = outputSelector as DMOutput; + + var isUsbInput = (sigType & eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput; + var isUsbOutput = (sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput; + + if (output == null && !(isUsbOutput || isUsbInput)) + { + Debug.Console(0, this, Debug.ErrorLogLevel.Warning, + "Unable to execute switch for inputSelector {0} to outputSelector {1}", inputSelector, + outputSelector); + return; + } + + // Check to see if there's an off timer waiting on this and if so, cancel + var key = new PortNumberType(output, sigType); + if (input == null) + { + StartOffTimer(key); + } + else + { + if (RouteOffTimers.ContainsKey(key)) + { + Debug.Console(2, this, "{0} cancelling route off due to new source", output); + RouteOffTimers[key].Stop(); + RouteOffTimers.Remove(key); + } + } + + //var inCard = input == 0 ? null : Chassis.Inputs[input]; + //var outCard = input == 0 ? null : Chassis.Outputs[output]; + + // NOTE THAT BITWISE COMPARISONS - TO CATCH ALL ROUTING TYPES + if ((sigType & eRoutingSignalType.Video) == eRoutingSignalType.Video) + { + Chassis.VideoEnter.BoolValue = true; + if (output != null) + { + output.VideoOut = input; //Chassis.Outputs[output].VideoOut = inCard; + } + } + + if ((sigType & eRoutingSignalType.Audio) == eRoutingSignalType.Audio) + { + var dmMdMnxn = Chassis as DmMDMnxn; + if (dmMdMnxn != null) + { + dmMdMnxn.AudioEnter.BoolValue = true; + } + if (output != null) + { + output.AudioOut = input; + } + } + + if ((sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput) + + { + Chassis.USBEnter.BoolValue = true; + if (inputSelector == null && output != null) + { + //clearing the route is intended + output.USBRoutedTo = null; + return; + } + + if (inputSelector != null && input == null) + { + //input selector is DMOutput...we're doing a out to out route + var tempInput = inputSelector as DMOutput; + + if (tempInput == null || output == null) + { + return; + } + output.USBRoutedTo = tempInput; + return; + } + + if (input != null & output != null) + { + output.USBRoutedTo = input; + } + } + + if((sigType & eRoutingSignalType.UsbInput) != eRoutingSignalType.UsbInput) + { + return; + } + + Chassis.USBEnter.BoolValue = true; + if (output != null) + { + output.USBRoutedTo = input; + return; + } + var tempOutput = outputSelector as DMInput; + + if (tempOutput == null) + { + Debug.Console(0, this, Debug.ErrorLogLevel.Warning, + "Unable to execute switch for inputSelector {0} to outputSelector {1}", inputSelector, + outputSelector); + return; + } + + tempOutput.USBRoutedTo = input; + } + + #endregion + + #region IRoutingNumeric Members + + public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType sigType) + { + var chassisSize = (uint)Chassis.NumberOfInputs; //need this to determine USB routing values 8x8 -> 1-8 is inputs 1-8, 17-24 is outputs 1-8 + //16x16 1-16 is inputs 1-16, 17-32 is outputs 1-16 + //32x32 1-32 is inputs 1-32, 33-64 is outputs 1-32 + + DMInputOutputBase dmCard; + + //Routing Input to Input or Output to Input + if ((sigType & eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput) + { + Debug.Console(2, this, "Executing USB Input switch.\r\n in:{0} output: {1}", inputSelector, outputSelector); + if (outputSelector > chassisSize) + { + uint outputIndex; + + if (chassisSize == 8) + { + outputIndex = (uint) inputSelector - 16; + } + else + { + outputIndex = inputSelector - chassisSize; + } + dmCard = Chassis.Outputs[outputIndex]; + } + else + { + dmCard = Chassis.Inputs[inputSelector]; + } + + ExecuteSwitch(dmCard, Chassis.Inputs[outputSelector], sigType); + return; + } + if ((sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput) + { + Debug.Console(2, this, "Executing USB Output switch.\r\n in:{0} output: {1}", inputSelector, outputSelector); + + //routing Output to Output or Input to Output + if (inputSelector > chassisSize) + { + //wanting to route an output to an output. Subtract chassis size and get output, unless it's 8x8 + //need this to determine USB routing values + //8x8 -> 1-8 is inputs 1-8, 17-24 is outputs 1-8 + //16x16 1-16 is inputs 1-16, 17-32 is outputs 1-16 + //32x32 1-32 is inputs 1-32, 33-64 is outputs 1-32 + uint outputIndex; + + if (chassisSize == 8) + { + outputIndex = (uint) inputSelector - 16; + } + else + { + outputIndex = inputSelector - chassisSize; + } + + dmCard = Chassis.Outputs[outputIndex]; + } + else + { + dmCard = Chassis.Inputs[inputSelector]; + } + Chassis.USBEnter.BoolValue = true; + + Debug.Console(2, this, "Routing USB for input {0} to {1}", inputSelector, dmCard); + ExecuteSwitch(dmCard, Chassis.Outputs[outputSelector], sigType); + return; + } + + var inputCard = inputSelector == 0 ? null : Chassis.Inputs[inputSelector]; + var outputCard = Chassis.Outputs[outputSelector]; + + ExecuteSwitch(inputCard, outputCard, sigType); + } + + #endregion + + public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + var joinMap = GetJoinMap(joinStart, joinMapKey, bridge); + + Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); + + LinkChassisToApi(trilist, joinMap); + + trilist.StringInput[joinMap.Name.JoinNumber].StringValue = this.Name; + + // Link up inputs & outputs + for (uint i = 1; i <= Chassis.NumberOfOutputs; i++) + { + var ioSlot = i; + var ioSlotJoin = ioSlot - 1; + + LinkRoutingJoinsToApi(trilist, joinMap, ioSlotJoin, ioSlot); + + if (TxDictionary.ContainsKey(ioSlot)) + { + LinkTxToApi(trilist, ioSlot, joinMap, ioSlotJoin); + } + else + { + LinkHdmiInputToApi(trilist, ioSlot, joinMap, ioSlotJoin); + LinkStreamInputToApi(trilist, ioSlot, joinMap, ioSlotJoin); + } + + if (RxDictionary.ContainsKey(ioSlot)) + { + LinkRxToApi(trilist, ioSlot, joinMap, ioSlotJoin); + } + else + LinkStreamOutputToApi(trilist, ioSlot, joinMap, ioSlotJoin); + } + } + + private void LinkHdmiInputToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, uint ioSlotJoin) + { + VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]); + + var inputPort = InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)]; + if (inputPort == null) + { + return; + } + + Debug.Console(1, "Port value for input card {0} is set", ioSlot); + var port = inputPort.Port; + + if (port == null) + { + return; + } + if (!(port is HdmiInputWithCEC)) + { + Debug.Console(0, this, "HDMI Input port on card {0} does not support HDCP settings.", ioSlot); + return; + } + + Debug.Console(1, "Port is HdmiInputWithCec"); + + var hdmiInPortWCec = port as HdmiInputWithCEC; + + + SetHdcpStateAction(PropertiesConfig.InputSlotSupportsHdcp2[ioSlot], hdmiInPortWCec, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist); + + + InputCardHdcpStateFeedbacks[ioSlot].LinkInputSig( + trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]); + + if (InputCardHdcpCapabilityTypes.ContainsKey(ioSlot)) + { + trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = + (ushort)InputCardHdcpCapabilityTypes[ioSlot]; + } + else + { + trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = 1; + } + + var videoStatus = inputPort as RoutingInputPortWithVideoStatuses; + + if (videoStatus == null) + { + return; + } + + Debug.Console(1, this, "Linking {0} to join {1} for resolution feedback.", videoStatus.Key, joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin); + videoStatus.VideoStatus.VideoResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin]); + } + + private void LinkStreamInputToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, uint ioSlotJoin) + { + var inputPort = InputPorts[string.Format("inputCard{0}--streamIn", ioSlot)]; + if (inputPort == null) + { + return; + } + var streamCard = Chassis.Inputs[ioSlot].Card as DmcStr; + var join = joinMap.InputStreamCardState.JoinNumber + ioSlotJoin; + + Debug.Console(1, "Port value for input card {0} is set as a stream card", ioSlot); + + trilist.SetUShortSigAction(join, s => + { + if (s == 1) + { + Debug.Console(2, this, "Join {0} value {1}: Setting stream state to start", join, s); + streamCard.Control.Start(); + } + else if (s == 2) + { + Debug.Console(2, this, "Join {0} value {1}: Setting stream state to stop", join, s); + streamCard.Control.Stop(); + } + else if (s == 3) + { + Debug.Console(2, this, "Join {0} value {1}: Setting stream state to pause", join, s); + streamCard.Control.Pause(); + } + else + { + Debug.Console(2, this, "Join {0} value {1}: Ignore stream state", join, s); + } + }); + + InputStreamCardStateFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[join]); + + trilist.UShortInput[join].UShortValue = InputStreamCardStateFeedbacks[ioSlot].UShortValue; + + var videoStatus = inputPort as RoutingInputPortWithVideoStatuses; + + if (videoStatus != null) + { + videoStatus.VideoStatus.VideoResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin]); + } + } + + private void LinkStreamOutputToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, uint ioSlotJoin) + { + var outputPort = OutputPorts[string.Format("outputCard{0}--streamOut", ioSlot)]; + if (outputPort == null) + { + return; + } + var streamCard = Chassis.Outputs[ioSlot].Card as DmcStroAV; + var join = joinMap.OutputStreamCardState.JoinNumber + ioSlotJoin; + + Debug.Console(1, "Port value for output card {0} is set as a stream card", ioSlot); + + trilist.SetUShortSigAction(join, s => + { + if (s == 1) + { + Debug.Console(2, this, "Join {0} value {1}: Setting stream state to start", join, s); + streamCard.Control.Start(); + } + else if (s == 2) + { + Debug.Console(2, this, "Join {0} value {1}: Setting stream state to stop", join, s); + streamCard.Control.Stop(); + } + else if (s == 3) + { + Debug.Console(2, this, "Join {0} value {1}: Setting stream state to pause", join, s); + streamCard.Control.Pause(); + } + else + { + Debug.Console(2, this, "Join {0} value {1}: Ignore stream state", join, s); + } + }); + + OutputStreamCardStateFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[join]); + + trilist.UShortInput[join].UShortValue = OutputStreamCardStateFeedbacks[ioSlot].UShortValue; + } + + private void LinkRxToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, uint ioSlotJoin) + { + Debug.Console(2, "Creating Rx Feedbacks {0}", ioSlot); + var rxKey = RxDictionary[ioSlot]; + var rxDevice = DeviceManager.GetDeviceForKey(rxKey) as DmRmcControllerBase; + var hdBaseTDevice = DeviceManager.GetDeviceForKey(rxKey) as DmHdBaseTControllerBase; + if (Chassis is DmMd8x8Cpu3 || Chassis is DmMd8x8Cpu3rps + || Chassis is DmMd16x16Cpu3 || Chassis is DmMd16x16Cpu3rps + || Chassis is DmMd32x32Cpu3 || Chassis is DmMd32x32Cpu3rps || hdBaseTDevice != null) + { + OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig( + trilist.BooleanInput[joinMap.OutputEndpointOnline.JoinNumber + ioSlotJoin]); + } + else if (rxDevice != null) + { + rxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline.JoinNumber + ioSlotJoin]); + } + } + + private void LinkTxToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, uint ioSlotJoin) + { + Debug.Console(1, "Setting up actions and feedbacks on input card {0}", ioSlot); + VideoInputSyncFeedbacks[ioSlot].LinkInputSig( + trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]); + + Debug.Console(2, "Creating Tx Feedbacks {0}", ioSlot); + var txKey = TxDictionary[ioSlot]; + var txDevice = DeviceManager.GetDeviceForKey(txKey) as BasicDmTxControllerBase; + + if (txDevice == null) + { + return; + } + + LinkTxOnlineFeedbackToApi(trilist, ioSlot, joinMap, ioSlotJoin, txDevice); + + LinkBasicTxToApi(trilist, joinMap, ioSlot, ioSlotJoin, txDevice); + + LinkAdvancedTxToApi(trilist, joinMap, ioSlot, ioSlotJoin, txDevice); + } + + private void LinkBasicTxToApi(BasicTriList trilist, DmChassisControllerJoinMap joinMap, uint ioSlot, + uint ioSlotJoin, BasicDmTxControllerBase basicTransmitter) + { + var advTx = basicTransmitter as DmTxControllerBase; + + if (advTx != null) + { + return; + } + var inputPort = InputPorts[string.Format("inputCard{0}--dmIn", ioSlot)]; + + if (inputPort == null) + { + return; + } + var port = inputPort.Port; + + if (!(port is DMInputPortWithCec)) + { + Debug.Console(0, this, "DM Input port on card {0} does not support HDCP settings.", ioSlot); + return; + } + Debug.Console(1, "Port is DMInputPortWithCec"); + + var dmInPortWCec = port as DMInputPortWithCec; + + bool supportsHdcp2; + + //added in case the InputSlotSupportsHdcp2 section isn't included in the config, or this slot is left out. + //if the key isn't in the dictionary, supportsHdcp2 will be false + + if(!PropertiesConfig.InputSlotSupportsHdcp2.TryGetValue(ioSlot, out supportsHdcp2)) + { + Debug.Console(0, this, Debug.ErrorLogLevel.Warning, + "Input Slot Supports HDCP2 setting not found for slot {0}. Setting to false. Program may not function as intended.", + ioSlot); + } + + SetHdcpStateAction(supportsHdcp2, dmInPortWCec, + joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist); + + InputCardHdcpStateFeedbacks[ioSlot].LinkInputSig( + trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]); + + if (InputCardHdcpCapabilityTypes.ContainsKey(ioSlot)) + { + trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = + (ushort) InputCardHdcpCapabilityTypes[ioSlot]; + } + else + { + trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = 1; + } + + var videoStatus = inputPort as RoutingInputPortWithVideoStatuses; + + if (videoStatus == null) + { + return; + } + Debug.Console(1, this, "Linking {0} to join {1} for resolution feedback.", videoStatus.Key, joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin); + videoStatus.VideoStatus.VideoResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin]); + } + + private void LinkAdvancedTxToApi(BasicTriList trilist, DmChassisControllerJoinMap joinMap, + uint ioSlot, uint ioSlotJoin, BasicDmTxControllerBase basicTransmitter) + { + var transmitter = basicTransmitter as DmTxControllerBase; + if (transmitter == null) return; + + trilist.BooleanInput[joinMap.TxAdvancedIsPresent.JoinNumber + ioSlotJoin].BoolValue = true; + + transmitter.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig( + trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]); + + var txRoutingInputs = transmitter as IRoutingInputs; + + if (txRoutingInputs == null) return; + + var inputPorts = + txRoutingInputs.InputPorts.Where( + (p) => p.Port is EndpointHdmiInput || p.Port is EndpointDisplayPortInput).ToList(); + + if (inputPorts.Count == 0) + { + Debug.Console(1, this, "No HDCP-capable input ports found on transmitter for slot {0}", ioSlot); + return; + } + + bool supportsHdcp2; + + if (!PropertiesConfig.InputSlotSupportsHdcp2.TryGetValue(ioSlot, out supportsHdcp2)) + { + Debug.Console(0, this, Debug.ErrorLogLevel.Warning, + "Input Slot Supports HDCP2 setting not found for slot {0}. Setting to false. Program may not function as intended.", + ioSlot); + } + + SetHdcpStateAction(supportsHdcp2, inputPorts, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist); + + if (transmitter.HdcpStateFeedback != null) + { + transmitter.HdcpStateFeedback.LinkInputSig( + trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]); + } + else + { + Debug.Console(2, this, "Transmitter Hdcp Feedback null. Linking to card's feedback"); + InputCardHdcpStateFeedbacks[ioSlot].LinkInputSig( + trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]); + } + + trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = + (ushort) transmitter.HdcpSupportCapability; + + + var videoStatus = + InputPorts[string.Format("inputCard{0}--dmIn", ioSlot)] as RoutingInputPortWithVideoStatuses; + + if (videoStatus == null) + { + return; + } + Debug.Console(1, this, "Linking {0} to join {1} for resolution feedback.", videoStatus.Key, + joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin); + videoStatus.VideoStatus.VideoResolutionFeedback.LinkInputSig( + trilist.StringInput[joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin]); + } + + private void LinkTxOnlineFeedbackToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, + uint ioSlotJoin, BasicDmTxControllerBase txDevice) + { + var advancedTxDevice = txDevice as DmTxControllerBase; + + if ((Chassis is DmMd8x8Cpu3 || Chassis is DmMd8x8Cpu3rps + || Chassis is DmMd16x16Cpu3 || Chassis is DmMd16x16Cpu3rps + || Chassis is DmMd32x32Cpu3 || Chassis is DmMd32x32Cpu3rps) || + advancedTxDevice == null) + { + Debug.Console(2, "Linking Tx Online Feedback from Input Card {0}", ioSlot); + InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig( + trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]); + return; + } + + Debug.Console(2, "Linking Tx Online Feedback from Advanced Transmitter at input {0}", ioSlot); + + advancedTxDevice.IsOnline.LinkInputSig( + trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]); + } + + private void LinkRoutingJoinsToApi(BasicTriList trilist, DmChassisControllerJoinMap joinMap, uint ioSlotJoin, + uint ioSlot) + { + // Routing Control + trilist.SetUShortSigAction(joinMap.OutputVideo.JoinNumber + ioSlotJoin, + o => ExecuteNumericSwitch(o, (ushort) ioSlot, eRoutingSignalType.Video)); + trilist.SetUShortSigAction(joinMap.OutputAudio.JoinNumber + ioSlotJoin, + o => ExecuteNumericSwitch(o, (ushort) ioSlot, eRoutingSignalType.Audio)); + trilist.SetUShortSigAction(joinMap.OutputUsb.JoinNumber + ioSlotJoin, + o => ExecuteNumericSwitch(o, (ushort) ioSlot, eRoutingSignalType.UsbOutput)); + trilist.SetUShortSigAction(joinMap.InputUsb.JoinNumber + ioSlotJoin, + o => ExecuteNumericSwitch(o, (ushort) ioSlot, eRoutingSignalType.UsbInput)); + + //Routing Feedbacks + VideoOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputVideo.JoinNumber + ioSlotJoin]); + AudioOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputAudio.JoinNumber + ioSlotJoin]); + UsbOutputRoutedToFeebacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputUsb.JoinNumber + ioSlotJoin]); + UsbInputRoutedToFeebacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.InputUsb.JoinNumber + ioSlotJoin]); + + OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames.JoinNumber + ioSlotJoin]); + InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames.JoinNumber + ioSlotJoin]); + OutputVideoRouteNameFeedbacks[ioSlot].LinkInputSig( + trilist.StringInput[joinMap.OutputCurrentVideoInputNames.JoinNumber + ioSlotJoin]); + OutputAudioRouteNameFeedbacks[ioSlot].LinkInputSig( + trilist.StringInput[joinMap.OutputCurrentAudioInputNames.JoinNumber + ioSlotJoin]); + + OutputDisabledByHdcpFeedbacks[ioSlot].LinkInputSig( + trilist.BooleanInput[joinMap.OutputDisabledByHdcp.JoinNumber + ioSlotJoin]); + } + + private void LinkChassisToApi(BasicTriList trilist, DmChassisControllerJoinMap joinMap) + { + var chassis = Chassis as DmMDMnxn; + + IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); + + trilist.SetUShortSigAction(joinMap.SystemId.JoinNumber, o => + { + if (chassis != null) + { + chassis.SystemId.UShortValue = o; + } + }); + + trilist.SetSigTrueAction(joinMap.SystemId.JoinNumber, () => + { + if (chassis != null) + { + chassis.ApplySystemId(); + } + }); + + SystemIdFeebdack.LinkInputSig(trilist.UShortInput[joinMap.SystemId.JoinNumber]); + SystemIdBusyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.SystemId.JoinNumber]); + + EnableAudioBreakawayFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableAudioBreakaway.JoinNumber]); + EnableUsbBreakawayFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsbBreakaway.JoinNumber]); + + trilist.SetString(joinMap.NoRouteName.JoinNumber, NoRouteText); + + trilist.OnlineStatusChange += (o, a) => + { + if (!a.DeviceOnLine) + { + return; + } + + EnableAudioBreakawayFeedback.FireUpdate(); + EnableUsbBreakawayFeedback.FireUpdate(); + SystemIdBusyFeedback.FireUpdate(); + SystemIdFeebdack.FireUpdate(); + + trilist.SetString(joinMap.NoRouteName.JoinNumber, NoRouteText); + }; + } + + private DmChassisControllerJoinMap GetJoinMap(uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + var joinMap = new DmChassisControllerJoinMap(joinStart); + + var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + { + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); + } + + if (bridge != null) + { + bridge.AddJoinMap(Key, joinMap); + } + else + { + Debug.Console(0, this, + "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); + } + return joinMap; + } + + private void SetHdcpStateAction(bool supportsHdcp2, HdmiInputWithCEC port, uint join, BasicTriList trilist) + { + if (!supportsHdcp2) + { + trilist.SetUShortSigAction(join, + s => + { + if (s == 0) + { + Debug.Console(2, this, "Join {0} value {1} Setting HdcpSupport to off", join, s); + port.HdcpSupportOff(); + } + else if (s > 0) + { + Debug.Console(2, this, "Join {0} value {1} Setting HdcpSupport to on", join, s); + port.HdcpSupportOn(); + } + }); + } + else + { + trilist.SetUShortSigAction(join, + u => + { + Debug.Console(2, this, "Join {0} value {1} Setting HdcpReceiveCapability to: {2}", join, u, (eHdcpCapabilityType)u); + port.HdcpReceiveCapability = (eHdcpCapabilityType)u; + }); + } + } + + private void SetHdcpStateAction(bool supportsHdcp2, EndpointHdmiInput port, uint join, BasicTriList trilist) + { + if (!supportsHdcp2) + { + trilist.SetUShortSigAction(join, + s => + { + if (s == 0) + { + Debug.Console(2, this, "Join {0} value {1} Setting HdcpSupport to off", join, s); + port.HdcpSupportOff(); + } + else if (s > 0) + { + Debug.Console(2, this, "Join {0} value {1} Setting HdcpSupport to on", join, s); + port.HdcpSupportOn(); + } + }); + } + else + { + trilist.SetUShortSigAction(join, + u => + { + Debug.Console(2, this, "Join {0} value {1} Setting HdcpReceiveCapability to: {2}", join, u, (eHdcpCapabilityType)u); + port.HdcpCapability = (eHdcpCapabilityType)u; + }); + } + } + + private void SetHdcpStateAction(bool supportsHdcp2, List ports, uint join, + BasicTriList triList) + { + if (!supportsHdcp2) + { + triList.SetUShortSigAction(join, a => + { + foreach (var tempPort in ports.Select(port => port.Port).OfType()) + { + if (a == 0) + { + tempPort.HdcpSupportOff(); + } + else if (a > 0) + { + tempPort.HdcpSupportOn(); + } + } + }); + } + else + { + triList.SetUShortSigAction(join, a => + { + foreach (var tempPort in ports.Select(port => port.Port).OfType()) + { + tempPort.HdcpCapability = (eHdcpCapabilityType) a; + } + }); + } + } + + private void SetHdcpStateAction(bool supportsHdcp2, DMInputPortWithCec port, uint join, BasicTriList trilist) + { + if (!supportsHdcp2) + { + trilist.SetUShortSigAction(join, + s => + { + if (s == 0) + { + port.HdcpSupportOff(); + } + else if (s > 0) + { + port.HdcpSupportOn(); + } + }); + } + else + { + trilist.SetUShortSigAction(join, + u => + { + port.HdcpReceiveCapability = (eHdcpCapabilityType)u; + }); + } + } + } + + public struct PortNumberType + { + public uint Number { get; private set; } + public object Selector { get; private set; } + public eRoutingSignalType Type { get; private set; } + + public PortNumberType(object selector, eRoutingSignalType type) + : this() + { + Selector = selector; + Type = type; + + if (Selector is DMOutput) + { + Number = (selector as DMOutput).Number; + } + else if (Selector is uint) + { + Number = (uint) selector; + } + } + } + + public class DmChassisControllerFactory : EssentialsDeviceFactory + { + public DmChassisControllerFactory() + { + TypeNames = new List() { "dmmd8x8", "dmmd8x8rps", "dmmd8x8cpu3", "dmmd8x8cpu3rps", + "dmmd16x16", "dmmd16x16rps", "dmmd16x16cpu3", "dmmd16x16cpu3rps", + "dmmd32x32", "dmmd32x32rps", "dmmd32x32cpu3", "dmmd32x32cpu3rps", + "dmmd64x64", "dmmd128x128" }; + } + + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + var type = dc.Type.ToLower(); + + Debug.Console(1, "Factory Attempting to create new DmChassisController Device"); + + if (type.StartsWith("dmmd8x") || type.StartsWith("dmmd16x") || type.StartsWith("dmmd32x")) + { + + var props = JsonConvert.DeserializeObject + (dc.Properties.ToString()); + return DmChassisController. + GetDmChassisController(dc.Key, dc.Name, type, props); + } + else if (type.StartsWith("dmmd128x") || type.StartsWith("dmmd64x")) + { + var props = JsonConvert.DeserializeObject + (dc.Properties.ToString()); + return DmBladeChassisController. + GetDmChassisController(dc.Key, dc.Name, type, props); + } + + return null; + } + } + } \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsAudioOutputController.cs b/src/PepperDash.Essentials.DM/Chassis/DmpsAudioOutputController.cs similarity index 99% rename from essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsAudioOutputController.cs rename to src/PepperDash.Essentials.DM/Chassis/DmpsAudioOutputController.cs index c0f0ca65..291492c9 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsAudioOutputController.cs +++ b/src/PepperDash.Essentials.DM/Chassis/DmpsAudioOutputController.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -7,7 +9,7 @@ using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.DeviceSupport; using Crestron.SimplSharpPro.DM; using Crestron.SimplSharpPro.DM.Cards; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Bridges; diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsDigitalOutputController.cs b/src/PepperDash.Essentials.DM/Chassis/DmpsDigitalOutputController.cs similarity index 100% rename from essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsDigitalOutputController.cs rename to src/PepperDash.Essentials.DM/Chassis/DmpsDigitalOutputController.cs diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsInternalVirtualDmTxController.cs b/src/PepperDash.Essentials.DM/Chassis/DmpsInternalVirtualDmTxController.cs similarity index 100% rename from essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsInternalVirtualDmTxController.cs rename to src/PepperDash.Essentials.DM/Chassis/DmpsInternalVirtualDmTxController.cs diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsMicrophoneController.cs b/src/PepperDash.Essentials.DM/Chassis/DmpsMicrophoneController.cs similarity index 100% rename from essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsMicrophoneController.cs rename to src/PepperDash.Essentials.DM/Chassis/DmpsMicrophoneController.cs diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsRoutingController.cs b/src/PepperDash.Essentials.DM/Chassis/DmpsRoutingController.cs similarity index 99% rename from essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsRoutingController.cs rename to src/PepperDash.Essentials.DM/Chassis/DmpsRoutingController.cs index a3092f71..f3fd66d5 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsRoutingController.cs +++ b/src/PepperDash.Essentials.DM/Chassis/DmpsRoutingController.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,7 +11,7 @@ using Crestron.SimplSharpPro.DM; using Crestron.SimplSharpPro.DM.Cards; using Crestron.SimplSharpPro.DM.Endpoints; using Crestron.SimplSharpPro.DM.Endpoints.Receivers; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Bridges; diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/HdMd8xNController.cs b/src/PepperDash.Essentials.DM/Chassis/HdMd8xNController.cs similarity index 99% rename from essentials-framework/Essentials DM/Essentials_DM/Chassis/HdMd8xNController.cs rename to src/PepperDash.Essentials.DM/Chassis/HdMd8xNController.cs index 2343f65a..958f71cc 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/HdMd8xNController.cs +++ b/src/PepperDash.Essentials.DM/Chassis/HdMd8xNController.cs @@ -1,9 +1,11 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; using Crestron.SimplSharp; using Crestron.SimplSharpPro.DeviceSupport; using Crestron.SimplSharpPro.DM; diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/HdMdNxM4kEBridgeableController.cs b/src/PepperDash.Essentials.DM/Chassis/HdMdNxM4kEBridgeableController.cs similarity index 96% rename from essentials-framework/Essentials DM/Essentials_DM/Chassis/HdMdNxM4kEBridgeableController.cs rename to src/PepperDash.Essentials.DM/Chassis/HdMdNxM4kEBridgeableController.cs index 3d41af3a..a2265497 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/HdMdNxM4kEBridgeableController.cs +++ b/src/PepperDash.Essentials.DM/Chassis/HdMdNxM4kEBridgeableController.cs @@ -1,504 +1,506 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.DM; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.DM.Config; -using PepperDash.Essentials.Core.Bridges; -using PepperDash.Essentials.Core.Config; - -namespace PepperDash.Essentials.DM.Chassis -{ - [Description("Wrapper class for all HdMdNxM4E switchers")] - public class HdMdNxM4kEBridgeableController : CrestronGenericBridgeableBaseDevice, IRoutingNumericWithFeedback, IHasFeedback - { - private HdMdNxM _Chassis; - private HdMd4x14kE _Chassis4x1; - - //IroutingNumericEvent - public event EventHandler NumericSwitchChange; - - public Dictionary InputNames { get; set; } - public Dictionary OutputNames { get; set; } - - public RoutingPortCollection InputPorts { get; private set; } - public RoutingPortCollection OutputPorts { get; private set; } - - public FeedbackCollection VideoInputSyncFeedbacks { get; private set; } - public FeedbackCollection VideoOutputRouteFeedbacks { get; private set; } - public FeedbackCollection InputNameFeedbacks { get; private set; } - public FeedbackCollection OutputNameFeedbacks { get; private set; } - public FeedbackCollection OutputRouteNameFeedbacks { get; private set; } - public FeedbackCollection InputHdcpEnableFeedback { get; private set; } - public StringFeedback DeviceNameFeedback { get; private set; } - public BoolFeedback AutoRouteFeedback { get; private set; } - - #region Constructor - - public HdMdNxM4kEBridgeableController(string key, string name, HdMdNxM chassis, - HdMdNxM4kEBridgeablePropertiesConfig props) - : base(key, name, chassis) - { - _Chassis = chassis; - Name = name; - - if (props == null) - { - Debug.Console(1, this, "HdMdNx4keBridgeableController properties are null, failed to build the device"); - return; - } - - - if (props.Inputs != null) - { - foreach (var kvp in props.Inputs) - { - Debug.Console(1, this, "props.Inputs: {0}-{1}", kvp.Key, kvp.Value); - } - InputNames = props.Inputs; - } - if (props.Outputs != null) - { - foreach (var kvp in props.Outputs) - { - Debug.Console(1, this, "props.Outputs: {0}-{1}", kvp.Key, kvp.Value); - } - OutputNames = props.Outputs; - } - - DeviceNameFeedback = new StringFeedback(()=>Name); - - VideoInputSyncFeedbacks = new FeedbackCollection(); - VideoOutputRouteFeedbacks = new FeedbackCollection(); - InputNameFeedbacks = new FeedbackCollection(); - OutputNameFeedbacks = new FeedbackCollection(); - OutputRouteNameFeedbacks = new FeedbackCollection(); - InputHdcpEnableFeedback = new FeedbackCollection(); - - InputPorts = new RoutingPortCollection(); - OutputPorts = new RoutingPortCollection(); - - if (_Chassis.NumberOfInputs == 1) - { - _Chassis4x1 = _Chassis as HdMd4x14kE; - AutoRouteFeedback = new BoolFeedback(() => _Chassis4x1.AutoModeOnFeedback.BoolValue); - } - - for (uint i = 1; i <= _Chassis.NumberOfInputs; i++) - { - var index = i; - var inputName = InputNames[index]; - //_Chassis.Inputs[index].Name.StringValue = inputName; - _Chassis.HdmiInputs[index].Name.StringValue = inputName; - - InputPorts.Add(new RoutingInputPort(inputName, eRoutingSignalType.AudioVideo, - eRoutingPortConnectionType.Hdmi, _Chassis.HdmiInputs[index], this) - { - FeedbackMatchObject = _Chassis.HdmiInputs[index] - }); - VideoInputSyncFeedbacks.Add(new BoolFeedback(inputName, () => _Chassis.Inputs[index].VideoDetectedFeedback.BoolValue)); - //InputNameFeedbacks.Add(new StringFeedback(inputName, () => _Chassis.Inputs[index].NameFeedback.StringValue)); - InputNameFeedbacks.Add(new StringFeedback(inputName, () => InputNames[index])); - InputHdcpEnableFeedback.Add(new BoolFeedback(inputName, () => _Chassis.HdmiInputs[index].HdmiInputPort.HdcpSupportOnFeedback.BoolValue)); - } - - for (uint i = 1; i <= _Chassis.NumberOfOutputs; i++) - { - var index = i; - var outputName = OutputNames[index]; - //_Chassis.Outputs[index].Name.StringValue = outputName; - //_Chassis.HdmiOutputs[index].Name.StringValue = outputName; - - OutputPorts.Add(new RoutingOutputPort(outputName, eRoutingSignalType.AudioVideo, - eRoutingPortConnectionType.Hdmi, _Chassis.HdmiOutputs[index], this) - { - FeedbackMatchObject = _Chassis.HdmiOutputs[index] - }); - VideoOutputRouteFeedbacks.Add(new IntFeedback(outputName, () => _Chassis.Outputs[index].VideoOutFeedback == null ? 0 : (int)_Chassis.Outputs[index].VideoOutFeedback.Number)); - OutputNameFeedbacks.Add(new StringFeedback(outputName, () => OutputNames[index])); - OutputRouteNameFeedbacks.Add(new StringFeedback(outputName, () => _Chassis.Outputs[index].VideoOutFeedback.NameFeedback.StringValue)); - } - - _Chassis.DMInputChange += Chassis_DMInputChange; - _Chassis.DMOutputChange += Chassis_DMOutputChange; - - AddPostActivationAction(AddFeedbackCollections); - } - - #endregion - - #region Methods - - /// - /// Raise an event when the status of a switch object changes. - /// - /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType - private void OnSwitchChange(RoutingNumericEventArgs e) - { - var newEvent = NumericSwitchChange; - if (newEvent != null) newEvent(this, e); - } - - public void EnableHdcp(uint port) - { - if (port > _Chassis.NumberOfInputs) return; - if (port <= 0) return; - - _Chassis.HdmiInputs[port].HdmiInputPort.HdcpSupportOn(); - InputHdcpEnableFeedback[InputNames[port]].FireUpdate(); - } - - public void DisableHdcp(uint port) - { - if (port > _Chassis.NumberOfInputs) return; - if (port <= 0) return; - - _Chassis.HdmiInputs[port].HdmiInputPort.HdcpSupportOff(); - InputHdcpEnableFeedback[InputNames[port]].FireUpdate(); - } - - public void EnableAutoRoute() - { - if (_Chassis.NumberOfInputs != 1) return; - - if (_Chassis4x1 == null) return; - - _Chassis4x1.AutoModeOn(); - } - - public void DisableAutoRoute() - { - if (_Chassis.NumberOfInputs != 1) return; - - if (_Chassis4x1 == null) return; - - _Chassis4x1.AutoModeOff(); - } - - #region PostActivate - - public void AddFeedbackCollections() - { - AddFeedbackToList(DeviceNameFeedback); - AddCollectionsToList(VideoInputSyncFeedbacks, InputHdcpEnableFeedback); - AddCollectionsToList(VideoOutputRouteFeedbacks); - AddCollectionsToList(InputNameFeedbacks, OutputNameFeedbacks, OutputRouteNameFeedbacks); - } - - #endregion - - #region FeedbackCollection Methods - - //Add arrays of collections - public void AddCollectionsToList(params FeedbackCollection[] newFbs) - { - foreach (FeedbackCollection fbCollection in newFbs) - { - foreach (var item in newFbs) - { - AddCollectionToList(item); - } - } - } - public void AddCollectionsToList(params FeedbackCollection[] newFbs) - { - foreach (FeedbackCollection fbCollection in newFbs) - { - foreach (var item in newFbs) - { - AddCollectionToList(item); - } - } - } - - public void AddCollectionsToList(params FeedbackCollection[] newFbs) - { - foreach (FeedbackCollection fbCollection in newFbs) - { - foreach (var item in newFbs) - { - AddCollectionToList(item); - } - } - } - - //Add Collections - public void AddCollectionToList(FeedbackCollection newFbs) - { - foreach (var f in newFbs) - { - if (f == null) continue; - - AddFeedbackToList(f); - } - } - - public void AddCollectionToList(FeedbackCollection newFbs) - { - foreach (var f in newFbs) - { - if (f == null) continue; - - AddFeedbackToList(f); - } - } - - public void AddCollectionToList(FeedbackCollection newFbs) - { - foreach (var f in newFbs) - { - if (f == null) continue; - - AddFeedbackToList(f); - } - } - - //Add Individual Feedbacks - public void AddFeedbackToList(PepperDash.Essentials.Core.Feedback newFb) - { - if (newFb == null) return; - - if (!Feedbacks.Contains(newFb)) - { - Feedbacks.Add(newFb); - } - } - - #endregion - - #region IRouting Members - - public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) - { - var input = inputSelector as HdMdNxMHdmiInput; //changed from HdMdNxM4kzEHdmiInput; - var output = outputSelector as HdMdNxMHdmiOutput; - Debug.Console(2, this, "ExecuteSwitch: input={0} output={1}", input, output); - - if (output == null) - { - Debug.Console(0, this, "Unable to make switch. output selector is not HdMdNxMHdmiOutput"); - return; - } - - // Try to make switch only when necessary. The unit appears to toggle when already selected. - var current = output.VideoOut; - if (current != input) - output.VideoOut = input; - } - - #endregion - - #region IRoutingNumeric Members - - public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType signalType) - { - var input = inputSelector == 0 ? null : _Chassis.HdmiInputs[inputSelector]; - var output = _Chassis.HdmiOutputs[outputSelector]; - - Debug.Console(2, this, "ExecuteNumericSwitch: input={0} output={1}", input, output); - - ExecuteSwitch(input, output, signalType); - } - - #endregion - - #endregion - - #region Bridge Linking - - public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - var joinMap = new HdMdNxM4kEControllerJoinMap(joinStart); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - if (bridge != null) - { - bridge.AddJoinMap(Key, joinMap); - } - else - { - Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); - } - - IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); - DeviceNameFeedback.LinkInputSig(trilist.StringInput[joinMap.Name.JoinNumber]); - - if (_Chassis4x1 != null) - { - trilist.SetSigTrueAction(joinMap.EnableAutoRoute.JoinNumber, () => _Chassis4x1.AutoModeOn()); - trilist.SetSigFalseAction(joinMap.EnableAutoRoute.JoinNumber, () => _Chassis4x1.AutoModeOff()); - AutoRouteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableAutoRoute.JoinNumber]); - } - - for (uint i = 1; i <= _Chassis.NumberOfInputs; i++) - { - var joinIndex = i - 1; - var input = i; - //Digital - VideoInputSyncFeedbacks[InputNames[input]].LinkInputSig(trilist.BooleanInput[joinMap.InputSync.JoinNumber + joinIndex]); - InputHdcpEnableFeedback[InputNames[input]].LinkInputSig(trilist.BooleanInput[joinMap.EnableInputHdcp.JoinNumber + joinIndex]); - InputHdcpEnableFeedback[InputNames[input]].LinkComplementInputSig(trilist.BooleanInput[joinMap.DisableInputHdcp.JoinNumber + joinIndex]); - trilist.SetSigTrueAction(joinMap.EnableInputHdcp.JoinNumber + joinIndex, () => EnableHdcp(input)); - trilist.SetSigTrueAction(joinMap.DisableInputHdcp.JoinNumber + joinIndex, () => DisableHdcp(input)); - - //Serial - InputNameFeedbacks[InputNames[input]].LinkInputSig(trilist.StringInput[joinMap.InputName.JoinNumber + joinIndex]); - } - - for (uint i = 1; i <= _Chassis.NumberOfOutputs; i++) - { - var joinIndex = i - 1; - var output = i; - //Analog - VideoOutputRouteFeedbacks[OutputNames[output]].LinkInputSig(trilist.UShortInput[joinMap.OutputRoute.JoinNumber + joinIndex]); - trilist.SetUShortSigAction(joinMap.OutputRoute.JoinNumber + joinIndex, (a) => ExecuteNumericSwitch(a, (ushort) output, eRoutingSignalType.AudioVideo)); - - //Serial - OutputNameFeedbacks[OutputNames[output]].LinkInputSig(trilist.StringInput[joinMap.OutputName.JoinNumber + joinIndex]); - OutputRouteNameFeedbacks[OutputNames[output]].LinkInputSig(trilist.StringInput[joinMap.OutputRoutedName.JoinNumber + joinIndex]); - } - - _Chassis.OnlineStatusChange += Chassis_OnlineStatusChange; - - trilist.OnlineStatusChange += (d, args) => - { - if (!args.DeviceOnLine) return; - - // feedback updates was moved to the Chassis_OnlineStatusChange - // due to the amount of time it takes for the device to come online - }; - } - - - #endregion - - #region Events - - void Chassis_OnlineStatusChange(Crestron.SimplSharpPro.GenericBase currentDevice, Crestron.SimplSharpPro.OnlineOfflineEventArgs args) - { - IsOnline.FireUpdate(); - - if (!args.DeviceOnLine) return; - - foreach (var feedback in Feedbacks) - { - feedback.FireUpdate(); - } - - if (_Chassis4x1 != null) - AutoRouteFeedback.FireUpdate(); - } - - void Chassis_DMOutputChange(Switch device, DMOutputEventArgs args) - { - if (args.EventId != DMOutputEventIds.VideoOutEventId) return; - - var output = args.Number; - - var inputNumber = _Chassis.HdmiOutputs[output].VideoOutFeedback == null - ? 0 - : _Chassis.HdmiOutputs[output].VideoOutFeedback.Number; - - var outputName = OutputNames[output]; - - var feedback = VideoOutputRouteFeedbacks[outputName]; - - if (feedback == null) - { - return; - } - var inPort = - InputPorts.FirstOrDefault(p => p.FeedbackMatchObject == _Chassis.HdmiOutputs[output].VideoOutFeedback); - var outPort = OutputPorts.FirstOrDefault(p => p.FeedbackMatchObject == _Chassis.HdmiOutputs[output]); - - feedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(output, inputNumber, outPort, inPort, eRoutingSignalType.AudioVideo)); - } - - void Chassis_DMInputChange(Switch device, DMInputEventArgs args) - { - switch (args.EventId) - { - case DMInputEventIds.VideoDetectedEventId: - { - Debug.Console(1, this, "Event ID {0}: Updating VideoInputSyncFeedbacks", args.EventId); - foreach (var item in VideoInputSyncFeedbacks) - { - item.FireUpdate(); - } - break; - } - case DMInputEventIds.InputNameFeedbackEventId: - case DMInputEventIds.InputNameEventId: - case DMInputEventIds.NameFeedbackEventId: - { - Debug.Console(1, this, "Event ID {0}: Updating name feedbacks.", args.EventId); - Debug.Console(1, this, "Input {0} Name {1}", args.Number, - _Chassis.HdmiInputs[args.Number].NameFeedback.StringValue); - foreach (var item in InputNameFeedbacks) - { - item.FireUpdate(); - } - break; - } - default: - { - Debug.Console(1, this, "Unhandled DM Input Event ID {0}", args.EventId); - break; - } - } - } - - #endregion - - #region Factory - - public class HdMdNxM4kEControllerFactory : EssentialsDeviceFactory - { - public HdMdNxM4kEControllerFactory() - { - TypeNames = new List() { "hdmd4x14ke-bridgeable", "hdmd4x24ke", "hdmd6x24ke" }; - } - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - Debug.Console(1, "Factory Attempting to create new HD-MD-NxM-4K-E Device"); - - var props = JsonConvert.DeserializeObject(dc.Properties.ToString()); - - var type = dc.Type.ToLower(); - var control = props.Control; - var ipid = control.IpIdInt; - var address = control.TcpSshProperties.Address; - - switch (type) - { - case ("hdmd4x14ke-bridgeable"): - return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd4x14kE(ipid, address, Global.ControlSystem), props); - case ("hdmd4x24ke"): - return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd4x24kE(ipid, address, Global.ControlSystem), props); - case ("hdmd6x24ke"): - return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd6x24kE(ipid, address, Global.ControlSystem), props); - default: - return null; - } - } - } - - #endregion - - - - } +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using Full.Newtonsoft.Json; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.DM; + +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.DM.Config; +using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Config; + +namespace PepperDash.Essentials.DM.Chassis +{ + [Description("Wrapper class for all HdMdNxM4E switchers")] + public class HdMdNxM4kEBridgeableController : CrestronGenericBridgeableBaseDevice, IRoutingNumericWithFeedback, IHasFeedback + { + private HdMdNxM _Chassis; + private HdMd4x14kE _Chassis4x1; + + //IroutingNumericEvent + public event EventHandler NumericSwitchChange; + + public Dictionary InputNames { get; set; } + public Dictionary OutputNames { get; set; } + + public RoutingPortCollection InputPorts { get; private set; } + public RoutingPortCollection OutputPorts { get; private set; } + + public FeedbackCollection VideoInputSyncFeedbacks { get; private set; } + public FeedbackCollection VideoOutputRouteFeedbacks { get; private set; } + public FeedbackCollection InputNameFeedbacks { get; private set; } + public FeedbackCollection OutputNameFeedbacks { get; private set; } + public FeedbackCollection OutputRouteNameFeedbacks { get; private set; } + public FeedbackCollection InputHdcpEnableFeedback { get; private set; } + public StringFeedback DeviceNameFeedback { get; private set; } + public BoolFeedback AutoRouteFeedback { get; private set; } + + #region Constructor + + public HdMdNxM4kEBridgeableController(string key, string name, HdMdNxM chassis, + HdMdNxM4kEBridgeablePropertiesConfig props) + : base(key, name, chassis) + { + _Chassis = chassis; + Name = name; + + if (props == null) + { + Debug.Console(1, this, "HdMdNx4keBridgeableController properties are null, failed to build the device"); + return; + } + + + if (props.Inputs != null) + { + foreach (var kvp in props.Inputs) + { + Debug.Console(1, this, "props.Inputs: {0}-{1}", kvp.Key, kvp.Value); + } + InputNames = props.Inputs; + } + if (props.Outputs != null) + { + foreach (var kvp in props.Outputs) + { + Debug.Console(1, this, "props.Outputs: {0}-{1}", kvp.Key, kvp.Value); + } + OutputNames = props.Outputs; + } + + DeviceNameFeedback = new StringFeedback(()=>Name); + + VideoInputSyncFeedbacks = new FeedbackCollection(); + VideoOutputRouteFeedbacks = new FeedbackCollection(); + InputNameFeedbacks = new FeedbackCollection(); + OutputNameFeedbacks = new FeedbackCollection(); + OutputRouteNameFeedbacks = new FeedbackCollection(); + InputHdcpEnableFeedback = new FeedbackCollection(); + + InputPorts = new RoutingPortCollection(); + OutputPorts = new RoutingPortCollection(); + + if (_Chassis.NumberOfInputs == 1) + { + _Chassis4x1 = _Chassis as HdMd4x14kE; + AutoRouteFeedback = new BoolFeedback(() => _Chassis4x1.AutoModeOnFeedback.BoolValue); + } + + for (uint i = 1; i <= _Chassis.NumberOfInputs; i++) + { + var index = i; + var inputName = InputNames[index]; + //_Chassis.Inputs[index].Name.StringValue = inputName; + _Chassis.HdmiInputs[index].Name.StringValue = inputName; + + InputPorts.Add(new RoutingInputPort(inputName, eRoutingSignalType.AudioVideo, + eRoutingPortConnectionType.Hdmi, _Chassis.HdmiInputs[index], this) + { + FeedbackMatchObject = _Chassis.HdmiInputs[index] + }); + VideoInputSyncFeedbacks.Add(new BoolFeedback(inputName, () => _Chassis.Inputs[index].VideoDetectedFeedback.BoolValue)); + //InputNameFeedbacks.Add(new StringFeedback(inputName, () => _Chassis.Inputs[index].NameFeedback.StringValue)); + InputNameFeedbacks.Add(new StringFeedback(inputName, () => InputNames[index])); + InputHdcpEnableFeedback.Add(new BoolFeedback(inputName, () => _Chassis.HdmiInputs[index].HdmiInputPort.HdcpSupportOnFeedback.BoolValue)); + } + + for (uint i = 1; i <= _Chassis.NumberOfOutputs; i++) + { + var index = i; + var outputName = OutputNames[index]; + //_Chassis.Outputs[index].Name.StringValue = outputName; + //_Chassis.HdmiOutputs[index].Name.StringValue = outputName; + + OutputPorts.Add(new RoutingOutputPort(outputName, eRoutingSignalType.AudioVideo, + eRoutingPortConnectionType.Hdmi, _Chassis.HdmiOutputs[index], this) + { + FeedbackMatchObject = _Chassis.HdmiOutputs[index] + }); + VideoOutputRouteFeedbacks.Add(new IntFeedback(outputName, () => _Chassis.Outputs[index].VideoOutFeedback == null ? 0 : (int)_Chassis.Outputs[index].VideoOutFeedback.Number)); + OutputNameFeedbacks.Add(new StringFeedback(outputName, () => OutputNames[index])); + OutputRouteNameFeedbacks.Add(new StringFeedback(outputName, () => _Chassis.Outputs[index].VideoOutFeedback.NameFeedback.StringValue)); + } + + _Chassis.DMInputChange += Chassis_DMInputChange; + _Chassis.DMOutputChange += Chassis_DMOutputChange; + + AddPostActivationAction(AddFeedbackCollections); + } + + #endregion + + #region Methods + + /// + /// Raise an event when the status of a switch object changes. + /// + /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType + private void OnSwitchChange(RoutingNumericEventArgs e) + { + var newEvent = NumericSwitchChange; + if (newEvent != null) newEvent(this, e); + } + + public void EnableHdcp(uint port) + { + if (port > _Chassis.NumberOfInputs) return; + if (port <= 0) return; + + _Chassis.HdmiInputs[port].HdmiInputPort.HdcpSupportOn(); + InputHdcpEnableFeedback[InputNames[port]].FireUpdate(); + } + + public void DisableHdcp(uint port) + { + if (port > _Chassis.NumberOfInputs) return; + if (port <= 0) return; + + _Chassis.HdmiInputs[port].HdmiInputPort.HdcpSupportOff(); + InputHdcpEnableFeedback[InputNames[port]].FireUpdate(); + } + + public void EnableAutoRoute() + { + if (_Chassis.NumberOfInputs != 1) return; + + if (_Chassis4x1 == null) return; + + _Chassis4x1.AutoModeOn(); + } + + public void DisableAutoRoute() + { + if (_Chassis.NumberOfInputs != 1) return; + + if (_Chassis4x1 == null) return; + + _Chassis4x1.AutoModeOff(); + } + + #region PostActivate + + public void AddFeedbackCollections() + { + AddFeedbackToList(DeviceNameFeedback); + AddCollectionsToList(VideoInputSyncFeedbacks, InputHdcpEnableFeedback); + AddCollectionsToList(VideoOutputRouteFeedbacks); + AddCollectionsToList(InputNameFeedbacks, OutputNameFeedbacks, OutputRouteNameFeedbacks); + } + + #endregion + + #region FeedbackCollection Methods + + //Add arrays of collections + public void AddCollectionsToList(params FeedbackCollection[] newFbs) + { + foreach (FeedbackCollection fbCollection in newFbs) + { + foreach (var item in newFbs) + { + AddCollectionToList(item); + } + } + } + public void AddCollectionsToList(params FeedbackCollection[] newFbs) + { + foreach (FeedbackCollection fbCollection in newFbs) + { + foreach (var item in newFbs) + { + AddCollectionToList(item); + } + } + } + + public void AddCollectionsToList(params FeedbackCollection[] newFbs) + { + foreach (FeedbackCollection fbCollection in newFbs) + { + foreach (var item in newFbs) + { + AddCollectionToList(item); + } + } + } + + //Add Collections + public void AddCollectionToList(FeedbackCollection newFbs) + { + foreach (var f in newFbs) + { + if (f == null) continue; + + AddFeedbackToList(f); + } + } + + public void AddCollectionToList(FeedbackCollection newFbs) + { + foreach (var f in newFbs) + { + if (f == null) continue; + + AddFeedbackToList(f); + } + } + + public void AddCollectionToList(FeedbackCollection newFbs) + { + foreach (var f in newFbs) + { + if (f == null) continue; + + AddFeedbackToList(f); + } + } + + //Add Individual Feedbacks + public void AddFeedbackToList(PepperDash.Essentials.Core.Feedback newFb) + { + if (newFb == null) return; + + if (!Feedbacks.Contains(newFb)) + { + Feedbacks.Add(newFb); + } + } + + #endregion + + #region IRouting Members + + public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) + { + var input = inputSelector as HdMdNxMHdmiInput; //changed from HdMdNxM4kzEHdmiInput; + var output = outputSelector as HdMdNxMHdmiOutput; + Debug.Console(2, this, "ExecuteSwitch: input={0} output={1}", input, output); + + if (output == null) + { + Debug.Console(0, this, "Unable to make switch. output selector is not HdMdNxMHdmiOutput"); + return; + } + + // Try to make switch only when necessary. The unit appears to toggle when already selected. + var current = output.VideoOut; + if (current != input) + output.VideoOut = input; + } + + #endregion + + #region IRoutingNumeric Members + + public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType signalType) + { + var input = inputSelector == 0 ? null : _Chassis.HdmiInputs[inputSelector]; + var output = _Chassis.HdmiOutputs[outputSelector]; + + Debug.Console(2, this, "ExecuteNumericSwitch: input={0} output={1}", input, output); + + ExecuteSwitch(input, output, signalType); + } + + #endregion + + #endregion + + #region Bridge Linking + + public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + var joinMap = new HdMdNxM4kEControllerJoinMap(joinStart); + + var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); + + if (bridge != null) + { + bridge.AddJoinMap(Key, joinMap); + } + else + { + Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); + } + + IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); + DeviceNameFeedback.LinkInputSig(trilist.StringInput[joinMap.Name.JoinNumber]); + + if (_Chassis4x1 != null) + { + trilist.SetSigTrueAction(joinMap.EnableAutoRoute.JoinNumber, () => _Chassis4x1.AutoModeOn()); + trilist.SetSigFalseAction(joinMap.EnableAutoRoute.JoinNumber, () => _Chassis4x1.AutoModeOff()); + AutoRouteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableAutoRoute.JoinNumber]); + } + + for (uint i = 1; i <= _Chassis.NumberOfInputs; i++) + { + var joinIndex = i - 1; + var input = i; + //Digital + VideoInputSyncFeedbacks[InputNames[input]].LinkInputSig(trilist.BooleanInput[joinMap.InputSync.JoinNumber + joinIndex]); + InputHdcpEnableFeedback[InputNames[input]].LinkInputSig(trilist.BooleanInput[joinMap.EnableInputHdcp.JoinNumber + joinIndex]); + InputHdcpEnableFeedback[InputNames[input]].LinkComplementInputSig(trilist.BooleanInput[joinMap.DisableInputHdcp.JoinNumber + joinIndex]); + trilist.SetSigTrueAction(joinMap.EnableInputHdcp.JoinNumber + joinIndex, () => EnableHdcp(input)); + trilist.SetSigTrueAction(joinMap.DisableInputHdcp.JoinNumber + joinIndex, () => DisableHdcp(input)); + + //Serial + InputNameFeedbacks[InputNames[input]].LinkInputSig(trilist.StringInput[joinMap.InputName.JoinNumber + joinIndex]); + } + + for (uint i = 1; i <= _Chassis.NumberOfOutputs; i++) + { + var joinIndex = i - 1; + var output = i; + //Analog + VideoOutputRouteFeedbacks[OutputNames[output]].LinkInputSig(trilist.UShortInput[joinMap.OutputRoute.JoinNumber + joinIndex]); + trilist.SetUShortSigAction(joinMap.OutputRoute.JoinNumber + joinIndex, (a) => ExecuteNumericSwitch(a, (ushort) output, eRoutingSignalType.AudioVideo)); + + //Serial + OutputNameFeedbacks[OutputNames[output]].LinkInputSig(trilist.StringInput[joinMap.OutputName.JoinNumber + joinIndex]); + OutputRouteNameFeedbacks[OutputNames[output]].LinkInputSig(trilist.StringInput[joinMap.OutputRoutedName.JoinNumber + joinIndex]); + } + + _Chassis.OnlineStatusChange += Chassis_OnlineStatusChange; + + trilist.OnlineStatusChange += (d, args) => + { + if (!args.DeviceOnLine) return; + + // feedback updates was moved to the Chassis_OnlineStatusChange + // due to the amount of time it takes for the device to come online + }; + } + + + #endregion + + #region Events + + void Chassis_OnlineStatusChange(Crestron.SimplSharpPro.GenericBase currentDevice, Crestron.SimplSharpPro.OnlineOfflineEventArgs args) + { + IsOnline.FireUpdate(); + + if (!args.DeviceOnLine) return; + + foreach (var feedback in Feedbacks) + { + feedback.FireUpdate(); + } + + if (_Chassis4x1 != null) + AutoRouteFeedback.FireUpdate(); + } + + void Chassis_DMOutputChange(Switch device, DMOutputEventArgs args) + { + if (args.EventId != DMOutputEventIds.VideoOutEventId) return; + + var output = args.Number; + + var inputNumber = _Chassis.HdmiOutputs[output].VideoOutFeedback == null + ? 0 + : _Chassis.HdmiOutputs[output].VideoOutFeedback.Number; + + var outputName = OutputNames[output]; + + var feedback = VideoOutputRouteFeedbacks[outputName]; + + if (feedback == null) + { + return; + } + var inPort = + InputPorts.FirstOrDefault(p => p.FeedbackMatchObject == _Chassis.HdmiOutputs[output].VideoOutFeedback); + var outPort = OutputPorts.FirstOrDefault(p => p.FeedbackMatchObject == _Chassis.HdmiOutputs[output]); + + feedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(output, inputNumber, outPort, inPort, eRoutingSignalType.AudioVideo)); + } + + void Chassis_DMInputChange(Switch device, DMInputEventArgs args) + { + switch (args.EventId) + { + case DMInputEventIds.VideoDetectedEventId: + { + Debug.Console(1, this, "Event ID {0}: Updating VideoInputSyncFeedbacks", args.EventId); + foreach (var item in VideoInputSyncFeedbacks) + { + item.FireUpdate(); + } + break; + } + case DMInputEventIds.InputNameFeedbackEventId: + case DMInputEventIds.InputNameEventId: + case DMInputEventIds.NameFeedbackEventId: + { + Debug.Console(1, this, "Event ID {0}: Updating name feedbacks.", args.EventId); + Debug.Console(1, this, "Input {0} Name {1}", args.Number, + _Chassis.HdmiInputs[args.Number].NameFeedback.StringValue); + foreach (var item in InputNameFeedbacks) + { + item.FireUpdate(); + } + break; + } + default: + { + Debug.Console(1, this, "Unhandled DM Input Event ID {0}", args.EventId); + break; + } + } + } + + #endregion + + #region Factory + + public class HdMdNxM4kEControllerFactory : EssentialsDeviceFactory + { + public HdMdNxM4kEControllerFactory() + { + TypeNames = new List() { "hdmd4x14ke-bridgeable", "hdmd4x24ke", "hdmd6x24ke" }; + } + + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + Debug.Console(1, "Factory Attempting to create new HD-MD-NxM-4K-E Device"); + + var props = JsonConvert.DeserializeObject(dc.Properties.ToString()); + + var type = dc.Type.ToLower(); + var control = props.Control; + var ipid = control.IpIdInt; + var address = control.TcpSshProperties.Address; + + switch (type) + { + case ("hdmd4x14ke-bridgeable"): + return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd4x14kE(ipid, address, Global.ControlSystem), props); + case ("hdmd4x24ke"): + return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd4x24kE(ipid, address, Global.ControlSystem), props); + case ("hdmd6x24ke"): + return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd6x24kE(ipid, address, Global.ControlSystem), props); + default: + return null; + } + } + } + + #endregion + + + + } } \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/HdMdNxM4kEController.cs b/src/PepperDash.Essentials.DM/Chassis/HdMdNxM4kEController.cs similarity index 96% rename from essentials-framework/Essentials DM/Essentials_DM/Chassis/HdMdNxM4kEController.cs rename to src/PepperDash.Essentials.DM/Chassis/HdMdNxM4kEController.cs index b47139e2..90186587 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/HdMdNxM4kEController.cs +++ b/src/PepperDash.Essentials.DM/Chassis/HdMdNxM4kEController.cs @@ -1,169 +1,171 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.RegularExpressions; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DM; -using Newtonsoft.Json; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; -using PepperDash.Essentials.DM.Config; - -namespace PepperDash.Essentials.DM.Chassis -{ - [Obsolete("Please use HdMdNxM4kEBridgeable Controller")] - public class HdMdNxM4kEController : CrestronGenericBaseDevice, IRoutingInputsOutputs, IRouting - { - public HdMdNxM Chassis { get; private set; } - - public RoutingPortCollection InputPorts { get; private set; } - public RoutingPortCollection OutputPorts { get; private set; } - - - /// - /// - /// - /// - /// - /// - public HdMdNxM4kEController(string key, string name, HdMdNxM chassis, - HdMdNxM4kEPropertiesConfig props) - : base(key, name, chassis) - { - Debug.Console(0, this, "Type hdmd4x14ke is obsolete. Please use hdmd4x14ke-bridgeable"); - Chassis = chassis; - - // logical ports - InputPorts = new RoutingPortCollection(); - for (uint i = 1; i <= 4; i++) - { - InputPorts.Add(new RoutingInputPort("hdmiIn" + i, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, i, this)); - } - OutputPorts = new RoutingPortCollection(); - OutputPorts.Add(new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, null, this)); - - // physical settings - if (props != null && props.Inputs != null) - { - var inputRegex = new Regex(@"(?\d)", RegexOptions.IgnoreCase); - foreach (var kvp in props.Inputs) - { - // get numnbers from key and convert to int - //var inputNum = Convert.ToUInt32(kvp.Key.Substring(6)); - var inputMatch = inputRegex.Match(kvp.Key); - if (inputMatch == null) continue; - - var inputNum = Convert.ToUInt32(inputMatch.Groups["InputNum"].Value); - - var port = chassis.HdmiInputs[inputNum].HdmiInputPort; - // set hdcp disables - if (kvp.Value.DisableHdcp) - { - Debug.Console(0, this, "Configuration disables HDCP support on {0}", kvp.Key); - port.HdcpSupportOff(); - } - else - port.HdcpSupportOn(); - } - } - } - - public override bool CustomActivate() - { - var result = Chassis.Register(); - if (result != Crestron.SimplSharpPro.eDeviceRegistrationUnRegistrationResponse.Success) - { - Debug.Console(0, this, "Device registration failed: {0}", result); - return false; - } - - return base.CustomActivate(); - } - - - - #region IRouting Members - - public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) - { - // Try to make switch only when necessary. The unit appears to toggle when already selected. - var current = Chassis.HdmiOutputs[1].VideoOut; - if (current != Chassis.HdmiInputs[(uint)inputSelector]) - Chassis.HdmiOutputs[1].VideoOut = Chassis.HdmiInputs[(uint)inputSelector]; - } - - #endregion - - ///////////////////////////////////////////////////// - - /// - /// - /// - /// - /// - /// - /// - /// - /// /* - /* - public static HdMdNxM4kEController GetController(string key, string name, - string type, HdMdNxM4kEPropertiesConfig properties) - { - try - { - var ipid = properties.Control.IpIdInt; - var address = properties.Control.TcpSshProperties.Address; - - type = type.ToLower(); - if (type == "hdmd4x14ke") - { - Debug.Console(0, @"The 'hdmd4x14ke' device is not an Essentials Bridgeable device. - If an essentials Bridgeable Device is required, use the 'hdmd4x14ke-bridgeable' type"); - - var chassis = new HdMd4x14kE(ipid, address, Global.ControlSystem); - return new HdMdNxM4kEController(key, name, chassis, properties); - } - return null; - } - catch (Exception e) - { - Debug.Console(0, "ERROR Creating device key {0}: \r{1}", key, e); - return null; - } - }*/ - - #region Factory - - public class HdMdNxM4kEFactory : EssentialsDeviceFactory - { - public HdMdNxM4kEFactory() - { - TypeNames = new List() {"hdmd4x14ke"}; - } - - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - Debug.Console(1, "Factory Attempting to create new HD-MD-NxM-4K-E Device"); - - var props = JsonConvert.DeserializeObject(dc.Properties.ToString()); - - var type = dc.Type.ToLower(); - var control = props.Control; - var ipid = control.IpIdInt; - var address = control.TcpSshProperties.Address; - - return new HdMdNxM4kEController(dc.Key, dc.Name, new HdMd4x14kE(ipid, address, Global.ControlSystem), props); - - } - } - - #endregion - - } +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro.DM; +using Full.Newtonsoft.Json; + +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.DM.Config; + +namespace PepperDash.Essentials.DM.Chassis +{ + [Obsolete("Please use HdMdNxM4kEBridgeable Controller")] + public class HdMdNxM4kEController : CrestronGenericBaseDevice, IRoutingInputsOutputs, IRouting + { + public HdMdNxM Chassis { get; private set; } + + public RoutingPortCollection InputPorts { get; private set; } + public RoutingPortCollection OutputPorts { get; private set; } + + + /// + /// + /// + /// + /// + /// + public HdMdNxM4kEController(string key, string name, HdMdNxM chassis, + HdMdNxM4kEPropertiesConfig props) + : base(key, name, chassis) + { + Debug.Console(0, this, "Type hdmd4x14ke is obsolete. Please use hdmd4x14ke-bridgeable"); + Chassis = chassis; + + // logical ports + InputPorts = new RoutingPortCollection(); + for (uint i = 1; i <= 4; i++) + { + InputPorts.Add(new RoutingInputPort("hdmiIn" + i, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, i, this)); + } + OutputPorts = new RoutingPortCollection(); + OutputPorts.Add(new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, null, this)); + + // physical settings + if (props != null && props.Inputs != null) + { + var inputRegex = new Regex(@"(?\d)", RegexOptions.IgnoreCase); + foreach (var kvp in props.Inputs) + { + // get numnbers from key and convert to int + //var inputNum = Convert.ToUInt32(kvp.Key.Substring(6)); + var inputMatch = inputRegex.Match(kvp.Key); + if (inputMatch == null) continue; + + var inputNum = Convert.ToUInt32(inputMatch.Groups["InputNum"].Value); + + var port = chassis.HdmiInputs[inputNum].HdmiInputPort; + // set hdcp disables + if (kvp.Value.DisableHdcp) + { + Debug.Console(0, this, "Configuration disables HDCP support on {0}", kvp.Key); + port.HdcpSupportOff(); + } + else + port.HdcpSupportOn(); + } + } + } + + public override bool CustomActivate() + { + var result = Chassis.Register(); + if (result != Crestron.SimplSharpPro.eDeviceRegistrationUnRegistrationResponse.Success) + { + Debug.Console(0, this, "Device registration failed: {0}", result); + return false; + } + + return base.CustomActivate(); + } + + + + #region IRouting Members + + public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) + { + // Try to make switch only when necessary. The unit appears to toggle when already selected. + var current = Chassis.HdmiOutputs[1].VideoOut; + if (current != Chassis.HdmiInputs[(uint)inputSelector]) + Chassis.HdmiOutputs[1].VideoOut = Chassis.HdmiInputs[(uint)inputSelector]; + } + + #endregion + + ///////////////////////////////////////////////////// + + /// + /// + /// + /// + /// + /// + /// + /// + /// /* + /* + public static HdMdNxM4kEController GetController(string key, string name, + string type, HdMdNxM4kEPropertiesConfig properties) + { + try + { + var ipid = properties.Control.IpIdInt; + var address = properties.Control.TcpSshProperties.Address; + + type = type.ToLower(); + if (type == "hdmd4x14ke") + { + Debug.Console(0, @"The 'hdmd4x14ke' device is not an Essentials Bridgeable device. + If an essentials Bridgeable Device is required, use the 'hdmd4x14ke-bridgeable' type"); + + var chassis = new HdMd4x14kE(ipid, address, Global.ControlSystem); + return new HdMdNxM4kEController(key, name, chassis, properties); + } + return null; + } + catch (Exception e) + { + Debug.Console(0, "ERROR Creating device key {0}: \r{1}", key, e); + return null; + } + }*/ + + #region Factory + + public class HdMdNxM4kEFactory : EssentialsDeviceFactory + { + public HdMdNxM4kEFactory() + { + TypeNames = new List() {"hdmd4x14ke"}; + } + + + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + Debug.Console(1, "Factory Attempting to create new HD-MD-NxM-4K-E Device"); + + var props = JsonConvert.DeserializeObject(dc.Properties.ToString()); + + var type = dc.Type.ToLower(); + var control = props.Control; + var ipid = control.IpIdInt; + var address = control.TcpSshProperties.Address; + + return new HdMdNxM4kEController(dc.Key, dc.Name, new HdMd4x14kE(ipid, address, Global.ControlSystem), props); + + } + } + + #endregion + + } } \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Config/DMChassisConfig.cs b/src/PepperDash.Essentials.DM/Config/DMChassisConfig.cs similarity index 93% rename from essentials-framework/Essentials DM/Essentials_DM/Config/DMChassisConfig.cs rename to src/PepperDash.Essentials.DM/Config/DMChassisConfig.cs index 5e158985..21604140 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Config/DMChassisConfig.cs +++ b/src/PepperDash.Essentials.DM/Config/DMChassisConfig.cs @@ -1,8 +1,10 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using Crestron.SimplSharpPro.DM; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Converters; using PepperDash.Core; using PepperDash.Essentials.Core; diff --git a/essentials-framework/Essentials DM/Essentials_DM/Config/DeviceFactory.cs b/src/PepperDash.Essentials.DM/Config/DeviceFactory.cs similarity index 93% rename from essentials-framework/Essentials DM/Essentials_DM/Config/DeviceFactory.cs rename to src/PepperDash.Essentials.DM/Config/DeviceFactory.cs index 5c532ac5..0cd08ec2 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Config/DeviceFactory.cs +++ b/src/PepperDash.Essentials.DM/Config/DeviceFactory.cs @@ -1,51 +1,53 @@ -using System; -using System.Linq; -using System.Collections.Generic; -using Crestron.SimplSharp; -using Crestron.SimplSharp.CrestronIO; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DM; -using Crestron.SimplSharpPro.DM.AirMedia; -using Crestron.SimplSharpPro.UI; -using Crestron.SimplSharp.Reflection; - -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; -using PepperDash.Essentials.DM.AirMedia; -using PepperDash.Essentials.DM.Endpoints.DGEs; - -namespace PepperDash.Essentials.DM -{ - /// - /// Responsible for loading the type factories for this library - /// - public class DeviceFactory - { - public DeviceFactory() - { - var assy = Assembly.GetExecutingAssembly(); - PluginLoader.SetEssentialsAssembly(assy.GetName().Name, assy); - - var types = assy.GetTypes().Where(ct => typeof(IDeviceFactory).IsAssignableFrom(ct) && !ct.IsInterface && !ct.IsAbstract); - - if (types != null) - { - foreach (var type in types) - { - try - { - var factory = (IDeviceFactory)Crestron.SimplSharp.Reflection.Activator.CreateInstance(type); - factory.LoadTypeFactories(); - } - catch (Exception e) - { - Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to load type: '{1}' DeviceFactory: {0}", e, type.Name); - } - } - } - } - } +extern alias Full; + +using System; +using System.Linq; +using System.Collections.Generic; +using Crestron.SimplSharp; +using Crestron.SimplSharp.CrestronIO; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DM; +using Crestron.SimplSharpPro.DM.AirMedia; +using Crestron.SimplSharpPro.UI; +using Crestron.SimplSharp.Reflection; + +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.DM.AirMedia; +using PepperDash.Essentials.DM.Endpoints.DGEs; + +namespace PepperDash.Essentials.DM +{ + /// + /// Responsible for loading the type factories for this library + /// + public class DeviceFactory + { + public DeviceFactory() + { + var assy = Assembly.GetExecutingAssembly(); + PluginLoader.SetEssentialsAssembly(assy.GetName().Name, assy); + + var types = assy.GetTypes().Where(ct => typeof(IDeviceFactory).IsAssignableFrom(ct) && !ct.IsInterface && !ct.IsAbstract); + + if (types != null) + { + foreach (var type in types) + { + try + { + var factory = (IDeviceFactory)Crestron.SimplSharp.Reflection.Activator.CreateInstance(type); + factory.LoadTypeFactories(); + } + catch (Exception e) + { + Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to load type: '{1}' DeviceFactory: {0}", e, type.Name); + } + } + } + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Config/DmRmcConfig.cs b/src/PepperDash.Essentials.DM/Config/DmRmcConfig.cs similarity index 83% rename from essentials-framework/Essentials DM/Essentials_DM/Config/DmRmcConfig.cs rename to src/PepperDash.Essentials.DM/Config/DmRmcConfig.cs index 0c511d35..32d88bd5 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Config/DmRmcConfig.cs +++ b/src/PepperDash.Essentials.DM/Config/DmRmcConfig.cs @@ -1,8 +1,10 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using Crestron.SimplSharpPro.DM; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Converters; using PepperDash.Core; namespace PepperDash.Essentials.DM.Config diff --git a/essentials-framework/Essentials DM/Essentials_DM/Config/DmTxConfig.cs b/src/PepperDash.Essentials.DM/Config/DmTxConfig.cs similarity index 85% rename from essentials-framework/Essentials DM/Essentials_DM/Config/DmTxConfig.cs rename to src/PepperDash.Essentials.DM/Config/DmTxConfig.cs index 7727ed7f..c5c80b24 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Config/DmTxConfig.cs +++ b/src/PepperDash.Essentials.DM/Config/DmTxConfig.cs @@ -1,8 +1,10 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using Crestron.SimplSharpPro.DM; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Converters; using PepperDash.Core; namespace PepperDash.Essentials.DM.Config diff --git a/essentials-framework/Essentials DM/Essentials_DM/Config/DmpsRoutingConfig.cs b/src/PepperDash.Essentials.DM/Config/DmpsRoutingConfig.cs similarity index 88% rename from essentials-framework/Essentials DM/Essentials_DM/Config/DmpsRoutingConfig.cs rename to src/PepperDash.Essentials.DM/Config/DmpsRoutingConfig.cs index 2e13ec95..202455d0 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Config/DmpsRoutingConfig.cs +++ b/src/PepperDash.Essentials.DM/Config/DmpsRoutingConfig.cs @@ -1,8 +1,10 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using Crestron.SimplSharpPro.DM; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Converters; using PepperDash.Core; using PepperDash.Essentials.Core; diff --git a/essentials-framework/Essentials DM/Essentials_DM/Config/HdMdNxM4kEPropertiesConfig.cs b/src/PepperDash.Essentials.DM/Config/HdMdNxM4kEPropertiesConfig.cs similarity index 93% rename from essentials-framework/Essentials DM/Essentials_DM/Config/HdMdNxM4kEPropertiesConfig.cs rename to src/PepperDash.Essentials.DM/Config/HdMdNxM4kEPropertiesConfig.cs index f222694a..4b28df12 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Config/HdMdNxM4kEPropertiesConfig.cs +++ b/src/PepperDash.Essentials.DM/Config/HdMdNxM4kEPropertiesConfig.cs @@ -1,35 +1,37 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; using PepperDash.Core; namespace PepperDash.Essentials.DM.Config -{ - /// - /// Defines the properties section of HdMdNxM boxes - /// - public class HdMdNxM4kEPropertiesConfig - { - [JsonProperty("control")] - public ControlPropertiesConfig Control { get; set; } - - [JsonProperty("inputs")] - public Dictionary Inputs { get; set; } - } - - public class HdMdNxM4kEBridgeablePropertiesConfig - { - [JsonProperty("control")] - public ControlPropertiesConfig Control { get; set; } - - [JsonProperty("inputs")] - public Dictionary Inputs { get; set; } - - [JsonProperty("outputs")] - public Dictionary Outputs { get; set; } +{ + /// + /// Defines the properties section of HdMdNxM boxes + /// + public class HdMdNxM4kEPropertiesConfig + { + [JsonProperty("control")] + public ControlPropertiesConfig Control { get; set; } + + [JsonProperty("inputs")] + public Dictionary Inputs { get; set; } + } + + public class HdMdNxM4kEBridgeablePropertiesConfig + { + [JsonProperty("control")] + public ControlPropertiesConfig Control { get; set; } + + [JsonProperty("inputs")] + public Dictionary Inputs { get; set; } + + [JsonProperty("outputs")] + public Dictionary Outputs { get; set; } } } \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Config/InputPropertiesConfig.cs b/src/PepperDash.Essentials.DM/Config/InputPropertiesConfig.cs similarity index 95% rename from essentials-framework/Essentials DM/Essentials_DM/Config/InputPropertiesConfig.cs rename to src/PepperDash.Essentials.DM/Config/InputPropertiesConfig.cs index c95c359f..54fe978e 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Config/InputPropertiesConfig.cs +++ b/src/PepperDash.Essentials.DM/Config/InputPropertiesConfig.cs @@ -1,16 +1,16 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -namespace PepperDash.Essentials.DM.Config -{ - public class InputPropertiesConfig - { - public string Name { get; set; } - - public bool DisableHdcp { get; set; } - } + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +namespace PepperDash.Essentials.DM.Config +{ + public class InputPropertiesConfig + { + public string Name { get; set; } + + public bool DisableHdcp { get; set; } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/DmLite/HdMdxxxCEController.cs b/src/PepperDash.Essentials.DM/DmLite/HdMdxxxCEController.cs similarity index 99% rename from essentials-framework/Essentials DM/Essentials_DM/DmLite/HdMdxxxCEController.cs rename to src/PepperDash.Essentials.DM/DmLite/HdMdxxxCEController.cs index 60277c10..f7dd6fca 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/DmLite/HdMdxxxCEController.cs +++ b/src/PepperDash.Essentials.DM/DmLite/HdMdxxxCEController.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -8,7 +10,7 @@ using Crestron.SimplSharpPro.DeviceSupport; using Crestron.SimplSharpPro.DM; using Crestron.SimplSharpPro.DM.Endpoints; using Crestron.SimplSharpPro.DM.Endpoints.Receivers; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Bridges; @@ -222,53 +224,53 @@ namespace PepperDash.Essentials.DM //public int NumberOfComPorts { get { return 1; } } //#endregion public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { + { var joinMap = new HdMdxxxCEControllerJoinMap(joinStart); var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - if (bridge != null) - { - bridge.AddJoinMap(Key, joinMap); - } - else - { - Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); + + if (bridge != null) + { + bridge.AddJoinMap(Key, joinMap); + } + else + { + Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); } Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); - RemoteEndDetectedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RemoteEndDetected.JoinNumber]); - - trilist.SetSigTrueAction(joinMap.AutoRouteOn.JoinNumber, AutoRouteOn); - AutoRouteOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AutoRouteOn.JoinNumber]); - trilist.SetSigTrueAction(joinMap.AutoRouteOff.JoinNumber, AutoRouteOff); - AutoRouteOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.AutoRouteOff.JoinNumber]); - - trilist.SetSigTrueAction(joinMap.PriorityRoutingOn.JoinNumber, PriorityRouteOn); - PriorityRoutingOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PriorityRoutingOn.JoinNumber]); - trilist.SetSigTrueAction(joinMap.PriorityRoutingOff.JoinNumber, PriorityRouteOff); - PriorityRoutingOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PriorityRoutingOff.JoinNumber]); - - trilist.SetSigTrueAction(joinMap.InputOnScreenDisplayEnabled.JoinNumber, OnScreenDisplayEnable); - InputOnScreenDisplayEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.InputOnScreenDisplayEnabled.JoinNumber]); - trilist.SetSigTrueAction(joinMap.AutoRouteOff.JoinNumber, OnScreenDisplayDisable); - InputOnScreenDisplayEnabledFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.InputOnScreenDisplayDisabled.JoinNumber]); - - trilist.SetUShortSigAction(joinMap.VideoSource.JoinNumber, (i) => ExecuteSwitch(i, null, eRoutingSignalType.Video | eRoutingSignalType.Audio)); - VideoSourceFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoSource.JoinNumber]); - + IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); + RemoteEndDetectedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RemoteEndDetected.JoinNumber]); + + trilist.SetSigTrueAction(joinMap.AutoRouteOn.JoinNumber, AutoRouteOn); + AutoRouteOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AutoRouteOn.JoinNumber]); + trilist.SetSigTrueAction(joinMap.AutoRouteOff.JoinNumber, AutoRouteOff); + AutoRouteOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.AutoRouteOff.JoinNumber]); + + trilist.SetSigTrueAction(joinMap.PriorityRoutingOn.JoinNumber, PriorityRouteOn); + PriorityRoutingOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PriorityRoutingOn.JoinNumber]); + trilist.SetSigTrueAction(joinMap.PriorityRoutingOff.JoinNumber, PriorityRouteOff); + PriorityRoutingOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PriorityRoutingOff.JoinNumber]); + + trilist.SetSigTrueAction(joinMap.InputOnScreenDisplayEnabled.JoinNumber, OnScreenDisplayEnable); + InputOnScreenDisplayEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.InputOnScreenDisplayEnabled.JoinNumber]); + trilist.SetSigTrueAction(joinMap.AutoRouteOff.JoinNumber, OnScreenDisplayDisable); + InputOnScreenDisplayEnabledFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.InputOnScreenDisplayDisabled.JoinNumber]); + + trilist.SetUShortSigAction(joinMap.VideoSource.JoinNumber, (i) => ExecuteSwitch(i, null, eRoutingSignalType.Video | eRoutingSignalType.Audio)); + VideoSourceFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoSource.JoinNumber]); + trilist.UShortInput[joinMap.SourceCount.JoinNumber].UShortValue = (ushort)InputPorts.Count; foreach (var input in InputPorts) { - var number = Convert.ToUInt16(input.Selector); - var numberJoin = (UInt16)(number - 1); - SyncDetectedFeedbacks[number].LinkInputSig(trilist.BooleanInput[joinMap.SyncDetected.JoinNumber + numberJoin]); + var number = Convert.ToUInt16(input.Selector); + var numberJoin = (UInt16)(number - 1); + SyncDetectedFeedbacks[number].LinkInputSig(trilist.BooleanInput[joinMap.SyncDetected.JoinNumber + numberJoin]); trilist.StringInput[joinMap.SourceNames.JoinNumber + numberJoin].StringValue = input.Key; } } diff --git a/essentials-framework/Essentials DM/Essentials_DM/DmPortName.cs b/src/PepperDash.Essentials.DM/DmPortName.cs similarity index 100% rename from essentials-framework/Essentials DM/Essentials_DM/DmPortName.cs rename to src/PepperDash.Essentials.DM/DmPortName.cs diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/DGEs/Dge100Controller.cs b/src/PepperDash.Essentials.DM/Endpoints/DGEs/Dge100Controller.cs similarity index 97% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/DGEs/Dge100Controller.cs rename to src/PepperDash.Essentials.DM/Endpoints/DGEs/Dge100Controller.cs index ea220a13..912f1498 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/DGEs/Dge100Controller.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/DGEs/Dge100Controller.cs @@ -1,35 +1,37 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; -using System.Linq; -using System.Net.Sockets; +using System.Linq; +using System.Net.Sockets; using System.Text; using Crestron.SimplSharp; using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.UI; - -using Crestron.SimplSharpPro.DM; +using Crestron.SimplSharpPro.UI; + +using Crestron.SimplSharpPro.DM; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Config; -using Crestron.SimplSharpPro.DeviceSupport; -using PepperDash.Essentials.Core.DeviceInfo; - +using Crestron.SimplSharpPro.DeviceSupport; +using PepperDash.Essentials.Core.DeviceInfo; + namespace PepperDash.Essentials.DM.Endpoints.DGEs { [Description("Wrapper class for DGE-100")] - public class Dge100Controller : CrestronGenericBaseDevice, IComPorts, IIROutputPorts, IHasBasicTriListWithSmartObject, ICec, IDeviceInfoProvider - { - private const int CtpPort = 41795; - private readonly Dge100 _dge; - - private readonly TsxCcsUcCodec100EthernetReservedSigs _dgeEthernetInfo; - - public BasicTriListWithSmartObject Panel { get { return _dge; } } - + public class Dge100Controller : CrestronGenericBaseDevice, IComPorts, IIROutputPorts, IHasBasicTriListWithSmartObject, ICec, IDeviceInfoProvider + { + private const int CtpPort = 41795; + private readonly Dge100 _dge; + + private readonly TsxCcsUcCodec100EthernetReservedSigs _dgeEthernetInfo; + + public BasicTriListWithSmartObject Panel { get { return _dge; } } + private DeviceConfig _dc; CrestronTouchpanelPropertiesConfig PropertiesConfig; @@ -37,13 +39,13 @@ namespace PepperDash.Essentials.DM.Endpoints.DGEs public Dge100Controller(string key, string name, Dge100 device, DeviceConfig dc, CrestronTouchpanelPropertiesConfig props) :base(key, name, device) { - _dge = device; - _dgeEthernetInfo = _dge.ExtenderEthernetReservedSigs; - //_dgeEthernetInfo.DeviceExtenderSigChange += (extender, args) => UpdateDeviceInfo(); - _dgeEthernetInfo.Use(); - - DeviceInfo = new DeviceInfo(); - + _dge = device; + _dgeEthernetInfo = _dge.ExtenderEthernetReservedSigs; + //_dgeEthernetInfo.DeviceExtenderSigChange += (extender, args) => UpdateDeviceInfo(); + _dgeEthernetInfo.Use(); + + DeviceInfo = new DeviceInfo(); + _dge.OnlineStatusChange += (currentDevice, args) => { if (args.DeviceOnLine) UpdateDeviceInfo(); }; _dc = dc; @@ -77,117 +79,117 @@ namespace PepperDash.Essentials.DM.Endpoints.DGEs get { return _dge.NumberOfIROutputPorts; } } - #endregion - - #region ICec Members - public Cec StreamCec { get { return _dge.HdmiOut.StreamCec; } } - #endregion - - #region Implementation of IDeviceInfoProvider - - public DeviceInfo DeviceInfo { get; private set; } - - public event DeviceInfoChangeHandler DeviceInfoChanged; - - public void UpdateDeviceInfo() - { - DeviceInfo.IpAddress = _dgeEthernetInfo.IpAddressFeedback.StringValue; - DeviceInfo.MacAddress = _dgeEthernetInfo.MacAddressFeedback.StringValue; - - GetFirmwareAndSerialInfo(); - - OnDeviceInfoChange(); - } - - private void GetFirmwareAndSerialInfo() - { - if (String.IsNullOrEmpty(_dgeEthernetInfo.IpAddressFeedback.StringValue)) - { - Debug.Console(1, this, "IP Address information not yet received. No device is online"); - return; - } - - var tcpClient = new GenericTcpIpClient("", _dgeEthernetInfo.IpAddressFeedback.StringValue, CtpPort, 1024){AutoReconnect = false}; - - var gather = new CommunicationGather(tcpClient, "\r\n\r\n"); - - tcpClient.ConnectionChange += (sender, args) => - { - if (!args.Client.IsConnected) - { - return; - } - - args.Client.SendText("ver\r\n"); - }; - - gather.LineReceived += (sender, args) => - { - try - { - Debug.Console(1, this, "{0}", args.Text); - - if (args.Text.ToLower().Contains("host")) - { - DeviceInfo.HostName = args.Text.Split(':')[1].Trim(); - - Debug.Console(1, this, "hostname: {0}", DeviceInfo.HostName); - tcpClient.Disconnect(); - return; - } - - //ignore console prompt - /*if (args.Text.ToLower().Contains(">")) - { - Debug.Console(1, this, "Ignoring console"); - return; - } - - if (args.Text.ToLower().Contains("dge")) - { - Debug.Console(1, this, "Ignoring DGE"); - return; - }*/ - - if (!args.Text.Contains('[')) - { - return; - } - var splitResponse = args.Text.Split('['); - - foreach (string t in splitResponse) - { - Debug.Console(1, this, "{0}", t); - } - - DeviceInfo.SerialNumber = splitResponse[1].Split(' ')[4].Replace("#", ""); - DeviceInfo.FirmwareVersion = splitResponse[1].Split(' ')[0]; - - Debug.Console(1, this, "Firmware: {0} SerialNumber: {1}", DeviceInfo.FirmwareVersion, - DeviceInfo.SerialNumber); - - tcpClient.SendText("host\r\n"); - } - catch (Exception ex) - { - Debug.Console(0, this, "Exception getting data: {0}", ex.Message); - Debug.Console(0, this, "response: {0}", args.Text); - } - }; - - tcpClient.Connect(); - } - - private void OnDeviceInfoChange() - { - var handler = DeviceInfoChanged; - - if (handler == null) return; - - handler(this, new DeviceInfoEventArgs(DeviceInfo)); - } - - #endregion + #endregion + + #region ICec Members + public Cec StreamCec { get { return _dge.HdmiOut.StreamCec; } } + #endregion + + #region Implementation of IDeviceInfoProvider + + public DeviceInfo DeviceInfo { get; private set; } + + public event DeviceInfoChangeHandler DeviceInfoChanged; + + public void UpdateDeviceInfo() + { + DeviceInfo.IpAddress = _dgeEthernetInfo.IpAddressFeedback.StringValue; + DeviceInfo.MacAddress = _dgeEthernetInfo.MacAddressFeedback.StringValue; + + GetFirmwareAndSerialInfo(); + + OnDeviceInfoChange(); + } + + private void GetFirmwareAndSerialInfo() + { + if (String.IsNullOrEmpty(_dgeEthernetInfo.IpAddressFeedback.StringValue)) + { + Debug.Console(1, this, "IP Address information not yet received. No device is online"); + return; + } + + var tcpClient = new GenericTcpIpClient("", _dgeEthernetInfo.IpAddressFeedback.StringValue, CtpPort, 1024){AutoReconnect = false}; + + var gather = new CommunicationGather(tcpClient, "\r\n\r\n"); + + tcpClient.ConnectionChange += (sender, args) => + { + if (!args.Client.IsConnected) + { + return; + } + + args.Client.SendText("ver\r\n"); + }; + + gather.LineReceived += (sender, args) => + { + try + { + Debug.Console(1, this, "{0}", args.Text); + + if (args.Text.ToLower().Contains("host")) + { + DeviceInfo.HostName = args.Text.Split(':')[1].Trim(); + + Debug.Console(1, this, "hostname: {0}", DeviceInfo.HostName); + tcpClient.Disconnect(); + return; + } + + //ignore console prompt + /*if (args.Text.ToLower().Contains(">")) + { + Debug.Console(1, this, "Ignoring console"); + return; + } + + if (args.Text.ToLower().Contains("dge")) + { + Debug.Console(1, this, "Ignoring DGE"); + return; + }*/ + + if (!args.Text.Contains('[')) + { + return; + } + var splitResponse = args.Text.Split('['); + + foreach (string t in splitResponse) + { + Debug.Console(1, this, "{0}", t); + } + + DeviceInfo.SerialNumber = splitResponse[1].Split(' ')[4].Replace("#", ""); + DeviceInfo.FirmwareVersion = splitResponse[1].Split(' ')[0]; + + Debug.Console(1, this, "Firmware: {0} SerialNumber: {1}", DeviceInfo.FirmwareVersion, + DeviceInfo.SerialNumber); + + tcpClient.SendText("host\r\n"); + } + catch (Exception ex) + { + Debug.Console(0, this, "Exception getting data: {0}", ex.Message); + Debug.Console(0, this, "response: {0}", args.Text); + } + }; + + tcpClient.Connect(); + } + + private void OnDeviceInfoChange() + { + var handler = DeviceInfoChanged; + + if (handler == null) return; + + handler(this, new DeviceInfoEventArgs(DeviceInfo)); + } + + #endregion } public class Dge100ControllerFactory : EssentialsDeviceFactory diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/DGEs/DgePropertiesConfig.cs b/src/PepperDash.Essentials.DM/Endpoints/DGEs/DgePropertiesConfig.cs similarity index 83% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/DGEs/DgePropertiesConfig.cs rename to src/PepperDash.Essentials.DM/Endpoints/DGEs/DgePropertiesConfig.cs index 2b741efa..e468161f 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/DGEs/DgePropertiesConfig.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/DGEs/DgePropertiesConfig.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -6,7 +8,7 @@ using Crestron.SimplSharp; using PepperDash.Core; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.DM.Endpoints.DGEs { diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/DGEs/DmDge200CController.cs b/src/PepperDash.Essentials.DM/Endpoints/DGEs/DmDge200CController.cs similarity index 95% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/DGEs/DmDge200CController.cs rename to src/PepperDash.Essentials.DM/Endpoints/DGEs/DmDge200CController.cs index 31da45b2..57131d60 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/DGEs/DmDge200CController.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/DGEs/DmDge200CController.cs @@ -1,94 +1,96 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.UI; - -using Newtonsoft.Json; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; -using Crestron.SimplSharpPro.DeviceSupport; - -using Crestron.SimplSharpPro.DM; - -namespace PepperDash.Essentials.DM.Endpoints.DGEs -{ - /// - /// Wrapper class for DGE-100 and DM-DGE-200-C - /// - [Description("Wrapper class for DM-DGE-200-C")] - public class DmDge200CController : Dge100Controller, IRoutingInputsOutputs - { - private readonly DmDge200C _dge; - - public RoutingInputPort DmIn { get; private set; } - public RoutingOutputPort HdmiOut { get; private set; } - - public RoutingPortCollection InputPorts - { - get; - private set; - } - - public RoutingPortCollection OutputPorts - { - get; - private set; - } - - public DmDge200CController(string key, string name, DmDge200C device, DeviceConfig dc, CrestronTouchpanelPropertiesConfig props) - : base(key, name, device, dc, props) - { - _dge = device; - - DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo, - eRoutingPortConnectionType.DmCat, 0, this); - HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo, - eRoutingPortConnectionType.Hdmi, null, this); - - - InputPorts = new RoutingPortCollection { DmIn }; - OutputPorts = new RoutingPortCollection { HdmiOut }; - - // Set Ports for CEC - HdmiOut.Port = _dge.HdmiOut; ; - - } - - public class DmDge200CControllerFactory : EssentialsDeviceFactory - { - public DmDge200CControllerFactory() - { - TypeNames = new List() { "dmdge200c" }; - } - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - var typeName = dc.Type.ToLower(); - var comm = CommFactory.GetControlPropertiesConfig(dc); - var props = JsonConvert.DeserializeObject(dc.Properties.ToString()); - - Debug.Console(1, "Factory Attempting to create new DgeController Device"); - - DmDge200C dgeDevice = null; - - if (typeName == "dmdge200c") - dgeDevice = new DmDge200C(comm.IpIdInt, Global.ControlSystem); - - if (dgeDevice == null) - { - Debug.Console(1, "Unable to create DGE device"); - return null; - } - - var dgeController = new DmDge200CController(dc.Key , dc.Name, dgeDevice, dc, props); - - return dgeController; - } - } - } +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.UI; + +using Full.Newtonsoft.Json; + +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Config; +using Crestron.SimplSharpPro.DeviceSupport; + +using Crestron.SimplSharpPro.DM; + +namespace PepperDash.Essentials.DM.Endpoints.DGEs +{ + /// + /// Wrapper class for DGE-100 and DM-DGE-200-C + /// + [Description("Wrapper class for DM-DGE-200-C")] + public class DmDge200CController : Dge100Controller, IRoutingInputsOutputs + { + private readonly DmDge200C _dge; + + public RoutingInputPort DmIn { get; private set; } + public RoutingOutputPort HdmiOut { get; private set; } + + public RoutingPortCollection InputPorts + { + get; + private set; + } + + public RoutingPortCollection OutputPorts + { + get; + private set; + } + + public DmDge200CController(string key, string name, DmDge200C device, DeviceConfig dc, CrestronTouchpanelPropertiesConfig props) + : base(key, name, device, dc, props) + { + _dge = device; + + DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo, + eRoutingPortConnectionType.DmCat, 0, this); + HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo, + eRoutingPortConnectionType.Hdmi, null, this); + + + InputPorts = new RoutingPortCollection { DmIn }; + OutputPorts = new RoutingPortCollection { HdmiOut }; + + // Set Ports for CEC + HdmiOut.Port = _dge.HdmiOut; ; + + } + + public class DmDge200CControllerFactory : EssentialsDeviceFactory + { + public DmDge200CControllerFactory() + { + TypeNames = new List() { "dmdge200c" }; + } + + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + var typeName = dc.Type.ToLower(); + var comm = CommFactory.GetControlPropertiesConfig(dc); + var props = JsonConvert.DeserializeObject(dc.Properties.ToString()); + + Debug.Console(1, "Factory Attempting to create new DgeController Device"); + + DmDge200C dgeDevice = null; + + if (typeName == "dmdge200c") + dgeDevice = new DmDge200C(comm.IpIdInt, Global.ControlSystem); + + if (dgeDevice == null) + { + Debug.Console(1, "Unable to create DGE device"); + return null; + } + + var dgeController = new DmDge200CController(dc.Key , dc.Name, dgeDevice, dc, props); + + return dgeController; + } + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmHdBaseTEndpointController.cs b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmHdBaseTEndpointController.cs similarity index 96% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmHdBaseTEndpointController.cs rename to src/PepperDash.Essentials.DM/Endpoints/Receivers/DmHdBaseTEndpointController.cs index ec3553a1..4a4ac67d 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmHdBaseTEndpointController.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmHdBaseTEndpointController.cs @@ -1,10 +1,12 @@ -using Crestron.SimplSharpPro.DeviceSupport; +extern alias Full; + +using Crestron.SimplSharpPro.DeviceSupport; using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.DM.Endpoints.Receivers; using PepperDash.Essentials.Core.Bridges; using PepperDash.Essentials.Core; using PepperDash.Core; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.DM { diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc100SController.cs b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc100SController.cs similarity index 99% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc100SController.cs rename to src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc100SController.cs index b67b6584..90f6b3fb 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc100SController.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc100SController.cs @@ -11,7 +11,7 @@ namespace PepperDash.Essentials.DM /// /// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions /// - /// + /// [Description("Wrapper Class for DM-RMC-100-S")] public class DmRmc100SController : DmRmcControllerBase, IRoutingInputsOutputs, IIROutputPorts, IComPorts, ICec diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc150SController.cs b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc150SController.cs similarity index 99% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc150SController.cs rename to src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc150SController.cs index f33dd5be..39d1fd83 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc150SController.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc150SController.cs @@ -11,7 +11,7 @@ namespace PepperDash.Essentials.DM /// /// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions /// - /// + /// [Description("Wrapper Class for DM-RMC-150-S")] public class DmRmc150SController : DmRmcControllerBase, IRoutingInputsOutputs, IIROutputPorts, IComPorts, ICec diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc200CController.cs b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc200CController.cs similarity index 99% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc200CController.cs rename to src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc200CController.cs index ed5bd378..e7699e85 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc200CController.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc200CController.cs @@ -12,15 +12,15 @@ namespace PepperDash.Essentials.DM /// /// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions /// - /// - [Description("Wrapper Class for DM-RMC-200-C")] + /// + [Description("Wrapper Class for DM-RMC-200-C")] public class DmRmc200CController : DmRmcControllerBase, IRoutingInputsOutputs, IIROutputPorts, IComPorts, ICec { private readonly DmRmc200C _rmc; public RoutingInputPort DmIn { get; private set; } - public RoutingOutputPort HdmiOut { get; private set; } + public RoutingOutputPort HdmiOut { get; private set; } public RoutingPortCollection InputPorts { diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc200S2Controller.cs b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc200S2Controller.cs similarity index 99% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc200S2Controller.cs rename to src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc200S2Controller.cs index 6633af15..e329784f 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc200S2Controller.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc200S2Controller.cs @@ -12,8 +12,8 @@ namespace PepperDash.Essentials.DM /// /// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions /// - /// - [Description("Wrapper Class for DM-RMC-200-S2")] + /// + [Description("Wrapper Class for DM-RMC-200-S2")] public class DmRmc200S2Controller : DmRmcControllerBase, IRoutingInputsOutputs, IIROutputPorts, IComPorts, ICec { diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc200SController.cs b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc200SController.cs similarity index 99% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc200SController.cs rename to src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc200SController.cs index 4ccae3e9..86e937c7 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc200SController.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc200SController.cs @@ -12,8 +12,8 @@ namespace PepperDash.Essentials.DM /// /// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions /// - /// - [Description("Wrapper Class for DM-RMC-200-S")] + /// + [Description("Wrapper Class for DM-RMC-200-S")] public class DmRmc200SController : DmRmcControllerBase, IRoutingInputsOutputs, IIROutputPorts, IComPorts, ICec { diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc4KScalerCController.cs b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc4KScalerCController.cs similarity index 99% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc4KScalerCController.cs rename to src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc4KScalerCController.cs index 052f0726..8d4abadd 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc4KScalerCController.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc4KScalerCController.cs @@ -12,8 +12,8 @@ namespace PepperDash.Essentials.DM /// /// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions /// - /// - [Description("Wrapper Class for DM-RMC-4K-SCALER-C")] + /// + [Description("Wrapper Class for DM-RMC-4K-SCALER-C")] public class DmRmc4kScalerCController : DmRmcControllerBase, IRoutingInputsOutputs, IBasicVolumeWithFeedback, IIROutputPorts, IComPorts, ICec, IRelayPorts { diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc4k100C1GController.cs b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc4k100C1GController.cs similarity index 97% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc4k100C1GController.cs rename to src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc4k100C1GController.cs index 529f740a..0664818d 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc4k100C1GController.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc4k100C1GController.cs @@ -1,16 +1,18 @@ -using Crestron.SimplSharpPro; +extern alias Full; + +using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.DM; -using Crestron.SimplSharpPro.DM.Endpoints.Receivers; -using Crestron.SimplSharpPro.DeviceSupport; -using PepperDash.Essentials.Core.Bridges; -using PepperDash.Essentials.Core; -using PepperDash.Core; -using Newtonsoft.Json; +using Crestron.SimplSharpPro.DM.Endpoints.Receivers; +using Crestron.SimplSharpPro.DeviceSupport; +using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core; +using PepperDash.Core; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.DM -{ - - [Description("Wrapper Class for DM-RMC-4K-100-C-1G")] +{ + + [Description("Wrapper Class for DM-RMC-4K-100-C-1G")] public class DmRmc4k100C1GController : DmHdBaseTControllerBase, IRoutingInputsOutputs, IIROutputPorts, IComPorts, ICec { @@ -33,30 +35,30 @@ namespace PepperDash.Essentials.DM InputPorts = new RoutingPortCollection {DmIn}; OutputPorts = new RoutingPortCollection {HdmiOut}; - } - - public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - var joinMap = new DmRmcControllerJoinMap(joinStart); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - if (bridge != null) - { - bridge.AddJoinMap(Key, joinMap); - } - else - { - Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); - } - - Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - - IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); - trilist.StringInput[joinMap.Name.JoinNumber].StringValue = this.Name; + } + + public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + var joinMap = new DmRmcControllerJoinMap(joinStart); + + var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); + + if (bridge != null) + { + bridge.AddJoinMap(Key, joinMap); + } + else + { + Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); + } + + Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); + + IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); + trilist.StringInput[joinMap.Name.JoinNumber].StringValue = this.Name; } #region IIROutputPorts Members diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc4kScalerCDspController.cs b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc4kScalerCDspController.cs similarity index 99% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc4kScalerCDspController.cs rename to src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc4kScalerCDspController.cs index a7c83e35..5c6db1aa 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc4kScalerCDspController.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc4kScalerCDspController.cs @@ -12,8 +12,8 @@ namespace PepperDash.Essentials.DM /// /// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions /// - /// - [Description("Wrapper Class for DM-RMC-4K-SCALER-C-DSP")] + /// + [Description("Wrapper Class for DM-RMC-4K-SCALER-C-DSP")] public class DmRmc4kScalerCDspController : DmRmcControllerBase, IRoutingInputsOutputs, IBasicVolumeWithFeedback, IIROutputPorts, IComPorts, ICec, IRelayPorts { diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc4kZ100CController.cs b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc4kZ100CController.cs similarity index 99% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc4kZ100CController.cs rename to src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc4kZ100CController.cs index febcc9dc..3e3f56f9 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc4kZ100CController.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc4kZ100CController.cs @@ -7,8 +7,8 @@ using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Bridges; namespace PepperDash.Essentials.DM -{ - [Description("Wrapper Class for DM-RMC-4K-Z-100-C")] +{ + [Description("Wrapper Class for DM-RMC-4K-Z-100-C")] public class DmRmc4kZ100CController : DmRmcX100CController { private readonly DmRmc4kz100C _rmc; diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc4kZScalerCController.cs b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc4kZScalerCController.cs similarity index 97% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc4kZScalerCController.cs rename to src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc4kZScalerCController.cs index 73dd59b9..eef6ea16 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc4kZScalerCController.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmc4kZScalerCController.cs @@ -1,185 +1,185 @@ -using System; -using System.Linq; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.DM; -using Crestron.SimplSharpPro.DM.Endpoints; -using Crestron.SimplSharpPro.DM.Endpoints.Receivers; - -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Bridges; -using PepperDash.Core; - -namespace PepperDash.Essentials.DM -{ - [Description("Wrapper Class for DM-RMC-4K-Z-SCALER-C")] - public class DmRmc4kZScalerCController : DmRmcControllerBase, IRmcRoutingWithFeedback, - IIROutputPorts, IComPorts, ICec, IRelayPorts - { - private readonly DmRmc4kzScalerC _rmc; - - public RoutingInputPort DmIn { get; private set; } - public RoutingInputPort HdmiIn { get; private set; } - public RoutingOutputPort HdmiOut { get; private set; } - - /// - /// The value of the current video source for the HDMI output on the receiver - /// - public IntFeedback AudioVideoSourceNumericFeedback { get; private set; } - - public RoutingPortCollection InputPorts { get; private set; } - - public RoutingPortCollection OutputPorts { get; private set; } - - //IroutingNumericEvent - public event EventHandler NumericSwitchChange; - - /// - /// Raise an event when the status of a switch object changes. - /// - /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType - private void OnSwitchChange(RoutingNumericEventArgs e) - { - var newEvent = NumericSwitchChange; - if (newEvent != null) newEvent(this, e); +using System; +using System.Linq; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.DM; +using Crestron.SimplSharpPro.DM.Endpoints; +using Crestron.SimplSharpPro.DM.Endpoints.Receivers; + +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Bridges; +using PepperDash.Core; + +namespace PepperDash.Essentials.DM +{ + [Description("Wrapper Class for DM-RMC-4K-Z-SCALER-C")] + public class DmRmc4kZScalerCController : DmRmcControllerBase, IRmcRoutingWithFeedback, + IIROutputPorts, IComPorts, ICec, IRelayPorts + { + private readonly DmRmc4kzScalerC _rmc; + + public RoutingInputPort DmIn { get; private set; } + public RoutingInputPort HdmiIn { get; private set; } + public RoutingOutputPort HdmiOut { get; private set; } + + /// + /// The value of the current video source for the HDMI output on the receiver + /// + public IntFeedback AudioVideoSourceNumericFeedback { get; private set; } + + public RoutingPortCollection InputPorts { get; private set; } + + public RoutingPortCollection OutputPorts { get; private set; } + + //IroutingNumericEvent + public event EventHandler NumericSwitchChange; + + /// + /// Raise an event when the status of a switch object changes. + /// + /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType + private void OnSwitchChange(RoutingNumericEventArgs e) + { + var newEvent = NumericSwitchChange; + if (newEvent != null) newEvent(this, e); } - - - public DmRmc4kZScalerCController(string key, string name, DmRmc4kzScalerC rmc) - : base(key, name, rmc) - { - _rmc = rmc; - DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo, - eRoutingPortConnectionType.DmCat, 0, this) - { - FeedbackMatchObject = 1 - }; - HdmiIn = new RoutingInputPort(DmPortName.HdmiIn, eRoutingSignalType.AudioVideo, - eRoutingPortConnectionType.Hdmi, 0, this) - { - FeedbackMatchObject = 2 - }; - HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo, - eRoutingPortConnectionType.Hdmi, null, this); - - EdidManufacturerFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue); - EdidNameFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Name.StringValue); - EdidPreferredTimingFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue); - EdidSerialNumberFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue); - - VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString()); - - InputPorts = new RoutingPortCollection {DmIn, HdmiIn}; - OutputPorts = new RoutingPortCollection {HdmiOut}; - - _rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange; - _rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange; - - _rmc.OnlineStatusChange += _rmc_OnlineStatusChange; - - // Set Ports for CEC - HdmiOut.Port = _rmc.HdmiOutput; - - AudioVideoSourceNumericFeedback = new IntFeedback(() => (ushort)(_rmc.SelectedSourceFeedback)); - } - - private void _rmc_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) - { - AudioVideoSourceNumericFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(1, AudioVideoSourceNumericFeedback.UShortValue, eRoutingSignalType.AudioVideo)); - } - - void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args) - { - if (args.EventId == EndpointOutputStreamEventIds.HorizontalResolutionFeedbackEventId || args.EventId == EndpointOutputStreamEventIds.VerticalResolutionFeedbackEventId || - args.EventId == EndpointOutputStreamEventIds.FramesPerSecondFeedbackEventId) - { - VideoOutputResolutionFeedback.FireUpdate(); - } - - if (args.EventId == EndpointOutputStreamEventIds.SelectedSourceFeedbackEventId) - { - var localInputPort = - InputPorts.FirstOrDefault(p => (int)p.FeedbackMatchObject == AudioVideoSourceNumericFeedback.UShortValue); - - - AudioVideoSourceNumericFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(1, AudioVideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localInputPort, eRoutingSignalType.AudioVideo)); - } - } - - void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args) - { - switch (args.EventId) - { - case ConnectedDeviceEventIds.ManufacturerEventId: - EdidManufacturerFeedback.FireUpdate(); - break; - case ConnectedDeviceEventIds.NameEventId: - EdidNameFeedback.FireUpdate(); - break; - case ConnectedDeviceEventIds.PreferredTimingEventId: - EdidPreferredTimingFeedback.FireUpdate(); - break; - case ConnectedDeviceEventIds.SerialNumberEventId: - EdidSerialNumberFeedback.FireUpdate(); - break; - } - } - - public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - LinkDmRmcToApi(this, trilist, joinStart, joinMapKey, bridge); - } - - #region IIROutputPorts Members - public CrestronCollection IROutputPorts { get { return _rmc.IROutputPorts; } } - public int NumberOfIROutputPorts { get { return _rmc.NumberOfIROutputPorts; } } - #endregion - - #region IComPorts Members - public CrestronCollection ComPorts { get { return _rmc.ComPorts; } } - public int NumberOfComPorts { get { return _rmc.NumberOfComPorts; } } - #endregion - - #region ICec Members - /// - /// Gets the CEC stream directly from the HDMI port. - /// - public Cec StreamCec { get { return _rmc.HdmiOutput.StreamCec; } } - #endregion - - - #region IRmcRouting Members - public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) - { - Debug.Console(2, this, "Attempting a route from input {0} to HDMI Output", inputSelector); - - var number = Convert.ToUInt16(inputSelector); - - _rmc.AudioVideoSource = (DmRmc4kzScalerC.eAudioVideoSource)number; - } - - public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType signalType) - { - Debug.Console(2, this, "Attempting a route from input {0} to HDMI Output", inputSelector); - - _rmc.AudioVideoSource = (DmRmc4kzScalerC.eAudioVideoSource)inputSelector; - } - #endregion - - #region Implementation of IRelayPorts - - public CrestronCollection RelayPorts - { - get { return _rmc.RelayPorts; } - } - - public int NumberOfRelayPorts - { - get { return _rmc.NumberOfRelayPorts; } - } - - #endregion - } + + + public DmRmc4kZScalerCController(string key, string name, DmRmc4kzScalerC rmc) + : base(key, name, rmc) + { + _rmc = rmc; + DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo, + eRoutingPortConnectionType.DmCat, 0, this) + { + FeedbackMatchObject = 1 + }; + HdmiIn = new RoutingInputPort(DmPortName.HdmiIn, eRoutingSignalType.AudioVideo, + eRoutingPortConnectionType.Hdmi, 0, this) + { + FeedbackMatchObject = 2 + }; + HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo, + eRoutingPortConnectionType.Hdmi, null, this); + + EdidManufacturerFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue); + EdidNameFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Name.StringValue); + EdidPreferredTimingFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue); + EdidSerialNumberFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue); + + VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString()); + + InputPorts = new RoutingPortCollection {DmIn, HdmiIn}; + OutputPorts = new RoutingPortCollection {HdmiOut}; + + _rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange; + _rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange; + + _rmc.OnlineStatusChange += _rmc_OnlineStatusChange; + + // Set Ports for CEC + HdmiOut.Port = _rmc.HdmiOutput; + + AudioVideoSourceNumericFeedback = new IntFeedback(() => (ushort)(_rmc.SelectedSourceFeedback)); + } + + private void _rmc_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) + { + AudioVideoSourceNumericFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(1, AudioVideoSourceNumericFeedback.UShortValue, eRoutingSignalType.AudioVideo)); + } + + void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args) + { + if (args.EventId == EndpointOutputStreamEventIds.HorizontalResolutionFeedbackEventId || args.EventId == EndpointOutputStreamEventIds.VerticalResolutionFeedbackEventId || + args.EventId == EndpointOutputStreamEventIds.FramesPerSecondFeedbackEventId) + { + VideoOutputResolutionFeedback.FireUpdate(); + } + + if (args.EventId == EndpointOutputStreamEventIds.SelectedSourceFeedbackEventId) + { + var localInputPort = + InputPorts.FirstOrDefault(p => (int)p.FeedbackMatchObject == AudioVideoSourceNumericFeedback.UShortValue); + + + AudioVideoSourceNumericFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(1, AudioVideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localInputPort, eRoutingSignalType.AudioVideo)); + } + } + + void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args) + { + switch (args.EventId) + { + case ConnectedDeviceEventIds.ManufacturerEventId: + EdidManufacturerFeedback.FireUpdate(); + break; + case ConnectedDeviceEventIds.NameEventId: + EdidNameFeedback.FireUpdate(); + break; + case ConnectedDeviceEventIds.PreferredTimingEventId: + EdidPreferredTimingFeedback.FireUpdate(); + break; + case ConnectedDeviceEventIds.SerialNumberEventId: + EdidSerialNumberFeedback.FireUpdate(); + break; + } + } + + public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + LinkDmRmcToApi(this, trilist, joinStart, joinMapKey, bridge); + } + + #region IIROutputPorts Members + public CrestronCollection IROutputPorts { get { return _rmc.IROutputPorts; } } + public int NumberOfIROutputPorts { get { return _rmc.NumberOfIROutputPorts; } } + #endregion + + #region IComPorts Members + public CrestronCollection ComPorts { get { return _rmc.ComPorts; } } + public int NumberOfComPorts { get { return _rmc.NumberOfComPorts; } } + #endregion + + #region ICec Members + /// + /// Gets the CEC stream directly from the HDMI port. + /// + public Cec StreamCec { get { return _rmc.HdmiOutput.StreamCec; } } + #endregion + + + #region IRmcRouting Members + public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) + { + Debug.Console(2, this, "Attempting a route from input {0} to HDMI Output", inputSelector); + + var number = Convert.ToUInt16(inputSelector); + + _rmc.AudioVideoSource = (DmRmc4kzScalerC.eAudioVideoSource)number; + } + + public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType signalType) + { + Debug.Console(2, this, "Attempting a route from input {0} to HDMI Output", inputSelector); + + _rmc.AudioVideoSource = (DmRmc4kzScalerC.eAudioVideoSource)inputSelector; + } + #endregion + + #region Implementation of IRelayPorts + + public CrestronCollection RelayPorts + { + get { return _rmc.RelayPorts; } + } + + public int NumberOfRelayPorts + { + get { return _rmc.NumberOfRelayPorts; } + } + + #endregion + } } \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcHelper.cs b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmcHelper.cs similarity index 99% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcHelper.cs rename to src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmcHelper.cs index 5d644a2a..1d11db00 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcHelper.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmcHelper.cs @@ -1,10 +1,12 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using Crestron.SimplSharpPro.DeviceSupport; using Crestron.SimplSharpPro.DM; using Crestron.SimplSharpPro.DM.Cards; using Crestron.SimplSharpPro.DM.Endpoints.Receivers; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Bridges; diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcScalerCController.cs b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmcScalerCController.cs similarity index 99% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcScalerCController.cs rename to src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmcScalerCController.cs index d1f2daa1..ec1493d8 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcScalerCController.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmcScalerCController.cs @@ -12,8 +12,8 @@ namespace PepperDash.Essentials.DM /// /// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions /// - /// - [Description("Wrapper Class for DM-RMC-SCALER-C")] + /// + [Description("Wrapper Class for DM-RMC-SCALER-C")] public class DmRmcScalerCController : DmRmcControllerBase, IRoutingInputsOutputs, IIROutputPorts, IComPorts, ICec { diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcScalerS2Controller.cs b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmcScalerS2Controller.cs similarity index 99% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcScalerS2Controller.cs rename to src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmcScalerS2Controller.cs index 249a891b..12e4e9d4 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcScalerS2Controller.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmcScalerS2Controller.cs @@ -12,8 +12,8 @@ namespace PepperDash.Essentials.DM /// /// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions /// - /// - [Description("Wrapper Class for DM-RMC-SCALER-S2")] + /// + [Description("Wrapper Class for DM-RMC-SCALER-S2")] public class DmRmcScalerS2Controller : DmRmcControllerBase, IRoutingInputsOutputs, IIROutputPorts, IComPorts, ICec { diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcScalerSController.cs b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmcScalerSController.cs similarity index 99% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcScalerSController.cs rename to src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmcScalerSController.cs index bbf64796..ba509eac 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcScalerSController.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmcScalerSController.cs @@ -12,8 +12,8 @@ namespace PepperDash.Essentials.DM /// /// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions /// - /// - [Description("Wrapper Class for DM-RMC-SCALER-S")] + /// + [Description("Wrapper Class for DM-RMC-SCALER-S")] public class DmRmcScalerSController : DmRmcControllerBase, IRoutingInputsOutputs, IIROutputPorts, IComPorts, ICec { diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcX100CController.cs b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmcX100CController.cs similarity index 99% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcX100CController.cs rename to src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmcX100CController.cs index 920c056f..867069a8 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcX100CController.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Receivers/DmRmcX100CController.cs @@ -11,8 +11,8 @@ namespace PepperDash.Essentials.DM /// /// Builds a controller for basic DM-RMCs (both 4K and non-4K) with Com and IR ports and no control functions /// - /// - [Description("Wrapper Class for DM-RMC-4K-100-C & DM-RMC-100-C")] + /// + [Description("Wrapper Class for DM-RMC-4K-100-C & DM-RMC-100-C")] public class DmRmcX100CController : DmRmcControllerBase, IRoutingInputsOutputs, IIROutputPorts, IComPorts, ICec { diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx200Controller.cs b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx200Controller.cs similarity index 99% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx200Controller.cs rename to src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx200Controller.cs index fe4454b9..0caf6671 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx200Controller.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx200Controller.cs @@ -1,5 +1,5 @@ -using System; -using System.Linq; +using System; +using System.Linq; using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.DeviceSupport; using Crestron.SimplSharpPro.DM; @@ -16,8 +16,8 @@ namespace PepperDash.Essentials.DM /// /// Controller class for all DM-TX-201C/S/F transmitters - /// - [Description("Wrapper class for DM-TX-200-C")] + /// + [Description("Wrapper class for DM-TX-200-C")] public class DmTx200Controller : DmTxControllerBase, ITxRoutingWithFeedback, IHasFreeRun, IVgaBrightnessContrastControls { public DmTx200C2G Tx { get; private set; } @@ -36,19 +36,19 @@ namespace PepperDash.Essentials.DM public BoolFeedback FreeRunEnabledFeedback { get; protected set; } public IntFeedback VgaBrightnessFeedback { get; protected set; } - public IntFeedback VgaContrastFeedback { get; protected set; } - - //IroutingNumericEvent - public event EventHandler NumericSwitchChange; - - /// - /// Raise an event when the status of a switch object changes. - /// - /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType - private void OnSwitchChange(RoutingNumericEventArgs e) - { - var newEvent = NumericSwitchChange; - if (newEvent != null) newEvent(this, e); + public IntFeedback VgaContrastFeedback { get; protected set; } + + //IroutingNumericEvent + public event EventHandler NumericSwitchChange; + + /// + /// Raise an event when the status of a switch object changes. + /// + /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType + private void OnSwitchChange(RoutingNumericEventArgs e) + { + var newEvent = NumericSwitchChange; + if (newEvent != null) newEvent(this, e); } @@ -100,22 +100,22 @@ namespace PepperDash.Essentials.DM public DmTx200Controller(string key, string name, DmTx200C2G tx, bool preventRegistration) : base(key, name, tx) { - Tx = tx; - PreventRegistration = preventRegistration; - - HdmiInput = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn, - eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, - DmTx200Base.eSourceSelection.Digital, this, - VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInput)) - { - FeedbackMatchObject = DmTx200Base.eSourceSelection.Digital - }; - - VgaInput = new RoutingInputPortWithVideoStatuses(DmPortName.VgaIn, - eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, DmTx200Base.eSourceSelection.Analog, this, - VideoStatusHelper.GetVgaInputStatusFuncs(tx.VgaInput)) - { - FeedbackMatchObject = DmTx200Base.eSourceSelection.Analog + Tx = tx; + PreventRegistration = preventRegistration; + + HdmiInput = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn, + eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, + DmTx200Base.eSourceSelection.Digital, this, + VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInput)) + { + FeedbackMatchObject = DmTx200Base.eSourceSelection.Digital + }; + + VgaInput = new RoutingInputPortWithVideoStatuses(DmPortName.VgaIn, + eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, DmTx200Base.eSourceSelection.Analog, this, + VideoStatusHelper.GetVgaInputStatusFuncs(tx.VgaInput)) + { + FeedbackMatchObject = DmTx200Base.eSourceSelection.Analog }; ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput", @@ -129,9 +129,9 @@ namespace PepperDash.Essentials.DM VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback); AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.AudioSourceFeedback); - HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () => tx.HdmiInput.HdcpSupportOnFeedback.BoolValue ? 1 : 0); - - //setting this on the base class so that we can get it easily on the chassis. + HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () => tx.HdmiInput.HdcpSupportOnFeedback.BoolValue ? 1 : 0); + + //setting this on the base class so that we can get it easily on the chassis. HdcpStateFeedback = HdmiInHdcpCapabilityFeedback; HdcpSupportCapability = eHdcpCapabilityType.HdcpAutoSupport; @@ -219,18 +219,18 @@ namespace PepperDash.Essentials.DM } } - void Tx_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) - { - var localVideoInputPort = - InputPorts.FirstOrDefault(p => (DmTx200Base.eSourceSelection) p.Selector == Tx.VideoSourceFeedback); - var localAudioInputPort = + void Tx_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) + { + var localVideoInputPort = + InputPorts.FirstOrDefault(p => (DmTx200Base.eSourceSelection) p.Selector == Tx.VideoSourceFeedback); + var localAudioInputPort = InputPorts.FirstOrDefault(p => (DmTx200Base.eSourceSelection) p.Selector == Tx.AudioSourceFeedback); ActiveVideoInputFeedback.FireUpdate(); VideoSourceNumericFeedback.FireUpdate(); - AudioSourceNumericFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); + AudioSourceNumericFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localAudioInputPort, eRoutingSignalType.Audio)); } @@ -334,17 +334,17 @@ namespace PepperDash.Essentials.DM switch (id) { - case EndpointTransmitterBase.VideoSourceFeedbackEventId: + case EndpointTransmitterBase.VideoSourceFeedbackEventId: var localVideoInputPort = InputPorts.FirstOrDefault(p => (DmTx200Base.eSourceSelection)p.Selector == Tx.VideoSourceFeedback); Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback); VideoSourceNumericFeedback.FireUpdate(); - ActiveVideoInputFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); + ActiveVideoInputFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); break; - case EndpointTransmitterBase.AudioSourceFeedbackEventId: + case EndpointTransmitterBase.AudioSourceFeedbackEventId: var localInputAudioPort = InputPorts.FirstOrDefault(p => (DmTx200Base.eSourceSelection)p.Selector == Tx.AudioSourceFeedback); Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback); - AudioSourceNumericFeedback.FireUpdate(); + AudioSourceNumericFeedback.FireUpdate(); OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localInputAudioPort, eRoutingSignalType.Audio)); break; } diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx201CController.cs b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx201CController.cs similarity index 99% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx201CController.cs rename to src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx201CController.cs index 660d2fec..2e48f1e2 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx201CController.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx201CController.cs @@ -1,21 +1,21 @@ -using System; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.DM; -using Crestron.SimplSharpPro.DM.Endpoints; -using Crestron.SimplSharpPro.DM.Endpoints.Transmitters; -using System.Linq; - -using PepperDash.Core; -using PepperDash.Essentials.Core; +using System; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.DM; +using Crestron.SimplSharpPro.DM.Endpoints; +using Crestron.SimplSharpPro.DM.Endpoints.Transmitters; +using System.Linq; + +using PepperDash.Core; +using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Bridges; namespace PepperDash.Essentials.DM { /// /// Controller class for all DM-TX-201C/S/F transmitters - /// - [Description("Wrapper class for DM-TX-201-C")] + /// + [Description("Wrapper class for DM-TX-201-C")] public class DmTx201CController : DmTxControllerBase, ITxRoutingWithFeedback, IHasFreeRun, IVgaBrightnessContrastControls { public DmTx201C Tx { get; private set; } @@ -35,19 +35,19 @@ namespace PepperDash.Essentials.DM public BoolFeedback FreeRunEnabledFeedback { get; protected set; } public IntFeedback VgaBrightnessFeedback { get; protected set; } - public IntFeedback VgaContrastFeedback { get; protected set; } - - //IroutingNumericEvent - public event EventHandler NumericSwitchChange; - - /// - /// Raise an event when the status of a switch object changes. - /// - /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType - private void OnSwitchChange(RoutingNumericEventArgs e) - { - var newEvent = NumericSwitchChange; - if (newEvent != null) newEvent(this, e); + public IntFeedback VgaContrastFeedback { get; protected set; } + + //IroutingNumericEvent + public event EventHandler NumericSwitchChange; + + /// + /// Raise an event when the status of a switch object changes. + /// + /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType + private void OnSwitchChange(RoutingNumericEventArgs e) + { + var newEvent = NumericSwitchChange; + if (newEvent != null) newEvent(this, e); } /// @@ -99,43 +99,43 @@ namespace PepperDash.Essentials.DM /// /// /// - /// + /// public DmTx201CController(string key, string name, DmTx201C tx, bool preventRegistration) : base(key, name, tx) { - Tx = tx; - PreventRegistration = preventRegistration; - - HdmiInput = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn, - eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, - DmTx200Base.eSourceSelection.Digital, this, - VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInput)) - { - FeedbackMatchObject = DmTx200Base.eSourceSelection.Digital - }; - - VgaInput = new RoutingInputPortWithVideoStatuses(DmPortName.VgaIn, - eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, DmTx200Base.eSourceSelection.Analog, this, - VideoStatusHelper.GetVgaInputStatusFuncs(tx.VgaInput)) - { - FeedbackMatchObject = DmTx200Base.eSourceSelection.Analog + Tx = tx; + PreventRegistration = preventRegistration; + + HdmiInput = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn, + eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, + DmTx200Base.eSourceSelection.Digital, this, + VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInput)) + { + FeedbackMatchObject = DmTx200Base.eSourceSelection.Digital + }; + + VgaInput = new RoutingInputPortWithVideoStatuses(DmPortName.VgaIn, + eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, DmTx200Base.eSourceSelection.Analog, this, + VideoStatusHelper.GetVgaInputStatusFuncs(tx.VgaInput)) + { + FeedbackMatchObject = DmTx200Base.eSourceSelection.Analog }; ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput", () => ActualActiveVideoInput.ToString()); - Tx.HdmiInput.InputStreamChange += InputStreamChangeEvent; + Tx.HdmiInput.InputStreamChange += InputStreamChangeEvent; Tx.VgaInput.InputStreamChange += VgaInputOnInputStreamChange; Tx.BaseEvent += Tx_BaseEvent; Tx.OnlineStatusChange += new OnlineStatusChangeEventHandler(Tx_OnlineStatusChange); VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback); - AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.AudioSourceFeedback); - - HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () => - (tx.HdmiInput.HdcpSupportOnFeedback.BoolValue ? 1 : 0)); - + AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.AudioSourceFeedback); + + HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () => + (tx.HdmiInput.HdcpSupportOnFeedback.BoolValue ? 1 : 0)); + HdcpStateFeedback = HdmiInHdcpCapabilityFeedback; HdmiVideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInput.SyncDetectedFeedback.BoolValue); @@ -157,7 +157,7 @@ namespace PepperDash.Essentials.DM HdcpActiveFeedbackFunc = () => (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital && tx.HdmiInput.VideoAttributes.HdcpActiveFeedback.BoolValue), - + HdcpStateFeedbackFunc = () => ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital ? tx.HdmiInput.VideoAttributes.HdcpStateFeedback.ToString() : "", @@ -202,45 +202,45 @@ namespace PepperDash.Essentials.DM void VideoControls_ControlChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args) { var id = args.EventId; - Debug.Console(2, this, "EventId {0}", args.EventId); - - switch (id) - { - case VideoControlsEventIds.BrightnessFeedbackEventId: - VgaBrightnessFeedback.FireUpdate(); - break; - case VideoControlsEventIds.ContrastFeedbackEventId: - VgaContrastFeedback.FireUpdate(); - break; + Debug.Console(2, this, "EventId {0}", args.EventId); + + switch (id) + { + case VideoControlsEventIds.BrightnessFeedbackEventId: + VgaBrightnessFeedback.FireUpdate(); + break; + case VideoControlsEventIds.ContrastFeedbackEventId: + VgaContrastFeedback.FireUpdate(); + break; } - } - - void Tx_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) - { - var localVideoInputPort = - InputPorts.FirstOrDefault(p => (DmTx200Base.eSourceSelection)p.Selector == Tx.VideoSourceFeedback); - var localAudioInputPort = - InputPorts.FirstOrDefault(p => (DmTx200Base.eSourceSelection)p.Selector == Tx.AudioSourceFeedback); - - - ActiveVideoInputFeedback.FireUpdate(); - VideoSourceNumericFeedback.FireUpdate(); - AudioSourceNumericFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); - OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localAudioInputPort, eRoutingSignalType.Audio)); } - - private void VgaInputOnInputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) - { - switch (args.EventId) - { - case EndpointInputStreamEventIds.FreeRunFeedbackEventId: - FreeRunEnabledFeedback.FireUpdate(); - break; - case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId: - VgaVideoSyncFeedback.FireUpdate(); - break; - } + + void Tx_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) + { + var localVideoInputPort = + InputPorts.FirstOrDefault(p => (DmTx200Base.eSourceSelection)p.Selector == Tx.VideoSourceFeedback); + var localAudioInputPort = + InputPorts.FirstOrDefault(p => (DmTx200Base.eSourceSelection)p.Selector == Tx.AudioSourceFeedback); + + + ActiveVideoInputFeedback.FireUpdate(); + VideoSourceNumericFeedback.FireUpdate(); + AudioSourceNumericFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); + OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localAudioInputPort, eRoutingSignalType.Audio)); + } + + private void VgaInputOnInputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) + { + switch (args.EventId) + { + case EndpointInputStreamEventIds.FreeRunFeedbackEventId: + FreeRunEnabledFeedback.FireUpdate(); + break; + case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId: + VgaVideoSyncFeedback.FireUpdate(); + break; + } } public override bool CustomActivate() @@ -276,7 +276,7 @@ namespace PepperDash.Essentials.DM /// /// public void SetFreeRunEnabled(bool enable) - { + { Tx.VgaInput.FreeRun = enable ? eDmFreeRunSetting.Enabled : eDmFreeRunSetting.Disabled; } @@ -342,43 +342,43 @@ namespace PepperDash.Essentials.DM } void Tx_BaseEvent(GenericBase device, BaseEventArgs args) - { - var id = args.EventId; - Debug.Console(2, this, "EventId {0}", args.EventId); - - switch (id) - { - case EndpointTransmitterBase.VideoSourceFeedbackEventId: - var localVideoInputPort = InputPorts.FirstOrDefault(p => (DmTx200Base.eSourceSelection)p.Selector == Tx.VideoSourceFeedback); - Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback); - VideoSourceNumericFeedback.FireUpdate(); - ActiveVideoInputFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); - break; - case EndpointTransmitterBase.AudioSourceFeedbackEventId: - var localInputAudioPort = InputPorts.FirstOrDefault(p => (DmTx200Base.eSourceSelection)p.Selector == Tx.AudioSourceFeedback); - Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback); - AudioSourceNumericFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localInputAudioPort, eRoutingSignalType.Audio)); - break; + { + var id = args.EventId; + Debug.Console(2, this, "EventId {0}", args.EventId); + + switch (id) + { + case EndpointTransmitterBase.VideoSourceFeedbackEventId: + var localVideoInputPort = InputPorts.FirstOrDefault(p => (DmTx200Base.eSourceSelection)p.Selector == Tx.VideoSourceFeedback); + Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback); + VideoSourceNumericFeedback.FireUpdate(); + ActiveVideoInputFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); + break; + case EndpointTransmitterBase.AudioSourceFeedbackEventId: + var localInputAudioPort = InputPorts.FirstOrDefault(p => (DmTx200Base.eSourceSelection)p.Selector == Tx.AudioSourceFeedback); + Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback); + AudioSourceNumericFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localInputAudioPort, eRoutingSignalType.Audio)); + break; } } void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) { - Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString()); - - switch (args.EventId) - { - case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId: - HdmiInHdcpCapabilityFeedback.FireUpdate(); - break; - case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId: - HdmiInHdcpCapabilityFeedback.FireUpdate(); - break; - case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId: - HdmiVideoSyncFeedback.FireUpdate(); - break; + Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString()); + + switch (args.EventId) + { + case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId: + HdmiInHdcpCapabilityFeedback.FireUpdate(); + break; + case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId: + HdmiInHdcpCapabilityFeedback.FireUpdate(); + break; + case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId: + HdmiVideoSyncFeedback.FireUpdate(); + break; } } @@ -389,10 +389,10 @@ namespace PepperDash.Essentials.DM void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId) { if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId) - { + { return; - } - inputPort.VideoStatus.VideoSyncFeedback.FireUpdate(); + } + inputPort.VideoStatus.VideoSyncFeedback.FireUpdate(); AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate(); } diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx201SController.cs b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx201SController.cs similarity index 97% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx201SController.cs rename to src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx201SController.cs index e42ecb4b..08d43b63 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx201SController.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx201SController.cs @@ -1,432 +1,432 @@ -using System; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.DM; -using Crestron.SimplSharpPro.DM.Endpoints; -using Crestron.SimplSharpPro.DM.Endpoints.Transmitters; -using System.Linq; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Bridges; - -namespace PepperDash.Essentials.DM -{ - /// - /// Controller class for all DM-TX-201S/F transmitters - /// - [Description("Wrapper class for DM-TX-201-S/F")] - public class DmTx201SController : DmTxControllerBase, ITxRoutingWithFeedback, IHasFreeRun, IVgaBrightnessContrastControls - { - public DmTx201S Tx { get; private set; } - - public RoutingInputPortWithVideoStatuses HdmiInput { get; private set; } - public RoutingInputPortWithVideoStatuses VgaInput { get; private set; } - public RoutingOutputPort DmOutput { get; private set; } - public RoutingOutputPort HdmiLoopOut { get; private set; } - - public override StringFeedback ActiveVideoInputFeedback { get; protected set; } - public IntFeedback VideoSourceNumericFeedback { get; protected set; } - public IntFeedback AudioSourceNumericFeedback { get; protected set; } - public IntFeedback HdmiInHdcpCapabilityFeedback { get; protected set; } - public BoolFeedback HdmiVideoSyncFeedback { get; protected set; } - public BoolFeedback VgaVideoSyncFeedback { get; protected set; } - - public BoolFeedback FreeRunEnabledFeedback { get; protected set; } - - public IntFeedback VgaBrightnessFeedback { get; protected set; } - public IntFeedback VgaContrastFeedback { get; protected set; } - - //IroutingNumericEvent - public event EventHandler NumericSwitchChange; - - /// - /// - /// Raise an event when the status of a switch object changes. - /// - /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType - private void OnSwitchChange(RoutingNumericEventArgs e) - { - var newEvent = NumericSwitchChange; - if (newEvent != null) newEvent(this, e); +using System; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.DM; +using Crestron.SimplSharpPro.DM.Endpoints; +using Crestron.SimplSharpPro.DM.Endpoints.Transmitters; +using System.Linq; + +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Bridges; + +namespace PepperDash.Essentials.DM +{ + /// + /// Controller class for all DM-TX-201S/F transmitters + /// + [Description("Wrapper class for DM-TX-201-S/F")] + public class DmTx201SController : DmTxControllerBase, ITxRoutingWithFeedback, IHasFreeRun, IVgaBrightnessContrastControls + { + public DmTx201S Tx { get; private set; } + + public RoutingInputPortWithVideoStatuses HdmiInput { get; private set; } + public RoutingInputPortWithVideoStatuses VgaInput { get; private set; } + public RoutingOutputPort DmOutput { get; private set; } + public RoutingOutputPort HdmiLoopOut { get; private set; } + + public override StringFeedback ActiveVideoInputFeedback { get; protected set; } + public IntFeedback VideoSourceNumericFeedback { get; protected set; } + public IntFeedback AudioSourceNumericFeedback { get; protected set; } + public IntFeedback HdmiInHdcpCapabilityFeedback { get; protected set; } + public BoolFeedback HdmiVideoSyncFeedback { get; protected set; } + public BoolFeedback VgaVideoSyncFeedback { get; protected set; } + + public BoolFeedback FreeRunEnabledFeedback { get; protected set; } + + public IntFeedback VgaBrightnessFeedback { get; protected set; } + public IntFeedback VgaContrastFeedback { get; protected set; } + + //IroutingNumericEvent + public event EventHandler NumericSwitchChange; + + /// + /// + /// Raise an event when the status of a switch object changes. + /// + /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType + private void OnSwitchChange(RoutingNumericEventArgs e) + { + var newEvent = NumericSwitchChange; + if (newEvent != null) newEvent(this, e); } - - - /// - /// Helps get the "real" inputs, including when in Auto - /// - public DmTx200Base.eSourceSelection ActualActiveVideoInput - { - get - { - if (Tx.VideoSourceFeedback == DmTx200Base.eSourceSelection.Digital || - Tx.VideoSourceFeedback == DmTx200Base.eSourceSelection.Analog || - Tx.VideoSourceFeedback == DmTx200Base.eSourceSelection.Disable) - return Tx.VideoSourceFeedback; - else // auto - { - if (Tx.HdmiInput.SyncDetectedFeedback.BoolValue) - return DmTx200Base.eSourceSelection.Digital; - else if (Tx.VgaInput.SyncDetectedFeedback.BoolValue) - return DmTx200Base.eSourceSelection.Analog; - else - return DmTx200Base.eSourceSelection.Disable; - } - } - } - - public RoutingPortCollection InputPorts - { - get - { + + + /// + /// Helps get the "real" inputs, including when in Auto + /// + public DmTx200Base.eSourceSelection ActualActiveVideoInput + { + get + { + if (Tx.VideoSourceFeedback == DmTx200Base.eSourceSelection.Digital || + Tx.VideoSourceFeedback == DmTx200Base.eSourceSelection.Analog || + Tx.VideoSourceFeedback == DmTx200Base.eSourceSelection.Disable) + return Tx.VideoSourceFeedback; + else // auto + { + if (Tx.HdmiInput.SyncDetectedFeedback.BoolValue) + return DmTx200Base.eSourceSelection.Digital; + else if (Tx.VgaInput.SyncDetectedFeedback.BoolValue) + return DmTx200Base.eSourceSelection.Analog; + else + return DmTx200Base.eSourceSelection.Disable; + } + } + } + + public RoutingPortCollection InputPorts + { + get + { return new RoutingPortCollection { HdmiInput, VgaInput, AnyVideoInput - }; - } - } - - public RoutingPortCollection OutputPorts - { - get - { - return new RoutingPortCollection { DmOutput, HdmiLoopOut }; - } - } - - /// - /// - /// - /// - /// - /// - public DmTx201SController(string key, string name, DmTx201S tx, bool preventRegistration) - : base(key, name, tx) - { - Tx = tx; - PreventRegistration = preventRegistration; - - HdmiInput = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn, - eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, - DmTx200Base.eSourceSelection.Digital, this, - VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInput)) - { - FeedbackMatchObject = DmTx200Base.eSourceSelection.Digital - }; - - VgaInput = new RoutingInputPortWithVideoStatuses(DmPortName.VgaIn, - eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, DmTx200Base.eSourceSelection.Analog, this, - VideoStatusHelper.GetVgaInputStatusFuncs(tx.VgaInput)) - { - FeedbackMatchObject = DmTx200Base.eSourceSelection.Analog + }; + } + } + + public RoutingPortCollection OutputPorts + { + get + { + return new RoutingPortCollection { DmOutput, HdmiLoopOut }; + } + } + + /// + /// + /// + /// + /// + /// + public DmTx201SController(string key, string name, DmTx201S tx, bool preventRegistration) + : base(key, name, tx) + { + Tx = tx; + PreventRegistration = preventRegistration; + + HdmiInput = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn, + eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, + DmTx200Base.eSourceSelection.Digital, this, + VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInput)) + { + FeedbackMatchObject = DmTx200Base.eSourceSelection.Digital }; - - ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput", - () => ActualActiveVideoInput.ToString()); - - Tx.HdmiInput.InputStreamChange += InputStreamChangeEvent; - Tx.VgaInput.InputStreamChange += VgaInputOnInputStreamChange; - Tx.BaseEvent += Tx_BaseEvent; - Tx.OnlineStatusChange += new OnlineStatusChangeEventHandler(Tx_OnlineStatusChange); - - VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback); - - AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.AudioSourceFeedback); - - HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () => - (tx.HdmiInput.HdcpSupportOnFeedback.BoolValue ? 1 : 0)); - - HdcpStateFeedback = HdmiInHdcpCapabilityFeedback; - - HdmiVideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInput.SyncDetectedFeedback.BoolValue); - - VgaVideoSyncFeedback = new BoolFeedback(() => (bool)tx.VgaInput.SyncDetectedFeedback.BoolValue); - - FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled); - - VgaBrightnessFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.BrightnessFeedback.UShortValue); - - VgaContrastFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.ContrastFeedback.UShortValue); - - tx.VgaInput.VideoControls.ControlChange += VideoControls_ControlChange; - - HdcpSupportCapability = eHdcpCapabilityType.HdcpAutoSupport; - - var combinedFuncs = new VideoStatusFuncsWrapper - { - HdcpActiveFeedbackFunc = () => - (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital - && tx.HdmiInput.VideoAttributes.HdcpActiveFeedback.BoolValue), - - HdcpStateFeedbackFunc = () => ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital ? - tx.HdmiInput.VideoAttributes.HdcpStateFeedback.ToString() : "", - - VideoResolutionFeedbackFunc = () => - { - if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital) - return tx.HdmiInput.VideoAttributes.GetVideoResolutionString(); - return ActualActiveVideoInput == DmTx200Base.eSourceSelection.Analog ? - tx.VgaInput.VideoAttributes.GetVideoResolutionString() : ""; - }, - - VideoSyncFeedbackFunc = () => - (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital - && tx.HdmiInput.SyncDetectedFeedback.BoolValue) - || (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Analog - && tx.VgaInput.SyncDetectedFeedback.BoolValue) - || (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Auto - && (tx.VgaInput.SyncDetectedFeedback.BoolValue || tx.HdmiInput.SyncDetectedFeedback.BoolValue)) - - }; - - AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn, - eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs); - - DmOutput = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, null, this); - HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, null, this); - - AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback, - AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback, - AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback, - AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiInHdcpCapabilityFeedback, HdmiVideoSyncFeedback, - VgaVideoSyncFeedback); - - // Set Ports for CEC - HdmiInput.Port = Tx.HdmiInput; - VgaInput.Port = Tx.VgaInput; - HdmiLoopOut.Port = Tx.HdmiOutput; - DmOutput.Port = Tx.DmOutput; - } - - void VideoControls_ControlChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args) - { - var id = args.EventId; - Debug.Console(2, this, "EventId {0}", args.EventId); - - switch (id) - { - case VideoControlsEventIds.BrightnessFeedbackEventId: - VgaBrightnessFeedback.FireUpdate(); - break; - case VideoControlsEventIds.ContrastFeedbackEventId: - VgaContrastFeedback.FireUpdate(); - break; - } - } - - void Tx_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) - { - var localVideoInputPort = - InputPorts.FirstOrDefault(p => (DmTx200Base.eSourceSelection)p.Selector == Tx.VideoSourceFeedback); - var localAudioInputPort = - InputPorts.FirstOrDefault(p => (DmTx200Base.eSourceSelection)p.Selector == Tx.AudioSourceFeedback); - - - ActiveVideoInputFeedback.FireUpdate(); - VideoSourceNumericFeedback.FireUpdate(); - AudioSourceNumericFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); - OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localAudioInputPort, eRoutingSignalType.Audio)); + + VgaInput = new RoutingInputPortWithVideoStatuses(DmPortName.VgaIn, + eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, DmTx200Base.eSourceSelection.Analog, this, + VideoStatusHelper.GetVgaInputStatusFuncs(tx.VgaInput)) + { + FeedbackMatchObject = DmTx200Base.eSourceSelection.Analog + }; + + ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput", + () => ActualActiveVideoInput.ToString()); + + Tx.HdmiInput.InputStreamChange += InputStreamChangeEvent; + Tx.VgaInput.InputStreamChange += VgaInputOnInputStreamChange; + Tx.BaseEvent += Tx_BaseEvent; + Tx.OnlineStatusChange += new OnlineStatusChangeEventHandler(Tx_OnlineStatusChange); + + VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback); + + AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.AudioSourceFeedback); + + HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () => + (tx.HdmiInput.HdcpSupportOnFeedback.BoolValue ? 1 : 0)); + + HdcpStateFeedback = HdmiInHdcpCapabilityFeedback; + + HdmiVideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInput.SyncDetectedFeedback.BoolValue); + + VgaVideoSyncFeedback = new BoolFeedback(() => (bool)tx.VgaInput.SyncDetectedFeedback.BoolValue); + + FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled); + + VgaBrightnessFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.BrightnessFeedback.UShortValue); + + VgaContrastFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.ContrastFeedback.UShortValue); + + tx.VgaInput.VideoControls.ControlChange += VideoControls_ControlChange; + + HdcpSupportCapability = eHdcpCapabilityType.HdcpAutoSupport; + + var combinedFuncs = new VideoStatusFuncsWrapper + { + HdcpActiveFeedbackFunc = () => + (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital + && tx.HdmiInput.VideoAttributes.HdcpActiveFeedback.BoolValue), + + HdcpStateFeedbackFunc = () => ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital ? + tx.HdmiInput.VideoAttributes.HdcpStateFeedback.ToString() : "", + + VideoResolutionFeedbackFunc = () => + { + if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital) + return tx.HdmiInput.VideoAttributes.GetVideoResolutionString(); + return ActualActiveVideoInput == DmTx200Base.eSourceSelection.Analog ? + tx.VgaInput.VideoAttributes.GetVideoResolutionString() : ""; + }, + + VideoSyncFeedbackFunc = () => + (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital + && tx.HdmiInput.SyncDetectedFeedback.BoolValue) + || (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Analog + && tx.VgaInput.SyncDetectedFeedback.BoolValue) + || (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Auto + && (tx.VgaInput.SyncDetectedFeedback.BoolValue || tx.HdmiInput.SyncDetectedFeedback.BoolValue)) + + }; + + AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn, + eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs); + + DmOutput = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, null, this); + HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, null, this); + + AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback, + AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback, + AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback, + AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiInHdcpCapabilityFeedback, HdmiVideoSyncFeedback, + VgaVideoSyncFeedback); + + // Set Ports for CEC + HdmiInput.Port = Tx.HdmiInput; + VgaInput.Port = Tx.VgaInput; + HdmiLoopOut.Port = Tx.HdmiOutput; + DmOutput.Port = Tx.DmOutput; } - - private void VgaInputOnInputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) - { - switch (args.EventId) - { - case EndpointInputStreamEventIds.FreeRunFeedbackEventId: - FreeRunEnabledFeedback.FireUpdate(); - break; - case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId: - VgaVideoSyncFeedback.FireUpdate(); - break; - } - } - - public override bool CustomActivate() - { - Tx.HdmiInput.InputStreamChange += (o, a) => FowardInputStreamChange(HdmiInput, a.EventId); - Tx.HdmiInput.VideoAttributes.AttributeChange += (o, a) => FireVideoAttributeChange(HdmiInput, a.EventId); - - Tx.VgaInput.InputStreamChange += (o, a) => FowardInputStreamChange(VgaInput, a.EventId); - Tx.VgaInput.VideoAttributes.AttributeChange += (o, a) => FireVideoAttributeChange(VgaInput, a.EventId); - - // Base does register and sets up comm monitoring. - return base.CustomActivate(); - } - - public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - var joinMap = GetDmTxJoinMap(joinStart, joinMapKey); - - if (HdmiVideoSyncFeedback != null) - { - HdmiVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]); - } - if (VgaVideoSyncFeedback != null) - { - VgaVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]); - } - - LinkDmTxToApi(this, trilist, joinMap, bridge); - } - - /// - /// Enables or disables free run - /// - /// - public void SetFreeRunEnabled(bool enable) - { - Tx.VgaInput.FreeRun = enable ? eDmFreeRunSetting.Enabled : eDmFreeRunSetting.Disabled; - } - - /// - /// Sets the VGA brightness level - /// - /// - public void SetVgaBrightness(ushort level) - { - Tx.VgaInput.VideoControls.Brightness.UShortValue = level; - } - - /// - /// Sets the VGA contrast level - /// - /// - public void SetVgaContrast(ushort level) - { - Tx.VgaInput.VideoControls.Contrast.UShortValue = level; - } - - /// - /// Switches the audio/video source based on the integer value (0-Auto, 1-HDMI, 2-VGA, 3-Disable) - /// - /// - /// - /// - public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type) - { - Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input); - - switch (input) - { - case 0: - { - ExecuteSwitch(DmTx200Base.eSourceSelection.Auto, null, type); - break; - } - case 1: - { - ExecuteSwitch(HdmiInput.Selector, null, type); - break; - } - case 2: - { - ExecuteSwitch(VgaInput.Selector, null, type); - break; - } - case 3: - { - ExecuteSwitch(DmTx200Base.eSourceSelection.Disable, null, type); - break; - } - } - } - - public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) - { - if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video) - Tx.VideoSource = (DmTx200Base.eSourceSelection)inputSelector; - if ((signalType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio) - Tx.AudioSource = (DmTx200Base.eSourceSelection)inputSelector; - } - - void Tx_BaseEvent(GenericBase device, BaseEventArgs args) - { - var id = args.EventId; - Debug.Console(2, this, "EventId {0}", args.EventId); - - switch (id) - { - case EndpointTransmitterBase.VideoSourceFeedbackEventId: - var localVideoInputPort = InputPorts.FirstOrDefault(p => (DmTx200Base.eSourceSelection)p.Selector == Tx.VideoSourceFeedback); - Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback); - VideoSourceNumericFeedback.FireUpdate(); - ActiveVideoInputFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); - break; - case EndpointTransmitterBase.AudioSourceFeedbackEventId: - var localInputAudioPort = InputPorts.FirstOrDefault(p => (DmTx200Base.eSourceSelection)p.Selector == Tx.AudioSourceFeedback); - Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback); - AudioSourceNumericFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localInputAudioPort, eRoutingSignalType.Audio)); - break; - } + + void VideoControls_ControlChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args) + { + var id = args.EventId; + Debug.Console(2, this, "EventId {0}", args.EventId); + + switch (id) + { + case VideoControlsEventIds.BrightnessFeedbackEventId: + VgaBrightnessFeedback.FireUpdate(); + break; + case VideoControlsEventIds.ContrastFeedbackEventId: + VgaContrastFeedback.FireUpdate(); + break; + } } - - void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) - { - Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString()); - - switch (args.EventId) - { - case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId: - HdmiInHdcpCapabilityFeedback.FireUpdate(); - break; - case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId: - HdmiInHdcpCapabilityFeedback.FireUpdate(); - break; - case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId: - HdmiVideoSyncFeedback.FireUpdate(); - break; - } - - } - - /// - /// Relays the input stream change to the appropriate RoutingInputPort. - /// - void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId) - { - if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId) - { - return; - } - inputPort.VideoStatus.VideoSyncFeedback.FireUpdate(); - AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate(); - } - - /// - /// Relays the VideoAttributes change to a RoutingInputPort - /// - void FireVideoAttributeChange(RoutingInputPortWithVideoStatuses inputPort, int eventId) - { - //// LOCATION: Crestron.SimplSharpPro.DM.VideoAttributeEventIds - //Debug.Console(2, this, "VideoAttributes_AttributeChange event id={0} from {1}", - // args.EventId, (sender as VideoAttributesEnhanced).Owner.GetType()); - switch (eventId) - { - case VideoAttributeEventIds.HdcpActiveFeedbackEventId: - inputPort.VideoStatus.HdcpActiveFeedback.FireUpdate(); - AnyVideoInput.VideoStatus.HdcpActiveFeedback.FireUpdate(); - break; - case VideoAttributeEventIds.HdcpStateFeedbackEventId: - inputPort.VideoStatus.HdcpStateFeedback.FireUpdate(); - AnyVideoInput.VideoStatus.HdcpStateFeedback.FireUpdate(); - break; - case VideoAttributeEventIds.HorizontalResolutionFeedbackEventId: - case VideoAttributeEventIds.VerticalResolutionFeedbackEventId: - inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate(); - AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate(); - break; - case VideoAttributeEventIds.FramesPerSecondFeedbackEventId: - inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate(); - AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate(); - break; - } - } - - } + + void Tx_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) + { + var localVideoInputPort = + InputPorts.FirstOrDefault(p => (DmTx200Base.eSourceSelection)p.Selector == Tx.VideoSourceFeedback); + var localAudioInputPort = + InputPorts.FirstOrDefault(p => (DmTx200Base.eSourceSelection)p.Selector == Tx.AudioSourceFeedback); + + + ActiveVideoInputFeedback.FireUpdate(); + VideoSourceNumericFeedback.FireUpdate(); + AudioSourceNumericFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); + OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localAudioInputPort, eRoutingSignalType.Audio)); + } + + private void VgaInputOnInputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) + { + switch (args.EventId) + { + case EndpointInputStreamEventIds.FreeRunFeedbackEventId: + FreeRunEnabledFeedback.FireUpdate(); + break; + case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId: + VgaVideoSyncFeedback.FireUpdate(); + break; + } + } + + public override bool CustomActivate() + { + Tx.HdmiInput.InputStreamChange += (o, a) => FowardInputStreamChange(HdmiInput, a.EventId); + Tx.HdmiInput.VideoAttributes.AttributeChange += (o, a) => FireVideoAttributeChange(HdmiInput, a.EventId); + + Tx.VgaInput.InputStreamChange += (o, a) => FowardInputStreamChange(VgaInput, a.EventId); + Tx.VgaInput.VideoAttributes.AttributeChange += (o, a) => FireVideoAttributeChange(VgaInput, a.EventId); + + // Base does register and sets up comm monitoring. + return base.CustomActivate(); + } + + public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + var joinMap = GetDmTxJoinMap(joinStart, joinMapKey); + + if (HdmiVideoSyncFeedback != null) + { + HdmiVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]); + } + if (VgaVideoSyncFeedback != null) + { + VgaVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]); + } + + LinkDmTxToApi(this, trilist, joinMap, bridge); + } + + /// + /// Enables or disables free run + /// + /// + public void SetFreeRunEnabled(bool enable) + { + Tx.VgaInput.FreeRun = enable ? eDmFreeRunSetting.Enabled : eDmFreeRunSetting.Disabled; + } + + /// + /// Sets the VGA brightness level + /// + /// + public void SetVgaBrightness(ushort level) + { + Tx.VgaInput.VideoControls.Brightness.UShortValue = level; + } + + /// + /// Sets the VGA contrast level + /// + /// + public void SetVgaContrast(ushort level) + { + Tx.VgaInput.VideoControls.Contrast.UShortValue = level; + } + + /// + /// Switches the audio/video source based on the integer value (0-Auto, 1-HDMI, 2-VGA, 3-Disable) + /// + /// + /// + /// + public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type) + { + Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input); + + switch (input) + { + case 0: + { + ExecuteSwitch(DmTx200Base.eSourceSelection.Auto, null, type); + break; + } + case 1: + { + ExecuteSwitch(HdmiInput.Selector, null, type); + break; + } + case 2: + { + ExecuteSwitch(VgaInput.Selector, null, type); + break; + } + case 3: + { + ExecuteSwitch(DmTx200Base.eSourceSelection.Disable, null, type); + break; + } + } + } + + public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) + { + if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video) + Tx.VideoSource = (DmTx200Base.eSourceSelection)inputSelector; + if ((signalType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio) + Tx.AudioSource = (DmTx200Base.eSourceSelection)inputSelector; + } + + void Tx_BaseEvent(GenericBase device, BaseEventArgs args) + { + var id = args.EventId; + Debug.Console(2, this, "EventId {0}", args.EventId); + + switch (id) + { + case EndpointTransmitterBase.VideoSourceFeedbackEventId: + var localVideoInputPort = InputPorts.FirstOrDefault(p => (DmTx200Base.eSourceSelection)p.Selector == Tx.VideoSourceFeedback); + Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback); + VideoSourceNumericFeedback.FireUpdate(); + ActiveVideoInputFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); + break; + case EndpointTransmitterBase.AudioSourceFeedbackEventId: + var localInputAudioPort = InputPorts.FirstOrDefault(p => (DmTx200Base.eSourceSelection)p.Selector == Tx.AudioSourceFeedback); + Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback); + AudioSourceNumericFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localInputAudioPort, eRoutingSignalType.Audio)); + break; + } + } + + void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) + { + Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString()); + + switch (args.EventId) + { + case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId: + HdmiInHdcpCapabilityFeedback.FireUpdate(); + break; + case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId: + HdmiInHdcpCapabilityFeedback.FireUpdate(); + break; + case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId: + HdmiVideoSyncFeedback.FireUpdate(); + break; + } + + } + + /// + /// Relays the input stream change to the appropriate RoutingInputPort. + /// + void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId) + { + if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId) + { + return; + } + inputPort.VideoStatus.VideoSyncFeedback.FireUpdate(); + AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate(); + } + + /// + /// Relays the VideoAttributes change to a RoutingInputPort + /// + void FireVideoAttributeChange(RoutingInputPortWithVideoStatuses inputPort, int eventId) + { + //// LOCATION: Crestron.SimplSharpPro.DM.VideoAttributeEventIds + //Debug.Console(2, this, "VideoAttributes_AttributeChange event id={0} from {1}", + // args.EventId, (sender as VideoAttributesEnhanced).Owner.GetType()); + switch (eventId) + { + case VideoAttributeEventIds.HdcpActiveFeedbackEventId: + inputPort.VideoStatus.HdcpActiveFeedback.FireUpdate(); + AnyVideoInput.VideoStatus.HdcpActiveFeedback.FireUpdate(); + break; + case VideoAttributeEventIds.HdcpStateFeedbackEventId: + inputPort.VideoStatus.HdcpStateFeedback.FireUpdate(); + AnyVideoInput.VideoStatus.HdcpStateFeedback.FireUpdate(); + break; + case VideoAttributeEventIds.HorizontalResolutionFeedbackEventId: + case VideoAttributeEventIds.VerticalResolutionFeedbackEventId: + inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate(); + AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate(); + break; + case VideoAttributeEventIds.FramesPerSecondFeedbackEventId: + inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate(); + AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate(); + break; + } + } + + } } \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx401CController.cs b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx401CController.cs similarity index 97% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx401CController.cs rename to src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx401CController.cs index ae4e2c31..a165cd66 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx401CController.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx401CController.cs @@ -1,494 +1,494 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -//using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.DM; -using Crestron.SimplSharpPro.DM.Endpoints; -using Crestron.SimplSharpPro.DM.Endpoints.Transmitters; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Bridges; -using PepperDash.Essentials.DM.Config; - -namespace PepperDash.Essentials.DM -{ - using eVst = DmTx401C.eSourceSelection; - - [Description("Wrapper class for DM-TX-401-C")] - public class DmTx401CController : DmTxControllerBase, ITxRoutingWithFeedback, IIROutputPorts, IComPorts, IHasFreeRun, IVgaBrightnessContrastControls - { - public DmTx401C Tx { get; private set; } - - public RoutingInputPortWithVideoStatuses HdmiIn { get; private set; } - public RoutingInputPortWithVideoStatuses DisplayPortIn { get; private set; } - public RoutingInputPortWithVideoStatuses VgaIn { get; private set; } - public RoutingInputPortWithVideoStatuses CompositeIn { get; private set; } - public RoutingOutputPort DmOut { get; private set; } - - public override StringFeedback ActiveVideoInputFeedback { get; protected set; } - public IntFeedback VideoSourceNumericFeedback { get; protected set; } - public IntFeedback AudioSourceNumericFeedback { get; protected set; } - public IntFeedback HdmiInHdcpCapabilityFeedback { get; protected set; } - public BoolFeedback DisplayPortVideoSyncFeedback { get; protected set; } - public BoolFeedback HdmiVideoSyncFeedback { get; protected set; } - public BoolFeedback VgaVideoSyncFeedback { get; protected set; } - - public BoolFeedback FreeRunEnabledFeedback { get; protected set; } - - public IntFeedback VgaBrightnessFeedback { get; protected set; } - public IntFeedback VgaContrastFeedback { get; protected set; } - - //IroutingNumericEvent - public event EventHandler NumericSwitchChange; - - /// - /// Raise an event when the status of a switch object changes. - /// - /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType - private void OnSwitchChange(RoutingNumericEventArgs e) - { - var newEvent = NumericSwitchChange; - if (newEvent != null) newEvent(this, e); - } - - - /// - /// Helps get the "real" inputs, including when in Auto - /// - public BaseDmTx401.eSourceSelection ActualVideoInput - { - get - { - if (Tx.VideoSourceFeedback != BaseDmTx401.eSourceSelection.Auto) - return Tx.VideoSourceFeedback; - else // auto - { - if (Tx.HdmiInput.SyncDetectedFeedback.BoolValue) - return BaseDmTx401.eSourceSelection.HDMI; - else if (Tx.VgaInput.SyncDetectedFeedback.BoolValue) - return BaseDmTx401.eSourceSelection.VGA; - else if (Tx.DisplayPortInput.SyncDetectedFeedback.BoolValue) - return BaseDmTx401.eSourceSelection.DisplayPort; - else if (Tx.CvbsInput.SyncDetectedFeedback.BoolValue) - return BaseDmTx401.eSourceSelection.Composite; - else - return BaseDmTx401.eSourceSelection.Disabled; - } - } - } - - public RoutingPortCollection InputPorts - { - get - { - return new RoutingPortCollection - { - HdmiIn, - DisplayPortIn, - VgaIn, - CompositeIn, - AnyVideoInput - }; - } - } - - public RoutingPortCollection OutputPorts - { - get - { - return new RoutingPortCollection { DmOut }; - } - } - - /// - /// - /// - /// - /// - /// - public DmTx401CController(string key, string name, DmTx401C tx, bool preventRegistration) - : base(key, name, tx) - { - Tx = tx; - PreventRegistration = preventRegistration; - - HdmiIn = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn, - eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.HDMI, this, - VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInput)) - { - FeedbackMatchObject = eVst.HDMI - }; - DisplayPortIn = new RoutingInputPortWithVideoStatuses(DmPortName.DisplayPortIn, - eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.DisplayPort, this, - VideoStatusHelper.GetDisplayPortInputStatusFuncs(tx.DisplayPortInput)) - { - FeedbackMatchObject = eVst.DisplayPort - }; - VgaIn = new RoutingInputPortWithVideoStatuses(DmPortName.VgaIn, - eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, eVst.VGA, this, - VideoStatusHelper.GetVgaInputStatusFuncs(tx.VgaInput)) - { - FeedbackMatchObject = eVst.VGA - }; - CompositeIn = new RoutingInputPortWithVideoStatuses(DmPortName.CompositeIn, - eRoutingSignalType.Video, eRoutingPortConnectionType.Composite, eVst.Composite, this, - VideoStatusHelper.GetVgaInputStatusFuncs(tx.VgaInput)) - { - FeedbackMatchObject = eVst.Composite - }; - - Tx.HdmiInput.InputStreamChange += HdmiInputStreamChangeEvent; - Tx.DisplayPortInput.InputStreamChange += DisplayPortInputStreamChangeEvent; - Tx.BaseEvent += Tx_BaseEvent; - Tx.OnlineStatusChange += Tx_OnlineStatusChange; - Tx.VgaInput.InputStreamChange += VgaInputOnInputStreamChange; - tx.VgaInput.VideoControls.ControlChange += VideoControls_ControlChange; - - - ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput", - () => ActualVideoInput.ToString()); - - VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback); - - AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.AudioSourceFeedback); - - HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () => tx.HdmiInput.HdcpSupportOnFeedback.BoolValue ? 1 : 0); - - HdcpStateFeedback = HdmiInHdcpCapabilityFeedback; - - HdcpSupportCapability = eHdcpCapabilityType.HdcpAutoSupport; - - DisplayPortVideoSyncFeedback = new BoolFeedback("DisplayPortVideoSync", () => (bool)tx.DisplayPortInput.SyncDetectedFeedback.BoolValue); - - HdmiVideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInput.SyncDetectedFeedback.BoolValue); - - VgaVideoSyncFeedback = new BoolFeedback(() => (bool)tx.VgaInput.SyncDetectedFeedback.BoolValue); - - FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled); - - VgaBrightnessFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.BrightnessFeedback.UShortValue); - - VgaContrastFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.ContrastFeedback.UShortValue); - - - var combinedFuncs = new VideoStatusFuncsWrapper - { - HdcpActiveFeedbackFunc = () => - (ActualVideoInput == eVst.HDMI - && tx.HdmiInput.VideoAttributes.HdcpActiveFeedback.BoolValue) - || (ActualVideoInput == eVst.DisplayPort - && tx.DisplayPortInput.VideoAttributes.HdcpActiveFeedback.BoolValue), - - HdcpStateFeedbackFunc = () => - { - if (ActualVideoInput == eVst.HDMI) - return tx.HdmiInput.VideoAttributes.HdcpStateFeedback.ToString(); - if (ActualVideoInput == eVst.DisplayPort) - return tx.DisplayPortInput.VideoAttributes.HdcpStateFeedback.ToString(); - return ""; - }, - - VideoResolutionFeedbackFunc = () => - { - if (ActualVideoInput == eVst.HDMI) - return tx.HdmiInput.VideoAttributes.GetVideoResolutionString(); - if (ActualVideoInput == eVst.DisplayPort) - return tx.DisplayPortInput.VideoAttributes.GetVideoResolutionString(); - if (ActualVideoInput == eVst.VGA) - return tx.VgaInput.VideoAttributes.GetVideoResolutionString(); - if (ActualVideoInput == eVst.Composite) - return tx.CvbsInput.VideoAttributes.GetVideoResolutionString(); - return ""; - }, - VideoSyncFeedbackFunc = () => - (ActualVideoInput == eVst.HDMI - && tx.HdmiInput.SyncDetectedFeedback.BoolValue) - || (ActualVideoInput == eVst.DisplayPort - && tx.DisplayPortInput.SyncDetectedFeedback.BoolValue) - || (ActualVideoInput == eVst.VGA - && tx.VgaInput.SyncDetectedFeedback.BoolValue) - || (ActualVideoInput == eVst.Composite - && tx.CvbsInput.SyncDetectedFeedback.BoolValue) - }; - - AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn, - eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs); - - DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.DmCat, null, this); - - AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback, - AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback, - AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback, - AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiInHdcpCapabilityFeedback, DisplayPortVideoSyncFeedback, - HdmiVideoSyncFeedback, VgaVideoSyncFeedback); - - // Set Ports for CEC - DisplayPortIn.Port = Tx.DisplayPortInput; - HdmiIn.Port = Tx.HdmiInput; - DmOut.Port = Tx.DmOutput; - } - - public override bool CustomActivate() - { - // Link up all of these damned events to the various RoutingPorts via a helper handler - Tx.HdmiInput.InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn, a.EventId); - Tx.HdmiInput.VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn, a.EventId); - - Tx.DisplayPortInput.InputStreamChange += (o, a) => FowardInputStreamChange(DisplayPortIn, a.EventId); - Tx.DisplayPortInput.VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(DisplayPortIn, a.EventId); - - Tx.VgaInput.InputStreamChange += (o, a) => FowardInputStreamChange(VgaIn, a.EventId); - Tx.VgaInput.VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(VgaIn, a.EventId); - - // Base does register and sets up comm monitoring. - return base.CustomActivate(); - } - - public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - var joinMap = GetDmTxJoinMap(joinStart, joinMapKey); - - if (HdmiVideoSyncFeedback != null) - { - HdmiVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]); - } - if (VgaVideoSyncFeedback != null) - { - VgaVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]); - } - - LinkDmTxToApi(this, trilist, joinMap, bridge); - } - - public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type) - { - Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input); - - switch (input) - { - case 0: - { - ExecuteSwitch(eVst.Auto, null, type); - break; - } - case 1: - { - ExecuteSwitch(DisplayPortIn.Selector, null, type); - break; - } - case 2: - { - ExecuteSwitch(HdmiIn.Selector, null, type); - break; - } - case 3: - { - ExecuteSwitch(VgaIn.Selector, null, type); - break; - } - case 4: - { - ExecuteSwitch(CompositeIn.Selector, null, type); - break; - } - case 5: - { - ExecuteSwitch(eVst.Disabled, null, type); - break; - } - } - - } - - public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) - { - if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video) - Tx.VideoSource = (eVst)inputSelector; - if ((signalType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio) - Tx.AudioSource = (eVst)inputSelector; - } - - void Tx_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) - { - - var localVideoInputPort = - InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); - var localAudioInputPort = - InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.AudioSourceFeedback); - - OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); - OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localAudioInputPort, eRoutingSignalType.Audio)); - - } - - void Tx_BaseEvent(GenericBase device, BaseEventArgs args) - { - var id = args.EventId; - Debug.Console(2, this, "EventId {0}", args.EventId); - - switch (id) - { - case EndpointTransmitterBase.VideoSourceFeedbackEventId: - var localVideoInputPort = InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); - Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback); - VideoSourceNumericFeedback.FireUpdate(); - ActiveVideoInputFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); - break; - case EndpointTransmitterBase.AudioSourceFeedbackEventId: - var localInputAudioPort = InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.AudioSourceFeedback); - Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback); - AudioSourceNumericFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localInputAudioPort, eRoutingSignalType.Audio)); - break; - } - } - - void VideoControls_ControlChange(object sender, GenericEventArgs args) - { - var id = args.EventId; - Debug.Console(2, this, "EventId {0}", args.EventId); - - switch (id) - { - case VideoControlsEventIds.BrightnessFeedbackEventId: - VgaBrightnessFeedback.FireUpdate(); - break; - case VideoControlsEventIds.ContrastFeedbackEventId: - VgaContrastFeedback.FireUpdate(); - break; - } - } - - /// - /// Enables or disables free run - /// - /// - public void SetFreeRunEnabled(bool enable) - { - Tx.VgaInput.FreeRun = enable ? eDmFreeRunSetting.Enabled : eDmFreeRunSetting.Disabled; - } - - /// - /// Sets the VGA brightness level - /// - /// - public void SetVgaBrightness(ushort level) - { - Tx.VgaInput.VideoControls.Brightness.UShortValue = level; - } - - /// - /// Sets the VGA contrast level - /// - /// - public void SetVgaContrast(ushort level) - { - Tx.VgaInput.VideoControls.Contrast.UShortValue = level; - } - - /// - /// Relays the input stream change to the appropriate RoutingInputPort. - /// - void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId) - { - if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId) - { - return; - } - inputPort.VideoStatus.VideoSyncFeedback.FireUpdate(); - AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate(); - } - - /// - /// Relays the VideoAttributes change to a RoutingInputPort - /// - void ForwardVideoAttributeChange(RoutingInputPortWithVideoStatuses inputPort, int eventId) - { - //// LOCATION: Crestron.SimplSharpPro.DM.VideoAttributeEventIds - //Debug.Console(2, this, "VideoAttributes_AttributeChange event id={0} from {1}", - // args.EventId, (sender as VideoAttributesEnhanced).Owner.GetType()); - switch (eventId) - { - case VideoAttributeEventIds.HdcpActiveFeedbackEventId: - inputPort.VideoStatus.HdcpActiveFeedback.FireUpdate(); - AnyVideoInput.VideoStatus.HdcpActiveFeedback.FireUpdate(); - break; - case VideoAttributeEventIds.HdcpStateFeedbackEventId: - inputPort.VideoStatus.HdcpStateFeedback.FireUpdate(); - AnyVideoInput.VideoStatus.HdcpStateFeedback.FireUpdate(); - break; - case VideoAttributeEventIds.HorizontalResolutionFeedbackEventId: - case VideoAttributeEventIds.VerticalResolutionFeedbackEventId: - inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate(); - AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate(); - break; - case VideoAttributeEventIds.FramesPerSecondFeedbackEventId: - inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate(); - AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate(); - break; - } - } - - void HdmiInputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) - { - Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString()); - - switch (args.EventId) - { - case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId: - HdmiInHdcpCapabilityFeedback.FireUpdate(); - break; - case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId: - HdmiInHdcpCapabilityFeedback.FireUpdate(); - break; - case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId: - HdmiVideoSyncFeedback.FireUpdate(); - break; - } - } - - void DisplayPortInputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) - { - Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString()); - - switch (args.EventId) - { - case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId: - DisplayPortVideoSyncFeedback.FireUpdate(); - break; - } - } - - private void VgaInputOnInputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) - { - switch (args.EventId) - { - case EndpointInputStreamEventIds.FreeRunFeedbackEventId: - FreeRunEnabledFeedback.FireUpdate(); - break; - case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId: - VgaVideoSyncFeedback.FireUpdate(); - break; - } - } - - - - #region IIROutputPorts Members - public CrestronCollection IROutputPorts { get { return Tx.IROutputPorts; } } - public int NumberOfIROutputPorts { get { return Tx.NumberOfIROutputPorts; } } - #endregion - - #region IComPorts Members - public CrestronCollection ComPorts { get { return Tx.ComPorts; } } - public int NumberOfComPorts { get { return Tx.NumberOfComPorts; } } - #endregion - } +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +//using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.DM; +using Crestron.SimplSharpPro.DM.Endpoints; +using Crestron.SimplSharpPro.DM.Endpoints.Transmitters; + +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.DM.Config; + +namespace PepperDash.Essentials.DM +{ + using eVst = DmTx401C.eSourceSelection; + + [Description("Wrapper class for DM-TX-401-C")] + public class DmTx401CController : DmTxControllerBase, ITxRoutingWithFeedback, IIROutputPorts, IComPorts, IHasFreeRun, IVgaBrightnessContrastControls + { + public DmTx401C Tx { get; private set; } + + public RoutingInputPortWithVideoStatuses HdmiIn { get; private set; } + public RoutingInputPortWithVideoStatuses DisplayPortIn { get; private set; } + public RoutingInputPortWithVideoStatuses VgaIn { get; private set; } + public RoutingInputPortWithVideoStatuses CompositeIn { get; private set; } + public RoutingOutputPort DmOut { get; private set; } + + public override StringFeedback ActiveVideoInputFeedback { get; protected set; } + public IntFeedback VideoSourceNumericFeedback { get; protected set; } + public IntFeedback AudioSourceNumericFeedback { get; protected set; } + public IntFeedback HdmiInHdcpCapabilityFeedback { get; protected set; } + public BoolFeedback DisplayPortVideoSyncFeedback { get; protected set; } + public BoolFeedback HdmiVideoSyncFeedback { get; protected set; } + public BoolFeedback VgaVideoSyncFeedback { get; protected set; } + + public BoolFeedback FreeRunEnabledFeedback { get; protected set; } + + public IntFeedback VgaBrightnessFeedback { get; protected set; } + public IntFeedback VgaContrastFeedback { get; protected set; } + + //IroutingNumericEvent + public event EventHandler NumericSwitchChange; + + /// + /// Raise an event when the status of a switch object changes. + /// + /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType + private void OnSwitchChange(RoutingNumericEventArgs e) + { + var newEvent = NumericSwitchChange; + if (newEvent != null) newEvent(this, e); + } + + + /// + /// Helps get the "real" inputs, including when in Auto + /// + public BaseDmTx401.eSourceSelection ActualVideoInput + { + get + { + if (Tx.VideoSourceFeedback != BaseDmTx401.eSourceSelection.Auto) + return Tx.VideoSourceFeedback; + else // auto + { + if (Tx.HdmiInput.SyncDetectedFeedback.BoolValue) + return BaseDmTx401.eSourceSelection.HDMI; + else if (Tx.VgaInput.SyncDetectedFeedback.BoolValue) + return BaseDmTx401.eSourceSelection.VGA; + else if (Tx.DisplayPortInput.SyncDetectedFeedback.BoolValue) + return BaseDmTx401.eSourceSelection.DisplayPort; + else if (Tx.CvbsInput.SyncDetectedFeedback.BoolValue) + return BaseDmTx401.eSourceSelection.Composite; + else + return BaseDmTx401.eSourceSelection.Disabled; + } + } + } + + public RoutingPortCollection InputPorts + { + get + { + return new RoutingPortCollection + { + HdmiIn, + DisplayPortIn, + VgaIn, + CompositeIn, + AnyVideoInput + }; + } + } + + public RoutingPortCollection OutputPorts + { + get + { + return new RoutingPortCollection { DmOut }; + } + } + + /// + /// + /// + /// + /// + /// + public DmTx401CController(string key, string name, DmTx401C tx, bool preventRegistration) + : base(key, name, tx) + { + Tx = tx; + PreventRegistration = preventRegistration; + + HdmiIn = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn, + eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.HDMI, this, + VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInput)) + { + FeedbackMatchObject = eVst.HDMI + }; + DisplayPortIn = new RoutingInputPortWithVideoStatuses(DmPortName.DisplayPortIn, + eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.DisplayPort, this, + VideoStatusHelper.GetDisplayPortInputStatusFuncs(tx.DisplayPortInput)) + { + FeedbackMatchObject = eVst.DisplayPort + }; + VgaIn = new RoutingInputPortWithVideoStatuses(DmPortName.VgaIn, + eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, eVst.VGA, this, + VideoStatusHelper.GetVgaInputStatusFuncs(tx.VgaInput)) + { + FeedbackMatchObject = eVst.VGA + }; + CompositeIn = new RoutingInputPortWithVideoStatuses(DmPortName.CompositeIn, + eRoutingSignalType.Video, eRoutingPortConnectionType.Composite, eVst.Composite, this, + VideoStatusHelper.GetVgaInputStatusFuncs(tx.VgaInput)) + { + FeedbackMatchObject = eVst.Composite + }; + + Tx.HdmiInput.InputStreamChange += HdmiInputStreamChangeEvent; + Tx.DisplayPortInput.InputStreamChange += DisplayPortInputStreamChangeEvent; + Tx.BaseEvent += Tx_BaseEvent; + Tx.OnlineStatusChange += Tx_OnlineStatusChange; + Tx.VgaInput.InputStreamChange += VgaInputOnInputStreamChange; + tx.VgaInput.VideoControls.ControlChange += VideoControls_ControlChange; + + + ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput", + () => ActualVideoInput.ToString()); + + VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback); + + AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.AudioSourceFeedback); + + HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () => tx.HdmiInput.HdcpSupportOnFeedback.BoolValue ? 1 : 0); + + HdcpStateFeedback = HdmiInHdcpCapabilityFeedback; + + HdcpSupportCapability = eHdcpCapabilityType.HdcpAutoSupport; + + DisplayPortVideoSyncFeedback = new BoolFeedback("DisplayPortVideoSync", () => (bool)tx.DisplayPortInput.SyncDetectedFeedback.BoolValue); + + HdmiVideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInput.SyncDetectedFeedback.BoolValue); + + VgaVideoSyncFeedback = new BoolFeedback(() => (bool)tx.VgaInput.SyncDetectedFeedback.BoolValue); + + FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled); + + VgaBrightnessFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.BrightnessFeedback.UShortValue); + + VgaContrastFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.ContrastFeedback.UShortValue); + + + var combinedFuncs = new VideoStatusFuncsWrapper + { + HdcpActiveFeedbackFunc = () => + (ActualVideoInput == eVst.HDMI + && tx.HdmiInput.VideoAttributes.HdcpActiveFeedback.BoolValue) + || (ActualVideoInput == eVst.DisplayPort + && tx.DisplayPortInput.VideoAttributes.HdcpActiveFeedback.BoolValue), + + HdcpStateFeedbackFunc = () => + { + if (ActualVideoInput == eVst.HDMI) + return tx.HdmiInput.VideoAttributes.HdcpStateFeedback.ToString(); + if (ActualVideoInput == eVst.DisplayPort) + return tx.DisplayPortInput.VideoAttributes.HdcpStateFeedback.ToString(); + return ""; + }, + + VideoResolutionFeedbackFunc = () => + { + if (ActualVideoInput == eVst.HDMI) + return tx.HdmiInput.VideoAttributes.GetVideoResolutionString(); + if (ActualVideoInput == eVst.DisplayPort) + return tx.DisplayPortInput.VideoAttributes.GetVideoResolutionString(); + if (ActualVideoInput == eVst.VGA) + return tx.VgaInput.VideoAttributes.GetVideoResolutionString(); + if (ActualVideoInput == eVst.Composite) + return tx.CvbsInput.VideoAttributes.GetVideoResolutionString(); + return ""; + }, + VideoSyncFeedbackFunc = () => + (ActualVideoInput == eVst.HDMI + && tx.HdmiInput.SyncDetectedFeedback.BoolValue) + || (ActualVideoInput == eVst.DisplayPort + && tx.DisplayPortInput.SyncDetectedFeedback.BoolValue) + || (ActualVideoInput == eVst.VGA + && tx.VgaInput.SyncDetectedFeedback.BoolValue) + || (ActualVideoInput == eVst.Composite + && tx.CvbsInput.SyncDetectedFeedback.BoolValue) + }; + + AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn, + eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs); + + DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.DmCat, null, this); + + AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback, + AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback, + AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback, + AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiInHdcpCapabilityFeedback, DisplayPortVideoSyncFeedback, + HdmiVideoSyncFeedback, VgaVideoSyncFeedback); + + // Set Ports for CEC + DisplayPortIn.Port = Tx.DisplayPortInput; + HdmiIn.Port = Tx.HdmiInput; + DmOut.Port = Tx.DmOutput; + } + + public override bool CustomActivate() + { + // Link up all of these damned events to the various RoutingPorts via a helper handler + Tx.HdmiInput.InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn, a.EventId); + Tx.HdmiInput.VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn, a.EventId); + + Tx.DisplayPortInput.InputStreamChange += (o, a) => FowardInputStreamChange(DisplayPortIn, a.EventId); + Tx.DisplayPortInput.VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(DisplayPortIn, a.EventId); + + Tx.VgaInput.InputStreamChange += (o, a) => FowardInputStreamChange(VgaIn, a.EventId); + Tx.VgaInput.VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(VgaIn, a.EventId); + + // Base does register and sets up comm monitoring. + return base.CustomActivate(); + } + + public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + var joinMap = GetDmTxJoinMap(joinStart, joinMapKey); + + if (HdmiVideoSyncFeedback != null) + { + HdmiVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]); + } + if (VgaVideoSyncFeedback != null) + { + VgaVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]); + } + + LinkDmTxToApi(this, trilist, joinMap, bridge); + } + + public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type) + { + Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input); + + switch (input) + { + case 0: + { + ExecuteSwitch(eVst.Auto, null, type); + break; + } + case 1: + { + ExecuteSwitch(DisplayPortIn.Selector, null, type); + break; + } + case 2: + { + ExecuteSwitch(HdmiIn.Selector, null, type); + break; + } + case 3: + { + ExecuteSwitch(VgaIn.Selector, null, type); + break; + } + case 4: + { + ExecuteSwitch(CompositeIn.Selector, null, type); + break; + } + case 5: + { + ExecuteSwitch(eVst.Disabled, null, type); + break; + } + } + + } + + public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) + { + if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video) + Tx.VideoSource = (eVst)inputSelector; + if ((signalType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio) + Tx.AudioSource = (eVst)inputSelector; + } + + void Tx_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) + { + + var localVideoInputPort = + InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); + var localAudioInputPort = + InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.AudioSourceFeedback); + + OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); + OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localAudioInputPort, eRoutingSignalType.Audio)); + + } + + void Tx_BaseEvent(GenericBase device, BaseEventArgs args) + { + var id = args.EventId; + Debug.Console(2, this, "EventId {0}", args.EventId); + + switch (id) + { + case EndpointTransmitterBase.VideoSourceFeedbackEventId: + var localVideoInputPort = InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); + Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback); + VideoSourceNumericFeedback.FireUpdate(); + ActiveVideoInputFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); + break; + case EndpointTransmitterBase.AudioSourceFeedbackEventId: + var localInputAudioPort = InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.AudioSourceFeedback); + Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback); + AudioSourceNumericFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localInputAudioPort, eRoutingSignalType.Audio)); + break; + } + } + + void VideoControls_ControlChange(object sender, GenericEventArgs args) + { + var id = args.EventId; + Debug.Console(2, this, "EventId {0}", args.EventId); + + switch (id) + { + case VideoControlsEventIds.BrightnessFeedbackEventId: + VgaBrightnessFeedback.FireUpdate(); + break; + case VideoControlsEventIds.ContrastFeedbackEventId: + VgaContrastFeedback.FireUpdate(); + break; + } + } + + /// + /// Enables or disables free run + /// + /// + public void SetFreeRunEnabled(bool enable) + { + Tx.VgaInput.FreeRun = enable ? eDmFreeRunSetting.Enabled : eDmFreeRunSetting.Disabled; + } + + /// + /// Sets the VGA brightness level + /// + /// + public void SetVgaBrightness(ushort level) + { + Tx.VgaInput.VideoControls.Brightness.UShortValue = level; + } + + /// + /// Sets the VGA contrast level + /// + /// + public void SetVgaContrast(ushort level) + { + Tx.VgaInput.VideoControls.Contrast.UShortValue = level; + } + + /// + /// Relays the input stream change to the appropriate RoutingInputPort. + /// + void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId) + { + if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId) + { + return; + } + inputPort.VideoStatus.VideoSyncFeedback.FireUpdate(); + AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate(); + } + + /// + /// Relays the VideoAttributes change to a RoutingInputPort + /// + void ForwardVideoAttributeChange(RoutingInputPortWithVideoStatuses inputPort, int eventId) + { + //// LOCATION: Crestron.SimplSharpPro.DM.VideoAttributeEventIds + //Debug.Console(2, this, "VideoAttributes_AttributeChange event id={0} from {1}", + // args.EventId, (sender as VideoAttributesEnhanced).Owner.GetType()); + switch (eventId) + { + case VideoAttributeEventIds.HdcpActiveFeedbackEventId: + inputPort.VideoStatus.HdcpActiveFeedback.FireUpdate(); + AnyVideoInput.VideoStatus.HdcpActiveFeedback.FireUpdate(); + break; + case VideoAttributeEventIds.HdcpStateFeedbackEventId: + inputPort.VideoStatus.HdcpStateFeedback.FireUpdate(); + AnyVideoInput.VideoStatus.HdcpStateFeedback.FireUpdate(); + break; + case VideoAttributeEventIds.HorizontalResolutionFeedbackEventId: + case VideoAttributeEventIds.VerticalResolutionFeedbackEventId: + inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate(); + AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate(); + break; + case VideoAttributeEventIds.FramesPerSecondFeedbackEventId: + inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate(); + AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate(); + break; + } + } + + void HdmiInputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) + { + Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString()); + + switch (args.EventId) + { + case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId: + HdmiInHdcpCapabilityFeedback.FireUpdate(); + break; + case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId: + HdmiInHdcpCapabilityFeedback.FireUpdate(); + break; + case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId: + HdmiVideoSyncFeedback.FireUpdate(); + break; + } + } + + void DisplayPortInputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) + { + Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString()); + + switch (args.EventId) + { + case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId: + DisplayPortVideoSyncFeedback.FireUpdate(); + break; + } + } + + private void VgaInputOnInputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) + { + switch (args.EventId) + { + case EndpointInputStreamEventIds.FreeRunFeedbackEventId: + FreeRunEnabledFeedback.FireUpdate(); + break; + case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId: + VgaVideoSyncFeedback.FireUpdate(); + break; + } + } + + + + #region IIROutputPorts Members + public CrestronCollection IROutputPorts { get { return Tx.IROutputPorts; } } + public int NumberOfIROutputPorts { get { return Tx.NumberOfIROutputPorts; } } + #endregion + + #region IComPorts Members + public CrestronCollection ComPorts { get { return Tx.ComPorts; } } + public int NumberOfComPorts { get { return Tx.NumberOfComPorts; } } + #endregion + } } \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4k100Controller.cs b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx4k100Controller.cs similarity index 98% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4k100Controller.cs rename to src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx4k100Controller.cs index 5bbf5fd5..d628110d 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4k100Controller.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx4k100Controller.cs @@ -1,4 +1,6 @@ -using Crestron.SimplSharpPro; +extern alias Full; + +using Crestron.SimplSharpPro; //using Crestron.SimplSharpPro.DeviceSupport; using Crestron.SimplSharpPro.DeviceSupport; using Crestron.SimplSharpPro.DM; @@ -6,7 +8,7 @@ using Crestron.SimplSharpPro.DM.Endpoints.Transmitters; using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Bridges; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.DM { diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4k202CController.cs b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx4k202CController.cs similarity index 99% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4k202CController.cs rename to src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx4k202CController.cs index 387562e4..e39816d1 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4k202CController.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx4k202CController.cs @@ -20,7 +20,7 @@ namespace PepperDash.Essentials.DM using eVst = Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType; using eAst = Crestron.SimplSharpPro.DeviceSupport.eX02AudioSourceType; - [Description("Wrapper class for DM-TX-4K-202-C")] + [Description("Wrapper class for DM-TX-4K-202-C")] public class DmTx4k202CController : DmTxControllerBase, ITxRoutingWithFeedback, IHasFeedback, IIROutputPorts, IComPorts { @@ -37,19 +37,19 @@ namespace PepperDash.Essentials.DM public IntFeedback HdmiIn1HdcpCapabilityFeedback { get; protected set; } public IntFeedback HdmiIn2HdcpCapabilityFeedback { get; protected set; } public BoolFeedback Hdmi1VideoSyncFeedback { get; protected set; } - public BoolFeedback Hdmi2VideoSyncFeedback { get; protected set; } - - //IroutingNumericEvent - public event EventHandler NumericSwitchChange; - - /// - /// Raise an event when the status of a switch object changes. - /// - /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType - private void OnSwitchChange(RoutingNumericEventArgs e) - { - var newEvent = NumericSwitchChange; - if (newEvent != null) newEvent(this, e); + public BoolFeedback Hdmi2VideoSyncFeedback { get; protected set; } + + //IroutingNumericEvent + public event EventHandler NumericSwitchChange; + + /// + /// Raise an event when the status of a switch object changes. + /// + /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType + private void OnSwitchChange(RoutingNumericEventArgs e) + { + var newEvent = NumericSwitchChange; + if (newEvent != null) newEvent(this, e); } @@ -94,122 +94,122 @@ namespace PepperDash.Essentials.DM { return new RoutingPortCollection { DmOut, HdmiLoopOut }; } - } - - public DmTx4k202CController(string key, string name, DmTx4k202C tx, bool preventRegistration) - : base(key, name, tx) - { - Tx = tx; - PreventRegistration = preventRegistration; - - HdmiIn1 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn1, - eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this, - VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[1])) - { - FeedbackMatchObject = eVst.Hdmi1 - }; - HdmiIn2 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn2, - eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi2, this, - VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[2])) - { - FeedbackMatchObject = eVst.Hdmi2 - }; - - ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput", - () => ActualActiveVideoInput.ToString()); - - - - Tx.HdmiInputs[1].InputStreamChange += InputStreamChangeEvent; - Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent; - - Tx.BaseEvent += Tx_BaseEvent; - - Tx.OnlineStatusChange += Tx_OnlineStatusChange; - - VideoSourceNumericFeedback = new IntFeedback(() => (int) Tx.VideoSourceFeedback); - - AudioSourceNumericFeedback = new IntFeedback(() => (int) Tx.AudioSourceFeedback); - - HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability", - () => (int) tx.HdmiInputs[1].HdcpCapabilityFeedback); - - HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", - () => (int) tx.HdmiInputs[2].HdcpCapabilityFeedback); - - HdcpStateFeedback = - new IntFeedback( - () => - tx.HdmiInputs[1].HdcpCapabilityFeedback > tx.HdmiInputs[2].HdcpCapabilityFeedback - ? (int) tx.HdmiInputs[1].HdcpCapabilityFeedback - : (int) tx.HdmiInputs[2].HdcpCapabilityFeedback); - - HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support; - - Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool) tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue); - - Hdmi2VideoSyncFeedback = new BoolFeedback(() => (bool) tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue); - - var combinedFuncs = new VideoStatusFuncsWrapper - { - HdcpActiveFeedbackFunc = () => - (ActualActiveVideoInput == eVst.Hdmi1 - && tx.HdmiInputs[1].VideoAttributes.HdcpActiveFeedback.BoolValue) - || (ActualActiveVideoInput == eVst.Hdmi2 - && tx.HdmiInputs[2].VideoAttributes.HdcpActiveFeedback.BoolValue), - - HdcpStateFeedbackFunc = () => - { - if (ActualActiveVideoInput == eVst.Hdmi1) - return tx.HdmiInputs[1].VideoAttributes.HdcpStateFeedback.ToString(); - if (ActualActiveVideoInput == eVst.Hdmi2) - return tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString(); - return ""; - }, - - VideoResolutionFeedbackFunc = () => - { - if (ActualActiveVideoInput == eVst.Hdmi1) - return tx.HdmiInputs[1].VideoAttributes.GetVideoResolutionString(); - if (ActualActiveVideoInput == eVst.Hdmi2) - return tx.HdmiInputs[2].VideoAttributes.GetVideoResolutionString(); - return ""; - }, - VideoSyncFeedbackFunc = () => - (ActualActiveVideoInput == eVst.Hdmi1 - && tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue) - || (ActualActiveVideoInput == eVst.Hdmi2 - && tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue) - - }; - - AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn, - eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, - combinedFuncs); - - DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.DmCat, null, this); - HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, - eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, null, this); - - - AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback, - AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback, - AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback, - AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiIn1HdcpCapabilityFeedback, - HdmiIn2HdcpCapabilityFeedback, - Hdmi1VideoSyncFeedback, Hdmi2VideoSyncFeedback); - - // Set Ports for CEC - HdmiIn1.Port = Tx.HdmiInputs[1]; - HdmiIn2.Port = Tx.HdmiInputs[2]; - HdmiLoopOut.Port = Tx.HdmiOutput; - DmOut.Port = Tx.DmOutput; - } - - - + } + + public DmTx4k202CController(string key, string name, DmTx4k202C tx, bool preventRegistration) + : base(key, name, tx) + { + Tx = tx; + PreventRegistration = preventRegistration; + + HdmiIn1 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn1, + eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this, + VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[1])) + { + FeedbackMatchObject = eVst.Hdmi1 + }; + HdmiIn2 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn2, + eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi2, this, + VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[2])) + { + FeedbackMatchObject = eVst.Hdmi2 + }; + + ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput", + () => ActualActiveVideoInput.ToString()); + + + + Tx.HdmiInputs[1].InputStreamChange += InputStreamChangeEvent; + Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent; + + Tx.BaseEvent += Tx_BaseEvent; + + Tx.OnlineStatusChange += Tx_OnlineStatusChange; + + VideoSourceNumericFeedback = new IntFeedback(() => (int) Tx.VideoSourceFeedback); + + AudioSourceNumericFeedback = new IntFeedback(() => (int) Tx.AudioSourceFeedback); + + HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability", + () => (int) tx.HdmiInputs[1].HdcpCapabilityFeedback); + + HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", + () => (int) tx.HdmiInputs[2].HdcpCapabilityFeedback); + + HdcpStateFeedback = + new IntFeedback( + () => + tx.HdmiInputs[1].HdcpCapabilityFeedback > tx.HdmiInputs[2].HdcpCapabilityFeedback + ? (int) tx.HdmiInputs[1].HdcpCapabilityFeedback + : (int) tx.HdmiInputs[2].HdcpCapabilityFeedback); + + HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support; + + Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool) tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue); + + Hdmi2VideoSyncFeedback = new BoolFeedback(() => (bool) tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue); + + var combinedFuncs = new VideoStatusFuncsWrapper + { + HdcpActiveFeedbackFunc = () => + (ActualActiveVideoInput == eVst.Hdmi1 + && tx.HdmiInputs[1].VideoAttributes.HdcpActiveFeedback.BoolValue) + || (ActualActiveVideoInput == eVst.Hdmi2 + && tx.HdmiInputs[2].VideoAttributes.HdcpActiveFeedback.BoolValue), + + HdcpStateFeedbackFunc = () => + { + if (ActualActiveVideoInput == eVst.Hdmi1) + return tx.HdmiInputs[1].VideoAttributes.HdcpStateFeedback.ToString(); + if (ActualActiveVideoInput == eVst.Hdmi2) + return tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString(); + return ""; + }, + + VideoResolutionFeedbackFunc = () => + { + if (ActualActiveVideoInput == eVst.Hdmi1) + return tx.HdmiInputs[1].VideoAttributes.GetVideoResolutionString(); + if (ActualActiveVideoInput == eVst.Hdmi2) + return tx.HdmiInputs[2].VideoAttributes.GetVideoResolutionString(); + return ""; + }, + VideoSyncFeedbackFunc = () => + (ActualActiveVideoInput == eVst.Hdmi1 + && tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue) + || (ActualActiveVideoInput == eVst.Hdmi2 + && tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue) + + }; + + AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn, + eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, + combinedFuncs); + + DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.DmCat, null, this); + HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, + eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, null, this); + + + AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback, + AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback, + AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback, + AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiIn1HdcpCapabilityFeedback, + HdmiIn2HdcpCapabilityFeedback, + Hdmi1VideoSyncFeedback, Hdmi2VideoSyncFeedback); + + // Set Ports for CEC + HdmiIn1.Port = Tx.HdmiInputs[1]; + HdmiIn2.Port = Tx.HdmiInputs[2]; + HdmiLoopOut.Port = Tx.HdmiOutput; + DmOut.Port = Tx.DmOutput; + } + + + public override bool CustomActivate() { // Link up all of these damned events to the various RoutingPorts via a helper handler @@ -324,43 +324,43 @@ namespace PepperDash.Essentials.DM if (inputStream == Tx.HdmiInputs[2]) Hdmi2VideoSyncFeedback.FireUpdate(); break; } - } - - void Tx_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) - { - var localVideoInputPort = - InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); - var localAudioInputPort = - InputPorts.FirstOrDefault(p => (eAst)p.Selector == Tx.AudioSourceFeedback); - - ActiveVideoInputFeedback.FireUpdate(); - VideoSourceNumericFeedback.FireUpdate(); - AudioSourceNumericFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); - OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localAudioInputPort, eRoutingSignalType.Audio)); - } - - void Tx_BaseEvent(GenericBase device, BaseEventArgs args) - { - var id = args.EventId; - Debug.Console(2, this, "EventId {0}", args.EventId); - - switch (id) - { - case EndpointTransmitterBase.VideoSourceFeedbackEventId: - var localVideoInputPort = InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); - Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback); - VideoSourceNumericFeedback.FireUpdate(); - ActiveVideoInputFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); - break; - case EndpointTransmitterBase.AudioSourceFeedbackEventId: - var localInputAudioPort = InputPorts.FirstOrDefault(p => (eAst)p.Selector == Tx.AudioSourceFeedback); - Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback); - AudioSourceNumericFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localInputAudioPort, eRoutingSignalType.Audio)); - break; - } + } + + void Tx_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) + { + var localVideoInputPort = + InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); + var localAudioInputPort = + InputPorts.FirstOrDefault(p => (eAst)p.Selector == Tx.AudioSourceFeedback); + + ActiveVideoInputFeedback.FireUpdate(); + VideoSourceNumericFeedback.FireUpdate(); + AudioSourceNumericFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); + OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localAudioInputPort, eRoutingSignalType.Audio)); + } + + void Tx_BaseEvent(GenericBase device, BaseEventArgs args) + { + var id = args.EventId; + Debug.Console(2, this, "EventId {0}", args.EventId); + + switch (id) + { + case EndpointTransmitterBase.VideoSourceFeedbackEventId: + var localVideoInputPort = InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); + Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback); + VideoSourceNumericFeedback.FireUpdate(); + ActiveVideoInputFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); + break; + case EndpointTransmitterBase.AudioSourceFeedbackEventId: + var localInputAudioPort = InputPorts.FirstOrDefault(p => (eAst)p.Selector == Tx.AudioSourceFeedback); + Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback); + AudioSourceNumericFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localInputAudioPort, eRoutingSignalType.Audio)); + break; + } } /// diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4k302CController.cs b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx4k302CController.cs similarity index 99% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4k302CController.cs rename to src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx4k302CController.cs index 87906735..f8bbeb10 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4k302CController.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx4k302CController.cs @@ -18,9 +18,9 @@ using PepperDash.Essentials.DM.Config; namespace PepperDash.Essentials.DM { using eVst = Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType; - using eAst = Crestron.SimplSharpPro.DeviceSupport.eX02AudioSourceType; - - [Description("Wrapper class for DM-TX-4K-302-C")] + using eAst = Crestron.SimplSharpPro.DeviceSupport.eX02AudioSourceType; + + [Description("Wrapper class for DM-TX-4K-302-C")] public class DmTx4k302CController : DmTxControllerBase, ITxRoutingWithFeedback, IHasFeedback, IIROutputPorts, IComPorts, IHasFreeRun, IVgaBrightnessContrastControls { @@ -44,19 +44,19 @@ namespace PepperDash.Essentials.DM public BoolFeedback FreeRunEnabledFeedback { get; protected set; } public IntFeedback VgaBrightnessFeedback { get; protected set; } - public IntFeedback VgaContrastFeedback { get; protected set; } - - //IroutingNumericEvent - public event EventHandler NumericSwitchChange; - - /// - /// Raise an event when the status of a switch object changes. - /// - /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType - private void OnSwitchChange(RoutingNumericEventArgs e) - { - var newEvent = NumericSwitchChange; - if (newEvent != null) newEvent(this, e); + public IntFeedback VgaContrastFeedback { get; protected set; } + + //IroutingNumericEvent + public event EventHandler NumericSwitchChange; + + /// + /// Raise an event when the status of a switch object changes. + /// + /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType + private void OnSwitchChange(RoutingNumericEventArgs e) + { + var newEvent = NumericSwitchChange; + if (newEvent != null) newEvent(this, e); } @@ -101,38 +101,38 @@ namespace PepperDash.Essentials.DM { return new RoutingPortCollection { DmOut, HdmiLoopOut }; } - } + } public DmTx4k302CController(string key, string name, DmTx4k302C tx, bool preventRegistration) : base(key, name, tx) { - Tx = tx; + Tx = tx; PreventRegistration = preventRegistration; HdmiIn1 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn1, eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this, - VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[1])) - { - FeedbackMatchObject = eVst.Hdmi1 + VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[1])) + { + FeedbackMatchObject = eVst.Hdmi1 }; HdmiIn2 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn2, eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi2, this, - VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[2])) - { - FeedbackMatchObject = eVst.Hdmi2 - }; + VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[2])) + { + FeedbackMatchObject = eVst.Hdmi2 + }; VgaIn = new RoutingInputPortWithVideoStatuses(DmPortName.VgaIn, eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, eVst.Vga, this, - VideoStatusHelper.GetVgaInputStatusFuncs(tx.VgaInput)) - { - FeedbackMatchObject = eVst.Vga - }; + VideoStatusHelper.GetVgaInputStatusFuncs(tx.VgaInput)) + { + FeedbackMatchObject = eVst.Vga + }; ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput", () => ActualActiveVideoInput.ToString()); Tx.HdmiInputs[1].InputStreamChange += InputStreamChangeEvent; - Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent; + Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent; Tx.VgaInput.InputStreamChange += VgaInputOnInputStreamChange; Tx.BaseEvent += Tx_BaseEvent; @@ -143,13 +143,13 @@ namespace PepperDash.Essentials.DM HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability", () => (int)tx.HdmiInputs[1].HdcpCapabilityFeedback); - HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback); - - HdcpStateFeedback = - new IntFeedback( - () => - tx.HdmiInputs[1].HdcpCapabilityFeedback > tx.HdmiInputs[2].HdcpCapabilityFeedback - ? (int)tx.HdmiInputs[1].HdcpCapabilityFeedback + HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback); + + HdcpStateFeedback = + new IntFeedback( + () => + tx.HdmiInputs[1].HdcpCapabilityFeedback > tx.HdmiInputs[2].HdcpCapabilityFeedback + ? (int)tx.HdmiInputs[1].HdcpCapabilityFeedback : (int)tx.HdmiInputs[2].HdcpCapabilityFeedback); HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support; @@ -180,7 +180,7 @@ namespace PepperDash.Essentials.DM { if (ActualActiveVideoInput == eVst.Hdmi1) return tx.HdmiInputs[1].VideoAttributes.HdcpStateFeedback.ToString(); - return ActualActiveVideoInput == eVst.Hdmi2 ? tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString() : ""; + return ActualActiveVideoInput == eVst.Hdmi2 ? tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString() : ""; }, VideoResolutionFeedbackFunc = () => @@ -189,7 +189,7 @@ namespace PepperDash.Essentials.DM return tx.HdmiInputs[1].VideoAttributes.GetVideoResolutionString(); if (ActualActiveVideoInput == eVst.Hdmi2) return tx.HdmiInputs[2].VideoAttributes.GetVideoResolutionString(); - return ActualActiveVideoInput == eVst.Vga ? tx.VgaInput.VideoAttributes.GetVideoResolutionString() : ""; + return ActualActiveVideoInput == eVst.Vga ? tx.VgaInput.VideoAttributes.GetVideoResolutionString() : ""; }, VideoSyncFeedbackFunc = () => (ActualActiveVideoInput == eVst.Hdmi1 @@ -221,19 +221,19 @@ namespace PepperDash.Essentials.DM HdmiIn2.Port = Tx.HdmiInputs[2]; HdmiLoopOut.Port = Tx.HdmiOutput; DmOut.Port = Tx.DmOutput; - } - - void VgaInputOnInputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) - { - switch (args.EventId) - { - case EndpointInputStreamEventIds.FreeRunFeedbackEventId: - FreeRunEnabledFeedback.FireUpdate(); - break; - case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId: - VgaVideoSyncFeedback.FireUpdate(); - break; - } + } + + void VgaInputOnInputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) + { + switch (args.EventId) + { + case EndpointInputStreamEventIds.FreeRunFeedbackEventId: + FreeRunEnabledFeedback.FireUpdate(); + break; + case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId: + VgaVideoSyncFeedback.FireUpdate(); + break; + } } void VideoControls_ControlChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args) @@ -241,14 +241,14 @@ namespace PepperDash.Essentials.DM var id = args.EventId; Debug.Console(2, this, "EventId {0}", args.EventId); - switch (id) - { - case VideoControlsEventIds.BrightnessFeedbackEventId: - VgaBrightnessFeedback.FireUpdate(); - break; - case VideoControlsEventIds.ContrastFeedbackEventId: - VgaContrastFeedback.FireUpdate(); - break; + switch (id) + { + case VideoControlsEventIds.BrightnessFeedbackEventId: + VgaBrightnessFeedback.FireUpdate(); + break; + case VideoControlsEventIds.ContrastFeedbackEventId: + VgaContrastFeedback.FireUpdate(); + break; } } @@ -275,15 +275,15 @@ namespace PepperDash.Essentials.DM var joinMap = GetDmTxJoinMap(joinStart, joinMapKey); if (Hdmi1VideoSyncFeedback != null) - { + { Hdmi1VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]); } if (Hdmi2VideoSyncFeedback != null) - { + { Hdmi2VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]); } if (VgaVideoSyncFeedback != null) - { + { VgaVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input3VideoSyncStatus.JoinNumber]); } @@ -294,11 +294,11 @@ namespace PepperDash.Essentials.DM /// Enables or disables free run /// /// - public void SetFreeRunEnabled(bool enable) - { - Tx.VgaInput.FreeRun = enable ? eDmFreeRunSetting.Enabled : eDmFreeRunSetting.Disabled; - } - + public void SetFreeRunEnabled(bool enable) + { + Tx.VgaInput.FreeRun = enable ? eDmFreeRunSetting.Enabled : eDmFreeRunSetting.Disabled; + } + /// /// Sets the VGA brightness level /// @@ -319,13 +319,13 @@ namespace PepperDash.Essentials.DM - public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type) - { - Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input); - - switch (type) - { - case eRoutingSignalType.Video: + public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type) + { + Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input); + + switch (type) + { + case eRoutingSignalType.Video: switch (input) { case 0: @@ -353,9 +353,9 @@ namespace PepperDash.Essentials.DM ExecuteSwitch(eVst.AllDisabled, null, type); break; } - } - break; - case eRoutingSignalType.Audio: + } + break; + case eRoutingSignalType.Audio: switch (input) { case 0: @@ -383,11 +383,11 @@ namespace PepperDash.Essentials.DM ExecuteSwitch(eAst.AllDisabled, null, type); break; } - } - break; - } - } - + } + break; + } + } + public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) { if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video) @@ -396,70 +396,70 @@ namespace PepperDash.Essentials.DM Tx.AudioSource = (eAst)inputSelector; } - void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) - { - Debug.Console(2, "{0} event {1} stream {2}", this.Tx.ToString(), inputStream.ToString(), args.EventId.ToString()); - - switch (args.EventId) - { - case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId: - case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId: - case EndpointInputStreamEventIds.HdcpCapabilityFeedbackEventId: + void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) + { + Debug.Console(2, "{0} event {1} stream {2}", this.Tx.ToString(), inputStream.ToString(), args.EventId.ToString()); + + switch (args.EventId) + { + case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId: + case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId: + case EndpointInputStreamEventIds.HdcpCapabilityFeedbackEventId: if (inputStream == Tx.HdmiInputs[1]) HdmiIn1HdcpCapabilityFeedback.FireUpdate(); - if (inputStream == Tx.HdmiInputs[2]) HdmiIn2HdcpCapabilityFeedback.FireUpdate(); - HdcpStateFeedback.FireUpdate(); - break; - case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId: - if (inputStream == Tx.HdmiInputs[1]) Hdmi1VideoSyncFeedback.FireUpdate(); - if (inputStream == Tx.HdmiInputs[2]) Hdmi2VideoSyncFeedback.FireUpdate(); - break; - } - } - void Tx_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) - { - var localVideoInputPort = - InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); - var localAudioInputPort = - InputPorts.FirstOrDefault(p => (eAst)p.Selector == Tx.AudioSourceFeedback); - - ActiveVideoInputFeedback.FireUpdate(); - VideoSourceNumericFeedback.FireUpdate(); - AudioSourceNumericFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); - OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localAudioInputPort, eRoutingSignalType.Audio)); - } - - void Tx_BaseEvent(GenericBase device, BaseEventArgs args) - { - var id = args.EventId; - Debug.Console(2, this, "EventId {0}", args.EventId); - - switch (id) - { - case EndpointTransmitterBase.VideoSourceFeedbackEventId: - var localVideoInputPort = InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); - Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback); - VideoSourceNumericFeedback.FireUpdate(); - ActiveVideoInputFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); - break; - case EndpointTransmitterBase.AudioSourceFeedbackEventId: - var localInputAudioPort = InputPorts.FirstOrDefault(p => (eAst)p.Selector == Tx.AudioSourceFeedback); - Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback); - AudioSourceNumericFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localInputAudioPort, eRoutingSignalType.Audio)); - break; - } + if (inputStream == Tx.HdmiInputs[2]) HdmiIn2HdcpCapabilityFeedback.FireUpdate(); + HdcpStateFeedback.FireUpdate(); + break; + case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId: + if (inputStream == Tx.HdmiInputs[1]) Hdmi1VideoSyncFeedback.FireUpdate(); + if (inputStream == Tx.HdmiInputs[2]) Hdmi2VideoSyncFeedback.FireUpdate(); + break; + } } - + void Tx_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) + { + var localVideoInputPort = + InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); + var localAudioInputPort = + InputPorts.FirstOrDefault(p => (eAst)p.Selector == Tx.AudioSourceFeedback); + + ActiveVideoInputFeedback.FireUpdate(); + VideoSourceNumericFeedback.FireUpdate(); + AudioSourceNumericFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); + OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localAudioInputPort, eRoutingSignalType.Audio)); + } + + void Tx_BaseEvent(GenericBase device, BaseEventArgs args) + { + var id = args.EventId; + Debug.Console(2, this, "EventId {0}", args.EventId); + + switch (id) + { + case EndpointTransmitterBase.VideoSourceFeedbackEventId: + var localVideoInputPort = InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); + Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback); + VideoSourceNumericFeedback.FireUpdate(); + ActiveVideoInputFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); + break; + case EndpointTransmitterBase.AudioSourceFeedbackEventId: + var localInputAudioPort = InputPorts.FirstOrDefault(p => (eAst)p.Selector == Tx.AudioSourceFeedback); + Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback); + AudioSourceNumericFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localInputAudioPort, eRoutingSignalType.Audio)); + break; + } + } + /// /// Relays the input stream change to the appropriate RoutingInputPort. /// void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId) - { - if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId) return; + { + if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId) return; inputPort.VideoStatus.VideoSyncFeedback.FireUpdate(); - AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate(); + AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate(); } /// diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4kz100Controller.cs b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx4kz100Controller.cs similarity index 97% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4kz100Controller.cs rename to src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx4kz100Controller.cs index c1a5cec7..2778082d 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4kz100Controller.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx4kz100Controller.cs @@ -1,96 +1,96 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.DM; -using Crestron.SimplSharpPro.DM.Endpoints; -using Crestron.SimplSharpPro.DM.Endpoints.Transmitters; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Bridges; -using PepperDash.Essentials.DM.Config; - -namespace PepperDash.Essentials.DM -{ - // using eVst = Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType; - - /// - /// Controller class for all DM-TX-201C/S/F transmitters - /// - [Description("Wrapper class for DM-TX-4K-Z-100-C")] - public class DmTx4kz100Controller : BasicDmTxControllerBase, IRoutingInputsOutputs, IHasFeedback, - IIROutputPorts, IComPorts, ICec - { - public DmTx4kz100C1G Tx { get; private set; } - - public RoutingInputPort HdmiIn { get; private set; } - public RoutingOutputPort DmOut { get; private set; } - - /// - /// Helps get the "real" inputs, including when in Auto - /// - public eX02VideoSourceType ActualActiveVideoInput - { - get - { - return eX02VideoSourceType.Hdmi1; - } - } - public RoutingPortCollection InputPorts - { - get - { - return new RoutingPortCollection - { - HdmiIn - }; - } - } - public RoutingPortCollection OutputPorts - { - get - { - return new RoutingPortCollection { DmOut }; - } - } - public DmTx4kz100Controller(string key, string name, DmTx4kz100C1G tx) - : base(key, name, tx) - { - Tx = tx; - - HdmiIn = new RoutingInputPort(DmPortName.HdmiIn1, - eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eX02VideoSourceType.Hdmi1, this); - - DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.DmCat, null, this); - - // Set Ports for CEC - HdmiIn.Port = Tx; - - PreventRegistration = true; - } - - public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - Debug.Console(1, this, "No properties to link. Skipping device {0}", Name); - } - - #region IIROutputPorts Members - public CrestronCollection IROutputPorts { get { return Tx.IROutputPorts; } } - public int NumberOfIROutputPorts { get { return Tx.NumberOfIROutputPorts; } } - #endregion - - #region IComPorts Members - public CrestronCollection ComPorts { get { return Tx.ComPorts; } } - public int NumberOfComPorts { get { return Tx.NumberOfComPorts; } } - #endregion - - #region ICec Members - public Cec StreamCec { get { return Tx.HdmiInput.StreamCec; } } - #endregion - } +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.DM; +using Crestron.SimplSharpPro.DM.Endpoints; +using Crestron.SimplSharpPro.DM.Endpoints.Transmitters; + +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.DM.Config; + +namespace PepperDash.Essentials.DM +{ + // using eVst = Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType; + + /// + /// Controller class for all DM-TX-201C/S/F transmitters + /// + [Description("Wrapper class for DM-TX-4K-Z-100-C")] + public class DmTx4kz100Controller : BasicDmTxControllerBase, IRoutingInputsOutputs, IHasFeedback, + IIROutputPorts, IComPorts, ICec + { + public DmTx4kz100C1G Tx { get; private set; } + + public RoutingInputPort HdmiIn { get; private set; } + public RoutingOutputPort DmOut { get; private set; } + + /// + /// Helps get the "real" inputs, including when in Auto + /// + public eX02VideoSourceType ActualActiveVideoInput + { + get + { + return eX02VideoSourceType.Hdmi1; + } + } + public RoutingPortCollection InputPorts + { + get + { + return new RoutingPortCollection + { + HdmiIn + }; + } + } + public RoutingPortCollection OutputPorts + { + get + { + return new RoutingPortCollection { DmOut }; + } + } + public DmTx4kz100Controller(string key, string name, DmTx4kz100C1G tx) + : base(key, name, tx) + { + Tx = tx; + + HdmiIn = new RoutingInputPort(DmPortName.HdmiIn1, + eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eX02VideoSourceType.Hdmi1, this); + + DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.DmCat, null, this); + + // Set Ports for CEC + HdmiIn.Port = Tx; + + PreventRegistration = true; + } + + public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + Debug.Console(1, this, "No properties to link. Skipping device {0}", Name); + } + + #region IIROutputPorts Members + public CrestronCollection IROutputPorts { get { return Tx.IROutputPorts; } } + public int NumberOfIROutputPorts { get { return Tx.NumberOfIROutputPorts; } } + #endregion + + #region IComPorts Members + public CrestronCollection ComPorts { get { return Tx.ComPorts; } } + public int NumberOfComPorts { get { return Tx.NumberOfComPorts; } } + #endregion + + #region ICec Members + public Cec StreamCec { get { return Tx.HdmiInput.StreamCec; } } + #endregion + } } \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4kz202CController.cs b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx4kz202CController.cs similarity index 97% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4kz202CController.cs rename to src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx4kz202CController.cs index b9f521c6..c9a6c7f9 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4kz202CController.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx4kz202CController.cs @@ -1,406 +1,406 @@ -using Crestron.SimplSharpPro; -using System; -using System.Linq; -//using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.DM; -using Crestron.SimplSharpPro.DM.Endpoints; -using Crestron.SimplSharpPro.DM.Endpoints.Transmitters; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Bridges; - -namespace PepperDash.Essentials.DM -{ - using eVst = eX02VideoSourceType; - using eAst = eX02AudioSourceType; - - public class DmTx4kz202CController : DmTxControllerBase, ITxRoutingWithFeedback, - IIROutputPorts, IComPorts - { - public DmTx4kz202C Tx { get; private set; } - - public RoutingInputPortWithVideoStatuses HdmiIn1 { get; private set; } - public RoutingInputPortWithVideoStatuses HdmiIn2 { get; private set; } - public RoutingOutputPort DmOut { get; private set; } - public RoutingOutputPort HdmiLoopOut { get; private set; } - - public override StringFeedback ActiveVideoInputFeedback { get; protected set; } - public IntFeedback VideoSourceNumericFeedback { get; protected set; } - public IntFeedback AudioSourceNumericFeedback { get; protected set; } - public IntFeedback HdmiIn1HdcpCapabilityFeedback { get; protected set; } - public IntFeedback HdmiIn2HdcpCapabilityFeedback { get; protected set; } - public BoolFeedback Hdmi1VideoSyncFeedback { get; protected set; } - public BoolFeedback Hdmi2VideoSyncFeedback { get; protected set; } - - //public override IntFeedback HdcpSupportAllFeedback { get; protected set; } - //public override ushort HdcpSupportCapability { get; protected set; } - //IroutingNumericEvent - public event EventHandler NumericSwitchChange; - - /// - /// Raise an event when the status of a switch object changes. - /// - /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType - private void OnSwitchChange(RoutingNumericEventArgs e) - { - var newEvent = NumericSwitchChange; - if (newEvent != null) newEvent(this, e); - } - - - - /// - /// Helps get the "real" inputs, including when in Auto - /// - public eX02VideoSourceType ActualActiveVideoInput - { - get - { - if (Tx.VideoSourceFeedback != eVst.Auto) - return Tx.VideoSourceFeedback; - - if (Tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue) - return eVst.Hdmi1; - - return Tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue ? eVst.Hdmi2 : eVst.AllDisabled; - } - } - public RoutingPortCollection InputPorts - { - get - { - return new RoutingPortCollection - { - HdmiIn1, - HdmiIn2, - AnyVideoInput - }; - } - } - public RoutingPortCollection OutputPorts - { - get - { - return new RoutingPortCollection { DmOut, HdmiLoopOut }; - } - } - public DmTx4kz202CController(string key, string name, DmTx4kz202C tx, bool preventRegistration) - : base(key, name, tx) - { - Tx = tx; - PreventRegistration = preventRegistration; - - HdmiIn1 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn1, - eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this, - VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[1])) - { - FeedbackMatchObject = eVst.Hdmi1 - }; - HdmiIn2 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn2, - eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi2, this, - VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[2])) - { - FeedbackMatchObject = eVst.Hdmi2 - }; - - ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput", - () => ActualActiveVideoInput.ToString()); - - - - Tx.HdmiInputs[1].InputStreamChange += InputStreamChangeEvent; - Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent; - Tx.BaseEvent += Tx_BaseEvent; - Tx.OnlineStatusChange += Tx_OnlineStatusChange; - - VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback); - - //Return VideoSourceFeedback here as DM-TX-4KZ-202-C does not support audio breakaway - AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback); - - HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability", () => (int)tx.HdmiInputs[1].HdcpCapabilityFeedback); - - HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback); - - HdcpStateFeedback = - new IntFeedback( - () => - tx.HdmiInputs[1].HdcpCapabilityFeedback > tx.HdmiInputs[2].HdcpCapabilityFeedback - ? (int)tx.HdmiInputs[1].HdcpCapabilityFeedback - : (int)tx.HdmiInputs[2].HdcpCapabilityFeedback); - - HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support; - - Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue); - - Hdmi2VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue); - - var combinedFuncs = new VideoStatusFuncsWrapper - { - HdcpActiveFeedbackFunc = () => - (ActualActiveVideoInput == eVst.Hdmi1 - && tx.HdmiInputs[1].VideoAttributes.HdcpActiveFeedback.BoolValue) - || (ActualActiveVideoInput == eVst.Hdmi2 - && tx.HdmiInputs[2].VideoAttributes.HdcpActiveFeedback.BoolValue), - - HdcpStateFeedbackFunc = () => - { - if (ActualActiveVideoInput == eVst.Hdmi1) - return tx.HdmiInputs[1].VideoAttributes.HdcpStateFeedback.ToString(); - if (ActualActiveVideoInput == eVst.Hdmi2) - return tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString(); - return ""; - }, - - VideoResolutionFeedbackFunc = () => - { - if (ActualActiveVideoInput == eVst.Hdmi1) - return tx.HdmiInputs[1].VideoAttributes.GetVideoResolutionString(); - if (ActualActiveVideoInput == eVst.Hdmi2) - return tx.HdmiInputs[2].VideoAttributes.GetVideoResolutionString(); - return ""; - }, - VideoSyncFeedbackFunc = () => - (ActualActiveVideoInput == eVst.Hdmi1 - && tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue) - || (ActualActiveVideoInput == eVst.Hdmi2 - && tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue) - - }; - - AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn, - eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs); - - DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.DmCat, null, this); - HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, null, this); - - - AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback, - AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback, - AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback, - AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiIn1HdcpCapabilityFeedback, HdmiIn2HdcpCapabilityFeedback, - Hdmi1VideoSyncFeedback, Hdmi2VideoSyncFeedback); - - // Set Ports for CEC - HdmiIn1.Port = Tx.HdmiInputs[1]; - HdmiIn2.Port = Tx.HdmiInputs[2]; - HdmiLoopOut.Port = Tx.HdmiOutput; - DmOut.Port = Tx.DmOutput; - } - - - - public override bool CustomActivate() - { - // Link up all of these damned events to the various RoutingPorts via a helper handler - Tx.HdmiInputs[1].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn1, a.EventId); - Tx.HdmiInputs[1].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn1, a.EventId); - - Tx.HdmiInputs[2].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn2, a.EventId); - Tx.HdmiInputs[2].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn2, a.EventId); - - // Base does register and sets up comm monitoring. - return base.CustomActivate(); - } - - public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - var joinMap = GetDmTxJoinMap(joinStart, joinMapKey); - - if (Hdmi1VideoSyncFeedback != null) - { - Hdmi1VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]); - } - if (Hdmi2VideoSyncFeedback != null) - { - Hdmi2VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]); - } - - LinkDmTxToApi(this, trilist, joinMap, bridge); - } - - public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type) - { - Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input); - - switch (type) - { - case eRoutingSignalType.Video: - switch (input) - { - case 0: - { - ExecuteSwitch(eVst.Auto, null, type); - break; - } - case 1: - { - ExecuteSwitch(HdmiIn1.Selector, null, type); - break; - } - case 2: - { - ExecuteSwitch(HdmiIn2.Selector, null, type); - break; - } - case 3: - { - ExecuteSwitch(eVst.AllDisabled, null, type); - break; - } - } - break; - case eRoutingSignalType.Audio: - switch (input) - { - case 0: - { - ExecuteSwitch(eAst.Auto, null, type); - break; - } - case 1: - { - ExecuteSwitch(eAst.Hdmi1, null, type); - break; - } - case 2: - { - ExecuteSwitch(eAst.Hdmi2, null, type); - break; - } - case 3: - { - ExecuteSwitch(eAst.AllDisabled, null, type); - break; - } - } - break; - } - } - - public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) - { - if ((signalType & eRoutingSignalType.Video) == eRoutingSignalType.Video) - Tx.VideoSource = (eVst)inputSelector; - if(((signalType & eRoutingSignalType.Audio) == eRoutingSignalType.Audio)) - Debug.Console(2, this, "Unable to execute audio-only switch for tx {0}", Key); - } - - void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) - { - Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString()); - - switch (args.EventId) - { - case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId: - case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId: - case EndpointInputStreamEventIds.HdcpCapabilityFeedbackEventId: - if (inputStream == Tx.HdmiInputs[1]) HdmiIn1HdcpCapabilityFeedback.FireUpdate(); - if (inputStream == Tx.HdmiInputs[2]) HdmiIn2HdcpCapabilityFeedback.FireUpdate(); - break; - case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId: - if (inputStream == Tx.HdmiInputs[1]) Hdmi1VideoSyncFeedback.FireUpdate(); - if (inputStream == Tx.HdmiInputs[2]) Hdmi2VideoSyncFeedback.FireUpdate(); - break; - } - } - - void Tx_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) - { - var localVideoInputPort = - InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); - var localAudioInputPort = - InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); - - ActiveVideoInputFeedback.FireUpdate(); - VideoSourceNumericFeedback.FireUpdate(); - AudioSourceNumericFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); - OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localAudioInputPort, eRoutingSignalType.Audio)); - } - - - void Tx_BaseEvent(GenericBase device, BaseEventArgs args) - { - var id = args.EventId; - Debug.Console(2, this, "EventId {0}", args.EventId); - - switch (id) - { - case EndpointTransmitterBase.VideoSourceFeedbackEventId: - var localVideoInputPort = InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); - Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback); - VideoSourceNumericFeedback.FireUpdate(); - ActiveVideoInputFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); - break; - case EndpointTransmitterBase.AudioSourceFeedbackEventId: - var localInputAudioPort = InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); - Debug.Console(2, this, " Audio Source: {0}", Tx.VideoSourceFeedback); - AudioSourceNumericFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localInputAudioPort, eRoutingSignalType.Audio)); - break; - } - } - - /// - /// Relays the input stream change to the appropriate RoutingInputPort. - /// - void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId) - { - if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId) - { - return; - } - inputPort.VideoStatus.VideoSyncFeedback.FireUpdate(); - AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate(); - } - - /// - /// Relays the VideoAttributes change to a RoutingInputPort - /// - void ForwardVideoAttributeChange(RoutingInputPortWithVideoStatuses inputPort, int eventId) - { - //// LOCATION: Crestron.SimplSharpPro.DM.VideoAttributeEventIds - //Debug.Console(2, this, "VideoAttributes_AttributeChange event id={0} from {1}", - // args.EventId, (sender as VideoAttributesEnhanced).Owner.GetType()); - switch (eventId) - { - case VideoAttributeEventIds.HdcpActiveFeedbackEventId: - inputPort.VideoStatus.HdcpActiveFeedback.FireUpdate(); - AnyVideoInput.VideoStatus.HdcpActiveFeedback.FireUpdate(); - break; - case VideoAttributeEventIds.HdcpStateFeedbackEventId: - inputPort.VideoStatus.HdcpStateFeedback.FireUpdate(); - AnyVideoInput.VideoStatus.HdcpStateFeedback.FireUpdate(); - break; - case VideoAttributeEventIds.HorizontalResolutionFeedbackEventId: - case VideoAttributeEventIds.VerticalResolutionFeedbackEventId: - inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate(); - AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate(); - break; - case VideoAttributeEventIds.FramesPerSecondFeedbackEventId: - inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate(); - AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate(); - break; - } - } - - - - - #region IIROutputPorts Members - public CrestronCollection IROutputPorts { get { return Tx.IROutputPorts; } } - public int NumberOfIROutputPorts { get { return Tx.NumberOfIROutputPorts; } } - #endregion - - #region IComPorts Members - public CrestronCollection ComPorts { get { return Tx.ComPorts; } } - public int NumberOfComPorts { get { return Tx.NumberOfComPorts; } } - #endregion - } +using Crestron.SimplSharpPro; +using System; +using System.Linq; +//using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.DM; +using Crestron.SimplSharpPro.DM.Endpoints; +using Crestron.SimplSharpPro.DM.Endpoints.Transmitters; + +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Bridges; + +namespace PepperDash.Essentials.DM +{ + using eVst = eX02VideoSourceType; + using eAst = eX02AudioSourceType; + + public class DmTx4kz202CController : DmTxControllerBase, ITxRoutingWithFeedback, + IIROutputPorts, IComPorts + { + public DmTx4kz202C Tx { get; private set; } + + public RoutingInputPortWithVideoStatuses HdmiIn1 { get; private set; } + public RoutingInputPortWithVideoStatuses HdmiIn2 { get; private set; } + public RoutingOutputPort DmOut { get; private set; } + public RoutingOutputPort HdmiLoopOut { get; private set; } + + public override StringFeedback ActiveVideoInputFeedback { get; protected set; } + public IntFeedback VideoSourceNumericFeedback { get; protected set; } + public IntFeedback AudioSourceNumericFeedback { get; protected set; } + public IntFeedback HdmiIn1HdcpCapabilityFeedback { get; protected set; } + public IntFeedback HdmiIn2HdcpCapabilityFeedback { get; protected set; } + public BoolFeedback Hdmi1VideoSyncFeedback { get; protected set; } + public BoolFeedback Hdmi2VideoSyncFeedback { get; protected set; } + + //public override IntFeedback HdcpSupportAllFeedback { get; protected set; } + //public override ushort HdcpSupportCapability { get; protected set; } + //IroutingNumericEvent + public event EventHandler NumericSwitchChange; + + /// + /// Raise an event when the status of a switch object changes. + /// + /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType + private void OnSwitchChange(RoutingNumericEventArgs e) + { + var newEvent = NumericSwitchChange; + if (newEvent != null) newEvent(this, e); + } + + + + /// + /// Helps get the "real" inputs, including when in Auto + /// + public eX02VideoSourceType ActualActiveVideoInput + { + get + { + if (Tx.VideoSourceFeedback != eVst.Auto) + return Tx.VideoSourceFeedback; + + if (Tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue) + return eVst.Hdmi1; + + return Tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue ? eVst.Hdmi2 : eVst.AllDisabled; + } + } + public RoutingPortCollection InputPorts + { + get + { + return new RoutingPortCollection + { + HdmiIn1, + HdmiIn2, + AnyVideoInput + }; + } + } + public RoutingPortCollection OutputPorts + { + get + { + return new RoutingPortCollection { DmOut, HdmiLoopOut }; + } + } + public DmTx4kz202CController(string key, string name, DmTx4kz202C tx, bool preventRegistration) + : base(key, name, tx) + { + Tx = tx; + PreventRegistration = preventRegistration; + + HdmiIn1 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn1, + eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this, + VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[1])) + { + FeedbackMatchObject = eVst.Hdmi1 + }; + HdmiIn2 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn2, + eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi2, this, + VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[2])) + { + FeedbackMatchObject = eVst.Hdmi2 + }; + + ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput", + () => ActualActiveVideoInput.ToString()); + + + + Tx.HdmiInputs[1].InputStreamChange += InputStreamChangeEvent; + Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent; + Tx.BaseEvent += Tx_BaseEvent; + Tx.OnlineStatusChange += Tx_OnlineStatusChange; + + VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback); + + //Return VideoSourceFeedback here as DM-TX-4KZ-202-C does not support audio breakaway + AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback); + + HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability", () => (int)tx.HdmiInputs[1].HdcpCapabilityFeedback); + + HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback); + + HdcpStateFeedback = + new IntFeedback( + () => + tx.HdmiInputs[1].HdcpCapabilityFeedback > tx.HdmiInputs[2].HdcpCapabilityFeedback + ? (int)tx.HdmiInputs[1].HdcpCapabilityFeedback + : (int)tx.HdmiInputs[2].HdcpCapabilityFeedback); + + HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support; + + Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue); + + Hdmi2VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue); + + var combinedFuncs = new VideoStatusFuncsWrapper + { + HdcpActiveFeedbackFunc = () => + (ActualActiveVideoInput == eVst.Hdmi1 + && tx.HdmiInputs[1].VideoAttributes.HdcpActiveFeedback.BoolValue) + || (ActualActiveVideoInput == eVst.Hdmi2 + && tx.HdmiInputs[2].VideoAttributes.HdcpActiveFeedback.BoolValue), + + HdcpStateFeedbackFunc = () => + { + if (ActualActiveVideoInput == eVst.Hdmi1) + return tx.HdmiInputs[1].VideoAttributes.HdcpStateFeedback.ToString(); + if (ActualActiveVideoInput == eVst.Hdmi2) + return tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString(); + return ""; + }, + + VideoResolutionFeedbackFunc = () => + { + if (ActualActiveVideoInput == eVst.Hdmi1) + return tx.HdmiInputs[1].VideoAttributes.GetVideoResolutionString(); + if (ActualActiveVideoInput == eVst.Hdmi2) + return tx.HdmiInputs[2].VideoAttributes.GetVideoResolutionString(); + return ""; + }, + VideoSyncFeedbackFunc = () => + (ActualActiveVideoInput == eVst.Hdmi1 + && tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue) + || (ActualActiveVideoInput == eVst.Hdmi2 + && tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue) + + }; + + AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn, + eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs); + + DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.DmCat, null, this); + HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, null, this); + + + AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback, + AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback, + AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback, + AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiIn1HdcpCapabilityFeedback, HdmiIn2HdcpCapabilityFeedback, + Hdmi1VideoSyncFeedback, Hdmi2VideoSyncFeedback); + + // Set Ports for CEC + HdmiIn1.Port = Tx.HdmiInputs[1]; + HdmiIn2.Port = Tx.HdmiInputs[2]; + HdmiLoopOut.Port = Tx.HdmiOutput; + DmOut.Port = Tx.DmOutput; + } + + + + public override bool CustomActivate() + { + // Link up all of these damned events to the various RoutingPorts via a helper handler + Tx.HdmiInputs[1].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn1, a.EventId); + Tx.HdmiInputs[1].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn1, a.EventId); + + Tx.HdmiInputs[2].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn2, a.EventId); + Tx.HdmiInputs[2].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn2, a.EventId); + + // Base does register and sets up comm monitoring. + return base.CustomActivate(); + } + + public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + var joinMap = GetDmTxJoinMap(joinStart, joinMapKey); + + if (Hdmi1VideoSyncFeedback != null) + { + Hdmi1VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]); + } + if (Hdmi2VideoSyncFeedback != null) + { + Hdmi2VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]); + } + + LinkDmTxToApi(this, trilist, joinMap, bridge); + } + + public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type) + { + Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input); + + switch (type) + { + case eRoutingSignalType.Video: + switch (input) + { + case 0: + { + ExecuteSwitch(eVst.Auto, null, type); + break; + } + case 1: + { + ExecuteSwitch(HdmiIn1.Selector, null, type); + break; + } + case 2: + { + ExecuteSwitch(HdmiIn2.Selector, null, type); + break; + } + case 3: + { + ExecuteSwitch(eVst.AllDisabled, null, type); + break; + } + } + break; + case eRoutingSignalType.Audio: + switch (input) + { + case 0: + { + ExecuteSwitch(eAst.Auto, null, type); + break; + } + case 1: + { + ExecuteSwitch(eAst.Hdmi1, null, type); + break; + } + case 2: + { + ExecuteSwitch(eAst.Hdmi2, null, type); + break; + } + case 3: + { + ExecuteSwitch(eAst.AllDisabled, null, type); + break; + } + } + break; + } + } + + public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) + { + if ((signalType & eRoutingSignalType.Video) == eRoutingSignalType.Video) + Tx.VideoSource = (eVst)inputSelector; + if(((signalType & eRoutingSignalType.Audio) == eRoutingSignalType.Audio)) + Debug.Console(2, this, "Unable to execute audio-only switch for tx {0}", Key); + } + + void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) + { + Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString()); + + switch (args.EventId) + { + case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId: + case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId: + case EndpointInputStreamEventIds.HdcpCapabilityFeedbackEventId: + if (inputStream == Tx.HdmiInputs[1]) HdmiIn1HdcpCapabilityFeedback.FireUpdate(); + if (inputStream == Tx.HdmiInputs[2]) HdmiIn2HdcpCapabilityFeedback.FireUpdate(); + break; + case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId: + if (inputStream == Tx.HdmiInputs[1]) Hdmi1VideoSyncFeedback.FireUpdate(); + if (inputStream == Tx.HdmiInputs[2]) Hdmi2VideoSyncFeedback.FireUpdate(); + break; + } + } + + void Tx_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) + { + var localVideoInputPort = + InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); + var localAudioInputPort = + InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); + + ActiveVideoInputFeedback.FireUpdate(); + VideoSourceNumericFeedback.FireUpdate(); + AudioSourceNumericFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); + OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localAudioInputPort, eRoutingSignalType.Audio)); + } + + + void Tx_BaseEvent(GenericBase device, BaseEventArgs args) + { + var id = args.EventId; + Debug.Console(2, this, "EventId {0}", args.EventId); + + switch (id) + { + case EndpointTransmitterBase.VideoSourceFeedbackEventId: + var localVideoInputPort = InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); + Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback); + VideoSourceNumericFeedback.FireUpdate(); + ActiveVideoInputFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); + break; + case EndpointTransmitterBase.AudioSourceFeedbackEventId: + var localInputAudioPort = InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); + Debug.Console(2, this, " Audio Source: {0}", Tx.VideoSourceFeedback); + AudioSourceNumericFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localInputAudioPort, eRoutingSignalType.Audio)); + break; + } + } + + /// + /// Relays the input stream change to the appropriate RoutingInputPort. + /// + void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId) + { + if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId) + { + return; + } + inputPort.VideoStatus.VideoSyncFeedback.FireUpdate(); + AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate(); + } + + /// + /// Relays the VideoAttributes change to a RoutingInputPort + /// + void ForwardVideoAttributeChange(RoutingInputPortWithVideoStatuses inputPort, int eventId) + { + //// LOCATION: Crestron.SimplSharpPro.DM.VideoAttributeEventIds + //Debug.Console(2, this, "VideoAttributes_AttributeChange event id={0} from {1}", + // args.EventId, (sender as VideoAttributesEnhanced).Owner.GetType()); + switch (eventId) + { + case VideoAttributeEventIds.HdcpActiveFeedbackEventId: + inputPort.VideoStatus.HdcpActiveFeedback.FireUpdate(); + AnyVideoInput.VideoStatus.HdcpActiveFeedback.FireUpdate(); + break; + case VideoAttributeEventIds.HdcpStateFeedbackEventId: + inputPort.VideoStatus.HdcpStateFeedback.FireUpdate(); + AnyVideoInput.VideoStatus.HdcpStateFeedback.FireUpdate(); + break; + case VideoAttributeEventIds.HorizontalResolutionFeedbackEventId: + case VideoAttributeEventIds.VerticalResolutionFeedbackEventId: + inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate(); + AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate(); + break; + case VideoAttributeEventIds.FramesPerSecondFeedbackEventId: + inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate(); + AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate(); + break; + } + } + + + + + #region IIROutputPorts Members + public CrestronCollection IROutputPorts { get { return Tx.IROutputPorts; } } + public int NumberOfIROutputPorts { get { return Tx.NumberOfIROutputPorts; } } + #endregion + + #region IComPorts Members + public CrestronCollection ComPorts { get { return Tx.ComPorts; } } + public int NumberOfComPorts { get { return Tx.NumberOfComPorts; } } + #endregion + } } \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4kz302CController.cs b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx4kz302CController.cs similarity index 97% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4kz302CController.cs rename to src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx4kz302CController.cs index de60d80e..90976a10 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4kz302CController.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTx4kz302CController.cs @@ -1,427 +1,427 @@ -using Crestron.SimplSharpPro; -using System; -using System.Linq; -//using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.DM; -using Crestron.SimplSharpPro.DM.Endpoints; -using Crestron.SimplSharpPro.DM.Endpoints.Transmitters; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Bridges; - -namespace PepperDash.Essentials.DM -{ - using eVst = eX02VideoSourceType; - using eAst = eX02AudioSourceType; - - - [Description("Wrapper class for DM-TX-4K-Z-302-C")] - public class DmTx4kz302CController : DmTxControllerBase, ITxRoutingWithFeedback, IHasFeedback, - IIROutputPorts, IComPorts - { - public DmTx4kz302C Tx { get; private set; } - - public RoutingInputPortWithVideoStatuses HdmiIn1 { get; private set; } - public RoutingInputPortWithVideoStatuses HdmiIn2 { get; private set; } - public RoutingInputPortWithVideoStatuses DisplayPortIn { get; private set; } - public RoutingOutputPort DmOut { get; private set; } - public RoutingOutputPort HdmiLoopOut { get; private set; } - - public override StringFeedback ActiveVideoInputFeedback { get; protected set; } - public IntFeedback VideoSourceNumericFeedback { get; protected set; } - public IntFeedback AudioSourceNumericFeedback { get; protected set; } - public IntFeedback HdmiIn1HdcpCapabilityFeedback { get; protected set; } - public IntFeedback HdmiIn2HdcpCapabilityFeedback { get; protected set; } - public BoolFeedback Hdmi1VideoSyncFeedback { get; protected set; } - public BoolFeedback Hdmi2VideoSyncFeedback { get; protected set; } - public BoolFeedback DisplayPortVideoSyncFeedback { get; protected set; } - - //public override IntFeedback HdcpSupportAllFeedback { get; protected set; } - //public override ushort HdcpSupportCapability { get; protected set; } - - //IroutingNumericEvent - public event EventHandler NumericSwitchChange; - - /// - /// Raise an event when the status of a switch object changes. - /// - /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType - private void OnSwitchChange(RoutingNumericEventArgs e) - { - var newEvent = NumericSwitchChange; - if (newEvent != null) newEvent(this, e); - } - - /// - /// Helps get the "real" inputs, including when in Auto - /// - public eX02VideoSourceType ActualActiveVideoInput - { - get - { - if (Tx.VideoSourceFeedback != eVst.Auto) - return Tx.VideoSourceFeedback; - if (Tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue) - return eVst.Hdmi1; - if (Tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue) - return eVst.Hdmi2; - - return Tx.DisplayPortInput.SyncDetectedFeedback.BoolValue ? eVst.Vga : eVst.AllDisabled; - } - } - public RoutingPortCollection InputPorts - { - get - { - return new RoutingPortCollection - { - HdmiIn1, - HdmiIn2, - DisplayPortIn, - AnyVideoInput - }; - } - } - public RoutingPortCollection OutputPorts - { - get - { - return new RoutingPortCollection { DmOut, HdmiLoopOut }; - } - } - public DmTx4kz302CController(string key, string name, DmTx4kz302C tx, bool preventRegistration) - : base(key, name, tx) - { - Tx = tx; - PreventRegistration = preventRegistration; - - HdmiIn1 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn1, - eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this, - VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[1])) - { - FeedbackMatchObject = eVst.Hdmi1 - }; - HdmiIn2 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn2, - eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi2, this, - VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[2])) - { - FeedbackMatchObject = eVst.Hdmi2 - }; - DisplayPortIn = new RoutingInputPortWithVideoStatuses(DmPortName.DisplayPortIn, - eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DisplayPort, eVst.DisplayPort, this, - VideoStatusHelper.GetDisplayPortInputStatusFuncs(tx.DisplayPortInput)) - { - FeedbackMatchObject = eVst.DisplayPort - }; - ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput", - () => ActualActiveVideoInput.ToString()); - - Tx.HdmiInputs[1].InputStreamChange += InputStreamChangeEvent; - Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent; - Tx.DisplayPortInput.InputStreamChange += DisplayPortInputStreamChange; - Tx.BaseEvent += Tx_BaseEvent; - Tx.OnlineStatusChange += Tx_OnlineStatusChange; - - VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback); - AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback); - - HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability", () => (int)tx.HdmiInputs[1].HdcpCapabilityFeedback); - - HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback); - - HdcpStateFeedback = - new IntFeedback( - () => - tx.HdmiInputs[1].HdcpCapabilityFeedback > tx.HdmiInputs[2].HdcpCapabilityFeedback - ? (int)tx.HdmiInputs[1].HdcpCapabilityFeedback - : (int)tx.HdmiInputs[2].HdcpCapabilityFeedback); - - HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support; - - Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue); - - Hdmi2VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue); - - DisplayPortVideoSyncFeedback = new BoolFeedback(() => (bool)tx.DisplayPortInput.SyncDetectedFeedback.BoolValue); - - - var combinedFuncs = new VideoStatusFuncsWrapper - { - HdcpActiveFeedbackFunc = () => - (ActualActiveVideoInput == eVst.Hdmi1 - && tx.HdmiInputs[1].VideoAttributes.HdcpActiveFeedback.BoolValue) - || (ActualActiveVideoInput == eVst.Hdmi2 - && tx.HdmiInputs[2].VideoAttributes.HdcpActiveFeedback.BoolValue), - - HdcpStateFeedbackFunc = () => - { - if (ActualActiveVideoInput == eVst.Hdmi1) - return tx.HdmiInputs[1].VideoAttributes.HdcpStateFeedback.ToString(); - return ActualActiveVideoInput == eVst.Hdmi2 ? tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString() : ""; - }, - - VideoResolutionFeedbackFunc = () => - { - if (ActualActiveVideoInput == eVst.Hdmi1) - return tx.HdmiInputs[1].VideoAttributes.GetVideoResolutionString(); - if (ActualActiveVideoInput == eVst.Hdmi2) - return tx.HdmiInputs[2].VideoAttributes.GetVideoResolutionString(); - return ActualActiveVideoInput == eVst.Vga ? tx.DisplayPortInput.VideoAttributes.GetVideoResolutionString() : ""; - }, - VideoSyncFeedbackFunc = () => - (ActualActiveVideoInput == eVst.Hdmi1 - && tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue) - || (ActualActiveVideoInput == eVst.Hdmi2 - && tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue) - || (ActualActiveVideoInput == eVst.Vga - && tx.DisplayPortInput.SyncDetectedFeedback.BoolValue) - - }; - - AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn, - eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs); - - DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.DmCat, null, this); - HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, null, this); - - - AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback, - AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback, - AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback, - AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiIn1HdcpCapabilityFeedback, HdmiIn2HdcpCapabilityFeedback, - Hdmi1VideoSyncFeedback, Hdmi2VideoSyncFeedback, DisplayPortVideoSyncFeedback); - - // Set Ports for CEC - HdmiIn1.Port = Tx.HdmiInputs[1]; - HdmiIn2.Port = Tx.HdmiInputs[2]; - HdmiLoopOut.Port = Tx.HdmiOutput; - DmOut.Port = Tx.DmOutput; - } - - void DisplayPortInputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) - { - Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString()); - - switch (args.EventId) - { - case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId: - DisplayPortVideoSyncFeedback.FireUpdate(); - break; - } - } - - - - public override bool CustomActivate() - { - // Link up all of these damned events to the various RoutingPorts via a helper handler - Tx.HdmiInputs[1].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn1, a.EventId); - Tx.HdmiInputs[1].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn1, a.EventId); - - Tx.HdmiInputs[2].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn2, a.EventId); - Tx.HdmiInputs[2].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn2, a.EventId); - - Tx.DisplayPortInput.InputStreamChange += (o, a) => FowardInputStreamChange(DisplayPortIn, a.EventId); - Tx.DisplayPortInput.VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(DisplayPortIn, a.EventId); - - // Base does register and sets up comm monitoring. - return base.CustomActivate(); - } - - public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - var joinMap = GetDmTxJoinMap(joinStart, joinMapKey); - - if (Hdmi1VideoSyncFeedback != null) - { - Hdmi1VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]); - } - if (Hdmi2VideoSyncFeedback != null) - { - Hdmi2VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]); - } - if (DisplayPortVideoSyncFeedback != null) - { - DisplayPortVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input3VideoSyncStatus.JoinNumber]); - } - - LinkDmTxToApi(this, trilist, joinMap, bridge); - } - - public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type) - { - Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input); - - switch (input) - { - case 0: - { - ExecuteSwitch(eVst.Auto, null, type); - break; - } - case 1: - { - ExecuteSwitch(HdmiIn1.Selector, null, type); - break; - } - case 2: - { - ExecuteSwitch(HdmiIn2.Selector, null, type); - break; - } - case 3: - { - ExecuteSwitch(DisplayPortIn.Selector, null, type); - break; - } - case 4: - { - ExecuteSwitch(eVst.AllDisabled, null, type); - break; - } - default: - { - Debug.Console(2, this, "Unable to execute numeric switch to input {0}", input); - break; - } - - } - - - } - - public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) - { - try - { - Debug.Console(2, this, "Attempting to switch InputSelector {0}", ((eVst)inputSelector).ToString()); - if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video) - Tx.VideoSource = (eVst)inputSelector; - - // NOTE: It's possible that this particular TX model may not like the AudioSource property being set. - // The SIMPL definition only shows a single analog for AudioVideo Source - if ((signalType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio) - //it doesn't - Debug.Console(2, this, "Unable to execute audio-only switch for tx {0}", Key); - //Tx.AudioSource = (eAst)inputSelector; - } - catch (Exception e) - { - Debug.Console(2, this, "Exception in ExecuteSwitch: {0}", e); - } - } - - void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) - { - Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString()); - - switch (args.EventId) - { - case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId: - case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId: - case EndpointInputStreamEventIds.HdcpCapabilityFeedbackEventId: - if (inputStream == Tx.HdmiInputs[1]) HdmiIn1HdcpCapabilityFeedback.FireUpdate(); - if (inputStream == Tx.HdmiInputs[2]) HdmiIn2HdcpCapabilityFeedback.FireUpdate(); - HdcpStateFeedback.FireUpdate(); - break; - case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId: - if (inputStream == Tx.HdmiInputs[1]) Hdmi1VideoSyncFeedback.FireUpdate(); - if (inputStream == Tx.HdmiInputs[2]) Hdmi2VideoSyncFeedback.FireUpdate(); - break; - } - } - - void Tx_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) - { - var localVideoInputPort = - InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); - var localAudioInputPort = - InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); - - ActiveVideoInputFeedback.FireUpdate(); - VideoSourceNumericFeedback.FireUpdate(); - AudioSourceNumericFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); - OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localAudioInputPort, eRoutingSignalType.Audio)); - } - - - void Tx_BaseEvent(GenericBase device, BaseEventArgs args) - { - var id = args.EventId; - Debug.Console(2, this, "EventId {0}", args.EventId); - - switch (id) - { - case EndpointTransmitterBase.VideoSourceFeedbackEventId: - var localVideoInputPort = InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); - Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback); - VideoSourceNumericFeedback.FireUpdate(); - ActiveVideoInputFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); - break; - case EndpointTransmitterBase.AudioSourceFeedbackEventId: - var localInputAudioPort = InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); - Debug.Console(2, this, " Audio Source: {0}", Tx.VideoSourceFeedback); - AudioSourceNumericFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localInputAudioPort, eRoutingSignalType.Audio)); - break; - } - } - - /// - /// Relays the input stream change to the appropriate RoutingInputPort. - /// - void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId) - { - if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId) return; - inputPort.VideoStatus.VideoSyncFeedback.FireUpdate(); - AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate(); - } - - /// - /// Relays the VideoAttributes change to a RoutingInputPort - /// - void ForwardVideoAttributeChange(RoutingInputPortWithVideoStatuses inputPort, int eventId) - { - //// LOCATION: Crestron.SimplSharpPro.DM.VideoAttributeEventIds - //Debug.Console(2, this, "VideoAttributes_AttributeChange event id={0} from {1}", - // args.EventId, (sender as VideoAttributesEnhanced).Owner.GetType()); - switch (eventId) - { - case VideoAttributeEventIds.HdcpActiveFeedbackEventId: - inputPort.VideoStatus.HdcpActiveFeedback.FireUpdate(); - AnyVideoInput.VideoStatus.HdcpActiveFeedback.FireUpdate(); - break; - case VideoAttributeEventIds.HdcpStateFeedbackEventId: - inputPort.VideoStatus.HdcpStateFeedback.FireUpdate(); - AnyVideoInput.VideoStatus.HdcpStateFeedback.FireUpdate(); - break; - case VideoAttributeEventIds.HorizontalResolutionFeedbackEventId: - case VideoAttributeEventIds.VerticalResolutionFeedbackEventId: - inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate(); - AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate(); - break; - case VideoAttributeEventIds.FramesPerSecondFeedbackEventId: - inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate(); - AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate(); - break; - } - } - - - #region IIROutputPorts Members - public CrestronCollection IROutputPorts { get { return Tx.IROutputPorts; } } - public int NumberOfIROutputPorts { get { return Tx.NumberOfIROutputPorts; } } - #endregion - - #region IComPorts Members - public CrestronCollection ComPorts { get { return Tx.ComPorts; } } - public int NumberOfComPorts { get { return Tx.NumberOfComPorts; } } - #endregion - } +using Crestron.SimplSharpPro; +using System; +using System.Linq; +//using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.DM; +using Crestron.SimplSharpPro.DM.Endpoints; +using Crestron.SimplSharpPro.DM.Endpoints.Transmitters; + +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Bridges; + +namespace PepperDash.Essentials.DM +{ + using eVst = eX02VideoSourceType; + using eAst = eX02AudioSourceType; + + + [Description("Wrapper class for DM-TX-4K-Z-302-C")] + public class DmTx4kz302CController : DmTxControllerBase, ITxRoutingWithFeedback, IHasFeedback, + IIROutputPorts, IComPorts + { + public DmTx4kz302C Tx { get; private set; } + + public RoutingInputPortWithVideoStatuses HdmiIn1 { get; private set; } + public RoutingInputPortWithVideoStatuses HdmiIn2 { get; private set; } + public RoutingInputPortWithVideoStatuses DisplayPortIn { get; private set; } + public RoutingOutputPort DmOut { get; private set; } + public RoutingOutputPort HdmiLoopOut { get; private set; } + + public override StringFeedback ActiveVideoInputFeedback { get; protected set; } + public IntFeedback VideoSourceNumericFeedback { get; protected set; } + public IntFeedback AudioSourceNumericFeedback { get; protected set; } + public IntFeedback HdmiIn1HdcpCapabilityFeedback { get; protected set; } + public IntFeedback HdmiIn2HdcpCapabilityFeedback { get; protected set; } + public BoolFeedback Hdmi1VideoSyncFeedback { get; protected set; } + public BoolFeedback Hdmi2VideoSyncFeedback { get; protected set; } + public BoolFeedback DisplayPortVideoSyncFeedback { get; protected set; } + + //public override IntFeedback HdcpSupportAllFeedback { get; protected set; } + //public override ushort HdcpSupportCapability { get; protected set; } + + //IroutingNumericEvent + public event EventHandler NumericSwitchChange; + + /// + /// Raise an event when the status of a switch object changes. + /// + /// Arguments defined as IKeyName sender, output, input, and eRoutingSignalType + private void OnSwitchChange(RoutingNumericEventArgs e) + { + var newEvent = NumericSwitchChange; + if (newEvent != null) newEvent(this, e); + } + + /// + /// Helps get the "real" inputs, including when in Auto + /// + public eX02VideoSourceType ActualActiveVideoInput + { + get + { + if (Tx.VideoSourceFeedback != eVst.Auto) + return Tx.VideoSourceFeedback; + if (Tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue) + return eVst.Hdmi1; + if (Tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue) + return eVst.Hdmi2; + + return Tx.DisplayPortInput.SyncDetectedFeedback.BoolValue ? eVst.Vga : eVst.AllDisabled; + } + } + public RoutingPortCollection InputPorts + { + get + { + return new RoutingPortCollection + { + HdmiIn1, + HdmiIn2, + DisplayPortIn, + AnyVideoInput + }; + } + } + public RoutingPortCollection OutputPorts + { + get + { + return new RoutingPortCollection { DmOut, HdmiLoopOut }; + } + } + public DmTx4kz302CController(string key, string name, DmTx4kz302C tx, bool preventRegistration) + : base(key, name, tx) + { + Tx = tx; + PreventRegistration = preventRegistration; + + HdmiIn1 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn1, + eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this, + VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[1])) + { + FeedbackMatchObject = eVst.Hdmi1 + }; + HdmiIn2 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn2, + eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi2, this, + VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[2])) + { + FeedbackMatchObject = eVst.Hdmi2 + }; + DisplayPortIn = new RoutingInputPortWithVideoStatuses(DmPortName.DisplayPortIn, + eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DisplayPort, eVst.DisplayPort, this, + VideoStatusHelper.GetDisplayPortInputStatusFuncs(tx.DisplayPortInput)) + { + FeedbackMatchObject = eVst.DisplayPort + }; + ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput", + () => ActualActiveVideoInput.ToString()); + + Tx.HdmiInputs[1].InputStreamChange += InputStreamChangeEvent; + Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent; + Tx.DisplayPortInput.InputStreamChange += DisplayPortInputStreamChange; + Tx.BaseEvent += Tx_BaseEvent; + Tx.OnlineStatusChange += Tx_OnlineStatusChange; + + VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback); + AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback); + + HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability", () => (int)tx.HdmiInputs[1].HdcpCapabilityFeedback); + + HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback); + + HdcpStateFeedback = + new IntFeedback( + () => + tx.HdmiInputs[1].HdcpCapabilityFeedback > tx.HdmiInputs[2].HdcpCapabilityFeedback + ? (int)tx.HdmiInputs[1].HdcpCapabilityFeedback + : (int)tx.HdmiInputs[2].HdcpCapabilityFeedback); + + HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support; + + Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue); + + Hdmi2VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue); + + DisplayPortVideoSyncFeedback = new BoolFeedback(() => (bool)tx.DisplayPortInput.SyncDetectedFeedback.BoolValue); + + + var combinedFuncs = new VideoStatusFuncsWrapper + { + HdcpActiveFeedbackFunc = () => + (ActualActiveVideoInput == eVst.Hdmi1 + && tx.HdmiInputs[1].VideoAttributes.HdcpActiveFeedback.BoolValue) + || (ActualActiveVideoInput == eVst.Hdmi2 + && tx.HdmiInputs[2].VideoAttributes.HdcpActiveFeedback.BoolValue), + + HdcpStateFeedbackFunc = () => + { + if (ActualActiveVideoInput == eVst.Hdmi1) + return tx.HdmiInputs[1].VideoAttributes.HdcpStateFeedback.ToString(); + return ActualActiveVideoInput == eVst.Hdmi2 ? tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString() : ""; + }, + + VideoResolutionFeedbackFunc = () => + { + if (ActualActiveVideoInput == eVst.Hdmi1) + return tx.HdmiInputs[1].VideoAttributes.GetVideoResolutionString(); + if (ActualActiveVideoInput == eVst.Hdmi2) + return tx.HdmiInputs[2].VideoAttributes.GetVideoResolutionString(); + return ActualActiveVideoInput == eVst.Vga ? tx.DisplayPortInput.VideoAttributes.GetVideoResolutionString() : ""; + }, + VideoSyncFeedbackFunc = () => + (ActualActiveVideoInput == eVst.Hdmi1 + && tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue) + || (ActualActiveVideoInput == eVst.Hdmi2 + && tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue) + || (ActualActiveVideoInput == eVst.Vga + && tx.DisplayPortInput.SyncDetectedFeedback.BoolValue) + + }; + + AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn, + eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs); + + DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.DmCat, null, this); + HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, null, this); + + + AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback, + AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback, + AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback, + AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiIn1HdcpCapabilityFeedback, HdmiIn2HdcpCapabilityFeedback, + Hdmi1VideoSyncFeedback, Hdmi2VideoSyncFeedback, DisplayPortVideoSyncFeedback); + + // Set Ports for CEC + HdmiIn1.Port = Tx.HdmiInputs[1]; + HdmiIn2.Port = Tx.HdmiInputs[2]; + HdmiLoopOut.Port = Tx.HdmiOutput; + DmOut.Port = Tx.DmOutput; + } + + void DisplayPortInputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) + { + Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString()); + + switch (args.EventId) + { + case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId: + DisplayPortVideoSyncFeedback.FireUpdate(); + break; + } + } + + + + public override bool CustomActivate() + { + // Link up all of these damned events to the various RoutingPorts via a helper handler + Tx.HdmiInputs[1].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn1, a.EventId); + Tx.HdmiInputs[1].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn1, a.EventId); + + Tx.HdmiInputs[2].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn2, a.EventId); + Tx.HdmiInputs[2].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn2, a.EventId); + + Tx.DisplayPortInput.InputStreamChange += (o, a) => FowardInputStreamChange(DisplayPortIn, a.EventId); + Tx.DisplayPortInput.VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(DisplayPortIn, a.EventId); + + // Base does register and sets up comm monitoring. + return base.CustomActivate(); + } + + public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + var joinMap = GetDmTxJoinMap(joinStart, joinMapKey); + + if (Hdmi1VideoSyncFeedback != null) + { + Hdmi1VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]); + } + if (Hdmi2VideoSyncFeedback != null) + { + Hdmi2VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]); + } + if (DisplayPortVideoSyncFeedback != null) + { + DisplayPortVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input3VideoSyncStatus.JoinNumber]); + } + + LinkDmTxToApi(this, trilist, joinMap, bridge); + } + + public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type) + { + Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input); + + switch (input) + { + case 0: + { + ExecuteSwitch(eVst.Auto, null, type); + break; + } + case 1: + { + ExecuteSwitch(HdmiIn1.Selector, null, type); + break; + } + case 2: + { + ExecuteSwitch(HdmiIn2.Selector, null, type); + break; + } + case 3: + { + ExecuteSwitch(DisplayPortIn.Selector, null, type); + break; + } + case 4: + { + ExecuteSwitch(eVst.AllDisabled, null, type); + break; + } + default: + { + Debug.Console(2, this, "Unable to execute numeric switch to input {0}", input); + break; + } + + } + + + } + + public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) + { + try + { + Debug.Console(2, this, "Attempting to switch InputSelector {0}", ((eVst)inputSelector).ToString()); + if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video) + Tx.VideoSource = (eVst)inputSelector; + + // NOTE: It's possible that this particular TX model may not like the AudioSource property being set. + // The SIMPL definition only shows a single analog for AudioVideo Source + if ((signalType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio) + //it doesn't + Debug.Console(2, this, "Unable to execute audio-only switch for tx {0}", Key); + //Tx.AudioSource = (eAst)inputSelector; + } + catch (Exception e) + { + Debug.Console(2, this, "Exception in ExecuteSwitch: {0}", e); + } + } + + void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) + { + Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString()); + + switch (args.EventId) + { + case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId: + case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId: + case EndpointInputStreamEventIds.HdcpCapabilityFeedbackEventId: + if (inputStream == Tx.HdmiInputs[1]) HdmiIn1HdcpCapabilityFeedback.FireUpdate(); + if (inputStream == Tx.HdmiInputs[2]) HdmiIn2HdcpCapabilityFeedback.FireUpdate(); + HdcpStateFeedback.FireUpdate(); + break; + case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId: + if (inputStream == Tx.HdmiInputs[1]) Hdmi1VideoSyncFeedback.FireUpdate(); + if (inputStream == Tx.HdmiInputs[2]) Hdmi2VideoSyncFeedback.FireUpdate(); + break; + } + } + + void Tx_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) + { + var localVideoInputPort = + InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); + var localAudioInputPort = + InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); + + ActiveVideoInputFeedback.FireUpdate(); + VideoSourceNumericFeedback.FireUpdate(); + AudioSourceNumericFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); + OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localAudioInputPort, eRoutingSignalType.Audio)); + } + + + void Tx_BaseEvent(GenericBase device, BaseEventArgs args) + { + var id = args.EventId; + Debug.Console(2, this, "EventId {0}", args.EventId); + + switch (id) + { + case EndpointTransmitterBase.VideoSourceFeedbackEventId: + var localVideoInputPort = InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); + Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback); + VideoSourceNumericFeedback.FireUpdate(); + ActiveVideoInputFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video)); + break; + case EndpointTransmitterBase.AudioSourceFeedbackEventId: + var localInputAudioPort = InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback); + Debug.Console(2, this, " Audio Source: {0}", Tx.VideoSourceFeedback); + AudioSourceNumericFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localInputAudioPort, eRoutingSignalType.Audio)); + break; + } + } + + /// + /// Relays the input stream change to the appropriate RoutingInputPort. + /// + void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId) + { + if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId) return; + inputPort.VideoStatus.VideoSyncFeedback.FireUpdate(); + AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate(); + } + + /// + /// Relays the VideoAttributes change to a RoutingInputPort + /// + void ForwardVideoAttributeChange(RoutingInputPortWithVideoStatuses inputPort, int eventId) + { + //// LOCATION: Crestron.SimplSharpPro.DM.VideoAttributeEventIds + //Debug.Console(2, this, "VideoAttributes_AttributeChange event id={0} from {1}", + // args.EventId, (sender as VideoAttributesEnhanced).Owner.GetType()); + switch (eventId) + { + case VideoAttributeEventIds.HdcpActiveFeedbackEventId: + inputPort.VideoStatus.HdcpActiveFeedback.FireUpdate(); + AnyVideoInput.VideoStatus.HdcpActiveFeedback.FireUpdate(); + break; + case VideoAttributeEventIds.HdcpStateFeedbackEventId: + inputPort.VideoStatus.HdcpStateFeedback.FireUpdate(); + AnyVideoInput.VideoStatus.HdcpStateFeedback.FireUpdate(); + break; + case VideoAttributeEventIds.HorizontalResolutionFeedbackEventId: + case VideoAttributeEventIds.VerticalResolutionFeedbackEventId: + inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate(); + AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate(); + break; + case VideoAttributeEventIds.FramesPerSecondFeedbackEventId: + inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate(); + AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate(); + break; + } + } + + + #region IIROutputPorts Members + public CrestronCollection IROutputPorts { get { return Tx.IROutputPorts; } } + public int NumberOfIROutputPorts { get { return Tx.NumberOfIROutputPorts; } } + #endregion + + #region IComPorts Members + public CrestronCollection ComPorts { get { return Tx.ComPorts; } } + public int NumberOfComPorts { get { return Tx.NumberOfComPorts; } } + #endregion + } } \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTxHelpers.cs b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTxHelpers.cs similarity index 99% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTxHelpers.cs rename to src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTxHelpers.cs index d707ebd3..222fab39 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTxHelpers.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/DmTxHelpers.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -8,7 +10,7 @@ using Crestron.SimplSharpPro.DeviceSupport; using Crestron.SimplSharpPro.DM; using Crestron.SimplSharpPro.DM.Endpoints; using Crestron.SimplSharpPro.DM.Endpoints.Transmitters; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Bridges; diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/HDBaseTTxController.cs b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/HDBaseTTxController.cs similarity index 98% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/HDBaseTTxController.cs rename to src/PepperDash.Essentials.DM/Endpoints/Transmitters/HDBaseTTxController.cs index bedf1aad..a90cb443 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/HDBaseTTxController.cs +++ b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/HDBaseTTxController.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -7,7 +9,7 @@ using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.DeviceSupport; using Crestron.SimplSharpPro.DM.Endpoints.Transmitters; using Crestron.SimplSharpPro.DM; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; using PepperDash.Core; using PepperDash.Essentials.Core; diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/TxInterfaces.cs b/src/PepperDash.Essentials.DM/Endpoints/Transmitters/TxInterfaces.cs similarity index 100% rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/TxInterfaces.cs rename to src/PepperDash.Essentials.DM/Endpoints/Transmitters/TxInterfaces.cs diff --git a/essentials-framework/Essentials DM/Essentials_DM/Extensions.cs b/src/PepperDash.Essentials.DM/Extensions.cs similarity index 100% rename from essentials-framework/Essentials DM/Essentials_DM/Extensions.cs rename to src/PepperDash.Essentials.DM/Extensions.cs diff --git a/essentials-framework/Essentials DM/Essentials_DM/IDmHdmiInputExtensions.cs b/src/PepperDash.Essentials.DM/IDmHdmiInputExtensions.cs similarity index 100% rename from essentials-framework/Essentials DM/Essentials_DM/IDmHdmiInputExtensions.cs rename to src/PepperDash.Essentials.DM/IDmHdmiInputExtensions.cs diff --git a/essentials-framework/Essentials DM/Essentials_DM/IDmSwitch.cs b/src/PepperDash.Essentials.DM/IDmSwitch.cs similarity index 96% rename from essentials-framework/Essentials DM/Essentials_DM/IDmSwitch.cs rename to src/PepperDash.Essentials.DM/IDmSwitch.cs index fdbe4956..ef50f2ce 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/IDmSwitch.cs +++ b/src/PepperDash.Essentials.DM/IDmSwitch.cs @@ -1,25 +1,25 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DM; -using Crestron.SimplSharpPro.DM.Cards; -using Crestron.SimplSharpPro.DM.Endpoints; -using Crestron.SimplSharpPro.DM.Endpoints.Receivers; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -//using PepperDash.Essentials.DM.Cards; - -using PepperDash.Essentials.DM.Config; - -namespace PepperDash.Essentials.DM { - public interface IDmSwitch { - Switch Chassis { get; } - - Dictionary TxDictionary { get; } - Dictionary RxDictionary { get; } - } +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DM; +using Crestron.SimplSharpPro.DM.Cards; +using Crestron.SimplSharpPro.DM.Endpoints; +using Crestron.SimplSharpPro.DM.Endpoints.Receivers; + +using PepperDash.Core; +using PepperDash.Essentials.Core; +//using PepperDash.Essentials.DM.Cards; + +using PepperDash.Essentials.DM.Config; + +namespace PepperDash.Essentials.DM { + public interface IDmSwitch { + Switch Chassis { get; } + + Dictionary TxDictionary { get; } + Dictionary RxDictionary { get; } + } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.DM/PepperDash.Essentials.DM.csproj b/src/PepperDash.Essentials.DM/PepperDash.Essentials.DM.csproj new file mode 100644 index 00000000..d346e5db --- /dev/null +++ b/src/PepperDash.Essentials.DM/PepperDash.Essentials.DM.csproj @@ -0,0 +1,43 @@ + + + ProgramLibrary + + + PepperDash.Essentials.DM + net472 + PepperDash.Essentials.DM + PepperDash.Essentials.DM + bin\$(Configuration)\ + PepperDash Essentials DM + $(AssemblyName) + + + full + + + pdbonly + + + + + + + + + + + + + + + all + + + Full + + + + + + + \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/VideoStatusHelpers.cs b/src/PepperDash.Essentials.DM/VideoStatusHelpers.cs similarity index 100% rename from essentials-framework/Essentials DM/Essentials_DM/VideoStatusHelpers.cs rename to src/PepperDash.Essentials.DM/VideoStatusHelpers.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Audio/GenericAudioOut.cs b/src/PepperDash.Essentials.Devices.Common/Audio/GenericAudioOut.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Audio/GenericAudioOut.cs rename to src/PepperDash.Essentials.Devices.Common/Audio/GenericAudioOut.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/AudioCodec/AudioCodecBase.cs b/src/PepperDash.Essentials.Devices.Common/AudioCodec/AudioCodecBase.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/AudioCodec/AudioCodecBase.cs rename to src/PepperDash.Essentials.Devices.Common/AudioCodec/AudioCodecBase.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/AudioCodec/Interfaces/IAudioCodecInfo.cs b/src/PepperDash.Essentials.Devices.Common/AudioCodec/Interfaces/IAudioCodecInfo.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/AudioCodec/Interfaces/IAudioCodecInfo.cs rename to src/PepperDash.Essentials.Devices.Common/AudioCodec/Interfaces/IAudioCodecInfo.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/AudioCodec/Interfaces/IHasAudioCodec.cs b/src/PepperDash.Essentials.Devices.Common/AudioCodec/Interfaces/IHasAudioCodec.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/AudioCodec/Interfaces/IHasAudioCodec.cs rename to src/PepperDash.Essentials.Devices.Common/AudioCodec/Interfaces/IHasAudioCodec.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/AudioCodec/MockAC/MockAC.cs b/src/PepperDash.Essentials.Devices.Common/AudioCodec/MockAC/MockAC.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/AudioCodec/MockAC/MockAC.cs rename to src/PepperDash.Essentials.Devices.Common/AudioCodec/MockAC/MockAC.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/AudioCodec/MockAC/MockAcPropertiesConfig.cs b/src/PepperDash.Essentials.Devices.Common/AudioCodec/MockAC/MockAcPropertiesConfig.cs similarity index 82% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/AudioCodec/MockAC/MockAcPropertiesConfig.cs rename to src/PepperDash.Essentials.Devices.Common/AudioCodec/MockAC/MockAcPropertiesConfig.cs index 7ae375b7..084c111f 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/AudioCodec/MockAC/MockAcPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Devices.Common/AudioCodec/MockAC/MockAcPropertiesConfig.cs @@ -1,10 +1,12 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.Devices.Common.AudioCodec { diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Cameras/CameraBase.cs b/src/PepperDash.Essentials.Devices.Common/Cameras/CameraBase.cs similarity index 99% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Cameras/CameraBase.cs rename to src/PepperDash.Essentials.Devices.Common/Cameras/CameraBase.cs index c5758108..294e9066 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Cameras/CameraBase.cs +++ b/src/PepperDash.Essentials.Devices.Common/Cameras/CameraBase.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -14,7 +16,7 @@ using PepperDash.Essentials.Core.Bridges; using PepperDash.Essentials.Core.Presets; using PepperDash.Essentials.Devices.Common.Codec; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.Devices.Common.Cameras { diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Cameras/CameraControl.cs b/src/PepperDash.Essentials.Devices.Common/Cameras/CameraControl.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Cameras/CameraControl.cs rename to src/PepperDash.Essentials.Devices.Common/Cameras/CameraControl.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Cameras/CameraVisca.cs b/src/PepperDash.Essentials.Devices.Common/Cameras/CameraVisca.cs similarity index 99% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Cameras/CameraVisca.cs rename to src/PepperDash.Essentials.Devices.Common/Cameras/CameraVisca.cs index 6acf5850..5f609c46 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Cameras/CameraVisca.cs +++ b/src/PepperDash.Essentials.Devices.Common/Cameras/CameraVisca.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -12,7 +14,7 @@ using PepperDash.Essentials.Devices.Common.Codec; using System.Text.RegularExpressions; using Crestron.SimplSharp.Reflection; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.Devices.Common.Cameras { diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Cameras/IHasCameraPresets.cs b/src/PepperDash.Essentials.Devices.Common/Cameras/IHasCameraPresets.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Cameras/IHasCameraPresets.cs rename to src/PepperDash.Essentials.Devices.Common/Cameras/IHasCameraPresets.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/CodecActiveCallItem.cs b/src/PepperDash.Essentials.Devices.Common/Codec/CodecActiveCallItem.cs similarity index 95% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/CodecActiveCallItem.cs rename to src/PepperDash.Essentials.Devices.Common/Codec/CodecActiveCallItem.cs index d1dbdf5f..f9624991 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/CodecActiveCallItem.cs +++ b/src/PepperDash.Essentials.Devices.Common/Codec/CodecActiveCallItem.cs @@ -1,11 +1,13 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Converters; namespace PepperDash.Essentials.Devices.Common.Codec diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/IHasCallHold.cs b/src/PepperDash.Essentials.Devices.Common/Codec/IHasCallHold.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/IHasCallHold.cs rename to src/PepperDash.Essentials.Devices.Common/Codec/IHasCallHold.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/IHasDoNotDisturb.cs b/src/PepperDash.Essentials.Devices.Common/Codec/IHasDoNotDisturb.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/IHasDoNotDisturb.cs rename to src/PepperDash.Essentials.Devices.Common/Codec/IHasDoNotDisturb.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/IHasExternalSourceSwitching.cs b/src/PepperDash.Essentials.Devices.Common/Codec/IHasExternalSourceSwitching.cs similarity index 97% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/IHasExternalSourceSwitching.cs rename to src/PepperDash.Essentials.Devices.Common/Codec/IHasExternalSourceSwitching.cs index f8ef33ee..1ea6b09b 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/IHasExternalSourceSwitching.cs +++ b/src/PepperDash.Essentials.Devices.Common/Codec/IHasExternalSourceSwitching.cs @@ -1,22 +1,22 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Devices.Common.VideoCodec.Cisco; - -namespace PepperDash.Essentials.Devices.Common.Codec -{ - public interface IHasExternalSourceSwitching - { - bool ExternalSourceListEnabled { get; } - string ExternalSourceInputPort { get; } - void AddExternalSource(string connectorId, string key, string name, eExternalSourceType type); - void SetExternalSourceState(string key, eExternalSourceMode mode); - void ClearExternalSources(); - void SetSelectedSource(string key); - Action RunRouteAction { set;} - } - +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Devices.Common.VideoCodec.Cisco; + +namespace PepperDash.Essentials.Devices.Common.Codec +{ + public interface IHasExternalSourceSwitching + { + bool ExternalSourceListEnabled { get; } + string ExternalSourceInputPort { get; } + void AddExternalSource(string connectorId, string key, string name, eExternalSourceType type); + void SetExternalSourceState(string key, eExternalSourceMode mode); + void ClearExternalSources(); + void SetSelectedSource(string key); + Action RunRouteAction { set;} + } + } \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/eCodecCallDirection.cs b/src/PepperDash.Essentials.Devices.Common/Codec/eCodecCallDirection.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/eCodecCallDirection.cs rename to src/PepperDash.Essentials.Devices.Common/Codec/eCodecCallDirection.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/eCodecCallStatus.cs b/src/PepperDash.Essentials.Devices.Common/Codec/eCodecCallStatus.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/eCodecCallStatus.cs rename to src/PepperDash.Essentials.Devices.Common/Codec/eCodecCallStatus.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/eCodecCallType.cs b/src/PepperDash.Essentials.Devices.Common/Codec/eCodecCallType.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/eCodecCallType.cs rename to src/PepperDash.Essentials.Devices.Common/Codec/eCodecCallType.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/eMeetingPrivacy.cs b/src/PepperDash.Essentials.Devices.Common/Codec/eMeetingPrivacy.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/eMeetingPrivacy.cs rename to src/PepperDash.Essentials.Devices.Common/Codec/eMeetingPrivacy.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iCodecAudio.cs b/src/PepperDash.Essentials.Devices.Common/Codec/iCodecAudio.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iCodecAudio.cs rename to src/PepperDash.Essentials.Devices.Common/Codec/iCodecAudio.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasCallFavorites.cs b/src/PepperDash.Essentials.Devices.Common/Codec/iHasCallFavorites.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasCallFavorites.cs rename to src/PepperDash.Essentials.Devices.Common/Codec/iHasCallFavorites.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasCallHistory.cs b/src/PepperDash.Essentials.Devices.Common/Codec/iHasCallHistory.cs similarity index 97% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasCallHistory.cs rename to src/PepperDash.Essentials.Devices.Common/Codec/iHasCallHistory.cs index 83a74022..b0451d7b 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasCallHistory.cs +++ b/src/PepperDash.Essentials.Devices.Common/Codec/iHasCallHistory.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -8,8 +10,8 @@ using PepperDash.Core; using PepperDash.Essentials.Devices.Common.Codec; using PepperDash.Essentials.Devices.Common.VideoCodec; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Converters; namespace PepperDash.Essentials.Devices.Common.Codec { diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasContentSharing.cs b/src/PepperDash.Essentials.Devices.Common/Codec/iHasContentSharing.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasContentSharing.cs rename to src/PepperDash.Essentials.Devices.Common/Codec/iHasContentSharing.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasDialer.cs b/src/PepperDash.Essentials.Devices.Common/Codec/iHasDialer.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasDialer.cs rename to src/PepperDash.Essentials.Devices.Common/Codec/iHasDialer.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasDirectory.cs b/src/PepperDash.Essentials.Devices.Common/Codec/iHasDirectory.cs similarity index 98% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasDirectory.cs rename to src/PepperDash.Essentials.Devices.Common/Codec/iHasDirectory.cs index 93eda176..1bb08b71 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasDirectory.cs +++ b/src/PepperDash.Essentials.Devices.Common/Codec/iHasDirectory.cs @@ -1,11 +1,13 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Converters; using PepperDash.Core; diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasScheduleAwareness.cs b/src/PepperDash.Essentials.Devices.Common/Codec/iHasScheduleAwareness.cs similarity index 99% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasScheduleAwareness.cs rename to src/PepperDash.Essentials.Devices.Common/Codec/iHasScheduleAwareness.cs index 9169fd7c..41140c34 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasScheduleAwareness.cs +++ b/src/PepperDash.Essentials.Devices.Common/Codec/iHasScheduleAwareness.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -6,7 +8,7 @@ using Crestron.SimplSharp; using PepperDash.Core; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.Devices.Common.Codec { diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/BiampTesira/BiampTesiraForteDsp.cs b/src/PepperDash.Essentials.Devices.Common/DSP/BiampTesira/BiampTesiraForteDsp.cs similarity index 97% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/BiampTesira/BiampTesiraForteDsp.cs rename to src/PepperDash.Essentials.Devices.Common/DSP/BiampTesira/BiampTesiraForteDsp.cs index a171b672..f8a102df 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/BiampTesira/BiampTesiraForteDsp.cs +++ b/src/PepperDash.Essentials.Devices.Common/DSP/BiampTesira/BiampTesiraForteDsp.cs @@ -6,391 +6,391 @@ using Crestron.SimplSharp; using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Config; -using System.Text.RegularExpressions; - - -namespace PepperDash.Essentials.Devices.Common.DSP -{ - - // QUESTIONS: - // - // When subscribing, just use the Instance ID for Custom Name? - - // Verbose on subscriptions? - - // Example subscription feedback responses - // ! "publishToken":"name" "value":-77.0 - // ! "myLevelName" -77 - - public class BiampTesiraForteDsp : DspBase - { - public IBasicCommunication Communication { get; private set; } - public CommunicationGather PortGather { get; private set; } - public StatusMonitorBase CommunicationMonitor { get; private set; } - - public new Dictionary LevelControlPoints { get; private set; } - - public bool isSubscribed; - - private CTimer SubscriptionTimer; - - private CrestronQueue CommandQueue; - - private bool CommandQueueInProgress = false; - - //new public Dictionary DialerControlPoints { get; private set; } - - //new public Dictionary SwitcherControlPoints { get; private set; } - - /// - /// Shows received lines as hex - /// - public bool ShowHexResponse { get; set; } - - public BiampTesiraForteDsp(string key, string name, IBasicCommunication comm, - BiampTesiraFortePropertiesConfig props) : - base(key, name) - { - CommandQueue = new CrestronQueue(100); - - Communication = comm; - var socket = comm as ISocketStatus; - if (socket != null) - { - // This instance uses IP control - - socket.ConnectionChange += new EventHandler(socket_ConnectionChange); - } - else - { - // This instance uses RS-232 control - } - PortGather = new CommunicationGather(Communication, "\x0d\x0a"); - PortGather.LineReceived += this.Port_LineReceived; - if (props.CommunicationMonitorProperties != null) - { - CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, - props.CommunicationMonitorProperties); - } - else - { -//#warning Need to deal with this poll string - CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 120000, 120000, 300000, - "SESSION get aliases\x0d\x0a"); - } - - LevelControlPoints = new Dictionary(); - - foreach (KeyValuePair block in props.LevelControlBlocks) - { - this.LevelControlPoints.Add(block.Key, new TesiraForteLevelControl(block.Key, block.Value, this)); - } - - } - - public override bool CustomActivate() - { - Communication.Connect(); - CommunicationMonitor.StatusChange += - (o, a) => { Debug.Console(2, this, "Communication monitor state: {0}", CommunicationMonitor.Status); }; - CommunicationMonitor.Start(); - - CrestronConsole.AddNewConsoleCommand(SendLine, "send" + Key, "", ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(s => Communication.Connect(), "con" + Key, "", - ConsoleAccessLevelEnum.AccessOperator); - return true; - } - - private void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e) - { - Debug.Console(2, this, "Socket Status Change: {0}", e.Client.ClientStatus.ToString()); - - if (e.Client.IsConnected) - { - // Tasks on connect - } - else - { - // Cleanup items from this session - - if (SubscriptionTimer != null) - { - SubscriptionTimer.Stop(); - SubscriptionTimer = null; - } - - isSubscribed = false; - CommandQueue.Clear(); - CommandQueueInProgress = false; - } - } - - /// - /// Initiates the subscription process to the DSP - /// - private void SubscribeToAttributes() - { - SendLine("SESSION set verbose true"); - - foreach (KeyValuePair level in LevelControlPoints) - { - level.Value.Subscribe(); - } - - if (!CommandQueueInProgress) - SendNextQueuedCommand(); - - ResetSubscriptionTimer(); - } - - /// - /// Resets or Sets the subscription timer - /// - private void ResetSubscriptionTimer() - { - isSubscribed = true; - - if (SubscriptionTimer != null) - { - SubscriptionTimer = new CTimer(o => SubscribeToAttributes(), 30000); - SubscriptionTimer.Reset(); - - } - } - - /// - /// Handles a response message from the DSP - /// - /// - /// - private void Port_LineReceived(object dev, GenericCommMethodReceiveTextArgs args) - { - try - { - if (args.Text.IndexOf("Welcome to the Tesira Text Protocol Server...") > -1) - { - // Indicates a new TTP session - - SubscribeToAttributes(); - } - else if (args.Text.IndexOf("publishToken") > -1) - { - // response is from a subscribed attribute - - string pattern = "! \"publishToken\":[\"](.*)[\"] \"value\":(.*)"; - - Match match = Regex.Match(args.Text, pattern); - - if (match.Success) - { - - string key; - - string customName; - - string value; - - customName = match.Groups[1].Value; - - // Finds the key (everything before the '~' character - key = customName.Substring(0, customName.IndexOf("~", 0) - 1); - - value = match.Groups[2].Value; - - foreach (KeyValuePair controlPoint in LevelControlPoints) - { - if (customName == controlPoint.Value.LevelCustomName || - customName == controlPoint.Value.MuteCustomName) - { - controlPoint.Value.ParseSubscriptionMessage(customName, value); - return; - } - - } - } - - /// same for dialers - /// same for switchers - - } - else if (args.Text.IndexOf("+OK") > -1) - { - if (args.Text == "+OK" || args.Text.IndexOf("list\":") > -1) - // Check for a simple "+OK" only 'ack' repsonse or a list response and ignore - return; - - // response is not from a subscribed attribute. From a get/set/toggle/increment/decrement command - - if (!CommandQueue.IsEmpty) - { - if (CommandQueue.Peek() is QueuedCommand) - { - // Expected response belongs to a child class - QueuedCommand tempCommand = (QueuedCommand) CommandQueue.TryToDequeue(); - //Debug.Console(1, this, "Command Dequeued. CommandQueue Size: {0}", CommandQueue.Count); - - tempCommand.ControlPoint.ParseGetMessage(tempCommand.AttributeCode, args.Text); - } - else - { - // Expected response belongs to this class - string temp = (string) CommandQueue.TryToDequeue(); - //Debug.Console(1, this, "Command Dequeued. CommandQueue Size: {0}", CommandQueue.Count); - - } - - if (CommandQueue.IsEmpty) - CommandQueueInProgress = false; - else - SendNextQueuedCommand(); - - } - - - } - else if (args.Text.IndexOf("-ERR") > -1) - { - // Error response - - switch (args.Text) - { - case "-ERR ALREADY_SUBSCRIBED": - { - ResetSubscriptionTimer(); - break; - } - default: - { - Debug.Console(0, this, "Error From DSP: '{0}'", args.Text); - break; - } - } - - } - } - catch (Exception e) - { - if (Debug.Level == 2) - Debug.Console(2, this, "Error parsing response: '{0}'\n{1}", args.Text, e); - } - - } - - /// - /// Sends a command to the DSP (with delimiter appended) - /// - /// Command to send - public void SendLine(string s) - { - Communication.SendText(s + "\x0a"); - } - - /// - /// Adds a command from a child module to the queue - /// - /// Command object from child module - public void EnqueueCommand(QueuedCommand commandToEnqueue) - { - CommandQueue.Enqueue(commandToEnqueue); - //Debug.Console(1, this, "Command (QueuedCommand) Enqueued '{0}'. CommandQueue has '{1}' Elements.", commandToEnqueue.Command, CommandQueue.Count); - - if (!CommandQueueInProgress) - SendNextQueuedCommand(); - } - - - /// - /// Adds a raw string command to the queue - /// - /// - public void EnqueueCommand(string command) - { - CommandQueue.Enqueue(command); - //Debug.Console(1, this, "Command (string) Enqueued '{0}'. CommandQueue has '{1}' Elements.", command, CommandQueue.Count); - - if (!CommandQueueInProgress) - SendNextQueuedCommand(); - } - - /// - /// Sends the next queued command to the DSP - /// - private void SendNextQueuedCommand() - { - //Debug.Console(2, this, "Attempting to send next queued command. CommandQueueInProgress: {0} Communication isConnected: {1}", CommandQueueInProgress, Communication.IsConnected); - - //if (CommandQueue.IsEmpty) - // CommandQueueInProgress = false; - - //Debug.Console(1, this, "CommandQueue has {0} Elements:\n", CommandQueue.Count); - - //foreach (object o in CommandQueue) - //{ - // if (o is string) - // Debug.Console(1, this, "{0}", o); - // else if(o is QueuedCommand) - // { - // var item = (QueuedCommand)o; - // Debug.Console(1, this, "{0}", item.Command); - // } - //} - - //Debug.Console(1, this, "End of CommandQueue"); - - if (Communication.IsConnected && !CommandQueue.IsEmpty) - { - CommandQueueInProgress = true; - - if (CommandQueue.Peek() is QueuedCommand) - { - QueuedCommand nextCommand = new QueuedCommand(); - - nextCommand = (QueuedCommand) CommandQueue.Peek(); - - SendLine(nextCommand.Command); - } - else - { - string nextCommand = (string) CommandQueue.Peek(); - - SendLine(nextCommand); - } - } - - } - - /// - /// Sends a command to execute a preset - /// - /// Preset Name - public void RunPreset(string name) - { - SendLine(string.Format("DEVICE recallPreset {0}", name)); - } - - public class QueuedCommand - { - public string Command { get; set; } - public string AttributeCode { get; set; } - public TesiraForteControlPoint ControlPoint { get; set; } - } - } - - public class BiampTesiraForteDspFactory : EssentialsDeviceFactory - { - public BiampTesiraForteDspFactory() - { - TypeNames = new List() {"biamptesira"}; - } - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - Debug.Console(1, "Factory Attempting to create new BiampTesira Device"); - var comm = CommFactory.CreateCommForDevice(dc); - var props = Newtonsoft.Json.JsonConvert.DeserializeObject( - dc.Properties.ToString()); - return new BiampTesiraForteDsp(dc.Key, dc.Name, comm, props); - } - } - +using System.Text.RegularExpressions; + + +namespace PepperDash.Essentials.Devices.Common.DSP +{ + + // QUESTIONS: + // + // When subscribing, just use the Instance ID for Custom Name? + + // Verbose on subscriptions? + + // Example subscription feedback responses + // ! "publishToken":"name" "value":-77.0 + // ! "myLevelName" -77 + + public class BiampTesiraForteDsp : DspBase + { + public IBasicCommunication Communication { get; private set; } + public CommunicationGather PortGather { get; private set; } + public StatusMonitorBase CommunicationMonitor { get; private set; } + + public new Dictionary LevelControlPoints { get; private set; } + + public bool isSubscribed; + + private CTimer SubscriptionTimer; + + private CrestronQueue CommandQueue; + + private bool CommandQueueInProgress = false; + + //new public Dictionary DialerControlPoints { get; private set; } + + //new public Dictionary SwitcherControlPoints { get; private set; } + + /// + /// Shows received lines as hex + /// + public bool ShowHexResponse { get; set; } + + public BiampTesiraForteDsp(string key, string name, IBasicCommunication comm, + BiampTesiraFortePropertiesConfig props) : + base(key, name) + { + CommandQueue = new CrestronQueue(100); + + Communication = comm; + var socket = comm as ISocketStatus; + if (socket != null) + { + // This instance uses IP control + + socket.ConnectionChange += new EventHandler(socket_ConnectionChange); + } + else + { + // This instance uses RS-232 control + } + PortGather = new CommunicationGather(Communication, "\x0d\x0a"); + PortGather.LineReceived += this.Port_LineReceived; + if (props.CommunicationMonitorProperties != null) + { + CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, + props.CommunicationMonitorProperties); + } + else + { +//#warning Need to deal with this poll string + CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 120000, 120000, 300000, + "SESSION get aliases\x0d\x0a"); + } + + LevelControlPoints = new Dictionary(); + + foreach (KeyValuePair block in props.LevelControlBlocks) + { + this.LevelControlPoints.Add(block.Key, new TesiraForteLevelControl(block.Key, block.Value, this)); + } + + } + + public override bool CustomActivate() + { + Communication.Connect(); + CommunicationMonitor.StatusChange += + (o, a) => { Debug.Console(2, this, "Communication monitor state: {0}", CommunicationMonitor.Status); }; + CommunicationMonitor.Start(); + + CrestronConsole.AddNewConsoleCommand(SendLine, "send" + Key, "", ConsoleAccessLevelEnum.AccessOperator); + CrestronConsole.AddNewConsoleCommand(s => Communication.Connect(), "con" + Key, "", + ConsoleAccessLevelEnum.AccessOperator); + return true; + } + + private void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e) + { + Debug.Console(2, this, "Socket Status Change: {0}", e.Client.ClientStatus.ToString()); + + if (e.Client.IsConnected) + { + // Tasks on connect + } + else + { + // Cleanup items from this session + + if (SubscriptionTimer != null) + { + SubscriptionTimer.Stop(); + SubscriptionTimer = null; + } + + isSubscribed = false; + CommandQueue.Clear(); + CommandQueueInProgress = false; + } + } + + /// + /// Initiates the subscription process to the DSP + /// + private void SubscribeToAttributes() + { + SendLine("SESSION set verbose true"); + + foreach (KeyValuePair level in LevelControlPoints) + { + level.Value.Subscribe(); + } + + if (!CommandQueueInProgress) + SendNextQueuedCommand(); + + ResetSubscriptionTimer(); + } + + /// + /// Resets or Sets the subscription timer + /// + private void ResetSubscriptionTimer() + { + isSubscribed = true; + + if (SubscriptionTimer != null) + { + SubscriptionTimer = new CTimer(o => SubscribeToAttributes(), 30000); + SubscriptionTimer.Reset(); + + } + } + + /// + /// Handles a response message from the DSP + /// + /// + /// + private void Port_LineReceived(object dev, GenericCommMethodReceiveTextArgs args) + { + try + { + if (args.Text.IndexOf("Welcome to the Tesira Text Protocol Server...") > -1) + { + // Indicates a new TTP session + + SubscribeToAttributes(); + } + else if (args.Text.IndexOf("publishToken") > -1) + { + // response is from a subscribed attribute + + string pattern = "! \"publishToken\":[\"](.*)[\"] \"value\":(.*)"; + + Match match = Regex.Match(args.Text, pattern); + + if (match.Success) + { + + string key; + + string customName; + + string value; + + customName = match.Groups[1].Value; + + // Finds the key (everything before the '~' character + key = customName.Substring(0, customName.IndexOf("~", 0) - 1); + + value = match.Groups[2].Value; + + foreach (KeyValuePair controlPoint in LevelControlPoints) + { + if (customName == controlPoint.Value.LevelCustomName || + customName == controlPoint.Value.MuteCustomName) + { + controlPoint.Value.ParseSubscriptionMessage(customName, value); + return; + } + + } + } + + /// same for dialers + /// same for switchers + + } + else if (args.Text.IndexOf("+OK") > -1) + { + if (args.Text == "+OK" || args.Text.IndexOf("list\":") > -1) + // Check for a simple "+OK" only 'ack' repsonse or a list response and ignore + return; + + // response is not from a subscribed attribute. From a get/set/toggle/increment/decrement command + + if (!CommandQueue.IsEmpty) + { + if (CommandQueue.Peek() is QueuedCommand) + { + // Expected response belongs to a child class + QueuedCommand tempCommand = (QueuedCommand) CommandQueue.TryToDequeue(); + //Debug.Console(1, this, "Command Dequeued. CommandQueue Size: {0}", CommandQueue.Count); + + tempCommand.ControlPoint.ParseGetMessage(tempCommand.AttributeCode, args.Text); + } + else + { + // Expected response belongs to this class + string temp = (string) CommandQueue.TryToDequeue(); + //Debug.Console(1, this, "Command Dequeued. CommandQueue Size: {0}", CommandQueue.Count); + + } + + if (CommandQueue.IsEmpty) + CommandQueueInProgress = false; + else + SendNextQueuedCommand(); + + } + + + } + else if (args.Text.IndexOf("-ERR") > -1) + { + // Error response + + switch (args.Text) + { + case "-ERR ALREADY_SUBSCRIBED": + { + ResetSubscriptionTimer(); + break; + } + default: + { + Debug.Console(0, this, "Error From DSP: '{0}'", args.Text); + break; + } + } + + } + } + catch (Exception e) + { + if (Debug.Level == 2) + Debug.Console(2, this, "Error parsing response: '{0}'\n{1}", args.Text, e); + } + + } + + /// + /// Sends a command to the DSP (with delimiter appended) + /// + /// Command to send + public void SendLine(string s) + { + Communication.SendText(s + "\x0a"); + } + + /// + /// Adds a command from a child module to the queue + /// + /// Command object from child module + public void EnqueueCommand(QueuedCommand commandToEnqueue) + { + CommandQueue.Enqueue(commandToEnqueue); + //Debug.Console(1, this, "Command (QueuedCommand) Enqueued '{0}'. CommandQueue has '{1}' Elements.", commandToEnqueue.Command, CommandQueue.Count); + + if (!CommandQueueInProgress) + SendNextQueuedCommand(); + } + + + /// + /// Adds a raw string command to the queue + /// + /// + public void EnqueueCommand(string command) + { + CommandQueue.Enqueue(command); + //Debug.Console(1, this, "Command (string) Enqueued '{0}'. CommandQueue has '{1}' Elements.", command, CommandQueue.Count); + + if (!CommandQueueInProgress) + SendNextQueuedCommand(); + } + + /// + /// Sends the next queued command to the DSP + /// + private void SendNextQueuedCommand() + { + //Debug.Console(2, this, "Attempting to send next queued command. CommandQueueInProgress: {0} Communication isConnected: {1}", CommandQueueInProgress, Communication.IsConnected); + + //if (CommandQueue.IsEmpty) + // CommandQueueInProgress = false; + + //Debug.Console(1, this, "CommandQueue has {0} Elements:\n", CommandQueue.Count); + + //foreach (object o in CommandQueue) + //{ + // if (o is string) + // Debug.Console(1, this, "{0}", o); + // else if(o is QueuedCommand) + // { + // var item = (QueuedCommand)o; + // Debug.Console(1, this, "{0}", item.Command); + // } + //} + + //Debug.Console(1, this, "End of CommandQueue"); + + if (Communication.IsConnected && !CommandQueue.IsEmpty) + { + CommandQueueInProgress = true; + + if (CommandQueue.Peek() is QueuedCommand) + { + QueuedCommand nextCommand = new QueuedCommand(); + + nextCommand = (QueuedCommand) CommandQueue.Peek(); + + SendLine(nextCommand.Command); + } + else + { + string nextCommand = (string) CommandQueue.Peek(); + + SendLine(nextCommand); + } + } + + } + + /// + /// Sends a command to execute a preset + /// + /// Preset Name + public void RunPreset(string name) + { + SendLine(string.Format("DEVICE recallPreset {0}", name)); + } + + public class QueuedCommand + { + public string Command { get; set; } + public string AttributeCode { get; set; } + public TesiraForteControlPoint ControlPoint { get; set; } + } + } + + public class BiampTesiraForteDspFactory : EssentialsDeviceFactory + { + public BiampTesiraForteDspFactory() + { + TypeNames = new List() {"biamptesira"}; + } + + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + Debug.Console(1, "Factory Attempting to create new BiampTesira Device"); + var comm = CommFactory.CreateCommForDevice(dc); + var props = Newtonsoft.Json.JsonConvert.DeserializeObject( + dc.Properties.ToString()); + return new BiampTesiraForteDsp(dc.Key, dc.Name, comm, props); + } + } + } diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/BiampTesira/BiampTesiraForteDspLevel.cs b/src/PepperDash.Essentials.Devices.Common/DSP/BiampTesira/BiampTesiraForteDspLevel.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/BiampTesira/BiampTesiraForteDspLevel.cs rename to src/PepperDash.Essentials.Devices.Common/DSP/BiampTesira/BiampTesiraForteDspLevel.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/BiampTesira/BiampTesiraFortePropertiesConfig.cs b/src/PepperDash.Essentials.Devices.Common/DSP/BiampTesira/BiampTesiraFortePropertiesConfig.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/BiampTesira/BiampTesiraFortePropertiesConfig.cs rename to src/PepperDash.Essentials.Devices.Common/DSP/BiampTesira/BiampTesiraFortePropertiesConfig.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/BiampTesira/TesiraForteControlPoint.cs b/src/PepperDash.Essentials.Devices.Common/DSP/BiampTesira/TesiraForteControlPoint.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/BiampTesira/TesiraForteControlPoint.cs rename to src/PepperDash.Essentials.Devices.Common/DSP/BiampTesira/TesiraForteControlPoint.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/BiampTesira/TesiraForteMuteControl.cs b/src/PepperDash.Essentials.Devices.Common/DSP/BiampTesira/TesiraForteMuteControl.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/BiampTesira/TesiraForteMuteControl.cs rename to src/PepperDash.Essentials.Devices.Common/DSP/BiampTesira/TesiraForteMuteControl.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/DspBase.cs b/src/PepperDash.Essentials.Devices.Common/DSP/DspBase.cs similarity index 99% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/DspBase.cs rename to src/PepperDash.Essentials.Devices.Common/DSP/DspBase.cs index 0890ca49..7f28ae3d 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/DspBase.cs +++ b/src/PepperDash.Essentials.Devices.Common/DSP/DspBase.cs @@ -15,19 +15,19 @@ namespace PepperDash.Essentials.Devices.Common.DSP public Dictionary DialerControlPoints { get; private set; } - public Dictionary SwitcherControlPoints { get; private set; } - - public DspBase(string key, string name) : - base(key, name) - { + public Dictionary SwitcherControlPoints { get; private set; } + + public DspBase(string key, string name) : + base(key, name) + { } // in audio call feedback // VOIP - // Phone dialer - + // Phone dialer + } // Fusion diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/PolycomSoundStructure/SoundStructureBasics.cs b/src/PepperDash.Essentials.Devices.Common/DSP/PolycomSoundStructure/SoundStructureBasics.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/PolycomSoundStructure/SoundStructureBasics.cs rename to src/PepperDash.Essentials.Devices.Common/DSP/PolycomSoundStructure/SoundStructureBasics.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DiscPlayer/IRDiscPlayerBase.cs b/src/PepperDash.Essentials.Devices.Common/DiscPlayer/IRDiscPlayerBase.cs similarity index 99% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/DiscPlayer/IRDiscPlayerBase.cs rename to src/PepperDash.Essentials.Devices.Common/DiscPlayer/IRDiscPlayerBase.cs index 33ab25da..9e780a3b 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DiscPlayer/IRDiscPlayerBase.cs +++ b/src/PepperDash.Essentials.Devices.Common/DiscPlayer/IRDiscPlayerBase.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -6,8 +8,8 @@ using Crestron.SimplSharp; using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.DeviceSupport; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; using PepperDash.Core; using PepperDash.Essentials.Core; diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/AvocorVTFDisplay.cs b/src/PepperDash.Essentials.Devices.Common/Display/AvocorVTFDisplay.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/AvocorVTFDisplay.cs rename to src/PepperDash.Essentials.Devices.Common/Display/AvocorVTFDisplay.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/ComTcpDisplayBase.cs b/src/PepperDash.Essentials.Devices.Common/Display/ComTcpDisplayBase.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/ComTcpDisplayBase.cs rename to src/PepperDash.Essentials.Devices.Common/Display/ComTcpDisplayBase.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/InputInterfaces.cs b/src/PepperDash.Essentials.Devices.Common/Display/InputInterfaces.cs similarity index 97% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/InputInterfaces.cs rename to src/PepperDash.Essentials.Devices.Common/Display/InputInterfaces.cs index 95070e1b..ce7113e1 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/InputInterfaces.cs +++ b/src/PepperDash.Essentials.Devices.Common/Display/InputInterfaces.cs @@ -1,17 +1,17 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -namespace PepperDash.Essentials.Devices.Displays -{ - public interface IInputHdmi1 { void InputHdmi1(); } - public interface IInputHdmi2 { void InputHdmi2(); } - public interface IInputHdmi3 { void InputHdmi3(); } - public interface IInputHdmi4 { void InputHdmi4(); } - public interface IInputDisplayPort1 { void InputDisplayPort1(); } - public interface IInputDisplayPort2 { void InputDisplayPort2(); } - public interface IInputVga1 { void InputVga1(); } - +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +namespace PepperDash.Essentials.Devices.Displays +{ + public interface IInputHdmi1 { void InputHdmi1(); } + public interface IInputHdmi2 { void InputHdmi2(); } + public interface IInputHdmi3 { void InputHdmi3(); } + public interface IInputHdmi4 { void InputHdmi4(); } + public interface IInputDisplayPort1 { void InputDisplayPort1(); } + public interface IInputDisplayPort2 { void InputDisplayPort2(); } + public interface IInputVga1 { void InputVga1(); } + } \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/NECPSXMDisplay.cs b/src/PepperDash.Essentials.Devices.Common/Display/NECPSXMDisplay.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/NECPSXMDisplay.cs rename to src/PepperDash.Essentials.Devices.Common/Display/NECPSXMDisplay.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/NecPaSeriesProjector.cs b/src/PepperDash.Essentials.Devices.Common/Display/NecPaSeriesProjector.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/NecPaSeriesProjector.cs rename to src/PepperDash.Essentials.Devices.Common/Display/NecPaSeriesProjector.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/PanasonicThDisplay.cs b/src/PepperDash.Essentials.Devices.Common/Display/PanasonicThDisplay.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/PanasonicThDisplay.cs rename to src/PepperDash.Essentials.Devices.Common/Display/PanasonicThDisplay.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/SamsungMDCDisplay.cs b/src/PepperDash.Essentials.Devices.Common/Display/SamsungMDCDisplay.cs similarity index 96% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/SamsungMDCDisplay.cs rename to src/PepperDash.Essentials.Devices.Common/Display/SamsungMDCDisplay.cs index 9fcb7295..59c5fe31 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/SamsungMDCDisplay.cs +++ b/src/PepperDash.Essentials.Devices.Common/Display/SamsungMDCDisplay.cs @@ -1,663 +1,665 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.CrestronThread; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Bridges; -using PepperDash.Essentials.Core.Config; -using PepperDash.Essentials.Core.Routing; -using Feedback = PepperDash.Essentials.Core.Feedback; - -using Newtonsoft.Json.Linq; - -namespace PepperDash.Essentials.Devices.Displays -{ - /// - /// - /// - public class SamsungMDC : TwoWayDisplayBase, IBasicVolumeWithFeedback, ICommunicationMonitor, IInputDisplayPort1, IInputDisplayPort2, - IInputHdmi1, IInputHdmi2, IInputHdmi3, IInputHdmi4, IBridgeAdvanced - { - public IBasicCommunication Communication { get; private set; } - - - - public StatusMonitorBase CommunicationMonitor { get; private set; } - - public byte ID { get; private set; } - - bool LastCommandSentWasVolume; - - bool _PowerIsOn; - bool _IsWarmingUp; - bool _IsCoolingDown; - ushort _VolumeLevelForSig; - int _LastVolumeSent; - bool _IsMuted; - RoutingInputPort _CurrentInputPort; - byte[] IncomingBuffer = new byte[]{}; - ActionIncrementer VolumeIncrementer; - bool VolumeIsRamping; - public bool IsInStandby { get; private set; } - bool IsPoweringOnIgnorePowerFb; - - protected override Func PowerIsOnFeedbackFunc { get { return () => _PowerIsOn; } } - protected override Func IsCoolingDownFeedbackFunc { get { return () => _IsCoolingDown; } } - protected override Func IsWarmingUpFeedbackFunc { get { return () => _IsWarmingUp; } } - protected override Func CurrentInputFeedbackFunc { get { return () => _CurrentInputPort.Key; } } - - /// - /// Constructor for IBasicCommunication - /// - public SamsungMDC(string key, string name, IBasicCommunication comm, string id) - : base(key, name) - { - Communication = comm; - Communication.BytesReceived += new EventHandler(Communication_BytesReceived); - - ID = id == null ? (byte)0x01 : Convert.ToByte(id, 16); // If id is null, set default value of 0x01, otherwise assign value passed in constructor - Init(); - } - - /// - /// Constructor for TCP - /// - public SamsungMDC(string key, string name, string hostname, int port, string id) - : base(key, name) - { - Communication = new GenericTcpIpClient(key + "-tcp", hostname, port, 5000); - ID = id == null ? (byte)0x01 : Convert.ToByte(id, 16); // If id is null, set default value of 0x01, otherwise assign value passed in constructor - Init(); - } - - /// - /// Constructor for COM - /// - public SamsungMDC(string key, string name, ComPort port, ComPort.ComPortSpec spec, string id) - : base(key, name) - { - Communication = new ComPortController(key + "-com", port, spec); - //Communication.TextReceived += new EventHandler(Communication_TextReceived); - - ID = id == null ? (byte)0x01 : Convert.ToByte(id, 16); // If id is null, set default value of 0x01, otherwise assign value passed in constructor - Init(); - } - - void AddRoutingInputPort(RoutingInputPort port, byte fbMatch) - { - port.FeedbackMatchObject = fbMatch; - InputPorts.Add(port); - } - - void Init() - { - WarmupTime = 10000; - CooldownTime = 8000; - - CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 2000, 120000, 300000, StatusGet, true); - DeviceManager.AddDevice(CommunicationMonitor); - - VolumeIncrementer = new ActionIncrementer(655, 0, 65535, 800, 80, - v => SetVolume((ushort)v), - () => _LastVolumeSent); - - AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.HdmiIn1, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, new Action(InputHdmi1), this), 0x21); - - AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.HdmiIn1PC, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, new Action(InputHdmi1PC), this), 0x22); - - AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, new Action(InputHdmi2), this), 0x23); - - AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.HdmiIn2PC, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, new Action(InputHdmi2PC), this), 0x24); - - AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.HdmiIn3, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, new Action(InputHdmi3), this), 0x32); - - AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.DisplayPortIn1, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.DisplayPort, new Action(InputDisplayPort1), this), 0x25); - - AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.DviIn, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Dvi, new Action(InputDvi1), this), 0x18); - - AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.CompositeIn, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Composite, new Action(InputVideo1), this), 0x08); - - AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.RgbIn1, eRoutingSignalType.Video, - eRoutingPortConnectionType.Vga, new Action(InputRgb1), this), 0x14); - - AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.RgbIn2, eRoutingSignalType.Video, - eRoutingPortConnectionType.Rgb, new Action(new Action(InputRgb2)), this), 0x1E); - - VolumeLevelFeedback = new IntFeedback(() => { return _VolumeLevelForSig; }); - MuteFeedback = new BoolFeedback(() => _IsMuted); - - StatusGet(); - } - - /// - /// - /// - /// - public override bool CustomActivate() - { - Communication.Connect(); - CommunicationMonitor.StatusChange += (o, a) => Debug.Console(2, this, "Communication monitor state: {0}", CommunicationMonitor.Status); - CommunicationMonitor.Start(); - return true; - } - - public void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - LinkDisplayToApi(this, trilist, joinStart, joinMapKey, bridge); - } - - public override FeedbackCollection Feedbacks - { - get - { - var list = base.Feedbacks; - list.AddRange(new List - { - VolumeLevelFeedback, - MuteFeedback, - CurrentInputFeedback - }); - return list; - } - } - - /// - /// / - /// - /// - void Communication_BytesReceived(object sender, GenericCommMethodReceiveBytesArgs e) - { - try - { - // This is probably not thread-safe buffering - // Append the incoming bytes with whatever is in the buffer - var newBytes = new byte[IncomingBuffer.Length + e.Bytes.Length]; - IncomingBuffer.CopyTo(newBytes, 0); - e.Bytes.CopyTo(newBytes, IncomingBuffer.Length); - - // Need to find AA FF and have - for (int i = 0; i < newBytes.Length; i++) - { - if (newBytes[i] == 0xAA && newBytes[i + 1] == 0xFF) - { - newBytes = newBytes.Skip(i).ToArray(); // Trim off junk if there's "dirt" in the buffer - - // parse it - // If it's at least got the header, then process it, - while (newBytes.Length > 4 && newBytes[0] == 0xAA && newBytes[1] == 0xFF) - { - var msgLen = newBytes[3]; - // if the buffer is shorter than the header (3) + message (msgLen) + checksum (1), - // give and save it for next time - if (newBytes.Length < msgLen + 4) - break; - - // Good length, grab the message - var message = newBytes.Skip(4).Take(msgLen).ToArray(); - - // At this point, the ack/nak is the first byte - if (message[0] == 0x41) - { - switch (message[1]) // type byte - { - case 0x00: // General status - //UpdatePowerFB(message[2], message[5]); // "power" can be misrepresented when the display sleeps - - // Handle the first power on fb when waiting for it. - if (IsPoweringOnIgnorePowerFb && message[2] == 0x01) - IsPoweringOnIgnorePowerFb = false; - // Ignore general-status power off messages when powering up - if (!(IsPoweringOnIgnorePowerFb && message[2] == 0x00)) - UpdatePowerFB(message[2]); - UpdateVolumeFB(message[3]); - UpdateMuteFb(message[4]); - UpdateInputFb(message[5]); - break; - - case 0x11: - UpdatePowerFB(message[2]); - break; - - case 0x12: - UpdateVolumeFB(message[2]); - break; - - case 0x13: - UpdateMuteFb(message[2]); - break; - - case 0x14: - UpdateInputFb(message[2]); - break; - - default: - break; - } - } - // Skip over what we've used and save the rest for next time - newBytes = newBytes.Skip(5 + msgLen).ToArray(); - } - - break; // parsing will mean we can stop looking for header in loop - } - } - - // Save whatever partial message is here - IncomingBuffer = newBytes; - } - catch (Exception err) - { - Debug.Console(2, this, "Error parsing feedback: {0}", err); - } - } - - /// - /// - /// - void UpdatePowerFB(byte powerByte) - { - var newVal = powerByte == 1; - if (newVal != _PowerIsOn) - { - _PowerIsOn = newVal; - Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "Feedback Power State: {0}", _PowerIsOn); - PowerIsOnFeedback.FireUpdate(); - } - } - - /// - /// Updates power status from general updates where source is included. - /// Compensates for errant standby / power off hiccups by ignoring - /// power off states with input < 0x10 - /// - void UpdatePowerFB(byte powerByte, byte inputByte) - { - // This should reject errant power feedbacks when switching away from input on standby. - if (powerByte == 0x01 && inputByte < 0x10) - IsInStandby = true; - if (powerByte == 0x00 && IsInStandby) // Ignore power off if coming from standby - glitch - { - IsInStandby = false; - return; - } - - UpdatePowerFB(powerByte); - } - - /// - /// - /// - void UpdateVolumeFB(byte b) - { - var newVol = (ushort)NumericalHelpers.Scale((double)b, 0, 100, 0, 65535); - if (!VolumeIsRamping) - _LastVolumeSent = newVol; - if (newVol != _VolumeLevelForSig) - { - _VolumeLevelForSig = newVol; - VolumeLevelFeedback.FireUpdate(); - } - } - - /// - /// - /// - void UpdateMuteFb(byte b) - { - var newMute = b == 1; - if (newMute != _IsMuted) - { - _IsMuted = newMute; - MuteFeedback.FireUpdate(); - } - } - - - - - /// - /// - /// - void UpdateInputFb(byte b) - { - var newInput = InputPorts.FirstOrDefault(i => i.FeedbackMatchObject.Equals(b)); - if (newInput != null && newInput != _CurrentInputPort) - { - _CurrentInputPort = newInput; - CurrentInputFeedback.FireUpdate(); - OnSwitchChange(new RoutingNumericEventArgs(null, _CurrentInputPort, eRoutingSignalType.AudioVideo)); - } - } - - /// - /// Formats an outgoing message. Replaces third byte with ID and replaces last byte with checksum - /// - /// - void SendBytes(byte[] b) - { - if (LastCommandSentWasVolume) // If the last command sent was volume - if (b[1] != 0x12) // Check if this command is volume, and if not, delay this command - CrestronEnvironment.Sleep(100); - - b[2] = ID; - // append checksum by adding all bytes, except last which should be 00 - int checksum = 0; - for (var i = 1; i < b.Length - 1; i++) // add 2nd through 2nd-to-last bytes - { - checksum += b[i]; - } - checksum = checksum & 0x000000FF; // mask off MSBs - b[b.Length - 1] = (byte)checksum; - - if (b[1] == 0x12) - LastCommandSentWasVolume = true; - else - LastCommandSentWasVolume = false; - - Communication.SendBytes(b); - } - - - /// - /// - /// - public void StatusGet() - { - SendBytes(new byte[] { 0xAA, 0x00, 0x00, 0x00, 0x00 }); - } - - /// - /// - /// - public override void PowerOn() - { - Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "Powering On Display"); - - IsPoweringOnIgnorePowerFb = true; - //Send(PowerOnCmd); - SendBytes(new byte[] { 0xAA, 0x11, 0x00, 0x01, 0x01, 0x00 }); - if (!PowerIsOnFeedback.BoolValue && !_IsWarmingUp && !_IsCoolingDown) - { - _IsWarmingUp = true; - IsWarmingUpFeedback.FireUpdate(); - // Fake power-up cycle - WarmupTimer = new CTimer(o => - { - _IsWarmingUp = false; - _PowerIsOn = true; - IsWarmingUpFeedback.FireUpdate(); - PowerIsOnFeedback.FireUpdate(); - }, WarmupTime); - } - } - - /// - /// - /// - public override void PowerOff() - { - Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "Powering Off Display"); - - IsPoweringOnIgnorePowerFb = false; - // If a display has unreliable-power off feedback, just override this and - // remove this check. - if (!_IsWarmingUp && !_IsCoolingDown) // PowerIsOnFeedback.BoolValue && - { - //Send(PowerOffCmd); - SendBytes(new byte[] { 0xAA, 0x11, 0x00, 0x01, 0x00, 0x00 }); - _IsCoolingDown = true; - _PowerIsOn = false; - PowerIsOnFeedback.FireUpdate(); - IsCoolingDownFeedback.FireUpdate(); - // Fake cool-down cycle - CooldownTimer = new CTimer(o => - { - _IsCoolingDown = false; - IsCoolingDownFeedback.FireUpdate(); - }, CooldownTime); - } - } - - public override void PowerToggle() - { - if (PowerIsOnFeedback.BoolValue && !IsWarmingUpFeedback.BoolValue) - PowerOff(); - else if (!PowerIsOnFeedback.BoolValue && !IsCoolingDownFeedback.BoolValue) - PowerOn(); - } - - public void PowerGet() - { - SendBytes(new byte[] { 0xAA, 0x11, 0x00, 0x00, 0x00 }); - } - - public void InputHdmi1() - { - SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x01, 0x21, 0x00 }); - } - - public void InputHdmi1PC() - { - SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x01, 0x22, 0x00 }); - } - - public void InputHdmi2() - { - SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x01, 0x23, 0x00 }); - } - - public void InputHdmi2PC() - { - SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x01, 0x24, 0x00 }); - } - - public void InputHdmi3() - { - SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x01, 0x32, 0x00 }); - } - - public void InputHdmi4() - { - SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x01, 0x34, 0x00 }); - } - - public void InputDisplayPort1() - { - SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x01, 0x25, 0x00 }); - } - - public void InputDisplayPort2() - { - SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x01, 0x26, 0x00 }); - } - - public void InputDvi1() - { - SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x01, 0x18, 0x00 }); - } - - public void InputVideo1() - { - SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x01, 0x08, 0x00 }); - } - - public void InputRgb1() - { - SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x01, 0x14, 0x00 }); - } - - public void InputRgb2() - { - SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x01, 0x1E, 0x00 }); - } - - public void InputGet() - { - SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x00, 0x00 }); - } - - - /// - /// Executes a switch, turning on display if necessary. - /// - /// - public override void ExecuteSwitch(object selector) - { - //if (!(selector is Action)) - // Debug.Console(1, this, "WARNING: ExecuteSwitch cannot handle type {0}", selector.GetType()); - - if (_PowerIsOn) - (selector as Action)(); - else // if power is off, wait until we get on FB to send it. - { - // One-time event handler to wait for power on before executing switch - EventHandler handler = null; // necessary to allow reference inside lambda to handler - handler = (o, a) => - { - if (!_IsWarmingUp) // Done warming - { - IsWarmingUpFeedback.OutputChange -= handler; - (selector as Action)(); - } - }; - IsWarmingUpFeedback.OutputChange += handler; // attach and wait for on FB - PowerOn(); - } - } - - /// - /// Scales the level to the range of the display and sends the command - /// - /// - public void SetVolume(ushort level) - { - _LastVolumeSent = level; - var scaled = (int)NumericalHelpers.Scale(level, 0, 65535, 0, 100); - // The inputs to Scale ensure that byte won't overflow - SendBytes(new byte[] { 0xAA, 0x12, 0x00, 0x01, Convert.ToByte(scaled), 0x00 }); - } - - #region IBasicVolumeWithFeedback Members - - public IntFeedback VolumeLevelFeedback { get; private set; } - - public BoolFeedback MuteFeedback { get; private set; } - - /// - /// - /// - public void MuteOff() - { - SendBytes(new byte[] { 0xAA, 0x13, 0x00, 0x01, 0x00, 0x00 }); - } - - /// - /// - /// - public void MuteOn() - { - SendBytes(new byte[] { 0xAA, 0x13, 0x00, 0x01, 0x01, 0x00 }); - } - - /// - /// - /// - public void MuteGet() - { - SendBytes(new byte[] { 0xAA, 0x13, 0x00, 0x00, 0x00 }); - } - - #endregion - - #region IBasicVolumeControls Members - - /// - /// - /// - public void MuteToggle() - { - if (_IsMuted) - MuteOff(); - else - MuteOn(); - } - - /// - /// - /// - /// - public void VolumeDown(bool pressRelease) - { - if (pressRelease) - { - VolumeIncrementer.StartDown(); - VolumeIsRamping = true; - } - else - { - VolumeIsRamping = false; - VolumeIncrementer.Stop(); - } - } - - /// - /// - /// - /// - public void VolumeUp(bool pressRelease) - { - if (pressRelease) - { - VolumeIncrementer.StartUp(); - VolumeIsRamping = true; - } - else - { - VolumeIsRamping = false; - VolumeIncrementer.Stop(); - } - } - - /// - /// - /// - public void VolumeGet() - { - SendBytes(new byte[] { 0xAA, 0x12, 0x00, 0x00, 0x00 }); - } - - #endregion - } - - public class SamsungMDCFactory : EssentialsDeviceFactory - { - public SamsungMDCFactory() - { - TypeNames = new List() { "samsungmdc" }; - } - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - Debug.Console(1, "Factory Attempting to create new Generic Comm Device"); - var comm = CommFactory.CreateCommForDevice(dc); - if (comm != null) - return new SamsungMDC(dc.Key, dc.Name, comm, dc.Properties["id"].Value()); - else - return null; - } - } - +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro.CrestronThread; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DeviceSupport; +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Routing; +using Feedback = PepperDash.Essentials.Core.Feedback; + +using Full.Newtonsoft.Json.Linq; + +namespace PepperDash.Essentials.Devices.Displays +{ + /// + /// + /// + public class SamsungMDC : TwoWayDisplayBase, IBasicVolumeWithFeedback, ICommunicationMonitor, IInputDisplayPort1, IInputDisplayPort2, + IInputHdmi1, IInputHdmi2, IInputHdmi3, IInputHdmi4, IBridgeAdvanced + { + public IBasicCommunication Communication { get; private set; } + + + + public StatusMonitorBase CommunicationMonitor { get; private set; } + + public byte ID { get; private set; } + + bool LastCommandSentWasVolume; + + bool _PowerIsOn; + bool _IsWarmingUp; + bool _IsCoolingDown; + ushort _VolumeLevelForSig; + int _LastVolumeSent; + bool _IsMuted; + RoutingInputPort _CurrentInputPort; + byte[] IncomingBuffer = new byte[]{}; + ActionIncrementer VolumeIncrementer; + bool VolumeIsRamping; + public bool IsInStandby { get; private set; } + bool IsPoweringOnIgnorePowerFb; + + protected override Func PowerIsOnFeedbackFunc { get { return () => _PowerIsOn; } } + protected override Func IsCoolingDownFeedbackFunc { get { return () => _IsCoolingDown; } } + protected override Func IsWarmingUpFeedbackFunc { get { return () => _IsWarmingUp; } } + protected override Func CurrentInputFeedbackFunc { get { return () => _CurrentInputPort.Key; } } + + /// + /// Constructor for IBasicCommunication + /// + public SamsungMDC(string key, string name, IBasicCommunication comm, string id) + : base(key, name) + { + Communication = comm; + Communication.BytesReceived += new EventHandler(Communication_BytesReceived); + + ID = id == null ? (byte)0x01 : Convert.ToByte(id, 16); // If id is null, set default value of 0x01, otherwise assign value passed in constructor + Init(); + } + + /// + /// Constructor for TCP + /// + public SamsungMDC(string key, string name, string hostname, int port, string id) + : base(key, name) + { + Communication = new GenericTcpIpClient(key + "-tcp", hostname, port, 5000); + ID = id == null ? (byte)0x01 : Convert.ToByte(id, 16); // If id is null, set default value of 0x01, otherwise assign value passed in constructor + Init(); + } + + /// + /// Constructor for COM + /// + public SamsungMDC(string key, string name, ComPort port, ComPort.ComPortSpec spec, string id) + : base(key, name) + { + Communication = new ComPortController(key + "-com", port, spec); + //Communication.TextReceived += new EventHandler(Communication_TextReceived); + + ID = id == null ? (byte)0x01 : Convert.ToByte(id, 16); // If id is null, set default value of 0x01, otherwise assign value passed in constructor + Init(); + } + + void AddRoutingInputPort(RoutingInputPort port, byte fbMatch) + { + port.FeedbackMatchObject = fbMatch; + InputPorts.Add(port); + } + + void Init() + { + WarmupTime = 10000; + CooldownTime = 8000; + + CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 2000, 120000, 300000, StatusGet, true); + DeviceManager.AddDevice(CommunicationMonitor); + + VolumeIncrementer = new ActionIncrementer(655, 0, 65535, 800, 80, + v => SetVolume((ushort)v), + () => _LastVolumeSent); + + AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.HdmiIn1, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, new Action(InputHdmi1), this), 0x21); + + AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.HdmiIn1PC, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, new Action(InputHdmi1PC), this), 0x22); + + AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, new Action(InputHdmi2), this), 0x23); + + AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.HdmiIn2PC, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, new Action(InputHdmi2PC), this), 0x24); + + AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.HdmiIn3, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, new Action(InputHdmi3), this), 0x32); + + AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.DisplayPortIn1, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.DisplayPort, new Action(InputDisplayPort1), this), 0x25); + + AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.DviIn, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Dvi, new Action(InputDvi1), this), 0x18); + + AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.CompositeIn, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Composite, new Action(InputVideo1), this), 0x08); + + AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.RgbIn1, eRoutingSignalType.Video, + eRoutingPortConnectionType.Vga, new Action(InputRgb1), this), 0x14); + + AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.RgbIn2, eRoutingSignalType.Video, + eRoutingPortConnectionType.Rgb, new Action(new Action(InputRgb2)), this), 0x1E); + + VolumeLevelFeedback = new IntFeedback(() => { return _VolumeLevelForSig; }); + MuteFeedback = new BoolFeedback(() => _IsMuted); + + StatusGet(); + } + + /// + /// + /// + /// + public override bool CustomActivate() + { + Communication.Connect(); + CommunicationMonitor.StatusChange += (o, a) => Debug.Console(2, this, "Communication monitor state: {0}", CommunicationMonitor.Status); + CommunicationMonitor.Start(); + return true; + } + + public void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + LinkDisplayToApi(this, trilist, joinStart, joinMapKey, bridge); + } + + public override FeedbackCollection Feedbacks + { + get + { + var list = base.Feedbacks; + list.AddRange(new List + { + VolumeLevelFeedback, + MuteFeedback, + CurrentInputFeedback + }); + return list; + } + } + + /// + /// / + /// + /// + void Communication_BytesReceived(object sender, GenericCommMethodReceiveBytesArgs e) + { + try + { + // This is probably not thread-safe buffering + // Append the incoming bytes with whatever is in the buffer + var newBytes = new byte[IncomingBuffer.Length + e.Bytes.Length]; + IncomingBuffer.CopyTo(newBytes, 0); + e.Bytes.CopyTo(newBytes, IncomingBuffer.Length); + + // Need to find AA FF and have + for (int i = 0; i < newBytes.Length; i++) + { + if (newBytes[i] == 0xAA && newBytes[i + 1] == 0xFF) + { + newBytes = newBytes.Skip(i).ToArray(); // Trim off junk if there's "dirt" in the buffer + + // parse it + // If it's at least got the header, then process it, + while (newBytes.Length > 4 && newBytes[0] == 0xAA && newBytes[1] == 0xFF) + { + var msgLen = newBytes[3]; + // if the buffer is shorter than the header (3) + message (msgLen) + checksum (1), + // give and save it for next time + if (newBytes.Length < msgLen + 4) + break; + + // Good length, grab the message + var message = newBytes.Skip(4).Take(msgLen).ToArray(); + + // At this point, the ack/nak is the first byte + if (message[0] == 0x41) + { + switch (message[1]) // type byte + { + case 0x00: // General status + //UpdatePowerFB(message[2], message[5]); // "power" can be misrepresented when the display sleeps + + // Handle the first power on fb when waiting for it. + if (IsPoweringOnIgnorePowerFb && message[2] == 0x01) + IsPoweringOnIgnorePowerFb = false; + // Ignore general-status power off messages when powering up + if (!(IsPoweringOnIgnorePowerFb && message[2] == 0x00)) + UpdatePowerFB(message[2]); + UpdateVolumeFB(message[3]); + UpdateMuteFb(message[4]); + UpdateInputFb(message[5]); + break; + + case 0x11: + UpdatePowerFB(message[2]); + break; + + case 0x12: + UpdateVolumeFB(message[2]); + break; + + case 0x13: + UpdateMuteFb(message[2]); + break; + + case 0x14: + UpdateInputFb(message[2]); + break; + + default: + break; + } + } + // Skip over what we've used and save the rest for next time + newBytes = newBytes.Skip(5 + msgLen).ToArray(); + } + + break; // parsing will mean we can stop looking for header in loop + } + } + + // Save whatever partial message is here + IncomingBuffer = newBytes; + } + catch (Exception err) + { + Debug.Console(2, this, "Error parsing feedback: {0}", err); + } + } + + /// + /// + /// + void UpdatePowerFB(byte powerByte) + { + var newVal = powerByte == 1; + if (newVal != _PowerIsOn) + { + _PowerIsOn = newVal; + Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "Feedback Power State: {0}", _PowerIsOn); + PowerIsOnFeedback.FireUpdate(); + } + } + + /// + /// Updates power status from general updates where source is included. + /// Compensates for errant standby / power off hiccups by ignoring + /// power off states with input < 0x10 + /// + void UpdatePowerFB(byte powerByte, byte inputByte) + { + // This should reject errant power feedbacks when switching away from input on standby. + if (powerByte == 0x01 && inputByte < 0x10) + IsInStandby = true; + if (powerByte == 0x00 && IsInStandby) // Ignore power off if coming from standby - glitch + { + IsInStandby = false; + return; + } + + UpdatePowerFB(powerByte); + } + + /// + /// + /// + void UpdateVolumeFB(byte b) + { + var newVol = (ushort)NumericalHelpers.Scale((double)b, 0, 100, 0, 65535); + if (!VolumeIsRamping) + _LastVolumeSent = newVol; + if (newVol != _VolumeLevelForSig) + { + _VolumeLevelForSig = newVol; + VolumeLevelFeedback.FireUpdate(); + } + } + + /// + /// + /// + void UpdateMuteFb(byte b) + { + var newMute = b == 1; + if (newMute != _IsMuted) + { + _IsMuted = newMute; + MuteFeedback.FireUpdate(); + } + } + + + + + /// + /// + /// + void UpdateInputFb(byte b) + { + var newInput = InputPorts.FirstOrDefault(i => i.FeedbackMatchObject.Equals(b)); + if (newInput != null && newInput != _CurrentInputPort) + { + _CurrentInputPort = newInput; + CurrentInputFeedback.FireUpdate(); + OnSwitchChange(new RoutingNumericEventArgs(null, _CurrentInputPort, eRoutingSignalType.AudioVideo)); + } + } + + /// + /// Formats an outgoing message. Replaces third byte with ID and replaces last byte with checksum + /// + /// + void SendBytes(byte[] b) + { + if (LastCommandSentWasVolume) // If the last command sent was volume + if (b[1] != 0x12) // Check if this command is volume, and if not, delay this command + CrestronEnvironment.Sleep(100); + + b[2] = ID; + // append checksum by adding all bytes, except last which should be 00 + int checksum = 0; + for (var i = 1; i < b.Length - 1; i++) // add 2nd through 2nd-to-last bytes + { + checksum += b[i]; + } + checksum = checksum & 0x000000FF; // mask off MSBs + b[b.Length - 1] = (byte)checksum; + + if (b[1] == 0x12) + LastCommandSentWasVolume = true; + else + LastCommandSentWasVolume = false; + + Communication.SendBytes(b); + } + + + /// + /// + /// + public void StatusGet() + { + SendBytes(new byte[] { 0xAA, 0x00, 0x00, 0x00, 0x00 }); + } + + /// + /// + /// + public override void PowerOn() + { + Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "Powering On Display"); + + IsPoweringOnIgnorePowerFb = true; + //Send(PowerOnCmd); + SendBytes(new byte[] { 0xAA, 0x11, 0x00, 0x01, 0x01, 0x00 }); + if (!PowerIsOnFeedback.BoolValue && !_IsWarmingUp && !_IsCoolingDown) + { + _IsWarmingUp = true; + IsWarmingUpFeedback.FireUpdate(); + // Fake power-up cycle + WarmupTimer = new CTimer(o => + { + _IsWarmingUp = false; + _PowerIsOn = true; + IsWarmingUpFeedback.FireUpdate(); + PowerIsOnFeedback.FireUpdate(); + }, WarmupTime); + } + } + + /// + /// + /// + public override void PowerOff() + { + Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "Powering Off Display"); + + IsPoweringOnIgnorePowerFb = false; + // If a display has unreliable-power off feedback, just override this and + // remove this check. + if (!_IsWarmingUp && !_IsCoolingDown) // PowerIsOnFeedback.BoolValue && + { + //Send(PowerOffCmd); + SendBytes(new byte[] { 0xAA, 0x11, 0x00, 0x01, 0x00, 0x00 }); + _IsCoolingDown = true; + _PowerIsOn = false; + PowerIsOnFeedback.FireUpdate(); + IsCoolingDownFeedback.FireUpdate(); + // Fake cool-down cycle + CooldownTimer = new CTimer(o => + { + _IsCoolingDown = false; + IsCoolingDownFeedback.FireUpdate(); + }, CooldownTime); + } + } + + public override void PowerToggle() + { + if (PowerIsOnFeedback.BoolValue && !IsWarmingUpFeedback.BoolValue) + PowerOff(); + else if (!PowerIsOnFeedback.BoolValue && !IsCoolingDownFeedback.BoolValue) + PowerOn(); + } + + public void PowerGet() + { + SendBytes(new byte[] { 0xAA, 0x11, 0x00, 0x00, 0x00 }); + } + + public void InputHdmi1() + { + SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x01, 0x21, 0x00 }); + } + + public void InputHdmi1PC() + { + SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x01, 0x22, 0x00 }); + } + + public void InputHdmi2() + { + SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x01, 0x23, 0x00 }); + } + + public void InputHdmi2PC() + { + SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x01, 0x24, 0x00 }); + } + + public void InputHdmi3() + { + SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x01, 0x32, 0x00 }); + } + + public void InputHdmi4() + { + SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x01, 0x34, 0x00 }); + } + + public void InputDisplayPort1() + { + SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x01, 0x25, 0x00 }); + } + + public void InputDisplayPort2() + { + SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x01, 0x26, 0x00 }); + } + + public void InputDvi1() + { + SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x01, 0x18, 0x00 }); + } + + public void InputVideo1() + { + SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x01, 0x08, 0x00 }); + } + + public void InputRgb1() + { + SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x01, 0x14, 0x00 }); + } + + public void InputRgb2() + { + SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x01, 0x1E, 0x00 }); + } + + public void InputGet() + { + SendBytes(new byte[] { 0xAA, 0x14, 0x00, 0x00, 0x00 }); + } + + + /// + /// Executes a switch, turning on display if necessary. + /// + /// + public override void ExecuteSwitch(object selector) + { + //if (!(selector is Action)) + // Debug.Console(1, this, "WARNING: ExecuteSwitch cannot handle type {0}", selector.GetType()); + + if (_PowerIsOn) + (selector as Action)(); + else // if power is off, wait until we get on FB to send it. + { + // One-time event handler to wait for power on before executing switch + EventHandler handler = null; // necessary to allow reference inside lambda to handler + handler = (o, a) => + { + if (!_IsWarmingUp) // Done warming + { + IsWarmingUpFeedback.OutputChange -= handler; + (selector as Action)(); + } + }; + IsWarmingUpFeedback.OutputChange += handler; // attach and wait for on FB + PowerOn(); + } + } + + /// + /// Scales the level to the range of the display and sends the command + /// + /// + public void SetVolume(ushort level) + { + _LastVolumeSent = level; + var scaled = (int)NumericalHelpers.Scale(level, 0, 65535, 0, 100); + // The inputs to Scale ensure that byte won't overflow + SendBytes(new byte[] { 0xAA, 0x12, 0x00, 0x01, Convert.ToByte(scaled), 0x00 }); + } + + #region IBasicVolumeWithFeedback Members + + public IntFeedback VolumeLevelFeedback { get; private set; } + + public BoolFeedback MuteFeedback { get; private set; } + + /// + /// + /// + public void MuteOff() + { + SendBytes(new byte[] { 0xAA, 0x13, 0x00, 0x01, 0x00, 0x00 }); + } + + /// + /// + /// + public void MuteOn() + { + SendBytes(new byte[] { 0xAA, 0x13, 0x00, 0x01, 0x01, 0x00 }); + } + + /// + /// + /// + public void MuteGet() + { + SendBytes(new byte[] { 0xAA, 0x13, 0x00, 0x00, 0x00 }); + } + + #endregion + + #region IBasicVolumeControls Members + + /// + /// + /// + public void MuteToggle() + { + if (_IsMuted) + MuteOff(); + else + MuteOn(); + } + + /// + /// + /// + /// + public void VolumeDown(bool pressRelease) + { + if (pressRelease) + { + VolumeIncrementer.StartDown(); + VolumeIsRamping = true; + } + else + { + VolumeIsRamping = false; + VolumeIncrementer.Stop(); + } + } + + /// + /// + /// + /// + public void VolumeUp(bool pressRelease) + { + if (pressRelease) + { + VolumeIncrementer.StartUp(); + VolumeIsRamping = true; + } + else + { + VolumeIsRamping = false; + VolumeIncrementer.Stop(); + } + } + + /// + /// + /// + public void VolumeGet() + { + SendBytes(new byte[] { 0xAA, 0x12, 0x00, 0x00, 0x00 }); + } + + #endregion + } + + public class SamsungMDCFactory : EssentialsDeviceFactory + { + public SamsungMDCFactory() + { + TypeNames = new List() { "samsungmdc" }; + } + + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + Debug.Console(1, "Factory Attempting to create new Generic Comm Device"); + var comm = CommFactory.CreateCommForDevice(dc); + if (comm != null) + return new SamsungMDC(dc.Key, dc.Name, comm, dc.Properties["id"].Value()); + else + return null; + } + } + } \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Environment/Crestron Lighting/Din8sw8.cs b/src/PepperDash.Essentials.Devices.Common/Environment/Crestron Lighting/Din8sw8.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Environment/Crestron Lighting/Din8sw8.cs rename to src/PepperDash.Essentials.Devices.Common/Environment/Crestron Lighting/Din8sw8.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Environment/Lutron/LutronQuantum.cs b/src/PepperDash.Essentials.Devices.Common/Environment/Lutron/LutronQuantum.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Environment/Lutron/LutronQuantum.cs rename to src/PepperDash.Essentials.Devices.Common/Environment/Lutron/LutronQuantum.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Environment/Somfy/RelayControlledShade.cs b/src/PepperDash.Essentials.Devices.Common/Environment/Somfy/RelayControlledShade.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Environment/Somfy/RelayControlledShade.cs rename to src/PepperDash.Essentials.Devices.Common/Environment/Somfy/RelayControlledShade.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Factory/DeviceFactory.cs b/src/PepperDash.Essentials.Devices.Common/Factory/DeviceFactory.cs similarity index 94% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Factory/DeviceFactory.cs rename to src/PepperDash.Essentials.Devices.Common/Factory/DeviceFactory.cs index a18d3b65..c5ab29b1 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Factory/DeviceFactory.cs +++ b/src/PepperDash.Essentials.Devices.Common/Factory/DeviceFactory.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Linq; using System.Collections.Generic; using Crestron.SimplSharp; @@ -7,8 +9,8 @@ using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.GeneralIO; using Crestron.SimplSharp.Reflection; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Config; diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Generic/GenericSource.cs b/src/PepperDash.Essentials.Devices.Common/Generic/GenericSource.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Generic/GenericSource.cs rename to src/PepperDash.Essentials.Devices.Common/Generic/GenericSource.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/ImageProcessors/AnalogWay/AnalogWayLiveCorePropertiesConfig.cs b/src/PepperDash.Essentials.Devices.Common/ImageProcessors/AnalogWay/AnalogWayLiveCorePropertiesConfig.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/ImageProcessors/AnalogWay/AnalogWayLiveCorePropertiesConfig.cs rename to src/PepperDash.Essentials.Devices.Common/ImageProcessors/AnalogWay/AnalogWayLiveCorePropertiesConfig.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/ImageProcessors/AnalogWay/AnalongWayLiveCore.cs b/src/PepperDash.Essentials.Devices.Common/ImageProcessors/AnalogWay/AnalongWayLiveCore.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/ImageProcessors/AnalogWay/AnalongWayLiveCore.cs rename to src/PepperDash.Essentials.Devices.Common/ImageProcessors/AnalogWay/AnalongWayLiveCore.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/ImageProcessors/TVOne/TVOneCorio.cs b/src/PepperDash.Essentials.Devices.Common/ImageProcessors/TVOne/TVOneCorio.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/ImageProcessors/TVOne/TVOneCorio.cs rename to src/PepperDash.Essentials.Devices.Common/ImageProcessors/TVOne/TVOneCorio.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/ImageProcessors/TVOne/TVOneCorioPropertiesConfig.cs b/src/PepperDash.Essentials.Devices.Common/ImageProcessors/TVOne/TVOneCorioPropertiesConfig.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/ImageProcessors/TVOne/TVOneCorioPropertiesConfig.cs rename to src/PepperDash.Essentials.Devices.Common/ImageProcessors/TVOne/TVOneCorioPropertiesConfig.cs diff --git a/src/PepperDash.Essentials.Devices.Common/PepperDash.Essentials.Devices.Common.csproj b/src/PepperDash.Essentials.Devices.Common/PepperDash.Essentials.Devices.Common.csproj new file mode 100644 index 00000000..0837b2df --- /dev/null +++ b/src/PepperDash.Essentials.Devices.Common/PepperDash.Essentials.Devices.Common.csproj @@ -0,0 +1,36 @@ + + + ProgramLibrary + + + net472 + false + bin\$(Configuration)\ + PepperDash.Essentials.Devices.Common + PepperDash.Essentials.Devices.Common + True + PepperDash Essentials Devices Common + $(AssemblyName) + + + full + + + pdbonly + + + + + + + + + + + + + Full + + + + \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Power Controllers/DigitalLoggerPropertiesConfig.cs b/src/PepperDash.Essentials.Devices.Common/Power Controllers/DigitalLoggerPropertiesConfig.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Power Controllers/DigitalLoggerPropertiesConfig.cs rename to src/PepperDash.Essentials.Devices.Common/Power Controllers/DigitalLoggerPropertiesConfig.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Power Controllers/Digitallogger.cs b/src/PepperDash.Essentials.Devices.Common/Power Controllers/Digitallogger.cs similarity index 99% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Power Controllers/Digitallogger.cs rename to src/PepperDash.Essentials.Devices.Common/Power Controllers/Digitallogger.cs index ee33b5e6..ed885104 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Power Controllers/Digitallogger.cs +++ b/src/PepperDash.Essentials.Devices.Common/Power Controllers/Digitallogger.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -8,16 +10,16 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using System.Text.RegularExpressions; using Crestron.SimplSharp.Net.Http; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; using PepperDash.Essentials.Core.Bridges; -using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Config; using PepperDash.Essentials; namespace PepperDash.Essentials.Devices.Common -{ +{ [Obsolete("This Device will be moved to a plugin in a future update")] public class DigitalLogger : EssentialsBridgeableDevice { diff --git a/essentials-framework/Essentials DM/Essentials_DM/Properties/ControlSystem.cfg b/src/PepperDash.Essentials.Devices.Common/Properties/ControlSystem.cfg similarity index 100% rename from essentials-framework/Essentials DM/Essentials_DM/Properties/ControlSystem.cfg rename to src/PepperDash.Essentials.Devices.Common/Properties/ControlSystem.cfg diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/SetTopBox/IRSetTopBoxBase.cs b/src/PepperDash.Essentials.Devices.Common/SetTopBox/IRSetTopBoxBase.cs similarity index 96% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/SetTopBox/IRSetTopBoxBase.cs rename to src/PepperDash.Essentials.Devices.Common/SetTopBox/IRSetTopBoxBase.cs index db72d8eb..b7c7e349 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/SetTopBox/IRSetTopBoxBase.cs +++ b/src/PepperDash.Essentials.Devices.Common/SetTopBox/IRSetTopBoxBase.cs @@ -1,518 +1,520 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; -using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Bridges; -using PepperDash.Essentials.Core.Config; -using PepperDash.Essentials.Core.Presets; -using PepperDash.Essentials.Core.Routing; -using PepperDash.Essentials.Core.DeviceTypeInterfaces; - -namespace PepperDash.Essentials.Devices.Common -{ - [Description("Wrapper class for an IR Set Top Box")] - public class IRSetTopBoxBase : EssentialsBridgeableDevice, ISetTopBoxControls, IRoutingOutputs, IUsageTracking, IHasPowerControl, ITvPresetsProvider - { - public IrOutputPortController IrPort { get; private set; } - - public uint DisplayUiType { get { return DisplayUiConstants.TypeDirecTv; } } - public ushort IrPulseTime { get; set; } - - public bool HasPresets { get; set; } - public bool HasDvr { get; set; } - public bool HasDpad { get; set; } - public bool HasNumeric { get; set; } - - public DevicePresetsModel TvPresets { get; private set; } - - public IRSetTopBoxBase(string key, string name, IrOutputPortController portCont, - SetTopBoxPropertiesConfig props) - : base(key, name) - { - IrPort = portCont; - IrPulseTime = 200; - - if (props.IrPulseTime > 0) - { - IrPulseTime = (ushort)props.IrPulseTime; - } - - DeviceManager.AddDevice(portCont); - - HasPresets = props.HasPresets; - HasDvr = props.HasDvr; - HasDpad = props.HasDpad; - HasNumeric = props.HasNumeric; - - HasKeypadAccessoryButton1 = true; - KeypadAccessoryButton1Command = "Dash"; - KeypadAccessoryButton1Label = "-"; - - HasKeypadAccessoryButton2 = true; - KeypadAccessoryButton2Command = "KEYPAD_ENTER"; - KeypadAccessoryButton2Label = "Enter"; - - AnyVideoOut = new RoutingOutputPort(RoutingPortNames.AnyVideoOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, null, this); - AnyAudioOut = new RoutingOutputPort(RoutingPortNames.AnyAudioOut, eRoutingSignalType.Audio, - eRoutingPortConnectionType.DigitalAudio, null, this); - OutputPorts = new RoutingPortCollection { AnyVideoOut, AnyAudioOut }; - } - - public void LoadPresets(string filePath) - { - TvPresets = new DevicePresetsModel(Key + "-presets", this, filePath); - DeviceManager.AddDevice(TvPresets); - } - - - #region ISetTopBoxControls Members - - public void DvrList(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_DVR, pressRelease); - } - - public void Replay(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_REPLAY, pressRelease); - } - - #endregion - - #region IDPad Members - - public void Up(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_UP_ARROW, pressRelease); - } - - public void Down(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_DN_ARROW, pressRelease); - } - - public void Left(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_LEFT_ARROW, pressRelease); - } - - public void Right(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_RIGHT_ARROW, pressRelease); - } - - public void Select(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_ENTER, pressRelease); - } - - public void Menu(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_MENU, pressRelease); - } - - public void Exit(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_EXIT, pressRelease); - } - - #endregion - - #region INumericKeypad Members - - public void Digit0(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_0, pressRelease); - } - - public void Digit1(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_1, pressRelease); - } - - public void Digit2(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_2, pressRelease); - } - - public void Digit3(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_3, pressRelease); - } - - public void Digit4(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_4, pressRelease); - } - - public void Digit5(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_5, pressRelease); - } - - public void Digit6(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_6, pressRelease); - } - - public void Digit7(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_7, pressRelease); - } - - public void Digit8(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_8, pressRelease); - } - - public void Digit9(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_9, pressRelease); - } - - /// - /// Defaults to true - /// - public bool HasKeypadAccessoryButton1 { get; set; } - - /// - /// Defaults to "-" - /// - public string KeypadAccessoryButton1Label { get; set; } - - - /// - /// Defaults to "Dash" - /// - public string KeypadAccessoryButton1Command { get; set; } - - public void KeypadAccessoryButton1(bool pressRelease) - { - IrPort.PressRelease(KeypadAccessoryButton1Command, pressRelease); - } - - /// - /// Defaults to true - /// - public bool HasKeypadAccessoryButton2 { get; set; } - - /// - /// Defaults to "Enter" - /// - public string KeypadAccessoryButton2Label { get; set; } - - - /// - /// Defaults to "Enter" - /// - public string KeypadAccessoryButton2Command { get; set; } - - public void KeypadAccessoryButton2(bool pressRelease) - { - IrPort.PressRelease(KeypadAccessoryButton2Command, pressRelease); - } - - #endregion - - #region ISetTopBoxNumericKeypad Members - - /// - /// Corresponds to "dash" IR command - /// - public void Dash(bool pressRelease) - { - IrPort.PressRelease("dash", pressRelease); - } - - /// - /// Corresponds to "numericEnter" IR command - /// - public void KeypadEnter(bool pressRelease) - { - IrPort.PressRelease("numericEnter", pressRelease); - } - - #endregion - - #region IChannelFunctions Members - - public void ChannelUp(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_CH_PLUS, pressRelease); - } - - public void ChannelDown(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_CH_MINUS, pressRelease); - } - - public void LastChannel(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_LAST, pressRelease); - } - - public void Guide(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_GUIDE, pressRelease); - } - - public void Info(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_INFO, pressRelease); - } - - #endregion - - #region IColorFunctions Members - - public void Red(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_RED, pressRelease); - } - - public void Green(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_GREEN, pressRelease); - } - - public void Yellow(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_YELLOW, pressRelease); - } - - public void Blue(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_BLUE, pressRelease); - } - - #endregion - - #region IRoutingOutputs Members - - public RoutingOutputPort AnyVideoOut { get; private set; } - public RoutingOutputPort AnyAudioOut { get; private set; } - public RoutingPortCollection OutputPorts { get; private set; } - - #endregion - - #region ITransport Members - - public void ChapMinus(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_REPLAY, pressRelease); - } - - public void ChapPlus(bool pressRelease) - { - } - - public void FFwd(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_FSCAN, pressRelease); - } - - public void Pause(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_RSCAN, pressRelease); - } - - public void Play(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_PLAY, pressRelease); - } - - public void Record(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_RECORD, pressRelease); - } - - public void Rewind(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_RSCAN, pressRelease); - } - - public void Stop(bool pressRelease) - { - IrPort.PressRelease(IROutputStandardCommands.IROut_STOP, pressRelease); - } - - #endregion - - #region IUsageTracking Members - - public UsageTracking UsageTracker { get; set; } - - #endregion - - #region IPower Members - - public void PowerOn() - { - IrPort.Pulse(IROutputStandardCommands.IROut_POWER_ON, IrPulseTime); - } - - public void PowerOff() - { - IrPort.Pulse(IROutputStandardCommands.IROut_POWER_OFF, IrPulseTime); - } - - public void PowerToggle() - { - IrPort.Pulse(IROutputStandardCommands.IROut_POWER, IrPulseTime); - } - - #endregion - - public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - var joinMap = new SetTopBoxControllerJoinMap(joinStart); - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - if (bridge != null) - { - bridge.AddJoinMap(Key, joinMap); - } - else - { - Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); - } - - Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - Debug.Console(0, "Linking to SetTopBox: {0}", Name); - - trilist.OnlineStatusChange += new OnlineStatusChangeEventHandler((o, a) => - { - if (a.DeviceOnLine) - { - trilist.StringInput[joinMap.Name.JoinNumber].StringValue = Name; - } - }); - - - var stbBase = this as ISetTopBoxControls; - if (stbBase != null) - { - trilist.BooleanInput[joinMap.HasDpad.JoinNumber].BoolValue = stbBase.HasDpad; - trilist.BooleanInput[joinMap.HasNumeric.JoinNumber].BoolValue = stbBase.HasNumeric; - trilist.BooleanInput[joinMap.HasDvr.JoinNumber].BoolValue = stbBase.HasDvr; - trilist.BooleanInput[joinMap.HasPresets.JoinNumber].BoolValue = stbBase.HasPresets; - - trilist.SetBoolSigAction(joinMap.DvrList.JoinNumber, stbBase.DvrList); - trilist.SetBoolSigAction(joinMap.Replay.JoinNumber, stbBase.Replay); - - trilist.SetStringSigAction(joinMap.LoadPresets.JoinNumber, stbBase.LoadPresets); - } - - var stbPower = this as IHasPowerControl; - if (stbPower != null) - { - trilist.SetSigTrueAction(joinMap.PowerOn.JoinNumber, stbPower.PowerOn); - trilist.SetSigTrueAction(joinMap.PowerOff.JoinNumber, stbPower.PowerOff); - trilist.SetSigTrueAction(joinMap.PowerToggle.JoinNumber, stbPower.PowerToggle); - } - - var stbDPad = this as IDPad; - if (stbDPad != null) - { - trilist.SetBoolSigAction(joinMap.Up.JoinNumber, stbDPad.Up); - trilist.SetBoolSigAction(joinMap.Down.JoinNumber, stbDPad.Down); - trilist.SetBoolSigAction(joinMap.Left.JoinNumber, stbDPad.Left); - trilist.SetBoolSigAction(joinMap.Right.JoinNumber, stbDPad.Right); - trilist.SetBoolSigAction(joinMap.Select.JoinNumber, stbDPad.Select); - trilist.SetBoolSigAction(joinMap.Menu.JoinNumber, stbDPad.Menu); - trilist.SetBoolSigAction(joinMap.Exit.JoinNumber, stbDPad.Exit); - } - - var stbChannel = this as IChannel; - if (stbChannel != null) - { - trilist.SetBoolSigAction(joinMap.ChannelUp.JoinNumber, stbChannel.ChannelUp); - trilist.SetBoolSigAction(joinMap.ChannelDown.JoinNumber, stbChannel.ChannelDown); - trilist.SetBoolSigAction(joinMap.LastChannel.JoinNumber, stbChannel.LastChannel); - trilist.SetBoolSigAction(joinMap.Guide.JoinNumber, stbChannel.Guide); - trilist.SetBoolSigAction(joinMap.Info.JoinNumber, stbChannel.Info); - trilist.SetBoolSigAction(joinMap.Exit.JoinNumber, stbChannel.Exit); - } - - var stbColor = this as IColor; - if (stbColor != null) - { - trilist.SetBoolSigAction(joinMap.Red.JoinNumber, stbColor.Red); - trilist.SetBoolSigAction(joinMap.Green.JoinNumber, stbColor.Green); - trilist.SetBoolSigAction(joinMap.Yellow.JoinNumber, stbColor.Yellow); - trilist.SetBoolSigAction(joinMap.Blue.JoinNumber, stbColor.Blue); - } - - var stbKeypad = this as ISetTopBoxNumericKeypad; - if (stbKeypad != null) - { - trilist.StringInput[joinMap.KeypadAccessoryButton1Label.JoinNumber].StringValue = stbKeypad.KeypadAccessoryButton1Label; - trilist.StringInput[joinMap.KeypadAccessoryButton2Label.JoinNumber].StringValue = stbKeypad.KeypadAccessoryButton2Label; - - trilist.BooleanInput[joinMap.HasKeypadAccessoryButton1.JoinNumber].BoolValue = stbKeypad.HasKeypadAccessoryButton1; - trilist.BooleanInput[joinMap.HasKeypadAccessoryButton2.JoinNumber].BoolValue = stbKeypad.HasKeypadAccessoryButton2; - - trilist.SetBoolSigAction(joinMap.Digit0.JoinNumber, stbKeypad.Digit0); - trilist.SetBoolSigAction(joinMap.Digit1.JoinNumber, stbKeypad.Digit1); - trilist.SetBoolSigAction(joinMap.Digit2.JoinNumber, stbKeypad.Digit2); - trilist.SetBoolSigAction(joinMap.Digit3.JoinNumber, stbKeypad.Digit3); - trilist.SetBoolSigAction(joinMap.Digit4.JoinNumber, stbKeypad.Digit4); - trilist.SetBoolSigAction(joinMap.Digit5.JoinNumber, stbKeypad.Digit5); - trilist.SetBoolSigAction(joinMap.Digit6.JoinNumber, stbKeypad.Digit6); - trilist.SetBoolSigAction(joinMap.Digit7.JoinNumber, stbKeypad.Digit7); - trilist.SetBoolSigAction(joinMap.Digit8.JoinNumber, stbKeypad.Digit8); - trilist.SetBoolSigAction(joinMap.Digit9.JoinNumber, stbKeypad.Digit9); - trilist.SetBoolSigAction(joinMap.KeypadAccessoryButton1Press.JoinNumber, stbKeypad.KeypadAccessoryButton1); - trilist.SetBoolSigAction(joinMap.KeypadAccessoryButton2Press.JoinNumber, stbKeypad.KeypadAccessoryButton1); - trilist.SetBoolSigAction(joinMap.Dash.JoinNumber, stbKeypad.Dash); - trilist.SetBoolSigAction(joinMap.KeypadEnter.JoinNumber, stbKeypad.KeypadEnter); - } - - var stbTransport = this as ITransport; - if (stbTransport != null) - { - trilist.SetBoolSigAction(joinMap.Play.JoinNumber, stbTransport.Play); - trilist.SetBoolSigAction(joinMap.Pause.JoinNumber, stbTransport.Pause); - trilist.SetBoolSigAction(joinMap.Rewind.JoinNumber, stbTransport.Rewind); - trilist.SetBoolSigAction(joinMap.FFwd.JoinNumber, stbTransport.FFwd); - trilist.SetBoolSigAction(joinMap.ChapMinus.JoinNumber, stbTransport.ChapMinus); - trilist.SetBoolSigAction(joinMap.ChapPlus.JoinNumber, stbTransport.ChapPlus); - trilist.SetBoolSigAction(joinMap.Stop.JoinNumber, stbTransport.Stop); - trilist.SetBoolSigAction(joinMap.Record.JoinNumber, stbTransport.Record); - } - } - } - - public class IRSetTopBoxBaseFactory : EssentialsDeviceFactory - { - public IRSetTopBoxBaseFactory() - { - TypeNames = new List() { "settopbox" }; - } - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - Debug.Console(1, "Factory Attempting to create new SetTopBox Device"); - var irCont = IRPortHelper.GetIrOutputPortController(dc); - var config = dc.Properties.ToObject(); - var stb = new IRSetTopBoxBase(dc.Key, dc.Name, irCont, config); - - var listName = dc.Properties.Value("presetsList"); - if (listName != null) - stb.LoadPresets(listName); - return stb; - - } - } - +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DeviceSupport; +using Full.Newtonsoft.Json; +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Presets; +using PepperDash.Essentials.Core.Routing; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; + +namespace PepperDash.Essentials.Devices.Common +{ + [Description("Wrapper class for an IR Set Top Box")] + public class IRSetTopBoxBase : EssentialsBridgeableDevice, ISetTopBoxControls, IRoutingOutputs, IUsageTracking, IHasPowerControl, ITvPresetsProvider + { + public IrOutputPortController IrPort { get; private set; } + + public uint DisplayUiType { get { return DisplayUiConstants.TypeDirecTv; } } + public ushort IrPulseTime { get; set; } + + public bool HasPresets { get; set; } + public bool HasDvr { get; set; } + public bool HasDpad { get; set; } + public bool HasNumeric { get; set; } + + public DevicePresetsModel TvPresets { get; private set; } + + public IRSetTopBoxBase(string key, string name, IrOutputPortController portCont, + SetTopBoxPropertiesConfig props) + : base(key, name) + { + IrPort = portCont; + IrPulseTime = 200; + + if (props.IrPulseTime > 0) + { + IrPulseTime = (ushort)props.IrPulseTime; + } + + DeviceManager.AddDevice(portCont); + + HasPresets = props.HasPresets; + HasDvr = props.HasDvr; + HasDpad = props.HasDpad; + HasNumeric = props.HasNumeric; + + HasKeypadAccessoryButton1 = true; + KeypadAccessoryButton1Command = "Dash"; + KeypadAccessoryButton1Label = "-"; + + HasKeypadAccessoryButton2 = true; + KeypadAccessoryButton2Command = "KEYPAD_ENTER"; + KeypadAccessoryButton2Label = "Enter"; + + AnyVideoOut = new RoutingOutputPort(RoutingPortNames.AnyVideoOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, null, this); + AnyAudioOut = new RoutingOutputPort(RoutingPortNames.AnyAudioOut, eRoutingSignalType.Audio, + eRoutingPortConnectionType.DigitalAudio, null, this); + OutputPorts = new RoutingPortCollection { AnyVideoOut, AnyAudioOut }; + } + + public void LoadPresets(string filePath) + { + TvPresets = new DevicePresetsModel(Key + "-presets", this, filePath); + DeviceManager.AddDevice(TvPresets); + } + + + #region ISetTopBoxControls Members + + public void DvrList(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_DVR, pressRelease); + } + + public void Replay(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_REPLAY, pressRelease); + } + + #endregion + + #region IDPad Members + + public void Up(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_UP_ARROW, pressRelease); + } + + public void Down(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_DN_ARROW, pressRelease); + } + + public void Left(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_LEFT_ARROW, pressRelease); + } + + public void Right(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_RIGHT_ARROW, pressRelease); + } + + public void Select(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_ENTER, pressRelease); + } + + public void Menu(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_MENU, pressRelease); + } + + public void Exit(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_EXIT, pressRelease); + } + + #endregion + + #region INumericKeypad Members + + public void Digit0(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_0, pressRelease); + } + + public void Digit1(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_1, pressRelease); + } + + public void Digit2(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_2, pressRelease); + } + + public void Digit3(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_3, pressRelease); + } + + public void Digit4(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_4, pressRelease); + } + + public void Digit5(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_5, pressRelease); + } + + public void Digit6(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_6, pressRelease); + } + + public void Digit7(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_7, pressRelease); + } + + public void Digit8(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_8, pressRelease); + } + + public void Digit9(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_9, pressRelease); + } + + /// + /// Defaults to true + /// + public bool HasKeypadAccessoryButton1 { get; set; } + + /// + /// Defaults to "-" + /// + public string KeypadAccessoryButton1Label { get; set; } + + + /// + /// Defaults to "Dash" + /// + public string KeypadAccessoryButton1Command { get; set; } + + public void KeypadAccessoryButton1(bool pressRelease) + { + IrPort.PressRelease(KeypadAccessoryButton1Command, pressRelease); + } + + /// + /// Defaults to true + /// + public bool HasKeypadAccessoryButton2 { get; set; } + + /// + /// Defaults to "Enter" + /// + public string KeypadAccessoryButton2Label { get; set; } + + + /// + /// Defaults to "Enter" + /// + public string KeypadAccessoryButton2Command { get; set; } + + public void KeypadAccessoryButton2(bool pressRelease) + { + IrPort.PressRelease(KeypadAccessoryButton2Command, pressRelease); + } + + #endregion + + #region ISetTopBoxNumericKeypad Members + + /// + /// Corresponds to "dash" IR command + /// + public void Dash(bool pressRelease) + { + IrPort.PressRelease("dash", pressRelease); + } + + /// + /// Corresponds to "numericEnter" IR command + /// + public void KeypadEnter(bool pressRelease) + { + IrPort.PressRelease("numericEnter", pressRelease); + } + + #endregion + + #region IChannelFunctions Members + + public void ChannelUp(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_CH_PLUS, pressRelease); + } + + public void ChannelDown(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_CH_MINUS, pressRelease); + } + + public void LastChannel(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_LAST, pressRelease); + } + + public void Guide(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_GUIDE, pressRelease); + } + + public void Info(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_INFO, pressRelease); + } + + #endregion + + #region IColorFunctions Members + + public void Red(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_RED, pressRelease); + } + + public void Green(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_GREEN, pressRelease); + } + + public void Yellow(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_YELLOW, pressRelease); + } + + public void Blue(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_BLUE, pressRelease); + } + + #endregion + + #region IRoutingOutputs Members + + public RoutingOutputPort AnyVideoOut { get; private set; } + public RoutingOutputPort AnyAudioOut { get; private set; } + public RoutingPortCollection OutputPorts { get; private set; } + + #endregion + + #region ITransport Members + + public void ChapMinus(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_REPLAY, pressRelease); + } + + public void ChapPlus(bool pressRelease) + { + } + + public void FFwd(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_FSCAN, pressRelease); + } + + public void Pause(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_RSCAN, pressRelease); + } + + public void Play(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_PLAY, pressRelease); + } + + public void Record(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_RECORD, pressRelease); + } + + public void Rewind(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_RSCAN, pressRelease); + } + + public void Stop(bool pressRelease) + { + IrPort.PressRelease(IROutputStandardCommands.IROut_STOP, pressRelease); + } + + #endregion + + #region IUsageTracking Members + + public UsageTracking UsageTracker { get; set; } + + #endregion + + #region IPower Members + + public void PowerOn() + { + IrPort.Pulse(IROutputStandardCommands.IROut_POWER_ON, IrPulseTime); + } + + public void PowerOff() + { + IrPort.Pulse(IROutputStandardCommands.IROut_POWER_OFF, IrPulseTime); + } + + public void PowerToggle() + { + IrPort.Pulse(IROutputStandardCommands.IROut_POWER, IrPulseTime); + } + + #endregion + + public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + var joinMap = new SetTopBoxControllerJoinMap(joinStart); + var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); + + if (bridge != null) + { + bridge.AddJoinMap(Key, joinMap); + } + else + { + Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); + } + + Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); + Debug.Console(0, "Linking to SetTopBox: {0}", Name); + + trilist.OnlineStatusChange += new OnlineStatusChangeEventHandler((o, a) => + { + if (a.DeviceOnLine) + { + trilist.StringInput[joinMap.Name.JoinNumber].StringValue = Name; + } + }); + + + var stbBase = this as ISetTopBoxControls; + if (stbBase != null) + { + trilist.BooleanInput[joinMap.HasDpad.JoinNumber].BoolValue = stbBase.HasDpad; + trilist.BooleanInput[joinMap.HasNumeric.JoinNumber].BoolValue = stbBase.HasNumeric; + trilist.BooleanInput[joinMap.HasDvr.JoinNumber].BoolValue = stbBase.HasDvr; + trilist.BooleanInput[joinMap.HasPresets.JoinNumber].BoolValue = stbBase.HasPresets; + + trilist.SetBoolSigAction(joinMap.DvrList.JoinNumber, stbBase.DvrList); + trilist.SetBoolSigAction(joinMap.Replay.JoinNumber, stbBase.Replay); + + trilist.SetStringSigAction(joinMap.LoadPresets.JoinNumber, stbBase.LoadPresets); + } + + var stbPower = this as IHasPowerControl; + if (stbPower != null) + { + trilist.SetSigTrueAction(joinMap.PowerOn.JoinNumber, stbPower.PowerOn); + trilist.SetSigTrueAction(joinMap.PowerOff.JoinNumber, stbPower.PowerOff); + trilist.SetSigTrueAction(joinMap.PowerToggle.JoinNumber, stbPower.PowerToggle); + } + + var stbDPad = this as IDPad; + if (stbDPad != null) + { + trilist.SetBoolSigAction(joinMap.Up.JoinNumber, stbDPad.Up); + trilist.SetBoolSigAction(joinMap.Down.JoinNumber, stbDPad.Down); + trilist.SetBoolSigAction(joinMap.Left.JoinNumber, stbDPad.Left); + trilist.SetBoolSigAction(joinMap.Right.JoinNumber, stbDPad.Right); + trilist.SetBoolSigAction(joinMap.Select.JoinNumber, stbDPad.Select); + trilist.SetBoolSigAction(joinMap.Menu.JoinNumber, stbDPad.Menu); + trilist.SetBoolSigAction(joinMap.Exit.JoinNumber, stbDPad.Exit); + } + + var stbChannel = this as IChannel; + if (stbChannel != null) + { + trilist.SetBoolSigAction(joinMap.ChannelUp.JoinNumber, stbChannel.ChannelUp); + trilist.SetBoolSigAction(joinMap.ChannelDown.JoinNumber, stbChannel.ChannelDown); + trilist.SetBoolSigAction(joinMap.LastChannel.JoinNumber, stbChannel.LastChannel); + trilist.SetBoolSigAction(joinMap.Guide.JoinNumber, stbChannel.Guide); + trilist.SetBoolSigAction(joinMap.Info.JoinNumber, stbChannel.Info); + trilist.SetBoolSigAction(joinMap.Exit.JoinNumber, stbChannel.Exit); + } + + var stbColor = this as IColor; + if (stbColor != null) + { + trilist.SetBoolSigAction(joinMap.Red.JoinNumber, stbColor.Red); + trilist.SetBoolSigAction(joinMap.Green.JoinNumber, stbColor.Green); + trilist.SetBoolSigAction(joinMap.Yellow.JoinNumber, stbColor.Yellow); + trilist.SetBoolSigAction(joinMap.Blue.JoinNumber, stbColor.Blue); + } + + var stbKeypad = this as ISetTopBoxNumericKeypad; + if (stbKeypad != null) + { + trilist.StringInput[joinMap.KeypadAccessoryButton1Label.JoinNumber].StringValue = stbKeypad.KeypadAccessoryButton1Label; + trilist.StringInput[joinMap.KeypadAccessoryButton2Label.JoinNumber].StringValue = stbKeypad.KeypadAccessoryButton2Label; + + trilist.BooleanInput[joinMap.HasKeypadAccessoryButton1.JoinNumber].BoolValue = stbKeypad.HasKeypadAccessoryButton1; + trilist.BooleanInput[joinMap.HasKeypadAccessoryButton2.JoinNumber].BoolValue = stbKeypad.HasKeypadAccessoryButton2; + + trilist.SetBoolSigAction(joinMap.Digit0.JoinNumber, stbKeypad.Digit0); + trilist.SetBoolSigAction(joinMap.Digit1.JoinNumber, stbKeypad.Digit1); + trilist.SetBoolSigAction(joinMap.Digit2.JoinNumber, stbKeypad.Digit2); + trilist.SetBoolSigAction(joinMap.Digit3.JoinNumber, stbKeypad.Digit3); + trilist.SetBoolSigAction(joinMap.Digit4.JoinNumber, stbKeypad.Digit4); + trilist.SetBoolSigAction(joinMap.Digit5.JoinNumber, stbKeypad.Digit5); + trilist.SetBoolSigAction(joinMap.Digit6.JoinNumber, stbKeypad.Digit6); + trilist.SetBoolSigAction(joinMap.Digit7.JoinNumber, stbKeypad.Digit7); + trilist.SetBoolSigAction(joinMap.Digit8.JoinNumber, stbKeypad.Digit8); + trilist.SetBoolSigAction(joinMap.Digit9.JoinNumber, stbKeypad.Digit9); + trilist.SetBoolSigAction(joinMap.KeypadAccessoryButton1Press.JoinNumber, stbKeypad.KeypadAccessoryButton1); + trilist.SetBoolSigAction(joinMap.KeypadAccessoryButton2Press.JoinNumber, stbKeypad.KeypadAccessoryButton1); + trilist.SetBoolSigAction(joinMap.Dash.JoinNumber, stbKeypad.Dash); + trilist.SetBoolSigAction(joinMap.KeypadEnter.JoinNumber, stbKeypad.KeypadEnter); + } + + var stbTransport = this as ITransport; + if (stbTransport != null) + { + trilist.SetBoolSigAction(joinMap.Play.JoinNumber, stbTransport.Play); + trilist.SetBoolSigAction(joinMap.Pause.JoinNumber, stbTransport.Pause); + trilist.SetBoolSigAction(joinMap.Rewind.JoinNumber, stbTransport.Rewind); + trilist.SetBoolSigAction(joinMap.FFwd.JoinNumber, stbTransport.FFwd); + trilist.SetBoolSigAction(joinMap.ChapMinus.JoinNumber, stbTransport.ChapMinus); + trilist.SetBoolSigAction(joinMap.ChapPlus.JoinNumber, stbTransport.ChapPlus); + trilist.SetBoolSigAction(joinMap.Stop.JoinNumber, stbTransport.Stop); + trilist.SetBoolSigAction(joinMap.Record.JoinNumber, stbTransport.Record); + } + } + } + + public class IRSetTopBoxBaseFactory : EssentialsDeviceFactory + { + public IRSetTopBoxBaseFactory() + { + TypeNames = new List() { "settopbox" }; + } + + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + Debug.Console(1, "Factory Attempting to create new SetTopBox Device"); + var irCont = IRPortHelper.GetIrOutputPortController(dc); + var config = dc.Properties.ToObject(); + var stb = new IRSetTopBoxBase(dc.Key, dc.Name, irCont, config); + + var listName = dc.Properties.Value("presetsList"); + if (listName != null) + stb.LoadPresets(listName); + return stb; + + } + } + } \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/SetTopBox/SetTopBoxPropertiesConfig.cs b/src/PepperDash.Essentials.Devices.Common/SetTopBox/SetTopBoxPropertiesConfig.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/SetTopBox/SetTopBoxPropertiesConfig.cs rename to src/PepperDash.Essentials.Devices.Common/SetTopBox/SetTopBoxPropertiesConfig.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/SoftCodec/BlueJeansPc.cs b/src/PepperDash.Essentials.Devices.Common/SoftCodec/BlueJeansPc.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/SoftCodec/BlueJeansPc.cs rename to src/PepperDash.Essentials.Devices.Common/SoftCodec/BlueJeansPc.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Streaming/AppleTV.cs b/src/PepperDash.Essentials.Devices.Common/Streaming/AppleTV.cs similarity index 96% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Streaming/AppleTV.cs rename to src/PepperDash.Essentials.Devices.Common/Streaming/AppleTV.cs index 07df3602..33719295 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Streaming/AppleTV.cs +++ b/src/PepperDash.Essentials.Devices.Common/Streaming/AppleTV.cs @@ -1,218 +1,220 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharp.Reflection; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; -using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; -using PepperDash.Essentials.Core.Bridges; -using PepperDash.Essentials.Core.Routing; - -namespace PepperDash.Essentials.Devices.Common -{ - [Description("Wrapper class for an IR-Controlled AppleTV")] - public class AppleTV : EssentialsBridgeableDevice, IDPad, ITransport, IUiDisplayInfo, IRoutingOutputs - { - public IrOutputPortController IrPort { get; private set; } - public const string StandardDriverName = "Apple_AppleTV_4th_Gen_Essentials.ir"; - public uint DisplayUiType { get { return DisplayUiConstants.TypeAppleTv; } } - - public AppleTV(string key, string name, IrOutputPortController portCont) - : base(key, name) - { - IrPort = portCont; - DeviceManager.AddDevice(portCont); - - HdmiOut = new RoutingOutputPort(RoutingPortNames.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, null, this); - AnyAudioOut = new RoutingOutputPort(RoutingPortNames.AnyAudioOut, eRoutingSignalType.Audio, - eRoutingPortConnectionType.DigitalAudio, null, this); - OutputPorts = new RoutingPortCollection { HdmiOut, AnyAudioOut }; - - PrintExpectedIrCommands(); - } - - public void PrintExpectedIrCommands() - { - var cmds = typeof (AppleTvIrCommands).GetCType().GetFields(BindingFlags.Public | BindingFlags.Static); - - foreach (var value in cmds.Select(cmd => cmd.GetValue(null)).OfType()) - { - Debug.Console(2, this, "Expected IR Function Name: {0}", value); - } - } - - #region IDPad Members - - public void Up(bool pressRelease) - { - IrPort.PressRelease(AppleTvIrCommands.Up, pressRelease); - } - - public void Down(bool pressRelease) - { - IrPort.PressRelease(AppleTvIrCommands.Down, pressRelease); - } - - public void Left(bool pressRelease) - { - IrPort.PressRelease(AppleTvIrCommands.Left, pressRelease); - } - - public void Right(bool pressRelease) - { - IrPort.PressRelease(AppleTvIrCommands.Right, pressRelease); - } - - public void Select(bool pressRelease) - { - IrPort.PressRelease(AppleTvIrCommands.Enter, pressRelease); - } - - public void Menu(bool pressRelease) - { - IrPort.PressRelease(AppleTvIrCommands.Menu, pressRelease); - } - - public void Exit(bool pressRelease) - { - - } - - #endregion - - #region ITransport Members - - public void Play(bool pressRelease) - { - IrPort.PressRelease(AppleTvIrCommands.PlayPause, pressRelease); - } - - public void Pause(bool pressRelease) - { - IrPort.PressRelease(AppleTvIrCommands.PlayPause, pressRelease); - } - - /// - /// Not implemented - /// - /// - public void Rewind(bool pressRelease) - { - } - - /// - /// Not implemented - /// - /// - public void FFwd(bool pressRelease) - { - } - - /// - /// Not implemented - /// - /// - public void ChapMinus(bool pressRelease) - { - } - - /// - /// Not implemented - /// - /// - public void ChapPlus(bool pressRelease) - { - } - - /// - /// Not implemented - /// - /// - public void Stop(bool pressRelease) - { - } - - /// - /// Not implemented - /// - /// - public void Record(bool pressRelease) - { - } - - #endregion - - #region IRoutingOutputs Members - - public RoutingOutputPort HdmiOut { get; private set; } - public RoutingOutputPort AnyAudioOut { get; private set; } - public RoutingPortCollection OutputPorts { get; private set; } - - #endregion - - public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - var joinMap = new AppleTvJoinMap(joinStart); - - var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); - - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - if (bridge != null) - { - bridge.AddJoinMap(Key, joinMap); - } - else - { - Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); - } - - Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); - Debug.Console(0, "Linking to Bridge Type {0}", GetType().Name); - - trilist.SetBoolSigAction(joinMap.UpArrow.JoinNumber, Up); - trilist.SetBoolSigAction(joinMap.DnArrow.JoinNumber, Down); - trilist.SetBoolSigAction(joinMap.LeftArrow.JoinNumber, Left); - trilist.SetBoolSigAction(joinMap.RightArrow.JoinNumber, Right); - trilist.SetBoolSigAction(joinMap.Select.JoinNumber, Select); - trilist.SetBoolSigAction(joinMap.Menu.JoinNumber, Menu); - trilist.SetBoolSigAction(joinMap.PlayPause.JoinNumber, Play); - } - } - - public class AppleTVFactory : EssentialsDeviceFactory - { - public AppleTVFactory() - { - TypeNames = new List() { "appletv" }; - } - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - Debug.Console(1, "Factory Attempting to create new AppleTV Device"); - var irCont = IRPortHelper.GetIrOutputPortController(dc); - return new AppleTV(dc.Key, dc.Name, irCont); - } - } - - public static class AppleTvIrCommands - { - - public static string Up = "+"; - public static string Down = "-"; - public static string Left = IROutputStandardCommands.IROut_TRACK_MINUS; - public static string Right = IROutputStandardCommands.IROut_TRACK_PLUS; - public static string Enter = IROutputStandardCommands.IROut_ENTER; - public static string PlayPause = "PLAY/PAUSE"; - public static string Rewind = "REWIND"; - public static string Menu = "Menu"; - public static string FastForward = "FASTFORWARD"; - } +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharp.Reflection; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DeviceSupport; +using Full.Newtonsoft.Json; +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Routing; + +namespace PepperDash.Essentials.Devices.Common +{ + [Description("Wrapper class for an IR-Controlled AppleTV")] + public class AppleTV : EssentialsBridgeableDevice, IDPad, ITransport, IUiDisplayInfo, IRoutingOutputs + { + public IrOutputPortController IrPort { get; private set; } + public const string StandardDriverName = "Apple_AppleTV_4th_Gen_Essentials.ir"; + public uint DisplayUiType { get { return DisplayUiConstants.TypeAppleTv; } } + + public AppleTV(string key, string name, IrOutputPortController portCont) + : base(key, name) + { + IrPort = portCont; + DeviceManager.AddDevice(portCont); + + HdmiOut = new RoutingOutputPort(RoutingPortNames.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, null, this); + AnyAudioOut = new RoutingOutputPort(RoutingPortNames.AnyAudioOut, eRoutingSignalType.Audio, + eRoutingPortConnectionType.DigitalAudio, null, this); + OutputPorts = new RoutingPortCollection { HdmiOut, AnyAudioOut }; + + PrintExpectedIrCommands(); + } + + public void PrintExpectedIrCommands() + { + var cmds = typeof (AppleTvIrCommands).GetCType().GetFields(BindingFlags.Public | BindingFlags.Static); + + foreach (var value in cmds.Select(cmd => cmd.GetValue(null)).OfType()) + { + Debug.Console(2, this, "Expected IR Function Name: {0}", value); + } + } + + #region IDPad Members + + public void Up(bool pressRelease) + { + IrPort.PressRelease(AppleTvIrCommands.Up, pressRelease); + } + + public void Down(bool pressRelease) + { + IrPort.PressRelease(AppleTvIrCommands.Down, pressRelease); + } + + public void Left(bool pressRelease) + { + IrPort.PressRelease(AppleTvIrCommands.Left, pressRelease); + } + + public void Right(bool pressRelease) + { + IrPort.PressRelease(AppleTvIrCommands.Right, pressRelease); + } + + public void Select(bool pressRelease) + { + IrPort.PressRelease(AppleTvIrCommands.Enter, pressRelease); + } + + public void Menu(bool pressRelease) + { + IrPort.PressRelease(AppleTvIrCommands.Menu, pressRelease); + } + + public void Exit(bool pressRelease) + { + + } + + #endregion + + #region ITransport Members + + public void Play(bool pressRelease) + { + IrPort.PressRelease(AppleTvIrCommands.PlayPause, pressRelease); + } + + public void Pause(bool pressRelease) + { + IrPort.PressRelease(AppleTvIrCommands.PlayPause, pressRelease); + } + + /// + /// Not implemented + /// + /// + public void Rewind(bool pressRelease) + { + } + + /// + /// Not implemented + /// + /// + public void FFwd(bool pressRelease) + { + } + + /// + /// Not implemented + /// + /// + public void ChapMinus(bool pressRelease) + { + } + + /// + /// Not implemented + /// + /// + public void ChapPlus(bool pressRelease) + { + } + + /// + /// Not implemented + /// + /// + public void Stop(bool pressRelease) + { + } + + /// + /// Not implemented + /// + /// + public void Record(bool pressRelease) + { + } + + #endregion + + #region IRoutingOutputs Members + + public RoutingOutputPort HdmiOut { get; private set; } + public RoutingOutputPort AnyAudioOut { get; private set; } + public RoutingPortCollection OutputPorts { get; private set; } + + #endregion + + public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + var joinMap = new AppleTvJoinMap(joinStart); + + var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); + + if (bridge != null) + { + bridge.AddJoinMap(Key, joinMap); + } + else + { + Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device."); + } + + Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); + Debug.Console(0, "Linking to Bridge Type {0}", GetType().Name); + + trilist.SetBoolSigAction(joinMap.UpArrow.JoinNumber, Up); + trilist.SetBoolSigAction(joinMap.DnArrow.JoinNumber, Down); + trilist.SetBoolSigAction(joinMap.LeftArrow.JoinNumber, Left); + trilist.SetBoolSigAction(joinMap.RightArrow.JoinNumber, Right); + trilist.SetBoolSigAction(joinMap.Select.JoinNumber, Select); + trilist.SetBoolSigAction(joinMap.Menu.JoinNumber, Menu); + trilist.SetBoolSigAction(joinMap.PlayPause.JoinNumber, Play); + } + } + + public class AppleTVFactory : EssentialsDeviceFactory + { + public AppleTVFactory() + { + TypeNames = new List() { "appletv" }; + } + + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + Debug.Console(1, "Factory Attempting to create new AppleTV Device"); + var irCont = IRPortHelper.GetIrOutputPortController(dc); + return new AppleTV(dc.Key, dc.Name, irCont); + } + } + + public static class AppleTvIrCommands + { + + public static string Up = "+"; + public static string Down = "-"; + public static string Left = IROutputStandardCommands.IROut_TRACK_MINUS; + public static string Right = IROutputStandardCommands.IROut_TRACK_PLUS; + public static string Enter = IROutputStandardCommands.IROut_ENTER; + public static string PlayPause = "PLAY/PAUSE"; + public static string Rewind = "REWIND"; + public static string Menu = "Menu"; + public static string FastForward = "FASTFORWARD"; + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Streaming/Roku.cs b/src/PepperDash.Essentials.Devices.Common/Streaming/Roku.cs similarity index 99% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/Streaming/Roku.cs rename to src/PepperDash.Essentials.Devices.Common/Streaming/Roku.cs index de848406..4e053b78 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Streaming/Roku.cs +++ b/src/PepperDash.Essentials.Devices.Common/Streaming/Roku.cs @@ -12,7 +12,7 @@ using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.Routing; namespace PepperDash.Essentials.Devices.Common -{ +{ [Description("Wrapper class for an IR-Controlled Roku")] public class Roku2 : EssentialsDevice, IDPad, ITransport, IUiDisplayInfo, IRoutingOutputs { diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/BookingsDataClasses.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/BookingsDataClasses.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/BookingsDataClasses.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/BookingsDataClasses.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CallHistoryDataClasses.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/CallHistoryDataClasses.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CallHistoryDataClasses.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/CallHistoryDataClasses.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoCamera.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/CiscoCamera.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoCamera.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/CiscoCamera.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoCodecJoinMap.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/CiscoCodecJoinMap.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoCodecJoinMap.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/CiscoCodecJoinMap.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs similarity index 99% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs index 7dcf40bb..1eccf076 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -6,8 +8,8 @@ using System.Text.RegularExpressions; using Crestron.SimplSharp; using Crestron.SimplSharpPro.CrestronThread; using Crestron.SimplSharpPro.DeviceSupport; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; using PepperDash.Core; using PepperDash.Essentials.Core; diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodecPropertiesConfig.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/CiscoSparkCodecPropertiesConfig.cs similarity index 95% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodecPropertiesConfig.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/CiscoSparkCodecPropertiesConfig.cs index 7f36b0bf..38b81654 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodecPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/CiscoSparkCodecPropertiesConfig.cs @@ -1,89 +1,91 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -using PepperDash.Core; -using PepperDash.Essentials.Core; - -using Newtonsoft.Json; - -namespace PepperDash.Essentials.Devices.Common.Codec -{ - public class CiscoSparkCodecPropertiesConfig - { - [JsonProperty("communicationMonitorProperties")] - public CommunicationMonitorConfig CommunicationMonitorProperties { get; set; } - - [JsonProperty("favorites")] - public List Favorites { get; set; } - - /// - /// Valid values: "Local" or "Corporate" - /// - [JsonProperty("phonebookMode")] - public string PhonebookMode { get; set; } - - [JsonProperty("showSelfViewByDefault")] - public bool ShowSelfViewByDefault { get; set; } - - [JsonProperty("sharing")] - public SharingProperties Sharing { get; set; } - - /// - /// Enables external source switching capability - /// - [JsonProperty("externalSourceListEnabled")] - public bool ExternalSourceListEnabled { get; set; } - - /// - /// The name of the routing input port on the codec to which the external switch is connected - /// - [JsonProperty("externalSourceInputPort")] - public string ExternalSourceInputPort { get; set; } - - /// - /// Optionsal property to set the limit of any phonebook queries for directory or searching - /// - [JsonProperty("phonebookResultsLimit")] - public uint PhonebookResultsLimit { get; set; } - - [JsonProperty("UiBranding")] - public BrandingLogoProperties UiBranding { get; set; } - - [JsonProperty("cameraInfo")] - public List CameraInfo { get; set; } - - - public CiscoSparkCodecPropertiesConfig() - { - CameraInfo = new List(); - } - } - - public class SharingProperties - { - [JsonProperty("autoShareContentWhileInCall")] - public bool AutoShareContentWhileInCall { get; set; } - } - - public class BrandingLogoProperties - { - [JsonProperty("enable")] - public bool Enable { get; set; } - - [JsonProperty("brandingUrl")] - public string BrandingUrl { get; set; } - } - - /// - /// Describes configuration information for the near end cameras - /// - public class CameraInfo - { - public int CameraNumber { get; set; } - public string Name { get; set; } - public int SourceId { get; set; } - } +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +using PepperDash.Core; +using PepperDash.Essentials.Core; + +using Full.Newtonsoft.Json; + +namespace PepperDash.Essentials.Devices.Common.Codec +{ + public class CiscoSparkCodecPropertiesConfig + { + [JsonProperty("communicationMonitorProperties")] + public CommunicationMonitorConfig CommunicationMonitorProperties { get; set; } + + [JsonProperty("favorites")] + public List Favorites { get; set; } + + /// + /// Valid values: "Local" or "Corporate" + /// + [JsonProperty("phonebookMode")] + public string PhonebookMode { get; set; } + + [JsonProperty("showSelfViewByDefault")] + public bool ShowSelfViewByDefault { get; set; } + + [JsonProperty("sharing")] + public SharingProperties Sharing { get; set; } + + /// + /// Enables external source switching capability + /// + [JsonProperty("externalSourceListEnabled")] + public bool ExternalSourceListEnabled { get; set; } + + /// + /// The name of the routing input port on the codec to which the external switch is connected + /// + [JsonProperty("externalSourceInputPort")] + public string ExternalSourceInputPort { get; set; } + + /// + /// Optionsal property to set the limit of any phonebook queries for directory or searching + /// + [JsonProperty("phonebookResultsLimit")] + public uint PhonebookResultsLimit { get; set; } + + [JsonProperty("UiBranding")] + public BrandingLogoProperties UiBranding { get; set; } + + [JsonProperty("cameraInfo")] + public List CameraInfo { get; set; } + + + public CiscoSparkCodecPropertiesConfig() + { + CameraInfo = new List(); + } + } + + public class SharingProperties + { + [JsonProperty("autoShareContentWhileInCall")] + public bool AutoShareContentWhileInCall { get; set; } + } + + public class BrandingLogoProperties + { + [JsonProperty("enable")] + public bool Enable { get; set; } + + [JsonProperty("brandingUrl")] + public string BrandingUrl { get; set; } + } + + /// + /// Describes configuration information for the near end cameras + /// + public class CameraInfo + { + public int CameraNumber { get; set; } + public string Name { get; set; } + public int SourceId { get; set; } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/HttpApiServer.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/HttpApiServer.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/HttpApiServer.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/HttpApiServer.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/PhonebookDataClasses.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/PhonebookDataClasses.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/PhonebookDataClasses.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/PhonebookDataClasses.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/RoomPresets.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/RoomPresets.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/RoomPresets.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/RoomPresets.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xConfiguration.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/xConfiguration.cs similarity index 99% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xConfiguration.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/xConfiguration.cs index 05c07378..7fc983e2 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xConfiguration.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/xConfiguration.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -7,8 +9,8 @@ using Crestron.SimplSharp; using PepperDash.Core; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xEvent.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/xEvent.cs similarity index 96% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xEvent.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/xEvent.cs index 171e7bd0..a797103c 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xEvent.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/xEvent.cs @@ -1,166 +1,166 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco -{ - /// - /// This class exists to capture serialized data sent back by a Cisco codec in JSON output mode - /// - public class CiscoCodecEvents - { - public class CauseValue - { - public string id { get; set; } - public string Value { get; set; } - } - - public class CauseType - { - public string id { get; set; } - public string Value { get; set; } - } - - public class CauseString - { - public string id { get; set; } - public string Value { get; set; } - } - - public class OrigCallDirection - { - public string id { get; set; } - public string Value { get; set; } - } - - public class RemoteURI - { - public string id { get; set; } - public string Value { get; set; } - } - - public class DisplayName - { - public string id { get; set; } - public string Value { get; set; } - } - - public class CallId - { - public string id { get; set; } - public string Value { get; set; } - } - - public class CauseCode - { - public string id { get; set; } - public string Value { get; set; } - } - - public class CauseOrigin - { - public string id { get; set; } - public string Value { get; set; } - } - - public class Protocol - { - public string id { get; set; } - public string Value { get; set; } - } - - public class Duration - { - public string id { get; set; } - public string Value { get; set; } - } - - public class CallType - { - public string id { get; set; } - public string Value { get; set; } - } - - public class CallRate - { - public string id { get; set; } - public string Value { get; set; } - } - - public class Encryption - { - public string id { get; set; } - public string Value { get; set; } - } - - public class RequestedURI - { - public string id { get; set; } - public string Value { get; set; } - } - - public class PeopleCountAverage - { - public string id { get; set; } - public string Value { get; set; } - } - - public class CallDisconnect - { - public string id { get; set; } - public CauseValue CauseValue { get; set; } - public CauseType CauseType { get; set; } - public CauseString CauseString { get; set; } - public OrigCallDirection OrigCallDirection { get; set; } - public RemoteURI RemoteURI { get; set; } - public DisplayName DisplayName { get; set; } - public CallId CallId { get; set; } - public CauseCode CauseCode { get; set; } - public CauseOrigin CauseOrigin { get; set; } - public Protocol Protocol { get; set; } - public Duration Duration { get; set; } - public CallType CallType { get; set; } - public CallRate CallRate { get; set; } - public Encryption Encryption { get; set; } - public RequestedURI RequestedURI { get; set; } - public PeopleCountAverage PeopleCountAverage { get; set; } - } - public class UserInterface - { - public string id { get; set; } - public Presentation Presentation { get; set; } - } - public class Presentation - { - public string id { get; set; } - public ExternalSource ExternalSource { get; set; } - } - public class ExternalSource - { - public string id { get; set; } - public Selected Selected { get; set; } - } - public class Selected - { - public string id { get; set; } - public SourceIdentifier SourceIdentifier { get; set; } - } - public class SourceIdentifier - { - public string id { get; set; } - public string Value { get; set; } - } - public class Event - { - public CallDisconnect CallDisconnect { get; set; } - public UserInterface UserInterface { get; set; } - } - - public class RootObject - { - public Event Event { get; set; } - } - } +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco +{ + /// + /// This class exists to capture serialized data sent back by a Cisco codec in JSON output mode + /// + public class CiscoCodecEvents + { + public class CauseValue + { + public string id { get; set; } + public string Value { get; set; } + } + + public class CauseType + { + public string id { get; set; } + public string Value { get; set; } + } + + public class CauseString + { + public string id { get; set; } + public string Value { get; set; } + } + + public class OrigCallDirection + { + public string id { get; set; } + public string Value { get; set; } + } + + public class RemoteURI + { + public string id { get; set; } + public string Value { get; set; } + } + + public class DisplayName + { + public string id { get; set; } + public string Value { get; set; } + } + + public class CallId + { + public string id { get; set; } + public string Value { get; set; } + } + + public class CauseCode + { + public string id { get; set; } + public string Value { get; set; } + } + + public class CauseOrigin + { + public string id { get; set; } + public string Value { get; set; } + } + + public class Protocol + { + public string id { get; set; } + public string Value { get; set; } + } + + public class Duration + { + public string id { get; set; } + public string Value { get; set; } + } + + public class CallType + { + public string id { get; set; } + public string Value { get; set; } + } + + public class CallRate + { + public string id { get; set; } + public string Value { get; set; } + } + + public class Encryption + { + public string id { get; set; } + public string Value { get; set; } + } + + public class RequestedURI + { + public string id { get; set; } + public string Value { get; set; } + } + + public class PeopleCountAverage + { + public string id { get; set; } + public string Value { get; set; } + } + + public class CallDisconnect + { + public string id { get; set; } + public CauseValue CauseValue { get; set; } + public CauseType CauseType { get; set; } + public CauseString CauseString { get; set; } + public OrigCallDirection OrigCallDirection { get; set; } + public RemoteURI RemoteURI { get; set; } + public DisplayName DisplayName { get; set; } + public CallId CallId { get; set; } + public CauseCode CauseCode { get; set; } + public CauseOrigin CauseOrigin { get; set; } + public Protocol Protocol { get; set; } + public Duration Duration { get; set; } + public CallType CallType { get; set; } + public CallRate CallRate { get; set; } + public Encryption Encryption { get; set; } + public RequestedURI RequestedURI { get; set; } + public PeopleCountAverage PeopleCountAverage { get; set; } + } + public class UserInterface + { + public string id { get; set; } + public Presentation Presentation { get; set; } + } + public class Presentation + { + public string id { get; set; } + public ExternalSource ExternalSource { get; set; } + } + public class ExternalSource + { + public string id { get; set; } + public Selected Selected { get; set; } + } + public class Selected + { + public string id { get; set; } + public SourceIdentifier SourceIdentifier { get; set; } + } + public class SourceIdentifier + { + public string id { get; set; } + public string Value { get; set; } + } + public class Event + { + public CallDisconnect CallDisconnect { get; set; } + public UserInterface UserInterface { get; set; } + } + + public class RootObject + { + public Event Event { get; set; } + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xStatus.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/xStatus.cs similarity index 99% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xStatus.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/xStatus.cs index 2d8e903a..6b7ee2e5 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xStatus.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/xStatus.cs @@ -1,11 +1,13 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; using Crestron.SimplSharp.CrestronXml.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; using PepperDash.Core; using PepperDash.Essentials.Devices.Common.VideoCodec.CiscoCodec; diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xStatusSparkPlus.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/xStatusSparkPlus.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xStatusSparkPlus.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/xStatusSparkPlus.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ConvertiblePreset.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/ConvertiblePreset.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ConvertiblePreset.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/ConvertiblePreset.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasCodecLayouts.cs similarity index 97% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasCodecLayouts.cs index 44a482e1..d2393692 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasCodecLayouts.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -6,7 +8,7 @@ using Crestron.SimplSharp; using PepperDash.Essentials.Core; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.Devices.Common.VideoCodec { diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecSelfview.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasCodecSelfview.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecSelfview.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasCodecSelfview.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasMeetingInfo.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingInfo.cs similarity index 97% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasMeetingInfo.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingInfo.cs index 4d27535a..304400fc 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasMeetingInfo.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingInfo.cs @@ -1,10 +1,12 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces { @@ -43,8 +45,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces [JsonProperty("isLocked", NullValueHandling = NullValueHandling.Ignore)] public Boolean IsLocked { get; private set; } [JsonProperty("isRecording", NullValueHandling = NullValueHandling.Ignore)] - public Boolean IsRecording { get; private set; } - [JsonProperty("canRecord", NullValueHandling = NullValueHandling.Ignore)] + public Boolean IsRecording { get; private set; } + [JsonProperty("canRecord", NullValueHandling = NullValueHandling.Ignore)] public Boolean CanRecord { get; private set; } @@ -59,7 +61,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces IsSharingMeeting = isSharingMeeting; WaitingForHost = waitingForHost; IsLocked = isLocked; - IsRecording = isRecording; + IsRecording = isRecording; CanRecord = CanRecord; } } diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasMeetingLock.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingLock.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasMeetingLock.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingLock.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasMeetingRecording.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingRecording.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasMeetingRecording.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingRecording.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasParticipants.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasParticipants.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasParticipants.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasParticipants.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasPresentationOnlyMeeting.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasPresentationOnlyMeeting.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasPresentationOnlyMeeting.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasPresentationOnlyMeeting.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasSelfviewPosition.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasSelfviewPosition.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasSelfviewPosition.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasSelfviewPosition.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasSelfviewSize.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasSelfviewSize.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasSelfviewSize.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasSelfviewSize.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasStandbyMode.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasStandbyMode.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasStandbyMode.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasStandbyMode.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasStartMeeting.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasStartMeeting.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasStartMeeting.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasStartMeeting.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasVideoCodec.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasVideoCodec.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasVideoCodec.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasVideoCodec.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IJoinCalls.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IJoinCalls.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IJoinCalls.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IJoinCalls.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/iVideoCodecInfo.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/iVideoCodecInfo.cs similarity index 95% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/iVideoCodecInfo.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/iVideoCodecInfo.cs index 6eee454f..23c39325 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/iVideoCodecInfo.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/iVideoCodecInfo.cs @@ -1,10 +1,12 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.Devices.Common.Codec { diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockCodecDirectory.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockCodecDirectory.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockCodecDirectory.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockCodecDirectory.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVC.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVC.cs similarity index 99% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVC.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVC.cs index 1f79d936..66dc6180 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVC.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVC.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -12,8 +14,8 @@ using PepperDash.Essentials.Core.Routing; using PepperDash.Essentials.Devices.Common.Codec; using PepperDash.Essentials.Devices.Common.Cameras; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; namespace PepperDash.Essentials.Devices.Common.VideoCodec { diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVCCamera.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVCCamera.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVCCamera.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVCCamera.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVcPropertiesConfig.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVcPropertiesConfig.cs similarity index 91% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVcPropertiesConfig.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVcPropertiesConfig.cs index d294aff1..1f1b823e 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVcPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVcPropertiesConfig.cs @@ -1,9 +1,11 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; using PepperDash.Core; using PepperDash.Essentials.Core; diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/VideoCodecBase.cs similarity index 97% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/VideoCodecBase.cs index c0048a68..3dd85100 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/VideoCodecBase.cs @@ -1,2031 +1,2031 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp.CrestronIO; -using Crestron.SimplSharp.Reflection; -using Crestron.SimplSharp.Ssh; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharp; -using PepperDash.Core; -using PepperDash.Core.Intersystem; -using PepperDash.Core.Intersystem.Tokens; -using PepperDash.Core.WebApi.Presets; -using Crestron.SimplSharp.Reflection; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Bridges; -using PepperDash.Essentials.Core.Config; -using PepperDash.Essentials.Core.Devices; -using PepperDash.Essentials.Core.DeviceTypeInterfaces; -using PepperDash.Essentials.Core.Routing; -using PepperDash.Essentials.Devices.Common.Cameras; -using PepperDash.Essentials.Devices.Common.Codec; -using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces; -using PepperDash.Essentials.Core.Bridges.JoinMaps; -using Feedback = PepperDash.Essentials.Core.Feedback; - -namespace PepperDash.Essentials.Devices.Common.VideoCodec -{ - public abstract class VideoCodecBase : ReconfigurableDevice, IRoutingInputsOutputs, - IUsageTracking, IHasDialer, IHasContentSharing, ICodecAudio, iVideoCodecInfo, IBridgeAdvanced, IHasStandbyMode - { - private const int XSigEncoding = 28591; - protected const int MaxParticipants = 50; - private readonly byte[] _clearBytes = XSigHelpers.ClearOutputs(); - - private IHasDirectory _directoryCodec; - private BasicTriList _directoryTrilist; - private VideoCodecControllerJoinMap _directoryJoinmap; - - protected string _timeFormatSpecifier; - protected string _dateFormatSpecifier; - - - protected VideoCodecBase(DeviceConfig config) - : base(config) - { - - StandbyIsOnFeedback = new BoolFeedback(StandbyIsOnFeedbackFunc); - PrivacyModeIsOnFeedback = new BoolFeedback(PrivacyModeIsOnFeedbackFunc); - VolumeLevelFeedback = new IntFeedback(VolumeLevelFeedbackFunc); - MuteFeedback = new BoolFeedback(MuteFeedbackFunc); - SharingSourceFeedback = new StringFeedback(SharingSourceFeedbackFunc); - SharingContentIsOnFeedback = new BoolFeedback(SharingContentIsOnFeedbackFunc); - - // TODO [ ] hotfix/videocodecbase-max-meeting-xsig-set - MeetingsToDisplayFeedback = new IntFeedback(() => MeetingsToDisplay); - - InputPorts = new RoutingPortCollection(); - OutputPorts = new RoutingPortCollection(); - - ActiveCalls = new List(); - } - - public IBasicCommunication Communication { get; protected set; } - - /// - /// An internal pseudo-source that is routable and connected to the osd input - /// - public DummyRoutingInputsDevice OsdSource { get; protected set; } - - public BoolFeedback StandbyIsOnFeedback { get; private set; } - - protected abstract Func PrivacyModeIsOnFeedbackFunc { get; } - protected abstract Func VolumeLevelFeedbackFunc { get; } - protected abstract Func MuteFeedbackFunc { get; } - protected abstract Func StandbyIsOnFeedbackFunc { get; } - - public List ActiveCalls { get; set; } - - public bool ShowSelfViewByDefault { get; protected set; } - - public bool SupportsCameraOff { get; protected set; } - public bool SupportsCameraAutoMode { get; protected set; } - - public bool IsReady { get; protected set; } - - public virtual List Feedbacks - { - get - { - return new List - { - PrivacyModeIsOnFeedback, - SharingSourceFeedback - }; - } - } - - protected abstract Func SharingSourceFeedbackFunc { get; } - protected abstract Func SharingContentIsOnFeedbackFunc { get; } - - #region ICodecAudio Members - - public abstract void PrivacyModeOn(); - public abstract void PrivacyModeOff(); - public abstract void PrivacyModeToggle(); - public BoolFeedback PrivacyModeIsOnFeedback { get; private set; } - - - public BoolFeedback MuteFeedback { get; private set; } - - public abstract void MuteOff(); - - public abstract void MuteOn(); - - public abstract void SetVolume(ushort level); - - public IntFeedback VolumeLevelFeedback { get; private set; } - - public abstract void MuteToggle(); - - public abstract void VolumeDown(bool pressRelease); - - - public abstract void VolumeUp(bool pressRelease); - - #endregion - - #region IHasContentSharing Members - - public abstract void StartSharing(); - public abstract void StopSharing(); - - public bool AutoShareContentWhileInCall { get; protected set; } - - public StringFeedback SharingSourceFeedback { get; private set; } - public BoolFeedback SharingContentIsOnFeedback { get; private set; } - - #endregion - - #region IHasDialer Members - - /// - /// Fires when the status of any active, dialing, or incoming call changes or is new - /// - public event EventHandler CallStatusChange; - - /// - /// Returns true when any call is not in state Unknown, Disconnecting, Disconnected - /// - public bool IsInCall - { - get - { - var value = ActiveCalls != null && ActiveCalls.Any(c => c.IsActiveCall); - return value; - } - } - - public abstract void Dial(string number); - public abstract void EndCall(CodecActiveCallItem call); - public abstract void EndAllCalls(); - public abstract void AcceptCall(CodecActiveCallItem call); - public abstract void RejectCall(CodecActiveCallItem call); - public abstract void SendDtmf(string s); - public virtual void SendDtmf(string s, CodecActiveCallItem call) { } - - #endregion - - #region IRoutingInputsOutputs Members - - public RoutingPortCollection InputPorts { get; private set; } - - public RoutingPortCollection OutputPorts { get; private set; } - - #endregion - - #region IUsageTracking Members - - /// - /// This object can be added by outside users of this class to provide usage tracking - /// for various services - /// - public UsageTracking UsageTracker { get; set; } - - #endregion - - #region iVideoCodecInfo Members - - public VideoCodecInfo CodecInfo { get; protected set; } - - #endregion - - public event EventHandler IsReadyChange; - public abstract void Dial(Meeting meeting); - - public virtual void Dial(IInvitableContact contact) - { - } - - public abstract void ExecuteSwitch(object selector); - - /// - /// Helper method to fire CallStatusChange event with old and new status - /// - protected void SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus newStatus, CodecActiveCallItem call) - { - call.Status = newStatus; - - OnCallStatusChange(call); - } - - /// - /// - /// - /// - /// - /// - protected virtual void OnCallStatusChange(CodecActiveCallItem item) - { - var handler = CallStatusChange; - if (handler != null) - { - handler(this, new CodecCallStatusItemChangeEventArgs(item)); - } - - PrivacyModeIsOnFeedback.FireUpdate(); - - if (AutoShareContentWhileInCall) - { - StartSharing(); - } - - if (UsageTracker != null) - { - if (IsInCall && !UsageTracker.UsageTrackingStarted) - { - UsageTracker.StartDeviceUsage(); - } - else if (UsageTracker.UsageTrackingStarted && !IsInCall) - { - UsageTracker.EndDeviceUsage(); - } - } - } - - /// - /// Sets IsReady property and fires the event. Used for dependent classes to sync up their data. - /// - protected void SetIsReady() - { - CrestronInvoke.BeginInvoke((o) => - { - try - { - IsReady = true; - var h = IsReadyChange; - if (h != null) - { - h(this, new EventArgs()); - } - } - catch (Exception e) - { - Debug.Console(2, this, "Error in SetIsReady() : {0}", e); - } - }); - } - - // **** DEBUGGING THINGS **** - /// - /// - /// - public virtual void ListCalls() - { - Debug.Console(1, this, "Active Calls:"); - - var sb = new StringBuilder(); - foreach (var c in ActiveCalls) - { - sb.AppendFormat("id: {0} number: {1} -- name: {2} status: {3} onHold: {4}\r\n", c.Id, c.Number, c.Name, c.Status, c.IsOnHold); - } - Debug.Console(1, this, "\n{0}\n", sb.ToString()); - } - - public abstract void StandbyActivate(); - - public abstract void StandbyDeactivate(); - - #region Implementation of IBridgeAdvanced - - public abstract void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge); - - /// - /// Use this method when using a plain VideoCodecControllerJoinMap - /// - /// - /// - /// - /// - /// - protected void LinkVideoCodecToApi(VideoCodecBase codec, BasicTriList trilist, uint joinStart, string joinMapKey, - EiscApiAdvanced bridge) - { - var joinMap = new VideoCodecControllerJoinMap(joinStart); - - var customJoins = JoinMapHelper.TryGetJoinMapAdvancedForDevice(joinMapKey); - - if (customJoins != null) - { - joinMap.SetCustomJoinData(customJoins); - } - - if (bridge != null) - { - bridge.AddJoinMap(Key, joinMap); - } - - LinkVideoCodecToApi(codec, trilist, joinMap); - - trilist.OnlineStatusChange += (device, args) => - { - if (!args.DeviceOnLine) return; - }; - } - - /// - /// Use this method when you need to pass in a join map that extends VideoCodecControllerJoinMap - /// - /// - /// - /// - protected void LinkVideoCodecToApi(VideoCodecBase codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) - { - Debug.Console(1, this, "Linking to Trilist {0}", trilist.ID.ToString("X")); - - LinkVideoCodecDtmfToApi(trilist, joinMap); - - LinkVideoCodecCallControlsToApi(trilist, joinMap); - - LinkVideoCodecContentSharingToApi(trilist, joinMap); - - LinkVideoCodecPrivacyToApi(trilist, joinMap); - - LinkVideoCodecVolumeToApi(trilist, joinMap); - - LinkVideoCodecInfoToApi(trilist, joinMap); - - // Register for this event to link any functions that require the codec to be ready first - codec.IsReadyChange += (o, a) => - { - if (codec is IHasCodecCameras) - { - LinkVideoCodecCameraToApi(codec as IHasCodecCameras, trilist, joinMap); - } - }; - - if (codec is ICommunicationMonitor) - { - LinkVideoCodecCommMonitorToApi(codec as ICommunicationMonitor, trilist, joinMap); - } - - - if (codec is IHasCodecSelfView) - { - LinkVideoCodecSelfviewToApi(codec as IHasCodecSelfView, trilist, joinMap); - } - - if (codec is IHasCameraAutoMode) - { - trilist.SetBool(joinMap.CameraSupportsAutoMode.JoinNumber, SupportsCameraAutoMode); - LinkVideoCodecCameraModeToApi(codec as IHasCameraAutoMode, trilist, joinMap); - } - - if (codec is IHasCameraOff) - { - trilist.SetBool(joinMap.CameraSupportsOffMode.JoinNumber, SupportsCameraOff); - LinkVideoCodecCameraOffToApi(codec as IHasCameraOff, trilist, joinMap); - } - - if (codec is IHasCodecLayouts) - { - LinkVideoCodecCameraLayoutsToApi(codec as IHasCodecLayouts, trilist, joinMap); - } - - - if (codec is IHasSelfviewPosition) - { - LinkVideoCodecSelfviewPositionToApi(codec as IHasSelfviewPosition, trilist, joinMap); - } - - if (codec is IHasDirectory) - { - LinkVideoCodecDirectoryToApi(codec as IHasDirectory, trilist, joinMap); - } - - if (codec is IHasScheduleAwareness) - { - LinkVideoCodecScheduleToApi(codec as IHasScheduleAwareness, trilist, joinMap); - } - - if (codec is IHasParticipants) - { - LinkVideoCodecParticipantsToApi(codec as IHasParticipants, trilist, joinMap); - } - - if (codec is IHasFarEndContentStatus) - { - (codec as IHasFarEndContentStatus).ReceivingContent.LinkInputSig(trilist.BooleanInput[joinMap.RecievingContent.JoinNumber]); - } - - if (codec is IHasPhoneDialing) - { - LinkVideoCodecPhoneToApi(codec as IHasPhoneDialing, trilist, joinMap); - } - - if (codec is IHasCallHistory) - { - LinkVideoCodecCallHistoryToApi(codec as IHasCallHistory, trilist, joinMap); - } - - trilist.OnlineStatusChange += (device, args) => - { - if (!args.DeviceOnLine) return; - - if (codec is IHasDirectory) - { - (codec as IHasDirectory).SetCurrentDirectoryToRoot(); - } - - if (codec is IHasScheduleAwareness) - { - (codec as IHasScheduleAwareness).GetSchedule(); - } - - if (codec is IHasParticipants) - { - UpdateParticipantsXSig((codec as IHasParticipants).Participants.CurrentParticipants); - } - - if (codec is IHasCameraAutoMode) - { - trilist.SetBool(joinMap.CameraSupportsAutoMode.JoinNumber, SupportsCameraAutoMode); - - (codec as IHasCameraAutoMode).CameraAutoModeIsOnFeedback.FireUpdate(); - } - - if (codec is IHasCodecSelfView) - { - (codec as IHasCodecSelfView).SelfviewIsOnFeedback.FireUpdate(); - } - - if (codec is IHasCameraAutoMode) - { - (codec as IHasCameraAutoMode).CameraAutoModeIsOnFeedback.FireUpdate(); - } - - if (codec is IHasCameraOff) - { - (codec as IHasCameraOff).CameraIsOffFeedback.FireUpdate(); - } - - if (codec is IHasPhoneDialing) - { - (codec as IHasPhoneDialing).PhoneOffHookFeedback.FireUpdate(); - } - - if (codec is IHasCallHistory) - { - UpdateCallHistory((codec as IHasCallHistory), trilist, joinMap); - } - - SharingContentIsOnFeedback.FireUpdate(); - }; - } - - private void LinkVideoCodecInfoToApi(BasicTriList trilist, VideoCodecControllerJoinMap joinMap) - { - trilist.SetBool(joinMap.MultiSiteOptionIsEnabled.JoinNumber, this.CodecInfo.MultiSiteOptionIsEnabled); - trilist.SetBool(joinMap.AutoAnswerEnabled.JoinNumber, this.CodecInfo.AutoAnswerEnabled); - trilist.SetString(joinMap.DeviceIpAddresss.JoinNumber, this.CodecInfo.IpAddress); - trilist.SetString(joinMap.SipPhoneNumber.JoinNumber, this.CodecInfo.SipPhoneNumber); - trilist.SetString(joinMap.E164Alias.JoinNumber, this.CodecInfo.E164Alias); - trilist.SetString(joinMap.H323Id.JoinNumber, this.CodecInfo.H323Id); - trilist.SetString(joinMap.SipUri.JoinNumber, this.CodecInfo.SipUri); - - trilist.OnlineStatusChange += (o, a) => - { - if (a.DeviceOnLine) - { - trilist.SetBool(joinMap.MultiSiteOptionIsEnabled.JoinNumber, this.CodecInfo.MultiSiteOptionIsEnabled); - trilist.SetBool(joinMap.AutoAnswerEnabled.JoinNumber, this.CodecInfo.AutoAnswerEnabled); - trilist.SetString(joinMap.DeviceIpAddresss.JoinNumber, this.CodecInfo.IpAddress); - trilist.SetString(joinMap.SipPhoneNumber.JoinNumber, this.CodecInfo.SipPhoneNumber); - trilist.SetString(joinMap.E164Alias.JoinNumber, this.CodecInfo.E164Alias); - trilist.SetString(joinMap.H323Id.JoinNumber, this.CodecInfo.H323Id); - trilist.SetString(joinMap.SipUri.JoinNumber, this.CodecInfo.SipUri); - } - }; - } - - private void LinkVideoCodecPhoneToApi(IHasPhoneDialing codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) - { - codec.PhoneOffHookFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PhoneHookState.JoinNumber]); - - trilist.SetSigFalseAction(joinMap.DialPhone.JoinNumber, - () => codec.DialPhoneCall(trilist.StringOutput[joinMap.PhoneDialString.JoinNumber].StringValue)); - - trilist.SetSigFalseAction(joinMap.HangUpPhone.JoinNumber, codec.EndPhoneCall); - } - - private void LinkVideoCodecSelfviewPositionToApi(IHasSelfviewPosition codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) - { - trilist.SetSigFalseAction(joinMap.SelfviewPosition.JoinNumber, codec.SelfviewPipPositionToggle); - - codec.SelfviewPipPositionFeedback.LinkInputSig(trilist.StringInput[joinMap.SelfviewPositionFb.JoinNumber]); - } - - private void LinkVideoCodecCameraOffToApi(IHasCameraOff codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) - { - trilist.SetSigFalseAction(joinMap.CameraModeOff.JoinNumber, codec.CameraOff); - - codec.CameraIsOffFeedback.OutputChange += (o, a) => - { - if (a.BoolValue) - { - trilist.SetBool(joinMap.CameraModeOff.JoinNumber, true); - trilist.SetBool(joinMap.CameraModeManual.JoinNumber, false); - trilist.SetBool(joinMap.CameraModeAuto.JoinNumber, false); - return; - } - - trilist.SetBool(joinMap.CameraModeOff.JoinNumber, false); - - var autoCodec = codec as IHasCameraAutoMode; - - if (autoCodec == null) return; - - trilist.SetBool(joinMap.CameraModeAuto.JoinNumber, autoCodec.CameraAutoModeIsOnFeedback.BoolValue); - trilist.SetBool(joinMap.CameraModeManual.JoinNumber, !autoCodec.CameraAutoModeIsOnFeedback.BoolValue); - }; - - if (codec.CameraIsOffFeedback.BoolValue) - { - trilist.SetBool(joinMap.CameraModeOff.JoinNumber, true); - trilist.SetBool(joinMap.CameraModeManual.JoinNumber, false); - trilist.SetBool(joinMap.CameraModeAuto.JoinNumber, false); - return; - } - - trilist.SetBool(joinMap.CameraModeOff.JoinNumber, false); - - var autoModeCodec = codec as IHasCameraAutoMode; - - if (autoModeCodec == null) return; - - trilist.SetBool(joinMap.CameraModeAuto.JoinNumber, autoModeCodec.CameraAutoModeIsOnFeedback.BoolValue); - trilist.SetBool(joinMap.CameraModeManual.JoinNumber, !autoModeCodec.CameraAutoModeIsOnFeedback.BoolValue); - } - - private void LinkVideoCodecVolumeToApi(BasicTriList trilist, VideoCodecControllerJoinMap joinMap) - { - MuteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VolumeMuteOn.JoinNumber]); - MuteFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.VolumeMuteOff.JoinNumber]); - - trilist.SetSigFalseAction(joinMap.VolumeMuteOn.JoinNumber, MuteOn); - trilist.SetSigFalseAction(joinMap.VolumeMuteOff.JoinNumber, MuteOff); - trilist.SetSigFalseAction(joinMap.VolumeMuteToggle.JoinNumber, MuteToggle); - - VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[joinMap.VolumeLevel.JoinNumber]); - - trilist.SetBoolSigAction(joinMap.VolumeUp.JoinNumber, VolumeUp); - trilist.SetBoolSigAction(joinMap.VolumeDown.JoinNumber, VolumeDown); - - trilist.SetUShortSigAction(joinMap.VolumeLevel.JoinNumber, SetVolume); - - } - - private void LinkVideoCodecPrivacyToApi(BasicTriList trilist, VideoCodecControllerJoinMap joinMap) - { - PrivacyModeIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.MicMuteOn.JoinNumber]); - PrivacyModeIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.MicMuteOff.JoinNumber]); - - trilist.SetSigFalseAction(joinMap.MicMuteOn.JoinNumber, PrivacyModeOn); - trilist.SetSigFalseAction(joinMap.MicMuteOff.JoinNumber, PrivacyModeOff); - trilist.SetSigFalseAction(joinMap.MicMuteToggle.JoinNumber, PrivacyModeToggle); - } - - private void LinkVideoCodecCommMonitorToApi(ICommunicationMonitor codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) - { - codec.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); - } - - private void LinkVideoCodecParticipantsToApi(IHasParticipants codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) - { - // make sure to update the values when the EISC comes online - trilist.OnlineStatusChange += (sender, args) => - { - if (sender.IsOnline) - { - UpdateParticipantsXSig(codec, trilist, joinMap); - } - }; - - // set actions and update the values when the list changes - codec.Participants.ParticipantsListHasChanged += (sender, args) => - { - SetParticipantActions(trilist, joinMap, codec.Participants.CurrentParticipants); - - UpdateParticipantsXSig(codec, trilist, joinMap); - }; - - trilist.OnlineStatusChange += (device, args) => - { - if (!args.DeviceOnLine) return; - - // TODO [ ] Issue #868 - trilist.SetString(joinMap.CurrentParticipants.JoinNumber, "\xFC"); - UpdateParticipantsXSig(codec, trilist, joinMap); - }; - } - - private void UpdateParticipantsXSig(IHasParticipants codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) - { - string participantsXSig; - - if (codec.Participants.CurrentParticipants.Count == 0) - { - participantsXSig = Encoding.GetEncoding(XSigEncoding).GetString(_clearBytes, 0, _clearBytes.Length); - trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig); - trilist.SetUshort(joinMap.ParticipantCount.JoinNumber, (ushort)codec.Participants.CurrentParticipants.Count); - return; - } - - participantsXSig = UpdateParticipantsXSig(codec.Participants.CurrentParticipants); - - trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig); - - trilist.SetUshort(joinMap.ParticipantCount.JoinNumber, (ushort)codec.Participants.CurrentParticipants.Count); - } - - /// - /// Sets the actions for each participant in the list - /// - private void SetParticipantActions(BasicTriList trilist, VideoCodecControllerJoinMap joinMap, List currentParticipants) - { - uint index = 0; // track the index of the participant in the - - foreach (var participant in currentParticipants) - { - var p = participant; - if (index > MaxParticipants) break; - - var audioMuteCodec = this as IHasParticipantAudioMute; - if (audioMuteCodec != null) - { - trilist.SetSigFalseAction(joinMap.ParticipantAudioMuteToggleStart.JoinNumber + index, - () => audioMuteCodec.ToggleAudioForParticipant(p.UserId)); - - trilist.SetSigFalseAction(joinMap.ParticipantVideoMuteToggleStart.JoinNumber + index, - () => audioMuteCodec.ToggleVideoForParticipant(p.UserId)); - } - - var pinCodec = this as IHasParticipantPinUnpin; - if (pinCodec != null) - { - trilist.SetSigFalseAction(joinMap.ParticipantPinToggleStart.JoinNumber + index, - () => pinCodec.ToggleParticipantPinState(p.UserId, pinCodec.ScreenIndexToPinUserTo)); - } - - index++; - } - - // Clear out any previously set actions - while (index < MaxParticipants) - { - trilist.ClearBoolSigAction(joinMap.ParticipantAudioMuteToggleStart.JoinNumber + index); - trilist.ClearBoolSigAction(joinMap.ParticipantVideoMuteToggleStart.JoinNumber + index); - trilist.ClearBoolSigAction(joinMap.ParticipantPinToggleStart.JoinNumber + index); - - index++; - } - } - - private string UpdateParticipantsXSig(List currentParticipants) - { - const int maxParticipants = MaxParticipants; - const int maxDigitals = 7; - const int maxStrings = 1; - const int maxAnalogs = 1; - const int offset = maxDigitals + maxStrings + maxAnalogs; // 9 - var digitalIndex = (maxStrings + maxAnalogs) * maxParticipants; // 100 - var stringIndex = 0; - var analogIndex = stringIndex + maxParticipants; - var meetingIndex = 0; - - var tokenArray = new XSigToken[maxParticipants * offset]; - - foreach (var participant in currentParticipants) - { - if (meetingIndex >= maxParticipants * offset) break; - - // Debug.Console(2, this, - //@"Updating Participant on xsig: - //Name: {0} (s{9}) - //AudioMute: {1} (d{10}) - //VideoMute: {2} (d{11}) - //CanMuteVideo: {3} (d{12}) - //CanUMuteVideo: {4} (d{13}) - //IsHost: {5} (d{14}) - //HandIsRaised: {6} (d{15}) - //IsPinned: {7} (d{16}) - //ScreenIndexIsPinnedTo: {8} (a{17}) - //", - // participant.Name, - // participant.AudioMuteFb, - // participant.VideoMuteFb, - // participant.CanMuteVideo, - // participant.CanUnmuteVideo, - // participant.IsHost, - // participant.HandIsRaisedFb, - // participant.IsPinnedFb, - // participant.ScreenIndexIsPinnedToFb, - // stringIndex + 1, - // digitalIndex + 1, - // digitalIndex + 2, - // digitalIndex + 3, - // digitalIndex + 4, - // digitalIndex + 5, - // digitalIndex + 6, - // digitalIndex + 7, - // analogIndex + 1 - // ); - - - //digitals - tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, participant.AudioMuteFb); - tokenArray[digitalIndex + 1] = new XSigDigitalToken(digitalIndex + 2, participant.VideoMuteFb); - tokenArray[digitalIndex + 2] = new XSigDigitalToken(digitalIndex + 3, participant.CanMuteVideo); - tokenArray[digitalIndex + 3] = new XSigDigitalToken(digitalIndex + 4, participant.CanUnmuteVideo); - tokenArray[digitalIndex + 4] = new XSigDigitalToken(digitalIndex + 5, participant.IsHost); - tokenArray[digitalIndex + 5] = new XSigDigitalToken(digitalIndex + 6, participant.HandIsRaisedFb); - tokenArray[digitalIndex + 6] = new XSigDigitalToken(digitalIndex + 7, participant.IsPinnedFb); - - Debug.Console(2, this, "Index: {0} byte value: {1}", digitalIndex + 7, ComTextHelper.GetEscapedText(tokenArray[digitalIndex + 6].GetBytes())); - - //serials - tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, participant.Name); - - //analogs - tokenArray[analogIndex] = new XSigAnalogToken(analogIndex + 1, (ushort)participant.ScreenIndexIsPinnedToFb); - - digitalIndex += maxDigitals; - meetingIndex += offset; - stringIndex += maxStrings; - analogIndex += maxAnalogs; - } - - while (meetingIndex < maxParticipants * offset) - { - //digitals - tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, false); - tokenArray[digitalIndex + 1] = new XSigDigitalToken(digitalIndex + 2, false); - tokenArray[digitalIndex + 2] = new XSigDigitalToken(digitalIndex + 3, false); - tokenArray[digitalIndex + 3] = new XSigDigitalToken(digitalIndex + 4, false); - tokenArray[digitalIndex + 4] = new XSigDigitalToken(digitalIndex + 5, false); - tokenArray[digitalIndex + 5] = new XSigDigitalToken(digitalIndex + 6, false); - tokenArray[digitalIndex + 6] = new XSigDigitalToken(digitalIndex + 7, false); - - //serials - tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, String.Empty); - - //analogs - tokenArray[analogIndex] = new XSigAnalogToken(analogIndex + 1, 0); - - digitalIndex += maxDigitals; - meetingIndex += offset; - stringIndex += maxStrings; - analogIndex += maxAnalogs; - } - - var returnString = GetXSigString(tokenArray); - - //Debug.Console(2, this, "{0}", ComTextHelper.GetEscapedText(Encoding.GetEncoding(28591).GetBytes(returnString))); - - - return returnString; - } - - private void LinkVideoCodecContentSharingToApi(BasicTriList trilist, VideoCodecControllerJoinMap joinMap) - { - SharingContentIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.SourceShareStart.JoinNumber]); - SharingContentIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.SourceShareEnd.JoinNumber]); - - SharingSourceFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentSource.JoinNumber]); - - trilist.SetSigFalseAction(joinMap.SourceShareStart.JoinNumber, StartSharing); - trilist.SetSigFalseAction(joinMap.SourceShareEnd.JoinNumber, StopSharing); - - trilist.SetBoolSigAction(joinMap.SourceShareAutoStart.JoinNumber, b => AutoShareContentWhileInCall = b); - } - - private List _currentMeetings = new List(); - - private void LinkVideoCodecScheduleToApi(IHasScheduleAwareness codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) - { - trilist.SetSigFalseAction(joinMap.UpdateMeetings.JoinNumber, codec.GetSchedule); - - trilist.SetUShortSigAction(joinMap.MinutesBeforeMeetingStart.JoinNumber, (i) => - { - codec.CodecSchedule.MeetingWarningMinutes = i; - }); - - - for (uint i = 0; i < joinMap.DialMeetingStart.JoinSpan; i++) - { - Debug.Console(1, this, "Setting action to Dial Meeting {0} to digital join {1}", i + 1, joinMap.DialMeetingStart.JoinNumber + i); - var joinNumber = joinMap.DialMeetingStart.JoinNumber + i; - var mtg = i + 1; - var index = (int)i; - - trilist.SetSigFalseAction(joinNumber, () => - { - Debug.Console(1, this, "Meeting {0} Selected (EISC dig-o{1}) > _currentMeetings[{2}].Id: {3}, Title: {4}", - mtg, joinMap.DialMeetingStart.JoinNumber + i, index, _currentMeetings[index].Id, _currentMeetings[index].Title); - if (_currentMeetings[index] != null) - Dial(_currentMeetings[index]); - }); - } - - codec.CodecSchedule.MeetingsListHasChanged += (sender, args) => UpdateMeetingsList(codec, trilist, joinMap); - codec.CodecSchedule.MeetingEventChange += (sender, args) => - { - if (args.ChangeType == eMeetingEventChangeType.MeetingStartWarning) - { - UpdateMeetingsList(codec, trilist, joinMap); - } - }; - - trilist.SetUShortSigAction(joinMap.MeetingsToDisplay.JoinNumber, m => MeetingsToDisplay = m); - MeetingsToDisplayFeedback.LinkInputSig(trilist.UShortInput[joinMap.MeetingsToDisplay.JoinNumber]); - - trilist.OnlineStatusChange += (device, args) => - { - if (!args.DeviceOnLine) return; - - // TODO [ ] Issue #868 - trilist.SetString(joinMap.Schedule.JoinNumber, "\xFC"); - UpdateMeetingsList(codec, trilist, joinMap); - // TODO [ ] hotfix/videocodecbase-max-meeting-xsig-set - MeetingsToDisplayFeedback.LinkInputSig(trilist.UShortInput[joinMap.MeetingsToDisplay.JoinNumber]); - }; - } - - private void UpdateMeetingsList(IHasScheduleAwareness codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) - { - var currentTime = DateTime.Now; - - _currentMeetings = codec.CodecSchedule.Meetings.Where(m => m.StartTime >= currentTime || m.EndTime >= currentTime).ToList(); - - if (_currentMeetings.Count == 0) - { - var emptyXSigByteArray = XSigHelpers.ClearOutputs(); - var emptyXSigString = Encoding.GetEncoding(XSigEncoding) - .GetString(emptyXSigByteArray, 0, emptyXSigByteArray.Length); - - trilist.SetString(joinMap.Schedule.JoinNumber, emptyXSigString); - return; - } - - var meetingsData = UpdateMeetingsListXSig(_currentMeetings); - trilist.SetString(joinMap.Schedule.JoinNumber, meetingsData); - trilist.SetUshort(joinMap.MeetingCount.JoinNumber, (ushort)_currentMeetings.Count); - - trilist.OnlineStatusChange += (device, args) => - { - if (!args.DeviceOnLine) return; - - // TODO [ ] Issue #868 - trilist.SetString(joinMap.Schedule.JoinNumber, "\xFC"); - UpdateMeetingsListXSig(_currentMeetings); - }; - } - - - // TODO [ ] hotfix/videocodecbase-max-meeting-xsig-set - private int _meetingsToDisplay = 3; - // TODO [ ] hotfix/videocodecbase-max-meeting-xsig-set - protected int MeetingsToDisplay - { - get { return _meetingsToDisplay; } - set { - _meetingsToDisplay = (ushort) (value == 0 ? 3 : value); - MeetingsToDisplayFeedback.FireUpdate(); - } - } - - // TODO [ ] hotfix/videocodecbase-max-meeting-xsig-set - public IntFeedback MeetingsToDisplayFeedback { get; set; } - - private string UpdateMeetingsListXSig(List meetings) - { - // TODO [ ] hotfix/videocodecbase-max-meeting-xsig-set - //const int _meetingsToDisplay = 3; - const int maxDigitals = 2; - const int maxStrings = 7; - const int offset = maxDigitals + maxStrings; - var digitalIndex = maxStrings * _meetingsToDisplay; //15 - var stringIndex = 0; - var meetingIndex = 0; - - var tokenArray = new XSigToken[_meetingsToDisplay * offset]; - /* - * Digitals - * IsJoinable - 1 - * IsDialable - 2 - * - * Serials - * Organizer - 1 - * Title - 2 - * Start Date - 3 - * Start Time - 4 - * End Date - 5 - * End Time - 6 - * Id - 7 - */ - - - foreach (var meeting in meetings) - { - var currentTime = DateTime.Now; - - if (meeting.StartTime < currentTime && meeting.EndTime < currentTime) continue; - - if (meetingIndex >= _meetingsToDisplay * offset) - { - Debug.Console(2, this, "Max Meetings reached"); - break; - } - - //digitals - tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, meeting.Joinable); - tokenArray[digitalIndex + 1] = new XSigDigitalToken(digitalIndex + 2, meeting.Id != "0"); - - //serials - tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, meeting.Organizer); - tokenArray[stringIndex + 1] = new XSigSerialToken(stringIndex + 2, meeting.Title); - tokenArray[stringIndex + 2] = new XSigSerialToken(stringIndex + 3, meeting.StartTime.ToString(_dateFormatSpecifier.NullIfEmpty() ?? "d", Global.Culture)); - tokenArray[stringIndex + 3] = new XSigSerialToken(stringIndex + 4, meeting.StartTime.ToString(_timeFormatSpecifier.NullIfEmpty() ?? "t", Global.Culture)); - tokenArray[stringIndex + 4] = new XSigSerialToken(stringIndex + 5, meeting.EndTime.ToString(_dateFormatSpecifier.NullIfEmpty() ?? "d", Global.Culture)); - tokenArray[stringIndex + 5] = new XSigSerialToken(stringIndex + 6, meeting.EndTime.ToString(_timeFormatSpecifier.NullIfEmpty() ?? "t", Global.Culture)); - tokenArray[stringIndex + 6] = new XSigSerialToken(stringIndex + 7, meeting.Id); - - digitalIndex += maxDigitals; - meetingIndex += offset; - stringIndex += maxStrings; - } - - while (meetingIndex < _meetingsToDisplay * offset) - { - Debug.Console(2, this, "Clearing unused data. Meeting Index: {0} MaxMeetings * Offset: {1}", - meetingIndex, _meetingsToDisplay * offset); - - //digitals - tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, false); - tokenArray[digitalIndex + 1] = new XSigDigitalToken(digitalIndex + 2, false); - - //serials - tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, String.Empty); - tokenArray[stringIndex + 1] = new XSigSerialToken(stringIndex + 2, String.Empty); - tokenArray[stringIndex + 2] = new XSigSerialToken(stringIndex + 3, String.Empty); - tokenArray[stringIndex + 3] = new XSigSerialToken(stringIndex + 4, String.Empty); - tokenArray[stringIndex + 4] = new XSigSerialToken(stringIndex + 5, String.Empty); - tokenArray[stringIndex + 5] = new XSigSerialToken(stringIndex + 6, String.Empty); - tokenArray[stringIndex + 6] = new XSigSerialToken(stringIndex + 7, String.Empty); - - digitalIndex += maxDigitals; - meetingIndex += offset; - stringIndex += maxStrings; - } - - return GetXSigString(tokenArray); - } - - - private void LinkVideoCodecDirectoryToApi(IHasDirectory codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) - { - codec.CurrentDirectoryResultIsNotDirectoryRoot.LinkComplementInputSig( - trilist.BooleanInput[joinMap.DirectoryIsRoot.JoinNumber]); - - trilist.SetStringSigAction(joinMap.DirectorySearchString.JoinNumber, codec.SearchDirectory); - - trilist.SetUShortSigAction(joinMap.DirectorySelectRow.JoinNumber, (i) => SelectDirectoryEntry(codec, i, trilist, joinMap)); - - //Special Change for protected directory clear - - trilist.SetBoolSigAction(joinMap.DirectoryClearSelected.JoinNumber, (b) => SelectDirectoryEntry(_directoryCodec, 0, _directoryTrilist, _directoryJoinmap)); - - // Report feedback for number of contact methods for selected contact - - trilist.SetSigFalseAction(joinMap.DirectoryRoot.JoinNumber, codec.SetCurrentDirectoryToRoot); - - trilist.SetSigFalseAction(joinMap.DirectoryFolderBack.JoinNumber, codec.GetDirectoryParentFolderContents); - - if (codec.DirectoryRoot != null) - { - var contactsCount = codec.DirectoryRoot.CurrentDirectoryResults.Where(c => c.ParentFolderId.Equals("root")).ToList().Count; - trilist.SetUshort(joinMap.DirectoryRowCount.JoinNumber, (ushort)contactsCount); - Debug.Console(2, this, ">>> contactsCount: {0}", contactsCount); - - var clearBytes = XSigHelpers.ClearOutputs(); - - trilist.SetString(joinMap.DirectoryEntries.JoinNumber, - Encoding.GetEncoding(XSigEncoding).GetString(clearBytes, 0, clearBytes.Length)); - var directoryXSig = UpdateDirectoryXSig(codec.DirectoryRoot, - codec.CurrentDirectoryResultIsNotDirectoryRoot.BoolValue == false); - - Debug.Console(2, this, "Directory XSig Length: {0}", directoryXSig.Length); - - trilist.SetString(joinMap.DirectoryEntries.JoinNumber, directoryXSig); - } - - codec.DirectoryResultReturned += (sender, args) => - { - var isRoot = codec.CurrentDirectoryResultIsNotDirectoryRoot.BoolValue == false; - var argsCount = isRoot - ? args.Directory.CurrentDirectoryResults.Where(a => a.ParentFolderId.Equals("root")).ToList().Count - : args.Directory.CurrentDirectoryResults.Count; - - trilist.SetUshort(joinMap.DirectoryRowCount.JoinNumber, (ushort)argsCount); - Debug.Console(2, this, ">>> argsCount: {0}", argsCount); - - var clearBytes = XSigHelpers.ClearOutputs(); - - trilist.SetString(joinMap.DirectoryEntries.JoinNumber, - Encoding.GetEncoding(XSigEncoding).GetString(clearBytes, 0, clearBytes.Length)); - var directoryXSig = UpdateDirectoryXSig(args.Directory, - codec.CurrentDirectoryResultIsNotDirectoryRoot.BoolValue == false); - Debug.Console(2, this, "Directory XSig Length: {0}", directoryXSig.Length); - - trilist.SetString(joinMap.DirectoryEntries.JoinNumber, directoryXSig); - }; - - trilist.OnlineStatusChange += (device, args) => - { - if (!args.DeviceOnLine) return; - - var clearBytes = XSigHelpers.ClearOutputs(); - trilist.SetString(joinMap.DirectoryEntries.JoinNumber, - Encoding.GetEncoding(XSigEncoding).GetString(clearBytes, 0, clearBytes.Length)); - var directoryXSig = UpdateDirectoryXSig(codec.DirectoryRoot, codec.CurrentDirectoryResultIsNotDirectoryRoot.BoolValue == false); - trilist.SetString(joinMap.DirectoryEntries.JoinNumber, directoryXSig); - }; - } - - private void SelectDirectoryEntry(IHasDirectory codec, ushort i, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) - { - if (i > codec.CurrentDirectoryResult.CurrentDirectoryResults.Count) return; - _selectedDirectoryItem = i == 0 ? null : codec.CurrentDirectoryResult.CurrentDirectoryResults[i - 1]; - trilist.SetUshort(joinMap.DirectorySelectRowFeedback.JoinNumber, i); - - if (_selectedDirectoryItem == null) trilist.SetBool(joinMap.DirectoryEntryIsContact.JoinNumber, false); - - - if (_selectedDirectoryItem is DirectoryFolder) - { - codec.GetDirectoryFolderContents(_selectedDirectoryItem.FolderId); - trilist.SetUshort(joinMap.SelectedContactMethodCount.JoinNumber, 0); - trilist.SetString(joinMap.DirectorySelectedFolderName.JoinNumber, _selectedDirectoryItem.Name); - trilist.SetString(joinMap.DirectoryEntrySelectedName.JoinNumber, string.Empty); - trilist.ClearUShortSigAction(joinMap.SelectContactMethod.JoinNumber); - trilist.ClearBoolSigAction(joinMap.DirectoryDialSelectedLine.JoinNumber); - trilist.ClearBoolSigAction(joinMap.DirectoryDialSelectedContactMethod.JoinNumber); - trilist.SetBool(joinMap.DirectoryEntryIsContact.JoinNumber, false); - return; - } - - // not a folder. Clear this value - trilist.SetString(joinMap.DirectorySelectedFolderName.JoinNumber, string.Empty); - - var selectedContact = _selectedDirectoryItem as DirectoryContact; - - if (selectedContact != null && selectedContact.ContactMethods.Count >= 1) - { - trilist.SetBool(joinMap.DirectoryEntryIsContact.JoinNumber, true); - } - - trilist.SetString(joinMap.DirectoryEntrySelectedName.JoinNumber, - selectedContact != null ? selectedContact.Name : string.Empty); - - // Allow auto dial of selected line. Always dials first contact method - if (!trilist.GetBool(joinMap.DirectoryDisableAutoDialSelectedLine.JoinNumber)) - { - var invitableEntry = _selectedDirectoryItem as IInvitableContact; - - if (invitableEntry != null) - { - Dial(invitableEntry); - return; - } - - var entryToDial = _selectedDirectoryItem as DirectoryContact; - - trilist.SetString(joinMap.DirectoryEntrySelectedNumber.JoinNumber, - selectedContact != null ? selectedContact.ContactMethods[0].Number : string.Empty); - - if (entryToDial == null) return; - - Dial(entryToDial.ContactMethods[0].Number); - } - else - { - // If auto dial is disabled... - var entryToDial = _selectedDirectoryItem as DirectoryContact; - - if (entryToDial == null) - { - // Clear out values and actions from last selected item - trilist.SetUshort(joinMap.SelectedContactMethodCount.JoinNumber, 0); - trilist.SetString(joinMap.DirectoryEntrySelectedName.JoinNumber, string.Empty); - trilist.ClearUShortSigAction(joinMap.SelectContactMethod.JoinNumber); - trilist.ClearBoolSigAction(joinMap.DirectoryDialSelectedLine.JoinNumber); - trilist.ClearBoolSigAction(joinMap.DirectoryDialSelectedContactMethod.JoinNumber); - return; - } - - trilist.SetUshort(joinMap.SelectedContactMethodCount.JoinNumber, (ushort)entryToDial.ContactMethods.Count); - - // Update the action to dial the selected contact method - trilist.SetUShortSigAction(joinMap.SelectContactMethod.JoinNumber, (u) => - { - if (u < 1 || u > entryToDial.ContactMethods.Count) return; - - trilist.SetSigFalseAction(joinMap.DirectoryDialSelectedContactMethod.JoinNumber, () => Dial(entryToDial.ContactMethods[u - 1].Number)); - }); - - // Sets DirectoryDialSelectedLine join action to dial first contact method - trilist.SetSigFalseAction(joinMap.DirectoryDialSelectedLine.JoinNumber, () => Dial(entryToDial.ContactMethods[0].Number)); - - var clearBytes = XSigHelpers.ClearOutputs(); - - trilist.SetString(joinMap.ContactMethods.JoinNumber, - Encoding.GetEncoding(XSigEncoding).GetString(clearBytes, 0, clearBytes.Length)); - var contactMethodsXSig = UpdateContactMethodsXSig(entryToDial); - - trilist.SetString(joinMap.ContactMethods.JoinNumber, contactMethodsXSig); - } - } - - /// - /// Generates the XSig data representing the available contact methods for the selected DirectoryContact - /// - /// - /// - private string UpdateContactMethodsXSig(DirectoryContact contact) - { - const int maxMethods = 10; - const int maxStrings = 3; - const int offset = maxStrings; - var stringIndex = 0; - var arrayIndex = 0; - // Create a new token array and set the size to the number of methods times the total number of signals - var tokenArray = new XSigToken[maxMethods * offset]; - - Debug.Console(2, this, "Creating XSIG token array with size {0}", maxMethods * offset); - - // TODO: Add code to generate XSig data - foreach (var method in contact.ContactMethods) - { - if (arrayIndex >= maxMethods * offset) - break; - - //serials - tokenArray[arrayIndex + 1] = new XSigSerialToken(stringIndex + 1, method.Number); - tokenArray[arrayIndex + 2] = new XSigSerialToken(stringIndex + 2, method.ContactMethodId.ToString()); - tokenArray[arrayIndex + 3] = new XSigSerialToken(stringIndex + 3, method.Device.ToString()); - - arrayIndex += offset; - stringIndex += maxStrings; - } - - while (arrayIndex < maxMethods) - { - tokenArray[arrayIndex + 1] = new XSigSerialToken(stringIndex + 1, String.Empty); - tokenArray[arrayIndex + 2] = new XSigSerialToken(stringIndex + 2, String.Empty); - tokenArray[arrayIndex + 3] = new XSigSerialToken(stringIndex + 3, String.Empty); - - arrayIndex += offset; - stringIndex += maxStrings; - } - - return GetXSigString(tokenArray); - } - - private string UpdateDirectoryXSig(CodecDirectory directory, bool isRoot) - { - var xSigMaxIndex = 1023; - var tokenArray = new XSigToken[directory.CurrentDirectoryResults.Count > xSigMaxIndex - ? xSigMaxIndex - : directory.CurrentDirectoryResults.Count]; - - Debug.Console(2, this, "IsRoot: {0}, Directory Count: {1}, TokenArray.Length: {2}", isRoot, directory.CurrentDirectoryResults.Count, tokenArray.Length); - - var contacts = directory.CurrentDirectoryResults.Count > xSigMaxIndex - ? directory.CurrentDirectoryResults.Take(xSigMaxIndex) - : directory.CurrentDirectoryResults; - - var contactsToDisplay = isRoot - ? contacts.Where(c => c.ParentFolderId == "root") - : contacts.Where(c => c.ParentFolderId != "root"); - - var counterIndex = 1; - foreach (var entry in contactsToDisplay) - { - var arrayIndex = counterIndex - 1; - var entryIndex = counterIndex; - - Debug.Console(2, this, "Entry{2:0000} Name: {0}, Folder ID: {1}, Type: {3}, ParentFolderId: {4}", - entry.Name, entry.FolderId, entryIndex, entry.GetType().GetCType().FullName, entry.ParentFolderId); - - if (entry is DirectoryFolder) - { - tokenArray[arrayIndex] = new XSigSerialToken(entryIndex, String.Format("[+] {0}", entry.Name)); - - counterIndex++; - - continue; - } - - tokenArray[arrayIndex] = new XSigSerialToken(entryIndex, entry.Name); - - counterIndex++; - } - - return GetXSigString(tokenArray); - } - - private void LinkVideoCodecCallControlsToApi(BasicTriList trilist, VideoCodecControllerJoinMap joinMap) - { - trilist.SetSigFalseAction(joinMap.ManualDial.JoinNumber, - () => Dial(trilist.StringOutput[joinMap.CurrentDialString.JoinNumber].StringValue)); - - //End All calls - trilist.SetSigFalseAction(joinMap.EndAllCalls.JoinNumber, EndAllCalls); - - //End a specific call, specified by index. Maximum 8 calls supported - for (int i = 0; i < joinMap.EndCallStart.JoinSpan; i++) - { - var callIndex = i; - - trilist.SetSigFalseAction((uint)(joinMap.EndCallStart.JoinNumber + i), () => - { - - if (callIndex < 0 || callIndex >= ActiveCalls.Count) - { - Debug.Console(2, this, "Cannot end call. No call found at index: {0}", callIndex); - return; - } - - var call = ActiveCalls[callIndex]; - if (call != null) - { - EndCall(call); - } - else - { - Debug.Console(0, this, "[End Call] Unable to find call at index '{0}'", i); - } - }); - } - - trilist.SetBool(joinMap.HookState.JoinNumber, IsInCall); - - CallStatusChange += (sender, args) => - { - trilist.SetBool(joinMap.HookState.JoinNumber, IsInCall); - - Debug.Console(1, this, "Call Direction: {0}", args.CallItem.Direction); - Debug.Console(1, this, "Call is incoming: {0}", args.CallItem.Direction == eCodecCallDirection.Incoming); - trilist.SetBool(joinMap.IncomingCall.JoinNumber, args.CallItem.Direction == eCodecCallDirection.Incoming && args.CallItem.Status == eCodecCallStatus.Ringing); - - if (args.CallItem.Direction == eCodecCallDirection.Incoming) - { - trilist.SetSigFalseAction(joinMap.IncomingAnswer.JoinNumber, () => AcceptCall(args.CallItem)); - trilist.SetSigFalseAction(joinMap.IncomingReject.JoinNumber, () => RejectCall(args.CallItem)); - trilist.SetString(joinMap.IncomingCallName.JoinNumber, args.CallItem.Name); - trilist.SetString(joinMap.IncomingCallNumber.JoinNumber, args.CallItem.Number); - } - else - { - trilist.SetString(joinMap.IncomingCallName.JoinNumber, string.Empty); - trilist.SetString(joinMap.IncomingCallNumber.JoinNumber, string.Empty); - } - - - trilist.SetString(joinMap.CurrentCallData.JoinNumber, UpdateCallStatusXSig()); - - trilist.SetUshort(joinMap.ConnectedCallCount.JoinNumber, (ushort)ActiveCalls.Count); - }; - - var joinCodec = this as IJoinCalls; - if (joinCodec != null) - { - trilist.SetSigFalseAction(joinMap.JoinAllCalls.JoinNumber, () => joinCodec.JoinAllCalls()); - - for (int i = 0; i < joinMap.JoinCallStart.JoinSpan; i++) - { - trilist.SetSigFalseAction((uint)(joinMap.JoinCallStart.JoinNumber + i), () => - { - var call = ActiveCalls[i]; - if (call != null) - { - joinCodec.JoinCall(call); - } - else - { - Debug.Console(0, this, "[Join Call] Unable to find call at index '{0}'", i); - } - }); - } - } - - var holdCodec = this as IHasCallHold; - if (holdCodec != null) - { - trilist.SetSigFalseAction(joinMap.HoldAllCalls.JoinNumber, () => - { - foreach (var call in ActiveCalls) - { - holdCodec.HoldCall(call); - } - }); - - for (int i = 0; i < joinMap.HoldCallsStart.JoinSpan; i++) - { - var index = i; - - trilist.SetSigFalseAction((uint)(joinMap.HoldCallsStart.JoinNumber + index), () => - { - if (index < 0 || index >= ActiveCalls.Count) return; - - var call = ActiveCalls[index]; - if (call != null) - { - holdCodec.HoldCall(call); - } - else - { - Debug.Console(0, this, "[Hold Call] Unable to find call at index '{0}'", i); - } - }); - - trilist.SetSigFalseAction((uint)(joinMap.ResumeCallsStart.JoinNumber + index), () => - { - if (index < 0 || index >= ActiveCalls.Count) return; - - var call = ActiveCalls[index]; - if (call != null) - { - holdCodec.ResumeCall(call); - } - else - { - Debug.Console(0, this, "[Resume Call] Unable to find call at index '{0}'", i); - } - }); - } - } - - - - trilist.OnlineStatusChange += (device, args) => - { - if (!args.DeviceOnLine) return; - - // TODO [ ] #983 - Debug.Console(0, this, "LinkVideoCodecCallControlsToApi: device is {0}, IsInCall {1}", args.DeviceOnLine ? "online" : "offline", IsInCall); - trilist.SetBool(joinMap.HookState.JoinNumber, IsInCall); - trilist.SetString(joinMap.CurrentCallData.JoinNumber, "\xFC"); - trilist.SetString(joinMap.CurrentCallData.JoinNumber, UpdateCallStatusXSig()); - }; - } - - private string UpdateCallStatusXSig() - { - const int maxCalls = 8; - const int maxStrings = 6; - const int maxDigitals = 2; - const int offset = maxStrings + maxDigitals; - var stringIndex = 0; - var digitalIndex = maxStrings * maxCalls; - var arrayIndex = 0; - - var tokenArray = new XSigToken[maxCalls * offset]; //set array size for number of calls * pieces of info - - foreach (var call in ActiveCalls) - { - if (arrayIndex >= maxCalls * offset) - break; - //digitals - tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, call.IsActiveCall); - tokenArray[digitalIndex + 1] = new XSigDigitalToken(digitalIndex + 2, call.IsOnHold); - - //serials - tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, call.Name ?? String.Empty); - tokenArray[stringIndex + 1] = new XSigSerialToken(stringIndex + 2, call.Number ?? String.Empty); - tokenArray[stringIndex + 2] = new XSigSerialToken(stringIndex + 3, call.Direction.ToString()); - tokenArray[stringIndex + 3] = new XSigSerialToken(stringIndex + 4, call.Type.ToString()); - tokenArray[stringIndex + 4] = new XSigSerialToken(stringIndex + 5, call.Status.ToString()); - if(call.Duration != null) - { - // May need to verify correct string format here - var dur = string.Format("{0:c}", call.Duration); - tokenArray[arrayIndex + 6] = new XSigSerialToken(stringIndex + 6, dur); - } - - arrayIndex += offset; - stringIndex += maxStrings; - digitalIndex += maxDigitals; - } - while (arrayIndex < maxCalls * offset) - { - //digitals - tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, false); - tokenArray[digitalIndex + 1] = new XSigDigitalToken(digitalIndex + 2, false); - - - //serials - tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, String.Empty); - tokenArray[stringIndex + 1] = new XSigSerialToken(stringIndex + 2, String.Empty); - tokenArray[stringIndex + 2] = new XSigSerialToken(stringIndex + 3, String.Empty); - tokenArray[stringIndex + 3] = new XSigSerialToken(stringIndex + 4, String.Empty); - tokenArray[stringIndex + 4] = new XSigSerialToken(stringIndex + 5, String.Empty); - tokenArray[stringIndex + 5] = new XSigSerialToken(stringIndex + 6, String.Empty); - - arrayIndex += offset; - stringIndex += maxStrings; - digitalIndex += maxDigitals; - } - - return GetXSigString(tokenArray); - } - - private void LinkVideoCodecDtmfToApi(BasicTriList trilist, VideoCodecControllerJoinMap joinMap) - { - trilist.SetSigFalseAction(joinMap.Dtmf0.JoinNumber, () => SendDtmfAction("0", trilist, joinMap)); - trilist.SetSigFalseAction(joinMap.Dtmf1.JoinNumber, () => SendDtmfAction("1", trilist, joinMap)); - trilist.SetSigFalseAction(joinMap.Dtmf2.JoinNumber, () => SendDtmfAction("2", trilist, joinMap)); - trilist.SetSigFalseAction(joinMap.Dtmf3.JoinNumber, () => SendDtmfAction("3", trilist, joinMap)); - trilist.SetSigFalseAction(joinMap.Dtmf4.JoinNumber, () => SendDtmfAction("4", trilist, joinMap)); - trilist.SetSigFalseAction(joinMap.Dtmf5.JoinNumber, () => SendDtmfAction("5", trilist, joinMap)); - trilist.SetSigFalseAction(joinMap.Dtmf6.JoinNumber, () => SendDtmfAction("6", trilist, joinMap)); - trilist.SetSigFalseAction(joinMap.Dtmf7.JoinNumber, () => SendDtmfAction("7", trilist, joinMap)); - trilist.SetSigFalseAction(joinMap.Dtmf8.JoinNumber, () => SendDtmfAction("8", trilist, joinMap)); - trilist.SetSigFalseAction(joinMap.Dtmf9.JoinNumber, () => SendDtmfAction("9", trilist, joinMap)); - trilist.SetSigFalseAction(joinMap.DtmfStar.JoinNumber, () => SendDtmfAction("*", trilist, joinMap)); - trilist.SetSigFalseAction(joinMap.DtmfPound.JoinNumber, () => SendDtmfAction("#", trilist, joinMap)); - } - - /// - /// Sends the specified string as a DTMF command. - /// Reads the value of the SendDtmfToSpecificCallInstance digital join and SelectCall analog join to determine - /// Whther to send to a specific call index or to the last connected call - /// - /// - /// - /// - private void SendDtmfAction(string s, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) - { - if (!trilist.GetBool(joinMap.SendDtmfToSpecificCallIndex.JoinNumber)) - { - SendDtmf(s); - } - else - { - var callIndex = trilist.GetUshort(joinMap.SelectCall.JoinNumber); - if (callIndex > 0 && callIndex <= 8) - { - var call = ActiveCalls[callIndex - 1]; - if (call != null && call.IsActiveCall) - { - SendDtmf(s, call); - } - else - { - Debug.Console(0, this, "Warning: No call found at index {0} or call is not active.", callIndex); - } - } - else - { - Debug.Console(0, this, "Warning: Invalid call index specified. Please use a value of 1-8."); - } - } - } - - private void LinkVideoCodecCameraLayoutsToApi(IHasCodecLayouts codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) - { - trilist.SetSigFalseAction(joinMap.CameraLayout.JoinNumber, codec.LocalLayoutToggle); - - codec.LocalLayoutFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentLayoutStringFb.JoinNumber]); - } - - private void LinkVideoCodecCameraModeToApi(IHasCameraAutoMode codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) - { - trilist.SetSigFalseAction(joinMap.CameraModeAuto.JoinNumber, codec.CameraAutoModeOn); - trilist.SetSigFalseAction(joinMap.CameraModeManual.JoinNumber, codec.CameraAutoModeOff); - - codec.CameraAutoModeIsOnFeedback.OutputChange += (o, a) => - { - var offCodec = codec as IHasCameraOff; - - if (offCodec != null) - { - if (offCodec.CameraIsOffFeedback.BoolValue) - { - trilist.SetBool(joinMap.CameraModeAuto.JoinNumber, false); - trilist.SetBool(joinMap.CameraModeManual.JoinNumber, false); - trilist.SetBool(joinMap.CameraModeOff.JoinNumber, true); - return; - } - - trilist.SetBool(joinMap.CameraModeAuto.JoinNumber, a.BoolValue); - trilist.SetBool(joinMap.CameraModeManual.JoinNumber, !a.BoolValue); - trilist.SetBool(joinMap.CameraModeOff.JoinNumber, false); - return; - } - - trilist.SetBool(joinMap.CameraModeAuto.JoinNumber, a.BoolValue); - trilist.SetBool(joinMap.CameraModeManual.JoinNumber, !a.BoolValue); - trilist.SetBool(joinMap.CameraModeOff.JoinNumber, false); - }; - - var offModeCodec = codec as IHasCameraOff; - - if (offModeCodec != null) - { - if (offModeCodec.CameraIsOffFeedback.BoolValue) - { - trilist.SetBool(joinMap.CameraModeAuto.JoinNumber, false); - trilist.SetBool(joinMap.CameraModeManual.JoinNumber, false); - trilist.SetBool(joinMap.CameraModeOff.JoinNumber, true); - return; - } - - trilist.SetBool(joinMap.CameraModeAuto.JoinNumber, codec.CameraAutoModeIsOnFeedback.BoolValue); - trilist.SetBool(joinMap.CameraModeManual.JoinNumber, !codec.CameraAutoModeIsOnFeedback.BoolValue); - trilist.SetBool(joinMap.CameraModeOff.JoinNumber, false); - return; - } - - trilist.SetBool(joinMap.CameraModeAuto.JoinNumber, codec.CameraAutoModeIsOnFeedback.BoolValue); - trilist.SetBool(joinMap.CameraModeManual.JoinNumber, !codec.CameraAutoModeIsOnFeedback.BoolValue); - trilist.SetBool(joinMap.CameraModeOff.JoinNumber, false); - } - - private void LinkVideoCodecSelfviewToApi(IHasCodecSelfView codec, BasicTriList trilist, - VideoCodecControllerJoinMap joinMap) - { - trilist.SetSigFalseAction(joinMap.CameraSelfView.JoinNumber, codec.SelfViewModeToggle); - - codec.SelfviewIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.CameraSelfView.JoinNumber]); - } - - private void LinkVideoCodecCameraToApi(IHasCodecCameras codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) - { - //Camera PTZ - trilist.SetBoolSigAction(joinMap.CameraTiltUp.JoinNumber, (b) => - { - if (codec.SelectedCamera == null) return; - var camera = codec.SelectedCamera as IHasCameraPtzControl; - - if (camera == null) return; - - if (b) camera.TiltUp(); - else camera.TiltStop(); - }); - - trilist.SetBoolSigAction(joinMap.CameraTiltDown.JoinNumber, (b) => - { - if (codec.SelectedCamera == null) return; - var camera = codec.SelectedCamera as IHasCameraPtzControl; - - if (camera == null) return; - - if (b) camera.TiltDown(); - else camera.TiltStop(); - }); - trilist.SetBoolSigAction(joinMap.CameraPanLeft.JoinNumber, (b) => - { - if (codec.SelectedCamera == null) return; - var camera = codec.SelectedCamera as IHasCameraPtzControl; - - if (camera == null) return; - - if (b) camera.PanLeft(); - else camera.PanStop(); - }); - trilist.SetBoolSigAction(joinMap.CameraPanRight.JoinNumber, (b) => - { - if (codec.SelectedCamera == null) return; - var camera = codec.SelectedCamera as IHasCameraPtzControl; - - if (camera == null) return; - - if (b) camera.PanRight(); - else camera.PanStop(); - }); - - trilist.SetBoolSigAction(joinMap.CameraZoomIn.JoinNumber, (b) => - { - if (codec.SelectedCamera == null) return; - var camera = codec.SelectedCamera as IHasCameraPtzControl; - - if (camera == null) return; - - if (b) camera.ZoomIn(); - else camera.ZoomStop(); - }); - - trilist.SetBoolSigAction(joinMap.CameraZoomOut.JoinNumber, (b) => - { - if (codec.SelectedCamera == null) return; - var camera = codec.SelectedCamera as IHasCameraPtzControl; - - if (camera == null) return; - - if (b) camera.ZoomOut(); - else camera.ZoomStop(); - }); - - - trilist.SetBoolSigAction(joinMap.CameraFocusNear.JoinNumber, (b) => - { - if (codec.SelectedCamera == null) return; - var camera = codec.SelectedCamera as IHasCameraFocusControl; - - if (camera == null) return; - - if (b) camera.FocusNear(); - else camera.FocusStop(); - }); - - trilist.SetBoolSigAction(joinMap.CameraFocusFar.JoinNumber, (b) => - { - if (codec.SelectedCamera == null) return; - var camera = codec.SelectedCamera as IHasCameraFocusControl; - - if (camera == null) return; - - if (b) camera.FocusFar(); - else camera.FocusStop(); - }); - - trilist.SetSigFalseAction(joinMap.CameraFocusAuto.JoinNumber, () => - { - if (codec.SelectedCamera == null) return; - var camera = codec.SelectedCamera as IHasCameraFocusControl; - - if (camera == null) return; - - camera.TriggerAutoFocus(); - }); - - // Camera count - trilist.SetUshort(joinMap.CameraCount.JoinNumber, (ushort)codec.Cameras.Count); - - // Camera names - for (uint i = 0; i < joinMap.CameraNamesFb.JoinSpan; i++) - { - //Check the count first - if (i < codec.Cameras.Count && codec.Cameras[(int)i] != null) - { - trilist.SetString(joinMap.CameraNamesFb.JoinNumber + i, codec.Cameras[(int)i].Name); - } - else - { - trilist.SetString(joinMap.CameraNamesFb.JoinNumber + i, ""); - } - } - - //Camera Select - trilist.SetUShortSigAction(joinMap.CameraNumberSelect.JoinNumber, (i) => - { - if (i > 0 && i <= codec.Cameras.Count) - { - codec.SelectCamera(codec.Cameras[i - 1].Key); - } - else - { - Debug.Console(0, this, "Unable to select. No camera found at index {0}", i); - } - }); - - // Set initial selected camera feedback - if (codec.SelectedCamera != null) - { - trilist.SetUshort(joinMap.CameraNumberSelect.JoinNumber, (ushort)codec.Cameras.FindIndex((c) => c.Key == codec.SelectedCamera.Key)); - } - - codec.CameraSelected += (sender, args) => - { - var i = (ushort)codec.Cameras.FindIndex((c) => c.Key == args.SelectedCamera.Key); - - trilist.SetUshort(joinMap.CameraNumberSelect.JoinNumber, (ushort)(i + 1)); - - if (codec is IHasCodecRoomPresets) - { - return; - } - - if (!(args.SelectedCamera is IHasCameraPresets)) - { - return; - } - - var cam = args.SelectedCamera as IHasCameraPresets; - SetCameraPresetNames(cam.Presets); - - (args.SelectedCamera as IHasCameraPresets).PresetsListHasChanged += (o, eventArgs) => SetCameraPresetNames(cam.Presets); - - trilist.SetUShortSigAction(joinMap.CameraPresetSelect.JoinNumber, - (a) => - { - cam.PresetSelect(a); - trilist.SetUshort(joinMap.CameraPresetSelect.JoinNumber, a); - }); - - trilist.SetSigFalseAction(joinMap.CameraPresetSave.JoinNumber, - () => - { - cam.PresetStore(trilist.UShortOutput[joinMap.CameraPresetSelect.JoinNumber].UShortValue, - String.Empty); - trilist.PulseBool(joinMap.CameraPresetSave.JoinNumber, 3000); - }); - }; - - if (!(codec is IHasCodecRoomPresets)) return; - - var presetCodec = codec as IHasCodecRoomPresets; - - presetCodec.CodecRoomPresetsListHasChanged += - (sender, args) => SetCameraPresetNames(presetCodec.NearEndPresets); - - //Camera Presets - trilist.SetUShortSigAction(joinMap.CameraPresetSelect.JoinNumber, (i) => - { - presetCodec.CodecRoomPresetSelect(i); - }); - - - // Far End Presets - trilist.SetUShortSigAction(joinMap.FarEndPresetSelect.JoinNumber, (i) => - { - presetCodec.SelectFarEndPreset(i); - }); - - - trilist.SetSigFalseAction(joinMap.CameraPresetSave.JoinNumber, - () => - { - presetCodec.CodecRoomPresetStore( - trilist.UShortOutput[joinMap.CameraPresetSelect.JoinNumber].UShortValue, String.Empty); - trilist.PulseBool(joinMap.CameraPresetSave.JoinNumber, 3000); - }); - - trilist.OnlineStatusChange += (device, args) => - { - if (!args.DeviceOnLine) return; - - // TODO [ ] Issue #868 - trilist.SetString(joinMap.CameraPresetNames.JoinNumber, "\xFC"); - SetCameraPresetNames(presetCodec.NearEndPresets); - }; - } - - // Following fields only used for Bridging - private int _selectedRecentCallItemIndex; - private CodecCallHistory.CallHistoryEntry _selectedRecentCallItem; - private DirectoryItem _selectedDirectoryItem; - - private void LinkVideoCodecCallHistoryToApi(IHasCallHistory codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) - { - codec.CallHistory.RecentCallsListHasChanged += (o, a) => - { - UpdateCallHistory(codec, trilist, joinMap); - }; - - // Selected item action and feedback - trilist.SetUShortSigAction(joinMap.SelectRecentCallItem.JoinNumber, (u) => - { - if (u == 0 || u > codec.CallHistory.RecentCalls.Count) - { - Debug.Console(2, this, "Recent Call History index out of range"); - return; - } - - _selectedRecentCallItemIndex = (int)(u - 1); - trilist.SetUshort(joinMap.SelectRecentCallItem.JoinNumber, u); - - var _selectedRecentCallItem = codec.CallHistory.RecentCalls[_selectedRecentCallItemIndex]; - - if (_selectedRecentCallItem != null) - { - trilist.SetString(joinMap.SelectedRecentCallName.JoinNumber, _selectedRecentCallItem.Name); - trilist.SetString(joinMap.SelectedRecentCallNumber.JoinNumber, _selectedRecentCallItem.Number); - trilist.SetSigFalseAction(joinMap.RemoveSelectedRecentCallItem.JoinNumber, () => codec.RemoveCallHistoryEntry(_selectedRecentCallItem)); - trilist.SetSigFalseAction(joinMap.DialSelectedRecentCallItem.JoinNumber, () => this.Dial(_selectedRecentCallItem.Number)); - } - else - { - trilist.SetString(joinMap.SelectedRecentCallName.JoinNumber, string.Empty); - trilist.SetString(joinMap.SelectedRecentCallNumber.JoinNumber, string.Empty); - trilist.ClearBoolSigAction(joinMap.RemoveSelectedRecentCallItem.JoinNumber); - trilist.ClearBoolSigAction(joinMap.DialSelectedRecentCallItem.JoinNumber); - } - }); - } - - - - private void UpdateCallHistory(IHasCallHistory codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) - { - // Clear out selected item - _selectedRecentCallItemIndex = 0; - _selectedRecentCallItem = null; - trilist.SetUshort(joinMap.SelectRecentCallItem.JoinNumber, 0); - trilist.SetString(joinMap.SelectedRecentCallName.JoinNumber, string.Empty); - trilist.SetString(joinMap.SelectedRecentCallNumber.JoinNumber, string.Empty); - trilist.ClearBoolSigAction(joinMap.RemoveSelectedRecentCallItem.JoinNumber); - // - - trilist.SetUshort(joinMap.RecentCallCount.JoinNumber, (ushort)codec.CallHistory.RecentCalls.Count); - - // Update the call history joins - var maxItems = joinMap.RecentCallNamesStart.JoinSpan; - - // Create history - uint index = 0; - for (uint i = 0; i < maxItems && i < codec.CallHistory.RecentCalls.Count; i++) - { - trilist.SetString(joinMap.RecentCallNamesStart.JoinNumber + i, codec.CallHistory.RecentCalls[(int)i].Name); - trilist.SetString(joinMap.RecentCallTimesStart.JoinNumber + i, codec.CallHistory.RecentCalls[(int)i].StartTime.ToShortTimeString()); - trilist.SetUshort(joinMap.RecentCallOccurrenceType.JoinNumber + i, (ushort)codec.CallHistory.RecentCalls[(int)i].OccurrenceType); - //i++; - index = i; - } - - //foreach(var item in codec.CallHistory.RecentCalls) - //{ - // trilist.SetString(joinMap.RecentCallNamesStart.JoinNumber + i, item.Name); - // trilist.SetString(joinMap.RecentCallTimesStart.JoinNumber + i, item.StartTime.ToShortTimeString()); - // trilist.SetUshort(joinMap.RecentCallOccurrenceType.JoinNumber + i, (ushort)item.OccurrenceType); - // i++; - //} - - // Clears existing items - for (uint j = index; j < maxItems; j++) - { - trilist.SetString(joinMap.RecentCallNamesStart.JoinNumber + j, string.Empty); - trilist.SetString(joinMap.RecentCallTimesStart.JoinNumber + j, string.Empty); - trilist.SetUshort(joinMap.RecentCallOccurrenceType.JoinNumber + j, 0); - } - } - - private string SetCameraPresetNames(IEnumerable presets) - { - return SetCameraPresetNames(presets.Select(p => p.Description).ToList()); - } - - private string SetCameraPresetNames(IEnumerable presets) - { - return SetCameraPresetNames(presets.Select(p => p.Description).ToList()); - } - - private string SetCameraPresetNames(ICollection presets) - { - var i = 1; //start index for xsig; - - var tokenArray = new XSigToken[presets.Count]; - - foreach (var preset in presets) - { - var cameraPreset = new XSigSerialToken(i, preset); - tokenArray[i - 1] = cameraPreset; - i++; - } - - return GetXSigString(tokenArray); - } - - private string GetXSigString(XSigToken[] tokenArray) - { - string returnString; - using (var s = new MemoryStream()) - { - using (var tw = new XSigTokenStreamWriter(s, true)) - { - tw.WriteXSigData(tokenArray); - } - - var xSig = s.ToArray(); - - returnString = Encoding.GetEncoding(XSigEncoding).GetString(xSig, 0, xSig.Length); - } - - return returnString; - } - - #endregion - } - - - /// - /// Used to track the status of syncronizing the phonebook values when connecting to a codec or refreshing the phonebook info - /// - public class CodecPhonebookSyncState : IKeyed - { - private bool _InitialSyncComplete; - - public CodecPhonebookSyncState(string key) - { - Key = key; - - CodecDisconnected(); - } - - public bool InitialSyncComplete - { - get { return _InitialSyncComplete; } - private set - { - if (value == true) - { - var handler = InitialSyncCompleted; - if (handler != null) - { - handler(this, new EventArgs()); - } - } - _InitialSyncComplete = value; - } - } - - public bool InitialPhonebookFoldersWasReceived { get; private set; } - - public bool NumberOfContactsWasReceived { get; private set; } - - public bool PhonebookRootEntriesWasRecieved { get; private set; } - - public bool PhonebookHasFolders { get; private set; } - - public int NumberOfContacts { get; private set; } - - #region IKeyed Members - - public string Key { get; private set; } - - #endregion - - public event EventHandler InitialSyncCompleted; - - public void InitialPhonebookFoldersReceived() - { - InitialPhonebookFoldersWasReceived = true; - - CheckSyncStatus(); - } - - public void PhonebookRootEntriesReceived() - { - PhonebookRootEntriesWasRecieved = true; - - CheckSyncStatus(); - } - - public void SetPhonebookHasFolders(bool value) - { - PhonebookHasFolders = value; - - Debug.Console(1, this, "Phonebook has folders: {0}", PhonebookHasFolders); - } - - public void SetNumberOfContacts(int contacts) - { - NumberOfContacts = contacts; - NumberOfContactsWasReceived = true; - - Debug.Console(1, this, "Phonebook contains {0} contacts.", NumberOfContacts); - - CheckSyncStatus(); - } - - public void CodecDisconnected() - { - InitialPhonebookFoldersWasReceived = false; - PhonebookHasFolders = false; - NumberOfContacts = 0; - NumberOfContactsWasReceived = false; - } - - private void CheckSyncStatus() - { - if (InitialPhonebookFoldersWasReceived && NumberOfContactsWasReceived && PhonebookRootEntriesWasRecieved) - { - InitialSyncComplete = true; - Debug.Console(1, this, "Initial Phonebook Sync Complete!"); - } - else - { - InitialSyncComplete = false; - } - } - } - /// - /// Represents a codec command that might need to have a friendly label applied for UI feedback purposes - /// - public class CodecCommandWithLabel - { - public string Command { get; private set; } - public string Label { get; private set; } - - public CodecCommandWithLabel(string command, string label) - { - Command = command; - Label = label; - } - } - - - +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp.CrestronIO; +using Crestron.SimplSharp.Reflection; +using Crestron.SimplSharp.Ssh; +using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharp; +using PepperDash.Core; +using PepperDash.Core.Intersystem; +using PepperDash.Core.Intersystem.Tokens; +using PepperDash.Core.WebApi.Presets; +using Crestron.SimplSharp.Reflection; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Routing; +using PepperDash.Essentials.Devices.Common.Cameras; +using PepperDash.Essentials.Devices.Common.Codec; +using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces; +using PepperDash.Essentials.Core.Bridges.JoinMaps; +using Feedback = PepperDash.Essentials.Core.Feedback; + +namespace PepperDash.Essentials.Devices.Common.VideoCodec +{ + public abstract class VideoCodecBase : ReconfigurableDevice, IRoutingInputsOutputs, + IUsageTracking, IHasDialer, IHasContentSharing, ICodecAudio, iVideoCodecInfo, IBridgeAdvanced, IHasStandbyMode + { + private const int XSigEncoding = 28591; + protected const int MaxParticipants = 50; + private readonly byte[] _clearBytes = XSigHelpers.ClearOutputs(); + + private IHasDirectory _directoryCodec; + private BasicTriList _directoryTrilist; + private VideoCodecControllerJoinMap _directoryJoinmap; + + protected string _timeFormatSpecifier; + protected string _dateFormatSpecifier; + + + protected VideoCodecBase(DeviceConfig config) + : base(config) + { + + StandbyIsOnFeedback = new BoolFeedback(StandbyIsOnFeedbackFunc); + PrivacyModeIsOnFeedback = new BoolFeedback(PrivacyModeIsOnFeedbackFunc); + VolumeLevelFeedback = new IntFeedback(VolumeLevelFeedbackFunc); + MuteFeedback = new BoolFeedback(MuteFeedbackFunc); + SharingSourceFeedback = new StringFeedback(SharingSourceFeedbackFunc); + SharingContentIsOnFeedback = new BoolFeedback(SharingContentIsOnFeedbackFunc); + + // TODO [ ] hotfix/videocodecbase-max-meeting-xsig-set + MeetingsToDisplayFeedback = new IntFeedback(() => MeetingsToDisplay); + + InputPorts = new RoutingPortCollection(); + OutputPorts = new RoutingPortCollection(); + + ActiveCalls = new List(); + } + + public IBasicCommunication Communication { get; protected set; } + + /// + /// An internal pseudo-source that is routable and connected to the osd input + /// + public DummyRoutingInputsDevice OsdSource { get; protected set; } + + public BoolFeedback StandbyIsOnFeedback { get; private set; } + + protected abstract Func PrivacyModeIsOnFeedbackFunc { get; } + protected abstract Func VolumeLevelFeedbackFunc { get; } + protected abstract Func MuteFeedbackFunc { get; } + protected abstract Func StandbyIsOnFeedbackFunc { get; } + + public List ActiveCalls { get; set; } + + public bool ShowSelfViewByDefault { get; protected set; } + + public bool SupportsCameraOff { get; protected set; } + public bool SupportsCameraAutoMode { get; protected set; } + + public bool IsReady { get; protected set; } + + public virtual List Feedbacks + { + get + { + return new List + { + PrivacyModeIsOnFeedback, + SharingSourceFeedback + }; + } + } + + protected abstract Func SharingSourceFeedbackFunc { get; } + protected abstract Func SharingContentIsOnFeedbackFunc { get; } + + #region ICodecAudio Members + + public abstract void PrivacyModeOn(); + public abstract void PrivacyModeOff(); + public abstract void PrivacyModeToggle(); + public BoolFeedback PrivacyModeIsOnFeedback { get; private set; } + + + public BoolFeedback MuteFeedback { get; private set; } + + public abstract void MuteOff(); + + public abstract void MuteOn(); + + public abstract void SetVolume(ushort level); + + public IntFeedback VolumeLevelFeedback { get; private set; } + + public abstract void MuteToggle(); + + public abstract void VolumeDown(bool pressRelease); + + + public abstract void VolumeUp(bool pressRelease); + + #endregion + + #region IHasContentSharing Members + + public abstract void StartSharing(); + public abstract void StopSharing(); + + public bool AutoShareContentWhileInCall { get; protected set; } + + public StringFeedback SharingSourceFeedback { get; private set; } + public BoolFeedback SharingContentIsOnFeedback { get; private set; } + + #endregion + + #region IHasDialer Members + + /// + /// Fires when the status of any active, dialing, or incoming call changes or is new + /// + public event EventHandler CallStatusChange; + + /// + /// Returns true when any call is not in state Unknown, Disconnecting, Disconnected + /// + public bool IsInCall + { + get + { + var value = ActiveCalls != null && ActiveCalls.Any(c => c.IsActiveCall); + return value; + } + } + + public abstract void Dial(string number); + public abstract void EndCall(CodecActiveCallItem call); + public abstract void EndAllCalls(); + public abstract void AcceptCall(CodecActiveCallItem call); + public abstract void RejectCall(CodecActiveCallItem call); + public abstract void SendDtmf(string s); + public virtual void SendDtmf(string s, CodecActiveCallItem call) { } + + #endregion + + #region IRoutingInputsOutputs Members + + public RoutingPortCollection InputPorts { get; private set; } + + public RoutingPortCollection OutputPorts { get; private set; } + + #endregion + + #region IUsageTracking Members + + /// + /// This object can be added by outside users of this class to provide usage tracking + /// for various services + /// + public UsageTracking UsageTracker { get; set; } + + #endregion + + #region iVideoCodecInfo Members + + public VideoCodecInfo CodecInfo { get; protected set; } + + #endregion + + public event EventHandler IsReadyChange; + public abstract void Dial(Meeting meeting); + + public virtual void Dial(IInvitableContact contact) + { + } + + public abstract void ExecuteSwitch(object selector); + + /// + /// Helper method to fire CallStatusChange event with old and new status + /// + protected void SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus newStatus, CodecActiveCallItem call) + { + call.Status = newStatus; + + OnCallStatusChange(call); + } + + /// + /// + /// + /// + /// + /// + protected virtual void OnCallStatusChange(CodecActiveCallItem item) + { + var handler = CallStatusChange; + if (handler != null) + { + handler(this, new CodecCallStatusItemChangeEventArgs(item)); + } + + PrivacyModeIsOnFeedback.FireUpdate(); + + if (AutoShareContentWhileInCall) + { + StartSharing(); + } + + if (UsageTracker != null) + { + if (IsInCall && !UsageTracker.UsageTrackingStarted) + { + UsageTracker.StartDeviceUsage(); + } + else if (UsageTracker.UsageTrackingStarted && !IsInCall) + { + UsageTracker.EndDeviceUsage(); + } + } + } + + /// + /// Sets IsReady property and fires the event. Used for dependent classes to sync up their data. + /// + protected void SetIsReady() + { + CrestronInvoke.BeginInvoke((o) => + { + try + { + IsReady = true; + var h = IsReadyChange; + if (h != null) + { + h(this, new EventArgs()); + } + } + catch (Exception e) + { + Debug.Console(2, this, "Error in SetIsReady() : {0}", e); + } + }); + } + + // **** DEBUGGING THINGS **** + /// + /// + /// + public virtual void ListCalls() + { + Debug.Console(1, this, "Active Calls:"); + + var sb = new StringBuilder(); + foreach (var c in ActiveCalls) + { + sb.AppendFormat("id: {0} number: {1} -- name: {2} status: {3} onHold: {4}\r\n", c.Id, c.Number, c.Name, c.Status, c.IsOnHold); + } + Debug.Console(1, this, "\n{0}\n", sb.ToString()); + } + + public abstract void StandbyActivate(); + + public abstract void StandbyDeactivate(); + + #region Implementation of IBridgeAdvanced + + public abstract void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge); + + /// + /// Use this method when using a plain VideoCodecControllerJoinMap + /// + /// + /// + /// + /// + /// + protected void LinkVideoCodecToApi(VideoCodecBase codec, BasicTriList trilist, uint joinStart, string joinMapKey, + EiscApiAdvanced bridge) + { + var joinMap = new VideoCodecControllerJoinMap(joinStart); + + var customJoins = JoinMapHelper.TryGetJoinMapAdvancedForDevice(joinMapKey); + + if (customJoins != null) + { + joinMap.SetCustomJoinData(customJoins); + } + + if (bridge != null) + { + bridge.AddJoinMap(Key, joinMap); + } + + LinkVideoCodecToApi(codec, trilist, joinMap); + + trilist.OnlineStatusChange += (device, args) => + { + if (!args.DeviceOnLine) return; + }; + } + + /// + /// Use this method when you need to pass in a join map that extends VideoCodecControllerJoinMap + /// + /// + /// + /// + protected void LinkVideoCodecToApi(VideoCodecBase codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) + { + Debug.Console(1, this, "Linking to Trilist {0}", trilist.ID.ToString("X")); + + LinkVideoCodecDtmfToApi(trilist, joinMap); + + LinkVideoCodecCallControlsToApi(trilist, joinMap); + + LinkVideoCodecContentSharingToApi(trilist, joinMap); + + LinkVideoCodecPrivacyToApi(trilist, joinMap); + + LinkVideoCodecVolumeToApi(trilist, joinMap); + + LinkVideoCodecInfoToApi(trilist, joinMap); + + // Register for this event to link any functions that require the codec to be ready first + codec.IsReadyChange += (o, a) => + { + if (codec is IHasCodecCameras) + { + LinkVideoCodecCameraToApi(codec as IHasCodecCameras, trilist, joinMap); + } + }; + + if (codec is ICommunicationMonitor) + { + LinkVideoCodecCommMonitorToApi(codec as ICommunicationMonitor, trilist, joinMap); + } + + + if (codec is IHasCodecSelfView) + { + LinkVideoCodecSelfviewToApi(codec as IHasCodecSelfView, trilist, joinMap); + } + + if (codec is IHasCameraAutoMode) + { + trilist.SetBool(joinMap.CameraSupportsAutoMode.JoinNumber, SupportsCameraAutoMode); + LinkVideoCodecCameraModeToApi(codec as IHasCameraAutoMode, trilist, joinMap); + } + + if (codec is IHasCameraOff) + { + trilist.SetBool(joinMap.CameraSupportsOffMode.JoinNumber, SupportsCameraOff); + LinkVideoCodecCameraOffToApi(codec as IHasCameraOff, trilist, joinMap); + } + + if (codec is IHasCodecLayouts) + { + LinkVideoCodecCameraLayoutsToApi(codec as IHasCodecLayouts, trilist, joinMap); + } + + + if (codec is IHasSelfviewPosition) + { + LinkVideoCodecSelfviewPositionToApi(codec as IHasSelfviewPosition, trilist, joinMap); + } + + if (codec is IHasDirectory) + { + LinkVideoCodecDirectoryToApi(codec as IHasDirectory, trilist, joinMap); + } + + if (codec is IHasScheduleAwareness) + { + LinkVideoCodecScheduleToApi(codec as IHasScheduleAwareness, trilist, joinMap); + } + + if (codec is IHasParticipants) + { + LinkVideoCodecParticipantsToApi(codec as IHasParticipants, trilist, joinMap); + } + + if (codec is IHasFarEndContentStatus) + { + (codec as IHasFarEndContentStatus).ReceivingContent.LinkInputSig(trilist.BooleanInput[joinMap.RecievingContent.JoinNumber]); + } + + if (codec is IHasPhoneDialing) + { + LinkVideoCodecPhoneToApi(codec as IHasPhoneDialing, trilist, joinMap); + } + + if (codec is IHasCallHistory) + { + LinkVideoCodecCallHistoryToApi(codec as IHasCallHistory, trilist, joinMap); + } + + trilist.OnlineStatusChange += (device, args) => + { + if (!args.DeviceOnLine) return; + + if (codec is IHasDirectory) + { + (codec as IHasDirectory).SetCurrentDirectoryToRoot(); + } + + if (codec is IHasScheduleAwareness) + { + (codec as IHasScheduleAwareness).GetSchedule(); + } + + if (codec is IHasParticipants) + { + UpdateParticipantsXSig((codec as IHasParticipants).Participants.CurrentParticipants); + } + + if (codec is IHasCameraAutoMode) + { + trilist.SetBool(joinMap.CameraSupportsAutoMode.JoinNumber, SupportsCameraAutoMode); + + (codec as IHasCameraAutoMode).CameraAutoModeIsOnFeedback.FireUpdate(); + } + + if (codec is IHasCodecSelfView) + { + (codec as IHasCodecSelfView).SelfviewIsOnFeedback.FireUpdate(); + } + + if (codec is IHasCameraAutoMode) + { + (codec as IHasCameraAutoMode).CameraAutoModeIsOnFeedback.FireUpdate(); + } + + if (codec is IHasCameraOff) + { + (codec as IHasCameraOff).CameraIsOffFeedback.FireUpdate(); + } + + if (codec is IHasPhoneDialing) + { + (codec as IHasPhoneDialing).PhoneOffHookFeedback.FireUpdate(); + } + + if (codec is IHasCallHistory) + { + UpdateCallHistory((codec as IHasCallHistory), trilist, joinMap); + } + + SharingContentIsOnFeedback.FireUpdate(); + }; + } + + private void LinkVideoCodecInfoToApi(BasicTriList trilist, VideoCodecControllerJoinMap joinMap) + { + trilist.SetBool(joinMap.MultiSiteOptionIsEnabled.JoinNumber, this.CodecInfo.MultiSiteOptionIsEnabled); + trilist.SetBool(joinMap.AutoAnswerEnabled.JoinNumber, this.CodecInfo.AutoAnswerEnabled); + trilist.SetString(joinMap.DeviceIpAddresss.JoinNumber, this.CodecInfo.IpAddress); + trilist.SetString(joinMap.SipPhoneNumber.JoinNumber, this.CodecInfo.SipPhoneNumber); + trilist.SetString(joinMap.E164Alias.JoinNumber, this.CodecInfo.E164Alias); + trilist.SetString(joinMap.H323Id.JoinNumber, this.CodecInfo.H323Id); + trilist.SetString(joinMap.SipUri.JoinNumber, this.CodecInfo.SipUri); + + trilist.OnlineStatusChange += (o, a) => + { + if (a.DeviceOnLine) + { + trilist.SetBool(joinMap.MultiSiteOptionIsEnabled.JoinNumber, this.CodecInfo.MultiSiteOptionIsEnabled); + trilist.SetBool(joinMap.AutoAnswerEnabled.JoinNumber, this.CodecInfo.AutoAnswerEnabled); + trilist.SetString(joinMap.DeviceIpAddresss.JoinNumber, this.CodecInfo.IpAddress); + trilist.SetString(joinMap.SipPhoneNumber.JoinNumber, this.CodecInfo.SipPhoneNumber); + trilist.SetString(joinMap.E164Alias.JoinNumber, this.CodecInfo.E164Alias); + trilist.SetString(joinMap.H323Id.JoinNumber, this.CodecInfo.H323Id); + trilist.SetString(joinMap.SipUri.JoinNumber, this.CodecInfo.SipUri); + } + }; + } + + private void LinkVideoCodecPhoneToApi(IHasPhoneDialing codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) + { + codec.PhoneOffHookFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PhoneHookState.JoinNumber]); + + trilist.SetSigFalseAction(joinMap.DialPhone.JoinNumber, + () => codec.DialPhoneCall(trilist.StringOutput[joinMap.PhoneDialString.JoinNumber].StringValue)); + + trilist.SetSigFalseAction(joinMap.HangUpPhone.JoinNumber, codec.EndPhoneCall); + } + + private void LinkVideoCodecSelfviewPositionToApi(IHasSelfviewPosition codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) + { + trilist.SetSigFalseAction(joinMap.SelfviewPosition.JoinNumber, codec.SelfviewPipPositionToggle); + + codec.SelfviewPipPositionFeedback.LinkInputSig(trilist.StringInput[joinMap.SelfviewPositionFb.JoinNumber]); + } + + private void LinkVideoCodecCameraOffToApi(IHasCameraOff codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) + { + trilist.SetSigFalseAction(joinMap.CameraModeOff.JoinNumber, codec.CameraOff); + + codec.CameraIsOffFeedback.OutputChange += (o, a) => + { + if (a.BoolValue) + { + trilist.SetBool(joinMap.CameraModeOff.JoinNumber, true); + trilist.SetBool(joinMap.CameraModeManual.JoinNumber, false); + trilist.SetBool(joinMap.CameraModeAuto.JoinNumber, false); + return; + } + + trilist.SetBool(joinMap.CameraModeOff.JoinNumber, false); + + var autoCodec = codec as IHasCameraAutoMode; + + if (autoCodec == null) return; + + trilist.SetBool(joinMap.CameraModeAuto.JoinNumber, autoCodec.CameraAutoModeIsOnFeedback.BoolValue); + trilist.SetBool(joinMap.CameraModeManual.JoinNumber, !autoCodec.CameraAutoModeIsOnFeedback.BoolValue); + }; + + if (codec.CameraIsOffFeedback.BoolValue) + { + trilist.SetBool(joinMap.CameraModeOff.JoinNumber, true); + trilist.SetBool(joinMap.CameraModeManual.JoinNumber, false); + trilist.SetBool(joinMap.CameraModeAuto.JoinNumber, false); + return; + } + + trilist.SetBool(joinMap.CameraModeOff.JoinNumber, false); + + var autoModeCodec = codec as IHasCameraAutoMode; + + if (autoModeCodec == null) return; + + trilist.SetBool(joinMap.CameraModeAuto.JoinNumber, autoModeCodec.CameraAutoModeIsOnFeedback.BoolValue); + trilist.SetBool(joinMap.CameraModeManual.JoinNumber, !autoModeCodec.CameraAutoModeIsOnFeedback.BoolValue); + } + + private void LinkVideoCodecVolumeToApi(BasicTriList trilist, VideoCodecControllerJoinMap joinMap) + { + MuteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VolumeMuteOn.JoinNumber]); + MuteFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.VolumeMuteOff.JoinNumber]); + + trilist.SetSigFalseAction(joinMap.VolumeMuteOn.JoinNumber, MuteOn); + trilist.SetSigFalseAction(joinMap.VolumeMuteOff.JoinNumber, MuteOff); + trilist.SetSigFalseAction(joinMap.VolumeMuteToggle.JoinNumber, MuteToggle); + + VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[joinMap.VolumeLevel.JoinNumber]); + + trilist.SetBoolSigAction(joinMap.VolumeUp.JoinNumber, VolumeUp); + trilist.SetBoolSigAction(joinMap.VolumeDown.JoinNumber, VolumeDown); + + trilist.SetUShortSigAction(joinMap.VolumeLevel.JoinNumber, SetVolume); + + } + + private void LinkVideoCodecPrivacyToApi(BasicTriList trilist, VideoCodecControllerJoinMap joinMap) + { + PrivacyModeIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.MicMuteOn.JoinNumber]); + PrivacyModeIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.MicMuteOff.JoinNumber]); + + trilist.SetSigFalseAction(joinMap.MicMuteOn.JoinNumber, PrivacyModeOn); + trilist.SetSigFalseAction(joinMap.MicMuteOff.JoinNumber, PrivacyModeOff); + trilist.SetSigFalseAction(joinMap.MicMuteToggle.JoinNumber, PrivacyModeToggle); + } + + private void LinkVideoCodecCommMonitorToApi(ICommunicationMonitor codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) + { + codec.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]); + } + + private void LinkVideoCodecParticipantsToApi(IHasParticipants codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) + { + // make sure to update the values when the EISC comes online + trilist.OnlineStatusChange += (sender, args) => + { + if (sender.IsOnline) + { + UpdateParticipantsXSig(codec, trilist, joinMap); + } + }; + + // set actions and update the values when the list changes + codec.Participants.ParticipantsListHasChanged += (sender, args) => + { + SetParticipantActions(trilist, joinMap, codec.Participants.CurrentParticipants); + + UpdateParticipantsXSig(codec, trilist, joinMap); + }; + + trilist.OnlineStatusChange += (device, args) => + { + if (!args.DeviceOnLine) return; + + // TODO [ ] Issue #868 + trilist.SetString(joinMap.CurrentParticipants.JoinNumber, "\xFC"); + UpdateParticipantsXSig(codec, trilist, joinMap); + }; + } + + private void UpdateParticipantsXSig(IHasParticipants codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) + { + string participantsXSig; + + if (codec.Participants.CurrentParticipants.Count == 0) + { + participantsXSig = Encoding.GetEncoding(XSigEncoding).GetString(_clearBytes, 0, _clearBytes.Length); + trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig); + trilist.SetUshort(joinMap.ParticipantCount.JoinNumber, (ushort)codec.Participants.CurrentParticipants.Count); + return; + } + + participantsXSig = UpdateParticipantsXSig(codec.Participants.CurrentParticipants); + + trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig); + + trilist.SetUshort(joinMap.ParticipantCount.JoinNumber, (ushort)codec.Participants.CurrentParticipants.Count); + } + + /// + /// Sets the actions for each participant in the list + /// + private void SetParticipantActions(BasicTriList trilist, VideoCodecControllerJoinMap joinMap, List currentParticipants) + { + uint index = 0; // track the index of the participant in the + + foreach (var participant in currentParticipants) + { + var p = participant; + if (index > MaxParticipants) break; + + var audioMuteCodec = this as IHasParticipantAudioMute; + if (audioMuteCodec != null) + { + trilist.SetSigFalseAction(joinMap.ParticipantAudioMuteToggleStart.JoinNumber + index, + () => audioMuteCodec.ToggleAudioForParticipant(p.UserId)); + + trilist.SetSigFalseAction(joinMap.ParticipantVideoMuteToggleStart.JoinNumber + index, + () => audioMuteCodec.ToggleVideoForParticipant(p.UserId)); + } + + var pinCodec = this as IHasParticipantPinUnpin; + if (pinCodec != null) + { + trilist.SetSigFalseAction(joinMap.ParticipantPinToggleStart.JoinNumber + index, + () => pinCodec.ToggleParticipantPinState(p.UserId, pinCodec.ScreenIndexToPinUserTo)); + } + + index++; + } + + // Clear out any previously set actions + while (index < MaxParticipants) + { + trilist.ClearBoolSigAction(joinMap.ParticipantAudioMuteToggleStart.JoinNumber + index); + trilist.ClearBoolSigAction(joinMap.ParticipantVideoMuteToggleStart.JoinNumber + index); + trilist.ClearBoolSigAction(joinMap.ParticipantPinToggleStart.JoinNumber + index); + + index++; + } + } + + private string UpdateParticipantsXSig(List currentParticipants) + { + const int maxParticipants = MaxParticipants; + const int maxDigitals = 7; + const int maxStrings = 1; + const int maxAnalogs = 1; + const int offset = maxDigitals + maxStrings + maxAnalogs; // 9 + var digitalIndex = (maxStrings + maxAnalogs) * maxParticipants; // 100 + var stringIndex = 0; + var analogIndex = stringIndex + maxParticipants; + var meetingIndex = 0; + + var tokenArray = new XSigToken[maxParticipants * offset]; + + foreach (var participant in currentParticipants) + { + if (meetingIndex >= maxParticipants * offset) break; + + // Debug.Console(2, this, + //@"Updating Participant on xsig: + //Name: {0} (s{9}) + //AudioMute: {1} (d{10}) + //VideoMute: {2} (d{11}) + //CanMuteVideo: {3} (d{12}) + //CanUMuteVideo: {4} (d{13}) + //IsHost: {5} (d{14}) + //HandIsRaised: {6} (d{15}) + //IsPinned: {7} (d{16}) + //ScreenIndexIsPinnedTo: {8} (a{17}) + //", + // participant.Name, + // participant.AudioMuteFb, + // participant.VideoMuteFb, + // participant.CanMuteVideo, + // participant.CanUnmuteVideo, + // participant.IsHost, + // participant.HandIsRaisedFb, + // participant.IsPinnedFb, + // participant.ScreenIndexIsPinnedToFb, + // stringIndex + 1, + // digitalIndex + 1, + // digitalIndex + 2, + // digitalIndex + 3, + // digitalIndex + 4, + // digitalIndex + 5, + // digitalIndex + 6, + // digitalIndex + 7, + // analogIndex + 1 + // ); + + + //digitals + tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, participant.AudioMuteFb); + tokenArray[digitalIndex + 1] = new XSigDigitalToken(digitalIndex + 2, participant.VideoMuteFb); + tokenArray[digitalIndex + 2] = new XSigDigitalToken(digitalIndex + 3, participant.CanMuteVideo); + tokenArray[digitalIndex + 3] = new XSigDigitalToken(digitalIndex + 4, participant.CanUnmuteVideo); + tokenArray[digitalIndex + 4] = new XSigDigitalToken(digitalIndex + 5, participant.IsHost); + tokenArray[digitalIndex + 5] = new XSigDigitalToken(digitalIndex + 6, participant.HandIsRaisedFb); + tokenArray[digitalIndex + 6] = new XSigDigitalToken(digitalIndex + 7, participant.IsPinnedFb); + + Debug.Console(2, this, "Index: {0} byte value: {1}", digitalIndex + 7, ComTextHelper.GetEscapedText(tokenArray[digitalIndex + 6].GetBytes())); + + //serials + tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, participant.Name); + + //analogs + tokenArray[analogIndex] = new XSigAnalogToken(analogIndex + 1, (ushort)participant.ScreenIndexIsPinnedToFb); + + digitalIndex += maxDigitals; + meetingIndex += offset; + stringIndex += maxStrings; + analogIndex += maxAnalogs; + } + + while (meetingIndex < maxParticipants * offset) + { + //digitals + tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, false); + tokenArray[digitalIndex + 1] = new XSigDigitalToken(digitalIndex + 2, false); + tokenArray[digitalIndex + 2] = new XSigDigitalToken(digitalIndex + 3, false); + tokenArray[digitalIndex + 3] = new XSigDigitalToken(digitalIndex + 4, false); + tokenArray[digitalIndex + 4] = new XSigDigitalToken(digitalIndex + 5, false); + tokenArray[digitalIndex + 5] = new XSigDigitalToken(digitalIndex + 6, false); + tokenArray[digitalIndex + 6] = new XSigDigitalToken(digitalIndex + 7, false); + + //serials + tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, String.Empty); + + //analogs + tokenArray[analogIndex] = new XSigAnalogToken(analogIndex + 1, 0); + + digitalIndex += maxDigitals; + meetingIndex += offset; + stringIndex += maxStrings; + analogIndex += maxAnalogs; + } + + var returnString = GetXSigString(tokenArray); + + //Debug.Console(2, this, "{0}", ComTextHelper.GetEscapedText(Encoding.GetEncoding(28591).GetBytes(returnString))); + + + return returnString; + } + + private void LinkVideoCodecContentSharingToApi(BasicTriList trilist, VideoCodecControllerJoinMap joinMap) + { + SharingContentIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.SourceShareStart.JoinNumber]); + SharingContentIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.SourceShareEnd.JoinNumber]); + + SharingSourceFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentSource.JoinNumber]); + + trilist.SetSigFalseAction(joinMap.SourceShareStart.JoinNumber, StartSharing); + trilist.SetSigFalseAction(joinMap.SourceShareEnd.JoinNumber, StopSharing); + + trilist.SetBoolSigAction(joinMap.SourceShareAutoStart.JoinNumber, b => AutoShareContentWhileInCall = b); + } + + private List _currentMeetings = new List(); + + private void LinkVideoCodecScheduleToApi(IHasScheduleAwareness codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) + { + trilist.SetSigFalseAction(joinMap.UpdateMeetings.JoinNumber, codec.GetSchedule); + + trilist.SetUShortSigAction(joinMap.MinutesBeforeMeetingStart.JoinNumber, (i) => + { + codec.CodecSchedule.MeetingWarningMinutes = i; + }); + + + for (uint i = 0; i < joinMap.DialMeetingStart.JoinSpan; i++) + { + Debug.Console(1, this, "Setting action to Dial Meeting {0} to digital join {1}", i + 1, joinMap.DialMeetingStart.JoinNumber + i); + var joinNumber = joinMap.DialMeetingStart.JoinNumber + i; + var mtg = i + 1; + var index = (int)i; + + trilist.SetSigFalseAction(joinNumber, () => + { + Debug.Console(1, this, "Meeting {0} Selected (EISC dig-o{1}) > _currentMeetings[{2}].Id: {3}, Title: {4}", + mtg, joinMap.DialMeetingStart.JoinNumber + i, index, _currentMeetings[index].Id, _currentMeetings[index].Title); + if (_currentMeetings[index] != null) + Dial(_currentMeetings[index]); + }); + } + + codec.CodecSchedule.MeetingsListHasChanged += (sender, args) => UpdateMeetingsList(codec, trilist, joinMap); + codec.CodecSchedule.MeetingEventChange += (sender, args) => + { + if (args.ChangeType == eMeetingEventChangeType.MeetingStartWarning) + { + UpdateMeetingsList(codec, trilist, joinMap); + } + }; + + trilist.SetUShortSigAction(joinMap.MeetingsToDisplay.JoinNumber, m => MeetingsToDisplay = m); + MeetingsToDisplayFeedback.LinkInputSig(trilist.UShortInput[joinMap.MeetingsToDisplay.JoinNumber]); + + trilist.OnlineStatusChange += (device, args) => + { + if (!args.DeviceOnLine) return; + + // TODO [ ] Issue #868 + trilist.SetString(joinMap.Schedule.JoinNumber, "\xFC"); + UpdateMeetingsList(codec, trilist, joinMap); + // TODO [ ] hotfix/videocodecbase-max-meeting-xsig-set + MeetingsToDisplayFeedback.LinkInputSig(trilist.UShortInput[joinMap.MeetingsToDisplay.JoinNumber]); + }; + } + + private void UpdateMeetingsList(IHasScheduleAwareness codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) + { + var currentTime = DateTime.Now; + + _currentMeetings = codec.CodecSchedule.Meetings.Where(m => m.StartTime >= currentTime || m.EndTime >= currentTime).ToList(); + + if (_currentMeetings.Count == 0) + { + var emptyXSigByteArray = XSigHelpers.ClearOutputs(); + var emptyXSigString = Encoding.GetEncoding(XSigEncoding) + .GetString(emptyXSigByteArray, 0, emptyXSigByteArray.Length); + + trilist.SetString(joinMap.Schedule.JoinNumber, emptyXSigString); + return; + } + + var meetingsData = UpdateMeetingsListXSig(_currentMeetings); + trilist.SetString(joinMap.Schedule.JoinNumber, meetingsData); + trilist.SetUshort(joinMap.MeetingCount.JoinNumber, (ushort)_currentMeetings.Count); + + trilist.OnlineStatusChange += (device, args) => + { + if (!args.DeviceOnLine) return; + + // TODO [ ] Issue #868 + trilist.SetString(joinMap.Schedule.JoinNumber, "\xFC"); + UpdateMeetingsListXSig(_currentMeetings); + }; + } + + + // TODO [ ] hotfix/videocodecbase-max-meeting-xsig-set + private int _meetingsToDisplay = 3; + // TODO [ ] hotfix/videocodecbase-max-meeting-xsig-set + protected int MeetingsToDisplay + { + get { return _meetingsToDisplay; } + set { + _meetingsToDisplay = (ushort) (value == 0 ? 3 : value); + MeetingsToDisplayFeedback.FireUpdate(); + } + } + + // TODO [ ] hotfix/videocodecbase-max-meeting-xsig-set + public IntFeedback MeetingsToDisplayFeedback { get; set; } + + private string UpdateMeetingsListXSig(List meetings) + { + // TODO [ ] hotfix/videocodecbase-max-meeting-xsig-set + //const int _meetingsToDisplay = 3; + const int maxDigitals = 2; + const int maxStrings = 7; + const int offset = maxDigitals + maxStrings; + var digitalIndex = maxStrings * _meetingsToDisplay; //15 + var stringIndex = 0; + var meetingIndex = 0; + + var tokenArray = new XSigToken[_meetingsToDisplay * offset]; + /* + * Digitals + * IsJoinable - 1 + * IsDialable - 2 + * + * Serials + * Organizer - 1 + * Title - 2 + * Start Date - 3 + * Start Time - 4 + * End Date - 5 + * End Time - 6 + * Id - 7 + */ + + + foreach (var meeting in meetings) + { + var currentTime = DateTime.Now; + + if (meeting.StartTime < currentTime && meeting.EndTime < currentTime) continue; + + if (meetingIndex >= _meetingsToDisplay * offset) + { + Debug.Console(2, this, "Max Meetings reached"); + break; + } + + //digitals + tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, meeting.Joinable); + tokenArray[digitalIndex + 1] = new XSigDigitalToken(digitalIndex + 2, meeting.Id != "0"); + + //serials + tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, meeting.Organizer); + tokenArray[stringIndex + 1] = new XSigSerialToken(stringIndex + 2, meeting.Title); + tokenArray[stringIndex + 2] = new XSigSerialToken(stringIndex + 3, meeting.StartTime.ToString(_dateFormatSpecifier.NullIfEmpty() ?? "d", Global.Culture)); + tokenArray[stringIndex + 3] = new XSigSerialToken(stringIndex + 4, meeting.StartTime.ToString(_timeFormatSpecifier.NullIfEmpty() ?? "t", Global.Culture)); + tokenArray[stringIndex + 4] = new XSigSerialToken(stringIndex + 5, meeting.EndTime.ToString(_dateFormatSpecifier.NullIfEmpty() ?? "d", Global.Culture)); + tokenArray[stringIndex + 5] = new XSigSerialToken(stringIndex + 6, meeting.EndTime.ToString(_timeFormatSpecifier.NullIfEmpty() ?? "t", Global.Culture)); + tokenArray[stringIndex + 6] = new XSigSerialToken(stringIndex + 7, meeting.Id); + + digitalIndex += maxDigitals; + meetingIndex += offset; + stringIndex += maxStrings; + } + + while (meetingIndex < _meetingsToDisplay * offset) + { + Debug.Console(2, this, "Clearing unused data. Meeting Index: {0} MaxMeetings * Offset: {1}", + meetingIndex, _meetingsToDisplay * offset); + + //digitals + tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, false); + tokenArray[digitalIndex + 1] = new XSigDigitalToken(digitalIndex + 2, false); + + //serials + tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, String.Empty); + tokenArray[stringIndex + 1] = new XSigSerialToken(stringIndex + 2, String.Empty); + tokenArray[stringIndex + 2] = new XSigSerialToken(stringIndex + 3, String.Empty); + tokenArray[stringIndex + 3] = new XSigSerialToken(stringIndex + 4, String.Empty); + tokenArray[stringIndex + 4] = new XSigSerialToken(stringIndex + 5, String.Empty); + tokenArray[stringIndex + 5] = new XSigSerialToken(stringIndex + 6, String.Empty); + tokenArray[stringIndex + 6] = new XSigSerialToken(stringIndex + 7, String.Empty); + + digitalIndex += maxDigitals; + meetingIndex += offset; + stringIndex += maxStrings; + } + + return GetXSigString(tokenArray); + } + + + private void LinkVideoCodecDirectoryToApi(IHasDirectory codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) + { + codec.CurrentDirectoryResultIsNotDirectoryRoot.LinkComplementInputSig( + trilist.BooleanInput[joinMap.DirectoryIsRoot.JoinNumber]); + + trilist.SetStringSigAction(joinMap.DirectorySearchString.JoinNumber, codec.SearchDirectory); + + trilist.SetUShortSigAction(joinMap.DirectorySelectRow.JoinNumber, (i) => SelectDirectoryEntry(codec, i, trilist, joinMap)); + + //Special Change for protected directory clear + + trilist.SetBoolSigAction(joinMap.DirectoryClearSelected.JoinNumber, (b) => SelectDirectoryEntry(_directoryCodec, 0, _directoryTrilist, _directoryJoinmap)); + + // Report feedback for number of contact methods for selected contact + + trilist.SetSigFalseAction(joinMap.DirectoryRoot.JoinNumber, codec.SetCurrentDirectoryToRoot); + + trilist.SetSigFalseAction(joinMap.DirectoryFolderBack.JoinNumber, codec.GetDirectoryParentFolderContents); + + if (codec.DirectoryRoot != null) + { + var contactsCount = codec.DirectoryRoot.CurrentDirectoryResults.Where(c => c.ParentFolderId.Equals("root")).ToList().Count; + trilist.SetUshort(joinMap.DirectoryRowCount.JoinNumber, (ushort)contactsCount); + Debug.Console(2, this, ">>> contactsCount: {0}", contactsCount); + + var clearBytes = XSigHelpers.ClearOutputs(); + + trilist.SetString(joinMap.DirectoryEntries.JoinNumber, + Encoding.GetEncoding(XSigEncoding).GetString(clearBytes, 0, clearBytes.Length)); + var directoryXSig = UpdateDirectoryXSig(codec.DirectoryRoot, + codec.CurrentDirectoryResultIsNotDirectoryRoot.BoolValue == false); + + Debug.Console(2, this, "Directory XSig Length: {0}", directoryXSig.Length); + + trilist.SetString(joinMap.DirectoryEntries.JoinNumber, directoryXSig); + } + + codec.DirectoryResultReturned += (sender, args) => + { + var isRoot = codec.CurrentDirectoryResultIsNotDirectoryRoot.BoolValue == false; + var argsCount = isRoot + ? args.Directory.CurrentDirectoryResults.Where(a => a.ParentFolderId.Equals("root")).ToList().Count + : args.Directory.CurrentDirectoryResults.Count; + + trilist.SetUshort(joinMap.DirectoryRowCount.JoinNumber, (ushort)argsCount); + Debug.Console(2, this, ">>> argsCount: {0}", argsCount); + + var clearBytes = XSigHelpers.ClearOutputs(); + + trilist.SetString(joinMap.DirectoryEntries.JoinNumber, + Encoding.GetEncoding(XSigEncoding).GetString(clearBytes, 0, clearBytes.Length)); + var directoryXSig = UpdateDirectoryXSig(args.Directory, + codec.CurrentDirectoryResultIsNotDirectoryRoot.BoolValue == false); + Debug.Console(2, this, "Directory XSig Length: {0}", directoryXSig.Length); + + trilist.SetString(joinMap.DirectoryEntries.JoinNumber, directoryXSig); + }; + + trilist.OnlineStatusChange += (device, args) => + { + if (!args.DeviceOnLine) return; + + var clearBytes = XSigHelpers.ClearOutputs(); + trilist.SetString(joinMap.DirectoryEntries.JoinNumber, + Encoding.GetEncoding(XSigEncoding).GetString(clearBytes, 0, clearBytes.Length)); + var directoryXSig = UpdateDirectoryXSig(codec.DirectoryRoot, codec.CurrentDirectoryResultIsNotDirectoryRoot.BoolValue == false); + trilist.SetString(joinMap.DirectoryEntries.JoinNumber, directoryXSig); + }; + } + + private void SelectDirectoryEntry(IHasDirectory codec, ushort i, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) + { + if (i > codec.CurrentDirectoryResult.CurrentDirectoryResults.Count) return; + _selectedDirectoryItem = i == 0 ? null : codec.CurrentDirectoryResult.CurrentDirectoryResults[i - 1]; + trilist.SetUshort(joinMap.DirectorySelectRowFeedback.JoinNumber, i); + + if (_selectedDirectoryItem == null) trilist.SetBool(joinMap.DirectoryEntryIsContact.JoinNumber, false); + + + if (_selectedDirectoryItem is DirectoryFolder) + { + codec.GetDirectoryFolderContents(_selectedDirectoryItem.FolderId); + trilist.SetUshort(joinMap.SelectedContactMethodCount.JoinNumber, 0); + trilist.SetString(joinMap.DirectorySelectedFolderName.JoinNumber, _selectedDirectoryItem.Name); + trilist.SetString(joinMap.DirectoryEntrySelectedName.JoinNumber, string.Empty); + trilist.ClearUShortSigAction(joinMap.SelectContactMethod.JoinNumber); + trilist.ClearBoolSigAction(joinMap.DirectoryDialSelectedLine.JoinNumber); + trilist.ClearBoolSigAction(joinMap.DirectoryDialSelectedContactMethod.JoinNumber); + trilist.SetBool(joinMap.DirectoryEntryIsContact.JoinNumber, false); + return; + } + + // not a folder. Clear this value + trilist.SetString(joinMap.DirectorySelectedFolderName.JoinNumber, string.Empty); + + var selectedContact = _selectedDirectoryItem as DirectoryContact; + + if (selectedContact != null && selectedContact.ContactMethods.Count >= 1) + { + trilist.SetBool(joinMap.DirectoryEntryIsContact.JoinNumber, true); + } + + trilist.SetString(joinMap.DirectoryEntrySelectedName.JoinNumber, + selectedContact != null ? selectedContact.Name : string.Empty); + + // Allow auto dial of selected line. Always dials first contact method + if (!trilist.GetBool(joinMap.DirectoryDisableAutoDialSelectedLine.JoinNumber)) + { + var invitableEntry = _selectedDirectoryItem as IInvitableContact; + + if (invitableEntry != null) + { + Dial(invitableEntry); + return; + } + + var entryToDial = _selectedDirectoryItem as DirectoryContact; + + trilist.SetString(joinMap.DirectoryEntrySelectedNumber.JoinNumber, + selectedContact != null ? selectedContact.ContactMethods[0].Number : string.Empty); + + if (entryToDial == null) return; + + Dial(entryToDial.ContactMethods[0].Number); + } + else + { + // If auto dial is disabled... + var entryToDial = _selectedDirectoryItem as DirectoryContact; + + if (entryToDial == null) + { + // Clear out values and actions from last selected item + trilist.SetUshort(joinMap.SelectedContactMethodCount.JoinNumber, 0); + trilist.SetString(joinMap.DirectoryEntrySelectedName.JoinNumber, string.Empty); + trilist.ClearUShortSigAction(joinMap.SelectContactMethod.JoinNumber); + trilist.ClearBoolSigAction(joinMap.DirectoryDialSelectedLine.JoinNumber); + trilist.ClearBoolSigAction(joinMap.DirectoryDialSelectedContactMethod.JoinNumber); + return; + } + + trilist.SetUshort(joinMap.SelectedContactMethodCount.JoinNumber, (ushort)entryToDial.ContactMethods.Count); + + // Update the action to dial the selected contact method + trilist.SetUShortSigAction(joinMap.SelectContactMethod.JoinNumber, (u) => + { + if (u < 1 || u > entryToDial.ContactMethods.Count) return; + + trilist.SetSigFalseAction(joinMap.DirectoryDialSelectedContactMethod.JoinNumber, () => Dial(entryToDial.ContactMethods[u - 1].Number)); + }); + + // Sets DirectoryDialSelectedLine join action to dial first contact method + trilist.SetSigFalseAction(joinMap.DirectoryDialSelectedLine.JoinNumber, () => Dial(entryToDial.ContactMethods[0].Number)); + + var clearBytes = XSigHelpers.ClearOutputs(); + + trilist.SetString(joinMap.ContactMethods.JoinNumber, + Encoding.GetEncoding(XSigEncoding).GetString(clearBytes, 0, clearBytes.Length)); + var contactMethodsXSig = UpdateContactMethodsXSig(entryToDial); + + trilist.SetString(joinMap.ContactMethods.JoinNumber, contactMethodsXSig); + } + } + + /// + /// Generates the XSig data representing the available contact methods for the selected DirectoryContact + /// + /// + /// + private string UpdateContactMethodsXSig(DirectoryContact contact) + { + const int maxMethods = 10; + const int maxStrings = 3; + const int offset = maxStrings; + var stringIndex = 0; + var arrayIndex = 0; + // Create a new token array and set the size to the number of methods times the total number of signals + var tokenArray = new XSigToken[maxMethods * offset]; + + Debug.Console(2, this, "Creating XSIG token array with size {0}", maxMethods * offset); + + // TODO: Add code to generate XSig data + foreach (var method in contact.ContactMethods) + { + if (arrayIndex >= maxMethods * offset) + break; + + //serials + tokenArray[arrayIndex + 1] = new XSigSerialToken(stringIndex + 1, method.Number); + tokenArray[arrayIndex + 2] = new XSigSerialToken(stringIndex + 2, method.ContactMethodId.ToString()); + tokenArray[arrayIndex + 3] = new XSigSerialToken(stringIndex + 3, method.Device.ToString()); + + arrayIndex += offset; + stringIndex += maxStrings; + } + + while (arrayIndex < maxMethods) + { + tokenArray[arrayIndex + 1] = new XSigSerialToken(stringIndex + 1, String.Empty); + tokenArray[arrayIndex + 2] = new XSigSerialToken(stringIndex + 2, String.Empty); + tokenArray[arrayIndex + 3] = new XSigSerialToken(stringIndex + 3, String.Empty); + + arrayIndex += offset; + stringIndex += maxStrings; + } + + return GetXSigString(tokenArray); + } + + private string UpdateDirectoryXSig(CodecDirectory directory, bool isRoot) + { + var xSigMaxIndex = 1023; + var tokenArray = new XSigToken[directory.CurrentDirectoryResults.Count > xSigMaxIndex + ? xSigMaxIndex + : directory.CurrentDirectoryResults.Count]; + + Debug.Console(2, this, "IsRoot: {0}, Directory Count: {1}, TokenArray.Length: {2}", isRoot, directory.CurrentDirectoryResults.Count, tokenArray.Length); + + var contacts = directory.CurrentDirectoryResults.Count > xSigMaxIndex + ? directory.CurrentDirectoryResults.Take(xSigMaxIndex) + : directory.CurrentDirectoryResults; + + var contactsToDisplay = isRoot + ? contacts.Where(c => c.ParentFolderId == "root") + : contacts.Where(c => c.ParentFolderId != "root"); + + var counterIndex = 1; + foreach (var entry in contactsToDisplay) + { + var arrayIndex = counterIndex - 1; + var entryIndex = counterIndex; + + Debug.Console(2, this, "Entry{2:0000} Name: {0}, Folder ID: {1}, Type: {3}, ParentFolderId: {4}", + entry.Name, entry.FolderId, entryIndex, entry.GetType().GetCType().FullName, entry.ParentFolderId); + + if (entry is DirectoryFolder) + { + tokenArray[arrayIndex] = new XSigSerialToken(entryIndex, String.Format("[+] {0}", entry.Name)); + + counterIndex++; + + continue; + } + + tokenArray[arrayIndex] = new XSigSerialToken(entryIndex, entry.Name); + + counterIndex++; + } + + return GetXSigString(tokenArray); + } + + private void LinkVideoCodecCallControlsToApi(BasicTriList trilist, VideoCodecControllerJoinMap joinMap) + { + trilist.SetSigFalseAction(joinMap.ManualDial.JoinNumber, + () => Dial(trilist.StringOutput[joinMap.CurrentDialString.JoinNumber].StringValue)); + + //End All calls + trilist.SetSigFalseAction(joinMap.EndAllCalls.JoinNumber, EndAllCalls); + + //End a specific call, specified by index. Maximum 8 calls supported + for (int i = 0; i < joinMap.EndCallStart.JoinSpan; i++) + { + var callIndex = i; + + trilist.SetSigFalseAction((uint)(joinMap.EndCallStart.JoinNumber + i), () => + { + + if (callIndex < 0 || callIndex >= ActiveCalls.Count) + { + Debug.Console(2, this, "Cannot end call. No call found at index: {0}", callIndex); + return; + } + + var call = ActiveCalls[callIndex]; + if (call != null) + { + EndCall(call); + } + else + { + Debug.Console(0, this, "[End Call] Unable to find call at index '{0}'", i); + } + }); + } + + trilist.SetBool(joinMap.HookState.JoinNumber, IsInCall); + + CallStatusChange += (sender, args) => + { + trilist.SetBool(joinMap.HookState.JoinNumber, IsInCall); + + Debug.Console(1, this, "Call Direction: {0}", args.CallItem.Direction); + Debug.Console(1, this, "Call is incoming: {0}", args.CallItem.Direction == eCodecCallDirection.Incoming); + trilist.SetBool(joinMap.IncomingCall.JoinNumber, args.CallItem.Direction == eCodecCallDirection.Incoming && args.CallItem.Status == eCodecCallStatus.Ringing); + + if (args.CallItem.Direction == eCodecCallDirection.Incoming) + { + trilist.SetSigFalseAction(joinMap.IncomingAnswer.JoinNumber, () => AcceptCall(args.CallItem)); + trilist.SetSigFalseAction(joinMap.IncomingReject.JoinNumber, () => RejectCall(args.CallItem)); + trilist.SetString(joinMap.IncomingCallName.JoinNumber, args.CallItem.Name); + trilist.SetString(joinMap.IncomingCallNumber.JoinNumber, args.CallItem.Number); + } + else + { + trilist.SetString(joinMap.IncomingCallName.JoinNumber, string.Empty); + trilist.SetString(joinMap.IncomingCallNumber.JoinNumber, string.Empty); + } + + + trilist.SetString(joinMap.CurrentCallData.JoinNumber, UpdateCallStatusXSig()); + + trilist.SetUshort(joinMap.ConnectedCallCount.JoinNumber, (ushort)ActiveCalls.Count); + }; + + var joinCodec = this as IJoinCalls; + if (joinCodec != null) + { + trilist.SetSigFalseAction(joinMap.JoinAllCalls.JoinNumber, () => joinCodec.JoinAllCalls()); + + for (int i = 0; i < joinMap.JoinCallStart.JoinSpan; i++) + { + trilist.SetSigFalseAction((uint)(joinMap.JoinCallStart.JoinNumber + i), () => + { + var call = ActiveCalls[i]; + if (call != null) + { + joinCodec.JoinCall(call); + } + else + { + Debug.Console(0, this, "[Join Call] Unable to find call at index '{0}'", i); + } + }); + } + } + + var holdCodec = this as IHasCallHold; + if (holdCodec != null) + { + trilist.SetSigFalseAction(joinMap.HoldAllCalls.JoinNumber, () => + { + foreach (var call in ActiveCalls) + { + holdCodec.HoldCall(call); + } + }); + + for (int i = 0; i < joinMap.HoldCallsStart.JoinSpan; i++) + { + var index = i; + + trilist.SetSigFalseAction((uint)(joinMap.HoldCallsStart.JoinNumber + index), () => + { + if (index < 0 || index >= ActiveCalls.Count) return; + + var call = ActiveCalls[index]; + if (call != null) + { + holdCodec.HoldCall(call); + } + else + { + Debug.Console(0, this, "[Hold Call] Unable to find call at index '{0}'", i); + } + }); + + trilist.SetSigFalseAction((uint)(joinMap.ResumeCallsStart.JoinNumber + index), () => + { + if (index < 0 || index >= ActiveCalls.Count) return; + + var call = ActiveCalls[index]; + if (call != null) + { + holdCodec.ResumeCall(call); + } + else + { + Debug.Console(0, this, "[Resume Call] Unable to find call at index '{0}'", i); + } + }); + } + } + + + + trilist.OnlineStatusChange += (device, args) => + { + if (!args.DeviceOnLine) return; + + // TODO [ ] #983 + Debug.Console(0, this, "LinkVideoCodecCallControlsToApi: device is {0}, IsInCall {1}", args.DeviceOnLine ? "online" : "offline", IsInCall); + trilist.SetBool(joinMap.HookState.JoinNumber, IsInCall); + trilist.SetString(joinMap.CurrentCallData.JoinNumber, "\xFC"); + trilist.SetString(joinMap.CurrentCallData.JoinNumber, UpdateCallStatusXSig()); + }; + } + + private string UpdateCallStatusXSig() + { + const int maxCalls = 8; + const int maxStrings = 6; + const int maxDigitals = 2; + const int offset = maxStrings + maxDigitals; + var stringIndex = 0; + var digitalIndex = maxStrings * maxCalls; + var arrayIndex = 0; + + var tokenArray = new XSigToken[maxCalls * offset]; //set array size for number of calls * pieces of info + + foreach (var call in ActiveCalls) + { + if (arrayIndex >= maxCalls * offset) + break; + //digitals + tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, call.IsActiveCall); + tokenArray[digitalIndex + 1] = new XSigDigitalToken(digitalIndex + 2, call.IsOnHold); + + //serials + tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, call.Name ?? String.Empty); + tokenArray[stringIndex + 1] = new XSigSerialToken(stringIndex + 2, call.Number ?? String.Empty); + tokenArray[stringIndex + 2] = new XSigSerialToken(stringIndex + 3, call.Direction.ToString()); + tokenArray[stringIndex + 3] = new XSigSerialToken(stringIndex + 4, call.Type.ToString()); + tokenArray[stringIndex + 4] = new XSigSerialToken(stringIndex + 5, call.Status.ToString()); + if(call.Duration != null) + { + // May need to verify correct string format here + var dur = string.Format("{0:c}", call.Duration); + tokenArray[arrayIndex + 6] = new XSigSerialToken(stringIndex + 6, dur); + } + + arrayIndex += offset; + stringIndex += maxStrings; + digitalIndex += maxDigitals; + } + while (arrayIndex < maxCalls * offset) + { + //digitals + tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, false); + tokenArray[digitalIndex + 1] = new XSigDigitalToken(digitalIndex + 2, false); + + + //serials + tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, String.Empty); + tokenArray[stringIndex + 1] = new XSigSerialToken(stringIndex + 2, String.Empty); + tokenArray[stringIndex + 2] = new XSigSerialToken(stringIndex + 3, String.Empty); + tokenArray[stringIndex + 3] = new XSigSerialToken(stringIndex + 4, String.Empty); + tokenArray[stringIndex + 4] = new XSigSerialToken(stringIndex + 5, String.Empty); + tokenArray[stringIndex + 5] = new XSigSerialToken(stringIndex + 6, String.Empty); + + arrayIndex += offset; + stringIndex += maxStrings; + digitalIndex += maxDigitals; + } + + return GetXSigString(tokenArray); + } + + private void LinkVideoCodecDtmfToApi(BasicTriList trilist, VideoCodecControllerJoinMap joinMap) + { + trilist.SetSigFalseAction(joinMap.Dtmf0.JoinNumber, () => SendDtmfAction("0", trilist, joinMap)); + trilist.SetSigFalseAction(joinMap.Dtmf1.JoinNumber, () => SendDtmfAction("1", trilist, joinMap)); + trilist.SetSigFalseAction(joinMap.Dtmf2.JoinNumber, () => SendDtmfAction("2", trilist, joinMap)); + trilist.SetSigFalseAction(joinMap.Dtmf3.JoinNumber, () => SendDtmfAction("3", trilist, joinMap)); + trilist.SetSigFalseAction(joinMap.Dtmf4.JoinNumber, () => SendDtmfAction("4", trilist, joinMap)); + trilist.SetSigFalseAction(joinMap.Dtmf5.JoinNumber, () => SendDtmfAction("5", trilist, joinMap)); + trilist.SetSigFalseAction(joinMap.Dtmf6.JoinNumber, () => SendDtmfAction("6", trilist, joinMap)); + trilist.SetSigFalseAction(joinMap.Dtmf7.JoinNumber, () => SendDtmfAction("7", trilist, joinMap)); + trilist.SetSigFalseAction(joinMap.Dtmf8.JoinNumber, () => SendDtmfAction("8", trilist, joinMap)); + trilist.SetSigFalseAction(joinMap.Dtmf9.JoinNumber, () => SendDtmfAction("9", trilist, joinMap)); + trilist.SetSigFalseAction(joinMap.DtmfStar.JoinNumber, () => SendDtmfAction("*", trilist, joinMap)); + trilist.SetSigFalseAction(joinMap.DtmfPound.JoinNumber, () => SendDtmfAction("#", trilist, joinMap)); + } + + /// + /// Sends the specified string as a DTMF command. + /// Reads the value of the SendDtmfToSpecificCallInstance digital join and SelectCall analog join to determine + /// Whther to send to a specific call index or to the last connected call + /// + /// + /// + /// + private void SendDtmfAction(string s, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) + { + if (!trilist.GetBool(joinMap.SendDtmfToSpecificCallIndex.JoinNumber)) + { + SendDtmf(s); + } + else + { + var callIndex = trilist.GetUshort(joinMap.SelectCall.JoinNumber); + if (callIndex > 0 && callIndex <= 8) + { + var call = ActiveCalls[callIndex - 1]; + if (call != null && call.IsActiveCall) + { + SendDtmf(s, call); + } + else + { + Debug.Console(0, this, "Warning: No call found at index {0} or call is not active.", callIndex); + } + } + else + { + Debug.Console(0, this, "Warning: Invalid call index specified. Please use a value of 1-8."); + } + } + } + + private void LinkVideoCodecCameraLayoutsToApi(IHasCodecLayouts codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) + { + trilist.SetSigFalseAction(joinMap.CameraLayout.JoinNumber, codec.LocalLayoutToggle); + + codec.LocalLayoutFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentLayoutStringFb.JoinNumber]); + } + + private void LinkVideoCodecCameraModeToApi(IHasCameraAutoMode codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) + { + trilist.SetSigFalseAction(joinMap.CameraModeAuto.JoinNumber, codec.CameraAutoModeOn); + trilist.SetSigFalseAction(joinMap.CameraModeManual.JoinNumber, codec.CameraAutoModeOff); + + codec.CameraAutoModeIsOnFeedback.OutputChange += (o, a) => + { + var offCodec = codec as IHasCameraOff; + + if (offCodec != null) + { + if (offCodec.CameraIsOffFeedback.BoolValue) + { + trilist.SetBool(joinMap.CameraModeAuto.JoinNumber, false); + trilist.SetBool(joinMap.CameraModeManual.JoinNumber, false); + trilist.SetBool(joinMap.CameraModeOff.JoinNumber, true); + return; + } + + trilist.SetBool(joinMap.CameraModeAuto.JoinNumber, a.BoolValue); + trilist.SetBool(joinMap.CameraModeManual.JoinNumber, !a.BoolValue); + trilist.SetBool(joinMap.CameraModeOff.JoinNumber, false); + return; + } + + trilist.SetBool(joinMap.CameraModeAuto.JoinNumber, a.BoolValue); + trilist.SetBool(joinMap.CameraModeManual.JoinNumber, !a.BoolValue); + trilist.SetBool(joinMap.CameraModeOff.JoinNumber, false); + }; + + var offModeCodec = codec as IHasCameraOff; + + if (offModeCodec != null) + { + if (offModeCodec.CameraIsOffFeedback.BoolValue) + { + trilist.SetBool(joinMap.CameraModeAuto.JoinNumber, false); + trilist.SetBool(joinMap.CameraModeManual.JoinNumber, false); + trilist.SetBool(joinMap.CameraModeOff.JoinNumber, true); + return; + } + + trilist.SetBool(joinMap.CameraModeAuto.JoinNumber, codec.CameraAutoModeIsOnFeedback.BoolValue); + trilist.SetBool(joinMap.CameraModeManual.JoinNumber, !codec.CameraAutoModeIsOnFeedback.BoolValue); + trilist.SetBool(joinMap.CameraModeOff.JoinNumber, false); + return; + } + + trilist.SetBool(joinMap.CameraModeAuto.JoinNumber, codec.CameraAutoModeIsOnFeedback.BoolValue); + trilist.SetBool(joinMap.CameraModeManual.JoinNumber, !codec.CameraAutoModeIsOnFeedback.BoolValue); + trilist.SetBool(joinMap.CameraModeOff.JoinNumber, false); + } + + private void LinkVideoCodecSelfviewToApi(IHasCodecSelfView codec, BasicTriList trilist, + VideoCodecControllerJoinMap joinMap) + { + trilist.SetSigFalseAction(joinMap.CameraSelfView.JoinNumber, codec.SelfViewModeToggle); + + codec.SelfviewIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.CameraSelfView.JoinNumber]); + } + + private void LinkVideoCodecCameraToApi(IHasCodecCameras codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) + { + //Camera PTZ + trilist.SetBoolSigAction(joinMap.CameraTiltUp.JoinNumber, (b) => + { + if (codec.SelectedCamera == null) return; + var camera = codec.SelectedCamera as IHasCameraPtzControl; + + if (camera == null) return; + + if (b) camera.TiltUp(); + else camera.TiltStop(); + }); + + trilist.SetBoolSigAction(joinMap.CameraTiltDown.JoinNumber, (b) => + { + if (codec.SelectedCamera == null) return; + var camera = codec.SelectedCamera as IHasCameraPtzControl; + + if (camera == null) return; + + if (b) camera.TiltDown(); + else camera.TiltStop(); + }); + trilist.SetBoolSigAction(joinMap.CameraPanLeft.JoinNumber, (b) => + { + if (codec.SelectedCamera == null) return; + var camera = codec.SelectedCamera as IHasCameraPtzControl; + + if (camera == null) return; + + if (b) camera.PanLeft(); + else camera.PanStop(); + }); + trilist.SetBoolSigAction(joinMap.CameraPanRight.JoinNumber, (b) => + { + if (codec.SelectedCamera == null) return; + var camera = codec.SelectedCamera as IHasCameraPtzControl; + + if (camera == null) return; + + if (b) camera.PanRight(); + else camera.PanStop(); + }); + + trilist.SetBoolSigAction(joinMap.CameraZoomIn.JoinNumber, (b) => + { + if (codec.SelectedCamera == null) return; + var camera = codec.SelectedCamera as IHasCameraPtzControl; + + if (camera == null) return; + + if (b) camera.ZoomIn(); + else camera.ZoomStop(); + }); + + trilist.SetBoolSigAction(joinMap.CameraZoomOut.JoinNumber, (b) => + { + if (codec.SelectedCamera == null) return; + var camera = codec.SelectedCamera as IHasCameraPtzControl; + + if (camera == null) return; + + if (b) camera.ZoomOut(); + else camera.ZoomStop(); + }); + + + trilist.SetBoolSigAction(joinMap.CameraFocusNear.JoinNumber, (b) => + { + if (codec.SelectedCamera == null) return; + var camera = codec.SelectedCamera as IHasCameraFocusControl; + + if (camera == null) return; + + if (b) camera.FocusNear(); + else camera.FocusStop(); + }); + + trilist.SetBoolSigAction(joinMap.CameraFocusFar.JoinNumber, (b) => + { + if (codec.SelectedCamera == null) return; + var camera = codec.SelectedCamera as IHasCameraFocusControl; + + if (camera == null) return; + + if (b) camera.FocusFar(); + else camera.FocusStop(); + }); + + trilist.SetSigFalseAction(joinMap.CameraFocusAuto.JoinNumber, () => + { + if (codec.SelectedCamera == null) return; + var camera = codec.SelectedCamera as IHasCameraFocusControl; + + if (camera == null) return; + + camera.TriggerAutoFocus(); + }); + + // Camera count + trilist.SetUshort(joinMap.CameraCount.JoinNumber, (ushort)codec.Cameras.Count); + + // Camera names + for (uint i = 0; i < joinMap.CameraNamesFb.JoinSpan; i++) + { + //Check the count first + if (i < codec.Cameras.Count && codec.Cameras[(int)i] != null) + { + trilist.SetString(joinMap.CameraNamesFb.JoinNumber + i, codec.Cameras[(int)i].Name); + } + else + { + trilist.SetString(joinMap.CameraNamesFb.JoinNumber + i, ""); + } + } + + //Camera Select + trilist.SetUShortSigAction(joinMap.CameraNumberSelect.JoinNumber, (i) => + { + if (i > 0 && i <= codec.Cameras.Count) + { + codec.SelectCamera(codec.Cameras[i - 1].Key); + } + else + { + Debug.Console(0, this, "Unable to select. No camera found at index {0}", i); + } + }); + + // Set initial selected camera feedback + if (codec.SelectedCamera != null) + { + trilist.SetUshort(joinMap.CameraNumberSelect.JoinNumber, (ushort)codec.Cameras.FindIndex((c) => c.Key == codec.SelectedCamera.Key)); + } + + codec.CameraSelected += (sender, args) => + { + var i = (ushort)codec.Cameras.FindIndex((c) => c.Key == args.SelectedCamera.Key); + + trilist.SetUshort(joinMap.CameraNumberSelect.JoinNumber, (ushort)(i + 1)); + + if (codec is IHasCodecRoomPresets) + { + return; + } + + if (!(args.SelectedCamera is IHasCameraPresets)) + { + return; + } + + var cam = args.SelectedCamera as IHasCameraPresets; + SetCameraPresetNames(cam.Presets); + + (args.SelectedCamera as IHasCameraPresets).PresetsListHasChanged += (o, eventArgs) => SetCameraPresetNames(cam.Presets); + + trilist.SetUShortSigAction(joinMap.CameraPresetSelect.JoinNumber, + (a) => + { + cam.PresetSelect(a); + trilist.SetUshort(joinMap.CameraPresetSelect.JoinNumber, a); + }); + + trilist.SetSigFalseAction(joinMap.CameraPresetSave.JoinNumber, + () => + { + cam.PresetStore(trilist.UShortOutput[joinMap.CameraPresetSelect.JoinNumber].UShortValue, + String.Empty); + trilist.PulseBool(joinMap.CameraPresetSave.JoinNumber, 3000); + }); + }; + + if (!(codec is IHasCodecRoomPresets)) return; + + var presetCodec = codec as IHasCodecRoomPresets; + + presetCodec.CodecRoomPresetsListHasChanged += + (sender, args) => SetCameraPresetNames(presetCodec.NearEndPresets); + + //Camera Presets + trilist.SetUShortSigAction(joinMap.CameraPresetSelect.JoinNumber, (i) => + { + presetCodec.CodecRoomPresetSelect(i); + }); + + + // Far End Presets + trilist.SetUShortSigAction(joinMap.FarEndPresetSelect.JoinNumber, (i) => + { + presetCodec.SelectFarEndPreset(i); + }); + + + trilist.SetSigFalseAction(joinMap.CameraPresetSave.JoinNumber, + () => + { + presetCodec.CodecRoomPresetStore( + trilist.UShortOutput[joinMap.CameraPresetSelect.JoinNumber].UShortValue, String.Empty); + trilist.PulseBool(joinMap.CameraPresetSave.JoinNumber, 3000); + }); + + trilist.OnlineStatusChange += (device, args) => + { + if (!args.DeviceOnLine) return; + + // TODO [ ] Issue #868 + trilist.SetString(joinMap.CameraPresetNames.JoinNumber, "\xFC"); + SetCameraPresetNames(presetCodec.NearEndPresets); + }; + } + + // Following fields only used for Bridging + private int _selectedRecentCallItemIndex; + private CodecCallHistory.CallHistoryEntry _selectedRecentCallItem; + private DirectoryItem _selectedDirectoryItem; + + private void LinkVideoCodecCallHistoryToApi(IHasCallHistory codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) + { + codec.CallHistory.RecentCallsListHasChanged += (o, a) => + { + UpdateCallHistory(codec, trilist, joinMap); + }; + + // Selected item action and feedback + trilist.SetUShortSigAction(joinMap.SelectRecentCallItem.JoinNumber, (u) => + { + if (u == 0 || u > codec.CallHistory.RecentCalls.Count) + { + Debug.Console(2, this, "Recent Call History index out of range"); + return; + } + + _selectedRecentCallItemIndex = (int)(u - 1); + trilist.SetUshort(joinMap.SelectRecentCallItem.JoinNumber, u); + + var _selectedRecentCallItem = codec.CallHistory.RecentCalls[_selectedRecentCallItemIndex]; + + if (_selectedRecentCallItem != null) + { + trilist.SetString(joinMap.SelectedRecentCallName.JoinNumber, _selectedRecentCallItem.Name); + trilist.SetString(joinMap.SelectedRecentCallNumber.JoinNumber, _selectedRecentCallItem.Number); + trilist.SetSigFalseAction(joinMap.RemoveSelectedRecentCallItem.JoinNumber, () => codec.RemoveCallHistoryEntry(_selectedRecentCallItem)); + trilist.SetSigFalseAction(joinMap.DialSelectedRecentCallItem.JoinNumber, () => this.Dial(_selectedRecentCallItem.Number)); + } + else + { + trilist.SetString(joinMap.SelectedRecentCallName.JoinNumber, string.Empty); + trilist.SetString(joinMap.SelectedRecentCallNumber.JoinNumber, string.Empty); + trilist.ClearBoolSigAction(joinMap.RemoveSelectedRecentCallItem.JoinNumber); + trilist.ClearBoolSigAction(joinMap.DialSelectedRecentCallItem.JoinNumber); + } + }); + } + + + + private void UpdateCallHistory(IHasCallHistory codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) + { + // Clear out selected item + _selectedRecentCallItemIndex = 0; + _selectedRecentCallItem = null; + trilist.SetUshort(joinMap.SelectRecentCallItem.JoinNumber, 0); + trilist.SetString(joinMap.SelectedRecentCallName.JoinNumber, string.Empty); + trilist.SetString(joinMap.SelectedRecentCallNumber.JoinNumber, string.Empty); + trilist.ClearBoolSigAction(joinMap.RemoveSelectedRecentCallItem.JoinNumber); + // + + trilist.SetUshort(joinMap.RecentCallCount.JoinNumber, (ushort)codec.CallHistory.RecentCalls.Count); + + // Update the call history joins + var maxItems = joinMap.RecentCallNamesStart.JoinSpan; + + // Create history + uint index = 0; + for (uint i = 0; i < maxItems && i < codec.CallHistory.RecentCalls.Count; i++) + { + trilist.SetString(joinMap.RecentCallNamesStart.JoinNumber + i, codec.CallHistory.RecentCalls[(int)i].Name); + trilist.SetString(joinMap.RecentCallTimesStart.JoinNumber + i, codec.CallHistory.RecentCalls[(int)i].StartTime.ToShortTimeString()); + trilist.SetUshort(joinMap.RecentCallOccurrenceType.JoinNumber + i, (ushort)codec.CallHistory.RecentCalls[(int)i].OccurrenceType); + //i++; + index = i; + } + + //foreach(var item in codec.CallHistory.RecentCalls) + //{ + // trilist.SetString(joinMap.RecentCallNamesStart.JoinNumber + i, item.Name); + // trilist.SetString(joinMap.RecentCallTimesStart.JoinNumber + i, item.StartTime.ToShortTimeString()); + // trilist.SetUshort(joinMap.RecentCallOccurrenceType.JoinNumber + i, (ushort)item.OccurrenceType); + // i++; + //} + + // Clears existing items + for (uint j = index; j < maxItems; j++) + { + trilist.SetString(joinMap.RecentCallNamesStart.JoinNumber + j, string.Empty); + trilist.SetString(joinMap.RecentCallTimesStart.JoinNumber + j, string.Empty); + trilist.SetUshort(joinMap.RecentCallOccurrenceType.JoinNumber + j, 0); + } + } + + private string SetCameraPresetNames(IEnumerable presets) + { + return SetCameraPresetNames(presets.Select(p => p.Description).ToList()); + } + + private string SetCameraPresetNames(IEnumerable presets) + { + return SetCameraPresetNames(presets.Select(p => p.Description).ToList()); + } + + private string SetCameraPresetNames(ICollection presets) + { + var i = 1; //start index for xsig; + + var tokenArray = new XSigToken[presets.Count]; + + foreach (var preset in presets) + { + var cameraPreset = new XSigSerialToken(i, preset); + tokenArray[i - 1] = cameraPreset; + i++; + } + + return GetXSigString(tokenArray); + } + + private string GetXSigString(XSigToken[] tokenArray) + { + string returnString; + using (var s = new MemoryStream()) + { + using (var tw = new XSigTokenStreamWriter(s, true)) + { + tw.WriteXSigData(tokenArray); + } + + var xSig = s.ToArray(); + + returnString = Encoding.GetEncoding(XSigEncoding).GetString(xSig, 0, xSig.Length); + } + + return returnString; + } + + #endregion + } + + + /// + /// Used to track the status of syncronizing the phonebook values when connecting to a codec or refreshing the phonebook info + /// + public class CodecPhonebookSyncState : IKeyed + { + private bool _InitialSyncComplete; + + public CodecPhonebookSyncState(string key) + { + Key = key; + + CodecDisconnected(); + } + + public bool InitialSyncComplete + { + get { return _InitialSyncComplete; } + private set + { + if (value == true) + { + var handler = InitialSyncCompleted; + if (handler != null) + { + handler(this, new EventArgs()); + } + } + _InitialSyncComplete = value; + } + } + + public bool InitialPhonebookFoldersWasReceived { get; private set; } + + public bool NumberOfContactsWasReceived { get; private set; } + + public bool PhonebookRootEntriesWasRecieved { get; private set; } + + public bool PhonebookHasFolders { get; private set; } + + public int NumberOfContacts { get; private set; } + + #region IKeyed Members + + public string Key { get; private set; } + + #endregion + + public event EventHandler InitialSyncCompleted; + + public void InitialPhonebookFoldersReceived() + { + InitialPhonebookFoldersWasReceived = true; + + CheckSyncStatus(); + } + + public void PhonebookRootEntriesReceived() + { + PhonebookRootEntriesWasRecieved = true; + + CheckSyncStatus(); + } + + public void SetPhonebookHasFolders(bool value) + { + PhonebookHasFolders = value; + + Debug.Console(1, this, "Phonebook has folders: {0}", PhonebookHasFolders); + } + + public void SetNumberOfContacts(int contacts) + { + NumberOfContacts = contacts; + NumberOfContactsWasReceived = true; + + Debug.Console(1, this, "Phonebook contains {0} contacts.", NumberOfContacts); + + CheckSyncStatus(); + } + + public void CodecDisconnected() + { + InitialPhonebookFoldersWasReceived = false; + PhonebookHasFolders = false; + NumberOfContacts = 0; + NumberOfContactsWasReceived = false; + } + + private void CheckSyncStatus() + { + if (InitialPhonebookFoldersWasReceived && NumberOfContactsWasReceived && PhonebookRootEntriesWasRecieved) + { + InitialSyncComplete = true; + Debug.Console(1, this, "Initial Phonebook Sync Complete!"); + } + else + { + InitialSyncComplete = false; + } + } + } + /// + /// Represents a codec command that might need to have a friendly label applied for UI feedback purposes + /// + public class CodecCommandWithLabel + { + public string Command { get; private set; } + public string Label { get; private set; } + + public CodecCommandWithLabel(string command, string label) + { + Command = command; + Label = label; + } + } + + + } \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/IZoomWirelessShareInstructions.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/ZoomRoom/IZoomWirelessShareInstructions.cs similarity index 96% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/IZoomWirelessShareInstructions.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/ZoomRoom/IZoomWirelessShareInstructions.cs index 58690d3b..465e2d2b 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/IZoomWirelessShareInstructions.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/ZoomRoom/IZoomWirelessShareInstructions.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using PepperDash.Essentials.Core; - -using PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom; - -namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom -{ - public class ShareInfoEventArgs : EventArgs - { - public zStatus.Sharing SharingStatus { get; private set; } - - public ShareInfoEventArgs(zStatus.Sharing status) - { - SharingStatus = status; - } - } - - public interface IZoomWirelessShareInstructions - { - event EventHandler ShareInfoChanged; - - zStatus.Sharing SharingState { get; } - } +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using PepperDash.Essentials.Core; + +using PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom; + +namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom +{ + public class ShareInfoEventArgs : EventArgs + { + public zStatus.Sharing SharingStatus { get; private set; } + + public ShareInfoEventArgs(zStatus.Sharing status) + { + SharingStatus = status; + } + } + + public interface IZoomWirelessShareInstructions + { + event EventHandler ShareInfoChanged; + + zStatus.Sharing SharingState { get; } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ResponseObjects.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/ZoomRoom/ResponseObjects.cs similarity index 96% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ResponseObjects.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/ZoomRoom/ResponseObjects.cs index 79a5395d..5e49b15f 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ResponseObjects.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/ZoomRoom/ResponseObjects.cs @@ -1,1818 +1,1820 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel; -using System.Runtime.CompilerServices; -using Crestron.SimplSharp; - -using PepperDash.Core; -using PepperDash.Essentials.Devices.Common.Codec; - -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces; - -namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom -{ - public enum eZoomRoomResponseType - { - zEvent, - zStatus, - zConfiguration, - zCommand - } - - public abstract class NotifiableObject : INotifyPropertyChanged - { - #region INotifyPropertyChanged Members - - public event PropertyChangedEventHandler PropertyChanged; - - protected void NotifyPropertyChanged(string propertyName) - { - var handler = PropertyChanged; - if (handler != null) - { - handler(this, new PropertyChangedEventArgs(propertyName)); - } - else - { - Debug.Console(2, "PropertyChanged event is NULL"); - } - } - - #endregion - } - - /// - /// Used to track the current status of a ZoomRoom - /// - public class ZoomRoomStatus - { - public zStatus.Login Login { get; set; } - public zStatus.SystemUnit SystemUnit { get; set; } - public zStatus.Phonebook Phonebook { get; set; } - public zStatus.Call Call { get; set; } - public zStatus.Capabilities Capabilities { get; set; } - public zStatus.Sharing Sharing { get; set; } - public zStatus.NumberOfScreens NumberOfScreens { get; set; } - public zStatus.Layout Layout { get; set; } - public zStatus.Video Video { get; set; } - public zStatus.CameraShare CameraShare { get; set; } - public List AudioInputs { get; set; } - public List AudioOuputs { get; set; } - public List Cameras { get; set; } - public zEvent.PhoneCallStatus PhoneCall { get; set; } - public zEvent.NeedWaitForHost NeedWaitForHost { get; set; } - - public ZoomRoomStatus() - { - Login = new zStatus.Login(); - SystemUnit = new zStatus.SystemUnit(); - Phonebook = new zStatus.Phonebook(); - Call = new zStatus.Call(); - Capabilities = new zStatus.Capabilities(); - Sharing = new zStatus.Sharing(); - NumberOfScreens = new zStatus.NumberOfScreens(); - Layout = new zStatus.Layout(); - Video = new zStatus.Video(); - CameraShare = new zStatus.CameraShare(); - AudioInputs = new List(); - AudioOuputs = new List(); - Cameras = new List(); - PhoneCall = new zEvent.PhoneCallStatus(); - NeedWaitForHost = new zEvent.NeedWaitForHost(); - } - } - - /// - /// Used to track the current configuration of a ZoomRoom - /// - public class ZoomRoomConfiguration - { - public zConfiguration.Call Call { get; set; } - public zConfiguration.Audio Audio { get; set; } - public zConfiguration.Video Video { get; set; } - public zConfiguration.Client Client { get; set; } - public zConfiguration.Camera Camera { get; set; } - - public ZoomRoomConfiguration() - { - Call = new zConfiguration.Call(); - Audio = new zConfiguration.Audio(); - Video = new zConfiguration.Video(); - Client = new zConfiguration.Client(); - Camera = new zConfiguration.Camera(); - } - } - - /// - /// Represents a response from a ZoomRoom system - /// - public class Response - { - public Status Status { get; set; } - public bool Sync { get; set; } - [JsonProperty("topKey")] - public string TopKey { get; set; } - [JsonProperty("type")] - public string Type { get; set; } - - public Response() - { - Status = new Status(); - } - } - - public class Status - { - [JsonProperty("message")] - public string Message { get; set; } - [JsonProperty("state")] - public string State { get; set; } - } - - - /// - /// zStatus class stucture - /// - public class zStatus - { - public class Login - { - [JsonProperty("ZAAPI Release")] - public string ZAAPIRelease { get; set; } - [JsonProperty("Zoom Room Release")] - public string ZoomRoomRelease { get; set; } - } - - public class SystemUnit - { - [JsonProperty("email")] - public string Email { get; set; } - [JsonProperty("login_type")] - public string LoginType { get; set; } - [JsonProperty("meeting_number")] - public string MeetingNumber { get; set; } - [JsonProperty("platform")] - public string Platform { get; set; } - [JsonProperty("room_info")] - public RoomInfo RoomInfo { get; set; } - [JsonProperty("room_version")] - public string RoomVersion { get; set; } - - public SystemUnit() - { - RoomInfo = new RoomInfo(); - } - } - - public class RoomInfo - { - [JsonProperty("account_email")] - public string AccountEmail { get; set; } - [JsonProperty("display_version")] - public string DisplayVersion { get; set; } - [JsonProperty("is_auto_answer_enabled")] - public bool AutoAnswerIsEnabled { get; set; } - [JsonProperty("is_auto_answer_selected")] - public bool AutoAnswerIsSelected { get; set; } - [JsonProperty("room_name")] - public string RoomName { get; set; } - } - - public class CloudPbxInfo - { - [JsonProperty("company_number")] - public string CompanyNumber { get; set; } - [JsonProperty("extension")] - public string Extension { get; set; } - [JsonProperty("isValid")] - public bool IsValid { get; set; } - } - - public enum ePresence - { - PRESENCE_OFFLINE, - PRESENCE_ONLINE, - PRESENCE_AWAY, - PRESENCE_BUSY, - PRESENCE_DND - } - - public class Contact - { - [JsonProperty("avatarURL")] - public string AvatarURL { get; set; } - [JsonProperty("cloud_pbx_info")] - public CloudPbxInfo CloudPbxInfo { get; set; } - [JsonProperty("email")] - public string Email { get; set; } - [JsonProperty("firstName")] - public string FirstName { get; set; } - [JsonProperty("index")] - public int Index { get; set; } - [JsonProperty("isLegacy")] - public bool IsLegacy { get; set; } - [JsonProperty("isZoomRoom")] - public bool IsZoomRoom { get; set; } - [JsonProperty("jid")] - public string Jid { get; set; } - [JsonProperty("lastName")] - public string LastName { get; set; } - [JsonProperty("onDesktop")] - public bool OnDesktop { get; set; } - [JsonProperty("onMobile")] - public bool OnMobile { get; set; } - [JsonProperty("phoneNumber")] - public string PhoneNumber { get; set; } - [JsonProperty("presence")] - public ePresence Presence { get; set; } - [JsonProperty("presence_status")] - public int PresenceStatus { get; set; } - [JsonProperty("screenName")] - public string ScreenName { get; set; } - [JsonProperty("sip_phone_number")] - public string SipPhoneNumber { get; set; } - - - public Contact() - { - CloudPbxInfo = new CloudPbxInfo(); - } - } - - public class Phonebook - { - [JsonProperty("Contacts")] - public List Contacts { get; set; } - - public Phonebook() - { - Contacts = new List(); - } - - /// - /// Converts from zStatus.Contact types to generic directory items - /// - /// - public static CodecDirectory ConvertZoomContactsToGeneric(List zoomContacts) - { - var directory = new CodecDirectory(); - - var folders = new List(); - - var roomFolder = new DirectoryFolder(); - - var contactFolder = new DirectoryFolder(); - - var contacts = new List(); - - // Check if there are any zoom rooms - var zoomRooms = zoomContacts.FindAll(c => c.IsZoomRoom); - - if (zoomRooms.Count > 0) - { - // If so, setup a rooms and contacts folder and add them. - - directory.ResultsFolderId = "root"; - - roomFolder.Name = "Rooms"; - roomFolder.ParentFolderId = "root"; - roomFolder.FolderId = "rooms"; - - contactFolder.Name = "Contacts"; - contactFolder.ParentFolderId = "root"; - contactFolder.FolderId = "contacts"; - - folders.Add(roomFolder); - folders.Add(contactFolder); - - directory.AddFoldersToDirectory(folders); - } - - try - { - if (zoomContacts.Count == 0) - { - return directory; - } - - foreach (Contact c in zoomContacts) - { - var contact = new InvitableDirectoryContact { Name = c.ScreenName, ContactId = c.Jid }; - - contact.ContactMethods.Add(new ContactMethod() - { - Number = c.Jid, - Device = eContactMethodDevice.Video, - CallType = eContactMethodCallType.Video, - ContactMethodId = c.Jid - }); - - if (folders.Count > 0) - { - contact.ParentFolderId = c.IsZoomRoom - ? roomFolder.FolderId // "rooms" - : contactFolder.FolderId; // "contacts" - } - - contacts.Add(contact); - } - - directory.AddContactsToDirectory(contacts); - } - catch (Exception e) - { - Debug.Console(1, "Error converting Zoom Phonebook results to generic: {0}", e); - } - - return directory; - } - } - - public enum eCallStatus - { - UNKNOWN, - NOT_IN_MEETING, - CONNECTING_MEETING, - IN_MEETING, - LOGGED_OUT - } - - public class ClosedCaption - { - public bool Available { get; set; } - } - - public class Call : NotifiableObject - { - private eCallStatus _status; - private List _participants; - - public bool IsInCall; - - public eCallStatus Status - { - get - { - return _status; - } - set - { - if (value != _status) - { - _status = value; - IsInCall = _status == eCallStatus.IN_MEETING || _status == eCallStatus.CONNECTING_MEETING; - NotifyPropertyChanged("Status"); - } - } - } - public ClosedCaption ClosedCaption { get; set; } - public List Participants - { - get - { - return _participants; - } - set - { - _participants = value; - NotifyPropertyChanged("Participants"); - } - } - public zEvent.SharingState Sharing { get; set; } - - public CallRecordInfo CallRecordInfo { get; set; } - - private zCommand.InfoResult _info; - - public zCommand.InfoResult Info - { - get - { - return _info; - } - set - { - _info = value; - NotifyPropertyChanged("Info"); - } - } - - public Call() - { - ClosedCaption = new ClosedCaption(); - Participants = new List(); - Sharing = new zEvent.SharingState(); - CallRecordInfo = new CallRecordInfo(); - Info = new zCommand.InfoResult(); - } - } - - public class Capabilities - { - public bool aec_Setting_Stored_In_ZR { get; set; } - public bool can_Dtmf_For_Invite_By_Phone { get; set; } - public bool can_Mute_On_Entry { get; set; } - public bool can_Ringing_In_Pstn_Call { get; set; } - public bool can_Switch_To_Specific_Camera { get; set; } - public bool is_Airhost_Disabled { get; set; } - public bool pstn_Call_In_Local_resentation { get; set; } - public bool support_Claim_Host { get; set; } - public bool support_Out_Room_Display { get; set; } - public bool support_Pin_And_Spotlight { get; set; } - public bool supports_Audio_Checkup { get; set; } - public bool supports_CheckIn { get; set; } - public bool supports_Cloud_PBX { get; set; } - public bool supports_Encrypted_Connection { get; set; } - public bool supports_Expel_User_Permanently { get; set; } - public bool supports_H323_DTMF { get; set; } - public bool supports_Hdmi_Cec_Control { get; set; } - public bool supports_Highly_Reverberant_Room { get; set; } - public bool supports_Loading_Contacts_Dynamically { get; set; } - public bool supports_Loading_Participants_Dynamically { get; set; } - public bool supports_Mic_Record_Test { get; set; } - public bool supports_Multi_Share { get; set; } - public bool supports_ShareCamera { get; set; } - public bool supports_Share_For_Floating_And_Content_Only { get; set; } - public bool supports_Sip_Call_out { get; set; } - public bool supports_Software_Audio_Processing { get; set; } - public bool supports_Web_Settings_Push { get; set; } - } - - public enum eDisplayState - { - None, - Laptop, - IOS, - } - - public class Sharing : NotifiableObject - { - private eDisplayState _dispState; - private string _password; - private bool _isAirHostClientConnected; - private bool _isSharingBlackMagic; - private bool _isDirectPresentationConnected; - private bool _isBlackMagicConnected; - - - public string directPresentationPairingCode { get; set; } - /// - /// Laptop client sharing key - /// - public string directPresentationSharingKey { get; set; } - public eDisplayState dispState - { - get - { - return _dispState; - } - set - { - if (value != _dispState) - { - _dispState = value; - NotifyPropertyChanged("dispState"); - } - } - } - - public bool isAirHostClientConnected - { - get { return _isAirHostClientConnected; } - set - { - if (value != _isAirHostClientConnected) - { - _isAirHostClientConnected = value; - NotifyPropertyChanged("isAirHostClientConnected"); - } - } - } - - public bool isBlackMagicConnected - { - get { return _isBlackMagicConnected; } - set - { - if (value != _isBlackMagicConnected) - { - _isBlackMagicConnected = value; - NotifyPropertyChanged("isBlackMagicConnected"); - } - } - } - public bool isBlackMagicDataAvailable { get; set; } - - public bool isDirectPresentationConnected - { - get { return _isDirectPresentationConnected; } - set - { - if (value != _isDirectPresentationConnected) - { - _isDirectPresentationConnected = value; - NotifyPropertyChanged("isDirectPresentationConnected"); - } - } - } - - public bool isSharingBlackMagic - { - get { return _isSharingBlackMagic; } - set - { - if (value != _isSharingBlackMagic) - { - _isSharingBlackMagic = value; - NotifyPropertyChanged("isSharingBlackMagic"); - } - } - } - - /// - /// IOS Airplay code - /// - public string password - { - get - { - return _password; - } - set - { - if (value != _password) - { - _password = value; - NotifyPropertyChanged("password"); - } - } - } - public string serverName { get; set; } - public string wifiName { get; set; } - } - - public class NumberOfScreens : NotifiableObject - { - private int _numOfScreens; - - [JsonProperty("NumberOfCECScreens")] - public int NumOfCECScreens { get; set; } - [JsonProperty("NumberOfScreens")] - public int NumOfScreens - { - get - { - return _numOfScreens; - } - set - { - if (value != _numOfScreens) - { - _numOfScreens = value; - NotifyPropertyChanged("NumberOfScreens"); - } - } - } - } - - /// - /// AudioInputLine/AudioOutputLine/VideoCameraLine list item - /// - public class AudioVideoInputOutputLineItem - { - public string Alias { get; set; } - public string Name { get; set; } - public bool Selected { get; set; } - public bool combinedDevice { get; set; } - public string id { get; set; } - public bool manuallySelected { get; set; } - public int numberOfCombinedDevices { get; set; } - public int ptzComId { get; set; } - } - - public class Video - { - public bool Optimizable { get; set; } - } - - public class CameraShare : NotifiableObject - { - private bool _canControlCamera; - private bool _isSharing; - - [JsonProperty("can_Control_Camera")] - public bool CanControlCamera - { - get - { - return _canControlCamera; - } - set - { - if (value != _canControlCamera) - { - _canControlCamera = value; - NotifyPropertyChanged("CanControlCamera"); - } - } - } - public string id { get; set; } - public bool is_Mirrored { get; set; } - [JsonProperty("is_Sharing")] - public bool IsSharing - { - get - { - return _isSharing; - } - set - { - if (value != _isSharing) - { - _isSharing = value; - NotifyPropertyChanged("IsSharing"); - } - } - } - public int pan_Tilt_Speed { get; set; } - - } - - public class Layout : NotifiableObject - { - // backer variables - private bool _can_Switch_Speaker_View; - private bool _can_Switch_Wall_View; - private bool _can_Switch_Strip_View; - private bool _can_Switch_Share_On_All_Screens; - private bool _can_Switch_Floating_Share_Content; - private bool _is_In_First_Page; - private bool _is_In_Last_Page; - private string _video_type; - - - public bool can_Adjust_Floating_Video { get; set; } - - - public bool can_Switch_Floating_Share_Content - { - get - { - return _can_Switch_Floating_Share_Content; - } - set - { - if (value != _can_Switch_Floating_Share_Content) - { - _can_Switch_Floating_Share_Content = value; - NotifyPropertyChanged("can_Switch_Floating_Share_Content"); - } - } - } - - - /// - /// [on/off] // Set to On if it is possible to invoke zConfiguration Call Layout Style: ShareAll, to switch to the ShareAll mode, where the content sharing is shown full screen on all monitors. - /// - [JsonProperty("can_Switch_Share_On_All_Screens")] - public bool can_Switch_Share_On_All_Screens - { - get - { - return _can_Switch_Share_On_All_Screens; - } - set - { - if (value != _can_Switch_Share_On_All_Screens) - { - _can_Switch_Share_On_All_Screens = value; - NotifyPropertyChanged("can_Switch_Share_On_All_Screens"); - } - } - } - - /// - /// [on/off] // Set to On if it is possible to switch to Speaker view by invoking zConfiguration Call Layout Style: Speaker. The active speaker is shown full screen, and other video streams, like self-view, are shown in thumbnails. - /// - [JsonProperty("can_Switch_Speaker_View")] - public bool can_Switch_Speaker_View - { - get - { - return _can_Switch_Speaker_View; - } - set - { - if (value != _can_Switch_Speaker_View) - { - _can_Switch_Speaker_View = value; - NotifyPropertyChanged("can_Switch_Speaker_View"); - } - } - } - - /// - /// [on/off] On if it is possible to invoke zConfiguration Call Layout Style: Gallery, to switch to the Gallery mode, showing video participants in tiled windows: The Zoom Room shows up to a 5x5 array of tiled windows per page. - /// - [JsonProperty("can_Switch_Wall_View")] - public bool can_Switch_Wall_View - { - get - { - return _can_Switch_Wall_View; - } - set - { - if (value != _can_Switch_Wall_View) - { - _can_Switch_Wall_View = value; - NotifyPropertyChanged("can_Switch_Wall_View"); - } - } - } - - [JsonProperty("can_Switch_Strip_View")] - public bool can_Switch_Strip_View - { - get - { - return _can_Switch_Strip_View; - } - set - { - if (value != _can_Switch_Strip_View) - { - _can_Switch_Strip_View = value; - NotifyPropertyChanged("can_Switch_Strip_View"); - } - } - } - - [JsonProperty("is_In_First_Page")] - public bool is_In_First_Page - { - get - { - return _is_In_First_Page; - } - set - { - if (value != _is_In_First_Page) - { - _is_In_First_Page = value; - NotifyPropertyChanged("is_In_First_Page"); - } - } - } - - [JsonProperty("is_In_Last_Page")] - public bool is_In_Last_Page - { - get - { - return _is_In_Last_Page; - } - set - { - if (value != _is_In_Last_Page) - { - _is_In_Last_Page = value; - NotifyPropertyChanged("is_In_Last_Page"); - } - } - } - - public bool is_supported { get; set; } - public int video_Count_In_Current_Page { get; set; } - - /// - /// [Gallery | Strip] Indicates which mode applies: Strip or Gallery. - /// - [JsonProperty("video_type")] - public string video_type - { - get - { - return _video_type; - } - set - { - if (value != _video_type) - { - _video_type = value; - NotifyPropertyChanged("video_type"); - } - } - } - } - - public class CallRecordInfo : NotifiableObject - { - private bool _meetingIsBeingRecorded; - private bool _canRecord; - private bool _emailRequired; - - public bool amIRecording { get; set; } - - public bool canRecord - { - get - { - return _canRecord; - } - set - { - if (value != _canRecord) - { - _canRecord = value; - NotifyPropertyChanged("canRecord"); - } - } - } - - public bool emailRequired - { - get - { - return _emailRequired; - } - set - { - if (value != _emailRequired) - { - _emailRequired = value; - NotifyPropertyChanged("emailRequired"); - } - } - } - - public bool meetingIsBeingRecorded - { - get - { - return _meetingIsBeingRecorded; - } - set - { - //Debug.Console(2, "************************************setting value of meetingIsBeingRecorded to: {0}", value); - if (value != _meetingIsBeingRecorded) - { - _meetingIsBeingRecorded = value; - //Debug.Console(2, "********************************set value of meetingIsBeingRecorded to: {0}", _meetingIsBeingRecorded); - NotifyPropertyChanged("meetingIsBeingRecorded"); - } - } - } - - /// - /// Indicates if recording is allowed (when meeting capable and and email is not required to be entered by the user) - /// - public bool AllowRecord - { - get - { - return canRecord && !emailRequired; - } - } - - public CallRecordInfo() - { - Debug.Console(2, Debug.ErrorLogLevel.Notice, "********************************************* CallRecordInfo() ******************************************"); - } - } - } - - /// - /// zEvent Class Structure - /// - public class zEvent - { - public class StartLocalPresentMeeting - { - public bool Success { get; set; } - } - public class NeedWaitForHost - { - public bool Wait { get; set; } - } - - public class IncomingCallIndication - { - public string callerJID { get; set; } - public string calleeJID { get; set; } - public string meetingID { get; set; } - public string password { get; set; } - public string meetingOption { get; set; } - public long MeetingNumber { get; set; } - public string callerName { get; set; } - public string avatarURL { get; set; } - public int lifeTime { get; set; } - public bool accepted { get; set; } - } - - public class CallConnectError - { - public int error_code { get; set; } - public string error_message { get; set; } - } - - public class CallDisconnect - { - public bool Successful - { - get - { - return success == "on"; - } - } - - public string success { get; set; } - } - - public class Layout - { - public bool Sharethumb { get; set; } - } - - public class Call - { - public Layout Layout { get; set; } - } - - public class Client - { - public Call Call { get; set; } - } - - public enum eSharingState - { - None, - Connecting, - Sending, - Receiving, - Send_Receiving - } - - public class SharingState : NotifiableObject - { - private bool _paused; - private eSharingState _state; - - public bool IsSharing { get; private set; } - - [JsonProperty("paused")] - public bool Paused - { - get - { - return _paused; - } - set - { - if (value != _paused) - { - _paused = value; - NotifyPropertyChanged("Paused"); - } - } - } - [JsonProperty("state")] - public eSharingState State - { - get - { - return _state; - } - set - { - if (value != _state) - { - _state = value; - IsSharing = _state == eSharingState.Sending; - NotifyPropertyChanged("State"); - } - } - } - } - - public class PinStatusOfScreenNotification - { - - - [JsonProperty("can_be_pinned")] - public bool CanBePinned { get; set; } - [JsonProperty("can_pin_share")] - public bool CanPinShare { get; set; } - [JsonProperty("pinned_share_source_id")] - public int PinnedShareSourceId { get; set; } - [JsonProperty("pinned_user_id")] - public int PinnedUserId { get; set; } - [JsonProperty("screen_index")] - public int ScreenIndex { get; set; } - [JsonProperty("screen_layout")] - public int ScreenLayout { get; set; } - [JsonProperty("share_source_type")] - public int ShareSourceType { get; set; } - [JsonProperty("why_cannot_pin_share")] - public string WhyCannotPinShare { get; set; } - } - - public class PhoneCallStatus : NotifiableObject - { - private bool _isIncomingCall; - private string _peerDisplayName; - private string _peerNumber; - - private bool _offHook; - - public string CallId { get; set; } - public bool IsIncomingCall - { - get { return _isIncomingCall; } - set - { - if (value == _isIncomingCall) return; - - _isIncomingCall = value; - NotifyPropertyChanged("IsIncomingCall"); - } - } - - public string PeerDisplayName - { - get { return _peerDisplayName; } - set - { - if (value == _peerDisplayName) return; - _peerDisplayName = value; - NotifyPropertyChanged("PeerDisplayName"); - } - } - - public string PeerNumber - { - get { return _peerNumber; } - set - { - if (value == _peerNumber) return; - - _peerNumber = value; - NotifyPropertyChanged("PeerNumber"); - } - } - - public string PeerUri { get; set; } - - private ePhoneCallStatus _status; - public ePhoneCallStatus Status - { - get { return _status; } - set - { - _status = value; - OffHook = _status == ePhoneCallStatus.PhoneCallStatus_Accepted || - _status == ePhoneCallStatus.PhoneCallStatus_InCall || - _status == ePhoneCallStatus.PhoneCallStatus_Init || - _status == ePhoneCallStatus.PhoneCallStatus_Ringing; - } - } - - public bool OffHook - { - get { return _offHook; } - set - { - if (value == _offHook) return; - - _offHook = value; - NotifyPropertyChanged("OffHook"); - } - } - } - - public enum ePhoneCallStatus - { - PhoneCallStatus_Ringing, - PhoneCallStatus_Terminated, - PhoneCallStatus_Accepted, - PhoneCallStatus_InCall, - PhoneCallStatus_Init, - } - - public class MeetingNeedsPassword - { - [JsonProperty("needsPassword")] - public bool NeedsPassword { get; set; } - - [JsonProperty("wrongAndRetry")] - public bool WrongAndRetry { get; set; } - } - } - - /// - /// zConfiguration class structure - /// - public class zConfiguration - { - public class Sharing - { - [JsonProperty("optimize_video_sharing")] - public bool OptimizeVideoSharing { get; set; } - } - - public class Camera : NotifiableObject - { - private bool _mute; - - public bool Mute - { - get { return _mute; } - set - { - Debug.Console(1, "Camera Mute response received: {0}", value); - - if (value == _mute) return; - - _mute = value; - NotifyPropertyChanged("Mute"); - } - } - } - - public class Microphone : NotifiableObject - { - private bool _mute; - - public bool Mute - { - get - { - return _mute; - } - set - { - if (value != _mute) - { - _mute = value; - NotifyPropertyChanged("Mute"); - } - } - } - } - - [Flags] - public enum eLayoutStyle - { - None = 0, - Gallery = 1, - Speaker = 2, - Strip = 4, - ShareAll = 8, - } - - public enum eLayoutSize - { - Off, - Size1, - Size2, - Size3, - Strip - } - - public enum eLayoutPosition - { - Center, - Up, - Right, - UpRight, - Down, - DownRight, - Left, - UpLeft, - DownLeft - } - - public class Layout : NotifiableObject - { - private bool _shareThumb; - private eLayoutStyle _style; - private eLayoutSize _size; - private eLayoutPosition _position; - - public bool ShareThumb - { - get { return _shareThumb; } - set - { - if (value != _shareThumb) - { - _shareThumb = value; - NotifyPropertyChanged("ShareThumb"); - } - } - } - - public eLayoutStyle Style - { - get { return _style; } - set - { - if (value != _style) - { - _style = value; - NotifyPropertyChanged("Style"); - } - } - } - - public eLayoutSize Size - { - get { return _size; } - set - { - if (value != _size) - { - _size = value; - NotifyPropertyChanged("Size"); - } - } - } - - public eLayoutPosition Position - { - get { return _position; } - set - { - if (value != _position) - { - _position = value; - NotifyPropertyChanged("Position"); - } - } - } - } - - public class Lock : NotifiableObject - { - private bool _enable; - - public bool Enable - { - get - { - return _enable; - } - set - { - if (value != _enable) - { - _enable = value; - NotifyPropertyChanged("Enable"); - } - } - } - } - - public class ClosedCaption - { - public bool Visible { get; set; } - public int FontSize { get; set; } - } - - public class MuteUserOnEntry - { - public bool Enable { get; set; } - } - - public class Call - { - public Sharing Sharing { get; set; } - public Camera Camera { get; set; } - public Microphone Microphone { get; set; } - public Layout Layout { get; set; } - public Lock Lock { get; set; } - public MuteUserOnEntry MuteUserOnEntry { get; set; } - public ClosedCaption ClosedCaption { get; set; } - - - public Call() - { - Sharing = new Sharing(); - Camera = new Camera(); - Microphone = new Microphone(); - Layout = new Layout(); - Lock = new Lock(); - MuteUserOnEntry = new MuteUserOnEntry(); - ClosedCaption = new ClosedCaption(); - } - } - - public class Audio - { - public Input Input { get; set; } - public Output Output { get; set; } - - public Audio() - { - Input = new Input(); - Output = new Output(); - } - } - - public class Input : Output - { - [JsonProperty("reduce_reverb")] - public bool ReduceReverb { get; set; } - } - - public class Output : NotifiableObject - { - private int _volume; - - [JsonProperty("volume")] - public int Volume - { - get - { - return _volume; - } - set - { - if (value != _volume) - { - _volume = value; - NotifyPropertyChanged("Volume"); - } - } - } - [JsonProperty("selectedId")] - public string SelectedId { get; set; } - [JsonProperty("is_sap_disabled")] - public bool IsSapDisabled { get; set; } - } - - public class Video : NotifiableObject - { - private bool _hideConfSelfVideo; - - [JsonProperty("hide_conf_self_video")] - public bool HideConfSelfVideo - { - get - { - return _hideConfSelfVideo; - } - set - { - //if (value != _hideConfSelfVideo) - //{ - _hideConfSelfVideo = value; - NotifyPropertyChanged("HideConfSelfVideo"); - //} - } - } - - public VideoCamera Camera { get; set; } - - public Video() - { - Camera = new VideoCamera(); - } - } - - public class VideoCamera : NotifiableObject - { - private string _selectedId; - - [JsonProperty("selectedId")] - public string SelectedId - { - get - { - return _selectedId; - } - set - { - if (value != _selectedId) - { - _selectedId = value; - NotifyPropertyChanged("SelectedId"); - } - } - - } - public bool Mirror { get; set; } - } - - public class Client - { - public string appVersion { get; set; } - public string deviceSystem { get; set; } - - // This doesn't belong here, but there's a bug in the object structure of Zoom Room 5.6.3 that puts it here - public zConfiguration.Call Call { get; set; } - - public Client() - { - Call = new zConfiguration.Call(); - } - } - - } - - /// - /// zCommand class structure - /// - public class zCommand - { - public class BookingsListResult - { - [JsonProperty("accessRole")] - public string AccessRole { get; set; } - [JsonProperty("calendarChangeKey")] - public string CalendarChangeKey { get; set; } - [JsonProperty("calendarID")] - public string CalendarId { get; set; } - [JsonProperty("checkIn")] - public bool CheckIn { get; set; } - [JsonProperty("creatorEmail")] - public string CreatorEmail { get; set; } - [JsonProperty("creatorName")] - public string CreatorName { get; set; } - [JsonProperty("endTime")] - public DateTime EndTime { get; set; } - [JsonProperty("hostName")] - public string HostName { get; set; } - [JsonProperty("isInstantMeeting")] - public bool IsInstantMeeting { get; set; } - [JsonProperty("isPrivate")] - public bool IsPrivate { get; set; } - [JsonProperty("location")] - public string Location { get; set; } - [JsonProperty("meetingName")] - public string MeetingName { get; set; } - [JsonProperty("meetingNumber")] - public string MeetingNumber { get; set; } - [JsonProperty("scheduledFrom")] - public string ScheduledFrom { get; set; } - [JsonProperty("startTime")] - public DateTime StartTime { get; set; } - [JsonProperty("third_party")] - public ThirdParty ThirdParty { get; set; } - } - - public static List GetGenericMeetingsFromBookingResult(List bookings, - int minutesBeforeMeetingStart) - { - var rv = GetGenericMeetingsFromBookingResult(bookings); - - foreach (var meeting in rv) - { - meeting.MinutesBeforeMeeting = minutesBeforeMeetingStart; - } - - return rv; - } - /// - /// Extracts the necessary meeting values from the Zoom bookings response and converts them to the generic class - /// - /// - /// - public static List GetGenericMeetingsFromBookingResult(List bookings) - { - var meetings = new List(); - - if (Debug.Level > 0) - { - Debug.Console(1, "Meetings List:\n"); - } - - foreach (var b in bookings) - { - var meeting = new Meeting(); - - if (b.MeetingNumber != null) - meeting.Id = b.MeetingNumber; - if (b.CreatorName != null) - meeting.Organizer = b.CreatorName; - if (b.MeetingName != null) - meeting.Title = b.MeetingName; - //if (b.Agenda != null) - // meeting.Agenda = b.Agenda.Value; - if (b.StartTime != null) - meeting.StartTime = b.StartTime; - if (b.EndTime != null) - meeting.EndTime = b.EndTime; - - meeting.Privacy = b.IsPrivate ? eMeetingPrivacy.Private : eMeetingPrivacy.Public; - - // No meeting.Calls data exists for Zoom Rooms. Leaving out for now. - var now = DateTime.Now; - if (meeting.StartTime < now && meeting.EndTime < now) - { - Debug.Console(1, "Skipping meeting {0}. Meeting is in the past.", meeting.Title); - continue; - } - - meetings.Add(meeting); - - if (Debug.Level > 0) - { - Debug.Console(1, "Title: {0}, ID: {1}, Organizer: {2}", meeting.Title, meeting.Id, meeting.Organizer); - Debug.Console(1, " Start Time: {0}, End Time: {1}, Duration: {2}", meeting.StartTime, meeting.EndTime, meeting.Duration); - Debug.Console(1, " Joinable: {0}\n", meeting.Joinable); - } - } - - meetings.OrderBy(m => m.StartTime); - - return meetings; - } - - public class HandStatus - { - // example return of the "hand_status" object - // !!!! Note the properties contain ': ' within the property name !!! - //"hand_status": { - // "is_raise_hand: ": false, - // "is_valid: ": "on", - // "time_stamp: ": "11825083" - //}, - [JsonProperty("is_raise_hand: ")] - public bool IsRaiseHand { get; set; } - [JsonProperty("is_valid: ")] - public string IsValid { get; set; } - [JsonProperty("time_stamp: ")] - public string TimeStamp { get; set; } - /// - /// Retuns a boolean value if the participant hand state is raised and is valid (both need to be true) - /// - public bool HandIsRaisedAndValid - { - get { return IsValid != null && IsValid == "on" && IsRaiseHand; } - } - } - public class ListParticipant - { - [JsonProperty("audio_status state")] - public string AudioStatusState { get; set; } - [JsonProperty("audio_status type")] - public string AudioStatusType { get; set; } - [JsonProperty("avatar_url")] - public string AvatarUrl { get; set; } - [JsonProperty("camera_status am_i_controlling")] - public bool CameraStatusAmIControlling { get; set; } - [JsonProperty("camera_status can_i_request_control")] - public bool CameraStatusCanIRequestConrol { get; set; } - [JsonProperty("camera_status can_move_camera")] - public bool CameraStatusCanMoveCamera { get; set; } - [JsonProperty("camera_status can_switch_camera")] - public bool CameraStatusCanSwitchCamera { get; set; } - [JsonProperty("camera_status can_zoom_camera")] - public bool CameraStatusCanZoomCamera { get; set; } - [JsonProperty("can_edit_closed_caption")] - public bool CanEditClosedCaption { get; set; } - [JsonProperty("can_record")] - public bool CanRecord { get; set; } - [JsonProperty("event")] - public string Event { get; set; } - [JsonProperty("hand_status")] - public HandStatus HandStatus { get; set; } - [JsonProperty("isCohost")] - public bool IsCohost { get; set; } - [JsonProperty("is_client_support_closed_caption")] - public bool IsClientSupportClosedCaption { get; set; } - [JsonProperty("is_client_support_coHost")] - public bool IsClientSupportCoHost { get; set; } - [JsonProperty("is_host")] - public bool IsHost { get; set; } - [JsonProperty("is_myself")] - public bool IsMyself { get; set; } - [JsonProperty("is_recording")] - public bool IsRecording { get; set; } - [JsonProperty("is_video_can_mute_byHost")] - public bool IsVideoCanMuteByHost { get; set; } - [JsonProperty("is_video_can_unmute_byHost")] - public bool IsVideoCanUnmuteByHost { get; set; } - [JsonProperty("local_recording_disabled")] - public bool LocalRecordingDisabled { get; set; } - [JsonProperty("user_id")] - public int UserId { get; set; } - [JsonProperty("user_name")] - public string UserName { get; set; } - [JsonProperty("user_type")] - public string UserType { get; set; } - [JsonProperty("video_status has_source")] - public bool VideoStatusHasSource { get; set; } - [JsonProperty("video_status is_receiving")] - public bool VideoStatusIsReceiving { get; set; } - [JsonProperty("video_status is_sending")] - public bool VideoStatusIsSending { get; set; } - - public ListParticipant() - { - HandStatus = new HandStatus(); - } - - /// - /// Converts ZoomRoom pariticpant list response to an Essentials participant list - /// - /// - /// - public static List GetGenericParticipantListFromParticipantsResult( - List participants) - { - if (participants.Count == 0) - { - return new List(); - } - //return participants.Select(p => new Participant - // { - // UserId = p.UserId, - // Name = p.UserName, - // IsHost = p.IsHost, - // CanMuteVideo = p.IsVideoCanMuteByHost, - // CanUnmuteVideo = p.IsVideoCanUnmuteByHost, - // AudioMuteFb = p.AudioStatusState == "AUDIO_MUTED", - // VideoMuteFb = p.VideoStatusIsSending, - // HandIsRaisedFb = p.HandStatus.HandIsRaisedAndValid, - // }).ToList(); - - var sortedParticipants = SortParticipantListByHandStatus(participants); - return sortedParticipants.Select(p => new Participant - { - UserId = p.UserId, - Name = p.UserName, - IsHost = p.IsHost, - IsMyself = p.IsMyself, - CanMuteVideo = p.IsVideoCanMuteByHost, - CanUnmuteVideo = p.IsVideoCanUnmuteByHost, - AudioMuteFb = p.AudioStatusState == "AUDIO_MUTED", - VideoMuteFb = !p.VideoStatusIsSending, - HandIsRaisedFb = p.HandStatus.HandIsRaisedAndValid, - }).ToList(); - } - - /// - /// Will sort by hand-raise status and then alphabetically - /// - /// Zoom Room response list of participants - /// List - public static List SortParticipantListByHandStatus(List participants) - { - if (participants == null) - { - //Debug.Console(1, "SortParticiapntListByHandStatu(participants == null)"); - return null; - } - - // debug testing - //foreach (ListParticipant participant in participants) - //{ - // Debug.Console(1, "{0} | IsValid: {1} | IsRaiseHand: {2} | HandIsRaisedAndValid: {3}", - // participant.UserName, participant.HandStatus.IsValid, participant.HandStatus.IsRaiseHand.ToString(), participant.HandStatus.HandIsRaisedAndValid.ToString()); - //} - - List handRaisedParticipantsList = participants.Where(p => p.HandStatus.HandIsRaisedAndValid).ToList(); - - if (handRaisedParticipantsList != null) - { - IOrderedEnumerable orderByDescending = handRaisedParticipantsList.OrderByDescending(p => p.HandStatus.TimeStamp); - - //foreach (var participant in handRaisedParticipantsList) - // Debug.Console(1, "handRaisedParticipantList: {0} | {1}", participant.UserName, participant.UserId); - } - - List allOtherParticipantsList = participants.Where(p => !p.HandStatus.HandIsRaisedAndValid).ToList(); - - if (allOtherParticipantsList != null) - { - allOtherParticipantsList.OrderBy(p => p.UserName); - - //foreach (var participant in allOtherParticipantsList) - // Debug.Console(1, "allOtherParticipantsList: {0} | {1}", participant.UserName, participant.UserId); - } - - // merge the lists - List sortedList = handRaisedParticipantsList.Union(allOtherParticipantsList).ToList(); - - // return the sorted list - return sortedList; - } - - } - - public class CallinCountryList - { - public int code { get; set; } - public string display_number { get; set; } - public string id { get; set; } - public string name { get; set; } - public string number { get; set; } - } - - public class CalloutCountryList - { - public int code { get; set; } - public string display_number { get; set; } - public string id { get; set; } - public string name { get; set; } - public string number { get; set; } - } - - public class TollFreeCallinList - { - public int code { get; set; } - public string display_number { get; set; } - public string id { get; set; } - public string name { get; set; } - public string number { get; set; } - } - - public class Info - { - public List callin_country_list { get; set; } - public List callout_country_list { get; set; } - public List toll_free_callin_list { get; set; } - } - - public class ThirdParty - { - public string h323_address { get; set; } - public string meeting_number { get; set; } - public string service_provider { get; set; } - public string sip_address { get; set; } - } - - public class MeetingListItem - { - public string accessRole { get; set; } - public string calendarChangeKey { get; set; } - public string calendarID { get; set; } - public bool checkIn { get; set; } - public string creatorEmail { get; set; } - public string creatorName { get; set; } - public string endTime { get; set; } - public string hostName { get; set; } - public bool isInstantMeeting { get; set; } - public bool isPrivate { get; set; } - public string location { get; set; } - public string meetingName { get; set; } - public string meetingNumber { get; set; } - public string scheduledFrom { get; set; } - public string startTime { get; set; } - public ThirdParty third_party { get; set; } - - public MeetingListItem() - { - third_party = new ThirdParty(); - } - } - - public class InfoResult - { - public Info Info { get; set; } - public bool am_i_original_host { get; set; } - public string default_callin_country { get; set; } - public string dialIn { get; set; } - public string international_url { get; set; } - public string invite_email_content { get; set; } - public string invite_email_subject { get; set; } - public bool is_callin_country_list_available { get; set; } - public bool is_calling_room_system_enabled { get; set; } - public bool is_toll_free_callin_list_available { get; set; } - public bool is_view_only { get; set; } - public bool is_waiting_room { get; set; } - public bool is_webinar { get; set; } - public string meeting_id { get; set; } - public MeetingListItem meeting_list_item { get; set; } - public string meeting_password { get; set; } - public string meeting_type { get; set; } - public int my_userid { get; set; } - public int participant_id { get; set; } - public string real_meeting_id { get; set; } - public string schedule_option { get; set; } - public string schedule_option2 { get; set; } - public string support_callout_type { get; set; } - public string toll_free_number { get; set; } - public string user_type { get; set; } - - public InfoResult() - { - Info = new Info(); - meeting_list_item = new MeetingListItem(); - } - } - - public class Phonebook - { - public List Contacts { get; set; } - public int Limit { get; set; } - public int Offset { get; set; } - } - } +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel; +using System.Runtime.CompilerServices; +using Crestron.SimplSharp; + +using PepperDash.Core; +using PepperDash.Essentials.Devices.Common.Codec; + +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; +using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces; + +namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom +{ + public enum eZoomRoomResponseType + { + zEvent, + zStatus, + zConfiguration, + zCommand + } + + public abstract class NotifiableObject : INotifyPropertyChanged + { + #region INotifyPropertyChanged Members + + public event PropertyChangedEventHandler PropertyChanged; + + protected void NotifyPropertyChanged(string propertyName) + { + var handler = PropertyChanged; + if (handler != null) + { + handler(this, new PropertyChangedEventArgs(propertyName)); + } + else + { + Debug.Console(2, "PropertyChanged event is NULL"); + } + } + + #endregion + } + + /// + /// Used to track the current status of a ZoomRoom + /// + public class ZoomRoomStatus + { + public zStatus.Login Login { get; set; } + public zStatus.SystemUnit SystemUnit { get; set; } + public zStatus.Phonebook Phonebook { get; set; } + public zStatus.Call Call { get; set; } + public zStatus.Capabilities Capabilities { get; set; } + public zStatus.Sharing Sharing { get; set; } + public zStatus.NumberOfScreens NumberOfScreens { get; set; } + public zStatus.Layout Layout { get; set; } + public zStatus.Video Video { get; set; } + public zStatus.CameraShare CameraShare { get; set; } + public List AudioInputs { get; set; } + public List AudioOuputs { get; set; } + public List Cameras { get; set; } + public zEvent.PhoneCallStatus PhoneCall { get; set; } + public zEvent.NeedWaitForHost NeedWaitForHost { get; set; } + + public ZoomRoomStatus() + { + Login = new zStatus.Login(); + SystemUnit = new zStatus.SystemUnit(); + Phonebook = new zStatus.Phonebook(); + Call = new zStatus.Call(); + Capabilities = new zStatus.Capabilities(); + Sharing = new zStatus.Sharing(); + NumberOfScreens = new zStatus.NumberOfScreens(); + Layout = new zStatus.Layout(); + Video = new zStatus.Video(); + CameraShare = new zStatus.CameraShare(); + AudioInputs = new List(); + AudioOuputs = new List(); + Cameras = new List(); + PhoneCall = new zEvent.PhoneCallStatus(); + NeedWaitForHost = new zEvent.NeedWaitForHost(); + } + } + + /// + /// Used to track the current configuration of a ZoomRoom + /// + public class ZoomRoomConfiguration + { + public zConfiguration.Call Call { get; set; } + public zConfiguration.Audio Audio { get; set; } + public zConfiguration.Video Video { get; set; } + public zConfiguration.Client Client { get; set; } + public zConfiguration.Camera Camera { get; set; } + + public ZoomRoomConfiguration() + { + Call = new zConfiguration.Call(); + Audio = new zConfiguration.Audio(); + Video = new zConfiguration.Video(); + Client = new zConfiguration.Client(); + Camera = new zConfiguration.Camera(); + } + } + + /// + /// Represents a response from a ZoomRoom system + /// + public class Response + { + public Status Status { get; set; } + public bool Sync { get; set; } + [JsonProperty("topKey")] + public string TopKey { get; set; } + [JsonProperty("type")] + public string Type { get; set; } + + public Response() + { + Status = new Status(); + } + } + + public class Status + { + [JsonProperty("message")] + public string Message { get; set; } + [JsonProperty("state")] + public string State { get; set; } + } + + + /// + /// zStatus class stucture + /// + public class zStatus + { + public class Login + { + [JsonProperty("ZAAPI Release")] + public string ZAAPIRelease { get; set; } + [JsonProperty("Zoom Room Release")] + public string ZoomRoomRelease { get; set; } + } + + public class SystemUnit + { + [JsonProperty("email")] + public string Email { get; set; } + [JsonProperty("login_type")] + public string LoginType { get; set; } + [JsonProperty("meeting_number")] + public string MeetingNumber { get; set; } + [JsonProperty("platform")] + public string Platform { get; set; } + [JsonProperty("room_info")] + public RoomInfo RoomInfo { get; set; } + [JsonProperty("room_version")] + public string RoomVersion { get; set; } + + public SystemUnit() + { + RoomInfo = new RoomInfo(); + } + } + + public class RoomInfo + { + [JsonProperty("account_email")] + public string AccountEmail { get; set; } + [JsonProperty("display_version")] + public string DisplayVersion { get; set; } + [JsonProperty("is_auto_answer_enabled")] + public bool AutoAnswerIsEnabled { get; set; } + [JsonProperty("is_auto_answer_selected")] + public bool AutoAnswerIsSelected { get; set; } + [JsonProperty("room_name")] + public string RoomName { get; set; } + } + + public class CloudPbxInfo + { + [JsonProperty("company_number")] + public string CompanyNumber { get; set; } + [JsonProperty("extension")] + public string Extension { get; set; } + [JsonProperty("isValid")] + public bool IsValid { get; set; } + } + + public enum ePresence + { + PRESENCE_OFFLINE, + PRESENCE_ONLINE, + PRESENCE_AWAY, + PRESENCE_BUSY, + PRESENCE_DND + } + + public class Contact + { + [JsonProperty("avatarURL")] + public string AvatarURL { get; set; } + [JsonProperty("cloud_pbx_info")] + public CloudPbxInfo CloudPbxInfo { get; set; } + [JsonProperty("email")] + public string Email { get; set; } + [JsonProperty("firstName")] + public string FirstName { get; set; } + [JsonProperty("index")] + public int Index { get; set; } + [JsonProperty("isLegacy")] + public bool IsLegacy { get; set; } + [JsonProperty("isZoomRoom")] + public bool IsZoomRoom { get; set; } + [JsonProperty("jid")] + public string Jid { get; set; } + [JsonProperty("lastName")] + public string LastName { get; set; } + [JsonProperty("onDesktop")] + public bool OnDesktop { get; set; } + [JsonProperty("onMobile")] + public bool OnMobile { get; set; } + [JsonProperty("phoneNumber")] + public string PhoneNumber { get; set; } + [JsonProperty("presence")] + public ePresence Presence { get; set; } + [JsonProperty("presence_status")] + public int PresenceStatus { get; set; } + [JsonProperty("screenName")] + public string ScreenName { get; set; } + [JsonProperty("sip_phone_number")] + public string SipPhoneNumber { get; set; } + + + public Contact() + { + CloudPbxInfo = new CloudPbxInfo(); + } + } + + public class Phonebook + { + [JsonProperty("Contacts")] + public List Contacts { get; set; } + + public Phonebook() + { + Contacts = new List(); + } + + /// + /// Converts from zStatus.Contact types to generic directory items + /// + /// + public static CodecDirectory ConvertZoomContactsToGeneric(List zoomContacts) + { + var directory = new CodecDirectory(); + + var folders = new List(); + + var roomFolder = new DirectoryFolder(); + + var contactFolder = new DirectoryFolder(); + + var contacts = new List(); + + // Check if there are any zoom rooms + var zoomRooms = zoomContacts.FindAll(c => c.IsZoomRoom); + + if (zoomRooms.Count > 0) + { + // If so, setup a rooms and contacts folder and add them. + + directory.ResultsFolderId = "root"; + + roomFolder.Name = "Rooms"; + roomFolder.ParentFolderId = "root"; + roomFolder.FolderId = "rooms"; + + contactFolder.Name = "Contacts"; + contactFolder.ParentFolderId = "root"; + contactFolder.FolderId = "contacts"; + + folders.Add(roomFolder); + folders.Add(contactFolder); + + directory.AddFoldersToDirectory(folders); + } + + try + { + if (zoomContacts.Count == 0) + { + return directory; + } + + foreach (Contact c in zoomContacts) + { + var contact = new InvitableDirectoryContact { Name = c.ScreenName, ContactId = c.Jid }; + + contact.ContactMethods.Add(new ContactMethod() + { + Number = c.Jid, + Device = eContactMethodDevice.Video, + CallType = eContactMethodCallType.Video, + ContactMethodId = c.Jid + }); + + if (folders.Count > 0) + { + contact.ParentFolderId = c.IsZoomRoom + ? roomFolder.FolderId // "rooms" + : contactFolder.FolderId; // "contacts" + } + + contacts.Add(contact); + } + + directory.AddContactsToDirectory(contacts); + } + catch (Exception e) + { + Debug.Console(1, "Error converting Zoom Phonebook results to generic: {0}", e); + } + + return directory; + } + } + + public enum eCallStatus + { + UNKNOWN, + NOT_IN_MEETING, + CONNECTING_MEETING, + IN_MEETING, + LOGGED_OUT + } + + public class ClosedCaption + { + public bool Available { get; set; } + } + + public class Call : NotifiableObject + { + private eCallStatus _status; + private List _participants; + + public bool IsInCall; + + public eCallStatus Status + { + get + { + return _status; + } + set + { + if (value != _status) + { + _status = value; + IsInCall = _status == eCallStatus.IN_MEETING || _status == eCallStatus.CONNECTING_MEETING; + NotifyPropertyChanged("Status"); + } + } + } + public ClosedCaption ClosedCaption { get; set; } + public List Participants + { + get + { + return _participants; + } + set + { + _participants = value; + NotifyPropertyChanged("Participants"); + } + } + public zEvent.SharingState Sharing { get; set; } + + public CallRecordInfo CallRecordInfo { get; set; } + + private zCommand.InfoResult _info; + + public zCommand.InfoResult Info + { + get + { + return _info; + } + set + { + _info = value; + NotifyPropertyChanged("Info"); + } + } + + public Call() + { + ClosedCaption = new ClosedCaption(); + Participants = new List(); + Sharing = new zEvent.SharingState(); + CallRecordInfo = new CallRecordInfo(); + Info = new zCommand.InfoResult(); + } + } + + public class Capabilities + { + public bool aec_Setting_Stored_In_ZR { get; set; } + public bool can_Dtmf_For_Invite_By_Phone { get; set; } + public bool can_Mute_On_Entry { get; set; } + public bool can_Ringing_In_Pstn_Call { get; set; } + public bool can_Switch_To_Specific_Camera { get; set; } + public bool is_Airhost_Disabled { get; set; } + public bool pstn_Call_In_Local_resentation { get; set; } + public bool support_Claim_Host { get; set; } + public bool support_Out_Room_Display { get; set; } + public bool support_Pin_And_Spotlight { get; set; } + public bool supports_Audio_Checkup { get; set; } + public bool supports_CheckIn { get; set; } + public bool supports_Cloud_PBX { get; set; } + public bool supports_Encrypted_Connection { get; set; } + public bool supports_Expel_User_Permanently { get; set; } + public bool supports_H323_DTMF { get; set; } + public bool supports_Hdmi_Cec_Control { get; set; } + public bool supports_Highly_Reverberant_Room { get; set; } + public bool supports_Loading_Contacts_Dynamically { get; set; } + public bool supports_Loading_Participants_Dynamically { get; set; } + public bool supports_Mic_Record_Test { get; set; } + public bool supports_Multi_Share { get; set; } + public bool supports_ShareCamera { get; set; } + public bool supports_Share_For_Floating_And_Content_Only { get; set; } + public bool supports_Sip_Call_out { get; set; } + public bool supports_Software_Audio_Processing { get; set; } + public bool supports_Web_Settings_Push { get; set; } + } + + public enum eDisplayState + { + None, + Laptop, + IOS, + } + + public class Sharing : NotifiableObject + { + private eDisplayState _dispState; + private string _password; + private bool _isAirHostClientConnected; + private bool _isSharingBlackMagic; + private bool _isDirectPresentationConnected; + private bool _isBlackMagicConnected; + + + public string directPresentationPairingCode { get; set; } + /// + /// Laptop client sharing key + /// + public string directPresentationSharingKey { get; set; } + public eDisplayState dispState + { + get + { + return _dispState; + } + set + { + if (value != _dispState) + { + _dispState = value; + NotifyPropertyChanged("dispState"); + } + } + } + + public bool isAirHostClientConnected + { + get { return _isAirHostClientConnected; } + set + { + if (value != _isAirHostClientConnected) + { + _isAirHostClientConnected = value; + NotifyPropertyChanged("isAirHostClientConnected"); + } + } + } + + public bool isBlackMagicConnected + { + get { return _isBlackMagicConnected; } + set + { + if (value != _isBlackMagicConnected) + { + _isBlackMagicConnected = value; + NotifyPropertyChanged("isBlackMagicConnected"); + } + } + } + public bool isBlackMagicDataAvailable { get; set; } + + public bool isDirectPresentationConnected + { + get { return _isDirectPresentationConnected; } + set + { + if (value != _isDirectPresentationConnected) + { + _isDirectPresentationConnected = value; + NotifyPropertyChanged("isDirectPresentationConnected"); + } + } + } + + public bool isSharingBlackMagic + { + get { return _isSharingBlackMagic; } + set + { + if (value != _isSharingBlackMagic) + { + _isSharingBlackMagic = value; + NotifyPropertyChanged("isSharingBlackMagic"); + } + } + } + + /// + /// IOS Airplay code + /// + public string password + { + get + { + return _password; + } + set + { + if (value != _password) + { + _password = value; + NotifyPropertyChanged("password"); + } + } + } + public string serverName { get; set; } + public string wifiName { get; set; } + } + + public class NumberOfScreens : NotifiableObject + { + private int _numOfScreens; + + [JsonProperty("NumberOfCECScreens")] + public int NumOfCECScreens { get; set; } + [JsonProperty("NumberOfScreens")] + public int NumOfScreens + { + get + { + return _numOfScreens; + } + set + { + if (value != _numOfScreens) + { + _numOfScreens = value; + NotifyPropertyChanged("NumberOfScreens"); + } + } + } + } + + /// + /// AudioInputLine/AudioOutputLine/VideoCameraLine list item + /// + public class AudioVideoInputOutputLineItem + { + public string Alias { get; set; } + public string Name { get; set; } + public bool Selected { get; set; } + public bool combinedDevice { get; set; } + public string id { get; set; } + public bool manuallySelected { get; set; } + public int numberOfCombinedDevices { get; set; } + public int ptzComId { get; set; } + } + + public class Video + { + public bool Optimizable { get; set; } + } + + public class CameraShare : NotifiableObject + { + private bool _canControlCamera; + private bool _isSharing; + + [JsonProperty("can_Control_Camera")] + public bool CanControlCamera + { + get + { + return _canControlCamera; + } + set + { + if (value != _canControlCamera) + { + _canControlCamera = value; + NotifyPropertyChanged("CanControlCamera"); + } + } + } + public string id { get; set; } + public bool is_Mirrored { get; set; } + [JsonProperty("is_Sharing")] + public bool IsSharing + { + get + { + return _isSharing; + } + set + { + if (value != _isSharing) + { + _isSharing = value; + NotifyPropertyChanged("IsSharing"); + } + } + } + public int pan_Tilt_Speed { get; set; } + + } + + public class Layout : NotifiableObject + { + // backer variables + private bool _can_Switch_Speaker_View; + private bool _can_Switch_Wall_View; + private bool _can_Switch_Strip_View; + private bool _can_Switch_Share_On_All_Screens; + private bool _can_Switch_Floating_Share_Content; + private bool _is_In_First_Page; + private bool _is_In_Last_Page; + private string _video_type; + + + public bool can_Adjust_Floating_Video { get; set; } + + + public bool can_Switch_Floating_Share_Content + { + get + { + return _can_Switch_Floating_Share_Content; + } + set + { + if (value != _can_Switch_Floating_Share_Content) + { + _can_Switch_Floating_Share_Content = value; + NotifyPropertyChanged("can_Switch_Floating_Share_Content"); + } + } + } + + + /// + /// [on/off] // Set to On if it is possible to invoke zConfiguration Call Layout Style: ShareAll, to switch to the ShareAll mode, where the content sharing is shown full screen on all monitors. + /// + [JsonProperty("can_Switch_Share_On_All_Screens")] + public bool can_Switch_Share_On_All_Screens + { + get + { + return _can_Switch_Share_On_All_Screens; + } + set + { + if (value != _can_Switch_Share_On_All_Screens) + { + _can_Switch_Share_On_All_Screens = value; + NotifyPropertyChanged("can_Switch_Share_On_All_Screens"); + } + } + } + + /// + /// [on/off] // Set to On if it is possible to switch to Speaker view by invoking zConfiguration Call Layout Style: Speaker. The active speaker is shown full screen, and other video streams, like self-view, are shown in thumbnails. + /// + [JsonProperty("can_Switch_Speaker_View")] + public bool can_Switch_Speaker_View + { + get + { + return _can_Switch_Speaker_View; + } + set + { + if (value != _can_Switch_Speaker_View) + { + _can_Switch_Speaker_View = value; + NotifyPropertyChanged("can_Switch_Speaker_View"); + } + } + } + + /// + /// [on/off] On if it is possible to invoke zConfiguration Call Layout Style: Gallery, to switch to the Gallery mode, showing video participants in tiled windows: The Zoom Room shows up to a 5x5 array of tiled windows per page. + /// + [JsonProperty("can_Switch_Wall_View")] + public bool can_Switch_Wall_View + { + get + { + return _can_Switch_Wall_View; + } + set + { + if (value != _can_Switch_Wall_View) + { + _can_Switch_Wall_View = value; + NotifyPropertyChanged("can_Switch_Wall_View"); + } + } + } + + [JsonProperty("can_Switch_Strip_View")] + public bool can_Switch_Strip_View + { + get + { + return _can_Switch_Strip_View; + } + set + { + if (value != _can_Switch_Strip_View) + { + _can_Switch_Strip_View = value; + NotifyPropertyChanged("can_Switch_Strip_View"); + } + } + } + + [JsonProperty("is_In_First_Page")] + public bool is_In_First_Page + { + get + { + return _is_In_First_Page; + } + set + { + if (value != _is_In_First_Page) + { + _is_In_First_Page = value; + NotifyPropertyChanged("is_In_First_Page"); + } + } + } + + [JsonProperty("is_In_Last_Page")] + public bool is_In_Last_Page + { + get + { + return _is_In_Last_Page; + } + set + { + if (value != _is_In_Last_Page) + { + _is_In_Last_Page = value; + NotifyPropertyChanged("is_In_Last_Page"); + } + } + } + + public bool is_supported { get; set; } + public int video_Count_In_Current_Page { get; set; } + + /// + /// [Gallery | Strip] Indicates which mode applies: Strip or Gallery. + /// + [JsonProperty("video_type")] + public string video_type + { + get + { + return _video_type; + } + set + { + if (value != _video_type) + { + _video_type = value; + NotifyPropertyChanged("video_type"); + } + } + } + } + + public class CallRecordInfo : NotifiableObject + { + private bool _meetingIsBeingRecorded; + private bool _canRecord; + private bool _emailRequired; + + public bool amIRecording { get; set; } + + public bool canRecord + { + get + { + return _canRecord; + } + set + { + if (value != _canRecord) + { + _canRecord = value; + NotifyPropertyChanged("canRecord"); + } + } + } + + public bool emailRequired + { + get + { + return _emailRequired; + } + set + { + if (value != _emailRequired) + { + _emailRequired = value; + NotifyPropertyChanged("emailRequired"); + } + } + } + + public bool meetingIsBeingRecorded + { + get + { + return _meetingIsBeingRecorded; + } + set + { + //Debug.Console(2, "************************************setting value of meetingIsBeingRecorded to: {0}", value); + if (value != _meetingIsBeingRecorded) + { + _meetingIsBeingRecorded = value; + //Debug.Console(2, "********************************set value of meetingIsBeingRecorded to: {0}", _meetingIsBeingRecorded); + NotifyPropertyChanged("meetingIsBeingRecorded"); + } + } + } + + /// + /// Indicates if recording is allowed (when meeting capable and and email is not required to be entered by the user) + /// + public bool AllowRecord + { + get + { + return canRecord && !emailRequired; + } + } + + public CallRecordInfo() + { + Debug.Console(2, Debug.ErrorLogLevel.Notice, "********************************************* CallRecordInfo() ******************************************"); + } + } + } + + /// + /// zEvent Class Structure + /// + public class zEvent + { + public class StartLocalPresentMeeting + { + public bool Success { get; set; } + } + public class NeedWaitForHost + { + public bool Wait { get; set; } + } + + public class IncomingCallIndication + { + public string callerJID { get; set; } + public string calleeJID { get; set; } + public string meetingID { get; set; } + public string password { get; set; } + public string meetingOption { get; set; } + public long MeetingNumber { get; set; } + public string callerName { get; set; } + public string avatarURL { get; set; } + public int lifeTime { get; set; } + public bool accepted { get; set; } + } + + public class CallConnectError + { + public int error_code { get; set; } + public string error_message { get; set; } + } + + public class CallDisconnect + { + public bool Successful + { + get + { + return success == "on"; + } + } + + public string success { get; set; } + } + + public class Layout + { + public bool Sharethumb { get; set; } + } + + public class Call + { + public Layout Layout { get; set; } + } + + public class Client + { + public Call Call { get; set; } + } + + public enum eSharingState + { + None, + Connecting, + Sending, + Receiving, + Send_Receiving + } + + public class SharingState : NotifiableObject + { + private bool _paused; + private eSharingState _state; + + public bool IsSharing { get; private set; } + + [JsonProperty("paused")] + public bool Paused + { + get + { + return _paused; + } + set + { + if (value != _paused) + { + _paused = value; + NotifyPropertyChanged("Paused"); + } + } + } + [JsonProperty("state")] + public eSharingState State + { + get + { + return _state; + } + set + { + if (value != _state) + { + _state = value; + IsSharing = _state == eSharingState.Sending; + NotifyPropertyChanged("State"); + } + } + } + } + + public class PinStatusOfScreenNotification + { + + + [JsonProperty("can_be_pinned")] + public bool CanBePinned { get; set; } + [JsonProperty("can_pin_share")] + public bool CanPinShare { get; set; } + [JsonProperty("pinned_share_source_id")] + public int PinnedShareSourceId { get; set; } + [JsonProperty("pinned_user_id")] + public int PinnedUserId { get; set; } + [JsonProperty("screen_index")] + public int ScreenIndex { get; set; } + [JsonProperty("screen_layout")] + public int ScreenLayout { get; set; } + [JsonProperty("share_source_type")] + public int ShareSourceType { get; set; } + [JsonProperty("why_cannot_pin_share")] + public string WhyCannotPinShare { get; set; } + } + + public class PhoneCallStatus : NotifiableObject + { + private bool _isIncomingCall; + private string _peerDisplayName; + private string _peerNumber; + + private bool _offHook; + + public string CallId { get; set; } + public bool IsIncomingCall + { + get { return _isIncomingCall; } + set + { + if (value == _isIncomingCall) return; + + _isIncomingCall = value; + NotifyPropertyChanged("IsIncomingCall"); + } + } + + public string PeerDisplayName + { + get { return _peerDisplayName; } + set + { + if (value == _peerDisplayName) return; + _peerDisplayName = value; + NotifyPropertyChanged("PeerDisplayName"); + } + } + + public string PeerNumber + { + get { return _peerNumber; } + set + { + if (value == _peerNumber) return; + + _peerNumber = value; + NotifyPropertyChanged("PeerNumber"); + } + } + + public string PeerUri { get; set; } + + private ePhoneCallStatus _status; + public ePhoneCallStatus Status + { + get { return _status; } + set + { + _status = value; + OffHook = _status == ePhoneCallStatus.PhoneCallStatus_Accepted || + _status == ePhoneCallStatus.PhoneCallStatus_InCall || + _status == ePhoneCallStatus.PhoneCallStatus_Init || + _status == ePhoneCallStatus.PhoneCallStatus_Ringing; + } + } + + public bool OffHook + { + get { return _offHook; } + set + { + if (value == _offHook) return; + + _offHook = value; + NotifyPropertyChanged("OffHook"); + } + } + } + + public enum ePhoneCallStatus + { + PhoneCallStatus_Ringing, + PhoneCallStatus_Terminated, + PhoneCallStatus_Accepted, + PhoneCallStatus_InCall, + PhoneCallStatus_Init, + } + + public class MeetingNeedsPassword + { + [JsonProperty("needsPassword")] + public bool NeedsPassword { get; set; } + + [JsonProperty("wrongAndRetry")] + public bool WrongAndRetry { get; set; } + } + } + + /// + /// zConfiguration class structure + /// + public class zConfiguration + { + public class Sharing + { + [JsonProperty("optimize_video_sharing")] + public bool OptimizeVideoSharing { get; set; } + } + + public class Camera : NotifiableObject + { + private bool _mute; + + public bool Mute + { + get { return _mute; } + set + { + Debug.Console(1, "Camera Mute response received: {0}", value); + + if (value == _mute) return; + + _mute = value; + NotifyPropertyChanged("Mute"); + } + } + } + + public class Microphone : NotifiableObject + { + private bool _mute; + + public bool Mute + { + get + { + return _mute; + } + set + { + if (value != _mute) + { + _mute = value; + NotifyPropertyChanged("Mute"); + } + } + } + } + + [Flags] + public enum eLayoutStyle + { + None = 0, + Gallery = 1, + Speaker = 2, + Strip = 4, + ShareAll = 8, + } + + public enum eLayoutSize + { + Off, + Size1, + Size2, + Size3, + Strip + } + + public enum eLayoutPosition + { + Center, + Up, + Right, + UpRight, + Down, + DownRight, + Left, + UpLeft, + DownLeft + } + + public class Layout : NotifiableObject + { + private bool _shareThumb; + private eLayoutStyle _style; + private eLayoutSize _size; + private eLayoutPosition _position; + + public bool ShareThumb + { + get { return _shareThumb; } + set + { + if (value != _shareThumb) + { + _shareThumb = value; + NotifyPropertyChanged("ShareThumb"); + } + } + } + + public eLayoutStyle Style + { + get { return _style; } + set + { + if (value != _style) + { + _style = value; + NotifyPropertyChanged("Style"); + } + } + } + + public eLayoutSize Size + { + get { return _size; } + set + { + if (value != _size) + { + _size = value; + NotifyPropertyChanged("Size"); + } + } + } + + public eLayoutPosition Position + { + get { return _position; } + set + { + if (value != _position) + { + _position = value; + NotifyPropertyChanged("Position"); + } + } + } + } + + public class Lock : NotifiableObject + { + private bool _enable; + + public bool Enable + { + get + { + return _enable; + } + set + { + if (value != _enable) + { + _enable = value; + NotifyPropertyChanged("Enable"); + } + } + } + } + + public class ClosedCaption + { + public bool Visible { get; set; } + public int FontSize { get; set; } + } + + public class MuteUserOnEntry + { + public bool Enable { get; set; } + } + + public class Call + { + public Sharing Sharing { get; set; } + public Camera Camera { get; set; } + public Microphone Microphone { get; set; } + public Layout Layout { get; set; } + public Lock Lock { get; set; } + public MuteUserOnEntry MuteUserOnEntry { get; set; } + public ClosedCaption ClosedCaption { get; set; } + + + public Call() + { + Sharing = new Sharing(); + Camera = new Camera(); + Microphone = new Microphone(); + Layout = new Layout(); + Lock = new Lock(); + MuteUserOnEntry = new MuteUserOnEntry(); + ClosedCaption = new ClosedCaption(); + } + } + + public class Audio + { + public Input Input { get; set; } + public Output Output { get; set; } + + public Audio() + { + Input = new Input(); + Output = new Output(); + } + } + + public class Input : Output + { + [JsonProperty("reduce_reverb")] + public bool ReduceReverb { get; set; } + } + + public class Output : NotifiableObject + { + private int _volume; + + [JsonProperty("volume")] + public int Volume + { + get + { + return _volume; + } + set + { + if (value != _volume) + { + _volume = value; + NotifyPropertyChanged("Volume"); + } + } + } + [JsonProperty("selectedId")] + public string SelectedId { get; set; } + [JsonProperty("is_sap_disabled")] + public bool IsSapDisabled { get; set; } + } + + public class Video : NotifiableObject + { + private bool _hideConfSelfVideo; + + [JsonProperty("hide_conf_self_video")] + public bool HideConfSelfVideo + { + get + { + return _hideConfSelfVideo; + } + set + { + //if (value != _hideConfSelfVideo) + //{ + _hideConfSelfVideo = value; + NotifyPropertyChanged("HideConfSelfVideo"); + //} + } + } + + public VideoCamera Camera { get; set; } + + public Video() + { + Camera = new VideoCamera(); + } + } + + public class VideoCamera : NotifiableObject + { + private string _selectedId; + + [JsonProperty("selectedId")] + public string SelectedId + { + get + { + return _selectedId; + } + set + { + if (value != _selectedId) + { + _selectedId = value; + NotifyPropertyChanged("SelectedId"); + } + } + + } + public bool Mirror { get; set; } + } + + public class Client + { + public string appVersion { get; set; } + public string deviceSystem { get; set; } + + // This doesn't belong here, but there's a bug in the object structure of Zoom Room 5.6.3 that puts it here + public zConfiguration.Call Call { get; set; } + + public Client() + { + Call = new zConfiguration.Call(); + } + } + + } + + /// + /// zCommand class structure + /// + public class zCommand + { + public class BookingsListResult + { + [JsonProperty("accessRole")] + public string AccessRole { get; set; } + [JsonProperty("calendarChangeKey")] + public string CalendarChangeKey { get; set; } + [JsonProperty("calendarID")] + public string CalendarId { get; set; } + [JsonProperty("checkIn")] + public bool CheckIn { get; set; } + [JsonProperty("creatorEmail")] + public string CreatorEmail { get; set; } + [JsonProperty("creatorName")] + public string CreatorName { get; set; } + [JsonProperty("endTime")] + public DateTime EndTime { get; set; } + [JsonProperty("hostName")] + public string HostName { get; set; } + [JsonProperty("isInstantMeeting")] + public bool IsInstantMeeting { get; set; } + [JsonProperty("isPrivate")] + public bool IsPrivate { get; set; } + [JsonProperty("location")] + public string Location { get; set; } + [JsonProperty("meetingName")] + public string MeetingName { get; set; } + [JsonProperty("meetingNumber")] + public string MeetingNumber { get; set; } + [JsonProperty("scheduledFrom")] + public string ScheduledFrom { get; set; } + [JsonProperty("startTime")] + public DateTime StartTime { get; set; } + [JsonProperty("third_party")] + public ThirdParty ThirdParty { get; set; } + } + + public static List GetGenericMeetingsFromBookingResult(List bookings, + int minutesBeforeMeetingStart) + { + var rv = GetGenericMeetingsFromBookingResult(bookings); + + foreach (var meeting in rv) + { + meeting.MinutesBeforeMeeting = minutesBeforeMeetingStart; + } + + return rv; + } + /// + /// Extracts the necessary meeting values from the Zoom bookings response and converts them to the generic class + /// + /// + /// + public static List GetGenericMeetingsFromBookingResult(List bookings) + { + var meetings = new List(); + + if (Debug.Level > 0) + { + Debug.Console(1, "Meetings List:\n"); + } + + foreach (var b in bookings) + { + var meeting = new Meeting(); + + if (b.MeetingNumber != null) + meeting.Id = b.MeetingNumber; + if (b.CreatorName != null) + meeting.Organizer = b.CreatorName; + if (b.MeetingName != null) + meeting.Title = b.MeetingName; + //if (b.Agenda != null) + // meeting.Agenda = b.Agenda.Value; + if (b.StartTime != null) + meeting.StartTime = b.StartTime; + if (b.EndTime != null) + meeting.EndTime = b.EndTime; + + meeting.Privacy = b.IsPrivate ? eMeetingPrivacy.Private : eMeetingPrivacy.Public; + + // No meeting.Calls data exists for Zoom Rooms. Leaving out for now. + var now = DateTime.Now; + if (meeting.StartTime < now && meeting.EndTime < now) + { + Debug.Console(1, "Skipping meeting {0}. Meeting is in the past.", meeting.Title); + continue; + } + + meetings.Add(meeting); + + if (Debug.Level > 0) + { + Debug.Console(1, "Title: {0}, ID: {1}, Organizer: {2}", meeting.Title, meeting.Id, meeting.Organizer); + Debug.Console(1, " Start Time: {0}, End Time: {1}, Duration: {2}", meeting.StartTime, meeting.EndTime, meeting.Duration); + Debug.Console(1, " Joinable: {0}\n", meeting.Joinable); + } + } + + meetings.OrderBy(m => m.StartTime); + + return meetings; + } + + public class HandStatus + { + // example return of the "hand_status" object + // !!!! Note the properties contain ': ' within the property name !!! + //"hand_status": { + // "is_raise_hand: ": false, + // "is_valid: ": "on", + // "time_stamp: ": "11825083" + //}, + [JsonProperty("is_raise_hand: ")] + public bool IsRaiseHand { get; set; } + [JsonProperty("is_valid: ")] + public string IsValid { get; set; } + [JsonProperty("time_stamp: ")] + public string TimeStamp { get; set; } + /// + /// Retuns a boolean value if the participant hand state is raised and is valid (both need to be true) + /// + public bool HandIsRaisedAndValid + { + get { return IsValid != null && IsValid == "on" && IsRaiseHand; } + } + } + public class ListParticipant + { + [JsonProperty("audio_status state")] + public string AudioStatusState { get; set; } + [JsonProperty("audio_status type")] + public string AudioStatusType { get; set; } + [JsonProperty("avatar_url")] + public string AvatarUrl { get; set; } + [JsonProperty("camera_status am_i_controlling")] + public bool CameraStatusAmIControlling { get; set; } + [JsonProperty("camera_status can_i_request_control")] + public bool CameraStatusCanIRequestConrol { get; set; } + [JsonProperty("camera_status can_move_camera")] + public bool CameraStatusCanMoveCamera { get; set; } + [JsonProperty("camera_status can_switch_camera")] + public bool CameraStatusCanSwitchCamera { get; set; } + [JsonProperty("camera_status can_zoom_camera")] + public bool CameraStatusCanZoomCamera { get; set; } + [JsonProperty("can_edit_closed_caption")] + public bool CanEditClosedCaption { get; set; } + [JsonProperty("can_record")] + public bool CanRecord { get; set; } + [JsonProperty("event")] + public string Event { get; set; } + [JsonProperty("hand_status")] + public HandStatus HandStatus { get; set; } + [JsonProperty("isCohost")] + public bool IsCohost { get; set; } + [JsonProperty("is_client_support_closed_caption")] + public bool IsClientSupportClosedCaption { get; set; } + [JsonProperty("is_client_support_coHost")] + public bool IsClientSupportCoHost { get; set; } + [JsonProperty("is_host")] + public bool IsHost { get; set; } + [JsonProperty("is_myself")] + public bool IsMyself { get; set; } + [JsonProperty("is_recording")] + public bool IsRecording { get; set; } + [JsonProperty("is_video_can_mute_byHost")] + public bool IsVideoCanMuteByHost { get; set; } + [JsonProperty("is_video_can_unmute_byHost")] + public bool IsVideoCanUnmuteByHost { get; set; } + [JsonProperty("local_recording_disabled")] + public bool LocalRecordingDisabled { get; set; } + [JsonProperty("user_id")] + public int UserId { get; set; } + [JsonProperty("user_name")] + public string UserName { get; set; } + [JsonProperty("user_type")] + public string UserType { get; set; } + [JsonProperty("video_status has_source")] + public bool VideoStatusHasSource { get; set; } + [JsonProperty("video_status is_receiving")] + public bool VideoStatusIsReceiving { get; set; } + [JsonProperty("video_status is_sending")] + public bool VideoStatusIsSending { get; set; } + + public ListParticipant() + { + HandStatus = new HandStatus(); + } + + /// + /// Converts ZoomRoom pariticpant list response to an Essentials participant list + /// + /// + /// + public static List GetGenericParticipantListFromParticipantsResult( + List participants) + { + if (participants.Count == 0) + { + return new List(); + } + //return participants.Select(p => new Participant + // { + // UserId = p.UserId, + // Name = p.UserName, + // IsHost = p.IsHost, + // CanMuteVideo = p.IsVideoCanMuteByHost, + // CanUnmuteVideo = p.IsVideoCanUnmuteByHost, + // AudioMuteFb = p.AudioStatusState == "AUDIO_MUTED", + // VideoMuteFb = p.VideoStatusIsSending, + // HandIsRaisedFb = p.HandStatus.HandIsRaisedAndValid, + // }).ToList(); + + var sortedParticipants = SortParticipantListByHandStatus(participants); + return sortedParticipants.Select(p => new Participant + { + UserId = p.UserId, + Name = p.UserName, + IsHost = p.IsHost, + IsMyself = p.IsMyself, + CanMuteVideo = p.IsVideoCanMuteByHost, + CanUnmuteVideo = p.IsVideoCanUnmuteByHost, + AudioMuteFb = p.AudioStatusState == "AUDIO_MUTED", + VideoMuteFb = !p.VideoStatusIsSending, + HandIsRaisedFb = p.HandStatus.HandIsRaisedAndValid, + }).ToList(); + } + + /// + /// Will sort by hand-raise status and then alphabetically + /// + /// Zoom Room response list of participants + /// List + public static List SortParticipantListByHandStatus(List participants) + { + if (participants == null) + { + //Debug.Console(1, "SortParticiapntListByHandStatu(participants == null)"); + return null; + } + + // debug testing + //foreach (ListParticipant participant in participants) + //{ + // Debug.Console(1, "{0} | IsValid: {1} | IsRaiseHand: {2} | HandIsRaisedAndValid: {3}", + // participant.UserName, participant.HandStatus.IsValid, participant.HandStatus.IsRaiseHand.ToString(), participant.HandStatus.HandIsRaisedAndValid.ToString()); + //} + + List handRaisedParticipantsList = participants.Where(p => p.HandStatus.HandIsRaisedAndValid).ToList(); + + if (handRaisedParticipantsList != null) + { + IOrderedEnumerable orderByDescending = handRaisedParticipantsList.OrderByDescending(p => p.HandStatus.TimeStamp); + + //foreach (var participant in handRaisedParticipantsList) + // Debug.Console(1, "handRaisedParticipantList: {0} | {1}", participant.UserName, participant.UserId); + } + + List allOtherParticipantsList = participants.Where(p => !p.HandStatus.HandIsRaisedAndValid).ToList(); + + if (allOtherParticipantsList != null) + { + allOtherParticipantsList.OrderBy(p => p.UserName); + + //foreach (var participant in allOtherParticipantsList) + // Debug.Console(1, "allOtherParticipantsList: {0} | {1}", participant.UserName, participant.UserId); + } + + // merge the lists + List sortedList = handRaisedParticipantsList.Union(allOtherParticipantsList).ToList(); + + // return the sorted list + return sortedList; + } + + } + + public class CallinCountryList + { + public int code { get; set; } + public string display_number { get; set; } + public string id { get; set; } + public string name { get; set; } + public string number { get; set; } + } + + public class CalloutCountryList + { + public int code { get; set; } + public string display_number { get; set; } + public string id { get; set; } + public string name { get; set; } + public string number { get; set; } + } + + public class TollFreeCallinList + { + public int code { get; set; } + public string display_number { get; set; } + public string id { get; set; } + public string name { get; set; } + public string number { get; set; } + } + + public class Info + { + public List callin_country_list { get; set; } + public List callout_country_list { get; set; } + public List toll_free_callin_list { get; set; } + } + + public class ThirdParty + { + public string h323_address { get; set; } + public string meeting_number { get; set; } + public string service_provider { get; set; } + public string sip_address { get; set; } + } + + public class MeetingListItem + { + public string accessRole { get; set; } + public string calendarChangeKey { get; set; } + public string calendarID { get; set; } + public bool checkIn { get; set; } + public string creatorEmail { get; set; } + public string creatorName { get; set; } + public string endTime { get; set; } + public string hostName { get; set; } + public bool isInstantMeeting { get; set; } + public bool isPrivate { get; set; } + public string location { get; set; } + public string meetingName { get; set; } + public string meetingNumber { get; set; } + public string scheduledFrom { get; set; } + public string startTime { get; set; } + public ThirdParty third_party { get; set; } + + public MeetingListItem() + { + third_party = new ThirdParty(); + } + } + + public class InfoResult + { + public Info Info { get; set; } + public bool am_i_original_host { get; set; } + public string default_callin_country { get; set; } + public string dialIn { get; set; } + public string international_url { get; set; } + public string invite_email_content { get; set; } + public string invite_email_subject { get; set; } + public bool is_callin_country_list_available { get; set; } + public bool is_calling_room_system_enabled { get; set; } + public bool is_toll_free_callin_list_available { get; set; } + public bool is_view_only { get; set; } + public bool is_waiting_room { get; set; } + public bool is_webinar { get; set; } + public string meeting_id { get; set; } + public MeetingListItem meeting_list_item { get; set; } + public string meeting_password { get; set; } + public string meeting_type { get; set; } + public int my_userid { get; set; } + public int participant_id { get; set; } + public string real_meeting_id { get; set; } + public string schedule_option { get; set; } + public string schedule_option2 { get; set; } + public string support_callout_type { get; set; } + public string toll_free_number { get; set; } + public string user_type { get; set; } + + public InfoResult() + { + Info = new Info(); + meeting_list_item = new MeetingListItem(); + } + } + + public class Phonebook + { + public List Contacts { get; set; } + public int Limit { get; set; } + public int Offset { get; set; } + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/ZoomRoom/ZoomRoom.cs similarity index 96% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/ZoomRoom/ZoomRoom.cs index 1a70b2af..a9c6c0f2 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/ZoomRoom/ZoomRoom.cs @@ -1,3941 +1,3943 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.CrestronThread; -using Crestron.SimplSharpPro.DeviceSupport; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Bridges; -using PepperDash.Essentials.Core.Config; -using PepperDash.Essentials.Core.DeviceTypeInterfaces; -using PepperDash.Essentials.Core.Routing; -using PepperDash.Essentials.Core.Queues; -using PepperDash.Essentials.Devices.Common.Cameras; -using PepperDash.Essentials.Devices.Common.Codec; -using PepperDash.Essentials.Devices.Common.VideoCodec.Cisco; -using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces; - -namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom -{ - public class ZoomRoom : VideoCodecBase, IHasCodecSelfView, IHasDirectoryHistoryStack, ICommunicationMonitor, - IRouting, - IHasScheduleAwareness, IHasCodecCameras, IHasParticipants, IHasCameraOff, IHasCameraMuteWithUnmuteReqeust, IHasCameraAutoMode, - IHasFarEndContentStatus, IHasSelfviewPosition, IHasPhoneDialing, IHasZoomRoomLayouts, IHasParticipantPinUnpin, - IHasParticipantAudioMute, IHasSelfviewSize, IPasswordPrompt, IHasStartMeeting, IHasMeetingInfo, IHasPresentationOnlyMeeting, - IHasMeetingLock, IHasMeetingRecordingWithPrompt, IZoomWirelessShareInstructions - { - public event EventHandler VideoUnmuteRequested; - - private const long MeetingRefreshTimer = 60000; - public uint DefaultMeetingDurationMin { get; private set; } - - /// - /// CR LF CR LF Delimits an echoed response to a command - /// - private const string EchoDelimiter = "\x0D\x0A\x0D\x0A"; - - private const string SendDelimiter = "\x0D"; - - /// - /// CR LF } CR LF Delimits a JSON response - /// - private const string JsonDelimiter = "\x0D\x0A\x7D\x0D\x0A"; - - private string[] Delimiters = new string[] { EchoDelimiter, JsonDelimiter, "OK\x0D\x0A", "end\x0D\x0A" }; - private readonly GenericQueue _receiveQueue; - - private readonly ZoomRoomSyncState _syncState; - public bool CommDebuggingIsOn; - private CodecDirectory _currentDirectoryResult; - private uint _jsonCurlyBraceCounter; - private bool _jsonFeedbackMessageIsIncoming; - private StringBuilder _jsonMessage; - private int _previousVolumeLevel; - private CameraBase _selectedCamera; - private string _lastDialedMeetingNumber; - - private CTimer contactsDebounceTimer; - - - private readonly ZoomRoomPropertiesConfig _props; - - private bool _meetingPasswordRequired; - - private bool _waitingForUserToAcceptOrRejectIncomingCall; - - public void Poll(string pollString) - { - if(_meetingPasswordRequired || _waitingForUserToAcceptOrRejectIncomingCall) return; - - SendText(string.Format("{0}{1}", pollString, SendDelimiter)); - } - - public ZoomRoom(DeviceConfig config, IBasicCommunication comm) - : base(config) - { - DefaultMeetingDurationMin = 30; - - _props = JsonConvert.DeserializeObject(config.Properties.ToString()); - - _receiveQueue = new GenericQueue(Key + "-rxQueue", Thread.eThreadPriority.MediumPriority, 2048); - - Communication = comm; - - if (_props.CommunicationMonitorProperties != null) - { - CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, _props.CommunicationMonitorProperties.PollInterval, _props.CommunicationMonitorProperties.TimeToWarning, _props.CommunicationMonitorProperties.TimeToError, - () => Poll(_props.CommunicationMonitorProperties.PollString)); - } - else - { - CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 30000, 120000, 300000, () => Poll("zStatus SystemUnit")); - } - - DeviceManager.AddDevice(CommunicationMonitor); - - Status = new ZoomRoomStatus(); - - Configuration = new ZoomRoomConfiguration(); - - CodecInfo = new ZoomRoomInfo(Status, Configuration); - - _syncState = new ZoomRoomSyncState(Key + "--Sync", this); - - _syncState.InitialSyncCompleted += SyncState_InitialSyncCompleted; - - _syncState.FirstJsonResponseReceived += (o, a) => SetUpSyncQueries(); - - PhonebookSyncState = new CodecPhonebookSyncState(Key + "--PhonebookSync"); - - PhonebookSyncState.InitialSyncCompleted += (o, a) => ResubscribeForAddedContacts(); - - PortGather = new CommunicationGather(Communication, Delimiters) {IncludeDelimiter = true}; - PortGather.LineReceived += Port_LineReceived; - - CodecOsdIn = new RoutingInputPort(RoutingPortNames.CodecOsd, - eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, new Action(StopSharing), this); - - Output1 = new RoutingOutputPort(RoutingPortNames.HdmiOut1, - eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, null, this); - - Output2 = new RoutingOutputPort(RoutingPortNames.HdmiOut2, - eRoutingSignalType.Video, - eRoutingPortConnectionType.DisplayPort, null, this); - - Output3 = new RoutingOutputPort(RoutingPortNames.HdmiOut3, - eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, null, this); - - SelfviewIsOnFeedback = new BoolFeedback(SelfViewIsOnFeedbackFunc); - - CameraIsOffFeedback = new BoolFeedback(CameraIsOffFeedbackFunc); - - CameraIsMutedFeedback = CameraIsOffFeedback; - - CameraAutoModeIsOnFeedback = new BoolFeedback(CameraAutoModeIsOnFeedbackFunc); - - CodecSchedule = new CodecScheduleAwareness(MeetingRefreshTimer); - - if (_props.MinutesBeforeMeetingStart > 0) - { - CodecSchedule.MeetingWarningMinutes = _props.MinutesBeforeMeetingStart; - } - - ReceivingContent = new BoolFeedback(FarEndIsSharingContentFeedbackFunc); - - SelfviewPipPositionFeedback = new StringFeedback(SelfviewPipPositionFeedbackFunc); - - // TODO: #714 [ ] SelfviewPipSizeFeedback - SelfviewPipSizeFeedback = new StringFeedback(SelfviewPipSizeFeedbackFunc); - - SetUpFeedbackActions(); - - Cameras = new List(); - - SetUpDirectory(); - - Participants = new CodecParticipants(); - - SupportsCameraOff = true; // Always allow turning off the camera for zoom calls? - SupportsCameraAutoMode = _props.SupportsCameraAutoMode; - - PhoneOffHookFeedback = new BoolFeedback(PhoneOffHookFeedbackFunc); - CallerIdNameFeedback = new StringFeedback(CallerIdNameFeedbackFunc); - CallerIdNumberFeedback = new StringFeedback(CallerIdNumberFeedbackFunc); - - LocalLayoutFeedback = new StringFeedback(LocalLayoutFeedbackFunc); - - LayoutViewIsOnFirstPageFeedback = new BoolFeedback(LayoutViewIsOnFirstPageFeedbackFunc); - LayoutViewIsOnLastPageFeedback = new BoolFeedback(LayoutViewIsOnLastPageFeedbackFunc); - CanSwapContentWithThumbnailFeedback = new BoolFeedback(CanSwapContentWithThumbnailFeedbackFunc); - ContentSwappedWithThumbnailFeedback = new BoolFeedback(ContentSwappedWithThumbnailFeedbackFunc); - - NumberOfScreensFeedback = new IntFeedback(NumberOfScreensFeedbackFunc); - - MeetingIsLockedFeedback = new BoolFeedback(() => Configuration.Call.Lock.Enable ); - - MeetingIsRecordingFeedback = new BoolFeedback(() => Status.Call.CallRecordInfo.meetingIsBeingRecorded ); - - RecordConsentPromptIsVisible = new BoolFeedback(() => _recordConsentPromptIsVisible); - - SetUpRouting(); - } - - public CommunicationGather PortGather { get; private set; } - - public ZoomRoomStatus Status { get; private set; } - - public ZoomRoomConfiguration Configuration { get; private set; } - - //CTimer LoginMessageReceivedTimer; - //CTimer RetryConnectionTimer; - - /// - /// Gets and returns the scaled volume of the codec - /// - protected override Func VolumeLevelFeedbackFunc - { - get - { - return () => - { - var scaledVol = CrestronEnvironment.ScaleWithLimits(Configuration.Audio.Output.Volume, 100, 0, 65535, 0); - - if (Configuration.Audio.Output.Volume != 0) - { - Debug.Console(2, this, "Storing previous volume level as: {0}, scaled: {1}", Configuration.Audio.Output.Volume, - scaledVol); - _previousVolumeLevel = scaledVol; // Store the previous level for recall - } - - return scaledVol; - }; - } - } - - protected override Func PrivacyModeIsOnFeedbackFunc - { - get - { - return () => - { - //Debug.Console(2, this, "PrivacyModeIsOnFeedbackFunc. IsInCall: {0} muteState: {1}", IsInCall, Configuration.Call.Microphone.Mute); - if (IsInCall) - { - //Debug.Console(2, this, "reporting muteState: ", Configuration.Call.Microphone.Mute); - return Configuration.Call.Microphone.Mute; - } - else - { - //Debug.Console(2, this, "muteState: true", IsInCall); - return false; - } - }; - } - } - - protected override Func StandbyIsOnFeedbackFunc - { - get { return () => false; } - } - - protected override Func SharingSourceFeedbackFunc - { - get - { - return () => - { - if (Status.Sharing.isAirHostClientConnected) - return "Airplay"; - else if (Status.Sharing.isDirectPresentationConnected || Status.Sharing.isBlackMagicConnected) - return "Laptop"; - else return "None"; - - }; - } - } - - protected override Func SharingContentIsOnFeedbackFunc - { - get { return () => Status.Sharing.isAirHostClientConnected || Status.Sharing.isDirectPresentationConnected || Status.Sharing.isSharingBlackMagic; } - } - - protected Func FarEndIsSharingContentFeedbackFunc - { - get { return () => Status.Call.Sharing.State == zEvent.eSharingState.Receiving; } - } - - protected override Func MuteFeedbackFunc - { - get { return () => Configuration.Audio.Output.Volume == 0; } - } - - //protected Func RoomIsOccupiedFeedbackFunc - //{ - // get - // { - // return () => false; - // } - //} - - //protected Func PeopleCountFeedbackFunc - //{ - // get - // { - // return () => 0; - // } - //} - - protected Func SelfViewIsOnFeedbackFunc - { - get { return () => !Configuration.Video.HideConfSelfVideo; } - } - - protected Func CameraIsOffFeedbackFunc - { - get { return () => Configuration.Call.Camera.Mute; } - } - - protected Func CameraAutoModeIsOnFeedbackFunc - { - get { return () => false; } - } - - protected Func SelfviewPipPositionFeedbackFunc - { - get - { - return - () => - _currentSelfviewPipPosition != null - ? _currentSelfviewPipPosition.Command ?? "Unknown" - : "Unknown"; - } - } - - // TODO: #714 [ ] SelfviewPipSizeFeedbackFunc - protected Func SelfviewPipSizeFeedbackFunc - { - get - { - return - () => - _currentSelfviewPipSize != null - ? _currentSelfviewPipSize.Command ?? "Unknown" - : "Unknown"; - } - } - - protected Func LocalLayoutIsProminentFeedbackFunc - { - get { return () => false; } - } - - - public RoutingInputPort CodecOsdIn { get; private set; } - public RoutingOutputPort Output1 { get; private set; } - public RoutingOutputPort Output2 { get; private set; } - public RoutingOutputPort Output3 { get; private set; } - - #region ICommunicationMonitor Members - - public StatusMonitorBase CommunicationMonitor { get; private set; } - - #endregion - - #region IHasCodecCameras Members - - public event EventHandler CameraSelected; - - public List Cameras { get; private set; } - - public CameraBase SelectedCamera - { - get { return _selectedCamera; } - private set - { - _selectedCamera = value; - SelectedCameraFeedback.FireUpdate(); - ControllingFarEndCameraFeedback.FireUpdate(); - - var handler = CameraSelected; - if (handler != null) - { - handler(this, new CameraSelectedEventArgs(_selectedCamera)); - } - } - } - - - public StringFeedback SelectedCameraFeedback { get; private set; } - - public void SelectCamera(string key) - { - if (CameraIsMutedFeedback.BoolValue) - { - CameraMuteOff(); - } - - SendText(string.Format("zConfiguration Video Camera selectedId: {0}", key)); - } - - public CameraBase FarEndCamera { get; private set; } - - public BoolFeedback ControllingFarEndCameraFeedback { get; private set; } - - #endregion - - #region IHasCodecSelfView Members - - public BoolFeedback SelfviewIsOnFeedback { get; private set; } - - public void GetSelfViewMode() - { - SendText("zConfiguration Video hide_conf_self_video"); - } - - public void SelfViewModeOn() - { - SendText("zConfiguration Video hide_conf_self_video: off"); - } - - public void SelfViewModeOff() - { - SendText("zConfiguration Video hide_conf_self_video: on"); - } - - public void SelfViewModeToggle() - { - if (SelfviewIsOnFeedback.BoolValue) - { - SelfViewModeOff(); - } - else - { - SelfViewModeOn(); - } - } - - #endregion - - #region IHasDirectoryHistoryStack Members - - public event EventHandler DirectoryResultReturned; - public CodecDirectory DirectoryRoot { get; private set; } - - public CodecDirectory CurrentDirectoryResult - { - get { return _currentDirectoryResult; } - private set - { - _currentDirectoryResult = value; - - Debug.Console(2, this, "CurrentDirectoryResult Updated. ResultsFolderId: {0} Contact Count: {1}", - _currentDirectoryResult.ResultsFolderId, _currentDirectoryResult.CurrentDirectoryResults.Count); - - OnDirectoryResultReturned(_currentDirectoryResult); - } - } - - public CodecPhonebookSyncState PhonebookSyncState { get; private set; } - - public void SearchDirectory(string searchString) - { - var directoryResults = new CodecDirectory(); - - directoryResults.AddContactsToDirectory( - DirectoryRoot.CurrentDirectoryResults.FindAll( - c => c.Name.IndexOf(searchString, 0, StringComparison.OrdinalIgnoreCase) > -1)); - - DirectoryBrowseHistoryStack.Clear(); - CurrentDirectoryResult = directoryResults; - } - - public void GetDirectoryFolderContents(string folderId) - { - var directoryResults = new CodecDirectory {ResultsFolderId = folderId}; - - directoryResults.AddContactsToDirectory( - DirectoryRoot.CurrentDirectoryResults.FindAll(c => c.ParentFolderId.Equals(folderId))); - - DirectoryBrowseHistoryStack.Push(_currentDirectoryResult); - - CurrentDirectoryResult = directoryResults; - } - - public void SetCurrentDirectoryToRoot() - { - DirectoryBrowseHistoryStack.Clear(); - - CurrentDirectoryResult = DirectoryRoot; - } - - public void GetDirectoryParentFolderContents() - { - if (DirectoryBrowseHistoryStack.Count == 0) - { - return; - } - - var currentDirectory = DirectoryBrowseHistoryStack.Pop(); - - CurrentDirectoryResult = currentDirectory; - } - - public BoolFeedback CurrentDirectoryResultIsNotDirectoryRoot { get; private set; } - - public List DirectoryBrowseHistory { get; private set; } - - public Stack DirectoryBrowseHistoryStack { get; private set; } - - #endregion - - #region IHasScheduleAwareness Members - - public CodecScheduleAwareness CodecSchedule { get; private set; } - - public void GetSchedule() - { - GetBookings(); - } - - #endregion - - #region IRouting Members - - public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) - { - ExecuteSwitch(inputSelector); - } - - #endregion - - private void SyncState_InitialSyncCompleted(object sender, EventArgs e) - { - SetIsReady(); - } - - /// - /// Handles subscriptions to Status.Call and sub objects. Needs to be called whenever Status.Call is constructed - /// - private void SetUpCallFeedbackActions() - { - Status.Sharing.PropertyChanged -= HandleSharingStateUpdate; - Status.Sharing.PropertyChanged += HandleSharingStateUpdate; - - Status.Call.Sharing.PropertyChanged -= HandleSharingStateUpdate; - Status.Call.Sharing.PropertyChanged += HandleSharingStateUpdate; - - Status.Call.PropertyChanged -= HandleCallStateUpdate; - Status.Call.PropertyChanged += HandleCallStateUpdate; - - Status.Call.CallRecordInfo.PropertyChanged -= HandleCallRecordInfoStateUpdate; - Status.Call.CallRecordInfo.PropertyChanged += HandleCallRecordInfoStateUpdate; - } - - private void HandleCallRecordInfoStateUpdate(object sender, PropertyChangedEventArgs a) - { - if (a.PropertyName == "meetingIsBeingRecorded" || a.PropertyName == "emailRequired" || a.PropertyName == "canRecord") - { - MeetingIsRecordingFeedback.FireUpdate(); - - var meetingInfo = new MeetingInfo(MeetingInfo.Id, - MeetingInfo.Name, - MeetingInfo.Host, - MeetingInfo.Password, - GetSharingStatus(), - GetIsHostMyself(), - MeetingInfo.IsSharingMeeting, - MeetingInfo.WaitingForHost, - MeetingIsLockedFeedback.BoolValue, - MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord); - MeetingInfo = meetingInfo; - } - } - - private void HandleCallStateUpdate(object sender, PropertyChangedEventArgs a) - { - switch (a.PropertyName) - { - case "Info": - { - Debug.Console(1, this, "Updating Call Status"); - UpdateCallStatus(); - break; - } - - case "Status": - { - UpdateCallStatus(); - break; - } - } - } - - private void HandleSharingStateUpdate(object sender, PropertyChangedEventArgs a) - { - //if (a.PropertyName != "State") - //{ - // return; - //} - - SharingContentIsOnFeedback.FireUpdate(); - ReceivingContent.FireUpdate(); - try - { - - // Update the share status of the meeting info - if (MeetingInfo == null) - { - MeetingInfo = new MeetingInfo("", "", "", "", GetSharingStatus(), GetIsHostMyself(), true, false, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord); - return; - } - - var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, Participants.Host != null ? Participants.Host.Name : "None", - MeetingInfo.Password, GetSharingStatus(), GetIsHostMyself(), MeetingInfo.IsSharingMeeting, MeetingInfo.WaitingForHost, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord); - MeetingInfo = meetingInfo; - } - catch (Exception e) - { - Debug.Console(1, this, "Error processing state property update. {0}", e.Message); - Debug.Console(2, this, e.StackTrace); - MeetingInfo = new MeetingInfo("", "", "", "", "None", false, false, false, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue, false); - } - } - - /// - /// Subscribes to the PropertyChanged events on the state objects and fires the corresponding feedbacks. - /// - private void SetUpFeedbackActions() - { - // Set these up initially. - SetUpCallFeedbackActions(); - - Configuration.Audio.Output.PropertyChanged += (o, a) => - { - if (a.PropertyName == "Volume") - { - VolumeLevelFeedback.FireUpdate(); - MuteFeedback.FireUpdate(); - } - }; - - Configuration.Call.Microphone.PropertyChanged += (o, a) => - { - if (a.PropertyName == "Mute") - { - PrivacyModeIsOnFeedback.FireUpdate(); - } - }; - - Configuration.Video.PropertyChanged += (o, a) => - { - if (a.PropertyName == "HideConfSelfVideo") - { - SelfviewIsOnFeedback.FireUpdate(); - } - }; - Configuration.Video.Camera.PropertyChanged += (o, a) => - { - if (a.PropertyName == "SelectedId") - { - if (Cameras == null) - { - return; - } - - var camera = Cameras.FirstOrDefault(c => c.Key.IndexOf(Configuration.Video.Camera.SelectedId, StringComparison.OrdinalIgnoreCase) > -1); - if (camera != null) - { - Debug.Console(1, this, "Camera selected with key: '{0}'", camera.Key); - - SelectedCamera = camera; - - if (CameraIsMutedFeedback.BoolValue) - { - CameraMuteOff(); - } - } - else - { - Debug.Console(1, this, "No camera found with key: '{0}'", Configuration.Video.Camera.SelectedId); - } - } - }; - - Configuration.Call.Camera.PropertyChanged += (o, a) => - { - Debug.Console(1, this, "Configuration.Call.Camera.PropertyChanged: {0}", a.PropertyName); - - if (a.PropertyName != "Mute") return; - - CameraIsOffFeedback.FireUpdate(); - CameraAutoModeIsOnFeedback.FireUpdate(); - }; - - Configuration.Call.Layout.PropertyChanged += (o, a) => - { - switch (a.PropertyName) - { - case "Position": - { - ComputeSelfviewPipPositionStatus(); - - SelfviewPipPositionFeedback.FireUpdate(); - - break; - } - case "ShareThumb": - { - ContentSwappedWithThumbnailFeedback.FireUpdate(); - OnLayoutInfoChanged(); - break; - } - case "Style": - { - LocalLayoutFeedback.FireUpdate(); - OnLayoutInfoChanged(); - break; - } - case "Size": - { - // TODO: #714 [ ] SetupFeedbackActions >> Size - ComputeSelfviewPipSizeStatus(); - - SelfviewPipSizeFeedback.FireUpdate(); - - break; - } - } - }; - - Configuration.Call.Lock.PropertyChanged += (o, a) => - { - if (a.PropertyName == "Enable") - { - MeetingIsLockedFeedback.FireUpdate(); - MeetingInfo = new MeetingInfo - ( - MeetingInfo.Id, - MeetingInfo.Name, - MeetingInfo.Host, - MeetingInfo.Password, - GetSharingStatus(), - MeetingInfo.IsHost, - MeetingInfo.IsSharingMeeting, - MeetingInfo.WaitingForHost, - MeetingIsLockedFeedback.BoolValue, - MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord - ); - } - }; - - // This is to deal with incorrect object structure coming back from the Zoom Room on v 5.6.3 - Configuration.Client.Call.Layout.PropertyChanged += (o, a) => - { - switch (a.PropertyName) - { - case "Position": - { - ComputeSelfviewPipPositionStatus(); - - SelfviewPipPositionFeedback.FireUpdate(); - - break; - } - case "ShareThumb": - { - ContentSwappedWithThumbnailFeedback.FireUpdate(); - OnLayoutInfoChanged(); - break; - } - case "Style": - { - LocalLayoutFeedback.FireUpdate(); - OnLayoutInfoChanged(); - break; - } - } - }; - - - Status.Sharing.PropertyChanged += (o, a) => - { - OnShareInfoChanged(Status.Sharing); - SharingSourceFeedback.FireUpdate(); - switch (a.PropertyName) - { - case "password": - break; - case "isSharingBlackMagic": - { - Debug.Console(2, this, "Updating sharing status: {0}", a.PropertyName); - - SharingContentIsOnFeedback.FireUpdate(); - if (MeetingInfo == null) - { - //Ignoring for now, as the CallInfo return will create the appropriate value - return; - } - // Update the share status of the meeting info - var meetingInfo = new MeetingInfo(MeetingInfo.Id, - MeetingInfo.Name, - MeetingInfo.Host, - MeetingInfo.Password, - GetSharingStatus(), - GetIsHostMyself(), - MeetingInfo.IsSharingMeeting, - MeetingInfo.WaitingForHost, - MeetingIsLockedFeedback.BoolValue, - MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord); - MeetingInfo = meetingInfo; - break; - } - } - }; - - Status.PhoneCall.PropertyChanged += (o, a) => - { - switch (a.PropertyName) - { - case "IsIncomingCall": - Debug.Console(1, this, "Incoming Phone Call: {0}", Status.PhoneCall.IsIncomingCall); - break; - case "PeerDisplayName": - Debug.Console(1, this, "Peer Display Name: {0}", Status.PhoneCall.PeerDisplayName); - CallerIdNameFeedback.FireUpdate(); - break; - case "PeerNumber": - Debug.Console(1, this, "Peer Number: {0}", Status.PhoneCall.PeerNumber); - CallerIdNumberFeedback.FireUpdate(); - break; - case "OffHook": - Debug.Console(1, this, "Phone is OffHook: {0}", Status.PhoneCall.OffHook); - PhoneOffHookFeedback.FireUpdate(); - break; - } - }; - - Status.Layout.PropertyChanged += (o, a) => - { - Debug.Console(1, this, "Status.Layout.PropertyChanged a.PropertyName: {0}", a.PropertyName); - switch (a.PropertyName.ToLower()) - { - case "can_Switch_speaker_view": - case "can_switch_wall_view": - case "can_switch_strip_view": - case "video_type": - case "can_switch_share_on_all_screens": - { - ComputeAvailableLayouts(); - break; - } - case "is_in_first_page": - { - LayoutViewIsOnFirstPageFeedback.FireUpdate(); - break; - } - case "is_in_last_page": - { - LayoutViewIsOnLastPageFeedback.FireUpdate(); - break; - } - case "can_switch_floating_share_content": - { - CanSwapContentWithThumbnailFeedback.FireUpdate(); - break; - } - } - OnLayoutInfoChanged(); - }; - - Status.NumberOfScreens.PropertyChanged += (o, a) => - { - switch (a.PropertyName) - { - case "NumberOfScreens": - { - NumberOfScreensFeedback.FireUpdate(); - break; - } - } - }; - } - - private void SetUpDirectory() - { - DirectoryRoot = new CodecDirectory() {ResultsFolderId = "root"}; - - CurrentDirectoryResultIsNotDirectoryRoot = new BoolFeedback(() => CurrentDirectoryResult.ResultsFolderId != "root"); - - CurrentDirectoryResult = DirectoryRoot; - - DirectoryBrowseHistory = new List(); - DirectoryBrowseHistoryStack = new Stack(); - } - - private void SetUpRouting() - { - // Set up input ports - CreateOsdSource(); - InputPorts.Add(CodecOsdIn); - - // Set up output ports - OutputPorts.Add(Output1); - OutputPorts.Add(Output2); - } - - /// - /// Creates the fake OSD source, and connects it's AudioVideo output to the CodecOsdIn input - /// to enable routing - /// - private void CreateOsdSource() - { - OsdSource = new DummyRoutingInputsDevice(Key + "[osd]"); - DeviceManager.AddDevice(OsdSource); - var tl = new TieLine(OsdSource.AudioVideoOutputPort, CodecOsdIn); - TieLineCollection.Default.Add(tl); - - //foreach(var input in Status.Video. - } - - /// - /// Starts the HTTP feedback server and syncronizes state of codec - /// - /// - public override bool CustomActivate() - { - CrestronConsole.AddNewConsoleCommand(SetCommDebug, "SetCodecCommDebug", "0 for Off, 1 for on", - ConsoleAccessLevelEnum.AccessOperator); - if (!_props.DisablePhonebookAutoDownload) - { - CrestronConsole.AddNewConsoleCommand(s => SendText("zCommand Phonebook List Offset: 0 Limit: 10000"), - "GetZoomRoomContacts", "Triggers a refresh of the codec phonebook", - ConsoleAccessLevelEnum.AccessOperator); - } - - CrestronConsole.AddNewConsoleCommand(s => GetBookings(), "GetZoomRoomBookings", - "Triggers a refresh of the booking data for today", ConsoleAccessLevelEnum.AccessOperator); - - - - return base.CustomActivate(); - } - - #region Overrides of Device - - public override void Initialize() - { - var socket = Communication as ISocketStatus; - if (socket != null) - { - socket.ConnectionChange += socket_ConnectionChange; - } - - CommDebuggingIsOn = false; - - Communication.Connect(); - - CommunicationMonitor.Start(); - } - - #endregion - - public void SetCommDebug(string s) - { - if (s == "1") - { - CommDebuggingIsOn = true; - Debug.Console(1, this, "Comm Debug Enabled."); - } - else - { - CommDebuggingIsOn = false; - Debug.Console(1, this, "Comm Debug Disabled."); - } - } - - private void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e) - { - Debug.Console(1, this, "Socket status change {0}", e.Client.ClientStatus); - if (e.Client.IsConnected) - { - } - else - { - _syncState.CodecDisconnected(); - PhonebookSyncState.CodecDisconnected(); - } - } - - public void SendText(string command) - { - if (_meetingPasswordRequired) - { - Debug.Console(2, this, "Blocking commands to ZoomRoom while waiting for user to enter meeting password"); - return; - } - - if (_waitingForUserToAcceptOrRejectIncomingCall) - { - Debug.Console(2, this, "Blocking commands to ZoomRoom while waiting for user to accept or reject incoming call"); - return; - } - - if (CommDebuggingIsOn) - { - Debug.Console(1, this, "Sending: '{0}'", command); - } - - Communication.SendText(command + SendDelimiter); - } - - /// - /// Gathers responses and enqueues them. - /// - /// - /// - private void Port_LineReceived(object dev, GenericCommMethodReceiveTextArgs args) - { - //Debug.Console(0, this, "Port_LineReceived"); - - if (args.Delimiter != JsonDelimiter) - { -// Debug.Console(0, this, -//@"Non JSON response: -//Delimiter: {0} -//{1}", ComTextHelper.GetDebugText(args.Delimiter), args.Text); - ProcessNonJsonResponse(args.Text); - return; - } - else - { -// Debug.Console(0, this, -//@"JSON response: -//Delimiter: {0} -//{1}", ComTextHelper.GetDebugText(args.Delimiter), args.Text); - _receiveQueue.Enqueue(new ProcessStringMessage(args.Text, DeserializeResponse)); - //_receiveQueue.Enqueue(new ProcessStringMessage(args.Text, ProcessMessage)); - } - } - - /// - /// Queues the initial queries to be sent upon connection - /// - private void SetUpSyncQueries() - { - // zStatus - _syncState.AddQueryToQueue("zStatus Call Status"); - _syncState.AddQueryToQueue("zStatus Audio Input Line"); - _syncState.AddQueryToQueue("zStatus Audio Output Line"); - _syncState.AddQueryToQueue("zStatus Video Camera Line"); - _syncState.AddQueryToQueue("zStatus Video Optimizable"); - _syncState.AddQueryToQueue("zStatus Capabilities"); - _syncState.AddQueryToQueue("zStatus Sharing"); - _syncState.AddQueryToQueue("zStatus CameraShare"); - _syncState.AddQueryToQueue("zStatus Call Layout"); - _syncState.AddQueryToQueue("zStatus Call ClosedCaption Available"); - _syncState.AddQueryToQueue("zStatus NumberOfScreens"); - - // zConfiguration - - _syncState.AddQueryToQueue("zConfiguration Call Sharing optimize_video_sharing"); - _syncState.AddQueryToQueue("zConfiguration Call Microphone Mute"); - _syncState.AddQueryToQueue("zConfiguration Call Camera Mute"); - _syncState.AddQueryToQueue("zConfiguration Audio Input SelectedId"); - _syncState.AddQueryToQueue("zConfiguration Audio Input is_sap_disabled"); - _syncState.AddQueryToQueue("zConfiguration Audio Input reduce_reverb"); - _syncState.AddQueryToQueue("zConfiguration Audio Input volume"); - _syncState.AddQueryToQueue("zConfiguration Audio Output selectedId"); - _syncState.AddQueryToQueue("zConfiguration Audio Output volume"); - _syncState.AddQueryToQueue("zConfiguration Video hide_conf_self_video"); - _syncState.AddQueryToQueue("zConfiguration Video Camera selectedId"); - _syncState.AddQueryToQueue("zConfiguration Video Camera Mirror"); - _syncState.AddQueryToQueue("zConfiguration Client appVersion"); - _syncState.AddQueryToQueue("zConfiguration Client deviceSystem"); - _syncState.AddQueryToQueue("zConfiguration Call Layout ShareThumb"); - _syncState.AddQueryToQueue("zConfiguration Call Layout Style"); - _syncState.AddQueryToQueue("zConfiguration Call Layout Size"); - _syncState.AddQueryToQueue("zConfiguration Call Layout Position"); - _syncState.AddQueryToQueue("zConfiguration Call Lock Enable"); - _syncState.AddQueryToQueue("zConfiguration Call MuteUserOnEntry Enable"); - _syncState.AddQueryToQueue("zConfiguration Call ClosedCaption FontSize "); - _syncState.AddQueryToQueue("zConfiguration Call ClosedCaption Visible"); - - // zCommand - - if (!_props.DisablePhonebookAutoDownload) - { - _syncState.AddQueryToQueue("zCommand Phonebook List Offset: 0 Limit: 10000"); - } - - _syncState.AddQueryToQueue("zCommand Bookings List"); - _syncState.AddQueryToQueue("zCommand Call ListParticipants"); - _syncState.AddQueryToQueue("zCommand Call Info"); - - - _syncState.StartSync(); - } - - private void SetupSession() - { - // disable echo of commands - SendText("echo off"); - // switch to json format - // set feedback exclusions - // Currently the feedback exclusions don't work when using the API in JSON response mode - // But leave these here in case the API gets updated in the future - // These may work as of 5.9.4 - - // In 5.9.4 we're getting sent an AddedContact message for every contact in the phonebook on connect, which is redunant and way too much data - // We want to exclude these messages right away until after we've retrieved the entire phonebook and then we can re-enable them - SendText("zFeedback Register Op: ex Path: /Event/Phonebook/AddedContact"); - - SendText("zFeedback Register Op: ex Path: /Event/InfoResult/Info/callin_country_list"); - SendText("zFeedback Register Op: ex Path: /Event/InfoResult/Info/callout_country_list"); - SendText("zFeedback Register Op: ex Path: /Event/InfoResult/Info/toll_free_callinLlist"); - - SendText("zStatus SystemUnit"); - } - - /// - /// Removes the feedback exclusion for added contacts - /// - private void ResubscribeForAddedContacts() - { - SendText("zFeedback Register Op: in Path: /Event/Phonebook/AddedContact"); - } - - /// - /// Processes non-JSON responses as their are received - /// - /// - private void ProcessNonJsonResponse(string response) - { - if (response.Contains("client_loop: send disconnect: Broken pipe")) - { - Debug.Console(1, this, Debug.ErrorLogLevel.Error, - "Zoom Room Controller or App connected. Essentials will NOT control the Zoom Room until it is disconnected."); - - return; - } - - if (!_syncState.InitialSyncComplete) - { - if(response.ToLower().Contains("*r login successful")) - { - _syncState.LoginResponseReceived(); - - SendText("format json"); - - SetupSession(); - } - - //switch (response.Trim().ToLower()) // remove the whitespace - //{ - // case "*r login successful": - // { - // _syncState.LoginMessageReceived(); - - // //// Fire up a thread to send the intial commands. - // //CrestronInvoke.BeginInvoke(o => - // //{ - // // disable echo of commands - // SendText("echo off"); - // // switch to json format - // SendText("format json"); - // // set feedback exclusions - // // Currently the feedback exclusions don't work when using the API in JSON response mode - // // But leave these here in case the API gets updated in the future - // // These may work as of 5.9.4 - // if (_props.DisablePhonebookAutoDownload) - // { - // SendText("zFeedback Register Op: ex Path: /Event/Phonebook/AddedContact"); - // } - // SendText("zFeedback Register Op: ex Path: /Event/InfoResult/Info/callin_country_list"); - // SendText("zFeedback Register Op: ex Path: /Event/InfoResult/Info/callout_country_list"); - // SendText("zFeedback Register Op: ex Path: /Event/InfoResult/Info/toll_free_callinLlist"); - - // //}); - - // break; - // } - //} - } - } - - /// - /// Processes messages as they are dequeued - /// - /// - private void ProcessMessage(string message) - { - // Counts the curly braces - if (message.Contains("client_loop: send disconnect: Broken pipe")) - { - Debug.Console(1, this, Debug.ErrorLogLevel.Error, - "Zoom Room Controller or App connected. Essentials will NOT control the Zoom Room until it is disconnected."); - - return; - } - - if (message.Contains('{')) - { - _jsonCurlyBraceCounter++; - } - - if (message.Contains('}')) - { - _jsonCurlyBraceCounter--; - } - - //Debug.Console(2, this, "JSON Curly Brace Count: {0}", _jsonCurlyBraceCounter); - - if (!_jsonFeedbackMessageIsIncoming && message.Trim('\x20') == "{" + EchoDelimiter) - // Check for the beginning of a new JSON message - { - _jsonFeedbackMessageIsIncoming = true; - _jsonCurlyBraceCounter = 1; // reset the counter for each new message - - _jsonMessage = new StringBuilder(); - - _jsonMessage.Append(message); - - if (CommDebuggingIsOn) - { - Debug.Console(2, this, "Incoming JSON message..."); - } - - return; - } - if (_jsonFeedbackMessageIsIncoming && message.Trim('\x20') == "}" + EchoDelimiter) - // Check for the end of a JSON message - { - _jsonMessage.Append(message); - - if (_jsonCurlyBraceCounter == 0) - { - _jsonFeedbackMessageIsIncoming = false; - - if (CommDebuggingIsOn) - { - Debug.Console(2, this, "Complete JSON Received:\n{0}", _jsonMessage.ToString()); - } - - // Forward the complete message to be deserialized - DeserializeResponse(_jsonMessage.ToString()); - } - - //JsonMessage = new StringBuilder(); - return; - } - - // NOTE: This must happen after the above conditions have been checked - // Append subsequent partial JSON fragments to the string builder - if (_jsonFeedbackMessageIsIncoming) - { - _jsonMessage.Append(message); - - //Debug.Console(1, this, "Building JSON:\n{0}", JsonMessage.ToString()); - return; - } - - if (CommDebuggingIsOn) - { - Debug.Console(1, this, "Non-JSON response: '{0}'", message); - } - - _jsonCurlyBraceCounter = 0; // reset on non-JSON response - - if (!_syncState.InitialSyncComplete) - { - switch (message.Trim().ToLower()) // remove the whitespace - { - case "*r login successful": - { - _syncState.LoginResponseReceived(); - - - // Fire up a thread to send the intial commands. - CrestronInvoke.BeginInvoke(o => - { - // Currently the feedback exclusions don't work when using the API in JSON response mode - // But leave these here in case the API gets updated in the future - - - Thread.Sleep(100); - // disable echo of commands - SendText("echo off"); - Thread.Sleep(100); - // set feedback exclusions - SendText("zFeedback Register Op: ex Path: /Event/InfoResult/Info/callin_country_list"); - Thread.Sleep(100); - SendText("zFeedback Register Op: ex Path: /Event/InfoResult/Info/callout_country_list"); - Thread.Sleep(100); - SendText("zFeedback Register Op: ex Path: /Event/InfoResult/Info/toll_free_callinLlist"); - Thread.Sleep(100); - - if (_props.DisablePhonebookAutoDownload) - { - SendText("zFeedback Register Op: ex Path: /Event/Phonebook/AddedContact"); - } - // switch to json format - SendText("format json"); - }); - - break; - } - } - } - } - - /// - /// Deserializes a JSON formatted response - /// - /// - private void DeserializeResponse(string response) - { - try - { - var trimmedResponse = response.Trim(); - - if (trimmedResponse.Length <= 0) - { - return; - } - - var message = JObject.Parse(trimmedResponse); - - if (!_syncState.FirstJsonResponseWasReceived) - { - _syncState.ReceivedFirstJsonResponse(); - } - - var eType = - (eZoomRoomResponseType) - Enum.Parse(typeof (eZoomRoomResponseType), message["type"].Value(), true); - - var topKey = message["topKey"].Value(); - - var responseObj = message[topKey]; - - Debug.Console(1, this, "{0} Response Received. topKey: '{1}'\n{2}", eType, topKey, responseObj.ToString().Replace("\n", CrestronEnvironment.NewLine)); - - switch (eType) - { - case eZoomRoomResponseType.zConfiguration: - { - switch (topKey.ToLower()) - { - case "call": - { - JsonConvert.PopulateObject(responseObj.ToString(), Configuration.Call); - - break; - } - case "audio": - { - JsonConvert.PopulateObject(responseObj.ToString(), Configuration.Audio); - - break; - } - case "video": - { - JsonConvert.PopulateObject(responseObj.ToString(), Configuration.Video); - - break; - } - case "client": - { - JsonConvert.PopulateObject(responseObj.ToString(), Configuration.Client); - - break; - } - default: - { - break; - } - } - break; - } - case eZoomRoomResponseType.zCommand: - { - switch (topKey.ToLower()) - { - case "inforesult": - { - JsonConvert.PopulateObject(responseObj.ToString(), Status.Call.Info); - break; - } - case "phonebooklistresult": - { - // This result will always be the complete contents of the directory and never - // A subset of the results via a search - - // Clear out any existing data - Status.Phonebook = new zStatus.Phonebook(); - - JsonConvert.PopulateObject(responseObj.ToString(), Status.Phonebook); - - UpdateDirectory(); - - break; - } - case "listparticipantsresult": - { - Debug.Console(1, this, "JTokenType: {0}", responseObj.Type); - - switch (responseObj.Type) - { - case JTokenType.Array: - Status.Call.Participants = - JsonConvert.DeserializeObject>( - responseObj.ToString()); - break; - case JTokenType.Object: - { - // this is a single participant event notification - - var participant = - JsonConvert.DeserializeObject( - responseObj.ToString()); - - if (participant != null) - { - Debug.Console(1, this, - "[DeserializeResponse] zCommands.listparticipantresult - participant.event: {0} **********************************", - participant.Event); - Debug.Console(1, this, - "[DeserializeResponse] zCommands.listparticipantresult - participant.event: {0} - UserId: {1} Name: {2} IsHost: {3}", - participant.Event, participant.UserId, participant.UserName, participant.IsHost); - - switch (participant.Event) - { - case "ZRCUserChangedEventUserInfoUpdated": - case "ZRCUserChangedEventLeftMeeting": - { - var existingParticipant = - Status.Call.Participants.FirstOrDefault( - p => p.UserId.Equals(participant.UserId)); - - if (existingParticipant != null) - { - switch (participant.Event) - { - case "ZRCUserChangedEventLeftMeeting": - Status.Call.Participants.Remove(existingParticipant); - break; - case "ZRCUserChangedEventUserInfoUpdated": - JsonConvert.PopulateObject(responseObj.ToString(), - existingParticipant); - break; - } - } - } - break; - case "ZRCUserChangedEventJoinedMeeting": - { - var existingParticipant = - Status.Call.Participants.FirstOrDefault(p => p.UserId.Equals(participant.UserId)); - - if (existingParticipant != null) - { - Debug.Console(1, this, - "[DeserializeResponse] zCommands.listparticipantresult - participant.event: {0} ...updating matching UserId participant with UserId: {1} UserName: {2}", - participant.Event, participant.UserId, participant.UserName); - - JsonConvert.PopulateObject(responseObj.ToString(), existingParticipant); - } - else - { - Debug.Console(1, this, - "[DeserializeResponse] zCommands.listparticipantresult - participant.event: {0} ...adding participant with UserId: {1} UserName: {2}", - participant.Event, participant.UserId, participant.UserName); - - Status.Call.Participants.Add(participant); - } - - break; - } - } - - Debug.Console(1, this, - "[DeserializeResponse] zCommands.listparticipantresult - participant.event: {0} ***********************************", - participant.Event); - } - } - break; - } - - var participants = - zCommand.ListParticipant.GetGenericParticipantListFromParticipantsResult( - Status.Call.Participants); - - Participants.CurrentParticipants = participants; - - // Update the share status of the meeting info - var meetingInfo = new MeetingInfo( - MeetingInfo.Id, - MeetingInfo.Name, - Participants.Host.Name, - MeetingInfo.Password, - GetSharingStatus(), - GetIsHostMyself(), - MeetingInfo.IsSharingMeeting, - MeetingInfo.WaitingForHost, - MeetingIsLockedFeedback.BoolValue, - MeetingIsRecordingFeedback.BoolValue, - Status.Call.CallRecordInfo.AllowRecord - ); - MeetingInfo = meetingInfo; - - PrintCurrentCallParticipants(); - - break; - } - default: - { - break; - } - } - break; - } - case eZoomRoomResponseType.zEvent: - { - switch (topKey.ToLower()) - { - case "phonebook": - { - zStatus.Contact contact = new zStatus.Contact(); - - if (responseObj["Updated Contact"] != null) - { - contact = responseObj["Updated Contact"].ToObject(); - } - else if (responseObj["Added Contact"] != null) - { - contact = responseObj["Added Contact"].ToObject(); - } - - var existingContactIndex = Status.Phonebook.Contacts.FindIndex(c => c.Jid.Equals(contact.Jid)); - - if (existingContactIndex > 0) - { - Status.Phonebook.Contacts[existingContactIndex] = contact; - } - else - { - Status.Phonebook.Contacts.Add(contact); - } - - if(contactsDebounceTimer == null) - { - contactsDebounceTimer = new CTimer(o => UpdateDirectory(), 2000); - } - else - { - contactsDebounceTimer.Reset(); - } - - break; - } - case "bookingslistresult": - { - if (!_syncState.InitialSyncComplete) - { - _syncState.LastQueryResponseReceived(); - } - - var codecBookings = JsonConvert.DeserializeObject>( - responseObj.ToString()); - - if (codecBookings != null && codecBookings.Count > 0) - { - CodecSchedule.Meetings = zCommand.GetGenericMeetingsFromBookingResult( - codecBookings, CodecSchedule.MeetingWarningMinutes); - } - else - { - //need to clear the list if it's empty - CodecSchedule.Meetings = new List(); - } - - break; - } - case "bookings updated": - { - GetBookings(); - - break; - } - case "sharingstate": - { - JsonConvert.PopulateObject(responseObj.ToString(), Status.Call.Sharing); - - SetDefaultLayout(); - - break; - } - case "incomingcallindication": - { - var incomingCall = - JsonConvert.DeserializeObject(responseObj.ToString()); - - if (incomingCall != null) - { - var newCall = new CodecActiveCallItem - { - Direction = eCodecCallDirection.Incoming, - Status = eCodecCallStatus.Ringing, - Type = eCodecCallType.Video, - Name = incomingCall.callerName, - Id = incomingCall.callerJID - }; - - _waitingForUserToAcceptOrRejectIncomingCall = true; - - ActiveCalls.Add(newCall); - - OnCallStatusChange(newCall); - } - - break; - } - case "treatedincomingcallindication": - { - var incomingCall = - JsonConvert.DeserializeObject(responseObj.ToString()); - - if (incomingCall != null) - { - var existingCall = - ActiveCalls.FirstOrDefault(c => c.Id.Equals(incomingCall.callerJID)); - - if (existingCall != null) - { - existingCall.Status = !incomingCall.accepted - ? eCodecCallStatus.Disconnected - : eCodecCallStatus.Connecting; - - OnCallStatusChange(existingCall); - } - - _waitingForUserToAcceptOrRejectIncomingCall = false; - - UpdateCallStatus(); - } - - break; - } - case "calldisconnect": - { - var disconnectEvent = - JsonConvert.DeserializeObject(responseObj.ToString()); - - Debug.Console(1, this, - "[DeserializeResponse] zEvent.calldisconnect ********************************************"); - Debug.Console(1, this, "[DeserializeResponse] zEvent.calldisconnect - disconnectEvent.Successful: {0}", - disconnectEvent.Successful); - - if (disconnectEvent.Successful) - { - if (ActiveCalls.Count > 0) - { - var activeCall = ActiveCalls.FirstOrDefault(c => c.IsActiveCall); - - if (activeCall != null) - { - Debug.Console(1, this, - "[DeserializeResponse] zEvent.calldisconnect - ActiveCalls.Count: {0} activeCall.Id: {1}, activeCall.Number: {2} activeCall.Name: {3}, activeCall.IsActive: {4}", - ActiveCalls.Count, activeCall.Id, activeCall.Number, activeCall.Name, activeCall.IsActiveCall); - activeCall.Status = eCodecCallStatus.Disconnected; - - OnCallStatusChange(activeCall); - } - } - } - - Debug.Console(1, this, - "[DeserializeResponse] zEvent.calldisconnect ********************************************"); - - UpdateCallStatus(); - break; - } - case "callconnecterror": - { - UpdateCallStatus(); - break; - } - case "videounmuterequest": - { - var handler = VideoUnmuteRequested; - - if (handler != null) - { - handler(this, null); - } - - break; - } - case "meetingneedspassword": - { - var meetingNeedsPassword = - responseObj.ToObject(); - - if (meetingNeedsPassword.NeedsPassword) - { - var prompt = "Password required to join this meeting. Please enter the meeting password."; - - OnPasswordRequired(meetingNeedsPassword.WrongAndRetry, false, false, prompt); - } - else - { - OnPasswordRequired(false, false, true, ""); - } - - break; - } - case "needwaitforhost": - { - Status.NeedWaitForHost = JsonConvert.DeserializeObject(responseObj.ToString()); - - Debug.Console(1, this, "WaitingForHost: {0}", Status.NeedWaitForHost.Wait); - - if (Status.NeedWaitForHost.Wait) - { - if (MeetingInfo == null) - { - MeetingInfo = new MeetingInfo("Waiting For Host", "Waiting For Host", "Waiting For Host", "", - GetSharingStatus(), false, false, true, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord); - - UpdateCallStatus(); - break; - } - - MeetingInfo = new MeetingInfo("Waiting For Host", "Waiting For Host", "Waiting For Host", "", - GetSharingStatus(), false, false, true, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord); - - UpdateCallStatus(); - - break; - } - - if (MeetingInfo == null) - { - MeetingInfo = new MeetingInfo("Waiting For Host", "Waiting For Host", "Waiting For Host", "", - GetSharingStatus(), false, false, false, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord); - break; - } - - MeetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, MeetingInfo.Host, MeetingInfo.Password, - GetSharingStatus(), GetIsHostMyself(), false, false, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord); - - break; - } - case "openvideofailforhoststop": - { - // TODO: notify user that host has disabled unmuting video - break; - } - case "updatecallrecordinfo": - { - JsonConvert.PopulateObject(responseObj.ToString(), Status.Call.CallRecordInfo); - - break; - } - case "recordingconsent": - { - _recordConsentPromptIsVisible = responseObj["isShow"].Value(); - RecordConsentPromptIsVisible.FireUpdate(); - break; - } - case "phonecallstatus": - { - JsonConvert.PopulateObject(responseObj.ToString(), Status.PhoneCall); - break; - } - case "pinstatusofscreennotification": - { - var status = responseObj.ToObject(); - - Debug.Console(1, this, "Pin Status notification for UserId: {0}, ScreenIndex: {1}", status.PinnedUserId, - status.ScreenIndex); - - Participant alreadyPinnedParticipant = null; - - // Check for a participant already pinned to the same screen index. - if (status.PinnedUserId > 0) - { - alreadyPinnedParticipant = - Participants.CurrentParticipants.FirstOrDefault(p => p.ScreenIndexIsPinnedToFb.Equals(status.ScreenIndex)); - - // Make sure that the already pinned participant isn't the same ID as for this message. If true, clear the pinned fb. - if (alreadyPinnedParticipant != null && alreadyPinnedParticipant.UserId != status.PinnedUserId) - { - Debug.Console(1, this, "Participant: {0} with id: {1} already pinned to screenIndex {2}. Clearing pinned fb.", - alreadyPinnedParticipant.Name, alreadyPinnedParticipant.UserId, - alreadyPinnedParticipant.ScreenIndexIsPinnedToFb); - alreadyPinnedParticipant.IsPinnedFb = false; - alreadyPinnedParticipant.ScreenIndexIsPinnedToFb = -1; - } - } - - var participant = Participants.CurrentParticipants.FirstOrDefault(p => p.UserId.Equals(status.PinnedUserId)); - - if (participant != null) - { - participant.IsPinnedFb = true; - participant.ScreenIndexIsPinnedToFb = status.ScreenIndex; - } - else - { - participant = - Participants.CurrentParticipants.FirstOrDefault(p => p.ScreenIndexIsPinnedToFb.Equals(status.ScreenIndex)); - - if (participant == null && alreadyPinnedParticipant == null) - { - Debug.Console(1, this, "no matching participant found by pinned_user_id: {0} or screen_index: {1}", - status.PinnedUserId, status.ScreenIndex); - return; - } - else if (participant != null) - { - Debug.Console(2, this, "Unpinning {0} with id: {1} from screen index: {2}", participant.Name, - participant.UserId, status.ScreenIndex); - participant.IsPinnedFb = false; - participant.ScreenIndexIsPinnedToFb = -1; - } - } - - // fire the event as we've modified the participants list - Participants.OnParticipantsChanged(); - - break; - } - case "startlocalpresentmeeting": - { - var result = JsonConvert.DeserializeObject(responseObj.ToString()); - - if (result.Success) - { - MeetingInfo = new MeetingInfo("", "", "", "", GetSharingStatus(), true, true, MeetingInfo.WaitingForHost, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord); - break; - } - - break; - } - default: - { - break; - } - } - break; - } - case eZoomRoomResponseType.zStatus: - { - switch (topKey.ToLower()) - { - case "login": - { - _syncState.LoginResponseReceived(); - - SetupSession(); - - JsonConvert.PopulateObject(responseObj.ToString(), Status.Login); - - break; - } - case "systemunit": - { - - JsonConvert.PopulateObject(responseObj.ToString(), Status.SystemUnit); - - break; - } - case "call": - { - JsonConvert.PopulateObject(responseObj.ToString(), Status.Call); - - Debug.Console(1, this, - "[DeserializeResponse] zStatus.call - Status.Call.Info.meeting_id: {0} Status.Call.Info.meeting_list_item.meetingName: {1}", - Status.Call.Info.meeting_id, Status.Call.Info.meeting_list_item.meetingName); - foreach (var participant in Status.Call.Participants) - { - Debug.Console(1, this, - "[DeserializeResponse] zStatus.call - Status.Call.Participants participant.UserId: {0} participant.UserName: {1}", - participant.UserId, participant.UserName); - } - - UpdateCallStatus(); - - break; - } - case "capabilities": - { - JsonConvert.PopulateObject(responseObj.ToString(), Status.Capabilities); - break; - } - case "sharing": - { - JsonConvert.PopulateObject(responseObj.ToString(), Status.Sharing); - - break; - } - case "numberofscreens": - { - JsonConvert.PopulateObject(responseObj.ToString(), Status.NumberOfScreens); - break; - } - case "video": - { - JsonConvert.PopulateObject(responseObj.ToString(), Status.Video); - break; - } - case "camerashare": - { - JsonConvert.PopulateObject(responseObj.ToString(), Status.CameraShare); - break; - } - case "layout": - { - JsonConvert.PopulateObject(responseObj.ToString(), Status.Layout); - break; - } - case "audio input line": - { - JsonConvert.PopulateObject(responseObj.ToString(), Status.AudioInputs); - break; - } - case "audio output line": - { - JsonConvert.PopulateObject(responseObj.ToString(), Status.AudioOuputs); - break; - } - case "video camera line": - { - Status.Cameras.Clear(); - - JsonConvert.PopulateObject(responseObj.ToString(), Status.Cameras); - - if (!_syncState.CamerasHaveBeenSetUp) - { - SetUpCameras(); - } - - break; - } - default: - { - break; - } - } - - break; - } - default: - { - Debug.Console(1, "Unknown Response Type:"); - break; - } - } - } - catch (Exception ex) - { - Debug.Console(1, this, "Error Deserializing feedback: {0}", ex.Message); - Debug.Console(2, this, "{0}", ex); - - if (ex.InnerException != null) - { - Debug.Console(1, this,"Error Deserializing feedback inner exception: {0}", ex.InnerException.Message); - Debug.Console(2, this, "{0}", ex.InnerException.StackTrace); - } - } - } - - private void SetDefaultLayout() - { - if (!_props.AutoDefaultLayouts) return; - - if ( - (Status.Call.Sharing.State == zEvent.eSharingState.Receiving || - Status.Call.Sharing.State == zEvent.eSharingState.Sending)) - { - SendText(String.Format("zconfiguration call layout style: {0}", - _props.DefaultSharingLayout)); - } - else - { - if (_props.DefaultCallLayout == (_props.DefaultCallLayout & AvailableLayouts)) - { - SendText(String.Format("zconfiguration call layout style: {0}", - _props.DefaultCallLayout)); - } - else - Debug.Console(0, this, "Unable to set default Layout. {0} not currently an available layout based on meeting state", _props.DefaultCallLayout); - } - } - - /// - /// Retrieves the current call participants list - /// - public void GetCurrentCallParticipants() - { - SendText("zCommand Call ListParticipants"); - } - - /// - /// Prints the current call particiapnts list - /// - public void PrintCurrentCallParticipants() - { - if (Debug.Level <= 0) return; - - Debug.Console(1, this, "*************************** Call Participants **************************"); - foreach (var participant in Participants.CurrentParticipants) - { - Debug.Console(1, this, "UserId: {3} Name: {0} Audio: {1} IsHost: {2}", - participant.Name, participant.AudioMuteFb, participant.IsHost, participant.UserId); - } - Debug.Console(1, this, "************************************************************************"); - } - - /// - /// Retrieves bookings list - /// - private void GetBookings() - { - if (_meetingPasswordRequired || _waitingForUserToAcceptOrRejectIncomingCall) return; - - SendText("zCommand Bookings List"); - } - - - /// - /// Updates the current call status - /// - private void UpdateCallStatus() - { - Debug.Console(1, this, - "[UpdateCallStatus] Current Call Status: {0} Active Call Count: {1} Need Wait For Host: {2}", - Status.Call != null ? Status.Call.Status.ToString() : "no call", ActiveCalls.Count, Status.NeedWaitForHost.Wait); - - if (Status.Call != null) - { - var callStatus = Status.Call.Status; - - // If not crrently in a meeting, intialize the call object - if (callStatus != zStatus.eCallStatus.IN_MEETING && callStatus != zStatus.eCallStatus.CONNECTING_MEETING) - { - Status.Call = new zStatus.Call {Status = callStatus}; - // Resubscribe to all property change events after Status.Call is reconstructed - SetUpCallFeedbackActions(); - - OnCallStatusChange(new CodecActiveCallItem() {Status = eCodecCallStatus.Disconnected}); - } - - if (ActiveCalls.Count == 0) - { - if (callStatus == zStatus.eCallStatus.CONNECTING_MEETING || - callStatus == zStatus.eCallStatus.IN_MEETING) - { - var newStatus = eCodecCallStatus.Unknown; - - switch (callStatus) - { - case zStatus.eCallStatus.CONNECTING_MEETING: - newStatus = eCodecCallStatus.Connecting; - break; - case zStatus.eCallStatus.IN_MEETING: - newStatus = eCodecCallStatus.Connected; - break; - } - - if (!string.IsNullOrEmpty(Status.Call.Info.meeting_id)) - { - var newCall = new CodecActiveCallItem - { - Name = Status.Call.Info.meeting_list_item.meetingName, - Number = Status.Call.Info.meeting_list_item.meetingNumber, - Id = Status.Call.Info.meeting_id, - Status = newStatus, - Type = eCodecCallType.Video, - }; - - if (!String.IsNullOrEmpty(_lastDialedMeetingNumber)) - { - _lastDialedMeetingNumber = String.Empty; - } - ActiveCalls.Add(newCall); - - OnCallStatusChange(newCall); - } else if (String.IsNullOrEmpty(Status.Call.Info.meeting_id) && Status.NeedWaitForHost.Wait) - { - var newCall = new CodecActiveCallItem - { - Name = "Waiting For Host", - Number = "Waiting For Host", - Id = "Waiting For Host", - Status = newStatus, - Type = eCodecCallType.Video, - }; - - if (!String.IsNullOrEmpty(_lastDialedMeetingNumber)) - { - _lastDialedMeetingNumber = String.Empty; - } - - ActiveCalls.Add(newCall); - - OnCallStatusChange(newCall); - } - } - } - else - { - var existingCall = ActiveCalls.FirstOrDefault(c => !c.Status.Equals(eCodecCallStatus.Ringing)); - - switch (callStatus) - { - case zStatus.eCallStatus.IN_MEETING: - if (Status.NeedWaitForHost.Wait) - { - Status.NeedWaitForHost.Wait = false; - } - existingCall.Status = eCodecCallStatus.Connected; - break; - case zStatus.eCallStatus.NOT_IN_MEETING: - if (Status.NeedWaitForHost.Wait) - { - Status.NeedWaitForHost.Wait = false; - } - existingCall.Status = eCodecCallStatus.Disconnected; - break; - } - - Debug.Console(1, this, "[UpdateCallStatus] ELSE ActiveCalls.Count == {1} - Current Call Status: {0}", - Status.Call != null ? Status.Call.Status.ToString() : "no call", ActiveCalls.Count); - - - OnCallStatusChange(existingCall); - } - } - - Debug.Console(1, this, "[UpdateCallStatus] Active Calls ------------------------------"); - - // Clean up any disconnected calls left in the list - for (int i = 0; i < ActiveCalls.Count; i++) - { - var call = ActiveCalls[i]; - - Debug.Console(1, this, - @"ID: {1} - Number: {5} - Name: {0} - IsActive: {2} - Status: {3} - Direction: {4} - IsActiveCall: {6}", call.Name, call.Id, call.IsActiveCall, call.Status, call.Direction, call.Number, - call.IsActiveCall); - - if (!call.IsActiveCall) - { - Debug.Console(1, this, "[UpdateCallStatus] Removing Inactive call.Id: {1} call.Name: {0}", call.Name, call.Id); - ActiveCalls.Remove(call); - } - } - Debug.Console(1, this, "[UpdateCallStatus] Active Calls ------------------------------"); - - //clear participants list after call cleanup - var emptyList = new List(); - Participants.CurrentParticipants = emptyList; - if (ActiveCalls.Count > 0) GetCurrentCallParticipants(); - } - - protected override void OnCallStatusChange(CodecActiveCallItem item) - { - if (item.Status == eCodecCallStatus.Connected) - { - - var host = ""; - - if (Participants.Host != null) - host = Participants.Host.Name; - - MeetingInfo = new MeetingInfo( - Status.Call.Info.meeting_id, - Status.Call.Info.meeting_list_item.meetingName, - host, - Status.Call.Info.meeting_password, - GetSharingStatus(), - GetIsHostMyself(), - !String.Equals(Status.Call.Info.meeting_type,"NORMAL"), - false, - MeetingIsLockedFeedback.BoolValue, - MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord - ); - - SetDefaultLayout(); - } - - else if (item.Status == eCodecCallStatus.Disconnected) - { - MeetingInfo = new MeetingInfo( - string.Empty, - string.Empty, - string.Empty, - string.Empty, - string.Empty, - false, - false, - false, - false, - false, Status.Call.CallRecordInfo.AllowRecord - ); - } - - _meetingPasswordRequired = false; - base.OnCallStatusChange(item); - - Debug.Console(1, this, "[OnCallStatusChange] Current Call Status: {0}", - Status.Call != null ? Status.Call.Status.ToString() : "no call"); - } - - private string GetSharingStatus() - { - string sharingState = "None"; - - try - { - if (Status.Call.Sharing.State == zEvent.eSharingState.Receiving) - { - sharingState = "Receiving Content"; - } - if (Status.Sharing.isAirHostClientConnected) - { - sharingState = "Sharing AirPlay"; - } - if (Status.Sharing.isDirectPresentationConnected) - { - sharingState = "Sharing Laptop"; - } - if (Status.Sharing.isSharingBlackMagic) - { - sharingState = "Sharing HDMI Source"; - } - - return sharingState; - } - catch (Exception e) - { - Debug.Console(1, this, "Exception getting sharing status: {0}", e.Message); - Debug.Console(2, this, "{0}", e.StackTrace); - return sharingState; - } - } - - private void UpdateDirectory() - { - Debug.Console(2, this, "Updating directory"); - var directoryResults = zStatus.Phonebook.ConvertZoomContactsToGeneric(Status.Phonebook.Contacts); - - if (!PhonebookSyncState.InitialSyncComplete) - { - PhonebookSyncState.InitialPhonebookFoldersReceived(); - PhonebookSyncState.PhonebookRootEntriesReceived(); - PhonebookSyncState.SetPhonebookHasFolders(true); - PhonebookSyncState.SetNumberOfContacts(Status.Phonebook.Contacts.Count); - } - - directoryResults.ResultsFolderId = "root"; - - DirectoryRoot = directoryResults; - - CurrentDirectoryResult = directoryResults; - - // - if (contactsDebounceTimer != null) - { - ClearContactDebounceTimer(); - } - } - - private void ClearContactDebounceTimer() - { - Debug.Console(2, this, "Clearing Timer"); - if (!contactsDebounceTimer.Disposed && contactsDebounceTimer != null) - { - contactsDebounceTimer.Dispose(); - contactsDebounceTimer = null; - } - } - - /// - /// Will return true if the host is myself (this zoom room) - /// - /// - private bool GetIsHostMyself() - { - try - { - if (Participants.CurrentParticipants.Count == 0) - { - Debug.Console(2, this, "No current participants"); - return false; - } - - var host = Participants.Host; - - if(host == null) - { - Debug.Console(2, this, "Host is currently null"); - return false; - } - Debug.Console(2, this, "Host is: '{0}' IsMyself?: {1}", host.Name, host.IsMyself); - return host.IsMyself; - } - catch (Exception e) - { - Debug.Console(1, "Exception getting isHost: {0}", e.Message); - Debug.Console(2, "{0}", e.StackTrace); - return false; - } - } - - /// - /// Starts sharing HDMI source - /// - public override void StartSharing() - { - SendText("zCommand Call Sharing HDMI Start"); - } - - /// - /// Stops sharing the current presentation - /// - public override void StopSharing() - { - if (Status.Sharing.isSharingBlackMagic) - { - SendText("zCommand Call Sharing HDMI Stop"); - } - else - { - SendText("zCommand Call Sharing Disconnect"); - } - } - - public override void PrivacyModeOn() - { - SendText("zConfiguration Call Microphone Mute: on"); - } - - public override void PrivacyModeOff() - { - SendText("zConfiguration Call Microphone Mute: off"); - } - - public override void PrivacyModeToggle() - { - if (PrivacyModeIsOnFeedback.BoolValue) - { - PrivacyModeOff(); - } - else - { - PrivacyModeOn(); - } - } - - public override void MuteOff() - { - Debug.Console(2, this, "Unmuting to previous level: {0}", _previousVolumeLevel); - SetVolume((ushort) _previousVolumeLevel); - } - - public override void MuteOn() - { - SetVolume(0); - } - - public override void MuteToggle() - { - if (MuteFeedback.BoolValue) - { - MuteOff(); - } - else - { - MuteOn(); - } - } - - - /// - /// Increments the voluem - /// - /// - public override void VolumeUp(bool pressRelease) - { - // TODO: Implment volume decrement that calls SetVolume() - } - - /// - /// Decrements the volume - /// - /// - public override void VolumeDown(bool pressRelease) - { - // TODO: Implment volume decrement that calls SetVolume() - } - - /// - /// Scales the level and sets the codec to the specified level within its range - /// - /// level from slider (0-65535 range) - public override void SetVolume(ushort level) - { - var scaledLevel = CrestronEnvironment.ScaleWithLimits(level, 65535, 0, 100, 0); - SendText(string.Format("zConfiguration Audio Output volume: {0}", scaledLevel)); - } - - /// - /// Recalls the default volume on the codec - /// - public void VolumeSetToDefault() - { - } - - /// - /// - /// - public override void StandbyActivate() - { - // No corresponding function on device - } - - /// - /// - /// - public override void StandbyDeactivate() - { - // No corresponding function on device - } - - public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) - { - var joinMap = new ZoomRoomJoinMap(joinStart); - - var customJoins = JoinMapHelper.TryGetJoinMapAdvancedForDevice(joinMapKey); - - if (customJoins != null) - { - joinMap.SetCustomJoinData(customJoins); - } - - if (bridge != null) - { - bridge.AddJoinMap(Key, joinMap); - } - - LinkVideoCodecToApi(this, trilist, joinMap); - - LinkZoomRoomToApi(trilist, joinMap); - } - - /// - /// Links all the specific Zoom functionality to the API bridge - /// - /// - /// - public void LinkZoomRoomToApi(BasicTriList trilist, ZoomRoomJoinMap joinMap) - { - var meetingInfoCodec = this as IHasMeetingInfo; - if (meetingInfoCodec != null) - { - if (meetingInfoCodec.MeetingInfo != null) - { - trilist.SetBool(joinMap.MeetingCanRecord.JoinNumber, meetingInfoCodec.MeetingInfo.CanRecord); - } - - meetingInfoCodec.MeetingInfoChanged += (o, a) => - { - trilist.SetBool(joinMap.MeetingCanRecord.JoinNumber, a.Info.CanRecord); - }; - } - - var recordingCodec = this as IHasMeetingRecordingWithPrompt; - if (recordingCodec != null) - { - trilist.SetSigFalseAction(joinMap.StartRecording.JoinNumber, () => recordingCodec.StartRecording()); - trilist.SetSigFalseAction(joinMap.StopRecording.JoinNumber, () => recordingCodec.StopRecording()); - - recordingCodec.MeetingIsRecordingFeedback.LinkInputSig(trilist.BooleanInput[joinMap.StartRecording.JoinNumber]); - recordingCodec.MeetingIsRecordingFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.StopRecording.JoinNumber]); - - trilist.SetSigFalseAction(joinMap.RecordingPromptAgree.JoinNumber, () => recordingCodec.RecordingPromptAcknowledgement(true)); - trilist.SetSigFalseAction(joinMap.RecordingPromptDisagree.JoinNumber, () => recordingCodec.RecordingPromptAcknowledgement(false)); - - recordingCodec.RecordConsentPromptIsVisible.LinkInputSig(trilist.BooleanInput[joinMap.RecordConsentPromptIsVisible.JoinNumber]); - } - - var layoutsCodec = this as IHasZoomRoomLayouts; - if (layoutsCodec != null) - { - layoutsCodec.LayoutInfoChanged += (o, a) => - { - trilist.SetBool(joinMap.LayoutGalleryIsAvailable.JoinNumber, - zConfiguration.eLayoutStyle.Gallery == (a.AvailableLayouts & zConfiguration.eLayoutStyle.Gallery)); - - trilist.SetBool(joinMap.LayoutSpeakerIsAvailable.JoinNumber, - zConfiguration.eLayoutStyle.Speaker == (a.AvailableLayouts & zConfiguration.eLayoutStyle.Speaker)); - - - - trilist.SetBool(joinMap.LayoutStripIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.Strip - == - (a.AvailableLayouts & zConfiguration.eLayoutStyle.Strip)); - trilist.SetBool(joinMap.LayoutShareAllIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.ShareAll - == - (a.AvailableLayouts & - zConfiguration.eLayoutStyle.ShareAll)); - - // pass the names used to set the layout through the bridge - trilist.SetString(joinMap.LayoutGalleryIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.Gallery.ToString()); - trilist.SetString(joinMap.LayoutSpeakerIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.Speaker.ToString()); - trilist.SetString(joinMap.LayoutStripIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.Strip.ToString()); - trilist.SetString(joinMap.LayoutShareAllIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.ShareAll.ToString()); - }; - - trilist.SetSigFalseAction(joinMap.SwapContentWithThumbnail.JoinNumber, () => layoutsCodec.SwapContentWithThumbnail()); - - layoutsCodec.CanSwapContentWithThumbnailFeedback.LinkInputSig( - trilist.BooleanInput[joinMap.CanSwapContentWithThumbnail.JoinNumber]); - layoutsCodec.ContentSwappedWithThumbnailFeedback.LinkInputSig( - trilist.BooleanInput[joinMap.SwapContentWithThumbnail.JoinNumber]); - - layoutsCodec.LayoutViewIsOnFirstPageFeedback.LinkInputSig( - trilist.BooleanInput[joinMap.LayoutIsOnFirstPage.JoinNumber]); - layoutsCodec.LayoutViewIsOnLastPageFeedback.LinkInputSig(trilist.BooleanInput[joinMap.LayoutIsOnLastPage.JoinNumber]); - trilist.SetSigFalseAction(joinMap.LayoutTurnToNextPage.JoinNumber, () => layoutsCodec.LayoutTurnNextPage()); - trilist.SetSigFalseAction(joinMap.LayoutTurnToPreviousPage.JoinNumber, () => layoutsCodec.LayoutTurnPreviousPage()); - trilist.SetSigFalseAction(joinMap.GetAvailableLayouts.JoinNumber, () => layoutsCodec.GetAvailableLayouts()); - - trilist.SetStringSigAction(joinMap.GetSetCurrentLayout.JoinNumber, (s) => - { - try - { - var style = (zConfiguration.eLayoutStyle) Enum.Parse(typeof (zConfiguration.eLayoutStyle), s, true); - SetLayout(style); - } - catch (Exception e) - { - Debug.Console(1, this, "Unable to parse '{0}' to zConfiguration.eLayoutStyle: {1}", s, e); - } - }); - - layoutsCodec.LocalLayoutFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetCurrentLayout.JoinNumber]); - } - - var pinCodec = this as IHasParticipantPinUnpin; - if (pinCodec != null) - { - pinCodec.NumberOfScreensFeedback.LinkInputSig(trilist.UShortInput[joinMap.NumberOfScreens.JoinNumber]); - - // Set the value of the local property to be used when pinning a participant - trilist.SetUShortSigAction(joinMap.ScreenIndexToPinUserTo.JoinNumber, (u) => ScreenIndexToPinUserTo = u); - } - - var layoutSizeCodec = this as IHasSelfviewSize; - if (layoutSizeCodec != null) - { - trilist.SetSigFalseAction(joinMap.GetSetSelfviewPipSize.JoinNumber, layoutSizeCodec.SelfviewPipSizeToggle); - trilist.SetStringSigAction(joinMap.GetSetSelfviewPipSize.JoinNumber, (s) => - { - try - { - var size = (zConfiguration.eLayoutSize) Enum.Parse(typeof (zConfiguration.eLayoutSize), s, true); - var cmd = SelfviewPipSizes.FirstOrDefault(c => c.Command.Equals(size.ToString())); - SelfviewPipSizeSet(cmd); - } - catch (Exception e) - { - Debug.Console(1, this, "Unable to parse '{0}' to zConfiguration.eLayoutSize: {1}", s, e); - } - }); - - layoutSizeCodec.SelfviewPipSizeFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetSelfviewPipSize.JoinNumber]); - } - - MeetingInfoChanged += (device, args) => - { - trilist.SetString(joinMap.MeetingInfoId.JoinNumber, args.Info.Id); - trilist.SetString(joinMap.MeetingInfoHost.JoinNumber, args.Info.Host); - trilist.SetString(joinMap.MeetingInfoPassword.JoinNumber, args.Info.Password); - trilist.SetBool(joinMap.IsHost.JoinNumber, args.Info.IsHost); - trilist.SetBool(joinMap.ShareOnlyMeeting.JoinNumber, args.Info.IsSharingMeeting); - trilist.SetBool(joinMap.WaitingForHost.JoinNumber, args.Info.WaitingForHost); - //trilist.SetString(joinMap.CurrentSource.JoinNumber, args.Info.ShareStatus); - }; - - trilist.SetSigFalseAction(joinMap.StartMeetingNow.JoinNumber, () => StartMeeting(0)); - trilist.SetSigFalseAction(joinMap.ShareOnlyMeeting.JoinNumber, StartSharingOnlyMeeting); - trilist.SetSigFalseAction(joinMap.StartNormalMeetingFromSharingOnlyMeeting.JoinNumber, StartNormalMeetingFromSharingOnlyMeeting); - - trilist.SetStringSigAction(joinMap.SubmitPassword.JoinNumber, SubmitPassword); - - // Subscribe to call status to clear ShowPasswordPrompt when in meeting - this.CallStatusChange += (o, a) => - { - if (a.CallItem.Status == eCodecCallStatus.Connected || a.CallItem.Status == eCodecCallStatus.Disconnected) - { - trilist.SetBool(joinMap.MeetingPasswordRequired.JoinNumber, false); - } - - }; - - trilist.SetSigFalseAction(joinMap.CancelJoinAttempt.JoinNumber, () => { - trilist.SetBool(joinMap.MeetingPasswordRequired.JoinNumber, false); - EndAllCalls(); - }); - - PasswordRequired += (devices, args) => - { - Debug.Console(2, this, "***********************************PaswordRequired. Message: {0} Cancelled: {1} Last Incorrect: {2} Failed: {3}", args.Message, args.LoginAttemptCancelled, args.LastAttemptWasIncorrect, args.LoginAttemptFailed); - - if (args.LoginAttemptCancelled) - { - trilist.SetBool(joinMap.MeetingPasswordRequired.JoinNumber, false); - return; - } - - if (!string.IsNullOrEmpty(args.Message)) - { - trilist.SetString(joinMap.PasswordPromptMessage.JoinNumber, args.Message); - } - - if (args.LoginAttemptFailed) - { - // login attempt failed - return; - } - - trilist.SetBool(joinMap.PasswordIncorrect.JoinNumber, args.LastAttemptWasIncorrect); - trilist.SetBool(joinMap.MeetingPasswordRequired.JoinNumber, true); - }; - - trilist.OnlineStatusChange += (device, args) => - { - if (!args.DeviceOnLine) return; - - ComputeAvailableLayouts(); - layoutsCodec.LocalLayoutFeedback.FireUpdate(); - layoutsCodec.CanSwapContentWithThumbnailFeedback.FireUpdate(); - layoutsCodec.ContentSwappedWithThumbnailFeedback.FireUpdate(); - layoutsCodec.LayoutViewIsOnFirstPageFeedback.FireUpdate(); - layoutsCodec.LayoutViewIsOnLastPageFeedback.FireUpdate(); - pinCodec.NumberOfScreensFeedback.FireUpdate(); - layoutSizeCodec.SelfviewPipSizeFeedback.FireUpdate(); - }; - - var wirelessInfoCodec = this as IZoomWirelessShareInstructions; - if (wirelessInfoCodec != null) - { - if (Status != null && Status.Sharing != null) - { - SetSharingStateJoins(Status.Sharing, trilist, joinMap); - } - - wirelessInfoCodec.ShareInfoChanged += (o, a) => - { - SetSharingStateJoins(a.SharingStatus, trilist, joinMap); - }; - } - } - - void SetSharingStateJoins(zStatus.Sharing state, BasicTriList trilist, ZoomRoomJoinMap joinMap) - { - trilist.SetBool(joinMap.IsSharingAirplay.JoinNumber, state.isAirHostClientConnected); - trilist.SetBool(joinMap.IsSharingHdmi.JoinNumber, state.isBlackMagicConnected || state.isDirectPresentationConnected); - - trilist.SetString(joinMap.DisplayState.JoinNumber, state.dispState.ToString()); - trilist.SetString(joinMap.AirplayShareCode.JoinNumber, state.password); - trilist.SetString(joinMap.LaptopShareKey.JoinNumber, state.directPresentationSharingKey); - trilist.SetString(joinMap.WifiName.JoinNumber, state.wifiName); - trilist.SetString(joinMap.ServerName.JoinNumber, state.serverName); - } - - public override void ExecuteSwitch(object selector) - { - var action = selector as Action; - if (action == null) - { - return; - } - - action(); - } - - public void AcceptCall() - { - _waitingForUserToAcceptOrRejectIncomingCall = false; - - var incomingCall = - ActiveCalls.FirstOrDefault( - c => c.Status.Equals(eCodecCallStatus.Ringing) && c.Direction.Equals(eCodecCallDirection.Incoming)); - - AcceptCall(incomingCall); - } - - public override void AcceptCall(CodecActiveCallItem call) - { - _waitingForUserToAcceptOrRejectIncomingCall = false; - - SendText(string.Format("zCommand Call Accept callerJID: {0}", call.Id)); - - call.Status = eCodecCallStatus.Connected; - - OnCallStatusChange(call); - - UpdateCallStatus(); - } - - public void RejectCall() - { - _waitingForUserToAcceptOrRejectIncomingCall = false; - - var incomingCall = - ActiveCalls.FirstOrDefault( - c => c.Status.Equals(eCodecCallStatus.Ringing) && c.Direction.Equals(eCodecCallDirection.Incoming)); - - RejectCall(incomingCall); - } - - public override void RejectCall(CodecActiveCallItem call) - { - _waitingForUserToAcceptOrRejectIncomingCall = false; - - SendText(string.Format("zCommand Call Reject callerJID: {0}", call.Id)); - - call.Status = eCodecCallStatus.Disconnected; - - OnCallStatusChange(call); - - UpdateCallStatus(); - } - - public override void Dial(Meeting meeting) - { - Debug.Console(1, this, "Dialing meeting.Id: {0} Title: {1}", meeting.Id, meeting.Title); - _lastDialedMeetingNumber = meeting.Id; - SendText(string.Format("zCommand Dial Start meetingNumber: {0}", meeting.Id)); - } - - public override void Dial(string number) - { - Debug.Console(2, this, "Dialing number: {0}", number); - _lastDialedMeetingNumber = number; - SendText(string.Format("zCommand Dial Join meetingNumber: {0}", number)); - } - - /// - /// Dials a meeting with a password - /// - /// - /// - public void Dial(string number, string password) - { - Debug.Console(2, this, "Dialing meeting number: {0} with password: {1}", number, password); - SendText(string.Format("zCommand Dial Join meetingNumber: {0} password: {1}", number, password)); - } - - /// - /// Invites a contact to either a new meeting (if not already in a meeting) or the current meeting. - /// Currently only invites a single user - /// - /// - public override void Dial(IInvitableContact contact) - { - var ic = contact as InvitableDirectoryContact; - - if (ic != null) - { - Debug.Console(1, this, "Attempting to Dial (Invite): {0}", ic.Name); - - if (!IsInCall) - { - SendText(string.Format("zCommand Invite Duration: {0} user: {1}", DefaultMeetingDurationMin, - ic.ContactId)); - } - else - { - SendText(string.Format("zCommand Call invite user: {0}", ic.ContactId)); - } - } - } - - /// - /// Invites contacts to a new meeting for a specified duration - /// - /// - /// - public void InviteContactsToNewMeeting(List contacts, uint duration) - { - if(duration == 0) - { - duration = DefaultMeetingDurationMin; - } - - StringBuilder message = new StringBuilder(); - - // Add the prefix - message.Append(string.Format("zCommand Invite Duration: {0}", duration)); - - // Add each invitee - foreach (var contact in contacts) - { - var invitee = string.Format(" user: {0}", contact.ContactId); - - message.Append(invitee); - } - - SendText(message.ToString()); - } - - /// - /// Invites contacts to an existing meeting - /// - /// - public void InviteContactsToExistingMeeting(List contacts) - { - StringBuilder message = new StringBuilder(); - - // Add the prefix - message.Append(string.Format("zCommand Call Invite")); - - // Add each invitee - foreach (var contact in contacts) - { - var invitee = string.Format(" user: {0}", contact.ContactId); - - message.Append(invitee); - } - - SendText(message.ToString()); - } - - - /// - /// Starts a PMI Meeting for the specified duration (or default meeting duration if 0 is specified) - /// - /// duration of meeting - public void StartMeeting(uint duration) - { - uint dur = DefaultMeetingDurationMin; - - if (duration > 0) - dur = duration; - - SendText(string.Format("zCommand Dial StartPmi Duration: {0}", dur)); - } - - public void LeaveMeeting() - { - _meetingPasswordRequired = false; - _waitingForUserToAcceptOrRejectIncomingCall = false; - - SendText("zCommand Call Leave"); - } - - public override void EndCall(CodecActiveCallItem call) - { - _meetingPasswordRequired = false; - _waitingForUserToAcceptOrRejectIncomingCall = false; - - SendText("zCommand Call Disconnect"); - } - - public override void EndAllCalls() - { - _meetingPasswordRequired = false; - _waitingForUserToAcceptOrRejectIncomingCall = false; - - SendText("zCommand Call Disconnect"); - } - - public override void SendDtmf(string s) - { - SendDtmfToPhone(s); - } - - /// - /// Call when directory results are updated - /// - /// - private void OnDirectoryResultReturned(CodecDirectory result) - { - try - { - Debug.Console(2, this, "OnDirectoryResultReturned. Result has {0} contacts", result.Contacts.Count); - - CurrentDirectoryResultIsNotDirectoryRoot.FireUpdate(); - - var directoryResult = result; - var directoryIsRoot = CurrentDirectoryResultIsNotDirectoryRoot.BoolValue == false; - - // If result is Root, create a copy and filter out contacts whose parent folder is not root - //if (!CurrentDirectoryResultIsNotDirectoryRoot.BoolValue) - //{ - // Debug.Console(2, this, "Filtering DirectoryRoot to remove contacts for display"); - - // directoryResult.ResultsFolderId = result.ResultsFolderId; - // directoryResult.AddFoldersToDirectory(result.Folders); - // directoryResult.AddContactsToDirectory( - // result.Contacts.Where((c) => c.ParentFolderId == result.ResultsFolderId).ToList()); - //} - //else - //{ - // directoryResult = result; - //} - - Debug.Console(2, this, "Updating directoryResult. IsOnRoot: {0} Contact Count: {1}", - directoryIsRoot, directoryResult.Contacts.Count); - - // This will return the latest results to all UIs. Multiple indendent UI Directory browsing will require a different methodology - var handler = DirectoryResultReturned; - if (handler != null) - { - handler(this, new DirectoryEventArgs - { - Directory = directoryResult, - DirectoryIsOnRoot = directoryIsRoot - }); - } - - - } - catch (Exception e) - { - Debug.Console(2, this, "Error: {0}", e); - } - - //PrintDirectory(result); - } - - /// - /// Builds the cameras List by using the Zoom Room zStatus.Cameras data. Could later be modified to build from config data - /// - private void SetUpCameras() - { - SelectedCameraFeedback = new StringFeedback(() => Configuration.Video.Camera.SelectedId); - - ControllingFarEndCameraFeedback = new BoolFeedback(() => SelectedCamera is IAmFarEndCamera); - - foreach (var cam in Status.Cameras) - { - // Known Issue: - // Crestron UC engine systems seem to report an item in the cameras list that represnts the USB bridge device. - // If we know the name and it's reliably consistent, we could ignore it here... - - if (cam.Name.IndexOf("HD-CONV-USB") > -1) - { - // Skip this as it's the Crestron USB box, not a real camera - continue; - } - - var existingCam = Cameras.FirstOrDefault((c) => c.Key.Equals(cam.id)); - - if (existingCam == null) - { - var camera = new ZoomRoomCamera(cam.id, cam.Name, this); - - Cameras.Add(camera); - - if (cam.Selected) - { - SelectedCamera = camera; - } - } - } - - if (IsInCall) - { - UpdateFarEndCameras(); - } - - _syncState.CamerasSetUp(); - } - - /// - /// Dynamically creates far end cameras for call participants who have far end control enabled. - /// - private void UpdateFarEndCameras() - { - // TODO: set up far end cameras for the current call - } - - #region Implementation of IHasParticipants - - public CodecParticipants Participants { get; private set; } - - public void RemoveParticipant(int userId) - { - SendText(string.Format("zCommand Call Expel Id: {0}", userId)); - } - - public void SetParticipantAsHost(int userId) - { - SendText(string.Format("zCommand Call HostChange Id: {0}", userId)); - } - - public void AdmitParticipantFromWaitingRoom(int userId) - { - SendText(string.Format("zCommand Call Admit Participant Id: {0}", userId)); - } - - #endregion - - #region IHasParticipantAudioMute Members - - public void MuteAudioForAllParticipants() - { - SendText(string.Format("zCommand Call MuteAll Mute: on")); - } - - public void MuteAudioForParticipant(int userId) - { - SendText(string.Format("zCommand Call MuteParticipant Mute: on Id: {0}", userId)); - } - - public void UnmuteAudioForParticipant(int userId) - { - SendText(string.Format("zCommand Call MuteParticipant Mute: off Id: {0}", userId)); - } - - public void ToggleAudioForParticipant(int userId) - { - var user = Participants.CurrentParticipants.FirstOrDefault(p => p.UserId.Equals(userId)); - - if (user == null) - { - Debug.Console(2, this, "Unable to find user with id: {0}", userId); - return; - } - - if (user.AudioMuteFb) - { - UnmuteAudioForParticipant(userId); - } - else - { - MuteAudioForParticipant(userId); - } - } - - #endregion - - #region IHasParticipantVideoMute Members - - public void MuteVideoForParticipant(int userId) - { - SendText(string.Format("zCommand Call MuteParticipantVideo Mute: on Id: {0}", userId)); - } - - public void UnmuteVideoForParticipant(int userId) - { - SendText(string.Format("zCommand Call MuteParticipantVideo Mute: off Id: {0}", userId)); - } - - public void ToggleVideoForParticipant(int userId) - { - var user = Participants.CurrentParticipants.FirstOrDefault(p => p.UserId.Equals(userId)); - - if (user == null) - { - Debug.Console(2, this, "Unable to find user with id: {0}", userId); - return; - } - - if (user.VideoMuteFb) - { - UnmuteVideoForParticipant(userId); - } - else - { - MuteVideoForParticipant(userId); - } - } - - #endregion - - #region IHasParticipantPinUnpin Members - - private Func NumberOfScreensFeedbackFunc - { - get { return () => Status.NumberOfScreens.NumOfScreens; } - } - - public IntFeedback NumberOfScreensFeedback { get; private set; } - - public int ScreenIndexToPinUserTo { get; private set; } - - public void PinParticipant(int userId, int screenIndex) - { - SendText(string.Format("zCommand Call Pin Id: {0} Enable: on Screen: {1}", userId, screenIndex)); - } - - public void UnPinParticipant(int userId) - { - SendText(string.Format("zCommand Call Pin Id: {0} Enable: off", userId)); - } - - public void ToggleParticipantPinState(int userId, int screenIndex) - { - var user = Participants.CurrentParticipants.FirstOrDefault(p => p.UserId.Equals(userId)); - - if (user == null) - { - Debug.Console(2, this, "Unable to find user with id: {0}", userId); - return; - } - - if (user.IsPinnedFb) - { - UnPinParticipant(userId); - } - else - { - PinParticipant(userId, screenIndex); - } - } - - #endregion - - #region Implementation of IHasCameraOff - - public BoolFeedback CameraIsOffFeedback { get; private set; } - - public void CameraOff() - { - CameraMuteOn(); - } - - #endregion - - public BoolFeedback CameraIsMutedFeedback { get; private set; } - - public void CameraMuteOn() - { - SendText("zConfiguration Call Camera Mute: On"); - } - - public void CameraMuteOff() - { - SendText("zConfiguration Call Camera Mute: Off"); - } - - public void CameraMuteToggle() - { - if (CameraIsMutedFeedback.BoolValue) - CameraMuteOff(); - else - CameraMuteOn(); - } - - #region Implementation of IHasCameraAutoMode - - //Zoom doesn't support camera auto modes. Setting this to just unmute video - public void CameraAutoModeOn() - { - CameraMuteOff(); - throw new NotImplementedException("Zoom Room Doesn't support camera auto mode"); - } - - //Zoom doesn't support camera auto modes. Setting this to just unmute video - public void CameraAutoModeOff() - { - SendText("zConfiguration Call Camera Mute: Off"); - } - - public void CameraAutoModeToggle() - { - throw new NotImplementedException("Zoom Room doesn't support camera auto mode"); - } - - public BoolFeedback CameraAutoModeIsOnFeedback { get; private set; } - - #endregion - - #region Implementation of IHasFarEndContentStatus - - public BoolFeedback ReceivingContent { get; private set; } - - #endregion - - #region Implementation of IHasSelfviewPosition - - private CodecCommandWithLabel _currentSelfviewPipPosition; - - public StringFeedback SelfviewPipPositionFeedback { get; private set; } - - public void SelfviewPipPositionSet(CodecCommandWithLabel position) - { - SendText(String.Format("zConfiguration Call Layout Position: {0}", position.Command)); - } - - public void SelfviewPipPositionToggle() - { - if (_currentSelfviewPipPosition != null) - { - var nextPipPositionIndex = SelfviewPipPositions.IndexOf(_currentSelfviewPipPosition) + 1; - - if (nextPipPositionIndex >= SelfviewPipPositions.Count) - // Check if we need to loop back to the first item in the list - nextPipPositionIndex = 0; - - SelfviewPipPositionSet(SelfviewPipPositions[nextPipPositionIndex]); - } - } - - public List SelfviewPipPositions = new List() - { - new CodecCommandWithLabel("UpLeft", "Center Left"), - new CodecCommandWithLabel("UpRight", "Center Right"), - new CodecCommandWithLabel("DownRight", "Lower Right"), - new CodecCommandWithLabel("DownLeft", "Lower Left") - }; - - private void ComputeSelfviewPipPositionStatus() - { - _currentSelfviewPipPosition = - SelfviewPipPositions.FirstOrDefault( - p => p.Command.ToLower().Equals(Configuration.Call.Layout.Position.ToString().ToLower())); - } - - #endregion - - // TODO: #714 [ ] Implementation of IHasSelfviewPipSize - - #region Implementation of IHasSelfviewPipSize - - private CodecCommandWithLabel _currentSelfviewPipSize; - - public StringFeedback SelfviewPipSizeFeedback { get; private set; } - - public void SelfviewPipSizeSet(CodecCommandWithLabel size) - { - SendText(String.Format("zConfiguration Call Layout Size: {0}", size.Command)); - } - - public void SelfviewPipSizeToggle() - { - if (_currentSelfviewPipSize != null) - { - var nextPipSizeIndex = SelfviewPipSizes.IndexOf(_currentSelfviewPipSize) + 1; - - if (nextPipSizeIndex >= SelfviewPipSizes.Count) - // Check if we need to loop back to the first item in the list - nextPipSizeIndex = 0; - - SelfviewPipSizeSet(SelfviewPipSizes[nextPipSizeIndex]); - } - } - - public List SelfviewPipSizes = new List() - { - new CodecCommandWithLabel("Off", "Off"), - new CodecCommandWithLabel("Size1", "Size 1"), - new CodecCommandWithLabel("Size2", "Size 2"), - new CodecCommandWithLabel("Size3", "Size 3"), - new CodecCommandWithLabel("Strip", "Strip") - }; - - private void ComputeSelfviewPipSizeStatus() - { - _currentSelfviewPipSize = - SelfviewPipSizes.FirstOrDefault( - p => p.Command.ToLower().Equals(Configuration.Call.Layout.Size.ToString().ToLower())); - } - - #endregion - - #region Implementation of IHasPhoneDialing - - private Func PhoneOffHookFeedbackFunc - { - get { return () => Status.PhoneCall.OffHook; } - } - - private Func CallerIdNameFeedbackFunc - { - get { return () => Status.PhoneCall.PeerDisplayName; } - } - - private Func CallerIdNumberFeedbackFunc - { - get { return () => Status.PhoneCall.PeerNumber; } - } - - public BoolFeedback PhoneOffHookFeedback { get; private set; } - public StringFeedback CallerIdNameFeedback { get; private set; } - public StringFeedback CallerIdNumberFeedback { get; private set; } - - public void DialPhoneCall(string number) - { - SendText(String.Format("zCommand Dial PhoneCallOut Number: {0}", number)); - } - - public void EndPhoneCall() - { - SendText(String.Format("zCommand Dial PhoneHangUp CallId: {0}", Status.PhoneCall.CallId)); - } - - public void SendDtmfToPhone(string digit) - { - SendText(String.Format("zCommand SendSipDTMF CallId: {0} Key: {1}", Status.PhoneCall.CallId, digit)); - } - - #endregion - - #region IHasZoomRoomLayouts Members - - public event EventHandler LayoutInfoChanged; - - private Func LayoutViewIsOnFirstPageFeedbackFunc - { - get { return () => Status.Layout.is_In_First_Page; } - } - - private Func LayoutViewIsOnLastPageFeedbackFunc - { - get { return () => Status.Layout.is_In_Last_Page; } - } - - private Func CanSwapContentWithThumbnailFeedbackFunc - { - get { return () => Status.Layout.can_Switch_Floating_Share_Content; } - } - - private Func ContentSwappedWithThumbnailFeedbackFunc - { - get { return () => Configuration.Call.Layout.ShareThumb; } - } - - public BoolFeedback LayoutViewIsOnFirstPageFeedback { get; private set; } - - public BoolFeedback LayoutViewIsOnLastPageFeedback { get; private set; } - - public BoolFeedback CanSwapContentWithThumbnailFeedback { get; private set; } - - public BoolFeedback ContentSwappedWithThumbnailFeedback { get; private set; } - - - public zConfiguration.eLayoutStyle LastSelectedLayout { get; private set; } - - public zConfiguration.eLayoutStyle AvailableLayouts { get; private set; } - - /// - /// Reads individual properties to determine if which layouts are avalailable - /// - private void ComputeAvailableLayouts() - { - Debug.Console(1, this, "Computing available layouts..."); - zConfiguration.eLayoutStyle availableLayouts = zConfiguration.eLayoutStyle.None; - if (Status.Layout.can_Switch_Wall_View) - { - availableLayouts |= zConfiguration.eLayoutStyle.Gallery; - } - - if (Status.Layout.can_Switch_Speaker_View) - { - availableLayouts |= zConfiguration.eLayoutStyle.Speaker; - } - - if (Status.Layout.can_Switch_Share_On_All_Screens) - { - availableLayouts |= zConfiguration.eLayoutStyle.ShareAll; - } - - // There is no property that directly reports if strip mode is valid, but API stipulates - // that strip mode is available if the number of screens is 1 - if (Status.NumberOfScreens.NumOfScreens == 1 || Status.Layout.can_Switch_Strip_View || Status.Layout.video_type.ToLower() == "strip") - { - availableLayouts |= zConfiguration.eLayoutStyle.Strip; - } - - Debug.Console(1, this, "availablelayouts: {0}", availableLayouts); - - AvailableLayouts = availableLayouts; - } - - private void OnLayoutInfoChanged() - { - var handler = LayoutInfoChanged; - if (handler != null) - { - - var currentLayout = zConfiguration.eLayoutStyle.None; - - currentLayout = (zConfiguration.eLayoutStyle)Enum.Parse(typeof(zConfiguration.eLayoutStyle), string.IsNullOrEmpty(LocalLayoutFeedback.StringValue) ? "None" : LocalLayoutFeedback.StringValue, true); - - handler(this, new LayoutInfoChangedEventArgs() - { - AvailableLayouts = AvailableLayouts, - CurrentSelectedLayout = currentLayout, - LayoutViewIsOnFirstPage = LayoutViewIsOnFirstPageFeedback.BoolValue, - LayoutViewIsOnLastPage = LayoutViewIsOnLastPageFeedback.BoolValue, - CanSwapContentWithThumbnail = CanSwapContentWithThumbnailFeedback.BoolValue, - ContentSwappedWithThumbnail = ContentSwappedWithThumbnailFeedback.BoolValue, - }); - } - } - - public void GetAvailableLayouts() - { - SendText("zStatus Call Layout"); - } - - public void SetLayout(zConfiguration.eLayoutStyle layoutStyle) - { - LastSelectedLayout = layoutStyle; - SendText(String.Format("zConfiguration Call Layout Style: {0}", layoutStyle.ToString())); - } - - public void SwapContentWithThumbnail() - { - if (CanSwapContentWithThumbnailFeedback.BoolValue) - { - var oppositeValue = ContentSwappedWithThumbnailFeedback.BoolValue ? "on" : "off"; - // Get the value based on the opposite of the current state - // TODO: #697 [*] Need to verify the ternary above and make sure that the correct on/off value is being send based on the true/false value of the feedback - // to toggle the state - SendText(String.Format("zConfiguration Call Layout ShareThumb: {0}", oppositeValue)); - } - } - - public void LayoutTurnNextPage() - { - SendText("zCommand Call Layout TurnPage Forward: On"); - } - - public void LayoutTurnPreviousPage() - { - SendText("zCommand Call Layout TurnPage Forward: Off"); - } - - #endregion - - #region IHasCodecLayouts Members - - private Func LocalLayoutFeedbackFunc - { - get - { - return () => - { - if (Configuration.Call.Layout.Style != zConfiguration.eLayoutStyle.None) - return Configuration.Call.Layout.Style.ToString(); - else - return Configuration.Client.Call.Layout.Style.ToString(); - }; - } - } - - public StringFeedback LocalLayoutFeedback { get; private set; } - - public void LocalLayoutToggle() - { - var currentLayout = LocalLayoutFeedback.StringValue; - - var eCurrentLayout = (int) Enum.Parse(typeof (zConfiguration.eLayoutStyle), currentLayout, true); - - var nextLayout = GetNextLayout(eCurrentLayout); - - if (nextLayout != zConfiguration.eLayoutStyle.None) - { - SetLayout(nextLayout); - } - } - - /// - /// Tries to get the next available layout - /// - /// - /// - private zConfiguration.eLayoutStyle GetNextLayout(int currentLayout) - { - if (AvailableLayouts == zConfiguration.eLayoutStyle.None) - { - return zConfiguration.eLayoutStyle.None; - } - - zConfiguration.eLayoutStyle nextLayout; - - if (((zConfiguration.eLayoutStyle) currentLayout & zConfiguration.eLayoutStyle.ShareAll) == - zConfiguration.eLayoutStyle.ShareAll) - { - nextLayout = zConfiguration.eLayoutStyle.Gallery; - } - else - { - nextLayout = (zConfiguration.eLayoutStyle) (currentLayout << 1); - } - - if ((AvailableLayouts & nextLayout) == nextLayout) - { - return nextLayout; - } - else - { - return GetNextLayout((int) nextLayout); - } - } - - public void LocalLayoutToggleSingleProminent() - { - throw new NotImplementedException(); - } - - public void MinMaxLayoutToggle() - { - throw new NotImplementedException(); - } - - #endregion - - #region IPasswordPrompt Members - - public event EventHandler PasswordRequired; - - public void SubmitPassword(string password) - { - _meetingPasswordRequired = false; - Debug.Console(2, this, "Password Submitted: {0}", password); - Dial(_lastDialedMeetingNumber, password); - } - - void OnPasswordRequired(bool lastAttemptIncorrect, bool loginFailed, bool loginCancelled, string message) - { - _meetingPasswordRequired = !loginFailed || !loginCancelled; - - var handler = PasswordRequired; - if (handler != null) - { - Debug.Console(2, this, "Meeting Password Required: {0}", _meetingPasswordRequired); - - handler(this, new PasswordPromptEventArgs(lastAttemptIncorrect, loginFailed, loginCancelled, message)); - } - } - - #endregion - - #region IHasMeetingInfo Members - - public event EventHandler MeetingInfoChanged; - - private MeetingInfo _meetingInfo; - - public MeetingInfo MeetingInfo - { - get { return _meetingInfo; } - private set - { - if (value != _meetingInfo) - { - _meetingInfo = value; - - var handler = MeetingInfoChanged; - if (handler != null) - { - handler(this, new MeetingInfoEventArgs(_meetingInfo)); - } - } - } - } - - #endregion - - #region Implementation of IHasPresentationOnlyMeeting - - public void StartSharingOnlyMeeting() - { - StartSharingOnlyMeeting(eSharingMeetingMode.None, 30, String.Empty); - } - - public void StartSharingOnlyMeeting(eSharingMeetingMode displayMode) - { - StartSharingOnlyMeeting(displayMode, DefaultMeetingDurationMin, String.Empty); - } - - public void StartSharingOnlyMeeting(eSharingMeetingMode displayMode, uint duration) - { - StartSharingOnlyMeeting(displayMode, duration, String.Empty); - } - - public void StartSharingOnlyMeeting(eSharingMeetingMode displayMode, uint duration, string password) - { - SendText(String.Format("zCommand Dial Sharing Duration: {0} DisplayState: {1} Password: {2}", duration, displayMode, password)); - } - - public void StartNormalMeetingFromSharingOnlyMeeting() - { - Debug.Console(2, this, "Converting Sharing Meeting to Normal Meeting"); - SendText("zCommand call sharing ToNormal"); - } - - #endregion - - #region IHasMeetingLock Members - - public BoolFeedback MeetingIsLockedFeedback { get; private set; } - - public void LockMeeting() - { - SendText(string.Format("zConfiguration Call Lock Enable: on")); - } - - public void UnLockMeeting() - { - SendText(string.Format("zConfiguration Call Lock Enable: off")); - } - - public void ToggleMeetingLock() - { - if (MeetingIsLockedFeedback.BoolValue) - { - UnLockMeeting(); - } - else - { - LockMeeting(); - } - } - - #endregion - - #region IHasMeetingRecordingWithPrompt Members - - public BoolFeedback MeetingIsRecordingFeedback { get; private set; } - - bool _recordConsentPromptIsVisible; - - public BoolFeedback RecordConsentPromptIsVisible { get; private set; } - - public void RecordingPromptAcknowledgement(bool agree) - { - var command = string.Format("zCommand Agree Recording: {0}", agree ? "on" : "off"); - //Debug.Console(2, this, "Sending agree: {0} {1}", agree, command); - SendText(command); - } - - public void StartRecording() - { - SendText(string.Format("zCommand Call Record Enable: on")); - } - - public void StopRecording() - { - SendText(string.Format("zCommand Call Record Enable: off")); - } - - public void ToggleRecording() - { - if (MeetingIsRecordingFeedback.BoolValue) - { - StopRecording(); - } - else - { - StartRecording(); - } - } - - #endregion - - #region IZoomWirelessShareInstructions Members - - public event EventHandler ShareInfoChanged; - - public zStatus.Sharing SharingState - { - get - { - return Status.Sharing; - } - } - - void OnShareInfoChanged(zStatus.Sharing status) - { - Debug.Console(2, this, -@"ShareInfoChanged: -isSharingHDMI: {0} -isSharingAirplay: {1} -AirplayPassword: {2} -OSD Display State: {3} -", -status.isSharingBlackMagic, -status.isAirHostClientConnected, -status.password, -status.dispState); - - var handler = ShareInfoChanged; - if (handler != null) - { - handler(this, new ShareInfoEventArgs(status)); - } - } - - #endregion - } - - /// - /// Zoom Room specific info object - /// - public class ZoomRoomInfo : VideoCodecInfo - { - public ZoomRoomInfo(ZoomRoomStatus status, ZoomRoomConfiguration configuration) - { - Status = status; - Configuration = configuration; - } - - [JsonIgnore] - public ZoomRoomStatus Status { get; private set; } - [JsonIgnore] - public ZoomRoomConfiguration Configuration { get; private set; } - - public override bool AutoAnswerEnabled - { - get { return Status.SystemUnit.RoomInfo.AutoAnswerIsEnabled; } - } - - public override string E164Alias - { - get - { - if (!string.IsNullOrEmpty(Status.SystemUnit.MeetingNumber)) - { - return Status.SystemUnit.MeetingNumber; - } - return string.Empty; - } - } - - public override string H323Id - { - get - { - if (!string.IsNullOrEmpty(Status.Call.Info.meeting_list_item.third_party.h323_address)) - { - return Status.Call.Info.meeting_list_item.third_party.h323_address; - } - return string.Empty; - } - } - - public override string IpAddress - { - get - { - if (!string.IsNullOrEmpty(Status.SystemUnit.RoomInfo.AccountEmail)) - { - return Status.SystemUnit.RoomInfo.AccountEmail; - } - return string.Empty; - } - } - - public override bool MultiSiteOptionIsEnabled - { - get { return true; } - } - - public override string SipPhoneNumber - { - get - { - if (!string.IsNullOrEmpty(Status.Call.Info.dialIn)) - { - return Status.Call.Info.dialIn; - } - return string.Empty; - } - } - - public override string SipUri - { - get - { - if (!string.IsNullOrEmpty(Status.Call.Info.meeting_list_item.third_party.sip_address)) - { - return Status.Call.Info.meeting_list_item.third_party.sip_address; - } - return string.Empty; - } - } - } - - /// - /// Tracks the initial sycnronization state when establishing a new connection - /// - public class ZoomRoomSyncState : IKeyed - { - private readonly ZoomRoom _parent; - private readonly CrestronQueue _syncQueries; - private bool _initialSyncComplete; - - public ZoomRoomSyncState(string key, ZoomRoom parent) - { - _parent = parent; - Key = key; - _syncQueries = new CrestronQueue(50); - CodecDisconnected(); - } - - public bool InitialSyncComplete - { - get { return _initialSyncComplete; } - private set - { - if (value) - { - var handler = InitialSyncCompleted; - if (handler != null) - { - handler(this, new EventArgs()); - } - } - _initialSyncComplete = value; - } - } - - public bool LoginResponseWasReceived { get; private set; } - - public bool FirstJsonResponseWasReceived { get; private set; } - - public bool InitialQueryMessagesWereSent { get; private set; } - - public bool LastQueryResponseWasReceived { get; private set; } - - public bool CamerasHaveBeenSetUp { get; private set; } - - #region IKeyed Members - - public string Key { get; private set; } - - #endregion - - public event EventHandler InitialSyncCompleted; - - public event EventHandler FirstJsonResponseReceived; - - public void StartSync() - { - DequeueQueries(); - } - - private void DequeueQueries() - { - while (!_syncQueries.IsEmpty) - { - var query = _syncQueries.Dequeue(); - - _parent.SendText(query); - } - - InitialQueryMessagesSent(); - } - - public void AddQueryToQueue(string query) - { - _syncQueries.Enqueue(query); - } - - public void LoginResponseReceived() - { - LoginResponseWasReceived = true; - Debug.Console(1, this, "Login Rsponse Received."); - CheckSyncStatus(); - } - - public void ReceivedFirstJsonResponse() - { - FirstJsonResponseWasReceived = true; - Debug.Console(1, this, "First JSON Response Received."); - - var handler = FirstJsonResponseReceived; - if (handler != null) - { - handler(this, null); - } - CheckSyncStatus(); - } - - public void InitialQueryMessagesSent() - { - InitialQueryMessagesWereSent = true; - Debug.Console(1, this, "Query Messages Sent."); - CheckSyncStatus(); - } - - public void LastQueryResponseReceived() - { - LastQueryResponseWasReceived = true; - Debug.Console(1, this, "Last Query Response Received."); - CheckSyncStatus(); - } - - public void CamerasSetUp() - { - CamerasHaveBeenSetUp = true; - Debug.Console(1, this, "Cameras Set Up."); - CheckSyncStatus(); - } - - public void CodecDisconnected() - { - _syncQueries.Clear(); - LoginResponseWasReceived = false; - FirstJsonResponseWasReceived = false; - InitialQueryMessagesWereSent = false; - LastQueryResponseWasReceived = false; - CamerasHaveBeenSetUp = false; - InitialSyncComplete = false; - } - - private void CheckSyncStatus() - { - if (LoginResponseWasReceived && FirstJsonResponseWasReceived && InitialQueryMessagesWereSent && LastQueryResponseWasReceived && - CamerasHaveBeenSetUp) - { - InitialSyncComplete = true; - Debug.Console(1, this, "Initial Codec Sync Complete!"); - } - else - { - InitialSyncComplete = false; - } - } - } - - public class ZoomRoomFactory : EssentialsDeviceFactory - { - public ZoomRoomFactory() - { - TypeNames = new List {"zoomroom"}; - } - - public override EssentialsDevice BuildDevice(DeviceConfig dc) - { - Debug.Console(1, "Factory Attempting to create new ZoomRoom Device"); - var comm = CommFactory.CreateCommForDevice(dc); - return new ZoomRoom(dc, comm); - } - } +extern alias Full; + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro.CrestronThread; +using Crestron.SimplSharpPro.DeviceSupport; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Routing; +using PepperDash.Essentials.Core.Queues; +using PepperDash.Essentials.Devices.Common.Cameras; +using PepperDash.Essentials.Devices.Common.Codec; +using PepperDash.Essentials.Devices.Common.VideoCodec.Cisco; +using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces; + +namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom +{ + public class ZoomRoom : VideoCodecBase, IHasCodecSelfView, IHasDirectoryHistoryStack, ICommunicationMonitor, + IRouting, + IHasScheduleAwareness, IHasCodecCameras, IHasParticipants, IHasCameraOff, IHasCameraMuteWithUnmuteReqeust, IHasCameraAutoMode, + IHasFarEndContentStatus, IHasSelfviewPosition, IHasPhoneDialing, IHasZoomRoomLayouts, IHasParticipantPinUnpin, + IHasParticipantAudioMute, IHasSelfviewSize, IPasswordPrompt, IHasStartMeeting, IHasMeetingInfo, IHasPresentationOnlyMeeting, + IHasMeetingLock, IHasMeetingRecordingWithPrompt, IZoomWirelessShareInstructions + { + public event EventHandler VideoUnmuteRequested; + + private const long MeetingRefreshTimer = 60000; + public uint DefaultMeetingDurationMin { get; private set; } + + /// + /// CR LF CR LF Delimits an echoed response to a command + /// + private const string EchoDelimiter = "\x0D\x0A\x0D\x0A"; + + private const string SendDelimiter = "\x0D"; + + /// + /// CR LF } CR LF Delimits a JSON response + /// + private const string JsonDelimiter = "\x0D\x0A\x7D\x0D\x0A"; + + private string[] Delimiters = new string[] { EchoDelimiter, JsonDelimiter, "OK\x0D\x0A", "end\x0D\x0A" }; + private readonly GenericQueue _receiveQueue; + + private readonly ZoomRoomSyncState _syncState; + public bool CommDebuggingIsOn; + private CodecDirectory _currentDirectoryResult; + private uint _jsonCurlyBraceCounter; + private bool _jsonFeedbackMessageIsIncoming; + private StringBuilder _jsonMessage; + private int _previousVolumeLevel; + private CameraBase _selectedCamera; + private string _lastDialedMeetingNumber; + + private CTimer contactsDebounceTimer; + + + private readonly ZoomRoomPropertiesConfig _props; + + private bool _meetingPasswordRequired; + + private bool _waitingForUserToAcceptOrRejectIncomingCall; + + public void Poll(string pollString) + { + if(_meetingPasswordRequired || _waitingForUserToAcceptOrRejectIncomingCall) return; + + SendText(string.Format("{0}{1}", pollString, SendDelimiter)); + } + + public ZoomRoom(DeviceConfig config, IBasicCommunication comm) + : base(config) + { + DefaultMeetingDurationMin = 30; + + _props = JsonConvert.DeserializeObject(config.Properties.ToString()); + + _receiveQueue = new GenericQueue(Key + "-rxQueue", Thread.eThreadPriority.MediumPriority, 2048); + + Communication = comm; + + if (_props.CommunicationMonitorProperties != null) + { + CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, _props.CommunicationMonitorProperties.PollInterval, _props.CommunicationMonitorProperties.TimeToWarning, _props.CommunicationMonitorProperties.TimeToError, + () => Poll(_props.CommunicationMonitorProperties.PollString)); + } + else + { + CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 30000, 120000, 300000, () => Poll("zStatus SystemUnit")); + } + + DeviceManager.AddDevice(CommunicationMonitor); + + Status = new ZoomRoomStatus(); + + Configuration = new ZoomRoomConfiguration(); + + CodecInfo = new ZoomRoomInfo(Status, Configuration); + + _syncState = new ZoomRoomSyncState(Key + "--Sync", this); + + _syncState.InitialSyncCompleted += SyncState_InitialSyncCompleted; + + _syncState.FirstJsonResponseReceived += (o, a) => SetUpSyncQueries(); + + PhonebookSyncState = new CodecPhonebookSyncState(Key + "--PhonebookSync"); + + PhonebookSyncState.InitialSyncCompleted += (o, a) => ResubscribeForAddedContacts(); + + PortGather = new CommunicationGather(Communication, Delimiters) {IncludeDelimiter = true}; + PortGather.LineReceived += Port_LineReceived; + + CodecOsdIn = new RoutingInputPort(RoutingPortNames.CodecOsd, + eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, new Action(StopSharing), this); + + Output1 = new RoutingOutputPort(RoutingPortNames.HdmiOut1, + eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, null, this); + + Output2 = new RoutingOutputPort(RoutingPortNames.HdmiOut2, + eRoutingSignalType.Video, + eRoutingPortConnectionType.DisplayPort, null, this); + + Output3 = new RoutingOutputPort(RoutingPortNames.HdmiOut3, + eRoutingSignalType.Audio | eRoutingSignalType.Video, + eRoutingPortConnectionType.Hdmi, null, this); + + SelfviewIsOnFeedback = new BoolFeedback(SelfViewIsOnFeedbackFunc); + + CameraIsOffFeedback = new BoolFeedback(CameraIsOffFeedbackFunc); + + CameraIsMutedFeedback = CameraIsOffFeedback; + + CameraAutoModeIsOnFeedback = new BoolFeedback(CameraAutoModeIsOnFeedbackFunc); + + CodecSchedule = new CodecScheduleAwareness(MeetingRefreshTimer); + + if (_props.MinutesBeforeMeetingStart > 0) + { + CodecSchedule.MeetingWarningMinutes = _props.MinutesBeforeMeetingStart; + } + + ReceivingContent = new BoolFeedback(FarEndIsSharingContentFeedbackFunc); + + SelfviewPipPositionFeedback = new StringFeedback(SelfviewPipPositionFeedbackFunc); + + // TODO: #714 [ ] SelfviewPipSizeFeedback + SelfviewPipSizeFeedback = new StringFeedback(SelfviewPipSizeFeedbackFunc); + + SetUpFeedbackActions(); + + Cameras = new List(); + + SetUpDirectory(); + + Participants = new CodecParticipants(); + + SupportsCameraOff = true; // Always allow turning off the camera for zoom calls? + SupportsCameraAutoMode = _props.SupportsCameraAutoMode; + + PhoneOffHookFeedback = new BoolFeedback(PhoneOffHookFeedbackFunc); + CallerIdNameFeedback = new StringFeedback(CallerIdNameFeedbackFunc); + CallerIdNumberFeedback = new StringFeedback(CallerIdNumberFeedbackFunc); + + LocalLayoutFeedback = new StringFeedback(LocalLayoutFeedbackFunc); + + LayoutViewIsOnFirstPageFeedback = new BoolFeedback(LayoutViewIsOnFirstPageFeedbackFunc); + LayoutViewIsOnLastPageFeedback = new BoolFeedback(LayoutViewIsOnLastPageFeedbackFunc); + CanSwapContentWithThumbnailFeedback = new BoolFeedback(CanSwapContentWithThumbnailFeedbackFunc); + ContentSwappedWithThumbnailFeedback = new BoolFeedback(ContentSwappedWithThumbnailFeedbackFunc); + + NumberOfScreensFeedback = new IntFeedback(NumberOfScreensFeedbackFunc); + + MeetingIsLockedFeedback = new BoolFeedback(() => Configuration.Call.Lock.Enable ); + + MeetingIsRecordingFeedback = new BoolFeedback(() => Status.Call.CallRecordInfo.meetingIsBeingRecorded ); + + RecordConsentPromptIsVisible = new BoolFeedback(() => _recordConsentPromptIsVisible); + + SetUpRouting(); + } + + public CommunicationGather PortGather { get; private set; } + + public ZoomRoomStatus Status { get; private set; } + + public ZoomRoomConfiguration Configuration { get; private set; } + + //CTimer LoginMessageReceivedTimer; + //CTimer RetryConnectionTimer; + + /// + /// Gets and returns the scaled volume of the codec + /// + protected override Func VolumeLevelFeedbackFunc + { + get + { + return () => + { + var scaledVol = CrestronEnvironment.ScaleWithLimits(Configuration.Audio.Output.Volume, 100, 0, 65535, 0); + + if (Configuration.Audio.Output.Volume != 0) + { + Debug.Console(2, this, "Storing previous volume level as: {0}, scaled: {1}", Configuration.Audio.Output.Volume, + scaledVol); + _previousVolumeLevel = scaledVol; // Store the previous level for recall + } + + return scaledVol; + }; + } + } + + protected override Func PrivacyModeIsOnFeedbackFunc + { + get + { + return () => + { + //Debug.Console(2, this, "PrivacyModeIsOnFeedbackFunc. IsInCall: {0} muteState: {1}", IsInCall, Configuration.Call.Microphone.Mute); + if (IsInCall) + { + //Debug.Console(2, this, "reporting muteState: ", Configuration.Call.Microphone.Mute); + return Configuration.Call.Microphone.Mute; + } + else + { + //Debug.Console(2, this, "muteState: true", IsInCall); + return false; + } + }; + } + } + + protected override Func StandbyIsOnFeedbackFunc + { + get { return () => false; } + } + + protected override Func SharingSourceFeedbackFunc + { + get + { + return () => + { + if (Status.Sharing.isAirHostClientConnected) + return "Airplay"; + else if (Status.Sharing.isDirectPresentationConnected || Status.Sharing.isBlackMagicConnected) + return "Laptop"; + else return "None"; + + }; + } + } + + protected override Func SharingContentIsOnFeedbackFunc + { + get { return () => Status.Sharing.isAirHostClientConnected || Status.Sharing.isDirectPresentationConnected || Status.Sharing.isSharingBlackMagic; } + } + + protected Func FarEndIsSharingContentFeedbackFunc + { + get { return () => Status.Call.Sharing.State == zEvent.eSharingState.Receiving; } + } + + protected override Func MuteFeedbackFunc + { + get { return () => Configuration.Audio.Output.Volume == 0; } + } + + //protected Func RoomIsOccupiedFeedbackFunc + //{ + // get + // { + // return () => false; + // } + //} + + //protected Func PeopleCountFeedbackFunc + //{ + // get + // { + // return () => 0; + // } + //} + + protected Func SelfViewIsOnFeedbackFunc + { + get { return () => !Configuration.Video.HideConfSelfVideo; } + } + + protected Func CameraIsOffFeedbackFunc + { + get { return () => Configuration.Call.Camera.Mute; } + } + + protected Func CameraAutoModeIsOnFeedbackFunc + { + get { return () => false; } + } + + protected Func SelfviewPipPositionFeedbackFunc + { + get + { + return + () => + _currentSelfviewPipPosition != null + ? _currentSelfviewPipPosition.Command ?? "Unknown" + : "Unknown"; + } + } + + // TODO: #714 [ ] SelfviewPipSizeFeedbackFunc + protected Func SelfviewPipSizeFeedbackFunc + { + get + { + return + () => + _currentSelfviewPipSize != null + ? _currentSelfviewPipSize.Command ?? "Unknown" + : "Unknown"; + } + } + + protected Func LocalLayoutIsProminentFeedbackFunc + { + get { return () => false; } + } + + + public RoutingInputPort CodecOsdIn { get; private set; } + public RoutingOutputPort Output1 { get; private set; } + public RoutingOutputPort Output2 { get; private set; } + public RoutingOutputPort Output3 { get; private set; } + + #region ICommunicationMonitor Members + + public StatusMonitorBase CommunicationMonitor { get; private set; } + + #endregion + + #region IHasCodecCameras Members + + public event EventHandler CameraSelected; + + public List Cameras { get; private set; } + + public CameraBase SelectedCamera + { + get { return _selectedCamera; } + private set + { + _selectedCamera = value; + SelectedCameraFeedback.FireUpdate(); + ControllingFarEndCameraFeedback.FireUpdate(); + + var handler = CameraSelected; + if (handler != null) + { + handler(this, new CameraSelectedEventArgs(_selectedCamera)); + } + } + } + + + public StringFeedback SelectedCameraFeedback { get; private set; } + + public void SelectCamera(string key) + { + if (CameraIsMutedFeedback.BoolValue) + { + CameraMuteOff(); + } + + SendText(string.Format("zConfiguration Video Camera selectedId: {0}", key)); + } + + public CameraBase FarEndCamera { get; private set; } + + public BoolFeedback ControllingFarEndCameraFeedback { get; private set; } + + #endregion + + #region IHasCodecSelfView Members + + public BoolFeedback SelfviewIsOnFeedback { get; private set; } + + public void GetSelfViewMode() + { + SendText("zConfiguration Video hide_conf_self_video"); + } + + public void SelfViewModeOn() + { + SendText("zConfiguration Video hide_conf_self_video: off"); + } + + public void SelfViewModeOff() + { + SendText("zConfiguration Video hide_conf_self_video: on"); + } + + public void SelfViewModeToggle() + { + if (SelfviewIsOnFeedback.BoolValue) + { + SelfViewModeOff(); + } + else + { + SelfViewModeOn(); + } + } + + #endregion + + #region IHasDirectoryHistoryStack Members + + public event EventHandler DirectoryResultReturned; + public CodecDirectory DirectoryRoot { get; private set; } + + public CodecDirectory CurrentDirectoryResult + { + get { return _currentDirectoryResult; } + private set + { + _currentDirectoryResult = value; + + Debug.Console(2, this, "CurrentDirectoryResult Updated. ResultsFolderId: {0} Contact Count: {1}", + _currentDirectoryResult.ResultsFolderId, _currentDirectoryResult.CurrentDirectoryResults.Count); + + OnDirectoryResultReturned(_currentDirectoryResult); + } + } + + public CodecPhonebookSyncState PhonebookSyncState { get; private set; } + + public void SearchDirectory(string searchString) + { + var directoryResults = new CodecDirectory(); + + directoryResults.AddContactsToDirectory( + DirectoryRoot.CurrentDirectoryResults.FindAll( + c => c.Name.IndexOf(searchString, 0, StringComparison.OrdinalIgnoreCase) > -1)); + + DirectoryBrowseHistoryStack.Clear(); + CurrentDirectoryResult = directoryResults; + } + + public void GetDirectoryFolderContents(string folderId) + { + var directoryResults = new CodecDirectory {ResultsFolderId = folderId}; + + directoryResults.AddContactsToDirectory( + DirectoryRoot.CurrentDirectoryResults.FindAll(c => c.ParentFolderId.Equals(folderId))); + + DirectoryBrowseHistoryStack.Push(_currentDirectoryResult); + + CurrentDirectoryResult = directoryResults; + } + + public void SetCurrentDirectoryToRoot() + { + DirectoryBrowseHistoryStack.Clear(); + + CurrentDirectoryResult = DirectoryRoot; + } + + public void GetDirectoryParentFolderContents() + { + if (DirectoryBrowseHistoryStack.Count == 0) + { + return; + } + + var currentDirectory = DirectoryBrowseHistoryStack.Pop(); + + CurrentDirectoryResult = currentDirectory; + } + + public BoolFeedback CurrentDirectoryResultIsNotDirectoryRoot { get; private set; } + + public List DirectoryBrowseHistory { get; private set; } + + public Stack DirectoryBrowseHistoryStack { get; private set; } + + #endregion + + #region IHasScheduleAwareness Members + + public CodecScheduleAwareness CodecSchedule { get; private set; } + + public void GetSchedule() + { + GetBookings(); + } + + #endregion + + #region IRouting Members + + public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) + { + ExecuteSwitch(inputSelector); + } + + #endregion + + private void SyncState_InitialSyncCompleted(object sender, EventArgs e) + { + SetIsReady(); + } + + /// + /// Handles subscriptions to Status.Call and sub objects. Needs to be called whenever Status.Call is constructed + /// + private void SetUpCallFeedbackActions() + { + Status.Sharing.PropertyChanged -= HandleSharingStateUpdate; + Status.Sharing.PropertyChanged += HandleSharingStateUpdate; + + Status.Call.Sharing.PropertyChanged -= HandleSharingStateUpdate; + Status.Call.Sharing.PropertyChanged += HandleSharingStateUpdate; + + Status.Call.PropertyChanged -= HandleCallStateUpdate; + Status.Call.PropertyChanged += HandleCallStateUpdate; + + Status.Call.CallRecordInfo.PropertyChanged -= HandleCallRecordInfoStateUpdate; + Status.Call.CallRecordInfo.PropertyChanged += HandleCallRecordInfoStateUpdate; + } + + private void HandleCallRecordInfoStateUpdate(object sender, PropertyChangedEventArgs a) + { + if (a.PropertyName == "meetingIsBeingRecorded" || a.PropertyName == "emailRequired" || a.PropertyName == "canRecord") + { + MeetingIsRecordingFeedback.FireUpdate(); + + var meetingInfo = new MeetingInfo(MeetingInfo.Id, + MeetingInfo.Name, + MeetingInfo.Host, + MeetingInfo.Password, + GetSharingStatus(), + GetIsHostMyself(), + MeetingInfo.IsSharingMeeting, + MeetingInfo.WaitingForHost, + MeetingIsLockedFeedback.BoolValue, + MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord); + MeetingInfo = meetingInfo; + } + } + + private void HandleCallStateUpdate(object sender, PropertyChangedEventArgs a) + { + switch (a.PropertyName) + { + case "Info": + { + Debug.Console(1, this, "Updating Call Status"); + UpdateCallStatus(); + break; + } + + case "Status": + { + UpdateCallStatus(); + break; + } + } + } + + private void HandleSharingStateUpdate(object sender, PropertyChangedEventArgs a) + { + //if (a.PropertyName != "State") + //{ + // return; + //} + + SharingContentIsOnFeedback.FireUpdate(); + ReceivingContent.FireUpdate(); + try + { + + // Update the share status of the meeting info + if (MeetingInfo == null) + { + MeetingInfo = new MeetingInfo("", "", "", "", GetSharingStatus(), GetIsHostMyself(), true, false, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord); + return; + } + + var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, Participants.Host != null ? Participants.Host.Name : "None", + MeetingInfo.Password, GetSharingStatus(), GetIsHostMyself(), MeetingInfo.IsSharingMeeting, MeetingInfo.WaitingForHost, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord); + MeetingInfo = meetingInfo; + } + catch (Exception e) + { + Debug.Console(1, this, "Error processing state property update. {0}", e.Message); + Debug.Console(2, this, e.StackTrace); + MeetingInfo = new MeetingInfo("", "", "", "", "None", false, false, false, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue, false); + } + } + + /// + /// Subscribes to the PropertyChanged events on the state objects and fires the corresponding feedbacks. + /// + private void SetUpFeedbackActions() + { + // Set these up initially. + SetUpCallFeedbackActions(); + + Configuration.Audio.Output.PropertyChanged += (o, a) => + { + if (a.PropertyName == "Volume") + { + VolumeLevelFeedback.FireUpdate(); + MuteFeedback.FireUpdate(); + } + }; + + Configuration.Call.Microphone.PropertyChanged += (o, a) => + { + if (a.PropertyName == "Mute") + { + PrivacyModeIsOnFeedback.FireUpdate(); + } + }; + + Configuration.Video.PropertyChanged += (o, a) => + { + if (a.PropertyName == "HideConfSelfVideo") + { + SelfviewIsOnFeedback.FireUpdate(); + } + }; + Configuration.Video.Camera.PropertyChanged += (o, a) => + { + if (a.PropertyName == "SelectedId") + { + if (Cameras == null) + { + return; + } + + var camera = Cameras.FirstOrDefault(c => c.Key.IndexOf(Configuration.Video.Camera.SelectedId, StringComparison.OrdinalIgnoreCase) > -1); + if (camera != null) + { + Debug.Console(1, this, "Camera selected with key: '{0}'", camera.Key); + + SelectedCamera = camera; + + if (CameraIsMutedFeedback.BoolValue) + { + CameraMuteOff(); + } + } + else + { + Debug.Console(1, this, "No camera found with key: '{0}'", Configuration.Video.Camera.SelectedId); + } + } + }; + + Configuration.Call.Camera.PropertyChanged += (o, a) => + { + Debug.Console(1, this, "Configuration.Call.Camera.PropertyChanged: {0}", a.PropertyName); + + if (a.PropertyName != "Mute") return; + + CameraIsOffFeedback.FireUpdate(); + CameraAutoModeIsOnFeedback.FireUpdate(); + }; + + Configuration.Call.Layout.PropertyChanged += (o, a) => + { + switch (a.PropertyName) + { + case "Position": + { + ComputeSelfviewPipPositionStatus(); + + SelfviewPipPositionFeedback.FireUpdate(); + + break; + } + case "ShareThumb": + { + ContentSwappedWithThumbnailFeedback.FireUpdate(); + OnLayoutInfoChanged(); + break; + } + case "Style": + { + LocalLayoutFeedback.FireUpdate(); + OnLayoutInfoChanged(); + break; + } + case "Size": + { + // TODO: #714 [ ] SetupFeedbackActions >> Size + ComputeSelfviewPipSizeStatus(); + + SelfviewPipSizeFeedback.FireUpdate(); + + break; + } + } + }; + + Configuration.Call.Lock.PropertyChanged += (o, a) => + { + if (a.PropertyName == "Enable") + { + MeetingIsLockedFeedback.FireUpdate(); + MeetingInfo = new MeetingInfo + ( + MeetingInfo.Id, + MeetingInfo.Name, + MeetingInfo.Host, + MeetingInfo.Password, + GetSharingStatus(), + MeetingInfo.IsHost, + MeetingInfo.IsSharingMeeting, + MeetingInfo.WaitingForHost, + MeetingIsLockedFeedback.BoolValue, + MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord + ); + } + }; + + // This is to deal with incorrect object structure coming back from the Zoom Room on v 5.6.3 + Configuration.Client.Call.Layout.PropertyChanged += (o, a) => + { + switch (a.PropertyName) + { + case "Position": + { + ComputeSelfviewPipPositionStatus(); + + SelfviewPipPositionFeedback.FireUpdate(); + + break; + } + case "ShareThumb": + { + ContentSwappedWithThumbnailFeedback.FireUpdate(); + OnLayoutInfoChanged(); + break; + } + case "Style": + { + LocalLayoutFeedback.FireUpdate(); + OnLayoutInfoChanged(); + break; + } + } + }; + + + Status.Sharing.PropertyChanged += (o, a) => + { + OnShareInfoChanged(Status.Sharing); + SharingSourceFeedback.FireUpdate(); + switch (a.PropertyName) + { + case "password": + break; + case "isSharingBlackMagic": + { + Debug.Console(2, this, "Updating sharing status: {0}", a.PropertyName); + + SharingContentIsOnFeedback.FireUpdate(); + if (MeetingInfo == null) + { + //Ignoring for now, as the CallInfo return will create the appropriate value + return; + } + // Update the share status of the meeting info + var meetingInfo = new MeetingInfo(MeetingInfo.Id, + MeetingInfo.Name, + MeetingInfo.Host, + MeetingInfo.Password, + GetSharingStatus(), + GetIsHostMyself(), + MeetingInfo.IsSharingMeeting, + MeetingInfo.WaitingForHost, + MeetingIsLockedFeedback.BoolValue, + MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord); + MeetingInfo = meetingInfo; + break; + } + } + }; + + Status.PhoneCall.PropertyChanged += (o, a) => + { + switch (a.PropertyName) + { + case "IsIncomingCall": + Debug.Console(1, this, "Incoming Phone Call: {0}", Status.PhoneCall.IsIncomingCall); + break; + case "PeerDisplayName": + Debug.Console(1, this, "Peer Display Name: {0}", Status.PhoneCall.PeerDisplayName); + CallerIdNameFeedback.FireUpdate(); + break; + case "PeerNumber": + Debug.Console(1, this, "Peer Number: {0}", Status.PhoneCall.PeerNumber); + CallerIdNumberFeedback.FireUpdate(); + break; + case "OffHook": + Debug.Console(1, this, "Phone is OffHook: {0}", Status.PhoneCall.OffHook); + PhoneOffHookFeedback.FireUpdate(); + break; + } + }; + + Status.Layout.PropertyChanged += (o, a) => + { + Debug.Console(1, this, "Status.Layout.PropertyChanged a.PropertyName: {0}", a.PropertyName); + switch (a.PropertyName.ToLower()) + { + case "can_Switch_speaker_view": + case "can_switch_wall_view": + case "can_switch_strip_view": + case "video_type": + case "can_switch_share_on_all_screens": + { + ComputeAvailableLayouts(); + break; + } + case "is_in_first_page": + { + LayoutViewIsOnFirstPageFeedback.FireUpdate(); + break; + } + case "is_in_last_page": + { + LayoutViewIsOnLastPageFeedback.FireUpdate(); + break; + } + case "can_switch_floating_share_content": + { + CanSwapContentWithThumbnailFeedback.FireUpdate(); + break; + } + } + OnLayoutInfoChanged(); + }; + + Status.NumberOfScreens.PropertyChanged += (o, a) => + { + switch (a.PropertyName) + { + case "NumberOfScreens": + { + NumberOfScreensFeedback.FireUpdate(); + break; + } + } + }; + } + + private void SetUpDirectory() + { + DirectoryRoot = new CodecDirectory() {ResultsFolderId = "root"}; + + CurrentDirectoryResultIsNotDirectoryRoot = new BoolFeedback(() => CurrentDirectoryResult.ResultsFolderId != "root"); + + CurrentDirectoryResult = DirectoryRoot; + + DirectoryBrowseHistory = new List(); + DirectoryBrowseHistoryStack = new Stack(); + } + + private void SetUpRouting() + { + // Set up input ports + CreateOsdSource(); + InputPorts.Add(CodecOsdIn); + + // Set up output ports + OutputPorts.Add(Output1); + OutputPorts.Add(Output2); + } + + /// + /// Creates the fake OSD source, and connects it's AudioVideo output to the CodecOsdIn input + /// to enable routing + /// + private void CreateOsdSource() + { + OsdSource = new DummyRoutingInputsDevice(Key + "[osd]"); + DeviceManager.AddDevice(OsdSource); + var tl = new TieLine(OsdSource.AudioVideoOutputPort, CodecOsdIn); + TieLineCollection.Default.Add(tl); + + //foreach(var input in Status.Video. + } + + /// + /// Starts the HTTP feedback server and syncronizes state of codec + /// + /// + public override bool CustomActivate() + { + CrestronConsole.AddNewConsoleCommand(SetCommDebug, "SetCodecCommDebug", "0 for Off, 1 for on", + ConsoleAccessLevelEnum.AccessOperator); + if (!_props.DisablePhonebookAutoDownload) + { + CrestronConsole.AddNewConsoleCommand(s => SendText("zCommand Phonebook List Offset: 0 Limit: 10000"), + "GetZoomRoomContacts", "Triggers a refresh of the codec phonebook", + ConsoleAccessLevelEnum.AccessOperator); + } + + CrestronConsole.AddNewConsoleCommand(s => GetBookings(), "GetZoomRoomBookings", + "Triggers a refresh of the booking data for today", ConsoleAccessLevelEnum.AccessOperator); + + + + return base.CustomActivate(); + } + + #region Overrides of Device + + public override void Initialize() + { + var socket = Communication as ISocketStatus; + if (socket != null) + { + socket.ConnectionChange += socket_ConnectionChange; + } + + CommDebuggingIsOn = false; + + Communication.Connect(); + + CommunicationMonitor.Start(); + } + + #endregion + + public void SetCommDebug(string s) + { + if (s == "1") + { + CommDebuggingIsOn = true; + Debug.Console(1, this, "Comm Debug Enabled."); + } + else + { + CommDebuggingIsOn = false; + Debug.Console(1, this, "Comm Debug Disabled."); + } + } + + private void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e) + { + Debug.Console(1, this, "Socket status change {0}", e.Client.ClientStatus); + if (e.Client.IsConnected) + { + } + else + { + _syncState.CodecDisconnected(); + PhonebookSyncState.CodecDisconnected(); + } + } + + public void SendText(string command) + { + if (_meetingPasswordRequired) + { + Debug.Console(2, this, "Blocking commands to ZoomRoom while waiting for user to enter meeting password"); + return; + } + + if (_waitingForUserToAcceptOrRejectIncomingCall) + { + Debug.Console(2, this, "Blocking commands to ZoomRoom while waiting for user to accept or reject incoming call"); + return; + } + + if (CommDebuggingIsOn) + { + Debug.Console(1, this, "Sending: '{0}'", command); + } + + Communication.SendText(command + SendDelimiter); + } + + /// + /// Gathers responses and enqueues them. + /// + /// + /// + private void Port_LineReceived(object dev, GenericCommMethodReceiveTextArgs args) + { + //Debug.Console(0, this, "Port_LineReceived"); + + if (args.Delimiter != JsonDelimiter) + { +// Debug.Console(0, this, +//@"Non JSON response: +//Delimiter: {0} +//{1}", ComTextHelper.GetDebugText(args.Delimiter), args.Text); + ProcessNonJsonResponse(args.Text); + return; + } + else + { +// Debug.Console(0, this, +//@"JSON response: +//Delimiter: {0} +//{1}", ComTextHelper.GetDebugText(args.Delimiter), args.Text); + _receiveQueue.Enqueue(new ProcessStringMessage(args.Text, DeserializeResponse)); + //_receiveQueue.Enqueue(new ProcessStringMessage(args.Text, ProcessMessage)); + } + } + + /// + /// Queues the initial queries to be sent upon connection + /// + private void SetUpSyncQueries() + { + // zStatus + _syncState.AddQueryToQueue("zStatus Call Status"); + _syncState.AddQueryToQueue("zStatus Audio Input Line"); + _syncState.AddQueryToQueue("zStatus Audio Output Line"); + _syncState.AddQueryToQueue("zStatus Video Camera Line"); + _syncState.AddQueryToQueue("zStatus Video Optimizable"); + _syncState.AddQueryToQueue("zStatus Capabilities"); + _syncState.AddQueryToQueue("zStatus Sharing"); + _syncState.AddQueryToQueue("zStatus CameraShare"); + _syncState.AddQueryToQueue("zStatus Call Layout"); + _syncState.AddQueryToQueue("zStatus Call ClosedCaption Available"); + _syncState.AddQueryToQueue("zStatus NumberOfScreens"); + + // zConfiguration + + _syncState.AddQueryToQueue("zConfiguration Call Sharing optimize_video_sharing"); + _syncState.AddQueryToQueue("zConfiguration Call Microphone Mute"); + _syncState.AddQueryToQueue("zConfiguration Call Camera Mute"); + _syncState.AddQueryToQueue("zConfiguration Audio Input SelectedId"); + _syncState.AddQueryToQueue("zConfiguration Audio Input is_sap_disabled"); + _syncState.AddQueryToQueue("zConfiguration Audio Input reduce_reverb"); + _syncState.AddQueryToQueue("zConfiguration Audio Input volume"); + _syncState.AddQueryToQueue("zConfiguration Audio Output selectedId"); + _syncState.AddQueryToQueue("zConfiguration Audio Output volume"); + _syncState.AddQueryToQueue("zConfiguration Video hide_conf_self_video"); + _syncState.AddQueryToQueue("zConfiguration Video Camera selectedId"); + _syncState.AddQueryToQueue("zConfiguration Video Camera Mirror"); + _syncState.AddQueryToQueue("zConfiguration Client appVersion"); + _syncState.AddQueryToQueue("zConfiguration Client deviceSystem"); + _syncState.AddQueryToQueue("zConfiguration Call Layout ShareThumb"); + _syncState.AddQueryToQueue("zConfiguration Call Layout Style"); + _syncState.AddQueryToQueue("zConfiguration Call Layout Size"); + _syncState.AddQueryToQueue("zConfiguration Call Layout Position"); + _syncState.AddQueryToQueue("zConfiguration Call Lock Enable"); + _syncState.AddQueryToQueue("zConfiguration Call MuteUserOnEntry Enable"); + _syncState.AddQueryToQueue("zConfiguration Call ClosedCaption FontSize "); + _syncState.AddQueryToQueue("zConfiguration Call ClosedCaption Visible"); + + // zCommand + + if (!_props.DisablePhonebookAutoDownload) + { + _syncState.AddQueryToQueue("zCommand Phonebook List Offset: 0 Limit: 10000"); + } + + _syncState.AddQueryToQueue("zCommand Bookings List"); + _syncState.AddQueryToQueue("zCommand Call ListParticipants"); + _syncState.AddQueryToQueue("zCommand Call Info"); + + + _syncState.StartSync(); + } + + private void SetupSession() + { + // disable echo of commands + SendText("echo off"); + // switch to json format + // set feedback exclusions + // Currently the feedback exclusions don't work when using the API in JSON response mode + // But leave these here in case the API gets updated in the future + // These may work as of 5.9.4 + + // In 5.9.4 we're getting sent an AddedContact message for every contact in the phonebook on connect, which is redunant and way too much data + // We want to exclude these messages right away until after we've retrieved the entire phonebook and then we can re-enable them + SendText("zFeedback Register Op: ex Path: /Event/Phonebook/AddedContact"); + + SendText("zFeedback Register Op: ex Path: /Event/InfoResult/Info/callin_country_list"); + SendText("zFeedback Register Op: ex Path: /Event/InfoResult/Info/callout_country_list"); + SendText("zFeedback Register Op: ex Path: /Event/InfoResult/Info/toll_free_callinLlist"); + + SendText("zStatus SystemUnit"); + } + + /// + /// Removes the feedback exclusion for added contacts + /// + private void ResubscribeForAddedContacts() + { + SendText("zFeedback Register Op: in Path: /Event/Phonebook/AddedContact"); + } + + /// + /// Processes non-JSON responses as their are received + /// + /// + private void ProcessNonJsonResponse(string response) + { + if (response.Contains("client_loop: send disconnect: Broken pipe")) + { + Debug.Console(1, this, Debug.ErrorLogLevel.Error, + "Zoom Room Controller or App connected. Essentials will NOT control the Zoom Room until it is disconnected."); + + return; + } + + if (!_syncState.InitialSyncComplete) + { + if(response.ToLower().Contains("*r login successful")) + { + _syncState.LoginResponseReceived(); + + SendText("format json"); + + SetupSession(); + } + + //switch (response.Trim().ToLower()) // remove the whitespace + //{ + // case "*r login successful": + // { + // _syncState.LoginMessageReceived(); + + // //// Fire up a thread to send the intial commands. + // //CrestronInvoke.BeginInvoke(o => + // //{ + // // disable echo of commands + // SendText("echo off"); + // // switch to json format + // SendText("format json"); + // // set feedback exclusions + // // Currently the feedback exclusions don't work when using the API in JSON response mode + // // But leave these here in case the API gets updated in the future + // // These may work as of 5.9.4 + // if (_props.DisablePhonebookAutoDownload) + // { + // SendText("zFeedback Register Op: ex Path: /Event/Phonebook/AddedContact"); + // } + // SendText("zFeedback Register Op: ex Path: /Event/InfoResult/Info/callin_country_list"); + // SendText("zFeedback Register Op: ex Path: /Event/InfoResult/Info/callout_country_list"); + // SendText("zFeedback Register Op: ex Path: /Event/InfoResult/Info/toll_free_callinLlist"); + + // //}); + + // break; + // } + //} + } + } + + /// + /// Processes messages as they are dequeued + /// + /// + private void ProcessMessage(string message) + { + // Counts the curly braces + if (message.Contains("client_loop: send disconnect: Broken pipe")) + { + Debug.Console(1, this, Debug.ErrorLogLevel.Error, + "Zoom Room Controller or App connected. Essentials will NOT control the Zoom Room until it is disconnected."); + + return; + } + + if (message.Contains('{')) + { + _jsonCurlyBraceCounter++; + } + + if (message.Contains('}')) + { + _jsonCurlyBraceCounter--; + } + + //Debug.Console(2, this, "JSON Curly Brace Count: {0}", _jsonCurlyBraceCounter); + + if (!_jsonFeedbackMessageIsIncoming && message.Trim('\x20') == "{" + EchoDelimiter) + // Check for the beginning of a new JSON message + { + _jsonFeedbackMessageIsIncoming = true; + _jsonCurlyBraceCounter = 1; // reset the counter for each new message + + _jsonMessage = new StringBuilder(); + + _jsonMessage.Append(message); + + if (CommDebuggingIsOn) + { + Debug.Console(2, this, "Incoming JSON message..."); + } + + return; + } + if (_jsonFeedbackMessageIsIncoming && message.Trim('\x20') == "}" + EchoDelimiter) + // Check for the end of a JSON message + { + _jsonMessage.Append(message); + + if (_jsonCurlyBraceCounter == 0) + { + _jsonFeedbackMessageIsIncoming = false; + + if (CommDebuggingIsOn) + { + Debug.Console(2, this, "Complete JSON Received:\n{0}", _jsonMessage.ToString()); + } + + // Forward the complete message to be deserialized + DeserializeResponse(_jsonMessage.ToString()); + } + + //JsonMessage = new StringBuilder(); + return; + } + + // NOTE: This must happen after the above conditions have been checked + // Append subsequent partial JSON fragments to the string builder + if (_jsonFeedbackMessageIsIncoming) + { + _jsonMessage.Append(message); + + //Debug.Console(1, this, "Building JSON:\n{0}", JsonMessage.ToString()); + return; + } + + if (CommDebuggingIsOn) + { + Debug.Console(1, this, "Non-JSON response: '{0}'", message); + } + + _jsonCurlyBraceCounter = 0; // reset on non-JSON response + + if (!_syncState.InitialSyncComplete) + { + switch (message.Trim().ToLower()) // remove the whitespace + { + case "*r login successful": + { + _syncState.LoginResponseReceived(); + + + // Fire up a thread to send the intial commands. + CrestronInvoke.BeginInvoke(o => + { + // Currently the feedback exclusions don't work when using the API in JSON response mode + // But leave these here in case the API gets updated in the future + + + Thread.Sleep(100); + // disable echo of commands + SendText("echo off"); + Thread.Sleep(100); + // set feedback exclusions + SendText("zFeedback Register Op: ex Path: /Event/InfoResult/Info/callin_country_list"); + Thread.Sleep(100); + SendText("zFeedback Register Op: ex Path: /Event/InfoResult/Info/callout_country_list"); + Thread.Sleep(100); + SendText("zFeedback Register Op: ex Path: /Event/InfoResult/Info/toll_free_callinLlist"); + Thread.Sleep(100); + + if (_props.DisablePhonebookAutoDownload) + { + SendText("zFeedback Register Op: ex Path: /Event/Phonebook/AddedContact"); + } + // switch to json format + SendText("format json"); + }); + + break; + } + } + } + } + + /// + /// Deserializes a JSON formatted response + /// + /// + private void DeserializeResponse(string response) + { + try + { + var trimmedResponse = response.Trim(); + + if (trimmedResponse.Length <= 0) + { + return; + } + + var message = JObject.Parse(trimmedResponse); + + if (!_syncState.FirstJsonResponseWasReceived) + { + _syncState.ReceivedFirstJsonResponse(); + } + + var eType = + (eZoomRoomResponseType) + Enum.Parse(typeof (eZoomRoomResponseType), message["type"].Value(), true); + + var topKey = message["topKey"].Value(); + + var responseObj = message[topKey]; + + Debug.Console(1, this, "{0} Response Received. topKey: '{1}'\n{2}", eType, topKey, responseObj.ToString().Replace("\n", CrestronEnvironment.NewLine)); + + switch (eType) + { + case eZoomRoomResponseType.zConfiguration: + { + switch (topKey.ToLower()) + { + case "call": + { + JsonConvert.PopulateObject(responseObj.ToString(), Configuration.Call); + + break; + } + case "audio": + { + JsonConvert.PopulateObject(responseObj.ToString(), Configuration.Audio); + + break; + } + case "video": + { + JsonConvert.PopulateObject(responseObj.ToString(), Configuration.Video); + + break; + } + case "client": + { + JsonConvert.PopulateObject(responseObj.ToString(), Configuration.Client); + + break; + } + default: + { + break; + } + } + break; + } + case eZoomRoomResponseType.zCommand: + { + switch (topKey.ToLower()) + { + case "inforesult": + { + JsonConvert.PopulateObject(responseObj.ToString(), Status.Call.Info); + break; + } + case "phonebooklistresult": + { + // This result will always be the complete contents of the directory and never + // A subset of the results via a search + + // Clear out any existing data + Status.Phonebook = new zStatus.Phonebook(); + + JsonConvert.PopulateObject(responseObj.ToString(), Status.Phonebook); + + UpdateDirectory(); + + break; + } + case "listparticipantsresult": + { + Debug.Console(1, this, "JTokenType: {0}", responseObj.Type); + + switch (responseObj.Type) + { + case JTokenType.Array: + Status.Call.Participants = + JsonConvert.DeserializeObject>( + responseObj.ToString()); + break; + case JTokenType.Object: + { + // this is a single participant event notification + + var participant = + JsonConvert.DeserializeObject( + responseObj.ToString()); + + if (participant != null) + { + Debug.Console(1, this, + "[DeserializeResponse] zCommands.listparticipantresult - participant.event: {0} **********************************", + participant.Event); + Debug.Console(1, this, + "[DeserializeResponse] zCommands.listparticipantresult - participant.event: {0} - UserId: {1} Name: {2} IsHost: {3}", + participant.Event, participant.UserId, participant.UserName, participant.IsHost); + + switch (participant.Event) + { + case "ZRCUserChangedEventUserInfoUpdated": + case "ZRCUserChangedEventLeftMeeting": + { + var existingParticipant = + Status.Call.Participants.FirstOrDefault( + p => p.UserId.Equals(participant.UserId)); + + if (existingParticipant != null) + { + switch (participant.Event) + { + case "ZRCUserChangedEventLeftMeeting": + Status.Call.Participants.Remove(existingParticipant); + break; + case "ZRCUserChangedEventUserInfoUpdated": + JsonConvert.PopulateObject(responseObj.ToString(), + existingParticipant); + break; + } + } + } + break; + case "ZRCUserChangedEventJoinedMeeting": + { + var existingParticipant = + Status.Call.Participants.FirstOrDefault(p => p.UserId.Equals(participant.UserId)); + + if (existingParticipant != null) + { + Debug.Console(1, this, + "[DeserializeResponse] zCommands.listparticipantresult - participant.event: {0} ...updating matching UserId participant with UserId: {1} UserName: {2}", + participant.Event, participant.UserId, participant.UserName); + + JsonConvert.PopulateObject(responseObj.ToString(), existingParticipant); + } + else + { + Debug.Console(1, this, + "[DeserializeResponse] zCommands.listparticipantresult - participant.event: {0} ...adding participant with UserId: {1} UserName: {2}", + participant.Event, participant.UserId, participant.UserName); + + Status.Call.Participants.Add(participant); + } + + break; + } + } + + Debug.Console(1, this, + "[DeserializeResponse] zCommands.listparticipantresult - participant.event: {0} ***********************************", + participant.Event); + } + } + break; + } + + var participants = + zCommand.ListParticipant.GetGenericParticipantListFromParticipantsResult( + Status.Call.Participants); + + Participants.CurrentParticipants = participants; + + // Update the share status of the meeting info + var meetingInfo = new MeetingInfo( + MeetingInfo.Id, + MeetingInfo.Name, + Participants.Host.Name, + MeetingInfo.Password, + GetSharingStatus(), + GetIsHostMyself(), + MeetingInfo.IsSharingMeeting, + MeetingInfo.WaitingForHost, + MeetingIsLockedFeedback.BoolValue, + MeetingIsRecordingFeedback.BoolValue, + Status.Call.CallRecordInfo.AllowRecord + ); + MeetingInfo = meetingInfo; + + PrintCurrentCallParticipants(); + + break; + } + default: + { + break; + } + } + break; + } + case eZoomRoomResponseType.zEvent: + { + switch (topKey.ToLower()) + { + case "phonebook": + { + zStatus.Contact contact = new zStatus.Contact(); + + if (responseObj["Updated Contact"] != null) + { + contact = responseObj["Updated Contact"].ToObject(); + } + else if (responseObj["Added Contact"] != null) + { + contact = responseObj["Added Contact"].ToObject(); + } + + var existingContactIndex = Status.Phonebook.Contacts.FindIndex(c => c.Jid.Equals(contact.Jid)); + + if (existingContactIndex > 0) + { + Status.Phonebook.Contacts[existingContactIndex] = contact; + } + else + { + Status.Phonebook.Contacts.Add(contact); + } + + if(contactsDebounceTimer == null) + { + contactsDebounceTimer = new CTimer(o => UpdateDirectory(), 2000); + } + else + { + contactsDebounceTimer.Reset(); + } + + break; + } + case "bookingslistresult": + { + if (!_syncState.InitialSyncComplete) + { + _syncState.LastQueryResponseReceived(); + } + + var codecBookings = JsonConvert.DeserializeObject>( + responseObj.ToString()); + + if (codecBookings != null && codecBookings.Count > 0) + { + CodecSchedule.Meetings = zCommand.GetGenericMeetingsFromBookingResult( + codecBookings, CodecSchedule.MeetingWarningMinutes); + } + else + { + //need to clear the list if it's empty + CodecSchedule.Meetings = new List(); + } + + break; + } + case "bookings updated": + { + GetBookings(); + + break; + } + case "sharingstate": + { + JsonConvert.PopulateObject(responseObj.ToString(), Status.Call.Sharing); + + SetDefaultLayout(); + + break; + } + case "incomingcallindication": + { + var incomingCall = + JsonConvert.DeserializeObject(responseObj.ToString()); + + if (incomingCall != null) + { + var newCall = new CodecActiveCallItem + { + Direction = eCodecCallDirection.Incoming, + Status = eCodecCallStatus.Ringing, + Type = eCodecCallType.Video, + Name = incomingCall.callerName, + Id = incomingCall.callerJID + }; + + _waitingForUserToAcceptOrRejectIncomingCall = true; + + ActiveCalls.Add(newCall); + + OnCallStatusChange(newCall); + } + + break; + } + case "treatedincomingcallindication": + { + var incomingCall = + JsonConvert.DeserializeObject(responseObj.ToString()); + + if (incomingCall != null) + { + var existingCall = + ActiveCalls.FirstOrDefault(c => c.Id.Equals(incomingCall.callerJID)); + + if (existingCall != null) + { + existingCall.Status = !incomingCall.accepted + ? eCodecCallStatus.Disconnected + : eCodecCallStatus.Connecting; + + OnCallStatusChange(existingCall); + } + + _waitingForUserToAcceptOrRejectIncomingCall = false; + + UpdateCallStatus(); + } + + break; + } + case "calldisconnect": + { + var disconnectEvent = + JsonConvert.DeserializeObject(responseObj.ToString()); + + Debug.Console(1, this, + "[DeserializeResponse] zEvent.calldisconnect ********************************************"); + Debug.Console(1, this, "[DeserializeResponse] zEvent.calldisconnect - disconnectEvent.Successful: {0}", + disconnectEvent.Successful); + + if (disconnectEvent.Successful) + { + if (ActiveCalls.Count > 0) + { + var activeCall = ActiveCalls.FirstOrDefault(c => c.IsActiveCall); + + if (activeCall != null) + { + Debug.Console(1, this, + "[DeserializeResponse] zEvent.calldisconnect - ActiveCalls.Count: {0} activeCall.Id: {1}, activeCall.Number: {2} activeCall.Name: {3}, activeCall.IsActive: {4}", + ActiveCalls.Count, activeCall.Id, activeCall.Number, activeCall.Name, activeCall.IsActiveCall); + activeCall.Status = eCodecCallStatus.Disconnected; + + OnCallStatusChange(activeCall); + } + } + } + + Debug.Console(1, this, + "[DeserializeResponse] zEvent.calldisconnect ********************************************"); + + UpdateCallStatus(); + break; + } + case "callconnecterror": + { + UpdateCallStatus(); + break; + } + case "videounmuterequest": + { + var handler = VideoUnmuteRequested; + + if (handler != null) + { + handler(this, null); + } + + break; + } + case "meetingneedspassword": + { + var meetingNeedsPassword = + responseObj.ToObject(); + + if (meetingNeedsPassword.NeedsPassword) + { + var prompt = "Password required to join this meeting. Please enter the meeting password."; + + OnPasswordRequired(meetingNeedsPassword.WrongAndRetry, false, false, prompt); + } + else + { + OnPasswordRequired(false, false, true, ""); + } + + break; + } + case "needwaitforhost": + { + Status.NeedWaitForHost = JsonConvert.DeserializeObject(responseObj.ToString()); + + Debug.Console(1, this, "WaitingForHost: {0}", Status.NeedWaitForHost.Wait); + + if (Status.NeedWaitForHost.Wait) + { + if (MeetingInfo == null) + { + MeetingInfo = new MeetingInfo("Waiting For Host", "Waiting For Host", "Waiting For Host", "", + GetSharingStatus(), false, false, true, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord); + + UpdateCallStatus(); + break; + } + + MeetingInfo = new MeetingInfo("Waiting For Host", "Waiting For Host", "Waiting For Host", "", + GetSharingStatus(), false, false, true, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord); + + UpdateCallStatus(); + + break; + } + + if (MeetingInfo == null) + { + MeetingInfo = new MeetingInfo("Waiting For Host", "Waiting For Host", "Waiting For Host", "", + GetSharingStatus(), false, false, false, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord); + break; + } + + MeetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, MeetingInfo.Host, MeetingInfo.Password, + GetSharingStatus(), GetIsHostMyself(), false, false, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord); + + break; + } + case "openvideofailforhoststop": + { + // TODO: notify user that host has disabled unmuting video + break; + } + case "updatecallrecordinfo": + { + JsonConvert.PopulateObject(responseObj.ToString(), Status.Call.CallRecordInfo); + + break; + } + case "recordingconsent": + { + _recordConsentPromptIsVisible = responseObj["isShow"].Value(); + RecordConsentPromptIsVisible.FireUpdate(); + break; + } + case "phonecallstatus": + { + JsonConvert.PopulateObject(responseObj.ToString(), Status.PhoneCall); + break; + } + case "pinstatusofscreennotification": + { + var status = responseObj.ToObject(); + + Debug.Console(1, this, "Pin Status notification for UserId: {0}, ScreenIndex: {1}", status.PinnedUserId, + status.ScreenIndex); + + Participant alreadyPinnedParticipant = null; + + // Check for a participant already pinned to the same screen index. + if (status.PinnedUserId > 0) + { + alreadyPinnedParticipant = + Participants.CurrentParticipants.FirstOrDefault(p => p.ScreenIndexIsPinnedToFb.Equals(status.ScreenIndex)); + + // Make sure that the already pinned participant isn't the same ID as for this message. If true, clear the pinned fb. + if (alreadyPinnedParticipant != null && alreadyPinnedParticipant.UserId != status.PinnedUserId) + { + Debug.Console(1, this, "Participant: {0} with id: {1} already pinned to screenIndex {2}. Clearing pinned fb.", + alreadyPinnedParticipant.Name, alreadyPinnedParticipant.UserId, + alreadyPinnedParticipant.ScreenIndexIsPinnedToFb); + alreadyPinnedParticipant.IsPinnedFb = false; + alreadyPinnedParticipant.ScreenIndexIsPinnedToFb = -1; + } + } + + var participant = Participants.CurrentParticipants.FirstOrDefault(p => p.UserId.Equals(status.PinnedUserId)); + + if (participant != null) + { + participant.IsPinnedFb = true; + participant.ScreenIndexIsPinnedToFb = status.ScreenIndex; + } + else + { + participant = + Participants.CurrentParticipants.FirstOrDefault(p => p.ScreenIndexIsPinnedToFb.Equals(status.ScreenIndex)); + + if (participant == null && alreadyPinnedParticipant == null) + { + Debug.Console(1, this, "no matching participant found by pinned_user_id: {0} or screen_index: {1}", + status.PinnedUserId, status.ScreenIndex); + return; + } + else if (participant != null) + { + Debug.Console(2, this, "Unpinning {0} with id: {1} from screen index: {2}", participant.Name, + participant.UserId, status.ScreenIndex); + participant.IsPinnedFb = false; + participant.ScreenIndexIsPinnedToFb = -1; + } + } + + // fire the event as we've modified the participants list + Participants.OnParticipantsChanged(); + + break; + } + case "startlocalpresentmeeting": + { + var result = JsonConvert.DeserializeObject(responseObj.ToString()); + + if (result.Success) + { + MeetingInfo = new MeetingInfo("", "", "", "", GetSharingStatus(), true, true, MeetingInfo.WaitingForHost, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord); + break; + } + + break; + } + default: + { + break; + } + } + break; + } + case eZoomRoomResponseType.zStatus: + { + switch (topKey.ToLower()) + { + case "login": + { + _syncState.LoginResponseReceived(); + + SetupSession(); + + JsonConvert.PopulateObject(responseObj.ToString(), Status.Login); + + break; + } + case "systemunit": + { + + JsonConvert.PopulateObject(responseObj.ToString(), Status.SystemUnit); + + break; + } + case "call": + { + JsonConvert.PopulateObject(responseObj.ToString(), Status.Call); + + Debug.Console(1, this, + "[DeserializeResponse] zStatus.call - Status.Call.Info.meeting_id: {0} Status.Call.Info.meeting_list_item.meetingName: {1}", + Status.Call.Info.meeting_id, Status.Call.Info.meeting_list_item.meetingName); + foreach (var participant in Status.Call.Participants) + { + Debug.Console(1, this, + "[DeserializeResponse] zStatus.call - Status.Call.Participants participant.UserId: {0} participant.UserName: {1}", + participant.UserId, participant.UserName); + } + + UpdateCallStatus(); + + break; + } + case "capabilities": + { + JsonConvert.PopulateObject(responseObj.ToString(), Status.Capabilities); + break; + } + case "sharing": + { + JsonConvert.PopulateObject(responseObj.ToString(), Status.Sharing); + + break; + } + case "numberofscreens": + { + JsonConvert.PopulateObject(responseObj.ToString(), Status.NumberOfScreens); + break; + } + case "video": + { + JsonConvert.PopulateObject(responseObj.ToString(), Status.Video); + break; + } + case "camerashare": + { + JsonConvert.PopulateObject(responseObj.ToString(), Status.CameraShare); + break; + } + case "layout": + { + JsonConvert.PopulateObject(responseObj.ToString(), Status.Layout); + break; + } + case "audio input line": + { + JsonConvert.PopulateObject(responseObj.ToString(), Status.AudioInputs); + break; + } + case "audio output line": + { + JsonConvert.PopulateObject(responseObj.ToString(), Status.AudioOuputs); + break; + } + case "video camera line": + { + Status.Cameras.Clear(); + + JsonConvert.PopulateObject(responseObj.ToString(), Status.Cameras); + + if (!_syncState.CamerasHaveBeenSetUp) + { + SetUpCameras(); + } + + break; + } + default: + { + break; + } + } + + break; + } + default: + { + Debug.Console(1, "Unknown Response Type:"); + break; + } + } + } + catch (Exception ex) + { + Debug.Console(1, this, "Error Deserializing feedback: {0}", ex.Message); + Debug.Console(2, this, "{0}", ex); + + if (ex.InnerException != null) + { + Debug.Console(1, this,"Error Deserializing feedback inner exception: {0}", ex.InnerException.Message); + Debug.Console(2, this, "{0}", ex.InnerException.StackTrace); + } + } + } + + private void SetDefaultLayout() + { + if (!_props.AutoDefaultLayouts) return; + + if ( + (Status.Call.Sharing.State == zEvent.eSharingState.Receiving || + Status.Call.Sharing.State == zEvent.eSharingState.Sending)) + { + SendText(String.Format("zconfiguration call layout style: {0}", + _props.DefaultSharingLayout)); + } + else + { + if (_props.DefaultCallLayout == (_props.DefaultCallLayout & AvailableLayouts)) + { + SendText(String.Format("zconfiguration call layout style: {0}", + _props.DefaultCallLayout)); + } + else + Debug.Console(0, this, "Unable to set default Layout. {0} not currently an available layout based on meeting state", _props.DefaultCallLayout); + } + } + + /// + /// Retrieves the current call participants list + /// + public void GetCurrentCallParticipants() + { + SendText("zCommand Call ListParticipants"); + } + + /// + /// Prints the current call particiapnts list + /// + public void PrintCurrentCallParticipants() + { + if (Debug.Level <= 0) return; + + Debug.Console(1, this, "*************************** Call Participants **************************"); + foreach (var participant in Participants.CurrentParticipants) + { + Debug.Console(1, this, "UserId: {3} Name: {0} Audio: {1} IsHost: {2}", + participant.Name, participant.AudioMuteFb, participant.IsHost, participant.UserId); + } + Debug.Console(1, this, "************************************************************************"); + } + + /// + /// Retrieves bookings list + /// + private void GetBookings() + { + if (_meetingPasswordRequired || _waitingForUserToAcceptOrRejectIncomingCall) return; + + SendText("zCommand Bookings List"); + } + + + /// + /// Updates the current call status + /// + private void UpdateCallStatus() + { + Debug.Console(1, this, + "[UpdateCallStatus] Current Call Status: {0} Active Call Count: {1} Need Wait For Host: {2}", + Status.Call != null ? Status.Call.Status.ToString() : "no call", ActiveCalls.Count, Status.NeedWaitForHost.Wait); + + if (Status.Call != null) + { + var callStatus = Status.Call.Status; + + // If not crrently in a meeting, intialize the call object + if (callStatus != zStatus.eCallStatus.IN_MEETING && callStatus != zStatus.eCallStatus.CONNECTING_MEETING) + { + Status.Call = new zStatus.Call {Status = callStatus}; + // Resubscribe to all property change events after Status.Call is reconstructed + SetUpCallFeedbackActions(); + + OnCallStatusChange(new CodecActiveCallItem() {Status = eCodecCallStatus.Disconnected}); + } + + if (ActiveCalls.Count == 0) + { + if (callStatus == zStatus.eCallStatus.CONNECTING_MEETING || + callStatus == zStatus.eCallStatus.IN_MEETING) + { + var newStatus = eCodecCallStatus.Unknown; + + switch (callStatus) + { + case zStatus.eCallStatus.CONNECTING_MEETING: + newStatus = eCodecCallStatus.Connecting; + break; + case zStatus.eCallStatus.IN_MEETING: + newStatus = eCodecCallStatus.Connected; + break; + } + + if (!string.IsNullOrEmpty(Status.Call.Info.meeting_id)) + { + var newCall = new CodecActiveCallItem + { + Name = Status.Call.Info.meeting_list_item.meetingName, + Number = Status.Call.Info.meeting_list_item.meetingNumber, + Id = Status.Call.Info.meeting_id, + Status = newStatus, + Type = eCodecCallType.Video, + }; + + if (!String.IsNullOrEmpty(_lastDialedMeetingNumber)) + { + _lastDialedMeetingNumber = String.Empty; + } + ActiveCalls.Add(newCall); + + OnCallStatusChange(newCall); + } else if (String.IsNullOrEmpty(Status.Call.Info.meeting_id) && Status.NeedWaitForHost.Wait) + { + var newCall = new CodecActiveCallItem + { + Name = "Waiting For Host", + Number = "Waiting For Host", + Id = "Waiting For Host", + Status = newStatus, + Type = eCodecCallType.Video, + }; + + if (!String.IsNullOrEmpty(_lastDialedMeetingNumber)) + { + _lastDialedMeetingNumber = String.Empty; + } + + ActiveCalls.Add(newCall); + + OnCallStatusChange(newCall); + } + } + } + else + { + var existingCall = ActiveCalls.FirstOrDefault(c => !c.Status.Equals(eCodecCallStatus.Ringing)); + + switch (callStatus) + { + case zStatus.eCallStatus.IN_MEETING: + if (Status.NeedWaitForHost.Wait) + { + Status.NeedWaitForHost.Wait = false; + } + existingCall.Status = eCodecCallStatus.Connected; + break; + case zStatus.eCallStatus.NOT_IN_MEETING: + if (Status.NeedWaitForHost.Wait) + { + Status.NeedWaitForHost.Wait = false; + } + existingCall.Status = eCodecCallStatus.Disconnected; + break; + } + + Debug.Console(1, this, "[UpdateCallStatus] ELSE ActiveCalls.Count == {1} - Current Call Status: {0}", + Status.Call != null ? Status.Call.Status.ToString() : "no call", ActiveCalls.Count); + + + OnCallStatusChange(existingCall); + } + } + + Debug.Console(1, this, "[UpdateCallStatus] Active Calls ------------------------------"); + + // Clean up any disconnected calls left in the list + for (int i = 0; i < ActiveCalls.Count; i++) + { + var call = ActiveCalls[i]; + + Debug.Console(1, this, + @"ID: {1} + Number: {5} + Name: {0} + IsActive: {2} + Status: {3} + Direction: {4} + IsActiveCall: {6}", call.Name, call.Id, call.IsActiveCall, call.Status, call.Direction, call.Number, + call.IsActiveCall); + + if (!call.IsActiveCall) + { + Debug.Console(1, this, "[UpdateCallStatus] Removing Inactive call.Id: {1} call.Name: {0}", call.Name, call.Id); + ActiveCalls.Remove(call); + } + } + Debug.Console(1, this, "[UpdateCallStatus] Active Calls ------------------------------"); + + //clear participants list after call cleanup + var emptyList = new List(); + Participants.CurrentParticipants = emptyList; + if (ActiveCalls.Count > 0) GetCurrentCallParticipants(); + } + + protected override void OnCallStatusChange(CodecActiveCallItem item) + { + if (item.Status == eCodecCallStatus.Connected) + { + + var host = ""; + + if (Participants.Host != null) + host = Participants.Host.Name; + + MeetingInfo = new MeetingInfo( + Status.Call.Info.meeting_id, + Status.Call.Info.meeting_list_item.meetingName, + host, + Status.Call.Info.meeting_password, + GetSharingStatus(), + GetIsHostMyself(), + !String.Equals(Status.Call.Info.meeting_type,"NORMAL"), + false, + MeetingIsLockedFeedback.BoolValue, + MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord + ); + + SetDefaultLayout(); + } + + else if (item.Status == eCodecCallStatus.Disconnected) + { + MeetingInfo = new MeetingInfo( + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + false, + false, + false, + false, + false, Status.Call.CallRecordInfo.AllowRecord + ); + } + + _meetingPasswordRequired = false; + base.OnCallStatusChange(item); + + Debug.Console(1, this, "[OnCallStatusChange] Current Call Status: {0}", + Status.Call != null ? Status.Call.Status.ToString() : "no call"); + } + + private string GetSharingStatus() + { + string sharingState = "None"; + + try + { + if (Status.Call.Sharing.State == zEvent.eSharingState.Receiving) + { + sharingState = "Receiving Content"; + } + if (Status.Sharing.isAirHostClientConnected) + { + sharingState = "Sharing AirPlay"; + } + if (Status.Sharing.isDirectPresentationConnected) + { + sharingState = "Sharing Laptop"; + } + if (Status.Sharing.isSharingBlackMagic) + { + sharingState = "Sharing HDMI Source"; + } + + return sharingState; + } + catch (Exception e) + { + Debug.Console(1, this, "Exception getting sharing status: {0}", e.Message); + Debug.Console(2, this, "{0}", e.StackTrace); + return sharingState; + } + } + + private void UpdateDirectory() + { + Debug.Console(2, this, "Updating directory"); + var directoryResults = zStatus.Phonebook.ConvertZoomContactsToGeneric(Status.Phonebook.Contacts); + + if (!PhonebookSyncState.InitialSyncComplete) + { + PhonebookSyncState.InitialPhonebookFoldersReceived(); + PhonebookSyncState.PhonebookRootEntriesReceived(); + PhonebookSyncState.SetPhonebookHasFolders(true); + PhonebookSyncState.SetNumberOfContacts(Status.Phonebook.Contacts.Count); + } + + directoryResults.ResultsFolderId = "root"; + + DirectoryRoot = directoryResults; + + CurrentDirectoryResult = directoryResults; + + // + if (contactsDebounceTimer != null) + { + ClearContactDebounceTimer(); + } + } + + private void ClearContactDebounceTimer() + { + Debug.Console(2, this, "Clearing Timer"); + if (!contactsDebounceTimer.Disposed && contactsDebounceTimer != null) + { + contactsDebounceTimer.Dispose(); + contactsDebounceTimer = null; + } + } + + /// + /// Will return true if the host is myself (this zoom room) + /// + /// + private bool GetIsHostMyself() + { + try + { + if (Participants.CurrentParticipants.Count == 0) + { + Debug.Console(2, this, "No current participants"); + return false; + } + + var host = Participants.Host; + + if(host == null) + { + Debug.Console(2, this, "Host is currently null"); + return false; + } + Debug.Console(2, this, "Host is: '{0}' IsMyself?: {1}", host.Name, host.IsMyself); + return host.IsMyself; + } + catch (Exception e) + { + Debug.Console(1, "Exception getting isHost: {0}", e.Message); + Debug.Console(2, "{0}", e.StackTrace); + return false; + } + } + + /// + /// Starts sharing HDMI source + /// + public override void StartSharing() + { + SendText("zCommand Call Sharing HDMI Start"); + } + + /// + /// Stops sharing the current presentation + /// + public override void StopSharing() + { + if (Status.Sharing.isSharingBlackMagic) + { + SendText("zCommand Call Sharing HDMI Stop"); + } + else + { + SendText("zCommand Call Sharing Disconnect"); + } + } + + public override void PrivacyModeOn() + { + SendText("zConfiguration Call Microphone Mute: on"); + } + + public override void PrivacyModeOff() + { + SendText("zConfiguration Call Microphone Mute: off"); + } + + public override void PrivacyModeToggle() + { + if (PrivacyModeIsOnFeedback.BoolValue) + { + PrivacyModeOff(); + } + else + { + PrivacyModeOn(); + } + } + + public override void MuteOff() + { + Debug.Console(2, this, "Unmuting to previous level: {0}", _previousVolumeLevel); + SetVolume((ushort) _previousVolumeLevel); + } + + public override void MuteOn() + { + SetVolume(0); + } + + public override void MuteToggle() + { + if (MuteFeedback.BoolValue) + { + MuteOff(); + } + else + { + MuteOn(); + } + } + + + /// + /// Increments the voluem + /// + /// + public override void VolumeUp(bool pressRelease) + { + // TODO: Implment volume decrement that calls SetVolume() + } + + /// + /// Decrements the volume + /// + /// + public override void VolumeDown(bool pressRelease) + { + // TODO: Implment volume decrement that calls SetVolume() + } + + /// + /// Scales the level and sets the codec to the specified level within its range + /// + /// level from slider (0-65535 range) + public override void SetVolume(ushort level) + { + var scaledLevel = CrestronEnvironment.ScaleWithLimits(level, 65535, 0, 100, 0); + SendText(string.Format("zConfiguration Audio Output volume: {0}", scaledLevel)); + } + + /// + /// Recalls the default volume on the codec + /// + public void VolumeSetToDefault() + { + } + + /// + /// + /// + public override void StandbyActivate() + { + // No corresponding function on device + } + + /// + /// + /// + public override void StandbyDeactivate() + { + // No corresponding function on device + } + + public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) + { + var joinMap = new ZoomRoomJoinMap(joinStart); + + var customJoins = JoinMapHelper.TryGetJoinMapAdvancedForDevice(joinMapKey); + + if (customJoins != null) + { + joinMap.SetCustomJoinData(customJoins); + } + + if (bridge != null) + { + bridge.AddJoinMap(Key, joinMap); + } + + LinkVideoCodecToApi(this, trilist, joinMap); + + LinkZoomRoomToApi(trilist, joinMap); + } + + /// + /// Links all the specific Zoom functionality to the API bridge + /// + /// + /// + public void LinkZoomRoomToApi(BasicTriList trilist, ZoomRoomJoinMap joinMap) + { + var meetingInfoCodec = this as IHasMeetingInfo; + if (meetingInfoCodec != null) + { + if (meetingInfoCodec.MeetingInfo != null) + { + trilist.SetBool(joinMap.MeetingCanRecord.JoinNumber, meetingInfoCodec.MeetingInfo.CanRecord); + } + + meetingInfoCodec.MeetingInfoChanged += (o, a) => + { + trilist.SetBool(joinMap.MeetingCanRecord.JoinNumber, a.Info.CanRecord); + }; + } + + var recordingCodec = this as IHasMeetingRecordingWithPrompt; + if (recordingCodec != null) + { + trilist.SetSigFalseAction(joinMap.StartRecording.JoinNumber, () => recordingCodec.StartRecording()); + trilist.SetSigFalseAction(joinMap.StopRecording.JoinNumber, () => recordingCodec.StopRecording()); + + recordingCodec.MeetingIsRecordingFeedback.LinkInputSig(trilist.BooleanInput[joinMap.StartRecording.JoinNumber]); + recordingCodec.MeetingIsRecordingFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.StopRecording.JoinNumber]); + + trilist.SetSigFalseAction(joinMap.RecordingPromptAgree.JoinNumber, () => recordingCodec.RecordingPromptAcknowledgement(true)); + trilist.SetSigFalseAction(joinMap.RecordingPromptDisagree.JoinNumber, () => recordingCodec.RecordingPromptAcknowledgement(false)); + + recordingCodec.RecordConsentPromptIsVisible.LinkInputSig(trilist.BooleanInput[joinMap.RecordConsentPromptIsVisible.JoinNumber]); + } + + var layoutsCodec = this as IHasZoomRoomLayouts; + if (layoutsCodec != null) + { + layoutsCodec.LayoutInfoChanged += (o, a) => + { + trilist.SetBool(joinMap.LayoutGalleryIsAvailable.JoinNumber, + zConfiguration.eLayoutStyle.Gallery == (a.AvailableLayouts & zConfiguration.eLayoutStyle.Gallery)); + + trilist.SetBool(joinMap.LayoutSpeakerIsAvailable.JoinNumber, + zConfiguration.eLayoutStyle.Speaker == (a.AvailableLayouts & zConfiguration.eLayoutStyle.Speaker)); + + + + trilist.SetBool(joinMap.LayoutStripIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.Strip + == + (a.AvailableLayouts & zConfiguration.eLayoutStyle.Strip)); + trilist.SetBool(joinMap.LayoutShareAllIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.ShareAll + == + (a.AvailableLayouts & + zConfiguration.eLayoutStyle.ShareAll)); + + // pass the names used to set the layout through the bridge + trilist.SetString(joinMap.LayoutGalleryIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.Gallery.ToString()); + trilist.SetString(joinMap.LayoutSpeakerIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.Speaker.ToString()); + trilist.SetString(joinMap.LayoutStripIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.Strip.ToString()); + trilist.SetString(joinMap.LayoutShareAllIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.ShareAll.ToString()); + }; + + trilist.SetSigFalseAction(joinMap.SwapContentWithThumbnail.JoinNumber, () => layoutsCodec.SwapContentWithThumbnail()); + + layoutsCodec.CanSwapContentWithThumbnailFeedback.LinkInputSig( + trilist.BooleanInput[joinMap.CanSwapContentWithThumbnail.JoinNumber]); + layoutsCodec.ContentSwappedWithThumbnailFeedback.LinkInputSig( + trilist.BooleanInput[joinMap.SwapContentWithThumbnail.JoinNumber]); + + layoutsCodec.LayoutViewIsOnFirstPageFeedback.LinkInputSig( + trilist.BooleanInput[joinMap.LayoutIsOnFirstPage.JoinNumber]); + layoutsCodec.LayoutViewIsOnLastPageFeedback.LinkInputSig(trilist.BooleanInput[joinMap.LayoutIsOnLastPage.JoinNumber]); + trilist.SetSigFalseAction(joinMap.LayoutTurnToNextPage.JoinNumber, () => layoutsCodec.LayoutTurnNextPage()); + trilist.SetSigFalseAction(joinMap.LayoutTurnToPreviousPage.JoinNumber, () => layoutsCodec.LayoutTurnPreviousPage()); + trilist.SetSigFalseAction(joinMap.GetAvailableLayouts.JoinNumber, () => layoutsCodec.GetAvailableLayouts()); + + trilist.SetStringSigAction(joinMap.GetSetCurrentLayout.JoinNumber, (s) => + { + try + { + var style = (zConfiguration.eLayoutStyle) Enum.Parse(typeof (zConfiguration.eLayoutStyle), s, true); + SetLayout(style); + } + catch (Exception e) + { + Debug.Console(1, this, "Unable to parse '{0}' to zConfiguration.eLayoutStyle: {1}", s, e); + } + }); + + layoutsCodec.LocalLayoutFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetCurrentLayout.JoinNumber]); + } + + var pinCodec = this as IHasParticipantPinUnpin; + if (pinCodec != null) + { + pinCodec.NumberOfScreensFeedback.LinkInputSig(trilist.UShortInput[joinMap.NumberOfScreens.JoinNumber]); + + // Set the value of the local property to be used when pinning a participant + trilist.SetUShortSigAction(joinMap.ScreenIndexToPinUserTo.JoinNumber, (u) => ScreenIndexToPinUserTo = u); + } + + var layoutSizeCodec = this as IHasSelfviewSize; + if (layoutSizeCodec != null) + { + trilist.SetSigFalseAction(joinMap.GetSetSelfviewPipSize.JoinNumber, layoutSizeCodec.SelfviewPipSizeToggle); + trilist.SetStringSigAction(joinMap.GetSetSelfviewPipSize.JoinNumber, (s) => + { + try + { + var size = (zConfiguration.eLayoutSize) Enum.Parse(typeof (zConfiguration.eLayoutSize), s, true); + var cmd = SelfviewPipSizes.FirstOrDefault(c => c.Command.Equals(size.ToString())); + SelfviewPipSizeSet(cmd); + } + catch (Exception e) + { + Debug.Console(1, this, "Unable to parse '{0}' to zConfiguration.eLayoutSize: {1}", s, e); + } + }); + + layoutSizeCodec.SelfviewPipSizeFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetSelfviewPipSize.JoinNumber]); + } + + MeetingInfoChanged += (device, args) => + { + trilist.SetString(joinMap.MeetingInfoId.JoinNumber, args.Info.Id); + trilist.SetString(joinMap.MeetingInfoHost.JoinNumber, args.Info.Host); + trilist.SetString(joinMap.MeetingInfoPassword.JoinNumber, args.Info.Password); + trilist.SetBool(joinMap.IsHost.JoinNumber, args.Info.IsHost); + trilist.SetBool(joinMap.ShareOnlyMeeting.JoinNumber, args.Info.IsSharingMeeting); + trilist.SetBool(joinMap.WaitingForHost.JoinNumber, args.Info.WaitingForHost); + //trilist.SetString(joinMap.CurrentSource.JoinNumber, args.Info.ShareStatus); + }; + + trilist.SetSigFalseAction(joinMap.StartMeetingNow.JoinNumber, () => StartMeeting(0)); + trilist.SetSigFalseAction(joinMap.ShareOnlyMeeting.JoinNumber, StartSharingOnlyMeeting); + trilist.SetSigFalseAction(joinMap.StartNormalMeetingFromSharingOnlyMeeting.JoinNumber, StartNormalMeetingFromSharingOnlyMeeting); + + trilist.SetStringSigAction(joinMap.SubmitPassword.JoinNumber, SubmitPassword); + + // Subscribe to call status to clear ShowPasswordPrompt when in meeting + this.CallStatusChange += (o, a) => + { + if (a.CallItem.Status == eCodecCallStatus.Connected || a.CallItem.Status == eCodecCallStatus.Disconnected) + { + trilist.SetBool(joinMap.MeetingPasswordRequired.JoinNumber, false); + } + + }; + + trilist.SetSigFalseAction(joinMap.CancelJoinAttempt.JoinNumber, () => { + trilist.SetBool(joinMap.MeetingPasswordRequired.JoinNumber, false); + EndAllCalls(); + }); + + PasswordRequired += (devices, args) => + { + Debug.Console(2, this, "***********************************PaswordRequired. Message: {0} Cancelled: {1} Last Incorrect: {2} Failed: {3}", args.Message, args.LoginAttemptCancelled, args.LastAttemptWasIncorrect, args.LoginAttemptFailed); + + if (args.LoginAttemptCancelled) + { + trilist.SetBool(joinMap.MeetingPasswordRequired.JoinNumber, false); + return; + } + + if (!string.IsNullOrEmpty(args.Message)) + { + trilist.SetString(joinMap.PasswordPromptMessage.JoinNumber, args.Message); + } + + if (args.LoginAttemptFailed) + { + // login attempt failed + return; + } + + trilist.SetBool(joinMap.PasswordIncorrect.JoinNumber, args.LastAttemptWasIncorrect); + trilist.SetBool(joinMap.MeetingPasswordRequired.JoinNumber, true); + }; + + trilist.OnlineStatusChange += (device, args) => + { + if (!args.DeviceOnLine) return; + + ComputeAvailableLayouts(); + layoutsCodec.LocalLayoutFeedback.FireUpdate(); + layoutsCodec.CanSwapContentWithThumbnailFeedback.FireUpdate(); + layoutsCodec.ContentSwappedWithThumbnailFeedback.FireUpdate(); + layoutsCodec.LayoutViewIsOnFirstPageFeedback.FireUpdate(); + layoutsCodec.LayoutViewIsOnLastPageFeedback.FireUpdate(); + pinCodec.NumberOfScreensFeedback.FireUpdate(); + layoutSizeCodec.SelfviewPipSizeFeedback.FireUpdate(); + }; + + var wirelessInfoCodec = this as IZoomWirelessShareInstructions; + if (wirelessInfoCodec != null) + { + if (Status != null && Status.Sharing != null) + { + SetSharingStateJoins(Status.Sharing, trilist, joinMap); + } + + wirelessInfoCodec.ShareInfoChanged += (o, a) => + { + SetSharingStateJoins(a.SharingStatus, trilist, joinMap); + }; + } + } + + void SetSharingStateJoins(zStatus.Sharing state, BasicTriList trilist, ZoomRoomJoinMap joinMap) + { + trilist.SetBool(joinMap.IsSharingAirplay.JoinNumber, state.isAirHostClientConnected); + trilist.SetBool(joinMap.IsSharingHdmi.JoinNumber, state.isBlackMagicConnected || state.isDirectPresentationConnected); + + trilist.SetString(joinMap.DisplayState.JoinNumber, state.dispState.ToString()); + trilist.SetString(joinMap.AirplayShareCode.JoinNumber, state.password); + trilist.SetString(joinMap.LaptopShareKey.JoinNumber, state.directPresentationSharingKey); + trilist.SetString(joinMap.WifiName.JoinNumber, state.wifiName); + trilist.SetString(joinMap.ServerName.JoinNumber, state.serverName); + } + + public override void ExecuteSwitch(object selector) + { + var action = selector as Action; + if (action == null) + { + return; + } + + action(); + } + + public void AcceptCall() + { + _waitingForUserToAcceptOrRejectIncomingCall = false; + + var incomingCall = + ActiveCalls.FirstOrDefault( + c => c.Status.Equals(eCodecCallStatus.Ringing) && c.Direction.Equals(eCodecCallDirection.Incoming)); + + AcceptCall(incomingCall); + } + + public override void AcceptCall(CodecActiveCallItem call) + { + _waitingForUserToAcceptOrRejectIncomingCall = false; + + SendText(string.Format("zCommand Call Accept callerJID: {0}", call.Id)); + + call.Status = eCodecCallStatus.Connected; + + OnCallStatusChange(call); + + UpdateCallStatus(); + } + + public void RejectCall() + { + _waitingForUserToAcceptOrRejectIncomingCall = false; + + var incomingCall = + ActiveCalls.FirstOrDefault( + c => c.Status.Equals(eCodecCallStatus.Ringing) && c.Direction.Equals(eCodecCallDirection.Incoming)); + + RejectCall(incomingCall); + } + + public override void RejectCall(CodecActiveCallItem call) + { + _waitingForUserToAcceptOrRejectIncomingCall = false; + + SendText(string.Format("zCommand Call Reject callerJID: {0}", call.Id)); + + call.Status = eCodecCallStatus.Disconnected; + + OnCallStatusChange(call); + + UpdateCallStatus(); + } + + public override void Dial(Meeting meeting) + { + Debug.Console(1, this, "Dialing meeting.Id: {0} Title: {1}", meeting.Id, meeting.Title); + _lastDialedMeetingNumber = meeting.Id; + SendText(string.Format("zCommand Dial Start meetingNumber: {0}", meeting.Id)); + } + + public override void Dial(string number) + { + Debug.Console(2, this, "Dialing number: {0}", number); + _lastDialedMeetingNumber = number; + SendText(string.Format("zCommand Dial Join meetingNumber: {0}", number)); + } + + /// + /// Dials a meeting with a password + /// + /// + /// + public void Dial(string number, string password) + { + Debug.Console(2, this, "Dialing meeting number: {0} with password: {1}", number, password); + SendText(string.Format("zCommand Dial Join meetingNumber: {0} password: {1}", number, password)); + } + + /// + /// Invites a contact to either a new meeting (if not already in a meeting) or the current meeting. + /// Currently only invites a single user + /// + /// + public override void Dial(IInvitableContact contact) + { + var ic = contact as InvitableDirectoryContact; + + if (ic != null) + { + Debug.Console(1, this, "Attempting to Dial (Invite): {0}", ic.Name); + + if (!IsInCall) + { + SendText(string.Format("zCommand Invite Duration: {0} user: {1}", DefaultMeetingDurationMin, + ic.ContactId)); + } + else + { + SendText(string.Format("zCommand Call invite user: {0}", ic.ContactId)); + } + } + } + + /// + /// Invites contacts to a new meeting for a specified duration + /// + /// + /// + public void InviteContactsToNewMeeting(List contacts, uint duration) + { + if(duration == 0) + { + duration = DefaultMeetingDurationMin; + } + + StringBuilder message = new StringBuilder(); + + // Add the prefix + message.Append(string.Format("zCommand Invite Duration: {0}", duration)); + + // Add each invitee + foreach (var contact in contacts) + { + var invitee = string.Format(" user: {0}", contact.ContactId); + + message.Append(invitee); + } + + SendText(message.ToString()); + } + + /// + /// Invites contacts to an existing meeting + /// + /// + public void InviteContactsToExistingMeeting(List contacts) + { + StringBuilder message = new StringBuilder(); + + // Add the prefix + message.Append(string.Format("zCommand Call Invite")); + + // Add each invitee + foreach (var contact in contacts) + { + var invitee = string.Format(" user: {0}", contact.ContactId); + + message.Append(invitee); + } + + SendText(message.ToString()); + } + + + /// + /// Starts a PMI Meeting for the specified duration (or default meeting duration if 0 is specified) + /// + /// duration of meeting + public void StartMeeting(uint duration) + { + uint dur = DefaultMeetingDurationMin; + + if (duration > 0) + dur = duration; + + SendText(string.Format("zCommand Dial StartPmi Duration: {0}", dur)); + } + + public void LeaveMeeting() + { + _meetingPasswordRequired = false; + _waitingForUserToAcceptOrRejectIncomingCall = false; + + SendText("zCommand Call Leave"); + } + + public override void EndCall(CodecActiveCallItem call) + { + _meetingPasswordRequired = false; + _waitingForUserToAcceptOrRejectIncomingCall = false; + + SendText("zCommand Call Disconnect"); + } + + public override void EndAllCalls() + { + _meetingPasswordRequired = false; + _waitingForUserToAcceptOrRejectIncomingCall = false; + + SendText("zCommand Call Disconnect"); + } + + public override void SendDtmf(string s) + { + SendDtmfToPhone(s); + } + + /// + /// Call when directory results are updated + /// + /// + private void OnDirectoryResultReturned(CodecDirectory result) + { + try + { + Debug.Console(2, this, "OnDirectoryResultReturned. Result has {0} contacts", result.Contacts.Count); + + CurrentDirectoryResultIsNotDirectoryRoot.FireUpdate(); + + var directoryResult = result; + var directoryIsRoot = CurrentDirectoryResultIsNotDirectoryRoot.BoolValue == false; + + // If result is Root, create a copy and filter out contacts whose parent folder is not root + //if (!CurrentDirectoryResultIsNotDirectoryRoot.BoolValue) + //{ + // Debug.Console(2, this, "Filtering DirectoryRoot to remove contacts for display"); + + // directoryResult.ResultsFolderId = result.ResultsFolderId; + // directoryResult.AddFoldersToDirectory(result.Folders); + // directoryResult.AddContactsToDirectory( + // result.Contacts.Where((c) => c.ParentFolderId == result.ResultsFolderId).ToList()); + //} + //else + //{ + // directoryResult = result; + //} + + Debug.Console(2, this, "Updating directoryResult. IsOnRoot: {0} Contact Count: {1}", + directoryIsRoot, directoryResult.Contacts.Count); + + // This will return the latest results to all UIs. Multiple indendent UI Directory browsing will require a different methodology + var handler = DirectoryResultReturned; + if (handler != null) + { + handler(this, new DirectoryEventArgs + { + Directory = directoryResult, + DirectoryIsOnRoot = directoryIsRoot + }); + } + + + } + catch (Exception e) + { + Debug.Console(2, this, "Error: {0}", e); + } + + //PrintDirectory(result); + } + + /// + /// Builds the cameras List by using the Zoom Room zStatus.Cameras data. Could later be modified to build from config data + /// + private void SetUpCameras() + { + SelectedCameraFeedback = new StringFeedback(() => Configuration.Video.Camera.SelectedId); + + ControllingFarEndCameraFeedback = new BoolFeedback(() => SelectedCamera is IAmFarEndCamera); + + foreach (var cam in Status.Cameras) + { + // Known Issue: + // Crestron UC engine systems seem to report an item in the cameras list that represnts the USB bridge device. + // If we know the name and it's reliably consistent, we could ignore it here... + + if (cam.Name.IndexOf("HD-CONV-USB") > -1) + { + // Skip this as it's the Crestron USB box, not a real camera + continue; + } + + var existingCam = Cameras.FirstOrDefault((c) => c.Key.Equals(cam.id)); + + if (existingCam == null) + { + var camera = new ZoomRoomCamera(cam.id, cam.Name, this); + + Cameras.Add(camera); + + if (cam.Selected) + { + SelectedCamera = camera; + } + } + } + + if (IsInCall) + { + UpdateFarEndCameras(); + } + + _syncState.CamerasSetUp(); + } + + /// + /// Dynamically creates far end cameras for call participants who have far end control enabled. + /// + private void UpdateFarEndCameras() + { + // TODO: set up far end cameras for the current call + } + + #region Implementation of IHasParticipants + + public CodecParticipants Participants { get; private set; } + + public void RemoveParticipant(int userId) + { + SendText(string.Format("zCommand Call Expel Id: {0}", userId)); + } + + public void SetParticipantAsHost(int userId) + { + SendText(string.Format("zCommand Call HostChange Id: {0}", userId)); + } + + public void AdmitParticipantFromWaitingRoom(int userId) + { + SendText(string.Format("zCommand Call Admit Participant Id: {0}", userId)); + } + + #endregion + + #region IHasParticipantAudioMute Members + + public void MuteAudioForAllParticipants() + { + SendText(string.Format("zCommand Call MuteAll Mute: on")); + } + + public void MuteAudioForParticipant(int userId) + { + SendText(string.Format("zCommand Call MuteParticipant Mute: on Id: {0}", userId)); + } + + public void UnmuteAudioForParticipant(int userId) + { + SendText(string.Format("zCommand Call MuteParticipant Mute: off Id: {0}", userId)); + } + + public void ToggleAudioForParticipant(int userId) + { + var user = Participants.CurrentParticipants.FirstOrDefault(p => p.UserId.Equals(userId)); + + if (user == null) + { + Debug.Console(2, this, "Unable to find user with id: {0}", userId); + return; + } + + if (user.AudioMuteFb) + { + UnmuteAudioForParticipant(userId); + } + else + { + MuteAudioForParticipant(userId); + } + } + + #endregion + + #region IHasParticipantVideoMute Members + + public void MuteVideoForParticipant(int userId) + { + SendText(string.Format("zCommand Call MuteParticipantVideo Mute: on Id: {0}", userId)); + } + + public void UnmuteVideoForParticipant(int userId) + { + SendText(string.Format("zCommand Call MuteParticipantVideo Mute: off Id: {0}", userId)); + } + + public void ToggleVideoForParticipant(int userId) + { + var user = Participants.CurrentParticipants.FirstOrDefault(p => p.UserId.Equals(userId)); + + if (user == null) + { + Debug.Console(2, this, "Unable to find user with id: {0}", userId); + return; + } + + if (user.VideoMuteFb) + { + UnmuteVideoForParticipant(userId); + } + else + { + MuteVideoForParticipant(userId); + } + } + + #endregion + + #region IHasParticipantPinUnpin Members + + private Func NumberOfScreensFeedbackFunc + { + get { return () => Status.NumberOfScreens.NumOfScreens; } + } + + public IntFeedback NumberOfScreensFeedback { get; private set; } + + public int ScreenIndexToPinUserTo { get; private set; } + + public void PinParticipant(int userId, int screenIndex) + { + SendText(string.Format("zCommand Call Pin Id: {0} Enable: on Screen: {1}", userId, screenIndex)); + } + + public void UnPinParticipant(int userId) + { + SendText(string.Format("zCommand Call Pin Id: {0} Enable: off", userId)); + } + + public void ToggleParticipantPinState(int userId, int screenIndex) + { + var user = Participants.CurrentParticipants.FirstOrDefault(p => p.UserId.Equals(userId)); + + if (user == null) + { + Debug.Console(2, this, "Unable to find user with id: {0}", userId); + return; + } + + if (user.IsPinnedFb) + { + UnPinParticipant(userId); + } + else + { + PinParticipant(userId, screenIndex); + } + } + + #endregion + + #region Implementation of IHasCameraOff + + public BoolFeedback CameraIsOffFeedback { get; private set; } + + public void CameraOff() + { + CameraMuteOn(); + } + + #endregion + + public BoolFeedback CameraIsMutedFeedback { get; private set; } + + public void CameraMuteOn() + { + SendText("zConfiguration Call Camera Mute: On"); + } + + public void CameraMuteOff() + { + SendText("zConfiguration Call Camera Mute: Off"); + } + + public void CameraMuteToggle() + { + if (CameraIsMutedFeedback.BoolValue) + CameraMuteOff(); + else + CameraMuteOn(); + } + + #region Implementation of IHasCameraAutoMode + + //Zoom doesn't support camera auto modes. Setting this to just unmute video + public void CameraAutoModeOn() + { + CameraMuteOff(); + throw new NotImplementedException("Zoom Room Doesn't support camera auto mode"); + } + + //Zoom doesn't support camera auto modes. Setting this to just unmute video + public void CameraAutoModeOff() + { + SendText("zConfiguration Call Camera Mute: Off"); + } + + public void CameraAutoModeToggle() + { + throw new NotImplementedException("Zoom Room doesn't support camera auto mode"); + } + + public BoolFeedback CameraAutoModeIsOnFeedback { get; private set; } + + #endregion + + #region Implementation of IHasFarEndContentStatus + + public BoolFeedback ReceivingContent { get; private set; } + + #endregion + + #region Implementation of IHasSelfviewPosition + + private CodecCommandWithLabel _currentSelfviewPipPosition; + + public StringFeedback SelfviewPipPositionFeedback { get; private set; } + + public void SelfviewPipPositionSet(CodecCommandWithLabel position) + { + SendText(String.Format("zConfiguration Call Layout Position: {0}", position.Command)); + } + + public void SelfviewPipPositionToggle() + { + if (_currentSelfviewPipPosition != null) + { + var nextPipPositionIndex = SelfviewPipPositions.IndexOf(_currentSelfviewPipPosition) + 1; + + if (nextPipPositionIndex >= SelfviewPipPositions.Count) + // Check if we need to loop back to the first item in the list + nextPipPositionIndex = 0; + + SelfviewPipPositionSet(SelfviewPipPositions[nextPipPositionIndex]); + } + } + + public List SelfviewPipPositions = new List() + { + new CodecCommandWithLabel("UpLeft", "Center Left"), + new CodecCommandWithLabel("UpRight", "Center Right"), + new CodecCommandWithLabel("DownRight", "Lower Right"), + new CodecCommandWithLabel("DownLeft", "Lower Left") + }; + + private void ComputeSelfviewPipPositionStatus() + { + _currentSelfviewPipPosition = + SelfviewPipPositions.FirstOrDefault( + p => p.Command.ToLower().Equals(Configuration.Call.Layout.Position.ToString().ToLower())); + } + + #endregion + + // TODO: #714 [ ] Implementation of IHasSelfviewPipSize + + #region Implementation of IHasSelfviewPipSize + + private CodecCommandWithLabel _currentSelfviewPipSize; + + public StringFeedback SelfviewPipSizeFeedback { get; private set; } + + public void SelfviewPipSizeSet(CodecCommandWithLabel size) + { + SendText(String.Format("zConfiguration Call Layout Size: {0}", size.Command)); + } + + public void SelfviewPipSizeToggle() + { + if (_currentSelfviewPipSize != null) + { + var nextPipSizeIndex = SelfviewPipSizes.IndexOf(_currentSelfviewPipSize) + 1; + + if (nextPipSizeIndex >= SelfviewPipSizes.Count) + // Check if we need to loop back to the first item in the list + nextPipSizeIndex = 0; + + SelfviewPipSizeSet(SelfviewPipSizes[nextPipSizeIndex]); + } + } + + public List SelfviewPipSizes = new List() + { + new CodecCommandWithLabel("Off", "Off"), + new CodecCommandWithLabel("Size1", "Size 1"), + new CodecCommandWithLabel("Size2", "Size 2"), + new CodecCommandWithLabel("Size3", "Size 3"), + new CodecCommandWithLabel("Strip", "Strip") + }; + + private void ComputeSelfviewPipSizeStatus() + { + _currentSelfviewPipSize = + SelfviewPipSizes.FirstOrDefault( + p => p.Command.ToLower().Equals(Configuration.Call.Layout.Size.ToString().ToLower())); + } + + #endregion + + #region Implementation of IHasPhoneDialing + + private Func PhoneOffHookFeedbackFunc + { + get { return () => Status.PhoneCall.OffHook; } + } + + private Func CallerIdNameFeedbackFunc + { + get { return () => Status.PhoneCall.PeerDisplayName; } + } + + private Func CallerIdNumberFeedbackFunc + { + get { return () => Status.PhoneCall.PeerNumber; } + } + + public BoolFeedback PhoneOffHookFeedback { get; private set; } + public StringFeedback CallerIdNameFeedback { get; private set; } + public StringFeedback CallerIdNumberFeedback { get; private set; } + + public void DialPhoneCall(string number) + { + SendText(String.Format("zCommand Dial PhoneCallOut Number: {0}", number)); + } + + public void EndPhoneCall() + { + SendText(String.Format("zCommand Dial PhoneHangUp CallId: {0}", Status.PhoneCall.CallId)); + } + + public void SendDtmfToPhone(string digit) + { + SendText(String.Format("zCommand SendSipDTMF CallId: {0} Key: {1}", Status.PhoneCall.CallId, digit)); + } + + #endregion + + #region IHasZoomRoomLayouts Members + + public event EventHandler LayoutInfoChanged; + + private Func LayoutViewIsOnFirstPageFeedbackFunc + { + get { return () => Status.Layout.is_In_First_Page; } + } + + private Func LayoutViewIsOnLastPageFeedbackFunc + { + get { return () => Status.Layout.is_In_Last_Page; } + } + + private Func CanSwapContentWithThumbnailFeedbackFunc + { + get { return () => Status.Layout.can_Switch_Floating_Share_Content; } + } + + private Func ContentSwappedWithThumbnailFeedbackFunc + { + get { return () => Configuration.Call.Layout.ShareThumb; } + } + + public BoolFeedback LayoutViewIsOnFirstPageFeedback { get; private set; } + + public BoolFeedback LayoutViewIsOnLastPageFeedback { get; private set; } + + public BoolFeedback CanSwapContentWithThumbnailFeedback { get; private set; } + + public BoolFeedback ContentSwappedWithThumbnailFeedback { get; private set; } + + + public zConfiguration.eLayoutStyle LastSelectedLayout { get; private set; } + + public zConfiguration.eLayoutStyle AvailableLayouts { get; private set; } + + /// + /// Reads individual properties to determine if which layouts are avalailable + /// + private void ComputeAvailableLayouts() + { + Debug.Console(1, this, "Computing available layouts..."); + zConfiguration.eLayoutStyle availableLayouts = zConfiguration.eLayoutStyle.None; + if (Status.Layout.can_Switch_Wall_View) + { + availableLayouts |= zConfiguration.eLayoutStyle.Gallery; + } + + if (Status.Layout.can_Switch_Speaker_View) + { + availableLayouts |= zConfiguration.eLayoutStyle.Speaker; + } + + if (Status.Layout.can_Switch_Share_On_All_Screens) + { + availableLayouts |= zConfiguration.eLayoutStyle.ShareAll; + } + + // There is no property that directly reports if strip mode is valid, but API stipulates + // that strip mode is available if the number of screens is 1 + if (Status.NumberOfScreens.NumOfScreens == 1 || Status.Layout.can_Switch_Strip_View || Status.Layout.video_type.ToLower() == "strip") + { + availableLayouts |= zConfiguration.eLayoutStyle.Strip; + } + + Debug.Console(1, this, "availablelayouts: {0}", availableLayouts); + + AvailableLayouts = availableLayouts; + } + + private void OnLayoutInfoChanged() + { + var handler = LayoutInfoChanged; + if (handler != null) + { + + var currentLayout = zConfiguration.eLayoutStyle.None; + + currentLayout = (zConfiguration.eLayoutStyle)Enum.Parse(typeof(zConfiguration.eLayoutStyle), string.IsNullOrEmpty(LocalLayoutFeedback.StringValue) ? "None" : LocalLayoutFeedback.StringValue, true); + + handler(this, new LayoutInfoChangedEventArgs() + { + AvailableLayouts = AvailableLayouts, + CurrentSelectedLayout = currentLayout, + LayoutViewIsOnFirstPage = LayoutViewIsOnFirstPageFeedback.BoolValue, + LayoutViewIsOnLastPage = LayoutViewIsOnLastPageFeedback.BoolValue, + CanSwapContentWithThumbnail = CanSwapContentWithThumbnailFeedback.BoolValue, + ContentSwappedWithThumbnail = ContentSwappedWithThumbnailFeedback.BoolValue, + }); + } + } + + public void GetAvailableLayouts() + { + SendText("zStatus Call Layout"); + } + + public void SetLayout(zConfiguration.eLayoutStyle layoutStyle) + { + LastSelectedLayout = layoutStyle; + SendText(String.Format("zConfiguration Call Layout Style: {0}", layoutStyle.ToString())); + } + + public void SwapContentWithThumbnail() + { + if (CanSwapContentWithThumbnailFeedback.BoolValue) + { + var oppositeValue = ContentSwappedWithThumbnailFeedback.BoolValue ? "on" : "off"; + // Get the value based on the opposite of the current state + // TODO: #697 [*] Need to verify the ternary above and make sure that the correct on/off value is being send based on the true/false value of the feedback + // to toggle the state + SendText(String.Format("zConfiguration Call Layout ShareThumb: {0}", oppositeValue)); + } + } + + public void LayoutTurnNextPage() + { + SendText("zCommand Call Layout TurnPage Forward: On"); + } + + public void LayoutTurnPreviousPage() + { + SendText("zCommand Call Layout TurnPage Forward: Off"); + } + + #endregion + + #region IHasCodecLayouts Members + + private Func LocalLayoutFeedbackFunc + { + get + { + return () => + { + if (Configuration.Call.Layout.Style != zConfiguration.eLayoutStyle.None) + return Configuration.Call.Layout.Style.ToString(); + else + return Configuration.Client.Call.Layout.Style.ToString(); + }; + } + } + + public StringFeedback LocalLayoutFeedback { get; private set; } + + public void LocalLayoutToggle() + { + var currentLayout = LocalLayoutFeedback.StringValue; + + var eCurrentLayout = (int) Enum.Parse(typeof (zConfiguration.eLayoutStyle), currentLayout, true); + + var nextLayout = GetNextLayout(eCurrentLayout); + + if (nextLayout != zConfiguration.eLayoutStyle.None) + { + SetLayout(nextLayout); + } + } + + /// + /// Tries to get the next available layout + /// + /// + /// + private zConfiguration.eLayoutStyle GetNextLayout(int currentLayout) + { + if (AvailableLayouts == zConfiguration.eLayoutStyle.None) + { + return zConfiguration.eLayoutStyle.None; + } + + zConfiguration.eLayoutStyle nextLayout; + + if (((zConfiguration.eLayoutStyle) currentLayout & zConfiguration.eLayoutStyle.ShareAll) == + zConfiguration.eLayoutStyle.ShareAll) + { + nextLayout = zConfiguration.eLayoutStyle.Gallery; + } + else + { + nextLayout = (zConfiguration.eLayoutStyle) (currentLayout << 1); + } + + if ((AvailableLayouts & nextLayout) == nextLayout) + { + return nextLayout; + } + else + { + return GetNextLayout((int) nextLayout); + } + } + + public void LocalLayoutToggleSingleProminent() + { + throw new NotImplementedException(); + } + + public void MinMaxLayoutToggle() + { + throw new NotImplementedException(); + } + + #endregion + + #region IPasswordPrompt Members + + public event EventHandler PasswordRequired; + + public void SubmitPassword(string password) + { + _meetingPasswordRequired = false; + Debug.Console(2, this, "Password Submitted: {0}", password); + Dial(_lastDialedMeetingNumber, password); + } + + void OnPasswordRequired(bool lastAttemptIncorrect, bool loginFailed, bool loginCancelled, string message) + { + _meetingPasswordRequired = !loginFailed || !loginCancelled; + + var handler = PasswordRequired; + if (handler != null) + { + Debug.Console(2, this, "Meeting Password Required: {0}", _meetingPasswordRequired); + + handler(this, new PasswordPromptEventArgs(lastAttemptIncorrect, loginFailed, loginCancelled, message)); + } + } + + #endregion + + #region IHasMeetingInfo Members + + public event EventHandler MeetingInfoChanged; + + private MeetingInfo _meetingInfo; + + public MeetingInfo MeetingInfo + { + get { return _meetingInfo; } + private set + { + if (value != _meetingInfo) + { + _meetingInfo = value; + + var handler = MeetingInfoChanged; + if (handler != null) + { + handler(this, new MeetingInfoEventArgs(_meetingInfo)); + } + } + } + } + + #endregion + + #region Implementation of IHasPresentationOnlyMeeting + + public void StartSharingOnlyMeeting() + { + StartSharingOnlyMeeting(eSharingMeetingMode.None, 30, String.Empty); + } + + public void StartSharingOnlyMeeting(eSharingMeetingMode displayMode) + { + StartSharingOnlyMeeting(displayMode, DefaultMeetingDurationMin, String.Empty); + } + + public void StartSharingOnlyMeeting(eSharingMeetingMode displayMode, uint duration) + { + StartSharingOnlyMeeting(displayMode, duration, String.Empty); + } + + public void StartSharingOnlyMeeting(eSharingMeetingMode displayMode, uint duration, string password) + { + SendText(String.Format("zCommand Dial Sharing Duration: {0} DisplayState: {1} Password: {2}", duration, displayMode, password)); + } + + public void StartNormalMeetingFromSharingOnlyMeeting() + { + Debug.Console(2, this, "Converting Sharing Meeting to Normal Meeting"); + SendText("zCommand call sharing ToNormal"); + } + + #endregion + + #region IHasMeetingLock Members + + public BoolFeedback MeetingIsLockedFeedback { get; private set; } + + public void LockMeeting() + { + SendText(string.Format("zConfiguration Call Lock Enable: on")); + } + + public void UnLockMeeting() + { + SendText(string.Format("zConfiguration Call Lock Enable: off")); + } + + public void ToggleMeetingLock() + { + if (MeetingIsLockedFeedback.BoolValue) + { + UnLockMeeting(); + } + else + { + LockMeeting(); + } + } + + #endregion + + #region IHasMeetingRecordingWithPrompt Members + + public BoolFeedback MeetingIsRecordingFeedback { get; private set; } + + bool _recordConsentPromptIsVisible; + + public BoolFeedback RecordConsentPromptIsVisible { get; private set; } + + public void RecordingPromptAcknowledgement(bool agree) + { + var command = string.Format("zCommand Agree Recording: {0}", agree ? "on" : "off"); + //Debug.Console(2, this, "Sending agree: {0} {1}", agree, command); + SendText(command); + } + + public void StartRecording() + { + SendText(string.Format("zCommand Call Record Enable: on")); + } + + public void StopRecording() + { + SendText(string.Format("zCommand Call Record Enable: off")); + } + + public void ToggleRecording() + { + if (MeetingIsRecordingFeedback.BoolValue) + { + StopRecording(); + } + else + { + StartRecording(); + } + } + + #endregion + + #region IZoomWirelessShareInstructions Members + + public event EventHandler ShareInfoChanged; + + public zStatus.Sharing SharingState + { + get + { + return Status.Sharing; + } + } + + void OnShareInfoChanged(zStatus.Sharing status) + { + Debug.Console(2, this, +@"ShareInfoChanged: +isSharingHDMI: {0} +isSharingAirplay: {1} +AirplayPassword: {2} +OSD Display State: {3} +", +status.isSharingBlackMagic, +status.isAirHostClientConnected, +status.password, +status.dispState); + + var handler = ShareInfoChanged; + if (handler != null) + { + handler(this, new ShareInfoEventArgs(status)); + } + } + + #endregion + } + + /// + /// Zoom Room specific info object + /// + public class ZoomRoomInfo : VideoCodecInfo + { + public ZoomRoomInfo(ZoomRoomStatus status, ZoomRoomConfiguration configuration) + { + Status = status; + Configuration = configuration; + } + + [JsonIgnore] + public ZoomRoomStatus Status { get; private set; } + [JsonIgnore] + public ZoomRoomConfiguration Configuration { get; private set; } + + public override bool AutoAnswerEnabled + { + get { return Status.SystemUnit.RoomInfo.AutoAnswerIsEnabled; } + } + + public override string E164Alias + { + get + { + if (!string.IsNullOrEmpty(Status.SystemUnit.MeetingNumber)) + { + return Status.SystemUnit.MeetingNumber; + } + return string.Empty; + } + } + + public override string H323Id + { + get + { + if (!string.IsNullOrEmpty(Status.Call.Info.meeting_list_item.third_party.h323_address)) + { + return Status.Call.Info.meeting_list_item.third_party.h323_address; + } + return string.Empty; + } + } + + public override string IpAddress + { + get + { + if (!string.IsNullOrEmpty(Status.SystemUnit.RoomInfo.AccountEmail)) + { + return Status.SystemUnit.RoomInfo.AccountEmail; + } + return string.Empty; + } + } + + public override bool MultiSiteOptionIsEnabled + { + get { return true; } + } + + public override string SipPhoneNumber + { + get + { + if (!string.IsNullOrEmpty(Status.Call.Info.dialIn)) + { + return Status.Call.Info.dialIn; + } + return string.Empty; + } + } + + public override string SipUri + { + get + { + if (!string.IsNullOrEmpty(Status.Call.Info.meeting_list_item.third_party.sip_address)) + { + return Status.Call.Info.meeting_list_item.third_party.sip_address; + } + return string.Empty; + } + } + } + + /// + /// Tracks the initial sycnronization state when establishing a new connection + /// + public class ZoomRoomSyncState : IKeyed + { + private readonly ZoomRoom _parent; + private readonly CrestronQueue _syncQueries; + private bool _initialSyncComplete; + + public ZoomRoomSyncState(string key, ZoomRoom parent) + { + _parent = parent; + Key = key; + _syncQueries = new CrestronQueue(50); + CodecDisconnected(); + } + + public bool InitialSyncComplete + { + get { return _initialSyncComplete; } + private set + { + if (value) + { + var handler = InitialSyncCompleted; + if (handler != null) + { + handler(this, new EventArgs()); + } + } + _initialSyncComplete = value; + } + } + + public bool LoginResponseWasReceived { get; private set; } + + public bool FirstJsonResponseWasReceived { get; private set; } + + public bool InitialQueryMessagesWereSent { get; private set; } + + public bool LastQueryResponseWasReceived { get; private set; } + + public bool CamerasHaveBeenSetUp { get; private set; } + + #region IKeyed Members + + public string Key { get; private set; } + + #endregion + + public event EventHandler InitialSyncCompleted; + + public event EventHandler FirstJsonResponseReceived; + + public void StartSync() + { + DequeueQueries(); + } + + private void DequeueQueries() + { + while (!_syncQueries.IsEmpty) + { + var query = _syncQueries.Dequeue(); + + _parent.SendText(query); + } + + InitialQueryMessagesSent(); + } + + public void AddQueryToQueue(string query) + { + _syncQueries.Enqueue(query); + } + + public void LoginResponseReceived() + { + LoginResponseWasReceived = true; + Debug.Console(1, this, "Login Rsponse Received."); + CheckSyncStatus(); + } + + public void ReceivedFirstJsonResponse() + { + FirstJsonResponseWasReceived = true; + Debug.Console(1, this, "First JSON Response Received."); + + var handler = FirstJsonResponseReceived; + if (handler != null) + { + handler(this, null); + } + CheckSyncStatus(); + } + + public void InitialQueryMessagesSent() + { + InitialQueryMessagesWereSent = true; + Debug.Console(1, this, "Query Messages Sent."); + CheckSyncStatus(); + } + + public void LastQueryResponseReceived() + { + LastQueryResponseWasReceived = true; + Debug.Console(1, this, "Last Query Response Received."); + CheckSyncStatus(); + } + + public void CamerasSetUp() + { + CamerasHaveBeenSetUp = true; + Debug.Console(1, this, "Cameras Set Up."); + CheckSyncStatus(); + } + + public void CodecDisconnected() + { + _syncQueries.Clear(); + LoginResponseWasReceived = false; + FirstJsonResponseWasReceived = false; + InitialQueryMessagesWereSent = false; + LastQueryResponseWasReceived = false; + CamerasHaveBeenSetUp = false; + InitialSyncComplete = false; + } + + private void CheckSyncStatus() + { + if (LoginResponseWasReceived && FirstJsonResponseWasReceived && InitialQueryMessagesWereSent && LastQueryResponseWasReceived && + CamerasHaveBeenSetUp) + { + InitialSyncComplete = true; + Debug.Console(1, this, "Initial Codec Sync Complete!"); + } + else + { + InitialSyncComplete = false; + } + } + } + + public class ZoomRoomFactory : EssentialsDeviceFactory + { + public ZoomRoomFactory() + { + TypeNames = new List {"zoomroom"}; + } + + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + Debug.Console(1, "Factory Attempting to create new ZoomRoom Device"); + var comm = CommFactory.CreateCommForDevice(dc); + return new ZoomRoom(dc, comm); + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomCamera.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/ZoomRoom/ZoomRoomCamera.cs similarity index 98% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomCamera.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/ZoomRoom/ZoomRoomCamera.cs index 4b723ec8..bb0abeea 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomCamera.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/ZoomRoom/ZoomRoomCamera.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -7,7 +9,7 @@ using Crestron.SimplSharpPro.DeviceSupport; using PepperDash.Essentials.Core.Bridges; using PepperDash.Essentials.Devices.Common.Cameras; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom { diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs similarity index 96% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs index 878f88d5..bb6bf90f 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs @@ -1,706 +1,706 @@ -using System; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Bridges.JoinMaps; - -namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom -{ - public class ZoomRoomJoinMap : VideoCodecControllerJoinMap - { - #region Digital - - [JoinName("CancelJoinAttempt")] - public JoinDataComplete CancelJoinAttempt = new JoinDataComplete( - new JoinData - { - JoinNumber = 5, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Pulse to hide the password prompt", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("MeetingPasswordRequired")] - public JoinDataComplete MeetingPasswordRequired = new JoinDataComplete( - new JoinData - { - JoinNumber = 6, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "FB Indicates to show the password prompt", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("PasswordIncorrect")] - public JoinDataComplete PasswordIncorrect = new JoinDataComplete( - new JoinData - { - JoinNumber = 7, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "FB Indicates the password entered is incorrect", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("PasswordLoginFailed")] - public JoinDataComplete PasswordLoginFailed = new JoinDataComplete( - new JoinData - { - JoinNumber = 8, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "FB Indicates the password entered is incorrect", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("WaitingForHost")] - public JoinDataComplete WaitingForHost = new JoinDataComplete( - new JoinData - { - JoinNumber = 9, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "FB Indicates system is waiting for host", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("IsHost")] - public JoinDataComplete IsHost = new JoinDataComplete( - new JoinData - { - JoinNumber = 10, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "FB Indicates system is the host", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("StartMeetingNow")] - public JoinDataComplete StartMeetingNow = new JoinDataComplete( - new JoinData - { - JoinNumber = 25, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Pulse to start an ad-hoc meeting with the default duration", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("ShareOnlyMeeting")] - public JoinDataComplete ShareOnlyMeeting = new JoinDataComplete( - new JoinData - { - JoinNumber = 26, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Triggers a share only meeting, feedback indicates the current meeting is share only", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("StartNormalMeetingFromSharingOnlyMeeting")] - public JoinDataComplete StartNormalMeetingFromSharingOnlyMeeting = new JoinDataComplete( - new JoinData - { - JoinNumber = 27, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Starts a normal meeting from a share only meeting", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("CanSwapContentWithThumbnail")] - public JoinDataComplete CanSwapContentWithThumbnail = new JoinDataComplete( - new JoinData - { - JoinNumber = 206, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "FB Indicates if content can be swapped with thumbnail", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("SwapContentWithThumbnail")] - public JoinDataComplete SwapContentWithThumbnail = new JoinDataComplete( - new JoinData - { - JoinNumber = 206, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Pulse to swap content with thumbnail. FB reports current state", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("GetAvailableLayouts")] - public JoinDataComplete GetAvailableLayouts = new JoinDataComplete( - new JoinData - { - JoinNumber = 215, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Gets the available layouts. Will update the LayoutXXXXXIsAvailbale signals.", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("LayoutIsOnFirstPage")] - public JoinDataComplete LayoutIsOnFirstPage = new JoinDataComplete( - new JoinData - { - JoinNumber = 216, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Indicates if layout is on first page", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("LayoutIsOnLastPage")] - public JoinDataComplete LayoutIsOnLastPage = new JoinDataComplete( - new JoinData - { - JoinNumber = 217, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Indicates if layout is on first page", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("LayoutTurnToNextPage")] - public JoinDataComplete LayoutTurnToNextPage = new JoinDataComplete( - new JoinData - { - JoinNumber = 216, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Turns layout view to next page", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("LayoutTurnToPreviousPage")] - public JoinDataComplete LayoutTurnToPreviousPage = new JoinDataComplete( - new JoinData - { - JoinNumber = 217, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Turns layout view to previous page", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("LayoutGalleryIsAvailable")] - public JoinDataComplete LayoutGalleryIsAvailable = new JoinDataComplete( - new JoinData - { - JoinNumber = 221, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "FB Indicates if layout 'Gallery' is available", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.DigitalSerial - }); - - [JoinName("LayoutSpeakerIsAvailable")] - public JoinDataComplete LayoutSpeakerIsAvailable = new JoinDataComplete( - new JoinData - { - JoinNumber = 222, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "FB Indicates if layout 'Speaker' is available", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.DigitalSerial - }); - - [JoinName("LayoutStripIsAvailable")] - public JoinDataComplete LayoutStripIsAvailable = new JoinDataComplete( - new JoinData - { - JoinNumber = 223, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "FB Indicates if layout 'Strip' is available", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.DigitalSerial - }); - - [JoinName("LayoutShareAllIsAvailable")] - public JoinDataComplete LayoutShareAllIsAvailable = new JoinDataComplete( - new JoinData - { - JoinNumber = 224, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "FB Indicates if layout 'ShareAll' is available", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.DigitalSerial - }); - - // TODO: #714 [ ] JoinMap >> SelfivewPipSizeToggle - [JoinName("SelfviewPipSizeToggle")] - public JoinDataComplete SelfviewPipSizeToggle = new JoinDataComplete( - new JoinData - { - JoinNumber = 231, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Toggles the selfview pip size, (aka layout size)", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("StartRecording")] - public JoinDataComplete StartRecording = new JoinDataComplete( - new JoinData - { - JoinNumber = 241, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Pulse to start the Meeting Recording. FB high if meeting is currently recording", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("StopRecording")] - public JoinDataComplete StopRecording = new JoinDataComplete( - new JoinData - { - JoinNumber = 242, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Pulse to stop the Meeting Recording. FB high if meeting is currently NOT recording", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("RecordConsentPromptIsVisible")] - public JoinDataComplete RecordConsentPromptIsVisible = new JoinDataComplete( - new JoinData - { - JoinNumber = 243, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "When high, indicates that the recording consent prompt is visible on the ZoomRoom UI", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("RecordingPromptAgree")] - public JoinDataComplete RecordingPromptAgree = new JoinDataComplete( - new JoinData - { - JoinNumber = 244, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Pulse to agree to consent for meeting recording", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("RecordingPromptDisagree")] - public JoinDataComplete RecordingPromptDisagree = new JoinDataComplete( - new JoinData - { - JoinNumber = 245, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Pulse to disagree to consent for meeting recording", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("MeetingCanRecord")] - public JoinDataComplete MeetingCanRecord = new JoinDataComplete( - new JoinData - { - JoinNumber = 246, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "When high, indicated that the current meeting can be recorded", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - - #region Sharing Status - - [JoinName("IsSharingAirplay")] - public JoinDataComplete IsSharingAirplay = new JoinDataComplete( - new JoinData - { - JoinNumber = 250, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Indicates an Airplay source is sharing", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - [JoinName("IsSharingHdmi")] - public JoinDataComplete IsSharingHdmi = new JoinDataComplete( - new JoinData - { - JoinNumber = 251, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Indicates an HDMI source is sharing", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Digital - }); - - - - #endregion - //[JoinName("ParticipantAudioMuteToggleStart")] - //public JoinDataComplete ParticipantAudioMuteToggleStart = new JoinDataComplete( - // new JoinData - // { - // JoinNumber = 500, - // JoinSpan = 100 - // }, - // new JoinMetadata - // { - // Description = "Toggles the participant's audio mute status", - // JoinCapabilities = eJoinCapabilities.ToSIMPL, - // JoinType = eJoinType.Digital - // }); - - //[JoinName("ParticipantVideoMuteToggleStart")] - //public JoinDataComplete ParticipantVideoMuteToggleStart = new JoinDataComplete( - // new JoinData - // { - // JoinNumber = 800, - // JoinSpan = 100 - // }, - // new JoinMetadata - // { - // Description = "Toggles the participant's video mute status", - // JoinCapabilities = eJoinCapabilities.ToSIMPL, - // JoinType = eJoinType.Digital - // }); - - //[JoinName("ParticipantPinToggleStart")] - //public JoinDataComplete ParticipantPinToggleStart = new JoinDataComplete( - // new JoinData - // { - // JoinNumber = 1100, - // JoinSpan = 100 - // }, - // new JoinMetadata - // { - // Description = "Toggles the participant's pin status", - // JoinCapabilities = eJoinCapabilities.ToSIMPL, - // JoinType = eJoinType.Digital - // }); - - #endregion - - - #region Analog - - [JoinName("NumberOfScreens")] - public JoinDataComplete NumberOfScreens = new JoinDataComplete( - new JoinData - { - JoinNumber = 11, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Reports the number of screens connected", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Analog - }); - - [JoinName("ScreenIndexToPinUserTo")] - public JoinDataComplete ScreenIndexToPinUserTo = new JoinDataComplete( - new JoinData - { - JoinNumber = 11, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Specifies the screen index a participant should be pinned to", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Analog - }); - - #endregion - - - #region Serials - - // TODO [ ] Issue #868 - [JoinName("SubmitPassword")] - public JoinDataComplete SubmitPassword = new JoinDataComplete( - new JoinData - { - JoinNumber = 6, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Submit password text", - JoinCapabilities = eJoinCapabilities.FromSIMPL, - JoinType = eJoinType.Serial - }); - - // TODO [ ] Issue #868 - [JoinName("PasswordPromptMessage")] - public JoinDataComplete PasswordPromptMessage = new JoinDataComplete( - new JoinData - { - JoinNumber = 6, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Password prompt message", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - // TODO [ ] Issue #868 - [JoinName("MeetingInfoId")] - public JoinDataComplete MeetingInfoId = new JoinDataComplete( - new JoinData - { - JoinNumber = 11, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Meeting info ID text feedback", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - // TODO [ ] Issue #868 - [JoinName("MeetingInfoHostt")] - public JoinDataComplete MeetingInfoHost = new JoinDataComplete( - new JoinData - { - JoinNumber = 12, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Meeting info Host text feedback", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - // TODO [ ] Issue #868 - [JoinName("MeetingInfoPassword")] - public JoinDataComplete MeetingInfoPassword = new JoinDataComplete( - new JoinData - { - JoinNumber = 13, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Meeting info Password text feedback", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("GetSetCurrentLayout")] - public JoinDataComplete GetSetCurrentLayout = new JoinDataComplete( - new JoinData - { - JoinNumber = 215, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sets and reports the current layout. Use the LayoutXXXXIsAvailable signals to determine valid layouts", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Serial - }); - - // TODO: #714 [ ] JoinMap >> GetSetSelfviewPipSize - [JoinName("GetSetSelfviewPipSize")] - public JoinDataComplete GetSetSelfviewPipSize = new JoinDataComplete( - new JoinData - { - JoinNumber = 230, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sets and reports the selfview pip size, (aka layout size).", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.DigitalSerial - }); - - [JoinName("DisplayState")] - public JoinDataComplete DisplayState = new JoinDataComplete( - new JoinData - { - JoinNumber = 250, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Reports the instructions the ZoomRoom is displaying on the monitor. ", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("AirplayShareCode")] - public JoinDataComplete AirplayShareCode = new JoinDataComplete( - new JoinData - { - JoinNumber = 251, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Reports the current code for Airplay Sharing.", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("LaptopShareKey")] - public JoinDataComplete LaptopShareKey = new JoinDataComplete( - new JoinData - { - JoinNumber = 252, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "The alpha-only sharing key that users type into a laptop client to share with the Zoom Room.", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("LaptopSharePairingCode")] - public JoinDataComplete LaptopSharePairingCode = new JoinDataComplete( - new JoinData - { - JoinNumber = 253, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "This is the paring code that is broadcast via an ultrasonic signal from the ZRC. It is different than the user-supplied paring code. The ZRC uses a Zoom-proprietary method of advertizing the ultrasonic pairing code, so it\'s not possible to advertize it using commonly available libraries.", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("WifiName")] - public JoinDataComplete WifiName = new JoinDataComplete( - new JoinData - { - JoinNumber = 254, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Reports the Wifi SSID used by the ZoomRoom.", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - [JoinName("ServerName")] - public JoinDataComplete ServerName = new JoinDataComplete( - new JoinData - { - JoinNumber = 255, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Reports the namne of the the ZoomRoom.", - JoinCapabilities = eJoinCapabilities.ToSIMPL, - JoinType = eJoinType.Serial - }); - - - - #endregion - - public ZoomRoomJoinMap(uint joinStart) - : base(joinStart, typeof(ZoomRoomJoinMap)) - { - } - - public ZoomRoomJoinMap(uint joinStart, Type type) - : base(joinStart, type) - { - } - } +using System; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Bridges.JoinMaps; + +namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom +{ + public class ZoomRoomJoinMap : VideoCodecControllerJoinMap + { + #region Digital + + [JoinName("CancelJoinAttempt")] + public JoinDataComplete CancelJoinAttempt = new JoinDataComplete( + new JoinData + { + JoinNumber = 5, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Pulse to hide the password prompt", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("MeetingPasswordRequired")] + public JoinDataComplete MeetingPasswordRequired = new JoinDataComplete( + new JoinData + { + JoinNumber = 6, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "FB Indicates to show the password prompt", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("PasswordIncorrect")] + public JoinDataComplete PasswordIncorrect = new JoinDataComplete( + new JoinData + { + JoinNumber = 7, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "FB Indicates the password entered is incorrect", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("PasswordLoginFailed")] + public JoinDataComplete PasswordLoginFailed = new JoinDataComplete( + new JoinData + { + JoinNumber = 8, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "FB Indicates the password entered is incorrect", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("WaitingForHost")] + public JoinDataComplete WaitingForHost = new JoinDataComplete( + new JoinData + { + JoinNumber = 9, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "FB Indicates system is waiting for host", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("IsHost")] + public JoinDataComplete IsHost = new JoinDataComplete( + new JoinData + { + JoinNumber = 10, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "FB Indicates system is the host", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("StartMeetingNow")] + public JoinDataComplete StartMeetingNow = new JoinDataComplete( + new JoinData + { + JoinNumber = 25, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Pulse to start an ad-hoc meeting with the default duration", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("ShareOnlyMeeting")] + public JoinDataComplete ShareOnlyMeeting = new JoinDataComplete( + new JoinData + { + JoinNumber = 26, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Triggers a share only meeting, feedback indicates the current meeting is share only", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("StartNormalMeetingFromSharingOnlyMeeting")] + public JoinDataComplete StartNormalMeetingFromSharingOnlyMeeting = new JoinDataComplete( + new JoinData + { + JoinNumber = 27, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Starts a normal meeting from a share only meeting", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("CanSwapContentWithThumbnail")] + public JoinDataComplete CanSwapContentWithThumbnail = new JoinDataComplete( + new JoinData + { + JoinNumber = 206, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "FB Indicates if content can be swapped with thumbnail", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("SwapContentWithThumbnail")] + public JoinDataComplete SwapContentWithThumbnail = new JoinDataComplete( + new JoinData + { + JoinNumber = 206, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Pulse to swap content with thumbnail. FB reports current state", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("GetAvailableLayouts")] + public JoinDataComplete GetAvailableLayouts = new JoinDataComplete( + new JoinData + { + JoinNumber = 215, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Gets the available layouts. Will update the LayoutXXXXXIsAvailbale signals.", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("LayoutIsOnFirstPage")] + public JoinDataComplete LayoutIsOnFirstPage = new JoinDataComplete( + new JoinData + { + JoinNumber = 216, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Indicates if layout is on first page", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("LayoutIsOnLastPage")] + public JoinDataComplete LayoutIsOnLastPage = new JoinDataComplete( + new JoinData + { + JoinNumber = 217, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Indicates if layout is on first page", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("LayoutTurnToNextPage")] + public JoinDataComplete LayoutTurnToNextPage = new JoinDataComplete( + new JoinData + { + JoinNumber = 216, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Turns layout view to next page", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("LayoutTurnToPreviousPage")] + public JoinDataComplete LayoutTurnToPreviousPage = new JoinDataComplete( + new JoinData + { + JoinNumber = 217, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Turns layout view to previous page", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("LayoutGalleryIsAvailable")] + public JoinDataComplete LayoutGalleryIsAvailable = new JoinDataComplete( + new JoinData + { + JoinNumber = 221, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "FB Indicates if layout 'Gallery' is available", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.DigitalSerial + }); + + [JoinName("LayoutSpeakerIsAvailable")] + public JoinDataComplete LayoutSpeakerIsAvailable = new JoinDataComplete( + new JoinData + { + JoinNumber = 222, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "FB Indicates if layout 'Speaker' is available", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.DigitalSerial + }); + + [JoinName("LayoutStripIsAvailable")] + public JoinDataComplete LayoutStripIsAvailable = new JoinDataComplete( + new JoinData + { + JoinNumber = 223, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "FB Indicates if layout 'Strip' is available", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.DigitalSerial + }); + + [JoinName("LayoutShareAllIsAvailable")] + public JoinDataComplete LayoutShareAllIsAvailable = new JoinDataComplete( + new JoinData + { + JoinNumber = 224, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "FB Indicates if layout 'ShareAll' is available", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.DigitalSerial + }); + + // TODO: #714 [ ] JoinMap >> SelfivewPipSizeToggle + [JoinName("SelfviewPipSizeToggle")] + public JoinDataComplete SelfviewPipSizeToggle = new JoinDataComplete( + new JoinData + { + JoinNumber = 231, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Toggles the selfview pip size, (aka layout size)", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("StartRecording")] + public JoinDataComplete StartRecording = new JoinDataComplete( + new JoinData + { + JoinNumber = 241, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Pulse to start the Meeting Recording. FB high if meeting is currently recording", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("StopRecording")] + public JoinDataComplete StopRecording = new JoinDataComplete( + new JoinData + { + JoinNumber = 242, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Pulse to stop the Meeting Recording. FB high if meeting is currently NOT recording", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("RecordConsentPromptIsVisible")] + public JoinDataComplete RecordConsentPromptIsVisible = new JoinDataComplete( + new JoinData + { + JoinNumber = 243, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "When high, indicates that the recording consent prompt is visible on the ZoomRoom UI", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("RecordingPromptAgree")] + public JoinDataComplete RecordingPromptAgree = new JoinDataComplete( + new JoinData + { + JoinNumber = 244, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Pulse to agree to consent for meeting recording", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("RecordingPromptDisagree")] + public JoinDataComplete RecordingPromptDisagree = new JoinDataComplete( + new JoinData + { + JoinNumber = 245, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Pulse to disagree to consent for meeting recording", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("MeetingCanRecord")] + public JoinDataComplete MeetingCanRecord = new JoinDataComplete( + new JoinData + { + JoinNumber = 246, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "When high, indicated that the current meeting can be recorded", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + + #region Sharing Status + + [JoinName("IsSharingAirplay")] + public JoinDataComplete IsSharingAirplay = new JoinDataComplete( + new JoinData + { + JoinNumber = 250, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Indicates an Airplay source is sharing", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + [JoinName("IsSharingHdmi")] + public JoinDataComplete IsSharingHdmi = new JoinDataComplete( + new JoinData + { + JoinNumber = 251, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Indicates an HDMI source is sharing", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Digital + }); + + + + #endregion + //[JoinName("ParticipantAudioMuteToggleStart")] + //public JoinDataComplete ParticipantAudioMuteToggleStart = new JoinDataComplete( + // new JoinData + // { + // JoinNumber = 500, + // JoinSpan = 100 + // }, + // new JoinMetadata + // { + // Description = "Toggles the participant's audio mute status", + // JoinCapabilities = eJoinCapabilities.ToSIMPL, + // JoinType = eJoinType.Digital + // }); + + //[JoinName("ParticipantVideoMuteToggleStart")] + //public JoinDataComplete ParticipantVideoMuteToggleStart = new JoinDataComplete( + // new JoinData + // { + // JoinNumber = 800, + // JoinSpan = 100 + // }, + // new JoinMetadata + // { + // Description = "Toggles the participant's video mute status", + // JoinCapabilities = eJoinCapabilities.ToSIMPL, + // JoinType = eJoinType.Digital + // }); + + //[JoinName("ParticipantPinToggleStart")] + //public JoinDataComplete ParticipantPinToggleStart = new JoinDataComplete( + // new JoinData + // { + // JoinNumber = 1100, + // JoinSpan = 100 + // }, + // new JoinMetadata + // { + // Description = "Toggles the participant's pin status", + // JoinCapabilities = eJoinCapabilities.ToSIMPL, + // JoinType = eJoinType.Digital + // }); + + #endregion + + + #region Analog + + [JoinName("NumberOfScreens")] + public JoinDataComplete NumberOfScreens = new JoinDataComplete( + new JoinData + { + JoinNumber = 11, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Reports the number of screens connected", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Analog + }); + + [JoinName("ScreenIndexToPinUserTo")] + public JoinDataComplete ScreenIndexToPinUserTo = new JoinDataComplete( + new JoinData + { + JoinNumber = 11, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Specifies the screen index a participant should be pinned to", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Analog + }); + + #endregion + + + #region Serials + + // TODO [ ] Issue #868 + [JoinName("SubmitPassword")] + public JoinDataComplete SubmitPassword = new JoinDataComplete( + new JoinData + { + JoinNumber = 6, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Submit password text", + JoinCapabilities = eJoinCapabilities.FromSIMPL, + JoinType = eJoinType.Serial + }); + + // TODO [ ] Issue #868 + [JoinName("PasswordPromptMessage")] + public JoinDataComplete PasswordPromptMessage = new JoinDataComplete( + new JoinData + { + JoinNumber = 6, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Password prompt message", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + // TODO [ ] Issue #868 + [JoinName("MeetingInfoId")] + public JoinDataComplete MeetingInfoId = new JoinDataComplete( + new JoinData + { + JoinNumber = 11, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Meeting info ID text feedback", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + // TODO [ ] Issue #868 + [JoinName("MeetingInfoHostt")] + public JoinDataComplete MeetingInfoHost = new JoinDataComplete( + new JoinData + { + JoinNumber = 12, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Meeting info Host text feedback", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + // TODO [ ] Issue #868 + [JoinName("MeetingInfoPassword")] + public JoinDataComplete MeetingInfoPassword = new JoinDataComplete( + new JoinData + { + JoinNumber = 13, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Meeting info Password text feedback", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("GetSetCurrentLayout")] + public JoinDataComplete GetSetCurrentLayout = new JoinDataComplete( + new JoinData + { + JoinNumber = 215, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sets and reports the current layout. Use the LayoutXXXXIsAvailable signals to determine valid layouts", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Serial + }); + + // TODO: #714 [ ] JoinMap >> GetSetSelfviewPipSize + [JoinName("GetSetSelfviewPipSize")] + public JoinDataComplete GetSetSelfviewPipSize = new JoinDataComplete( + new JoinData + { + JoinNumber = 230, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sets and reports the selfview pip size, (aka layout size).", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.DigitalSerial + }); + + [JoinName("DisplayState")] + public JoinDataComplete DisplayState = new JoinDataComplete( + new JoinData + { + JoinNumber = 250, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Reports the instructions the ZoomRoom is displaying on the monitor. ", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("AirplayShareCode")] + public JoinDataComplete AirplayShareCode = new JoinDataComplete( + new JoinData + { + JoinNumber = 251, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Reports the current code for Airplay Sharing.", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("LaptopShareKey")] + public JoinDataComplete LaptopShareKey = new JoinDataComplete( + new JoinData + { + JoinNumber = 252, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "The alpha-only sharing key that users type into a laptop client to share with the Zoom Room.", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("LaptopSharePairingCode")] + public JoinDataComplete LaptopSharePairingCode = new JoinDataComplete( + new JoinData + { + JoinNumber = 253, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "This is the paring code that is broadcast via an ultrasonic signal from the ZRC. It is different than the user-supplied paring code. The ZRC uses a Zoom-proprietary method of advertizing the ultrasonic pairing code, so it\'s not possible to advertize it using commonly available libraries.", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("WifiName")] + public JoinDataComplete WifiName = new JoinDataComplete( + new JoinData + { + JoinNumber = 254, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Reports the Wifi SSID used by the ZoomRoom.", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + [JoinName("ServerName")] + public JoinDataComplete ServerName = new JoinDataComplete( + new JoinData + { + JoinNumber = 255, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Reports the namne of the the ZoomRoom.", + JoinCapabilities = eJoinCapabilities.ToSIMPL, + JoinType = eJoinType.Serial + }); + + + + #endregion + + public ZoomRoomJoinMap(uint joinStart) + : base(joinStart, typeof(ZoomRoomJoinMap)) + { + } + + public ZoomRoomJoinMap(uint joinStart, Type type) + : base(joinStart, type) + { + } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomPropertiesConfig.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/ZoomRoom/ZoomRoomPropertiesConfig.cs similarity index 93% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomPropertiesConfig.cs rename to src/PepperDash.Essentials.Devices.Common/VideoCodec/ZoomRoom/ZoomRoomPropertiesConfig.cs index 771cfe11..e0d10f75 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/ZoomRoom/ZoomRoomPropertiesConfig.cs @@ -1,44 +1,46 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; -using Crestron.SimplSharp; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using Crestron.SimplSharp; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Converters; using PepperDash.Core; using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom { public class ZoomRoomPropertiesConfig - { + { [JsonProperty("communicationMonitorProperties")] - public CommunicationMonitorConfig CommunicationMonitorProperties { get; set; } - + public CommunicationMonitorConfig CommunicationMonitorProperties { get; set; } + [JsonProperty("disablePhonebookAutoDownload")] - public bool DisablePhonebookAutoDownload { get; set; } - + public bool DisablePhonebookAutoDownload { get; set; } + [JsonProperty("supportsCameraAutoMode")] - public bool SupportsCameraAutoMode { get; set; } - + public bool SupportsCameraAutoMode { get; set; } + [JsonProperty("supportsCameraOff")] public bool SupportsCameraOff { get; set; } - //if true, the layouts will be set automatically when sharing starts/ends or a call is joined - [JsonProperty("autoDefaultLayouts")] + //if true, the layouts will be set automatically when sharing starts/ends or a call is joined + [JsonProperty("autoDefaultLayouts")] public bool AutoDefaultLayouts { get; set; } - /* This layout will be selected when Sharing starts (either from Far end or locally)*/ - [JsonProperty("defaultSharingLayout")] - [JsonConverter(typeof(StringEnumConverter))] + /* This layout will be selected when Sharing starts (either from Far end or locally)*/ + [JsonProperty("defaultSharingLayout")] + [JsonConverter(typeof(StringEnumConverter))] public zConfiguration.eLayoutStyle DefaultSharingLayout { get; set; } - //This layout will be selected when a call is connected and no content is being shared - [JsonProperty("defaultCallLayout")] - [JsonConverter(typeof(StringEnumConverter))] - public zConfiguration.eLayoutStyle DefaultCallLayout { get; set; } - - [JsonProperty("minutesBeforeMeetingStart")] + //This layout will be selected when a call is connected and no content is being shared + [JsonProperty("defaultCallLayout")] + [JsonConverter(typeof(StringEnumConverter))] + public zConfiguration.eLayoutStyle DefaultCallLayout { get; set; } + + [JsonProperty("minutesBeforeMeetingStart")] public int MinutesBeforeMeetingStart { get; set; } } } \ No newline at end of file diff --git a/PepperDashEssentials/Audio/EssentialsVolumeLevelConfig.cs b/src/PepperDash.Essentials/Audio/EssentialsVolumeLevelConfig.cs similarity index 97% rename from PepperDashEssentials/Audio/EssentialsVolumeLevelConfig.cs rename to src/PepperDash.Essentials/Audio/EssentialsVolumeLevelConfig.cs index 12108564..70fcd36f 100644 --- a/PepperDashEssentials/Audio/EssentialsVolumeLevelConfig.cs +++ b/src/PepperDash.Essentials/Audio/EssentialsVolumeLevelConfig.cs @@ -1,10 +1,12 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; using Crestron.SimplSharp; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; using PepperDash.Core; using PepperDash.Essentials.Core; diff --git a/PepperDashEssentials/ClassDiagram1.cd b/src/PepperDash.Essentials/ClassDiagram1.cd similarity index 100% rename from PepperDashEssentials/ClassDiagram1.cd rename to src/PepperDash.Essentials/ClassDiagram1.cd diff --git a/PepperDashEssentials/ControlSystem.cs b/src/PepperDash.Essentials/ControlSystem.cs similarity index 97% rename from PepperDashEssentials/ControlSystem.cs rename to src/PepperDash.Essentials/ControlSystem.cs index 736a250f..077a2b1a 100644 --- a/PepperDashEssentials/ControlSystem.cs +++ b/src/PepperDash.Essentials/ControlSystem.cs @@ -1,657 +1,659 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Crestron.SimplSharp; -using Crestron.SimplSharp.CrestronIO; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.CrestronThread; -using Crestron.SimplSharpPro.Diagnostics; -using Crestron.SimplSharp.Reflection; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Bridges; -using PepperDash.Essentials.Core.Config; -using PepperDash.Essentials.Core.Fusion; -using PepperDash.Essentials.Core.Web; -using PepperDash.Essentials.Devices.Common; -using PepperDash.Essentials.DM; -using PepperDash.Essentials.Fusion; -using PepperDash.Essentials.Room.Config; - -using Newtonsoft.Json; -using PepperDash.Essentials.Core.DeviceTypeInterfaces; - -namespace PepperDash.Essentials -{ - public class ControlSystem : CrestronControlSystem - { - HttpLogoServer LogoServer; - - private CTimer _startTimer; - private CEvent _initializeEvent; - private const long StartupTime = 500; - - public ControlSystem() - : base() - { - Thread.MaxNumberOfUserThreads = 400; - Global.ControlSystem = this; - DeviceManager.Initialize(this); - SecretsManager.Initialize(); - SystemMonitor.ProgramInitialization.ProgramInitializationUnderUserControl = true; - } - - /// - /// Entry point for the program - /// - public override void InitializeSystem() - { - _startTimer = new CTimer(StartSystem,StartupTime); - - - // If the control system is a DMPS type, we need to wait to exit this method until all devices have had time to activate - // to allow any HD-BaseT DM endpoints to register first. - if (Global.ControlSystemIsDmpsType) - { - Debug.Console(1, "******************* InitializeSystem() Entering **********************"); - - _initializeEvent = new CEvent(); - - DeviceManager.AllDevicesRegistered += (o, a) => - { - _initializeEvent.Set(); - Debug.Console(1, "******************* InitializeSystem() Exiting **********************"); - }; - - _initializeEvent.Wait(30000); - } - } - - private void StartSystem(object obj) - { - DeterminePlatform(); - - if (Debug.DoNotLoadOnNextBoot) - { - CrestronConsole.AddNewConsoleCommand(s => CrestronInvoke.BeginInvoke((o) => GoWithLoad()), "go", "Loads configuration file", - ConsoleAccessLevelEnum.AccessOperator); - } - - CrestronConsole.AddNewConsoleCommand(PluginLoader.ReportAssemblyVersions, "reportversions", "Reports the versions of the loaded assemblies", ConsoleAccessLevelEnum.AccessOperator); - - CrestronConsole.AddNewConsoleCommand(PepperDash.Essentials.Core.DeviceFactory.GetDeviceFactoryTypes, "gettypes", "Gets the device types that can be built. Accepts a filter string.", ConsoleAccessLevelEnum.AccessOperator); - - CrestronConsole.AddNewConsoleCommand(BridgeHelper.PrintJoinMap, "getjoinmap", "map(s) for bridge or device on bridge [brKey [devKey]]", ConsoleAccessLevelEnum.AccessOperator); - - CrestronConsole.AddNewConsoleCommand(BridgeHelper.JoinmapMarkdown, "getjoinmapmarkdown" - , "generate markdown of map(s) for bridge or device on bridge [brKey [devKey]]", ConsoleAccessLevelEnum.AccessOperator); - - CrestronConsole.AddNewConsoleCommand(s => Debug.Console(0, Debug.ErrorLogLevel.Notice, "CONSOLE MESSAGE: {0}", s), "appdebugmessage", "Writes message to log", ConsoleAccessLevelEnum.AccessOperator); - - CrestronConsole.AddNewConsoleCommand(s => - { - foreach (var tl in TieLineCollection.Default) - CrestronConsole.ConsoleCommandResponse(" {0}\r\n", tl); - }, - "listtielines", "Prints out all tie lines", ConsoleAccessLevelEnum.AccessOperator); - - CrestronConsole.AddNewConsoleCommand(s => - { - CrestronConsole.ConsoleCommandResponse - ("Current running configuration. This is the merged system and template configuration"); - CrestronConsole.ConsoleCommandResponse(Newtonsoft.Json.JsonConvert.SerializeObject - (ConfigReader.ConfigObject, Newtonsoft.Json.Formatting.Indented)); - }, "showconfig", "Shows the current running merged config", ConsoleAccessLevelEnum.AccessOperator); - - CrestronConsole.AddNewConsoleCommand(s => - CrestronConsole.ConsoleCommandResponse( - "This system can be found at the following URLs:\r\n" + - "System URL: {0}\r\n" + - "Template URL: {1}", - ConfigReader.ConfigObject.SystemUrl, - ConfigReader.ConfigObject.TemplateUrl), - "portalinfo", - "Shows portal URLS from configuration", - ConsoleAccessLevelEnum.AccessOperator); - - - CrestronConsole.AddNewConsoleCommand(DeviceManager.GetRoutingPorts, - "getroutingports", "Reports all routing ports, if any. Requires a device key", ConsoleAccessLevelEnum.AccessOperator); - - if (!Debug.DoNotLoadOnNextBoot) - { - GoWithLoad(); - return; - } - - SystemMonitor.ProgramInitialization.ProgramInitializationComplete = true; - } - - /// - /// Determines if the program is running on a processor (appliance) or server (VC-4). - /// - /// Sets Global.FilePathPrefix and Global.ApplicationDirectoryPathPrefix based on platform - /// - public void DeterminePlatform() - { - try - { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Determining Platform...."); - - string filePathPrefix; - - var dirSeparator = Global.DirectorySeparator; - - string directoryPrefix; - - directoryPrefix = Crestron.SimplSharp.CrestronIO.Directory.GetApplicationRootDirectory(); - - var fullVersion = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute), false); - - AssemblyInformationalVersionAttribute fullVersionAtt = fullVersion[0] as AssemblyInformationalVersionAttribute; - - Global.SetAssemblyVersion(fullVersionAtt.InformationalVersion); - - if (CrestronEnvironment.DevicePlatform != eDevicePlatform.Server) // Handles 3-series running Windows CE OS - { - string userFolder; - string nvramFolder; - bool is4series = false; - - if (eCrestronSeries.Series4 == (Global.ProcessorSeries & eCrestronSeries.Series4)) // Handle 4-series - { - is4series = true; - // Set path to user/ - userFolder = "user"; - nvramFolder = "nvram"; - } - else - { - userFolder = "User"; - nvramFolder = "Nvram"; - } - - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials v{0} on {1} Appliance", Global.AssemblyVersion, is4series ? "4-series" : "3-series"); - - // Check if User/ProgramX exists - if (Directory.Exists(Global.ApplicationDirectoryPathPrefix + dirSeparator + userFolder - + dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber))) - { - Debug.Console(0, @"{0}/program{1} directory found", userFolder, InitialParametersClass.ApplicationNumber); - filePathPrefix = directoryPrefix + dirSeparator + userFolder - + dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber) + dirSeparator; - } - // Check if Nvram/Programx exists - else if (Directory.Exists(directoryPrefix + dirSeparator + nvramFolder - + dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber))) - { - Debug.Console(0, @"{0}/program{1} directory found", nvramFolder, InitialParametersClass.ApplicationNumber); - filePathPrefix = directoryPrefix + dirSeparator + nvramFolder - + dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber) + dirSeparator; - } - // If neither exists, set path to User/ProgramX - else - { - Debug.Console(0, @"No previous directory found. Using {0}/program{1}", userFolder, InitialParametersClass.ApplicationNumber); - filePathPrefix = directoryPrefix + dirSeparator + userFolder - + dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber) + dirSeparator; - } - } - else // Handles Linux OS (Virtual Control) - { - Debug.SetDebugLevel(2); - - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials v{0} on Virtual Control Server", Global.AssemblyVersion); - - // Set path to User/ - filePathPrefix = directoryPrefix + dirSeparator + "User" + dirSeparator; - } - - Global.SetFilePathPrefix(filePathPrefix); - } - catch (Exception e) - { - Debug.Console(0, "Unable to Determine Platform due to Exception: {0}", e.Message); - } - } - - /// - /// Begins the process of loading resources including plugins and configuration data - /// - public void GoWithLoad() - { - try - { - Debug.SetDoNotLoadOnNextBoot(false); - - PluginLoader.AddProgramAssemblies(); - - new Core.DeviceFactory(); - new Devices.Common.DeviceFactory(); - new DM.DeviceFactory(); - new DeviceFactory(); - - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials load from configuration"); - - var filesReady = SetupFilesystem(); - if (filesReady) - { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Checking for plugins"); - PluginLoader.LoadPlugins(); - - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Folder structure verified. Loading config..."); - if (!ConfigReader.LoadConfig2()) - { - Debug.Console(0, Debug.ErrorLogLevel.Error, "Essentials Load complete with errors"); - return; - } - - Load(); - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Essentials load complete\r\n" + - "-------------------------------------------------------------"); - } - else - { - Debug.Console(0, - @"---------------------------------------------- - ------------------------------------------------ - ------------------------------------------------ - Essentials file structure setup completed. - Please load config, sgd and ir files and - restart program. - ------------------------------------------------ - ------------------------------------------------ - ------------------------------------------------"); - } - - } - catch (Exception e) - { - Debug.Console(0, "FATAL INITIALIZE ERROR. System is in an inconsistent state:\r\n{0}", e); - } - finally - { - // Notify the OS that the program intitialization has completed - SystemMonitor.ProgramInitialization.ProgramInitializationComplete = true; - } - - } - - - - /// - /// Verifies filesystem is set up. IR, SGD, and programX folders - /// - bool SetupFilesystem() - { - Debug.Console(0, "Verifying and/or creating folder structure"); - var configDir = Global.FilePathPrefix; - var configExists = Directory.Exists(configDir); - if (!configExists) - Directory.Create(configDir); - - var irDir = Global.FilePathPrefix + "ir"; - if (!Directory.Exists(irDir)) - Directory.Create(irDir); - - var sgdDir = Global.FilePathPrefix + "sgd"; - if (!Directory.Exists(sgdDir)) - Directory.Create(sgdDir); - - var pluginDir = Global.FilePathPrefix + "plugins"; - if (!Directory.Exists(pluginDir)) - Directory.Create(pluginDir); - - var joinmapDir = Global.FilePathPrefix + "joinmaps"; - if(!Directory.Exists(joinmapDir)) - Directory.Create(joinmapDir); - - return configExists; - } - - /// - /// - /// - public void TearDown() - { - Debug.Console(0, "Tearing down existing system"); - DeviceManager.DeactivateAll(); - - TieLineCollection.Default.Clear(); - - foreach (var key in DeviceManager.GetDevices()) - DeviceManager.RemoveDevice(key); - - Debug.Console(0, "Tear down COMPLETE"); - } - - /// - /// - /// - void Load() - { - LoadDevices(); - LoadTieLines(); - LoadRooms(); - LoadLogoServer(); - - DeviceManager.ActivateAll(); - - var mobileControl = GetMobileControlDevice(); - - if (mobileControl == null) return; - - mobileControl.LinkSystemMonitorToAppServer(); - - } - - /// - /// Reads all devices from config and adds them to DeviceManager - /// - public void LoadDevices() - { - - // Build the processor wrapper class - DeviceManager.AddDevice(new PepperDash.Essentials.Core.Devices.CrestronProcessor("processor")); - DeviceManager.AddDevice(new EssemtialsWebApi("essentialsWebApi","Essentials Web API")); - - // Add global System Monitor device - if (CrestronEnvironment.DevicePlatform == eDevicePlatform.Appliance) - { - DeviceManager.AddDevice( - new PepperDash.Essentials.Core.Monitoring.SystemMonitorController("systemMonitor")); - } - - foreach (var devConf in ConfigReader.ConfigObject.Devices) - { - - try - { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Creating device '{0}', type '{1}'", devConf.Key, devConf.Type); - // Skip this to prevent unnecessary warnings - if (devConf.Key == "processor") - { - var prompt = Global.ControlSystem.ControllerPrompt; - - var typeMatch = String.Equals(devConf.Type, prompt, StringComparison.OrdinalIgnoreCase) || - String.Equals(devConf.Type, prompt.Replace("-", ""), StringComparison.OrdinalIgnoreCase); - - if (!typeMatch) - Debug.Console(0, - "WARNING: Config file defines processor type as '{0}' but actual processor is '{1}'! Some ports may not be available", - devConf.Type.ToUpper(), Global.ControlSystem.ControllerPrompt.ToUpper()); - - // Check if the processor is a DMPS model - if (this.ControllerPrompt.IndexOf("dmps", StringComparison.OrdinalIgnoreCase) > -1) - { - Debug.Console(2, "Adding DmpsRoutingController for {0} to Device Manager.", this.ControllerPrompt); - - var propertiesConfig = JsonConvert.DeserializeObject(devConf.Properties.ToString()); - - if(propertiesConfig == null) - propertiesConfig = new DM.Config.DmpsRoutingPropertiesConfig(); - - DeviceManager.AddDevice(DmpsRoutingController.GetDmpsRoutingController("processor-avRouting", this.ControllerPrompt, propertiesConfig)); - } - else if (this.ControllerPrompt.IndexOf("mpc3", StringComparison.OrdinalIgnoreCase) > -1) - { - Debug.Console(2, "MPC3 processor type detected. Adding Mpc3TouchpanelController."); - - var butToken = devConf.Properties["buttons"]; - if (butToken != null) - { - var buttons = butToken.ToObject>(); - var tpController = new Essentials.Core.Touchpanels.Mpc3TouchpanelController(devConf.Key, devConf.Name, Global.ControlSystem, buttons); - DeviceManager.AddDevice(tpController); - } - else - { - Debug.Console(0, Debug.ErrorLogLevel.Error, "Error: Unable to deserialize buttons collection for device: {0}", devConf.Key); - } - - } - else - { - Debug.Console(2, "************Processor is not DMPS type***************"); - } - - - - continue; - } - - // Try local factories first - IKeyed newDev = null; - - if (newDev == null) - newDev = PepperDash.Essentials.Core.DeviceFactory.GetDevice(devConf); - - if (newDev != null) - DeviceManager.AddDevice(newDev); - else - Debug.Console(0, Debug.ErrorLogLevel.Error, "ERROR: Cannot load unknown device type '{0}', key '{1}'.", devConf.Type, devConf.Key); - } - catch (Exception e) - { - Debug.Console(0, Debug.ErrorLogLevel.Error, "ERROR: Creating device {0}. Skipping device. \r{1}", devConf.Key, e); - } - } - Debug.Console(0, Debug.ErrorLogLevel.Notice, "All Devices Loaded."); - - } - - - /// - /// Helper method to load tie lines. This should run after devices have loaded - /// - public void LoadTieLines() - { - // In the future, we can't necessarily just clear here because devices - // might be making their own internal sources/tie lines - - var tlc = TieLineCollection.Default; - //tlc.Clear(); - if (ConfigReader.ConfigObject.TieLines == null) - { - return; - } - - foreach (var tieLineConfig in ConfigReader.ConfigObject.TieLines) - { - var newTL = tieLineConfig.GetTieLine(); - if (newTL != null) - tlc.Add(newTL); - } - - Debug.Console(0, Debug.ErrorLogLevel.Notice, "All Tie Lines Loaded."); - - } - - /// - /// Reads all rooms from config and adds them to DeviceManager - /// - public void LoadRooms() - { - if (ConfigReader.ConfigObject.Rooms == null) - { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Notice: Configuration contains no rooms - Is this intentional? This may be a valid configuration."); - return; - } - - uint fusionIpId = 0xf1; - - foreach (var roomConfig in ConfigReader.ConfigObject.Rooms) - { - var room = EssentialsRoomConfigHelper.GetRoomObject(roomConfig) as IEssentialsRoom; - if (room != null) - { - // default to no join map key - string fusionJoinMapKey = string.Empty; - - if (room.Config.Properties["fusion"] != null) - { - Debug.Console(2, "Custom Fusion config found. Using custom values"); - - var fusionConfig = room.Config.Properties["fusion"].ToObject(); - - if (fusionConfig != null) - { - fusionIpId = fusionConfig.IpIdInt; - fusionJoinMapKey = fusionConfig.JoinMapKey; - } - } - - AddRoomAndBuildMC(room); - - if (room is IEssentialsHuddleSpaceRoom) - { - - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is EssentialsHuddleSpaceRoom, attempting to add to DeviceManager with Fusion with IP-ID {0:X2}", fusionIpId); - DeviceManager.AddDevice(new Core.Fusion.EssentialsHuddleSpaceFusionSystemControllerBase(room, fusionIpId, fusionJoinMapKey)); - - } - else if (room is IEssentialsHuddleVtc1Room) - { - - if (!(room is EssentialsCombinedHuddleVtc1Room)) - { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is EssentialsHuddleVtc1Room, attempting to add to DeviceManager with Fusion with IP-ID {0:X2}", fusionIpId); - DeviceManager.AddDevice(new EssentialsHuddleVtc1FusionController((IEssentialsHuddleVtc1Room)room, fusionIpId, fusionJoinMapKey)); - } - - } - else if (room is EssentialsTechRoom) - { - - Debug.Console(0, Debug.ErrorLogLevel.Notice, - "Room is EssentialsTechRoom, Attempting to add to DeviceManager with Fusion with IP-ID {0:X2}", fusionIpId); - DeviceManager.AddDevice(new EssentialsTechRoomFusionSystemController((EssentialsTechRoom)room, fusionIpId, fusionJoinMapKey)); - - } - fusionIpId += 1; - } - else - { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Notice: Cannot create room from config, key '{0}' - Is this intentional? This may be a valid configuration.", roomConfig.Key); - - } - } - - Debug.Console(0, Debug.ErrorLogLevel.Notice, "All Rooms Loaded."); - - } - - private static void AddRoomAndBuildMC(IEssentialsRoom room) - { - DeviceManager.AddDevice(room); - - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge"); - - CreateMobileControlBridge(room); - } - - private static void CreateMobileControlBridge(object room) - { - var mobileControl = GetMobileControlDevice(); - - if (mobileControl == null) return; - - var mobileControl3 = mobileControl as IMobileControl3; - - if (mobileControl3 != null) - { - mobileControl3.CreateMobileControlRoomBridge(room as IEssentialsRoom, mobileControl); - } - else - { - mobileControl.CreateMobileControlRoomBridge(room as EssentialsRoomBase, mobileControl); - } - - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Mobile Control Bridge Added..."); - } - - private static IMobileControl GetMobileControlDevice() - { - var mobileControlList = DeviceManager.AllDevices.OfType().ToList(); - - if (mobileControlList.Count > 1) - { - Debug.Console(0, Debug.ErrorLogLevel.Warning, - "Multiple instances of Mobile Control Server found."); - - return null; - } - - if (mobileControlList.Count > 0) - { - return mobileControlList[0]; - } - - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Mobile Control not enabled for this system"); - return null; - } - - /// - /// Fires up a logo server if not already running - /// - void LoadLogoServer() - { - if (ConfigReader.ConfigObject.Rooms == null) - { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "No rooms configured. Bypassing Logo server startup."); - return; - } - - if ( - !ConfigReader.ConfigObject.Rooms.Any( - CheckRoomConfig)) - { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "No rooms configured to use system Logo server. Bypassing Logo server startup"); - return; - } - - try - { - LogoServer = new HttpLogoServer(8080, Global.DirectorySeparator + "html" + Global.DirectorySeparator + "logo"); - } - catch (Exception) - { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "NOTICE: Logo server cannot be started. Likely already running in another program"); - } - } - - private bool CheckRoomConfig(DeviceConfig c) - { - string logoDark = null; - string logoLight = null; - string logo = null; - - try - { - if (c.Properties["logoDark"] != null) - { - logoDark = c.Properties["logoDark"].Value("type"); - } - - if (c.Properties["logoLight"] != null) - { - logoLight = c.Properties["logoLight"].Value("type"); - } - - if (c.Properties["logo"] != null) - { - logo = c.Properties["logo"].Value("type"); - } - - return ((logoDark != null && logoDark == "system") || - (logoLight != null && logoLight == "system") || (logo != null && logo == "system")); - } - catch - { - Debug.Console(1, Debug.ErrorLogLevel.Notice, "Unable to find logo information in any room config"); - return false; - } - } - } -} +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using Crestron.SimplSharp; +using Crestron.SimplSharp.CrestronIO; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.CrestronThread; +using Crestron.SimplSharpPro.Diagnostics; +using Crestron.SimplSharp.Reflection; + +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Fusion; +// using PepperDash.Essentials.Core.Web; +using PepperDash.Essentials.Devices.Common; +using PepperDash.Essentials.DM; +using PepperDash.Essentials.Fusion; +using PepperDash.Essentials.Room.Config; + +using Full.Newtonsoft.Json; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; + +namespace PepperDash.Essentials +{ + public class ControlSystem : CrestronControlSystem + { + HttpLogoServer LogoServer; + + private CTimer _startTimer; + private CEvent _initializeEvent; + private const long StartupTime = 500; + + public ControlSystem() + : base() + { + Thread.MaxNumberOfUserThreads = 400; + Global.ControlSystem = this; + DeviceManager.Initialize(this); + SecretsManager.Initialize(); + SystemMonitor.ProgramInitialization.ProgramInitializationUnderUserControl = true; + } + + /// + /// Entry point for the program + /// + public override void InitializeSystem() + { + _startTimer = new CTimer(StartSystem,StartupTime); + + + // If the control system is a DMPS type, we need to wait to exit this method until all devices have had time to activate + // to allow any HD-BaseT DM endpoints to register first. + if (Global.ControlSystemIsDmpsType) + { + Debug.Console(1, "******************* InitializeSystem() Entering **********************"); + + _initializeEvent = new CEvent(); + + DeviceManager.AllDevicesRegistered += (o, a) => + { + _initializeEvent.Set(); + Debug.Console(1, "******************* InitializeSystem() Exiting **********************"); + }; + + _initializeEvent.Wait(30000); + } + } + + private void StartSystem(object obj) + { + DeterminePlatform(); + + if (Debug.DoNotLoadOnNextBoot) + { + CrestronConsole.AddNewConsoleCommand(s => CrestronInvoke.BeginInvoke((o) => GoWithLoad()), "go", "Loads configuration file", + ConsoleAccessLevelEnum.AccessOperator); + } + + CrestronConsole.AddNewConsoleCommand(PluginLoader.ReportAssemblyVersions, "reportversions", "Reports the versions of the loaded assemblies", ConsoleAccessLevelEnum.AccessOperator); + + CrestronConsole.AddNewConsoleCommand(PepperDash.Essentials.Core.DeviceFactory.GetDeviceFactoryTypes, "gettypes", "Gets the device types that can be built. Accepts a filter string.", ConsoleAccessLevelEnum.AccessOperator); + + CrestronConsole.AddNewConsoleCommand(BridgeHelper.PrintJoinMap, "getjoinmap", "map(s) for bridge or device on bridge [brKey [devKey]]", ConsoleAccessLevelEnum.AccessOperator); + + CrestronConsole.AddNewConsoleCommand(BridgeHelper.JoinmapMarkdown, "getjoinmapmarkdown" + , "generate markdown of map(s) for bridge or device on bridge [brKey [devKey]]", ConsoleAccessLevelEnum.AccessOperator); + + CrestronConsole.AddNewConsoleCommand(s => Debug.Console(0, Debug.ErrorLogLevel.Notice, "CONSOLE MESSAGE: {0}", s), "appdebugmessage", "Writes message to log", ConsoleAccessLevelEnum.AccessOperator); + + CrestronConsole.AddNewConsoleCommand(s => + { + foreach (var tl in TieLineCollection.Default) + CrestronConsole.ConsoleCommandResponse(" {0}\r\n", tl); + }, + "listtielines", "Prints out all tie lines", ConsoleAccessLevelEnum.AccessOperator); + + CrestronConsole.AddNewConsoleCommand(s => + { + CrestronConsole.ConsoleCommandResponse + ("Current running configuration. This is the merged system and template configuration"); + CrestronConsole.ConsoleCommandResponse(Newtonsoft.Json.JsonConvert.SerializeObject + (ConfigReader.ConfigObject, Newtonsoft.Json.Formatting.Indented)); + }, "showconfig", "Shows the current running merged config", ConsoleAccessLevelEnum.AccessOperator); + + CrestronConsole.AddNewConsoleCommand(s => + CrestronConsole.ConsoleCommandResponse( + "This system can be found at the following URLs:\r\n" + + "System URL: {0}\r\n" + + "Template URL: {1}", + ConfigReader.ConfigObject.SystemUrl, + ConfigReader.ConfigObject.TemplateUrl), + "portalinfo", + "Shows portal URLS from configuration", + ConsoleAccessLevelEnum.AccessOperator); + + + CrestronConsole.AddNewConsoleCommand(DeviceManager.GetRoutingPorts, + "getroutingports", "Reports all routing ports, if any. Requires a device key", ConsoleAccessLevelEnum.AccessOperator); + + if (!Debug.DoNotLoadOnNextBoot) + { + GoWithLoad(); + return; + } + + SystemMonitor.ProgramInitialization.ProgramInitializationComplete = true; + } + + /// + /// Determines if the program is running on a processor (appliance) or server (VC-4). + /// + /// Sets Global.FilePathPrefix and Global.ApplicationDirectoryPathPrefix based on platform + /// + public void DeterminePlatform() + { + try + { + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Determining Platform...."); + + string filePathPrefix; + + var dirSeparator = Global.DirectorySeparator; + + string directoryPrefix; + + directoryPrefix = Crestron.SimplSharp.CrestronIO.Directory.GetApplicationRootDirectory(); + + var fullVersion = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute), false); + + AssemblyInformationalVersionAttribute fullVersionAtt = fullVersion[0] as AssemblyInformationalVersionAttribute; + + Global.SetAssemblyVersion(fullVersionAtt.InformationalVersion); + + if (CrestronEnvironment.DevicePlatform != eDevicePlatform.Server) // Handles 3-series running Windows CE OS + { + string userFolder; + string nvramFolder; + bool is4series = false; + + if (eCrestronSeries.Series4 == (Global.ProcessorSeries & eCrestronSeries.Series4)) // Handle 4-series + { + is4series = true; + // Set path to user/ + userFolder = "user"; + nvramFolder = "nvram"; + } + else + { + userFolder = "User"; + nvramFolder = "Nvram"; + } + + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials v{0} on {1} Appliance", Global.AssemblyVersion, is4series ? "4-series" : "3-series"); + + // Check if User/ProgramX exists + if (Directory.Exists(Global.ApplicationDirectoryPathPrefix + dirSeparator + userFolder + + dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber))) + { + Debug.Console(0, @"{0}/program{1} directory found", userFolder, InitialParametersClass.ApplicationNumber); + filePathPrefix = directoryPrefix + dirSeparator + userFolder + + dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber) + dirSeparator; + } + // Check if Nvram/Programx exists + else if (Directory.Exists(directoryPrefix + dirSeparator + nvramFolder + + dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber))) + { + Debug.Console(0, @"{0}/program{1} directory found", nvramFolder, InitialParametersClass.ApplicationNumber); + filePathPrefix = directoryPrefix + dirSeparator + nvramFolder + + dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber) + dirSeparator; + } + // If neither exists, set path to User/ProgramX + else + { + Debug.Console(0, @"No previous directory found. Using {0}/program{1}", userFolder, InitialParametersClass.ApplicationNumber); + filePathPrefix = directoryPrefix + dirSeparator + userFolder + + dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber) + dirSeparator; + } + } + else // Handles Linux OS (Virtual Control) + { + Debug.SetDebugLevel(2); + + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials v{0} on Virtual Control Server", Global.AssemblyVersion); + + // Set path to User/ + filePathPrefix = directoryPrefix + dirSeparator + "User" + dirSeparator; + } + + Global.SetFilePathPrefix(filePathPrefix); + } + catch (Exception e) + { + Debug.Console(0, "Unable to Determine Platform due to Exception: {0}", e.Message); + } + } + + /// + /// Begins the process of loading resources including plugins and configuration data + /// + public void GoWithLoad() + { + try + { + Debug.SetDoNotLoadOnNextBoot(false); + + PluginLoader.AddProgramAssemblies(); + + new Core.DeviceFactory(); + new Devices.Common.DeviceFactory(); + new DM.DeviceFactory(); + new DeviceFactory(); + + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials load from configuration"); + + var filesReady = SetupFilesystem(); + if (filesReady) + { + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Checking for plugins"); + PluginLoader.LoadPlugins(); + + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Folder structure verified. Loading config..."); + if (!ConfigReader.LoadConfig2()) + { + Debug.Console(0, Debug.ErrorLogLevel.Error, "Essentials Load complete with errors"); + return; + } + + Load(); + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Essentials load complete\r\n" + + "-------------------------------------------------------------"); + } + else + { + Debug.Console(0, + @"---------------------------------------------- + ------------------------------------------------ + ------------------------------------------------ + Essentials file structure setup completed. + Please load config, sgd and ir files and + restart program. + ------------------------------------------------ + ------------------------------------------------ + ------------------------------------------------"); + } + + } + catch (Exception e) + { + Debug.Console(0, "FATAL INITIALIZE ERROR. System is in an inconsistent state:\r\n{0}", e); + } + finally + { + // Notify the OS that the program intitialization has completed + SystemMonitor.ProgramInitialization.ProgramInitializationComplete = true; + } + + } + + + + /// + /// Verifies filesystem is set up. IR, SGD, and programX folders + /// + bool SetupFilesystem() + { + Debug.Console(0, "Verifying and/or creating folder structure"); + var configDir = Global.FilePathPrefix; + var configExists = Directory.Exists(configDir); + if (!configExists) + Directory.Create(configDir); + + var irDir = Global.FilePathPrefix + "ir"; + if (!Directory.Exists(irDir)) + Directory.Create(irDir); + + var sgdDir = Global.FilePathPrefix + "sgd"; + if (!Directory.Exists(sgdDir)) + Directory.Create(sgdDir); + + var pluginDir = Global.FilePathPrefix + "plugins"; + if (!Directory.Exists(pluginDir)) + Directory.Create(pluginDir); + + var joinmapDir = Global.FilePathPrefix + "joinmaps"; + if(!Directory.Exists(joinmapDir)) + Directory.Create(joinmapDir); + + return configExists; + } + + /// + /// + /// + public void TearDown() + { + Debug.Console(0, "Tearing down existing system"); + DeviceManager.DeactivateAll(); + + TieLineCollection.Default.Clear(); + + foreach (var key in DeviceManager.GetDevices()) + DeviceManager.RemoveDevice(key); + + Debug.Console(0, "Tear down COMPLETE"); + } + + /// + /// + /// + void Load() + { + LoadDevices(); + LoadTieLines(); + LoadRooms(); + LoadLogoServer(); + + DeviceManager.ActivateAll(); + + var mobileControl = GetMobileControlDevice(); + + if (mobileControl == null) return; + + mobileControl.LinkSystemMonitorToAppServer(); + + } + + /// + /// Reads all devices from config and adds them to DeviceManager + /// + public void LoadDevices() + { + + // Build the processor wrapper class + DeviceManager.AddDevice(new PepperDash.Essentials.Core.Devices.CrestronProcessor("processor")); + // DeviceManager.AddDevice(new EssemtialsWebApi("essentialsWebApi","Essentials Web API")); + + // Add global System Monitor device + if (CrestronEnvironment.DevicePlatform == eDevicePlatform.Appliance) + { + DeviceManager.AddDevice( + new PepperDash.Essentials.Core.Monitoring.SystemMonitorController("systemMonitor")); + } + + foreach (var devConf in ConfigReader.ConfigObject.Devices) + { + + try + { + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Creating device '{0}', type '{1}'", devConf.Key, devConf.Type); + // Skip this to prevent unnecessary warnings + if (devConf.Key == "processor") + { + var prompt = Global.ControlSystem.ControllerPrompt; + + var typeMatch = String.Equals(devConf.Type, prompt, StringComparison.OrdinalIgnoreCase) || + String.Equals(devConf.Type, prompt.Replace("-", ""), StringComparison.OrdinalIgnoreCase); + + if (!typeMatch) + Debug.Console(0, + "WARNING: Config file defines processor type as '{0}' but actual processor is '{1}'! Some ports may not be available", + devConf.Type.ToUpper(), Global.ControlSystem.ControllerPrompt.ToUpper()); + + // Check if the processor is a DMPS model + if (this.ControllerPrompt.IndexOf("dmps", StringComparison.OrdinalIgnoreCase) > -1) + { + Debug.Console(2, "Adding DmpsRoutingController for {0} to Device Manager.", this.ControllerPrompt); + + var propertiesConfig = JsonConvert.DeserializeObject(devConf.Properties.ToString()); + + if(propertiesConfig == null) + propertiesConfig = new DM.Config.DmpsRoutingPropertiesConfig(); + + DeviceManager.AddDevice(DmpsRoutingController.GetDmpsRoutingController("processor-avRouting", this.ControllerPrompt, propertiesConfig)); + } + else if (this.ControllerPrompt.IndexOf("mpc3", StringComparison.OrdinalIgnoreCase) > -1) + { + Debug.Console(2, "MPC3 processor type detected. Adding Mpc3TouchpanelController."); + + var butToken = devConf.Properties["buttons"]; + if (butToken != null) + { + var buttons = butToken.ToObject>(); + var tpController = new Essentials.Core.Touchpanels.Mpc3TouchpanelController(devConf.Key, devConf.Name, Global.ControlSystem, buttons); + DeviceManager.AddDevice(tpController); + } + else + { + Debug.Console(0, Debug.ErrorLogLevel.Error, "Error: Unable to deserialize buttons collection for device: {0}", devConf.Key); + } + + } + else + { + Debug.Console(2, "************Processor is not DMPS type***************"); + } + + + + continue; + } + + // Try local factories first + IKeyed newDev = null; + + if (newDev == null) + newDev = PepperDash.Essentials.Core.DeviceFactory.GetDevice(devConf); + + if (newDev != null) + DeviceManager.AddDevice(newDev); + else + Debug.Console(0, Debug.ErrorLogLevel.Error, "ERROR: Cannot load unknown device type '{0}', key '{1}'.", devConf.Type, devConf.Key); + } + catch (Exception e) + { + Debug.Console(0, Debug.ErrorLogLevel.Error, "ERROR: Creating device {0}. Skipping device. \r{1}", devConf.Key, e); + } + } + Debug.Console(0, Debug.ErrorLogLevel.Notice, "All Devices Loaded."); + + } + + + /// + /// Helper method to load tie lines. This should run after devices have loaded + /// + public void LoadTieLines() + { + // In the future, we can't necessarily just clear here because devices + // might be making their own internal sources/tie lines + + var tlc = TieLineCollection.Default; + //tlc.Clear(); + if (ConfigReader.ConfigObject.TieLines == null) + { + return; + } + + foreach (var tieLineConfig in ConfigReader.ConfigObject.TieLines) + { + var newTL = tieLineConfig.GetTieLine(); + if (newTL != null) + tlc.Add(newTL); + } + + Debug.Console(0, Debug.ErrorLogLevel.Notice, "All Tie Lines Loaded."); + + } + + /// + /// Reads all rooms from config and adds them to DeviceManager + /// + public void LoadRooms() + { + if (ConfigReader.ConfigObject.Rooms == null) + { + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Notice: Configuration contains no rooms - Is this intentional? This may be a valid configuration."); + return; + } + + uint fusionIpId = 0xf1; + + foreach (var roomConfig in ConfigReader.ConfigObject.Rooms) + { + var room = EssentialsRoomConfigHelper.GetRoomObject(roomConfig) as IEssentialsRoom; + if (room != null) + { + // default to no join map key + string fusionJoinMapKey = string.Empty; + + if (room.Config.Properties["fusion"] != null) + { + Debug.Console(2, "Custom Fusion config found. Using custom values"); + + var fusionConfig = room.Config.Properties["fusion"].ToObject(); + + if (fusionConfig != null) + { + fusionIpId = fusionConfig.IpIdInt; + fusionJoinMapKey = fusionConfig.JoinMapKey; + } + } + + AddRoomAndBuildMC(room); + + if (room is IEssentialsHuddleSpaceRoom) + { + + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is EssentialsHuddleSpaceRoom, attempting to add to DeviceManager with Fusion with IP-ID {0:X2}", fusionIpId); + DeviceManager.AddDevice(new Core.Fusion.EssentialsHuddleSpaceFusionSystemControllerBase(room, fusionIpId, fusionJoinMapKey)); + + } + else if (room is IEssentialsHuddleVtc1Room) + { + + if (!(room is EssentialsCombinedHuddleVtc1Room)) + { + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is EssentialsHuddleVtc1Room, attempting to add to DeviceManager with Fusion with IP-ID {0:X2}", fusionIpId); + DeviceManager.AddDevice(new EssentialsHuddleVtc1FusionController((IEssentialsHuddleVtc1Room)room, fusionIpId, fusionJoinMapKey)); + } + + } + else if (room is EssentialsTechRoom) + { + + Debug.Console(0, Debug.ErrorLogLevel.Notice, + "Room is EssentialsTechRoom, Attempting to add to DeviceManager with Fusion with IP-ID {0:X2}", fusionIpId); + DeviceManager.AddDevice(new EssentialsTechRoomFusionSystemController((EssentialsTechRoom)room, fusionIpId, fusionJoinMapKey)); + + } + fusionIpId += 1; + } + else + { + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Notice: Cannot create room from config, key '{0}' - Is this intentional? This may be a valid configuration.", roomConfig.Key); + + } + } + + Debug.Console(0, Debug.ErrorLogLevel.Notice, "All Rooms Loaded."); + + } + + private static void AddRoomAndBuildMC(IEssentialsRoom room) + { + DeviceManager.AddDevice(room); + + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge"); + + CreateMobileControlBridge(room); + } + + private static void CreateMobileControlBridge(object room) + { + var mobileControl = GetMobileControlDevice(); + + if (mobileControl == null) return; + + var mobileControl3 = mobileControl as IMobileControl3; + + if (mobileControl3 != null) + { + mobileControl3.CreateMobileControlRoomBridge(room as IEssentialsRoom, mobileControl); + } + else + { + mobileControl.CreateMobileControlRoomBridge(room as EssentialsRoomBase, mobileControl); + } + + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Mobile Control Bridge Added..."); + } + + private static IMobileControl GetMobileControlDevice() + { + var mobileControlList = DeviceManager.AllDevices.OfType().ToList(); + + if (mobileControlList.Count > 1) + { + Debug.Console(0, Debug.ErrorLogLevel.Warning, + "Multiple instances of Mobile Control Server found."); + + return null; + } + + if (mobileControlList.Count > 0) + { + return mobileControlList[0]; + } + + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Mobile Control not enabled for this system"); + return null; + } + + /// + /// Fires up a logo server if not already running + /// + void LoadLogoServer() + { + if (ConfigReader.ConfigObject.Rooms == null) + { + Debug.Console(0, Debug.ErrorLogLevel.Notice, "No rooms configured. Bypassing Logo server startup."); + return; + } + + if ( + !ConfigReader.ConfigObject.Rooms.Any( + CheckRoomConfig)) + { + Debug.Console(0, Debug.ErrorLogLevel.Notice, "No rooms configured to use system Logo server. Bypassing Logo server startup"); + return; + } + + try + { + LogoServer = new HttpLogoServer(8080, Global.DirectorySeparator + "html" + Global.DirectorySeparator + "logo"); + } + catch (Exception) + { + Debug.Console(0, Debug.ErrorLogLevel.Notice, "NOTICE: Logo server cannot be started. Likely already running in another program"); + } + } + + private bool CheckRoomConfig(DeviceConfig c) + { + string logoDark = null; + string logoLight = null; + string logo = null; + + try + { + if (c.Properties["logoDark"] != null) + { + logoDark = c.Properties["logoDark"].Value("type"); + } + + if (c.Properties["logoLight"] != null) + { + logoLight = c.Properties["logoLight"].Value("type"); + } + + if (c.Properties["logo"] != null) + { + logo = c.Properties["logo"].Value("type"); + } + + return ((logoDark != null && logoDark == "system") || + (logoLight != null && logoLight == "system") || (logo != null && logo == "system")); + } + catch + { + Debug.Console(1, Debug.ErrorLogLevel.Notice, "Unable to find logo information in any room config"); + return false; + } + } + } +} diff --git a/PepperDashEssentials/Devices/Amplifier.cs b/src/PepperDash.Essentials/Devices/Amplifier.cs similarity index 100% rename from PepperDashEssentials/Devices/Amplifier.cs rename to src/PepperDash.Essentials/Devices/Amplifier.cs diff --git a/PepperDashEssentials/Example Configuration/EssentialsHuddleSpaceRoom/configurationFile-HuddleSpace-2-Source.json b/src/PepperDash.Essentials/Example Configuration/EssentialsHuddleSpaceRoom/configurationFile-HuddleSpace-2-Source.json similarity index 100% rename from PepperDashEssentials/Example Configuration/EssentialsHuddleSpaceRoom/configurationFile-HuddleSpace-2-Source.json rename to src/PepperDash.Essentials/Example Configuration/EssentialsHuddleSpaceRoom/configurationFile-HuddleSpace-2-Source.json diff --git a/PepperDashEssentials/Example Configuration/EssentialsHuddleVtc1Room/configurationFile-mockVideoCodec_din-ap3_-_dm4x1.json b/src/PepperDash.Essentials/Example Configuration/EssentialsHuddleVtc1Room/configurationFile-mockVideoCodec_din-ap3_-_dm4x1.json similarity index 100% rename from PepperDashEssentials/Example Configuration/EssentialsHuddleVtc1Room/configurationFile-mockVideoCodec_din-ap3_-_dm4x1.json rename to src/PepperDash.Essentials/Example Configuration/EssentialsHuddleVtc1Room/configurationFile-mockVideoCodec_din-ap3_-_dm4x1.json diff --git a/PepperDashEssentials/Example Configuration/SIMPLBridging/SIMPLBridgeExample_configurationFile.json b/src/PepperDash.Essentials/Example Configuration/SIMPLBridging/SIMPLBridgeExample_configurationFile.json similarity index 100% rename from PepperDashEssentials/Example Configuration/SIMPLBridging/SIMPLBridgeExample_configurationFile.json rename to src/PepperDash.Essentials/Example Configuration/SIMPLBridging/SIMPLBridgeExample_configurationFile.json diff --git a/PepperDashEssentials/Example Configuration/SIMPLBridging/configurationFile-dmps3300c-avRouting.json b/src/PepperDash.Essentials/Example Configuration/SIMPLBridging/configurationFile-dmps3300c-avRouting.json similarity index 100% rename from PepperDashEssentials/Example Configuration/SIMPLBridging/configurationFile-dmps3300c-avRouting.json rename to src/PepperDash.Essentials/Example Configuration/SIMPLBridging/configurationFile-dmps3300c-avRouting.json diff --git a/PepperDashEssentials/Factory/DeviceFactory.cs b/src/PepperDash.Essentials/Factory/DeviceFactory.cs similarity index 92% rename from PepperDashEssentials/Factory/DeviceFactory.cs rename to src/PepperDash.Essentials/Factory/DeviceFactory.cs index 98c2dd13..418fb603 100644 --- a/PepperDashEssentials/Factory/DeviceFactory.cs +++ b/src/PepperDash.Essentials/Factory/DeviceFactory.cs @@ -1,47 +1,49 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Crestron.SimplSharp; -using Crestron.SimplSharp.CrestronIO; -using Crestron.SimplSharpPro; -using Crestron.SimplSharp.Reflection; - -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; - -namespace PepperDash.Essentials -{ - /// - /// Responsible for loading all of the device types for this library - /// - public class DeviceFactory - { - - public DeviceFactory() - { - var assy = Assembly.GetExecutingAssembly(); - PluginLoader.SetEssentialsAssembly(assy.GetName().Name, assy); - - var types = assy.GetTypes().Where(ct => typeof(IDeviceFactory).IsAssignableFrom(ct) && !ct.IsInterface && !ct.IsAbstract); - - if (types != null) - { - foreach (var type in types) - { - try - { - var factory = (IDeviceFactory)Crestron.SimplSharp.Reflection.Activator.CreateInstance(type); - factory.LoadTypeFactories(); - } - catch (Exception e) - { - Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to load type: '{1}' DeviceFactory: {0}", e, type.Name); - } - } - } - } - } -} +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using Crestron.SimplSharp; +using Crestron.SimplSharp.CrestronIO; +using Crestron.SimplSharpPro; +using Crestron.SimplSharp.Reflection; + +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Config; + +namespace PepperDash.Essentials +{ + /// + /// Responsible for loading all of the device types for this library + /// + public class DeviceFactory + { + + public DeviceFactory() + { + var assy = Assembly.GetExecutingAssembly(); + PluginLoader.SetEssentialsAssembly(assy.GetName().Name, assy); + + var types = assy.GetTypes().Where(ct => typeof(IDeviceFactory).IsAssignableFrom(ct) && !ct.IsInterface && !ct.IsAbstract); + + if (types != null) + { + foreach (var type in types) + { + try + { + var factory = (IDeviceFactory)Crestron.SimplSharp.Reflection.Activator.CreateInstance(type); + factory.LoadTypeFactories(); + } + catch (Exception e) + { + Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to load type: '{1}' DeviceFactory: {0}", e, type.Name); + } + } + } + } + } +} diff --git a/PepperDashEssentials/Fusion/EssentialsHuddleVtc1FusionController.cs b/src/PepperDash.Essentials/Fusion/EssentialsHuddleVtc1FusionController.cs similarity index 97% rename from PepperDashEssentials/Fusion/EssentialsHuddleVtc1FusionController.cs rename to src/PepperDash.Essentials/Fusion/EssentialsHuddleVtc1FusionController.cs index c3877706..5ee5a893 100644 --- a/PepperDashEssentials/Fusion/EssentialsHuddleVtc1FusionController.cs +++ b/src/PepperDash.Essentials/Fusion/EssentialsHuddleVtc1FusionController.cs @@ -1,358 +1,358 @@ -using System; -using System.Linq; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.Fusion; - - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; -using PepperDash.Essentials.Core.Fusion; - -namespace PepperDash.Essentials.Fusion -{ - public class EssentialsHuddleVtc1FusionController : EssentialsHuddleSpaceFusionSystemControllerBase - { - BooleanSigData CodecIsInCall; - - public EssentialsHuddleVtc1FusionController(IEssentialsHuddleVtc1Room room, uint ipId, string joinMapKey) - : base(room, ipId, joinMapKey) - { - - } - - /// - /// Called in base class constructor before RVI and GUID files are built - /// - protected override void ExecuteCustomSteps() - { - SetUpCodec(); - } - - /// - /// Creates a static asset for the codec and maps the joins to the main room symbol - /// - void SetUpCodec() - { - try - { - var codec = (Room as IEssentialsHuddleVtc1Room).VideoCodec; - - if (codec == null) - { - Debug.Console(1, this, "Cannot link codec to Fusion because codec is null"); - return; - } - - codec.UsageTracker = new UsageTracking(codec); - codec.UsageTracker.UsageIsTracked = true; - codec.UsageTracker.DeviceUsageEnded += UsageTracker_DeviceUsageEnded; - - var codecPowerOnAction = new Action(b => { if (!b) codec.StandbyDeactivate(); }); - var codecPowerOffAction = new Action(b => { if (!b) codec.StandbyActivate(); }); - - // Map FusionRoom Attributes: - - // Codec volume - var codecVolume = FusionRoom.CreateOffsetUshortSig(JoinMap.VolumeFader1.JoinNumber, JoinMap.VolumeFader1.AttributeName, eSigIoMask.InputOutputSig); - codecVolume.OutputSig.UserObject = new Action(b => (codec as IBasicVolumeWithFeedback).SetVolume(b)); - (codec as IBasicVolumeWithFeedback).VolumeLevelFeedback.LinkInputSig(codecVolume.InputSig); - - // In Call Status - CodecIsInCall = FusionRoom.CreateOffsetBoolSig(JoinMap.VcCodecInCall.JoinNumber, JoinMap.VcCodecInCall.AttributeName, eSigIoMask.InputSigOnly); - codec.CallStatusChange += new EventHandler(codec_CallStatusChange); - - // Online status - if (codec is ICommunicationMonitor) - { - var c = codec as ICommunicationMonitor; - var codecOnline = FusionRoom.CreateOffsetBoolSig(JoinMap.VcCodecOnline.JoinNumber, JoinMap.VcCodecOnline.AttributeName, eSigIoMask.InputSigOnly); - codecOnline.InputSig.BoolValue = c.CommunicationMonitor.Status == MonitorStatus.IsOk; - c.CommunicationMonitor.StatusChange += (o, a) => - { - codecOnline.InputSig.BoolValue = a.Status == MonitorStatus.IsOk; - }; - Debug.Console(0, this, "Linking '{0}' communication monitor to Fusion '{1}'", codec.Key, JoinMap.VcCodecOnline.AttributeName); - } - - // Codec IP Address - bool codecHasIpInfo = false; - var codecComm = codec.Communication; - - string codecIpAddress = string.Empty; - int codecIpPort = 0; - - StringSigData codecIpAddressSig; - StringSigData codecIpPortSig; - - if(codecComm is GenericSshClient) - { - codecIpAddress = (codecComm as GenericSshClient).Hostname; - codecIpPort = (codecComm as GenericSshClient).Port; - codecHasIpInfo = true; - } - else if (codecComm is GenericTcpIpClient) - { - codecIpAddress = (codecComm as GenericTcpIpClient).Hostname; - codecIpPort = (codecComm as GenericTcpIpClient).Port; - codecHasIpInfo = true; - } - - if (codecHasIpInfo) - { - codecIpAddressSig = FusionRoom.CreateOffsetStringSig(JoinMap.VcCodecIpAddress.JoinNumber, JoinMap.VcCodecIpAddress.AttributeName, eSigIoMask.InputSigOnly); - codecIpAddressSig.InputSig.StringValue = codecIpAddress; - - codecIpPortSig = FusionRoom.CreateOffsetStringSig(JoinMap.VcCodecIpPort.JoinNumber, JoinMap.VcCodecIpPort.AttributeName, eSigIoMask.InputSigOnly); - codecIpPortSig.InputSig.StringValue = codecIpPort.ToString(); - } - - var tempAsset = new FusionAsset(); - - var deviceConfig = ConfigReader.ConfigObject.Devices.FirstOrDefault(c => c.Key.Equals(codec.Key)); - - if (FusionStaticAssets.ContainsKey(deviceConfig.Uid)) - { - tempAsset = FusionStaticAssets[deviceConfig.Uid]; - } - else - { - // Create a new asset - tempAsset = new FusionAsset(FusionRoomGuids.GetNextAvailableAssetNumber(FusionRoom), codec.Name, "Codec", ""); - FusionStaticAssets.Add(deviceConfig.Uid, tempAsset); - } - - var codecAsset = FusionRoom.CreateStaticAsset(tempAsset.SlotNumber, tempAsset.Name, "Codec", tempAsset.InstanceId); - codecAsset.PowerOn.OutputSig.UserObject = codecPowerOnAction; - codecAsset.PowerOff.OutputSig.UserObject = codecPowerOffAction; - codec.StandbyIsOnFeedback.LinkComplementInputSig(codecAsset.PowerOn.InputSig); - - // TODO: Map relevant attributes on asset symbol - - codecAsset.TrySetMakeModel(codec); - codecAsset.TryLinkAssetErrorToCommunication(codec); - } - catch (Exception 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) - { - var codec = (Room as IEssentialsHuddleVtc1Room).VideoCodec; - - CodecIsInCall.InputSig.BoolValue = codec.IsInCall; - } - - // These methods are overridden because they access the room class which is of a different type - - protected override void CreateSymbolAndBasicSigs(uint 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.ExtenderRoomViewSchedulingDataReservedSigs.Use(); - FusionRoom.ExtenderFusionRoomDataReservedSigs.Use(); - - FusionRoom.Register(); - - FusionRoom.FusionStateChange += FusionRoom_FusionStateChange; - - FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.DeviceExtenderSigChange += FusionRoomSchedule_DeviceExtenderSigChange; - FusionRoom.ExtenderFusionRoomDataReservedSigs.DeviceExtenderSigChange += ExtenderFusionRoomDataReservedSigs_DeviceExtenderSigChange; - FusionRoom.OnlineStatusChange += FusionRoom_OnlineStatusChange; - - 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(CreateAdHocMeeting, "FusCreateMeeting", "Creates and Ad Hoc meeting for on hour or until the next meeting", ConsoleAccessLevelEnum.AccessOperator); - - // Room to fusion room - Room.OnFeedback.LinkInputSig(FusionRoom.SystemPowerOn.InputSig); - - // Moved to - 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. - (Room as IEssentialsHuddleVtc1Room).CurrentSourceChange += Room_CurrentSourceInfoChange; - - - FusionRoom.SystemPowerOn.OutputSig.SetSigFalseAction((Room as IEssentialsHuddleVtc1Room).PowerOnToDefaultOrLastSource); - FusionRoom.SystemPowerOff.OutputSig.SetSigFalseAction(() => (Room as IEssentialsHuddleVtc1Room).RunRouteAction("roomOff", Room.SourceListKey)); - - - CrestronEnvironment.EthernetEventHandler += CrestronEnvironment_EthernetEventHandler; - } - - protected override void SetUpSources() - { - // Sources - var dict = ConfigReader.ConfigObject.GetSourceListForKey((Room as IEssentialsHuddleVtc1Room).SourceListKey); - if (dict != null) - { - // NEW PROCESS: - // Make these lists and insert the fusion attributes by iterating these - var setTopBoxes = dict.Where(d => d.Value.SourceDevice is ISetTopBoxControls); - uint i = 1; - foreach (var kvp in setTopBoxes) - { - TryAddRouteActionSigs(JoinMap.Display1DiscPlayerSourceStart.AttributeName + " " + i, JoinMap.Display1DiscPlayerSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice); - i++; - if (i > JoinMap.Display1SetTopBoxSourceStart.JoinSpan) // We only have five spots - break; - } - - var discPlayers = dict.Where(d => d.Value.SourceDevice is IDiscPlayerControls); - i = 1; - foreach (var kvp in discPlayers) - { - TryAddRouteActionSigs(JoinMap.Display1DiscPlayerSourceStart.AttributeName + " " + i, JoinMap.Display1DiscPlayerSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice); - i++; - if (i > 5) // We only have five spots - break; - } - - var laptops = dict.Where(d => d.Value.SourceDevice is Core.Devices.Laptop); - i = 1; - foreach (var kvp in laptops) - { - TryAddRouteActionSigs(JoinMap.Display1LaptopSourceStart.AttributeName + " " + i, JoinMap.Display1LaptopSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice); - i++; - if (i > JoinMap.Display1LaptopSourceStart.JoinSpan) // We only have ten spots??? - break; - } - - foreach (var kvp in dict) - { - var usageDevice = kvp.Value.SourceDevice as IUsageTracking; - - if (usageDevice != null) - { - usageDevice.UsageTracker = new UsageTracking(usageDevice as Device); - usageDevice.UsageTracker.UsageIsTracked = true; - usageDevice.UsageTracker.DeviceUsageEnded += new EventHandler(UsageTracker_DeviceUsageEnded); - } - } - - } - else - { - Debug.Console(1, this, "WARNING: Config source list '{0}' not found for room '{1}'", - (Room as IEssentialsHuddleVtc1Room).SourceListKey, Room.Key); - } - } - - protected override void SetUpDisplay() - { - try - { - //Setup Display Usage Monitoring - - var displays = DeviceManager.AllDevices.Where(d => d is DisplayBase); - - // Consider updating this in multiple display systems - - foreach (DisplayBase display in displays) - { - display.UsageTracker = new UsageTracking(display); - display.UsageTracker.UsageIsTracked = true; - display.UsageTracker.DeviceUsageEnded += new EventHandler(UsageTracker_DeviceUsageEnded); - } - - var defaultDisplay = (Room as IEssentialsHuddleVtc1Room).DefaultDisplay as DisplayBase; - if (defaultDisplay == null) - { - Debug.Console(1, this, "Cannot link null display to Fusion because default display is null"); - return; - } - - var dispPowerOnAction = new Action(b => { if (!b) defaultDisplay.PowerOn(); }); - var dispPowerOffAction = new Action(b => { if (!b) defaultDisplay.PowerOff(); }); - - // Display to fusion room sigs - FusionRoom.DisplayPowerOn.OutputSig.UserObject = dispPowerOnAction; - FusionRoom.DisplayPowerOff.OutputSig.UserObject = dispPowerOffAction; - - var defaultDisplayTwoWay = defaultDisplay as IHasPowerControlWithFeedback; - if (defaultDisplayTwoWay != null) - { - defaultDisplayTwoWay.PowerIsOnFeedback.LinkInputSig(FusionRoom.DisplayPowerOn.InputSig); - } - - if (defaultDisplay is IDisplayUsage) - (defaultDisplay as IDisplayUsage).LampHours.LinkInputSig(FusionRoom.DisplayUsage.InputSig); - - MapDisplayToRoomJoins(1, JoinMap.Display1Start.JoinNumber, defaultDisplay); - - var deviceConfig = ConfigReader.ConfigObject.Devices.FirstOrDefault(d => d.Key.Equals(defaultDisplay.Key)); - - //Check for existing asset in GUIDs collection - - var tempAsset = new FusionAsset(); - - if (FusionStaticAssets.ContainsKey(deviceConfig.Uid)) - { - tempAsset = FusionStaticAssets[deviceConfig.Uid]; - } - else - { - // Create a new asset - tempAsset = new FusionAsset(FusionRoomGuids.GetNextAvailableAssetNumber(FusionRoom), defaultDisplay.Name, "Display", ""); - FusionStaticAssets.Add(deviceConfig.Uid, tempAsset); - } - - var dispAsset = FusionRoom.CreateStaticAsset(tempAsset.SlotNumber, tempAsset.Name, "Display", tempAsset.InstanceId); - dispAsset.PowerOn.OutputSig.UserObject = dispPowerOnAction; - dispAsset.PowerOff.OutputSig.UserObject = dispPowerOffAction; - - - var defaultTwoWayDisplay = defaultDisplay as IHasPowerControlWithFeedback; - if (defaultTwoWayDisplay != null) - { - defaultTwoWayDisplay.PowerIsOnFeedback.LinkInputSig(FusionRoom.DisplayPowerOn.InputSig); - if (defaultDisplay is IDisplayUsage) - (defaultDisplay as IDisplayUsage).LampHours.LinkInputSig(FusionRoom.DisplayUsage.InputSig); - - defaultTwoWayDisplay.PowerIsOnFeedback.LinkInputSig(dispAsset.PowerOn.InputSig); - } - - // Use extension methods - dispAsset.TrySetMakeModel(defaultDisplay); - dispAsset.TryLinkAssetErrorToCommunication(defaultDisplay); - } - catch (Exception e) - { - Debug.Console(1, this, "Error setting up display in Fusion: {0}", e); - } - - } - - protected override void MapDisplayToRoomJoins(int displayIndex, uint joinOffset, DisplayBase display) - { - string displayName = string.Format("Display {0} - ", displayIndex); - - - if (display == (Room as IEssentialsHuddleVtc1Room).DefaultDisplay) - { - // Power on - var defaultDisplayPowerOn = FusionRoom.CreateOffsetBoolSig((uint)joinOffset, displayName + "Power On", eSigIoMask.InputOutputSig); - defaultDisplayPowerOn.OutputSig.UserObject = new Action(b => { if (!b) display.PowerOn(); }); - - // Power Off - var defaultDisplayPowerOff = FusionRoom.CreateOffsetBoolSig((uint)joinOffset + 1, displayName + "Power Off", eSigIoMask.InputOutputSig); - defaultDisplayPowerOn.OutputSig.UserObject = new Action(b => { if (!b) display.PowerOff(); }); ; - - var displayTwoWay = display as IHasPowerControlWithFeedback; - if (displayTwoWay != null) - { - displayTwoWay.PowerIsOnFeedback.LinkInputSig(defaultDisplayPowerOn.InputSig); - displayTwoWay.PowerIsOnFeedback.LinkInputSig(defaultDisplayPowerOn.InputSig); - } - - // Current Source - var defaultDisplaySourceNone = FusionRoom.CreateOffsetBoolSig((uint)joinOffset + 8, displayName + "Source None", eSigIoMask.InputOutputSig); - defaultDisplaySourceNone.OutputSig.UserObject = new Action(b => { if (!b) (Room as IEssentialsHuddleVtc1Room).RunRouteAction("roomOff", Room.SourceListKey); }); ; - } - } - } +using System; +using System.Linq; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.Fusion; + + +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Fusion; + +namespace PepperDash.Essentials.Fusion +{ + public class EssentialsHuddleVtc1FusionController : EssentialsHuddleSpaceFusionSystemControllerBase + { + BooleanSigData CodecIsInCall; + + public EssentialsHuddleVtc1FusionController(IEssentialsHuddleVtc1Room room, uint ipId, string joinMapKey) + : base(room, ipId, joinMapKey) + { + + } + + /// + /// Called in base class constructor before RVI and GUID files are built + /// + protected override void ExecuteCustomSteps() + { + SetUpCodec(); + } + + /// + /// Creates a static asset for the codec and maps the joins to the main room symbol + /// + void SetUpCodec() + { + try + { + var codec = (Room as IEssentialsHuddleVtc1Room).VideoCodec; + + if (codec == null) + { + Debug.Console(1, this, "Cannot link codec to Fusion because codec is null"); + return; + } + + codec.UsageTracker = new UsageTracking(codec); + codec.UsageTracker.UsageIsTracked = true; + codec.UsageTracker.DeviceUsageEnded += UsageTracker_DeviceUsageEnded; + + var codecPowerOnAction = new Action(b => { if (!b) codec.StandbyDeactivate(); }); + var codecPowerOffAction = new Action(b => { if (!b) codec.StandbyActivate(); }); + + // Map FusionRoom Attributes: + + // Codec volume + var codecVolume = FusionRoom.CreateOffsetUshortSig(JoinMap.VolumeFader1.JoinNumber, JoinMap.VolumeFader1.AttributeName, eSigIoMask.InputOutputSig); + codecVolume.OutputSig.UserObject = new Action(b => (codec as IBasicVolumeWithFeedback).SetVolume(b)); + (codec as IBasicVolumeWithFeedback).VolumeLevelFeedback.LinkInputSig(codecVolume.InputSig); + + // In Call Status + CodecIsInCall = FusionRoom.CreateOffsetBoolSig(JoinMap.VcCodecInCall.JoinNumber, JoinMap.VcCodecInCall.AttributeName, eSigIoMask.InputSigOnly); + codec.CallStatusChange += new EventHandler(codec_CallStatusChange); + + // Online status + if (codec is ICommunicationMonitor) + { + var c = codec as ICommunicationMonitor; + var codecOnline = FusionRoom.CreateOffsetBoolSig(JoinMap.VcCodecOnline.JoinNumber, JoinMap.VcCodecOnline.AttributeName, eSigIoMask.InputSigOnly); + codecOnline.InputSig.BoolValue = c.CommunicationMonitor.Status == MonitorStatus.IsOk; + c.CommunicationMonitor.StatusChange += (o, a) => + { + codecOnline.InputSig.BoolValue = a.Status == MonitorStatus.IsOk; + }; + Debug.Console(0, this, "Linking '{0}' communication monitor to Fusion '{1}'", codec.Key, JoinMap.VcCodecOnline.AttributeName); + } + + // Codec IP Address + bool codecHasIpInfo = false; + var codecComm = codec.Communication; + + string codecIpAddress = string.Empty; + int codecIpPort = 0; + + StringSigData codecIpAddressSig; + StringSigData codecIpPortSig; + + if(codecComm is GenericSshClient) + { + codecIpAddress = (codecComm as GenericSshClient).Hostname; + codecIpPort = (codecComm as GenericSshClient).Port; + codecHasIpInfo = true; + } + else if (codecComm is GenericTcpIpClient) + { + codecIpAddress = (codecComm as GenericTcpIpClient).Hostname; + codecIpPort = (codecComm as GenericTcpIpClient).Port; + codecHasIpInfo = true; + } + + if (codecHasIpInfo) + { + codecIpAddressSig = FusionRoom.CreateOffsetStringSig(JoinMap.VcCodecIpAddress.JoinNumber, JoinMap.VcCodecIpAddress.AttributeName, eSigIoMask.InputSigOnly); + codecIpAddressSig.InputSig.StringValue = codecIpAddress; + + codecIpPortSig = FusionRoom.CreateOffsetStringSig(JoinMap.VcCodecIpPort.JoinNumber, JoinMap.VcCodecIpPort.AttributeName, eSigIoMask.InputSigOnly); + codecIpPortSig.InputSig.StringValue = codecIpPort.ToString(); + } + + var tempAsset = new FusionAsset(); + + var deviceConfig = ConfigReader.ConfigObject.Devices.FirstOrDefault(c => c.Key.Equals(codec.Key)); + + if (FusionStaticAssets.ContainsKey(deviceConfig.Uid)) + { + tempAsset = FusionStaticAssets[deviceConfig.Uid]; + } + else + { + // Create a new asset + tempAsset = new FusionAsset(FusionRoomGuids.GetNextAvailableAssetNumber(FusionRoom), codec.Name, "Codec", ""); + FusionStaticAssets.Add(deviceConfig.Uid, tempAsset); + } + + var codecAsset = FusionRoom.CreateStaticAsset(tempAsset.SlotNumber, tempAsset.Name, "Codec", tempAsset.InstanceId); + codecAsset.PowerOn.OutputSig.UserObject = codecPowerOnAction; + codecAsset.PowerOff.OutputSig.UserObject = codecPowerOffAction; + codec.StandbyIsOnFeedback.LinkComplementInputSig(codecAsset.PowerOn.InputSig); + + // TODO: Map relevant attributes on asset symbol + + codecAsset.TrySetMakeModel(codec); + codecAsset.TryLinkAssetErrorToCommunication(codec); + } + catch (Exception 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) + { + var codec = (Room as IEssentialsHuddleVtc1Room).VideoCodec; + + CodecIsInCall.InputSig.BoolValue = codec.IsInCall; + } + + // These methods are overridden because they access the room class which is of a different type + + protected override void CreateSymbolAndBasicSigs(uint 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.ExtenderRoomViewSchedulingDataReservedSigs.Use(); + FusionRoom.ExtenderFusionRoomDataReservedSigs.Use(); + + FusionRoom.Register(); + + FusionRoom.FusionStateChange += FusionRoom_FusionStateChange; + + FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.DeviceExtenderSigChange += FusionRoomSchedule_DeviceExtenderSigChange; + FusionRoom.ExtenderFusionRoomDataReservedSigs.DeviceExtenderSigChange += ExtenderFusionRoomDataReservedSigs_DeviceExtenderSigChange; + FusionRoom.OnlineStatusChange += FusionRoom_OnlineStatusChange; + + 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(CreateAdHocMeeting, "FusCreateMeeting", "Creates and Ad Hoc meeting for on hour or until the next meeting", ConsoleAccessLevelEnum.AccessOperator); + + // Room to fusion room + Room.OnFeedback.LinkInputSig(FusionRoom.SystemPowerOn.InputSig); + + // Moved to + 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. + (Room as IEssentialsHuddleVtc1Room).CurrentSourceChange += Room_CurrentSourceInfoChange; + + + FusionRoom.SystemPowerOn.OutputSig.SetSigFalseAction((Room as IEssentialsHuddleVtc1Room).PowerOnToDefaultOrLastSource); + FusionRoom.SystemPowerOff.OutputSig.SetSigFalseAction(() => (Room as IEssentialsHuddleVtc1Room).RunRouteAction("roomOff", Room.SourceListKey)); + + + CrestronEnvironment.EthernetEventHandler += CrestronEnvironment_EthernetEventHandler; + } + + protected override void SetUpSources() + { + // Sources + var dict = ConfigReader.ConfigObject.GetSourceListForKey((Room as IEssentialsHuddleVtc1Room).SourceListKey); + if (dict != null) + { + // NEW PROCESS: + // Make these lists and insert the fusion attributes by iterating these + var setTopBoxes = dict.Where(d => d.Value.SourceDevice is ISetTopBoxControls); + uint i = 1; + foreach (var kvp in setTopBoxes) + { + TryAddRouteActionSigs(JoinMap.Display1DiscPlayerSourceStart.AttributeName + " " + i, JoinMap.Display1DiscPlayerSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice); + i++; + if (i > JoinMap.Display1SetTopBoxSourceStart.JoinSpan) // We only have five spots + break; + } + + var discPlayers = dict.Where(d => d.Value.SourceDevice is IDiscPlayerControls); + i = 1; + foreach (var kvp in discPlayers) + { + TryAddRouteActionSigs(JoinMap.Display1DiscPlayerSourceStart.AttributeName + " " + i, JoinMap.Display1DiscPlayerSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice); + i++; + if (i > 5) // We only have five spots + break; + } + + var laptops = dict.Where(d => d.Value.SourceDevice is Core.Devices.Laptop); + i = 1; + foreach (var kvp in laptops) + { + TryAddRouteActionSigs(JoinMap.Display1LaptopSourceStart.AttributeName + " " + i, JoinMap.Display1LaptopSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice); + i++; + if (i > JoinMap.Display1LaptopSourceStart.JoinSpan) // We only have ten spots??? + break; + } + + foreach (var kvp in dict) + { + var usageDevice = kvp.Value.SourceDevice as IUsageTracking; + + if (usageDevice != null) + { + usageDevice.UsageTracker = new UsageTracking(usageDevice as Device); + usageDevice.UsageTracker.UsageIsTracked = true; + usageDevice.UsageTracker.DeviceUsageEnded += new EventHandler(UsageTracker_DeviceUsageEnded); + } + } + + } + else + { + Debug.Console(1, this, "WARNING: Config source list '{0}' not found for room '{1}'", + (Room as IEssentialsHuddleVtc1Room).SourceListKey, Room.Key); + } + } + + protected override void SetUpDisplay() + { + try + { + //Setup Display Usage Monitoring + + var displays = DeviceManager.AllDevices.Where(d => d is DisplayBase); + + // Consider updating this in multiple display systems + + foreach (DisplayBase display in displays) + { + display.UsageTracker = new UsageTracking(display); + display.UsageTracker.UsageIsTracked = true; + display.UsageTracker.DeviceUsageEnded += new EventHandler(UsageTracker_DeviceUsageEnded); + } + + var defaultDisplay = (Room as IEssentialsHuddleVtc1Room).DefaultDisplay as DisplayBase; + if (defaultDisplay == null) + { + Debug.Console(1, this, "Cannot link null display to Fusion because default display is null"); + return; + } + + var dispPowerOnAction = new Action(b => { if (!b) defaultDisplay.PowerOn(); }); + var dispPowerOffAction = new Action(b => { if (!b) defaultDisplay.PowerOff(); }); + + // Display to fusion room sigs + FusionRoom.DisplayPowerOn.OutputSig.UserObject = dispPowerOnAction; + FusionRoom.DisplayPowerOff.OutputSig.UserObject = dispPowerOffAction; + + var defaultDisplayTwoWay = defaultDisplay as IHasPowerControlWithFeedback; + if (defaultDisplayTwoWay != null) + { + defaultDisplayTwoWay.PowerIsOnFeedback.LinkInputSig(FusionRoom.DisplayPowerOn.InputSig); + } + + if (defaultDisplay is IDisplayUsage) + (defaultDisplay as IDisplayUsage).LampHours.LinkInputSig(FusionRoom.DisplayUsage.InputSig); + + MapDisplayToRoomJoins(1, JoinMap.Display1Start.JoinNumber, defaultDisplay); + + var deviceConfig = ConfigReader.ConfigObject.Devices.FirstOrDefault(d => d.Key.Equals(defaultDisplay.Key)); + + //Check for existing asset in GUIDs collection + + var tempAsset = new FusionAsset(); + + if (FusionStaticAssets.ContainsKey(deviceConfig.Uid)) + { + tempAsset = FusionStaticAssets[deviceConfig.Uid]; + } + else + { + // Create a new asset + tempAsset = new FusionAsset(FusionRoomGuids.GetNextAvailableAssetNumber(FusionRoom), defaultDisplay.Name, "Display", ""); + FusionStaticAssets.Add(deviceConfig.Uid, tempAsset); + } + + var dispAsset = FusionRoom.CreateStaticAsset(tempAsset.SlotNumber, tempAsset.Name, "Display", tempAsset.InstanceId); + dispAsset.PowerOn.OutputSig.UserObject = dispPowerOnAction; + dispAsset.PowerOff.OutputSig.UserObject = dispPowerOffAction; + + + var defaultTwoWayDisplay = defaultDisplay as IHasPowerControlWithFeedback; + if (defaultTwoWayDisplay != null) + { + defaultTwoWayDisplay.PowerIsOnFeedback.LinkInputSig(FusionRoom.DisplayPowerOn.InputSig); + if (defaultDisplay is IDisplayUsage) + (defaultDisplay as IDisplayUsage).LampHours.LinkInputSig(FusionRoom.DisplayUsage.InputSig); + + defaultTwoWayDisplay.PowerIsOnFeedback.LinkInputSig(dispAsset.PowerOn.InputSig); + } + + // Use extension methods + dispAsset.TrySetMakeModel(defaultDisplay); + dispAsset.TryLinkAssetErrorToCommunication(defaultDisplay); + } + catch (Exception e) + { + Debug.Console(1, this, "Error setting up display in Fusion: {0}", e); + } + + } + + protected override void MapDisplayToRoomJoins(int displayIndex, uint joinOffset, DisplayBase display) + { + string displayName = string.Format("Display {0} - ", displayIndex); + + + if (display == (Room as IEssentialsHuddleVtc1Room).DefaultDisplay) + { + // Power on + var defaultDisplayPowerOn = FusionRoom.CreateOffsetBoolSig((uint)joinOffset, displayName + "Power On", eSigIoMask.InputOutputSig); + defaultDisplayPowerOn.OutputSig.UserObject = new Action(b => { if (!b) display.PowerOn(); }); + + // Power Off + var defaultDisplayPowerOff = FusionRoom.CreateOffsetBoolSig((uint)joinOffset + 1, displayName + "Power Off", eSigIoMask.InputOutputSig); + defaultDisplayPowerOn.OutputSig.UserObject = new Action(b => { if (!b) display.PowerOff(); }); ; + + var displayTwoWay = display as IHasPowerControlWithFeedback; + if (displayTwoWay != null) + { + displayTwoWay.PowerIsOnFeedback.LinkInputSig(defaultDisplayPowerOn.InputSig); + displayTwoWay.PowerIsOnFeedback.LinkInputSig(defaultDisplayPowerOn.InputSig); + } + + // Current Source + var defaultDisplaySourceNone = FusionRoom.CreateOffsetBoolSig((uint)joinOffset + 8, displayName + "Source None", eSigIoMask.InputOutputSig); + defaultDisplaySourceNone.OutputSig.UserObject = new Action(b => { if (!b) (Room as IEssentialsHuddleVtc1Room).RunRouteAction("roomOff", Room.SourceListKey); }); ; + } + } + } } \ No newline at end of file diff --git a/PepperDashEssentials/Fusion/EssentialsTechRoomFusionSystemController.cs b/src/PepperDash.Essentials/Fusion/EssentialsTechRoomFusionSystemController.cs similarity index 100% rename from PepperDashEssentials/Fusion/EssentialsTechRoomFusionSystemController.cs rename to src/PepperDash.Essentials/Fusion/EssentialsTechRoomFusionSystemController.cs diff --git a/src/PepperDash.Essentials/PepperDash.Essentials.csproj b/src/PepperDash.Essentials/PepperDash.Essentials.csproj new file mode 100644 index 00000000..9d1cd4c2 --- /dev/null +++ b/src/PepperDash.Essentials/PepperDash.Essentials.csproj @@ -0,0 +1,60 @@ + + + Program + + + PepperDash.Essentials + PepperDash.Essentials + net472 + false + bin\$(Configuration)\ + PepperDash Essentials + PepperDashEssentials + + + full + + + pdbonly + + + + + + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + + + + Full + + + + + + + + + \ No newline at end of file diff --git a/PepperDashEssentials/Properties/ControlSystem.cfg b/src/PepperDash.Essentials/Properties/ControlSystem.cfg similarity index 97% rename from PepperDashEssentials/Properties/ControlSystem.cfg rename to src/PepperDash.Essentials/Properties/ControlSystem.cfg index 384bf949..63f26150 100644 --- a/PepperDashEssentials/Properties/ControlSystem.cfg +++ b/src/PepperDash.Essentials/Properties/ControlSystem.cfg @@ -1,7 +1,7 @@ - - - Test RMC3 -
auto 192.168.1.40;username crestron
- Program01 - Internal Flash + + + Test RMC3 +
auto 192.168.1.40;username crestron
+ Program01 + Internal Flash
\ No newline at end of file diff --git a/PepperDashEssentials/Properties/UpdateAssemblyVersion.ps1 b/src/PepperDash.Essentials/Properties/UpdateAssemblyVersion.ps1 similarity index 100% rename from PepperDashEssentials/Properties/UpdateAssemblyVersion.ps1 rename to src/PepperDash.Essentials/Properties/UpdateAssemblyVersion.ps1 diff --git a/PepperDashEssentials/Room/Config/EssentialsDualDisplayRoomPropertiesConfig.cs b/src/PepperDash.Essentials/Room/Config/EssentialsDualDisplayRoomPropertiesConfig.cs similarity index 80% rename from PepperDashEssentials/Room/Config/EssentialsDualDisplayRoomPropertiesConfig.cs rename to src/PepperDash.Essentials/Room/Config/EssentialsDualDisplayRoomPropertiesConfig.cs index 949e1212..d048b2b4 100644 --- a/PepperDashEssentials/Room/Config/EssentialsDualDisplayRoomPropertiesConfig.cs +++ b/src/PepperDash.Essentials/Room/Config/EssentialsDualDisplayRoomPropertiesConfig.cs @@ -1,10 +1,12 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.Room.Config { diff --git a/PepperDashEssentials/Room/Config/EssentialsHuddleRoomPropertiesConfig.cs b/src/PepperDash.Essentials/Room/Config/EssentialsHuddleRoomPropertiesConfig.cs similarity index 88% rename from PepperDashEssentials/Room/Config/EssentialsHuddleRoomPropertiesConfig.cs rename to src/PepperDash.Essentials/Room/Config/EssentialsHuddleRoomPropertiesConfig.cs index 528436d6..47ffa0b3 100644 --- a/PepperDashEssentials/Room/Config/EssentialsHuddleRoomPropertiesConfig.cs +++ b/src/PepperDash.Essentials/Room/Config/EssentialsHuddleRoomPropertiesConfig.cs @@ -1,12 +1,14 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Converters; +using Full.Newtonsoft.Json.Linq; namespace PepperDash.Essentials.Room.Config { diff --git a/PepperDashEssentials/Room/Config/EssentialsHuddleVtc1PropertiesConfig.cs b/src/PepperDash.Essentials/Room/Config/EssentialsHuddleVtc1PropertiesConfig.cs similarity index 84% rename from PepperDashEssentials/Room/Config/EssentialsHuddleVtc1PropertiesConfig.cs rename to src/PepperDash.Essentials/Room/Config/EssentialsHuddleVtc1PropertiesConfig.cs index 5ce13bfa..0eb5e594 100644 --- a/PepperDashEssentials/Room/Config/EssentialsHuddleVtc1PropertiesConfig.cs +++ b/src/PepperDash.Essentials/Room/Config/EssentialsHuddleVtc1PropertiesConfig.cs @@ -1,9 +1,11 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.Room.Config { diff --git a/PepperDashEssentials/Room/Config/EssentialsNDisplayRoomPropertiesConfig.cs b/src/PepperDash.Essentials/Room/Config/EssentialsNDisplayRoomPropertiesConfig.cs similarity index 93% rename from PepperDashEssentials/Room/Config/EssentialsNDisplayRoomPropertiesConfig.cs rename to src/PepperDash.Essentials/Room/Config/EssentialsNDisplayRoomPropertiesConfig.cs index bb6623aa..22eccc24 100644 --- a/PepperDashEssentials/Room/Config/EssentialsNDisplayRoomPropertiesConfig.cs +++ b/src/PepperDash.Essentials/Room/Config/EssentialsNDisplayRoomPropertiesConfig.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -7,7 +9,7 @@ using Crestron.SimplSharp; using PepperDash.Core; using PepperDash.Essentials.Core; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.Room.Config { diff --git a/PepperDashEssentials/Room/Config/EssentialsPresentationPropertiesConfig.cs b/src/PepperDash.Essentials/Room/Config/EssentialsPresentationPropertiesConfig.cs similarity index 100% rename from PepperDashEssentials/Room/Config/EssentialsPresentationPropertiesConfig.cs rename to src/PepperDash.Essentials/Room/Config/EssentialsPresentationPropertiesConfig.cs diff --git a/PepperDashEssentials/Room/Config/EssentialsRoomConfig.cs b/src/PepperDash.Essentials/Room/Config/EssentialsRoomConfig.cs similarity index 96% rename from PepperDashEssentials/Room/Config/EssentialsRoomConfig.cs rename to src/PepperDash.Essentials/Room/Config/EssentialsRoomConfig.cs index 38067528..7d095e6f 100644 --- a/PepperDashEssentials/Room/Config/EssentialsRoomConfig.cs +++ b/src/PepperDash.Essentials/Room/Config/EssentialsRoomConfig.cs @@ -1,411 +1,413 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Crestron.SimplSharp; -using Newtonsoft.Json; - -using PepperDash.Core; -using PepperDash.Essentials; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; - -namespace PepperDash.Essentials.Room.Config -{ - public class EssentialsRoomConfigHelper - { - /// - /// Returns a room object from this config data - /// - /// - public static IKeyed GetRoomObject(DeviceConfig roomConfig) - { - var typeName = roomConfig.Type.ToLower(); - - switch (typeName) - { - case "huddle" : - { - return new EssentialsHuddleSpaceRoom(roomConfig); - } - case "huddlevtc1" : - { - return new EssentialsHuddleVtc1Room(roomConfig); - } - case "ddvc01bridge" : - { - return new Device(roomConfig.Key, roomConfig.Name); // placeholder device that does nothing. - } - case "dualdisplay" : - { - return new EssentialsDualDisplayRoom(roomConfig); - } - case "combinedhuddlevtc1" : - { - return new EssentialsCombinedHuddleVtc1Room(roomConfig); - } - case "techroom" : - { - return new EssentialsTechRoom(roomConfig); - } - default : - { - return Core.DeviceFactory.GetDevice(roomConfig); - } - } - } - - /// - /// Gets and operating, standalone emergegncy object that can be plugged into a room. - /// Returns null if there is no emergency defined - /// - public static EssentialsRoomEmergencyBase GetEmergency(EssentialsRoomPropertiesConfig props, IEssentialsRoom room) - { - // This emergency - var emergency = props.Emergency; - if (emergency != null) - { - //switch on emergency type here. Right now only contact and shutdown - var e = new EssentialsRoomEmergencyContactClosure(room.Key + "-emergency", props.Emergency, room); - DeviceManager.AddDevice(e); - } - return null; - } - - /// - /// - /// - /// - /// - /// - public static Core.Privacy.MicrophonePrivacyController GetMicrophonePrivacy( - EssentialsRoomPropertiesConfig props, IPrivacy room) - { - var microphonePrivacy = props.MicrophonePrivacy; - if (microphonePrivacy == null) - { - Debug.Console(0, "Cannot create microphone privacy with null properties"); - return null; - } - // Get the MicrophonePrivacy device from the device manager - var mP = (DeviceManager.GetDeviceForKey(props.MicrophonePrivacy.DeviceKey) as - Core.Privacy.MicrophonePrivacyController); - // Set this room as the IPrivacy device - if (mP == null) - { - Debug.Console(0, "ERROR: Selected device {0} is not MicrophonePrivacyController", props.MicrophonePrivacy.DeviceKey); - return null; - } - mP.SetPrivacyDevice(room); - - var behaviour = props.MicrophonePrivacy.Behaviour.ToLower(); - - if (behaviour == null) - { - Debug.Console(0, "WARNING: No behaviour defined for MicrophonePrivacyController"); - return null; - } - if (behaviour == "trackroomstate") - { - // Tie LED enable to room power state - var essRoom = room as IEssentialsRoom; - essRoom.OnFeedback.OutputChange += (o, a) => - { - if (essRoom.OnFeedback.BoolValue) - mP.EnableLeds = true; - else - mP.EnableLeds = false; - }; - - mP.EnableLeds = essRoom.OnFeedback.BoolValue; - } - else if (behaviour == "trackcallstate") - { - // Tie LED enable to room power state - var inCallRoom = room as IHasInCallFeedback; - inCallRoom.InCallFeedback.OutputChange += (o, a) => - { - if (inCallRoom.InCallFeedback.BoolValue) - mP.EnableLeds = true; - else - mP.EnableLeds = false; - }; - - mP.EnableLeds = inCallRoom.InCallFeedback.BoolValue; - } - - return mP; - } - - } - - /// - /// - /// - public class EssentialsRoomPropertiesConfig - { - [JsonProperty("addresses")] - public EssentialsRoomAddressPropertiesConfig Addresses { get; set; } - - [JsonProperty("description")] - public string Description { get; set; } - - [JsonProperty("emergency")] - public EssentialsRoomEmergencyConfig Emergency { get; set; } - - [JsonProperty("help")] - public EssentialsHelpPropertiesConfig Help { get; set; } - - [JsonProperty("helpMessage")] - public string HelpMessage { get; set; } - - /// - /// Read this value to get the help message. It checks for the old and new config format. - /// - public string HelpMessageForDisplay - { - get - { - if(Help != null && !string.IsNullOrEmpty(Help.Message)) - { - return Help.Message; - } - else - { - return HelpMessage; - } - } - } - - [JsonProperty("environment")] - public EssentialsEnvironmentPropertiesConfig Environment { get; set; } - - [JsonProperty("logo")] - public EssentialsLogoPropertiesConfig LogoLight { get; set; } - - [JsonProperty("logoDark")] - public EssentialsLogoPropertiesConfig LogoDark { get; set; } - - [JsonProperty("microphonePrivacy")] - public EssentialsRoomMicrophonePrivacyConfig MicrophonePrivacy { get; set; } - - [JsonProperty("occupancy")] - public EssentialsRoomOccSensorConfig Occupancy { get; set; } - - [JsonProperty("oneButtonMeeting")] - public EssentialsOneButtonMeetingPropertiesConfig OneButtonMeeting { get; set; } - - [JsonProperty("shutdownVacancySeconds")] - public int ShutdownVacancySeconds { get; set; } - - [JsonProperty("shutdownPromptSeconds")] - public int ShutdownPromptSeconds { get; set; } - - [JsonProperty("tech")] - public EssentialsRoomTechConfig Tech { get; set; } - - [JsonProperty("volumes")] - public EssentialsRoomVolumesConfig Volumes { get; set; } - - [JsonProperty("fusion")] - public EssentialsRoomFusionConfig Fusion { get; set; } - - [JsonProperty("essentialsRoomUiBehaviorConfig", NullValueHandling=NullValueHandling.Ignore)] - public EssentialsRoomUiBehaviorConfig UiBehavior { get; set; } - - [JsonProperty("zeroVolumeWhenSwtichingVolumeDevices")] - public bool ZeroVolumeWhenSwtichingVolumeDevices { get; set; } - - /// - /// Indicates if this room represents a combination of other rooms - /// - [JsonProperty("isRoomCombinationScenario")] - public bool IsRoomCombinationScenario { get; set; } - - public EssentialsRoomPropertiesConfig() - { - LogoLight = new EssentialsLogoPropertiesConfig(); - LogoDark = new EssentialsLogoPropertiesConfig(); - } - } - - public class EssentialsRoomUiBehaviorConfig - { - [JsonProperty("disableActivityButtonsWhileWarmingCooling")] - public bool DisableActivityButtonsWhileWarmingCooling { get; set; } - } - - public class EssentialsAvRoomPropertiesConfig : EssentialsRoomPropertiesConfig - { - [JsonProperty("defaultAudioKey")] - public string DefaultAudioKey { get; set; } - [JsonProperty("sourceListKey")] - public string SourceListKey { get; set; } - [JsonProperty("destinationListKey")] - public string DestinationListKey { get; set; } - [JsonProperty("defaultSourceItem")] - public string DefaultSourceItem { get; set; } - /// - /// Indicates if the room supports advanced sharing - /// - [JsonProperty("supportsAdvancedSharing")] - public bool SupportsAdvancedSharing { get; set; } - /// - /// Indicates if non-tech users can change the share mode - /// - [JsonProperty("userCanChangeShareMode")] - public bool UserCanChangeShareMode { get; set; } - } - - public class EssentialsConferenceRoomPropertiesConfig : EssentialsAvRoomPropertiesConfig - { - [JsonProperty("videoCodecKey")] - public string VideoCodecKey { get; set; } - [JsonProperty("audioCodecKey")] - public string AudioCodecKey { get; set; } - } - - public class EssentialsEnvironmentPropertiesConfig - { - public bool Enabled { get; set; } - - [JsonProperty("deviceKeys")] - public List DeviceKeys { get; set; } - - public EssentialsEnvironmentPropertiesConfig() - { - DeviceKeys = new List(); - } - - } - - public class EssentialsRoomFusionConfig - { - public uint IpIdInt - { - get - { - try - { - return Convert.ToUInt32(IpId, 16); - } - catch (Exception) - { - throw new FormatException(string.Format("ERROR:Unable to convert IP ID: {0} to hex. Error:\n{1}", IpId)); - } - - } - } - - [JsonProperty("ipId")] - public string IpId { get; set; } - - [JsonProperty("joinMapKey")] - public string JoinMapKey { get; set; } - - } - - public class EssentialsRoomMicrophonePrivacyConfig - { - [JsonProperty("deviceKey")] - public string DeviceKey { get; set; } - - [JsonProperty("behaviour")] - public string Behaviour { get; set; } - } - - /// - /// Properties for the help text box - /// - public class EssentialsHelpPropertiesConfig - { - [JsonProperty("message")] - public string Message { get; set; } - - [JsonProperty("showCallButton")] - public bool ShowCallButton { get; set; } - - /// - /// Defaults to "Call Help Desk" - /// - [JsonProperty("callButtonText")] - public string CallButtonText { get; set; } - - public EssentialsHelpPropertiesConfig() - { - CallButtonText = "Call Help Desk"; - } - } - - /// - /// - /// - public class EssentialsOneButtonMeetingPropertiesConfig - { - [JsonProperty("enable")] - public bool Enable { get; set; } - } - - public class EssentialsRoomAddressPropertiesConfig - { - [JsonProperty("phoneNumber")] - public string PhoneNumber { get; set; } - - [JsonProperty("sipAddress")] - public string SipAddress { get; set; } - } - - - /// - /// Properties for the room's logo on panels - /// - public class EssentialsLogoPropertiesConfig - { - [JsonProperty("type")] - public string Type { get; set; } - - [JsonProperty("url")] - public string Url { get; set; } - /// - /// Gets either the custom URL, a local-to-processor URL, or null if it's a default logo - /// - public string GetLogoUrlLight() - { - if (Type == "url") - return Url; - if (Type == "system") - return string.Format("http://{0}:8080/logo.png", - CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0)); - return null; - } - - public string GetLogoUrlDark() - { - if (Type == "url") - return Url; - if (Type == "system") - return string.Format("http://{0}:8080/logo-dark.png", - CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0)); - return null; - } - } - - /// - /// Represents occupancy sensor(s) setup for a room - /// - public class EssentialsRoomOccSensorConfig - { - [JsonProperty("deviceKey")] - public string DeviceKey { get; set; } - - [JsonProperty("timeoutMinutes")] - public int TimeoutMinutes { get; set; } - } - - public class EssentialsRoomTechConfig - { - [JsonProperty("password")] - public string Password { get; set; } - } +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using Crestron.SimplSharp; +using Full.Newtonsoft.Json; + +using PepperDash.Core; +using PepperDash.Essentials; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Config; + +namespace PepperDash.Essentials.Room.Config +{ + public class EssentialsRoomConfigHelper + { + /// + /// Returns a room object from this config data + /// + /// + public static IKeyed GetRoomObject(DeviceConfig roomConfig) + { + var typeName = roomConfig.Type.ToLower(); + + switch (typeName) + { + case "huddle" : + { + return new EssentialsHuddleSpaceRoom(roomConfig); + } + case "huddlevtc1" : + { + return new EssentialsHuddleVtc1Room(roomConfig); + } + case "ddvc01bridge" : + { + return new Device(roomConfig.Key, roomConfig.Name); // placeholder device that does nothing. + } + case "dualdisplay" : + { + return new EssentialsDualDisplayRoom(roomConfig); + } + case "combinedhuddlevtc1" : + { + return new EssentialsCombinedHuddleVtc1Room(roomConfig); + } + case "techroom" : + { + return new EssentialsTechRoom(roomConfig); + } + default : + { + return Core.DeviceFactory.GetDevice(roomConfig); + } + } + } + + /// + /// Gets and operating, standalone emergegncy object that can be plugged into a room. + /// Returns null if there is no emergency defined + /// + public static EssentialsRoomEmergencyBase GetEmergency(EssentialsRoomPropertiesConfig props, IEssentialsRoom room) + { + // This emergency + var emergency = props.Emergency; + if (emergency != null) + { + //switch on emergency type here. Right now only contact and shutdown + var e = new EssentialsRoomEmergencyContactClosure(room.Key + "-emergency", props.Emergency, room); + DeviceManager.AddDevice(e); + } + return null; + } + + /// + /// + /// + /// + /// + /// + public static Core.Privacy.MicrophonePrivacyController GetMicrophonePrivacy( + EssentialsRoomPropertiesConfig props, IPrivacy room) + { + var microphonePrivacy = props.MicrophonePrivacy; + if (microphonePrivacy == null) + { + Debug.Console(0, "Cannot create microphone privacy with null properties"); + return null; + } + // Get the MicrophonePrivacy device from the device manager + var mP = (DeviceManager.GetDeviceForKey(props.MicrophonePrivacy.DeviceKey) as + Core.Privacy.MicrophonePrivacyController); + // Set this room as the IPrivacy device + if (mP == null) + { + Debug.Console(0, "ERROR: Selected device {0} is not MicrophonePrivacyController", props.MicrophonePrivacy.DeviceKey); + return null; + } + mP.SetPrivacyDevice(room); + + var behaviour = props.MicrophonePrivacy.Behaviour.ToLower(); + + if (behaviour == null) + { + Debug.Console(0, "WARNING: No behaviour defined for MicrophonePrivacyController"); + return null; + } + if (behaviour == "trackroomstate") + { + // Tie LED enable to room power state + var essRoom = room as IEssentialsRoom; + essRoom.OnFeedback.OutputChange += (o, a) => + { + if (essRoom.OnFeedback.BoolValue) + mP.EnableLeds = true; + else + mP.EnableLeds = false; + }; + + mP.EnableLeds = essRoom.OnFeedback.BoolValue; + } + else if (behaviour == "trackcallstate") + { + // Tie LED enable to room power state + var inCallRoom = room as IHasInCallFeedback; + inCallRoom.InCallFeedback.OutputChange += (o, a) => + { + if (inCallRoom.InCallFeedback.BoolValue) + mP.EnableLeds = true; + else + mP.EnableLeds = false; + }; + + mP.EnableLeds = inCallRoom.InCallFeedback.BoolValue; + } + + return mP; + } + + } + + /// + /// + /// + public class EssentialsRoomPropertiesConfig + { + [JsonProperty("addresses")] + public EssentialsRoomAddressPropertiesConfig Addresses { get; set; } + + [JsonProperty("description")] + public string Description { get; set; } + + [JsonProperty("emergency")] + public EssentialsRoomEmergencyConfig Emergency { get; set; } + + [JsonProperty("help")] + public EssentialsHelpPropertiesConfig Help { get; set; } + + [JsonProperty("helpMessage")] + public string HelpMessage { get; set; } + + /// + /// Read this value to get the help message. It checks for the old and new config format. + /// + public string HelpMessageForDisplay + { + get + { + if(Help != null && !string.IsNullOrEmpty(Help.Message)) + { + return Help.Message; + } + else + { + return HelpMessage; + } + } + } + + [JsonProperty("environment")] + public EssentialsEnvironmentPropertiesConfig Environment { get; set; } + + [JsonProperty("logo")] + public EssentialsLogoPropertiesConfig LogoLight { get; set; } + + [JsonProperty("logoDark")] + public EssentialsLogoPropertiesConfig LogoDark { get; set; } + + [JsonProperty("microphonePrivacy")] + public EssentialsRoomMicrophonePrivacyConfig MicrophonePrivacy { get; set; } + + [JsonProperty("occupancy")] + public EssentialsRoomOccSensorConfig Occupancy { get; set; } + + [JsonProperty("oneButtonMeeting")] + public EssentialsOneButtonMeetingPropertiesConfig OneButtonMeeting { get; set; } + + [JsonProperty("shutdownVacancySeconds")] + public int ShutdownVacancySeconds { get; set; } + + [JsonProperty("shutdownPromptSeconds")] + public int ShutdownPromptSeconds { get; set; } + + [JsonProperty("tech")] + public EssentialsRoomTechConfig Tech { get; set; } + + [JsonProperty("volumes")] + public EssentialsRoomVolumesConfig Volumes { get; set; } + + [JsonProperty("fusion")] + public EssentialsRoomFusionConfig Fusion { get; set; } + + [JsonProperty("essentialsRoomUiBehaviorConfig", NullValueHandling=NullValueHandling.Ignore)] + public EssentialsRoomUiBehaviorConfig UiBehavior { get; set; } + + [JsonProperty("zeroVolumeWhenSwtichingVolumeDevices")] + public bool ZeroVolumeWhenSwtichingVolumeDevices { get; set; } + + /// + /// Indicates if this room represents a combination of other rooms + /// + [JsonProperty("isRoomCombinationScenario")] + public bool IsRoomCombinationScenario { get; set; } + + public EssentialsRoomPropertiesConfig() + { + LogoLight = new EssentialsLogoPropertiesConfig(); + LogoDark = new EssentialsLogoPropertiesConfig(); + } + } + + public class EssentialsRoomUiBehaviorConfig + { + [JsonProperty("disableActivityButtonsWhileWarmingCooling")] + public bool DisableActivityButtonsWhileWarmingCooling { get; set; } + } + + public class EssentialsAvRoomPropertiesConfig : EssentialsRoomPropertiesConfig + { + [JsonProperty("defaultAudioKey")] + public string DefaultAudioKey { get; set; } + [JsonProperty("sourceListKey")] + public string SourceListKey { get; set; } + [JsonProperty("destinationListKey")] + public string DestinationListKey { get; set; } + [JsonProperty("defaultSourceItem")] + public string DefaultSourceItem { get; set; } + /// + /// Indicates if the room supports advanced sharing + /// + [JsonProperty("supportsAdvancedSharing")] + public bool SupportsAdvancedSharing { get; set; } + /// + /// Indicates if non-tech users can change the share mode + /// + [JsonProperty("userCanChangeShareMode")] + public bool UserCanChangeShareMode { get; set; } + } + + public class EssentialsConferenceRoomPropertiesConfig : EssentialsAvRoomPropertiesConfig + { + [JsonProperty("videoCodecKey")] + public string VideoCodecKey { get; set; } + [JsonProperty("audioCodecKey")] + public string AudioCodecKey { get; set; } + } + + public class EssentialsEnvironmentPropertiesConfig + { + public bool Enabled { get; set; } + + [JsonProperty("deviceKeys")] + public List DeviceKeys { get; set; } + + public EssentialsEnvironmentPropertiesConfig() + { + DeviceKeys = new List(); + } + + } + + public class EssentialsRoomFusionConfig + { + public uint IpIdInt + { + get + { + try + { + return Convert.ToUInt32(IpId, 16); + } + catch (Exception) + { + throw new FormatException(string.Format("ERROR:Unable to convert IP ID: {0} to hex. Error:\n{1}", IpId)); + } + + } + } + + [JsonProperty("ipId")] + public string IpId { get; set; } + + [JsonProperty("joinMapKey")] + public string JoinMapKey { get; set; } + + } + + public class EssentialsRoomMicrophonePrivacyConfig + { + [JsonProperty("deviceKey")] + public string DeviceKey { get; set; } + + [JsonProperty("behaviour")] + public string Behaviour { get; set; } + } + + /// + /// Properties for the help text box + /// + public class EssentialsHelpPropertiesConfig + { + [JsonProperty("message")] + public string Message { get; set; } + + [JsonProperty("showCallButton")] + public bool ShowCallButton { get; set; } + + /// + /// Defaults to "Call Help Desk" + /// + [JsonProperty("callButtonText")] + public string CallButtonText { get; set; } + + public EssentialsHelpPropertiesConfig() + { + CallButtonText = "Call Help Desk"; + } + } + + /// + /// + /// + public class EssentialsOneButtonMeetingPropertiesConfig + { + [JsonProperty("enable")] + public bool Enable { get; set; } + } + + public class EssentialsRoomAddressPropertiesConfig + { + [JsonProperty("phoneNumber")] + public string PhoneNumber { get; set; } + + [JsonProperty("sipAddress")] + public string SipAddress { get; set; } + } + + + /// + /// Properties for the room's logo on panels + /// + public class EssentialsLogoPropertiesConfig + { + [JsonProperty("type")] + public string Type { get; set; } + + [JsonProperty("url")] + public string Url { get; set; } + /// + /// Gets either the custom URL, a local-to-processor URL, or null if it's a default logo + /// + public string GetLogoUrlLight() + { + if (Type == "url") + return Url; + if (Type == "system") + return string.Format("http://{0}:8080/logo.png", + CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0)); + return null; + } + + public string GetLogoUrlDark() + { + if (Type == "url") + return Url; + if (Type == "system") + return string.Format("http://{0}:8080/logo-dark.png", + CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0)); + return null; + } + } + + /// + /// Represents occupancy sensor(s) setup for a room + /// + public class EssentialsRoomOccSensorConfig + { + [JsonProperty("deviceKey")] + public string DeviceKey { get; set; } + + [JsonProperty("timeoutMinutes")] + public int TimeoutMinutes { get; set; } + } + + public class EssentialsRoomTechConfig + { + [JsonProperty("password")] + public string Password { get; set; } + } } \ No newline at end of file diff --git a/PepperDashEssentials/Room/Config/EssentialsRoomEmergencyConfig.cs b/src/PepperDash.Essentials/Room/Config/EssentialsRoomEmergencyConfig.cs similarity index 100% rename from PepperDashEssentials/Room/Config/EssentialsRoomEmergencyConfig.cs rename to src/PepperDash.Essentials/Room/Config/EssentialsRoomEmergencyConfig.cs diff --git a/PepperDashEssentials/Room/Config/EssentialsTechRoomConfig.cs b/src/PepperDash.Essentials/Room/Config/EssentialsTechRoomConfig.cs similarity index 96% rename from PepperDashEssentials/Room/Config/EssentialsTechRoomConfig.cs rename to src/PepperDash.Essentials/Room/Config/EssentialsTechRoomConfig.cs index 2944b854..6d933662 100644 --- a/PepperDashEssentials/Room/Config/EssentialsTechRoomConfig.cs +++ b/src/PepperDash.Essentials/Room/Config/EssentialsTechRoomConfig.cs @@ -1,5 +1,7 @@ -using System.Collections.Generic; -using Newtonsoft.Json; +extern alias Full; + +using System.Collections.Generic; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.Room.Config { diff --git a/PepperDashEssentials/Room/Config/SimplRoomPropertiesConfig.cs b/src/PepperDash.Essentials/Room/Config/SimplRoomPropertiesConfig.cs similarity index 91% rename from PepperDashEssentials/Room/Config/SimplRoomPropertiesConfig.cs rename to src/PepperDash.Essentials/Room/Config/SimplRoomPropertiesConfig.cs index f0fea9b9..ad508154 100644 --- a/PepperDashEssentials/Room/Config/SimplRoomPropertiesConfig.cs +++ b/src/PepperDash.Essentials/Room/Config/SimplRoomPropertiesConfig.cs @@ -1,10 +1,12 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials.Room.Config { diff --git a/PepperDashEssentials/Room/Emergency/EsentialsRoomEmergencyContactClosure.cs b/src/PepperDash.Essentials/Room/Emergency/EsentialsRoomEmergencyContactClosure.cs similarity index 100% rename from PepperDashEssentials/Room/Emergency/EsentialsRoomEmergencyContactClosure.cs rename to src/PepperDash.Essentials/Room/Emergency/EsentialsRoomEmergencyContactClosure.cs diff --git a/PepperDashEssentials/Room/Types/EssentialsCombinedHuddleVtc1Room.cs b/src/PepperDash.Essentials/Room/Types/EssentialsCombinedHuddleVtc1Room.cs similarity index 99% rename from PepperDashEssentials/Room/Types/EssentialsCombinedHuddleVtc1Room.cs rename to src/PepperDash.Essentials/Room/Types/EssentialsCombinedHuddleVtc1Room.cs index 50186d0b..46d481ef 100644 --- a/PepperDashEssentials/Room/Types/EssentialsCombinedHuddleVtc1Room.cs +++ b/src/PepperDash.Essentials/Room/Types/EssentialsCombinedHuddleVtc1Room.cs @@ -1,10 +1,12 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; using PepperDash.Core; using PepperDash.Essentials.Core; diff --git a/PepperDashEssentials/Room/Types/EssentialsDualDisplayRoom.cs b/src/PepperDash.Essentials/Room/Types/EssentialsDualDisplayRoom.cs similarity index 99% rename from PepperDashEssentials/Room/Types/EssentialsDualDisplayRoom.cs rename to src/PepperDash.Essentials/Room/Types/EssentialsDualDisplayRoom.cs index d3812feb..79b4b7c4 100644 --- a/PepperDashEssentials/Room/Types/EssentialsDualDisplayRoom.cs +++ b/src/PepperDash.Essentials/Room/Types/EssentialsDualDisplayRoom.cs @@ -1,10 +1,12 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; using PepperDash.Core; using PepperDash.Essentials.Core; diff --git a/PepperDashEssentials/Room/Types/EssentialsHuddleSpaceRoom.cs b/src/PepperDash.Essentials/Room/Types/EssentialsHuddleSpaceRoom.cs similarity index 96% rename from PepperDashEssentials/Room/Types/EssentialsHuddleSpaceRoom.cs rename to src/PepperDash.Essentials/Room/Types/EssentialsHuddleSpaceRoom.cs index 5dbe7600..7581f1b7 100644 --- a/PepperDashEssentials/Room/Types/EssentialsHuddleSpaceRoom.cs +++ b/src/PepperDash.Essentials/Room/Types/EssentialsHuddleSpaceRoom.cs @@ -1,564 +1,566 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -using Newtonsoft.Json; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; -using PepperDash.Essentials.Room.Config; - -namespace PepperDash.Essentials -{ - public class EssentialsHuddleSpaceRoom : EssentialsRoomBase, IEssentialsHuddleSpaceRoom - { - public event EventHandler CurrentVolumeDeviceChange; - public event SourceInfoChangeHandler CurrentSourceChange; - - protected override Func OnFeedbackFunc - { - get - { - return () => - { - var disp = DefaultDisplay as DisplayBase; - var val = CurrentSourceInfo != null - && CurrentSourceInfo.Type == eSourceListItemType.Route - && disp != null; - //&& disp.PowerIsOnFeedback.BoolValue; - return val; - }; - } - } - /// - /// - /// - protected override Func IsWarmingFeedbackFunc - { - get - { - return () => - { - var disp = DefaultDisplay as DisplayBase; - if (disp != null) - return disp.IsWarmingUpFeedback.BoolValue; - else - return false; - }; - } - } - /// - /// - /// - protected override Func IsCoolingFeedbackFunc - { - get - { - return () => - { - var disp = DefaultDisplay as DisplayBase; - if (disp != null) - return disp.IsCoolingDownFeedback.BoolValue; - else - return false; - }; - } - } - - public EssentialsHuddleRoomPropertiesConfig PropertiesConfig { get; private set; } - - public IRoutingSinkWithSwitching DefaultDisplay { get; private set; } - public IRoutingSink DefaultAudioDevice { get; private set; } - public IBasicVolumeControls DefaultVolumeControls { get; private set; } - - public bool ExcludeFromGlobalFunctions { get; set; } - - public string DefaultSourceItem { get; set; } - - public ushort DefaultVolume { get; set; } - - /// - /// If room is off, enables power on to last source. Default true - /// - public bool EnablePowerOnToLastSource { get; set; } - string LastSourceKey; - - /// - /// - /// - public IBasicVolumeControls CurrentVolumeControls - { - get { return _CurrentAudioDevice; } - set - { - if (value == _CurrentAudioDevice) return; - - var oldDev = _CurrentAudioDevice; - // derigister this room from the device, if it can - if (oldDev is IInUseTracking) - (oldDev as IInUseTracking).InUseTracker.RemoveUser(this, "audio"); - var handler = CurrentVolumeDeviceChange; - if (handler != null) - CurrentVolumeDeviceChange(this, new VolumeDeviceChangeEventArgs(oldDev, value, ChangeType.WillChange)); - _CurrentAudioDevice = value; - if (handler != null) - CurrentVolumeDeviceChange(this, new VolumeDeviceChangeEventArgs(oldDev, value, ChangeType.DidChange)); - // register this room with new device, if it can - if (_CurrentAudioDevice is IInUseTracking) - (_CurrentAudioDevice as IInUseTracking).InUseTracker.AddUser(this, "audio"); - } - } - IBasicVolumeControls _CurrentAudioDevice; - - /// - /// The SourceListItem last run - containing names and icons - /// - public SourceListItem CurrentSourceInfo - { - get { return _CurrentSourceInfo; } - set - { - if (value == _CurrentSourceInfo) return; - - var handler = CurrentSourceChange; - // remove from in-use tracker, if so equipped - if(_CurrentSourceInfo != null && _CurrentSourceInfo.SourceDevice is IInUseTracking) - (_CurrentSourceInfo.SourceDevice as IInUseTracking).InUseTracker.RemoveUser(this, "control"); - - if (handler != null) - handler(_CurrentSourceInfo, ChangeType.WillChange); - - _CurrentSourceInfo = value; - - // add to in-use tracking - if (_CurrentSourceInfo != null && _CurrentSourceInfo.SourceDevice is IInUseTracking) - (_CurrentSourceInfo.SourceDevice as IInUseTracking).InUseTracker.AddUser(this, "control"); - if (handler != null) - handler( _CurrentSourceInfo, ChangeType.DidChange); - } - } - SourceListItem _CurrentSourceInfo; - - public string CurrentSourceInfoKey { get; set; } - - public EssentialsHuddleSpaceRoom(DeviceConfig config) - : base(config) - { - try - { - PropertiesConfig = JsonConvert.DeserializeObject - (config.Properties.ToString()); - DefaultDisplay = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultDisplayKey) as IRoutingSinkWithSwitching; - - - DefaultAudioDevice = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultAudioKey) as IRoutingSinkWithSwitching; - - InitializeRoom(); - } - catch (Exception e) - { - Debug.Console(1, this, "Error building room: \n{0}", e); - } - } - - void InitializeRoom() - { - if (DefaultAudioDevice is IBasicVolumeControls) - DefaultVolumeControls = DefaultAudioDevice as IBasicVolumeControls; - else if (DefaultAudioDevice is IHasVolumeDevice) - DefaultVolumeControls = (DefaultAudioDevice as IHasVolumeDevice).VolumeDevice; - CurrentVolumeControls = DefaultVolumeControls; - - var disp = DefaultDisplay as DisplayBase; - if (disp != null) - { - // Link power, warming, cooling to display - var dispTwoWay = disp as IHasPowerControlWithFeedback; - if (dispTwoWay != null) - { - dispTwoWay.PowerIsOnFeedback.OutputChange += (o, a) => - { - if (dispTwoWay.PowerIsOnFeedback.BoolValue != OnFeedback.BoolValue) - { - if (!dispTwoWay.PowerIsOnFeedback.BoolValue) - CurrentSourceInfo = null; - OnFeedback.FireUpdate(); - } - }; - } - - disp.IsWarmingUpFeedback.OutputChange += (o, a) => - { - IsWarmingUpFeedback.FireUpdate(); - if (!IsWarmingUpFeedback.BoolValue) - (DefaultDisplay as IBasicVolumeWithFeedback).SetVolume(DefaultVolume); - }; - disp.IsCoolingDownFeedback.OutputChange += (o, a) => - { - IsCoolingDownFeedback.FireUpdate(); - }; - } - - SetupEnvironmentalControlDevices(); - - SetSourceListKey(); - - EnablePowerOnToLastSource = true; - } - - private void SetupEnvironmentalControlDevices() - { - if (PropertiesConfig.Environment != null) - { - if (PropertiesConfig.Environment.Enabled) - { - foreach (var d in PropertiesConfig.Environment.DeviceKeys) - { - var envDevice = DeviceManager.GetDeviceForKey(d) as EssentialsDevice; - EnvironmentalControlDevices.Add(envDevice); - } - } - } - } - - private void SetSourceListKey() - { - if (!string.IsNullOrEmpty(PropertiesConfig.SourceListKey)) - { - SetSourceListKey(PropertiesConfig.SourceListKey); - } - else - { - SetSourceListKey(Key); - } - - } - - protected override void CustomSetConfig(DeviceConfig config) - { - var newPropertiesConfig = JsonConvert.DeserializeObject(config.Properties.ToString()); - - if (newPropertiesConfig != null) - PropertiesConfig = newPropertiesConfig; - - ConfigWriter.UpdateRoomConfig(config); - } - - /// - /// - /// - protected override void EndShutdown() - { - SetDefaultLevels(); - - RunDefaultPresentRoute(); - - CrestronEnvironment.Sleep(1000); - - Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Shutting down room"); - - RunRouteAction("roomOff"); - } - - /// - /// Routes the default source item, if any - /// - public override bool RunDefaultPresentRoute() - { - if (DefaultSourceItem == null) - { - Debug.Console(0, this, "Unable to run default present route, DefaultSourceItem is null."); - return false; - } - - RunRouteAction(DefaultSourceItem); - return true; - } - - public override bool CustomActivate() - { - // Add Occupancy object from config - if (PropertiesConfig.Occupancy != null) - 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); - - return base.CustomActivate(); - } - - /// - /// - /// - /// - public void RunRouteAction(string routeKey) - { - RunRouteAction(routeKey, new Action(() => { })); - } - - /// - /// - /// - /// - /// - /// - public void RunRouteAction(string routeKey, string sourceListKey) - { - RunRouteAction(routeKey, new Action(() => { })); - } - - /// - /// - /// - /// - /// - /// - public void RunRouteAction(string routeKey, string sourceListKey, Action successCallback) - { - if (string.IsNullOrEmpty(sourceListKey)) - { - RunRouteAction(routeKey, successCallback); - } - else - throw new NotImplementedException(); - } - - /// - /// Gets a source from config list SourceListKey and dynamically build and executes the - /// route or commands - /// - /// - public void RunRouteAction(string routeKey, Action successCallback) - { - // Run this on a separate thread - new CTimer(o => - { - Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Run route action '{0}'", routeKey); - var dict = ConfigReader.ConfigObject.GetSourceListForKey(SourceListKey); - if(dict == null) - { - Debug.Console(1, this, "WARNING: Config source list '{0}' not found", SourceListKey); - return; - } - - // Try to get the list item by it's string key - if (!dict.ContainsKey(routeKey)) - { - Debug.Console(1, this, "WARNING: No item '{0}' found on config list '{1}'", - routeKey, SourceListKey); - return; - } - - var item = dict[routeKey]; - //Debug.Console(2, this, "Action {0} has {1} steps", - // item.SourceKey, item.RouteList.Count); - - // End usage timer on last source - if (!string.IsNullOrEmpty(LastSourceKey)) - { - var lastSource = dict[LastSourceKey].SourceDevice; - - try - { - if (lastSource != null && lastSource is IUsageTracking) - (lastSource as IUsageTracking).UsageTracker.EndDeviceUsage(); - } - catch (Exception e) - { - Debug.Console(1, this, "*#* EXCEPTION in end usage tracking (257):\r{0}", e); - } - } - - // Let's run it - if (routeKey.ToLower() != "roomoff") - { - LastSourceKey = routeKey; - } - else - { - CurrentSourceInfoKey = null; - } - - foreach (var route in item.RouteList) - { - // if there is a $defaultAll on route, run two separate - if (route.DestinationKey.Equals("$defaultAll", StringComparison.OrdinalIgnoreCase)) - { - // Going to assume a single-path route for now - var tempVideo = new SourceRouteListItem - { - DestinationKey = "$defaultDisplay", - SourceKey = route.SourceKey, - Type = eRoutingSignalType.Video - }; - DoRoute(tempVideo); - - //var tempAudio = new SourceRouteListItem - //{ - // DestinationKey = "$defaultAudio", - // SourceKey = route.SourceKey, - // Type = eRoutingSignalType.Audio - //}; - //DoRoute(tempAudio); - //continue; -- not sure why this was here - } - else - DoRoute(route); - } - - // Start usage timer on routed source - if (item.SourceDevice is IUsageTracking) - { - (item.SourceDevice as IUsageTracking).UsageTracker.StartDeviceUsage(); - } - - - - - // Set volume control, using default if non provided - IBasicVolumeControls volDev = null; - // Handle special cases for volume control - if (string.IsNullOrEmpty(item.VolumeControlKey) - || item.VolumeControlKey.Equals("$defaultAudio", StringComparison.OrdinalIgnoreCase)) - volDev = DefaultVolumeControls; - else if (item.VolumeControlKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase)) - volDev = DefaultDisplay as IBasicVolumeControls; - // Or a specific device, probably rarely used. - else - { - var dev = DeviceManager.GetDeviceForKey(item.VolumeControlKey); - if (dev is IBasicVolumeControls) - volDev = dev as IBasicVolumeControls; - else if (dev is IHasVolumeDevice) - volDev = (dev as IHasVolumeDevice).VolumeDevice; - } - - if (volDev != CurrentVolumeControls) - { - // zero the volume on the device we are leaving. - // Set the volume to default on device we are entering - if (ZeroVolumeWhenSwtichingVolumeDevices && CurrentVolumeControls is IBasicVolumeWithFeedback) - { - var vd = CurrentVolumeControls as IBasicVolumeWithFeedback; - SavedVolumeLevels[vd] = (uint)vd.VolumeLevelFeedback.IntValue; - vd.SetVolume(0); - } - CurrentVolumeControls = volDev; - if (ZeroVolumeWhenSwtichingVolumeDevices && CurrentVolumeControls is IBasicVolumeWithFeedback) - { - var vd = CurrentVolumeControls as IBasicVolumeWithFeedback; - ushort vol = (SavedVolumeLevels.ContainsKey(vd) ? (ushort)SavedVolumeLevels[vd] : DefaultVolume); - vd.SetVolume(vol); - } - } - - - - // store the name and UI info for routes - if (item.SourceKey == "$off") - { - CurrentSourceInfoKey = routeKey; - CurrentSourceInfo = null; - } - else if (item.SourceKey != null) - { - CurrentSourceInfoKey = routeKey; - CurrentSourceInfo = item; - } - // And finally, set the "control". This will trigger event - //CurrentControlDevice = DeviceManager.GetDeviceForKey(item.SourceKey) as Device; - - OnFeedback.FireUpdate(); - - // report back when done - if (successCallback != null) - successCallback(); - - }, 0); // end of CTimer - } - - /// - /// Will power the room on with the last-used source - /// - public override void PowerOnToDefaultOrLastSource() - { - if (!EnablePowerOnToLastSource || LastSourceKey == null) - return; - RunRouteAction(LastSourceKey); - } - - /// - /// Does what it says - /// - public override void SetDefaultLevels() - { - Debug.Console(1, this, "Restoring default levels"); - var vc = CurrentVolumeControls as IBasicVolumeWithFeedback; - if (vc != null) - vc.SetVolume(DefaultVolume); - } - - /// - /// - /// - /// - /// - bool DoRoute(SourceRouteListItem route) - { - IRoutingSink dest = null; - - if (route.DestinationKey.Equals("$defaultaudio", StringComparison.OrdinalIgnoreCase)) - dest = DefaultAudioDevice; - else if (route.DestinationKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase)) - dest = DefaultDisplay; - else - dest = DeviceManager.GetDeviceForKey(route.DestinationKey) as IRoutingSink; - - if (dest == null) - { - Debug.Console(1, this, "Cannot route, unknown destination '{0}'", route.DestinationKey); - return false; - } - - if (route.SourceKey.Equals("$off", StringComparison.OrdinalIgnoreCase)) - { - dest.ReleaseRoute(); - if (dest is IHasPowerControl) - (dest as IHasPowerControl).PowerOff(); - } - else - { - var source = DeviceManager.GetDeviceForKey(route.SourceKey) as IRoutingOutputs; - if (source == null) - { - Debug.Console(1, this, "Cannot route unknown source '{0}' to {1}", route.SourceKey, route.DestinationKey); - return false; - } - dest.ReleaseAndMakeRoute(source, route.Type); - } - return true; - } - - public override void RoomVacatedForTimeoutPeriod(object o) - { - //Implement this - } - - /// - /// Runs "roomOff" action on all rooms not set to ExcludeFromGlobalFunctions - /// - public static void AllRoomsOff() - { - var allRooms = DeviceManager.AllDevices.Where(d => - d is EssentialsHuddleSpaceRoom && !(d as EssentialsHuddleSpaceRoom).ExcludeFromGlobalFunctions); - foreach (var room in allRooms) - (room as EssentialsHuddleSpaceRoom).RunRouteAction("roomOff"); - } - } +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +using Full.Newtonsoft.Json; + +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Room.Config; + +namespace PepperDash.Essentials +{ + public class EssentialsHuddleSpaceRoom : EssentialsRoomBase, IEssentialsHuddleSpaceRoom + { + public event EventHandler CurrentVolumeDeviceChange; + public event SourceInfoChangeHandler CurrentSourceChange; + + protected override Func OnFeedbackFunc + { + get + { + return () => + { + var disp = DefaultDisplay as DisplayBase; + var val = CurrentSourceInfo != null + && CurrentSourceInfo.Type == eSourceListItemType.Route + && disp != null; + //&& disp.PowerIsOnFeedback.BoolValue; + return val; + }; + } + } + /// + /// + /// + protected override Func IsWarmingFeedbackFunc + { + get + { + return () => + { + var disp = DefaultDisplay as DisplayBase; + if (disp != null) + return disp.IsWarmingUpFeedback.BoolValue; + else + return false; + }; + } + } + /// + /// + /// + protected override Func IsCoolingFeedbackFunc + { + get + { + return () => + { + var disp = DefaultDisplay as DisplayBase; + if (disp != null) + return disp.IsCoolingDownFeedback.BoolValue; + else + return false; + }; + } + } + + public EssentialsHuddleRoomPropertiesConfig PropertiesConfig { get; private set; } + + public IRoutingSinkWithSwitching DefaultDisplay { get; private set; } + public IRoutingSink DefaultAudioDevice { get; private set; } + public IBasicVolumeControls DefaultVolumeControls { get; private set; } + + public bool ExcludeFromGlobalFunctions { get; set; } + + public string DefaultSourceItem { get; set; } + + public ushort DefaultVolume { get; set; } + + /// + /// If room is off, enables power on to last source. Default true + /// + public bool EnablePowerOnToLastSource { get; set; } + string LastSourceKey; + + /// + /// + /// + public IBasicVolumeControls CurrentVolumeControls + { + get { return _CurrentAudioDevice; } + set + { + if (value == _CurrentAudioDevice) return; + + var oldDev = _CurrentAudioDevice; + // derigister this room from the device, if it can + if (oldDev is IInUseTracking) + (oldDev as IInUseTracking).InUseTracker.RemoveUser(this, "audio"); + var handler = CurrentVolumeDeviceChange; + if (handler != null) + CurrentVolumeDeviceChange(this, new VolumeDeviceChangeEventArgs(oldDev, value, ChangeType.WillChange)); + _CurrentAudioDevice = value; + if (handler != null) + CurrentVolumeDeviceChange(this, new VolumeDeviceChangeEventArgs(oldDev, value, ChangeType.DidChange)); + // register this room with new device, if it can + if (_CurrentAudioDevice is IInUseTracking) + (_CurrentAudioDevice as IInUseTracking).InUseTracker.AddUser(this, "audio"); + } + } + IBasicVolumeControls _CurrentAudioDevice; + + /// + /// The SourceListItem last run - containing names and icons + /// + public SourceListItem CurrentSourceInfo + { + get { return _CurrentSourceInfo; } + set + { + if (value == _CurrentSourceInfo) return; + + var handler = CurrentSourceChange; + // remove from in-use tracker, if so equipped + if(_CurrentSourceInfo != null && _CurrentSourceInfo.SourceDevice is IInUseTracking) + (_CurrentSourceInfo.SourceDevice as IInUseTracking).InUseTracker.RemoveUser(this, "control"); + + if (handler != null) + handler(_CurrentSourceInfo, ChangeType.WillChange); + + _CurrentSourceInfo = value; + + // add to in-use tracking + if (_CurrentSourceInfo != null && _CurrentSourceInfo.SourceDevice is IInUseTracking) + (_CurrentSourceInfo.SourceDevice as IInUseTracking).InUseTracker.AddUser(this, "control"); + if (handler != null) + handler( _CurrentSourceInfo, ChangeType.DidChange); + } + } + SourceListItem _CurrentSourceInfo; + + public string CurrentSourceInfoKey { get; set; } + + public EssentialsHuddleSpaceRoom(DeviceConfig config) + : base(config) + { + try + { + PropertiesConfig = JsonConvert.DeserializeObject + (config.Properties.ToString()); + DefaultDisplay = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultDisplayKey) as IRoutingSinkWithSwitching; + + + DefaultAudioDevice = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultAudioKey) as IRoutingSinkWithSwitching; + + InitializeRoom(); + } + catch (Exception e) + { + Debug.Console(1, this, "Error building room: \n{0}", e); + } + } + + void InitializeRoom() + { + if (DefaultAudioDevice is IBasicVolumeControls) + DefaultVolumeControls = DefaultAudioDevice as IBasicVolumeControls; + else if (DefaultAudioDevice is IHasVolumeDevice) + DefaultVolumeControls = (DefaultAudioDevice as IHasVolumeDevice).VolumeDevice; + CurrentVolumeControls = DefaultVolumeControls; + + var disp = DefaultDisplay as DisplayBase; + if (disp != null) + { + // Link power, warming, cooling to display + var dispTwoWay = disp as IHasPowerControlWithFeedback; + if (dispTwoWay != null) + { + dispTwoWay.PowerIsOnFeedback.OutputChange += (o, a) => + { + if (dispTwoWay.PowerIsOnFeedback.BoolValue != OnFeedback.BoolValue) + { + if (!dispTwoWay.PowerIsOnFeedback.BoolValue) + CurrentSourceInfo = null; + OnFeedback.FireUpdate(); + } + }; + } + + disp.IsWarmingUpFeedback.OutputChange += (o, a) => + { + IsWarmingUpFeedback.FireUpdate(); + if (!IsWarmingUpFeedback.BoolValue) + (DefaultDisplay as IBasicVolumeWithFeedback).SetVolume(DefaultVolume); + }; + disp.IsCoolingDownFeedback.OutputChange += (o, a) => + { + IsCoolingDownFeedback.FireUpdate(); + }; + } + + SetupEnvironmentalControlDevices(); + + SetSourceListKey(); + + EnablePowerOnToLastSource = true; + } + + private void SetupEnvironmentalControlDevices() + { + if (PropertiesConfig.Environment != null) + { + if (PropertiesConfig.Environment.Enabled) + { + foreach (var d in PropertiesConfig.Environment.DeviceKeys) + { + var envDevice = DeviceManager.GetDeviceForKey(d) as EssentialsDevice; + EnvironmentalControlDevices.Add(envDevice); + } + } + } + } + + private void SetSourceListKey() + { + if (!string.IsNullOrEmpty(PropertiesConfig.SourceListKey)) + { + SetSourceListKey(PropertiesConfig.SourceListKey); + } + else + { + SetSourceListKey(Key); + } + + } + + protected override void CustomSetConfig(DeviceConfig config) + { + var newPropertiesConfig = JsonConvert.DeserializeObject(config.Properties.ToString()); + + if (newPropertiesConfig != null) + PropertiesConfig = newPropertiesConfig; + + ConfigWriter.UpdateRoomConfig(config); + } + + /// + /// + /// + protected override void EndShutdown() + { + SetDefaultLevels(); + + RunDefaultPresentRoute(); + + CrestronEnvironment.Sleep(1000); + + Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Shutting down room"); + + RunRouteAction("roomOff"); + } + + /// + /// Routes the default source item, if any + /// + public override bool RunDefaultPresentRoute() + { + if (DefaultSourceItem == null) + { + Debug.Console(0, this, "Unable to run default present route, DefaultSourceItem is null."); + return false; + } + + RunRouteAction(DefaultSourceItem); + return true; + } + + public override bool CustomActivate() + { + // Add Occupancy object from config + if (PropertiesConfig.Occupancy != null) + 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); + + return base.CustomActivate(); + } + + /// + /// + /// + /// + public void RunRouteAction(string routeKey) + { + RunRouteAction(routeKey, new Action(() => { })); + } + + /// + /// + /// + /// + /// + /// + public void RunRouteAction(string routeKey, string sourceListKey) + { + RunRouteAction(routeKey, new Action(() => { })); + } + + /// + /// + /// + /// + /// + /// + public void RunRouteAction(string routeKey, string sourceListKey, Action successCallback) + { + if (string.IsNullOrEmpty(sourceListKey)) + { + RunRouteAction(routeKey, successCallback); + } + else + throw new NotImplementedException(); + } + + /// + /// Gets a source from config list SourceListKey and dynamically build and executes the + /// route or commands + /// + /// + public void RunRouteAction(string routeKey, Action successCallback) + { + // Run this on a separate thread + new CTimer(o => + { + Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Run route action '{0}'", routeKey); + var dict = ConfigReader.ConfigObject.GetSourceListForKey(SourceListKey); + if(dict == null) + { + Debug.Console(1, this, "WARNING: Config source list '{0}' not found", SourceListKey); + return; + } + + // Try to get the list item by it's string key + if (!dict.ContainsKey(routeKey)) + { + Debug.Console(1, this, "WARNING: No item '{0}' found on config list '{1}'", + routeKey, SourceListKey); + return; + } + + var item = dict[routeKey]; + //Debug.Console(2, this, "Action {0} has {1} steps", + // item.SourceKey, item.RouteList.Count); + + // End usage timer on last source + if (!string.IsNullOrEmpty(LastSourceKey)) + { + var lastSource = dict[LastSourceKey].SourceDevice; + + try + { + if (lastSource != null && lastSource is IUsageTracking) + (lastSource as IUsageTracking).UsageTracker.EndDeviceUsage(); + } + catch (Exception e) + { + Debug.Console(1, this, "*#* EXCEPTION in end usage tracking (257):\r{0}", e); + } + } + + // Let's run it + if (routeKey.ToLower() != "roomoff") + { + LastSourceKey = routeKey; + } + else + { + CurrentSourceInfoKey = null; + } + + foreach (var route in item.RouteList) + { + // if there is a $defaultAll on route, run two separate + if (route.DestinationKey.Equals("$defaultAll", StringComparison.OrdinalIgnoreCase)) + { + // Going to assume a single-path route for now + var tempVideo = new SourceRouteListItem + { + DestinationKey = "$defaultDisplay", + SourceKey = route.SourceKey, + Type = eRoutingSignalType.Video + }; + DoRoute(tempVideo); + + //var tempAudio = new SourceRouteListItem + //{ + // DestinationKey = "$defaultAudio", + // SourceKey = route.SourceKey, + // Type = eRoutingSignalType.Audio + //}; + //DoRoute(tempAudio); + //continue; -- not sure why this was here + } + else + DoRoute(route); + } + + // Start usage timer on routed source + if (item.SourceDevice is IUsageTracking) + { + (item.SourceDevice as IUsageTracking).UsageTracker.StartDeviceUsage(); + } + + + + + // Set volume control, using default if non provided + IBasicVolumeControls volDev = null; + // Handle special cases for volume control + if (string.IsNullOrEmpty(item.VolumeControlKey) + || item.VolumeControlKey.Equals("$defaultAudio", StringComparison.OrdinalIgnoreCase)) + volDev = DefaultVolumeControls; + else if (item.VolumeControlKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase)) + volDev = DefaultDisplay as IBasicVolumeControls; + // Or a specific device, probably rarely used. + else + { + var dev = DeviceManager.GetDeviceForKey(item.VolumeControlKey); + if (dev is IBasicVolumeControls) + volDev = dev as IBasicVolumeControls; + else if (dev is IHasVolumeDevice) + volDev = (dev as IHasVolumeDevice).VolumeDevice; + } + + if (volDev != CurrentVolumeControls) + { + // zero the volume on the device we are leaving. + // Set the volume to default on device we are entering + if (ZeroVolumeWhenSwtichingVolumeDevices && CurrentVolumeControls is IBasicVolumeWithFeedback) + { + var vd = CurrentVolumeControls as IBasicVolumeWithFeedback; + SavedVolumeLevels[vd] = (uint)vd.VolumeLevelFeedback.IntValue; + vd.SetVolume(0); + } + CurrentVolumeControls = volDev; + if (ZeroVolumeWhenSwtichingVolumeDevices && CurrentVolumeControls is IBasicVolumeWithFeedback) + { + var vd = CurrentVolumeControls as IBasicVolumeWithFeedback; + ushort vol = (SavedVolumeLevels.ContainsKey(vd) ? (ushort)SavedVolumeLevels[vd] : DefaultVolume); + vd.SetVolume(vol); + } + } + + + + // store the name and UI info for routes + if (item.SourceKey == "$off") + { + CurrentSourceInfoKey = routeKey; + CurrentSourceInfo = null; + } + else if (item.SourceKey != null) + { + CurrentSourceInfoKey = routeKey; + CurrentSourceInfo = item; + } + // And finally, set the "control". This will trigger event + //CurrentControlDevice = DeviceManager.GetDeviceForKey(item.SourceKey) as Device; + + OnFeedback.FireUpdate(); + + // report back when done + if (successCallback != null) + successCallback(); + + }, 0); // end of CTimer + } + + /// + /// Will power the room on with the last-used source + /// + public override void PowerOnToDefaultOrLastSource() + { + if (!EnablePowerOnToLastSource || LastSourceKey == null) + return; + RunRouteAction(LastSourceKey); + } + + /// + /// Does what it says + /// + public override void SetDefaultLevels() + { + Debug.Console(1, this, "Restoring default levels"); + var vc = CurrentVolumeControls as IBasicVolumeWithFeedback; + if (vc != null) + vc.SetVolume(DefaultVolume); + } + + /// + /// + /// + /// + /// + bool DoRoute(SourceRouteListItem route) + { + IRoutingSink dest = null; + + if (route.DestinationKey.Equals("$defaultaudio", StringComparison.OrdinalIgnoreCase)) + dest = DefaultAudioDevice; + else if (route.DestinationKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase)) + dest = DefaultDisplay; + else + dest = DeviceManager.GetDeviceForKey(route.DestinationKey) as IRoutingSink; + + if (dest == null) + { + Debug.Console(1, this, "Cannot route, unknown destination '{0}'", route.DestinationKey); + return false; + } + + if (route.SourceKey.Equals("$off", StringComparison.OrdinalIgnoreCase)) + { + dest.ReleaseRoute(); + if (dest is IHasPowerControl) + (dest as IHasPowerControl).PowerOff(); + } + else + { + var source = DeviceManager.GetDeviceForKey(route.SourceKey) as IRoutingOutputs; + if (source == null) + { + Debug.Console(1, this, "Cannot route unknown source '{0}' to {1}", route.SourceKey, route.DestinationKey); + return false; + } + dest.ReleaseAndMakeRoute(source, route.Type); + } + return true; + } + + public override void RoomVacatedForTimeoutPeriod(object o) + { + //Implement this + } + + /// + /// Runs "roomOff" action on all rooms not set to ExcludeFromGlobalFunctions + /// + public static void AllRoomsOff() + { + var allRooms = DeviceManager.AllDevices.Where(d => + d is EssentialsHuddleSpaceRoom && !(d as EssentialsHuddleSpaceRoom).ExcludeFromGlobalFunctions); + foreach (var room in allRooms) + (room as EssentialsHuddleSpaceRoom).RunRouteAction("roomOff"); + } + } } \ No newline at end of file diff --git a/PepperDashEssentials/Room/Types/EssentialsHuddleVtc1Room.cs b/src/PepperDash.Essentials/Room/Types/EssentialsHuddleVtc1Room.cs similarity index 97% rename from PepperDashEssentials/Room/Types/EssentialsHuddleVtc1Room.cs rename to src/PepperDash.Essentials/Room/Types/EssentialsHuddleVtc1Room.cs index d04de3cc..c2942914 100644 --- a/PepperDashEssentials/Room/Types/EssentialsHuddleVtc1Room.cs +++ b/src/PepperDash.Essentials/Room/Types/EssentialsHuddleVtc1Room.cs @@ -1,872 +1,874 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -using Newtonsoft.Json; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; -using PepperDash.Essentials.Room.Config; -using PepperDash.Essentials.Devices.Common.Codec; -using PepperDash.Essentials.Devices.Common.VideoCodec; -using PepperDash.Essentials.Devices.Common.AudioCodec; -using PepperDash.Essentials.Core.DeviceTypeInterfaces; - -namespace PepperDash.Essentials -{ - public class EssentialsHuddleVtc1Room : EssentialsRoomBase, IEssentialsHuddleVtc1Room - { - private bool _codecExternalSourceChange; - public event EventHandler CurrentVolumeDeviceChange; - public event SourceInfoChangeHandler CurrentSourceChange; - - - //************************ - // Call-related stuff - - public BoolFeedback InCallFeedback { get; private set; } - - ///// - ///// Make this more specific - ///// - //public List ActiveCalls { get; private set; } - - /// - /// States: 0 for on hook, 1 for video, 2 for audio, 3 for telekenesis - /// - public IntFeedback CallTypeFeedback { get; private set; } - - /// - /// - /// - public BoolFeedback PrivacyModeIsOnFeedback { get; private set; } - - /// - /// When something in the room is sharing with the far end or through other means - /// - public BoolFeedback IsSharingFeedback { get; private set; } - - //************************ - - protected override Func OnFeedbackFunc - { - get - { - return () => - { - var disp = DefaultDisplay as DisplayBase; - var val = CurrentSourceInfo != null - && CurrentSourceInfo.Type == eSourceListItemType.Route - && disp != null; - //&& disp.PowerIsOnFeedback.BoolValue; - return val; - }; - } - } - /// - /// - /// - protected override Func IsWarmingFeedbackFunc - { - get - { - return () => - { - var disp = DefaultDisplay as DisplayBase; - if (disp != null) - return disp.IsWarmingUpFeedback.BoolValue; - else - return false; - }; - } - } - /// - /// - /// - protected override Func IsCoolingFeedbackFunc - { - get - { - return () => - { - var disp = DefaultDisplay as DisplayBase; - if (disp != null) - return disp.IsCoolingDownFeedback.BoolValue; - else - return false; - }; - } - } - - public EssentialsHuddleVtc1PropertiesConfig PropertiesConfig { get; private set; } - - public IRoutingSinkWithSwitching DefaultDisplay { get; private set; } - public IBasicVolumeControls DefaultAudioDevice { get; private set; } - public IBasicVolumeControls DefaultVolumeControls { get; private set; } - - public VideoCodecBase VideoCodec { get; private set; } - - public AudioCodecBase AudioCodec { get; private set; } - - public bool ExcludeFromGlobalFunctions { get; set; } - - public string DefaultSourceItem { get; set; } - - public ushort DefaultVolume { get; set; } - - /// - /// If room is off, enables power on to last source. Default true - /// - public bool EnablePowerOnToLastSource { get; set; } - string LastSourceKey; - - /// - /// Sets the volume control device, and attaches/removes InUseTrackers with "audio" - /// tag to device. - /// - public IBasicVolumeControls CurrentVolumeControls - { - get { return _CurrentAudioDevice; } - set - { - if (value == _CurrentAudioDevice) return; - - var oldDev = _CurrentAudioDevice; - // derigister this room from the device, if it can - if (oldDev is IInUseTracking) - (oldDev as IInUseTracking).InUseTracker.RemoveUser(this, "audio"); - var handler = CurrentVolumeDeviceChange; - if (handler != null) - CurrentVolumeDeviceChange(this, new VolumeDeviceChangeEventArgs(oldDev, value, ChangeType.WillChange)); - _CurrentAudioDevice = value; - if (handler != null) - CurrentVolumeDeviceChange(this, new VolumeDeviceChangeEventArgs(oldDev, value, ChangeType.DidChange)); - // register this room with new device, if it can - if (_CurrentAudioDevice is IInUseTracking) - (_CurrentAudioDevice as IInUseTracking).InUseTracker.AddUser(this, "audio"); - } - } - IBasicVolumeControls _CurrentAudioDevice; - - /// - /// The SourceListItem last run - containing names and icons - /// - public SourceListItem CurrentSourceInfo - { - get { return _CurrentSourceInfo; } - set - { - if (value == _CurrentSourceInfo) return; - - var handler = CurrentSourceChange; - // remove from in-use tracker, if so equipped - if(_CurrentSourceInfo != null && _CurrentSourceInfo.SourceDevice is IInUseTracking) - (_CurrentSourceInfo.SourceDevice as IInUseTracking).InUseTracker.RemoveUser(this, "control"); - - if (handler != null) - handler(_CurrentSourceInfo, ChangeType.WillChange); - - _CurrentSourceInfo = value; - - // add to in-use tracking - if (_CurrentSourceInfo != null && _CurrentSourceInfo.SourceDevice is IInUseTracking) - (_CurrentSourceInfo.SourceDevice as IInUseTracking).InUseTracker.AddUser(this, "control"); - if (handler != null) - handler(_CurrentSourceInfo, ChangeType.DidChange); - - var vc = VideoCodec as IHasExternalSourceSwitching; - if (vc != null && !_codecExternalSourceChange) - { - vc.SetSelectedSource(CurrentSourceInfoKey); - } - - _codecExternalSourceChange = false; - } - } - SourceListItem _CurrentSourceInfo; - - public string CurrentSourceInfoKey { get; set; } - - /// - /// "codecOsd" - /// - public string DefaultCodecRouteString { get { return "codecOsd"; } } - - /// - /// Temporary implementation. Returns the schedule-ready object or null if none. Fow now, - /// always returns the VideoCodec if it is capable - /// - public IHasScheduleAwareness ScheduleSource { get { return VideoCodec as IHasScheduleAwareness; } } - - CCriticalSection SourceSelectLock = new CCriticalSection(); - - public EssentialsHuddleVtc1Room(DeviceConfig config) - : base(config) - { - try - { - PropertiesConfig = JsonConvert.DeserializeObject - (config.Properties.ToString()); - DefaultDisplay = DeviceManager.GetDeviceForKey((PropertiesConfig as EssentialsHuddleVtc1PropertiesConfig).DefaultDisplayKey) as IRoutingSinkWithSwitching; - - VideoCodec = DeviceManager.GetDeviceForKey(PropertiesConfig.VideoCodecKey) as - PepperDash.Essentials.Devices.Common.VideoCodec.VideoCodecBase; - - - if (VideoCodec == null) - { - Debug.Console(0, Debug.ErrorLogLevel.Error, "No Video Codec set. Please check 'videoCodecKey' property in room config"); - throw new ArgumentNullException("VideoCodec cannot be null"); - } - - AudioCodec = DeviceManager.GetDeviceForKey(PropertiesConfig.AudioCodecKey) as - PepperDash.Essentials.Devices.Common.AudioCodec.AudioCodecBase; - if (AudioCodec == null) - Debug.Console(0, this, "No Audio Codec Found"); - - DefaultAudioDevice = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultAudioKey) as IBasicVolumeControls; - if (DefaultAudioDevice == null) - { - Debug.Console(0, Debug.ErrorLogLevel.Error, "No Default Audio Device set. Please check 'defaultAudioKey' property in room config"); - throw new ArgumentNullException("DefaultAudioDevice cannot be null"); - } - - InitializeRoom(); - } - catch (Exception e) - { - Debug.Console(1, this, "Error building room: \n{0}", e); - } - } - - void InitializeRoom() - { - 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; - }); - - var disp = DefaultDisplay as DisplayBase; - if (disp != null) - { - // Link power, warming, cooling to display - var dispTwoWay = disp 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(); - } - }; - } - - disp.IsWarmingUpFeedback.OutputChange += (o, a) => - { - IsWarmingUpFeedback.FireUpdate(); - if (!IsWarmingUpFeedback.BoolValue) - (CurrentVolumeControls as IBasicVolumeWithFeedback).SetVolume(DefaultVolume); - }; - disp.IsCoolingDownFeedback.OutputChange += (o, a) => - { - IsCoolingDownFeedback.FireUpdate(); - }; - - } - - - - // 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); - - SetupEnvironmentalControlDevices(); - - SetSourceListKey(); - - EnablePowerOnToLastSource = true; - } - catch (Exception e) - { - Debug.Console(0, this, "Error Initializing Room: {0}", e); - } - } - - private void SetupEnvironmentalControlDevices() - { - if (PropertiesConfig.Environment != null) - { - if (PropertiesConfig.Environment.Enabled) - { - foreach (var d in PropertiesConfig.Environment.DeviceKeys) - { - var envDevice = DeviceManager.GetDeviceForKey(d) as EssentialsDevice; - EnvironmentalControlDevices.Add(envDevice); - } - } - } - } - - - 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(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); - - return base.CustomActivate(); - } - - - - /// - /// - /// - protected override void EndShutdown() - { - VideoCodec.EndAllCalls(); - - SetDefaultLevels(); - - RunDefaultPresentRoute(); - - CrestronEnvironment.Sleep(1000); - - Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Shutting down room"); - - RunRouteAction("roomOff"); - VideoCodec.StopSharing(); - VideoCodec.StandbyActivate(); - } - - /// - /// Routes the default source item, if any. Returns true when default route exists - /// - public override bool RunDefaultPresentRoute() - { - if (DefaultSourceItem != null) - RunRouteAction(DefaultSourceItem); - - return DefaultSourceItem != null; - } - - /// - /// Sets up the room when started into call mode without presenting a source - /// - /// - public bool RunDefaultCallRoute() - { - Debug.Console(2, this, "RunDefaultCallRoute() Currently Sharing Content: {0}", VideoCodec.SharingContentIsOnFeedback.BoolValue); - - if (VideoCodec.SharingContentIsOnFeedback.BoolValue) - { - Debug.Console(2, this, "Currently sharing content. Ignoring request to run default call route."); - return false; - } - - RunRouteAction(DefaultCodecRouteString); - return true; - } - - public void RunRouteActionCodec(string routeKey, string sourceListKey) - { - _codecExternalSourceChange = true; - RunRouteAction(routeKey, sourceListKey); - } - - /// - /// - /// - /// - public void RunRouteAction(string routeKey) - { - RunRouteAction(routeKey, new Action(() => { })); - } - - /// - /// - /// - /// - /// - /// - public void RunRouteAction(string routeKey, string sourceListKey) - { - if (string.IsNullOrEmpty(sourceListKey)) - { - Debug.Console(1, this, "No sourceListKey present. RunRouteAction assumes default source list."); - RunRouteAction(routeKey, new Action(() => { })); - } - else - { - Debug.Console(1, this, "sourceListKey present but not yet implemented"); - - RunRouteAction(routeKey, new Action(() => { })); - } - } - - /// - /// - /// - /// - /// - /// - public void RunRouteAction(string routeKey, string sourceListKey, Action successCallback) - { - if (string.IsNullOrEmpty(sourceListKey)) - { - RunRouteAction(routeKey, successCallback); - } - else - { - Debug.Console(1, this, "sourceListKey present but not yet implemented"); - - RunRouteAction(routeKey, successCallback); - } - } - - /// - /// Gets a source from config list SourceListKey and dynamically build and executes the - /// route or commands - /// - /// - public void RunRouteAction(string routeKey, Action successCallback) - { - // Run this on a separate thread - new CTimer(o => - { - // try to prevent multiple simultaneous selections - SourceSelectLock.TryEnter(); - - try - { - - Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Run route action '{0}'", routeKey); - var dict = ConfigReader.ConfigObject.GetSourceListForKey(SourceListKey); - if (dict == null) - { - Debug.Console(1, this, "WARNING: Config source list '{0}' not found", SourceListKey); - return; - } - - // Try to get the list item by it's string key - if (!dict.ContainsKey(routeKey)) - { - Debug.Console(1, this, "WARNING: No item '{0}' found on config list '{1}'", - routeKey, SourceListKey); - return; - } - - // End usage timer on last source - if (!string.IsNullOrEmpty(LastSourceKey)) - { - var usageLastSource = dict[LastSourceKey].SourceDevice as IUsageTracking; - if (usageLastSource != null && usageLastSource.UsageTracker != null) - { - try - { - // There MAY have been failures in here. Protect - usageLastSource.UsageTracker.EndDeviceUsage(); - } - catch (Exception e) - { - Debug.Console(1, this, "*#* EXCEPTION in end usage tracking:\r{0}", e); - } - } - } - - // Let's run it - var item = dict[routeKey]; - if (routeKey.ToLower() != "roomoff") - { - - LastSourceKey = routeKey; - } - else - CurrentSourceInfoKey = null; - - // hand off the individual routes to this helper - foreach (var route in item.RouteList) - DoRouteItem(route); - - // Start usage timer on routed source - var usageNewSource = item.SourceDevice as IUsageTracking; - if (usageNewSource != null && usageNewSource.UsageTracker != null) // Have to make sure there is a usage tracker! - { - (item.SourceDevice as IUsageTracking).UsageTracker.StartDeviceUsage(); - } - - // See if this can be moved into common, base-class method ------------- - - - // Set volume control, using default if non provided - IBasicVolumeControls volDev = null; - // Handle special cases for volume control - if (string.IsNullOrEmpty(item.VolumeControlKey) - || item.VolumeControlKey.Equals("$defaultAudio", StringComparison.OrdinalIgnoreCase)) - volDev = DefaultVolumeControls; - else if (item.VolumeControlKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase)) - volDev = DefaultDisplay as IBasicVolumeControls; - // Or a specific device, probably rarely used. - else - { - var dev = DeviceManager.GetDeviceForKey(item.VolumeControlKey); - if (dev is IBasicVolumeControls) - volDev = dev as IBasicVolumeControls; - else if (dev is IHasVolumeDevice) - volDev = (dev as IHasVolumeDevice).VolumeDevice; - } - - if (volDev != CurrentVolumeControls) - { - // zero the volume on the device we are leaving. - // Set the volume to default on device we are entering - if (ZeroVolumeWhenSwtichingVolumeDevices && CurrentVolumeControls is IBasicVolumeWithFeedback) - { - var vd = CurrentVolumeControls as IBasicVolumeWithFeedback; - SavedVolumeLevels[vd] = (uint)vd.VolumeLevelFeedback.IntValue; - vd.SetVolume(0); - } - - CurrentVolumeControls = volDev; - if (ZeroVolumeWhenSwtichingVolumeDevices && CurrentVolumeControls is IBasicVolumeWithFeedback) - { - var vd = CurrentVolumeControls as IBasicVolumeWithFeedback; - ushort vol = (SavedVolumeLevels.ContainsKey(vd) ? (ushort)SavedVolumeLevels[vd] : DefaultVolume); - vd.SetVolume(vol); - } - } - // ----------------------------------------------------------------------- - - - - // store the name and UI info for routes - if (item.SourceKey == "$off") - { - CurrentSourceInfoKey = routeKey; - CurrentSourceInfo = null; - } - else if (item.SourceKey != null) - { - CurrentSourceInfoKey = routeKey; - CurrentSourceInfo = item; - } - - OnFeedback.FireUpdate(); - - if (OnFeedback.BoolValue) - { - if (VideoCodec.UsageTracker.InUseTracker.InUseFeedback.BoolValue) - { - Debug.Console(1, this, "Video Codec in use, deactivating standby on codec"); - VideoCodec.StandbyDeactivate(); - } - - if (VideoCodec.StandbyIsOnFeedback.BoolValue) - { - VideoCodec.StandbyDeactivate(); - } - else - { - Debug.Console(1, this, "Video codec not in standby. No need to wake."); - } - } - else - { - Debug.Console(1, this, "Room OnFeedback state: {0}", OnFeedback.BoolValue); - } - - // report back when done - if (successCallback != null) - successCallback(); - } - catch (Exception e) - { - Debug.Console(1, this, "ERROR in routing: {0}", e); - } - - SourceSelectLock.Leave(); - }, 0); // end of CTimer - } - - /// - /// - /// - /// - void DoRouteItem(SourceRouteListItem route) - { - // if there is a $defaultAll on route, run two separate - if (route.DestinationKey.Equals("$defaultAll", StringComparison.OrdinalIgnoreCase)) - { - // Going to assume a single-path route for now - var tempVideo = new SourceRouteListItem - { - DestinationKey = "$defaultDisplay", - SourceKey = route.SourceKey, - Type = eRoutingSignalType.Video - }; - DoRoute(tempVideo); - } - else - DoRoute(route); - } - - /// - /// - /// - /// - /// - bool DoRoute(SourceRouteListItem route) - { - IRoutingSink dest = null; - - if (route.DestinationKey.Equals("$defaultaudio", StringComparison.OrdinalIgnoreCase)) - dest = DefaultAudioDevice as IRoutingSink; - else if (route.DestinationKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase)) - dest = DefaultDisplay; - else - dest = DeviceManager.GetDeviceForKey(route.DestinationKey) as IRoutingSink; - - - if (dest == null) - { - Debug.Console(1, this, "Cannot route, unknown destination '{0}'", route.DestinationKey); - return false; - } - - if (route.SourceKey.Equals("$off", StringComparison.OrdinalIgnoreCase)) - { - dest.ReleaseRoute(); - if (dest is IHasPowerControl) - (dest as IHasPowerControl).PowerOff(); - - } - else - { - var source = DeviceManager.GetDeviceForKey(route.SourceKey) as IRoutingOutputs; - if (source == null) - { - Debug.Console(1, this, "Cannot route unknown source '{0}' to {1}", route.SourceKey, route.DestinationKey); - return false; - } - dest.ReleaseAndMakeRoute(source, route.Type); - } - return true; - } - - public override void RoomVacatedForTimeoutPeriod(object o) - { - //Implement this - } - - protected override bool AllowVacancyTimerToStart() - { - bool allowVideo = true; - bool allowAudio = true; - - if (VideoCodec != null) - { - Debug.Console(2,this, Debug.ErrorLogLevel.Notice, "Room {0} {1} in a video call", Key, VideoCodec.IsInCall ? "is" : "is not"); - allowVideo = !VideoCodec.IsInCall; - } - - if (AudioCodec != null) - { - Debug.Console(2,this, Debug.ErrorLogLevel.Notice, "Room {0} {1} in an audio call", Key, AudioCodec.IsInCall ? "is" : "is not"); - allowAudio = !AudioCodec.IsInCall; - } - - Debug.Console(2, this, "Room {0} allowing vacancy timer to start: {1}", Key, allowVideo && allowAudio); - - return allowVideo && allowAudio; - } - - /// - /// Does what it says - /// - public override void SetDefaultLevels() - { - Debug.Console(1, this, "Restoring default levels"); - var vc = CurrentVolumeControls as IBasicVolumeWithFeedback; - if (vc != null) - vc.SetVolume(DefaultVolume); - } - /// - /// Will power the room on with the last-used source - /// - public override void PowerOnToDefaultOrLastSource() - { - if (!EnablePowerOnToLastSource || LastSourceKey == null) - return; - RunRouteAction(LastSourceKey); - } - - /// - /// Runs "roomOff" action on all rooms not set to ExcludeFromGlobalFunctions - /// - public static void AllRoomsOff() - { - var allRooms = DeviceManager.AllDevices.Where(d => - d is IEssentialsRoom && !(d as IEssentialsHuddleSpaceRoom).ExcludeFromGlobalFunctions); - foreach (var room in allRooms) - (room as IEssentialsHuddleSpaceRoom).RunRouteAction("roomOff"); - } - - - /// - /// Setup the external sources for the Cisco Touch 10 devices that support IHasExternalSourceSwitch - /// - private void SetCodecExternalSources() - { - var videoCodecWithExternalSwitching = VideoCodec as IHasExternalSourceSwitching; - - if (videoCodecWithExternalSwitching == null || !videoCodecWithExternalSwitching.ExternalSourceListEnabled) - { - return; - } - - try - { - // Get the tie line that the external switcher is connected to - string codecInputConnectorName = ConfigReader.ConfigObject.TieLines.SingleOrDefault( - x => x.DestinationKey == VideoCodec.Key && x.DestinationPort == videoCodecWithExternalSwitching.ExternalSourceInputPort).DestinationPort; - - videoCodecWithExternalSwitching.ClearExternalSources(); - videoCodecWithExternalSwitching.RunRouteAction = RunRouteActionCodec; - var srcList = ConfigReader.ConfigObject.SourceLists.SingleOrDefault(x => x.Key == SourceListKey).Value.OrderBy(kv => kv.Value.Order); ; - - foreach (var kvp in srcList) - { - var srcConfig = kvp.Value; - - if (kvp.Key != DefaultCodecRouteString && kvp.Key != "roomOff") - { - videoCodecWithExternalSwitching.AddExternalSource(codecInputConnectorName, kvp.Key, srcConfig.PreferredName, PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.eExternalSourceType.desktop); - videoCodecWithExternalSwitching.SetExternalSourceState(kvp.Key, PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.eExternalSourceMode.Ready); - } - } - } - catch (Exception e) - { - Debug.Console(2, this, "Error setting codec external sources: {0}", e); - } - } - - private void SetCodecBranding() - { - var vcWithBranding = VideoCodec as IHasBranding; - - if (vcWithBranding == null) return; - - Debug.Console(1, this, "Setting Codec Branding"); - vcWithBranding.InitializeBranding(Key); - } - - #region IPrivacy Members - - - public void PrivacyModeOff() - { - VideoCodec.PrivacyModeOff(); - } - - public void PrivacyModeOn() - { - VideoCodec.PrivacyModeOn(); - } - - public void PrivacyModeToggle() - { - VideoCodec.PrivacyModeToggle(); - } - - #endregion - } +extern alias Full; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +using Full.Newtonsoft.Json; + +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Room.Config; +using PepperDash.Essentials.Devices.Common.Codec; +using PepperDash.Essentials.Devices.Common.VideoCodec; +using PepperDash.Essentials.Devices.Common.AudioCodec; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; + +namespace PepperDash.Essentials +{ + public class EssentialsHuddleVtc1Room : EssentialsRoomBase, IEssentialsHuddleVtc1Room + { + private bool _codecExternalSourceChange; + public event EventHandler CurrentVolumeDeviceChange; + public event SourceInfoChangeHandler CurrentSourceChange; + + + //************************ + // Call-related stuff + + public BoolFeedback InCallFeedback { get; private set; } + + ///// + ///// Make this more specific + ///// + //public List ActiveCalls { get; private set; } + + /// + /// States: 0 for on hook, 1 for video, 2 for audio, 3 for telekenesis + /// + public IntFeedback CallTypeFeedback { get; private set; } + + /// + /// + /// + public BoolFeedback PrivacyModeIsOnFeedback { get; private set; } + + /// + /// When something in the room is sharing with the far end or through other means + /// + public BoolFeedback IsSharingFeedback { get; private set; } + + //************************ + + protected override Func OnFeedbackFunc + { + get + { + return () => + { + var disp = DefaultDisplay as DisplayBase; + var val = CurrentSourceInfo != null + && CurrentSourceInfo.Type == eSourceListItemType.Route + && disp != null; + //&& disp.PowerIsOnFeedback.BoolValue; + return val; + }; + } + } + /// + /// + /// + protected override Func IsWarmingFeedbackFunc + { + get + { + return () => + { + var disp = DefaultDisplay as DisplayBase; + if (disp != null) + return disp.IsWarmingUpFeedback.BoolValue; + else + return false; + }; + } + } + /// + /// + /// + protected override Func IsCoolingFeedbackFunc + { + get + { + return () => + { + var disp = DefaultDisplay as DisplayBase; + if (disp != null) + return disp.IsCoolingDownFeedback.BoolValue; + else + return false; + }; + } + } + + public EssentialsHuddleVtc1PropertiesConfig PropertiesConfig { get; private set; } + + public IRoutingSinkWithSwitching DefaultDisplay { get; private set; } + public IBasicVolumeControls DefaultAudioDevice { get; private set; } + public IBasicVolumeControls DefaultVolumeControls { get; private set; } + + public VideoCodecBase VideoCodec { get; private set; } + + public AudioCodecBase AudioCodec { get; private set; } + + public bool ExcludeFromGlobalFunctions { get; set; } + + public string DefaultSourceItem { get; set; } + + public ushort DefaultVolume { get; set; } + + /// + /// If room is off, enables power on to last source. Default true + /// + public bool EnablePowerOnToLastSource { get; set; } + string LastSourceKey; + + /// + /// Sets the volume control device, and attaches/removes InUseTrackers with "audio" + /// tag to device. + /// + public IBasicVolumeControls CurrentVolumeControls + { + get { return _CurrentAudioDevice; } + set + { + if (value == _CurrentAudioDevice) return; + + var oldDev = _CurrentAudioDevice; + // derigister this room from the device, if it can + if (oldDev is IInUseTracking) + (oldDev as IInUseTracking).InUseTracker.RemoveUser(this, "audio"); + var handler = CurrentVolumeDeviceChange; + if (handler != null) + CurrentVolumeDeviceChange(this, new VolumeDeviceChangeEventArgs(oldDev, value, ChangeType.WillChange)); + _CurrentAudioDevice = value; + if (handler != null) + CurrentVolumeDeviceChange(this, new VolumeDeviceChangeEventArgs(oldDev, value, ChangeType.DidChange)); + // register this room with new device, if it can + if (_CurrentAudioDevice is IInUseTracking) + (_CurrentAudioDevice as IInUseTracking).InUseTracker.AddUser(this, "audio"); + } + } + IBasicVolumeControls _CurrentAudioDevice; + + /// + /// The SourceListItem last run - containing names and icons + /// + public SourceListItem CurrentSourceInfo + { + get { return _CurrentSourceInfo; } + set + { + if (value == _CurrentSourceInfo) return; + + var handler = CurrentSourceChange; + // remove from in-use tracker, if so equipped + if(_CurrentSourceInfo != null && _CurrentSourceInfo.SourceDevice is IInUseTracking) + (_CurrentSourceInfo.SourceDevice as IInUseTracking).InUseTracker.RemoveUser(this, "control"); + + if (handler != null) + handler(_CurrentSourceInfo, ChangeType.WillChange); + + _CurrentSourceInfo = value; + + // add to in-use tracking + if (_CurrentSourceInfo != null && _CurrentSourceInfo.SourceDevice is IInUseTracking) + (_CurrentSourceInfo.SourceDevice as IInUseTracking).InUseTracker.AddUser(this, "control"); + if (handler != null) + handler(_CurrentSourceInfo, ChangeType.DidChange); + + var vc = VideoCodec as IHasExternalSourceSwitching; + if (vc != null && !_codecExternalSourceChange) + { + vc.SetSelectedSource(CurrentSourceInfoKey); + } + + _codecExternalSourceChange = false; + } + } + SourceListItem _CurrentSourceInfo; + + public string CurrentSourceInfoKey { get; set; } + + /// + /// "codecOsd" + /// + public string DefaultCodecRouteString { get { return "codecOsd"; } } + + /// + /// Temporary implementation. Returns the schedule-ready object or null if none. Fow now, + /// always returns the VideoCodec if it is capable + /// + public IHasScheduleAwareness ScheduleSource { get { return VideoCodec as IHasScheduleAwareness; } } + + CCriticalSection SourceSelectLock = new CCriticalSection(); + + public EssentialsHuddleVtc1Room(DeviceConfig config) + : base(config) + { + try + { + PropertiesConfig = JsonConvert.DeserializeObject + (config.Properties.ToString()); + DefaultDisplay = DeviceManager.GetDeviceForKey((PropertiesConfig as EssentialsHuddleVtc1PropertiesConfig).DefaultDisplayKey) as IRoutingSinkWithSwitching; + + VideoCodec = DeviceManager.GetDeviceForKey(PropertiesConfig.VideoCodecKey) as + PepperDash.Essentials.Devices.Common.VideoCodec.VideoCodecBase; + + + if (VideoCodec == null) + { + Debug.Console(0, Debug.ErrorLogLevel.Error, "No Video Codec set. Please check 'videoCodecKey' property in room config"); + throw new ArgumentNullException("VideoCodec cannot be null"); + } + + AudioCodec = DeviceManager.GetDeviceForKey(PropertiesConfig.AudioCodecKey) as + PepperDash.Essentials.Devices.Common.AudioCodec.AudioCodecBase; + if (AudioCodec == null) + Debug.Console(0, this, "No Audio Codec Found"); + + DefaultAudioDevice = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultAudioKey) as IBasicVolumeControls; + if (DefaultAudioDevice == null) + { + Debug.Console(0, Debug.ErrorLogLevel.Error, "No Default Audio Device set. Please check 'defaultAudioKey' property in room config"); + throw new ArgumentNullException("DefaultAudioDevice cannot be null"); + } + + InitializeRoom(); + } + catch (Exception e) + { + Debug.Console(1, this, "Error building room: \n{0}", e); + } + } + + void InitializeRoom() + { + 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; + }); + + var disp = DefaultDisplay as DisplayBase; + if (disp != null) + { + // Link power, warming, cooling to display + var dispTwoWay = disp 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(); + } + }; + } + + disp.IsWarmingUpFeedback.OutputChange += (o, a) => + { + IsWarmingUpFeedback.FireUpdate(); + if (!IsWarmingUpFeedback.BoolValue) + (CurrentVolumeControls as IBasicVolumeWithFeedback).SetVolume(DefaultVolume); + }; + disp.IsCoolingDownFeedback.OutputChange += (o, a) => + { + IsCoolingDownFeedback.FireUpdate(); + }; + + } + + + + // 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); + + SetupEnvironmentalControlDevices(); + + SetSourceListKey(); + + EnablePowerOnToLastSource = true; + } + catch (Exception e) + { + Debug.Console(0, this, "Error Initializing Room: {0}", e); + } + } + + private void SetupEnvironmentalControlDevices() + { + if (PropertiesConfig.Environment != null) + { + if (PropertiesConfig.Environment.Enabled) + { + foreach (var d in PropertiesConfig.Environment.DeviceKeys) + { + var envDevice = DeviceManager.GetDeviceForKey(d) as EssentialsDevice; + EnvironmentalControlDevices.Add(envDevice); + } + } + } + } + + + 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(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); + + return base.CustomActivate(); + } + + + + /// + /// + /// + protected override void EndShutdown() + { + VideoCodec.EndAllCalls(); + + SetDefaultLevels(); + + RunDefaultPresentRoute(); + + CrestronEnvironment.Sleep(1000); + + Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Shutting down room"); + + RunRouteAction("roomOff"); + VideoCodec.StopSharing(); + VideoCodec.StandbyActivate(); + } + + /// + /// Routes the default source item, if any. Returns true when default route exists + /// + public override bool RunDefaultPresentRoute() + { + if (DefaultSourceItem != null) + RunRouteAction(DefaultSourceItem); + + return DefaultSourceItem != null; + } + + /// + /// Sets up the room when started into call mode without presenting a source + /// + /// + public bool RunDefaultCallRoute() + { + Debug.Console(2, this, "RunDefaultCallRoute() Currently Sharing Content: {0}", VideoCodec.SharingContentIsOnFeedback.BoolValue); + + if (VideoCodec.SharingContentIsOnFeedback.BoolValue) + { + Debug.Console(2, this, "Currently sharing content. Ignoring request to run default call route."); + return false; + } + + RunRouteAction(DefaultCodecRouteString); + return true; + } + + public void RunRouteActionCodec(string routeKey, string sourceListKey) + { + _codecExternalSourceChange = true; + RunRouteAction(routeKey, sourceListKey); + } + + /// + /// + /// + /// + public void RunRouteAction(string routeKey) + { + RunRouteAction(routeKey, new Action(() => { })); + } + + /// + /// + /// + /// + /// + /// + public void RunRouteAction(string routeKey, string sourceListKey) + { + if (string.IsNullOrEmpty(sourceListKey)) + { + Debug.Console(1, this, "No sourceListKey present. RunRouteAction assumes default source list."); + RunRouteAction(routeKey, new Action(() => { })); + } + else + { + Debug.Console(1, this, "sourceListKey present but not yet implemented"); + + RunRouteAction(routeKey, new Action(() => { })); + } + } + + /// + /// + /// + /// + /// + /// + public void RunRouteAction(string routeKey, string sourceListKey, Action successCallback) + { + if (string.IsNullOrEmpty(sourceListKey)) + { + RunRouteAction(routeKey, successCallback); + } + else + { + Debug.Console(1, this, "sourceListKey present but not yet implemented"); + + RunRouteAction(routeKey, successCallback); + } + } + + /// + /// Gets a source from config list SourceListKey and dynamically build and executes the + /// route or commands + /// + /// + public void RunRouteAction(string routeKey, Action successCallback) + { + // Run this on a separate thread + new CTimer(o => + { + // try to prevent multiple simultaneous selections + SourceSelectLock.TryEnter(); + + try + { + + Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Run route action '{0}'", routeKey); + var dict = ConfigReader.ConfigObject.GetSourceListForKey(SourceListKey); + if (dict == null) + { + Debug.Console(1, this, "WARNING: Config source list '{0}' not found", SourceListKey); + return; + } + + // Try to get the list item by it's string key + if (!dict.ContainsKey(routeKey)) + { + Debug.Console(1, this, "WARNING: No item '{0}' found on config list '{1}'", + routeKey, SourceListKey); + return; + } + + // End usage timer on last source + if (!string.IsNullOrEmpty(LastSourceKey)) + { + var usageLastSource = dict[LastSourceKey].SourceDevice as IUsageTracking; + if (usageLastSource != null && usageLastSource.UsageTracker != null) + { + try + { + // There MAY have been failures in here. Protect + usageLastSource.UsageTracker.EndDeviceUsage(); + } + catch (Exception e) + { + Debug.Console(1, this, "*#* EXCEPTION in end usage tracking:\r{0}", e); + } + } + } + + // Let's run it + var item = dict[routeKey]; + if (routeKey.ToLower() != "roomoff") + { + + LastSourceKey = routeKey; + } + else + CurrentSourceInfoKey = null; + + // hand off the individual routes to this helper + foreach (var route in item.RouteList) + DoRouteItem(route); + + // Start usage timer on routed source + var usageNewSource = item.SourceDevice as IUsageTracking; + if (usageNewSource != null && usageNewSource.UsageTracker != null) // Have to make sure there is a usage tracker! + { + (item.SourceDevice as IUsageTracking).UsageTracker.StartDeviceUsage(); + } + + // See if this can be moved into common, base-class method ------------- + + + // Set volume control, using default if non provided + IBasicVolumeControls volDev = null; + // Handle special cases for volume control + if (string.IsNullOrEmpty(item.VolumeControlKey) + || item.VolumeControlKey.Equals("$defaultAudio", StringComparison.OrdinalIgnoreCase)) + volDev = DefaultVolumeControls; + else if (item.VolumeControlKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase)) + volDev = DefaultDisplay as IBasicVolumeControls; + // Or a specific device, probably rarely used. + else + { + var dev = DeviceManager.GetDeviceForKey(item.VolumeControlKey); + if (dev is IBasicVolumeControls) + volDev = dev as IBasicVolumeControls; + else if (dev is IHasVolumeDevice) + volDev = (dev as IHasVolumeDevice).VolumeDevice; + } + + if (volDev != CurrentVolumeControls) + { + // zero the volume on the device we are leaving. + // Set the volume to default on device we are entering + if (ZeroVolumeWhenSwtichingVolumeDevices && CurrentVolumeControls is IBasicVolumeWithFeedback) + { + var vd = CurrentVolumeControls as IBasicVolumeWithFeedback; + SavedVolumeLevels[vd] = (uint)vd.VolumeLevelFeedback.IntValue; + vd.SetVolume(0); + } + + CurrentVolumeControls = volDev; + if (ZeroVolumeWhenSwtichingVolumeDevices && CurrentVolumeControls is IBasicVolumeWithFeedback) + { + var vd = CurrentVolumeControls as IBasicVolumeWithFeedback; + ushort vol = (SavedVolumeLevels.ContainsKey(vd) ? (ushort)SavedVolumeLevels[vd] : DefaultVolume); + vd.SetVolume(vol); + } + } + // ----------------------------------------------------------------------- + + + + // store the name and UI info for routes + if (item.SourceKey == "$off") + { + CurrentSourceInfoKey = routeKey; + CurrentSourceInfo = null; + } + else if (item.SourceKey != null) + { + CurrentSourceInfoKey = routeKey; + CurrentSourceInfo = item; + } + + OnFeedback.FireUpdate(); + + if (OnFeedback.BoolValue) + { + if (VideoCodec.UsageTracker.InUseTracker.InUseFeedback.BoolValue) + { + Debug.Console(1, this, "Video Codec in use, deactivating standby on codec"); + VideoCodec.StandbyDeactivate(); + } + + if (VideoCodec.StandbyIsOnFeedback.BoolValue) + { + VideoCodec.StandbyDeactivate(); + } + else + { + Debug.Console(1, this, "Video codec not in standby. No need to wake."); + } + } + else + { + Debug.Console(1, this, "Room OnFeedback state: {0}", OnFeedback.BoolValue); + } + + // report back when done + if (successCallback != null) + successCallback(); + } + catch (Exception e) + { + Debug.Console(1, this, "ERROR in routing: {0}", e); + } + + SourceSelectLock.Leave(); + }, 0); // end of CTimer + } + + /// + /// + /// + /// + void DoRouteItem(SourceRouteListItem route) + { + // if there is a $defaultAll on route, run two separate + if (route.DestinationKey.Equals("$defaultAll", StringComparison.OrdinalIgnoreCase)) + { + // Going to assume a single-path route for now + var tempVideo = new SourceRouteListItem + { + DestinationKey = "$defaultDisplay", + SourceKey = route.SourceKey, + Type = eRoutingSignalType.Video + }; + DoRoute(tempVideo); + } + else + DoRoute(route); + } + + /// + /// + /// + /// + /// + bool DoRoute(SourceRouteListItem route) + { + IRoutingSink dest = null; + + if (route.DestinationKey.Equals("$defaultaudio", StringComparison.OrdinalIgnoreCase)) + dest = DefaultAudioDevice as IRoutingSink; + else if (route.DestinationKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase)) + dest = DefaultDisplay; + else + dest = DeviceManager.GetDeviceForKey(route.DestinationKey) as IRoutingSink; + + + if (dest == null) + { + Debug.Console(1, this, "Cannot route, unknown destination '{0}'", route.DestinationKey); + return false; + } + + if (route.SourceKey.Equals("$off", StringComparison.OrdinalIgnoreCase)) + { + dest.ReleaseRoute(); + if (dest is IHasPowerControl) + (dest as IHasPowerControl).PowerOff(); + + } + else + { + var source = DeviceManager.GetDeviceForKey(route.SourceKey) as IRoutingOutputs; + if (source == null) + { + Debug.Console(1, this, "Cannot route unknown source '{0}' to {1}", route.SourceKey, route.DestinationKey); + return false; + } + dest.ReleaseAndMakeRoute(source, route.Type); + } + return true; + } + + public override void RoomVacatedForTimeoutPeriod(object o) + { + //Implement this + } + + protected override bool AllowVacancyTimerToStart() + { + bool allowVideo = true; + bool allowAudio = true; + + if (VideoCodec != null) + { + Debug.Console(2,this, Debug.ErrorLogLevel.Notice, "Room {0} {1} in a video call", Key, VideoCodec.IsInCall ? "is" : "is not"); + allowVideo = !VideoCodec.IsInCall; + } + + if (AudioCodec != null) + { + Debug.Console(2,this, Debug.ErrorLogLevel.Notice, "Room {0} {1} in an audio call", Key, AudioCodec.IsInCall ? "is" : "is not"); + allowAudio = !AudioCodec.IsInCall; + } + + Debug.Console(2, this, "Room {0} allowing vacancy timer to start: {1}", Key, allowVideo && allowAudio); + + return allowVideo && allowAudio; + } + + /// + /// Does what it says + /// + public override void SetDefaultLevels() + { + Debug.Console(1, this, "Restoring default levels"); + var vc = CurrentVolumeControls as IBasicVolumeWithFeedback; + if (vc != null) + vc.SetVolume(DefaultVolume); + } + /// + /// Will power the room on with the last-used source + /// + public override void PowerOnToDefaultOrLastSource() + { + if (!EnablePowerOnToLastSource || LastSourceKey == null) + return; + RunRouteAction(LastSourceKey); + } + + /// + /// Runs "roomOff" action on all rooms not set to ExcludeFromGlobalFunctions + /// + public static void AllRoomsOff() + { + var allRooms = DeviceManager.AllDevices.Where(d => + d is IEssentialsRoom && !(d as IEssentialsHuddleSpaceRoom).ExcludeFromGlobalFunctions); + foreach (var room in allRooms) + (room as IEssentialsHuddleSpaceRoom).RunRouteAction("roomOff"); + } + + + /// + /// Setup the external sources for the Cisco Touch 10 devices that support IHasExternalSourceSwitch + /// + private void SetCodecExternalSources() + { + var videoCodecWithExternalSwitching = VideoCodec as IHasExternalSourceSwitching; + + if (videoCodecWithExternalSwitching == null || !videoCodecWithExternalSwitching.ExternalSourceListEnabled) + { + return; + } + + try + { + // Get the tie line that the external switcher is connected to + string codecInputConnectorName = ConfigReader.ConfigObject.TieLines.SingleOrDefault( + x => x.DestinationKey == VideoCodec.Key && x.DestinationPort == videoCodecWithExternalSwitching.ExternalSourceInputPort).DestinationPort; + + videoCodecWithExternalSwitching.ClearExternalSources(); + videoCodecWithExternalSwitching.RunRouteAction = RunRouteActionCodec; + var srcList = ConfigReader.ConfigObject.SourceLists.SingleOrDefault(x => x.Key == SourceListKey).Value.OrderBy(kv => kv.Value.Order); ; + + foreach (var kvp in srcList) + { + var srcConfig = kvp.Value; + + if (kvp.Key != DefaultCodecRouteString && kvp.Key != "roomOff") + { + videoCodecWithExternalSwitching.AddExternalSource(codecInputConnectorName, kvp.Key, srcConfig.PreferredName, PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.eExternalSourceType.desktop); + videoCodecWithExternalSwitching.SetExternalSourceState(kvp.Key, PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.eExternalSourceMode.Ready); + } + } + } + catch (Exception e) + { + Debug.Console(2, this, "Error setting codec external sources: {0}", e); + } + } + + private void SetCodecBranding() + { + var vcWithBranding = VideoCodec as IHasBranding; + + if (vcWithBranding == null) return; + + Debug.Console(1, this, "Setting Codec Branding"); + vcWithBranding.InitializeBranding(Key); + } + + #region IPrivacy Members + + + public void PrivacyModeOff() + { + VideoCodec.PrivacyModeOff(); + } + + public void PrivacyModeOn() + { + VideoCodec.PrivacyModeOn(); + } + + public void PrivacyModeToggle() + { + VideoCodec.PrivacyModeToggle(); + } + + #endregion + } } \ No newline at end of file diff --git a/PepperDashEssentials/Room/Types/EssentialsNDisplayRoomBase.cs b/src/PepperDash.Essentials/Room/Types/EssentialsNDisplayRoomBase.cs similarity index 93% rename from PepperDashEssentials/Room/Types/EssentialsNDisplayRoomBase.cs rename to src/PepperDash.Essentials/Room/Types/EssentialsNDisplayRoomBase.cs index 85f52c9f..42b54f24 100644 --- a/PepperDashEssentials/Room/Types/EssentialsNDisplayRoomBase.cs +++ b/src/PepperDash.Essentials/Room/Types/EssentialsNDisplayRoomBase.cs @@ -1,10 +1,12 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; using PepperDash.Core; using PepperDash.Essentials.Core; diff --git a/PepperDashEssentials/Room/Types/EssentialsTechRoom.cs b/src/PepperDash.Essentials/Room/Types/EssentialsTechRoom.cs similarity index 99% rename from PepperDashEssentials/Room/Types/EssentialsTechRoom.cs rename to src/PepperDash.Essentials/Room/Types/EssentialsTechRoom.cs index 65cc52fa..5ff997c1 100644 --- a/PepperDashEssentials/Room/Types/EssentialsTechRoom.cs +++ b/src/PepperDash.Essentials/Room/Types/EssentialsTechRoom.cs @@ -1,11 +1,13 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using Crestron.SimplSharp; using Crestron.SimplSharp.Scheduler; using Crestron.SimplSharpPro.DeviceSupport; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; +using Full.Newtonsoft.Json; +using Full.Newtonsoft.Json.Linq; using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Bridges; diff --git a/PepperDashEssentials/Room/Types/Interfaces/IEssentialsHuddleSpaceRoom.cs b/src/PepperDash.Essentials/Room/Types/Interfaces/IEssentialsHuddleSpaceRoom.cs similarity index 100% rename from PepperDashEssentials/Room/Types/Interfaces/IEssentialsHuddleSpaceRoom.cs rename to src/PepperDash.Essentials/Room/Types/Interfaces/IEssentialsHuddleSpaceRoom.cs diff --git a/PepperDashEssentials/Room/Types/Interfaces/IEssentialsHuddleVtc1Room.cs b/src/PepperDash.Essentials/Room/Types/Interfaces/IEssentialsHuddleVtc1Room.cs similarity index 100% rename from PepperDashEssentials/Room/Types/Interfaces/IEssentialsHuddleVtc1Room.cs rename to src/PepperDash.Essentials/Room/Types/Interfaces/IEssentialsHuddleVtc1Room.cs diff --git a/PepperDashEssentials/SGD/PepperDash Essentials TSW-560.sgd b/src/PepperDash.Essentials/SGD/PepperDash Essentials TSW-560.sgd similarity index 100% rename from PepperDashEssentials/SGD/PepperDash Essentials TSW-560.sgd rename to src/PepperDash.Essentials/SGD/PepperDash Essentials TSW-560.sgd diff --git a/PepperDashEssentials/SGD/PepperDash Essentials TSW-760.sgd b/src/PepperDash.Essentials/SGD/PepperDash Essentials TSW-760.sgd similarity index 100% rename from PepperDashEssentials/SGD/PepperDash Essentials TSW-760.sgd rename to src/PepperDash.Essentials/SGD/PepperDash Essentials TSW-760.sgd diff --git a/PepperDashEssentials/PepperDash Essentials iPad.sgd b/src/PepperDash.Essentials/SGD/PepperDash Essentials iPad.sgd similarity index 100% rename from PepperDashEssentials/PepperDash Essentials iPad.sgd rename to src/PepperDash.Essentials/SGD/PepperDash Essentials iPad.sgd diff --git a/PepperDashEssentials/UI - FILES ORPHANED-DELETE/DualDisplaySourceSRLController.cs b/src/PepperDash.Essentials/UI/DualDisplaySourceSRLController.cs similarity index 100% rename from PepperDashEssentials/UI - FILES ORPHANED-DELETE/DualDisplaySourceSRLController.cs rename to src/PepperDash.Essentials/UI/DualDisplaySourceSRLController.cs diff --git a/PepperDashEssentials/UI/EssentialsTouchpanelController.cs b/src/PepperDash.Essentials/UI/EssentialsTouchpanelController.cs similarity index 99% rename from PepperDashEssentials/UI/EssentialsTouchpanelController.cs rename to src/PepperDash.Essentials/UI/EssentialsTouchpanelController.cs index 67f25f42..630f4f67 100644 --- a/PepperDashEssentials/UI/EssentialsTouchpanelController.cs +++ b/src/PepperDash.Essentials/UI/EssentialsTouchpanelController.cs @@ -1,4 +1,6 @@ -using System; +extern alias Full; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -12,7 +14,7 @@ using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.PageManagers; using PepperDash.Essentials.Core.UI; -using Newtonsoft.Json; +using Full.Newtonsoft.Json; namespace PepperDash.Essentials { diff --git a/PepperDashEssentials/UI/HttpLogoServer.cs b/src/PepperDash.Essentials/UI/HttpLogoServer.cs similarity index 97% rename from PepperDashEssentials/UI/HttpLogoServer.cs rename to src/PepperDash.Essentials/UI/HttpLogoServer.cs index b81a51f4..0ff60e93 100644 --- a/PepperDashEssentials/UI/HttpLogoServer.cs +++ b/src/PepperDash.Essentials/UI/HttpLogoServer.cs @@ -1,123 +1,123 @@ -using System; -using System.Collections.Generic; -using Crestron.SimplSharp; -using Crestron.SimplSharp.CrestronIO; -using Crestron.SimplSharp.Net.Http; - -using PepperDash.Core; - -namespace PepperDash.Essentials -{ - public class HttpLogoServer - { - /// - /// - /// - readonly HttpServer _server; - - /// - /// - /// - readonly string _fileDirectory; - - /// - /// - /// - public static Dictionary ExtensionContentTypes; - - /// - /// - /// - /// - /// - public HttpLogoServer(int port, string directory) - { - ExtensionContentTypes = new Dictionary - { - //{ ".css", "text/css" }, - //{ ".htm", "text/html" }, - //{ ".html", "text/html" }, - { ".jpg", "image/jpeg" }, - { ".jpeg", "image/jpeg" }, - //{ ".js", "application/javascript" }, - //{ ".json", "application/json" }, - //{ ".map", "application/x-navimap" }, - { ".pdf", "application/pdf" }, - { ".png", "image/png" }, - //{ ".txt", "text/plain" }, - }; - - _server = new HttpServer {Port = port}; - _fileDirectory = directory; - _server.OnHttpRequest += Server_OnHttpRequest; - _server.Open(); - - CrestronEnvironment.ProgramStatusEventHandler += CrestronEnvironment_ProgramStatusEventHandler; - } - - /// - /// - /// - void Server_OnHttpRequest(object sender, OnHttpRequestArgs args) - { - var path = args.Request.Path; - Debug.Console(2, "HTTP Request with path: '{0}'", args.Request.Path); - - try - { - if (File.Exists(_fileDirectory + path)) - { - var filePath = path.Replace('/', '\\'); - var localPath = string.Format(@"{0}{1}", _fileDirectory, filePath); - - Debug.Console(2, "HTTP Logo Server attempting to find file: '{0}'", localPath); - if (File.Exists(localPath)) - { - args.Response.Header.ContentType = GetContentType(new FileInfo(localPath).Extension); - args.Response.ContentStream = new FileStream(localPath, FileMode.Open, FileAccess.Read); - } - else - { - Debug.Console(2, "HTTP Logo Server Cannot find file '{0}'", localPath); - args.Response.ContentString = string.Format("Not found: '{0}'", filePath); - args.Response.Code = 404; - } - } - else - { - Debug.Console(2, "HTTP Logo Server: '{0}' does not exist", _fileDirectory + path); - args.Response.ContentString = string.Format("Not found: '{0}'", _fileDirectory + path); - args.Response.Code = 404; - } - } - catch (Exception ex) - { - Debug.Console(0, Debug.ErrorLogLevel.Error, "Exception getting file: {0}", ex.Message); - Debug.Console(0, Debug.ErrorLogLevel.Error, "Stack Trace: {0}", ex.StackTrace); - - args.Response.Code = 400; - args.Response.ContentString = string.Format("invalid request"); - } - } - - /// - /// - /// - void CrestronEnvironment_ProgramStatusEventHandler(eProgramStatusEventType programEventType) - { - if (programEventType == eProgramStatusEventType.Stopping) - _server.Close(); - } - - /// - /// - /// - /// - /// - public static string GetContentType(string extension) - { - var type = ExtensionContentTypes.ContainsKey(extension) ? ExtensionContentTypes[extension] : "text/plain"; - return type; - } - } +using System; +using System.Collections.Generic; +using Crestron.SimplSharp; +using Crestron.SimplSharp.CrestronIO; +using Crestron.SimplSharp.Net.Http; + +using PepperDash.Core; + +namespace PepperDash.Essentials +{ + public class HttpLogoServer + { + /// + /// + /// + readonly HttpServer _server; + + /// + /// + /// + readonly string _fileDirectory; + + /// + /// + /// + public static Dictionary ExtensionContentTypes; + + /// + /// + /// + /// + /// + public HttpLogoServer(int port, string directory) + { + ExtensionContentTypes = new Dictionary + { + //{ ".css", "text/css" }, + //{ ".htm", "text/html" }, + //{ ".html", "text/html" }, + { ".jpg", "image/jpeg" }, + { ".jpeg", "image/jpeg" }, + //{ ".js", "application/javascript" }, + //{ ".json", "application/json" }, + //{ ".map", "application/x-navimap" }, + { ".pdf", "application/pdf" }, + { ".png", "image/png" }, + //{ ".txt", "text/plain" }, + }; + + _server = new HttpServer {Port = port}; + _fileDirectory = directory; + _server.OnHttpRequest += Server_OnHttpRequest; + _server.Open(); + + CrestronEnvironment.ProgramStatusEventHandler += CrestronEnvironment_ProgramStatusEventHandler; + } + + /// + /// + /// + void Server_OnHttpRequest(object sender, OnHttpRequestArgs args) + { + var path = args.Request.Path; + Debug.Console(2, "HTTP Request with path: '{0}'", args.Request.Path); + + try + { + if (File.Exists(_fileDirectory + path)) + { + var filePath = path.Replace('/', '\\'); + var localPath = string.Format(@"{0}{1}", _fileDirectory, filePath); + + Debug.Console(2, "HTTP Logo Server attempting to find file: '{0}'", localPath); + if (File.Exists(localPath)) + { + args.Response.Header.ContentType = GetContentType(new FileInfo(localPath).Extension); + args.Response.ContentStream = new FileStream(localPath, FileMode.Open, FileAccess.Read); + } + else + { + Debug.Console(2, "HTTP Logo Server Cannot find file '{0}'", localPath); + args.Response.ContentString = string.Format("Not found: '{0}'", filePath); + args.Response.Code = 404; + } + } + else + { + Debug.Console(2, "HTTP Logo Server: '{0}' does not exist", _fileDirectory + path); + args.Response.ContentString = string.Format("Not found: '{0}'", _fileDirectory + path); + args.Response.Code = 404; + } + } + catch (Exception ex) + { + Debug.Console(0, Debug.ErrorLogLevel.Error, "Exception getting file: {0}", ex.Message); + Debug.Console(0, Debug.ErrorLogLevel.Error, "Stack Trace: {0}", ex.StackTrace); + + args.Response.Code = 400; + args.Response.ContentString = string.Format("invalid request"); + } + } + + /// + /// + /// + void CrestronEnvironment_ProgramStatusEventHandler(eProgramStatusEventType programEventType) + { + if (programEventType == eProgramStatusEventType.Stopping) + _server.Close(); + } + + /// + /// + /// + /// + /// + public static string GetContentType(string extension) + { + var type = ExtensionContentTypes.ContainsKey(extension) ? ExtensionContentTypes[extension] : "text/plain"; + return type; + } + } } \ No newline at end of file diff --git a/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs b/src/PepperDash.Essentials/UI/JoinConstants/UIBoolJoin.cs similarity index 96% rename from PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs rename to src/PepperDash.Essentials/UI/JoinConstants/UIBoolJoin.cs index 1a127000..a76f5bcb 100644 --- a/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs +++ b/src/PepperDash.Essentials/UI/JoinConstants/UIBoolJoin.cs @@ -1,991 +1,991 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; - -namespace PepperDash.Essentials -{ - /// - /// Where all UI element common joins are defined - /// - public class UIBoolJoin - { - /// - /// 901 - /// - public const uint VolumeUpPress = 901; - /// - /// 902 - /// - public const uint VolumeDownPress = 902; - - //**************************************************** - // Codec General - - /// - /// 1001 - /// - public const uint CallEndPress = 1001; - /// - /// 1002 - /// - public const uint CallEndAllConfirmPress = 1002; - /// - /// 1003 - For tapping the text field to reveal the keyboard - /// - public const uint CodecDirectorySearchTextPress = 1003; - /// - /// 1004 - /// - public const uint CallStopSharingPress = 1004; - /// - /// 1005 - /// - public const uint CallSharedSourceInfoVisible = 1005; - /// - /// 1006 - /// - public const uint CallEndAllConfirmVisible = 1006; - /// - /// 1007 - /// - public const uint MeetingPasswordVisible = 1007; - /// - /// 1008 - /// - public const uint MeetingLeavePress = 1008; - - - - - - // Audio Conference - /// - /// 1101 - /// - public const uint ACKeypadVisible = 1101; - /// - /// 1102 - /// - public const uint ACStagingPopoverVisible = 1102; - /// - /// 1111 - /// - public const uint ACSpeedDial1Press = 1111; - /// - /// 1112 - /// - public const uint ACSpeedDial2Press = 1112; - /// - /// 1113 - /// - public const uint ACSpeedDial3Press = 1113; - /// - /// 1114 - /// - public const uint ACSpeedDial4Press = 1114; - /// - /// 1121 - /// - public const uint ACSpeedDial1Visible = 1121; - /// - /// 1122 - /// - public const uint ACSpeedDial2Visible = 1122; - /// - /// 1123 - /// - public const uint ACSpeedDial3Visible = 1123; - /// - /// 1124 - /// - public const uint ACSpeedDial4Visible = 1124; - - //****************************************************** - // Video Conference - /// - /// 1201 - /// - public const uint VCKeypadWithFavoritesVisible = 1201; - /// - /// 1202 - /// - public const uint VCStagingInactivePopoverWithRecentsVisible = 1202; - /// - /// - /// - public const uint VCStagingActivePopoverVisible = 1203; - /// - /// - /// - public const uint VCKeypadVisible = 1204; - /// - /// 1205 - /// - public const uint VCDirectoryVisible = 1205; - /// - /// 1206 - /// - public const uint VCRecentsVisible = 1206; - - /// - /// 1202 - /// - public const uint VCStagingInactivePopoverWithoutRecentsVisible = 1207; - - /// - /// 1208 - /// - public const uint VCCameraAutoVisible = 1208; - - /// - /// 1209 - /// - public const uint VCCameraManualVisible = 1209; - - /// - /// 1210 - /// - public const uint VCCameraOffVisible = 1210; - - /// - /// 1211 - 1215 - /// - public const uint VCFavoritePressStart = 1211; - // RANGE IN USE - public const uint VCFavoritePressEnd = 1215; - /// - /// 1221 - 1225 - /// - public const uint VCFavoriteVisibleStart = 1221; - // RANGE IN USE - public const uint VCFavoriteVisibleEnd = 1225; - - /// - /// 1230 - /// - public const uint VCStagingMeetNowPress = 1230; - /// - /// 1231 - /// - public const uint VCStagingRecentsPress = 1231; - /// - /// 1232 - /// - public const uint VCStagingDirectoryPress = 1232; - /// - /// 1233 - /// - public const uint VCStagingKeypadPress = 1233; - /// - /// 1234 - /// - public const uint VCStagingConnectPress = 1234; - /// - /// 1235 - /// - public const uint VCStagingCameraPress = 1235; - /// - /// 1236 - /// - public const uint VCStagingConnectEnable = 1236; - /// - /// 1237 - When the user touches the text field, should trigger keyboard - /// - public const uint VCKeypadTextPress = 1237; - /// - /// 1238 - /// - public const uint VCKeypadBackspacePress = 1238; - /// - /// 1239 - /// - public const uint VCKeypadBackspaceVisible = 1239; - /// - /// 1240 - /// - public const uint VCDirectoryBackPress = 1240; - /// - /// 1241 For touching the text area to bring up keyboard - /// - public const uint VCDirectorySearchTextPress = 1241; - /// - /// 1242 - /// - public const uint VCStagingSelfViewLayoutPress = 1242; - /// - /// 1243 - /// - public const uint VCDirectoryBackVisible = 1243; - /// - /// 1244 - /// - public const uint VCDirectoryBackspacePress = 1244; - /// - /// 1245 - /// - public const uint VCDirectoryBackspaceVisible = 1245; - /// - /// 1251 - /// - public const uint VCSelfViewTogglePress = 1251; - /// - /// 1252 - /// - public const uint VCLayoutTogglePress = 1252; - /// - /// 1253 - /// - public const uint VCSelfViewPipTogglePress = 1253; - /// - /// 1254 - /// - public const uint VCLayoutToggleEnable = 1254; - /// - /// 1255 - /// - public const uint VCMinMaxPress = 1255; - /// - /// 1256 - /// - public const uint VCMinMaxEnable = 1256; - - /// - /// 1260 - /// - public const uint VCCameraModeBarVisible = 1260; - - /// - /// 1261 - /// - public const uint VCCameraSelectBarWithoutModeVisible = 1261; - - /// - /// 1262 - /// - public const uint VCCameraAutoModeIsOnFb = 1262; - - /// - /// 1271 - /// - public const uint VCCameraZoomIn = 1271; - /// - /// 1272 - /// - public const uint VCCameraZoomOut = 1272; - - - /// - /// 1280 - /// - public const uint VCCameraPresetSavedLabelVisible = 1280; - /// - /// 1281 - /// - public const uint VCCameraPreset1 = 1281; - /// - /// 1282 - /// - public const uint VCCameraPreset2 = 1282; - /// - /// 1283 - /// - public const uint VCCameraPreset3 = 1283; - - - /// - /// 1291 - /// - public const uint VCCameraPreset1Visible = 1291; - /// - /// 1292 - /// - public const uint VCCameraPreset2Visible = 1292; - /// - /// 1293 - /// - public const uint VCCameraPreset3Visible = 1293; - - - // Letter joins start at 2921; - - //****************************************************** - - // Environment Joins - - // Popup Container - - /// - /// 2001 - 2004 - /// - public const uint EnvironmentBackgroundSubpageVisibleBase = 2000; - - - // ColumnOne - - /// - /// 2011 - 2015 - /// - public const uint EnvironmentColumnOneLightingTypeVisibleBase = 2010; - - /// - /// 2016 - 2020 - /// - public const uint EnvironmentColumnOneShadingTypeVisibleBase = 2015; - - // ColumnTwo - - /// - /// 2021 - 2025 - /// - public const uint EnvironmentColumnTwoLightingTypeVisibleBase = 2020; - - /// - /// 2026 - 2030 - /// - public const uint EnvironmentColumnTwoShadingTypeVisibleBase = 2025; - - // ColumnThree - - /// - /// 2031 - 2035 - /// - public const uint EnvironmentColumnThreeLightingTypeVisibleBase = 2030; - - /// - /// 2036 - 2040 - /// - public const uint EnvironmentColumnThreeShadingTypeVisibleBase = 2035; - - // ColumnFour - - /// - /// 2041 - 2045 - /// - public const uint EnvironmentColumnFourLightingTypeVisibleBase = 2040; - - /// - /// 2046 - 2050 - /// - public const uint EnvironmentColumnFourShadingTypeVisibleBase = 2045; - - // Button press - - /// - /// 2051 - 2060 - /// - public const uint EnvironmentColumnOneButtonPressBase = 2050; - - /// - /// 2061 - 2070 - /// - public const uint EnvironmentColumnTwoButtonPressBase = 2060; - - /// - /// 2071 - 2080 - /// - public const uint EnvironmentColumnThreeButtonPressBase = 2070; - - /// - /// 2081 - 2090 - /// - public const uint EnvironmentColumnFourButtonPressBase = 2080; - - // Button visibility - - /// - /// 2151 - 2160 - /// - public const uint EnvironmentColumnOneButtonVisibleBase = 2150; - - /// - /// 2161 - 2170 - /// - public const uint EnvironmentColumnTwoButtonVisibleBase = 2160; - - /// - /// 2171 - 2180 - /// - public const uint EnvironmentColumnThreeButtonVisibleBase = 2170; - - /// - /// 2181 - 2190 - /// - public const uint EnvironmentColumnFourButtonVisibleBase = 2180; - - - //****************************************************** - - /// - /// 3101 - /// - public const uint TechExitButton = 3101; - /// - /// 3106 - /// - public const uint TechCommonItemsVisbible = 3106; - /// - /// 3107 - /// - public const uint TechSystemStatusVisible = 3107; - /// - /// 3108 - /// - public const uint TechDisplayControlsVisible = 3108; - /// - /// 3109 - /// - public const uint TechPanelSetupVisible = 3109; - /// - /// 3110 - /// - public const uint TechAdvancedVolumeVisible = 3110; - /// - /// 3111 - /// - public const uint TechAboutVisible = 3111; - /// - /// 3112 - /// - public const uint TechSchedulerVisible = 3112; - - //***************************************************** - /// - /// 3811 - /// - public const uint VolumeSingleMute1Visible = 3811; - /// - /// 3812 - /// - public const uint VolumeSlider1Press = 3812; - /// - /// 3813 - /// - public const uint Volume1ProgramMutePressAndFB = 3813; - /// - /// 3821 - /// - public const uint Volume2Visible = 3821; - /// - /// 3822 - /// - public const uint VolumeSlider2Press = 3822; - /// - /// 3823 - /// - public const uint Volume2MutePressAndFB = 3823; - /// - /// 3831 - /// - public const uint Volume3Visible = 3831; - /// - /// 3832 - /// - public const uint VolumeSlider3Press = 3832; - /// - /// 3833 - /// - public const uint Volume3MutePressAndFB = 3833; - /// - /// 3841 - /// - public const uint Volume4Visible = 3841; - /// - /// 3842 - /// - public const uint VolumeSlider4Press = 3842; - /// - /// 3843 - /// - public const uint Volume4MutePressAndFB = 3843; - /// - /// 3851 - /// - public const uint Volume5Visible = 3851; - /// - /// 3852 - /// - public const uint VolumeSlider5Press = 3852; - /// - /// 3853 - /// - public const uint Volume5MutePressAndFB = 3853; - /// - /// 3861 - /// - public const uint Volume6Visible = 3861; - /// - /// 3862 - /// - public const uint VolumeSlider6Press = 3862; - /// - /// 3863 - /// - public const uint Volume6MutePressAndFB = 3863; - - /// - /// 3869 - when the system is off and the gear is pressed - /// - public const uint VolumesPagePowerOffVisible = 3869; - /// - /// 3870 - /// - public const uint VolumesPageVisible = 3870; - /// - /// 3871 - /// - public const uint VolumeDualMute1Visible = 3871; - /// - /// 3874 - /// - public const uint Volume1SpeechMutePressAndFB = 3874; - /// - /// 3875 - /// - public const uint Volume1BackerVisibility = 3875; - /// - /// 3891 - /// - public const uint VolumeDefaultPress = 3891; - /// - /// 3951 - /// - /// 3952 - ///
- public const uint HeaderIcon2Press = 3952; - /// - /// 3953 - /// - public const uint HeaderIcon3Press = 3953; - /// - /// 3954 - /// - public const uint HeaderIcon4Press = 3954; - /// - /// 3955 - /// - public const uint HeaderIcon5Press = 3955; - - /// 3960 - ///
- public const uint HeaderPopupCaretsSubpageVisibile = 3960; - /// - /// 3961 - /// - public const uint HeaderCaret1Visible = 3961; - /// - /// 3962 - /// - public const uint HeaderCaret2Visible = 3962; - /// - /// 3963 - /// - public const uint HeaderCaret3Visible = 3963; - /// - /// 3964 - /// - public const uint HeaderCaret4Visible = 3964; - /// - /// 3965 - /// - public const uint HeaderCaret5Visible = 3965; - - /// - /// 3999 - /// - public const uint GenericModalVisible = 3999; - /// - /// 12345 - /// - public const uint AvNoControlsSubVisible = 12345; - - // 10000 - 14999 are general "source" pages - - /// - /// 15001 - /// - public const uint StartPageVisible = 15001; - /// - /// 15002 Shows the start page in the source controls area of the screen - /// - public const uint TapToBeginVisible = 15002; - /// - /// 15003 Message text when no source is showing - /// - public const uint SelectASourceVisible = 15003; - /// - /// 15004 - /// - public const uint RoomIsOn = 15004; - /// - /// 15005 Shows always-on volume control subpage with only audio mute - /// - public const uint VolumeControlsSingleMuteVisible = 15005; - /// - /// 15006 Shows always-on volume control subpage with mic and audio mutes - /// - public const uint VolumeControlsDualMuteVisible = 15006; - /// - /// 15010 - /// - public const uint ShowPanelSetupPress = 15010; - /// - /// 15011 - Top bar with room name and button that pops up dialog with room data - /// - public const uint TopBarHabaneroVisible = 15011; - /// - /// 15012 - /// - public const uint SourceStagingBarVisible = 15012; - /// - /// 15013 - /// - public const uint PowerOffStep1Visible = 15013; - /// - /// 15014 - /// - public const uint PowerOffStep2Visible = 15014; - /// - /// 15015 - /// - public const uint ShowPowerOffPress = 15015; - /// - /// 15016 - /// - public const uint PowerOffMorePress = 15016; - /// - /// 15017 - /// - public const uint StagingPageAdditionalArrowsVisible = 15017; - /// - /// 15018 The Header with dynamic buttons - /// - public const uint TopBarHabaneroDynamicVisible = 15018; - /// - /// 15019 Shown when system is starting and not ready for use - /// - public const uint SystemInitializingVisible = 15019; - /// - /// 15020 - /// - public const uint PanelSetupVisible = 15020; - /// - /// 15021 - /// - public const uint SourceWaitOverlayVisible = 15021; - /// - /// 15022 - /// - public const uint ActivityFooterVisible = 15022; - /// - /// 15024 - /// - public const uint HeaderCallStatusLeftPositionVisible = 15024; - /// - /// 15025 - /// - public const uint HeaderCallStatusRightPositionVisible = 15025; - /// - /// 15027 - /// - public const uint HeaderCallStatusLabelPress = 15027; - /// - /// 15028 The gear button in header - /// - public const uint FIXFIX_HeaderGearButtonPress_FIXFIX = 15028; - /// - /// 15029 the room button in header - /// - public const uint HeaderRoomButtonPress = 15029; - /// - /// 15030 Visibility for room data popup - /// - public const uint RoomHeaderInfoPageVisible = 15030; - /// - /// 15031 - /// - public const uint AllRoomsOffPress = 15031; - /// - /// 15032 - /// - public const uint DisplayPowerTogglePress = 15032; - /// - /// 15033 - /// - public const uint PowerOffCancelPress = 15033; - /// - /// 15034 - /// - public const uint PowerOffConfirmPress = 15034; - /// - /// 15035 - /// - public const uint VolumeButtonPopupPress = 15035; - /// - /// 15035 - /// - public const uint VolumeButtonPopupVisible = 15035; - /// - /// 15036 - /// - public const uint VolumeGaugePopupVisible = 15036; - /// - /// 15037 - /// - public const uint GearButtonVisible = 15037; - /// - /// 15038 - /// - public const uint CalendarHeaderButtonVisible = 15038; - /// - /// 15039 - /// - public const uint CalendarHeaderButtonPress = 15039; - /// - /// 15040 - /// - public const uint CallStatusPageVisible = 15040; - /// - /// 15041 - /// - public const uint LightsPageVisible = 15041; - /// - /// 15042 Closes whichever interlocked modal is open - /// - public const uint InterlockedModalClosePress = 15042; - /// - /// 15043 Vis for modal backer for full-screen source - /// - public const uint SourceBackgroundOverlayVisible = 15043; - /// - /// 15044 Close button for source modal overlay - /// - public const uint SourceBackgroundOverlayClosePress = 15044; - /// - /// 15045 - /// - public const uint ZoomRoomContentSharingVisible = 15045; - /// - /// 15046 - /// - public const uint MeetingsOrContacMethodsListVisible = 15046; - /// - /// 15047 The "Join" button on the next meeting ribbon - /// - public const uint NextMeetingJoinPress = 15047; - /// - /// 15048 Dismisses the ribbon - /// - public const uint NextMeetingModalClosePress = 15048; - /// - /// 15049 - /// - public const uint NextMeetingModalVisible = 15049; - /// - /// 15050 - /// - public const uint NextMeetingNotificationRibbonVisible = 15050; - /// - /// 15051 - /// - public const uint Display1SelectPressAndFb = 15051; - /// - /// 15052 - /// - public const uint Display1ControlButtonEnable = 15052; - /// - /// 15053 - /// - public const uint Display1ControlButtonPress = 15053; - /// - /// 15054 - /// - public const uint Display1AudioButtonEnable = 15054; - /// - /// 15055 - /// - public const uint Display1AudioButtonPressAndFb = 15055; - /// - /// 15056 - /// - public const uint Display2SelectPressAndFb = 15056; - /// - /// 15057 - /// - public const uint Display2ControlButtonEnable = 15057; - /// - /// 15058 - /// - public const uint Display2ControlButtonPress = 15058; - /// - /// 15059 - /// - public const uint Display2AudioButtonEnable = 15059; - /// - /// 15060 - /// - public const uint Display2AudioButtonPressAndFb = 15060; - /// - /// 15061 Reveals the dual-display subpage - /// - public const uint DualDisplayPageVisible = 15061; - /// - /// 15062 Reveals the toggle switch for the sharing mode - /// - public const uint ToggleSharingModeVisible = 15062; - /// - /// 15063 Press for the toggle mode switch - /// - public const uint ToggleSharingModePress = 15063; - /// - /// 15064 - /// - public const uint LogoDefaultVisible = 15064; - /// - /// 15065 - /// - public const uint LogoUrlVisible = 15065; - /// - /// 15066 - Reveals the active calls header item - /// - public const uint HeaderActiveCallsListVisible = 15066; - /// - /// 15067 - /// - public const uint NotificationRibbonVisible = 15067; - /// - /// 15068 - /// - public const uint HeaderMeetingInfoVisible = 15068; - - /// - /// 15083 - Press for Call help desk on AC/VC - /// - public const uint HelpPageShowCallButtonPress = 15083; - /// - /// 15084 - Show the "call help desk" button on help page - /// - public const uint HelpPageShowCallButtonVisible = 15084; - /// - /// 15085 Visibility join for help subpage - /// - public const uint HelpPageVisible = 15085; - /// - /// 15086 Press for help header button - /// - public const uint HelpPress = 15086; - /// - /// 15088 - /// - public const uint DateOnlyVisible = 15088; - /// - /// 15089 - /// - public const uint TimeOnlyVisible = 15089; - /// - /// 15090 - /// - public const uint DateAndTimeVisible = 15090; - /// - /// 15091 - /// - public const uint SetupFullDistrib = 15091; - - /// - /// 15092 - /// - public const uint StartMCPageVisible = 15092; - - - /// - /// 15093 - /// - public const uint RoomHeaderInfoMCPageVisible = 15093; - - /// - /// 15094 - /// - public const uint MCScreenSaverVisible = 15094; - - /// - /// 15095 - /// - public const uint MCScreenSaverPosition1Visible = 15095; - - /// - /// 15096 - /// - public const uint MCScreenSaverPosition2Visible = 15096; - - /// - /// 15097 - /// - public const uint MCScreenSaverPosition3Visible = 15097; - - /// - /// 15098 - /// - public const uint MCScreenSaverPosition4Visible = 15098; - - /// - /// 15099 - /// - public const uint MCScreenSaverClosePress = 15099; - - // PIN dialogs ************************************ - - /// - /// 15201 - /// - public const uint PinDialog4DigitVisible = 15201; - /// - /// 15206 - /// - public const uint PinDialogCancelPress = 15206; - /// - /// 15207 - /// - public const uint PinDialogErrorVisible = 15207; - /// - /// 15211 - /// - public const uint PinDialogDot1 = 15211; - /// - /// 15212 - /// - public const uint PinDialogDot2 = 15212; - /// - /// 15213 - /// - public const uint PinDialogDot3 = 15213; - /// - /// 15214 - /// - public const uint PinDialogDot4 = 15214; - - // Password Prompt Dialog ************************** - - /// - /// 15301 - /// - public const uint PasswordPromptDialogVisible = 15301; - /// - /// 15302 - /// - public const uint PasswordPromptTextPress = 15302; - /// - /// 15306 - /// - public const uint PasswordPromptCancelPress = 15306; - /// - /// 15307 - /// - public const uint PasswordPromptErrorVisible = 15307; - } +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DeviceSupport; + +namespace PepperDash.Essentials +{ + /// + /// Where all UI element common joins are defined + /// + public class UIBoolJoin + { + /// + /// 901 + /// + public const uint VolumeUpPress = 901; + /// + /// 902 + /// + public const uint VolumeDownPress = 902; + + //**************************************************** + // Codec General + + /// + /// 1001 + /// + public const uint CallEndPress = 1001; + /// + /// 1002 + /// + public const uint CallEndAllConfirmPress = 1002; + /// + /// 1003 - For tapping the text field to reveal the keyboard + /// + public const uint CodecDirectorySearchTextPress = 1003; + /// + /// 1004 + /// + public const uint CallStopSharingPress = 1004; + /// + /// 1005 + /// + public const uint CallSharedSourceInfoVisible = 1005; + /// + /// 1006 + /// + public const uint CallEndAllConfirmVisible = 1006; + /// + /// 1007 + /// + public const uint MeetingPasswordVisible = 1007; + /// + /// 1008 + /// + public const uint MeetingLeavePress = 1008; + + + + + + // Audio Conference + /// + /// 1101 + /// + public const uint ACKeypadVisible = 1101; + /// + /// 1102 + /// + public const uint ACStagingPopoverVisible = 1102; + /// + /// 1111 + /// + public const uint ACSpeedDial1Press = 1111; + /// + /// 1112 + /// + public const uint ACSpeedDial2Press = 1112; + /// + /// 1113 + /// + public const uint ACSpeedDial3Press = 1113; + /// + /// 1114 + /// + public const uint ACSpeedDial4Press = 1114; + /// + /// 1121 + /// + public const uint ACSpeedDial1Visible = 1121; + /// + /// 1122 + /// + public const uint ACSpeedDial2Visible = 1122; + /// + /// 1123 + /// + public const uint ACSpeedDial3Visible = 1123; + /// + /// 1124 + /// + public const uint ACSpeedDial4Visible = 1124; + + //****************************************************** + // Video Conference + /// + /// 1201 + /// + public const uint VCKeypadWithFavoritesVisible = 1201; + /// + /// 1202 + /// + public const uint VCStagingInactivePopoverWithRecentsVisible = 1202; + /// + /// + /// + public const uint VCStagingActivePopoverVisible = 1203; + /// + /// + /// + public const uint VCKeypadVisible = 1204; + /// + /// 1205 + /// + public const uint VCDirectoryVisible = 1205; + /// + /// 1206 + /// + public const uint VCRecentsVisible = 1206; + + /// + /// 1202 + /// + public const uint VCStagingInactivePopoverWithoutRecentsVisible = 1207; + + /// + /// 1208 + /// + public const uint VCCameraAutoVisible = 1208; + + /// + /// 1209 + /// + public const uint VCCameraManualVisible = 1209; + + /// + /// 1210 + /// + public const uint VCCameraOffVisible = 1210; + + /// + /// 1211 - 1215 + /// + public const uint VCFavoritePressStart = 1211; + // RANGE IN USE + public const uint VCFavoritePressEnd = 1215; + /// + /// 1221 - 1225 + /// + public const uint VCFavoriteVisibleStart = 1221; + // RANGE IN USE + public const uint VCFavoriteVisibleEnd = 1225; + + /// + /// 1230 + /// + public const uint VCStagingMeetNowPress = 1230; + /// + /// 1231 + /// + public const uint VCStagingRecentsPress = 1231; + /// + /// 1232 + /// + public const uint VCStagingDirectoryPress = 1232; + /// + /// 1233 + /// + public const uint VCStagingKeypadPress = 1233; + /// + /// 1234 + /// + public const uint VCStagingConnectPress = 1234; + /// + /// 1235 + /// + public const uint VCStagingCameraPress = 1235; + /// + /// 1236 + /// + public const uint VCStagingConnectEnable = 1236; + /// + /// 1237 - When the user touches the text field, should trigger keyboard + /// + public const uint VCKeypadTextPress = 1237; + /// + /// 1238 + /// + public const uint VCKeypadBackspacePress = 1238; + /// + /// 1239 + /// + public const uint VCKeypadBackspaceVisible = 1239; + /// + /// 1240 + /// + public const uint VCDirectoryBackPress = 1240; + /// + /// 1241 For touching the text area to bring up keyboard + /// + public const uint VCDirectorySearchTextPress = 1241; + /// + /// 1242 + /// + public const uint VCStagingSelfViewLayoutPress = 1242; + /// + /// 1243 + /// + public const uint VCDirectoryBackVisible = 1243; + /// + /// 1244 + /// + public const uint VCDirectoryBackspacePress = 1244; + /// + /// 1245 + /// + public const uint VCDirectoryBackspaceVisible = 1245; + /// + /// 1251 + /// + public const uint VCSelfViewTogglePress = 1251; + /// + /// 1252 + /// + public const uint VCLayoutTogglePress = 1252; + /// + /// 1253 + /// + public const uint VCSelfViewPipTogglePress = 1253; + /// + /// 1254 + /// + public const uint VCLayoutToggleEnable = 1254; + /// + /// 1255 + /// + public const uint VCMinMaxPress = 1255; + /// + /// 1256 + /// + public const uint VCMinMaxEnable = 1256; + + /// + /// 1260 + /// + public const uint VCCameraModeBarVisible = 1260; + + /// + /// 1261 + /// + public const uint VCCameraSelectBarWithoutModeVisible = 1261; + + /// + /// 1262 + /// + public const uint VCCameraAutoModeIsOnFb = 1262; + + /// + /// 1271 + /// + public const uint VCCameraZoomIn = 1271; + /// + /// 1272 + /// + public const uint VCCameraZoomOut = 1272; + + + /// + /// 1280 + /// + public const uint VCCameraPresetSavedLabelVisible = 1280; + /// + /// 1281 + /// + public const uint VCCameraPreset1 = 1281; + /// + /// 1282 + /// + public const uint VCCameraPreset2 = 1282; + /// + /// 1283 + /// + public const uint VCCameraPreset3 = 1283; + + + /// + /// 1291 + /// + public const uint VCCameraPreset1Visible = 1291; + /// + /// 1292 + /// + public const uint VCCameraPreset2Visible = 1292; + /// + /// 1293 + /// + public const uint VCCameraPreset3Visible = 1293; + + + // Letter joins start at 2921; + + //****************************************************** + + // Environment Joins + + // Popup Container + + /// + /// 2001 - 2004 + /// + public const uint EnvironmentBackgroundSubpageVisibleBase = 2000; + + + // ColumnOne + + /// + /// 2011 - 2015 + /// + public const uint EnvironmentColumnOneLightingTypeVisibleBase = 2010; + + /// + /// 2016 - 2020 + /// + public const uint EnvironmentColumnOneShadingTypeVisibleBase = 2015; + + // ColumnTwo + + /// + /// 2021 - 2025 + /// + public const uint EnvironmentColumnTwoLightingTypeVisibleBase = 2020; + + /// + /// 2026 - 2030 + /// + public const uint EnvironmentColumnTwoShadingTypeVisibleBase = 2025; + + // ColumnThree + + /// + /// 2031 - 2035 + /// + public const uint EnvironmentColumnThreeLightingTypeVisibleBase = 2030; + + /// + /// 2036 - 2040 + /// + public const uint EnvironmentColumnThreeShadingTypeVisibleBase = 2035; + + // ColumnFour + + /// + /// 2041 - 2045 + /// + public const uint EnvironmentColumnFourLightingTypeVisibleBase = 2040; + + /// + /// 2046 - 2050 + /// + public const uint EnvironmentColumnFourShadingTypeVisibleBase = 2045; + + // Button press + + /// + /// 2051 - 2060 + /// + public const uint EnvironmentColumnOneButtonPressBase = 2050; + + /// + /// 2061 - 2070 + /// + public const uint EnvironmentColumnTwoButtonPressBase = 2060; + + /// + /// 2071 - 2080 + /// + public const uint EnvironmentColumnThreeButtonPressBase = 2070; + + /// + /// 2081 - 2090 + /// + public const uint EnvironmentColumnFourButtonPressBase = 2080; + + // Button visibility + + /// + /// 2151 - 2160 + /// + public const uint EnvironmentColumnOneButtonVisibleBase = 2150; + + /// + /// 2161 - 2170 + /// + public const uint EnvironmentColumnTwoButtonVisibleBase = 2160; + + /// + /// 2171 - 2180 + /// + public const uint EnvironmentColumnThreeButtonVisibleBase = 2170; + + /// + /// 2181 - 2190 + /// + public const uint EnvironmentColumnFourButtonVisibleBase = 2180; + + + //****************************************************** + + /// + /// 3101 + /// + public const uint TechExitButton = 3101; + /// + /// 3106 + /// + public const uint TechCommonItemsVisbible = 3106; + /// + /// 3107 + /// + public const uint TechSystemStatusVisible = 3107; + /// + /// 3108 + /// + public const uint TechDisplayControlsVisible = 3108; + /// + /// 3109 + /// + public const uint TechPanelSetupVisible = 3109; + /// + /// 3110 + /// + public const uint TechAdvancedVolumeVisible = 3110; + /// + /// 3111 + /// + public const uint TechAboutVisible = 3111; + /// + /// 3112 + /// + public const uint TechSchedulerVisible = 3112; + + //***************************************************** + /// + /// 3811 + /// + public const uint VolumeSingleMute1Visible = 3811; + /// + /// 3812 + /// + public const uint VolumeSlider1Press = 3812; + /// + /// 3813 + /// + public const uint Volume1ProgramMutePressAndFB = 3813; + /// + /// 3821 + /// + public const uint Volume2Visible = 3821; + /// + /// 3822 + /// + public const uint VolumeSlider2Press = 3822; + /// + /// 3823 + /// + public const uint Volume2MutePressAndFB = 3823; + /// + /// 3831 + /// + public const uint Volume3Visible = 3831; + /// + /// 3832 + /// + public const uint VolumeSlider3Press = 3832; + /// + /// 3833 + /// + public const uint Volume3MutePressAndFB = 3833; + /// + /// 3841 + /// + public const uint Volume4Visible = 3841; + /// + /// 3842 + /// + public const uint VolumeSlider4Press = 3842; + /// + /// 3843 + /// + public const uint Volume4MutePressAndFB = 3843; + /// + /// 3851 + /// + public const uint Volume5Visible = 3851; + /// + /// 3852 + /// + public const uint VolumeSlider5Press = 3852; + /// + /// 3853 + /// + public const uint Volume5MutePressAndFB = 3853; + /// + /// 3861 + /// + public const uint Volume6Visible = 3861; + /// + /// 3862 + /// + public const uint VolumeSlider6Press = 3862; + /// + /// 3863 + /// + public const uint Volume6MutePressAndFB = 3863; + + /// + /// 3869 - when the system is off and the gear is pressed + /// + public const uint VolumesPagePowerOffVisible = 3869; + /// + /// 3870 + /// + public const uint VolumesPageVisible = 3870; + /// + /// 3871 + /// + public const uint VolumeDualMute1Visible = 3871; + /// + /// 3874 + /// + public const uint Volume1SpeechMutePressAndFB = 3874; + /// + /// 3875 + /// + public const uint Volume1BackerVisibility = 3875; + /// + /// 3891 + /// + public const uint VolumeDefaultPress = 3891; + /// + /// 3951 + /// + /// 3952 + ///
+ public const uint HeaderIcon2Press = 3952; + /// + /// 3953 + /// + public const uint HeaderIcon3Press = 3953; + /// + /// 3954 + /// + public const uint HeaderIcon4Press = 3954; + /// + /// 3955 + /// + public const uint HeaderIcon5Press = 3955; + + /// 3960 + /// + public const uint HeaderPopupCaretsSubpageVisibile = 3960; + /// + /// 3961 + /// + public const uint HeaderCaret1Visible = 3961; + /// + /// 3962 + /// + public const uint HeaderCaret2Visible = 3962; + /// + /// 3963 + /// + public const uint HeaderCaret3Visible = 3963; + /// + /// 3964 + /// + public const uint HeaderCaret4Visible = 3964; + /// + /// 3965 + /// + public const uint HeaderCaret5Visible = 3965; + + /// + /// 3999 + /// + public const uint GenericModalVisible = 3999; + /// + /// 12345 + /// + public const uint AvNoControlsSubVisible = 12345; + + // 10000 - 14999 are general "source" pages + + /// + /// 15001 + /// + public const uint StartPageVisible = 15001; + /// + /// 15002 Shows the start page in the source controls area of the screen + /// + public const uint TapToBeginVisible = 15002; + /// + /// 15003 Message text when no source is showing + /// + public const uint SelectASourceVisible = 15003; + /// + /// 15004 + /// + public const uint RoomIsOn = 15004; + /// + /// 15005 Shows always-on volume control subpage with only audio mute + /// + public const uint VolumeControlsSingleMuteVisible = 15005; + /// + /// 15006 Shows always-on volume control subpage with mic and audio mutes + /// + public const uint VolumeControlsDualMuteVisible = 15006; + /// + /// 15010 + /// + public const uint ShowPanelSetupPress = 15010; + /// + /// 15011 - Top bar with room name and button that pops up dialog with room data + /// + public const uint TopBarHabaneroVisible = 15011; + /// + /// 15012 + /// + public const uint SourceStagingBarVisible = 15012; + /// + /// 15013 + /// + public const uint PowerOffStep1Visible = 15013; + /// + /// 15014 + /// + public const uint PowerOffStep2Visible = 15014; + /// + /// 15015 + /// + public const uint ShowPowerOffPress = 15015; + /// + /// 15016 + /// + public const uint PowerOffMorePress = 15016; + /// + /// 15017 + /// + public const uint StagingPageAdditionalArrowsVisible = 15017; + /// + /// 15018 The Header with dynamic buttons + /// + public const uint TopBarHabaneroDynamicVisible = 15018; + /// + /// 15019 Shown when system is starting and not ready for use + /// + public const uint SystemInitializingVisible = 15019; + /// + /// 15020 + /// + public const uint PanelSetupVisible = 15020; + /// + /// 15021 + /// + public const uint SourceWaitOverlayVisible = 15021; + /// + /// 15022 + /// + public const uint ActivityFooterVisible = 15022; + /// + /// 15024 + /// + public const uint HeaderCallStatusLeftPositionVisible = 15024; + /// + /// 15025 + /// + public const uint HeaderCallStatusRightPositionVisible = 15025; + /// + /// 15027 + /// + public const uint HeaderCallStatusLabelPress = 15027; + /// + /// 15028 The gear button in header + /// + public const uint FIXFIX_HeaderGearButtonPress_FIXFIX = 15028; + /// + /// 15029 the room button in header + /// + public const uint HeaderRoomButtonPress = 15029; + /// + /// 15030 Visibility for room data popup + /// + public const uint RoomHeaderInfoPageVisible = 15030; + /// + /// 15031 + /// + public const uint AllRoomsOffPress = 15031; + /// + /// 15032 + /// + public const uint DisplayPowerTogglePress = 15032; + /// + /// 15033 + /// + public const uint PowerOffCancelPress = 15033; + /// + /// 15034 + /// + public const uint PowerOffConfirmPress = 15034; + /// + /// 15035 + /// + public const uint VolumeButtonPopupPress = 15035; + /// + /// 15035 + /// + public const uint VolumeButtonPopupVisible = 15035; + /// + /// 15036 + /// + public const uint VolumeGaugePopupVisible = 15036; + /// + /// 15037 + /// + public const uint GearButtonVisible = 15037; + /// + /// 15038 + /// + public const uint CalendarHeaderButtonVisible = 15038; + /// + /// 15039 + /// + public const uint CalendarHeaderButtonPress = 15039; + /// + /// 15040 + /// + public const uint CallStatusPageVisible = 15040; + /// + /// 15041 + /// + public const uint LightsPageVisible = 15041; + /// + /// 15042 Closes whichever interlocked modal is open + /// + public const uint InterlockedModalClosePress = 15042; + /// + /// 15043 Vis for modal backer for full-screen source + /// + public const uint SourceBackgroundOverlayVisible = 15043; + /// + /// 15044 Close button for source modal overlay + /// + public const uint SourceBackgroundOverlayClosePress = 15044; + /// + /// 15045 + /// + public const uint ZoomRoomContentSharingVisible = 15045; + /// + /// 15046 + /// + public const uint MeetingsOrContacMethodsListVisible = 15046; + /// + /// 15047 The "Join" button on the next meeting ribbon + /// + public const uint NextMeetingJoinPress = 15047; + /// + /// 15048 Dismisses the ribbon + /// + public const uint NextMeetingModalClosePress = 15048; + /// + /// 15049 + /// + public const uint NextMeetingModalVisible = 15049; + /// + /// 15050 + /// + public const uint NextMeetingNotificationRibbonVisible = 15050; + /// + /// 15051 + /// + public const uint Display1SelectPressAndFb = 15051; + /// + /// 15052 + /// + public const uint Display1ControlButtonEnable = 15052; + /// + /// 15053 + /// + public const uint Display1ControlButtonPress = 15053; + /// + /// 15054 + /// + public const uint Display1AudioButtonEnable = 15054; + /// + /// 15055 + /// + public const uint Display1AudioButtonPressAndFb = 15055; + /// + /// 15056 + /// + public const uint Display2SelectPressAndFb = 15056; + /// + /// 15057 + /// + public const uint Display2ControlButtonEnable = 15057; + /// + /// 15058 + /// + public const uint Display2ControlButtonPress = 15058; + /// + /// 15059 + /// + public const uint Display2AudioButtonEnable = 15059; + /// + /// 15060 + /// + public const uint Display2AudioButtonPressAndFb = 15060; + /// + /// 15061 Reveals the dual-display subpage + /// + public const uint DualDisplayPageVisible = 15061; + /// + /// 15062 Reveals the toggle switch for the sharing mode + /// + public const uint ToggleSharingModeVisible = 15062; + /// + /// 15063 Press for the toggle mode switch + /// + public const uint ToggleSharingModePress = 15063; + /// + /// 15064 + /// + public const uint LogoDefaultVisible = 15064; + /// + /// 15065 + /// + public const uint LogoUrlVisible = 15065; + /// + /// 15066 - Reveals the active calls header item + /// + public const uint HeaderActiveCallsListVisible = 15066; + /// + /// 15067 + /// + public const uint NotificationRibbonVisible = 15067; + /// + /// 15068 + /// + public const uint HeaderMeetingInfoVisible = 15068; + + /// + /// 15083 - Press for Call help desk on AC/VC + /// + public const uint HelpPageShowCallButtonPress = 15083; + /// + /// 15084 - Show the "call help desk" button on help page + /// + public const uint HelpPageShowCallButtonVisible = 15084; + /// + /// 15085 Visibility join for help subpage + /// + public const uint HelpPageVisible = 15085; + /// + /// 15086 Press for help header button + /// + public const uint HelpPress = 15086; + /// + /// 15088 + /// + public const uint DateOnlyVisible = 15088; + /// + /// 15089 + /// + public const uint TimeOnlyVisible = 15089; + /// + /// 15090 + /// + public const uint DateAndTimeVisible = 15090; + /// + /// 15091 + /// + public const uint SetupFullDistrib = 15091; + + /// + /// 15092 + /// + public const uint StartMCPageVisible = 15092; + + + /// + /// 15093 + /// + public const uint RoomHeaderInfoMCPageVisible = 15093; + + /// + /// 15094 + /// + public const uint MCScreenSaverVisible = 15094; + + /// + /// 15095 + /// + public const uint MCScreenSaverPosition1Visible = 15095; + + /// + /// 15096 + /// + public const uint MCScreenSaverPosition2Visible = 15096; + + /// + /// 15097 + /// + public const uint MCScreenSaverPosition3Visible = 15097; + + /// + /// 15098 + /// + public const uint MCScreenSaverPosition4Visible = 15098; + + /// + /// 15099 + /// + public const uint MCScreenSaverClosePress = 15099; + + // PIN dialogs ************************************ + + /// + /// 15201 + /// + public const uint PinDialog4DigitVisible = 15201; + /// + /// 15206 + /// + public const uint PinDialogCancelPress = 15206; + /// + /// 15207 + /// + public const uint PinDialogErrorVisible = 15207; + /// + /// 15211 + /// + public const uint PinDialogDot1 = 15211; + /// + /// 15212 + /// + public const uint PinDialogDot2 = 15212; + /// + /// 15213 + /// + public const uint PinDialogDot3 = 15213; + /// + /// 15214 + /// + public const uint PinDialogDot4 = 15214; + + // Password Prompt Dialog ************************** + + /// + /// 15301 + /// + public const uint PasswordPromptDialogVisible = 15301; + /// + /// 15302 + /// + public const uint PasswordPromptTextPress = 15302; + /// + /// 15306 + /// + public const uint PasswordPromptCancelPress = 15306; + /// + /// 15307 + /// + public const uint PasswordPromptErrorVisible = 15307; + } } \ No newline at end of file diff --git a/PepperDashEssentials/UI/JoinConstants/UISmartObjectJoin.cs b/src/PepperDash.Essentials/UI/JoinConstants/UISmartObjectJoin.cs similarity index 100% rename from PepperDashEssentials/UI/JoinConstants/UISmartObjectJoin.cs rename to src/PepperDash.Essentials/UI/JoinConstants/UISmartObjectJoin.cs diff --git a/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs b/src/PepperDash.Essentials/UI/JoinConstants/UIStringlJoin.cs similarity index 100% rename from PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs rename to src/PepperDash.Essentials/UI/JoinConstants/UIStringlJoin.cs diff --git a/PepperDashEssentials/UI/JoinConstants/UIUshortJoin.cs b/src/PepperDash.Essentials/UI/JoinConstants/UIUshortJoin.cs similarity index 100% rename from PepperDashEssentials/UI/JoinConstants/UIUshortJoin.cs rename to src/PepperDash.Essentials/UI/JoinConstants/UIUshortJoin.cs diff --git a/PepperDashEssentials/UI/SmartObjectHeaderButtonList.cs b/src/PepperDash.Essentials/UI/SmartObjectHeaderButtonList.cs similarity index 100% rename from PepperDashEssentials/UI/SmartObjectHeaderButtonList.cs rename to src/PepperDash.Essentials/UI/SmartObjectHeaderButtonList.cs diff --git a/PepperDashEssentials/UI - FILES ORPHANED-DELETE/SubpageReferenceListActivityItem.cs b/src/PepperDash.Essentials/UI/SubpageReferenceListActivityItem.cs similarity index 100% rename from PepperDashEssentials/UI - FILES ORPHANED-DELETE/SubpageReferenceListActivityItem.cs rename to src/PepperDash.Essentials/UI/SubpageReferenceListActivityItem.cs diff --git a/PepperDashEssentials/UI/SubpageReferenceListCallStagingItem.cs b/src/PepperDash.Essentials/UI/SubpageReferenceListCallStagingItem.cs similarity index 100% rename from PepperDashEssentials/UI/SubpageReferenceListCallStagingItem.cs rename to src/PepperDash.Essentials/UI/SubpageReferenceListCallStagingItem.cs diff --git a/PepperDashEssentials/UI/SubpageReferenceListSourceItem.cs b/src/PepperDash.Essentials/UI/SubpageReferenceListSourceItem.cs similarity index 100% rename from PepperDashEssentials/UI/SubpageReferenceListSourceItem.cs rename to src/PepperDash.Essentials/UI/SubpageReferenceListSourceItem.cs diff --git a/PepperDashEssentials/UIDrivers/DualDisplayRouting.cs b/src/PepperDash.Essentials/UIDrivers/DualDisplayRouting.cs similarity index 100% rename from PepperDashEssentials/UIDrivers/DualDisplayRouting.cs rename to src/PepperDash.Essentials/UIDrivers/DualDisplayRouting.cs diff --git a/PepperDashEssentials/UIDrivers/Environment Drivers/EssentialsEnvironmentDriver.cs b/src/PepperDash.Essentials/UIDrivers/Environment Drivers/EssentialsEnvironmentDriver.cs similarity index 97% rename from PepperDashEssentials/UIDrivers/Environment Drivers/EssentialsEnvironmentDriver.cs rename to src/PepperDash.Essentials/UIDrivers/Environment Drivers/EssentialsEnvironmentDriver.cs index 6b908739..978206eb 100644 --- a/PepperDashEssentials/UIDrivers/Environment Drivers/EssentialsEnvironmentDriver.cs +++ b/src/PepperDash.Essentials/UIDrivers/Environment Drivers/EssentialsEnvironmentDriver.cs @@ -1,256 +1,256 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; -using PepperDash.Essentials.Core.Shades; -using PepperDash.Essentials.Core.Lighting; - -namespace PepperDash.Essentials -{ - public class EssentialsEnvironmentDriver : PanelDriverBase - { - /// - /// Do I need this here? - /// - CrestronTouchpanelPropertiesConfig Config; - - /// - /// The list of devices this driver is responsible for controlling - /// - public List Devices { get; private set; } - - /// - /// The parent driver for this - /// - EssentialsPanelMainInterfaceDriver Parent; - - /// - /// The list of sub drivers for the devices - /// - public List DeviceSubDrivers { get; private set; } - - public uint BackgroundSubpageJoin { get; private set; } - - public EssentialsEnvironmentDriver(EssentialsPanelMainInterfaceDriver parent, CrestronTouchpanelPropertiesConfig config) - : base(parent.TriList) - { - Config = config; - Parent = parent; - - Devices = new List(); - DeviceSubDrivers = new List(); - - Parent.AvDriver.PopupInterlock.StatusChanged += new EventHandler(PopupInterlock_CurrentJoinChanged); - - // Calculate the join offests for each device page and assign join actions for each button - } - - void PopupInterlock_CurrentJoinChanged(object sender, StatusChangedEventArgs e) - { - // Hide this driver and all sub drivers if popup interlock is not shown - if (!e.IsShown || e.NewJoin != BackgroundSubpageJoin) - { - foreach (var driver in DeviceSubDrivers) - { - driver.Hide(); - } - - base.Hide(); - } - } - - void IsShownFeedback_OutputChange(object sender, EventArgs e) - { - - } - - /// - /// Shows this driver and all sub drivers - /// - public override void Show() - { - Parent.AvDriver.PopupInterlock.ShowInterlocked(BackgroundSubpageJoin); - - foreach (var driver in DeviceSubDrivers) - { - driver.Show(); - } - - base.Show(); - } - - /// - /// Hides this driver and all sub drivers - /// - public override void Hide() - { - Parent.AvDriver.PopupInterlock.HideAndClear(); - - foreach (var driver in DeviceSubDrivers) - { - driver.Hide(); - } - - base.Hide(); - } - - public override void Toggle() - { - if (IsVisible) - Hide(); - else - Show(); - } - - - /// - /// Reads the device keys from the config and gets the devices by key - /// - public void GetDevicesFromConfig(Room.Config.EssentialsEnvironmentPropertiesConfig EnvironmentPropertiesConfig) - { - if (EnvironmentPropertiesConfig != null) - { - Devices.Clear(); - DeviceSubDrivers.Clear(); - - uint column = 1; - - foreach (var dKey in EnvironmentPropertiesConfig.DeviceKeys) - { - var device = DeviceManager.GetDeviceForKey(dKey); - - if (device != null) - { - // Build the driver - var devicePanelDriver = GetPanelDriverForDevice(device, column); - - // Add new PanelDriverBase SubDriver - if (devicePanelDriver != null) - { - Devices.Add(device); - DeviceSubDrivers.Add(devicePanelDriver); - - Debug.Console(1, "Adding '{0}' to Environment Devices", device.Key); - - column++; - - - // Quit if device count is exceeded - if (column > 4) - break; - } - else - Debug.Console(1, "Unable to build environment driver for device: '{0}'", device.Key); - - } - - } - - SetupEnvironmentUiJoins(); - } - else - { - Debug.Console(1, "Unable to get devices from config. No EnvironmentPropertiesConfig object in room config"); - } - } - - /// - /// Returns the appropriate panel driver for the device - /// - /// - /// - /// - PanelDriverBase GetPanelDriverForDevice(IKeyed device, uint column) - { - PanelDriverBase panelDriver = null; - - uint buttonPressJoinBase = 0; - uint buttonVisibleJoinBase = 0; - uint stringJoinBase = 0; - uint shadeTypeVisibleBase = 0; - uint lightingTypeVisibleBase = 0; - - switch (column) - { - case 1: - { - buttonPressJoinBase = UIBoolJoin.EnvironmentColumnOneButtonPressBase; - buttonVisibleJoinBase = UIBoolJoin.EnvironmentColumnOneButtonVisibleBase; - stringJoinBase = UIStringJoin.EnvironmentColumnOneLabelBase; - shadeTypeVisibleBase = UIBoolJoin.EnvironmentColumnOneShadingTypeVisibleBase; - lightingTypeVisibleBase = UIBoolJoin.EnvironmentColumnOneLightingTypeVisibleBase; - break; - } - case 2: - { - buttonPressJoinBase = UIBoolJoin.EnvironmentColumnTwoButtonPressBase; - buttonVisibleJoinBase = UIBoolJoin.EnvironmentColumnTwoButtonVisibleBase; - stringJoinBase = UIStringJoin.EnvironmentColumnTwoLabelBase; - shadeTypeVisibleBase = UIBoolJoin.EnvironmentColumnTwoShadingTypeVisibleBase; - lightingTypeVisibleBase = UIBoolJoin.EnvironmentColumnTwoLightingTypeVisibleBase; - break; - } - case 3: - { - buttonPressJoinBase = UIBoolJoin.EnvironmentColumnThreeButtonPressBase; - buttonVisibleJoinBase = UIBoolJoin.EnvironmentColumnThreeButtonVisibleBase; - stringJoinBase = UIStringJoin.EnvironmentColumnThreeLabelBase; - shadeTypeVisibleBase = UIBoolJoin.EnvironmentColumnThreeShadingTypeVisibleBase; - lightingTypeVisibleBase = UIBoolJoin.EnvironmentColumnThreeLightingTypeVisibleBase; - break; - } - case 4: - { - buttonPressJoinBase = UIBoolJoin.EnvironmentColumnFourButtonPressBase; - buttonVisibleJoinBase = UIBoolJoin.EnvironmentColumnFourButtonVisibleBase; - stringJoinBase = UIStringJoin.EnvironmentColumnFourLabelBase; - shadeTypeVisibleBase = UIBoolJoin.EnvironmentColumnFourShadingTypeVisibleBase; - lightingTypeVisibleBase = UIBoolJoin.EnvironmentColumnFourLightingTypeVisibleBase; - break; - } - default: - { - Debug.Console(1, "Environment Driver: Invalid column number specified"); - break; - } - } - - // Determine if device is a shade or lighting type and construct the appropriate driver - if (device is ShadeBase) - { - panelDriver = new EssentialsShadeDriver(this, device.Key, buttonPressJoinBase, stringJoinBase, shadeTypeVisibleBase); - } - else if (device is LightingBase) - { - panelDriver = new EssentialsLightingDriver(this, device.Key, buttonPressJoinBase, buttonVisibleJoinBase, stringJoinBase, lightingTypeVisibleBase); - } - - // Return the driver - - return panelDriver; - } - - /// - /// Determines the join values for the generic environment subpages - /// - void SetupEnvironmentUiJoins() - { - // Calculate which background subpage join to use - BackgroundSubpageJoin = UIBoolJoin.EnvironmentBackgroundSubpageVisibleBase + (uint)DeviceSubDrivers.Count; - - - } - - } - - public interface IEnvironmentSubdriver - { - uint SubpageVisibleJoin { get; } - } - +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Shades; +using PepperDash.Essentials.Core.Lighting; + +namespace PepperDash.Essentials +{ + public class EssentialsEnvironmentDriver : PanelDriverBase + { + /// + /// Do I need this here? + /// + CrestronTouchpanelPropertiesConfig Config; + + /// + /// The list of devices this driver is responsible for controlling + /// + public List Devices { get; private set; } + + /// + /// The parent driver for this + /// + EssentialsPanelMainInterfaceDriver Parent; + + /// + /// The list of sub drivers for the devices + /// + public List DeviceSubDrivers { get; private set; } + + public uint BackgroundSubpageJoin { get; private set; } + + public EssentialsEnvironmentDriver(EssentialsPanelMainInterfaceDriver parent, CrestronTouchpanelPropertiesConfig config) + : base(parent.TriList) + { + Config = config; + Parent = parent; + + Devices = new List(); + DeviceSubDrivers = new List(); + + Parent.AvDriver.PopupInterlock.StatusChanged += new EventHandler(PopupInterlock_CurrentJoinChanged); + + // Calculate the join offests for each device page and assign join actions for each button + } + + void PopupInterlock_CurrentJoinChanged(object sender, StatusChangedEventArgs e) + { + // Hide this driver and all sub drivers if popup interlock is not shown + if (!e.IsShown || e.NewJoin != BackgroundSubpageJoin) + { + foreach (var driver in DeviceSubDrivers) + { + driver.Hide(); + } + + base.Hide(); + } + } + + void IsShownFeedback_OutputChange(object sender, EventArgs e) + { + + } + + /// + /// Shows this driver and all sub drivers + /// + public override void Show() + { + Parent.AvDriver.PopupInterlock.ShowInterlocked(BackgroundSubpageJoin); + + foreach (var driver in DeviceSubDrivers) + { + driver.Show(); + } + + base.Show(); + } + + /// + /// Hides this driver and all sub drivers + /// + public override void Hide() + { + Parent.AvDriver.PopupInterlock.HideAndClear(); + + foreach (var driver in DeviceSubDrivers) + { + driver.Hide(); + } + + base.Hide(); + } + + public override void Toggle() + { + if (IsVisible) + Hide(); + else + Show(); + } + + + /// + /// Reads the device keys from the config and gets the devices by key + /// + public void GetDevicesFromConfig(Room.Config.EssentialsEnvironmentPropertiesConfig EnvironmentPropertiesConfig) + { + if (EnvironmentPropertiesConfig != null) + { + Devices.Clear(); + DeviceSubDrivers.Clear(); + + uint column = 1; + + foreach (var dKey in EnvironmentPropertiesConfig.DeviceKeys) + { + var device = DeviceManager.GetDeviceForKey(dKey); + + if (device != null) + { + // Build the driver + var devicePanelDriver = GetPanelDriverForDevice(device, column); + + // Add new PanelDriverBase SubDriver + if (devicePanelDriver != null) + { + Devices.Add(device); + DeviceSubDrivers.Add(devicePanelDriver); + + Debug.Console(1, "Adding '{0}' to Environment Devices", device.Key); + + column++; + + + // Quit if device count is exceeded + if (column > 4) + break; + } + else + Debug.Console(1, "Unable to build environment driver for device: '{0}'", device.Key); + + } + + } + + SetupEnvironmentUiJoins(); + } + else + { + Debug.Console(1, "Unable to get devices from config. No EnvironmentPropertiesConfig object in room config"); + } + } + + /// + /// Returns the appropriate panel driver for the device + /// + /// + /// + /// + PanelDriverBase GetPanelDriverForDevice(IKeyed device, uint column) + { + PanelDriverBase panelDriver = null; + + uint buttonPressJoinBase = 0; + uint buttonVisibleJoinBase = 0; + uint stringJoinBase = 0; + uint shadeTypeVisibleBase = 0; + uint lightingTypeVisibleBase = 0; + + switch (column) + { + case 1: + { + buttonPressJoinBase = UIBoolJoin.EnvironmentColumnOneButtonPressBase; + buttonVisibleJoinBase = UIBoolJoin.EnvironmentColumnOneButtonVisibleBase; + stringJoinBase = UIStringJoin.EnvironmentColumnOneLabelBase; + shadeTypeVisibleBase = UIBoolJoin.EnvironmentColumnOneShadingTypeVisibleBase; + lightingTypeVisibleBase = UIBoolJoin.EnvironmentColumnOneLightingTypeVisibleBase; + break; + } + case 2: + { + buttonPressJoinBase = UIBoolJoin.EnvironmentColumnTwoButtonPressBase; + buttonVisibleJoinBase = UIBoolJoin.EnvironmentColumnTwoButtonVisibleBase; + stringJoinBase = UIStringJoin.EnvironmentColumnTwoLabelBase; + shadeTypeVisibleBase = UIBoolJoin.EnvironmentColumnTwoShadingTypeVisibleBase; + lightingTypeVisibleBase = UIBoolJoin.EnvironmentColumnTwoLightingTypeVisibleBase; + break; + } + case 3: + { + buttonPressJoinBase = UIBoolJoin.EnvironmentColumnThreeButtonPressBase; + buttonVisibleJoinBase = UIBoolJoin.EnvironmentColumnThreeButtonVisibleBase; + stringJoinBase = UIStringJoin.EnvironmentColumnThreeLabelBase; + shadeTypeVisibleBase = UIBoolJoin.EnvironmentColumnThreeShadingTypeVisibleBase; + lightingTypeVisibleBase = UIBoolJoin.EnvironmentColumnThreeLightingTypeVisibleBase; + break; + } + case 4: + { + buttonPressJoinBase = UIBoolJoin.EnvironmentColumnFourButtonPressBase; + buttonVisibleJoinBase = UIBoolJoin.EnvironmentColumnFourButtonVisibleBase; + stringJoinBase = UIStringJoin.EnvironmentColumnFourLabelBase; + shadeTypeVisibleBase = UIBoolJoin.EnvironmentColumnFourShadingTypeVisibleBase; + lightingTypeVisibleBase = UIBoolJoin.EnvironmentColumnFourLightingTypeVisibleBase; + break; + } + default: + { + Debug.Console(1, "Environment Driver: Invalid column number specified"); + break; + } + } + + // Determine if device is a shade or lighting type and construct the appropriate driver + if (device is ShadeBase) + { + panelDriver = new EssentialsShadeDriver(this, device.Key, buttonPressJoinBase, stringJoinBase, shadeTypeVisibleBase); + } + else if (device is LightingBase) + { + panelDriver = new EssentialsLightingDriver(this, device.Key, buttonPressJoinBase, buttonVisibleJoinBase, stringJoinBase, lightingTypeVisibleBase); + } + + // Return the driver + + return panelDriver; + } + + /// + /// Determines the join values for the generic environment subpages + /// + void SetupEnvironmentUiJoins() + { + // Calculate which background subpage join to use + BackgroundSubpageJoin = UIBoolJoin.EnvironmentBackgroundSubpageVisibleBase + (uint)DeviceSubDrivers.Count; + + + } + + } + + public interface IEnvironmentSubdriver + { + uint SubpageVisibleJoin { get; } + } + } \ No newline at end of file diff --git a/PepperDashEssentials/UIDrivers/Environment Drivers/EssentialsLightingDriver.cs b/src/PepperDash.Essentials/UIDrivers/Environment Drivers/EssentialsLightingDriver.cs similarity index 100% rename from PepperDashEssentials/UIDrivers/Environment Drivers/EssentialsLightingDriver.cs rename to src/PepperDash.Essentials/UIDrivers/Environment Drivers/EssentialsLightingDriver.cs diff --git a/PepperDashEssentials/UIDrivers/Environment Drivers/EssentialsShadeDriver.cs b/src/PepperDash.Essentials/UIDrivers/Environment Drivers/EssentialsShadeDriver.cs similarity index 99% rename from PepperDashEssentials/UIDrivers/Environment Drivers/EssentialsShadeDriver.cs rename to src/PepperDash.Essentials/UIDrivers/Environment Drivers/EssentialsShadeDriver.cs index fb40252c..9ab9ad54 100644 --- a/PepperDashEssentials/UIDrivers/Environment Drivers/EssentialsShadeDriver.cs +++ b/src/PepperDash.Essentials/UIDrivers/Environment Drivers/EssentialsShadeDriver.cs @@ -97,8 +97,8 @@ namespace PepperDash.Essentials { TriList.SetSigFalseAction(ButtonPressJoinBase + 1, ShadeDevice.Open); - TriList.SetSigFalseAction(ButtonPressJoinBase + 2, (ShadeDevice as IShadesOpenCloseStop).Stop); - + TriList.SetSigFalseAction(ButtonPressJoinBase + 2, (ShadeDevice as IShadesOpenCloseStop).Stop); + if (ShadeDevice is IShadesOpenCloseStop) TriList.SetString(StringJoinBase + 2, "Stop"); diff --git a/PepperDashEssentials/UIDrivers/Essentials/EssentialsHeaderDriver.cs b/src/PepperDash.Essentials/UIDrivers/Essentials/EssentialsHeaderDriver.cs similarity index 97% rename from PepperDashEssentials/UIDrivers/Essentials/EssentialsHeaderDriver.cs rename to src/PepperDash.Essentials/UIDrivers/Essentials/EssentialsHeaderDriver.cs index c63af9d5..4b4ed6b8 100644 --- a/PepperDashEssentials/UIDrivers/Essentials/EssentialsHeaderDriver.cs +++ b/src/PepperDash.Essentials/UIDrivers/Essentials/EssentialsHeaderDriver.cs @@ -1,399 +1,399 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.UI; -using Crestron.SimplSharpPro.DeviceSupport; - - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.SmartObjects; -using PepperDash.Essentials.Core.PageManagers; -using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces; -using PepperDash.Essentials.Room.Config; -using PepperDash.Essentials.Devices.Common.Codec; -using PepperDash.Essentials.Devices.Common.VideoCodec; - - -namespace PepperDash.Essentials -{ - /// - /// - /// - public class EssentialsHeaderDriver : PanelDriverBase - { - uint EnvironmentCaretVisible; - uint CalendarCaretVisible; - uint CallCaretVisible; - - JoinedSigInterlock CaretInterlock; - - CrestronTouchpanelPropertiesConfig Config; - - /// - /// The parent driver for this - /// - EssentialsPanelMainInterfaceDriver Parent; - - /// - /// Indicates that the SetHeaderButtons method has completed successfully - /// - public bool HeaderButtonsAreSetUp { get; private set; } - - StringInputSig HeaderCallButtonIconSig; - - public EssentialsHeaderDriver(EssentialsPanelMainInterfaceDriver parent, CrestronTouchpanelPropertiesConfig config) - : base(parent.TriList) - { - Config = config; - Parent = parent; - CaretInterlock = new JoinedSigInterlock(TriList); - } - - void SetUpGear(IAVDriver avDriver, IEssentialsRoom currentRoom) - { - // Gear - TriList.SetString(UIStringJoin.HeaderButtonIcon5, "Gear"); - TriList.SetSigHeldAction(UIBoolJoin.HeaderIcon5Press, 2000, - avDriver.ShowTech, - null, - () => - { - if (currentRoom.OnFeedback.BoolValue) - { - avDriver.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.VolumesPageVisible); - CaretInterlock.ShowInterlocked(UIBoolJoin.HeaderCaret5Visible); - } - else - { - avDriver.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.VolumesPagePowerOffVisible); - CaretInterlock.ShowInterlocked(UIBoolJoin.HeaderCaret5Visible); - } - }); - TriList.SetSigFalseAction(UIBoolJoin.TechExitButton, () => - avDriver.PopupInterlock.HideAndClear()); - } - - public void SetUpHelpButton(EssentialsRoomPropertiesConfig roomConf) - { - // Help roomConf and popup - if (roomConf.Help != null) - { - TriList.SetString(UIStringJoin.HelpMessage, roomConf.Help.Message); - TriList.SetBool(UIBoolJoin.HelpPageShowCallButtonVisible, roomConf.Help.ShowCallButton); - TriList.SetString(UIStringJoin.HelpPageCallButtonText, roomConf.Help.CallButtonText); - if (roomConf.Help.ShowCallButton) - { - TriList.SetSigFalseAction(UIBoolJoin.HelpPageShowCallButtonPress, () => { }); // ************ FILL IN - } - else - { - TriList.ClearBoolSigAction(UIBoolJoin.HelpPageShowCallButtonPress); - } - } - else // older config - { - TriList.SetString(UIStringJoin.HelpMessage, roomConf.HelpMessage); - TriList.SetBool(UIBoolJoin.HelpPageShowCallButtonVisible, false); - TriList.SetString(UIStringJoin.HelpPageCallButtonText, null); - TriList.ClearBoolSigAction(UIBoolJoin.HelpPageShowCallButtonPress); - } - TriList.SetString(UIStringJoin.HeaderButtonIcon4, "Help"); - TriList.SetSigFalseAction(UIBoolJoin.HeaderIcon4Press, () => - { - string message = null; - var room = DeviceManager.GetDeviceForKey(Config.DefaultRoomKey) - as IEssentialsHuddleSpaceRoom; - if (room != null) - message = room.PropertiesConfig.HelpMessage; - else - message = "Sorry, no help message available. No room connected."; - //TriList.StringInput[UIStringJoin.HelpMessage].StringValue = message; - Parent.AvDriver.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HelpPageVisible); - CaretInterlock.ShowInterlocked(UIBoolJoin.HeaderCaret4Visible); - }); - } - - uint SetUpEnvironmentButton(EssentialsEnvironmentDriver environmentDriver, uint nextJoin) - { - if (environmentDriver != null) - { - var tempJoin = nextJoin; - TriList.SetString(tempJoin, "Lights"); - EnvironmentCaretVisible = tempJoin + 10; - TriList.SetSigFalseAction(tempJoin, () => - { - environmentDriver.Toggle(); - CaretInterlock.ShowInterlocked(EnvironmentCaretVisible); - }); - nextJoin--; - return nextJoin; - } - else - return nextJoin; - } - - uint SetUpCalendarButton(EssentialsHuddleVtc1PanelAvFunctionsDriver avDriver, uint nextJoin) - { - // Calendar button - if (avDriver.CurrentRoom.ScheduleSource != null) - { - var tempJoin = nextJoin; - TriList.SetString(tempJoin, "Calendar"); - CalendarCaretVisible = tempJoin + 10; - TriList.SetSigFalseAction(tempJoin, () => - { - avDriver.CalendarPress(); - CaretInterlock.ShowInterlocked(CalendarCaretVisible); - }); - - nextJoin--; - return nextJoin; - } - else - return nextJoin; - } - - uint SetUpCallButton(EssentialsHuddleVtc1PanelAvFunctionsDriver avDriver, uint nextJoin) - { - // Call button - var tempJoin = nextJoin; - TriList.SetString(tempJoin, "DND"); - CallCaretVisible = tempJoin + 10; - TriList.SetSigFalseAction(tempJoin, () => - { - avDriver.ShowActiveCallsListOrMeetingInfo(); - if(avDriver.CurrentRoom.InCallFeedback.BoolValue) - CaretInterlock.ShowInterlocked(CallCaretVisible); - }); - HeaderCallButtonIconSig = TriList.StringInput[tempJoin]; - - nextJoin--; - return nextJoin; - } - - /// - /// Evaluates the call status and sets the icon mode and text label - /// - public void ComputeHeaderCallStatus(VideoCodecBase codec) - { - if (codec == null) - { - Debug.Console(1, "ComputeHeaderCallStatus() cannot execute. codec is null"); - return; - } - - if (HeaderCallButtonIconSig == null) - { - Debug.Console(1, "ComputeHeaderCallStatus() cannot execute. HeaderCallButtonIconSig is null"); - return; - } - - var meetingInfoCodec = codec as IHasMeetingInfo; - - // Set mode of header button - SetHeaderCallIcon(codec); - - // Set the call status text - Debug.Console(1, "Active Call Count: {0}", codec.ActiveCalls.Count); - - if (codec.ActiveCalls.Count > 0) - { - if (codec.ActiveCalls.Count == 1 && meetingInfoCodec == null) - TriList.SetString(UIStringJoin.HeaderCallStatusLabel, "1 Active Call"); - else if (codec.ActiveCalls.Count == 1 && meetingInfoCodec != null) - { - var headerCallStatusLabel = meetingInfoCodec.MeetingInfo.IsSharingMeeting - ? "Sharing-Only Meeting" - : "Active Meeting"; - - headerCallStatusLabel = meetingInfoCodec.MeetingInfo.WaitingForHost - ? "Waiting For Host" - : headerCallStatusLabel; - - TriList.SetString(UIStringJoin.HeaderCallStatusLabel, headerCallStatusLabel); - } - else if (codec.ActiveCalls.Count > 1) - TriList.SetString(UIStringJoin.HeaderCallStatusLabel, string.Format("{0} Active Calls", codec.ActiveCalls.Count)); - } - else - TriList.SetString(UIStringJoin.HeaderCallStatusLabel, "No Active Calls"); - } - - private void SetHeaderCallIcon(VideoCodecBase codec) - { - if (!codec.IsInCall) - { - HeaderCallButtonIconSig.StringValue = "DND"; - //HeaderCallButton.SetIcon(HeaderListButton.OnHook); - } - else if (codec.ActiveCalls.Any(c => c.Type == eCodecCallType.Video)) - { - HeaderCallButtonIconSig.StringValue = "Misc-06_Dark"; - } - //HeaderCallButton.SetIcon(HeaderListButton.Camera); - //TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 2); - else - { - HeaderCallButtonIconSig.StringValue = "Misc-09_Dark"; - } - //HeaderCallButton.SetIcon(HeaderListButton.Phone); - //TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 1); - } - - /// - /// Sets up Header Buttons for the EssentialsHuddleVtc1Room type - /// - public void SetupHeaderButtons(EssentialsHuddleVtc1PanelAvFunctionsDriver avDriver, IEssentialsHuddleVtc1Room currentRoom) - { - HeaderButtonsAreSetUp = false; - - TriList.SetBool(UIBoolJoin.TopBarHabaneroDynamicVisible, true); - - var roomConf = currentRoom.PropertiesConfig; - - // Register for the PopupInterlock IsShowsFeedback event to tie the header carets subpage visiblity to it - Parent.AvDriver.PopupInterlock.StatusChanged -= PopupInterlock_StatusChanged; - Parent.AvDriver.PopupInterlock.StatusChanged += PopupInterlock_StatusChanged; - - SetUpGear(avDriver, currentRoom); - - SetUpHelpButton(roomConf); - - uint nextJoin = 3953; - - nextJoin = SetUpEnvironmentButton(Parent.EnvironmentDriver, nextJoin); - - nextJoin = SetUpCalendarButton(avDriver, nextJoin); - - nextJoin = SetUpCallButton(avDriver, nextJoin); - - // blank any that remain - for (var i = nextJoin; i > 3950; i--) - { - TriList.SetString(i, "Blank"); - TriList.SetSigFalseAction(i, () => { }); - } - - TriList.SetSigFalseAction(UIBoolJoin.HeaderCallStatusLabelPress, - () => - { - avDriver.ShowActiveCallsListOrMeetingInfo(); - if (avDriver.CurrentRoom.InCallFeedback.BoolValue) - CaretInterlock.ShowInterlocked(CallCaretVisible); - }); - - // Set Call Status Subpage Position - - if (nextJoin == 3951) - { - // Set to right position - TriList.SetBool(UIBoolJoin.HeaderCallStatusLeftPositionVisible, false); - TriList.SetBool(UIBoolJoin.HeaderCallStatusRightPositionVisible, true); - } - else if (nextJoin == 3950) - { - // Set to left position - TriList.SetBool(UIBoolJoin.HeaderCallStatusLeftPositionVisible, true); - TriList.SetBool(UIBoolJoin.HeaderCallStatusRightPositionVisible, false); - } - - HeaderButtonsAreSetUp = true; - - ComputeHeaderCallStatus(currentRoom.VideoCodec); - } - - /// - /// Sets up Header Buttons for the EssentialsHuddleSpaceRoom type - /// - public void SetupHeaderButtons(EssentialsHuddlePanelAvFunctionsDriver avDriver, IEssentialsHuddleSpaceRoom currentRoom) - { - HeaderButtonsAreSetUp = false; - - TriList.SetBool(UIBoolJoin.TopBarHabaneroDynamicVisible, true); - - var roomConf = currentRoom.PropertiesConfig; - - // Register for the PopupInterlock IsShowsFeedback event to tie the header carets subpage visiblity to it - Parent.AvDriver.PopupInterlock.StatusChanged -= PopupInterlock_StatusChanged; - Parent.AvDriver.PopupInterlock.StatusChanged += PopupInterlock_StatusChanged; - - SetUpGear(avDriver, currentRoom); - - SetUpHelpButton(roomConf); - - uint nextJoin = 3953; - - nextJoin = SetUpEnvironmentButton(Parent.EnvironmentDriver, nextJoin); - - // blank any that remain - for (var i = nextJoin; i > 3950; i--) - { - TriList.SetString(i, "Blank"); - TriList.SetSigFalseAction(i, () => { }); - } - - HeaderButtonsAreSetUp = true; - } - - ///// - ///// Whenever a popup is shown/hidden, show/hide the header carets subpage and set the visibility of the correct caret - ///// - ///// - ///// - //void IsShownFeedback_OutputChange(object sender, EventArgs e) - //{ - // var popupInterlockIsShown = Parent.AvDriver.PopupInterlock.IsShown; - // // Set the visible state for the HeaderPopupCaretsSubpage to match that of the PopupInterlock state - // TriList.SetBool(UIBoolJoin.HeaderPopupCaretsSubpageVisibile, popupInterlockIsShown); - - // // Clear all caret visibility - // for (uint i = UIBoolJoin.HeaderCaret5Visible; i >= UIBoolJoin.HeaderCaret1Visible; i--) - // { - // TriList.SetBool(i, false); - // } - - // // Set the current caret visible if the popup is still shown - // if (popupInterlockIsShown) - // TriList.SetBool(NextCaretVisible, true); - //} - - /// - /// Whenever a popup is shown/hidden, show/hide the header carets subpage and set the visibility of the correct caret - /// - /// - /// - void PopupInterlock_StatusChanged(object sender, StatusChangedEventArgs e) - { - // Set the visible state for the HeaderPopupCaretsSubpage to match that of the PopupInterlock state - - bool headerPopupShown = false; - - // Check if the popup interlock is shown, and if one of the header popups is current, then show the carets subpage - if (e.IsShown) - { - if (Parent.EnvironmentDriver != null && e.NewJoin == Parent.EnvironmentDriver.BackgroundSubpageJoin) - headerPopupShown = true; - else if (e.NewJoin == UIBoolJoin.HeaderActiveCallsListVisible) - headerPopupShown = true; - else if (e.NewJoin == UIBoolJoin.HeaderMeetingInfoVisible) - headerPopupShown = true; - else if (e.NewJoin == UIBoolJoin.HelpPageVisible) - headerPopupShown = true; - else if (e.NewJoin == UIBoolJoin.MeetingsOrContacMethodsListVisible) - headerPopupShown = true; - else if (e.NewJoin == UIBoolJoin.VolumesPagePowerOffVisible || e.NewJoin == UIBoolJoin.VolumesPageVisible) - headerPopupShown = true; - } - - // Set the carets subpage visibility - TriList.SetBool(UIBoolJoin.HeaderPopupCaretsSubpageVisibile, headerPopupShown); - - if (!e.IsShown) - CaretInterlock.HideAndClear(); - } - } +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.UI; +using Crestron.SimplSharpPro.DeviceSupport; + + +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.SmartObjects; +using PepperDash.Essentials.Core.PageManagers; +using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces; +using PepperDash.Essentials.Room.Config; +using PepperDash.Essentials.Devices.Common.Codec; +using PepperDash.Essentials.Devices.Common.VideoCodec; + + +namespace PepperDash.Essentials +{ + /// + /// + /// + public class EssentialsHeaderDriver : PanelDriverBase + { + uint EnvironmentCaretVisible; + uint CalendarCaretVisible; + uint CallCaretVisible; + + JoinedSigInterlock CaretInterlock; + + CrestronTouchpanelPropertiesConfig Config; + + /// + /// The parent driver for this + /// + EssentialsPanelMainInterfaceDriver Parent; + + /// + /// Indicates that the SetHeaderButtons method has completed successfully + /// + public bool HeaderButtonsAreSetUp { get; private set; } + + StringInputSig HeaderCallButtonIconSig; + + public EssentialsHeaderDriver(EssentialsPanelMainInterfaceDriver parent, CrestronTouchpanelPropertiesConfig config) + : base(parent.TriList) + { + Config = config; + Parent = parent; + CaretInterlock = new JoinedSigInterlock(TriList); + } + + void SetUpGear(IAVDriver avDriver, IEssentialsRoom currentRoom) + { + // Gear + TriList.SetString(UIStringJoin.HeaderButtonIcon5, "Gear"); + TriList.SetSigHeldAction(UIBoolJoin.HeaderIcon5Press, 2000, + avDriver.ShowTech, + null, + () => + { + if (currentRoom.OnFeedback.BoolValue) + { + avDriver.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.VolumesPageVisible); + CaretInterlock.ShowInterlocked(UIBoolJoin.HeaderCaret5Visible); + } + else + { + avDriver.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.VolumesPagePowerOffVisible); + CaretInterlock.ShowInterlocked(UIBoolJoin.HeaderCaret5Visible); + } + }); + TriList.SetSigFalseAction(UIBoolJoin.TechExitButton, () => + avDriver.PopupInterlock.HideAndClear()); + } + + public void SetUpHelpButton(EssentialsRoomPropertiesConfig roomConf) + { + // Help roomConf and popup + if (roomConf.Help != null) + { + TriList.SetString(UIStringJoin.HelpMessage, roomConf.Help.Message); + TriList.SetBool(UIBoolJoin.HelpPageShowCallButtonVisible, roomConf.Help.ShowCallButton); + TriList.SetString(UIStringJoin.HelpPageCallButtonText, roomConf.Help.CallButtonText); + if (roomConf.Help.ShowCallButton) + { + TriList.SetSigFalseAction(UIBoolJoin.HelpPageShowCallButtonPress, () => { }); // ************ FILL IN + } + else + { + TriList.ClearBoolSigAction(UIBoolJoin.HelpPageShowCallButtonPress); + } + } + else // older config + { + TriList.SetString(UIStringJoin.HelpMessage, roomConf.HelpMessage); + TriList.SetBool(UIBoolJoin.HelpPageShowCallButtonVisible, false); + TriList.SetString(UIStringJoin.HelpPageCallButtonText, null); + TriList.ClearBoolSigAction(UIBoolJoin.HelpPageShowCallButtonPress); + } + TriList.SetString(UIStringJoin.HeaderButtonIcon4, "Help"); + TriList.SetSigFalseAction(UIBoolJoin.HeaderIcon4Press, () => + { + string message = null; + var room = DeviceManager.GetDeviceForKey(Config.DefaultRoomKey) + as IEssentialsHuddleSpaceRoom; + if (room != null) + message = room.PropertiesConfig.HelpMessage; + else + message = "Sorry, no help message available. No room connected."; + //TriList.StringInput[UIStringJoin.HelpMessage].StringValue = message; + Parent.AvDriver.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HelpPageVisible); + CaretInterlock.ShowInterlocked(UIBoolJoin.HeaderCaret4Visible); + }); + } + + uint SetUpEnvironmentButton(EssentialsEnvironmentDriver environmentDriver, uint nextJoin) + { + if (environmentDriver != null) + { + var tempJoin = nextJoin; + TriList.SetString(tempJoin, "Lights"); + EnvironmentCaretVisible = tempJoin + 10; + TriList.SetSigFalseAction(tempJoin, () => + { + environmentDriver.Toggle(); + CaretInterlock.ShowInterlocked(EnvironmentCaretVisible); + }); + nextJoin--; + return nextJoin; + } + else + return nextJoin; + } + + uint SetUpCalendarButton(EssentialsHuddleVtc1PanelAvFunctionsDriver avDriver, uint nextJoin) + { + // Calendar button + if (avDriver.CurrentRoom.ScheduleSource != null) + { + var tempJoin = nextJoin; + TriList.SetString(tempJoin, "Calendar"); + CalendarCaretVisible = tempJoin + 10; + TriList.SetSigFalseAction(tempJoin, () => + { + avDriver.CalendarPress(); + CaretInterlock.ShowInterlocked(CalendarCaretVisible); + }); + + nextJoin--; + return nextJoin; + } + else + return nextJoin; + } + + uint SetUpCallButton(EssentialsHuddleVtc1PanelAvFunctionsDriver avDriver, uint nextJoin) + { + // Call button + var tempJoin = nextJoin; + TriList.SetString(tempJoin, "DND"); + CallCaretVisible = tempJoin + 10; + TriList.SetSigFalseAction(tempJoin, () => + { + avDriver.ShowActiveCallsListOrMeetingInfo(); + if(avDriver.CurrentRoom.InCallFeedback.BoolValue) + CaretInterlock.ShowInterlocked(CallCaretVisible); + }); + HeaderCallButtonIconSig = TriList.StringInput[tempJoin]; + + nextJoin--; + return nextJoin; + } + + /// + /// Evaluates the call status and sets the icon mode and text label + /// + public void ComputeHeaderCallStatus(VideoCodecBase codec) + { + if (codec == null) + { + Debug.Console(1, "ComputeHeaderCallStatus() cannot execute. codec is null"); + return; + } + + if (HeaderCallButtonIconSig == null) + { + Debug.Console(1, "ComputeHeaderCallStatus() cannot execute. HeaderCallButtonIconSig is null"); + return; + } + + var meetingInfoCodec = codec as IHasMeetingInfo; + + // Set mode of header button + SetHeaderCallIcon(codec); + + // Set the call status text + Debug.Console(1, "Active Call Count: {0}", codec.ActiveCalls.Count); + + if (codec.ActiveCalls.Count > 0) + { + if (codec.ActiveCalls.Count == 1 && meetingInfoCodec == null) + TriList.SetString(UIStringJoin.HeaderCallStatusLabel, "1 Active Call"); + else if (codec.ActiveCalls.Count == 1 && meetingInfoCodec != null) + { + var headerCallStatusLabel = meetingInfoCodec.MeetingInfo.IsSharingMeeting + ? "Sharing-Only Meeting" + : "Active Meeting"; + + headerCallStatusLabel = meetingInfoCodec.MeetingInfo.WaitingForHost + ? "Waiting For Host" + : headerCallStatusLabel; + + TriList.SetString(UIStringJoin.HeaderCallStatusLabel, headerCallStatusLabel); + } + else if (codec.ActiveCalls.Count > 1) + TriList.SetString(UIStringJoin.HeaderCallStatusLabel, string.Format("{0} Active Calls", codec.ActiveCalls.Count)); + } + else + TriList.SetString(UIStringJoin.HeaderCallStatusLabel, "No Active Calls"); + } + + private void SetHeaderCallIcon(VideoCodecBase codec) + { + if (!codec.IsInCall) + { + HeaderCallButtonIconSig.StringValue = "DND"; + //HeaderCallButton.SetIcon(HeaderListButton.OnHook); + } + else if (codec.ActiveCalls.Any(c => c.Type == eCodecCallType.Video)) + { + HeaderCallButtonIconSig.StringValue = "Misc-06_Dark"; + } + //HeaderCallButton.SetIcon(HeaderListButton.Camera); + //TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 2); + else + { + HeaderCallButtonIconSig.StringValue = "Misc-09_Dark"; + } + //HeaderCallButton.SetIcon(HeaderListButton.Phone); + //TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 1); + } + + /// + /// Sets up Header Buttons for the EssentialsHuddleVtc1Room type + /// + public void SetupHeaderButtons(EssentialsHuddleVtc1PanelAvFunctionsDriver avDriver, IEssentialsHuddleVtc1Room currentRoom) + { + HeaderButtonsAreSetUp = false; + + TriList.SetBool(UIBoolJoin.TopBarHabaneroDynamicVisible, true); + + var roomConf = currentRoom.PropertiesConfig; + + // Register for the PopupInterlock IsShowsFeedback event to tie the header carets subpage visiblity to it + Parent.AvDriver.PopupInterlock.StatusChanged -= PopupInterlock_StatusChanged; + Parent.AvDriver.PopupInterlock.StatusChanged += PopupInterlock_StatusChanged; + + SetUpGear(avDriver, currentRoom); + + SetUpHelpButton(roomConf); + + uint nextJoin = 3953; + + nextJoin = SetUpEnvironmentButton(Parent.EnvironmentDriver, nextJoin); + + nextJoin = SetUpCalendarButton(avDriver, nextJoin); + + nextJoin = SetUpCallButton(avDriver, nextJoin); + + // blank any that remain + for (var i = nextJoin; i > 3950; i--) + { + TriList.SetString(i, "Blank"); + TriList.SetSigFalseAction(i, () => { }); + } + + TriList.SetSigFalseAction(UIBoolJoin.HeaderCallStatusLabelPress, + () => + { + avDriver.ShowActiveCallsListOrMeetingInfo(); + if (avDriver.CurrentRoom.InCallFeedback.BoolValue) + CaretInterlock.ShowInterlocked(CallCaretVisible); + }); + + // Set Call Status Subpage Position + + if (nextJoin == 3951) + { + // Set to right position + TriList.SetBool(UIBoolJoin.HeaderCallStatusLeftPositionVisible, false); + TriList.SetBool(UIBoolJoin.HeaderCallStatusRightPositionVisible, true); + } + else if (nextJoin == 3950) + { + // Set to left position + TriList.SetBool(UIBoolJoin.HeaderCallStatusLeftPositionVisible, true); + TriList.SetBool(UIBoolJoin.HeaderCallStatusRightPositionVisible, false); + } + + HeaderButtonsAreSetUp = true; + + ComputeHeaderCallStatus(currentRoom.VideoCodec); + } + + /// + /// Sets up Header Buttons for the EssentialsHuddleSpaceRoom type + /// + public void SetupHeaderButtons(EssentialsHuddlePanelAvFunctionsDriver avDriver, IEssentialsHuddleSpaceRoom currentRoom) + { + HeaderButtonsAreSetUp = false; + + TriList.SetBool(UIBoolJoin.TopBarHabaneroDynamicVisible, true); + + var roomConf = currentRoom.PropertiesConfig; + + // Register for the PopupInterlock IsShowsFeedback event to tie the header carets subpage visiblity to it + Parent.AvDriver.PopupInterlock.StatusChanged -= PopupInterlock_StatusChanged; + Parent.AvDriver.PopupInterlock.StatusChanged += PopupInterlock_StatusChanged; + + SetUpGear(avDriver, currentRoom); + + SetUpHelpButton(roomConf); + + uint nextJoin = 3953; + + nextJoin = SetUpEnvironmentButton(Parent.EnvironmentDriver, nextJoin); + + // blank any that remain + for (var i = nextJoin; i > 3950; i--) + { + TriList.SetString(i, "Blank"); + TriList.SetSigFalseAction(i, () => { }); + } + + HeaderButtonsAreSetUp = true; + } + + ///// + ///// Whenever a popup is shown/hidden, show/hide the header carets subpage and set the visibility of the correct caret + ///// + ///// + ///// + //void IsShownFeedback_OutputChange(object sender, EventArgs e) + //{ + // var popupInterlockIsShown = Parent.AvDriver.PopupInterlock.IsShown; + // // Set the visible state for the HeaderPopupCaretsSubpage to match that of the PopupInterlock state + // TriList.SetBool(UIBoolJoin.HeaderPopupCaretsSubpageVisibile, popupInterlockIsShown); + + // // Clear all caret visibility + // for (uint i = UIBoolJoin.HeaderCaret5Visible; i >= UIBoolJoin.HeaderCaret1Visible; i--) + // { + // TriList.SetBool(i, false); + // } + + // // Set the current caret visible if the popup is still shown + // if (popupInterlockIsShown) + // TriList.SetBool(NextCaretVisible, true); + //} + + /// + /// Whenever a popup is shown/hidden, show/hide the header carets subpage and set the visibility of the correct caret + /// + /// + /// + void PopupInterlock_StatusChanged(object sender, StatusChangedEventArgs e) + { + // Set the visible state for the HeaderPopupCaretsSubpage to match that of the PopupInterlock state + + bool headerPopupShown = false; + + // Check if the popup interlock is shown, and if one of the header popups is current, then show the carets subpage + if (e.IsShown) + { + if (Parent.EnvironmentDriver != null && e.NewJoin == Parent.EnvironmentDriver.BackgroundSubpageJoin) + headerPopupShown = true; + else if (e.NewJoin == UIBoolJoin.HeaderActiveCallsListVisible) + headerPopupShown = true; + else if (e.NewJoin == UIBoolJoin.HeaderMeetingInfoVisible) + headerPopupShown = true; + else if (e.NewJoin == UIBoolJoin.HelpPageVisible) + headerPopupShown = true; + else if (e.NewJoin == UIBoolJoin.MeetingsOrContacMethodsListVisible) + headerPopupShown = true; + else if (e.NewJoin == UIBoolJoin.VolumesPagePowerOffVisible || e.NewJoin == UIBoolJoin.VolumesPageVisible) + headerPopupShown = true; + } + + // Set the carets subpage visibility + TriList.SetBool(UIBoolJoin.HeaderPopupCaretsSubpageVisibile, headerPopupShown); + + if (!e.IsShown) + CaretInterlock.HideAndClear(); + } + } } \ No newline at end of file diff --git a/PepperDashEssentials/UIDrivers/Essentials/EssentialsPanelMainInterfaceDriver.cs b/src/PepperDash.Essentials/UIDrivers/Essentials/EssentialsPanelMainInterfaceDriver.cs similarity index 96% rename from PepperDashEssentials/UIDrivers/Essentials/EssentialsPanelMainInterfaceDriver.cs rename to src/PepperDash.Essentials/UIDrivers/Essentials/EssentialsPanelMainInterfaceDriver.cs index 2b787063..6b9ae605 100644 --- a/PepperDashEssentials/UIDrivers/Essentials/EssentialsPanelMainInterfaceDriver.cs +++ b/src/PepperDash.Essentials/UIDrivers/Essentials/EssentialsPanelMainInterfaceDriver.cs @@ -1,168 +1,168 @@ -using System; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.UI; -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.SmartObjects; - -namespace PepperDash.Essentials -{ - /// - /// - /// - public class EssentialsPanelMainInterfaceDriver : PanelDriverBase, IHasScreenSaverController, IDisposable - { - CTimer InactivityTimer; - - /// - /// Assign the appropriate A/V driver. - /// Want to keep the AvDriver alive, because it may hold states - /// - public IAVDriver AvDriver { get; set;} - - public EssentialsHeaderDriver HeaderDriver { get; set; } - - public EssentialsEnvironmentDriver EnvironmentDriver { get; set; } - - public PanelDriverBase CurrentChildDriver { get; private set; } - - public ScreenSaverController ScreenSaverController { get; set; } - - private readonly long _timeoutMs; - - CrestronTouchpanelPropertiesConfig Config; - - /// - /// The main interlock for popups - /// - //public JoinedSigInterlock PopupInterlock { get; private set; } - - public EssentialsPanelMainInterfaceDriver(BasicTriListWithSmartObject trilist, - CrestronTouchpanelPropertiesConfig config) - : base(trilist) - { - Config = config; - - _timeoutMs = Config.ScreenSaverTimeoutMin * 60 * 1000; - - var tsx52or60 = trilist as Tswx52ButtonVoiceControl; - - if (tsx52or60 != null) - { - tsx52or60.ExtenderTouchDetectionReservedSigs.Use(); - tsx52or60.ExtenderTouchDetectionReservedSigs.DeviceExtenderSigChange += ExtenderTouchDetectionReservedSigs_DeviceExtenderSigChange; - tsx52or60.ExtenderTouchDetectionReservedSigs.Time.UShortValue = 1; - ManageInactivityTimer(); - - } - else - { - var tswx70 = trilist as TswX70Base; - if (tswx70 != null) - { - tswx70.ExtenderTouchDetectionReservedSigs.Use(); - tswx70.ExtenderTouchDetectionReservedSigs.DeviceExtenderSigChange += ExtenderTouchDetectionReservedSigs_DeviceExtenderSigChange; - tswx70.ExtenderTouchDetectionReservedSigs.Time.UShortValue = 1; - ManageInactivityTimer(); - } - } - } - - #region IDisposable Members - - public void Dispose() - { - var avDriver = AvDriver as PanelDriverBase; - if (avDriver != null) - { - avDriver.Hide(); - } - if (ScreenSaverController != null) - { - ScreenSaverController.Dispose(); - } - if (HeaderDriver != null) - { - HeaderDriver.Hide(); - } - if (EnvironmentDriver != null) - { - EnvironmentDriver.Hide(); - } - if (CurrentChildDriver != null) - { - CurrentChildDriver.Hide(); - } - } - - #endregion - - void ExtenderTouchDetectionReservedSigs_DeviceExtenderSigChange(Crestron.SimplSharpPro.DeviceExtender currentDeviceExtender, Crestron.SimplSharpPro.SigEventArgs args) - { - - if (args.Sig.BoolValue) - { - ManageInactivityTimer(); - } - } - - private void ManageInactivityTimer() - { - if (InactivityTimer != null) - { - InactivityTimer.Reset(_timeoutMs); - } - else - { - InactivityTimer = new CTimer((o) => InactivityTimerExpired(), _timeoutMs); - } - } - - void InactivityTimerExpired() - { - InactivityTimer.Stop(); - InactivityTimer.Dispose(); - InactivityTimer = null; - - ScreenSaverController.Show(); - } - - public override void Show() - { - CurrentChildDriver = null; - ShowSubDriver(AvDriver as PanelDriverBase); - - base.Show(); - } - - public override void Hide() - { - TriList.BooleanInput[AvDriver.StartPageVisibleJoin].BoolValue = false; - base.Hide(); - } - - void ShowSubDriver(PanelDriverBase driver) - { - CurrentChildDriver = driver; - if (driver == null) - return; - this.Hide(); - driver.Show(); - } - - /// - /// - /// - public override void BackButtonPressed() - { - if(CurrentChildDriver != null) - CurrentChildDriver.BackButtonPressed(); - } - } - - public interface IHasScreenSaverController - { - ScreenSaverController ScreenSaverController { get; } - } +using System; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.UI; +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.SmartObjects; + +namespace PepperDash.Essentials +{ + /// + /// + /// + public class EssentialsPanelMainInterfaceDriver : PanelDriverBase, IHasScreenSaverController, IDisposable + { + CTimer InactivityTimer; + + /// + /// Assign the appropriate A/V driver. + /// Want to keep the AvDriver alive, because it may hold states + /// + public IAVDriver AvDriver { get; set;} + + public EssentialsHeaderDriver HeaderDriver { get; set; } + + public EssentialsEnvironmentDriver EnvironmentDriver { get; set; } + + public PanelDriverBase CurrentChildDriver { get; private set; } + + public ScreenSaverController ScreenSaverController { get; set; } + + private readonly long _timeoutMs; + + CrestronTouchpanelPropertiesConfig Config; + + /// + /// The main interlock for popups + /// + //public JoinedSigInterlock PopupInterlock { get; private set; } + + public EssentialsPanelMainInterfaceDriver(BasicTriListWithSmartObject trilist, + CrestronTouchpanelPropertiesConfig config) + : base(trilist) + { + Config = config; + + _timeoutMs = Config.ScreenSaverTimeoutMin * 60 * 1000; + + var tsx52or60 = trilist as Tswx52ButtonVoiceControl; + + if (tsx52or60 != null) + { + tsx52or60.ExtenderTouchDetectionReservedSigs.Use(); + tsx52or60.ExtenderTouchDetectionReservedSigs.DeviceExtenderSigChange += ExtenderTouchDetectionReservedSigs_DeviceExtenderSigChange; + tsx52or60.ExtenderTouchDetectionReservedSigs.Time.UShortValue = 1; + ManageInactivityTimer(); + + } + else + { + var tswx70 = trilist as TswX70Base; + if (tswx70 != null) + { + tswx70.ExtenderTouchDetectionReservedSigs.Use(); + tswx70.ExtenderTouchDetectionReservedSigs.DeviceExtenderSigChange += ExtenderTouchDetectionReservedSigs_DeviceExtenderSigChange; + tswx70.ExtenderTouchDetectionReservedSigs.Time.UShortValue = 1; + ManageInactivityTimer(); + } + } + } + + #region IDisposable Members + + public void Dispose() + { + var avDriver = AvDriver as PanelDriverBase; + if (avDriver != null) + { + avDriver.Hide(); + } + if (ScreenSaverController != null) + { + ScreenSaverController.Dispose(); + } + if (HeaderDriver != null) + { + HeaderDriver.Hide(); + } + if (EnvironmentDriver != null) + { + EnvironmentDriver.Hide(); + } + if (CurrentChildDriver != null) + { + CurrentChildDriver.Hide(); + } + } + + #endregion + + void ExtenderTouchDetectionReservedSigs_DeviceExtenderSigChange(Crestron.SimplSharpPro.DeviceExtender currentDeviceExtender, Crestron.SimplSharpPro.SigEventArgs args) + { + + if (args.Sig.BoolValue) + { + ManageInactivityTimer(); + } + } + + private void ManageInactivityTimer() + { + if (InactivityTimer != null) + { + InactivityTimer.Reset(_timeoutMs); + } + else + { + InactivityTimer = new CTimer((o) => InactivityTimerExpired(), _timeoutMs); + } + } + + void InactivityTimerExpired() + { + InactivityTimer.Stop(); + InactivityTimer.Dispose(); + InactivityTimer = null; + + ScreenSaverController.Show(); + } + + public override void Show() + { + CurrentChildDriver = null; + ShowSubDriver(AvDriver as PanelDriverBase); + + base.Show(); + } + + public override void Hide() + { + TriList.BooleanInput[AvDriver.StartPageVisibleJoin].BoolValue = false; + base.Hide(); + } + + void ShowSubDriver(PanelDriverBase driver) + { + CurrentChildDriver = driver; + if (driver == null) + return; + this.Hide(); + driver.Show(); + } + + /// + /// + /// + public override void BackButtonPressed() + { + if(CurrentChildDriver != null) + CurrentChildDriver.BackButtonPressed(); + } + } + + public interface IHasScreenSaverController + { + ScreenSaverController ScreenSaverController { get; } + } } \ No newline at end of file diff --git a/PepperDashEssentials/UIDrivers/Essentials/EssentialsPresentationPanelAvFunctionsDriver.cs b/src/PepperDash.Essentials/UIDrivers/Essentials/EssentialsPresentationPanelAvFunctionsDriver.cs similarity index 100% rename from PepperDashEssentials/UIDrivers/Essentials/EssentialsPresentationPanelAvFunctionsDriver.cs rename to src/PepperDash.Essentials/UIDrivers/Essentials/EssentialsPresentationPanelAvFunctionsDriver.cs diff --git a/PepperDashEssentials/UIDrivers/EssentialsHuddle/EssentialsHuddlePanelAvFunctionsDriver.cs b/src/PepperDash.Essentials/UIDrivers/EssentialsHuddle/EssentialsHuddlePanelAvFunctionsDriver.cs similarity index 100% rename from PepperDashEssentials/UIDrivers/EssentialsHuddle/EssentialsHuddlePanelAvFunctionsDriver.cs rename to src/PepperDash.Essentials/UIDrivers/EssentialsHuddle/EssentialsHuddlePanelAvFunctionsDriver.cs diff --git a/PepperDashEssentials/UIDrivers/EssentialsHuddle/EssentialsHuddleTechPageDriver.cs b/src/PepperDash.Essentials/UIDrivers/EssentialsHuddle/EssentialsHuddleTechPageDriver.cs similarity index 100% rename from PepperDashEssentials/UIDrivers/EssentialsHuddle/EssentialsHuddleTechPageDriver.cs rename to src/PepperDash.Essentials/UIDrivers/EssentialsHuddle/EssentialsHuddleTechPageDriver.cs diff --git a/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddlePresentationUiDriver.cs b/src/PepperDash.Essentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddlePresentationUiDriver.cs similarity index 100% rename from PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddlePresentationUiDriver.cs rename to src/PepperDash.Essentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddlePresentationUiDriver.cs diff --git a/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs b/src/PepperDash.Essentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs similarity index 97% rename from PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs rename to src/PepperDash.Essentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs index 80fb0ba8..78aeb311 100644 --- a/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs +++ b/src/PepperDash.Essentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs @@ -1,1652 +1,1652 @@ -using System; -using System.Linq; -using System.Collections.Generic; -using System.Globalization; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.UI; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; -using PepperDash.Essentials.Core.DeviceTypeInterfaces; -using PepperDash.Essentials.Core.SmartObjects; -using PepperDash.Essentials.Core.PageManagers; -using PepperDash.Essentials.Room.Config; -using PepperDash.Essentials.Devices.Common.Codec; -using PepperDash.Essentials.Devices.Common.VideoCodec; -using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces; - -namespace PepperDash.Essentials -{ - /// - /// - /// - public class EssentialsHuddleVtc1PanelAvFunctionsDriver : PanelDriverBase, IAVWithVCDriver - { - CrestronTouchpanelPropertiesConfig Config; - - public enum UiDisplayMode - { - Presentation, AudioSetup, Call, Start - } - - public uint StartPageVisibleJoin { get; private set; } - - /// - /// Whether volume ramping from this panel will show the volume - /// gauge popup. - /// - public bool ShowVolumeGauge { get; set; } - - /// - /// - /// - public uint PowerOffTimeout { get; set; } - - /// - /// - /// - public string DefaultRoomKey { get; set; } - - - /// - /// - /// - public IEssentialsHuddleVtc1Room CurrentRoom - { - get { return _CurrentRoom; } - set - { - SetCurrentRoom(value); - } - } - IEssentialsHuddleVtc1Room _CurrentRoom; - - /// - /// For hitting feedbacks - /// - BoolInputSig CallButtonSig; - BoolInputSig ShareButtonSig; - BoolInputSig EndMeetingButtonSig; - - BoolFeedback CallSharingInfoVisibleFeedback; - - /// - /// The parent driver for this - /// - public PanelDriverBase Parent { get; private set; } - - /// - /// All children attached to this driver. For hiding and showing as a group. - /// - List ChildDrivers = new List(); - - List CurrentDisplayModeSigsInUse = new List(); - - //// Important smart objects - - /// - /// Smart Object 3200 - /// - SubpageReferenceList SourceStagingSrl; - - /// - /// Smart Object 15022 - /// - SubpageReferenceList ActivityFooterSrl; - - /// - /// - /// - public SubpageReferenceList MeetingOrContactMethodModalSrl { get; set; } - - public uint CallListOrMeetingInfoPopoverVisibilityJoin { get; private set; } - - - /// - /// The list of buttons on the header. Managed with visibility only - /// - //SmartObjectHeaderButtonList HeaderButtonsList; - - /// - /// The AV page mangagers that have been used, to keep them alive for later - /// - Dictionary PageManagers = new Dictionary(); - - /// - /// Current page manager running for a source - /// - PageManager CurrentSourcePageManager; - - /// - /// Will auto-timeout a power off - /// - CTimer PowerOffTimer; - - /// - /// - /// - ModalDialog PowerDownModal; - - /// - /// - /// - //ModalDialog WarmingCoolingModal; - - /// - /// Represents - /// - public JoinedSigInterlock PopupInterlock { get; private set; } - - /// - /// Interlock for various source, camera, call control bars. The bar above the activity footer. This is also - /// used to show start page - /// - JoinedSigInterlock StagingBarInterlock; - - /// - /// Interlocks the various call-related subpages - /// - JoinedSigInterlock CallPagesInterlock; - - /// - /// The Video codec driver - /// - PepperDash.Essentials.UIDrivers.VC.EssentialsVideoCodecUiDriver VCDriver; - - /// - /// The driver for the tech page. Lazy getter for memory usage - /// - PepperDash.Essentials.UIDrivers.EssentialsHuddleTechPageDriver TechDriver - { - get - { - if (_TechDriver == null) - _TechDriver = new PepperDash.Essentials.UIDrivers.EssentialsHuddleTechPageDriver(TriList, CurrentRoom.PropertiesConfig.Tech); - return _TechDriver; - } - } - PepperDash.Essentials.UIDrivers.EssentialsHuddleTechPageDriver _TechDriver; - - /// - /// Controls timeout of notification ribbon timer - /// - CTimer RibbonTimer; - - /// - /// The keyboard - /// - public PepperDash.Essentials.Core.Touchpanels.Keyboards.HabaneroKeyboardController Keyboard { get; private set; } - - - private UiDisplayMode _currentMode; - - private bool _isZoomRoomWithNoExternalSources - { - get - { - return CurrentRoom.VideoCodec is Essentials.Devices.Common.VideoCodec.ZoomRoom.ZoomRoom && _sourceListCount <= 1; - } - } - - private uint _sourceListCount; - - /// - /// The mode showing. Presentation or call. - /// - UiDisplayMode CurrentMode - { - get - { - return _currentMode; - } - set - { - if (value != _currentMode) - { - _currentMode = value; - - SetActivityFooterFeedbacks(); - } - } - } - - CTimer NextMeetingTimer; - - /// - /// Tracks the last meeting that was cancelled - /// - string LastMeetingDismissedId; - - /// - /// Constructor - /// - public EssentialsHuddleVtc1PanelAvFunctionsDriver(PanelDriverBase parent, CrestronTouchpanelPropertiesConfig config) - : base(parent.TriList) - { - Config = config; - Parent = parent; - - PopupInterlock = new JoinedSigInterlock(TriList); - StagingBarInterlock = new JoinedSigInterlock(TriList); - CallPagesInterlock = new JoinedSigInterlock(TriList); - - SourceStagingSrl = new SubpageReferenceList(TriList, UISmartObjectJoin.SourceStagingSRL, 3, 3, 3); - - ActivityFooterSrl = new SubpageReferenceList(TriList, UISmartObjectJoin.ActivityFooterSRL, 3, 3, 3); - CallButtonSig = ActivityFooterSrl.BoolInputSig(2, 1); - ShareButtonSig = ActivityFooterSrl.BoolInputSig(1, 1); - EndMeetingButtonSig = ActivityFooterSrl.BoolInputSig(3, 1); - - MeetingOrContactMethodModalSrl = new SubpageReferenceList(TriList, UISmartObjectJoin.MeetingListSRL, 3, 3, 5); - - CurrentMode = UiDisplayMode.Start; - - // buttons are added in SetCurrentRoom - //HeaderButtonsList = new SmartObjectHeaderButtonList(TriList.SmartObjects[UISmartObjectJoin.HeaderButtonList]); - - SetupActivityFooterWhenRoomOff(); - - ShowVolumeGauge = true; - Keyboard = new PepperDash.Essentials.Core.Touchpanels.Keyboards.HabaneroKeyboardController(TriList); - } - - /// - /// Add a video codec driver to this - /// - /// - public void SetVideoCodecDriver(PepperDash.Essentials.UIDrivers.VC.EssentialsVideoCodecUiDriver vcd) - { - VCDriver = vcd; - } - - /// - /// - /// - public override void Show() - { - if (CurrentRoom == null) - { - Debug.Console(1, "ERROR: AVUIFunctionsDriver, Cannot show. No room assigned"); - return; - } - - var roomConf = CurrentRoom.PropertiesConfig; - - if (Config.HeaderStyle.ToLower() == CrestronTouchpanelPropertiesConfig.Habanero) - { - TriList.SetSigFalseAction(UIBoolJoin.HeaderRoomButtonPress, () => - { - if (CurrentRoom.IsMobileControlEnabled) - { - Debug.Console(1, "Showing Mobile Control Header Info"); - PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderInfoMCPageVisible); - } - else - { - Debug.Console(1, "Showing Non Mobile Control Header Info"); - PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderInfoPageVisible); - } - }); - } - else if (Config.HeaderStyle.ToLower() == CrestronTouchpanelPropertiesConfig.Verbose) - { - TriList.SetSigFalseAction(UIBoolJoin.HeaderRoomButtonPress, () => - { - if (CurrentRoom.IsMobileControlEnabled) - { - Debug.Console(1, "Showing Mobile Control Header Info"); - PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderInfoMCPageVisible); - } - else - { - Debug.Console(1, "Showing Non Mobile Control Header Info"); - PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderInfoPageVisible); - } - }); - } - - TriList.SetBool(UIBoolJoin.DateAndTimeVisible, Config.ShowDate && Config.ShowTime); - TriList.SetBool(UIBoolJoin.DateOnlyVisible, Config.ShowDate && !Config.ShowTime); - TriList.SetBool(UIBoolJoin.TimeOnlyVisible, !Config.ShowDate && Config.ShowTime); - - TriList.SetBool(UIBoolJoin.TopBarHabaneroDynamicVisible, true); - - TriList.SetBool(UIBoolJoin.ActivityFooterVisible, true); - - // Privacy mute button - TriList.SetSigFalseAction(UIBoolJoin.Volume1SpeechMutePressAndFB, CurrentRoom.PrivacyModeToggle); - CurrentRoom.PrivacyModeIsOnFeedback.LinkInputSig(TriList.BooleanInput[UIBoolJoin.Volume1SpeechMutePressAndFB]); - - // Default to showing rooms/sources now. - if (CurrentRoom.OnFeedback.BoolValue) - { - TriList.SetBool(UIBoolJoin.TapToBeginVisible, false); - SetupActivityFooterWhenRoomOn(); - } - else - { - TriList.SetBool(StartPageVisibleJoin, true); - TriList.SetBool(UIBoolJoin.TapToBeginVisible, true); - SetupActivityFooterWhenRoomOff(); - } - ShowCurrentDisplayModeSigsInUse(); - - // *** Header Buttons *** - - // Generic "close" button for popup modals - TriList.SetSigFalseAction(UIBoolJoin.InterlockedModalClosePress, PopupInterlock.HideAndClear); - - // Volume related things - TriList.SetSigFalseAction(UIBoolJoin.VolumeDefaultPress, () => CurrentRoom.SetDefaultLevels()); - TriList.SetString(UIStringJoin.AdvancedVolumeSlider1Text, "Room"); - - //if (TriList is CrestronApp) - // TriList.BooleanInput[UIBoolJoin.GearButtonVisible].BoolValue = false; - //else - // TriList.BooleanInput[UIBoolJoin.GearButtonVisible].BoolValue = true; - - // power-related functions - // Note: some of these are not directly-related to the huddle space UI, but are held over - // in case - TriList.SetSigFalseAction(UIBoolJoin.ShowPowerOffPress, EndMeetingPress); - - TriList.SetSigFalseAction(UIBoolJoin.DisplayPowerTogglePress, () => - { - if (CurrentRoom != null && CurrentRoom.DefaultDisplay != null && CurrentRoom.DefaultDisplay is IHasPowerControl) - (CurrentRoom.DefaultDisplay as IHasPowerControl).PowerToggle(); - }); - - SetupNextMeetingTimer(); - - base.Show(); - } - - /// - /// Allows PopupInterlock to be toggled if the calls list is already visible, or if the codec is in a call - /// - public void ShowActiveCallsListOrMeetingInfo() - { - TriList.SetBool(UIBoolJoin.CallEndAllConfirmVisible, true); - - - if(PopupInterlock.CurrentJoin == CallListOrMeetingInfoPopoverVisibilityJoin) - PopupInterlock.ShowInterlockedWithToggle(CallListOrMeetingInfoPopoverVisibilityJoin); - else - { - if(CurrentRoom.VideoCodec.IsInCall) - PopupInterlock.ShowInterlockedWithToggle(CallListOrMeetingInfoPopoverVisibilityJoin); - } - } - - /// - /// - /// - void ShowLogo() - { - if (CurrentRoom.LogoUrlLightBkgnd == null) - { - TriList.SetBool(UIBoolJoin.LogoDefaultVisible, true); - TriList.SetBool(UIBoolJoin.LogoUrlVisible, false); - } - else - { - TriList.SetBool(UIBoolJoin.LogoDefaultVisible, false); - TriList.SetBool(UIBoolJoin.LogoUrlVisible, true); - TriList.SetString(UIStringJoin.LogoUrlLightBkgnd, _CurrentRoom.LogoUrlLightBkgnd); - TriList.SetString(UIStringJoin.LogoUrlDarkBkgnd, _CurrentRoom.LogoUrlDarkBkgnd); - } - } - - /// - /// - /// - void HideLogo() - { - TriList.SetBool(UIBoolJoin.LogoDefaultVisible, false); - TriList.SetBool(UIBoolJoin.LogoUrlVisible, false); - } - - /// - /// - /// - public override void Hide() - { - HideAndClearCurrentDisplayModeSigsInUse(); - TriList.SetBool(UIBoolJoin.TopBarHabaneroDynamicVisible, false); - TriList.BooleanInput[UIBoolJoin.ActivityFooterVisible].BoolValue = false; - TriList.BooleanInput[StartPageVisibleJoin].BoolValue = false; - TriList.BooleanInput[UIBoolJoin.TapToBeginVisible].BoolValue = false; - TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false; - if (NextMeetingTimer != null) - NextMeetingTimer.Stop(); - HideNextMeetingPopup(); - base.Hide(); - } - - /// - /// Reveals a message on the notification ribbon until cleared - /// - /// Text to display - /// Time in ms to display. 0 to keep on screen - public void ShowNotificationRibbon(string message, int timeout) - { - TriList.SetString(UIStringJoin.NotificationRibbonText, message); - TriList.SetBool(UIBoolJoin.NotificationRibbonVisible, true); - if (timeout > 0) - { - if (RibbonTimer != null) - RibbonTimer.Stop(); - RibbonTimer = new CTimer(o => { - TriList.SetBool(UIBoolJoin.NotificationRibbonVisible, false); - RibbonTimer = null; - }, timeout); - } - } - - /// - /// Hides the notification ribbon - /// - public void HideNotificationRibbon() - { - TriList.SetBool(UIBoolJoin.NotificationRibbonVisible, false); - if (RibbonTimer != null) - { - RibbonTimer.Stop(); - RibbonTimer = null; - } - } - - void SetupNextMeetingTimer() - { - var ss = CurrentRoom.ScheduleSource; - if (ss != null) - { - NextMeetingTimer = new CTimer(o => ShowNextMeetingTimerCallback(), null, 0, 60000); - } - } - - /// - /// - /// - void ShowNextMeetingTimerCallback() - { - //Update calendar for Zoom. Zoom doesn't automatically update when meetings are in the past - if (_isZoomRoomWithNoExternalSources) - { - CurrentRoom.ScheduleSource.GetSchedule(); - } - - // Every 60 seconds, refresh the calendar - RefreshMeetingsList(); - // check meetings list for the closest, joinable meeting - var ss = CurrentRoom.ScheduleSource; - var meetings = ss.CodecSchedule.Meetings; - - if (meetings.Count <= 0) - { - return; - } - // If the room is off pester the user - // If the room is on, and the meeting is joinable - // and the LastMeetingDismissed != this meeting - - var lastMeetingDismissed = meetings.FirstOrDefault(m => m.Id == LastMeetingDismissedId); - //Debug.Console(0, "*#* Room on: {0}, lastMeetingDismissedId: {1} {2} *#*", - // CurrentRoom.OnFeedback.BoolValue, - // LastMeetingDismissedId, - // lastMeetingDismissed != null ? lastMeetingDismissed.StartTime.ToString("t", Global.Culture) : ""); - - var meeting = meetings.LastOrDefault(m => m.Joinable); - if (CurrentRoom.OnFeedback.BoolValue - && lastMeetingDismissed == meeting) - { - // meeting no longer joinable, hide popup - if(meeting == null) - HideNextMeetingPopup(); - - return; - } - - LastMeetingDismissedId = null; - // Clear the popup when we run out of meetings - if (meeting == null) - { - HideNextMeetingPopup(); - } - else - { - - - TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Upcoming meeting"); - TriList.SetString(UIStringJoin.NextMeetingStartTimeText, meeting.StartTime.ToString("t", Global.Culture)); - TriList.SetString(UIStringJoin.NextMeetingEndTimeText, meeting.EndTime.ToString("t", Global.Culture)); - TriList.SetString(UIStringJoin.NextMeetingTitleText, meeting.Title); - TriList.SetString(UIStringJoin.NextMeetingNameText, meeting.Organizer); - TriList.SetString(UIStringJoin.NextMeetingButtonLabel, "Join"); - TriList.SetSigFalseAction(UIBoolJoin.NextMeetingJoinPress, () => - { - HideNextMeetingPopup(); - PopupInterlock.Hide(); - RoomOnAndDialMeeting(meeting); - }); - TriList.SetString(UIStringJoin.NextMeetingSecondaryButtonLabel, "Show Schedule"); - TriList.SetSigFalseAction(UIBoolJoin.CalendarHeaderButtonPress, () => - { - HideNextMeetingPopup(); - //CalendarPress(); - RefreshMeetingsList(); - PopupInterlock.ShowInterlocked(UIBoolJoin.MeetingsOrContacMethodsListVisible); - }); - var indexOfNext = meetings.IndexOf(meeting) + 1; - - // indexOf = 3, 4 meetings : - if (indexOfNext < meetings.Count) - TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText, - meetings[indexOfNext].StartTime.ToString("t", Global.Culture)); - else - TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText, "No more meetings today"); - - TriList.SetSigFalseAction(UIBoolJoin.NextMeetingModalClosePress, () => - { - // Mark the meeting to not re-harass the user - if(CurrentRoom.OnFeedback.BoolValue) - LastMeetingDismissedId = meeting.Id; - HideNextMeetingPopup(); - }); - - TriList.SetBool(UIBoolJoin.NextMeetingModalVisible, true); - } - } - - /// - /// - /// - void HideNextMeetingPopup() - { - TriList.SetBool(UIBoolJoin.NextMeetingModalVisible, false); - - } - - /// - /// Calendar should only be visible when it's supposed to - /// - public void CalendarPress() - { - //RefreshMeetingsList(); // List should be up-to-date - PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.MeetingsOrContacMethodsListVisible); - } - - /// - /// Dials a meeting after turning on room (if necessary) - /// - void RoomOnAndDialMeeting(Meeting meeting) - { - Debug.Console(1, "[RoomOnAndDialMeeting] Joining meeting [{0}]", meeting); - Action dialAction = () => - { - var d = CurrentRoom.ScheduleSource as VideoCodecBase; - if (d != null) - { - Debug.Console(1, - "[RoomOnAndDialMeeting] [dialAction] Sending command to codec to join meeting {0}", meeting); - d.Dial(meeting); - LastMeetingDismissedId = meeting.Id; // To prevent prompts for already-joined call - } - }; - if (CurrentRoom.OnFeedback.BoolValue) - { - Debug.Console(1, "[RoomOnAndDialMeeting] Room is on."); - dialAction(); - } - else - { - Debug.Console(1, "RoomOnAndDialMeeting] Room is off or warming. Registering for Warming Feedback"); - // Rig a one-time handler to catch when the room is warmed and then dial call - EventHandler oneTimeHandler = null; - oneTimeHandler = (o, a) => - { - if (!CurrentRoom.IsWarmingUpFeedback.BoolValue) - { - CurrentRoom.IsWarmingUpFeedback.OutputChange -= oneTimeHandler; - dialAction(); - } - }; - CurrentRoom.IsWarmingUpFeedback.OutputChange += oneTimeHandler; - ActivityCallButtonPressed(); - } - } - - /// - /// Reveals the tech page and puts away anything that's in the way. - /// - public void ShowTech() - { - PopupInterlock.HideAndClear(); - TechDriver.Show(); - } - - /// - /// When the room is off, set the footer SRL - /// - void SetupActivityFooterWhenRoomOff() - { - ActivityFooterSrl.Clear(); - ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(1, ActivityFooterSrl, 0, - b => { if (!b) ActivityShareButtonPressed(); })); - ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(2, ActivityFooterSrl, 3, - b => { if (!b) ActivityCallButtonPressed(); })); - ActivityFooterSrl.Count = 2; - TriList.SetUshort(UIUshortJoin.PresentationStagingCaretMode, 1); // right one slot - TriList.SetUshort(UIUshortJoin.CallStagingCaretMode, 5); // left one slot - } - - /// - /// Sets up the footer SRL for when the room is on - /// - void SetupActivityFooterWhenRoomOn() - { - ActivityFooterSrl.Clear(); - ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(1, ActivityFooterSrl, 0, - b => { if (!b) ActivityShareButtonPressed(); })); - ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(2, ActivityFooterSrl, 3, - b => { if (!b) ActivityCallButtonPressed(); })); - ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(3, ActivityFooterSrl, 4, - b => { if (!b) EndMeetingPress(); })); - ActivityFooterSrl.Count = 3; - TriList.SetUshort(UIUshortJoin.PresentationStagingCaretMode, 2); // center - TriList.SetUshort(UIUshortJoin.CallStagingCaretMode, 0); // left -2 - } - - /// - /// Single point call for setting the feedbacks on the activity buttons - /// - void SetActivityFooterFeedbacks() - { - if (CurrentRoom != null) - { - var startMode = CurrentMode == UiDisplayMode.Start; - var presentationMode = CurrentMode == UiDisplayMode.Presentation; - var callMode = CurrentMode == UiDisplayMode.Call; - - TriList.SetBool(StartPageVisibleJoin, startMode ? true : false); - - if (presentationMode &&_isZoomRoomWithNoExternalSources) - { - // For now, if this is a Zoom Room and there are no shareable sources just display the informational subpage - TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, false); - TriList.SetBool(UIBoolJoin.ZoomRoomContentSharingVisible, true); - } - else - { - // Otherwise, show the staging bar - TriList.SetBool(UIBoolJoin.ZoomRoomContentSharingVisible, false); - TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, presentationMode ? true : false); - - } - if (!presentationMode) - { - TriList.SetBool(UIBoolJoin.ZoomRoomContentSharingVisible, false); - TriList.SetBool(UIBoolJoin.SelectASourceVisible, false); - } - - CallButtonSig.BoolValue = callMode - && CurrentRoom.ShutdownType == eShutdownType.None; - ShareButtonSig.BoolValue = presentationMode - && CurrentRoom.ShutdownType == eShutdownType.None; - EndMeetingButtonSig.BoolValue = CurrentRoom.ShutdownType != eShutdownType.None; - } - } - - /// - /// - /// - public void ActivityCallButtonPressed() - { - if (VCDriver.IsVisible) - return; - HideLogo(); - HideNextMeetingPopup(); - //TriList.SetBool(StartPageVisibleJoin, false); - //TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, false); - //TriList.SetBool(UIBoolJoin.SelectASourceVisible, false); - if (CurrentSourcePageManager != null) - CurrentSourcePageManager.Hide(); - PowerOnFromCall(); - CurrentMode = UiDisplayMode.Call; - VCDriver.Show(); - } - - /// - /// Attached to activity list share button - /// - void ActivityShareButtonPressed() - { - SetupSourceList(); - if (VCDriver.IsVisible) - VCDriver.Hide(); - HideNextMeetingPopup(); - - - if (_isZoomRoomWithNoExternalSources) - { - if (!CurrentRoom.OnFeedback.BoolValue) - { - CurrentRoom.RunDefaultPresentRoute(); - } - // For now, if this is a Zoom Room and there are no shareable sources just display the informational subpage - TriList.SetBool(UIBoolJoin.ZoomRoomContentSharingVisible, true); - - var presentationMeetingCodec = CurrentRoom.VideoCodec as IHasPresentationOnlyMeeting; - var farEndContentStatusCodec = CurrentRoom.VideoCodec as IHasFarEndContentStatus; - var receivingContent = false; - - if (farEndContentStatusCodec != null) - { - receivingContent = farEndContentStatusCodec.ReceivingContent.BoolValue; - } - - if (presentationMeetingCodec != null && !CurrentRoom.VideoCodec.IsInCall) - { - presentationMeetingCodec.StartSharingOnlyMeeting(eSharingMeetingMode.Laptop); - } - else if (CurrentRoom.VideoCodec.IsInCall && !CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue && - !receivingContent) - { - CurrentRoom.VideoCodec.StartSharing(); - } - - if (CurrentSourcePageManager != null) - CurrentSourcePageManager.Hide(); - } - else - { - // Run default source when room is off and share is pressed - if (!CurrentRoom.OnFeedback.BoolValue) - { - // If there's no default, show UI elements - if (!(CurrentRoom as IRunDefaultPresentRoute).RunDefaultPresentRoute()) - TriList.SetBool(UIBoolJoin.SelectASourceVisible, true); - } - else // room is on show what's active or select a source if nothing is yet active - { - if (CurrentRoom.CurrentSourceInfo == null || - (CurrentRoom.VideoCodec != null && - CurrentRoom.CurrentSourceInfo.SourceDevice.Key == CurrentRoom.VideoCodec.OsdSource.Key)) - TriList.SetBool(UIBoolJoin.SelectASourceVisible, true); - else if (CurrentSourcePageManager != null) - { - TriList.SetBool(UIBoolJoin.SelectASourceVisible, false); - CurrentSourcePageManager.Show(); - } - } - SetupSourceList(); - } - CurrentMode = UiDisplayMode.Presentation; - } - - /// - /// Powers up the system to the codec route, if not already on. - /// - void PowerOnFromCall() - { - if (!CurrentRoom.OnFeedback.BoolValue) - { - CurrentRoom.RunDefaultCallRoute(); - } - } - - /// - /// Shows all sigs that are in CurrentDisplayModeSigsInUse - /// - void ShowCurrentDisplayModeSigsInUse() - { - foreach (var sig in CurrentDisplayModeSigsInUse) - sig.BoolValue = true; - } - - /// - /// Hides all CurrentDisplayModeSigsInUse sigs and clears the array - /// - void HideAndClearCurrentDisplayModeSigsInUse() - { - foreach (var sig in CurrentDisplayModeSigsInUse) - sig.BoolValue = false; - CurrentDisplayModeSigsInUse.Clear(); - } - - - /// - /// Loads the appropriate Sigs into CurrentDisplayModeSigsInUse and shows them - /// - void ShowCurrentSource() - { - if (CurrentRoom.CurrentSourceInfo == null || _isZoomRoomWithNoExternalSources) - return; - - CurrentMode = UiDisplayMode.Presentation; - - if (CurrentRoom.CurrentSourceInfo.SourceDevice == null) - { - TriList.SetBool(UIBoolJoin.SelectASourceVisible, true); - return; - } - - var uiDev = CurrentRoom.CurrentSourceInfo.SourceDevice as IUiDisplayInfo; - PageManager pm = null; - // If we need a page manager, get an appropriate one - if (uiDev != null) - { - TriList.SetBool(UIBoolJoin.SelectASourceVisible, false); - // Got an existing page manager, get it - if (PageManagers.ContainsKey(uiDev)) - pm = PageManagers[uiDev]; - // Otherwise make an apporiate one - else if (uiDev is ISetTopBoxControls) - pm = new SetTopBoxThreePanelPageManager(uiDev as ISetTopBoxControls, TriList); - else if (uiDev is IDiscPlayerControls) - pm = new DiscPlayerMediumPageManager(uiDev as IDiscPlayerControls, TriList); - else - pm = new DefaultPageManager(uiDev, TriList); - PageManagers[uiDev] = pm; - CurrentSourcePageManager = pm; - pm.Show(); - } - } - - /// - /// Called from button presses on source, where We can assume we want - /// to change to the proper screen. - /// - /// The key name of the route to run - void UiSelectSource(string key) - { - // Run the route and when it calls back, show the source - CurrentRoom.RunRouteAction(key); - } - - /// - /// - /// - public void EndMeetingPress() - { - if (!CurrentRoom.OnFeedback.BoolValue - || CurrentRoom.ShutdownPromptTimer.IsRunningFeedback.BoolValue) - return; - - CurrentRoom.StartShutdown(eShutdownType.Manual); - } - - /// - /// Puts away modals and things that might be up when call comes in - /// - public void PrepareForCodecIncomingCall() - { - if (PowerDownModal != null && PowerDownModal.ModalIsVisible) - PowerDownModal.CancelDialog(); - PopupInterlock.Hide(); - } - - /// - /// - /// - /// - /// - void ShutdownPromptTimer_HasStarted(object sender, EventArgs e) - { - // Do we need to check where the UI is? No? - var timer = CurrentRoom.ShutdownPromptTimer; - SetActivityFooterFeedbacks(); - - if (CurrentRoom.ShutdownType == eShutdownType.Manual || CurrentRoom.ShutdownType == eShutdownType.Vacancy) - { - PowerDownModal = new ModalDialog(TriList); - var message = string.Format("Meeting will end in {0} seconds", CurrentRoom.ShutdownPromptSeconds); - - // Attach timer things to modal - CurrentRoom.ShutdownPromptTimer.TimeRemainingFeedback.OutputChange += ShutdownPromptTimer_TimeRemainingFeedback_OutputChange; - CurrentRoom.ShutdownPromptTimer.PercentFeedback.OutputChange += ShutdownPromptTimer_PercentFeedback_OutputChange; - - // respond to offs by cancelling dialog - var onFb = CurrentRoom.OnFeedback; - EventHandler offHandler = null; - offHandler = (o, a) => - { - if (!onFb.BoolValue) - { - PowerDownModal.HideDialog(); - SetActivityFooterFeedbacks(); - onFb.OutputChange -= offHandler; - } - }; - onFb.OutputChange += offHandler; - - PowerDownModal.PresentModalDialog(2, "End Meeting", "Power", message, "Cancel", "End Meeting Now", true, true, - but => - { - if (but != 2) // any button except for End cancels - timer.Cancel(); - else - timer.Finish(); - }); - } - } - - /// - /// - /// - /// - /// - void ShutdownPromptTimer_HasFinished(object sender, EventArgs e) - { - SetActivityFooterFeedbacks(); - CurrentRoom.ShutdownPromptTimer.TimeRemainingFeedback.OutputChange -= ShutdownPromptTimer_TimeRemainingFeedback_OutputChange; - CurrentRoom.ShutdownPromptTimer.PercentFeedback.OutputChange -= ShutdownPromptTimer_PercentFeedback_OutputChange; - } - - /// - /// - /// - /// - /// - void ShutdownPromptTimer_WasCancelled(object sender, EventArgs e) - { - if (PowerDownModal != null) - PowerDownModal.HideDialog(); - SetActivityFooterFeedbacks(); - - CurrentRoom.ShutdownPromptTimer.TimeRemainingFeedback.OutputChange += ShutdownPromptTimer_TimeRemainingFeedback_OutputChange; - CurrentRoom.ShutdownPromptTimer.PercentFeedback.OutputChange -= ShutdownPromptTimer_PercentFeedback_OutputChange; - } - - /// - /// Event handler for countdown timer on power off modal - /// - void ShutdownPromptTimer_TimeRemainingFeedback_OutputChange(object sender, EventArgs e) - { - - var message = string.Format("Meeting will end in {0} seconds", (sender as StringFeedback).StringValue); - TriList.StringInput[ModalDialog.MessageTextJoin].StringValue = message; - } - - /// - /// Event handler for percentage on power off countdown - /// - void ShutdownPromptTimer_PercentFeedback_OutputChange(object sender, EventArgs e) - { - var value = (ushort)((sender as IntFeedback).UShortValue * 65535 / 100); - TriList.UShortInput[ModalDialog.TimerGaugeJoin].UShortValue = value; - } - - /// - /// - /// - void CancelPowerOffTimer() - { - if (PowerOffTimer != null) - { - PowerOffTimer.Stop(); - PowerOffTimer = null; - } - } - - /// - /// - /// - /// - public void VolumeUpPress(bool state) - { - if (CurrentRoom.CurrentVolumeControls != null) - CurrentRoom.CurrentVolumeControls.VolumeUp(state); - } - - /// - /// - /// - /// - public void VolumeDownPress(bool state) - { - if (CurrentRoom.CurrentVolumeControls != null) - CurrentRoom.CurrentVolumeControls.VolumeDown(state); - } - - /// - /// Helper for property setter. Sets the panel to the given room, latching up all functionality - /// - void RefreshCurrentRoom(IEssentialsHuddleVtc1Room room) - { - - if (_CurrentRoom != null) - { - // Disconnect current room - _CurrentRoom.CurrentVolumeDeviceChange -= this.CurrentRoom_CurrentAudioDeviceChange; - ClearAudioDeviceConnections(); - _CurrentRoom.CurrentSourceChange -= this.CurrentRoom_SourceInfoChange; - DisconnectSource(_CurrentRoom.CurrentSourceInfo); - _CurrentRoom.ShutdownPromptTimer.HasStarted -= ShutdownPromptTimer_HasStarted; - _CurrentRoom.ShutdownPromptTimer.HasFinished -= ShutdownPromptTimer_HasFinished; - _CurrentRoom.ShutdownPromptTimer.WasCancelled -= ShutdownPromptTimer_WasCancelled; - - _CurrentRoom.OnFeedback.OutputChange -= CurrentRoom_OnFeedback_OutputChange; - _CurrentRoom.IsWarmingUpFeedback.OutputChange -= CurrentRoom_IsWarmingFeedback_OutputChange; - _CurrentRoom.IsCoolingDownFeedback.OutputChange -= CurrentRoom_IsCoolingDownFeedback_OutputChange; - _CurrentRoom.InCallFeedback.OutputChange -= CurrentRoom_InCallFeedback_OutputChange; - - var scheduleAwareCodec = _CurrentRoom.VideoCodec as IHasScheduleAwareness; - if (scheduleAwareCodec != null) - { - scheduleAwareCodec.CodecSchedule.MeetingsListHasChanged -= CodecSchedule_MeetingsListHasChanged; - } - - var meetingInfoCodec = _CurrentRoom.VideoCodec as IHasMeetingInfo; - if (meetingInfoCodec != null) - { - meetingInfoCodec.MeetingInfoChanged -= meetingInfoCodec_MeetingInfoChanged; - } - } - - _CurrentRoom = room; - - if (_CurrentRoom != null) - { - // get the source list config and set up the source list - - SetupSourceList(); - - // Name and logo - TriList.StringInput[UIStringJoin.CurrentRoomName].StringValue = _CurrentRoom.Name; - ShowLogo(); - - // Shutdown timer - _CurrentRoom.ShutdownPromptTimer.HasStarted += ShutdownPromptTimer_HasStarted; - _CurrentRoom.ShutdownPromptTimer.HasFinished += ShutdownPromptTimer_HasFinished; - _CurrentRoom.ShutdownPromptTimer.WasCancelled += ShutdownPromptTimer_WasCancelled; - - // Link up all the change events from the room - _CurrentRoom.OnFeedback.OutputChange += CurrentRoom_OnFeedback_OutputChange; - CurrentRoom_SyncOnFeedback(); - _CurrentRoom.IsWarmingUpFeedback.OutputChange += CurrentRoom_IsWarmingFeedback_OutputChange; - _CurrentRoom.IsCoolingDownFeedback.OutputChange += CurrentRoom_IsCoolingDownFeedback_OutputChange; - _CurrentRoom.InCallFeedback.OutputChange += CurrentRoom_InCallFeedback_OutputChange; - - - _CurrentRoom.CurrentVolumeDeviceChange += CurrentRoom_CurrentAudioDeviceChange; - RefreshAudioDeviceConnections(); - _CurrentRoom.CurrentSourceChange += CurrentRoom_SourceInfoChange; - RefreshSourceInfo(); - - - var scheduleAwareCodec = _CurrentRoom.VideoCodec as IHasScheduleAwareness; - if (scheduleAwareCodec != null) - { - scheduleAwareCodec.CodecSchedule.MeetingsListHasChanged += CodecSchedule_MeetingsListHasChanged; - } - - var meetingInfoCodec = _CurrentRoom.VideoCodec as IHasMeetingInfo; - if (meetingInfoCodec != null) - { - meetingInfoCodec.MeetingInfoChanged += new EventHandler(meetingInfoCodec_MeetingInfoChanged); - - CallListOrMeetingInfoPopoverVisibilityJoin = UIBoolJoin.HeaderMeetingInfoVisible; - } - else - { - CallListOrMeetingInfoPopoverVisibilityJoin = UIBoolJoin.HeaderActiveCallsListVisible; - } - - CallSharingInfoVisibleFeedback = new BoolFeedback(() => _CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue); - _CurrentRoom.VideoCodec.SharingContentIsOnFeedback.OutputChange += SharingContentIsOnFeedback_OutputChange; - CallSharingInfoVisibleFeedback.LinkInputSig(TriList.BooleanInput[UIBoolJoin.CallSharedSourceInfoVisible]); - - SetActiveCallListSharingContentStatus(); - - if (_CurrentRoom != null) - _CurrentRoom.CurrentSourceChange += new SourceInfoChangeHandler(CurrentRoom_CurrentSingleSourceChange); - - // Moved to EssentialsVideoCodecUiDriver - //TriList.SetSigFalseAction(UIBoolJoin.CallStopSharingPress, () => _CurrentRoom.RunRouteAction("codecOsd", _CurrentRoom.SourceListKey)); - - (Parent as EssentialsPanelMainInterfaceDriver).HeaderDriver.SetupHeaderButtons(this, CurrentRoom); - } - else - { - // Clear sigs that need to be - TriList.StringInput[UIStringJoin.CurrentRoomName].StringValue = "Select a room"; - } - } - - void meetingInfoCodec_MeetingInfoChanged(object sender, MeetingInfoEventArgs e) - { - if (e.Info == null) - { - return; - } - - TriList.SetString(UIStringJoin.MeetingIdText, e.Info.Id); - TriList.SetString(UIStringJoin.MeetingHostText, e.Info.Host); - TriList.SetString(UIStringJoin.MeetingNameText, e.Info.Name); - - TriList.SetString(UIStringJoin.MeetingPasswordText, e.Info.Password); - // Show the password fields if one is present - TriList.SetBool(UIBoolJoin.MeetingPasswordVisible, !string.IsNullOrEmpty(e.Info.Password)); - - TriList.SetString(UIStringJoin.CallSharedSourceNameText, e.Info.ShareStatus); - - TriList.SetString(UIStringJoin.MeetingLeaveText, e.Info.IsHost ? "End Meeting" : "Leave Meeting"); - } - - void SetCurrentRoom(IEssentialsHuddleVtc1Room room) - { - if (_CurrentRoom == room) return; - // Disconnect current (probably never called) - - if(_CurrentRoom != null) - _CurrentRoom.ConfigChanged -= room_ConfigChanged; - - room.ConfigChanged -= room_ConfigChanged; - room.ConfigChanged += room_ConfigChanged; - - if (room.IsMobileControlEnabled) - { - StartPageVisibleJoin = UIBoolJoin.StartMCPageVisible; - UpdateMCJoins(room); - - if (_CurrentRoom != null) - _CurrentRoom.MobileControlRoomBridge.UserCodeChanged -= MobileControlRoomBridge_UserCodeChanged; - - room.MobileControlRoomBridge.UserCodeChanged -= MobileControlRoomBridge_UserCodeChanged; - room.MobileControlRoomBridge.UserCodeChanged += MobileControlRoomBridge_UserCodeChanged; - } - else - { - StartPageVisibleJoin = UIBoolJoin.StartPageVisible; - } - - RefreshCurrentRoom(room); - } - - void MobileControlRoomBridge_UserCodeChanged(object sender, EventArgs e) - { - UpdateMCJoins(_CurrentRoom); - } - - void UpdateMCJoins(IEssentialsHuddleVtc1Room room) - { - TriList.SetString(UIStringJoin.RoomMcUrl, room.MobileControlRoomBridge.McServerUrl); - TriList.SetString(UIStringJoin.RoomMcQrCodeUrl, room.MobileControlRoomBridge.QrCodeUrl); - TriList.SetString(UIStringJoin.RoomUserCode, room.MobileControlRoomBridge.UserCode); - } - - /// - /// Fires when room config of current room has changed. Meant to refresh room values to propegate any updates to UI - /// - /// - /// - void room_ConfigChanged(object sender, EventArgs e) - { - RefreshCurrentRoom(_CurrentRoom); - } - - /// - /// - /// - /// - /// - void CurrentRoom_InCallFeedback_OutputChange(object sender, EventArgs e) - { - var inCall = CurrentRoom.InCallFeedback.BoolValue; - if (inCall) - { - // Check if transitioning to in call - and non-sharable source is in use - if (CurrentRoom.CurrentSourceInfo != null && CurrentRoom.CurrentSourceInfo.DisableCodecSharing) - { - Debug.Console(1, CurrentRoom, "Transitioning to in-call, cancelling non-sharable source"); - CurrentRoom.RunRouteAction("codecOsd"); - } - } - - SetupSourceList(); - } - - /// - /// - /// - void SetupSourceList() - { - - var inCall = CurrentRoom.InCallFeedback.BoolValue; - var config = ConfigReader.ConfigObject.SourceLists; - - - if (config.ContainsKey(_CurrentRoom.SourceListKey)) - { - var srcList = config[_CurrentRoom.SourceListKey].OrderBy(kv => kv.Value.Order); - - - // Setup sources list - SourceStagingSrl.Clear(); - uint i = 1; // counter for UI list - foreach (var kvp in srcList) - { - var srcConfig = kvp.Value; - Debug.Console(1, "**** {0}, {1}, {2}, {3}, {4}", srcConfig.PreferredName, srcConfig.IncludeInSourceList, - srcConfig.DisableCodecSharing, inCall, this.CurrentMode); - // Skip sources marked as not included, and filter list of non-sharable sources when in call - // or on share screen - if (!srcConfig.IncludeInSourceList || (inCall && srcConfig.DisableCodecSharing) - || this.CurrentMode == UiDisplayMode.Call && srcConfig.DisableCodecSharing) - { - Debug.Console(1, "Skipping {0}", srcConfig.PreferredName); - continue; - } - - var routeKey = kvp.Key; - var item = new SubpageReferenceListSourceItem(i++, SourceStagingSrl, srcConfig, - b => { if (!b) UiSelectSource(routeKey); }); - SourceStagingSrl.AddItem(item); // add to the SRL - item.RegisterForSourceChange(_CurrentRoom); - Debug.Console(1, "**** KEY {0}", kvp.Key); - - } - _sourceListCount = (i - 1); - SourceStagingSrl.Count = (ushort)_sourceListCount; - } - - } - - /// - /// If the schedule changes, this event will fire - /// - /// - /// - void CodecSchedule_MeetingsListHasChanged(object sender, EventArgs e) - { - RefreshMeetingsList(); - } - - /// - /// Updates the current shared source label on the call list when the source changes - /// - /// - /// - /// - void CurrentRoom_CurrentSingleSourceChange(SourceListItem info, ChangeType type) - { - Debug.Console(1, "AvFunctionsDriver: CurrentSingleSourceChange"); - - // Show the Select a source subpage - if (TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue) - { - Debug.Console(1, "AvFunctionsDriver: CurrentSingleSourceChange SourceStagingBarVisisble: true"); - - if (_CurrentRoom.CurrentSourceInfo == null || (_CurrentRoom.VideoCodec != null && _CurrentRoom.CurrentSourceInfo.SourceDevice.Key == _CurrentRoom.VideoCodec.OsdSource.Key)) - { - Debug.Console(1, "AvFunctionsDriver: CurrentSingleSourceChange Showing SelectASourceVisible"); - TriList.SetBool(UIBoolJoin.SelectASourceVisible, true); - } - else - { - TriList.SetBool(UIBoolJoin.SelectASourceVisible, false); - Debug.Console(1, "AvFunctionsDriver: CurrentSingleSourceChange Hiding SelectASourceVisible"); - } - } - else - { - Debug.Console(1, "AvFunctionsDriver: CurrentSingleSourceChange Hiding SelectASourceVisible"); - TriList.SetBool(UIBoolJoin.SelectASourceVisible, false); - } - - if (_CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue && _CurrentRoom.CurrentSourceInfo != null) - TriList.StringInput[UIStringJoin.CallSharedSourceNameText].StringValue = _CurrentRoom.CurrentSourceInfo.PreferredName; - } - - /// - /// Fires when the sharing source feedback of the codec changes - /// - /// - /// - void SharingContentIsOnFeedback_OutputChange(object sender, EventArgs e) - { - SetActiveCallListSharingContentStatus(); - } - - /// - /// Sets the values for the text and button visibilty for the active call list source sharing info - /// - void SetActiveCallListSharingContentStatus() - { - CallSharingInfoVisibleFeedback.FireUpdate(); - - string callListSharedSourceLabel; - - if (_CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue && _CurrentRoom.CurrentSourceInfo != null) - { - Debug.Console(0, "*#* CurrentRoom.CurrentSourceInfo = {0}", - _CurrentRoom.CurrentSourceInfo != null ? _CurrentRoom.CurrentSourceInfo.SourceKey : "Nada!"); - callListSharedSourceLabel = _CurrentRoom.CurrentSourceInfo.PreferredName; - } - else - callListSharedSourceLabel = "None"; - - TriList.StringInput[UIStringJoin.CallSharedSourceNameText].StringValue = callListSharedSourceLabel; - } - - /// - /// - /// - void RefreshMeetingsList() - { - // See if this is helpful or if the callback response in the codec class maybe doesn't come it time? - // Let's build list from event - - TriList.SetString(UIStringJoin.MeetingsOrContactMethodListIcon, "Calendar"); - TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Today's Meetings"); - - ushort i = 0; - foreach (var m in CurrentRoom.ScheduleSource.CodecSchedule.Meetings) - { - i++; - MeetingOrContactMethodModalSrl.StringInputSig(i, 1).StringValue = m.StartTime.ToString("t", Global.Culture); - MeetingOrContactMethodModalSrl.StringInputSig(i, 2).StringValue = m.EndTime.ToString("t", Global.Culture); - MeetingOrContactMethodModalSrl.StringInputSig(i, 3).StringValue = m.Title; - MeetingOrContactMethodModalSrl.StringInputSig(i, 4).StringValue = string.Format("
{0}",m.Organizer); - MeetingOrContactMethodModalSrl.StringInputSig(i, 5).StringValue = "Join"; - MeetingOrContactMethodModalSrl.BoolInputSig(i, 2).BoolValue = m.Joinable; - var mm = m; // lambda scope - MeetingOrContactMethodModalSrl.GetBoolFeedbackSig(i, 1).SetSigFalseAction(() => - { - PopupInterlock.Hide(); - ActivityCallButtonPressed(); - var d = CurrentRoom.ScheduleSource as VideoCodecBase; - if (d != null) - RoomOnAndDialMeeting(mm); - }); - } - MeetingOrContactMethodModalSrl.Count = i; - - if (i == 0) // Show item indicating no meetings are booked for rest of day - { - MeetingOrContactMethodModalSrl.Count = 1; - - MeetingOrContactMethodModalSrl.StringInputSig(1, 1).StringValue = string.Empty; - MeetingOrContactMethodModalSrl.StringInputSig(1, 2).StringValue = string.Empty; - MeetingOrContactMethodModalSrl.StringInputSig(1, 3).StringValue = "No Meetings are booked for the remainder of the day."; - MeetingOrContactMethodModalSrl.StringInputSig(1, 4).StringValue = string.Empty; - MeetingOrContactMethodModalSrl.StringInputSig(1, 5).StringValue = string.Empty; - } - } - - /// - /// For room on/off changes - /// - void CurrentRoom_OnFeedback_OutputChange(object sender, EventArgs e) - { - CurrentRoom_SyncOnFeedback(); - } - - /// - /// - /// - void CurrentRoom_SyncOnFeedback() - { - var value = _CurrentRoom.OnFeedback.BoolValue; - TriList.BooleanInput[UIBoolJoin.RoomIsOn].BoolValue = value; - - //TriList.BooleanInput[StartPageVisibleJoin].BoolValue = !value; - - if (value) //ON - { - SetupActivityFooterWhenRoomOn(); - //TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false; - TriList.BooleanInput[UIBoolJoin.VolumeDualMute1Visible].BoolValue = true; - - } - else - { - CurrentMode = UiDisplayMode.Start; - if (VCDriver.IsVisible) - VCDriver.Hide(); - SetupActivityFooterWhenRoomOff(); - ShowLogo(); - //TriList.BooleanInput[UIBoolJoin.VolumeDualMute1Visible].BoolValue = false; - //TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue = false; - // Clear this so that the pesky meeting warning can resurface every minute when off - LastMeetingDismissedId = null; - } - } - - /// - /// - /// - void CurrentRoom_IsWarmingFeedback_OutputChange(object sender, EventArgs e) - { - if (CurrentRoom.IsWarmingUpFeedback.BoolValue) - { - ShowNotificationRibbon("Room is powering on. Please wait...", 0); - } - else - { - ShowNotificationRibbon("Room is powered on. Welcome.", 2000); - } - } - - /// - /// - /// - /// - /// - void CurrentRoom_IsCoolingDownFeedback_OutputChange(object sender, EventArgs e) - { - if (CurrentRoom.IsCoolingDownFeedback.BoolValue) - { - ShowNotificationRibbon("Room is powering off. Please wait.", 0); - } - else - { - HideNotificationRibbon(); - } - } - - /// - /// Hides source for provided source info - /// - /// - void DisconnectSource(SourceListItem previousInfo) - { - if (previousInfo == null) return; - - // Hide whatever is showing - if (IsVisible) - { - if (CurrentSourcePageManager != null) - { - CurrentSourcePageManager.Hide(); - CurrentSourcePageManager = null; - } - } - - if (previousInfo == null) return; - var previousDev = previousInfo.SourceDevice; - - // device type interfaces - if (previousDev is ISetTopBoxControls) - (previousDev as ISetTopBoxControls).UnlinkButtons(TriList); - // common interfaces - if (previousDev is IChannel) - (previousDev as IChannel).UnlinkButtons(TriList); - if (previousDev is IColor) - (previousDev as IColor).UnlinkButtons(TriList); - if (previousDev is IDPad) - (previousDev as IDPad).UnlinkButtons(TriList); - if (previousDev is IDvr) - (previousDev as IDvr).UnlinkButtons(TriList); - if (previousDev is INumericKeypad) - (previousDev as INumericKeypad).UnlinkButtons(TriList); - if (previousDev is IHasPowerControl) - (previousDev as IHasPowerControl).UnlinkButtons(TriList); - if (previousDev is ITransport) - (previousDev as ITransport).UnlinkButtons(TriList); - } - - /// - /// Refreshes and shows the room's current source - /// - void RefreshSourceInfo() - { - var routeInfo = CurrentRoom.CurrentSourceInfo; - // This will show off popup too - if (this.IsVisible && !VCDriver.IsVisible) - ShowCurrentSource(); - - if (routeInfo == null)// || !CurrentRoom.OnFeedback.BoolValue) - { - // Check for power off and insert "Room is off" - TriList.StringInput[UIStringJoin.CurrentSourceName].StringValue = "Room is off"; - TriList.StringInput[UIStringJoin.CurrentSourceIcon].StringValue = "Power"; - this.Hide(); - Parent.Show(); - return; - } - else if (routeInfo != null) - { - TriList.StringInput[UIStringJoin.CurrentSourceName].StringValue = routeInfo.PreferredName; - TriList.StringInput[UIStringJoin.CurrentSourceIcon].StringValue = routeInfo.Icon; // defaults to "blank" - } - else // This never gets hit???!!! - { - TriList.StringInput[UIStringJoin.CurrentSourceName].StringValue = "---"; - TriList.StringInput[UIStringJoin.CurrentSourceIcon].StringValue = "Blank"; - } - - // Connect controls - if (routeInfo.SourceDevice != null) - ConnectControlDeviceMethods(routeInfo.SourceDevice); - } - - /// - /// Attach the source to the buttons and things - /// - void ConnectControlDeviceMethods(Device dev) - { - if (dev is ISetTopBoxControls) - (dev as ISetTopBoxControls).LinkButtons(TriList); - if (dev is IChannel) - (dev as IChannel).LinkButtons(TriList); - if (dev is IColor) - (dev as IColor).LinkButtons(TriList); - if (dev is IDPad) - (dev as IDPad).LinkButtons(TriList); - if (dev is IDvr) - (dev as IDvr).LinkButtons(TriList); - if (dev is INumericKeypad) - (dev as INumericKeypad).LinkButtons(TriList); - if (dev is IHasPowerControl) - (dev as IHasPowerControl).LinkButtons(TriList); - if (dev is ITransport) - (dev as ITransport).LinkButtons(TriList); - } - - /// - /// Detaches the buttons and feedback from the room's current audio device - /// - void ClearAudioDeviceConnections() - { - TriList.ClearBoolSigAction(UIBoolJoin.VolumeUpPress); - TriList.ClearBoolSigAction(UIBoolJoin.VolumeDownPress); - TriList.ClearBoolSigAction(UIBoolJoin.Volume1ProgramMutePressAndFB); - - var fDev = CurrentRoom.CurrentVolumeControls as IBasicVolumeWithFeedback; - if (fDev != null) - { - TriList.ClearUShortSigAction(UIUshortJoin.VolumeSlider1Value); - fDev.VolumeLevelFeedback.UnlinkInputSig( - TriList.UShortInput[UIUshortJoin.VolumeSlider1Value]); - } - } - - /// - /// Attaches the buttons and feedback to the room's current audio device - /// - void RefreshAudioDeviceConnections() - { - var dev = CurrentRoom.CurrentVolumeControls; - if (dev != null) // connect buttons - { - TriList.SetBoolSigAction(UIBoolJoin.VolumeUpPress, VolumeUpPress); - TriList.SetBoolSigAction(UIBoolJoin.VolumeDownPress, VolumeDownPress); - TriList.SetSigFalseAction(UIBoolJoin.Volume1ProgramMutePressAndFB, dev.MuteToggle); - } - - var fbDev = dev as IBasicVolumeWithFeedback; - if (fbDev == null) // this should catch both IBasicVolume and IBasicVolumeWithFeeback - TriList.UShortInput[UIUshortJoin.VolumeSlider1Value].UShortValue = 0; - else - { - // slider - TriList.SetUShortSigAction(UIUshortJoin.VolumeSlider1Value, fbDev.SetVolume); - // feedbacks - fbDev.MuteFeedback.LinkInputSig(TriList.BooleanInput[UIBoolJoin.Volume1ProgramMutePressAndFB]); - fbDev.VolumeLevelFeedback.LinkInputSig( - TriList.UShortInput[UIUshortJoin.VolumeSlider1Value]); - } - } - - /// - /// Handler for when the room's volume control device changes - /// - void CurrentRoom_CurrentAudioDeviceChange(object sender, VolumeDeviceChangeEventArgs args) - { - if (args.Type == ChangeType.WillChange) - ClearAudioDeviceConnections(); - else // did change - RefreshAudioDeviceConnections(); - } - - /// - /// Handles source change - /// - void CurrentRoom_SourceInfoChange(SourceListItem info, ChangeType change) - { - if (change == ChangeType.WillChange) - DisconnectSource(info); - else - RefreshSourceInfo(); - } - } - - /// - /// For hanging off various common AV things that child drivers might need from a parent AV driver - /// - public interface IAVDriver - { - PanelDriverBase Parent { get; } - JoinedSigInterlock PopupInterlock { get; } - void ShowNotificationRibbon(string message, int timeout); - void HideNotificationRibbon(); - void ShowTech(); - uint StartPageVisibleJoin { get; } - } - - /// - /// For hanging off various common VC things that child drivers might need from a parent AV driver - /// - public interface IAVWithVCDriver : IAVDriver - { - IEssentialsHuddleVtc1Room CurrentRoom { get; } - - PepperDash.Essentials.Core.Touchpanels.Keyboards.HabaneroKeyboardController Keyboard { get; } - /// - /// Exposes the ability to switch into call mode - /// - void ActivityCallButtonPressed(); - /// - /// Allows the codec to trigger the main UI to clear up if call is coming in. - /// - void PrepareForCodecIncomingCall(); - - uint CallListOrMeetingInfoPopoverVisibilityJoin { get; } - - SubpageReferenceList MeetingOrContactMethodModalSrl { get; } - } -} +using System; +using System.Linq; +using System.Collections.Generic; +using System.Globalization; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.UI; + +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.SmartObjects; +using PepperDash.Essentials.Core.PageManagers; +using PepperDash.Essentials.Room.Config; +using PepperDash.Essentials.Devices.Common.Codec; +using PepperDash.Essentials.Devices.Common.VideoCodec; +using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces; + +namespace PepperDash.Essentials +{ + /// + /// + /// + public class EssentialsHuddleVtc1PanelAvFunctionsDriver : PanelDriverBase, IAVWithVCDriver + { + CrestronTouchpanelPropertiesConfig Config; + + public enum UiDisplayMode + { + Presentation, AudioSetup, Call, Start + } + + public uint StartPageVisibleJoin { get; private set; } + + /// + /// Whether volume ramping from this panel will show the volume + /// gauge popup. + /// + public bool ShowVolumeGauge { get; set; } + + /// + /// + /// + public uint PowerOffTimeout { get; set; } + + /// + /// + /// + public string DefaultRoomKey { get; set; } + + + /// + /// + /// + public IEssentialsHuddleVtc1Room CurrentRoom + { + get { return _CurrentRoom; } + set + { + SetCurrentRoom(value); + } + } + IEssentialsHuddleVtc1Room _CurrentRoom; + + /// + /// For hitting feedbacks + /// + BoolInputSig CallButtonSig; + BoolInputSig ShareButtonSig; + BoolInputSig EndMeetingButtonSig; + + BoolFeedback CallSharingInfoVisibleFeedback; + + /// + /// The parent driver for this + /// + public PanelDriverBase Parent { get; private set; } + + /// + /// All children attached to this driver. For hiding and showing as a group. + /// + List ChildDrivers = new List(); + + List CurrentDisplayModeSigsInUse = new List(); + + //// Important smart objects + + /// + /// Smart Object 3200 + /// + SubpageReferenceList SourceStagingSrl; + + /// + /// Smart Object 15022 + /// + SubpageReferenceList ActivityFooterSrl; + + /// + /// + /// + public SubpageReferenceList MeetingOrContactMethodModalSrl { get; set; } + + public uint CallListOrMeetingInfoPopoverVisibilityJoin { get; private set; } + + + /// + /// The list of buttons on the header. Managed with visibility only + /// + //SmartObjectHeaderButtonList HeaderButtonsList; + + /// + /// The AV page mangagers that have been used, to keep them alive for later + /// + Dictionary PageManagers = new Dictionary(); + + /// + /// Current page manager running for a source + /// + PageManager CurrentSourcePageManager; + + /// + /// Will auto-timeout a power off + /// + CTimer PowerOffTimer; + + /// + /// + /// + ModalDialog PowerDownModal; + + /// + /// + /// + //ModalDialog WarmingCoolingModal; + + /// + /// Represents + /// + public JoinedSigInterlock PopupInterlock { get; private set; } + + /// + /// Interlock for various source, camera, call control bars. The bar above the activity footer. This is also + /// used to show start page + /// + JoinedSigInterlock StagingBarInterlock; + + /// + /// Interlocks the various call-related subpages + /// + JoinedSigInterlock CallPagesInterlock; + + /// + /// The Video codec driver + /// + PepperDash.Essentials.UIDrivers.VC.EssentialsVideoCodecUiDriver VCDriver; + + /// + /// The driver for the tech page. Lazy getter for memory usage + /// + PepperDash.Essentials.UIDrivers.EssentialsHuddleTechPageDriver TechDriver + { + get + { + if (_TechDriver == null) + _TechDriver = new PepperDash.Essentials.UIDrivers.EssentialsHuddleTechPageDriver(TriList, CurrentRoom.PropertiesConfig.Tech); + return _TechDriver; + } + } + PepperDash.Essentials.UIDrivers.EssentialsHuddleTechPageDriver _TechDriver; + + /// + /// Controls timeout of notification ribbon timer + /// + CTimer RibbonTimer; + + /// + /// The keyboard + /// + public PepperDash.Essentials.Core.Touchpanels.Keyboards.HabaneroKeyboardController Keyboard { get; private set; } + + + private UiDisplayMode _currentMode; + + private bool _isZoomRoomWithNoExternalSources + { + get + { + return CurrentRoom.VideoCodec is Essentials.Devices.Common.VideoCodec.ZoomRoom.ZoomRoom && _sourceListCount <= 1; + } + } + + private uint _sourceListCount; + + /// + /// The mode showing. Presentation or call. + /// + UiDisplayMode CurrentMode + { + get + { + return _currentMode; + } + set + { + if (value != _currentMode) + { + _currentMode = value; + + SetActivityFooterFeedbacks(); + } + } + } + + CTimer NextMeetingTimer; + + /// + /// Tracks the last meeting that was cancelled + /// + string LastMeetingDismissedId; + + /// + /// Constructor + /// + public EssentialsHuddleVtc1PanelAvFunctionsDriver(PanelDriverBase parent, CrestronTouchpanelPropertiesConfig config) + : base(parent.TriList) + { + Config = config; + Parent = parent; + + PopupInterlock = new JoinedSigInterlock(TriList); + StagingBarInterlock = new JoinedSigInterlock(TriList); + CallPagesInterlock = new JoinedSigInterlock(TriList); + + SourceStagingSrl = new SubpageReferenceList(TriList, UISmartObjectJoin.SourceStagingSRL, 3, 3, 3); + + ActivityFooterSrl = new SubpageReferenceList(TriList, UISmartObjectJoin.ActivityFooterSRL, 3, 3, 3); + CallButtonSig = ActivityFooterSrl.BoolInputSig(2, 1); + ShareButtonSig = ActivityFooterSrl.BoolInputSig(1, 1); + EndMeetingButtonSig = ActivityFooterSrl.BoolInputSig(3, 1); + + MeetingOrContactMethodModalSrl = new SubpageReferenceList(TriList, UISmartObjectJoin.MeetingListSRL, 3, 3, 5); + + CurrentMode = UiDisplayMode.Start; + + // buttons are added in SetCurrentRoom + //HeaderButtonsList = new SmartObjectHeaderButtonList(TriList.SmartObjects[UISmartObjectJoin.HeaderButtonList]); + + SetupActivityFooterWhenRoomOff(); + + ShowVolumeGauge = true; + Keyboard = new PepperDash.Essentials.Core.Touchpanels.Keyboards.HabaneroKeyboardController(TriList); + } + + /// + /// Add a video codec driver to this + /// + /// + public void SetVideoCodecDriver(PepperDash.Essentials.UIDrivers.VC.EssentialsVideoCodecUiDriver vcd) + { + VCDriver = vcd; + } + + /// + /// + /// + public override void Show() + { + if (CurrentRoom == null) + { + Debug.Console(1, "ERROR: AVUIFunctionsDriver, Cannot show. No room assigned"); + return; + } + + var roomConf = CurrentRoom.PropertiesConfig; + + if (Config.HeaderStyle.ToLower() == CrestronTouchpanelPropertiesConfig.Habanero) + { + TriList.SetSigFalseAction(UIBoolJoin.HeaderRoomButtonPress, () => + { + if (CurrentRoom.IsMobileControlEnabled) + { + Debug.Console(1, "Showing Mobile Control Header Info"); + PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderInfoMCPageVisible); + } + else + { + Debug.Console(1, "Showing Non Mobile Control Header Info"); + PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderInfoPageVisible); + } + }); + } + else if (Config.HeaderStyle.ToLower() == CrestronTouchpanelPropertiesConfig.Verbose) + { + TriList.SetSigFalseAction(UIBoolJoin.HeaderRoomButtonPress, () => + { + if (CurrentRoom.IsMobileControlEnabled) + { + Debug.Console(1, "Showing Mobile Control Header Info"); + PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderInfoMCPageVisible); + } + else + { + Debug.Console(1, "Showing Non Mobile Control Header Info"); + PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderInfoPageVisible); + } + }); + } + + TriList.SetBool(UIBoolJoin.DateAndTimeVisible, Config.ShowDate && Config.ShowTime); + TriList.SetBool(UIBoolJoin.DateOnlyVisible, Config.ShowDate && !Config.ShowTime); + TriList.SetBool(UIBoolJoin.TimeOnlyVisible, !Config.ShowDate && Config.ShowTime); + + TriList.SetBool(UIBoolJoin.TopBarHabaneroDynamicVisible, true); + + TriList.SetBool(UIBoolJoin.ActivityFooterVisible, true); + + // Privacy mute button + TriList.SetSigFalseAction(UIBoolJoin.Volume1SpeechMutePressAndFB, CurrentRoom.PrivacyModeToggle); + CurrentRoom.PrivacyModeIsOnFeedback.LinkInputSig(TriList.BooleanInput[UIBoolJoin.Volume1SpeechMutePressAndFB]); + + // Default to showing rooms/sources now. + if (CurrentRoom.OnFeedback.BoolValue) + { + TriList.SetBool(UIBoolJoin.TapToBeginVisible, false); + SetupActivityFooterWhenRoomOn(); + } + else + { + TriList.SetBool(StartPageVisibleJoin, true); + TriList.SetBool(UIBoolJoin.TapToBeginVisible, true); + SetupActivityFooterWhenRoomOff(); + } + ShowCurrentDisplayModeSigsInUse(); + + // *** Header Buttons *** + + // Generic "close" button for popup modals + TriList.SetSigFalseAction(UIBoolJoin.InterlockedModalClosePress, PopupInterlock.HideAndClear); + + // Volume related things + TriList.SetSigFalseAction(UIBoolJoin.VolumeDefaultPress, () => CurrentRoom.SetDefaultLevels()); + TriList.SetString(UIStringJoin.AdvancedVolumeSlider1Text, "Room"); + + //if (TriList is CrestronApp) + // TriList.BooleanInput[UIBoolJoin.GearButtonVisible].BoolValue = false; + //else + // TriList.BooleanInput[UIBoolJoin.GearButtonVisible].BoolValue = true; + + // power-related functions + // Note: some of these are not directly-related to the huddle space UI, but are held over + // in case + TriList.SetSigFalseAction(UIBoolJoin.ShowPowerOffPress, EndMeetingPress); + + TriList.SetSigFalseAction(UIBoolJoin.DisplayPowerTogglePress, () => + { + if (CurrentRoom != null && CurrentRoom.DefaultDisplay != null && CurrentRoom.DefaultDisplay is IHasPowerControl) + (CurrentRoom.DefaultDisplay as IHasPowerControl).PowerToggle(); + }); + + SetupNextMeetingTimer(); + + base.Show(); + } + + /// + /// Allows PopupInterlock to be toggled if the calls list is already visible, or if the codec is in a call + /// + public void ShowActiveCallsListOrMeetingInfo() + { + TriList.SetBool(UIBoolJoin.CallEndAllConfirmVisible, true); + + + if(PopupInterlock.CurrentJoin == CallListOrMeetingInfoPopoverVisibilityJoin) + PopupInterlock.ShowInterlockedWithToggle(CallListOrMeetingInfoPopoverVisibilityJoin); + else + { + if(CurrentRoom.VideoCodec.IsInCall) + PopupInterlock.ShowInterlockedWithToggle(CallListOrMeetingInfoPopoverVisibilityJoin); + } + } + + /// + /// + /// + void ShowLogo() + { + if (CurrentRoom.LogoUrlLightBkgnd == null) + { + TriList.SetBool(UIBoolJoin.LogoDefaultVisible, true); + TriList.SetBool(UIBoolJoin.LogoUrlVisible, false); + } + else + { + TriList.SetBool(UIBoolJoin.LogoDefaultVisible, false); + TriList.SetBool(UIBoolJoin.LogoUrlVisible, true); + TriList.SetString(UIStringJoin.LogoUrlLightBkgnd, _CurrentRoom.LogoUrlLightBkgnd); + TriList.SetString(UIStringJoin.LogoUrlDarkBkgnd, _CurrentRoom.LogoUrlDarkBkgnd); + } + } + + /// + /// + /// + void HideLogo() + { + TriList.SetBool(UIBoolJoin.LogoDefaultVisible, false); + TriList.SetBool(UIBoolJoin.LogoUrlVisible, false); + } + + /// + /// + /// + public override void Hide() + { + HideAndClearCurrentDisplayModeSigsInUse(); + TriList.SetBool(UIBoolJoin.TopBarHabaneroDynamicVisible, false); + TriList.BooleanInput[UIBoolJoin.ActivityFooterVisible].BoolValue = false; + TriList.BooleanInput[StartPageVisibleJoin].BoolValue = false; + TriList.BooleanInput[UIBoolJoin.TapToBeginVisible].BoolValue = false; + TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false; + if (NextMeetingTimer != null) + NextMeetingTimer.Stop(); + HideNextMeetingPopup(); + base.Hide(); + } + + /// + /// Reveals a message on the notification ribbon until cleared + /// + /// Text to display + /// Time in ms to display. 0 to keep on screen + public void ShowNotificationRibbon(string message, int timeout) + { + TriList.SetString(UIStringJoin.NotificationRibbonText, message); + TriList.SetBool(UIBoolJoin.NotificationRibbonVisible, true); + if (timeout > 0) + { + if (RibbonTimer != null) + RibbonTimer.Stop(); + RibbonTimer = new CTimer(o => { + TriList.SetBool(UIBoolJoin.NotificationRibbonVisible, false); + RibbonTimer = null; + }, timeout); + } + } + + /// + /// Hides the notification ribbon + /// + public void HideNotificationRibbon() + { + TriList.SetBool(UIBoolJoin.NotificationRibbonVisible, false); + if (RibbonTimer != null) + { + RibbonTimer.Stop(); + RibbonTimer = null; + } + } + + void SetupNextMeetingTimer() + { + var ss = CurrentRoom.ScheduleSource; + if (ss != null) + { + NextMeetingTimer = new CTimer(o => ShowNextMeetingTimerCallback(), null, 0, 60000); + } + } + + /// + /// + /// + void ShowNextMeetingTimerCallback() + { + //Update calendar for Zoom. Zoom doesn't automatically update when meetings are in the past + if (_isZoomRoomWithNoExternalSources) + { + CurrentRoom.ScheduleSource.GetSchedule(); + } + + // Every 60 seconds, refresh the calendar + RefreshMeetingsList(); + // check meetings list for the closest, joinable meeting + var ss = CurrentRoom.ScheduleSource; + var meetings = ss.CodecSchedule.Meetings; + + if (meetings.Count <= 0) + { + return; + } + // If the room is off pester the user + // If the room is on, and the meeting is joinable + // and the LastMeetingDismissed != this meeting + + var lastMeetingDismissed = meetings.FirstOrDefault(m => m.Id == LastMeetingDismissedId); + //Debug.Console(0, "*#* Room on: {0}, lastMeetingDismissedId: {1} {2} *#*", + // CurrentRoom.OnFeedback.BoolValue, + // LastMeetingDismissedId, + // lastMeetingDismissed != null ? lastMeetingDismissed.StartTime.ToString("t", Global.Culture) : ""); + + var meeting = meetings.LastOrDefault(m => m.Joinable); + if (CurrentRoom.OnFeedback.BoolValue + && lastMeetingDismissed == meeting) + { + // meeting no longer joinable, hide popup + if(meeting == null) + HideNextMeetingPopup(); + + return; + } + + LastMeetingDismissedId = null; + // Clear the popup when we run out of meetings + if (meeting == null) + { + HideNextMeetingPopup(); + } + else + { + + + TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Upcoming meeting"); + TriList.SetString(UIStringJoin.NextMeetingStartTimeText, meeting.StartTime.ToString("t", Global.Culture)); + TriList.SetString(UIStringJoin.NextMeetingEndTimeText, meeting.EndTime.ToString("t", Global.Culture)); + TriList.SetString(UIStringJoin.NextMeetingTitleText, meeting.Title); + TriList.SetString(UIStringJoin.NextMeetingNameText, meeting.Organizer); + TriList.SetString(UIStringJoin.NextMeetingButtonLabel, "Join"); + TriList.SetSigFalseAction(UIBoolJoin.NextMeetingJoinPress, () => + { + HideNextMeetingPopup(); + PopupInterlock.Hide(); + RoomOnAndDialMeeting(meeting); + }); + TriList.SetString(UIStringJoin.NextMeetingSecondaryButtonLabel, "Show Schedule"); + TriList.SetSigFalseAction(UIBoolJoin.CalendarHeaderButtonPress, () => + { + HideNextMeetingPopup(); + //CalendarPress(); + RefreshMeetingsList(); + PopupInterlock.ShowInterlocked(UIBoolJoin.MeetingsOrContacMethodsListVisible); + }); + var indexOfNext = meetings.IndexOf(meeting) + 1; + + // indexOf = 3, 4 meetings : + if (indexOfNext < meetings.Count) + TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText, + meetings[indexOfNext].StartTime.ToString("t", Global.Culture)); + else + TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText, "No more meetings today"); + + TriList.SetSigFalseAction(UIBoolJoin.NextMeetingModalClosePress, () => + { + // Mark the meeting to not re-harass the user + if(CurrentRoom.OnFeedback.BoolValue) + LastMeetingDismissedId = meeting.Id; + HideNextMeetingPopup(); + }); + + TriList.SetBool(UIBoolJoin.NextMeetingModalVisible, true); + } + } + + /// + /// + /// + void HideNextMeetingPopup() + { + TriList.SetBool(UIBoolJoin.NextMeetingModalVisible, false); + + } + + /// + /// Calendar should only be visible when it's supposed to + /// + public void CalendarPress() + { + //RefreshMeetingsList(); // List should be up-to-date + PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.MeetingsOrContacMethodsListVisible); + } + + /// + /// Dials a meeting after turning on room (if necessary) + /// + void RoomOnAndDialMeeting(Meeting meeting) + { + Debug.Console(1, "[RoomOnAndDialMeeting] Joining meeting [{0}]", meeting); + Action dialAction = () => + { + var d = CurrentRoom.ScheduleSource as VideoCodecBase; + if (d != null) + { + Debug.Console(1, + "[RoomOnAndDialMeeting] [dialAction] Sending command to codec to join meeting {0}", meeting); + d.Dial(meeting); + LastMeetingDismissedId = meeting.Id; // To prevent prompts for already-joined call + } + }; + if (CurrentRoom.OnFeedback.BoolValue) + { + Debug.Console(1, "[RoomOnAndDialMeeting] Room is on."); + dialAction(); + } + else + { + Debug.Console(1, "RoomOnAndDialMeeting] Room is off or warming. Registering for Warming Feedback"); + // Rig a one-time handler to catch when the room is warmed and then dial call + EventHandler oneTimeHandler = null; + oneTimeHandler = (o, a) => + { + if (!CurrentRoom.IsWarmingUpFeedback.BoolValue) + { + CurrentRoom.IsWarmingUpFeedback.OutputChange -= oneTimeHandler; + dialAction(); + } + }; + CurrentRoom.IsWarmingUpFeedback.OutputChange += oneTimeHandler; + ActivityCallButtonPressed(); + } + } + + /// + /// Reveals the tech page and puts away anything that's in the way. + /// + public void ShowTech() + { + PopupInterlock.HideAndClear(); + TechDriver.Show(); + } + + /// + /// When the room is off, set the footer SRL + /// + void SetupActivityFooterWhenRoomOff() + { + ActivityFooterSrl.Clear(); + ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(1, ActivityFooterSrl, 0, + b => { if (!b) ActivityShareButtonPressed(); })); + ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(2, ActivityFooterSrl, 3, + b => { if (!b) ActivityCallButtonPressed(); })); + ActivityFooterSrl.Count = 2; + TriList.SetUshort(UIUshortJoin.PresentationStagingCaretMode, 1); // right one slot + TriList.SetUshort(UIUshortJoin.CallStagingCaretMode, 5); // left one slot + } + + /// + /// Sets up the footer SRL for when the room is on + /// + void SetupActivityFooterWhenRoomOn() + { + ActivityFooterSrl.Clear(); + ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(1, ActivityFooterSrl, 0, + b => { if (!b) ActivityShareButtonPressed(); })); + ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(2, ActivityFooterSrl, 3, + b => { if (!b) ActivityCallButtonPressed(); })); + ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(3, ActivityFooterSrl, 4, + b => { if (!b) EndMeetingPress(); })); + ActivityFooterSrl.Count = 3; + TriList.SetUshort(UIUshortJoin.PresentationStagingCaretMode, 2); // center + TriList.SetUshort(UIUshortJoin.CallStagingCaretMode, 0); // left -2 + } + + /// + /// Single point call for setting the feedbacks on the activity buttons + /// + void SetActivityFooterFeedbacks() + { + if (CurrentRoom != null) + { + var startMode = CurrentMode == UiDisplayMode.Start; + var presentationMode = CurrentMode == UiDisplayMode.Presentation; + var callMode = CurrentMode == UiDisplayMode.Call; + + TriList.SetBool(StartPageVisibleJoin, startMode ? true : false); + + if (presentationMode &&_isZoomRoomWithNoExternalSources) + { + // For now, if this is a Zoom Room and there are no shareable sources just display the informational subpage + TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, false); + TriList.SetBool(UIBoolJoin.ZoomRoomContentSharingVisible, true); + } + else + { + // Otherwise, show the staging bar + TriList.SetBool(UIBoolJoin.ZoomRoomContentSharingVisible, false); + TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, presentationMode ? true : false); + + } + if (!presentationMode) + { + TriList.SetBool(UIBoolJoin.ZoomRoomContentSharingVisible, false); + TriList.SetBool(UIBoolJoin.SelectASourceVisible, false); + } + + CallButtonSig.BoolValue = callMode + && CurrentRoom.ShutdownType == eShutdownType.None; + ShareButtonSig.BoolValue = presentationMode + && CurrentRoom.ShutdownType == eShutdownType.None; + EndMeetingButtonSig.BoolValue = CurrentRoom.ShutdownType != eShutdownType.None; + } + } + + /// + /// + /// + public void ActivityCallButtonPressed() + { + if (VCDriver.IsVisible) + return; + HideLogo(); + HideNextMeetingPopup(); + //TriList.SetBool(StartPageVisibleJoin, false); + //TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, false); + //TriList.SetBool(UIBoolJoin.SelectASourceVisible, false); + if (CurrentSourcePageManager != null) + CurrentSourcePageManager.Hide(); + PowerOnFromCall(); + CurrentMode = UiDisplayMode.Call; + VCDriver.Show(); + } + + /// + /// Attached to activity list share button + /// + void ActivityShareButtonPressed() + { + SetupSourceList(); + if (VCDriver.IsVisible) + VCDriver.Hide(); + HideNextMeetingPopup(); + + + if (_isZoomRoomWithNoExternalSources) + { + if (!CurrentRoom.OnFeedback.BoolValue) + { + CurrentRoom.RunDefaultPresentRoute(); + } + // For now, if this is a Zoom Room and there are no shareable sources just display the informational subpage + TriList.SetBool(UIBoolJoin.ZoomRoomContentSharingVisible, true); + + var presentationMeetingCodec = CurrentRoom.VideoCodec as IHasPresentationOnlyMeeting; + var farEndContentStatusCodec = CurrentRoom.VideoCodec as IHasFarEndContentStatus; + var receivingContent = false; + + if (farEndContentStatusCodec != null) + { + receivingContent = farEndContentStatusCodec.ReceivingContent.BoolValue; + } + + if (presentationMeetingCodec != null && !CurrentRoom.VideoCodec.IsInCall) + { + presentationMeetingCodec.StartSharingOnlyMeeting(eSharingMeetingMode.Laptop); + } + else if (CurrentRoom.VideoCodec.IsInCall && !CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue && + !receivingContent) + { + CurrentRoom.VideoCodec.StartSharing(); + } + + if (CurrentSourcePageManager != null) + CurrentSourcePageManager.Hide(); + } + else + { + // Run default source when room is off and share is pressed + if (!CurrentRoom.OnFeedback.BoolValue) + { + // If there's no default, show UI elements + if (!(CurrentRoom as IRunDefaultPresentRoute).RunDefaultPresentRoute()) + TriList.SetBool(UIBoolJoin.SelectASourceVisible, true); + } + else // room is on show what's active or select a source if nothing is yet active + { + if (CurrentRoom.CurrentSourceInfo == null || + (CurrentRoom.VideoCodec != null && + CurrentRoom.CurrentSourceInfo.SourceDevice.Key == CurrentRoom.VideoCodec.OsdSource.Key)) + TriList.SetBool(UIBoolJoin.SelectASourceVisible, true); + else if (CurrentSourcePageManager != null) + { + TriList.SetBool(UIBoolJoin.SelectASourceVisible, false); + CurrentSourcePageManager.Show(); + } + } + SetupSourceList(); + } + CurrentMode = UiDisplayMode.Presentation; + } + + /// + /// Powers up the system to the codec route, if not already on. + /// + void PowerOnFromCall() + { + if (!CurrentRoom.OnFeedback.BoolValue) + { + CurrentRoom.RunDefaultCallRoute(); + } + } + + /// + /// Shows all sigs that are in CurrentDisplayModeSigsInUse + /// + void ShowCurrentDisplayModeSigsInUse() + { + foreach (var sig in CurrentDisplayModeSigsInUse) + sig.BoolValue = true; + } + + /// + /// Hides all CurrentDisplayModeSigsInUse sigs and clears the array + /// + void HideAndClearCurrentDisplayModeSigsInUse() + { + foreach (var sig in CurrentDisplayModeSigsInUse) + sig.BoolValue = false; + CurrentDisplayModeSigsInUse.Clear(); + } + + + /// + /// Loads the appropriate Sigs into CurrentDisplayModeSigsInUse and shows them + /// + void ShowCurrentSource() + { + if (CurrentRoom.CurrentSourceInfo == null || _isZoomRoomWithNoExternalSources) + return; + + CurrentMode = UiDisplayMode.Presentation; + + if (CurrentRoom.CurrentSourceInfo.SourceDevice == null) + { + TriList.SetBool(UIBoolJoin.SelectASourceVisible, true); + return; + } + + var uiDev = CurrentRoom.CurrentSourceInfo.SourceDevice as IUiDisplayInfo; + PageManager pm = null; + // If we need a page manager, get an appropriate one + if (uiDev != null) + { + TriList.SetBool(UIBoolJoin.SelectASourceVisible, false); + // Got an existing page manager, get it + if (PageManagers.ContainsKey(uiDev)) + pm = PageManagers[uiDev]; + // Otherwise make an apporiate one + else if (uiDev is ISetTopBoxControls) + pm = new SetTopBoxThreePanelPageManager(uiDev as ISetTopBoxControls, TriList); + else if (uiDev is IDiscPlayerControls) + pm = new DiscPlayerMediumPageManager(uiDev as IDiscPlayerControls, TriList); + else + pm = new DefaultPageManager(uiDev, TriList); + PageManagers[uiDev] = pm; + CurrentSourcePageManager = pm; + pm.Show(); + } + } + + /// + /// Called from button presses on source, where We can assume we want + /// to change to the proper screen. + /// + /// The key name of the route to run + void UiSelectSource(string key) + { + // Run the route and when it calls back, show the source + CurrentRoom.RunRouteAction(key); + } + + /// + /// + /// + public void EndMeetingPress() + { + if (!CurrentRoom.OnFeedback.BoolValue + || CurrentRoom.ShutdownPromptTimer.IsRunningFeedback.BoolValue) + return; + + CurrentRoom.StartShutdown(eShutdownType.Manual); + } + + /// + /// Puts away modals and things that might be up when call comes in + /// + public void PrepareForCodecIncomingCall() + { + if (PowerDownModal != null && PowerDownModal.ModalIsVisible) + PowerDownModal.CancelDialog(); + PopupInterlock.Hide(); + } + + /// + /// + /// + /// + /// + void ShutdownPromptTimer_HasStarted(object sender, EventArgs e) + { + // Do we need to check where the UI is? No? + var timer = CurrentRoom.ShutdownPromptTimer; + SetActivityFooterFeedbacks(); + + if (CurrentRoom.ShutdownType == eShutdownType.Manual || CurrentRoom.ShutdownType == eShutdownType.Vacancy) + { + PowerDownModal = new ModalDialog(TriList); + var message = string.Format("Meeting will end in {0} seconds", CurrentRoom.ShutdownPromptSeconds); + + // Attach timer things to modal + CurrentRoom.ShutdownPromptTimer.TimeRemainingFeedback.OutputChange += ShutdownPromptTimer_TimeRemainingFeedback_OutputChange; + CurrentRoom.ShutdownPromptTimer.PercentFeedback.OutputChange += ShutdownPromptTimer_PercentFeedback_OutputChange; + + // respond to offs by cancelling dialog + var onFb = CurrentRoom.OnFeedback; + EventHandler offHandler = null; + offHandler = (o, a) => + { + if (!onFb.BoolValue) + { + PowerDownModal.HideDialog(); + SetActivityFooterFeedbacks(); + onFb.OutputChange -= offHandler; + } + }; + onFb.OutputChange += offHandler; + + PowerDownModal.PresentModalDialog(2, "End Meeting", "Power", message, "Cancel", "End Meeting Now", true, true, + but => + { + if (but != 2) // any button except for End cancels + timer.Cancel(); + else + timer.Finish(); + }); + } + } + + /// + /// + /// + /// + /// + void ShutdownPromptTimer_HasFinished(object sender, EventArgs e) + { + SetActivityFooterFeedbacks(); + CurrentRoom.ShutdownPromptTimer.TimeRemainingFeedback.OutputChange -= ShutdownPromptTimer_TimeRemainingFeedback_OutputChange; + CurrentRoom.ShutdownPromptTimer.PercentFeedback.OutputChange -= ShutdownPromptTimer_PercentFeedback_OutputChange; + } + + /// + /// + /// + /// + /// + void ShutdownPromptTimer_WasCancelled(object sender, EventArgs e) + { + if (PowerDownModal != null) + PowerDownModal.HideDialog(); + SetActivityFooterFeedbacks(); + + CurrentRoom.ShutdownPromptTimer.TimeRemainingFeedback.OutputChange += ShutdownPromptTimer_TimeRemainingFeedback_OutputChange; + CurrentRoom.ShutdownPromptTimer.PercentFeedback.OutputChange -= ShutdownPromptTimer_PercentFeedback_OutputChange; + } + + /// + /// Event handler for countdown timer on power off modal + /// + void ShutdownPromptTimer_TimeRemainingFeedback_OutputChange(object sender, EventArgs e) + { + + var message = string.Format("Meeting will end in {0} seconds", (sender as StringFeedback).StringValue); + TriList.StringInput[ModalDialog.MessageTextJoin].StringValue = message; + } + + /// + /// Event handler for percentage on power off countdown + /// + void ShutdownPromptTimer_PercentFeedback_OutputChange(object sender, EventArgs e) + { + var value = (ushort)((sender as IntFeedback).UShortValue * 65535 / 100); + TriList.UShortInput[ModalDialog.TimerGaugeJoin].UShortValue = value; + } + + /// + /// + /// + void CancelPowerOffTimer() + { + if (PowerOffTimer != null) + { + PowerOffTimer.Stop(); + PowerOffTimer = null; + } + } + + /// + /// + /// + /// + public void VolumeUpPress(bool state) + { + if (CurrentRoom.CurrentVolumeControls != null) + CurrentRoom.CurrentVolumeControls.VolumeUp(state); + } + + /// + /// + /// + /// + public void VolumeDownPress(bool state) + { + if (CurrentRoom.CurrentVolumeControls != null) + CurrentRoom.CurrentVolumeControls.VolumeDown(state); + } + + /// + /// Helper for property setter. Sets the panel to the given room, latching up all functionality + /// + void RefreshCurrentRoom(IEssentialsHuddleVtc1Room room) + { + + if (_CurrentRoom != null) + { + // Disconnect current room + _CurrentRoom.CurrentVolumeDeviceChange -= this.CurrentRoom_CurrentAudioDeviceChange; + ClearAudioDeviceConnections(); + _CurrentRoom.CurrentSourceChange -= this.CurrentRoom_SourceInfoChange; + DisconnectSource(_CurrentRoom.CurrentSourceInfo); + _CurrentRoom.ShutdownPromptTimer.HasStarted -= ShutdownPromptTimer_HasStarted; + _CurrentRoom.ShutdownPromptTimer.HasFinished -= ShutdownPromptTimer_HasFinished; + _CurrentRoom.ShutdownPromptTimer.WasCancelled -= ShutdownPromptTimer_WasCancelled; + + _CurrentRoom.OnFeedback.OutputChange -= CurrentRoom_OnFeedback_OutputChange; + _CurrentRoom.IsWarmingUpFeedback.OutputChange -= CurrentRoom_IsWarmingFeedback_OutputChange; + _CurrentRoom.IsCoolingDownFeedback.OutputChange -= CurrentRoom_IsCoolingDownFeedback_OutputChange; + _CurrentRoom.InCallFeedback.OutputChange -= CurrentRoom_InCallFeedback_OutputChange; + + var scheduleAwareCodec = _CurrentRoom.VideoCodec as IHasScheduleAwareness; + if (scheduleAwareCodec != null) + { + scheduleAwareCodec.CodecSchedule.MeetingsListHasChanged -= CodecSchedule_MeetingsListHasChanged; + } + + var meetingInfoCodec = _CurrentRoom.VideoCodec as IHasMeetingInfo; + if (meetingInfoCodec != null) + { + meetingInfoCodec.MeetingInfoChanged -= meetingInfoCodec_MeetingInfoChanged; + } + } + + _CurrentRoom = room; + + if (_CurrentRoom != null) + { + // get the source list config and set up the source list + + SetupSourceList(); + + // Name and logo + TriList.StringInput[UIStringJoin.CurrentRoomName].StringValue = _CurrentRoom.Name; + ShowLogo(); + + // Shutdown timer + _CurrentRoom.ShutdownPromptTimer.HasStarted += ShutdownPromptTimer_HasStarted; + _CurrentRoom.ShutdownPromptTimer.HasFinished += ShutdownPromptTimer_HasFinished; + _CurrentRoom.ShutdownPromptTimer.WasCancelled += ShutdownPromptTimer_WasCancelled; + + // Link up all the change events from the room + _CurrentRoom.OnFeedback.OutputChange += CurrentRoom_OnFeedback_OutputChange; + CurrentRoom_SyncOnFeedback(); + _CurrentRoom.IsWarmingUpFeedback.OutputChange += CurrentRoom_IsWarmingFeedback_OutputChange; + _CurrentRoom.IsCoolingDownFeedback.OutputChange += CurrentRoom_IsCoolingDownFeedback_OutputChange; + _CurrentRoom.InCallFeedback.OutputChange += CurrentRoom_InCallFeedback_OutputChange; + + + _CurrentRoom.CurrentVolumeDeviceChange += CurrentRoom_CurrentAudioDeviceChange; + RefreshAudioDeviceConnections(); + _CurrentRoom.CurrentSourceChange += CurrentRoom_SourceInfoChange; + RefreshSourceInfo(); + + + var scheduleAwareCodec = _CurrentRoom.VideoCodec as IHasScheduleAwareness; + if (scheduleAwareCodec != null) + { + scheduleAwareCodec.CodecSchedule.MeetingsListHasChanged += CodecSchedule_MeetingsListHasChanged; + } + + var meetingInfoCodec = _CurrentRoom.VideoCodec as IHasMeetingInfo; + if (meetingInfoCodec != null) + { + meetingInfoCodec.MeetingInfoChanged += new EventHandler(meetingInfoCodec_MeetingInfoChanged); + + CallListOrMeetingInfoPopoverVisibilityJoin = UIBoolJoin.HeaderMeetingInfoVisible; + } + else + { + CallListOrMeetingInfoPopoverVisibilityJoin = UIBoolJoin.HeaderActiveCallsListVisible; + } + + CallSharingInfoVisibleFeedback = new BoolFeedback(() => _CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue); + _CurrentRoom.VideoCodec.SharingContentIsOnFeedback.OutputChange += SharingContentIsOnFeedback_OutputChange; + CallSharingInfoVisibleFeedback.LinkInputSig(TriList.BooleanInput[UIBoolJoin.CallSharedSourceInfoVisible]); + + SetActiveCallListSharingContentStatus(); + + if (_CurrentRoom != null) + _CurrentRoom.CurrentSourceChange += new SourceInfoChangeHandler(CurrentRoom_CurrentSingleSourceChange); + + // Moved to EssentialsVideoCodecUiDriver + //TriList.SetSigFalseAction(UIBoolJoin.CallStopSharingPress, () => _CurrentRoom.RunRouteAction("codecOsd", _CurrentRoom.SourceListKey)); + + (Parent as EssentialsPanelMainInterfaceDriver).HeaderDriver.SetupHeaderButtons(this, CurrentRoom); + } + else + { + // Clear sigs that need to be + TriList.StringInput[UIStringJoin.CurrentRoomName].StringValue = "Select a room"; + } + } + + void meetingInfoCodec_MeetingInfoChanged(object sender, MeetingInfoEventArgs e) + { + if (e.Info == null) + { + return; + } + + TriList.SetString(UIStringJoin.MeetingIdText, e.Info.Id); + TriList.SetString(UIStringJoin.MeetingHostText, e.Info.Host); + TriList.SetString(UIStringJoin.MeetingNameText, e.Info.Name); + + TriList.SetString(UIStringJoin.MeetingPasswordText, e.Info.Password); + // Show the password fields if one is present + TriList.SetBool(UIBoolJoin.MeetingPasswordVisible, !string.IsNullOrEmpty(e.Info.Password)); + + TriList.SetString(UIStringJoin.CallSharedSourceNameText, e.Info.ShareStatus); + + TriList.SetString(UIStringJoin.MeetingLeaveText, e.Info.IsHost ? "End Meeting" : "Leave Meeting"); + } + + void SetCurrentRoom(IEssentialsHuddleVtc1Room room) + { + if (_CurrentRoom == room) return; + // Disconnect current (probably never called) + + if(_CurrentRoom != null) + _CurrentRoom.ConfigChanged -= room_ConfigChanged; + + room.ConfigChanged -= room_ConfigChanged; + room.ConfigChanged += room_ConfigChanged; + + if (room.IsMobileControlEnabled) + { + StartPageVisibleJoin = UIBoolJoin.StartMCPageVisible; + UpdateMCJoins(room); + + if (_CurrentRoom != null) + _CurrentRoom.MobileControlRoomBridge.UserCodeChanged -= MobileControlRoomBridge_UserCodeChanged; + + room.MobileControlRoomBridge.UserCodeChanged -= MobileControlRoomBridge_UserCodeChanged; + room.MobileControlRoomBridge.UserCodeChanged += MobileControlRoomBridge_UserCodeChanged; + } + else + { + StartPageVisibleJoin = UIBoolJoin.StartPageVisible; + } + + RefreshCurrentRoom(room); + } + + void MobileControlRoomBridge_UserCodeChanged(object sender, EventArgs e) + { + UpdateMCJoins(_CurrentRoom); + } + + void UpdateMCJoins(IEssentialsHuddleVtc1Room room) + { + TriList.SetString(UIStringJoin.RoomMcUrl, room.MobileControlRoomBridge.McServerUrl); + TriList.SetString(UIStringJoin.RoomMcQrCodeUrl, room.MobileControlRoomBridge.QrCodeUrl); + TriList.SetString(UIStringJoin.RoomUserCode, room.MobileControlRoomBridge.UserCode); + } + + /// + /// Fires when room config of current room has changed. Meant to refresh room values to propegate any updates to UI + /// + /// + /// + void room_ConfigChanged(object sender, EventArgs e) + { + RefreshCurrentRoom(_CurrentRoom); + } + + /// + /// + /// + /// + /// + void CurrentRoom_InCallFeedback_OutputChange(object sender, EventArgs e) + { + var inCall = CurrentRoom.InCallFeedback.BoolValue; + if (inCall) + { + // Check if transitioning to in call - and non-sharable source is in use + if (CurrentRoom.CurrentSourceInfo != null && CurrentRoom.CurrentSourceInfo.DisableCodecSharing) + { + Debug.Console(1, CurrentRoom, "Transitioning to in-call, cancelling non-sharable source"); + CurrentRoom.RunRouteAction("codecOsd"); + } + } + + SetupSourceList(); + } + + /// + /// + /// + void SetupSourceList() + { + + var inCall = CurrentRoom.InCallFeedback.BoolValue; + var config = ConfigReader.ConfigObject.SourceLists; + + + if (config.ContainsKey(_CurrentRoom.SourceListKey)) + { + var srcList = config[_CurrentRoom.SourceListKey].OrderBy(kv => kv.Value.Order); + + + // Setup sources list + SourceStagingSrl.Clear(); + uint i = 1; // counter for UI list + foreach (var kvp in srcList) + { + var srcConfig = kvp.Value; + Debug.Console(1, "**** {0}, {1}, {2}, {3}, {4}", srcConfig.PreferredName, srcConfig.IncludeInSourceList, + srcConfig.DisableCodecSharing, inCall, this.CurrentMode); + // Skip sources marked as not included, and filter list of non-sharable sources when in call + // or on share screen + if (!srcConfig.IncludeInSourceList || (inCall && srcConfig.DisableCodecSharing) + || this.CurrentMode == UiDisplayMode.Call && srcConfig.DisableCodecSharing) + { + Debug.Console(1, "Skipping {0}", srcConfig.PreferredName); + continue; + } + + var routeKey = kvp.Key; + var item = new SubpageReferenceListSourceItem(i++, SourceStagingSrl, srcConfig, + b => { if (!b) UiSelectSource(routeKey); }); + SourceStagingSrl.AddItem(item); // add to the SRL + item.RegisterForSourceChange(_CurrentRoom); + Debug.Console(1, "**** KEY {0}", kvp.Key); + + } + _sourceListCount = (i - 1); + SourceStagingSrl.Count = (ushort)_sourceListCount; + } + + } + + /// + /// If the schedule changes, this event will fire + /// + /// + /// + void CodecSchedule_MeetingsListHasChanged(object sender, EventArgs e) + { + RefreshMeetingsList(); + } + + /// + /// Updates the current shared source label on the call list when the source changes + /// + /// + /// + /// + void CurrentRoom_CurrentSingleSourceChange(SourceListItem info, ChangeType type) + { + Debug.Console(1, "AvFunctionsDriver: CurrentSingleSourceChange"); + + // Show the Select a source subpage + if (TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue) + { + Debug.Console(1, "AvFunctionsDriver: CurrentSingleSourceChange SourceStagingBarVisisble: true"); + + if (_CurrentRoom.CurrentSourceInfo == null || (_CurrentRoom.VideoCodec != null && _CurrentRoom.CurrentSourceInfo.SourceDevice.Key == _CurrentRoom.VideoCodec.OsdSource.Key)) + { + Debug.Console(1, "AvFunctionsDriver: CurrentSingleSourceChange Showing SelectASourceVisible"); + TriList.SetBool(UIBoolJoin.SelectASourceVisible, true); + } + else + { + TriList.SetBool(UIBoolJoin.SelectASourceVisible, false); + Debug.Console(1, "AvFunctionsDriver: CurrentSingleSourceChange Hiding SelectASourceVisible"); + } + } + else + { + Debug.Console(1, "AvFunctionsDriver: CurrentSingleSourceChange Hiding SelectASourceVisible"); + TriList.SetBool(UIBoolJoin.SelectASourceVisible, false); + } + + if (_CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue && _CurrentRoom.CurrentSourceInfo != null) + TriList.StringInput[UIStringJoin.CallSharedSourceNameText].StringValue = _CurrentRoom.CurrentSourceInfo.PreferredName; + } + + /// + /// Fires when the sharing source feedback of the codec changes + /// + /// + /// + void SharingContentIsOnFeedback_OutputChange(object sender, EventArgs e) + { + SetActiveCallListSharingContentStatus(); + } + + /// + /// Sets the values for the text and button visibilty for the active call list source sharing info + /// + void SetActiveCallListSharingContentStatus() + { + CallSharingInfoVisibleFeedback.FireUpdate(); + + string callListSharedSourceLabel; + + if (_CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue && _CurrentRoom.CurrentSourceInfo != null) + { + Debug.Console(0, "*#* CurrentRoom.CurrentSourceInfo = {0}", + _CurrentRoom.CurrentSourceInfo != null ? _CurrentRoom.CurrentSourceInfo.SourceKey : "Nada!"); + callListSharedSourceLabel = _CurrentRoom.CurrentSourceInfo.PreferredName; + } + else + callListSharedSourceLabel = "None"; + + TriList.StringInput[UIStringJoin.CallSharedSourceNameText].StringValue = callListSharedSourceLabel; + } + + /// + /// + /// + void RefreshMeetingsList() + { + // See if this is helpful or if the callback response in the codec class maybe doesn't come it time? + // Let's build list from event + + TriList.SetString(UIStringJoin.MeetingsOrContactMethodListIcon, "Calendar"); + TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Today's Meetings"); + + ushort i = 0; + foreach (var m in CurrentRoom.ScheduleSource.CodecSchedule.Meetings) + { + i++; + MeetingOrContactMethodModalSrl.StringInputSig(i, 1).StringValue = m.StartTime.ToString("t", Global.Culture); + MeetingOrContactMethodModalSrl.StringInputSig(i, 2).StringValue = m.EndTime.ToString("t", Global.Culture); + MeetingOrContactMethodModalSrl.StringInputSig(i, 3).StringValue = m.Title; + MeetingOrContactMethodModalSrl.StringInputSig(i, 4).StringValue = string.Format("
{0}",m.Organizer); + MeetingOrContactMethodModalSrl.StringInputSig(i, 5).StringValue = "Join"; + MeetingOrContactMethodModalSrl.BoolInputSig(i, 2).BoolValue = m.Joinable; + var mm = m; // lambda scope + MeetingOrContactMethodModalSrl.GetBoolFeedbackSig(i, 1).SetSigFalseAction(() => + { + PopupInterlock.Hide(); + ActivityCallButtonPressed(); + var d = CurrentRoom.ScheduleSource as VideoCodecBase; + if (d != null) + RoomOnAndDialMeeting(mm); + }); + } + MeetingOrContactMethodModalSrl.Count = i; + + if (i == 0) // Show item indicating no meetings are booked for rest of day + { + MeetingOrContactMethodModalSrl.Count = 1; + + MeetingOrContactMethodModalSrl.StringInputSig(1, 1).StringValue = string.Empty; + MeetingOrContactMethodModalSrl.StringInputSig(1, 2).StringValue = string.Empty; + MeetingOrContactMethodModalSrl.StringInputSig(1, 3).StringValue = "No Meetings are booked for the remainder of the day."; + MeetingOrContactMethodModalSrl.StringInputSig(1, 4).StringValue = string.Empty; + MeetingOrContactMethodModalSrl.StringInputSig(1, 5).StringValue = string.Empty; + } + } + + /// + /// For room on/off changes + /// + void CurrentRoom_OnFeedback_OutputChange(object sender, EventArgs e) + { + CurrentRoom_SyncOnFeedback(); + } + + /// + /// + /// + void CurrentRoom_SyncOnFeedback() + { + var value = _CurrentRoom.OnFeedback.BoolValue; + TriList.BooleanInput[UIBoolJoin.RoomIsOn].BoolValue = value; + + //TriList.BooleanInput[StartPageVisibleJoin].BoolValue = !value; + + if (value) //ON + { + SetupActivityFooterWhenRoomOn(); + //TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false; + TriList.BooleanInput[UIBoolJoin.VolumeDualMute1Visible].BoolValue = true; + + } + else + { + CurrentMode = UiDisplayMode.Start; + if (VCDriver.IsVisible) + VCDriver.Hide(); + SetupActivityFooterWhenRoomOff(); + ShowLogo(); + //TriList.BooleanInput[UIBoolJoin.VolumeDualMute1Visible].BoolValue = false; + //TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue = false; + // Clear this so that the pesky meeting warning can resurface every minute when off + LastMeetingDismissedId = null; + } + } + + /// + /// + /// + void CurrentRoom_IsWarmingFeedback_OutputChange(object sender, EventArgs e) + { + if (CurrentRoom.IsWarmingUpFeedback.BoolValue) + { + ShowNotificationRibbon("Room is powering on. Please wait...", 0); + } + else + { + ShowNotificationRibbon("Room is powered on. Welcome.", 2000); + } + } + + /// + /// + /// + /// + /// + void CurrentRoom_IsCoolingDownFeedback_OutputChange(object sender, EventArgs e) + { + if (CurrentRoom.IsCoolingDownFeedback.BoolValue) + { + ShowNotificationRibbon("Room is powering off. Please wait.", 0); + } + else + { + HideNotificationRibbon(); + } + } + + /// + /// Hides source for provided source info + /// + /// + void DisconnectSource(SourceListItem previousInfo) + { + if (previousInfo == null) return; + + // Hide whatever is showing + if (IsVisible) + { + if (CurrentSourcePageManager != null) + { + CurrentSourcePageManager.Hide(); + CurrentSourcePageManager = null; + } + } + + if (previousInfo == null) return; + var previousDev = previousInfo.SourceDevice; + + // device type interfaces + if (previousDev is ISetTopBoxControls) + (previousDev as ISetTopBoxControls).UnlinkButtons(TriList); + // common interfaces + if (previousDev is IChannel) + (previousDev as IChannel).UnlinkButtons(TriList); + if (previousDev is IColor) + (previousDev as IColor).UnlinkButtons(TriList); + if (previousDev is IDPad) + (previousDev as IDPad).UnlinkButtons(TriList); + if (previousDev is IDvr) + (previousDev as IDvr).UnlinkButtons(TriList); + if (previousDev is INumericKeypad) + (previousDev as INumericKeypad).UnlinkButtons(TriList); + if (previousDev is IHasPowerControl) + (previousDev as IHasPowerControl).UnlinkButtons(TriList); + if (previousDev is ITransport) + (previousDev as ITransport).UnlinkButtons(TriList); + } + + /// + /// Refreshes and shows the room's current source + /// + void RefreshSourceInfo() + { + var routeInfo = CurrentRoom.CurrentSourceInfo; + // This will show off popup too + if (this.IsVisible && !VCDriver.IsVisible) + ShowCurrentSource(); + + if (routeInfo == null)// || !CurrentRoom.OnFeedback.BoolValue) + { + // Check for power off and insert "Room is off" + TriList.StringInput[UIStringJoin.CurrentSourceName].StringValue = "Room is off"; + TriList.StringInput[UIStringJoin.CurrentSourceIcon].StringValue = "Power"; + this.Hide(); + Parent.Show(); + return; + } + else if (routeInfo != null) + { + TriList.StringInput[UIStringJoin.CurrentSourceName].StringValue = routeInfo.PreferredName; + TriList.StringInput[UIStringJoin.CurrentSourceIcon].StringValue = routeInfo.Icon; // defaults to "blank" + } + else // This never gets hit???!!! + { + TriList.StringInput[UIStringJoin.CurrentSourceName].StringValue = "---"; + TriList.StringInput[UIStringJoin.CurrentSourceIcon].StringValue = "Blank"; + } + + // Connect controls + if (routeInfo.SourceDevice != null) + ConnectControlDeviceMethods(routeInfo.SourceDevice); + } + + /// + /// Attach the source to the buttons and things + /// + void ConnectControlDeviceMethods(Device dev) + { + if (dev is ISetTopBoxControls) + (dev as ISetTopBoxControls).LinkButtons(TriList); + if (dev is IChannel) + (dev as IChannel).LinkButtons(TriList); + if (dev is IColor) + (dev as IColor).LinkButtons(TriList); + if (dev is IDPad) + (dev as IDPad).LinkButtons(TriList); + if (dev is IDvr) + (dev as IDvr).LinkButtons(TriList); + if (dev is INumericKeypad) + (dev as INumericKeypad).LinkButtons(TriList); + if (dev is IHasPowerControl) + (dev as IHasPowerControl).LinkButtons(TriList); + if (dev is ITransport) + (dev as ITransport).LinkButtons(TriList); + } + + /// + /// Detaches the buttons and feedback from the room's current audio device + /// + void ClearAudioDeviceConnections() + { + TriList.ClearBoolSigAction(UIBoolJoin.VolumeUpPress); + TriList.ClearBoolSigAction(UIBoolJoin.VolumeDownPress); + TriList.ClearBoolSigAction(UIBoolJoin.Volume1ProgramMutePressAndFB); + + var fDev = CurrentRoom.CurrentVolumeControls as IBasicVolumeWithFeedback; + if (fDev != null) + { + TriList.ClearUShortSigAction(UIUshortJoin.VolumeSlider1Value); + fDev.VolumeLevelFeedback.UnlinkInputSig( + TriList.UShortInput[UIUshortJoin.VolumeSlider1Value]); + } + } + + /// + /// Attaches the buttons and feedback to the room's current audio device + /// + void RefreshAudioDeviceConnections() + { + var dev = CurrentRoom.CurrentVolumeControls; + if (dev != null) // connect buttons + { + TriList.SetBoolSigAction(UIBoolJoin.VolumeUpPress, VolumeUpPress); + TriList.SetBoolSigAction(UIBoolJoin.VolumeDownPress, VolumeDownPress); + TriList.SetSigFalseAction(UIBoolJoin.Volume1ProgramMutePressAndFB, dev.MuteToggle); + } + + var fbDev = dev as IBasicVolumeWithFeedback; + if (fbDev == null) // this should catch both IBasicVolume and IBasicVolumeWithFeeback + TriList.UShortInput[UIUshortJoin.VolumeSlider1Value].UShortValue = 0; + else + { + // slider + TriList.SetUShortSigAction(UIUshortJoin.VolumeSlider1Value, fbDev.SetVolume); + // feedbacks + fbDev.MuteFeedback.LinkInputSig(TriList.BooleanInput[UIBoolJoin.Volume1ProgramMutePressAndFB]); + fbDev.VolumeLevelFeedback.LinkInputSig( + TriList.UShortInput[UIUshortJoin.VolumeSlider1Value]); + } + } + + /// + /// Handler for when the room's volume control device changes + /// + void CurrentRoom_CurrentAudioDeviceChange(object sender, VolumeDeviceChangeEventArgs args) + { + if (args.Type == ChangeType.WillChange) + ClearAudioDeviceConnections(); + else // did change + RefreshAudioDeviceConnections(); + } + + /// + /// Handles source change + /// + void CurrentRoom_SourceInfoChange(SourceListItem info, ChangeType change) + { + if (change == ChangeType.WillChange) + DisconnectSource(info); + else + RefreshSourceInfo(); + } + } + + /// + /// For hanging off various common AV things that child drivers might need from a parent AV driver + /// + public interface IAVDriver + { + PanelDriverBase Parent { get; } + JoinedSigInterlock PopupInterlock { get; } + void ShowNotificationRibbon(string message, int timeout); + void HideNotificationRibbon(); + void ShowTech(); + uint StartPageVisibleJoin { get; } + } + + /// + /// For hanging off various common VC things that child drivers might need from a parent AV driver + /// + public interface IAVWithVCDriver : IAVDriver + { + IEssentialsHuddleVtc1Room CurrentRoom { get; } + + PepperDash.Essentials.Core.Touchpanels.Keyboards.HabaneroKeyboardController Keyboard { get; } + /// + /// Exposes the ability to switch into call mode + /// + void ActivityCallButtonPressed(); + /// + /// Allows the codec to trigger the main UI to clear up if call is coming in. + /// + void PrepareForCodecIncomingCall(); + + uint CallListOrMeetingInfoPopoverVisibilityJoin { get; } + + SubpageReferenceList MeetingOrContactMethodModalSrl { get; } + } +} diff --git a/PepperDashEssentials/UIDrivers/JoinedSigInterlock.cs b/src/PepperDash.Essentials/UIDrivers/JoinedSigInterlock.cs similarity index 96% rename from PepperDashEssentials/UIDrivers/JoinedSigInterlock.cs rename to src/PepperDash.Essentials/UIDrivers/JoinedSigInterlock.cs index a7dba246..bdcaa84e 100644 --- a/PepperDashEssentials/UIDrivers/JoinedSigInterlock.cs +++ b/src/PepperDash.Essentials/UIDrivers/JoinedSigInterlock.cs @@ -1,175 +1,175 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Core; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials -{ - public class JoinedSigInterlock - { - public uint CurrentJoin { get; private set; } - - BasicTriList TriList; - - public BoolFeedback IsShownFeedback; - - public event EventHandler StatusChanged; - - bool _IsShown; - - public bool IsShown - { - get - { - return _IsShown; - } - private set - { - _IsShown = value; - IsShownFeedback.FireUpdate(); - } - } - - //public BoolFeedback ShownFeedback { get; private set; } - - public JoinedSigInterlock(BasicTriList triList) - { - TriList = triList; - - IsShownFeedback = new BoolFeedback(new Func( () => _IsShown)); - } - - /// - /// Hides CurrentJoin and shows join. Will check and re-set signal if join - /// equals CurrentJoin - /// - public void ShowInterlocked(uint join) - { - var prevJoin = CurrentJoin; - var wasShown = _IsShown; - //Debug.Console(2, "Trilist {0:X2}, interlock swapping {1} for {2}", TriList.ID, CurrentJoin, join); - if (CurrentJoin == join && TriList.BooleanInput[join].BoolValue) - return; - SetButDontShow(join); - TriList.SetBool(CurrentJoin, true); - IsShown = true; - - OnStatusChange(prevJoin, CurrentJoin, wasShown, IsShown); - } - - /// - /// - /// - /// - public void ShowInterlockedWithToggle(uint join) - { - var prevJoin = CurrentJoin; - var wasShown = IsShown; - - //Debug.Console(2, "Trilist {0:X2}, interlock swapping {1} for {2}", TriList.ID, CurrentJoin, join); - if (CurrentJoin == join) - HideAndClear(); - else - { - if (CurrentJoin > 0) - TriList.BooleanInput[CurrentJoin].BoolValue = false; - CurrentJoin = join; - TriList.BooleanInput[CurrentJoin].BoolValue = true; - IsShown = true; - - OnStatusChange(prevJoin, CurrentJoin, wasShown, IsShown); - } - } - /// - /// Hides current join and clears CurrentJoin - /// - public void HideAndClear() - { - var prevJoin = CurrentJoin; - var wasShown = IsShown; - //Debug.Console(2, "Trilist {0:X2}, interlock hiding {1}", TriList.ID, CurrentJoin); - Hide(); - CurrentJoin = 0; - - OnStatusChange(prevJoin, CurrentJoin, wasShown, IsShown); - } - - /// - /// Hides the current join but does not clear the selected join in case - /// it needs to be reshown - /// - public void Hide() - { - var prevJoin = CurrentJoin; - var wasShown = IsShown; - - //Debug.Console(2, "Trilist {0:X2}, interlock hiding {1}", TriList.ID, CurrentJoin); - if (CurrentJoin > 0) - { - TriList.BooleanInput[CurrentJoin].BoolValue = false; - IsShown = false; - OnStatusChange(prevJoin, CurrentJoin, wasShown, IsShown); - } - } - - /// - /// If CurrentJoin is set, it restores that join - /// - public void Show() - { - var prevJoin = CurrentJoin; - var wasShown = IsShown; - - //Debug.Console(2, "Trilist {0:X2}, interlock showing {1}", TriList.ID, CurrentJoin); - if (CurrentJoin > 0) - { - TriList.BooleanInput[CurrentJoin].BoolValue = true; - IsShown = true; - - OnStatusChange(prevJoin, CurrentJoin, wasShown, IsShown); - } - } - - /// - /// Useful for pre-setting the interlock but not enabling it. Sets CurrentJoin - /// - /// - public void SetButDontShow(uint join) - { - if (CurrentJoin > 0) - { - TriList.BooleanInput[CurrentJoin].BoolValue = false; - IsShown = false; - } - CurrentJoin = join; - } - - void OnStatusChange(uint prevJoin, uint newJoin, bool wasShown, bool isShown) - { - var handler = StatusChanged; - if (handler != null) - handler(this, new StatusChangedEventArgs(prevJoin, newJoin, wasShown, isShown)); - } - } - - public class StatusChangedEventArgs : EventArgs - { - public uint PreviousJoin { get; set; } - public uint NewJoin { get; set; } - public bool WasShown { get; set; } - public bool IsShown { get; set; } - - public StatusChangedEventArgs(uint prevJoin, uint newJoin, bool wasShown, bool isShown) - { - PreviousJoin = prevJoin; - NewJoin = newJoin; - WasShown = wasShown; - IsShown = isShown; - } - } +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro.DeviceSupport; + +using PepperDash.Core; +using PepperDash.Essentials.Core; + +namespace PepperDash.Essentials +{ + public class JoinedSigInterlock + { + public uint CurrentJoin { get; private set; } + + BasicTriList TriList; + + public BoolFeedback IsShownFeedback; + + public event EventHandler StatusChanged; + + bool _IsShown; + + public bool IsShown + { + get + { + return _IsShown; + } + private set + { + _IsShown = value; + IsShownFeedback.FireUpdate(); + } + } + + //public BoolFeedback ShownFeedback { get; private set; } + + public JoinedSigInterlock(BasicTriList triList) + { + TriList = triList; + + IsShownFeedback = new BoolFeedback(new Func( () => _IsShown)); + } + + /// + /// Hides CurrentJoin and shows join. Will check and re-set signal if join + /// equals CurrentJoin + /// + public void ShowInterlocked(uint join) + { + var prevJoin = CurrentJoin; + var wasShown = _IsShown; + //Debug.Console(2, "Trilist {0:X2}, interlock swapping {1} for {2}", TriList.ID, CurrentJoin, join); + if (CurrentJoin == join && TriList.BooleanInput[join].BoolValue) + return; + SetButDontShow(join); + TriList.SetBool(CurrentJoin, true); + IsShown = true; + + OnStatusChange(prevJoin, CurrentJoin, wasShown, IsShown); + } + + /// + /// + /// + /// + public void ShowInterlockedWithToggle(uint join) + { + var prevJoin = CurrentJoin; + var wasShown = IsShown; + + //Debug.Console(2, "Trilist {0:X2}, interlock swapping {1} for {2}", TriList.ID, CurrentJoin, join); + if (CurrentJoin == join) + HideAndClear(); + else + { + if (CurrentJoin > 0) + TriList.BooleanInput[CurrentJoin].BoolValue = false; + CurrentJoin = join; + TriList.BooleanInput[CurrentJoin].BoolValue = true; + IsShown = true; + + OnStatusChange(prevJoin, CurrentJoin, wasShown, IsShown); + } + } + /// + /// Hides current join and clears CurrentJoin + /// + public void HideAndClear() + { + var prevJoin = CurrentJoin; + var wasShown = IsShown; + //Debug.Console(2, "Trilist {0:X2}, interlock hiding {1}", TriList.ID, CurrentJoin); + Hide(); + CurrentJoin = 0; + + OnStatusChange(prevJoin, CurrentJoin, wasShown, IsShown); + } + + /// + /// Hides the current join but does not clear the selected join in case + /// it needs to be reshown + /// + public void Hide() + { + var prevJoin = CurrentJoin; + var wasShown = IsShown; + + //Debug.Console(2, "Trilist {0:X2}, interlock hiding {1}", TriList.ID, CurrentJoin); + if (CurrentJoin > 0) + { + TriList.BooleanInput[CurrentJoin].BoolValue = false; + IsShown = false; + OnStatusChange(prevJoin, CurrentJoin, wasShown, IsShown); + } + } + + /// + /// If CurrentJoin is set, it restores that join + /// + public void Show() + { + var prevJoin = CurrentJoin; + var wasShown = IsShown; + + //Debug.Console(2, "Trilist {0:X2}, interlock showing {1}", TriList.ID, CurrentJoin); + if (CurrentJoin > 0) + { + TriList.BooleanInput[CurrentJoin].BoolValue = true; + IsShown = true; + + OnStatusChange(prevJoin, CurrentJoin, wasShown, IsShown); + } + } + + /// + /// Useful for pre-setting the interlock but not enabling it. Sets CurrentJoin + /// + /// + public void SetButDontShow(uint join) + { + if (CurrentJoin > 0) + { + TriList.BooleanInput[CurrentJoin].BoolValue = false; + IsShown = false; + } + CurrentJoin = join; + } + + void OnStatusChange(uint prevJoin, uint newJoin, bool wasShown, bool isShown) + { + var handler = StatusChanged; + if (handler != null) + handler(this, new StatusChangedEventArgs(prevJoin, newJoin, wasShown, isShown)); + } + } + + public class StatusChangedEventArgs : EventArgs + { + public uint PreviousJoin { get; set; } + public uint NewJoin { get; set; } + public bool WasShown { get; set; } + public bool IsShown { get; set; } + + public StatusChangedEventArgs(uint prevJoin, uint newJoin, bool wasShown, bool isShown) + { + PreviousJoin = prevJoin; + NewJoin = newJoin; + WasShown = wasShown; + IsShown = isShown; + } + } } \ No newline at end of file diff --git a/PepperDashEssentials/UIDrivers/Page Drivers/SingleSubpageModalAndBackDriver.cs b/src/PepperDash.Essentials/UIDrivers/Page Drivers/SingleSubpageModalAndBackDriver.cs similarity index 100% rename from PepperDashEssentials/UIDrivers/Page Drivers/SingleSubpageModalAndBackDriver.cs rename to src/PepperDash.Essentials/UIDrivers/Page Drivers/SingleSubpageModalAndBackDriver.cs diff --git a/PepperDashEssentials/UIDrivers/Page Drivers/SingleSubpageModalDriver.cs b/src/PepperDash.Essentials/UIDrivers/Page Drivers/SingleSubpageModalDriver.cs similarity index 100% rename from PepperDashEssentials/UIDrivers/Page Drivers/SingleSubpageModalDriver.cs rename to src/PepperDash.Essentials/UIDrivers/Page Drivers/SingleSubpageModalDriver.cs diff --git a/PepperDashEssentials/UIDrivers/ScreenSaverController.cs b/src/PepperDash.Essentials/UIDrivers/ScreenSaverController.cs similarity index 100% rename from PepperDashEssentials/UIDrivers/ScreenSaverController.cs rename to src/PepperDash.Essentials/UIDrivers/ScreenSaverController.cs diff --git a/PepperDashEssentials/UIDrivers/SigInterlock.cs b/src/PepperDash.Essentials/UIDrivers/SigInterlock.cs similarity index 100% rename from PepperDashEssentials/UIDrivers/SigInterlock.cs rename to src/PepperDash.Essentials/UIDrivers/SigInterlock.cs diff --git a/PepperDashEssentials/UIDrivers/SmartObjectRoomsList.cs b/src/PepperDash.Essentials/UIDrivers/SmartObjectRoomsList.cs similarity index 100% rename from PepperDashEssentials/UIDrivers/SmartObjectRoomsList.cs rename to src/PepperDash.Essentials/UIDrivers/SmartObjectRoomsList.cs diff --git a/PepperDashEssentials/UIDrivers/SourceChangeArgs.cs b/src/PepperDash.Essentials/UIDrivers/SourceChangeArgs.cs similarity index 100% rename from PepperDashEssentials/UIDrivers/SourceChangeArgs.cs rename to src/PepperDash.Essentials/UIDrivers/SourceChangeArgs.cs diff --git a/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs b/src/PepperDash.Essentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs similarity index 100% rename from PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs rename to src/PepperDash.Essentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs diff --git a/PepperDashEssentials/UIDrivers/enums and base.cs b/src/PepperDash.Essentials/UIDrivers/enums and base.cs similarity index 100% rename from PepperDashEssentials/UIDrivers/enums and base.cs rename to src/PepperDash.Essentials/UIDrivers/enums and base.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/app.config b/src/PepperDash.Essentials/app.config similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/app.config rename to src/PepperDash.Essentials/app.config