mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-21 15:45:53 +00:00
Compare commits
1018 Commits
1.9.2-hotf
...
v1.17.0-ce
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
078f35a91d | ||
|
|
dba07dced8 | ||
|
|
5ad232135c | ||
|
|
3f8e72f366 | ||
|
|
307b2f54a7 | ||
|
|
f73482e8ed | ||
|
|
e5a7641564 | ||
|
|
2b845ce4cb | ||
|
|
1f095e2fb3 | ||
|
|
2a7f491f62 | ||
|
|
2af603013d | ||
|
|
9aa890d404 | ||
|
|
de714f998b | ||
|
|
bcc07fb4cf | ||
|
|
a3651eac76 | ||
|
|
645d9d7098 | ||
|
|
b731f51c5a | ||
|
|
02c2dceedc | ||
|
|
bc1e9b070a | ||
|
|
781faa0431 | ||
|
|
87602c19d7 | ||
|
|
ade5596a18 | ||
|
|
c32ffdc1a8 | ||
|
|
a8285f211d | ||
|
|
6f38f4953e | ||
|
|
8230d95746 | ||
|
|
065726ee72 | ||
|
|
33a31ab931 | ||
|
|
b85377dccf | ||
|
|
e7c5e0566a | ||
|
|
cb2c117588 | ||
|
|
be34808ef0 | ||
|
|
7a4224e52a | ||
|
|
428f9f34bd | ||
|
|
78e49871c6 | ||
|
|
12e81af9e6 | ||
|
|
544a7a2d73 | ||
|
|
1d843c6c89 | ||
|
|
c72db72e7e | ||
|
|
9e588f4da5 | ||
|
|
4c466b425c | ||
|
|
d0aed1c1c5 | ||
|
|
bf966121f9 | ||
|
|
ecadb439b2 | ||
|
|
8c1553a026 | ||
|
|
9755724342 | ||
|
|
4d25c420e5 | ||
|
|
3190dacdf8 | ||
|
|
44add9aac6 | ||
|
|
5bb6405874 | ||
|
|
fed3d7e13a | ||
|
|
af848b9ca4 | ||
|
|
b52c13d8e8 | ||
|
|
26f9118154 | ||
|
|
bba3c347c6 | ||
|
|
be96adcc06 | ||
|
|
b245016420 | ||
|
|
19f2c6aa79 | ||
|
|
533ca05ac2 | ||
|
|
9c7777fbaa | ||
|
|
5530c91b75 | ||
|
|
67e0378806 | ||
|
|
1c5aca03d2 | ||
|
|
6f5fa2c3b8 | ||
|
|
3d760cbedc | ||
|
|
d713abf614 | ||
|
|
a64b5240ad | ||
|
|
c528fecb9a | ||
|
|
355e9cde12 | ||
|
|
1df8d3f617 | ||
|
|
2f1caff815 | ||
|
|
4da2f25c3d | ||
|
|
552a315ac0 | ||
|
|
99c35f14e1 | ||
|
|
5f2b916220 | ||
|
|
c7a16a46e9 | ||
|
|
d6334538c0 | ||
|
|
4f64022623 | ||
|
|
7ad638ea9a | ||
|
|
51d168b1d5 | ||
|
|
3179f3bf59 | ||
|
|
eba27d016d | ||
|
|
e5fe16122f | ||
|
|
ee9b191f85 | ||
|
|
d1d1d81165 | ||
|
|
6698dcb46e | ||
|
|
c8aa77fbc0 | ||
|
|
53b96d54e6 | ||
|
|
6c41b8e19d | ||
|
|
922119fdd6 | ||
|
|
86c1faa7cd | ||
|
|
75895604ed | ||
|
|
de6f8c7896 | ||
|
|
5a5e24a921 | ||
|
|
8b3bc523d2 | ||
|
|
ff04d49a1b | ||
|
|
55af6a96f6 | ||
|
|
a3561bc89b | ||
|
|
1a123ab6dc | ||
|
|
c0b0b35f6d | ||
|
|
1d60f2e069 | ||
|
|
bd97676050 | ||
|
|
8612fab4fe | ||
|
|
b9fd9f23a4 | ||
|
|
1e07e44279 | ||
|
|
1569c12450 | ||
|
|
6d020132cf | ||
|
|
7ecb2ecf6d | ||
|
|
393033b6c9 | ||
|
|
9fb16f30b0 | ||
|
|
8b6a9db7e0 | ||
|
|
5a67a4060d | ||
|
|
0fad667fab | ||
|
|
95c37872ad | ||
|
|
a5ad7ea48b | ||
|
|
14221f9613 | ||
|
|
334a62c329 | ||
|
|
e590c7cedb | ||
|
|
189c470603 | ||
|
|
4deee11d15 | ||
|
|
4bdac8d9e9 | ||
|
|
58e019992a | ||
|
|
da5d2d74f2 | ||
|
|
2afa9df705 | ||
|
|
1aa9590587 | ||
|
|
27bac4e83d | ||
|
|
4e33743f50 | ||
|
|
08af6370a6 | ||
|
|
97c0bddb48 | ||
|
|
316d545bda | ||
|
|
13df52ab49 | ||
|
|
527457baf5 | ||
|
|
d74c5de651 | ||
|
|
b06d0c0deb | ||
|
|
759fb1d729 | ||
|
|
3defd6b41b | ||
|
|
794cd3be5f | ||
|
|
68cbbee6a3 | ||
|
|
a50d758f70 | ||
|
|
aedac14feb | ||
|
|
93134cae5c | ||
|
|
555915b151 | ||
|
|
fa0f006b9b | ||
|
|
4c0fb6311b | ||
|
|
6538cecc3b | ||
|
|
44296cbc54 | ||
|
|
0dcf45fc84 | ||
|
|
4d2ce83e75 | ||
|
|
da4070bad0 | ||
|
|
d95692ba96 | ||
|
|
daf3f321bd | ||
|
|
269d82227d | ||
|
|
e8f20a4ca3 | ||
|
|
5fbacadd7f | ||
|
|
9c9b2952aa | ||
|
|
a7a4b75382 | ||
|
|
8d0f0c0c37 | ||
|
|
2b97b9bdc4 | ||
|
|
77f5dafdfe | ||
|
|
b5bf87c634 | ||
|
|
62f175c24a | ||
|
|
0cfcf61d6b | ||
|
|
4a0bacb27e | ||
|
|
a36901894d | ||
|
|
c047507997 | ||
|
|
ef719b0a64 | ||
|
|
c46409dc3f | ||
|
|
f73d6994b8 | ||
|
|
a787be6ccc | ||
|
|
f0ae0094dc | ||
|
|
fcd4b5d772 | ||
|
|
c3ba6d5c28 | ||
|
|
3f6b2f05a2 | ||
|
|
cab0b01a08 | ||
|
|
f4af1b6e7c | ||
|
|
a04bfd1fcb | ||
|
|
faaf8151df | ||
|
|
0ee6322684 | ||
|
|
c614347f29 | ||
|
|
43f06d2167 | ||
|
|
2ffe24fd93 | ||
|
|
515ffd07f0 | ||
|
|
16ea7a88be | ||
|
|
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 | ||
|
|
ad3ae0de69 | ||
|
|
892167d236 | ||
|
|
e843098ac3 | ||
|
|
7c892b4f71 | ||
|
|
1abe54fa48 | ||
|
|
1566e04edf | ||
|
|
f902a57f60 | ||
|
|
309605ee38 | ||
|
|
e2b8e356ff | ||
|
|
832102f4bb | ||
|
|
b23b7cb813 | ||
|
|
33c7038d99 | ||
|
|
7f36a00813 | ||
|
|
c4843d68f4 | ||
|
|
7e8d88c3af | ||
|
|
c539c79135 | ||
|
|
281b6f065f | ||
|
|
b42d487c4c | ||
|
|
acfbefca00 | ||
|
|
397c0f250b | ||
|
|
a1dce1bb17 | ||
|
|
15aacbd8c8 | ||
|
|
34a695ba95 | ||
|
|
0ab1ece445 | ||
|
|
5f668c7173 | ||
|
|
6db5a9b2ca | ||
|
|
89dd098ea6 | ||
|
|
787c8eb954 | ||
|
|
97b9ed5016 | ||
|
|
06fdee313a | ||
|
|
b3f7568469 | ||
|
|
55ab593d73 | ||
|
|
a06652ee61 | ||
|
|
747c68bd1e | ||
|
|
4f26df3149 | ||
|
|
428edad38a | ||
|
|
f3431f287c | ||
|
|
80b5fb6c7f | ||
|
|
6df594dd7f | ||
|
|
e39c76001a | ||
|
|
d88a454499 | ||
|
|
b0e3fddec7 | ||
|
|
0e5cecbfc3 | ||
|
|
57dac392da | ||
|
|
348981d8cb | ||
|
|
bee3f0caf3 | ||
|
|
79a3a8ed7e | ||
|
|
cb3c80ff8f | ||
|
|
0bb4b6edd4 | ||
|
|
e4a4564bbc | ||
|
|
b0288951eb | ||
|
|
bfdc882eb6 | ||
|
|
7a2e99f145 | ||
|
|
db67f97a1f | ||
|
|
102ae3ad4f | ||
|
|
7dd6b3a9b6 | ||
|
|
e24965eb54 | ||
|
|
9d80954214 | ||
|
|
70c5df9040 | ||
|
|
89a7f2aa80 | ||
|
|
90023621dc | ||
|
|
adbce916ba | ||
|
|
b97783603b | ||
|
|
db526cdd40 | ||
|
|
db982f4490 | ||
|
|
c84525ddef | ||
|
|
a3b078d327 | ||
|
|
b9c07b01e9 | ||
|
|
d0097089e6 | ||
|
|
582390c7c7 | ||
|
|
faabdde3f7 | ||
|
|
402754b69e | ||
|
|
84b39a959e | ||
|
|
93bfcc7baa | ||
|
|
64352811c5 | ||
|
|
3a74abd061 | ||
|
|
08aa8fb2e6 | ||
|
|
b5589364ff | ||
|
|
6cd1a03ee0 | ||
|
|
e19b0ba530 | ||
|
|
7b2498ac6b | ||
|
|
d9181c780f | ||
|
|
bc826c9e17 | ||
|
|
c6023ad700 | ||
|
|
742ff4bc1b | ||
|
|
2502947df8 | ||
|
|
7075da5b68 | ||
|
|
abdd1b38f8 | ||
|
|
455d85e8f9 | ||
|
|
d1509fe94b | ||
|
|
9d87c76ab2 | ||
|
|
c87048a221 | ||
|
|
eef5503a5a | ||
|
|
793e46718d | ||
|
|
699d7aa9a2 | ||
|
|
554a16dc8f | ||
|
|
4dc4565e69 | ||
|
|
fb6021424e | ||
|
|
bb8761d710 | ||
|
|
3198f5d876 | ||
|
|
5d5dee2e5e | ||
|
|
05aece772f | ||
|
|
8393ae3ded | ||
|
|
4eace11943 | ||
|
|
89bd988391 | ||
|
|
8bfd3ffd51 | ||
|
|
56fa88a956 | ||
|
|
a21b6fe3f6 | ||
|
|
cc0ec3f8d3 | ||
|
|
a5e2e65116 | ||
|
|
eea59d682a | ||
|
|
c717f61b42 | ||
|
|
4a2b15b0c6 | ||
|
|
379498aea1 | ||
|
|
d320b2ca07 | ||
|
|
dba60cfd76 | ||
|
|
52c589b56b | ||
|
|
482bef435a | ||
|
|
99580ae8b5 | ||
|
|
60ed2ea537 | ||
|
|
7d89f51dcf | ||
|
|
1623ee1d9e | ||
|
|
0d4d86e0e6 | ||
|
|
2d64e49f8e | ||
|
|
acdd9bb674 | ||
|
|
c8b1808513 | ||
|
|
ce785ceb25 | ||
|
|
8e46d575e4 | ||
|
|
4650d17695 | ||
|
|
5816c3cafe | ||
|
|
e275d747f8 | ||
|
|
98ad7f315f | ||
|
|
d11389d110 | ||
|
|
0547bb07fd | ||
|
|
f27b0a1b59 | ||
|
|
5d1c5c9e99 | ||
|
|
458de1aaa6 | ||
|
|
661bf41de5 | ||
|
|
5d1bc88b28 | ||
|
|
156d58f42f | ||
|
|
68d71b1bab | ||
|
|
436674a708 | ||
|
|
5fd8e4bc2b | ||
|
|
41bf98a5a7 | ||
|
|
75e62eac33 | ||
|
|
cee9bd6af8 | ||
|
|
82121dc55c | ||
|
|
72a5491309 | ||
|
|
d12a2a19a8 | ||
|
|
0745f30177 | ||
|
|
a6e4efd64f | ||
|
|
611f0bec2e | ||
|
|
90e22e9136 | ||
|
|
4552a15cbb | ||
|
|
2f901b9fc4 | ||
|
|
3cf85f99ce | ||
|
|
c48f697b7e | ||
|
|
2e1195431f | ||
|
|
cf88e3b36d | ||
|
|
bceb7115ed | ||
|
|
1d2eb42c46 | ||
|
|
ef12650f9c | ||
|
|
176d4675da | ||
|
|
ae10e560f0 | ||
|
|
e152250363 | ||
|
|
8945398cd7 | ||
|
|
37a7886ec2 | ||
|
|
c685608f67 | ||
|
|
cdafaf1bcb | ||
|
|
fffaa1e5e6 | ||
|
|
d8aef1a0da | ||
|
|
6310001e18 | ||
|
|
b21495d624 | ||
|
|
2dbc3aa8db | ||
|
|
0ff29695e7 | ||
|
|
237d163ce3 | ||
|
|
f9c03d8d15 | ||
|
|
ff773b6ddc | ||
|
|
3a4c661e5d | ||
|
|
03f01b2f78 | ||
|
|
8aae23db9e | ||
|
|
fa89a73c4b | ||
|
|
a043309bb1 | ||
|
|
dc53ce42e7 | ||
|
|
6dd882b1a0 | ||
|
|
da8c2c4357 | ||
|
|
446bae4dd3 | ||
|
|
e7d1d560ee | ||
|
|
d3f30d8b71 | ||
|
|
2e5b7cad64 | ||
|
|
5171385b5b | ||
|
|
3ee44bcf6e | ||
|
|
949a04647b | ||
|
|
31f976d719 | ||
|
|
11ffc5130f | ||
|
|
59bfa354e4 | ||
|
|
536e82ef22 | ||
|
|
99d60af7cd | ||
|
|
63cd322fd0 | ||
|
|
489ba2da04 | ||
|
|
8087aa7a75 | ||
|
|
e7ca32207c | ||
|
|
cd186aa3a3 | ||
|
|
a212387c49 | ||
|
|
847d39bc2f | ||
|
|
b343101886 | ||
|
|
7dabe161a7 | ||
|
|
3de2ba03c1 | ||
|
|
39e85d5311 | ||
|
|
62bdddf4c1 | ||
|
|
2969458afe | ||
|
|
4196d50b4c | ||
|
|
a8d0dfb327 | ||
|
|
8d7c93a6e5 | ||
|
|
e593f1c281 | ||
|
|
369bdf5c66 | ||
|
|
3077b3f865 | ||
|
|
313b336d56 | ||
|
|
0ecf593e44 | ||
|
|
cef9e0a9a6 | ||
|
|
16369e31cf | ||
|
|
38959414ff | ||
|
|
6fcb47e0ef | ||
|
|
25423f0caa | ||
|
|
3a162ee9dd | ||
|
|
033f6e12f1 | ||
|
|
bc3247297e | ||
|
|
f7bf728263 | ||
|
|
32443a2102 | ||
|
|
c296ef9e21 | ||
|
|
c65616a426 | ||
|
|
d67a161e32 | ||
|
|
493b391d6f | ||
|
|
805022631b | ||
|
|
5442a1db48 | ||
|
|
5bf5d17ea8 | ||
|
|
d444b8a7ba | ||
|
|
61be312826 | ||
|
|
fb624ef20c | ||
|
|
025bf7adfb | ||
|
|
a6430a7bfe | ||
|
|
b71c83bac0 | ||
|
|
5940ec17c2 | ||
|
|
10445508b2 | ||
|
|
66ecf43508 | ||
|
|
e855359f61 | ||
|
|
5f50f14a71 | ||
|
|
1e9139f38e | ||
|
|
c521a1d551 | ||
|
|
d22c1bf344 | ||
|
|
fd232beae1 | ||
|
|
35edbeacfc | ||
|
|
b5cabfc644 | ||
|
|
bead782bd5 | ||
|
|
1e98484082 | ||
|
|
e7915b1e99 | ||
|
|
23600d8bc9 | ||
|
|
a165ba911f | ||
|
|
16db2663a6 | ||
|
|
8d1f187643 | ||
|
|
a6741e47e4 | ||
|
|
5a81ce9137 | ||
|
|
77c4272219 | ||
|
|
d78a378859 | ||
|
|
eec4484f78 | ||
|
|
49e82f107b | ||
|
|
149c1dd22d | ||
|
|
79f9d09558 | ||
|
|
c5162fb94d | ||
|
|
63b9ffdd26 | ||
|
|
2e76b6ba0a | ||
|
|
cad45c04cb | ||
|
|
70d63a9f99 | ||
|
|
30f63eee03 | ||
|
|
9f1c512909 | ||
|
|
c7d9789ffb | ||
|
|
9c4c1d99b8 | ||
|
|
0d6cd8d55d | ||
|
|
d06c73e994 | ||
|
|
8e64140651 | ||
|
|
54697e0eaf | ||
|
|
0da35c8572 | ||
|
|
3d543dfd09 | ||
|
|
9c22c4cb5f | ||
|
|
f0942a3932 | ||
|
|
9f3a3f64a8 | ||
|
|
fe01842523 | ||
|
|
4ffea1c98f | ||
|
|
73e3b049d8 | ||
|
|
0ae38dddfc | ||
|
|
871894e248 | ||
|
|
fa6cabe246 | ||
|
|
db3d96d448 | ||
|
|
a28a078c4f | ||
|
|
d00a31e3a6 | ||
|
|
77134f0a30 | ||
|
|
93dfb8780b | ||
|
|
f791feb848 | ||
|
|
44509dc5ae | ||
|
|
2d0dcd7336 | ||
|
|
c255ae1525 | ||
|
|
d50027cc82 | ||
|
|
9b64b7b7f3 | ||
|
|
c0cdb09544 | ||
|
|
8c2c58d756 | ||
|
|
44e5753138 | ||
|
|
c71805cfc4 | ||
|
|
5d177104d8 | ||
|
|
147e712a01 | ||
|
|
9a1b069e24 | ||
|
|
d6878df267 | ||
|
|
a379641595 | ||
|
|
d8cd04b35f | ||
|
|
8539a6b79c | ||
|
|
adec25104c | ||
|
|
a54cd9e1df | ||
|
|
8af7b4b1db | ||
|
|
3edb0145d0 | ||
|
|
0a1af09830 | ||
|
|
532f3ba237 | ||
|
|
50aafb088e | ||
|
|
e1d9a46284 | ||
|
|
bfd383dfc7 | ||
|
|
b853e8ed37 | ||
|
|
60c2d4df01 | ||
|
|
8ab87af859 | ||
|
|
47035d8386 | ||
|
|
c84ec4c899 | ||
|
|
4444328600 | ||
|
|
acd2be3679 | ||
|
|
e7cfe1143d | ||
|
|
0d3eb42495 | ||
|
|
540a00861c | ||
|
|
0014dd7a14 | ||
|
|
f922b871a1 | ||
|
|
b2331fa1e5 | ||
|
|
8bf4b0d568 | ||
|
|
621205e65c | ||
|
|
62fcf3856f | ||
|
|
dad986414c | ||
|
|
55766b21ba | ||
|
|
21bc6a05de | ||
|
|
f298b5cc41 | ||
|
|
f8129fe7ae | ||
|
|
dbdaedcca3 | ||
|
|
893950d8c4 | ||
|
|
b780351bf0 | ||
|
|
6a1671aae1 | ||
|
|
9a1a23c88a | ||
|
|
3c352bbd20 | ||
|
|
8ab3e45d96 | ||
|
|
11e5123fdf | ||
|
|
2e4bb7466c | ||
|
|
36a41ac477 | ||
|
|
26bf7d8f73 | ||
|
|
92f4d37cd6 | ||
|
|
b9479bab70 | ||
|
|
c6d10ba87e | ||
|
|
12e8dca47e | ||
|
|
5c02d72ed1 | ||
|
|
fd94a94ee9 | ||
|
|
3fa2954ca0 | ||
|
|
c4f6afa412 | ||
|
|
6bdda5451b | ||
|
|
115a20d8e6 | ||
|
|
c298d37b9f | ||
|
|
f3ab364a4d | ||
|
|
538f81c18e | ||
|
|
3ee8c07ecd | ||
|
|
5f5ded74fc | ||
|
|
01b713e6e1 | ||
|
|
002cc07b52 | ||
|
|
16f993852c | ||
|
|
ffd0fbc57b | ||
|
|
9ac1d77c2a | ||
|
|
2dd0c53a08 | ||
|
|
fab1219146 | ||
|
|
23e8280904 | ||
|
|
60d0f50cd2 | ||
|
|
6708be0d15 | ||
|
|
d193de79da | ||
|
|
87ab43c745 | ||
|
|
2a37e44d7d | ||
|
|
efa801137c | ||
|
|
4b4f1f3c3d | ||
|
|
6e7bf061cf | ||
|
|
c26d7d73f8 | ||
|
|
7f6160eb44 | ||
|
|
854a0691d3 | ||
|
|
61c638452b | ||
|
|
072411e4f6 | ||
|
|
1bf828b8a9 | ||
|
|
7dc9afa119 | ||
|
|
b5004d5b1d | ||
|
|
6f0bfedac1 | ||
|
|
71881addab | ||
|
|
cea1d2fcdd | ||
|
|
22aea3089d | ||
|
|
397a5b1794 | ||
|
|
0867d08c5a | ||
|
|
5c3e1ca915 | ||
|
|
1de42b9e97 | ||
|
|
3aab807631 | ||
|
|
9ec090397f | ||
|
|
86916c4357 | ||
|
|
40151c5f8f | ||
|
|
4210df693a | ||
|
|
56bb872d2b | ||
|
|
43256acfcd | ||
|
|
1696ef3ac1 | ||
|
|
0e41cafdad | ||
|
|
864e0675ea | ||
|
|
77672237e6 | ||
|
|
8ae03a8187 | ||
|
|
7114e60c04 | ||
|
|
19cbe480a6 | ||
|
|
49c1c61a88 | ||
|
|
c306e2c1a1 | ||
|
|
0cd3c1bdc5 | ||
|
|
d64cbc639a | ||
|
|
82af1366df | ||
|
|
56492a00cd | ||
|
|
8404e7d5a4 | ||
|
|
e4135a958c | ||
|
|
b026174cd2 | ||
|
|
28bac18667 | ||
|
|
ea254ef983 | ||
|
|
76e4d4a82d | ||
|
|
6542c062b9 | ||
|
|
4bd777f6b9 | ||
|
|
f607394ee7 | ||
|
|
085a64c87b | ||
|
|
2db397b474 | ||
|
|
bfa48091d9 | ||
|
|
c4752b2ac2 | ||
|
|
152dcbe81e | ||
|
|
56f9a29c61 | ||
|
|
290e887903 | ||
|
|
de7a74eaff | ||
|
|
88e5c49663 | ||
|
|
1415999d86 | ||
|
|
61d8370329 | ||
|
|
c8b0c7dd01 | ||
|
|
5f6b650dba | ||
|
|
94c0e92f6b | ||
|
|
a5046df671 | ||
|
|
5a4f7b6a28 | ||
|
|
10f5516a5a | ||
|
|
dfaaa3f6bc | ||
|
|
45e6dff26d | ||
|
|
10129b8178 | ||
|
|
9128e108f7 | ||
|
|
760ec8be92 | ||
|
|
bbcdd3e179 | ||
|
|
7a649f4ea8 | ||
|
|
6946946c12 | ||
|
|
dca73e1508 | ||
|
|
990090e1de | ||
|
|
377cccf912 | ||
|
|
9795637d75 | ||
|
|
6f6ca50c37 | ||
|
|
7b7ec53355 | ||
|
|
e3920132bf | ||
|
|
c2e5bd290a | ||
|
|
7fd52814a0 | ||
|
|
06a3dda2e4 | ||
|
|
d97ca6d5a4 | ||
|
|
4c50d6980f | ||
|
|
3b843104d8 | ||
|
|
a37814ab3c | ||
|
|
2181410927 | ||
|
|
d4191ceb75 | ||
|
|
5f6d15c6c0 | ||
|
|
c7180db2b7 | ||
|
|
d95ee27979 | ||
|
|
e964172200 | ||
|
|
840934502b | ||
|
|
a76f4c15dc | ||
|
|
b19e2e38ad | ||
|
|
9a7fe553f9 | ||
|
|
895b76a0cd | ||
|
|
0cc2328276 | ||
|
|
54769ce270 | ||
|
|
6b85323949 | ||
|
|
4e81859695 | ||
|
|
1ebacf3f0f | ||
|
|
7de0251188 |
1
.github/scripts/ZipBuildOutput.ps1
vendored
1
.github/scripts/ZipBuildOutput.ps1
vendored
@@ -8,6 +8,7 @@ $destination = "$($Env:GITHUB_HOME)\output"
|
|||||||
New-Item -ItemType Directory -Force -Path ($destination)
|
New-Item -ItemType Directory -Force -Path ($destination)
|
||||||
Get-ChildItem ($destination)
|
Get-ChildItem ($destination)
|
||||||
$exclusions = @(git submodule foreach --quiet 'echo $name')
|
$exclusions = @(git submodule foreach --quiet 'echo $name')
|
||||||
|
$exclusions += "Newtonsoft.Compact.Json.dll"
|
||||||
# Trying to get any .json schema files (not currently working)
|
# Trying to get any .json schema files (not currently working)
|
||||||
# Gets any files with the listed extensions.
|
# Gets any files with the listed extensions.
|
||||||
Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include "*.clz", "*.cpz", "*.cplz", "*.dll", "*.nuspec" | ForEach-Object {
|
Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include "*.clz", "*.cpz", "*.cplz", "*.dll", "*.nuspec" | ForEach-Object {
|
||||||
|
|||||||
21
.github/workflows/EssentialsPlugins-builds-3-series-caller.yml
vendored
Normal file
21
.github/workflows/EssentialsPlugins-builds-3-series-caller.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
name: Build Essentials 1.X
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
getVersion:
|
||||||
|
uses: PepperDash/workflow-templates/.github/workflows/essentialsplugins-getversion.yml@main
|
||||||
|
secrets: inherit
|
||||||
|
build-3Series:
|
||||||
|
uses: PepperDash/workflow-templates/.github/workflows/essentials-3Series-builds.yml@main
|
||||||
|
secrets: inherit
|
||||||
|
needs: getVersion
|
||||||
|
if: needs.getVersion.outputs.newVersion == 'true'
|
||||||
|
with:
|
||||||
|
newVersion: ${{ needs.getVersion.outputs.newVersion }}
|
||||||
|
version: ${{ needs.getVersion.outputs.version }}
|
||||||
|
tag: ${{ needs.getVersion.outputs.tag }}
|
||||||
|
channel: ${{ needs.getVersion.outputs.channel }}
|
||||||
144
.github/workflows/docker.yml
vendored
144
.github/workflows/docker.yml
vendored
@@ -1,144 +0,0 @@
|
|||||||
name: Branch Build Using Docker
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- feature/*
|
|
||||||
- hotfix/*
|
|
||||||
- bugfix/*
|
|
||||||
- release/*
|
|
||||||
- development
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- development
|
|
||||||
|
|
||||||
env:
|
|
||||||
# solution path doesn't need slashes unless there it is multiple folders deep
|
|
||||||
# solution name does not include extension. .sln is assumed
|
|
||||||
SOLUTION_PATH: PepperDashEssentials
|
|
||||||
SOLUTION_FILE: PepperDashEssentials
|
|
||||||
# Do not edit this, we're just creating it here
|
|
||||||
VERSION: 0.0.0-buildtype-buildnumber
|
|
||||||
# Defaults to debug for build type
|
|
||||||
BUILD_TYPE: Debug
|
|
||||||
# Defaults to main as the release branch. Change as necessary
|
|
||||||
RELEASE_BRANCH: main
|
|
||||||
jobs:
|
|
||||||
Build_Project:
|
|
||||||
runs-on: windows-latest
|
|
||||||
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-latest
|
|
||||||
steps:
|
|
||||||
- name: Download Build Version Info
|
|
||||||
uses: actions/download-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Version
|
|
||||||
- name: Set Version Number
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
Get-ChildItem "./Version"
|
|
||||||
$version = Get-Content -Path ./Version/version.txt
|
|
||||||
Write-Host "Version: $version"
|
|
||||||
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
||||||
Remove-Item -Path ./Version/version.txt
|
|
||||||
Remove-Item -Path ./Version
|
|
||||||
- name: Download Build output
|
|
||||||
uses: actions/download-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Build
|
|
||||||
path: ./
|
|
||||||
- name: Unzip Build file
|
|
||||||
run: |
|
|
||||||
Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\
|
|
||||||
Remove-Item -Path .\*.zip
|
|
||||||
- name: Copy Files to root & delete output directory
|
|
||||||
run: |
|
|
||||||
Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz")
|
|
||||||
Get-ChildItem -Path .\output\* | Copy-Item -Destination .\
|
|
||||||
Remove-Item -Path .\output -Recurse
|
|
||||||
- name: Add nuget.exe
|
|
||||||
uses: nuget/setup-nuget@v1
|
|
||||||
- name: Add Github Packages source
|
|
||||||
run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Add nuget.org API Key
|
|
||||||
run: nuget setApiKey ${{ secrets.NUGET_API_KEY }}
|
|
||||||
- name: Create nuget package
|
|
||||||
run: nuget pack "./PepperDash_Essentials_Core.nuspec" -version ${{ env.VERSION }}
|
|
||||||
- name: Publish nuget package to Github registry
|
|
||||||
run: nuget push **/*.nupkg -source github
|
|
||||||
- name: Publish nuget package to nuget.org
|
|
||||||
run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json
|
|
||||||
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-latest
|
|
||||||
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-latest
|
|
||||||
steps:
|
|
||||||
- name: Download Build Version Info
|
|
||||||
uses: actions/download-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Version
|
|
||||||
- name: Set Version Number
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
Get-ChildItem "./Version"
|
|
||||||
$version = Get-Content -Path ./Version/version.txt
|
|
||||||
Write-Host "Version: $version"
|
|
||||||
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
||||||
Remove-Item -Path ./Version/version.txt
|
|
||||||
Remove-Item -Path ./Version
|
|
||||||
- name: Download Build output
|
|
||||||
uses: actions/download-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Build
|
|
||||||
path: ./
|
|
||||||
- name: Unzip Build file
|
|
||||||
run: |
|
|
||||||
Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\
|
|
||||||
Remove-Item -Path .\*.zip
|
|
||||||
- name: Copy Files to root & delete output directory
|
|
||||||
run: |
|
|
||||||
Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz")
|
|
||||||
Get-ChildItem -Path .\output\* | Copy-Item -Destination .\
|
|
||||||
Remove-Item -Path .\output -Recurse
|
|
||||||
- name: Add nuget.exe
|
|
||||||
uses: nuget/setup-nuget@v1
|
|
||||||
- name: Add Github Packages source
|
|
||||||
run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Add nuget.org API Key
|
|
||||||
run: nuget setApiKey ${{ secrets.NUGET_API_KEY }}
|
|
||||||
- name: Create nuget package
|
|
||||||
run: nuget pack "./PepperDash_Essentials_Core.nuspec" -version ${{ env.VERSION }}
|
|
||||||
- name: Publish nuget package to Github registry
|
|
||||||
run: nuget push **/*.nupkg -source github
|
|
||||||
- name: Publish nuget package to nuget.org
|
|
||||||
run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json
|
|
||||||
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
|
||||||
|
|||||||
BIN
IR Drivers/Apple_AppleTV_4th_Gen_Essentials.ir
Normal file
BIN
IR Drivers/Apple_AppleTV_4th_Gen_Essentials.ir
Normal file
Binary file not shown.
@@ -1,21 +1,21 @@
|
|||||||
|
|
||||||
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
|
||||||
@@ -1,344 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
using Crestron.SimplSharp.CrestronIO;
|
|
||||||
using Crestron.SimplSharpPro;
|
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
|
||||||
using Crestron.SimplSharpPro.UI;
|
|
||||||
using PepperDash.Core;
|
|
||||||
using PepperDash.Essentials.Core;
|
|
||||||
using PepperDash.Essentials.Core.Config;
|
|
||||||
using PepperDash.Essentials.Core.PageManagers;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials
|
|
||||||
{
|
|
||||||
public class EssentialsTouchpanelController : EssentialsDevice, IHasBasicTriListWithSmartObject
|
|
||||||
{
|
|
||||||
public BasicTriListWithSmartObject Panel { get; private set; }
|
|
||||||
|
|
||||||
public PanelDriverBase PanelDriver { get; private set; }
|
|
||||||
|
|
||||||
CTimer BacklightTransitionedOnTimer;
|
|
||||||
|
|
||||||
public EssentialsTouchpanelController(string key, string name, Tswx52ButtonVoiceControl tsw,
|
|
||||||
string projectName, string sgdPath)
|
|
||||||
: base(key, name)
|
|
||||||
{
|
|
||||||
Panel = tsw;
|
|
||||||
tsw.LoadSmartObjects(sgdPath);
|
|
||||||
tsw.SigChange += Panel_SigChange;
|
|
||||||
}
|
|
||||||
|
|
||||||
public EssentialsTouchpanelController(string key, string name, Dge100 dge, string projectName, string sgdPath)
|
|
||||||
: base(key, name)
|
|
||||||
{
|
|
||||||
Panel = dge;
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(sgdPath))
|
|
||||||
dge.LoadSmartObjects(sgdPath);
|
|
||||||
else
|
|
||||||
Debug.Console(1, this, "No SGD file path defined");
|
|
||||||
|
|
||||||
dge.SigChange += Panel_SigChange;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Config constructor
|
|
||||||
/// </summary>
|
|
||||||
public EssentialsTouchpanelController(string key, string name, string type, CrestronTouchpanelPropertiesConfig props, uint id)
|
|
||||||
: base(key, name)
|
|
||||||
{
|
|
||||||
|
|
||||||
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Creating touchpanel hardware...");
|
|
||||||
type = type.ToLower();
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (type == "crestronapp")
|
|
||||||
{
|
|
||||||
var app = new CrestronApp(id, Global.ControlSystem);
|
|
||||||
app.ParameterProjectName.Value = props.ProjectName;
|
|
||||||
Panel = app;
|
|
||||||
}
|
|
||||||
else if (type == "tsw550")
|
|
||||||
Panel = new Tsw550(id, Global.ControlSystem);
|
|
||||||
else if (type == "tsw552")
|
|
||||||
Panel = new Tsw552(id, Global.ControlSystem);
|
|
||||||
else if (type == "tsw560")
|
|
||||||
Panel = new Tsw560(id, Global.ControlSystem);
|
|
||||||
else if (type == "tsw750")
|
|
||||||
Panel = new Tsw750(id, Global.ControlSystem);
|
|
||||||
else if (type == "tsw752")
|
|
||||||
Panel = new Tsw752(id, Global.ControlSystem);
|
|
||||||
else if (type == "tsw760")
|
|
||||||
Panel = new Tsw760(id, Global.ControlSystem);
|
|
||||||
else if (type == "tsw1050")
|
|
||||||
Panel = new Tsw1050(id, Global.ControlSystem);
|
|
||||||
else if (type == "tsw1052")
|
|
||||||
Panel = new Tsw1052(id, Global.ControlSystem);
|
|
||||||
else if (type == "tsw1060")
|
|
||||||
Panel = new Tsw1060(id, Global.ControlSystem);
|
|
||||||
else if (type == "tsw570")
|
|
||||||
Panel = new Tsw570(id, Global.ControlSystem);
|
|
||||||
else if (type == "tsw770")
|
|
||||||
Panel = new Tsw770(id, Global.ControlSystem);
|
|
||||||
else if (type == "ts770")
|
|
||||||
Panel = new Ts770(id, Global.ControlSystem);
|
|
||||||
else if (type == "tsw1070")
|
|
||||||
Panel = new Tsw1070(id, Global.ControlSystem);
|
|
||||||
else if (type == "ts1070")
|
|
||||||
Panel = new Ts1070(id, Global.ControlSystem);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "WARNING: Cannot create TSW controller with type '{0}'", type);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "WARNING: Cannot create TSW base class. Panel will not function: {0}", e.Message);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reserved sigs
|
|
||||||
if (Panel is TswFt5ButtonSystem)
|
|
||||||
{
|
|
||||||
var tsw = Panel as TswFt5ButtonSystem;
|
|
||||||
tsw.ExtenderSystemReservedSigs.Use();
|
|
||||||
tsw.ExtenderSystemReservedSigs.DeviceExtenderSigChange
|
|
||||||
+= ExtenderSystemReservedSigs_DeviceExtenderSigChange;
|
|
||||||
|
|
||||||
tsw.ButtonStateChange += new ButtonEventHandler(Tsw_ButtonStateChange);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Panel.Register() != eDeviceRegistrationUnRegistrationResponse.Success)
|
|
||||||
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "WARNING: Registration failed. Continuing, but panel may not function: {0}", Panel.RegistrationFailureReason);
|
|
||||||
|
|
||||||
// Give up cleanly if SGD is not present.
|
|
||||||
var sgdName = Global.FilePathPrefix + "sgd" + Global.DirectorySeparator + props.SgdFile;
|
|
||||||
if (!File.Exists(sgdName))
|
|
||||||
{
|
|
||||||
Debug.Console(0, this, "Smart object file '{0}' not present in User folder. Looking for embedded file", sgdName);
|
|
||||||
|
|
||||||
sgdName = Global.ApplicationDirectoryPathPrefix + Global.DirectorySeparator + "SGD" + Global.DirectorySeparator + props.SgdFile;
|
|
||||||
|
|
||||||
if (!File.Exists(sgdName))
|
|
||||||
{
|
|
||||||
Debug.Console(0, this, "Unable to find SGD file '{0}' in User sgd or application SGD folder. Exiting touchpanel load.", sgdName);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Panel.LoadSmartObjects(sgdName);
|
|
||||||
Panel.SigChange += Panel_SigChange;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void LoadAndShowDriver(PanelDriverBase driver)
|
|
||||||
{
|
|
||||||
PanelDriver = driver;
|
|
||||||
driver.Show();
|
|
||||||
}
|
|
||||||
|
|
||||||
void HomePressed()
|
|
||||||
{
|
|
||||||
if (BacklightTransitionedOnTimer == null)
|
|
||||||
PanelDriver.BackButtonPressed();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ExtenderSystemReservedSigs_DeviceExtenderSigChange(DeviceExtender currentDeviceExtender, SigEventArgs args)
|
|
||||||
{
|
|
||||||
// If the sig is transitioning on, mark it in case it was home button that transitioned it
|
|
||||||
var blOnSig = (Panel as TswFt5ButtonSystem).ExtenderSystemReservedSigs.BacklightOnFeedback;
|
|
||||||
if (args.Sig == blOnSig && blOnSig.BoolValue)
|
|
||||||
{
|
|
||||||
BacklightTransitionedOnTimer = new CTimer(o =>
|
|
||||||
{
|
|
||||||
BacklightTransitionedOnTimer = null;
|
|
||||||
}, 200);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PulseBool(uint join)
|
|
||||||
{
|
|
||||||
var act = Panel.BooleanInput[join].UserObject as Action<bool>;
|
|
||||||
if (act != null)
|
|
||||||
{
|
|
||||||
act(true);
|
|
||||||
act(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetBoolSig(uint join, bool value)
|
|
||||||
{
|
|
||||||
var act = Panel.BooleanInput[join].UserObject as Action<bool>;
|
|
||||||
if (act != null)
|
|
||||||
act(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetIntSig(uint join, ushort value)
|
|
||||||
{
|
|
||||||
var act = Panel.BooleanInput[join].UserObject as Action<ushort>;
|
|
||||||
if (act != null)
|
|
||||||
{
|
|
||||||
act(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Panel_SigChange(object currentDevice, Crestron.SimplSharpPro.SigEventArgs args)
|
|
||||||
{
|
|
||||||
if (Debug.Level == 2)
|
|
||||||
Debug.Console(2, this, "Sig change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue);
|
|
||||||
var uo = args.Sig.UserObject;
|
|
||||||
if (uo is Action<bool>)
|
|
||||||
(uo as Action<bool>)(args.Sig.BoolValue);
|
|
||||||
else if (uo is Action<ushort>)
|
|
||||||
(uo as Action<ushort>)(args.Sig.UShortValue);
|
|
||||||
else if (uo is Action<string>)
|
|
||||||
(uo as Action<string>)(args.Sig.StringValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Tsw_ButtonStateChange(GenericBase device, ButtonEventArgs args)
|
|
||||||
{
|
|
||||||
var uo = args.Button.UserObject;
|
|
||||||
if(uo is Action<bool>)
|
|
||||||
(uo as Action<bool>)(args.Button.State == eButtonState.Pressed);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class EssentialsTouchpanelControllerFactory : EssentialsDeviceFactory<EssentialsTouchpanelController>
|
|
||||||
{
|
|
||||||
public EssentialsTouchpanelControllerFactory()
|
|
||||||
{
|
|
||||||
TypeNames = new List<string>() { "tsw550", "tsw750", "tsw1050", "tsw560", "tsw760", "tsw1060", "tsw570", "tsw770", "ts770", "tsw1070", "ts1070", "xpanel" };
|
|
||||||
}
|
|
||||||
|
|
||||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
|
||||||
{
|
|
||||||
var comm = CommFactory.GetControlPropertiesConfig(dc);
|
|
||||||
var props = Newtonsoft.Json.JsonConvert.DeserializeObject<CrestronTouchpanelPropertiesConfig>(dc.Properties.ToString());
|
|
||||||
|
|
||||||
Debug.Console(1, "Factory Attempting to create new EssentialsTouchpanelController");
|
|
||||||
|
|
||||||
var panelController = new EssentialsTouchpanelController(dc.Key, dc.Name, dc.Type, props, comm.IpIdInt);
|
|
||||||
|
|
||||||
panelController.AddPostActivationAction(() =>
|
|
||||||
{
|
|
||||||
var mainDriver = new EssentialsPanelMainInterfaceDriver(panelController.Panel, props);
|
|
||||||
// Then the sub drivers
|
|
||||||
|
|
||||||
// spin up different room drivers depending on room type
|
|
||||||
var room = DeviceManager.GetDeviceForKey(props.DefaultRoomKey);
|
|
||||||
if (room is EssentialsHuddleSpaceRoom)
|
|
||||||
{
|
|
||||||
// Screen Saver Driver
|
|
||||||
mainDriver.ScreenSaverController = new ScreenSaverController(mainDriver, props);
|
|
||||||
|
|
||||||
// Header Driver
|
|
||||||
Debug.Console(0, panelController, "Adding header driver");
|
|
||||||
mainDriver.HeaderDriver = new EssentialsHeaderDriver(mainDriver, props);
|
|
||||||
|
|
||||||
// AV Driver
|
|
||||||
Debug.Console(0, panelController, "Adding huddle space AV driver");
|
|
||||||
var avDriver = new EssentialsHuddlePanelAvFunctionsDriver(mainDriver, props);
|
|
||||||
avDriver.DefaultRoomKey = props.DefaultRoomKey;
|
|
||||||
mainDriver.AvDriver = avDriver;
|
|
||||||
avDriver.CurrentRoom = room as EssentialsHuddleSpaceRoom;
|
|
||||||
|
|
||||||
// Environment Driver
|
|
||||||
if (avDriver.CurrentRoom.PropertiesConfig.Environment != null && avDriver.CurrentRoom.PropertiesConfig.Environment.DeviceKeys.Count > 0)
|
|
||||||
{
|
|
||||||
Debug.Console(0, panelController, "Adding environment driver");
|
|
||||||
mainDriver.EnvironmentDriver = new EssentialsEnvironmentDriver(mainDriver, props);
|
|
||||||
|
|
||||||
mainDriver.EnvironmentDriver.GetDevicesFromConfig(avDriver.CurrentRoom.PropertiesConfig.Environment);
|
|
||||||
}
|
|
||||||
|
|
||||||
mainDriver.HeaderDriver.SetupHeaderButtons(avDriver, avDriver.CurrentRoom);
|
|
||||||
|
|
||||||
panelController.LoadAndShowDriver(mainDriver); // This is a little convoluted.
|
|
||||||
|
|
||||||
if (panelController.Panel is TswFt5ButtonSystem)
|
|
||||||
{
|
|
||||||
var tsw = panelController.Panel as TswFt5ButtonSystem;
|
|
||||||
// Wire up hard keys
|
|
||||||
tsw.Power.UserObject = new Action<bool>(b => { if (!b) avDriver.PowerButtonPressed(); });
|
|
||||||
//tsw.Home.UserObject = new Action<bool>(b => { if (!b) HomePressed(); });
|
|
||||||
if (mainDriver.EnvironmentDriver != null)
|
|
||||||
tsw.Lights.UserObject = new Action<bool>(b =>
|
|
||||||
{
|
|
||||||
if (!b)
|
|
||||||
{
|
|
||||||
//mainDriver.AvDriver.PopupInterlock.ShowInterlockedWithToggle(mainDriver.EnvironmentDriver.BackgroundSubpageJoin);
|
|
||||||
mainDriver.EnvironmentDriver.Toggle();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
tsw.Up.UserObject = new Action<bool>(avDriver.VolumeUpPress);
|
|
||||||
tsw.Down.UserObject = new Action<bool>(avDriver.VolumeDownPress);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (room is EssentialsHuddleVtc1Room)
|
|
||||||
{
|
|
||||||
Debug.Console(0, panelController, "Adding huddle space VTC AV driver");
|
|
||||||
|
|
||||||
// Screen Saver Driver
|
|
||||||
mainDriver.ScreenSaverController = new ScreenSaverController(mainDriver, props);
|
|
||||||
|
|
||||||
// Header Driver
|
|
||||||
mainDriver.HeaderDriver = new EssentialsHeaderDriver(mainDriver, props);
|
|
||||||
|
|
||||||
// AV Driver
|
|
||||||
var avDriver = new EssentialsHuddleVtc1PanelAvFunctionsDriver(mainDriver, props);
|
|
||||||
|
|
||||||
var codecDriver = new PepperDash.Essentials.UIDrivers.VC.EssentialsVideoCodecUiDriver(panelController.Panel, avDriver,
|
|
||||||
(room as EssentialsHuddleVtc1Room).VideoCodec, mainDriver.HeaderDriver);
|
|
||||||
avDriver.SetVideoCodecDriver(codecDriver);
|
|
||||||
avDriver.DefaultRoomKey = props.DefaultRoomKey;
|
|
||||||
mainDriver.AvDriver = avDriver;
|
|
||||||
avDriver.CurrentRoom = room as EssentialsHuddleVtc1Room;
|
|
||||||
|
|
||||||
// Environment Driver
|
|
||||||
if (avDriver.CurrentRoom.PropertiesConfig.Environment != null && avDriver.CurrentRoom.PropertiesConfig.Environment.DeviceKeys.Count > 0)
|
|
||||||
{
|
|
||||||
Debug.Console(0, panelController, "Adding environment driver");
|
|
||||||
mainDriver.EnvironmentDriver = new EssentialsEnvironmentDriver(mainDriver, props);
|
|
||||||
|
|
||||||
mainDriver.EnvironmentDriver.GetDevicesFromConfig(avDriver.CurrentRoom.PropertiesConfig.Environment);
|
|
||||||
}
|
|
||||||
|
|
||||||
mainDriver.HeaderDriver.SetupHeaderButtons(avDriver, avDriver.CurrentRoom);
|
|
||||||
|
|
||||||
panelController.LoadAndShowDriver(mainDriver); // This is a little convoluted.
|
|
||||||
|
|
||||||
if (panelController.Panel is TswFt5ButtonSystem)
|
|
||||||
{
|
|
||||||
var tsw = panelController.Panel as TswFt5ButtonSystem;
|
|
||||||
// Wire up hard keys
|
|
||||||
tsw.Power.UserObject = new Action<bool>(b => { if (!b) avDriver.EndMeetingPress(); });
|
|
||||||
//tsw.Home.UserObject = new Action<bool>(b => { if (!b) HomePressed(); });
|
|
||||||
if (mainDriver.EnvironmentDriver != null)
|
|
||||||
tsw.Lights.UserObject = new Action<bool>(b =>
|
|
||||||
{
|
|
||||||
if (!b)
|
|
||||||
{
|
|
||||||
//mainDriver.AvDriver.PopupInterlock.ShowInterlockedWithToggle(mainDriver.EnvironmentDriver.BackgroundSubpageJoin);
|
|
||||||
mainDriver.EnvironmentDriver.Toggle();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
tsw.Up.UserObject = new Action<bool>(avDriver.VolumeUpPress);
|
|
||||||
tsw.Down.UserObject = new Action<bool>(avDriver.VolumeDownPress);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Console(0, panelController, "ERROR: Cannot load AvFunctionsDriver for room '{0}'", props.DefaultRoomKey);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return panelController;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -54,6 +54,10 @@ Utilization of Essentials Framework falls into the following categories:
|
|||||||
|
|
||||||
For detailed documentation, see the [Wiki](https://github.com/PepperDash/EssentialsFramework/wiki).
|
For detailed documentation, see the [Wiki](https://github.com/PepperDash/EssentialsFramework/wiki).
|
||||||
|
|
||||||
|
## Support
|
||||||
|
|
||||||
|
* Check out our [Discord Server](https://discord.gg/rWyeRH3K)
|
||||||
|
|
||||||
## How-To (Getting Started)
|
## How-To (Getting Started)
|
||||||
|
|
||||||
See [Getting Started](https://github.com/PepperDash/Essentials/wiki/Get-started#how-to-get-started)
|
See [Getting Started](https://github.com/PepperDash/Essentials/wiki/Get-started#how-to-get-started)
|
||||||
|
|||||||
@@ -42,3 +42,6 @@ devjson:2 {"deviceKey":"display01Comm-com", "methodName":"SendText", "params": [
|
|||||||
|
|
||||||
devjson:10 {"deviceKey":"dmLink-ssh", "methodName":"Connect", "params": []}
|
devjson:10 {"deviceKey":"dmLink-ssh", "methodName":"Connect", "params": []}
|
||||||
|
|
||||||
|
devjson:2 {"deviceKey":"roomCombiner", "methodName":"SetRoomCombinationScenario", "params": ["combined"]}
|
||||||
|
|
||||||
|
devjson:2 {"deviceKey":"roomCombiner", "methodName":"SetRoomCombinationScenario", "params": ["divided"]}
|
||||||
@@ -1,107 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
|
||||||
{
|
|
||||||
public class DmpsAudioOutputControllerJoinMap : JoinMapBaseAdvanced
|
|
||||||
{
|
|
||||||
|
|
||||||
[JoinName("MasterVolumeLevel")]
|
|
||||||
public JoinDataComplete MasterVolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Master Volume Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
|
||||||
|
|
||||||
[JoinName("MasterVolumeMuteOn")]
|
|
||||||
public JoinDataComplete MasterVolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Master Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
[JoinName("MasterVolumeMuteOff")]
|
|
||||||
public JoinDataComplete MasterVolumeMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Master Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
[JoinName("MasterVolumeUp")]
|
|
||||||
public JoinDataComplete MasterVolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Master Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
[JoinName("MasterVolumeDown")]
|
|
||||||
public JoinDataComplete MasterVolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Master Volume Mute Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
[JoinName("SourceVolumeLevel")]
|
|
||||||
public JoinDataComplete SourceVolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Source Volume Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
|
||||||
|
|
||||||
[JoinName("SourceVolumeMuteOn")]
|
|
||||||
public JoinDataComplete SourceVolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Source Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
[JoinName("SourceVolumeMuteOff")]
|
|
||||||
public JoinDataComplete SourceVolumeMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Source Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
[JoinName("SourceVolumeUp")]
|
|
||||||
public JoinDataComplete SourceVolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Source Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
[JoinName("SourceVolumeDown")]
|
|
||||||
public JoinDataComplete SourceVolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Source Volume Mute Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
[JoinName("Codec1VolumeLevel")]
|
|
||||||
public JoinDataComplete Codec1VolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Codec1 Volume Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
|
||||||
|
|
||||||
[JoinName("Codec1VolumeMuteOn")]
|
|
||||||
public JoinDataComplete Codec1VolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Codec1 Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
[JoinName("Codec1VolumeMuteOff")]
|
|
||||||
public JoinDataComplete Codec1VolumeMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 22, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Codec1 Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
[JoinName("Codec1VolumeUp")]
|
|
||||||
public JoinDataComplete Codec1VolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 23, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Codec1 Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
[JoinName("Codec1VolumeDown")]
|
|
||||||
public JoinDataComplete Codec1VolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 24, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Codec1 Volume Mute Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
[JoinName("Codec2VolumeLevel")]
|
|
||||||
public JoinDataComplete Codec2VolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 31, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Codec2 Volume Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
|
||||||
|
|
||||||
[JoinName("Codec2VolumeMuteOn")]
|
|
||||||
public JoinDataComplete Codec2VolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 31, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Codec2 Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
[JoinName("Codec2VolumeMuteOff")]
|
|
||||||
public JoinDataComplete Codec2VolumeMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 32, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Codec2 Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
[JoinName("Codec2VolumeUp")]
|
|
||||||
public JoinDataComplete Codec2VolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 33, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Codec2 Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
[JoinName("Codec2VolumeDown")]
|
|
||||||
public JoinDataComplete Codec2VolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 34, JoinSpan = 1 },
|
|
||||||
new JoinMetadata { Description = "Codec2 Volume Mute Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Constructor to use when instantiating this Join Map without inheriting from it
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="joinStart">Join this join map will start at</param>
|
|
||||||
public DmpsAudioOutputControllerJoinMap(uint joinStart)
|
|
||||||
: this(joinStart, typeof(DmpsAudioOutputControllerJoinMap))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Constructor to use when extending this Join map
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="joinStart">Join this join map will start at</param>
|
|
||||||
/// <param name="type">Type of the child join map</param>
|
|
||||||
protected DmpsAudioOutputControllerJoinMap(uint joinStart, Type type) : base(joinStart, type)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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,158 +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 System.ComponentModel;
|
|
||||||
|
|
||||||
using PepperDash.Core;
|
|
||||||
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Used for monitoring comms that are IBasicCommunication. Will send a poll string and provide an event when
|
|
||||||
/// statuses change.
|
|
||||||
/// </summary>
|
|
||||||
public class GenericCommunicationMonitor : StatusMonitorBase
|
|
||||||
{
|
|
||||||
public IBasicCommunication Client { get; private set; }
|
|
||||||
|
|
||||||
long PollTime;
|
|
||||||
CTimer PollTimer;
|
|
||||||
string PollString;
|
|
||||||
Action PollAction;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="client"></param>
|
|
||||||
/// <param name="pollTime">in MS, >= 5000</param>
|
|
||||||
/// <param name="warningTime">in MS, >= 5000</param>
|
|
||||||
/// <param name="errorTime">in MS, >= 5000</param>
|
|
||||||
/// <param name="pollString">String to send to comm</param>
|
|
||||||
public GenericCommunicationMonitor(IKeyed parent, IBasicCommunication client, long pollTime,
|
|
||||||
long warningTime, long errorTime, string pollString) :
|
|
||||||
base(parent, warningTime, errorTime)
|
|
||||||
{
|
|
||||||
if (pollTime > warningTime || pollTime > errorTime)
|
|
||||||
throw new ArgumentException("pollTime must be less than warning or errorTime");
|
|
||||||
//if (pollTime < 5000)
|
|
||||||
// throw new ArgumentException("pollTime cannot be less than 5000 ms");
|
|
||||||
|
|
||||||
Client = client;
|
|
||||||
PollTime = pollTime;
|
|
||||||
PollString = pollString;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Poll is a provided action instead of string
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="parent"></param>
|
|
||||||
/// <param name="client"></param>
|
|
||||||
/// <param name="pollTime"></param>
|
|
||||||
/// <param name="warningTime"></param>
|
|
||||||
/// <param name="errorTime"></param>
|
|
||||||
/// <param name="pollBytes"></param>
|
|
||||||
public GenericCommunicationMonitor(IKeyed parent, IBasicCommunication client, long pollTime,
|
|
||||||
long warningTime, long errorTime, Action pollAction) :
|
|
||||||
base(parent, warningTime, errorTime)
|
|
||||||
{
|
|
||||||
if (pollTime > warningTime || pollTime > errorTime)
|
|
||||||
throw new ArgumentException("pollTime must be less than warning or errorTime");
|
|
||||||
//if (pollTime < 5000)
|
|
||||||
// throw new ArgumentException("pollTime cannot be less than 5000 ms");
|
|
||||||
|
|
||||||
Client = client;
|
|
||||||
PollTime = pollTime;
|
|
||||||
PollAction = pollAction;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Build the monitor from a config object
|
|
||||||
/// </summary>
|
|
||||||
public GenericCommunicationMonitor(IKeyed parent, IBasicCommunication client,
|
|
||||||
CommunicationMonitorConfig props) :
|
|
||||||
this(parent, client, props.PollInterval, props.TimeToWarning, props.TimeToError, props.PollString)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Start()
|
|
||||||
{
|
|
||||||
Client.BytesReceived += Client_BytesReceived;
|
|
||||||
Poll();
|
|
||||||
PollTimer = new CTimer(o => Poll(), null, PollTime, PollTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Stop()
|
|
||||||
{
|
|
||||||
Client.BytesReceived -= this.Client_BytesReceived;
|
|
||||||
PollTimer.Stop();
|
|
||||||
PollTimer = null;
|
|
||||||
StopErrorTimers();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Upon any receipt of data, set everything to ok!
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
void Client_BytesReceived(object sender, GenericCommMethodReceiveBytesArgs e)
|
|
||||||
{
|
|
||||||
Status = MonitorStatus.IsOk;
|
|
||||||
ResetErrorTimers();
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
void Poll()
|
|
||||||
{
|
|
||||||
StartErrorTimers();
|
|
||||||
if (Client.IsConnected)
|
|
||||||
{
|
|
||||||
//Debug.Console(2, this, "Polling");
|
|
||||||
if(PollAction != null)
|
|
||||||
PollAction.Invoke();
|
|
||||||
else
|
|
||||||
Client.SendText(PollString);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Console(2, this, "Comm not connected");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// When the client connects, and we're waiting for it, respond and disconect from event
|
|
||||||
/// </summary>
|
|
||||||
void OneTimeConnectHandler(object o, EventArgs a)
|
|
||||||
{
|
|
||||||
if (Client.IsConnected)
|
|
||||||
{
|
|
||||||
//Client.IsConnected -= OneTimeConnectHandler;
|
|
||||||
Debug.Console(2, this, "Comm connected");
|
|
||||||
Poll();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public class CommunicationMonitorConfig
|
|
||||||
{
|
|
||||||
public int PollInterval { get; set; }
|
|
||||||
public int TimeToWarning { get; set; }
|
|
||||||
public int TimeToError { get; set; }
|
|
||||||
public string PollString { get; set; }
|
|
||||||
|
|
||||||
public CommunicationMonitorConfig()
|
|
||||||
{
|
|
||||||
PollInterval = 30000;
|
|
||||||
TimeToWarning = 120000;
|
|
||||||
TimeToError = 300000;
|
|
||||||
PollString = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
|
|
||||||
using PepperDash.Core;
|
|
||||||
using PepperDash.Essentials.Core;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Aggregates the RoomIsOccupied feedbacks of one or more IOccupancyStatusProvider objects
|
|
||||||
/// </summary>
|
|
||||||
public class IOccupancyStatusProviderAggregator : Device, IOccupancyStatusProvider
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Aggregated feedback of all linked IOccupancyStatusProvider devices
|
|
||||||
/// </summary>
|
|
||||||
public BoolFeedback RoomIsOccupiedFeedback
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return AggregatedOccupancyStatus.Output;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private BoolFeedbackOr AggregatedOccupancyStatus;
|
|
||||||
|
|
||||||
public IOccupancyStatusProviderAggregator(string key, string name)
|
|
||||||
: base(key, name)
|
|
||||||
{
|
|
||||||
AggregatedOccupancyStatus = new BoolFeedbackOr();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Adds an IOccupancyStatusProvider device
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="statusProvider"></param>
|
|
||||||
public void AddOccupancyStatusProvider(IOccupancyStatusProvider statusProvider)
|
|
||||||
{
|
|
||||||
AggregatedOccupancyStatus.AddOutputIn(statusProvider.RoomIsOccupiedFeedback);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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,349 +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.Cards;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using PepperDash.Core;
|
|
||||||
using PepperDash.Essentials.Core;
|
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
|
||||||
using PepperDash.Essentials.DM.Config;
|
|
||||||
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.DM
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Exposes the volume levels for Program, Aux1 or Aux2 outputs on a DMPS3 chassis
|
|
||||||
/// </summary>
|
|
||||||
public class DmpsAudioOutputController : EssentialsBridgeableDevice
|
|
||||||
{
|
|
||||||
Card.Dmps3OutputBase OutputCard;
|
|
||||||
|
|
||||||
public DmpsAudioOutput MasterVolumeLevel { get; private set; }
|
|
||||||
public DmpsAudioOutput SourceVolumeLevel { get; private set; }
|
|
||||||
public DmpsAudioOutput Codec1VolumeLevel { get; private set; }
|
|
||||||
public DmpsAudioOutput Codec2VolumeLevel { get; private set; }
|
|
||||||
|
|
||||||
|
|
||||||
public DmpsAudioOutputController(string key, string name, Card.Dmps3OutputBase card)
|
|
||||||
: base(key, name)
|
|
||||||
{
|
|
||||||
OutputCard = card;
|
|
||||||
|
|
||||||
OutputCard.BaseDevice.DMOutputChange += new DMOutputEventHandler(BaseDevice_DMOutputChange);
|
|
||||||
|
|
||||||
MasterVolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Master);
|
|
||||||
SourceVolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Source);
|
|
||||||
|
|
||||||
if (card is Card.Dmps3ProgramOutput)
|
|
||||||
{
|
|
||||||
//(card as Card.Dmps3ProgramOutput).OutputMixer.MicLevel
|
|
||||||
//TODO: Hook up mic levels and mutes
|
|
||||||
Codec1VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec1);
|
|
||||||
Codec2VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec2);
|
|
||||||
}
|
|
||||||
else if (card is Card.Dmps3Aux1Output)
|
|
||||||
{
|
|
||||||
Codec2VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec2);
|
|
||||||
}
|
|
||||||
else if (card is Card.Dmps3Aux2Output)
|
|
||||||
{
|
|
||||||
Codec1VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void BaseDevice_DMOutputChange(Switch device, DMOutputEventArgs args)
|
|
||||||
{
|
|
||||||
switch (args.EventId)
|
|
||||||
{
|
|
||||||
case DMOutputEventIds.MasterVolumeFeedBackEventId:
|
|
||||||
{
|
|
||||||
MasterVolumeLevel.VolumeLevelFeedback.FireUpdate();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case DMOutputEventIds.MasterMuteOnFeedBackEventId:
|
|
||||||
{
|
|
||||||
MasterVolumeLevel.MuteFeedback.FireUpdate();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case DMOutputEventIds.SourceLevelFeedBackEventId:
|
|
||||||
{
|
|
||||||
SourceVolumeLevel.VolumeLevelFeedback.FireUpdate();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case DMOutputEventIds.Codec1LevelFeedBackEventId:
|
|
||||||
{
|
|
||||||
if(Codec1VolumeLevel != null)
|
|
||||||
Codec1VolumeLevel.VolumeLevelFeedback.FireUpdate();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case DMOutputEventIds.Codec1MuteOnFeedBackEventId:
|
|
||||||
{
|
|
||||||
if (Codec1VolumeLevel != null)
|
|
||||||
Codec1VolumeLevel.MuteFeedback.FireUpdate();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case DMOutputEventIds.Codec2LevelFeedBackEventId:
|
|
||||||
{
|
|
||||||
if (Codec2VolumeLevel != null)
|
|
||||||
Codec2VolumeLevel.VolumeLevelFeedback.FireUpdate();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case DMOutputEventIds.Codec2MuteOnFeedBackEventId:
|
|
||||||
{
|
|
||||||
if (Codec2VolumeLevel != null)
|
|
||||||
Codec2VolumeLevel.MuteFeedback.FireUpdate();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
|
||||||
{
|
|
||||||
var joinMap = new DmpsAudioOutputControllerJoinMap(joinStart);
|
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
|
||||||
joinMap = JsonConvert.DeserializeObject<DmpsAudioOutputControllerJoinMap>(joinMapSerialized);
|
|
||||||
|
|
||||||
if (bridge != null)
|
|
||||||
{
|
|
||||||
bridge.AddJoinMap(Key, joinMap);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
|
||||||
}
|
|
||||||
|
|
||||||
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
|
||||||
|
|
||||||
if (MasterVolumeLevel != null)
|
|
||||||
{
|
|
||||||
SetUpDmpsAudioOutputJoins(trilist, MasterVolumeLevel, joinMap.MasterVolumeLevel.JoinNumber);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (SourceVolumeLevel != null)
|
|
||||||
{
|
|
||||||
SetUpDmpsAudioOutputJoins(trilist, SourceVolumeLevel, joinMap.SourceVolumeLevel.JoinNumber);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Codec1VolumeLevel != null)
|
|
||||||
{
|
|
||||||
SetUpDmpsAudioOutputJoins(trilist, Codec1VolumeLevel, joinMap.Codec1VolumeLevel.JoinNumber);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Codec2VolumeLevel != null)
|
|
||||||
{
|
|
||||||
SetUpDmpsAudioOutputJoins(trilist, Codec2VolumeLevel, joinMap.Codec2VolumeLevel.JoinNumber);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static void SetUpDmpsAudioOutputJoins(BasicTriList trilist, DmpsAudioOutput output, uint joinStart)
|
|
||||||
{
|
|
||||||
var volumeLevelJoin = joinStart;
|
|
||||||
var muteOnJoin = joinStart;
|
|
||||||
var muteOffJoin = joinStart + 1;
|
|
||||||
var volumeUpJoin = joinStart + 2;
|
|
||||||
var volumeDownJoin = joinStart + 3;
|
|
||||||
|
|
||||||
|
|
||||||
trilist.SetUShortSigAction(volumeLevelJoin, output.SetVolume);
|
|
||||||
output.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[volumeLevelJoin]);
|
|
||||||
|
|
||||||
trilist.SetSigTrueAction(muteOnJoin, output.MuteOn);
|
|
||||||
output.MuteFeedback.LinkInputSig(trilist.BooleanInput[muteOnJoin]);
|
|
||||||
trilist.SetSigTrueAction(muteOffJoin, output.MuteOff);
|
|
||||||
output.MuteFeedback.LinkComplementInputSig(trilist.BooleanInput[muteOffJoin]);
|
|
||||||
|
|
||||||
trilist.SetBoolSigAction(volumeUpJoin, output.VolumeUp);
|
|
||||||
trilist.SetBoolSigAction(volumeDownJoin, output.VolumeDown);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class DmpsAudioOutput : IBasicVolumeWithFeedback
|
|
||||||
{
|
|
||||||
Card.Dmps3OutputBase Output;
|
|
||||||
|
|
||||||
UShortInputSig Level;
|
|
||||||
|
|
||||||
eDmpsLevelType Type;
|
|
||||||
|
|
||||||
public BoolFeedback MuteFeedback { get; private set; }
|
|
||||||
public IntFeedback VolumeLevelFeedback { get; private set; }
|
|
||||||
|
|
||||||
Action MuteOnAction;
|
|
||||||
Action MuteOffAction;
|
|
||||||
Action<bool> VolumeUpAction;
|
|
||||||
Action<bool> VolumeDownAction;
|
|
||||||
|
|
||||||
public DmpsAudioOutput(Card.Dmps3OutputBase output, eDmpsLevelType type)
|
|
||||||
{
|
|
||||||
Output = output;
|
|
||||||
|
|
||||||
Type = type;
|
|
||||||
|
|
||||||
switch (type)
|
|
||||||
{
|
|
||||||
case eDmpsLevelType.Master:
|
|
||||||
{
|
|
||||||
Level = output.MasterVolume;
|
|
||||||
|
|
||||||
MuteFeedback = new BoolFeedback( new Func<bool> (() => Output.MasterMuteOnFeedBack.BoolValue));
|
|
||||||
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => Output.MasterVolumeFeedBack.UShortValue));
|
|
||||||
MuteOnAction = new Action(Output.MasterMuteOn);
|
|
||||||
MuteOffAction = new Action(Output.MasterMuteOff);
|
|
||||||
VolumeUpAction = new Action<bool>((b) => Output.MasterVolumeUp.BoolValue = b);
|
|
||||||
VolumeDownAction = new Action<bool>((b) => Output.MasterVolumeDown.BoolValue = b);
|
|
||||||
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case eDmpsLevelType.MicsMaster:
|
|
||||||
{
|
|
||||||
Level = output.MicMasterLevel;
|
|
||||||
|
|
||||||
MuteFeedback = new BoolFeedback(new Func<bool>(() => Output.MicMasterMuteOnFeedBack.BoolValue));
|
|
||||||
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => Output.MicMasterLevelFeedBack.UShortValue));
|
|
||||||
MuteOnAction = new Action(Output.MicMasterMuteOn);
|
|
||||||
MuteOffAction = new Action(Output.MicMasterMuteOff);
|
|
||||||
VolumeUpAction = new Action<bool>((b) => Output.MicMasterLevelUp.BoolValue = b);
|
|
||||||
VolumeDownAction = new Action<bool>((b) => Output.MicMasterLevelDown.BoolValue = b);
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case eDmpsLevelType.Source:
|
|
||||||
{
|
|
||||||
Level = output.SourceLevel;
|
|
||||||
|
|
||||||
MuteFeedback = new BoolFeedback(new Func<bool>(() => Output.SourceMuteOnFeedBack.BoolValue));
|
|
||||||
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => Output.SourceLevelFeedBack.UShortValue));
|
|
||||||
MuteOnAction = new Action(Output.SourceMuteOn);
|
|
||||||
MuteOffAction = new Action(Output.SourceMuteOff);
|
|
||||||
VolumeUpAction = new Action<bool>((b) => Output.SourceLevelUp.BoolValue = b);
|
|
||||||
VolumeDownAction = new Action<bool>((b) => Output.SourceLevelDown.BoolValue = b);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case eDmpsLevelType.Codec1:
|
|
||||||
{
|
|
||||||
var programOutput = output as Card.Dmps3ProgramOutput;
|
|
||||||
|
|
||||||
if (programOutput != null)
|
|
||||||
{
|
|
||||||
Level = programOutput.Codec1Level;
|
|
||||||
|
|
||||||
MuteFeedback = new BoolFeedback(new Func<bool>(() => programOutput.CodecMute1OnFeedback.BoolValue));
|
|
||||||
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => programOutput.Codec1LevelFeedback.UShortValue));
|
|
||||||
MuteOnAction = new Action(programOutput.Codec1MuteOn);
|
|
||||||
MuteOffAction = new Action(programOutput.Codec1MuteOff);
|
|
||||||
VolumeUpAction = new Action<bool>((b) => programOutput.Codec1LevelUp.BoolValue = b);
|
|
||||||
VolumeDownAction = new Action<bool>((b) => programOutput.Codec1LevelDown.BoolValue = b);
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var auxOutput = output as Card.Dmps3Aux2Output;
|
|
||||||
|
|
||||||
Level = auxOutput.Codec1Level;
|
|
||||||
|
|
||||||
MuteFeedback = new BoolFeedback(new Func<bool>(() => auxOutput.CodecMute1OnFeedback.BoolValue));
|
|
||||||
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => auxOutput.Codec1LevelFeedback.UShortValue));
|
|
||||||
MuteOnAction = new Action(auxOutput.Codec1MuteOn);
|
|
||||||
MuteOffAction = new Action(auxOutput.Codec1MuteOff);
|
|
||||||
VolumeUpAction = new Action<bool>((b) => auxOutput.Codec1LevelUp.BoolValue = b);
|
|
||||||
VolumeDownAction = new Action<bool>((b) => auxOutput.Codec1LevelDown.BoolValue = b);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case eDmpsLevelType.Codec2:
|
|
||||||
{
|
|
||||||
var programOutput = output as Card.Dmps3ProgramOutput;
|
|
||||||
|
|
||||||
if (programOutput != null)
|
|
||||||
{
|
|
||||||
Level = programOutput.Codec2Level;
|
|
||||||
|
|
||||||
MuteFeedback = new BoolFeedback(new Func<bool>(() => programOutput.CodecMute1OnFeedback.BoolValue));
|
|
||||||
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => programOutput.Codec2LevelFeedback.UShortValue));
|
|
||||||
MuteOnAction = new Action(programOutput.Codec2MuteOn);
|
|
||||||
MuteOffAction = new Action(programOutput.Codec2MuteOff);
|
|
||||||
VolumeUpAction = new Action<bool>((b) => programOutput.Codec2LevelUp.BoolValue = b);
|
|
||||||
VolumeDownAction = new Action<bool>((b) => programOutput.Codec2LevelDown.BoolValue = b);
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var auxOutput = output as Card.Dmps3Aux1Output;
|
|
||||||
|
|
||||||
Level = auxOutput.Codec2Level;
|
|
||||||
|
|
||||||
MuteFeedback = new BoolFeedback(new Func<bool>(() => auxOutput.CodecMute2OnFeedback.BoolValue));
|
|
||||||
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => auxOutput.Codec2LevelFeedback.UShortValue));
|
|
||||||
MuteOnAction = new Action(auxOutput.Codec2MuteOn);
|
|
||||||
MuteOffAction = new Action(auxOutput.Codec2MuteOff);
|
|
||||||
VolumeUpAction = new Action<bool>((b) => auxOutput.Codec2LevelUp.BoolValue = b);
|
|
||||||
VolumeDownAction = new Action<bool>((b) => auxOutput.Codec2LevelDown.BoolValue = b);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#region IBasicVolumeWithFeedback Members
|
|
||||||
|
|
||||||
public void SetVolume(ushort level)
|
|
||||||
{
|
|
||||||
Level.UShortValue = level;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void MuteOn()
|
|
||||||
{
|
|
||||||
MuteOnAction();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void MuteOff()
|
|
||||||
{
|
|
||||||
MuteOffAction();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IBasicVolumeControls Members
|
|
||||||
|
|
||||||
public void VolumeUp(bool pressRelease)
|
|
||||||
{
|
|
||||||
VolumeUpAction(pressRelease);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void VolumeDown(bool pressRelease)
|
|
||||||
{
|
|
||||||
VolumeDownAction(pressRelease);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void MuteToggle()
|
|
||||||
{
|
|
||||||
if (MuteFeedback.BoolValue)
|
|
||||||
MuteOff();
|
|
||||||
else
|
|
||||||
MuteOn();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum eDmpsLevelType
|
|
||||||
{
|
|
||||||
Master,
|
|
||||||
Source,
|
|
||||||
MicsMaster,
|
|
||||||
Codec1,
|
|
||||||
Codec2,
|
|
||||||
Mic
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,435 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
|
||||||
using Crestron.SimplSharpPro.DM;
|
|
||||||
|
|
||||||
using PepperDash.Core;
|
|
||||||
using PepperDash.Essentials.Core;
|
|
||||||
using PepperDash.Essentials.DM.Config;
|
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
|
||||||
using PepperDash.Essentials.Core.Config;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.DM.Chassis
|
|
||||||
{
|
|
||||||
[Description("Wrapper class for all HdMdNxM4E switchers")]
|
|
||||||
public class HdMdNxM4kEBridgeableController : CrestronGenericBridgeableBaseDevice, IRoutingNumericWithFeedback, IHasFeedback
|
|
||||||
{
|
|
||||||
private HdMdNxM _Chassis;
|
|
||||||
private HdMd4x14kE _Chassis4x1;
|
|
||||||
|
|
||||||
//IroutingNumericEvent
|
|
||||||
public event EventHandler<RoutingNumericEventArgs> NumericSwitchChange;
|
|
||||||
|
|
||||||
public Dictionary<uint, string> InputNames { get; set; }
|
|
||||||
public Dictionary<uint, string> OutputNames { get; set; }
|
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
|
||||||
|
|
||||||
public FeedbackCollection<BoolFeedback> VideoInputSyncFeedbacks { get; private set; }
|
|
||||||
public FeedbackCollection<IntFeedback> VideoOutputRouteFeedbacks { get; private set; }
|
|
||||||
public FeedbackCollection<StringFeedback> InputNameFeedbacks { get; private set; }
|
|
||||||
public FeedbackCollection<StringFeedback> OutputNameFeedbacks { get; private set; }
|
|
||||||
public FeedbackCollection<StringFeedback> OutputRouteNameFeedbacks { get; private set; }
|
|
||||||
public FeedbackCollection<BoolFeedback> InputHdcpEnableFeedback { get; private set; }
|
|
||||||
public FeedbackCollection<StringFeedback> DeviceNameFeedback { get; private set; }
|
|
||||||
public FeedbackCollection<BoolFeedback> AutoRouteFeedback { get; private set; }
|
|
||||||
|
|
||||||
#region Constructor
|
|
||||||
|
|
||||||
public HdMdNxM4kEBridgeableController(string key, string name, HdMdNxM chassis,
|
|
||||||
HdMdNxM4kEBridgeablePropertiesConfig props)
|
|
||||||
: base(key, name, chassis)
|
|
||||||
{
|
|
||||||
_Chassis = chassis;
|
|
||||||
var _props = props;
|
|
||||||
|
|
||||||
InputNames = props.Inputs;
|
|
||||||
OutputNames = props.Outputs;
|
|
||||||
|
|
||||||
VideoInputSyncFeedbacks = new FeedbackCollection<BoolFeedback>();
|
|
||||||
VideoOutputRouteFeedbacks = new FeedbackCollection<IntFeedback>();
|
|
||||||
InputNameFeedbacks = new FeedbackCollection<StringFeedback>();
|
|
||||||
OutputNameFeedbacks = new FeedbackCollection<StringFeedback>();
|
|
||||||
OutputRouteNameFeedbacks = new FeedbackCollection<StringFeedback>();
|
|
||||||
InputHdcpEnableFeedback = new FeedbackCollection<BoolFeedback>();
|
|
||||||
DeviceNameFeedback = new FeedbackCollection<StringFeedback>();
|
|
||||||
AutoRouteFeedback = new FeedbackCollection<BoolFeedback>();
|
|
||||||
|
|
||||||
InputPorts = new RoutingPortCollection<RoutingInputPort>();
|
|
||||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
|
|
||||||
|
|
||||||
DeviceNameFeedback.Add(new StringFeedback(this.Name, () => this.Name));
|
|
||||||
|
|
||||||
if (_Chassis.NumberOfInputs == 1)
|
|
||||||
{
|
|
||||||
_Chassis4x1 = _Chassis as HdMd4x14kE;
|
|
||||||
AutoRouteFeedback.Add(new BoolFeedback(this.Name + "-" + InputNames[1], () => _Chassis4x1.AutoModeOnFeedback.BoolValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
for (uint i = 1; i <= _Chassis.NumberOfInputs; i++)
|
|
||||||
{
|
|
||||||
var index = i;
|
|
||||||
var inputName = InputNames[index];
|
|
||||||
_Chassis.Inputs[index].Name.StringValue = inputName;
|
|
||||||
|
|
||||||
InputPorts.Add(new RoutingInputPort(inputName, eRoutingSignalType.AudioVideo,
|
|
||||||
eRoutingPortConnectionType.Hdmi, index, this)
|
|
||||||
{
|
|
||||||
FeedbackMatchObject = _Chassis.HdmiInputs[index]
|
|
||||||
});
|
|
||||||
VideoInputSyncFeedbacks.Add(new BoolFeedback(inputName, () => _Chassis.Inputs[index].VideoDetectedFeedback.BoolValue));
|
|
||||||
InputNameFeedbacks.Add(new StringFeedback(inputName, () => _Chassis.Inputs[index].Name.StringValue));
|
|
||||||
InputHdcpEnableFeedback.Add(new BoolFeedback(inputName, () => _Chassis.HdmiInputs[index].HdmiInputPort.HdcpSupportOnFeedback.BoolValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
for (uint i = 1; i <= _Chassis.NumberOfOutputs; i++)
|
|
||||||
{
|
|
||||||
var index = i;
|
|
||||||
var outputName = OutputNames[index];
|
|
||||||
_Chassis.Outputs[i].Name.StringValue = outputName;
|
|
||||||
|
|
||||||
OutputPorts.Add(new RoutingOutputPort(outputName, eRoutingSignalType.AudioVideo,
|
|
||||||
eRoutingPortConnectionType.Hdmi, index, this)
|
|
||||||
{
|
|
||||||
FeedbackMatchObject = _Chassis.HdmiOutputs[index]
|
|
||||||
});
|
|
||||||
VideoOutputRouteFeedbacks.Add(new IntFeedback(outputName, () => (int)_Chassis.Outputs[index].VideoOutFeedback.Number));
|
|
||||||
OutputNameFeedbacks.Add(new StringFeedback(outputName, () => _Chassis.Outputs[index].Name.StringValue));
|
|
||||||
OutputRouteNameFeedbacks.Add(new StringFeedback(outputName, () => _Chassis.Outputs[index].VideoOutFeedback.NameFeedback.StringValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
_Chassis.DMInputChange += new DMInputEventHandler(Chassis_DMInputChange);
|
|
||||||
_Chassis.DMOutputChange += new DMOutputEventHandler(Chassis_DMOutputChange);
|
|
||||||
|
|
||||||
AddPostActivationAction(AddFeedbackCollections);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Methods
|
|
||||||
|
|
||||||
/// <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>
|
|
||||||
private void OnSwitchChange(RoutingNumericEventArgs e)
|
|
||||||
{
|
|
||||||
var newEvent = NumericSwitchChange;
|
|
||||||
if (newEvent != null) newEvent(this, e);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void EnableHdcp(uint port)
|
|
||||||
{
|
|
||||||
if (port > _Chassis.NumberOfInputs) return;
|
|
||||||
if (port <= 0) return;
|
|
||||||
|
|
||||||
_Chassis.HdmiInputs[port].HdmiInputPort.HdcpSupportOn();
|
|
||||||
InputHdcpEnableFeedback[InputNames[port]].FireUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void DisableHdcp(uint port)
|
|
||||||
{
|
|
||||||
if (port > _Chassis.NumberOfInputs) return;
|
|
||||||
if (port <= 0) return;
|
|
||||||
|
|
||||||
_Chassis.HdmiInputs[port].HdmiInputPort.HdcpSupportOff();
|
|
||||||
InputHdcpEnableFeedback[InputNames[port]].FireUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void EnableAutoRoute()
|
|
||||||
{
|
|
||||||
if (_Chassis.NumberOfInputs != 1) return;
|
|
||||||
|
|
||||||
if (_Chassis4x1 == null) return;
|
|
||||||
|
|
||||||
_Chassis4x1.AutoModeOn();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void DisableAutoRoute()
|
|
||||||
{
|
|
||||||
if (_Chassis.NumberOfInputs != 1) return;
|
|
||||||
|
|
||||||
if (_Chassis4x1 == null) return;
|
|
||||||
|
|
||||||
_Chassis4x1.AutoModeOff();
|
|
||||||
}
|
|
||||||
|
|
||||||
#region PostActivate
|
|
||||||
|
|
||||||
public void AddFeedbackCollections()
|
|
||||||
{
|
|
||||||
AddCollectionsToList(VideoInputSyncFeedbacks, InputHdcpEnableFeedback);
|
|
||||||
AddCollectionsToList(VideoOutputRouteFeedbacks);
|
|
||||||
AddCollectionsToList(InputNameFeedbacks, OutputNameFeedbacks, OutputRouteNameFeedbacks, DeviceNameFeedback);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region FeedbackCollection Methods
|
|
||||||
|
|
||||||
//Add arrays of collections
|
|
||||||
public void AddCollectionsToList(params FeedbackCollection<BoolFeedback>[] newFbs)
|
|
||||||
{
|
|
||||||
foreach (FeedbackCollection<BoolFeedback> fbCollection in newFbs)
|
|
||||||
{
|
|
||||||
foreach (var item in newFbs)
|
|
||||||
{
|
|
||||||
AddCollectionToList(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public void AddCollectionsToList(params FeedbackCollection<IntFeedback>[] newFbs)
|
|
||||||
{
|
|
||||||
foreach (FeedbackCollection<IntFeedback> fbCollection in newFbs)
|
|
||||||
{
|
|
||||||
foreach (var item in newFbs)
|
|
||||||
{
|
|
||||||
AddCollectionToList(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddCollectionsToList(params FeedbackCollection<StringFeedback>[] newFbs)
|
|
||||||
{
|
|
||||||
foreach (FeedbackCollection<StringFeedback> fbCollection in newFbs)
|
|
||||||
{
|
|
||||||
foreach (var item in newFbs)
|
|
||||||
{
|
|
||||||
AddCollectionToList(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Add Collections
|
|
||||||
public void AddCollectionToList(FeedbackCollection<BoolFeedback> newFbs)
|
|
||||||
{
|
|
||||||
foreach (var f in newFbs)
|
|
||||||
{
|
|
||||||
if (f == null) continue;
|
|
||||||
|
|
||||||
AddFeedbackToList(f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddCollectionToList(FeedbackCollection<IntFeedback> newFbs)
|
|
||||||
{
|
|
||||||
foreach (var f in newFbs)
|
|
||||||
{
|
|
||||||
if (f == null) continue;
|
|
||||||
|
|
||||||
AddFeedbackToList(f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddCollectionToList(FeedbackCollection<StringFeedback> newFbs)
|
|
||||||
{
|
|
||||||
foreach (var f in newFbs)
|
|
||||||
{
|
|
||||||
if (f == null) continue;
|
|
||||||
|
|
||||||
AddFeedbackToList(f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Add Individual Feedbacks
|
|
||||||
public void AddFeedbackToList(PepperDash.Essentials.Core.Feedback newFb)
|
|
||||||
{
|
|
||||||
if (newFb == null) return;
|
|
||||||
|
|
||||||
if (!Feedbacks.Contains(newFb))
|
|
||||||
{
|
|
||||||
Feedbacks.Add(newFb);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IRouting Members
|
|
||||||
|
|
||||||
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
|
||||||
{
|
|
||||||
// Try to make switch only when necessary. The unit appears to toggle when already selected.
|
|
||||||
var current = _Chassis.HdmiOutputs[(uint)outputSelector].VideoOut;
|
|
||||||
if (current != _Chassis.HdmiInputs[(uint)inputSelector])
|
|
||||||
_Chassis.HdmiOutputs[(uint)outputSelector].VideoOut = _Chassis.HdmiInputs[(uint)inputSelector];
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IRoutingNumeric Members
|
|
||||||
|
|
||||||
public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType signalType)
|
|
||||||
{
|
|
||||||
ExecuteSwitch(inputSelector, outputSelector, signalType);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Bridge Linking
|
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
|
||||||
{
|
|
||||||
var joinMap = new HdMdNxM4kEControllerJoinMap(joinStart);
|
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
|
||||||
joinMap = JsonConvert.DeserializeObject<HdMdNxM4kEControllerJoinMap>(joinMapSerialized);
|
|
||||||
|
|
||||||
if (bridge != null)
|
|
||||||
{
|
|
||||||
bridge.AddJoinMap(Key, joinMap);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
|
||||||
}
|
|
||||||
|
|
||||||
IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
|
||||||
DeviceNameFeedback[this.Name].LinkInputSig(trilist.StringInput[joinMap.Name.JoinNumber]);
|
|
||||||
|
|
||||||
if (_Chassis4x1 != null)
|
|
||||||
{
|
|
||||||
trilist.SetSigTrueAction(joinMap.EnableAutoRoute.JoinNumber, () => _Chassis4x1.AutoModeOn());
|
|
||||||
trilist.SetSigFalseAction(joinMap.EnableAutoRoute.JoinNumber, () => _Chassis4x1.AutoModeOff());
|
|
||||||
AutoRouteFeedback[this.Name + "-" + InputNames[1]].LinkInputSig(trilist.BooleanInput[joinMap.EnableAutoRoute.JoinNumber]);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (uint i = 1; i <= _Chassis.NumberOfInputs; i++)
|
|
||||||
{
|
|
||||||
var joinIndex = i - 1;
|
|
||||||
//Digital
|
|
||||||
VideoInputSyncFeedbacks[InputNames[i]].LinkInputSig(trilist.BooleanInput[joinMap.InputSync.JoinNumber + joinIndex]);
|
|
||||||
InputHdcpEnableFeedback[InputNames[i]].LinkInputSig(trilist.BooleanInput[joinMap.EnableInputHdcp.JoinNumber + joinIndex]);
|
|
||||||
InputHdcpEnableFeedback[InputNames[i]].LinkComplementInputSig(trilist.BooleanInput[joinMap.DisableInputHdcp.JoinNumber + joinIndex]);
|
|
||||||
trilist.SetSigTrueAction(joinMap.EnableInputHdcp.JoinNumber + joinIndex, () => EnableHdcp(i));
|
|
||||||
trilist.SetSigTrueAction(joinMap.DisableInputHdcp.JoinNumber + joinIndex, () => DisableHdcp(i));
|
|
||||||
|
|
||||||
//Serial
|
|
||||||
InputNameFeedbacks[InputNames[i]].LinkInputSig(trilist.StringInput[joinMap.InputName.JoinNumber + joinIndex]);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (uint i = 1; i <= _Chassis.NumberOfOutputs; i++)
|
|
||||||
{
|
|
||||||
var joinIndex = i - 1;
|
|
||||||
//Analog
|
|
||||||
VideoOutputRouteFeedbacks[OutputNames[i]].LinkInputSig(trilist.UShortInput[joinMap.OutputRoute.JoinNumber + joinIndex]);
|
|
||||||
trilist.SetUShortSigAction(joinMap.OutputRoute.JoinNumber + joinIndex, (a) => ExecuteSwitch(a, i, eRoutingSignalType.AudioVideo));
|
|
||||||
|
|
||||||
//Serial
|
|
||||||
OutputNameFeedbacks[OutputNames[i]].LinkInputSig(trilist.StringInput[joinMap.OutputName.JoinNumber + joinIndex]);
|
|
||||||
OutputRouteNameFeedbacks[OutputNames[i]].LinkInputSig(trilist.StringInput[joinMap.OutputRoutedName.JoinNumber + joinIndex]);
|
|
||||||
}
|
|
||||||
|
|
||||||
_Chassis.OnlineStatusChange += new Crestron.SimplSharpPro.OnlineStatusChangeEventHandler(Chassis_OnlineStatusChange);
|
|
||||||
|
|
||||||
trilist.OnlineStatusChange += new Crestron.SimplSharpPro.OnlineStatusChangeEventHandler((d, args) =>
|
|
||||||
{
|
|
||||||
if (args.DeviceOnLine)
|
|
||||||
{
|
|
||||||
foreach (var feedback in Feedbacks)
|
|
||||||
{
|
|
||||||
feedback.FireUpdate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Events
|
|
||||||
|
|
||||||
void Chassis_OnlineStatusChange(Crestron.SimplSharpPro.GenericBase currentDevice, Crestron.SimplSharpPro.OnlineOfflineEventArgs args)
|
|
||||||
{
|
|
||||||
if (!args.DeviceOnLine) return;
|
|
||||||
for (uint i = 1; i <= _Chassis.NumberOfInputs; i++)
|
|
||||||
{
|
|
||||||
_Chassis.Inputs[i].Name.StringValue = InputNames[i];
|
|
||||||
}
|
|
||||||
for (uint i = 1; i <= _Chassis.NumberOfOutputs; i++)
|
|
||||||
{
|
|
||||||
_Chassis.Outputs[i].Name.StringValue = OutputNames[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var feedback in Feedbacks)
|
|
||||||
{
|
|
||||||
feedback.FireUpdate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Chassis_DMOutputChange(Switch device, DMOutputEventArgs args)
|
|
||||||
{
|
|
||||||
if (args.EventId != DMOutputEventIds.VideoOutEventId) return;
|
|
||||||
|
|
||||||
for (var i = 0; i < VideoOutputRouteFeedbacks.Count; i++)
|
|
||||||
{
|
|
||||||
var index = i;
|
|
||||||
var localInputPort = InputPorts.FirstOrDefault(p => (DMInput)p.FeedbackMatchObject == _Chassis.HdmiOutputs[(uint)index + 1].VideoOutFeedback);
|
|
||||||
var localOutputPort =
|
|
||||||
OutputPorts.FirstOrDefault(p => (DMOutput)p.FeedbackMatchObject == _Chassis.HdmiOutputs[(uint)index + 1]);
|
|
||||||
|
|
||||||
|
|
||||||
VideoOutputRouteFeedbacks[i].FireUpdate();
|
|
||||||
OnSwitchChange(new RoutingNumericEventArgs((ushort)i, VideoOutputRouteFeedbacks[i].UShortValue, localOutputPort, localInputPort, eRoutingSignalType.AudioVideo));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Chassis_DMInputChange(Switch device, DMInputEventArgs args)
|
|
||||||
{
|
|
||||||
if (args.EventId != DMInputEventIds.VideoDetectedEventId) return;
|
|
||||||
foreach (var item in VideoInputSyncFeedbacks)
|
|
||||||
{
|
|
||||||
item.FireUpdate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Factory
|
|
||||||
|
|
||||||
public class HdMdNxM4kEControllerFactory : EssentialsDeviceFactory<HdMdNxM4kEBridgeableController>
|
|
||||||
{
|
|
||||||
public HdMdNxM4kEControllerFactory()
|
|
||||||
{
|
|
||||||
TypeNames = new List<string>() { "hdmd4x14ke-bridgeable", "hdmd4x24ke", "hdmd6x24ke" };
|
|
||||||
}
|
|
||||||
|
|
||||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
|
||||||
{
|
|
||||||
Debug.Console(1, "Factory Attempting to create new HD-MD-NxM-4K-E Device");
|
|
||||||
|
|
||||||
var props = JsonConvert.DeserializeObject<HdMdNxM4kEBridgeablePropertiesConfig>(dc.Properties.ToString());
|
|
||||||
|
|
||||||
var type = dc.Type.ToLower();
|
|
||||||
var control = props.Control;
|
|
||||||
var ipid = control.IpIdInt;
|
|
||||||
var address = control.TcpSshProperties.Address;
|
|
||||||
|
|
||||||
switch (type)
|
|
||||||
{
|
|
||||||
case ("hdmd4x14ke-bridgeable"):
|
|
||||||
return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd4x14kE(ipid, address, Global.ControlSystem), props);
|
|
||||||
case ("hdmd4x24ke"):
|
|
||||||
return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd4x24kE(ipid, address, Global.ControlSystem), props);
|
|
||||||
case ("hdmd6x24ke"):
|
|
||||||
return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd6x24kE(ipid, address, Global.ControlSystem), props);
|
|
||||||
default:
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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,467 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
|
||||||
using Crestron.SimplSharpPro.DM;
|
|
||||||
using Crestron.SimplSharpPro.DM.Cards;
|
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using PepperDash.Core;
|
|
||||||
using PepperDash.Essentials.Core;
|
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
|
||||||
using PepperDash.Essentials.Core.DeviceInfo;
|
|
||||||
using PepperDash.Essentials.DM.Config;
|
|
||||||
using PepperDash.Essentials.Core.Config;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.DM
|
|
||||||
{
|
|
||||||
[Description("Wrapper class for all DM-RMC variants")]
|
|
||||||
public abstract class DmRmcControllerBase : CrestronGenericBridgeableBaseDevice, IDeviceInfoProvider
|
|
||||||
{
|
|
||||||
private const int CtpPort = 41795;
|
|
||||||
private readonly EndpointReceiverBase _rmc; //kept here just in case. Only property or method on this class that's not device-specific is the DMOutput that it's attached to.
|
|
||||||
|
|
||||||
public StringFeedback VideoOutputResolutionFeedback { get; protected set; }
|
|
||||||
public StringFeedback EdidManufacturerFeedback { get; protected set; }
|
|
||||||
public StringFeedback EdidNameFeedback { get; protected set; }
|
|
||||||
public StringFeedback EdidPreferredTimingFeedback { get; protected set; }
|
|
||||||
public StringFeedback EdidSerialNumberFeedback { get; protected set; }
|
|
||||||
|
|
||||||
protected DmRmcControllerBase(string key, string name, EndpointReceiverBase device)
|
|
||||||
: base(key, name, device)
|
|
||||||
{
|
|
||||||
_rmc = device;
|
|
||||||
// if wired to a chassis, skip registration step in base class
|
|
||||||
PreventRegistration = _rmc.DMOutput != null;
|
|
||||||
|
|
||||||
AddToFeedbackList(VideoOutputResolutionFeedback, EdidManufacturerFeedback, EdidSerialNumberFeedback, EdidNameFeedback, EdidPreferredTimingFeedback);
|
|
||||||
|
|
||||||
DeviceInfo = new DeviceInfo();
|
|
||||||
|
|
||||||
_rmc.OnlineStatusChange += (currentDevice, args) => { if (args.DeviceOnLine) UpdateDeviceInfo(); };
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void LinkDmRmcToApi(DmRmcControllerBase rmc, BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
|
||||||
{
|
|
||||||
var joinMap = new DmRmcControllerJoinMap(joinStart);
|
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
|
||||||
joinMap = JsonConvert.DeserializeObject<DmRmcControllerJoinMap>(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, rmc, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
|
||||||
|
|
||||||
rmc.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
|
||||||
if (rmc.VideoOutputResolutionFeedback != null)
|
|
||||||
rmc.VideoOutputResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentOutputResolution.JoinNumber]);
|
|
||||||
if (rmc.EdidManufacturerFeedback != null)
|
|
||||||
rmc.EdidManufacturerFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidManufacturer.JoinNumber]);
|
|
||||||
if (rmc.EdidNameFeedback != null)
|
|
||||||
rmc.EdidNameFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidName.JoinNumber]);
|
|
||||||
if (rmc.EdidPreferredTimingFeedback != null)
|
|
||||||
rmc.EdidPreferredTimingFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidPrefferedTiming.JoinNumber]);
|
|
||||||
if (rmc.EdidSerialNumberFeedback != null)
|
|
||||||
rmc.EdidSerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidSerialNumber.JoinNumber]);
|
|
||||||
|
|
||||||
//If the device is an DM-RMC-4K-Z-SCALER-C
|
|
||||||
var routing = rmc as IRmcRouting;
|
|
||||||
|
|
||||||
if (routing == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (routing.AudioVideoSourceNumericFeedback != null)
|
|
||||||
routing.AudioVideoSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.AudioVideoSource.JoinNumber]);
|
|
||||||
|
|
||||||
trilist.SetUShortSigAction(joinMap.AudioVideoSource.JoinNumber, a => routing.ExecuteNumericSwitch(a, 1, eRoutingSignalType.AudioVideo));
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Implementation of IDeviceInfoProvider
|
|
||||||
|
|
||||||
public DeviceInfo DeviceInfo { get; private set; }
|
|
||||||
public event DeviceInfoChangeHandler DeviceInfoChanged;
|
|
||||||
|
|
||||||
public void UpdateDeviceInfo()
|
|
||||||
{
|
|
||||||
Debug.Console(1, this, "Updating Device Info");
|
|
||||||
|
|
||||||
if (_rmc.ConnectedIpList.Count == 0)
|
|
||||||
{
|
|
||||||
Debug.Console(1, this, "IP Address information not yet received. No device is online");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
DeviceInfo.IpAddress = _rmc.ConnectedIpList[0].DeviceIpAddress;
|
|
||||||
|
|
||||||
foreach (var ip in _rmc.ConnectedIpList)
|
|
||||||
{
|
|
||||||
Debug.Console(0, this, "Connected IP Address: {0}", ip.DeviceIpAddress);
|
|
||||||
}
|
|
||||||
|
|
||||||
GetFirmwareAndSerialInfo();
|
|
||||||
|
|
||||||
OnDeviceInfoChange();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void GetFirmwareAndSerialInfo()
|
|
||||||
{
|
|
||||||
var tcpClient = new GenericTcpIpClient(String.Format("{0}-devInfoSocket", Key), _rmc.ConnectedIpList[0].DeviceIpAddress, CtpPort, 1024)
|
|
||||||
{
|
|
||||||
AutoReconnect = false,
|
|
||||||
};
|
|
||||||
|
|
||||||
var gather = new CommunicationGather(tcpClient, "\r\n\r\n");
|
|
||||||
|
|
||||||
tcpClient.ConnectionChange += (sender, args) =>
|
|
||||||
{
|
|
||||||
if (!args.Client.IsConnected)
|
|
||||||
{
|
|
||||||
OnDeviceInfoChange();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
args.Client.SendText("ver\r\n");
|
|
||||||
};
|
|
||||||
|
|
||||||
gather.LineReceived += (sender, args) =>
|
|
||||||
{
|
|
||||||
//ignore console prompt
|
|
||||||
if (args.Text.ToLower().Contains(">"))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (args.Text.ToLower().Contains("host"))
|
|
||||||
{
|
|
||||||
DeviceInfo.HostName = args.Text.Split(':')[1].Trim();
|
|
||||||
|
|
||||||
tcpClient.SendText("maca\r\n");
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.Text.ToLower().Contains("mac"))
|
|
||||||
{
|
|
||||||
DeviceInfo.MacAddress = args.Text.Split(':')[1].Trim().Replace(" ", ":");
|
|
||||||
|
|
||||||
tcpClient.Disconnect();
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!args.Text.ToLower().Contains("rmc"))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
DeviceInfo.SerialNumber = args.Text.Split('[')[1].Split(' ')[4].Replace("#", "");
|
|
||||||
DeviceInfo.FirmwareVersion = args.Text.Split('[')[1].Split(' ')[1];
|
|
||||||
|
|
||||||
tcpClient.SendText("host\r\n");
|
|
||||||
};
|
|
||||||
|
|
||||||
tcpClient.Connect();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnDeviceInfoChange()
|
|
||||||
{
|
|
||||||
var handler = DeviceInfoChanged;
|
|
||||||
|
|
||||||
if (handler == null) return;
|
|
||||||
|
|
||||||
handler(this, new DeviceInfoEventArgs(DeviceInfo));
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract class DmHdBaseTControllerBase : CrestronGenericBaseDevice
|
|
||||||
{
|
|
||||||
protected HDBaseTBase Rmc;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Make a Crestron RMC and put it in here
|
|
||||||
/// </summary>
|
|
||||||
protected DmHdBaseTControllerBase(string key, string name, HDBaseTBase rmc)
|
|
||||||
: base(key, name, rmc)
|
|
||||||
{
|
|
||||||
Rmc = rmc;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class DmRmcHelper
|
|
||||||
{
|
|
||||||
private static readonly Dictionary<string, Func<string, string, uint, CrestronGenericBaseDevice>> ProcessorFactoryDict;
|
|
||||||
private static readonly Dictionary<string, Func<string, string, DMOutput, CrestronGenericBaseDevice>> ChassisCpu3Dict;
|
|
||||||
|
|
||||||
private static readonly Dictionary<string, Func<string, string, uint, DMOutput, CrestronGenericBaseDevice>>
|
|
||||||
ChassisDict;
|
|
||||||
|
|
||||||
static DmRmcHelper()
|
|
||||||
{
|
|
||||||
ProcessorFactoryDict = new Dictionary<string, Func<string, string, uint, CrestronGenericBaseDevice>>
|
|
||||||
{
|
|
||||||
{"dmrmc100c", (k, n, i) => new DmRmcX100CController(k, n, new DmRmc100C(i, Global.ControlSystem))},
|
|
||||||
{"dmrmc100s", (k, n, i) => new DmRmc100SController(k, n, new DmRmc100S(i, Global.ControlSystem))},
|
|
||||||
{"dmrmc4k100c", (k, n, i) => new DmRmcX100CController(k, n, new DmRmc4k100C(i, Global.ControlSystem))},
|
|
||||||
{"dmrmc4kz100c", (k, n, i) => new DmRmc4kZ100CController(k, n, new DmRmc4kz100C(i, Global.ControlSystem))},
|
|
||||||
{"dmrmc150s", (k, n, i) => new DmRmc150SController(k, n, new DmRmc150S(i, Global.ControlSystem))},
|
|
||||||
{"dmrmc200c", (k, n, i) => new DmRmc200CController(k, n, new DmRmc200C(i, Global.ControlSystem))},
|
|
||||||
{"dmrmc200s", (k, n, i) => new DmRmc200SController(k, n, new DmRmc200S(i, Global.ControlSystem))},
|
|
||||||
{"dmrmc200s2", (k, n, i) => new DmRmc200S2Controller(k, n, new DmRmc200S2(i, Global.ControlSystem))},
|
|
||||||
{"dmrmcscalerc", (k, n, i) => new DmRmcScalerCController(k, n, new DmRmcScalerC(i, Global.ControlSystem))},
|
|
||||||
{"dmrmcscalers", (k, n, i) => new DmRmcScalerSController(k, n, new DmRmcScalerS(i, Global.ControlSystem))},
|
|
||||||
{
|
|
||||||
"dmrmcscalers2",
|
|
||||||
(k, n, i) => new DmRmcScalerS2Controller(k, n, new DmRmcScalerS2(i, Global.ControlSystem))
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"dmrmc4kscalerc",
|
|
||||||
(k, n, i) => new DmRmc4kScalerCController(k, n, new DmRmc4kScalerC(i, Global.ControlSystem))
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"dmrmc4kscalercdsp",
|
|
||||||
(k, n, i) => new DmRmc4kScalerCDspController(k, n, new DmRmc4kScalerCDsp(i, Global.ControlSystem))
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"dmrmc4kzscalerc",
|
|
||||||
(k, n, i) => new DmRmc4kZScalerCController(k, n, new DmRmc4kzScalerC(i, Global.ControlSystem))
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
ChassisCpu3Dict = new Dictionary<string, Func<string, string, DMOutput, CrestronGenericBaseDevice>>
|
|
||||||
{
|
|
||||||
{"dmrmc100c", (k, n, d) => new DmRmcX100CController(k, n, new DmRmc100C(d))},
|
|
||||||
{"dmrmc100s", (k, n, d) => new DmRmc100SController(k, n, new DmRmc100S(d))},
|
|
||||||
{"dmrmc4k100c", (k, n, d) => new DmRmcX100CController(k, n, new DmRmc4k100C(d))},
|
|
||||||
{"dmrmc4kz100c", (k, n, d) => new DmRmc4kZ100CController(k, n, new DmRmc4kz100C(d))},
|
|
||||||
{"dmrmc150s", (k, n, d) => new DmRmc150SController(k, n, new DmRmc150S(d))},
|
|
||||||
{"dmrmc200c", (k, n, d) => new DmRmc200CController(k, n, new DmRmc200C(d))},
|
|
||||||
{"dmrmc200s", (k, n, d) => new DmRmc200SController(k, n, new DmRmc200S(d))},
|
|
||||||
{"dmrmc200s2", (k, n, d) => new DmRmc200S2Controller(k, n, new DmRmc200S2(d))},
|
|
||||||
{"dmrmcscalerc", (k, n, d) => new DmRmcScalerCController(k, n, new DmRmcScalerC(d))},
|
|
||||||
{"dmrmcscalers", (k, n, d) => new DmRmcScalerSController(k, n, new DmRmcScalerS(d))},
|
|
||||||
{
|
|
||||||
"dmrmcscalers2",
|
|
||||||
(k, n, d) => new DmRmcScalerS2Controller(k, n, new DmRmcScalerS2(d))
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"dmrmc4kscalerc",
|
|
||||||
(k, n, d) => new DmRmc4kScalerCController(k, n, new DmRmc4kScalerC(d))
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"dmrmc4kscalercdsp",
|
|
||||||
(k, n, d) => new DmRmc4kScalerCDspController(k, n, new DmRmc4kScalerCDsp(d))
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"dmrmc4kzscalerc",
|
|
||||||
(k, n, d) => new DmRmc4kZScalerCController(k, n, new DmRmc4kzScalerC(d))
|
|
||||||
},
|
|
||||||
{"hdbasetrx", (k,n,d) => new HDBaseTRxController(k,n, new HDRx3CB(d))},
|
|
||||||
{"dmrmc4k100c1g", (k,n,d) => new DmRmc4k100C1GController(k,n, new DmRmc4K100C1G(d))}
|
|
||||||
};
|
|
||||||
|
|
||||||
ChassisDict = new Dictionary<string, Func<string, string, uint, DMOutput, CrestronGenericBaseDevice>>
|
|
||||||
{
|
|
||||||
{"dmrmc100c", (k, n, i, d) => new DmRmcX100CController(k, n, new DmRmc100C(i,d))},
|
|
||||||
{"dmrmc100s", (k, n,i, d) => new DmRmc100SController(k, n, new DmRmc100S(i,d))},
|
|
||||||
{"dmrmc4k100c", (k, n,i, d) => new DmRmcX100CController(k, n, new DmRmc4k100C(i,d))},
|
|
||||||
{"dmrmc4kz100c", (k, n,i, d) => new DmRmc4kZ100CController(k, n, new DmRmc4kz100C(i,d))},
|
|
||||||
{"dmrmc150s", (k, n,i, d) => new DmRmc150SController(k, n, new DmRmc150S(i,d))},
|
|
||||||
{"dmrmc200c", (k, n,i, d) => new DmRmc200CController(k, n, new DmRmc200C(i,d))},
|
|
||||||
{"dmrmc200s", (k, n,i, d) => new DmRmc200SController(k, n, new DmRmc200S(i,d))},
|
|
||||||
{"dmrmc200s2", (k, n,i, d) => new DmRmc200S2Controller(k, n, new DmRmc200S2(i,d))},
|
|
||||||
{"dmrmcscalerc", (k, n,i, d) => new DmRmcScalerCController(k, n, new DmRmcScalerC(i,d))},
|
|
||||||
{"dmrmcscalers", (k, n,i, d) => new DmRmcScalerSController(k, n, new DmRmcScalerS(i,d))},
|
|
||||||
{
|
|
||||||
"dmrmcscalers2",
|
|
||||||
(k, n,i, d) => new DmRmcScalerS2Controller(k, n, new DmRmcScalerS2(i, d))
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"dmrmc4kscalerc",
|
|
||||||
(k, n,i, d) => new DmRmc4kScalerCController(k, n, new DmRmc4kScalerC(i, d))
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"dmrmc4kscalercdsp",
|
|
||||||
(k, n,i, d) => new DmRmc4kScalerCDspController(k, n, new DmRmc4kScalerCDsp(i, d))
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"dmrmc4kzscalerc",
|
|
||||||
(k, n,i, d) => new DmRmc4kZScalerCController(k, n, new DmRmc4kzScalerC(i, d))
|
|
||||||
},
|
|
||||||
{"hdbasetrx", (k,n,i,d) => new HDBaseTRxController(k,n, new HDRx3CB(i, d))},
|
|
||||||
{"dmrmc4k100c1g", (k,n,i,d) => new DmRmc4k100C1GController(k,n, new DmRmc4K100C1G(i, d))}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
/// A factory method for various DmRmcControllers
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="key">device key. Used to uniquely identify device</param>
|
|
||||||
/// <param name="name">device name</param>
|
|
||||||
/// <param name="typeName">device type name. Used to retrived the correct device</param>
|
|
||||||
/// <param name="props">Config from config file</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static CrestronGenericBaseDevice GetDmRmcController(string key, string name, string typeName, DmRmcPropertiesConfig props)
|
|
||||||
{
|
|
||||||
typeName = typeName.ToLower();
|
|
||||||
var ipid = props.Control.IpIdInt;
|
|
||||||
|
|
||||||
var pKey = props.ParentDeviceKey.ToLower();
|
|
||||||
|
|
||||||
// Non-DM-chassis endpoints
|
|
||||||
return pKey == "processor" ? GetDmRmcControllerForProcessor(key, name, typeName, ipid) : GetDmRmcControllerForChassis(key, name, typeName, props, pKey, ipid);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static CrestronGenericBaseDevice GetDmRmcControllerForChassis(string key, string name, string typeName,
|
|
||||||
DmRmcPropertiesConfig props, string pKey, uint ipid)
|
|
||||||
{
|
|
||||||
var parentDev = DeviceManager.GetDeviceForKey(pKey);
|
|
||||||
if (parentDev is DmpsRoutingController)
|
|
||||||
{
|
|
||||||
return GetDmRmcControllerForDmps(key, name, typeName, parentDev as DmpsRoutingController, props.ParentOutputNumber);
|
|
||||||
}
|
|
||||||
if (!(parentDev is IDmSwitch))
|
|
||||||
{
|
|
||||||
Debug.Console(0, "Cannot create DM device '{0}'. '{1}' is not a DM Chassis.",
|
|
||||||
key, pKey);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
var chassis = (parentDev as IDmSwitch).Chassis;
|
|
||||||
var num = props.ParentOutputNumber;
|
|
||||||
|
|
||||||
if (num <= 0 || num > chassis.NumberOfOutputs)
|
|
||||||
{
|
|
||||||
Debug.Console(0, "Cannot create DM device '{0}'. Output number '{1}' is out of range",
|
|
||||||
key, num);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
var controller = parentDev as IDmSwitch;
|
|
||||||
controller.RxDictionary.Add(num, key);
|
|
||||||
// Catch constructor failures, mainly dues to IPID
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// Must use different constructor for CPU3 chassis types. No IPID
|
|
||||||
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)
|
|
||||||
{
|
|
||||||
return GetDmRmcControllerForCpu3Chassis(key, name, typeName, chassis, num, parentDev);
|
|
||||||
}
|
|
||||||
|
|
||||||
return GetDmRmcControllerForCpu2Chassis(key, name, typeName, ipid, chassis, num, parentDev);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
Debug.Console(0, "[{0}] WARNING: Cannot create DM-RMC device: {1}", key, e.Message);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static CrestronGenericBaseDevice GetDmRmcControllerForCpu2Chassis(string key, string name, string typeName,
|
|
||||||
uint ipid, Switch chassis, uint num, IKeyed parentDev)
|
|
||||||
{
|
|
||||||
Func<string, string, uint, DMOutput, CrestronGenericBaseDevice> handler;
|
|
||||||
if (ChassisDict.TryGetValue(typeName.ToLower(), out handler))
|
|
||||||
{
|
|
||||||
return handler(key, name, ipid, chassis.Outputs[num]);
|
|
||||||
}
|
|
||||||
Debug.Console(0, "Cannot create DM-RMC of type '{0}' with parent device {1}", typeName, parentDev.Key);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static CrestronGenericBaseDevice GetDmRmcControllerForCpu3Chassis(string key, string name, string typeName,
|
|
||||||
Switch chassis, uint num, IKeyed parentDev)
|
|
||||||
{
|
|
||||||
Func<string, string, DMOutput, CrestronGenericBaseDevice> cpu3Handler;
|
|
||||||
if (ChassisCpu3Dict.TryGetValue(typeName.ToLower(), out cpu3Handler))
|
|
||||||
{
|
|
||||||
return cpu3Handler(key, name, chassis.Outputs[num]);
|
|
||||||
}
|
|
||||||
Debug.Console(0, "Cannot create DM-RMC of type '{0}' with parent device {1}", typeName, parentDev.Key);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static CrestronGenericBaseDevice GetDmRmcControllerForDmps(string key, string name, string typeName,
|
|
||||||
DmpsRoutingController controller, uint num)
|
|
||||||
{
|
|
||||||
Func<string, string, DMOutput, CrestronGenericBaseDevice> dmpsHandler;
|
|
||||||
if (ChassisCpu3Dict.TryGetValue(typeName.ToLower(), out dmpsHandler))
|
|
||||||
{
|
|
||||||
var output = controller.Dmps.SwitcherOutputs[num] as DMOutput;
|
|
||||||
|
|
||||||
if (output != null)
|
|
||||||
{
|
|
||||||
return dmpsHandler(key, name, output);
|
|
||||||
}
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Error,
|
|
||||||
"Cannot attach DM-RMC of type '{0}' to output {1} on DMPS chassis. Output is not a DM Output.",
|
|
||||||
typeName, num);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "Cannot create DM-RMC of type '{0}' to output {1} on DMPS chassis", typeName, num);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static CrestronGenericBaseDevice GetDmRmcControllerForProcessor(string key, string name, string typeName, uint ipid)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Func<string, string, uint, CrestronGenericBaseDevice> handler;
|
|
||||||
|
|
||||||
if (ProcessorFactoryDict.TryGetValue(typeName.ToLower(), out handler))
|
|
||||||
{
|
|
||||||
return handler(key, name, ipid);
|
|
||||||
}
|
|
||||||
Debug.Console(0, "Cannot create DM-RMC of type: '{0}'", typeName);
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
Debug.Console(0, "[{0}] WARNING: Cannot create DM-RMC device: {1}", key, e.Message);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public class DmRmcControllerFactory : EssentialsDeviceFactory<DmRmcControllerBase>
|
|
||||||
{
|
|
||||||
public DmRmcControllerFactory()
|
|
||||||
{
|
|
||||||
TypeNames = new List<string>
|
|
||||||
{ "hdbasetrx", "dmrmc4k100c1g", "dmrmc100c", "dmrmc100s", "dmrmc4k100c", "dmrmc150s",
|
|
||||||
"dmrmc200c", "dmrmc200s", "dmrmc200s2", "dmrmcscalerc", "dmrmcscalers", "dmrmcscalers2", "dmrmc4kscalerc", "dmrmc4kscalercdsp",
|
|
||||||
"dmrmc4kz100c", "dmrmc4kzscalerc" };
|
|
||||||
}
|
|
||||||
|
|
||||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
|
||||||
{
|
|
||||||
var type = dc.Type.ToLower();
|
|
||||||
|
|
||||||
Debug.Console(1, "Factory Attempting to create new DM-RMC Device");
|
|
||||||
|
|
||||||
var props = JsonConvert.DeserializeObject
|
|
||||||
<DmRmcPropertiesConfig>(dc.Properties.ToString());
|
|
||||||
return DmRmcHelper.GetDmRmcController(dc.Key, dc.Name, type, props);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,378 +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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var parentDev = DeviceManager.GetDeviceForKey(pKey);
|
|
||||||
if (!(parentDev is IDmSwitch))
|
|
||||||
{
|
|
||||||
Debug.Console(0, "Cannot create DM device '{0}'. '{1}' is not a DM Chassis.",
|
|
||||||
key, pKey);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the Crestron chassis and link stuff up
|
|
||||||
var switchDev = (parentDev as IDmSwitch);
|
|
||||||
var chassis = switchDev.Chassis;
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var controller = (parentDev as IDmSwitch);
|
|
||||||
controller.TxDictionary.Add(num, key);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Catch constructor failures, mainly dues to IPID
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// Must use different constructor for CPU3 chassis types. No IPID
|
|
||||||
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)
|
|
||||||
{
|
|
||||||
if (typeName.StartsWith("dmtx200"))
|
|
||||||
return new DmTx200Controller(key, name, new DmTx200C2G(chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("dmtx201c"))
|
|
||||||
return new DmTx201CController(key, name, new DmTx201C(chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("dmtx201s"))
|
|
||||||
return new DmTx201SController(key, name, new DmTx201S(chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("dmtx4k100"))
|
|
||||||
return new DmTx4k100Controller(key, name, new DmTx4K100C1G(chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("dmtx4kz100"))
|
|
||||||
return new DmTx4kz100Controller(key, name, new DmTx4kz100C1G(chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("dmtx4k202"))
|
|
||||||
return new DmTx4k202CController(key, name, new DmTx4k202C(chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("dmtx4kz202"))
|
|
||||||
return new DmTx4kz202CController(key, name, new DmTx4kz202C(chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("dmtx4k302"))
|
|
||||||
return new DmTx4k302CController(key, name, new DmTx4k302C(chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("dmtx4kz302"))
|
|
||||||
return new DmTx4kz302CController(key, name, new DmTx4kz302C(chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("dmtx401"))
|
|
||||||
return new DmTx401CController(key, name, new DmTx401C(chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("hdbasettx"))
|
|
||||||
return new HDBaseTTxController(key, name, new HDTx3CB(chassis.Inputs[num]));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (typeName.StartsWith("dmtx200"))
|
|
||||||
return new DmTx200Controller(key, name, new DmTx200C2G(ipid, chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("dmtx201c"))
|
|
||||||
return new DmTx201CController(key, name, new DmTx201C(ipid, chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("dmtx201s"))
|
|
||||||
return new DmTx201SController(key, name, new DmTx201S(ipid, chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("dmtx4k100"))
|
|
||||||
return new DmTx4k100Controller(key, name, new DmTx4K100C1G(ipid, chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("dmtx4kz100"))
|
|
||||||
return new DmTx4kz100Controller(key, name, new DmTx4kz100C1G(ipid, chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("dmtx4k202"))
|
|
||||||
return new DmTx4k202CController(key, name, new DmTx4k202C(ipid, chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("dmtx4kz202"))
|
|
||||||
return new DmTx4kz202CController(key, name, new DmTx4kz202C(ipid, chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("dmtx4k302"))
|
|
||||||
return new DmTx4k302CController(key, name, new DmTx4k302C(ipid, chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("dmtx4kz302"))
|
|
||||||
return new DmTx4kz302CController(key, name, new DmTx4kz302C(ipid, chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("dmtx401"))
|
|
||||||
return new DmTx401CController(key, name, new DmTx401C(ipid, chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("hdbasettx"))
|
|
||||||
return new HDBaseTTxController(key, name, new HDTx3CB(ipid, chassis.Inputs[num]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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, skip registration step in base class
|
|
||||||
if (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;
|
|
||||||
|
|
||||||
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,187 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common.Codec
|
|
||||||
{
|
|
||||||
public enum eMeetingEventChangeType
|
|
||||||
{
|
|
||||||
Unkown = 0,
|
|
||||||
MeetingStartWarning,
|
|
||||||
MeetingStart,
|
|
||||||
MeetingEndWarning,
|
|
||||||
MeetingEnd
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IHasScheduleAwareness
|
|
||||||
{
|
|
||||||
CodecScheduleAwareness CodecSchedule { get; }
|
|
||||||
|
|
||||||
void GetSchedule();
|
|
||||||
}
|
|
||||||
|
|
||||||
public class CodecScheduleAwareness
|
|
||||||
{
|
|
||||||
List<Meeting> _meetings;
|
|
||||||
|
|
||||||
public event EventHandler<MeetingEventArgs> MeetingEventChange;
|
|
||||||
|
|
||||||
public event EventHandler<EventArgs> MeetingsListHasChanged;
|
|
||||||
|
|
||||||
private int _meetingWarningMinutes = 5;
|
|
||||||
|
|
||||||
public int MeetingWarningMinutes
|
|
||||||
{
|
|
||||||
get { return _meetingWarningMinutes; }
|
|
||||||
set { _meetingWarningMinutes = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Setter triggers MeetingsListHasChanged event
|
|
||||||
/// </summary>
|
|
||||||
public List<Meeting> Meetings
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _meetings;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_meetings = value;
|
|
||||||
|
|
||||||
var handler = MeetingsListHasChanged;
|
|
||||||
if (handler != null)
|
|
||||||
{
|
|
||||||
handler(this, new EventArgs());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private CTimer _scheduleChecker;
|
|
||||||
|
|
||||||
public CodecScheduleAwareness()
|
|
||||||
{
|
|
||||||
Meetings = new List<Meeting>();
|
|
||||||
|
|
||||||
_scheduleChecker = new CTimer(CheckSchedule, null, 1000, 1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
public CodecScheduleAwareness(long pollTime)
|
|
||||||
{
|
|
||||||
Meetings = new List<Meeting>();
|
|
||||||
|
|
||||||
_scheduleChecker = new CTimer(CheckSchedule, null, pollTime, pollTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnMeetingChange(eMeetingEventChangeType changeType, Meeting meeting)
|
|
||||||
{
|
|
||||||
var handler = MeetingEventChange;
|
|
||||||
if (handler != null)
|
|
||||||
{
|
|
||||||
handler(this, new MeetingEventArgs() { ChangeType = changeType, Meeting = meeting });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CheckSchedule(object o)
|
|
||||||
{
|
|
||||||
// Iterate the meeting list and check if any meeting need to do anythingk
|
|
||||||
|
|
||||||
const double meetingTimeEpsilon = 0.0001;
|
|
||||||
foreach (var m in Meetings)
|
|
||||||
{
|
|
||||||
var changeType = eMeetingEventChangeType.Unkown;
|
|
||||||
|
|
||||||
if (m.TimeToMeetingStart.TotalMinutes <= m.MeetingWarningMinutes.TotalMinutes) // Meeting is about to start
|
|
||||||
changeType = eMeetingEventChangeType.MeetingStartWarning;
|
|
||||||
else if (Math.Abs(m.TimeToMeetingStart.TotalMinutes) < meetingTimeEpsilon) // Meeting Start
|
|
||||||
changeType = eMeetingEventChangeType.MeetingStart;
|
|
||||||
else if (m.TimeToMeetingEnd.TotalMinutes <= m.MeetingWarningMinutes.TotalMinutes) // Meeting is about to end
|
|
||||||
changeType = eMeetingEventChangeType.MeetingEndWarning;
|
|
||||||
else if (Math.Abs(m.TimeToMeetingEnd.TotalMinutes) < meetingTimeEpsilon) // Meeting has ended
|
|
||||||
changeType = eMeetingEventChangeType.MeetingEnd;
|
|
||||||
|
|
||||||
if (changeType != eMeetingEventChangeType.Unkown)
|
|
||||||
OnMeetingChange(changeType, m);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Generic class to represent a meeting (Cisco or Polycom OBTP or Fusion)
|
|
||||||
/// </summary>
|
|
||||||
public class Meeting
|
|
||||||
{
|
|
||||||
public int MinutesBeforeMeeting;
|
|
||||||
|
|
||||||
public string Id { get; set; }
|
|
||||||
public string Organizer { get; set; }
|
|
||||||
public string Title { get; set; }
|
|
||||||
public string Agenda { get; set; }
|
|
||||||
|
|
||||||
public TimeSpan MeetingWarningMinutes
|
|
||||||
{
|
|
||||||
get { return TimeSpan.FromMinutes(MinutesBeforeMeeting); }
|
|
||||||
}
|
|
||||||
public TimeSpan TimeToMeetingStart
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return StartTime - DateTime.Now;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public TimeSpan TimeToMeetingEnd
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return EndTime - DateTime.Now;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public DateTime StartTime { get; set; }
|
|
||||||
public DateTime EndTime { get; set; }
|
|
||||||
public TimeSpan Duration
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return EndTime - StartTime;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public eMeetingPrivacy Privacy { get; set; }
|
|
||||||
public bool Joinable
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return StartTime.AddMinutes(-MinutesBeforeMeeting) <= DateTime.Now
|
|
||||||
&& DateTime.Now <= EndTime; //.AddMinutes(-5);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//public string ConferenceNumberToDial { get; set; }
|
|
||||||
public string ConferencePassword { get; set; }
|
|
||||||
public bool IsOneButtonToPushMeeting { get; set; }
|
|
||||||
|
|
||||||
public List<Call> Calls { get; private set; }
|
|
||||||
|
|
||||||
public Meeting()
|
|
||||||
{
|
|
||||||
Calls = new List<Call>();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Call
|
|
||||||
{
|
|
||||||
public string Number { get; set; }
|
|
||||||
public string Protocol { get; set; }
|
|
||||||
public string CallRate { get; set; }
|
|
||||||
public string CallType { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class MeetingEventArgs : EventArgs
|
|
||||||
{
|
|
||||||
public eMeetingEventChangeType ChangeType { get; set; }
|
|
||||||
public Meeting Meeting { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,81 +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);
|
|
||||||
}
|
|
||||||
|
|
||||||
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,100 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using PepperDash.Essentials.Core;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Describes a device that has call participants
|
|
||||||
/// </summary>
|
|
||||||
public interface IHasParticipants
|
|
||||||
{
|
|
||||||
CodecParticipants Participants { get; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Describes the ability to mute and unmute a participant's video in a meeting
|
|
||||||
/// </summary>
|
|
||||||
public interface IHasParticipantVideoMute:IHasParticipants
|
|
||||||
{
|
|
||||||
void MuteVideoForParticipant(int userId);
|
|
||||||
void UnmuteVideoForParticipant(int userId);
|
|
||||||
void ToggleVideoForParticipant(int userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Describes the ability to mute and unmute a participant's audio in a meeting
|
|
||||||
/// </summary>
|
|
||||||
public interface IHasParticipantAudioMute : IHasParticipantVideoMute
|
|
||||||
{
|
|
||||||
void MuteAudioForParticipant(int userId);
|
|
||||||
void UnmuteAudioForParticipant(int userId);
|
|
||||||
void ToggleAudioForParticipant(int userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Describes the ability to pin and unpin a participant in a meeting
|
|
||||||
/// </summary>
|
|
||||||
public interface IHasParticipantPinUnpin : IHasParticipants
|
|
||||||
{
|
|
||||||
IntFeedback NumberOfScreensFeedback { get; }
|
|
||||||
int ScreenIndexToPinUserTo { get; }
|
|
||||||
|
|
||||||
void PinParticipant(int userId, int screenIndex);
|
|
||||||
void UnPinParticipant(int userId);
|
|
||||||
void ToggleParticipantPinState(int userId, int screenIndex);
|
|
||||||
}
|
|
||||||
|
|
||||||
public class CodecParticipants
|
|
||||||
{
|
|
||||||
private List<Participant> _currentParticipants;
|
|
||||||
|
|
||||||
public List<Participant> CurrentParticipants {
|
|
||||||
get { return _currentParticipants; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_currentParticipants = value;
|
|
||||||
OnParticipantsChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public event EventHandler<EventArgs> ParticipantsListHasChanged;
|
|
||||||
|
|
||||||
public CodecParticipants()
|
|
||||||
{
|
|
||||||
_currentParticipants = new List<Participant>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnParticipantsChanged()
|
|
||||||
{
|
|
||||||
var handler = ParticipantsListHasChanged;
|
|
||||||
|
|
||||||
if (handler == null) return;
|
|
||||||
|
|
||||||
handler(this, new EventArgs());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Represents a call participant
|
|
||||||
/// </summary>
|
|
||||||
public class Participant
|
|
||||||
{
|
|
||||||
public int UserId { get; set; }
|
|
||||||
public bool IsHost { get; set; }
|
|
||||||
public string Name { get; set; }
|
|
||||||
public bool CanMuteVideo { get; set; }
|
|
||||||
public bool CanUnmuteVideo { get; set; }
|
|
||||||
public bool VideoMuteFb { get; set; }
|
|
||||||
public bool AudioMuteFb { get; set; }
|
|
||||||
public bool HandIsRaisedFb { get; set; }
|
|
||||||
public bool IsPinnedFb { get; set; }
|
|
||||||
public int ScreenIndexIsPinnedToFb { get; set; }
|
|
||||||
|
|
||||||
public Participant()
|
|
||||||
{
|
|
||||||
// Initialize to -1 (no screen)
|
|
||||||
ScreenIndexIsPinnedToFb = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,301 +0,0 @@
|
|||||||
using System;
|
|
||||||
using PepperDash.Essentials.Core;
|
|
||||||
using PepperDash.Essentials.Core.Bridges.JoinMaps;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|
||||||
{
|
|
||||||
public class ZoomRoomJoinMap : VideoCodecControllerJoinMap
|
|
||||||
{
|
|
||||||
#region Digital
|
|
||||||
|
|
||||||
[JoinName("CanSwapContentWithThumbnail")]
|
|
||||||
public JoinDataComplete CanSwapContentWithThumbnail = new JoinDataComplete(
|
|
||||||
new JoinData
|
|
||||||
{
|
|
||||||
JoinNumber = 206,
|
|
||||||
JoinSpan = 1
|
|
||||||
},
|
|
||||||
new JoinMetadata
|
|
||||||
{
|
|
||||||
Description = "FB Indicates if content can be swapped with thumbnail",
|
|
||||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
|
||||||
JoinType = eJoinType.Digital
|
|
||||||
});
|
|
||||||
|
|
||||||
[JoinName("SwapContentWithThumbnail")]
|
|
||||||
public JoinDataComplete SwapContentWithThumbnail = new JoinDataComplete(
|
|
||||||
new JoinData
|
|
||||||
{
|
|
||||||
JoinNumber = 206,
|
|
||||||
JoinSpan = 1
|
|
||||||
},
|
|
||||||
new JoinMetadata
|
|
||||||
{
|
|
||||||
Description = "Pulse to swap content with thumbnail. FB reports current state",
|
|
||||||
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
|
||||||
JoinType = eJoinType.Digital
|
|
||||||
});
|
|
||||||
|
|
||||||
[JoinName("GetAvailableLayouts")]
|
|
||||||
public JoinDataComplete GetAvailableLayouts = new JoinDataComplete(
|
|
||||||
new JoinData
|
|
||||||
{
|
|
||||||
JoinNumber = 215,
|
|
||||||
JoinSpan = 1
|
|
||||||
},
|
|
||||||
new JoinMetadata
|
|
||||||
{
|
|
||||||
Description = "Gets the available layouts. Will update the LayoutXXXXXIsAvailbale signals.",
|
|
||||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
|
||||||
JoinType = eJoinType.Digital
|
|
||||||
});
|
|
||||||
|
|
||||||
[JoinName("LayoutIsOnFirstPage")]
|
|
||||||
public JoinDataComplete LayoutIsOnFirstPage = new JoinDataComplete(
|
|
||||||
new JoinData
|
|
||||||
{
|
|
||||||
JoinNumber = 216,
|
|
||||||
JoinSpan = 1
|
|
||||||
},
|
|
||||||
new JoinMetadata
|
|
||||||
{
|
|
||||||
Description = "Indicates if layout is on first page",
|
|
||||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
|
||||||
JoinType = eJoinType.Digital
|
|
||||||
});
|
|
||||||
|
|
||||||
[JoinName("LayoutIsOnLastPage")]
|
|
||||||
public JoinDataComplete LayoutIsOnLastPage = new JoinDataComplete(
|
|
||||||
new JoinData
|
|
||||||
{
|
|
||||||
JoinNumber = 217,
|
|
||||||
JoinSpan = 1
|
|
||||||
},
|
|
||||||
new JoinMetadata
|
|
||||||
{
|
|
||||||
Description = "Indicates if layout is on first page",
|
|
||||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
|
||||||
JoinType = eJoinType.Digital
|
|
||||||
});
|
|
||||||
|
|
||||||
[JoinName("LayoutTurnToNextPage")]
|
|
||||||
public JoinDataComplete LayoutTurnToNextPage = new JoinDataComplete(
|
|
||||||
new JoinData
|
|
||||||
{
|
|
||||||
JoinNumber = 216,
|
|
||||||
JoinSpan = 1
|
|
||||||
},
|
|
||||||
new JoinMetadata
|
|
||||||
{
|
|
||||||
Description = "Turns layout view to next page",
|
|
||||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
|
||||||
JoinType = eJoinType.Digital
|
|
||||||
});
|
|
||||||
|
|
||||||
[JoinName("LayoutTurnToPreviousPage")]
|
|
||||||
public JoinDataComplete LayoutTurnToPreviousPage = new JoinDataComplete(
|
|
||||||
new JoinData
|
|
||||||
{
|
|
||||||
JoinNumber = 217,
|
|
||||||
JoinSpan = 1
|
|
||||||
},
|
|
||||||
new JoinMetadata
|
|
||||||
{
|
|
||||||
Description = "Turns layout view to previous page",
|
|
||||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
|
||||||
JoinType = eJoinType.Digital
|
|
||||||
});
|
|
||||||
|
|
||||||
[JoinName("LayoutGalleryIsAvailable")]
|
|
||||||
public JoinDataComplete LayoutGalleryIsAvailable = new JoinDataComplete(
|
|
||||||
new JoinData
|
|
||||||
{
|
|
||||||
JoinNumber = 221,
|
|
||||||
JoinSpan = 1
|
|
||||||
},
|
|
||||||
new JoinMetadata
|
|
||||||
{
|
|
||||||
Description = "FB Indicates if layout 'Gallery' is available",
|
|
||||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
|
||||||
JoinType = eJoinType.DigitalSerial
|
|
||||||
});
|
|
||||||
|
|
||||||
[JoinName("LayoutSpeakerIsAvailable")]
|
|
||||||
public JoinDataComplete LayoutSpeakerIsAvailable = new JoinDataComplete(
|
|
||||||
new JoinData
|
|
||||||
{
|
|
||||||
JoinNumber = 222,
|
|
||||||
JoinSpan = 1
|
|
||||||
},
|
|
||||||
new JoinMetadata
|
|
||||||
{
|
|
||||||
Description = "FB Indicates if layout 'Speaker' is available",
|
|
||||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
|
||||||
JoinType = eJoinType.DigitalSerial
|
|
||||||
});
|
|
||||||
|
|
||||||
[JoinName("LayoutStripIsAvailable")]
|
|
||||||
public JoinDataComplete LayoutStripIsAvailable = new JoinDataComplete(
|
|
||||||
new JoinData
|
|
||||||
{
|
|
||||||
JoinNumber = 223,
|
|
||||||
JoinSpan = 1
|
|
||||||
},
|
|
||||||
new JoinMetadata
|
|
||||||
{
|
|
||||||
Description = "FB Indicates if layout 'Strip' is available",
|
|
||||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
|
||||||
JoinType = eJoinType.DigitalSerial
|
|
||||||
});
|
|
||||||
|
|
||||||
[JoinName("LayoutShareAllIsAvailable")]
|
|
||||||
public JoinDataComplete LayoutShareAllIsAvailable = new JoinDataComplete(
|
|
||||||
new JoinData
|
|
||||||
{
|
|
||||||
JoinNumber = 224,
|
|
||||||
JoinSpan = 1
|
|
||||||
},
|
|
||||||
new JoinMetadata
|
|
||||||
{
|
|
||||||
Description = "FB Indicates if layout 'ShareAll' is available",
|
|
||||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
|
||||||
JoinType = eJoinType.DigitalSerial
|
|
||||||
});
|
|
||||||
|
|
||||||
// TODO: #714 [ ] JoinMap >> SelfivewPipSizeToggle
|
|
||||||
[JoinName("SelfviewPipSizeToggle")]
|
|
||||||
public JoinDataComplete SelfviewPipSizeToggle = new JoinDataComplete(
|
|
||||||
new JoinData
|
|
||||||
{
|
|
||||||
JoinNumber = 231,
|
|
||||||
JoinSpan = 1
|
|
||||||
},
|
|
||||||
new JoinMetadata
|
|
||||||
{
|
|
||||||
Description = "Toggles the selfview pip size, (aka layout size)",
|
|
||||||
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
|
||||||
JoinType = eJoinType.Digital
|
|
||||||
});
|
|
||||||
|
|
||||||
//[JoinName("ParticipantAudioMuteToggleStart")]
|
|
||||||
//public JoinDataComplete ParticipantAudioMuteToggleStart = new JoinDataComplete(
|
|
||||||
// new JoinData
|
|
||||||
// {
|
|
||||||
// JoinNumber = 500,
|
|
||||||
// JoinSpan = 100
|
|
||||||
// },
|
|
||||||
// new JoinMetadata
|
|
||||||
// {
|
|
||||||
// Description = "Toggles the participant's audio mute status",
|
|
||||||
// JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
|
||||||
// JoinType = eJoinType.Digital
|
|
||||||
// });
|
|
||||||
|
|
||||||
//[JoinName("ParticipantVideoMuteToggleStart")]
|
|
||||||
//public JoinDataComplete ParticipantVideoMuteToggleStart = new JoinDataComplete(
|
|
||||||
// new JoinData
|
|
||||||
// {
|
|
||||||
// JoinNumber = 800,
|
|
||||||
// JoinSpan = 100
|
|
||||||
// },
|
|
||||||
// new JoinMetadata
|
|
||||||
// {
|
|
||||||
// Description = "Toggles the participant's video mute status",
|
|
||||||
// JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
|
||||||
// JoinType = eJoinType.Digital
|
|
||||||
// });
|
|
||||||
|
|
||||||
//[JoinName("ParticipantPinToggleStart")]
|
|
||||||
//public JoinDataComplete ParticipantPinToggleStart = new JoinDataComplete(
|
|
||||||
// new JoinData
|
|
||||||
// {
|
|
||||||
// JoinNumber = 1100,
|
|
||||||
// JoinSpan = 100
|
|
||||||
// },
|
|
||||||
// new JoinMetadata
|
|
||||||
// {
|
|
||||||
// Description = "Toggles the participant's pin status",
|
|
||||||
// JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
|
||||||
// JoinType = eJoinType.Digital
|
|
||||||
// });
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
#region Analog
|
|
||||||
|
|
||||||
[JoinName("NumberOfScreens")]
|
|
||||||
public JoinDataComplete NumberOfScreens = new JoinDataComplete(
|
|
||||||
new JoinData
|
|
||||||
{
|
|
||||||
JoinNumber = 11,
|
|
||||||
JoinSpan = 1
|
|
||||||
},
|
|
||||||
new JoinMetadata
|
|
||||||
{
|
|
||||||
Description = "Reports the number of screens connected",
|
|
||||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
|
||||||
JoinType = eJoinType.Analog
|
|
||||||
});
|
|
||||||
|
|
||||||
[JoinName("ScreenIndexToPinUserTo")]
|
|
||||||
public JoinDataComplete ScreenIndexToPinUserTo = new JoinDataComplete(
|
|
||||||
new JoinData
|
|
||||||
{
|
|
||||||
JoinNumber = 11,
|
|
||||||
JoinSpan = 1
|
|
||||||
},
|
|
||||||
new JoinMetadata
|
|
||||||
{
|
|
||||||
Description = "Specifies the screen index a participant should be pinned to",
|
|
||||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
|
||||||
JoinType = eJoinType.Analog
|
|
||||||
});
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
#region Serials
|
|
||||||
|
|
||||||
[JoinName("GetSetCurrentLayout")]
|
|
||||||
public JoinDataComplete GetSetCurrentLayout = new JoinDataComplete(
|
|
||||||
new JoinData
|
|
||||||
{
|
|
||||||
JoinNumber = 215,
|
|
||||||
JoinSpan = 1
|
|
||||||
},
|
|
||||||
new JoinMetadata
|
|
||||||
{
|
|
||||||
Description = "Sets and reports the current layout. Use the LayoutXXXXIsAvailable signals to determine valid layouts",
|
|
||||||
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
|
||||||
JoinType = eJoinType.Serial
|
|
||||||
});
|
|
||||||
|
|
||||||
// TODO: #714 [ ] JoinMap >> GetSetSelfviewPipSize
|
|
||||||
[JoinName("GetSetSelfviewPipSize")]
|
|
||||||
public JoinDataComplete GetSetSelfviewPipSize = new JoinDataComplete(
|
|
||||||
new JoinData
|
|
||||||
{
|
|
||||||
JoinNumber = 230,
|
|
||||||
JoinSpan = 1
|
|
||||||
},
|
|
||||||
new JoinMetadata
|
|
||||||
{
|
|
||||||
Description = "Sets and reports the selfview pip size, (aka layout size).",
|
|
||||||
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
|
||||||
JoinType = eJoinType.DigitalSerial
|
|
||||||
});
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
public ZoomRoomJoinMap(uint joinStart)
|
|
||||||
: base(joinStart, typeof(ZoomRoomJoinMap))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public ZoomRoomJoinMap(uint joinStart, Type type)
|
|
||||||
: base(joinStart, type)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
<packages>
|
<packages>
|
||||||
<package id="PepperDashCore" version="1.0.47" targetFramework="net35" allowedVersions="[1.0,1.1)"/>
|
<package id="PepperDashCore" version="1.4.2" 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;
|
||||||
}
|
}
|
||||||
@@ -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.");
|
||||||
@@ -13,6 +13,7 @@ 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.Essentials.Core.Fusion;
|
using PepperDash.Essentials.Core.Fusion;
|
||||||
|
using PepperDash.Essentials.Core.Web;
|
||||||
using PepperDash.Essentials.Devices.Common;
|
using PepperDash.Essentials.Devices.Common;
|
||||||
using PepperDash.Essentials.DM;
|
using PepperDash.Essentials.DM;
|
||||||
using PepperDash.Essentials.Fusion;
|
using PepperDash.Essentials.Fusion;
|
||||||
@@ -28,6 +29,7 @@ namespace PepperDash.Essentials
|
|||||||
HttpLogoServer LogoServer;
|
HttpLogoServer LogoServer;
|
||||||
|
|
||||||
private CTimer _startTimer;
|
private CTimer _startTimer;
|
||||||
|
private CEvent _initializeEvent;
|
||||||
private const long StartupTime = 500;
|
private const long StartupTime = 500;
|
||||||
|
|
||||||
public ControlSystem()
|
public ControlSystem()
|
||||||
@@ -45,10 +47,29 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public override void InitializeSystem()
|
public override void InitializeSystem()
|
||||||
{
|
{
|
||||||
_startTimer = new CTimer(StartSystem,StartupTime);
|
// If the control system is a DMPS type, we need to wait to exit this method until all devices have had time to activate
|
||||||
|
// to allow any HD-BaseT DM endpoints to register first.
|
||||||
|
bool preventInitializationComplete = Global.ControlSystemIsDmpsType;
|
||||||
|
if (preventInitializationComplete)
|
||||||
|
{
|
||||||
|
Debug.Console(1, "******************* InitializeSystem() Entering **********************");
|
||||||
|
_startTimer = new CTimer(StartSystem, preventInitializationComplete, StartupTime);
|
||||||
|
_initializeEvent = new CEvent(true, false);
|
||||||
|
DeviceManager.AllDevicesRegistered += (o, a) =>
|
||||||
|
{
|
||||||
|
_initializeEvent.Set();
|
||||||
|
};
|
||||||
|
_initializeEvent.Wait(30000);
|
||||||
|
Debug.Console(1, "******************* InitializeSystem() Exiting **********************");
|
||||||
|
SystemMonitor.ProgramInitialization.ProgramInitializationComplete = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_startTimer = new CTimer(StartSystem, preventInitializationComplete, StartupTime);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StartSystem(object obj)
|
private void StartSystem(object preventInitialization)
|
||||||
{
|
{
|
||||||
DeterminePlatform();
|
DeterminePlatform();
|
||||||
|
|
||||||
@@ -60,36 +81,41 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
CrestronConsole.AddNewConsoleCommand(PluginLoader.ReportAssemblyVersions, "reportversions", "Reports the versions of the loaded assemblies", ConsoleAccessLevelEnum.AccessOperator);
|
CrestronConsole.AddNewConsoleCommand(PluginLoader.ReportAssemblyVersions, "reportversions", "Reports the versions of the loaded assemblies", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
CrestronConsole.AddNewConsoleCommand(PepperDash.Essentials.Core.DeviceFactory.GetDeviceFactoryTypes, "gettypes", "Gets the device types that can be built. Accepts a filter string.", ConsoleAccessLevelEnum.AccessOperator);
|
CrestronConsole.AddNewConsoleCommand(Core.DeviceFactory.GetDeviceFactoryTypes, "gettypes", "Gets the device types that can be built. Accepts a filter string.", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
CrestronConsole.AddNewConsoleCommand(BridgeHelper.PrintJoinMap, "getjoinmap", "map(s) for bridge or device on bridge [brKey [devKey]]", ConsoleAccessLevelEnum.AccessOperator);
|
CrestronConsole.AddNewConsoleCommand(BridgeHelper.PrintJoinMap, "getjoinmap", "map(s) for bridge or device on bridge [brKey [devKey]]", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
CrestronConsole.AddNewConsoleCommand(s =>
|
CrestronConsole.AddNewConsoleCommand(BridgeHelper.JoinmapMarkdown, "getjoinmapmarkdown"
|
||||||
{
|
, "generate markdown of map(s) for bridge or device on bridge [brKey [devKey]]", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "CONSOLE MESSAGE: {0}", s);
|
|
||||||
}, "appdebugmessage", "Writes message to log", ConsoleAccessLevelEnum.AccessOperator);
|
CrestronConsole.AddNewConsoleCommand(s => Debug.Console(0, Debug.ErrorLogLevel.Notice, "CONSOLE MESSAGE: {0}", s), "appdebugmessage", "Writes message to log", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
CrestronConsole.AddNewConsoleCommand(s =>
|
CrestronConsole.AddNewConsoleCommand(s =>
|
||||||
{
|
{
|
||||||
foreach (var tl in TieLineCollection.Default)
|
foreach (var tl in TieLineCollection.Default)
|
||||||
CrestronConsole.ConsoleCommandResponse(" {0}\r\n", tl);
|
CrestronConsole.ConsoleCommandResponse(" {0}{1}", tl, CrestronEnvironment.NewLine);
|
||||||
},
|
},
|
||||||
"listtielines", "Prints out all tie lines", ConsoleAccessLevelEnum.AccessOperator);
|
"listtielines", "Prints out all tie lines", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
CrestronConsole.AddNewConsoleCommand(s =>
|
CrestronConsole.AddNewConsoleCommand(s =>
|
||||||
{
|
{
|
||||||
CrestronConsole.ConsoleCommandResponse
|
CrestronConsole.ConsoleCommandResponse
|
||||||
("Current running configuration. This is the merged system and template configuration");
|
("Current running configuration. This is the merged system and template configuration" + CrestronEnvironment.NewLine);
|
||||||
CrestronConsole.ConsoleCommandResponse(Newtonsoft.Json.JsonConvert.SerializeObject
|
CrestronConsole.ConsoleCommandResponse(Newtonsoft.Json.JsonConvert.SerializeObject
|
||||||
(ConfigReader.ConfigObject, Newtonsoft.Json.Formatting.Indented));
|
(ConfigReader.ConfigObject, Newtonsoft.Json.Formatting.Indented));
|
||||||
}, "showconfig", "Shows the current running merged config", ConsoleAccessLevelEnum.AccessOperator);
|
}, "showconfig", "Shows the current running merged config", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
CrestronConsole.AddNewConsoleCommand(s =>
|
CrestronConsole.AddNewConsoleCommand(s =>
|
||||||
{
|
CrestronConsole.ConsoleCommandResponse(
|
||||||
CrestronConsole.ConsoleCommandResponse("This system can be found at the following URLs:\r\n" +
|
"This system can be found at the following URLs:{2}" +
|
||||||
"System URL: {0}\r\n" +
|
"System URL: {0}{2}" +
|
||||||
"Template URL: {1}", ConfigReader.ConfigObject.SystemUrl, ConfigReader.ConfigObject.TemplateUrl);
|
"Template URL: {1}{2}",
|
||||||
}, "portalinfo", "Shows portal URLS from configuration", ConsoleAccessLevelEnum.AccessOperator);
|
ConfigReader.ConfigObject.SystemUrl,
|
||||||
|
ConfigReader.ConfigObject.TemplateUrl,
|
||||||
|
CrestronEnvironment.NewLine),
|
||||||
|
"portalinfo",
|
||||||
|
"Shows portal URLS from configuration",
|
||||||
|
ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
|
|
||||||
CrestronConsole.AddNewConsoleCommand(DeviceManager.GetRoutingPorts,
|
CrestronConsole.AddNewConsoleCommand(DeviceManager.GetRoutingPorts,
|
||||||
@@ -101,8 +127,11 @@ namespace PepperDash.Essentials
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(bool)preventInitialization)
|
||||||
|
{
|
||||||
SystemMonitor.ProgramInitialization.ProgramInitializationComplete = true;
|
SystemMonitor.ProgramInitialization.ProgramInitializationComplete = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Determines if the program is running on a processor (appliance) or server (VC-4).
|
/// Determines if the program is running on a processor (appliance) or server (VC-4).
|
||||||
@@ -131,34 +160,53 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
if (CrestronEnvironment.DevicePlatform != eDevicePlatform.Server) // Handles 3-series running Windows CE OS
|
if (CrestronEnvironment.DevicePlatform != eDevicePlatform.Server) // Handles 3-series running Windows CE OS
|
||||||
{
|
{
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials v{0} on {1} Appliance", Global.AssemblyVersion, Global.ProcessorSeries.ToString());
|
string userFolder;
|
||||||
|
string nvramFolder;
|
||||||
|
bool is4series = false;
|
||||||
|
|
||||||
|
if (eCrestronSeries.Series4 == (Global.ProcessorSeries & eCrestronSeries.Series4)) // Handle 4-series
|
||||||
|
{
|
||||||
|
is4series = true;
|
||||||
|
// Set path to user/
|
||||||
|
userFolder = "user";
|
||||||
|
nvramFolder = "nvram";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
userFolder = "User";
|
||||||
|
nvramFolder = "Nvram";
|
||||||
|
}
|
||||||
|
|
||||||
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials v{0} on {1} Appliance", Global.AssemblyVersion, is4series ? "4-series" : "3-series");
|
||||||
|
|
||||||
// Check if User/ProgramX exists
|
// Check if User/ProgramX exists
|
||||||
if (Directory.Exists(Global.ApplicationDirectoryPathPrefix + dirSeparator + "User"
|
if (Directory.Exists(Global.ApplicationDirectoryPathPrefix + dirSeparator + userFolder
|
||||||
+ dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber)))
|
+ dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber)))
|
||||||
{
|
{
|
||||||
Debug.Console(0, @"User/program{0} directory found", InitialParametersClass.ApplicationNumber);
|
Debug.Console(0, @"{0}/program{1} directory found", userFolder, InitialParametersClass.ApplicationNumber);
|
||||||
filePathPrefix = directoryPrefix + dirSeparator + "User"
|
filePathPrefix = directoryPrefix + dirSeparator + userFolder
|
||||||
+ dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber) + dirSeparator;
|
+ dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber) + dirSeparator;
|
||||||
}
|
}
|
||||||
// Check if Nvram/Programx exists
|
// Check if Nvram/Programx exists
|
||||||
else if (Directory.Exists(directoryPrefix + dirSeparator + "Nvram"
|
else if (Directory.Exists(directoryPrefix + dirSeparator + nvramFolder
|
||||||
+ dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber)))
|
+ dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber)))
|
||||||
{
|
{
|
||||||
Debug.Console(0, @"Nvram/program{0} directory found", InitialParametersClass.ApplicationNumber);
|
Debug.Console(0, @"{0}/program{1} directory found", nvramFolder, InitialParametersClass.ApplicationNumber);
|
||||||
filePathPrefix = directoryPrefix + dirSeparator + "Nvram"
|
filePathPrefix = directoryPrefix + dirSeparator + nvramFolder
|
||||||
+ dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber) + dirSeparator;
|
+ dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber) + dirSeparator;
|
||||||
}
|
}
|
||||||
// If neither exists, set path to User/ProgramX
|
// If neither exists, set path to User/ProgramX
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Console(0, @"No previous directory found. Using User/program{0}", InitialParametersClass.ApplicationNumber);
|
Debug.Console(0, @"No previous directory found. Using {0}/program{1}", userFolder, InitialParametersClass.ApplicationNumber);
|
||||||
filePathPrefix = directoryPrefix + dirSeparator + "User"
|
filePathPrefix = directoryPrefix + dirSeparator + userFolder
|
||||||
+ dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber) + dirSeparator;
|
+ dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber) + dirSeparator;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // Handles Linux OS (Virtual Control)
|
else // Handles Linux OS (Virtual Control)
|
||||||
{
|
{
|
||||||
|
Debug.SetDebugLevel(2);
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials v{0} on Virtual Control Server", Global.AssemblyVersion);
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials v{0} on Virtual Control Server", Global.AssemblyVersion);
|
||||||
|
|
||||||
// Set path to User/
|
// Set path to User/
|
||||||
@@ -260,6 +308,10 @@ namespace PepperDash.Essentials
|
|||||||
if (!Directory.Exists(pluginDir))
|
if (!Directory.Exists(pluginDir))
|
||||||
Directory.Create(pluginDir);
|
Directory.Create(pluginDir);
|
||||||
|
|
||||||
|
var joinmapDir = Global.FilePathPrefix + "joinmaps";
|
||||||
|
if(!Directory.Exists(joinmapDir))
|
||||||
|
Directory.Create(joinmapDir);
|
||||||
|
|
||||||
return configExists;
|
return configExists;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -307,6 +359,7 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
// Build the processor wrapper class
|
// Build the processor wrapper class
|
||||||
DeviceManager.AddDevice(new PepperDash.Essentials.Core.Devices.CrestronProcessor("processor"));
|
DeviceManager.AddDevice(new PepperDash.Essentials.Core.Devices.CrestronProcessor("processor"));
|
||||||
|
DeviceManager.AddDevice(new EssemtialsWebApi("essentialsWebApi","Essentials Web API"));
|
||||||
|
|
||||||
// Add global System Monitor device
|
// Add global System Monitor device
|
||||||
if (CrestronEnvironment.DevicePlatform == eDevicePlatform.Appliance)
|
if (CrestronEnvironment.DevicePlatform == eDevicePlatform.Appliance)
|
||||||
@@ -326,7 +379,7 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
var prompt = Global.ControlSystem.ControllerPrompt;
|
var prompt = Global.ControlSystem.ControllerPrompt;
|
||||||
|
|
||||||
var typeMatch = String.Equals(devConf.Type, prompt, StringComparison.OrdinalIgnoreCase) &&
|
var typeMatch = String.Equals(devConf.Type, prompt, StringComparison.OrdinalIgnoreCase) ||
|
||||||
String.Equals(devConf.Type, prompt.Replace("-", ""), StringComparison.OrdinalIgnoreCase);
|
String.Equals(devConf.Type, prompt.Replace("-", ""), StringComparison.OrdinalIgnoreCase);
|
||||||
|
|
||||||
if (!typeMatch)
|
if (!typeMatch)
|
||||||
@@ -344,26 +397,25 @@ namespace PepperDash.Essentials
|
|||||||
if(propertiesConfig == null)
|
if(propertiesConfig == null)
|
||||||
propertiesConfig = new DM.Config.DmpsRoutingPropertiesConfig();
|
propertiesConfig = new DM.Config.DmpsRoutingPropertiesConfig();
|
||||||
|
|
||||||
var dmpsRoutingController = DmpsRoutingController.GetDmpsRoutingController("processor-avRouting", this.ControllerPrompt, propertiesConfig);
|
DeviceManager.AddDevice(DmpsRoutingController.GetDmpsRoutingController("processor-avRouting", this.ControllerPrompt, propertiesConfig));
|
||||||
|
|
||||||
DeviceManager.AddDevice(dmpsRoutingController);
|
|
||||||
}
|
}
|
||||||
else if (this.ControllerPrompt.IndexOf("mpc3", StringComparison.OrdinalIgnoreCase) > -1)
|
else if (this.ControllerPrompt.IndexOf("mpc3", StringComparison.OrdinalIgnoreCase) > -1)
|
||||||
{
|
{
|
||||||
Debug.Console(2, "MPC3 processor type detected. Adding Mpc3TouchpanelController.");
|
Debug.Console(2, "MPC3 processor type detected. Adding Mpc3TouchpanelController.");
|
||||||
|
|
||||||
var butToken = devConf.Properties["buttons"];
|
var butToken = devConf.Properties["buttons"];
|
||||||
if (butToken != null)
|
if (butToken == null)
|
||||||
{
|
{
|
||||||
var buttons = butToken.ToObject<Dictionary<string, Essentials.Core.Touchpanels.KeypadButton>>();
|
Debug.Console(0, Debug.ErrorLogLevel.Error,
|
||||||
var tpController = new Essentials.Core.Touchpanels.Mpc3TouchpanelController(devConf.Key, devConf.Name, Global.ControlSystem, buttons);
|
"Error: Unable to deserialize buttons collection for device: {0}", devConf.Key);
|
||||||
DeviceManager.AddDevice(tpController);
|
continue;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "Error: Unable to deserialize buttons collection for device: {0}", devConf.Key);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var buttons = butToken.ToObject<Dictionary<string, Essentials.Core.Touchpanels.KeypadButton>>();
|
||||||
|
var tpController = new Core.Touchpanels.Mpc3TouchpanelController(
|
||||||
|
string.Format("{0}-keypadButtons", devConf.Key), devConf.Name, Global.ControlSystem, buttons);
|
||||||
|
|
||||||
|
DeviceManager.AddDevice(tpController);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -433,14 +485,13 @@ namespace PepperDash.Essentials
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var roomConfig in ConfigReader.ConfigObject.Rooms)
|
|
||||||
{
|
|
||||||
var room = EssentialsRoomConfigHelper.GetRoomObject(roomConfig) as EssentialsRoomBase;
|
|
||||||
if (room != null)
|
|
||||||
{
|
|
||||||
// default IPID
|
|
||||||
uint fusionIpId = 0xf1;
|
uint fusionIpId = 0xf1;
|
||||||
|
|
||||||
|
foreach (var roomConfig in ConfigReader.ConfigObject.Rooms)
|
||||||
|
{
|
||||||
|
var room = EssentialsRoomConfigHelper.GetRoomObject(roomConfig) as IEssentialsRoom;
|
||||||
|
if (room != null)
|
||||||
|
{
|
||||||
// default to no join map key
|
// default to no join map key
|
||||||
string fusionJoinMapKey = string.Empty;
|
string fusionJoinMapKey = string.Empty;
|
||||||
|
|
||||||
@@ -457,63 +508,71 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (room is EssentialsHuddleSpaceRoom)
|
AddRoomAndBuildMC(room);
|
||||||
{
|
|
||||||
DeviceManager.AddDevice(room);
|
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is EssentialsHuddleSpaceRoom, attempting to add to DeviceManager with Fusion");
|
if (room is IEssentialsHuddleSpaceRoom)
|
||||||
|
{
|
||||||
|
|
||||||
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is EssentialsHuddleSpaceRoom, attempting to add to DeviceManager with Fusion with IP-ID {0:X2}", fusionIpId);
|
||||||
DeviceManager.AddDevice(new Core.Fusion.EssentialsHuddleSpaceFusionSystemControllerBase(room, fusionIpId, fusionJoinMapKey));
|
DeviceManager.AddDevice(new Core.Fusion.EssentialsHuddleSpaceFusionSystemControllerBase(room, fusionIpId, fusionJoinMapKey));
|
||||||
|
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge...");
|
|
||||||
|
|
||||||
CreateMobileControlBridge(room);
|
|
||||||
}
|
}
|
||||||
else if (room is EssentialsHuddleVtc1Room)
|
else if (room is IEssentialsHuddleVtc1Room)
|
||||||
{
|
{
|
||||||
DeviceManager.AddDevice(room);
|
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is EssentialsHuddleVtc1Room, attempting to add to DeviceManager with Fusion");
|
if (!(room is EssentialsCombinedHuddleVtc1Room))
|
||||||
DeviceManager.AddDevice(new EssentialsHuddleVtc1FusionController((EssentialsHuddleVtc1Room)room, fusionIpId, fusionJoinMapKey));
|
{
|
||||||
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is EssentialsHuddleVtc1Room, attempting to add to DeviceManager with Fusion with IP-ID {0:X2}", fusionIpId);
|
||||||
|
DeviceManager.AddDevice(new EssentialsHuddleVtc1FusionController((IEssentialsHuddleVtc1Room)room, fusionIpId, fusionJoinMapKey));
|
||||||
|
}
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge...");
|
|
||||||
|
|
||||||
CreateMobileControlBridge(room);
|
|
||||||
}
|
}
|
||||||
else if (room is EssentialsTechRoom)
|
else if (room is EssentialsTechRoom)
|
||||||
{
|
{
|
||||||
DeviceManager.AddDevice(room);
|
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice,
|
Debug.Console(0, Debug.ErrorLogLevel.Notice,
|
||||||
"Room is EssentialsTechRoom, Attempting to add to DeviceManager with Fusion");
|
"Room is EssentialsTechRoom, Attempting to add to DeviceManager with Fusion with IP-ID {0:X2}", fusionIpId);
|
||||||
DeviceManager.AddDevice(new EssentialsTechRoomFusionSystemController((EssentialsTechRoom)room, fusionIpId, fusionJoinMapKey));
|
DeviceManager.AddDevice(new EssentialsTechRoomFusionSystemController((EssentialsTechRoom)room, fusionIpId, fusionJoinMapKey));
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge");
|
}
|
||||||
|
fusionIpId += 1;
|
||||||
CreateMobileControlBridge(room);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is NOT EssentialsRoom, attempting to add to DeviceManager w/o Fusion");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Notice: Cannot create room from config, key '{0}' - Is this intentional? This may be a valid configuration.", roomConfig.Key);
|
||||||
DeviceManager.AddDevice(room);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Notice: Cannot create room from config, key '{0}' - Is this intentional? This may be a valid configuration.", roomConfig.Key);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "All Rooms Loaded.");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "All Rooms Loaded.");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void CreateMobileControlBridge(EssentialsRoomBase room)
|
private static void AddRoomAndBuildMC(IEssentialsRoom room)
|
||||||
|
{
|
||||||
|
DeviceManager.AddDevice(room);
|
||||||
|
|
||||||
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge");
|
||||||
|
|
||||||
|
CreateMobileControlBridge(room);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void CreateMobileControlBridge(object room)
|
||||||
{
|
{
|
||||||
var mobileControl = GetMobileControlDevice();
|
var mobileControl = GetMobileControlDevice();
|
||||||
|
|
||||||
if (mobileControl == null) return;
|
if (mobileControl == null) return;
|
||||||
|
|
||||||
mobileControl.CreateMobileControlRoomBridge(room, mobileControl);
|
var mobileControl3 = mobileControl as IMobileControl3;
|
||||||
|
|
||||||
|
if (mobileControl3 != null)
|
||||||
|
{
|
||||||
|
mobileControl3.CreateMobileControlRoomBridge(room as IEssentialsRoom, mobileControl);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mobileControl.CreateMobileControlRoomBridge(room as EssentialsRoomBase, mobileControl);
|
||||||
|
}
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Mobile Control Bridge Added...");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Mobile Control Bridge Added...");
|
||||||
}
|
}
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Wireless Video",
|
"name": "Wireless Video",
|
||||||
"key": "wePresent-1",
|
"key": "wePresent-1",
|
||||||
"type": "wePresent",
|
"type": "genericSource",
|
||||||
"group": "genericSource",
|
"group": "genericSource",
|
||||||
"uid": 9,
|
"uid": 9,
|
||||||
"properties": {
|
"properties": {
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Wireless Video",
|
"name": "Wireless Video",
|
||||||
"key": "wePresent-1",
|
"key": "wePresent-1",
|
||||||
"type": "wePresent",
|
"type": "genericSource",
|
||||||
"properties": {},
|
"properties": {},
|
||||||
"group": "genericSource",
|
"group": "genericSource",
|
||||||
"uid": 3
|
"uid": 3
|
||||||
@@ -16,7 +16,7 @@ namespace PepperDash.Essentials.Fusion
|
|||||||
{
|
{
|
||||||
BooleanSigData CodecIsInCall;
|
BooleanSigData CodecIsInCall;
|
||||||
|
|
||||||
public EssentialsHuddleVtc1FusionController(EssentialsHuddleVtc1Room room, uint ipId, string joinMapKey)
|
public EssentialsHuddleVtc1FusionController(IEssentialsHuddleVtc1Room room, uint ipId, string joinMapKey)
|
||||||
: base(room, ipId, joinMapKey)
|
: base(room, ipId, joinMapKey)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ namespace PepperDash.Essentials.Fusion
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var codec = (Room as EssentialsHuddleVtc1Room).VideoCodec;
|
var codec = (Room as IEssentialsHuddleVtc1Room).VideoCodec;
|
||||||
|
|
||||||
if (codec == null)
|
if (codec == null)
|
||||||
{
|
{
|
||||||
@@ -141,7 +141,7 @@ namespace PepperDash.Essentials.Fusion
|
|||||||
|
|
||||||
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 EssentialsHuddleVtc1Room).VideoCodec;
|
var codec = (Room as IEssentialsHuddleVtc1Room).VideoCodec;
|
||||||
|
|
||||||
CodecIsInCall.InputSig.BoolValue = codec.IsInCall;
|
CodecIsInCall.InputSig.BoolValue = codec.IsInCall;
|
||||||
}
|
}
|
||||||
@@ -150,7 +150,7 @@ namespace PepperDash.Essentials.Fusion
|
|||||||
|
|
||||||
protected override void CreateSymbolAndBasicSigs(uint ipId)
|
protected override void CreateSymbolAndBasicSigs(uint ipId)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Creating Fusion Room symbol with GUID: {0}", RoomGuid);
|
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();
|
||||||
@@ -174,11 +174,11 @@ namespace PepperDash.Essentials.Fusion
|
|||||||
// 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 EssentialsHuddleVtc1Room).CurrentSourceChange += Room_CurrentSourceInfoChange;
|
(Room as IEssentialsHuddleVtc1Room).CurrentSourceChange += Room_CurrentSourceInfoChange;
|
||||||
|
|
||||||
|
|
||||||
FusionRoom.SystemPowerOn.OutputSig.SetSigFalseAction((Room as EssentialsHuddleVtc1Room).PowerOnToDefaultOrLastSource);
|
FusionRoom.SystemPowerOn.OutputSig.SetSigFalseAction((Room as IEssentialsHuddleVtc1Room).PowerOnToDefaultOrLastSource);
|
||||||
FusionRoom.SystemPowerOff.OutputSig.SetSigFalseAction(() => (Room as EssentialsHuddleVtc1Room).RunRouteAction("roomOff", Room.SourceListKey));
|
FusionRoom.SystemPowerOff.OutputSig.SetSigFalseAction(() => (Room as IEssentialsHuddleVtc1Room).RunRouteAction("roomOff", Room.SourceListKey));
|
||||||
|
|
||||||
|
|
||||||
CrestronEnvironment.EthernetEventHandler += CrestronEnvironment_EthernetEventHandler;
|
CrestronEnvironment.EthernetEventHandler += CrestronEnvironment_EthernetEventHandler;
|
||||||
@@ -187,7 +187,7 @@ namespace PepperDash.Essentials.Fusion
|
|||||||
protected override void SetUpSources()
|
protected override void SetUpSources()
|
||||||
{
|
{
|
||||||
// Sources
|
// Sources
|
||||||
var dict = ConfigReader.ConfigObject.GetSourceListForKey((Room as EssentialsHuddleVtc1Room).SourceListKey);
|
var dict = ConfigReader.ConfigObject.GetSourceListForKey((Room as IEssentialsHuddleVtc1Room).SourceListKey);
|
||||||
if (dict != null)
|
if (dict != null)
|
||||||
{
|
{
|
||||||
// NEW PROCESS:
|
// NEW PROCESS:
|
||||||
@@ -238,7 +238,7 @@ namespace PepperDash.Essentials.Fusion
|
|||||||
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 EssentialsHuddleVtc1Room).SourceListKey, Room.Key);
|
(Room as IEssentialsHuddleVtc1Room).SourceListKey, Room.Key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -259,7 +259,7 @@ namespace PepperDash.Essentials.Fusion
|
|||||||
display.UsageTracker.DeviceUsageEnded += new EventHandler<DeviceUsageEventArgs>(UsageTracker_DeviceUsageEnded);
|
display.UsageTracker.DeviceUsageEnded += new EventHandler<DeviceUsageEventArgs>(UsageTracker_DeviceUsageEnded);
|
||||||
}
|
}
|
||||||
|
|
||||||
var defaultDisplay = (Room as EssentialsHuddleVtc1Room).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");
|
||||||
@@ -332,7 +332,7 @@ namespace PepperDash.Essentials.Fusion
|
|||||||
string displayName = string.Format("Display {0} - ", displayIndex);
|
string displayName = string.Format("Display {0} - ", displayIndex);
|
||||||
|
|
||||||
|
|
||||||
if (display == (Room as EssentialsHuddleVtc1Room).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);
|
||||||
@@ -351,7 +351,7 @@ namespace PepperDash.Essentials.Fusion
|
|||||||
|
|
||||||
// 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 EssentialsHuddleVtc1Room).RunRouteAction("roomOff", Room.SourceListKey); }); ;
|
defaultDisplaySourceNone.OutputSig.UserObject = new Action<bool>(b => { if (!b) (Room as IEssentialsHuddleVtc1Room).RunRouteAction("roomOff", Room.SourceListKey); }); ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -71,9 +71,9 @@
|
|||||||
<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>
|
||||||
@@ -144,11 +144,14 @@
|
|||||||
<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\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\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" />
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ControlSystem>
|
<ControlSystem>
|
||||||
<Name>192.168.10.1</Name>
|
<Name>Test RMC3</Name>
|
||||||
<Address>auto 192.168.10.1</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>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user