mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-22 08:05:00 +00:00
Compare commits
527 Commits
1.10.1-hot
...
v1.16.3-3s
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02c2dceedc | ||
|
|
bc1e9b070a | ||
|
|
781faa0431 | ||
|
|
87602c19d7 | ||
|
|
ade5596a18 | ||
|
|
c32ffdc1a8 | ||
|
|
a8285f211d | ||
|
|
6f38f4953e | ||
|
|
8230d95746 | ||
|
|
065726ee72 | ||
|
|
33a31ab931 | ||
|
|
b85377dccf | ||
|
|
e7c5e0566a | ||
|
|
cb2c117588 | ||
|
|
be34808ef0 | ||
|
|
7a4224e52a | ||
|
|
428f9f34bd | ||
|
|
78e49871c6 | ||
|
|
12e81af9e6 | ||
|
|
544a7a2d73 | ||
|
|
1d843c6c89 | ||
|
|
c72db72e7e | ||
|
|
9e588f4da5 | ||
|
|
4c466b425c | ||
|
|
d0aed1c1c5 | ||
|
|
bf966121f9 | ||
|
|
ecadb439b2 | ||
|
|
8c1553a026 | ||
|
|
9755724342 | ||
|
|
4d25c420e5 | ||
|
|
3190dacdf8 | ||
|
|
44add9aac6 | ||
|
|
5bb6405874 | ||
|
|
fed3d7e13a | ||
|
|
af848b9ca4 | ||
|
|
b52c13d8e8 | ||
|
|
26f9118154 | ||
|
|
bba3c347c6 | ||
|
|
be96adcc06 | ||
|
|
b245016420 | ||
|
|
19f2c6aa79 | ||
|
|
533ca05ac2 | ||
|
|
9c7777fbaa | ||
|
|
5530c91b75 | ||
|
|
67e0378806 | ||
|
|
1c5aca03d2 | ||
|
|
6f5fa2c3b8 | ||
|
|
3d760cbedc | ||
|
|
d713abf614 | ||
|
|
a64b5240ad | ||
|
|
c528fecb9a | ||
|
|
355e9cde12 | ||
|
|
1df8d3f617 | ||
|
|
2f1caff815 | ||
|
|
4da2f25c3d | ||
|
|
552a315ac0 | ||
|
|
99c35f14e1 | ||
|
|
5f2b916220 | ||
|
|
c7a16a46e9 | ||
|
|
d6334538c0 | ||
|
|
4f64022623 | ||
|
|
7ad638ea9a | ||
|
|
51d168b1d5 | ||
|
|
3179f3bf59 | ||
|
|
eba27d016d | ||
|
|
e5fe16122f | ||
|
|
ee9b191f85 | ||
|
|
d1d1d81165 | ||
|
|
6698dcb46e | ||
|
|
c8aa77fbc0 | ||
|
|
53b96d54e6 | ||
|
|
6c41b8e19d | ||
|
|
922119fdd6 | ||
|
|
86c1faa7cd | ||
|
|
75895604ed | ||
|
|
de6f8c7896 | ||
|
|
5a5e24a921 | ||
|
|
8b3bc523d2 | ||
|
|
ff04d49a1b | ||
|
|
55af6a96f6 | ||
|
|
a3561bc89b | ||
|
|
1a123ab6dc | ||
|
|
c0b0b35f6d | ||
|
|
1d60f2e069 | ||
|
|
bd97676050 | ||
|
|
8612fab4fe | ||
|
|
b9fd9f23a4 | ||
|
|
1e07e44279 | ||
|
|
1569c12450 | ||
|
|
6d020132cf | ||
|
|
7ecb2ecf6d | ||
|
|
393033b6c9 | ||
|
|
9fb16f30b0 | ||
|
|
8b6a9db7e0 | ||
|
|
5a67a4060d | ||
|
|
0fad667fab | ||
|
|
95c37872ad | ||
|
|
a5ad7ea48b | ||
|
|
14221f9613 | ||
|
|
334a62c329 | ||
|
|
e590c7cedb | ||
|
|
189c470603 | ||
|
|
4deee11d15 | ||
|
|
4bdac8d9e9 | ||
|
|
58e019992a | ||
|
|
da5d2d74f2 | ||
|
|
2afa9df705 | ||
|
|
1aa9590587 | ||
|
|
27bac4e83d | ||
|
|
4e33743f50 | ||
|
|
08af6370a6 | ||
|
|
97c0bddb48 | ||
|
|
316d545bda | ||
|
|
13df52ab49 | ||
|
|
527457baf5 | ||
|
|
d74c5de651 | ||
|
|
b06d0c0deb | ||
|
|
759fb1d729 | ||
|
|
3defd6b41b | ||
|
|
794cd3be5f | ||
|
|
68cbbee6a3 | ||
|
|
a50d758f70 | ||
|
|
aedac14feb | ||
|
|
93134cae5c | ||
|
|
555915b151 | ||
|
|
fa0f006b9b | ||
|
|
4c0fb6311b | ||
|
|
6538cecc3b | ||
|
|
44296cbc54 | ||
|
|
0dcf45fc84 | ||
|
|
4d2ce83e75 | ||
|
|
da4070bad0 | ||
|
|
d95692ba96 | ||
|
|
daf3f321bd | ||
|
|
269d82227d | ||
|
|
e8f20a4ca3 | ||
|
|
5fbacadd7f | ||
|
|
9c9b2952aa | ||
|
|
a7a4b75382 | ||
|
|
8d0f0c0c37 | ||
|
|
2b97b9bdc4 | ||
|
|
77f5dafdfe | ||
|
|
b5bf87c634 | ||
|
|
62f175c24a | ||
|
|
0cfcf61d6b | ||
|
|
4a0bacb27e | ||
|
|
a36901894d | ||
|
|
c047507997 | ||
|
|
ef719b0a64 | ||
|
|
c46409dc3f | ||
|
|
f73d6994b8 | ||
|
|
a787be6ccc | ||
|
|
f0ae0094dc | ||
|
|
fcd4b5d772 | ||
|
|
c3ba6d5c28 | ||
|
|
3f6b2f05a2 | ||
|
|
cab0b01a08 | ||
|
|
f4af1b6e7c | ||
|
|
a04bfd1fcb | ||
|
|
faaf8151df | ||
|
|
0ee6322684 | ||
|
|
c614347f29 | ||
|
|
43f06d2167 | ||
|
|
2ffe24fd93 | ||
|
|
515ffd07f0 | ||
|
|
16ea7a88be | ||
|
|
e1ce35863f | ||
|
|
acd3bad1f2 | ||
|
|
0f3b0580f0 | ||
|
|
08514915b2 | ||
|
|
ea464038b9 | ||
|
|
c4c44d02f5 | ||
|
|
3fe5d89904 | ||
|
|
c0d78e8978 | ||
|
|
3716dd0824 | ||
|
|
ebe8ee5653 | ||
|
|
432934ad00 | ||
|
|
372cf86613 | ||
|
|
67c99a9ad4 | ||
|
|
31085d42a9 | ||
|
|
0df315426b | ||
|
|
6ddbdd90c7 | ||
|
|
39e1e5167b | ||
|
|
7f916d1d2f | ||
|
|
7c7f087898 | ||
|
|
898dab1d9a | ||
|
|
b221d2f0cb | ||
|
|
9656269826 | ||
|
|
ba182c1d98 | ||
|
|
2460290dc1 | ||
|
|
0b01661196 | ||
|
|
dfa55ab9f8 | ||
|
|
55ad92e2f6 | ||
|
|
c53cad8119 | ||
|
|
82e8b4b203 | ||
|
|
8965752025 | ||
|
|
8c3b891255 | ||
|
|
51bd95937a | ||
|
|
10fc8ee30b | ||
|
|
8da8b8c584 | ||
|
|
c7e0326b8c | ||
|
|
845978c741 | ||
|
|
ba511067d3 | ||
|
|
a9fe8bbb10 | ||
|
|
bc64ee37cb | ||
|
|
b2646f50cb | ||
|
|
465aa947cf | ||
|
|
16b78d27b9 | ||
|
|
4e56213dad | ||
|
|
668fc89eb2 | ||
|
|
e623c482a9 | ||
|
|
243c7cc3ee | ||
|
|
615598c8a6 | ||
|
|
3b25108a26 | ||
|
|
f253abd0ae | ||
|
|
e04f6d0396 | ||
|
|
eb4c7ff605 | ||
|
|
d0688cbc16 | ||
|
|
961af69aae | ||
|
|
df402ce498 | ||
|
|
e524bf358a | ||
|
|
3abd195c57 | ||
|
|
a3615d8d1b | ||
|
|
6a461a6923 | ||
|
|
77776f3258 | ||
|
|
701513d30e | ||
|
|
c9eaff6fce | ||
|
|
e8cdf3a63b | ||
|
|
f55ecdb67e | ||
|
|
cad677ae89 | ||
|
|
b057d3de18 | ||
|
|
1920d37488 | ||
|
|
e005a30383 | ||
|
|
058b3820be | ||
|
|
8a77b134e4 | ||
|
|
88f843250a | ||
|
|
772369bcd6 | ||
|
|
cef29af1ba | ||
|
|
8cc6cfafe9 | ||
|
|
89ba4627ea | ||
|
|
e05186defd | ||
|
|
83b0aec227 | ||
|
|
a3ba014c0f | ||
|
|
4919a863c3 | ||
|
|
2228bc1a1e | ||
|
|
1411add591 | ||
|
|
cbec2f2119 | ||
|
|
34d3b705fa | ||
|
|
e1d7374f1e | ||
|
|
a3346d5ef4 | ||
|
|
1c1eabcef6 | ||
|
|
12f3f519cc | ||
|
|
4dc6d5b5ac | ||
|
|
faaa2a354e | ||
|
|
087e74b207 | ||
|
|
8bb670c43b | ||
|
|
55a5cc53c9 | ||
|
|
0793a09095 | ||
|
|
15efed02a5 | ||
|
|
c68d46f971 | ||
|
|
dd2aca9aa4 | ||
|
|
705e750419 | ||
|
|
23af38aefa | ||
|
|
1bae7dc91b | ||
|
|
0c2896f9aa | ||
|
|
555944011d | ||
|
|
03d5c24dc4 | ||
|
|
f4a5d6737e | ||
|
|
b52bee5714 | ||
|
|
5de4382cd0 | ||
|
|
6414631deb | ||
|
|
300c675341 | ||
|
|
a4290e68b1 | ||
|
|
c14e5fe449 | ||
|
|
3b2fa8aec5 | ||
|
|
ffa864c71b | ||
|
|
86f904c8f9 | ||
|
|
6b60f4ddb1 | ||
|
|
2677d63553 | ||
|
|
d03581fea8 | ||
|
|
decc8ed3a5 | ||
|
|
b0637288e9 | ||
|
|
ea8c3995bd | ||
|
|
f6e08eb077 | ||
|
|
112a2b7382 | ||
|
|
c2d49c65f0 | ||
|
|
99bc3f4f3e | ||
|
|
e8f773b2e6 | ||
|
|
e342bede11 | ||
|
|
81c779e595 | ||
|
|
d980209bd8 | ||
|
|
c2a439d20d | ||
|
|
52d945fca3 | ||
|
|
0ef8fcfd27 | ||
|
|
042416b470 | ||
|
|
84f2222c38 | ||
|
|
966377ee2e | ||
|
|
3d27b0928f | ||
|
|
860182dbfc | ||
|
|
f325ff7af0 | ||
|
|
58a5600ac6 | ||
|
|
efb6d3ef83 | ||
|
|
04477d62cc | ||
|
|
668cbc430c | ||
|
|
e54de1f1cb | ||
|
|
f48b1a2de3 | ||
|
|
8e57e7ec31 | ||
|
|
1b43b44d19 | ||
|
|
4306128474 | ||
|
|
5263b16bb7 | ||
|
|
a2b67798f3 | ||
|
|
1b43fba37e | ||
|
|
f262c1a3bb | ||
|
|
93ee695c57 | ||
|
|
ba0bae3c4e | ||
|
|
37a98d00af | ||
|
|
247827ac25 | ||
|
|
5e797db096 | ||
|
|
57eeeec0fb | ||
|
|
db19da124c | ||
|
|
c07f52b06f | ||
|
|
92e48a62a8 | ||
|
|
f3653039ca | ||
|
|
3b79c2c8c3 | ||
|
|
c9efa3cfaa | ||
|
|
bd8a3de172 | ||
|
|
7bc7e7ff4f | ||
|
|
afe0568177 | ||
|
|
07c8c50c19 | ||
|
|
c34b4fc3a0 | ||
|
|
b711548c3b | ||
|
|
906433ff8d | ||
|
|
b6675477be | ||
|
|
0b307ee40a | ||
|
|
f5d89e2067 | ||
|
|
c9a175031d | ||
|
|
4fd01610c1 | ||
|
|
c19becc170 | ||
|
|
fc3840173e | ||
|
|
ce51a62d97 | ||
|
|
2be42f88bc | ||
|
|
60afe203dd | ||
|
|
6f9a9ee255 | ||
|
|
a09212417c | ||
|
|
4d6da37c60 | ||
|
|
95627df1a6 | ||
|
|
bef07fe41b | ||
|
|
99e1ec3b3b | ||
|
|
e44e7c976f | ||
|
|
fea3189a18 | ||
|
|
578754de85 | ||
|
|
4903232c10 | ||
|
|
83d2497264 | ||
|
|
50f5145a89 | ||
|
|
969abcc8b6 | ||
|
|
c136943c3a | ||
|
|
a734a869c1 | ||
|
|
c6495577e7 | ||
|
|
5359604098 | ||
|
|
70d2633eb0 | ||
|
|
58aa9dae08 | ||
|
|
6715a680cc | ||
|
|
f3fc0f2b26 | ||
|
|
330bb2d002 | ||
|
|
c0436b1230 | ||
|
|
26b968463b | ||
|
|
d33b89f232 | ||
|
|
10d77ac006 | ||
|
|
c19ab76a4c | ||
|
|
040c57b5e1 | ||
|
|
d6864bf214 | ||
|
|
62275890cb | ||
|
|
2a6b845fde | ||
|
|
4fb2d6d755 | ||
|
|
5994704fbd | ||
|
|
ca1cbb6e05 | ||
|
|
f82b7f8f12 | ||
|
|
dbd77f5f9f | ||
|
|
55031d16af | ||
|
|
4938071f70 | ||
|
|
3670bde7cf | ||
|
|
4deb9a0828 | ||
|
|
a524b1607d | ||
|
|
155f511ce2 | ||
|
|
21b09c593a | ||
|
|
cdeca09855 | ||
|
|
93435b60b5 | ||
|
|
2daf3c0328 | ||
|
|
eaef8ea616 | ||
|
|
b67eb6325b | ||
|
|
38cb86218c | ||
|
|
edddf295fe | ||
|
|
05ec0ebac3 | ||
|
|
c3d07fe4fd | ||
|
|
eae089cdf5 | ||
|
|
b48859d202 | ||
|
|
bda46eb1b9 | ||
|
|
47c24a237e | ||
|
|
ee735388bb | ||
|
|
77f202b9f4 | ||
|
|
939afb7aae | ||
|
|
4a98b58b60 | ||
|
|
2bf9336712 | ||
|
|
c0c67f6c15 | ||
|
|
eb3922aa43 | ||
|
|
598886dfd4 | ||
|
|
215cf6696e | ||
|
|
c557400f38 | ||
|
|
49a96d2632 | ||
|
|
ccf7acd53d | ||
|
|
f1590aeec8 | ||
|
|
f1d1ce9722 | ||
|
|
edd55d0349 | ||
|
|
384c4c2781 | ||
|
|
9b2611be02 | ||
|
|
26bd49aa85 | ||
|
|
1b9f16ea74 | ||
|
|
88a16b577b | ||
|
|
b4ab0c1c32 | ||
|
|
d01be57f81 | ||
|
|
5ba7abb59b | ||
|
|
f5a352cf08 | ||
|
|
c4a23e0887 | ||
|
|
2622e68afc | ||
|
|
7fe2d04d31 | ||
|
|
358f44cfe5 | ||
|
|
d7cccc0709 | ||
|
|
72086b57b3 | ||
|
|
f04b93d5e9 | ||
|
|
18c52ca199 | ||
|
|
1dcafff8fb | ||
|
|
81b1117310 | ||
|
|
fb689c4484 | ||
|
|
40cb1b0fcf | ||
|
|
4574941288 | ||
|
|
122abc56e5 | ||
|
|
074ee190ad | ||
|
|
68a0157fbe | ||
|
|
0376943dac | ||
|
|
62abbdf5e9 | ||
|
|
12248c6393 | ||
|
|
139ecc3e58 | ||
|
|
afa0a4cac2 | ||
|
|
ed335cc9ae | ||
|
|
5d51570018 | ||
|
|
e5393deea8 | ||
|
|
c446c3a976 | ||
|
|
49e44ec850 | ||
|
|
7298b9b767 | ||
|
|
5a8914a33f | ||
|
|
0ec42f8de2 | ||
|
|
008c82edb9 | ||
|
|
3033322212 | ||
|
|
5b350c7a0c | ||
|
|
afd2198eef | ||
|
|
dccab58a28 | ||
|
|
19d29a03c8 | ||
|
|
41bc6a9cd4 | ||
|
|
051d50e8c9 | ||
|
|
16af75ae0d | ||
|
|
4037fad26b | ||
|
|
5a4cc2fd39 | ||
|
|
04e8508c0c | ||
|
|
cbab051c11 | ||
|
|
9c8bb66c5e | ||
|
|
96ec2cbe49 | ||
|
|
9ecaec5584 | ||
|
|
b505ad467b | ||
|
|
d8ac302f1c | ||
|
|
712d38011c | ||
|
|
d849e4185c | ||
|
|
c3818b8bf2 | ||
|
|
05dadbe8ee | ||
|
|
c39fd231bf | ||
|
|
bbb31aea23 | ||
|
|
0df587071d | ||
|
|
4a405804c8 | ||
|
|
38c4a540a9 | ||
|
|
4c9a470885 | ||
|
|
be5158d29e | ||
|
|
8ce390d650 | ||
|
|
05066dc1ea | ||
|
|
70a78b540d | ||
|
|
c56caff1cb | ||
|
|
5e22ca9c59 | ||
|
|
5131e73567 | ||
|
|
e02c267988 | ||
|
|
53c9f9e664 | ||
|
|
794ba7e6dd | ||
|
|
5b94d89bc3 | ||
|
|
6dbdd0587d | ||
|
|
1a5d4896e1 | ||
|
|
50e9a7935f | ||
|
|
03e4c913ac | ||
|
|
b26e1b97aa | ||
|
|
60b6cea697 | ||
|
|
dfc0915fe0 | ||
|
|
96e3d52b95 | ||
|
|
cd4f2d5edd | ||
|
|
59b18d713b | ||
|
|
1cc37b7521 | ||
|
|
86dfc395ec | ||
|
|
05f3a7eb2c | ||
|
|
20beeb076a | ||
|
|
a7db15d9fd | ||
|
|
b8442e7048 | ||
|
|
1e65c961c6 | ||
|
|
bdc4f0ae28 | ||
|
|
82ac34d3b6 | ||
|
|
23555e5174 | ||
|
|
a74753d4a3 | ||
|
|
768a93d44d | ||
|
|
46cb10f452 | ||
|
|
5386f0fffb | ||
|
|
7c892b4f71 | ||
|
|
1566e04edf | ||
|
|
f902a57f60 | ||
|
|
309605ee38 | ||
|
|
e2b8e356ff | ||
|
|
832102f4bb | ||
|
|
b23b7cb813 | ||
|
|
33c7038d99 | ||
|
|
7e8d88c3af | ||
|
|
c539c79135 | ||
|
|
281b6f065f | ||
|
|
acfbefca00 | ||
|
|
5f668c7173 |
22
.github/workflows/EssentialsPlugins-builds-3-series-caller.yml
vendored
Normal file
22
.github/workflows/EssentialsPlugins-builds-3-series-caller.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
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/essentialsplugins-3Series-builds.yml@main
|
||||||
|
uses: PepperDash/workflow-templates/.github/workflows/essentials-3Series-builds.yml@plugins-build-workflows
|
||||||
|
secrets: inherit
|
||||||
|
needs: getVersion
|
||||||
|
if: needs.getVersion.outputs.newVersion == 'true'
|
||||||
|
with:
|
||||||
|
newVersion: ${{ needs.getVersion.outputs.newVersion }}
|
||||||
|
version: ${{ needs.getVersion.outputs.version }}
|
||||||
|
tag: ${{ needs.getVersion.outputs.tag }}
|
||||||
|
channel: ${{ needs.getVersion.outputs.channel }}
|
||||||
141
.github/workflows/docker.yml
vendored
141
.github/workflows/docker.yml
vendored
@@ -1,141 +0,0 @@
|
|||||||
name: Branch Build Using Docker
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- feature/*
|
|
||||||
- hotfix/*
|
|
||||||
- bugfix/*
|
|
||||||
- release/*
|
|
||||||
- development
|
|
||||||
|
|
||||||
env:
|
|
||||||
# solution path doesn't need slashes unless it is multiple folders deep
|
|
||||||
# solution name does not include extension. .sln is assumed
|
|
||||||
SOLUTION_PATH: PepperDashEssentials
|
|
||||||
SOLUTION_FILE: PepperDashEssentials
|
|
||||||
# Do not edit this, we're just creating it here
|
|
||||||
VERSION: 0.0.0-buildtype-buildnumber
|
|
||||||
# Defaults to debug for build type
|
|
||||||
BUILD_TYPE: Debug
|
|
||||||
# Defaults to main as the release branch. Change as necessary
|
|
||||||
RELEASE_BRANCH: main
|
|
||||||
jobs:
|
|
||||||
Build_Project:
|
|
||||||
runs-on: windows-2019
|
|
||||||
steps:
|
|
||||||
# First we checkout the source repo
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
# Fetch all tags
|
|
||||||
- name: Fetch tags
|
|
||||||
run: git fetch --tags
|
|
||||||
# Generate the appropriate version number
|
|
||||||
- name: Set Version Number
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
$version = ./.github/scripts/GenerateVersionNumber.ps1
|
|
||||||
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
||||||
# Use the version number to set the version of the assemblies
|
|
||||||
- name: Update AssemblyInfo.cs
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
./.github/scripts/UpdateAssemblyVersion.ps1 ${{ env.VERSION }}
|
|
||||||
- name: restore Nuget Packages
|
|
||||||
run: nuget install .\packages.config -OutputDirectory .\packages -ExcludeVersion
|
|
||||||
# Login to Docker
|
|
||||||
- name: Login to Docker
|
|
||||||
uses: azure/docker-login@v1
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_TOKEN }}
|
|
||||||
# Build the solutions in the docker image
|
|
||||||
- name: Build Solution
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
Invoke-Expression "docker run --rm --mount type=bind,source=""$($Env:GITHUB_WORKSPACE)"",target=""c:/project"" pepperdash/sspbuilder c:\cihelpers\vsidebuild.exe -Solution ""c:\project\$($Env:SOLUTION_FILE).sln"" -BuildSolutionConfiguration $($ENV:BUILD_TYPE)"
|
|
||||||
# Zip up the output files as needed
|
|
||||||
- name: Zip Build Output
|
|
||||||
shell: powershell
|
|
||||||
run: ./.github/scripts/ZipBuildOutput.ps1
|
|
||||||
# Write the version to a file to be consumed by the push jobs
|
|
||||||
- name: Write Version
|
|
||||||
run: Write-Output "$($Env:VERSION)" | Out-File -FilePath "$($Env:GITHUB_HOME)\output\version.txt"
|
|
||||||
# Upload the build output as an artifact
|
|
||||||
- name: Upload Build Output
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Build
|
|
||||||
path: ./${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip
|
|
||||||
# Upload the Version file as an artifact
|
|
||||||
- name: Upload version.txt
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Version
|
|
||||||
path: ${{env.GITHUB_HOME}}\output\version.txt
|
|
||||||
- name: Create Release
|
|
||||||
id: create_release
|
|
||||||
# using contributor's version to allow for pointing at the right commit
|
|
||||||
uses: fleskesvor/create-release@feature/support-target-commitish
|
|
||||||
with:
|
|
||||||
tag_name: ${{ env.VERSION }}
|
|
||||||
release_name: ${{ env.VERSION }}
|
|
||||||
prerelease: ${{contains('debug', env.BUILD_TYPE)}}
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
# Upload the build package to the release
|
|
||||||
- name: Upload Release Package
|
|
||||||
id: upload_release
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip
|
|
||||||
asset_name: ${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip
|
|
||||||
asset_content_type: application/zip
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
Push_Nuget_Package:
|
|
||||||
needs: Build_Project
|
|
||||||
runs-on: windows-2019
|
|
||||||
steps:
|
|
||||||
- name: Download Build Version Info
|
|
||||||
uses: actions/download-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Version
|
|
||||||
- name: Set Version Number
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
Get-ChildItem "./Version"
|
|
||||||
$version = Get-Content -Path ./Version/version.txt
|
|
||||||
Write-Host "Version: $version"
|
|
||||||
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
||||||
Remove-Item -Path ./Version/version.txt
|
|
||||||
Remove-Item -Path ./Version
|
|
||||||
- name: Download Build output
|
|
||||||
uses: actions/download-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Build
|
|
||||||
path: ./
|
|
||||||
- name: Unzip Build file
|
|
||||||
run: |
|
|
||||||
Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\
|
|
||||||
Remove-Item -Path .\*.zip
|
|
||||||
- name: Copy Files to root & delete output directory
|
|
||||||
run: |
|
|
||||||
Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz")
|
|
||||||
Get-ChildItem -Path .\output\* | Copy-Item -Destination .\
|
|
||||||
Remove-Item -Path .\output -Recurse
|
|
||||||
- name: Add nuget.exe
|
|
||||||
uses: nuget/setup-nuget@v1
|
|
||||||
- name: Add Github Packages source
|
|
||||||
run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Add nuget.org API Key
|
|
||||||
run: nuget setApiKey ${{ secrets.NUGET_API_KEY }}
|
|
||||||
- name: Create nuget package
|
|
||||||
run: nuget pack "./PepperDash_Essentials_Core.nuspec" -version ${{ env.VERSION }}
|
|
||||||
- name: Publish nuget package to Github registry
|
|
||||||
run: nuget push **/*.nupkg -source github
|
|
||||||
- name: Publish nuget package to nuget.org
|
|
||||||
run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json
|
|
||||||
125
.github/workflows/main.yml
vendored
125
.github/workflows/main.yml
vendored
@@ -1,125 +0,0 @@
|
|||||||
name: main Build using Docker
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types:
|
|
||||||
- created
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
env:
|
|
||||||
# solution path doesn't need slashes unless there it is multiple folders deep
|
|
||||||
# solution name does not include extension. .sln is assumed
|
|
||||||
SOLUTION_PATH: PepperDashEssentials
|
|
||||||
SOLUTION_FILE: PepperDashEssentials
|
|
||||||
# Do not edit this, we're just creating it here
|
|
||||||
VERSION: 0.0.0-buildtype-buildnumber
|
|
||||||
# Defaults to debug for build type
|
|
||||||
BUILD_TYPE: Release
|
|
||||||
# Defaults to main as the release branch. Change as necessary
|
|
||||||
RELEASE_BRANCH: main
|
|
||||||
jobs:
|
|
||||||
Build_Project:
|
|
||||||
runs-on: windows-2019
|
|
||||||
steps:
|
|
||||||
# First we checkout the source repo
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
# Generate the appropriate version number
|
|
||||||
- name: Set Version Number
|
|
||||||
shell: powershell
|
|
||||||
env:
|
|
||||||
TAG_NAME: ${{ github.event.release.tag_name }}
|
|
||||||
run: echo "VERSION=$($Env:TAG_NAME)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
||||||
# Use the version number to set the version of the assemblies
|
|
||||||
- name: Update AssemblyInfo.cs
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
./.github/scripts/UpdateAssemblyVersion.ps1 ${{ env.VERSION }}
|
|
||||||
- name: restore Nuget Packages
|
|
||||||
run: nuget install .\packages.config -OutputDirectory .\packages -ExcludeVersion
|
|
||||||
# Login to Docker
|
|
||||||
- name: Login to Docker
|
|
||||||
uses: azure/docker-login@v1
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_TOKEN }}
|
|
||||||
# Build the solutions in the docker image
|
|
||||||
- name: Build Solution
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
Invoke-Expression "docker run --rm --mount type=bind,source=""$($Env:GITHUB_WORKSPACE)"",target=""c:/project"" pepperdash/sspbuilder c:\cihelpers\vsidebuild.exe -Solution ""c:\project\$($Env:SOLUTION_FILE).sln"" -BuildSolutionConfiguration $($ENV:BUILD_TYPE)"
|
|
||||||
# Zip up the output files as needed
|
|
||||||
- name: Zip Build Output
|
|
||||||
shell: powershell
|
|
||||||
run: ./.github/scripts/ZipBuildOutput.ps1
|
|
||||||
# Write the version to a file to be consumed by the push jobs
|
|
||||||
- name: Write Version
|
|
||||||
run: Write-Output "$($Env:VERSION)" | Out-File -FilePath "$($Env:GITHUB_HOME)\output\version.txt"
|
|
||||||
# Upload the build output as an artifact
|
|
||||||
- name: Upload Build Output
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Build
|
|
||||||
path: ./${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip
|
|
||||||
# Upload the Version file as an artifact
|
|
||||||
- name: Upload version.txt
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Version
|
|
||||||
path: ${{env.GITHUB_HOME}}\output\version.txt
|
|
||||||
# Upload the build package to the release
|
|
||||||
- name: Upload Release Package
|
|
||||||
id: upload_release
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
with:
|
|
||||||
upload_url: ${{ github.event.release.upload_url }}
|
|
||||||
asset_path: ./${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip
|
|
||||||
asset_name: ${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip
|
|
||||||
asset_content_type: application/zip
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
Push_Nuget_Package:
|
|
||||||
needs: Build_Project
|
|
||||||
runs-on: windows-2019
|
|
||||||
steps:
|
|
||||||
- name: Download Build Version Info
|
|
||||||
uses: actions/download-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Version
|
|
||||||
- name: Set Version Number
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
Get-ChildItem "./Version"
|
|
||||||
$version = Get-Content -Path ./Version/version.txt
|
|
||||||
Write-Host "Version: $version"
|
|
||||||
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
||||||
Remove-Item -Path ./Version/version.txt
|
|
||||||
Remove-Item -Path ./Version
|
|
||||||
- name: Download Build output
|
|
||||||
uses: actions/download-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Build
|
|
||||||
path: ./
|
|
||||||
- name: Unzip Build file
|
|
||||||
run: |
|
|
||||||
Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\
|
|
||||||
Remove-Item -Path .\*.zip
|
|
||||||
- name: Copy Files to root & delete output directory
|
|
||||||
run: |
|
|
||||||
Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz")
|
|
||||||
Get-ChildItem -Path .\output\* | Copy-Item -Destination .\
|
|
||||||
Remove-Item -Path .\output -Recurse
|
|
||||||
- name: Add nuget.exe
|
|
||||||
uses: nuget/setup-nuget@v1
|
|
||||||
- name: Add Github Packages source
|
|
||||||
run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Add nuget.org API Key
|
|
||||||
run: nuget setApiKey ${{ secrets.NUGET_API_KEY }}
|
|
||||||
- name: Create nuget package
|
|
||||||
run: nuget pack "./PepperDash_Essentials_Core.nuspec" -version ${{ env.VERSION }}
|
|
||||||
- name: Publish nuget package to Github registry
|
|
||||||
run: nuget push **/*.nupkg -source github
|
|
||||||
- name: Publish nuget package to nuget.org
|
|
||||||
run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json
|
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -389,3 +389,4 @@ MigrationBackup/
|
|||||||
# Fody - auto-generated XML schema
|
# Fody - auto-generated XML schema
|
||||||
FodyWeavers.xsd
|
FodyWeavers.xsd
|
||||||
essentials-framework/Essentials Interfaces/PepperDash_Essentials_Interfaces/PepperDash_Essentials_Interfaces.csproj
|
essentials-framework/Essentials Interfaces/PepperDash_Essentials_Interfaces/PepperDash_Essentials_Interfaces.csproj
|
||||||
|
.DS_Store
|
||||||
|
|||||||
34
.releaserc.json
Normal file
34
.releaserc.json
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"plugins": [
|
||||||
|
[
|
||||||
|
"@semantic-release/commit-analyzer",
|
||||||
|
{
|
||||||
|
"releaseRules": [
|
||||||
|
{ "scope": "force-patch", "release": "patch" },
|
||||||
|
{ "scope": "no-release", "release": false }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@semantic-release/release-notes-generator",
|
||||||
|
["@semantic-release/changelog",
|
||||||
|
{
|
||||||
|
"changelogFile": "CHANGELOG.md"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"@semantic-release/exec",
|
||||||
|
{
|
||||||
|
"verifyReleaseCmd": "echo \"newVersion=true\" >> $GITHUB_OUTPUT",
|
||||||
|
"publishCmd": "echo \"version=${nextRelease.version}\" >> $GITHUB_OUTPUT && echo \"tag=${nextRelease.gitTag}\" >> $GITHUB_OUTPUT && echo \"type=${nextRelease.type}\" >> $GITHUB_OUTPUT && echo \"channel=${nextRelease.channel}\" >> $GITHUB_OUTPUT"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"branches": [
|
||||||
|
"maintenance-1x",
|
||||||
|
{
|
||||||
|
"name": "replace-me-feature-branch",
|
||||||
|
"prerelease": "replace-me-prerelease",
|
||||||
|
"channel": "replace-me-prerelease"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -91,8 +91,8 @@ we receive and the availability of resources to evaluate contributions, we antic
|
|||||||
project remains dynamic and relevant. This may affect our responsiveness and ability to accept pull requests
|
project remains dynamic and relevant. This may affect our responsiveness and ability to accept pull requests
|
||||||
quickly. This does not mean we are ignoring them.
|
quickly. This does not mean we are ignoring them.
|
||||||
- Not all innovative ideas need to be accepted as pull requests into this GitHub project to be valuable to the community.
|
- Not all innovative ideas need to be accepted as pull requests into this GitHub project to be valuable to the community.
|
||||||
There may be times when we recommend that you just share your code for some enhancement to Ghidra from your own
|
There may be times when we recommend that you just share your code for some enhancement to Essentials from your own
|
||||||
repository. As we identify and recognize extensions that are of general interest to the reverse engineering community, we
|
repository. As we identify and recognize extensions that are of general interest to Essentials, we
|
||||||
may seek to incorporate them with our baseline.
|
may seek to incorporate them with our baseline.
|
||||||
|
|
||||||
## Legal
|
## Legal
|
||||||
|
|||||||
@@ -1,49 +1,49 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||||
# Visual Studio 2008
|
# Visual Studio 2008
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDashEssentials", "PepperDashEssentials\PepperDashEssentials.csproj", "{1BED5BA9-88C4-4365-9362-6F4B128071D3}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDashEssentials", "src\PepperDashEssentials\PepperDashEssentials.csproj", "{1BED5BA9-88C4-4365-9362-6F4B128071D3}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
{892B761C-E479-44CE-BD74-243E9214AF13} = {892B761C-E479-44CE-BD74-243E9214AF13}
|
{892B761C-E479-44CE-BD74-243E9214AF13} = {892B761C-E479-44CE-BD74-243E9214AF13}
|
||||||
{9199CE8A-0C9F-4952-8672-3EED798B284F} = {9199CE8A-0C9F-4952-8672-3EED798B284F}
|
{9199CE8A-0C9F-4952-8672-3EED798B284F} = {9199CE8A-0C9F-4952-8672-3EED798B284F}
|
||||||
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} = {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}
|
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} = {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDash_Essentials_Core", "essentials-framework\Essentials Core\PepperDashEssentialsBase\PepperDash_Essentials_Core.csproj", "{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDash_Essentials_Core", "src\essentials-framework\Essentials Core\PepperDashEssentialsBase\PepperDash_Essentials_Core.csproj", "{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Essentials Devices Common", "essentials-framework\Essentials Devices Common\Essentials Devices Common\Essentials Devices Common.csproj", "{892B761C-E479-44CE-BD74-243E9214AF13}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Essentials Devices Common", "src\essentials-framework\Essentials Devices Common\Essentials Devices Common\Essentials Devices Common.csproj", "{892B761C-E479-44CE-BD74-243E9214AF13}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} = {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}
|
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} = {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDash_Essentials_DM", "essentials-framework\Essentials DM\Essentials_DM\PepperDash_Essentials_DM.csproj", "{9199CE8A-0C9F-4952-8672-3EED798B284F}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDash_Essentials_DM", "src\essentials-framework\Essentials DM\Essentials_DM\PepperDash_Essentials_DM.csproj", "{9199CE8A-0C9F-4952-8672-3EED798B284F}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} = {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}
|
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} = {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
Release|Any CPU = Release|Any CPU
|
Release|Any CPU = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{1BED5BA9-88C4-4365-9362-6F4B128071D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{1BED5BA9-88C4-4365-9362-6F4B128071D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{1BED5BA9-88C4-4365-9362-6F4B128071D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{1BED5BA9-88C4-4365-9362-6F4B128071D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{1BED5BA9-88C4-4365-9362-6F4B128071D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{1BED5BA9-88C4-4365-9362-6F4B128071D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{1BED5BA9-88C4-4365-9362-6F4B128071D3}.Release|Any CPU.Build.0 = Release|Any CPU
|
{1BED5BA9-88C4-4365-9362-6F4B128071D3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}.Release|Any CPU.Build.0 = Release|Any CPU
|
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{892B761C-E479-44CE-BD74-243E9214AF13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{892B761C-E479-44CE-BD74-243E9214AF13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{892B761C-E479-44CE-BD74-243E9214AF13}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{892B761C-E479-44CE-BD74-243E9214AF13}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{892B761C-E479-44CE-BD74-243E9214AF13}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{892B761C-E479-44CE-BD74-243E9214AF13}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{892B761C-E479-44CE-BD74-243E9214AF13}.Release|Any CPU.Build.0 = Release|Any CPU
|
{892B761C-E479-44CE-BD74-243E9214AF13}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{9199CE8A-0C9F-4952-8672-3EED798B284F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{9199CE8A-0C9F-4952-8672-3EED798B284F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{9199CE8A-0C9F-4952-8672-3EED798B284F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{9199CE8A-0C9F-4952-8672-3EED798B284F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{9199CE8A-0C9F-4952-8672-3EED798B284F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{9199CE8A-0C9F-4952-8672-3EED798B284F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{9199CE8A-0C9F-4952-8672-3EED798B284F}.Release|Any CPU.Build.0 = Release|Any CPU
|
{9199CE8A-0C9F-4952-8672-3EED798B284F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
|
|
||||||
using PepperDash.Essentials.Core;
|
|
||||||
using PepperDash.Essentials.Core.DeviceTypeInterfaces;
|
|
||||||
using PepperDash.Essentials.Room.Config;
|
|
||||||
using PepperDash.Essentials.Core.Devices;
|
|
||||||
using PepperDash.Essentials.Devices.Common.Codec;
|
|
||||||
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
|
||||||
using PepperDash.Essentials.Devices.Common.AudioCodec;
|
|
||||||
|
|
||||||
|
|
||||||
using PepperDash.Core;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials
|
|
||||||
{
|
|
||||||
public interface IEssentialsHuddleSpaceRoom : IEssentialsRoom, IHasCurrentSourceInfoChange, IRunRouteAction, IHasDefaultDisplay
|
|
||||||
{
|
|
||||||
bool ExcludeFromGlobalFunctions { get; }
|
|
||||||
|
|
||||||
void RunRouteAction(string routeKey);
|
|
||||||
|
|
||||||
EssentialsHuddleRoomPropertiesConfig PropertiesConfig { get; }
|
|
||||||
|
|
||||||
IBasicVolumeControls CurrentVolumeControls { get; }
|
|
||||||
|
|
||||||
event EventHandler<VolumeDeviceChangeEventArgs> CurrentVolumeDeviceChange;
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IEssentialsHuddleVtc1Room : IEssentialsRoom, IHasCurrentSourceInfoChange,
|
|
||||||
IHasCurrentVolumeControls, IRunRouteAction, IRunDefaultCallRoute, IHasVideoCodec, IHasAudioCodec, IHasDefaultDisplay
|
|
||||||
{
|
|
||||||
EssentialsHuddleVtc1PropertiesConfig PropertiesConfig { get; }
|
|
||||||
|
|
||||||
void RunRouteAction(string routeKey);
|
|
||||||
|
|
||||||
IHasScheduleAwareness ScheduleSource { get; }
|
|
||||||
|
|
||||||
string DefaultCodecRouteString { get; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,321 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
using Crestron.SimplSharpPro;
|
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
|
||||||
using Crestron.SimplSharpPro.DM;
|
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using PepperDash.Core;
|
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
|
||||||
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public abstract class DisplayBase : EssentialsDevice, IHasFeedback, IRoutingSinkWithSwitching, IHasPowerControl, IWarmingCooling, IUsageTracking, IPower
|
|
||||||
{
|
|
||||||
public event SourceInfoChangeHandler CurrentSourceChange;
|
|
||||||
|
|
||||||
public string CurrentSourceInfoKey { get; set; }
|
|
||||||
public SourceListItem CurrentSourceInfo
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _CurrentSourceInfo;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value == _CurrentSourceInfo) return;
|
|
||||||
|
|
||||||
var handler = CurrentSourceChange;
|
|
||||||
|
|
||||||
if (handler != null)
|
|
||||||
handler(_CurrentSourceInfo, ChangeType.WillChange);
|
|
||||||
|
|
||||||
_CurrentSourceInfo = value;
|
|
||||||
|
|
||||||
if (handler != null)
|
|
||||||
handler(_CurrentSourceInfo, ChangeType.DidChange);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
SourceListItem _CurrentSourceInfo;
|
|
||||||
|
|
||||||
public BoolFeedback IsCoolingDownFeedback { get; protected set; }
|
|
||||||
public BoolFeedback IsWarmingUpFeedback { get; private set; }
|
|
||||||
|
|
||||||
[Obsolete("This property will be removed in version 2.0.0")]
|
|
||||||
public abstract BoolFeedback PowerIsOnFeedback { get; protected set; }
|
|
||||||
|
|
||||||
public UsageTracking UsageTracker { get; set; }
|
|
||||||
|
|
||||||
public uint WarmupTime { get; set; }
|
|
||||||
public uint CooldownTime { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Bool Func that will provide a value for the PowerIsOn Output. Must be implemented
|
|
||||||
/// by concrete sub-classes
|
|
||||||
/// </summary>
|
|
||||||
abstract protected Func<bool> IsCoolingDownFeedbackFunc { get; }
|
|
||||||
abstract protected Func<bool> IsWarmingUpFeedbackFunc { get; }
|
|
||||||
|
|
||||||
|
|
||||||
protected CTimer WarmupTimer;
|
|
||||||
protected CTimer CooldownTimer;
|
|
||||||
|
|
||||||
#region IRoutingInputs Members
|
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
protected DisplayBase(string key, string name)
|
|
||||||
: base(key, name)
|
|
||||||
{
|
|
||||||
IsCoolingDownFeedback = new BoolFeedback("IsCoolingDown", IsCoolingDownFeedbackFunc);
|
|
||||||
IsWarmingUpFeedback = new BoolFeedback("IsWarmingUp", IsWarmingUpFeedbackFunc);
|
|
||||||
|
|
||||||
InputPorts = new RoutingPortCollection<RoutingInputPort>();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract void PowerOn();
|
|
||||||
public abstract void PowerOff();
|
|
||||||
public abstract void PowerToggle();
|
|
||||||
|
|
||||||
public virtual FeedbackCollection<Feedback> Feedbacks
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return new FeedbackCollection<Feedback>
|
|
||||||
{
|
|
||||||
IsCoolingDownFeedback,
|
|
||||||
IsWarmingUpFeedback
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract void ExecuteSwitch(object selector);
|
|
||||||
|
|
||||||
protected void LinkDisplayToApi(DisplayBase displayDevice, BasicTriList trilist, uint joinStart, string joinMapKey,
|
|
||||||
EiscApiAdvanced bridge)
|
|
||||||
{
|
|
||||||
var inputNumber = 0;
|
|
||||||
var inputKeys = new List<string>();
|
|
||||||
|
|
||||||
var joinMap = new DisplayControllerJoinMap(joinStart);
|
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
|
||||||
joinMap = JsonConvert.DeserializeObject<DisplayControllerJoinMap>(joinMapSerialized);
|
|
||||||
|
|
||||||
if (bridge != null)
|
|
||||||
{
|
|
||||||
bridge.AddJoinMap(Key, joinMap);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Console(0,this,"Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
|
||||||
}
|
|
||||||
|
|
||||||
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
|
||||||
Debug.Console(0, "Linking to Display: {0}", displayDevice.Name);
|
|
||||||
|
|
||||||
trilist.StringInput[joinMap.Name.JoinNumber].StringValue = displayDevice.Name;
|
|
||||||
|
|
||||||
var commMonitor = displayDevice as ICommunicationMonitor;
|
|
||||||
if (commMonitor != null)
|
|
||||||
{
|
|
||||||
commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
|
||||||
}
|
|
||||||
|
|
||||||
var inputNumberFeedback = new IntFeedback(() => inputNumber);
|
|
||||||
|
|
||||||
// Two way feedbacks
|
|
||||||
var twoWayDisplay = displayDevice as TwoWayDisplayBase;
|
|
||||||
|
|
||||||
if (twoWayDisplay != null)
|
|
||||||
{
|
|
||||||
trilist.SetBool(joinMap.IsTwoWayDisplay.JoinNumber, true);
|
|
||||||
|
|
||||||
twoWayDisplay.CurrentInputFeedback.OutputChange += (o, a) => Debug.Console(0, "CurrentInputFeedback_OutputChange {0}", a.StringValue);
|
|
||||||
|
|
||||||
|
|
||||||
inputNumberFeedback.LinkInputSig(trilist.UShortInput[joinMap.InputSelect.JoinNumber]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Power Off
|
|
||||||
trilist.SetSigTrueAction(joinMap.PowerOff.JoinNumber, () =>
|
|
||||||
{
|
|
||||||
inputNumber = 102;
|
|
||||||
inputNumberFeedback.FireUpdate();
|
|
||||||
displayDevice.PowerOff();
|
|
||||||
});
|
|
||||||
|
|
||||||
var twoWayDisplayDevice = displayDevice as TwoWayDisplayBase;
|
|
||||||
if (twoWayDisplayDevice != null)
|
|
||||||
{
|
|
||||||
twoWayDisplayDevice.PowerIsOnFeedback.OutputChange += (o, a) =>
|
|
||||||
{
|
|
||||||
if (!a.BoolValue)
|
|
||||||
{
|
|
||||||
inputNumber = 102;
|
|
||||||
inputNumberFeedback.FireUpdate();
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
inputNumber = 0;
|
|
||||||
inputNumberFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
twoWayDisplayDevice.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff.JoinNumber]);
|
|
||||||
twoWayDisplayDevice.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn.JoinNumber]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// PowerOn
|
|
||||||
trilist.SetSigTrueAction(joinMap.PowerOn.JoinNumber, () =>
|
|
||||||
{
|
|
||||||
inputNumber = 0;
|
|
||||||
inputNumberFeedback.FireUpdate();
|
|
||||||
displayDevice.PowerOn();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < displayDevice.InputPorts.Count; i++)
|
|
||||||
{
|
|
||||||
if (i < joinMap.InputNamesOffset.JoinSpan)
|
|
||||||
{
|
|
||||||
inputKeys.Add(displayDevice.InputPorts[i].Key);
|
|
||||||
var tempKey = inputKeys.ElementAt(i);
|
|
||||||
trilist.SetSigTrueAction((ushort)(joinMap.InputSelectOffset.JoinNumber + i),
|
|
||||||
() => displayDevice.ExecuteSwitch(displayDevice.InputPorts[tempKey].Selector));
|
|
||||||
Debug.Console(2, displayDevice, "Setting Input Select Action on Digital Join {0} to Input: {1}",
|
|
||||||
joinMap.InputSelectOffset.JoinNumber + i, displayDevice.InputPorts[tempKey].Key.ToString());
|
|
||||||
trilist.StringInput[(ushort)(joinMap.InputNamesOffset.JoinNumber + i)].StringValue = displayDevice.InputPorts[i].Key.ToString();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Debug.Console(0, displayDevice, Debug.ErrorLogLevel.Warning, "Device has {0} inputs. The Join Map allows up to {1} inputs. Discarding inputs {2} - {3} from bridge.",
|
|
||||||
displayDevice.InputPorts.Count, joinMap.InputNamesOffset.JoinSpan, i + 1, displayDevice.InputPorts.Count);
|
|
||||||
}
|
|
||||||
|
|
||||||
Debug.Console(2, displayDevice, "Setting Input Select Action on Analog Join {0}", joinMap.InputSelect);
|
|
||||||
trilist.SetUShortSigAction(joinMap.InputSelect.JoinNumber, (a) =>
|
|
||||||
{
|
|
||||||
if (a == 0)
|
|
||||||
{
|
|
||||||
displayDevice.PowerOff();
|
|
||||||
inputNumber = 0;
|
|
||||||
}
|
|
||||||
else if (a > 0 && a < displayDevice.InputPorts.Count && a != inputNumber)
|
|
||||||
{
|
|
||||||
displayDevice.ExecuteSwitch(displayDevice.InputPorts.ElementAt(a - 1).Selector);
|
|
||||||
inputNumber = a;
|
|
||||||
}
|
|
||||||
else if (a == 102)
|
|
||||||
{
|
|
||||||
displayDevice.PowerToggle();
|
|
||||||
|
|
||||||
}
|
|
||||||
if (twoWayDisplay != null)
|
|
||||||
inputNumberFeedback.FireUpdate();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
var volumeDisplay = displayDevice as IBasicVolumeControls;
|
|
||||||
if (volumeDisplay == null) return;
|
|
||||||
|
|
||||||
trilist.SetBoolSigAction(joinMap.VolumeUp.JoinNumber, volumeDisplay.VolumeUp);
|
|
||||||
trilist.SetBoolSigAction(joinMap.VolumeDown.JoinNumber, volumeDisplay.VolumeDown);
|
|
||||||
trilist.SetSigTrueAction(joinMap.VolumeMute.JoinNumber, volumeDisplay.MuteToggle);
|
|
||||||
|
|
||||||
var volumeDisplayWithFeedback = volumeDisplay as IBasicVolumeWithFeedback;
|
|
||||||
|
|
||||||
if (volumeDisplayWithFeedback == null) return;
|
|
||||||
trilist.SetSigTrueAction(joinMap.VolumeMuteOn.JoinNumber, volumeDisplayWithFeedback.MuteOn);
|
|
||||||
trilist.SetSigTrueAction(joinMap.VolumeMuteOff.JoinNumber, volumeDisplayWithFeedback.MuteOff);
|
|
||||||
|
|
||||||
|
|
||||||
trilist.SetUShortSigAction(joinMap.VolumeLevel.JoinNumber, volumeDisplayWithFeedback.SetVolume);
|
|
||||||
volumeDisplayWithFeedback.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[joinMap.VolumeLevel.JoinNumber]);
|
|
||||||
volumeDisplayWithFeedback.MuteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VolumeMute.JoinNumber]);
|
|
||||||
volumeDisplayWithFeedback.MuteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VolumeMuteOn.JoinNumber]);
|
|
||||||
volumeDisplayWithFeedback.MuteFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.VolumeMuteOff.JoinNumber]);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public abstract class TwoWayDisplayBase : DisplayBase, IRoutingFeedback, IHasPowerControlWithFeedback
|
|
||||||
{
|
|
||||||
public StringFeedback CurrentInputFeedback { get; private set; }
|
|
||||||
|
|
||||||
abstract protected Func<string> CurrentInputFeedbackFunc { get; }
|
|
||||||
|
|
||||||
public override BoolFeedback PowerIsOnFeedback { get; protected set; }
|
|
||||||
|
|
||||||
abstract protected Func<bool> PowerIsOnFeedbackFunc { get; }
|
|
||||||
|
|
||||||
|
|
||||||
public static MockDisplay DefaultDisplay
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (_DefaultDisplay == null)
|
|
||||||
_DefaultDisplay = new MockDisplay("default", "Default Display");
|
|
||||||
return _DefaultDisplay;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
static MockDisplay _DefaultDisplay;
|
|
||||||
|
|
||||||
public TwoWayDisplayBase(string key, string name)
|
|
||||||
: base(key, name)
|
|
||||||
{
|
|
||||||
CurrentInputFeedback = new StringFeedback(CurrentInputFeedbackFunc);
|
|
||||||
|
|
||||||
WarmupTime = 7000;
|
|
||||||
CooldownTime = 15000;
|
|
||||||
|
|
||||||
PowerIsOnFeedback = new BoolFeedback("PowerOnFeedback", PowerIsOnFeedbackFunc);
|
|
||||||
|
|
||||||
Feedbacks.Add(CurrentInputFeedback);
|
|
||||||
Feedbacks.Add(PowerIsOnFeedback);
|
|
||||||
|
|
||||||
PowerIsOnFeedback.OutputChange += PowerIsOnFeedback_OutputChange;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void PowerIsOnFeedback_OutputChange(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (UsageTracker != null)
|
|
||||||
{
|
|
||||||
if (PowerIsOnFeedback.BoolValue)
|
|
||||||
UsageTracker.StartDeviceUsage();
|
|
||||||
else
|
|
||||||
UsageTracker.EndDeviceUsage();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public event EventHandler<RoutingNumericEventArgs> NumericSwitchChange;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Raise an event when the status of a switch object changes.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="e">Arguments defined as IKeyName sender, output, input, and eRoutingSignalType</param>
|
|
||||||
protected void OnSwitchChange(RoutingNumericEventArgs e)
|
|
||||||
{
|
|
||||||
var newEvent = NumericSwitchChange;
|
|
||||||
if (newEvent != null) newEvent(this, e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
using PepperDash.Core;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// All ISecrecretProvider classes must implement this interface.
|
|
||||||
/// </summary>
|
|
||||||
public interface ISecretProvider : IKeyed
|
|
||||||
{
|
|
||||||
bool SetSecret(string key, object value);
|
|
||||||
|
|
||||||
ISecret GetSecret(string key);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// interface for delivering secrets in Essentials.
|
|
||||||
/// </summary>
|
|
||||||
public interface ISecret
|
|
||||||
{
|
|
||||||
ISecretProvider Provider { get; }
|
|
||||||
string Key { get; }
|
|
||||||
object Value { get; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,144 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
using Crestron.SimplSharpPro;
|
|
||||||
|
|
||||||
using PepperDash.Core;
|
|
||||||
using PepperDash.Essentials.Core;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Touchpanels
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// A wrapper class for the touchpanel portion of an MPC3 class process to allow for configurable
|
|
||||||
/// behavior of the keybad buttons
|
|
||||||
/// </summary>
|
|
||||||
public class Mpc3TouchpanelController : Device
|
|
||||||
{
|
|
||||||
MPC3Basic _Touchpanel;
|
|
||||||
|
|
||||||
Dictionary<string, KeypadButton> _Buttons;
|
|
||||||
|
|
||||||
public Mpc3TouchpanelController(string key, string name, CrestronControlSystem processor, Dictionary<string, KeypadButton> buttons)
|
|
||||||
: base(key, name)
|
|
||||||
{
|
|
||||||
_Touchpanel = processor.ControllerTouchScreenSlotDevice as MPC3Basic;
|
|
||||||
_Buttons = buttons;
|
|
||||||
|
|
||||||
_Touchpanel.ButtonStateChange += new Crestron.SimplSharpPro.DeviceSupport.ButtonEventHandler(_Touchpanel_ButtonStateChange);
|
|
||||||
|
|
||||||
AddPostActivationAction(() =>
|
|
||||||
{
|
|
||||||
// Link up the button feedbacks to the specified BoolFeedbacks
|
|
||||||
foreach (var button in _Buttons)
|
|
||||||
{
|
|
||||||
var feedbackConfig = button.Value.Feedback;
|
|
||||||
var device = DeviceManager.GetDeviceForKey(feedbackConfig.DeviceKey) as Device;
|
|
||||||
if (device != null)
|
|
||||||
{
|
|
||||||
var bKey = button.Key.ToLower();
|
|
||||||
|
|
||||||
var feedback = device.GetFeedbackProperty(feedbackConfig.FeedbackName);
|
|
||||||
|
|
||||||
var bFeedback = feedback as BoolFeedback;
|
|
||||||
var iFeedback = feedback as IntFeedback;
|
|
||||||
if (bFeedback != null)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (bKey == "power")
|
|
||||||
{
|
|
||||||
bFeedback.LinkCrestronFeedback(_Touchpanel.FeedbackPower);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else if (bKey == "mute")
|
|
||||||
{
|
|
||||||
bFeedback.LinkCrestronFeedback(_Touchpanel.FeedbackMute);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Link to the Crestron Feedback corresponding to the button number
|
|
||||||
bFeedback.LinkCrestronFeedback(_Touchpanel.Feedbacks[UInt16.Parse(button.Key)]);
|
|
||||||
}
|
|
||||||
else if (iFeedback != null)
|
|
||||||
{
|
|
||||||
if (bKey == "volumefeedback")
|
|
||||||
{
|
|
||||||
var volFeedback = feedback as IntFeedback;
|
|
||||||
// TODO: Figure out how to subsribe to a volume IntFeedback and link it to the voluem
|
|
||||||
volFeedback.LinkInputSig(_Touchpanel.VolumeBargraph);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Console(1, this, "Unable to get BoolFeedback with name: {0} from device: {1}", feedbackConfig.FeedbackName, device.Key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Console(1, this, "Unable to get device with key: {0}", feedbackConfig.DeviceKey);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
void _Touchpanel_ButtonStateChange(GenericBase device, Crestron.SimplSharpPro.DeviceSupport.ButtonEventArgs args)
|
|
||||||
{
|
|
||||||
Debug.Console(1, this, "Button {0} ({1}), {2}", args.Button.Number, args.Button.Name, args.NewButtonState);
|
|
||||||
var type = args.NewButtonState.ToString();
|
|
||||||
|
|
||||||
if (_Buttons.ContainsKey(args.Button.Number.ToString()))
|
|
||||||
{
|
|
||||||
Press(args.Button.Number.ToString(), type);
|
|
||||||
}
|
|
||||||
else if(_Buttons.ContainsKey(args.Button.Name.ToString()))
|
|
||||||
{
|
|
||||||
Press(args.Button.Name.ToString(), type);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Runs the function associated with this button/type. One of the following strings:
|
|
||||||
/// Pressed, Released, Tapped, DoubleTapped, Held, HeldReleased
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="number"></param>
|
|
||||||
/// <param name="type"></param>
|
|
||||||
public void Press(string number, string type)
|
|
||||||
{
|
|
||||||
// TODO: In future, consider modifying this to generate actions at device activation time
|
|
||||||
// to prevent the need to dynamically call the method via reflection on each button press
|
|
||||||
if (!_Buttons.ContainsKey(number)) { return; }
|
|
||||||
var but = _Buttons[number];
|
|
||||||
if (but.EventTypes.ContainsKey(type))
|
|
||||||
{
|
|
||||||
foreach (var a in but.EventTypes[type]) { DeviceJsonApi.DoDeviceAction(a); }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Represents the configuration of a keybad buggon
|
|
||||||
/// </summary>
|
|
||||||
public class KeypadButton
|
|
||||||
{
|
|
||||||
public Dictionary<string, DeviceActionWrapper[]> EventTypes { get; set; }
|
|
||||||
public KeypadButtonFeedback Feedback { get; set; }
|
|
||||||
|
|
||||||
public KeypadButton()
|
|
||||||
{
|
|
||||||
EventTypes = new Dictionary<string, DeviceActionWrapper[]>();
|
|
||||||
Feedback = new KeypadButtonFeedback();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public class KeypadButtonFeedback
|
|
||||||
{
|
|
||||||
public string DeviceKey { get; set; }
|
|
||||||
public string FeedbackName { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,196 +0,0 @@
|
|||||||
using Crestron.SimplSharpPro;
|
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
|
||||||
using Crestron.SimplSharpPro.DM;
|
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
|
||||||
using PepperDash.Core;
|
|
||||||
using PepperDash.Essentials.Core;
|
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.DM
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
[Description("Wrapper Class for DM-RMC-4K-SCALER-C")]
|
|
||||||
public class DmRmc4kScalerCController : DmRmcControllerBase, IRoutingInputsOutputs, IBasicVolumeWithFeedback,
|
|
||||||
IIROutputPorts, IComPorts, ICec, IRelayPorts
|
|
||||||
{
|
|
||||||
private readonly DmRmc4kScalerC _rmc;
|
|
||||||
|
|
||||||
public RoutingInputPort DmIn { get; private set; }
|
|
||||||
public RoutingOutputPort HdmiOut { get; private set; }
|
|
||||||
public RoutingOutputPort BalancedAudioOut { get; private set; }
|
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Make a Crestron RMC and put it in here
|
|
||||||
/// </summary>
|
|
||||||
public DmRmc4kScalerCController(string key, string name, DmRmc4kScalerC rmc)
|
|
||||||
: base(key, name, rmc)
|
|
||||||
{
|
|
||||||
_rmc = rmc;
|
|
||||||
|
|
||||||
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
|
||||||
eRoutingPortConnectionType.DmCat, 0, this);
|
|
||||||
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
|
||||||
BalancedAudioOut = new RoutingOutputPort(DmPortName.BalancedAudioOut, eRoutingSignalType.Audio,
|
|
||||||
eRoutingPortConnectionType.LineAudio, null, this);
|
|
||||||
|
|
||||||
MuteFeedback = new BoolFeedback(() => false);
|
|
||||||
|
|
||||||
VolumeLevelFeedback = new IntFeedback("MainVolumeLevelFeedback", () =>
|
|
||||||
rmc.AudioOutput.VolumeFeedback.UShortValue);
|
|
||||||
|
|
||||||
EdidManufacturerFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
|
||||||
EdidNameFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
|
||||||
EdidPreferredTimingFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
|
||||||
EdidSerialNumberFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
|
||||||
|
|
||||||
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
|
||||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut, BalancedAudioOut};
|
|
||||||
|
|
||||||
VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString());
|
|
||||||
|
|
||||||
_rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
|
||||||
_rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
|
||||||
|
|
||||||
// Set Ports for CEC
|
|
||||||
HdmiOut.Port = _rmc.HdmiOutput;
|
|
||||||
}
|
|
||||||
|
|
||||||
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
|
|
||||||
{
|
|
||||||
if (args.EventId == EndpointOutputStreamEventIds.HorizontalResolutionFeedbackEventId || args.EventId == EndpointOutputStreamEventIds.VerticalResolutionFeedbackEventId ||
|
|
||||||
args.EventId == EndpointOutputStreamEventIds.FramesPerSecondFeedbackEventId)
|
|
||||||
{
|
|
||||||
VideoOutputResolutionFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
|
||||||
{
|
|
||||||
switch (args.EventId)
|
|
||||||
{
|
|
||||||
case ConnectedDeviceEventIds.ManufacturerEventId:
|
|
||||||
EdidManufacturerFeedback.FireUpdate();
|
|
||||||
break;
|
|
||||||
case ConnectedDeviceEventIds.NameEventId:
|
|
||||||
EdidNameFeedback.FireUpdate();
|
|
||||||
break;
|
|
||||||
case ConnectedDeviceEventIds.PreferredTimingEventId:
|
|
||||||
EdidPreferredTimingFeedback.FireUpdate();
|
|
||||||
break;
|
|
||||||
case ConnectedDeviceEventIds.SerialNumberEventId:
|
|
||||||
EdidSerialNumberFeedback.FireUpdate();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
|
||||||
{
|
|
||||||
LinkDmRmcToApi(this, trilist, joinStart, joinMapKey, bridge);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region IIROutputPorts Members
|
|
||||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return _rmc.IROutputPorts; } }
|
|
||||||
public int NumberOfIROutputPorts { get { return _rmc.NumberOfIROutputPorts; } }
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IComPorts Members
|
|
||||||
public CrestronCollection<ComPort> ComPorts { get { return _rmc.ComPorts; } }
|
|
||||||
public int NumberOfComPorts { get { return _rmc.NumberOfComPorts; } }
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region ICec Members
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the CEC stream directly from the HDMI port.
|
|
||||||
/// </summary>
|
|
||||||
public Cec StreamCec { get { return _rmc.HdmiOutput.StreamCec; } }
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IRelayPorts Members
|
|
||||||
|
|
||||||
public int NumberOfRelayPorts
|
|
||||||
{
|
|
||||||
get { return _rmc.NumberOfRelayPorts; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public CrestronCollection<Relay> RelayPorts
|
|
||||||
{
|
|
||||||
get { return _rmc.RelayPorts; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IBasicVolumeWithFeedback Members
|
|
||||||
|
|
||||||
public BoolFeedback MuteFeedback
|
|
||||||
{
|
|
||||||
get;
|
|
||||||
private set;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Not implemented
|
|
||||||
/// </summary>
|
|
||||||
public void MuteOff()
|
|
||||||
{
|
|
||||||
Debug.Console(2, this, "DM Endpoint {0} does not have a mute function", Key);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Not implemented
|
|
||||||
/// </summary>
|
|
||||||
public void MuteOn()
|
|
||||||
{
|
|
||||||
Debug.Console(2, this, "DM Endpoint {0} does not have a mute function", Key);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetVolume(ushort level)
|
|
||||||
{
|
|
||||||
_rmc.AudioOutput.Volume.UShortValue = level;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IntFeedback VolumeLevelFeedback
|
|
||||||
{
|
|
||||||
get;
|
|
||||||
private set;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IBasicVolumeControls Members
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Not implemented
|
|
||||||
/// </summary>
|
|
||||||
public void MuteToggle()
|
|
||||||
{
|
|
||||||
Debug.Console(2, this, "DM Endpoint {0} does not have a mute function", Key);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void VolumeDown(bool pressRelease)
|
|
||||||
{
|
|
||||||
if (pressRelease)
|
|
||||||
SigHelper.RampTimeScaled(_rmc.AudioOutput.Volume, 0, 4000);
|
|
||||||
else
|
|
||||||
_rmc.AudioOutput.Volume.StopRamp();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void VolumeUp(bool pressRelease)
|
|
||||||
{
|
|
||||||
if (pressRelease)
|
|
||||||
SigHelper.RampTimeScaled(_rmc.AudioOutput.Volume, 65535, 4000);
|
|
||||||
else
|
|
||||||
_rmc.AudioOutput.Volume.StopRamp();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,416 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
using Crestron.SimplSharpPro;
|
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
|
||||||
using Crestron.SimplSharpPro.DM;
|
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using PepperDash.Core;
|
|
||||||
using PepperDash.Essentials.Core;
|
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
|
||||||
using PepperDash.Essentials.DM.Config;
|
|
||||||
using PepperDash.Essentials.Core.Config;
|
|
||||||
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.DM
|
|
||||||
{
|
|
||||||
public class DmTxHelper
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// A factory method for various DmTxControllers
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <param name="name"></param>
|
|
||||||
/// <param name="props"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static BasicDmTxControllerBase GetDmTxController(string key, string name, string typeName, DmTxPropertiesConfig props)
|
|
||||||
{
|
|
||||||
// switch on type name... later...
|
|
||||||
|
|
||||||
typeName = typeName.ToLower();
|
|
||||||
//uint ipid = Convert.ToUInt16(props.Id, 16);
|
|
||||||
var ipid = props.Control.IpIdInt;
|
|
||||||
var pKey = props.ParentDeviceKey.ToLower();
|
|
||||||
|
|
||||||
if (pKey == "processor")
|
|
||||||
{
|
|
||||||
// Catch constructor failures, mainly dues to IPID
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if(typeName.StartsWith("dmtx200"))
|
|
||||||
return new DmTx200Controller(key, name, new DmTx200C2G(ipid, Global.ControlSystem));
|
|
||||||
if (typeName.StartsWith("dmtx4kz100"))
|
|
||||||
return new DmTx4kz100Controller(key, name, new DmTx4kz100C1G(ipid, Global.ControlSystem));
|
|
||||||
if (typeName.StartsWith("dmtx201c"))
|
|
||||||
return new DmTx201CController(key, name, new DmTx201C(ipid, Global.ControlSystem));
|
|
||||||
if (typeName.StartsWith("dmtx201s"))
|
|
||||||
return new DmTx201SController(key, name, new DmTx201S(ipid, Global.ControlSystem));
|
|
||||||
if (typeName.StartsWith("dmtx4k202"))
|
|
||||||
return new DmTx4k202CController(key, name, new DmTx4k202C(ipid, Global.ControlSystem));
|
|
||||||
if (typeName.StartsWith("dmtx4kz202"))
|
|
||||||
return new DmTx4kz202CController(key, name, new DmTx4kz202C(ipid, Global.ControlSystem));
|
|
||||||
if (typeName.StartsWith("dmtx4k302"))
|
|
||||||
return new DmTx4k302CController(key, name, new DmTx4k302C(ipid, Global.ControlSystem));
|
|
||||||
if (typeName.StartsWith("dmtx4kz302"))
|
|
||||||
return new DmTx4kz302CController(key, name, new DmTx4kz302C(ipid, Global.ControlSystem));
|
|
||||||
if (typeName.StartsWith("dmtx401"))
|
|
||||||
return new DmTx401CController(key, name, new DmTx401C(ipid, Global.ControlSystem));
|
|
||||||
Debug.Console(0, "{1} WARNING: Cannot create DM-TX of type: '{0}'", typeName, key);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
Debug.Console(0, "[{0}] WARNING: Cannot create DM-TX device: {1}", key, e);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
var parentDev = DeviceManager.GetDeviceForKey(pKey);
|
|
||||||
DMInput dmInput;
|
|
||||||
bool isCpu3 = false;
|
|
||||||
|
|
||||||
if (parentDev is IDmSwitch)
|
|
||||||
{
|
|
||||||
// Get the Crestron chassis and link stuff up
|
|
||||||
var switchDev = (parentDev as IDmSwitch);
|
|
||||||
var chassis = switchDev.Chassis;
|
|
||||||
|
|
||||||
//Check that the input is within range of this chassis' possible inputs
|
|
||||||
var num = props.ParentInputNumber;
|
|
||||||
if (num <= 0 || num > chassis.NumberOfInputs)
|
|
||||||
{
|
|
||||||
Debug.Console(0, "Cannot create DM device '{0}'. Input number '{1}' is out of range",
|
|
||||||
key, num);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
switchDev.TxDictionary.Add(num, key);
|
|
||||||
dmInput = chassis.Inputs[num];
|
|
||||||
|
|
||||||
//Determine if IpId is needed for this chassis type
|
|
||||||
if (chassis is DmMd8x8Cpu3 || chassis is DmMd16x16Cpu3 ||
|
|
||||||
chassis is DmMd32x32Cpu3 || chassis is DmMd8x8Cpu3rps ||
|
|
||||||
chassis is DmMd16x16Cpu3rps || chassis is DmMd32x32Cpu3rps ||
|
|
||||||
chassis is DmMd128x128 || chassis is DmMd64x64)
|
|
||||||
{
|
|
||||||
isCpu3 = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else if(parentDev is DmpsRoutingController)
|
|
||||||
{
|
|
||||||
// Get the DMPS chassis and link stuff up
|
|
||||||
var dmpsDev = (parentDev as DmpsRoutingController);
|
|
||||||
var chassis = dmpsDev.Dmps;
|
|
||||||
|
|
||||||
//Check that the input is within range of this chassis' possible inputs
|
|
||||||
var num = props.ParentInputNumber;
|
|
||||||
if (num <= 0 || num > chassis.SwitcherInputs.Count)
|
|
||||||
{
|
|
||||||
Debug.Console(0, "Cannot create DMPS device '{0}'. Input number '{1}' is out of range",
|
|
||||||
key, num);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
dmpsDev.TxDictionary.Add(num, key);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
dmInput = chassis.SwitcherInputs[num] as DMInput;
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
Debug.Console(0, "Cannot create DMPS device '{0}'. Input number '{1}' is not a DM input", key, num);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Console(0, "Cannot create DM device '{0}'. '{1}' is not a processor, DM Chassis or DMPS.", key, pKey);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// Must use different constructor for CPU3 or DMPS3-4K types. No IPID
|
|
||||||
if (isCpu3 || Global.ControlSystemIsDmps4kType)
|
|
||||||
{
|
|
||||||
if (typeName.StartsWith("dmtx200"))
|
|
||||||
return new DmTx200Controller(key, name, new DmTx200C2G(dmInput));
|
|
||||||
if (typeName.StartsWith("dmtx201c"))
|
|
||||||
return new DmTx201CController(key, name, new DmTx201C(dmInput));
|
|
||||||
if (typeName.StartsWith("dmtx201s"))
|
|
||||||
return new DmTx201SController(key, name, new DmTx201S(dmInput));
|
|
||||||
if (typeName.StartsWith("dmtx4k100"))
|
|
||||||
return new DmTx4k100Controller(key, name, new DmTx4K100C1G(dmInput));
|
|
||||||
if (typeName.StartsWith("dmtx4kz100"))
|
|
||||||
return new DmTx4kz100Controller(key, name, new DmTx4kz100C1G(dmInput));
|
|
||||||
if (typeName.StartsWith("dmtx4k202"))
|
|
||||||
return new DmTx4k202CController(key, name, new DmTx4k202C(dmInput));
|
|
||||||
if (typeName.StartsWith("dmtx4kz202"))
|
|
||||||
return new DmTx4kz202CController(key, name, new DmTx4kz202C(dmInput));
|
|
||||||
if (typeName.StartsWith("dmtx4k302"))
|
|
||||||
return new DmTx4k302CController(key, name, new DmTx4k302C(dmInput));
|
|
||||||
if (typeName.StartsWith("dmtx4kz302"))
|
|
||||||
return new DmTx4kz302CController(key, name, new DmTx4kz302C(dmInput));
|
|
||||||
if (typeName.StartsWith("dmtx401"))
|
|
||||||
return new DmTx401CController(key, name, new DmTx401C(dmInput));
|
|
||||||
if (typeName.StartsWith("hdbasettx"))
|
|
||||||
return new HDBaseTTxController(key, name, new HDTx3CB(dmInput));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (typeName.StartsWith("dmtx200"))
|
|
||||||
return new DmTx200Controller(key, name, new DmTx200C2G(ipid, dmInput));
|
|
||||||
if (typeName.StartsWith("dmtx201c"))
|
|
||||||
return new DmTx201CController(key, name, new DmTx201C(ipid, dmInput));
|
|
||||||
if (typeName.StartsWith("dmtx201s"))
|
|
||||||
return new DmTx201SController(key, name, new DmTx201S(ipid, dmInput));
|
|
||||||
if (typeName.StartsWith("dmtx4k100"))
|
|
||||||
return new DmTx4k100Controller(key, name, new DmTx4K100C1G(ipid, dmInput));
|
|
||||||
if (typeName.StartsWith("dmtx4kz100"))
|
|
||||||
return new DmTx4kz100Controller(key, name, new DmTx4kz100C1G(ipid, dmInput));
|
|
||||||
if (typeName.StartsWith("dmtx4k202"))
|
|
||||||
return new DmTx4k202CController(key, name, new DmTx4k202C(ipid, dmInput));
|
|
||||||
if (typeName.StartsWith("dmtx4kz202"))
|
|
||||||
return new DmTx4kz202CController(key, name, new DmTx4kz202C(ipid, dmInput));
|
|
||||||
if (typeName.StartsWith("dmtx4k302"))
|
|
||||||
return new DmTx4k302CController(key, name, new DmTx4k302C(ipid, dmInput));
|
|
||||||
if (typeName.StartsWith("dmtx4kz302"))
|
|
||||||
return new DmTx4kz302CController(key, name, new DmTx4kz302C(ipid, dmInput));
|
|
||||||
if (typeName.StartsWith("dmtx401"))
|
|
||||||
return new DmTx401CController(key, name, new DmTx401C(ipid, dmInput));
|
|
||||||
if (typeName.StartsWith("hdbasettx"))
|
|
||||||
return new HDBaseTTxController(key, name, new HDTx3CB(ipid, dmInput));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
Debug.Console(0, "[{0}] WARNING: Cannot create DM-TX device: {1}", key, e);
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract class BasicDmTxControllerBase : CrestronGenericBridgeableBaseDevice
|
|
||||||
{
|
|
||||||
protected BasicDmTxControllerBase(string key, string name, GenericBase hardware)
|
|
||||||
: base(key, name, hardware)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
[Description("Wrapper class for all DM-TX variants")]
|
|
||||||
public abstract class DmTxControllerBase : BasicDmTxControllerBase
|
|
||||||
{
|
|
||||||
public virtual void SetPortHdcpCapability(eHdcpCapabilityType hdcpMode, uint port) { }
|
|
||||||
public virtual eHdcpCapabilityType HdcpSupportCapability { get; protected set; }
|
|
||||||
public abstract StringFeedback ActiveVideoInputFeedback { get; protected set; }
|
|
||||||
public RoutingInputPortWithVideoStatuses AnyVideoInput { get; protected set; }
|
|
||||||
public IntFeedback HdcpStateFeedback { get; protected set; }
|
|
||||||
|
|
||||||
protected DmTxControllerBase(string key, string name, EndpointTransmitterBase hardware)
|
|
||||||
: base(key, name, hardware)
|
|
||||||
{
|
|
||||||
// if wired to a chassis or DMPS, skip registration step in base class
|
|
||||||
if (hardware.DMInput != null || (Global.ControlSystemIsDmpsType && hardware.DMInput != null))
|
|
||||||
{
|
|
||||||
this.PreventRegistration = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
AddToFeedbackList(ActiveVideoInputFeedback);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected DmTxControllerBase(string key, string name, DmHDBasedTEndPoint hardware) : base(key, name, hardware)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
protected DmTxControllerJoinMap GetDmTxJoinMap(uint joinStart, string joinMapKey)
|
|
||||||
{
|
|
||||||
var joinMap = new DmTxControllerJoinMap(joinStart);
|
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
|
||||||
joinMap = JsonConvert.DeserializeObject<DmTxControllerJoinMap>(joinMapSerialized);
|
|
||||||
|
|
||||||
return joinMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void LinkDmTxToApi(DmTxControllerBase tx, BasicTriList trilist, DmTxControllerJoinMap joinMap, EiscApiAdvanced bridge)
|
|
||||||
{
|
|
||||||
if (bridge != null)
|
|
||||||
{
|
|
||||||
bridge.AddJoinMap(Key, joinMap);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
|
||||||
}
|
|
||||||
|
|
||||||
Debug.Console(1, tx, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
|
||||||
|
|
||||||
tx.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
|
||||||
tx.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber]);
|
|
||||||
tx.AnyVideoInput.VideoStatus.VideoResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentInputResolution.JoinNumber]);
|
|
||||||
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber].UShortValue = (ushort)tx.HdcpSupportCapability;
|
|
||||||
trilist.StringInput[joinMap.Name.JoinNumber].StringValue = tx.Name;
|
|
||||||
|
|
||||||
bool hdcpTypeSimple;
|
|
||||||
|
|
||||||
if (tx.Hardware is DmTx4kX02CBase)
|
|
||||||
hdcpTypeSimple = false;
|
|
||||||
else
|
|
||||||
hdcpTypeSimple = true;
|
|
||||||
|
|
||||||
if (tx is ITxRouting)
|
|
||||||
{
|
|
||||||
var txR = tx as ITxRouting;
|
|
||||||
|
|
||||||
trilist.SetUShortSigAction(joinMap.VideoInput.JoinNumber,
|
|
||||||
i => txR.ExecuteNumericSwitch(i, 0, eRoutingSignalType.Video));
|
|
||||||
trilist.SetUShortSigAction(joinMap.AudioInput.JoinNumber,
|
|
||||||
i => txR.ExecuteNumericSwitch(i, 0, eRoutingSignalType.Audio));
|
|
||||||
|
|
||||||
txR.VideoSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoInput.JoinNumber]);
|
|
||||||
txR.AudioSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.AudioInput.JoinNumber]);
|
|
||||||
|
|
||||||
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber].UShortValue = (ushort)tx.HdcpSupportCapability;
|
|
||||||
|
|
||||||
if (txR.InputPorts[DmPortName.HdmiIn] != null)
|
|
||||||
{
|
|
||||||
var inputPort = txR.InputPorts[DmPortName.HdmiIn];
|
|
||||||
|
|
||||||
if (tx.Feedbacks["HdmiInHdcpCapability"] != null)
|
|
||||||
{
|
|
||||||
var intFeedback = tx.Feedbacks["HdmiInHdcpCapability"] as IntFeedback;
|
|
||||||
if (intFeedback != null)
|
|
||||||
intFeedback.LinkInputSig(trilist.UShortInput[joinMap.Port1HdcpState.JoinNumber]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inputPort.ConnectionType == eRoutingPortConnectionType.Hdmi && inputPort.Port != null)
|
|
||||||
{
|
|
||||||
var port = inputPort.Port as EndpointHdmiInput;
|
|
||||||
|
|
||||||
SetHdcpCapabilityAction(hdcpTypeSimple, port, joinMap.Port1HdcpState.JoinNumber, trilist);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (txR.InputPorts[DmPortName.HdmiIn1] != null)
|
|
||||||
{
|
|
||||||
var inputPort = txR.InputPorts[DmPortName.HdmiIn1];
|
|
||||||
|
|
||||||
if (tx.Feedbacks["HdmiIn1HdcpCapability"] != null)
|
|
||||||
{
|
|
||||||
var intFeedback = tx.Feedbacks["HdmiIn1HdcpCapability"] as IntFeedback;
|
|
||||||
if (intFeedback != null)
|
|
||||||
intFeedback.LinkInputSig(trilist.UShortInput[joinMap.Port1HdcpState.JoinNumber]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inputPort.ConnectionType == eRoutingPortConnectionType.Hdmi && inputPort.Port != null)
|
|
||||||
{
|
|
||||||
var port = inputPort.Port as EndpointHdmiInput;
|
|
||||||
|
|
||||||
SetHdcpCapabilityAction(hdcpTypeSimple, port, joinMap.Port1HdcpState.JoinNumber, trilist);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (txR.InputPorts[DmPortName.HdmiIn2] != null)
|
|
||||||
{
|
|
||||||
var inputPort = txR.InputPorts[DmPortName.HdmiIn2];
|
|
||||||
|
|
||||||
if (tx.Feedbacks["HdmiIn2HdcpCapability"] != null)
|
|
||||||
{
|
|
||||||
var intFeedback = tx.Feedbacks["HdmiIn2HdcpCapability"] as IntFeedback;
|
|
||||||
if (intFeedback != null)
|
|
||||||
intFeedback.LinkInputSig(trilist.UShortInput[joinMap.Port1HdcpState.JoinNumber]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inputPort.ConnectionType == eRoutingPortConnectionType.Hdmi && inputPort.Port != null)
|
|
||||||
{
|
|
||||||
var port = inputPort.Port as EndpointHdmiInput;
|
|
||||||
|
|
||||||
SetHdcpCapabilityAction(hdcpTypeSimple, port, joinMap.Port2HdcpState.JoinNumber, trilist);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
var txFreeRun = tx as IHasFreeRun;
|
|
||||||
if (txFreeRun != null)
|
|
||||||
{
|
|
||||||
txFreeRun.FreeRunEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.FreeRunEnabled.JoinNumber]);
|
|
||||||
trilist.SetBoolSigAction(joinMap.FreeRunEnabled.JoinNumber, txFreeRun.SetFreeRunEnabled);
|
|
||||||
}
|
|
||||||
|
|
||||||
var txVga = tx as IVgaBrightnessContrastControls;
|
|
||||||
{
|
|
||||||
if (txVga == null) return;
|
|
||||||
|
|
||||||
txVga.VgaBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.VgaBrightness.JoinNumber]);
|
|
||||||
txVga.VgaContrastFeedback.LinkInputSig(trilist.UShortInput[joinMap.VgaContrast.JoinNumber]);
|
|
||||||
|
|
||||||
trilist.SetUShortSigAction(joinMap.VgaBrightness.JoinNumber, txVga.SetVgaBrightness);
|
|
||||||
trilist.SetUShortSigAction(joinMap.VgaContrast.JoinNumber, txVga.SetVgaContrast);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SetHdcpCapabilityAction(bool hdcpTypeSimple, EndpointHdmiInput port, uint join, BasicTriList trilist)
|
|
||||||
{
|
|
||||||
if (hdcpTypeSimple)
|
|
||||||
{
|
|
||||||
trilist.SetUShortSigAction(join,
|
|
||||||
s =>
|
|
||||||
{
|
|
||||||
if (s == 0)
|
|
||||||
{
|
|
||||||
port.HdcpSupportOff();
|
|
||||||
}
|
|
||||||
else if (s > 0)
|
|
||||||
{
|
|
||||||
port.HdcpSupportOn();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
trilist.SetUShortSigAction(join,
|
|
||||||
s =>
|
|
||||||
{
|
|
||||||
port.HdcpCapability = (eHdcpCapabilityType)s;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class DmTxControllerFactory : EssentialsDeviceFactory<DmTxControllerBase>
|
|
||||||
{
|
|
||||||
public DmTxControllerFactory()
|
|
||||||
{
|
|
||||||
TypeNames = new List<string>() { "dmtx200c", "dmtx201c", "dmtx201s", "dmtx4k100c", "dmtx4k202c", "dmtx4kz202c", "dmtx4k302c", "dmtx4kz302c",
|
|
||||||
"dmtx401c", "dmtx401s", "dmtx4k100c1g", "dmtx4kz100c1g", "hdbasettx" };
|
|
||||||
}
|
|
||||||
|
|
||||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
|
||||||
{
|
|
||||||
var type = dc.Type.ToLower();
|
|
||||||
|
|
||||||
Debug.Console(1, "Factory Attempting to create new DM-TX Device");
|
|
||||||
|
|
||||||
var props = JsonConvert.DeserializeObject
|
|
||||||
<PepperDash.Essentials.DM.Config.DmTxPropertiesConfig>(dc.Properties.ToString());
|
|
||||||
return PepperDash.Essentials.DM.DmTxHelper.GetDmTxController(dc.Key, dc.Name, type, props);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
|
|
||||||
using PepperDash.Core;
|
|
||||||
using PepperDash.Essentials.Core.Presets;
|
|
||||||
using PepperDash.Essentials.Devices.Common.VideoCodec.Cisco;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interface for camera presets
|
|
||||||
/// </summary>
|
|
||||||
public interface IHasCodecRoomPresets
|
|
||||||
{
|
|
||||||
event EventHandler<EventArgs> CodecRoomPresetsListHasChanged;
|
|
||||||
|
|
||||||
List<CodecRoomPreset> NearEndPresets { get; }
|
|
||||||
|
|
||||||
List<CodecRoomPreset> FarEndRoomPresets { get; }
|
|
||||||
|
|
||||||
void CodecRoomPresetSelect(int preset);
|
|
||||||
|
|
||||||
void CodecRoomPresetStore(int preset, string description);
|
|
||||||
|
|
||||||
void SelectFarEndPreset(int preset);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class RoomPresets
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Converts Cisco RoomPresets to generic CameraPresets
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="presets"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static List<CodecRoomPreset> GetGenericPresets(List<CiscoCodecStatus.RoomPreset> presets)
|
|
||||||
{
|
|
||||||
var cameraPresets = new List<CodecRoomPreset>();
|
|
||||||
|
|
||||||
if (Debug.Level > 0)
|
|
||||||
{
|
|
||||||
Debug.Console(1, "Presets List:");
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (CiscoCodecStatus.RoomPreset preset in presets)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var cameraPreset = new CodecRoomPreset(UInt16.Parse(preset.id), preset.Description.Value, preset.Defined.BoolValue, true);
|
|
||||||
|
|
||||||
cameraPresets.Add(cameraPreset);
|
|
||||||
|
|
||||||
if (Debug.Level > 0)
|
|
||||||
{
|
|
||||||
Debug.Console(1, "Added Preset ID: {0}, Description: {1}, IsDefined: {2}, isDefinable: {3}", cameraPreset.ID, cameraPreset.Description, cameraPreset.Defined, cameraPreset.IsDefinable);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
Debug.Console(2, "Unable to convert preset: {0}. Error: {1}", preset.id, e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return cameraPresets;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Represents a room preset on a video codec. Typically stores camera position(s) and video routing. Can be recalled by Far End if enabled.
|
|
||||||
/// </summary>
|
|
||||||
public class CodecRoomPreset : PresetBase
|
|
||||||
{
|
|
||||||
public CodecRoomPreset(int id, string description, bool def, bool isDef)
|
|
||||||
: base(id, description, def, isDef)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
<packages>
|
<packages>
|
||||||
<package id="PepperDashCore" version="1.1.1-rc-247" targetFramework="net35" allowedVersions="[1.0,2.0)"/>
|
<package id="PepperDashCore" version="1.4.0" targetFramework="net35" allowedVersions="[1.0,2.0)"/>
|
||||||
</packages>
|
</packages>
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ namespace PepperDash.Essentials
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// DSP format: deviceKey--levelName, biampTesira-1--master
|
// DSP/DMPS format: deviceKey--levelName, biampTesira-1--master
|
||||||
match = Regex.Match(DeviceKey, @"([-_\w]+)--(.+)");
|
match = Regex.Match(DeviceKey, @"([-_\w]+)--(.+)");
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
{
|
{
|
||||||
@@ -67,6 +67,27 @@ namespace PepperDash.Essentials
|
|||||||
if (dsp.LevelControlPoints.ContainsKey(levelTag)) // should always...
|
if (dsp.LevelControlPoints.ContainsKey(levelTag)) // should always...
|
||||||
return dsp.LevelControlPoints[levelTag];
|
return dsp.LevelControlPoints[levelTag];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var dmps = DeviceManager.GetDeviceForKey(devKey) as DmpsAudioOutputController;
|
||||||
|
if (dmps != null)
|
||||||
|
{
|
||||||
|
var levelTag = match.Groups[2].Value;
|
||||||
|
switch (levelTag)
|
||||||
|
{
|
||||||
|
case "master":
|
||||||
|
return dmps.MasterVolumeLevel;
|
||||||
|
case "source":
|
||||||
|
return dmps.SourceVolumeLevel;
|
||||||
|
case "micsmaster":
|
||||||
|
return dmps.MicsMasterVolumeLevel;
|
||||||
|
case "codec1":
|
||||||
|
return dmps.Codec1VolumeLevel;
|
||||||
|
case "codec2":
|
||||||
|
return dmps.Codec2VolumeLevel;
|
||||||
|
default:
|
||||||
|
return dmps.MasterVolumeLevel;
|
||||||
|
}
|
||||||
|
}
|
||||||
// No volume for some reason. We have failed as developers
|
// No volume for some reason. We have failed as developers
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -1,129 +1,129 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
using PepperDash.Essentials.Core.Bridges;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core.Routing;
|
using PepperDash.Essentials.Core.Routing;
|
||||||
using PepperDash.Essentials.Bridges;
|
using PepperDash.Essentials.Bridges;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.EthernetCommunication;
|
using Crestron.SimplSharpPro.EthernetCommunication;
|
||||||
|
|
||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Responsible for loading all of the device types for this library
|
/// Responsible for loading all of the device types for this library
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class BridgeFactory
|
public class BridgeFactory
|
||||||
{
|
{
|
||||||
public BridgeFactory()
|
public BridgeFactory()
|
||||||
{
|
{
|
||||||
var eiscApiAdvancedFactory = new EiscApiAdvancedFactory() as IDeviceFactory;
|
var eiscApiAdvancedFactory = new EiscApiAdvancedFactory() as IDeviceFactory;
|
||||||
eiscApiAdvancedFactory.LoadTypeFactories();
|
eiscApiAdvancedFactory.LoadTypeFactories();
|
||||||
|
|
||||||
var eiscApiFactory = new EiscApiFactory() as IDeviceFactory;
|
var eiscApiFactory = new EiscApiFactory() as IDeviceFactory;
|
||||||
eiscApiFactory.LoadTypeFactories();
|
eiscApiFactory.LoadTypeFactories();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CommBridge : Device
|
public class CommBridge : Device
|
||||||
{
|
{
|
||||||
public CommBridgeProperties Properties { get; private set; }
|
public CommBridgeProperties Properties { get; private set; }
|
||||||
|
|
||||||
public List<IBasicCommunication> CommDevices { get; private set; }
|
public List<IBasicCommunication> CommDevices { get; private set; }
|
||||||
|
|
||||||
public CommBridge(string key, string name, JToken properties)
|
public CommBridge(string key, string name, JToken properties)
|
||||||
: base(key, name)
|
: base(key, name)
|
||||||
{
|
{
|
||||||
Properties = JsonConvert.DeserializeObject<CommBridgeProperties>(properties.ToString());
|
Properties = JsonConvert.DeserializeObject<CommBridgeProperties>(properties.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CustomActivate()
|
public override bool CustomActivate()
|
||||||
{
|
{
|
||||||
// Create EiscApis
|
// Create EiscApis
|
||||||
if (Properties.Eiscs != null)
|
if (Properties.Eiscs != null)
|
||||||
{
|
{
|
||||||
foreach (var eisc in Properties.Eiscs)
|
foreach (var eisc in Properties.Eiscs)
|
||||||
{
|
{
|
||||||
var ApiEisc = new BridgeApiEisc(eisc.IpId, eisc.Hostname);
|
var ApiEisc = new BridgeApiEisc(eisc.IpId, eisc.Hostname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var deviceKey in Properties.CommDevices)
|
foreach (var deviceKey in Properties.CommDevices)
|
||||||
{
|
{
|
||||||
var device = DeviceManager.GetDeviceForKey(deviceKey);
|
var device = DeviceManager.GetDeviceForKey(deviceKey);
|
||||||
|
|
||||||
if (device != null)
|
if (device != null)
|
||||||
{
|
{
|
||||||
Debug.Console(0, "deviceKey {0} Found in Device Manager", device.Key);
|
Debug.Console(0, "deviceKey {0} Found in Device Manager", device.Key);
|
||||||
CommDevices.Add(device as IBasicCommunication);
|
CommDevices.Add(device as IBasicCommunication);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Console(0, "deviceKey {0} Not Found in Device Manager", deviceKey);
|
Debug.Console(0, "deviceKey {0} Not Found in Device Manager", deviceKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Iterate through all the CommDevices and link up their Actions and Feedbacks
|
// Iterate through all the CommDevices and link up their Actions and Feedbacks
|
||||||
|
|
||||||
Debug.Console(0, "Bridge {0} Activated", this.Name);
|
Debug.Console(0, "Bridge {0} Activated", this.Name);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class EiscBridgeProperties
|
public class EiscBridgeProperties
|
||||||
{
|
{
|
||||||
public string ParentDeviceKey { get; set; }
|
public string ParentDeviceKey { get; set; }
|
||||||
public eApiType ApiType { get; set; }
|
public eApiType ApiType { get; set; }
|
||||||
public List<EiscProperties> Eiscs { get; set; }
|
public List<EiscProperties> Eiscs { get; set; }
|
||||||
public string ApiOverrideFilePath { get; set; }
|
public string ApiOverrideFilePath { get; set; }
|
||||||
|
|
||||||
public class EiscProperties
|
public class EiscProperties
|
||||||
{
|
{
|
||||||
public string IpId { get; set; }
|
public string IpId { get; set; }
|
||||||
public string Hostname { get; set; }
|
public string Hostname { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CommBridgeProperties : EiscBridgeProperties
|
public class CommBridgeProperties : EiscBridgeProperties
|
||||||
{
|
{
|
||||||
public List<string> CommDevices { get; set; }
|
public List<string> CommDevices { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum eApiType { Eisc = 0 }
|
public enum eApiType { Eisc = 0 }
|
||||||
|
|
||||||
public class BridgeApiEisc
|
public class BridgeApiEisc
|
||||||
{
|
{
|
||||||
public uint Ipid { get; private set; }
|
public uint Ipid { get; private set; }
|
||||||
public ThreeSeriesTcpIpEthernetIntersystemCommunications Eisc { get; private set; }
|
public ThreeSeriesTcpIpEthernetIntersystemCommunications Eisc { get; private set; }
|
||||||
|
|
||||||
public BridgeApiEisc(string ipid, string hostname)
|
public BridgeApiEisc(string ipid, string hostname)
|
||||||
{
|
{
|
||||||
Ipid = (UInt32)int.Parse(ipid, System.Globalization.NumberStyles.HexNumber);
|
Ipid = (UInt32)int.Parse(ipid, System.Globalization.NumberStyles.HexNumber);
|
||||||
Eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(Ipid, hostname, Global.ControlSystem);
|
Eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(Ipid, hostname, Global.ControlSystem);
|
||||||
Eisc.Register();
|
Eisc.Register();
|
||||||
Eisc.SigChange += Eisc_SigChange;
|
Eisc.SigChange += Eisc_SigChange;
|
||||||
Debug.Console(0, "BridgeApiEisc Created at Ipid {0}", ipid);
|
Debug.Console(0, "BridgeApiEisc Created at Ipid {0}", ipid);
|
||||||
}
|
}
|
||||||
void Eisc_SigChange(object currentDevice, Crestron.SimplSharpPro.SigEventArgs args)
|
void Eisc_SigChange(object currentDevice, Crestron.SimplSharpPro.SigEventArgs args)
|
||||||
{
|
{
|
||||||
if (Debug.Level >= 1)
|
if (Debug.Level >= 1)
|
||||||
Debug.Console(1, "BridgeApiEisc change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue);
|
Debug.Console(1, "BridgeApiEisc change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue);
|
||||||
var uo = args.Sig.UserObject;
|
var uo = args.Sig.UserObject;
|
||||||
if (uo is Action<bool>)
|
if (uo is Action<bool>)
|
||||||
(uo as Action<bool>)(args.Sig.BoolValue);
|
(uo as Action<bool>)(args.Sig.BoolValue);
|
||||||
else if (uo is Action<ushort>)
|
else if (uo is Action<ushort>)
|
||||||
(uo as Action<ushort>)(args.Sig.UShortValue);
|
(uo as Action<ushort>)(args.Sig.UShortValue);
|
||||||
else if (uo is Action<string>)
|
else if (uo is Action<string>)
|
||||||
(uo as Action<string>)(args.Sig.StringValue);
|
(uo as Action<string>)(args.Sig.StringValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,90 +1,90 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core.Routing;
|
using PepperDash.Essentials.Core.Routing;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.EthernetCommunication;
|
using Crestron.SimplSharpPro.EthernetCommunication;
|
||||||
using PepperDash.Essentials.Bridges;
|
using PepperDash.Essentials.Bridges;
|
||||||
|
|
||||||
namespace PepperDash.Essentials {
|
namespace PepperDash.Essentials {
|
||||||
public class BridgeFactory {
|
public class BridgeFactory {
|
||||||
public static IKeyed GetDevice(PepperDash.Essentials.Core.Config.DeviceConfig dc) {
|
public static IKeyed GetDevice(PepperDash.Essentials.Core.Config.DeviceConfig dc) {
|
||||||
// ? why is this static JTA 2018-06-13?
|
// ? why is this static JTA 2018-06-13?
|
||||||
|
|
||||||
var key = dc.Key;
|
var key = dc.Key;
|
||||||
var name = dc.Name;
|
var name = dc.Name;
|
||||||
var type = dc.Type;
|
var type = dc.Type;
|
||||||
var properties = dc.Properties;
|
var properties = dc.Properties;
|
||||||
var propAnon = new { };
|
var propAnon = new { };
|
||||||
JsonConvert.DeserializeAnonymousType(dc.Properties.ToString(), propAnon);
|
JsonConvert.DeserializeAnonymousType(dc.Properties.ToString(), propAnon);
|
||||||
|
|
||||||
var typeName = dc.Type.ToLower();
|
var typeName = dc.Type.ToLower();
|
||||||
var groupName = dc.Group.ToLower();
|
var groupName = dc.Group.ToLower();
|
||||||
|
|
||||||
Debug.Console(2, "Name {0}, Key {1}, Type {2}, Properties {3}", name, key, type, properties.ToString());
|
Debug.Console(2, "Name {0}, Key {1}, Type {2}, Properties {3}", name, key, type, properties.ToString());
|
||||||
if (typeName == "essentialdm")
|
if (typeName == "essentialdm")
|
||||||
{
|
{
|
||||||
return new EssentialDM(key, name, properties);
|
return new EssentialDM(key, name, properties);
|
||||||
}
|
}
|
||||||
else if (typeName == "essentialcomm")
|
else if (typeName == "essentialcomm")
|
||||||
{
|
{
|
||||||
Debug.Console(2, "Launch Essential Comm");
|
Debug.Console(2, "Launch Essential Comm");
|
||||||
return new EssentialComm(key, name, properties);
|
return new EssentialComm(key, name, properties);
|
||||||
}
|
}
|
||||||
else if (typeName == "essentialdsp")
|
else if (typeName == "essentialdsp")
|
||||||
{
|
{
|
||||||
Debug.Console(2, "Launch EssentialDsp");
|
Debug.Console(2, "Launch EssentialDsp");
|
||||||
return new EssentialDsp(key, name, properties);
|
return new EssentialDsp(key, name, properties);
|
||||||
}
|
}
|
||||||
else if (typeName == "essentialstvone")
|
else if (typeName == "essentialstvone")
|
||||||
{
|
{
|
||||||
Debug.Console(2, "Launch essentialstvone");
|
Debug.Console(2, "Launch essentialstvone");
|
||||||
return new EssentialsTVOne(key, name, properties);
|
return new EssentialsTVOne(key, name, properties);
|
||||||
}
|
}
|
||||||
else if (typeName == "essentialslighting")
|
else if (typeName == "essentialslighting")
|
||||||
{
|
{
|
||||||
Debug.Console(2, "Launch essentialslighting");
|
Debug.Console(2, "Launch essentialslighting");
|
||||||
return new EssentialsLightsBridge(key, name, properties);
|
return new EssentialsLightsBridge(key, name, properties);
|
||||||
}
|
}
|
||||||
else if (typeName == "eiscapi")
|
else if (typeName == "eiscapi")
|
||||||
{
|
{
|
||||||
return new EiscApi(dc);
|
return new EiscApi(dc);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class BridgeApiEisc {
|
public class BridgeApiEisc {
|
||||||
public uint Ipid;
|
public uint Ipid;
|
||||||
public ThreeSeriesTcpIpEthernetIntersystemCommunications Eisc;
|
public ThreeSeriesTcpIpEthernetIntersystemCommunications Eisc;
|
||||||
public BridgeApiEisc(string ipid) {
|
public BridgeApiEisc(string ipid) {
|
||||||
Ipid = (UInt32)int.Parse(ipid, System.Globalization.NumberStyles.HexNumber);
|
Ipid = (UInt32)int.Parse(ipid, System.Globalization.NumberStyles.HexNumber);
|
||||||
Eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(Ipid, "127.0.0.2", Global.ControlSystem);
|
Eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(Ipid, "127.0.0.2", Global.ControlSystem);
|
||||||
Eisc.Register();
|
Eisc.Register();
|
||||||
Eisc.SigChange += Eisc_SigChange;
|
Eisc.SigChange += Eisc_SigChange;
|
||||||
Debug.Console(2, "BridgeApiEisc Created at Ipid {0}", ipid);
|
Debug.Console(2, "BridgeApiEisc Created at Ipid {0}", ipid);
|
||||||
}
|
}
|
||||||
void Eisc_SigChange(object currentDevice, Crestron.SimplSharpPro.SigEventArgs args) {
|
void Eisc_SigChange(object currentDevice, Crestron.SimplSharpPro.SigEventArgs args) {
|
||||||
if (Debug.Level >= 1)
|
if (Debug.Level >= 1)
|
||||||
Debug.Console(2, "DDVC EISC change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue);
|
Debug.Console(2, "DDVC EISC change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue);
|
||||||
var uo = args.Sig.UserObject;
|
var uo = args.Sig.UserObject;
|
||||||
if (uo is Action<bool>)
|
if (uo is Action<bool>)
|
||||||
(uo as Action<bool>)(args.Sig.BoolValue);
|
(uo as Action<bool>)(args.Sig.BoolValue);
|
||||||
else if (uo is Action<ushort>)
|
else if (uo is Action<ushort>)
|
||||||
(uo as Action<ushort>)(args.Sig.UShortValue);
|
(uo as Action<ushort>)(args.Sig.UShortValue);
|
||||||
else if (uo is Action<string>)
|
else if (uo is Action<string>)
|
||||||
(uo as Action<string>)(args.Sig.StringValue);
|
(uo as Action<string>)(args.Sig.StringValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,38 +1,38 @@
|
|||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.CrestronIO;
|
using PepperDash.Essentials.Core.CrestronIO;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public static class C2nRthsControllerApiExtensions
|
public static class C2nRthsControllerApiExtensions
|
||||||
{
|
{
|
||||||
public static void LinkToApi(this C2nRthsController device, BasicTriList triList, uint joinStart,
|
public static void LinkToApi(this C2nRthsController device, BasicTriList triList, uint joinStart,
|
||||||
string joinMapKey)
|
string joinMapKey)
|
||||||
{
|
{
|
||||||
var joinMap = new C2nRthsControllerJoinMap();
|
var joinMap = new C2nRthsControllerJoinMap();
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<C2nRthsControllerJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<C2nRthsControllerJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
joinMap.OffsetJoinNumbers(joinStart);
|
||||||
|
|
||||||
Debug.Console(1, device, "Linking to Trilist '{0}'", triList.ID.ToString("X"));
|
Debug.Console(1, device, "Linking to Trilist '{0}'", triList.ID.ToString("X"));
|
||||||
|
|
||||||
|
|
||||||
triList.SetBoolSigAction(joinMap.TemperatureFormat, device.SetTemperatureFormat);
|
triList.SetBoolSigAction(joinMap.TemperatureFormat, device.SetTemperatureFormat);
|
||||||
|
|
||||||
device.IsOnline.LinkInputSig(triList.BooleanInput[joinMap.IsOnline]);
|
device.IsOnline.LinkInputSig(triList.BooleanInput[joinMap.IsOnline]);
|
||||||
device.TemperatureFeedback.LinkInputSig(triList.UShortInput[joinMap.Temperature]);
|
device.TemperatureFeedback.LinkInputSig(triList.UShortInput[joinMap.Temperature]);
|
||||||
device.HumidityFeedback.LinkInputSig(triList.UShortInput[joinMap.Humidity]);
|
device.HumidityFeedback.LinkInputSig(triList.UShortInput[joinMap.Humidity]);
|
||||||
|
|
||||||
triList.StringInput[joinMap.Name].StringValue = device.Name;
|
triList.StringInput[joinMap.Name].StringValue = device.Name;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,169 +1,169 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Devices.Common;
|
using PepperDash.Essentials.Devices.Common;
|
||||||
using PepperDash.Essentials.Devices.Common.Cameras;
|
using PepperDash.Essentials.Devices.Common.Cameras;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public static class CameraControllerApiExtensions
|
public static class CameraControllerApiExtensions
|
||||||
{
|
{
|
||||||
public static void LinkToApi(this PepperDash.Essentials.Devices.Common.Cameras.CameraBase cameraDevice, BasicTriList trilist, uint joinStart, string joinMapKey, EiscApi bridge)
|
public static void LinkToApi(this PepperDash.Essentials.Devices.Common.Cameras.CameraBase cameraDevice, BasicTriList trilist, uint joinStart, string joinMapKey, EiscApi bridge)
|
||||||
{
|
{
|
||||||
CameraControllerJoinMap joinMap = new CameraControllerJoinMap(joinStart);
|
CameraControllerJoinMap joinMap = new CameraControllerJoinMap(joinStart);
|
||||||
|
|
||||||
// Adds the join map to the bridge
|
// Adds the join map to the bridge
|
||||||
bridge.AddJoinMap(cameraDevice.Key, joinMap);
|
bridge.AddJoinMap(cameraDevice.Key, joinMap);
|
||||||
|
|
||||||
var customJoins = JoinMapHelper.TryGetJoinMapAdvancedForDevice(joinMapKey);
|
var customJoins = JoinMapHelper.TryGetJoinMapAdvancedForDevice(joinMapKey);
|
||||||
|
|
||||||
if (customJoins != null)
|
if (customJoins != null)
|
||||||
{
|
{
|
||||||
joinMap.SetCustomJoinData(customJoins);
|
joinMap.SetCustomJoinData(customJoins);
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
Debug.Console(0, "Linking to Bridge Type {0}", cameraDevice.GetType().Name.ToString());
|
Debug.Console(0, "Linking to Bridge Type {0}", cameraDevice.GetType().Name.ToString());
|
||||||
|
|
||||||
var commMonitor = cameraDevice as ICommunicationMonitor;
|
var commMonitor = cameraDevice as ICommunicationMonitor;
|
||||||
commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
||||||
|
|
||||||
var ptzCamera = cameraDevice as IHasCameraPtzControl;
|
var ptzCamera = cameraDevice as IHasCameraPtzControl;
|
||||||
|
|
||||||
if (ptzCamera != null)
|
if (ptzCamera != null)
|
||||||
{
|
{
|
||||||
trilist.SetBoolSigAction(joinMap.PanLeft.JoinNumber, (b) =>
|
trilist.SetBoolSigAction(joinMap.PanLeft.JoinNumber, (b) =>
|
||||||
{
|
{
|
||||||
if (b)
|
if (b)
|
||||||
{
|
{
|
||||||
ptzCamera.PanLeft();
|
ptzCamera.PanLeft();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ptzCamera.PanStop();
|
ptzCamera.PanStop();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
trilist.SetBoolSigAction(joinMap.PanRight.JoinNumber, (b) =>
|
trilist.SetBoolSigAction(joinMap.PanRight.JoinNumber, (b) =>
|
||||||
{
|
{
|
||||||
if (b)
|
if (b)
|
||||||
{
|
{
|
||||||
ptzCamera.PanRight();
|
ptzCamera.PanRight();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ptzCamera.PanStop();
|
ptzCamera.PanStop();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
trilist.SetBoolSigAction(joinMap.TiltUp.JoinNumber, (b) =>
|
trilist.SetBoolSigAction(joinMap.TiltUp.JoinNumber, (b) =>
|
||||||
{
|
{
|
||||||
if (b)
|
if (b)
|
||||||
{
|
{
|
||||||
ptzCamera.TiltUp();
|
ptzCamera.TiltUp();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ptzCamera.TiltStop();
|
ptzCamera.TiltStop();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
trilist.SetBoolSigAction(joinMap.TiltDown.JoinNumber, (b) =>
|
trilist.SetBoolSigAction(joinMap.TiltDown.JoinNumber, (b) =>
|
||||||
{
|
{
|
||||||
if (b)
|
if (b)
|
||||||
{
|
{
|
||||||
ptzCamera.TiltDown();
|
ptzCamera.TiltDown();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ptzCamera.TiltStop();
|
ptzCamera.TiltStop();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
trilist.SetBoolSigAction(joinMap.ZoomIn.JoinNumber, (b) =>
|
trilist.SetBoolSigAction(joinMap.ZoomIn.JoinNumber, (b) =>
|
||||||
{
|
{
|
||||||
if (b)
|
if (b)
|
||||||
{
|
{
|
||||||
ptzCamera.ZoomIn();
|
ptzCamera.ZoomIn();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ptzCamera.ZoomStop();
|
ptzCamera.ZoomStop();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
trilist.SetBoolSigAction(joinMap.ZoomOut.JoinNumber, (b) =>
|
trilist.SetBoolSigAction(joinMap.ZoomOut.JoinNumber, (b) =>
|
||||||
{
|
{
|
||||||
if (b)
|
if (b)
|
||||||
{
|
{
|
||||||
ptzCamera.ZoomOut();
|
ptzCamera.ZoomOut();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ptzCamera.ZoomStop();
|
ptzCamera.ZoomStop();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cameraDevice is IPower)
|
if (cameraDevice is IPower)
|
||||||
{
|
{
|
||||||
var powerCamera = cameraDevice as IPower;
|
var powerCamera = cameraDevice as IPower;
|
||||||
trilist.SetSigTrueAction(joinMap.PowerOn.JoinNumber, () => powerCamera.PowerOn());
|
trilist.SetSigTrueAction(joinMap.PowerOn.JoinNumber, () => powerCamera.PowerOn());
|
||||||
trilist.SetSigTrueAction(joinMap.PowerOff.JoinNumber, () => powerCamera.PowerOff());
|
trilist.SetSigTrueAction(joinMap.PowerOff.JoinNumber, () => powerCamera.PowerOff());
|
||||||
|
|
||||||
powerCamera.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn.JoinNumber]);
|
powerCamera.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn.JoinNumber]);
|
||||||
powerCamera.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff.JoinNumber]);
|
powerCamera.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff.JoinNumber]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cameraDevice is ICommunicationMonitor)
|
if (cameraDevice is ICommunicationMonitor)
|
||||||
{
|
{
|
||||||
var monitoredCamera = cameraDevice as ICommunicationMonitor;
|
var monitoredCamera = cameraDevice as ICommunicationMonitor;
|
||||||
monitoredCamera.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
monitoredCamera.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cameraDevice is IHasCameraPresets)
|
if (cameraDevice is IHasCameraPresets)
|
||||||
{
|
{
|
||||||
// Set the preset lables when they change
|
// Set the preset lables when they change
|
||||||
var presetsCamera = cameraDevice as IHasCameraPresets;
|
var presetsCamera = cameraDevice as IHasCameraPresets;
|
||||||
presetsCamera.PresetsListHasChanged += new EventHandler<EventArgs>((o, a) =>
|
presetsCamera.PresetsListHasChanged += new EventHandler<EventArgs>((o, a) =>
|
||||||
{
|
{
|
||||||
for (int i = 1; i <= joinMap.NumberOfPresets.JoinNumber; i++)
|
for (int i = 1; i <= joinMap.NumberOfPresets.JoinNumber; i++)
|
||||||
{
|
{
|
||||||
int tempNum = i - 1;
|
int tempNum = i - 1;
|
||||||
|
|
||||||
string label = "" ;
|
string label = "" ;
|
||||||
|
|
||||||
var preset = presetsCamera.Presets.FirstOrDefault(p => p.ID.Equals(i));
|
var preset = presetsCamera.Presets.FirstOrDefault(p => p.ID.Equals(i));
|
||||||
|
|
||||||
if (preset != null)
|
if (preset != null)
|
||||||
label = preset.Description;
|
label = preset.Description;
|
||||||
|
|
||||||
trilist.SetString((ushort)(joinMap.PresetLabelStart.JoinNumber + tempNum), label);
|
trilist.SetString((ushort)(joinMap.PresetLabelStart.JoinNumber + tempNum), label);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
for (int i = 0; i < joinMap.NumberOfPresets.JoinNumber; i++)
|
for (int i = 0; i < joinMap.NumberOfPresets.JoinNumber; i++)
|
||||||
{
|
{
|
||||||
int tempNum = i;
|
int tempNum = i;
|
||||||
|
|
||||||
trilist.SetSigTrueAction((ushort)(joinMap.PresetRecallStart.JoinNumber + tempNum), () =>
|
trilist.SetSigTrueAction((ushort)(joinMap.PresetRecallStart.JoinNumber + tempNum), () =>
|
||||||
{
|
{
|
||||||
presetsCamera.PresetSelect(tempNum);
|
presetsCamera.PresetSelect(tempNum);
|
||||||
});
|
});
|
||||||
trilist.SetSigTrueAction((ushort)(joinMap.PresetSaveStart.JoinNumber + tempNum), () =>
|
trilist.SetSigTrueAction((ushort)(joinMap.PresetSaveStart.JoinNumber + tempNum), () =>
|
||||||
{
|
{
|
||||||
var label = trilist.GetString((ushort)(joinMap.PresetLabelStart.JoinNumber + tempNum));
|
var label = trilist.GetString((ushort)(joinMap.PresetLabelStart.JoinNumber + tempNum));
|
||||||
|
|
||||||
presetsCamera.PresetStore(tempNum, label);
|
presetsCamera.PresetStore(tempNum, label);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,120 +1,120 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Devices.Common;
|
using PepperDash.Essentials.Devices.Common;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Bridges
|
namespace PepperDash.Essentials.Bridges
|
||||||
{
|
{
|
||||||
public static class SamsungDisplayControllerApiExtensions
|
public static class SamsungDisplayControllerApiExtensions
|
||||||
{
|
{
|
||||||
public static void LinkToApi(this PepperDash.Essentials.Core.TwoWayDisplayBase displayDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
|
public static void LinkToApi(this PepperDash.Essentials.Core.TwoWayDisplayBase displayDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
|
||||||
{
|
{
|
||||||
var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DisplayControllerJoinMap;
|
var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DisplayControllerJoinMap;
|
||||||
|
|
||||||
if (joinMap == null)
|
if (joinMap == null)
|
||||||
{
|
{
|
||||||
joinMap = new DisplayControllerJoinMap();
|
joinMap = new DisplayControllerJoinMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
joinMap.OffsetJoinNumbers(joinStart);
|
||||||
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
Debug.Console(0, "Linking to lighting Type {0}", displayDevice.GetType().Name.ToString());
|
Debug.Console(0, "Linking to lighting Type {0}", displayDevice.GetType().Name.ToString());
|
||||||
|
|
||||||
var commMonitor = displayDevice as ICommunicationMonitor;
|
var commMonitor = displayDevice as ICommunicationMonitor;
|
||||||
commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
||||||
|
|
||||||
|
|
||||||
// Poewer Off
|
// Poewer Off
|
||||||
trilist.SetSigTrueAction(joinMap.PowerOff, () => displayDevice.PowerOff());
|
trilist.SetSigTrueAction(joinMap.PowerOff, () => displayDevice.PowerOff());
|
||||||
displayDevice.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff]);
|
displayDevice.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff]);
|
||||||
|
|
||||||
// Poewer On
|
// Poewer On
|
||||||
trilist.SetSigTrueAction(joinMap.PowerOn, () => displayDevice.PowerOn());
|
trilist.SetSigTrueAction(joinMap.PowerOn, () => displayDevice.PowerOn());
|
||||||
displayDevice.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn]);
|
displayDevice.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn]);
|
||||||
|
|
||||||
// GenericLighitng Actions & FeedBack
|
// GenericLighitng Actions & FeedBack
|
||||||
|
|
||||||
// int sceneIndex = 1;
|
// int sceneIndex = 1;
|
||||||
/*
|
/*
|
||||||
foreach (var scene in displayDevice.LightingScenes)
|
foreach (var scene in displayDevice.LightingScenes)
|
||||||
{
|
{
|
||||||
var tempIndex = sceneIndex - 1;
|
var tempIndex = sceneIndex - 1;
|
||||||
//trilist.SetSigTrueAction((uint)(joinMap.LightingSceneOffset + sceneIndex), () => displayDevice.SelectScene(displayDevice.LightingScenes[tempIndex]));
|
//trilist.SetSigTrueAction((uint)(joinMap.LightingSceneOffset + sceneIndex), () => displayDevice.SelectScene(displayDevice.LightingScenes[tempIndex]));
|
||||||
scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)]);
|
scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)]);
|
||||||
trilist.StringInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)].StringValue = scene.Name;
|
trilist.StringInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)].StringValue = scene.Name;
|
||||||
trilist.BooleanInput[(uint)(joinMap.ButtonVisibilityOffset + sceneIndex)].BoolValue = true;
|
trilist.BooleanInput[(uint)(joinMap.ButtonVisibilityOffset + sceneIndex)].BoolValue = true;
|
||||||
sceneIndex++;
|
sceneIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (displayDevice.GetType().Name.ToString() == "LutronQuantumArea")
|
if (displayDevice.GetType().Name.ToString() == "LutronQuantumArea")
|
||||||
{
|
{
|
||||||
var lutronDevice = displayDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea;
|
var lutronDevice = displayDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea;
|
||||||
lutronDevice.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
lutronDevice.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
||||||
trilist.SetStringSigAction(joinMap.IntegrationIdSet, s => lutronDevice.IntegrationId = s);
|
trilist.SetStringSigAction(joinMap.IntegrationIdSet, s => lutronDevice.IntegrationId = s);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
//ApiEisc.Eisc.SetStringSigAction(ApiMap.integrationID, (s) => { lutronLights.IntegrationId = s; });
|
//ApiEisc.Eisc.SetStringSigAction(ApiMap.integrationID, (s) => { lutronLights.IntegrationId = s; });
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
var lutronLights = displayDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea;
|
var lutronLights = displayDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea;
|
||||||
|
|
||||||
|
|
||||||
for (uint i = 1; i <= lightingBase.CircuitCount; i++)
|
for (uint i = 1; i <= lightingBase.CircuitCount; i++)
|
||||||
{
|
{
|
||||||
var circuit = i;
|
var circuit = i;
|
||||||
lightingBase.CircuitNameFeedbacks[circuit - 1].LinkInputSig(trilist.StringInput[joinMap.CircuitNames + circuit]);
|
lightingBase.CircuitNameFeedbacks[circuit - 1].LinkInputSig(trilist.StringInput[joinMap.CircuitNames + circuit]);
|
||||||
lightingBase.CircuitIsCritical[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitIsCritical + circuit]);
|
lightingBase.CircuitIsCritical[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitIsCritical + circuit]);
|
||||||
lightingBase.CircuitState[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitState + circuit]);
|
lightingBase.CircuitState[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitState + circuit]);
|
||||||
trilist.SetSigTrueAction(joinMap.CircuitCycle + circuit, () => lightingBase.CycleCircuit(circuit - 1));
|
trilist.SetSigTrueAction(joinMap.CircuitCycle + circuit, () => lightingBase.CycleCircuit(circuit - 1));
|
||||||
trilist.SetSigTrueAction(joinMap.CircuitOnCmd + circuit, () => lightingBase.TurnOnCircuit(circuit - 1));
|
trilist.SetSigTrueAction(joinMap.CircuitOnCmd + circuit, () => lightingBase.TurnOnCircuit(circuit - 1));
|
||||||
trilist.SetSigTrueAction(joinMap.CircuitOffCmd + circuit, () => lightingBase.TurnOffCircuit(circuit - 1));
|
trilist.SetSigTrueAction(joinMap.CircuitOffCmd + circuit, () => lightingBase.TurnOffCircuit(circuit - 1));
|
||||||
|
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class DisplayControllerJoinMap : JoinMapBase
|
public class DisplayControllerJoinMap : JoinMapBase
|
||||||
{
|
{
|
||||||
public uint IsOnline { get; set; }
|
public uint IsOnline { get; set; }
|
||||||
public uint PowerOff { get; set; }
|
public uint PowerOff { get; set; }
|
||||||
public uint PowerOn { get; set; }
|
public uint PowerOn { get; set; }
|
||||||
public uint SelectScene { get; set; }
|
public uint SelectScene { get; set; }
|
||||||
public uint LightingSceneOffset { get; set; }
|
public uint LightingSceneOffset { get; set; }
|
||||||
public uint ButtonVisibilityOffset { get; set; }
|
public uint ButtonVisibilityOffset { get; set; }
|
||||||
public uint IntegrationIdSet { get; set; }
|
public uint IntegrationIdSet { get; set; }
|
||||||
|
|
||||||
public DisplayControllerJoinMap()
|
public DisplayControllerJoinMap()
|
||||||
{
|
{
|
||||||
// Digital
|
// Digital
|
||||||
IsOnline = 1;
|
IsOnline = 1;
|
||||||
PowerOff = 1;
|
PowerOff = 1;
|
||||||
PowerOn = 2;
|
PowerOn = 2;
|
||||||
SelectScene = 1;
|
SelectScene = 1;
|
||||||
IntegrationIdSet = 1;
|
IntegrationIdSet = 1;
|
||||||
LightingSceneOffset = 10;
|
LightingSceneOffset = 10;
|
||||||
ButtonVisibilityOffset = 40;
|
ButtonVisibilityOffset = 40;
|
||||||
// Analog
|
// Analog
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
public override void OffsetJoinNumbers(uint joinStart)
|
||||||
{
|
{
|
||||||
var joinOffset = joinStart - 1;
|
var joinOffset = joinStart - 1;
|
||||||
|
|
||||||
IsOnline = IsOnline + joinOffset;
|
IsOnline = IsOnline + joinOffset;
|
||||||
PowerOff = PowerOff + joinOffset;
|
PowerOff = PowerOff + joinOffset;
|
||||||
PowerOn = PowerOn + joinOffset;
|
PowerOn = PowerOn + joinOffset;
|
||||||
SelectScene = SelectScene + joinOffset;
|
SelectScene = SelectScene + joinOffset;
|
||||||
LightingSceneOffset = LightingSceneOffset + joinOffset;
|
LightingSceneOffset = LightingSceneOffset + joinOffset;
|
||||||
ButtonVisibilityOffset = ButtonVisibilityOffset + joinOffset;
|
ButtonVisibilityOffset = ButtonVisibilityOffset + joinOffset;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -70,7 +70,7 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
catch (NullReferenceException)
|
catch (NullReferenceException)
|
||||||
{
|
{
|
||||||
Debug.ConsoleWithLog(0, this,
|
Debug.ConsoleWithLog(0, this,
|
||||||
"Please update the bridge config to use EiscBridgeAdvanced with this device: {0}", device.Key);
|
"Please update the bridge config to use eiscApiAdvanced with this device: {0}", device.Key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Debug.Console(1, this, "Devices Linked.");
|
Debug.Console(1, this, "Devices Linked.");
|
||||||
@@ -1,144 +1,144 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core.Routing;
|
using PepperDash.Essentials.Core.Routing;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.EthernetCommunication;
|
using Crestron.SimplSharpPro.EthernetCommunication;
|
||||||
using Crestron.SimplSharpPro.CrestronThread;
|
using Crestron.SimplSharpPro.CrestronThread;
|
||||||
|
|
||||||
namespace PepperDash.Essentials {
|
namespace PepperDash.Essentials {
|
||||||
public class EssentialCommConfig {
|
public class EssentialCommConfig {
|
||||||
public string[] EiscApiIpids;
|
public string[] EiscApiIpids;
|
||||||
public EssentialCommCommConnectionConfigs[] CommConnections;
|
public EssentialCommCommConnectionConfigs[] CommConnections;
|
||||||
}
|
}
|
||||||
public class EssentialCommCommConnectionConfigs {
|
public class EssentialCommCommConnectionConfigs {
|
||||||
public uint joinNumber {get; set; }
|
public uint joinNumber {get; set; }
|
||||||
public EssentialsControlPropertiesConfig control { get; set; }
|
public EssentialsControlPropertiesConfig control { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EssentialCommsPort {
|
public class EssentialCommsPort {
|
||||||
public IBasicCommunication Comm;
|
public IBasicCommunication Comm;
|
||||||
public IntFeedback StatusFeedback;
|
public IntFeedback StatusFeedback;
|
||||||
public BoolFeedback ConnectedFeedback;
|
public BoolFeedback ConnectedFeedback;
|
||||||
public List<EssentialComApiMap> Outputs = new List<EssentialComApiMap>();
|
public List<EssentialComApiMap> Outputs = new List<EssentialComApiMap>();
|
||||||
public String RxBuffer;
|
public String RxBuffer;
|
||||||
public EssentialCommsPort(EssentialsControlPropertiesConfig config, string keyPrefix) {
|
public EssentialCommsPort(EssentialsControlPropertiesConfig config, string keyPrefix) {
|
||||||
Comm = CommFactory.CreateCommForConfig(config, keyPrefix);
|
Comm = CommFactory.CreateCommForConfig(config, keyPrefix);
|
||||||
// var PortGather = new CommunicationGather(Comm, config.EndOfLineChar);
|
// var PortGather = new CommunicationGather(Comm, config.EndOfLineChar);
|
||||||
Comm.TextReceived += new EventHandler<GenericCommMethodReceiveTextArgs>(Communication_TextReceived);
|
Comm.TextReceived += new EventHandler<GenericCommMethodReceiveTextArgs>(Communication_TextReceived);
|
||||||
|
|
||||||
var socket = Comm as ISocketStatus;
|
var socket = Comm as ISocketStatus;
|
||||||
StatusFeedback = new IntFeedback(() => { return (int)socket.ClientStatus; });
|
StatusFeedback = new IntFeedback(() => { return (int)socket.ClientStatus; });
|
||||||
ConnectedFeedback = new BoolFeedback(() => { return Comm.IsConnected; });
|
ConnectedFeedback = new BoolFeedback(() => { return Comm.IsConnected; });
|
||||||
|
|
||||||
if (socket != null) {
|
if (socket != null) {
|
||||||
socket.ConnectionChange += new EventHandler<GenericSocketStatusChageEventArgs>(socket_ConnectionChange);
|
socket.ConnectionChange += new EventHandler<GenericSocketStatusChageEventArgs>(socket_ConnectionChange);
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e) {
|
void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e) {
|
||||||
StatusFeedback.FireUpdate();
|
StatusFeedback.FireUpdate();
|
||||||
ConnectedFeedback.FireUpdate();
|
ConnectedFeedback.FireUpdate();
|
||||||
if (e.Client.IsConnected) {
|
if (e.Client.IsConnected) {
|
||||||
// Tasks on connect
|
// Tasks on connect
|
||||||
} else {
|
} else {
|
||||||
// Cleanup items from this session
|
// Cleanup items from this session
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void Communication_TextReceived(object sender, GenericCommMethodReceiveTextArgs args) {
|
void Communication_TextReceived(object sender, GenericCommMethodReceiveTextArgs args) {
|
||||||
try {
|
try {
|
||||||
foreach (var Output in Outputs) {
|
foreach (var Output in Outputs) {
|
||||||
Output.Api.Eisc.StringInput[Output.Join].StringValue = args.Text;
|
Output.Api.Eisc.StringInput[Output.Join].StringValue = args.Text;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception) {
|
catch (Exception) {
|
||||||
throw new FormatException(string.Format("ERROR:{0}"));
|
throw new FormatException(string.Format("ERROR:{0}"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EssentialComm : Device {
|
public class EssentialComm : Device {
|
||||||
public EssentialCommConfig Properties;
|
public EssentialCommConfig Properties;
|
||||||
|
|
||||||
public CommunicationGather PortGather { get; private set; }
|
public CommunicationGather PortGather { get; private set; }
|
||||||
public List<BridgeApiEisc> Apis {get; set;}
|
public List<BridgeApiEisc> Apis {get; set;}
|
||||||
public Dictionary<string, StringFeedback> CommFeedbacks {get; private set; }
|
public Dictionary<string, StringFeedback> CommFeedbacks {get; private set; }
|
||||||
public StatusMonitorBase CommunicationMonitor { get; private set; }
|
public StatusMonitorBase CommunicationMonitor { get; private set; }
|
||||||
public Dictionary<uint, EssentialCommsPort> CommDictionary { get; private set; }
|
public Dictionary<uint, EssentialCommsPort> CommDictionary { get; private set; }
|
||||||
|
|
||||||
public EssentialComm(string key, string name, JToken properties) : base(key, name) {
|
public EssentialComm(string key, string name, JToken properties) : base(key, name) {
|
||||||
Properties = JsonConvert.DeserializeObject<EssentialCommConfig>(properties.ToString());
|
Properties = JsonConvert.DeserializeObject<EssentialCommConfig>(properties.ToString());
|
||||||
CommFeedbacks = new Dictionary<string, StringFeedback>();
|
CommFeedbacks = new Dictionary<string, StringFeedback>();
|
||||||
CommDictionary = new Dictionary<uint, EssentialCommsPort>();
|
CommDictionary = new Dictionary<uint, EssentialCommsPort>();
|
||||||
Apis = new List<BridgeApiEisc>();
|
Apis = new List<BridgeApiEisc>();
|
||||||
int commNumber = 1;
|
int commNumber = 1;
|
||||||
foreach (var commConfig in Properties.CommConnections) {
|
foreach (var commConfig in Properties.CommConnections) {
|
||||||
var commPort = new EssentialCommsPort(commConfig.control, string.Format("{0}-{1}", this.Key, commConfig.joinNumber));
|
var commPort = new EssentialCommsPort(commConfig.control, string.Format("{0}-{1}", this.Key, commConfig.joinNumber));
|
||||||
CommDictionary.Add(commConfig.joinNumber, commPort);
|
CommDictionary.Add(commConfig.joinNumber, commPort);
|
||||||
|
|
||||||
commNumber++;
|
commNumber++;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var Ipid in Properties.EiscApiIpids) {
|
foreach (var Ipid in Properties.EiscApiIpids) {
|
||||||
var ApiEisc = new BridgeApiEisc(Ipid);
|
var ApiEisc = new BridgeApiEisc(Ipid);
|
||||||
Apis.Add(ApiEisc);
|
Apis.Add(ApiEisc);
|
||||||
foreach (var commConnection in CommDictionary) {
|
foreach (var commConnection in CommDictionary) {
|
||||||
Debug.Console(2, "Joining Api{0} to comm {1}", Ipid, commConnection.Key);
|
Debug.Console(2, "Joining Api{0} to comm {1}", Ipid, commConnection.Key);
|
||||||
var tempComm = commConnection.Value;
|
var tempComm = commConnection.Value;
|
||||||
var tempJoin = (uint)commConnection.Key;
|
var tempJoin = (uint)commConnection.Key;
|
||||||
EssentialComApiMap ApiMap = new EssentialComApiMap(ApiEisc, (uint)tempJoin);
|
EssentialComApiMap ApiMap = new EssentialComApiMap(ApiEisc, (uint)tempJoin);
|
||||||
|
|
||||||
tempComm.Outputs.Add(ApiMap);
|
tempComm.Outputs.Add(ApiMap);
|
||||||
// Check for ApiMap Overide Values here
|
// Check for ApiMap Overide Values here
|
||||||
|
|
||||||
ApiEisc.Eisc.SetBoolSigAction(tempJoin, b => {if (b) { tempComm.Comm.Connect(); } else { tempComm.Comm.Disconnect(); }});
|
ApiEisc.Eisc.SetBoolSigAction(tempJoin, b => {if (b) { tempComm.Comm.Connect(); } else { tempComm.Comm.Disconnect(); }});
|
||||||
ApiEisc.Eisc.SetStringSigAction(tempJoin, s => tempComm.Comm.SendText(s));
|
ApiEisc.Eisc.SetStringSigAction(tempJoin, s => tempComm.Comm.SendText(s));
|
||||||
|
|
||||||
tempComm.StatusFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[tempJoin]);
|
tempComm.StatusFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[tempJoin]);
|
||||||
tempComm.ConnectedFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[tempJoin]);
|
tempComm.ConnectedFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[tempJoin]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
ApiEisc.Eisc.Register();
|
ApiEisc.Eisc.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public override bool CustomActivate()
|
public override bool CustomActivate()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Debug.Console(2, "Name {0} Activated", this.Name);
|
Debug.Console(2, "Name {0} Activated", this.Name);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
Debug.Console(0, "Bridge {0}", e);
|
Debug.Console(0, "Bridge {0}", e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public class EssentialComApiMap {
|
public class EssentialComApiMap {
|
||||||
public uint Join;
|
public uint Join;
|
||||||
public BridgeApiEisc Api;
|
public BridgeApiEisc Api;
|
||||||
public uint connectJoin;
|
public uint connectJoin;
|
||||||
public EssentialComApiMap(BridgeApiEisc api, uint join) {
|
public EssentialComApiMap(BridgeApiEisc api, uint join) {
|
||||||
Join = join;
|
Join = join;
|
||||||
Api = api;
|
Api = api;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,150 +1,150 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Essentials.DM;
|
using PepperDash.Essentials.DM;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core.Routing;
|
using PepperDash.Essentials.Core.Routing;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.EthernetCommunication;
|
using Crestron.SimplSharpPro.EthernetCommunication;
|
||||||
using Crestron.SimplSharpPro.DM;
|
using Crestron.SimplSharpPro.DM;
|
||||||
|
|
||||||
namespace PepperDash.Essentials {
|
namespace PepperDash.Essentials {
|
||||||
public class EssentialDM : PepperDash.Core.Device {
|
public class EssentialDM : PepperDash.Core.Device {
|
||||||
public EssentialDMProperties Properties;
|
public EssentialDMProperties Properties;
|
||||||
public List<BridgeApiEisc> BridgeApiEiscs;
|
public List<BridgeApiEisc> BridgeApiEiscs;
|
||||||
private PepperDash.Essentials.DM.DmChassisController DmSwitch;
|
private PepperDash.Essentials.DM.DmChassisController DmSwitch;
|
||||||
private EssentialDMApiMap ApiMap = new EssentialDMApiMap();
|
private EssentialDMApiMap ApiMap = new EssentialDMApiMap();
|
||||||
public EssentialDM(string key, string name, JToken properties)
|
public EssentialDM(string key, string name, JToken properties)
|
||||||
: base(key, name) {
|
: base(key, name) {
|
||||||
Properties = JsonConvert.DeserializeObject<EssentialDMProperties>(properties.ToString());
|
Properties = JsonConvert.DeserializeObject<EssentialDMProperties>(properties.ToString());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public override bool CustomActivate() {
|
public override bool CustomActivate() {
|
||||||
// Create EiscApis
|
// Create EiscApis
|
||||||
try {
|
try {
|
||||||
foreach (var device in DeviceManager.AllDevices) {
|
foreach (var device in DeviceManager.AllDevices) {
|
||||||
if (device.Key == this.Properties.connectionDeviceKey) {
|
if (device.Key == this.Properties.connectionDeviceKey) {
|
||||||
Debug.Console(2, "deviceKey {0} Matches", device.Key);
|
Debug.Console(2, "deviceKey {0} Matches", device.Key);
|
||||||
DmSwitch = DeviceManager.GetDeviceForKey(device.Key) as PepperDash.Essentials.DM.DmChassisController;
|
DmSwitch = DeviceManager.GetDeviceForKey(device.Key) as PepperDash.Essentials.DM.DmChassisController;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
else {
|
else {
|
||||||
Debug.Console(2, "deviceKey {0} doesn't match", device.Key);
|
Debug.Console(2, "deviceKey {0} doesn't match", device.Key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Properties.EiscApiIpids != null) {
|
if (Properties.EiscApiIpids != null) {
|
||||||
|
|
||||||
|
|
||||||
foreach (string Ipid in Properties.EiscApiIpids) {
|
foreach (string Ipid in Properties.EiscApiIpids) {
|
||||||
var ApiEisc = new BridgeApiEisc(Ipid);
|
var ApiEisc = new BridgeApiEisc(Ipid);
|
||||||
for (uint x = 1; x <= DmSwitch.Chassis.NumberOfInputs;x++ ) {
|
for (uint x = 1; x <= DmSwitch.Chassis.NumberOfInputs;x++ ) {
|
||||||
uint tempX = x;
|
uint tempX = x;
|
||||||
Debug.Console(2, "Creating EiscActions {0}", tempX);
|
Debug.Console(2, "Creating EiscActions {0}", tempX);
|
||||||
|
|
||||||
|
|
||||||
ApiEisc.Eisc.SetUShortSigAction(ApiMap.OutputVideoRoutes[tempX], u => DmSwitch.ExecuteSwitch(u, tempX, eRoutingSignalType.Video));
|
ApiEisc.Eisc.SetUShortSigAction(ApiMap.OutputVideoRoutes[tempX], u => DmSwitch.ExecuteSwitch(u, tempX, eRoutingSignalType.Video));
|
||||||
ApiEisc.Eisc.SetUShortSigAction(ApiMap.OutputAudioRoutes[tempX], u => DmSwitch.ExecuteSwitch(u, tempX, eRoutingSignalType.Audio));
|
ApiEisc.Eisc.SetUShortSigAction(ApiMap.OutputAudioRoutes[tempX], u => DmSwitch.ExecuteSwitch(u, tempX, eRoutingSignalType.Audio));
|
||||||
|
|
||||||
|
|
||||||
if (DmSwitch.TxDictionary.ContainsKey(tempX)) {
|
if (DmSwitch.TxDictionary.ContainsKey(tempX)) {
|
||||||
Debug.Console(2, "Creating Tx Feedbacks {0}", tempX);
|
Debug.Console(2, "Creating Tx Feedbacks {0}", tempX);
|
||||||
var TxKey = DmSwitch.TxDictionary[tempX];
|
var TxKey = DmSwitch.TxDictionary[tempX];
|
||||||
var TxDevice = DeviceManager.GetDeviceForKey(TxKey) as DmTxControllerBase;
|
var TxDevice = DeviceManager.GetDeviceForKey(TxKey) as DmTxControllerBase;
|
||||||
TxDevice.IsOnline.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.TxOnlineStatus[tempX]]);
|
TxDevice.IsOnline.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.TxOnlineStatus[tempX]]);
|
||||||
TxDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.TxVideoSyncStatus[tempX]]);
|
TxDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.TxVideoSyncStatus[tempX]]);
|
||||||
ApiEisc.Eisc.SetUShortSigAction((ApiMap.HdcpSupport[tempX]), u => TxDevice.SetHdcpSupportAll((ePdtHdcpSupport)(u)));
|
ApiEisc.Eisc.SetUShortSigAction((ApiMap.HdcpSupport[tempX]), u => TxDevice.SetHdcpSupportAll((ePdtHdcpSupport)(u)));
|
||||||
TxDevice.HdcpSupportAllFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.HdcpSupport[tempX]]);
|
TxDevice.HdcpSupportAllFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.HdcpSupport[tempX]]);
|
||||||
ApiEisc.Eisc.UShortInput[ApiMap.HdcpSupportCapability[tempX]].UShortValue = TxDevice.HdcpSupportCapability;
|
ApiEisc.Eisc.UShortInput[ApiMap.HdcpSupportCapability[tempX]].UShortValue = TxDevice.HdcpSupportCapability;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DmSwitch.VideoInputSyncFeedbacks[tempX].LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.TxVideoSyncStatus[tempX]]);
|
DmSwitch.VideoInputSyncFeedbacks[tempX].LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.TxVideoSyncStatus[tempX]]);
|
||||||
}
|
}
|
||||||
if (DmSwitch.RxDictionary.ContainsKey(tempX)) {
|
if (DmSwitch.RxDictionary.ContainsKey(tempX)) {
|
||||||
Debug.Console(2, "Creating Rx Feedbacks {0}", tempX);
|
Debug.Console(2, "Creating Rx Feedbacks {0}", tempX);
|
||||||
var RxKey = DmSwitch.RxDictionary[tempX];
|
var RxKey = DmSwitch.RxDictionary[tempX];
|
||||||
var RxDevice = DeviceManager.GetDeviceForKey(RxKey) as DmRmcControllerBase;
|
var RxDevice = DeviceManager.GetDeviceForKey(RxKey) as DmRmcControllerBase;
|
||||||
RxDevice.IsOnline.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.RxOnlineStatus[tempX]]);
|
RxDevice.IsOnline.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.RxOnlineStatus[tempX]]);
|
||||||
}
|
}
|
||||||
// DmSwitch.InputEndpointOnlineFeedbacks[(ushort)tempOutputNum].LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.OutputVideoRoutes[tempOutputNum]]);
|
// DmSwitch.InputEndpointOnlineFeedbacks[(ushort)tempOutputNum].LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.OutputVideoRoutes[tempOutputNum]]);
|
||||||
DmSwitch.VideoOutputFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.OutputVideoRoutes[tempX]]);
|
DmSwitch.VideoOutputFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.OutputVideoRoutes[tempX]]);
|
||||||
DmSwitch.AudioOutputFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.OutputAudioRoutes[tempX]]);
|
DmSwitch.AudioOutputFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.OutputAudioRoutes[tempX]]);
|
||||||
DmSwitch.InputNameFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.StringInput[ApiMap.InputNames[tempX]]);
|
DmSwitch.InputNameFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.StringInput[ApiMap.InputNames[tempX]]);
|
||||||
DmSwitch.OutputNameFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.StringInput[ApiMap.OutputNames[tempX]]);
|
DmSwitch.OutputNameFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.StringInput[ApiMap.OutputNames[tempX]]);
|
||||||
DmSwitch.OutputRouteNameFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.StringInput[ApiMap.OutputRouteNames[tempX]]);
|
DmSwitch.OutputRouteNameFeedbacks[(ushort)tempX].LinkInputSig(ApiEisc.Eisc.StringInput[ApiMap.OutputRouteNames[tempX]]);
|
||||||
}
|
}
|
||||||
DmSwitch.IsOnline.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.ChassisOnline]);
|
DmSwitch.IsOnline.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.ChassisOnline]);
|
||||||
ApiEisc.Eisc.Register();
|
ApiEisc.Eisc.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Debug.Console(2, "Name {0} Activated", this.Name);
|
Debug.Console(2, "Name {0} Activated", this.Name);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
Debug.Console(2, "BRidge {0}", e);
|
Debug.Console(2, "BRidge {0}", e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class EssentialDMProperties {
|
public class EssentialDMProperties {
|
||||||
public string connectionDeviceKey;
|
public string connectionDeviceKey;
|
||||||
public string[] EiscApiIpids;
|
public string[] EiscApiIpids;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class EssentialDMApiMap {
|
public class EssentialDMApiMap {
|
||||||
public ushort ChassisOnline = 11;
|
public ushort ChassisOnline = 11;
|
||||||
public Dictionary<uint, ushort> OutputVideoRoutes;
|
public Dictionary<uint, ushort> OutputVideoRoutes;
|
||||||
public Dictionary<uint, ushort> OutputAudioRoutes;
|
public Dictionary<uint, ushort> OutputAudioRoutes;
|
||||||
public Dictionary<uint, ushort> TxOnlineStatus;
|
public Dictionary<uint, ushort> TxOnlineStatus;
|
||||||
public Dictionary<uint, ushort> RxOnlineStatus;
|
public Dictionary<uint, ushort> RxOnlineStatus;
|
||||||
public Dictionary<uint, ushort> TxVideoSyncStatus;
|
public Dictionary<uint, ushort> TxVideoSyncStatus;
|
||||||
public Dictionary<uint, ushort> InputNames;
|
public Dictionary<uint, ushort> InputNames;
|
||||||
public Dictionary<uint, ushort> OutputNames;
|
public Dictionary<uint, ushort> OutputNames;
|
||||||
public Dictionary<uint, ushort> OutputRouteNames;
|
public Dictionary<uint, ushort> OutputRouteNames;
|
||||||
public Dictionary<uint, ushort> HdcpSupport;
|
public Dictionary<uint, ushort> HdcpSupport;
|
||||||
public Dictionary<uint, ushort> HdcpSupportCapability;
|
public Dictionary<uint, ushort> HdcpSupportCapability;
|
||||||
|
|
||||||
public EssentialDMApiMap() {
|
public EssentialDMApiMap() {
|
||||||
OutputVideoRoutes = new Dictionary<uint, ushort>();
|
OutputVideoRoutes = new Dictionary<uint, ushort>();
|
||||||
OutputAudioRoutes = new Dictionary<uint, ushort>();
|
OutputAudioRoutes = new Dictionary<uint, ushort>();
|
||||||
TxOnlineStatus = new Dictionary<uint, ushort>();
|
TxOnlineStatus = new Dictionary<uint, ushort>();
|
||||||
RxOnlineStatus = new Dictionary<uint, ushort>();
|
RxOnlineStatus = new Dictionary<uint, ushort>();
|
||||||
TxVideoSyncStatus = new Dictionary<uint, ushort>();
|
TxVideoSyncStatus = new Dictionary<uint, ushort>();
|
||||||
InputNames = new Dictionary<uint, ushort>();
|
InputNames = new Dictionary<uint, ushort>();
|
||||||
OutputNames = new Dictionary<uint, ushort>();
|
OutputNames = new Dictionary<uint, ushort>();
|
||||||
OutputRouteNames = new Dictionary<uint, ushort>();
|
OutputRouteNames = new Dictionary<uint, ushort>();
|
||||||
HdcpSupport = new Dictionary<uint, ushort>();
|
HdcpSupport = new Dictionary<uint, ushort>();
|
||||||
HdcpSupportCapability = new Dictionary<uint, ushort>();
|
HdcpSupportCapability = new Dictionary<uint, ushort>();
|
||||||
|
|
||||||
for (uint x = 1; x <= 200; x++) {
|
for (uint x = 1; x <= 200; x++) {
|
||||||
// Debug.Console(0, "Init Value {0}", x);
|
// Debug.Console(0, "Init Value {0}", x);
|
||||||
uint tempNum = x;
|
uint tempNum = x;
|
||||||
HdcpSupportCapability[tempNum] = (ushort)(tempNum + 1200);
|
HdcpSupportCapability[tempNum] = (ushort)(tempNum + 1200);
|
||||||
HdcpSupport[tempNum] = (ushort)(tempNum + 1000);
|
HdcpSupport[tempNum] = (ushort)(tempNum + 1000);
|
||||||
OutputVideoRoutes[tempNum] = (ushort)(tempNum + 100);
|
OutputVideoRoutes[tempNum] = (ushort)(tempNum + 100);
|
||||||
OutputAudioRoutes[tempNum] = (ushort)(tempNum + 300);
|
OutputAudioRoutes[tempNum] = (ushort)(tempNum + 300);
|
||||||
TxOnlineStatus[tempNum] = (ushort)(tempNum + 500);
|
TxOnlineStatus[tempNum] = (ushort)(tempNum + 500);
|
||||||
RxOnlineStatus[tempNum] = (ushort)(tempNum + 700);
|
RxOnlineStatus[tempNum] = (ushort)(tempNum + 700);
|
||||||
TxVideoSyncStatus[tempNum] = (ushort)(tempNum + 100);
|
TxVideoSyncStatus[tempNum] = (ushort)(tempNum + 100);
|
||||||
InputNames[tempNum] = (ushort)(tempNum + 100);
|
InputNames[tempNum] = (ushort)(tempNum + 100);
|
||||||
OutputNames[tempNum] = (ushort)(tempNum + 300);
|
OutputNames[tempNum] = (ushort)(tempNum + 300);
|
||||||
OutputRouteNames[tempNum] = (ushort)(tempNum + 2000);
|
OutputRouteNames[tempNum] = (ushort)(tempNum + 2000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,217 +1,217 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Essentials.DM;
|
using PepperDash.Essentials.DM;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core.Routing;
|
using PepperDash.Essentials.Core.Routing;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.EthernetCommunication;
|
using Crestron.SimplSharpPro.EthernetCommunication;
|
||||||
using Crestron.SimplSharpPro.DM;
|
using Crestron.SimplSharpPro.DM;
|
||||||
|
|
||||||
namespace PepperDash.Essentials {
|
namespace PepperDash.Essentials {
|
||||||
public class EssentialDsp : PepperDash.Core.Device {
|
public class EssentialDsp : PepperDash.Core.Device {
|
||||||
public EssentialDspProperties Properties;
|
public EssentialDspProperties Properties;
|
||||||
public List<BridgeApiEisc> BridgeApiEiscs;
|
public List<BridgeApiEisc> BridgeApiEiscs;
|
||||||
private PepperDash.Essentials.Devices.Common.DSP.QscDsp Dsp;
|
private PepperDash.Essentials.Devices.Common.DSP.QscDsp Dsp;
|
||||||
private EssentialDspApiMap ApiMap = new EssentialDspApiMap();
|
private EssentialDspApiMap ApiMap = new EssentialDspApiMap();
|
||||||
public EssentialDsp(string key, string name, JToken properties)
|
public EssentialDsp(string key, string name, JToken properties)
|
||||||
: base(key, name) {
|
: base(key, name) {
|
||||||
Properties = JsonConvert.DeserializeObject<EssentialDspProperties>(properties.ToString());
|
Properties = JsonConvert.DeserializeObject<EssentialDspProperties>(properties.ToString());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public override bool CustomActivate() {
|
public override bool CustomActivate() {
|
||||||
// Create EiscApis
|
// Create EiscApis
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ICommunicationMonitor comm = null;
|
ICommunicationMonitor comm = null;
|
||||||
foreach (var device in DeviceManager.AllDevices)
|
foreach (var device in DeviceManager.AllDevices)
|
||||||
{
|
{
|
||||||
if (device.Key == this.Properties.connectionDeviceKey)
|
if (device.Key == this.Properties.connectionDeviceKey)
|
||||||
{
|
{
|
||||||
if (!(device is ICommunicationMonitor))
|
if (!(device is ICommunicationMonitor))
|
||||||
{
|
{
|
||||||
comm = device as ICommunicationMonitor;
|
comm = device as ICommunicationMonitor;
|
||||||
}
|
}
|
||||||
Debug.Console(2, "deviceKey {0} Matches", device.Key);
|
Debug.Console(2, "deviceKey {0} Matches", device.Key);
|
||||||
Dsp = DeviceManager.GetDeviceForKey(device.Key) as PepperDash.Essentials.Devices.Common.DSP.QscDsp;
|
Dsp = DeviceManager.GetDeviceForKey(device.Key) as PepperDash.Essentials.Devices.Common.DSP.QscDsp;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Console(2, "deviceKey {0} doesn't match", device.Key);
|
Debug.Console(2, "deviceKey {0} doesn't match", device.Key);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Properties.EiscApiIpids != null && Dsp != null)
|
if (Properties.EiscApiIpids != null && Dsp != null)
|
||||||
{
|
{
|
||||||
foreach (string Ipid in Properties.EiscApiIpids)
|
foreach (string Ipid in Properties.EiscApiIpids)
|
||||||
{
|
{
|
||||||
var ApiEisc = new BridgeApiEisc(Ipid);
|
var ApiEisc = new BridgeApiEisc(Ipid);
|
||||||
Debug.Console(2, "Connecting EiscApi {0} to {1}", ApiEisc.Ipid, Dsp.Name);
|
Debug.Console(2, "Connecting EiscApi {0} to {1}", ApiEisc.Ipid, Dsp.Name);
|
||||||
ushort x = 1;
|
ushort x = 1;
|
||||||
if (comm != null)
|
if (comm != null)
|
||||||
{
|
{
|
||||||
comm.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.Online]);
|
comm.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.Online]);
|
||||||
}
|
}
|
||||||
foreach (var channel in Dsp.LevelControlPoints)
|
foreach (var channel in Dsp.LevelControlPoints)
|
||||||
{
|
{
|
||||||
//var QscChannel = channel.Value as PepperDash.Essentials.Devices.Common.DSP.QscDspLevelControl;
|
//var QscChannel = channel.Value as PepperDash.Essentials.Devices.Common.DSP.QscDspLevelControl;
|
||||||
Debug.Console(2, "QscChannel {0} connect", x);
|
Debug.Console(2, "QscChannel {0} connect", x);
|
||||||
|
|
||||||
var genericChannel = channel.Value as IBasicVolumeWithFeedback;
|
var genericChannel = channel.Value as IBasicVolumeWithFeedback;
|
||||||
if (channel.Value.Enabled)
|
if (channel.Value.Enabled)
|
||||||
{
|
{
|
||||||
ApiEisc.Eisc.StringInput[ApiMap.channelName[x]].StringValue = channel.Value.LevelCustomName;
|
ApiEisc.Eisc.StringInput[ApiMap.channelName[x]].StringValue = channel.Value.LevelCustomName;
|
||||||
ApiEisc.Eisc.UShortInput[ApiMap.channelType[x]].UShortValue = (ushort)channel.Value.Type;
|
ApiEisc.Eisc.UShortInput[ApiMap.channelType[x]].UShortValue = (ushort)channel.Value.Type;
|
||||||
|
|
||||||
genericChannel.MuteFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.channelMuteToggle[x]]);
|
genericChannel.MuteFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.channelMuteToggle[x]]);
|
||||||
genericChannel.VolumeLevelFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.channelVolume[x]]);
|
genericChannel.VolumeLevelFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.channelVolume[x]]);
|
||||||
|
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.channelMuteToggle[x], () => genericChannel.MuteToggle());
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.channelMuteToggle[x], () => genericChannel.MuteToggle());
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.channelMuteOn[x], () => genericChannel.MuteOn());
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.channelMuteOn[x], () => genericChannel.MuteOn());
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.channelMuteOff[x], () => genericChannel.MuteOff());
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.channelMuteOff[x], () => genericChannel.MuteOff());
|
||||||
|
|
||||||
ApiEisc.Eisc.SetBoolSigAction(ApiMap.channelVolumeUp[x], b => genericChannel.VolumeUp(b));
|
ApiEisc.Eisc.SetBoolSigAction(ApiMap.channelVolumeUp[x], b => genericChannel.VolumeUp(b));
|
||||||
ApiEisc.Eisc.SetBoolSigAction(ApiMap.channelVolumeDown[x], b => genericChannel.VolumeDown(b));
|
ApiEisc.Eisc.SetBoolSigAction(ApiMap.channelVolumeDown[x], b => genericChannel.VolumeDown(b));
|
||||||
|
|
||||||
ApiEisc.Eisc.SetUShortSigAction(ApiMap.channelVolume[x], u => genericChannel.SetVolume(u));
|
ApiEisc.Eisc.SetUShortSigAction(ApiMap.channelVolume[x], u => genericChannel.SetVolume(u));
|
||||||
ApiEisc.Eisc.SetStringSigAction(ApiMap.presetString, s => Dsp.RunPreset(s));
|
ApiEisc.Eisc.SetStringSigAction(ApiMap.presetString, s => Dsp.RunPreset(s));
|
||||||
}
|
}
|
||||||
x++;
|
x++;
|
||||||
|
|
||||||
}
|
}
|
||||||
x = 1;
|
x = 1;
|
||||||
foreach (var preset in Dsp.PresetList)
|
foreach (var preset in Dsp.PresetList)
|
||||||
{
|
{
|
||||||
ApiEisc.Eisc.StringInput[ApiMap.presets[x]].StringValue = preset.label;
|
ApiEisc.Eisc.StringInput[ApiMap.presets[x]].StringValue = preset.label;
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.presets[x], () => Dsp.RunPresetNumber(x));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.presets[x], () => Dsp.RunPresetNumber(x));
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
foreach (var dialer in Dsp.Dialers)
|
foreach (var dialer in Dsp.Dialers)
|
||||||
{
|
{
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad0, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num0));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad0, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num0));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad1, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num1));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad1, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num1));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad2, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num2));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad2, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num2));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad3, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num3));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad3, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num3));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad4, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num4));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad4, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num4));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad5, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num5));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad5, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num5));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad6, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num6));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad6, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num6));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad7, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num7));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad7, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num7));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad8, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num8));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad8, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num8));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad9, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num9));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Keypad9, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Num9));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.KeypadStar, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Star));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.KeypadStar, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Star));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.KeypadPound, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Pound));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.KeypadPound, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Pound));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.KeypadClear, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Clear));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.KeypadClear, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Clear));
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.KeypadBackspace, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Backspace));
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.KeypadBackspace, () => dialer.Value.SendKeypad(PepperDash.Essentials.Devices.Common.DSP.QscDspDialer.eKeypadKeys.Backspace));
|
||||||
|
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Dial, () => dialer.Value.Dial());
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.Dial, () => dialer.Value.Dial());
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.DoNotDisturbToggle, () => dialer.Value.DoNotDisturbToggle());
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.DoNotDisturbToggle, () => dialer.Value.DoNotDisturbToggle());
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.DoNotDisturbOn, () => dialer.Value.DoNotDisturbOn());
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.DoNotDisturbOn, () => dialer.Value.DoNotDisturbOn());
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.DoNotDisturbOff, () => dialer.Value.DoNotDisturbOff());
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.DoNotDisturbOff, () => dialer.Value.DoNotDisturbOff());
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.AutoAnswerToggle, () => dialer.Value.AutoAnswerToggle());
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.AutoAnswerToggle, () => dialer.Value.AutoAnswerToggle());
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.AutoAnswerOn, () => dialer.Value.AutoAnswerOn());
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.AutoAnswerOn, () => dialer.Value.AutoAnswerOn());
|
||||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.AutoAnswerOff, () => dialer.Value.AutoAnswerOff());
|
ApiEisc.Eisc.SetSigTrueAction(ApiMap.AutoAnswerOff, () => dialer.Value.AutoAnswerOff());
|
||||||
|
|
||||||
dialer.Value.DoNotDisturbFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.DoNotDisturbToggle]);
|
dialer.Value.DoNotDisturbFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.DoNotDisturbToggle]);
|
||||||
dialer.Value.DoNotDisturbFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.DoNotDisturbOn]);
|
dialer.Value.DoNotDisturbFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.DoNotDisturbOn]);
|
||||||
dialer.Value.DoNotDisturbFeedback.LinkComplementInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.DoNotDisturbOff]);
|
dialer.Value.DoNotDisturbFeedback.LinkComplementInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.DoNotDisturbOff]);
|
||||||
|
|
||||||
dialer.Value.AutoAnswerFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.AutoAnswerToggle]);
|
dialer.Value.AutoAnswerFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.AutoAnswerToggle]);
|
||||||
dialer.Value.AutoAnswerFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.AutoAnswerOn]);
|
dialer.Value.AutoAnswerFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.AutoAnswerOn]);
|
||||||
dialer.Value.AutoAnswerFeedback.LinkComplementInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.AutoAnswerOff]);
|
dialer.Value.AutoAnswerFeedback.LinkComplementInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.AutoAnswerOff]);
|
||||||
|
|
||||||
dialer.Value.OffHookFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.Dial]);
|
dialer.Value.OffHookFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.Dial]);
|
||||||
dialer.Value.DialStringFeedback.LinkInputSig(ApiEisc.Eisc.StringInput[ApiMap.DialString]);
|
dialer.Value.DialStringFeedback.LinkInputSig(ApiEisc.Eisc.StringInput[ApiMap.DialString]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Debug.Console(2, "Name {0} Activated", this.Name);
|
Debug.Console(2, "Name {0} Activated", this.Name);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
Debug.Console(0, "Bridge {0}", e);
|
Debug.Console(0, "Bridge {0}", e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class EssentialDspProperties {
|
public class EssentialDspProperties {
|
||||||
public string connectionDeviceKey;
|
public string connectionDeviceKey;
|
||||||
public string[] EiscApiIpids;
|
public string[] EiscApiIpids;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class EssentialDspApiMap {
|
public class EssentialDspApiMap {
|
||||||
public ushort Online = 1;
|
public ushort Online = 1;
|
||||||
public ushort presetString = 2000;
|
public ushort presetString = 2000;
|
||||||
public Dictionary<uint, ushort> channelMuteToggle;
|
public Dictionary<uint, ushort> channelMuteToggle;
|
||||||
public Dictionary<uint, ushort> channelMuteOn;
|
public Dictionary<uint, ushort> channelMuteOn;
|
||||||
public Dictionary<uint, ushort> channelMuteOff;
|
public Dictionary<uint, ushort> channelMuteOff;
|
||||||
public Dictionary<uint, ushort> channelVolume;
|
public Dictionary<uint, ushort> channelVolume;
|
||||||
public Dictionary<uint, ushort> channelType;
|
public Dictionary<uint, ushort> channelType;
|
||||||
public Dictionary<uint, ushort> channelName;
|
public Dictionary<uint, ushort> channelName;
|
||||||
public Dictionary<uint, ushort> channelVolumeUp;
|
public Dictionary<uint, ushort> channelVolumeUp;
|
||||||
public Dictionary<uint, ushort> channelVolumeDown;
|
public Dictionary<uint, ushort> channelVolumeDown;
|
||||||
public Dictionary<uint, ushort> presets;
|
public Dictionary<uint, ushort> presets;
|
||||||
public ushort DialString = 3100;
|
public ushort DialString = 3100;
|
||||||
public ushort Keypad0 = 3110;
|
public ushort Keypad0 = 3110;
|
||||||
public ushort Keypad1 = 3111;
|
public ushort Keypad1 = 3111;
|
||||||
public ushort Keypad2 = 3112;
|
public ushort Keypad2 = 3112;
|
||||||
public ushort Keypad3 = 3113;
|
public ushort Keypad3 = 3113;
|
||||||
public ushort Keypad4 = 3114;
|
public ushort Keypad4 = 3114;
|
||||||
public ushort Keypad5 = 3115;
|
public ushort Keypad5 = 3115;
|
||||||
public ushort Keypad6 = 3116;
|
public ushort Keypad6 = 3116;
|
||||||
public ushort Keypad7 = 3117;
|
public ushort Keypad7 = 3117;
|
||||||
public ushort Keypad8 = 3118;
|
public ushort Keypad8 = 3118;
|
||||||
public ushort Keypad9 = 3119;
|
public ushort Keypad9 = 3119;
|
||||||
public ushort KeypadStar = 3120;
|
public ushort KeypadStar = 3120;
|
||||||
public ushort KeypadPound = 3121;
|
public ushort KeypadPound = 3121;
|
||||||
public ushort KeypadClear = 3122;
|
public ushort KeypadClear = 3122;
|
||||||
public ushort KeypadBackspace = 3123;
|
public ushort KeypadBackspace = 3123;
|
||||||
public ushort Dial = 3124;
|
public ushort Dial = 3124;
|
||||||
public ushort DoNotDisturbToggle = 3132;
|
public ushort DoNotDisturbToggle = 3132;
|
||||||
public ushort DoNotDisturbOn = 3133;
|
public ushort DoNotDisturbOn = 3133;
|
||||||
public ushort DoNotDisturbOff = 3134;
|
public ushort DoNotDisturbOff = 3134;
|
||||||
public ushort AutoAnswerToggle = 3127;
|
public ushort AutoAnswerToggle = 3127;
|
||||||
public ushort AutoAnswerOn = 3125;
|
public ushort AutoAnswerOn = 3125;
|
||||||
public ushort AutoAnswerOff = 3126;
|
public ushort AutoAnswerOff = 3126;
|
||||||
|
|
||||||
public EssentialDspApiMap() {
|
public EssentialDspApiMap() {
|
||||||
channelMuteToggle = new Dictionary<uint, ushort>();
|
channelMuteToggle = new Dictionary<uint, ushort>();
|
||||||
channelMuteOn = new Dictionary<uint, ushort>();
|
channelMuteOn = new Dictionary<uint, ushort>();
|
||||||
channelMuteOff = new Dictionary<uint, ushort>();
|
channelMuteOff = new Dictionary<uint, ushort>();
|
||||||
channelVolume = new Dictionary<uint, ushort>();
|
channelVolume = new Dictionary<uint, ushort>();
|
||||||
channelName = new Dictionary<uint, ushort>();
|
channelName = new Dictionary<uint, ushort>();
|
||||||
channelType = new Dictionary<uint, ushort>();
|
channelType = new Dictionary<uint, ushort>();
|
||||||
presets = new Dictionary<uint, ushort>();
|
presets = new Dictionary<uint, ushort>();
|
||||||
channelVolumeUp = new Dictionary<uint, ushort>();
|
channelVolumeUp = new Dictionary<uint, ushort>();
|
||||||
channelVolumeDown = new Dictionary<uint, ushort>();
|
channelVolumeDown = new Dictionary<uint, ushort>();
|
||||||
for (uint x = 1; x <= 100; x++) {
|
for (uint x = 1; x <= 100; x++) {
|
||||||
uint tempNum = x;
|
uint tempNum = x;
|
||||||
presets[tempNum] = (ushort)(tempNum + 100);
|
presets[tempNum] = (ushort)(tempNum + 100);
|
||||||
channelMuteToggle[tempNum] = (ushort)(tempNum + 400);
|
channelMuteToggle[tempNum] = (ushort)(tempNum + 400);
|
||||||
channelMuteOn[tempNum] = (ushort)(tempNum + 600);
|
channelMuteOn[tempNum] = (ushort)(tempNum + 600);
|
||||||
channelMuteOff[tempNum] = (ushort)(tempNum + 800);
|
channelMuteOff[tempNum] = (ushort)(tempNum + 800);
|
||||||
channelVolume[tempNum] = (ushort)(tempNum + 200);
|
channelVolume[tempNum] = (ushort)(tempNum + 200);
|
||||||
channelName[tempNum] = (ushort)(tempNum + 200);
|
channelName[tempNum] = (ushort)(tempNum + 200);
|
||||||
channelType[tempNum] = (ushort)(tempNum + 400);
|
channelType[tempNum] = (ushort)(tempNum + 400);
|
||||||
channelVolumeUp[tempNum] = (ushort)(tempNum + 1000);
|
channelVolumeUp[tempNum] = (ushort)(tempNum + 1000);
|
||||||
channelVolumeDown[tempNum] = (ushort)(tempNum + 1200);
|
channelVolumeDown[tempNum] = (ushort)(tempNum + 1200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,98 +1,98 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Essentials.DM;
|
using PepperDash.Essentials.DM;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core.Routing;
|
using PepperDash.Essentials.Core.Routing;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.EthernetCommunication;
|
using Crestron.SimplSharpPro.EthernetCommunication;
|
||||||
using Crestron.SimplSharpPro.DM;
|
using Crestron.SimplSharpPro.DM;
|
||||||
|
|
||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
{
|
{
|
||||||
public class EssentialsTVOne : PepperDash.Core.Device
|
public class EssentialsTVOne : PepperDash.Core.Device
|
||||||
{
|
{
|
||||||
public EssentialTVOneProperties Properties;
|
public EssentialTVOneProperties Properties;
|
||||||
public List<BridgeApiEisc> BridgeApiEiscs;
|
public List<BridgeApiEisc> BridgeApiEiscs;
|
||||||
private PepperDash.Essentials.Devices.Common.TVOneCorio TVOneCorio;
|
private PepperDash.Essentials.Devices.Common.TVOneCorio TVOneCorio;
|
||||||
private EssentialsTVOneApiMap ApiMap = new EssentialsTVOneApiMap();
|
private EssentialsTVOneApiMap ApiMap = new EssentialsTVOneApiMap();
|
||||||
public EssentialsTVOne(string key, string name, JToken properties)
|
public EssentialsTVOne(string key, string name, JToken properties)
|
||||||
: base(key, name)
|
: base(key, name)
|
||||||
{
|
{
|
||||||
Properties = JsonConvert.DeserializeObject<EssentialTVOneProperties>(properties.ToString());
|
Properties = JsonConvert.DeserializeObject<EssentialTVOneProperties>(properties.ToString());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public override bool CustomActivate() {
|
public override bool CustomActivate() {
|
||||||
// Create EiscApis
|
// Create EiscApis
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
foreach (var device in DeviceManager.AllDevices)
|
foreach (var device in DeviceManager.AllDevices)
|
||||||
{
|
{
|
||||||
if (device.Key == this.Properties.connectionDeviceKey)
|
if (device.Key == this.Properties.connectionDeviceKey)
|
||||||
{
|
{
|
||||||
Debug.Console(2, "deviceKey {0} Matches", device.Key);
|
Debug.Console(2, "deviceKey {0} Matches", device.Key);
|
||||||
TVOneCorio = DeviceManager.GetDeviceForKey(device.Key) as PepperDash.Essentials.Devices.Common.TVOneCorio;
|
TVOneCorio = DeviceManager.GetDeviceForKey(device.Key) as PepperDash.Essentials.Devices.Common.TVOneCorio;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Console(2, "deviceKey {0} doesn't match", device.Key);
|
Debug.Console(2, "deviceKey {0} doesn't match", device.Key);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Properties.EiscApiIpids != null && TVOneCorio != null)
|
if (Properties.EiscApiIpids != null && TVOneCorio != null)
|
||||||
{
|
{
|
||||||
foreach (string Ipid in Properties.EiscApiIpids)
|
foreach (string Ipid in Properties.EiscApiIpids)
|
||||||
{
|
{
|
||||||
var ApiEisc = new BridgeApiEisc(Ipid);
|
var ApiEisc = new BridgeApiEisc(Ipid);
|
||||||
Debug.Console(2, "Connecting EiscApi {0} to {1}", ApiEisc.Ipid, TVOneCorio.Name);
|
Debug.Console(2, "Connecting EiscApi {0} to {1}", ApiEisc.Ipid, TVOneCorio.Name);
|
||||||
ushort x = 1;
|
ushort x = 1;
|
||||||
TVOneCorio.OnlineFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.Online]);
|
TVOneCorio.OnlineFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.Online]);
|
||||||
ApiEisc.Eisc.SetUShortSigAction(ApiMap.CallPreset, u => TVOneCorio.CallPreset(u));
|
ApiEisc.Eisc.SetUShortSigAction(ApiMap.CallPreset, u => TVOneCorio.CallPreset(u));
|
||||||
TVOneCorio.PresetFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.PresetFeedback]);
|
TVOneCorio.PresetFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.PresetFeedback]);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Debug.Console(2, "Name {0} Activated", this.Name);
|
Debug.Console(2, "Name {0} Activated", this.Name);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
Debug.Console(0, "Bridge {0}", e);
|
Debug.Console(0, "Bridge {0}", e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class EssentialTVOneProperties
|
public class EssentialTVOneProperties
|
||||||
{
|
{
|
||||||
public string connectionDeviceKey;
|
public string connectionDeviceKey;
|
||||||
public string[] EiscApiIpids;
|
public string[] EiscApiIpids;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class EssentialsTVOneApiMap
|
public class EssentialsTVOneApiMap
|
||||||
{
|
{
|
||||||
public ushort CallPreset = 1;
|
public ushort CallPreset = 1;
|
||||||
public ushort PresetFeedback = 1;
|
public ushort PresetFeedback = 1;
|
||||||
public ushort Online = 1;
|
public ushort Online = 1;
|
||||||
|
|
||||||
public EssentialsTVOneApiMap()
|
public EssentialsTVOneApiMap()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,74 +1,74 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Devices.Common;
|
using PepperDash.Essentials.Devices.Common;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public static class GenericLightingApiExtensions
|
public static class GenericLightingApiExtensions
|
||||||
{
|
{
|
||||||
public static void LinkToApi(this PepperDash.Essentials.Core.Lighting.LightingBase lightingDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
|
public static void LinkToApi(this PepperDash.Essentials.Core.Lighting.LightingBase lightingDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
|
||||||
{
|
{
|
||||||
GenericLightingJoinMap joinMap = new GenericLightingJoinMap();
|
GenericLightingJoinMap joinMap = new GenericLightingJoinMap();
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<GenericLightingJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<GenericLightingJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
joinMap.OffsetJoinNumbers(joinStart);
|
||||||
|
|
||||||
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
Debug.Console(0, "Linking to Lighting Type {0}", lightingDevice.GetType().Name.ToString());
|
Debug.Console(0, "Linking to Lighting Type {0}", lightingDevice.GetType().Name.ToString());
|
||||||
|
|
||||||
// GenericLighitng Actions & FeedBack
|
// GenericLighitng Actions & FeedBack
|
||||||
trilist.SetUShortSigAction(joinMap.SelectScene, u => lightingDevice.SelectScene(lightingDevice.LightingScenes[u]));
|
trilist.SetUShortSigAction(joinMap.SelectScene, u => lightingDevice.SelectScene(lightingDevice.LightingScenes[u]));
|
||||||
|
|
||||||
int sceneIndex = 1;
|
int sceneIndex = 1;
|
||||||
foreach (var scene in lightingDevice.LightingScenes)
|
foreach (var scene in lightingDevice.LightingScenes)
|
||||||
{
|
{
|
||||||
var tempIndex = sceneIndex - 1;
|
var tempIndex = sceneIndex - 1;
|
||||||
trilist.SetSigTrueAction((uint)(joinMap.LightingSceneOffset + sceneIndex), () => lightingDevice.SelectScene(lightingDevice.LightingScenes[tempIndex]));
|
trilist.SetSigTrueAction((uint)(joinMap.LightingSceneOffset + sceneIndex), () => lightingDevice.SelectScene(lightingDevice.LightingScenes[tempIndex]));
|
||||||
scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)]);
|
scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)]);
|
||||||
trilist.StringInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)].StringValue = scene.Name;
|
trilist.StringInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)].StringValue = scene.Name;
|
||||||
trilist.BooleanInput[(uint)(joinMap.ButtonVisibilityOffset + sceneIndex)].BoolValue = true;
|
trilist.BooleanInput[(uint)(joinMap.ButtonVisibilityOffset + sceneIndex)].BoolValue = true;
|
||||||
sceneIndex++;
|
sceneIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lightingDevice.GetType().Name.ToString() == "LutronQuantumArea")
|
if (lightingDevice.GetType().Name.ToString() == "LutronQuantumArea")
|
||||||
{
|
{
|
||||||
var lutronDevice = lightingDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea;
|
var lutronDevice = lightingDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea;
|
||||||
lutronDevice.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
lutronDevice.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
||||||
trilist.SetStringSigAction(joinMap.IntegrationIdSet, s => lutronDevice.IntegrationId = s);
|
trilist.SetStringSigAction(joinMap.IntegrationIdSet, s => lutronDevice.IntegrationId = s);
|
||||||
}
|
}
|
||||||
|
|
||||||
//ApiEisc.Eisc.SetStringSigAction(ApiMap.integrationID, (s) => { lutronLights.IntegrationId = s; });
|
//ApiEisc.Eisc.SetStringSigAction(ApiMap.integrationID, (s) => { lutronLights.IntegrationId = s; });
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
var lutronLights = lightingDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea;
|
var lutronLights = lightingDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea;
|
||||||
|
|
||||||
|
|
||||||
for (uint i = 1; i <= lightingBase.CircuitCount; i++)
|
for (uint i = 1; i <= lightingBase.CircuitCount; i++)
|
||||||
{
|
{
|
||||||
var circuit = i;
|
var circuit = i;
|
||||||
lightingBase.CircuitNameFeedbacks[circuit - 1].LinkInputSig(trilist.StringInput[joinMap.CircuitNames + circuit]);
|
lightingBase.CircuitNameFeedbacks[circuit - 1].LinkInputSig(trilist.StringInput[joinMap.CircuitNames + circuit]);
|
||||||
lightingBase.CircuitIsCritical[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitIsCritical + circuit]);
|
lightingBase.CircuitIsCritical[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitIsCritical + circuit]);
|
||||||
lightingBase.CircuitState[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitState + circuit]);
|
lightingBase.CircuitState[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitState + circuit]);
|
||||||
trilist.SetSigTrueAction(joinMap.CircuitCycle + circuit, () => lightingBase.CycleCircuit(circuit - 1));
|
trilist.SetSigTrueAction(joinMap.CircuitCycle + circuit, () => lightingBase.CycleCircuit(circuit - 1));
|
||||||
trilist.SetSigTrueAction(joinMap.CircuitOnCmd + circuit, () => lightingBase.TurnOnCircuit(circuit - 1));
|
trilist.SetSigTrueAction(joinMap.CircuitOnCmd + circuit, () => lightingBase.TurnOnCircuit(circuit - 1));
|
||||||
trilist.SetSigTrueAction(joinMap.CircuitOffCmd + circuit, () => lightingBase.TurnOffCircuit(circuit - 1));
|
trilist.SetSigTrueAction(joinMap.CircuitOffCmd + circuit, () => lightingBase.TurnOffCircuit(circuit - 1));
|
||||||
|
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,125 +1,125 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
|
|
||||||
using PepperDash.Essentials.Devices.Common.Occupancy;
|
using PepperDash.Essentials.Devices.Common.Occupancy;
|
||||||
|
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public static class GlsOccupancySensorBaseControllerApiExtensions
|
public static class GlsOccupancySensorBaseControllerApiExtensions
|
||||||
{
|
{
|
||||||
public static void LinkToApi(this GlsOccupancySensorBaseController occController, BasicTriList trilist, uint joinStart, string joinMapKey)
|
public static void LinkToApi(this GlsOccupancySensorBaseController occController, BasicTriList trilist, uint joinStart, string joinMapKey)
|
||||||
{
|
{
|
||||||
GlsOccupancySensorBaseJoinMap joinMap = new GlsOccupancySensorBaseJoinMap();
|
GlsOccupancySensorBaseJoinMap joinMap = new GlsOccupancySensorBaseJoinMap();
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<GlsOccupancySensorBaseJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<GlsOccupancySensorBaseJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
joinMap.OffsetJoinNumbers(joinStart);
|
||||||
|
|
||||||
Debug.Console(1, occController, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, occController, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
#region Single and Dual Sensor Stuff
|
#region Single and Dual Sensor Stuff
|
||||||
occController.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
occController.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
||||||
trilist.StringInput[joinMap.Name].StringValue = occController.Name;
|
trilist.StringInput[joinMap.Name].StringValue = occController.Name;
|
||||||
|
|
||||||
trilist.OnlineStatusChange += new Crestron.SimplSharpPro.OnlineStatusChangeEventHandler((d, args) =>
|
trilist.OnlineStatusChange += new Crestron.SimplSharpPro.OnlineStatusChangeEventHandler((d, args) =>
|
||||||
{
|
{
|
||||||
if (args.DeviceOnLine)
|
if (args.DeviceOnLine)
|
||||||
{
|
{
|
||||||
trilist.StringInput[joinMap.Name].StringValue = occController.Name;
|
trilist.StringInput[joinMap.Name].StringValue = occController.Name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// Occupied status
|
// Occupied status
|
||||||
trilist.SetSigTrueAction(joinMap.ForceOccupied, new Action(() => occController.ForceOccupied()));
|
trilist.SetSigTrueAction(joinMap.ForceOccupied, new Action(() => occController.ForceOccupied()));
|
||||||
trilist.SetSigTrueAction(joinMap.ForceVacant, new Action(() => occController.ForceVacant()));
|
trilist.SetSigTrueAction(joinMap.ForceVacant, new Action(() => occController.ForceVacant()));
|
||||||
occController.RoomIsOccupiedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RoomOccupiedFeedback]);
|
occController.RoomIsOccupiedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RoomOccupiedFeedback]);
|
||||||
occController.RoomIsOccupiedFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.RoomVacantFeedback]);
|
occController.RoomIsOccupiedFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.RoomVacantFeedback]);
|
||||||
occController.RawOccupancyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyFeedback]);
|
occController.RawOccupancyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyFeedback]);
|
||||||
trilist.SetBoolSigAction(joinMap.EnableRawStates, new Action<bool>((b) => occController.EnableRawStates(b)));
|
trilist.SetBoolSigAction(joinMap.EnableRawStates, new Action<bool>((b) => occController.EnableRawStates(b)));
|
||||||
|
|
||||||
// Timouts
|
// Timouts
|
||||||
trilist.SetUShortSigAction(joinMap.Timeout, new Action<ushort>((u) => occController.SetRemoteTimeout(u)));
|
trilist.SetUShortSigAction(joinMap.Timeout, new Action<ushort>((u) => occController.SetRemoteTimeout(u)));
|
||||||
occController.CurrentTimeoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.Timeout]);
|
occController.CurrentTimeoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.Timeout]);
|
||||||
occController.LocalTimoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeoutLocalFeedback]);
|
occController.LocalTimoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeoutLocalFeedback]);
|
||||||
|
|
||||||
// LED Flash
|
// LED Flash
|
||||||
trilist.SetSigTrueAction(joinMap.EnableLedFlash, new Action(() => occController.SetLedFlashEnable(true)));
|
trilist.SetSigTrueAction(joinMap.EnableLedFlash, new Action(() => occController.SetLedFlashEnable(true)));
|
||||||
trilist.SetSigTrueAction(joinMap.DisableLedFlash, new Action(() => occController.SetLedFlashEnable(false)));
|
trilist.SetSigTrueAction(joinMap.DisableLedFlash, new Action(() => occController.SetLedFlashEnable(false)));
|
||||||
occController.LedFlashEnabledFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.EnableLedFlash]);
|
occController.LedFlashEnabledFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.EnableLedFlash]);
|
||||||
|
|
||||||
// Short Timeout
|
// Short Timeout
|
||||||
trilist.SetSigTrueAction(joinMap.EnableShortTimeout, new Action(() => occController.SetShortTimeoutState(true)));
|
trilist.SetSigTrueAction(joinMap.EnableShortTimeout, new Action(() => occController.SetShortTimeoutState(true)));
|
||||||
trilist.SetSigTrueAction(joinMap.DisableShortTimeout, new Action(() => occController.SetShortTimeoutState(false)));
|
trilist.SetSigTrueAction(joinMap.DisableShortTimeout, new Action(() => occController.SetShortTimeoutState(false)));
|
||||||
occController.ShortTimeoutEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableShortTimeout]);
|
occController.ShortTimeoutEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableShortTimeout]);
|
||||||
|
|
||||||
// PIR Sensor
|
// PIR Sensor
|
||||||
trilist.SetSigTrueAction(joinMap.EnablePir, new Action(() => occController.SetPirEnable(true)));
|
trilist.SetSigTrueAction(joinMap.EnablePir, new Action(() => occController.SetPirEnable(true)));
|
||||||
trilist.SetSigTrueAction(joinMap.DisablePir, new Action(() => occController.SetPirEnable(false)));
|
trilist.SetSigTrueAction(joinMap.DisablePir, new Action(() => occController.SetPirEnable(false)));
|
||||||
occController.PirSensorEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnablePir]);
|
occController.PirSensorEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnablePir]);
|
||||||
|
|
||||||
// PIR Sensitivity in Occupied State
|
// PIR Sensitivity in Occupied State
|
||||||
trilist.SetBoolSigAction(joinMap.IncrementPirInOccupiedState, new Action<bool>((b) => occController.IncrementPirSensitivityInOccupiedState(b)));
|
trilist.SetBoolSigAction(joinMap.IncrementPirInOccupiedState, new Action<bool>((b) => occController.IncrementPirSensitivityInOccupiedState(b)));
|
||||||
trilist.SetBoolSigAction(joinMap.DecrementPirInOccupiedState, new Action<bool>((b) => occController.DecrementPirSensitivityInOccupiedState(b)));
|
trilist.SetBoolSigAction(joinMap.DecrementPirInOccupiedState, new Action<bool>((b) => occController.DecrementPirSensitivityInOccupiedState(b)));
|
||||||
occController.PirSensitivityInOccupiedStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.PirSensitivityInOccupiedState]);
|
occController.PirSensitivityInOccupiedStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.PirSensitivityInOccupiedState]);
|
||||||
|
|
||||||
// PIR Sensitivity in Vacant State
|
// PIR Sensitivity in Vacant State
|
||||||
trilist.SetBoolSigAction(joinMap.IncrementPirInVacantState, new Action<bool>((b) => occController.IncrementPirSensitivityInVacantState(b)));
|
trilist.SetBoolSigAction(joinMap.IncrementPirInVacantState, new Action<bool>((b) => occController.IncrementPirSensitivityInVacantState(b)));
|
||||||
trilist.SetBoolSigAction(joinMap.DecrementPirInVacantState, new Action<bool>((b) => occController.DecrementPirSensitivityInVacantState(b)));
|
trilist.SetBoolSigAction(joinMap.DecrementPirInVacantState, new Action<bool>((b) => occController.DecrementPirSensitivityInVacantState(b)));
|
||||||
occController.PirSensitivityInVacantStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.PirSensitivityInVacantState]);
|
occController.PirSensitivityInVacantStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.PirSensitivityInVacantState]);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Dual Technology Sensor Stuff
|
#region Dual Technology Sensor Stuff
|
||||||
var odtOccController = occController as GlsOdtOccupancySensorController;
|
var odtOccController = occController as GlsOdtOccupancySensorController;
|
||||||
|
|
||||||
if (odtOccController != null)
|
if (odtOccController != null)
|
||||||
{
|
{
|
||||||
// OR When Vacated
|
// OR When Vacated
|
||||||
trilist.SetBoolSigAction(joinMap.OrWhenVacated, new Action<bool>((b) => odtOccController.SetOrWhenVacatedState(b)));
|
trilist.SetBoolSigAction(joinMap.OrWhenVacated, new Action<bool>((b) => odtOccController.SetOrWhenVacatedState(b)));
|
||||||
odtOccController.OrWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.OrWhenVacated]);
|
odtOccController.OrWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.OrWhenVacated]);
|
||||||
|
|
||||||
// AND When Vacated
|
// AND When Vacated
|
||||||
trilist.SetBoolSigAction(joinMap.AndWhenVacated, new Action<bool>((b) => odtOccController.SetAndWhenVacatedState(b)));
|
trilist.SetBoolSigAction(joinMap.AndWhenVacated, new Action<bool>((b) => odtOccController.SetAndWhenVacatedState(b)));
|
||||||
odtOccController.AndWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AndWhenVacated]);
|
odtOccController.AndWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AndWhenVacated]);
|
||||||
|
|
||||||
// Ultrasonic A Sensor
|
// Ultrasonic A Sensor
|
||||||
trilist.SetSigTrueAction(joinMap.EnableUsA, new Action(() => odtOccController.SetUsAEnable(true)));
|
trilist.SetSigTrueAction(joinMap.EnableUsA, new Action(() => odtOccController.SetUsAEnable(true)));
|
||||||
trilist.SetSigTrueAction(joinMap.DisableUsA, new Action(() => odtOccController.SetUsAEnable(false)));
|
trilist.SetSigTrueAction(joinMap.DisableUsA, new Action(() => odtOccController.SetUsAEnable(false)));
|
||||||
odtOccController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsA]);
|
odtOccController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsA]);
|
||||||
|
|
||||||
// Ultrasonic B Sensor
|
// Ultrasonic B Sensor
|
||||||
trilist.SetSigTrueAction(joinMap.EnableUsB, new Action(() => odtOccController.SetUsBEnable(true)));
|
trilist.SetSigTrueAction(joinMap.EnableUsB, new Action(() => odtOccController.SetUsBEnable(true)));
|
||||||
trilist.SetSigTrueAction(joinMap.DisableUsB, new Action(() => odtOccController.SetUsBEnable(false)));
|
trilist.SetSigTrueAction(joinMap.DisableUsB, new Action(() => odtOccController.SetUsBEnable(false)));
|
||||||
odtOccController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsB]);
|
odtOccController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsB]);
|
||||||
|
|
||||||
// US Sensitivity in Occupied State
|
// US Sensitivity in Occupied State
|
||||||
trilist.SetBoolSigAction(joinMap.IncrementUsInOccupiedState, new Action<bool>((b) => odtOccController.IncrementUsSensitivityInOccupiedState(b)));
|
trilist.SetBoolSigAction(joinMap.IncrementUsInOccupiedState, new Action<bool>((b) => odtOccController.IncrementUsSensitivityInOccupiedState(b)));
|
||||||
trilist.SetBoolSigAction(joinMap.DecrementUsInOccupiedState, new Action<bool>((b) => odtOccController.DecrementUsSensitivityInOccupiedState(b)));
|
trilist.SetBoolSigAction(joinMap.DecrementUsInOccupiedState, new Action<bool>((b) => odtOccController.DecrementUsSensitivityInOccupiedState(b)));
|
||||||
odtOccController.UltrasonicSensitivityInOccupiedStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.UsSensitivityInOccupiedState]);
|
odtOccController.UltrasonicSensitivityInOccupiedStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.UsSensitivityInOccupiedState]);
|
||||||
|
|
||||||
// US Sensitivity in Vacant State
|
// US Sensitivity in Vacant State
|
||||||
trilist.SetBoolSigAction(joinMap.IncrementUsInVacantState, new Action<bool>((b) => odtOccController.IncrementUsSensitivityInVacantState(b)));
|
trilist.SetBoolSigAction(joinMap.IncrementUsInVacantState, new Action<bool>((b) => odtOccController.IncrementUsSensitivityInVacantState(b)));
|
||||||
trilist.SetBoolSigAction(joinMap.DecrementUsInVacantState, new Action<bool>((b) => odtOccController.DecrementUsSensitivityInVacantState(b)));
|
trilist.SetBoolSigAction(joinMap.DecrementUsInVacantState, new Action<bool>((b) => odtOccController.DecrementUsSensitivityInVacantState(b)));
|
||||||
odtOccController.UltrasonicSensitivityInVacantStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.UsSensitivityInVacantState]);
|
odtOccController.UltrasonicSensitivityInVacantStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.UsSensitivityInVacantState]);
|
||||||
|
|
||||||
//Sensor Raw States
|
//Sensor Raw States
|
||||||
odtOccController.RawOccupancyPirFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyPirFeedback]);
|
odtOccController.RawOccupancyPirFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyPirFeedback]);
|
||||||
odtOccController.RawOccupancyUsFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyUsFeedback]);
|
odtOccController.RawOccupancyUsFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyUsFeedback]);
|
||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,128 +1,128 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Devices.Common;
|
using PepperDash.Essentials.Devices.Common;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public static class IRSetTopBoxBaseApiExtensions
|
public static class IRSetTopBoxBaseApiExtensions
|
||||||
{
|
{
|
||||||
public static void LinkToApi(this PepperDash.Essentials.Devices.Common.IRSetTopBoxBase stbDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
|
public static void LinkToApi(this PepperDash.Essentials.Devices.Common.IRSetTopBoxBase stbDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
|
||||||
{
|
{
|
||||||
SetTopBoxControllerJoinMap joinMap = new SetTopBoxControllerJoinMap();
|
SetTopBoxControllerJoinMap joinMap = new SetTopBoxControllerJoinMap();
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<SetTopBoxControllerJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<SetTopBoxControllerJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
joinMap.OffsetJoinNumbers(joinStart);
|
||||||
|
|
||||||
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
Debug.Console(0, "Linking to Display: {0}", stbDevice.Name);
|
Debug.Console(0, "Linking to Display: {0}", stbDevice.Name);
|
||||||
|
|
||||||
trilist.StringInput[joinMap.Name].StringValue = stbDevice.Name;
|
trilist.StringInput[joinMap.Name].StringValue = stbDevice.Name;
|
||||||
|
|
||||||
var stbBase = stbDevice as ISetTopBoxControls;
|
var stbBase = stbDevice as ISetTopBoxControls;
|
||||||
if (stbBase != null)
|
if (stbBase != null)
|
||||||
{
|
{
|
||||||
trilist.BooleanInput[joinMap.HasDpad].BoolValue = stbBase.HasDpad;
|
trilist.BooleanInput[joinMap.HasDpad].BoolValue = stbBase.HasDpad;
|
||||||
trilist.BooleanInput[joinMap.HasNumeric].BoolValue = stbBase.HasNumeric;
|
trilist.BooleanInput[joinMap.HasNumeric].BoolValue = stbBase.HasNumeric;
|
||||||
trilist.BooleanInput[joinMap.HasDvr].BoolValue = stbBase.HasDvr;
|
trilist.BooleanInput[joinMap.HasDvr].BoolValue = stbBase.HasDvr;
|
||||||
trilist.BooleanInput[joinMap.HasPresets].BoolValue = stbBase.HasPresets;
|
trilist.BooleanInput[joinMap.HasPresets].BoolValue = stbBase.HasPresets;
|
||||||
|
|
||||||
trilist.SetBoolSigAction(joinMap.DvrList, (b) => stbBase.DvrList(b));
|
trilist.SetBoolSigAction(joinMap.DvrList, (b) => stbBase.DvrList(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Replay, (b) => stbBase.Replay(b));
|
trilist.SetBoolSigAction(joinMap.Replay, (b) => stbBase.Replay(b));
|
||||||
|
|
||||||
trilist.SetStringSigAction(joinMap.LoadPresets, (s) => stbBase.LoadPresets(s));
|
trilist.SetStringSigAction(joinMap.LoadPresets, (s) => stbBase.LoadPresets(s));
|
||||||
}
|
}
|
||||||
|
|
||||||
var stbPower = stbDevice as IPower;
|
var stbPower = stbDevice as IPower;
|
||||||
if (stbPower != null)
|
if (stbPower != null)
|
||||||
{
|
{
|
||||||
trilist.SetSigTrueAction(joinMap.PowerOn, () => stbPower.PowerOn());
|
trilist.SetSigTrueAction(joinMap.PowerOn, () => stbPower.PowerOn());
|
||||||
trilist.SetSigTrueAction(joinMap.PowerOff, () => stbPower.PowerOff());
|
trilist.SetSigTrueAction(joinMap.PowerOff, () => stbPower.PowerOff());
|
||||||
trilist.SetSigTrueAction(joinMap.PowerToggle, () => stbPower.PowerToggle());
|
trilist.SetSigTrueAction(joinMap.PowerToggle, () => stbPower.PowerToggle());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var stbDPad = stbDevice as IDPad;
|
var stbDPad = stbDevice as IDPad;
|
||||||
if (stbDPad != null)
|
if (stbDPad != null)
|
||||||
{
|
{
|
||||||
trilist.SetBoolSigAction(joinMap.Up, (b) => stbDPad.Up(b));
|
trilist.SetBoolSigAction(joinMap.Up, (b) => stbDPad.Up(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Down, (b) => stbDPad.Down(b));
|
trilist.SetBoolSigAction(joinMap.Down, (b) => stbDPad.Down(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Left, (b) => stbDPad.Left(b));
|
trilist.SetBoolSigAction(joinMap.Left, (b) => stbDPad.Left(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Right, (b) => stbDPad.Right(b));
|
trilist.SetBoolSigAction(joinMap.Right, (b) => stbDPad.Right(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Select, (b) => stbDPad.Select(b));
|
trilist.SetBoolSigAction(joinMap.Select, (b) => stbDPad.Select(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Menu, (b) => stbDPad.Menu(b));
|
trilist.SetBoolSigAction(joinMap.Menu, (b) => stbDPad.Menu(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Exit, (b) => stbDPad.Exit(b));
|
trilist.SetBoolSigAction(joinMap.Exit, (b) => stbDPad.Exit(b));
|
||||||
}
|
}
|
||||||
|
|
||||||
var stbChannel = stbDevice as IChannel;
|
var stbChannel = stbDevice as IChannel;
|
||||||
if (stbChannel != null)
|
if (stbChannel != null)
|
||||||
{
|
{
|
||||||
trilist.SetBoolSigAction(joinMap.ChannelUp, (b) => stbChannel.ChannelUp(b));
|
trilist.SetBoolSigAction(joinMap.ChannelUp, (b) => stbChannel.ChannelUp(b));
|
||||||
trilist.SetBoolSigAction(joinMap.ChannelDown, (b) => stbChannel.ChannelDown(b));
|
trilist.SetBoolSigAction(joinMap.ChannelDown, (b) => stbChannel.ChannelDown(b));
|
||||||
trilist.SetBoolSigAction(joinMap.LastChannel, (b) => stbChannel.LastChannel(b));
|
trilist.SetBoolSigAction(joinMap.LastChannel, (b) => stbChannel.LastChannel(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Guide, (b) => stbChannel.Guide(b));
|
trilist.SetBoolSigAction(joinMap.Guide, (b) => stbChannel.Guide(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Info, (b) => stbChannel.Info(b));
|
trilist.SetBoolSigAction(joinMap.Info, (b) => stbChannel.Info(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Exit, (b) => stbChannel.Exit(b));
|
trilist.SetBoolSigAction(joinMap.Exit, (b) => stbChannel.Exit(b));
|
||||||
}
|
}
|
||||||
|
|
||||||
var stbColor = stbDevice as IColor;
|
var stbColor = stbDevice as IColor;
|
||||||
if (stbColor != null)
|
if (stbColor != null)
|
||||||
{
|
{
|
||||||
trilist.SetBoolSigAction(joinMap.Red, (b) => stbColor.Red(b));
|
trilist.SetBoolSigAction(joinMap.Red, (b) => stbColor.Red(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Green, (b) => stbColor.Green(b));
|
trilist.SetBoolSigAction(joinMap.Green, (b) => stbColor.Green(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Yellow, (b) => stbColor.Yellow(b));
|
trilist.SetBoolSigAction(joinMap.Yellow, (b) => stbColor.Yellow(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Blue, (b) => stbColor.Blue(b));
|
trilist.SetBoolSigAction(joinMap.Blue, (b) => stbColor.Blue(b));
|
||||||
}
|
}
|
||||||
|
|
||||||
var stbKeypad = stbDevice as ISetTopBoxNumericKeypad;
|
var stbKeypad = stbDevice as ISetTopBoxNumericKeypad;
|
||||||
if (stbKeypad != null)
|
if (stbKeypad != null)
|
||||||
{
|
{
|
||||||
trilist.StringInput[joinMap.KeypadAccessoryButton1Label].StringValue = stbKeypad.KeypadAccessoryButton1Label;
|
trilist.StringInput[joinMap.KeypadAccessoryButton1Label].StringValue = stbKeypad.KeypadAccessoryButton1Label;
|
||||||
trilist.StringInput[joinMap.KeypadAccessoryButton2Label].StringValue = stbKeypad.KeypadAccessoryButton2Label;
|
trilist.StringInput[joinMap.KeypadAccessoryButton2Label].StringValue = stbKeypad.KeypadAccessoryButton2Label;
|
||||||
|
|
||||||
trilist.BooleanInput[joinMap.HasKeypadAccessoryButton1].BoolValue = stbKeypad.HasKeypadAccessoryButton1;
|
trilist.BooleanInput[joinMap.HasKeypadAccessoryButton1].BoolValue = stbKeypad.HasKeypadAccessoryButton1;
|
||||||
trilist.BooleanInput[joinMap.HasKeypadAccessoryButton2].BoolValue = stbKeypad.HasKeypadAccessoryButton2;
|
trilist.BooleanInput[joinMap.HasKeypadAccessoryButton2].BoolValue = stbKeypad.HasKeypadAccessoryButton2;
|
||||||
|
|
||||||
trilist.SetBoolSigAction(joinMap.Digit0, (b) => stbKeypad.Digit0(b));
|
trilist.SetBoolSigAction(joinMap.Digit0, (b) => stbKeypad.Digit0(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Digit1, (b) => stbKeypad.Digit1(b));
|
trilist.SetBoolSigAction(joinMap.Digit1, (b) => stbKeypad.Digit1(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Digit2, (b) => stbKeypad.Digit2(b));
|
trilist.SetBoolSigAction(joinMap.Digit2, (b) => stbKeypad.Digit2(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Digit3, (b) => stbKeypad.Digit3(b));
|
trilist.SetBoolSigAction(joinMap.Digit3, (b) => stbKeypad.Digit3(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Digit4, (b) => stbKeypad.Digit4(b));
|
trilist.SetBoolSigAction(joinMap.Digit4, (b) => stbKeypad.Digit4(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Digit5, (b) => stbKeypad.Digit5(b));
|
trilist.SetBoolSigAction(joinMap.Digit5, (b) => stbKeypad.Digit5(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Digit6, (b) => stbKeypad.Digit6(b));
|
trilist.SetBoolSigAction(joinMap.Digit6, (b) => stbKeypad.Digit6(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Digit7, (b) => stbKeypad.Digit7(b));
|
trilist.SetBoolSigAction(joinMap.Digit7, (b) => stbKeypad.Digit7(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Digit8, (b) => stbKeypad.Digit8(b));
|
trilist.SetBoolSigAction(joinMap.Digit8, (b) => stbKeypad.Digit8(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Digit9, (b) => stbKeypad.Digit9(b));
|
trilist.SetBoolSigAction(joinMap.Digit9, (b) => stbKeypad.Digit9(b));
|
||||||
trilist.SetBoolSigAction(joinMap.KeypadAccessoryButton1Press, (b) => stbKeypad.KeypadAccessoryButton1(b));
|
trilist.SetBoolSigAction(joinMap.KeypadAccessoryButton1Press, (b) => stbKeypad.KeypadAccessoryButton1(b));
|
||||||
trilist.SetBoolSigAction(joinMap.KeypadAccessoryButton2Press, (b) => stbKeypad.KeypadAccessoryButton1(b));
|
trilist.SetBoolSigAction(joinMap.KeypadAccessoryButton2Press, (b) => stbKeypad.KeypadAccessoryButton1(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Dash, (b) => stbKeypad.Dash(b));
|
trilist.SetBoolSigAction(joinMap.Dash, (b) => stbKeypad.Dash(b));
|
||||||
trilist.SetBoolSigAction(joinMap.KeypadEnter, (b) => stbKeypad.KeypadEnter(b));
|
trilist.SetBoolSigAction(joinMap.KeypadEnter, (b) => stbKeypad.KeypadEnter(b));
|
||||||
}
|
}
|
||||||
|
|
||||||
var stbTransport = stbDevice as ITransport;
|
var stbTransport = stbDevice as ITransport;
|
||||||
if (stbTransport != null)
|
if (stbTransport != null)
|
||||||
{
|
{
|
||||||
trilist.SetBoolSigAction(joinMap.Play, (b) => stbTransport.Play(b));
|
trilist.SetBoolSigAction(joinMap.Play, (b) => stbTransport.Play(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Pause, (b) => stbTransport.Pause(b));
|
trilist.SetBoolSigAction(joinMap.Pause, (b) => stbTransport.Pause(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Rewind, (b) => stbTransport.Rewind(b));
|
trilist.SetBoolSigAction(joinMap.Rewind, (b) => stbTransport.Rewind(b));
|
||||||
trilist.SetBoolSigAction(joinMap.FFwd, (b) => stbTransport.FFwd(b));
|
trilist.SetBoolSigAction(joinMap.FFwd, (b) => stbTransport.FFwd(b));
|
||||||
trilist.SetBoolSigAction(joinMap.ChapMinus, (b) => stbTransport.ChapMinus(b));
|
trilist.SetBoolSigAction(joinMap.ChapMinus, (b) => stbTransport.ChapMinus(b));
|
||||||
trilist.SetBoolSigAction(joinMap.ChapPlus, (b) => stbTransport.ChapPlus(b));
|
trilist.SetBoolSigAction(joinMap.ChapPlus, (b) => stbTransport.ChapPlus(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Stop, (b) => stbTransport.Stop(b));
|
trilist.SetBoolSigAction(joinMap.Stop, (b) => stbTransport.Stop(b));
|
||||||
trilist.SetBoolSigAction(joinMap.Record, (b) => stbTransport.Record(b));
|
trilist.SetBoolSigAction(joinMap.Record, (b) => stbTransport.Record(b));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -38,12 +38,12 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
/// Reports the EDID serial number value
|
/// Reports the EDID serial number value
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public uint EdidSerialNumber { get; set; }
|
public uint EdidSerialNumber { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Analogs
|
#region Analogs
|
||||||
public uint AudioVideoSource { get; set; }
|
public uint AudioVideoSource { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public DmRmcControllerJoinMap()
|
public DmRmcControllerJoinMap()
|
||||||
{
|
{
|
||||||
// Digital
|
// Digital
|
||||||
@@ -56,7 +56,7 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
EdidPrefferedTiming = 4;
|
EdidPrefferedTiming = 4;
|
||||||
EdidSerialNumber = 5;
|
EdidSerialNumber = 5;
|
||||||
|
|
||||||
//Analog
|
//Analog
|
||||||
AudioVideoSource = 1;
|
AudioVideoSource = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
EdidManufacturer = EdidManufacturer + joinOffset;
|
EdidManufacturer = EdidManufacturer + joinOffset;
|
||||||
EdidName = EdidName + joinOffset;
|
EdidName = EdidName + joinOffset;
|
||||||
EdidPrefferedTiming = EdidPrefferedTiming + joinOffset;
|
EdidPrefferedTiming = EdidPrefferedTiming + joinOffset;
|
||||||
EdidSerialNumber = EdidSerialNumber + joinOffset;
|
EdidSerialNumber = EdidSerialNumber + joinOffset;
|
||||||
AudioVideoSource = AudioVideoSource + joinOffset;
|
AudioVideoSource = AudioVideoSource + joinOffset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,65 +1,65 @@
|
|||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.CrestronIO;
|
using PepperDash.Essentials.Core.CrestronIO;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public static class StatusSignDeviceApiExtensions
|
public static class StatusSignDeviceApiExtensions
|
||||||
{
|
{
|
||||||
public static void LinkToApi(this StatusSignController ssDevice, BasicTriList trilist, uint joinStart,
|
public static void LinkToApi(this StatusSignController ssDevice, BasicTriList trilist, uint joinStart,
|
||||||
string joinMapKey)
|
string joinMapKey)
|
||||||
{
|
{
|
||||||
var joinMap = new StatusSignControllerJoinMap();
|
var joinMap = new StatusSignControllerJoinMap();
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<StatusSignControllerJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<StatusSignControllerJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
joinMap.OffsetJoinNumbers(joinStart);
|
||||||
|
|
||||||
Debug.Console(1, ssDevice, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, ssDevice, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
trilist.SetBoolSigAction(joinMap.RedControl, b => EnableControl(trilist, joinMap, ssDevice));
|
trilist.SetBoolSigAction(joinMap.RedControl, b => EnableControl(trilist, joinMap, ssDevice));
|
||||||
trilist.SetBoolSigAction(joinMap.GreenControl, b => EnableControl(trilist, joinMap, ssDevice));
|
trilist.SetBoolSigAction(joinMap.GreenControl, b => EnableControl(trilist, joinMap, ssDevice));
|
||||||
trilist.SetBoolSigAction(joinMap.BlueControl, b => EnableControl(trilist, joinMap, ssDevice));
|
trilist.SetBoolSigAction(joinMap.BlueControl, b => EnableControl(trilist, joinMap, ssDevice));
|
||||||
|
|
||||||
trilist.SetUShortSigAction(joinMap.RedLed, u => SetColor(trilist, joinMap, ssDevice));
|
trilist.SetUShortSigAction(joinMap.RedLed, u => SetColor(trilist, joinMap, ssDevice));
|
||||||
trilist.SetUShortSigAction(joinMap.GreenLed, u => SetColor(trilist, joinMap, ssDevice));
|
trilist.SetUShortSigAction(joinMap.GreenLed, u => SetColor(trilist, joinMap, ssDevice));
|
||||||
trilist.SetUShortSigAction(joinMap.BlueLed, u => SetColor(trilist, joinMap, ssDevice));
|
trilist.SetUShortSigAction(joinMap.BlueLed, u => SetColor(trilist, joinMap, ssDevice));
|
||||||
|
|
||||||
trilist.StringInput[joinMap.Name].StringValue = ssDevice.Name;
|
trilist.StringInput[joinMap.Name].StringValue = ssDevice.Name;
|
||||||
|
|
||||||
ssDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
ssDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
||||||
ssDevice.RedLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RedControl]);
|
ssDevice.RedLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RedControl]);
|
||||||
ssDevice.BlueLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.BlueControl]);
|
ssDevice.BlueLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.BlueControl]);
|
||||||
ssDevice.GreenLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.GreenControl]);
|
ssDevice.GreenLedEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.GreenControl]);
|
||||||
|
|
||||||
ssDevice.RedLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.RedLed]);
|
ssDevice.RedLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.RedLed]);
|
||||||
ssDevice.BlueLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.BlueLed]);
|
ssDevice.BlueLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.BlueLed]);
|
||||||
ssDevice.GreenLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.GreenLed]);
|
ssDevice.GreenLedBrightnessFeedback.LinkInputSig(trilist.UShortInput[joinMap.GreenLed]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void EnableControl(BasicTriList triList, StatusSignControllerJoinMap joinMap,
|
private static void EnableControl(BasicTriList triList, StatusSignControllerJoinMap joinMap,
|
||||||
StatusSignController device)
|
StatusSignController device)
|
||||||
{
|
{
|
||||||
var redEnable = triList.BooleanOutput[joinMap.RedControl].BoolValue;
|
var redEnable = triList.BooleanOutput[joinMap.RedControl].BoolValue;
|
||||||
var greenEnable = triList.BooleanOutput[joinMap.GreenControl].BoolValue;
|
var greenEnable = triList.BooleanOutput[joinMap.GreenControl].BoolValue;
|
||||||
var blueEnable = triList.BooleanOutput[joinMap.BlueControl].BoolValue;
|
var blueEnable = triList.BooleanOutput[joinMap.BlueControl].BoolValue;
|
||||||
device.EnableLedControl(redEnable, greenEnable, blueEnable);
|
device.EnableLedControl(redEnable, greenEnable, blueEnable);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void SetColor(BasicTriList triList, StatusSignControllerJoinMap joinMap,
|
private static void SetColor(BasicTriList triList, StatusSignControllerJoinMap joinMap,
|
||||||
StatusSignController device)
|
StatusSignController device)
|
||||||
{
|
{
|
||||||
var redBrightness = triList.UShortOutput[joinMap.RedLed].UShortValue;
|
var redBrightness = triList.UShortOutput[joinMap.RedLed].UShortValue;
|
||||||
var greenBrightness = triList.UShortOutput[joinMap.GreenLed].UShortValue;
|
var greenBrightness = triList.UShortOutput[joinMap.GreenLed].UShortValue;
|
||||||
var blueBrightness = triList.UShortOutput[joinMap.BlueLed].UShortValue;
|
var blueBrightness = triList.UShortOutput[joinMap.BlueLed].UShortValue;
|
||||||
|
|
||||||
device.SetColor(redBrightness, greenBrightness, blueBrightness);
|
device.SetColor(redBrightness, greenBrightness, blueBrightness);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,47 +1,47 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharp.CrestronIO;
|
using Crestron.SimplSharp.CrestronIO;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharp.Reflection;
|
using Crestron.SimplSharp.Reflection;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
|
|
||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Responsible for loading all of the device types for this library
|
/// Responsible for loading all of the device types for this library
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DeviceFactory
|
public class DeviceFactory
|
||||||
{
|
{
|
||||||
|
|
||||||
public DeviceFactory()
|
public DeviceFactory()
|
||||||
{
|
{
|
||||||
var assy = Assembly.GetExecutingAssembly();
|
var assy = Assembly.GetExecutingAssembly();
|
||||||
PluginLoader.SetEssentialsAssembly(assy.GetName().Name, assy);
|
PluginLoader.SetEssentialsAssembly(assy.GetName().Name, assy);
|
||||||
|
|
||||||
var types = assy.GetTypes().Where(ct => typeof(IDeviceFactory).IsAssignableFrom(ct) && !ct.IsInterface && !ct.IsAbstract);
|
var types = assy.GetTypes().Where(ct => typeof(IDeviceFactory).IsAssignableFrom(ct) && !ct.IsInterface && !ct.IsAbstract);
|
||||||
|
|
||||||
if (types != null)
|
if (types != null)
|
||||||
{
|
{
|
||||||
foreach (var type in types)
|
foreach (var type in types)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var factory = (IDeviceFactory)Crestron.SimplSharp.Reflection.Activator.CreateInstance(type);
|
var factory = (IDeviceFactory)Crestron.SimplSharp.Reflection.Activator.CreateInstance(type);
|
||||||
factory.LoadTypeFactories();
|
factory.LoadTypeFactories();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to load type: '{1}' DeviceFactory: {0}", e, type.Name);
|
Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to load type: '{1}' DeviceFactory: {0}", e, type.Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,358 +1,358 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.Fusion;
|
using Crestron.SimplSharpPro.Fusion;
|
||||||
|
|
||||||
|
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Essentials.Core.Fusion;
|
using PepperDash.Essentials.Core.Fusion;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Fusion
|
namespace PepperDash.Essentials.Fusion
|
||||||
{
|
{
|
||||||
public class EssentialsHuddleVtc1FusionController : EssentialsHuddleSpaceFusionSystemControllerBase
|
public class EssentialsHuddleVtc1FusionController : EssentialsHuddleSpaceFusionSystemControllerBase
|
||||||
{
|
{
|
||||||
BooleanSigData CodecIsInCall;
|
BooleanSigData CodecIsInCall;
|
||||||
|
|
||||||
public EssentialsHuddleVtc1FusionController(IEssentialsHuddleVtc1Room room, uint ipId, string joinMapKey)
|
public EssentialsHuddleVtc1FusionController(IEssentialsHuddleVtc1Room room, uint ipId, string joinMapKey)
|
||||||
: base(room, ipId, joinMapKey)
|
: base(room, ipId, joinMapKey)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called in base class constructor before RVI and GUID files are built
|
/// Called in base class constructor before RVI and GUID files are built
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected override void ExecuteCustomSteps()
|
protected override void ExecuteCustomSteps()
|
||||||
{
|
{
|
||||||
SetUpCodec();
|
SetUpCodec();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a static asset for the codec and maps the joins to the main room symbol
|
/// Creates a static asset for the codec and maps the joins to the main room symbol
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void SetUpCodec()
|
void SetUpCodec()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var codec = (Room as IEssentialsHuddleVtc1Room).VideoCodec;
|
var codec = (Room as IEssentialsHuddleVtc1Room).VideoCodec;
|
||||||
|
|
||||||
if (codec == null)
|
if (codec == null)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Cannot link codec to Fusion because codec is null");
|
Debug.Console(1, this, "Cannot link codec to Fusion because codec is null");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
codec.UsageTracker = new UsageTracking(codec);
|
codec.UsageTracker = new UsageTracking(codec);
|
||||||
codec.UsageTracker.UsageIsTracked = true;
|
codec.UsageTracker.UsageIsTracked = true;
|
||||||
codec.UsageTracker.DeviceUsageEnded += UsageTracker_DeviceUsageEnded;
|
codec.UsageTracker.DeviceUsageEnded += UsageTracker_DeviceUsageEnded;
|
||||||
|
|
||||||
var codecPowerOnAction = new Action<bool>(b => { if (!b) codec.StandbyDeactivate(); });
|
var codecPowerOnAction = new Action<bool>(b => { if (!b) codec.StandbyDeactivate(); });
|
||||||
var codecPowerOffAction = new Action<bool>(b => { if (!b) codec.StandbyActivate(); });
|
var codecPowerOffAction = new Action<bool>(b => { if (!b) codec.StandbyActivate(); });
|
||||||
|
|
||||||
// Map FusionRoom Attributes:
|
// Map FusionRoom Attributes:
|
||||||
|
|
||||||
// Codec volume
|
// Codec volume
|
||||||
var codecVolume = FusionRoom.CreateOffsetUshortSig(JoinMap.VolumeFader1.JoinNumber, JoinMap.VolumeFader1.AttributeName, eSigIoMask.InputOutputSig);
|
var codecVolume = FusionRoom.CreateOffsetUshortSig(JoinMap.VolumeFader1.JoinNumber, JoinMap.VolumeFader1.AttributeName, eSigIoMask.InputOutputSig);
|
||||||
codecVolume.OutputSig.UserObject = new Action<ushort>(b => (codec as IBasicVolumeWithFeedback).SetVolume(b));
|
codecVolume.OutputSig.UserObject = new Action<ushort>(b => (codec as IBasicVolumeWithFeedback).SetVolume(b));
|
||||||
(codec as IBasicVolumeWithFeedback).VolumeLevelFeedback.LinkInputSig(codecVolume.InputSig);
|
(codec as IBasicVolumeWithFeedback).VolumeLevelFeedback.LinkInputSig(codecVolume.InputSig);
|
||||||
|
|
||||||
// In Call Status
|
// In Call Status
|
||||||
CodecIsInCall = FusionRoom.CreateOffsetBoolSig(JoinMap.VcCodecInCall.JoinNumber, JoinMap.VcCodecInCall.AttributeName, eSigIoMask.InputSigOnly);
|
CodecIsInCall = FusionRoom.CreateOffsetBoolSig(JoinMap.VcCodecInCall.JoinNumber, JoinMap.VcCodecInCall.AttributeName, eSigIoMask.InputSigOnly);
|
||||||
codec.CallStatusChange += new EventHandler<PepperDash.Essentials.Devices.Common.Codec.CodecCallStatusItemChangeEventArgs>(codec_CallStatusChange);
|
codec.CallStatusChange += new EventHandler<PepperDash.Essentials.Devices.Common.Codec.CodecCallStatusItemChangeEventArgs>(codec_CallStatusChange);
|
||||||
|
|
||||||
// Online status
|
// Online status
|
||||||
if (codec is ICommunicationMonitor)
|
if (codec is ICommunicationMonitor)
|
||||||
{
|
{
|
||||||
var c = codec as ICommunicationMonitor;
|
var c = codec as ICommunicationMonitor;
|
||||||
var codecOnline = FusionRoom.CreateOffsetBoolSig(JoinMap.VcCodecOnline.JoinNumber, JoinMap.VcCodecOnline.AttributeName, eSigIoMask.InputSigOnly);
|
var codecOnline = FusionRoom.CreateOffsetBoolSig(JoinMap.VcCodecOnline.JoinNumber, JoinMap.VcCodecOnline.AttributeName, eSigIoMask.InputSigOnly);
|
||||||
codecOnline.InputSig.BoolValue = c.CommunicationMonitor.Status == MonitorStatus.IsOk;
|
codecOnline.InputSig.BoolValue = c.CommunicationMonitor.Status == MonitorStatus.IsOk;
|
||||||
c.CommunicationMonitor.StatusChange += (o, a) =>
|
c.CommunicationMonitor.StatusChange += (o, a) =>
|
||||||
{
|
{
|
||||||
codecOnline.InputSig.BoolValue = a.Status == MonitorStatus.IsOk;
|
codecOnline.InputSig.BoolValue = a.Status == MonitorStatus.IsOk;
|
||||||
};
|
};
|
||||||
Debug.Console(0, this, "Linking '{0}' communication monitor to Fusion '{1}'", codec.Key, JoinMap.VcCodecOnline.AttributeName);
|
Debug.Console(0, this, "Linking '{0}' communication monitor to Fusion '{1}'", codec.Key, JoinMap.VcCodecOnline.AttributeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Codec IP Address
|
// Codec IP Address
|
||||||
bool codecHasIpInfo = false;
|
bool codecHasIpInfo = false;
|
||||||
var codecComm = codec.Communication;
|
var codecComm = codec.Communication;
|
||||||
|
|
||||||
string codecIpAddress = string.Empty;
|
string codecIpAddress = string.Empty;
|
||||||
int codecIpPort = 0;
|
int codecIpPort = 0;
|
||||||
|
|
||||||
StringSigData codecIpAddressSig;
|
StringSigData codecIpAddressSig;
|
||||||
StringSigData codecIpPortSig;
|
StringSigData codecIpPortSig;
|
||||||
|
|
||||||
if(codecComm is GenericSshClient)
|
if(codecComm is GenericSshClient)
|
||||||
{
|
{
|
||||||
codecIpAddress = (codecComm as GenericSshClient).Hostname;
|
codecIpAddress = (codecComm as GenericSshClient).Hostname;
|
||||||
codecIpPort = (codecComm as GenericSshClient).Port;
|
codecIpPort = (codecComm as GenericSshClient).Port;
|
||||||
codecHasIpInfo = true;
|
codecHasIpInfo = true;
|
||||||
}
|
}
|
||||||
else if (codecComm is GenericTcpIpClient)
|
else if (codecComm is GenericTcpIpClient)
|
||||||
{
|
{
|
||||||
codecIpAddress = (codecComm as GenericTcpIpClient).Hostname;
|
codecIpAddress = (codecComm as GenericTcpIpClient).Hostname;
|
||||||
codecIpPort = (codecComm as GenericTcpIpClient).Port;
|
codecIpPort = (codecComm as GenericTcpIpClient).Port;
|
||||||
codecHasIpInfo = true;
|
codecHasIpInfo = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (codecHasIpInfo)
|
if (codecHasIpInfo)
|
||||||
{
|
{
|
||||||
codecIpAddressSig = FusionRoom.CreateOffsetStringSig(JoinMap.VcCodecIpAddress.JoinNumber, JoinMap.VcCodecIpAddress.AttributeName, eSigIoMask.InputSigOnly);
|
codecIpAddressSig = FusionRoom.CreateOffsetStringSig(JoinMap.VcCodecIpAddress.JoinNumber, JoinMap.VcCodecIpAddress.AttributeName, eSigIoMask.InputSigOnly);
|
||||||
codecIpAddressSig.InputSig.StringValue = codecIpAddress;
|
codecIpAddressSig.InputSig.StringValue = codecIpAddress;
|
||||||
|
|
||||||
codecIpPortSig = FusionRoom.CreateOffsetStringSig(JoinMap.VcCodecIpPort.JoinNumber, JoinMap.VcCodecIpPort.AttributeName, eSigIoMask.InputSigOnly);
|
codecIpPortSig = FusionRoom.CreateOffsetStringSig(JoinMap.VcCodecIpPort.JoinNumber, JoinMap.VcCodecIpPort.AttributeName, eSigIoMask.InputSigOnly);
|
||||||
codecIpPortSig.InputSig.StringValue = codecIpPort.ToString();
|
codecIpPortSig.InputSig.StringValue = codecIpPort.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
var tempAsset = new FusionAsset();
|
var tempAsset = new FusionAsset();
|
||||||
|
|
||||||
var deviceConfig = ConfigReader.ConfigObject.Devices.FirstOrDefault(c => c.Key.Equals(codec.Key));
|
var deviceConfig = ConfigReader.ConfigObject.Devices.FirstOrDefault(c => c.Key.Equals(codec.Key));
|
||||||
|
|
||||||
if (FusionStaticAssets.ContainsKey(deviceConfig.Uid))
|
if (FusionStaticAssets.ContainsKey(deviceConfig.Uid))
|
||||||
{
|
{
|
||||||
tempAsset = FusionStaticAssets[deviceConfig.Uid];
|
tempAsset = FusionStaticAssets[deviceConfig.Uid];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Create a new asset
|
// Create a new asset
|
||||||
tempAsset = new FusionAsset(FusionRoomGuids.GetNextAvailableAssetNumber(FusionRoom), codec.Name, "Codec", "");
|
tempAsset = new FusionAsset(FusionRoomGuids.GetNextAvailableAssetNumber(FusionRoom), codec.Name, "Codec", "");
|
||||||
FusionStaticAssets.Add(deviceConfig.Uid, tempAsset);
|
FusionStaticAssets.Add(deviceConfig.Uid, tempAsset);
|
||||||
}
|
}
|
||||||
|
|
||||||
var codecAsset = FusionRoom.CreateStaticAsset(tempAsset.SlotNumber, tempAsset.Name, "Codec", tempAsset.InstanceId);
|
var codecAsset = FusionRoom.CreateStaticAsset(tempAsset.SlotNumber, tempAsset.Name, "Codec", tempAsset.InstanceId);
|
||||||
codecAsset.PowerOn.OutputSig.UserObject = codecPowerOnAction;
|
codecAsset.PowerOn.OutputSig.UserObject = codecPowerOnAction;
|
||||||
codecAsset.PowerOff.OutputSig.UserObject = codecPowerOffAction;
|
codecAsset.PowerOff.OutputSig.UserObject = codecPowerOffAction;
|
||||||
codec.StandbyIsOnFeedback.LinkComplementInputSig(codecAsset.PowerOn.InputSig);
|
codec.StandbyIsOnFeedback.LinkComplementInputSig(codecAsset.PowerOn.InputSig);
|
||||||
|
|
||||||
// TODO: Map relevant attributes on asset symbol
|
// TODO: Map relevant attributes on asset symbol
|
||||||
|
|
||||||
codecAsset.TrySetMakeModel(codec);
|
codecAsset.TrySetMakeModel(codec);
|
||||||
codecAsset.TryLinkAssetErrorToCommunication(codec);
|
codecAsset.TryLinkAssetErrorToCommunication(codec);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Error setting up codec in Fusion: {0}", e);
|
Debug.Console(1, this, "Error setting up codec in Fusion: {0}", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void codec_CallStatusChange(object sender, PepperDash.Essentials.Devices.Common.Codec.CodecCallStatusItemChangeEventArgs e)
|
void codec_CallStatusChange(object sender, PepperDash.Essentials.Devices.Common.Codec.CodecCallStatusItemChangeEventArgs e)
|
||||||
{
|
{
|
||||||
var codec = (Room as IEssentialsHuddleVtc1Room).VideoCodec;
|
var codec = (Room as IEssentialsHuddleVtc1Room).VideoCodec;
|
||||||
|
|
||||||
CodecIsInCall.InputSig.BoolValue = codec.IsInCall;
|
CodecIsInCall.InputSig.BoolValue = codec.IsInCall;
|
||||||
}
|
}
|
||||||
|
|
||||||
// These methods are overridden because they access the room class which is of a different type
|
// These methods are overridden because they access the room class which is of a different type
|
||||||
|
|
||||||
protected override void CreateSymbolAndBasicSigs(uint ipId)
|
protected override void CreateSymbolAndBasicSigs(uint ipId)
|
||||||
{
|
{
|
||||||
Debug.Console(0, this, "Creating Fusion Room symbol with GUID: {0} and IP-ID {1:X2}", RoomGuid, ipId);
|
Debug.Console(0, this, "Creating Fusion Room symbol with GUID: {0} and IP-ID {1:X2}", RoomGuid, ipId);
|
||||||
|
|
||||||
FusionRoom = new FusionRoom(ipId, Global.ControlSystem, Room.Name, RoomGuid);
|
FusionRoom = new FusionRoom(ipId, Global.ControlSystem, Room.Name, RoomGuid);
|
||||||
FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.Use();
|
FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.Use();
|
||||||
FusionRoom.ExtenderFusionRoomDataReservedSigs.Use();
|
FusionRoom.ExtenderFusionRoomDataReservedSigs.Use();
|
||||||
|
|
||||||
FusionRoom.Register();
|
FusionRoom.Register();
|
||||||
|
|
||||||
FusionRoom.FusionStateChange += FusionRoom_FusionStateChange;
|
FusionRoom.FusionStateChange += FusionRoom_FusionStateChange;
|
||||||
|
|
||||||
FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.DeviceExtenderSigChange += FusionRoomSchedule_DeviceExtenderSigChange;
|
FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.DeviceExtenderSigChange += FusionRoomSchedule_DeviceExtenderSigChange;
|
||||||
FusionRoom.ExtenderFusionRoomDataReservedSigs.DeviceExtenderSigChange += ExtenderFusionRoomDataReservedSigs_DeviceExtenderSigChange;
|
FusionRoom.ExtenderFusionRoomDataReservedSigs.DeviceExtenderSigChange += ExtenderFusionRoomDataReservedSigs_DeviceExtenderSigChange;
|
||||||
FusionRoom.OnlineStatusChange += FusionRoom_OnlineStatusChange;
|
FusionRoom.OnlineStatusChange += FusionRoom_OnlineStatusChange;
|
||||||
|
|
||||||
CrestronConsole.AddNewConsoleCommand(RequestFullRoomSchedule, "FusReqRoomSchedule", "Requests schedule of the room for the next 24 hours", ConsoleAccessLevelEnum.AccessOperator);
|
CrestronConsole.AddNewConsoleCommand(RequestFullRoomSchedule, "FusReqRoomSchedule", "Requests schedule of the room for the next 24 hours", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
CrestronConsole.AddNewConsoleCommand(ModifyMeetingEndTimeConsoleHelper, "FusReqRoomSchMod", "Ends or extends a meeting by the specified time", ConsoleAccessLevelEnum.AccessOperator);
|
CrestronConsole.AddNewConsoleCommand(ModifyMeetingEndTimeConsoleHelper, "FusReqRoomSchMod", "Ends or extends a meeting by the specified time", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
CrestronConsole.AddNewConsoleCommand(CreateAdHocMeeting, "FusCreateMeeting", "Creates and Ad Hoc meeting for on hour or until the next meeting", ConsoleAccessLevelEnum.AccessOperator);
|
CrestronConsole.AddNewConsoleCommand(CreateAdHocMeeting, "FusCreateMeeting", "Creates and Ad Hoc meeting for on hour or until the next meeting", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
// Room to fusion room
|
// Room to fusion room
|
||||||
Room.OnFeedback.LinkInputSig(FusionRoom.SystemPowerOn.InputSig);
|
Room.OnFeedback.LinkInputSig(FusionRoom.SystemPowerOn.InputSig);
|
||||||
|
|
||||||
// Moved to
|
// Moved to
|
||||||
CurrentRoomSourceNameSig = FusionRoom.CreateOffsetStringSig(JoinMap.Display1CurrentSourceName.JoinNumber, JoinMap.Display1CurrentSourceName.AttributeName, eSigIoMask.InputSigOnly);
|
CurrentRoomSourceNameSig = FusionRoom.CreateOffsetStringSig(JoinMap.Display1CurrentSourceName.JoinNumber, JoinMap.Display1CurrentSourceName.AttributeName, eSigIoMask.InputSigOnly);
|
||||||
// Don't think we need to get current status of this as nothing should be alive yet.
|
// Don't think we need to get current status of this as nothing should be alive yet.
|
||||||
(Room as IEssentialsHuddleVtc1Room).CurrentSourceChange += Room_CurrentSourceInfoChange;
|
(Room as IEssentialsHuddleVtc1Room).CurrentSourceChange += Room_CurrentSourceInfoChange;
|
||||||
|
|
||||||
|
|
||||||
FusionRoom.SystemPowerOn.OutputSig.SetSigFalseAction((Room as IEssentialsHuddleVtc1Room).PowerOnToDefaultOrLastSource);
|
FusionRoom.SystemPowerOn.OutputSig.SetSigFalseAction((Room as IEssentialsHuddleVtc1Room).PowerOnToDefaultOrLastSource);
|
||||||
FusionRoom.SystemPowerOff.OutputSig.SetSigFalseAction(() => (Room as IEssentialsHuddleVtc1Room).RunRouteAction("roomOff", Room.SourceListKey));
|
FusionRoom.SystemPowerOff.OutputSig.SetSigFalseAction(() => (Room as IEssentialsHuddleVtc1Room).RunRouteAction("roomOff", Room.SourceListKey));
|
||||||
|
|
||||||
|
|
||||||
CrestronEnvironment.EthernetEventHandler += CrestronEnvironment_EthernetEventHandler;
|
CrestronEnvironment.EthernetEventHandler += CrestronEnvironment_EthernetEventHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void SetUpSources()
|
protected override void SetUpSources()
|
||||||
{
|
{
|
||||||
// Sources
|
// Sources
|
||||||
var dict = ConfigReader.ConfigObject.GetSourceListForKey((Room as IEssentialsHuddleVtc1Room).SourceListKey);
|
var dict = ConfigReader.ConfigObject.GetSourceListForKey((Room as IEssentialsHuddleVtc1Room).SourceListKey);
|
||||||
if (dict != null)
|
if (dict != null)
|
||||||
{
|
{
|
||||||
// NEW PROCESS:
|
// NEW PROCESS:
|
||||||
// Make these lists and insert the fusion attributes by iterating these
|
// Make these lists and insert the fusion attributes by iterating these
|
||||||
var setTopBoxes = dict.Where(d => d.Value.SourceDevice is ISetTopBoxControls);
|
var setTopBoxes = dict.Where(d => d.Value.SourceDevice is ISetTopBoxControls);
|
||||||
uint i = 1;
|
uint i = 1;
|
||||||
foreach (var kvp in setTopBoxes)
|
foreach (var kvp in setTopBoxes)
|
||||||
{
|
{
|
||||||
TryAddRouteActionSigs(JoinMap.Display1DiscPlayerSourceStart.AttributeName + " " + i, JoinMap.Display1DiscPlayerSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice);
|
TryAddRouteActionSigs(JoinMap.Display1DiscPlayerSourceStart.AttributeName + " " + i, JoinMap.Display1DiscPlayerSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice);
|
||||||
i++;
|
i++;
|
||||||
if (i > JoinMap.Display1SetTopBoxSourceStart.JoinSpan) // We only have five spots
|
if (i > JoinMap.Display1SetTopBoxSourceStart.JoinSpan) // We only have five spots
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
var discPlayers = dict.Where(d => d.Value.SourceDevice is IDiscPlayerControls);
|
var discPlayers = dict.Where(d => d.Value.SourceDevice is IDiscPlayerControls);
|
||||||
i = 1;
|
i = 1;
|
||||||
foreach (var kvp in discPlayers)
|
foreach (var kvp in discPlayers)
|
||||||
{
|
{
|
||||||
TryAddRouteActionSigs(JoinMap.Display1DiscPlayerSourceStart.AttributeName + " " + i, JoinMap.Display1DiscPlayerSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice);
|
TryAddRouteActionSigs(JoinMap.Display1DiscPlayerSourceStart.AttributeName + " " + i, JoinMap.Display1DiscPlayerSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice);
|
||||||
i++;
|
i++;
|
||||||
if (i > 5) // We only have five spots
|
if (i > 5) // We only have five spots
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
var laptops = dict.Where(d => d.Value.SourceDevice is Core.Devices.Laptop);
|
var laptops = dict.Where(d => d.Value.SourceDevice is Core.Devices.Laptop);
|
||||||
i = 1;
|
i = 1;
|
||||||
foreach (var kvp in laptops)
|
foreach (var kvp in laptops)
|
||||||
{
|
{
|
||||||
TryAddRouteActionSigs(JoinMap.Display1LaptopSourceStart.AttributeName + " " + i, JoinMap.Display1LaptopSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice);
|
TryAddRouteActionSigs(JoinMap.Display1LaptopSourceStart.AttributeName + " " + i, JoinMap.Display1LaptopSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice);
|
||||||
i++;
|
i++;
|
||||||
if (i > JoinMap.Display1LaptopSourceStart.JoinSpan) // We only have ten spots???
|
if (i > JoinMap.Display1LaptopSourceStart.JoinSpan) // We only have ten spots???
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var kvp in dict)
|
foreach (var kvp in dict)
|
||||||
{
|
{
|
||||||
var usageDevice = kvp.Value.SourceDevice as IUsageTracking;
|
var usageDevice = kvp.Value.SourceDevice as IUsageTracking;
|
||||||
|
|
||||||
if (usageDevice != null)
|
if (usageDevice != null)
|
||||||
{
|
{
|
||||||
usageDevice.UsageTracker = new UsageTracking(usageDevice as Device);
|
usageDevice.UsageTracker = new UsageTracking(usageDevice as Device);
|
||||||
usageDevice.UsageTracker.UsageIsTracked = true;
|
usageDevice.UsageTracker.UsageIsTracked = true;
|
||||||
usageDevice.UsageTracker.DeviceUsageEnded += new EventHandler<DeviceUsageEventArgs>(UsageTracker_DeviceUsageEnded);
|
usageDevice.UsageTracker.DeviceUsageEnded += new EventHandler<DeviceUsageEventArgs>(UsageTracker_DeviceUsageEnded);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "WARNING: Config source list '{0}' not found for room '{1}'",
|
Debug.Console(1, this, "WARNING: Config source list '{0}' not found for room '{1}'",
|
||||||
(Room as IEssentialsHuddleVtc1Room).SourceListKey, Room.Key);
|
(Room as IEssentialsHuddleVtc1Room).SourceListKey, Room.Key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void SetUpDisplay()
|
protected override void SetUpDisplay()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//Setup Display Usage Monitoring
|
//Setup Display Usage Monitoring
|
||||||
|
|
||||||
var displays = DeviceManager.AllDevices.Where(d => d is DisplayBase);
|
var displays = DeviceManager.AllDevices.Where(d => d is DisplayBase);
|
||||||
|
|
||||||
// Consider updating this in multiple display systems
|
// Consider updating this in multiple display systems
|
||||||
|
|
||||||
foreach (DisplayBase display in displays)
|
foreach (DisplayBase display in displays)
|
||||||
{
|
{
|
||||||
display.UsageTracker = new UsageTracking(display);
|
display.UsageTracker = new UsageTracking(display);
|
||||||
display.UsageTracker.UsageIsTracked = true;
|
display.UsageTracker.UsageIsTracked = true;
|
||||||
display.UsageTracker.DeviceUsageEnded += new EventHandler<DeviceUsageEventArgs>(UsageTracker_DeviceUsageEnded);
|
display.UsageTracker.DeviceUsageEnded += new EventHandler<DeviceUsageEventArgs>(UsageTracker_DeviceUsageEnded);
|
||||||
}
|
}
|
||||||
|
|
||||||
var defaultDisplay = (Room as IEssentialsHuddleVtc1Room).DefaultDisplay as DisplayBase;
|
var defaultDisplay = (Room as IEssentialsHuddleVtc1Room).DefaultDisplay as DisplayBase;
|
||||||
if (defaultDisplay == null)
|
if (defaultDisplay == null)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Cannot link null display to Fusion because default display is null");
|
Debug.Console(1, this, "Cannot link null display to Fusion because default display is null");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var dispPowerOnAction = new Action<bool>(b => { if (!b) defaultDisplay.PowerOn(); });
|
var dispPowerOnAction = new Action<bool>(b => { if (!b) defaultDisplay.PowerOn(); });
|
||||||
var dispPowerOffAction = new Action<bool>(b => { if (!b) defaultDisplay.PowerOff(); });
|
var dispPowerOffAction = new Action<bool>(b => { if (!b) defaultDisplay.PowerOff(); });
|
||||||
|
|
||||||
// Display to fusion room sigs
|
// Display to fusion room sigs
|
||||||
FusionRoom.DisplayPowerOn.OutputSig.UserObject = dispPowerOnAction;
|
FusionRoom.DisplayPowerOn.OutputSig.UserObject = dispPowerOnAction;
|
||||||
FusionRoom.DisplayPowerOff.OutputSig.UserObject = dispPowerOffAction;
|
FusionRoom.DisplayPowerOff.OutputSig.UserObject = dispPowerOffAction;
|
||||||
|
|
||||||
var defaultDisplayTwoWay = defaultDisplay as IHasPowerControlWithFeedback;
|
var defaultDisplayTwoWay = defaultDisplay as IHasPowerControlWithFeedback;
|
||||||
if (defaultDisplayTwoWay != null)
|
if (defaultDisplayTwoWay != null)
|
||||||
{
|
{
|
||||||
defaultDisplayTwoWay.PowerIsOnFeedback.LinkInputSig(FusionRoom.DisplayPowerOn.InputSig);
|
defaultDisplayTwoWay.PowerIsOnFeedback.LinkInputSig(FusionRoom.DisplayPowerOn.InputSig);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defaultDisplay is IDisplayUsage)
|
if (defaultDisplay is IDisplayUsage)
|
||||||
(defaultDisplay as IDisplayUsage).LampHours.LinkInputSig(FusionRoom.DisplayUsage.InputSig);
|
(defaultDisplay as IDisplayUsage).LampHours.LinkInputSig(FusionRoom.DisplayUsage.InputSig);
|
||||||
|
|
||||||
MapDisplayToRoomJoins(1, JoinMap.Display1Start.JoinNumber, defaultDisplay);
|
MapDisplayToRoomJoins(1, JoinMap.Display1Start.JoinNumber, defaultDisplay);
|
||||||
|
|
||||||
var deviceConfig = ConfigReader.ConfigObject.Devices.FirstOrDefault(d => d.Key.Equals(defaultDisplay.Key));
|
var deviceConfig = ConfigReader.ConfigObject.Devices.FirstOrDefault(d => d.Key.Equals(defaultDisplay.Key));
|
||||||
|
|
||||||
//Check for existing asset in GUIDs collection
|
//Check for existing asset in GUIDs collection
|
||||||
|
|
||||||
var tempAsset = new FusionAsset();
|
var tempAsset = new FusionAsset();
|
||||||
|
|
||||||
if (FusionStaticAssets.ContainsKey(deviceConfig.Uid))
|
if (FusionStaticAssets.ContainsKey(deviceConfig.Uid))
|
||||||
{
|
{
|
||||||
tempAsset = FusionStaticAssets[deviceConfig.Uid];
|
tempAsset = FusionStaticAssets[deviceConfig.Uid];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Create a new asset
|
// Create a new asset
|
||||||
tempAsset = new FusionAsset(FusionRoomGuids.GetNextAvailableAssetNumber(FusionRoom), defaultDisplay.Name, "Display", "");
|
tempAsset = new FusionAsset(FusionRoomGuids.GetNextAvailableAssetNumber(FusionRoom), defaultDisplay.Name, "Display", "");
|
||||||
FusionStaticAssets.Add(deviceConfig.Uid, tempAsset);
|
FusionStaticAssets.Add(deviceConfig.Uid, tempAsset);
|
||||||
}
|
}
|
||||||
|
|
||||||
var dispAsset = FusionRoom.CreateStaticAsset(tempAsset.SlotNumber, tempAsset.Name, "Display", tempAsset.InstanceId);
|
var dispAsset = FusionRoom.CreateStaticAsset(tempAsset.SlotNumber, tempAsset.Name, "Display", tempAsset.InstanceId);
|
||||||
dispAsset.PowerOn.OutputSig.UserObject = dispPowerOnAction;
|
dispAsset.PowerOn.OutputSig.UserObject = dispPowerOnAction;
|
||||||
dispAsset.PowerOff.OutputSig.UserObject = dispPowerOffAction;
|
dispAsset.PowerOff.OutputSig.UserObject = dispPowerOffAction;
|
||||||
|
|
||||||
|
|
||||||
var defaultTwoWayDisplay = defaultDisplay as IHasPowerControlWithFeedback;
|
var defaultTwoWayDisplay = defaultDisplay as IHasPowerControlWithFeedback;
|
||||||
if (defaultTwoWayDisplay != null)
|
if (defaultTwoWayDisplay != null)
|
||||||
{
|
{
|
||||||
defaultTwoWayDisplay.PowerIsOnFeedback.LinkInputSig(FusionRoom.DisplayPowerOn.InputSig);
|
defaultTwoWayDisplay.PowerIsOnFeedback.LinkInputSig(FusionRoom.DisplayPowerOn.InputSig);
|
||||||
if (defaultDisplay is IDisplayUsage)
|
if (defaultDisplay is IDisplayUsage)
|
||||||
(defaultDisplay as IDisplayUsage).LampHours.LinkInputSig(FusionRoom.DisplayUsage.InputSig);
|
(defaultDisplay as IDisplayUsage).LampHours.LinkInputSig(FusionRoom.DisplayUsage.InputSig);
|
||||||
|
|
||||||
defaultTwoWayDisplay.PowerIsOnFeedback.LinkInputSig(dispAsset.PowerOn.InputSig);
|
defaultTwoWayDisplay.PowerIsOnFeedback.LinkInputSig(dispAsset.PowerOn.InputSig);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use extension methods
|
// Use extension methods
|
||||||
dispAsset.TrySetMakeModel(defaultDisplay);
|
dispAsset.TrySetMakeModel(defaultDisplay);
|
||||||
dispAsset.TryLinkAssetErrorToCommunication(defaultDisplay);
|
dispAsset.TryLinkAssetErrorToCommunication(defaultDisplay);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Error setting up display in Fusion: {0}", e);
|
Debug.Console(1, this, "Error setting up display in Fusion: {0}", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void MapDisplayToRoomJoins(int displayIndex, uint joinOffset, DisplayBase display)
|
protected override void MapDisplayToRoomJoins(int displayIndex, uint joinOffset, DisplayBase display)
|
||||||
{
|
{
|
||||||
string displayName = string.Format("Display {0} - ", displayIndex);
|
string displayName = string.Format("Display {0} - ", displayIndex);
|
||||||
|
|
||||||
|
|
||||||
if (display == (Room as IEssentialsHuddleVtc1Room).DefaultDisplay)
|
if (display == (Room as IEssentialsHuddleVtc1Room).DefaultDisplay)
|
||||||
{
|
{
|
||||||
// Power on
|
// Power on
|
||||||
var defaultDisplayPowerOn = FusionRoom.CreateOffsetBoolSig((uint)joinOffset, displayName + "Power On", eSigIoMask.InputOutputSig);
|
var defaultDisplayPowerOn = FusionRoom.CreateOffsetBoolSig((uint)joinOffset, displayName + "Power On", eSigIoMask.InputOutputSig);
|
||||||
defaultDisplayPowerOn.OutputSig.UserObject = new Action<bool>(b => { if (!b) display.PowerOn(); });
|
defaultDisplayPowerOn.OutputSig.UserObject = new Action<bool>(b => { if (!b) display.PowerOn(); });
|
||||||
|
|
||||||
// Power Off
|
// Power Off
|
||||||
var defaultDisplayPowerOff = FusionRoom.CreateOffsetBoolSig((uint)joinOffset + 1, displayName + "Power Off", eSigIoMask.InputOutputSig);
|
var defaultDisplayPowerOff = FusionRoom.CreateOffsetBoolSig((uint)joinOffset + 1, displayName + "Power Off", eSigIoMask.InputOutputSig);
|
||||||
defaultDisplayPowerOn.OutputSig.UserObject = new Action<bool>(b => { if (!b) display.PowerOff(); }); ;
|
defaultDisplayPowerOn.OutputSig.UserObject = new Action<bool>(b => { if (!b) display.PowerOff(); }); ;
|
||||||
|
|
||||||
var displayTwoWay = display as IHasPowerControlWithFeedback;
|
var displayTwoWay = display as IHasPowerControlWithFeedback;
|
||||||
if (displayTwoWay != null)
|
if (displayTwoWay != null)
|
||||||
{
|
{
|
||||||
displayTwoWay.PowerIsOnFeedback.LinkInputSig(defaultDisplayPowerOn.InputSig);
|
displayTwoWay.PowerIsOnFeedback.LinkInputSig(defaultDisplayPowerOn.InputSig);
|
||||||
displayTwoWay.PowerIsOnFeedback.LinkInputSig(defaultDisplayPowerOn.InputSig);
|
displayTwoWay.PowerIsOnFeedback.LinkInputSig(defaultDisplayPowerOn.InputSig);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Current Source
|
// Current Source
|
||||||
var defaultDisplaySourceNone = FusionRoom.CreateOffsetBoolSig((uint)joinOffset + 8, displayName + "Source None", eSigIoMask.InputOutputSig);
|
var defaultDisplaySourceNone = FusionRoom.CreateOffsetBoolSig((uint)joinOffset + 8, displayName + "Source None", eSigIoMask.InputOutputSig);
|
||||||
defaultDisplaySourceNone.OutputSig.UserObject = new Action<bool>(b => { if (!b) (Room as IEssentialsHuddleVtc1Room).RunRouteAction("roomOff", Room.SourceListKey); }); ;
|
defaultDisplaySourceNone.OutputSig.UserObject = new Action<bool>(b => { if (!b) (Room as IEssentialsHuddleVtc1Room).RunRouteAction("roomOff", Room.SourceListKey); }); ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,233 +1,233 @@
|
|||||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
<ProductVersion>9.0.30729</ProductVersion>
|
<ProductVersion>9.0.30729</ProductVersion>
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
<ProjectGuid>{1BED5BA9-88C4-4365-9362-6F4B128071D3}</ProjectGuid>
|
<ProjectGuid>{1BED5BA9-88C4-4365-9362-6F4B128071D3}</ProjectGuid>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>PepperDashEssentials</RootNamespace>
|
<RootNamespace>PepperDashEssentials</RootNamespace>
|
||||||
<AssemblyName>PepperDashEssentials</AssemblyName>
|
<AssemblyName>PepperDashEssentials</AssemblyName>
|
||||||
<ProjectTypeGuids>{0B4745B0-194B-4BB6-8E21-E9057CA92230};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
<ProjectTypeGuids>{0B4745B0-194B-4BB6-8E21-E9057CA92230};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||||
<PlatformFamilyName>WindowsCE</PlatformFamilyName>
|
<PlatformFamilyName>WindowsCE</PlatformFamilyName>
|
||||||
<PlatformID>E2BECB1F-8C8C-41ba-B736-9BE7D946A398</PlatformID>
|
<PlatformID>E2BECB1F-8C8C-41ba-B736-9BE7D946A398</PlatformID>
|
||||||
<OSVersion>5.0</OSVersion>
|
<OSVersion>5.0</OSVersion>
|
||||||
<DeployDirSuffix>SmartDeviceProject1</DeployDirSuffix>
|
<DeployDirSuffix>SmartDeviceProject1</DeployDirSuffix>
|
||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<NativePlatformName>Windows CE</NativePlatformName>
|
<NativePlatformName>Windows CE</NativePlatformName>
|
||||||
<FormFactorID>
|
<FormFactorID>
|
||||||
</FormFactorID>
|
</FormFactorID>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<AllowedReferenceRelatedFileExtensions>.allowedReferenceRelatedFileExtensions</AllowedReferenceRelatedFileExtensions>
|
<AllowedReferenceRelatedFileExtensions>.allowedReferenceRelatedFileExtensions</AllowedReferenceRelatedFileExtensions>
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>bin\</OutputPath>
|
<OutputPath>bin\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE;</DefineConstants>
|
<DefineConstants>DEBUG;TRACE;</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<NoStdLib>true</NoStdLib>
|
<NoStdLib>true</NoStdLib>
|
||||||
<NoConfig>true</NoConfig>
|
<NoConfig>true</NoConfig>
|
||||||
<GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
|
<GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<AllowedReferenceRelatedFileExtensions>.allowedReferenceRelatedFileExtensions</AllowedReferenceRelatedFileExtensions>
|
<AllowedReferenceRelatedFileExtensions>.allowedReferenceRelatedFileExtensions</AllowedReferenceRelatedFileExtensions>
|
||||||
<DebugType>none</DebugType>
|
<DebugType>none</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>bin\</OutputPath>
|
<OutputPath>bin\</OutputPath>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<NoStdLib>true</NoStdLib>
|
<NoStdLib>true</NoStdLib>
|
||||||
<NoConfig>true</NoConfig>
|
<NoConfig>true</NoConfig>
|
||||||
<GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
|
<GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Crestron.SimplSharpPro.DeviceSupport, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="Crestron.SimplSharpPro.DeviceSupport, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Crestron.SimplSharpPro.DM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="Crestron.SimplSharpPro.DM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Crestron.SimplSharpPro.EthernetCommunications, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="Crestron.SimplSharpPro.EthernetCommunications, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.EthernetCommunications.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.EthernetCommunications.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Crestron.SimplSharpPro.Fusion, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="Crestron.SimplSharpPro.Fusion, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Fusion.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Fusion.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Crestron.SimplSharpPro.Remotes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="Crestron.SimplSharpPro.Remotes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Remotes.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Remotes.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Crestron.SimplSharpPro.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="Crestron.SimplSharpPro.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="mscorlib" />
|
<Reference Include="mscorlib" />
|
||||||
<Reference Include="PepperDash_Core, Version=1.0.42.30563, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="PepperDash_Core, Version=1.3.3.32940, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\PepperDashCore\lib\net35\PepperDash_Core.dll</HintPath>
|
<HintPath>..\..\packages\PepperDashCore\lib\net35\PepperDash_Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SimplSharpHelperInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="SimplSharpHelperInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SimplSharpNewtonsoft, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="SimplSharpNewtonsoft, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SimplSharpPro, Version=1.5.3.17, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="SimplSharpPro, Version=1.5.3.17, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SimplSharpReflectionInterface, Version=1.0.5583.25238, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="SimplSharpReflectionInterface, Version=1.0.5583.25238, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SimplSharpTimerEventInterface, Version=1.0.6197.20052, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="SimplSharpTimerEventInterface, Version=1.0.6197.20052, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpTimerEventInterface.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpTimerEventInterface.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Audio\EssentialsVolumeLevelConfig.cs" />
|
<Compile Include="Audio\EssentialsVolumeLevelConfig.cs" />
|
||||||
<Compile Include="Bridges\EiscBridge.cs" />
|
<Compile Include="Bridges\EiscBridge.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\AirMediaControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\AirMediaControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\AppleTvJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\AppleTvJoinMap.cs" />
|
||||||
<Compile Include="Bridges\BridgeFactory.cs" />
|
<Compile Include="Bridges\BridgeFactory.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\C2nRthsControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\C2nRthsControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\CameraControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\CameraControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\DigitalLoggerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\DigitalLoggerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\DisplayControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\DisplayControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\DmBladeChassisControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\DmBladeChassisControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\DmChassisControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\DmChassisControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\DmpsAudioOutputControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\DmpsAudioOutputControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\DmpsRoutingControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\DmpsRoutingControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\DmRmcControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\DmRmcControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\DmTxControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\DmTxControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\GenericLightingJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\GenericLightingJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\GenericRelayControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\GenericRelayControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\GlsOccupancySensorBaseJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\GlsOccupancySensorBaseJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\HdMdxxxCEControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\HdMdxxxCEControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\IBasicCommunicationJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\IBasicCommunicationJoinMap.cs" />
|
||||||
<Compile Include="Bridges\IBridge.cs" />
|
<Compile Include="Bridges\IBridge.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\IDigitalInputJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\IDigitalInputJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\SetTopBoxControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\SetTopBoxControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\StatusSignControllerJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\StatusSignControllerJoinMap.cs" />
|
||||||
<Compile Include="Bridges\JoinMaps\SystemMonitorJoinMap.cs" />
|
<Compile Include="Bridges\JoinMaps\SystemMonitorJoinMap.cs" />
|
||||||
<Compile Include="Factory\DeviceFactory.cs" />
|
<Compile Include="Factory\DeviceFactory.cs" />
|
||||||
<Compile Include="Devices\Amplifier.cs" />
|
<Compile Include="Devices\Amplifier.cs" />
|
||||||
<Compile Include="ControlSystem.cs" />
|
<Compile Include="ControlSystem.cs" />
|
||||||
<Compile Include="Fusion\EssentialsHuddleVtc1FusionController.cs" />
|
<Compile Include="Fusion\EssentialsHuddleVtc1FusionController.cs" />
|
||||||
<Compile Include="Fusion\EssentialsTechRoomFusionSystemController.cs" />
|
<Compile Include="Fusion\EssentialsTechRoomFusionSystemController.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsDualDisplayRoomPropertiesConfig.cs" />
|
<Compile Include="Room\Config\EssentialsDualDisplayRoomPropertiesConfig.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsNDisplayRoomPropertiesConfig.cs" />
|
<Compile Include="Room\Config\EssentialsNDisplayRoomPropertiesConfig.cs" />
|
||||||
<Compile Include="Room\Config\SimplRoomPropertiesConfig.cs" />
|
<Compile Include="Room\Config\SimplRoomPropertiesConfig.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsPresentationPropertiesConfig.cs" />
|
<Compile Include="Room\Config\EssentialsPresentationPropertiesConfig.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsHuddleRoomPropertiesConfig.cs" />
|
<Compile Include="Room\Config\EssentialsHuddleRoomPropertiesConfig.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsHuddleVtc1PropertiesConfig.cs" />
|
<Compile Include="Room\Config\EssentialsHuddleVtc1PropertiesConfig.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsRoomEmergencyConfig.cs" />
|
<Compile Include="Room\Config\EssentialsRoomEmergencyConfig.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsTechRoomConfig.cs" />
|
<Compile Include="Room\Config\EssentialsTechRoomConfig.cs" />
|
||||||
<Compile Include="Room\Emergency\EsentialsRoomEmergencyContactClosure.cs" />
|
<Compile Include="Room\Emergency\EsentialsRoomEmergencyContactClosure.cs" />
|
||||||
<Compile Include="Room\Types\EssentialsCombinedHuddleVtc1Room.cs" />
|
<Compile Include="Room\Types\EssentialsCombinedHuddleVtc1Room.cs" />
|
||||||
<Compile Include="Room\Types\EssentialsDualDisplayRoom.cs" />
|
<Compile Include="Room\Types\EssentialsDualDisplayRoom.cs" />
|
||||||
<Compile Include="Room\Types\EssentialsHuddleVtc1Room.cs" />
|
<Compile Include="Room\Types\EssentialsHuddleVtc1Room.cs" />
|
||||||
<Compile Include="Room\Types\EssentialsNDisplayRoomBase.cs" />
|
<Compile Include="Room\Types\EssentialsNDisplayRoomBase.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsRoomConfig.cs" />
|
<Compile Include="Room\Config\EssentialsRoomConfig.cs" />
|
||||||
<Compile Include="Room\Types\EssentialsTechRoom.cs" />
|
<Compile Include="Room\Types\EssentialsTechRoom.cs" />
|
||||||
<Compile Include="Room\Types\Interfaces\IEssentialsHuddleSpaceRoom.cs" />
|
<Compile Include="Room\Types\Interfaces\IEssentialsHuddleSpaceRoom.cs" />
|
||||||
<Compile Include="Room\Types\Interfaces\IEssentialsHuddleVtc1Room.cs" />
|
<Compile Include="Room\Types\Interfaces\IEssentialsHuddleVtc1Room.cs" />
|
||||||
<Compile Include="UIDrivers\Environment Drivers\EssentialsEnvironmentDriver.cs" />
|
<Compile Include="UIDrivers\Environment Drivers\EssentialsEnvironmentDriver.cs" />
|
||||||
<Compile Include="UIDrivers\Environment Drivers\EssentialsLightingDriver.cs" />
|
<Compile Include="UIDrivers\Environment Drivers\EssentialsLightingDriver.cs" />
|
||||||
<Compile Include="UIDrivers\Environment Drivers\EssentialsShadeDriver.cs" />
|
<Compile Include="UIDrivers\Environment Drivers\EssentialsShadeDriver.cs" />
|
||||||
<Compile Include="UIDrivers\Essentials\EssentialsHeaderDriver.cs" />
|
<Compile Include="UIDrivers\Essentials\EssentialsHeaderDriver.cs" />
|
||||||
<Compile Include="UIDrivers\JoinedSigInterlock.cs" />
|
<Compile Include="UIDrivers\JoinedSigInterlock.cs" />
|
||||||
<Compile Include="UIDrivers\ScreenSaverController.cs" />
|
<Compile Include="UIDrivers\ScreenSaverController.cs" />
|
||||||
<Compile Include="UIDrivers\SigInterlock.cs" />
|
<Compile Include="UIDrivers\SigInterlock.cs" />
|
||||||
<Compile Include="UIDrivers\EssentialsHuddleVTC\EssentialsHuddlePresentationUiDriver.cs" />
|
<Compile Include="UIDrivers\EssentialsHuddleVTC\EssentialsHuddlePresentationUiDriver.cs" />
|
||||||
<Compile Include="UIDrivers\EssentialsHuddle\EssentialsHuddleTechPageDriver.cs" />
|
<Compile Include="UIDrivers\EssentialsHuddle\EssentialsHuddleTechPageDriver.cs" />
|
||||||
<Compile Include="UI\HttpLogoServer.cs" />
|
<Compile Include="UI\HttpLogoServer.cs" />
|
||||||
<Compile Include="UI\SmartObjectHeaderButtonList.cs" />
|
<Compile Include="UI\SmartObjectHeaderButtonList.cs" />
|
||||||
<Compile Include="UI\SubpageReferenceListCallStagingItem.cs" />
|
<Compile Include="UI\SubpageReferenceListCallStagingItem.cs" />
|
||||||
<Compile Include="UIDrivers\VC\EssentialsVideoCodecUiDriver.cs" />
|
<Compile Include="UIDrivers\VC\EssentialsVideoCodecUiDriver.cs" />
|
||||||
<Compile Include="UIDrivers\EssentialsHuddleVTC\EssentialsHuddleVtc1PanelAvFunctionsDriver.cs" />
|
<Compile Include="UIDrivers\EssentialsHuddleVTC\EssentialsHuddleVtc1PanelAvFunctionsDriver.cs" />
|
||||||
<Compile Include="UIDrivers\SourceChangeArgs.cs" />
|
<Compile Include="UIDrivers\SourceChangeArgs.cs" />
|
||||||
<Compile Include="UI\JoinConstants\UISmartObjectJoin.cs" />
|
<Compile Include="UI\JoinConstants\UISmartObjectJoin.cs" />
|
||||||
<Compile Include="UI\JoinConstants\UIStringlJoin.cs" />
|
<Compile Include="UI\JoinConstants\UIStringlJoin.cs" />
|
||||||
<Compile Include="UI\JoinConstants\UIUshortJoin.cs" />
|
<Compile Include="UI\JoinConstants\UIUshortJoin.cs" />
|
||||||
<Compile Include="UIDrivers\DualDisplayRouting.cs" />
|
<Compile Include="UIDrivers\DualDisplayRouting.cs" />
|
||||||
<Compile Include="UIDrivers\Essentials\EssentialsPresentationPanelAvFunctionsDriver.cs" />
|
<Compile Include="UIDrivers\Essentials\EssentialsPresentationPanelAvFunctionsDriver.cs" />
|
||||||
<Compile Include="UIDrivers\Page Drivers\SingleSubpageModalDriver.cs" />
|
<Compile Include="UIDrivers\Page Drivers\SingleSubpageModalDriver.cs" />
|
||||||
<Compile Include="UIDrivers\Essentials\EssentialsPanelMainInterfaceDriver.cs" />
|
<Compile Include="UIDrivers\Essentials\EssentialsPanelMainInterfaceDriver.cs" />
|
||||||
<Compile Include="UIDrivers\enums and base.cs" />
|
<Compile Include="UIDrivers\enums and base.cs" />
|
||||||
<Compile Include="UIDrivers\EssentialsHuddle\EssentialsHuddlePanelAvFunctionsDriver.cs" />
|
<Compile Include="UIDrivers\EssentialsHuddle\EssentialsHuddlePanelAvFunctionsDriver.cs" />
|
||||||
<Compile Include="UIDrivers\Page Drivers\SingleSubpageModalAndBackDriver.cs" />
|
<Compile Include="UIDrivers\Page Drivers\SingleSubpageModalAndBackDriver.cs" />
|
||||||
<Compile Include="UIDrivers\SmartObjectRoomsList.cs" />
|
<Compile Include="UIDrivers\SmartObjectRoomsList.cs" />
|
||||||
<Compile Include="UI\JoinConstants\UIBoolJoin.cs" />
|
<Compile Include="UI\JoinConstants\UIBoolJoin.cs" />
|
||||||
<Compile Include="UI\DualDisplaySourceSRLController.cs" />
|
<Compile Include="UI\DualDisplaySourceSRLController.cs" />
|
||||||
<Compile Include="UI\SubpageReferenceListActivityItem.cs" />
|
<Compile Include="UI\SubpageReferenceListActivityItem.cs" />
|
||||||
<Compile Include="Room\Types\EssentialsHuddleSpaceRoom.cs" />
|
<Compile Include="Room\Types\EssentialsHuddleSpaceRoom.cs" />
|
||||||
<Compile Include="UI\EssentialsTouchpanelController.cs" />
|
<Compile Include="UI\EssentialsTouchpanelController.cs" />
|
||||||
<Compile Include="UI\SubpageReferenceListSourceItem.cs" />
|
<Compile Include="UI\SubpageReferenceListSourceItem.cs" />
|
||||||
<None Include="app.config" />
|
<None Include="app.config" />
|
||||||
<EmbeddedResource Include="Example Configuration\EssentialsHuddleSpaceRoom\configurationFile-HuddleSpace-2-Source.json">
|
<EmbeddedResource Include="Example Configuration\EssentialsHuddleSpaceRoom\configurationFile-HuddleSpace-2-Source.json">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Example Configuration\EssentialsHuddleVtc1Room\configurationFile-mockVideoCodec_din-ap3_-_dm4x1.json">
|
<EmbeddedResource Include="Example Configuration\EssentialsHuddleVtc1Room\configurationFile-mockVideoCodec_din-ap3_-_dm4x1.json">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Example Configuration\SIMPLBridging\configurationFile-dmps3300c-avRouting.json">
|
<EmbeddedResource Include="Example Configuration\SIMPLBridging\configurationFile-dmps3300c-avRouting.json">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Example Configuration\SIMPLBridging\SIMPLBridgeExample_configurationFile.json">
|
<EmbeddedResource Include="Example Configuration\SIMPLBridging\SIMPLBridgeExample_configurationFile.json">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<None Include="Properties\ControlSystem.cfg" />
|
<None Include="Properties\ControlSystem.cfg" />
|
||||||
<EmbeddedResource Include="SGD\PepperDash Essentials iPad.sgd">
|
<EmbeddedResource Include="SGD\PepperDash Essentials iPad.sgd">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="SGD\PepperDash Essentials TSW-560.sgd">
|
<EmbeddedResource Include="SGD\PepperDash Essentials TSW-560.sgd">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="SGD\PepperDash Essentials TSW-760.sgd">
|
<EmbeddedResource Include="SGD\PepperDash Essentials TSW-760.sgd">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\essentials-framework\Essentials Core\PepperDashEssentialsBase\PepperDash_Essentials_Core.csproj">
|
<ProjectReference Include="..\essentials-framework\Essentials Core\PepperDashEssentialsBase\PepperDash_Essentials_Core.csproj">
|
||||||
<Project>{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}</Project>
|
<Project>{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}</Project>
|
||||||
<Name>PepperDash_Essentials_Core</Name>
|
<Name>PepperDash_Essentials_Core</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\essentials-framework\Essentials Devices Common\Essentials Devices Common\Essentials Devices Common.csproj">
|
<ProjectReference Include="..\essentials-framework\Essentials Devices Common\Essentials Devices Common\Essentials Devices Common.csproj">
|
||||||
<Project>{892B761C-E479-44CE-BD74-243E9214AF13}</Project>
|
<Project>{892B761C-E479-44CE-BD74-243E9214AF13}</Project>
|
||||||
<Name>Essentials Devices Common</Name>
|
<Name>Essentials Devices Common</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\essentials-framework\Essentials DM\Essentials_DM\PepperDash_Essentials_DM.csproj">
|
<ProjectReference Include="..\essentials-framework\Essentials DM\Essentials_DM\PepperDash_Essentials_DM.csproj">
|
||||||
<Project>{9199CE8A-0C9F-4952-8672-3EED798B284F}</Project>
|
<Project>{9199CE8A-0C9F-4952-8672-3EED798B284F}</Project>
|
||||||
<Name>PepperDash_Essentials_DM</Name>
|
<Name>PepperDash_Essentials_DM</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<VisualStudio>
|
<VisualStudio>
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>rem S# Pro preparation will execute after these operations</PostBuildEvent>
|
<PostBuildEvent>rem S# Pro preparation will execute after these operations</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ControlSystem>
|
<ControlSystem>
|
||||||
<Name>Test RMC3</Name>
|
<Name>Test RMC3</Name>
|
||||||
<Address>auto 192.168.1.40;username crestron</Address>
|
<Address>auto 192.168.1.40;username crestron</Address>
|
||||||
<ProgramSlot>Program01</ProgramSlot>
|
<ProgramSlot>Program01</ProgramSlot>
|
||||||
<Storage>Internal Flash</Storage>
|
<Storage>Internal Flash</Storage>
|
||||||
</ControlSystem>
|
</ControlSystem>
|
||||||
@@ -1,402 +1,411 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials;
|
using PepperDash.Essentials;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Room.Config
|
namespace PepperDash.Essentials.Room.Config
|
||||||
{
|
{
|
||||||
public class EssentialsRoomConfigHelper
|
public class EssentialsRoomConfigHelper
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a room object from this config data
|
/// Returns a room object from this config data
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static IKeyed GetRoomObject(DeviceConfig roomConfig)
|
public static IKeyed GetRoomObject(DeviceConfig roomConfig)
|
||||||
{
|
{
|
||||||
var typeName = roomConfig.Type.ToLower();
|
var typeName = roomConfig.Type.ToLower();
|
||||||
|
|
||||||
switch (typeName)
|
switch (typeName)
|
||||||
{
|
{
|
||||||
case "huddle" :
|
case "huddle" :
|
||||||
{
|
{
|
||||||
return new EssentialsHuddleSpaceRoom(roomConfig);
|
return new EssentialsHuddleSpaceRoom(roomConfig);
|
||||||
}
|
}
|
||||||
case "huddlevtc1" :
|
case "huddlevtc1" :
|
||||||
{
|
{
|
||||||
return new EssentialsHuddleVtc1Room(roomConfig);
|
return new EssentialsHuddleVtc1Room(roomConfig);
|
||||||
}
|
}
|
||||||
case "ddvc01bridge" :
|
case "ddvc01bridge" :
|
||||||
{
|
{
|
||||||
return new Device(roomConfig.Key, roomConfig.Name); // placeholder device that does nothing.
|
return new Device(roomConfig.Key, roomConfig.Name); // placeholder device that does nothing.
|
||||||
}
|
}
|
||||||
case "dualdisplay" :
|
case "dualdisplay" :
|
||||||
{
|
{
|
||||||
return new EssentialsDualDisplayRoom(roomConfig);
|
return new EssentialsDualDisplayRoom(roomConfig);
|
||||||
}
|
}
|
||||||
case "combinedhuddlevtc1" :
|
case "combinedhuddlevtc1" :
|
||||||
{
|
{
|
||||||
return new EssentialsCombinedHuddleVtc1Room(roomConfig);
|
return new EssentialsCombinedHuddleVtc1Room(roomConfig);
|
||||||
}
|
}
|
||||||
case "techroom" :
|
case "techroom" :
|
||||||
{
|
{
|
||||||
return new EssentialsTechRoom(roomConfig);
|
return new EssentialsTechRoom(roomConfig);
|
||||||
}
|
}
|
||||||
default :
|
default :
|
||||||
{
|
{
|
||||||
return Core.DeviceFactory.GetDevice(roomConfig);
|
return Core.DeviceFactory.GetDevice(roomConfig);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets and operating, standalone emergegncy object that can be plugged into a room.
|
/// Gets and operating, standalone emergegncy object that can be plugged into a room.
|
||||||
/// Returns null if there is no emergency defined
|
/// Returns null if there is no emergency defined
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static EssentialsRoomEmergencyBase GetEmergency(EssentialsRoomPropertiesConfig props, IEssentialsRoom room)
|
public static EssentialsRoomEmergencyBase GetEmergency(EssentialsRoomPropertiesConfig props, IEssentialsRoom room)
|
||||||
{
|
{
|
||||||
// This emergency
|
// This emergency
|
||||||
var emergency = props.Emergency;
|
var emergency = props.Emergency;
|
||||||
if (emergency != null)
|
if (emergency != null)
|
||||||
{
|
{
|
||||||
//switch on emergency type here. Right now only contact and shutdown
|
//switch on emergency type here. Right now only contact and shutdown
|
||||||
var e = new EssentialsRoomEmergencyContactClosure(room.Key + "-emergency", props.Emergency, room);
|
var e = new EssentialsRoomEmergencyContactClosure(room.Key + "-emergency", props.Emergency, room);
|
||||||
DeviceManager.AddDevice(e);
|
DeviceManager.AddDevice(e);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="props"></param>
|
/// <param name="props"></param>
|
||||||
/// <param name="room"></param>
|
/// <param name="room"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static Core.Privacy.MicrophonePrivacyController GetMicrophonePrivacy(
|
public static Core.Privacy.MicrophonePrivacyController GetMicrophonePrivacy(
|
||||||
EssentialsRoomPropertiesConfig props, IPrivacy room)
|
EssentialsRoomPropertiesConfig props, IPrivacy room)
|
||||||
{
|
{
|
||||||
var microphonePrivacy = props.MicrophonePrivacy;
|
var microphonePrivacy = props.MicrophonePrivacy;
|
||||||
if (microphonePrivacy == null)
|
if (microphonePrivacy == null)
|
||||||
{
|
{
|
||||||
Debug.Console(0, "Cannot create microphone privacy with null properties");
|
Debug.Console(0, "Cannot create microphone privacy with null properties");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// Get the MicrophonePrivacy device from the device manager
|
// Get the MicrophonePrivacy device from the device manager
|
||||||
var mP = (DeviceManager.GetDeviceForKey(props.MicrophonePrivacy.DeviceKey) as
|
var mP = (DeviceManager.GetDeviceForKey(props.MicrophonePrivacy.DeviceKey) as
|
||||||
Core.Privacy.MicrophonePrivacyController);
|
Core.Privacy.MicrophonePrivacyController);
|
||||||
// Set this room as the IPrivacy device
|
// Set this room as the IPrivacy device
|
||||||
if (mP == null)
|
if (mP == null)
|
||||||
{
|
{
|
||||||
Debug.Console(0, "ERROR: Selected device {0} is not MicrophonePrivacyController", props.MicrophonePrivacy.DeviceKey);
|
Debug.Console(0, "ERROR: Selected device {0} is not MicrophonePrivacyController", props.MicrophonePrivacy.DeviceKey);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
mP.SetPrivacyDevice(room);
|
mP.SetPrivacyDevice(room);
|
||||||
|
|
||||||
var behaviour = props.MicrophonePrivacy.Behaviour.ToLower();
|
var behaviour = props.MicrophonePrivacy.Behaviour.ToLower();
|
||||||
|
|
||||||
if (behaviour == null)
|
if (behaviour == null)
|
||||||
{
|
{
|
||||||
Debug.Console(0, "WARNING: No behaviour defined for MicrophonePrivacyController");
|
Debug.Console(0, "WARNING: No behaviour defined for MicrophonePrivacyController");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (behaviour == "trackroomstate")
|
if (behaviour == "trackroomstate")
|
||||||
{
|
{
|
||||||
// Tie LED enable to room power state
|
// Tie LED enable to room power state
|
||||||
var essRoom = room as IEssentialsRoom;
|
var essRoom = room as IEssentialsRoom;
|
||||||
essRoom.OnFeedback.OutputChange += (o, a) =>
|
essRoom.OnFeedback.OutputChange += (o, a) =>
|
||||||
{
|
{
|
||||||
if (essRoom.OnFeedback.BoolValue)
|
if (essRoom.OnFeedback.BoolValue)
|
||||||
mP.EnableLeds = true;
|
mP.EnableLeds = true;
|
||||||
else
|
else
|
||||||
mP.EnableLeds = false;
|
mP.EnableLeds = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
mP.EnableLeds = essRoom.OnFeedback.BoolValue;
|
mP.EnableLeds = essRoom.OnFeedback.BoolValue;
|
||||||
}
|
}
|
||||||
else if (behaviour == "trackcallstate")
|
else if (behaviour == "trackcallstate")
|
||||||
{
|
{
|
||||||
// Tie LED enable to room power state
|
// Tie LED enable to room power state
|
||||||
var inCallRoom = room as IHasInCallFeedback;
|
var inCallRoom = room as IHasInCallFeedback;
|
||||||
inCallRoom.InCallFeedback.OutputChange += (o, a) =>
|
inCallRoom.InCallFeedback.OutputChange += (o, a) =>
|
||||||
{
|
{
|
||||||
if (inCallRoom.InCallFeedback.BoolValue)
|
if (inCallRoom.InCallFeedback.BoolValue)
|
||||||
mP.EnableLeds = true;
|
mP.EnableLeds = true;
|
||||||
else
|
else
|
||||||
mP.EnableLeds = false;
|
mP.EnableLeds = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
mP.EnableLeds = inCallRoom.InCallFeedback.BoolValue;
|
mP.EnableLeds = inCallRoom.InCallFeedback.BoolValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
return mP;
|
return mP;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsRoomPropertiesConfig
|
public class EssentialsRoomPropertiesConfig
|
||||||
{
|
{
|
||||||
[JsonProperty("addresses")]
|
[JsonProperty("addresses")]
|
||||||
public EssentialsRoomAddressPropertiesConfig Addresses { get; set; }
|
public EssentialsRoomAddressPropertiesConfig Addresses { get; set; }
|
||||||
|
|
||||||
[JsonProperty("description")]
|
[JsonProperty("description")]
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
|
|
||||||
[JsonProperty("emergency")]
|
[JsonProperty("emergency")]
|
||||||
public EssentialsRoomEmergencyConfig Emergency { get; set; }
|
public EssentialsRoomEmergencyConfig Emergency { get; set; }
|
||||||
|
|
||||||
[JsonProperty("help")]
|
[JsonProperty("help")]
|
||||||
public EssentialsHelpPropertiesConfig Help { get; set; }
|
public EssentialsHelpPropertiesConfig Help { get; set; }
|
||||||
|
|
||||||
[JsonProperty("helpMessage")]
|
[JsonProperty("helpMessage")]
|
||||||
public string HelpMessage { get; set; }
|
public string HelpMessage { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Read this value to get the help message. It checks for the old and new config format.
|
/// Read this value to get the help message. It checks for the old and new config format.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string HelpMessageForDisplay
|
public string HelpMessageForDisplay
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if(Help != null && !string.IsNullOrEmpty(Help.Message))
|
if(Help != null && !string.IsNullOrEmpty(Help.Message))
|
||||||
{
|
{
|
||||||
return Help.Message;
|
return Help.Message;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return HelpMessage;
|
return HelpMessage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonProperty("environment")]
|
[JsonProperty("environment")]
|
||||||
public EssentialsEnvironmentPropertiesConfig Environment { get; set; }
|
public EssentialsEnvironmentPropertiesConfig Environment { get; set; }
|
||||||
|
|
||||||
[JsonProperty("logo")]
|
[JsonProperty("logo")]
|
||||||
public EssentialsLogoPropertiesConfig LogoLight { get; set; }
|
public EssentialsLogoPropertiesConfig LogoLight { get; set; }
|
||||||
|
|
||||||
[JsonProperty("logoDark")]
|
[JsonProperty("logoDark")]
|
||||||
public EssentialsLogoPropertiesConfig LogoDark { get; set; }
|
public EssentialsLogoPropertiesConfig LogoDark { get; set; }
|
||||||
|
|
||||||
[JsonProperty("microphonePrivacy")]
|
[JsonProperty("microphonePrivacy")]
|
||||||
public EssentialsRoomMicrophonePrivacyConfig MicrophonePrivacy { get; set; }
|
public EssentialsRoomMicrophonePrivacyConfig MicrophonePrivacy { get; set; }
|
||||||
|
|
||||||
[JsonProperty("occupancy")]
|
[JsonProperty("occupancy")]
|
||||||
public EssentialsRoomOccSensorConfig Occupancy { get; set; }
|
public EssentialsRoomOccSensorConfig Occupancy { get; set; }
|
||||||
|
|
||||||
[JsonProperty("oneButtonMeeting")]
|
[JsonProperty("oneButtonMeeting")]
|
||||||
public EssentialsOneButtonMeetingPropertiesConfig OneButtonMeeting { get; set; }
|
public EssentialsOneButtonMeetingPropertiesConfig OneButtonMeeting { get; set; }
|
||||||
|
|
||||||
[JsonProperty("shutdownVacancySeconds")]
|
[JsonProperty("shutdownVacancySeconds")]
|
||||||
public int ShutdownVacancySeconds { get; set; }
|
public int ShutdownVacancySeconds { get; set; }
|
||||||
|
|
||||||
[JsonProperty("shutdownPromptSeconds")]
|
[JsonProperty("shutdownPromptSeconds")]
|
||||||
public int ShutdownPromptSeconds { get; set; }
|
public int ShutdownPromptSeconds { get; set; }
|
||||||
|
|
||||||
[JsonProperty("tech")]
|
[JsonProperty("tech")]
|
||||||
public EssentialsRoomTechConfig Tech { get; set; }
|
public EssentialsRoomTechConfig Tech { get; set; }
|
||||||
|
|
||||||
[JsonProperty("volumes")]
|
[JsonProperty("volumes")]
|
||||||
public EssentialsRoomVolumesConfig Volumes { get; set; }
|
public EssentialsRoomVolumesConfig Volumes { get; set; }
|
||||||
|
|
||||||
[JsonProperty("fusion")]
|
[JsonProperty("fusion")]
|
||||||
public EssentialsRoomFusionConfig Fusion { get; set; }
|
public EssentialsRoomFusionConfig Fusion { get; set; }
|
||||||
|
|
||||||
[JsonProperty("zeroVolumeWhenSwtichingVolumeDevices")]
|
[JsonProperty("essentialsRoomUiBehaviorConfig", NullValueHandling=NullValueHandling.Ignore)]
|
||||||
public bool ZeroVolumeWhenSwtichingVolumeDevices { get; set; }
|
public EssentialsRoomUiBehaviorConfig UiBehavior { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
[JsonProperty("zeroVolumeWhenSwtichingVolumeDevices")]
|
||||||
/// Indicates if this room represents a combination of other rooms
|
public bool ZeroVolumeWhenSwtichingVolumeDevices { get; set; }
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("isRoomCombinationScenario")]
|
/// <summary>
|
||||||
public bool IsRoomCombinationScenario { get; set; }
|
/// Indicates if this room represents a combination of other rooms
|
||||||
|
/// </summary>
|
||||||
public EssentialsRoomPropertiesConfig()
|
[JsonProperty("isRoomCombinationScenario")]
|
||||||
{
|
public bool IsRoomCombinationScenario { get; set; }
|
||||||
LogoLight = new EssentialsLogoPropertiesConfig();
|
|
||||||
LogoDark = new EssentialsLogoPropertiesConfig();
|
public EssentialsRoomPropertiesConfig()
|
||||||
}
|
{
|
||||||
}
|
LogoLight = new EssentialsLogoPropertiesConfig();
|
||||||
|
LogoDark = new EssentialsLogoPropertiesConfig();
|
||||||
public class EssentialsAvRoomPropertiesConfig : EssentialsRoomPropertiesConfig
|
}
|
||||||
{
|
}
|
||||||
[JsonProperty("defaultAudioKey")]
|
|
||||||
public string DefaultAudioKey { get; set; }
|
public class EssentialsRoomUiBehaviorConfig
|
||||||
[JsonProperty("sourceListKey")]
|
{
|
||||||
public string SourceListKey { get; set; }
|
[JsonProperty("disableActivityButtonsWhileWarmingCooling")]
|
||||||
[JsonProperty("destinationListKey")]
|
public bool DisableActivityButtonsWhileWarmingCooling { get; set; }
|
||||||
public string DestinationListKey { get; set; }
|
}
|
||||||
[JsonProperty("defaultSourceItem")]
|
|
||||||
public string DefaultSourceItem { get; set; }
|
public class EssentialsAvRoomPropertiesConfig : EssentialsRoomPropertiesConfig
|
||||||
/// <summary>
|
{
|
||||||
/// Indicates if the room supports advanced sharing
|
[JsonProperty("defaultAudioKey")]
|
||||||
/// </summary>
|
public string DefaultAudioKey { get; set; }
|
||||||
[JsonProperty("supportsAdvancedSharing")]
|
[JsonProperty("sourceListKey")]
|
||||||
public bool SupportsAdvancedSharing { get; set; }
|
public string SourceListKey { get; set; }
|
||||||
/// <summary>
|
[JsonProperty("destinationListKey")]
|
||||||
/// Indicates if non-tech users can change the share mode
|
public string DestinationListKey { get; set; }
|
||||||
/// </summary>
|
[JsonProperty("defaultSourceItem")]
|
||||||
[JsonProperty("userCanChangeShareMode")]
|
public string DefaultSourceItem { get; set; }
|
||||||
public bool UserCanChangeShareMode { get; set; }
|
/// <summary>
|
||||||
}
|
/// Indicates if the room supports advanced sharing
|
||||||
|
/// </summary>
|
||||||
public class EssentialsConferenceRoomPropertiesConfig : EssentialsAvRoomPropertiesConfig
|
[JsonProperty("supportsAdvancedSharing")]
|
||||||
{
|
public bool SupportsAdvancedSharing { get; set; }
|
||||||
[JsonProperty("videoCodecKey")]
|
/// <summary>
|
||||||
public string VideoCodecKey { get; set; }
|
/// Indicates if non-tech users can change the share mode
|
||||||
[JsonProperty("audioCodecKey")]
|
/// </summary>
|
||||||
public string AudioCodecKey { get; set; }
|
[JsonProperty("userCanChangeShareMode")]
|
||||||
}
|
public bool UserCanChangeShareMode { get; set; }
|
||||||
|
}
|
||||||
public class EssentialsEnvironmentPropertiesConfig
|
|
||||||
{
|
public class EssentialsConferenceRoomPropertiesConfig : EssentialsAvRoomPropertiesConfig
|
||||||
public bool Enabled { get; set; }
|
{
|
||||||
|
[JsonProperty("videoCodecKey")]
|
||||||
[JsonProperty("deviceKeys")]
|
public string VideoCodecKey { get; set; }
|
||||||
public List<string> DeviceKeys { get; set; }
|
[JsonProperty("audioCodecKey")]
|
||||||
|
public string AudioCodecKey { get; set; }
|
||||||
public EssentialsEnvironmentPropertiesConfig()
|
}
|
||||||
{
|
|
||||||
DeviceKeys = new List<string>();
|
public class EssentialsEnvironmentPropertiesConfig
|
||||||
}
|
{
|
||||||
|
public bool Enabled { get; set; }
|
||||||
}
|
|
||||||
|
[JsonProperty("deviceKeys")]
|
||||||
public class EssentialsRoomFusionConfig
|
public List<string> DeviceKeys { get; set; }
|
||||||
{
|
|
||||||
public uint IpIdInt
|
public EssentialsEnvironmentPropertiesConfig()
|
||||||
{
|
{
|
||||||
get
|
DeviceKeys = new List<string>();
|
||||||
{
|
}
|
||||||
try
|
|
||||||
{
|
}
|
||||||
return Convert.ToUInt32(IpId, 16);
|
|
||||||
}
|
public class EssentialsRoomFusionConfig
|
||||||
catch (Exception)
|
{
|
||||||
{
|
public uint IpIdInt
|
||||||
throw new FormatException(string.Format("ERROR:Unable to convert IP ID: {0} to hex. Error:\n{1}", IpId));
|
{
|
||||||
}
|
get
|
||||||
|
{
|
||||||
}
|
try
|
||||||
}
|
{
|
||||||
|
return Convert.ToUInt32(IpId, 16);
|
||||||
[JsonProperty("ipId")]
|
}
|
||||||
public string IpId { get; set; }
|
catch (Exception)
|
||||||
|
{
|
||||||
[JsonProperty("joinMapKey")]
|
throw new FormatException(string.Format("ERROR:Unable to convert IP ID: {0} to hex. Error:\n{1}", IpId));
|
||||||
public string JoinMapKey { get; set; }
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
public class EssentialsRoomMicrophonePrivacyConfig
|
|
||||||
{
|
[JsonProperty("ipId")]
|
||||||
[JsonProperty("deviceKey")]
|
public string IpId { get; set; }
|
||||||
public string DeviceKey { get; set; }
|
|
||||||
|
[JsonProperty("joinMapKey")]
|
||||||
[JsonProperty("behaviour")]
|
public string JoinMapKey { get; set; }
|
||||||
public string Behaviour { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
public class EssentialsRoomMicrophonePrivacyConfig
|
||||||
/// Properties for the help text box
|
{
|
||||||
/// </summary>
|
[JsonProperty("deviceKey")]
|
||||||
public class EssentialsHelpPropertiesConfig
|
public string DeviceKey { get; set; }
|
||||||
{
|
|
||||||
[JsonProperty("message")]
|
[JsonProperty("behaviour")]
|
||||||
public string Message { get; set; }
|
public string Behaviour { get; set; }
|
||||||
|
}
|
||||||
[JsonProperty("showCallButton")]
|
|
||||||
public bool ShowCallButton { get; set; }
|
/// <summary>
|
||||||
|
/// Properties for the help text box
|
||||||
/// <summary>
|
/// </summary>
|
||||||
/// Defaults to "Call Help Desk"
|
public class EssentialsHelpPropertiesConfig
|
||||||
/// </summary>
|
{
|
||||||
[JsonProperty("callButtonText")]
|
[JsonProperty("message")]
|
||||||
public string CallButtonText { get; set; }
|
public string Message { get; set; }
|
||||||
|
|
||||||
public EssentialsHelpPropertiesConfig()
|
[JsonProperty("showCallButton")]
|
||||||
{
|
public bool ShowCallButton { get; set; }
|
||||||
CallButtonText = "Call Help Desk";
|
|
||||||
}
|
/// <summary>
|
||||||
}
|
/// Defaults to "Call Help Desk"
|
||||||
|
/// </summary>
|
||||||
/// <summary>
|
[JsonProperty("callButtonText")]
|
||||||
///
|
public string CallButtonText { get; set; }
|
||||||
/// </summary>
|
|
||||||
public class EssentialsOneButtonMeetingPropertiesConfig
|
public EssentialsHelpPropertiesConfig()
|
||||||
{
|
{
|
||||||
[JsonProperty("enable")]
|
CallButtonText = "Call Help Desk";
|
||||||
public bool Enable { get; set; }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EssentialsRoomAddressPropertiesConfig
|
/// <summary>
|
||||||
{
|
///
|
||||||
[JsonProperty("phoneNumber")]
|
/// </summary>
|
||||||
public string PhoneNumber { get; set; }
|
public class EssentialsOneButtonMeetingPropertiesConfig
|
||||||
|
{
|
||||||
[JsonProperty("sipAddress")]
|
[JsonProperty("enable")]
|
||||||
public string SipAddress { get; set; }
|
public bool Enable { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class EssentialsRoomAddressPropertiesConfig
|
||||||
/// <summary>
|
{
|
||||||
/// Properties for the room's logo on panels
|
[JsonProperty("phoneNumber")]
|
||||||
/// </summary>
|
public string PhoneNumber { get; set; }
|
||||||
public class EssentialsLogoPropertiesConfig
|
|
||||||
{
|
[JsonProperty("sipAddress")]
|
||||||
[JsonProperty("type")]
|
public string SipAddress { get; set; }
|
||||||
public string Type { get; set; }
|
}
|
||||||
|
|
||||||
[JsonProperty("url")]
|
|
||||||
public string Url { get; set; }
|
/// <summary>
|
||||||
/// <summary>
|
/// Properties for the room's logo on panels
|
||||||
/// Gets either the custom URL, a local-to-processor URL, or null if it's a default logo
|
/// </summary>
|
||||||
/// </summary>
|
public class EssentialsLogoPropertiesConfig
|
||||||
public string GetLogoUrlLight()
|
{
|
||||||
{
|
[JsonProperty("type")]
|
||||||
if (Type == "url")
|
public string Type { get; set; }
|
||||||
return Url;
|
|
||||||
if (Type == "system")
|
[JsonProperty("url")]
|
||||||
return string.Format("http://{0}:8080/logo.png",
|
public string Url { get; set; }
|
||||||
CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0));
|
/// <summary>
|
||||||
return null;
|
/// Gets either the custom URL, a local-to-processor URL, or null if it's a default logo
|
||||||
}
|
/// </summary>
|
||||||
|
public string GetLogoUrlLight()
|
||||||
public string GetLogoUrlDark()
|
{
|
||||||
{
|
if (Type == "url")
|
||||||
if (Type == "url")
|
return Url;
|
||||||
return Url;
|
if (Type == "system")
|
||||||
if (Type == "system")
|
return string.Format("http://{0}:8080/logo.png",
|
||||||
return string.Format("http://{0}:8080/logo-dark.png",
|
CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0));
|
||||||
CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0));
|
return null;
|
||||||
return null;
|
}
|
||||||
}
|
|
||||||
}
|
public string GetLogoUrlDark()
|
||||||
|
{
|
||||||
/// <summary>
|
if (Type == "url")
|
||||||
/// Represents occupancy sensor(s) setup for a room
|
return Url;
|
||||||
/// </summary>
|
if (Type == "system")
|
||||||
public class EssentialsRoomOccSensorConfig
|
return string.Format("http://{0}:8080/logo-dark.png",
|
||||||
{
|
CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0));
|
||||||
[JsonProperty("deviceKey")]
|
return null;
|
||||||
public string DeviceKey { get; set; }
|
}
|
||||||
|
}
|
||||||
[JsonProperty("timeoutMinutes")]
|
|
||||||
public int TimeoutMinutes { get; set; }
|
/// <summary>
|
||||||
}
|
/// Represents occupancy sensor(s) setup for a room
|
||||||
|
/// </summary>
|
||||||
public class EssentialsRoomTechConfig
|
public class EssentialsRoomOccSensorConfig
|
||||||
{
|
{
|
||||||
[JsonProperty("password")]
|
[JsonProperty("deviceKey")]
|
||||||
public string Password { get; set; }
|
public string DeviceKey { get; set; }
|
||||||
}
|
|
||||||
|
[JsonProperty("timeoutMinutes")]
|
||||||
|
public int TimeoutMinutes { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class EssentialsRoomTechConfig
|
||||||
|
{
|
||||||
|
[JsonProperty("password")]
|
||||||
|
public string Password { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -226,7 +226,182 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Initialize()
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//if (DefaultAudioDevice is IBasicVolumeControls)
|
||||||
|
// DefaultVolumeControls = DefaultAudioDevice as IBasicVolumeControls;
|
||||||
|
//else if (DefaultAudioDevice is IHasVolumeDevice)
|
||||||
|
// DefaultVolumeControls = (DefaultAudioDevice as IHasVolumeDevice).VolumeDevice;
|
||||||
|
//CurrentVolumeControls = DefaultVolumeControls;
|
||||||
|
|
||||||
|
|
||||||
|
//// Combines call feedback from both codecs if available
|
||||||
|
//InCallFeedback = new BoolFeedback(() =>
|
||||||
|
//{
|
||||||
|
// bool inAudioCall = false;
|
||||||
|
// bool inVideoCall = false;
|
||||||
|
|
||||||
|
// if (AudioCodec != null)
|
||||||
|
// inAudioCall = AudioCodec.IsInCall;
|
||||||
|
|
||||||
|
// if (VideoCodec != null)
|
||||||
|
// inVideoCall = VideoCodec.IsInCall;
|
||||||
|
|
||||||
|
// if (inAudioCall || inVideoCall)
|
||||||
|
// return true;
|
||||||
|
// else
|
||||||
|
// return false;
|
||||||
|
//});
|
||||||
|
|
||||||
|
//SetupDisplays();
|
||||||
|
|
||||||
|
//// Get Microphone Privacy object, if any MUST HAPPEN AFTER setting InCallFeedback
|
||||||
|
//this.MicrophonePrivacy = EssentialsRoomConfigHelper.GetMicrophonePrivacy(PropertiesConfig, this);
|
||||||
|
|
||||||
|
//Debug.Console(2, this, "Microphone Privacy Config evaluated.");
|
||||||
|
|
||||||
|
//// Get emergency object, if any
|
||||||
|
//this.Emergency = EssentialsRoomConfigHelper.GetEmergency(PropertiesConfig, this);
|
||||||
|
|
||||||
|
//Debug.Console(2, this, "Emergency Config evaluated.");
|
||||||
|
|
||||||
|
|
||||||
|
//VideoCodec.CallStatusChange += (o, a) => this.InCallFeedback.FireUpdate();
|
||||||
|
//VideoCodec.IsReadyChange += (o, a) => { this.SetCodecExternalSources(); SetCodecBranding(); };
|
||||||
|
|
||||||
|
//if (AudioCodec != null)
|
||||||
|
// AudioCodec.CallStatusChange += (o, a) => this.InCallFeedback.FireUpdate();
|
||||||
|
|
||||||
|
//IsSharingFeedback = new BoolFeedback(() => VideoCodec.SharingContentIsOnFeedback.BoolValue);
|
||||||
|
//VideoCodec.SharingContentIsOnFeedback.OutputChange += (o, a) => this.IsSharingFeedback.FireUpdate();
|
||||||
|
|
||||||
|
//// link privacy to VC (for now?)
|
||||||
|
//PrivacyModeIsOnFeedback = new BoolFeedback(() => VideoCodec.PrivacyModeIsOnFeedback.BoolValue);
|
||||||
|
//VideoCodec.PrivacyModeIsOnFeedback.OutputChange += (o, a) => this.PrivacyModeIsOnFeedback.FireUpdate();
|
||||||
|
|
||||||
|
//CallTypeFeedback = new IntFeedback(() => 0);
|
||||||
|
|
||||||
|
SetSourceListKey();
|
||||||
|
|
||||||
|
//EnablePowerOnToLastSource = true;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Console(0, this, "Error Initializing Room: {0}", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetupDisplays()
|
||||||
|
{
|
||||||
|
//DefaultDisplay = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultDisplayKey) as IRoutingSinkWithSwitching;
|
||||||
|
|
||||||
|
var destinationList = ConfigReader.ConfigObject.DestinationLists[PropertiesConfig.DestinationListKey];
|
||||||
|
|
||||||
|
Displays.Clear();
|
||||||
|
|
||||||
|
foreach (var destination in destinationList)
|
||||||
|
{
|
||||||
|
var dest = destination.Value.SinkDevice as IRoutingSinkWithSwitching;
|
||||||
|
|
||||||
|
if (dest != null)
|
||||||
|
{
|
||||||
|
Displays.Add(dest);
|
||||||
|
}
|
||||||
|
|
||||||
|
var display = dest as DisplayBase;
|
||||||
|
if (display != null)
|
||||||
|
{
|
||||||
|
// Link power, warming, cooling to display
|
||||||
|
var dispTwoWay = display as IHasPowerControlWithFeedback;
|
||||||
|
if (dispTwoWay != null)
|
||||||
|
{
|
||||||
|
dispTwoWay.PowerIsOnFeedback.OutputChange -= PowerIsOnFeedback_OutputChange;
|
||||||
|
dispTwoWay.PowerIsOnFeedback.OutputChange += PowerIsOnFeedback_OutputChange;
|
||||||
|
|
||||||
|
if (dispTwoWay.PowerIsOnFeedback.BoolValue)
|
||||||
|
{
|
||||||
|
SetDefaultLevels();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
display.IsWarmingUpFeedback.OutputChange -= IsWarmingUpFeedback_OutputChange;
|
||||||
|
display.IsWarmingUpFeedback.OutputChange += IsWarmingUpFeedback_OutputChange;
|
||||||
|
|
||||||
|
display.IsCoolingDownFeedback.OutputChange -= IsCoolingDownFeedback_OutputChange;
|
||||||
|
display.IsCoolingDownFeedback.OutputChange += IsCoolingDownFeedback_OutputChange;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void IsCoolingDownFeedback_OutputChange(object sender, FeedbackEventArgs e)
|
||||||
|
{
|
||||||
|
IsCoolingDownFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
void IsWarmingUpFeedback_OutputChange(object sender, FeedbackEventArgs e)
|
||||||
|
{
|
||||||
|
IsWarmingUpFeedback.FireUpdate();
|
||||||
|
if (!IsWarmingUpFeedback.BoolValue)
|
||||||
|
(CurrentVolumeControls as IBasicVolumeWithFeedback).SetVolume(DefaultVolume);
|
||||||
|
}
|
||||||
|
|
||||||
|
void PowerIsOnFeedback_OutputChange(object sender, FeedbackEventArgs e)
|
||||||
|
{
|
||||||
|
var dispTwoWay = sender as IHasPowerControlWithFeedback;
|
||||||
|
|
||||||
|
if (dispTwoWay != null && dispTwoWay.PowerIsOnFeedback.BoolValue != OnFeedback.BoolValue)
|
||||||
|
{
|
||||||
|
//if (!dispTwoWay.PowerIsOnFeedback.BoolValue)
|
||||||
|
// CurrentSourceInfo = null;
|
||||||
|
OnFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void SetSourceListKey()
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(PropertiesConfig.SourceListKey))
|
||||||
|
{
|
||||||
|
SetSourceListKey(PropertiesConfig.SourceListKey);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SetSourceListKey(Key);
|
||||||
|
}
|
||||||
|
|
||||||
|
SetUpVideoCodec();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void CustomSetConfig(DeviceConfig config)
|
||||||
|
{
|
||||||
|
var newPropertiesConfig = JsonConvert.DeserializeObject<EssentialsHuddleVtc1PropertiesConfig>(config.Properties.ToString());
|
||||||
|
|
||||||
|
if (newPropertiesConfig != null)
|
||||||
|
PropertiesConfig = newPropertiesConfig;
|
||||||
|
|
||||||
|
ConfigWriter.UpdateRoomConfig(config);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Deactivate()
|
||||||
|
{
|
||||||
|
// Stop listining to this event when room deactivated
|
||||||
|
VideoCodec.IsReadyChange -= VideoCodec_IsReadyChange;
|
||||||
|
|
||||||
|
// Clear occupancy
|
||||||
|
RoomOccupancy = null;
|
||||||
|
|
||||||
|
Debug.Console(0, this, "Room '{0}' Deactivated", Name);
|
||||||
|
|
||||||
|
return base.Deactivate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool CustomActivate()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -267,127 +442,95 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
Debug.Console(2, this, "Emergency Config evaluated.");
|
Debug.Console(2, this, "Emergency Config evaluated.");
|
||||||
|
|
||||||
|
|
||||||
VideoCodec.CallStatusChange += (o, a) => this.InCallFeedback.FireUpdate();
|
|
||||||
VideoCodec.IsReadyChange += (o, a) => { this.SetCodecExternalSources(); SetCodecBranding(); };
|
|
||||||
|
|
||||||
if (AudioCodec != null)
|
if (AudioCodec != null)
|
||||||
AudioCodec.CallStatusChange += (o, a) => this.InCallFeedback.FireUpdate();
|
{
|
||||||
|
AudioCodec.CallStatusChange -= AudioCodec_CallStatusChange;
|
||||||
|
AudioCodec.CallStatusChange += AudioCodec_CallStatusChange;
|
||||||
|
}
|
||||||
|
|
||||||
|
VideoCodec.CallStatusChange -= VideoCodec_CallStatusChange;
|
||||||
|
VideoCodec.CallStatusChange += VideoCodec_CallStatusChange;
|
||||||
|
|
||||||
|
VideoCodec.IsReadyChange -= VideoCodec_IsReadyChange;
|
||||||
|
VideoCodec.IsReadyChange += VideoCodec_IsReadyChange;
|
||||||
|
|
||||||
|
VideoCodec.SharingContentIsOnFeedback.OutputChange -= SharingContentIsOnFeedback_OutputChange;
|
||||||
|
VideoCodec.SharingContentIsOnFeedback.OutputChange += SharingContentIsOnFeedback_OutputChange;
|
||||||
|
|
||||||
|
|
||||||
IsSharingFeedback = new BoolFeedback(() => VideoCodec.SharingContentIsOnFeedback.BoolValue);
|
IsSharingFeedback = new BoolFeedback(() => VideoCodec.SharingContentIsOnFeedback.BoolValue);
|
||||||
VideoCodec.SharingContentIsOnFeedback.OutputChange += (o, a) => this.IsSharingFeedback.FireUpdate();
|
|
||||||
|
|
||||||
// link privacy to VC (for now?)
|
// link privacy to VC (for now?)
|
||||||
PrivacyModeIsOnFeedback = new BoolFeedback(() => VideoCodec.PrivacyModeIsOnFeedback.BoolValue);
|
PrivacyModeIsOnFeedback = new BoolFeedback(() => VideoCodec.PrivacyModeIsOnFeedback.BoolValue);
|
||||||
VideoCodec.PrivacyModeIsOnFeedback.OutputChange += (o, a) => this.PrivacyModeIsOnFeedback.FireUpdate();
|
|
||||||
|
VideoCodec.PrivacyModeIsOnFeedback.OutputChange -= PrivacyModeIsOnFeedback_OutputChange;
|
||||||
|
VideoCodec.PrivacyModeIsOnFeedback.OutputChange += PrivacyModeIsOnFeedback_OutputChange;
|
||||||
|
|
||||||
CallTypeFeedback = new IntFeedback(() => 0);
|
CallTypeFeedback = new IntFeedback(() => 0);
|
||||||
|
|
||||||
SetSourceListKey();
|
SetSourceListKey();
|
||||||
|
|
||||||
EnablePowerOnToLastSource = true;
|
EnablePowerOnToLastSource = true;
|
||||||
|
|
||||||
|
|
||||||
|
// Add Occupancy object from config
|
||||||
|
if (PropertiesConfig.Occupancy != null)
|
||||||
|
{
|
||||||
|
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Setting Occupancy Provider for room");
|
||||||
|
this.SetRoomOccupancy(DeviceManager.GetDeviceForKey(PropertiesConfig.Occupancy.DeviceKey) as
|
||||||
|
IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.LogoUrlLightBkgnd = PropertiesConfig.LogoLight.GetLogoUrlLight();
|
||||||
|
this.LogoUrlDarkBkgnd = PropertiesConfig.LogoDark.GetLogoUrlDark();
|
||||||
|
|
||||||
|
this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem;
|
||||||
|
this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(0, this, "Error Initializing Room: {0}", e);
|
Debug.Console(0, this, "Error Activiating Room: {0}", e);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SetupDisplays()
|
|
||||||
{
|
|
||||||
//DefaultDisplay = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultDisplayKey) as IRoutingSinkWithSwitching;
|
|
||||||
|
|
||||||
var destinationList = ConfigReader.ConfigObject.DestinationLists[PropertiesConfig.DestinationListKey];
|
|
||||||
|
|
||||||
foreach (var destination in destinationList)
|
|
||||||
{
|
|
||||||
var dest = destination.Value.SinkDevice as IRoutingSinkWithSwitching;
|
|
||||||
|
|
||||||
if (dest != null)
|
|
||||||
{
|
|
||||||
Displays.Add(dest);
|
|
||||||
}
|
|
||||||
|
|
||||||
var display = dest as DisplayBase;
|
|
||||||
if (display != null)
|
|
||||||
{
|
|
||||||
// Link power, warming, cooling to display
|
|
||||||
var dispTwoWay = display as IHasPowerControlWithFeedback;
|
|
||||||
if (dispTwoWay != null)
|
|
||||||
{
|
|
||||||
dispTwoWay.PowerIsOnFeedback.OutputChange += (o, a) =>
|
|
||||||
{
|
|
||||||
if (dispTwoWay.PowerIsOnFeedback.BoolValue != OnFeedback.BoolValue)
|
|
||||||
{
|
|
||||||
//if (!dispTwoWay.PowerIsOnFeedback.BoolValue)
|
|
||||||
// CurrentSourceInfo = null;
|
|
||||||
OnFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
if (dispTwoWay.PowerIsOnFeedback.BoolValue)
|
|
||||||
{
|
|
||||||
SetDefaultLevels();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
display.IsWarmingUpFeedback.OutputChange += (o, a) =>
|
|
||||||
{
|
|
||||||
IsWarmingUpFeedback.FireUpdate();
|
|
||||||
if (!IsWarmingUpFeedback.BoolValue)
|
|
||||||
(CurrentVolumeControls as IBasicVolumeWithFeedback).SetVolume(DefaultVolume);
|
|
||||||
};
|
|
||||||
display.IsCoolingDownFeedback.OutputChange += (o, a) =>
|
|
||||||
{
|
|
||||||
IsCoolingDownFeedback.FireUpdate();
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SetSourceListKey()
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(PropertiesConfig.SourceListKey))
|
|
||||||
{
|
|
||||||
SetSourceListKey(PropertiesConfig.SourceListKey);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SetSourceListKey(Key);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SetCodecExternalSources();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void CustomSetConfig(DeviceConfig config)
|
|
||||||
{
|
|
||||||
var newPropertiesConfig = JsonConvert.DeserializeObject<EssentialsHuddleVtc1PropertiesConfig>(config.Properties.ToString());
|
|
||||||
|
|
||||||
if (newPropertiesConfig != null)
|
|
||||||
PropertiesConfig = newPropertiesConfig;
|
|
||||||
|
|
||||||
ConfigWriter.UpdateRoomConfig(config);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool CustomActivate()
|
|
||||||
{
|
|
||||||
// Add Occupancy object from config
|
|
||||||
if (PropertiesConfig.Occupancy != null)
|
|
||||||
{
|
|
||||||
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Setting Occupancy Provider for room");
|
|
||||||
this.SetRoomOccupancy(DeviceManager.GetDeviceForKey(PropertiesConfig.Occupancy.DeviceKey) as
|
|
||||||
IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.LogoUrlLightBkgnd = PropertiesConfig.LogoLight.GetLogoUrlLight();
|
|
||||||
this.LogoUrlDarkBkgnd = PropertiesConfig.LogoDark.GetLogoUrlDark();
|
|
||||||
|
|
||||||
this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem;
|
|
||||||
this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100);
|
|
||||||
|
|
||||||
|
Debug.Console(0, this, "Room '{0}' Activated", Name);
|
||||||
return base.CustomActivate();
|
return base.CustomActivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AudioCodec_CallStatusChange(object sender, CodecCallStatusItemChangeEventArgs e)
|
||||||
|
{
|
||||||
|
InCallFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
void PrivacyModeIsOnFeedback_OutputChange(object sender, FeedbackEventArgs e)
|
||||||
|
{
|
||||||
|
PrivacyModeIsOnFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
void VideoCodec_IsReadyChange(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
SetUpVideoCodec();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetUpVideoCodec()
|
||||||
|
{
|
||||||
|
SetCodecExternalSources();
|
||||||
|
SetCodecBranding();
|
||||||
|
}
|
||||||
|
|
||||||
|
void VideoCodec_CallStatusChange(object sender, CodecCallStatusItemChangeEventArgs e)
|
||||||
|
{
|
||||||
|
InCallFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SharingContentIsOnFeedback_OutputChange(object sender, FeedbackEventArgs e)
|
||||||
|
{
|
||||||
|
IsSharingFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -780,6 +923,8 @@ namespace PepperDash.Essentials
|
|||||||
videoCodecWithExternalSwitching.SetExternalSourceState(kvp.Key, PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.eExternalSourceMode.Ready);
|
videoCodecWithExternalSwitching.SetExternalSourceState(kvp.Key, PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.eExternalSourceMode.Ready);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Debug.Console(1, this, "Successfully set up codec external sources for room: {0}", Name);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user