Compare commits

...

220 Commits

Author SHA1 Message Date
Andrew Welker
b42d487c4c Merge pull request #918 from PepperDash/release/1.10.0
Release/1.10.0
2022-03-16 08:05:25 -06:00
Andrew Welker
6db5a9b2ca Merge pull request #913 from PepperDash/feature/cleanup-debug-statements
Feature/cleanup debug statements
2022-03-03 15:14:34 -07:00
Neil Dorin
89dd098ea6 feat(essentials): #912 Updates to GenericCommunicationMonitor to better monitor socket status 2022-03-03 14:39:54 -07:00
Neil Dorin
787c8eb954 feat(essentials): Adds new interface and event to notify if video unmute is requested 2022-03-01 21:43:38 -07:00
Neil Dorin
97b9ed5016 fix(essentials): Fixes SetupCameras to not add duplicate cameras to the list 2022-02-28 19:21:27 -07:00
Neil Dorin
06fdee313a fix(essentials): adds missing property decorators and unmutes video on camera select 2022-02-25 21:10:44 -07:00
Neil Dorin
b3f7568469 fix(essentials): updates to IHasDirectory and ZoomRoom
Prevents serialization of CurrentDirectoryResults object.
Modified OnDirectoryResultsReturne helper method for ZoomRoom to fix stripping of contacts
2022-02-24 22:03:03 -07:00
Neil Dorin
55ab593d73 feat(essentails): #911 swaps cisco comm monitor poll string 2022-02-24 14:34:38 -07:00
Neil Dorin
a06652ee61 chore(essentials): Cleans up some debug statements no longer needed 2022-02-21 12:06:09 -07:00
Neil Dorin
4f26df3149 Merge pull request #908 from PepperDash/feature/add-cisco-room-kit-features
Feature/add cisco room kit features
2022-02-15 16:16:18 -07:00
Neil Dorin
428edad38a Merge branch 'release/1.10.0' into feature/add-cisco-room-kit-features 2022-02-15 16:05:14 -07:00
Neil Dorin
f3431f287c Merge pull request #907 from PepperDash/feature/refine-zoomroom-addedcontact-feedback-subscription
fix(essentials): #901 Refines initial synchronization sequence
2022-02-15 15:52:14 -07:00
Jonathan Arndt
80b5fb6c7f CiscoSparkCodec > Removed inner IF of processQueuedCommands and added CrestronInvoke to CheckSyncStatus 2022-02-15 11:27:37 -08:00
Jonathan Arndt
6df594dd7f Updates to CiscoSparkCodec queue 2022-02-14 17:21:15 -08:00
Neil Dorin
e39c76001a feat(essentials): Updates to initial sync mechanism
Adds queue for all outgoing commands to codec that blocks until sync is established
2022-02-14 16:16:58 -07:00
Jonathan Arndt
d88a454499 fix(essentials): various bug fixes for hold FB, individual call end, incoming name-number fb, ipv4 address fb 2022-02-11 16:39:47 -08:00
Neil Dorin
b0e3fddec7 fix(essentials): fixes issue with local var scope when assigning actions for ending individual calls
Fixes Incoming call name/number feedback in bridge
2022-02-11 15:50:09 -07:00
Neil Dorin
0e5cecbfc3 fix(essentials): #901 Refines initial synchronization sequence
Makes sure that the AddedContact feedback subscription is excluded right away, but later included after the phonebook is retrieved.  This should ensure we get the initial phonebook and all subsequent additions at runtime while also minimizing initial data volume.
2022-02-11 14:16:40 -07:00
Andrew Welker
57dac392da Merge pull request #906 from PepperDash/feature/revise-zoomroom-gather-methodology
Feature/revise zoomroom gather methodology
2022-02-10 18:05:38 -07:00
Neil Dorin
348981d8cb fix(essntials): Fixes exception in OnLayoutChanged and fixes debug JSON formatting for Zoom responses 2022-02-10 17:33:06 -07:00
Neil Dorin
bee3f0caf3 Merge branch 'release/1.10.0' into feature/revise-zoomroom-gather-methodology 2022-02-10 16:02:55 -07:00
Neil Dorin
79a3a8ed7e fix(essentials): #901 Overhaul's feedback processing for efficiency
Updates to address changes to ZRAAPI v1.1 and ZoomRooms 5.9.4
2022-02-10 15:49:53 -07:00
Neil Dorin
cb3c80ff8f fix(essentials): fixes to on hold feedback and call status xsig 2022-02-09 17:44:53 -07:00
Neil Dorin
0bb4b6edd4 fix(essentials): doh! fixes issue where IsOnHold would get set to false if response contains no PlacedOhHold object 2022-02-09 17:30:26 -07:00
Neil Dorin
e4a4564bbc fix(essentials): Attempts to set OnHold an alternative way 2022-02-09 17:21:19 -07:00
Neil Dorin
b0288951eb fix(essentials): removes logic to disconnect and reinitialize on malformed json response 2022-02-09 17:15:58 -07:00
Neil Dorin
bfdc882eb6 fix(essentials): Adds logic to recover from malformed json response on initial communication.
Adds better formatting for active calls list print to console
2022-02-09 17:07:18 -07:00
Neil Dorin
7a2e99f145 feat(essentials): Adds HoldAllCalls join and action 2022-02-09 16:50:06 -07:00
Neil Dorin
db67f97a1f fix(essentials): add local scope variable for indexer in hold/resume call loop 2022-02-09 16:46:19 -07:00
Neil Dorin
102ae3ad4f fix(essentials): second attempt to get on hold fb working 2022-02-09 16:41:37 -07:00
Neil Dorin
7dd6b3a9b6 fix(essentials): fixes index off by 1 error and updates call status to check for "OnHold" as status value 2022-02-09 16:31:31 -07:00
Neil Dorin
e24965eb54 fix(essentials): fixes ValueChagnedAction to run both feedback updates instead of one 2022-02-09 15:37:55 -07:00
Neil Dorin
9d80954214 fix(essentials): Adds check for SendingMode property value before attempting to set fb 2022-02-09 15:10:39 -07:00
Jonathan Arndt
70c5df9040 Removed add camera to device manager 2022-02-09 14:09:07 -08:00
Neil Dorin
89a7f2aa80 fix(essentials): Add a condition to check for an empty configuration.presentation object response and return to avoid null ref ex 2022-02-09 14:54:19 -07:00
Neil Dorin
90023621dc fix(essentials): Adds some better console log comments and calls SetUpCameras() after reading data from codec. 2022-02-09 14:48:45 -07:00
Neil Dorin
adbce916ba feat(essentials): Adds ability to read camera info from codec rather than just from config 2022-02-09 14:34:25 -07:00
Neil Dorin
b97783603b feat(essentials): Adds analog fb join for recent calls count to VideoCodecControllerJoinMap and bridge 2022-02-09 14:14:44 -07:00
Neil Dorin
db526cdd40 fix(essentials): fixes exception when parsing presentation local instance ghosted response 2022-02-09 14:09:54 -07:00
Neil Dorin
db982f4490 feat(essentials): Adds ability to select and dial contact methods for directory contacts via SIMPL bridge 2022-02-09 14:00:49 -07:00
Jonathan Arndt
c84525ddef Update recent call history and call method to protect for zero value from SIMPL 2022-02-09 11:39:35 -08:00
Andrew Welker
a3b078d327 Merge pull request #904 from PepperDash/hotfix/zoomroom-queue-size
Hotfix/zoomroom queue size
2022-02-09 12:34:29 -07:00
Neil Dorin
b9c07b01e9 Merge pull request #903 from PepperDash/hotfix/zoomroom-fix-phonebook-autodownload
Hotfix/zoomroom fix phonebook autodownload
2022-02-09 09:08:23 -07:00
Andrew Welker
d0097089e6 Merge pull request #902 from PepperDash/hotfix/zoomroom-fix-phonebook-autodownload
Hotfix/zoomroom fix phonebook autodownload
2022-02-09 08:59:51 -07:00
Andrew Welker
582390c7c7 ci: Fix Windows image 2022-02-09 08:38:27 -07:00
Jonathan Arndt
faabdde3f7 Update VideoCodecBase class UpdateDirectoryXSig method removing the check if the FolderId is null or empty as that check would be device specific 2022-02-08 16:31:45 -08:00
Jonathan Arndt
402754b69e Update VideoCodecBase class UpdateDirectoryXSig method removing the check if the FolderId is null or empty as that check would be device specific 2022-02-08 16:31:26 -08:00
Jonathan Arndt
84b39a959e Update VideoCodecBase class UpdateDirectoryXSig method removing the check if the FolderId is null or empty as that check would be device specific 2022-02-08 16:31:18 -08:00
Jonathan Arndt
93bfcc7baa Add logic to subscribe to PhoneBookSyncState during the CustomActivate method within CiscoSparkCodec class 2022-02-08 16:24:54 -08:00
Jonathan Arndt
64352811c5 Update VideoCodecBase.LinkVideoCodecCameraToApi FOR loop checking camera names to first check camera count 2022-02-08 13:31:13 -08:00
Alex Johnson
3a74abd061 Merge branch 'hotfix/zoomroom-fix-phonebook-autodownload' into hotfix/zoomroom-queue-size 2022-02-08 16:07:17 -05:00
Alex Johnson
08aa8fb2e6 Fixes issue where DisableAutoPhonebookDownload is set to true, but phonebook would still auto-download. Check condition was inversed 2022-02-08 16:05:02 -05:00
Jonathan Arndt
b5589364ff Instantiate xConfiguration members of Configuration, AutoAnswer, and Conference classes 2022-02-08 12:15:29 -08:00
Jason DeVito
6cd1a03ee0 fix: Updated LinkVideoCodecToApi trilist.onlinestatus change to fix CameraSupportsAudioMode passing true rather than property. 2022-02-08 09:38:40 -06:00
Jason DeVito
e19b0ba530 fix: updated yaml files to point to windows-2019 to resolve action failures. 2022-02-07 16:58:24 -06:00
Jason DeVito
7b2498ac6b fix: added JSON property decorator to configuration properties. 2022-02-07 16:50:35 -06:00
Jason DeVito
d9181c780f fix: Updated _receiveQueue capacity from 512 to 2048 to help with processing large amounts of push data received from zoom. 2022-02-07 16:45:08 -06:00
Neil Dorin
bc826c9e17 fix(essentials): updates action workflows to specify windows-2019 instead of latest 2022-02-04 16:41:57 -07:00
Neil Dorin
c6023ad700 fix(essentials): Adds missing help message property to tech room config and exposes config 2022-02-04 15:51:29 -07:00
Neil Dorin
742ff4bc1b fix(essentials): Updates config type for Vtc1 type rooms 2022-02-02 10:18:20 -07:00
Neil Dorin
2502947df8 Merge pull request #899 from PepperDash/hotfix/queue-thread-name
Add name to `GenericQueue` Thread
2022-02-02 10:16:38 -07:00
Neil Dorin
7075da5b68 Merge pull request #900 from PepperDash/hotfix/queue-thread-name
Add name to `GenericQueue` Thread - Release Branch
2022-02-02 10:16:17 -07:00
Andrew Welker
abdd1b38f8 feat (Core): #898 Add name to GenericQueue Thread
This name will show up in console using the `SSPTASKS` command and allow for easier troubleshooting.
2022-02-02 09:22:13 -07:00
Andrew Welker
455d85e8f9 Merge pull request #897 from PepperDash/feature/room-combining
Feature/room combining
2022-01-31 21:09:23 -07:00
Neil Dorin
d1509fe94b Merge branch 'development' into feature/room-combining 2022-01-31 20:48:18 -07:00
Neil Dorin
9d87c76ab2 Merge branch 'development' into feature/room-combining 2022-01-31 20:43:56 -07:00
Neil Dorin
c87048a221 Merge pull request #896 from PepperDash/feature/dmps-updates
Feature/dmps updates
2022-01-31 20:43:40 -07:00
Neil Dorin
eef5503a5a Merge branch 'development' into feature/dmps-updates 2022-01-31 20:30:37 -07:00
Neil Dorin
793e46718d Merge pull request #878 from UMD-AV/hotfix/sysmon-program-info-joinmap-fix
Fixes program info for slots 2-10 on join map if joinOffset is > 0
2022-01-31 20:24:01 -07:00
Neil Dorin
699d7aa9a2 Merge pull request #879 from UMD-AV/feature/dmps-various-fixes
Feature/dmps various fixes
2022-01-31 20:23:43 -07:00
Andrew Welker
554a16dc8f Merge pull request #895 from PepperDash/feature/dm-noroutetext-output
DM No Route Text Feature
2022-01-31 09:10:51 -07:00
Neil Dorin
4dc4565e69 Merge branch 'development' into feature/room-combining 2022-01-27 15:50:37 -07:00
Jason DeVito
fb6021424e feat: Updated joinMap to include NoRouteText @ serial-100. fix: Updated joinMap descriptions for Video/Audio Input/Output names. feat: Updated DmChassisController LinkChassisToApi to pass noRouteText across bridge. 2022-01-26 15:06:17 -06:00
Neil Dorin
bb8761d710 Merge pull request #893 from PepperDash/hotfix/generic-relay-dm-rmc-issues
Add `IRelayPorts` interface to `DmRmc4kzScalerCController`
2022-01-26 12:41:06 -07:00
Neil Dorin
3198f5d876 Merge branch 'development' into hotfix/generic-relay-dm-rmc-issues 2022-01-26 11:57:30 -07:00
Neil Dorin
5d5dee2e5e Merge pull request #892 from PepperDash/hotfix/generic-relay-dm-rmc-issues
Add `IRelayPorts` interface to `DmRmc4kzScalerCController`
2022-01-26 11:57:13 -07:00
Andrew Welker
05aece772f fix(DM): Add IRelayPorts implementation
the `DmRmc4kzScalerCController` class now implements `IRelayPorts` and delegates implementation to the Crestron `DmRm4kzScalerC` class.

#891
2022-01-26 10:51:03 -07:00
Andrew Welker
8393ae3ded fix(Core): Add return if port number is greater than supported ports on the device 2022-01-26 09:39:57 -07:00
Andrew Welker
4eace11943 refactor(Core): Removed old commented out code 2022-01-26 09:35:09 -07:00
Andrew Welker
89bd988391 fix (Core): Add better log messages and null checks
Checking if a device exists in the Device Manager and if it implements `IRelayPorts` are now 2 separate steps instead of one. There is now a null check in the PostActivation method to allow for logging an error if getting the relay device fails.
2022-01-26 09:34:44 -07:00
Alex Johnson
8bfd3ffd51 Fix DMPS system power on from last commit 2022-01-20 17:20:39 -05:00
Alex Johnson
56fa88a956 Adds front panel lock control for DMPS. Cleans up system power for DMPS which doesn't do anything on 4K models 2022-01-20 17:03:49 -05:00
Neil Dorin
a21b6fe3f6 Merge pull request #886 from PepperDash/hotfix/videocodecbase-max-meeting-xsig-value-set
Hotfix/videocodecbase max meeting xsig value set
2022-01-19 15:25:30 -07:00
Neil Dorin
cc0ec3f8d3 Merge branch 'development' into hotfix/videocodecbase-max-meeting-xsig-value-set 2022-01-19 15:03:01 -07:00
Neil Dorin
a5e2e65116 Merge pull request #885 from PepperDash/hotfix/videocodecbase-max-meeting-xsig-value-set
fix: Added MeetingsToDisplay analog join to join map
2022-01-19 15:02:48 -07:00
Neil Dorin
eea59d682a Merge branch 'main' into hotfix/videocodecbase-max-meeting-xsig-value-set 2022-01-19 14:43:00 -07:00
Neil Dorin
c717f61b42 Merge pull request #890 from PepperDash/hotfix/minor-fixes
Hotfix/minor fixes
2022-01-19 14:21:58 -07:00
Neil Dorin
4a2b15b0c6 Merge branch 'development' into hotfix/minor-fixes 2022-01-19 13:54:16 -07:00
Neil Dorin
379498aea1 Merge pull request #889 from PepperDash/hotfix/minor-fixes
Hotfix/minor fixes
2022-01-19 13:54:07 -07:00
Neil Dorin
d320b2ca07 Merge branch 'main' into hotfix/minor-fixes 2022-01-19 12:50:23 -07:00
Neil Dorin
dba60cfd76 fix(essentials): Fixes incorrect logical comparison for processor prompt with config value 2022-01-19 11:51:26 -07:00
Neil Dorin
52c589b56b fix(essentials): #888 fixes legacy typename in example config files 2022-01-19 11:50:18 -07:00
Neil Dorin
482bef435a fix(essentials): #887 Adds missing "crestronapp" typename to factory 2022-01-19 11:43:38 -07:00
Jason DeVito
99580ae8b5 fix: Added MeetingsToDisplay analog join to join map to take in number of MeetingsToDisplay via the xsig bridge and provide feedback of property. fix: Added MeetingsToDisplay property with backer field and feedback. Updated LinkVideoCodecScheduleToApi method with new property. Updated Constructor to instantiate the feedback property. 2022-01-13 08:44:23 -06:00
Alex Johnson
60ed2ea537 Fixes DMPS preset recall. Adds event to catch vumeter event ID and exit (can spam the event handler) 2022-01-11 15:26:39 -05:00
Alex Johnson
7d89f51dcf Adds support for DMPS-4K audio input names being shifted by 5 for aux inputs. 2022-01-10 13:20:10 -05:00
Neil Dorin
1623ee1d9e Merge pull request #883 from PepperDash/hotfix/ndorin-patch-1
Adds Discord link to README
2022-01-07 15:14:50 -07:00
Neil Dorin
0d4d86e0e6 Adds Discord link to README 2022-01-07 14:59:54 -07:00
Neil Dorin
2d64e49f8e feat(essentials): Adds JsonProperty attributes to LightingScene 2022-01-06 15:32:47 -07:00
Alex Johnson
acdd9bb674 Removes some unneeded post activation stuff from testing 2022-01-06 16:58:38 -05:00
Alex Johnson
c8b1808513 Fixes output name feedback on DMPS-4K 2022-01-06 16:49:00 -05:00
Alex Johnson
ce785ceb25 Fixes DMPS input name feedback on DMPS-4k. Need to check for NullStringOutputSig which was causing an exception 2022-01-06 16:47:11 -05:00
Neil Dorin
8e46d575e4 feat(essentials): Adds JsonProperty attribute tags 2022-01-06 12:24:36 -07:00
Alex Johnson
4650d17695 Change dmps type detection to use eSystemControlType enum 2022-01-06 11:17:58 -05:00
Alex Johnson
5816c3cafe Restore microphones to DMPS controller 2022-01-05 12:05:12 -05:00
Alex Johnson
e275d747f8 Fixes issue with vsync activation on dmps 4k airmedia input 2022-01-05 11:58:47 -05:00
Neil Dorin
98ad7f315f Merge pull request #874 from PepperDash/hotfix/cisco-share-content-fb-fix
Hotfix/cisco share content fb fix
2022-01-04 19:18:23 -07:00
Neil Dorin
d11389d110 Merge branch 'development' into hotfix/cisco-share-content-fb-fix 2022-01-04 19:01:54 -07:00
Neil Dorin
0547bb07fd Merge pull request #875 from PepperDash/feature/zoom-bridge-updates
Feature/zoom bridge updates
2022-01-04 19:01:21 -07:00
Neil Dorin
f27b0a1b59 Merge branch 'development' into feature/zoom-bridge-updates 2022-01-04 18:05:32 -07:00
Neil Dorin
5d1c5c9e99 Merge pull request #876 from PepperDash/feature/zoom-bridge-updates
Feature/zoom bridge updates
2022-01-04 15:43:56 -07:00
Neil Dorin
458de1aaa6 fix(essentials): Remove TODOs 2022-01-04 15:31:47 -07:00
Neil Dorin
661bf41de5 fix(essentials): Removed leftover merge text that should not have been there 2022-01-04 15:29:20 -07:00
Andrew Welker
5d1bc88b28 Merge branch 'development' into hotfix/cisco-share-content-fb-fix-share-content-fb-fix 2021-12-23 16:31:10 -07:00
Alex Johnson
156d58f42f Fixes program info for slots 2-10 on join map if joinOffset is > 0 2021-12-22 09:27:33 -05:00
Andrew Welker
68d71b1bab Merge branch 'main' into feature/zoom-bridge-updates 2021-12-21 09:08:24 -07:00
Andrew Welker
436674a708 Merge pull request #873 from PepperDash/hotfix/cisco-share-content-fb-fix
fix(essentials): Fixes sharing content feedback
2021-12-15 16:43:11 -07:00
Neil Dorin
5fd8e4bc2b fix(essentials): Fixes sharing content feedback FireUpdate() call and prevents Vtc1 room default call route from being recalled if already sharing 2021-12-15 15:47:15 -07:00
Andrew Welker
41bf98a5a7 Merge pull request #871 from PepperDash/hotfix/add-atv-gen4-ir-driver
Hotfix/add atv gen4 ir driver
2021-12-15 14:59:40 -07:00
Andrew Welker
75e62eac33 Merge branch 'development' into hotfix/add-atv-gen4-ir-driver 2021-12-15 14:41:22 -07:00
Andrew Welker
cee9bd6af8 Merge pull request #870 from PepperDash/hotfix/add-atv-gen4-ir-driver
feat(essentails): #869 Adds Apple TV Driver
2021-12-15 14:41:02 -07:00
Jason DeVito
82121dc55c fix: added missing meeting password prompt logic. 2021-12-15 13:29:29 -06:00
Neil Dorin
72a5491309 feat(essentails): #869 Adds Apple TV Driver 2021-12-15 12:04:15 -07:00
Jason DeVito
d12a2a19a8 feat: added LoginFailed join to bridge map for passwords. 2021-12-14 09:34:20 -06:00
Alex Johnson
0745f30177 Fixes dmps microphone event ids 2021-12-13 15:26:50 -05:00
Alex Johnson
a6e4efd64f Add Dmps microphone controller with bridge 2021-12-09 13:31:58 -05:00
Neil Dorin
611f0bec2e fix(essentials): #865 Adds DialselectedRecentCallItem join 2021-12-07 19:40:03 -07:00
Neil Dorin
90e22e9136 fix(essentials): #865 Adds SelectedContactMethodCount join to report the number of methods for the selected contact 2021-12-07 16:45:14 -07:00
Neil Dorin
4552a15cbb fix(essentials): #865 Updates to join map and bridging based on feedback from testing 2021-12-07 16:22:15 -07:00
jkdevito
2f901b9fc4 feat: added PasswordRequired event subscription to LinkToApi. 2021-12-06 18:50:01 -06:00
Jason DeVito
3cf85f99ce feat: Finished updating LinkToApi to bridge existing features. 2021-12-06 17:09:28 -06:00
Jason DeVito
c48f697b7e chore: updated todo comments. 2021-12-06 16:51:01 -06:00
Jason DeVito
2e1195431f feat: Updated zoom room join map to add bridge joins. updated LinkToApi to begin linking existing features to bridge. 2021-12-06 16:49:38 -06:00
Jason DeVito
cf88e3b36d fix: Updated link to API's with Xsig's to subscribe to trilist.OnlineStatusChange events and update the Xsig. 2021-12-06 16:49:37 -06:00
Neil Dorin
bceb7115ed fixes new interface property 2021-12-03 14:37:45 -07:00
Neil Dorin
1d2eb42c46 feat(essentials): Adds label property to shade interface 2021-12-03 14:15:58 -07:00
Neil Dorin
ef12650f9c Merge branch 'main' into feature/add-new-zoom-methods 2021-12-03 11:14:10 -07:00
Neil Dorin
176d4675da feat(essentials): Populates EnvironmentatlControlDevices on huddle and vtc room types 2021-12-02 17:53:39 -07:00
Neil Dorin
ae10e560f0 No significant change. Attempting to retrigger successful build 2021-12-02 13:43:30 -07:00
Neil Dorin
e152250363 feat(essentials): Adds IEnvironmentalControls interface and updates some room config properties 2021-12-01 12:40:17 -07:00
Neil Dorin
8945398cd7 feat(essentials): update when meeting lock changes and detect call status on sync 2021-11-17 17:58:50 -07:00
Neil Dorin
37a7886ec2 feat(essentials): Adds IsLocked property to MeetingInfo 2021-11-17 15:06:49 -07:00
Neil Dorin
c685608f67 fix(essentials): reworks logic for setting up cameras to wait until codec communication sync has finished 2021-11-17 12:24:58 -07:00
Neil Dorin
cdafaf1bcb fix(essentials): Adds missing constructor for Configuration RootObject 2021-11-17 11:37:29 -07:00
Neil Dorin
fffaa1e5e6 feat(essentials): Ignores Status and Configuration properties for serialization 2021-11-16 17:16:11 -07:00
Neil Dorin
d8aef1a0da feat(essentials): #865 More updates
Adds ability to disable auto dialing behavior of selected directory contact.
Adds XSig to send contact method info across bridge
Adds XSig to send call history data across bridge and also joins to manipulate
2021-11-12 22:07:11 -07:00
Alex Johnson
6310001e18 Merge branch 'development' into umd-development 2021-11-12 15:40:49 -05:00
Alex Johnson
b21495d624 Merge branch 'feature/add-dm-endpoint-names-to-bridge' into umd-development 2021-11-12 15:39:19 -05:00
Alex Johnson
2dbc3aa8db Change join numbers due to conflicting join with existing serial joins 2021-11-12 15:39:01 -05:00
Neil Dorin
0ff29695e7 feat(essentials): #865 Updates join map and bridge for new features
Adds control and feedback for presentation source
Updates camera setup, selection and feedback
Adds ringtone volume control/feedback
Adds call hold/resume/join control to bridge
Adds new config properties for camera info
2021-11-11 21:05:57 -07:00
Andrew Welker
237d163ce3 Merge pull request #864 from PepperDash/hotfix/dm-blade-chassis-throws-exception
Hotfix/dm blade chassis throws exception
2021-11-11 17:43:08 -07:00
Andrew Welker
f9c03d8d15 Merge branch 'development' into hotfix/dm-blade-chassis-throws-exception 2021-11-11 17:30:18 -07:00
Andrew Welker
ff773b6ddc Merge pull request #867 from PepperDash/feature/add-cenIoRy104-support
feat: added support for Crestron CEN-IO-RY-104 relay module.
2021-11-11 17:30:06 -07:00
Andrew Welker
3a4c661e5d Merge branch 'development' into hotfix/dm-blade-chassis-throws-exception 2021-11-11 17:29:23 -07:00
Andrew Welker
03f01b2f78 Merge pull request #863 from PepperDash/hotfix/dm-blade-chassis-throws-exception
hotfix(Essentials_DM): fixed invalid cast exception in dm blade chassis
2021-11-11 17:28:57 -07:00
Neil Dorin
8aae23db9e feat(essentials): #865 Updates to Bridging
Adds ability to end individual calls, report connected call count, report call duration and hold status, send DTMF tones to individual call index and select far end presets
2021-11-11 17:23:11 -07:00
Jason DeVito
fa89a73c4b feat: added support for Crestron CEN-IO-RY-104 relay module. 2021-11-11 16:47:15 -06:00
Neil Dorin
a043309bb1 feat(essentials): More updates to add ringtone volume and focus near/far to bridge 2021-11-10 18:02:23 -07:00
Neil Dorin
dc53ce42e7 feat(essentials): Adds interface and implementation to join calls 2021-11-10 14:08:12 -07:00
Neil Dorin
6dd882b1a0 feat(essentials): Adds hold/resume/duration features to call status 2021-11-10 13:49:43 -07:00
Andrew Welker
da8c2c4357 Merge pull request #859 from PepperDash/hotfix/add-logging-if-no-defaultAudioDevice-set
Adds more deliberate exception and logging for missing defaultAudioKe…
2021-11-10 09:28:21 -07:00
Nick Genovese
446bae4dd3 hotfix(Essentials_DM): fixed invalid cast exception in dm blade chassis 2021-11-10 11:21:19 -05:00
Neil Dorin
e7d1d560ee Revert "adds solution paths to workflows"
This reverts commit d3f30d8b71.
2021-11-09 10:10:28 -07:00
Neil Dorin
d3f30d8b71 adds solution paths to workflows 2021-11-09 10:09:06 -07:00
Neil Dorin
2e5b7cad64 feat(essentials): adds null value handling to MeetingInfo props 2021-11-05 17:46:48 -06:00
Neil Dorin
5171385b5b feat(essentials): adds JSON property attributes as needed 2021-11-05 15:58:10 -06:00
Neil Dorin
3ee44bcf6e refactor(essentials): better name for current layout property in eventargs 2021-11-05 12:40:07 -06:00
Neil Dorin
949a04647b feat(essentials): improves functionality of LayoutInfoChanged event 2021-11-05 12:36:04 -06:00
Neil Dorin
31f976d719 feat(essentials): adds IHasMeetingRecording and implements on ZoomRoom 2021-11-04 17:08:51 -06:00
Neil Dorin
11ffc5130f feat(essentials): switches from array to list type in arguments 2021-11-04 16:47:05 -06:00
Neil Dorin
59bfa354e4 feat(essentials): switches to userId argument 2021-11-04 16:15:59 -06:00
Neil Dorin
536e82ef22 feat(essentials): adds new features for ZoomRoom
Adds IHasMeetingLock and adds new methods to IHasParticipants
2021-11-04 16:11:26 -06:00
Andrew Welker
99d60af7cd Merge branch 'development' into hotfix/add-logging-if-no-defaultAudioDevice-set 2021-11-03 16:36:04 -06:00
Andrew Welker
63cd322fd0 Merge pull request #858 from PepperDash/hotfix/add-logging-if-no-defaultAudioDevice-set
Adds more deliberate exception and logging for missing `defaultAudioKey` property value
2021-11-03 16:35:52 -06:00
Andrew Welker
489ba2da04 Merge branch 'main' into hotfix/add-logging-if-no-defaultAudioDevice-set 2021-11-03 14:56:27 -06:00
Neil Dorin
8087aa7a75 Adds more deliberate exception and logging for missing defaultAudioKey property value 2021-11-03 14:48:10 -06:00
Andrew Welker
e7ca32207c Merge pull request #856 from PepperDash/feature/glspartition-sensor-sensitivity-configuration
GlsPartitionSensor Configuration of Device Specific Properties
2021-11-02 10:56:51 -06:00
Jason DeVito
cd186aa3a3 feat: Added GlsPartitionSensorConfig.cs. feat: Updated GlsParitionSensorController.cs to addd the ability to set sensitivity via config. chore: Updated GlsPartitionSensorJoinMap.cs to organize signals by type for readability. 2021-11-02 09:16:34 -05:00
Alex Johnson
39e85d5311 Builds out the rest of the dmps scaled volume inputs 2021-10-28 08:56:44 -04:00
Alex Johnson
62bdddf4c1 More dmps work 2021-10-27 16:53:37 -04:00
Neil Dorin
a8d0dfb327 Merge pull request #852 from PepperDash/hotfix/dm-usb-routing
Hotfix/dm usb routing
2021-10-27 10:39:17 -06:00
Alex Johnson
8d7c93a6e5 Merge branch 'bugfix/update-dmps-videosync-at-boot' into umd-development 2021-10-27 12:35:00 -04:00
Alex Johnson
e593f1c281 Forces video sync outputs to update at boot 2021-10-27 12:33:47 -04:00
Alex Johnson
369bdf5c66 Update video sync outputs at boot 2021-10-27 12:25:29 -04:00
Alex Johnson
3077b3f865 Merge branch 'feature/add-dm-endpoint-names-to-bridge' into umd-development 2021-10-27 10:21:34 -04:00
Andrew Welker
313b336d56 fix(Devices_Common): Clear meeting list and fire event if no meetings are scheduled 2021-10-27 10:21:21 -04:00
Alex Johnson
0ecf593e44 Refactor some of the dmps audio changes 2021-10-27 10:18:54 -04:00
Alex Johnson
25423f0caa Adds dm endpoint names to bridge at serial join 1 2021-10-19 09:32:28 -04:00
Alex Johnson
32443a2102 Improvements for min/max scaling on dmps audio 2021-10-04 16:52:07 -04:00
Alex Johnson
c296ef9e21 Adds mics master level. Adds set/get to bridge for scaled volume (0-65535) which accounts for min/max settings on DMPS. 2021-10-01 18:10:57 -04:00
Alex Johnson
c65616a426 Merge branch 'development' into feature/dmps-audio-fixes 2021-10-01 10:10:08 -04:00
Neil Dorin
d67a161e32 Merge branch 'development' into feature/room-combining 2021-09-29 17:17:29 -06:00
Alex Johnson
5bf5d17ea8 Merge branch 'development' into feature/dmps-audio-fixes 2021-09-28 15:24:17 -04:00
Alex Johnson
d444b8a7ba Fixes codec fader creation on aux1 and aux2 outputs. Fixes a few join map labels. 2021-09-28 15:23:38 -04:00
Neil Dorin
1e98484082 Merge branch 'development' into feature/room-combining 2021-09-22 17:23:38 -06:00
Neil Dorin
acd2be3679 feat(essentials): Updates to get scenarios to activate/deactivate 2021-08-25 17:23:24 -06:00
Neil Dorin
e7cfe1143d fix(essentials): updates MockVc to instantiate the OsdSource and add its tie line 2021-08-25 16:24:18 -06:00
Neil Dorin
26bf7d8f73 feat(essentials): #793 Implements IHasDirectoryHistoryStack on CiscoSparkCodec 2021-08-17 17:58:32 -06:00
Neil Dorin
12e8dca47e fix(essentials): #792 refactors logic to show/hide SelectASourceVisible subpage 2021-08-17 16:41:23 -06:00
Neil Dorin
5c02d72ed1 fix(essentials): Allows SubpageReferenceListSourceItem to deregister from room's CurrentSourceInfoChange event on Clear() 2021-08-17 16:38:51 -06:00
Neil Dorin
115a20d8e6 Merge branch 'feature/room-combining' of https://github.com/PepperDash/Essentials into feature/room-combining 2021-08-17 14:08:38 -06:00
Andrew Welker
c298d37b9f Merge branch 'development' into feature/room-combining 2021-08-16 15:45:43 -06:00
Neil Dorin
5f5ded74fc Merge branch 'development' into feature/room-combining 2021-08-16 14:46:52 -06:00
Neil Dorin
1bf828b8a9 Updates feedback funcs for combined room type 2021-08-12 09:36:03 -06:00
Neil Dorin
397a5b1794 fix(CiscoSparkCodec): Solves exception when in SipUri getter 2021-08-05 17:28:49 -06:00
Neil Dorin
0867d08c5a fix(MockVC): various fixes for local testing
update MockVC and EssentialsVideoCodecUiDriver
updates to Cisco classes to address some exceptions at startup with EssentialsVideoCodecUiDriver
2021-08-04 15:13:35 -06:00
Neil Dorin
5c3e1ca915 Updates IMobileControl to use IEssentialsRoom instead of EssentialsRoomBase again 2021-08-03 14:52:26 -06:00
Neil Dorin
1de42b9e97 Merge branch 'development' into feature/room-combining 2021-08-03 14:32:42 -06:00
Neil Dorin
0e41cafdad Adds some debug comments to assist in debugging 2021-08-02 14:22:31 -06:00
Neil Dorin
77672237e6 Adds some debug comments to assist in debugging 2021-07-30 17:27:38 -06:00
Neil Dorin
8ae03a8187 Merge branch 'development' into feature/room-combining 2021-07-30 16:59:52 -06:00
Neil Dorin
7114e60c04 feat(RoomCombining): #742 Updates EssentialsTouchpanelController
Will now switch room the TP is linked to based on room combination scenario
2021-07-30 16:59:32 -06:00
Neil Dorin
6542c062b9 Working towards getting EssentialsTouchpanelController to switch rooms 2021-07-23 17:35:12 -06:00
Neil Dorin
2db397b474 #742 Adds step to post activation action to determine initial room combination scenario 2021-07-22 12:46:27 -06:00
Neil Dorin
bfa48091d9 #753 Adds methods to build new room type 2021-07-22 12:44:13 -06:00
Neil Dorin
c4752b2ac2 #753 EssentialsCombinedHuddleVtc1Room should be ready for testing 2021-07-21 21:33:57 -06:00
Neil Dorin
152dcbe81e Merge remote-tracking branch 'origin/feature/fixes-for-multiple-room' into feature/room-combining 2021-07-21 14:20:45 -06:00
Neil Dorin
56f9a29c61 #753 Updates some of the Funcs 2021-07-21 14:19:57 -06:00
Neil Dorin
61d8370329 Updates to config type in IEssentialsHuddleVtc1Room 2021-07-20 17:27:30 -06:00
Neil Dorin
c8b0c7dd01 #753 Adds new type and starts updating as needed 2021-07-20 17:12:42 -06:00
94 changed files with 5948 additions and 1386 deletions

View File

@@ -22,7 +22,7 @@ env:
RELEASE_BRANCH: main
jobs:
Build_Project:
runs-on: windows-latest
runs-on: windows-2019
steps:
# First we checkout the source repo
- name: Checkout repo
@@ -98,7 +98,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Push_Nuget_Package:
needs: Build_Project
runs-on: windows-latest
runs-on: windows-2019
steps:
- name: Download Build Version Info
uses: actions/download-artifact@v1

View File

@@ -19,7 +19,7 @@ env:
RELEASE_BRANCH: main
jobs:
Build_Project:
runs-on: windows-latest
runs-on: windows-2019
steps:
# First we checkout the source repo
- name: Checkout repo
@@ -82,7 +82,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Push_Nuget_Package:
needs: Build_Project
runs-on: windows-latest
runs-on: windows-2019
steps:
- name: Download Build Version Info
uses: actions/download-artifact@v1

Binary file not shown.

View File

@@ -506,8 +506,11 @@ namespace PepperDash.Essentials
{
DeviceManager.AddDevice(room);
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is EssentialsHuddleVtc1Room, attempting to add to DeviceManager with Fusion with IP-ID {0:X2}", fusionIpId);
DeviceManager.AddDevice(new EssentialsHuddleVtc1FusionController((IEssentialsHuddleVtc1Room)room, fusionIpId, fusionJoinMapKey));
if (!(room is EssentialsCombinedHuddleVtc1Room))
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is EssentialsHuddleVtc1Room, attempting to add to DeviceManager with Fusion with IP-ID {0:X2}", fusionIpId);
DeviceManager.AddDevice(new EssentialsHuddleVtc1FusionController((IEssentialsHuddleVtc1Room)room, fusionIpId, fusionJoinMapKey));
}
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge...");

View File

@@ -88,7 +88,7 @@
{
"name": "Wireless Video",
"key": "wePresent-1",
"type": "wePresent",
"type": "genericSource",
"group": "genericSource",
"uid": 9,
"properties": {

View File

@@ -114,7 +114,7 @@
{
"name": "Wireless Video",
"key": "wePresent-1",
"type": "wePresent",
"type": "genericSource",
"properties": {},
"group": "genericSource",
"uid": 3

View File

@@ -144,6 +144,7 @@
<Compile Include="Room\Config\EssentialsRoomEmergencyConfig.cs" />
<Compile Include="Room\Config\EssentialsTechRoomConfig.cs" />
<Compile Include="Room\Emergency\EsentialsRoomEmergencyContactClosure.cs" />
<Compile Include="Room\Types\EssentialsCombinedHuddleVtc1Room.cs" />
<Compile Include="Room\Types\EssentialsDualDisplayRoom.cs" />
<Compile Include="Room\Types\EssentialsHuddleVtc1Room.cs" />
<Compile Include="Room\Types\EssentialsNDisplayRoomBase.cs" />

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<ControlSystem>
<Name>192.168.10.1</Name>
<Address>auto 192.168.10.1</Address>
<Name>Test RMC3</Name>
<Address>auto 192.168.1.40;username crestron</Address>
<ProgramSlot>Program01</ProgramSlot>
<Storage>Internal Flash</Storage>
</ControlSystem>

View File

@@ -39,6 +39,10 @@ namespace PepperDash.Essentials.Room.Config
{
return new EssentialsDualDisplayRoom(roomConfig);
}
if (typeName == "combinedhuddlevtc1")
{
return new EssentialsCombinedHuddleVtc1Room(roomConfig);
}
return typeName != "techroom" ? null : new EssentialsTechRoom(roomConfig);
}
@@ -147,6 +151,24 @@ namespace PepperDash.Essentials.Room.Config
[JsonProperty("helpMessage")]
public string HelpMessage { get; set; }
/// <summary>
/// Read this value to get the help message. It checks for the old and new config format.
/// </summary>
public string HelpMessageForDisplay
{
get
{
if(Help != null && !string.IsNullOrEmpty(Help.Message))
{
return Help.Message;
}
else
{
return HelpMessage;
}
}
}
[JsonProperty("environment")]
public EssentialsEnvironmentPropertiesConfig Environment { get; set; }
@@ -183,6 +205,12 @@ namespace PepperDash.Essentials.Room.Config
[JsonProperty("zeroVolumeWhenSwtichingVolumeDevices")]
public bool ZeroVolumeWhenSwtichingVolumeDevices { get; set; }
/// <summary>
/// Indicates if this room represents a combination of other rooms
/// </summary>
[JsonProperty("isRoomCombinationScenario")]
public bool IsRoomCombinationScenario { get; set; }
public EssentialsRoomPropertiesConfig()
{
LogoLight = new EssentialsLogoPropertiesConfig();

View File

@@ -56,6 +56,9 @@ namespace PepperDash.Essentials.Room.Config
[JsonProperty("mirroredTuners")]
public Dictionary<uint, string> MirroredTuners { get; set; }
[JsonProperty("helpMessage")]
public string HelpMessage { get; set; }
/// <summary>
/// Indicates the room
/// </summary>

View File

@@ -0,0 +1,821 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Newtonsoft.Json;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Config;
using PepperDash.Essentials.Room.Config;
using PepperDash.Essentials.Devices.Common.Codec;
using PepperDash.Essentials.Devices.Common.VideoCodec;
using PepperDash.Essentials.Devices.Common.AudioCodec;
using PepperDash.Essentials.Core.DeviceTypeInterfaces;
namespace PepperDash.Essentials
{
public class EssentialsCombinedHuddleVtc1Room : EssentialsRoomBase, IEssentialsHuddleVtc1Room
{
private bool _codecExternalSourceChange;
public event EventHandler<VolumeDeviceChangeEventArgs> CurrentVolumeDeviceChange;
public event SourceInfoChangeHandler CurrentSourceChange;
//************************
// Call-related stuff
public BoolFeedback InCallFeedback { get; private set; }
///// <summary>
///// Make this more specific
///// </summary>
//public List<CodecActiveCallItem> ActiveCalls { get; private set; }
/// <summary>
/// States: 0 for on hook, 1 for video, 2 for audio, 3 for telekenesis
/// </summary>
public IntFeedback CallTypeFeedback { get; private set; }
/// <summary>
///
/// </summary>
public BoolFeedback PrivacyModeIsOnFeedback { get; private set; }
/// <summary>
/// When something in the room is sharing with the far end or through other means
/// </summary>
public BoolFeedback IsSharingFeedback { get; private set; }
//************************
protected override Func<bool> OnFeedbackFunc
{
get
{
return () =>
{
var displays = Displays.OfType<DisplayBase>().ToList();
var val = CurrentSourceInfo != null
&& CurrentSourceInfo.Type == eSourceListItemType.Route
&& displays.Count > 0;
//&& disp.PowerIsOnFeedback.BoolValue;
return val;
};
}
}
/// <summary>
///
/// </summary>
protected override Func<bool> IsWarmingFeedbackFunc
{
get
{
return () => Displays.OfType<TwoWayDisplayBase>().Any((d) => d.IsWarmingUpFeedback.BoolValue);
}
}
/// <summary>
///
/// </summary>
protected override Func<bool> IsCoolingFeedbackFunc
{
get
{
return () => Displays.OfType<TwoWayDisplayBase>().Any((d) => d.IsCoolingDownFeedback.BoolValue);
}
}
public EssentialsHuddleVtc1PropertiesConfig PropertiesConfig { get; private set; }
private List<IRoutingSinkWithSwitching> Displays;
public IRoutingSinkWithSwitching DefaultDisplay { get; private set; }
public IBasicVolumeControls DefaultAudioDevice { get; private set; }
public IBasicVolumeControls DefaultVolumeControls { get; private set; }
public VideoCodecBase VideoCodec { get; private set; }
public AudioCodecBase AudioCodec { get; private set; }
public bool ExcludeFromGlobalFunctions { get; set; }
public string DefaultSourceItem { get; set; }
public ushort DefaultVolume { get; set; }
/// <summary>
/// If room is off, enables power on to last source. Default true
/// </summary>
public bool EnablePowerOnToLastSource { get; set; }
string LastSourceKey;
/// <summary>
/// Sets the volume control device, and attaches/removes InUseTrackers with "audio"
/// tag to device.
/// </summary>
public IBasicVolumeControls CurrentVolumeControls
{
get { return _CurrentAudioDevice; }
set
{
if (value == _CurrentAudioDevice) return;
var oldDev = _CurrentAudioDevice;
// derigister this room from the device, if it can
if (oldDev is IInUseTracking)
(oldDev as IInUseTracking).InUseTracker.RemoveUser(this, "audio");
var handler = CurrentVolumeDeviceChange;
if (handler != null)
CurrentVolumeDeviceChange(this, new VolumeDeviceChangeEventArgs(oldDev, value, ChangeType.WillChange));
_CurrentAudioDevice = value;
if (handler != null)
CurrentVolumeDeviceChange(this, new VolumeDeviceChangeEventArgs(oldDev, value, ChangeType.DidChange));
// register this room with new device, if it can
if (_CurrentAudioDevice is IInUseTracking)
(_CurrentAudioDevice as IInUseTracking).InUseTracker.AddUser(this, "audio");
}
}
IBasicVolumeControls _CurrentAudioDevice;
/// <summary>
/// The SourceListItem last run - containing names and icons
/// </summary>
public SourceListItem CurrentSourceInfo
{
get { return _CurrentSourceInfo; }
set
{
if (value == _CurrentSourceInfo) return;
var handler = CurrentSourceChange;
// remove from in-use tracker, if so equipped
if (_CurrentSourceInfo != null && _CurrentSourceInfo.SourceDevice is IInUseTracking)
(_CurrentSourceInfo.SourceDevice as IInUseTracking).InUseTracker.RemoveUser(this, "control");
if (handler != null)
handler(_CurrentSourceInfo, ChangeType.WillChange);
_CurrentSourceInfo = value;
// add to in-use tracking
if (_CurrentSourceInfo != null && _CurrentSourceInfo.SourceDevice is IInUseTracking)
(_CurrentSourceInfo.SourceDevice as IInUseTracking).InUseTracker.AddUser(this, "control");
if (handler != null)
handler(_CurrentSourceInfo, ChangeType.DidChange);
var vc = VideoCodec as IHasExternalSourceSwitching;
if (vc != null && !_codecExternalSourceChange)
{
vc.SetSelectedSource(CurrentSourceInfoKey);
}
_codecExternalSourceChange = false;
}
}
SourceListItem _CurrentSourceInfo;
public string CurrentSourceInfoKey { get; set; }
/// <summary>
/// "codecOsd"
/// </summary>
public string DefaultCodecRouteString { get { return "codecOsd"; } }
/// <summary>
/// Temporary implementation. Returns the schedule-ready object or null if none. Fow now,
/// always returns the VideoCodec if it is capable
/// </summary>
public IHasScheduleAwareness ScheduleSource { get { return VideoCodec as IHasScheduleAwareness; } }
CCriticalSection SourceSelectLock = new CCriticalSection();
public EssentialsCombinedHuddleVtc1Room(DeviceConfig config)
: base(config)
{
try
{
PropertiesConfig = JsonConvert.DeserializeObject<EssentialsHuddleVtc1PropertiesConfig>
(config.Properties.ToString());
VideoCodec = DeviceManager.GetDeviceForKey(PropertiesConfig.VideoCodecKey) as
PepperDash.Essentials.Devices.Common.VideoCodec.VideoCodecBase;
if (VideoCodec == null)
throw new ArgumentNullException("codec cannot be null");
AudioCodec = DeviceManager.GetDeviceForKey(PropertiesConfig.AudioCodecKey) as
PepperDash.Essentials.Devices.Common.AudioCodec.AudioCodecBase;
if (AudioCodec == null)
Debug.Console(0, this, "No Audio Codec Found");
DefaultAudioDevice = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultAudioKey) as IBasicVolumeControls;
Displays = new List<IRoutingSinkWithSwitching>();
Initialize();
}
catch (Exception e)
{
Debug.Console(1, this, "Error building room: \n{0}", e);
}
}
void Initialize()
{
try
{
if (DefaultAudioDevice is IBasicVolumeControls)
DefaultVolumeControls = DefaultAudioDevice as IBasicVolumeControls;
else if (DefaultAudioDevice is IHasVolumeDevice)
DefaultVolumeControls = (DefaultAudioDevice as IHasVolumeDevice).VolumeDevice;
CurrentVolumeControls = DefaultVolumeControls;
// Combines call feedback from both codecs if available
InCallFeedback = new BoolFeedback(() =>
{
bool inAudioCall = false;
bool inVideoCall = false;
if (AudioCodec != null)
inAudioCall = AudioCodec.IsInCall;
if (VideoCodec != null)
inVideoCall = VideoCodec.IsInCall;
if (inAudioCall || inVideoCall)
return true;
else
return false;
});
SetupDisplays();
// Get Microphone Privacy object, if any MUST HAPPEN AFTER setting InCallFeedback
this.MicrophonePrivacy = EssentialsRoomConfigHelper.GetMicrophonePrivacy(PropertiesConfig, this);
Debug.Console(2, this, "Microphone Privacy Config evaluated.");
// Get emergency object, if any
this.Emergency = EssentialsRoomConfigHelper.GetEmergency(PropertiesConfig, this);
Debug.Console(2, this, "Emergency Config evaluated.");
VideoCodec.CallStatusChange += (o, a) => this.InCallFeedback.FireUpdate();
VideoCodec.IsReadyChange += (o, a) => { this.SetCodecExternalSources(); SetCodecBranding(); };
if (AudioCodec != null)
AudioCodec.CallStatusChange += (o, a) => this.InCallFeedback.FireUpdate();
IsSharingFeedback = new BoolFeedback(() => VideoCodec.SharingContentIsOnFeedback.BoolValue);
VideoCodec.SharingContentIsOnFeedback.OutputChange += (o, a) => this.IsSharingFeedback.FireUpdate();
// link privacy to VC (for now?)
PrivacyModeIsOnFeedback = new BoolFeedback(() => VideoCodec.PrivacyModeIsOnFeedback.BoolValue);
VideoCodec.PrivacyModeIsOnFeedback.OutputChange += (o, a) => this.PrivacyModeIsOnFeedback.FireUpdate();
CallTypeFeedback = new IntFeedback(() => 0);
SetSourceListKey();
EnablePowerOnToLastSource = true;
}
catch (Exception e)
{
Debug.Console(0, this, "Error Initializing Room: {0}", e);
}
}
private void SetupDisplays()
{
//DefaultDisplay = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultDisplayKey) as IRoutingSinkWithSwitching;
var destinationList = ConfigReader.ConfigObject.DestinationLists[PropertiesConfig.DestinationListKey];
foreach (var destination in destinationList)
{
var dest = destination.Value.SinkDevice as IRoutingSinkWithSwitching;
if (dest != null)
{
Displays.Add(dest);
}
var display = dest as DisplayBase;
if (display != null)
{
// Link power, warming, cooling to display
var dispTwoWay = display as IHasPowerControlWithFeedback;
if (dispTwoWay != null)
{
dispTwoWay.PowerIsOnFeedback.OutputChange += (o, a) =>
{
if (dispTwoWay.PowerIsOnFeedback.BoolValue != OnFeedback.BoolValue)
{
//if (!dispTwoWay.PowerIsOnFeedback.BoolValue)
// CurrentSourceInfo = null;
OnFeedback.FireUpdate();
}
if (dispTwoWay.PowerIsOnFeedback.BoolValue)
{
SetDefaultLevels();
}
};
}
display.IsWarmingUpFeedback.OutputChange += (o, a) =>
{
IsWarmingUpFeedback.FireUpdate();
if (!IsWarmingUpFeedback.BoolValue)
(CurrentVolumeControls as IBasicVolumeWithFeedback).SetVolume(DefaultVolume);
};
display.IsCoolingDownFeedback.OutputChange += (o, a) =>
{
IsCoolingDownFeedback.FireUpdate();
};
}
}
}
private void SetSourceListKey()
{
if (!string.IsNullOrEmpty(PropertiesConfig.SourceListKey))
{
SetSourceListKey(PropertiesConfig.SourceListKey);
}
else
{
SetSourceListKey(Key);
}
SetCodecExternalSources();
}
protected override void CustomSetConfig(DeviceConfig config)
{
var newPropertiesConfig = JsonConvert.DeserializeObject<EssentialsHuddleVtc1PropertiesConfig>(config.Properties.ToString());
if (newPropertiesConfig != null)
PropertiesConfig = newPropertiesConfig;
ConfigWriter.UpdateRoomConfig(config);
}
public override bool CustomActivate()
{
// Add Occupancy object from config
if (PropertiesConfig.Occupancy != null)
{
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Setting Occupancy Provider for room");
this.SetRoomOccupancy(DeviceManager.GetDeviceForKey(PropertiesConfig.Occupancy.DeviceKey) as
IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes);
}
this.LogoUrlLightBkgnd = PropertiesConfig.LogoLight.GetLogoUrlLight();
this.LogoUrlDarkBkgnd = PropertiesConfig.LogoDark.GetLogoUrlDark();
this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem;
this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100);
return base.CustomActivate();
}
/// <summary>
///
/// </summary>
protected override void EndShutdown()
{
VideoCodec.EndAllCalls();
SetDefaultLevels();
RunDefaultPresentRoute();
CrestronEnvironment.Sleep(1000);
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Shutting down room");
RunRouteAction("roomOff");
VideoCodec.StopSharing();
VideoCodec.StandbyActivate();
}
/// <summary>
/// Routes the default source item, if any. Returns true when default route exists
/// </summary>
public override bool RunDefaultPresentRoute()
{
if (DefaultSourceItem != null)
RunRouteAction(DefaultSourceItem);
return DefaultSourceItem != null;
}
/// <summary>
/// Sets up the room when started into call mode without presenting a source
/// </summary>
/// <returns></returns>
public bool RunDefaultCallRoute()
{
RunRouteAction(DefaultCodecRouteString);
return true;
}
public void RunRouteActionCodec(string routeKey, string sourceListKey)
{
_codecExternalSourceChange = true;
RunRouteAction(routeKey, sourceListKey);
}
/// <summary>
///
/// </summary>
/// <param name="routeKey"></param>
public void RunRouteAction(string routeKey)
{
RunRouteAction(routeKey, new Action(() => { }));
}
/// <summary>
///
/// </summary>
/// <param name="routeKey"></param>
/// <param name="souceListKey"></param>
/// <param name="successCallback"></param>
public void RunRouteAction(string routeKey, string sourceListKey)
{
if (string.IsNullOrEmpty(sourceListKey))
{
Debug.Console(1, this, "No sourceListKey present. RunRouteAction assumes default source list.");
RunRouteAction(routeKey, new Action(() => { }));
}
else
{
Debug.Console(1, this, "sourceListKey present but not yet implemented");
throw new NotImplementedException();
}
}
/// <summary>
///
/// </summary>
/// <param name="routeKey"></param>
/// <param name="souceListKey"></param>
/// <param name="successCallback"></param>
public void RunRouteAction(string routeKey, string sourceListKey, Action successCallback)
{
if (string.IsNullOrEmpty(sourceListKey))
{
RunRouteAction(routeKey, successCallback);
}
else
throw new NotImplementedException();
}
/// <summary>
/// Gets a source from config list SourceListKey and dynamically build and executes the
/// route or commands
/// </summary>
/// <param name="name"></param>
public void RunRouteAction(string routeKey, Action successCallback)
{
// Run this on a separate thread
new CTimer(o =>
{
// try to prevent multiple simultaneous selections
SourceSelectLock.TryEnter();
try
{
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Run route action '{0}'", routeKey);
var dict = ConfigReader.ConfigObject.GetSourceListForKey(SourceListKey);
if (dict == null)
{
Debug.Console(1, this, "WARNING: Config source list '{0}' not found", SourceListKey);
return;
}
// Try to get the list item by it's string key
if (!dict.ContainsKey(routeKey))
{
Debug.Console(1, this, "WARNING: No item '{0}' found on config list '{1}'",
routeKey, SourceListKey);
return;
}
// End usage timer on last source
if (!string.IsNullOrEmpty(LastSourceKey))
{
var usageLastSource = dict[LastSourceKey].SourceDevice as IUsageTracking;
if (usageLastSource != null && usageLastSource.UsageTracker != null)
{
try
{
// There MAY have been failures in here. Protect
usageLastSource.UsageTracker.EndDeviceUsage();
}
catch (Exception e)
{
Debug.Console(1, this, "*#* EXCEPTION in end usage tracking:\r{0}", e);
}
}
}
// Let's run it
var item = dict[routeKey];
if (routeKey.ToLower() != "roomoff")
{
LastSourceKey = routeKey;
}
else
CurrentSourceInfoKey = null;
// hand off the individual routes to this helper
foreach (var route in item.RouteList)
DoRouteItem(route);
// Start usage timer on routed source
var usageNewSource = item.SourceDevice as IUsageTracking;
if (usageNewSource != null && usageNewSource.UsageTracker != null) // Have to make sure there is a usage tracker!
{
(item.SourceDevice as IUsageTracking).UsageTracker.StartDeviceUsage();
}
// See if this can be moved into common, base-class method -------------
// Set volume control, using default if non provided
IBasicVolumeControls volDev = null;
// Handle special cases for volume control
if (string.IsNullOrEmpty(item.VolumeControlKey)
|| item.VolumeControlKey.Equals("$defaultAudio", StringComparison.OrdinalIgnoreCase))
volDev = DefaultVolumeControls;
//else if (item.VolumeControlKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase))
// volDev = DefaultDisplay as IBasicVolumeControls;
// Or a specific device, probably rarely used.
else
{
var dev = DeviceManager.GetDeviceForKey(item.VolumeControlKey);
if (dev is IBasicVolumeControls)
volDev = dev as IBasicVolumeControls;
else if (dev is IHasVolumeDevice)
volDev = (dev as IHasVolumeDevice).VolumeDevice;
}
if (volDev != CurrentVolumeControls)
{
// zero the volume on the device we are leaving.
// Set the volume to default on device we are entering
if (ZeroVolumeWhenSwtichingVolumeDevices && CurrentVolumeControls is IBasicVolumeWithFeedback)
{
var vd = CurrentVolumeControls as IBasicVolumeWithFeedback;
SavedVolumeLevels[vd] = (uint)vd.VolumeLevelFeedback.IntValue;
vd.SetVolume(0);
}
CurrentVolumeControls = volDev;
if (ZeroVolumeWhenSwtichingVolumeDevices && CurrentVolumeControls is IBasicVolumeWithFeedback)
{
var vd = CurrentVolumeControls as IBasicVolumeWithFeedback;
ushort vol = (SavedVolumeLevels.ContainsKey(vd) ? (ushort)SavedVolumeLevels[vd] : DefaultVolume);
vd.SetVolume(vol);
}
}
// -----------------------------------------------------------------------
// store the name and UI info for routes
if (item.SourceKey == "$off")
{
CurrentSourceInfoKey = routeKey;
CurrentSourceInfo = null;
}
else if (item.SourceKey != null)
{
CurrentSourceInfoKey = routeKey;
CurrentSourceInfo = item;
}
OnFeedback.FireUpdate();
if (OnFeedback.BoolValue)
{
if (VideoCodec.UsageTracker.InUseTracker.InUseFeedback.BoolValue)
{
Debug.Console(1, this, "Video Codec in use, deactivating standby on codec");
VideoCodec.StandbyDeactivate();
}
if (VideoCodec.StandbyIsOnFeedback.BoolValue)
{
VideoCodec.StandbyDeactivate();
}
else
{
Debug.Console(1, this, "Video codec not in standby. No need to wake.");
}
}
else
{
Debug.Console(1, this, "Room OnFeedback state: {0}", OnFeedback.BoolValue);
}
// report back when done
if (successCallback != null)
successCallback();
}
catch (Exception e)
{
Debug.Console(1, this, "ERROR in routing: {0}", e);
}
SourceSelectLock.Leave();
}, 0); // end of CTimer
}
/// <summary>
///
/// </summary>
/// <param name="route"></param>
void DoRouteItem(SourceRouteListItem route)
{
// if there is a $defaultAll on route, run two separate
if (route.DestinationKey.Equals("$defaultAll", StringComparison.OrdinalIgnoreCase))
{
foreach (var display in Displays)
{
var tempVideo = new SourceRouteListItem
{
DestinationKey = display.Key,
SourceKey = route.SourceKey,
Type = eRoutingSignalType.Video
};
DoRoute(tempVideo);
}
}
else
DoRoute(route);
}
/// <summary>
///
/// </summary>
/// <param name="route"></param>
/// <returns></returns>
bool DoRoute(SourceRouteListItem route)
{
IRoutingSink dest = null;
if (route.DestinationKey.Equals("$defaultaudio", StringComparison.OrdinalIgnoreCase))
dest = DefaultAudioDevice as IRoutingSink;
//else if (route.DestinationKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase))
// dest = DefaultDisplay;
else
dest = DeviceManager.GetDeviceForKey(route.DestinationKey) as IRoutingSink;
if (dest == null)
{
Debug.Console(1, this, "Cannot route, unknown destination '{0}'", route.DestinationKey);
return false;
}
if (route.SourceKey.Equals("$off", StringComparison.OrdinalIgnoreCase))
{
dest.ReleaseRoute();
if (dest is IHasPowerControl)
(dest as IHasPowerControl).PowerOff();
}
else
{
var source = DeviceManager.GetDeviceForKey(route.SourceKey) as IRoutingOutputs;
if (source == null)
{
Debug.Console(1, this, "Cannot route unknown source '{0}' to {1}", route.SourceKey, route.DestinationKey);
return false;
}
dest.ReleaseAndMakeRoute(source, route.Type);
}
return true;
}
public override void RoomVacatedForTimeoutPeriod(object o)
{
//Implement this
}
/// <summary>
/// Does what it says
/// </summary>
public override void SetDefaultLevels()
{
Debug.Console(1, this, "Restoring default levels");
var vc = CurrentVolumeControls as IBasicVolumeWithFeedback;
if (vc != null)
vc.SetVolume(DefaultVolume);
}
/// <summary>
/// Will power the room on with the last-used source
/// </summary>
public override void PowerOnToDefaultOrLastSource()
{
if (!EnablePowerOnToLastSource || LastSourceKey == null)
return;
RunRouteAction(LastSourceKey);
}
/// <summary>
/// Runs "roomOff" action on all rooms not set to ExcludeFromGlobalFunctions
/// </summary>
public static void AllRoomsOff()
{
var allRooms = DeviceManager.AllDevices.Where(d =>
d is IEssentialsRoom && !(d as IEssentialsHuddleSpaceRoom).ExcludeFromGlobalFunctions);
foreach (var room in allRooms)
(room as IEssentialsHuddleSpaceRoom).RunRouteAction("roomOff");
}
/// <summary>
/// Setup the external sources for the Cisco Touch 10 devices that support IHasExternalSourceSwitch
/// </summary>
private void SetCodecExternalSources()
{
var videoCodecWithExternalSwitching = VideoCodec as IHasExternalSourceSwitching;
if (videoCodecWithExternalSwitching == null || !videoCodecWithExternalSwitching.ExternalSourceListEnabled)
{
return;
}
try
{
// Get the tie line that the external switcher is connected to
string codecInputConnectorName = ConfigReader.ConfigObject.TieLines.SingleOrDefault(
x => x.DestinationKey == VideoCodec.Key && x.DestinationPort == videoCodecWithExternalSwitching.ExternalSourceInputPort).DestinationPort;
videoCodecWithExternalSwitching.ClearExternalSources();
videoCodecWithExternalSwitching.RunRouteAction = RunRouteActionCodec;
var srcList = ConfigReader.ConfigObject.SourceLists.SingleOrDefault(x => x.Key == SourceListKey).Value.OrderBy(kv => kv.Value.Order); ;
foreach (var kvp in srcList)
{
var srcConfig = kvp.Value;
if (kvp.Key != DefaultCodecRouteString && kvp.Key != "roomOff")
{
videoCodecWithExternalSwitching.AddExternalSource(codecInputConnectorName, kvp.Key, srcConfig.PreferredName, PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.eExternalSourceType.desktop);
videoCodecWithExternalSwitching.SetExternalSourceState(kvp.Key, PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.eExternalSourceMode.Ready);
}
}
}
catch (Exception e)
{
Debug.Console(2, this, "Error setting codec external sources: {0}", e);
}
}
private void SetCodecBranding()
{
var vcWithBranding = VideoCodec as IHasBranding;
if (vcWithBranding == null) return;
Debug.Console(1, this, "Setting Codec Branding");
vcWithBranding.InitializeBranding(Key);
}
#region IPrivacy Members
public void PrivacyModeOff()
{
VideoCodec.PrivacyModeOff();
}
public void PrivacyModeOn()
{
VideoCodec.PrivacyModeOn();
}
public void PrivacyModeToggle()
{
VideoCodec.PrivacyModeToggle();
}
#endregion
}
}

View File

@@ -202,11 +202,28 @@ namespace PepperDash.Essentials
};
}
SetupEnvironmentalControlDevices();
SetSourceListKey();
EnablePowerOnToLastSource = true;
}
private void SetupEnvironmentalControlDevices()
{
if (PropertiesConfig.Environment != null)
{
if (PropertiesConfig.Environment.Enabled)
{
foreach (var d in PropertiesConfig.Environment.DeviceKeys)
{
var envDevice = DeviceManager.GetDeviceForKey(d) as EssentialsDevice;
EnvironmentalControlDevices.Add(envDevice);
}
}
}
}
private void SetSourceListKey()
{
if (!string.IsNullOrEmpty(PropertiesConfig.SourceListKey))

View File

@@ -210,21 +210,29 @@ namespace PepperDash.Essentials
{
PropertiesConfig = JsonConvert.DeserializeObject<EssentialsHuddleVtc1PropertiesConfig>
(config.Properties.ToString());
DefaultDisplay = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultDisplayKey) as IRoutingSinkWithSwitching;
DefaultDisplay = DeviceManager.GetDeviceForKey((PropertiesConfig as EssentialsHuddleVtc1PropertiesConfig).DefaultDisplayKey) as IRoutingSinkWithSwitching;
VideoCodec = DeviceManager.GetDeviceForKey(PropertiesConfig.VideoCodecKey) as
PepperDash.Essentials.Devices.Common.VideoCodec.VideoCodecBase;
if (VideoCodec == null)
throw new ArgumentNullException("codec cannot be null");
{
Debug.Console(0, Debug.ErrorLogLevel.Error, "No Video Codec set. Please check 'videoCodecKey' property in room config");
throw new ArgumentNullException("VideoCodec cannot be null");
}
AudioCodec = DeviceManager.GetDeviceForKey(PropertiesConfig.AudioCodecKey) as
PepperDash.Essentials.Devices.Common.AudioCodec.AudioCodecBase;
if (AudioCodec == null)
Debug.Console(0, this, "No Audio Codec Found");
DefaultAudioDevice = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultAudioKey) as IBasicVolumeControls;
if (DefaultAudioDevice == null)
{
Debug.Console(0, Debug.ErrorLogLevel.Error, "No Default Audio Device set. Please check 'defaultAudioKey' property in room config");
throw new ArgumentNullException("DefaultAudioDevice cannot be null");
}
InitializeRoom();
}
@@ -326,6 +334,8 @@ namespace PepperDash.Essentials
CallTypeFeedback = new IntFeedback(() => 0);
SetupEnvironmentalControlDevices();
SetSourceListKey();
EnablePowerOnToLastSource = true;
@@ -336,6 +346,21 @@ namespace PepperDash.Essentials
}
}
private void SetupEnvironmentalControlDevices()
{
if (PropertiesConfig.Environment != null)
{
if (PropertiesConfig.Environment.Enabled)
{
foreach (var d in PropertiesConfig.Environment.DeviceKeys)
{
var envDevice = DeviceManager.GetDeviceForKey(d) as EssentialsDevice;
EnvironmentalControlDevices.Add(envDevice);
}
}
}
}
private void SetSourceListKey()
{
@@ -419,6 +444,14 @@ namespace PepperDash.Essentials
/// <returns></returns>
public bool RunDefaultCallRoute()
{
Debug.Console(2, this, "RunDefaultCallRoute() Currently Sharing Content: {0}", VideoCodec.SharingContentIsOnFeedback.BoolValue);
if (VideoCodec.SharingContentIsOnFeedback.BoolValue)
{
Debug.Console(2, this, "Currently sharing content. Ignoring request to run default call route.");
return false;
}
RunRouteAction(DefaultCodecRouteString);
return true;
}

View File

@@ -19,7 +19,7 @@ namespace PepperDash.Essentials
{
public class EssentialsTechRoom : EssentialsRoomBase, ITvPresetsProvider, IBridgeAdvanced, IRunDirectRouteAction
{
private readonly EssentialsTechRoomConfig _config;
public EssentialsTechRoomConfig PropertiesConfig { get; private set; }
private readonly Dictionary<string, TwoWayDisplayBase> _displays;
private readonly DevicePresetsModel _tunerPresets;
@@ -57,16 +57,16 @@ namespace PepperDash.Essentials
public EssentialsTechRoom(DeviceConfig config) : base(config)
{
_config = config.Properties.ToObject<EssentialsTechRoomConfig>();
PropertiesConfig = config.Properties.ToObject<EssentialsTechRoomConfig>();
_tunerPresets = new DevicePresetsModel(String.Format("{0}-presets", config.Key), _config.PresetsFileName);
_tunerPresets = new DevicePresetsModel(String.Format("{0}-presets", config.Key), PropertiesConfig.PresetsFileName);
_tunerPresets.SetFileName(_config.PresetsFileName);
_tunerPresets.SetFileName(PropertiesConfig.PresetsFileName);
_tunerPresets.PresetRecalled += TunerPresetsOnPresetRecalled;
_tuners = GetDevices<IRSetTopBoxBase>(_config.Tuners);
_displays = GetDevices<TwoWayDisplayBase>(_config.Displays);
_tuners = GetDevices<IRSetTopBoxBase>(PropertiesConfig.Tuners);
_displays = GetDevices<TwoWayDisplayBase>(PropertiesConfig.Displays);
RoomPowerIsOnFeedback = new BoolFeedback(() => RoomPowerIsOn);
@@ -153,7 +153,7 @@ namespace PepperDash.Essentials
private void CreateOrUpdateScheduledEvents()
{
var eventsConfig = _config.ScheduledEvents;
var eventsConfig = PropertiesConfig.ScheduledEvents;
GetOrCreateScheduleGroup();
@@ -207,21 +207,21 @@ namespace PepperDash.Essentials
{
//update config based on key of scheduleEvent
GetOrCreateScheduleGroup();
var existingEventIndex = _config.ScheduledEvents.FindIndex((e) => e.Key == scheduledEvent.Key);
var existingEventIndex = PropertiesConfig.ScheduledEvents.FindIndex((e) => e.Key == scheduledEvent.Key);
if (existingEventIndex < 0)
{
_config.ScheduledEvents.Add(scheduledEvent);
PropertiesConfig.ScheduledEvents.Add(scheduledEvent);
}
else
{
_config.ScheduledEvents[existingEventIndex] = scheduledEvent;
PropertiesConfig.ScheduledEvents[existingEventIndex] = scheduledEvent;
}
//create or update event based on config
CreateOrUpdateSingleEvent(scheduledEvent);
//save config
Config.Properties = JToken.FromObject(_config);
Config.Properties = JToken.FromObject(PropertiesConfig);
CustomSetConfig(Config);
//Fire Event
@@ -230,7 +230,7 @@ namespace PepperDash.Essentials
public List<ScheduledEventConfig> GetScheduledEvents()
{
return _config.ScheduledEvents ?? new List<ScheduledEventConfig>();
return PropertiesConfig.ScheduledEvents ?? new List<ScheduledEventConfig>();
}
private void OnScheduledEventUpdate()
@@ -242,14 +242,14 @@ namespace PepperDash.Essentials
return;
}
handler(this, new ScheduledEventEventArgs {ScheduledEvents = _config.ScheduledEvents});
handler(this, new ScheduledEventEventArgs {ScheduledEvents = PropertiesConfig.ScheduledEvents});
}
public event EventHandler<ScheduledEventEventArgs> ScheduledEventsChanged;
private void HandleScheduledEvent(ScheduledEvent schevent, ScheduledEventCommon.eCallbackReason type)
{
var eventConfig = _config.ScheduledEvents.FirstOrDefault(e => e.Key == schevent.Name);
var eventConfig = PropertiesConfig.ScheduledEvents.FirstOrDefault(e => e.Key == schevent.Name);
if (eventConfig == null)
{
@@ -286,11 +286,11 @@ Params: {2}"
{
Debug.Console(2, this, "Room Powering On");
var dummySource = DeviceManager.GetDeviceForKey(_config.DummySourceKey) as IRoutingOutputs;
var dummySource = DeviceManager.GetDeviceForKey(PropertiesConfig.DummySourceKey) as IRoutingOutputs;
if (dummySource == null)
{
Debug.Console(1, this, "Unable to get source with key: {0}", _config.DummySourceKey);
Debug.Console(1, this, "Unable to get source with key: {0}", PropertiesConfig.DummySourceKey);
return;
}
@@ -375,13 +375,13 @@ Params: {2}"
{
bridge.AddJoinMap(Key, joinMap);
}
uint i;
if (_config.IsPrimary)
if (PropertiesConfig.IsPrimary)
{
Debug.Console(1, this, "Linking Primary system Tuner Preset Mirroring");
if (_config.MirroredTuners != null && _config.MirroredTuners.Count > 0)
if (PropertiesConfig.MirroredTuners != null && PropertiesConfig.MirroredTuners.Count > 0)
{
foreach (var tuner in _config.MirroredTuners)
foreach (var tuner in PropertiesConfig.MirroredTuners)
{
var f = CurrentPresetsFeedbacks[tuner.Value];
@@ -423,9 +423,9 @@ Params: {2}"
{
Debug.Console(1, this, "Linking Secondary system Tuner Preset Mirroring");
if (_config.MirroredTuners != null && _config.MirroredTuners.Count > 0)
if (PropertiesConfig.MirroredTuners != null && PropertiesConfig.MirroredTuners.Count > 0)
{
foreach (var tuner in _config.MirroredTuners)
foreach (var tuner in PropertiesConfig.MirroredTuners)
{
var t = _tuners[tuner.Value];

View File

@@ -12,6 +12,8 @@ namespace PepperDash.Essentials
{
EssentialsHuddleVtc1PropertiesConfig PropertiesConfig { get; }
bool ExcludeFromGlobalFunctions { get; }
void RunRouteAction(string routeKey);
IHasScheduleAwareness ScheduleSource { get; }

View File

@@ -16,6 +16,8 @@ namespace PepperDash.Essentials
{
public class EssentialsTouchpanelController : EssentialsDevice, IHasBasicTriListWithSmartObject
{
private CrestronTouchpanelPropertiesConfig _propertiesConfig;
public BasicTriListWithSmartObject Panel { get; private set; }
public PanelDriverBase PanelDriver { get; private set; }
@@ -27,7 +29,14 @@ namespace PepperDash.Essentials
: base(key, name)
{
Panel = tsw;
tsw.LoadSmartObjects(sgdPath);
if (!string.IsNullOrEmpty(sgdPath))
Panel.LoadSmartObjects(sgdPath);
else
Debug.Console(1, this, "No SGD file path defined");
tsw.SigChange += Panel_SigChange;
}
@@ -37,7 +46,7 @@ namespace PepperDash.Essentials
Panel = dge;
if (!string.IsNullOrEmpty(sgdPath))
dge.LoadSmartObjects(sgdPath);
Panel.LoadSmartObjects(sgdPath);
else
Debug.Console(1, this, "No SGD file path defined");
@@ -50,6 +59,7 @@ namespace PepperDash.Essentials
public EssentialsTouchpanelController(string key, string name, string type, CrestronTouchpanelPropertiesConfig props, uint id)
: base(key, name)
{
_propertiesConfig = props;
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Creating touchpanel hardware...");
type = type.ToLower();
@@ -61,6 +71,8 @@ namespace PepperDash.Essentials
app.ParameterProjectName.Value = props.ProjectName;
Panel = app;
}
else if (type == "xpanel")
Panel = new XpanelForSmartGraphics(id, Global.ControlSystem);
else if (type == "tsw550")
Panel = new Tsw550(id, Global.ControlSystem);
else if (type == "tsw552")
@@ -134,10 +146,194 @@ namespace PepperDash.Essentials
Panel.LoadSmartObjects(sgdName);
Panel.SigChange += Panel_SigChange;
AddPostActivationAction(() =>
{
// Check for IEssentialsRoomCombiner in DeviceManager and if found, subscribe to its event
var roomCombiner = DeviceManager.AllDevices.FirstOrDefault((d) => d is IEssentialsRoomCombiner) as IEssentialsRoomCombiner;
if (roomCombiner != null)
{
// Subscribe to the even
roomCombiner.RoomCombinationScenarioChanged += new EventHandler<EventArgs>(roomCombiner_RoomCombinationScenarioChanged);
// Connect to the initial roomKey
if (roomCombiner.CurrentScenario != null)
{
// Use the current scenario
DetermineRoomKeyFromScenario(roomCombiner.CurrentScenario);
}
else
{
// Current Scenario not yet set. Use default
SetupPanelDrivers(_propertiesConfig.DefaultRoomKey);
}
}
else
{
// No room combiner, use the default key
SetupPanelDrivers(_propertiesConfig.DefaultRoomKey);
}
});
}
void roomCombiner_RoomCombinationScenarioChanged(object sender, EventArgs e)
{
var roomCombiner = sender as IEssentialsRoomCombiner;
DetermineRoomKeyFromScenario(roomCombiner.CurrentScenario);
}
/// <summary>
/// Determines the room key to use based on the scenario
/// </summary>
/// <param name="scenario"></param>
void DetermineRoomKeyFromScenario(IRoomCombinationScenario scenario)
{
string newRoomKey = null;
if (scenario.UiMap.ContainsKey(Key))
{
newRoomKey = scenario.UiMap[Key];
}
else if (scenario.UiMap.ContainsKey(_propertiesConfig.DefaultRoomKey))
{
newRoomKey = scenario.UiMap[_propertiesConfig.DefaultRoomKey];
}
SetupPanelDrivers(newRoomKey);
}
/// <summary>
/// Sets up drivers and links them to the room specified
/// </summary>
/// <param name="roomKey">key of room to link the drivers to</param>
void SetupPanelDrivers(string roomKey)
{
// Clear out any existing actions
Panel.ClearAllSigActions();
Debug.Console(0, this, "Linking TP '{0}' to Room '{1}'", Key, roomKey);
var mainDriver = new EssentialsPanelMainInterfaceDriver(Panel, _propertiesConfig);
// Then the sub drivers
// spin up different room drivers depending on room type
var room = DeviceManager.GetDeviceForKey(roomKey);
if (room is IEssentialsHuddleSpaceRoom)
{
// Screen Saver Driver
mainDriver.ScreenSaverController = new ScreenSaverController(mainDriver, _propertiesConfig);
// Header Driver
Debug.Console(0, this, "Adding header driver");
mainDriver.HeaderDriver = new EssentialsHeaderDriver(mainDriver, _propertiesConfig);
// AV Driver
Debug.Console(0, this, "Adding huddle space AV driver");
var avDriver = new EssentialsHuddlePanelAvFunctionsDriver(mainDriver, _propertiesConfig);
avDriver.DefaultRoomKey = roomKey;
mainDriver.AvDriver = avDriver;
avDriver.CurrentRoom = room as IEssentialsHuddleSpaceRoom;
// Environment Driver
if (avDriver.CurrentRoom.PropertiesConfig.Environment != null && avDriver.CurrentRoom.PropertiesConfig.Environment.DeviceKeys.Count > 0)
{
Debug.Console(0, this, "Adding environment driver");
mainDriver.EnvironmentDriver = new EssentialsEnvironmentDriver(mainDriver, _propertiesConfig);
mainDriver.EnvironmentDriver.GetDevicesFromConfig(avDriver.CurrentRoom.PropertiesConfig.Environment);
}
mainDriver.HeaderDriver.SetupHeaderButtons(avDriver, avDriver.CurrentRoom);
if (Panel is TswFt5ButtonSystem)
{
var tsw = Panel as TswFt5ButtonSystem;
// Wire up hard keys
tsw.Power.UserObject = new Action<bool>(b => { if (!b) avDriver.PowerButtonPressed(); });
if (mainDriver.EnvironmentDriver != null)
tsw.Lights.UserObject = new Action<bool>(b =>
{
if (!b)
{
mainDriver.EnvironmentDriver.Toggle();
}
});
tsw.Up.UserObject = new Action<bool>(avDriver.VolumeUpPress);
tsw.Down.UserObject = new Action<bool>(avDriver.VolumeDownPress);
}
}
else if (room is IEssentialsHuddleVtc1Room)
{
Debug.Console(0, this, "Adding huddle space VTC AV driver");
// Screen Saver Driver
mainDriver.ScreenSaverController = new ScreenSaverController(mainDriver, _propertiesConfig);
// Header Driver
mainDriver.HeaderDriver = new EssentialsHeaderDriver(mainDriver, _propertiesConfig);
// AV Driver
var avDriver = new EssentialsHuddleVtc1PanelAvFunctionsDriver(mainDriver, _propertiesConfig);
var codecDriver = new PepperDash.Essentials.UIDrivers.VC.EssentialsVideoCodecUiDriver(Panel, avDriver,
(room as IEssentialsHuddleVtc1Room).VideoCodec, mainDriver.HeaderDriver);
avDriver.SetVideoCodecDriver(codecDriver);
avDriver.DefaultRoomKey = roomKey;
mainDriver.AvDriver = avDriver;
avDriver.CurrentRoom = room as IEssentialsHuddleVtc1Room;
// Environment Driver
if (avDriver.CurrentRoom.PropertiesConfig.Environment != null && avDriver.CurrentRoom.PropertiesConfig.Environment.DeviceKeys.Count > 0)
{
Debug.Console(0, this, "Adding environment driver");
mainDriver.EnvironmentDriver = new EssentialsEnvironmentDriver(mainDriver, _propertiesConfig);
mainDriver.EnvironmentDriver.GetDevicesFromConfig(avDriver.CurrentRoom.PropertiesConfig.Environment);
}
mainDriver.HeaderDriver.SetupHeaderButtons(avDriver, avDriver.CurrentRoom);
if (Panel is TswFt5ButtonSystem)
{
var tsw = Panel as TswFt5ButtonSystem;
// Wire up hard keys
tsw.Power.UserObject = new Action<bool>(b => { if (!b) avDriver.EndMeetingPress(); });
if (mainDriver.EnvironmentDriver != null)
tsw.Lights.UserObject = new Action<bool>(b =>
{
if (!b)
{
mainDriver.EnvironmentDriver.Toggle();
}
});
tsw.Up.UserObject = new Action<bool>(avDriver.VolumeUpPress);
tsw.Down.UserObject = new Action<bool>(avDriver.VolumeDownPress);
}
LoadAndShowDriver(mainDriver);
}
else
{
Debug.Console(0, this, "ERROR: Cannot load AvFunctionsDriver for room '{0}'", roomKey);
}
}
public void LoadAndShowDriver(PanelDriverBase driver)
{
if (PanelDriver != null)
{
var mainDriver = PanelDriver as EssentialsPanelMainInterfaceDriver;
if (mainDriver != null)
{
mainDriver.Dispose();
}
}
PanelDriver = driver;
driver.Show();
}
@@ -148,7 +344,6 @@ namespace PepperDash.Essentials
PanelDriver.BackButtonPressed();
}
void ExtenderSystemReservedSigs_DeviceExtenderSigChange(DeviceExtender currentDeviceExtender, SigEventArgs args)
{
// If the sig is transitioning on, mark it in case it was home button that transitioned it
@@ -213,7 +408,7 @@ namespace PepperDash.Essentials
{
public EssentialsTouchpanelControllerFactory()
{
TypeNames = new List<string>() { "tsw550", "tsw750", "tsw1050", "tsw560", "tsw760", "tsw1060", "tsw570", "tsw770", "ts770", "tsw1070", "ts1070", "xpanel" };
TypeNames = new List<string>() { "crestronapp", "tsw550", "tsw750", "tsw1050", "tsw560", "tsw760", "tsw1060", "tsw570", "tsw770", "ts770", "tsw1070", "ts1070", "xpanel" };
}
public override EssentialsDevice BuildDevice(DeviceConfig dc)
@@ -225,119 +420,6 @@ namespace PepperDash.Essentials
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 IEssentialsHuddleSpaceRoom)
{
// Screen Saver Driver
mainDriver.ScreenSaverController = new ScreenSaverController(mainDriver, props);
// Header Driver
Debug.Console(0, panelController, "Adding header driver");
mainDriver.HeaderDriver = new EssentialsHeaderDriver(mainDriver, props);
// AV Driver
Debug.Console(0, panelController, "Adding huddle space AV driver");
var avDriver = new EssentialsHuddlePanelAvFunctionsDriver(mainDriver, props);
avDriver.DefaultRoomKey = props.DefaultRoomKey;
mainDriver.AvDriver = avDriver;
avDriver.CurrentRoom = room as IEssentialsHuddleSpaceRoom;
// 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 IEssentialsHuddleVtc1Room)
{
Debug.Console(0, panelController, "Adding huddle space VTC AV driver");
// Screen Saver Driver
mainDriver.ScreenSaverController = new ScreenSaverController(mainDriver, props);
// Header Driver
mainDriver.HeaderDriver = new EssentialsHeaderDriver(mainDriver, props);
// AV Driver
var avDriver = new EssentialsHuddleVtc1PanelAvFunctionsDriver(mainDriver, props);
var codecDriver = new PepperDash.Essentials.UIDrivers.VC.EssentialsVideoCodecUiDriver(panelController.Panel, avDriver,
(room as IEssentialsHuddleVtc1Room).VideoCodec, mainDriver.HeaderDriver);
avDriver.SetVideoCodecDriver(codecDriver);
avDriver.DefaultRoomKey = props.DefaultRoomKey;
mainDriver.AvDriver = avDriver;
avDriver.CurrentRoom = room as IEssentialsHuddleVtc1Room;
// 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

@@ -14,6 +14,8 @@ namespace PepperDash.Essentials
{
public SourceListItem SourceItem { get; private set; }
private IHasCurrentSourceInfoChange _room;
public SubpageReferenceListSourceItem(uint index, SubpageReferenceList owner,
SourceListItem sourceItem, Action<bool> routeAction)
: base(index, owner)
@@ -25,6 +27,7 @@ namespace PepperDash.Essentials
public void RegisterForSourceChange(IHasCurrentSourceInfoChange room)
{
_room = room;
room.CurrentSourceChange -= room_CurrentSourceInfoChange;
room.CurrentSourceChange += room_CurrentSourceInfoChange;
}
@@ -44,6 +47,9 @@ namespace PepperDash.Essentials
{
Owner.BoolInputSig(Index, 1).UserObject = null;
Owner.StringInputSig(Index, 1).StringValue = "";
if(_room != null)
_room.CurrentSourceChange -= room_CurrentSourceInfoChange;
}
/// <summary>

View File

@@ -11,7 +11,7 @@ namespace PepperDash.Essentials
/// <summary>
///
/// </summary>
public class EssentialsPanelMainInterfaceDriver : PanelDriverBase, IHasScreenSaverController
public class EssentialsPanelMainInterfaceDriver : PanelDriverBase, IHasScreenSaverController, IDisposable
{
CTimer InactivityTimer;
@@ -69,6 +69,35 @@ namespace PepperDash.Essentials
}
}
#region IDisposable Members
public void Dispose()
{
var avDriver = AvDriver as PanelDriverBase;
if (avDriver != null)
{
avDriver.Hide();
}
if (ScreenSaverController != null)
{
ScreenSaverController.Dispose();
}
if (HeaderDriver != null)
{
HeaderDriver.Hide();
}
if (EnvironmentDriver != null)
{
EnvironmentDriver.Hide();
}
if (CurrentChildDriver != null)
{
CurrentChildDriver.Hide();
}
}
#endregion
void ExtenderTouchDetectionReservedSigs_DeviceExtenderSigChange(Crestron.SimplSharpPro.DeviceExtender currentDeviceExtender, Crestron.SimplSharpPro.SigEventArgs args)
{
@@ -130,7 +159,7 @@ namespace PepperDash.Essentials
if(CurrentChildDriver != null)
CurrentChildDriver.BackButtonPressed();
}
}
}
public interface IHasScreenSaverController
{

View File

@@ -306,7 +306,7 @@ namespace PepperDash.Essentials
TriList.SetSigFalseAction(UIBoolJoin.DisplayPowerTogglePress, () =>
{
if (CurrentRoom != null && CurrentRoom.DefaultDisplay is IHasPowerControl)
if (CurrentRoom != null && CurrentRoom.DefaultDisplay != null && CurrentRoom.DefaultDisplay is IHasPowerControl)
(CurrentRoom.DefaultDisplay as IHasPowerControl).PowerToggle();
});

View File

@@ -354,7 +354,7 @@ namespace PepperDash.Essentials
TriList.SetSigFalseAction(UIBoolJoin.DisplayPowerTogglePress, () =>
{
if (CurrentRoom != null && CurrentRoom.DefaultDisplay is IHasPowerControl)
if (CurrentRoom != null && CurrentRoom.DefaultDisplay != null && CurrentRoom.DefaultDisplay is IHasPowerControl)
(CurrentRoom.DefaultDisplay as IHasPowerControl).PowerToggle();
});
@@ -493,10 +493,10 @@ namespace PepperDash.Essentials
// and the LastMeetingDismissed != this meeting
var lastMeetingDismissed = meetings.FirstOrDefault(m => m.Id == LastMeetingDismissedId);
Debug.Console(0, "*#* Room on: {0}, lastMeetingDismissedId: {1} {2} *#*",
CurrentRoom.OnFeedback.BoolValue,
LastMeetingDismissedId,
lastMeetingDismissed != null ? lastMeetingDismissed.StartTime.ToString("t", Global.Culture) : "");
//Debug.Console(0, "*#* Room on: {0}, lastMeetingDismissedId: {1} {2} *#*",
// CurrentRoom.OnFeedback.BoolValue,
// LastMeetingDismissedId,
// lastMeetingDismissed != null ? lastMeetingDismissed.StartTime.ToString("t", Global.Culture) : "");
var meeting = meetings.LastOrDefault(m => m.Joinable);
if (CurrentRoom.OnFeedback.BoolValue

View File

@@ -52,7 +52,7 @@ namespace PepperDash.Essentials
{
var prevJoin = CurrentJoin;
var wasShown = _IsShown;
Debug.Console(2, "Trilist {0:X2}, interlock swapping {1} for {2}", TriList.ID, CurrentJoin, join);
//Debug.Console(2, "Trilist {0:X2}, interlock swapping {1} for {2}", TriList.ID, CurrentJoin, join);
if (CurrentJoin == join && TriList.BooleanInput[join].BoolValue)
return;
SetButDontShow(join);
@@ -71,7 +71,7 @@ namespace PepperDash.Essentials
var prevJoin = CurrentJoin;
var wasShown = IsShown;
Debug.Console(2, "Trilist {0:X2}, interlock swapping {1} for {2}", TriList.ID, CurrentJoin, join);
//Debug.Console(2, "Trilist {0:X2}, interlock swapping {1} for {2}", TriList.ID, CurrentJoin, join);
if (CurrentJoin == join)
HideAndClear();
else
@@ -92,7 +92,7 @@ namespace PepperDash.Essentials
{
var prevJoin = CurrentJoin;
var wasShown = IsShown;
Debug.Console(2, "Trilist {0:X2}, interlock hiding {1}", TriList.ID, CurrentJoin);
//Debug.Console(2, "Trilist {0:X2}, interlock hiding {1}", TriList.ID, CurrentJoin);
Hide();
CurrentJoin = 0;
@@ -108,7 +108,7 @@ namespace PepperDash.Essentials
var prevJoin = CurrentJoin;
var wasShown = IsShown;
Debug.Console(2, "Trilist {0:X2}, interlock hiding {1}", TriList.ID, CurrentJoin);
//Debug.Console(2, "Trilist {0:X2}, interlock hiding {1}", TriList.ID, CurrentJoin);
if (CurrentJoin > 0)
{
TriList.BooleanInput[CurrentJoin].BoolValue = false;
@@ -125,7 +125,7 @@ namespace PepperDash.Essentials
var prevJoin = CurrentJoin;
var wasShown = IsShown;
Debug.Console(2, "Trilist {0:X2}, interlock showing {1}", TriList.ID, CurrentJoin);
//Debug.Console(2, "Trilist {0:X2}, interlock showing {1}", TriList.ID, CurrentJoin);
if (CurrentJoin > 0)
{
TriList.BooleanInput[CurrentJoin].BoolValue = true;

View File

@@ -12,7 +12,7 @@ namespace PepperDash.Essentials
/// <summary>
/// Driver responsible for controlling the screenshaver showing the client logo, MC connection information and QR Code. Moves the elements around to prevent screen burn in
/// </summary>
public class ScreenSaverController : PanelDriverBase
public class ScreenSaverController : PanelDriverBase, IDisposable
{
/// <summary>
@@ -42,7 +42,7 @@ namespace PepperDash.Essentials
PositionInterlock = new JoinedSigInterlock(parent.TriList);
var cmdName = String.Format("shwscrsvr-{0}", parent.TriList.ID);
var cmdName = String.Format("shwscrsvr-{0:X2}", parent.TriList.ID);
CrestronConsole.AddNewConsoleCommand((o) => Show(), cmdName, "Shows Panel Screensaver", ConsoleAccessLevelEnum.AccessOperator);
@@ -51,6 +51,8 @@ namespace PepperDash.Essentials
public override void Show()
{
//Debug.Console(2, "Showing ScreenSaverController: {0:X2}", TriList.ID);
if (_parent.AvDriver != null)
{
_parent.AvDriver.PopupInterlock.ShowInterlocked(UIBoolJoin.MCScreenSaverVisible);
@@ -65,10 +67,11 @@ namespace PepperDash.Essentials
public override void Hide()
{
Debug.Console(1, "Hiding ScreenSaverController");
//Debug.Console(2, "Hiding ScreenSaverController: {0:X2}", TriList.ID);
if (PositionTimer != null)
{
//Debug.Console(2, "Stopping PositionTimer: {0:X2}", TriList.ID);
PositionTimer.Stop();
PositionTimer.Dispose();
PositionTimer = null;
@@ -86,6 +89,8 @@ namespace PepperDash.Essentials
void StartPositionTimer()
{
//Debug.Console(2, "Starting Position Timer: {0:X2}", TriList.ID);
if (PositionTimer == null)
{
PositionTimer = new CTimer((o) => PositionTimerExpired(), PositionTimeoutMs);
@@ -117,7 +122,7 @@ namespace PepperDash.Essentials
CurrentPositionIndex = 0;
}
Debug.Console(1, "ScreenSaver Position Timer Expired: Setting new position: {0}", CurrentPositionIndex);
//Debug.Console(2, "ScreenSaver Position Timer Expired: Setting new position: {0} ID: {1:X2}", CurrentPositionIndex, TriList.ID);
}
//
@@ -129,9 +134,19 @@ namespace PepperDash.Essentials
void ClearAllPositions()
{
Debug.Console(1, "Hiding all screensaver positions");
//Debug.Console(2, "Hiding all screensaver positions: {0:X2}", TriList.ID);
PositionInterlock.HideAndClear();
}
#region IDisposable Members
public void Dispose()
{
Hide();
}
#endregion
}
}

View File

@@ -632,7 +632,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
VCControlsInterlock.StatusChanged += new EventHandler<StatusChangedEventArgs>(VCControlsInterlock_StatusChanged);
var codecOffCameras = Codec as IHasCameraOff;
var supportsCameraOffMode = Codec.SupportsCameraOff;
@@ -643,6 +642,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
if (codecAutoCameras != null && supportsAutoCameraMode)
{
CameraModeList.SetItemButtonAction(1,(b) => codecAutoCameras.CameraAutoModeOn());
TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanInput["Item 1 Visible"].BoolValue = true;
codecAutoCameras.CameraAutoModeIsOnFeedback.LinkInputSig(CameraModeList.SmartObject.BooleanInput["Item 1 Selected"]);
@@ -672,6 +672,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
}
};
}
// Manual button always visible
@@ -683,6 +684,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
if (codecOffCameras != null && supportsCameraOffMode)
{
TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanInput["Item 3 Visible"].BoolValue = true;
codecOffCameras.CameraIsOffFeedback.LinkInputSig(CameraModeList.SmartObject.BooleanInput["Item 3 Selected"]);
CameraModeList.SetItemButtonAction(3, (b) => codecOffCameras.CameraOff());
@@ -710,6 +712,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
}
};
}
}

View File

@@ -54,6 +54,10 @@ Utilization of Essentials Framework falls into the following categories:
For detailed documentation, see the [Wiki](https://github.com/PepperDash/EssentialsFramework/wiki).
## Support
* Check out our [Discord Server](https://discord.gg/rWyeRH3K)
## How-To (Getting Started)
See [Getting Started](https://github.com/PepperDash/Essentials/wiki/Get-started#how-to-get-started)

View File

@@ -42,3 +42,6 @@ devjson:2 {"deviceKey":"display01Comm-com", "methodName":"SendText", "params": [
devjson:10 {"deviceKey":"dmLink-ssh", "methodName":"Connect", "params": []}
devjson:2 {"deviceKey":"roomCombiner", "methodName":"SetRoomCombinationScenario", "params": ["combined"]}
devjson:2 {"deviceKey":"roomCombiner", "methodName":"SetRoomCombinationScenario", "params": ["divided"]}

View File

@@ -84,6 +84,10 @@ namespace PepperDash.Essentials.Core.Bridges
public JoinDataComplete OutputStreamCardState = new JoinDataComplete(new JoinData { JoinNumber = 1601, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Stream Output Start (1), Stop (2), Pause (3) with Feedback", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
[JoinName("NoRouteName")]
public JoinDataComplete NoRouteName = new JoinDataComplete(new JoinData { JoinNumber = 100, JoinSpan = 1 },
new JoinMetadata { Description = "DM Chassis Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("InputNames")]
public JoinDataComplete InputNames = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
@@ -96,7 +100,7 @@ namespace PepperDash.Essentials.Core.Bridges
new JoinDataComplete(new JoinData {JoinNumber = 501, JoinSpan = 200},
new JoinMetadata
{
Description = "Video Input Name",
Description = "DM Chassis Video Input Names",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Serial
});
@@ -106,7 +110,7 @@ namespace PepperDash.Essentials.Core.Bridges
new JoinDataComplete(new JoinData { JoinNumber = 701, JoinSpan = 200 },
new JoinMetadata
{
Description = "Video Input Name",
Description = "DM Chassis Audio Input Names",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Serial
});
@@ -115,7 +119,7 @@ namespace PepperDash.Essentials.Core.Bridges
new JoinDataComplete(new JoinData { JoinNumber = 901, JoinSpan = 200 },
new JoinMetadata
{
Description = "Video Input Name",
Description = "DM Chassis Video Output Names",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Serial
});
@@ -124,7 +128,7 @@ namespace PepperDash.Essentials.Core.Bridges
new JoinDataComplete(new JoinData { JoinNumber = 1101, JoinSpan = 200 },
new JoinMetadata
{
Description = "Video Input Name",
Description = "DM Chassis Audio Output Names",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Serial
});

View File

@@ -28,6 +28,10 @@ namespace PepperDash.Essentials.Core.Bridges
public JoinDataComplete EdidSerialNumber = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata { Description = "DM RMC EDID Serial Number", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("Name")]
public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 },
new JoinMetadata { Description = "DM RMC Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("AudioVideoSource")]
public JoinDataComplete AudioVideoSource = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "DM RMC Audio Video Source Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });

View File

@@ -32,6 +32,10 @@ namespace PepperDash.Essentials.Core.Bridges
public JoinDataComplete CurrentInputResolution = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "DM TX Current Input Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("Name")]
public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "DM TX Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("VideoInput")]
public JoinDataComplete VideoInput = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "DM TX Video Input Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
@@ -42,7 +46,7 @@ namespace PepperDash.Essentials.Core.Bridges
[JoinName("HdcpSupportCapability")]
public JoinDataComplete HdcpSupportCapability = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "DM TX HDCP Support Capability", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
new JoinMetadata { Description = "DM TX HDCP Support Capability", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
[JoinName("Port1HdcpState")]
public JoinDataComplete Port1HdcpState = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },

View File

@@ -7,7 +7,15 @@ namespace PepperDash.Essentials.Core.Bridges
[JoinName("MasterVolumeLevel")]
public JoinDataComplete MasterVolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Master Volume Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
new JoinMetadata { Description = "Master Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("MasterVolumeLevelScaled")]
public JoinDataComplete MasterVolumeLevelScaled = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "Master Volume 16bit Scaled Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("MixerPresetRecall")]
public JoinDataComplete MixerPresetRecall = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "Mixer Preset Recall Set", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
[JoinName("MasterVolumeMuteOn")]
public JoinDataComplete MasterVolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
@@ -23,11 +31,19 @@ namespace PepperDash.Essentials.Core.Bridges
[JoinName("MasterVolumeDown")]
public JoinDataComplete MasterVolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata { Description = "Master Volume Mute Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
new JoinMetadata { Description = "Master Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("MasterVolumeLevelScaledSend")]
public JoinDataComplete MasterVolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata { Description = "Master Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("SourceVolumeLevel")]
public JoinDataComplete SourceVolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 },
new JoinMetadata { Description = "Source Volume Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
new JoinMetadata { Description = "Source Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("SourceVolumeLevelScaled")]
public JoinDataComplete SourceVolumeLevelScaled = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 },
new JoinMetadata { Description = "Source Volume 16bit Scaled Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("SourceVolumeMuteOn")]
public JoinDataComplete SourceVolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 },
@@ -43,11 +59,19 @@ namespace PepperDash.Essentials.Core.Bridges
[JoinName("SourceVolumeDown")]
public JoinDataComplete SourceVolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 },
new JoinMetadata { Description = "Source Volume Mute Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
new JoinMetadata { Description = "Source Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("SourceVolumeLevelScaledSend")]
public JoinDataComplete SourceVolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 },
new JoinMetadata { Description = "Source Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("Codec1VolumeLevel")]
public JoinDataComplete Codec1VolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 },
new JoinMetadata { Description = "Codec1 Volume Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
new JoinMetadata { Description = "Codec1 Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("Codec1VolumeLevelScaled")]
public JoinDataComplete Codec1VolumeLevelScaled = new JoinDataComplete(new JoinData { JoinNumber = 22, JoinSpan = 1 },
new JoinMetadata { Description = "Codec1 Volume 16bit Scaled Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("Codec1VolumeMuteOn")]
public JoinDataComplete Codec1VolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 },
@@ -63,11 +87,19 @@ namespace PepperDash.Essentials.Core.Bridges
[JoinName("Codec1VolumeDown")]
public JoinDataComplete Codec1VolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 24, JoinSpan = 1 },
new JoinMetadata { Description = "Codec1 Volume Mute Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
new JoinMetadata { Description = "Codec1 Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("Codec1VolumeLevelScaledSend")]
public JoinDataComplete Codec1VolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 25, JoinSpan = 1 },
new JoinMetadata { Description = "Codec1 Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("Codec2VolumeLevel")]
public JoinDataComplete Codec2VolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 31, JoinSpan = 1 },
new JoinMetadata { Description = "Codec2 Volume Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
new JoinMetadata { Description = "Codec2 Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("Codec2VolumeLevelScaled")]
public JoinDataComplete Codec2VolumeLevelScaled = new JoinDataComplete(new JoinData { JoinNumber = 32, JoinSpan = 1 },
new JoinMetadata { Description = "Codec2 Volume 16bit Scaled Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("Codec2VolumeMuteOn")]
public JoinDataComplete Codec2VolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 31, JoinSpan = 1 },
@@ -83,8 +115,39 @@ namespace PepperDash.Essentials.Core.Bridges
[JoinName("Codec2VolumeDown")]
public JoinDataComplete Codec2VolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 34, JoinSpan = 1 },
new JoinMetadata { Description = "Codec2 Volume Mute Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
new JoinMetadata { Description = "Codec2 Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("Codec2VolumeLevelScaledSend")]
public JoinDataComplete Codec2VolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 35, JoinSpan = 1 },
new JoinMetadata { Description = "Codec2 Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("MicsMasterVolumeLevel")]
public JoinDataComplete MicsMasterVolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 1 },
new JoinMetadata { Description = "MicsMaster Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("MicsMasterVolumeLevelScaled")]
public JoinDataComplete MicsMasterVolumeLevelScaled = new JoinDataComplete(new JoinData { JoinNumber = 42, JoinSpan = 1 },
new JoinMetadata { Description = "MicsMaster Volume 16bit Scaled Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("MicsMasterVolumeMuteOn")]
public JoinDataComplete MicsMasterVolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 1 },
new JoinMetadata { Description = "MicsMaster Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("MicsMasterVolumeMuteOff")]
public JoinDataComplete MicsMasterVolumeMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 42, JoinSpan = 1 },
new JoinMetadata { Description = "MicsMaster Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("MicsMasterVolumeUp")]
public JoinDataComplete MicsMasterVolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 43, JoinSpan = 1 },
new JoinMetadata { Description = "MicsMaster Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("MicsMasterVolumeDown")]
public JoinDataComplete MicsMasterVolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 44, JoinSpan = 1 },
new JoinMetadata { Description = "MicsMaster Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("MicsMasterVolumeLevelScaledSend")]
public JoinDataComplete MicsMasterVolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 45, JoinSpan = 1 },
new JoinMetadata { Description = "Mics Master Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Constructor to use when instantiating this Join Map without inheriting from it

View File

@@ -0,0 +1,50 @@
using System;
namespace PepperDash.Essentials.Core.Bridges
{
public class DmpsMicrophoneControllerJoinMap : JoinMapBaseAdvanced
{
[JoinName("MicGain")]
public JoinDataComplete MicGain = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Mic Gain dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("MicGainScaled")]
public JoinDataComplete MicGainScaled = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "Mic Gain 16bit Scaled Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
[JoinName("MicMuteOn")]
public JoinDataComplete MicMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Mic Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("MicMuteOff")]
public JoinDataComplete MicMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "Mic Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("MicGainScaledSend")]
public JoinDataComplete MicGainScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "Mic Gain Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("MicName")]
public JoinDataComplete MicName = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Mic Name Get", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// Constructor to use when instantiating this Join Map without inheriting from it
/// </summary>
/// <param name="joinStart">Join this join map will start at</param>
public DmpsMicrophoneControllerJoinMap(uint joinStart)
: this(joinStart, typeof(DmpsMicrophoneControllerJoinMap))
{
}
/// <summary>
/// Constructor to use when extending this Join map
/// </summary>
/// <param name="joinStart">Join this join map will start at</param>
/// <param name="type">Type of the child join map</param>
protected DmpsMicrophoneControllerJoinMap(uint joinStart, Type type)
: base(joinStart, type)
{
}
}
}

View File

@@ -4,6 +4,10 @@ namespace PepperDash.Essentials.Core.Bridges
{
public class DmpsRoutingControllerJoinMap : JoinMapBaseAdvanced
{
[JoinName("EnableRouting")]
public JoinDataComplete EnableRouting = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "DMPS Enable Audio and Video Routing", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("SystemPowerOn")]
public JoinDataComplete SystemPowerOn = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 },
new JoinMetadata { Description = "DMPS System Power On Get/Set", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
@@ -12,6 +16,14 @@ namespace PepperDash.Essentials.Core.Bridges
public JoinDataComplete SystemPowerOff = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 },
new JoinMetadata { Description = "DMPS System Power Off Get/Set", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("FrontPanelLockOn")]
public JoinDataComplete FrontPanelLockOn = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 },
new JoinMetadata { Description = "DMPS Front Panel Lock On Get/Set", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("FrontPanelLockOff")]
public JoinDataComplete FrontPanelLockOff = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 },
new JoinMetadata { Description = "DMPS Front Panel Lock Off Get/Set", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("VideoSyncStatus")]
public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 32 },
new JoinMetadata { Description = "DM Input Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
@@ -40,6 +52,44 @@ namespace PepperDash.Essentials.Core.Bridges
public JoinDataComplete OutputNames = new JoinDataComplete(new JoinData { JoinNumber = 301, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Output Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("InputVideoNames")]
public JoinDataComplete InputVideoNames =
new JoinDataComplete(new JoinData { JoinNumber = 501, JoinSpan = 32 },
new JoinMetadata
{
Description = "Video Input Name",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
[JoinName("InputAudioNames")]
public JoinDataComplete InputAudioNames =
new JoinDataComplete(new JoinData { JoinNumber = 701, JoinSpan = 32 },
new JoinMetadata
{
Description = "Audio Input Name",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
[JoinName("OutputVideoNames")]
public JoinDataComplete OutputVideoNames =
new JoinDataComplete(new JoinData { JoinNumber = 901, JoinSpan = 32 },
new JoinMetadata
{
Description = "Video Output Name",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
[JoinName("OutputAudioNames")]
public JoinDataComplete OutputAudioNames =
new JoinDataComplete(new JoinData { JoinNumber = 1101, JoinSpan = 32 },
new JoinMetadata
{
Description = "Audio Output Name",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
[JoinName("OutputCurrentVideoInputNames")]
public JoinDataComplete OutputCurrentVideoInputNames = new JoinDataComplete(new JoinData { JoinNumber = 2001, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Video Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });

View File

@@ -5,6 +5,9 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
{
public class GlsPartitionSensorJoinMap : JoinMapBaseAdvanced
{
#region Digital
[JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete(
new JoinData
@@ -19,20 +22,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
[JoinName("Name")]
public JoinDataComplete Name = new JoinDataComplete(
new JoinData
{
JoinNumber = 1,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Sensor Name",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
[JoinName("Enable")]
public JoinDataComplete Enable = new JoinDataComplete(
new JoinData
@@ -101,7 +91,11 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
Description = "Sensor Decrease Sensitivity",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
});
#endregion
#region Analog
[JoinName("Sensitivity")]
public JoinDataComplete Sensitivity = new JoinDataComplete(
@@ -117,6 +111,28 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Analog
});
#endregion
#region Serial
[JoinName("Name")]
public JoinDataComplete Name = new JoinDataComplete(
new JoinData
{
JoinNumber = 1,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Sensor Name",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
#endregion
/// <summary>
/// Constructor to use when instantiating this Join Map without inheriting from it
/// </summary>

View File

@@ -45,7 +45,7 @@ namespace PepperDash.Essentials.Core.Bridges
new JoinMetadata { Description = "Processor Last Boot", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("ProgramOffsetJoin")]
public JoinDataComplete ProgramOffsetJoin = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
public JoinDataComplete ProgramOffsetJoin = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 5 },
new JoinMetadata { Description = "All Program Data is offset between slots by 5 - First Joins Start at 11", JoinCapabilities = eJoinCapabilities.None, JoinType = eJoinType.None });
[JoinName("ProgramStart")]

View File

@@ -20,7 +20,21 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
[JoinName("1")]
[JoinName("SendDtmfToSpecificCallIndex")]
public JoinDataComplete SendDtmfToSpecificCallIndex = new JoinDataComplete(
new JoinData
{
JoinNumber = 10,
JoinSpan = 1
},
new JoinMetadata
{
Description = "If High, will send DTMF tones to the call set by SelectCall analog. If low sends DTMF tones to last connected call.",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("Dtmf1")]
public JoinDataComplete Dtmf1 = new JoinDataComplete(
new JoinData
{
@@ -34,7 +48,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
[JoinName("2")]
[JoinName("Dtmf2")]
public JoinDataComplete Dtmf2 = new JoinDataComplete(
new JoinData
{
@@ -48,7 +62,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
[JoinName("3")]
[JoinName("Dtmf3")]
public JoinDataComplete Dtmf3 = new JoinDataComplete(
new JoinData
{
@@ -62,7 +76,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
[JoinName("4")]
[JoinName("Dtmf4")]
public JoinDataComplete Dtmf4 = new JoinDataComplete(
new JoinData
{
@@ -76,7 +90,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
[JoinName("5")]
[JoinName("Dtmf5")]
public JoinDataComplete Dtmf5 = new JoinDataComplete(
new JoinData
{
@@ -90,7 +104,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
[JoinName("6")]
[JoinName("Dtmf6")]
public JoinDataComplete Dtmf6 = new JoinDataComplete(
new JoinData
{
@@ -104,7 +118,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
[JoinName("7")]
[JoinName("Dtmf7")]
public JoinDataComplete Dtmf7 = new JoinDataComplete(
new JoinData
{
@@ -118,7 +132,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
[JoinName("8")]
[JoinName("Dtmf8")]
public JoinDataComplete Dtmf8 = new JoinDataComplete(
new JoinData
{
@@ -132,7 +146,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
[JoinName("9")]
[JoinName("Dtmf9")]
public JoinDataComplete Dtmf9 = new JoinDataComplete(
new JoinData
{
@@ -146,7 +160,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
[JoinName("0")]
[JoinName("Dtmf0")]
public JoinDataComplete Dtmf0 = new JoinDataComplete(
new JoinData
{
@@ -160,7 +174,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
[JoinName("*")]
[JoinName("DtmfStar")]
public JoinDataComplete DtmfStar = new JoinDataComplete(
new JoinData
{
@@ -174,7 +188,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
[JoinName("#")]
[JoinName("DtmfPound")]
public JoinDataComplete DtmfPound = new JoinDataComplete(
new JoinData
{
@@ -188,8 +202,8 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
[JoinName("EndCall")]
public JoinDataComplete EndCall = new JoinDataComplete(
[JoinName("EndAllCalls")]
public JoinDataComplete EndAllCalls = new JoinDataComplete(
new JoinData
{
JoinNumber = 24,
@@ -197,7 +211,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
},
new JoinMetadata
{
Description = "Hang Up",
Description = "End All Calls",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
@@ -226,7 +240,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
new JoinMetadata
{
Description = "Speed Dial",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
@@ -281,12 +295,12 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
},
new JoinMetadata
{
Description = "Dial manual string",
Description = "Dial manual string specified by CurrentDialString serial join",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("DialPhoneCall")]
[JoinName("DialPhone")]
public JoinDataComplete DialPhone = new JoinDataComplete(
new JoinData
{
@@ -314,7 +328,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
[JoinName("EndPhoneCall")]
[JoinName("HangUpPhone")]
public JoinDataComplete HangUpPhone = new JoinDataComplete(
new JoinData
{
@@ -323,11 +337,53 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
},
new JoinMetadata
{
Description = "Hang Up PHone",
Description = "Hang Up Phone",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("EndCallStart")]
public JoinDataComplete EndCallStart = new JoinDataComplete(
new JoinData
{
JoinNumber = 81,
JoinSpan = 8
},
new JoinMetadata
{
Description = "End a specific call by call index. ",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("JoinAllCalls")]
public JoinDataComplete JoinAllCalls = new JoinDataComplete(
new JoinData
{
JoinNumber = 90,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Join all calls",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("JoinCallStart")]
public JoinDataComplete JoinCallStart = new JoinDataComplete(
new JoinData
{
JoinNumber = 91,
JoinSpan = 8
},
new JoinMetadata
{
Description = "Join a specific call by call index. ",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("DirectorySearchBusy")]
public JoinDataComplete DirectorySearchBusy = new JoinDataComplete(
new JoinData
@@ -408,7 +464,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
new JoinMetadata
{
Description = "Go to Directory Root",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
@@ -440,6 +496,33 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
[JoinName("DirectoryDisableAutoDialSelectedLine")]
public JoinDataComplete DirectoryDisableAutoDialSelectedLine = new JoinDataComplete(
new JoinData
{
JoinNumber = 107,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Set high to disable automatic dialing of a contact when selected",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("DirectoryDialSelectedContactMethod")]
public JoinDataComplete DirectoryDialSelectedContactMethod = new JoinDataComplete(
new JoinData
{
JoinNumber = 108,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Pulse to dial the selected contact method",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("CameraTiltUp")]
public JoinDataComplete CameraTiltUp = new JoinDataComplete(
@@ -525,6 +608,48 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
[JoinName("CameraFocusNear")]
public JoinDataComplete CameraFocusNear = new JoinDataComplete(
new JoinData
{
JoinNumber = 117,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Camera Focus Near",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("CameraFocusFar")]
public JoinDataComplete CameraFocusFar = new JoinDataComplete(
new JoinData
{
JoinNumber = 118,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Camera Focus Far",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("CameraFocusAuto")]
public JoinDataComplete CameraFocusAuto = new JoinDataComplete(
new JoinData
{
JoinNumber = 119,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Camera Auto Focus Trigger",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("CameraPresetSave")]
public JoinDataComplete CameraPresetSave = new JoinDataComplete(
new JoinData
@@ -534,7 +659,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
},
new JoinMetadata
{
Description = "Save Selected Preset",
Description = "Pulse to save selected preset spcified by CameraPresetSelect analog join. FB will pulse for 3s when preset saved.",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Digital
});
@@ -548,7 +673,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
},
new JoinMetadata
{
Description = "Camera Mode Auto",
Description = "Camera Mode Auto. Enables camera auto tracking mode, with feedback",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Digital
});
@@ -562,7 +687,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
},
new JoinMetadata
{
Description = "Camera Mode Manual",
Description = "Camera Mode Manual. Disables camera auto tracking mode, with feedback",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Digital
});
@@ -576,7 +701,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
},
new JoinMetadata
{
Description = "Camera Mode Off",
Description = "Camera Mode Off. Disables camera video, with feedback. Works like video mute.",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Digital
});
@@ -805,6 +930,34 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
[JoinName("RemoveSelectedRecentCallItem")]
public JoinDataComplete RemoveSelectedRecentCallItem = new JoinDataComplete(
new JoinData
{
JoinNumber = 181,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Pulse to remove the selected recent call item specified by the SelectRecentCallItem analog join",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("DialSelectedRecentCallItem")]
public JoinDataComplete DialSelectedRecentCallItem = new JoinDataComplete(
new JoinData
{
JoinNumber = 182,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Pulse to dial the selected recent call item specified by the SelectRecentCallItem analog join",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("SourceShareStart")]
public JoinDataComplete SourceShareStart = new JoinDataComplete(
new JoinData
@@ -870,11 +1023,81 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
},
new JoinMetadata
{
Description = "advance selfview position",
Description = "Toggles selfview position",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("HoldAllCalls")]
public JoinDataComplete HoldAllCalls = new JoinDataComplete(
new JoinData
{
JoinNumber = 220,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Holds all calls",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("HoldCallsStart")]
public JoinDataComplete HoldCallsStart = new JoinDataComplete(
new JoinData
{
JoinNumber = 221,
JoinSpan = 8
},
new JoinMetadata
{
Description = "Holds Call at specified index. FB reported on Call Status XSIG",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("ResumeCallsStart")]
public JoinDataComplete ResumeCallsStart = new JoinDataComplete(
new JoinData
{
JoinNumber = 231,
JoinSpan = 8
},
new JoinMetadata
{
Description = "Resume Call at specified index",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("MultiSiteOptionIsEnabled")]
public JoinDataComplete MultiSiteOptionIsEnabled = new JoinDataComplete(
new JoinData
{
JoinNumber = 301,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Multi site option is enabled FB",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("AutoAnswerEnabled")]
public JoinDataComplete AutoAnswerEnabled = new JoinDataComplete(
new JoinData
{
JoinNumber = 302,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Auto Answer is enabled FB",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("ParticipantAudioMuteToggleStart")]
public JoinDataComplete ParticipantAudioMuteToggleStart = new JoinDataComplete(
new JoinData
@@ -922,7 +1145,51 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
#region Analog
#region Analog
// TODO [ ] hotfix/videocodecbase-max-meeting-xsig-set
[JoinName("MeetingsToDisplay")]
public JoinDataComplete MeetingsToDisplay = new JoinDataComplete(
new JoinData
{
JoinNumber = 40,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Set/FB the number of meetings to display via the bridge xsig; default: 3 meetings.",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Analog
});
[JoinName("SelectCall")]
public JoinDataComplete SelectCall = new JoinDataComplete(
new JoinData
{
JoinNumber = 24,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Sets the selected Call for DTMF commands. Valid values 1-8",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Analog
});
[JoinName("ConnectedCallCount")]
public JoinDataComplete ConnectedCallCount = new JoinDataComplete(
new JoinData
{
JoinNumber = 25,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Reports the number of currently connected calls",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Analog
});
[JoinName("MinutesBeforeMeetingStart")]
public JoinDataComplete MinutesBeforeMeetingStart = new JoinDataComplete(
@@ -947,11 +1214,25 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
},
new JoinMetadata
{
Description = "Camera Number Select/FB",
Description = "Camera Number Select/FB. 1 based index. Valid range is 1 to the value reported by CameraCount.",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Analog
});
[JoinName("CameraCount")]
public JoinDataComplete CameraCount = new JoinDataComplete(
new JoinData
{
JoinNumber = 61,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Reports the number of cameras",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Analog
});
[JoinName("DirectoryRowCount")]
public JoinDataComplete DirectoryRowCount = new JoinDataComplete(
new JoinData
@@ -980,6 +1261,34 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Analog
});
[JoinName("SelectedContactMethodCount")]
public JoinDataComplete SelectedContactMethodCount = new JoinDataComplete(
new JoinData
{
JoinNumber = 102,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Reports the number of contact methods for the selected contact",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Analog
});
[JoinName("SelectContactMethod")]
public JoinDataComplete SelectContactMethod = new JoinDataComplete(
new JoinData
{
JoinNumber = 103,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Selects a contact method by index",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Analog
});
[JoinName("CameraPresetSelect")]
public JoinDataComplete CameraPresetSelect = new JoinDataComplete(
new JoinData
@@ -990,10 +1299,24 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
new JoinMetadata
{
Description = "Camera Preset Select",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Analog
});
[JoinName("FarEndPresetSelect")]
public JoinDataComplete FarEndPresetSelect = new JoinDataComplete(
new JoinData
{
JoinNumber = 122,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Far End Preset Preset Select",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Analog
});
[JoinName("ParticipantCount")]
public JoinDataComplete ParticipantCount = new JoinDataComplete(
new JoinData
@@ -1036,6 +1359,48 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Analog
});
[JoinName("SelectRecentCallItem")]
public JoinDataComplete SelectRecentCallItem = new JoinDataComplete(
new JoinData
{
JoinNumber = 180,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Select/FB for Recent Call Item. Valid values 1 - 10",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Analog
});
[JoinName("RecentCallOccurrenceType")]
public JoinDataComplete RecentCallOccurrenceType = new JoinDataComplete(
new JoinData
{
JoinNumber = 181,
JoinSpan = 10
},
new JoinMetadata
{
Description = "Recent Call Occurrence Type. [0-3] 0 = Unknown, 1 = Placed, 2 = Received, 3 = NoAnswer",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Analog
});
[JoinName("RecentCallCount")]
public JoinDataComplete RecentCallCount = new JoinDataComplete(
new JoinData
{
JoinNumber = 191,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Recent Call Count",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Analog
});
#endregion
@@ -1051,12 +1416,12 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
},
new JoinMetadata
{
Description = "Current Dial String",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
Description = "Value to dial when ManualDial digital join is pulsed",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
[JoinName("PhoneString")]
[JoinName("PhoneDialString")]
public JoinDataComplete PhoneDialString = new JoinDataComplete(
new JoinData
{
@@ -1070,7 +1435,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Serial
});
[JoinName("CurrentCallName")]
[JoinName("CurrentCallData")]
public JoinDataComplete CurrentCallData = new JoinDataComplete(
new JoinData
{
@@ -1169,6 +1534,20 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Serial
});
[JoinName("ContactMethods")]
public JoinDataComplete ContactMethods = new JoinDataComplete(
new JoinData
{
JoinNumber = 103,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Contact Methods - XSig, 10 entries",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
[JoinName("CameraPresetNames")]
public JoinDataComplete CameraPresetNames = new JoinDataComplete(
new JoinData
@@ -1183,8 +1562,8 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Serial
});
[JoinName("CameraLayoutStringFb")]
public JoinDataComplete CameraLayoutStringFb = new JoinDataComplete(
[JoinName("CurrentLayoutStringFb")]
public JoinDataComplete CurrentLayoutStringFb = new JoinDataComplete(
new JoinData
{
JoinNumber = 141,
@@ -1211,6 +1590,76 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Serial
});
[JoinName("CameraNamesFb")]
public JoinDataComplete CameraNamesFb = new JoinDataComplete(
new JoinData
{
JoinNumber = 161,
JoinSpan = 10
},
new JoinMetadata
{
Description = "Camera Name Fb",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
[JoinName("SelectedRecentCallName")]
public JoinDataComplete SelectedRecentCallName = new JoinDataComplete(
new JoinData
{
JoinNumber = 171,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Selected Recent Call Name",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
[JoinName("SelectedRecentCallNumber")]
public JoinDataComplete SelectedRecentCallNumber = new JoinDataComplete(
new JoinData
{
JoinNumber = 172,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Selected Recent Call Number",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
[JoinName("RecentCallNamesStart")]
public JoinDataComplete RecentCallNamesStart = new JoinDataComplete(
new JoinData
{
JoinNumber = 181,
JoinSpan = 10
},
new JoinMetadata
{
Description = "Recent Call Names",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
[JoinName("RecentCallTimesStart")]
public JoinDataComplete RecentCallTimesStart = new JoinDataComplete(
new JoinData
{
JoinNumber = 191,
JoinSpan = 10
},
new JoinMetadata
{
Description = "Recent Calls Times",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
[JoinName("CurrentSource")]
public JoinDataComplete CurrentSource = new JoinDataComplete(
new JoinData
@@ -1237,7 +1686,77 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
Description = "advance selfview position",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
});
[JoinName("DeviceIpAddresss")]
public JoinDataComplete DeviceIpAddresss = new JoinDataComplete(
new JoinData
{
JoinNumber = 301,
JoinSpan = 1
},
new JoinMetadata
{
Description = "IP Address of device",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
[JoinName("SipPhoneNumber")]
public JoinDataComplete SipPhoneNumber = new JoinDataComplete(
new JoinData
{
JoinNumber = 302,
JoinSpan = 1
},
new JoinMetadata
{
Description = "SIP phone number of device",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
[JoinName("E164Alias")]
public JoinDataComplete E164Alias = new JoinDataComplete(
new JoinData
{
JoinNumber = 303,
JoinSpan = 1
},
new JoinMetadata
{
Description = "E164 alias of device",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
[JoinName("H323Id")]
public JoinDataComplete H323Id = new JoinDataComplete(
new JoinData
{
JoinNumber = 304,
JoinSpan = 1
},
new JoinMetadata
{
Description = "H323 ID of device",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
[JoinName("SipUri")]
public JoinDataComplete SipUri = new JoinDataComplete(
new JoinData
{
JoinNumber = 305,
JoinSpan = 1
},
new JoinMetadata
{
Description = "SIP URI of device",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
[JoinName("DirectoryEntrySelectedName")]
public JoinDataComplete DirectoryEntrySelectedName = new JoinDataComplete(

View File

@@ -0,0 +1,77 @@
using System.Collections.Generic;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.GeneralIO;
using PepperDash.Core;
using PepperDash.Essentials.Core.Config;
namespace PepperDash.Essentials.Core
{
/// <summary>
/// Wrapper class for CEN-IO-RY-104 relay module
/// </summary>
[Description("Wrapper class for the CEN-IO-RY-104 relay module")]
public class CenIoRy104Controller : EssentialsDevice, IRelayPorts
{
private readonly CenIoRy104 _ry104;
/// <summary>
/// Constructor
/// </summary>
/// <param name="key"></param>
/// <param name="name"></param>
/// <param name="ry104"></param>
public CenIoRy104Controller(string key, string name, CenIoRy104 ry104)
: base(key, name)
{
_ry104 = ry104;
}
/// <summary>
/// Relay port collection
/// </summary>
public CrestronCollection<Relay> RelayPorts
{
get { return _ry104.RelayPorts; }
}
/// <summary>
/// Number of relay ports property
/// </summary>
public int NumberOfRelayPorts
{
get { return _ry104.NumberOfRelayPorts; }
}
}
/// <summary>
/// CEN-IO-RY Controller factory
/// </summary>
public class CenIoRy104ControllerFactory : EssentialsDeviceFactory<CenIoRy104Controller>
{
/// <summary>
/// Constructor
/// </summary>
public CenIoRy104ControllerFactory()
{
TypeNames = new List<string>() { "ceniory104" };
}
public override EssentialsDevice BuildDevice(DeviceConfig dc)
{
Debug.Console(1, "Factory Attempting to create a new CEN-IO-RY-104 Device");
var controlPropertiesConfig = CommFactory.GetControlPropertiesConfig(dc);
if (controlPropertiesConfig == null)
{
Debug.Console(1, "Factory failed to create a new CEN-IO-RY-104 Device");
return null;
}
var ipid = controlPropertiesConfig.IpIdInt;
if (ipid != 0) return new CenIoRy104Controller(dc.Key, dc.Name, new CenIoRy104(ipid, Global.ControlSystem));
Debug.Console(1, "Factory failed to create a new CEN-IO-RY-104 Device using IP-ID-{0}", ipid);
return null;
}
}
}

View File

@@ -44,6 +44,12 @@ namespace PepperDash.Essentials.Core.CrestronIO
{
RelayOutput = postActivationFunc(config);
if (RelayOutput == null)
{
Debug.Console(0, this, Debug.ErrorLogLevel.Error, "Unable to get parent relay device for device key {0} and port {1}", config.PortDeviceKey, config.PortNumber);
return;
}
RelayOutput.Register();
RelayOutput.StateChange += RelayOutput_StateChange;
@@ -61,33 +67,36 @@ namespace PepperDash.Essentials.Core.CrestronIO
{
if (!Global.ControlSystem.SupportsRelay)
{
Debug.Console(0, "GetRelayDevice: Processor does not support relays");
Debug.Console(0, "Processor does not support relays");
return null;
}
relayDevice = Global.ControlSystem;
return relayDevice.RelayPorts[dc.PortNumber];
}
else
var essentialsDevice = DeviceManager.GetDeviceForKey(dc.PortDeviceKey);
if (essentialsDevice == null)
{
var relayDev = DeviceManager.GetDeviceForKey(dc.PortDeviceKey) as IRelayPorts;
if (relayDev == null)
{
Debug.Console(0, "GetRelayDevice: Device {0} is not a valid device", dc.PortDeviceKey);
return null;
}
relayDevice = relayDev;
}
if (relayDevice == null)
{
Debug.Console(0, "GetRelayDevice: Device '0' is not a valid IRelayPorts Device", dc.PortDeviceKey);
Debug.Console(0, "Device {0} was not found in Device Manager. Check configuration or for errors with device.", dc.PortDeviceKey);
return null;
}
if (dc.PortNumber > relayDevice.NumberOfRelayPorts)
{
Debug.Console(0, "GetRelayDevice: Device {0} does not contain a port {1}", dc.PortDeviceKey, dc.PortNumber);
}
relayDevice = essentialsDevice as IRelayPorts;
return relayDevice.RelayPorts[dc.PortNumber];
if (relayDevice == null)
{
Debug.Console(0, "Device {0} is not a valid relay parent. Please check configuration.", dc.PortDeviceKey);
return null;
}
if (dc.PortNumber <= relayDevice.NumberOfRelayPorts)
{
return relayDevice.RelayPorts[dc.PortNumber];
}
Debug.Console(0, "Device {0} does not contain a port {1}", dc.PortDeviceKey, dc.PortNumber);
return null;
}
#endregion
@@ -200,58 +209,6 @@ namespace PepperDash.Essentials.Core.CrestronIO
var portDevice = new GenericRelayDevice(dc.Key, dc.Name, GetRelay, props);
return portDevice;
/*
if (props.PortDeviceKey == "processor")
portDevice = Global.ControlSystem as IRelayPorts;
else
portDevice = DeviceManager.GetDeviceForKey(props.PortDeviceKey) as IRelayPorts;
if (portDevice == null)
Debug.Console(0, "Unable to add relay device with key '{0}'. Port Device does not support relays", key);
else
{
var cs = (portDevice as CrestronControlSystem);
if (cs != null)
{
// The relay is on a control system processor
if (!cs.SupportsRelay || props.PortNumber > cs.NumberOfRelayPorts)
{
Debug.Console(0, "Port Device: {0} does not support relays or does not have enough relays");
return null;
}
}
else
{
// The relay is on another device type
if (props.PortNumber > portDevice.NumberOfRelayPorts)
{
Debug.Console(0, "Port Device: {0} does not have enough relays");
return null;
}
}
Relay relay = portDevice.RelayPorts[props.PortNumber];
if (!relay.Registered)
{
if (relay.Register() == eDeviceRegistrationUnRegistrationResponse.Success)
return new GenericRelayDevice(key, relay);
else
Debug.Console(0, "Attempt to register relay {0} on device with key '{1}' failed.", props.PortNumber, props.PortDeviceKey);
}
else
{
return new GenericRelayDevice(key, relay);
}
// Future: Check if portDevice is 3-series card or other non control system that supports versiports
}
*/
}
}

View File

@@ -8,7 +8,7 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
/// </summary>
public interface IMobileControl : IKeyed
{
void CreateMobileControlRoomBridge(EssentialsRoomBase room, IMobileControl parent);
void CreateMobileControlRoomBridge(IEssentialsRoom room, IMobileControl parent);
void LinkSystemMonitorToAppServer();
}

View File

@@ -1,83 +1,83 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DeviceSupport;
using Newtonsoft.Json;
using PepperDash.Core;
using PepperDash.Essentials.Core.Bridges;
namespace PepperDash.Essentials.Core.Lighting
{
public abstract class LightingBase : EssentialsBridgeableDevice, ILightingScenes
{
#region ILightingScenes Members
public event EventHandler<LightingSceneChangeEventArgs> LightingSceneChange;
public List<LightingScene> LightingScenes { get; protected set; }
public LightingScene CurrentLightingScene { get; protected set; }
public IntFeedback CurrentLightingSceneFeedback { get; protected set; }
#endregion
protected LightingBase(string key, string name)
: base(key, name)
{
LightingScenes = new List<LightingScene>();
CurrentLightingScene = new LightingScene();
//CurrentLightingSceneFeedback = new IntFeedback(() => { return int.Parse(this.CurrentLightingScene.ID); });
}
public abstract void SelectScene(LightingScene scene);
public void SimulateSceneSelect(string sceneName)
{
Debug.Console(1, this, "Simulating selection of scene '{0}'", sceneName);
var scene = LightingScenes.FirstOrDefault(s => s.Name.Equals(sceneName));
if (scene != null)
{
CurrentLightingScene = scene;
OnLightingSceneChange();
}
}
/// <summary>
/// Sets the IsActive property on each scene and fires the LightingSceneChange event
/// </summary>
protected void OnLightingSceneChange()
{
foreach (var scene in LightingScenes)
{
if (scene == CurrentLightingScene)
scene.IsActive = true;
else
scene.IsActive = false;
}
var handler = LightingSceneChange;
if (handler != null)
{
handler(this, new LightingSceneChangeEventArgs(CurrentLightingScene));
}
}
protected GenericLightingJoinMap LinkLightingToApi(LightingBase lightingDevice, BasicTriList trilist, uint joinStart,
string joinMapKey, EiscApiAdvanced bridge)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DeviceSupport;
using Newtonsoft.Json;
using PepperDash.Core;
using PepperDash.Essentials.Core.Bridges;
namespace PepperDash.Essentials.Core.Lighting
{
public abstract class LightingBase : EssentialsBridgeableDevice, ILightingScenes
{
#region ILightingScenes Members
public event EventHandler<LightingSceneChangeEventArgs> LightingSceneChange;
public List<LightingScene> LightingScenes { get; protected set; }
public LightingScene CurrentLightingScene { get; protected set; }
public IntFeedback CurrentLightingSceneFeedback { get; protected set; }
#endregion
protected LightingBase(string key, string name)
: base(key, name)
{
var joinMap = new GenericLightingJoinMap(joinStart);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
LightingScenes = new List<LightingScene>();
CurrentLightingScene = new LightingScene();
//CurrentLightingSceneFeedback = new IntFeedback(() => { return int.Parse(this.CurrentLightingScene.ID); });
}
public abstract void SelectScene(LightingScene scene);
public void SimulateSceneSelect(string sceneName)
{
Debug.Console(1, this, "Simulating selection of scene '{0}'", sceneName);
var scene = LightingScenes.FirstOrDefault(s => s.Name.Equals(sceneName));
if (scene != null)
{
CurrentLightingScene = scene;
OnLightingSceneChange();
}
}
/// <summary>
/// Sets the IsActive property on each scene and fires the LightingSceneChange event
/// </summary>
protected void OnLightingSceneChange()
{
foreach (var scene in LightingScenes)
{
if (scene == CurrentLightingScene)
scene.IsActive = true;
else
scene.IsActive = false;
}
var handler = LightingSceneChange;
if (handler != null)
{
handler(this, new LightingSceneChangeEventArgs(CurrentLightingScene));
}
}
protected GenericLightingJoinMap LinkLightingToApi(LightingBase lightingDevice, BasicTriList trilist, uint joinStart,
string joinMapKey, EiscApiAdvanced bridge)
{
var joinMap = new GenericLightingJoinMap(joinStart);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<GenericLightingJoinMap>(joinMapSerialized);
if (bridge != null)
@@ -87,52 +87,57 @@ namespace PepperDash.Essentials.Core.Lighting
else
{
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
}
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
Debug.Console(0, "Linking to Lighting Type {0}", lightingDevice.GetType().Name.ToString());
}
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
Debug.Console(0, "Linking to Lighting Type {0}", lightingDevice.GetType().Name.ToString());
// GenericLighitng Actions & FeedBack
trilist.SetUShortSigAction(joinMap.SelectScene.JoinNumber, u => lightingDevice.SelectScene(lightingDevice.LightingScenes[u]));
var sceneIndex = 0;
foreach (var scene in lightingDevice.LightingScenes)
trilist.SetUShortSigAction(joinMap.SelectScene.JoinNumber, u => lightingDevice.SelectScene(lightingDevice.LightingScenes[u]));
var sceneIndex = 0;
foreach (var scene in lightingDevice.LightingScenes)
{
trilist.SetSigTrueAction((uint)(joinMap.SelectSceneDirect.JoinNumber + sceneIndex), () => lightingDevice.SelectScene(lightingDevice.LightingScenes[sceneIndex]));
trilist.SetSigTrueAction((uint)(joinMap.SelectSceneDirect.JoinNumber + sceneIndex), () => lightingDevice.SelectScene(lightingDevice.LightingScenes[sceneIndex]));
scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.SelectSceneDirect.JoinNumber + sceneIndex)]);
trilist.StringInput[(uint)(joinMap.SelectSceneDirect.JoinNumber + sceneIndex)].StringValue = scene.Name;
trilist.BooleanInput[(uint)(joinMap.ButtonVisibility.JoinNumber + sceneIndex)].BoolValue = true;
sceneIndex++;
}
return joinMap;
}
}
public class LightingScene
{
public string Name { get; set; }
public string ID { get; set; }
bool _IsActive;
public bool IsActive
{
get
{
return _IsActive;
}
set
{
_IsActive = value;
IsActiveFeedback.FireUpdate();
}
}
public BoolFeedback IsActiveFeedback { get; set; }
public LightingScene()
{
IsActiveFeedback = new BoolFeedback(new Func<bool>(() => IsActive));
}
}
trilist.StringInput[(uint)(joinMap.SelectSceneDirect.JoinNumber + sceneIndex)].StringValue = scene.Name;
trilist.BooleanInput[(uint)(joinMap.ButtonVisibility.JoinNumber + sceneIndex)].BoolValue = true;
sceneIndex++;
}
return joinMap;
}
}
public class LightingScene
{
[JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)]
public string Name { get; set; }
[JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)]
public string ID { get; set; }
bool _IsActive;
[JsonProperty("isActive", NullValueHandling = NullValueHandling.Ignore)]
public bool IsActive
{
get
{
return _IsActive;
}
set
{
_IsActive = value;
IsActiveFeedback.FireUpdate();
}
}
[JsonIgnore]
public BoolFeedback IsActiveFeedback { get; set; }
public LightingScene()
{
IsActiveFeedback = new BoolFeedback(new Func<bool>(() => IsActive));
}
}
}

View File

@@ -16,11 +16,28 @@ namespace PepperDash.Essentials.Core
/// <summary>
/// Used for monitoring comms that are IBasicCommunication. Will send a poll string and provide an event when
/// statuses change.
/// Default monitoring uses TextReceived event on Client.
/// </summary>
public class GenericCommunicationMonitor : StatusMonitorBase
{
public IBasicCommunication Client { get; private set; }
/// <summary>
/// Will monitor Client.BytesReceived if set to true. Otherwise the default is to monitor Client.TextReceived
/// </summary>
public bool MonitorBytesReceived { get; private set; }
/// <summary>
/// Return true if the Client is ISocketStatus
/// </summary>
public bool IsSocket
{
get
{
return Client is ISocketStatus;
}
}
long PollTime;
CTimer PollTimer;
string PollString;
@@ -46,8 +63,20 @@ namespace PepperDash.Essentials.Core
Client = client;
PollTime = pollTime;
PollString = pollString;
if (IsSocket)
{
(Client as ISocketStatus).ConnectionChange += new EventHandler<GenericSocketStatusChageEventArgs>(socket_ConnectionChange);
}
}
public GenericCommunicationMonitor(IKeyed parent, IBasicCommunication client, long pollTime,
long warningTime, long errorTime, string pollString, bool monitorBytesReceived) :
this(parent, client, pollTime, warningTime, errorTime, pollString)
{
SetMonitorBytesReceived(monitorBytesReceived);
}
/// <summary>
/// Poll is a provided action instead of string
/// </summary>
@@ -69,6 +98,19 @@ namespace PepperDash.Essentials.Core
Client = client;
PollTime = pollTime;
PollAction = pollAction;
if (IsSocket)
{
(Client as ISocketStatus).ConnectionChange += new EventHandler<GenericSocketStatusChageEventArgs>(socket_ConnectionChange);
}
}
public GenericCommunicationMonitor(IKeyed parent, IBasicCommunication client, long pollTime,
long warningTime, long errorTime, Action pollAction, bool monitorBytesReceived) :
this(parent, client, pollTime, warningTime, errorTime, pollAction)
{
SetMonitorBytesReceived(monitorBytesReceived);
}
@@ -79,23 +121,96 @@ namespace PepperDash.Essentials.Core
CommunicationMonitorConfig props) :
this(parent, client, props.PollInterval, props.TimeToWarning, props.TimeToError, props.PollString)
{
if (IsSocket)
{
(Client as ISocketStatus).ConnectionChange += new EventHandler<GenericSocketStatusChageEventArgs>(socket_ConnectionChange);
}
}
/// <summary>
/// Builds the monitor from a config object and takes a bool to specify whether to monitor BytesReceived
/// Default is to monitor TextReceived
/// </summary>
/// <param name="parent"></param>
/// <param name="client"></param>
/// <param name="props"></param>
/// <param name="monitorBytesReceived"></param>
public GenericCommunicationMonitor(IKeyed parent, IBasicCommunication client, CommunicationMonitorConfig props, bool monitorBytesReceived) :
this(parent, client, props.PollInterval, props.TimeToWarning, props.TimeToError, props.PollString)
{
SetMonitorBytesReceived(monitorBytesReceived);
}
void SetMonitorBytesReceived(bool monitorBytesReceived)
{
MonitorBytesReceived = monitorBytesReceived;
}
public override void Start()
{
Client.BytesReceived += Client_BytesReceived;
Poll();
PollTimer = new CTimer(o => Poll(), null, PollTime, PollTime);
if (MonitorBytesReceived)
{
Client.BytesReceived += Client_BytesReceived;
}
else
{
Client.TextReceived += Client_TextReceived;
}
if (!IsSocket)
{
BeginPolling();
}
}
void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e)
{
if (!e.Client.IsConnected)
{
// Immediately stop polling and notify that device is offline
Stop();
Status = MonitorStatus.InError;
ResetErrorTimers();
}
else
{
// Start polling and set status to unknow and let poll result update the status to IsOk when a response is received
Status = MonitorStatus.StatusUnknown;
Start();
BeginPolling();
}
}
void BeginPolling()
{
Poll();
PollTimer = new CTimer(o => Poll(), null, PollTime, PollTime);
}
public override void Stop()
{
Client.BytesReceived -= this.Client_BytesReceived;
PollTimer.Stop();
PollTimer = null;
StopErrorTimers();
if(MonitorBytesReceived)
{
Client.BytesReceived -= this.Client_BytesReceived;
}
else
{
Client.TextReceived -= Client_TextReceived;
}
if (PollTimer != null)
{
PollTimer.Stop();
PollTimer = null;
StopErrorTimers();
}
}
void Client_TextReceived(object sender, GenericCommMethodReceiveTextArgs e)
{
DataReceived();
}
/// <summary>
/// Upon any receipt of data, set everything to ok!
/// </summary>
@@ -103,10 +218,14 @@ namespace PepperDash.Essentials.Core
/// <param name="e"></param>
void Client_BytesReceived(object sender, GenericCommMethodReceiveBytesArgs e)
{
Status = MonitorStatus.IsOk;
ResetErrorTimers();
//
}
DataReceived();
}
void DataReceived()
{
Status = MonitorStatus.IsOk;
ResetErrorTimers();
}
void Poll()
{
@@ -124,19 +243,6 @@ namespace PepperDash.Essentials.Core
Debug.Console(2, this, "Comm not connected");
}
}
/// <summary>
/// When the client connects, and we're waiting for it, respond and disconect from event
/// </summary>
void OneTimeConnectHandler(object o, EventArgs a)
{
if (Client.IsConnected)
{
//Client.IsConnected -= OneTimeConnectHandler;
Debug.Console(2, this, "Comm connected");
Poll();
}
}
}

View File

@@ -301,7 +301,7 @@ namespace PepperDash.Essentials.Core.Monitoring
p.Value.AggregatedProgramInfoFeedback.LinkInputSig(
trilist.StringInput[programSlotJoinStart + joinMap.AggregatedProgramInfo.JoinNumber]);
programSlotJoinStart = programSlotJoinStart + joinMap.ProgramOffsetJoin.JoinNumber;
programSlotJoinStart = programSlotJoinStart + joinMap.ProgramOffsetJoin.JoinSpan;
}
}

View File

@@ -1,4 +1,5 @@
using Crestron.SimplSharpPro;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharpPro.GeneralIO;
using Newtonsoft.Json;
@@ -9,15 +10,18 @@ using PepperDash.Essentials.Core.Bridges.JoinMaps;
using System;
using System.Collections.Generic;
using PepperDash.Essentials.Core.Config;
using PepperDash_Essentials_Core.PartitionSensor;
namespace PepperDash.Essentials.Core
{
[Description("Wrapper class for GLS Cresnet Partition Sensor")]
public class GlsPartitionSensorController : CrestronGenericBridgeableBaseDevice, IPartitionStateProvider
{
private GlsPartCn _partitionSensor;
public StringFeedback NameFeedback { get; private set; }
public GlsPartitionSensorPropertiesConfig PropertiesConfig { get; private set; }
private GlsPartCn _partitionSensor;
public BoolFeedback EnableFeedback { get; private set; }
public BoolFeedback PartitionPresentFeedback { get; private set; }
public BoolFeedback PartitionNotSensedFeedback { get; private set; }
@@ -32,23 +36,71 @@ namespace PepperDash.Essentials.Core
public GlsPartitionSensorController(string key, Func<DeviceConfig, GlsPartCn> preActivationFunc, DeviceConfig config)
: base(key, config.Name)
{
var props = config.Properties.ToObject<GlsPartitionSensorPropertiesConfig>();
if (props != null)
{
PropertiesConfig = props;
}
else
{
Debug.Console(1, this, "props are null. Unable to deserialize into GlsPartSensorPropertiesConfig");
}
AddPreActivationAction(() =>
{
_partitionSensor = preActivationFunc(config);
RegisterCrestronGenericBase(_partitionSensor);
NameFeedback = new StringFeedback(() => Name);
EnableFeedback = new BoolFeedback(() => InTestMode ? TestEnableFeedback : _partitionSensor.EnableFeedback.BoolValue);
PartitionPresentFeedback = new BoolFeedback(() => InTestMode ? TestPartitionSensedFeedback : _partitionSensor.PartitionSensedFeedback.BoolValue);
PartitionNotSensedFeedback = new BoolFeedback(() => InTestMode ? !TestPartitionSensedFeedback : _partitionSensor.PartitionNotSensedFeedback.BoolValue);
SensitivityFeedback = new IntFeedback(() => InTestMode ? TestSensitivityFeedback : _partitionSensor.SensitivityFeedback.UShortValue);
if (_partitionSensor != null) _partitionSensor.BaseEvent += PartitionSensor_BaseEvent;
if (_partitionSensor != null)
{
_partitionSensor.BaseEvent += PartitionSensor_BaseEvent;
}
});
}
private void PartitionSensor_BaseEvent(GenericBase device, BaseEventArgs args)
AddPostActivationAction(() =>
{
_partitionSensor.OnlineStatusChange += (o, a) =>
{
if (a.DeviceOnLine)
{
ApplySettingsToSensorFromConfig();
}
};
if (_partitionSensor.IsOnline)
{
ApplySettingsToSensorFromConfig();
}
});
}
private void ApplySettingsToSensorFromConfig()
{
if (_partitionSensor.IsOnline == false) return;
Debug.Console(1, this, "Attempting to apply settings to sensor from config");
if (PropertiesConfig.Sensitivity != null)
{
Debug.Console(1, this, "Sensitivity found, attempting to set value '{0}' from config",
PropertiesConfig.Sensitivity);
_partitionSensor.Sensitivity.UShortValue = (ushort) PropertiesConfig.Sensitivity;
}
else
{
Debug.Console(1, this, "Sensitivity null, no value specified in config");
}
}
private void PartitionSensor_BaseEvent(GenericBase device, BaseEventArgs args)
{
Debug.Console(2, this, "EventId: {0}, Index: {1}", args.EventId, args.Index);
@@ -61,11 +113,13 @@ namespace PepperDash.Essentials.Core
}
case (GlsPartCn.PartitionSensedFeedbackEventId):
{
Debug.Console(1, this, "Partition Sensed State: {0}", _partitionSensor.PartitionSensedFeedback.BoolValue);
PartitionPresentFeedback.FireUpdate();
break;
}
case (GlsPartCn.PartitionNotSensedFeedbackEventId):
{
Debug.Console(1, this, "Partition Not Sensed State: {0}", _partitionSensor.PartitionNotSensedFeedback.BoolValue);
PartitionNotSensedFeedback.FireUpdate();
break;
}
@@ -73,7 +127,7 @@ namespace PepperDash.Essentials.Core
{
SensitivityFeedback.FireUpdate();
break;
}
}
default:
{
Debug.Console(2, this, "Unhandled args.EventId: {0}", args.EventId);
@@ -133,7 +187,22 @@ namespace PepperDash.Essentials.Core
Debug.Console(1, this, "InTestMode: {0}, unable to set sensitivity value: {1}", InTestMode.ToString(), value);
}
public void SetEnableState(bool state)
public void GetSettings()
{
var dash = new string('*', 50);
CrestronConsole.PrintLine(string.Format("{0}\n", dash));
Debug.Console(0, this, "Enabled State: {0}", _partitionSensor.EnableFeedback.BoolValue);
Debug.Console(0, this, "Partition Sensed State: {0}", _partitionSensor.PartitionSensedFeedback.BoolValue);
Debug.Console(0, this, "Partition Not Sensed State: {0}", _partitionSensor.PartitionNotSensedFeedback.BoolValue);
Debug.Console(0, this, "Sensitivity Value: {0}", _partitionSensor.SensitivityFeedback.UShortValue);
CrestronConsole.PrintLine(string.Format("{0}\n", dash));
}
public void SetEnableState(bool state)
{
Debug.Console(2, this, "Sensor is {0}, SetEnableState: {1}", _partitionSensor == null ? "null" : "not null", state);
if (_partitionSensor == null)
@@ -189,18 +258,20 @@ namespace PepperDash.Essentials.Core
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
Debug.Console(0, this, "Linking to Bridge Type {0}", GetType().Name);
// link input from simpl
IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
trilist.StringInput[joinMap.Name.JoinNumber].StringValue = _partitionSensor.Name;
trilist.SetBoolSigAction(joinMap.Enable.JoinNumber, SetEnableState);
EnableFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Enable.JoinNumber]);
PartitionPresentFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PartitionSensed.JoinNumber]);
PartitionNotSensedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PartitionNotSensed.JoinNumber]);
trilist.SetSigTrueAction(joinMap.IncreaseSensitivity.JoinNumber, IncreaseSensitivity);
trilist.SetSigTrueAction(joinMap.DecreaseSensitivity.JoinNumber, DecreaseSensitivity);
trilist.SetUShortSigAction(joinMap.Sensitivity.JoinNumber, SetSensitivity);
// link output to simpl
IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
EnableFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Enable.JoinNumber]);
PartitionPresentFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PartitionSensed.JoinNumber]);
PartitionNotSensedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PartitionNotSensed.JoinNumber]);
SensitivityFeedback.LinkInputSig(trilist.UShortInput[joinMap.Sensitivity.JoinNumber]);
SensitivityFeedback.LinkInputSig(trilist.UShortInput[joinMap.Sensitivity.JoinNumber]);
trilist.SetUShortSigAction(joinMap.Sensitivity.JoinNumber, SetSensitivity);
FeedbacksFireUpdates();
@@ -218,6 +289,7 @@ namespace PepperDash.Essentials.Core
{
if (a.DeviceOnLine)
{
trilist.StringInput[joinMap.Name.JoinNumber].StringValue = _partitionSensor.Name;
FeedbacksFireUpdates();
}
};
@@ -225,8 +297,7 @@ namespace PepperDash.Essentials.Core
private void FeedbacksFireUpdates()
{
IsOnline.FireUpdate();
NameFeedback.FireUpdate();
IsOnline.FireUpdate();
EnableFeedback.FireUpdate();
PartitionPresentFeedback.FireUpdate();
PartitionNotSensedFeedback.FireUpdate();

View File

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Newtonsoft.Json;
namespace PepperDash_Essentials_Core.PartitionSensor
{
public class GlsPartitionSensorPropertiesConfig
{
/// <summary>
/// Sets the sensor sensitivity
/// </summary>
/// <remarks>
/// The sensitivity range shall be between 1(lowest) to 10 (highest).
/// </remarks>
[JsonProperty("sensitivity")]
public ushort? Sensitivity { get; set; }
}
}

View File

@@ -131,6 +131,7 @@
<Compile Include="Bridges\JoinMaps\DmBladeChassisControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DmChassisControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DmpsAudioOutputControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DmpsMicrophoneControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DmpsRoutingControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DmRmcControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DmTxControllerJoinMap.cs" />
@@ -182,6 +183,7 @@
<Compile Include="Crestron IO\Inputs\GenericVersiportInputDevice.cs" />
<Compile Include="Crestron IO\Inputs\IDigitalInput.cs" />
<Compile Include="Crestron IO\IOPortConfig.cs" />
<Compile Include="Crestron IO\Relay\CenIoRy104Controller.cs" />
<Compile Include="Crestron IO\Relay\GenericRelayDevice.cs" />
<Compile Include="Crestron IO\Relay\ISwitchedOutput.cs" />
<Compile Include="Crestron IO\StatusSign\StatusSignController.cs" />
@@ -236,6 +238,7 @@
<Compile Include="Occupancy\GlsOccupancySensorPropertiesConfig.cs" />
<Compile Include="Occupancy\GlsOirOccupancySensorController.cs" />
<Compile Include="PartitionSensor\EssentialsPartitionController.cs" />
<Compile Include="PartitionSensor\GlsPartitionSensorPropertiesConfig.cs" />
<Compile Include="PartitionSensor\IPartitionStateProvider.cs" />
<Compile Include="Occupancy\OccupancyAggregatorConfig.cs" />
<Compile Include="Queues\ComsMessage.cs" />

View File

@@ -118,7 +118,7 @@ namespace PepperDash.Essentials.Core.Queues
/// <param name="capacity"></param>
public GenericQueue(string key, int pacing, Thread.eThreadPriority priority, int capacity)
: this(key, priority, capacity, pacing)
{
{
}
/// <summary>
@@ -139,7 +139,8 @@ namespace PepperDash.Essentials.Core.Queues
_queue = new CrestronQueue<IQueueMessage>(cap);
_worker = new Thread(ProcessQueue, null, Thread.eThreadStartOptions.Running)
{
Priority = priority
Priority = priority,
Name = _key
};
SetDelayValues(pacing);

View File

@@ -54,13 +54,20 @@ namespace PepperDash.Essentials.Core
SetupPartitionStateProviders();
SetRooms();
if (isInAutoMode)
{
DetermineRoomCombinationScenario();
}
else
{
SetRoomCombinationScenario(_propertiesConfig.defaultScenarioKey);
}
});
}
void CreateScenarios()
{
RoomCombinationScenarios = new List<IRoomCombinationScenario>();
foreach (var scenarioConfig in _propertiesConfig.Scenarios)
{
var scenario = new RoomCombinationScenario(scenarioConfig);
@@ -160,12 +167,26 @@ namespace PepperDash.Essentials.Core
{
return _currentScenario;
}
set
private set
{
if (value != _currentScenario)
{
// Deactivate the old scenario first
if (_currentScenario != null)
{
_currentScenario.Deactivate();
}
_currentScenario = value;
Debug.Console(1, this, "Current Scenario: {0}", _currentScenario.Name);
// Activate the new scenario
if (_currentScenario != null)
{
_currentScenario.Activate();
Debug.Console(1, this, "Current Scenario: {0}", _currentScenario.Name);
}
var handler = RoomCombinationScenarioChanged;
if (handler != null)
{
@@ -220,9 +241,11 @@ namespace PepperDash.Essentials.Core
// Get the scenario
var scenario = RoomCombinationScenarios.FirstOrDefault((s) => s.Key.Equals(scenarioKey));
// Set the parition states from the scenario manually
if (scenario != null)
{
Debug.Console(0, this, "Manually setting scenario to '{0}'", scenario.Key);
foreach (var partitionState in scenario.PartitionStates)
{
var partition = Partitions.FirstOrDefault((p) => p.Key.Equals(partitionState.PartitionKey));
@@ -231,15 +254,25 @@ namespace PepperDash.Essentials.Core
{
if (partitionState.PartitionPresent)
{
Debug.Console(0, this, "Manually setting state to Present for: '{0}'", partition.Key);
partition.SetPartitionStatePresent();
}
else
{
Debug.Console(0, this, "Manually setting state to Not Present for: '{0}'", partition.Key);
partition.SetPartitionStateNotPresent();
}
}
else
{
Debug.Console(1, this, "Unable to find partition with key: '{0}'", partitionState.PartitionKey);
}
}
}
else
{
Debug.Console(1, this, "Unable to find scenario with key: '{0}'", scenarioKey);
}
}
#endregion

View File

@@ -30,7 +30,7 @@ namespace PepperDash.Essentials.Core
/// <summary>
/// The list of rooms keys that can be combined
/// </summary>
[JsonProperty("roomMap")]
[JsonProperty("roomKeys")]
public List<string> RoomKeys {get; set;}
/// <summary>
@@ -87,6 +87,9 @@ namespace PepperDash.Essentials.Core
[JsonProperty("partitionStates")]
public List<PartitionState> PartitionStates { get; set; }
/// <summary>
/// Determines which UI devices get mapped to which room in this scenario. The Key should be the key of the UI device and the Value should be the key of the room to map to
/// </summary>
[JsonProperty("uiMap")]
public Dictionary<string, string> UiMap { get; set; }

View File

@@ -78,6 +78,11 @@ namespace PepperDash.Essentials.Core
/// </summary>
void Activate();
/// <summary>
/// Deactivates this room combination scenario
/// </summary>
void Deactivate();
/// <summary>
/// The state of the partitions that would activate this scenario
/// </summary>

View File

@@ -4,6 +4,8 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Core;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Core
@@ -27,9 +29,9 @@ namespace PepperDash.Essentials.Core
public BoolFeedback IsActiveFeedback { get; private set; }
List<DeviceActionWrapper> activationActions;
private List<DeviceActionWrapper> activationActions;
List<DeviceActionWrapper> deactivationActions;
private List<DeviceActionWrapper> deactivationActions;
public RoomCombinationScenario(RoomCombinationScenarioConfig config)
{
@@ -52,6 +54,8 @@ namespace PepperDash.Essentials.Core
public void Activate()
{
Debug.Console(1, "Activating Scenario: '{0}' with {1} action(s) defined", Name, activationActions.Count);
if (activationActions != null)
{
foreach (var action in activationActions)
@@ -66,6 +70,8 @@ namespace PepperDash.Essentials.Core
public void Deactivate()
{
Debug.Console(1, "Deactivating Scenario: '{0}' with {1} action(s) defined", Name, deactivationActions.Count);
if (deactivationActions != null)
{
foreach (var action in deactivationActions)

View File

@@ -11,6 +11,8 @@ using PepperDash.Essentials.Core.Config;
using PepperDash.Essentials.Core.Devices;
using PepperDash.Essentials.Core.DeviceTypeInterfaces;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Core
{
/// <summary>
@@ -18,6 +20,8 @@ namespace PepperDash.Essentials.Core
/// </summary>
public abstract class EssentialsRoomBase : ReconfigurableDevice, IEssentialsRoom
{
/// <summary>
///
/// </summary>
@@ -35,6 +39,16 @@ namespace PepperDash.Essentials.Core
public bool OccupancyStatusProviderIsRemote { get; private set; }
public List<EssentialsDevice> EnvironmentalControlDevices { get; protected set; }
public bool HasEnvironmentalControlDevices
{
get
{
return EnvironmentalControlDevices != null && EnvironmentalControlDevices.Count > 0;
}
}
protected abstract Func<bool> IsWarmingFeedbackFunc { get; }
protected abstract Func<bool> IsCoolingFeedbackFunc { get; }
@@ -119,6 +133,8 @@ namespace PepperDash.Essentials.Core
public EssentialsRoomBase(DeviceConfig config)
: base(config)
{
EnvironmentalControlDevices = new List<EssentialsDevice>();
// Setup the ShutdownPromptTimer
ShutdownPromptTimer = new SecondsCountdownTimer(Key + "-offTimer");
ShutdownPromptTimer.IsRunningFeedback.OutputChange += (o, a) =>

View File

@@ -15,7 +15,7 @@ namespace PepperDash.Essentials.Core
/// <summary>
/// Describes the basic functionality of an EssentialsRoom
/// </summary>
public interface IEssentialsRoom : IKeyName, IReconfigurableDevice, IRunDefaultPresentRoute
public interface IEssentialsRoom : IKeyName, IReconfigurableDevice, IRunDefaultPresentRoute, IEnvironmentalControls
{
BoolFeedback OnFeedback { get; }

View File

@@ -4,6 +4,8 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Core;
namespace PepperDash.Essentials.Core
{
@@ -66,6 +68,14 @@ namespace PepperDash.Essentials.Core
bool RunDefaultCallRoute();
}
/// <summary>
/// Describes environmental controls available on a room such as lighting, shades, temperature, etc.
/// </summary>
public interface IEnvironmentalControls
{
List<EssentialsDevice> EnvironmentalControlDevices { get; }
bool HasEnvironmentalControlDevices { get; }
}
}

View File

@@ -31,6 +31,7 @@ namespace PepperDash.Essentials.Core.Shades
public interface IShadesOpenCloseStop : IShadesOpenClose
{
void StopOrPreset();
string StopOrPresetButtonLabel { get; }
}
/// <summary>

View File

@@ -206,6 +206,27 @@ namespace PepperDash.Essentials.Core
return ClearSigAction(tl.StringOutput[sigNum]) as StringOutputSig;
}
/// <summary>
/// Clears all actions on all sigs
/// </summary>
public static void ClearAllSigActions(this BasicTriList t1)
{
foreach (var sig in t1.BooleanOutput)
{
ClearSigAction(sig);
}
foreach (var sig in t1.UShortOutput)
{
ClearSigAction(sig);
}
foreach (var sig in t1.StringOutput)
{
ClearSigAction(sig);
}
}
/// <summary>
/// Helper method to set the value of a bool Sig on TriList
/// </summary>

View File

@@ -483,7 +483,7 @@ namespace PepperDash.Essentials.DM
Debug.Console(2, this, "Adding output port '{0}'", portKey);
OutputPorts.Add(new RoutingOutputPort(portKey, sigType, portType, selector, this)
{
FeedbackMatchObject = Chassis.Outputs[(uint)selector]
FeedbackMatchObject = selector
});
}*/

View File

@@ -1901,6 +1901,8 @@ namespace PepperDash.Essentials.DM
EnableAudioBreakawayFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableAudioBreakaway.JoinNumber]);
EnableUsbBreakawayFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsbBreakaway.JoinNumber]);
trilist.SetString(joinMap.NoRouteName.JoinNumber, NoRouteText);
trilist.OnlineStatusChange += (o, a) =>
{
if (!a.DeviceOnLine)
@@ -1912,6 +1914,8 @@ namespace PepperDash.Essentials.DM
EnableUsbBreakawayFeedback.FireUpdate();
SystemIdBusyFeedback.FireUpdate();
SystemIdFeebdack.FireUpdate();
trilist.SetString(joinMap.NoRouteName.JoinNumber, NoRouteText);
};
}

View File

@@ -25,10 +25,10 @@ namespace PepperDash.Essentials.DM
public DmpsAudioOutput MasterVolumeLevel { get; private set; }
public DmpsAudioOutput SourceVolumeLevel { get; private set; }
public DmpsAudioOutput MicsMasterVolumeLevel { get; private set; }
public DmpsAudioOutput Codec1VolumeLevel { get; private set; }
public DmpsAudioOutput Codec2VolumeLevel { get; private set; }
public DmpsAudioOutputController(string key, string name, Card.Dmps3OutputBase card)
: base(key, name)
{
@@ -36,88 +36,143 @@ namespace PepperDash.Essentials.DM
OutputCard.BaseDevice.DMOutputChange += new DMOutputEventHandler(BaseDevice_DMOutputChange);
MasterVolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Master);
SourceVolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Source);
if (card is Card.Dmps3ProgramOutput)
{
//(card as Card.Dmps3ProgramOutput).OutputMixer.MicLevel
//TODO: Hook up mic levels and mutes
MasterVolumeLevel = new DmpsAudioOutputWithMixer(card, eDmpsLevelType.Master, (card as Card.Dmps3ProgramOutput).OutputMixer);
SourceVolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Source);
MicsMasterVolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.MicsMaster);
Codec1VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec1);
Codec2VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec2);
}
else if (card is Card.Dmps3Aux1Output)
{
MasterVolumeLevel = new DmpsAudioOutputWithMixer(card, eDmpsLevelType.Master, (card as Card.Dmps3Aux1Output).OutputMixer);
SourceVolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Source);
MicsMasterVolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.MicsMaster);
Codec2VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec2);
}
else if (card is Card.Dmps3Aux2Output)
{
MasterVolumeLevel = new DmpsAudioOutputWithMixer(card, eDmpsLevelType.Master, (card as Card.Dmps3Aux2Output).OutputMixer);
SourceVolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Source);
MicsMasterVolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.MicsMaster);
Codec1VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec1);
}
else //Digital Outputs
{
MasterVolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Master);
SourceVolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Source);
MicsMasterVolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.MicsMaster);
}
}
void BaseDevice_DMOutputChange(Switch device, DMOutputEventArgs args)
{
Debug.Console(2, this, "Dmps Audio Controller Event Output: {0} EventId: {1}", args.Number, args.EventId.ToString());
switch (args.EventId)
{
case DMOutputEventIds.OutputVuFeedBackEventId:
{
//Frequently called event that isn't needed
return;
}
case DMOutputEventIds.MasterVolumeFeedBackEventId:
{
MasterVolumeLevel.VolumeLevelFeedback.FireUpdate();
break;
}
{
MasterVolumeLevel.VolumeLevelFeedback.FireUpdate();
MasterVolumeLevel.VolumeLevelScaledFeedback.FireUpdate();
break;
}
case DMOutputEventIds.MasterMuteOnFeedBackEventId:
{
MasterVolumeLevel.MuteFeedback.FireUpdate();
break;
}
{
MasterVolumeLevel.MuteFeedback.FireUpdate();
break;
}
case DMOutputEventIds.SourceLevelFeedBackEventId:
{
SourceVolumeLevel.VolumeLevelFeedback.FireUpdate();
break;
}
{
SourceVolumeLevel.VolumeLevelFeedback.FireUpdate();
SourceVolumeLevel.VolumeLevelScaledFeedback.FireUpdate();
break;
}
case DMOutputEventIds.SourceMuteOnFeedBackEventId:
{
SourceVolumeLevel.MuteFeedback.FireUpdate();
break;
}
case DMOutputEventIds.MicMasterLevelFeedBackEventId:
{
MicsMasterVolumeLevel.VolumeLevelFeedback.FireUpdate();
MicsMasterVolumeLevel.VolumeLevelScaledFeedback.FireUpdate();
break;
}
case DMOutputEventIds.MicMasterMuteOnFeedBackEventId:
{
MicsMasterVolumeLevel.MuteFeedback.FireUpdate();
break;
}
case DMOutputEventIds.Codec1LevelFeedBackEventId:
{
if(Codec1VolumeLevel != null)
Codec1VolumeLevel.VolumeLevelFeedback.FireUpdate();
break;
}
{
if (Codec1VolumeLevel != null)
{
Codec1VolumeLevel.VolumeLevelFeedback.FireUpdate();
Codec1VolumeLevel.VolumeLevelScaledFeedback.FireUpdate();
}
break;
}
case DMOutputEventIds.Codec1MuteOnFeedBackEventId:
{
if (Codec1VolumeLevel != null)
Codec1VolumeLevel.MuteFeedback.FireUpdate();
break;
}
{
if (Codec1VolumeLevel != null)
Codec1VolumeLevel.MuteFeedback.FireUpdate();
break;
}
case DMOutputEventIds.Codec2LevelFeedBackEventId:
{
if (Codec2VolumeLevel != null)
Codec2VolumeLevel.VolumeLevelFeedback.FireUpdate();
break;
}
{
if (Codec2VolumeLevel != null)
{
Codec2VolumeLevel.VolumeLevelFeedback.FireUpdate();
Codec2VolumeLevel.VolumeLevelScaledFeedback.FireUpdate();
}
break;
}
case DMOutputEventIds.Codec2MuteOnFeedBackEventId:
{
if (Codec2VolumeLevel != null)
Codec2VolumeLevel.MuteFeedback.FireUpdate();
break;
}
{
if (Codec2VolumeLevel != null)
Codec2VolumeLevel.MuteFeedback.FireUpdate();
break;
}
case DMOutputEventIds.MinVolumeFeedBackEventId:
{
Debug.Console(2, this, "MinVolumeFeedBackEventId: {0}", args.Index);
var level = MasterVolumeLevel as DmpsAudioOutputWithMixer;
if (level != null)
{
level.GetVolumeMin();
}
break;
}
case DMOutputEventIds.MaxVolumeFeedBackEventId:
{
Debug.Console(2, this, "MaxVolumeFeedBackEventId: {0}", args.Index);
var level = MasterVolumeLevel as DmpsAudioOutputWithMixer;
if (level != null)
{
level.GetVolumeMax();
}
break;
}
}
}
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
{
{
var joinMap = new DmpsAudioOutputControllerJoinMap(joinStart);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<DmpsAudioOutputControllerJoinMap>(joinMapSerialized);
if (bridge != null)
{
bridge.AddJoinMap(Key, joinMap);
}
else
{
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
if (bridge != null)
{
bridge.AddJoinMap(Key, joinMap);
}
else
{
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
}
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
@@ -125,6 +180,11 @@ namespace PepperDash.Essentials.DM
if (MasterVolumeLevel != null)
{
SetUpDmpsAudioOutputJoins(trilist, MasterVolumeLevel, joinMap.MasterVolumeLevel.JoinNumber);
var mixer = MasterVolumeLevel as DmpsAudioOutputWithMixer;
if (mixer != null)
{
trilist.SetUShortSigAction(joinMap.MixerPresetRecall.JoinNumber, mixer.RecallPreset);
}
}
if (SourceVolumeLevel != null)
@@ -132,6 +192,11 @@ namespace PepperDash.Essentials.DM
SetUpDmpsAudioOutputJoins(trilist, SourceVolumeLevel, joinMap.SourceVolumeLevel.JoinNumber);
}
if (MicsMasterVolumeLevel != null)
{
SetUpDmpsAudioOutputJoins(trilist, MicsMasterVolumeLevel, joinMap.MicsMasterVolumeLevel.JoinNumber);
}
if (Codec1VolumeLevel != null)
{
SetUpDmpsAudioOutputJoins(trilist, Codec1VolumeLevel, joinMap.Codec1VolumeLevel.JoinNumber);
@@ -141,20 +206,20 @@ namespace PepperDash.Essentials.DM
{
SetUpDmpsAudioOutputJoins(trilist, Codec2VolumeLevel, joinMap.Codec2VolumeLevel.JoinNumber);
}
}
static void SetUpDmpsAudioOutputJoins(BasicTriList trilist, DmpsAudioOutput output, uint joinStart)
{
var volumeLevelJoin = joinStart;
var volumeLevelScaledJoin = joinStart + 1;
var muteOnJoin = joinStart;
var muteOffJoin = joinStart + 1;
var volumeUpJoin = joinStart + 2;
var volumeDownJoin = joinStart + 3;
var sendScaledVolumeJoin = joinStart + 4;
trilist.SetUShortSigAction(volumeLevelJoin, output.SetVolume);
output.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[volumeLevelJoin]);
output.VolumeLevelScaledFeedback.LinkInputSig(trilist.UShortInput[volumeLevelScaledJoin]);
trilist.SetSigTrueAction(muteOnJoin, output.MuteOn);
output.MuteFeedback.LinkInputSig(trilist.BooleanInput[muteOnJoin]);
@@ -163,30 +228,78 @@ namespace PepperDash.Essentials.DM
trilist.SetBoolSigAction(volumeUpJoin, output.VolumeUp);
trilist.SetBoolSigAction(volumeDownJoin, output.VolumeDown);
trilist.SetBoolSigAction(sendScaledVolumeJoin, output.SendScaledVolume);
trilist.SetUShortSigAction(volumeLevelJoin, output.SetVolume);
trilist.SetUShortSigAction(volumeLevelScaledJoin, output.SetVolumeScaled);
}
}
public class DmpsAudioOutputWithMixer : DmpsAudioOutput
{
CrestronControlSystem.Dmps3OutputMixerWithMonoAndStereo Mixer;
public DmpsAudioOutputWithMixer(Card.Dmps3OutputBase output, eDmpsLevelType type, CrestronControlSystem.Dmps3OutputMixerWithMonoAndStereo mixer)
: base(output, type)
{
Mixer = mixer;
GetVolumeMax();
GetVolumeMin();
}
public void GetVolumeMin()
{
MinLevel = (short)Mixer.MinVolumeFeedback.UShortValue;
if (VolumeLevelScaledFeedback != null)
{
VolumeLevelScaledFeedback.FireUpdate();
}
}
public void GetVolumeMax()
{
MaxLevel = (short)Mixer.MaxVolumeFeedback.UShortValue;
if (VolumeLevelScaledFeedback != null)
{
VolumeLevelScaledFeedback.FireUpdate();
}
}
public void RecallPreset(ushort preset)
{
Debug.Console(1, "DMPS Recalling Preset {0}", preset);
Mixer.PresetNumber.UShortValue = preset;
Mixer.RecallPreset();
}
}
public class DmpsAudioOutput : IBasicVolumeWithFeedback
{
Card.Dmps3OutputBase Output;
eDmpsLevelType Type;
UShortInputSig Level;
eDmpsLevelType Type;
private bool EnableVolumeSend;
private ushort VolumeLevelInput;
protected short MinLevel { get; set; }
protected short MaxLevel { get; set; }
public BoolFeedback MuteFeedback { get; private set; }
public IntFeedback VolumeLevelFeedback { get; private set; }
public IntFeedback VolumeLevelScaledFeedback { get; private set; }
Action MuteOnAction;
Action MuteOffAction;
Action<bool> VolumeUpAction;
Action<bool> VolumeDownAction;
public DmpsAudioOutput(Card.Dmps3OutputBase output, eDmpsLevelType type)
{
Output = output;
VolumeLevelInput = 0;
EnableVolumeSend = false;
Type = type;
MinLevel = -800;
MaxLevel = 100;
switch (type)
{
@@ -194,14 +307,12 @@ namespace PepperDash.Essentials.DM
{
Level = output.MasterVolume;
MuteFeedback = new BoolFeedback( new Func<bool> (() => Output.MasterMuteOnFeedBack.BoolValue));
MuteFeedback = new BoolFeedback(new Func<bool>(() => Output.MasterMuteOnFeedBack.BoolValue));
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => Output.MasterVolumeFeedBack.UShortValue));
MuteOnAction = new Action(Output.MasterMuteOn);
MuteOffAction = new Action(Output.MasterMuteOff);
VolumeUpAction = new Action<bool>((b) => Output.MasterVolumeUp.BoolValue = b);
VolumeDownAction = new Action<bool>((b) => Output.MasterVolumeDown.BoolValue = b);
break;
}
case eDmpsLevelType.MicsMaster:
@@ -214,7 +325,6 @@ namespace PepperDash.Essentials.DM
MuteOffAction = new Action(Output.MicMasterMuteOff);
VolumeUpAction = new Action<bool>((b) => Output.MicMasterLevelUp.BoolValue = b);
VolumeDownAction = new Action<bool>((b) => Output.MicMasterLevelDown.BoolValue = b);
break;
}
case eDmpsLevelType.Source:
@@ -243,7 +353,6 @@ namespace PepperDash.Essentials.DM
MuteOffAction = new Action(programOutput.Codec1MuteOff);
VolumeUpAction = new Action<bool>((b) => programOutput.Codec1LevelUp.BoolValue = b);
VolumeDownAction = new Action<bool>((b) => programOutput.Codec1LevelDown.BoolValue = b);
}
else
{
@@ -274,7 +383,6 @@ namespace PepperDash.Essentials.DM
MuteOffAction = new Action(programOutput.Codec2MuteOff);
VolumeUpAction = new Action<bool>((b) => programOutput.Codec2LevelUp.BoolValue = b);
VolumeDownAction = new Action<bool>((b) => programOutput.Codec2LevelDown.BoolValue = b);
}
else
{
@@ -292,7 +400,38 @@ namespace PepperDash.Essentials.DM
break;
}
}
if (VolumeLevelFeedback != null)
{
VolumeLevelScaledFeedback = new IntFeedback(new Func<int>(() => ScaleVolumeFeedback(VolumeLevelFeedback.UShortValue)));
VolumeLevelFeedback.FireUpdate();
VolumeLevelScaledFeedback.FireUpdate();
}
}
public void SetVolumeScaled(ushort level)
{
Debug.Console(2, Debug.ErrorLogLevel.None, "Scaling DMPS volume:{0} level:{1} min:{2} max:{3}", Output.Name, level.ToString(), MinLevel.ToString(), MaxLevel.ToString());
VolumeLevelInput = (ushort)(level * (MaxLevel - MinLevel) / ushort.MaxValue + MinLevel);
if (EnableVolumeSend == true)
{
Level.UShortValue = VolumeLevelInput;
}
}
public ushort ScaleVolumeFeedback(ushort level)
{
short signedLevel = (short)level;
Debug.Console(2, Debug.ErrorLogLevel.None, "Scaling DMPS volume:{0} feedback:{1} min:{2} max:{3}", Output.Name, signedLevel.ToString(), MinLevel.ToString(), MaxLevel.ToString());
return (ushort)((signedLevel - MinLevel) * ushort.MaxValue / (MaxLevel - MinLevel));
}
public void SendScaledVolume(bool pressRelease)
{
EnableVolumeSend = pressRelease;
if (pressRelease == false)
{
SetVolumeScaled(VolumeLevelInput);
}
}
#region IBasicVolumeWithFeedback Members

View File

@@ -0,0 +1,192 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Bridges;
namespace PepperDash.Essentials.DM
{
/// <summary>
/// Exposes the volume levels for microphones DMPS3 chassis
/// </summary>
public class DmpsMicrophoneController
{
private Dictionary<uint, DmpsMicrophone> Mics;
public DmpsMicrophoneController(CrestronControlSystem dmps)
{
Debug.Console(2, "Creating Dmps Microphone Controller");
Mics = new Dictionary<uint,DmpsMicrophone>();
foreach (var mic in dmps.Microphones)
{
Debug.Console(0, "Dmps Microphone Controller Adding Mic: {0} Name: {1}", mic.ID, mic.Name);
var dmpsMic = new DmpsMicrophone("processor-microphone" + mic.ID, mic.Name, mic);
DeviceManager.AddDevice(dmpsMic);
Mics.Add(mic.ID, dmpsMic);
}
dmps.MicrophoneChange += new MicrophoneChangeEventHandler(Dmps_MicrophoneChange);
}
void Dmps_MicrophoneChange(MicrophoneBase mic, GenericEventArgs args)
{
Debug.Console(2, "Dmps Microphone Controller Index: {0} EventId: {1}", mic.ID, args.EventId.ToString());
if(Mics.ContainsKey(mic.ID))
{
Mics[mic.ID].Event(args.EventId);
}
}
}
public class DmpsMicrophone : EssentialsBridgeableDevice, IBasicVolumeWithFeedback
{
MicrophoneBase Mic;
private bool EnableVolumeSend;
private ushort VolumeLevelInput;
protected short MinLevel { get; set; }
protected short MaxLevel { get; set; }
public BoolFeedback MuteFeedback { get; private set; }
public IntFeedback VolumeLevelFeedback { get; private set; }
public IntFeedback VolumeLevelScaledFeedback { get; private set; }
public StringFeedback NameFeedback { get; private set; }
Action MuteOnAction;
Action MuteOffAction;
public DmpsMicrophone(string key, string name, MicrophoneBase mic) : base(key, name)
{
Mic = mic;
VolumeLevelInput = 0;
EnableVolumeSend = false;
MinLevel = 0;
MaxLevel = 600;
MuteFeedback = new BoolFeedback(new Func<bool>(() => Mic.MuteOnFeedBack.BoolValue));
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => Mic.GainFeedBack.UShortValue));
VolumeLevelScaledFeedback = new IntFeedback(new Func<int>(() => ScaleVolumeFeedback(VolumeLevelFeedback.UShortValue)));
NameFeedback = new StringFeedback(new Func<string>(() => "Microphone " + Mic.ID));
MuteOnAction = new Action(Mic.MuteOn);
MuteOffAction = new Action(Mic.MuteOff);
VolumeLevelFeedback.FireUpdate();
VolumeLevelScaledFeedback.FireUpdate();
NameFeedback.FireUpdate();
MuteFeedback.FireUpdate();
}
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
{
var joinMap = new DmpsMicrophoneControllerJoinMap(joinStart);
if (bridge != null)
{
bridge.AddJoinMap(Key, joinMap);
}
else
{
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
}
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[joinMap.MicGain.JoinNumber]);
VolumeLevelScaledFeedback.LinkInputSig(trilist.UShortInput[joinMap.MicGainScaled.JoinNumber ]);
MuteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.MicMuteOn.JoinNumber]);
MuteFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.MicMuteOff.JoinNumber]);
NameFeedback.LinkInputSig(trilist.StringInput[joinMap.MicName.JoinNumber]);
trilist.SetUShortSigAction(joinMap.MicGain.JoinNumber, SetVolume);
trilist.SetUShortSigAction(joinMap.MicGainScaled.JoinNumber, SetVolumeScaled);
trilist.SetBoolSigAction(joinMap.MicGainScaledSend.JoinNumber, SendScaledVolume);
trilist.SetSigTrueAction(joinMap.MicMuteOn.JoinNumber, MuteOnAction);
trilist.SetSigTrueAction(joinMap.MicMuteOff.JoinNumber, MuteOffAction);
}
public void Event(int id)
{
if (id == MicrophoneEventIds.MuteOnFeedBackEventId)
{
MuteFeedback.FireUpdate();
}
else if (id == MicrophoneEventIds.GainFeedBackEventId)
{
VolumeLevelFeedback.FireUpdate();
VolumeLevelScaledFeedback.FireUpdate();
}
}
public void SetVolumeScaled(ushort level)
{
VolumeLevelInput = (ushort)(level * (MaxLevel - MinLevel) / ushort.MaxValue + MinLevel);
if (EnableVolumeSend == true)
{
Mic.Gain.UShortValue = VolumeLevelInput;
}
}
public ushort ScaleVolumeFeedback(ushort level)
{
short signedLevel = (short)level;
return (ushort)((signedLevel - MinLevel) * ushort.MaxValue / (MaxLevel - MinLevel));
}
public void SendScaledVolume(bool pressRelease)
{
EnableVolumeSend = pressRelease;
if (pressRelease == false)
{
SetVolumeScaled(VolumeLevelInput);
}
}
#region IBasicVolumeWithFeedback Members
public void SetVolume(ushort level)
{
Mic.Gain.UShortValue = level;
}
public void MuteOn()
{
MuteOnAction();
}
public void MuteOff()
{
MuteOffAction();
}
#endregion
#region IBasicVolumeControls Members
public void VolumeUp(bool pressRelease)
{
}
public void VolumeDown(bool pressRelease)
{
}
public void MuteToggle()
{
if (MuteFeedback.BoolValue)
MuteOff();
else
MuteOn();
}
#endregion
}
}

View File

@@ -25,6 +25,7 @@ namespace PepperDash.Essentials.DM
public CrestronControlSystem Dmps { get; set; }
public ISystemControl SystemControl { get; private set; }
public bool? EnableRouting { get; private set; }
//Check if DMPS is a DMPS3-4K type for endpoint creation
public bool Dmps4kType { get; private set; }
@@ -32,9 +33,11 @@ namespace PepperDash.Essentials.DM
//IroutingNumericEvent
public event EventHandler<RoutingNumericEventArgs> NumericSwitchChange;
//Feedback for DMPS System Power
//Feedback for DMPS System Control
public BoolFeedback SystemPowerOnFeedback { get; private set; }
public BoolFeedback SystemPowerOffFeedback { get; private set; }
public BoolFeedback FrontPanelLockOnFeedback { get; private set; }
public BoolFeedback FrontPanelLockOffFeedback { get; private set; }
// Feedbacks for EssentialDM
public Dictionary<uint, IntFeedback> VideoOutputFeedbacks { get; private set; }
@@ -59,6 +62,7 @@ namespace PepperDash.Essentials.DM
public Dictionary<uint, string> InputNames { get; set; }
public Dictionary<uint, string> OutputNames { get; set; }
public Dictionary<uint, DmCardAudioOutputController> VolumeControls { get; private set; }
public DmpsMicrophoneController Microphones { get; private set; }
public const int RouteOffTime = 500;
Dictionary<PortNumberType, CTimer> RouteOffTimers = new Dictionary<PortNumberType, CTimer>();
@@ -122,26 +126,37 @@ namespace PepperDash.Essentials.DM
{
Dmps = Global.ControlSystem;
switch (name.Replace("-", "").Replace("c", "").Replace("C", ""))
switch (systemControl.SystemControlType)
{
case "dmps34k50":
case "dmps34k100":
case "dmps34k150":
case eSystemControlType.Dmps34K150CSystemControl:
SystemControl = systemControl as Dmps34K150CSystemControl;
Dmps4kType = true;
SystemPowerOnFeedback = new BoolFeedback(() => { return true; });
SystemPowerOffFeedback = new BoolFeedback(() => { return false; });
break;
case "dmps34k200":
case "dmps34k250":
case "dmps34k300":
case "dmps34k350":
case eSystemControlType.Dmps34K200CSystemControl:
case eSystemControlType.Dmps34K250CSystemControl:
case eSystemControlType.Dmps34K300CSystemControl:
case eSystemControlType.Dmps34K350CSystemControl:
SystemControl = systemControl as Dmps34K300CSystemControl;
Dmps4kType = true;
SystemPowerOnFeedback = new BoolFeedback(() => { return true; });
SystemPowerOffFeedback = new BoolFeedback(() => { return false; });
break;
default:
SystemControl = systemControl as Dmps3SystemControl;
Dmps4kType = false;
SystemPowerOnFeedback = new BoolFeedback(() =>
{
return ((Dmps3SystemControl)SystemControl).SystemPowerOnFeedBack.BoolValue;
});
SystemPowerOffFeedback = new BoolFeedback(() =>
{
return ((Dmps3SystemControl)SystemControl).SystemPowerOffFeedBack.BoolValue;
});
break;
}
Debug.Console(1, this, "DMPS Type = {0}, 4K Type = {1}", systemControl.SystemControlType, Dmps4kType);
InputPorts = new RoutingPortCollection<RoutingInputPort>();
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
@@ -149,27 +164,13 @@ namespace PepperDash.Essentials.DM
TxDictionary = new Dictionary<uint, string>();
RxDictionary = new Dictionary<uint, string>();
SystemPowerOnFeedback = new BoolFeedback(() =>
FrontPanelLockOnFeedback = new BoolFeedback(() =>
{
if (SystemControl is Dmps3SystemControl)
{
return ((Dmps3SystemControl)SystemControl).SystemPowerOnFeedBack.BoolValue;
}
else
{
return false;
}
return SystemControl.FrontPanelLockOnFeedback.BoolValue;
});
SystemPowerOffFeedback = new BoolFeedback(() =>
FrontPanelLockOffFeedback = new BoolFeedback(() =>
{
if (SystemControl is Dmps3SystemControl)
{
return ((Dmps3SystemControl)SystemControl).SystemPowerOffFeedBack.BoolValue;
}
else
{
return false;
}
return SystemControl.FrontPanelLockOffFeedback.BoolValue;
});
VideoOutputFeedbacks = new Dictionary<uint, IntFeedback>();
@@ -191,6 +192,8 @@ namespace PepperDash.Essentials.DM
SetupOutputCards();
SetupInputCards();
Microphones = new DmpsMicrophoneController(Dmps);
}
public override bool CustomActivate()
@@ -204,6 +207,41 @@ namespace PepperDash.Essentials.DM
Dmps.DMInputChange += Dmps_DMInputChange;
Dmps.DMOutputChange += Dmps_DMOutputChange;
Dmps.DMSystemChange += Dmps_DMSystemChange;
foreach (var x in VideoOutputFeedbacks)
{
x.Value.FireUpdate();
}
foreach (var x in AudioOutputFeedbacks)
{
x.Value.FireUpdate();
}
foreach (var x in VideoInputSyncFeedbacks)
{
x.Value.FireUpdate();
}
foreach (var x in InputEndpointOnlineFeedbacks)
{
x.Value.FireUpdate();
}
foreach (var x in InputNameFeedbacks)
{
x.Value.FireUpdate();
}
foreach (var x in OutputNameFeedbacks)
{
x.Value.FireUpdate();
}
foreach (var x in OutputEndpointOnlineFeedbacks)
{
x.Value.FireUpdate();
}
SystemPowerOnFeedback.FireUpdate();
SystemPowerOffFeedback.FireUpdate();
FrontPanelLockOnFeedback.FireUpdate();
FrontPanelLockOffFeedback.FireUpdate();
return base.CustomActivate();
}
@@ -241,20 +279,10 @@ namespace PepperDash.Essentials.DM
}
}
public void SetPowerOn(bool a)
public void SetRoutingEnable(bool enable)
{
if (SystemControl is Dmps3SystemControl)
{
((Dmps3SystemControl)SystemControl).SystemPowerOn();
}
}
public void SetPowerOff(bool a)
{
if (SystemControl is Dmps3SystemControl)
{
((Dmps3SystemControl)SystemControl).SystemPowerOff();
}
CrestronEnvironment.Sleep(1000);
EnableRouting = enable;
}
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
@@ -277,20 +305,24 @@ namespace PepperDash.Essentials.DM
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
//Link up system
trilist.SetBoolSigAction(joinMap.SystemPowerOn.JoinNumber, SetPowerOn);
trilist.SetBoolSigAction(joinMap.SystemPowerOff.JoinNumber, SetPowerOff);
if (SystemPowerOnFeedback != null)
//Link up system power only for non-4k DMPS3
if (SystemControl is Dmps3SystemControl)
{
SystemPowerOnFeedback.LinkInputSig(
trilist.BooleanInput[joinMap.SystemPowerOn.JoinNumber]);
}
if (SystemPowerOffFeedback != null)
{
SystemPowerOffFeedback.LinkInputSig(
trilist.BooleanInput[joinMap.SystemPowerOff.JoinNumber]);
trilist.SetBoolSigAction(joinMap.SystemPowerOn.JoinNumber, a => { if (a) { ((Dmps3SystemControl)SystemControl).SystemPowerOn(); } });
trilist.SetBoolSigAction(joinMap.SystemPowerOff.JoinNumber, a => { if (a) { ((Dmps3SystemControl)SystemControl).SystemPowerOff(); } });
}
SystemPowerOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.SystemPowerOn.JoinNumber]);
SystemPowerOffFeedback.LinkInputSig(trilist.BooleanInput[joinMap.SystemPowerOff.JoinNumber]);
trilist.SetBoolSigAction(joinMap.FrontPanelLockOn.JoinNumber, a => { if (a) {SystemControl.FrontPanelLockOn();}});
trilist.SetBoolSigAction(joinMap.FrontPanelLockOff.JoinNumber, a => { if (a) {SystemControl.FrontPanelLockOff();}});
FrontPanelLockOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.FrontPanelLockOn.JoinNumber]);
FrontPanelLockOffFeedback.LinkInputSig(trilist.BooleanInput[joinMap.FrontPanelLockOff.JoinNumber]);
trilist.SetBoolSigAction(joinMap.EnableRouting.JoinNumber, SetRoutingEnable);
// Link up outputs
LinkInputsToApi(trilist, joinMap);
LinkOutputsToApi(trilist, joinMap);
@@ -351,6 +383,8 @@ namespace PepperDash.Essentials.DM
if (OutputNameFeedbacks[ioSlot] != null)
{
OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames.JoinNumber + ioSlotJoin]);
OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputVideoNames.JoinNumber + ioSlotJoin]);
OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputAudioNames.JoinNumber + ioSlotJoin]);
}
if (OutputVideoRouteNameFeedbacks[ioSlot] != null)
{
@@ -372,6 +406,14 @@ namespace PepperDash.Essentials.DM
private void LinkInputsToApi(BasicTriList trilist, DmpsRoutingControllerJoinMap joinMap)
{
if (Dmps4kType)
{
//DMPS-4K audio inputs 1-5 are aux inputs
for (uint i = 1; i <= 5; i++)
{
trilist.StringInput[joinMap.InputAudioNames.JoinNumber + i - 1].StringValue = String.Format("Aux Input {0}", i);
}
}
for (uint i = 1; i <= Dmps.SwitcherInputs.Count; i++)
{
Debug.Console(2, this, "Linking Input Card {0}", i);
@@ -379,15 +421,26 @@ namespace PepperDash.Essentials.DM
var ioSlot = i;
var ioSlotJoin = ioSlot - 1;
if (VideoInputSyncFeedbacks[ioSlot] != null)
if (VideoInputSyncFeedbacks.ContainsKey(ioSlot) && VideoInputSyncFeedbacks[ioSlot] != null)
{
VideoInputSyncFeedbacks[ioSlot].LinkInputSig(
trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]);
}
if (InputNameFeedbacks[ioSlot] != null)
if (InputNameFeedbacks.ContainsKey(ioSlot) && InputNameFeedbacks[ioSlot] != null)
{
InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames.JoinNumber + ioSlotJoin]);
InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputVideoNames.JoinNumber + ioSlotJoin]);
if (Dmps4kType)
{
//DMPS-4K Audio Inputs are offset by 5
InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputAudioNames.JoinNumber + ioSlotJoin + 5]);
}
else
{
InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputAudioNames.JoinNumber + ioSlotJoin]);
}
}
trilist.SetStringSigAction(joinMap.InputNames.JoinNumber + ioSlotJoin, s =>
@@ -412,7 +465,7 @@ namespace PepperDash.Essentials.DM
});
if (InputEndpointOnlineFeedbacks[ioSlot] != null)
if (InputEndpointOnlineFeedbacks.ContainsKey(ioSlot) && InputEndpointOnlineFeedbacks[ioSlot] != null)
{
InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(
trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]);
@@ -463,7 +516,7 @@ namespace PepperDash.Essentials.DM
OutputNameFeedbacks[outputCard.Number] = new StringFeedback(() =>
{
if (outputCard.NameFeedback != null && !string.IsNullOrEmpty(outputCard.NameFeedback.StringValue))
if (outputCard.NameFeedback != null && outputCard.NameFeedback != CrestronControlSystem.NullStringOutputSig && !string.IsNullOrEmpty(outputCard.NameFeedback.StringValue))
{
Debug.Console(2, this, "Output Card {0} Name: {1}", outputCard.Number, outputCard.NameFeedback.StringValue);
return outputCard.NameFeedback.StringValue;
@@ -509,14 +562,14 @@ namespace PepperDash.Essentials.DM
InputEndpointOnlineFeedbacks[inputCard.Number] = new BoolFeedback(() => inputCard.EndpointOnlineFeedback);
if (inputCard.VideoDetectedFeedback != null)
if (inputCard.VideoDetectedFeedback != null && inputCard.VideoDetectedFeedback.Supported)
{
VideoInputSyncFeedbacks[inputCard.Number] = new BoolFeedback(() => inputCard.VideoDetectedFeedback.BoolValue);
}
InputNameFeedbacks[inputCard.Number] = new StringFeedback(() =>
{
if (inputCard.NameFeedback != null && !string.IsNullOrEmpty(inputCard.NameFeedback.StringValue))
if (inputCard.NameFeedback != null && inputCard.NameFeedback != CrestronControlSystem.NullStringOutputSig && !string.IsNullOrEmpty(inputCard.NameFeedback.StringValue))
{
Debug.Console(2, this, "Input Card {0} Name: {1}", inputCard.Number, inputCard.NameFeedback.StringValue);
return inputCard.NameFeedback.StringValue;
@@ -665,7 +718,7 @@ namespace PepperDash.Essentials.DM
{
AddAudioOnlyOutputPort(number, "Program");
var programOutput = new DmpsAudioOutputController(string.Format("processor-programAudioOutput"), "Program Audio Output", outputCard as Card.Dmps3OutputBase);
var programOutput = new DmpsAudioOutputController(string.Format("processor-programAudioOutput"), "Program Audio Output", outputCard as Card.Dmps3ProgramOutput);
DeviceManager.AddDevice(programOutput);
}
@@ -677,7 +730,7 @@ namespace PepperDash.Essentials.DM
{
AddAudioOnlyOutputPort(number, "Aux1");
var aux1Output = new DmpsAudioOutputController(string.Format("processor-aux1AudioOutput"), "Program Audio Output", outputCard as Card.Dmps3OutputBase);
var aux1Output = new DmpsAudioOutputController(string.Format("processor-aux1AudioOutput"), "Program Audio Output", outputCard as Card.Dmps3Aux1Output);
DeviceManager.AddDevice(aux1Output);
}
@@ -686,7 +739,7 @@ namespace PepperDash.Essentials.DM
{
AddAudioOnlyOutputPort(number, "Aux2");
var aux2Output = new DmpsAudioOutputController(string.Format("processor-aux2AudioOutput"), "Program Audio Output", outputCard as Card.Dmps3OutputBase);
var aux2Output = new DmpsAudioOutputController(string.Format("processor-aux2AudioOutput"), "Program Audio Output", outputCard as Card.Dmps3Aux2Output);
DeviceManager.AddDevice(aux2Output);
}
@@ -834,12 +887,17 @@ namespace PepperDash.Essentials.DM
{
Debug.Console(2, this, "DMOutputChange Output: {0} EventId: {1}", args.Number, args.EventId.ToString());
if (args.EventId == DMOutputEventIds.OutputVuFeedBackEventId)
{
//Frequently called event that isn't needed
return;
}
var output = args.Number;
DMOutput outputCard = Dmps.SwitcherOutputs[output] as DMOutput;
if (args.EventId == DMOutputEventIds.VolumeEventId &&
VolumeControls.ContainsKey(output))
if (args.EventId == DMOutputEventIds.VolumeEventId && VolumeControls.ContainsKey(output))
{
VolumeControls[args.Number].VolumeEventFromChassis();
}
@@ -904,15 +962,19 @@ namespace PepperDash.Essentials.DM
switch (args.EventId)
{
case DMSystemEventIds.SystemPowerOnEventId:
{
SystemPowerOnFeedback.FireUpdate();
break;
}
case DMSystemEventIds.SystemPowerOffEventId:
{
SystemPowerOnFeedback.FireUpdate();
SystemPowerOffFeedback.FireUpdate();
break;
}
case DMSystemEventIds.FrontPanelLockOnEventId:
case DMSystemEventIds.FrontPanelLockOffEventId:
{
FrontPanelLockOnFeedback.FireUpdate();
FrontPanelLockOffFeedback.FireUpdate();
break;
}
}
}
@@ -933,6 +995,10 @@ namespace PepperDash.Essentials.DM
{
try
{
if (EnableRouting == false)
{
return;
}
Debug.Console(2, this, "Attempting a DM route from input {0} to output {1} {2}", inputSelector, outputSelector, sigType);

View File

@@ -14,7 +14,7 @@ namespace PepperDash.Essentials.DM
{
[Description("Wrapper Class for DM-RMC-4K-Z-SCALER-C")]
public class DmRmc4kZScalerCController : DmRmcControllerBase, IRmcRoutingWithFeedback,
IIROutputPorts, IComPorts, ICec
IIROutputPorts, IComPorts, ICec, IRelayPorts
{
private readonly DmRmc4kzScalerC _rmc;
@@ -168,5 +168,18 @@ namespace PepperDash.Essentials.DM
}
#endregion
#region Implementation of IRelayPorts
public CrestronCollection<Relay> RelayPorts
{
get { return _rmc.RelayPorts; }
}
public int NumberOfRelayPorts
{
get { return _rmc.NumberOfRelayPorts; }
}
#endregion
}
}

View File

@@ -61,6 +61,7 @@ namespace PepperDash.Essentials.DM
Debug.Console(1, rmc, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
rmc.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
trilist.StringInput[joinMap.Name.JoinNumber].StringValue = rmc.Name;
if (rmc.VideoOutputResolutionFeedback != null)
rmc.VideoOutputResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentOutputResolution.JoinNumber]);
if (rmc.EdidManufacturerFeedback != null)

View File

@@ -263,6 +263,7 @@ namespace PepperDash.Essentials.DM
tx.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber]);
tx.AnyVideoInput.VideoStatus.VideoResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentInputResolution.JoinNumber]);
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber].UShortValue = (ushort)tx.HdcpSupportCapability;
trilist.StringInput[joinMap.Name.JoinNumber].StringValue = tx.Name;
bool hdcpTypeSimple;

View File

@@ -93,6 +93,7 @@
<ItemGroup>
<Compile Include="AirMedia\AirMediaPropertiesConfig.cs" />
<Compile Include="AirMedia\AirMediaController.cs" />
<Compile Include="Chassis\DmpsMicrophoneController.cs" />
<Compile Include="Chassis\DmBladeChassisController.cs" />
<Compile Include="Chassis\DmCardAudioOutput.cs" />
<Compile Include="Chassis\DmChassisController.cs" />

View File

@@ -29,6 +29,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
public abstract class CameraBase : ReconfigurableDevice, IRoutingOutputs
{
[JsonProperty("controlMode", NullValueHandling = NullValueHandling.Ignore)]
public eCameraControlMode ControlMode { get; protected set; }
#region IRoutingOutputs Members
@@ -37,6 +38,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
#endregion
[JsonProperty("canPan", NullValueHandling = NullValueHandling.Ignore)]
public bool CanPan
{
get
@@ -44,7 +46,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
return (Capabilities & eCameraCapabilities.Pan) == eCameraCapabilities.Pan;
}
}
[JsonProperty("canTilt", NullValueHandling = NullValueHandling.Ignore)]
public bool CanTilt
{
get
@@ -52,7 +54,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
return (Capabilities & eCameraCapabilities.Tilt) == eCameraCapabilities.Tilt;
}
}
[JsonProperty("canZoom", NullValueHandling = NullValueHandling.Ignore)]
public bool CanZoom
{
get
@@ -60,7 +62,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
return (Capabilities & eCameraCapabilities.Zoom) == eCameraCapabilities.Zoom;
}
}
[JsonProperty("canFocus", NullValueHandling = NullValueHandling.Ignore)]
public bool CanFocus
{
get

View File

@@ -57,6 +57,11 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
void CameraMuteToggle();
}
public interface IHasCameraMuteWithUnmuteReqeust : IHasCameraMute
{
event EventHandler VideoUnmuteRequested;
}
public class CameraSelectedEventArgs : EventArgs
{
public CameraBase SelectedCamera { get; private set; }

View File

@@ -12,34 +12,40 @@ namespace PepperDash.Essentials.Devices.Common.Codec
{
public class CodecActiveCallItem
{
[JsonProperty("name")]
[JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)]
public string Name { get; set; }
[JsonProperty("number")]
[JsonProperty("number", NullValueHandling = NullValueHandling.Ignore)]
public string Number { get; set; }
[JsonProperty("type")]
[JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)]
[JsonConverter(typeof(StringEnumConverter))]
public eCodecCallType Type { get; set; }
[JsonProperty("status")]
[JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)]
[JsonConverter(typeof(StringEnumConverter))]
public eCodecCallStatus Status { get; set; }
[JsonProperty("direction")]
[JsonProperty("direction", NullValueHandling = NullValueHandling.Ignore)]
[JsonConverter(typeof(StringEnumConverter))]
public eCodecCallDirection Direction { get; set; }
[JsonProperty("id")]
[JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)]
public string Id { get; set; }
[JsonProperty("isOnHold", NullValueHandling = NullValueHandling.Ignore)]
public bool IsOnHold { get; set; }
[JsonProperty("duration", NullValueHandling = NullValueHandling.Ignore)]
public TimeSpan Duration { get; set; }
//public object CallMetaData { get; set; }
/// <summary>
/// Returns true when this call is any status other than
/// Unknown, Disconnected, Disconnecting
/// </summary>
[JsonProperty("isActiveCall")]
[JsonProperty("isActiveCall", NullValueHandling = NullValueHandling.Ignore)]
public bool IsActiveCall
{
get

View File

@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Essentials.Devices.Common.Codec
{
public interface IHasCallHold
{
/// <summary>
/// Put the specified call on hold
/// </summary>
/// <param name="activeCall"></param>
void HoldCall(CodecActiveCallItem activeCall);
/// <summary>
/// Resume the specified call
/// </summary>
/// <param name="activeCall"></param>
void ResumeCall(CodecActiveCallItem activeCall);
}
}

View File

@@ -23,9 +23,9 @@ namespace PepperDash.Essentials.Devices.Common.Codec
public enum eCodecOccurrenceType
{
Unknown = 0,
Placed,
Received,
NoAnswer
Placed = 1,
Received = 2,
NoAnswer = 3,
}
/// <summary>

View File

@@ -65,10 +65,12 @@ namespace PepperDash.Essentials.Devices.Common.Codec
{
/// <summary>
/// Represents the contents of the directory
/// We don't want to serialize this for messages to MobileControl. MC can combine Contacts and Folders to get the same data
/// </summary>
[JsonProperty("directoryResults")]
[JsonIgnore]
public List<DirectoryItem> CurrentDirectoryResults { get; private set; }
[JsonProperty("contacts")]
public List<DirectoryItem> Contacts
{
get
@@ -77,6 +79,7 @@ namespace PepperDash.Essentials.Devices.Common.Codec
}
}
[JsonProperty("folders")]
public List<DirectoryItem> Folders
{
get

View File

@@ -99,7 +99,7 @@ namespace PepperDash.Essentials.Devices.Displays
WarmupTime = 10000;
CooldownTime = 8000;
CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 2000, 120000, 300000, StatusGet);
CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 2000, 120000, 300000, StatusGet, true);
DeviceManager.AddDevice(CommunicationMonitor);
VolumeIncrementer = new ActionIncrementer(655, 0, 65535, 800, 80,

View File

@@ -108,6 +108,7 @@
<Compile Include="Codec\eCodecCallStatus.cs" />
<Compile Include="Codec\eMeetingPrivacy.cs" />
<Compile Include="Codec\iCodecAudio.cs" />
<Compile Include="Codec\IHasCallHold.cs" />
<Compile Include="Codec\IHasDoNotDisturb.cs" />
<Compile Include="Codec\IHasExternalSourceSwitching.cs" />
<Compile Include="ImageProcessors\TVOneCorio.cs" />
@@ -123,12 +124,15 @@
<Compile Include="Cameras\CameraControl.cs" />
<Compile Include="Display\PanasonicThDisplay.cs" />
<Compile Include="VideoCodec\Interfaces\IHasMeetingInfo.cs" />
<Compile Include="VideoCodec\Interfaces\IHasMeetingLock.cs" />
<Compile Include="VideoCodec\Interfaces\IHasMeetingRecording.cs" />
<Compile Include="VideoCodec\Interfaces\IHasParticipants.cs" />
<Compile Include="VideoCodec\Interfaces\IHasPresentationOnlyMeeting.cs" />
<Compile Include="VideoCodec\Interfaces\IHasSelfviewPosition.cs" />
<Compile Include="VideoCodec\Interfaces\IHasSelfviewSize.cs" />
<Compile Include="VideoCodec\Interfaces\IHasStandbyMode.cs" />
<Compile Include="VideoCodec\Interfaces\IHasStartMeeting.cs" />
<Compile Include="VideoCodec\Interfaces\IJoinCalls.cs" />
<Compile Include="VideoCodec\Interfaces\iVideoCodecInfo.cs" />
<Compile Include="Codec\iHasCallFavorites.cs" />
<Compile Include="Codec\iHasCallHistory.cs" />

View File

@@ -19,7 +19,7 @@ namespace PepperDash.Essentials.Devices.Common
public class AppleTV : EssentialsBridgeableDevice, IDPad, ITransport, IUiDisplayInfo, IRoutingOutputs
{
public IrOutputPortController IrPort { get; private set; }
public const string StandardDriverName = "Apple AppleTV-v2.ir";
public const string StandardDriverName = "Apple_AppleTV_4th_Gen_Essentials.ir";
public uint DisplayUiType { get { return DisplayUiConstants.TypeAppleTv; } }
public AppleTV(string key, string name, IrOutputPortController portCont)

View File

@@ -41,12 +41,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public void PanLeft()
{
ParentCodec.SendText(string.Format("xCommand Call FarEndControl Camera Move Value: Left CallId: {0}", CallId));
ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera Move Value: Left CallId: {0}", CallId));
}
public void PanRight()
{
ParentCodec.SendText(string.Format("xCommand Call FarEndControl Camera Move Value: Right CallId: {0}", CallId));
ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera Move Value: Right CallId: {0}", CallId));
}
public void PanStop()
@@ -60,12 +60,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public void TiltDown()
{
ParentCodec.SendText(string.Format("xCommand Call FarEndControl Camera Move Value: Down CallId: {0}", CallId));
ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera Move Value: Down CallId: {0}", CallId));
}
public void TiltUp()
{
ParentCodec.SendText(string.Format("xCommand Call FarEndControl Camera Move Value: Up CallId: {0}", CallId));
ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera Move Value: Up CallId: {0}", CallId));
}
public void TiltStop()
@@ -79,12 +79,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public void ZoomIn()
{
ParentCodec.SendText(string.Format("xCommand Call FarEndControl Camera Move Value: ZoomIn CallId: {0}", CallId));
ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera Move Value: ZoomIn CallId: {0}", CallId));
}
public void ZoomOut()
{
ParentCodec.SendText(string.Format("xCommand Call FarEndControl Camera Move Value: ZoomOut CallId: {0}", CallId));
ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera Move Value: ZoomOut CallId: {0}", CallId));
}
public void ZoomStop()
@@ -97,7 +97,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
void Stop()
{
ParentCodec.SendText(string.Format("xCommand Call FarEndControl Camera Stop CallId: {0}", CallId));
ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera Stop CallId: {0}", CallId));
}
public void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
@@ -116,7 +116,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
/// <summary>
/// The ID of the camera on the codec
/// </summary>
protected uint CameraId { get; private set; }
public uint CameraId { get; private set; }
/// <summary>
/// Valid range 1-15
@@ -202,7 +202,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{
if (!isMoving)
{
ParentCodec.SendText(string.Format("xCommand Camera Ramp CameraId: {0} Pan: Left PanSpeed: {1}", CameraId, PanSpeed));
ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Pan: Left PanSpeed: {1}", CameraId, PanSpeed));
isPanning = true;
}
}
@@ -211,14 +211,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{
if (!isMoving)
{
ParentCodec.SendText(string.Format("xCommand Camera Ramp CameraId: {0} Pan: Right PanSpeed: {1}", CameraId, PanSpeed));
ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Pan: Right PanSpeed: {1}", CameraId, PanSpeed));
isPanning = true;
}
}
public void PanStop()
{
ParentCodec.SendText(string.Format("xCommand Camera Ramp CameraId: {0} Pan: Stop", CameraId));
ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Pan: Stop", CameraId));
isPanning = false;
}
@@ -232,7 +232,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{
if (!isMoving)
{
ParentCodec.SendText(string.Format("xCommand Camera Ramp CameraId: {0} Tilt: Down TiltSpeed: {1}", CameraId, TiltSpeed));
ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Tilt: Down TiltSpeed: {1}", CameraId, TiltSpeed));
isTilting = true;
}
}
@@ -241,14 +241,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{
if (!isMoving)
{
ParentCodec.SendText(string.Format("xCommand Camera Ramp CameraId: {0} Tilt: Up TiltSpeed: {1}", CameraId, TiltSpeed));
ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Tilt: Up TiltSpeed: {1}", CameraId, TiltSpeed));
isTilting = true;
}
}
public void TiltStop()
{
ParentCodec.SendText(string.Format("xCommand Camera Ramp CameraId: {0} Tilt: Stop", CameraId));
ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Tilt: Stop", CameraId));
isTilting = false;
}
@@ -260,7 +260,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{
if (!isMoving)
{
ParentCodec.SendText(string.Format("xCommand Camera Ramp CameraId: {0} Zoom: In ZoomSpeed: {1}", CameraId, ZoomSpeed));
ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Zoom: In ZoomSpeed: {1}", CameraId, ZoomSpeed));
isZooming = true;
}
}
@@ -269,14 +269,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{
if (!isMoving)
{
ParentCodec.SendText(string.Format("xCommand Camera Ramp CameraId: {0} Zoom: Out ZoomSpeed: {1}", CameraId, ZoomSpeed));
ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Zoom: Out ZoomSpeed: {1}", CameraId, ZoomSpeed));
isZooming = true;
}
}
public void ZoomStop()
{
ParentCodec.SendText(string.Format("xCommand Camera Ramp CameraId: {0} Zoom: Stop", CameraId));
ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Zoom: Stop", CameraId));
isZooming = false;
}
@@ -288,7 +288,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{
if (!isMoving)
{
ParentCodec.SendText(string.Format("xCommand Camera Ramp CameraId: {0} Focus: Near", CameraId));
ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Focus: Near", CameraId));
isFocusing = true;
}
}
@@ -297,20 +297,20 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{
if (!isMoving)
{
ParentCodec.SendText(string.Format("xCommand Camera Ramp CameraId: {0} Focus: Far", CameraId));
ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Focus: Far", CameraId));
isFocusing = true;
}
}
public void FocusStop()
{
ParentCodec.SendText(string.Format("xCommand Camera Ramp CameraId: {0} Focus: Stop", CameraId));
ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Focus: Stop", CameraId));
isFocusing = false;
}
public void TriggerAutoFocus()
{
ParentCodec.SendText(string.Format("xCommand Camera TriggerAutofocus CameraId: {0}", CameraId));
ParentCodec.EnqueueCommand(string.Format("xCommand Camera TriggerAutofocus CameraId: {0}", CameraId));
}
#endregion

View File

@@ -9,11 +9,39 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{
#region Digital
[JoinName("PresentationLocalOnly")]
public JoinDataComplete PresentationLocalOnly = new JoinDataComplete(
new JoinData
{
JoinNumber = 205,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Presentation Local Only Feedback",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("PresentationLocalRemote")]
public JoinDataComplete PresentationLocalRemote = new JoinDataComplete(
new JoinData
{
JoinNumber = 206,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Presentation Local and Remote Feedback",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("ActivateDoNotDisturbMode")]
public JoinDataComplete ActivateDoNotDisturbMode = new JoinDataComplete(
new JoinData
{
JoinNumber = 221,
JoinNumber = 241,
JoinSpan = 1
},
new JoinMetadata
@@ -27,7 +55,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public JoinDataComplete DeactivateDoNotDisturbMode = new JoinDataComplete(
new JoinData
{
JoinNumber = 222,
JoinNumber = 242,
JoinSpan = 1
},
new JoinMetadata
@@ -41,7 +69,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public JoinDataComplete ToggleDoNotDisturbMode = new JoinDataComplete(
new JoinData
{
JoinNumber = 223,
JoinNumber = 243,
JoinSpan = 1
},
new JoinMetadata
@@ -55,7 +83,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public JoinDataComplete ActivateStandby = new JoinDataComplete(
new JoinData
{
JoinNumber = 226,
JoinNumber = 246,
JoinSpan = 1
},
new JoinMetadata
@@ -69,7 +97,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public JoinDataComplete DeactivateStandby = new JoinDataComplete(
new JoinData
{
JoinNumber = 227,
JoinNumber = 247,
JoinSpan = 1
},
new JoinMetadata
@@ -83,7 +111,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public JoinDataComplete ActivateHalfWakeMode = new JoinDataComplete(
new JoinData
{
JoinNumber = 228,
JoinNumber = 248,
JoinSpan = 1
},
new JoinMetadata
@@ -97,7 +125,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public JoinDataComplete EnteringStandbyMode = new JoinDataComplete(
new JoinData
{
JoinNumber = 229,
JoinNumber = 249,
JoinSpan = 1
},
new JoinMetadata
@@ -112,12 +140,55 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
#region Analog
[JoinName("RingtoneVolume")]
public JoinDataComplete RingtoneVolume = new JoinDataComplete(
new JoinData
{
JoinNumber = 21,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Ringtone volume set/FB. Valid values are 0 - 100 in increments of 5 (5, 10, 15, 20, etc.)",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Analog
});
[JoinName("PresentationSource")]
public JoinDataComplete PresentationSource = new JoinDataComplete(
new JoinData
{
JoinNumber = 201,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Presentation set/FB. Valid values are 0 - 6 depending on the codec model.",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Analog
});
#endregion
#region Serials
[JoinName("CommandToDevice")]
public JoinDataComplete CommandToDevice = new JoinDataComplete(
new JoinData
{
JoinNumber = 5,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Sends a serial command to the device. Do not include the delimiter, it will be added automatically.",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Serial
});
#endregion

View File

@@ -50,8 +50,16 @@ namespace PepperDash.Essentials.Devices.Common.Codec
public uint PhonebookResultsLimit { get; set; }
[JsonProperty("UiBranding")]
public BrandingLogoProperties UiBranding { get; set; }
public BrandingLogoProperties UiBranding { get; set; }
[JsonProperty("cameraInfo")]
public List<CameraInfo> CameraInfo { get; set; }
public CiscoSparkCodecPropertiesConfig()
{
CameraInfo = new List<CameraInfo>();
}
}
public class SharingProperties
@@ -68,4 +76,14 @@ namespace PepperDash.Essentials.Devices.Common.Codec
[JsonProperty("brandingUrl")]
public string BrandingUrl { get; set; }
}
/// <summary>
/// Describes configuration information for the near end cameras
/// </summary>
public class CameraInfo
{
public int CameraNumber { get; set; }
public string Name { get; set; }
public int SourceId { get; set; }
}
}

View File

@@ -26,6 +26,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
void CodecRoomPresetSelect(int preset);
void CodecRoomPresetStore(int preset, string description);
void SelectFarEndPreset(int preset);
}
public static class RoomPresets

View File

@@ -112,16 +112,46 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
public class RingVolume
public class RingVolume : ValueProperty
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
string _Value;
/// <summary>
/// Sets Value and triggers the action when set
/// </summary>
public string Value
{
get
{
return _Value;
}
set
{
_Value = value;
OnValueChanged();
}
}
public int Volume
{
get
{
return Int32.Parse(_Value);
}
}
}
public class SoundsAndAlerts
{
public RingTone RingTone { get; set; }
public RingVolume RingVolume { get; set; }
public SoundsAndAlerts()
{
RingVolume = new RingVolume();
}
}
public class Audio
@@ -131,6 +161,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public Microphones Microphones { get; set; }
public Output Output { get; set; }
public SoundsAndAlerts SoundsAndAlerts { get; set; }
public Audio()
{
SoundsAndAlerts = new SoundsAndAlerts();
}
}
public class DefaultMode
@@ -340,6 +376,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public Delay Delay { get; set; }
public Mode9 Mode { get; set; }
public Mute2 Mute { get; set; }
public AutoAnswer()
{
Mode = new Mode9();
Delay = new Delay();
Mute = new Mute2();
}
}
public class Protocol
@@ -440,6 +483,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public MaxTotalTransmitCallRate MaxTotalTransmitCallRate { get; set; }
public MaxTransmitCallRate MaxTransmitCallRate { get; set; }
public MultiStream MultiStream { get; set; }
public Conference()
{
AutoAnswer = new AutoAnswer();
}
}
public class LoginName
@@ -690,6 +738,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public Assignment Assignment { get; set; }
public Gateway Gateway { get; set; }
public SubnetMask SubnetMask { get; set; }
public IPv4()
{
Address = new Address4();
}
}
public class Address5
@@ -841,6 +894,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public RemoteAccess RemoteAccess { get; set; }
public Speed Speed { get; set; }
public VLAN VLAN { get; set; }
public Network()
{
IPv4 = new IPv4();
}
}
public class Mode19
@@ -1797,11 +1855,23 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public UserInterface UserInterface { get; set; }
public UserManagement UserManagement { get; set; }
public Video2 Video { get; set; }
public Configuration()
{
Audio = new Audio();
Conference = new Conference();
Network = new List<Network>();
}
}
public class RootObject
{
public Configuration Configuration { get; set; }
public RootObject()
{
Configuration = new Configuration();
}
}
}
}

View File

@@ -12,28 +12,28 @@ using PepperDash.Essentials.Devices.Common.VideoCodec.CiscoCodec;
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{
// Helper Classes for Proerties
public abstract class ValueProperty
{
/// <summary>
/// Triggered when Value is set
/// </summary>
public Action ValueChangedAction { get; set; }
protected void OnValueChanged()
{
var a = ValueChangedAction;
if (a != null)
a();
}
}
/// <summary>
/// This class exists to capture serialized data sent back by a Cisco codec in JSON output mode
/// </summary>
public class CiscoCodecStatus
{
// Helper Classes for Proerties
public abstract class ValueProperty
{
/// <summary>
/// Triggered when Value is set
/// </summary>
public Action ValueChangedAction { get; set; }
protected void OnValueChanged()
{
var a = ValueChangedAction;
if (a != null)
a();
}
}
public class ConnectionStatus
{
@@ -262,11 +262,30 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
public class DectectedConnector
{
public string Value { get; set; }
public int ConnectorId
{
get
{
if(!string.IsNullOrEmpty(Value))
{
return Convert.ToUInt16(Value);
}
else
return -1;
}
}
}
public class Camera
{
public string id { get; set; }
public Capabilities Capabilities { get; set; }
public Connected Connected { get; set; }
public DectectedConnector DetectedConnector { get; set; }
public Flip Flip { get; set; }
public HardwareID HardwareID { get; set; }
public MacAddress MacAddress { get; set; }
@@ -275,6 +294,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public Position Position { get; set; }
public SerialNumber SerialNumber { get; set; }
public SoftwareID SoftwareID { get; set; }
public Camera()
{
Manufacturer = new Manufacturer();
Model = new Model();
DetectedConnector = new DectectedConnector();
}
}
public class Availability : ValueProperty
@@ -298,11 +324,34 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
}
}
public class CallStatus : ValueProperty
{
string _Value;
public bool BoolValue { get; private set; }
public string Value
{
get
{
return _Value;
}
set
{
// If the incoming value is "Active" it sets the BoolValue true, otherwise sets it false
_Value = value;
BoolValue = value == "Connected";
OnValueChanged();
}
}
}
public class Status2 : ValueProperty
{
string _Value;
public bool BoolValue { get; private set; }
public string Value
{
get
@@ -558,9 +607,47 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
}
}
public class SendingMode
public class SendingMode : ValueProperty
{
public string Value { get; set; }
string _Value;
/// <summary>
/// Sets Value and triggers the action when set
/// </summary>
public string Value
{
get
{
return _Value;
}
set
{
_Value = value;
OnValueChanged();
}
}
public bool LocalOnly
{
get
{
if(string.IsNullOrEmpty(_Value))
return false;
return _Value.ToLower() == "localonly";
}
}
public bool LocalRemote
{
get
{
if(string.IsNullOrEmpty(_Value))
return false;
return _Value.ToLower() == "localremote";
}
}
}
public class LocalInstance
@@ -573,6 +660,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public LocalInstance()
{
Source = new Source2();
SendingMode = new SendingMode();
}
}
@@ -881,6 +969,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public Address4 Address { get; set; }
public Gateway Gateway { get; set; }
public SubnetMask SubnetMask { get; set; }
public IPv4()
{
Address = new Address4();
}
}
public class Address5
@@ -923,6 +1016,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public IPv4 IPv4 { get; set; }
public IPv6 IPv6 { get; set; }
public VLAN VLAN { get; set; }
public Network()
{
IPv4 = new IPv4();
}
}
public class CurrentAddress
@@ -1949,9 +2047,30 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
public class Duration
public class Duration : ValueProperty
{
public string Value { get; set; }
private string _Value;
public string Value
{
get
{
return _Value;
}
set
{
_Value = value;
OnValueChanged();
}
}
public TimeSpan DurationValue
{
get
{
return new TimeSpan(0, 0, Int32.Parse(_Value));
}
}
}
public class FacilityServiceId
@@ -1964,9 +2083,19 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
public class PlacedOnHold
public class PlacedOnHold : ValueProperty
{
public string Value { get; set; }
public bool BoolValue { get; private set; }
public string Value
{
set
{
// If the incoming value is "True" it sets the BoolValue true, otherwise sets it false
BoolValue = value == "True";
OnValueChanged();
}
}
}
public class Protocol
@@ -2007,13 +2136,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public Protocol Protocol { get; set; }
public ReceiveCallRate ReceiveCallRate { get; set; }
public RemoteNumber RemoteNumber { get; set; }
public Status2 Status { get; set; }
public CallStatus Status { get; set; }
public TransmitCallRate TransmitCallRate { get; set; }
public Call()
{
CallType = new CallType();
Status = new Status2();
Status = new CallStatus();
Duration = new Duration();
}
}
@@ -2114,6 +2244,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
SystemUnit = new SystemUnit();
Video = new Video();
Conference = new Conference2();
Network = new List<Network>();
}
}

View File

@@ -6,6 +6,8 @@ using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Devices.Common.VideoCodec
{
/// <summary>
@@ -25,7 +27,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
/// </summary>
public interface IHasZoomRoomLayouts : IHasCodecLayouts
{
event EventHandler<LayoutInfoChangedEventArgs> AvailableLayoutsChanged;
event EventHandler<LayoutInfoChangedEventArgs> LayoutInfoChanged;
BoolFeedback LayoutViewIsOnFirstPageFeedback { get; } // TODO: #697 [*] Consider modifying to report button visibility in func
BoolFeedback LayoutViewIsOnLastPageFeedback { get; } // TODO: #697 [*] Consider modifying to report button visibility in func
@@ -45,6 +47,17 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
public class LayoutInfoChangedEventArgs : EventArgs
{
[JsonProperty("availableLayouts", NullValueHandling = NullValueHandling.Ignore)]
public ZoomRoom.zConfiguration.eLayoutStyle AvailableLayouts { get; set; }
[JsonProperty("currentSelectedLayout", NullValueHandling = NullValueHandling.Ignore)]
public ZoomRoom.zConfiguration.eLayoutStyle CurrentSelectedLayout { get; set; }
[JsonProperty("canSwapContentWithThumbnail", NullValueHandling = NullValueHandling.Ignore)]
public bool CanSwapContentWithThumbnail { get; set; }
[JsonProperty("contentSwappedWithThumbnail", NullValueHandling = NullValueHandling.Ignore)]
public bool ContentSwappedWithThumbnail { get; set; }
[JsonProperty("layoutViewIsOnFirstPage", NullValueHandling = NullValueHandling.Ignore)]
public bool LayoutViewIsOnFirstPage { get; set; }
[JsonProperty("layoutViewIsOnLastPage", NullValueHandling = NullValueHandling.Ignore)]
public bool LayoutViewIsOnLastPage { get; set; }
}
}

View File

@@ -24,24 +24,27 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
/// </summary>
public class MeetingInfo
{
[JsonProperty("id")]
[JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)]
public string Id { get; private set; }
[JsonProperty("name")]
[JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)]
public string Name { get; private set; }
[JsonProperty("host")]
[JsonProperty("host", NullValueHandling = NullValueHandling.Ignore)]
public string Host { get; private set; }
[JsonProperty("password")]
[JsonProperty("password", NullValueHandling = NullValueHandling.Ignore)]
public string Password { get; private set; }
[JsonProperty("shareStatus")]
[JsonProperty("shareStatus", NullValueHandling = NullValueHandling.Ignore)]
public string ShareStatus { get; private set; }
[JsonProperty("isHost")]
[JsonProperty("isHost", NullValueHandling = NullValueHandling.Ignore)]
public Boolean IsHost { get; private set; }
[JsonProperty("isSharingMeeting")]
[JsonProperty("isSharingMeeting", NullValueHandling = NullValueHandling.Ignore)]
public Boolean IsSharingMeeting { get; private set; }
[JsonProperty("waitingForHost")]
[JsonProperty("waitingForHost", NullValueHandling = NullValueHandling.Ignore)]
public Boolean WaitingForHost { get; private set; }
[JsonProperty("isLocked", NullValueHandling = NullValueHandling.Ignore)]
public Boolean IsLocked { get; private set; }
public MeetingInfo(string id, string name, string host, string password, string shareStatus, bool isHost, bool isSharingMeeting, bool waitingForHost)
public MeetingInfo(string id, string name, string host, string password, string shareStatus, bool isHost, bool isSharingMeeting, bool waitingForHost, bool isLocked)
{
Id = id;
Name = name;
@@ -51,6 +54,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
IsHost = isHost;
IsSharingMeeting = isSharingMeeting;
WaitingForHost = waitingForHost;
IsLocked = isLocked;
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
{
public interface IHasMeetingLock
{
BoolFeedback MeetingIsLockedFeedback { get; }
void LockMeeting();
void UnLockMeeting();
void ToggleMeetingLock();
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
{
public interface IHasMeetingRecording
{
BoolFeedback MeetingIsRecordingFeedback { get; }
void StartRecording();
void StopRecording();
void ToggleRecording();
}
}

View File

@@ -12,6 +12,18 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
public interface IHasParticipants
{
CodecParticipants Participants { get; }
/// <summary>
/// Removes the participant from the meeting
/// </summary>
/// <param name="participant"></param>
void RemoveParticipant(int userId);
/// <summary>
/// Sets the participant as the new host
/// </summary>
/// <param name="participant"></param>
void SetParticipantAsHost(int userId);
}
/// <summary>
@@ -29,6 +41,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
/// </summary>
public interface IHasParticipantAudioMute : IHasParticipantVideoMute
{
/// <summary>
/// Mute audio of all participants
/// </summary>
void MuteAudioForAllParticipants();
void MuteAudioForParticipant(int userId);
void UnmuteAudioForParticipant(int userId);
void ToggleAudioForParticipant(int userId);

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Devices.Common.Codec;
namespace PepperDash.Essentials.Devices.Common.VideoCodec
{
public interface IJoinCalls
{
void JoinCall(CodecActiveCallItem activeCall);
void JoinAllCalls();
}
}

View File

@@ -4,6 +4,8 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Devices.Common.Codec
{
/// <summary>
@@ -19,12 +21,19 @@ namespace PepperDash.Essentials.Devices.Common.Codec
/// </summary>
public abstract class VideoCodecInfo
{
[JsonProperty("multiSiteOptionIsEnabled", NullValueHandling = NullValueHandling.Ignore)]
public abstract bool MultiSiteOptionIsEnabled { get; }
[JsonProperty("ipAddress", NullValueHandling = NullValueHandling.Ignore)]
public abstract string IpAddress { get; }
[JsonProperty("sipPhoneNumber", NullValueHandling = NullValueHandling.Ignore)]
public abstract string SipPhoneNumber { get; }
[JsonProperty("e164Alias", NullValueHandling = NullValueHandling.Ignore)]
public abstract string E164Alias { get; }
[JsonProperty("h323Id", NullValueHandling = NullValueHandling.Ignore)]
public abstract string H323Id { get; }
[JsonProperty("sipUri", NullValueHandling = NullValueHandling.Ignore)]
public abstract string SipUri { get; }
[JsonProperty("autoAnswerEnabled", NullValueHandling = NullValueHandling.Ignore)]
public abstract bool AutoAnswerEnabled { get; }
}
}

View File

@@ -431,8 +431,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
m.MinutesBeforeMeeting = 5;
m.Id = i.ToString();
m.Organizer = "Employee " + 1;
m.StartTime = DateTime.Now.AddMinutes(6).AddHours(i);
m.EndTime = DateTime.Now.AddHours(i).AddMinutes(16);
m.StartTime = DateTime.Now.AddMinutes(5).AddHours(i);
m.EndTime = DateTime.Now.AddHours(i).AddMinutes(50);
m.Title = "Meeting " + i;
m.Calls.Add(new Call() { Number = i + "meeting@fake.com"});
_CodecSchedule.Meetings.Add(m);
@@ -602,6 +602,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
CameraAutoModeIsOnFeedback = new BoolFeedback(() => _CameraAutoModeIsOn);
SupportsCameraAutoMode = true;
CameraAutoModeIsOnFeedback.FireUpdate();
DeviceManager.AddDevice(internalCamera);
@@ -609,7 +611,18 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
NearEndPresets = new List<CodecRoomPreset>(15); // Fix the capacity to emulate Cisco
NearEndPresets = PropertiesConfig.Presets;
if (PropertiesConfig.Presets != null && PropertiesConfig.Presets.Count > 0)
{
NearEndPresets = PropertiesConfig.Presets;
}
else
{
for (int i = 1; i <= NearEndPresets.Capacity; i++)
{
var label = string.Format("Near End Preset {0}", i);
NearEndPresets.Add(new CodecRoomPreset(i, label, true, false));
}
}
FarEndRoomPresets = new List<CodecRoomPreset>(15); // Fix the capacity to emulate Cisco
@@ -751,6 +764,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
SetConfig(Config);
}
public void SelectFarEndPreset(int i)
{
Debug.Console(1, this, "Selecting Far End Preset: {0}", i);
}
#endregion
protected override void CustomSetConfig(DeviceConfig config)

View File

@@ -18,5 +18,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
[JsonProperty("presets")]
public List<CodecRoomPreset> Presets { get; set; }
public MockVcPropertiesConfig()
{
Favorites = new List<CodecActiveCallItem>();
Presets = new List<CodecRoomPreset>();
}
}
}

View File

@@ -618,13 +618,31 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
private bool _can_Switch_Speaker_View;
private bool _can_Switch_Wall_View;
private bool _can_Switch_Share_On_All_Screens;
private bool _can_Switch_Floating_Share_Content;
private bool _is_In_First_Page;
private bool _is_In_Last_Page;
private string _video_type;
public bool can_Adjust_Floating_Video { get; set; }
public bool can_Switch_Floating_Share_Content { get; set; }
public bool can_Switch_Floating_Share_Content
{
get
{
return _can_Switch_Floating_Share_Content;
}
set
{
if (value != _can_Switch_Floating_Share_Content)
{
_can_Switch_Floating_Share_Content = value;
NotifyPropertyChanged("can_Switch_Floating_Share_Content");
}
}
}
/// <summary>
/// [on/off] // Set to On if it is possible to invoke zConfiguration Call Layout Style: ShareAll, to switch to the ShareAll mode, where the content sharing is shown full screen on all monitors.
@@ -744,12 +762,29 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
}
}
public class CallRecordInfo
public class CallRecordInfo : NotifiableObject
{
private bool _meetingIsBeingRecorded;
public bool canRecord { get; set; }
public bool emailRequired { get; set; }
public bool amIRecording { get; set; }
public bool meetingIsBeingRecorded { get; set; }
public bool meetingIsBeingRecorded
{
get
{
return _meetingIsBeingRecorded;
}
set
{
if (value != _meetingIsBeingRecorded)
{
_meetingIsBeingRecorded = value;
NotifyPropertyChanged("meetingIsBeingRecorded");
}
}
}
}
}
@@ -1123,9 +1158,25 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
}
}
public class Lock
public class Lock : NotifiableObject
{
public bool Enable { get; set; }
private bool _enable;
public bool Enable
{
get
{
return _enable;
}
set
{
if (value != _enable)
{
_enable = value;
NotifyPropertyChanged("Enable");
}
}
}
}
public class ClosedCaption

View File

@@ -7,6 +7,8 @@ using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Essentials.Core.Bridges;
using PepperDash.Essentials.Devices.Common.Cameras;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{
public enum eZoomRoomCameraState
@@ -34,7 +36,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{
protected ZoomRoom ParentCodec { get; private set; }
public int Id = 0; // ID of near end selected camara is always 0
[JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)]
public int? Id = 0; // ID of near end selected camara is always 0
private int ContinueTime = 10; // number of milliseconds between issuing continue commands

View File

@@ -1,301 +1,496 @@
using System;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Bridges.JoinMaps;
namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{
public class ZoomRoomJoinMap : VideoCodecControllerJoinMap
{
#region Digital
[JoinName("CanSwapContentWithThumbnail")]
public JoinDataComplete CanSwapContentWithThumbnail = new JoinDataComplete(
new JoinData
{
JoinNumber = 206,
JoinSpan = 1
},
new JoinMetadata
{
Description = "FB Indicates if content can be swapped with thumbnail",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("SwapContentWithThumbnail")]
public JoinDataComplete SwapContentWithThumbnail = new JoinDataComplete(
new JoinData
{
JoinNumber = 206,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Pulse to swap content with thumbnail. FB reports current state",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("GetAvailableLayouts")]
public JoinDataComplete GetAvailableLayouts = new JoinDataComplete(
new JoinData
{
JoinNumber = 215,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Gets the available layouts. Will update the LayoutXXXXXIsAvailbale signals.",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("LayoutIsOnFirstPage")]
public JoinDataComplete LayoutIsOnFirstPage = new JoinDataComplete(
new JoinData
{
JoinNumber = 216,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Indicates if layout is on first page",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("LayoutIsOnLastPage")]
public JoinDataComplete LayoutIsOnLastPage = new JoinDataComplete(
new JoinData
{
JoinNumber = 217,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Indicates if layout is on first page",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("LayoutTurnToNextPage")]
public JoinDataComplete LayoutTurnToNextPage = new JoinDataComplete(
new JoinData
{
JoinNumber = 216,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Turns layout view to next page",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("LayoutTurnToPreviousPage")]
public JoinDataComplete LayoutTurnToPreviousPage = new JoinDataComplete(
new JoinData
{
JoinNumber = 217,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Turns layout view to previous page",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("LayoutGalleryIsAvailable")]
public JoinDataComplete LayoutGalleryIsAvailable = new JoinDataComplete(
new JoinData
{
JoinNumber = 221,
JoinSpan = 1
},
new JoinMetadata
{
Description = "FB Indicates if layout 'Gallery' is available",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.DigitalSerial
});
[JoinName("LayoutSpeakerIsAvailable")]
public JoinDataComplete LayoutSpeakerIsAvailable = new JoinDataComplete(
new JoinData
{
JoinNumber = 222,
JoinSpan = 1
},
new JoinMetadata
{
Description = "FB Indicates if layout 'Speaker' is available",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.DigitalSerial
});
[JoinName("LayoutStripIsAvailable")]
public JoinDataComplete LayoutStripIsAvailable = new JoinDataComplete(
new JoinData
{
JoinNumber = 223,
JoinSpan = 1
},
new JoinMetadata
{
Description = "FB Indicates if layout 'Strip' is available",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.DigitalSerial
});
[JoinName("LayoutShareAllIsAvailable")]
public JoinDataComplete LayoutShareAllIsAvailable = new JoinDataComplete(
new JoinData
{
JoinNumber = 224,
JoinSpan = 1
},
new JoinMetadata
{
Description = "FB Indicates if layout 'ShareAll' is available",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.DigitalSerial
});
// TODO: #714 [ ] JoinMap >> SelfivewPipSizeToggle
[JoinName("SelfviewPipSizeToggle")]
public JoinDataComplete SelfviewPipSizeToggle = new JoinDataComplete(
new JoinData
{
JoinNumber = 231,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Toggles the selfview pip size, (aka layout size)",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Digital
});
//[JoinName("ParticipantAudioMuteToggleStart")]
//public JoinDataComplete ParticipantAudioMuteToggleStart = new JoinDataComplete(
// new JoinData
// {
// JoinNumber = 500,
// JoinSpan = 100
// },
// new JoinMetadata
// {
// Description = "Toggles the participant's audio mute status",
// JoinCapabilities = eJoinCapabilities.ToSIMPL,
// JoinType = eJoinType.Digital
// });
//[JoinName("ParticipantVideoMuteToggleStart")]
//public JoinDataComplete ParticipantVideoMuteToggleStart = new JoinDataComplete(
// new JoinData
// {
// JoinNumber = 800,
// JoinSpan = 100
// },
// new JoinMetadata
// {
// Description = "Toggles the participant's video mute status",
// JoinCapabilities = eJoinCapabilities.ToSIMPL,
// JoinType = eJoinType.Digital
// });
//[JoinName("ParticipantPinToggleStart")]
//public JoinDataComplete ParticipantPinToggleStart = new JoinDataComplete(
// new JoinData
// {
// JoinNumber = 1100,
// JoinSpan = 100
// },
// new JoinMetadata
// {
// Description = "Toggles the participant's pin status",
// JoinCapabilities = eJoinCapabilities.ToSIMPL,
// JoinType = eJoinType.Digital
// });
#endregion
#region Analog
[JoinName("NumberOfScreens")]
public JoinDataComplete NumberOfScreens = new JoinDataComplete(
new JoinData
{
JoinNumber = 11,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Reports the number of screens connected",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Analog
});
[JoinName("ScreenIndexToPinUserTo")]
public JoinDataComplete ScreenIndexToPinUserTo = new JoinDataComplete(
new JoinData
{
JoinNumber = 11,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Specifies the screen index a participant should be pinned to",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Analog
});
#endregion
#region Serials
[JoinName("GetSetCurrentLayout")]
public JoinDataComplete GetSetCurrentLayout = new JoinDataComplete(
new JoinData
{
JoinNumber = 215,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Sets and reports the current layout. Use the LayoutXXXXIsAvailable signals to determine valid layouts",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Serial
});
// TODO: #714 [ ] JoinMap >> GetSetSelfviewPipSize
[JoinName("GetSetSelfviewPipSize")]
public JoinDataComplete GetSetSelfviewPipSize = new JoinDataComplete(
new JoinData
{
JoinNumber = 230,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Sets and reports the selfview pip size, (aka layout size).",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.DigitalSerial
});
#endregion
public ZoomRoomJoinMap(uint joinStart)
: base(joinStart, typeof(ZoomRoomJoinMap))
{
}
public ZoomRoomJoinMap(uint joinStart, Type type)
: base(joinStart, type)
{
}
}
using System;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Bridges.JoinMaps;
namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{
public class ZoomRoomJoinMap : VideoCodecControllerJoinMap
{
#region Digital
// TODO [ ] Issue #868
[JoinName("ShowPasswordPrompt")]
public JoinDataComplete ShowPasswordPrompt = new JoinDataComplete(
new JoinData
{
JoinNumber = 6,
JoinSpan = 1
},
new JoinMetadata
{
Description = "FB Indicates to show the password prompt",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
// TODO [ ] Issue #868
[JoinName("PasswordIncorrect")]
public JoinDataComplete PasswordIncorrect = new JoinDataComplete(
new JoinData
{
JoinNumber = 7,
JoinSpan = 1
},
new JoinMetadata
{
Description = "FB Indicates the password entered is incorrect",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
// TODO [ ] Issue #868
[JoinName("PassowrdLoginFailed")]
public JoinDataComplete PasswordLoginFailed = new JoinDataComplete(
new JoinData
{
JoinNumber = 8,
JoinSpan = 1
},
new JoinMetadata
{
Description = "FB Indicates the password entered is incorrect",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
// TODO [ ] Issue #868
[JoinName("WaitingForHost")]
public JoinDataComplete WaitingForHost = new JoinDataComplete(
new JoinData
{
JoinNumber = 9,
JoinSpan = 1
},
new JoinMetadata
{
Description = "FB Indicates system is waiting for host",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
// TODO [ ] Issue #868
[JoinName("IsHost")]
public JoinDataComplete IsHost = new JoinDataComplete(
new JoinData
{
JoinNumber = 10,
JoinSpan = 1
},
new JoinMetadata
{
Description = "FB Indicates system is the host",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
// TODO [ ] Issue #868
[JoinName("StartMeetingNow")]
public JoinDataComplete StartMeetingNow = new JoinDataComplete(
new JoinData
{
JoinNumber = 25,
JoinSpan = 1
},
new JoinMetadata
{
Description = "FB Indicates the password prompt is active",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
// TODO [ ] Issue #868
[JoinName("ShareOnlyMeeting")]
public JoinDataComplete ShareOnlyMeeting = new JoinDataComplete(
new JoinData
{
JoinNumber = 26,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Triggers a share only meeting, feedback indicates the current meeting is share only",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Digital
});
// TODO [ ] Issue #868
[JoinName("StartNormalMeetingFromSharingOnlyMeeting")]
public JoinDataComplete StartNormalMeetingFromSharingOnlyMeeting = new JoinDataComplete(
new JoinData
{
JoinNumber = 27,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Starts a normal meeting from a share only meeting",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("CanSwapContentWithThumbnail")]
public JoinDataComplete CanSwapContentWithThumbnail = new JoinDataComplete(
new JoinData
{
JoinNumber = 206,
JoinSpan = 1
},
new JoinMetadata
{
Description = "FB Indicates if content can be swapped with thumbnail",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("SwapContentWithThumbnail")]
public JoinDataComplete SwapContentWithThumbnail = new JoinDataComplete(
new JoinData
{
JoinNumber = 206,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Pulse to swap content with thumbnail. FB reports current state",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("GetAvailableLayouts")]
public JoinDataComplete GetAvailableLayouts = new JoinDataComplete(
new JoinData
{
JoinNumber = 215,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Gets the available layouts. Will update the LayoutXXXXXIsAvailbale signals.",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("LayoutIsOnFirstPage")]
public JoinDataComplete LayoutIsOnFirstPage = new JoinDataComplete(
new JoinData
{
JoinNumber = 216,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Indicates if layout is on first page",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("LayoutIsOnLastPage")]
public JoinDataComplete LayoutIsOnLastPage = new JoinDataComplete(
new JoinData
{
JoinNumber = 217,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Indicates if layout is on first page",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("LayoutTurnToNextPage")]
public JoinDataComplete LayoutTurnToNextPage = new JoinDataComplete(
new JoinData
{
JoinNumber = 216,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Turns layout view to next page",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("LayoutTurnToPreviousPage")]
public JoinDataComplete LayoutTurnToPreviousPage = new JoinDataComplete(
new JoinData
{
JoinNumber = 217,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Turns layout view to previous page",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("LayoutGalleryIsAvailable")]
public JoinDataComplete LayoutGalleryIsAvailable = new JoinDataComplete(
new JoinData
{
JoinNumber = 221,
JoinSpan = 1
},
new JoinMetadata
{
Description = "FB Indicates if layout 'Gallery' is available",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.DigitalSerial
});
[JoinName("LayoutSpeakerIsAvailable")]
public JoinDataComplete LayoutSpeakerIsAvailable = new JoinDataComplete(
new JoinData
{
JoinNumber = 222,
JoinSpan = 1
},
new JoinMetadata
{
Description = "FB Indicates if layout 'Speaker' is available",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.DigitalSerial
});
[JoinName("LayoutStripIsAvailable")]
public JoinDataComplete LayoutStripIsAvailable = new JoinDataComplete(
new JoinData
{
JoinNumber = 223,
JoinSpan = 1
},
new JoinMetadata
{
Description = "FB Indicates if layout 'Strip' is available",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.DigitalSerial
});
[JoinName("LayoutShareAllIsAvailable")]
public JoinDataComplete LayoutShareAllIsAvailable = new JoinDataComplete(
new JoinData
{
JoinNumber = 224,
JoinSpan = 1
},
new JoinMetadata
{
Description = "FB Indicates if layout 'ShareAll' is available",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.DigitalSerial
});
// TODO: #714 [ ] JoinMap >> SelfivewPipSizeToggle
[JoinName("SelfviewPipSizeToggle")]
public JoinDataComplete SelfviewPipSizeToggle = new JoinDataComplete(
new JoinData
{
JoinNumber = 231,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Toggles the selfview pip size, (aka layout size)",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Digital
});
//[JoinName("ParticipantAudioMuteToggleStart")]
//public JoinDataComplete ParticipantAudioMuteToggleStart = new JoinDataComplete(
// new JoinData
// {
// JoinNumber = 500,
// JoinSpan = 100
// },
// new JoinMetadata
// {
// Description = "Toggles the participant's audio mute status",
// JoinCapabilities = eJoinCapabilities.ToSIMPL,
// JoinType = eJoinType.Digital
// });
//[JoinName("ParticipantVideoMuteToggleStart")]
//public JoinDataComplete ParticipantVideoMuteToggleStart = new JoinDataComplete(
// new JoinData
// {
// JoinNumber = 800,
// JoinSpan = 100
// },
// new JoinMetadata
// {
// Description = "Toggles the participant's video mute status",
// JoinCapabilities = eJoinCapabilities.ToSIMPL,
// JoinType = eJoinType.Digital
// });
//[JoinName("ParticipantPinToggleStart")]
//public JoinDataComplete ParticipantPinToggleStart = new JoinDataComplete(
// new JoinData
// {
// JoinNumber = 1100,
// JoinSpan = 100
// },
// new JoinMetadata
// {
// Description = "Toggles the participant's pin status",
// JoinCapabilities = eJoinCapabilities.ToSIMPL,
// JoinType = eJoinType.Digital
// });
#endregion
#region Analog
[JoinName("NumberOfScreens")]
public JoinDataComplete NumberOfScreens = new JoinDataComplete(
new JoinData
{
JoinNumber = 11,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Reports the number of screens connected",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Analog
});
[JoinName("ScreenIndexToPinUserTo")]
public JoinDataComplete ScreenIndexToPinUserTo = new JoinDataComplete(
new JoinData
{
JoinNumber = 11,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Specifies the screen index a participant should be pinned to",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Analog
});
#endregion
#region Serials
// TODO [ ] Issue #868
[JoinName("SubmitPassword")]
public JoinDataComplete SubmitPassword = new JoinDataComplete(
new JoinData
{
JoinNumber = 6,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Submit password text",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Serial
});
// TODO [ ] Issue #868
[JoinName("PasswordPromptMessage")]
public JoinDataComplete PasswordPromptMessage = new JoinDataComplete(
new JoinData
{
JoinNumber = 6,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Password prompt message",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
// TODO [ ] Issue #868
[JoinName("MeetingInfoId")]
public JoinDataComplete MeetingInfoId = new JoinDataComplete(
new JoinData
{
JoinNumber = 11,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Meeting info ID text feedback",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
// TODO [ ] Issue #868
[JoinName("MeetingInfoHostt")]
public JoinDataComplete MeetingInfoHost = new JoinDataComplete(
new JoinData
{
JoinNumber = 12,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Meeting info Host text feedback",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
// TODO [ ] Issue #868
[JoinName("MeetingInfoPassword")]
public JoinDataComplete MeetingInfoPassword = new JoinDataComplete(
new JoinData
{
JoinNumber = 13,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Meeting info Password text feedback",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
[JoinName("GetSetCurrentLayout")]
public JoinDataComplete GetSetCurrentLayout = new JoinDataComplete(
new JoinData
{
JoinNumber = 215,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Sets and reports the current layout. Use the LayoutXXXXIsAvailable signals to determine valid layouts",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Serial
});
// TODO: #714 [ ] JoinMap >> GetSetSelfviewPipSize
[JoinName("GetSetSelfviewPipSize")]
public JoinDataComplete GetSetSelfviewPipSize = new JoinDataComplete(
new JoinData
{
JoinNumber = 230,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Sets and reports the selfview pip size, (aka layout size).",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.DigitalSerial
});
#endregion
public ZoomRoomJoinMap(uint joinStart)
: base(joinStart, typeof(ZoomRoomJoinMap))
{
}
public ZoomRoomJoinMap(uint joinStart, Type type)
: base(joinStart, type)
{
}
}
}

View File

@@ -2,30 +2,40 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharp;
using Newtonsoft.Json;
using PepperDash.Core;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{
public class ZoomRoomPropertiesConfig
{
public CommunicationMonitorConfig CommunicationMonitorProperties { get; set; }
public bool DisablePhonebookAutoDownload { get; set; }
public bool SupportsCameraAutoMode { get; set; }
{
[JsonProperty("communicationMonitorProperties")]
public CommunicationMonitorConfig CommunicationMonitorProperties { get; set; }
[JsonProperty("disablePhonebookAutoDownload")]
public bool DisablePhonebookAutoDownload { get; set; }
[JsonProperty("supportsCameraAutoMode")]
public bool SupportsCameraAutoMode { get; set; }
[JsonProperty("supportsCameraOff")]
public bool SupportsCameraOff { get; set; }
//if true, the layouts will be set automatically when sharing starts/ends or a call is joined
//if true, the layouts will be set automatically when sharing starts/ends or a call is joined
[JsonProperty("autoDefaultLayouts")]
public bool AutoDefaultLayouts { get; set; }
/* This layout will be selected when Sharing starts (either from Far end or locally)*/
/* This layout will be selected when Sharing starts (either from Far end or locally)*/
[JsonProperty("defaultSharingLayout")]
public string DefaultSharingLayout { get; set; }
//This layout will be selected when a call is connected and no content is being shared
public string DefaultCallLayout { get; set; }
//This layout will be selected when a call is connected and no content is being shared
[JsonProperty("defaultCallLayout")]
public string DefaultCallLayout { get; set; }
[JsonProperty("minutesBeforeMeetingStart")]
public int MinutesBeforeMeetingStart { get; set; }
}
}

View File

@@ -1,3 +1,3 @@
<packages>
<package id="PepperDashCore" version="1.1.0" targetFramework="net35" allowedVersions="[1.0,2.0)"/>
<package id="PepperDashCore" version="1.1.1-rc-247" targetFramework="net35" allowedVersions="[1.0,2.0)"/>
</packages>