mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-22 17:05:35 +00:00
Compare commits
162 Commits
cen-io-com
...
2.0.0-alph
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
01862ab9aa | ||
|
|
8ec6fa785e | ||
|
|
bc67a4382b | ||
|
|
80b8cc6385 | ||
|
|
82f78bf068 | ||
|
|
d8d27949c3 | ||
|
|
fa9b493431 | ||
|
|
e5d5c90aa9 | ||
|
|
661f7b827a | ||
|
|
5fad706cd8 | ||
|
|
49c4d2a387 | ||
|
|
cf81431f57 | ||
|
|
8a7bcd5297 | ||
|
|
1fdaa84a62 | ||
|
|
8a374072ae | ||
|
|
5d608887a1 | ||
|
|
d2d041dbf7 | ||
|
|
b90e5b2a0d | ||
|
|
d26c5344e4 | ||
|
|
595fb3894e | ||
|
|
a7654aa77d | ||
|
|
5ccf298584 | ||
|
|
a1cc46b992 | ||
|
|
a1310f2de7 | ||
|
|
09ac964335 | ||
|
|
9acffc620d | ||
|
|
d653cf1a13 | ||
|
|
ee4ccb0d1a | ||
|
|
4d0e3b1943 | ||
|
|
69e83735b8 | ||
|
|
e12f9f0afd | ||
|
|
f6cd2b57c1 | ||
|
|
e319280f43 | ||
|
|
f43b0df65f | ||
|
|
62f182c634 | ||
|
|
8ae8a3ef41 | ||
|
|
0f57799382 | ||
|
|
a2e4c2fad6 | ||
|
|
ed5bd360b4 | ||
|
|
4eeb2145ae | ||
|
|
a5460f16cd | ||
|
|
3b55d6af93 | ||
|
|
285d87d8ac | ||
|
|
c6690c7765 | ||
|
|
2609006024 | ||
|
|
9e61dcd554 | ||
|
|
693d4f8723 | ||
|
|
882f41d8bd | ||
|
|
6669b6125b | ||
|
|
9ad151bd7e | ||
|
|
b0e9ecf29e | ||
|
|
d4df36b863 | ||
|
|
1146d89abf | ||
|
|
0ee3e1d52b | ||
|
|
5084861067 | ||
|
|
d6f896c4b2 | ||
|
|
7a5dc29946 | ||
|
|
812dd0e771 | ||
|
|
08a4099842 | ||
|
|
a3c7d0c96a | ||
|
|
d7af57ba16 | ||
|
|
2faa83cd1a | ||
|
|
6c2ef7b63b | ||
|
|
06244b8a18 | ||
|
|
b213262cdd | ||
|
|
e0e08ba22c | ||
|
|
420ae8c7de | ||
|
|
f7cf854965 | ||
|
|
5ce82f03b4 | ||
|
|
4d20cd7e80 | ||
|
|
9e7239b219 | ||
|
|
b689c847fb | ||
|
|
4d608eef06 | ||
|
|
49b7faa400 | ||
|
|
8af0cf2702 | ||
|
|
8d34b73cdf | ||
|
|
5628042841 | ||
|
|
9f49a7faef | ||
|
|
b80b827217 | ||
|
|
35e9e54564 | ||
|
|
3eefd1ce36 | ||
|
|
1e6e8a044d | ||
|
|
5941763acb | ||
|
|
dc52ec4c0c | ||
|
|
9dfc99259f | ||
|
|
7a66fdd490 | ||
|
|
1d74136e9e | ||
|
|
b74755c825 | ||
|
|
0a9ba77bb7 | ||
|
|
758ac8c91b | ||
|
|
0548d3b3ea | ||
|
|
f9d3607072 | ||
|
|
d6b32f48c7 | ||
|
|
8883fc329e | ||
|
|
e8408add14 | ||
|
|
ab6f1f36f0 | ||
|
|
610fae972d | ||
|
|
876689fdfe | ||
|
|
332d56cf70 | ||
|
|
a2c628145d | ||
|
|
d2877f2cec | ||
|
|
3eaa86905f | ||
|
|
476eaba519 | ||
|
|
690499c864 | ||
|
|
8023ef6c1b | ||
|
|
b263c7421b | ||
|
|
ba9cc9f00c | ||
|
|
c66b239e02 | ||
|
|
d2e1979d96 | ||
|
|
1727e81e33 | ||
|
|
8a53693173 | ||
|
|
5a097e7057 | ||
|
|
f43559941b | ||
|
|
116ac0e168 | ||
|
|
ae109f8f8a | ||
|
|
4ed808aebf | ||
|
|
faaf979472 | ||
|
|
bf347bbf04 | ||
|
|
7d8baf4bb0 | ||
|
|
bdb28bbd95 | ||
|
|
96d97ee0fc | ||
|
|
7a8158a3d3 | ||
|
|
b4911bfda1 | ||
|
|
8feabcd536 | ||
|
|
e1eb432dee | ||
|
|
47a0b537ba | ||
|
|
f1dfeb003e | ||
|
|
8f510a6243 | ||
|
|
8537630e03 | ||
|
|
48a5bd64a4 | ||
|
|
14b6900460 | ||
|
|
ca1b09c75d | ||
|
|
276fa566c4 | ||
|
|
333497d701 | ||
|
|
cc866e5b77 | ||
|
|
1a6bbd3719 | ||
|
|
14b16a7e27 | ||
|
|
5852aab33c | ||
|
|
56ac7e8f92 | ||
|
|
57e332180d | ||
|
|
b0931c87ba | ||
|
|
86d15a2ab4 | ||
|
|
0d515e5f0a | ||
|
|
7a9f76ee12 | ||
|
|
c8ccbe1fcf | ||
|
|
ff068b98ac | ||
|
|
665101b4c8 | ||
|
|
8a3c7ce6d4 | ||
|
|
55cd3036c8 | ||
|
|
de3f2004de | ||
|
|
0cfc727b08 | ||
|
|
0f8251ea8a | ||
|
|
13cbeb7605 | ||
|
|
2fd2b6787f | ||
|
|
dd48147fdb | ||
|
|
33c3c1ad30 | ||
|
|
f154ce2385 | ||
|
|
9a0cf05360 | ||
|
|
d2e4be162d | ||
|
|
9dbfd9bcae | ||
|
|
8d1ec183df | ||
|
|
d52941d91d |
23
.github/scripts/GenerateVersionNumber-2.0.0.ps1
vendored
Normal file
23
.github/scripts/GenerateVersionNumber-2.0.0.ps1
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
$latestVersion = [version]"2.0.0"
|
||||
|
||||
$newVersion = [version]$latestVersion
|
||||
$phase = ""
|
||||
$newVersionString = ""
|
||||
|
||||
switch -regex ($Env:GITHUB_REF) {
|
||||
'^refs\/pull\/*.' {
|
||||
$phase = 'beta';
|
||||
$newVersionString = "{0}-{1}-{2}" -f $newVersion, $phase, $Env:GITHUB_RUN_NUMBER
|
||||
}
|
||||
'^refs\/heads\/feature-2.0.0\/*.' {
|
||||
$phase = 'alpha'
|
||||
$newVersionString = "{0}-{1}-{2}" -f $newVersion, $phase, $Env:GITHUB_RUN_NUMBER
|
||||
}
|
||||
'development-2.0.0' {
|
||||
$phase = 'beta'
|
||||
$newVersionString = "{0}-{1}-{2}" -f $newVersion, $phase, $Env:GITHUB_RUN_NUMBER
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Write-Output $newVersionString
|
||||
@@ -1,21 +0,0 @@
|
||||
name: Build Essentials 1.X
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
|
||||
jobs:
|
||||
getVersion:
|
||||
uses: PepperDash/workflow-templates/.github/workflows/essentialsplugins-getversion.yml@main
|
||||
secrets: inherit
|
||||
build-3Series:
|
||||
uses: PepperDash/workflow-templates/.github/workflows/essentials-3Series-builds.yml@main
|
||||
secrets: inherit
|
||||
needs: getVersion
|
||||
if: needs.getVersion.outputs.newVersion == 'true'
|
||||
with:
|
||||
newVersion: ${{ needs.getVersion.outputs.newVersion }}
|
||||
version: ${{ needs.getVersion.outputs.version }}
|
||||
tag: ${{ needs.getVersion.outputs.tag }}
|
||||
channel: ${{ needs.getVersion.outputs.channel }}
|
||||
94
.github/workflows/docker.yml
vendored
Normal file
94
.github/workflows/docker.yml
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
name: Branch Build Using Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- feature-2.0.0/*
|
||||
- hotfix-2.0.0/*
|
||||
- release-2.0.0/*
|
||||
- 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: .
|
||||
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
|
||||
BUILD_TYPE: Debug
|
||||
# Defaults to main as the release branch. Change as necessary
|
||||
RELEASE_BRANCH: main
|
||||
jobs:
|
||||
Build_Project_4-Series:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set Version Number
|
||||
id: setVersion
|
||||
shell: powershell
|
||||
run: |
|
||||
$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 restore .\$($Env:SOLUTION_FILE).sln
|
||||
# Build the solutions in the docker image
|
||||
- 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: |
|
||||
git tag ${{ steps.setVersion.outputs.version }}
|
||||
git push --tags origin
|
||||
# Create the release on the source repo
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
# 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:
|
||||
artifacts: 'output\**\*.*(cpz|cplz)'
|
||||
generateReleaseNotes: true
|
||||
prerelease: ${{contains('debug', env.BUILD_TYPE)}}
|
||||
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
|
||||
55
.github/workflows/main.yml
vendored
Normal file
55
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
name: main Build using Docker
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
branches:
|
||||
- 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
|
||||
SOLUTION_PATH: PepperDashEssentials
|
||||
SOLUTION_FILE: PepperDashEssentials
|
||||
# Do not edit this, we're just creating it here
|
||||
VERSION: 0.0.0-buildtype-buildnumber
|
||||
# Defaults to debug for build type
|
||||
BUILD_TYPE: Release
|
||||
# Defaults to main as the release branch. Change as necessary
|
||||
RELEASE_BRANCH: main
|
||||
jobs:
|
||||
Build_Project:
|
||||
runs-on: windows-2019
|
||||
steps:
|
||||
# First we checkout the source repo
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@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_OUTPUT -Encoding utf8 -Append
|
||||
- name: Setup MS Build
|
||||
uses: microsoft/setup-msbuild@v1.1
|
||||
- name: restore Nuget Packages
|
||||
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:
|
||||
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
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -390,3 +390,4 @@ MigrationBackup/
|
||||
FodyWeavers.xsd
|
||||
essentials-framework/Essentials Interfaces/PepperDash_Essentials_Interfaces/PepperDash_Essentials_Interfaces.csproj
|
||||
.DS_Store
|
||||
/._PepperDash.Essentials.sln
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
{
|
||||
"plugins": [
|
||||
[
|
||||
"@semantic-release/commit-analyzer",
|
||||
{
|
||||
"releaseRules": [
|
||||
{ "scope": "force-patch", "release": "patch" },
|
||||
{ "scope": "no-release", "release": false }
|
||||
]
|
||||
}
|
||||
],
|
||||
"@semantic-release/release-notes-generator",
|
||||
["@semantic-release/changelog",
|
||||
{
|
||||
"changelogFile": "CHANGELOG.md"
|
||||
}
|
||||
],
|
||||
[
|
||||
"@semantic-release/exec",
|
||||
{
|
||||
"verifyReleaseCmd": "echo \"newVersion=true\" >> $GITHUB_OUTPUT",
|
||||
"publishCmd": "echo \"version=${nextRelease.version}\" >> $GITHUB_OUTPUT && echo \"tag=${nextRelease.gitTag}\" >> $GITHUB_OUTPUT && echo \"type=${nextRelease.type}\" >> $GITHUB_OUTPUT && echo \"channel=${nextRelease.channel}\" >> $GITHUB_OUTPUT"
|
||||
}
|
||||
]
|
||||
],
|
||||
"branches": [
|
||||
"maintenance-1x",
|
||||
{
|
||||
"name": "replace-me-feature-branch",
|
||||
"prerelease": "replace-me-prerelease",
|
||||
"channel": "replace-me-prerelease"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -91,8 +91,8 @@ we receive and the availability of resources to evaluate contributions, we antic
|
||||
project remains dynamic and relevant. This may affect our responsiveness and ability to accept pull requests
|
||||
quickly. This does not mean we are ignoring them.
|
||||
- Not all innovative ideas need to be accepted as pull requests into this GitHub project to be valuable to the community.
|
||||
There may be times when we recommend that you just share your code for some enhancement to Essentials from your own
|
||||
repository. As we identify and recognize extensions that are of general interest to Essentials, we
|
||||
There may be times when we recommend that you just share your code for some enhancement to Ghidra from your own
|
||||
repository. As we identify and recognize extensions that are of general interest to the reverse engineering community, we
|
||||
may seek to incorporate them with our baseline.
|
||||
|
||||
## Legal
|
||||
|
||||
44
PepperDash.Essentials.sln
Normal file
44
PepperDash.Essentials.sln
Normal file
@@ -0,0 +1,44 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.4.33213.308
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PepperDash.Essentials.Devices.Common", "src\PepperDash.Essentials.Devices.Common\PepperDash.Essentials.Devices.Common.csproj", "{53E204B7-97DD-441D-A96C-721DF014DF82}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PepperDash.Essentials", "src\PepperDash.Essentials\PepperDash.Essentials.csproj", "{CB3B11BA-625C-4D35-B663-FDC5BE9A230E}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PepperDash.Essentials.Core", "src\PepperDash.Essentials.Core\PepperDash.Essentials.Core.csproj", "{3D192FED-8FFC-4CB5-B5F7-BA307ABA254B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug 4.7.2|Any CPU = Debug 4.7.2|Any CPU
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{53E204B7-97DD-441D-A96C-721DF014DF82}.Debug 4.7.2|Any CPU.ActiveCfg = Debug 4.7.2|Any CPU
|
||||
{53E204B7-97DD-441D-A96C-721DF014DF82}.Debug 4.7.2|Any CPU.Build.0 = Debug 4.7.2|Any CPU
|
||||
{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
|
||||
{CB3B11BA-625C-4D35-B663-FDC5BE9A230E}.Debug 4.7.2|Any CPU.ActiveCfg = Debug 4.7.2|Any CPU
|
||||
{CB3B11BA-625C-4D35-B663-FDC5BE9A230E}.Debug 4.7.2|Any CPU.Build.0 = Debug 4.7.2|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 4.7.2|Any CPU.ActiveCfg = Debug 4.7.2|Any CPU
|
||||
{3D192FED-8FFC-4CB5-B5F7-BA307ABA254B}.Debug 4.7.2|Any CPU.Build.0 = Debug 4.7.2|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
|
||||
@@ -1,49 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDashEssentials", "src\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", "src\essentials-framework\Essentials Core\PepperDashEssentialsBase\PepperDash_Essentials_Core.csproj", "{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Essentials Devices Common", "src\essentials-framework\Essentials Devices Common\Essentials Devices Common\Essentials Devices Common.csproj", "{892B761C-E479-44CE-BD74-243E9214AF13}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} = {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDash_Essentials_DM", "src\essentials-framework\Essentials DM\Essentials_DM\PepperDash_Essentials_DM.csproj", "{9199CE8A-0C9F-4952-8672-3EED798B284F}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} = {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}
|
||||
EndProjectSection
|
||||
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
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -1,3 +0,0 @@
|
||||
<packages>
|
||||
<package id="PepperDashCore" version="1.4.2" targetFramework="net35" allowedVersions="[1.0,2.0)"/>
|
||||
</packages>
|
||||
21
src/Directory.Build.props
Normal file
21
src/Directory.Build.props
Normal file
@@ -0,0 +1,21 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<Version>2.0.0-local</Version>
|
||||
<InformationalVersion>$(Version)</InformationalVersion>
|
||||
<Authors>PepperDash Technologies</Authors>
|
||||
<Company>PepperDash Technologies</Company>
|
||||
<Product>PepperDash Essentials</Product>
|
||||
<Copyright>Copyright © 2023</Copyright>
|
||||
<RepositoryUrl>https://github.com/PepperDash/Essentials</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<PackageTags>Crestron; 4series</PackageTags>
|
||||
<PackageOutputPath>../../output</PackageOutputPath>
|
||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
||||
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\LICENSE.md" Pack="true" PackagePath=""/>
|
||||
<None Include="..\..\README.md" Pack="true" PackagePath=""/>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
26
src/Directory.Build.targets
Normal file
26
src/Directory.Build.targets
Normal file
@@ -0,0 +1,26 @@
|
||||
<Project>
|
||||
<ItemGroup>
|
||||
<None Include="$(PackageOutputPath)\$(AssemblyName)\*.cpz" Condition="$(ProjectType) == 'Program'">
|
||||
<Pack>true</Pack>
|
||||
<PackagePath>build;</PackagePath>
|
||||
</None>
|
||||
<None Include="$(PackageOutputPath)\$(AssemblyName)\*.cplz" Condition="$(ProjectType) == 'ProgramLibrary'">
|
||||
<Pack>true</Pack>
|
||||
<PackagePath>build;</PackagePath>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Target Name="Create CPLZ" AfterTargets="Build; AfterRebuild" Condition="$(ProjectType) == 'ProgramLibrary' And $(TargetDir) != ''">
|
||||
<Message Text="Creating CPLZ $(TargetDir)"></Message>
|
||||
<MakeDir Directories="$(PackageOutputPath)" Condition="!Exists($(PackageOutputPath))" />
|
||||
<MakeDir Directories="$(PackageOutputPath)\$(AssemblyName)" Condition="!Exists('$(PackageOutputPath)\$(AssemblyName)')" />
|
||||
<ZipDirectory SourceDirectory="$(TargetDir)" DestinationFile="$(PackageOutputPath)\$(AssemblyName)\$(TargetName).$(Version).$(TargetFramework).cplz" Overwrite="true"/>
|
||||
</Target>
|
||||
<Target Name="Copy CPZ NET6" AfterTargets="SimplSharpPostProcess" Condition="($(ProjectType) == 'Program' And ( '$(TargetFramework)' == 'net6.0' ) Or ( '$(TargetFramework)' == 'net8.0' ))">
|
||||
<Message Text="Copying CPZ"></Message>
|
||||
<Move SourceFiles="$(TargetDir)$(TargetName).cpz" DestinationFiles="$(PackageOutputPath)\$(AssemblyName)\$(TargetName).$(Version).$(TargetFramework).cpz" />
|
||||
</Target>
|
||||
<Target Name="Copy CPZ NET47" AfterTargets="SimplSharpPostProcess47" Condition="($(ProjectType) == 'Program' And ( '$(TargetFramework)' != 'net6.0' ) And ( '$(TargetFramework)' != 'net8.0' ))">
|
||||
<Message Text="Copying CPZ"></Message>
|
||||
<Move SourceFiles="$(TargetDir)$(TargetName).cpz" DestinationFiles="$(PackageOutputPath)\$(AssemblyName)\$(TargetName).$(Version).$(TargetFramework).cpz" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharp.Reflection;
|
||||
@@ -10,6 +12,7 @@ using Newtonsoft.Json;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using Serilog.Events;
|
||||
|
||||
//using PepperDash.Essentials.Devices.Common.Cameras;
|
||||
|
||||
@@ -30,7 +33,7 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
|
||||
if (bridge == null)
|
||||
{
|
||||
Debug.Console(0, "Unable to find advanced bridge with key: '{0}'", bridgeKey);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Unable to find advanced bridge with key: '{0}'", bridgeKey);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -56,7 +59,7 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
|
||||
if (bridge == null)
|
||||
{
|
||||
Debug.Console(0, "Unable to find advanced bridge with key: '{0}'", bridgeKey);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Unable to find advanced bridge with key: '{0}'", bridgeKey);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -146,11 +149,11 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
|
||||
private void LinkDevices()
|
||||
{
|
||||
Debug.Console(1, this, "Linking Devices...");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Linking Devices...");
|
||||
|
||||
if (PropertiesConfig.Devices == null)
|
||||
{
|
||||
Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "No devices linked to this bridge");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "No devices linked to this bridge");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -163,11 +166,11 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
continue;
|
||||
}
|
||||
|
||||
Debug.Console(1, this, "Linking Device: '{0}'", device.Key);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Linking Device: '{0}'", device.Key);
|
||||
|
||||
if (!typeof(IBridgeAdvanced).IsAssignableFrom(device.GetType().GetCType()))
|
||||
{
|
||||
Debug.Console(0, this, Debug.ErrorLogLevel.Notice,
|
||||
Debug.LogMessage(LogEventLevel.Information, this,
|
||||
"{0} is not compatible with this bridge type. Please use 'eiscapi' instead, or updae the device.",
|
||||
device.Key);
|
||||
continue;
|
||||
@@ -192,20 +195,20 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
|
||||
if (registerResult != eDeviceRegistrationUnRegistrationResponse.Success)
|
||||
{
|
||||
Debug.Console(2, this, Debug.ErrorLogLevel.Error, "Registration result: {0}", registerResult);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Registration result: {0}", registerResult);
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "EISC registration successful");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "EISC registration successful");
|
||||
}
|
||||
|
||||
public void LinkRooms()
|
||||
{
|
||||
Debug.Console(1, this, "Linking Rooms...");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Linking Rooms...");
|
||||
|
||||
if (PropertiesConfig.Rooms == null)
|
||||
{
|
||||
Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "No rooms linked to this bridge.");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "No rooms linked to this bridge.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -215,7 +218,7 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
|
||||
if (rm == null)
|
||||
{
|
||||
Debug.Console(1, this, Debug.ErrorLogLevel.Notice,
|
||||
Debug.LogMessage(LogEventLevel.Debug, this,
|
||||
"Room {0} does not implement IBridgeAdvanced. Skipping...", room.RoomKey);
|
||||
continue;
|
||||
}
|
||||
@@ -237,7 +240,7 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(2, this, "Unable to add join map with key '{0}'. Key already exists in JoinMaps dictionary", deviceKey);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Unable to add join map with key '{0}'. Key already exists in JoinMaps dictionary", deviceKey);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,11 +249,11 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
/// </summary>
|
||||
public virtual void PrintJoinMaps()
|
||||
{
|
||||
Debug.Console(0, this, "Join Maps for EISC IPID: {0}", Eisc.ID.ToString("X"));
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Join Maps for EISC IPID: {0}", Eisc.ID.ToString("X"));
|
||||
|
||||
foreach (var joinMap in JoinMaps)
|
||||
{
|
||||
Debug.Console(0, "Join map for device '{0}':", joinMap.Key);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Join map for device '{0}':", joinMap.Key);
|
||||
joinMap.Value.PrintJoinMapInfo();
|
||||
}
|
||||
}
|
||||
@@ -259,11 +262,11 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
/// </summary>
|
||||
public virtual void MarkdownForBridge(string bridgeKey)
|
||||
{
|
||||
Debug.Console(0, this, "Writing Joinmaps to files for EISC IPID: {0}", Eisc.ID.ToString("X"));
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Writing Joinmaps to files for EISC IPID: {0}", Eisc.ID.ToString("X"));
|
||||
|
||||
foreach (var joinMap in JoinMaps)
|
||||
{
|
||||
Debug.Console(0, "Generating markdown for device '{0}':", joinMap.Key);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Generating markdown for device '{0}':", joinMap.Key);
|
||||
joinMap.Value.MarkdownJoinMapInfo(joinMap.Key, bridgeKey);
|
||||
}
|
||||
}
|
||||
@@ -278,11 +281,11 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
|
||||
if (joinMap == null)
|
||||
{
|
||||
Debug.Console(0, this, "Unable to find joinMap for device with key: '{0}'", deviceKey);
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Unable to find joinMap for device with key: '{0}'", deviceKey);
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Console(0, "Join map for device '{0}' on EISC '{1}':", deviceKey, Key);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Join map for device '{0}' on EISC '{1}':", deviceKey, Key);
|
||||
joinMap.PrintJoinMapInfo();
|
||||
}
|
||||
/// <summary>
|
||||
@@ -295,11 +298,11 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
|
||||
if (joinMap == null)
|
||||
{
|
||||
Debug.Console(0, this, "Unable to find joinMap for device with key: '{0}'", deviceKey);
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Unable to find joinMap for device with key: '{0}'", deviceKey);
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Console(0, "Join map for device '{0}' on EISC '{1}':", deviceKey, Key);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Join map for device '{0}' on EISC '{1}':", deviceKey, Key);
|
||||
joinMap.MarkdownJoinMapInfo(deviceKey, bridgeKey);
|
||||
}
|
||||
|
||||
@@ -320,11 +323,11 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
var uo = Eisc.BooleanOutput[join].UserObject as Action<bool>;
|
||||
if (uo != null)
|
||||
{
|
||||
Debug.Console(2, this, "Executing Action: {0}", uo.ToString());
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Executing Action: {0}", uo.ToString());
|
||||
uo(Convert.ToBoolean(state));
|
||||
}
|
||||
else
|
||||
Debug.Console(2, this, "User Action is null. Nothing to Execute");
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "User Action is null. Nothing to Execute");
|
||||
break;
|
||||
}
|
||||
case "analog":
|
||||
@@ -332,34 +335,34 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
var uo = Eisc.BooleanOutput[join].UserObject as Action<ushort>;
|
||||
if (uo != null)
|
||||
{
|
||||
Debug.Console(2, this, "Executing Action: {0}", uo.ToString());
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Executing Action: {0}", uo.ToString());
|
||||
uo(Convert.ToUInt16(state));
|
||||
}
|
||||
else
|
||||
Debug.Console(2, this, "User Action is null. Nothing to Execute"); break;
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "User Action is null. Nothing to Execute"); break;
|
||||
}
|
||||
case "serial":
|
||||
{
|
||||
var uo = Eisc.BooleanOutput[join].UserObject as Action<string>;
|
||||
if (uo != null)
|
||||
{
|
||||
Debug.Console(2, this, "Executing Action: {0}", uo.ToString());
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Executing Action: {0}", uo.ToString());
|
||||
uo(Convert.ToString(state));
|
||||
}
|
||||
else
|
||||
Debug.Console(2, this, "User Action is null. Nothing to Execute");
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "User Action is null. Nothing to Execute");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
Debug.Console(2, "Unknown join type. Use digital/serial/analog");
|
||||
Debug.LogMessage(LogEventLevel.Verbose, "Unknown join type. Use digital/serial/analog");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Console(1, this, "Error: {0}", e);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Error: {0}", e);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -373,13 +376,12 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Debug.Level >= 1)
|
||||
Debug.Console(1, this, "EiscApiAdvanced change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "EiscApiAdvanced change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue);
|
||||
var uo = args.Sig.UserObject;
|
||||
|
||||
if (uo == null) return;
|
||||
|
||||
Debug.Console(1, this, "Executing Action: {0}", uo.ToString());
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Executing Action: {0}", uo.ToString());
|
||||
if (uo is Action<bool>)
|
||||
(uo as Action<bool>)(args.Sig.BoolValue);
|
||||
else if (uo is Action<ushort>)
|
||||
@@ -389,7 +391,7 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Console(2, this, "Error in Eisc_SigChange handler: {0}", e);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Error in Eisc_SigChange handler: {0}", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -447,7 +449,7 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.Console(1, "Factory Attempting to create new EiscApiAdvanced Device");
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new EiscApiAdvanced Device");
|
||||
|
||||
var controlProperties = CommFactory.GetControlPropertiesConfig(dc);
|
||||
|
||||
@@ -477,7 +479,7 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
if (string.IsNullOrEmpty(controlProperties.RoomId))
|
||||
{
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to build VC-4 EISC Client for device {0}. Room ID is missing or empty", dc.Key);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Unable to build VC-4 EISC Client for device {0}. Room ID is missing or empty", dc.Key);
|
||||
eisc = null;
|
||||
break;
|
||||
}
|
||||
@@ -20,18 +20,6 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
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("HdmiInHdcpSupportOn")]
|
||||
public JoinDataComplete HdmiInHdcpSupportOn = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
|
||||
new JoinMetadata { Description = "Turns on HDCP support for HDMI in. Reports state as FB", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("HdmiInHdcpSupportOff")]
|
||||
public JoinDataComplete HdmiInHdcpSupportOff = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
|
||||
new JoinMetadata { Description = "Turns off HDCP support for HDMI in. Reports state as FB", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("HdmiInDisabledByHdcp")]
|
||||
public JoinDataComplete HdmiInDisabledByHdcp = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 },
|
||||
new JoinMetadata { Description = "Reports if ", JoinCapabilities = eJoinCapabilities.ToSIMPL, 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 });
|
||||
@@ -1,6 +1,6 @@
|
||||
using PepperDash.Essentials.Core;
|
||||
|
||||
namespace PepperDash_Essentials_Core.Bridges.JoinMaps
|
||||
namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
{
|
||||
public sealed class GenericIrControllerJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
@@ -819,20 +819,6 @@ namespace PepperDash_Essentials_Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("EJECT")]
|
||||
public JoinDataComplete Eject = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 69,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "EJECT",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
public GenericIrControllerJoinMap(uint joinStart)
|
||||
: base(joinStart, typeof(GenericIrControllerJoinMap))
|
||||
{
|
||||
@@ -155,146 +155,3 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace PepperDash_Essentials_Core.Bridges.JoinMaps
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[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
|
||||
});
|
||||
|
||||
/// <summary>
|
||||
/// Constructor to use when instantiating this Join Map without inheriting from it
|
||||
/// </summary>
|
||||
/// <param name="joinStart">Join this join map will start at</param>
|
||||
public GlsPartitionSensorJoinMap(uint joinStart)
|
||||
: this(joinStart, typeof(GlsPartitionSensorJoinMap))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor to use when extending this Join map
|
||||
/// </summary>
|
||||
/// <param name="joinStart">Join this join map will start at</param>
|
||||
/// <param name="type">Type of the child join map</param>
|
||||
protected GlsPartitionSensorJoinMap(uint joinStart, Type type)
|
||||
: base(joinStart, type)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using PepperDash.Essentials.Core;
|
||||
|
||||
namespace PepperDash_Essentials_Core.Bridges
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
public class HdPsXxxControllerJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,6 +8,7 @@ using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DM;
|
||||
|
||||
using PepperDash.Core;
|
||||
using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
@@ -49,7 +50,7 @@ namespace PepperDash.Essentials.Core
|
||||
OnDataReceived(cecDevice.Received.StringValue);
|
||||
else if (args.EventId == CecEventIds.ErrorFeedbackEventId)
|
||||
if(cecDevice.ErrorFeedback.BoolValue)
|
||||
Debug.Console(2, this, "CEC NAK Error");
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "CEC NAK Error");
|
||||
}
|
||||
|
||||
void OnDataReceived(string s)
|
||||
@@ -59,14 +60,14 @@ namespace PepperDash.Essentials.Core
|
||||
{
|
||||
var bytes = Encoding.GetEncoding(28591).GetBytes(s);
|
||||
if (StreamDebugging.RxStreamDebuggingIsEnabled)
|
||||
Debug.Console(0, this, "Received: '{0}'", ComTextHelper.GetEscapedText(bytes));
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Received: '{0}'", ComTextHelper.GetEscapedText(bytes));
|
||||
bytesHandler(this, new GenericCommMethodReceiveBytesArgs(bytes));
|
||||
}
|
||||
var textHandler = TextReceived;
|
||||
if (textHandler != null)
|
||||
{
|
||||
if (StreamDebugging.RxStreamDebuggingIsEnabled)
|
||||
Debug.Console(0, this, "Received: '{0}'", s);
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Received: '{0}'", s);
|
||||
textHandler(this, new GenericCommMethodReceiveTextArgs(s));
|
||||
}
|
||||
}
|
||||
@@ -78,7 +79,7 @@ namespace PepperDash.Essentials.Core
|
||||
if (Port == null)
|
||||
return;
|
||||
if (StreamDebugging.TxStreamDebuggingIsEnabled)
|
||||
Debug.Console(0, this, "Sending {0} characters of text: '{1}'", text.Length, text);
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Sending {0} characters of text: '{1}'", text.Length, text);
|
||||
Port.StreamCec.Send.StringValue = text;
|
||||
}
|
||||
|
||||
@@ -88,7 +89,7 @@ namespace PepperDash.Essentials.Core
|
||||
return;
|
||||
var text = Encoding.GetEncoding(28591).GetString(bytes, 0, bytes.Length);
|
||||
if (StreamDebugging.TxStreamDebuggingIsEnabled)
|
||||
Debug.Console(0, this, "Sending {0} bytes: '{1}'", bytes.Length, ComTextHelper.GetEscapedText(bytes));
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Sending {0} bytes: '{1}'", bytes.Length, ComTextHelper.GetEscapedText(bytes));
|
||||
Port.StreamCec.Send.StringValue = text;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
|
||||
using PepperDash.Core;
|
||||
using Serilog.Events;
|
||||
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
@@ -43,7 +44,7 @@ namespace PepperDash.Essentials.Core
|
||||
{
|
||||
if (port == null)
|
||||
{
|
||||
Debug.Console(0, this, "ERROR: Invalid com port, continuing but comms will not function");
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "ERROR: Invalid com port, continuing but comms will not function");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -58,7 +59,7 @@ namespace PepperDash.Essentials.Core
|
||||
{
|
||||
if (Port == null)
|
||||
{
|
||||
Debug.Console(0,this,Debug.ErrorLogLevel.Error, "Configured com Port for this device does not exist.");
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Configured com Port for this device does not exist.");
|
||||
return;
|
||||
}
|
||||
if (Port.Parent is CrestronControlSystem)
|
||||
@@ -66,7 +67,7 @@ namespace PepperDash.Essentials.Core
|
||||
var result = Port.Register();
|
||||
if (result != eDeviceRegistrationUnRegistrationResponse.Success)
|
||||
{
|
||||
Debug.Console(0, this, "ERROR: Cannot register Com port: {0}", result);
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "ERROR: Cannot register Com port: {0}", result);
|
||||
return; // false
|
||||
}
|
||||
}
|
||||
@@ -74,7 +75,7 @@ namespace PepperDash.Essentials.Core
|
||||
var specResult = Port.SetComPortSpec(Spec);
|
||||
if (specResult != 0)
|
||||
{
|
||||
Debug.Console(0, this, "WARNING: Cannot set comspec");
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "WARNING: Cannot set comspec");
|
||||
return;
|
||||
}
|
||||
Port.SerialDataReceived += Port_SerialDataReceived;
|
||||
@@ -98,14 +99,14 @@ namespace PepperDash.Essentials.Core
|
||||
{
|
||||
var bytes = Encoding.GetEncoding(28591).GetBytes(s);
|
||||
if (StreamDebugging.RxStreamDebuggingIsEnabled)
|
||||
Debug.Console(0, this, "Received: '{0}'", ComTextHelper.GetEscapedText(bytes));
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Received: '{0}'", ComTextHelper.GetEscapedText(bytes));
|
||||
bytesHandler(this, new GenericCommMethodReceiveBytesArgs(bytes));
|
||||
}
|
||||
var textHandler = TextReceived;
|
||||
if (textHandler != null)
|
||||
{
|
||||
if (StreamDebugging.RxStreamDebuggingIsEnabled)
|
||||
Debug.Console(0, this, "Received: '{0}'", s);
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Received: '{0}'", s);
|
||||
textHandler(this, new GenericCommMethodReceiveTextArgs(s));
|
||||
}
|
||||
}
|
||||
@@ -123,7 +124,7 @@ namespace PepperDash.Essentials.Core
|
||||
return;
|
||||
|
||||
if (StreamDebugging.TxStreamDebuggingIsEnabled)
|
||||
Debug.Console(0, this, "Sending {0} characters of text: '{1}'", text.Length, text);
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Sending {0} characters of text: '{1}'", text.Length, text);
|
||||
Port.Send(text);
|
||||
}
|
||||
|
||||
@@ -133,7 +134,7 @@ namespace PepperDash.Essentials.Core
|
||||
return;
|
||||
var text = Encoding.GetEncoding(28591).GetString(bytes, 0, bytes.Length);
|
||||
if (StreamDebugging.TxStreamDebuggingIsEnabled)
|
||||
Debug.Console(0, this, "Sending {0} bytes: '{1}'", bytes.Length, ComTextHelper.GetEscapedText(bytes));
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Sending {0} bytes: '{1}'", bytes.Length, ComTextHelper.GetEscapedText(bytes));
|
||||
|
||||
Port.Send(text);
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -74,7 +76,7 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
||||
{
|
||||
//Debug.Console(2, "ReadJson type: " + objectType.Name);
|
||||
//Debug.LogMessage(LogEventLevel.Verbose, "ReadJson type: " + objectType.Name);
|
||||
if (objectType == typeof(ComPort.eComBaudRates))
|
||||
return Enum.Parse(typeof(ComPort.eComBaudRates), "ComspecBaudRate" + reader.Value, false);
|
||||
else if (objectType == typeof(ComPort.eComDataBits))
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
|
||||
|
||||
using System;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DM;
|
||||
@@ -6,6 +8,7 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
@@ -20,12 +23,12 @@ namespace PepperDash.Essentials.Core
|
||||
{
|
||||
return JsonConvert.DeserializeObject<EssentialsControlPropertiesConfig>
|
||||
(deviceConfig.Properties["control"].ToString());
|
||||
//Debug.Console(2, "Control TEST: {0}", JsonConvert.SerializeObject(controlConfig));
|
||||
//Debug.LogMessage(LogEventLevel.Verbose, "Control TEST: {0}", JsonConvert.SerializeObject(controlConfig));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
Debug.Console(0, "ERROR: [{0}] Control properties deserialize failed:\r{1}", deviceConfig.Key, e);
|
||||
Debug.LogMessage(LogEventLevel.Information, "ERROR: [{0}] Control properties deserialize failed:\r{1}", deviceConfig.Key, e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -50,9 +53,6 @@ namespace PepperDash.Essentials.Core
|
||||
case eControlMethod.Com:
|
||||
comm = new ComPortController(deviceConfig.Key + "-com", GetComPort, controlConfig.ComParams, controlConfig);
|
||||
break;
|
||||
case eControlMethod.ComBridge:
|
||||
comm = new CommBridge(deviceConfig.Key + "-simpl", deviceConfig.Name + " Simpl");
|
||||
break;
|
||||
case eControlMethod.Cec:
|
||||
comm = new CecPortController(deviceConfig.Key + "-cec", GetCecPort, controlConfig);
|
||||
break;
|
||||
@@ -99,7 +99,7 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Console(0, "Cannot create communication from JSON:\r{0}\r\rException:\r{1}",
|
||||
Debug.LogMessage(LogEventLevel.Information, "Cannot create communication from JSON:\r{0}\r\rException:\r{1}",
|
||||
deviceConfig.Properties.ToString(), e);
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ namespace PepperDash.Essentials.Core
|
||||
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);
|
||||
Debug.LogMessage(LogEventLevel.Information, "GetComPort: Device '{0}' does not have com port {1}", config.ControlPortDevKey, config.ControlPortNumber);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ namespace PepperDash.Essentials.Core
|
||||
{
|
||||
var dev = DeviceManager.GetDeviceForKey(config.ControlPortDevKey);
|
||||
|
||||
Debug.Console(0, "GetCecPort: device '{0}' {1}", config.ControlPortDevKey, dev == null
|
||||
Debug.LogMessage(LogEventLevel.Information, "GetCecPort: device '{0}' {1}", config.ControlPortDevKey, dev == null
|
||||
? "is not valid, failed to get cec port"
|
||||
: "found in device manager, attempting to get cec port");
|
||||
|
||||
@@ -140,7 +140,7 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
if (String.IsNullOrEmpty(config.ControlPortName))
|
||||
{
|
||||
Debug.Console(0, "GetCecPort: '{0}' - Configuration missing 'ControlPortName'", config.ControlPortDevKey);
|
||||
Debug.LogMessage(LogEventLevel.Information, "GetCecPort: '{0}' - Configuration missing 'ControlPortName'", config.ControlPortDevKey);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ namespace PepperDash.Essentials.Core
|
||||
var inputsOutputs = dev as IRoutingInputsOutputs;
|
||||
if (inputsOutputs == null)
|
||||
{
|
||||
Debug.Console(0, "GetCecPort: Device '{0}' does not support IRoutingInputsOutputs, failed to get CEC port called '{1}'",
|
||||
Debug.LogMessage(LogEventLevel.Information, "GetCecPort: Device '{0}' does not support IRoutingInputsOutputs, failed to get CEC port called '{1}'",
|
||||
config.ControlPortDevKey, config.ControlPortName);
|
||||
|
||||
return null;
|
||||
@@ -165,13 +165,13 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.Console(1, "GetCecPort Exception Message: {0}", ex.Message);
|
||||
Debug.Console(2, "GetCecPort Exception StackTrace: {0}", ex.StackTrace);
|
||||
Debug.LogMessage(LogEventLevel.Debug, "GetCecPort Exception Message: {0}", ex.Message);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, "GetCecPort Exception StackTrace: {0}", ex.StackTrace);
|
||||
if (ex.InnerException != null)
|
||||
Debug.Console(0, "GetCecPort Exception InnerException: {0}", ex.InnerException);
|
||||
Debug.LogMessage(LogEventLevel.Information, "GetCecPort Exception InnerException: {0}", ex.InnerException);
|
||||
}
|
||||
|
||||
Debug.Console(0, "GetCecPort: Device '{0}' does not have a CEC port called '{1}'",
|
||||
Debug.LogMessage(LogEventLevel.Information, "GetCecPort: Device '{0}' does not have a CEC port called '{1}'",
|
||||
config.ControlPortDevKey, config.ControlPortName);
|
||||
|
||||
return null;
|
||||
@@ -192,7 +192,7 @@ namespace PepperDash.Essentials.Core
|
||||
{
|
||||
var dev = DeviceManager.GetDeviceForKey(ComPortDevKey) as IComPorts;
|
||||
if (dev == null)
|
||||
Debug.Console(0, "ComPortConfig: Cannot find com port device '{0}'", ComPortDevKey);
|
||||
Debug.LogMessage(LogEventLevel.Information, "ComPortConfig: Cannot find com port device '{0}'", ComPortDevKey);
|
||||
return dev;
|
||||
}
|
||||
}
|
||||
@@ -206,9 +206,7 @@ namespace PepperDash.Essentials.Core
|
||||
{
|
||||
|
||||
[JsonConverter(typeof(ComSpecJsonConverter))]
|
||||
public ComPort.ComPortSpec ComParams { get; set; }
|
||||
|
||||
public string RoomId { get; set; }
|
||||
public ComPort.ComPortSpec ComParams { get; set; }
|
||||
|
||||
public string CresnetId { get; set; }
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -6,6 +6,7 @@ using Crestron.SimplSharp;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using Serilog.Events;
|
||||
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
@@ -39,7 +40,7 @@ namespace PepperDash.Essentials.Core
|
||||
public override bool CustomActivate()
|
||||
{
|
||||
Communication.Connect();
|
||||
CommunicationMonitor.StatusChange += (o, a) => { Debug.Console(2, this, "Communication monitor state: {0}", CommunicationMonitor.Status); };
|
||||
CommunicationMonitor.StatusChange += (o, a) => { Debug.LogMessage(LogEventLevel.Verbose, this, "Communication monitor state: {0}", CommunicationMonitor.Status); };
|
||||
CommunicationMonitor.Start();
|
||||
|
||||
CrestronConsole.AddNewConsoleCommand(SendLine, "send" + Key, "", ConsoleAccessLevelEnum.AccessOperator);
|
||||
@@ -50,7 +51,7 @@ namespace PepperDash.Essentials.Core
|
||||
void SendLine(string s)
|
||||
{
|
||||
//if (Debug.Level == 2)
|
||||
// Debug.Console(2, this, " Send '{0}'", ComTextHelper.GetEscapedText(s));
|
||||
// Debug.LogMessage(LogEventLevel.Verbose, this, " Send '{0}'", ComTextHelper.GetEscapedText(s));
|
||||
Communication.SendText(s + LineEnding);
|
||||
}
|
||||
}
|
||||
@@ -75,7 +76,7 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.Console(1, "Factory Attempting to create new Comm Mock Device");
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Comm Mock Device");
|
||||
var comm = CommFactory.CreateCommForDevice(dc);
|
||||
var props = Newtonsoft.Json.JsonConvert.DeserializeObject<ConsoleCommMockDevicePropertiesConfig>(
|
||||
dc.Properties.ToString());
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Crestron.SimplSharp.CrestronSockets;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
@@ -8,6 +10,7 @@ using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
using PepperDash.Essentials.Core.Devices;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using Serilog.Events;
|
||||
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
@@ -43,7 +46,7 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
public static IKeyed BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.Console(1, "Factory Attempting to create new Generic Comm Device");
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Comm Device");
|
||||
return new GenericComm(dc);
|
||||
}
|
||||
|
||||
@@ -57,7 +60,7 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Console(2, this, "Error deserializing port config: {0}", e);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Error deserializing port config: {0}", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,16 +86,16 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
||||
Debug.LogMessage(LogEventLevel.Information, 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);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Unable to link device '{0}'. CommPort is null", Key);
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||
|
||||
// this is a permanent event handler. This cannot be -= from event
|
||||
CommPort.TextReceived += (s, a) =>
|
||||
@@ -135,7 +138,7 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.Console(1, "Factory Attempting to create new Generic Comm Device");
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Comm Device");
|
||||
return new GenericComm(dc);
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ using PepperDash.Core.DebugThings;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
[Obsolete("Please use the builtin HttpClient class instead: https://learn.microsoft.com/en-us/dotnet/fundamentals/networking/http/httpclient-guidelines")]
|
||||
public class GenericHttpClient : Device, IBasicCommunication
|
||||
{
|
||||
public HttpClient Client;
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharp.CrestronIO;
|
||||
@@ -8,6 +10,7 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
@@ -38,7 +41,7 @@ namespace PepperDash.Essentials.Core
|
||||
return null;
|
||||
if (control["method"].Value<string>() != "ir")
|
||||
{
|
||||
Debug.Console(0, "IRPortHelper called with non-IR properties");
|
||||
Debug.LogMessage(LogEventLevel.Information, "IRPortHelper called with non-IR properties");
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -48,7 +51,7 @@ namespace PepperDash.Essentials.Core
|
||||
var portNum = control.Value<uint>("controlPortNumber");
|
||||
if (portDevKey == null || portNum == 0)
|
||||
{
|
||||
Debug.Console(1, "WARNING: Properties is missing port device or port number");
|
||||
Debug.LogMessage(LogEventLevel.Debug, "WARNING: Properties is missing port device or port number");
|
||||
return port;
|
||||
}
|
||||
|
||||
@@ -61,7 +64,7 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
if (irDev == null)
|
||||
{
|
||||
Debug.Console(1, "[Config] Error, device with IR ports '{0}' not found", portDevKey);
|
||||
Debug.LogMessage(LogEventLevel.Debug, "[Config] Error, device with IR ports '{0}' not found", portDevKey);
|
||||
return port;
|
||||
}
|
||||
|
||||
@@ -74,7 +77,7 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(1, "[Config] Error, device '{0}' IR port {1} out of range",
|
||||
Debug.LogMessage(LogEventLevel.Debug, "[Config] Error, device '{0}' IR port {1} out of range",
|
||||
portDevKey, portNum);
|
||||
return port;
|
||||
}
|
||||
@@ -85,14 +88,14 @@ namespace PepperDash.Essentials.Core
|
||||
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);
|
||||
Debug.LogMessage(LogEventLevel.Information, "[{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,
|
||||
Debug.LogMessage(LogEventLevel.Information,
|
||||
"WARNING: Device config does not include control properties. IR will not function for {0}", dc.Key);
|
||||
return null;
|
||||
}
|
||||
@@ -103,13 +106,13 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
if (portDevKey == null)
|
||||
{
|
||||
Debug.Console(0, "WARNING: control properties is missing ir device for {0}", dc.Key);
|
||||
Debug.LogMessage(LogEventLevel.Information, "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);
|
||||
Debug.LogMessage(LogEventLevel.Information, "WARNING: control properties is missing ir port number for {0}", dc.Key);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -121,12 +124,12 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
if (irDev == null)
|
||||
{
|
||||
Debug.Console(0, "WARNING: device with IR ports '{0}' not found", portDevKey);
|
||||
Debug.LogMessage(LogEventLevel.Information, "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",
|
||||
Debug.LogMessage(LogEventLevel.Information, "WARNING: device '{0}' IR port {1} out of range",
|
||||
portDevKey, portNum);
|
||||
return null;
|
||||
}
|
||||
@@ -141,7 +144,7 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
public static IrOutputPortController GetIrOutputPortController(DeviceConfig config)
|
||||
{
|
||||
Debug.Console(1, "Attempting to create new Ir Port Controller");
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Attempting to create new Ir Port Controller");
|
||||
|
||||
if (config == null)
|
||||
{
|
||||
@@ -163,7 +166,7 @@ namespace PepperDash.Essentials.Core
|
||||
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);
|
||||
Debug.LogMessage(LogEventLevel.Information, "[{0}] WARNING: Device config does not include properties. IR will not function.", devConf.Key);
|
||||
return new IrOutputPortController(irControllerKey, null, "");
|
||||
}
|
||||
|
||||
@@ -171,7 +174,7 @@ namespace PepperDash.Essentials.Core
|
||||
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");
|
||||
Debug.LogMessage(LogEventLevel.Information, c, "WARNING: Device config does not include control properties. IR will not function");
|
||||
return c;
|
||||
}
|
||||
|
||||
@@ -182,14 +185,14 @@ namespace PepperDash.Essentials.Core
|
||||
if (portDevKey == null)
|
||||
{
|
||||
var c = new IrOutputPortController(irControllerKey, null, "");
|
||||
Debug.Console(0, c, "WARNING: control properties is missing ir device");
|
||||
Debug.LogMessage(LogEventLevel.Information, 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");
|
||||
Debug.LogMessage(LogEventLevel.Information, c, "WARNING: control properties is missing ir port number");
|
||||
return c;
|
||||
}
|
||||
|
||||
@@ -202,7 +205,7 @@ namespace PepperDash.Essentials.Core
|
||||
if (irDev == null)
|
||||
{
|
||||
var c = new IrOutputPortController(irControllerKey, null, "");
|
||||
Debug.Console(0, c, "WARNING: device with IR ports '{0}' not found", portDevKey);
|
||||
Debug.LogMessage(LogEventLevel.Information, c, "WARNING: device with IR ports '{0}' not found", portDevKey);
|
||||
return c;
|
||||
}
|
||||
|
||||
@@ -212,7 +215,7 @@ namespace PepperDash.Essentials.Core
|
||||
else
|
||||
{
|
||||
var c = new IrOutputPortController(irControllerKey, null, "");
|
||||
Debug.Console(0, c, "WARNING: device '{0}' IR port {1} out of range",
|
||||
Debug.LogMessage(LogEventLevel.Information, c, "WARNING: device '{0}' IR port {1} out of range",
|
||||
portDevKey, portNum);
|
||||
return c;
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharp.CrestronIO;
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
@@ -7,6 +9,7 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Core.Config;
|
||||
using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Config
|
||||
{
|
||||
@@ -25,7 +28,7 @@ namespace PepperDash.Essentials.Core.Config
|
||||
|
||||
public static bool LoadConfig2()
|
||||
{
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loading unmerged system/template portal configuration file.");
|
||||
Debug.LogMessage(LogEventLevel.Information, "Loading unmerged system/template portal configuration file.");
|
||||
try
|
||||
{
|
||||
// Check for local config file first
|
||||
@@ -33,7 +36,7 @@ namespace PepperDash.Essentials.Core.Config
|
||||
|
||||
bool localConfigFound = false;
|
||||
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to load Local config file: '{0}'", filePath);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Attempting to load Local config file: '{0}'", filePath);
|
||||
|
||||
// Check for local config directory first
|
||||
|
||||
@@ -43,7 +46,7 @@ namespace PepperDash.Essentials.Core.Config
|
||||
{
|
||||
if (configFiles.Length > 1)
|
||||
{
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Error,
|
||||
Debug.LogMessage(LogEventLevel.Information,
|
||||
"****Error: Multiple Local Configuration files present. Please ensure only a single file exists and reset program.****");
|
||||
return false;
|
||||
}
|
||||
@@ -55,7 +58,7 @@ namespace PepperDash.Essentials.Core.Config
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Notice,
|
||||
Debug.LogMessage(LogEventLevel.Information,
|
||||
"Local Configuration file not present.", filePath);
|
||||
|
||||
}
|
||||
@@ -65,33 +68,33 @@ namespace PepperDash.Essentials.Core.Config
|
||||
{
|
||||
filePath = Global.FilePathPrefix + Global.ConfigFileName;
|
||||
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to load Portal config file: '{0}'", filePath);
|
||||
Debug.LogMessage(LogEventLevel.Information, "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);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, "{0} config files found matching pattern", configFiles.Length);
|
||||
|
||||
if (configFiles.Length > 1)
|
||||
{
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Error,
|
||||
Debug.LogMessage(LogEventLevel.Information,
|
||||
"****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);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Found Portal config file: '{0}'", filePath);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "No config file found.");
|
||||
Debug.LogMessage(LogEventLevel.Information, "No config file found.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Error,
|
||||
Debug.LogMessage(LogEventLevel.Information,
|
||||
"ERROR: Portal Configuration file not present. Please load file and reset program.");
|
||||
return false;
|
||||
}
|
||||
@@ -109,13 +112,13 @@ namespace PepperDash.Essentials.Core.Config
|
||||
// Read the file
|
||||
using (StreamReader fs = new StreamReader(filePath))
|
||||
{
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loading config file: '{0}'", filePath);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Loading config file: '{0}'", filePath);
|
||||
|
||||
if (localConfigFound)
|
||||
{
|
||||
ConfigObject = JObject.Parse(fs.ReadToEnd()).ToObject<EssentialsConfig>();
|
||||
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Successfully Loaded Local Config");
|
||||
Debug.LogMessage(LogEventLevel.Information, "Successfully Loaded Local Config");
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -137,14 +140,14 @@ namespace PepperDash.Essentials.Core.Config
|
||||
}
|
||||
}
|
||||
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Successfully Loaded Merged Config");
|
||||
Debug.LogMessage(LogEventLevel.Information, "Successfully Loaded Merged Config");
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "ERROR: Config load failed: \r{0}", e);
|
||||
Debug.LogMessage(LogEventLevel.Information, "ERROR: Config load failed: \r{0}", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -161,20 +164,20 @@ namespace PepperDash.Essentials.Core.Config
|
||||
|
||||
if (Directory.Exists(dir))
|
||||
{
|
||||
Debug.Console(1, "Searching in Directory '{0}'", dir);
|
||||
Debug.LogMessage(LogEventLevel.Debug, "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);
|
||||
Debug.LogMessage(LogEventLevel.Debug, "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,
|
||||
Debug.LogMessage(LogEventLevel.Information,
|
||||
"Directory not found: ", dir);
|
||||
|
||||
return null;
|
||||
@@ -246,8 +249,8 @@ namespace PepperDash.Essentials.Core.Config
|
||||
// Line 8
|
||||
.Append(new string('*', debugStringWidth));
|
||||
|
||||
Debug.Console(2, Debug.ErrorLogLevel.Notice, "Found Local config file: '{0}'", filePath);
|
||||
Debug.Console(0, newDebugString.ToString());
|
||||
Debug.LogMessage(LogEventLevel.Verbose, "Found Local config file: '{0}'", filePath);
|
||||
Debug.LogMessage(LogEventLevel.Information, newDebugString.ToString());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -10,6 +12,7 @@ using Crestron.SimplSharp.Net.Http;
|
||||
using Crestron.SimplSharpPro.Diagnostics;
|
||||
|
||||
using PepperDash.Core;
|
||||
using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Config
|
||||
{
|
||||
@@ -19,7 +22,7 @@ namespace PepperDash.Essentials.Core.Config
|
||||
|
||||
public static void GetConfigFromServer(string url)
|
||||
{
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to get new config from '{0}'", url);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Attempting to get new config from '{0}'", url);
|
||||
|
||||
// HTTP GET
|
||||
var req = new HttpClientRequest();
|
||||
@@ -49,17 +52,17 @@ namespace PepperDash.Essentials.Core.Config
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "Config Update Process Stopped. Failed to get config file from server: {0}", r.Code);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Config Update Process Stopped. Failed to get config file from server: {0}", r.Code);
|
||||
OnStatusUpdate(eUpdateStatus.UpdateFailed);
|
||||
}
|
||||
}
|
||||
else
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "Request for config from Server Failed: {0}", e);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Request for config from Server Failed: {0}", e);
|
||||
});
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Console(1, "Error Getting Config from Server: {0}", e);
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Error Getting Config from Server: {0}", e);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -88,7 +91,7 @@ namespace PepperDash.Essentials.Core.Config
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Console(1, "Error parsing new config: {0}", e);
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Error parsing new config: {0}", e);
|
||||
|
||||
OnStatusUpdate(eUpdateStatus.UpdateFailed);
|
||||
}
|
||||
@@ -105,7 +108,7 @@ namespace PepperDash.Essentials.Core.Config
|
||||
|
||||
if (configFiles != null)
|
||||
{
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Existing config files found. Moving to Archive folder.");
|
||||
Debug.LogMessage(LogEventLevel.Information, "Existing config files found. Moving to Archive folder.");
|
||||
|
||||
OnStatusUpdate(eUpdateStatus.ArchivingConfigs);
|
||||
|
||||
@@ -113,7 +116,7 @@ namespace PepperDash.Essentials.Core.Config
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "No Existing config files found in '{0}'. Nothing to archive", filePath);
|
||||
Debug.LogMessage(LogEventLevel.Information, "No Existing config files found in '{0}'. Nothing to archive", filePath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,12 +141,12 @@ namespace PepperDash.Essentials.Core.Config
|
||||
|
||||
if(archivedConfigFiles != null || archivedConfigFiles.Length > 0)
|
||||
{
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "{0} Existing files found in archive folder. Deleting.", archivedConfigFiles.Length);
|
||||
Debug.LogMessage(LogEventLevel.Information, "{0} Existing files found in archive folder. Deleting.", archivedConfigFiles.Length);
|
||||
|
||||
for (int i = 0; i < archivedConfigFiles.Length; i++ )
|
||||
{
|
||||
var file = archivedConfigFiles[i];
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Deleting archived file: '{0}'", file.FullName);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Deleting archived file: '{0}'", file.FullName);
|
||||
file.Delete();
|
||||
}
|
||||
}
|
||||
@@ -153,7 +156,7 @@ namespace PepperDash.Essentials.Core.Config
|
||||
// Move any files from the program folder to the archive folder
|
||||
foreach (var file in files)
|
||||
{
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Moving config file '{0}' to archive folder", file.FullName);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Moving config file '{0}' to archive folder", file.FullName);
|
||||
|
||||
// Moves the file and appends the .bak extension
|
||||
var fileDest = archiveDirectoryPath + "/" + file.Name + ".bak";
|
||||
@@ -162,7 +165,7 @@ namespace PepperDash.Essentials.Core.Config
|
||||
file.MoveTo(fileDest);
|
||||
}
|
||||
else
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Warning, "Cannot move file to archive folder. Existing file already exists with same name: '{0}'", fileDest);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Cannot move file to archive folder. Existing file already exists with same name: '{0}'", fileDest);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,7 +180,7 @@ namespace PepperDash.Essentials.Core.Config
|
||||
{
|
||||
OnStatusUpdate(eUpdateStatus.DeletingLocalConfig);
|
||||
Directory.Delete(folderPath);
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Local Config Found in '{0}'. Deleting.", folderPath);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Local Config Found in '{0}'. Deleting.", folderPath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,7 +189,7 @@ namespace PepperDash.Essentials.Core.Config
|
||||
/// </summary>
|
||||
static void RestartProgram()
|
||||
{
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to Reset Program");
|
||||
Debug.LogMessage(LogEventLevel.Information, "Attempting to Reset Program");
|
||||
|
||||
OnStatusUpdate(eUpdateStatus.RestartingProgram);
|
||||
|
||||
@@ -194,7 +197,7 @@ namespace PepperDash.Essentials.Core.Config
|
||||
|
||||
CrestronConsole.SendControlSystemCommand(string.Format("progreset -p:{0}", InitialParametersClass.ApplicationNumber), ref response);
|
||||
|
||||
Debug.Console(1, "Console Response: {0}", response);
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Console Response: {0}", response);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -7,6 +9,7 @@ using Crestron.SimplSharp.CrestronIO;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using PepperDash.Core;
|
||||
using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Config
|
||||
{
|
||||
@@ -40,7 +43,7 @@ namespace PepperDash.Essentials.Core.Config
|
||||
// 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);
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Updated properties of device: '{0}'", deviceKey);
|
||||
|
||||
success = true;
|
||||
}
|
||||
@@ -60,7 +63,7 @@ namespace PepperDash.Essentials.Core.Config
|
||||
{
|
||||
ConfigReader.ConfigObject.Devices[deviceConfigIndex] = config;
|
||||
|
||||
Debug.Console(1, "Updated config of device: '{0}'", config.Key);
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Updated config of device: '{0}'", config.Key);
|
||||
|
||||
success = true;
|
||||
}
|
||||
@@ -80,7 +83,7 @@ namespace PepperDash.Essentials.Core.Config
|
||||
{
|
||||
ConfigReader.ConfigObject.Rooms[roomConfigIndex] = config;
|
||||
|
||||
Debug.Console(1, "Updated room of device: '{0}'", config.Key);
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Updated room of device: '{0}'", config.Key);
|
||||
|
||||
success = true;
|
||||
}
|
||||
@@ -100,7 +103,7 @@ namespace PepperDash.Essentials.Core.Config
|
||||
|
||||
WriteTimer.Reset(WriteTimeout);
|
||||
|
||||
Debug.Console(1, "Config File write timer has been reset.");
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Config File write timer has been reset.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -126,9 +129,9 @@ namespace PepperDash.Essentials.Core.Config
|
||||
if (WriteTimer != null)
|
||||
WriteTimer.Stop();
|
||||
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Writing Configuration to file");
|
||||
Debug.LogMessage(LogEventLevel.Information, "Writing Configuration to file");
|
||||
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to write config file: '{0}'", filePath);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Attempting to write config file: '{0}'", filePath);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -142,12 +145,12 @@ namespace PepperDash.Essentials.Core.Config
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to enter FileLock");
|
||||
Debug.LogMessage(LogEventLevel.Information, "Unable to enter FileLock");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "Error: Config write failed: \r{0}", e);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Error: Config write failed: \r{0}", e);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
13
src/PepperDash.Essentials.Core/Config/ILoadConfig.cs
Normal file
13
src/PepperDash.Essentials.Core/Config/ILoadConfig.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
public interface ILoadConfig
|
||||
{
|
||||
void GoWithLoad();
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharp.Reflection;
|
||||
@@ -5,12 +5,10 @@ using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Core.JsonStandardObjects;
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// A bridge class to cover the basic features of GenericBase hardware
|
||||
/// </summary>
|
||||
public abstract class CrestronGenericBaseDevice : EssentialsDevice, IOnline, IHasFeedback, ICommunicationMonitor, IUsageTracking
|
||||
{
|
||||
protected GenericBase Hardware;
|
||||
@@ -68,17 +66,17 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
public override bool CustomActivate()
|
||||
{
|
||||
Debug.Console(0, this, "Activating");
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Activating");
|
||||
if (!PreventRegistration)
|
||||
{
|
||||
//Debug.Console(1, this, " Does not require registration. Skipping");
|
||||
//Debug.LogMessage(LogEventLevel.Debug, 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);
|
||||
//Debug.LogMessage(LogEventLevel.Information, this, "ERROR: Cannot register Crestron device: {0}", response);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -144,7 +142,7 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
void Hardware_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args)
|
||||
{
|
||||
Debug.Console(2, this, "OnlineStatusChange Event. Online = {0}", args.DeviceOnLine);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "OnlineStatusChange Event. Online = {0}", args.DeviceOnLine);
|
||||
|
||||
if (!Hardware.Registered)
|
||||
{
|
||||
@@ -201,12 +199,11 @@ namespace PepperDash.Essentials.Core
|
||||
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);
|
||||
|
||||
Debug.LogMessage(LogEventLevel.Information, "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);
|
||||
// Debug.LogMessage(LogEventLevel.Information, "Cannot register device '{0}': {1}", key, result);
|
||||
//}
|
||||
return result;
|
||||
}
|
||||
@@ -38,16 +38,16 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
public override bool CustomActivate()
|
||||
{
|
||||
Debug.Console(0, this, "Activating");
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Activating");
|
||||
var response = Hardware.RegisterWithLogging(Key);
|
||||
if (response != eDeviceRegistrationUnRegistrationResponse.Success)
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
Debug.Console(0, this, "ERROR: Cannot register Crestron device: {0}", response);
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "ERROR: Cannot register Crestron device: {0}", response);
|
||||
return false;
|
||||
}
|
||||
=======
|
||||
Debug.Console(0, this, "ERROR: Cannot register Crestron device: {0}", response);
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "ERROR: Cannot register Crestron device: {0}", response);
|
||||
return false;
|
||||
}
|
||||
>>>>>>> origin/feature/ecs-342-neil
|
||||
@@ -119,7 +119,7 @@ namespace PepperDash.Essentials.Core
|
||||
var result = device.Register();
|
||||
if (result != eDeviceRegistrationUnRegistrationResponse.Success)
|
||||
{
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "Cannot register device '{0}': {1}", key, result);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Cannot register device '{0}': {1}", key, result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -9,6 +11,7 @@ using Newtonsoft.Json;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using Serilog.Events;
|
||||
|
||||
|
||||
namespace PepperDash.Essentials.Core.CrestronIO
|
||||
@@ -65,7 +68,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
{
|
||||
if (!Global.ControlSystem.SupportsDigitalInput)
|
||||
{
|
||||
Debug.Console(0, "GetDigitalInput: Processor does not support Digital Inputs");
|
||||
Debug.LogMessage(LogEventLevel.Information, "GetDigitalInput: Processor does not support Digital Inputs");
|
||||
return null;
|
||||
}
|
||||
ioPortDevice = Global.ControlSystem;
|
||||
@@ -75,20 +78,20 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
var ioPortDev = DeviceManager.GetDeviceForKey(dc.PortDeviceKey) as IDigitalInputPorts;
|
||||
if (ioPortDev == null)
|
||||
{
|
||||
Debug.Console(0, "GetDigitalInput: Device {0} is not a valid device", dc.PortDeviceKey);
|
||||
Debug.LogMessage(LogEventLevel.Information, "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);
|
||||
Debug.LogMessage(LogEventLevel.Information, "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);
|
||||
Debug.LogMessage(LogEventLevel.Information, "GetDigitalInput: Device {0} does not contain a port {1}", dc.PortDeviceKey, dc.PortNumber);
|
||||
}
|
||||
|
||||
return ioPortDevice.DigitalInputPorts[dc.PortNumber];
|
||||
@@ -115,20 +118,20 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
||||
Debug.LogMessage(LogEventLevel.Information, 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"));
|
||||
Debug.LogMessage(LogEventLevel.Debug, 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);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Unable to link device '{0}'. Input is null", Key);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Error: {0}", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,7 +148,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.Console(1, "Factory Attempting to create new Generic Digital Input Device");
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Digital Input Device");
|
||||
|
||||
var props = JsonConvert.DeserializeObject<IOPortConfig>(dc.Properties.ToString());
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -9,6 +11,7 @@ using Newtonsoft.Json;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Core.CrestronIO
|
||||
{
|
||||
@@ -46,7 +49,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
|
||||
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);
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Unable to get parent relay device for device key {0} and port {1}", config.PortDeviceKey, config.PortNumber);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -67,7 +70,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
{
|
||||
if (!Global.ControlSystem.SupportsRelay)
|
||||
{
|
||||
Debug.Console(0, "Processor does not support relays");
|
||||
Debug.LogMessage(LogEventLevel.Information, "Processor does not support relays");
|
||||
return null;
|
||||
}
|
||||
relayDevice = Global.ControlSystem;
|
||||
@@ -78,7 +81,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
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);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Device {0} was not found in Device Manager. Check configuration or for errors with device.", dc.PortDeviceKey);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -86,7 +89,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
|
||||
if (relayDevice == null)
|
||||
{
|
||||
Debug.Console(0, "Device {0} is not a valid relay parent. Please check configuration.", dc.PortDeviceKey);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Device {0} is not a valid relay parent. Please check configuration.", dc.PortDeviceKey);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -95,7 +98,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
return relayDevice.RelayPorts[dc.PortNumber];
|
||||
}
|
||||
|
||||
Debug.Console(0, "Device {0} does not contain a port {1}", dc.PortDeviceKey, dc.PortNumber);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Device {0} does not contain a port {1}", dc.PortDeviceKey, dc.PortNumber);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -163,16 +166,16 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
||||
Debug.LogMessage(LogEventLevel.Information, 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);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Unable to link device '{0}'. Relay is null", Key);
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||
|
||||
trilist.SetBoolSigAction(joinMap.Relay.JoinNumber, b =>
|
||||
{
|
||||
@@ -200,7 +203,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.Console(1, "Factory Attempting to create new Generic Relay Device");
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Relay Device");
|
||||
|
||||
var props = JsonConvert.DeserializeObject<IOPortConfig>(dc.Properties.ToString());
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -12,6 +14,7 @@ using PepperDash.Essentials.Core.Bridges;
|
||||
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Core.CrestronIO
|
||||
{
|
||||
@@ -57,7 +60,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
|
||||
InputPort.VersiportChange += InputPort_VersiportChange;
|
||||
|
||||
Debug.Console(1, this, "Created GenericVersiportAnalogInputDevice on port '{0}'. DisablePullUpResistor: '{1}'", config.PortNumber, InputPort.DisablePullUpResistor);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Created GenericVersiportAnalogInputDevice on port '{0}'. DisablePullUpResistor: '{1}'", config.PortNumber, InputPort.DisablePullUpResistor);
|
||||
|
||||
});
|
||||
|
||||
@@ -74,7 +77,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
|
||||
void InputPort_VersiportChange(Versiport port, VersiportEventArgs args)
|
||||
{
|
||||
Debug.Console(1, this, "Versiport change: {0}", args.Event);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Versiport change: {0}", args.Event);
|
||||
|
||||
if(args.Event == eVersiportEvent.AnalogInChange)
|
||||
InputValueFeedback.FireUpdate();
|
||||
@@ -100,12 +103,12 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
||||
Debug.LogMessage(LogEventLevel.Information, 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"));
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||
|
||||
// Link feedback for input state
|
||||
InputValueFeedback.LinkInputSig(trilist.UShortInput[joinMap.InputValue.JoinNumber]);
|
||||
@@ -115,8 +118,8 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Console(1, this, "Unable to link device '{0}'. Input is null", Key);
|
||||
Debug.Console(1, this, "Error: {0}", e);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Unable to link device '{0}'. Input is null", Key);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Error: {0}", e);
|
||||
}
|
||||
|
||||
trilist.OnlineStatusChange += (d, args) =>
|
||||
@@ -145,7 +148,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
{
|
||||
if (!Global.ControlSystem.SupportsVersiport)
|
||||
{
|
||||
Debug.Console(0, "GetVersiportAnalogInput: Processor does not support Versiports");
|
||||
Debug.LogMessage(LogEventLevel.Information, "GetVersiportAnalogInput: Processor does not support Versiports");
|
||||
return null;
|
||||
}
|
||||
ioPortDevice = Global.ControlSystem;
|
||||
@@ -155,25 +158,25 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
var ioPortDev = DeviceManager.GetDeviceForKey(dc.PortDeviceKey) as IIOPorts;
|
||||
if (ioPortDev == null)
|
||||
{
|
||||
Debug.Console(0, "GetVersiportAnalogInput: Device {0} is not a valid device", dc.PortDeviceKey);
|
||||
Debug.LogMessage(LogEventLevel.Information, "GetVersiportAnalogInput: Device {0} is not a valid device", dc.PortDeviceKey);
|
||||
return null;
|
||||
}
|
||||
ioPortDevice = ioPortDev;
|
||||
}
|
||||
if (ioPortDevice == null)
|
||||
{
|
||||
Debug.Console(0, "GetVersiportAnalogInput: Device '0' is not a valid IIOPorts Device", dc.PortDeviceKey);
|
||||
Debug.LogMessage(LogEventLevel.Information, "GetVersiportAnalogInput: Device '0' is not a valid IIOPorts Device", dc.PortDeviceKey);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (dc.PortNumber > ioPortDevice.NumberOfVersiPorts)
|
||||
{
|
||||
Debug.Console(0, "GetVersiportAnalogInput: Device {0} does not contain a port {1}", dc.PortDeviceKey, dc.PortNumber);
|
||||
Debug.LogMessage(LogEventLevel.Information, "GetVersiportAnalogInput: Device {0} does not contain a port {1}", dc.PortDeviceKey, dc.PortNumber);
|
||||
return null;
|
||||
}
|
||||
if(!ioPortDevice.VersiPorts[dc.PortNumber].SupportsAnalogInput)
|
||||
{
|
||||
Debug.Console(0, "GetVersiportAnalogInput: Device {0} does not support AnalogInput on port {1}", dc.PortDeviceKey, dc.PortNumber);
|
||||
Debug.LogMessage(LogEventLevel.Information, "GetVersiportAnalogInput: Device {0} does not support AnalogInput on port {1}", dc.PortDeviceKey, dc.PortNumber);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -194,7 +197,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.Console(1, "Factory Attempting to create new Generic Versiport Device");
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Versiport Device");
|
||||
|
||||
var props = JsonConvert.DeserializeObject<IOPortConfig>(dc.Properties.ToString());
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -12,6 +14,7 @@ using PepperDash.Essentials.Core.Bridges;
|
||||
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Core.CrestronIO
|
||||
{
|
||||
@@ -51,7 +54,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
|
||||
|
||||
|
||||
Debug.Console(1, this, "Created GenericVersiportDigitalInputDevice on port '{0}'. DisablePullUpResistor: '{1}'", config.PortNumber, InputPort.DisablePullUpResistor);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Created GenericVersiportDigitalInputDevice on port '{0}'. DisablePullUpResistor: '{1}'", config.PortNumber, InputPort.DisablePullUpResistor);
|
||||
|
||||
});
|
||||
|
||||
@@ -59,7 +62,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
|
||||
void InputPort_VersiportChange(Versiport port, VersiportEventArgs args)
|
||||
{
|
||||
Debug.Console(1, this, "Versiport change: {0}", args.Event);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Versiport change: {0}", args.Event);
|
||||
|
||||
if(args.Event == eVersiportEvent.DigitalInChange)
|
||||
InputStateFeedback.FireUpdate();
|
||||
@@ -83,20 +86,20 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
||||
Debug.LogMessage(LogEventLevel.Information, 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"));
|
||||
Debug.LogMessage(LogEventLevel.Debug, 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);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Unable to link device '{0}'. Input is null", Key);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Error: {0}", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +115,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
{
|
||||
if (!Global.ControlSystem.SupportsVersiport)
|
||||
{
|
||||
Debug.Console(0, "GetVersiportDigitalInput: Processor does not support Versiports");
|
||||
Debug.LogMessage(LogEventLevel.Information, "GetVersiportDigitalInput: Processor does not support Versiports");
|
||||
return null;
|
||||
}
|
||||
ioPortDevice = Global.ControlSystem;
|
||||
@@ -122,20 +125,20 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
var ioPortDev = DeviceManager.GetDeviceForKey(dc.PortDeviceKey) as IIOPorts;
|
||||
if (ioPortDev == null)
|
||||
{
|
||||
Debug.Console(0, "GetVersiportDigitalInput: Device {0} is not a valid device", dc.PortDeviceKey);
|
||||
Debug.LogMessage(LogEventLevel.Information, "GetVersiportDigitalInput: Device {0} is not a valid device", dc.PortDeviceKey);
|
||||
return null;
|
||||
}
|
||||
ioPortDevice = ioPortDev;
|
||||
}
|
||||
if (ioPortDevice == null)
|
||||
{
|
||||
Debug.Console(0, "GetVersiportDigitalInput: Device '0' is not a valid IIOPorts Device", dc.PortDeviceKey);
|
||||
Debug.LogMessage(LogEventLevel.Information, "GetVersiportDigitalInput: Device '0' is not a valid IIOPorts Device", dc.PortDeviceKey);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (dc.PortNumber > ioPortDevice.NumberOfVersiPorts)
|
||||
{
|
||||
Debug.Console(0, "GetVersiportDigitalInput: Device {0} does not contain a port {1}", dc.PortDeviceKey, dc.PortNumber);
|
||||
Debug.LogMessage(LogEventLevel.Information, "GetVersiportDigitalInput: Device {0} does not contain a port {1}", dc.PortDeviceKey, dc.PortNumber);
|
||||
}
|
||||
|
||||
return ioPortDevice.VersiPorts[dc.PortNumber];
|
||||
@@ -154,7 +157,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.Console(1, "Factory Attempting to create new Generic Versiport Device");
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Versiport Device");
|
||||
|
||||
var props = JsonConvert.DeserializeObject<IOPortConfig>(dc.Properties.ToString());
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -12,6 +14,7 @@ using PepperDash.Essentials.Core.Bridges;
|
||||
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Core.CrestronIO
|
||||
{
|
||||
@@ -46,7 +49,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
|
||||
if (!OutputPort.SupportsDigitalOutput)
|
||||
{
|
||||
Debug.Console(0, this, "Device does not support configuration as a Digital Output");
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Device does not support configuration as a Digital Output");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -61,7 +64,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
|
||||
void OutputPort_VersiportChange(Versiport port, VersiportEventArgs args)
|
||||
{
|
||||
Debug.Console(1, this, "Versiport change: {0}", args.Event);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Versiport change: {0}", args.Event);
|
||||
|
||||
if(args.Event == eVersiportEvent.DigitalOutChange)
|
||||
OutputStateFeedback.FireUpdate();
|
||||
@@ -75,14 +78,14 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
{
|
||||
if (OutputPort.SupportsDigitalOutput)
|
||||
{
|
||||
Debug.Console(0, this, "Passed the Check");
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Passed the Check");
|
||||
|
||||
OutputPort.DigitalOut = state;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, this, "Versiport does not support Digital Output Mode");
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Versiport does not support Digital Output Mode");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -104,12 +107,12 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
||||
Debug.LogMessage(LogEventLevel.Information, 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"));
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||
|
||||
// Link feedback for input state
|
||||
OutputStateFeedback.LinkInputSig(trilist.BooleanInput[joinMap.OutputState.JoinNumber]);
|
||||
@@ -117,8 +120,8 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Console(1, this, "Unable to link device '{0}'. Input is null", Key);
|
||||
Debug.Console(1, this, "Error: {0}", e);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Unable to link device '{0}'. Input is null", Key);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Error: {0}", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +137,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
{
|
||||
if (!Global.ControlSystem.SupportsVersiport)
|
||||
{
|
||||
Debug.Console(0, "GetVersiportDigitalOuptut: Processor does not support Versiports");
|
||||
Debug.LogMessage(LogEventLevel.Information, "GetVersiportDigitalOuptut: Processor does not support Versiports");
|
||||
return null;
|
||||
}
|
||||
ioPortDevice = Global.ControlSystem;
|
||||
@@ -144,20 +147,20 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
var ioPortDev = DeviceManager.GetDeviceForKey(dc.PortDeviceKey) as IIOPorts;
|
||||
if (ioPortDev == null)
|
||||
{
|
||||
Debug.Console(0, "GetVersiportDigitalOuptut: Device {0} is not a valid device", dc.PortDeviceKey);
|
||||
Debug.LogMessage(LogEventLevel.Information, "GetVersiportDigitalOuptut: Device {0} is not a valid device", dc.PortDeviceKey);
|
||||
return null;
|
||||
}
|
||||
ioPortDevice = ioPortDev;
|
||||
}
|
||||
if (ioPortDevice == null)
|
||||
{
|
||||
Debug.Console(0, "GetVersiportDigitalOuptut: Device '0' is not a valid IOPorts Device", dc.PortDeviceKey);
|
||||
Debug.LogMessage(LogEventLevel.Information, "GetVersiportDigitalOuptut: Device '0' is not a valid IOPorts Device", dc.PortDeviceKey);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (dc.PortNumber > ioPortDevice.NumberOfVersiPorts)
|
||||
{
|
||||
Debug.Console(0, "GetVersiportDigitalOuptut: Device {0} does not contain a port {1}", dc.PortDeviceKey, dc.PortNumber);
|
||||
Debug.LogMessage(LogEventLevel.Information, "GetVersiportDigitalOuptut: Device {0} does not contain a port {1}", dc.PortDeviceKey, dc.PortNumber);
|
||||
}
|
||||
var port = ioPortDevice.VersiPorts[dc.PortNumber];
|
||||
return port;
|
||||
@@ -175,7 +178,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.Console(1, "Factory Attempting to create new Generic Versiport Device");
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Versiport Device");
|
||||
|
||||
var props = JsonConvert.DeserializeObject<IOPortConfig>(dc.Properties.ToString());
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -4,6 +4,7 @@ using System.Linq;
|
||||
using PepperDash.Core;
|
||||
using Crestron.SimplSharp;
|
||||
using PepperDash.Essentials.Core;
|
||||
using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceInfo
|
||||
{
|
||||
@@ -48,7 +49,7 @@ namespace PepperDash.Essentials.Core.DeviceInfo
|
||||
}
|
||||
ArpTable.Clear();
|
||||
|
||||
Debug.Console(2, "ConsoleResponse of 'showarptable' : {0}{1}", NewLine, consoleResponse);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, "ConsoleResponse of 'showarptable' : {0}{1}", NewLine, consoleResponse);
|
||||
|
||||
var myLines =
|
||||
consoleResponse.Split(NewLineSplitter)
|
||||
@@ -68,7 +69,7 @@ namespace PepperDash.Essentials.Core.DeviceInfo
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.Console(0, "Exception in \"RefreshArp\" : {0}", ex.Message);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Exception in \"RefreshArp\" : {0}", ex.Message);
|
||||
error = true;
|
||||
}
|
||||
finally
|
||||
@@ -106,7 +107,7 @@ namespace PepperDash.Essentials.Core.DeviceInfo
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.Console(0, "Unable to Santize Ip : {0}", ex.Message);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Unable to Santize Ip : {0}", ex.Message);
|
||||
return ipAddressIn;
|
||||
}
|
||||
}
|
||||
@@ -126,7 +127,7 @@ namespace PepperDash.Essentials.Core.DeviceInfo
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.Console(0, "Exception Resolving Hostname from IP Address : {0}", ex.Message);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Exception Resolving Hostname from IP Address : {0}", ex.Message);
|
||||
return ipAddress;
|
||||
}
|
||||
}
|
||||
@@ -145,7 +146,7 @@ namespace PepperDash.Essentials.Core.DeviceInfo
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.Console(0, "Exception Resolving IP Address from Hostname : {0}", ex.Message);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Exception Resolving IP Address from Hostname : {0}", ex.Message);
|
||||
return hostName;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
public interface IHasBranding
|
||||
{
|
||||
bool BrandingEnabled { get; }
|
||||
void InitializeBranding(string roomKey);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using PepperDash.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Describes a device that has selectable inputs
|
||||
/// </summary>
|
||||
/// <typeparam name="TKey">the type to use as the key for each input item. Most likely an enum or string</typeparam>\
|
||||
/// <example>
|
||||
/// See MockDisplay for example implemntation
|
||||
/// </example>
|
||||
public interface IHasInputs<TKey, TSelector>: IKeyName
|
||||
{
|
||||
ISelectableItems<TKey> Inputs { get; }
|
||||
|
||||
void SetInput(TSelector selector);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using PepperDash.Essentials.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
public interface IHasPhoneDialing
|
||||
{
|
||||
BoolFeedback PhoneOffHookFeedback { get; }
|
||||
StringFeedback CallerIdNameFeedback { get; }
|
||||
StringFeedback CallerIdNumberFeedback { get; }
|
||||
void DialPhoneCall(string number);
|
||||
void EndPhoneCall();
|
||||
void SendDtmfToPhone(string digit);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using PepperDash.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes a device that has selectable surround sound modes
|
||||
/// </summary>
|
||||
/// <typeparam name="TKey">the type to use as the key for each input item. Most likely an enum or string</typeparam>
|
||||
public interface IHasSurroundSoundModes<TKey, TSelector>: IKeyName
|
||||
{
|
||||
ISelectableItems<TKey> SurroundSoundModes { get; }
|
||||
|
||||
void SetSurroundSoundMode(TSelector selector);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
public interface ILanguageDefinition
|
||||
{
|
||||
string LocaleName { get; set; }
|
||||
string FriendlyName { get; set; }
|
||||
bool Enable { get; set; }
|
||||
List<LanguageLabel> UiLabels { get; set; }
|
||||
List<LanguageLabel> Sources { get; set; }
|
||||
List<LanguageLabel> Destinations { get; set; }
|
||||
List<LanguageLabel> SourceGroupNames { get; set; }
|
||||
List<LanguageLabel> DestinationGroupNames { get; set; }
|
||||
List<LanguageLabel> RoomNames { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
|
||||
public interface ILanguageProvider
|
||||
{
|
||||
ILanguageDefinition CurrentLanguage { get; set; }
|
||||
|
||||
event EventHandler CurrentLanguageChanged;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
public interface ILevelControls
|
||||
{
|
||||
Dictionary<string, IBasicVolumeWithFeedback> LevelControlPoints { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using PepperDash.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Use this interface on a device or room if it uses custom Mobile Control messengers
|
||||
/// </summary>
|
||||
public interface ICustomMobileControl : IKeyed
|
||||
{
|
||||
}
|
||||
|
||||
/*/// <summary>
|
||||
/// Describes a MobileControlSystemController
|
||||
/// </summary>
|
||||
public interface IMobileControl : IKeyed
|
||||
{
|
||||
void CreateMobileControlRoomBridge(IEssentialsRoom room, IMobileControl parent);
|
||||
|
||||
void LinkSystemMonitorToAppServer();
|
||||
}*/
|
||||
|
||||
/// <summary>
|
||||
/// Describes a MobileSystemController that accepts IEssentialsRoom
|
||||
/// </summary>
|
||||
public interface IMobileControl : IKeyed
|
||||
{
|
||||
string Host { get; }
|
||||
|
||||
string ClientAppUrl { get; }
|
||||
|
||||
string SystemUuid { get; }
|
||||
|
||||
BoolFeedback ApiOnlineAndAuthorized { get;}
|
||||
|
||||
void SendMessageObject(IMobileControlMessage o);
|
||||
|
||||
void AddAction<T>(T messenger, Action<string, string, JToken> action) where T:IMobileControlMessenger;
|
||||
|
||||
void RemoveAction(string key);
|
||||
|
||||
void AddDeviceMessenger(IMobileControlMessenger messenger);
|
||||
|
||||
bool CheckForDeviceMessenger(string key);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Describes a mobile control messenger
|
||||
/// </summary>
|
||||
public interface IMobileControlMessenger: IKeyed
|
||||
{
|
||||
IMobileControl AppServerController { get; }
|
||||
string MessagePath { get; }
|
||||
|
||||
string DeviceKey { get; }
|
||||
void RegisterWithAppServer(IMobileControl appServerController);
|
||||
}
|
||||
|
||||
public interface IMobileControlMessage
|
||||
{
|
||||
[JsonProperty("type")]
|
||||
string Type { get; }
|
||||
|
||||
[JsonProperty("clientId", NullValueHandling = NullValueHandling.Ignore)]
|
||||
string ClientId { get; }
|
||||
|
||||
[JsonProperty("content", NullValueHandling = NullValueHandling.Ignore)]
|
||||
JToken Content { get; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Describes a MobileControl Room Bridge
|
||||
/// </summary>
|
||||
public interface IMobileControlRoomMessenger : IKeyed
|
||||
{
|
||||
event EventHandler<EventArgs> UserCodeChanged;
|
||||
|
||||
event EventHandler<EventArgs> UserPromptedForCode;
|
||||
|
||||
event EventHandler<EventArgs> ClientJoined;
|
||||
|
||||
event EventHandler<EventArgs> AppUrlChanged;
|
||||
|
||||
string UserCode { get; }
|
||||
|
||||
string QrCodeUrl { get; }
|
||||
|
||||
string QrCodeChecksum { get; }
|
||||
|
||||
string McServerUrl { get; }
|
||||
|
||||
string RoomName { get; }
|
||||
|
||||
string AppUrl { get; }
|
||||
|
||||
void UpdateAppUrl(string url);
|
||||
}
|
||||
|
||||
public interface IMobileControlAction
|
||||
{
|
||||
IMobileControlMessenger Messenger { get; }
|
||||
|
||||
Action<string,string, JToken> Action { get; }
|
||||
}
|
||||
|
||||
public interface IMobileControlTouchpanelController : IKeyed
|
||||
{
|
||||
string DefaultRoomKey { get; }
|
||||
void SetAppUrl(string url);
|
||||
bool UseDirectServer { get; }
|
||||
bool ZoomRoomController { get; }
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user