Compare commits

...

401 Commits

Author SHA1 Message Date
Andrew Welker
5920c7c0f0 Merge pull request #242 from PepperDash/hotfix/dm-tx-chassis-bridge-fix
Add BasicDmTxControllerBase back
2020-06-11 09:49:19 -06:00
Andrew Welker
d23ef01281 Merge branch 'development' into hotfix/dm-tx-chassis-bridge-fix 2020-06-11 09:20:58 -06:00
Neil Dorin
dab153f1b0 Merge pull request #247 from PepperDash/bugfix/dm-rmc-scaler-constructor-fix
Fix DM 2-Series chassis RX build dictionary
2020-06-11 09:19:22 -06:00
Andrew Welker
c5ad321842 fixed submodule commit issue 2020-06-10 16:34:28 -06:00
Andrew Welker
c78b305faa Merge branch 'development' into hotfix/dm-tx-chassis-bridge-fix 2020-06-10 16:15:51 -06:00
Andrew Welker
a67b435565 fix DM 2-Series chassis RX build dict 2020-06-10 16:11:16 -06:00
Andrew Welker
84d8ff410e Merge pull request #248 from PepperDash/feature/implement-IStreamDebugging-on-ComPortController
Add IStreamDebugging interface to ComPortController
2020-06-10 15:58:17 -06:00
Neil Dorin
625c870072 merges latest development and updates to PD.Core 1.0.37 again. Adds concole command and method to disable stream debugging on all devices 2020-06-10 15:24:20 -06:00
Neil Dorin
c475155546 Merge remote-tracking branch 'origin/development' into feature/implement-IStreamDebugging-on-ComPortController 2020-06-10 15:18:35 -06:00
Neil Dorin
1b6669d4ef Adds more helpful debug output 2020-06-10 15:04:08 -06:00
Neil Dorin
ffbba24b5a Updates to PD.Core 1.0.37. Adds IStreamDebugging to ComPortController and adds console command to set levels 2020-06-10 15:00:09 -06:00
Andrew Welker
9bdbb1fbad Merge pull request #245 from PepperDash/hotfix/fix-dmrmc4kzscalerc-factory-name
Fix dmrmc4kzscalerc factory name
2020-06-10 13:59:39 -06:00
Alex Johnson
0465a3b9a6 Fixes name in factory for dmrmc4kzscalerc 2020-06-10 14:44:01 -04:00
Andrew Welker
a0ef356bac Fix casts in DmBladeChassisController 2020-06-09 14:40:11 -06:00
Andrew Welker
e62dd762f4 Merge pull request #239 from PepperDash/feature/AirmediaController-Add-IRoutingNumeric
Add IRoutingNumeric implementation to AirMediaController
2020-06-09 14:37:10 -06:00
Trevor Payne
9c4e4c7976 Added debug text to ExecuteNumericSwitch 2020-06-09 14:53:47 -05:00
Andrew Welker
486d6db7d8 fixes casting issues 2020-06-09 13:06:40 -06:00
Andrew Welker
81d9261a73 Changes base class to BasicDmTxControllerBase 2020-06-09 13:06:25 -06:00
Andrew Welker
2ace6ef6bc adds BasicDmTxControllerBase back in 2020-06-09 13:05:56 -06:00
Trevor Payne
7fa3031cfa Added chack for enum presence in ExecuteNumericSwitch 2020-06-09 10:59:57 -05:00
Trevor Payne
d34177482e Added IRoutingNumeric implementation to AirMediaController
Resolves #238
2020-06-09 10:47:19 -05:00
Neil Dorin
345442e195 Merge pull request #235 from PepperDash/hotfix/update-readme-to-include-4-series
Hotfix/update readme to include 4 series
2020-06-07 16:53:45 -06:00
Neil Dorin
e94e8b60a6 Bolds 4-series 2020-06-07 16:36:00 -06:00
Neil Dorin
4f4c8cba04 Update README.md 2020-06-07 16:11:17 -06:00
Andrew Welker
1be0a3cba9 Merge pull request #233 from PepperDash/feature/HdMdNxM4kEBridgeableController-Update
Update HD-MD-4xX-C-CE series join maps
2020-06-05 16:07:09 -06:00
Trevor Payne
ce513ac086 Fixed issue with HdMdNxM4kEBridgeableController related to duplicate joinMap entry
Resolves #232
2020-06-05 14:55:21 -05:00
Andrew Welker
c98cd05a5c Merge pull request #231 from PepperDash/feature/RemoteOccupancy-Info-Update
Update RemoteOccupancy Info to send data via string
2020-06-04 14:56:50 -06:00
Trevor Payne
d68645ccb0 Changes to the way the XML is built 2020-06-04 15:41:34 -05:00
Trevor Payne
9517eaa0b0 Adds proper xml string to send to RemoteOccupancyInfo
Resovles #226
2020-06-04 15:23:20 -05:00
Andrew Welker
6b140bf2d7 Merge pull request #230 from PepperDash/feature/Airmedia-Fixes
Add HDMI Output Port to AirMediaController
2020-06-04 12:46:29 -06:00
Trevor Payne
eab0d2b1d7 Added HDMI Output Port to AirMediaController
modified RoutingSignalTypes for each of the input ports to use AudioVideo when applicable

Resolves #229
2020-06-04 12:21:47 -05:00
Neil Dorin
df8a885594 Merge pull request #228 from PepperDash/bugfix/eiscapi-debug-messages
Remove unnecessary methods in EiscApi and fix debug messages
2020-06-03 19:16:28 -06:00
Andrew Welker
5ea79ac94e #227 removes unnecessary methods and fixes debug messages 2020-06-03 16:23:57 -06:00
Neil Dorin
459dc951e9 Merge pull request #225 from PepperDash/hotfix/dm-rmc4kz100-build
Fix issue building DM-RMC-4KZ-100-C & DM-TX-4KZ-202-C
2020-06-03 11:28:54 -06:00
Andrew Welker
f823abacc1 Merge branch 'development' into hotfix/dm-rmc4kz100-build 2020-06-01 23:51:10 -06:00
Andrew Welker
0a38442ac5 Merge pull request #224 from PepperDash/hotfix/dm-rmc4kz100-build
Fix issue building DM-RMC-4KZ-100-C & DM-TX-4KZ-202-C
2020-06-01 16:59:04 -06:00
Andrew Welker
083a3662e0 adds DmTx4kz202CController class
fixes errors in DmTx4kz302CController that were fixed in a previous
commit but were not merged into dev
2020-06-01 13:33:28 -06:00
Andrew Welker
37e1e50b94 #222 changes updates for EDID Feedbacks 2020-06-01 10:38:45 -06:00
Andrew Welker
f0eeae0432 Merge pull request #221 from PepperDash/feature/releaseAndMakeRoute-nullEx
Change ReleaseAndMakeRoute to use IRoutingSinkNoSwitching instead of IRoutingInputs
2020-05-28 18:32:15 -06:00
Nick Genovese
4b663eea62 -IRoutingSinkWithSwitching now inherits directly from IRoutingSink
-Marked IRoutingSinkNoSwitching as obsolete
-Updated HulldeSpace, VTCRoom, DualDisplayRoom that were casting from IRoutingSinkNoSwitching to IRoutingSink
2020-05-28 20:07:33 -04:00
Nick Genovese
8d2d45b5ce adds IRoutingSink for readability and adds a protection in ExecuteRoutes if the device happens to be IRoutingSinkWithNoSwitching and IRouting like a codec might potentially be 2020-05-28 19:37:45 -04:00
Andrew Welker
62fdd6a572 #219 changes ReleaseAndMakeRoute to IRoutingSinkNoSwitching
removes check for IRoutingSinkNoSwitching interface in GetRouteToSource
2020-05-28 17:24:24 -06:00
Nick Genovese
305fe5c372 added check when adding sink device for if the device is actually a sink 2020-05-28 14:02:43 -04:00
Andrew Welker
b39afe2f50 Merge pull request #217 from PepperDash/hotfix/genericcomm-incorrect-cast
Fix incorrect cast in GenericComm LinkToApi method
2020-05-27 10:51:26 -06:00
Neil Dorin
862610b17d Merge pull request #216 from PepperDash/hotfix/genericcomm-incorrect-cast
Fix incorrect cast in GenericComm LinkToApi method
2020-05-27 10:34:08 -06:00
Andrew Welker
43698ba839 Merge branch 'development' into hotfix/genericcomm-incorrect-cast 2020-05-27 10:33:16 -06:00
Andrew Welker
7bfc82c3cc #215 fix for incorrect cast in LinkToApi method 2020-05-27 09:50:50 -06:00
Andrew Welker
b975ce6a6d Merge pull request #214 from PepperDash/feature/Improve-JoinMetadata
Updated JoinMetadata to add Description property
2020-05-22 15:43:10 -06:00
Trevor Payne
e83acd5bfa Merge branch 'feature/Improve-JoinMetadata' of https://github.com/PepperDash/Essentials into feature/Improve-JoinMetadata 2020-05-22 15:00:51 -05:00
Trevor Payne
2f1592bc62 Added XML Comments, Obsolete Message, and backer field
#214
2020-05-22 14:56:50 -05:00
Trevor Payne
1c609764b8 Merge branch 'development' into feature/Improve-JoinMetadata 2020-05-22 13:58:30 -05:00
Trevor Payne
c7464a1e34 Merge pull request #213 from PepperDash/feature/migrate-Comm&IR
Migrated Comm & IR Folder out of Config
2020-05-22 13:57:41 -05:00
Trevor Payne
608a9068b9 Updated JoinMetadata to add Description property
Updated Hrxx0WirelessRemoteController to remove references to JoinMetadata

#198
2020-05-22 13:56:18 -05:00
Trevor Payne
e006a4616a Migrated Comm & IR Folder out of Config
#208
2020-05-21 16:02:36 -05:00
Andrew Welker
677789bec1 Merge pull request #207 from PepperDash/feature/Add-IRoutingNumeric
Added new interface IRoutingNumeric
2020-05-21 13:30:11 -06:00
Andrew Welker
0dc589f2ea Merge branch 'development' into feature/Add-IRoutingNumeric 2020-05-21 13:13:53 -06:00
Trevor Payne
aecb36e937 Added IRoutingNumeric to HdMdNxM4kEBridgeableController
#207
2020-05-21 13:45:29 -05:00
Trevor Payne
be97fe15da Added IRoutingNumeric to DmpsRoutingController
#207
2020-05-21 12:30:26 -05:00
Trevor Payne
2a7311ba50 Revised DmChassisController ExecuteNumericSwitch method
#207
2020-05-21 12:17:04 -05:00
Trevor Payne
b95c341fca Revised DmBladeChassisController ExecuteNumericSwitch method
#207
2020-05-21 12:05:25 -05:00
Andrew Welker
469d3b0975 Merge pull request #211 from PepperDash/feature/Add-Description-Attributes
Added Description Attributes to Bridgeable Classes
2020-05-21 10:18:30 -06:00
Andrew Welker
bece417bf3 Merge branch 'development' into feature/Add-Description-Attributes 2020-05-21 10:03:23 -06:00
Andrew Welker
75774d128d Merge pull request #202 from PepperDash/feature/Updates-to-rf-gateways
Improvements to Infinet Ex Support
2020-05-21 10:02:57 -06:00
Andrew Welker
430c819813 Merge branch 'development' into feature/Updates-to-rf-gateways 2020-05-21 09:46:58 -06:00
Andrew Welker
6c2d8c02c1 Merge branch 'development' into feature/Add-Description-Attributes 2020-05-21 09:38:21 -06:00
Andrew Welker
2d0876486d Merge pull request #206 from PepperDash/feature/Improve-ControlPort-Constructors
Improve Control Port Constructors
2020-05-21 09:32:03 -06:00
Trevor Payne
22427b1246 Merge branch 'development' into feature/Updates-to-rf-gateways 2020-05-20 23:30:28 -05:00
Trevor Payne
3c7495aaa1 Added Description Attributes to Bridgeable Classes
#210
2020-05-20 23:27:21 -05:00
Trevor Payne
ef4b0441d3 Added new interface IRoutingNumeric
Updated DmChassisController

Updated DmBladeChassisController

Cleaned up some redundant interface referencing in RoutingInterfaces

#192
2020-05-20 22:10:29 -05:00
Trevor Payne
190697d855 Updated IRPortHelper
Updated IrOurputPortController

#205

Please Check my work - I'm a little less confident in this one
2020-05-20 21:53:48 -05:00
Trevor Payne
19e78d649f Updated GenericDigitalInputDevice
Compatibility Update to GenericRelayDevice

#205
2020-05-20 17:07:58 -05:00
Trevor Payne
0dad34893e Updated GenericRelayDevice
#205
2020-05-20 16:44:38 -05:00
Andrew Welker
1fee896a3d Merge pull request #204 from PepperDash/hotfix/dm-tx-bridging
Hotfix/dm tx bridging
2020-05-20 14:24:54 -06:00
Trevor Payne
b6f0ccbf17 Merge branch 'development' into hotfix/dm-tx-bridging 2020-05-20 15:09:41 -05:00
Trevor Payne
f81fe3d01f Merge pull request #203 from PepperDash/hotfix/dm-tx-bridging
Hotfix/dm tx bridging
2020-05-20 15:08:44 -05:00
Trevor Payne
4f5b649b1d Updated DmTx4kz302CController
#200
2020-05-20 14:30:54 -05:00
Trevor Payne
d0ee05def9 Updated DmTx4kz100Controller
Updated DmTx4k302CController

#200
2020-05-20 14:19:19 -05:00
Trevor Payne
dd0a52c1a2 Updated dmTx402302CController
Updated DmTx4k202CController

#200
2020-05-20 14:10:27 -05:00
Trevor Payne
76abd05830 Updated DmTx4k202CController
#200
2020-05-20 13:55:37 -05:00
Trevor Payne
102535cd04 Updated DmTx401CController
#200
2020-05-20 13:42:39 -05:00
Trevor Payne
e0e9fc2ce4 Updated DmTx201SController
Added Decription Attribute to 200 and both 201 classes
2020-05-20 12:57:16 -05:00
Trevor Payne
a657525562 Updated DmTx201CController 2020-05-20 12:50:44 -05:00
Trevor Payne
10bc39ffea Merge branch 'development' into feature/Updates-to-rf-gateways
New Release includes differing github actions.
2020-05-20 11:31:31 -05:00
Trevor Payne
2a9f6e253b Resolves #201
Improvements to CenRfgwController
Addition of Button Extensions
Addition of Hrxxx0WirelessRemoteController
Addition of InfinetId to EssentialsControlPropertiesConfig
Addition of CrestronRemotePropertiesConfig
2020-05-20 11:06:18 -05:00
Andrew Welker
496b70f73f Added event handler for VgaInput.Stream
added logic to fire various feedback updates as required
2020-05-20 08:43:18 -06:00
Andrew Welker
0869961622 Merge pull request #197 from PepperDash/release/v1.5.2
1.5.2 Release
2020-05-20 08:20:58 -06:00
Andrew Welker
dedcfcbb66 Merge branch 'development' into release/v1.5.2 2020-05-19 14:55:10 -06:00
Neil Dorin
19b3c51c25 Merge pull request #196 from PepperDash/release/v1.5.2
1.5.2 Release
2020-05-19 14:53:53 -06:00
Andrew Welker
476d661ece removed duplicate method that somehow crept in... 2020-05-18 17:47:14 -06:00
Andrew Welker
546cdacc0f Merge branch 'master' into release/v1.5.2 2020-05-18 17:01:23 -06:00
Neil Dorin
b4605578ad Merge pull request #191 from PepperDash/hotfix/dm-usb-routing
Update DM USB Routing to match SIMPL Windows
2020-05-18 13:30:05 -06:00
Andrew Welker
39f25cc9db Adds GetJoinMapForDevice method back
somehow was missing from dev branch...
2020-05-18 12:43:00 -06:00
Andrew Welker
788aa33a3a Merge branch 'release/v1.5.2' into hotfix/dm-usb-routing 2020-05-18 11:36:58 -06:00
Andrew Welker
46ecb676c0 Fixes USB Routing for routing via Inputs and input to input
Also adds feedbacks for Audio Breakaway and USB Breakaway status
2020-05-18 11:32:44 -06:00
Andrew Welker
19c4428dc8 adds feedback joins for Audio & USB Breakway 2020-05-18 10:21:46 -06:00
Neil Dorin
25ddb95db5 Merge pull request #189 from PepperDash/hotfix/update-action
Updates action to login to Docker Hub
2020-05-18 09:35:56 -06:00
Andrew Welker
43ff15ff5e adds Docker login to master workflow 2020-05-18 09:13:38 -06:00
Andrew Welker
406e6a912f adds Docker Hub login to workflow 2020-05-18 08:52:08 -06:00
Andrew Welker
57f1db17c3 Added some debug statements 2020-05-15 15:45:37 -06:00
Andrew Welker
c9d97e5cae Adds support for routing In to In or Out to Out for USB for DM Chassis 2020-05-15 15:36:32 -06:00
Andrew Welker
f33763ce43 fixes bitwise comparison for routing type 2020-05-15 15:20:27 -06:00
Andrew Welker
5707d12fbe Merge pull request #187 from PepperDash/feature/HD-MD-Switch-Improvements
HD-MDNxM-4K-E Switch Improvements
2020-05-15 13:46:45 -06:00
Trevor Payne
8fe586dfec Added the original class back and changed updated class slightly; Minor changes to factory 2020-05-15 14:32:49 -05:00
Trevor Payne
696f169ea4 Adds OnlineStatus Event for Trilist to repropogate data on new connection 2020-05-15 12:12:13 -05:00
Trevor Payne
efd4f379ee Resolves #186 - Completely refactored HD-MD-Switch Class 2020-05-15 10:42:56 -05:00
Trevor Payne
aef491855c Not Complete - Still Adding Feedbacks, Bridge, and JoinMaps 2020-05-14 17:20:19 -05:00
Andrew Welker
7882210eaf Merge pull request #184 from PepperDash/feature/fix-workflow-release-mechanism
Remove release creation for alpha & beta builds
2020-05-13 12:51:33 -06:00
Andrew Welker
138628613c Merge branch 'development' into feature/fix-workflow-release-mechanism 2020-05-13 12:27:36 -06:00
Andrew Welker
a192ec3117 Merge pull request #185 from PepperDash/feature/fix-workflow-release-mechanism
Remove release creation for alpha and beta builds
2020-05-13 12:14:06 -06:00
Andrew Welker
f9ca609c1e fix to prevent branches with 'release' in the name from triggering the public repo push 2020-05-13 11:56:53 -06:00
Andrew Welker
b0a21a1c2f fixes order of operations for contains statement 2020-05-13 11:42:18 -06:00
Andrew Welker
a4339bf5a4 adjust conditions to NOT use expression syntax 2020-05-13 11:20:36 -06:00
Andrew Welker
06cc871432 fixes other comma issue... 2020-05-13 10:45:54 -06:00
Andrew Welker
45b6a09067 fixes contain statement - missed a comma 2020-05-13 10:41:27 -06:00
Andrew Welker
2085e14f24 updates workflow to only create releases for rc builds 2020-05-13 10:39:56 -06:00
Andrew Welker
912e545678 Merge pull request #179 from PepperDash/feature/Add-IHasVideoMute
Add IHasVideoMute for projector interoperability
2020-05-13 09:54:27 -06:00
Trevor Payne
efe8b15763 Updated Interfaces to be more granular 2020-05-13 10:32:01 -05:00
Trevor Payne
f2cb95af96 removed some unintentionally added text from InputInterfaces.cs 2020-05-13 09:40:45 -05:00
Trevor Payne
3bf3ac2cce resolves #178 - Addedd Requested Interface IHasVideoMute 2020-05-13 09:35:56 -05:00
Andrew Welker
55d8e6f205 Merge pull request #177 from PepperDash/feature/Improve-DGE-Trilist
Improvements to DGEController
2020-05-12 14:50:39 -06:00
Trevor Payne
4ef8e8cf14 --amend 2020-05-12 15:31:03 -05:00
Trevor Payne
e581219e32 --amend 2020-05-12 15:29:34 -05:00
Trevor Payne
d11e0db14a Refactor obsolete comport instantiation method for DGE devices 2020-05-12 15:28:00 -05:00
Trevor Payne
4c5b60bddb Exposed ICEC to DGE Controller Classes 2020-05-12 14:55:12 -05:00
Trevor Payne
0b59dbe20d Differentiation between Dge100 and DmDge200C 2020-05-12 14:20:15 -05:00
Trevor Payne
279eaaaf62 Merge branch 'development' into feature/Improve-DGE-Trilist 2020-05-12 13:46:07 -05:00
Trevor Payne
fd3e8d81f8 resolves #176 - Added IHasBasicTriListWithSmartObject to DgeController 2020-05-12 13:28:55 -05:00
Andrew Welker
1dfdca0ab4 Merge pull request #175 from PepperDash/feature/fix-DisplayJoinMap-Constructor-base
Fix DisplayControllerJoinMap Constructor
2020-05-12 12:23:16 -06:00
Trevor Payne
ba5ab18fad resolves #174 - fixed constructor issue 2020-05-12 12:13:08 -05:00
Andrew Welker
7caef808b7 Merge pull request #173 from PepperDash/feature/fix-devMan-threading
Update DeviceManager to provide protections for multiple threads or reentrancy
2020-05-12 10:10:51 -06:00
Andrew Welker
fd7f708a83 adds protections for devices doing things they shouldn't... 2020-05-12 09:49:03 -06:00
Andrew Welker
966a6c194f Adds CCriticalSection and try/finally for all Device Dictionary accesses 2020-05-12 09:49:03 -06:00
Andrew Welker
dea7edaa1f Merge pull request #172 from PepperDash/feature/Add-DmTx4kZ100C-C-1G-B-T
Add DM-TX-4KZ-100-C-1G support
2020-05-12 09:37:05 -06:00
Trevor Payne
75e74aa06b Added dmtx4k100c1g and dmtx4kz100c1g to TypeNames 2020-05-12 10:22:58 -05:00
Trevor Payne
b671f4c77e Added CEC, Comports, and IR to DmTx4kz100Controller 2020-05-12 10:12:06 -05:00
Trevor Payne
26eedb684a resolves #171 - Added DmTx4kz100C1G controller to essentials and added config values to instantiate it 2020-05-12 09:46:35 -05:00
Andrew Welker
0705c412fb Merge pull request #160 from PepperDash/feature/refactor-dm-rx-base-classes
Refactor DM RMC Classes
2020-05-11 18:20:21 -06:00
Andrew Welker
b76178990d fixes issue with merge commit and conflicts 2020-05-11 18:06:37 -06:00
Andrew Welker
c2ce9b2249 Merge branch 'development' into feature/refactor-dm-rx-base-classes 2020-05-11 15:32:27 -06:00
Neil Dorin
a1465f55ba Merge pull request #166 from PepperDash/feature/update-workflows
Update workflow to add Crestron dlls to output
2020-05-11 15:17:30 -06:00
Neil Dorin
ea4192838d Merge branch 'development' into feature/update-workflows 2020-05-11 15:04:22 -06:00
Andrew Welker
b8553bdb7c Merge pull request #159 from PepperDash/feature/add-dm-tx-video-sync-per-input
Adds new feedback type to link Dm-Tx input video sync to generic "inp…
2020-05-08 14:37:34 -06:00
Trevor Payne
6e741c4d44 Updated Joinmaps to JoinMapBaseAdvanced 2020-05-08 13:57:43 -05:00
Trevor Payne
24d9873af2 Fix Merge Issues 2020-05-08 13:45:28 -05:00
Andrew Welker
7e7159e543 Merge pull request #170 from PepperDash/feature/CENOdtOccupancySensorBase-MissingAddJoinMap
Added AddJoinMap to CenOdtOccupancySensorBaseController
2020-05-08 12:20:23 -06:00
Trevor Payne
2cc5631672 Added AddJoinMap to CenOdtOccupancySensorBaseController
resolves #167
2020-05-08 11:24:02 -05:00
Trevor Payne
4fcccfff0b Merge pull request #163 from PepperDash/feature/update-joinmaps-globally
Update PepperDash.Essentials.Core join maps to use JoinMapAdvanced
2020-05-08 11:10:20 -05:00
Andrew Welker
531bda5c7f Merge branch 'development' into feature/update-joinmaps-globally 2020-05-08 09:55:13 -06:00
Trevor Payne
04e159c1d1 Added bridge.AddJoinMap(Key, joinMap); to each LinkToApi method 2020-05-08 10:46:23 -05:00
Andrew Welker
281bfc4147 Adds *.dll to the initial file search
This is to allow for capturing Crestron .dlls and including them to make adding references from the build repo easier.
2020-05-08 09:04:54 -06:00
Andrew Welker
c6e511131b removes fetch tags step for Master branch workflow 2020-05-08 09:03:32 -06:00
Andrew Welker
88b10f7ae6 Merge pull request #164 from PepperDash/feature/ADD-CEN-ODT-OCC-SENSORS
Add CEN-ODT-C-POE Support
2020-05-08 08:49:53 -06:00
Trevor Payne
9286d5bfc4 Merge branch 'feature/ADD-CEN-ODT-OCC-SENSORS' of https://github.com/PepperDash/Essentials into feature/ADD-CEN-ODT-OCC-SENSORS
resolves #92
2020-05-07 22:24:50 -05:00
Trevor Payne
072c13459c Added CenOdtOccupancySensorBaseController;
Added CenOdtOccupancySensorBaseJoinMap
resolves #92
2020-05-07 22:23:09 -05:00
Trevor Payne
93d6bf607b Added CenOdtOccupancySensorBaseController;
Added CenOdtOccupancySensorBaseJoinMap
resolves #142
2020-05-07 22:20:38 -05:00
Trevor Payne
35effa5e82 Updated SystemMonitorController and System Monitor JoinMap;
resolves #162
2020-05-07 21:18:47 -05:00
Trevor Payne
caf5a6812b Updated StatusSignController and StatusSignControllerJoinMap 2020-05-07 17:22:54 -05:00
Trevor Payne
99c4dc2266 Updated IRSetTopBoxBase and SetTopBoxControllerJoinMap 2020-05-07 17:14:48 -05:00
Trevor Payne
1d47a60695 Updated GenericDigitalInputDevice IDigitalInputJoinMap 2020-05-07 16:44:35 -05:00
Trevor Payne
cde25c56e2 Updated MdMdxxxCEController and HdMdxxxCEControllerJoinMap 2020-05-07 16:41:43 -05:00
Trevor Payne
8da86c360c Updated GlsOccupancySensorBaseController and GlsOccupancySensorBaseJoinMap 2020-05-07 16:30:01 -05:00
Andrew Welker
53fa0c0865 updates DmRmcControllerBase 2020-05-07 14:59:52 -06:00
Andrew Welker
03cebb75ce udpates all DM 8G Receiver classes 2020-05-07 14:59:52 -06:00
Andrew Welker
fc8b4120c7 updates all DM Fiber Receiver Classes 2020-05-07 14:59:52 -06:00
Andrew Welker
5ec96310c6 Updates eRoutingSignalType AudioVideo 2020-05-07 14:59:52 -06:00
Andrew Welker
53d92555c8 refactors several RMC controller Classes 2020-05-07 14:59:52 -06:00
Andrew Welker
42b94e3a47 lots of refactoring 2020-05-07 14:59:52 -06:00
Andrew Welker
4b37d68c0e Refactors HDBaseTRxController
chagnes InputPorts and OutputPorts to not return a new collection every time they are accessed
2020-05-07 14:59:52 -06:00
Andrew Welker
b321fc7b76 removes virtual modifier on properties
updates DmHdBaseTControllerBase to use a protected field and sets the reference in the constructor

adds protected field for rmc device to DmRmcControllerBase and sets it in the constructor
2020-05-07 14:59:52 -06:00
Andrew Welker
41e9bead0b adds Flags Attribute to eRoutingSignalType 2020-05-07 14:59:52 -06:00
Andrew Welker
404f5c921b removes unnecessary usings 2020-05-07 14:59:52 -06:00
Andrew Welker
acfd82fa82 updates DmRmcHelper to use dicts
uses dicts for type lookups to make things more readable
2020-05-07 14:59:52 -06:00
Andrew Welker
e387a5534b removes unnecessary things and removes virtual keyword on properties 2020-05-07 14:59:52 -06:00
Trevor Payne
adbb76b87c Updated GenericRelayControllerJoinMap and GenericRelayDevice 2020-05-07 15:54:47 -05:00
Trevor Payne
230f29d3f8 Updated GenericLightingJoinMap, LightingBase, and LutronQuantum 2020-05-07 15:42:46 -05:00
Trevor Payne
6530856d28 Updated DmTxControllerJoinMap and DmTxControllerHelpers 2020-05-07 15:17:22 -05:00
Trevor Payne
5c560ae82f Updated DmRmcControllerJoinMap and DmRmcHelper 2020-05-07 14:29:45 -05:00
Trevor Payne
30c1b2755e Updated DmpsRoutingController and DmpsRoutingControllerJoinMap; Minor Edits to DmpsRoutingController to accomodate new joinmap span property 2020-05-07 14:21:39 -05:00
Trevor Payne
49fcb9e394 Updated DmpsAudioOutputController and DmpsAudioOutputControllerJoinMap 2020-05-07 13:52:00 -05:00
Trevor Payne
3a3ccb0acd Updated DmChassisController and DmChassisControllerJoinMap; Slightly changed DmChassisController Bridge to account for new offsets using the span property. 2020-05-07 13:31:26 -05:00
Trevor Payne
ff7a1838aa Updated DmBladeChassisController and DmBladeChassisControllerJoinMap; Slightly changed DmBladeChassisController Bridge to account for new offsets using span property 2020-05-07 12:59:33 -05:00
Trevor Payne
3a03fa31e8 Added [Obsolete] flag to Digitallogger and DigitalLoggerJoinMap. At direction of Jason A, it will be moved into a plugin and removed from essentials entirely in a future update. 2020-05-07 12:30:22 -05:00
Alex Johnson
f91930930b Changes Dm-Tx video sync feedback to be specific to port type (hdmi, dp, vga). Moves linking to Api join map into the tx specific LinkToApi() 2020-05-07 13:23:20 -04:00
Trevor Payne
d8671ea73f Updated C2nRthsController and C2nRthsControllerJoinMap 2020-05-07 11:38:41 -05:00
Trevor Payne
72ec4de912 Updated AppleTv and AppleTvJoinMap 2020-05-07 11:28:08 -05:00
Trevor Payne
b9bc3bd0f3 Updated AirMediaController and AirMediaControllerJoinMap 2020-05-07 11:19:55 -05:00
Alex Johnson
8f440c3cb9 Fixes mapping for DM-TX-401 where displayport=1 and hdmi=2 2020-05-07 11:27:07 -04:00
Alex Johnson
31536e7f97 Removes accidental duplication of code 2020-05-06 21:28:38 -04:00
ajohnson_pd
8499338fac Adds new feedback type to link Dm-Tx input video sync to generic "input1", "input2", "input3" video sync feedbacks for passing to SIMPL. Updates join map for DmTxController 2020-05-06 20:03:07 -04:00
Andrew Welker
622749a37f Merge pull request #157 from PepperDash/hotfix/fix-4kzX02-tx-audio-source-fb
Fix DM-TX-4KZ-302-C Audio feedback and routing
2020-05-06 16:27:31 -06:00
Andrew Welker
bcd7efa911 Merge branch 'master' into hotfix/fix-4kzX02-tx-audio-source-fb 2020-05-06 16:13:55 -06:00
Andrew Welker
b58b42c496 Merge pull request #156 from PepperDash/hotfix/add-dmc-4kz-hdo-support
Add dmc 4kz hdo support
2020-05-06 15:41:55 -06:00
Andrew Welker
f7a41f08c4 fixes audio source feedback and setting audio source
4kz302C does not support audio breakway routing.
2020-05-06 15:35:54 -06:00
Neil Dorin
7a7ab33fa4 Merge remote-tracking branch 'origin/hotfix/replace-getJoinMapsForDevice' into hotfix/add-dmc-4kz-hdo-support 2020-05-06 15:27:03 -06:00
Neil Dorin
dc9d285de0 Adds condition to support dmc4kzhdo output card type 2020-05-06 14:49:29 -06:00
Andrew Welker
2519fffb58 puts GetJoinMapForDevice method back into JoinMapHelper 2020-05-06 14:00:56 -06:00
Andrew Welker
3f4cc0cb26 Merge pull request #150 from PepperDash/release/v1.5.0
merge 1.5.0 back into development
2020-05-06 12:49:50 -06:00
Andrew Welker
12f8cc1c0c fixes issue with merging release/v1.5.0 into develop 2020-05-06 12:34:37 -06:00
Andrew Welker
bfa1fee522 Revert "Revert "Merge branch 'development' into release/v1.5.0""
This reverts commit 4cd01aa428.
2020-05-06 12:33:32 -06:00
Andrew Welker
4cd01aa428 Revert "Merge branch 'development' into release/v1.5.0"
This reverts commit 98c8a42d97, reversing
changes made to dc760caf71.
2020-05-06 12:30:13 -06:00
Andrew Welker
98c8a42d97 Merge branch 'development' into release/v1.5.0 2020-05-06 12:11:18 -06:00
Neil Dorin
2eacaec577 Merge pull request #149 from PepperDash/hotfix/fix-action
fixes master.yml action
2020-05-06 11:28:29 -06:00
Andrew Welker
dbec871500 fixes master.yml action...again 2020-05-06 11:13:43 -06:00
Neil Dorin
03bcb5f338 Merge pull request #148 from PepperDash/release/v1.5.0
Release v1.5.0
2020-05-06 10:59:44 -06:00
Andrew Welker
dc760caf71 Merge branch 'master' into release/v1.5.0 2020-05-06 10:46:34 -06:00
Neil Dorin
361a9caac1 Merge pull request #144 from PepperDash/feature/update-Display-Joinmap
resolves #143 - Joinmap and Bridge updated
2020-05-05 16:49:03 -06:00
Trevor Payne
e90436081a Fixes to Logging related to DisplayBase input joinmap 2020-05-05 17:32:31 -05:00
Trevor Payne
b3821e90d1 Added debug statement if there are more inputs than allowed bu the joinspan. 2020-05-05 16:49:50 -05:00
Trevor Payne
282c8b2cef Merge branch 'development' into feature/update-Display-Joinmap 2020-05-05 15:30:41 -05:00
Trevor Payne
250f62d79c Changed displayDevice.InputPorts API Linking to for loop 2020-05-05 15:14:53 -05:00
Trevor Payne
64b5bc8cb8 Added a check to verify that the number of inputs on a display is not greater than the size of the joinspan 2020-05-05 15:04:55 -05:00
Andrew Welker
6766574b38 Merge pull request #146 from PepperDash/feature/Update-IBasicCommunicationJoinMap-To-JoinMapBaseAdvanced
resolves #145 - Updated IBasicCommunicationJoinMap
2020-05-05 12:28:52 -06:00
Trevor Payne
0b660966ac resolves #145 - Updated IBasicCommunicationJoinMap 2020-05-05 12:35:01 -05:00
Trevor Payne
18c35b103e resolves #143 - Joinmap and Bridge updated 2020-05-05 12:09:53 -05:00
Andrew Welker
edb4a1f371 Merge pull request #137 from PepperDash/feature/Add_DM-RMC-4K-Z-100-C
resolves #135 - Add new controller class for DM-RMC-4K-Z-100-C
2020-04-29 13:52:16 -06:00
Andrew Welker
7a23f141fc Merge branch 'development' into feature/Add_DM-RMC-4K-Z-100-C 2020-04-29 13:07:29 -06:00
Andrew Welker
02c71f709c replaces 2 more occasions of Rm with Dm 2020-04-28 21:35:52 -06:00
Andrew Welker
b993419c3d fixes file name for 4kz100C everywhere 2020-04-28 21:20:56 -06:00
Andrew Welker
ef8a61c3eb removed duplicated logic from constructor 2020-04-28 21:12:52 -06:00
Andrew Welker
d2c8da68a5 adds todo for examining class inheritance design 2020-04-28 21:02:34 -06:00
Andrew Welker
618fa68000 removes properties in inherited class 2020-04-28 21:00:50 -06:00
Neil Dorin
64e100f839 Merge pull request #136 from PepperDash/feature/fix-version-comparisons
change plugin version comparison method to use .Net Version class
2020-04-28 17:01:26 -06:00
Andrew Welker
7991716ee2 Merge pull request #134 from PepperDash/feature/Add-DM-RMC-4KZ-SCALER-C
Feature/add dm rmc 4 kz scaler c
2020-04-28 16:17:32 -06:00
Trevor Payne
531c37c752 resolves #135 - Adds new controller class for DM-RMC-4K-Z-100-C
Extends existing controller class for RmcX100C devices and gives it additional connection metadata to report
2020-04-28 17:15:38 -05:00
Andrew Welker
c06184d973 fixes version comparison for plugin minimum versions 2020-04-28 15:59:31 -06:00
Neil Dorin
806d845750 Merge pull request #132 from PepperDash/feature/CameraBase-fix
Fix Issues with DisplayBase and CameraBase backwards compatibility
2020-04-28 14:23:38 -06:00
Andrew Welker
d0e357f4b7 adds IBridgeAdvanced at actual device level 2020-04-28 14:01:59 -06:00
Andrew Welker
15b65fb9a9 changes DisplayBase to inherit from EssentialsDevice 2020-04-28 13:55:14 -06:00
Andrew Welker
51dc215504 change CameraBase to EssentialsDevice
All internal types that derive from CameraBase now implement IBridgeAdvanced and call the protected method LinkCameraToApi for bridging
2020-04-28 12:16:24 -06:00
Andrew Welker
90c4435253 fix condition for determining if type is IBridgeAdvanced 2020-04-28 12:14:08 -06:00
Andrew Welker
44fcbf98f2 rename ConfigureComPort to RegisterAndConfigureComPort 2020-04-28 12:13:35 -06:00
Trevor Payne
79253c6b31 Fixed minor Interface Implementation Issues 2020-04-28 12:27:06 -05:00
Trevor Payne
4d433ebf22 resolve #130 Add new interface IRmcRouting
add DmRmc4kZScalerC endpoint and associated changes to bridge and joinmap
add DmRmc4kZScalerCController
2020-04-28 12:19:23 -05:00
Andrew Welker
671d506b45 moves Port registration for controller ports to ConfigureComPort
...and renames method to RegisterAndConfigureComPort
2020-04-28 08:54:38 -06:00
Neil Dorin
1acc018a81 Merge pull request #127 from PepperDash/feature/comPortController-post-activation-add
Adds ctor for ComPortController and CecPortController
2020-04-27 21:29:37 -06:00
Andrew Welker
0d33354f08 updates CommFactory to use new ctors for ComPortController
and CecPortController
2020-04-27 18:22:47 -06:00
Andrew Welker
d6d0e3cfda adds new ctor to CecPortController to add post activation func 2020-04-27 18:22:23 -06:00
Andrew Welker
282ea62f83 adds new ctor to add post activation action
for ComPortController
2020-04-27 18:21:55 -06:00
Andrew Welker
5608721e3d Merge pull request #123 from PepperDash/feature/update-to-new-device-factory-methodology
Feature/update to new device factory methodology
2020-04-23 16:22:52 -06:00
Neil Dorin
3aca786252 Merge branch 'development' into feature/update-to-new-device-factory-methodology 2020-04-23 16:10:53 -06:00
Neil Dorin
a93ded8c79 New device loading methodology working via reflection 2020-04-23 14:59:54 -06:00
Andrew Welker
06edf6c508 Merge pull request #121 from PepperDash/feature/add-ui-template
Feature/add ui template
2020-04-23 11:01:47 -06:00
Neil Dorin
96adbdb76a Adds Template UI submodule 2020-04-23 09:55:33 -06:00
Neil Dorin
911bd8daba Moves to reflection based mechanism for loading device factories at boot (not working) 2020-04-22 17:52:29 -06:00
Neil Dorin
4f6ae386b4 Finishes converting all existing types to new DeviceFactory mechanism. #106 2020-04-22 17:52:29 -06:00
Neil Dorin
2170a79399 Updating more device factories in Essentials and Devices.Common 2020-04-22 17:51:22 -06:00
Neil Dorin
902a94a82c fixes incorrect type definitions in Device Factories. 2020-04-22 17:29:31 -06:00
Andrew Welker
e55a647854 fixes types for base device Generic types 2020-04-22 17:29:31 -06:00
Neil Dorin
ae23eec005 Progress on adding Description attribute and printing types at runtime 2020-04-22 17:29:31 -06:00
Neil Dorin
c5232ca6b8 Updates device factory methodology for Essentials Core and Essential DM libraries 2020-04-22 17:29:31 -06:00
Neil Dorin
f75d884986 Merge pull request #117 from PepperDash/feature/changes-to-IBridgeAdvanced
Fixes namespace for EssentialsBridgeableDevice
2020-04-20 21:25:40 -06:00
Andrew Welker
563f690277 adds try/catch for Null Reference Exceptions 2020-04-20 12:21:18 -06:00
Andrew Welker
c7e33b5682 fixes namespaces in ControlSystem.cs 2020-04-20 10:13:23 -06:00
Andrew Welker
91963ea39b duplicated join maps in Essentials
and marks the duplicates in Essentials as Obsolete
2020-04-20 10:13:08 -06:00
Andrew Welker
072618f981 moves IBridge back to Essentials 2020-04-20 10:12:33 -06:00
Andrew Welker
7bfc3b35f6 Moves original EiscApi back to Essentials 2020-04-20 10:12:23 -06:00
Andrew Welker
204b3a4d4d adds type for EiscApiAdvanced and builder for EiscApi 2020-04-20 10:12:09 -06:00
Andrew Welker
44793f0375 removes IBridge from Essentials Core 2020-04-20 10:11:35 -06:00
Andrew Welker
6b65db55c1 Changes EiscApi to EiscApiAdvanced for internal devices 2020-04-20 10:10:50 -06:00
Andrew Welker
35b5e6dfc5 changes new EiscApi to EiscApiAdvanced 2020-04-20 09:34:07 -06:00
Andrew Welker
e52b367ef0 copys join maps back to Essentials...
...to maintain backwards compatability
2020-04-20 09:31:43 -06:00
Andrew Welker
54d31e128e removing bad namespace 2020-04-17 10:09:53 -06:00
Andrew Welker
fc9f0dc7f1 Merge branch 'development' into feature/changes-to-IBridgeAdvanced 2020-04-17 09:33:14 -06:00
Andrew Welker
827315c3cc fixes namespace for EssentialsBridgeableDevice 2020-04-17 09:31:55 -06:00
Neil Dorin
452ea52ae3 Merge pull request #116 from PepperDash/feature/changes-to-IBridgeAdvanced
Feature/changes to i bridge advanced
2020-04-16 16:59:32 -06:00
Andrew Welker
31418fd469 removes bad namespace 2020-04-16 16:16:19 -06:00
Andrew Welker
be074b5722 adds iBridge.cs 2020-04-16 15:52:48 -06:00
Andrew Welker
20e9ab8cb9 fixes issues determining Interface type 2020-04-16 15:33:44 -06:00
Andrew Welker
65881be81b moves a version of IBridge back to PepperDash Essentials 2020-04-16 15:33:29 -06:00
Andrew Welker
5329d7f931 changes to EiscApi loader 2020-04-16 14:23:24 -06:00
Andrew Welker
717b9b272c removed the added IBridge and changed...
...the namespace for IBridge in Essentials Core to match the old/existing namespace
2020-04-16 13:39:42 -06:00
Jason T Alborough
b70739ac4c Adds a reference for IBridge back into PepperDash.Essentials.Bridges that inherits from PepperDash.Essentials.Core.Bridges.IBridge for legacy plugins 2020-04-16 14:54:46 -04:00
Neil Dorin
101804656a Merge pull request #111 from PepperDash/feature/changes-to-IBridgeAdvanced
Moving JoinMaps and bridge stuff to make it easier/clearer to implement
2020-04-14 17:13:38 -06:00
Neil Dorin
4b11145f17 Merge branch 'development' into feature/changes-to-IBridgeAdvanced 2020-04-14 16:58:53 -06:00
Neil Dorin
2ee1ca974e Merge pull request #112 from PepperDash/feature/fix-master-repo-push-workflow
Fixes push actions for build repos for releases
2020-04-14 16:52:48 -06:00
Andrew Welker
1141ed192d fixes issues with push to build repos 2020-04-14 16:32:48 -06:00
Andrew Welker
08c8cbf7fe Changes base class and implements LinkToApi method 2020-04-14 16:17:54 -06:00
Andrew Welker
01bddbf2ff Changes Base Class and implements LInkToApi Method 2020-04-14 16:17:30 -06:00
Andrew Welker
33f5881e91 Changes base class and adds LinkToApi Method 2020-04-14 16:17:11 -06:00
Andrew Welker
37313040e1 Changes base class to CrestronGenericBridgeableDevice
* adds LinkToApi method
2020-04-14 16:16:43 -06:00
Andrew Welker
4102a06497 Adds ReconfigurableBridgeableDevice base class 2020-04-14 16:16:11 -06:00
Andrew Welker
0acec71a7f Changes Base class to EssentialsBridgeableDevice
* adds LinkLightingToApi Method
2020-04-14 16:15:48 -06:00
Andrew Welker
f3d8084d11 changes base class to EssentialsBridgeableDevice
* Adds LinkToApi method
2020-04-14 16:15:18 -06:00
Andrew Welker
0e211e02b8 Adds LinkToApi method 2020-04-14 16:14:42 -06:00
Andrew Welker
894a6a70bb Adds LinkToApi method and cleans up a couple of methods 2020-04-14 16:14:25 -06:00
Andrew Welker
2f17734a4c Changes base class to CrestronGenericBridgeableBaseDevice
* adds LinkToApi method
2020-04-14 16:14:04 -06:00
Andrew Welker
c10cf202de Changes base class to EssentialsBridgeableDevice
* Adds LinkToApi Method
2020-04-14 16:09:47 -06:00
Andrew Welker
459587bbb8 Changes base class to CrestronGenericBridgeableBaseDevice
* Adds LinkToApi method
2020-04-14 16:09:25 -06:00
Andrew Welker
560e7a0f04 Changes base class to CrestronGenericBridgeableBaseDevice
* adds LinkToApi method
2020-04-14 16:08:58 -06:00
Andrew Welker
0e27928a88 Changes base class to EssentialsBridgeableDevice
* adds LinkToApi method
2020-04-14 16:08:25 -06:00
Andrew Welker
c8732aa8cf Changes base class to EssentialsBridgeableDevice
* adds LinkToApi method
2020-04-14 16:08:00 -06:00
Andrew Welker
c52e31a785 changes base class and adds LinkToApi method 2020-04-14 16:07:36 -06:00
Andrew Welker
bfa27d589b Add LinkToApi method to all RMC Classes 2020-04-14 16:07:20 -06:00
Andrew Welker
02d12c1f60 Adds LinkDmRmcToApi method to base class
* changes base class to CrestronGenericBridgeableBaseDevice
2020-04-14 16:07:03 -06:00
Andrew Welker
9ed0390f79 Adds LinkToApi method to all DmTx Controller classes 2020-04-14 16:05:51 -06:00
Andrew Welker
80c1a9a46e remvoes BasicDmTxControllerBase
ALL DmTx endpoints now inherit from DmTxControllerBase. If the actual endpoint is a DmHdBasedTEndPoint, it WON'T be bridged.
2020-04-14 16:05:23 -06:00
Andrew Welker
3a5033ba4e Removes moved bridges from Essentials 2020-04-14 16:04:02 -06:00
Andrew Welker
04bbcd1d31 moves several bridges out of extension methods 2020-04-13 17:11:32 -06:00
Andrew Welker
1db9e2cc8c remove internal device joinMaps 2020-04-13 16:32:06 -06:00
Andrew Welker
41d123edf3 changes PepperDash.Essentials.Bridges to PepperDash.Essentials.Core.Bridges 2020-04-13 16:31:34 -06:00
Andrew Welker
926e3b7bc8 makex CrestronGenericBaseDevice abstract 2020-04-13 16:12:03 -06:00
Andrew Welker
999b3903b7 moves joinMaps to Essentials Core 2020-04-13 16:11:09 -06:00
Andrew Welker
cebca45877 adds EssentialsBridgeableDevice 2020-04-13 16:01:43 -06:00
Andrew Welker
31244e4294 moves bridgeBase and IBridge/IBridgeAdvanced 2020-04-13 16:01:19 -06:00
Andrew Welker
3b2b69de1b Merge pull request #103 from PepperDash/feature/ConfigWriterCCritical
#101 Fixes scope issue with CCriticalSection() in ConfigWriter
2020-04-10 15:24:53 -06:00
Jason T Alborough
29a79490ba #101 Fixes scope issue with CCriticalSection() in ConfigWriter 2020-04-10 16:29:48 -04:00
Andrew Welker
da50272980 Merge pull request #88 from PepperDash/feature/fix-get-name-attribute-issue
Feature/fix get name attribute issue
2020-04-05 09:25:28 -06:00
Neil Dorin
c8f095f0a3 Updates CameraControllerJoinMap to use new constructor for base class 2020-04-05 09:07:05 -06:00
Andrew Welker
42fbd813a2 updated methods for creating joinMap dict 2020-04-04 22:06:56 -06:00
Andrew Welker
69f5460442 trying to fix JoinMapBaseAdvanced 2020-04-04 21:09:00 -06:00
Neil Dorin
b32212083d Adds debug statment to detect if JoinNameAttribute constructor has been called 2020-04-04 14:44:43 -06:00
Neil Dorin
88702f97c6 moves logic to add joins out of the constructor and into new AddJoins() method to allow it to be called from extended class after fields have been initialized. 2020-04-04 14:12:49 -06:00
Andrew Welker
9b759daca1 Merge pull request #87 from PepperDash/feature/updated-IDeviceFactory-for-plugin-implementation
Feature/updated i device factory for plugin implementation
2020-04-04 11:27:19 -06:00
Neil Dorin
9363e94749 Updates to JoinMapBaseAdvanced constructor to properly add JoinDataComplete fields to Joins collection and to BridgeBase to implement console methods to print data at runtime. 2020-04-04 10:43:55 -06:00
Neil Dorin
6474bfa136 fixes format exception in debug statement 2020-04-03 20:07:27 -06:00
Neil Dorin
43e57ab6d1 Adds some comments, initializes JoinMaps in EiscApi and moves GenericComm factory to new methodology 2020-04-03 19:43:06 -06:00
Neil Dorin
9d7f5af26e Adds IBridgeAdvanced and updates to 1.0.35 of PepperDash.Core 2020-04-03 18:21:17 -06:00
Neil Dorin
3a101d89ea Adds some additional help 2020-04-03 18:01:08 -06:00
Neil Dorin
703695e768 Adds console method to print join maps at runtime. Adds overload of LinkToApi extension method for IBridge to allow passing the bridge in for JoinMapBaseAdvance applications 2020-04-03 09:25:48 -06:00
Neil Dorin
bb3897160b Adds a method to print the typenames to console 2020-04-01 15:57:51 -06:00
Neil Dorin
3b2ff5eed8 Merge branch 'feature/update-essentials-DM-project-name' into feature/updated-IDeviceFactory-for-plugin-implementation 2020-04-01 15:08:59 -06:00
Neil Dorin
9828e79668 Updates the name for Essentials_DM to PepperDash_Essentials_DM to ensure the .cplz name matches the .dll name 2020-04-01 15:08:24 -06:00
Neil Dorin
a231bb75a6 Adds back the correct PluginLoader version that supports loading with the new plugin methodology 2020-04-01 14:42:26 -06:00
Neil Dorin
fcc2a5db06 Updates to device factory methodology for use in plugins 2020-04-01 14:18:26 -06:00
Andrew Welker
f0010a7625 Merge pull request #84 from PepperDash/feature/ecs-1209
Feature/ecs 1209
2020-04-01 12:22:37 -06:00
Neil Dorin
294f2fd9ec Merge pull request #82 from PepperDash/bugfix/load-plugins-crash-with-no-plugins
adds missing paren that was causing build error; closes #80
2020-04-01 11:52:33 -06:00
Neil Dorin
4bf1da36e2 Moves PluginLoader to Essentials.Core. Moves IDeviceFactory and IPluginDeviceFactory interfaces to their own files in a better locatino 2020-04-01 11:32:24 -06:00
Neil Dorin
0facecc682 Merge branch 'feature/rework-plugin-loading-process-to-avoid-assembly-conflicts' into feature/ecs-1209
# Conflicts:
#	essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj
2020-04-01 11:19:30 -06:00
Neil Dorin
ed627875a0 Updates remaining SIMPL Bridges for MC to JoinMapBaseAdvanced. Updates affected bridges 2020-04-01 11:16:27 -06:00
Neil Dorin
1d00261b1f Merge remote-tracking branch 'origin/bugfix/load-plugins-crash-with-no-plugins' into feature/ecs-1209 2020-04-01 08:55:12 -06:00
Neil Dorin
e52259e750 Updated SIMPLVtcJoinMap to new join scheme 2020-03-31 20:52:05 -06:00
Andrew Welker
661b3ef9f4 fixes script to add bugfix prefix 2020-03-31 11:12:16 -06:00
Andrew Welker
dc109b3e35 temporarily adding bugfix/* to get PR to close 2020-03-31 10:53:29 -06:00
Neil Dorin
1ae93b3ffd Updates CameraControllerBridge and SIMPLCameraMessenger.cs to use new CameraControllerJoinMap 2020-03-31 10:53:24 -06:00
Andrew Welker
e0ca3ac2be adds missing paren that was causing build error 2020-03-31 10:49:53 -06:00
Andrew Welker
aaf6d0a21a Merge pull request #81 from PepperDash/bugfix/load-plugins-crash-with-no-plugins
Added condition to check for _loadedPluginsDirectoryPath when loading plugins
2020-03-30 10:52:22 -06:00
Neil Dorin
0e5052910f Merge remote-tracking branch 'origin/bugfix/load-plugins-crash-with-no-plugins' into feature/ecs-1209 2020-03-30 10:45:49 -06:00
hvolmer
b335617e37 Added condition to check for _loadedPluginsDirectoryPath when loading plugins 2020-03-27 12:52:19 -06:00
Andrew Welker
46578cb3e2 Updates constructor dictionary building & removes unneccesary usings 2020-03-27 09:23:40 -06:00
Andrew Welker
c45bf44056 modifies GetJoinForKey and GetJoinSpanForKey to be one-liners
* converts private JoinData property to readonly JoinData field and updates usages
* fixes some accidental recursiveness in JoinNameAttribute - converts Name property to auto-property
2020-03-27 09:22:44 -06:00
Andrew Welker
96a77539a1 Merge branch 'development' into feature/ecs-1209 2020-03-27 08:35:04 -06:00
Andrew Welker
1873cca375 updated new EssentialsDevice base class 2020-03-27 08:34:28 -06:00
Neil Dorin
739bd0c312 Adds JoinMapAdvanced class and updates SIMPLAtcJoinMap and SIMPLAtcMessenger accordingly 2020-03-26 21:16:28 -06:00
Neil Dorin
a403a8b81f Attempt at modifying device factory mechanism 2020-03-26 16:10:54 -06:00
Neil Dorin
ca27e01f94 Merge remote-tracking branch 'origin/development' into feature/rework-plugin-loading-process-to-avoid-assembly-conflicts 2020-03-26 14:34:42 -06:00
Neil Dorin
50d5850097 Changes to instantiate the plugin loader class from the custom plugin 2020-03-26 14:10:50 -06:00
Neil Dorin
a2ca41d965 Adds back in the plugin interfaces. Modifies PluginLoader to try new inteface method for custom plugins first, then fail back to legacy method 2020-03-26 11:59:32 -06:00
Andrew Welker
5272f84507 Merge pull request #77 from PepperDash/feature/add-docker-build-action
Feature/add docker build action
2020-03-26 11:44:42 -06:00
Andrew Welker
9a324191d8 adds builds repo push jobs to master.yml 2020-03-26 11:32:53 -06:00
Neil Dorin
a2157a9654 Merge pull request #76 from PepperDash/feature/add-docker-build-action
adds delete step to push to public repo
2020-03-26 10:26:37 -06:00
Andrew Welker
83298bb06a adds delete step to push to public repo 2020-03-26 10:07:43 -06:00
Andrew Welker
f6ef7017a2 Merge pull request #75 from PepperDash/feature/rework-plugin-loading-process-to-avoid-assembly-conflicts
Feature/rework plugin loading process to avoid assembly conflicts
2020-03-26 08:09:43 -06:00
Neil Dorin
1418e8f8c6 New PluginLoader class fully tested and functional 2020-03-25 21:25:56 -06:00
Neil Dorin
d097cfe51b Merge pull request #74 from PepperDash/feature/update-systemmonitorcontroller
Feature/update systemmonitorcontroller
2020-03-25 17:26:06 -06:00
Andrew Welker
88ea297f16 fixes parameter for Copy-Item 2020-03-25 17:05:39 -06:00
Andrew Welker
63feaac9bd fixes workflow remove step 2020-03-25 16:49:37 -06:00
Andrew Welker
c5f0bff133 adds specific file types to workflow to delete from builds repo 2020-03-25 16:23:54 -06:00
Andrew Welker
bcfd90204b adds step to copy files to root 2020-03-25 15:46:09 -06:00
Andrew Welker
475be152a7 adds debug info for ethernet information and fixes issue incrementing joins correctly 2020-03-25 15:40:29 -06:00
Andrew Welker
534110cfbf updates XML comments for bool & string feedbacks 2020-03-25 15:07:47 -06:00
Andrew Welker
cbe96dbed9 Adds XML comments to constructors for Int, String, and Bool Feedbacks 2020-03-25 15:07:47 -06:00
Andrew Welker
e2fe8834c5 adds Uptime and LastBoot console parsing and reporting
* refactored ProgramInfo routine to not send console commands for unregistered or stopped programs and inverted some if statements
2020-03-25 15:07:47 -06:00
Andrew Welker
93e542befd adds bridging for all ethernet parameters 2020-03-25 15:07:47 -06:00
Andrew Welker
3852617270 adds DhcpEnabled feedback to SystemMonitor 2020-03-25 15:07:47 -06:00
Andrew Welker
d7a04e202b adds logic to get required parameters using built-in Crestron classes 2020-03-25 15:07:46 -06:00
Andrew Welker
abd6ab121e adding logic to get the requested data 2020-03-25 15:07:46 -06:00
Andrew Welker
0c274015dd created new feedback properties and intialized them 2020-03-25 15:07:46 -06:00
Andrew Welker
ffc0f8f58e cleans up formatting 2020-03-25 15:07:46 -06:00
Andrew Welker
c47f7ba7e3 code cleanup to match new standars 2020-03-25 15:07:46 -06:00
Neil Dorin
733dbf9bd7 Moves all plugin logic to new PluginLoader static class 2020-03-25 15:04:44 -06:00
Neil Dorin
58c3c4fac7 Merge pull request #72 from PepperDash/feature/add-docker-build-action
adds logic to rename .cpz to add version...
2020-03-24 17:06:45 -06:00
Andrew Welker
82ddd40953 adds logic to rename .cpz to add version...
...& points to different repo for create release action
2020-03-24 16:55:20 -06:00
Neil Dorin
e6fb9cd1eb moving to updated informational version and setting up to unzip plugin cplz files into a folder one at a time before loading 2020-03-24 16:20:42 -06:00
Neil Dorin
830b83f99f Merge remote-tracking branch 'origin/development' into feature/ecs-1257 2020-03-23 14:55:00 -06:00
Neil Dorin
b71313248d Addresses issues causing build to fail. 2020-03-10 15:01:28 -06:00
Neil Dorin
f27b6fadb9 Merge branch 'development' into feature/ecs-1209
# Conflicts:
#	PepperDashEssentials/Room/Types/EssentialsHuddleSpaceRoom.cs
#	PepperDashEssentials/Room/Types/EssentialsHuddleVtc1Room.cs
#	essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/DspBase.cs
#	essentials-framework/Essentials Devices Common/Essentials Devices Common/Power Controllers/Digitallogger.cs
2020-03-10 14:23:17 -06:00
Neil Dorin
113b08a227 Adds ValidValues string array to JoinMetadata class for storing things like enum values or predetermined strings 2020-03-10 14:21:12 -06:00
Neil Dorin
a2ebeab839 Merge branch 'release/v1.4.33' into feature/ecs-1257
# Conflicts:
#	PepperDashEssentials/ControlSystem.cs
#	essentials-framework/Essentials Core/PepperDashEssentialsBase/Global/Global.cs
2020-02-26 10:35:56 -07:00
Neil Dorin
d81bcfba9a Attempts to address the issue of duplicate assembly .dlls being loaded via plugins 2020-02-05 17:13:27 -07:00
Neil Dorin
7f87b083cb Adds improved camera messaging to VideoCodecBaseMessenger 2020-01-16 20:12:44 -07:00
Neil Dorin
eef5c41dfe Merge remote-tracking branch 'origin/development' into feature/ecs-1209 2020-01-16 19:21:29 -07:00
Neil Dorin
dd1b15edee Fixed issues found with join numbers and speed dial iteration 2020-01-06 15:41:59 -07:00
Neil Dorin
1a44d28adb Fixes incorrect variable name 2020-01-02 16:03:09 -07:00
Neil Dorin
e218f13d45 Finished SIMPLVtcJoinMap 2020-01-02 15:59:04 -07:00
Neil Dorin
df92bdac8e Updates to SIMPLVtcJoinMap 2019-12-20 10:33:03 -07:00
Neil Dorin
51ece9daff Adds SIMPLAtcJoinMap and SIMPLVtcJoinMap and implements them on respective messengers 2019-12-19 17:11:12 -07:00
Neil Dorin
08d6090bc5 Finished converting MobileControlSIMPLRoomBridge to use new MobileControlSIMPLRoomJoinMap 2019-12-18 16:37:37 -07:00
Neil Dorin
96cd5cfe81 New JoinMap scheme working on CameraControllerJoinMap. Added MobileControlSIMPLRoomJoinMap and began implementing on MobileControlSIMPLRoomBridge 2019-12-17 21:36:47 -07:00
Neil Dorin
0d854270b6 Adds new JoinMap for CameraControllerJoinMap 2019-12-17 10:58:17 -07:00
Neil Dorin
16d5795267 Updates to JoinMapBase to support better definition of joins. 2019-12-16 13:14:37 -07:00
Neil Dorin
c54351f8ee Adds CustomUnregisterWithAppServer method to allow unregistration at runtime 2019-12-10 14:28:20 -07:00
Neil Dorin
5819ac78ec Adds properties config for SIMPL Messenger classes and adds SetupDeviceMessengers() to MobileControlDdvc01RoomBridge to add individual device messengers 2019-12-10 14:25:29 -07:00
Neil Dorin
ebc50f0caa Updates SIMPLCameraMessenger and adds SIMPLRouteMessenger 2019-12-09 16:38:25 -07:00
Neil Dorin
85f28498c4 Adds SIMPLCameraBaseMessenger 2019-12-06 16:27:25 -07:00
Neil Dorin
df192895a1 Moved messaging for new types to specifc type messengers and tested. 2019-12-05 15:43:53 -07:00
Neil Dorin
e74d8c2497 Updates to IRunRouteAction to require specification of sourceListKey 2019-12-04 22:36:25 -07:00
Neil Dorin
042c94e6cf Wrapped up CameraBaseMessenger 2019-12-03 21:54:11 -07:00
Neil Dorin
0ed613de73 Progress on CameraBaseMessenger 2019-12-01 20:50:55 -07:00
Neil Dorin
b07e85c4e7 Merge branch 'feature/ecs-1198' into feature/ecs-1194 2019-11-26 14:27:41 -07:00
Neil Dorin
3e9b67a1ad Bringes in stashed changes to camera functions 2019-11-26 14:27:17 -07:00
Neil Dorin
3b84c0e3db Adds PresetBase class and new IHasCameraPresets interface 2019-11-26 14:20:28 -07:00
267 changed files with 20119 additions and 9760 deletions

View File

@@ -39,6 +39,10 @@ switch -regex ($Env:GITHUB_REF) {
$phase = 'hotfix'
$newVersionString = "{0}.{1}.{2}-{3}-{4}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1), $phase, $Env:GITHUB_RUN_NUMBER
}
'^refs\/heads\/bugfix\/*.' {
$phase = 'hotfix'
$newVersionString = "{0}.{1}.{2}-{3}-{4}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1), $phase, $Env:GITHUB_RUN_NUMBER
}
}

View File

@@ -10,7 +10,7 @@ Get-ChildItem ($destination)
$exclusions = @(git submodule foreach --quiet 'echo $name')
# Trying to get any .json schema files (not currently working)
# Gets any files with the listed extensions.
Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include "*.clz", "*.cpz", "*.cplz" | ForEach-Object {
Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include "*.clz", "*.cpz", "*.cplz", "*.dll" | ForEach-Object {
$allowed = $true;
# Exclude any files in submodules
foreach ($exclude in $exclusions) {
@@ -26,9 +26,10 @@ Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include "*.clz", "*.cpz
} | Copy-Item -Destination ($destination) -Force
Write-Host "Getting matching files..."
# Get any files from the output folder that match the following extensions
Get-ChildItem -Path $destination | Where-Object {($_.Extension -eq ".clz") -or ($_.Extension -eq ".cpz" -or ($_.Extension -eq ".cplz"))} | ForEach-Object {
Get-ChildItem -Path $destination | Where-Object { ($_.Extension -eq ".clz") -or ($_.Extension -eq ".cpz" -or ($_.Extension -eq ".cplz")) } | ForEach-Object {
# Replace the extensions with dll and xml and create an array
$filenames = @($($_ -replace "cpz|clz|cplz", "dll"), $($_ -replace "cpz|clz|cplz", "xml"))
# Removed dll file capture, as previous step should capture all of them. Add if needed-> $($_ -replace "cpz|clz|cplz", "dll"),
$filenames = @($($_ -replace "cpz|clz|cplz", "xml"))
Write-Host "Filenames:"
Write-Host $filenames
if ($filenames.length -gt 0) {
@@ -36,6 +37,8 @@ Get-ChildItem -Path $destination | Where-Object {($_.Extension -eq ".clz") -or (
Get-ChildItem -Recurse -Path "$($Env:GITHUB_WORKSPACE)" -include $filenames | Copy-Item -Destination ($destination) -Force
}
}
Get-ChildItem -Path $destination\*.cpz | Rename-Item -NewName { "$($_.BaseName)-$($Env:VERSION)$($_.Extension)" }
Compress-Archive -Path $destination -DestinationPath "$($Env:GITHUB_WORKSPACE)\$($Env:SOLUTION_FILE)-$($Env:VERSION).zip" -Force
Write-Host "Output Contents post Zip"
Get-ChildItem -Path $destination

View File

@@ -5,12 +5,13 @@ on:
branches:
- feature/*
- hotfix/*
- bugfix/*
- release/*
- 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 name does not include extension. .sln is assumed
SOLUTION_PATH: PepperDashEssentials
SOLUTION_FILE: PepperDashEssentials
# Do not edit this, we're just creating it here
@@ -51,6 +52,12 @@ jobs:
run: |
Write-Output ${{ env.VERSION }}
./.github/scripts/UpdateAssemblyVersion.ps1 ${{ env.VERSION }}
# 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
@@ -76,9 +83,16 @@ jobs:
name: Version
path: ${{env.GITHUB_HOME}}\output\version.txt
# Create the release on the source repo
- name: Create tag for non-rc builds
if: contains(env.VERSION, 'alpha') || contains(env.VERSION, 'beta')
run: |
git tag $($Env:VERSION)
git push --tags origin
- name: Create Release
id: create_release
uses: actions/create-release@v1
# using contributor's version to allow for pointing at the right commit
if: contains(env.VERSION,'-rc-') || contains(env.VERSION,'-hotfix-')
uses: fleskesvor/create-release@feature/support-target-commitish
with:
tag_name: ${{ env.VERSION }}
release_name: ${{ env.VERSION }}
@@ -87,6 +101,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Upload the build package to the release
- name: Upload Release Package
if: contains(env.VERSION,'-rc-') || contains(env.VERSION,'-hotfix-')
id: upload_release
uses: actions/upload-release-asset@v1
with:
@@ -101,6 +116,8 @@ jobs:
needs: Build_Project
runs-on: windows-latest
steps:
- name: check Github ref
run: ${{toJson(github.ref)}}
# Checkout the repo
- name: Checkout Builds Repo
uses: actions/checkout@v2
@@ -143,6 +160,12 @@ jobs:
Remove-Item -Path .\*.zip
- name: Check directory again
run: Get-ChildItem ./
# Copy Contents of output folder to root directory
- name: Copy Files to root & delete output directory
run: |
Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz")
Get-ChildItem -Path .\output\* | Copy-Item -Destination .\
Remove-Item -Path .\output -Recurse
# Commits the build output to the branch and tags it with the version
- name: Commit build output and tag the commit
shell: powershell
@@ -170,9 +193,11 @@ jobs:
Public_Push_Output:
needs: Build_Project
runs-on: windows-latest
if: contains(github.ref, 'master') || contains(github.ref, 'release')
if: contains(github.ref, 'master') || contains(github.ref, '/release/')
steps:
# Checkout the repo
- name: check Github ref
run: ${{toJson(github.ref)}}
- name: Checkout Builds Repo
uses: actions/checkout@v2
with:
@@ -214,6 +239,12 @@ jobs:
Remove-Item -Path .\*.zip
- name: Check directory again
run: Get-ChildItem ./
# Copy Contents of output folder to root directory
- name: Copy Files to root & delete output directory
run: |
Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz")
Get-ChildItem -Path .\output\* | Copy-Item -Destination .\
Remove-Item -Path .\output -Recurse
# Commits the build output to the branch and tags it with the version
- name: Commit build output and tag the commit
shell: powershell

View File

@@ -32,9 +32,6 @@ jobs:
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
# Fetch all tags
- name: Fetch tags
run: git fetch --tags
# Generate the appropriate version number
- name: Set Version Number
shell: powershell
@@ -47,6 +44,12 @@ jobs:
run: |
Write-Output ${{ env.VERSION }}
./.github/scripts/UpdateAssemblyVersion.ps1 ${{ env.VERSION }}
# 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

View File

@@ -0,0 +1,174 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Devices.Common.Cameras;
namespace PepperDash.Essentials.AppServer.Messengers
{
public class CameraBaseMessenger : MessengerBase
{
/// <summary>
/// Device being bridged
/// </summary>
public CameraBase Camera { get; set; }
/// <summary>
/// Constructor
/// </summary>
/// <param name="key"></param>
/// <param name="camera"></param>
/// <param name="messagePath"></param>
public CameraBaseMessenger(string key, CameraBase camera, string messagePath)
: base(key, messagePath)
{
if (camera == null)
throw new ArgumentNullException("camera");
Camera = camera;
var presetsCamera = Camera as IHasCameraPresets;
if (presetsCamera != null)
{
presetsCamera.PresetsListHasChanged += new EventHandler<EventArgs>(presetsCamera_PresetsListHasChanged);
}
}
void presetsCamera_PresetsListHasChanged(object sender, EventArgs e)
{
var presetsCamera = Camera as IHasCameraPresets;
var presetList = new List<CameraPreset>();
if (presetsCamera != null)
presetList = presetsCamera.Presets;
PostStatusMessage(new
{
presets = presetList
});
}
protected override void CustomRegisterWithAppServer(MobileControlSystemController appServerController)
{
appServerController.AddAction(MessagePath + "/fullStatus", new Action(SendCameraFullMessageObject));
var ptzCamera = Camera as IHasCameraPtzControl;
if (ptzCamera != null)
{
// Need to evaluate how to pass through these P&H actions. Need a method that takes a bool maybe?
AppServerController.AddAction(MessagePath + "/cameraUp", new PressAndHoldAction((b) =>
{
if (b)
ptzCamera.TiltUp();
else
ptzCamera.TiltStop();
}));
AppServerController.AddAction(MessagePath + "/cameraDown", new PressAndHoldAction((b) =>
{
if (b)
ptzCamera.TiltDown();
else
ptzCamera.TiltStop();
}));
AppServerController.AddAction(MessagePath + "/cameraLeft", new PressAndHoldAction((b) =>
{
if (b)
ptzCamera.PanLeft();
else
ptzCamera.PanStop();
}));
AppServerController.AddAction(MessagePath + "/cameraRight", new PressAndHoldAction((b) =>
{
if (b)
ptzCamera.PanRight();
else
ptzCamera.PanStop();
}));
AppServerController.AddAction(MessagePath + "/cameraZoomIn", new PressAndHoldAction((b) =>
{
if (b)
ptzCamera.ZoomIn();
else
ptzCamera.ZoomStop();
}));
AppServerController.AddAction(MessagePath + "/cameraZoomOut", new PressAndHoldAction((b) =>
{
if (b)
ptzCamera.ZoomOut();
else
ptzCamera.ZoomStop();
}));
}
if (Camera is IHasCameraAutoMode)
{
appServerController.AddAction(MessagePath + "/cameraModeAuto", new Action((Camera as IHasCameraAutoMode).CameraAutoModeOn));
appServerController.AddAction(MessagePath + "/cameraModeManual", new Action((Camera as IHasCameraAutoMode).CameraAutoModeOff));
}
if (Camera is IPower)
{
appServerController.AddAction(MessagePath + "/cameraModeOff", new Action((Camera as IPower).PowerOff));
}
var presetsCamera = Camera as IHasCameraPresets;
if (presetsCamera != null)
{
for(int i = 1; i <= 6; i++)
{
var preset = i;
appServerController.AddAction(MessagePath + "/cameraPreset" + i, new Action<int>((p) => presetsCamera.PresetSelect(preset)));
}
}
}
/// <summary>
/// Helper method to update the full status of the camera
/// </summary>
void SendCameraFullMessageObject()
{
var presetsCamera = Camera as IHasCameraPresets;
var presetList = new List<CameraPreset>();
if (presetsCamera != null)
presetList = presetsCamera.Presets;
PostStatusMessage(new
{
cameraMode = GetCameraMode(),
hasPresets = Camera is IHasCameraPresets,
presets = presetList
});
}
/// <summary>
/// Computes the current camera mode
/// </summary>
/// <returns></returns>
string GetCameraMode()
{
string m;
if (Camera is IHasCameraAutoMode && (Camera as IHasCameraAutoMode).CameraAutoModeIsOnFeedback.BoolValue)
m = eCameraControlMode.Auto.ToString().ToLower();
else if (Camera is IPower && !(Camera as IPower).PowerIsOnFeedback.BoolValue)
m = eCameraControlMode.Off.ToString().ToLower();
else
m = eCameraControlMode.Manual.ToString().ToLower();
return m;
}
}
}

View File

@@ -1,216 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharpPro.EthernetCommunication;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Devices.Common.Codec;
namespace PepperDash.Essentials.AppServer.Messengers
{
public class Ddvc01AtcMessenger : MessengerBase
{
BasicTriList EISC;
/// <summary>
/// 221
/// </summary>
const uint BDialHangupOnHook = 221;
/// <summary>
/// 251
/// </summary>
const uint BIncomingAnswer = 251;
/// <summary>
/// 252
/// </summary>
const uint BIncomingReject = 252;
/// <summary>
/// 241
/// </summary>
const uint BSpeedDial1 = 241;
/// <summary>
/// 242
/// </summary>
const uint BSpeedDial2 = 242;
/// <summary>
/// 243
/// </summary>
const uint BSpeedDial3 = 243;
/// <summary>
/// 244
/// </summary>
const uint BSpeedDial4 = 244;
/// <summary>
/// 201
/// </summary>
const uint SCurrentDialString = 201;
/// <summary>
/// 211
/// </summary>
const uint SCurrentCallNumber = 211;
/// <summary>
/// 212
/// </summary>
const uint SCurrentCallName = 212;
/// <summary>
/// 221
/// </summary>
const uint SHookState = 221;
/// <summary>
/// 222
/// </summary>
const uint SCallDirection = 222;
/// <summary>
/// 201-212 0-9*#
/// </summary>
Dictionary<string, uint> DTMFMap = new Dictionary<string, uint>
{
{ "1", 201 },
{ "2", 202 },
{ "3", 203 },
{ "4", 204 },
{ "5", 205 },
{ "6", 206 },
{ "7", 207 },
{ "8", 208 },
{ "9", 209 },
{ "0", 210 },
{ "*", 211 },
{ "#", 212 },
};
/// <summary>
///
/// </summary>
CodecActiveCallItem CurrentCallItem;
/// <summary>
///
/// </summary>
/// <param name="eisc"></param>
/// <param name="messagePath"></param>
public Ddvc01AtcMessenger(string key, BasicTriList eisc, string messagePath)
: base(key, messagePath)
{
EISC = eisc;
CurrentCallItem = new CodecActiveCallItem();
CurrentCallItem.Type = eCodecCallType.Audio;
CurrentCallItem.Id = "-audio-";
}
/// <summary>
///
/// </summary>
void SendFullStatus()
{
this.PostStatusMessage(new
{
calls = GetCurrentCallList(),
currentCallString = EISC.GetString(SCurrentCallNumber),
currentDialString = EISC.GetString(SCurrentDialString),
isInCall = EISC.GetString(SHookState) == "Connected"
});
}
/// <summary>
///
/// </summary>
/// <param name="appServerController"></param>
protected override void CustomRegisterWithAppServer(MobileControlSystemController appServerController)
{
//EISC.SetStringSigAction(SCurrentDialString, s => PostStatusMessage(new { currentDialString = s }));
EISC.SetStringSigAction(SHookState, s =>
{
CurrentCallItem.Status = (eCodecCallStatus)Enum.Parse(typeof(eCodecCallStatus), s, true);
//GetCurrentCallList();
SendFullStatus();
});
EISC.SetStringSigAction(SCurrentCallNumber, s =>
{
CurrentCallItem.Number = s;
SendCallsList();
});
EISC.SetStringSigAction(SCurrentCallName, s =>
{
CurrentCallItem.Name = s;
SendCallsList();
});
EISC.SetStringSigAction(SCallDirection, s =>
{
CurrentCallItem.Direction = (eCodecCallDirection)Enum.Parse(typeof(eCodecCallDirection), s, true);
SendCallsList();
});
// Add press and holds using helper
Action<string, uint> addPHAction = (s, u) =>
AppServerController.AddAction(MessagePath + s, new PressAndHoldAction(b => EISC.SetBool(u, b)));
// Add straight pulse calls
Action<string, uint> addAction = (s, u) =>
AppServerController.AddAction(MessagePath + s, new Action(() => EISC.PulseBool(u, 100)));
addAction("/endCallById", BDialHangupOnHook);
addAction("/endAllCalls", BDialHangupOnHook);
addAction("/acceptById", BIncomingAnswer);
addAction("/rejectById", BIncomingReject);
addAction("/speedDial1", BSpeedDial1);
addAction("/speedDial2", BSpeedDial2);
addAction("/speedDial3", BSpeedDial3);
addAction("/speedDial4", BSpeedDial4);
// Get status
AppServerController.AddAction(MessagePath + "/fullStatus", new Action(SendFullStatus));
// Dial on string
AppServerController.AddAction(MessagePath + "/dial", new Action<string>(s => EISC.SetString(SCurrentDialString, s)));
// Pulse DTMF
AppServerController.AddAction(MessagePath + "/dtmf", new Action<string>(s =>
{
if (DTMFMap.ContainsKey(s))
{
EISC.PulseBool(DTMFMap[s], 100);
}
}));
}
/// <summary>
///
/// </summary>
void SendCallsList()
{
PostStatusMessage(new
{
calls = GetCurrentCallList(),
});
}
/// <summary>
/// Turns the
/// </summary>
/// <returns></returns>
List<CodecActiveCallItem> GetCurrentCallList()
{
if (CurrentCallItem.Status == eCodecCallStatus.Disconnected)
{
return new List<CodecActiveCallItem>();
}
else
{
return new List<CodecActiveCallItem>() { CurrentCallItem };
}
}
}
}

View File

@@ -1,648 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharpPro.EthernetCommunication;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Devices.Common.Codec;
namespace PepperDash.Essentials.AppServer.Messengers
{
public class Ddvc01VtcMessenger : MessengerBase
{
BasicTriList EISC;
/********* Bools *********/
/// <summary>
/// 724
/// </summary>
const uint BDialHangup = 724;
/// <summary>
/// 750
/// </summary>
const uint BCallIncoming = 750;
/// <summary>
/// 751
/// </summary>
const uint BIncomingAnswer = 751;
/// <summary>
/// 752
/// </summary>
const uint BIncomingReject = 752;
/// <summary>
/// 741
/// </summary>
const uint BSpeedDial1 = 741;
/// <summary>
/// 742
/// </summary>
const uint BSpeedDial2 = 742;
/// <summary>
/// 743
/// </summary>
const uint BSpeedDial3 = 743;
/// <summary>
/// 744
/// </summary>
const uint BSpeedDial4 = 744;
/// <summary>
/// 800
/// </summary>
const uint BDirectorySearchBusy = 800;
/// <summary>
/// 801
/// </summary>
const uint BDirectoryLineSelected = 801;
/// <summary>
/// 801 when selected entry is a contact
/// </summary>
const uint BDirectoryEntryIsContact = 801;
/// <summary>
/// 802 To show/hide back button
/// </summary>
const uint BDirectoryIsRoot = 802;
/// <summary>
/// 803 Pulse from system to inform us when directory is ready
/// </summary>
const uint DDirectoryHasChanged = 803;
/// <summary>
/// 804
/// </summary>
const uint BDirectoryRoot = 804;
/// <summary>
/// 805
/// </summary>
const uint BDirectoryFolderBack = 805;
/// <summary>
/// 806
/// </summary>
const uint BDirectoryDialSelectedLine = 806;
/// <summary>
/// 811
/// </summary>
const uint BCameraControlUp = 811;
/// <summary>
/// 812
/// </summary>
const uint BCameraControlDown = 812;
/// <summary>
/// 813
/// </summary>
const uint BCameraControlLeft = 813;
/// <summary>
/// 814
/// </summary>
const uint BCameraControlRight = 814;
/// <summary>
/// 815
/// </summary>
const uint BCameraControlZoomIn = 815;
/// <summary>
/// 816
/// </summary>
const uint BCameraControlZoomOut = 816;
/// <summary>
/// 821 - 826
/// </summary>
const uint BCameraPresetStart = 821;
/// <summary>
/// 831
/// </summary>
const uint BCameraModeAuto = 831;
/// <summary>
/// 832
/// </summary>
const uint BCameraModeManual = 832;
/// <summary>
/// 833
/// </summary>
const uint BCameraModeOff = 833;
/// <summary>
/// 841
/// </summary>
const uint BCameraSelfView = 841;
/// <summary>
/// 842
/// </summary>
const uint BCameraLayout = 842;
/// <summary>
/// 843
/// </summary>
const uint BCameraSupportsAutoMode = 843;
/// <summary>
/// 844
/// </summary>
const uint BCameraSupportsOffMode = 844;
/********* Ushorts *********/
/// <summary>
/// 760
/// </summary>
const uint UCameraNumberSelect = 760;
/// <summary>
/// 801
/// </summary>
const uint UDirectorySelectRow = 801;
/// <summary>
/// 801
/// </summary>
const uint UDirectoryRowCount = 801;
/********* Strings *********/
/// <summary>
/// 701
/// </summary>
const uint SCurrentDialString = 701;
/// <summary>
/// 702
/// </summary>
const uint SCurrentCallName = 702;
/// <summary>
/// 703
/// </summary>
const uint SCurrentCallNumber = 703;
/// <summary>
/// 731
/// </summary>
const uint SHookState = 731;
/// <summary>
/// 722
/// </summary>
const uint SCallDirection = 722;
/// <summary>
/// 751
/// </summary>
const uint SIncomingCallName = 751;
/// <summary>
/// 752
/// </summary>
const uint SIncomingCallNumber = 752;
/// <summary>
/// 800
/// </summary>
const uint SDirectorySearchString = 800;
/// <summary>
/// 801-1055
/// </summary>
const uint SDirectoryEntriesStart = 801;
/// <summary>
/// 1056
/// </summary>
const uint SDirectoryEntrySelectedName = 1056;
/// <summary>
/// 1057
/// </summary>
const uint SDirectoryEntrySelectedNumber = 1057;
/// <summary>
/// 1058
/// </summary>
const uint SDirectorySelectedFolderName = 1058;
/// <summary>
/// 701-712 0-9*#
/// </summary>
Dictionary<string, uint> DTMFMap = new Dictionary<string, uint>
{
{ "1", 701 },
{ "2", 702 },
{ "3", 703 },
{ "4", 704 },
{ "5", 705 },
{ "6", 706 },
{ "7", 707 },
{ "8", 708 },
{ "9", 709 },
{ "0", 710 },
{ "*", 711 },
{ "#", 712 },
};
CodecActiveCallItem CurrentCallItem;
CodecActiveCallItem IncomingCallItem;
ushort PreviousDirectoryLength = 0;
/// <summary>
///
/// </summary>
/// <param name="eisc"></param>
/// <param name="messagePath"></param>
public Ddvc01VtcMessenger(string key, BasicTriList eisc, string messagePath)
: base(key, messagePath)
{
EISC = eisc;
CurrentCallItem = new CodecActiveCallItem();
CurrentCallItem.Type = eCodecCallType.Video;
CurrentCallItem.Id = "-video-";
}
/// <summary>
///
/// </summary>
/// <param name="appServerController"></param>
protected override void CustomRegisterWithAppServer(MobileControlSystemController appServerController)
{
var asc = appServerController;
EISC.SetStringSigAction(SHookState, s =>
{
CurrentCallItem.Status = (eCodecCallStatus)Enum.Parse(typeof(eCodecCallStatus), s, true);
PostFullStatus(); // SendCallsList();
});
EISC.SetStringSigAction(SCurrentCallNumber, s =>
{
CurrentCallItem.Number = s;
PostCallsList();
});
EISC.SetStringSigAction(SCurrentCallName, s =>
{
CurrentCallItem.Name = s;
PostCallsList();
});
EISC.SetStringSigAction(SCallDirection, s =>
{
CurrentCallItem.Direction = (eCodecCallDirection)Enum.Parse(typeof(eCodecCallDirection), s, true);
PostCallsList();
});
EISC.SetBoolSigAction(BCallIncoming, b =>
{
if (b)
{
var ica = new CodecActiveCallItem()
{
Direction = eCodecCallDirection.Incoming,
Id = "-video-incoming",
Name = EISC.GetString(SIncomingCallName),
Number = EISC.GetString(SIncomingCallNumber),
Status = eCodecCallStatus.Ringing,
Type = eCodecCallType.Video
};
IncomingCallItem = ica;
}
else
{
IncomingCallItem = null;
}
PostCallsList();
});
EISC.SetBoolSigAction(BCameraSupportsAutoMode, b =>
{
PostStatusMessage(new
{
cameraSupportsAutoMode = b
});
});
EISC.SetBoolSigAction(BCameraSupportsOffMode, b =>
{
PostStatusMessage(new
{
cameraSupportsOffMode = b
});
});
// Directory insanity
EISC.SetUShortSigAction(UDirectoryRowCount, u =>
{
// The length of the list comes in before the list does.
// Splice the sig change operation onto the last string sig that will be changing
// when the directory entries make it through.
if (PreviousDirectoryLength > 0)
{
EISC.ClearStringSigAction(SDirectoryEntriesStart + PreviousDirectoryLength - 1);
}
EISC.SetStringSigAction(SDirectoryEntriesStart + u - 1, s => PostDirectory());
PreviousDirectoryLength = u;
});
EISC.SetStringSigAction(SDirectoryEntrySelectedName, s =>
{
PostStatusMessage(new
{
directoryContactSelected = new
{
name = EISC.GetString(SDirectoryEntrySelectedName),
}
});
});
EISC.SetStringSigAction(SDirectoryEntrySelectedNumber, s =>
{
PostStatusMessage(new
{
directoryContactSelected = new
{
number = EISC.GetString(SDirectoryEntrySelectedNumber),
}
});
});
EISC.SetStringSigAction(SDirectorySelectedFolderName, s => PostStatusMessage(new
{
directorySelectedFolderName = EISC.GetString(SDirectorySelectedFolderName)
}));
EISC.SetSigTrueAction(BCameraModeAuto, () => PostCameraMode());
EISC.SetSigTrueAction(BCameraModeManual, () => PostCameraMode());
EISC.SetSigTrueAction(BCameraModeOff, () => PostCameraMode());
EISC.SetBoolSigAction(BCameraSelfView, b => PostStatusMessage(new
{
cameraSelfView = b
}));
EISC.SetUShortSigAction(UCameraNumberSelect, (u) => PostSelectedCamera());
// Add press and holds using helper action
Action<string, uint> addPHAction = (s, u) =>
AppServerController.AddAction(MessagePath + s, new PressAndHoldAction(b => EISC.SetBool(u, b)));
addPHAction("/cameraUp", BCameraControlUp);
addPHAction("/cameraDown", BCameraControlDown);
addPHAction("/cameraLeft", BCameraControlLeft);
addPHAction("/cameraRight", BCameraControlRight);
addPHAction("/cameraZoomIn", BCameraControlZoomIn);
addPHAction("/cameraZoomOut", BCameraControlZoomOut);
// Add straight pulse calls using helper action
Action<string, uint> addAction = (s, u) =>
AppServerController.AddAction(MessagePath + s, new Action(() => EISC.PulseBool(u, 100)));
addAction("/endCallById", BDialHangup);
addAction("/endAllCalls", BDialHangup);
addAction("/acceptById", BIncomingAnswer);
addAction("/rejectById", BIncomingReject);
addAction("/speedDial1", BSpeedDial1);
addAction("/speedDial2", BSpeedDial2);
addAction("/speedDial3", BSpeedDial3);
addAction("/speedDial4", BSpeedDial4);
addAction("/cameraModeAuto", BCameraModeAuto);
addAction("/cameraModeManual", BCameraModeManual);
addAction("/cameraModeOff", BCameraModeOff);
addAction("/cameraSelfView", BCameraSelfView);
addAction("/cameraLayout", BCameraLayout);
asc.AddAction("/cameraSelect", new Action<string>(SelectCamera));
// camera presets
for(uint i = 0; i < 6; i++)
{
addAction("/cameraPreset" + (i + 1), BCameraPresetStart + i);
}
asc.AddAction(MessagePath + "/isReady", new Action(PostIsReady));
// Get status
asc.AddAction(MessagePath + "/fullStatus", new Action(PostFullStatus));
// Dial on string
asc.AddAction(MessagePath + "/dial", new Action<string>(s =>
EISC.SetString(SCurrentDialString, s)));
// Pulse DTMF
asc.AddAction(MessagePath + "/dtmf", new Action<string>(s =>
{
if (DTMFMap.ContainsKey(s))
{
EISC.PulseBool(DTMFMap[s], 100);
}
}));
// Directory madness
asc.AddAction(MessagePath + "/directoryRoot", new Action(() => EISC.PulseBool(BDirectoryRoot)));
asc.AddAction(MessagePath + "/directoryBack", new Action(() => EISC.PulseBool(BDirectoryFolderBack)));
asc.AddAction(MessagePath + "/directoryById", new Action<string>(s =>
{
// the id should contain the line number to forward to simpl
try
{
var u = ushort.Parse(s);
EISC.SetUshort(UDirectorySelectRow, u);
EISC.PulseBool(BDirectoryLineSelected);
}
catch (Exception)
{
Debug.Console(1, this, Debug.ErrorLogLevel.Warning,
"/directoryById request contains non-numeric ID incompatible with DDVC bridge");
}
}));
asc.AddAction(MessagePath + "/directorySelectContact", new Action<string>(s =>
{
try
{
var u = ushort.Parse(s);
EISC.SetUshort(UDirectorySelectRow, u);
EISC.PulseBool(BDirectoryLineSelected);
}
catch
{
}
}));
asc.AddAction(MessagePath + "/directoryDialContact", new Action(() => {
EISC.PulseBool(BDirectoryDialSelectedLine);
}));
asc.AddAction(MessagePath + "/getDirectory", new Action(() =>
{
if (EISC.GetUshort(UDirectoryRowCount) > 0)
{
PostDirectory();
}
else
{
EISC.PulseBool(BDirectoryRoot);
}
}));
}
/// <summary>
///
/// </summary>
void PostFullStatus()
{
this.PostStatusMessage(new
{
calls = GetCurrentCallList(),
cameraMode = GetCameraMode(),
cameraSelfView = EISC.GetBool(BCameraSelfView),
cameraSupportsAutoMode = EISC.GetBool(BCameraSupportsAutoMode),
cameraSupportsOffMode = EISC.GetBool(BCameraSupportsOffMode),
currentCallString = EISC.GetString(SCurrentCallNumber),
currentDialString = EISC.GetString(SCurrentDialString),
directoryContactSelected = new
{
name = EISC.GetString(SDirectoryEntrySelectedName),
number = EISC.GetString(SDirectoryEntrySelectedNumber)
},
directorySelectedFolderName = EISC.GetString(SDirectorySelectedFolderName),
isInCall = EISC.GetString(SHookState) == "Connected",
hasDirectory = true,
hasDirectorySearch = false,
hasRecents = !EISC.BooleanOutput[502].BoolValue,
hasCameras = true,
showCamerasWhenNotInCall = EISC.BooleanOutput[503].BoolValue,
selectedCamera = GetSelectedCamera(),
});
}
/// <summary>
///
/// </summary>
void PostDirectory()
{
var u = EISC.GetUshort(UDirectoryRowCount);
var items = new List<object>();
for (uint i = 0; i < u; i++)
{
var name = EISC.GetString(SDirectoryEntriesStart + i);
var id = (i + 1).ToString();
// is folder or contact?
if (name.StartsWith("[+]"))
{
items.Add(new
{
folderId = id,
name = name
});
}
else
{
items.Add(new
{
contactId = id,
name = name
});
}
}
var directoryMessage = new
{
currentDirectory = new
{
isRootDirectory = EISC.GetBool(BDirectoryIsRoot),
directoryResults = items
}
};
PostStatusMessage(directoryMessage);
}
/// <summary>
///
/// </summary>
void PostCameraMode()
{
PostStatusMessage(new
{
cameraMode = GetCameraMode()
});
}
/// <summary>
///
/// </summary>
/// <param name="mode"></param>
string GetCameraMode()
{
string m;
if (EISC.GetBool(BCameraModeAuto)) m = "auto";
else if (EISC.GetBool(BCameraModeManual)) m = "manual";
else m = "off";
return m;
}
void PostSelectedCamera()
{
PostStatusMessage(new
{
selectedCamera = GetSelectedCamera()
});
}
/// <summary>
///
/// </summary>
string GetSelectedCamera()
{
var num = EISC.GetUshort(UCameraNumberSelect);
string m;
if (num == 100)
{
m = "cameraFar";
}
else
{
m = "camera" + num;
}
return m;
}
/// <summary>
///
/// </summary>
void PostIsReady()
{
PostStatusMessage(new
{
isReady = true
});
}
/// <summary>
///
/// </summary>
void PostCallsList()
{
PostStatusMessage(new
{
calls = GetCurrentCallList(),
});
}
/// <summary>
///
/// </summary>
/// <param name="s"></param>
void SelectCamera(string s)
{
var cam = s.Substring(6);
if (cam.ToLower() == "far")
{
EISC.SetUshort(UCameraNumberSelect, 100);
}
else
{
EISC.SetUshort(UCameraNumberSelect, UInt16.Parse(cam));
}
}
/// <summary>
/// Turns the
/// </summary>
/// <returns></returns>
List<CodecActiveCallItem> GetCurrentCallList()
{
var list = new List<CodecActiveCallItem>();
if (CurrentCallItem.Status != eCodecCallStatus.Disconnected)
{
list.Add(CurrentCallItem);
}
if (EISC.GetBool(BCallIncoming)) {
}
return list;
}
}
}

View File

@@ -0,0 +1,81 @@
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.AppServer.Messengers
{
public class IRunRouteActionMessenger : MessengerBase
{
/// <summary>
/// Device being bridged
/// </summary>
public IRunRouteAction RoutingDevice {get; private set;}
public IRunRouteActionMessenger(string key, IRunRouteAction routingDevice, string messagePath)
: base(key, messagePath)
{
if (routingDevice == null)
throw new ArgumentNullException("routingDevice");
RoutingDevice = routingDevice;
var routingSink = RoutingDevice as IRoutingSinkNoSwitching;
if (routingSink != null)
{
routingSink.CurrentSourceChange += new SourceInfoChangeHandler(routingSink_CurrentSourceChange);
}
}
void routingSink_CurrentSourceChange(SourceListItem info, ChangeType type)
{
SendRoutingFullMessageObject();
}
protected override void CustomRegisterWithAppServer(MobileControlSystemController appServerController)
{
appServerController.AddAction(MessagePath + "/fullStatus", new Action(SendRoutingFullMessageObject));
appServerController.AddAction(MessagePath + "/source", new Action<SourceSelectMessageContent>(c =>
{
RoutingDevice.RunRouteAction(c.SourceListItem, c.SourceListKey);
}));
var sinkDevice = RoutingDevice as IRoutingSinkNoSwitching;
if(sinkDevice != null)
{
sinkDevice.CurrentSourceChange += new SourceInfoChangeHandler((o, a) =>
{
SendRoutingFullMessageObject();
});
}
}
/// <summary>
/// Helper method to update full status of the routing device
/// </summary>
void SendRoutingFullMessageObject()
{
var sinkDevice = RoutingDevice as IRoutingSinkNoSwitching;
if(sinkDevice != null)
{
var sourceKey = sinkDevice.CurrentSourceInfoKey;
if (string.IsNullOrEmpty(sourceKey))
sourceKey = "none";
PostStatusMessage(new
{
selectedSourceKey = sourceKey
});
}
}
}
}

View File

@@ -0,0 +1,230 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharpPro.EthernetCommunication;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Devices.Common.Codec;
namespace PepperDash.Essentials.AppServer.Messengers
{
public class SIMPLAtcMessenger : MessengerBase
{
BasicTriList EISC;
public SIMPLAtcJoinMap JoinMap {get; private set;}
///// <summary>
///// 221
///// </summary>
//const uint BDialHangupOnHook = 221;
///// <summary>
///// 251
///// </summary>
//const uint BIncomingAnswer = 251;
///// <summary>
///// 252
///// </summary>
//const uint BIncomingReject = 252;
///// <summary>
///// 241
///// </summary>
//const uint BSpeedDial1 = 241;
///// <summary>
///// 242
///// </summary>
//const uint BSpeedDial2 = 242;
///// <summary>
///// 243
///// </summary>
//const uint BSpeedDial3 = 243;
///// <summary>
///// 244
///// </summary>
//const uint BSpeedDial4 = 244;
///// <summary>
///// 201
///// </summary>
//const uint SCurrentDialString = 201;
///// <summary>
///// 211
///// </summary>
//const uint SCurrentCallNumber = 211;
///// <summary>
///// 212
///// </summary>
//const uint SCurrentCallName = 212;
///// <summary>
///// 221
///// </summary>
//const uint SHookState = 221;
///// <summary>
///// 222
///// </summary>
//const uint SCallDirection = 222;
///// <summary>
///// 201-212 0-9*#
///// </summary>
//Dictionary<string, uint> DTMFMap = new Dictionary<string, uint>
//{
// { "1", 201 },
// { "2", 202 },
// { "3", 203 },
// { "4", 204 },
// { "5", 205 },
// { "6", 206 },
// { "7", 207 },
// { "8", 208 },
// { "9", 209 },
// { "0", 210 },
// { "*", 211 },
// { "#", 212 },
//};
/// <summary>
///
/// </summary>
CodecActiveCallItem CurrentCallItem;
/// <summary>
///
/// </summary>
/// <param name="eisc"></param>
/// <param name="messagePath"></param>
public SIMPLAtcMessenger(string key, BasicTriList eisc, string messagePath)
: base(key, messagePath)
{
EISC = eisc;
JoinMap = new SIMPLAtcJoinMap(201);
CurrentCallItem = new CodecActiveCallItem();
CurrentCallItem.Type = eCodecCallType.Audio;
CurrentCallItem.Id = "-audio-";
}
/// <summary>
///
/// </summary>
void SendFullStatus()
{
this.PostStatusMessage(new
{
calls = GetCurrentCallList(),
currentCallString = EISC.GetString(JoinMap.CurrentCallName.JoinNumber),
currentDialString = EISC.GetString(JoinMap.CurrentDialString.JoinNumber),
isInCall = EISC.GetString(JoinMap.HookState.JoinNumber) == "Connected"
});
}
/// <summary>
///
/// </summary>
/// <param name="appServerController"></param>
protected override void CustomRegisterWithAppServer(MobileControlSystemController appServerController)
{
//EISC.SetStringSigAction(SCurrentDialString, s => PostStatusMessage(new { currentDialString = s }));
EISC.SetStringSigAction(JoinMap.HookState.JoinNumber, s =>
{
CurrentCallItem.Status = (eCodecCallStatus)Enum.Parse(typeof(eCodecCallStatus), s, true);
//GetCurrentCallList();
SendFullStatus();
});
EISC.SetStringSigAction(JoinMap.CurrentCallNumber.JoinNumber, s =>
{
CurrentCallItem.Number = s;
SendCallsList();
});
EISC.SetStringSigAction(JoinMap.CurrentCallName.JoinNumber, s =>
{
CurrentCallItem.Name = s;
SendCallsList();
});
EISC.SetStringSigAction(JoinMap.CallDirection.JoinNumber, s =>
{
CurrentCallItem.Direction = (eCodecCallDirection)Enum.Parse(typeof(eCodecCallDirection), s, true);
SendCallsList();
});
// Add press and holds using helper
Action<string, uint> addPHAction = (s, u) =>
AppServerController.AddAction(MessagePath + s, new PressAndHoldAction(b => EISC.SetBool(u, b)));
// Add straight pulse calls
Action<string, uint> addAction = (s, u) =>
AppServerController.AddAction(MessagePath + s, new Action(() => EISC.PulseBool(u, 100)));
addAction("/endCallById", JoinMap.EndCall.JoinNumber);
addAction("/endAllCalls", JoinMap.EndCall.JoinNumber);
addAction("/acceptById", JoinMap.IncomingAnswer.JoinNumber);
addAction("/rejectById", JoinMap.IncomingReject.JoinNumber);
var speeddialStart = JoinMap.SpeedDialStart.JoinNumber;
var speeddialEnd = JoinMap.SpeedDialStart.JoinNumber + JoinMap.SpeedDialStart.JoinSpan;
var speedDialIndex = 1;
for (uint i = speeddialStart; i < speeddialEnd; i++)
{
addAction(string.Format("/speedDial{0}", speedDialIndex), i);
speedDialIndex++;
}
// Get status
AppServerController.AddAction(MessagePath + "/fullStatus", new Action(SendFullStatus));
// Dial on string
AppServerController.AddAction(MessagePath + "/dial", new Action<string>(s => EISC.SetString(JoinMap.CurrentDialString.JoinNumber, s)));
// Pulse DTMF
AppServerController.AddAction(MessagePath + "/dtmf", new Action<string>(s =>
{
var join = JoinMap.Joins[s];
if (join != null)
{
if (join.JoinNumber > 0)
{
EISC.PulseBool(join.JoinNumber, 100);
}
}
}));
}
/// <summary>
///
/// </summary>
void SendCallsList()
{
PostStatusMessage(new
{
calls = GetCurrentCallList(),
});
}
/// <summary>
/// Turns the
/// </summary>
/// <returns></returns>
List<CodecActiveCallItem> GetCurrentCallList()
{
if (CurrentCallItem.Status == eCodecCallStatus.Disconnected)
{
return new List<CodecActiveCallItem>();
}
else
{
return new List<CodecActiveCallItem>() { CurrentCallItem };
}
}
}
}

View File

@@ -0,0 +1,149 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharpPro.EthernetCommunication;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Bridges;
using PepperDash.Essentials.Devices.Common.Cameras;
namespace PepperDash.Essentials.AppServer.Messengers
{
public class SIMPLCameraMessenger : MessengerBase
{
BasicTriList EISC;
CameraControllerJoinMap JoinMap;
public SIMPLCameraMessenger(string key, BasicTriList eisc, string messagePath, uint joinStart)
: base(key, messagePath)
{
EISC = eisc;
JoinMap = new CameraControllerJoinMap(joinStart);
EISC.SetUShortSigAction(JoinMap.NumberOfPresets.JoinNumber, (u) => SendCameraFullMessageObject());
EISC.SetBoolSigAction(JoinMap.CameraModeAuto.JoinNumber, (b) => PostCameraMode());
EISC.SetBoolSigAction(JoinMap.CameraModeManual.JoinNumber, (b) => PostCameraMode());
EISC.SetBoolSigAction(JoinMap.CameraModeOff.JoinNumber, (b) => PostCameraMode());
}
protected override void CustomRegisterWithAppServer(MobileControlSystemController appServerController)
{
var asc = appServerController;
asc.AddAction(MessagePath + "/fullStatus", new Action(SendCameraFullMessageObject));
// Add press and holds using helper action
Action<string, uint> addPHAction = (s, u) =>
asc.AddAction(MessagePath + s, new PressAndHoldAction(b => EISC.SetBool(u, b)));
addPHAction("/cameraUp", JoinMap.TiltUp.JoinNumber);
addPHAction("/cameraDown", JoinMap.TiltDown.JoinNumber);
addPHAction("/cameraLeft", JoinMap.PanLeft.JoinNumber);
addPHAction("/cameraRight", JoinMap.PanRight.JoinNumber);
addPHAction("/cameraZoomIn", JoinMap.ZoomIn.JoinNumber);
addPHAction("/cameraZoomOut", JoinMap.ZoomOut.JoinNumber);
Action<string, uint> addAction = (s, u) =>
asc.AddAction(MessagePath + s, new Action(() => EISC.PulseBool(u, 100)));
addAction("/cameraModeAuto", JoinMap.CameraModeAuto.JoinNumber);
addAction("/cameraModeManual", JoinMap.CameraModeManual.JoinNumber);
addAction("/cameraModeOff", JoinMap.CameraModeOff.JoinNumber);
var presetStart = JoinMap.PresetRecallStart.JoinNumber;
var presetEnd = JoinMap.PresetRecallStart.JoinNumber + JoinMap.PresetRecallStart.JoinSpan;
int presetId = 1;
// camera presets
for (uint i = presetStart; i <= presetEnd; i++)
{
addAction("/cameraPreset" + (presetId), i);
presetId++;
}
}
public void CustomUnregsiterWithAppServer(MobileControlSystemController appServerController)
{
appServerController.RemoveAction(MessagePath + "/fullStatus");
appServerController.RemoveAction(MessagePath + "/cameraUp");
appServerController.RemoveAction(MessagePath + "/cameraDown");
appServerController.RemoveAction(MessagePath + "/cameraLeft");
appServerController.RemoveAction(MessagePath + "/cameraRight");
appServerController.RemoveAction(MessagePath + "/cameraZoomIn");
appServerController.RemoveAction(MessagePath + "/cameraZoomOut");
appServerController.RemoveAction(MessagePath + "/cameraModeAuto");
appServerController.RemoveAction(MessagePath + "/cameraModeManual");
appServerController.RemoveAction(MessagePath + "/cameraModeOff");
EISC.SetUShortSigAction(JoinMap.NumberOfPresets.JoinNumber, null);
EISC.SetBoolSigAction(JoinMap.CameraModeAuto.JoinNumber, null);
EISC.SetBoolSigAction(JoinMap.CameraModeManual.JoinNumber, null);
EISC.SetBoolSigAction(JoinMap.CameraModeOff.JoinNumber, null);
}
/// <summary>
/// Helper method to update the full status of the camera
/// </summary>
void SendCameraFullMessageObject()
{
var presetList = new List<CameraPreset>();
// Build a list of camera presets based on the names and count
if (EISC.GetBool(JoinMap.SupportsPresets.JoinNumber))
{
var presetStart = JoinMap.PresetLabelStart.JoinNumber;
var presetEnd = JoinMap.PresetLabelStart.JoinNumber + JoinMap.NumberOfPresets.JoinNumber;
var presetId = 1;
for (uint i = presetStart; i < presetEnd; i++)
{
var presetName = EISC.GetString(i);
var preset = new CameraPreset(presetId, presetName, string.IsNullOrEmpty(presetName), true);
presetList.Add(preset);
presetId++;
}
}
PostStatusMessage(new
{
cameraMode = GetCameraMode(),
hasPresets = EISC.GetBool(JoinMap.SupportsPresets.JoinNumber),
presets = presetList
});
}
/// <summary>
///
/// </summary>
void PostCameraMode()
{
PostStatusMessage(new
{
cameraMode = GetCameraMode()
});
}
/// <summary>
/// Computes the current camera mode
/// </summary>
/// <returns></returns>
string GetCameraMode()
{
string m;
if (EISC.GetBool(JoinMap.CameraModeAuto.JoinNumber)) m = eCameraControlMode.Auto.ToString().ToLower();
else if (EISC.GetBool(JoinMap.CameraModeManual.JoinNumber)) m = eCameraControlMode.Manual.ToString().ToLower();
else m = eCameraControlMode.Off.ToString().ToLower();
return m;
}
}
}

View File

@@ -0,0 +1,73 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Core;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.AppServer.Messengers
{
public class SIMPLRouteMessenger : MessengerBase
{
BasicTriList EISC;
uint JoinStart;
public class StringJoin
{
/// <summary>
/// 1
/// </summary>
public const uint CurrentSource = 1;
}
public SIMPLRouteMessenger(string key, BasicTriList eisc, string messagePath, uint joinStart)
: base(key, messagePath)
{
EISC = eisc;
JoinStart = joinStart - 1;
EISC.SetStringSigAction(JoinStart + StringJoin.CurrentSource, (s) => SendRoutingFullMessageObject(s));
}
protected override void CustomRegisterWithAppServer(MobileControlSystemController appServerController)
{
appServerController.AddAction(MessagePath + "/fullStatus", new Action(() =>
{
SendRoutingFullMessageObject(EISC.GetString(JoinStart + StringJoin.CurrentSource));
}));
appServerController.AddAction(MessagePath +"/source", new Action<SourceSelectMessageContent>(c =>
{
EISC.SetString(JoinStart + StringJoin.CurrentSource, c.SourceListItem);
}));
}
public void CustomUnregsiterWithAppServer(MobileControlSystemController appServerController)
{
appServerController.RemoveAction(MessagePath + "/fullStatus");
appServerController.RemoveAction(MessagePath + "/source");
EISC.SetStringSigAction(JoinStart + StringJoin.CurrentSource, null);
}
/// <summary>
/// Helper method to update full status of the routing device
/// </summary>
void SendRoutingFullMessageObject(string sourceKey)
{
if (string.IsNullOrEmpty(sourceKey))
sourceKey = "none";
PostStatusMessage(new
{
selectedSourceKey = sourceKey
});
}
}
}

View File

@@ -0,0 +1,665 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharpPro.EthernetCommunication;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Devices.Common.Codec;
using PepperDash.Essentials.Devices.Common.Cameras;
namespace PepperDash.Essentials.AppServer.Messengers
{
public class SIMPLVtcMessenger : MessengerBase
{
BasicTriList EISC;
public SIMPLVtcJoinMap JoinMap { get; private set; }
///********* Bools *********/
///// <summary>
///// 724
///// </summary>
//const uint BDialHangup = 724;
///// <summary>
///// 750
///// </summary>
//const uint BCallIncoming = 750;
///// <summary>
///// 751
///// </summary>
//const uint BIncomingAnswer = 751;
///// <summary>
///// 752
///// </summary>
//const uint BIncomingReject = 752;
///// <summary>
///// 741
///// </summary>
//const uint BSpeedDial1 = 741;
///// <summary>
///// 742
///// </summary>
//const uint BSpeedDial2 = 742;
///// <summary>
///// 743
///// </summary>
//const uint BSpeedDial3 = 743;
///// <summary>
///// 744
///// </summary>
//const uint BSpeedDial4 = 744;
///// <summary>
///// 800
///// </summary>
//const uint BDirectorySearchBusy = 800;
///// <summary>
///// 801
///// </summary>
//const uint BDirectoryLineSelected = 801;
///// <summary>
///// 801 when selected entry is a contact
///// </summary>
//const uint BDirectoryEntryIsContact = 801;
///// <summary>
///// 802 To show/hide back button
///// </summary>
//const uint BDirectoryIsRoot = 802;
///// <summary>
///// 803 Pulse from system to inform us when directory is ready
///// </summary>
//const uint BDirectoryHasChanged = 803;
///// <summary>
///// 804
///// </summary>
//const uint BDirectoryRoot = 804;
///// <summary>
///// 805
///// </summary>
//const uint BDirectoryFolderBack = 805;
///// <summary>
///// 806
///// </summary>
//const uint BDirectoryDialSelectedLine = 806;
///// <summary>
///// 811
///// </summary>
//const uint BCameraControlUp = 811;
///// <summary>
///// 812
///// </summary>
//const uint BCameraControlDown = 812;
///// <summary>
///// 813
///// </summary>
//const uint BCameraControlLeft = 813;
///// <summary>
///// 814
///// </summary>
//const uint BCameraControlRight = 814;
///// <summary>
///// 815
///// </summary>
//const uint BCameraControlZoomIn = 815;
///// <summary>
///// 816
///// </summary>
//const uint BCameraControlZoomOut = 816;
///// <summary>
///// 821 - 826
///// </summary>
//const uint BCameraPresetStart = 821;
///// <summary>
///// 831
///// </summary>
//const uint BCameraModeAuto = 831;
///// <summary>
///// 832
///// </summary>
//const uint BCameraModeManual = 832;
///// <summary>
///// 833
///// </summary>
//const uint BCameraModeOff = 833;
///// <summary>
///// 841
///// </summary>
//const uint BCameraSelfView = 841;
///// <summary>
///// 842
///// </summary>
//const uint BCameraLayout = 842;
///// <summary>
///// 843
///// </summary>
//const uint BCameraSupportsAutoMode = 843;
///// <summary>
///// 844
///// </summary>
//const uint BCameraSupportsOffMode = 844;
///********* Ushorts *********/
///// <summary>
///// 760
///// </summary>
//const uint UCameraNumberSelect = 760;
///// <summary>
///// 801
///// </summary>
//const uint UDirectorySelectRow = 801;
///// <summary>
///// 801
///// </summary>
//const uint UDirectoryRowCount = 801;
///********* Strings *********/
///// <summary>
///// 701
///// </summary>
//const uint SCurrentDialString = 701;
///// <summary>
///// 702
///// </summary>
//const uint SCurrentCallName = 702;
///// <summary>
///// 703
///// </summary>
//const uint SCurrentCallNumber = 703;
///// <summary>
///// 731
///// </summary>
//const uint SHookState = 731;
///// <summary>
///// 722
///// </summary>
//const uint SCallDirection = 722;
///// <summary>
///// 751
///// </summary>
//const uint SIncomingCallName = 751;
///// <summary>
///// 752
///// </summary>
//const uint SIncomingCallNumber = 752;
///// <summary>
///// 800
///// </summary>
//const uint SDirectorySearchString = 800;
///// <summary>
///// 801-1055
///// </summary>
//const uint SDirectoryEntriesStart = 801;
///// <summary>
///// 1056
///// </summary>
//const uint SDirectoryEntrySelectedName = 1056;
///// <summary>
///// 1057
///// </summary>
//const uint SDirectoryEntrySelectedNumber = 1057;
///// <summary>
///// 1058
///// </summary>
//const uint SDirectorySelectedFolderName = 1058;
///// <summary>
///// 701-712 0-9*#
///// </summary>
//Dictionary<string, uint> DTMFMap = new Dictionary<string, uint>
//{
// { "1", 701 },
// { "2", 702 },
// { "3", 703 },
// { "4", 704 },
// { "5", 705 },
// { "6", 706 },
// { "7", 707 },
// { "8", 708 },
// { "9", 709 },
// { "0", 710 },
// { "*", 711 },
// { "#", 712 },
//};
CodecActiveCallItem CurrentCallItem;
CodecActiveCallItem IncomingCallItem;
ushort PreviousDirectoryLength = 701;
/// <summary>
///
/// </summary>
/// <param name="eisc"></param>
/// <param name="messagePath"></param>
public SIMPLVtcMessenger(string key, BasicTriList eisc, string messagePath)
: base(key, messagePath)
{
EISC = eisc;
JoinMap = new SIMPLVtcJoinMap(701);
CurrentCallItem = new CodecActiveCallItem();
CurrentCallItem.Type = eCodecCallType.Video;
CurrentCallItem.Id = "-video-";
}
/// <summary>
///
/// </summary>
/// <param name="appServerController"></param>
protected override void CustomRegisterWithAppServer(MobileControlSystemController appServerController)
{
var asc = appServerController;
EISC.SetStringSigAction(JoinMap.HookState.JoinNumber, s =>
{
CurrentCallItem.Status = (eCodecCallStatus)Enum.Parse(typeof(eCodecCallStatus), s, true);
PostFullStatus(); // SendCallsList();
});
EISC.SetStringSigAction(JoinMap.CurrentCallNumber.JoinNumber, s =>
{
CurrentCallItem.Number = s;
PostCallsList();
});
EISC.SetStringSigAction(JoinMap.CurrentCallName.JoinNumber, s =>
{
CurrentCallItem.Name = s;
PostCallsList();
});
EISC.SetStringSigAction(JoinMap.CallDirection.JoinNumber, s =>
{
CurrentCallItem.Direction = (eCodecCallDirection)Enum.Parse(typeof(eCodecCallDirection), s, true);
PostCallsList();
});
EISC.SetBoolSigAction(JoinMap.IncomingCall.JoinNumber, b =>
{
if (b)
{
var ica = new CodecActiveCallItem()
{
Direction = eCodecCallDirection.Incoming,
Id = "-video-incoming",
Name = EISC.GetString(JoinMap.IncomingCallName.JoinNumber),
Number = EISC.GetString(JoinMap.IncomingCallNumber.JoinNumber),
Status = eCodecCallStatus.Ringing,
Type = eCodecCallType.Video
};
IncomingCallItem = ica;
}
else
{
IncomingCallItem = null;
}
PostCallsList();
});
EISC.SetBoolSigAction(JoinMap.CameraSupportsAutoMode.JoinNumber, b =>
{
PostStatusMessage(new
{
cameraSupportsAutoMode = b
});
});
EISC.SetBoolSigAction(JoinMap.CameraSupportsOffMode.JoinNumber, b =>
{
PostStatusMessage(new
{
cameraSupportsOffMode = b
});
});
// Directory insanity
EISC.SetUShortSigAction(JoinMap.DirectoryRowCount.JoinNumber, u =>
{
// The length of the list comes in before the list does.
// Splice the sig change operation onto the last string sig that will be changing
// when the directory entries make it through.
if (PreviousDirectoryLength > 0)
{
EISC.ClearStringSigAction(JoinMap.DirectoryEntriesStart.JoinNumber + PreviousDirectoryLength - 1);
}
EISC.SetStringSigAction(JoinMap.DirectoryEntriesStart.JoinNumber + u - 1, s => PostDirectory());
PreviousDirectoryLength = u;
});
EISC.SetStringSigAction(JoinMap.DirectoryEntrySelectedName.JoinNumber, s =>
{
PostStatusMessage(new
{
directoryContactSelected = new
{
name = EISC.GetString(JoinMap.DirectoryEntrySelectedName.JoinNumber),
}
});
});
EISC.SetStringSigAction(JoinMap.DirectoryEntrySelectedNumber.JoinNumber, s =>
{
PostStatusMessage(new
{
directoryContactSelected = new
{
number = EISC.GetString(JoinMap.DirectoryEntrySelectedNumber.JoinNumber),
}
});
});
EISC.SetStringSigAction(JoinMap.DirectorySelectedFolderName.JoinNumber, s => PostStatusMessage(new
{
directorySelectedFolderName = EISC.GetString(JoinMap.DirectorySelectedFolderName.JoinNumber)
}));
EISC.SetSigTrueAction(JoinMap.CameraModeAuto.JoinNumber, () => PostCameraMode());
EISC.SetSigTrueAction(JoinMap.CameraModeManual.JoinNumber, () => PostCameraMode());
EISC.SetSigTrueAction(JoinMap.CameraModeOff.JoinNumber, () => PostCameraMode());
EISC.SetBoolSigAction(JoinMap.CameraSelfView.JoinNumber, b => PostStatusMessage(new
{
cameraSelfView = b
}));
EISC.SetUShortSigAction(JoinMap.CameraNumberSelect.JoinNumber, (u) => PostSelectedCamera());
// Add press and holds using helper action
Action<string, uint> addPHAction = (s, u) =>
AppServerController.AddAction(MessagePath + s, new PressAndHoldAction(b => EISC.SetBool(u, b)));
addPHAction("/cameraUp", JoinMap.CameraTiltUp.JoinNumber);
addPHAction("/cameraDown", JoinMap.CameraTiltDown.JoinNumber);
addPHAction("/cameraLeft", JoinMap.CameraPanLeft.JoinNumber);
addPHAction("/cameraRight", JoinMap.CameraPanRight.JoinNumber);
addPHAction("/cameraZoomIn", JoinMap.CameraZoomIn.JoinNumber);
addPHAction("/cameraZoomOut", JoinMap.CameraZoomOut.JoinNumber);
// Add straight pulse calls using helper action
Action<string, uint> addAction = (s, u) =>
AppServerController.AddAction(MessagePath + s, new Action(() => EISC.PulseBool(u, 100)));
addAction("/endCallById", JoinMap.EndCall.JoinNumber);
addAction("/endAllCalls", JoinMap.EndCall.JoinNumber);
addAction("/acceptById", JoinMap.IncomingAnswer.JoinNumber);
addAction("/rejectById", JoinMap.IncomingReject.JoinNumber);
var speeddialStart = JoinMap.SpeedDialStart.JoinNumber;
var speeddialEnd = JoinMap.SpeedDialStart.JoinNumber + JoinMap.SpeedDialStart.JoinSpan;
var speedDialIndex = 1;
for (uint i = speeddialStart; i < speeddialEnd; i++)
{
addAction(string.Format("/speedDial{0}", speedDialIndex), i);
speedDialIndex++;
}
addAction("/cameraModeAuto", JoinMap.CameraModeAuto.JoinNumber);
addAction("/cameraModeManual", JoinMap.CameraModeManual.JoinNumber);
addAction("/cameraModeOff", JoinMap.CameraModeOff.JoinNumber);
addAction("/cameraSelfView", JoinMap.CameraSelfView.JoinNumber);
addAction("/cameraLayout", JoinMap.CameraLayout.JoinNumber);
asc.AddAction("/cameraSelect", new Action<string>(SelectCamera));
// camera presets
for(uint i = 0; i < 6; i++)
{
addAction("/cameraPreset" + (i + 1), JoinMap.CameraPresetStart.JoinNumber + i);
}
asc.AddAction(MessagePath + "/isReady", new Action(PostIsReady));
// Get status
asc.AddAction(MessagePath + "/fullStatus", new Action(PostFullStatus));
// Dial on string
asc.AddAction(MessagePath + "/dial", new Action<string>(s =>
EISC.SetString(JoinMap.CurrentDialString.JoinNumber, s)));
// Pulse DTMF
AppServerController.AddAction(MessagePath + "/dtmf", new Action<string>(s =>
{
var join = JoinMap.Joins[s];
if (join != null)
{
if (join.JoinNumber > 0)
{
EISC.PulseBool(join.JoinNumber, 100);
}
}
}));
// Directory madness
asc.AddAction(MessagePath + "/directoryRoot", new Action(() => EISC.PulseBool(JoinMap.DirectoryRoot.JoinNumber)));
asc.AddAction(MessagePath + "/directoryBack", new Action(() => EISC.PulseBool(JoinMap.DirectoryFolderBack.JoinNumber)));
asc.AddAction(MessagePath + "/directoryById", new Action<string>(s =>
{
// the id should contain the line number to forward to simpl
try
{
var u = ushort.Parse(s);
EISC.SetUshort(JoinMap.DirectorySelectRow.JoinNumber, u);
EISC.PulseBool(JoinMap.DirectoryLineSelected.JoinNumber);
}
catch (Exception)
{
Debug.Console(1, this, Debug.ErrorLogLevel.Warning,
"/directoryById request contains non-numeric ID incompatible with DDVC bridge");
}
}));
asc.AddAction(MessagePath + "/directorySelectContact", new Action<string>(s =>
{
try
{
var u = ushort.Parse(s);
EISC.SetUshort(JoinMap.DirectorySelectRow.JoinNumber, u);
EISC.PulseBool(JoinMap.DirectoryLineSelected.JoinNumber);
}
catch
{
}
}));
asc.AddAction(MessagePath + "/directoryDialContact", new Action(() => {
EISC.PulseBool(JoinMap.DirectoryDialSelectedLine.JoinNumber);
}));
asc.AddAction(MessagePath + "/getDirectory", new Action(() =>
{
if (EISC.GetUshort(JoinMap.DirectoryRowCount.JoinNumber) > 0)
{
PostDirectory();
}
else
{
EISC.PulseBool(JoinMap.DirectoryRoot.JoinNumber);
}
}));
}
/// <summary>
///
/// </summary>
void PostFullStatus()
{
this.PostStatusMessage(new
{
calls = GetCurrentCallList(),
cameraMode = GetCameraMode(),
cameraSelfView = EISC.GetBool(JoinMap.CameraSelfView.JoinNumber),
cameraSupportsAutoMode = EISC.GetBool(JoinMap.CameraSupportsAutoMode.JoinNumber),
cameraSupportsOffMode = EISC.GetBool(JoinMap.CameraSupportsOffMode.JoinNumber),
currentCallString = EISC.GetString(JoinMap.CurrentCallNumber.JoinNumber),
currentDialString = EISC.GetString(JoinMap.CurrentDialString.JoinNumber),
directoryContactSelected = new
{
name = EISC.GetString(JoinMap.DirectoryEntrySelectedName.JoinNumber),
number = EISC.GetString(JoinMap.DirectoryEntrySelectedNumber.JoinNumber)
},
directorySelectedFolderName = EISC.GetString(JoinMap.DirectorySelectedFolderName.JoinNumber),
isInCall = EISC.GetString(JoinMap.HookState.JoinNumber) == "Connected",
hasDirectory = true,
hasDirectorySearch = false,
hasRecents = !EISC.BooleanOutput[502].BoolValue,
hasCameras = true,
showCamerasWhenNotInCall = EISC.BooleanOutput[503].BoolValue,
selectedCamera = GetSelectedCamera(),
});
}
/// <summary>
///
/// </summary>
void PostDirectory()
{
var u = EISC.GetUshort(JoinMap.DirectoryRowCount.JoinNumber);
var items = new List<object>();
for (uint i = 0; i < u; i++)
{
var name = EISC.GetString(JoinMap.DirectoryEntriesStart.JoinNumber + i);
var id = (i + 1).ToString();
// is folder or contact?
if (name.StartsWith("[+]"))
{
items.Add(new
{
folderId = id,
name = name
});
}
else
{
items.Add(new
{
contactId = id,
name = name
});
}
}
var directoryMessage = new
{
currentDirectory = new
{
isRootDirectory = EISC.GetBool(JoinMap.DirectoryIsRoot.JoinNumber),
directoryResults = items
}
};
PostStatusMessage(directoryMessage);
}
/// <summary>
///
/// </summary>
void PostCameraMode()
{
PostStatusMessage(new
{
cameraMode = GetCameraMode()
});
}
/// <summary>
///
/// </summary>
/// <param name="mode"></param>
string GetCameraMode()
{
string m;
if (EISC.GetBool(JoinMap.CameraModeAuto.JoinNumber)) m = eCameraControlMode.Auto.ToString().ToLower();
else if (EISC.GetBool(JoinMap.CameraModeManual.JoinNumber)) m = eCameraControlMode.Manual.ToString().ToLower();
else m = eCameraControlMode.Off.ToString().ToLower();
return m;
}
void PostSelectedCamera()
{
PostStatusMessage(new
{
selectedCamera = GetSelectedCamera()
});
}
/// <summary>
///
/// </summary>
string GetSelectedCamera()
{
var num = EISC.GetUshort(JoinMap.CameraNumberSelect.JoinNumber);
string m;
if (num == 100)
{
m = "cameraFar";
}
else
{
m = "camera" + num;
}
return m;
}
/// <summary>
///
/// </summary>
void PostIsReady()
{
PostStatusMessage(new
{
isReady = true
});
}
/// <summary>
///
/// </summary>
void PostCallsList()
{
PostStatusMessage(new
{
calls = GetCurrentCallList(),
});
}
/// <summary>
///
/// </summary>
/// <param name="s"></param>
void SelectCamera(string s)
{
var cam = s.Substring(6);
if (cam.ToLower() == "far")
{
EISC.SetUshort(JoinMap.CameraNumberSelect.JoinNumber, 100);
}
else
{
EISC.SetUshort(JoinMap.CameraNumberSelect.JoinNumber, UInt16.Parse(cam));
}
}
/// <summary>
/// Turns the
/// </summary>
/// <returns></returns>
List<CodecActiveCallItem> GetCurrentCallList()
{
var list = new List<CodecActiveCallItem>();
if (CurrentCallItem.Status != eCodecCallStatus.Disconnected)
{
list.Add(CurrentCallItem);
}
if (EISC.GetBool(JoinMap.IncomingCall.JoinNumber))
{
}
return list;
}
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Bridges;
using PepperDash.Essentials.Core.Bridges;
namespace PepperDash.Essentials.AppServer.Messengers
{
/// <summary>
/// Properties to configure a SIMPL Messenger
/// </summary>
public class SimplMessengerPropertiesConfig : EiscApiPropertiesConfig.ApiDevicePropertiesConfig
{
}
}

View File

@@ -1,11 +1,5 @@
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.Monitoring;
@@ -23,11 +17,11 @@ namespace PepperDash.Essentials.AppServer.Messengers
SysMon = sysMon;
SysMon.SystemMonitorPropertiesChanged += new EventHandler<EventArgs>(SysMon_SystemMonitorPropertiesChanged);
SysMon.SystemMonitorPropertiesChanged += SysMon_SystemMonitorPropertiesChanged;
foreach (var p in SysMon.ProgramStatusFeedbackCollection)
{
p.Value.ProgramInfoChanged += new EventHandler<ProgramInfoEventArgs>(ProgramInfoChanged);
p.Value.ProgramInfoChanged += ProgramInfoChanged;
}
CrestronConsole.AddNewConsoleCommand(s => SendFullStatusMessage(), "SendFullSysMonStatus", "Sends the full System Monitor Status", ConsoleAccessLevelEnum.AccessOperator);
@@ -72,18 +66,15 @@ namespace PepperDash.Essentials.AppServer.Messengers
Debug.Console(1, "Posting System Monitor Status Message.");
// This takes a while, launch a new thread
CrestronInvoke.BeginInvoke((o) =>
CrestronInvoke.BeginInvoke(o => PostStatusMessage(new
{
PostStatusMessage(new
{
timeZone = SysMon.TimeZoneFeedback.IntValue,
timeZoneName = SysMon.TimeZoneTextFeedback.StringValue,
ioControllerVersion = SysMon.IOControllerVersionFeedback.StringValue,
snmpVersion = SysMon.SnmpVersionFeedback.StringValue,
bacnetVersion = SysMon.BACnetAppVersionFeedback.StringValue,
controllerVersion = SysMon.ControllerVersionFeedback.StringValue
});
});
timeZone = SysMon.TimeZoneFeedback.IntValue,
timeZoneName = SysMon.TimeZoneTextFeedback.StringValue,
ioControllerVersion = SysMon.IoControllerVersionFeedback.StringValue,
snmpVersion = SysMon.SnmpVersionFeedback.StringValue,
bacnetVersion = SysMon.BaCnetAppVersionFeedback.StringValue,
controllerVersion = SysMon.ControllerVersionFeedback.StringValue
}));
}
protected override void CustomRegisterWithAppServer(MobileControlSystemController appServerController)

View File

@@ -7,6 +7,8 @@ using Crestron.SimplSharp;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using PepperDash.Core;
using PepperDash.Essentials.Devices.Common.Codec;
using PepperDash.Essentials.Devices.Common.Cameras;
using PepperDash.Essentials.Devices.Common.VideoCodec;
@@ -202,6 +204,59 @@ namespace PepperDash.Essentials.AppServer.Messengers
{
appServerController.AddAction(MessagePath + "/getCallHistory", new Action(GetCallHistory));
}
var cameraCodec = Codec as IHasCodecCameras;
if (cameraCodec != null)
{
Debug.Console(2, this, "Adding IHasCodecCameras Actions");
cameraCodec.CameraSelected += new EventHandler<CameraSelectedEventArgs>(cameraCodec_CameraSelected);
appServerController.AddAction(MessagePath + "/cameraSelect", new Action<string>(s => cameraCodec.SelectCamera(s)));
MapCameraActions();
var presetsCodec = Codec as IHasCodecRoomPresets;
if (presetsCodec != null)
{
Debug.Console(2, this, "Adding IHasCodecRoomPresets Actions");
presetsCodec.CodecRoomPresetsListHasChanged += new EventHandler<EventArgs>(presetsCodec_CameraPresetsListHasChanged);
appServerController.AddAction(MessagePath + "/cameraPreset", new Action<int>(u => presetsCodec.CodecRoomPresetSelect(u)));
appServerController.AddAction(MessagePath + "/cameraPresetStore", new Action<CodecRoomPreset>(p => presetsCodec.CodecRoomPresetStore(p.ID, p.Description)));
}
var speakerTrackCodec = Codec as IHasCameraAutoMode;
if (speakerTrackCodec != null)
{
Debug.Console(2, this, "Adding IHasCameraAutoMode Actions");
speakerTrackCodec.CameraAutoModeIsOnFeedback.OutputChange += new EventHandler<PepperDash.Essentials.Core.FeedbackEventArgs>(CameraAutoModeIsOnFeedback_OutputChange);
appServerController.AddAction(MessagePath + "/cameraAuto", new Action(speakerTrackCodec.CameraAutoModeOn));
appServerController.AddAction(MessagePath + "/cameraManual", new Action(speakerTrackCodec.CameraAutoModeOff));
}
}
var selfViewCodec = Codec as IHasCodecSelfView;
if (selfViewCodec != null)
{
Debug.Console(2, this, "Adding IHasCodecSelfView Actions");
appServerController.AddAction(MessagePath + "/cameraSelfView", new Action(selfViewCodec.SelfViewModeToggle));
}
var layoutsCodec = Codec as IHasCodecLayouts;
if (layoutsCodec != null)
{
Debug.Console(2, this, "Adding IHasCodecLayouts Actions");
appServerController.AddAction(MessagePath + "/cameraRemoteView", new Action(layoutsCodec.LocalLayoutToggle));
}
Debug.Console(2, this, "Adding Privacy & Standby Actions");
appServerController.AddAction(MessagePath + "/privacyModeOn", new Action(Codec.PrivacyModeOn));
appServerController.AddAction(MessagePath + "/privacyModeOff", new Action(Codec.PrivacyModeOff));
@@ -212,6 +267,89 @@ namespace PepperDash.Essentials.AppServer.Messengers
appServerController.AddAction(MessagePath + "/standbyOff", new Action(Codec.StandbyDeactivate));
}
void presetsCodec_CameraPresetsListHasChanged(object sender, EventArgs e)
{
PostCameraPresets();
}
void CameraAutoModeIsOnFeedback_OutputChange(object sender, PepperDash.Essentials.Core.FeedbackEventArgs e)
{
PostCameraMode();
}
void cameraCodec_CameraSelected(object sender, CameraSelectedEventArgs e)
{
MapCameraActions();
PostSelectedCamera();
}
/// <summary>
/// Maps the camera control actions to the current selected camera on the codec
/// </summary>
void MapCameraActions()
{
var cameraCodec = Codec as IHasCameras;
if (cameraCodec != null && cameraCodec.SelectedCamera != null)
{
AppServerController.RemoveAction(MessagePath + "/cameraUp");
AppServerController.RemoveAction(MessagePath + "/cameraDown");
AppServerController.RemoveAction(MessagePath + "/cameraLeft");
AppServerController.RemoveAction(MessagePath + "/cameraRight");
AppServerController.RemoveAction(MessagePath + "/cameraZoomIn");
AppServerController.RemoveAction(MessagePath + "/cameraZoomOut");
AppServerController.RemoveAction(MessagePath + "/cameraHome");
var camera = cameraCodec.SelectedCamera as IHasCameraPtzControl;
if (camera != null)
{
AppServerController.AddAction(MessagePath + "/cameraUp", new PressAndHoldAction(new Action<bool>(b => { if (b)camera.TiltUp(); else camera.TiltStop(); })));
AppServerController.AddAction(MessagePath + "/cameraDown", new PressAndHoldAction(new Action<bool>(b => { if (b)camera.TiltDown(); else camera.TiltStop(); })));
AppServerController.AddAction(MessagePath + "/cameraLeft", new PressAndHoldAction(new Action<bool>(b => { if (b)camera.PanLeft(); else camera.PanStop(); })));
AppServerController.AddAction(MessagePath + "/cameraRight", new PressAndHoldAction(new Action<bool>(b => { if (b)camera.PanRight(); else camera.PanStop(); })));
AppServerController.AddAction(MessagePath + "/cameraZoomIn", new PressAndHoldAction(new Action<bool>(b => { if (b)camera.ZoomIn(); else camera.ZoomStop(); })));
AppServerController.AddAction(MessagePath + "/cameraZoomOut", new PressAndHoldAction(new Action<bool>(b => { if (b)camera.ZoomOut(); else camera.ZoomStop(); })));
AppServerController.AddAction(MessagePath + "/cameraHome", new Action(camera.PositionHome));
var focusCamera = cameraCodec as IHasCameraFocusControl;
AppServerController.RemoveAction(MessagePath + "/cameraAutoFocus");
AppServerController.RemoveAction(MessagePath + "/cameraFocusNear");
AppServerController.RemoveAction(MessagePath + "/cameraFocusFar");
if (focusCamera != null)
{
AppServerController.AddAction(MessagePath + "/cameraAutoFocus", new Action(focusCamera.TriggerAutoFocus));
AppServerController.AddAction(MessagePath + "/cameraFocusNear", new PressAndHoldAction(new Action<bool>(b => { if (b)focusCamera.FocusNear(); else focusCamera.FocusStop(); })));
AppServerController.AddAction(MessagePath + "/cameraFocusFar", new PressAndHoldAction(new Action<bool>(b => { if (b)focusCamera.FocusFar(); else focusCamera.FocusStop(); })));
}
}
}
}
string GetCameraMode()
{
string m = "";
var speakerTrackCodec = Codec as IHasCameraAutoMode;
if (speakerTrackCodec != null)
{
if (speakerTrackCodec.CameraAutoModeIsOnFeedback.BoolValue) m = eCameraControlMode.Auto.ToString();
else m = eCameraControlMode.Manual.ToString();
}
var cameraOffCodec = Codec as IHasCameraOff;
if (cameraOffCodec != null)
{
if (cameraOffCodec.CameraIsOffFeedback.BoolValue)
m = eCameraControlMode.Off.ToString();
}
return m;
}
void GetCallHistory()
{
var codec = (Codec as IHasCallHistory);
@@ -344,6 +482,22 @@ namespace PepperDash.Essentials.AppServer.Messengers
return;
}
object cameraInfo = null;
var camerasCodec = Codec as IHasCodecCameras;
if (camerasCodec != null)
{
cameraInfo = new
{
cameraManualSupported = true, // For now, we assume manual mode is supported and selectively hide controls based on camera selection
cameraAutoSupported = Codec is IHasCameraAutoMode,
cameraOffSupported = Codec is IHasCameraOff,
cameraMode = GetCameraMode(),
cameraList = camerasCodec.Cameras,
selectedCamera = GetSelectedCamera(camerasCodec)
};
}
var info = Codec.CodecInfo;
PostStatusMessage(new
{
@@ -366,8 +520,77 @@ namespace PepperDash.Essentials.AppServer.Messengers
hasDirectory = Codec is IHasDirectory,
hasDirectorySearch = true,
hasRecents = Codec is IHasCallHistory,
hasCameras = Codec is IHasCodecCameras
hasCameras = Codec is IHasCameras,
cameras = cameraInfo,
presets = GetCurrentPresets()
});
}
/// <summary>
///
/// </summary>
void PostCameraMode()
{
PostStatusMessage(new
{
cameras = new
{
cameraMode = GetCameraMode()
}
});
}
void PostSelectedCamera()
{
var camerasCodec = Codec as IHasCodecCameras;
PostStatusMessage(new
{
cameras = new
{
selectedCamera = GetSelectedCamera(camerasCodec)
},
presets = GetCurrentPresets()
});
}
void PostCameraPresets()
{
PostStatusMessage(new
{
presets = GetCurrentPresets()
});
}
object GetSelectedCamera(IHasCodecCameras camerasCodec)
{
return new
{
key = camerasCodec.SelectedCameraFeedback.StringValue,
isFarEnd = camerasCodec.ControllingFarEndCameraFeedback.BoolValue,
capabilites = new
{
canPan = camerasCodec.SelectedCamera.CanPan,
canTilt = camerasCodec.SelectedCamera.CanTilt,
canZoom = camerasCodec.SelectedCamera.CanZoom,
canFocus = camerasCodec.SelectedCamera.CanFocus
}
};
}
List<CodecRoomPreset> GetCurrentPresets()
{
var presetsCodec = Codec as IHasCodecRoomPresets;
List<CodecRoomPreset> currentPresets = null;
if (presetsCodec != null && Codec is IHasFarEndCameraControl && (Codec as IHasFarEndCameraControl).ControllingFarEndCameraFeedback.BoolValue)
currentPresets = presetsCodec.FarEndRoomPresets;
else
currentPresets = presetsCodec.NearEndPresets;
return currentPresets;
}
}
}

View File

@@ -21,7 +21,7 @@ using PepperDash.Essentials.AppServer.Messengers;
namespace PepperDash.Essentials
{
public class MobileControlSystemController : Device
public class MobileControlSystemController : EssentialsDevice
{
WebSocketClient WSClient;
@@ -290,6 +290,10 @@ namespace PepperDash.Essentials
SystemUuid);
}
}
else
{
Debug.Console(0, "Authorization failed, code {0}: {1}", r.Code, r.ContentString);
}
}
else
Debug.Console(0, this, "Error {0} in authorizing system", e);
@@ -861,4 +865,20 @@ namespace PepperDash.Essentials
CrestronConsole.ConsoleCommandResponse("Usage: mobilehttprequest:N get/post url\r");
}
}
public class MobileControlSystemControllerFactory : EssentialsDeviceFactory<MobileControlSystemController>
{
public MobileControlSystemControllerFactory()
{
TypeNames = new List<string>() { "appserver" };
}
public override EssentialsDevice BuildDevice(DeviceConfig dc)
{
Debug.Console(1, "Factory Attempting to create new MobileControlSystemController Device");
var props = JsonConvert.DeserializeObject<MobileControlConfig>(dc.Properties.ToString());
return new MobileControlSystemController(dc.Key, dc.Name, props);
}
}
}

View File

@@ -12,7 +12,7 @@ namespace PepperDash.Essentials
/// <summary>
///
/// </summary>
public abstract class MobileControlBridgeBase: Device
public abstract class MobileControlBridgeBase: EssentialsDevice
{
public MobileControlSystemController Parent { get; private set; }

View File

@@ -25,6 +25,8 @@ namespace PepperDash.Essentials
public AudioCodecBaseMessenger ACMessenger { get; private set; }
public Dictionary<string, MessengerBase> DeviceMessengers { get; private set; }
/// <summary>
///
@@ -67,7 +69,15 @@ namespace PepperDash.Essentials
var routeRoom = Room as IRunRouteAction;
if(routeRoom != null)
Parent.AddAction(string.Format(@"/room/{0}/source", Room.Key), new Action<SourceSelectMessageContent>(c =>
routeRoom.RunRouteAction(c.SourceListItem)));
{
if(string.IsNullOrEmpty(c.SourceListKey))
routeRoom.RunRouteAction(c.SourceListItem, Room.SourceListKey);
else
{
routeRoom.RunRouteAction(c.SourceListItem, c.SourceListKey);
}
}));
var defaultRoom = Room as IRunDefaultPresentRoute;
if(defaultRoom != null)
@@ -115,6 +125,8 @@ namespace PepperDash.Essentials
ACMessenger.RegisterWithAppServer(Parent);
}
SetupDeviceMessengers();
var defCallRm = Room as IRunDefaultCallRoute;
if (defCallRm != null)
{
@@ -134,6 +146,36 @@ namespace PepperDash.Essentials
Room.ShutdownPromptTimer.WasCancelled += ShutdownPromptTimer_WasCancelled;
}
/// <summary>
/// Set up the messengers for each device type
/// </summary>
void SetupDeviceMessengers()
{
DeviceMessengers = new Dictionary<string,MessengerBase>();
foreach (var device in DeviceManager.AllDevices)
{
Debug.Console(2, this, "Attempting to set up device messenger for device: {0}", device.Key);
if (device is Essentials.Devices.Common.Cameras.CameraBase)
{
var camDevice = device as Essentials.Devices.Common.Cameras.CameraBase;
Debug.Console(2, this, "Adding CameraBaseMessenger for device: {0}", device.Key);
var cameraMessenger = new CameraBaseMessenger(device.Key + "-" + Parent.Key, camDevice, "/device/" + device.Key);
DeviceMessengers.Add(device.Key, cameraMessenger);
cameraMessenger.RegisterWithAppServer(Parent);
}
if (device is Essentials.Devices.Common.SoftCodec.BlueJeansPc)
{
var softCodecDevice = device as Essentials.Devices.Common.SoftCodec.BlueJeansPc;
Debug.Console(2, this, "Adding IRunRouteActionMessnger for device: {0}", device.Key);
var routeMessenger = new IRunRouteActionMessenger(device.Key + "-" + Parent.Key, softCodecDevice, "/device/" + device.Key);
DeviceMessengers.Add(device.Key, routeMessenger);
routeMessenger.RegisterWithAppServer(Parent);
}
}
}
/// <summary>
///
/// </summary>
@@ -430,6 +472,7 @@ namespace PepperDash.Essentials
public class SourceSelectMessageContent
{
public string SourceListItem { get; set; }
public string SourceListKey { get; set; }
}
/// <summary>

View File

@@ -10,6 +10,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using PepperDash.Core;
using PepperDash.Essentials.AppServer;
using PepperDash.Essentials.AppServer.Messengers;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Config;
@@ -18,204 +19,8 @@ using PepperDash.Essentials.Room.Config;
namespace PepperDash.Essentials.Room.MobileControl
{
public class MobileControlDdvc01RoomBridge : MobileControlBridgeBase, IDelayedConfiguration
public class MobileControlSIMPLRoomBridge : MobileControlBridgeBase, IDelayedConfiguration
{
public class BoolJoin
{
/// <summary>
/// 301
/// </summary>
public const uint RoomIsOn = 301;
/// <summary>
/// 12
/// </summary>
public const uint PrivacyMute = 12;
/// <summary>
/// 41
/// </summary>
public const uint PromptForCode = 41;
/// <summary>
/// 42
/// </summary>
public const uint ClientJoined = 42;
/// <summary>
/// 51
/// </summary>
public const uint ActivityShare = 51;
/// <summary>
/// 52
/// </summary>
public const uint ActivityPhoneCall = 52;
/// <summary>
/// 53
/// </summary>
public const uint ActivityVideoCall = 53;
/// <summary>
/// 1
/// </summary>
public const uint MasterVolumeIsMuted = 1;
/// <summary>
/// 1
/// </summary>
public const uint MasterVolumeMuteToggle = 1;
/// <summary>
/// 1
/// </summary>
public const uint VolumeMutesJoinStart = 1;
/// <summary>
/// 61
/// </summary>
public const uint ShutdownCancel = 61;
/// <summary>
/// 62
/// </summary>
public const uint ShutdownEnd = 62;
/// <summary>
/// 63
/// </summary>
public const uint ShutdownStart = 63;
/// <summary>
/// 72
/// </summary>
public const uint SourceHasChanged = 71;
/// <summary>
/// 261 - The start of the range of speed dial visibles
/// </summary>
public const uint SpeedDialVisibleStartJoin = 261;
/// <summary>
/// 501
/// </summary>
public const uint ConfigIsReady = 501;
/// <summary>
/// 502
/// </summary>
public const uint HideVideoConfRecents = 502;
/// <summary>
/// 503
/// </summary>
public const uint ShowCameraWhenNotInCall = 503;
/// <summary>
/// 504
/// </summary>
public const uint UseSourceEnabled = 504;
/// <summary>
/// 601
/// </summary>
public const uint SourceShareDisableJoinStart = 601;
/// <summary>
/// 621
/// </summary>
public const uint SourceIsEnabledJoinStart = 621;
}
public class UshortJoin
{
/// <summary>
/// 1
/// </summary>
public const uint MasterVolumeLevel = 1;
/// <summary>
/// 1
/// </summary>
public const uint VolumeSlidersJoinStart = 1;
/// <summary>
/// 61
/// </summary>
public const uint ShutdownPromptDuration = 61;
/// <summary>
/// 101
/// </summary>
public const uint NumberOfAuxFaders = 101;
}
public class StringJoin
{
/// <summary>
/// 1
/// </summary>
public const uint VolumeSliderNamesJoinStart = 1;
/// <summary>
/// 71
/// </summary>
public const uint SelectedSourceKey = 71;
/// <summary>
/// 241
/// </summary>
public const uint SpeedDialNameStartJoin = 241;
/// <summary>
/// 251
/// </summary>
public const uint SpeedDialNumberStartJoin = 251;
/// <summary>
/// 501
/// </summary>
public const uint ConfigRoomName = 501;
/// <summary>
/// 502
/// </summary>
public const uint ConfigHelpMessage = 502;
/// <summary>
/// 503
/// </summary>
public const uint ConfigHelpNumber = 503;
/// <summary>
/// 504
/// </summary>
public const uint ConfigRoomPhoneNumber = 504;
/// <summary>
/// 505
/// </summary>
public const uint ConfigRoomURI = 505;
/// <summary>
/// 401
/// </summary>
public const uint UserCodeToSystem = 401;
/// <summary>
/// 402
/// </summary>
public const uint ServerUrl = 402;
/// <summary>
/// 512
/// </summary>
public const uint RoomSpeedDialNamesJoinStart = 512;
/// <summary>
/// 516
/// </summary>
public const uint RoomSpeedDialNumberssJoinStart = 516;
/// <summary>
/// 601
/// </summary>
public const uint SourceNameJoinStart = 601;
/// <summary>
/// 621
/// </summary>
public const uint SourceIconJoinStart = 621;
/// <summary>
/// 641
/// </summary>
public const uint SourceKeyJoinStart = 641;
/// <summary>
/// 661
/// </summary>
public const uint SourceTypeJoinStart = 661;
/// <summary>
/// 761
/// </summary>
public const uint CameraNearNameStart = 761;
/// <summary>
/// 770 - presence of this name on the input will cause the camera to be added
/// </summary>
public const uint CameraFarName = 770;
}
/// <summary>
/// Fires when config is ready to go
/// </summary>
@@ -223,6 +28,8 @@ namespace PepperDash.Essentials.Room.MobileControl
public ThreeSeriesTcpIpEthernetIntersystemCommunications EISC { get; private set; }
public MobileControlSIMPLRoomJoinMap JoinMap { get; private set; }
/// <summary>
///
/// </summary>
@@ -231,15 +38,15 @@ namespace PepperDash.Essentials.Room.MobileControl
public override string RoomName
{
get {
var name = EISC.StringOutput[StringJoin.ConfigRoomName].StringValue;
var name = EISC.StringOutput[JoinMap.ConfigRoomName.JoinNumber].StringValue;
return string.IsNullOrEmpty(name) ? "Not Loaded" : name;
}
}
MobileControlDdvc01DeviceBridge SourceBridge;
Ddvc01AtcMessenger AtcMessenger;
Ddvc01VtcMessenger VtcMessenger;
SIMPLAtcMessenger AtcMessenger;
SIMPLVtcMessenger VtcMessenger;
/// <summary>
@@ -248,7 +55,7 @@ namespace PepperDash.Essentials.Room.MobileControl
/// <param name="key"></param>
/// <param name="name"></param>
/// <param name="ipId"></param>
public MobileControlDdvc01RoomBridge(string key, string name, uint ipId)
public MobileControlSIMPLRoomBridge(string key, string name, uint ipId)
: base(key, name)
{
try
@@ -258,8 +65,13 @@ namespace PepperDash.Essentials.Room.MobileControl
if (reg != Crestron.SimplSharpPro.eDeviceRegistrationUnRegistrationResponse.Success)
Debug.Console(0, this, "Cannot connect EISC at IPID {0}: \r{1}", ipId, reg);
JoinMap = new MobileControlSIMPLRoomJoinMap(1);
SourceBridge = new MobileControlDdvc01DeviceBridge(key + "-sourceBridge", "DDVC01 source bridge", EISC);
DeviceManager.AddDevice(SourceBridge);
}
catch (Exception)
{
@@ -279,24 +91,33 @@ namespace PepperDash.Essentials.Room.MobileControl
SetupFeedbacks();
var atcKey = string.Format("atc-{0}-{1}", this.Key, Parent.Key);
AtcMessenger = new Ddvc01AtcMessenger(atcKey, EISC, "/device/audioCodec");
AtcMessenger = new SIMPLAtcMessenger(atcKey, EISC, "/device/audioCodec");
AtcMessenger.RegisterWithAppServer(Parent);
var vtcKey = string.Format("atc-{0}-{1}", this.Key, Parent.Key);
VtcMessenger = new Ddvc01VtcMessenger(vtcKey, EISC, "/device/videoCodec");
VtcMessenger = new SIMPLVtcMessenger(vtcKey, EISC, "/device/videoCodec");
VtcMessenger.RegisterWithAppServer(Parent);
EISC.SigChange += EISC_SigChange;
EISC.OnlineStatusChange += (o, a) =>
{
Debug.Console(1, this, "DDVC EISC online={0}. Config is ready={1}", a.DeviceOnLine, EISC.BooleanOutput[BoolJoin.ConfigIsReady].BoolValue);
if (a.DeviceOnLine && EISC.BooleanOutput[BoolJoin.ConfigIsReady].BoolValue)
Debug.Console(1, this, "DDVC EISC online={0}. Config is ready={1}. Use Essentials Config={2}",
a.DeviceOnLine, EISC.BooleanOutput[JoinMap.ConfigIsReady.JoinNumber].BoolValue, EISC.BooleanOutput[JoinMap.ConfigIsLocal.JoinNumber].BoolValue);
if (a.DeviceOnLine && EISC.BooleanOutput[JoinMap.ConfigIsReady.JoinNumber].BoolValue)
LoadConfigValues();
if (a.DeviceOnLine && EISC.BooleanOutput[JoinMap.ConfigIsLocal.JoinNumber].BoolValue)
UseEssentialsConfig();
};
// load config if it's already there
if (EISC.IsOnline && EISC.BooleanOutput[BoolJoin.ConfigIsReady].BoolValue) // || EISC.BooleanInput[BoolJoin.ConfigIsReady].BoolValue)
if (EISC.IsOnline && EISC.BooleanOutput[JoinMap.ConfigIsReady.JoinNumber].BoolValue) // || EISC.BooleanInput[JoinMap.ConfigIsReady].BoolValue)
LoadConfigValues();
if (EISC.IsOnline && EISC.BooleanOutput[JoinMap.ConfigIsLocal.JoinNumber].BoolValue)
{
UseEssentialsConfig();
}
CrestronConsole.AddNewConsoleCommand(s =>
{
@@ -323,41 +144,60 @@ namespace PepperDash.Essentials.Room.MobileControl
return base.CustomActivate();
}
void UseEssentialsConfig()
{
ConfigIsLoaded = false;
SetupDeviceMessengers();
Debug.Console(0, this, "******* ESSENTIALS CONFIG: \r{0}", JsonConvert.SerializeObject(ConfigReader.ConfigObject, Formatting.Indented));
var handler = ConfigurationIsReady;
if (handler != null)
{
handler(this, new EventArgs());
}
ConfigIsLoaded = true;
}
/// <summary>
/// Setup the actions to take place on various incoming API calls
/// </summary>
void SetupFunctions()
{
Parent.AddAction(@"/room/room1/promptForCode", new Action(() => EISC.PulseBool(BoolJoin.PromptForCode)));
Parent.AddAction(@"/room/room1/clientJoined", new Action(() => EISC.PulseBool(BoolJoin.ClientJoined)));
Parent.AddAction(@"/room/room1/promptForCode", new Action(() => EISC.PulseBool(JoinMap.PromptForCode.JoinNumber)));
Parent.AddAction(@"/room/room1/clientJoined", new Action(() => EISC.PulseBool(JoinMap.ClientJoined.JoinNumber)));
Parent.AddAction(@"/room/room1/status", new Action(SendFullStatus));
Parent.AddAction(@"/room/room1/source", new Action<SourceSelectMessageContent>(c =>
{
EISC.SetString(StringJoin.SelectedSourceKey, c.SourceListItem);
EISC.PulseBool(BoolJoin.SourceHasChanged);
EISC.SetString(JoinMap.CurrentSourceKey.JoinNumber, c.SourceListItem);
EISC.PulseBool(JoinMap.SourceHasChanged.JoinNumber);
}));
Parent.AddAction(@"/room/room1/defaultsource", new Action(() =>
EISC.PulseBool(BoolJoin.ActivityShare)));
EISC.PulseBool(JoinMap.ActivityShare.JoinNumber)));
Parent.AddAction(@"/room/room1/activityPhone", new Action(() =>
EISC.PulseBool(BoolJoin.ActivityPhoneCall)));
EISC.PulseBool(JoinMap.ActivityPhoneCall.JoinNumber)));
Parent.AddAction(@"/room/room1/activityVideo", new Action(() =>
EISC.PulseBool(BoolJoin.ActivityVideoCall)));
EISC.PulseBool(JoinMap.ActivityVideoCall.JoinNumber)));
Parent.AddAction(@"/room/room1/volumes/master/level", new Action<ushort>(u =>
EISC.SetUshort(UshortJoin.MasterVolumeLevel, u)));
EISC.SetUshort(JoinMap.MasterVolume.JoinNumber, u)));
Parent.AddAction(@"/room/room1/volumes/master/muteToggle", new Action(() =>
EISC.PulseBool(BoolJoin.MasterVolumeIsMuted)));
EISC.PulseBool(JoinMap.MasterVolume.JoinNumber)));
Parent.AddAction(@"/room/room1/volumes/master/privacyMuteToggle", new Action(() =>
EISC.PulseBool(BoolJoin.PrivacyMute)));
EISC.PulseBool(JoinMap.PrivacyMute.JoinNumber)));
// /xyzxyz/volumes/master/muteToggle ---> BoolInput[1]
for (uint i = 2; i <= 7; i++)
var volumeStart = JoinMap.VolumeJoinStart.JoinNumber;
var volumeEnd = JoinMap.VolumeJoinStart.JoinNumber + JoinMap.VolumeJoinStart.JoinSpan;
for (uint i = volumeStart; i <= volumeEnd; i++)
{
var index = i;
Parent.AddAction(string.Format(@"/room/room1/volumes/level-{0}/level", index), new Action<ushort>(u =>
@@ -367,13 +207,16 @@ namespace PepperDash.Essentials.Room.MobileControl
}
Parent.AddAction(@"/room/room1/shutdownStart", new Action(() =>
EISC.PulseBool(BoolJoin.ShutdownStart)));
EISC.PulseBool(JoinMap.ShutdownStart.JoinNumber)));
Parent.AddAction(@"/room/room1/shutdownEnd", new Action(() =>
EISC.PulseBool(BoolJoin.ShutdownEnd)));
EISC.PulseBool(JoinMap.ShutdownEnd.JoinNumber)));
Parent.AddAction(@"/room/room1/shutdownCancel", new Action(() =>
EISC.PulseBool(BoolJoin.ShutdownCancel)));
EISC.PulseBool(JoinMap.ShutdownCancel.JoinNumber)));
}
/// <summary>
///
/// </summary>
@@ -398,21 +241,21 @@ namespace PepperDash.Essentials.Room.MobileControl
void SetupFeedbacks()
{
// Power
EISC.SetBoolSigAction(BoolJoin.RoomIsOn, b =>
EISC.SetBoolSigAction(JoinMap.RoomIsOn.JoinNumber, b =>
PostStatusMessage(new
{
isOn = b
}));
// Source change things
EISC.SetSigTrueAction(BoolJoin.SourceHasChanged, () =>
EISC.SetSigTrueAction(JoinMap.SourceHasChanged.JoinNumber, () =>
PostStatusMessage(new
{
selectedSourceKey = EISC.StringOutput[StringJoin.SelectedSourceKey].StringValue
selectedSourceKey = EISC.StringOutput[JoinMap.CurrentSourceKey.JoinNumber].StringValue
}));
// Volume things
EISC.SetUShortSigAction(UshortJoin.MasterVolumeLevel, u =>
EISC.SetUShortSigAction(JoinMap.MasterVolume.JoinNumber, u =>
PostStatusMessage(new
{
volumes = new
@@ -427,7 +270,7 @@ namespace PepperDash.Essentials.Room.MobileControl
// map MasterVolumeIsMuted join -> status/volumes/master/muted
//
EISC.SetBoolSigAction(BoolJoin.MasterVolumeIsMuted, b =>
EISC.SetBoolSigAction(JoinMap.MasterVolume.JoinNumber, b =>
PostStatusMessage(new
{
volumes = new
@@ -438,7 +281,7 @@ namespace PepperDash.Essentials.Room.MobileControl
}
}
}));
EISC.SetBoolSigAction(BoolJoin.PrivacyMute, b =>
EISC.SetBoolSigAction(JoinMap.PrivacyMute.JoinNumber, b =>
PostStatusMessage(new
{
volumes = new
@@ -450,7 +293,10 @@ namespace PepperDash.Essentials.Room.MobileControl
}
}));
for (uint i = 2; i <= 7; i++)
var volumeStart = JoinMap.VolumeJoinStart.JoinNumber;
var volumeEnd = JoinMap.VolumeJoinStart.JoinNumber + JoinMap.VolumeJoinStart.JoinSpan;
for (uint i = volumeStart; i <= volumeEnd; i++)
{
var index = i; // local scope for lambdas
EISC.SetUShortSigAction(index, u => // start at join 2
@@ -481,7 +327,7 @@ namespace PepperDash.Essentials.Room.MobileControl
});
}
EISC.SetUShortSigAction(UshortJoin.NumberOfAuxFaders, u =>
EISC.SetUShortSigAction(JoinMap.NumberOfAuxFaders.JoinNumber, u =>
PostStatusMessage(new {
volumes = new {
numberOfAuxFaders = u,
@@ -489,30 +335,30 @@ namespace PepperDash.Essentials.Room.MobileControl
}));
// shutdown things
EISC.SetSigTrueAction(BoolJoin.ShutdownCancel, new Action(() =>
EISC.SetSigTrueAction(JoinMap.ShutdownCancel.JoinNumber, new Action(() =>
PostMessage("/room/shutdown/", new
{
state = "wasCancelled"
})));
EISC.SetSigTrueAction(BoolJoin.ShutdownEnd, new Action(() =>
EISC.SetSigTrueAction(JoinMap.ShutdownEnd.JoinNumber, new Action(() =>
PostMessage("/room/shutdown/", new
{
state = "hasFinished"
})));
EISC.SetSigTrueAction(BoolJoin.ShutdownStart, new Action(() =>
EISC.SetSigTrueAction(JoinMap.ShutdownStart.JoinNumber, new Action(() =>
PostMessage("/room/shutdown/", new
{
state = "hasStarted",
duration = EISC.UShortOutput[UshortJoin.ShutdownPromptDuration].UShortValue
duration = EISC.UShortOutput[JoinMap.ShutdownPromptDuration.JoinNumber].UShortValue
})));
// Config things
EISC.SetSigTrueAction(BoolJoin.ConfigIsReady, LoadConfigValues);
EISC.SetSigTrueAction(JoinMap.ConfigIsReady.JoinNumber, LoadConfigValues);
// Activity modes
EISC.SetSigTrueAction(BoolJoin.ActivityShare, () => UpdateActivity(1));
EISC.SetSigTrueAction(BoolJoin.ActivityPhoneCall, () => UpdateActivity(2));
EISC.SetSigTrueAction(BoolJoin.ActivityVideoCall, () => UpdateActivity(3));
EISC.SetSigTrueAction(JoinMap.ActivityShare.JoinNumber, () => UpdateActivity(1));
EISC.SetSigTrueAction(JoinMap.ActivityPhoneCall.JoinNumber, () => UpdateActivity(2));
EISC.SetSigTrueAction(JoinMap.ActivityVideoCall.JoinNumber, () => UpdateActivity(3));
}
@@ -556,7 +402,7 @@ namespace PepperDash.Essentials.Room.MobileControl
Debug.Console(0, this, "Replacing Room[0] in config");
co.Rooms[0] = rm;
}
rm.Name = EISC.StringOutput[StringJoin.ConfigRoomName].StringValue;
rm.Name = EISC.StringOutput[JoinMap.ConfigRoomName.JoinNumber].StringValue;
rm.Key = "room1";
rm.Type = "ddvc01";
@@ -567,13 +413,13 @@ namespace PepperDash.Essentials.Room.MobileControl
rmProps = JsonConvert.DeserializeObject<DDVC01RoomPropertiesConfig>(rm.Properties.ToString());
rmProps.Help = new EssentialsHelpPropertiesConfig();
rmProps.Help.CallButtonText = EISC.StringOutput[StringJoin.ConfigHelpNumber].StringValue;
rmProps.Help.Message = EISC.StringOutput[StringJoin.ConfigHelpMessage].StringValue;
rmProps.Help.CallButtonText = EISC.StringOutput[JoinMap.ConfigHelpNumber.JoinNumber].StringValue;
rmProps.Help.Message = EISC.StringOutput[JoinMap.ConfigHelpMessage.JoinNumber].StringValue;
rmProps.Environment = new EssentialsEnvironmentPropertiesConfig(); // enabled defaults to false
rmProps.RoomPhoneNumber = EISC.StringOutput[StringJoin.ConfigRoomPhoneNumber].StringValue;
rmProps.RoomURI = EISC.StringOutput[StringJoin.ConfigRoomURI].StringValue;
rmProps.RoomPhoneNumber = EISC.StringOutput[JoinMap.ConfigRoomPhoneNumber.JoinNumber].StringValue;
rmProps.RoomURI = EISC.StringOutput[JoinMap.ConfigRoomURI.JoinNumber].StringValue;
rmProps.SpeedDials = new List<DDVC01SpeedDial>();
// This MAY need a check
@@ -581,7 +427,7 @@ namespace PepperDash.Essentials.Room.MobileControl
rmProps.VideoCodecKey = "videoCodec";
// volume control names
var volCount = EISC.UShortOutput[UshortJoin.NumberOfAuxFaders].UShortValue;
var volCount = EISC.UShortOutput[JoinMap.NumberOfAuxFaders.JoinNumber].UShortValue;
//// use Volumes object or?
//rmProps.VolumeSliderNames = new List<string>();
@@ -626,18 +472,18 @@ namespace PepperDash.Essentials.Room.MobileControl
// add sources...
for (uint i = 0; i <= 19; i++)
{
var name = EISC.StringOutput[StringJoin.SourceNameJoinStart + i].StringValue;
if (EISC.BooleanOutput[BoolJoin.UseSourceEnabled].BoolValue
&& !EISC.BooleanOutput[BoolJoin.SourceIsEnabledJoinStart + i].BoolValue)
var name = EISC.StringOutput[JoinMap.SourceNameJoinStart.JoinNumber + i].StringValue;
if (EISC.BooleanOutput[JoinMap.UseSourceEnabled.JoinNumber].BoolValue
&& !EISC.BooleanOutput[JoinMap.SourceIsEnabledJoinStart.JoinNumber + i].BoolValue)
{
continue;
}
else if(!EISC.BooleanOutput[BoolJoin.UseSourceEnabled].BoolValue && string.IsNullOrEmpty(name))
else if(!EISC.BooleanOutput[JoinMap.UseSourceEnabled.JoinNumber].BoolValue && string.IsNullOrEmpty(name))
break;
var icon = EISC.StringOutput[StringJoin.SourceIconJoinStart + i].StringValue;
var key = EISC.StringOutput[StringJoin.SourceKeyJoinStart + i].StringValue;
var type = EISC.StringOutput[StringJoin.SourceTypeJoinStart + i].StringValue;
var disableShare = EISC.BooleanOutput[BoolJoin.SourceShareDisableJoinStart + i].BoolValue;
var icon = EISC.StringOutput[JoinMap.SourceIconJoinStart.JoinNumber + i].StringValue;
var key = EISC.StringOutput[JoinMap.SourceKeyJoinStart.JoinNumber + i].StringValue;
var type = EISC.StringOutput[JoinMap.SourceTypeJoinStart.JoinNumber + i].StringValue;
var disableShare = EISC.BooleanOutput[JoinMap.SourceShareDisableJoinStart.JoinNumber + i].BoolValue;
Debug.Console(0, this, "Adding source {0} '{1}'", key, name);
var newSLI = new SourceListItem{
@@ -679,14 +525,14 @@ namespace PepperDash.Essentials.Room.MobileControl
var acFavs = new List<PepperDash.Essentials.Devices.Common.Codec.CodecActiveCallItem>();
for (uint i = 0; i < 4; i++)
{
if (!EISC.GetBool(BoolJoin.SpeedDialVisibleStartJoin + i))
if (!EISC.GetBool(JoinMap.SpeedDialVisibleStartJoin.JoinNumber + i))
{
break;
}
acFavs.Add(new PepperDash.Essentials.Devices.Common.Codec.CodecActiveCallItem()
{
Name = EISC.GetString(StringJoin.SpeedDialNameStartJoin + i),
Number = EISC.GetString(StringJoin.SpeedDialNumberStartJoin + i),
Name = EISC.GetString(JoinMap.SpeedDialNameStartJoin.JoinNumber + i),
Number = EISC.GetString(JoinMap.SpeedDialNumberStartJoin.JoinNumber + i),
Type = PepperDash.Essentials.Devices.Common.Codec.eCodecCallType.Audio
});
}
@@ -718,7 +564,7 @@ namespace PepperDash.Essentials.Room.MobileControl
var camsProps = new List<object>();
for (uint i = 0; i < 9; i++)
{
var name = EISC.GetString(i + StringJoin.CameraNearNameStart);
var name = EISC.GetString(i + JoinMap.CameraNearNameStart.JoinNumber);
if (!string.IsNullOrEmpty(name))
{
camsProps.Add(new
@@ -728,7 +574,7 @@ namespace PepperDash.Essentials.Room.MobileControl
});
}
}
var farName = EISC.GetString(StringJoin.CameraFarName);
var farName = EISC.GetString(JoinMap.CameraFarName.JoinNumber);
if (!string.IsNullOrEmpty(farName))
{
camsProps.Add(new
@@ -755,6 +601,8 @@ namespace PepperDash.Essentials.Room.MobileControl
co.Devices.Add(conf);
}
SetupDeviceMessengers();
Debug.Console(0, this, "******* CONFIG FROM DDVC: \r{0}", JsonConvert.SerializeObject(ConfigReader.ConfigObject, Formatting.Indented));
var handler = ConfigurationIsReady;
@@ -766,6 +614,67 @@ namespace PepperDash.Essentials.Room.MobileControl
ConfigIsLoaded = true;
}
/// <summary>
/// Iterates device config and adds messengers as neede for each device type
/// </summary>
void SetupDeviceMessengers()
{
try
{
foreach (var device in ConfigReader.ConfigObject.Devices)
{
if (device.Group.Equals("simplmessenger"))
{
var props = JsonConvert.DeserializeObject<SimplMessengerPropertiesConfig>(device.Properties.ToString());
var messengerKey = string.Format("device-{0}-{1}", this.Key, Parent.Key);
if (DeviceManager.GetDeviceForKey(messengerKey) != null)
{
Debug.Console(2, this, "Messenger with key: {0} already exists. Skipping...", messengerKey);
continue;
}
var dev = ConfigReader.ConfigObject.GetDeviceForKey(props.DeviceKey);
if (dev == null)
{
Debug.Console(1, this, "Unable to find device config for key: '{0}'", props.DeviceKey);
continue;
}
var type = device.Type.ToLower();
MessengerBase messenger = null;
if (type.Equals("simplcameramessenger"))
{
Debug.Console(2, this, "Adding SIMPLCameraMessenger for: '{0}'", props.DeviceKey);
messenger = new SIMPLCameraMessenger(messengerKey, EISC, "/device/" + props.DeviceKey, props.JoinStart);
}
else if (type.Equals("simplroutemessenger"))
{
Debug.Console(2, this, "Adding SIMPLRouteMessenger for: '{0}'", props.DeviceKey);
messenger = new SIMPLRouteMessenger(messengerKey, EISC, "/device/" + props.DeviceKey, props.JoinStart);
}
if (messenger != null)
{
DeviceManager.AddDevice(messenger);
messenger.RegisterWithAppServer(Parent);
}
else
{
Debug.Console(2, this, "Unable to add messenger for device: '{0}' of type: '{1}'", props.DeviceKey, type);
}
}
}
}
catch (Exception e)
{
Debug.Console(2, this, "Error Setting up Device Managers: {0}", e);
}
}
/// <summary>
///
/// </summary>
@@ -773,7 +682,7 @@ namespace PepperDash.Essentials.Room.MobileControl
{
if (ConfigIsLoaded)
{
var count = EISC.UShortOutput[UshortJoin.NumberOfAuxFaders].UShortValue;
var count = EISC.UShortOutput[JoinMap.NumberOfAuxFaders.JoinNumber].UShortValue;
Debug.Console(1, this, "The Fader Count is : {0}", count);
@@ -781,7 +690,11 @@ namespace PepperDash.Essentials.Room.MobileControl
// Create auxFaders
var auxFaderDict = new Dictionary<string, Volume>();
for (uint i = 2; i <= count; i++)
var volumeStart = JoinMap.VolumeJoinStart.JoinNumber;
var volumeEnd = JoinMap.VolumeJoinStart.JoinNumber + JoinMap.VolumeJoinStart.JoinSpan;
for (uint i = volumeStart; i <= count; i++)
{
auxFaderDict.Add("level-" + i,
new Volume("level-" + i,
@@ -795,22 +708,22 @@ namespace PepperDash.Essentials.Room.MobileControl
var volumes = new Volumes();
volumes.Master = new Volume("master",
EISC.UShortOutput[UshortJoin.MasterVolumeLevel].UShortValue,
EISC.BooleanOutput[BoolJoin.MasterVolumeIsMuted].BoolValue,
EISC.StringOutput[1].StringValue,
EISC.UShortOutput[JoinMap.MasterVolume.JoinNumber].UShortValue,
EISC.BooleanOutput[JoinMap.MasterVolume.JoinNumber].BoolValue,
EISC.StringOutput[JoinMap.MasterVolume.JoinNumber].StringValue,
true,
"something.png");
volumes.Master.HasPrivacyMute = true;
volumes.Master.PrivacyMuted = EISC.BooleanOutput[BoolJoin.PrivacyMute].BoolValue;
volumes.Master.PrivacyMuted = EISC.BooleanOutput[JoinMap.PrivacyMute.JoinNumber].BoolValue;
volumes.AuxFaders = auxFaderDict;
volumes.NumberOfAuxFaders = EISC.UShortInput[UshortJoin.NumberOfAuxFaders].UShortValue;
volumes.NumberOfAuxFaders = EISC.UShortInput[JoinMap.NumberOfAuxFaders.JoinNumber].UShortValue;
PostStatusMessage(new
{
activityMode = GetActivityMode(),
isOn = EISC.BooleanOutput[BoolJoin.RoomIsOn].BoolValue,
selectedSourceKey = EISC.StringOutput[StringJoin.SelectedSourceKey].StringValue,
isOn = EISC.BooleanOutput[JoinMap.RoomIsOn.JoinNumber].BoolValue,
selectedSourceKey = EISC.StringOutput[JoinMap.CurrentSourceKey.JoinNumber].StringValue,
volumes = volumes
});
}
@@ -829,9 +742,9 @@ namespace PepperDash.Essentials.Room.MobileControl
/// <returns></returns>
int GetActivityMode()
{
if (EISC.BooleanOutput[BoolJoin.ActivityPhoneCall].BoolValue) return 2;
else if (EISC.BooleanOutput[BoolJoin.ActivityShare].BoolValue) return 1;
else if (EISC.BooleanOutput[BoolJoin.ActivityVideoCall].BoolValue) return 3;
if (EISC.BooleanOutput[JoinMap.ActivityPhoneCall.JoinNumber].BoolValue) return 2;
else if (EISC.BooleanOutput[JoinMap.ActivityShare.JoinNumber].BoolValue) return 1;
else if (EISC.BooleanOutput[JoinMap.ActivityVideoCall.JoinNumber].BoolValue) return 3;
return 0;
}
@@ -873,12 +786,15 @@ namespace PepperDash.Essentials.Room.MobileControl
if (Debug.Level >= 1)
Debug.Console(1, this, "DDVC EISC 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);
if (uo != null)
{
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);
}
}
/// <summary>
@@ -905,8 +821,39 @@ namespace PepperDash.Essentials.Room.MobileControl
protected override void UserCodeChange()
{
Debug.Console(1, this, "Server user code changed: {0}", UserCode);
EISC.StringInput[StringJoin.UserCodeToSystem].StringValue = UserCode;
EISC.StringInput[StringJoin.ServerUrl].StringValue = Parent.Config.ClientAppUrl;
EISC.StringInput[JoinMap.UserCodeToSystem.JoinNumber].StringValue = UserCode;
EISC.StringInput[JoinMap.ServerUrl.JoinNumber].StringValue = Parent.Config.ClientAppUrl;
}
}
public class MobileControlSIMPLRoomBridgeFactory : EssentialsDeviceFactory<MobileControlSIMPLRoomBridge>
{
public MobileControlSIMPLRoomBridgeFactory()
{
TypeNames = new List<string>() { "mobilecontrolbridge-ddvc01", "mobilecontrolbridge-simpl" };
}
public override EssentialsDevice BuildDevice(DeviceConfig dc)
{
Debug.Console(1, "Factory Attempting to create new MobileControlSIMPLRoomBridge Device");
var comm = CommFactory.GetControlPropertiesConfig(dc);
var bridge = new PepperDash.Essentials.Room.MobileControl.MobileControlSIMPLRoomBridge(dc.Key, dc.Name, comm.IpIdInt);
bridge.AddPreActivationAction(() =>
{
var parent = DeviceManager.AllDevices.FirstOrDefault(d => d.Key == "appServer") as MobileControlSystemController;
if (parent == null)
{
Debug.Console(0, bridge, "ERROR: Cannot connect bridge. System controller not present");
}
Debug.Console(0, bridge, "Linking to parent controller");
bridge.AddParent(parent);
parent.AddBridge(bridge);
});
return bridge;
}
}
}

View File

@@ -0,0 +1,115 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.AppServer
{
public class MobileControlSIMPLRoomJoinMap : JoinMapBaseAdvanced
{
[JoinName("MasterVolume")]
public JoinDataComplete MasterVolume = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 }, new JoinMetadata() {Label = "Master Volume Mute Toggle/FB/Level/Label", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.DigitalAnalogSerial });
[JoinName("VolumeJoinStart")]
public JoinDataComplete VolumeJoinStart = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 8 }, new JoinMetadata() {Label = "Volume Mute Toggle/FB/Level/Label", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.DigitalAnalogSerial });
[JoinName("PrivacyMute")]
public JoinDataComplete PrivacyMute = new JoinDataComplete(new JoinData() { JoinNumber = 12, JoinSpan = 1 }, new JoinMetadata() { Label = "Privacy Mute Toggle/FB", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("PromptForCode")]
public JoinDataComplete PromptForCode = new JoinDataComplete(new JoinData() { JoinNumber = 41, JoinSpan = 1 }, new JoinMetadata() {Label = "Prompt User for Code", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("ClientJoined")]
public JoinDataComplete ClientJoined = new JoinDataComplete(new JoinData() { JoinNumber = 42, JoinSpan = 1 }, new JoinMetadata() { Label = "Client Joined", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("ActivityShare")]
public JoinDataComplete ActivityShare = new JoinDataComplete(new JoinData() { JoinNumber = 51, JoinSpan = 1 }, new JoinMetadata() {Label = "Activity Share", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("ActivityPhoneCall")]
public JoinDataComplete ActivityPhoneCall = new JoinDataComplete(new JoinData() { JoinNumber = 52, JoinSpan = 1 }, new JoinMetadata() { Label = "Activity Phone Call", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("ActivityVideoCall")]
public JoinDataComplete ActivityVideoCall = new JoinDataComplete(new JoinData() { JoinNumber = 53, JoinSpan = 1 }, new JoinMetadata() { Label = "Activity Video Call", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("ShutdownPromptDuration")]
public JoinDataComplete ShutdownPromptDuration = new JoinDataComplete(new JoinData() { JoinNumber = 61, JoinSpan = 1 }, new JoinMetadata() { Label ="Shutdown Cancel", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
[JoinName("ShutdownCancel")]
public JoinDataComplete ShutdownCancel = new JoinDataComplete(new JoinData() { JoinNumber = 61, JoinSpan = 1 }, new JoinMetadata() { Label ="Shutdown Cancel", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("ShutdownEnd")]
public JoinDataComplete ShutdownEnd = new JoinDataComplete(new JoinData() { JoinNumber = 62, JoinSpan = 1 }, new JoinMetadata() { Label = "Shutdown End", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("ShutdownStart")]
public JoinDataComplete ShutdownStart = new JoinDataComplete(new JoinData() { JoinNumber = 63, JoinSpan = 1 }, new JoinMetadata() { Label = "Shutdown Start", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("SourceHasChanged")]
public JoinDataComplete SourceHasChanged = new JoinDataComplete(new JoinData() { JoinNumber = 71, JoinSpan = 1 }, new JoinMetadata() { Label = "Source Changed", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("CurrentSourceKey")]
public JoinDataComplete CurrentSourceKey = new JoinDataComplete(new JoinData() { JoinNumber = 71, JoinSpan = 1 }, new JoinMetadata() { Label = "Key of selected source", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Serial });
[JoinName("ConfigIsLocal")]
public JoinDataComplete ConfigIsLocal = new JoinDataComplete(new JoinData() { JoinNumber = 100, JoinSpan = 1 }, new JoinMetadata() { Label = "Config is local to Essentials", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("NumberOfAuxFaders")]
public JoinDataComplete NumberOfAuxFaders = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 1 }, new JoinMetadata() { Label = "Number of Auxilliary Faders", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
[JoinName("SpeedDialNameStartJoin")]
public JoinDataComplete SpeedDialNameStartJoin = new JoinDataComplete(new JoinData() { JoinNumber = 241, JoinSpan = 10 }, new JoinMetadata() { Label = "Speed Dial names", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("SpeedDialNumberStartJoin")]
public JoinDataComplete SpeedDialNumberStartJoin = new JoinDataComplete(new JoinData() { JoinNumber = 251, JoinSpan = 10 }, new JoinMetadata() { Label = "Speed Dial numbers", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("SpeedDialVisibleStartJoin")]
public JoinDataComplete SpeedDialVisibleStartJoin = new JoinDataComplete(new JoinData() { JoinNumber = 261, JoinSpan = 10 }, new JoinMetadata() { Label = "Speed Dial Visible", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("RoomIsOn")]
public JoinDataComplete RoomIsOn = new JoinDataComplete(new JoinData() { JoinNumber = 301, JoinSpan = 1 }, new JoinMetadata() { Label = "Room Is On", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("UserCodeToSystem")]
public JoinDataComplete UserCodeToSystem = new JoinDataComplete(new JoinData() { JoinNumber = 401, JoinSpan = 1 }, new JoinMetadata() { Label = "User Ccde", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("ServerUrl")]
public JoinDataComplete ServerUrl = new JoinDataComplete(new JoinData() { JoinNumber = 402, JoinSpan = 1 }, new JoinMetadata() { Label ="Server URL", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("ConfigRoomName")]
public JoinDataComplete ConfigRoomName = new JoinDataComplete(new JoinData() { JoinNumber = 501, JoinSpan = 1 }, new JoinMetadata() {Label = "Room Nnme", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("ConfigHelpMessage")]
public JoinDataComplete ConfigHelpMessage = new JoinDataComplete(new JoinData() { JoinNumber = 502, JoinSpan = 1 }, new JoinMetadata() { Label = "Room help message", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("ConfigHelpNumber")]
public JoinDataComplete ConfigHelpNumber = new JoinDataComplete(new JoinData() { JoinNumber = 503, JoinSpan = 1 }, new JoinMetadata() { Label = "Room help number", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("ConfigRoomPhoneNumber")]
public JoinDataComplete ConfigRoomPhoneNumber = new JoinDataComplete(new JoinData() { JoinNumber = 504, JoinSpan = 1 }, new JoinMetadata() { Label = "Room phone number", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("ConfigRoomURI")]
public JoinDataComplete ConfigRoomURI = new JoinDataComplete(new JoinData() { JoinNumber = 505, JoinSpan = 1 }, new JoinMetadata() { Label = "Room URI", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("ConfigIsReady")]
public JoinDataComplete ConfigIsReady = new JoinDataComplete(new JoinData() { JoinNumber = 501, JoinSpan = 1 }, new JoinMetadata() { Label = "Config info from SIMPL is ready", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("HideVideoConfRecents")]
public JoinDataComplete HideVideoConfRecents = new JoinDataComplete(new JoinData() { JoinNumber = 502, JoinSpan = 1 }, new JoinMetadata() { Label = "Hide Video Conference Recents", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("ShowCameraWhenNotInCall")]
public JoinDataComplete ShowCameraWhenNotInCall = new JoinDataComplete(new JoinData() { JoinNumber = 503, JoinSpan = 1 }, new JoinMetadata() { Label = "Show camera when not in call", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("UseSourceEnabled")]
public JoinDataComplete UseSourceEnabled = new JoinDataComplete(new JoinData() { JoinNumber = 504, JoinSpan = 1 }, new JoinMetadata() { Label = "Use Source Enabled Joins", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("SourceShareDisableJoinStart")]
public JoinDataComplete SourceShareDisableJoinStart = new JoinDataComplete(new JoinData() { JoinNumber = 601, JoinSpan = 20 }, new JoinMetadata() { Label = "Source is not sharable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("SourceIsEnabledJoinStart")]
public JoinDataComplete SourceIsEnabledJoinStart = new JoinDataComplete(new JoinData() { JoinNumber = 621, JoinSpan = 20 }, new JoinMetadata() { Label = "Source is enabled", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("SourceNameJoinStart")]
public JoinDataComplete SourceNameJoinStart = new JoinDataComplete(new JoinData() { JoinNumber = 601, JoinSpan = 20 }, new JoinMetadata() { Label = "Source Names", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("SourceIconJoinStart")]
public JoinDataComplete SourceIconJoinStart = new JoinDataComplete(new JoinData() { JoinNumber = 621, JoinSpan = 20 }, new JoinMetadata() { Label = "Source Icons", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("SourceKeyJoinStart")]
public JoinDataComplete SourceKeyJoinStart = new JoinDataComplete(new JoinData() { JoinNumber = 641, JoinSpan = 20 }, new JoinMetadata() { Label = "Source Keys", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("SourceTypeJoinStart")]
public JoinDataComplete SourceTypeJoinStart = new JoinDataComplete(new JoinData() { JoinNumber = 661, JoinSpan = 20 }, new JoinMetadata() { Label = "Source Types", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("CameraNearNameStart")]
public JoinDataComplete CameraNearNameStart = new JoinDataComplete(new JoinData() { JoinNumber = 761, JoinSpan = 10 }, new JoinMetadata() { Label = "Near End Camera Names", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("CameraFarName")]
public JoinDataComplete CameraFarName = new JoinDataComplete(new JoinData() { JoinNumber = 770, JoinSpan = 1 }, new JoinMetadata() { Label = "Far End Camera Name", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
public MobileControlSIMPLRoomJoinMap(uint joinStart)
:base(joinStart)
{
}
}
}

View File

@@ -0,0 +1,69 @@
using System.Linq;
using Crestron.SimplSharp.Reflection;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.AppServer
{
public class SIMPLAtcJoinMap : JoinMapBaseAdvanced
{
[JoinName("EndCall")]
public JoinDataComplete EndCall = new JoinDataComplete(new JoinData() { JoinNumber = 21, JoinSpan = 1 }, new JoinMetadata() { Label = "Hang Up", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("IncomingAnswer")]
public JoinDataComplete IncomingAnswer = new JoinDataComplete(new JoinData() { JoinNumber = 51, JoinSpan = 1 }, new JoinMetadata() { Label = "Answer Incoming Call", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("IncomingReject")]
public JoinDataComplete IncomingReject = new JoinDataComplete(new JoinData() { JoinNumber = 52, JoinSpan = 1 }, new JoinMetadata() { Label = "Reject Incoming Call", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("SpeedDialStart")]
public JoinDataComplete SpeedDialStart = new JoinDataComplete(new JoinData() { JoinNumber = 41, JoinSpan = 4 }, new JoinMetadata() { Label = "Speed Dial", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("CurrentDialString")]
public JoinDataComplete CurrentDialString = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 }, new JoinMetadata() { Label = "Current Dial String", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Serial });
[JoinName("CurrentCallNumber")]
public JoinDataComplete CurrentCallNumber = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 }, new JoinMetadata() { Label = "Current Call Number", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("CurrentCallName")]
public JoinDataComplete CurrentCallName = new JoinDataComplete(new JoinData() { JoinNumber = 12, JoinSpan = 1 }, new JoinMetadata() { Label = "Current Call Name", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("HookState")]
public JoinDataComplete HookState = new JoinDataComplete(new JoinData() { JoinNumber = 21, JoinSpan = 1 }, new JoinMetadata() { Label = "Current Hook State", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("CallDirection")]
public JoinDataComplete CallDirection = new JoinDataComplete(new JoinData() { JoinNumber = 22, JoinSpan = 1 }, new JoinMetadata() { Label = "Current Call Direction", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("IncomingCallName")]
public JoinDataComplete IncomingCallName = new JoinDataComplete(new JoinData() { JoinNumber = 51, JoinSpan = 1 }, new JoinMetadata() { Label = "Incoming Call Name", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("IncomingCallNumber")]
public JoinDataComplete IncomingCallNumber = new JoinDataComplete(new JoinData() { JoinNumber = 52, JoinSpan = 1 }, new JoinMetadata() { Label = "Incoming Call Number", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("0")]
public JoinDataComplete Dtmf0 = new JoinDataComplete(new JoinData() { JoinNumber = 10, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 0", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("1")]
public JoinDataComplete Dtmf1 = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 1", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("2")]
public JoinDataComplete Dtmf2 = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 2", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("3")]
public JoinDataComplete Dtmf3 = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 3", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("4")]
public JoinDataComplete Dtmf4 = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 4", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("5")]
public JoinDataComplete Dtmf5 = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 5", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("6")]
public JoinDataComplete Dtmf6 = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 6", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("7")]
public JoinDataComplete Dtmf7 = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 7", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("8")]
public JoinDataComplete Dtmf8 = new JoinDataComplete(new JoinData() { JoinNumber = 8, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 8", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("9")]
public JoinDataComplete Dtmf9 = new JoinDataComplete(new JoinData() { JoinNumber = 9, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 9", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("*")]
public JoinDataComplete DtmfStar = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF *", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("#")]
public JoinDataComplete DtmfPound = new JoinDataComplete(new JoinData() { JoinNumber = 12, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF #", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Constructor that passes the joinStart to the base class
/// </summary>
/// <param name="joinStart"></param>
public SIMPLAtcJoinMap(uint joinStart)
: base(joinStart)
{
}
}
}

View File

@@ -0,0 +1,141 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.AppServer
{
public class SIMPLVtcJoinMap : JoinMapBaseAdvanced
{
[JoinName("EndCall")]
public JoinDataComplete EndCall = new JoinDataComplete(new JoinData() { JoinNumber = 24, JoinSpan = 1 }, new JoinMetadata() { Label = "Hang Up", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("IncomingCall")]
public JoinDataComplete IncomingCall = new JoinDataComplete(new JoinData() { JoinNumber = 50, JoinSpan = 1 }, new JoinMetadata() { Label = "Incoming Call", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("IncomingAnswer")]
public JoinDataComplete IncomingAnswer = new JoinDataComplete(new JoinData() { JoinNumber = 51, JoinSpan = 1 }, new JoinMetadata() { Label = "Answer Incoming Call", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("IncomingReject")]
public JoinDataComplete IncomingReject = new JoinDataComplete(new JoinData() { JoinNumber = 52, JoinSpan = 1 }, new JoinMetadata() { Label = "Reject Incoming Call", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("SpeedDialStart")]
public JoinDataComplete SpeedDialStart = new JoinDataComplete(new JoinData() { JoinNumber = 41, JoinSpan = 4 }, new JoinMetadata() { Label = "Speed Dial", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("DirectorySearchBusy")]
public JoinDataComplete DirectorySearchBusy = new JoinDataComplete(new JoinData() { JoinNumber = 100, JoinSpan = 1 }, new JoinMetadata() { Label = "Directory Search Busy FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("DirectoryLineSelected")]
public JoinDataComplete DirectoryLineSelected = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 1 }, new JoinMetadata() { Label = "Directory Line Selected FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("DirectoryEntryIsContact")]
public JoinDataComplete DirectoryEntryIsContact = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 1 }, new JoinMetadata() { Label = "Directory Selected Entry Is Contact FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("DirectoryIsRoot")]
public JoinDataComplete DirectoryIsRoot = new JoinDataComplete(new JoinData() { JoinNumber = 102, JoinSpan = 1 }, new JoinMetadata() { Label = "Directory is on Root FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("DDirectoryHasChanged")]
public JoinDataComplete DDirectoryHasChanged = new JoinDataComplete(new JoinData() { JoinNumber = 103, JoinSpan = 1 }, new JoinMetadata() {Label = "Directory has changed FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("DirectoryRoot")]
public JoinDataComplete DirectoryRoot = new JoinDataComplete(new JoinData() { JoinNumber = 104, JoinSpan = 1 }, new JoinMetadata() { Label = "Go to Directory Root", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("DirectoryFolderBack")]
public JoinDataComplete DirectoryFolderBack = new JoinDataComplete(new JoinData() { JoinNumber = 105, JoinSpan = 1 }, new JoinMetadata() { Label = "Go back one directory level", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("DirectoryDialSelectedLine")]
public JoinDataComplete DirectoryDialSelectedLine = new JoinDataComplete(new JoinData() { JoinNumber = 106, JoinSpan = 1 }, new JoinMetadata() { Label = "Dial selected directory line", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraTiltUp")]
public JoinDataComplete CameraTiltUp = new JoinDataComplete(new JoinData() { JoinNumber = 111, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Tilt Up", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraTiltDown")]
public JoinDataComplete CameraTiltDown = new JoinDataComplete(new JoinData() { JoinNumber = 112, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Tilt Down", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraPanLeft")]
public JoinDataComplete CameraPanLeft = new JoinDataComplete(new JoinData() { JoinNumber = 113, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Pan Left", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraPanRight")]
public JoinDataComplete CameraPanRight = new JoinDataComplete(new JoinData() { JoinNumber = 114, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Pan Right", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraZoomIn")]
public JoinDataComplete CameraZoomIn = new JoinDataComplete(new JoinData() { JoinNumber = 115, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Zoom In", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraZoomOut")]
public JoinDataComplete CameraZoomOut = new JoinDataComplete(new JoinData() { JoinNumber = 116, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Zoom Out", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraPresetStart")]
public JoinDataComplete CameraPresetStart = new JoinDataComplete(new JoinData() { JoinNumber = 121, JoinSpan = 5 }, new JoinMetadata() { Label = "Camera Presets", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraModeAuto")]
public JoinDataComplete CameraModeAuto = new JoinDataComplete(new JoinData() { JoinNumber = 131, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Mode Auto", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraModeManual")]
public JoinDataComplete CameraModeManual = new JoinDataComplete(new JoinData() { JoinNumber = 132, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Mode Manual", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraModeOff")]
public JoinDataComplete CameraModeOff = new JoinDataComplete(new JoinData() { JoinNumber = 133, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Mode Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraSelfView")]
public JoinDataComplete CameraSelfView = new JoinDataComplete(new JoinData() { JoinNumber = 141, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Self View Toggle/FB", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraLayout")]
public JoinDataComplete CameraLayout = new JoinDataComplete(new JoinData() { JoinNumber = 142, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Layout Toggle", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraSupportsAutoMode")]
public JoinDataComplete CameraSupportsAutoMode = new JoinDataComplete(new JoinData() { JoinNumber = 143, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Supports Auto Mode FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraSupportsOffMode")]
public JoinDataComplete CameraSupportsOffMode = new JoinDataComplete(new JoinData() { JoinNumber = 144, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Supports Off Mode FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraNumberSelect")]
public JoinDataComplete CameraNumberSelect = new JoinDataComplete(new JoinData() { JoinNumber = 60, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Number Select/FB", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("DirectorySelectRow")]
public JoinDataComplete DirectorySelectRow = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 1 }, new JoinMetadata() { Label = "Directory Select Row", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("DirectoryRowCount")]
public JoinDataComplete DirectoryRowCount = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 1 }, new JoinMetadata() { Label = "Directory Row Count FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("CurrentDialString")]
public JoinDataComplete CurrentDialString = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 }, new JoinMetadata() { Label = "Current Dial String", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Serial });
[JoinName("CurrentCallName")]
public JoinDataComplete CurrentCallName = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 }, new JoinMetadata() { Label = "Current Call Name", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("CurrentCallNumber")]
public JoinDataComplete CurrentCallNumber = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 }, new JoinMetadata() { Label = "Current Call Number", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("HookState")]
public JoinDataComplete HookState = new JoinDataComplete(new JoinData() { JoinNumber = 31, JoinSpan = 1 }, new JoinMetadata() { Label = "Current Hook State", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("CallDirection")]
public JoinDataComplete CallDirection = new JoinDataComplete(new JoinData() { JoinNumber = 22, JoinSpan = 1 }, new JoinMetadata() { Label = "Current Call Direction", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("IncomingCallName")]
public JoinDataComplete IncomingCallName = new JoinDataComplete(new JoinData() { JoinNumber = 51, JoinSpan = 1 }, new JoinMetadata() { Label = "Incoming Call Name", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("IncomingCallNumber")]
public JoinDataComplete IncomingCallNumber = new JoinDataComplete(new JoinData() { JoinNumber = 52, JoinSpan = 1 }, new JoinMetadata() { Label = "Incoming Call Number", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("DirectorySearchString")]
public JoinDataComplete DirectorySearchString = new JoinDataComplete(new JoinData() { JoinNumber = 100, JoinSpan = 1 }, new JoinMetadata() { Label = "Directory Search String", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("DirectoryEntriesStart")]
public JoinDataComplete DirectoryEntriesStart = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 255 }, new JoinMetadata() { Label = "Directory Entries", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("DirectoryEntrySelectedName")]
public JoinDataComplete DirectoryEntrySelectedName = new JoinDataComplete(new JoinData() { JoinNumber = 356, JoinSpan = 1 }, new JoinMetadata() { Label = "Selected Directory Entry Name", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("DirectoryEntrySelectedNumber")]
public JoinDataComplete DirectoryEntrySelectedNumber = new JoinDataComplete(new JoinData() { JoinNumber = 357, JoinSpan = 1 }, new JoinMetadata() { Label = "Selected Directory Entry Number", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("DirectorySelectedFolderName")]
public JoinDataComplete DirectorySelectedFolderName = new JoinDataComplete(new JoinData() { JoinNumber = 358, JoinSpan = 1 }, new JoinMetadata() { Label = "Selected Directory Folder Name", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("1")]
public JoinDataComplete Dtmf1 = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 1", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("2")]
public JoinDataComplete Dtmf2 = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 2", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("3")]
public JoinDataComplete Dtmf3 = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 3", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("4")]
public JoinDataComplete Dtmf4 = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 4", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("5")]
public JoinDataComplete Dtmf5 = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 5", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("6")]
public JoinDataComplete Dtmf6 = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 6", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("7")]
public JoinDataComplete Dtmf7 = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 7", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("8")]
public JoinDataComplete Dtmf8 = new JoinDataComplete(new JoinData() { JoinNumber = 8, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 8", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("9")]
public JoinDataComplete Dtmf9 = new JoinDataComplete(new JoinData() { JoinNumber = 9, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 9", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("0")]
public JoinDataComplete Dtmf0 = new JoinDataComplete(new JoinData() { JoinNumber = 10, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 0", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("*")]
public JoinDataComplete DtmfStar = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF *", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("#")]
public JoinDataComplete DtmfPound = new JoinDataComplete(new JoinData() { JoinNumber = 12, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF #", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
public SIMPLVtcJoinMap(uint joinStart)
:base(joinStart)
{
}
}
}

View File

@@ -11,7 +11,7 @@ using PepperDash.Essentials.DM.AirMedia;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
namespace PepperDash.Essentials.Core.Bridges
{
public static class AirMediaControllerApiExtensions
{
@@ -19,7 +19,7 @@ namespace PepperDash.Essentials.Bridges
{
AirMediaControllerJoinMap joinMap = new AirMediaControllerJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<AirMediaControllerJoinMap>(joinMapSerialized);

View File

@@ -11,7 +11,7 @@ using PepperDash.Essentials.Devices.Common;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
namespace PepperDash.Essentials.Core.Bridges
{
public static class AppleTvApiExtensions
{
@@ -19,7 +19,7 @@ namespace PepperDash.Essentials.Bridges
{
AppleTvJoinMap joinMap = new AppleTvJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if(!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<AppleTvJoinMap>(joinMapSerialized);

View File

@@ -1,305 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.EthernetCommunication;
using Newtonsoft.Json;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Lighting;
using PepperDash.Essentials.Core.Devices;
using PepperDash.Essentials.Devices.Common;
using PepperDash.Essentials.Devices.Common.Cameras;
using PepperDash.Essentials.Core.Config;
using PepperDash.Essentials.Core.CrestronIO;
using PepperDash.Essentials.DM;
//using PepperDash.Essentials.Devices.Common.Cameras;
namespace PepperDash.Essentials.Bridges
{
/// <summary>
/// Base class for all bridge class variants
/// </summary>
public class BridgeBase : Device
{
public BridgeApi Api { get; private set; }
public BridgeBase(string key) :
base(key)
{
}
}
/// <summary>
/// Base class for bridge API variants
/// </summary>
public abstract class BridgeApi : Device
{
public BridgeApi(string key) :
base(key)
{
}
}
/// <summary>
/// Bridge API using EISC
/// </summary>
public class EiscApi : BridgeApi
{
public EiscApiPropertiesConfig PropertiesConfig { get; private set; }
public ThreeSeriesTcpIpEthernetIntersystemCommunications Eisc { get; private set; }
public EiscApi(DeviceConfig dc) :
base(dc.Key)
{
PropertiesConfig = JsonConvert.DeserializeObject<EiscApiPropertiesConfig>(dc.Properties.ToString());
Eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(PropertiesConfig.Control.IpIdInt, PropertiesConfig.Control.TcpSshProperties.Address, Global.ControlSystem);
Eisc.SigChange += new Crestron.SimplSharpPro.DeviceSupport.SigEventHandler(Eisc_SigChange);
Eisc.Register();
AddPostActivationAction( () =>
{
Debug.Console(1, this, "Linking Devices...");
foreach (var d in PropertiesConfig.Devices)
{
var device = DeviceManager.GetDeviceForKey(d.DeviceKey);
if (device != null)
{
if (device is IBridge) // Check for this first to allow bridges in plugins to override existing bridges that apply to the same type.
{
(device as IBridge).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is PepperDash.Essentials.Core.Monitoring.SystemMonitorController)
{
(device as PepperDash.Essentials.Core.Monitoring.SystemMonitorController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is GenericComm)
{
(device as GenericComm).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is CameraBase)
{
(device as CameraBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is PepperDash.Essentials.Core.DisplayBase)
{
(device as DisplayBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is DmChassisController) {
(device as DmChassisController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is DmBladeChassisController) {
(device as DmBladeChassisController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is DmpsRoutingController)
{
(device as DmpsRoutingController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is DmpsAudioOutputController)
{
(device as DmpsAudioOutputController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is DmTxControllerBase)
{
(device as DmTxControllerBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is DmRmcControllerBase)
{
(device as DmRmcControllerBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is GenericRelayDevice)
{
(device as GenericRelayDevice).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is IRSetTopBoxBase)
{
(device as IRSetTopBoxBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is IDigitalInput)
{
(device as IDigitalInput).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is AppleTV)
{
(device as AppleTV).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is HdMdxxxCEController)
{
(device as HdMdxxxCEController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is LightingBase)
{
(device as LightingBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is DigitalLogger)
{
(device as DigitalLogger).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is PepperDash.Essentials.Devices.Common.Occupancy.GlsOccupancySensorBaseController)
{
(device as PepperDash.Essentials.Devices.Common.Occupancy.GlsOccupancySensorBaseController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is StatusSignController)
{
(device as StatusSignController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is C2nRthsController)
{
(device as C2nRthsController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
}
}
Debug.Console(1, this, "Devices Linked.");
});
}
/// <summary>
/// Used for debugging to trigger an action based on a join number and type
/// </summary>
/// <param name="join"></param>
/// <param name="type"></param>
public void ExecuteJoinAction(uint join, string type, object state)
{
try
{
switch (type.ToLower())
{
case "digital":
{
var uo = Eisc.BooleanOutput[join].UserObject as Action<bool>;
if (uo != null)
{
Debug.Console(1, this, "Executing Action: {0}", uo.ToString());
uo(Convert.ToBoolean(state));
}
else
Debug.Console(1, this, "User Action is null. Nothing to Execute");
break;
}
case "analog":
{
var uo = Eisc.BooleanOutput[join].UserObject as Action<ushort>;
if (uo != null)
{
Debug.Console(1, this, "Executing Action: {0}", uo.ToString());
uo(Convert.ToUInt16(state));
}
else
Debug.Console(1, this, "User Action is null. Nothing to Execute"); break;
}
case "serial":
{
var uo = Eisc.BooleanOutput[join].UserObject as Action<string>;
if (uo != null)
{
Debug.Console(1, this, "Executing Action: {0}", uo.ToString());
uo(Convert.ToString(state));
}
else
Debug.Console(1, this, "User Action is null. Nothing to Execute");
break;
}
default:
{
Debug.Console(1, "Unknown join type. Use digital/serial/analog");
break;
}
}
}
catch (Exception e)
{
Debug.Console(1, this, "Error: {0}", e);
}
}
/// <summary>
/// Handles incoming sig changes
/// </summary>
/// <param name="currentDevice"></param>
/// <param name="args"></param>
void Eisc_SigChange(object currentDevice, Crestron.SimplSharpPro.SigEventArgs args)
{
try
{
if (Debug.Level >= 1)
Debug.Console(1, this, "EiscApi change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue);
var uo = args.Sig.UserObject;
if (uo != null)
{
Debug.Console(1, this, "Executing Action: {0}", uo.ToString());
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);
}
}
catch (Exception e)
{
Debug.Console(2, this, "Error in Eisc_SigChange handler: {0}", e);
}
}
}
public class EiscApiPropertiesConfig
{
[JsonProperty("control")]
public EssentialsControlPropertiesConfig Control { get; set; }
[JsonProperty("devices")]
public List<ApiDevice> Devices { get; set; }
public class ApiDevice
{
[JsonProperty("deviceKey")]
public string DeviceKey { get; set; }
[JsonProperty("joinStart")]
public uint JoinStart { get; set; }
[JsonProperty("joinMapKey")]
public string JoinMapKey { get; set; }
}
}
}

View File

@@ -6,6 +6,7 @@ using Crestron.SimplSharp;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Bridges;
using PepperDash.Essentials.Core.Config;
using PepperDash.Core;
using PepperDash.Essentials.Core.Routing;
@@ -15,32 +16,21 @@ using Crestron.SimplSharpPro.EthernetCommunication;
namespace PepperDash.Essentials
{
/// <summary>
/// Responsible for loading all of the device types for this library
/// </summary>
public class BridgeFactory
{
public static IKeyed GetDevice(DeviceConfig dc)
public BridgeFactory()
{
// ? why is this static JTA 2018-06-13?
var eiscApiAdvancedFactory = new EiscApiAdvancedFactory() as IDeviceFactory;
eiscApiAdvancedFactory.LoadTypeFactories();
var key = dc.Key;
var name = dc.Name;
var type = dc.Type;
var properties = dc.Properties;
var propAnon = new { };
var typeName = dc.Type.ToLower();
var groupName = dc.Group.ToLower();
//Debug.Console(2, "Name {0}, Key {1}, Type {2}, Properties {3}", name, key, type, properties.ToString());
if (typeName == "eiscapi")
{
return new EiscApi(dc);
}
return null;
var eiscApiFactory = new EiscApiFactory() as IDeviceFactory;
eiscApiFactory.LoadTypeFactories();
}
}
}
public class CommBridge : Device
{

View File

@@ -4,7 +4,7 @@ using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.CrestronIO;
namespace PepperDash.Essentials.Bridges
namespace PepperDash.Essentials.Core.Bridges
{
public static class C2nRthsControllerApiExtensions
{
@@ -13,7 +13,7 @@ namespace PepperDash.Essentials.Bridges
{
var joinMap = new C2nRthsControllerJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<C2nRthsControllerJoinMap>(joinMapSerialized);

View File

@@ -11,33 +11,35 @@ using PepperDash.Essentials.Devices.Common.Cameras;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
namespace PepperDash.Essentials.Core.Bridges
{
public static class CameraControllerApiExtensions
{
public static void LinkToApi(this PepperDash.Essentials.Devices.Common.Cameras.CameraBase cameraDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
public static void LinkToApi(this PepperDash.Essentials.Devices.Common.Cameras.CameraBase cameraDevice, BasicTriList trilist, uint joinStart, string joinMapKey, EiscApi bridge)
{
CameraControllerJoinMap joinMap = new CameraControllerJoinMap();
CameraControllerJoinMap joinMap = new CameraControllerJoinMap(joinStart);
// Adds the join map to the bridge
bridge.AddJoinMap(cameraDevice.Key, joinMap);
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
var customJoins = JoinMapHelper.TryGetJoinMapAdvancedForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<CameraControllerJoinMap>(joinMapSerialized);
joinMap.OffsetJoinNumbers(joinStart);
if (customJoins != null)
{
joinMap.SetCustomJoinData(customJoins);
}
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
Debug.Console(0, "Linking to Bridge Type {0}", cameraDevice.GetType().Name.ToString());
var commMonitor = cameraDevice as ICommunicationMonitor;
commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
var ptzCamera = cameraDevice as IHasCameraPtzControl;
if (ptzCamera != null)
{
trilist.SetBoolSigAction(joinMap.Left, (b) =>
trilist.SetBoolSigAction(joinMap.PanLeft.JoinNumber, (b) =>
{
if (b)
{
@@ -48,7 +50,7 @@ namespace PepperDash.Essentials.Bridges
ptzCamera.PanStop();
}
});
trilist.SetBoolSigAction(joinMap.Right, (b) =>
trilist.SetBoolSigAction(joinMap.PanRight.JoinNumber, (b) =>
{
if (b)
{
@@ -60,7 +62,7 @@ namespace PepperDash.Essentials.Bridges
}
});
trilist.SetBoolSigAction(joinMap.Up, (b) =>
trilist.SetBoolSigAction(joinMap.TiltUp.JoinNumber, (b) =>
{
if (b)
{
@@ -71,7 +73,7 @@ namespace PepperDash.Essentials.Bridges
ptzCamera.TiltStop();
}
});
trilist.SetBoolSigAction(joinMap.Down, (b) =>
trilist.SetBoolSigAction(joinMap.TiltDown.JoinNumber, (b) =>
{
if (b)
{
@@ -83,7 +85,7 @@ namespace PepperDash.Essentials.Bridges
}
});
trilist.SetBoolSigAction(joinMap.ZoomIn, (b) =>
trilist.SetBoolSigAction(joinMap.ZoomIn.JoinNumber, (b) =>
{
if (b)
{
@@ -95,7 +97,7 @@ namespace PepperDash.Essentials.Bridges
}
});
trilist.SetBoolSigAction(joinMap.ZoomOut, (b) =>
trilist.SetBoolSigAction(joinMap.ZoomOut.JoinNumber, (b) =>
{
if (b)
{
@@ -108,27 +110,57 @@ namespace PepperDash.Essentials.Bridges
});
}
if (cameraDevice.GetType().Name.ToString().ToLower() == "cameravisca")
if (cameraDevice is IPower)
{
var viscaCamera = cameraDevice as PepperDash.Essentials.Devices.Common.Cameras.CameraVisca;
trilist.SetSigTrueAction(joinMap.PowerOn, () => viscaCamera.PowerOn());
trilist.SetSigTrueAction(joinMap.PowerOff, () => viscaCamera.PowerOff());
var powerCamera = cameraDevice as IPower;
trilist.SetSigTrueAction(joinMap.PowerOn.JoinNumber, () => powerCamera.PowerOn());
trilist.SetSigTrueAction(joinMap.PowerOff.JoinNumber, () => powerCamera.PowerOff());
powerCamera.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn.JoinNumber]);
powerCamera.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff.JoinNumber]);
}
viscaCamera.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn]);
viscaCamera.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff]);
if (cameraDevice is ICommunicationMonitor)
{
var monitoredCamera = cameraDevice as ICommunicationMonitor;
monitoredCamera.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
}
viscaCamera.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
for (int i = 0; i < joinMap.NumberOfPresets; i++)
if (cameraDevice is IHasCameraPresets)
{
// Set the preset lables when they change
var presetsCamera = cameraDevice as IHasCameraPresets;
presetsCamera.PresetsListHasChanged += new EventHandler<EventArgs>((o, a) =>
{
for (int i = 1; i <= joinMap.NumberOfPresets.JoinNumber; i++)
{
int tempNum = i - 1;
string label = "" ;
var preset = presetsCamera.Presets.FirstOrDefault(p => p.ID.Equals(i));
if (preset != null)
label = preset.Description;
trilist.SetString((ushort)(joinMap.PresetLabelStart.JoinNumber + tempNum), label);
}
});
for (int i = 0; i < joinMap.NumberOfPresets.JoinNumber; i++)
{
int tempNum = i;
trilist.SetSigTrueAction((ushort)(joinMap.PresetRecallOffset + tempNum), () =>
trilist.SetSigTrueAction((ushort)(joinMap.PresetRecallStart.JoinNumber + tempNum), () =>
{
viscaCamera.RecallPreset(tempNum);
presetsCamera.PresetSelect(tempNum);
});
trilist.SetSigTrueAction((ushort)(joinMap.PresetSaveStart.JoinNumber + tempNum), () =>
{
var label = trilist.GetString((ushort)(joinMap.PresetLabelStart.JoinNumber + tempNum));
presetsCamera.PresetStore(tempNum, label);
});
trilist.SetSigTrueAction((ushort)(joinMap.PresetSaveOffset + tempNum), () =>
{
viscaCamera.SavePreset(tempNum);
});
}
}
}

View File

@@ -1,42 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Devices.Common;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
{
public static class DigitalLoggerApiExtensions
{
public static void LinkToApi(this DigitalLogger DigitalLogger, BasicTriList trilist, uint joinStart, string joinMapKey)
{
DigitalLoggerJoinMap joinMap = new DigitalLoggerJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<DigitalLoggerJoinMap>(joinMapSerialized);
joinMap.OffsetJoinNumbers(joinStart);
Debug.Console(1, DigitalLogger, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
for (uint i = 1; i <= DigitalLogger.CircuitCount; i++)
{
var circuit = i;
DigitalLogger.CircuitNameFeedbacks[circuit - 1].LinkInputSig(trilist.StringInput[joinMap.CircuitNames + circuit]);
DigitalLogger.CircuitIsCritical[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitIsCritical + circuit]);
DigitalLogger.CircuitState[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitState + circuit]);
trilist.SetSigTrueAction(joinMap.CircuitCycle + circuit, () => DigitalLogger.CycleCircuit(circuit - 1));
trilist.SetSigTrueAction(joinMap.CircuitOnCmd + circuit, () => DigitalLogger.TurnOnCircuit(circuit - 1));
trilist.SetSigTrueAction(joinMap.CircuitOffCmd + circuit, () => DigitalLogger.TurnOffCircuit(circuit - 1));
}
}
}
}

View File

@@ -1,153 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Devices.Common;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
{
public static class DisplayControllerApiExtensions
{
public static void LinkToApi(this PepperDash.Essentials.Core.DisplayBase displayDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
{
int inputNumber = 0;
IntFeedback inputNumberFeedback;
List<string> inputKeys = new List<string>();
DisplayControllerJoinMap joinMap = new DisplayControllerJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
if(!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<DisplayControllerJoinMap>(joinMapSerialized);
joinMap.OffsetJoinNumbers(joinStart);
Debug.Console(1, "Linking to Trilist '{0}'",trilist.ID.ToString("X"));
Debug.Console(0, "Linking to Display: {0}", displayDevice.Name);
trilist.StringInput[joinMap.Name].StringValue = displayDevice.Name;
var commMonitor = displayDevice as ICommunicationMonitor;
if (commMonitor != null)
{
commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
}
inputNumberFeedback = new IntFeedback(() => { return inputNumber; });
// Two way feedbacks
var twoWayDisplay = displayDevice as PepperDash.Essentials.Core.TwoWayDisplayBase;
if (twoWayDisplay != null)
{
trilist.SetBool(joinMap.IsTwoWayDisplay, true);
twoWayDisplay.CurrentInputFeedback.OutputChange += new EventHandler<FeedbackEventArgs>(CurrentInputFeedback_OutputChange);
inputNumberFeedback.LinkInputSig(trilist.UShortInput[joinMap.InputSelect]);
}
// Power Off
trilist.SetSigTrueAction(joinMap.PowerOff, () =>
{
inputNumber = 102;
inputNumberFeedback.FireUpdate();
displayDevice.PowerOff();
});
displayDevice.PowerIsOnFeedback.OutputChange += new EventHandler<FeedbackEventArgs>( (o,a) => {
if (!a.BoolValue)
{
inputNumber = 102;
inputNumberFeedback.FireUpdate();
}
else
{
inputNumber = 0;
inputNumberFeedback.FireUpdate();
}
});
displayDevice.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff]);
// PowerOn
trilist.SetSigTrueAction(joinMap.PowerOn, () =>
{
inputNumber = 0;
inputNumberFeedback.FireUpdate();
displayDevice.PowerOn();
});
displayDevice.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn]);
int count = 1;
foreach (var input in displayDevice.InputPorts)
{
inputKeys.Add(input.Key.ToString());
var tempKey = inputKeys.ElementAt(count - 1);
trilist.SetSigTrueAction((ushort)(joinMap.InputSelectOffset + count), () => { displayDevice.ExecuteSwitch(displayDevice.InputPorts[tempKey].Selector); });
Debug.Console(2, displayDevice, "Setting Input Select Action on Digital Join {0} to Input: {1}", joinMap.InputSelectOffset + count, displayDevice.InputPorts[tempKey].Key.ToString());
trilist.StringInput[(ushort)(joinMap.InputNamesOffset + count)].StringValue = input.Key.ToString();
count++;
}
Debug.Console(2, displayDevice, "Setting Input Select Action on Analog Join {0}", joinMap.InputSelect);
trilist.SetUShortSigAction(joinMap.InputSelect, (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)
{
trilist.SetBoolSigAction(joinMap.VolumeUp, (b) => volumeDisplay.VolumeUp(b));
trilist.SetBoolSigAction(joinMap.VolumeDown, (b) => volumeDisplay.VolumeDown(b));
trilist.SetSigTrueAction(joinMap.VolumeMute, () => volumeDisplay.MuteToggle());
var volumeDisplayWithFeedback = volumeDisplay as IBasicVolumeWithFeedback;
if(volumeDisplayWithFeedback != null)
{
trilist.SetUShortSigAction(joinMap.VolumeLevel, new Action<ushort>((u) => volumeDisplayWithFeedback.SetVolume(u)));
volumeDisplayWithFeedback.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[joinMap.VolumeLevel]);
volumeDisplayWithFeedback.MuteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VolumeMute]);
}
}
}
static void CurrentInputFeedback_OutputChange(object sender, FeedbackEventArgs e)
{
Debug.Console(0, "CurrentInputFeedback_OutputChange {0}", e.StringValue);
}
}
}

View File

@@ -1,222 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharpPro.DM;
using Crestron.SimplSharpPro.DM.Endpoints;
using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.DM;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges {
public static class DmBladeChassisControllerApiExtentions {
public static void LinkToApi(this DmBladeChassisController dmChassis, BasicTriList trilist, uint joinStart, string joinMapKey) {
DmBladeChassisControllerJoinMap joinMap = new DmBladeChassisControllerJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<DmBladeChassisControllerJoinMap>(joinMapSerialized);
joinMap.OffsetJoinNumbers(joinStart);
Debug.Console(1, dmChassis, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
var chassis = dmChassis.Chassis as BladeSwitch;
dmChassis.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
// Link up outputs
for (uint i = 1; i <= dmChassis.Chassis.NumberOfOutputs; i++) {
var ioSlot = i;
// Control
trilist.SetUShortSigAction(joinMap.OutputVideo + ioSlot, new Action<ushort>(o => dmChassis.ExecuteSwitch(o, ioSlot, eRoutingSignalType.Video)));
if (dmChassis.TxDictionary.ContainsKey(ioSlot)) {
Debug.Console(2, "Creating Tx Feedbacks {0}", ioSlot);
var txKey = dmChassis.TxDictionary[ioSlot];
var basicTxDevice = DeviceManager.GetDeviceForKey(txKey) as BasicDmTxControllerBase;
var advancedTxDevice = basicTxDevice as DmTxControllerBase;
if (dmChassis.Chassis is DmMd128x128 || dmChassis.Chassis is DmMd64x64) {
dmChassis.InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
}
else {
if (advancedTxDevice != null) {
advancedTxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
Debug.Console(2, "Linking Tx Online Feedback from Advanced Transmitter at input {0}", ioSlot);
}
else if (dmChassis.InputEndpointOnlineFeedbacks[ioSlot] != null) {
Debug.Console(2, "Linking Tx Online Feedback from Input Card {0}", ioSlot);
dmChassis.InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
}
}
if (basicTxDevice != null && advancedTxDevice == null)
trilist.BooleanInput[joinMap.TxAdvancedIsPresent + ioSlot].BoolValue = true;
if (advancedTxDevice != null) {
advancedTxDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
}
else if (advancedTxDevice == null || basicTxDevice != null) {
Debug.Console(1, "Setting up actions and feedbacks on input card {0}", ioSlot);
dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
var inputPort = dmChassis.InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)];
if (inputPort != null) {
Debug.Console(1, "Port value for input card {0} is set", ioSlot);
var port = inputPort.Port;
if (port != null) {
if (port is HdmiInputWithCEC) {
Debug.Console(1, "Port is HdmiInputWithCec");
var hdmiInPortWCec = port as HdmiInputWithCEC;
if (hdmiInPortWCec.HdcpSupportedLevel != eHdcpSupportedLevel.Unknown) {
SetHdcpStateAction(true, hdmiInPortWCec, joinMap.HdcpSupportState + ioSlot, trilist);
}
dmChassis.InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]);
if (dmChassis.InputCardHdcpCapabilityTypes.ContainsKey(ioSlot))
trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = (ushort)dmChassis.InputCardHdcpCapabilityTypes[ioSlot];
else
trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = 1;
}
}
}
else {
inputPort = dmChassis.InputPorts[string.Format("inputCard{0}--dmIn", ioSlot)];
if (inputPort != null) {
var port = inputPort.Port;
if (port is DMInputPortWithCec) {
Debug.Console(1, "Port is DMInputPortWithCec");
var dmInPortWCec = port as DMInputPortWithCec;
if (dmInPortWCec != null) {
SetHdcpStateAction(dmChassis.PropertiesConfig.InputSlotSupportsHdcp2[ioSlot], dmInPortWCec, joinMap.HdcpSupportState + ioSlot, trilist);
}
dmChassis.InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]);
if (dmChassis.InputCardHdcpCapabilityTypes.ContainsKey(ioSlot))
trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = (ushort)dmChassis.InputCardHdcpCapabilityTypes[ioSlot];
else
trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = 1;
}
}
}
}
}
else {
dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
var inputPort = dmChassis.InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)];
if (inputPort != null) {
var hdmiPort = inputPort.Port as EndpointHdmiInput;
if (hdmiPort != null) {
SetHdcpStateAction(true, hdmiPort, joinMap.HdcpSupportState + ioSlot, trilist);
dmChassis.InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]);
}
}
}
if (dmChassis.RxDictionary.ContainsKey(ioSlot)) {
Debug.Console(2, "Creating Rx Feedbacks {0}", ioSlot);
//var rxKey = dmChassis.RxDictionary[ioSlot];
//var rxDevice = DeviceManager.GetDeviceForKey(rxKey) as DmRmcControllerBase;
//var hdBaseTDevice = DeviceManager.GetDeviceForKey(rxKey) as DmHdBaseTControllerBase;
//if (hdBaseTDevice != null) {
dmChassis.OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]);
//}
//else if (rxDevice != null) {
// rxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]);
//}
}
// Feedback
dmChassis.VideoOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputVideo + ioSlot]);
dmChassis.OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames + ioSlot]);
dmChassis.InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames + ioSlot]);
dmChassis.OutputVideoRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentVideoInputNames + ioSlot]);
}
}
static void SetHdcpStateAction(bool hdcpTypeSimple, HdmiInputWithCEC port, uint join, BasicTriList trilist) {
if (hdcpTypeSimple) {
trilist.SetUShortSigAction(join,
new Action<ushort>(s => {
if (s == 0) {
port.HdcpSupportOff();
}
else if (s > 0) {
port.HdcpSupportOn();
}
}));
}
else {
trilist.SetUShortSigAction(join,
new Action<ushort>(u => {
port.HdcpReceiveCapability = (eHdcpCapabilityType)u;
}));
}
}
static void SetHdcpStateAction(bool hdcpTypeSimple, EndpointHdmiInput port, uint join, BasicTriList trilist) {
if (hdcpTypeSimple) {
trilist.SetUShortSigAction(join,
new Action<ushort>(s => {
if (s == 0) {
port.HdcpSupportOff();
}
else if (s > 0) {
port.HdcpSupportOn();
}
}));
}
else {
trilist.SetUShortSigAction(join,
new Action<ushort>(u => {
port.HdcpCapability = (eHdcpCapabilityType)u;
}));
}
}
static void SetHdcpStateAction(bool supportsHdcp2, DMInputPortWithCec port, uint join, BasicTriList trilist) {
if (!supportsHdcp2) {
trilist.SetUShortSigAction(join,
new Action<ushort>(s => {
if (s == 0) {
port.HdcpSupportOff();
}
else if (s > 0) {
port.HdcpSupportOn();
}
}));
}
else {
trilist.SetUShortSigAction(join,
new Action<ushort>(u => {
port.HdcpReceiveCapability = (eHdcpCapabilityType)u;
}));
}
}
}
}

View File

@@ -15,7 +15,7 @@ using PepperDash.Essentials.DM;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
namespace PepperDash.Essentials.Core.Bridges
{
public static class DmChassisControllerApiExtentions
{
@@ -23,7 +23,7 @@ namespace PepperDash.Essentials.Bridges
{
DmChassisControllerJoinMap joinMap = new DmChassisControllerJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<DmChassisControllerJoinMap>(joinMapSerialized);

View File

@@ -11,7 +11,7 @@ using PepperDash.Essentials.DM;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
namespace PepperDash.Essentials.Core.Bridges
{
public static class DmRmcControllerApiExtensions
{
@@ -19,7 +19,7 @@ namespace PepperDash.Essentials.Bridges
{
DmRmcControllerJoinMap joinMap = new DmRmcControllerJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<DmRmcControllerJoinMap>(joinMapSerialized);

View File

@@ -14,7 +14,7 @@ using PepperDash.Essentials.DM;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
namespace PepperDash.Essentials.Core.Bridges
{
public static class DmTxControllerApiExtensions
{
@@ -22,7 +22,7 @@ namespace PepperDash.Essentials.Bridges
{
DmTxControllerJoinMap joinMap = new DmTxControllerJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<DmTxControllerJoinMap>(joinMapSerialized);

View File

@@ -12,7 +12,7 @@ using PepperDash.Essentials.DM;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
namespace PepperDash.Essentials.Core.Bridges
{
public static class DmpsAudioOutputControllerApiExtensions
{
@@ -20,7 +20,7 @@ namespace PepperDash.Essentials.Bridges
{
DmpsAudioOutputControllerJoinMap joinMap = new DmpsAudioOutputControllerJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<DmpsAudioOutputControllerJoinMap>(joinMapSerialized);

View File

@@ -12,7 +12,7 @@ using PepperDash.Essentials.DM;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
namespace PepperDash.Essentials.Core.Bridges
{
public static class DmpsRoutingControllerApiExtentions
{
@@ -20,7 +20,7 @@ namespace PepperDash.Essentials.Bridges
{
DmpsRoutingControllerJoinMap joinMap = new DmpsRoutingControllerJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<DmpsRoutingControllerJoinMap>(joinMapSerialized);

View File

@@ -0,0 +1,177 @@
using System;
using System.Collections.Generic;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.EthernetCommunication;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Bridges;
using PepperDash.Essentials.Core.Config;
namespace PepperDash.Essentials.Bridges
{
[Obsolete("Please use 'eiscapiadvanced' in configurations going forward")]
public class EiscApi : BridgeApi
{
public EiscApiPropertiesConfig PropertiesConfig { get; private set; }
public ThreeSeriesTcpIpEthernetIntersystemCommunications Eisc { get; private set; }
public EiscApi(DeviceConfig dc) :
base(dc.Key)
{
PropertiesConfig = dc.Properties.ToObject<EiscApiPropertiesConfig>();
//PropertiesConfig = JsonConvert.DeserializeObject<EiscApiPropertiesConfig>(dc.Properties.ToString());
Eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(PropertiesConfig.Control.IpIdInt, PropertiesConfig.Control.TcpSshProperties.Address, Global.ControlSystem);
Eisc.SigChange += Eisc_SigChange;
Eisc.Register();
AddPostActivationAction(() =>
{
Debug.Console(1, this, "Linking Devices...");
foreach (var d in PropertiesConfig.Devices)
{
var device = DeviceManager.GetDeviceForKey(d.DeviceKey);
if (device == null) continue;
Debug.Console(1, this, "Linking Device: '{0}'", device.Key);
if (device is IBridge) // Check for this first to allow bridges in plugins to override existing bridges that apply to the same type.
{
Debug.Console(2, this, "'{0}' is IBridge", device.Key);
var dev = device as IBridge;
dev.LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
}
if (!(device is IBridgeAdvanced)) continue;
Debug.Console(2, this, "'{0}' is IBridgeAdvanced", device.Key);
var advDev = device as IBridgeAdvanced;
try
{
advDev.LinkToApi(Eisc, d.JoinStart, d.JoinMapKey, null);
}
catch (NullReferenceException)
{
Debug.ConsoleWithLog(0, this,
"Please update the bridge config to use EiscBridgeAdvanced with this device: {0}", device.Key);
}
}
Debug.Console(1, this, "Devices Linked.");
});
}
/// <summary>
/// Used for debugging to trigger an action based on a join number and type
/// </summary>
/// <param name="join"></param>
/// <param name="type"></param>
/// <param name="state"></param>
public void ExecuteJoinAction(uint join, string type, object state)
{
try
{
switch (type.ToLower())
{
case "digital":
{
var uo = Eisc.BooleanOutput[join].UserObject as Action<bool>;
if (uo != null)
{
Debug.Console(1, this, "Executing Action: {0}", uo.ToString());
uo(Convert.ToBoolean(state));
}
else
Debug.Console(1, this, "User Action is null. Nothing to Execute");
break;
}
case "analog":
{
var uo = Eisc.BooleanOutput[join].UserObject as Action<ushort>;
if (uo != null)
{
Debug.Console(1, this, "Executing Action: {0}", uo.ToString());
uo(Convert.ToUInt16(state));
}
else
Debug.Console(1, this, "User Action is null. Nothing to Execute"); break;
}
case "serial":
{
var uo = Eisc.BooleanOutput[join].UserObject as Action<string>;
if (uo != null)
{
Debug.Console(1, this, "Executing Action: {0}", uo.ToString());
uo(Convert.ToString(state));
}
else
Debug.Console(1, this, "User Action is null. Nothing to Execute");
break;
}
default:
{
Debug.Console(1, "Unknown join type. Use digital/serial/analog");
break;
}
}
}
catch (Exception e)
{
Debug.Console(1, this, "Error: {0}", e);
}
}
/// <summary>
/// Handles incoming sig changes
/// </summary>
/// <param name="currentDevice"></param>
/// <param name="args"></param>
void Eisc_SigChange(object currentDevice, SigEventArgs args)
{
try
{
if (Debug.Level >= 1)
Debug.Console(1, this, "EiscApi change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue);
var uo = args.Sig.UserObject;
if (uo == null) return;
Debug.Console(1, this, "Executing Action: {0}", uo.ToString());
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);
}
catch (Exception e)
{
Debug.Console(2, this, "Error in Eisc_SigChange handler: {0}", e);
}
}
}
public class EiscApiFactory : EssentialsDeviceFactory<EiscApiAdvanced>
{
public EiscApiFactory()
{
TypeNames = new List<string>() { "eiscapi" };
}
public override EssentialsDevice BuildDevice(DeviceConfig dc)
{
Debug.Console(1, "Factory Attempting to create new EiscApi Device");
return new EiscApi(dc);
}
}
}

View File

@@ -10,7 +10,7 @@ using PepperDash.Essentials.Devices.Common;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
namespace PepperDash.Essentials.Core.Bridges
{
public static class GenericLightingApiExtensions
{
@@ -18,7 +18,7 @@ namespace PepperDash.Essentials.Bridges
{
GenericLightingJoinMap joinMap = new GenericLightingJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<GenericLightingJoinMap>(joinMapSerialized);

View File

@@ -11,7 +11,7 @@ using PepperDash.Essentials.Core.CrestronIO;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
namespace PepperDash.Essentials.Core.Bridges
{
public static class GenericRelayDeviceApiExtensions
{
@@ -19,7 +19,7 @@ namespace PepperDash.Essentials.Bridges
{
GenericRelayControllerJoinMap joinMap = new GenericRelayControllerJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<GenericRelayControllerJoinMap>(joinMapSerialized);

View File

@@ -12,7 +12,7 @@ using PepperDash.Core;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
namespace PepperDash.Essentials.Core.Bridges
{
public static class GlsOccupancySensorBaseControllerApiExtensions
{
@@ -20,7 +20,7 @@ namespace PepperDash.Essentials.Bridges
{
GlsOccupancySensorBaseJoinMap joinMap = new GlsOccupancySensorBaseJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<GlsOccupancySensorBaseJoinMap>(joinMapSerialized);

View File

@@ -14,7 +14,7 @@ using PepperDash.Essentials.DM;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
namespace PepperDash.Essentials.Core.Bridges
{
public static class HdMdxxxCEControllerApiExtensions
{
@@ -22,7 +22,7 @@ namespace PepperDash.Essentials.Bridges
{
HdMdxxxCEControllerJoinMap joinMap = new HdMdxxxCEControllerJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<HdMdxxxCEControllerJoinMap>(joinMapSerialized);

View File

@@ -10,7 +10,7 @@ using PepperDash.Essentials.Core;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
namespace PepperDash.Essentials.Core.Bridges
{
public static class IBasicCommunicationApiExtensions
{
@@ -18,7 +18,7 @@ namespace PepperDash.Essentials.Bridges
{
IBasicCommunicationJoinMap joinMap = new IBasicCommunicationJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<IBasicCommunicationJoinMap>(joinMapSerialized);

View File

@@ -1,12 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DeviceSupport;
namespace PepperDash.Essentials.Bridges
{
/// <summary>
/// Defines a device that uses the legacy JoinMapBase for its join map
/// </summary>
[Obsolete("IBridgeAdvanced should be used going forward with JoinMapBaseAdvanced")]
public interface IBridge
{
void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey);

View File

@@ -11,7 +11,7 @@ using PepperDash.Essentials.Core.CrestronIO;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
namespace PepperDash.Essentials.Core.Bridges
{
public static class IDigitalInputApiExtenstions
{
@@ -19,7 +19,7 @@ namespace PepperDash.Essentials.Bridges
{
IDigitalInputJoinMap joinMap = new IDigitalInputJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<IDigitalInputJoinMap>(joinMapSerialized);

View File

@@ -10,14 +10,14 @@ using PepperDash.Essentials.Devices.Common;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
namespace PepperDash.Essentials.Core.Bridges
{
public static class IRSetTopBoxBaseApiExtensions
{
public static void LinkToApi(this PepperDash.Essentials.Devices.Common.IRSetTopBoxBase stbDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
{
SetTopBoxControllerJoinMap joinMap = new SetTopBoxControllerJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<SetTopBoxControllerJoinMap>(joinMapSerialized);

View File

@@ -7,6 +7,7 @@ using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
[Obsolete("Please use version PepperDash.Essentials.Core.Bridges")]
public class AirMediaControllerJoinMap : JoinMapBase
{
#region Digitals

View File

@@ -7,6 +7,7 @@ using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
[Obsolete("Please use version PepperDash.Essentials.Core.Bridges")]
public class AppleTvJoinMap : JoinMapBase
{
#region Digitals

View File

@@ -1,43 +1,45 @@
using System.Linq;
using Crestron.SimplSharp.Reflection;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
public class C2nRthsControllerJoinMap:JoinMapBase
{
public uint IsOnline { get; set; }
public uint Name { get; set; }
public uint Temperature { get; set; }
public uint Humidity { get; set; }
public uint TemperatureFormat { get; set; }
public C2nRthsControllerJoinMap()
{
//digital
IsOnline = 1;
TemperatureFormat = 2;
//Analog
Temperature = 2;
Humidity = 3;
//serial
Name = 1;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
var properties =
GetType().GetCType().GetProperties().Where(p => p.PropertyType == typeof(uint)).ToList();
foreach (var propertyInfo in properties)
{
propertyInfo.SetValue(this, (uint)propertyInfo.GetValue(this, null) + joinOffset, null);
}
}
}
using System;
using System.Linq;
using Crestron.SimplSharp.Reflection;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
[Obsolete("Please use version PepperDash.Essentials.Core.Bridges")]
public class C2nRthsControllerJoinMap:JoinMapBase
{
public uint IsOnline { get; set; }
public uint Name { get; set; }
public uint Temperature { get; set; }
public uint Humidity { get; set; }
public uint TemperatureFormat { get; set; }
public C2nRthsControllerJoinMap()
{
//digital
IsOnline = 1;
TemperatureFormat = 2;
//Analog
Temperature = 2;
Humidity = 3;
//serial
Name = 1;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
var properties =
GetType().GetCType().GetProperties().Where(p => p.PropertyType == typeof(uint)).ToList();
foreach (var propertyInfo in properties)
{
propertyInfo.SetValue(this, (uint)propertyInfo.GetValue(this, null) + joinOffset, null);
}
}
}
}

View File

@@ -8,54 +8,59 @@ using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
public class CameraControllerJoinMap : JoinMapBase
/// <summary>
/// Join map for CameraBase devices
/// </summary>
///
[Obsolete("Please use version PepperDash.Essentials.Core.Bridges")]
public class CameraControllerJoinMap : JoinMapBaseAdvanced
{
public uint IsOnline { get; set; }
public uint PowerOff { get; set; }
public uint PowerOn { get; set; }
public uint Up { get; set; }
public uint Down { get; set; }
public uint Left { get; set; }
public uint Right { get; set; }
public uint ZoomIn { get; set; }
public uint ZoomOut { get; set; }
public uint PresetRecallOffset { get; set; }
public uint PresetSaveOffset { get; set; }
public uint NumberOfPresets { get; set; }
[JoinName("TiltUp")]
public JoinDataComplete TiltUp = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 }, new JoinMetadata() { Label = "Tilt Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("TiltDown")]
public JoinDataComplete TiltDown = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 }, new JoinMetadata() { Label = "Tilt Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("PanLeft")]
public JoinDataComplete PanLeft = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 }, new JoinMetadata() { Label = "Pan Left", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("PanRight")]
public JoinDataComplete PanRight = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 }, new JoinMetadata() { Label = "Pan Right", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("ZoomIn")]
public JoinDataComplete ZoomIn = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 }, new JoinMetadata() { Label = "Zoom In", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("ZoomOut")]
public JoinDataComplete ZoomOut = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 }, new JoinMetadata() { Label = "Zoom Out", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
public CameraControllerJoinMap()
[JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 9, JoinSpan = 1 }, new JoinMetadata() { Label = "Is Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("PowerOn")]
public JoinDataComplete PowerOn = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 }, new JoinMetadata() { Label = "Power On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("PowerOff")]
public JoinDataComplete PowerOff = new JoinDataComplete(new JoinData() { JoinNumber = 8, JoinSpan = 1 }, new JoinMetadata() { Label = "Power Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("NumberOfPresets")]
public JoinDataComplete NumberOfPresets = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 }, new JoinMetadata() { Label = "Tells Essentials the number of defined presets", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
[JoinName("PresetRecallStart")]
public JoinDataComplete PresetRecallStart = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 20 }, new JoinMetadata() { Label = "Preset Recall Start", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("PresetLabelStart")]
public JoinDataComplete PresetLabelStart = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 20 }, new JoinMetadata() { Label = "Preset Label Start", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("PresetSaveStart")]
public JoinDataComplete PresetSaveStart = new JoinDataComplete(new JoinData() { JoinNumber = 31, JoinSpan = 20 }, new JoinMetadata() { Label = "Preset Save Start", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraModeAuto")]
public JoinDataComplete CameraModeAuto = new JoinDataComplete(new JoinData() { JoinNumber = 51, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Mode Auto", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraModeManual")]
public JoinDataComplete CameraModeManual = new JoinDataComplete(new JoinData() { JoinNumber = 52, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Mode Manual", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraModeOff")]
public JoinDataComplete CameraModeOff = new JoinDataComplete(new JoinData() { JoinNumber = 53, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Mode Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("SupportsCameraModeAuto")]
public JoinDataComplete SupportsCameraModeAuto = new JoinDataComplete(new JoinData() { JoinNumber = 55, JoinSpan = 1 }, new JoinMetadata() { Label = "Supports Camera Mode Auto", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("SupportsCameraModeOff")]
public JoinDataComplete SupportsCameraModeOff = new JoinDataComplete(new JoinData() { JoinNumber = 56, JoinSpan = 1 }, new JoinMetadata() { Label = "Supports Camera Mode Off", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("SupportsPresets")]
public JoinDataComplete SupportsPresets = new JoinDataComplete(new JoinData() { JoinNumber = 57, JoinSpan = 1 }, new JoinMetadata() { Label = "Supports Presets", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
public CameraControllerJoinMap(uint joinStart)
: base(joinStart, typeof(CameraControllerJoinMap))
{
// Digital
IsOnline = 9;
PowerOff = 8;
PowerOn = 7;
Up = 1;
Down = 2;
Left = 3;
Right = 4;
ZoomIn = 5;
ZoomOut = 6;
PresetRecallOffset = 10;
PresetSaveOffset = 30;
NumberOfPresets = 5;
// Analog
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
IsOnline = IsOnline + joinOffset;
PowerOff = PowerOff + joinOffset;
PowerOn = PowerOn + joinOffset;
Up = Up + joinOffset;
Down = Down + joinOffset;
Left = Left + joinOffset;
Right = Right + joinOffset;
ZoomIn = ZoomIn + joinOffset;
ZoomOut = ZoomOut + joinOffset;
PresetRecallOffset = PresetRecallOffset + joinOffset;
PresetSaveOffset = PresetSaveOffset + joinOffset;
}
}
}

View File

@@ -8,6 +8,7 @@ using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
[Obsolete("Please use version PepperDash.Essentials.Core.Bridges")]
public class DigitalLoggerJoinMap : JoinMapBase
{
public uint IsOnline { get; set; }

View File

@@ -7,6 +7,7 @@ using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
[Obsolete("Please use version PepperDash.Essentials.Core.Bridges")]
public class DisplayControllerJoinMap : JoinMapBase
{
#region Digitals

View File

@@ -1,109 +1,110 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges {
public class DmBladeChassisControllerJoinMap : JoinMapBase {
#region Digital/Analogs
#endregion
#region Digitals
/// <summary>
/// High when device is online
/// </summary>
public uint IsOnline { get; set; }
/// <summary>
/// Range reports video sync feedback for each input
/// </summary>
public uint VideoSyncStatus { get; set; }
/// <summary>
/// Range reports high if corresponding input's endpoint is online
/// </summary>
public uint InputEndpointOnline { get; set; }
/// <summary>
/// Range reports high if corresponding output's endpoint is online
/// </summary>
public uint OutputEndpointOnline { get; set; }
/// <summary>
/// Range reports high if corresponding input's transmitter supports bridging as a separate device for detailed AV switching, HDCP control, etc.
/// </summary>
public uint TxAdvancedIsPresent { get; set; } // indicates that there is an attached transmitter that should be bridged to be interacted with
#endregion
#region Analogs
/// <summary>
/// Range sets and reports the current video source for the corresponding output
/// </summary>
public uint OutputVideo { get; set; }
/// <summary>
/// Range sets and reports the current HDCP state for the corresponding input card
/// </summary>
public uint HdcpSupportState { get; set; }
/// <summary>
/// Range reports the highest supported HDCP state level for the corresponding input card
/// </summary>
public uint HdcpSupportCapability { get; set; }
#endregion
#region Serials
/// <summary>
/// Range sets and reports the name for the corresponding input card
/// </summary>
public uint InputNames { get; set; }
/// <summary>
/// Range sets and reports the name for the corresponding output card
/// </summary>
public uint OutputNames { get; set; }
/// <summary>
/// Range reports the name of the current video source for the corresponding output card
/// </summary>
public uint OutputCurrentVideoInputNames { get; set; }
/// <summary>
/// Range reports the current input resolution for each corresponding input card
/// </summary>
public uint InputCurrentResolution { get; set; }
#endregion
public DmBladeChassisControllerJoinMap() {
//Digital/Analog
//Digital
IsOnline = 11;
VideoSyncStatus = 100; //101-299
InputEndpointOnline = 500; //501-699
OutputEndpointOnline = 700; //701-899
TxAdvancedIsPresent = 1000; //1001-1199
//Analog
OutputVideo = 100; //101-299
HdcpSupportState = 1000; //1001-1199
HdcpSupportCapability = 1200; //1201-1399
//Serial
InputNames = 100; //101-299
OutputNames = 300; //301-499
OutputCurrentVideoInputNames = 2000; //2001-2199
InputCurrentResolution = 2400; // 2401-2599
}
public override void OffsetJoinNumbers(uint joinStart) {
var joinOffset = joinStart - 1;
IsOnline = IsOnline + joinOffset;
OutputVideo = OutputVideo + joinOffset;
VideoSyncStatus = VideoSyncStatus + joinOffset;
InputNames = InputNames + joinOffset;
OutputNames = OutputNames + joinOffset;
OutputCurrentVideoInputNames = OutputCurrentVideoInputNames + joinOffset;
InputCurrentResolution = InputCurrentResolution + joinOffset;
InputEndpointOnline = InputEndpointOnline + joinOffset;
OutputEndpointOnline = OutputEndpointOnline + joinOffset;
HdcpSupportState = HdcpSupportState + joinOffset;
HdcpSupportCapability = HdcpSupportCapability + joinOffset;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges {
[Obsolete("Please use version PepperDash.Essentials.Core.Bridges")]
public class DmBladeChassisControllerJoinMap : JoinMapBase {
#region Digital/Analogs
#endregion
#region Digitals
/// <summary>
/// High when device is online
/// </summary>
public uint IsOnline { get; set; }
/// <summary>
/// Range reports video sync feedback for each input
/// </summary>
public uint VideoSyncStatus { get; set; }
/// <summary>
/// Range reports high if corresponding input's endpoint is online
/// </summary>
public uint InputEndpointOnline { get; set; }
/// <summary>
/// Range reports high if corresponding output's endpoint is online
/// </summary>
public uint OutputEndpointOnline { get; set; }
/// <summary>
/// Range reports high if corresponding input's transmitter supports bridging as a separate device for detailed AV switching, HDCP control, etc.
/// </summary>
public uint TxAdvancedIsPresent { get; set; } // indicates that there is an attached transmitter that should be bridged to be interacted with
#endregion
#region Analogs
/// <summary>
/// Range sets and reports the current video source for the corresponding output
/// </summary>
public uint OutputVideo { get; set; }
/// <summary>
/// Range sets and reports the current HDCP state for the corresponding input card
/// </summary>
public uint HdcpSupportState { get; set; }
/// <summary>
/// Range reports the highest supported HDCP state level for the corresponding input card
/// </summary>
public uint HdcpSupportCapability { get; set; }
#endregion
#region Serials
/// <summary>
/// Range sets and reports the name for the corresponding input card
/// </summary>
public uint InputNames { get; set; }
/// <summary>
/// Range sets and reports the name for the corresponding output card
/// </summary>
public uint OutputNames { get; set; }
/// <summary>
/// Range reports the name of the current video source for the corresponding output card
/// </summary>
public uint OutputCurrentVideoInputNames { get; set; }
/// <summary>
/// Range reports the current input resolution for each corresponding input card
/// </summary>
public uint InputCurrentResolution { get; set; }
#endregion
public DmBladeChassisControllerJoinMap() {
//Digital/Analog
//Digital
IsOnline = 11;
VideoSyncStatus = 100; //101-299
InputEndpointOnline = 500; //501-699
OutputEndpointOnline = 700; //701-899
TxAdvancedIsPresent = 1000; //1001-1199
//Analog
OutputVideo = 100; //101-299
HdcpSupportState = 1000; //1001-1199
HdcpSupportCapability = 1200; //1201-1399
//Serial
InputNames = 100; //101-299
OutputNames = 300; //301-499
OutputCurrentVideoInputNames = 2000; //2001-2199
InputCurrentResolution = 2400; // 2401-2599
}
public override void OffsetJoinNumbers(uint joinStart) {
var joinOffset = joinStart - 1;
IsOnline = IsOnline + joinOffset;
OutputVideo = OutputVideo + joinOffset;
VideoSyncStatus = VideoSyncStatus + joinOffset;
InputNames = InputNames + joinOffset;
OutputNames = OutputNames + joinOffset;
OutputCurrentVideoInputNames = OutputCurrentVideoInputNames + joinOffset;
InputCurrentResolution = InputCurrentResolution + joinOffset;
InputEndpointOnline = InputEndpointOnline + joinOffset;
OutputEndpointOnline = OutputEndpointOnline + joinOffset;
HdcpSupportState = HdcpSupportState + joinOffset;
HdcpSupportCapability = HdcpSupportCapability + joinOffset;
}
}
}

View File

@@ -7,6 +7,7 @@ using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
[Obsolete("Please use version PepperDash.Essentials.Core.Bridges")]
public class DmChassisControllerJoinMap : JoinMapBase
{
#region Digital/Analogs

View File

@@ -7,6 +7,7 @@ using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
[Obsolete("Please use version PepperDash.Essentials.Core.Bridges")]
public class DmRmcControllerJoinMap : JoinMapBase
{
#region Digitals
@@ -37,8 +38,12 @@ namespace PepperDash.Essentials.Bridges
/// Reports the EDID serial number value
/// </summary>
public uint EdidSerialNumber { get; set; }
#endregion
#endregion
#region Analogs
public uint AudioVideoSource { get; set; }
#endregion
public DmRmcControllerJoinMap()
{
// Digital
@@ -50,6 +55,9 @@ namespace PepperDash.Essentials.Bridges
EdidName = 3;
EdidPrefferedTiming = 4;
EdidSerialNumber = 5;
//Analog
AudioVideoSource = 1;
}
public override void OffsetJoinNumbers(uint joinStart)
@@ -61,7 +69,8 @@ namespace PepperDash.Essentials.Bridges
EdidManufacturer = EdidManufacturer + joinOffset;
EdidName = EdidName + joinOffset;
EdidPrefferedTiming = EdidPrefferedTiming + joinOffset;
EdidSerialNumber = EdidSerialNumber + joinOffset;
EdidSerialNumber = EdidSerialNumber + joinOffset;
AudioVideoSource = AudioVideoSource + joinOffset;
}
}
}

View File

@@ -1,12 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
[Obsolete("Please use version PepperDash.Essentials.Core.Bridges")]
public class DmTxControllerJoinMap : JoinMapBase
{
#region Digitals

View File

@@ -7,6 +7,7 @@ using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
[Obsolete("Please use version PepperDash.Essentials.Core.Bridges")]
public class DmpsAudioOutputControllerJoinMap : JoinMapBase
{
#region Digital/Analog

View File

@@ -7,6 +7,7 @@ using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
[Obsolete("Please use version PepperDash.Essentials.Core.Bridges")]
public class DmpsRoutingControllerJoinMap : JoinMapBase
{
#region Digitals

View File

@@ -9,6 +9,7 @@ using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
[Obsolete("Please use version PepperDash.Essentials.Core.Bridges")]
public class GenericLightingJoinMap : JoinMapBase
{
public uint IsOnline { get; set; }

View File

@@ -7,6 +7,7 @@ using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
[Obsolete("Please use version PepperDash.Essentials.Core.Bridges")]
public class GenericRelayControllerJoinMap : JoinMapBase
{
#region Digitals

View File

@@ -1,238 +1,239 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
public class GlsOccupancySensorBaseJoinMap : JoinMapBase
{
#region Digitals
/// <summary>
/// High when device is online
/// </summary>
public uint IsOnline { get; set; }
/// <summary>
/// Forces the device to report occupied status
/// </summary>
public uint ForceOccupied { get; set; }
/// <summary>
/// Forces the device to report vacant status
/// </summary>
public uint ForceVacant { get; set; }
/// <summary>
/// Enables raw status reporting
/// </summary>
public uint EnableRawStates { get; set; }
/// <summary>
/// High when raw occupancy is detected
/// </summary>
public uint RawOccupancyFeedback { get; set; }
/// <summary>
/// High when PIR sensor detects motion
/// </summary>
public uint RawOccupancyPirFeedback { get; set; }
/// <summary>
/// High when US sensor detects motion
/// </summary>
public uint RawOccupancyUsFeedback { get; set; }
/// <summary>
/// High when occupancy is detected
/// </summary>
public uint RoomOccupiedFeedback { get; set; }
/// <summary>
/// Hich when occupancy is detected in the grace period
/// </summary>
public uint GraceOccupancyDetectedFeedback { get; set; }
/// <summary>
/// High when vacancy is detected
/// </summary>
public uint RoomVacantFeedback { get; set; }
/// <summary>
/// Enables the LED Flash when set high
/// </summary>
public uint EnableLedFlash { get; set; }
/// <summary>
/// Disables the LED flash when set high
/// </summary>
public uint DisableLedFlash { get; set; }
/// <summary>
/// Enables the Short Timeout
/// </summary>
public uint EnableShortTimeout { get; set; }
/// <summary>
/// Disables the Short Timout
/// </summary>
public uint DisableShortTimeout { get; set; }
/// <summary>
/// Set high to enable one technology to trigger occupancy
/// </summary>
public uint OrWhenVacated { get; set; }
/// <summary>
/// Set high to require both technologies to trigger occupancy
/// </summary>
public uint AndWhenVacated { get; set; }
/// <summary>
/// Enables Ultrasonic Sensor A
/// </summary>
public uint EnableUsA { get; set; }
/// <summary>
/// Disables Ultrasonic Sensor A
/// </summary>
public uint DisableUsA { get; set; }
/// <summary>
/// Enables Ultrasonic Sensor B
/// </summary>
public uint EnableUsB { get; set; }
/// <summary>
/// Disables Ultrasonic Sensor B
/// </summary>
public uint DisableUsB { get; set; }
/// <summary>
/// Enables Pir
/// </summary>
public uint EnablePir { get; set; }
/// <summary>
/// Disables Pir
/// </summary>
public uint DisablePir { get; set; }
public uint IncrementUsInOccupiedState { get; set; }
public uint DecrementUsInOccupiedState { get; set; }
public uint IncrementUsInVacantState { get; set; }
public uint DecrementUsInVacantState { get; set; }
public uint IncrementPirInOccupiedState { get; set; }
public uint DecrementPirInOccupiedState { get; set; }
public uint IncrementPirInVacantState { get; set; }
public uint DecrementPirInVacantState { get; set; }
#endregion
#region Analogs
/// <summary>
/// Sets adn reports the remote timeout value
/// </summary>
public uint Timeout { get; set; }
/// <summary>
/// Reports the local timeout value
/// </summary>
public uint TimeoutLocalFeedback { get; set; }
/// <summary>
/// Sets the minimum internal photo sensor value and reports the current level
/// </summary>
public uint InternalPhotoSensorValue { get; set; }
/// <summary>
/// Sets the minimum external photo sensor value and reports the current level
/// </summary>
public uint ExternalPhotoSensorValue { get; set; }
public uint UsSensitivityInOccupiedState { get; set; }
public uint UsSensitivityInVacantState { get; set; }
public uint PirSensitivityInOccupiedState { get; set; }
public uint PirSensitivityInVacantState { get; set; }
#endregion
#region Serial
public uint Name { get; set; }
#endregion
public GlsOccupancySensorBaseJoinMap()
{
IsOnline = 1;
ForceOccupied = 2;
ForceVacant = 3;
EnableRawStates = 4;
RoomOccupiedFeedback = 2;
GraceOccupancyDetectedFeedback = 3;
RoomVacantFeedback = 4;
RawOccupancyFeedback = 5;
RawOccupancyPirFeedback = 6;
RawOccupancyUsFeedback = 7;
EnableLedFlash = 11;
DisableLedFlash = 12;
EnableShortTimeout = 13;
DisableShortTimeout = 14;
OrWhenVacated = 15;
AndWhenVacated = 16;
EnableUsA = 17;
DisableUsA = 18;
EnableUsB = 19;
DisableUsB = 20;
EnablePir = 21;
DisablePir = 22;
IncrementUsInOccupiedState = 23;
DecrementUsInOccupiedState = 24;
IncrementUsInVacantState = 25;
DecrementUsInVacantState = 26;
IncrementPirInOccupiedState = 27;
DecrementPirInOccupiedState = 28;
IncrementPirInVacantState = 29;
DecrementPirInVacantState = 30;
Timeout = 1;
TimeoutLocalFeedback = 2;
InternalPhotoSensorValue = 3;
ExternalPhotoSensorValue = 4;
UsSensitivityInOccupiedState = 5;
UsSensitivityInVacantState = 6;
PirSensitivityInOccupiedState = 7;
PirSensitivityInVacantState = 8;
Name = 1;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
IsOnline = IsOnline + joinOffset;
ForceOccupied = ForceOccupied + joinOffset;
ForceVacant = ForceVacant + joinOffset;
EnableRawStates = EnableRawStates + joinOffset;
RoomOccupiedFeedback = RoomOccupiedFeedback + joinOffset;
GraceOccupancyDetectedFeedback = GraceOccupancyDetectedFeedback + joinOffset;
RoomVacantFeedback = RoomVacantFeedback + joinOffset;
RawOccupancyFeedback = RawOccupancyFeedback + joinOffset;
RawOccupancyPirFeedback = RawOccupancyPirFeedback + joinOffset;
RawOccupancyUsFeedback = RawOccupancyUsFeedback + joinOffset;
EnableLedFlash = EnableLedFlash + joinOffset;
DisableLedFlash = DisableLedFlash + joinOffset;
EnableShortTimeout = EnableShortTimeout + joinOffset;
DisableShortTimeout = DisableShortTimeout + joinOffset;
OrWhenVacated = OrWhenVacated + joinOffset;
AndWhenVacated = AndWhenVacated + joinOffset;
EnableUsA = EnableUsA + joinOffset;
DisableUsA = DisableUsA + joinOffset;
EnableUsB = EnableUsB + joinOffset;
DisableUsB = DisableUsB + joinOffset;
EnablePir = EnablePir + joinOffset;
DisablePir = DisablePir + joinOffset;
IncrementUsInOccupiedState = IncrementUsInOccupiedState + joinOffset;
DecrementUsInOccupiedState = DecrementUsInOccupiedState + joinOffset;
IncrementUsInVacantState = IncrementUsInVacantState + joinOffset;
DecrementUsInVacantState = DecrementUsInVacantState + joinOffset;
IncrementPirInOccupiedState = IncrementPirInOccupiedState + joinOffset;
DecrementPirInOccupiedState = DecrementPirInOccupiedState + joinOffset;
IncrementPirInVacantState = IncrementPirInVacantState + joinOffset;
DecrementPirInVacantState = DecrementPirInVacantState + joinOffset;
Timeout = Timeout + joinOffset;
TimeoutLocalFeedback = TimeoutLocalFeedback + joinOffset;
InternalPhotoSensorValue = InternalPhotoSensorValue + joinOffset;
ExternalPhotoSensorValue = ExternalPhotoSensorValue + joinOffset;
UsSensitivityInOccupiedState = UsSensitivityInOccupiedState + joinOffset;
UsSensitivityInVacantState = UsSensitivityInVacantState + joinOffset;
PirSensitivityInOccupiedState = PirSensitivityInOccupiedState + joinOffset;
PirSensitivityInVacantState = PirSensitivityInVacantState + joinOffset;
Name = Name + joinOffset;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
[Obsolete("Please use version PepperDash.Essentials.Core.Bridges")]
public class GlsOccupancySensorBaseJoinMap : JoinMapBase
{
#region Digitals
/// <summary>
/// High when device is online
/// </summary>
public uint IsOnline { get; set; }
/// <summary>
/// Forces the device to report occupied status
/// </summary>
public uint ForceOccupied { get; set; }
/// <summary>
/// Forces the device to report vacant status
/// </summary>
public uint ForceVacant { get; set; }
/// <summary>
/// Enables raw status reporting
/// </summary>
public uint EnableRawStates { get; set; }
/// <summary>
/// High when raw occupancy is detected
/// </summary>
public uint RawOccupancyFeedback { get; set; }
/// <summary>
/// High when PIR sensor detects motion
/// </summary>
public uint RawOccupancyPirFeedback { get; set; }
/// <summary>
/// High when US sensor detects motion
/// </summary>
public uint RawOccupancyUsFeedback { get; set; }
/// <summary>
/// High when occupancy is detected
/// </summary>
public uint RoomOccupiedFeedback { get; set; }
/// <summary>
/// Hich when occupancy is detected in the grace period
/// </summary>
public uint GraceOccupancyDetectedFeedback { get; set; }
/// <summary>
/// High when vacancy is detected
/// </summary>
public uint RoomVacantFeedback { get; set; }
/// <summary>
/// Enables the LED Flash when set high
/// </summary>
public uint EnableLedFlash { get; set; }
/// <summary>
/// Disables the LED flash when set high
/// </summary>
public uint DisableLedFlash { get; set; }
/// <summary>
/// Enables the Short Timeout
/// </summary>
public uint EnableShortTimeout { get; set; }
/// <summary>
/// Disables the Short Timout
/// </summary>
public uint DisableShortTimeout { get; set; }
/// <summary>
/// Set high to enable one technology to trigger occupancy
/// </summary>
public uint OrWhenVacated { get; set; }
/// <summary>
/// Set high to require both technologies to trigger occupancy
/// </summary>
public uint AndWhenVacated { get; set; }
/// <summary>
/// Enables Ultrasonic Sensor A
/// </summary>
public uint EnableUsA { get; set; }
/// <summary>
/// Disables Ultrasonic Sensor A
/// </summary>
public uint DisableUsA { get; set; }
/// <summary>
/// Enables Ultrasonic Sensor B
/// </summary>
public uint EnableUsB { get; set; }
/// <summary>
/// Disables Ultrasonic Sensor B
/// </summary>
public uint DisableUsB { get; set; }
/// <summary>
/// Enables Pir
/// </summary>
public uint EnablePir { get; set; }
/// <summary>
/// Disables Pir
/// </summary>
public uint DisablePir { get; set; }
public uint IncrementUsInOccupiedState { get; set; }
public uint DecrementUsInOccupiedState { get; set; }
public uint IncrementUsInVacantState { get; set; }
public uint DecrementUsInVacantState { get; set; }
public uint IncrementPirInOccupiedState { get; set; }
public uint DecrementPirInOccupiedState { get; set; }
public uint IncrementPirInVacantState { get; set; }
public uint DecrementPirInVacantState { get; set; }
#endregion
#region Analogs
/// <summary>
/// Sets adn reports the remote timeout value
/// </summary>
public uint Timeout { get; set; }
/// <summary>
/// Reports the local timeout value
/// </summary>
public uint TimeoutLocalFeedback { get; set; }
/// <summary>
/// Sets the minimum internal photo sensor value and reports the current level
/// </summary>
public uint InternalPhotoSensorValue { get; set; }
/// <summary>
/// Sets the minimum external photo sensor value and reports the current level
/// </summary>
public uint ExternalPhotoSensorValue { get; set; }
public uint UsSensitivityInOccupiedState { get; set; }
public uint UsSensitivityInVacantState { get; set; }
public uint PirSensitivityInOccupiedState { get; set; }
public uint PirSensitivityInVacantState { get; set; }
#endregion
#region Serial
public uint Name { get; set; }
#endregion
public GlsOccupancySensorBaseJoinMap()
{
IsOnline = 1;
ForceOccupied = 2;
ForceVacant = 3;
EnableRawStates = 4;
RoomOccupiedFeedback = 2;
GraceOccupancyDetectedFeedback = 3;
RoomVacantFeedback = 4;
RawOccupancyFeedback = 5;
RawOccupancyPirFeedback = 6;
RawOccupancyUsFeedback = 7;
EnableLedFlash = 11;
DisableLedFlash = 12;
EnableShortTimeout = 13;
DisableShortTimeout = 14;
OrWhenVacated = 15;
AndWhenVacated = 16;
EnableUsA = 17;
DisableUsA = 18;
EnableUsB = 19;
DisableUsB = 20;
EnablePir = 21;
DisablePir = 22;
IncrementUsInOccupiedState = 23;
DecrementUsInOccupiedState = 24;
IncrementUsInVacantState = 25;
DecrementUsInVacantState = 26;
IncrementPirInOccupiedState = 27;
DecrementPirInOccupiedState = 28;
IncrementPirInVacantState = 29;
DecrementPirInVacantState = 30;
Timeout = 1;
TimeoutLocalFeedback = 2;
InternalPhotoSensorValue = 3;
ExternalPhotoSensorValue = 4;
UsSensitivityInOccupiedState = 5;
UsSensitivityInVacantState = 6;
PirSensitivityInOccupiedState = 7;
PirSensitivityInVacantState = 8;
Name = 1;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
IsOnline = IsOnline + joinOffset;
ForceOccupied = ForceOccupied + joinOffset;
ForceVacant = ForceVacant + joinOffset;
EnableRawStates = EnableRawStates + joinOffset;
RoomOccupiedFeedback = RoomOccupiedFeedback + joinOffset;
GraceOccupancyDetectedFeedback = GraceOccupancyDetectedFeedback + joinOffset;
RoomVacantFeedback = RoomVacantFeedback + joinOffset;
RawOccupancyFeedback = RawOccupancyFeedback + joinOffset;
RawOccupancyPirFeedback = RawOccupancyPirFeedback + joinOffset;
RawOccupancyUsFeedback = RawOccupancyUsFeedback + joinOffset;
EnableLedFlash = EnableLedFlash + joinOffset;
DisableLedFlash = DisableLedFlash + joinOffset;
EnableShortTimeout = EnableShortTimeout + joinOffset;
DisableShortTimeout = DisableShortTimeout + joinOffset;
OrWhenVacated = OrWhenVacated + joinOffset;
AndWhenVacated = AndWhenVacated + joinOffset;
EnableUsA = EnableUsA + joinOffset;
DisableUsA = DisableUsA + joinOffset;
EnableUsB = EnableUsB + joinOffset;
DisableUsB = DisableUsB + joinOffset;
EnablePir = EnablePir + joinOffset;
DisablePir = DisablePir + joinOffset;
IncrementUsInOccupiedState = IncrementUsInOccupiedState + joinOffset;
DecrementUsInOccupiedState = DecrementUsInOccupiedState + joinOffset;
IncrementUsInVacantState = IncrementUsInVacantState + joinOffset;
DecrementUsInVacantState = DecrementUsInVacantState + joinOffset;
IncrementPirInOccupiedState = IncrementPirInOccupiedState + joinOffset;
DecrementPirInOccupiedState = DecrementPirInOccupiedState + joinOffset;
IncrementPirInVacantState = IncrementPirInVacantState + joinOffset;
DecrementPirInVacantState = DecrementPirInVacantState + joinOffset;
Timeout = Timeout + joinOffset;
TimeoutLocalFeedback = TimeoutLocalFeedback + joinOffset;
InternalPhotoSensorValue = InternalPhotoSensorValue + joinOffset;
ExternalPhotoSensorValue = ExternalPhotoSensorValue + joinOffset;
UsSensitivityInOccupiedState = UsSensitivityInOccupiedState + joinOffset;
UsSensitivityInVacantState = UsSensitivityInVacantState + joinOffset;
PirSensitivityInOccupiedState = PirSensitivityInOccupiedState + joinOffset;
PirSensitivityInVacantState = PirSensitivityInVacantState + joinOffset;
Name = Name + joinOffset;
}
}
}

View File

@@ -7,6 +7,7 @@ using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
[Obsolete("Please use version PepperDash.Essentials.Core.Bridges")]
public class HdMdxxxCEControllerJoinMap : JoinMapBase
{
#region Digitals

View File

@@ -7,6 +7,7 @@ using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
[Obsolete("Please use version PepperDash.Essentials.Core.Bridges")]
public class IBasicCommunicationJoinMap : JoinMapBase
{
#region Digitals

View File

@@ -7,6 +7,7 @@ using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
[Obsolete("Please use version PepperDash.Essentials.Core.Bridges")]
public class IDigitalInputJoinMap : JoinMapBase
{
#region Digitals

View File

@@ -1,212 +1,213 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
using Crestron.SimplSharp.Reflection;
namespace PepperDash.Essentials.Bridges
{
public class SetTopBoxControllerJoinMap : JoinMapBase
{
#region Digitals
public uint DvrList { get; set; } //
public uint Replay { get; set; }
public uint Up { get; set; } //
public uint Down { get; set; } //
public uint Left { get; set; } //
public uint Right { get; set; } //
public uint Select { get; set; } //
public uint Menu { get; set; } //
public uint Exit { get; set; } //
public uint Digit0 { get; set; } //
public uint Digit1 { get; set; } //
public uint Digit2 { get; set; } //
public uint Digit3 { get; set; } //
public uint Digit4 { get; set; } //
public uint Digit5 { get; set; } //
public uint Digit6 { get; set; } //
public uint Digit7 { get; set; } //
public uint Digit8 { get; set; } //
public uint Digit9 { get; set; } //
public uint Dash { get; set; } //
public uint KeypadEnter { get; set; } //
public uint ChannelUp { get; set; } //
public uint ChannelDown { get; set; } //
public uint LastChannel { get; set; } //
public uint Guide { get; set; } //
public uint Info { get; set; } //
public uint Red { get; set; } //
public uint Green { get; set; } //
public uint Yellow { get; set; } //
public uint Blue { get; set; } //
public uint ChapMinus { get; set; }
public uint ChapPlus { get; set; }
public uint FFwd { get; set; } //
public uint Pause { get; set; } //
public uint Play { get; set; } //
public uint Record { get; set; }
public uint Rewind { get; set; } //
public uint Stop { get; set; } //
public uint PowerOn { get; set; } //
public uint PowerOff { get; set; } //
public uint PowerToggle { get; set; } //
public uint HasKeypadAccessoryButton1 { get; set; }
public uint HasKeypadAccessoryButton2 { get; set; }
public uint KeypadAccessoryButton1Press { get; set; }
public uint KeypadAccessoryButton2Press { get; set; }
public uint HasDvr { get; set; }
public uint HasPresets { get; set; }
public uint HasNumeric { get; set; }
public uint HasDpad { get; set; }
#endregion
#region Analogs
#endregion
#region Strings
public uint Name { get; set; }
public uint LoadPresets { get; set; }
public uint KeypadAccessoryButton1Label { get; set; }
public uint KeypadAccessoryButton2Label { get; set; }
#endregion
public SetTopBoxControllerJoinMap()
{
PowerOn = 1;
PowerOff = 2;
PowerToggle = 3;
HasDpad = 4;
Up = 4;
Down = 5;
Left = 6;
Right = 7;
Select = 8;
Menu = 9;
Exit = 10;
HasNumeric = 11;
Digit0 = 11;
Digit1 = 12;
Digit2 = 13;
Digit3 = 14;
Digit4 = 15;
Digit5 = 16;
Digit6 = 17;
Digit7 = 18;
Digit8 = 19;
Digit9 = 20;
Dash = 21;
KeypadEnter = 22;
ChannelUp = 23;
ChannelDown = 24;
LastChannel = 25;
Guide = 26;
Info = 27;
Red = 28;
Green = 29;
Yellow = 30;
Blue = 31;
HasDvr = 32;
DvrList = 32;
Play = 33;
Pause = 34;
Stop = 35;
FFwd = 36;
Rewind = 37;
ChapPlus = 38;
ChapMinus = 39;
Replay = 40;
Record = 41;
HasKeypadAccessoryButton1 = 42;
KeypadAccessoryButton1Press = 42;
HasKeypadAccessoryButton2 = 43;
KeypadAccessoryButton2Press = 43;
Name = 1;
KeypadAccessoryButton1Label = 42;
KeypadAccessoryButton2Label = 43;
LoadPresets = 50;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
PowerOn += joinOffset;
PowerOff += joinOffset;
PowerToggle += joinOffset;
HasDpad += joinOffset;
Up += joinOffset;
Down += joinOffset;
Left += joinOffset;
Right += joinOffset;
Select += joinOffset;
Menu += joinOffset;
Exit += joinOffset;
HasNumeric += joinOffset;
Digit0 += joinOffset;
Digit1 += joinOffset;
Digit2 += joinOffset;
Digit3 += joinOffset;
Digit4 += joinOffset;
Digit5 += joinOffset;
Digit6 += joinOffset;
Digit7 += joinOffset;
Digit8 += joinOffset;
Digit9 += joinOffset;
Dash += joinOffset;
KeypadEnter += joinOffset;
ChannelUp += joinOffset;
ChannelDown += joinOffset;
LastChannel += joinOffset;
Guide += joinOffset;
Info += joinOffset;
Red += joinOffset;
Green += joinOffset;
Yellow += joinOffset;
Blue += joinOffset;
HasDvr += joinOffset;
DvrList += joinOffset;
Play += joinOffset;
Pause += joinOffset;
Stop += joinOffset;
FFwd += joinOffset;
Rewind += joinOffset;
ChapPlus += joinOffset;
ChapMinus += joinOffset;
Replay += joinOffset;
Record += joinOffset;
HasKeypadAccessoryButton1 += joinOffset;
KeypadAccessoryButton1Press += joinOffset;
HasKeypadAccessoryButton2 += joinOffset;
KeypadAccessoryButton2Press += joinOffset;
Name += joinOffset;
KeypadAccessoryButton1Label += joinOffset;
KeypadAccessoryButton2Label += joinOffset;
LoadPresets += joinOffset;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
using Crestron.SimplSharp.Reflection;
namespace PepperDash.Essentials.Bridges
{
[Obsolete("Please use version PepperDash.Essentials.Core.Bridges")]
public class SetTopBoxControllerJoinMap : JoinMapBase
{
#region Digitals
public uint DvrList { get; set; } //
public uint Replay { get; set; }
public uint Up { get; set; } //
public uint Down { get; set; } //
public uint Left { get; set; } //
public uint Right { get; set; } //
public uint Select { get; set; } //
public uint Menu { get; set; } //
public uint Exit { get; set; } //
public uint Digit0 { get; set; } //
public uint Digit1 { get; set; } //
public uint Digit2 { get; set; } //
public uint Digit3 { get; set; } //
public uint Digit4 { get; set; } //
public uint Digit5 { get; set; } //
public uint Digit6 { get; set; } //
public uint Digit7 { get; set; } //
public uint Digit8 { get; set; } //
public uint Digit9 { get; set; } //
public uint Dash { get; set; } //
public uint KeypadEnter { get; set; } //
public uint ChannelUp { get; set; } //
public uint ChannelDown { get; set; } //
public uint LastChannel { get; set; } //
public uint Guide { get; set; } //
public uint Info { get; set; } //
public uint Red { get; set; } //
public uint Green { get; set; } //
public uint Yellow { get; set; } //
public uint Blue { get; set; } //
public uint ChapMinus { get; set; }
public uint ChapPlus { get; set; }
public uint FFwd { get; set; } //
public uint Pause { get; set; } //
public uint Play { get; set; } //
public uint Record { get; set; }
public uint Rewind { get; set; } //
public uint Stop { get; set; } //
public uint PowerOn { get; set; } //
public uint PowerOff { get; set; } //
public uint PowerToggle { get; set; } //
public uint HasKeypadAccessoryButton1 { get; set; }
public uint HasKeypadAccessoryButton2 { get; set; }
public uint KeypadAccessoryButton1Press { get; set; }
public uint KeypadAccessoryButton2Press { get; set; }
public uint HasDvr { get; set; }
public uint HasPresets { get; set; }
public uint HasNumeric { get; set; }
public uint HasDpad { get; set; }
#endregion
#region Analogs
#endregion
#region Strings
public uint Name { get; set; }
public uint LoadPresets { get; set; }
public uint KeypadAccessoryButton1Label { get; set; }
public uint KeypadAccessoryButton2Label { get; set; }
#endregion
public SetTopBoxControllerJoinMap()
{
PowerOn = 1;
PowerOff = 2;
PowerToggle = 3;
HasDpad = 4;
Up = 4;
Down = 5;
Left = 6;
Right = 7;
Select = 8;
Menu = 9;
Exit = 10;
HasNumeric = 11;
Digit0 = 11;
Digit1 = 12;
Digit2 = 13;
Digit3 = 14;
Digit4 = 15;
Digit5 = 16;
Digit6 = 17;
Digit7 = 18;
Digit8 = 19;
Digit9 = 20;
Dash = 21;
KeypadEnter = 22;
ChannelUp = 23;
ChannelDown = 24;
LastChannel = 25;
Guide = 26;
Info = 27;
Red = 28;
Green = 29;
Yellow = 30;
Blue = 31;
HasDvr = 32;
DvrList = 32;
Play = 33;
Pause = 34;
Stop = 35;
FFwd = 36;
Rewind = 37;
ChapPlus = 38;
ChapMinus = 39;
Replay = 40;
Record = 41;
HasKeypadAccessoryButton1 = 42;
KeypadAccessoryButton1Press = 42;
HasKeypadAccessoryButton2 = 43;
KeypadAccessoryButton2Press = 43;
Name = 1;
KeypadAccessoryButton1Label = 42;
KeypadAccessoryButton2Label = 43;
LoadPresets = 50;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
PowerOn += joinOffset;
PowerOff += joinOffset;
PowerToggle += joinOffset;
HasDpad += joinOffset;
Up += joinOffset;
Down += joinOffset;
Left += joinOffset;
Right += joinOffset;
Select += joinOffset;
Menu += joinOffset;
Exit += joinOffset;
HasNumeric += joinOffset;
Digit0 += joinOffset;
Digit1 += joinOffset;
Digit2 += joinOffset;
Digit3 += joinOffset;
Digit4 += joinOffset;
Digit5 += joinOffset;
Digit6 += joinOffset;
Digit7 += joinOffset;
Digit8 += joinOffset;
Digit9 += joinOffset;
Dash += joinOffset;
KeypadEnter += joinOffset;
ChannelUp += joinOffset;
ChannelDown += joinOffset;
LastChannel += joinOffset;
Guide += joinOffset;
Info += joinOffset;
Red += joinOffset;
Green += joinOffset;
Yellow += joinOffset;
Blue += joinOffset;
HasDvr += joinOffset;
DvrList += joinOffset;
Play += joinOffset;
Pause += joinOffset;
Stop += joinOffset;
FFwd += joinOffset;
Rewind += joinOffset;
ChapPlus += joinOffset;
ChapMinus += joinOffset;
Replay += joinOffset;
Record += joinOffset;
HasKeypadAccessoryButton1 += joinOffset;
KeypadAccessoryButton1Press += joinOffset;
HasKeypadAccessoryButton2 += joinOffset;
KeypadAccessoryButton2Press += joinOffset;
Name += joinOffset;
KeypadAccessoryButton1Label += joinOffset;
KeypadAccessoryButton2Label += joinOffset;
LoadPresets += joinOffset;
}
}
}

View File

@@ -1,49 +1,51 @@
using System.Linq;
using Crestron.SimplSharp.Reflection;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
public class StatusSignControllerJoinMap:JoinMapBase
{
public uint IsOnline { get; set; }
public uint Name { get; set; }
public uint RedLed { get; set; }
public uint GreenLed { get; set; }
public uint BlueLed { get; set; }
public uint RedControl { get; set; }
public uint GreenControl { get; set; }
public uint BlueControl { get; set; }
public StatusSignControllerJoinMap()
{
//digital
IsOnline = 1;
RedControl = 2;
GreenControl = 3;
BlueControl = 4;
//Analog
RedLed = 2;
GreenLed = 3;
BlueLed = 4;
//string
Name = 1;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
var properties =
GetType().GetCType().GetProperties().Where(p => p.PropertyType == typeof (uint)).ToList();
foreach (var propertyInfo in properties)
{
propertyInfo.SetValue(this, (uint) propertyInfo.GetValue(this, null) + joinOffset, null);
}
}
}
using System;
using System.Linq;
using Crestron.SimplSharp.Reflection;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
[Obsolete("Please use version PepperDash.Essentials.Core.Bridges")]
public class StatusSignControllerJoinMap:JoinMapBase
{
public uint IsOnline { get; set; }
public uint Name { get; set; }
public uint RedLed { get; set; }
public uint GreenLed { get; set; }
public uint BlueLed { get; set; }
public uint RedControl { get; set; }
public uint GreenControl { get; set; }
public uint BlueControl { get; set; }
public StatusSignControllerJoinMap()
{
//digital
IsOnline = 1;
RedControl = 2;
GreenControl = 3;
BlueControl = 4;
//Analog
RedLed = 2;
GreenLed = 3;
BlueLed = 4;
//string
Name = 1;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
var properties =
GetType().GetCType().GetProperties().Where(p => p.PropertyType == typeof (uint)).ToList();
foreach (var propertyInfo in properties)
{
propertyInfo.SetValue(this, (uint) propertyInfo.GetValue(this, null) + joinOffset, null);
}
}
}
}

View File

@@ -1,12 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
[Obsolete("Please use version PepperDash.Essentials.Core.Bridges")]
public class SystemMonitorJoinMap : JoinMapBase
{
/// <summary>
@@ -14,11 +11,21 @@ namespace PepperDash.Essentials.Bridges
/// </summary>
public uint ProgramStartJoin { get; set; }
/// <summary>
/// Offset to indicate where the range of iterated Ethernet joins will start
/// </summary>
public uint EthernetStartJoin { get; set; }
/// <summary>
/// Offset between each program join set
/// </summary>
public uint ProgramOffsetJoin { get; set; }
/// <summary>
/// Offset between each Ethernet Interface join set
/// </summary>
public uint EthernetOffsetJoin { get; set; }
#region Digitals
/// <summary>
/// Range Sets and reports whether the corresponding program slot is started
@@ -87,6 +94,68 @@ namespace PepperDash.Essentials.Bridges
/// Serialized JSON output that aggregates the program info of the corresponding program
/// </summary>
public uint AggregatedProgramInfo { get; set; }
/// <summary>
/// Reports the controller serial number
/// </summary>
public uint SerialNumber { get; set; }
/// <summary>
/// Reports the controller model
/// </summary>
public uint Model { get; set; }
/// <summary>
/// Reports the Host name set on the corresponding interface
/// </summary>
public uint HostName { get; set; }
/// <summary>
/// Reports the Current IP address set on the corresponding interface. If DHCP is enabled, this will be the DHCP assigned address.
/// </summary>
public uint CurrentIpAddress { get; set; }
/// <summary>
/// Reporst the Current Default Gateway set on the corresponding interface. If DHCP is enabled, this will be the DHCP assigned gateway
/// </summary>
public uint CurrentDefaultGateway { get; set; }
/// <summary>
/// Reports the Current Subnet Mask set on the corresponding interface. If DHCP is enabled, this will be the DHCP assigned subnet mask
/// </summary>
public uint CurrentSubnetMask { get; set; }
/// <summary>
/// Reports the Static IP address set on the corresponding interface. If DHCP is disabled, this will match the Current IP address
/// </summary>
public uint StaticIpAddress { get; set; }
/// <summary>
/// Reporst the Static Default Gateway set on the corresponding interface. If DHCP is disabled, this will match the Current gateway
/// </summary>
public uint StaticDefaultGateway { get; set; }
/// <summary>
/// Reports the Current Subnet Mask set on the corresponding interface. If DHCP is enabled, this will be the DHCP assigned subnet mask
/// </summary>
public uint StaticSubnetMask { get; set; }
/// <summary>
/// Reports the current DomainFeedback on the corresponding interface
/// </summary>
public uint Domain { get; set; }
/// <summary>
/// Reports the current DNS Servers on the corresponding interface
/// </summary>
public uint DnsServer { get; set; }
/// <summary>
/// Reports the MAC Address of the corresponding interface
/// </summary>
public uint MacAddress { get; set; }
/// <summary>
/// Reports the DHCP Status of the corresponding interface
/// </summary>
public uint DhcpStatus { get; set; }
/// <summary>
/// Reports the current uptime. Updated in 5 minute intervals.
/// </summary>
public uint Uptime { get; set; }
/// <summary>
/// Reports the date of the last boot
/// </summary>
public uint LastBoot { get; set; }
#endregion
public SystemMonitorJoinMap()
@@ -98,6 +167,10 @@ namespace PepperDash.Essentials.Bridges
SnmpAppVersion = 3;
BACnetAppVersion = 4;
ControllerVersion = 5;
SerialNumber = 6;
Model = 7;
Uptime = 8;
LastBoot = 9;
ProgramStartJoin = 10;
@@ -115,6 +188,23 @@ namespace PepperDash.Essentials.Bridges
ProgramCrestronDatabaseVersion = 3;
ProgramEnvironmentVersion = 4;
AggregatedProgramInfo = 5;
EthernetStartJoin = 75;
EthernetOffsetJoin = 15;
// Offset in groups of 15
HostName = 1;
CurrentIpAddress = 2;
CurrentSubnetMask = 3;
CurrentDefaultGateway = 4;
StaticIpAddress = 5;
StaticSubnetMask = 6;
StaticDefaultGateway = 7;
Domain = 8;
DnsServer = 9;
MacAddress = 10;
DhcpStatus = 11;
}
public override void OffsetJoinNumbers(uint joinStart)
@@ -131,6 +221,7 @@ namespace PepperDash.Essentials.Bridges
// Sets the initial join value where the iterated program joins will begin
ProgramStartJoin = ProgramStartJoin + joinOffset;
EthernetStartJoin = EthernetStartJoin + joinOffset;
}
}
}

View File

@@ -4,7 +4,7 @@ using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.CrestronIO;
namespace PepperDash.Essentials.Bridges
namespace PepperDash.Essentials.Core.Bridges
{
public static class StatusSignDeviceApiExtensions
{
@@ -13,7 +13,7 @@ namespace PepperDash.Essentials.Bridges
{
var joinMap = new StatusSignControllerJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<StatusSignControllerJoinMap>(joinMapSerialized);

View File

@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharpPro.Diagnostics;
using PepperDash.Core;
using PepperDash.Essentials.Core;
@@ -11,15 +6,15 @@ using PepperDash.Essentials.Core.Monitoring;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
namespace PepperDash.Essentials.Core.Bridges
{
public static class SystemMonitorBridge
{
public static void LinkToApi(this SystemMonitorController systemMonitorController, BasicTriList trilist, uint joinStart, string joinMapKey)
{
SystemMonitorJoinMap joinMap = new SystemMonitorJoinMap();
var joinMap = new SystemMonitorJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if(!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<SystemMonitorJoinMap>(joinMapSerialized);
@@ -30,36 +25,71 @@ namespace PepperDash.Essentials.Bridges
Debug.Console(2, systemMonitorController, "Linking API starting at join: {0}", joinStart);
systemMonitorController.TimeZoneFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeZone]);
//trilist.SetUShortSigAction(joinMap.TimeZone, new Action<ushort>(u => systemMonitorController.SetTimeZone(u)));
systemMonitorController.TimeZoneTextFeedback.LinkInputSig(trilist.StringInput[joinMap.TimeZoneName]);
systemMonitorController.IOControllerVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.IOControllerVersion]);
systemMonitorController.IoControllerVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.IOControllerVersion]);
systemMonitorController.SnmpVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.SnmpAppVersion]);
systemMonitorController.BACnetAppVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.BACnetAppVersion]);
systemMonitorController.BaCnetAppVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.BACnetAppVersion]);
systemMonitorController.ControllerVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.ControllerVersion]);
systemMonitorController.SerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.SerialNumber]);
systemMonitorController.ModelFeedback.LinkInputSig(trilist.StringInput[joinMap.Model]);
systemMonitorController.UptimeFeedback.LinkInputSig(trilist.StringInput[joinMap.Uptime]);
systemMonitorController.LastStartFeedback.LinkInputSig(trilist.StringInput[joinMap.LastBoot]);
// iterate the program status feedback collection and map all the joins
LinkProgramInfoJoins(systemMonitorController, trilist, joinMap);
LinkEthernetInfoJoins(systemMonitorController, trilist, joinMap);
}
private static void LinkEthernetInfoJoins(SystemMonitorController systemMonitorController, BasicTriList trilist, SystemMonitorJoinMap joinMap)
{
var ethernetSlotJoinStart = joinMap.EthernetStartJoin;
foreach (var fb in systemMonitorController.EthernetStatusFeedbackCollection)
{
fb.Value.CurrentIpAddressFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.CurrentIpAddress]);
fb.Value.CurrentSubnetMaskFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.CurrentSubnetMask]);
fb.Value.CurrentDefaultGatewayFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.CurrentDefaultGateway]);
fb.Value.StaticIpAddressFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.StaticIpAddress]);
fb.Value.StaticSubnetMaskFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.StaticSubnetMask]);
fb.Value.StaticDefaultGatewayFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.StaticDefaultGateway]);
fb.Value.HostNameFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.HostName]);
fb.Value.MacAddressFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.MacAddress]);
fb.Value.DomainFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.Domain]);
fb.Value.DnsServerFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.DnsServer]);
fb.Value.DhcpStatusFeedback.LinkInputSig(trilist.StringInput[ethernetSlotJoinStart + joinMap.DhcpStatus]);
ethernetSlotJoinStart += joinMap.EthernetOffsetJoin;
}
}
private static void LinkProgramInfoJoins(SystemMonitorController systemMonitorController, BasicTriList trilist,
SystemMonitorJoinMap joinMap)
{
var programSlotJoinStart = joinMap.ProgramStartJoin;
foreach (var p in systemMonitorController.ProgramStatusFeedbackCollection)
{
var programNumber = p.Value.Program.Number;
trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramStart, new Action<bool>
(b => SystemMonitor.ProgramCollection[programNumber].OperatingState = eProgramOperatingState.Start));
trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramStart,
b => SystemMonitor.ProgramCollection[programNumber].OperatingState = eProgramOperatingState.Start);
p.Value.ProgramStartedFeedback.LinkInputSig(trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramStart]);
trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramStop, new Action<bool>
(b => SystemMonitor.ProgramCollection[programNumber].OperatingState = eProgramOperatingState.Stop));
trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramStop,
b => SystemMonitor.ProgramCollection[programNumber].OperatingState = eProgramOperatingState.Stop);
p.Value.ProgramStoppedFeedback.LinkInputSig(trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramStop]);
trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramRegister, new Action<bool>
(b => SystemMonitor.ProgramCollection[programNumber].RegistrationState = eProgramRegistrationState.Register));
p.Value.ProgramRegisteredFeedback.LinkInputSig(trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramRegister]);
trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramRegister,
b => SystemMonitor.ProgramCollection[programNumber].RegistrationState = eProgramRegistrationState.Register);
p.Value.ProgramRegisteredFeedback.LinkInputSig(
trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramRegister]);
trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramUnregister, new Action<bool>
(b => SystemMonitor.ProgramCollection[programNumber].RegistrationState = eProgramRegistrationState.Unregister));
p.Value.ProgramUnregisteredFeedback.LinkInputSig(trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramUnregister]);
trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramUnregister,
b => SystemMonitor.ProgramCollection[programNumber].RegistrationState = eProgramRegistrationState.Unregister);
p.Value.ProgramUnregisteredFeedback.LinkInputSig(
trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramUnregister]);
p.Value.ProgramNameFeedback.LinkInputSig(trilist.StringInput[programSlotJoinStart + joinMap.ProgramName]);
p.Value.ProgramCompileTimeFeedback.LinkInputSig(

View File

@@ -10,6 +10,7 @@ using Crestron.SimplSharp.Reflection;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Bridges;
using PepperDash.Essentials.Core.Config;
using PepperDash.Essentials.Devices.Common;
using PepperDash.Essentials.DM;
@@ -25,6 +26,9 @@ namespace PepperDash.Essentials
{
HttpLogoServer LogoServer;
private CTimer _startTimer;
private const long StartupTime = 500;
public ControlSystem()
: base()
{
@@ -37,6 +41,11 @@ namespace PepperDash.Essentials
/// Entry point for the program
/// </summary>
public override void InitializeSystem()
{
_startTimer = new CTimer(StartSystem,StartupTime);
}
private void StartSystem(object obj)
{
DeterminePlatform();
@@ -46,7 +55,12 @@ namespace PepperDash.Essentials
ConsoleAccessLevelEnum.AccessOperator);
}
// CrestronConsole.AddNewConsoleCommand(S => { ConfigWriter.WriteConfigFile(null); }, "writeconfig", "writes the current config to a file", ConsoleAccessLevelEnum.AccessOperator);
CrestronConsole.AddNewConsoleCommand(PluginLoader.ReportAssemblyVersions, "reportversions", "Reports the versions of the loaded assemblies", ConsoleAccessLevelEnum.AccessOperator);
CrestronConsole.AddNewConsoleCommand(PepperDash.Essentials.Core.DeviceFactory.GetDeviceFactoryTypes, "gettypes", "Gets the device types that can be built. Accepts a filter string.", ConsoleAccessLevelEnum.AccessOperator);
CrestronConsole.AddNewConsoleCommand(BridgeHelper.PrintJoinMap, "getjoinmap", "map(s) for bridge or device on bridge [brKey [devKey]]", ConsoleAccessLevelEnum.AccessOperator);
CrestronConsole.AddNewConsoleCommand(s =>
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "CONSOLE MESSAGE: {0}", s);
@@ -68,11 +82,12 @@ namespace PepperDash.Essentials
}, "showconfig", "Shows the current running merged config", ConsoleAccessLevelEnum.AccessOperator);
CrestronConsole.AddNewConsoleCommand(s =>
{
CrestronConsole.ConsoleCommandResponse("This system can be found at the following URLs:\r" +
"System URL: {0}\r" +
"Template URL: {1}", ConfigReader.ConfigObject.SystemUrl, ConfigReader.ConfigObject.TemplateUrl);
}, "portalinfo", "Shows portal URLS from configuration", ConsoleAccessLevelEnum.AccessOperator);
{
CrestronConsole.ConsoleCommandResponse("This system can be found at the following URLs:\r" +
"System URL: {0}\r" +
"Template URL: {1}", ConfigReader.ConfigObject.SystemUrl, ConfigReader.ConfigObject.TemplateUrl);
}, "portalinfo", "Shows portal URLS from configuration", ConsoleAccessLevelEnum.AccessOperator);
if (!Debug.DoNotLoadOnNextBoot)
GoWithLoad();
@@ -81,7 +96,7 @@ namespace PepperDash.Essentials
/// <summary>
/// Determines if the program is running on a processor (appliance) or server (VC-4).
///
/// Sets Global.FilePathPrefix based on platform
/// Sets Global.FilePathPrefix and Global.ApplicationDirectoryPathPrefix based on platform
/// </summary>
public void DeterminePlatform()
{
@@ -108,7 +123,7 @@ namespace PepperDash.Essentials
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials v{0} on 3-series Appliance", Global.AssemblyVersion);
// Check if User/ProgramX exists
if (Directory.Exists(directoryPrefix + dirSeparator + "User"
if (Directory.Exists(Global.ApplicationDirectoryPathPrefix + dirSeparator + "User"
+ dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber)))
{
Debug.Console(0, @"User/program{0} directory found", InitialParametersClass.ApplicationNumber);
@@ -153,16 +168,23 @@ namespace PepperDash.Essentials
public void GoWithLoad()
{
try
{
{
Debug.SetDoNotLoadOnNextBoot(false);
PluginLoader.AddProgramAssemblies();
new Core.DeviceFactory();
new Devices.Common.DeviceFactory();
new DM.DeviceFactory();
new DeviceFactory();
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials load from configuration");
var filesReady = SetupFilesystem();
if (filesReady)
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Checking for plugins");
LoadPlugins();
PluginLoader.LoadPlugins();
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Folder structure verified. Loading config...");
if (!ConfigReader.LoadConfig2())
@@ -197,118 +219,7 @@ namespace PepperDash.Essentials
}
/// <summary>
/// Initial simple implementation. Reads user/programXX/plugins folder and
/// use
/// </summary>
void LoadPlugins()
{
var dir = Global.FilePathPrefix + "plugins";
if (Directory.Exists(dir))
{
// TODO Clear out or create localPlugins folder (maybe in program slot folder)
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Plugins directory found, checking for factory plugins");
var di = new DirectoryInfo(dir);
var zFiles = di.GetFiles("*.cplz");
foreach (var fi in zFiles)
{
Debug.Console(0, "Found cplz: {0}. Unzipping into plugins directory", fi.Name);
var result = CrestronZIP.Unzip(fi.FullName, di.FullName);
Debug.Console(0, "UnZip Result: {0}", result.ToString());
fi.Delete();
}
var files = di.GetFiles("*.dll");
Dictionary<string, Assembly> assyList = new Dictionary<string, Assembly>();
foreach (FileInfo fi in files)
{
// TODO COPY plugin to loadedPlugins folder
// TODO LOAD that loadedPlugins dll file
try
{
var assy = Assembly.LoadFrom(fi.FullName);
var ver = assy.GetName().Version;
var verStr = string.Format("{0}.{1}.{2}.{3}", ver.Major, ver.Minor, ver.Build, ver.Revision);
assyList.Add(fi.FullName, assy);
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loaded plugin file '{0}', version {1}", fi.FullName, verStr);
}
catch
{
Debug.Console(2, "Assembly {0} is not a custom assembly", fi.FullName);
continue; //catching any load issues and continuing. There will be exceptions loading Crestron .dlls from the cplz Probably should do something different here
}
}
foreach (var assy in assyList)
{
// iteratate this assembly's classes, looking for "LoadPlugin()" methods
try
{
var types = assy.Value.GetTypes();
foreach (var type in types)
{
try
{
var methods = type.GetMethods(BindingFlags.Public | BindingFlags.Static);
var loadPlugin = methods.FirstOrDefault(m => m.Name.Equals("LoadPlugin"));
if (loadPlugin != null)
{
Debug.Console(2, "LoadPlugin method found in {0}", type.Name);
var fields = type.GetFields(BindingFlags.Public | BindingFlags.Static);
var minimumVersion = fields.FirstOrDefault(p => p.Name.Equals("MinimumEssentialsFrameworkVersion"));
if (minimumVersion != null)
{
Debug.Console(2, "MinimumEssentialsFrameworkVersion found");
var minimumVersionString = minimumVersion.GetValue(null) as string;
if (!string.IsNullOrEmpty(minimumVersionString))
{
var passed = Global.IsRunningMinimumVersionOrHigher(minimumVersionString);
if (!passed)
{
Debug.Console(0, Debug.ErrorLogLevel.Error, "Plugin indicates minimum Essentials version {0}. Dependency check failed. Skipping Plugin", minimumVersionString);
continue;
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Passed plugin passed dependency check (required version {0})", minimumVersionString);
}
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Warning, "MinimumEssentialsFrameworkVersion found but not set. Loading plugin, but your mileage may vary.");
}
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Warning, "MinimumEssentialsFrameworkVersion not found. Loading plugin, but your mileage may vary.");
}
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Adding plugin: {0}", assy.Key);
loadPlugin.Invoke(null, null);
}
}
catch
{
Debug.Console(2, "Load Plugin not found. {0} is not a plugin assembly", assy.Value.FullName);
continue;
}
}
}
catch
{
Debug.Console(2, "Assembly {0} is not a custom assembly. Types cannot be loaded.", assy.Value.FullName);
continue;
}
}
// plugin dll will be loaded. Any classes in plugin should have a static constructor
// that registers that class with the Core.DeviceFactory
}
}
/// <summary>
/// Verifies filesystem is set up. IR, SGD, and programX folders
@@ -391,12 +302,10 @@ namespace PepperDash.Essentials
/// </summary>
public void LoadDevices()
{
// Build the processor wrapper class
DeviceManager.AddDevice(new PepperDash.Essentials.Core.Devices.CrestronProcessor("processor"));
// Add global System Monitor device
DeviceManager.AddDevice(new PepperDash.Essentials.Core.Monitoring.SystemMonitorController("systemMonitor"));
@@ -456,33 +365,15 @@ namespace PepperDash.Essentials
}
// Try local factories first
var newDev = DeviceFactory.GetDevice(devConf);
IKeyed newDev = null;
if (newDev == null)
newDev = BridgeFactory.GetDevice(devConf);
// Then associated library factories
if (newDev == null)
newDev = PepperDash.Essentials.Core.DeviceFactory.GetDevice(devConf);
if (newDev == null)
newDev = PepperDash.Essentials.Devices.Common.DeviceFactory.GetDevice(devConf);
if (newDev == null)
newDev = PepperDash.Essentials.DM.DeviceFactory.GetDevice(devConf);
if (newDev == null)
newDev = PepperDash.Essentials.Devices.Displays.DisplayDeviceFactory.GetDevice(devConf);
//if (newDev == null) // might want to consider the ability to override an essentials "type"
//{
// // iterate plugin factories
// foreach (var f in FactoryObjects)
// {
// var cresFactory = f as IGetCrestronDevice;
// if (cresFactory != null)
// {
// newDev = cresFactory.GetDevice(devConf, this);
// }
// }
//}
//
//if (newDev == null)
// newDev = PepperDash.Essentials.Devices.Displays.DisplayDeviceFactory.GetDevice(devConf);
//
if (newDev != null)
DeviceManager.AddDevice(newDev);

View File

@@ -6,11 +6,12 @@ using Crestron.SimplSharp;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Config;
using PepperDash.Essentials.Core.Routing;
namespace PepperDash.Essentials
{
public class Amplifier : Device, IRoutingSinkNoSwitching
public class Amplifier : EssentialsDevice, IRoutingSinkNoSwitching
{
public event SourceInfoChangeHandler CurrentSourceChange;
@@ -54,4 +55,18 @@ namespace PepperDash.Essentials
#endregion
}
public class AmplifierFactory : EssentialsDeviceFactory<Amplifier>
{
public AmplifierFactory()
{
TypeNames = new List<string>() { "amplifier" };
}
public override EssentialsDevice BuildDevice(DeviceConfig dc)
{
Debug.Console(1, "Factory Attempting to create new Amplifier Device");
return new Amplifier(dc.Key, dc.Name);
}
}
}

View File

@@ -4,94 +4,45 @@ using System.Linq;
using Crestron.SimplSharp;
using Crestron.SimplSharp.CrestronIO;
using Crestron.SimplSharpPro;
using Crestron.SimplSharp.Reflection;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Config;
using PepperDash.Essentials.Room.MobileControl;
namespace PepperDash.Essentials
{
public class DeviceFactory
{
public static IKeyed GetDevice(DeviceConfig dc)
{
var key = dc.Key;
var name = dc.Name;
var type = dc.Type;
var properties = dc.Properties;
/// <summary>
/// Responsible for loading all of the device types for this library
/// </summary>
public class DeviceFactory
{
var typeName = dc.Type.ToLower();
public DeviceFactory()
{
var assy = Assembly.GetExecutingAssembly();
PluginLoader.SetEssentialsAssembly(assy.GetName().Name, assy);
if (typeName == "amplifier")
var types = assy.GetTypes().Where(ct => typeof(IDeviceFactory).IsAssignableFrom(ct) && !ct.IsInterface && !ct.IsAbstract);
if (types != null)
{
return new Amplifier(dc.Key, dc.Name);
}
else if (dc.Group.ToLower() == "touchpanel") // typeName.StartsWith("tsw"))
{
return UiDeviceFactory.GetUiDevice(dc);
foreach (var type in types)
{
try
{
var factory = (IDeviceFactory)Crestron.SimplSharp.Reflection.Activator.CreateInstance(type);
factory.LoadTypeFactories();
}
catch (Exception e)
{
Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to load type: '{1}' DeviceFactory: {0}", e, type.Name);
}
}
}
else if (typeName == "mockdisplay")
{
return new MockDisplay(key, name);
}
else if (typeName == "generic")
{
return new Device(key, name);
}
//// MOVE into something else???
//else if (typeName == "basicirdisplay")
//{
// var ir = IRPortHelper.GetIrPort(properties);
// if (ir != null)
// return new BasicIrDisplay(key, name, ir.Port, ir.FileName);
//}
else if (typeName == "commmock")
{
var comm = CommFactory.CreateCommForDevice(dc);
var props = JsonConvert.DeserializeObject<ConsoleCommMockDevicePropertiesConfig>(
properties.ToString());
return new ConsoleCommMockDevice(key, name, props, comm);
}
else if (typeName == "appserver")
{
var props = JsonConvert.DeserializeObject<MobileControlConfig>(properties.ToString());
return new MobileControlSystemController(key, name, props);
}
else if (typeName == "mobilecontrolbridge-ddvc01")
{
var comm = CommFactory.GetControlPropertiesConfig(dc);
var bridge = new PepperDash.Essentials.Room.MobileControl.MobileControlDdvc01RoomBridge(key, name, comm.IpIdInt);
bridge.AddPreActivationAction(() =>
{
var parent = DeviceManager.AllDevices.FirstOrDefault(d => d.Key == "appServer") as MobileControlSystemController;
if (parent == null)
{
Debug.Console(0, bridge, "ERROR: Cannot connect bridge. System controller not present");
}
Debug.Console(0, bridge, "Linking to parent controller");
bridge.AddParent(parent);
parent.AddBridge(bridge);
});
return bridge;
}
else if (typeName == "roomonwhenoccupancydetectedfeature")
{
return new RoomOnToDefaultSourceWhenOccupied(dc);
}
return null;
}
}
}
}
}

View File

@@ -1,191 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharpPro.UI;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Config;
using PepperDash.Essentials.Core.PageManagers;
using PepperDash.Essentials.DM.Endpoints.DGEs;
namespace PepperDash.Essentials
{
public class UiDeviceFactory
{
public static IKeyed GetUiDevice(DeviceConfig config)
{
var comm = CommFactory.GetControlPropertiesConfig(config);
var typeName = config.Type.ToLower();
EssentialsTouchpanelController panelController = null;
var props = JsonConvert.DeserializeObject<CrestronTouchpanelPropertiesConfig>(config.Properties.ToString());
if (typeName.Contains("dge"))
{
Dge100 dgeDevice = null;
if (typeName == "dge100")
dgeDevice = new Dge100(comm.IpIdInt, Global.ControlSystem);
else if (typeName == "dmdge200c")
dgeDevice = new DmDge200C(comm.IpIdInt, Global.ControlSystem);
if (dgeDevice == null)
{
Debug.Console(1, "Unable to create DGE device");
return null;
}
var dgeController = new DgeController(config.Key + "-comPorts", config.Name, dgeDevice, config, props);
DeviceManager.AddDevice(dgeController);
panelController = new EssentialsTouchpanelController(config.Key, config.Name, dgeController.DigitalGraphicsEngine,
props.ProjectName, props.SgdFile);
}
else
{
panelController = new EssentialsTouchpanelController(config.Key, config.Name, config.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)
{
// 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 EssentialsPresentationRoom)
//{
// Debug.Console(0, panelController, "Adding presentation room driver");
// var avDriver = new EssentialsPresentationPanelAvFunctionsDriver(mainDriver, props);
// avDriver.CurrentRoom = room as EssentialsPresentationRoom;
// avDriver.DefaultRoomKey = props.DefaultRoomKey;
// mainDriver.AvDriver = avDriver ;
// mainDriver.HeaderDriver = new EssentialsHeaderDriver(mainDriver, props);
// panelController.LoadAndShowDriver(mainDriver);
// 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(); });
// 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");
// 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;
}
}
}

View File

@@ -186,7 +186,7 @@ namespace PepperDash.Essentials.Fusion
FusionRoom.SystemPowerOn.OutputSig.SetSigFalseAction((Room as EssentialsHuddleVtc1Room).PowerOnToDefaultOrLastSource);
FusionRoom.SystemPowerOff.OutputSig.SetSigFalseAction(() => (Room as EssentialsHuddleVtc1Room).RunRouteAction("roomOff"));
FusionRoom.SystemPowerOff.OutputSig.SetSigFalseAction(() => (Room as EssentialsHuddleVtc1Room).RunRouteAction("roomOff", Room.SourceListKey));
// NO!! room.RoomIsOn.LinkComplementInputSig(FusionRoom.SystemPowerOff.InputSig);
@@ -342,7 +342,7 @@ namespace PepperDash.Essentials.Fusion
// Current Source
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"); }); ;
defaultDisplaySourceNone.OutputSig.UserObject = new Action<bool>(b => { if (!b) (Room as EssentialsHuddleVtc1Room).RunRouteAction("roomOff", Room.SourceListKey); }); ;
}
}
}

View File

@@ -1,266 +0,0 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using Crestron.SimplSharp;
//using Crestron.SimplSharp.CrestronIO;
//using Crestron.SimplSharp.Net.Http;
//using Newtonsoft.Json;
//using Newtonsoft.Json.Linq;
//using PepperDash.Essentials.Core;
//using PepperDash.Essentials.Core.Http;
//using PepperDash.Core;
//namespace PepperDash.Essentials
//{
// public class EssentialsHttpApiHandler
// {
// string ConfigPath;
// string PresetsPathPrefix;
// EssentialsHttpServer Server;
// /// <summary>
// ///
// /// </summary>
// /// <param name="server">HTTP server to attach to</param>
// /// <param name="configPath">The full path to configuration file</param>
// /// <param name="presetsListPath">The folder prefix for the presets path, eq "\HTML\presets\"</param>
// public EssentialsHttpApiHandler(EssentialsHttpServer server, string configPath, string presetsPathPrefix)
// {
// if (server == null) throw new ArgumentNullException("server");
// Server = server;
// ConfigPath = configPath;
// PresetsPathPrefix = presetsPathPrefix;
// server.ApiRequest += Server_ApiRequest;
// }
// void Server_ApiRequest(object sender, Crestron.SimplSharp.Net.Http.OnHttpRequestArgs args)
// {
// try
// {
// var path = args.Request.Path.ToLower();
// if (path == "/api/config")
// HandleApiConfig(args);
// else if (path.StartsWith("/api/presetslist/"))
// HandleApiPresetsList(args);
// else if (path == "/api/presetslists")
// HandleApiGetPresetsLists(args.Request, args.Response);
// else
// {
// args.Response.Code = 404;
// return;
// }
// args.Response.Header.SetHeaderValue("Access-Control-Allow-Origin", "*");
// args.Response.Header.SetHeaderValue("Access-Control-Allow-Methods", "GET, POST, PATCH, PUT, DELETE, OPTIONS");
// }
// catch (Exception e)
// {
// Debug.Console(1, "Uncaught HTTP server error: \n{0}", e);
// args.Response.Code = 500;
// }
// }
// /// <summary>
// /// GET will return the running configuration. POST will attempt to take in a new config
// /// and restart the program.
// /// </summary>
// void HandleApiConfig(OnHttpRequestArgs args)
// {
// var request = args.Request;
// if (request.Header.RequestType == "GET")
// {
// if (File.Exists(ConfigPath))
// {
// Debug.Console(2, "Sending config:{0}", ConfigPath);
// args.Response.Header.ContentType = EssentialsHttpServer.GetContentType(new FileInfo(ConfigPath).Extension);
// args.Response.ContentStream = new FileStream(ConfigPath, FileMode.Open, FileAccess.Read);
// }
// }
// else if (request.Header.RequestType == "POST")
// {
// Debug.Console(2, "Post type: '{0}'", request.Header.ContentType);
// // Make sure we're receiving at least good json
// Debug.Console(1, "Receving new config");
// if (GetContentStringJson(args) == null)
// return;
// //---------------------------- try to move these into common method
// // Move current file aside
// var bakPath = ConfigPath + ".bak";
// if (File.Exists(bakPath))
// File.Delete(bakPath);
// File.Move(ConfigPath, bakPath);
// // Write the file
// using (FileStream fs = File.Open(ConfigPath, FileMode.OpenOrCreate))
// using (StreamWriter sw = new StreamWriter(fs))
// {
// try
// {
// sw.Write(args.Request.ContentString);
// }
// catch (Exception e)
// {
// string err = string.Format("Error writing received config file:\r{0}", e);
// CrestronConsole.PrintLine(err);
// ErrorLog.Warn(err);
// // Put file back
// File.Move(ConfigPath + ".bak", ConfigPath);
// args.Response.Code = 500;
// return;
// }
// }
// // If client says "yeah, restart" and has a good token
// // Restart program
// string consoleResponse = null;
// var restart = CrestronConsole.SendControlSystemCommand("progreset -p:" +
// InitialParametersClass.ApplicationNumber, ref consoleResponse);
// if (!restart) Debug.Console(0, "CAN'T DO THAT YO: {0}", consoleResponse);
// }
// }
// void HandleApiPresetsList(OnHttpRequestArgs args)
// {
// var listPath = PresetsPathPrefix + args.Request.Path.Remove(0, 17);
// Debug.Console(2, "Checking for preset list '{0}'", listPath);
// if (args.Request.Header.RequestType == "GET")
// {
// if (File.Exists(listPath))
// {
// Debug.Console(2, "Sending presets file:{0}", listPath);
// args.Response.Header.ContentType = EssentialsHttpServer.GetContentType(new FileInfo(listPath).Extension);
// args.Response.ContentStream = new FileStream(listPath, FileMode.Open, FileAccess.Read);
// }
// }
// else if (args.Request.Header.RequestType == "POST")
// {
// // Make sure we're receiving at least good json
// Debug.Console(1, "Receving new presets");
// if (GetContentStringJson(args) == null)
// return;
// //---------------------------- try to move these into common method
// // Move current file aside
// var bakPath = listPath + ".new";
// Debug.Console(2, "Moving presets file to {0}", bakPath);
// if(File.Exists(bakPath))
// File.Delete(bakPath);
// File.Move(listPath, bakPath);
// Debug.Console(2, "Writing new file");
// // Write the file
// using (FileStream fs = File.OpenWrite(listPath))
// using (StreamWriter sw = new StreamWriter(fs))
// {
// try
// {
// Debug.Console(2, "Writing {1}, {0} bytes", args.Request.ContentString.Length, listPath);
// sw.Write(args.Request.ContentString);
// }
// catch (Exception e)
// {
// string err = string.Format("Error writing received presets file:\r{0}", e);
// CrestronConsole.PrintLine(err);
// ErrorLog.Warn(err);
// // Put file back
// File.Move(listPath + ".bak", listPath);
// args.Response.Code = 500;
// return;
// }
// }
// }
// }
// void HandleApiGetPresetsLists(HttpServerRequest request, HttpServerResponse response)
// {
// if (request.Header.RequestType != "GET")
// {
// response.Code = 404; // This should be a 405 with an allow header
// return;
// }
// if (Directory.Exists(PresetsPathPrefix))
// {
// //CrestronConsole.PrintLine("Parsing presets directory");
// List<string> files = Directory.GetFiles(PresetsPathPrefix, "*.json")
// .ToList().Select(f => Path.GetFileName(f)).ToList();
// if (files.Count > 0)
// files.Sort();
// var json = JsonConvert.SerializeObject(files);
// response.Header.ContentType = "application/json";
// response.ContentString = json;
// }
// // //CrestronConsole.PrintLine("Found {0} files", files.Count);
// // JObject jo = new JObject();
// // JArray ja = new JArray();
// // foreach (var filename in files)
// // {
// // try
// // {
// // using (StreamReader sr = new StreamReader(filename))
// // {
// // JObject tempJo = JObject.Parse(sr.ReadToEnd());
// // if (tempJo.Value<string>("content").Equals("presetsList"))
// // {
// // var jItem = new JObject(); // make a new object
// // jItem.Add("Name", tempJo["name"]);
// // jItem.Add("File", filename);
// // jItem.Add("Url", Uri.EscapeUriString(new Uri(
// // filename.Replace("\\html", "")
// // .Replace("\\HTML", "")
// // .Replace('\\', '/'), UriKind.Relative).ToString()));
// // ja.Add(jItem); // add to array
// // }
// // else
// // CrestronConsole.PrintLine("Cannot use presets file '{0}'", filename);
// // }
// // }
// // catch
// // {
// // // ignore failures - maybe delete them
// // CrestronConsole.PrintLine("Unable to read presets file '{0}'", filename);
// // }
// // }
// // jo.Add("PresetChannelLists", ja);
// // //CrestronConsole.PrintLine(jo.ToString());
// // response.Header.ContentType = "application/json";
// // response.ContentString = jo.ToString();
// //}
// //else
// // CrestronConsole.PrintLine("No presets files in directory");
// }
// /// <summary>
// /// Simply does what it says
// /// </summary>
// JObject GetContentStringJson(OnHttpRequestArgs args)
// {
// //var content = args.Request.ContentString;
// //Debug.Console(1, "{0}", content);
// try
// {
// // just see if it parses properly
// return JObject.Parse(args.Request.ContentString);
// }
// catch (Exception e)
// {
// string err = string.Format("JSON Error reading config file:\r{0}", e);
// CrestronConsole.PrintLine(err);
// ErrorLog.Warn(err);
// args.Response.Code = 400; // Bad request
// return null;
// }
// }
// }
//}

View File

@@ -108,43 +108,31 @@
<Reference Include="System.Data" />
</ItemGroup>
<ItemGroup>
<Compile Include="AppServer\Messengers\CameraBaseMessenger.cs" />
<Compile Include="AppServer\Messengers\ConfigMessenger.cs" />
<Compile Include="AppServer\Messengers\Ddvc01AtcMessenger.cs" />
<Compile Include="AppServer\Messengers\SIMPLAtcMessenger.cs" />
<Compile Include="AppServer\Messengers\AudioCodecBaseMessenger.cs" />
<Compile Include="AppServer\Messengers\Ddvc01VtcMessenger.cs" />
<Compile Include="AppServer\Messengers\SIMPLVtcMessenger.cs" />
<Compile Include="AppServer\Messengers\IRunRouteActionMessenger.cs" />
<Compile Include="AppServer\Messengers\MessengerBase.cs" />
<Compile Include="AppServer\Messengers\SIMPLCameraMessenger.cs" />
<Compile Include="AppServer\Messengers\SimplMessengerPropertiesConfig.cs" />
<Compile Include="AppServer\Messengers\SIMPLRouteMessenger.cs" />
<Compile Include="AppServer\Messengers\SystemMonitorMessenger.cs" />
<Compile Include="AppServer\Messengers\VideoCodecBaseMessenger.cs" />
<Compile Include="AppServer\SIMPLJoinMaps\SIMPLVtcJoinMap.cs" />
<Compile Include="AppServer\SIMPLJoinMaps\SIMPLAtcJoinMap.cs" />
<Compile Include="AppServer\SIMPLJoinMaps\MobileControlSIMPLRoomJoinMap.cs" />
<Compile Include="Audio\EssentialsVolumeLevelConfig.cs" />
<Compile Include="Bridges\AppleTvBridge.cs" />
<Compile Include="Bridges\BridgeBase.cs" />
<Compile Include="Bridges\BridgeFactory.cs" />
<Compile Include="Bridges\C2nRthsControllerBridge.cs" />
<Compile Include="Bridges\CameraControllerBridge.cs" />
<Compile Include="Bridges\AirMediaControllerBridge.cs" />
<Compile Include="Bridges\DmBladeChassisControllerBridge.cs" />
<Compile Include="Bridges\IRSetTopBoxBaseBridge.cs" />
<Compile Include="Bridges\JoinMaps\C2nRthsControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DmBladeChassisControllerJoinMap.cs" />
<Compile Include="Bridges\DmpsAudioOutputControllerBridge.cs" />
<Compile Include="Bridges\DmpsRoutingControllerBridge.cs" />
<Compile Include="Bridges\DisplayControllerBridge.cs" />
<Compile Include="Bridges\DigitalLoggerBridge.cs" />
<Compile Include="Bridges\DmChassisControllerBridge.cs" />
<Compile Include="Bridges\DmTxControllerBridge.cs" />
<Compile Include="Bridges\GenericLightingBridge.cs" />
<Compile Include="Bridges\GenericRelayDeviceBridge.cs" />
<Compile Include="Bridges\GlsOccupancySensorBaseControllerBridge.cs" />
<Compile Include="Bridges\HdMdxxxCEControllerBridge.cs" />
<Compile Include="Bridges\IBasicCommunicationBridge.cs" />
<Compile Include="Bridges\DmRmcControllerBridge.cs" />
<Compile Include="Bridges\IBridge.cs" />
<Compile Include="Bridges\IDigitalInputBridge.cs" />
<Compile Include="Bridges\EiscBridge.cs" />
<Compile Include="Bridges\JoinMaps\AirMediaControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\AppleTvJoinMap.cs" />
<Compile Include="Bridges\BridgeFactory.cs" />
<Compile Include="Bridges\JoinMaps\C2nRthsControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\CameraControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DigitalLoggerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DisplayControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DmBladeChassisControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DmChassisControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DmpsAudioOutputControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DmpsRoutingControllerJoinMap.cs" />
@@ -152,21 +140,18 @@
<Compile Include="Bridges\JoinMaps\DmTxControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\GenericLightingJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\GenericRelayControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\GlsOccupancySensorBaseJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\HdMdxxxCEControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\IBasicCommunicationJoinMap.cs" />
<Compile Include="Bridges\IBridge.cs" />
<Compile Include="Bridges\JoinMaps\IDigitalInputJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\GlsOccupancySensorBaseJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\SetTopBoxControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\StatusSignControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\SystemMonitorJoinMap.cs" />
<Compile Include="Bridges\StatusSignControllerBridge.cs" />
<Compile Include="Bridges\SystemMonitorBridge.cs" />
<Compile Include="Factory\DeviceFactory.cs" />
<Compile Include="Devices\Amplifier.cs" />
<Compile Include="ControlSystem.cs" />
<Compile Include="Factory\UiDeviceFactory.cs" />
<Compile Include="Fusion\EssentialsHuddleVtc1FusionController.cs" />
<Compile Include="HttpApiHandler.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Room\Config\EssentialsDualDisplayRoomPropertiesConfig.cs" />
<Compile Include="Room\Config\EssentialsNDisplayRoomPropertiesConfig.cs" />
@@ -179,7 +164,7 @@
<Compile Include="AppServer\MobileControlDdvc01DeviceBridge.cs" />
<Compile Include="AppServer\Interfaces.cs" />
<Compile Include="AppServer\RoomBridges\MobileControlBridgeBase.cs" />
<Compile Include="AppServer\RoomBridges\MobileControlDdvc01RoomBridge.cs" />
<Compile Include="AppServer\RoomBridges\MobileControlSIMPLRoomBridge.cs" />
<Compile Include="AppServer\RoomBridges\MobileControlEssentialsHuddleSpaceRoomBridge.cs" />
<Compile Include="AppServer\DeviceTypeInterfaces\IChannelExtensions.cs" />
<Compile Include="AppServer\DeviceTypeInterfaces\IColorExtensions.cs" />

View File

@@ -0,0 +1,491 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharp.CrestronIO;
using Crestron.SimplSharp.Reflection;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Plugins;
namespace PepperDash.Essentials
{
/// <summary>
/// Deals with loading plugins at runtime
/// </summary>
public static class PluginLoader
{
/// <summary>
/// The complete list of loaded assemblies. Includes Essentials Framework assemblies and plugins
/// </summary>
public static List<LoadedAssembly> LoadedAssemblies { get; private set; }
/// <summary>
/// The list of assemblies loaded from the plugins folder
/// </summary>
static List<LoadedAssembly> LoadedPluginFolderAssemblies;
/// <summary>
/// The directory to look in for .cplz plugin packages
/// </summary>
static string _pluginDirectory = Global.FilePathPrefix + "plugins";
/// <summary>
/// The directory where plugins will be moved to and loaded from
/// </summary>
static string _loadedPluginsDirectoryPath = _pluginDirectory + Global.DirectorySeparator + "loadedAssemblies";
// The temp directory where .cplz archives will be unzipped to
static string _tempDirectory = _pluginDirectory + Global.DirectorySeparator + "temp";
static PluginLoader()
{
LoadedAssemblies = new List<LoadedAssembly>();
LoadedPluginFolderAssemblies = new List<LoadedAssembly>();
}
/// <summary>
/// Retrieves all the loaded assemblies from the program directory
/// </summary>
public static void AddProgramAssemblies()
{
Debug.Console(2, "Getting Assemblies loaded with Essentials");
// Get the loaded assembly filenames
var appDi = new DirectoryInfo(Global.ApplicationDirectoryPathPrefix);
var assemblyFiles = appDi.GetFiles("*.dll");
Debug.Console(2, "Found {0} Assemblies", assemblyFiles.Length);
foreach (var fi in assemblyFiles)
{
string version = string.Empty;
Assembly assembly = null;
switch (fi.Name)
{
case ("PepperDashEssentials.dll"):
{
version = Global.AssemblyVersion;
assembly = Assembly.GetExecutingAssembly();
break;
}
case ("PepperDashEssentialsBase.dll"):
{
break;
}
case ("PepperDash_Core.dll"):
{
version = PepperDash.Core.Debug.PepperDashCoreVersion;
break;
}
}
LoadedAssemblies.Add(new LoadedAssembly(fi.Name, version, assembly));
}
if (Debug.Level > 1)
{
Debug.Console(2, "Loaded Assemblies:");
foreach (var assembly in LoadedAssemblies)
{
Debug.Console(2, "Assembly: {0}", assembly.Name);
}
}
}
/// <summary>
/// Loads an assembly via Reflection and adds it to the list of loaded assemblies
/// </summary>
/// <param name="fileName"></param>
static LoadedAssembly LoadAssembly(string filePath)
{
Debug.Console(2, "Attempting to load {0}", filePath);
var assembly = Assembly.LoadFrom(filePath);
if (assembly != null)
{
var assyVersion = GetAssemblyVersion(assembly);
var loadedAssembly = new LoadedAssembly(assembly.GetName().Name, assyVersion, assembly);
LoadedAssemblies.Add(loadedAssembly);
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loaded assembly '{0}', version {1}", loadedAssembly.Name, loadedAssembly.Version);
return loadedAssembly;
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Unable to load assembly: '{0}'", filePath);
}
return null;
}
/// <summary>
/// Attempts to get the assembly informational version and if not possible gets the version
/// </summary>
/// <param name="assembly"></param>
/// <returns></returns>
static string GetAssemblyVersion(Assembly assembly)
{
var ver = assembly.GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute), false);
if (ver != null && ver.Length > 0)
{
// Get the AssemblyInformationalVersion
AssemblyInformationalVersionAttribute verAttribute = ver[0] as AssemblyInformationalVersionAttribute;
return verAttribute.InformationalVersion;
}
else
{
// Get the AssemblyVersion
var version = assembly.GetName().Version;
var verStr = string.Format("{0}.{1}.{2}.{3}", version.Major, version.Minor, version.Build, version.Revision);
return verStr;
}
}
/// <summary>
/// Checks if the filename matches an already loaded assembly file's name
/// </summary>
/// <param name="filename"></param>
/// <returns>True if file already matches loaded assembly file.</returns>
public static bool CheckIfAssemblyLoaded(string name)
{
Debug.Console(2, "Checking if assembly: {0} is loaded...", name);
var loadedAssembly = LoadedAssemblies.FirstOrDefault(s => s.Name.Equals(name));
if (loadedAssembly != null)
{
Debug.Console(2, "Assembly already loaded.");
return true;
}
else
{
Debug.Console(2, "Assembly not loaded.");
return false;
}
}
/// <summary>
/// Used by console command to report the currently loaded assemblies and versions
/// </summary>
/// <param name="command"></param>
public static void ReportAssemblyVersions(string command)
{
Debug.Console(0, "Loaded Assemblies:");
foreach (var assembly in LoadedAssemblies)
{
Debug.Console(0, "{0} Version: {1}", assembly.Name, assembly.Version);
}
}
/// <summary>
/// Moves any .dll assemblies not already loaded from the plugins folder to loadedPlugins folder
/// </summary>
static void MoveDllAssemblies()
{
Debug.Console(0, "Looking for .dll assemblies from plugins folder...");
var pluginDi = new DirectoryInfo(_pluginDirectory);
var pluginFiles = pluginDi.GetFiles("*.dll");
if (pluginFiles.Length > 0)
{
if (!Directory.Exists(_loadedPluginsDirectoryPath))
{
Directory.CreateDirectory(_loadedPluginsDirectoryPath);
}
}
foreach (var pluginFile in pluginFiles)
{
try
{
Debug.Console(0, "Found .dll: {0}", pluginFile.Name);
if (!CheckIfAssemblyLoaded(pluginFile.Name))
{
string filePath = string.Empty;
filePath = _loadedPluginsDirectoryPath + Global.DirectorySeparator + pluginFile.Name;
// Check if there is a previous file in the loadedPlugins directory and delete
if (File.Exists(filePath))
{
Debug.Console(0, "Found existing file in loadedPlugins: {0} Deleting and moving new file to replace it", filePath);
File.Delete(filePath);
}
// Move the file
File.Move(pluginFile.FullName, filePath);
Debug.Console(2, "Moved {0} to {1}", pluginFile.FullName, filePath);
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Skipping assembly: {0}. There is already an assembly with that name loaded.", pluginFile.FullName);
}
}
catch (Exception e)
{
Debug.Console(2, "Error with plugin file {0} . Exception: {1}", pluginFile.FullName, e);
continue; //catching any load issues and continuing. There will be exceptions loading Crestron .dlls from the cplz Probably should do something different here
}
}
Debug.Console(0, "Done with .dll assemblies");
}
/// <summary>
/// Unzips each .cplz archive into the temp directory and moves any unloaded files into loadedPlugins
/// </summary>
static void UnzipAndMoveCplzArchives()
{
Debug.Console(0, "Looking for .cplz archives from plugins folder...");
var di = new DirectoryInfo(_pluginDirectory);
var zFiles = di.GetFiles("*.cplz");
if (zFiles.Length > 0)
{
if (!Directory.Exists(_loadedPluginsDirectoryPath))
{
Directory.CreateDirectory(_loadedPluginsDirectoryPath);
}
}
foreach (var zfi in zFiles)
{
Directory.CreateDirectory(_tempDirectory);
var tempDi = new DirectoryInfo(_tempDirectory);
Debug.Console(0, "Found cplz: {0}. Unzipping into temp plugins directory", zfi.Name);
var result = CrestronZIP.Unzip(zfi.FullName, tempDi.FullName);
Debug.Console(0, "UnZip Result: {0}", result.ToString());
var tempFiles = tempDi.GetFiles("*.dll");
foreach (var tempFile in tempFiles)
{
try
{
if (!CheckIfAssemblyLoaded(tempFile.Name))
{
string filePath = string.Empty;
filePath = _loadedPluginsDirectoryPath + Global.DirectorySeparator + tempFile.Name;
// Check if there is a previous file in the loadedPlugins directory and delete
if (File.Exists(filePath))
{
Debug.Console(0, "Found existing file in loadedPlugins: {0} Deleting and moving new file to replace it", filePath);
File.Delete(filePath);
}
// Move the file
File.Move(tempFile.FullName, filePath);
Debug.Console(2, "Moved {0} to {1}", tempFile.FullName, filePath);
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Skipping assembly: {0}. There is already an assembly with that name loaded.", tempFile.FullName);
}
}
catch (Exception e)
{
Debug.Console(2, "Assembly {0} is not a custom assembly. Exception: {1}", tempFile.FullName, e);
continue; //catching any load issues and continuing. There will be exceptions loading Crestron .dlls from the cplz Probably should do something different here
}
}
// Delete the .cplz and the temp directory
Directory.Delete(_tempDirectory, true);
zfi.Delete();
}
Debug.Console(0, "Done with .cplz archives");
}
/// <summary>
/// Attempts to load the assemblies from the loadedPlugins folder
/// </summary>
static void LoadPluginAssemblies()
{
Debug.Console(0, "Loading assemblies from loadedPlugins folder...");
var pluginDi = new DirectoryInfo(_loadedPluginsDirectoryPath);
var pluginFiles = pluginDi.GetFiles("*.dll");
Debug.Console(2, "Found {0} plugin assemblies to load", pluginFiles.Length);
foreach (var pluginFile in pluginFiles)
{
var loadedAssembly = LoadAssembly(pluginFile.FullName);
LoadedPluginFolderAssemblies.Add(loadedAssembly);
}
Debug.Console(0, "All Plugins Loaded.");
}
/// <summary>
/// Iterate the loaded assemblies and try to call the LoadPlugin method
/// </summary>
static void LoadCustomPluginTypes()
{
Debug.Console(0, "Loading Custom Plugin Types...");
foreach (var loadedAssembly in LoadedPluginFolderAssemblies)
{
// iteratate this assembly's classes, looking for "LoadPlugin()" methods
try
{
var assy = loadedAssembly.Assembly;
var types = assy.GetTypes();
foreach (var type in types)
{
try
{
if (typeof(IPluginDeviceFactory).IsAssignableFrom(type))
{
var plugin = (IPluginDeviceFactory)Crestron.SimplSharp.Reflection.Activator.CreateInstance(type);
LoadCustomPlugin(plugin, loadedAssembly);
}
else
{
var methods = type.GetMethods(BindingFlags.Public | BindingFlags.Static);
var loadPlugin = methods.FirstOrDefault(m => m.Name.Equals("LoadPlugin"));
if (loadPlugin != null)
{
LoadCustomLegacyPlugin(type, loadPlugin, loadedAssembly);
}
}
}
catch (Exception e)
{
Debug.Console(2, "Load Plugin not found. {0} is not a plugin assembly. Exception: {1}", loadedAssembly.Name, e);
continue;
}
}
}
catch (Exception e)
{
Debug.Console(2, "Error Loading Assembly: {0} Exception: (1) ", loadedAssembly.Name, e);
continue;
}
}
// plugin dll will be loaded. Any classes in plugin should have a static constructor
// that registers that class with the Core.DeviceFactory
Debug.Console(0, "Done Loading Custom Plugin Types.");
}
/// <summary>
/// Loads a
/// </summary>
/// <param name="plugin"></param>
static void LoadCustomPlugin(IPluginDeviceFactory plugin, LoadedAssembly loadedAssembly)
{
var passed = Global.IsRunningMinimumVersionOrHigher(plugin.MinimumEssentialsFrameworkVersion);
if (!passed)
{
Debug.Console(0, Debug.ErrorLogLevel.Error, "Plugin indicates minimum Essentials version {0}. Dependency check failed. Skipping Plugin", plugin.MinimumEssentialsFrameworkVersion);
return;
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Passed plugin passed dependency check (required version {0})", plugin.MinimumEssentialsFrameworkVersion);
}
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loading plugin: {0}", loadedAssembly.Name);
plugin.LoadTypeFactories();
}
/// <summary>
/// Loads a a custom plugin via the legacy method
/// </summary>
/// <param name="type"></param>
/// <param name="loadPlugin"></param>
static void LoadCustomLegacyPlugin(CType type, MethodInfo loadPlugin, LoadedAssembly loadedAssembly)
{
Debug.Console(2, "LoadPlugin method found in {0}", type.Name);
var fields = type.GetFields(BindingFlags.Public | BindingFlags.Static);
var minimumVersion = fields.FirstOrDefault(p => p.Name.Equals("MinimumEssentialsFrameworkVersion"));
if (minimumVersion != null)
{
Debug.Console(2, "MinimumEssentialsFrameworkVersion found");
var minimumVersionString = minimumVersion.GetValue(null) as string;
if (!string.IsNullOrEmpty(minimumVersionString))
{
var passed = Global.IsRunningMinimumVersionOrHigher(minimumVersionString);
if (!passed)
{
Debug.Console(0, Debug.ErrorLogLevel.Error, "Plugin indicates minimum Essentials version {0}. Dependency check failed. Skipping Plugin", minimumVersionString);
return;
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Passed plugin passed dependency check (required version {0})", minimumVersionString);
}
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Warning, "MinimumEssentialsFrameworkVersion found but not set. Loading plugin, but your mileage may vary.");
}
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Warning, "MinimumEssentialsFrameworkVersion not found. Loading plugin, but your mileage may vary.");
}
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loading legacy plugin: {0}", loadedAssembly.Name);
loadPlugin.Invoke(null, null);
}
/// <summary>
/// Loads plugins
/// </summary>
public static void LoadPlugins()
{
if (Directory.Exists(_pluginDirectory))
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Plugins directory found, checking for plugins");
// Deal with any .dll files
MoveDllAssemblies();
// Deal with any .cplz files
UnzipAndMoveCplzArchives();
if(Directory.Exists(_loadedPluginsDirectoryPath)) {
// Load the assemblies from the loadedPlugins folder into the AppDomain
LoadPluginAssemblies();
// Load the types from any custom plugin assemblies
LoadCustomPluginTypes();
}
}
}
}
/// <summary>
/// Represents an assembly loaded at runtime and it's associated metadata
/// </summary>
public class LoadedAssembly
{
public string Name { get; private set; }
public string Version { get; private set; }
public Assembly Assembly { get; private set; }
public LoadedAssembly(string name, string version, Assembly assembly)
{
Name = name;
Version = version;
Assembly = assembly;
}
}
}

View File

@@ -4,6 +4,10 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
namespace PepperDash.Essentials.Room.Config
{
/// <summary>
@@ -11,9 +15,28 @@ namespace PepperDash.Essentials.Room.Config
/// </summary>
public class EssentialsHuddleRoomPropertiesConfig : EssentialsRoomPropertiesConfig
{
/// <summary>
/// The key of the default display device
/// </summary>
[JsonProperty("defaultDisplayKey")]
public string DefaultDisplayKey { get; set; }
/// <summary>
/// The key of the default audio device
/// </summary>
[JsonProperty("defaultAudioKey")]
public string DefaultAudioKey { get; set; }
/// <summary>
/// The key of the source list for the room
/// </summary>
[JsonProperty("sourceListKey")]
public string SourceListKey { get; set; }
/// <summary>
/// The key of the default source item from the source list
/// </summary>
[JsonProperty("defaultSourceItem")]
public string DefaultSourceItem { get; set; }
}
}

View File

@@ -348,7 +348,7 @@ namespace PepperDash.Essentials
CrestronEnvironment.Sleep(1000);
RunRouteAction("roomOff");
RunRouteAction("roomOff", SourceListKey);
}
/// <summary>
@@ -357,7 +357,7 @@ namespace PepperDash.Essentials
public override bool RunDefaultPresentRoute()
{
if (DefaultSourceItem != null)
RunRouteAction(DefaultSourceItem);
RunRouteAction(DefaultSourceItem, SourceListKey);
return DefaultSourceItem != null;
}
@@ -368,7 +368,7 @@ namespace PepperDash.Essentials
/// <returns></returns>
public bool RunDefaultCallRoute()
{
RunRouteAction(DefaultCodecRouteString);
RunRouteAction(DefaultCodecRouteString, SourceListKey);
return true;
}
@@ -376,9 +376,9 @@ namespace PepperDash.Essentials
///
/// </summary>
/// <param name="routeKey"></param>
public void RunRouteAction(string routeKey)
public void RunRouteAction(string routeKey, string sourceListKey)
{
RunRouteAction(routeKey, null);
RunRouteAction(routeKey, sourceListKey, null);
}
/// <summary>
@@ -386,7 +386,7 @@ namespace PepperDash.Essentials
/// route or commands
/// </summary>
/// <param name="name"></param>
public void RunRouteAction(string routeKey, Action successCallback)
public void RunRouteAction(string routeKey, string sourceListKey, Action successCallback)
{
// Run this on a separate thread
new CTimer(o =>
@@ -398,10 +398,10 @@ namespace PepperDash.Essentials
{
Debug.Console(1, this, "Run route action '{0}'", routeKey);
var dict = ConfigReader.ConfigObject.GetSourceListForKey(SourceListKey);
var dict = ConfigReader.ConfigObject.GetSourceListForKey(sourceListKey);
if (dict == null)
{
Debug.Console(1, this, "WARNING: Config source list '{0}' not found", SourceListKey);
Debug.Console(1, this, "WARNING: Config source list '{0}' not found", sourceListKey);
return;
}
@@ -555,7 +555,7 @@ namespace PepperDash.Essentials
/// <returns></returns>
bool DoRoute(SourceRouteListItem route, SourceListItem sourceItem, string sourceItemKey)
{
IRoutingSinkNoSwitching dest = null;
IRoutingSink dest = null;
if (route.DestinationKey.Equals("$defaultaudio", StringComparison.OrdinalIgnoreCase))
dest = DefaultAudioDevice as IRoutingSinkNoSwitching;
@@ -619,7 +619,7 @@ namespace PepperDash.Essentials
{
if (!EnablePowerOnToLastSource || LastSourceKey == null)
return;
RunRouteAction(LastSourceKey);
RunRouteAction(LastSourceKey, SourceListKey);
}
/// <summary>
@@ -630,7 +630,7 @@ namespace PepperDash.Essentials
var allRooms = DeviceManager.AllDevices.Where(d =>
d is EssentialsHuddleSpaceRoom && !(d as EssentialsHuddleSpaceRoom).ExcludeFromGlobalFunctions);
foreach (var room in allRooms)
(room as EssentialsHuddleSpaceRoom).RunRouteAction("roomOff");
(room as EssentialsHuddleSpaceRoom).RunRouteAction("roomOff", (room as EssentialsHuddleSpaceRoom).SourceListKey);
}
#region IPrivacy Members

View File

@@ -71,7 +71,7 @@ namespace PepperDash.Essentials
public EssentialsHuddleRoomPropertiesConfig PropertiesConfig { get; private set; }
public IRoutingSinkWithSwitching DefaultDisplay { get; private set; }
public IRoutingSinkNoSwitching DefaultAudioDevice { get; private set; }
public IRoutingSink DefaultAudioDevice { get; private set; }
public IBasicVolumeControls DefaultVolumeControls { get; private set; }
public bool ExcludeFromGlobalFunctions { get; set; }
@@ -264,8 +264,30 @@ namespace PepperDash.Essentials
/// <param name="routeKey"></param>
public void RunRouteAction(string routeKey)
{
RunRouteAction(routeKey, null);
}
RunRouteAction(routeKey, new Action(() => { }));
}
/// <summary>
///
/// </summary>
/// <param name="routeKey"></param>
/// <param name="souceListKey"></param>
/// <param name="successCallback"></param>
public void RunRouteAction(string routeKey, string souceListKey)
{
throw new NotImplementedException();
}
/// <summary>
///
/// </summary>
/// <param name="routeKey"></param>
/// <param name="souceListKey"></param>
/// <param name="successCallback"></param>
public void RunRouteAction(string routeKey, string souceListKey, Action successCallback)
{
throw new NotImplementedException();
}
/// <summary>
/// Gets a source from config list SourceListKey and dynamically build and executes the
@@ -449,14 +471,14 @@ namespace PepperDash.Essentials
/// <returns></returns>
bool DoRoute(SourceRouteListItem route)
{
IRoutingSinkNoSwitching dest = null;
IRoutingSink dest = null;
if (route.DestinationKey.Equals("$defaultaudio", StringComparison.OrdinalIgnoreCase))
dest = DefaultAudioDevice;
else if (route.DestinationKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase))
dest = DefaultDisplay;
else
dest = DeviceManager.GetDeviceForKey(route.DestinationKey) as IRoutingSinkNoSwitching;
dest = DeviceManager.GetDeviceForKey(route.DestinationKey) as IRoutingSink;
if (dest == null)
{

View File

@@ -394,8 +394,30 @@ namespace PepperDash.Essentials
/// <param name="routeKey"></param>
public void RunRouteAction(string routeKey)
{
RunRouteAction(routeKey, null);
}
RunRouteAction(routeKey, new Action(() => { }));
}
/// <summary>
///
/// </summary>
/// <param name="routeKey"></param>
/// <param name="souceListKey"></param>
/// <param name="successCallback"></param>
public void RunRouteAction(string routeKey, string souceListKey)
{
throw new NotImplementedException();
}
/// <summary>
///
/// </summary>
/// <param name="routeKey"></param>
/// <param name="souceListKey"></param>
/// <param name="successCallback"></param>
public void RunRouteAction(string routeKey, string souceListKey, Action successCallback)
{
throw new NotImplementedException();
}
/// <summary>
/// Gets a source from config list SourceListKey and dynamically build and executes the
@@ -568,7 +590,7 @@ namespace PepperDash.Essentials
/// <returns></returns>
bool DoRoute(SourceRouteListItem route)
{
IRoutingSinkNoSwitching dest = null;
IRoutingSink dest = null;
if (route.DestinationKey.Equals("$defaultaudio", StringComparison.OrdinalIgnoreCase))
dest = DefaultAudioDevice as IRoutingSinkNoSwitching;

View File

@@ -9,11 +9,12 @@ 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 : Device, IHasBasicTriListWithSmartObject
public class EssentialsTouchpanelController : EssentialsDevice, IHasBasicTriListWithSmartObject
{
public BasicTriListWithSmartObject Panel { get; private set; }
@@ -197,4 +198,132 @@ namespace PepperDash.Essentials
(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", "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)
{
// 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");
// 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;
}
}
}

View File

@@ -564,7 +564,7 @@ namespace PepperDash.Essentials
void UiSelectSource(string key)
{
// Run the route and when it calls back, show the source
CurrentRoom.RunRouteAction(key, null);
CurrentRoom.RunRouteAction(key, new Action(() => { }));
}
/// <summary>

View File

@@ -726,7 +726,7 @@ namespace PepperDash.Essentials
void UiSelectSource(string key)
{
// Run the route and when it calls back, show the source
CurrentRoom.RunRouteAction(key, null);
CurrentRoom.RunRouteAction(key, new Action(() => { }));
}
/// <summary>
@@ -941,7 +941,7 @@ namespace PepperDash.Essentials
if (_CurrentRoom != null)
_CurrentRoom.CurrentSourceChange += new SourceInfoChangeHandler(CurrentRoom_CurrentSingleSourceChange);
TriList.SetSigFalseAction(UIBoolJoin.CallStopSharingPress, () => _CurrentRoom.RunRouteAction("codecOsd"));
TriList.SetSigFalseAction(UIBoolJoin.CallStopSharingPress, () => _CurrentRoom.RunRouteAction("codecOsd", _CurrentRoom.SourceListKey));
(Parent as EssentialsPanelMainInterfaceDriver).HeaderDriver.SetupHeaderButtons(this, CurrentRoom);
}
@@ -987,7 +987,7 @@ namespace PepperDash.Essentials
if (CurrentRoom.CurrentSourceInfo != null && CurrentRoom.CurrentSourceInfo.DisableCodecSharing)
{
Debug.Console(1, CurrentRoom, "Transitioning to in-call, cancelling non-sharable source");
CurrentRoom.RunRouteAction("codecOsd");
CurrentRoom.RunRouteAction("codecOsd", CurrentRoom.SourceListKey);
}
}

View File

@@ -10,7 +10,7 @@ PepperDash Essentials is an open source Crestron framework that can be configure
Essentials Framework is a collection of C# / Simpl# Pro libraries that can be utilized in several different manners. It is currently operating as a 100% configuration-driven system, and can be extended to add different workflows and behaviors, either through the addition of further device "types" or via the plug-in mechanism. The framework is a collection of "things" that are all related and interconnected, but in general do not have dependencies on each other.
## Minimum Requirements
- Essentials Framework runs on any Crestron 3-series processor or Crestron's VC-4 platform.
- Essentials Framework runs on any Crestron 3-series processor, **4-series** processor or Crestron's VC-4 platform.
- To edit and compile the source, Microsoft Visual Studio 2008 Professional with SP1 is required.
- Crestron's Simpl# Plugin is also required (must be obtained from Crestron).

View File

@@ -0,0 +1,309 @@
using System;
using System.Collections.Generic;
using Crestron.SimplSharp.Reflection;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.EthernetCommunication;
using Newtonsoft.Json;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Config;
//using PepperDash.Essentials.Devices.Common.Cameras;
namespace PepperDash.Essentials.Core.Bridges
{
/// <summary>
/// Helper methods for bridges
/// </summary>
public static class BridgeHelper
{
public static void PrintJoinMap(string command)
{
var targets = command.Split(' ');
var bridgeKey = targets[0].Trim();
var bridge = DeviceManager.GetDeviceForKey(bridgeKey) as EiscApiAdvanced;
if (bridge == null)
{
Debug.Console(0, "Unable to find advanced bridge with key: '{0}'", bridgeKey);
return;
}
if (targets.Length > 1)
{
var deviceKey = targets[1].Trim();
if (string.IsNullOrEmpty(deviceKey)) return;
bridge.PrintJoinMapForDevice(deviceKey);
}
else
{
bridge.PrintJoinMaps();
}
}
}
/// <summary>
/// Base class for all bridge class variants
/// </summary>
public class BridgeBase : EssentialsDevice
{
public BridgeApi Api { get; protected set; }
public BridgeBase(string key) :
base(key)
{
}
}
/// <summary>
/// Base class for bridge API variants
/// </summary>
public abstract class BridgeApi : EssentialsDevice
{
protected BridgeApi(string key) :
base(key)
{
}
}
/// <summary>
/// Bridge API using EISC
/// </summary>
public class EiscApiAdvanced : BridgeApi
{
public EiscApiPropertiesConfig PropertiesConfig { get; private set; }
protected Dictionary<string, JoinMapBaseAdvanced> JoinMaps { get; private set; }
public ThreeSeriesTcpIpEthernetIntersystemCommunications Eisc { get; private set; }
public EiscApiAdvanced(DeviceConfig dc) :
base(dc.Key)
{
JoinMaps = new Dictionary<string, JoinMapBaseAdvanced>();
PropertiesConfig = dc.Properties.ToObject<EiscApiPropertiesConfig>();
//PropertiesConfig = JsonConvert.DeserializeObject<EiscApiPropertiesConfig>(dc.Properties.ToString());
Eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(PropertiesConfig.Control.IpIdInt, PropertiesConfig.Control.TcpSshProperties.Address, Global.ControlSystem);
Eisc.SigChange += Eisc_SigChange;
Eisc.Register();
AddPostActivationAction( () =>
{
Debug.Console(1, this, "Linking Devices...");
foreach (var d in PropertiesConfig.Devices)
{
var device = DeviceManager.GetDeviceForKey(d.DeviceKey);
if (device == null) continue;
Debug.Console(1, this, "Linking Device: '{0}'", device.Key);
//if (device is IBridge) // Check for this first to allow bridges in plugins to override existing bridges that apply to the same type.
//{
// Debug.Console(2, this, "'{0}' is IBridge", device.Key);
//}
if (!typeof (IBridgeAdvanced).IsAssignableFrom(device.GetType().GetCType()))
{
continue;
}
var bridge = device as IBridgeAdvanced;
if (bridge != null) bridge.LinkToApi(Eisc, d.JoinStart, d.JoinMapKey, this);
}
});
}
/// <summary>
/// Adds a join map
/// </summary>
/// <param name="deviceKey"></param>
/// <param name="joinMap"></param>
public void AddJoinMap(string deviceKey, JoinMapBaseAdvanced joinMap)
{
if (!JoinMaps.ContainsKey(deviceKey))
{
JoinMaps.Add(deviceKey, joinMap);
}
else
{
Debug.Console(2, this, "Unable to add join map with key '{0}'. Key already exists in JoinMaps dictionary", deviceKey);
}
}
/// <summary>
/// Prints all the join maps on this bridge
/// </summary>
public void PrintJoinMaps()
{
Debug.Console(0, this, "Join Maps for EISC IPID: {0}", Eisc.ID.ToString("X"));
foreach (var joinMap in JoinMaps)
{
Debug.Console(0, "Join map for device '{0}':", joinMap.Key);
joinMap.Value.PrintJoinMapInfo();
}
}
/// <summary>
/// Prints the join map for a device by key
/// </summary>
/// <param name="deviceKey"></param>
public void PrintJoinMapForDevice(string deviceKey)
{
var joinMap = JoinMaps[deviceKey];
if (joinMap == null)
{
Debug.Console(0, this, "Unable to find joinMap for device with key: '{0}'", deviceKey);
return;
}
Debug.Console(0, "Join map for device '{0}' on EISC '{1}':", deviceKey, Key);
joinMap.PrintJoinMapInfo();
}
/// <summary>
/// Used for debugging to trigger an action based on a join number and type
/// </summary>
/// <param name="join"></param>
/// <param name="type"></param>
/// <param name="state"></param>
public void ExecuteJoinAction(uint join, string type, object state)
{
try
{
switch (type.ToLower())
{
case "digital":
{
var uo = Eisc.BooleanOutput[join].UserObject as Action<bool>;
if (uo != null)
{
Debug.Console(1, this, "Executing Action: {0}", uo.ToString());
uo(Convert.ToBoolean(state));
}
else
Debug.Console(1, this, "User Action is null. Nothing to Execute");
break;
}
case "analog":
{
var uo = Eisc.BooleanOutput[join].UserObject as Action<ushort>;
if (uo != null)
{
Debug.Console(1, this, "Executing Action: {0}", uo.ToString());
uo(Convert.ToUInt16(state));
}
else
Debug.Console(1, this, "User Action is null. Nothing to Execute"); break;
}
case "serial":
{
var uo = Eisc.BooleanOutput[join].UserObject as Action<string>;
if (uo != null)
{
Debug.Console(1, this, "Executing Action: {0}", uo.ToString());
uo(Convert.ToString(state));
}
else
Debug.Console(1, this, "User Action is null. Nothing to Execute");
break;
}
default:
{
Debug.Console(1, "Unknown join type. Use digital/serial/analog");
break;
}
}
}
catch (Exception e)
{
Debug.Console(1, this, "Error: {0}", e);
}
}
/// <summary>
/// Handles incoming sig changes
/// </summary>
/// <param name="currentDevice"></param>
/// <param name="args"></param>
void Eisc_SigChange(object currentDevice, SigEventArgs args)
{
try
{
if (Debug.Level >= 1)
Debug.Console(1, this, "EiscApiAdvanced change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue);
var uo = args.Sig.UserObject;
if (uo == null) return;
Debug.Console(1, this, "Executing Action: {0}", uo.ToString());
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);
}
catch (Exception e)
{
Debug.Console(2, this, "Error in Eisc_SigChange handler: {0}", e);
}
}
}
public class EiscApiPropertiesConfig
{
[JsonProperty("control")]
public EssentialsControlPropertiesConfig Control { get; set; }
[JsonProperty("devices")]
public List<ApiDevicePropertiesConfig> Devices { get; set; }
public class ApiDevicePropertiesConfig
{
[JsonProperty("deviceKey")]
public string DeviceKey { get; set; }
[JsonProperty("joinStart")]
public uint JoinStart { get; set; }
[JsonProperty("joinMapKey")]
public string JoinMapKey { get; set; }
}
}
public class EiscApiAdvancedFactory : EssentialsDeviceFactory<EiscApiAdvanced>
{
public EiscApiAdvancedFactory()
{
TypeNames = new List<string>() { "eiscapiadv", "eiscapiadvanced" };
}
public override EssentialsDevice BuildDevice(DeviceConfig dc)
{
Debug.Console(1, "Factory Attempting to create new EiscApiAdvanced Device");
return new EiscApiAdvanced(dc);
}
}
}

View File

@@ -0,0 +1,13 @@
using System;
using Crestron.SimplSharpPro.DeviceSupport;
namespace PepperDash.Essentials.Core.Bridges
{
/// <summary>
/// Defines a device that uses JoinMapBaseAdvanced for its join map
/// </summary>
public interface IBridgeAdvanced
{
void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge);
}
}

View File

@@ -0,0 +1,66 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges
{
public class AirMediaControllerJoinMap : JoinMapBaseAdvanced
{
[JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata() { Label = "Air Media Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("IsInSession")]
public JoinDataComplete IsInSession = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata() { Label = "Air Media In Sharing Session", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("HdmiVideoSync")]
public JoinDataComplete HdmiVideoSync = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata() { Label = "Air Media Has HDMI Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("AutomaticInputRoutingEnabled")]
public JoinDataComplete AutomaticInputRoutingEnabled = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata() { Label = "Air Media Automatic Input Routing Enable(d)", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("VideoOut")]
public JoinDataComplete VideoOut = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata() { Label = "Air Media Video Route Select / Feedback", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("ErrorFB")]
public JoinDataComplete ErrorFB = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata() { Label = "Air Media Error Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
[JoinName("NumberOfUsersConnectedFB")]
public JoinDataComplete NumberOfUsersConnectedFB = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata() { Label = "Air Media Number of Users Connected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
[JoinName("LoginCode")]
public JoinDataComplete LoginCode = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata() { Label = "Air Media Login Code Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("Name")]
public JoinDataComplete Name = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata() { Label = "Air Media Device Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("ConnectionAddressFB")]
public JoinDataComplete ConnectionAddressFB = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata() { Label = "Air Media IP Address", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("HostnameFB")]
public JoinDataComplete HostnameFB = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata() { Label = "Air Media Hostname", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("SerialNumberFeedback")]
public JoinDataComplete SerialNumberFeedback = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata() { Label = "Air Media Serial Number", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
public AirMediaControllerJoinMap(uint joinStart)
: base(joinStart, typeof(AirMediaControllerJoinMap))
{
}
}
}

View File

@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges
{
public class AppleTvJoinMap : JoinMapBaseAdvanced
{
[JoinName("UpArrow")]
public JoinDataComplete UpArrow = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata() { Label = "AppleTv Nav Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("DnArrow")]
public JoinDataComplete DnArrow = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata() { Label = "AppleTv Nav Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("LeftArrow")]
public JoinDataComplete LeftArrow = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata() { Label = "AppleTv Nav Left", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("RightArrow")]
public JoinDataComplete RightArrow = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata() { Label = "AppleTv Nav Right", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("Menu")]
public JoinDataComplete Menu = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata() { Label = "AppleTv Menu", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("Select")]
public JoinDataComplete Select = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 },
new JoinMetadata() { Label = "AppleTv Select", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("PlayPause")]
public JoinDataComplete PlayPause = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 },
new JoinMetadata() { Label = "AppleTv Play/Pause", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
public AppleTvJoinMap(uint joinStart)
: base(joinStart, typeof(AppleTvJoinMap))
{
}
}
}

View File

@@ -0,0 +1,34 @@
using System.Linq;
using Crestron.SimplSharp.Reflection;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges
{
public class C2nRthsControllerJoinMap : JoinMapBaseAdvanced
{
[JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata() { Label = "Temp Sensor Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("TemperatureFormat")]
public JoinDataComplete TemperatureFormat = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata() { Label = "Temp Sensor Unit Format", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("Temperature")]
public JoinDataComplete Temperature = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata() { Label = "Temp Sensor Temperature Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
[JoinName("Humidity")]
public JoinDataComplete Humidity = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata() { Label = "Temp Sensor Humidity Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
[JoinName("Name")]
public JoinDataComplete Name = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata() { Label = "Temp Sensor Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
public C2nRthsControllerJoinMap(uint joinStart)
: base(joinStart, typeof(C2nRthsControllerJoinMap))
{
}
}
}

View File

@@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges
{
/// <summary>
/// Join map for CameraBase devices
/// </summary>
public class CameraControllerJoinMap : JoinMapBaseAdvanced
{
[JoinName("TiltUp")]
public JoinDataComplete TiltUp = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 }, new JoinMetadata() { Label = "Tilt Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("TiltDown")]
public JoinDataComplete TiltDown = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 }, new JoinMetadata() { Label = "Tilt Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("PanLeft")]
public JoinDataComplete PanLeft = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 }, new JoinMetadata() { Label = "Pan Left", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("PanRight")]
public JoinDataComplete PanRight = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 }, new JoinMetadata() { Label = "Pan Right", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("ZoomIn")]
public JoinDataComplete ZoomIn = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 }, new JoinMetadata() { Label = "Zoom In", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("ZoomOut")]
public JoinDataComplete ZoomOut = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 }, new JoinMetadata() { Label = "Zoom Out", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 9, JoinSpan = 1 }, new JoinMetadata() { Label = "Is Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("PowerOn")]
public JoinDataComplete PowerOn = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 }, new JoinMetadata() { Label = "Power On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("PowerOff")]
public JoinDataComplete PowerOff = new JoinDataComplete(new JoinData() { JoinNumber = 8, JoinSpan = 1 }, new JoinMetadata() { Label = "Power Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("NumberOfPresets")]
public JoinDataComplete NumberOfPresets = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 }, new JoinMetadata() { Label = "Tells Essentials the number of defined presets", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
[JoinName("PresetRecallStart")]
public JoinDataComplete PresetRecallStart = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 20 }, new JoinMetadata() { Label = "Preset Recall Start", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("PresetLabelStart")]
public JoinDataComplete PresetLabelStart = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 20 }, new JoinMetadata() { Label = "Preset Label Start", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("PresetSaveStart")]
public JoinDataComplete PresetSaveStart = new JoinDataComplete(new JoinData() { JoinNumber = 31, JoinSpan = 20 }, new JoinMetadata() { Label = "Preset Save Start", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraModeAuto")]
public JoinDataComplete CameraModeAuto = new JoinDataComplete(new JoinData() { JoinNumber = 51, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Mode Auto", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraModeManual")]
public JoinDataComplete CameraModeManual = new JoinDataComplete(new JoinData() { JoinNumber = 52, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Mode Manual", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraModeOff")]
public JoinDataComplete CameraModeOff = new JoinDataComplete(new JoinData() { JoinNumber = 53, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Mode Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("SupportsCameraModeAuto")]
public JoinDataComplete SupportsCameraModeAuto = new JoinDataComplete(new JoinData() { JoinNumber = 55, JoinSpan = 1 }, new JoinMetadata() { Label = "Supports Camera Mode Auto", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("SupportsCameraModeOff")]
public JoinDataComplete SupportsCameraModeOff = new JoinDataComplete(new JoinData() { JoinNumber = 56, JoinSpan = 1 }, new JoinMetadata() { Label = "Supports Camera Mode Off", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("SupportsPresets")]
public JoinDataComplete SupportsPresets = new JoinDataComplete(new JoinData() { JoinNumber = 57, JoinSpan = 1 }, new JoinMetadata() { Label = "Supports Presets", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
public CameraControllerJoinMap(uint joinStart)
: base(joinStart, typeof(CameraControllerJoinMap))
{
}
}
}

View File

@@ -0,0 +1,182 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges
{
public class CenOdtOccupancySensorBaseJoinMap : JoinMapBaseAdvanced
{
#region Digitals
[JoinName("Online")]
public JoinDataComplete Online = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata() { Label = "Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("ForceOccupied")]
public JoinDataComplete ForceOccupied = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata() { Label = "Force Occupied", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("ForceVacant")]
public JoinDataComplete ForceVacant = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata() { Label = "Force Vacant", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("EnableRawStates")]
public JoinDataComplete EnableRawStates = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata() { Label = "Enable Raw States", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("RoomOccupiedFeedback")]
public JoinDataComplete RoomOccupiedFeedback = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata() { Label = "Room Occupied Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("GraceOccupancyDetectedFeedback")]
public JoinDataComplete GraceOccupancyDetectedFeedback = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata() { Label = "Grace Occupancy Detected Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("RoomVacantFeedback")]
public JoinDataComplete RoomVacantFeedback = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata() { Label = "Room Vacant Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("RawOccupancyFeedback")]
public JoinDataComplete RawOccupancyFeedback = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata() { Label = "Raw Occupancy Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("RawOccupancyPirFeedback")]
public JoinDataComplete RawOccupancyPirFeedback = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 },
new JoinMetadata() { Label = "Raw Occupancy Pir Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("RawOccupancyUsFeedback")]
public JoinDataComplete RawOccupancyUsFeedback = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 },
new JoinMetadata() { Label = "Raw Occupancy Us Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("EnableLedFlash")]
public JoinDataComplete EnableLedFlash = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 },
new JoinMetadata() { Label = "Enable Led Flash", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("DisableLedFlash")]
public JoinDataComplete DisableLedFlash = new JoinDataComplete(new JoinData() { JoinNumber = 12, JoinSpan = 1 },
new JoinMetadata() { Label = "Disable Led Flash", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("EnableShortTimeout")]
public JoinDataComplete EnableShortTimeout = new JoinDataComplete(new JoinData() { JoinNumber = 13, JoinSpan = 1 },
new JoinMetadata() { Label = "Enable Short Timeout", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("DisableShortTimeout")]
public JoinDataComplete DisableShortTimeout = new JoinDataComplete(new JoinData() { JoinNumber = 14, JoinSpan = 1 },
new JoinMetadata() { Label = "Disable Short Timeout", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("OrWhenVacated")]
public JoinDataComplete OrWhenVacated = new JoinDataComplete(new JoinData() { JoinNumber = 15, JoinSpan = 1 },
new JoinMetadata() { Label = "Or When Vacated", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("AndWhenVacated")]
public JoinDataComplete AndWhenVacated = new JoinDataComplete(new JoinData() { JoinNumber = 16, JoinSpan = 1 },
new JoinMetadata() { Label = "AndWhenVacated", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("EnableUsA")]
public JoinDataComplete EnableUsA = new JoinDataComplete(new JoinData() { JoinNumber = 17, JoinSpan = 1 },
new JoinMetadata() { Label = "Enable Us A", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("DisableUsA")]
public JoinDataComplete DisableUsA = new JoinDataComplete(new JoinData() { JoinNumber = 18, JoinSpan = 1 },
new JoinMetadata() { Label = "Disable Us A", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("EnableUsB")]
public JoinDataComplete EnableUsB = new JoinDataComplete(new JoinData() { JoinNumber = 19, JoinSpan = 1 },
new JoinMetadata() { Label = "Enable Us B", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("DisableUsB")]
public JoinDataComplete DisableUsB = new JoinDataComplete(new JoinData() { JoinNumber = 20, JoinSpan = 1 },
new JoinMetadata() { Label = "Disable Us B", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("EnablePir")]
public JoinDataComplete EnablePir = new JoinDataComplete(new JoinData() { JoinNumber = 21, JoinSpan = 1 },
new JoinMetadata() { Label = "Enable Pir", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("DisablePir")]
public JoinDataComplete DisablePir = new JoinDataComplete(new JoinData() { JoinNumber = 22, JoinSpan = 1 },
new JoinMetadata() { Label = "Disable Pir", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("IncrementUsInOccupiedState")]
public JoinDataComplete IncrementUsInOccupiedState = new JoinDataComplete(new JoinData() { JoinNumber = 23, JoinSpan = 1 },
new JoinMetadata() { Label = "Increment Us In OccupiedState", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("DecrementUsInOccupiedState")]
public JoinDataComplete DecrementUsInOccupiedState = new JoinDataComplete(new JoinData() { JoinNumber = 24, JoinSpan = 1 },
new JoinMetadata() { Label = "Dencrement Us In Occupied State", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("IncrementUsInVacantState")]
public JoinDataComplete IncrementUsInVacantState = new JoinDataComplete(new JoinData() { JoinNumber = 25, JoinSpan = 1 },
new JoinMetadata() { Label = "Increment Us In VacantState", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("DecrementUsInVacantState")]
public JoinDataComplete DecrementUsInVacantState = new JoinDataComplete(new JoinData() { JoinNumber = 26, JoinSpan = 1 },
new JoinMetadata() { Label = "Decrement Us In VacantState", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("IncrementPirInOccupiedState")]
public JoinDataComplete IncrementPirInOccupiedState = new JoinDataComplete(new JoinData() { JoinNumber = 27, JoinSpan = 1 },
new JoinMetadata() { Label = "Increment Pir In Occupied State", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("DecrementPirInOccupiedState")]
public JoinDataComplete DecrementPirInOccupiedState = new JoinDataComplete(new JoinData() { JoinNumber = 28, JoinSpan = 1 },
new JoinMetadata() { Label = "Decrement Pir In OccupiedState", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("IncrementPirInVacantState")]
public JoinDataComplete IncrementPirInVacantState = new JoinDataComplete(new JoinData() { JoinNumber = 29, JoinSpan = 1 },
new JoinMetadata() { Label = "Increment Pir In Vacant State", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("DecrementPirInVacantState")]
public JoinDataComplete DecrementPirInVacantState = new JoinDataComplete(new JoinData() { JoinNumber = 30, JoinSpan = 1 },
new JoinMetadata() { Label = "Decrement Pir In Vacant State", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
#endregion
#region Analog
[JoinName("Timeout")]
public JoinDataComplete Timeout = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata() { Label = "Timeout", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("TimeoutLocalFeedback")]
public JoinDataComplete TimeoutLocalFeedback = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata() { Label = "Timeout Local Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
[JoinName("InternalPhotoSensorValue")]
public JoinDataComplete InternalPhotoSensorValue = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata() { Label = "Internal PhotoSensor Value", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("UsSensitivityInOccupiedState")]
public JoinDataComplete UsSensitivityInOccupiedState = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata() { Label = "Us Sensitivity In Occupied State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
[JoinName("UsSensitivityInVacantState")]
public JoinDataComplete UsSensitivityInVacantState = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 },
new JoinMetadata() { Label = "Us Sensitivity In Vacant State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
[JoinName("PirSensitivityInOccupiedState")]
public JoinDataComplete PirSensitivityInOccupiedState = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 },
new JoinMetadata() { Label = "Pir Sensitivity In Occupied State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
[JoinName("PirSensitivityInVacantState")]
public JoinDataComplete PirSensitivityInVacantState = new JoinDataComplete(new JoinData() { JoinNumber = 8, JoinSpan = 1 },
new JoinMetadata() { Label = "Pir Sensitivity In Vacant State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
#endregion
#region Serial
[JoinName("Name")]
public JoinDataComplete Name = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata() { Label = "Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
#endregion
public CenOdtOccupancySensorBaseJoinMap(uint joinStart)
: base(joinStart, typeof(CenOdtOccupancySensorBaseJoinMap))
{
}
}
}

View File

@@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Essentials.Core.Bridges
{
[Obsolete("This Device will be moved to a plugin in a future update")]
public class DigitalLoggerJoinMap : JoinMapBase
{
public uint IsOnline { get; set; }
public uint CircuitNames { get; set; }
public uint CircuitState { get; set; }
public uint CircuitCycle { get; set; }
public uint CircuitIsCritical { get; set; }
public uint CircuitOnCmd { get; set; }
public uint CircuitOffCmd { get; set; }
public DigitalLoggerJoinMap()
{
// Digital
IsOnline = 9;
CircuitState = 0;
CircuitCycle = 0;
CircuitIsCritical = 10;
CircuitOnCmd = 10;
CircuitOffCmd = 20;
// Serial
CircuitNames = 0;
// Analog
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
IsOnline = IsOnline + joinOffset;
CircuitNames = CircuitNames + joinOffset;
CircuitState = CircuitState + joinOffset;
CircuitCycle = CircuitCycle + joinOffset;
CircuitIsCritical = CircuitIsCritical + joinOffset;
CircuitOnCmd = CircuitOnCmd + joinOffset;
CircuitOffCmd = CircuitOffCmd + joinOffset;
}
}
}

View File

@@ -0,0 +1,77 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges
{
public class DisplayControllerJoinMap : JoinMapBaseAdvanced
{
[JoinName("Name")]
public JoinDataComplete Name = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata() { Label = "Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("PowerOff")]
public JoinDataComplete PowerOff = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata() { Label = "Power Off", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("PowerOn")]
public JoinDataComplete PowerOn = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata() { Label = "Power On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("IsTwoWayDisplay")]
public JoinDataComplete IsTwoWayDisplay = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata() { Label = "Is Two Way Display", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("VolumeUp")]
public JoinDataComplete VolumeUp = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata() { Label = "Volume Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("VolumeLevel")]
public JoinDataComplete VolumeLevel = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata() { Label = "Volume Level", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("VolumeDown")]
public JoinDataComplete VolumeDown = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 },
new JoinMetadata() { Label = "Volume Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("VolumeMute")]
public JoinDataComplete VolumeMute = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 },
new JoinMetadata() { Label = "Volume Mute", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("VolumeMuteOn")]
public JoinDataComplete VolumeMuteOn = new JoinDataComplete(new JoinData() { JoinNumber = 8, JoinSpan = 1 },
new JoinMetadata() { Label = "Volume Mute On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("VolumeMuteOff")]
public JoinDataComplete VolumeMuteOff = new JoinDataComplete(new JoinData() { JoinNumber = 9, JoinSpan = 1 },
new JoinMetadata() { Label = "Volume Mute Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("InputSelectOffset")]
public JoinDataComplete InputSelectOffset = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 10 },
new JoinMetadata() { Label = "Input Select", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("InputNamesOffset")]
public JoinDataComplete InputNamesOffset = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 10 },
new JoinMetadata() { Label = "Input Names Offset", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("InputSelect")]
public JoinDataComplete InputSelect = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 },
new JoinMetadata() { Label = "Input Select", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("ButtonVisibilityOffset")]
public JoinDataComplete ButtonVisibilityOffset = new JoinDataComplete(new JoinData() { JoinNumber = 41, JoinSpan = 10 },
new JoinMetadata() { Label = "Button Visibility Offset", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.DigitalSerial });
[JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 50, JoinSpan = 1 },
new JoinMetadata() { Label = "Is Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
public DisplayControllerJoinMap(uint joinStart)
: base(joinStart, typeof(DisplayControllerJoinMap))
{
}
}
}

View File

@@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges {
public class DmBladeChassisControllerJoinMap : JoinMapBaseAdvanced {
[JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 },
new JoinMetadata() { Label = "DM Blade Chassis Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("VideoSyncStatus")]
public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 128 },
new JoinMetadata() { Label = "DM Blade Input Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("InputEndpointOnline")]
public JoinDataComplete InputEndpointOnline = new JoinDataComplete(new JoinData() { JoinNumber = 501, JoinSpan = 128 },
new JoinMetadata() { Label = "DM Blade Chassis Input Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("OutputEndpointOnline")]
public JoinDataComplete OutputEndpointOnline = new JoinDataComplete(new JoinData() { JoinNumber = 701, JoinSpan = 128 },
new JoinMetadata() { Label = "DM Blade Chassis Output Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("TxAdvancedIsPresent")]
public JoinDataComplete TxAdvancedIsPresent = new JoinDataComplete(new JoinData() { JoinNumber = 1001, JoinSpan = 128 },
new JoinMetadata() { Label = "DM Blade Chassis Tx Advanced Is Present", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("OutputVideo")]
public JoinDataComplete OutputVideo = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 128 },
new JoinMetadata() { Label = "DM Blade Chassis Output Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("HdcpSupportState")]
public JoinDataComplete HdcpSupportState = new JoinDataComplete(new JoinData() { JoinNumber = 1001, JoinSpan = 128 },
new JoinMetadata() { Label = "DM Blade Chassis Input HDCP Support State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
[JoinName("HdcpSupportCapability")]
public JoinDataComplete HdcpSupportCapability = new JoinDataComplete(new JoinData() { JoinNumber = 1201, JoinSpan = 128 },
new JoinMetadata() { Label = "DM Blade Chassis Input HDCP Support Capability", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
[JoinName("InputNames")]
public JoinDataComplete InputNames = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 128 },
new JoinMetadata() { Label = "DM Blade Chassis Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("OutputNames")]
public JoinDataComplete OutputNames = new JoinDataComplete(new JoinData() { JoinNumber = 301, JoinSpan = 128 },
new JoinMetadata() { Label = "DM Blade Chassis Output Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("OutputCurrentVideoInputNames")]
public JoinDataComplete OutputCurrentVideoInputNames = new JoinDataComplete(new JoinData() { JoinNumber = 2001, JoinSpan = 128 },
new JoinMetadata() { Label = "DM Blade Chassis Video Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("InputCurrentResolution")]
public JoinDataComplete InputCurrentResolution = new JoinDataComplete(new JoinData() { JoinNumber = 2401, JoinSpan = 128 },
new JoinMetadata() { Label = "DM Blade Chassis Input Current Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
public DmBladeChassisControllerJoinMap(uint joinStart)
: base(joinStart, typeof(DmBladeChassisControllerJoinMap))
{
}
}
}

View File

@@ -0,0 +1,109 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges
{
public class DmChassisControllerJoinMap : JoinMapBaseAdvanced
{
[JoinName("EnableAudioBreakaway")]
public JoinDataComplete EnableAudioBreakaway = new JoinDataComplete(
new JoinData {JoinNumber = 4, JoinSpan = 1},
new JoinMetadata
{
Label = "DM Chassis enable audio breakaway routing",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("EnableUsbBreakaway")]
public JoinDataComplete EnableUsbBreakaway = new JoinDataComplete(
new JoinData { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata
{
Label = "DM Chassis enable USB breakaway routing",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("SystemId")]
public JoinDataComplete SystemId = new JoinDataComplete(new JoinData() { JoinNumber = 10, JoinSpan = 1 },
new JoinMetadata() { Label = "DM Chassis SystemId Get/Set/Trigger/", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.DigitalAnalog });
[JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 },
new JoinMetadata() { Label = "DM Chassis Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("VideoSyncStatus")]
public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Input Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("InputEndpointOnline")]
public JoinDataComplete InputEndpointOnline = new JoinDataComplete(new JoinData() { JoinNumber = 501, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Chassis Input Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("OutputEndpointOnline")]
public JoinDataComplete OutputEndpointOnline = new JoinDataComplete(new JoinData() { JoinNumber = 701, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Chassis Output Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("TxAdvancedIsPresent")]
public JoinDataComplete TxAdvancedIsPresent = new JoinDataComplete(new JoinData() { JoinNumber = 1001, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Chassis Tx Advanced Is Present", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("OutputDisabledByHdcp")]
public JoinDataComplete OutputDisabledByHdcp = new JoinDataComplete(new JoinData() { JoinNumber = 1201, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Chassis Output Disabled by HDCP", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("OutputVideo")]
public JoinDataComplete OutputVideo = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Chassis Output Video Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("OutputAudio")]
public JoinDataComplete OutputAudio = new JoinDataComplete(new JoinData() { JoinNumber = 301, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Chassis Output Audio Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("OutputUsb")]
public JoinDataComplete OutputUsb = new JoinDataComplete(new JoinData() { JoinNumber = 501, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Chassis Output USB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("InputUsb")]
public JoinDataComplete InputUsb = new JoinDataComplete(new JoinData() { JoinNumber = 701, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Chassis Input Usb Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("HdcpSupportState")]
public JoinDataComplete HdcpSupportState = new JoinDataComplete(new JoinData() { JoinNumber = 1001, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Chassis Input HDCP Support State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
[JoinName("HdcpSupportCapability")]
public JoinDataComplete HdcpSupportCapability = new JoinDataComplete(new JoinData() { JoinNumber = 1201, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Chassis Input HDCP Support Capability", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
[JoinName("InputNames")]
public JoinDataComplete InputNames = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Chassis Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("OutputNames")]
public JoinDataComplete OutputNames = new JoinDataComplete(new JoinData() { JoinNumber = 301, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Chassis Output Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("OutputCurrentVideoInputNames")]
public JoinDataComplete OutputCurrentVideoInputNames = new JoinDataComplete(new JoinData() { JoinNumber = 2001, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Chassis Video Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("OutputCurrentAudioInputNames")]
public JoinDataComplete OutputCurrentAudioInputNames = new JoinDataComplete(new JoinData() { JoinNumber = 2201, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Chassis Audio Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("InputCurrentResolution")]
public JoinDataComplete InputCurrentResolution = new JoinDataComplete(new JoinData() { JoinNumber = 2401, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Chassis Input Current Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
public DmChassisControllerJoinMap(uint joinStart)
: base(joinStart, typeof(DmChassisControllerJoinMap))
{
}
}
}

View File

@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges
{
public class DmRmcControllerJoinMap : JoinMapBaseAdvanced
{
[JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata() { Label = "DM RMC Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("CurrentOutputResolution")]
public JoinDataComplete CurrentOutputResolution = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata() { Label = "DM RMC Current Output Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("EdidManufacturer")]
public JoinDataComplete EdidManufacturer = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata() { Label = "DM RMC EDID Manufacturer", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("EdidName")]
public JoinDataComplete EdidName = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata() { Label = "DM RMC EDID Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("EdidPrefferedTiming")]
public JoinDataComplete EdidPrefferedTiming = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata() { Label = "DM RMC EDID Preferred Timing", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("EdidSerialNumber")]
public JoinDataComplete EdidSerialNumber = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata() { Label = "DM RMC EDID Serial Number", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("AudioVideoSource")]
public JoinDataComplete AudioVideoSource = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata() { Label = "DM RMC Audio Video Source Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
public DmRmcControllerJoinMap(uint joinStart)
: base(joinStart, typeof(DmRmcControllerJoinMap))
{
}
}
}

View File

@@ -0,0 +1,69 @@
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges
{
public class DmTxControllerJoinMap : JoinMapBaseAdvanced
{
[JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata() { Label = "DM TX Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("VideoSyncStatus")]
public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata() { Label = "DM TX Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("FreeRunEnabled")]
public JoinDataComplete FreeRunEnabled = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata() { Label = "DM TX Enable Free Run Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("Input1VideoSyncStatus")]
public JoinDataComplete Input1VideoSyncStatus = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata() { Label = "Input 1 Video Sync Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("Input2VideoSyncStatus")]
public JoinDataComplete Input2VideoSyncStatus = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata() { Label = "Input 2 Video Sync Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("Input3VideoSyncStatus")]
public JoinDataComplete Input3VideoSyncStatus = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 },
new JoinMetadata() { Label = "Input 3 Video Sync Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("CurrentInputResolution")]
public JoinDataComplete CurrentInputResolution = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata() { Label = "DM TX Current Input Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("VideoInput")]
public JoinDataComplete VideoInput = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata() { Label = "DM TX Video Input Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("AudioInput")]
public JoinDataComplete AudioInput = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata() { Label = "DM TX Audio Input Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("HdcpSupportCapability")]
public JoinDataComplete HdcpSupportCapability = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata() { Label = "DM TX HDCP Support Capability", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
[JoinName("Port1HdcpState")]
public JoinDataComplete Port1HdcpState = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata() { Label = "DM TX Port 1 HDCP State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("Port2HdcpState")]
public JoinDataComplete Port2HdcpState = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata() { Label = "DM TX Port 2 HDCP State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("VgaBrightness")]
public JoinDataComplete VgaBrightness = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 },
new JoinMetadata() { Label = "DM TX VGA Brightness", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("VgaContrast")]
public JoinDataComplete VgaContrast = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 },
new JoinMetadata() { Label = "DM TX Online", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
public DmTxControllerJoinMap(uint joinStart)
: base(joinStart, typeof(DmTxControllerJoinMap))
{
}
}
}

View File

@@ -0,0 +1,100 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges
{
public class DmpsAudioOutputControllerJoinMap : JoinMapBaseAdvanced
{
[JoinName("MasterVolumeLevel")]
public JoinDataComplete MasterVolumeLevel = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata() { Label = "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() { Label = "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() { Label = "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() { Label = "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() { Label = "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() { Label = "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() { Label = "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() { Label = "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() { Label = "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() { Label = "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() { Label = "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() { Label = "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() { Label = "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() { Label = "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() { Label = "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() { Label = "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() { Label = "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() { Label = "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() { Label = "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() { Label = "Codec2 Volume Mute Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
public DmpsAudioOutputControllerJoinMap(uint joinStart)
: base(joinStart, typeof(DmpsAudioOutputControllerJoinMap))
{
}
}
}

View File

@@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges
{
public class DmpsRoutingControllerJoinMap : JoinMapBaseAdvanced
{
[JoinName("VideoSyncStatus")]
public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Input Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("InputEndpointOnline")]
public JoinDataComplete InputEndpointOnline = new JoinDataComplete(new JoinData() { JoinNumber = 501, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Chassis Input Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("OutputEndpointOnline")]
public JoinDataComplete OutputEndpointOnline = new JoinDataComplete(new JoinData() { JoinNumber = 701, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Chassis Output Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("OutputVideo")]
public JoinDataComplete OutputVideo = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Chassis Output Video Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("OutputAudio")]
public JoinDataComplete OutputAudio = new JoinDataComplete(new JoinData() { JoinNumber = 301, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Chassis Output Audio Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("InputNames")]
public JoinDataComplete InputNames = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Chassis Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("OutputNames")]
public JoinDataComplete OutputNames = new JoinDataComplete(new JoinData() { JoinNumber = 301, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Chassis Output Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("OutputCurrentVideoInputNames")]
public JoinDataComplete OutputCurrentVideoInputNames = new JoinDataComplete(new JoinData() { JoinNumber = 2001, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Chassis Video Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("OutputCurrentAudioInputNames")]
public JoinDataComplete OutputCurrentAudioInputNames = new JoinDataComplete(new JoinData() { JoinNumber = 2201, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Chassis Audio Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("InputCurrentResolution")]
public JoinDataComplete InputCurrentResolution = new JoinDataComplete(new JoinData() { JoinNumber = 2401, JoinSpan = 32 },
new JoinMetadata() { Label = "DM Chassis Input Current Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
public DmpsRoutingControllerJoinMap(uint joinStart)
: base(joinStart, typeof(DmpsRoutingControllerJoinMap))
{
}
}
}

View File

@@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges
{
public class GenericLightingJoinMap : JoinMapBaseAdvanced
{
[JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata() { Label = "Lighting Controller Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("SelectScene")]
public JoinDataComplete SelectScene = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata() { Label = "Lighting Controller Select Scene By Index", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("SelectSceneDirect")]
public JoinDataComplete SelectSceneDirect = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 10 },
new JoinMetadata() { Label = "Lighting Controller Select Scene", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.DigitalSerial });
[JoinName("ButtonVisibility")]
public JoinDataComplete ButtonVisibility = new JoinDataComplete(new JoinData() { JoinNumber = 41, JoinSpan = 10 },
new JoinMetadata() { Label = "Lighting Controller Button Visibility", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("IntegrationIdSet")]
public JoinDataComplete IntegrationIdSet = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata() { Label = "Lighting Controller Set Integration Id", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
public GenericLightingJoinMap(uint joinStart)
: base(joinStart, typeof(GenericLightingJoinMap))
{
}
}
}

Some files were not shown because too many files have changed in this diff Show More